From d4ac55b3f51da2d605c1c0b936c419f626536f81 Mon Sep 17 00:00:00 2001 From: Stefan Lengfeld Date: Wed, 13 Aug 2025 22:52:27 +0200 Subject: [PATCH] upgrade yocto to next version The build was succesfully, but no boot test done. --- sources/meta-mylayer/conf/layer.conf | 2 +- .../recipes-example/hello/hello_0.1.bb | 2 +- sources/meta-openembedded/.subproject | 4 +- .../meta-filesystems/README.md | 8 +- .../include/non-repro-meta-filesystems.inc | 3 - .../meta-filesystems/conf/layer.conf | 2 +- ...use-after-free-in-ntfs_uppercase_mbs.patch | 42 + .../ntfs-3g-ntfsprogs_2022.10.3.bb | 1 + .../recipes-filesystems/owfs/owfs_3.2p3.bb | 4 +- .../recipes-filesystems/zfs/zfs_2.2.2.bb | 77 - .../recipes-filesystems/zfs/zfs_2.2.5.bb | 77 + .../composefs/composefs_1.0.3.bb | 23 - ...e-portable-implementation-for-basena.patch | 75 - .../recipes-support/fuse/fuse_2.9.9.bb | 4 +- .../recipes-utils/aufs-util/aufs-util_git.bb | 2 +- .../recipes-utils/e2tools/e2tools_git.bb | 44 +- ...Disable-portability-warning-as-error.patch | 34 + .../exfatprogs/exfatprogs_1.2.2.bb | 24 - .../exfatprogs/exfatprogs_1.2.5.bb | 24 + .../0001-always-use-glibc-basename.patch | 38 + ...program_name-to-have-const-attribute.patch | 56 + .../overlayfs/overlayfs-tools_git.bb | 28 - .../overlayfs/overlayfs-tools_v2024.07.bb | 18 + .../recipes-utils/xfsdump/xfsdump_3.1.12.bb | 40 - .../recipes-utils/xfsdump/xfsdump_3.2.0.bb | 40 + .../xfstests/xfstests_2024.03.03.bb | 14 +- .../meta-openembedded/meta-gnome/README.md | 8 +- .../meta-gnome/conf/layer.conf | 2 +- .../gnome-remote-desktop_46.2.bb | 12 +- .../gnome-boxes/gnome-boxes_46.0.bb | 41 - .../gnome-boxes/gnome-boxes_46.1.bb | 43 + .../folks/folks_0.15.8.bb | 28 - .../folks/folks_0.15.9.bb | 28 + ...tion-client.vala-hardcode-some-paths.patch | 40 + ...NFIG_SYSROOT_DIR-when-using-pkg-conf.patch | 51 - .../recipes-connectivity/geary/geary_44.1.bb | 62 - .../recipes-connectivity/geary/geary_46.0.bb | 59 + .../polkit-gnome/polkit-gnome_0.105.bb | 2 +- ...f-load-fix-mismatching-variable-type.patch | 24 + ...1-gimptool-allow-default-CC-override.patch | 85 + ...001-metadata-shut-up-a-weird-warning.patch | 22 + .../recipes-gimp/gimp/gimp_2.10.36.bb | 72 - .../recipes-gimp/gimp/gimp_2.10.38.bb | 101 + .../devilspie/devilspie2_0.44.bb | 4 +- .../meta-gnome/recipes-gnome/eog/eog_45.3.bb | 31 - .../meta-gnome/recipes-gnome/eog/eog_47.0.bb | 31 + .../recipes-gnome/evince/evince_46.0.bb | 58 - .../recipes-gnome/evince/evince_46.3.bb | 62 + .../evolution-data-server.bb | 2 +- .../faenza-icon-theme_1.3.bb | 3 +- .../file-roller/file-roller_44.1.bb | 46 - .../file-roller/file-roller_44.3.bb | 46 + .../meta-gnome/recipes-gnome/gdm/gdm_46.0.bb | 1 + .../gedit/libgedit-gtksourceview_299.1.0.bb | 24 - .../gedit/libgedit-gtksourceview_299.2.1.bb | 24 + .../recipes-gnome/gexiv2/gexiv2_0.14.2.bb | 34 - .../recipes-gnome/gexiv2/gexiv2_0.14.3.bb | 34 + .../gnome-autoar/gnome-autoar_0.4.4.bb | 20 - .../gnome-autoar/gnome-autoar_0.4.5.bb | 20 + .../gnome-backgrounds_46.0.bb | 16 - .../gnome-backgrounds_47.0.bb | 16 + .../gnome-bluetooth/gnome-bluetooth_46.0.bb | 43 - .../gnome-bluetooth/gnome-bluetooth_46.1.bb | 43 + .../gnome-calculator/gnome-calculator_46.0.bb | 38 - .../gnome-calculator/gnome-calculator_46.1.bb | 38 + .../gnome-chess/gnome-chess_46.0.bb | 34 - .../gnome-chess/gnome-chess_47.0.bb | 34 + ...001-Add-meson-option-to-pass-sysroot.patch | 6 +- .../gnome-control-center_46.1.bb | 74 - .../gnome-control-center_46.2.bb | 65 + .../gnome-desktop/gnome-desktop_44.0.bb | 48 - .../gnome-desktop/gnome-desktop_44.1.bb | 48 + .../gnome-disk-utility_46.0.bb | 41 - .../gnome-disk-utility_46.1.bb | 41 + .../gnome-font-viewer_46.0.bb | 24 - .../gnome-font-viewer_47.0.bb | 24 + .../gnome-keyring/gnome-keyring_46.1.bb | 51 - .../gnome-keyring/gnome-keyring_46.2.bb | 51 + .../gnome-online-accounts_3.50.1.bb | 28 - .../gnome-online-accounts_3.50.2.bb | 28 + .../gnome-shell-extensions_46.1.bb | 23 - .../gnome-shell-extensions_46.2.bb | 23 + ...orrect-expected-bus-name-for-streams.patch | 38 - .../gnome-shell/gnome-shell_46.1.bb | 87 - .../gnome-shell/gnome-shell_46.2.bb | 87 + .../gnome-software/gnome-software_46.0.bb | 43 - .../gnome-software/gnome-software_46.2.bb | 43 + .../gnome-text-editor_46.1.bb | 26 - .../gnome-text-editor_46.3.bb | 26 + .../recipes-gnome/grilo/grilo_0.3.16.bb | 11 +- .../gtksourceview-classic-light_1.0.bb | 7 +- .../gtksourceview/gtksourceview3_3.24.11.bb | 3 + .../recipes-gnome/gvfs/gvfs_1.54.0.bb | 11 +- ...lation-attempt-fixes-for-libxml-2.13.patch | 105 + .../recipes-gnome/libgsf/libgsf_1.14.52.bb | 23 + .../recipes-gnome/libgsf/libgsf_1.14.53.bb | 22 - .../libspelling/libspelling_0.2.1.bb | 13 + .../recipes-gnome/msgraph/msgraph_0.2.1.bb | 19 - .../recipes-gnome/msgraph/msgraph_0.2.3.bb | 19 + .../recipes-gnome/mutter/mutter_46.1.bb | 109 - .../recipes-gnome/mutter/mutter_46.4.bb | 109 + .../recipes-gnome/nautilus/nautilus_45.1.bb | 54 - .../recipes-gnome/nautilus/nautilus_46.2.bb | 54 + ...-for-unw_set_caching_policy-before-u.patch | 27 + ...libunwind-instead-of-libunwind-gener.patch | 14 +- ...oke-the-commands-to-update-the-icon-.patch | 32 + .../recipes-gnome/sysprof/sysprof_3.44.0.bb | 43 - .../recipes-gnome/sysprof/sysprof_3.48.0.bb | 50 + .../recipes-gnome/tecla/tecla_46.0.bb | 16 - .../recipes-gnome/tecla/tecla_47.0.bb | 16 + ...to-a-fixed-path-instead-of-a-host-pa.patch | 15 +- .../0001-fix-reproducibility.patch | 105 +- .../tracker/tracker-miners_3.7.1.bb | 86 - .../tracker/tracker-miners_3.7.3.bb | 86 + .../recipes-gnome/tracker/tracker_3.7.1.bb | 59 - .../recipes-gnome/tracker/tracker_3.7.3.bb | 59 + .../recipes-gnome/yelp/yelp_42.2.bb | 2 + .../recipes-gnome/zenity/zenity_4.0.1.bb | 26 - .../recipes-gnome/zenity/zenity_4.0.2.bb | 26 + .../colord-gtk/colord-gtk_0.3.0.bb | 25 - .../colord-gtk/colord-gtk_0.3.1.bb | 25 + .../xdg-desktop-portal-gnome_46.1.bb | 31 - .../xdg-desktop-portal-gnome_46.2.bb | 31 + .../meta-initramfs/README.md | 6 +- .../meta-initramfs/classes/klibc.bbclass | 2 +- .../meta-initramfs/conf/layer.conf | 2 +- .../kexecboot/kexecboot-cfg_0.2.bb | 3 +- .../initrdscripts/initramfs-debug_1.0.bb | 5 +- ...against-__GLIBC_PREREQ-for-musl-libc.patch | 35 - ...all-split-ldd-command-arguments-for-.patch | 91 + ...stall-Do-not-undef-_FILE_OFFSET_BITS.patch | 32 - ....h-include-sys-reg.h-when-libc-glibc.patch | 35 - .../recipes-devtools/dracut/dracut_056.bb | 71 - .../recipes-devtools/dracut/dracut_103.bb | 69 + .../meta-multimedia/README.md | 8 +- .../meta-multimedia/conf/layer.conf | 2 +- .../rygel/rygel_0.42.5.bb | 83 - .../rygel/rygel_0.44.0.bb | 83 + .../recipes-dvb/oscam/oscam_1.20.bb | 20 + .../recipes-dvb/oscam/oscam_svn.bb | 22 - .../aravis/aravis_0.8.31.bb | 1 - ...asename-implementation-from-glib-2.0.patch | 88 + .../bluealsa/bluealsa_4.3.0.bb | 79 + .../bluealsa/bluealsa_git.bb | 66 - .../recipes-multimedia/dav1d/dav1d_1.4.1.bb | 17 - .../recipes-multimedia/dav1d/dav1d_1.4.3.bb | 20 + .../dvb-apps/dvb-apps_1.1.1.20140321.bb | 2 +- ...001-Remove-defining-const-as-nothing.patch | 79 + .../recipes-multimedia/flite/flite_2.2.bb | 3 + .../gerbera/gerbera_2.0.0.bb | 30 - .../gerbera/gerbera_2.2.0.bb | 30 + ...oc-instead-of-variable-length-arrays.patch | 41 + ...002-options-Replace-use-of-VLAs-in-C.patch | 128 + .../libcamera/libcamera_0.3.0.bb | 79 + .../libcamera/libcamera_0.4.0.bb | 77 - .../libdvbcsa/libdvbcsa_1.1.0.bb | 2 +- .../recipes-multimedia/minidlna/minidlna.inc | 11 +- ...01-Add-compatibility-with-FFMPEG-7.0.patch | 49 + .../0001-Update-Gettext-version.patch | 32 - ...onfigure.ac-drop-non-standard-checks.patch | 37 - .../minidlna/minidlna_1.3.0.bb | 4 - .../minidlna/minidlna_1.3.3.bb | 4 + ...mpdclient_2.20.bb => libmpdclient_2.22.bb} | 0 .../musicpd/{mpc_0.34.bb => mpc_0.35.bb} | 0 ...tch-src_decoder_plugins_FfmpegIo.cxx.patch | 26 - .../recipes-multimedia/musicpd/mpd_0.23.14.bb | 105 - .../recipes-multimedia/musicpd/mpd_0.23.16.bb | 110 + .../mycroft/mycroft_19.8.1.bb | 6 +- .../packagegroup-meta-multimedia.bb | 1 - ...n-idle-Include-time.h-for-struct-tim.patch | 43 + .../pipewire/pipewire-0.2_git.bb | 4 +- .../pipewire/pipewire_1.0.9.bb | 398 - .../pipewire/pipewire_1.2.3.bb | 392 + .../sample-content/bigbuckbunny-1080p.bb | 5 +- .../sample-content/bigbuckbunny-480p.bb | 5 +- .../sample-content/bigbuckbunny-720p.bb | 5 +- .../sample-content/tearsofsteel-1080p.bb | 5 +- ...s-Include-math.h-for-fabs-definition.patch | 33 + .../recipes-multimedia/sox/sox_14.4.2.bb | 1 + .../tinyalsa/tinyalsa_2.0.0.bb | 11 +- .../recipes-multimedia/vlc/vlc_3.0.20.bb | 135 - .../recipes-multimedia/vlc/vlc_3.0.21.bb | 136 + .../vorbis-tools/CVE-2023-43361.patch | 38 + .../vorbis-tools/vorbis-tools_1.4.2.bb | 1 + .../wireplumber/wireplumber_0.5.1.bb | 145 - .../wireplumber/wireplumber_0.5.6.bb | 145 + .../xdg-desktop-portal-wlr_0.7.0.bb | 3 +- .../meta-networking/MAINTAINERS | 4 +- .../include/non-repro-meta-networking.inc | 36 +- .../ptest-packagelists-meta-networking.inc | 1 - .../meta-networking/conf/layer.conf | 2 +- .../firewalld/firewalld_1.3.2.bb | 2 +- .../blueman/0001-Search-for-cython3.patch | 24 - ...n-DO-not-emit-absolute-path-when-S-B.patch | 10 +- ...01-meson-add-pythoninstalldir-option.patch | 50 - .../0002-fix-fail-to-enable-bluetooth.patch | 72 - .../blueman/blueman_2.3.5.bb | 89 - .../blueman/blueman_2.4.3.bb | 62 + .../recipes-connectivity/daq/daq_2.0.7.bb | 4 +- .../recipes-connectivity/daq/libdaq_3.0.14.bb | 18 - .../recipes-connectivity/daq/libdaq_3.0.16.bb | 19 + .../dhcp/dhcp-relay_4.4.3p1.bb | 6 +- .../dibbler/dibbler_git.bb | 4 + .../freeradius/freeradius_3.2.5.bb | 8 +- .../libiec61850/libiec61850_1.5.1.bb | 38 - .../libiec61850/libiec61850_1.5.3.bb | 38 + .../mbedtls/mbedtls_2.28.10.bb | 80 - .../mbedtls/mbedtls_2.28.9.bb | 80 + .../mbedtls/mbedtls_3.6.1.bb | 81 + .../mbedtls/mbedtls_3.6.3.bb | 80 - .../miniupnpd/miniupnpd_2.1.20191006.bb | 2 +- .../mosquitto/files/1571.patch | 22 + .../mosquitto/files/2894.patch | 25 + .../mosquitto/mosquitto_2.0.18.bb | 92 + .../mosquitto/mosquitto_2.0.20.bb | 90 - .../recipes-connectivity/nanomsg/nng_1.7.3.bb | 2 +- .../networkmanager-openvpn_1.10.2.bb | 55 - .../networkmanager-openvpn_1.12.0.bb | 55 + ...re-Disable-sd_dhcp6_client_set_duid_.patch | 65 + .../networkmanager/networkmanager_1.46.0.bb | 323 - .../networkmanager/networkmanager_1.48.10.bb | 326 + .../openfortivpn/openfortivpn_1.22.0.bb | 26 - .../openfortivpn/openfortivpn_1.22.1.bb | 26 + .../openthread/ot-br-posix_git.bb | 8 + .../samba/samba_4.19.8.bb | 4 +- .../0001-cmake-Pass-noline-flag-to-flex.patch | 1 + .../snort/snort3_3.1.84.0.bb | 38 - .../snort/snort3_3.3.4.0.bb | 39 + .../snort/snort_2.9.20.bb | 8 +- .../recipes-connectivity/tayga/tayga_0.9.2.bb | 4 +- .../recipes-connectivity/vpnc/vpnc_0.5.3.bb | 4 +- .../wolfssl/files/run-ptest | 24 - .../wolfssl/wolfssl_5.7.2.bb | 23 +- .../images/meta-networking-image-ptest.bb | 1 - .../packagegroup-meta-networking.bb | 1 + .../recipes-daemons/atftp/atftp_0.8.0.bb | 4 +- ...-Bug-fix-for-pid_t-not-found-on-musl.patch | 30 - ...__SWORD_TYPE-and-_PATH_NSSWITCH_CONF.patch | 50 - ...001-Define-__SWORD_TYPE-if-undefined.patch | 115 - ...0001-Do-not-hardcode-path-for-pkg.m4.patch | 31 - ...dd-autofs_strerror_r-helper-for-musl.patch | 56 - .../0001-include-libgen.h-for-basename.patch | 58 - ...ulti.c-Replace-__S_IEXEC-with-S_IEXE.patch | 29 - .../autofs/autofs/0001-no-bash.patch | 36 + .../0002-Replace-__S_IEXEC-with-S_IEXEC.patch | 60 - ...8-handle-innetgr-not-present-in-musl.patch | 106 - ...0002-using-pkg-config-to-detect-krb5.patch | 38 + .../autofs/0003-force-STRIP-to-emtpy.patch | 30 + .../0004-autofs.init.in-remove-bashism.patch | 120 + ...-YACC-rule-to-fix-a-building-failure.patch | 71 + ...0006-Do-not-hardcode-path-for-pkg.m4.patch | 31 + ...between-sys-mount.h-and-linux-mount..patch | 45 + .../0008-include-libgen.h-for-basename.patch | 59 + ...lude-sys-reg.h-instead-of-bits-reg.h.patch | 35 + ...-incompatible-function-pointer-types.patch | 64 + .../autofs/add-the-needed-stdarg.h.patch | 25 - .../autofs/autofs-5.0.7-fix-lib-deps.patch | 26 - .../recipes-daemons/autofs/autofs/cross.patch | 55 - ...-YACC-rule-to-fix-a-building-failure.patch | 78 - .../autofs/autofs/fix_disable_ldap.patch | 47 - .../autofs/autofs/force-STRIP-to-emtpy.patch | 28 - .../autofs/autofs/mount_conflict.patch | 30 - .../autofs/autofs/no-bash.patch | 31 - .../autofs/autofs/pkgconfig-libnsl.patch | 37 - .../autofs/autofs/remove-bashism.patch | 118 - ...config-to-detect-libxml-2.0-and-krb5.patch | 36 - .../recipes-daemons/autofs/autofs_5.1.8.bb | 101 - .../recipes-daemons/autofs/autofs_5.1.9.bb | 90 + .../recipes-daemons/ippool/ippool_1.3.bb | 11 +- .../iscsi-initiator-utils_2.1.10.bb | 118 + .../iscsi-initiator-utils_2.1.8.bb | 118 - .../recipes-daemons/lldpd/lldpd_1.0.18.bb | 4 +- .../recipes-daemons/ncftp/ncftp_3.2.7.bb | 4 + .../recipes-daemons/openhpi/openhpi_3.8.0.bb | 4 +- .../recipes-daemons/postfix/postfix_3.8.6.bb | 12 +- .../proftpd/files/CVE-2024-57392.patch | 42 - .../recipes-daemons/proftpd/proftpd_1.3.7c.bb | 147 - .../recipes-daemons/proftpd/proftpd_1.3.8b.bb | 154 + .../recipes-daemons/ptpd/ptpd_2.3.1.bb | 4 +- .../recipes-daemons/radvd/radvd_2.19.bb | 10 +- .../squid/files/CVE-2024-37894.patch | 36 - .../files/Skip-AC_RUN_IFELSE-tests.patch | 2 +- .../recipes-daemons/squid/squid_6.10.bb | 148 + .../recipes-daemons/squid/squid_6.9.bb | 155 - .../recipes-daemons/tftp-hpa/tftp-hpa_5.2.bb | 8 +- .../recipes-daemons/vblade/vblade_25.bb | 10 +- .../recipes-daemons/vsftpd/vsftpd_3.0.5.bb | 12 +- .../recipes-devtools/libcoap/libcoap_4.3.4.bb | 2 +- .../corosync/corosync_3.1.6.bb | 2 +- .../recipes-extended/dlm/dlm_4.2.0.bb | 1 + .../tgt/files/CVE-2024-45751.patch | 71 - .../recipes-extended/tgt/tgt_1.0.90.bb | 7 +- .../arno-iptables-firewall_2.1.1.bb | 33 - .../arno-iptables-firewall_2.1.2.bb | 33 + .../conntrack-tools/conntrack-tools_1.4.8.bb | 6 +- .../ebtables/ebtables_2.0.11.bb | 6 +- .../recipes-filter/ipset/ipset_7.21.bb | 22 - .../recipes-filter/ipset/ipset_7.22.bb | 22 + .../recipes-filter/libnftnl/libnftnl_1.2.6.bb | 39 - .../recipes-filter/libnftnl/libnftnl_1.2.7.bb | 39 + ...sets-reset_command_0-for-current-ker.patch | 53 - ...-secmark-tests-if-kernel-does-not-su.patch | 46 - .../recipes-filter/nftables/nftables_1.0.9.bb | 109 - .../recipes-filter/nftables/nftables_1.1.0.bb | 104 + .../recipes-filter/ulogd2/ulogd2_2.0.8.bb | 4 +- ...lags-for-carrying-user-specified-par.patch | 39 + .../freediameter/freediameter_1.5.0.bb | 13 +- ...basename-API-for-non-glibc-library-e.patch | 34 - .../frr/frr/CVE-2024-31948.patch | 130 - .../frr/frr/CVE-2024-31949.patch | 163 - .../frr/frr/CVE-2024-31950.patch | 68 - .../frr/frr/CVE-2024-31951.patch | 110 - .../frr/frr/CVE-2024-34088.patch | 83 - .../recipes-protocols/frr/frr_10.1.1.bb | 138 + .../recipes-protocols/frr/frr_9.1.bb | 141 - ...utine-for-cleaning-recent-interfaces.patch | 16 +- ...0001-Fix-SIGSEGV-during-DumpStateLog.patch | 5 +- ...01-Handle-interface-without-ifa_addr.patch | 14 +- .../0001-dns-sd-Include-missing-headers.patch | 12 +- ...outine-for-tearing-down-an-interface.patch | 16 +- ...ke-Set-libdns_sd.so-soname-correctly.patch | 14 +- .../0003-Track-interface-socket-family.patch | 22 +- ...cate-loopback-interface-to-mDNS-core.patch | 20 +- ...-Separate-TLS-targets-from-libraries.patch | 12 +- ...0005-Use-list-for-changed-interfaces.patch | 28 +- ...-mDNSCore-Fix-broken-debug-parameter.patch | 13 +- .../0006-Handle-noisy-netlink-sockets.patch | 18 +- .../0006-make-Add-top-level-Makefile.patch | 11 +- ...-deleted-interfaces-as-being-changed.patch | 14 +- ...0008-Handle-errors-from-socket-calls.patch | 20 +- .../mdns/0009-remove-unneeded-headers.patch | 10 +- .../mdns/mdns/0015-Add-missing-limits.h.patch | 23 - .../mdns/mdns_2200.100.94.0.2.bb | 135 - .../mdns/mdns_2200.140.11.bb | 134 + .../net-snmp/net-snmp_5.9.4.bb | 11 +- ...-libexecinfo-if-it-has-backtrace-API.patch | 62 + .../openflow/openflow_git.bb | 8 +- .../openl2tp/openl2tp_1.8.bb | 2 +- .../pptp-linux/pptp-linux_1.10.0.bb | 2 +- .../rp-pppoe/rp-pppoe_3.15.bb | 6 +- .../recipes-protocols/usrsctp/usrsctp_git.bb | 1 + .../vsomeip/0001-Update-to-C-17-560.patch | 969 + ..._tests-Include-iomanip-system-header.patch | 324 + .../vsomeip/vsomeip_3.4.10.bb | 2 + .../zeroconf/zeroconf_0.9.bb | 4 +- .../arptables/arptables_git.bb | 2 +- .../bridge-utils/bridge-utils_1.7.1.bb | 2 + .../recipes-support/chrony/chrony_4.5.bb | 8 +- .../cim-schema/cim-schema-docs_2.40.0.bb | 2 +- .../cim-schema/cim-schema-exper_2.50.0.bb | 4 +- .../cim-schema/cim-schema-final_2.40.0.bb | 4 +- ...id-conversion-from-int-to-CURLoption.patch | 36 + .../recipes-support/curlpp/curlpp_0.8.1.bb | 3 +- .../recipes-support/dnsmasq/dnsmasq_2.90.bb | 24 +- .../dnsmasq/files/dnsmasq.conf | 298 - .../recipes-support/dovecot/dovecot_2.3.21.bb | 5 +- ...-an-option-to-disable-host-udev-vers.patch | 55 - .../0001-drbd-utils-support-usrmerge.patch | 47 +- .../recipes-support/drbd/drbd-utils_9.27.0.bb | 76 - .../recipes-support/drbd/drbd-utils_9.28.0.bb | 75 + ...lize-msghdr-struct-in-a-portable-way.patch | 42 - .../recipes-support/fping/fping_5.1.bb | 29 - .../recipes-support/fping/fping_5.2.bb | 27 + ...with-GCC-s-fno-common-flag-fixes-305.patch | 27 - ...figure.ac-Fix-missing-comma-in-AS_IF.patch | 29 - .../recipes-support/fwknop/fwknop_2.6.10.bb | 32 - .../recipes-support/fwknop/fwknop_2.6.11.bb | 30 + .../recipes-support/geoip/geoip-perl_1.51.bb | 1 + .../recipes-support/geoip/geoip_1.6.12.bb | 8 +- .../geoip/geoipupdate_2.5.0.bb | 4 +- .../libconfuse/libconfuse_3.3.bb | 14 - .../recipes-support/libtdb/libtdb_1.4.10.bb | 63 - .../recipes-support/libtdb/libtdb_1.4.12.bb | 63 + .../linux-atm/linux-atm_2.5.2.bb | 4 + .../lksctp-tools/lksctp-tools_1.0.19.bb | 63 - .../lksctp-tools/lksctp-tools_1.0.20.bb | 55 + .../memcached/memcached_1.6.17.bb | 2 + ...1-nbd-client-Fix-build-on-musl-gcc14.patch | 43 + ...8b0d8b54c21a1e5b0c6dce3277e938d07e7c.patch | 50 + .../recipes-support/nbd/nbd_3.24.bb | 20 - .../recipes-support/nbd/nbd_3.26.1.bb | 24 + .../recipes-support/netperf/netperf_git.bb | 6 +- .../recipes-support/nis/yp-tools_2.14.bb | 2 +- .../recipes-support/nis/yp-tools_4.2.3.bb | 2 +- .../recipes-support/nis/ypbind-mt_2.7.2.bb | 4 +- .../0001-Follow-rrd-post-1.8-change.patch | 32 + .../recipes-support/ntopng/ntopng_5.2.1.bb | 3 +- .../recipes-support/ntp/ntp/ntpd | 2 +- .../recipes-support/ntp/ntp_4.2.8p17.bb | 184 - .../recipes-support/ntp/ntp_4.2.8p18.bb | 184 + .../recipes-support/ntpsec/ntpsec_1.2.2a.bb | 2 +- .../recipes-support/nuttcp/nuttcp_8.2.2.bb | 7 +- .../open-vm-tools/open-vm-tools_12.3.5.bb | 124 - .../open-vm-tools/open-vm-tools_12.4.5.bb | 124 + .../openipmi/openipmi_2.0.36.bb | 4 +- ...minate-build-path-from-openvpn-versi.patch | 9 +- .../recipes-support/openvpn/openvpn_2.6.12.bb | 76 + .../recipes-support/openvpn/openvpn_2.6.14.bb | 76 - .../recipes-support/pgpool2/pgpool2_4.5.1.bb | 4 +- ...erloadable-function-attribute-with-c.patch | 38 + .../rdma-core/rdma-core_51.0.bb | 1 + .../smcroute/smcroute_2.5.6.bb | 13 - .../smcroute/smcroute_2.5.7.bb | 13 + .../recipes-support/sngrep/sngrep_1.8.1.bb | 37 - .../recipes-support/sngrep/sngrep_1.8.2.bb | 37 + .../recipes-support/spice/spice-gtk_0.42.bb | 2 + .../recipes-support/spice/spice_git.bb | 1 + .../recipes-support/spice/usbredir_0.13.0.bb | 18 - .../recipes-support/spice/usbredir_0.14.0.bb | 18 + .../recipes-support/ssmping/ssmping_0.9.1.bb | 4 + .../stunnel/stunnel/fix-openssl-no-des.patch | 19 +- .../recipes-support/stunnel/stunnel_5.72.bb | 33 - .../recipes-support/stunnel/stunnel_5.73.bb | 33 + .../tcpdump/tcpdump/CVE-2024-2397.patch | 129 - .../recipes-support/tcpdump/tcpdump/run-ptest | 0 .../recipes-support/tcpdump/tcpdump_4.99.4.bb | 53 - .../recipes-support/tcpdump/tcpdump_4.99.5.bb | 52 + .../recipes-support/tcpdump/tcpslice_1.7.bb | 24 - .../recipes-support/tcpdump/tcpslice_1.8.bb | 24 + ...not-run-conftest-in-case-of-cross-co.patch | 51 - ...fy-search-dirs-for-pcap-and-add-lib3.patch | 82 - .../tcpreplay/tcpreplay/CVE-2023-4256.patch | 27 - .../tcpreplay/tcpreplay/CVE-2023-43279.patch | 39 - .../tcpreplay/CVE-2024-22654-0001.patch | 90 - .../tcpreplay/CVE-2024-22654-0002.patch | 35 - .../tcpreplay/tcpreplay_4.4.4.bb | 32 - .../tcpreplay/tcpreplay_4.5.1.bb | 26 + .../tinyproxy/tinyproxy_1.11.1.bb | 4 +- ...ease-conversions-between-wchar_t-and.patch | 77 + ...ease-conversions-between-wchar_t-and.patch | 29 + .../recipes-support/tnftp/tnftp_20230507.bb | 2 + .../traceroute/traceroute_2.1.5.bb | 44 - .../traceroute/traceroute_2.1.6.bb | 44 + .../0001-include-stddef.h-for-ptrdiff_t.patch | 27 + .../udpcast/udpcast_20230924.bb | 22 + .../unbound/unbound/CVE-2024-8508.patch | 247 - .../recipes-support/unbound/unbound/run-ptest | 17 + .../recipes-support/unbound/unbound_1.19.3.bb | 48 - .../recipes-support/unbound/unbound_1.21.0.bb | 65 + .../recipes-support/wavemon/wavemon_0.9.5.bb | 28 - .../recipes-support/wavemon/wavemon_0.9.6.bb | 28 + .../wireshark/wireshark_4.2.12.bb | 99 - .../wireshark/wireshark_4.2.9.bb | 99 + sources/meta-openembedded/meta-oe/README.md | 11 +- .../include/ptest-packagelists-meta-oe.inc | 4 +- .../meta-openembedded/meta-oe/conf/layer.conf | 2 +- .../openbox/openbox-xdgmenu_0.3.bb | 1 + .../recipes-connectivity/lirc/lirc_0.10.2.bb | 10 +- ... 0001-meson.build-do-not-use-Werror.patch} | 0 ...-drop-unnecessary-build-dependencies.patch | 58 - ...ine-scope-specific-to-case-statement.patch | 47 - .../netplan/netplan/CVE-2022-4968.patch | 452 - .../netplan/netplan_1.0.bb | 54 - .../netplan/netplan_1.1.bb | 51 + .../thingsboard-gateway_3.4.6.bb | 67 - .../thingsboard-gateway_3.5.1.bb | 67 + ...001-free_mon-Include-missing-cstdint.patch | 28 + ...econfig.py-python-3.12-compatibility.patch | 57 - .../recipes-dbs/mongodb/mongodb_git.bb | 10 +- .../rasdaemon/rasdaemon_0.8.0.bb | 4 +- .../android-tools-conf-configfs_1.0.bb | 15 +- .../android-tools/android-tools-conf_1.0.bb | 5 +- .../0001-liblp-fix-building-with-GCC-14.patch | 26 + .../android-tools/android-tools_29.0.6.r14.bb | 6 +- .../dhrystone-2.1/dhrystone-c89.patch | 242 + .../dhrystone/dhrystone_2.1.bb | 28 +- .../recipes-benchmark/iozone3/iozone3_506.bb | 10 +- .../recipes-benchmark/iperf3/iperf3_3.17.1.bb | 31 + .../recipes-benchmark/iperf3/iperf3_3.18.bb | 31 - .../libc-bench/libc-bench_git.bb | 3 + ...bfs-fix-Ttext-segment-argument-on-AA.patch | 210 - ...setup_helper-use-python3-interpreter.patch | 29 - .../0001-include-stddef.h-for-ptrdiff_t.patch | 25 - ...ot-use-hard-coded-path-.-obj-hugeadm.patch | 49 - ...B32-and-LIB64-if-they-point-to-the-s.patch | 27 + ...Append-CPPFLAGS-rather-then-override.patch | 31 - .../0002-Mark-glibc-specific-code-so.patch | 39 - ...id-search-host-library-path-for-cros.patch | 99 + ...sconf-_SC_LEVEL2_CACHE_LINESIZE-on-l.patch | 48 - ...ile-install-static-4G-edge-testcases.patch | 30 + ...ot-use-hard-coded-path-.-obj-hugeadm.patch | 49 + ...shm.c-Mark-glibc-specific-changes-so.patch | 30 - .../0005-Include-dirent.h-for-ino_t.patch | 33 - ..._i386-avoid-search-host-library-path.patch | 41 + .../0006-include-limits.h-for-PATH_MAX.patch | 42 - .../0006-include-stddef.h-for-ptrdiff_t.patch | 27 + .../0007-Mark-glibc-specific-code-so.patch | 42 + ...sconf-_SC_LEVEL2_CACHE_LINESIZE-on-l.patch | 50 + ...shm.c-Mark-glibc-specific-changes-so.patch | 32 + .../0010-Include-dirent.h-for-ino_t.patch | 33 + .../0011-include-limits.h-for-PATH_MAX.patch | 44 + ...setup_helper-use-python3-interpreter.patch | 29 + ...link.c-include-libgen.h-for-basename.patch | 41 + ...id-search-host-library-path-for-cros.patch | 97 - ..._i386-avoid-search-host-library-path.patch | 39 - ...B32-and-LIB64-if-they-point-to-the-s.patch | 24 - ...ile-install-static-4G-edge-testcases.patch | 28 - .../libhugetlbfs/libhugetlbfs_2.24.bb | 87 + .../libhugetlbfs/libhugetlbfs_git.bb | 79 - .../recipes-benchmark/linpack/linpack_1.0.bb | 5 +- .../lmbench/lmbench_3.0-a9.bb | 2 +- .../recipes-benchmark/s-suite/s-suite_git.bb | 4 + .../whetstone/whetstone_1.2.bb | 5 +- .../recipes-bsp/acpitool/acpitool_0.5.1.bb | 2 + .../recipes-bsp/con2fbmap/con2fbmap_git.bb | 3 + .../cpufrequtils/cpufrequtils_008.bb | 3 + ...01-add-support-for-cross-compilation.patch | 21 + ...2-Makefile-add-conditional-stripping.patch | 39 + .../dediprog-flasher_1.14.20.bb | 29 + .../recipes-bsp/edac-utils/edac-utils_git.bb | 2 +- .../recipes-bsp/firmwared/firmwared_git.bb | 5 +- ..._binary.py-Use-env-to-detect-python3.patch | 23 + .../recipes-bsp/fwupd/fwupd-efi/cc.patch | 53 - .../recipes-bsp/fwupd/fwupd-efi_1.3.bb | 33 - .../recipes-bsp/fwupd/fwupd-efi_1.6.bb | 39 + .../meta-oe/recipes-bsp/fwupd/fwupd_1.9.18.bb | 144 - .../meta-oe/recipes-bsp/fwupd/fwupd_1.9.24.bb | 134 + .../irda-utils/irda-utils_0.9.18.bb | 2 +- .../lm_sensors/lmsensors-config_1.0.bb | 13 +- .../0001-Fix-building-with-GCC-14.patch | 36 + .../recipes-bsp/lm_sensors/lmsensors_3.6.0.bb | 15 +- .../recipes-bsp/nvme-cli/nvme-cli_2.10.2.bb | 36 + .../recipes-bsp/nvme-cli/nvme-cli_2.8.bb | 30 - .../recipes-bsp/pointercal/pointercal_0.0.bb | 3 +- .../recipes-connectivity/ace/ace_6.5.19.bb | 7 +- .../gammu/gammu_1.42.0.bb | 4 +- .../gattlib/gattlib_git.bb | 2 + .../gensio/gensio_2.8.4.bb | 26 - .../gensio/gensio_2.8.7.bb | 26 + ...valid-Rejected-Groups-element-length.patch | 52 - ...id-Rejected-Groups-element-in-the-pa.patch | 38 - .../hostapd/hostapd/CVE-2023-52160.patch | 198 - .../hostapd/hostapd/CVE-2024-3596_00.patch | 83 - .../hostapd/hostapd/CVE-2024-3596_01.patch | 165 - .../hostapd/hostapd/CVE-2024-3596_02.patch | 62 - .../hostapd/hostapd/CVE-2024-3596_04.patch | 52 - .../hostapd/hostapd/CVE-2024-3596_05.patch | 51 - .../hostapd/hostapd/CVE-2024-3596_06.patch | 46 - .../hostapd/hostapd/CVE-2024-3596_07.patch | 105 - .../hostapd/hostapd/CVE-2024-3596_08.patch | 47 - .../hostapd/hostapd_2.10.bb | 59 - .../hostapd/hostapd_2.11.bb | 48 + .../recipes-connectivity/irssi/irssi_1.4.5.bb | 1 + .../recipes-connectivity/iwd/iwd_2.16.bb | 55 - .../recipes-connectivity/iwd/iwd_2.20.bb | 53 + .../krb5/krb5/CVE-2025-24528.patch | 68 - .../recipes-connectivity/krb5/krb5_1.21.3.bb | 11 +- .../libimobiledevice-glue_1.3.0.bb | 15 + .../libimobiledevice-glue_git.bb | 17 - .../libirecovery/libirecovery_1.2.0.bb | 15 + .../libirecovery/libirecovery_git.bb | 17 - .../libmtp/libmtp_1.1.21.bb | 3 + ...1-libndp-Fix-signature-of-sendto-API.patch | 40 + .../libndp/libndp/CVE-2024-5564.patch | 48 - .../recipes-connectivity/libndp/libndp_1.8.bb | 13 - .../recipes-connectivity/libndp/libndp_1.9.bb | 13 + .../linuxptp/linuxptp_4.1.bb | 6 +- .../recipes-connectivity/mosh/mosh_1.4.0.bb | 1 + .../obex/openobex_1.7.2.bb | 3 + .../obexftp/obexftp_0.24.2.bb | 3 + ...INSTALL_LIBDIR-and-CMAKE_INSTALL_BIN.patch | 58 +- .../paho-mqtt-cpp/paho-mqtt-cpp_1.3.2.bb | 24 - .../paho-mqtt-cpp/paho-mqtt-cpp_1.4.1.bb | 25 + .../ser2net/ser2net_4.6.1.bb | 30 - .../ser2net/ser2net_4.6.2.bb | 30 + .../thrift/thrift/0001-thrift-pr2755.patch | 599 - .../thrift/thrift_0.20.0.bb | 4 +- .../transmission/transmission_4.0.6.bb | 63 + .../transmission/transmission_git.bb | 76 - .../wifi-test-suite_10.10.1.bb | 5 + .../wvdial/wvdial_1.61.bb | 4 + .../wvdial/wvstreams_4.6.1.bb | 4 + .../zabbix/zabbix_6.2.7.bb | 2 +- .../recipes-connectivity/zeromq/czmq_4.2.1.bb | 1 + .../zeromq/zeromq_4.3.5.bb | 1 + .../recipes-core/dbus-cxx/dbus-cxx_2.5.1.bb | 25 - .../recipes-core/dbus-cxx/dbus-cxx_2.5.2.bb | 49 + .../recipes-core/dbus/dbus-broker_32.bb | 32 - .../recipes-core/dbus/dbus-broker_36.bb | 33 + .../dbus/dbus-daemon-proxy_git.bb | 4 + .../recipes-core/dbus/libdbus-c++_0.9.0.bb | 3 + .../meta-oe/recipes-core/emlog/emlog.inc | 2 + .../meta-oe/recipes-core/emlog/emlog_git.bb | 2 +- .../glib-2.0/glib-testing_0.1.1.bb | 14 + .../glib-2.0/glibmm-2.68_2.78.0.bb | 32 - .../glib-2.0/glibmm-2.68_2.80.0.bb | 32 + .../recipes-core/glib-2.0/glibmm_2.66.2.bb | 30 - .../recipes-core/glib-2.0/glibmm_2.66.7.bb | 30 + .../libsigc++-2.0/libsigc++-2.0_2.12.1.bb | 3 + .../libsigc++-2.0/libsigc++-3_3.6.0.bb | 5 +- .../recipes-core/libxml/libxml++-5.0_5.0.1.bb | 2 + ...ot-ask-for-python-installation-versi.patch | 45 - .../recipes-core/mm-common/mm-common_1.0.4.bb | 27 - .../recipes-core/mm-common/mm-common_1.0.6.bb | 26 + .../musl-rpmatch/musl-rpmatch_git.bb | 3 + .../meta-oe/recipes-core/ndctl/ndctl_v78.bb | 34 - .../meta-oe/recipes-core/ndctl/ndctl_v79.bb | 34 + .../opencl/opencl-headers_2023.12.14.bb | 19 - .../opencl/opencl-headers_2024.05.08.bb | 19 + .../opencl/opencl-icd-loader_2023.12.14.bb | 54 - .../opencl/opencl-icd-loader_2024.05.08.bb | 54 + .../packagegroups/packagegroup-meta-oe.bb | 11 +- .../meta-oe/recipes-core/pim435/pim435_git.bb | 4 + .../proxy-libintl/proxy-libintl_20100902.bb | 11 +- ...-not-disable-buffer-in-writing-files.patch | 119 +- ...22-avoid-missing-LOCK_EX-declaration.patch | 11 +- .../sdbus-c++/sdbus-c++-libsystemd_255.4.bb | 77 - .../sdbus-c++/sdbus-c++-libsystemd_255.6.bb | 77 + .../recipes-core/usleep/files/usleep.c | 4 +- .../meta-oe/recipes-core/usleep/usleep_1.2.bb | 11 +- ...t-to-selinux-sys-0.6.9-and-fts-sys-0.patch | 178 - .../uutils-coreutils-crates.inc | 660 +- .../uutils-coreutils_0.0.27.bb | 76 + .../uutils-coreutils_0.0.28.bb | 74 - .../recipes-crypto/botan/botan_3.2.0.bb | 52 - .../recipes-crypto/botan/botan_3.5.0.bb | 52 + .../cryptsetup/cryptsetup_2.7.2.bb | 117 - .../cryptsetup/cryptsetup_2.7.5.bb | 117 + ...-target-pragma-after-arm_neon.h-incl.patch | 49 - .../libsodium/libsodium_1.0.19.bb | 14 - .../libsodium/libsodium_1.0.20.bb | 12 + .../recipes-dbs/influxdb/influxdb_1.8.10.bb | 13 +- .../meta-oe/recipes-dbs/mysql/mariadb.inc | 26 +- ...lity-with-ARMv9-by-updating-.arch-di.patch | 44 + ...ction-as-deleter-prototype-in-unique.patch | 26 + ...c-bypass-autoconf-2.69-version-check.patch | 4 +- .../recipes-dbs/postgresql/postgresql.inc | 15 +- .../recipes-dbs/postgresql/postgresql_16.5.bb | 16 + .../recipes-dbs/postgresql/postgresql_16.9.bb | 16 - .../0001-absl-always-use-asm-sgidefs.h.patch | 7 +- ...e-maes-option-from-cross-compilation.patch | 17 +- ...e-neon-option-from-cross-compilation.patch | 18 +- ...aledcycleclock-remove-RISC-V-support.patch | 82 - .../abseil-cpp/0004-abseil-ppc-fixes.patch | 103 + ...-virtual-dtor-in-the-flags-are-neede.patch | 30 + .../abseil-cpp/abseil-ppc-fixes.patch | 81 - .../abseil-cpp/abseil-cpp_20240116.3.bb | 54 - .../abseil-cpp/abseil-cpp_20240722.0.bb | 54 + .../android-tools-conf-configfs_1.0.bb | 15 +- .../android-tools/android-tools-conf_1.0.bb | 5 +- .../android-tools/core/adb_libssl_11.diff | 11 +- .../android-tools/android-tools_5.1.1.r37.bb | 11 +- .../capnproto/capnproto_1.0.2.bb | 2 + .../recipes-devtools/cloc/cloc_1.98.bb | 1 + .../cppgenerate/cppgenerate_0.3.bb | 14 + .../recipes-devtools/cpuset/cpuset_1.6.2.bb | 13 + .../ctags/ctags_6.1.20240310.0.bb | 36 - .../ctags/ctags_6.1.20240915.0.bb | 36 + ...o-not-hardcode-the-full-path-of-dpkg.patch | 33 - ...t-to-override-usr-sbin-and-usr-share.patch | 18 +- ...upport-to-override-usr-bin-arch-test.patch | 12 +- ...o-not-hardcode-the-full-path-of-dpkg.patch | 33 + .../debootstrap/debootstrap_1.0.132.bb | 27 - .../debootstrap/debootstrap_1.0.137.bb | 27 + .../dnf-plugin-tui/dnf-plugin-tui_1.4.bb | 2 +- .../recipes-devtools/doxygen/doxygen_1.9.3.bb | 3 + .../editorconfig-core-c_0.12.6.bb | 18 - .../editorconfig-core-c_0.12.9.bb | 18 + .../glade/glade/CVE-2020-36774.patch | 54 - .../recipes-devtools/glade/glade_3.22.2.bb | 8 +- .../grpc/grpc/CVE-2024-11407.patch | 32 - .../grpc/grpc/CVE-2024-7246.patch | 420 - .../recipes-devtools/grpc/grpc_1.60.1.bb | 69 - .../recipes-devtools/grpc/grpc_1.66.1.bb | 67 + .../heaptrack/heaptrack_1.2.0.bb | 30 + .../iptraf/iptraf-ng_1.2.1.bb | 2 +- .../jq/jq/CVE-2024-23337.patch | 233 - .../jq/jq/CVE-2024-53427.patch | 79 - .../jq/jq/CVE-2025-48060.patch | 45 - .../meta-oe/recipes-devtools/jq/jq_1.7.1.bb | 3 - .../recipes-devtools/jsoncpp/jsoncpp_1.9.5.bb | 25 - .../recipes-devtools/jsoncpp/jsoncpp_1.9.6.bb | 25 + .../kconfig-frontends_4.11.0.1.bb | 3 + .../recipes-devtools/ldns/ldns_1.8.3.bb | 24 - .../recipes-devtools/ldns/ldns_1.8.4.bb | 24 + .../0001-Check-for-correct-fts-module.patch | 91 + .../libabigail/libabigail_2.5.bb | 17 + .../recipes-devtools/libgee/libgee_0.20.6.bb | 37 + .../recipes-devtools/libubox/libubox_git.bb | 3 + ...eachable-code-after-switch-statement.patch | 42 - ...001-Fix-tautological-compare-warning.patch | 261 - ...-struct-pointers-are-null-initilized.patch | 46 - ...01-ppc-plt-do-not-free-symbol-libsym.patch | 29 - ...ID_FILE-not-use-variable-length-arra.patch | 34 + .../0001-replace-readdir_r-with-readdir.patch | 36 - .../recipes-devtools/ltrace/ltrace_git.bb | 10 +- .../recipes-devtools/luajit/luajit_git.bb | 2 +- .../recipes-devtools/mcpp/mcpp_2.7.2.bb | 6 + .../memtool/memtool/run-ptest | 27 + .../memtool/test_read_write_plainfiles.sh | 69 + .../memtool/memtool_2018.03.0.bb | 31 + .../mercurial/mercurial_6.5.bb | 36 - .../mercurial/mercurial_6.6.3.bb | 37 + .../microcom/microcom_2023.09.0.bb | 3 + .../microsoft-gsl/microsoft-gsl_4.0.0.bb | 5 + .../recipes-devtools/mpich/mpich_4.2.1.bb | 67 - .../recipes-devtools/mpich/mpich_4.2.2.bb | 67 + .../msgpack/msgpack-cpp_6.1.0.bb | 21 - .../msgpack/msgpack-cpp_6.1.1.bb | 24 + .../nodejs/nodejs-oe-cache-native_20.18.bb | 5 +- .../nodejs/nodejs/182d9c05e78.patch | 42 +- .../nodejs/nodejs/libatomic.patch | 3 +- .../nodejs/zlib-fix-pointer-alignment.patch | 64 - .../recipes-devtools/nodejs/nodejs_20.18.0.bb | 212 + .../recipes-devtools/nodejs/nodejs_20.18.2.bb | 212 - .../packagegroups/packagegroup-sdk-target.bb | 4 +- .../recipes-devtools/pcimem/pcimem_2.0.bb | 3 + .../perfetto/common/0001-fix-musl-build.patch | 40 + ...ng-header-cstdint-for-uintXX_t-types.patch | 58 - ...1-meson-add-pc-file-for-lib_perfetto.patch | 49 - .../recipes-devtools/perfetto/libperfetto.bb | 2 +- ...1-meson-add-pc-file-for-lib_perfetto.patch | 53 + .../recipes-devtools/perfetto/perfetto.bb | 30 +- .../recipes-devtools/perfetto/perfetto.inc | 11 +- ...-Remove-check_build_deps-build-steps.patch | 18 +- .../0002-traced-fix-missing-include.patch | 28 + .../recipes-devtools/perl/dbd-mariadb_1.23.bb | 20 + .../recipes-devtools/perl/exiftool_12.72.bb | 22 - .../recipes-devtools/perl/exiftool_12.89.bb | 22 + ...void-running-assert_lib-at-configure.patch | 40 - .../perl/libdbd-mysql-perl_4.050.bb | 24 - ...uilding-on-Fedora-40-with-GCC-14.2.1.patch | 28 + .../perl/libdbi-perl/CVE-2014-10402.patch | 56 - .../perl/libdbi-perl_1.643.bb | 69 - .../perl/libdbi-perl_1.644.bb | 68 + .../perl/libdev-checklib-perl_1.16.bb | 2 +- .../perl/libpcsc-perl_1.4.14.bb | 22 - .../perl/libpcsc-perl_1.4.15.bb | 24 + ...ext-opcache-config.m4-enable-opcache.patch | 11 +- ...d-php.m4-don-t-unset-cache-variables.patch | 2 +- ...-host-specific-info-from-header-file.patch | 2 +- ...har-Makefile.frag-Fix-phar-packaging.patch | 4 +- ...ext-imap-config.m4-fix-include-paths.patch | 4 +- ...p-don-t-use-broken-wrapper-for-mkdir.patch | 3 +- .../php/php/0010-iconv-fix-detection.patch | 2 +- .../recipes-devtools/php/php_8.2.26.bb | 300 + .../recipes-devtools/php/php_8.2.28.bb | 299 - ...ck-for-Tcl-Tk-if-disable-gui-is-spec.patch | 45 - ...nfig.in-avoit-host-poisoning-while-c.patch | 47 - ...P2MAN-replace-by-true-when-cross-com.patch | 11 +- .../meta-oe/recipes-devtools/poke/poke_1.2.bb | 32 - .../meta-oe/recipes-devtools/poke/poke_4.2.bb | 33 + .../protobuf/protobuf-c_1.5.0.bb | 3 + .../protobuf/protobuf_4.25.5.bb | 123 + .../protobuf/protobuf_4.25.8.bb | 118 - .../recipes-devtools/pugixml/pugixml_1.14.bb | 1 + .../python/python3-pefile/run-ptest | 3 + .../python/python3-pefile_2024.8.26.bb | 28 + .../python/python3-psycopg_3.2.2.bb | 14 + .../sexpect/sexpect_2.3.14.bb | 12 + .../squashfs-tools-ng_1.2.0.bb | 32 - .../squashfs-tools-ng_1.3.1.bb | 32 + .../systemd/nativesdk-systemd-systemctl.bb | 5 +- .../recipes-devtools/tcltk/tk_8.6.10.bb | 3 + .../uftrace/uftrace_0.15.2.bb | 44 - .../recipes-devtools/uftrace/uftrace_0.16.bb | 44 + ...-imap-fix-incompatible-pointer-types.patch | 355 + .../uw-imap/uw-imap/uw-imap-newer-tls.patch | 29 + .../recipes-devtools/uw-imap/uw-imap_2007f.bb | 9 + .../valijson/valijson_1.0.2.bb | 22 - .../valijson/valijson_1.0.3.bb | 22 + .../recipes-extended/bitwise/bitwise_0.50.bb | 3 +- .../cfengine/cfengine-masterfiles_3.21.0.bb | 40 - .../cfengine/cfengine-masterfiles_3.21.5.bb | 43 + ...-bindings-Fix-build-error-with-gcc14.patch | 46 + .../cmpi-bindings/cmpi-bindings_1.0.4.bb | 5 + .../collectd/collectd_5.12.0.bb | 4 +- .../dialog/dialog_1.3-20240307.bb | 31 - .../dialog/dialog_1.3-20240619.bb | 31 + ...e-DLT_WatchdogSec-can-be-set-by-user.patch | 40 - .../dlt-daemon/dlt-daemon_2.18.10.bb | 1 - .../recipes-extended/duktape/duktape_2.7.0.bb | 12 +- ...1-Replacing-GPR_ASSERT-with-c-assert.patch | 33 + .../0001-cmake-fix-when-cross-compiling.patch | 68 - ...1-include-stdint.h-for-int64_t-types.patch | 27 + .../etcd/etcd-cpp-apiv3_0.15.3.bb | 27 - .../etcd/etcd-cpp-apiv3_0.15.4.bb | 28 + .../recipes-extended/etcd/etcd_3.5.7.bb | 16 +- .../flatpak/flatpak-xdg-utils_1.0.5.bb | 14 - .../flatpak/flatpak-xdg-utils_1.0.6.bb | 14 + .../flatpak/flatpak_1.15.10.bb | 78 + .../flatpak/flatpak_1.15.8.bb | 78 - ...t-Do-not-use-private-makefile-target.patch | 18 +- .../fluentbit/fluentbit_1.9.7.bb | 92 - .../fluentbit/fluentbit_1.9.9.bb | 97 + .../recipes-extended/gnuplot/gnuplot_5.4.3.bb | 6 +- ...ck-for-deducing-32bit-or-64bit-RISCV.patch | 76 + .../recipes-extended/highway/highway_1.1.0.bb | 17 - .../recipes-extended/highway/highway_1.2.0.bb | 21 + .../recipes-extended/hplip/hplip_3.22.10.bb | 2 + ...p-running-test-program-when-cross-co.patch | 14 +- .../recipes-extended/icewm/icewm_3.4.5.bb | 46 - .../recipes-extended/icewm/icewm_3.6.0.bb | 47 + .../inputattach-config/inputattach-config.bb | 5 +- .../isomd5sum/isomd5sum_1.2.4.bb | 36 - .../isomd5sum/isomd5sum_1.2.5.bb | 36 + ...-JSON_INTEGER_IS_LONG_LONG-for-cmake.patch | 51 + .../recipes-extended/jansson/jansson_2.14.bb | 3 +- .../lastlog2/lastlog2_1.2.0.bb | 36 - .../libbacktrace/libbacktrace_git.bb | 3 + ...0001-libext2fs-unused-parameters-fix.patch | 92 + .../libblockdev/files/CVE-2025-6019.patch | 31 - .../libblockdev/libblockdev_3.1.1.bb | 6 +- .../libconfig/libconfig_1.7.3.bb | 2 +- .../libmodbus/CVE-2024-10918-01.patch | 177 - .../libmodbus/CVE-2024-10918-02.patch | 121 - .../libmodbus/CVE-2024-10918-03.patch | 84 - .../libmodbus/CVE-2024-10918-04.patch | 239 - .../libmodbus/libmodbus_3.1.10.bb | 11 +- .../libstatgrab/libstatgrab_0.92.1.bb | 1 + .../recipes-extended/libwmf/libwmf_0.2.8.4.bb | 7 + .../recipes-extended/libx86-1/libx86-1_1.1.bb | 2 + .../linuxconsole/linuxconsole_1.7.1.bb | 8 +- .../logwatch/logwatch_7.10.bb | 57 - .../logwatch/logwatch_7.11.bb | 57 + .../recipes-extended/lprng/lprng_3.8.C.bb | 3 + .../magic-enum/magic-enum/run-ptest | 27 + .../magic-enum/magic-enum_0.9.6.bb | 44 + ...-mutex_-to-mtx_-member-of-Concurrent.patch | 37 + .../minifi-cpp/minifi-cpp_0.15.0.bb | 9 +- .../mozjs/mozjs-115/1849070.patch | 36 + .../mozjs/mozjs-115/1894423.patch | 30 + .../mozjs/mozjs-115_115.11.0.bb | 105 + .../mozjs/mozjs-115_115.8.0.bb | 98 - .../recipes-extended/networking/mstpd_git.bb | 4 +- .../0001-detect-gold-as-GNU-linker-too.patch | 0 ...tinfo-library-to-the-linking-librari.patch | 0 .../newt/files/cross_ar.patch | 0 .../recipes-extended/newt/libnewt_0.52.24.bb | 0 .../openwsman/openwsman_2.7.2.bb | 2 +- .../recipes-extended/ostree/ostree_2024.5.bb | 214 - .../recipes-extended/ostree/ostree_2024.7.bb | 215 + ...-two-buffer-overflow-vulnerabilities.patch | 455 - .../recipes-extended/p7zip/p7zip_16.02.bb | 4 +- .../pam/pam-plugin-ccreds_11.bb | 3 + .../pam/pam-ssh-agent-auth_0.10.3.bb | 13 + .../recipes-extended/pegtl/pegtl/run-ptest | 23 + .../recipes-extended/pegtl/pegtl_3.2.7.bb | 13 - .../recipes-extended/pegtl/pegtl_3.2.8.bb | 24 + .../recipes-extended/pmdk/pmdk_2.0.0.bb | 48 - .../recipes-extended/pmdk/pmdk_2.1.0.bb | 48 + ...pport-openembedded-OS-for-PAM-config.patch | 48 + .../polkit/polkit-group-rule-datetime.bb | 2 +- .../polkit/polkit-group-rule-network.bb | 2 +- .../polkit/polkit-group-rule-udisks2.bb | 2 +- .../polkit/polkit-group-rule.inc | 6 +- .../recipes-extended/polkit/polkit_124.bb | 60 - .../recipes-extended/polkit/polkit_125.bb | 76 + .../properties-cpp/properties-cpp_git.bb | 3 + .../meta-oe/recipes-extended/qad/qad_git.bb | 3 + .../recipes-extended/qcbor/qcbor_1.4.1.bb | 30 + .../recipes-extended/qcbor/qcbor_git.bb | 32 - .../recipes-extended/rarpd/rarpd_ss981107.bb | 4 +- .../0001-src-Do-not-reset-FINAL_LIBS.patch | 30 + ...006-Define-correct-gregs-for-RISCV32.patch | 4 +- .../redis/redis-7.2.5/GNU_SOURCE-7.patch | 29 + .../hiredis-use-default-CC-if-it-is-set.patch | 38 + .../init-redis-server | 0 ...ile-to-use-environment-build-setting.patch | 77 + .../redis-7.2.5/oe-use-libc-malloc.patch | 36 + .../{redis-7.2.8 => redis-7.2.5}/redis.conf | 0 .../redis.service | 0 ...-hiredis-use-default-CC-if-it-is-set.patch | 37 - ...ile-to-use-environment-build-setting.patch | 77 - ...003-hack-to-force-use-of-libc-malloc.patch | 35 - .../0004-src-Do-not-reset-FINAL_LIBS.patch | 30 - ...RCE-to-get-PTHREAD_MUTEX_INITIALIZER.patch | 29 - .../recipes-extended/redis/redis_6.2.14.bb | 6 +- .../recipes-extended/redis/redis_7.2.5.bb | 73 + .../recipes-extended/redis/redis_7.2.8.bb | 71 - ...3c578f1e9f582e9c28f50d82b1f569602075.patch | 1583 + .../recipes-extended/rrdtool/rrdtool_1.8.0.bb | 7 +- ...gainst-upcoming-gcc-14-Werror-calloc.patch | 37 + .../rsyslog/librelp_1.11.0.bb | 1 + ...-tests-disable-the-check-for-inotify.patch | 11 +- ...-Pass-correct-parameter-type-to-send.patch | 35 + .../use-pkgconfig-to-check-libgcrypt.patch | 9 +- .../rsyslog/rsyslog_8.2402.0.bb | 207 - .../rsyslog/rsyslog_8.2408.0.bb | 208 + ...INLINE-eh-no-give-up-share-detection.patch | 68 - ...LINE-gcc-only-GNU-specifics-after-Og.patch | 45 - .../recipes-extended/s-nail/s-nail_14.9.24.bb | 49 - .../recipes-extended/s-nail/s-nail_14.9.25.bb | 47 + .../recipes-extended/sanlock/sanlock_3.9.2.bb | 48 - .../recipes-extended/sanlock/sanlock_3.9.4.bb | 48 + .../sblim-cmpi-devel_2.0.3.bb | 3 + .../sblim-sfc-common_1.0.1.bb | 2 + .../sblim-sfcb/sblim-sfcb_1.4.9.bb | 7 +- ...e-pointer-type-error-with-gcc-option.patch | 72 + .../sblim-sfcc/sblim-sfcc_2.2.8.bb | 8 + .../scsirastools/scsirastools_1.6.6.bb | 17 +- .../smartmontools/smartmontools_7.4.bb | 6 +- .../socketcan/can-isotp_git.bb | 2 + ..._error_frame-don-t-bail-out-if-CAN_E.patch | 70 - ...ting-always-use-64-bit-for-timestamp.patch | 422 - .../socketcan/can-utils_2023.03.bb | 5 +- .../socketcan/canutils_4.0.6.bb | 2 +- .../socketcan/libsocketcan_0.0.12.bb | 2 +- .../tipcutils/tipcutils_git.bb | 2 +- .../recipes-extended/tmux/tmux_3.3a.bb | 25 - .../meta-oe/recipes-extended/tmux/tmux_3.4.bb | 25 + .../uml-utilities/uml-utilities_20040406.bb | 1 + .../recipes-extended/vlock/vlock_2.2.3.bb | 2 +- .../recipes-extended/wtmpdb/wtmpdb_0.11.0.bb | 3 +- .../meta-oe/recipes-extended/zram/zram_0.2.bb | 13 +- .../recipes-extended/zsync/zsync-curl_git.bb | 9 + .../recipes-gnome/atk/atkmm-2.36_2.36.2.bb | 22 - .../recipes-gnome/atk/atkmm-2.36_2.36.3.bb | 22 + .../recipes-gnome/gmime/gmime_3.2.13.bb | 23 - .../recipes-gnome/gmime/gmime_3.2.15.bb | 26 + .../gnome-doc-utils-stub_1.0.bb | 6 +- .../gnome-themes/gnome-themes-extra_3.28.bb | 3 + .../recipes-gnome/gtk+/gtk+_2.24.33.bb | 2 + .../recipes-gnome/malcontent/malcontent-ui.bb | 48 + .../recipes-gnome/malcontent/malcontent.bb | 35 + .../recipes-gnome/malcontent/malcontent.inc | 4 + .../recipes-graphics/cglm/cglm_0.9.2.bb | 25 - .../recipes-graphics/cglm/cglm_0.9.4.bb | 25 + .../deqp-runner/deqp-runner-crates.inc | 268 + .../0001-deqp-runner-drop-zstd-support.patch | 172 + .../deqp-runner/deqp-runner_0.20.0.bb | 18 + .../recipes-graphics/directfb/directfb.inc | 20 +- ...rect-the-signature-of-bind-call-on-m.patch | 36 + ...irect-remove-use-of-keyword-register.patch | 44 + .../recipes-graphics/fbida/fbida_git.bb | 2 +- .../recipes-graphics/feh/feh_3.10.2.bb | 30 - .../recipes-graphics/feh/feh_3.10.3.bb | 30 + .../fontforge/libspiro_20221101.bb | 14 - .../fontforge/libspiro_20240903.bb | 17 + ...t-to-avoid-implicit-double-to-float-.patch | 38 - ...x-type-mismatch-with-latest-FreeType.patch | 33 + ...001-use-pkg-config-to-find-freetype2.patch | 38 - ....am-remove-useless-and-breaking-code.patch | 38 - .../recipes-graphics/ftgl/ftgl_2.1.3-rc5.bb | 27 - .../recipes-graphics/ftgl/ftgl_2.4.0.bb | 20 + ...ot-require-support-for-implicit-ints.patch | 45 + ...-missing-unistd.h-to-AM_SAFETY_CHECK.patch | 32 + ...gure-Further-defang-the-Werror-check.patch | 35 + .../recipes-graphics/fvwm/fvwm_2.7.0.bb | 6 + .../recipes-graphics/glm/glm_0.9.9.8.bb | 8 +- .../libgphoto2/fix-build-with-gcc-14.patch | 36 + .../gphoto2/libgphoto2_2.5.31.bb | 3 +- ...o-be-empty-string-if-tcl-is-disabled.patch | 33 + .../graphviz/CVE-2023-46045-0001.patch | 37 - .../graphviz/CVE-2023-46045-0002.patch | 38 - .../graphviz/CVE-2023-46045-0003.patch | 33 - .../graphviz/graphviz_8.1.0.bb | 12 +- .../recipes-graphics/gtkperf/gtkperf_0.40.bb | 5 +- .../gtkwave/gtkwave_3.3.119.bb | 44 - .../gtkwave/gtkwave_3.3.120.bb | 44 + .../recipes-graphics/imlib2/imlib2_git.bb | 4 +- .../leptonica/leptonica_1.82.0.bb | 19 - .../leptonica/leptonica_1.84.1.bb | 20 + .../libforms/libforms_1.2.5pre1.bb | 5 + .../recipes-graphics/libmng/libmng_2.0.3.bb | 3 + ...iconv-use-portable-across-glibc-musl.patch | 52 + .../libsdl/libsdl-gfx_2.0.25.bb | 19 - .../libsdl/libsdl-gfx_2.0.27.bb | 20 + .../libsdl/libsdl2-image_2.0.5.bb | 31 - .../libsdl/libsdl2-image_2.8.2.bb | 30 + .../recipes-graphics/libsdl/libsdl_1.2.15.bb | 1 + ...eplace-off64_t-with-off_t-and-stat64.patch | 176 - .../libyui/libyui-ncurses_4.2.3.bb | 50 - .../libyui/libyui-ncurses_4.6.2.bb | 56 + .../recipes-graphics/libyui/libyui_4.2.3.bb | 36 - .../recipes-graphics/libyui/libyui_4.6.2.bb | 37 + ...oth-LV_IMAGE_SRC_FILE-and-LV_IMAGE_S.patch | 2 +- ...e-node-runtime-configurable-via-envi.patch | 2 +- ...Factor-out-fbdev-initialization-code.patch | 2 +- .../0005-Add-DRM-KMS-example-support.patch | 2 +- .../files/0006-Add-SDL2-example-support.patch | 2 +- ...-generate-versioned-shared-libraries.patch | 6 +- ...fbdev-set-resolution-prior-to-buffer.patch | 2 +- .../meta-oe/recipes-graphics/lvgl/lv-conf.inc | 5 + .../recipes-graphics/lvgl/lvgl_9.1.0.bb | 7 +- .../recipes-graphics/lxdm/lxdm_0.5.3.bb | 4 +- .../recipes-graphics/neatvnc/neatvnc_0.8.0.bb | 38 - .../recipes-graphics/neatvnc/neatvnc_0.8.1.bb | 38 + .../recipes-graphics/openbox/openbox_3.6.1.bb | 3 + .../openjpeg/openjpeg_2.5.2.bb | 21 + .../openjpeg/openjpeg_2.5.3.bb | 21 - .../pango/pangomm-2.48_2.50.1.bb | 19 - .../pango/pangomm-2.48_2.52.0.bb | 19 + ...sor-Reorder-stdio.h-include-location.patch | 43 + .../renderdoc/renderdoc_1.27.bb | 38 - .../renderdoc/renderdoc_1.33.bb | 39 + .../stalonetray/stalonetray_0.8.3.bb | 2 + .../tesseract/tesseract_5.3.4.bb | 21 - .../tesseract/tesseract_5.4.1.bb | 21 + .../tigervnc/tigervnc_1.11.0.bb | 2 +- .../recipes-graphics/tslib/tslib_1.22.bb | 84 - .../recipes-graphics/tslib/tslib_1.23.bb | 84 + .../source-code-pro-fonts_2.030_1.050.bb | 5 +- ....conf => 44-source-han-sans-cn-fonts.conf} | 0 .../source-han-sans-cn-fonts_2.004.bb | 29 +- .../ttf-fonts/source-han-sans-fonts.inc | 26 + ....conf => 44-source-han-sans-jp-fonts.conf} | 0 .../source-han-sans-jp-fonts_2.004.bb | 29 +- ....conf => 44-source-han-sans-kr-fonts.conf} | 0 .../source-han-sans-kr-fonts_2.004.bb | 29 +- ....conf => 44-source-han-sans-tw-fonts.conf} | 0 .../source-han-sans-tw-fonts_2.004.bb | 29 +- .../ttf-fonts/ttf-abyssinica_2.100.bb | 15 - .../ttf-fonts/ttf-abyssinica_2.201.bb | 17 + .../ttf-fonts/ttf-dejavu_2.37.bb | 2 +- .../ttf-fonts/ttf-google-fira.bb | 3 +- .../ttf-fonts/ttf-inconsolata_20100526.bb | 9 +- .../ttf-liberation-sans-narrow_1.07.4.bb | 2 +- .../ttf-lklug_0.6-14.20090803cvs.fc24.bb | 3 +- .../ttf-fonts/ttf-pt-sans_1.1.bb | 5 +- .../ttf-fonts/ttf-roboto_2.138.bb | 3 +- .../ttf-fonts/ttf-tlwg_0.6.1.bb | 2 +- .../ttf-fonts/ttf-ubuntu-font-family_0.83.bb | 3 + .../ttf-fonts/ttf-wqy-zenhei_0.9.45.bb | 3 + .../recipes-graphics/vdpau/vdpauinfo_1.5.bb | 20 + ...LAND_SCANNER-and-WAYLAND_PROTOCOLS_D.patch | 22 +- ...0001-use-library-sonames-for-linking.patch | 123 + ...1-vulkan-cts-include-missing-cstdint.patch | 34 - ...01-vulkancts-Include-missing-cstdint.patch | 32 - .../files/fix-clang-private-operator.patch | 2 +- .../vk-gl-cts/files/fix-musl.patch | 4 +- .../vk-gl-cts/files/gen-framework-path.patch | 20 - .../vk-gl-cts/khronos-cts.inc | 35 +- ...0001-use-library-sonames-for-linking.patch | 114 - .../vk-gl-cts/opengl-es-cts_3.2.11.0.bb | 34 + .../vk-gl-cts/opengl-es-cts_3.2.9.3.bb | 40 - ...0001-use-library-sonames-for-linking.patch | 114 - .../vk-gl-cts/vulkan-cts_1.3.7.3.bb | 41 - .../vk-gl-cts/vulkan-cts_1.3.9.2.bb | 32 + .../recipes-graphics/wayland/libei_1.2.1.bb | 25 - .../recipes-graphics/wayland/libei_1.3.0.bb | 25 + .../xdotool/xdotool_3.20211022.1.bb | 3 + .../xorg-app/xkbutils_1.0.5.bb | 17 - .../xorg-app/xkbutils_1.0.6.bb | 17 + .../xorg-app/xlsfonts_1.0.7.bb | 10 - .../xorg-app/xlsfonts_1.0.8.bb | 10 + ...-Add-configure-time-check-for-setsid.patch | 75 - ...ude-missing-pty.h-header-for-openpty.patch | 30 + .../recipes-graphics/xorg-app/xterm_388.bb | 50 - .../recipes-graphics/xorg-app/xterm_394.bb | 51 + .../xorg-driver/xf86-input-tslib_1.1.1.bb | 4 +- .../xscreensaver/xscreensaver_6.04.bb | 6 +- .../meta-oe/recipes-kernel/bpftool/bpftool.bb | 2 +- .../recipes-kernel/cpupower/cpupower.bb | 2 +- ...8.0.4.bb => crash-cross-canadian_8.0.5.bb} | 0 .../meta-oe/recipes-kernel/crash/crash.inc | 3 +- ...x-S-cannot-work-with-kaslr-detection.patch | 89 - .../crash/{crash_8.0.4.bb => crash_8.0.5.bb} | 0 .../drgn/python3-drgn_0.0.27.bb | 80 + .../intel-speed-select/intel-speed-select.bb | 2 +- .../ipmitool/ipmitool_1.8.19.bb | 7 +- .../kernel-selftest/kernel-selftest.bb | 7 +- ...-Fix-clock_adjtime-for-newer-32-bit-.patch | 34 + .../recipes-kernel/libbpf/libbpf_1.4.0.bb | 36 - .../recipes-kernel/libbpf/libbpf_1.4.6.bb | 36 + ...not-preserve-ownership-in-cp-command.patch | 9 +- ...-missing-headers-for-syscall-and-SYS.patch | 31 - .../libtracefs/libtracefs_1.7.0.bb | 23 - .../libtracefs/libtracefs_1.8.1.bb | 22 + .../meta-oe/recipes-kernel/linux/linux.inc | 4 +- .../minicoredumper/minicoredumper_2.0.7.bb | 4 +- ...-replace-__FILE__-with-__FILE_NAME__.patch | 47 + .../recipes-kernel/oprofile/oprofile_1.4.0.bb | 3 +- .../recipes-kernel/spidev-test/spidev-test.bb | 2 +- .../recipes-kernel/turbostat/turbostat_3.4.bb | 24 +- .../audiofile/audiofile_0.3.6.bb | 5 + ...ays-check-the-number-of-coefficients.patch | 46 + ...ues-to-fix-index-overflow-in-IMA.cpp.patch | 43 + ...multiplication-overflow-in-sfconvert.patch | 79 + ...ail-when-error-occurs-in-parseFormat.patch | 46 + ...lication-overflow-in-MSADPCM-decodeS.patch | 126 + .../cdrkit/cdrkit_1.1.11.bb | 6 + .../fix-incompatible-pointer-type-error.patch | 44 + .../libass/libass_0.17.1.bb | 27 - .../libass/libass_0.17.3.bb | 27 + .../libcdio/libcdio-paranoia_10.2+2.0.1.bb | 3 + ...use-mrelax-all-with-clang-on-RISCV64.patch | 56 + .../libjxl/libjxl_0.10.2.bb | 39 - .../libjxl/libjxl_0.10.3.bb | 47 + .../libopusenc/libopusenc_0.2.1.bb | 3 +- .../live555/live555_20210824.bb | 2 +- .../mplayer/libplacebo_7.349.0.bb | 22 + ...d-emitting-absolute-filepaths-into-g.patch | 33 + .../recipes-multimedia/mplayer/mpv_0.35.1.bb | 116 - .../recipes-multimedia/mplayer/mpv_0.38.0.bb | 107 + .../sound-theme-freedesktop_0.8.bb | 2 +- ...estrict-the-installation-of-50-rc_ke.patch | 46 - ...l-Install-media-ctl-pkg-config-files.patch | 49 + .../v4l2apps/v4l-utils_1.26.1.bb | 86 - .../v4l2apps/v4l-utils_1.28.1.bb | 86 + .../recipes-multimedia/v4l2apps/yavta_git.bb | 19 +- ...ibvpx-configure-support-blank-prefix.patch | 8 +- .../recipes-multimedia/webm/libvpx_1.14.0.bb | 51 - .../recipes-multimedia/webm/libvpx_1.14.1.bb | 51 + .../recipes-multimedia/xsp/xsp_1.0.0-8.bb | 2 + ...-try-to-use-g-ir-scanner-when-intros.patch | 4 +- .../geoclue/geoclue_2.7.1.bb | 61 - .../geoclue/geoclue_2.7.2.bb | 50 + .../gpsd/gpsd/fix-pps_strerror_r.patch | 51 + .../recipes-navigation/gpsd/gpsd_3.24.bb | 159 - .../recipes-navigation/gpsd/gpsd_3.25.bb | 164 + ...oHTTPCleanup-with-LIBXML_HTTP_ENABLE.patch | 29 + .../libspatialite/libspatialite_macros.patch | 14 - .../libspatialite_pkgconfig.patch | 12 +- .../libspatialite/libspatialite_5.0.1.bb | 24 - .../libspatialite/libspatialite_5.1.0.bb | 23 + ...instead-of-overriding-in-Makefile.am.patch | 28 - .../0001-orrery-Fix-sprintf-format.patch | 28 - .../orrery/orrery/orrery.png | Bin 19475 -> 0 bytes .../orrery/orrery/use.GdkPixbuf.patch | 61 - .../recipes-navigation/orrery/orrery_2.7.bb | 37 - .../cyrus-sasl/cyrus-sasl_2.1.28.bb | 4 +- .../cups/cups-filters_2.0.0.bb | 2 + .../recipes-printing/qpdf/qpdf_11.8.0.bb | 31 - .../recipes-printing/qpdf/qpdf_11.9.1.bb | 31 + ...ute_malloc__-with-__attribute__-__ma.patch | 49 - .../recipes-security/audit/audit_4.0.1.bb | 103 - .../recipes-security/audit/audit_4.0.2.bb | 109 + .../bubblewrap/bubblewrap_0.10.0.bb | 24 + .../bubblewrap/bubblewrap_0.8.0.bb | 24 - .../0001-Make-ndiff-support-python3.patch | 1720 - ...gure.ac-make-ndiff-depend-on-python3.patch | 48 - ...ne-overflow-in-the-IP-protocol-table.patch | 165 + ...nmap-redefine-the-python-library-dir.patch | 16 +- ...l-mkdir-with-coreutils-mkdir-command.patch | 20 +- .../recipes-security/nmap/nmap_7.80.bb | 66 - .../recipes-security/nmap/nmap_7.95.bb | 62 + ...g-of-global-c-objects-once-they-are-.patch | 672 + .../recipes-security/softhsm/softhsm_2.6.1.bb | 1 + .../0001-include-missing-cstdint.patch | 45 - .../usbguard/usbguard_1.1.2.bb | 70 - .../usbguard/usbguard_1.1.3.bb | 71 + .../recipes-shells/dash/dash_0.5.12.bb | 2 + .../zsh/zsh/CVE-2021-45444_1.patch | 60 - .../zsh/zsh/CVE-2021-45444_2.patch | 140 - .../zsh/zsh/CVE-2021-45444_3.patch | 77 - .../meta-oe/recipes-shells/zsh/zsh_5.8.bb | 62 - .../meta-oe/recipes-shells/zsh/zsh_5.9.bb | 62 + .../recipes-support/anthy/anthy_9100h.bb | 3 + ...tests-Remove-blocking_adaptation.cpp.patch | 37 - .../recipes-support/asio/asio/run-ptest | 19 - .../recipes-support/asio/asio_1.30.2.bb | 19 +- .../recipes-support/atop/atop_2.4.0.bb | 7 +- .../recipes-support/avro/avro-c++_1.11.3.bb | 5 + .../recipes-support/avro/avro-c_1.11.3.bb | 6 + .../recipes-support/bdwgc/bdwgc_8.2.6.bb | 37 - .../recipes-support/bdwgc/bdwgc_8.2.8.bb | 37 + .../recipes-support/c-ares/c-ares_1.27.0.bb | 2 +- .../cabextract/cabextract/fix-fnmatch.patch | 40 + .../cabextract/cabextract_1.11.bb | 22 + .../cabextract/libmspack_0.11alpha.bb | 16 + .../recipes-support/ckermit/ckermit_302.bb | 12 +- .../recipes-support/cmark/cmark_0.31.0.bb | 15 - .../recipes-support/cmark/cmark_0.31.1.bb | 15 + ...n-cd_icc_create_from_edid-to-avoid-u.patch | 9 +- .../meta-oe/recipes-support/colord/colord.bb | 32 +- .../meta-oe/recipes-support/colord/colord.inc | 4 +- ...2b2379fb5582f4312e59bf51a2823df56276.patch | 28 + .../composefs/composefs_1.0.5.bb | 30 + .../crucible/crucible_2023.11.02.bb | 2 +- .../ctapi-common/ctapi-common_1.1-14.bb | 9 +- .../daemontools/daemontools_0.76.bb | 9 + .../recipes-support/devmem2/devmem2_2.0.bb | 3 + .../recipes-support/dfu-util/dfu-util_0.11.bb | 2 + .../recipes-support/dool/dool_1.3.1.bb | 23 - .../recipes-support/dool/dool_1.3.2.bb | 23 + .../edid-decode/edid-decode_git.bb | 4 + .../recipes-support/eject/eject_2.1.5.bb | 2 +- .../recipes-support/fbset/fbset-modes.bb | 6 +- .../recipes-support/fftw/fftw_3.3.10.bb | 2 + .../recipes-support/fltk/fltk-native.bb | 2 + .../meta-oe/recipes-support/fltk/fltk.bb | 2 + .../meta-oe/recipes-support/fltk/fltk.inc | 4 +- ...xx-do-not-use-dlopen-in-case-glibc-s.patch | 4 +- .../meta-oe/recipes-support/fmt/fmt_10.2.1.bb | 16 - .../0001-Fix-undeclared-function-errors.patch | 48 + .../freeipmi/freeipmi_1.6.14.bb | 26 + ...mpilation-warnings-in-ainput-channel.patch | 72 + .../0001-Fixed-compilation-warnings.patch | 27 + .../recipes-support/freerdp/freerdp3_3.4.0.bb | 61 - .../recipes-support/freerdp/freerdp3_3.5.1.bb | 61 + .../recipes-support/freerdp/freerdp_2.11.2.bb | 92 - .../recipes-support/freerdp/freerdp_2.11.7.bb | 94 + .../recipes-support/fuse/fuse3/fuse3.conf | 0 .../recipes-support/fuse/fuse3/run-ptest | 0 .../recipes-support/fuse/fuse3_3.16.2.bb | 7 +- .../recipes-support/genimage/genimage_18.bb | 22 + ...ype-conversion-to-match-function-ret.patch | 33 + ...ype-conversion-to-match-function-ret.patch | 32 + .../googlebenchmark/googlebenchmark_1.8.3.bb | 20 - .../googlebenchmark/googlebenchmark_1.8.4.bb | 22 + .../meta-oe/recipes-support/gosu/gosu_1.17.bb | 7 +- .../meta-oe/recipes-support/gpm/gpm_git.bb | 4 +- .../gradm/gradm_3.1-202111052217.bb | 2 + .../meta-oe/recipes-support/gsl/gsl_2.7.1.bb | 4 - .../meta-oe/recipes-support/gsl/gsl_2.8.bb | 4 + ...-signature-on-non-glibc-linux-musl-s.patch | 85 + ...1-Simplify-check-for-gethostbyname_r.patch | 96 - .../recipes-support/gsoap/gsoap_2.8.126.bb | 42 - .../recipes-support/gsoap/gsoap_2.8.134.bb | 42 + ...Language-header-for-fr-and-de-locals.patch | 46 + .../hddtemp/hddtemp_0.3-beta15.bb | 5 +- .../hunspell/hunspell-dictionaries.bb | 5 +- .../recipes-support/hwdata/hwdata_0.381.bb | 26 - .../recipes-support/hwdata/hwdata_0.387.bb | 26 + .../recipes-support/iksemel/iksemel_1.5.bb | 3 + .../imagemagick/imagemagick_7.1.1.bb | 23 +- .../recipes-support/imx-cst/imx-cst_3.4.0.bb | 39 + ...iniparser.pc-Make-libpath-a-variable.patch | 23 - .../iniparser/Add-CMake-support.patch | 65 - .../iniparser/iniparser/CVE-2023-33461.patch | 48 - .../iniparser/iniparser/CVE-2025-0633.patch | 37 - .../iniparser/iniparser_4.1.bb | 29 - .../iniparser/iniparser_4.2.4.bb | 18 + .../meta-oe/recipes-support/lcov/lcov_1.16.bb | 14 +- .../libbytesize/libbytesize_2.10.bb | 29 - .../libbytesize/libbytesize_2.11.bb | 29 + ...-Wmissing-template-arg-list-after-te.patch | 41 + .../libcereal/libcereal_1.3.2.bb | 1 + ...rch-path-logic-to-relative-pathnames.patch | 48 + .../libconfuse/libconfuse_3.3.bb | 14 + .../meta-oe/recipes-support/libee/libee.inc | 39 - .../recipes-support/libee/libee/ezapi1.sh | 14 - .../libee/libee/libee-parallel-make.patch | 20 - .../recipes-support/libee/libee/run-ptest | 3 - .../recipes-support/libee/libee_0.4.1.bb | 4 - .../libeigen/libeigen_3.4.0.bb | 8 +- .../libfido2/libfido2_1.14.0.bb | 23 - .../libfido2/libfido2_1.15.0.bb | 23 + .../recipes-support/libftdi/libftdi_1.5.bb | 2 + .../0001-bindings-cxx-disable-tests.patch | 33 + .../libgpiod/libgpiod-1.x/run-ptest | 2 +- ...cxx-Migrate-C-tests-to-use-Catch2-v3.patch | 530 + ...ts-set-direction-when-reconfiguring-.patch | 38 - .../recipes-support/libgpiod/libgpiod.inc | 4 - .../libgpiod/libgpiod_1.6.4.bb | 45 - .../libgpiod/libgpiod_1.6.5.bb | 47 + .../libgpiod/libgpiod_2.1.2.bb | 33 - .../libgpiod/libgpiod_2.1.3.bb | 33 + .../libiodbc/libiodbc_3.52.15.bb | 30 - .../libiodbc/libiodbc_3.52.16.bb | 33 + .../libjs/libjs-jquery_3.3.1.bb | 6 +- .../liblinebreak/liblinebreak_1.2.bb | 11 - .../libmanette/libmanette_0.2.7.bb | 16 - .../libmanette/libmanette_0.2.9.bb | 16 + .../recipes-support/libmxml/libmxml_3.3.1.bb | 31 - .../recipes-support/libmxml/libmxml_4.0.3.bb | 31 + .../recipes-support/libnice/libnice_0.1.22.bb | 3 + .../recipes-support/libnvme/libnvme_1.10.bb | 22 + .../recipes-support/libnvme/libnvme_1.8.bb | 22 - .../libosinfo/libosinfo_1.11.0.bb | 2 +- .../0001-Make-xmlError-structs-constant.patch | 56 + .../libosinfo/osinfo-db-tools_1.11.0.bb | 18 + .../libosinfo/osinfo-db_20240701.bb | 21 + .../0001-detect-correct-openssl-3.x.patch | 28 - .../recipes-support/libp11/libp11_0.4.12.bb | 5 +- .../libpaper/libpaper_2.1.2.bb | 9 - .../libpaper/libpaper_2.2.5.bb | 12 + .../recipes-support/libraw/libraw_0.21.2.bb | 3 + .../recipes-support/libsmi/libsmi_0.5.0.bb | 10 +- ...cks.cmake-drop-Wunused-variable-flag.patch | 37 + ...prototype-of-des3_encrypt-des3_decry.patch | 44 - ....txt-do-not-search-ssh-sshd-commands.patch | 16 +- .../libssh/libssh/CVE-2025-5318.patch | 31 - .../recipes-support/libssh/libssh_0.10.6.bb | 49 - .../recipes-support/libssh/libssh_0.11.1.bb | 50 + ...-missing-prototype-compiler-warnings.patch | 53 + ...ix-invalid-memory-de-reference-issue.patch | 44 + ...escriptor-leaks-reported-by-cppcheck.patch | 101 + ...0006-fix-memleak-on-tar_open-failure.patch | 26 + ...ix-memleaks-in-libtar-sample-program.patch | 119 + ...ng-a-static-buffer-in-th_get_pathnam.patch | 89 + ...-for-NULL-before-freeing-th_pathname.patch | 30 + ...-stdlib.h-for-malloc-in-lib-decode.c.patch | 26 + ...amming-mistakes-detected-by-static-a.patch | 100 + .../libtar/files/CVE-2013-4420.patch | 160 + ...-33640-CVE-2021-33645-CVE-2021-33646.patch | 42 + .../files/CVE-2021-33643-CVE-2021-33644.patch | 52 + .../recipes-support/libtar/libtar_1.2.20.bb | 12 + ...e-sys-select.h-for-fd_set-definition.patch | 30 - ...ssing-headers-for-strrchr-and-memcmp.patch | 46 - ...correct-parameter-type-to-accept-API.patch | 39 + ...teamd-Re-adjust-include-header-order.patch | 11 +- .../recipes-support/libteam/libteam_1.31.bb | 48 - .../recipes-support/libteam/libteam_1.32.bb | 47 + .../libtinyxml/CVE-2021-42260.patch | 27 + .../libtinyxml/CVE-2023-34194.patch | 31 + .../libtinyxml/libtinyxml_2.6.2.bb | 6 +- .../libtinyxml2/libtinyxml2_10.0.0.bb | 1 + ...ibc.c-only-when-CONFIG_NOLIBC-is-set.patch | 43 + ...1-test-Drop-including-error.h-header.patch | 27 + ...-Include-poll.h-instead-of-sys-poll..patch | 32 + .../recipes-support/liburing/liburing_2.5.bb | 29 - .../recipes-support/liburing/liburing_2.7.bb | 38 + .../libusbgx/libusbgx-config.bb | 5 +- .../recipes-support/libusbgx/libusbgx_git.bb | 8 +- .../recipes-support/links/links-x11_2.26.bb | 4 +- .../recipes-support/links/links_2.29.bb | 2 + .../recipes-support/logwarn/logwarn_1.0.14.bb | 52 - .../recipes-support/logwarn/logwarn_1.0.17.bb | 54 + .../0001-Avoid-bashisms-in-init-scripts.patch | 17 +- .../files/0001-configure.ac-check-egrep.patch | 33 - ...mplement-libc-specific-reopen_stream.patch | 31 +- .../0001-include-libgen.h-for-basename.patch | 13 +- ...tweak-MODPROBE_CMD-for-cross-compile.patch | 11 +- .../lvm2/files/0005-do-not-build-manual.patch | 15 +- ...lvm2-monitor.service-after-tmp.mount.patch | 7 +- .../lvm2/files/reproducible-build.patch | 15 +- ...ibdevmapper_2.03.22.bb => libdevmapper.bb} | 0 .../meta-oe/recipes-support/lvm2/lvm2.bb | 115 + .../meta-oe/recipes-support/lvm2/lvm2.inc | 4 +- ...findmnt-bin-lsblk-bin-sort-not-found.patch | 11 +- ...1-lvmdbusd-create-dirs-for-lock-file.patch | 29 - .../lvm2/lvm2/tweak-for-lvmdbusd.patch | 13 +- .../recipes-support/lvm2/lvm2_2.03.22.bb | 110 - .../mbuffer/mbuffer_20140310.bb | 2 + .../recipes-support/mcelog/mce-inject_git.bb | 2 +- .../recipes-support/mcelog/mce-test_git.bb | 4 +- .../recipes-support/mcelog/mcelog_198.bb | 44 - .../recipes-support/mcelog/mcelog_200.bb | 43 + .../recipes-support/monit/monit_5.33.0.bb | 56 - .../recipes-support/monit/monit_5.34.0.bb | 56 + .../recipes-support/mscgen/mscgen_0.20.bb | 2 + .../msktutil/msktutil_1.2.1.bb | 3 + .../multipath-tools/multipath-tools_0.9.8.bb | 4 +- .../nano/files/CVE-2024-5742.patch | 101 - .../meta-oe/recipes-support/nano/nano_7.2.bb | 24 - .../meta-oe/recipes-support/nano/nano_8.2.bb | 22 + .../meta-oe/recipes-support/nmon/nmon_16m.bb | 6 +- .../meta-oe/recipes-support/nspr/nspr_4.35.bb | 2 +- .../nss/nss/CVE-2024-6602.patch | 65 - .../nss/nss/CVE-2024-6609.patch | 30 - .../meta-oe/recipes-support/nss/nss_3.103.bb | 289 + .../meta-oe/recipes-support/nss/nss_3.98.bb | 291 - .../recipes-support/onig/onig_6.9.9.bb | 3 + ...e-pointer-type-error-with-gcc-option.patch | 65 + .../recipes-support/openct/openct_0.6.20.bb | 16 +- .../recipes-support/opencv/opencv_4.10.0.bb | 210 + .../recipes-support/opencv/opencv_4.9.0.bb | 210 - ...-fix-incompatible-pointer-type-error.patch | 40 + .../openldap/openldap_2.6.7.bb | 231 - .../openldap/openldap_2.6.8.bb | 237 + ...ixes-for-uninitialized-memory-issues.patch | 1268 - .../opensc/files/CVE-2024-8443-0001.patch | 60 - .../opensc/files/CVE-2024-8443-0002.patch | 55 - .../recipes-support/opensc/opensc_0.25.1.bb | 19 +- .../0001-Fix-build-with-clang-19.patch | 56 + .../opentelemetry/opentelemetry-cpp_1.16.1.bb | 29 + .../meta-oe/recipes-support/pcp/pcp_6.0.5.bb | 6 +- .../pcsc-tools/pcsc-tools_1.7.1.bb | 25 - .../pcsc-tools/pcsc-tools_1.7.2.bb | 25 + .../recipes-support/picocom/picocom_2024.bb | 21 + .../recipes-support/picocom/picocom_git.bb | 24 - .../pidgin/funyahoo-plusplus_git.bb | 3 + .../recipes-support/pidgin/icyque_git.bb | 3 + .../recipes-support/pidgin/libgnt_2.14.1.bb | 3 + .../pidgin/pidgin-sipe_1.25.0.bb | 4 + ...or_gtkitemfactorycallbacks_on_gcc-14.patch | 177 + .../pidgin/pidgin/purple-OE-branding-25.patch | 26 - .../recipes-support/pidgin/pidgin_2.14.13.bb | 120 + .../recipes-support/pidgin/pidgin_2.14.2.bb | 113 - ...001-Fix-types-for-old-32-bit-systems.patch | 49 + .../pkcs11-provider/pkcs11-provider_0.3.bb | 27 - .../pkcs11-provider/pkcs11-provider_0.5.bb | 25 + .../pngcheck/pngcheck_2.3.0.bb | 3 + ...tomic-int-instead-of-std-atomic-bool.patch | 60 - ...nx-Ignore-PKCS12-and-testLaunch-test.patch | 6 +- ...l-cmake-files-with-resolved-ENABLE_J.patch | 32 - .../recipes-support/poco/poco_1.12.5p2.bb | 119 - .../recipes-support/poco/poco_1.13.3.bb | 117 + .../poppler/poppler-data_0.4.12.bb | 2 +- .../0001-cmake-Do-not-use-isystem.patch | 40 +- .../poppler/poppler/CVE-2023-34872.patch | 46 - .../poppler/poppler/CVE-2024-56378.patch | 77 - .../poppler/poppler/CVE-2024-6239-0001.patch | 1275 - .../poppler/poppler/CVE-2024-6239-0002.patch | 111 - .../poppler/poppler/CVE-2025-32364.patch | 28 - .../poppler/poppler/CVE-2025-32365.patch | 41 - .../poppler/poppler/CVE-2025-43903-0001.patch | 75 - .../poppler/poppler/CVE-2025-43903-0002.patch | 49 - .../poppler/poppler/jpeg-stdio.patch | 41 - .../poppler/poppler_23.04.0.bb | 65 - .../poppler/poppler_24.09.0.bb | 57 + .../procmail/procmail/CVE-2014-3618.patch | 29 + .../procmail/procmail/CVE-2017-16844.patch | 20 + .../recipes-support/procmail/procmail_3.22.bb | 7 +- .../meta-oe/recipes-support/pv/pv_1.6.20.bb | 2 +- .../recipes-support/pxaregs/pxaregs_1.14.bb | 3 +- .../python3-looseversion_1.3.0.bb | 0 .../raptor-2.0.16-dont_use_curl-config.patch | 73 + .../recipes-support/raptor2/raptor2_2.0.16.bb | 6 +- .../reboot-mode/reboot-mode_git.bb | 3 + .../recipes-support/remmina/remmina_1.4.34.bb | 50 - .../recipes-support/remmina/remmina_1.4.35.bb | 50 + .../recipes-support/reptyr/reptyr_0.10.0.bb | 2 + .../recipes-support/sdmon/sdmon_git.bb | 4 +- ...N-for-shared-lib-and-comment-example.patch | 46 + .../recipes-support/serial/serial_1.2.1.bb | 3 +- .../recipes-support/smarty/smarty_4.4.1.bb | 2 + .../recipes-support/spdlog/spdlog_1.13.0.bb | 18 - .../recipes-support/spdlog/spdlog_1.14.1.bb | 18 + ...ipv6-code-with-SYSLOG_NG_ENABLE_IPV6.patch | 40 - .../syslog-ng/files/CVE-2024-47619.patch | 292 - .../syslog-ng/syslog-ng_4.6.0.bb | 150 - .../syslog-ng/syslog-ng_4.7.0.bb | 156 + ...suppress-new-GCC-12-13-warnings-1192.patch | 57 - ....cmake-remove-cross-compiation-check.patch | 33 - .../recipes-support/tbb/tbb_2021.11.0.bb | 63 - .../recipes-support/tbb/tbb_2021.13.0.bb | 64 + .../thin-provisioning-tools-crates.inc | 206 +- .../thin-provisioning-tools_1.0.12.bb | 52 - .../thin-provisioning-tools_1.0.13.bb | 52 + .../recipes-support/tree/tree_2.1.1.bb | 20 - .../recipes-support/tree/tree_2.1.3.bb | 20 + .../udisks/udisks2/CVE-2025-6019.patch | 51 - .../recipes-support/udisks/udisks2_2.10.1.bb | 1 - .../recipes-support/uhubctl/uhubctl_2.5.0.bb | 21 - .../recipes-support/uhubctl/uhubctl_2.6.0.bb | 21 + ...it-path-from-configure-option-proper.patch | 29 - .../uim/uim/JMP_BUF_GC_jmp_buf.patch | 15 - .../meta-oe/recipes-support/uim/uim_1.8.8.bb | 157 - .../meta-oe/recipes-support/uim/uim_1.8.9.bb | 154 + .../unicode-ucd/unicode-ucd_14.0.0.bb | 7 +- .../unixodbc/unixodbc_2.3.12.bb | 1 + .../vboxguestdrivers_7.0.14.bb | 91 - .../vboxguestdrivers_7.0.20.bb | 91 + ...1-Fix-build-issues-with-latest-Clang.patch | 237 + ...b1773bff2ef7c3b867ab019d69faa36c010d.patch | 33 + .../webkitgtk/webkitgtk3_2.44.1.bb | 188 - .../webkitgtk/webkitgtk3_2.44.3.bb | 189 + .../xdg-dbus-proxy/xdg-dbus-proxy_0.1.5.bb | 19 - .../xdg-dbus-proxy/xdg-dbus-proxy_0.1.6.bb | 19 + .../xdg-desktop-portal_1.18.1.bb | 49 - .../xdg-desktop-portal_1.18.4.bb | 49 + .../0001-nss-nspr-fix-for-multilib.patch | 7 +- .../xmlsec1/change-finding-path-of-nss.patch | 7 +- .../recipes-support/xmlsec1/xmlsec1_1.3.4.bb | 67 - .../recipes-support/xmlsec1/xmlsec1_1.3.5.bb | 67 + .../recipes-support/xrdp/xrdp_0.9.19.bb | 5 +- .../recipes-test/catch2/catch2_2.13.10.bb | 21 - .../recipes-test/catch2/catch2_3.7.0.bb | 21 + .../recipes-test/cukinia/cukinia_0.6.2.bb | 21 - .../recipes-test/cukinia/cukinia_0.7.0.bb | 20 + .../recipes-test/cxxtest/cxxtest_4.4.bb | 2 + .../recipes-test/fbtest/fb-test_1.1.0.bb | 3 + .../googletest/googletest_1.14.0.bb | 37 - .../googletest/googletest_1.15.2.bb | 37 + .../linux-serial-test_git.bb | 3 + ...ve-including-error.h-in-test_linux.h.patch | 29 + .../recipes-test/syzkaller/syzkaller_git.bb | 4 + .../recipes-test/testfloat/testfloat_3e.bb | 5 +- .../trompeloeil/trompeloeil_v47.bb | 15 + sources/meta-openembedded/meta-perl/README.md | 6 +- .../meta-perl/conf/layer.conf | 2 +- .../logcheck/logcheck_1.4.3.bb | 4 +- .../recipes-perl/libcgi/libcgi-perl_4.60.bb | 50 - .../recipes-perl/libcgi/libcgi-perl_4.66.bb | 50 + .../libcompress-raw-bzip2-perl_2.206.bb | 28 - .../libcompress-raw-bzip2-perl_2.213.bb | 28 + .../libcompress-raw-lzma-perl_2.206.bb | 32 - .../libcompress-raw-lzma-perl_2.213.bb | 32 + .../libcompress-raw-zlib-perl_2.206.bb | 28 - .../libcompress-raw-zlib-perl_2.213.bb | 28 + .../libcrypt-openssl-random-perl_0.16.bb | 33 - .../libcrypt-openssl-random-perl_0.17.bb | 33 + ...e-proper-prototype-for-main-function.patch | 16 +- .../libcurses/libcurses-perl_1.41.bb | 31 - .../libcurses/libcurses-perl_1.45.bb | 31 + .../libdb/libdbd-sqlite-perl_1.74.bb | 2 +- .../libextutils-helpers-perl_0.026.bb | 29 - .../libextutils-helpers-perl_0.028.bb | 28 + .../libhtml/libhtml-tree-perl_5.03.bb | 10 +- .../libio/libio-compress-lzma-perl_2.206.bb | 24 - .../libio/libio-compress-lzma-perl_2.213.bb | 24 + .../libio/libio-compress-perl_2.206.bb | 41 - .../libio/libio-compress-perl_2.213.bb | 49 + .../libio/libio-socket-ssl-perl_2.085.bb | 54 - .../libio/libio-socket-ssl-perl_2.089.bb | 54 + .../libmodule-build-tiny-perl_0.047.bb | 65 - .../libmodule-build-tiny-perl_0.048.bb | 72 + .../libnet/libnet-dns-perl_1.40.bb | 64 - .../libnet/libnet-dns-perl_1.46.bb | 64 + .../libtest/libtest-harness-perl_3.48.bb | 119 - .../libtest/libtest-harness-perl_3.50.bb | 119 + .../meta-openembedded/meta-python/README.md | 8 +- .../conf/include/non-repro-meta-python.inc | 3 + .../ptest-packagelists-meta-python.inc | 5 + .../meta-python/conf/layer.conf | 2 +- .../images/meta-python-image-ptest.bb | 3 +- .../recipes-devtools/python/pamela_1.1.0.bb | 14 - .../recipes-devtools/python/pamela_1.2.0.bb | 14 + .../python/python-libusb1_3.1.0.bb | 1 - ...e-pytest-runner-to-test_requirements.patch | 0 .../python/python3-a2wsgi_1.10.4.bb | 33 - .../python/python3-a2wsgi_1.10.7.bb | 33 + .../python/python3-aiofiles_23.2.1.bb | 15 - .../python/python3-aiofiles_24.1.0.bb | 15 + .../python/python3-aiohappyeyeballs_2.3.2.bb | 12 - .../python/python3-aiohappyeyeballs_2.4.0.bb | 12 + .../python/python3-aiohttp_3.10.5.bb | 22 + .../python/python3-aiohttp_3.9.4.bb | 22 - .../python/python3-aiohue_4.7.1.bb | 16 - .../python/python3-aiohue_4.7.3.bb | 15 + ...poetry-core-for-pyproject-base-build.patch | 29 + .../python/python3-aioserial_1.3.1.bb | 5 +- .../python/python3-aiosignal_1.3.1.bb | 2 +- .../python/python3-alembic_1.13.1.bb | 19 - .../python/python3-alembic_1.13.3.bb | 17 + .../python/python3-annotated-types_0.6.0.bb | 14 - .../python/python3-annotated-types_0.7.0.bb | 14 + .../python/python3-ansi2html_1.9.1.bb | 19 - .../python/python3-ansi2html_1.9.2.bb | 19 + .../python/python3-anyio_4.3.0.bb | 27 - .../python/python3-anyio_4.4.0.bb | 27 + .../python/python3-apispec_6.4.0.bb | 10 - .../python/python3-apispec_6.6.1.bb | 10 + .../python/python3-argcomplete_3.3.0.bb | 18 - .../python/python3-argcomplete_3.5.0.bb | 22 + .../python/python3-argh_0.31.2.bb | 26 - .../python/python3-argh_0.31.3.bb | 26 + .../python/python3-astroid_3.1.0.bb | 37 - .../python/python3-astroid_3.3.2.bb | 37 + .../python/python3-asyncinotify_4.0.6.bb | 15 - .../python/python3-asyncinotify_4.0.9.bb | 15 + .../python/python3-autobahn_23.6.2.bb | 21 - .../python/python3-autobahn_24.4.2.bb | 21 + .../python/python3-autoflake_2.2.1.bb | 12 - .../python/python3-autoflake_2.3.1.bb | 12 + .../python/python3-automat_22.10.0.bb | 16 - .../python/python3-automat_24.8.1.bb | 11 + .../python/python3-awesomeversion_24.2.0.bb | 11 - .../python/python3-awesomeversion_24.6.0.bb | 11 + .../python/python3-bandit_1.7.8.bb | 19 - .../python/python3-bandit_1.7.9.bb | 19 + .../python/python3-bidict_0.23.0.bb | 11 - .../python/python3-bidict_0.23.1.bb | 11 + .../python/python3-bitstring_4.1.4.bb | 19 - .../python/python3-bitstring_4.2.3.bb | 19 + .../python/python3-bitstruct_8.19.0.bb | 4 +- .../python/python3-bleak_0.21.1.bb | 33 - .../python/python3-bleak_0.22.2.bb | 32 + .../python/python3-brotli_1.1.0.bb | 6 +- .../python/python3-cachetools_5.3.3.bb | 33 - .../python/python3-cachetools_5.5.0.bb | 33 + .../python/python3-can_4.2.2.bb | 4 +- .../python/python3-cantools_39.4.4.bb | 24 - .../python/python3-cantools_39.4.5.bb | 24 + .../python/python3-cbor2_5.6.3.bb | 33 - .../python/python3-cbor2_5.6.4.bb | 28 + .../python/python3-classes_0.4.1.bb | 2 +- .../python/python3-click-repl_0.3.0.bb | 7 +- .../python/python3-cloudpickle_3.0.0.bb | 2 +- .../python/python3-cmake_3.28.3.bb | 2 +- .../python/python3-configobj_5.0.8.bb | 2 +- .../python/python3-coverage_7.4.1.bb | 22 - .../python/python3-coverage_7.6.1.bb | 22 + .../python/python3-croniter_2.0.5.bb | 16 - .../python/python3-croniter_3.0.3.bb | 16 + ...-packaging-module-instead-of-setupto.patch | 44 + .../python/python3-daemon_3.0.1.bb | 3 +- .../python/python3-dasbus/run-ptest | 3 + .../python/python3-dasbus_1.7.bb | 32 + .../python/python3-dbus-fast_2.21.1.bb | 15 - .../python/python3-dbus-fast_2.24.2.bb | 21 + .../python/python3-dill_0.3.8.bb | 4 +- .../python/python3-dirty-equals_0.7.1.bb | 21 - .../python/python3-dirty-equals_0.8.0.bb | 26 + .../python/python3-django_4.2.16.bb | 14 + .../python/python3-django_4.2.18.bb | 14 - .../python/python3-django_5.0.11.bb | 9 - .../python/python3-django_5.0.9.bb | 9 + .../python3-djangorestframework_3.15.1.bb | 16 - .../python3-djangorestframework_3.15.2.bb | 16 + .../python/python3-elementpath_4.4.0.bb | 19 - .../python/python3-elementpath_4.5.0.bb | 19 + .../python/python3-email-validator_2.1.1.bb | 12 - .../python/python3-email-validator_2.2.0.bb | 12 + .../python/python3-eth-hash_0.6.0.bb | 14 - .../python/python3-eth-hash_0.7.0.bb | 20 + .../python/python3-eth-utils_3.0.0.bb | 16 - .../python/python3-eth-utils_5.0.0.bb | 18 + .../python/python3-evdev_1.6.1.bb | 22 - .../python/python3-evdev_1.7.1.bb | 22 + .../python/python3-eventlet_0.36.1.bb | 15 - .../python/python3-eventlet_0.37.0.bb | 17 + .../python/python3-executing_2.0.1.bb | 9 - .../python/python3-executing_2.1.0.bb | 9 + .../python/python3-fastjsonschema_2.18.0.bb | 41 - .../python/python3-fastjsonschema_2.20.0.bb | 40 + .../python/python3-file-magic_0.4.1.bb | 4 +- .../python/python3-filelock_3.13.4.bb | 16 - .../python/python3-filelock_3.16.1.bb | 22 + .../python/python3-flask/run-ptest | 3 + .../python/python3-flask_3.0.2.bb | 25 - .../python/python3-flask_3.0.3.bb | 38 + .../python/python3-flexparser_0.3.1.bb | 31 + .../python/python3-flexparser_0.3.bb | 31 - .../python/python3-freezegun_1.4.0.bb | 29 - .../python/python3-freezegun_1.5.1.bb | 29 + .../python/python3-fsspec_2024.9.0.bb | 22 + .../python/python3-future_0.18.3.bb | 12 - .../python/python3-future_1.0.0.bb | 12 + .../python/python3-gast_0.5.4.bb | 11 - .../python/python3-gast_0.6.0.bb | 11 + .../python/python3-geomet_1.1.0.bb | 8 +- .../python/python3-gevent/not-final.patch | 16 + .../python/python3-gevent_24.2.1.bb | 12 +- .../python/python3-gmqtt_0.6.14.bb | 19 - .../python/python3-gmqtt_0.6.16.bb | 19 + .../python/python3-google-api-core_2.18.0.bb | 25 - .../python/python3-google-api-core_2.19.1.bb | 25 + ...ython3-google-api-python-client_2.125.0.bb | 20 - ...ython3-google-api-python-client_2.135.0.bb | 20 + .../python/python3-google-auth_2.29.0.bb | 41 - .../python/python3-google-auth_2.30.0.bb | 41 + ...python3-googleapis-common-protos_1.63.0.bb | 13 - ...python3-googleapis-common-protos_1.63.2.bb | 13 + .../python/python3-gpiod_2.1.3.bb | 46 - .../python/python3-gpiod_2.2.1.bb | 46 + .../python/python3-greenlet_3.0.3.bb | 9 - .../python/python3-greenlet_3.1.0.bb | 11 + .../python/python3-grpcio-channelz_1.62.2.bb | 16 + .../python3-grpcio-reflection_1.62.2.bb | 16 + .../python/python3-grpcio-tools_1.62.2.bb | 4 - .../python3-grpcio/CVE-2024-11407.patch | 32 - .../python/python3-grpcio_1.62.2.bb | 53 - .../python/python3-grpcio_1.66.1.bb | 48 + .../python/python3-gunicorn_21.2.0.bb | 26 - .../python/python3-gunicorn_23.0.0.bb | 28 + .../0001-Fix-Cython-3-compatibility.patch | 796 - ...ast-arguments-to-H5Lunpack_elink_val.patch | 25 - ...002-Use-libc.stdint-instead-of-numpy.patch | 25 - .../python/python3-h5py_3.10.0.bb | 44 - .../python/python3-h5py_3.11.0.bb | 39 + .../python3-hatch-requirements-txt_0.4.1.bb | 12 + .../python/python3-hexbytes_1.0.0.bb | 9 - .../python/python3-hexbytes_1.2.1.bb | 15 + .../python/python3-html2text_2020.1.16.bb | 28 - .../python/python3-html2text_2024.2.26.bb | 27 + .../python/python3-httpcore_1.0.3.bb | 26 - .../python/python3-httpcore_1.0.5.bb | 26 + .../python/python3-httpx_0.27.0.bb | 48 - .../python/python3-httpx_0.27.2.bb | 48 + .../python/python3-huey_2.5.0.bb | 18 - .../python/python3-huey_2.5.1.bb | 18 + .../python/python3-humanize_4.10.0.bb | 22 + .../python/python3-humanize_4.9.0.bb | 22 - .../python/python3-icu_2.12.bb | 15 - .../python/python3-icu_2.13.1.bb | 19 + .../python/python3-imageio_2.34.0.bb | 12 - .../python/python3-imageio_2.35.1.bb | 12 + .../python/python3-imgtool_2.0.0.bb | 12 - .../python/python3-imgtool_2.1.0.bb | 12 + .../python3-importlib-metadata_8.4.0.bb | 20 + .../python/python3-incremental_22.10.0.bb | 19 - .../python/python3-incremental_24.7.2.bb | 33 + ...0001-Do-not-override-const-qualifier.patch | 83 + .../python/python3-inflate64_1.0.0.bb | 5 +- .../python/python3-ipython_8.23.0.bb | 28 - .../python/python3-ipython_8.27.0.bb | 26 + .../python/python3-itsdangerous_2.1.2.bb | 17 - .../python/python3-itsdangerous_2.2.0.bb | 17 + .../python/python3-joblib_1.4.0.bb | 15 - .../python/python3-joblib_1.4.2.bb | 15 + .../python/python3-jstyleson_0.0.2.bb | 2 +- .../python/python3-kivy_2.3.0.bb | 5 + .../python/python3-kiwisolver_1.4.5.bb | 19 - .../python/python3-kiwisolver_1.4.7.bb | 19 + .../python/python3-langtable_0.0.65.bb | 23 - .../python/python3-langtable_0.0.68.bb | 23 + .../python3-lazy-object-proxy_1.10.0.bb | 4 +- .../python/python3-lazy_1.6.bb | 2 +- .../python/python3-lru-dict_1.3.0.bb | 4 +- .../python/python3-luma-oled_3.13.0.bb | 2 +- .../python/python3-marshmallow_3.21.1.bb | 38 - .../python/python3-marshmallow_3.22.0.bb | 38 + .../python/python3-matplotlib-inline_0.1.6.bb | 8 - .../python/python3-matplotlib-inline_0.1.7.bb | 11 + ...hon-remove-self-import-from-setup.py.patch | 32 - .../python/python3-moteus_0.3.67.bb | 19 - .../python/python3-moteus_0.3.72.bb | 17 + .../python/python3-msgpack_1.0.7.bb | 27 - .../python/python3-msgpack_1.1.0.bb | 27 + .../python/python3-multidict_6.0.5.bb | 2 +- .../python/python3-mypy_1.10.0.bb | 23 + .../python/python3-mypy_1.9.0.bb | 23 - .../python/python3-netaddr_1.2.1.bb | 25 - .../python/python3-netaddr_1.3.0.bb | 25 + .../python/python3-nmap_1.6.0.bb | 18 - .../python/python3-nmap_1.9.1.bb | 18 + .../python/python3-nocasedict_2.0.1.bb | 12 - .../python/python3-nocasedict_2.0.4.bb | 12 + .../python/python3-nocaselist_2.0.0.bb | 12 - .../python/python3-nocaselist_2.0.3.bb | 12 + .../python/python3-oletools_0.60.1.bb | 11 - .../python/python3-oletools_0.60.2.bb | 11 + .../python/python3-openpyxl_3.1.2.bb | 23 - .../python/python3-openpyxl_3.1.5.bb | 23 + .../python/python3-paho-mqtt_2.0.0.bb | 37 - .../python/python3-paho-mqtt_2.1.0.bb | 37 + ...Downgrade-numpy-version-needs-to-1.x.patch | 27 + ...t.toml-don-t-pin-dependency-versions.patch | 37 + .../python/python3-pandas_2.0.3.bb | 38 - .../python/python3-pandas_2.2.2.bb | 43 + .../python/python3-paramiko_3.4.0.bb | 20 - .../python/python3-paramiko_3.5.0.bb | 20 + .../python/python3-parse-type_0.6.2.bb | 25 - .../python/python3-parse-type_0.6.3.bb | 25 + .../python/python3-parse_1.20.1.bb | 27 - .../python/python3-parse_1.20.2.bb | 27 + .../python/python3-pastedeploy_3.1.0.bb | 17 +- .../python/python3-path_16.14.0.bb | 34 - .../python/python3-path_17.0.0.bb | 34 + .../python/python3-pathlib2_2.3.7.bb | 0 .../python/python3-pdm-backend_2.1.8.bb | 13 - .../python/python3-pdm-backend_2.4.1.bb | 13 + .../python/python3-pdm-build-locked_0.3.3.bb | 13 + .../python/python3-pdm_2.14.0.bb | 15 - .../python/python3-pdm_2.19.1.bb | 16 + .../python/python3-pefile_2023.2.7.bb | 16 - .../0001-support-cross-compiling.patch | 11 +- .../python/python3-pillow_10.3.0.bb | 72 - .../python/python3-pillow_10.4.0.bb | 73 + .../python/python3-pint/run-ptest | 2 +- .../python/python3-pint_0.23.bb | 41 - .../python/python3-pint_0.24.3.bb | 44 + .../python/python3-platformdirs_4.2.0.bb | 32 - .../python/python3-platformdirs_4.3.6.bb | 32 + .../python/python3-portion_2.4.2.bb | 2 +- ...e-source-filename-instead-of-foo-for.patch | 50 - ...ndle-empty-max_priority-value-as-Non.patch | 49 - ...e-does_build_succeed-in-compile_and_.patch | 62 - .../python/python3-posix-ipc_1.1.1.bb | 11 + .../python/python3-posix-ipc_1.2.0.bb | 16 - .../python/python3-prettytable_3.10.0.bb | 45 - .../python/python3-prettytable_3.11.0.bb | 45 + .../python/python3-prompt-toolkit_3.0.43.bb | 25 - .../python/python3-prompt-toolkit_3.0.47.bb | 25 + .../python/python3-protobuf_4.25.3.bb | 46 + .../python/python3-protobuf_4.25.8.bb | 45 - .../python/python3-pulsectl_24.4.0.bb | 13 - .../python/python3-pulsectl_24.8.0.bb | 13 + .../python/python3-pure-eval_0.2.2.bb | 16 - .../python/python3-pure-eval_0.2.3.bb | 16 + .../python/python3-py-cpuinfo_9.0.0.bb | 3 +- .../python/python3-py7zr_0.20.8.bb | 29 - .../python/python3-py7zr_0.22.0.bb | 29 + .../python/python3-py_1.11.0.bb | 0 .../python/python3-pyalsaaudio_0.10.0.bb | 12 - .../python/python3-pyalsaaudio_0.11.0.bb | 12 + .../python/python3-pyasn1-modules_0.4.0.bb | 31 - .../python/python3-pyasn1-modules_0.4.1.bb | 31 + .../python/python3-pyaudio_0.2.14.bb | 2 +- .../python/python3-pybind11-json_0.2.13.bb | 12 - .../python/python3-pybind11-json_0.2.14.bb | 12 + .../0001-Do-not-strip-binaries.patch | 54 - .../python/python3-pybind11_2.11.1.bb | 34 - .../python/python3-pybind11_2.12.0.bb | 33 + .../python/python3-pycares_4.4.0.bb | 2 +- ...01-downgrade-numpy-version-to-1.26.4.patch | 26 + .../python/python3-pycocotools_2.0.7.bb | 15 - .../python/python3-pycocotools_2.0.8.bb | 17 + .../python/python3-pycodestyle_2.11.1.bb | 11 - .../python/python3-pycodestyle_2.12.1.bb | 11 + .../python/python3-pycurl_7.45.2.bb | 21 - .../python/python3-pycurl_7.45.3.bb | 21 + .../python/python3-pydantic-core-crates.inc | 280 +- ...sion-from-1.76-to-1.75-in-Cargo.toml.patch | 29 - ...embed-RUSTFLAGS-in-final-binary-1396.patch | 58 + ...Dont-embed-RUSTFLAGS-in-final-binary.patch | 47 - .../python/python3-pydantic-core_2.18.4.bb | 58 - .../python/python3-pydantic-core_2.21.0.bb | 51 + .../python/python3-pydantic_2.7.4.bb | 53 - .../python/python3-pydantic_2.8.2.bb | 59 + .../python/python3-pydbus_0.6.0.bb | 2 +- .../python/python3-pyfanotify_0.2.2.bb | 17 - .../python/python3-pyfanotify_0.3.0.bb | 17 + .../python/python3-pyjwt_2.8.0.bb | 18 - .../python/python3-pyjwt_2.9.0.bb | 18 + .../python/python3-pylint_3.1.0.bb | 57 - .../python/python3-pylint_3.2.2.bb | 58 + .../python/python3-pymetno_0.12.0.bb | 16 - .../python/python3-pymetno_0.13.0.bb | 16 + .../python/python3-pymisp_2.4.190.bb | 22 - .../python/python3-pymisp_2.4.198.bb | 22 + .../python/python3-pymodbus_3.6.7.bb | 31 - .../python/python3-pymodbus_3.7.2.bb | 31 + .../python/python3-pymongo_4.6.1.bb | 30 - .../python/python3-pymongo_4.8.0.bb | 36 + .../python/python3-pyperclip_1.8.2.bb | 14 - .../python/python3-pyperclip_1.9.0.bb | 14 + .../python/python3-pyperf_2.6.3.bb | 23 - .../python/python3-pyperf_2.7.0.bb | 23 + .../python/python3-pyproj_3.6.1.bb | 4 +- .../python/python3-pyproject-api_1.6.1.bb | 23 - .../python/python3-pyproject-api_1.7.2.bb | 23 + .../python/python3-pyroute2_0.7.10.bb | 41 - .../python/python3-pyroute2_0.7.12.bb | 41 + .../python/python3-pyruvate_1.2.1.bb | 14 +- .../python/python3-pytest-freezer_0.4.8.bb | 15 + .../python3-pytest-lazy-fixtures_1.0.7.bb | 21 - .../python3-pytest-lazy-fixtures_1.1.1.bb | 21 + .../python/python3-pytest-metadata_2.0.2.bb | 4 +- ...t_mock-skip-args-introspection-tests.patch | 38 - .../python/python3-pytest-mock/403.patch | 92 - .../python/python3-pytest-mock/run-ptest | 4 +- .../python/python3-pytest-mock_3.12.0.bb | 33 - .../python/python3-pytest-mock_3.14.0.bb | 32 + .../python/python3-pytest-runner_6.0.1.bb | 3 +- .../python/python3-pytest-socket_0.7.0.bb | 14 + .../python/python3-pytest-timeout_2.3.1.bb | 4 +- .../python/python3-pytest-unordered_0.6.0.bb | 12 + .../python/python3-pyudev_0.24.1.bb | 22 - .../python/python3-pyudev_0.24.3.bb | 22 + .../python/python3-pyunormalize_15.1.0.bb | 8 - .../python/python3-pyunormalize_16.0.0.bb | 8 + .../python/python3-pyyaml-include_1.3.2.bb | 29 - .../python/python3-pyyaml-include_2.1.bb | 32 + .../python/python3-pyzstd_0.15.10.bb | 18 - .../python/python3-pyzstd_0.16.1.bb | 18 + .../python/python3-qface_2.0.11.bb | 24 + .../python/python3-qface_2.0.8.bb | 24 - .../python/python3-qrcode_7.4.2.bb | 3 +- .../python/python3-rapidjson_1.14.bb | 40 - .../python/python3-rapidjson_1.19.bb | 40 + .../python/python3-redis_5.0.1.bb | 18 - .../python/python3-redis_5.0.8.bb | 21 + .../python/python3-regex_2024.4.16.bb | 14 - .../python/python3-regex_2024.9.11.bb | 14 + .../python/python3-requests-file_1.5.1.bb | 28 - .../python/python3-requests-file_2.1.0.bb | 31 + .../python/python3-requests-mock_1.12.1.bb | 9 + .../python/python3-responses_0.25.0.bb | 15 - .../python/python3-responses_0.25.3.bb | 15 + .../python/python3-rfc3986-validator_0.1.1.bb | 0 .../python/python3-rlp_4.0.0.bb | 16 - .../python/python3-rlp_4.0.1.bb | 16 + .../python/python3-robotframework_7.0.bb | 30 - .../python/python3-robotframework_7.1.bb | 30 + .../python/python3-scikit-build_0.17.6.bb | 22 - .../python/python3-scikit-build_0.18.1.bb | 22 + .../python/python3-screeninfo_0.8.1.bb | 4 +- .../python/python3-sdbus_0.11.1.bb | 17 - .../python/python3-sdbus_0.12.0.bb | 17 + .../python/python3-serpent_1.41.bb | 4 +- .../python/python3-service-identity_21.1.0.bb | 4 +- .../python/python3-sh_2.0.6.bb | 25 - .../python/python3-sh_2.0.7.bb | 25 + .../python/python3-simplejson_3.19.2.bb | 24 - .../python/python3-simplejson_3.19.3.bb | 24 + .../python/python3-smbus2_0.4.3.bb | 2 +- .../python/python3-snagboot_1.2.bb | 21 - .../python/python3-snagboot_1.3.bb | 21 + .../python/python3-sniffio_1.3.0.bb | 12 - .../python/python3-sniffio_1.3.1.bb | 21 + .../python/python3-soupsieve_2.5.bb | 26 - .../python/python3-soupsieve_2.6.bb | 31 + .../python/python3-spidev_3.6.bb | 2 +- .../python/python3-sqlalchemy_2.0.29.bb | 25 - .../python/python3-sqlalchemy_2.0.35.bb | 26 + ...1-sqlparse-change-shebang-to-python3.patch | 41 - .../python3-sqlparse/CVE-2024-4340.patch | 48 - .../python/python3-sqlparse_0.4.4.bb | 30 - .../python/python3-sqlparse_0.5.1.bb | 30 + .../python/python3-stevedore_5.1.0.bb | 14 - .../python/python3-stevedore_5.2.0.bb | 14 + .../python/python3-stopit_1.1.2.bb | 4 +- .../python/python3-supervisor_4.2.5.bb | 4 +- .../python/python3-sympy_1.12.bb | 15 - .../python/python3-sympy_1.13.2.bb | 15 + .../python/python3-term_2.5.bb | 2 +- .../python/python3-toml_0.10.2.bb | 0 .../python/python3-tomli_2.0.1.bb | 0 .../python/python3-tomlkit_0.12.3.bb | 32 - .../python/python3-tomlkit_0.13.2.bb | 32 + .../python/python3-tornado_6.4.1.bb | 41 + .../python/python3-tornado_6.4.2.bb | 41 - .../python/python3-tox_4.14.2.bb | 34 - .../python/python3-tox_4.15.1.bb | 34 + .../python/python3-tqdm_4.66.2.bb | 19 - .../python/python3-tqdm_4.66.5.bb | 19 + .../python/python3-transitions_0.9.0.bb | 9 - .../python/python3-transitions_0.9.2.bb | 9 + .../python/python3-trustme_1.1.0.bb | 2 + .../python/python3-twine_5.0.0.bb | 18 - .../python/python3-twine_5.1.1.bb | 18 + .../python3-twisted/CVE-2024-41671-0001.patch | 89 - .../python3-twisted/CVE-2024-41671-0002.patch | 251 - .../python/python3-twisted_24.3.0.bb | 181 - .../python/python3-twisted_24.7.0.bb | 177 + .../python/python3-typeguard_4.2.1.bb | 39 - .../python/python3-typeguard_4.3.0.bb | 39 + .../python/python3-typer/run-ptest | 7 + .../python/python3-typer_0.12.5.bb | 41 + .../python3-types-psutil_5.9.5.20240316.bb | 10 - .../python3-types-psutil_6.0.0.20240901.bb | 10 + ...n3-types-python-dateutil_2.9.0.20240316.bb | 8 - ...n3-types-python-dateutil_2.9.0.20240906.bb | 8 + ...ython3-types-setuptools_69.0.0.20240125.bb | 10 - ...ython3-types-setuptools_73.0.0.20240822.bb | 10 + .../python/python3-tzdata/run-ptest | 3 + .../python/python3-tzdata_2024.1.bb | 25 + ...up.py-Do-not-strip-debugging-symbols.patch | 37 - .../python/python3-ujson/run-ptest | 2 +- .../python/python3-ujson_5.10.0.bb | 38 + .../python/python3-ujson_5.9.0.bb | 35 - .../python/python3-uswid_0.4.7.bb | 19 - .../python/python3-uswid_0.5.0.bb | 19 + .../python/python3-validators_0.28.0.bb | 30 - .../python/python3-validators_0.34.0.bb | 34 + .../python/python3-virtualenv_20.25.0.bb | 22 - .../python/python3-virtualenv_20.26.5.bb | 26 + .../python/python3-watchdog_4.0.0.bb | 18 - .../python/python3-watchdog_5.0.2.bb | 18 + .../python/python3-web3_6.17.0.bb | 26 - .../python/python3-web3_6.20.1.bb | 26 + .../python/python3-werkzeug_3.0.3.bb | 24 + .../python/python3-werkzeug_3.0.6.bb | 23 - .../python/python3-whitenoise_6.6.0.bb | 19 - .../python/python3-whitenoise_6.7.0.bb | 18 + .../python/python3-wrapt_1.16.0.bb | 2 + .../python/python3-xlsxwriter_3.1.9.bb | 21 - .../python/python3-xlsxwriter_3.2.0.bb | 21 + .../python/python3-xmlschema_3.0.1.bb | 20 - .../python/python3-xmlschema_3.4.1.bb | 15 + .../python/python3-xmodem_0.4.7.bb | 2 +- .../python/python3-xxhash_3.4.1.bb | 24 - .../python/python3-xxhash_3.5.0.bb | 24 + .../python/python3-yarl_1.11.1.bb | 33 + .../python/python3-yarl_1.9.4.bb | 33 - .../python/python3-zeroconf_0.132.0.bb | 15 - .../python/python3-zeroconf_0.134.0.bb | 15 + .../python/tftpy/CVE-2023-46566.patch | 26 - .../recipes-devtools/python/tftpy_0.8.2.bb | 2 - .../python3-gspread/python3-gspread_6.1.0.bb | 14 - .../python3-gspread/python3-gspread_6.1.2.bb | 14 + .../python3-reedsolo_2.0.13.bb | 10 - .../python3-reedsolo_2.1.0b1.bb | 11 + .../0001-sip-Fix-build-with-gcc-14.patch | 31 + .../python3-wxgtk4/python3-wxgtk4_4.2.1.bb | 1 + .../python-meh/python3-meh_0.51.bb | 16 - .../python-meh/python3-meh_0.52.bb | 16 + .../python3-pykickstart_3.48.bb | 6 +- .../python-rich/python3-rich_13.7.0.bb | 15 - .../python-rich/python3-rich_13.8.1.bb | 15 + .../python3-portalocker_2.10.1.bb | 36 + .../python3-portalocker_2.8.2.bb | 36 - .../meta-webserver/README.md | 8 +- .../meta-webserver/conf/layer.conf | 2 +- ...the-core-size-limit-if-CoreDumpDirec.patch | 9 +- ...2-log-the-SELinux-context-at-startup.patch | 10 +- ...ix-perl-install-directory-to-usr-bin.patch | 9 +- .../recipes-httpd/apache2/apache2_2.4.62.bb | 59 +- .../recipes-httpd/cherokee/cherokee_git.bb | 4 +- .../recipes-httpd/hiawatha/hiawatha_10.12.bb | 6 +- .../recipes-httpd/monkey/monkey_1.6.9.bb | 6 +- .../nginx/files/CVE-2023-44487.patch | 78 - .../nginx/files/CVE-2024-7347-1.patch | 34 - .../nginx/files/CVE-2024-7347-2.patch | 52 - .../nginx/files/CVE-2025-23419.patch | 87 - .../recipes-httpd/nginx/nginx.inc | 38 +- .../recipes-httpd/nginx/nginx_1.24.0.bb | 9 - .../recipes-httpd/nginx/nginx_1.25.4.bb | 10 - .../recipes-httpd/nginx/nginx_1.26.2.bb | 6 + .../recipes-httpd/nginx/nginx_1.27.3.bb | 10 + .../recipes-httpd/sthttpd/sthttpd_2.27.1.bb | 6 +- .../phpmyadmin/phpmyadmin_5.2.1.bb | 40 + .../phpmyadmin/phpmyadmin_5.2.2.bb | 40 - .../recipes-webadmin/cockpit/cockpit_304.bb | 2 +- ...-Add-check-for-64bit-builtin-atomics.patch | 51 + .../netdata/netdata/netdata-volatiles.conf | 5 + .../netdata/netdata_1.44.3.bb | 81 - .../netdata/netdata_1.47.1.bb | 93 + .../webmin/files/disable-version-check.patch | 76 +- .../webmin/files/mount-excludefs.patch | 7 +- .../webmin/files/mysql-config-fix.patch | 7 +- .../webmin/files/net-generic.patch | 22 +- .../webmin/files/net-lib.pl.patch | 12 +- .../webmin/files/remove-python2.3.patch | 25 - .../recipes-webadmin/webmin/webmin_1.850.bb | 170 - .../recipes-webadmin/webmin/webmin_2.202.bb | 166 + sources/meta-openembedded/meta-xfce/README.md | 8 +- .../meta-xfce/conf/layer.conf | 2 +- .../recipes-apps/menulibre/menulibre_2.3.2.bb | 39 - .../recipes-apps/menulibre/menulibre_2.4.0.bb | 38 + .../xfce-dusk-gtk3/xfce-dusk-gtk3_1.3.bb | 2 +- .../xfce4-mpc-plugin_0.5.3.bb | 2 +- .../recipes-multimedia/xfmpc/xfmpc_0.3.1.bb | 3 + .../battery/xfce4-battery-plugin_1.1.5.bb | 2 +- .../xfce4-calculator-plugin_0.7.2.bb | 2 +- .../clipman/xfce4-clipman-plugin_1.6.2.bb | 2 +- .../cpufreq/xfce4-cpufreq-plugin_1.2.8.bb | 2 +- .../cpugraph/xfce4-cpugraph-plugin_1.2.8.bb | 2 +- .../datetime/xfce4-datetime-plugin_0.8.3.bb | 2 +- .../diskperf/xfce4-diskperf-plugin_2.7.0.bb | 2 +- .../eyes/xfce4-eyes-plugin_4.6.0.bb | 2 +- .../fsguard/xfce4-fsguard-plugin_1.1.3.bb | 2 +- .../genmon/xfce4-genmon-plugin_4.2.0.bb | 2 +- .../mailwatch/xfce4-mailwatch-plugin_1.3.1.bb | 2 +- .../mount/xfce4-mount-plugin_1.1.5.bb | 2 +- .../netload/xfce4-netload-plugin_1.4.1.bb | 2 +- .../notes/xfce4-notes-plugin_1.10.0.bb | 10 - .../notes/xfce4-notes-plugin_1.11.0.bb | 14 + .../places/xfce4-places-plugin_1.8.3.bb | 2 +- .../sensors/xfce4-sensors-plugin_1.4.4.bb | 2 +- .../xfce4-smartbookmark-plugin_0.5.2.bb | 2 +- .../xfce4-systemload-plugin_1.3.2.bb | 2 +- .../time-out/xfce4-time-out-plugin_1.1.3.bb | 2 +- .../timer/xfce4-timer-plugin_1.7.2.bb | 2 +- .../verve/xfce4-verve-plugin_2.0.3.bb | 2 +- .../wavelan/xfce4-wavelan-plugin_0.6.3.bb | 2 +- .../weather/xfce4-weather-plugin_0.11.1.bb | 2 +- .../xkb/xfce4-xkb-plugin_0.8.2.bb | 2 +- .../archive/thunar-archive-plugin_0.5.2.bb | 2 +- .../packagegroup-xfce-extended.bb | 2 +- .../xfce4-panel/xfce4-panel_4.18.3.bb | 44 - .../xfce4-panel/xfce4-panel_4.18.5.bb | 44 + .../xfce4-power-manager_4.18.1.bb | 2 +- ...-fix-incompatible-pointer-type-error.patch | 38 + .../recipes-xfce/xfwm4/xfwm4_4.18.0.bb | 2 + .../docker-images/yocto-builder/Dockerfile | 2 +- sources/meta-raspberrypi/.subproject | 4 +- sources/meta-raspberrypi/README.md | 4 +- sources/meta-raspberrypi/SECURITY.md | 20 + sources/meta-raspberrypi/conf/layer.conf | 12 +- .../conf/machine/include/rpi-base.inc | 2 + .../machine/include/rpi-default-providers.inc | 4 - .../docs/extra-build-config.md | 16 +- .../meta-raspberrypi/docs/layer-contents.md | 1 + .../libcamera/libcamera_%.bbappend | 3 +- sources/meta-raspberrypi/kas-poky-rpi.yml | 12 +- .../recipes-bsp/armstubs/armstubs.bb | 16 +- .../recipes-bsp/bootfiles/rpi-config_git.bb | 14 +- .../gpio-shutdown/gpio-shutdown.bb | 4 +- .../rpi-u-boot-scr/rpi-u-boot-scr.bb | 5 +- .../recipes-bsp/u-boot/u-boot_%.bbappend | 2 +- .../recipes-core/psplash/psplash_%.bbappend | 2 +- .../recipes-core/udev/udev-rules-rpi.bb | 2 +- .../udev/udev-rules-udisks-rpi_1.0.bb | 2 +- .../raspi-utils/raspi-utils_git.bb | 41 +- .../{mesa-gl_%.bbappend => mesa-gl.bbappend} | 0 .../mesa/{mesa_%.bbappend => mesa.bbappend} | 0 .../0001-dont-build-clover-frontend.patch | 29 - ...itch-to-new-non-owned-TargetOptions-.patch | 39 - ...on-t-encode-build-path-into-binaries.patch | 110 - ...sdetects-64bit-atomics-on-mips-clang.patch | 24 - .../recipes-graphics/mesa/mesa_25.1.6.bb | 383 - .../vc-graphics/vc-graphics.inc | 4 +- .../wayland/wayland-protocols_1.45.bb | 27 - .../wayland/weston-init.bbappend | 10 - .../xserver-xf86-config_%.bbappend | 4 +- .../linux-firmware-rpidistro_git.bb | 6 + ...uire-buffer-when-src-pad-isn-t-activ.patch | 50 - .../0003-no-timeout-on-get-state.patch | 26 - ...handle-drain-requests-while-flushing.patch | 32 - ...omx_video_dec_set_format-if-there-s-.patch | 36 - .../gstreamer/gstreamer1.0-omx_%.bbappend | 12 - .../picamera-libs/picamera-libs.bb | 1 + ...nc-avoid-callee-preserved-vfp-regist.patch | 292 - .../files/0001-ffmpeg-5.1.4-rpi_24.patch | 24074 ++++++ .../0002-Fix-build-on-powerpc-and-ppc64.patch | 34 - ...c-remove-monowhite-from-apng-formats.patch | 30 - .../files/0004-ffmpeg-4.3.4-rpi_14.patch | 68341 ---------------- .../files/0005-fix-flags.diff | 22 - ...01-configure-setup-for-OE-core-usage.patch | 51 +- ...l_enc-update-dynamic-function-loader.patch | 111 - ...2003-libavcodec-fix-v4l2_req_devscan.patch | 45 - .../rpidistro-ffmpeg_4.3.4.bb | 198 - .../rpidistro-ffmpeg_5.1.4.bb | 192 + sources/poky/.subproject | 4 +- sources/poky/MAINTAINERS.md | 2 +- sources/poky/bitbake/bin/bitbake | 2 +- sources/poky/bitbake/bin/bitbake-hashclient | 61 +- sources/poky/bitbake/bin/bitbake-hashserv | 10 +- sources/poky/bitbake/bin/bitbake-layers | 14 +- sources/poky/bitbake/bin/bitbake-prserv | 26 +- sources/poky/bitbake/bin/bitbake-selftest | 2 + sources/poky/bitbake/doc/releases.rst | 16 +- sources/poky/bitbake/lib/bb/__init__.py | 22 +- .../poky/bitbake/lib/bb/asyncrpc/__init__.py | 2 +- .../poky/bitbake/lib/bb/asyncrpc/client.py | 103 +- sources/poky/bitbake/lib/bb/asyncrpc/serv.py | 37 +- sources/poky/bitbake/lib/bb/build.py | 19 +- sources/poky/bitbake/lib/bb/cache.py | 23 +- sources/poky/bitbake/lib/bb/codeparser.py | 50 +- sources/poky/bitbake/lib/bb/cooker.py | 34 +- sources/poky/bitbake/lib/bb/cookerdata.py | 13 +- sources/poky/bitbake/lib/bb/data_smart.py | 8 +- .../poky/bitbake/lib/bb/fetch2/__init__.py | 9 +- .../poky/bitbake/lib/bb/fetch2/clearcase.py | 4 +- sources/poky/bitbake/lib/bb/fetch2/crate.py | 9 + sources/poky/bitbake/lib/bb/fetch2/git.py | 80 +- sources/poky/bitbake/lib/bb/fetch2/gomod.py | 268 + sources/poky/bitbake/lib/bb/fetch2/npm.py | 7 +- sources/poky/bitbake/lib/bb/fetch2/npmsw.py | 5 +- sources/poky/bitbake/lib/bb/fetch2/svn.py | 3 + sources/poky/bitbake/lib/bb/fetch2/wget.py | 7 +- sources/poky/bitbake/lib/bb/parse/ast.py | 46 +- .../lib/bb/parse/parse_py/BBHandler.py | 43 +- sources/poky/bitbake/lib/bb/runqueue.py | 5 - sources/poky/bitbake/lib/bb/siggen.py | 78 +- .../poky/bitbake/lib/bb/tests/codeparser.py | 40 + sources/poky/bitbake/lib/bb/tests/fetch.py | 250 +- sources/poky/bitbake/lib/bb/tests/parse.py | 27 +- .../lib/bb/tests/runqueue-tests/recipes/g1.bb | 2 - .../lib/bb/tests/runqueue-tests/recipes/h1.bb | 0 sources/poky/bitbake/lib/bb/tests/runqueue.py | 11 +- .../poky/bitbake/lib/bb/ui/buildinfohelper.py | 5 +- sources/poky/bitbake/lib/bb/utils.py | 17 +- sources/poky/bitbake/lib/bblayers/action.py | 4 +- sources/poky/bitbake/lib/bs4/AUTHORS | 49 + sources/poky/bitbake/lib/bs4/AUTHORS.txt | 43 - sources/poky/bitbake/lib/bs4/CHANGELOG | 1839 + sources/poky/bitbake/lib/bs4/COPYING.txt | 26 - sources/poky/bitbake/lib/bs4/LICENSE | 31 + sources/poky/bitbake/lib/bs4/NEWS.txt | 1066 - sources/poky/bitbake/lib/bs4/__init__.py | 680 +- .../poky/bitbake/lib/bs4/builder/__init__.py | 382 +- .../poky/bitbake/lib/bs4/builder/_html5lib.py | 251 +- .../bitbake/lib/bs4/builder/_htmlparser.py | 433 +- sources/poky/bitbake/lib/bs4/builder/_lxml.py | 212 +- sources/poky/bitbake/lib/bs4/css.py | 274 + sources/poky/bitbake/lib/bs4/dammit.py | 411 +- sources/poky/bitbake/lib/bs4/diagnose.py | 83 +- sources/poky/bitbake/lib/bs4/element.py | 2219 +- sources/poky/bitbake/lib/bs4/formatter.py | 185 + sources/poky/bitbake/lib/bs4/testing.py | 686 - .../poky/bitbake/lib/bs4/tests/__init__.py | 1 - .../lib/bs4/tests/test_builder_registry.py | 147 - .../poky/bitbake/lib/bs4/tests/test_docs.py | 32 - .../bitbake/lib/bs4/tests/test_html5lib.py | 98 - .../bitbake/lib/bs4/tests/test_htmlparser.py | 31 - .../poky/bitbake/lib/bs4/tests/test_lxml.py | 70 - .../poky/bitbake/lib/bs4/tests/test_soup.py | 479 - .../poky/bitbake/lib/bs4/tests/test_tree.py | 2004 - sources/poky/bitbake/lib/hashserv/__init__.py | 6 +- sources/poky/bitbake/lib/hashserv/client.py | 92 +- sources/poky/bitbake/lib/hashserv/tests.py | 85 - sources/poky/bitbake/lib/prserv/__init__.py | 97 +- sources/poky/bitbake/lib/prserv/client.py | 15 +- sources/poky/bitbake/lib/prserv/db.py | 452 +- sources/poky/bitbake/lib/prserv/serv.py | 140 +- sources/poky/bitbake/lib/prserv/tests.py | 388 + .../lib/toaster/orm/fixtures/gen_fixtures.py | 11 +- .../lib/toaster/orm/fixtures/oe-core.xml | 36 +- .../bitbake/lib/toaster/orm/fixtures/poky.xml | 54 +- .../lib/toaster/tests/builds/buildtest.py | 2 +- .../functional/test_create_new_project.py | 22 +- .../tests/functional/test_project_page.py | 2 +- sources/poky/documentation/README | 50 +- .../brief-yoctoprojectqs/index.rst | 8 +- sources/poky/documentation/bsp-guide/bsp.rst | 54 +- sources/poky/documentation/conf.py | 19 - .../contributor-guide/recipe-style-guide.rst | 12 + .../contributor-guide/submit-changes.rst | 32 - .../documentation/dev-manual/debugging.rst | 2 +- .../documentation/dev-manual/new-recipe.rst | 2 +- .../poky/documentation/dev-manual/sbom.rst | 15 +- .../poky/documentation/dev-manual/start.rst | 12 +- .../dev-manual/upgrading-recipes.rst | 2 +- .../dev-manual/vulnerabilities.rst | 4 + .../poky/documentation/kernel-dev/common.rst | 14 +- .../poky/documentation/kernel-dev/intro.rst | 2 +- .../documentation/migration-guides/index.rst | 1 + .../migration-guides/migration-5.1.rst | 218 + .../migration-guides/release-4.0.rst | 3 - .../migration-guides/release-5.0.rst | 3 - .../migration-guides/release-5.1.rst | 13 + .../migration-guides/release-notes-4.0.18.rst | 2 +- .../migration-guides/release-notes-4.0.26.rst | 263 - .../migration-guides/release-notes-4.0.27.rst | 153 - .../migration-guides/release-notes-4.0.28.rst | 224 - .../migration-guides/release-notes-4.2.rst | 2 +- .../migration-guides/release-notes-4.3.rst | 2 +- .../migration-guides/release-notes-5.0.10.rst | 208 - .../migration-guides/release-notes-5.0.11.rst | 219 - .../migration-guides/release-notes-5.0.9.rst | 206 - .../migration-guides/release-notes-5.1.1.rst | 289 + .../migration-guides/release-notes-5.1.2.rst | 312 + .../migration-guides/release-notes-5.1.3.rst | 160 + .../migration-guides/release-notes-5.1.4.rst | 137 + .../migration-guides/release-notes-5.1.rst | 1020 + .../overview-manual/concepts.rst | 54 +- .../analysis-for-package-splitting.png | Bin 68434 -> 0 bytes .../configuration-compile-autoreconf.png | Bin 70877 -> 0 bytes .../overview-manual/figures/patching.png | Bin 57414 -> 0 bytes .../figures/source-fetching.png | Bin 46896 -> 0 bytes .../svg/analysis-for-package-splitting.svg | 1862 + .../svg/configuration-compile-autoreconf.svg | 1497 + .../overview-manual/svg/patching.svg | 1224 + .../overview-manual/svg/source-fetching.svg | 1094 + sources/poky/documentation/poky.yaml.in | 12 +- .../poky/documentation/ref-manual/classes.rst | 88 +- .../ref-manual/devtool-reference.rst | 2 +- .../documentation/ref-manual/features.rst | 5 +- .../documentation/ref-manual/structure.rst | 2 +- .../documentation/ref-manual/svg/releases.svg | 518 +- .../ref-manual/system-requirements.rst | 8 +- .../poky/documentation/ref-manual/tasks.rst | 13 +- .../poky/documentation/ref-manual/terms.rst | 2 +- .../documentation/ref-manual/variables.rst | 373 +- .../documentation/sdk-manual/extensible.rst | 4 +- sources/poky/documentation/set_versions.py | 8 +- .../poky/documentation/test-manual/intro.rst | 16 +- .../toaster-manual/reference.rst | 6 +- .../meta-poky/classes/poky-sanity.bbclass | 6 +- .../poky/meta-poky/conf/distro/poky-tiny.conf | 7 +- sources/poky/meta-poky/conf/distro/poky.conf | 18 +- sources/poky/meta-poky/conf/layer.conf | 2 +- .../conf/templates/default/local.conf.sample | 5 +- .../busybox/busybox/poky-tiny/defconfig | 4 +- .../recipes-core/tiny-init/tiny-init.bb | 7 +- .../classes/test-mkimage-wrapper.bbclass | 19 - sources/poky/meta-selftest/conf/layer.conf | 2 +- .../python/python3-guessing-game-crates.inc | 82 + .../python3-guessing-game-crates.inc.upgraded | 88 + .../python/python3-guessing-game_git.bb | 19 + .../python3-guessing-game_git.bb.upgraded | 19 + .../bbclasses/systemd-and-sysvinit.bb | 17 + .../recipes-test/bbclasses/systemd-only.bb | 12 + .../recipes-test/cpp/cpp-example.inc | 3 +- .../devtool/devtool-test-localonly.bb | 3 + .../fortran/fortran-helloworld.bb | 5 +- .../selftest-recipetool-appendfile.bb | 16 +- .../recipeutils/recipeutils-test_1.2.bb | 5 +- .../selftest-chown/selftest-chown.bb | 3 +- .../selftest-hardlink/selftest-hardlink.bb | 5 +- .../selftest-hello/selftest-hello_1.0.bb | 5 +- .../selftest-users/acreategroup.bb | 3 +- .../selftest-users/bcreategroup.bb | 3 +- .../selftest-users/ccreategroup.bb | 3 +- .../selftest-users/creategroup1.bb | 3 +- .../selftest-users/creategroup2.bb | 3 +- .../selftest-users/dcreategroup.bb | 3 +- .../selftest-users/useraddbadtask.bb | 3 +- .../recipes-test/testrpm/testrpm_0.0.1.bb | 3 + .../wrapper/cmdline-shebang-wrapper-test.bb | 2 +- sources/poky/meta-skeleton/conf/layer.conf | 2 +- .../recipes-kernel/hello-mod/hello-mod_0.1.bb | 3 +- .../hello-single/hello_1.0.bb | 3 +- .../recipes-skeleton/service/service_0.1.bb | 11 +- .../useradd/useradd-example.bb | 3 +- sources/poky/meta-yocto-bsp/conf/layer.conf | 2 +- .../conf/machine/genericarm64.conf | 4 + .../lib/oeqa/selftest/cases/systemd_boot.py | 3 +- sources/poky/meta/classes-global/base.bbclass | 40 +- .../poky/meta/classes-global/insane.bbclass | 356 +- .../poky/meta/classes-global/license.bbclass | 8 +- .../poky/meta/classes-global/mirrors.bbclass | 2 +- .../poky/meta/classes-global/package.bbclass | 2 +- .../meta/classes-global/package_rpm.bbclass | 39 +- .../poky/meta/classes-global/retain.bbclass | 182 + .../poky/meta/classes-global/sanity.bbclass | 2 - .../poky/meta/classes-global/sstate.bbclass | 62 +- .../poky/meta/classes-global/staging.bbclass | 9 +- .../poky/meta/classes-global/utils.bbclass | 4 +- .../meta/classes-recipe/autotools.bbclass | 11 +- .../classes-recipe/baremetal-image.bbclass | 38 +- .../cargo-update-recipe-crates.bbclass | 2 + .../meta/classes-recipe/cargo_common.bbclass | 6 +- .../poky/meta/classes-recipe/cmake.bbclass | 2 +- sources/poky/meta/classes-recipe/cml1.bbclass | 7 + .../create-spdx-image-3.0.bbclass | 79 + .../create-spdx-sdk-3.0.bbclass | 72 + .../classes-recipe/cross-canadian.bbclass | 2 +- .../meta/classes-recipe/devicetree.bbclass | 3 +- sources/poky/meta/classes-recipe/go.bbclass | 16 +- .../poky/meta/classes-recipe/image.bbclass | 58 + .../meta/classes-recipe/image_types.bbclass | 2 + .../classes-recipe/image_types_wic.bbclass | 1 + .../meta/classes-recipe/kernel-arch.bbclass | 8 +- .../classes-recipe/kernel-fitimage.bbclass | 55 +- .../meta/classes-recipe/kernel-yocto.bbclass | 51 +- .../poky/meta/classes-recipe/kernel.bbclass | 21 +- .../meta/classes-recipe/license_image.bbclass | 2 +- .../poky/meta/classes-recipe/module.bbclass | 1 - .../classes-recipe/multilib_script.bbclass | 18 +- .../poky/meta/classes-recipe/native.bbclass | 5 - .../meta/classes-recipe/nativesdk.bbclass | 5 - .../poky/meta/classes-recipe/nospdx.bbclass | 13 + sources/poky/meta/classes-recipe/npm.bbclass | 4 +- .../classes-recipe/populate_sdk_base.bbclass | 8 +- .../classes-recipe/populate_sdk_ext.bbclass | 10 - .../meta/classes-recipe/ptest-perl.bbclass | 2 +- .../poky/meta/classes-recipe/ptest.bbclass | 6 +- sources/poky/meta/classes-recipe/pypi.bbclass | 9 +- .../classes-recipe/python_flit_core.bbclass | 2 +- .../meta/classes-recipe/rust-common.bbclass | 2 +- .../classes-recipe/rust-target-config.bbclass | 7 +- .../poky/meta/classes-recipe/scons.bbclass | 4 +- .../meta/classes-recipe/setuptools3.bbclass | 14 + .../poky/meta/classes-recipe/siteinfo.bbclass | 16 +- .../poky/meta/classes-recipe/systemd.bbclass | 45 +- .../meta/classes-recipe/testexport.bbclass | 9 +- .../meta/classes-recipe/testimage.bbclass | 8 +- .../classes-recipe/toolchain-scripts.bbclass | 16 +- .../meta/classes-recipe/uboot-config.bbclass | 15 +- .../meta/classes-recipe/uboot-sign.bbclass | 78 +- sources/poky/meta/classes/archiver.bbclass | 2 +- .../poky/meta/classes/buildhistory.bbclass | 14 +- .../poky/meta/classes/create-spdx-2.2.bbclass | 387 +- .../poky/meta/classes/create-spdx-3.0.bbclass | 192 + sources/poky/meta/classes/create-spdx.bbclass | 2 +- sources/poky/meta/classes/cve-check.bbclass | 311 +- .../poky/meta/classes/devtool-source.bbclass | 74 +- sources/poky/meta/classes/siteconfig.bbclass | 39 - sources/poky/meta/classes/spdx-common.bbclass | 69 + sources/poky/meta/classes/vex.bbclass | 311 + sources/poky/meta/conf/abi_version.conf | 2 +- sources/poky/meta/conf/bitbake.conf | 39 +- sources/poky/meta/conf/ccache.conf | 6 - sources/poky/meta/conf/cve-check-map.conf | 9 + .../poky/meta/conf/distro/defaultsetup.conf | 4 - .../distro/include/cve-extra-exclusions.inc | 24 +- .../meta/conf/distro/include/distro_alias.inc | 4 - .../meta/conf/distro/include/maintainers.inc | 39 +- .../distro/include/ptest-packagelists.inc | 25 +- .../conf/distro/include/tclibc-newlib.inc | 6 +- .../conf/distro/include/tclibc-picolibc.inc | 40 + .../conf/distro/include/tcmode-default.inc | 14 +- .../poky/meta/conf/distro/include/time64.inc | 18 +- .../distro/include/yocto-space-optimize.inc | 8 + .../conf/distro/include/yocto-uninative.inc | 10 +- sources/poky/meta/conf/documentation.conf | 8 +- sources/poky/meta/conf/image-fitimage.conf | 53 - sources/poky/meta/conf/layer.conf | 4 +- .../include/arm/armv8r/tune-cortexr52.inc | 5 +- .../conf/machine/include/riscv/arch-riscv.inc | 1 + sources/poky/meta/conf/multilib.conf | 2 +- sources/poky/meta/conf/sanity.conf | 2 +- .../meta/files/common-licenses/3D-Slicer-1.0 | 190 + .../meta/files/common-licenses/AMD-newlib | 11 + .../meta/files/common-licenses/AML-glslang | 41 + .../common-licenses/ASWF-Digital-Assets-1.0 | 17 + .../common-licenses/ASWF-Digital-Assets-1.1 | 17 + .../meta/files/common-licenses/AdaCore-doc | 1 + .../common-licenses/Adobe-Display-PostScript | 30 + .../meta/files/common-licenses/Adobe-Utopia | 12 + .../poky/meta/files/common-licenses/App-s2p | 5 + .../meta/files/common-licenses/Arphic-1999 | 58 + .../files/common-licenses/BSD-2-Clause-Darwin | 28 + .../common-licenses/BSD-2-Clause-first-lines | 28 + .../files/common-licenses/BSD-3-Clause-HP | 23 + .../files/common-licenses/BSD-3-Clause-Sun | 29 + .../files/common-licenses/BSD-3-Clause-acpica | 26 + .../files/common-licenses/BSD-3-Clause-flex | 42 + .../meta/files/common-licenses/BSD-4.3RENO | 9 + .../meta/files/common-licenses/BSD-4.3TAHOE | 11 + .../BSD-Advertising-Acknowledgement | 37 + .../BSD-Attribution-HPND-disclaimer | 37 + .../common-licenses/BSD-Inferno-Nettverk | 42 + .../common-licenses/BSD-Source-beginning-file | 23 + .../meta/files/common-licenses/BSD-Systemics | 39 + .../common-licenses/BSD-Systemics-W3Works | 62 + .../poky/meta/files/common-licenses/Baekmuk | 9 + .../files/common-licenses/Bitstream-Charter | 9 + .../meta/files/common-licenses/Bitstream-Vera | 15 + .../poky/meta/files/common-licenses/Boehm-GC | 12 + .../common-licenses/Brian-Gladman-2-Clause | 17 + .../common-licenses/Brian-Gladman-3-Clause | 26 + .../meta/files/common-licenses/CC-BY-3.0-AU | 136 + .../meta/files/common-licenses/CC-BY-3.0-IGO | 101 + .../files/common-licenses/CC-BY-NC-SA-2.0-DE | 85 + .../files/common-licenses/CC-BY-SA-3.0-IGO | 107 + .../poky/meta/files/common-licenses/CFITSIO | 7 + .../poky/meta/files/common-licenses/CMU-Mach | 22 + .../meta/files/common-licenses/CMU-Mach-nodoc | 11 + .../poky/meta/files/common-licenses/COIL-1.0 | 30 + .../files/common-licenses/Caldera-no-preamble | 35 + .../poky/meta/files/common-licenses/Catharon | 121 + sources/poky/meta/files/common-licenses/Clips | 15 + .../files/common-licenses/Community-Spec-1.0 | 293 + .../common-licenses/Cornell-Lossless-JPEG | 20 + .../poky/meta/files/common-licenses/Cronyx | 11 + .../meta/files/common-licenses/DEC-3-Clause | 28 + .../meta/files/common-licenses/DL-DE-BY-2.0 | 45 + .../meta/files/common-licenses/DL-DE-ZERO-2.0 | 25 + .../poky/meta/files/common-licenses/DRL-1.1 | 17 + .../meta/files/common-licenses/Elastic-2.0 | 93 + sources/poky/meta/files/common-licenses/FBM | 6 + .../poky/meta/files/common-licenses/FDK-AAC | 79 + .../FSFAP-no-warranty-disclaimer | 5 + .../poky/meta/files/common-licenses/FSFULLRWD | 11 + .../files/common-licenses/Ferguson-Twofish | 15 + .../poky/meta/files/common-licenses/Furuseth | 13 + .../poky/meta/files/common-licenses/GCR-docs | 30 + .../meta/files/common-licenses/Graphics-Gems | 5 + .../poky/meta/files/common-licenses/Gutmann | 2 + .../poky/meta/files/common-licenses/HP-1986 | 10 + .../poky/meta/files/common-licenses/HP-1989 | 16 + .../poky/meta/files/common-licenses/HPND-DEC | 22 + .../common-licenses/HPND-Fenneberg-Livingston | 13 + .../files/common-licenses/HPND-INRIA-IMAG | 9 + .../meta/files/common-licenses/HPND-Intel | 25 + .../files/common-licenses/HPND-Kevlin-Henney | 10 + .../files/common-licenses/HPND-MIT-disclaimer | 18 + .../files/common-licenses/HPND-Markus-Kuhn | 3 + .../meta/files/common-licenses/HPND-Pbmplus | 8 + .../poky/meta/files/common-licenses/HPND-UC | 8 + .../files/common-licenses/HPND-UC-export-US | 10 + .../poky/meta/files/common-licenses/HPND-doc | 8 + .../meta/files/common-licenses/HPND-doc-sell | 9 + .../meta/files/common-licenses/HPND-export-US | 5 + .../HPND-export-US-acknowledgement | 22 + .../common-licenses/HPND-export-US-modify | 24 + .../files/common-licenses/HPND-export2-US | 21 + .../HPND-merchantability-variant | 9 + .../HPND-sell-MIT-disclaimer-xserver | 12 + .../files/common-licenses/HPND-sell-regexpr | 9 + .../HPND-sell-variant-MIT-disclaimer | 20 + .../HPND-sell-variant-MIT-disclaimer-rev | 15 + .../common-licenses/IEC-Code-Components-EULA | 37 + .../poky/meta/files/common-licenses/IJG-short | 35 + .../meta/files/common-licenses/ISC-Veillard | 9 + .../meta/files/common-licenses/Inner-Net-2.0 | 34 + .../poky/meta/files/common-licenses/JPL-image | 21 + sources/poky/meta/files/common-licenses/Jam | 5 + .../poky/meta/files/common-licenses/Kastrup | 3 + .../poky/meta/files/common-licenses/Kazlib | 4 + .../meta/files/common-licenses/Knuth-CTAN | 5 + sources/poky/meta/files/common-licenses/LOOP | 44 + .../meta/files/common-licenses/LPD-document | 8 + .../common-licenses/LZMA-SDK-9.11-to-9.20 | 8 + .../meta/files/common-licenses/LZMA-SDK-9.22 | 15 + .../common-licenses/Latex2e-translated-notice | 26 + .../common-licenses/Linux-man-pages-1-para | 4 + .../common-licenses/Linux-man-pages-copyleft | 21 + .../Linux-man-pages-copyleft-2-para | 8 + .../Linux-man-pages-copyleft-var | 16 + .../files/common-licenses/Lucida-Bitmap-Fonts | 53 + .../meta/files/common-licenses/MIT-Festival | 22 + .../files/common-licenses/MIT-Khronos-old | 23 + .../poky/meta/files/common-licenses/MIT-Wu | 28 + .../meta/files/common-licenses/MIT-testregex | 17 + .../poky/meta/files/common-licenses/MMIXware | 17 + .../poky/meta/files/common-licenses/MPEG-SSG | 25 + .../poky/meta/files/common-licenses/MS-LPL | 24 + .../files/common-licenses/Mackerras-3-Clause | 25 + .../Mackerras-3-Clause-acknowledgment | 25 + .../files/common-licenses/Martin-Birgmeier | 5 + .../files/common-licenses/McPhee-slideshow | 6 + .../meta/files/common-licenses/Minpack} | 0 .../poky/meta/files/common-licenses/NCBI-PD | 19 + sources/poky/meta/files/common-licenses/NCL | 32 + .../poky/meta/files/common-licenses/NICTA-1.0 | 61 + .../meta/files/common-licenses/NIST-Software | 28 + sources/poky/meta/files/common-licenses/OAR | 12 + sources/poky/meta/files/common-licenses/OFFIS | 22 + .../poky/meta/files/common-licenses/OLFL-1.3 | 220 + .../meta/files/common-licenses/OPL-UK-3.0 | 114 + .../meta/files/common-licenses/OpenPBS-2.3 | 77 + .../files/common-licenses/OpenSSL-standalone | 50 + .../meta/files/common-licenses/OpenVision | 33 + sources/poky/meta/files/common-licenses/PADL | 6 + sources/poky/meta/files/common-licenses/PPL | 96 + sources/poky/meta/files/common-licenses/Pixar | 175 + .../meta/files/common-licenses/Python-2.0.1 | 193 + .../files/common-licenses/QPL-1.0-INRIA-2004 | 102 + .../meta/files/common-licenses/SAX-PD-2.0 | 10 + .../meta/files/common-licenses/SGI-OpenGL | 34 + sources/poky/meta/files/common-licenses/SGP4 | 1 + sources/poky/meta/files/common-licenses/SL | 4 + .../files/common-licenses/SSLeay-standalone | 58 + .../meta/files/common-licenses/SchemeReport | 3 + .../poky/meta/files/common-licenses/Soundex | 9 + .../poky/meta/files/common-licenses/Sun-PPP | 13 + .../meta/files/common-licenses/Sun-PPP-2000 | 14 + .../poky/meta/files/common-licenses/SunPro | 6 + .../poky/meta/files/common-licenses/Symlinks | 10 + .../poky/meta/files/common-licenses/TGPPL-1.0 | 181 + sources/poky/meta/files/common-licenses/TPDL | 2 + .../poky/meta/files/common-licenses/TPL-1.0 | 475 + sources/poky/meta/files/common-licenses/TTWL | 8 + sources/poky/meta/files/common-licenses/TTYP0 | 30 + .../meta/files/common-licenses/TermReadKey | 1 + sources/poky/meta/files/common-licenses/UCAR | 32 + .../meta/files/common-licenses/UMich-Merit | 19 + .../poky/meta/files/common-licenses/URT-RLE | 15 + .../meta/files/common-licenses/Unicode-3.0 | 39 + .../poky/meta/files/common-licenses/UnixCrypt | 6 + .../files/common-licenses/Widget-Workshop | 19 + .../X11-distribute-modifications-variant | 25 + .../meta/files/common-licenses/Xdebug-1.03 | 60 + sources/poky/meta/files/common-licenses/Xfig | 7 + sources/poky/meta/files/common-licenses/Zeeff | 3 + .../poky/meta/files/common-licenses/any-OSI | 3 + .../common-licenses/bcrypt-Solar-Designer | 11 + .../poky/meta/files/common-licenses/check-cvs | 2 + .../poky/meta/files/common-licenses/checkmk | 9 + .../poky/meta/files/common-licenses/cve-tou | 16 + sources/poky/meta/files/common-licenses/dtoa | 14 + sources/poky/meta/files/common-licenses/fwlw | 5 + .../poky/meta/files/common-licenses/gtkbook | 6 + .../poky/meta/files/common-licenses/hdparm | 9 + .../common-licenses/libutil-David-Nugent | 15 + sources/poky/meta/files/common-licenses/lsof | 26 + sources/poky/meta/files/common-licenses/magaz | 4 + .../poky/meta/files/common-licenses/mailprio | 9 + .../poky/meta/files/common-licenses/metamail | 12 + .../meta/files/common-licenses/mpi-permissive | 15 + sources/poky/meta/files/common-licenses/mplus | 6 + .../poky/meta/files/common-licenses/pnmstitch | 23 + .../meta/files/common-licenses/python-ldap | 10 + sources/poky/meta/files/common-licenses/radvd | 37 + .../poky/meta/files/common-licenses/snprintf | 3 + .../meta/files/common-licenses/softSurfer | 6 + .../meta/files/common-licenses/ssh-keyscan | 5 + .../poky/meta/files/common-licenses/swrule | 1 + .../meta/files/common-licenses/threeparttable | 3 + sources/poky/meta/files/common-licenses/ulem | 4 + sources/poky/meta/files/common-licenses/w3m | 11 + .../common-licenses/xkeyboard-config-Zinoviev | 15 + sources/poky/meta/files/common-licenses/xlock | 14 + sources/poky/meta/files/common-licenses/xzoom | 12 + .../meta/files/fs-perms-persistent-log.txt | 65 - .../poky/meta/files/fs-perms-volatile-log.txt | 34 + .../poky/meta/files/fs-perms-volatile-tmp.txt | 38 + sources/poky/meta/files/fs-perms.txt | 3 - .../files/overlayfs-create-dirs.service.in | 5 +- .../poky/meta/files/overlayfs-unit.mount.in | 2 +- sources/poky/meta/files/spdx-licenses.json | 10510 ++- .../poky/meta/files/toolchain-shar-extract.sh | 5 - sources/poky/meta/lib/bblayers/machines.py | 37 + sources/poky/meta/lib/bblayers/makesetup.py | 9 +- .../bblayers/setupwriters/oe-setup-layers.py | 5 + sources/poky/meta/lib/oe/__init__.py | 6 +- sources/poky/meta/lib/oe/bootfiles.py | 57 + sources/poky/meta/lib/oe/buildcfg.py | 2 +- sources/poky/meta/lib/oe/copy_buildsystem.py | 10 +- sources/poky/meta/lib/oe/cve_check.py | 72 +- sources/poky/meta/lib/oe/package.py | 74 +- .../lib/oe/package_manager/common_deb_ipk.py | 97 + .../lib/oe/package_manager/deb/__init__.py | 85 +- .../lib/oe/package_manager/ipk/__init__.py | 93 +- sources/poky/meta/lib/oe/patch.py | 22 +- sources/poky/meta/lib/oe/qa.py | 22 +- sources/poky/meta/lib/oe/recipeutils.py | 64 +- sources/poky/meta/lib/oe/reproducible.py | 21 +- sources/poky/meta/lib/oe/sbom30.py | 1121 + sources/poky/meta/lib/oe/spdx.py | 42 - sources/poky/meta/lib/oe/spdx30.py | 6020 ++ sources/poky/meta/lib/oe/spdx30_tasks.py | 1243 + sources/poky/meta/lib/oe/spdx_common.py | 227 + sources/poky/meta/lib/oe/sstatesig.py | 54 +- .../poky/meta/lib/oeqa/core/target/serial.py | 315 + sources/poky/meta/lib/oeqa/core/target/ssh.py | 44 +- .../poky/meta/lib/oeqa/core/tests/common.py | 1 - sources/poky/meta/lib/oeqa/manual/crops.json | 294 - .../meta/lib/oeqa/manual/eclipse-plugin.json | 322 - .../poky/meta/lib/oeqa/runtime/cases/ltp.py | 2 +- .../cases/parselogs-ignores-mipsarch.txt | 6 + .../cases/parselogs-ignores-qemuall.txt | 8 + .../meta/lib/oeqa/runtime/cases/parselogs.py | 2 +- sources/poky/meta/lib/oeqa/runtime/context.py | 12 +- .../poky/meta/lib/oeqa/sdk/cases/assimp.py | 49 - .../poky/meta/lib/oeqa/sdk/cases/autotools.py | 42 + .../poky/meta/lib/oeqa/sdk/cases/buildcpio.py | 42 - .../meta/lib/oeqa/sdk/cases/buildepoxy.py | 48 - .../lib/oeqa/sdk/cases/buildgalculator.py | 50 - .../poky/meta/lib/oeqa/sdk/cases/buildlzip.py | 44 - sources/poky/meta/lib/oeqa/sdk/cases/cmake.py | 49 + sources/poky/meta/lib/oeqa/sdk/cases/gtk3.py | 50 + sources/poky/meta/lib/oeqa/sdk/cases/kmod.py | 41 + .../poky/meta/lib/oeqa/sdk/cases/makefile.py | 45 + .../poky/meta/lib/oeqa/sdk/cases/maturin.py | 1 - sources/poky/meta/lib/oeqa/sdk/cases/meson.py | 48 + .../poky/meta/lib/oeqa/sdk/cases/python.py | 2 +- sources/poky/meta/lib/oeqa/sdk/cases/rust.py | 1 - sources/poky/meta/lib/oeqa/sdk/context.py | 12 +- .../meta/lib/oeqa/selftest/cases/bbclasses.py | 106 + .../meta/lib/oeqa/selftest/cases/binutils.py | 2 +- .../lib/oeqa/selftest/cases/buildoptions.py | 10 +- .../meta/lib/oeqa/selftest/cases/cve_check.py | 51 +- .../meta/lib/oeqa/selftest/cases/devtool.py | 92 +- .../lib/oeqa/selftest/cases/distrodata.py | 20 +- .../meta/lib/oeqa/selftest/cases/fitimage.py | 264 +- .../poky/meta/lib/oeqa/selftest/cases/gcc.py | 4 +- .../lib/oeqa/selftest/cases/imagefeatures.py | 15 +- .../oeqa/selftest/cases/incompatible_lic.py | 6 +- .../lib/oeqa/selftest/cases/layerappend.py | 2 +- .../meta/lib/oeqa/selftest/cases/locales.py | 2 +- .../lib/oeqa/selftest/cases/minidebuginfo.py | 16 + .../meta/lib/oeqa/selftest/cases/oescripts.py | 2 +- .../meta/lib/oeqa/selftest/cases/picolibc.py | 18 + .../lib/oeqa/selftest/cases/recipetool.py | 21 +- .../lib/oeqa/selftest/cases/recipeutils.py | 4 +- .../lib/oeqa/selftest/cases/reproducible.py | 10 +- .../meta/lib/oeqa/selftest/cases/retain.py | 241 + .../lib/oeqa/selftest/cases/runtime_test.py | 5 +- .../poky/meta/lib/oeqa/selftest/cases/rust.py | 121 +- .../poky/meta/lib/oeqa/selftest/cases/spdx.py | 134 +- .../lib/oeqa/selftest/cases/sstatetests.py | 53 +- .../poky/meta/lib/oeqa/selftest/context.py | 5 +- sources/poky/meta/lib/oeqa/utils/__init__.py | 8 +- sources/poky/meta/lib/oeqa/utils/commands.py | 18 +- .../poky/meta/lib/oeqa/utils/gitarchive.py | 2 +- .../poky/meta/lib/oeqa/utils/postactions.py | 60 +- sources/poky/meta/lib/patchtest/patch.py | 19 - sources/poky/meta/lib/patchtest/repo.py | 88 +- .../poky/meta/lib/patchtest/requirements.txt | 1 + .../files/TestMbox.test_author_valid.1.fail | 57 +- .../files/TestMbox.test_author_valid.1.pass | 56 +- .../files/TestMbox.test_author_valid.2.fail | 56 +- .../files/TestMbox.test_author_valid.2.pass | 56 +- .../TestMbox.test_bugzilla_entry_format.fail | 78 +- .../TestMbox.test_bugzilla_entry_format.pass | 78 +- ...TestMbox.test_commit_message_presence.fail | 68 +- ...TestMbox.test_commit_message_presence.pass | 72 +- .../files/TestMbox.test_mbox_format.1.fail | 36 - .../files/TestMbox.test_mbox_format.2.fail | 35 - .../files/TestMbox.test_mbox_format.fail | 66 + .../files/TestMbox.test_mbox_format.pass | 79 +- .../TestMbox.test_series_merge_on_head.1.skip | 2 +- .../files/TestMbox.test_shortlog_format.fail | 53 +- .../files/TestMbox.test_shortlog_format.pass | 53 +- .../files/TestMbox.test_shortlog_length.fail | 53 +- .../files/TestMbox.test_shortlog_length.pass | 53 +- ...estMbox.test_signed_off_by_presence.1.fail | 60 +- ...estMbox.test_signed_off_by_presence.2.fail | 62 +- .../TestMbox.test_signed_off_by_presence.pass | 60 +- .../TestMetadata.test_cve_check_ignore.fail | 25 +- .../TestMetadata.test_cve_check_ignore.pass | 26 +- ...c_files_chksum_modified_not_mentioned.fail | 23 +- ...c_files_chksum_modified_not_mentioned.pass | 25 +- ...tadata.test_lic_files_chksum_presence.fail | 65 +- ...tadata.test_lic_files_chksum_presence.pass | 65 +- .../TestMetadata.test_src_uri_left_files.fail | 23 +- .../TestMetadata.test_src_uri_left_files.pass | 25 +- .../TestMetadata.test_summary_presence.fail | 64 +- .../TestMetadata.test_summary_presence.pass | 68 +- .../files/TestPatch.test_cve_tag_format.fail | 57 +- .../files/TestPatch.test_cve_tag_format.pass | 53 +- ...TestPatch.test_signed_off_by_presence.fail | 60 +- ...TestPatch.test_signed_off_by_presence.pass | 60 +- .../meta/lib/patchtest/tests/test_mbox.py | 8 +- sources/poky/meta/lib/patchtest/utils.py | 129 +- sources/poky/meta/recipes-bsp/acpid/acpid.inc | 4 +- .../meta/recipes-bsp/alsa-state/alsa-state.bb | 11 +- .../recipes-bsp/formfactor/formfactor_0.0.bb | 4 +- ...x-parallel-make-failure-for-archives.patch | 41 + ...0001-riscv64-adjust-type-definitions.patch | 34 - .../0001-riscv64-ignore-unknown-relocs.patch | 32 - ...0002-Do-not-treat-warnings-as-errors.patch | 32 + .../gnu-efi-3.0.9-fix-clang-build.patch | 24 - .../gnu-efi/gnu-efi/no-werror.patch | 19 - .../gnu-efi/parallel-make-archives.patch | 39 - .../recipes-bsp/gnu-efi/gnu-efi_3.0.17.bb | 75 - .../recipes-bsp/gnu-efi/gnu-efi_3.0.18.bb | 72 + ...ath-sse-as-well-when-SSE-is-disabled.patch | 44 - .../recipes-bsp/grub/grub-bootconf_1.00.bb | 3 +- .../meta/recipes-bsp/grub/grub-efi_2.12.bb | 2 +- sources/poky/meta/recipes-bsp/grub/grub2.inc | 1 - .../meta/recipes-bsp/keymaps/keymaps_1.0.bb | 5 +- .../meta/recipes-bsp/lrzsz/lrzsz_0.12.20.bb | 6 +- .../meta/recipes-bsp/opensbi/opensbi_1.4.bb | 47 - .../meta/recipes-bsp/opensbi/opensbi_1.5.1.bb | 48 + .../pciutils/pciutils/configure.patch | 90 - .../recipes-bsp/pciutils/pciutils_3.11.1.bb | 64 - .../recipes-bsp/pciutils/pciutils_3.13.0.bb | 52 + .../u-boot/files/CVE-2024-57254.patch | 47 - .../u-boot/files/CVE-2024-57255.patch | 53 - .../u-boot/files/CVE-2024-57256.patch | 51 - .../u-boot/files/CVE-2024-57257.patch | 227 - .../u-boot/files/CVE-2024-57258-1.patch | 47 - .../u-boot/files/CVE-2024-57258-2.patch | 43 - .../u-boot/files/CVE-2024-57258-3.patch | 40 - .../u-boot/files/CVE-2024-57259.patch | 41 - .../meta/recipes-bsp/u-boot/u-boot-common.inc | 13 +- ...ols_2024.01.bb => u-boot-tools_2024.07.bb} | 0 .../poky/meta/recipes-bsp/u-boot/u-boot.inc | 102 +- .../{u-boot_2024.01.bb => u-boot_2024.07.bb} | 0 .../poky/meta/recipes-bsp/usbinit/usbinit.bb | 24 - .../recipes-bsp/usbinit/usbinit/COPYING.GPL | 339 - .../recipes-bsp/usbinit/usbinit/usb-gether | 23 - .../recipes-connectivity/avahi/avahi_0.8.bb | 5 +- .../avahi/files/CVE-2024-52616.patch | 104 - .../recipes-connectivity/bind/bind_9.18.33.bb | 113 - .../recipes-connectivity/bind/bind_9.20.1.bb | 113 + .../recipes-connectivity/bluez5/bluez5.inc | 44 +- ...d-without-systemd-in-the-user-sessio.patch | 56 - ...U-basename-compatible-implementation.patch | 147 + ...ix-up-address-type-when-loading-keys.patch | 52 - ...ove-local-basename-into-utility-file.patch | 114 + .../0001-test-gatt-Fix-hung-issue.patch | 7 +- ...et-for-building-tests-without-runnin.patch | 7 +- ...ndex-option-for-non-interactive-mode.patch | 29 - .../bluez5/bluez5_5.72.bb | 75 - .../bluez5/bluez5_5.78.bb | 69 + .../connman/connman-conf.bb | 3 +- .../connman/connman-gnome_0.7.bb | 2 +- .../recipes-connectivity/connman/connman.inc | 2 +- ...ve-musl-does-not-implement-res_ninit.patch | 107 +- .../connman/connman/CVE-2025-32366.patch | 41 - .../connman/connman/CVE-2025-32743.patch | 48 - .../connman/connman/connman | 2 +- .../connman/connman_1.42.bb | 4 +- .../dhcpcd/dhcpcd_10.0.10.bb | 61 + .../dhcpcd/dhcpcd_10.0.6.bb | 61 - ...-conflict-error-when-enable-multilib.patch | 7 +- ...e-INCLUDEDIR-to-prevent-build-issues.patch | 9 +- .../inetutils/inetutils_2.5.bb | 10 +- ...nk.h-add-missing-include-for-htobe64.patch | 24 + .../iproute2/iproute2_6.10.0.bb | 111 + .../iproute2/iproute2_6.7.0.bb | 104 - .../meta/recipes-connectivity/iw/iw_6.7.bb | 31 - .../meta/recipes-connectivity/iw/iw_6.9.bb | 31 + ...me-NameString-with-vector-of-uint8_t.patch | 90 + ...po-in-Name-Name-append-to-ndata_-not.patch | 36 + .../kea/files/fix_pid_keactrl.patch | 12 +- .../kea/files/kea-dhcp-ddns.service | 1 - .../kea/files/kea-dhcp4.service | 1 - .../kea/files/kea-dhcp6.service | 1 - .../recipes-connectivity/kea/kea_2.4.2.bb | 78 - .../recipes-connectivity/kea/kea_2.6.1.bb | 81 + .../libpcap/libpcap/CVE-2023-7256-pre1.patch | 37 - .../libpcap/libpcap/CVE-2023-7256.patch | 365 - .../libpcap/libpcap/CVE-2024-8006.patch | 42 - .../libpcap/libpcap_1.10.4.bb | 48 - .../libpcap/libpcap_1.10.5.bb | 43 + .../recipes-connectivity/neard/neard_0.19.bb | 2 +- .../nfs-utils/nfs-utils/nfsserver | 28 +- .../nfs-utils/nfs-utils_2.6.4.bb | 16 +- ...tional-TEMP_FAILURE_RETRY-macro-copy.patch | 36 - ...ith-ell-0.39-by-restoring-unlikely-m.patch | 28 - .../ofono/ofono/CVE-2023-2794-0001.patch | 38 - .../ofono/ofono/CVE-2023-2794-0002.patch | 33 - .../ofono/ofono/CVE-2023-2794-0003.patch | 45 - .../ofono/ofono/CVE-2023-2794-0004.patch | 128 - .../ofono/ofono/CVE-2023-4232.patch | 31 - .../ofono/ofono/CVE-2023-4235.patch | 38 - .../ofono/ofono/CVE-2024-7537.patch | 59 - .../ofono/ofono/CVE-2024-7539.patch | 88 - ...024-7540_CVE-2024-7541_CVE-2024-7542.patch | 52 - .../ofono/ofono/CVE-2024-7543.patch | 30 - .../ofono/ofono/CVE-2024-7544.patch | 30 - .../ofono/ofono/CVE-2024-7545.patch | 32 - .../ofono/ofono/CVE-2024-7546.patch | 30 - .../ofono/ofono/CVE-2024-7547.patch | 29 - .../recipes-connectivity/ofono/ofono_2.10.bb | 48 + .../recipes-connectivity/ofono/ofono_2.4.bb | 69 - ...ast-to-sockaddr-in-systemd-interface.patch | 30 + ...sing-header-for-systemd-notification.patch | 27 - ...-notify-systemd-on-listen-and-reload.patch | 225 - ...h-log-input-and-output-files-on-erro.patch | 8 +- ...c-use-the-absolute-path-in-the-SSH-e.patch | 35 + .../openssh/openssh/CVE-2024-39894.patch | 35 - .../openssh/openssh/CVE-2024-6387.patch | 27 - .../openssh/openssh/CVE-2025-26465.patch | 203 +- .../openssh/openssh/CVE-2025-26466.patch | 14 +- .../openssh/openssh/CVE-2025-32728.patch | 44 - .../add-test-support-for-busybox.patch | 47 - .../openssh/openssh/run-ptest | 1 + .../openssh/openssh/sshd.service | 1 + .../openssh/openssh/sshd.socket | 1 + .../openssh/openssh_9.6p1.bb | 206 - .../openssh/openssh_9.8p1.bb | 227 + .../openssl/files/environment.d-openssl.sh | 23 +- ...ke-history-reporting-when-test-fails.patch | 48 +- ...1-Configure-do-not-tweak-mips-cflags.patch | 2 +- ...sysroot-and-debug-prefix-map-from-co.patch | 4 +- .../openssl/openssl/CVE-2024-41996.patch | 44 - .../openssl/openssl/CVE-2025-27587-1.patch | 1918 - .../openssl/openssl/CVE-2025-27587-2.patch | 129 - .../openssl/openssl_3.2.4.bb | 264 - .../openssl/openssl_3.3.1.bb | 269 + .../ppp-dialin/ppp-dialin_0.1.bb | 7 +- ...001-Revert-lock-path-to-var-lock-435.patch | 63 - .../ppp/ppp/CVE-2024-58250.patch | 194 - .../recipes-connectivity/ppp/ppp_2.5.0.bb | 25 +- .../resolvconf/resolvconf_1.92.bb | 2 +- .../slirp/libslirp_git.bb | 4 +- .../ssh-pregen-hostkeys_1.0.bb | 11 +- ...all-wpa_passphrase-when-not-disabled.patch | 33 - ...te-Phase-2-authentication-requiremen.patch | 213 - ...valid-Rejected-Groups-element-length.patch | 52 - ...options-for-libwpa_client.so-and-wpa.patch | 73 - ...dware-offload-requires-Linux-headers.patch | 53 + ...oval-of-wpa_passphrase-on-make-clean.patch | 26 - ...valid-Rejected-Groups-element-length.patch | 50 - ...id-Rejected-Groups-element-in-the-pa.patch | 38 - .../wpa-supplicant/CVE-2024-3596_00.patch | 82 - .../wpa-supplicant/CVE-2024-3596_01.patch | 165 - .../wpa-supplicant/CVE-2024-3596_02.patch | 62 - .../wpa-supplicant/CVE-2024-3596_03.patch | 37 - .../wpa-supplicant/CVE-2024-3596_04.patch | 52 - .../wpa-supplicant/CVE-2024-3596_05.patch | 51 - .../wpa-supplicant/CVE-2024-3596_06.patch | 46 - .../wpa-supplicant/CVE-2024-3596_07.patch | 67 - .../wpa-supplicant/CVE-2024-3596_08.patch | 47 - .../wpa-supplicant/wpa-supplicant_2.10.bb | 152 - .../wpa-supplicant/wpa-supplicant_2.11.bb | 137 + .../base-files/base-files_3.0.14.bb | 57 +- .../0001-Add-a-shutdown-group.patch | 6 +- .../base-passwd/0005-Add-kvm-group.patch | 6 +- .../base-passwd/base-passwd_3.6.3.bb | 125 - .../base-passwd/base-passwd_3.6.4.bb | 125 + .../busybox/busybox-inittab_1.36.1.bb | 5 +- .../meta/recipes-core/busybox/busybox.inc | 46 +- .../busybox/busybox/CVE-2022-48174.patch | 80 - .../busybox/busybox/CVE-2023-39810.patch | 136 - .../busybox/busybox-1.36.1-no-cbq.patch | 61 + .../busybox/busybox-udhcpc-no_deconfig.patch | 87 - .../recipes-core/busybox/busybox/defconfig | 6 +- .../recipes-core/busybox/busybox_1.36.1.bb | 4 +- ...local.mk-fix-cross-compiling-problem.patch | 12 +- .../0001-posixtm-pacify-clang-18.patch | 38 - .../coreutils/coreutils/CVE-2024-0684.patch | 39 - .../coreutils/coreutils/CVE-2025-5278.patch | 112 - .../coreutils/intermittent-testfailure.patch | 30 + .../remove-usr-local-lib-from-m4.patch | 7 +- .../recipes-core/coreutils/coreutils_9.4.bb | 222 - .../recipes-core/coreutils/coreutils_9.5.bb | 227 + .../meta/recipes-core/dbus/dbus_1.14.10.bb | 4 +- ...1-urandom-xauth-changes-to-options.h.patch | 20 +- .../dropbear/0005-dropbear-enable-pam.patch | 21 +- .../0006-dropbear-configuration-file.patch | 17 +- ...e-channels-when-a-PID-hasn-t-started.patch | 45 - .../dropbear/dropbear/CVE-2023-36328.patch | 144 - .../dropbear/dropbear/CVE-2023-48795.patch | 234 - .../dropbear-disable-weak-ciphers.patch | 17 +- .../recipes-core/dropbear/dropbear_2022.83.bb | 134 - .../recipes-core/dropbear/dropbear_2024.85.bb | 131 + .../poky/meta/recipes-core/ell/ell_0.64.bb | 22 - .../poky/meta/recipes-core/ell/ell_0.68.bb | 18 + ...ests-Cover-indirect-entity-recursion.patch | 103 - .../expat/expat/CVE-2024-8176-01.patch | 1477 - .../expat/expat/CVE-2024-8176-02.patch | 248 - .../meta/recipes-core/expat/expat_2.6.4.bb | 3 - .../gettext/gettext-minimal-native_0.22.5.bb | 2 +- .../recipes-core/gettext/gettext_0.22.5.bb | 5 - ...t-write-bindir-into-pkg-config-files.patch | 65 + ...0001-Fix-DATADIRNAME-on-uclibc-Linux.patch | 2 +- ...-gio-querymodules-as-libexec_PROGRAM.patch | 6 +- ...ng-about-deprecated-paths-in-schemas.patch | 2 +- ...ces.c-comment-out-a-build-host-only-.patch | 4 +- ...on-Run-atomics-test-on-clang-as-well.patch | 6 +- ...ot-enable-pidfd-features-on-native-g.patch | 6 +- ...dcode-python-path-into-various-tools.patch | 4 +- .../gdatetime-test-fail-0001.patch | 8 +- .../gdatetime-test-fail-0002.patch | 8 +- .../gdatetime-test-fail-0003.patch | 8 +- .../{glib-2.0 => files}/meson.cross.d/common | 0 .../meson.cross.d/common-glibc | 0 .../meson.cross.d/common-linux | 0 .../meson.cross.d/common-mingw | 0 .../meson.cross.d/common-musl | 0 .../relocate-modules.patch | 8 +- .../glib-2.0/{glib-2.0 => files}/run-ptest | 0 .../{glib-2.0 => files}/skip-timeout.patch | 7 +- .../glib-2.0/glib-2.0-initial_2.80.4.bb | 6 + ...t-write-bindir-into-pkg-config-files.patch | 60 - ...-correctly-when-building-with-mingw3.patch | 80 - ...deprecated-distutils-module-to-the-p.patch | 34 - .../glib-2.0/glib-2.0/CVE-2024-52533.patch | 49 - .../glib-2.0/glib-2.0/CVE-2025-3360-01.patch | 57 - .../glib-2.0/glib-2.0/CVE-2025-3360-02.patch | 53 - .../glib-2.0/glib-2.0/CVE-2025-3360-03.patch | 36 - .../glib-2.0/glib-2.0/CVE-2025-3360-04.patch | 76 - .../glib-2.0/glib-2.0/CVE-2025-3360-05.patch | 57 - .../glib-2.0/glib-2.0/CVE-2025-3360-06.patch | 50 - .../glib-2.0/glib-2.0/CVE-2025-4373-01.patch | 120 - .../glib-2.0/glib-2.0/CVE-2025-4373-02.patch | 29 - .../glib-2.0/glib-2.0/memory-monitor.patch | 361 - .../recipes-core/glib-2.0/glib-2.0_2.78.6.bb | 68 - .../recipes-core/glib-2.0/glib-2.0_2.80.4.bb | 2 + .../poky/meta/recipes-core/glib-2.0/glib.inc | 74 +- .../glib-networking/eagain.patch | 2 +- .../glib-networking/glib-networking_2.78.1.bb | 45 - .../glib-networking/glib-networking_2.80.0.bb | 45 + ...2.39.bb => cross-localedef-native_2.40.bb} | 0 .../meta/recipes-core/glibc/glibc-common.inc | 2 +- ...bc-locale_2.39.bb => glibc-locale_2.40.bb} | 0 ...bc-mtrace_2.39.bb => glibc-mtrace_2.40.bb} | 0 .../meta/recipes-core/glibc/glibc-package.inc | 6 +- ...-scripts_2.39.bb => glibc-scripts_2.40.bb} | 0 .../glibc/glibc-testsuite_2.39.bb | 36 - .../glibc/glibc-testsuite_2.40.bb | 36 + .../meta/recipes-core/glibc/glibc-version.inc | 6 +- .../glibc/glibc-y2038-tests_2.40.bb | 107 + ...dd-hardlink-resolver-from-util-linux.patch | 2 +- ...dd-single-threaded-fast-path-to-rand.patch | 47 - ...-fix-ups-hardlink-to-make-it-compile.patch | 2 +- ...Look-for-host-system-ld.so.cache-as-.patch | 30 +- ...Fix-buffer-overrun-with-a-relocated-.patch | 6 +- ...Raise-the-size-of-arrays-containing-.patch | 12 +- ...k-glibc-Allow-64-bit-atomics-for-x86.patch | 2 +- ...Make-relocatable-install-for-locales.patch | 4 +- ...Fall-back-to-faccessat-on-faccess2-r.patch | 2 +- ...the-path-sets-wrong-config-variables.patch | 99 +- ...ss-building-and-testing-instructions.patch | 2 +- ...glibc-Help-bootstrap-cross-toolchain.patch | 4 +- ...eglibc-Resolve-__fpscr_values-on-SH4.patch | 2 +- ...port-cross-locale-generation-support.patch | 2 +- ...-archive-uses-a-hard-coded-locale-pa.patch | 2 +- ...Do-not-ask-compiler-for-finding-arch.patch | 6 +- ...y-the-header-between-arm-and-aarch64.patch | 12 +- ...h-printf-builtin-in-nscd-init-script.patch | 2 +- ...igure.ac-Set-libc_cv_rootsbindir-onl.patch | 2 +- ...ell-interpreter-overridable-in-tzsel.patch | 8 +- ...Use-bin-sh-default-shell-interpreter.patch | 4 +- ...d-failed-in-unprivileged-process-BZ-.patch | 2 +- ...build-time-paths-in-the-output-binar.patch | 4 +- .../glibc/glibc/0023-qemu-stale-process.patch | 45 - ...u-tests-that-can-hang-in-oe-selftest.patch | 54 + ...ndomness-in-__gen_tempname-bug-32214.patch | 29 + .../meta/recipes-core/glibc/glibc/run-ptest | 37 + .../meta/recipes-core/glibc/glibc_2.39.bb | 133 - .../meta/recipes-core/glibc/glibc_2.40.bb | 142 + .../0001-Define-FNM_EXTMATCH-for-musl.patch | 3 +- ...not-use-dpkg-for-determining-OS-type.patch | 7 +- .../0001-ifupdown-skip-wrong-test-case.patch | 3 +- ...t-rely-on-dpkg-architecture-to-set-a.patch | 3 +- .../ifupdown/files/tweak-ptest-script.patch | 3 +- .../recipes-core/ifupdown/ifupdown_0.8.41.bb | 62 - .../recipes-core/ifupdown/ifupdown_0.8.43.bb | 62 + .../images/build-appliance-image_15.0.0.bb | 21 +- .../init-ifupdown/init-ifupdown_1.0.bb | 11 +- .../initrdscripts/initramfs-boot_1.0.bb | 6 +- .../initrdscripts/initramfs-framework/init | 23 +- .../initrdscripts/initramfs-framework_1.0.bb | 25 +- .../initramfs-live-boot-tiny_1.0.bb | 6 +- .../initrdscripts/initramfs-live-boot_1.0.bb | 6 +- .../initramfs-live-install-efi-testfs_1.0.bb | 5 +- .../initramfs-live-install-efi_1.0.bb | 6 +- .../initramfs-live-install-testfs_1.0.bb | 5 +- .../initramfs-live-install_1.0.bb | 6 +- .../initramfs-module-install-efi_1.0.bb | 5 +- .../initramfs-module-install_1.0.bb | 5 +- .../initramfs-module-setup-live_1.0.bb | 5 +- .../initscripts/initscripts-1.0/functions | 21 - .../initscripts/initscripts_1.0.bb | 66 +- .../libxcrypt/libxcrypt-compat_4.4.36.bb | 2 +- .../libxml/libxml2/CVE-2025-32414.patch | 74 - .../libxml/libxml2/CVE-2025-32415.patch | 39 - .../CVE-2025-49794-CVE-2025-49796.patch | 186 - .../libxml/libxml2/CVE-2025-49795.patch | 92 - .../libxml/libxml2/CVE-2025-6021.patch | 56 - .../libxml/libxml2/CVE-2025-6170.patch | 103 - .../libxml/libxml2/install-tests.patch | 4 +- .../recipes-core/libxml/libxml2_2.12.10.bb | 107 - .../recipes-core/libxml/libxml2_2.13.6.bb | 100 + .../meta/recipes-core/meta/build-sysroots.bb | 5 +- .../meta/buildtools-docs-tarball.bb | 1 + .../recipes-core/meta/buildtools-tarball.bb | 29 +- .../meta/cve-update-nvd2-native.bb | 9 +- .../recipes-core/meta/meta-world-pkgdata.bb | 4 +- .../meta/recipes-core/musl/bsd-headers.bb | 3 +- .../meta/recipes-core/musl/libc-test_git.bb | 2 +- .../recipes-core/musl/libssp-nonshared.bb | 3 +- .../recipes-core/musl/musl-legacy-error.bb | 3 +- sources/poky/meta/recipes-core/musl/musl.inc | 6 + ...ic-linker-a-relative-symlink-to-libc.patch | 12 +- ...ir-and-libdir-as-default-pathes-to-l.patch | 10 +- ...pedefs-for-Elf64_Relr-and-Elf32_Relr.patch | 37 - .../poky/meta/recipes-core/musl/musl_git.bb | 7 +- .../files/0001-Fix-CVE-2023-29491.patch | 462 - ...eset-code-ncurses-6.4-patch-20231104.patch | 499 - .../ncurses/files/0001-tic-hang.patch | 11 +- .../files/0002-configure-reproducible.patch | 7 +- ...-Do-not-include-LDFLAGS-in-generated.patch | 5 +- .../ncurses/files/CVE-2023-45918.patch | 180 - .../ncurses/files/CVE-2023-50495.patch | 301 - .../ncurses/files/CVE-2025-6141.patch | 25 - .../ncurses/files/exit_prototype.patch | 11 +- .../meta/recipes-core/ncurses/ncurses.inc | 4 +- .../meta/recipes-core/ncurses/ncurses_6.4.bb | 20 - .../meta/recipes-core/ncurses/ncurses_6.5.bb | 15 + .../recipes-core/ncurses/site_config/headers | 5 - .../poky/meta/recipes-core/newlib/newlib.inc | 8 + ...ential-UINT32-overflow-in-S3-ResumeC.patch | 51 - ...-Fix-overflow-issue-in-BasePeCoffLib.patch | 36 - .../poky/meta/recipes-core/ovmf/ovmf_git.bb | 4 +- .../packagegroup-core-tools-profile.bb | 1 - .../packagegroup-core-tools-testapps.bb | 1 + .../picolibc/picolibc-helloworld_git.bb | 40 + .../meta/recipes-core/picolibc/picolibc.inc | 21 + .../avoid_polluting_cross_directories.patch | 119 + .../picolibc/no-early-compiler-checks.cross | 6 + .../recipes-core/picolibc/picolibc_git.bb | 35 + .../meta/recipes-core/psplash/psplash_git.bb | 8 +- .../meta/recipes-core/readline/readline.inc | 4 +- .../readline/readline/norpath.patch | 19 +- .../readline/readline/readline82-001.patch | 45 - .../readline/readline/readline82-002.patch | 51 - .../readline/readline/readline82-003.patch | 46 - .../readline/readline/readline82-004.patch | 68 - .../readline/readline/readline82-005.patch | 53 - .../readline/readline/readline82-006.patch | 102 - .../readline/readline/readline82-007.patch | 51 - .../readline/readline/readline82-008.patch | 80 - .../readline/readline/readline82-009.patch | 76 - .../readline/readline/readline82-010.patch | 70 - .../recipes-core/readline/readline_8.2.13.bb | 5 + .../recipes-core/readline/readline_8.2.bb | 17 - .../meta/recipes-core/seatd/seatd_0.8.0.bb | 2 +- ...255.21.bb => systemd-boot-native_256.5.bb} | 0 .../systemd/systemd-boot_255.21.bb | 67 - .../systemd/systemd-boot_256.5.bb | 67 + .../systemd/systemd-bootconf_1.00.bb | 3 +- .../systemd/systemd-compat-units.bb | 3 +- .../recipes-core/systemd/systemd-conf_1.0.bb | 13 +- .../systemd/systemd-serialgetty.bb | 7 +- .../systemd/systemd-systemctl-native.bb | 5 +- .../meta/recipes-core/systemd/systemd.inc | 8 +- ...tall-dependency-links-at-install-tim.patch | 79 + ...1-missing_type.h-add-comparison_fn_t.patch | 58 - ...k-parse_printf_format-implementation.patch | 431 - ...tall-dependency-links-at-install-tim.patch | 76 - ...implment-systemd-sysv-install-for-OE.patch | 43 + ...oredump-set-ProtectHome-to-read-only.patch | 38 + ...missing.h-check-for-missing-strndupa.patch | 701 - ...d-on-org.freedesktop.timedate1.SetNT.patch | 97 - ...OB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch | 152 - ...4-missing_type.h-add-comparison_fn_t.patch | 61 + ...k-parse_printf_format-implementation.patch | 434 + ...005-add-missing-FTW_-macros-for-musl.patch | 41 - ...06-Use-uintmax_t-for-handling-rlim_t.patch | 103 - ...OB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch | 156 + ...007-add-missing-FTW_-macros-for-musl.patch | 44 + ...T_SYMLINK_NOFOLLOW-flag-to-faccessat.patch | 96 - ...patible-basename-for-non-glibc-syste.patch | 30 - ...08-Use-uintmax_t-for-handling-rlim_t.patch | 106 + ...implment-systemd-sysv-install-for-OE.patch | 40 - ...uffering-when-writing-to-oom_score_a.patch | 38 - ...T_SYMLINK_NOFOLLOW-flag-to-faccessat.patch | 99 + ...patible-basename-for-non-glibc-syste.patch | 34 + ...compliant-strerror_r-from-GNU-specif.patch | 73 - ...uffering-when-writing-to-oom_score_a.patch | 41 + ...definition-of-prctl_mm_map-structure.patch | 29 - ...compliant-strerror_r-from-GNU-specif.patch | 76 + ...-not-disable-buffer-in-writing-files.patch | 559 - .../0013-Handle-__cpu_mask-usage.patch | 57 - ...definition-of-prctl_mm_map-structure.patch | 32 + .../systemd/0014-Handle-missing-gshadow.patch | 170 - ...-not-disable-buffer-in-writing-files.patch | 572 + .../0015-Handle-__cpu_mask-usage.patch | 60 + ...l.h-Define-MIPS-ABI-defines-for-musl.patch | 46 - .../systemd/0016-Handle-missing-gshadow.patch | 172 + ...ass-correct-parameters-to-getdents64.patch | 34 - .../0017-Adjust-for-musl-headers.patch | 569 - ...l.h-Define-MIPS-ABI-defines-for-musl.patch | 42 + ...ass-correct-parameters-to-getdents64.patch | 37 + ...trerror-is-assumed-to-be-GNU-specifi.patch | 49 - .../0019-Adjust-for-musl-headers.patch | 526 + ...util-Make-STRERROR-portable-for-musl.patch | 39 - ...ake-malloc_trim-conditional-on-glibc.patch | 36 - ...trerror-is-assumed-to-be-GNU-specifi.patch | 52 + ...util-Make-STRERROR-portable-for-musl.patch | 42 + ...hared-Do-not-use-malloc_info-on-musl.patch | 54 - ...22-avoid-missing-LOCK_EX-declaration.patch | 40 - ...ake-malloc_trim-conditional-on-glibc.patch | 39 + ...hared-Do-not-use-malloc_info-on-musl.patch | 57 + ...24-avoid-missing-LOCK_EX-declaration.patch | 56 + ...gnal.h-to-avoid-the-undeclared-error.patch | 27 + ...references-using-stdin-as-a-struct-m.patch | 48 + ...clusion-order-to-avoid-redeclaration.patch | 76 + ....c-avoid-boot-time-segfault-for-musl.patch | 31 + .../recipes-core/systemd/systemd_255.21.bb | 896 - .../recipes-core/systemd/systemd_256.5.bb | 911 + .../sysvinit/sysvinit-inittab_2.88dsf.bb | 7 +- ...rom-Mark-Hindley-which-avoids-cleari.patch | 31 - .../recipes-core/sysvinit/sysvinit_3.04.bb | 11 +- .../meta/recipes-core/ttyrun/ttyrun_2.31.0.bb | 35 - .../meta/recipes-core/ttyrun/ttyrun_2.34.0.bb | 35 + .../meta/recipes-core/udev/eudev_3.2.14.bb | 4 +- .../recipes-core/udev/udev-extraconf_1.1.bb | 15 +- ...2.39.3.bb => util-linux-libuuid_2.40.2.bb} | 0 .../recipes-core/util-linux/util-linux.inc | 12 +- ...s-make-pam-install-path-configurable.patch | 65 + ...ls-include-libgen.h-for-basename-API.patch | 60 - .../util-linux/CVE-2024-28085-0001.patch | 36 - .../util-linux/CVE-2024-28085-0002.patch | 34 - .../util-linux/avoid_parallel_tests.patch | 5 +- .../util-linux/configure-sbindir.patch | 7 +- .../display_testname_for_subtest.patch | 7 +- .../util-linux/fstab-isolation.patch | 448 - .../util-linux/util-linux/mit-license.patch | 45 - .../util-linux/util-linux/ptest.patch | 11 +- .../util-linux/util-linux_2.39.3.bb | 355 - .../util-linux/util-linux_2.40.2.bb | 371 + .../volatile-binds/files/mount-copybind | 5 +- .../volatile-binds/volatile-binds.bb | 5 +- .../recipes-core/zlib/site_config/headers | 1 - .../poky/meta/recipes-core/zlib/zlib_1.3.1.bb | 6 +- .../meta/recipes-devtools/apt/apt_2.6.1.bb | 2 +- .../automake/0001-Drop-ar-u-argument.patch | 35 - ...ke-Add-default-libtool_tag-to-cppasm.patch | 12 +- ...date-for-python.m4-to-respect-libdir.patch | 83 - ...01-build-fix-race-in-parallel-builds.patch | 65 - ...date-for-python.m4-to-respect-libdir.patch | 91 + ...03-build-fix-race-in-parallel-builds.patch | 65 + .../0004-Add-a-new-distro-feature-ptest.patch | 49 + ...top_builddir-path-in-Makefile-to-acc.patch | 50 + ...delays-in-configure-scripts-using-au.patch | 77 + .../automake/automake/buildtest.patch | 47 - .../new_rt_path_for_test-driver.patch | 48 - .../automake/automake/performance.patch | 82 - .../automake/automake_1.16.5.bb | 43 - .../automake/automake_1.17.bb | 37 + .../binutils/binutils-2.42.inc | 59 - .../binutils/binutils-2.43.1.inc | 41 + ...2.bb => binutils-cross-canadian_2.43.1.bb} | 0 .../binutils/binutils-cross-testsuite_2.42.bb | 83 - ...cross_2.42.bb => binutils-cross_2.43.1.bb} | 0 ...dk_2.42.bb => binutils-crosssdk_2.43.1.bb} | 0 .../binutils/binutils-testsuite_2.43.1.bb | 86 + .../recipes-devtools/binutils/binutils.inc | 2 +- ...s-crosssdk-Generate-relocatable-SDKs.patch | 12 +- ...o-not-generate-linker-script-directo.patch | 6 +- ...dk-Search-for-alternative-ld.so.conf.patch | 10 +- ...004-Point-scripts-location-to-libdir.patch | 6 +- ...stro-compiler-point-to-the-wrong-ins.patch | 4 +- ...-system-directories-when-cross-linki.patch | 63 +- ...ect-assembling-for-ppc-wait-mnemonic.patch | 2 +- .../binutils/0008-Use-libtool-2.4.patch | 1770 +- ...h-in-libtool-when-sysroot-is-enabled.patch | 2 +- .../0010-sync-with-OE-libtool-changes.patch | 2 +- ...or-clang-before-checking-gcc-version.patch | 8 +- ...-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch | 4 +- ...sing-_Alignof-when-using-C11-or-newe.patch | 2 +- ...-pe-dll.o-entry-deom-targ_extra_ofil.patch | 2 +- ...-53589.patch => 0015-CVE-2024-53589.patch} | 0 ...rofng-change-use-of-bignum-to-bigint.patch | 17 - .../binutils/0016-CVE-2025-0840.patch | 55 + .../0017-dlltool-file-name-too-long.patch | 208 - .../binutils/0018-CVE-2025-0840.patch | 53 - .../binutils/0019-CVE-2025-1153-1.patch | 3207 - .../binutils/0020-CVE-2025-1153-2.patch | 840 - .../binutils/0021-CVE-2025-1153-3.patch | 3756 - .../binutils/0022-CVE-2025-5244.patch | 25 - .../binutils/0022-CVE-2025-5245.patch | 38 - .../binutils/0023-CVE-2025-7545.patch | 39 - .../binutils/0023-CVE-2025-7546.patch | 58 - .../binutils/binutils/CVE-2024-57360.patch | 75 - .../binutils/binutils/CVE-2025-1176.patch | 156 - .../binutils/binutils/CVE-2025-1178.patch | 38 - .../binutils/binutils/CVE-2025-1179-pre.patch | 1086 - .../binutils/binutils/CVE-2025-1179.patch | 269 - .../binutils/binutils/CVE-2025-1181-pre.patch | 151 - .../binutils/binutils/CVE-2025-1181.patch | 345 - .../binutils/binutils/CVE-2025-1182.patch | 33 - .../{binutils_2.42.bb => binutils_2.43.1.bb} | 0 .../bootchart2/bootchart2_0.14.9.bb | 2 +- ...y-to-specify-where-python-modules-ar.patch | 6 +- .../btrfs-tools/btrfs-tools_6.10.1.bb | 72 + .../btrfs-tools/btrfs-tools_6.7.1.bb | 72 - .../recipes-devtools/ccache/ccache_4.10.2.bb | 32 + .../recipes-devtools/ccache/ccache_4.9.1.bb | 26 - .../0001-xxhash.h-Fix-build-with-gcc-12.patch | 37 - .../cdrtools/cdrtools-native_3.01.bb | 2 +- .../cmake/cmake-native_3.28.3.bb | 67 - .../cmake/cmake-native_3.30.2.bb | 67 + .../meta/recipes-devtools/cmake/cmake.inc | 7 +- ...mpilerABI-Strip-pipe-from-compile-fl.patch | 52 - ...1-CMakeLists.txt-disable-USE_NGHTTP2.patch | 19 +- ...trary-characters-in-test-names-of-CT.patch | 205 - ...xt2fs-ext2_fs.h-by-cmake-s-internal-.patch | 9 +- .../recipes-devtools/cmake/cmake_3.28.3.bb | 69 - .../recipes-devtools/cmake/cmake_3.30.2.bb | 68 + .../createrepo-c/createrepo-c_1.0.4.bb | 41 - .../createrepo-c/createrepo-c_1.1.4.bb | 41 + .../devel-config/distcc-config.bb | 3 +- .../devel-config/nfs-export-root.bb | 4 +- .../recipes-devtools/distcc/distcc_3.4.bb | 6 +- .../dmidecode/dmidecode_3.5.bb | 21 - .../dmidecode/dmidecode_3.6.bb | 21 + ...Do-not-prepend-installroot-to-logdir.patch | 6 +- .../meta/recipes-devtools/dnf/dnf_4.19.0.bb | 96 - .../meta/recipes-devtools/dnf/dnf_4.21.1.bb | 96 + .../docbook-xml/docbook-xml-dtd4_4.5.bb | 5 +- .../poky/meta/recipes-devtools/dpkg/dpkg.inc | 2 +- .../0001-Add-support-for-riscv32-CPU.patch | 13 +- ...ild.c-ignore-return-of-1-from-tar-cf.patch | 9 +- .../0001-dpkg-Support-muslx32-build.patch | 15 +- .../0001-script.c-avoid-use-of-chroot.patch | 88 + ...rs-kernel-version-which-has-characte.patch | 14 +- ...s-expect-D-to-be-set-when-running-in.patch | 84 - ...tion-doesn-t-work-properly-for-all-s.patch | 10 +- ...add-musleabi-to-known-target-tripets.patch | 18 +- ...c-Remove-usage-of-clamp-mtime-in-tar.patch | 12 +- .../dpkg/dpkg/add_armeb_triplet_entry.patch | 23 +- .../recipes-devtools/dpkg/dpkg/arch_pm.patch | 12 +- .../recipes-devtools/dpkg/dpkg/noman.patch | 11 +- .../recipes-devtools/dpkg/dpkg/pager.patch | 21 - .../dpkg/dpkg/remove-tar-no-timestamp.patch | 13 +- .../meta/recipes-devtools/dpkg/dpkg_1.22.0.bb | 23 - .../recipes-devtools/dpkg/dpkg_1.22.11.bb | 22 + .../dwarfsrcfiles/dwarfsrcfiles.bb | 9 +- ...-missing-check-for-permission-denied.patch | 3 +- .../e2fsprogs/e2fsprogs/mkdir_p.patch | 7 +- .../e2fsprogs/e2fsprogs/ptest.patch | 8 +- .../e2fsprogs/e2fsprogs/quiet-debugfs.patch | 7 +- .../e2fsprogs/remove.ldconfig.call.patch | 15 +- .../e2fsprogs/e2fsprogs_1.47.0.bb | 148 - .../e2fsprogs/e2fsprogs_1.47.1.bb | 148 + .../elfutils/elfutils_0.191.bb | 75 +- .../0006-Fix-build-on-aarch64-musl.patch | 58 - .../elfutils/files/CVE-2025-1352.patch | 153 - .../elfutils/files/CVE-2025-1365.patch | 151 - .../elfutils/files/CVE-2025-1371.patch | 41 - .../elfutils/files/CVE-2025-1372.patch | 50 - .../erofs-utils/erofs-utils_1.7.1.bb | 27 - .../erofs-utils/erofs-utils_1.8.1.bb | 27 + .../expect/expect/tcl840.patch | 27 + .../recipes-devtools/expect/expect_5.45.4.bb | 5 +- ...h-of-sgdisk-when-compiled-with-lates.patch | 46 - ...to-deal-with-minor-change-in-libuuid.patch | 27 - ...01-Use-64bit-time_t-on-linux-as-well.patch | 32 - ...gptcurses-correctly-include-curses.h.patch | 5 +- .../fdisk/gptfdisk/popt-1.19-follow-up.patch | 41 - .../recipes-devtools/fdisk/gptfdisk_1.0.10.bb | 35 + .../recipes-devtools/fdisk/gptfdisk_1.0.9.bb | 39 - .../fmt/fmt/0001-Get-rid-of-std-copy.patch | 52 + .../meta/recipes-devtools/fmt/fmt_11.0.2.bb | 18 + .../meta/recipes-devtools/gcc/gcc-13.4.inc | 117 - .../meta/recipes-devtools/gcc/gcc-14.2.inc | 114 + .../gcc/gcc-configure-common.inc | 2 +- .../gcc/gcc-cross-canadian.inc | 1 + ...ian_13.4.bb => gcc-cross-canadian_14.2.bb} | 0 .../meta/recipes-devtools/gcc/gcc-cross.inc | 2 + .../{gcc-cross_13.4.bb => gcc-cross_14.2.bb} | 0 ...-crosssdk_13.4.bb => gcc-crosssdk_14.2.bb} | 0 .../meta/recipes-devtools/gcc/gcc-runtime.inc | 17 +- ...cc-runtime_13.4.bb => gcc-runtime_14.2.bb} | 0 ...itizers_13.4.bb => gcc-sanitizers_14.2.bb} | 0 .../recipes-devtools/gcc/gcc-source_13.4.bb | 4 - .../recipes-devtools/gcc/gcc-source_14.2.bb | 5 + .../meta/recipes-devtools/gcc/gcc-target.inc | 29 +- .../recipes-devtools/gcc/gcc-testsuite.inc | 2 +- ...0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch | 10 +- .../0002-gcc-poison-system-directories.patch | 42 +- .../gcc/gcc/0003-64-bit-multilib-hack.patch | 75 +- ...R_BUILD-in-a-couple-of-places-to-avo.patch | 14 +- ...ts.h-in-B-instead-of-S-and-t-oe-in-B.patch | 16 +- .../gcc/gcc/0006-cpp-honor-sysroot.patch | 10 +- ...AMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch | 45 +- .../gcc/gcc/0008-libtool.patch | 2 +- ...s-fix-v4bx-to-linker-to-support-EABI.patch | 4 +- ...-config-files-from-B-instead-of-usin.patch | 14 +- ...1-aarch64-Fix-include-paths-when-S-B.patch | 30 +- ...ir-from-.la-which-usually-points-to-.patch | 2 +- ...e-target-gcc-headers-can-be-included.patch | 14 +- ...t-directory-during-relink-if-inst_pr.patch | 2 +- ...-fix-libcc1-s-install-path-and-rpath.patch | 4 +- ...le-sysroot-support-for-nativesdk-gcc.patch | 30 +- ...sroot-gcc-version-specific-dirs-with.patch | 8 +- ...d-to-link-commandline-for-musl-targe.patch | 12 +- ...Re-introduce-spe-commandline-options.patch | 4 +- ...as-for-__cpu_indicator_init-instead-.patch | 8 +- ...s-Do-not-use-__LINE__-for-maintainin.patch | 8 +- ...omic-Do-not-enforce-march-on-aarch64.patch | 16 +- .../0023-Fix-install-path-of-linux64.h.patch | 8 +- ...ardcoded-build-paths-into-ppc-libgcc.patch | 2 +- ...025-gcc-testsuite-tweaks-for-mips-OE.patch | 56 +- ...ix-c-tweak-for-Wrange-loop-construct.patch | 114 + .../0027-Fix-gcc-vect-module-testcases.patch | 26 - ...4fffe3fc82a710bea66ad651720d71c938b8.patch | 549 + .../gcc/{gcc_13.4.bb => gcc_14.2.bb} | 0 .../recipes-devtools/gcc/libgcc-common.inc | 5 + ...initial_13.4.bb => libgcc-initial_14.2.bb} | 0 .../gcc/{libgcc_13.4.bb => libgcc_14.2.bb} | 0 ...ibgfortran_13.4.bb => libgfortran_14.2.bb} | 0 ...ian_14.2.bb => gdb-cross-canadian_15.1.bb} | 0 .../{gdb-cross_14.2.bb => gdb-cross_15.1.bb} | 0 .../poky/meta/recipes-devtools/gdb/gdb.inc | 8 +- ...constexpr-conversion-in-enum-flags.h.patch | 313 + ...ux-nat-Define-_ABIO32-if-not-defined.patch | 6 +- ...e-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch | 8 +- ...readline.a-when-using-disable-static.patch | 10 +- .../gdb/gdb/0004-use-asm-sgidefs.h.patch | 6 +- .../gdb/gdb/0005-Change-order-of-CFLAGS.patch | 21 +- .../0006-Fix-invalid-sigprocmask-call.patch | 46 + ...06-resolve-restrict-keyword-conflict.patch | 45 - ...sing-_Alignof-when-using-C11-or-newe.patch | 48 + .../0007-Fix-invalid-sigprocmask-call.patch | 46 - ...sing-_Alignof-when-using-C11-or-newe.patch | 48 - .../gdb/{gdb_14.2.bb => gdb_15.1.bb} | 0 ...-do-not-force-RHEL-7-specific-build-.patch | 13 +- .../git/git/environment.d-git.sh | 19 - .../recipes-devtools/git/git/fixsort.patch | 22 +- .../meta/recipes-devtools/git/git_2.44.4.bb | 175 - .../meta/recipes-devtools/git/git_2.46.1.bb | 167 + .../gnu-config/gnu-config_git.bb | 6 +- .../meta/recipes-devtools/go/go-1.22.12.inc | 3 - .../go/go-binary-native_1.22.12.bb | 1 - .../meta/recipes-devtools/go/go-common.inc | 1 - .../go/go/CVE-2025-22870.patch | 80 - .../go/go/CVE-2025-22871.patch | 172 - .../go/go/CVE-2025-4673.patch | 68 - .../icecc-create-env/icecc-create-env_0.1.bb | 5 +- .../nativesdk-icecc-toolchain_0.1.bb | 6 +- .../recipes-devtools/json-c/json-c/run-ptest | 2 + .../recipes-devtools/json-c/json-c_0.17.bb | 6 +- .../libcomps/libcomps_0.1.20.bb | 25 - .../libcomps/libcomps_0.1.21.bb | 25 + ...-drop-the-requirement-for-GTKDOC_SCA.patch | 2 +- ...or-both-libsolv-and-libsolvext-libdn.patch | 4 +- .../0001-drop-FindPythonInstDir.cmake.patch | 2 +- ...ables-with-pkg-config-cmake-s-own-mo.patch | 4 +- .../libdnf/libdnf/armarch.patch | 2 +- .../libdnf/enable_test_data_dir_set.patch | 4 +- .../recipes-devtools/libdnf/libdnf_0.73.2.bb | 36 - .../recipes-devtools/libdnf/libdnf_0.73.3.bb | 36 + .../libedit/libedit/stdc-predef.patch | 16 +- .../libedit/libedit_20230828-3.1.bb | 31 - .../libedit/libedit_20240808-3.1.bb | 25 + ...me.c-fix-build-errors-with-older-gcc.patch | 36 - ...tain-PYTHON_INSTALL_DIR-by-running-p.patch | 2 +- ...les-with-pkg-config-not-with-cmake-m.patch | 6 +- .../librepo/librepo_1.17.0.bb | 31 - .../librepo/librepo_1.18.1.bb | 30 + .../libtool/libtool-2.4.7.inc | 52 - .../libtool/libtool-2.5.2.inc | 36 + .../libtool/libtool-cross_2.4.7.bb | 50 - .../libtool/libtool-cross_2.5.2.bb | 43 + .../libtool/libtool-native_2.4.7.bb | 20 - .../libtool/libtool-native_2.5.2.bb | 11 + ...-trailing-slashes-on-install-command.patch | 13 +- ...in.in-Parse-additional-clang-options.patch | 33 - ...e-the-with-sysroot-option-to-avoid-c.patch | 170 - ...-libtool.m4-Cleanup-sysroot-trailing.patch | 37 - ...-Add-missing-sysroot-to-library-path.patch | 28 - ...sroot-paths-being-encoded-into-RPATH.patch | 17 +- ...encode-RATHS-which-match-default-lin.patch | 17 +- ...ool.m4-Handle-as-a-sysroot-correctly.patch | 16 +- ...tool-Fix-support-for-NIOS2-processor.patch | 60 - ...r-static-libs-for-internal-compiler-.patch | 17 +- ...-sure-autoheader-run-before-autoconf.patch | 31 - ...-sure-autoheader-run-before-automake.patch | 33 - ...-prefix-map-compiler-options-correct.patch | 37 - ...eproducibility-stop-encoding-hostnam.patch | 29 - .../libtool/libtool/fixinstall.patch | 35 +- .../{libtool_2.4.7.bb => libtool_2.5.2.bb} | 0 .../libtool/nativesdk-libtool_2.4.7.bb | 31 - .../libtool/nativesdk-libtool_2.5.2.bb | 24 + .../meta/recipes-devtools/llvm/llvm_18.1.6.bb | 179 - .../meta/recipes-devtools/llvm/llvm_18.1.8.bb | 180 + .../meta/recipes-devtools/lua/lua_5.4.6.bb | 66 - .../meta/recipes-devtools/lua/lua_5.4.7.bb | 66 + .../meta/recipes-devtools/m4/m4-1.4.19.inc | 3 - .../makedevs/makedevs_1.0.1.bb | 3 +- .../0001-Make-CPU-family-warnings-fatal.patch | 11 +- ...-not-manipulate-the-environment-when.patch | 9 +- ...pport-building-allarch-recipes-again.patch | 7 +- .../recipes-devtools/meson/meson_1.3.1.bb | 158 - .../recipes-devtools/meson/meson_1.5.1.bb | 158 + .../recipes-devtools/mmc/mmc-utils_git.bb | 5 +- .../recipes-devtools/mtd/mtd-utils_git.bb | 4 +- .../mtools/mtools/clang_UNUSED.patch | 6 +- .../mtools/disable-hardcoded-configs.patch | 6 +- .../mtools/mtools/mtools-makeinfo.patch | 16 +- .../recipes-devtools/mtools/mtools_4.0.44.bb | 49 + .../recipes-devtools/mtools/mtools_4.0.49.bb | 49 - ...4efb41c039789b81f0dc0d67c1ed0faea17c.patch | 62 - .../recipes-devtools/ninja/ninja_1.11.1.bb | 36 - .../recipes-devtools/ninja/ninja_1.12.1.bb | 33 + ...e-numeric-owner-parameter-overzealou.patch | 34 - .../opkg-utils/opkg-utils_0.6.3.bb | 66 - .../opkg-utils/opkg-utils_0.7.0.bb | 65 + .../opkg/opkg-arch-config_1.0.bb | 3 +- ...Use-libgen.h-to-provide-basename-API.patch | 62 - ...-opkg.lock-in-run-instead-of-var-run.patch | 9 +- .../meta/recipes-devtools/opkg/opkg_0.6.3.bb | 85 - .../meta/recipes-devtools/opkg/opkg_0.7.0.bb | 84 + .../meta/recipes-devtools/orc/orc_0.4.40.bb | 3 - .../perl-cross/files/determinism.patch | 4 +- .../perl-cross/perlcross_1.6.2.bb | 38 - .../perl-cross/perlcross_1.6.bb | 38 + ...ent-failure-of-test-t-op-sigsystem.t.patch | 77 - ...ule-breaks-through-the-perl-wrapper-.patch | 8 +- ...Makefile.PL-Fix-_PATH_LOG-for-determ.patch | 5 +- .../files/0002-Constant-Fix-up-shebang.patch | 9 +- .../perl/files/determinism.patch | 16 +- .../perl/files/encodefix.patch | 16 +- .../perl/files/errno_ver.diff | 15 +- .../perl/files/native-perlinc.patch | 18 +- .../perl/files/perl-configpm-switch.patch | 3 +- .../perl/files/perl-dynloader.patch | 18 +- .../perl/files/perl-rdepends.txt | 694 +- .../recipes-devtools/perl/liburi-perl_5.27.bb | 56 - .../recipes-devtools/perl/liburi-perl_5.28.bb | 56 + .../perl/libxml-parser-perl_2.47.bb | 2 +- .../meta/recipes-devtools/perl/perl-ptest.inc | 3 + .../meta/recipes-devtools/perl/perl_5.38.4.bb | 426 - .../meta/recipes-devtools/perl/perl_5.40.0.bb | 429 + .../pkgconf/pkgconf/pkg-config-native.in | 2 +- .../recipes-devtools/pkgconf/pkgconf_2.1.1.bb | 67 - .../recipes-devtools/pkgconf/pkgconf_2.3.0.bb | 67 + .../pkgconfig/pkgconfig/pkg-config-native.in | 2 +- .../pkgconfig/pkgconfig_git.bb | 4 +- .../meta/recipes-devtools/pseudo/pseudo.inc | 4 +- .../recipes-devtools/python/python-cython.inc | 45 - .../recipes-devtools/python/python-pyasn1.inc | 31 - .../python/python-pycryptodome.inc | 2 - .../python/python3-alabaster_0.7.16.bb | 12 - .../python/python3-alabaster_1.0.0.bb | 12 + .../0001-conftest.py-disable-deadline.patch | 45 - ...funcs-skip-test_unknown-for-pytest-8.patch | 30 - .../python/python3-attrs_23.2.0.bb | 38 - .../python/python3-attrs_24.2.0.bb | 36 + .../python/python3-babel_2.14.0.bb | 26 - .../python/python3-babel_2.16.0.bb | 26 + .../python/python3-bcrypt-crates.inc | 114 +- ...-0.20.0-to-0.20.3-in-src-_bcrypt-746.patch | 111 - .../python/python3-bcrypt_4.1.2.bb | 36 - .../python/python3-bcrypt_4.2.0.bb | 35 + .../python/python3-beartype_0.17.2.bb | 11 - .../python/python3-beartype_0.18.5.bb | 13 + .../python/python3-build_1.1.1.bb | 32 - .../python/python3-build_1.2.1.bb | 32 + .../python3-certifi/CVE-2024-39689.patch | 69 - .../python/python3-certifi_2024.2.2.bb | 19 - .../python/python3-certifi_2024.8.30.bb | 16 + .../python/python3-cffi/run-ptest | 7 + .../python/python3-cffi_1.16.0.bb | 18 - .../python/python3-cffi_1.17.0.bb | 38 + .../python/python3-chardet_5.2.0.bb | 3 - .../python/python3-cryptography-crates.inc | 8 +- .../python3-cryptography-vectors_42.0.5.bb | 31 - .../python3-cryptography-vectors_42.0.8.bb | 31 + ...toml-remove-benchmark-disable-option.patch | 7 +- .../python/python3-cryptography_42.0.5.bb | 67 - .../python/python3-cryptography_42.0.8.bb | 67 + .../python/python3-cython_3.0.11.bb | 73 + .../python/python3-cython_3.0.8.bb | 37 - .../python/python3-dbusmock_0.31.1.bb | 22 - .../python/python3-dbusmock_0.32.1.bb | 22 + .../python/python3-docutils_0.20.1.bb | 20 - .../python/python3-docutils_0.21.2.bb | 22 + .../python/python3-dtschema_2024.2.bb | 20 - .../python/python3-dtschema_2024.5.bb | 20 + .../python/python3-git_3.1.42.bb | 32 - .../python/python3-git_3.1.43.bb | 32 + .../python/python3-hatchling_1.21.1.bb | 17 - .../python/python3-hatchling_1.25.0.bb | 17 + .../python/python3-hypothesis_6.111.2.bb | 39 + .../python/python3-hypothesis_6.98.15.bb | 39 - .../python/python3-idna/run-ptest | 3 + .../python/python3-idna_3.7.bb | 14 - .../python/python3-idna_3.8.bb | 19 + .../python3-importlib-metadata_7.0.1.bb | 20 - .../python/python3-jinja2_3.1.4.bb | 48 + .../python/python3-jinja2_3.1.6.bb | 51 - .../python/python3-jsonpointer_2.4.bb | 28 - .../python/python3-jsonpointer_3.0.0.bb | 28 + .../python/python3-jsonschema_4.21.1.bb | 50 - .../python/python3-jsonschema_4.23.0.bb | 49 + .../python/python3-libarchive-c/run-ptest | 6 + .../python/python3-libarchive-c_5.0.bb | 21 - .../python/python3-libarchive-c_5.1.bb | 39 + .../python3-license-expression_30.2.0.bb | 38 - .../python3-license-expression_30.3.1.bb | 39 + .../python/python3-lxml_5.0.2.bb | 42 - .../python/python3-lxml_5.3.0.bb | 44 + .../python/python3-mako/run-ptest | 3 + .../python/python3-mako_1.3.2.bb | 20 - .../python/python3-mako_1.3.5.bb | 36 + .../python/python3-markdown_3.5.2.bb | 13 - .../python/python3-markdown_3.6.bb | 13 + .../python/python3-maturin-crates.inc | 808 +- .../0001-Add-32-bit-RISC-V-support.patch | 102 - ...prove-wheel-reproducibility-by-sorti.patch | 55 + .../python/python3-maturin_1.4.0.bb | 50 - .../python/python3-maturin_1.7.1.bb | 50 + .../python/python3-meson-python_0.15.0.bb | 27 - .../python/python3-meson-python_0.16.0.bb | 27 + .../python/python3-more-itertools_10.2.0.bb | 29 - .../python/python3-more-itertools_10.4.0.bb | 29 + .../python/python3-numpy_1.26.4.bb | 3 + .../python/python3-packaging/run-ptest | 3 + .../python/python3-packaging_23.2.bb | 18 - .../python/python3-packaging_24.1.bb | 37 + .../python/python3-pathspec_0.12.1.bb | 2 +- .../0001-change-shebang-to-python3.patch | 13 +- .../python/python3-pbr_6.0.0.bb | 4 - .../python/python3-pbr_6.1.0.bb | 4 + .../python3-pip/no_shebang_mangling.patch | 8 +- .../python/python3-pip_24.0.bb | 60 - .../python/python3-pip_24.2.bb | 54 + .../python/python3-pluggy_1.4.0.bb | 29 - .../python/python3-pluggy_1.5.0.bb | 26 + .../python/python3-poetry-core_1.9.0.bb | 1 - .../python/python3-psutil_5.9.8.bb | 41 - .../python/python3-psutil_6.0.0.bb | 43 + .../python/python3-pyasn1_0.5.1.bb | 3 - .../python/python3-pyasn1_0.6.0.bb | 31 + .../python/python3-pycairo_1.26.0.bb | 26 - .../python/python3-pycairo_1.26.1.bb | 26 + .../python/python3-pycparser_2.21.bb | 21 - .../python/python3-pycparser_2.22.bb | 19 + .../python/python3-pyelftools_0.30.bb | 15 - .../python/python3-pyelftools_0.31.bb | 15 + .../python/python3-pygments_2.17.2.bb | 14 - .../python/python3-pygments_2.18.0.bb | 14 + .../python/python3-pygobject_3.46.0.bb | 39 - .../python/python3-pygobject_3.48.2.bb | 39 + .../python/python3-pyopenssl_24.0.0.bb | 22 - .../python/python3-pyopenssl_24.2.1.bb | 22 + .../python/python3-pyparsing_3.1.1.bb | 30 - .../python/python3-pyparsing_3.1.4.bb | 30 + .../python/python3-pyproject-hooks_1.0.0.bb | 2 - .../python3-pyproject-metadata_0.7.1.bb | 27 - .../python3-pyproject-metadata_0.8.0.bb | 27 + .../python/python3-pytest-subtests_0.11.0.bb | 20 - .../python/python3-pytest-subtests_0.13.1.bb | 22 + .../python/python3-pytest_8.0.2.bb | 41 - .../python/python3-pytest_8.3.2.bb | 33 + .../0001-Fix-builds-with-Cython-3.patch | 54 - .../python/python3-pyyaml_6.0.1.bb | 40 - .../python/python3-pyyaml_6.0.2.bb | 38 + .../python/python3-referencing_0.33.0.bb | 14 - .../python/python3-referencing_0.35.1.bb | 14 + .../environment.d-python3-requests.sh | 11 - .../python/python3-requests_2.32.3.bb | 24 + .../python/python3-requests_2.32.4.bb | 35 - .../python/python3-rpds-py-crates.inc | 108 +- .../python/python3-rpds-py/run-ptest | 3 + .../python/python3-rpds-py_0.18.0.bb | 15 - .../python/python3-rpds-py_0.20.0.bb | 30 + .../python/python3-ruamel-yaml_0.18.6.bb | 6 +- .../0001-Fix-man-page-installation.patch | 29 - .../python/python3-scons_4.6.0.bb | 36 - .../python/python3-scons_4.8.0.bb | 30 + .../python/python3-setuptools-rust_1.10.1.bb | 30 + .../python/python3-setuptools-rust_1.9.0.bb | 35 - ...0001-respect-GIT_CEILING_DIRECTORIES.patch | 36 - .../python/python3-setuptools-scm_8.0.4.bb | 32 - .../python/python3-setuptools-scm_8.1.0.bb | 32 + ...nfig.py-make-it-possible-to-substite.patch | 17 +- ...ly-do-not-fetch-code-by-easy_install.patch | 6 +- .../python3-setuptools/CVE-2024-6345.patch | 312 - .../CVE-2025-47273-pre1.patch | 54 - .../python3-setuptools/CVE-2025-47273.patch | 59 - .../python/python3-setuptools_69.1.1.bb | 60 - .../python/python3-setuptools_72.1.0.bb | 57 + .../python/python3-spdx-tools_0.8.2.bb | 4 +- .../python/python3-sphinx_7.2.6.bb | 35 - .../python/python3-sphinx_8.0.2.bb | 35 + .../python3-sphinxcontrib-applehelp_1.0.8.bb | 12 - .../python3-sphinxcontrib-applehelp_2.0.0.bb | 12 + .../python3-sphinxcontrib-devhelp_1.0.6.bb | 12 - .../python3-sphinxcontrib-devhelp_2.0.0.bb | 12 + .../python3-sphinxcontrib-htmlhelp_2.0.5.bb | 12 - .../python3-sphinxcontrib-htmlhelp_2.1.0.bb | 12 + .../python3-sphinxcontrib-qthelp_1.0.7.bb | 12 - .../python3-sphinxcontrib-qthelp_2.0.0.bb | 12 + ...n3-sphinxcontrib-serializinghtml_1.1.10.bb | 12 - ...on3-sphinxcontrib-serializinghtml_2.0.0.bb | 12 + .../python/python3-subunit_1.4.4.bb | 2 +- .../python/python3-testtools_2.7.1.bb | 20 - .../python/python3-testtools_2.7.2.bb | 22 + .../python3-trove-classifiers_2024.2.23.bb | 26 - .../python3-trove-classifiers_2024.7.2.bb | 28 + .../python3-typing-extensions_4.10.0.bb | 24 - .../python3-typing-extensions_4.12.2.bb | 24 + .../python3-unittest-automake-output_0.2.bb | 2 + .../python/python3-uritools/run-ptest | 3 + .../python/python3-uritools_4.0.2.bb | 11 - .../python/python3-uritools_4.0.3.bb | 22 + .../python3-urllib3/CVE-2025-50181.patch | 283 - .../python/python3-urllib3_2.2.2.bb | 4 - .../python/python3-webcolors_1.13.bb | 28 - .../python/python3-webcolors_24.8.0.bb | 28 + .../python/python3-websockets_12.0.bb | 16 - .../python/python3-websockets_13.0.1.bb | 15 + .../python/python3-wheel_0.42.0.bb | 15 - .../python/python3-wheel_0.44.0.bb | 15 + .../python/python3-yamllint_1.35.1.bb | 3 +- .../python/python3-zipp/CVE-2024-5569.patch | 138 - .../python/python3-zipp_3.17.0.bb | 19 - .../python/python3-zipp_3.20.1.bb | 15 + ...shebang-overflow-on-python-config.py.patch | 2 +- ...-use-prefix-value-from-build-configu.patch | 2 +- ...sts-due-to-load-variability-on-YP-AB.patch | 6 +- ...001-ctypes-correct-gcc-check-in-test.patch | 53 + ...e-treat-overflow-in-UID-GID-as-failu.patch | 2 +- ..._fileno-test-due-to-load-variability.patch | 2 +- ...orlines-skip-due-to-load-variability.patch | 2 +- .../python/python3/makerace.patch | 2 +- .../python/python3_3.12.11.bb | 474 - .../recipes-devtools/python/python3_3.12.9.bb | 477 + .../qemu/nativesdk-qemu-helper_1.0.bb | 7 +- .../qemu/qemu-helper-native_1.0.bb | 5 +- .../recipes-devtools/qemu/qemu-native.inc | 2 +- ...u-native_8.2.7.bb => qemu-native_9.0.2.bb} | 0 .../qemu/qemu-system-native_8.2.7.bb | 31 - .../qemu/qemu-system-native_9.0.2.bb | 31 + .../poky/meta/recipes-devtools/qemu/qemu.inc | 84 +- ...n-environment-space-to-boot-loader-q.patch | 18 +- ...ed_attr-Do-not-define-for-glibc-2.41.patch | 47 - .../0002-apic-fixup-fallthrough-to-PIC.patch | 46 + ...ce-use-of-lfs64-related-functions-an.patch | 355 - ...ongarch64-Remove-TARGET_FORCE_SHMLBA.patch | 43 - .../0003-apic-fixup-fallthrough-to-PIC.patch | 44 - ...dd-pkg-config-handling-for-libgcrypt.patch | 31 + ...0003-linux-user-Add-strace-for-shmat.patch | 71 - ...dd-pkg-config-handling-for-libgcrypt.patch | 29 - ...0004-linux-user-Rewrite-target_shmat.patch | 236 - ...mu-Do-not-include-file-if-not-exists.patch | 34 + ...er-space-mmap-tweaks-to-address-musl.patch | 51 + ...mu-Do-not-include-file-if-not-exists.patch | 32 - ...that-shmat-does-not-break-proc-self-.patch | 85 - ...er-space-mmap-tweaks-to-address-musl.patch | 49 - .../qemu/0006-qemu-Determinism-fixes.patch | 33 + .../qemu/0007-qemu-Determinism-fixes.patch | 31 - ...d-use-relative-path-to-refer-to-file.patch | 43 + ...and-MAP_SHARED_VALIDATE-on-needed-li.patch | 48 + ...d-use-relative-path-to-refer-to-file.patch | 41 - ...and-MAP_SHARED_VALIDATE-on-needed-li.patch | 46 - ...ce-use-of-lfs64-related-functions-an.patch | 358 + ...gure-lookup-meson-exutable-from-PATH.patch | 31 + ...t-against-buggy-or-malicious-guest-d.patch | 40 - ...round-for-missing-MAP_FIXED_NOREPLAC.patch | 282 - ...and-the-python-venv-aren-t-used-for-.patch | 55 + ...round-for-missing-MAP_SHARED_VALIDAT.patch | 51 - ...79ad8629b57a43daa62e46cc7af6e1078116.patch | 60 - .../qemu/qemu/CVE-2024-6505.patch | 40 + .../qemu/qemu/fix-strerrorname_np.patch | 27 + .../qemu/qemu/fixedmeson.patch | 20 - .../recipes-devtools/qemu/qemu/no-pip.patch | 45 - .../qemu/{qemu_8.2.7.bb => qemu_9.0.2.bb} | 0 .../qemu/qemuwrapper-cross_1.0.bb | 3 +- ...lt-native_0.67.bb => quilt-native_0.68.bb} | 0 .../meta/recipes-devtools/quilt/quilt.inc | 9 +- ...t-Fix-a-race-condition-in-merge.test.patch | 48 - .../quilt/quilt/faildiff-order.patch | 41 - .../quilt/quilt/fix-grep-3.8.patch | 144 - .../quilt/{quilt_0.67.bb => quilt_0.68.bb} | 0 .../meta/recipes-devtools/repo/repo_2.42.bb | 30 - .../meta/recipes-devtools/repo/repo_2.46.bb | 30 + ...-prototypes-to-function-declarations.patch | 13 +- .../rsync/files/CVE-2024-12084-0001.patch | 156 - .../rsync/files/CVE-2024-12084-0002.patch | 43 - .../rsync/files/CVE-2024-12085.patch | 32 - .../rsync/files/CVE-2024-12086-0001.patch | 42 - .../rsync/files/CVE-2024-12086-0002.patch | 108 - .../rsync/files/CVE-2024-12086-0003.patch | 108 - .../rsync/files/CVE-2024-12086-0004.patch | 41 - .../rsync/files/CVE-2024-12087-0001.patch | 49 - .../rsync/files/CVE-2024-12087-0002.patch | 31 - .../rsync/files/CVE-2024-12087-0003.patch | 40 - .../rsync/files/CVE-2024-12088.patch | 141 - .../rsync/files/CVE-2024-12747.patch | 192 - .../rsync/files/makefile-no-rebuild.patch | 7 +- .../recipes-devtools/rsync/rsync_3.2.7.bb | 79 - .../recipes-devtools/rsync/rsync_3.3.0.bb | 67 + ...x-cross-compilation-of-external-gems.patch | 11 +- ...ine-REG_S1-and-REG_S2-for-musl-riscv.patch | 7 +- ...Obey-LDFLAGS-for-the-link-of-libruby.patch | 24 + ...doc-build-reproducible-documentation.patch | 16 +- ...-list-of-object-files-in-generated-M.patch | 7 +- ...eproducible-change-fixing-784225-too.patch | 9 +- .../0006-Make-gemspecs-reproducible.patch | 5 +- .../ruby/ruby/CVE-2025-27219.patch | 31 - .../ruby/ruby/CVE-2025-27220.patch | 78 - .../ruby/ruby/CVE-2025-27221-0001.patch | 57 - .../ruby/ruby/CVE-2025-27221-0002.patch | 73 - .../meta/recipes-devtools/ruby/ruby_3.3.4.bb | 141 + .../meta/recipes-devtools/ruby/ruby_3.3.5.bb | 144 - .../run-postinsts/run-postinsts_1.0.bb | 9 +- .../recipes-devtools/rust/cargo-c-crates.inc | 798 +- .../cargo-c-native_0.10.3+cargo-0.81.0.bb | 17 + .../cargo-c-native_0.9.30+cargo-0.77.0.bb | 17 - .../recipes-devtools/rust/cargo_1.75.0.bb | 86 - .../recipes-devtools/rust/cargo_1.79.0.bb | 73 + ...endored-sources-when-remapping-paths.patch | 46 - ...e-absolute-paths-to-OUT_DIR-as-relat.patch | 67 - ...te-host-information-into-compilation.patch | 8 +- .../rust/files/custom-target-cfg.patch | 90 - .../rust/files/hardcodepaths.patch | 49 +- ...epro-issue-fix-with-cc-crate-hashmap.patch | 166 + .../files/repro-issue-fix-with-v175.patch | 36 - .../rust/files/rust-oe-selftest.patch | 403 + .../rust/files/rustc-bootstrap.patch | 21 - ...ue-fix-cargo-config-for-codegenunits.patch | 26 + .../files/rv32-cargo-rustix-0.38.19-fix.patch | 70 - .../files/rv32-cargo-rustix-0.38.28-fix.patch | 70 + .../rust/files/rv32-missing-syscalls.patch | 1503 - .../rust/files/rv32-rustix-libc-backend.patch | 17 +- .../rust/files/target-build-value.patch | 26 - .../rust/files/zlib-off64_t.patch | 27 +- .../recipes-devtools/rust/libstd-rs_1.75.0.bb | 55 - .../recipes-devtools/rust/libstd-rs_1.79.0.bb | 55 + .../rust/rust-cross-canadian.inc | 33 +- ....75.0.bb => rust-cross-canadian_1.79.0.bb} | 0 .../0004-llvm-Fix-CVE-2024-0151.patch | 1086 - .../recipes-devtools/rust/rust-llvm_1.75.0.bb | 95 - .../recipes-devtools/rust/rust-llvm_1.79.0.bb | 94 + .../recipes-devtools/rust/rust-snapshot.inc | 69 +- .../recipes-devtools/rust/rust-source.inc | 14 +- .../meta/recipes-devtools/rust/rust_1.75.0.bb | 380 - .../meta/recipes-devtools/rust/rust_1.79.0.bb | 369 + ...toconf-macro-to-detect-largefile-sup.patch | 6 +- ...001-strace-fix-reproducibilty-issues.patch | 9 +- ...002-tests-Replace-off64_t-with-off_t.patch | 35 +- .../strace/strace/Makefile-ptest.patch | 9 +- .../strace/strace/ptest-spacesave.patch | 7 +- .../strace/strace/skip-load.patch | 9 +- .../strace/strace/update-gawk-paths.patch | 70 +- .../recipes-devtools/strace/strace_6.10.bb | 52 + .../recipes-devtools/strace/strace_6.7.bb | 56 - .../subversion/CVE-2024-46901.patch | 161 - .../subversion/subversion_1.14.3.bb | 3 +- .../poky/meta/recipes-devtools/swig/swig.inc | 67 - ...e-for-swig-swiglib-on-non-Win32-plat.patch | 65 - ...re-use-pkg-config-for-pcre-detection.patch | 63 - .../meta/recipes-devtools/swig/swig_4.2.1.bb | 44 +- ...2_fs.h-do-not-carry-an-outdated-copy.patch | 1197 + .../syslinux/syslinux_6.04-pre2.bb | 5 +- ...01-Define-portable-basename-function.patch | 59 + .../systemd-bootchart_235.bb | 1 + .../tcf-agent/tcf-agent_git.bb | 8 +- .../tcltk/tcl/alter-includedir.patch | 11 +- .../tcl/fix_issue_with_old_distro_glibc.patch | 39 - .../tcl/fix_non_native_build_issue.patch | 17 +- .../recipes-devtools/tcltk/tcl/interp.patch | 10 +- .../tcltk/tcl/tcl-add-soname.patch | 11 +- .../tcl-remove-hardcoded-install-path.patch | 17 +- .../meta/recipes-devtools/tcltk/tcl_8.6.13.bb | 111 - .../meta/recipes-devtools/tcltk/tcl_8.6.14.bb | 110 + ...tk4-Preserve-compatibility-with-4.14.patch | 39 - .../recipes-devtools/vala/vala_0.56.15.bb | 76 - .../recipes-devtools/vala/vala_0.56.17.bb | 73 + ...rn-a-valid-exit_code-from-vg_regtest.patch | 7 +- ...e-Drop-setting-mcpu-cortex-a8-on-arm.patch | 40 + .../0001-docs-Disable-manual-validation.patch | 7 +- ...etting-mcpu-to-cortex-a8-on-arm-arch.patch | 40 +- ...check-tests-Fix-timerfd-syscall-test.patch | 16 +- .../0001-tests-arm-Use-O-instead-of-O0.patch | 34 + ....py-regular-expressions-should-use-r.patch | 64 - ...ind-3.22.0-fails-on-assertion-when-l.patch | 147 - .../0003-Add-fchmodat2-syscall-on-linux.patch | 221 - ...ind-incompatibility-with-binutils-2..patch | 137 - ...t-for-PPC-instructions-mfatbu-mfatbl.patch | 14 +- .../valgrind/valgrind/s390x_vec_op_t.patch | 9 +- ...te-march-mcpu-mfpu-for-ARM-test-apps.patch | 7 +- ...-ld-XXX.so-strlen-intercept-optional.patch | 7 +- .../valgrind/valgrind_3.22.0.bb | 276 - .../valgrind/valgrind_3.23.0.bb | 274 + .../recipes-devtools/xmlto/xmlto_0.0.28.bb | 48 - .../recipes-devtools/xmlto/xmlto_0.0.29.bb | 45 + .../acpica/acpica_20240322.bb | 50 - .../acpica/acpica_20240827.bb | 49 + .../acpica/files/CVE-2024-24856.patch | 31 - .../asciidoc/asciidoc_10.2.0.bb | 28 - .../asciidoc/asciidoc_10.2.1.bb | 28 + .../poky/meta/recipes-extended/at/at_3.2.5.bb | 8 +- .../poky/meta/recipes-extended/bash/bash.inc | 2 +- ...T-handler-while-waiting-for-a-child-.patch | 21 +- .../bash/bash/0001-fix-c99.patch | 2 +- .../bash/bash/build-tests.patch | 7 +- .../bash/bash/fix-filesubst-errexit.patch | 7 +- .../bash/bash/fix-run-builtins.patch | 9 +- .../bash/bash/mkbuiltins_have_stringize.patch | 18 +- .../bash/bash/test-output.patch | 11 +- .../bash/bash/use_aclocal.patch | 3 +- .../meta/recipes-extended/bash/bash_5.2.21.bb | 25 - .../meta/recipes-extended/bash/bash_5.2.32.bb | 25 + .../meta/recipes-extended/bc/bc_1.07.1.bb | 2 +- .../recipes-extended/bzip2/bzip2_1.0.8.bb | 28 +- .../meta/recipes-extended/cpio/cpio_2.15.bb | 2 +- ...port-dictionary-byte-order-dependent.patch | 339 - .../cracklib/cracklib_2.10.2.bb | 32 + .../cracklib/cracklib_2.9.11.bb | 33 - .../recipes-extended/cronie/cronie_1.7.2.bb | 7 +- .../poky/meta/recipes-extended/cups/cups.inc | 9 +- .../cups/cups/CVE-2024-47175-1.patch | 73 - .../cups/cups/CVE-2024-47175-2.patch | 151 - .../cups/cups/CVE-2024-47175-3.patch | 119 - .../cups/cups/CVE-2024-47175-4.patch | 249 - .../cups/cups/CVE-2024-47175-5.patch | 40 - .../ethtool/avoid_parallel_tests.patch | 7 +- .../recipes-extended/ethtool/ethtool_6.10.bb | 37 + .../recipes-extended/ethtool/ethtool_6.7.bb | 37 - .../recipes-extended/findutils/findutils.inc | 1 - .../findutils/findutils/autoconf-2.73.patch | 24 - .../findutils/findutils/run-ptest | 28 - .../findutils/findutils_4.10.0.bb | 27 + .../findutils/findutils_4.9.0.bb | 27 - .../ghostscript/ghostscript_10.04.0.bb | 75 + .../ghostscript/ghostscript_10.05.1.bb | 75 - .../go-examples/go-helloworld_0.1.bb | 4 +- .../recipes-extended/hdparm/hdparm_9.65.bb | 1 - ...ed.h-add-missing-sys.types.h-include.patch | 31 - ...e-Add-missing-braces-around-ternary.patch} | 0 ...y-check-conntrack-when-libnfnetlink-.patch | 49 - .../iptables/iptables_1.8.10.bb | 16 +- .../iputils/iputils/CVE-2025-47268.patch | 143 - .../iputils/iputils/CVE-2025-48964.patch | 99 - .../iputils/iputils_20240117.bb | 5 +- .../less/files/CVE-2024-32487.patch | 74 - .../meta/recipes-extended/less/less_643.bb | 62 - .../meta/recipes-extended/less/less_661.bb | 61 + .../libarchive/CVE-2024-48957.patch | 36 + .../libarchive/CVE-2024-48958.patch | 40 + .../libarchive/libarchive/CVE-2025-5914.patch | 48 - .../libarchive/libarchive/CVE-2025-5915.patch | 217 - .../libarchive/libarchive/CVE-2025-5916.patch | 116 - .../libarchive/libarchive/CVE-2025-5917.patch | 54 - .../libarchive/CVE-2025-5918-0001.patch | 326 - .../libarchive/CVE-2025-5918-0002.patch | 222 - .../libarchive/libarchive/configurehack.patch | 11 +- .../libarchive/libarchive_3.7.4.bb | 70 + .../libarchive/libarchive_3.7.9.bb | 72 - .../recipes-extended/libnsl/libnsl2_git.bb | 2 + ...s-Conside-musl-when-wrapping-qsort_r.patch | 5 +- .../libsolv/libsolv_0.7.28.bb | 33 - .../libsolv/libsolv_0.7.30.bb | 33 + .../libtirpc/libtirpc/ipv6.patch | 52 - .../libtirpc/libtirpc_1.3.4.bb | 33 - .../libtirpc/libtirpc_1.3.5.bb | 31 + .../lighttpd/lighttpd_1.4.74.bb | 76 - .../lighttpd/lighttpd_1.4.76.bb | 76 + .../logrotate/logrotate_3.21.0.bb | 114 - .../logrotate/logrotate_3.22.0.bb | 114 + ...-__clear_cache-declaration-for-clang.patch | 32 + ...001-Remove-OOM-tests-from-runtest-mm.patch | 9 +- ...cve-2015-3290-Disable-AVX-for-x86_64.patch | 42 - ...rio_groups-default-remove-connectors.patch | 34 - ...-Use-time_t-instead-of-long-for-type.patch | 54 - .../meta/recipes-extended/ltp/ltp_20240129.bb | 147 - .../meta/recipes-extended/ltp/ltp_20240524.bb | 145 + .../meta/recipes-extended/lzip/lzip_1.24.1.bb | 42 + .../meta/recipes-extended/lzip/lzip_1.24.bb | 42 - ...ariable-declaration-to-function-scop.patch | 9 +- .../recipes-extended/man-db/man-db_2.12.0.bb | 72 - .../recipes-extended/man-db/man-db_2.12.1.bb | 72 + .../0001-GNUmakefile-use-env-from-PATH.patch | 31 - .../0001-man.ml-do-not-use-dev-stdin.patch | 33 - .../man-pages/man-pages_6.06.bb | 50 - .../man-pages/man-pages_6.9.1.bb | 45 + .../meta/recipes-extended/mc/mc_4.8.31.bb | 58 - .../meta/recipes-extended/mc/mc_4.8.32.bb | 58 + ...anup-validate_geometry_ddf_container.patch | 148 - ...sing-_Alignof-when-using-C11-or-newe.patch | 52 - ...parsing-of-r-in-monitor-manager-mode.patch | 74 - ...-corosync-and-dlm-header-files-check.patch | 7 +- .../files/0001-Makefile-install-mdcheck.patch | 9 +- ...t-for-complete-rebuild-in-integrity-.patch | 53 - ...for-implicit-fallthrough-warning-sup.patch | 36 +- ...-fix-gcc-8-format-truncation-warning.patch | 7 +- ...01-include-libgen.h-for-basename-API.patch | 56 + ...-Fix-optional-write-behind-parameter.patch | 45 - ...-y-for-use-syslog-to-recive-event-re.patch | 9 +- ...01-mdadm-skip-test-11spare-migration.patch | 43 - ...h-Undefine-dprintf-before-redefining.patch | 6 +- ...FILE_OFFSET_BITS-to-enable-largefile.patch | 106 +- ...d-a-test-that-validates-raid0-with-l.patch | 41 - ...-Run-udevadm-settle-before-setting-r.patch | 39 - ...ow-clear-the-superblock-at-every-ite.patch | 33 - ...metadata-avoid-passing-chunk-size-to.patch | 41 - ...n-files-for-04update-uuid-and-07reve.patch | 39 - ...ts-fix-raid0-tests-for-0.90-metadata.patch | 102 - ...ts.h-include-for-NAME_MAX-definition.patch | 24 + ...-linux-falloc.h-for-FALLOC_FL_ZERO_R.patch | 27 + ...nter-dereference-in-validate_geometr.patch | 56 - ...se-after-close-bug-by-closing-after-.patch | 91 - ...gfault-when-calling-NULL-get_bad_blo.patch | 42 - ...Mark-and-ignore-broken-test-failures.patch | 128 - ...dd-broken-files-for-all-broken-tests.patch | 454 - .../mdadm/files/debian-no-Werror.patch | 11 +- .../mdadm/files/include_sysmacros.patch | 14 - .../files/mdadm-3.3.2_x32_abi_time_t.patch | 7 +- .../meta/recipes-extended/mdadm/mdadm_4.2.bb | 143 - .../meta/recipes-extended/mdadm/mdadm_4.3.bb | 127 + .../recipes-extended/minicom/minicom_2.9.bb | 2 +- .../recipes-extended/msmtp/msmtp_1.8.25.bb | 27 - .../recipes-extended/msmtp/msmtp_1.8.26.bb | 27 + .../net-tools/CVE-2025-46836-01.patch | 91 - .../net-tools/CVE-2025-46836-02.patch | 31 - .../net-tools/net-tools_2.10.bb | 6 +- ...place-use-of-termio.h-with-termios.h.patch | 39 - .../libpam/0001-pam-inline-pam-asprintf.patch | 101 - .../0001-pam_namespace-include-stdint-h.patch | 42 - ...x-passing-NULL-filename-argument-to-.patch | 69 - .../libpam/0002-pam-namespace-rebase.patch | 750 - .../pam/libpam/CVE-2024-10041-1.patch | 98 - .../pam/libpam/CVE-2024-10041-2.patch | 77 - .../pam/libpam/CVE-2024-22365.patch | 65 - .../pam/libpam/CVE-2025-6020-01.patch | 1128 - .../pam/libpam/CVE-2025-6020-02.patch | 187 - .../pam/libpam/CVE-2025-6020-03.patch | 35 - .../pam/libpam/libpam-xtests.patch | 22 +- .../meta/recipes-extended/pam/libpam_1.5.3.bb | 201 - .../meta/recipes-extended/pam/libpam_1.6.1.bb | 190 + .../recipes-extended/procps/procps_4.0.4.bb | 2 +- .../meta/recipes-extended/psmisc/psmisc.inc | 59 - ...se-UINTPTR_MAX-instead-of-__WORDSIZE.patch | 47 - .../recipes-extended/psmisc/psmisc_23.6.bb | 9 - .../recipes-extended/psmisc/psmisc_23.7.bb | 62 + .../quota/0001-Fix-building-on-musl.patch | 228 + .../recipes-extended/quota/quota/fcntl.patch | 70 - .../meta/recipes-extended/quota/quota_4.09.bb | 2 +- .../0001-systemd-use-EnvironmentFile.patch | 21 +- .../rpcbind/rpcbind/rpcbind.systemd | 3 + .../rpcbind/rpcbind/rpcbind.tmpfiles | 1 + .../recipes-extended/rpcbind/rpcbind_1.2.6.bb | 55 - .../recipes-extended/rpcbind/rpcbind_1.2.7.bb | 65 + .../screen/screen/CVE-2025-46802.patch | 146 - .../screen/screen/CVE-2025-46804.patch | 131 - .../screen/screen/CVE-2025-46805.patch | 101 - .../recipes-extended/screen/screen_4.9.1.bb | 5 +- ...copy_entry-use-temporary-stat-buffer.patch | 39 - ...nexpected-open-failure-in-chroot-env.patch | 9 +- .../shadow/files/shadow-update-pam-conf.patch | 79 +- .../shadow/shadow-securetty_4.6.bb | 5 +- .../shadow/shadow-sysroot_4.6.bb | 3 +- .../meta/recipes-extended/shadow/shadow.inc | 28 +- .../{shadow_4.14.2.bb => shadow_4.16.0.bb} | 0 .../stress-ng/stress-ng_0.17.05.bb | 36 - .../stress-ng/stress-ng_0.18.02.bb | 36 + ...o.conf.in-fix-conflict-with-multilib.patch | 7 +- .../poky/meta/recipes-extended/sudo/sudo.inc | 2 +- .../recipes-extended/sudo/sudo_1.9.15p5.bb | 61 + .../recipes-extended/sudo/sudo_1.9.17p1.bb | 113 - .../sysklogd/sysklogd_2.5.2.bb | 56 - .../sysklogd/sysklogd_2.6.1.bb | 56 + .../sysstat/sysstat_12.7.5.bb | 80 - .../sysstat/sysstat_12.7.6.bb | 80 + .../tcp-wrappers/tcp-wrappers_7.6.bb | 4 +- .../texinfo-dummy-native.bb | 3 +- ...changes-to-build-without-zlib-and-nc.patch | 55 + .../0002-dont-depend-on-help2man.patch | 68 + .../texinfo/0003-texinfo-Update-to-5.1.patch | 28 + .../texinfo/disable-native-tools.patch | 52 - .../texinfo/dont-depend-on-help2man.patch | 66 - .../texinfo/texinfo/link-zip.patch | 23 - .../texinfo/texinfo/use_host_makedoc.patch | 26 - .../recipes-extended/texinfo/texinfo_7.0.3.bb | 90 - .../recipes-extended/texinfo/texinfo_7.1.bb | 90 + .../recipes-extended/timezone/timezone.inc | 6 +- .../watchdog/watchdog-config.bb | 7 +- .../watchdog/watchdog_5.16.bb | 4 +- .../wget/0002-improve-reproducibility.patch | 9 +- .../wget/wget/CVE-2024-10524.patch | 197 - .../meta/recipes-extended/wget/wget_1.21.4.bb | 9 - .../meta/recipes-extended/wget/wget_1.24.5.bb | 8 + .../xinetd/xinetd_2.3.15.4.bb | 6 +- .../xz/xz/CVE-2025-31115-01.patch | 29 - .../xz/xz/CVE-2025-31115-02.patch | 152 - .../xz/xz/CVE-2025-31115-03.patch | 98 - .../xz/xz/CVE-2025-31115-04.patch | 56 - .../poky/meta/recipes-extended/xz/xz_5.4.7.bb | 73 - .../poky/meta/recipes-extended/xz/xz_5.6.2.bb | 72 + ...-use-directly-for-the-test-c-snippet.patch | 39 - .../meta/recipes-extended/zstd/zstd_1.5.5.bb | 47 - .../meta/recipes-extended/zstd/zstd_1.5.6.bb | 46 + .../recipes-gnome/epiphany/epiphany_46.0.bb | 43 - .../recipes-gnome/epiphany/epiphany_46.3.bb | 43 + ...-meson.build-disable-the-use-of-yelp.patch | 2 +- .../epiphany/files/distributor.patch | 4 +- .../epiphany/files/migrator.patch | 2 +- .../poky/meta/recipes-gnome/gcr/gcr_4.2.1.bb | 58 - .../poky/meta/recipes-gnome/gcr/gcr_4.3.0.bb | 58 + .../gdk-pixbuf/gdk-pixbuf/CVE-2025-7345.patch | 55 - .../gdk-pixbuf/gdk-pixbuf_2.42.12.bb | 1 - .../gi-docgen/gi-docgen_2023.3.bb | 21 - .../gi-docgen/gi-docgen_2024.1.bb | 21 + .../gnome/adwaita-icon-theme_45.0.bb | 29 - .../gnome/adwaita-icon-theme_46.2.bb | 29 + ...pository-directory-for-native-builds.patch | 11 +- .../gobject-introspection_1.78.1.bb | 194 - .../gobject-introspection_1.80.1.bb | 214 + .../gsettings-desktop-schemas_46.0.bb | 15 - .../gsettings-desktop-schemas_46.1.bb | 15 + .../recipes-gnome/gtk+/gtk+3/opengl.patch | 97 +- .../meta/recipes-gnome/gtk+/gtk+3_3.24.41.bb | 17 - .../meta/recipes-gnome/gtk+/gtk+3_3.24.43.bb | 17 + .../meta/recipes-gnome/gtk+/gtk4_4.14.1.bb | 135 - .../meta/recipes-gnome/gtk+/gtk4_4.14.5.bb | 135 + ...t-error-out-if-xsltproc-is-not-found.patch | 9 +- ...code-paths-to-perl-python-in-scripts.patch | 23 +- ...01-Don-t-use-docdir-from-environment.patch | 24 - .../gtk-doc/files/conditionaltests.patch | 14 +- .../gtk-doc/files/no-clobber.patch | 7 +- .../gtk-doc/files/pkg-config-native.patch | 3 +- .../recipes-gnome/gtk-doc/gtk-doc_1.33.2.bb | 65 - .../recipes-gnome/gtk-doc/gtk-doc_1.34.0.bb | 64 + .../hicolor-icon-theme_0.17.bb | 18 - .../hicolor-icon-theme_0.18.bb | 17 + .../libadwaita/libadwaita_1.5.2.bb | 26 - .../libadwaita/libadwaita_1.5.3.bb | 26 + .../recipes-gnome/librsvg/librsvg-crates.inc | 418 +- ...-rust-target-to-cargo-also-when-not-.patch | 10 +- .../recipes-gnome/librsvg/librsvg_2.57.1.bb | 80 - .../recipes-gnome/librsvg/librsvg_2.58.2.bb | 80 + ...xb-selftest.c-hardcode-G_TEST_SRCDIR.patch | 9 +- .../recipes-gnome/libxmlb/libxmlb_0.3.15.bb | 25 - .../recipes-gnome/libxmlb/libxmlb_0.3.19.bb | 25 + .../recipes-graphics/builder/builder_0.1.bb | 3 +- .../recipes-graphics/cairo/cairo_1.18.0.bb | 86 - .../recipes-graphics/cairo/cairo_1.18.2.bb | 86 + .../recipes-graphics/drm/libdrm_2.4.120.bb | 59 - .../recipes-graphics/drm/libdrm_2.4.123.bb | 59 + .../freetype/freetype/CVE-2025-27363.patch | 33 - .../freetype/freetype_2.13.2.bb | 47 - .../freetype/freetype_2.13.3.bb | 45 + .../0001-generate-glslang-pkg-config.patch | 10 +- .../glslang/glslang_1.3.275.0.bb | 37 - .../glslang/glslang_1.3.290.0.bb | 37 + .../harfbuzz/harfbuzz_8.3.0.bb | 48 - .../harfbuzz/harfbuzz_9.0.0.bb | 51 + ...rs-Change-header-file-to-GLES3-gl3.h.patch | 2 +- .../recipes-graphics/kmscube/kmscube_git.bb | 2 +- .../libsdl2/libsdl2_2.30.1.bb | 86 - .../libsdl2/libsdl2_2.30.7.bb | 86 + ...tial_2.20.0.bb => libva-initial_2.22.0.bb} | 0 .../libva/libva-utils_2.20.1.bb | 32 - .../libva/libva-utils_2.22.0.bb | 32 + .../meta/recipes-graphics/libva/libva.inc | 2 +- .../{libva_2.20.0.bb => libva_2.22.0.bb} | 0 .../matchbox-session/matchbox-session_0.1.bb | 4 +- .../matchbox-wm/matchbox-wm_1.2.3.bb | 2 +- ...lude-missing-llvm-IR-header-Module.h.patch | 41 + ...on-t-encode-build-path-into-binaries.patch | 78 + .../mesa/{mesa-gl_24.0.7.bb => mesa-gl.bb} | 0 .../mesa/{mesa_24.0.7.bb => mesa.bb} | 0 .../poky/meta/recipes-graphics/mesa/mesa.inc | 8 +- .../mini-x-session/mini-x-session_0.1.bb | 4 +- .../0001-Skip-running-test-layout-test.patch | 45 - .../recipes-graphics/pango/pango/run-ptest | 6 - .../recipes-graphics/pango/pango_1.52.1.bb | 53 - .../recipes-graphics/pango/pango_1.54.0.bb | 39 + ...o-not-obtain-wayland-scanner-path-fr.patch | 38 + ...clude-libgen.h-on-musl-linux-systems.patch | 83 - .../recipes-graphics/piglit/piglit_git.bb | 12 +- .../pong-clock/pong-clock_1.0.bb | 3 +- ...sable-building-external-dependencies.patch | 12 +- .../shaderc/shaderc_2023.8.bb | 29 - .../shaderc/shaderc_2024.1.bb | 29 + .../spir/spirv-headers_1.3.275.0.bb | 20 - .../spir/spirv-headers_1.3.290.0.bb | 20 + ...sion.py-support-an-envvar-to-force-t.patch | 43 + .../spir/spirv-tools_1.3.275.0.bb | 47 - .../spir/spirv-tools_1.3.290.0.bb | 54 + .../ttf-fonts/liberation-fonts_2.1.5.bb | 2 +- .../vulkan/vulkan-headers_1.3.275.0.bb | 28 - .../vulkan/vulkan-headers_1.3.290.0.bb | 28 + .../vulkan/vulkan-loader_1.3.275.0.bb | 43 - .../vulkan/vulkan-loader_1.3.290.0.bb | 43 + .../0001-Deprecate-u8string_view.patch | 59 - ...ot-use-LFS64-functions-on-linux-musl.patch | 37 - .../vulkan/vulkan-samples/32bit.patch | 101 - .../vulkan/vulkan-samples_git.bb | 7 +- .../vulkan/vulkan-tools_1.3.275.0.bb | 37 - .../vulkan/vulkan-tools_1.3.290.0.bb | 37 + .../vulkan-utility-libraries_1.3.275.0.bb | 33 - .../vulkan-utility-libraries_1.3.290.0.bb | 33 + .../vulkan-validation-layers_1.3.275.0.bb | 49 - .../vulkan-validation-layers_1.3.290.0.bb | 49 + .../vulkan/vulkan-volk_1.3.275.0.bb | 37 - .../vulkan/vulkan-volk_1.3.290.0.bb | 37 + ...build-request-native-wayland-scanner.patch | 28 - ...-make-core-protocol-into-the-library.patch | 41 - .../recipes-graphics/waffle/waffle_1.7.2.bb | 51 - .../recipes-graphics/waffle/waffle_1.8.1.bb | 49 + .../wayland/libinput_1.25.0.bb | 49 - .../wayland/libinput_1.26.1.bb | 49 + .../recipes-graphics/wayland/mtdev_1.1.6.bb | 18 - .../recipes-graphics/wayland/mtdev_1.1.7.bb | 17 + .../wayland/wayland-protocols_1.33.bb | 25 - .../wayland/wayland-protocols_1.37.bb | 26 + .../wayland/wayland-utils_1.2.0.bb | 1 + ...build-Fix-strndup-detection-on-MinGW.patch | 9 +- ...der-pkgconfig-sysroot-for-pkgdatadir.patch | 46 - .../wayland/wayland_1.22.0.bb | 62 - .../wayland/wayland_1.23.1.bb | 61 + .../recipes-graphics/wayland/weston-init.bb | 19 +- ...Include-libgen.h-for-basename-signat.patch | 2 +- .../recipes-graphics/wayland/weston_13.0.1.bb | 147 - .../recipes-graphics/wayland/weston_13.0.3.bb | 147 + .../x11-common/xserver-nodm-init_3.0.bb | 5 +- .../pointercal-xinput_0.0.bb | 4 +- .../xinput-calibrator_git.bb | 2 +- .../xorg-app/mkfontscale_1.2.2.bb | 21 - .../xorg-app/mkfontscale_1.2.3.bb | 21 + .../recipes-graphics/xorg-app/xauth_1.1.2.bb | 15 - .../recipes-graphics/xorg-app/xauth_1.1.3.bb | 15 + .../recipes-graphics/xorg-app/xev_1.2.5.bb | 17 - .../recipes-graphics/xorg-app/xev_1.2.6.bb | 17 + .../xorg-driver/xf86-video-intel_git.bb | 2 +- .../xorg-font/encodings_1.0.7.bb | 24 - .../xorg-font/encodings_1.1.0.bb | 24 + .../xorg-lib/libfontenc_1.1.7.bb | 16 - .../xorg-lib/libfontenc_1.1.8.bb | 16 + .../xorg-lib/libpciaccess_0.18.1.bb | 26 + .../xorg-lib/libpciaccess_0.18.bb | 26 - .../xorg-lib/libx11_1.8.10.bb | 43 + .../recipes-graphics/xorg-lib/libx11_1.8.9.bb | 43 - ...-use-_Alignof-to-avoid-UB-in-ALIGNOF.patch | 7 +- .../recipes-graphics/xorg-lib/libxcb_1.16.bb | 38 - .../xorg-lib/libxcb_1.17.0.bb | 38 + .../xorg-lib/libxdmcp_1.1.4.bb | 28 - .../xorg-lib/libxdmcp_1.1.5.bb | 28 + .../xorg-lib/libxfont2_2.0.6.bb | 23 - .../xorg-lib/libxfont2_2.0.7.bb | 23 + .../xorg-lib/libxkbcommon_1.6.0.bb | 40 - .../xorg-lib/libxkbcommon_1.7.0.bb | 40 + .../recipes-graphics/xorg-lib/libxmu_1.1.4.bb | 30 - .../recipes-graphics/xorg-lib/libxmu_1.2.1.bb | 30 + .../xorg-lib/libxtst_1.2.4.bb | 20 - .../xorg-lib/libxtst_1.2.5.bb | 20 + ...6ce00bb79a6b925ed4c2c436e1533e4472aa.patch | 104 + .../xorg-lib/pixman_0.42.2.bb | 1 + .../xorg-lib/xcb-util-errors_1.0.1.bb | 12 + .../xorg-lib/xkeyboard-config_2.41.bb | 32 - .../xorg-lib/xkeyboard-config_2.42.bb | 32 + .../xorg-proto/xcb-proto_1.16.0.bb | 31 - .../xorg-proto/xcb-proto_1.17.0.bb | 31 + .../xorg-proto/xorgproto_2023.2.bb | 25 - .../xorg-proto/xorgproto_2024.1.bb | 25 + .../xorg-util/util-macros_1.20.0.bb | 20 - .../xorg-util/util-macros_1.20.1.bb | 20 + .../xorg-xserver/xserver-xf86-config_0.1.bb | 7 +- .../xorg-xserver/xserver-xorg_21.1.16.bb | 28 + .../xorg-xserver/xserver-xorg_21.1.18.bb | 28 - .../xwayland/xwayland/CVE-2024-9632.patch | 59 - .../xwayland/xwayland/CVE-2025-26594-1.patch | 54 - .../xwayland/xwayland/CVE-2025-26594-2.patch | 51 - .../xwayland/xwayland/CVE-2025-26595.patch | 65 - .../xwayland/xwayland/CVE-2025-26596.patch | 49 - .../xwayland/xwayland/CVE-2025-26597.patch | 46 - .../xwayland/xwayland/CVE-2025-26598.patch | 120 - .../xwayland/xwayland/CVE-2025-26599-1.patch | 66 - .../xwayland/xwayland/CVE-2025-26599-2.patch | 129 - .../xwayland/xwayland/CVE-2025-26600.patch | 68 - .../xwayland/xwayland/CVE-2025-26601-1.patch | 71 - .../xwayland/xwayland/CVE-2025-26601-2.patch | 85 - .../xwayland/xwayland/CVE-2025-26601-3.patch | 52 - .../xwayland/xwayland/CVE-2025-26601-4.patch | 132 - .../xwayland/xwayland/CVE-2025-49175.patch | 92 - .../xwayland/CVE-2025-49176-0001.patch | 93 - .../xwayland/CVE-2025-49176-0002.patch | 38 - .../xwayland/xwayland/CVE-2025-49177.patch | 55 - .../xwayland/xwayland/CVE-2025-49178.patch | 50 - .../xwayland/xwayland/CVE-2025-49179.patch | 69 - .../xwayland/xwayland/CVE-2025-49180.patch | 45 - .../xwayland/xwayland_23.2.5.bb | 67 - .../xwayland/xwayland_24.1.6.bb | 54 + ...plot.py-Ask-for-python3-specifically.patch | 35 + .../recipes-kernel/blktrace/blktrace_git.bb | 4 +- .../dtc/python3-dtschema-wrapper_2021.10.bb | 9 +- ...-add-MFD_NOEXEC_SEAL-flag-explicitly.patch | 46 + ...linux-setup.c-Use-POSIX-basename-API.patch | 54 - ...Fix-add_buffer_phys_virt-align-issue.patch | 50 - ...uilding-on-x86_64-with-binutils-2.41.patch | 95 - .../kexec/kexec-tools_2.0.28.bb | 87 - .../kexec/kexec-tools_2.0.29.bb | 88 + .../kmod/depmodwrapper-cross_1.0.bb | 3 +- ...able-implementation-for-basename-API.patch | 136 - .../kmod/kmod/avoid_parallel_tests.patch | 10 +- .../recipes-kernel/kmod/kmod/gtkdocdir.patch | 9 +- .../poky/meta/recipes-kernel/kmod/kmod_31.bb | 89 - .../poky/meta/recipes-kernel/kmod/kmod_33.bb | 89 + .../libtraceevent/libtraceevent/meson.patch | 74 - .../libtraceevent/libtraceevent_1.7.3.bb | 23 - .../libtraceevent/libtraceevent_1.8.3.bb | 23 + .../linux-firmware/linux-firmware_20240909.bb | 106 +- ...-Fix-invalid-conversion-in-cn_proc.h.patch | 40 - ...eaders.sh-Strip-_UAPI-from-if-define.patch | 38 - .../linux-libc-headers_6.10.bb | 13 + .../linux-libc-headers_6.6.bb | 18 - .../linux/cve-exclusion_6.10.inc | 6660 ++ .../meta/recipes-kernel/linux/linux-dummy.bb | 4 +- .../recipes-kernel/linux/linux-yocto-dev.bb | 4 +- .../linux/linux-yocto-rt_6.10.bb | 48 + .../linux/linux-yocto-rt_6.6.bb | 6 +- .../linux/linux-yocto-tiny_6.10.bb | 33 + .../linux/linux-yocto-tiny_6.6.bb | 6 +- .../recipes-kernel/linux/linux-yocto_6.10.bb | 76 + .../recipes-kernel/linux/linux-yocto_6.6.bb | 28 +- .../recipes-kernel/lttng/babeltrace2_2.0.6.bb | 14 +- .../recipes-kernel/lttng/babeltrace_1.5.11.bb | 2 - ...x-ASoC-snd_doc_dapm-on-linux-6.9-rc1.patch | 93 - ...01-Fix-kfree_skb-changed-in-6.11-rc1.patch | 62 + ...stat_runtime-changed-in-Linux-6.6.66.patch | 12 +- ...e-missing-CONFIG_TRACEPOINTS-to-warn.patch | 12 +- ...ponent-to-set_bias_level-events-in-l.patch | 132 - ...da_reserve_space-changed-in-6.11-rc1.patch | 55 + ...n_migratepages-changed-in-linux-6.9-.patch | 81 - ...emoved-from-btrfs_get_extent-in-6.11.patch | 64 + ...moved-frmo-btrfs_get_extent-in-6.11-.patch | 44 + ...v_base_lock-removed-in-linux-6.9-rc1.patch | 57 - ...removed-from-btrfs_get_extent-in-6.1.patch | 50 + ...omic-write-support-added-in-6.11-rc1.patch | 200 + .../lttng/lttng-modules_2.13.12.bb | 46 - .../lttng/lttng-modules_2.13.14.bb | 49 + .../lttng/lttng-tools_2.13.13.bb | 197 - .../lttng/lttng-tools_2.13.14.bb | 197 + ...es-when-rpath-is-stripped-from-in-bu.patch | 161 - .../0001-Makefile.am-update-rpath-link.patch | 33 + .../recipes-kernel/lttng/lttng-ust_2.13.8.bb | 2 +- .../make-mod-scripts/make-mod-scripts_1.0.bb | 3 +- .../modutils-initscripts.bb | 6 +- .../meta/recipes-kernel/perf/perf-perl.inc | 4 - sources/poky/meta/recipes-kernel/perf/perf.bb | 13 +- .../recipes-kernel/powertop/powertop_2.15.bb | 2 +- ...ve-runtime-linux-uprobes-and-runtime.patch | 40 - ...x-fix-build-against-upcoming-gcc-14-.patch | 40 - ...-broken-libdebuginfod-library-auto-d.patch | 51 - .../0001-prerelease-datestamp-fixes.patch | 23 - ...d-against-upcoming-gcc-14-Werror-cal.patch | 36 - .../systemtap/systemtap_git.inc | 9 +- ...topology-correct-version-script-path.patch | 38 - .../alsa/alsa-lib_1.2.11.bb | 46 - .../alsa/alsa-lib_1.2.12.bb | 44 + ...-arcam_av.c-Include-missing-string.h.patch | 25 - .../alsa/alsa-plugins_1.2.12.bb | 175 + .../alsa/alsa-plugins_1.2.7.1.bb | 176 - .../alsa/alsa-ucm-conf_1.2.11.bb | 24 - .../alsa/alsa-ucm-conf_1.2.12.bb | 24 + .../alsa/alsa-utils_1.2.11.bb | 124 - .../alsa/alsa-utils_1.2.12.bb | 126 + ...figure-improve-check-for-POSIX-ioctl.patch | 48 + ...lpdsp_armv5te-fix-label-format-to-wo.patch | 52 + .../ffmpeg/ffmpeg/CVE-2023-49501.patch | 30 - .../ffmpeg/ffmpeg/CVE-2023-49502.patch | 107 - .../ffmpeg/ffmpeg/CVE-2023-49528.patch | 58 - .../ffmpeg/ffmpeg/CVE-2023-50007.patch | 78 - .../ffmpeg/ffmpeg/CVE-2023-50008.patch | 29 - .../ffmpeg/ffmpeg/CVE-2024-28661.patch | 37 - .../ffmpeg/ffmpeg/CVE-2024-31578.patch | 49 - .../ffmpeg/ffmpeg/CVE-2024-31582.patch | 34 - .../ffmpeg/ffmpeg/CVE-2024-35365.patch | 62 - .../ffmpeg/ffmpeg/CVE-2024-35367.patch | 47 - .../ffmpeg/ffmpeg/CVE-2024-35368.patch | 41 - .../ffmpeg/ffmpeg/CVE-2024-35369.patch | 37 - .../ffmpeg/ffmpeg/CVE-2024-36618.patch | 36 - .../ffmpeg/ffmpeg/CVE-2025-0518.patch | 34 - .../ffmpeg/ffmpeg/CVE-2025-22919.patch | 39 - .../ffmpeg/ffmpeg/CVE-2025-22921.patch | 34 - .../ffmpeg/ffmpeg/CVE-2025-25473.patch | 36 - .../ffmpeg/ffmpeg/av1_ordering_info.patch | 91 - .../ffmpeg/ffmpeg/vulkan_av1_stable_API.patch | 1382 - .../ffmpeg/ffmpeg/vulkan_fix_gcc14.patch | 102 - .../recipes-multimedia/ffmpeg/ffmpeg_6.1.2.bb | 214 - .../recipes-multimedia/ffmpeg/ffmpeg_7.0.2.bb | 187 + ...ct-has-a-different-signature-on-musl.patch | 3 +- .../gstreamer/gst-devtools_1.22.12.bb | 52 - .../gstreamer/gst-devtools_1.24.10.bb | 52 + .../gstreamer/gst-examples_1.18.6.bb | 2 +- .../gstreamer/gstreamer1.0-libav_1.22.12.bb | 28 - .../gstreamer/gstreamer1.0-libav_1.24.10.bb | 29 + .../gstreamer/gstreamer1.0-omx_1.22.12.bb | 47 - ...ialized-warnings-when-compiling-with.patch | 5 +- ...-avoid-including-sys-poll.h-directly.patch | 5 +- ...issing-opencv-data-dir-in-yocto-buil.patch | 19 +- .../gstreamer1.0-plugins-bad_1.22.12.bb | 165 - .../gstreamer1.0-plugins-bad_1.24.10.bb | 167 + ...et-caps-from-src-pad-when-query-caps.patch | 5 +- ...parse-enhance-SSA-text-lines-parsing.patch | 5 +- ...iv-fb-Make-sure-config.h-is-included.patch | 3 +- ...at-most-64-channels-to-NONE-position.patch | 35 - ...at-most-64-channels-to-NONE-position.patch | 41 - ...ck-writes-to-GstOggStream.vorbis_mod.patch | 80 - ...w-and-fix-per-format-min_packet_size.patch | 168 - ...for-closing-brace-after-opening-brac.patch | 38 - ...se-strstr-on-strings-that-are-potent.patch | 99 - ...parsing-extended-header-if-not-enoug.patch | 64 - ...-print-channel-layout-for-more-than-.patch | 38 - ...or-NULL-return-of-strchr-when-parsin.patch | 39 - .../gstreamer1.0-plugins-base_1.22.12.bb | 105 - .../gstreamer1.0-plugins-base_1.24.10.bb | 96 + ...t-gstqtgl.h-instead-of-gst-gl-gstglf.patch | 54 - ...o-sized-boxes-instead-of-stopping-to.patch | 124 - ...ine-ioctl_req_t-for-posix-linux-case.patch | 38 - ...ger-overflow-when-allocating-the-sam.patch | 63 - ...Fix-debug-output-during-trun-parsing.patch | 72 - ...erate-over-all-trun-entries-if-none-.patch | 35 - ...zes-of-stsc-stco-stts-before-trying-.patch | 63 - ...e-only-an-even-number-of-bytes-is-pr.patch | 44 - ...e-enough-data-is-available-before-re.patch | 120 - ...th-checks-and-offsets-in-stsd-entry-.patch | 450 - ...r-handling-when-parsing-cenc-sample-.patch | 56 - ...e-there-are-enough-offsets-to-read-w.patch | 49 - ...-handle-errors-returns-from-various-.patch | 97 - ...r-invalid-atom-length-when-extractin.patch | 36 - ...size-check-for-parsing-SMI-SEQH-atom.patch | 37 - ...ck-if-initializing-the-video-info-ac.patch | 53 - ...ly-unmap-GstMapInfo-in-WavPack-heade.patch | 60 - ...x-off-by-one-when-parsing-multi-chan.patch | 35 - ...eck-for-big-enough-WavPack-codec-pri.patch | 43 - ...n-t-take-data-out-of-an-empty-adapte.patch | 51 - ...ip-over-laces-directly-when-postproc.patch | 52 - ...ip-over-zero-sized-Xiph-stream-heade.patch | 43 - ...t-a-copy-of-the-codec-data-into-the-.patch | 44 - ...ly-error-out-on-negotiation-failures.patch | 99 - ...teger-overflow-when-parsing-Theora-e.patch | 44 - ...size-checks-and-avoid-overflows-when.patch | 46 - ...or-short-reads-when-parsing-headers-.patch | 174 - ...re-enough-data-for-the-tag-list-tag-.patch | 41 - ...7-wavparse-Fix-parsing-of-acid-chunk.patch | 65 - ...hat-at-least-4-bytes-are-available-b.patch | 37 - ...hat-at-least-32-bytes-are-available-.patch | 40 - ...ix-clipping-of-size-to-the-file-size.patch | 47 - ...Check-size-before-reading-ds64-chunk.patch | 41 - .../gstreamer1.0-plugins-good_1.22.12.bb | 113 - .../gstreamer1.0-plugins-good_1.24.10.bb | 81 + .../gstreamer1.0-plugins-ugly_1.22.12.bb | 47 - .../gstreamer1.0-plugins-ugly_1.24.10.bb | 44 + .../gstreamer/gstreamer1.0-python_1.22.12.bb | 30 - .../gstreamer/gstreamer1.0-python_1.24.10.bb | 30 + .../CVE-2024-44331.patch | 44 - .../gstreamer1.0-rtsp-server_1.22.12.bb | 33 - .../gstreamer1.0-rtsp-server_1.24.10.bb | 31 + ...-required-lines-accidentally-removed.patch | 33 + .../gstreamer/gstreamer1.0-vaapi_1.22.12.bb | 53 - .../gstreamer/gstreamer1.0-vaapi_1.24.10.bb | 55 + ...spect-the-idententaion-used-in-meson.patch | 7 +- ...ts-add-support-for-install-the-tests.patch | 21 +- ...s-use-a-dictionaries-for-environment.patch | 7 +- ...er-script-to-run-the-installed_tests.patch | 9 +- ...integer-overflow-when-allocating-sys.patch | 56 - .../gstreamer/gstreamer1.0/run-ptest | 2 +- .../gstreamer/gstreamer1.0_1.22.12.bb | 90 - .../gstreamer/gstreamer1.0_1.24.10.bb | 74 + .../liba52/liba52/buildcleanup.patch | 89 - .../recipes-multimedia/liba52/liba52_0.7.4.bb | 28 - .../libomxil-0.9.3/configure-fix.patch | 58 - .../disable-so-versioning.patch | 36 - .../dynamicloader-linking.patch | 20 - .../libomxil-0.9.3/makefile-docdir-fix.patch | 19 - .../libomxil-0.9.3/parallel-make.patch | 18 - .../libomxil/libomxil_0.9.3.bb | 45 - .../recipes-multimedia/libpng/files/run-ptest | 7 - .../libpng/libpng_1.6.42.bb | 71 - .../libpng/libpng_1.6.43.bb | 33 + .../libsndfile1/CVE-2024-50612.patch | 13 +- ...-1206-from-upstream-to-fix-PIE-build.patch | 156 - ...heck-for-available-arm-optimizations.patch | 55 - ...f-global-symbols-used-in-ARM-specifi.patch | 63 - .../files/61_global-symbol-test.patch | 70 - .../mpeg2dec/files/altivec_h_needed.patch | 43 - .../mpeg2dec/mpeg2dec_0.5.1.bb | 51 - .../mpg123/mpg123_1.32.10.bb | 55 - .../mpg123/mpg123_1.32.7.bb | 55 + .../pulseaudio/pulseaudio.inc | 5 +- .../recipes-multimedia/webp/libwebp_1.3.2.bb | 57 - .../recipes-multimedia/webp/libwebp_1.4.0.bb | 57 + .../x264/Fix-X32-build-by-disabling-asm.patch | 51 - ...don-t-default-to-cortex-a9-with-neon.patch | 33 - .../meta/recipes-multimedia/x264/x264_git.bb | 9 +- ...Allow-for-CC-and-AR-to-be-overridden.patch | 4 +- .../meta/recipes-rt/rt-tests/rt-tests.inc | 4 +- .../meta/recipes-rt/rt-tests/rt-tests_git.bb | 2 +- .../matchbox-desktop/matchbox-desktop_2.3.bb | 2 +- .../matchbox-keyboard_0.1.1.bb | 2 +- .../matchbox-session-sato_0.1.bb | 4 +- .../recipes-sato/pcmanfm/pcmanfm_1.3.2.bb | 2 +- .../pulseaudio-client-conf-sato_1.bb | 4 +- .../meta/recipes-sato/puzzles/puzzles_git.bb | 2 +- .../rxvt-unicode/rxvt-unicode.inc | 6 +- .../settings-daemon/settings-daemon_0.0.2.bb | 2 +- .../shutdown-desktop/shutdown-desktop.bb | 3 +- .../meta/recipes-sato/webkit/libwpe_1.14.2.bb | 18 - .../meta/recipes-sato/webkit/libwpe_1.16.0.bb | 18 + ...1-Fix-build-issues-with-latest-Clang.patch | 251 + .../recipes-sato/webkit/webkitgtk_2.44.3.bb | 3 +- .../0001-remove-hardcoded-path.patch | 6 +- .../0002-Do-not-build-qt-tests.patch | 34 + ...IX_DIR-in-qt-cmake-AppStreamQtConfig.patch | 51 + .../appstream/appstream_1.0.3.bb | 9 + ...default-vector_hash-t.hpp-fix-gcc-15.patch | 42 + .../recipes-support/aspell/aspell_0.60.8.1.bb | 3 +- .../atk/at-spi2-core_2.50.1.bb | 48 - .../atk/at-spi2-core_2.52.0.bb | 50 + .../meta/recipes-support/attr/attr_2.5.1.bb | 5 - .../meta/recipes-support/attr/attr_2.5.2.bb | 5 + .../bash-completion/bash-completion_2.12.0.bb | 38 - .../bash-completion/bash-completion_2.14.0.bb | 38 + .../recipes-support/bmaptool/bmaptool_git.bb | 3 + .../recipes-support/boost/boost-1.84.0.inc | 20 - .../recipes-support/boost/boost-1.86.0.inc | 20 + .../boost/boost-build-native_1.84.0.bb | 28 - .../boost/boost-build-native_1.86.0.bb | 28 + ...h-instruction-set-flags-we-do-that-o.patch | 6 +- ...01-dont-setup-compiler-flags-m32-m64.patch | 12 +- .../boost-math-disable-pch-for-gcc.patch | 8 +- .../{boost_1.84.0.bb => boost_1.86.0.bb} | 0 ...ertdata2pem.py-print-a-warning-for-e.patch | 10 +- ...icates-don-t-use-Debianisms-in-run-p.patch | 6 +- .../ca-certificates_20211016.bb | 89 - .../ca-certificates_20240203.bb | 85 + ...e-struct-so-that-first-apply-ignores.patch | 38 + ...41aadf4adf4f6aeb3f4c0ab489bb89610c36.patch | 64 - .../curl/curl/CVE-2024-11053-0001.patch | 353 - .../curl/curl/CVE-2024-11053-0002.patch | 728 - .../curl/curl/CVE-2024-11053-0003.patch | 130 - .../curl/curl/CVE-2024-6197.patch | 24 - .../curl/curl/CVE-2024-7264-1.patch | 61 - .../curl/curl/CVE-2024-7264-2.patch | 316 - .../curl/curl/CVE-2024-8096.patch | 207 - .../curl/curl/CVE-2024-9681.patch | 8 +- .../curl/curl/CVE-2025-0167.patch | 178 - .../recipes-support/curl/curl/disable-tests | 41 - .../curl/curl/environment.d-curl.sh | 19 - .../meta/recipes-support/curl/curl/run-ptest | 8 +- .../meta/recipes-support/curl/curl_8.7.1.bb | 173 - .../meta/recipes-support/curl/curl_8.9.1.bb | 157 + .../debianutils/debianutils_5.16.bb | 58 - .../debianutils/debianutils_5.20.bb | 58 + .../diffoscope/diffoscope_259.bb | 43 - .../diffoscope/diffoscope_277.bb | 43 + .../recipes-support/enchant/enchant2_2.6.7.bb | 29 - .../recipes-support/enchant/enchant2_2.8.2.bb | 29 + .../recipes-support/fribidi/fribidi_1.0.14.bb | 20 - .../recipes-support/fribidi/fribidi_1.0.15.bb | 20 + .../recipes-support/gdbm/files/ptest.patch | 12 +- .../meta/recipes-support/gdbm/gdbm_1.23.bb | 45 - .../meta/recipes-support/gdbm/gdbm_1.24.bb | 45 + ...erride-init-is-not-needed-with-gcc-9.patch | 7 +- ...-a-custom-value-for-the-location-of-.patch | 7 +- .../0001-fix-compile-failure-with-musl.patch | 36 + ...use-pkgconfig-instead-of-npth-config.patch | 3 +- ...h-fix-find-version-for-beta-checking.patch | 9 +- .../gnupg/gnupg/relocate.patch | 19 +- .../meta/recipes-support/gnupg/gnupg_2.4.8.bb | 84 - .../meta/recipes-support/gnupg/gnupg_2.5.0.bb | 92 + ...ile-should-be-excuted-in-target-envi.patch | 2 +- ...fer-overrun-in-the-pre_shared_key-ex.patch | 34 - ...-length-version-in-certificate-reque.patch | 37 - .../04939b75417cc95b7372c6f208c4bda4579bdc34 | Bin 1782 -> 0 bytes .../3e94dcdff862ef5d6db8b5cc8e59310b5f0cdfe2 | Bin 830 -> 0 bytes .../5477db1bb507a35e8833c758ce344f4b5b246d8e | Bin 111 -> 0 bytes .../gnutls/gnutls/Add-ptest-support.patch | 10 +- .../gnutls/gnutls/CVE-2024-12243.patch | 1149 - .../gnutls/gnutls/CVE-2025-32988.patch | 58 - .../gnutls/gnutls/CVE-2025-32989.patch | 50 - .../gnutls/gnutls/CVE-2025-32990.patch | 2109 - .../gnutls/gnutls/CVE-2025-6395.patch | 299 - .../gnutls/gnutls/arm_eabi.patch | 2 +- .../recipes-support/gnutls/gnutls_3.8.4.bb | 116 - .../recipes-support/gnutls/gnutls_3.8.6.bb | 100 + .../icu/icu/CVE-2025-5222.patch | 166 - ...813_rise_buffer_sizes_pkgdata_PR3058.patch | 72 + .../poky/meta/recipes-support/icu/icu_74-2.bb | 165 - .../poky/meta/recipes-support/icu/icu_75-1.bb | 164 + .../libassuan-add-pkgconfig-support.patch | 35 +- .../libassuan/libassuan_2.5.6.bb | 38 - .../libassuan/libassuan_3.0.1.bb | 38 + .../libatomic-ops/libatomic-ops_7.8.2.bb | 6 +- .../recipes-support/libbsd/libbsd_0.12.1.bb | 47 - .../recipes-support/libbsd/libbsd_0.12.2.bb | 47 + .../libcap-ng/libcap-ng-python_0.8.5.bb | 18 +- .../recipes-support/libcap-ng/libcap-ng.inc | 4 +- .../libcap-ng/libcap-ng_0.8.5.bb | 2 - ..._NAME_CAPS-is-defined-when-it-is-use.patch | 15 +- ...-Raise-the-size-of-arrays-containing.patch | 5 +- ...-tests-do-not-run-target-executables.patch | 3 +- .../libcap/files/CVE-2025-1390.patch | 36 - .../recipes-support/libcap/libcap_2.69.bb | 80 - .../recipes-support/libcap/libcap_2.70.bb | 79 + .../libevdev/libevdev_1.13.1.bb | 17 - .../libevdev/libevdev_1.13.3.bb | 17 + ...001-nls.m4-Take-it-from-gettext-0.15.patch | 54 - .../libfm/libfm-extra_1.3.2.bb | 1 - ...ilding-error-with-O2-in-sysroot-path.patch | 64 - ...01-libgcrypt-fix-m4-file-for-oe-core.patch | 17 +- ...ilding-error-with-O2-in-sysroot-path.patch | 49 + .../libgcrypt/files/no-bench-slope.patch | 12 +- .../libgcrypt/libgcrypt_1.10.3.bb | 55 - .../libgcrypt/libgcrypt_1.11.0.bb | 54 + .../recipes-support/libgit2/libgit2_1.7.2.bb | 21 - .../recipes-support/libgit2/libgit2_1.8.1.bb | 21 + .../libgpg-error/libgpg-error/pkgconfig.patch | 58 +- .../libgpg-error/libgpg-error_1.48.bb | 53 - .../libgpg-error/libgpg-error_1.50.bb | 53 + .../recipes-support/libical/libical_3.0.17.bb | 54 - .../recipes-support/libical/libical_3.0.18.bb | 55 + .../libjitterentropy_3.4.1.bb | 27 - .../libjitterentropy_3.5.0.bb | 27 + .../libksba/ksba-add-pkgconfig-support.patch | 22 +- .../recipes-support/libksba/libksba_1.6.6.bb | 34 - .../recipes-support/libksba/libksba_1.6.7.bb | 34 + ...-cksuite-all-netns.c-disable-route_1.patch | 31 + .../recipes-support/libnl/libnl_3.10.0.bb | 66 + .../meta/recipes-support/libnl/libnl_3.9.0.bb | 64 - .../recipes-support/libpcre/libpcre2_10.43.bb | 55 - .../recipes-support/libpcre/libpcre2_10.44.bb | 55 + .../recipes-support/libpcre/libpcre_8.45.bb | 2 +- .../libproxy/libproxy_0.5.4.bb | 28 - .../libproxy/libproxy_0.5.8.bb | 28 + .../libsoup/libsoup-2.4/CVE-2024-52530.patch | 149 - .../libsoup-2.4/CVE-2024-52531-1.patch | 131 - .../libsoup-2.4/CVE-2024-52531-2.patch | 36 - .../libsoup-2.4/CVE-2024-52532-1.patch | 36 - .../libsoup-2.4/CVE-2024-52532-2.patch | 42 - .../libsoup-2.4/CVE-2024-52532-3.patch | 46 - .../libsoup/libsoup-2.4/CVE-2025-2784.patch | 56 - .../libsoup/libsoup-2.4/CVE-2025-32050.patch | 29 - .../libsoup/libsoup-2.4/CVE-2025-32052.patch | 32 - .../libsoup/libsoup-2.4/CVE-2025-32053.patch | 39 - .../libsoup-2.4/CVE-2025-32906-1.patch | 61 - .../libsoup-2.4/CVE-2025-32906-2.patch | 83 - .../libsoup/libsoup-2.4/CVE-2025-32907.patch | 39 - .../libsoup/libsoup-2.4/CVE-2025-32909.patch | 36 - .../libsoup-2.4/CVE-2025-32910-1.patch | 36 - .../libsoup-2.4/CVE-2025-32910-2.patch | 106 - .../libsoup-2.4/CVE-2025-32910-3.patch | 26 - .../CVE-2025-32911_CVE-2025-32913-1.patch | 72 - .../CVE-2025-32911_CVE-2025-32913-2.patch | 44 - .../libsoup-2.4/CVE-2025-32912-1.patch | 33 - .../libsoup-2.4/CVE-2025-32912-2.patch | 30 - .../libsoup/libsoup-2.4/CVE-2025-32914.patch | 137 - .../libsoup/libsoup-2.4/CVE-2025-4476.patch | 38 - .../libsoup/libsoup-2.4/CVE-2025-46420.patch | 60 - .../libsoup/libsoup-2.4/CVE-2025-46421.patch | 47 - .../libsoup/libsoup-2.4/CVE-2025-4945.patch | 117 - .../libsoup/libsoup-2.4/CVE-2025-4948.patch | 38 - .../libsoup/libsoup-2.4/CVE-2025-4969.patch | 46 - .../libsoup/libsoup-2.4_2.74.3.bb | 31 +- .../libsoup-3.4.4/CVE-2024-52530.patch | 150 - .../libsoup-3.4.4/CVE-2024-52531-1.patch | 116 - .../libsoup-3.4.4/CVE-2024-52531-2.patch | 40 - .../libsoup-3.4.4/CVE-2024-52531-3.patch | 136 - .../libsoup-3.4.4/CVE-2024-52532-0001.patch | 42 - .../libsoup-3.4.4/CVE-2024-52532-0002.patch | 36 - .../libsoup/libsoup-3.4.4/CVE-2025-2784.patch | 137 - .../libsoup-3.4.4/CVE-2025-32050.patch | 29 - .../libsoup-3.4.4/CVE-2025-32051-1.patch | 29 - .../libsoup-3.4.4/CVE-2025-32051-2.patch | 57 - .../libsoup-3.4.4/CVE-2025-32052.patch | 31 - .../libsoup-3.4.4/CVE-2025-32053.patch | 40 - .../libsoup-3.4.4/CVE-2025-32906-1.patch | 61 - .../libsoup-3.4.4/CVE-2025-32906-2.patch | 83 - .../libsoup-3.4.4/CVE-2025-32907-1.patch | 200 - .../libsoup-3.4.4/CVE-2025-32907-2.patch | 68 - .../libsoup-3.4.4/CVE-2025-32908-1.patch | 89 - .../libsoup-3.4.4/CVE-2025-32908-2.patch | 53 - .../libsoup-3.4.4/CVE-2025-32909.patch | 36 - .../libsoup-3.4.4/CVE-2025-32910-1.patch | 98 - .../libsoup-3.4.4/CVE-2025-32910-2.patch | 149 - .../libsoup-3.4.4/CVE-2025-32910-3.patch | 27 - .../CVE-2025-32911_CVE-2025-32913-1.patch | 72 - .../CVE-2025-32911_CVE-2025-32913-2.patch | 44 - .../libsoup-3.4.4/CVE-2025-32912-1.patch | 41 - .../libsoup-3.4.4/CVE-2025-32912-2.patch | 30 - .../libsoup-3.4.4/CVE-2025-32914.patch | 111 - .../libsoup/libsoup-3.4.4/CVE-2025-4476.patch | 38 - .../libsoup-3.4.4/CVE-2025-46420.patch | 60 - .../libsoup-3.4.4/CVE-2025-46421.patch | 139 - .../libsoup/libsoup-3.4.4/CVE-2025-4945.patch | 118 - .../libsoup/libsoup-3.4.4/CVE-2025-4948.patch | 97 - .../libsoup/libsoup-3.4.4/CVE-2025-4969.patch | 76 - .../recipes-support/libsoup/libsoup_3.4.4.bb | 93 - .../recipes-support/libsoup/libsoup_3.6.0.bb | 59 + .../libssh2/0001-disable-DSA-by-default.patch | 173 + .../recipes-support/libssh2/libssh2_1.11.0.bb | 3 +- .../recipes-support/liburcu/liburcu_0.14.0.bb | 24 - .../recipes-support/liburcu/liburcu_0.14.1.bb | 24 + .../recipes-support/libxslt/libxslt_1.1.42.bb | 58 + .../recipes-support/libxslt/libxslt_1.1.43.bb | 58 - .../lz4/lz4/reproducibility.patch | 33 + .../lz4/{files => lz4}/run-ptest | 0 .../meta/recipes-support/lz4/lz4_1.10.0.bb | 46 + .../meta/recipes-support/lz4/lz4_1.9.4.bb | 46 - .../meta/recipes-support/lzop/lzop_1.04.bb | 2 +- .../meta/recipes-support/mpfr/mpfr_4.2.1.bb | 2 + ...get-to-only-build-tests-not-run-them.patch | 21 +- ...der-files-of-openssl-only-if-enable_.patch | 26 +- .../recipes-support/nettle/nettle_3.10.bb | 62 + .../recipes-support/nettle/nettle_3.9.1.bb | 61 - .../recipes-support/nghttp2/nghttp2_1.61.0.bb | 28 - .../recipes-support/nghttp2/nghttp2_1.63.0.bb | 28 + ...em-with-regression-tests-on-recent-g.patch | 43 - .../recipes-support/npth/npth/musl-fix.patch | 37 + .../recipes-support/npth/npth/pkgconfig.patch | 49 - .../meta/recipes-support/npth/npth_1.6.bb | 29 - .../meta/recipes-support/npth/npth_1.7.bb | 21 + .../recipes-support/numactl/numactl_git.bb | 2 +- .../files/fix-parallel-build-failures.patch | 33 - .../recipes-support/p11-kit/p11-kit_0.25.3.bb | 44 - .../recipes-support/p11-kit/p11-kit_0.25.5.bb | 43 + .../gpg-error_pkconf.patch | 56 +- .../libassuan_pkgconf.patch | 24 +- .../pinentry/pinentry_1.2.1.bb | 38 - .../pinentry/pinentry_1.3.1.bb | 38 + .../rng-tools/rng-tools_6.16.bb | 73 - .../rng-tools/rng-tools_6.17.bb | 73 + .../shared-mime-info/shared-mime-info_2.4.bb | 2 +- .../meta/recipes-support/sqlite/sqlite3.inc | 6 +- .../sqlite/sqlite3/CVE-2025-29088.patch | 179 - .../sqlite/sqlite3/CVE-2025-3277.patch | 29 - .../sqlite/sqlite3/CVE-2025-6965.patch | 112 - .../recipes-support/sqlite/sqlite3_3.45.3.bb | 12 - .../recipes-support/sqlite/sqlite3_3.46.1.bb | 8 + .../recipes-support/taglib/taglib_2.0.1.bb | 42 - .../recipes-support/taglib/taglib_2.0.2.bb | 42 + .../user-creation/xuser-account_0.1.bb | 5 +- sources/poky/meta/recipes-support/vim/vim.inc | 5 +- ...EXITCODE-macro-for-non-glibc-systems.patch | 11 +- .../vte/vte/CVE-2024-37535-01.patch | 64 - .../vte/vte/CVE-2024-37535-02.patch | 85 - .../meta/recipes-support/vte/vte_0.74.2.bb | 59 - .../meta/recipes-support/vte/vte_0.76.3.bb | 56 + sources/poky/meta/site/arm-common | 10 - sources/poky/meta/site/arm-darwin | 1 - sources/poky/meta/site/arm-darwin8 | 1 - sources/poky/meta/site/arm-linux | 3 - sources/poky/meta/site/common-glibc | 5 +- sources/poky/meta/site/common-musl | 10 +- sources/poky/meta/site/ix86-common | 12 - sources/poky/meta/site/mips-linux | 12 +- sources/poky/meta/site/mips64-linux | 12 +- sources/poky/meta/site/mips64el-linux | 11 +- sources/poky/meta/site/mipsel-linux | 11 +- sources/poky/meta/site/mipsisa32r6-linux | 12 +- sources/poky/meta/site/mipsisa32r6el-linux | 11 +- sources/poky/meta/site/mipsisa64r6-linux | 12 +- sources/poky/meta/site/mipsisa64r6el-linux | 11 +- sources/poky/meta/site/nios2-linux | 18 - sources/poky/meta/site/powerpc32-linux | 3 - sources/poky/meta/site/sh-common | 6 - sources/poky/meta/site/x86_64-linux | 1 - sources/poky/scripts/cve-json-to-text.py | 147 + sources/poky/scripts/gen-site-config | 43 - sources/poky/scripts/install-buildtools | 4 +- .../build_perf/html/measurement_chart.html | 140 +- .../scripts/lib/build_perf/html/report.html | 124 +- sources/poky/scripts/lib/build_perf/report.py | 5 +- sources/poky/scripts/lib/devtool/standard.py | 201 +- sources/poky/scripts/lib/devtool/upgrade.py | 59 +- sources/poky/scripts/lib/recipetool/append.py | 6 +- sources/poky/scripts/lib/recipetool/create.py | 44 +- .../poky/scripts/lib/recipetool/create_go.py | 4 +- .../poky/scripts/lib/recipetool/create_npm.py | 95 +- sources/poky/scripts/lib/resulttool/junit.py | 77 + sources/poky/scripts/lib/resulttool/store.py | 1 + sources/poky/scripts/lib/scriptutils.py | 15 +- .../lib/wic/canned-wks/efi-bootdisk.wks.in | 2 +- .../lib/wic/plugins/source/bootimg-efi.py | 2 +- .../wic/plugins/source/bootimg-partition.py | 39 +- .../scripts/lib/wic/plugins/source/rootfs.py | 2 +- sources/poky/scripts/makefile-getvar | 24 + sources/poky/scripts/oe-build-perf-report | 8 +- sources/poky/scripts/oe-debuginfod | 8 +- sources/poky/scripts/oe-setup-build | 6 +- sources/poky/scripts/patchtest.README | 60 +- sources/poky/scripts/pull-sdpx-licenses.py | 101 + .../pybootchartgui/pybootchartgui/parsing.py | 10 +- sources/poky/scripts/resulttool | 5 + sources/poky/scripts/runqemu | 5 +- 4642 files changed, 147042 insertions(+), 222420 deletions(-) create mode 100644 sources/meta-openembedded/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/files/0001-unistr.c-Fix-use-after-free-in-ntfs_uppercase_mbs.patch delete mode 100644 sources/meta-openembedded/meta-filesystems/recipes-filesystems/zfs/zfs_2.2.2.bb create mode 100644 sources/meta-openembedded/meta-filesystems/recipes-filesystems/zfs/zfs_2.2.5.bb delete mode 100644 sources/meta-openembedded/meta-filesystems/recipes-support/composefs/composefs_1.0.3.bb delete mode 100644 sources/meta-openembedded/meta-filesystems/recipes-support/composefs/files/0001-musl-basename-use-portable-implementation-for-basena.patch create mode 100644 sources/meta-openembedded/meta-filesystems/recipes-utils/e2tools/files/0001-Disable-portability-warning-as-error.patch delete mode 100644 sources/meta-openembedded/meta-filesystems/recipes-utils/exfatprogs/exfatprogs_1.2.2.bb create mode 100644 sources/meta-openembedded/meta-filesystems/recipes-utils/exfatprogs/exfatprogs_1.2.5.bb create mode 100644 sources/meta-openembedded/meta-filesystems/recipes-utils/overlayfs/overlayfs-tools/0001-always-use-glibc-basename.patch create mode 100644 sources/meta-openembedded/meta-filesystems/recipes-utils/overlayfs/overlayfs-tools/0002-Change-program_name-to-have-const-attribute.patch delete mode 100644 sources/meta-openembedded/meta-filesystems/recipes-utils/overlayfs/overlayfs-tools_git.bb create mode 100644 sources/meta-openembedded/meta-filesystems/recipes-utils/overlayfs/overlayfs-tools_v2024.07.bb delete mode 100644 sources/meta-openembedded/meta-filesystems/recipes-utils/xfsdump/xfsdump_3.1.12.bb create mode 100644 sources/meta-openembedded/meta-filesystems/recipes-utils/xfsdump/xfsdump_3.2.0.bb delete mode 100644 sources/meta-openembedded/meta-gnome/dynamic-layers/meta-virtualization/recipes-gnome/gnome-boxes/gnome-boxes_46.0.bb create mode 100644 sources/meta-openembedded/meta-gnome/dynamic-layers/meta-virtualization/recipes-gnome/gnome-boxes/gnome-boxes_46.1.bb delete mode 100644 sources/meta-openembedded/meta-gnome/recipes-connectivity/folks/folks_0.15.8.bb create mode 100644 sources/meta-openembedded/meta-gnome/recipes-connectivity/folks/folks_0.15.9.bb create mode 100644 sources/meta-openembedded/meta-gnome/recipes-connectivity/geary/geary/0001-application-client.vala-hardcode-some-paths.patch delete mode 100644 sources/meta-openembedded/meta-gnome/recipes-connectivity/geary/geary/0001-meson-Use-PKG_CONFIG_SYSROOT_DIR-when-using-pkg-conf.patch delete mode 100644 sources/meta-openembedded/meta-gnome/recipes-connectivity/geary/geary_44.1.bb create mode 100644 sources/meta-openembedded/meta-gnome/recipes-connectivity/geary/geary_46.0.bb create mode 100644 sources/meta-openembedded/meta-gnome/recipes-gimp/gimp/gimp/0001-file-tiff-load-fix-mismatching-variable-type.patch create mode 100644 sources/meta-openembedded/meta-gnome/recipes-gimp/gimp/gimp/0001-gimptool-allow-default-CC-override.patch create mode 100644 sources/meta-openembedded/meta-gnome/recipes-gimp/gimp/gimp/0001-metadata-shut-up-a-weird-warning.patch delete mode 100644 sources/meta-openembedded/meta-gnome/recipes-gimp/gimp/gimp_2.10.36.bb create mode 100644 sources/meta-openembedded/meta-gnome/recipes-gimp/gimp/gimp_2.10.38.bb delete mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/eog/eog_45.3.bb create mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/eog/eog_47.0.bb delete mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/evince/evince_46.0.bb create mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/evince/evince_46.3.bb delete mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/file-roller/file-roller_44.1.bb create mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/file-roller/file-roller_44.3.bb delete mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/gedit/libgedit-gtksourceview_299.1.0.bb create mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/gedit/libgedit-gtksourceview_299.2.1.bb delete mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/gexiv2/gexiv2_0.14.2.bb create mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/gexiv2/gexiv2_0.14.3.bb delete mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-autoar/gnome-autoar_0.4.4.bb create mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-autoar/gnome-autoar_0.4.5.bb delete mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-backgrounds/gnome-backgrounds_46.0.bb create mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-backgrounds/gnome-backgrounds_47.0.bb delete mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-bluetooth/gnome-bluetooth_46.0.bb create mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-bluetooth/gnome-bluetooth_46.1.bb delete mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-calculator/gnome-calculator_46.0.bb create mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-calculator/gnome-calculator_46.1.bb delete mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-chess/gnome-chess_46.0.bb create mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-chess/gnome-chess_47.0.bb delete mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-control-center/gnome-control-center_46.1.bb create mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-control-center/gnome-control-center_46.2.bb delete mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-desktop/gnome-desktop_44.0.bb create mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-desktop/gnome-desktop_44.1.bb delete mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-disk-utility/gnome-disk-utility_46.0.bb create mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-disk-utility/gnome-disk-utility_46.1.bb delete mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-font-viewer/gnome-font-viewer_46.0.bb create mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-font-viewer/gnome-font-viewer_47.0.bb delete mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-keyring/gnome-keyring_46.1.bb create mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-keyring/gnome-keyring_46.2.bb delete mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-online-accounts/gnome-online-accounts_3.50.1.bb create mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-online-accounts/gnome-online-accounts_3.50.2.bb delete mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-shell/gnome-shell-extensions_46.1.bb create mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-shell/gnome-shell-extensions_46.2.bb delete mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-shell/gnome-shell/0002-screencast-Correct-expected-bus-name-for-streams.patch delete mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-shell/gnome-shell_46.1.bb create mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-shell/gnome-shell_46.2.bb delete mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-software/gnome-software_46.0.bb create mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-software/gnome-software_46.2.bb delete mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-text-editor/gnome-text-editor_46.1.bb create mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-text-editor/gnome-text-editor_46.3.bb create mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/libgsf/libgsf/0001-Compilation-attempt-fixes-for-libxml-2.13.patch create mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/libgsf/libgsf_1.14.52.bb delete mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/libgsf/libgsf_1.14.53.bb create mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/libspelling/libspelling_0.2.1.bb delete mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/msgraph/msgraph_0.2.1.bb create mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/msgraph/msgraph_0.2.3.bb delete mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/mutter/mutter_46.1.bb create mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/mutter/mutter_46.4.bb delete mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/nautilus/nautilus_45.1.bb create mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/nautilus/nautilus_46.2.bb create mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/sysprof/sysprof/0001-libsysprof-Check-for-unw_set_caching_policy-before-u.patch create mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/sysprof/sysprof/0002-meson-Do-not-invoke-the-commands-to-update-the-icon-.patch delete mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/sysprof/sysprof_3.44.0.bb create mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/sysprof/sysprof_3.48.0.bb delete mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/tecla/tecla_46.0.bb create mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/tecla/tecla_47.0.bb delete mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/tracker/tracker-miners_3.7.1.bb create mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/tracker/tracker-miners_3.7.3.bb delete mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/tracker/tracker_3.7.1.bb create mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/tracker/tracker_3.7.3.bb delete mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/zenity/zenity_4.0.1.bb create mode 100644 sources/meta-openembedded/meta-gnome/recipes-gnome/zenity/zenity_4.0.2.bb delete mode 100644 sources/meta-openembedded/meta-gnome/recipes-support/colord-gtk/colord-gtk_0.3.0.bb create mode 100644 sources/meta-openembedded/meta-gnome/recipes-support/colord-gtk/colord-gtk_0.3.1.bb delete mode 100644 sources/meta-openembedded/meta-gnome/recipes-support/xdg-desktop-portal/xdg-desktop-portal-gnome_46.1.bb create mode 100644 sources/meta-openembedded/meta-gnome/recipes-support/xdg-desktop-portal/xdg-desktop-portal-gnome_46.2.bb delete mode 100644 sources/meta-openembedded/meta-initramfs/recipes-devtools/dracut/dracut/0001-Guard-against-__GLIBC_PREREQ-for-musl-libc.patch create mode 100644 sources/meta-openembedded/meta-initramfs/recipes-devtools/dracut/dracut/0001-feat-dracut-install-split-ldd-command-arguments-for-.patch delete mode 100644 sources/meta-openembedded/meta-initramfs/recipes-devtools/dracut/dracut/0001-install-Do-not-undef-_FILE_OFFSET_BITS.patch delete mode 100644 sources/meta-openembedded/meta-initramfs/recipes-devtools/dracut/dracut/0001-util.h-include-sys-reg.h-when-libc-glibc.patch delete mode 100644 sources/meta-openembedded/meta-initramfs/recipes-devtools/dracut/dracut_056.bb create mode 100644 sources/meta-openembedded/meta-initramfs/recipes-devtools/dracut/dracut_103.bb delete mode 100644 sources/meta-openembedded/meta-multimedia/recipes-connectivity/rygel/rygel_0.42.5.bb create mode 100644 sources/meta-openembedded/meta-multimedia/recipes-connectivity/rygel/rygel_0.44.0.bb create mode 100644 sources/meta-openembedded/meta-multimedia/recipes-dvb/oscam/oscam_1.20.bb delete mode 100644 sources/meta-openembedded/meta-multimedia/recipes-dvb/oscam/oscam_svn.bb create mode 100644 sources/meta-openembedded/meta-multimedia/recipes-multimedia/bluealsa/bluealsa/0001-Use-basename-implementation-from-glib-2.0.patch create mode 100644 sources/meta-openembedded/meta-multimedia/recipes-multimedia/bluealsa/bluealsa_4.3.0.bb delete mode 100644 sources/meta-openembedded/meta-multimedia/recipes-multimedia/bluealsa/bluealsa_git.bb delete mode 100644 sources/meta-openembedded/meta-multimedia/recipes-multimedia/dav1d/dav1d_1.4.1.bb create mode 100644 sources/meta-openembedded/meta-multimedia/recipes-multimedia/dav1d/dav1d_1.4.3.bb create mode 100644 sources/meta-openembedded/meta-multimedia/recipes-multimedia/flite/flite/0001-Remove-defining-const-as-nothing.patch delete mode 100644 sources/meta-openembedded/meta-multimedia/recipes-multimedia/gerbera/gerbera_2.0.0.bb create mode 100644 sources/meta-openembedded/meta-multimedia/recipes-multimedia/gerbera/gerbera_2.2.0.bb create mode 100644 sources/meta-openembedded/meta-multimedia/recipes-multimedia/libcamera/libcamera/0001-rpi-Use-malloc-instead-of-variable-length-arrays.patch create mode 100644 sources/meta-openembedded/meta-multimedia/recipes-multimedia/libcamera/libcamera/0002-options-Replace-use-of-VLAs-in-C.patch create mode 100644 sources/meta-openembedded/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.3.0.bb delete mode 100644 sources/meta-openembedded/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.4.0.bb create mode 100644 sources/meta-openembedded/meta-multimedia/recipes-multimedia/minidlna/minidlna/0001-Add-compatibility-with-FFMPEG-7.0.patch delete mode 100644 sources/meta-openembedded/meta-multimedia/recipes-multimedia/minidlna/minidlna/0001-Update-Gettext-version.patch delete mode 100644 sources/meta-openembedded/meta-multimedia/recipes-multimedia/minidlna/minidlna/0001-configure.ac-drop-non-standard-checks.patch delete mode 100644 sources/meta-openembedded/meta-multimedia/recipes-multimedia/minidlna/minidlna_1.3.0.bb create mode 100644 sources/meta-openembedded/meta-multimedia/recipes-multimedia/minidlna/minidlna_1.3.3.bb rename sources/meta-openembedded/meta-multimedia/recipes-multimedia/musicpd/{libmpdclient_2.20.bb => libmpdclient_2.22.bb} (100%) rename sources/meta-openembedded/meta-multimedia/recipes-multimedia/musicpd/{mpc_0.34.bb => mpc_0.35.bb} (100%) delete mode 100644 sources/meta-openembedded/meta-multimedia/recipes-multimedia/musicpd/mpd/0001-patch-src_decoder_plugins_FfmpegIo.cxx.patch delete mode 100644 sources/meta-openembedded/meta-multimedia/recipes-multimedia/musicpd/mpd_0.23.14.bb create mode 100644 sources/meta-openembedded/meta-multimedia/recipes-multimedia/musicpd/mpd_0.23.16.bb create mode 100644 sources/meta-openembedded/meta-multimedia/recipes-multimedia/pipewire/pipewire-0.2/0001-module-suspend-on-idle-Include-time.h-for-struct-tim.patch delete mode 100644 sources/meta-openembedded/meta-multimedia/recipes-multimedia/pipewire/pipewire_1.0.9.bb create mode 100644 sources/meta-openembedded/meta-multimedia/recipes-multimedia/pipewire/pipewire_1.2.3.bb create mode 100644 sources/meta-openembedded/meta-multimedia/recipes-multimedia/sox/sox/0001-tests-Include-math.h-for-fabs-definition.patch delete mode 100644 sources/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc_3.0.20.bb create mode 100644 sources/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc_3.0.21.bb create mode 100644 sources/meta-openembedded/meta-multimedia/recipes-multimedia/vorbis-tools/vorbis-tools/CVE-2023-43361.patch delete mode 100644 sources/meta-openembedded/meta-multimedia/recipes-multimedia/wireplumber/wireplumber_0.5.1.bb create mode 100644 sources/meta-openembedded/meta-multimedia/recipes-multimedia/wireplumber/wireplumber_0.5.6.bb delete mode 100644 sources/meta-openembedded/meta-networking/recipes-connectivity/blueman/blueman/0001-Search-for-cython3.patch delete mode 100644 sources/meta-openembedded/meta-networking/recipes-connectivity/blueman/blueman/0001-meson-add-pythoninstalldir-option.patch delete mode 100644 sources/meta-openembedded/meta-networking/recipes-connectivity/blueman/blueman/0002-fix-fail-to-enable-bluetooth.patch delete mode 100644 sources/meta-openembedded/meta-networking/recipes-connectivity/blueman/blueman_2.3.5.bb create mode 100644 sources/meta-openembedded/meta-networking/recipes-connectivity/blueman/blueman_2.4.3.bb delete mode 100644 sources/meta-openembedded/meta-networking/recipes-connectivity/daq/libdaq_3.0.14.bb create mode 100644 sources/meta-openembedded/meta-networking/recipes-connectivity/daq/libdaq_3.0.16.bb delete mode 100644 sources/meta-openembedded/meta-networking/recipes-connectivity/libiec61850/libiec61850_1.5.1.bb create mode 100644 sources/meta-openembedded/meta-networking/recipes-connectivity/libiec61850/libiec61850_1.5.3.bb delete mode 100644 sources/meta-openembedded/meta-networking/recipes-connectivity/mbedtls/mbedtls_2.28.10.bb create mode 100644 sources/meta-openembedded/meta-networking/recipes-connectivity/mbedtls/mbedtls_2.28.9.bb create mode 100644 sources/meta-openembedded/meta-networking/recipes-connectivity/mbedtls/mbedtls_3.6.1.bb delete mode 100644 sources/meta-openembedded/meta-networking/recipes-connectivity/mbedtls/mbedtls_3.6.3.bb create mode 100644 sources/meta-openembedded/meta-networking/recipes-connectivity/mosquitto/files/1571.patch create mode 100644 sources/meta-openembedded/meta-networking/recipes-connectivity/mosquitto/files/2894.patch create mode 100644 sources/meta-openembedded/meta-networking/recipes-connectivity/mosquitto/mosquitto_2.0.18.bb delete mode 100644 sources/meta-openembedded/meta-networking/recipes-connectivity/mosquitto/mosquitto_2.0.20.bb delete mode 100644 sources/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn_1.10.2.bb create mode 100644 sources/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn_1.12.0.bb create mode 100644 sources/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-libnm-systemd-core-Disable-sd_dhcp6_client_set_duid_.patch delete mode 100644 sources/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.46.0.bb create mode 100644 sources/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.48.10.bb delete mode 100644 sources/meta-openembedded/meta-networking/recipes-connectivity/openfortivpn/openfortivpn_1.22.0.bb create mode 100644 sources/meta-openembedded/meta-networking/recipes-connectivity/openfortivpn/openfortivpn_1.22.1.bb delete mode 100644 sources/meta-openembedded/meta-networking/recipes-connectivity/snort/snort3_3.1.84.0.bb create mode 100644 sources/meta-openembedded/meta-networking/recipes-connectivity/snort/snort3_3.3.4.0.bb delete mode 100644 sources/meta-openembedded/meta-networking/recipes-connectivity/wolfssl/files/run-ptest delete mode 100644 sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-Bug-fix-for-pid_t-not-found-on-musl.patch delete mode 100644 sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-Define-__SWORD_TYPE-and-_PATH_NSSWITCH_CONF.patch delete mode 100644 sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-Define-__SWORD_TYPE-if-undefined.patch delete mode 100644 sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-Do-not-hardcode-path-for-pkg.m4.patch delete mode 100644 sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-autofs-5.1.8-add-autofs_strerror_r-helper-for-musl.patch delete mode 100644 sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-include-libgen.h-for-basename.patch delete mode 100644 sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-modules-lookup_multi.c-Replace-__S_IEXEC-with-S_IEXE.patch create mode 100644 sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-no-bash.patch delete mode 100644 sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0002-Replace-__S_IEXEC-with-S_IEXEC.patch delete mode 100644 sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0002-autofs-5.1.8-handle-innetgr-not-present-in-musl.patch create mode 100644 sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0002-using-pkg-config-to-detect-krb5.patch create mode 100644 sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0003-force-STRIP-to-emtpy.patch create mode 100644 sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0004-autofs.init.in-remove-bashism.patch create mode 100644 sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0005-fix-the-YACC-rule-to-fix-a-building-failure.patch create mode 100644 sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0006-Do-not-hardcode-path-for-pkg.m4.patch create mode 100644 sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0007-Avoid-conflicts-between-sys-mount.h-and-linux-mount..patch create mode 100644 sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0008-include-libgen.h-for-basename.patch create mode 100644 sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0009-hash.h-include-sys-reg.h-instead-of-bits-reg.h.patch create mode 100644 sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0010-autofs-5.1.9-Fix-incompatible-function-pointer-types.patch delete mode 100644 sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/add-the-needed-stdarg.h.patch delete mode 100644 sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/autofs-5.0.7-fix-lib-deps.patch delete mode 100644 sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/cross.patch delete mode 100644 sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/fix-the-YACC-rule-to-fix-a-building-failure.patch delete mode 100644 sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/fix_disable_ldap.patch delete mode 100644 sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/force-STRIP-to-emtpy.patch delete mode 100644 sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/mount_conflict.patch delete mode 100644 sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/no-bash.patch delete mode 100644 sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/pkgconfig-libnsl.patch delete mode 100644 sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/remove-bashism.patch delete mode 100644 sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/using-pkg-config-to-detect-libxml-2.0-and-krb5.patch delete mode 100644 sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs_5.1.8.bb create mode 100644 sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs_5.1.9.bb create mode 100644 sources/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.1.10.bb delete mode 100644 sources/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.1.8.bb delete mode 100644 sources/meta-openembedded/meta-networking/recipes-daemons/proftpd/files/CVE-2024-57392.patch delete mode 100644 sources/meta-openembedded/meta-networking/recipes-daemons/proftpd/proftpd_1.3.7c.bb create mode 100644 sources/meta-openembedded/meta-networking/recipes-daemons/proftpd/proftpd_1.3.8b.bb delete mode 100644 sources/meta-openembedded/meta-networking/recipes-daemons/squid/files/CVE-2024-37894.patch create mode 100644 sources/meta-openembedded/meta-networking/recipes-daemons/squid/squid_6.10.bb delete mode 100644 sources/meta-openembedded/meta-networking/recipes-daemons/squid/squid_6.9.bb delete mode 100644 sources/meta-openembedded/meta-networking/recipes-extended/tgt/files/CVE-2024-45751.patch delete mode 100644 sources/meta-openembedded/meta-networking/recipes-filter/arno-iptables-firewall/arno-iptables-firewall_2.1.1.bb create mode 100644 sources/meta-openembedded/meta-networking/recipes-filter/arno-iptables-firewall/arno-iptables-firewall_2.1.2.bb delete mode 100644 sources/meta-openembedded/meta-networking/recipes-filter/ipset/ipset_7.21.bb create mode 100644 sources/meta-openembedded/meta-networking/recipes-filter/ipset/ipset_7.22.bb delete mode 100644 sources/meta-openembedded/meta-networking/recipes-filter/libnftnl/libnftnl_1.2.6.bb create mode 100644 sources/meta-openembedded/meta-networking/recipes-filter/libnftnl/libnftnl_1.2.7.bb delete mode 100644 sources/meta-openembedded/meta-networking/recipes-filter/nftables/nftables/0001-tests-shell-Fix-sets-reset_command_0-for-current-ker.patch delete mode 100644 sources/meta-openembedded/meta-networking/recipes-filter/nftables/nftables/0001-tests-shell-skip-secmark-tests-if-kernel-does-not-su.patch delete mode 100644 sources/meta-openembedded/meta-networking/recipes-filter/nftables/nftables_1.0.9.bb create mode 100644 sources/meta-openembedded/meta-networking/recipes-filter/nftables/nftables_1.1.0.bb create mode 100644 sources/meta-openembedded/meta-networking/recipes-protocols/freediameter/files/0001-bison-flex-Add-flags-for-carrying-user-specified-par.patch delete mode 100644 sources/meta-openembedded/meta-networking/recipes-protocols/frr/frr/0001-zebra-Mimic-GNU-basename-API-for-non-glibc-library-e.patch delete mode 100644 sources/meta-openembedded/meta-networking/recipes-protocols/frr/frr/CVE-2024-31948.patch delete mode 100644 sources/meta-openembedded/meta-networking/recipes-protocols/frr/frr/CVE-2024-31949.patch delete mode 100644 sources/meta-openembedded/meta-networking/recipes-protocols/frr/frr/CVE-2024-31950.patch delete mode 100644 sources/meta-openembedded/meta-networking/recipes-protocols/frr/frr/CVE-2024-31951.patch delete mode 100644 sources/meta-openembedded/meta-networking/recipes-protocols/frr/frr/CVE-2024-34088.patch create mode 100644 sources/meta-openembedded/meta-networking/recipes-protocols/frr/frr_10.1.1.bb delete mode 100644 sources/meta-openembedded/meta-networking/recipes-protocols/frr/frr_9.1.bb delete mode 100644 sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0015-Add-missing-limits.h.patch delete mode 100644 sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns_2200.100.94.0.2.bb create mode 100644 sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns_2200.140.11.bb create mode 100644 sources/meta-openembedded/meta-networking/recipes-protocols/openflow/openflow/0001-Link-in-libexecinfo-if-it-has-backtrace-API.patch create mode 100644 sources/meta-openembedded/meta-networking/recipes-protocols/vsomeip/vsomeip/0001-Update-to-C-17-560.patch create mode 100644 sources/meta-openembedded/meta-networking/recipes-protocols/vsomeip/vsomeip/0002-network_tests-Include-iomanip-system-header.patch create mode 100644 sources/meta-openembedded/meta-networking/recipes-support/curlpp/curlpp/0002-fix-invalid-conversion-from-int-to-CURLoption.patch delete mode 100755 sources/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/dnsmasq.conf delete mode 100644 sources/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils/0001-configure.ac-Add-an-option-to-disable-host-udev-vers.patch delete mode 100644 sources/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils_9.27.0.bb create mode 100644 sources/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils_9.28.0.bb delete mode 100644 sources/meta-openembedded/meta-networking/recipes-support/fping/fping/0001-fping-Initialize-msghdr-struct-in-a-portable-way.patch delete mode 100644 sources/meta-openembedded/meta-networking/recipes-support/fping/fping_5.1.bb create mode 100644 sources/meta-openembedded/meta-networking/recipes-support/fping/fping_5.2.bb delete mode 100644 sources/meta-openembedded/meta-networking/recipes-support/fwknop/fwknop/0001-Fix-compilation-with-GCC-s-fno-common-flag-fixes-305.patch delete mode 100644 sources/meta-openembedded/meta-networking/recipes-support/fwknop/fwknop/0001-configure.ac-Fix-missing-comma-in-AS_IF.patch delete mode 100644 sources/meta-openembedded/meta-networking/recipes-support/fwknop/fwknop_2.6.10.bb create mode 100644 sources/meta-openembedded/meta-networking/recipes-support/fwknop/fwknop_2.6.11.bb delete mode 100644 sources/meta-openembedded/meta-networking/recipes-support/libconfuse/libconfuse_3.3.bb delete mode 100644 sources/meta-openembedded/meta-networking/recipes-support/libtdb/libtdb_1.4.10.bb create mode 100644 sources/meta-openembedded/meta-networking/recipes-support/libtdb/libtdb_1.4.12.bb delete mode 100644 sources/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools_1.0.19.bb create mode 100644 sources/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools_1.0.20.bb create mode 100644 sources/meta-openembedded/meta-networking/recipes-support/nbd/nbd/0001-nbd-client-Fix-build-on-musl-gcc14.patch create mode 100644 sources/meta-openembedded/meta-networking/recipes-support/nbd/nbd/f0418b0d8b54c21a1e5b0c6dce3277e938d07e7c.patch delete mode 100644 sources/meta-openembedded/meta-networking/recipes-support/nbd/nbd_3.24.bb create mode 100644 sources/meta-openembedded/meta-networking/recipes-support/nbd/nbd_3.26.1.bb create mode 100644 sources/meta-openembedded/meta-networking/recipes-support/ntopng/files/0001-Follow-rrd-post-1.8-change.patch delete mode 100644 sources/meta-openembedded/meta-networking/recipes-support/ntp/ntp_4.2.8p17.bb create mode 100644 sources/meta-openembedded/meta-networking/recipes-support/ntp/ntp_4.2.8p18.bb delete mode 100644 sources/meta-openembedded/meta-networking/recipes-support/open-vm-tools/open-vm-tools_12.3.5.bb create mode 100644 sources/meta-openembedded/meta-networking/recipes-support/open-vm-tools/open-vm-tools_12.4.5.bb create mode 100644 sources/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn_2.6.12.bb delete mode 100644 sources/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn_2.6.14.bb create mode 100644 sources/meta-openembedded/meta-networking/recipes-support/rdma-core/rdma-core/0001-librdmacm-Use-overloadable-function-attribute-with-c.patch delete mode 100644 sources/meta-openembedded/meta-networking/recipes-support/smcroute/smcroute_2.5.6.bb create mode 100644 sources/meta-openembedded/meta-networking/recipes-support/smcroute/smcroute_2.5.7.bb delete mode 100644 sources/meta-openembedded/meta-networking/recipes-support/sngrep/sngrep_1.8.1.bb create mode 100644 sources/meta-openembedded/meta-networking/recipes-support/sngrep/sngrep_1.8.2.bb delete mode 100644 sources/meta-openembedded/meta-networking/recipes-support/spice/usbredir_0.13.0.bb create mode 100644 sources/meta-openembedded/meta-networking/recipes-support/spice/usbredir_0.14.0.bb delete mode 100644 sources/meta-openembedded/meta-networking/recipes-support/stunnel/stunnel_5.72.bb create mode 100644 sources/meta-openembedded/meta-networking/recipes-support/stunnel/stunnel_5.73.bb delete mode 100644 sources/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump/CVE-2024-2397.patch mode change 100755 => 100644 sources/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump/run-ptest delete mode 100644 sources/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump_4.99.4.bb create mode 100644 sources/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump_4.99.5.bb delete mode 100644 sources/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpslice_1.7.bb create mode 100644 sources/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpslice_1.8.bb delete mode 100644 sources/meta-openembedded/meta-networking/recipes-support/tcpreplay/tcpreplay/0001-configure.ac-do-not-run-conftest-in-case-of-cross-co.patch delete mode 100644 sources/meta-openembedded/meta-networking/recipes-support/tcpreplay/tcpreplay/0001-configure.ac-unify-search-dirs-for-pcap-and-add-lib3.patch delete mode 100644 sources/meta-openembedded/meta-networking/recipes-support/tcpreplay/tcpreplay/CVE-2023-4256.patch delete mode 100644 sources/meta-openembedded/meta-networking/recipes-support/tcpreplay/tcpreplay/CVE-2023-43279.patch delete mode 100644 sources/meta-openembedded/meta-networking/recipes-support/tcpreplay/tcpreplay/CVE-2024-22654-0001.patch delete mode 100644 sources/meta-openembedded/meta-networking/recipes-support/tcpreplay/tcpreplay/CVE-2024-22654-0002.patch delete mode 100644 sources/meta-openembedded/meta-networking/recipes-support/tcpreplay/tcpreplay_4.4.4.bb create mode 100644 sources/meta-openembedded/meta-networking/recipes-support/tcpreplay/tcpreplay_4.5.1.bb create mode 100644 sources/meta-openembedded/meta-networking/recipes-support/tnftp/tnftp/0001-Add-casts-to-appease-conversions-between-wchar_t-and.patch create mode 100644 sources/meta-openembedded/meta-networking/recipes-support/tnftp/tnftp/0002-Add-casts-to-appease-conversions-between-wchar_t-and.patch delete mode 100644 sources/meta-openembedded/meta-networking/recipes-support/traceroute/traceroute_2.1.5.bb create mode 100644 sources/meta-openembedded/meta-networking/recipes-support/traceroute/traceroute_2.1.6.bb create mode 100644 sources/meta-openembedded/meta-networking/recipes-support/udpcast/udpcast/0001-include-stddef.h-for-ptrdiff_t.patch create mode 100644 sources/meta-openembedded/meta-networking/recipes-support/udpcast/udpcast_20230924.bb delete mode 100644 sources/meta-openembedded/meta-networking/recipes-support/unbound/unbound/CVE-2024-8508.patch create mode 100644 sources/meta-openembedded/meta-networking/recipes-support/unbound/unbound/run-ptest delete mode 100644 sources/meta-openembedded/meta-networking/recipes-support/unbound/unbound_1.19.3.bb create mode 100644 sources/meta-openembedded/meta-networking/recipes-support/unbound/unbound_1.21.0.bb delete mode 100644 sources/meta-openembedded/meta-networking/recipes-support/wavemon/wavemon_0.9.5.bb create mode 100644 sources/meta-openembedded/meta-networking/recipes-support/wavemon/wavemon_0.9.6.bb delete mode 100644 sources/meta-openembedded/meta-networking/recipes-support/wireshark/wireshark_4.2.12.bb create mode 100644 sources/meta-openembedded/meta-networking/recipes-support/wireshark/wireshark_4.2.9.bb rename sources/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/netplan/netplan/{0002-meson.build-do-not-use-Werror.patch => 0001-meson.build-do-not-use-Werror.patch} (100%) delete mode 100644 sources/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/netplan/netplan/0001-meson.build-drop-unnecessary-build-dependencies.patch delete mode 100644 sources/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/netplan/netplan/0001-networkd.c-define-scope-specific-to-case-statement.patch delete mode 100644 sources/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/netplan/netplan/CVE-2022-4968.patch delete mode 100644 sources/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/netplan/netplan_1.0.bb create mode 100644 sources/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/netplan/netplan_1.1.bb delete mode 100644 sources/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/thingsboard-gateway/thingsboard-gateway_3.4.6.bb create mode 100644 sources/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/thingsboard-gateway/thingsboard-gateway_3.5.1.bb create mode 100644 sources/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-free_mon-Include-missing-cstdint.patch delete mode 100644 sources/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-moduleconfig.py-python-3.12-compatibility.patch create mode 100644 sources/meta-openembedded/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools/0001-liblp-fix-building-with-GCC-14.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-benchmark/dhrystone/dhrystone-2.1/dhrystone-c89.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-benchmark/iperf3/iperf3_3.17.1.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-benchmark/iperf3/iperf3_3.18.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-Revert-ld.hugetlbfs-fix-Ttext-segment-argument-on-AA.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-huge_page_setup_helper-use-python3-interpreter.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-include-stddef.h-for-ptrdiff_t.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-run_test.py-not-use-hard-coded-path-.-obj-hugeadm.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-skip-checking-LIB32-and-LIB64-if-they-point-to-the-s.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-tests-makefile-Append-CPPFLAGS-rather-then-override.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0002-Mark-glibc-specific-code-so.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0002-libhugetlbfs-avoid-search-host-library-path-for-cros.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0003-alloc.c-Avoid-sysconf-_SC_LEVEL2_CACHE_LINESIZE-on-l.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0003-tests-Makefile-install-static-4G-edge-testcases.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0004-run_test.py-not-use-hard-coded-path-.-obj-hugeadm.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0004-shm.c-Mark-glibc-specific-changes-so.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0005-Include-dirent.h-for-ino_t.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0005-libhugetlbfs-elf_i386-avoid-search-host-library-path.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0006-include-limits.h-for-PATH_MAX.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0006-include-stddef.h-for-ptrdiff_t.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0007-Mark-glibc-specific-code-so.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0008-alloc.c-Avoid-sysconf-_SC_LEVEL2_CACHE_LINESIZE-on-l.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0009-shm.c-Mark-glibc-specific-changes-so.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0010-Include-dirent.h-for-ino_t.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0011-include-limits.h-for-PATH_MAX.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0012-huge_page_setup_helper-use-python3-interpreter.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0013-elflink.c-include-libgen.h-for-basename.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/libhugetlbfs-avoid-search-host-library-path-for-cros.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/libhugetlbfs-elf_i386-avoid-search-host-library-path.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/skip-checking-LIB32-and-LIB64-if-they-point-to-the-s.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/tests-Makefile-install-static-4G-edge-testcases.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_2.24.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-bsp/dediprog-flasher/dediprog-flasher/0001-add-support-for-cross-compilation.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-bsp/dediprog-flasher/dediprog-flasher/0002-Makefile-add-conditional-stripping.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-bsp/dediprog-flasher/dediprog-flasher_1.14.20.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-bsp/fwupd/fwupd-efi/0001-efi-generate_binary.py-Use-env-to-detect-python3.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-bsp/fwupd/fwupd-efi/cc.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-bsp/fwupd/fwupd-efi_1.3.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-bsp/fwupd/fwupd-efi_1.6.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-bsp/fwupd/fwupd_1.9.18.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-bsp/fwupd/fwupd_1.9.24.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors/0001-Fix-building-with-GCC-14.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-bsp/nvme-cli/nvme-cli_2.10.2.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-bsp/nvme-cli/nvme-cli_2.8.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-connectivity/gensio/gensio_2.8.4.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-connectivity/gensio/gensio_2.8.7.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0001-SAE-Check-for-invalid-Rejected-Groups-element-length.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0003-SAE-Reject-invalid-Rejected-Groups-element-in-the-pa.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/CVE-2023-52160.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/CVE-2024-3596_00.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/CVE-2024-3596_01.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/CVE-2024-3596_02.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/CVE-2024-3596_04.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/CVE-2024-3596_05.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/CVE-2024-3596_06.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/CVE-2024-3596_07.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/CVE-2024-3596_08.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd_2.10.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd_2.11.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-connectivity/iwd/iwd_2.16.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-connectivity/iwd/iwd_2.20.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/CVE-2025-24528.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-connectivity/libimobiledevice-glue/libimobiledevice-glue_1.3.0.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-connectivity/libimobiledevice-glue/libimobiledevice-glue_git.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-connectivity/libirecovery/libirecovery_1.2.0.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-connectivity/libirecovery/libirecovery_git.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-connectivity/libndp/libndp/0001-libndp-Fix-signature-of-sendto-API.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-connectivity/libndp/libndp/CVE-2024-5564.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-connectivity/libndp/libndp_1.8.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-connectivity/libndp/libndp_1.9.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-connectivity/paho-mqtt-cpp/paho-mqtt-cpp_1.3.2.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-connectivity/paho-mqtt-cpp/paho-mqtt-cpp_1.4.1.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-connectivity/ser2net/ser2net_4.6.1.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-connectivity/ser2net/ser2net_4.6.2.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-connectivity/thrift/thrift/0001-thrift-pr2755.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-connectivity/transmission/transmission_4.0.6.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-connectivity/transmission/transmission_git.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-core/dbus-cxx/dbus-cxx_2.5.1.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-core/dbus-cxx/dbus-cxx_2.5.2.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-core/dbus/dbus-broker_32.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-core/dbus/dbus-broker_36.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-core/glib-2.0/glib-testing_0.1.1.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-core/glib-2.0/glibmm-2.68_2.78.0.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-core/glib-2.0/glibmm-2.68_2.80.0.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-core/glib-2.0/glibmm_2.66.2.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-core/glib-2.0/glibmm_2.66.7.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-core/mm-common/mm-common/0001-meson.build-do-not-ask-for-python-installation-versi.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-core/mm-common/mm-common_1.0.4.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-core/mm-common/mm-common_1.0.6.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-core/ndctl/ndctl_v78.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-core/ndctl/ndctl_v79.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-core/opencl/opencl-headers_2023.12.14.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-core/opencl/opencl-headers_2024.05.08.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-core/opencl/opencl-icd-loader_2023.12.14.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-core/opencl/opencl-icd-loader_2024.05.08.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd_255.4.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd_255.6.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-core/uutils-coreutils/files/0001-Cargo.lock-revert-to-selinux-sys-0.6.9-and-fts-sys-0.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-core/uutils-coreutils/uutils-coreutils_0.0.27.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-core/uutils-coreutils/uutils-coreutils_0.0.28.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-crypto/botan/botan_3.2.0.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-crypto/botan/botan_3.5.0.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-crypto/cryptsetup/cryptsetup_2.7.2.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-crypto/cryptsetup/cryptsetup_2.7.5.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-crypto/libsodium/libsodium/0001-fix-aarch64-Move-target-pragma-after-arm_neon.h-incl.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-crypto/libsodium/libsodium_1.0.19.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-crypto/libsodium/libsodium_1.0.20.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/0001-Ensure-compatibility-with-ARMv9-by-updating-.arch-di.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/0001-Use-a-lambda-function-as-deleter-prototype-in-unique.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-dbs/postgresql/postgresql_16.5.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-dbs/postgresql/postgresql_16.9.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0004-PR-1644-unscaledcycleclock-remove-RISC-V-support.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0004-abseil-ppc-fixes.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0005-Don-t-match-Wnon-virtual-dtor-in-the-flags-are-neede.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/abseil-ppc-fixes.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_20240116.3.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_20240722.0.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/cppgenerate/cppgenerate_0.3.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/cpuset/cpuset_1.6.2.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/ctags/ctags_6.1.20240310.0.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/ctags/ctags_6.1.20240915.0.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/debootstrap/debootstrap/0001-do-not-hardcode-the-full-path-of-dpkg.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/debootstrap/debootstrap/0003-do-not-hardcode-the-full-path-of-dpkg.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/debootstrap/debootstrap_1.0.132.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/debootstrap/debootstrap_1.0.137.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/editorconfig/editorconfig-core-c_0.12.6.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/editorconfig/editorconfig-core-c_0.12.9.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/glade/glade/CVE-2020-36774.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/grpc/grpc/CVE-2024-11407.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/grpc/grpc/CVE-2024-7246.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/grpc/grpc_1.60.1.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/grpc/grpc_1.66.1.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/jq/jq/CVE-2024-23337.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/jq/jq/CVE-2024-53427.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/jq/jq/CVE-2025-48060.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.9.5.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.9.6.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/ldns/ldns_1.8.3.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/ldns/ldns_1.8.4.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/libabigail/libabigail/0001-Check-for-correct-fts-module.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/libabigail/libabigail_2.5.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/ltrace/ltrace/0001-ARM-code-has-unreachable-code-after-switch-statement.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/ltrace/ltrace/0001-Fix-tautological-compare-warning.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/ltrace/ltrace/0001-ensure-the-struct-pointers-are-null-initilized.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/ltrace/ltrace/0001-ppc-plt-do-not-free-symbol-libsym.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/ltrace/ltrace/0001-proc-Make-PROC_PID_FILE-not-use-variable-length-arra.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/ltrace/ltrace/0001-replace-readdir_r-with-readdir.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/memtool/memtool/run-ptest create mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/memtool/memtool/test_read_write_plainfiles.sh create mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/memtool/memtool_2018.03.0.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/mercurial/mercurial_6.5.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/mercurial/mercurial_6.6.3.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/mpich/mpich_4.2.1.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/mpich/mpich_4.2.2.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/msgpack/msgpack-cpp_6.1.0.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/msgpack/msgpack-cpp_6.1.1.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/zlib-fix-pointer-alignment.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs_20.18.0.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs_20.18.2.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/perfetto/common/0001-fix-musl-build.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/perfetto/files/0001-Add-missing-header-cstdint-for-uintXX_t-types.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/perfetto/files/0001-meson-add-pc-file-for-lib_perfetto.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/perfetto/libperfetto/0001-meson-add-pc-file-for-lib_perfetto.patch rename sources/meta-openembedded/meta-oe/recipes-devtools/perfetto/{files => perfetto}/0001-Remove-check_build_deps-build-steps.patch (85%) create mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/perfetto/perfetto/0002-traced-fix-missing-include.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/perl/dbd-mariadb_1.23.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/perl/exiftool_12.72.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/perl/exiftool_12.89.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/perl/libdbd-mysql-perl/0001-Makefile.PL-avoid-running-assert_lib-at-configure.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/perl/libdbd-mysql-perl_4.050.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/perl/libdbi-perl/0001-Fix-building-on-Fedora-40-with-GCC-14.2.1.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/perl/libdbi-perl/CVE-2014-10402.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/perl/libdbi-perl_1.643.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/perl/libdbi-perl_1.644.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/perl/libpcsc-perl_1.4.14.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/perl/libpcsc-perl_1.4.15.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/php/php_8.2.26.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/php/php_8.2.28.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/poke/poke/0001-build-do-not-check-for-Tcl-Tk-if-disable-gui-is-spec.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/poke/poke/0002-jitter-jitter-config.in-avoit-host-poisoning-while-c.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/poke/poke_1.2.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/poke/poke_4.2.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf_4.25.5.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf_4.25.8.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/python/python3-pefile/run-ptest create mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/python/python3-pefile_2024.8.26.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/python/python3-psycopg_3.2.2.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/sexpect/sexpect_2.3.14.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/squashfs-tools-ng/squashfs-tools-ng_1.2.0.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/squashfs-tools-ng/squashfs-tools-ng_1.3.1.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/uftrace/uftrace_0.15.2.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/uftrace/uftrace_0.16.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/uw-imap/uw-imap/uw-imap-fix-incompatible-pointer-types.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/uw-imap/uw-imap/uw-imap-newer-tls.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/valijson/valijson_1.0.2.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-devtools/valijson/valijson_1.0.3.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/cfengine/cfengine-masterfiles_3.21.0.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/cfengine/cfengine-masterfiles_3.21.5.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/cmpi-bindings/cmpi-bindings/0001-cmpi-bindings-Fix-build-error-with-gcc14.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/dialog/dialog_1.3-20240307.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/dialog/dialog_1.3-20240619.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/dlt-daemon/dlt-daemon/0001-CMakeLists-txt-make-DLT_WatchdogSec-can-be-set-by-user.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/etcd/etcd-cpp-apiv3/0001-Replacing-GPR_ASSERT-with-c-assert.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/etcd/etcd-cpp-apiv3/0001-cmake-fix-when-cross-compiling.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/etcd/etcd-cpp-apiv3/0001-include-stdint.h-for-int64_t-types.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/etcd/etcd-cpp-apiv3_0.15.3.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/etcd/etcd-cpp-apiv3_0.15.4.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/flatpak/flatpak-xdg-utils_1.0.5.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/flatpak/flatpak-xdg-utils_1.0.6.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/flatpak/flatpak_1.15.10.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/flatpak/flatpak_1.15.8.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit_1.9.7.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit_1.9.9.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/highway/highway/0001-Add-cmake-check-for-deducing-32bit-or-64bit-RISCV.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/highway/highway_1.1.0.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/highway/highway_1.2.0.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/icewm/icewm_3.4.5.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/icewm/icewm_3.6.0.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/isomd5sum/isomd5sum_1.2.4.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/isomd5sum/isomd5sum_1.2.5.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/jansson/jansson/0001-add-back-JSON_INTEGER_IS_LONG_LONG-for-cmake.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/lastlog2/lastlog2_1.2.0.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/libblockdev/files/0001-libext2fs-unused-parameters-fix.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/libblockdev/files/CVE-2025-6019.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/libmodbus/libmodbus/CVE-2024-10918-01.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/libmodbus/libmodbus/CVE-2024-10918-02.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/libmodbus/libmodbus/CVE-2024-10918-03.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/libmodbus/libmodbus/CVE-2024-10918-04.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/logwatch/logwatch_7.10.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/logwatch/logwatch_7.11.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/magic-enum/magic-enum/run-ptest create mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/magic-enum/magic-enum_0.9.6.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/minifi-cpp/files/0001-libminifi-Rename-mutex_-to-mtx_-member-of-Concurrent.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs-115/1849070.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs-115/1894423.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs-115_115.11.0.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs-115_115.8.0.bb rename sources/{poky/meta => meta-openembedded/meta-oe}/recipes-extended/newt/files/0001-detect-gold-as-GNU-linker-too.patch (100%) rename sources/{poky/meta => meta-openembedded/meta-oe}/recipes-extended/newt/files/Makefile.in-Add-tinfo-library-to-the-linking-librari.patch (100%) rename sources/{poky/meta => meta-openembedded/meta-oe}/recipes-extended/newt/files/cross_ar.patch (100%) rename sources/{poky/meta => meta-openembedded/meta-oe}/recipes-extended/newt/libnewt_0.52.24.bb (100%) delete mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/ostree/ostree_2024.5.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/ostree/ostree_2024.7.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/p7zip/files/0001-Fix-two-buffer-overflow-vulnerabilities.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/pegtl/pegtl/run-ptest delete mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/pegtl/pegtl_3.2.7.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/pegtl/pegtl_3.2.8.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/pmdk/pmdk_2.0.0.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/pmdk/pmdk_2.1.0.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/polkit/files/meson-build-Support-openembedded-OS-for-PAM-config.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/polkit/polkit_124.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/polkit/polkit_125.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/qcbor/qcbor_1.4.1.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/qcbor/qcbor_git.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.5/0001-src-Do-not-reset-FINAL_LIBS.patch rename sources/meta-openembedded/meta-oe/recipes-extended/redis/{redis-7.2.8 => redis-7.2.5}/0006-Define-correct-gregs-for-RISCV32.patch (97%) create mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.5/GNU_SOURCE-7.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.5/hiredis-use-default-CC-if-it-is-set.patch rename sources/meta-openembedded/meta-oe/recipes-extended/redis/{redis-7.2.8 => redis-7.2.5}/init-redis-server (100%) mode change 100644 => 100755 create mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.5/lua-update-Makefile-to-use-environment-build-setting.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.5/oe-use-libc-malloc.patch rename sources/meta-openembedded/meta-oe/recipes-extended/redis/{redis-7.2.8 => redis-7.2.5}/redis.conf (100%) rename sources/meta-openembedded/meta-oe/recipes-extended/redis/{redis-7.2.8 => redis-7.2.5}/redis.service (100%) delete mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.8/0001-hiredis-use-default-CC-if-it-is-set.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.8/0002-lua-update-Makefile-to-use-environment-build-setting.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.8/0003-hack-to-force-use-of-libc-malloc.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.8/0004-src-Do-not-reset-FINAL_LIBS.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.8/0005-Define-_GNU_SOURCE-to-get-PTHREAD_MUTEX_INITIALIZER.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/redis/redis_7.2.5.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/redis/redis_7.2.8.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/rrdtool/rrdtool/b76e3c578f1e9f582e9c28f50d82b1f569602075.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/rsyslog/librelp/0001-relp-fix-build-against-upcoming-gcc-14-Werror-calloc.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/0001-tests-tcpflood.c-Pass-correct-parameter-type-to-send.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog_8.2402.0.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog_8.2408.0.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/s-nail/files/0001-su_INLINE-eh-no-give-up-share-detection.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/s-nail/files/0001-su_INLINE-gcc-only-GNU-specifics-after-Og.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/s-nail/s-nail_14.9.24.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/s-nail/s-nail_14.9.25.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/sanlock/sanlock_3.9.2.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/sanlock/sanlock_3.9.4.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/sblim-sfcc/sblim-sfcc/0001-Fix-incompatible-pointer-type-error-with-gcc-option.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/socketcan/can-utils/0001-lib-snprintf_can_error_frame-don-t-bail-out-if-CAN_E.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/socketcan/can-utils/0001-timestamp-formatting-always-use-64-bit-for-timestamp.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/tmux/tmux_3.3a.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-extended/tmux/tmux_3.4.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-gnome/atk/atkmm-2.36_2.36.2.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-gnome/atk/atkmm-2.36_2.36.3.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-gnome/gmime/gmime_3.2.13.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-gnome/gmime/gmime_3.2.15.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-gnome/malcontent/malcontent-ui.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-gnome/malcontent/malcontent.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-gnome/malcontent/malcontent.inc delete mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/cglm/cglm_0.9.2.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/cglm/cglm_0.9.4.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/deqp-runner/deqp-runner-crates.inc create mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/deqp-runner/deqp-runner/0001-deqp-runner-drop-zstd-support.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/deqp-runner/deqp-runner_0.20.0.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/directfb/directfb/0001-inputdrivers-Correct-the-signature-of-bind-call-on-m.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/directfb/directfb/0001-libdirect-remove-use-of-keyword-register.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/feh/feh_3.10.2.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/feh/feh_3.10.3.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/fontforge/libspiro_20221101.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/fontforge/libspiro_20240903.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/ftgl/ftgl/0001-Explicit-typecast-to-avoid-implicit-double-to-float-.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/ftgl/ftgl/0001-Fix-type-mismatch-with-latest-FreeType.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/ftgl/ftgl/0001-use-pkg-config-to-find-freetype2.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/ftgl/ftgl/0002-Makefile.am-remove-useless-and-breaking-code.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/ftgl/ftgl_2.1.3-rc5.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/ftgl/ftgl_2.4.0.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/fvwm/fvwm/0001-configure-Do-not-require-support-for-implicit-ints.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/fvwm/fvwm/0002-acinclude.m4-Add-missing-unistd.h-to-AM_SAFETY_CHECK.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/fvwm/fvwm/0003-configure-Further-defang-the-Werror-check.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/gphoto2/libgphoto2/fix-build-with-gcc-14.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/graphviz/graphviz/0001-Set-use_tcl-to-be-empty-string-if-tcl-is-disabled.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/graphviz/graphviz/CVE-2023-46045-0001.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/graphviz/graphviz/CVE-2023-46045-0002.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/graphviz/graphviz/CVE-2023-46045-0003.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/gtkwave/gtkwave_3.3.119.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/gtkwave/gtkwave_3.3.120.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/leptonica/leptonica_1.82.0.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/leptonica/leptonica_1.84.1.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/libsdl/libsdl-1.2.15/0001-stdlib-Make-iconv-use-portable-across-glibc-musl.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/libsdl/libsdl-gfx_2.0.25.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/libsdl/libsdl-gfx_2.0.27.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/libsdl/libsdl2-image_2.0.5.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/libsdl/libsdl2-image_2.8.2.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/libyui/libyui-ncurses/0001-libyui-ncurses-Replace-off64_t-with-off_t-and-stat64.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/libyui/libyui-ncurses_4.2.3.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/libyui/libyui-ncurses_4.6.2.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/libyui/libyui_4.2.3.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/libyui/libyui_4.6.2.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/neatvnc/neatvnc_0.8.0.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/neatvnc/neatvnc_0.8.1.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/openjpeg/openjpeg_2.5.2.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/openjpeg/openjpeg_2.5.3.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/pango/pangomm-2.48_2.50.1.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/pango/pangomm-2.48_2.52.0.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/renderdoc/renderdoc/0001-jpeg-compressor-Reorder-stdio.h-include-location.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/renderdoc/renderdoc_1.27.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/renderdoc/renderdoc_1.33.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/tesseract/tesseract_5.3.4.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/tesseract/tesseract_5.4.1.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/tslib/tslib_1.22.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/tslib/tslib_1.23.bb rename sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/source-han-sans-cn-fonts/{44-source-han-sans-cn.conf => 44-source-han-sans-cn-fonts.conf} (100%) create mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/source-han-sans-fonts.inc rename sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/source-han-sans-jp-fonts/{44-source-han-sans-jp.conf => 44-source-han-sans-jp-fonts.conf} (100%) rename sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/source-han-sans-kr-fonts/{44-source-han-sans-kr.conf => 44-source-han-sans-kr-fonts.conf} (100%) rename sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/source-han-sans-tw-fonts/{44-source-han-sans-tw.conf => 44-source-han-sans-tw-fonts.conf} (100%) delete mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-abyssinica_2.100.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-abyssinica_2.201.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/vdpau/vdpauinfo_1.5.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/vk-gl-cts/files/0001-use-library-sonames-for-linking.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/vk-gl-cts/files/0001-vulkan-cts-include-missing-cstdint.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/vk-gl-cts/files/0001-vulkancts-Include-missing-cstdint.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/vk-gl-cts/files/gen-framework-path.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/vk-gl-cts/opengl-es-cts/0001-use-library-sonames-for-linking.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/vk-gl-cts/opengl-es-cts_3.2.11.0.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/vk-gl-cts/opengl-es-cts_3.2.9.3.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/vk-gl-cts/vulkan-cts/0001-use-library-sonames-for-linking.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/vk-gl-cts/vulkan-cts_1.3.7.3.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/vk-gl-cts/vulkan-cts_1.3.9.2.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/wayland/libei_1.2.1.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/wayland/libei_1.3.0.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/xorg-app/xkbutils_1.0.5.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/xorg-app/xkbutils_1.0.6.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/xorg-app/xlsfonts_1.0.7.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/xorg-app/xlsfonts_1.0.8.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/xorg-app/xterm/0001-Add-configure-time-check-for-setsid.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/xorg-app/xterm/0001-include-missing-pty.h-header-for-openpty.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/xorg-app/xterm_388.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-graphics/xorg-app/xterm_394.bb rename sources/meta-openembedded/meta-oe/recipes-kernel/crash/{crash-cross-canadian_8.0.4.bb => crash-cross-canadian_8.0.5.bb} (100%) delete mode 100644 sources/meta-openembedded/meta-oe/recipes-kernel/crash/crash/0001-symbol-fix-S-cannot-work-with-kaslr-detection.patch rename sources/meta-openembedded/meta-oe/recipes-kernel/crash/{crash_8.0.4.bb => crash_8.0.5.bb} (100%) create mode 100644 sources/meta-openembedded/meta-oe/recipes-kernel/drgn/python3-drgn_0.0.27.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest/0001-selftests-timers-Fix-clock_adjtime-for-newer-32-bit-.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-kernel/libbpf/libbpf_1.4.0.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-kernel/libbpf/libbpf_1.4.6.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-kernel/libtracefs/libtracefs/0001-tracefs-perf-Add-missing-headers-for-syscall-and-SYS.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-kernel/libtracefs/libtracefs_1.7.0.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-kernel/libtracefs/libtracefs_1.8.1.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-kernel/oprofile/oprofile/0011-replace-__FILE__-with-__FILE_NAME__.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-multimedia/audiofile/files/0004-Always-check-the-number-of-coefficients.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-multimedia/audiofile/files/0005-clamp-index-values-to-fix-index-overflow-in-IMA.cpp.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-multimedia/audiofile/files/0006-Check-for-multiplication-overflow-in-sfconvert.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-multimedia/audiofile/files/0007-Actually-fail-when-error-occurs-in-parseFormat.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-multimedia/audiofile/files/0008-Check-for-multiplication-overflow-in-MSADPCM-decodeS.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-multimedia/cdrkit/files/fix-incompatible-pointer-type-error.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-multimedia/libass/libass_0.17.1.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-multimedia/libass/libass_0.17.3.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-multimedia/libjxl/libjxl/0001-cmake-Do-not-use-mrelax-all-with-clang-on-RISCV64.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-multimedia/libjxl/libjxl_0.10.2.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-multimedia/libjxl/libjxl_0.10.3.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-multimedia/mplayer/libplacebo_7.349.0.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-multimedia/mplayer/mpv/0001-file2string-Avoid-emitting-absolute-filepaths-into-g.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-multimedia/mplayer/mpv_0.35.1.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-multimedia/mplayer/mpv_0.38.0.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0001-keytable-meson-Restrict-the-installation-of-50-rc_ke.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0002-media-ctl-Install-media-ctl-pkg-config-files.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.26.1.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.28.1.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-multimedia/webm/libvpx_1.14.0.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-multimedia/webm/libvpx_1.14.1.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-navigation/geoclue/geoclue_2.7.1.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-navigation/geoclue/geoclue_2.7.2.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-navigation/gpsd/gpsd/fix-pps_strerror_r.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-navigation/gpsd/gpsd_3.24.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-navigation/gpsd/gpsd_3.25.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-navigation/libspatialite/libspatialite/0001-wfs-Cover-xmlNanoHTTPCleanup-with-LIBXML_HTTP_ENABLE.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-navigation/libspatialite/libspatialite/libspatialite_macros.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-navigation/libspatialite/libspatialite_5.0.1.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-navigation/libspatialite/libspatialite_5.1.0.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-navigation/orrery/orrery/0001-Append-cflags-instead-of-overriding-in-Makefile.am.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-navigation/orrery/orrery/0001-orrery-Fix-sprintf-format.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-navigation/orrery/orrery/orrery.png delete mode 100644 sources/meta-openembedded/meta-oe/recipes-navigation/orrery/orrery/use.GdkPixbuf.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-navigation/orrery/orrery_2.7.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-printing/qpdf/qpdf_11.8.0.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-printing/qpdf/qpdf_11.9.1.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-security/audit/audit/0001-Replace-__attribute_malloc__-with-__attribute__-__ma.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-security/audit/audit_4.0.1.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-security/audit/audit_4.0.2.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-security/bubblewrap/bubblewrap_0.10.0.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-security/bubblewrap/bubblewrap_0.8.0.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-security/nmap/files/0001-Make-ndiff-support-python3.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-security/nmap/files/0001-configure.ac-make-ndiff-depend-on-python3.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-security/nmap/files/0003-Fix-off-by-one-overflow-in-the-IP-protocol-table.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-security/nmap/nmap_7.80.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-security/nmap/nmap_7.95.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-security/softhsm/files/0002-Prevent-accessing-of-global-c-objects-once-they-are-.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-security/usbguard/usbguard/0001-include-missing-cstdint.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-security/usbguard/usbguard_1.1.2.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-security/usbguard/usbguard_1.1.3.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-shells/zsh/zsh/CVE-2021-45444_1.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-shells/zsh/zsh/CVE-2021-45444_2.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-shells/zsh/zsh/CVE-2021-45444_3.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-shells/zsh/zsh_5.8.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-shells/zsh/zsh_5.9.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/asio/asio/0001-tests-Remove-blocking_adaptation.cpp.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/asio/asio/run-ptest delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/bdwgc/bdwgc_8.2.6.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/bdwgc/bdwgc_8.2.8.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/cabextract/cabextract/fix-fnmatch.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/cabextract/cabextract_1.11.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/cabextract/libmspack_0.11alpha.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/cmark/cmark_0.31.0.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/cmark/cmark_0.31.1.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/colord/colord/08a32b2379fb5582f4312e59bf51a2823df56276.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/composefs/composefs_1.0.5.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/dool/dool_1.3.1.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/dool/dool_1.3.2.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/fmt/fmt_10.2.1.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/freeipmi/freeipmi/0001-Fix-undeclared-function-errors.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/freeipmi/freeipmi_1.6.14.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/freerdp/freerdp/0001-Fixed-compilation-warnings-in-ainput-channel.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/freerdp/freerdp/0001-Fixed-compilation-warnings.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/freerdp/freerdp3_3.4.0.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/freerdp/freerdp3_3.5.1.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/freerdp/freerdp_2.11.2.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/freerdp/freerdp_2.11.7.bb rename sources/meta-openembedded/{meta-filesystems => meta-oe}/recipes-support/fuse/fuse3/fuse3.conf (100%) rename sources/meta-openembedded/{meta-filesystems => meta-oe}/recipes-support/fuse/fuse3/run-ptest (100%) rename sources/meta-openembedded/{meta-filesystems => meta-oe}/recipes-support/fuse/fuse3_3.16.2.bb (95%) create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/genimage/genimage_18.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/googlebenchmark/googlebenchmark/0001-cycleclock-Fix-type-conversion-to-match-function-ret.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/googlebenchmark/googlebenchmark/0002-cycleclock-Fix-type-conversion-to-match-function-ret.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/googlebenchmark/googlebenchmark_1.8.3.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/googlebenchmark/googlebenchmark_1.8.4.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/gsl/gsl_2.7.1.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/gsl/gsl_2.8.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/gsoap/gsoap/0001-Provide-strtod_l-signature-on-non-glibc-linux-musl-s.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/gsoap/gsoap/0001-Simplify-check-for-gethostbyname_r.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/gsoap/gsoap_2.8.126.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/gsoap/gsoap_2.8.134.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/hddtemp/hddtemp/0001-po-force-Language-header-for-fr-and-de-locals.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/hwdata/hwdata_0.381.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/hwdata/hwdata_0.387.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/imx-cst/imx-cst_3.4.0.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/iniparser/iniparser/0001-iniparser.pc-Make-libpath-a-variable.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/iniparser/iniparser/Add-CMake-support.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/iniparser/iniparser/CVE-2023-33461.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/iniparser/iniparser/CVE-2025-0633.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/iniparser/iniparser_4.1.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/iniparser/iniparser_4.2.4.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/libbytesize/libbytesize_2.10.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/libbytesize/libbytesize_2.11.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/libcereal/files/0001-Fix-instances-of-Wmissing-template-arg-list-after-te.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/libconfuse/files/0001-only-apply-search-path-logic-to-relative-pathnames.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/libconfuse/libconfuse_3.3.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/libee/libee.inc delete mode 100755 sources/meta-openembedded/meta-oe/recipes-support/libee/libee/ezapi1.sh delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/libee/libee/libee-parallel-make.patch delete mode 100755 sources/meta-openembedded/meta-oe/recipes-support/libee/libee/run-ptest delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/libee/libee_0.4.1.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/libfido2/libfido2_1.14.0.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/libfido2/libfido2_1.15.0.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod-1.x/0001-bindings-cxx-disable-tests.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod-2.x/0001-bindings-cxx-Migrate-C-tests-to-use-Catch2-v3.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod-2.x/0001-bindings-cxx-tests-set-direction-when-reconfiguring-.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod_1.6.4.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod_1.6.5.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod_2.1.2.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod_2.1.3.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/libiodbc/libiodbc_3.52.15.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/libiodbc/libiodbc_3.52.16.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/liblinebreak/liblinebreak_1.2.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/libmanette/libmanette_0.2.7.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/libmanette/libmanette_0.2.9.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/libmxml/libmxml_3.3.1.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/libmxml/libmxml_4.0.3.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/libnvme/libnvme_1.10.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/libnvme/libnvme_1.8.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/libosinfo/osinfo-db-tools/0001-Make-xmlError-structs-constant.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/libosinfo/osinfo-db-tools_1.11.0.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/libosinfo/osinfo-db_20240701.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/libp11/files/0001-detect-correct-openssl-3.x.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/libpaper/libpaper_2.1.2.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/libpaper/libpaper_2.2.5.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/libssh/libssh/0001-CompilerChecks.cmake-drop-Wunused-variable-flag.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/libssh/libssh/0001-libgcrypt.c-Fix-prototype-of-des3_encrypt-des3_decry.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/libssh/libssh/CVE-2025-5318.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/libssh/libssh_0.10.6.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/libssh/libssh_0.11.1.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/libtar/files/0003-Fix-missing-prototype-compiler-warnings.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/libtar/files/0004-Fix-invalid-memory-de-reference-issue.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/libtar/files/0005-fix-file-descriptor-leaks-reported-by-cppcheck.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/libtar/files/0006-fix-memleak-on-tar_open-failure.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/libtar/files/0007-fix-memleaks-in-libtar-sample-program.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/libtar/files/0008-decode-avoid-using-a-static-buffer-in-th_get_pathnam.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/libtar/files/0009-Check-for-NULL-before-freeing-th_pathname.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/libtar/files/0010-Added-stdlib.h-for-malloc-in-lib-decode.c.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/libtar/files/0011-libtar-fix-programming-mistakes-detected-by-static-a.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/libtar/files/CVE-2013-4420.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/libtar/files/CVE-2021-33640-CVE-2021-33645-CVE-2021-33646.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/libtar/files/CVE-2021-33643-CVE-2021-33644.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/libteam/libteam/0001-include-sys-select.h-for-fd_set-definition.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/libteam/libteam/0001-teamd-Include-missing-headers-for-strrchr-and-memcmp.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/libteam/libteam/0001-teamd-Pass-correct-parameter-type-to-accept-API.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/libteam/libteam_1.31.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/libteam/libteam_1.32.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/libtinyxml/libtinyxml/CVE-2021-42260.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/libtinyxml/libtinyxml/CVE-2023-34194.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/liburing/liburing/0001-test-Compile-nolibc.c-only-when-CONFIG_NOLIBC-is-set.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/liburing/liburing/0001-test-Drop-including-error.h-header.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/liburing/liburing/0002-ooo-file-unreg.c-Include-poll.h-instead-of-sys-poll..patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/liburing/liburing_2.5.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/liburing/liburing_2.7.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/logwarn/logwarn_1.0.14.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/logwarn/logwarn_1.0.17.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/lvm2/files/0001-configure.ac-check-egrep.patch rename sources/meta-openembedded/meta-oe/recipes-support/lvm2/{libdevmapper_2.03.22.bb => libdevmapper.bb} (100%) create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/lvm2/lvm2.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/lvm2/lvm2/0001-lvmdbusd-create-dirs-for-lock-file.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/lvm2/lvm2_2.03.22.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/mcelog/mcelog_198.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/mcelog/mcelog_200.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/monit/monit_5.33.0.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/monit/monit_5.34.0.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/nano/files/CVE-2024-5742.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/nano/nano_7.2.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/nano/nano_8.2.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/nss/nss/CVE-2024-6602.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/nss/nss/CVE-2024-6609.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/nss/nss_3.103.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/nss/nss_3.98.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/openct/openct/0001-Fix-incompatible-pointer-type-error-with-gcc-option.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/opencv/opencv_4.10.0.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/opencv/opencv_4.9.0.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/openldap/openldap/0001-fix-incompatible-pointer-type-error.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/openldap/openldap_2.6.7.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/openldap/openldap_2.6.8.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/opensc/files/0001-PR-Fixes-for-uninitialized-memory-issues.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/opensc/files/CVE-2024-8443-0001.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/opensc/files/CVE-2024-8443-0002.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/opentelemetry/opentelemetry-cpp/0001-Fix-build-with-clang-19.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/opentelemetry/opentelemetry-cpp_1.16.1.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/pcsc-tools/pcsc-tools_1.7.1.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/pcsc-tools/pcsc-tools_1.7.2.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/picocom/picocom_2024.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/picocom/picocom_git.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/pidgin/pidgin/fix_incompatible_pointer_types_for_gtkitemfactorycallbacks_on_gcc-14.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/pidgin/pidgin/purple-OE-branding-25.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/pidgin/pidgin_2.14.13.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/pidgin/pidgin_2.14.2.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/pkcs11-provider/pkcs11-provider/0001-Fix-types-for-old-32-bit-systems.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/pkcs11-provider/pkcs11-provider_0.3.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/pkcs11-provider/pkcs11-provider_0.5.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/poco/poco/0001-Use-std-atomic-int-instead-of-std-atomic-bool.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/poco/poco/0002-fix-build-Install-cmake-files-with-resolved-ENABLE_J.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/poco/poco_1.12.5p2.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/poco/poco_1.13.3.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/poppler/poppler/CVE-2023-34872.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/poppler/poppler/CVE-2024-56378.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/poppler/poppler/CVE-2024-6239-0001.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/poppler/poppler/CVE-2024-6239-0002.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/poppler/poppler/CVE-2025-32364.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/poppler/poppler/CVE-2025-32365.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/poppler/poppler/CVE-2025-43903-0001.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/poppler/poppler/CVE-2025-43903-0002.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/poppler/poppler/jpeg-stdio.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/poppler/poppler_23.04.0.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/poppler/poppler_24.09.0.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/procmail/procmail/CVE-2014-3618.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/procmail/procmail/CVE-2017-16844.patch rename sources/meta-openembedded/{meta-filesystems => meta-oe}/recipes-support/python3-looseversion/python3-looseversion_1.3.0.bb (100%) create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/raptor2/raptor2/raptor-2.0.16-dont_use_curl-config.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/remmina/remmina_1.4.34.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/remmina/remmina_1.4.35.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/serial/serial/0001-Add-SOVERSION-for-shared-lib-and-comment-example.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/spdlog/spdlog_1.13.0.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/spdlog/spdlog_1.14.1.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/0001-macros-guard-ipv6-code-with-SYSLOG_NG_ENABLE_IPV6.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/CVE-2024-47619.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/syslog-ng/syslog-ng_4.6.0.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/syslog-ng/syslog-ng_4.7.0.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/tbb/tbb/0001-Fix-suppress-new-GCC-12-13-warnings-1192.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/tbb/tbb/0001-hwloc_detection.cmake-remove-cross-compiation-check.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/tbb/tbb_2021.11.0.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/tbb/tbb_2021.13.0.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/thin-provisioning-tools/thin-provisioning-tools_1.0.12.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/thin-provisioning-tools/thin-provisioning-tools_1.0.13.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/tree/tree_2.1.1.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/tree/tree_2.1.3.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/udisks/udisks2/CVE-2025-6019.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/uhubctl/uhubctl_2.5.0.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/uhubctl/uhubctl_2.6.0.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/uim/uim/0001-Fix-to-set-libedit-path-from-configure-option-proper.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/uim/uim/JMP_BUF_GC_jmp_buf.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/uim/uim_1.8.8.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/uim/uim_1.8.9.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_7.0.14.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_7.0.20.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/webkitgtk/webkitgtk3/0001-Fix-build-issues-with-latest-Clang.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/webkitgtk/webkitgtk3/fff1b1773bff2ef7c3b867ab019d69faa36c010d.patch delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/webkitgtk/webkitgtk3_2.44.1.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/webkitgtk/webkitgtk3_2.44.3.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/xdg-dbus-proxy/xdg-dbus-proxy_0.1.5.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/xdg-dbus-proxy/xdg-dbus-proxy_0.1.6.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/xdg-desktop-portal/xdg-desktop-portal_1.18.1.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/xdg-desktop-portal/xdg-desktop-portal_1.18.4.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-support/xmlsec1/xmlsec1_1.3.4.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-support/xmlsec1/xmlsec1_1.3.5.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-test/catch2/catch2_2.13.10.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-test/catch2/catch2_3.7.0.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-test/cukinia/cukinia_0.6.2.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-test/cukinia/cukinia_0.7.0.bb delete mode 100644 sources/meta-openembedded/meta-oe/recipes-test/googletest/googletest_1.14.0.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-test/googletest/googletest_1.15.2.bb create mode 100644 sources/meta-openembedded/meta-oe/recipes-test/syzkaller/syzkaller/0001-executor-Remove-including-error.h-in-test_linux.h.patch create mode 100644 sources/meta-openembedded/meta-oe/recipes-test/trompeloeil/trompeloeil_v47.bb delete mode 100644 sources/meta-openembedded/meta-perl/recipes-perl/libcgi/libcgi-perl_4.60.bb create mode 100644 sources/meta-openembedded/meta-perl/recipes-perl/libcgi/libcgi-perl_4.66.bb delete mode 100644 sources/meta-openembedded/meta-perl/recipes-perl/libcompress/libcompress-raw-bzip2-perl_2.206.bb create mode 100644 sources/meta-openembedded/meta-perl/recipes-perl/libcompress/libcompress-raw-bzip2-perl_2.213.bb delete mode 100644 sources/meta-openembedded/meta-perl/recipes-perl/libcompress/libcompress-raw-lzma-perl_2.206.bb create mode 100644 sources/meta-openembedded/meta-perl/recipes-perl/libcompress/libcompress-raw-lzma-perl_2.213.bb delete mode 100644 sources/meta-openembedded/meta-perl/recipes-perl/libcompress/libcompress-raw-zlib-perl_2.206.bb create mode 100644 sources/meta-openembedded/meta-perl/recipes-perl/libcompress/libcompress-raw-zlib-perl_2.213.bb delete mode 100644 sources/meta-openembedded/meta-perl/recipes-perl/libcrypt/libcrypt-openssl-random-perl_0.16.bb create mode 100644 sources/meta-openembedded/meta-perl/recipes-perl/libcrypt/libcrypt-openssl-random-perl_0.17.bb delete mode 100644 sources/meta-openembedded/meta-perl/recipes-perl/libcurses/libcurses-perl_1.41.bb create mode 100644 sources/meta-openembedded/meta-perl/recipes-perl/libcurses/libcurses-perl_1.45.bb delete mode 100644 sources/meta-openembedded/meta-perl/recipes-perl/libextutils/libextutils-helpers-perl_0.026.bb create mode 100644 sources/meta-openembedded/meta-perl/recipes-perl/libextutils/libextutils-helpers-perl_0.028.bb delete mode 100644 sources/meta-openembedded/meta-perl/recipes-perl/libio/libio-compress-lzma-perl_2.206.bb create mode 100644 sources/meta-openembedded/meta-perl/recipes-perl/libio/libio-compress-lzma-perl_2.213.bb delete mode 100644 sources/meta-openembedded/meta-perl/recipes-perl/libio/libio-compress-perl_2.206.bb create mode 100644 sources/meta-openembedded/meta-perl/recipes-perl/libio/libio-compress-perl_2.213.bb delete mode 100644 sources/meta-openembedded/meta-perl/recipes-perl/libio/libio-socket-ssl-perl_2.085.bb create mode 100644 sources/meta-openembedded/meta-perl/recipes-perl/libio/libio-socket-ssl-perl_2.089.bb delete mode 100644 sources/meta-openembedded/meta-perl/recipes-perl/libmodule/libmodule-build-tiny-perl_0.047.bb create mode 100644 sources/meta-openembedded/meta-perl/recipes-perl/libmodule/libmodule-build-tiny-perl_0.048.bb delete mode 100644 sources/meta-openembedded/meta-perl/recipes-perl/libnet/libnet-dns-perl_1.40.bb create mode 100644 sources/meta-openembedded/meta-perl/recipes-perl/libnet/libnet-dns-perl_1.46.bb delete mode 100644 sources/meta-openembedded/meta-perl/recipes-perl/libtest/libtest-harness-perl_3.48.bb create mode 100644 sources/meta-openembedded/meta-perl/recipes-perl/libtest/libtest-harness-perl_3.50.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/pamela_1.1.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/pamela_1.2.0.bb rename sources/{poky/meta => meta-openembedded/meta-python}/recipes-devtools/python/python-rfc3986-validator/0001-setup.py-move-pytest-runner-to-test_requirements.patch (100%) delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-a2wsgi_1.10.4.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-a2wsgi_1.10.7.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-aiofiles_23.2.1.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-aiofiles_24.1.0.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-aiohappyeyeballs_2.3.2.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-aiohappyeyeballs_2.4.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-aiohttp_3.10.5.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-aiohttp_3.9.4.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-aiohue_4.7.1.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-aiohue_4.7.3.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-aioserial/0001-use-poetry-core-for-pyproject-base-build.patch delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-alembic_1.13.1.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-alembic_1.13.3.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-annotated-types_0.6.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-annotated-types_0.7.0.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-ansi2html_1.9.1.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-ansi2html_1.9.2.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-anyio_4.3.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-anyio_4.4.0.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-apispec_6.4.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-apispec_6.6.1.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-argcomplete_3.3.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-argcomplete_3.5.0.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-argh_0.31.2.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-argh_0.31.3.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-astroid_3.1.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-astroid_3.3.2.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-asyncinotify_4.0.6.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-asyncinotify_4.0.9.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-autobahn_23.6.2.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-autobahn_24.4.2.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-autoflake_2.2.1.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-autoflake_2.3.1.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-automat_22.10.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-automat_24.8.1.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-awesomeversion_24.2.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-awesomeversion_24.6.0.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-bandit_1.7.8.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-bandit_1.7.9.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-bidict_0.23.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-bidict_0.23.1.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-bitstring_4.1.4.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-bitstring_4.2.3.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-bleak_0.21.1.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-bleak_0.22.2.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-cachetools_5.3.3.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-cachetools_5.5.0.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-cantools_39.4.4.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-cantools_39.4.5.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-cbor2_5.6.3.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-cbor2_5.6.4.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-coverage_7.4.1.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-coverage_7.6.1.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-croniter_2.0.5.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-croniter_3.0.3.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-daemon/0001-Use-version-from-packaging-module-instead-of-setupto.patch create mode 100755 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-dasbus/run-ptest create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-dasbus_1.7.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-dbus-fast_2.21.1.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-dbus-fast_2.24.2.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-dirty-equals_0.7.1.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-dirty-equals_0.8.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-django_4.2.16.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-django_4.2.18.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-django_5.0.11.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-django_5.0.9.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-djangorestframework_3.15.1.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-djangorestframework_3.15.2.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-elementpath_4.4.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-elementpath_4.5.0.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-email-validator_2.1.1.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-email-validator_2.2.0.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-eth-hash_0.6.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-eth-hash_0.7.0.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-eth-utils_3.0.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-eth-utils_5.0.0.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-evdev_1.6.1.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-evdev_1.7.1.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-eventlet_0.36.1.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-eventlet_0.37.0.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-executing_2.0.1.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-executing_2.1.0.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-fastjsonschema_2.18.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-fastjsonschema_2.20.0.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-filelock_3.13.4.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-filelock_3.16.1.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-flask/run-ptest delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-flask_3.0.2.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-flask_3.0.3.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-flexparser_0.3.1.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-flexparser_0.3.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-freezegun_1.4.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-freezegun_1.5.1.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-fsspec_2024.9.0.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-future_0.18.3.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-future_1.0.0.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-gast_0.5.4.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-gast_0.6.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-gevent/not-final.patch delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-gmqtt_0.6.14.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-gmqtt_0.6.16.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-google-api-core_2.18.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-google-api-core_2.19.1.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-google-api-python-client_2.125.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-google-api-python-client_2.135.0.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-google-auth_2.29.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-google-auth_2.30.0.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-googleapis-common-protos_1.63.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-googleapis-common-protos_1.63.2.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-gpiod_2.1.3.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-gpiod_2.2.1.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-greenlet_3.0.3.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-greenlet_3.1.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio-channelz_1.62.2.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio-reflection_1.62.2.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/CVE-2024-11407.patch delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio_1.62.2.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio_1.66.1.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-gunicorn_21.2.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-gunicorn_23.0.0.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-h5py/0001-Fix-Cython-3-compatibility.patch delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-h5py/0001-Properly-cast-arguments-to-H5Lunpack_elink_val.patch delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-h5py/0002-Use-libc.stdint-instead-of-numpy.patch delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-h5py_3.10.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-h5py_3.11.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-hatch-requirements-txt_0.4.1.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-hexbytes_1.0.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-hexbytes_1.2.1.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-html2text_2020.1.16.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-html2text_2024.2.26.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-httpcore_1.0.3.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-httpcore_1.0.5.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-httpx_0.27.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-httpx_0.27.2.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-huey_2.5.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-huey_2.5.1.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-humanize_4.10.0.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-humanize_4.9.0.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-icu_2.12.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-icu_2.13.1.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-imageio_2.34.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-imageio_2.35.1.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-imgtool_2.0.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-imgtool_2.1.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-importlib-metadata_8.4.0.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-incremental_22.10.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-incremental_24.7.2.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-inflate64/0001-Do-not-override-const-qualifier.patch delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-ipython_8.23.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-ipython_8.27.0.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-itsdangerous_2.1.2.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-itsdangerous_2.2.0.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-joblib_1.4.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-joblib_1.4.2.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-kiwisolver_1.4.5.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-kiwisolver_1.4.7.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-langtable_0.0.65.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-langtable_0.0.68.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-marshmallow_3.21.1.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-marshmallow_3.22.0.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-matplotlib-inline_0.1.6.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-matplotlib-inline_0.1.7.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-moteus/0001-lib-python-remove-self-import-from-setup.py.patch delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-moteus_0.3.67.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-moteus_0.3.72.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-msgpack_1.0.7.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-msgpack_1.1.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-mypy_1.10.0.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-mypy_1.9.0.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-netaddr_1.2.1.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-netaddr_1.3.0.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-nmap_1.6.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-nmap_1.9.1.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-nocasedict_2.0.1.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-nocasedict_2.0.4.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-nocaselist_2.0.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-nocaselist_2.0.3.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-oletools_0.60.1.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-oletools_0.60.2.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-openpyxl_3.1.2.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-openpyxl_3.1.5.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-paho-mqtt_2.0.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-paho-mqtt_2.1.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pandas/0001-pyproject.toml-Downgrade-numpy-version-needs-to-1.x.patch create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pandas/0001-pyproject.toml-don-t-pin-dependency-versions.patch delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pandas_2.0.3.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pandas_2.2.2.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-paramiko_3.4.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-paramiko_3.5.0.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-parse-type_0.6.2.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-parse-type_0.6.3.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-parse_1.20.1.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-parse_1.20.2.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-path_16.14.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-path_17.0.0.bb rename sources/{poky/meta => meta-openembedded/meta-python}/recipes-devtools/python/python3-pathlib2_2.3.7.bb (100%) delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pdm-backend_2.1.8.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pdm-backend_2.4.1.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pdm-build-locked_0.3.3.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pdm_2.14.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pdm_2.19.1.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pefile_2023.2.7.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pillow_10.3.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pillow_10.4.0.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pint_0.23.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pint_0.24.3.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-platformdirs_4.2.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-platformdirs_4.3.6.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-posix-ipc/0001-build_support-use-source-filename-instead-of-foo-for.patch delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-posix-ipc/0002-build_support-handle-empty-max_priority-value-as-Non.patch delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-posix-ipc/0003-build_support-use-does_build_succeed-in-compile_and_.patch create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-posix-ipc_1.1.1.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-posix-ipc_1.2.0.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-prettytable_3.10.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-prettytable_3.11.0.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-prompt-toolkit_3.0.43.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-prompt-toolkit_3.0.47.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-protobuf_4.25.3.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-protobuf_4.25.8.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pulsectl_24.4.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pulsectl_24.8.0.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pure-eval_0.2.2.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pure-eval_0.2.3.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-py7zr_0.20.8.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-py7zr_0.22.0.bb rename sources/{poky/meta => meta-openembedded/meta-python}/recipes-devtools/python/python3-py_1.11.0.bb (100%) delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyalsaaudio_0.10.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyalsaaudio_0.11.0.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyasn1-modules_0.4.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyasn1-modules_0.4.1.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pybind11-json_0.2.13.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pybind11-json_0.2.14.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pybind11/0001-Do-not-strip-binaries.patch delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pybind11_2.11.1.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pybind11_2.12.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pycocotools/0001-downgrade-numpy-version-to-1.26.4.patch delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pycocotools_2.0.7.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pycocotools_2.0.8.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pycodestyle_2.11.1.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pycodestyle_2.12.1.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pycurl_7.45.2.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pycurl_7.45.3.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic-core/0001-Set-rust-version-from-1.76-to-1.75-in-Cargo.toml.patch create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic-core/0001-dont-embed-RUSTFLAGS-in-final-binary-1396.patch delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic-core/0002-Dont-embed-RUSTFLAGS-in-final-binary.patch delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic-core_2.18.4.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic-core_2.21.0.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic_2.7.4.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic_2.8.2.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyfanotify_0.2.2.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyfanotify_0.3.0.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyjwt_2.8.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyjwt_2.9.0.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pylint_3.1.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pylint_3.2.2.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pymetno_0.12.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pymetno_0.13.0.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pymisp_2.4.190.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pymisp_2.4.198.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pymodbus_3.6.7.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pymodbus_3.7.2.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pymongo_4.6.1.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pymongo_4.8.0.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyperclip_1.8.2.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyperclip_1.9.0.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyperf_2.6.3.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyperf_2.7.0.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyproject-api_1.6.1.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyproject-api_1.7.2.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyroute2_0.7.10.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyroute2_0.7.12.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-freezer_0.4.8.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-lazy-fixtures_1.0.7.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-lazy-fixtures_1.1.1.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-mock/0001-test_pytest_mock-skip-args-introspection-tests.patch delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-mock/403.patch delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-mock_3.12.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-mock_3.14.0.bb rename sources/{poky/meta => meta-openembedded/meta-python}/recipes-devtools/python/python3-pytest-runner_6.0.1.bb (79%) create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-socket_0.7.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-unordered_0.6.0.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyudev_0.24.1.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyudev_0.24.3.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyunormalize_15.1.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyunormalize_16.0.0.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyyaml-include_1.3.2.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyyaml-include_2.1.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyzstd_0.15.10.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyzstd_0.16.1.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-qface_2.0.11.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-qface_2.0.8.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-rapidjson_1.14.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-rapidjson_1.19.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-redis_5.0.1.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-redis_5.0.8.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-regex_2024.4.16.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-regex_2024.9.11.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-requests-file_1.5.1.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-requests-file_2.1.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-requests-mock_1.12.1.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-responses_0.25.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-responses_0.25.3.bb rename sources/{poky/meta => meta-openembedded/meta-python}/recipes-devtools/python/python3-rfc3986-validator_0.1.1.bb (100%) delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-rlp_4.0.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-rlp_4.0.1.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-robotframework_7.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-robotframework_7.1.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-scikit-build_0.17.6.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-scikit-build_0.18.1.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-sdbus_0.11.1.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-sdbus_0.12.0.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-sh_2.0.6.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-sh_2.0.7.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-simplejson_3.19.2.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-simplejson_3.19.3.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-snagboot_1.2.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-snagboot_1.3.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-sniffio_1.3.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-sniffio_1.3.1.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-soupsieve_2.5.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-soupsieve_2.6.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-sqlalchemy_2.0.29.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-sqlalchemy_2.0.35.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-sqlparse/0001-sqlparse-change-shebang-to-python3.patch delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-sqlparse/CVE-2024-4340.patch delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-sqlparse_0.4.4.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-sqlparse_0.5.1.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-stevedore_5.1.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-stevedore_5.2.0.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-sympy_1.12.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-sympy_1.13.2.bb rename sources/{poky/meta => meta-openembedded/meta-python}/recipes-devtools/python/python3-toml_0.10.2.bb (100%) rename sources/{poky/meta => meta-openembedded/meta-python}/recipes-devtools/python/python3-tomli_2.0.1.bb (100%) delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-tomlkit_0.12.3.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-tomlkit_0.13.2.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-tornado_6.4.1.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-tornado_6.4.2.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-tox_4.14.2.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-tox_4.15.1.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-tqdm_4.66.2.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-tqdm_4.66.5.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-transitions_0.9.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-transitions_0.9.2.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-twine_5.0.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-twine_5.1.1.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-twisted/CVE-2024-41671-0001.patch delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-twisted/CVE-2024-41671-0002.patch delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-twisted_24.3.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-twisted_24.7.0.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-typeguard_4.2.1.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-typeguard_4.3.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-typer/run-ptest create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-typer_0.12.5.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-types-psutil_5.9.5.20240316.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-types-psutil_6.0.0.20240901.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-types-python-dateutil_2.9.0.20240316.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-types-python-dateutil_2.9.0.20240906.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-types-setuptools_69.0.0.20240125.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-types-setuptools_73.0.0.20240822.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-tzdata/run-ptest create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-tzdata_2024.1.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-ujson/0001-setup.py-Do-not-strip-debugging-symbols.patch create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-ujson_5.10.0.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-ujson_5.9.0.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-uswid_0.4.7.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-uswid_0.5.0.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-validators_0.28.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-validators_0.34.0.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-virtualenv_20.25.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-virtualenv_20.26.5.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-watchdog_4.0.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-watchdog_5.0.2.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-web3_6.17.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-web3_6.20.1.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-werkzeug_3.0.3.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-werkzeug_3.0.6.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-whitenoise_6.6.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-whitenoise_6.7.0.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-xlsxwriter_3.1.9.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-xlsxwriter_3.2.0.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-xmlschema_3.0.1.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-xmlschema_3.4.1.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-xxhash_3.4.1.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-xxhash_3.5.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-yarl_1.11.1.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-yarl_1.9.4.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-zeroconf_0.132.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/python3-zeroconf_0.134.0.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python/tftpy/CVE-2023-46566.patch delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python3-gspread/python3-gspread_6.1.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python3-gspread/python3-gspread_6.1.2.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python3-reedsolo/python3-reedsolo_2.0.13.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python3-reedsolo/python3-reedsolo_2.1.0b1.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-devtools/python3-wxgtk4/python3-wxgtk4/0001-sip-Fix-build-with-gcc-14.patch delete mode 100644 sources/meta-openembedded/meta-python/recipes-extended/python-meh/python3-meh_0.51.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-extended/python-meh/python3-meh_0.52.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-extended/python-rich/python3-rich_13.7.0.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-extended/python-rich/python3-rich_13.8.1.bb create mode 100644 sources/meta-openembedded/meta-python/recipes-extended/python3-portalocker/python3-portalocker_2.10.1.bb delete mode 100644 sources/meta-openembedded/meta-python/recipes-extended/python3-portalocker/python3-portalocker_2.8.2.bb delete mode 100644 sources/meta-openembedded/meta-webserver/recipes-httpd/nginx/files/CVE-2023-44487.patch delete mode 100644 sources/meta-openembedded/meta-webserver/recipes-httpd/nginx/files/CVE-2024-7347-1.patch delete mode 100644 sources/meta-openembedded/meta-webserver/recipes-httpd/nginx/files/CVE-2024-7347-2.patch delete mode 100644 sources/meta-openembedded/meta-webserver/recipes-httpd/nginx/files/CVE-2025-23419.patch delete mode 100644 sources/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx_1.24.0.bb delete mode 100644 sources/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx_1.25.4.bb create mode 100644 sources/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx_1.26.2.bb create mode 100644 sources/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx_1.27.3.bb create mode 100644 sources/meta-openembedded/meta-webserver/recipes-php/phpmyadmin/phpmyadmin_5.2.1.bb delete mode 100644 sources/meta-openembedded/meta-webserver/recipes-php/phpmyadmin/phpmyadmin_5.2.2.bb create mode 100644 sources/meta-openembedded/meta-webserver/recipes-webadmin/netdata/netdata/0001-cmake-Add-check-for-64bit-builtin-atomics.patch create mode 100644 sources/meta-openembedded/meta-webserver/recipes-webadmin/netdata/netdata/netdata-volatiles.conf delete mode 100644 sources/meta-openembedded/meta-webserver/recipes-webadmin/netdata/netdata_1.44.3.bb create mode 100644 sources/meta-openembedded/meta-webserver/recipes-webadmin/netdata/netdata_1.47.1.bb delete mode 100644 sources/meta-openembedded/meta-webserver/recipes-webadmin/webmin/files/remove-python2.3.patch delete mode 100644 sources/meta-openembedded/meta-webserver/recipes-webadmin/webmin/webmin_1.850.bb create mode 100644 sources/meta-openembedded/meta-webserver/recipes-webadmin/webmin/webmin_2.202.bb delete mode 100644 sources/meta-openembedded/meta-xfce/recipes-apps/menulibre/menulibre_2.3.2.bb create mode 100644 sources/meta-openembedded/meta-xfce/recipes-apps/menulibre/menulibre_2.4.0.bb delete mode 100644 sources/meta-openembedded/meta-xfce/recipes-panel-plugins/notes/xfce4-notes-plugin_1.10.0.bb create mode 100644 sources/meta-openembedded/meta-xfce/recipes-panel-plugins/notes/xfce4-notes-plugin_1.11.0.bb delete mode 100644 sources/meta-openembedded/meta-xfce/recipes-xfce/xfce4-panel/xfce4-panel_4.18.3.bb create mode 100644 sources/meta-openembedded/meta-xfce/recipes-xfce/xfce4-panel/xfce4-panel_4.18.5.bb create mode 100644 sources/meta-openembedded/meta-xfce/recipes-xfce/xfwm4/xfwm4/xfwm4-fix-incompatible-pointer-type-error.patch create mode 100644 sources/meta-raspberrypi/SECURITY.md rename sources/meta-raspberrypi/recipes-graphics/mesa/{mesa-gl_%.bbappend => mesa-gl.bbappend} (100%) rename sources/meta-raspberrypi/recipes-graphics/mesa/{mesa_%.bbappend => mesa.bbappend} (100%) delete mode 100644 sources/meta-raspberrypi/recipes-graphics/mesa/mesa/0001-dont-build-clover-frontend.patch delete mode 100644 sources/meta-raspberrypi/recipes-graphics/mesa/mesa/0001-fix-FTBFS-clc-switch-to-new-non-owned-TargetOptions-.patch delete mode 100644 sources/meta-raspberrypi/recipes-graphics/mesa/mesa/0001-freedreno-don-t-encode-build-path-into-binaries.patch delete mode 100644 sources/meta-raspberrypi/recipes-graphics/mesa/mesa/0001-meson-misdetects-64bit-atomics-on-mips-clang.patch delete mode 100644 sources/meta-raspberrypi/recipes-graphics/mesa/mesa_25.1.6.bb delete mode 100644 sources/meta-raspberrypi/recipes-graphics/wayland/wayland-protocols_1.45.bb delete mode 100644 sources/meta-raspberrypi/recipes-graphics/wayland/weston-init.bbappend delete mode 100644 sources/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch delete mode 100644 sources/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0003-no-timeout-on-get-state.patch delete mode 100644 sources/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0004-Properly-handle-drain-requests-while-flushing.patch delete mode 100644 sources/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0005-Don-t-abort-gst_omx_video_dec_set_format-if-there-s-.patch delete mode 100644 sources/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx_%.bbappend delete mode 100644 sources/meta-raspberrypi/recipes-multimedia/rpidistro-ffmpeg/files/0001-avcodec-arm-sbcenc-avoid-callee-preserved-vfp-regist.patch create mode 100644 sources/meta-raspberrypi/recipes-multimedia/rpidistro-ffmpeg/files/0001-ffmpeg-5.1.4-rpi_24.patch delete mode 100644 sources/meta-raspberrypi/recipes-multimedia/rpidistro-ffmpeg/files/0002-Fix-build-on-powerpc-and-ppc64.patch delete mode 100644 sources/meta-raspberrypi/recipes-multimedia/rpidistro-ffmpeg/files/0003-avcodec-pngenc-remove-monowhite-from-apng-formats.patch delete mode 100644 sources/meta-raspberrypi/recipes-multimedia/rpidistro-ffmpeg/files/0004-ffmpeg-4.3.4-rpi_14.patch delete mode 100644 sources/meta-raspberrypi/recipes-multimedia/rpidistro-ffmpeg/files/0005-fix-flags.diff delete mode 100644 sources/meta-raspberrypi/recipes-multimedia/rpidistro-ffmpeg/files/2002-libavdevice-opengl_enc-update-dynamic-function-loader.patch delete mode 100644 sources/meta-raspberrypi/recipes-multimedia/rpidistro-ffmpeg/files/2003-libavcodec-fix-v4l2_req_devscan.patch delete mode 100644 sources/meta-raspberrypi/recipes-multimedia/rpidistro-ffmpeg/rpidistro-ffmpeg_4.3.4.bb create mode 100644 sources/meta-raspberrypi/recipes-multimedia/rpidistro-ffmpeg/rpidistro-ffmpeg_5.1.4.bb create mode 100644 sources/poky/bitbake/lib/bb/fetch2/gomod.py delete mode 100644 sources/poky/bitbake/lib/bb/tests/runqueue-tests/recipes/g1.bb delete mode 100644 sources/poky/bitbake/lib/bb/tests/runqueue-tests/recipes/h1.bb create mode 100644 sources/poky/bitbake/lib/bs4/AUTHORS delete mode 100644 sources/poky/bitbake/lib/bs4/AUTHORS.txt create mode 100644 sources/poky/bitbake/lib/bs4/CHANGELOG delete mode 100644 sources/poky/bitbake/lib/bs4/COPYING.txt create mode 100644 sources/poky/bitbake/lib/bs4/LICENSE delete mode 100644 sources/poky/bitbake/lib/bs4/NEWS.txt create mode 100644 sources/poky/bitbake/lib/bs4/css.py create mode 100644 sources/poky/bitbake/lib/bs4/formatter.py delete mode 100644 sources/poky/bitbake/lib/bs4/testing.py delete mode 100644 sources/poky/bitbake/lib/bs4/tests/__init__.py delete mode 100644 sources/poky/bitbake/lib/bs4/tests/test_builder_registry.py delete mode 100644 sources/poky/bitbake/lib/bs4/tests/test_docs.py delete mode 100644 sources/poky/bitbake/lib/bs4/tests/test_html5lib.py delete mode 100644 sources/poky/bitbake/lib/bs4/tests/test_htmlparser.py delete mode 100644 sources/poky/bitbake/lib/bs4/tests/test_lxml.py delete mode 100644 sources/poky/bitbake/lib/bs4/tests/test_soup.py delete mode 100644 sources/poky/bitbake/lib/bs4/tests/test_tree.py create mode 100644 sources/poky/bitbake/lib/prserv/tests.py create mode 100644 sources/poky/documentation/migration-guides/migration-5.1.rst create mode 100644 sources/poky/documentation/migration-guides/release-5.1.rst delete mode 100644 sources/poky/documentation/migration-guides/release-notes-4.0.26.rst delete mode 100644 sources/poky/documentation/migration-guides/release-notes-4.0.27.rst delete mode 100644 sources/poky/documentation/migration-guides/release-notes-4.0.28.rst delete mode 100644 sources/poky/documentation/migration-guides/release-notes-5.0.10.rst delete mode 100644 sources/poky/documentation/migration-guides/release-notes-5.0.11.rst delete mode 100644 sources/poky/documentation/migration-guides/release-notes-5.0.9.rst create mode 100644 sources/poky/documentation/migration-guides/release-notes-5.1.1.rst create mode 100644 sources/poky/documentation/migration-guides/release-notes-5.1.2.rst create mode 100644 sources/poky/documentation/migration-guides/release-notes-5.1.3.rst create mode 100644 sources/poky/documentation/migration-guides/release-notes-5.1.4.rst create mode 100644 sources/poky/documentation/migration-guides/release-notes-5.1.rst delete mode 100644 sources/poky/documentation/overview-manual/figures/analysis-for-package-splitting.png delete mode 100644 sources/poky/documentation/overview-manual/figures/configuration-compile-autoreconf.png delete mode 100644 sources/poky/documentation/overview-manual/figures/patching.png delete mode 100644 sources/poky/documentation/overview-manual/figures/source-fetching.png create mode 100644 sources/poky/documentation/overview-manual/svg/analysis-for-package-splitting.svg create mode 100644 sources/poky/documentation/overview-manual/svg/configuration-compile-autoreconf.svg create mode 100644 sources/poky/documentation/overview-manual/svg/patching.svg create mode 100644 sources/poky/documentation/overview-manual/svg/source-fetching.svg delete mode 100644 sources/poky/meta-selftest/classes/test-mkimage-wrapper.bbclass create mode 100644 sources/poky/meta-selftest/recipes-devtools/python/python3-guessing-game-crates.inc create mode 100644 sources/poky/meta-selftest/recipes-devtools/python/python3-guessing-game-crates.inc.upgraded create mode 100644 sources/poky/meta-selftest/recipes-devtools/python/python3-guessing-game_git.bb create mode 100644 sources/poky/meta-selftest/recipes-devtools/python/python3-guessing-game_git.bb.upgraded create mode 100644 sources/poky/meta-selftest/recipes-test/bbclasses/systemd-and-sysvinit.bb create mode 100644 sources/poky/meta-selftest/recipes-test/bbclasses/systemd-only.bb create mode 100644 sources/poky/meta/classes-global/retain.bbclass create mode 100644 sources/poky/meta/classes-recipe/create-spdx-image-3.0.bbclass create mode 100644 sources/poky/meta/classes-recipe/create-spdx-sdk-3.0.bbclass create mode 100644 sources/poky/meta/classes-recipe/nospdx.bbclass create mode 100644 sources/poky/meta/classes/create-spdx-3.0.bbclass delete mode 100644 sources/poky/meta/classes/siteconfig.bbclass create mode 100644 sources/poky/meta/classes/spdx-common.bbclass create mode 100644 sources/poky/meta/classes/vex.bbclass create mode 100644 sources/poky/meta/conf/distro/include/tclibc-picolibc.inc create mode 100644 sources/poky/meta/conf/distro/include/yocto-space-optimize.inc delete mode 100644 sources/poky/meta/conf/image-fitimage.conf create mode 100644 sources/poky/meta/files/common-licenses/3D-Slicer-1.0 create mode 100644 sources/poky/meta/files/common-licenses/AMD-newlib create mode 100644 sources/poky/meta/files/common-licenses/AML-glslang create mode 100644 sources/poky/meta/files/common-licenses/ASWF-Digital-Assets-1.0 create mode 100644 sources/poky/meta/files/common-licenses/ASWF-Digital-Assets-1.1 create mode 100644 sources/poky/meta/files/common-licenses/AdaCore-doc create mode 100644 sources/poky/meta/files/common-licenses/Adobe-Display-PostScript create mode 100644 sources/poky/meta/files/common-licenses/Adobe-Utopia create mode 100644 sources/poky/meta/files/common-licenses/App-s2p create mode 100644 sources/poky/meta/files/common-licenses/Arphic-1999 create mode 100644 sources/poky/meta/files/common-licenses/BSD-2-Clause-Darwin create mode 100644 sources/poky/meta/files/common-licenses/BSD-2-Clause-first-lines create mode 100644 sources/poky/meta/files/common-licenses/BSD-3-Clause-HP create mode 100644 sources/poky/meta/files/common-licenses/BSD-3-Clause-Sun create mode 100644 sources/poky/meta/files/common-licenses/BSD-3-Clause-acpica create mode 100644 sources/poky/meta/files/common-licenses/BSD-3-Clause-flex create mode 100644 sources/poky/meta/files/common-licenses/BSD-4.3RENO create mode 100644 sources/poky/meta/files/common-licenses/BSD-4.3TAHOE create mode 100644 sources/poky/meta/files/common-licenses/BSD-Advertising-Acknowledgement create mode 100644 sources/poky/meta/files/common-licenses/BSD-Attribution-HPND-disclaimer create mode 100644 sources/poky/meta/files/common-licenses/BSD-Inferno-Nettverk create mode 100644 sources/poky/meta/files/common-licenses/BSD-Source-beginning-file create mode 100644 sources/poky/meta/files/common-licenses/BSD-Systemics create mode 100644 sources/poky/meta/files/common-licenses/BSD-Systemics-W3Works create mode 100644 sources/poky/meta/files/common-licenses/Baekmuk create mode 100644 sources/poky/meta/files/common-licenses/Bitstream-Charter create mode 100644 sources/poky/meta/files/common-licenses/Bitstream-Vera create mode 100644 sources/poky/meta/files/common-licenses/Boehm-GC create mode 100644 sources/poky/meta/files/common-licenses/Brian-Gladman-2-Clause create mode 100644 sources/poky/meta/files/common-licenses/Brian-Gladman-3-Clause create mode 100644 sources/poky/meta/files/common-licenses/CC-BY-3.0-AU create mode 100644 sources/poky/meta/files/common-licenses/CC-BY-3.0-IGO create mode 100644 sources/poky/meta/files/common-licenses/CC-BY-NC-SA-2.0-DE create mode 100644 sources/poky/meta/files/common-licenses/CC-BY-SA-3.0-IGO create mode 100644 sources/poky/meta/files/common-licenses/CFITSIO create mode 100644 sources/poky/meta/files/common-licenses/CMU-Mach create mode 100644 sources/poky/meta/files/common-licenses/CMU-Mach-nodoc create mode 100644 sources/poky/meta/files/common-licenses/COIL-1.0 create mode 100644 sources/poky/meta/files/common-licenses/Caldera-no-preamble create mode 100644 sources/poky/meta/files/common-licenses/Catharon create mode 100644 sources/poky/meta/files/common-licenses/Clips create mode 100644 sources/poky/meta/files/common-licenses/Community-Spec-1.0 create mode 100644 sources/poky/meta/files/common-licenses/Cornell-Lossless-JPEG create mode 100644 sources/poky/meta/files/common-licenses/Cronyx create mode 100644 sources/poky/meta/files/common-licenses/DEC-3-Clause create mode 100644 sources/poky/meta/files/common-licenses/DL-DE-BY-2.0 create mode 100644 sources/poky/meta/files/common-licenses/DL-DE-ZERO-2.0 create mode 100644 sources/poky/meta/files/common-licenses/DRL-1.1 create mode 100644 sources/poky/meta/files/common-licenses/Elastic-2.0 create mode 100644 sources/poky/meta/files/common-licenses/FBM create mode 100644 sources/poky/meta/files/common-licenses/FDK-AAC create mode 100644 sources/poky/meta/files/common-licenses/FSFAP-no-warranty-disclaimer create mode 100644 sources/poky/meta/files/common-licenses/FSFULLRWD create mode 100644 sources/poky/meta/files/common-licenses/Ferguson-Twofish create mode 100644 sources/poky/meta/files/common-licenses/Furuseth create mode 100644 sources/poky/meta/files/common-licenses/GCR-docs create mode 100644 sources/poky/meta/files/common-licenses/Graphics-Gems create mode 100644 sources/poky/meta/files/common-licenses/Gutmann create mode 100644 sources/poky/meta/files/common-licenses/HP-1986 create mode 100644 sources/poky/meta/files/common-licenses/HP-1989 create mode 100644 sources/poky/meta/files/common-licenses/HPND-DEC create mode 100644 sources/poky/meta/files/common-licenses/HPND-Fenneberg-Livingston create mode 100644 sources/poky/meta/files/common-licenses/HPND-INRIA-IMAG create mode 100644 sources/poky/meta/files/common-licenses/HPND-Intel create mode 100644 sources/poky/meta/files/common-licenses/HPND-Kevlin-Henney create mode 100644 sources/poky/meta/files/common-licenses/HPND-MIT-disclaimer create mode 100644 sources/poky/meta/files/common-licenses/HPND-Markus-Kuhn create mode 100644 sources/poky/meta/files/common-licenses/HPND-Pbmplus create mode 100644 sources/poky/meta/files/common-licenses/HPND-UC create mode 100644 sources/poky/meta/files/common-licenses/HPND-UC-export-US create mode 100644 sources/poky/meta/files/common-licenses/HPND-doc create mode 100644 sources/poky/meta/files/common-licenses/HPND-doc-sell create mode 100644 sources/poky/meta/files/common-licenses/HPND-export-US create mode 100644 sources/poky/meta/files/common-licenses/HPND-export-US-acknowledgement create mode 100644 sources/poky/meta/files/common-licenses/HPND-export-US-modify create mode 100644 sources/poky/meta/files/common-licenses/HPND-export2-US create mode 100644 sources/poky/meta/files/common-licenses/HPND-merchantability-variant create mode 100644 sources/poky/meta/files/common-licenses/HPND-sell-MIT-disclaimer-xserver create mode 100644 sources/poky/meta/files/common-licenses/HPND-sell-regexpr create mode 100644 sources/poky/meta/files/common-licenses/HPND-sell-variant-MIT-disclaimer create mode 100644 sources/poky/meta/files/common-licenses/HPND-sell-variant-MIT-disclaimer-rev create mode 100644 sources/poky/meta/files/common-licenses/IEC-Code-Components-EULA create mode 100644 sources/poky/meta/files/common-licenses/IJG-short create mode 100644 sources/poky/meta/files/common-licenses/ISC-Veillard create mode 100644 sources/poky/meta/files/common-licenses/Inner-Net-2.0 create mode 100644 sources/poky/meta/files/common-licenses/JPL-image create mode 100644 sources/poky/meta/files/common-licenses/Jam create mode 100644 sources/poky/meta/files/common-licenses/Kastrup create mode 100644 sources/poky/meta/files/common-licenses/Kazlib create mode 100644 sources/poky/meta/files/common-licenses/Knuth-CTAN create mode 100644 sources/poky/meta/files/common-licenses/LOOP create mode 100644 sources/poky/meta/files/common-licenses/LPD-document create mode 100644 sources/poky/meta/files/common-licenses/LZMA-SDK-9.11-to-9.20 create mode 100644 sources/poky/meta/files/common-licenses/LZMA-SDK-9.22 create mode 100644 sources/poky/meta/files/common-licenses/Latex2e-translated-notice create mode 100644 sources/poky/meta/files/common-licenses/Linux-man-pages-1-para create mode 100644 sources/poky/meta/files/common-licenses/Linux-man-pages-copyleft create mode 100644 sources/poky/meta/files/common-licenses/Linux-man-pages-copyleft-2-para create mode 100644 sources/poky/meta/files/common-licenses/Linux-man-pages-copyleft-var create mode 100644 sources/poky/meta/files/common-licenses/Lucida-Bitmap-Fonts create mode 100644 sources/poky/meta/files/common-licenses/MIT-Festival create mode 100644 sources/poky/meta/files/common-licenses/MIT-Khronos-old create mode 100644 sources/poky/meta/files/common-licenses/MIT-Wu create mode 100644 sources/poky/meta/files/common-licenses/MIT-testregex create mode 100644 sources/poky/meta/files/common-licenses/MMIXware create mode 100644 sources/poky/meta/files/common-licenses/MPEG-SSG create mode 100644 sources/poky/meta/files/common-licenses/MS-LPL create mode 100644 sources/poky/meta/files/common-licenses/Mackerras-3-Clause create mode 100644 sources/poky/meta/files/common-licenses/Mackerras-3-Clause-acknowledgment create mode 100644 sources/poky/meta/files/common-licenses/Martin-Birgmeier create mode 100644 sources/poky/meta/files/common-licenses/McPhee-slideshow rename sources/{meta-openembedded/meta-oe/licenses/MINPACK => poky/meta/files/common-licenses/Minpack} (100%) create mode 100644 sources/poky/meta/files/common-licenses/NCBI-PD create mode 100644 sources/poky/meta/files/common-licenses/NCL create mode 100644 sources/poky/meta/files/common-licenses/NICTA-1.0 create mode 100644 sources/poky/meta/files/common-licenses/NIST-Software create mode 100644 sources/poky/meta/files/common-licenses/OAR create mode 100644 sources/poky/meta/files/common-licenses/OFFIS create mode 100644 sources/poky/meta/files/common-licenses/OLFL-1.3 create mode 100644 sources/poky/meta/files/common-licenses/OPL-UK-3.0 create mode 100644 sources/poky/meta/files/common-licenses/OpenPBS-2.3 create mode 100644 sources/poky/meta/files/common-licenses/OpenSSL-standalone create mode 100644 sources/poky/meta/files/common-licenses/OpenVision create mode 100644 sources/poky/meta/files/common-licenses/PADL create mode 100644 sources/poky/meta/files/common-licenses/PPL create mode 100644 sources/poky/meta/files/common-licenses/Pixar create mode 100644 sources/poky/meta/files/common-licenses/Python-2.0.1 create mode 100644 sources/poky/meta/files/common-licenses/QPL-1.0-INRIA-2004 create mode 100644 sources/poky/meta/files/common-licenses/SAX-PD-2.0 create mode 100644 sources/poky/meta/files/common-licenses/SGI-OpenGL create mode 100644 sources/poky/meta/files/common-licenses/SGP4 create mode 100644 sources/poky/meta/files/common-licenses/SL create mode 100644 sources/poky/meta/files/common-licenses/SSLeay-standalone create mode 100644 sources/poky/meta/files/common-licenses/SchemeReport create mode 100644 sources/poky/meta/files/common-licenses/Soundex create mode 100644 sources/poky/meta/files/common-licenses/Sun-PPP create mode 100644 sources/poky/meta/files/common-licenses/Sun-PPP-2000 create mode 100644 sources/poky/meta/files/common-licenses/SunPro create mode 100644 sources/poky/meta/files/common-licenses/Symlinks create mode 100644 sources/poky/meta/files/common-licenses/TGPPL-1.0 create mode 100644 sources/poky/meta/files/common-licenses/TPDL create mode 100644 sources/poky/meta/files/common-licenses/TPL-1.0 create mode 100644 sources/poky/meta/files/common-licenses/TTWL create mode 100644 sources/poky/meta/files/common-licenses/TTYP0 create mode 100644 sources/poky/meta/files/common-licenses/TermReadKey create mode 100644 sources/poky/meta/files/common-licenses/UCAR create mode 100644 sources/poky/meta/files/common-licenses/UMich-Merit create mode 100644 sources/poky/meta/files/common-licenses/URT-RLE create mode 100644 sources/poky/meta/files/common-licenses/Unicode-3.0 create mode 100644 sources/poky/meta/files/common-licenses/UnixCrypt create mode 100644 sources/poky/meta/files/common-licenses/Widget-Workshop create mode 100644 sources/poky/meta/files/common-licenses/X11-distribute-modifications-variant create mode 100644 sources/poky/meta/files/common-licenses/Xdebug-1.03 create mode 100644 sources/poky/meta/files/common-licenses/Xfig create mode 100644 sources/poky/meta/files/common-licenses/Zeeff create mode 100644 sources/poky/meta/files/common-licenses/any-OSI create mode 100644 sources/poky/meta/files/common-licenses/bcrypt-Solar-Designer create mode 100644 sources/poky/meta/files/common-licenses/check-cvs create mode 100644 sources/poky/meta/files/common-licenses/checkmk create mode 100644 sources/poky/meta/files/common-licenses/cve-tou create mode 100644 sources/poky/meta/files/common-licenses/dtoa create mode 100644 sources/poky/meta/files/common-licenses/fwlw create mode 100644 sources/poky/meta/files/common-licenses/gtkbook create mode 100644 sources/poky/meta/files/common-licenses/hdparm create mode 100644 sources/poky/meta/files/common-licenses/libutil-David-Nugent create mode 100644 sources/poky/meta/files/common-licenses/lsof create mode 100644 sources/poky/meta/files/common-licenses/magaz create mode 100644 sources/poky/meta/files/common-licenses/mailprio create mode 100644 sources/poky/meta/files/common-licenses/metamail create mode 100644 sources/poky/meta/files/common-licenses/mpi-permissive create mode 100644 sources/poky/meta/files/common-licenses/mplus create mode 100644 sources/poky/meta/files/common-licenses/pnmstitch create mode 100644 sources/poky/meta/files/common-licenses/python-ldap create mode 100644 sources/poky/meta/files/common-licenses/radvd create mode 100644 sources/poky/meta/files/common-licenses/snprintf create mode 100644 sources/poky/meta/files/common-licenses/softSurfer create mode 100644 sources/poky/meta/files/common-licenses/ssh-keyscan create mode 100644 sources/poky/meta/files/common-licenses/swrule create mode 100644 sources/poky/meta/files/common-licenses/threeparttable create mode 100644 sources/poky/meta/files/common-licenses/ulem create mode 100644 sources/poky/meta/files/common-licenses/w3m create mode 100644 sources/poky/meta/files/common-licenses/xkeyboard-config-Zinoviev create mode 100644 sources/poky/meta/files/common-licenses/xlock create mode 100644 sources/poky/meta/files/common-licenses/xzoom delete mode 100644 sources/poky/meta/files/fs-perms-persistent-log.txt create mode 100644 sources/poky/meta/files/fs-perms-volatile-log.txt create mode 100644 sources/poky/meta/files/fs-perms-volatile-tmp.txt create mode 100644 sources/poky/meta/lib/bblayers/machines.py create mode 100644 sources/poky/meta/lib/oe/bootfiles.py create mode 100644 sources/poky/meta/lib/oe/package_manager/common_deb_ipk.py create mode 100644 sources/poky/meta/lib/oe/sbom30.py create mode 100644 sources/poky/meta/lib/oe/spdx30.py create mode 100644 sources/poky/meta/lib/oe/spdx30_tasks.py create mode 100644 sources/poky/meta/lib/oe/spdx_common.py create mode 100644 sources/poky/meta/lib/oeqa/core/target/serial.py delete mode 100644 sources/poky/meta/lib/oeqa/manual/crops.json delete mode 100644 sources/poky/meta/lib/oeqa/manual/eclipse-plugin.json delete mode 100644 sources/poky/meta/lib/oeqa/sdk/cases/assimp.py create mode 100644 sources/poky/meta/lib/oeqa/sdk/cases/autotools.py delete mode 100644 sources/poky/meta/lib/oeqa/sdk/cases/buildcpio.py delete mode 100644 sources/poky/meta/lib/oeqa/sdk/cases/buildepoxy.py delete mode 100644 sources/poky/meta/lib/oeqa/sdk/cases/buildgalculator.py delete mode 100644 sources/poky/meta/lib/oeqa/sdk/cases/buildlzip.py create mode 100644 sources/poky/meta/lib/oeqa/sdk/cases/cmake.py create mode 100644 sources/poky/meta/lib/oeqa/sdk/cases/gtk3.py create mode 100644 sources/poky/meta/lib/oeqa/sdk/cases/kmod.py create mode 100644 sources/poky/meta/lib/oeqa/sdk/cases/makefile.py create mode 100644 sources/poky/meta/lib/oeqa/sdk/cases/meson.py create mode 100644 sources/poky/meta/lib/oeqa/selftest/cases/bbclasses.py create mode 100644 sources/poky/meta/lib/oeqa/selftest/cases/picolibc.py create mode 100644 sources/poky/meta/lib/oeqa/selftest/cases/retain.py delete mode 100644 sources/poky/meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.1.fail delete mode 100644 sources/poky/meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.2.fail create mode 100644 sources/poky/meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.fail create mode 100644 sources/poky/meta/recipes-bsp/gnu-efi/gnu-efi/0001-Fix-parallel-make-failure-for-archives.patch delete mode 100644 sources/poky/meta/recipes-bsp/gnu-efi/gnu-efi/0001-riscv64-adjust-type-definitions.patch delete mode 100644 sources/poky/meta/recipes-bsp/gnu-efi/gnu-efi/0001-riscv64-ignore-unknown-relocs.patch create mode 100644 sources/poky/meta/recipes-bsp/gnu-efi/gnu-efi/0002-Do-not-treat-warnings-as-errors.patch delete mode 100644 sources/poky/meta/recipes-bsp/gnu-efi/gnu-efi/gnu-efi-3.0.9-fix-clang-build.patch delete mode 100644 sources/poky/meta/recipes-bsp/gnu-efi/gnu-efi/no-werror.patch delete mode 100644 sources/poky/meta/recipes-bsp/gnu-efi/gnu-efi/parallel-make-archives.patch delete mode 100644 sources/poky/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.17.bb create mode 100644 sources/poky/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.18.bb delete mode 100644 sources/poky/meta/recipes-bsp/grub/files/0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch delete mode 100644 sources/poky/meta/recipes-bsp/opensbi/opensbi_1.4.bb create mode 100644 sources/poky/meta/recipes-bsp/opensbi/opensbi_1.5.1.bb delete mode 100644 sources/poky/meta/recipes-bsp/pciutils/pciutils/configure.patch delete mode 100644 sources/poky/meta/recipes-bsp/pciutils/pciutils_3.11.1.bb create mode 100644 sources/poky/meta/recipes-bsp/pciutils/pciutils_3.13.0.bb delete mode 100644 sources/poky/meta/recipes-bsp/u-boot/files/CVE-2024-57254.patch delete mode 100644 sources/poky/meta/recipes-bsp/u-boot/files/CVE-2024-57255.patch delete mode 100644 sources/poky/meta/recipes-bsp/u-boot/files/CVE-2024-57256.patch delete mode 100644 sources/poky/meta/recipes-bsp/u-boot/files/CVE-2024-57257.patch delete mode 100644 sources/poky/meta/recipes-bsp/u-boot/files/CVE-2024-57258-1.patch delete mode 100644 sources/poky/meta/recipes-bsp/u-boot/files/CVE-2024-57258-2.patch delete mode 100644 sources/poky/meta/recipes-bsp/u-boot/files/CVE-2024-57258-3.patch delete mode 100644 sources/poky/meta/recipes-bsp/u-boot/files/CVE-2024-57259.patch rename sources/poky/meta/recipes-bsp/u-boot/{u-boot-tools_2024.01.bb => u-boot-tools_2024.07.bb} (100%) rename sources/poky/meta/recipes-bsp/u-boot/{u-boot_2024.01.bb => u-boot_2024.07.bb} (100%) delete mode 100644 sources/poky/meta/recipes-bsp/usbinit/usbinit.bb delete mode 100644 sources/poky/meta/recipes-bsp/usbinit/usbinit/COPYING.GPL delete mode 100755 sources/poky/meta/recipes-bsp/usbinit/usbinit/usb-gether delete mode 100644 sources/poky/meta/recipes-connectivity/avahi/files/CVE-2024-52616.patch delete mode 100644 sources/poky/meta/recipes-connectivity/bind/bind_9.18.33.bb create mode 100644 sources/poky/meta/recipes-connectivity/bind/bind_9.20.1.bb delete mode 100644 sources/poky/meta/recipes-connectivity/bluez5/bluez5/0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch create mode 100644 sources/poky/meta/recipes-connectivity/bluez5/bluez5/0001-Provide-GNU-basename-compatible-implementation.patch delete mode 100644 sources/poky/meta/recipes-connectivity/bluez5/bluez5/0001-adapter-Fix-up-address-type-when-loading-keys.patch create mode 100644 sources/poky/meta/recipes-connectivity/bluez5/bluez5/0001-mesh-Move-local-basename-into-utility-file.patch delete mode 100644 sources/poky/meta/recipes-connectivity/bluez5/bluez5/toolsbtmgmt-fix-index-option-for-non-interactive-mode.patch delete mode 100644 sources/poky/meta/recipes-connectivity/bluez5/bluez5_5.72.bb create mode 100644 sources/poky/meta/recipes-connectivity/bluez5/bluez5_5.78.bb delete mode 100644 sources/poky/meta/recipes-connectivity/connman/connman/CVE-2025-32366.patch delete mode 100644 sources/poky/meta/recipes-connectivity/connman/connman/CVE-2025-32743.patch create mode 100644 sources/poky/meta/recipes-connectivity/dhcpcd/dhcpcd_10.0.10.bb delete mode 100644 sources/poky/meta/recipes-connectivity/dhcpcd/dhcpcd_10.0.6.bb create mode 100644 sources/poky/meta/recipes-connectivity/iproute2/iproute2/0001-include-libnetlink.h-add-missing-include-for-htobe64.patch create mode 100644 sources/poky/meta/recipes-connectivity/iproute2/iproute2_6.10.0.bb delete mode 100644 sources/poky/meta/recipes-connectivity/iproute2/iproute2_6.7.0.bb delete mode 100644 sources/poky/meta/recipes-connectivity/iw/iw_6.7.bb create mode 100644 sources/poky/meta/recipes-connectivity/iw/iw_6.9.bb create mode 100644 sources/poky/meta/recipes-connectivity/kea/files/0001-Replace-Name-NameString-with-vector-of-uint8_t.patch create mode 100644 sources/poky/meta/recipes-connectivity/kea/files/0002-Fix-unittests-Typo-in-Name-Name-append-to-ndata_-not.patch delete mode 100644 sources/poky/meta/recipes-connectivity/kea/kea_2.4.2.bb create mode 100644 sources/poky/meta/recipes-connectivity/kea/kea_2.6.1.bb delete mode 100644 sources/poky/meta/recipes-connectivity/libpcap/libpcap/CVE-2023-7256-pre1.patch delete mode 100644 sources/poky/meta/recipes-connectivity/libpcap/libpcap/CVE-2023-7256.patch delete mode 100644 sources/poky/meta/recipes-connectivity/libpcap/libpcap/CVE-2024-8006.patch delete mode 100644 sources/poky/meta/recipes-connectivity/libpcap/libpcap_1.10.4.bb create mode 100644 sources/poky/meta/recipes-connectivity/libpcap/libpcap_1.10.5.bb delete mode 100644 sources/poky/meta/recipes-connectivity/ofono/ofono/0001-mbim-add-an-optional-TEMP_FAILURE_RETRY-macro-copy.patch delete mode 100644 sources/poky/meta/recipes-connectivity/ofono/ofono/0002-mbim-Fix-build-with-ell-0.39-by-restoring-unlikely-m.patch delete mode 100644 sources/poky/meta/recipes-connectivity/ofono/ofono/CVE-2023-2794-0001.patch delete mode 100644 sources/poky/meta/recipes-connectivity/ofono/ofono/CVE-2023-2794-0002.patch delete mode 100644 sources/poky/meta/recipes-connectivity/ofono/ofono/CVE-2023-2794-0003.patch delete mode 100644 sources/poky/meta/recipes-connectivity/ofono/ofono/CVE-2023-2794-0004.patch delete mode 100644 sources/poky/meta/recipes-connectivity/ofono/ofono/CVE-2023-4232.patch delete mode 100644 sources/poky/meta/recipes-connectivity/ofono/ofono/CVE-2023-4235.patch delete mode 100644 sources/poky/meta/recipes-connectivity/ofono/ofono/CVE-2024-7537.patch delete mode 100644 sources/poky/meta/recipes-connectivity/ofono/ofono/CVE-2024-7539.patch delete mode 100644 sources/poky/meta/recipes-connectivity/ofono/ofono/CVE-2024-7540_CVE-2024-7541_CVE-2024-7542.patch delete mode 100644 sources/poky/meta/recipes-connectivity/ofono/ofono/CVE-2024-7543.patch delete mode 100644 sources/poky/meta/recipes-connectivity/ofono/ofono/CVE-2024-7544.patch delete mode 100644 sources/poky/meta/recipes-connectivity/ofono/ofono/CVE-2024-7545.patch delete mode 100644 sources/poky/meta/recipes-connectivity/ofono/ofono/CVE-2024-7546.patch delete mode 100644 sources/poky/meta/recipes-connectivity/ofono/ofono/CVE-2024-7547.patch create mode 100644 sources/poky/meta/recipes-connectivity/ofono/ofono_2.10.bb delete mode 100644 sources/poky/meta/recipes-connectivity/ofono/ofono_2.4.bb create mode 100644 sources/poky/meta/recipes-connectivity/openssh/openssh/0001-Cast-to-sockaddr-in-systemd-interface.patch delete mode 100644 sources/poky/meta/recipes-connectivity/openssh/openssh/0001-Fix-missing-header-for-systemd-notification.patch delete mode 100644 sources/poky/meta/recipes-connectivity/openssh/openssh/0001-notify-systemd-on-listen-and-reload.patch create mode 100644 sources/poky/meta/recipes-connectivity/openssh/openssh/0001-regress-test-exec-use-the-absolute-path-in-the-SSH-e.patch delete mode 100644 sources/poky/meta/recipes-connectivity/openssh/openssh/CVE-2024-39894.patch delete mode 100644 sources/poky/meta/recipes-connectivity/openssh/openssh/CVE-2024-6387.patch delete mode 100644 sources/poky/meta/recipes-connectivity/openssh/openssh/CVE-2025-32728.patch delete mode 100644 sources/poky/meta/recipes-connectivity/openssh/openssh/add-test-support-for-busybox.patch delete mode 100644 sources/poky/meta/recipes-connectivity/openssh/openssh_9.6p1.bb create mode 100644 sources/poky/meta/recipes-connectivity/openssh/openssh_9.8p1.bb delete mode 100644 sources/poky/meta/recipes-connectivity/openssl/openssl/CVE-2024-41996.patch delete mode 100644 sources/poky/meta/recipes-connectivity/openssl/openssl/CVE-2025-27587-1.patch delete mode 100644 sources/poky/meta/recipes-connectivity/openssl/openssl/CVE-2025-27587-2.patch delete mode 100644 sources/poky/meta/recipes-connectivity/openssl/openssl_3.2.4.bb create mode 100644 sources/poky/meta/recipes-connectivity/openssl/openssl_3.3.1.bb delete mode 100644 sources/poky/meta/recipes-connectivity/ppp/ppp/0001-Revert-lock-path-to-var-lock-435.patch delete mode 100644 sources/poky/meta/recipes-connectivity/ppp/ppp/CVE-2024-58250.patch delete mode 100644 sources/poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-Install-wpa_passphrase-when-not-disabled.patch delete mode 100644 sources/poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-PEAP-client-Update-Phase-2-authentication-requiremen.patch delete mode 100644 sources/poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-SAE-Check-for-invalid-Rejected-Groups-element-length.patch delete mode 100644 sources/poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-build-Re-enable-options-for-libwpa_client.so-and-wpa.patch create mode 100644 sources/poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-macsec_linux-Hardware-offload-requires-Linux-headers.patch delete mode 100644 sources/poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0002-Fix-removal-of-wpa_passphrase-on-make-clean.patch delete mode 100644 sources/poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0002-SAE-Check-for-invalid-Rejected-Groups-element-length.patch delete mode 100644 sources/poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0003-SAE-Reject-invalid-Rejected-Groups-element-in-the-pa.patch delete mode 100644 sources/poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/CVE-2024-3596_00.patch delete mode 100644 sources/poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/CVE-2024-3596_01.patch delete mode 100644 sources/poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/CVE-2024-3596_02.patch delete mode 100644 sources/poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/CVE-2024-3596_03.patch delete mode 100644 sources/poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/CVE-2024-3596_04.patch delete mode 100644 sources/poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/CVE-2024-3596_05.patch delete mode 100644 sources/poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/CVE-2024-3596_06.patch delete mode 100644 sources/poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/CVE-2024-3596_07.patch delete mode 100644 sources/poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/CVE-2024-3596_08.patch delete mode 100644 sources/poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.10.bb create mode 100644 sources/poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.11.bb delete mode 100644 sources/poky/meta/recipes-core/base-passwd/base-passwd_3.6.3.bb create mode 100644 sources/poky/meta/recipes-core/base-passwd/base-passwd_3.6.4.bb delete mode 100644 sources/poky/meta/recipes-core/busybox/busybox/CVE-2022-48174.patch delete mode 100644 sources/poky/meta/recipes-core/busybox/busybox/CVE-2023-39810.patch create mode 100644 sources/poky/meta/recipes-core/busybox/busybox/busybox-1.36.1-no-cbq.patch delete mode 100644 sources/poky/meta/recipes-core/busybox/busybox/busybox-udhcpc-no_deconfig.patch delete mode 100644 sources/poky/meta/recipes-core/coreutils/coreutils/0001-posixtm-pacify-clang-18.patch delete mode 100644 sources/poky/meta/recipes-core/coreutils/coreutils/CVE-2024-0684.patch delete mode 100644 sources/poky/meta/recipes-core/coreutils/coreutils/CVE-2025-5278.patch create mode 100644 sources/poky/meta/recipes-core/coreutils/coreutils/intermittent-testfailure.patch delete mode 100644 sources/poky/meta/recipes-core/coreutils/coreutils_9.4.bb create mode 100644 sources/poky/meta/recipes-core/coreutils/coreutils_9.5.bb delete mode 100644 sources/poky/meta/recipes-core/dropbear/dropbear/0007-Don-t-close-channels-when-a-PID-hasn-t-started.patch delete mode 100644 sources/poky/meta/recipes-core/dropbear/dropbear/CVE-2023-36328.patch delete mode 100644 sources/poky/meta/recipes-core/dropbear/dropbear/CVE-2023-48795.patch delete mode 100644 sources/poky/meta/recipes-core/dropbear/dropbear_2022.83.bb create mode 100644 sources/poky/meta/recipes-core/dropbear/dropbear_2024.85.bb delete mode 100644 sources/poky/meta/recipes-core/ell/ell_0.64.bb create mode 100644 sources/poky/meta/recipes-core/ell/ell_0.68.bb delete mode 100644 sources/poky/meta/recipes-core/expat/expat/0001-tests-Cover-indirect-entity-recursion.patch delete mode 100644 sources/poky/meta/recipes-core/expat/expat/CVE-2024-8176-01.patch delete mode 100644 sources/poky/meta/recipes-core/expat/expat/CVE-2024-8176-02.patch create mode 100644 sources/poky/meta/recipes-core/glib-2.0/files/0001-Do-not-write-bindir-into-pkg-config-files.patch rename sources/poky/meta/recipes-core/glib-2.0/{glib-2.0 => files}/0001-Fix-DATADIRNAME-on-uclibc-Linux.patch (92%) rename sources/poky/meta/recipes-core/glib-2.0/{glib-2.0 => files}/0001-Install-gio-querymodules-as-libexec_PROGRAM.patch (84%) rename sources/poky/meta/recipes-core/glib-2.0/{glib-2.0 => files}/0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch (95%) rename sources/poky/meta/recipes-core/glib-2.0/{glib-2.0 => files}/0001-gio-tests-resources.c-comment-out-a-build-host-only-.patch (92%) rename sources/poky/meta/recipes-core/glib-2.0/{glib-2.0 => files}/0001-meson-Run-atomics-test-on-clang-as-well.patch (88%) rename sources/poky/meta/recipes-core/glib-2.0/{glib-2.0 => files}/0001-meson.build-do-not-enable-pidfd-features-on-native-g.patch (84%) rename sources/poky/meta/recipes-core/glib-2.0/{glib-2.0 => files}/0010-Do-not-hardcode-python-path-into-various-tools.patch (93%) rename sources/poky/meta/recipes-core/glib-2.0/{glib-2.0 => files}/gdatetime-test-fail-0001.patch (93%) rename sources/poky/meta/recipes-core/glib-2.0/{glib-2.0 => files}/gdatetime-test-fail-0002.patch (92%) rename sources/poky/meta/recipes-core/glib-2.0/{glib-2.0 => files}/gdatetime-test-fail-0003.patch (91%) rename sources/poky/meta/recipes-core/glib-2.0/{glib-2.0 => files}/meson.cross.d/common (100%) rename sources/poky/meta/recipes-core/glib-2.0/{glib-2.0 => files}/meson.cross.d/common-glibc (100%) rename sources/poky/meta/recipes-core/glib-2.0/{glib-2.0 => files}/meson.cross.d/common-linux (100%) rename sources/poky/meta/recipes-core/glib-2.0/{glib-2.0 => files}/meson.cross.d/common-mingw (100%) rename sources/poky/meta/recipes-core/glib-2.0/{glib-2.0 => files}/meson.cross.d/common-musl (100%) rename sources/poky/meta/recipes-core/glib-2.0/{glib-2.0 => files}/relocate-modules.patch (86%) rename sources/poky/meta/recipes-core/glib-2.0/{glib-2.0 => files}/run-ptest (100%) rename sources/poky/meta/recipes-core/glib-2.0/{glib-2.0 => files}/skip-timeout.patch (90%) create mode 100644 sources/poky/meta/recipes-core/glib-2.0/glib-2.0-initial_2.80.4.bb delete mode 100644 sources/poky/meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-write-bindir-into-pkg-config-files.patch delete mode 100644 sources/poky/meta/recipes-core/glib-2.0/glib-2.0/0001-Set-host_machine-correctly-when-building-with-mingw3.patch delete mode 100644 sources/poky/meta/recipes-core/glib-2.0/glib-2.0/0001-Switch-from-the-deprecated-distutils-module-to-the-p.patch delete mode 100644 sources/poky/meta/recipes-core/glib-2.0/glib-2.0/CVE-2024-52533.patch delete mode 100644 sources/poky/meta/recipes-core/glib-2.0/glib-2.0/CVE-2025-3360-01.patch delete mode 100644 sources/poky/meta/recipes-core/glib-2.0/glib-2.0/CVE-2025-3360-02.patch delete mode 100644 sources/poky/meta/recipes-core/glib-2.0/glib-2.0/CVE-2025-3360-03.patch delete mode 100644 sources/poky/meta/recipes-core/glib-2.0/glib-2.0/CVE-2025-3360-04.patch delete mode 100644 sources/poky/meta/recipes-core/glib-2.0/glib-2.0/CVE-2025-3360-05.patch delete mode 100644 sources/poky/meta/recipes-core/glib-2.0/glib-2.0/CVE-2025-3360-06.patch delete mode 100644 sources/poky/meta/recipes-core/glib-2.0/glib-2.0/CVE-2025-4373-01.patch delete mode 100644 sources/poky/meta/recipes-core/glib-2.0/glib-2.0/CVE-2025-4373-02.patch delete mode 100644 sources/poky/meta/recipes-core/glib-2.0/glib-2.0/memory-monitor.patch delete mode 100644 sources/poky/meta/recipes-core/glib-2.0/glib-2.0_2.78.6.bb create mode 100644 sources/poky/meta/recipes-core/glib-2.0/glib-2.0_2.80.4.bb delete mode 100644 sources/poky/meta/recipes-core/glib-networking/glib-networking_2.78.1.bb create mode 100644 sources/poky/meta/recipes-core/glib-networking/glib-networking_2.80.0.bb rename sources/poky/meta/recipes-core/glibc/{cross-localedef-native_2.39.bb => cross-localedef-native_2.40.bb} (100%) rename sources/poky/meta/recipes-core/glibc/{glibc-locale_2.39.bb => glibc-locale_2.40.bb} (100%) rename sources/poky/meta/recipes-core/glibc/{glibc-mtrace_2.39.bb => glibc-mtrace_2.40.bb} (100%) rename sources/poky/meta/recipes-core/glibc/{glibc-scripts_2.39.bb => glibc-scripts_2.40.bb} (100%) delete mode 100644 sources/poky/meta/recipes-core/glibc/glibc-testsuite_2.39.bb create mode 100644 sources/poky/meta/recipes-core/glibc/glibc-testsuite_2.40.bb create mode 100644 sources/poky/meta/recipes-core/glibc/glibc-y2038-tests_2.40.bb delete mode 100644 sources/poky/meta/recipes-core/glibc/glibc/0001-stdlib-Add-single-threaded-fast-path-to-rand.patch delete mode 100644 sources/poky/meta/recipes-core/glibc/glibc/0023-qemu-stale-process.patch create mode 100644 sources/poky/meta/recipes-core/glibc/glibc/0023-tests-Skip-2-qemu-tests-that-can-hang-in-oe-selftest.patch create mode 100644 sources/poky/meta/recipes-core/glibc/glibc/0024-Fix-missing-randomness-in-__gen_tempname-bug-32214.patch create mode 100755 sources/poky/meta/recipes-core/glibc/glibc/run-ptest delete mode 100644 sources/poky/meta/recipes-core/glibc/glibc_2.39.bb create mode 100644 sources/poky/meta/recipes-core/glibc/glibc_2.40.bb delete mode 100644 sources/poky/meta/recipes-core/ifupdown/ifupdown_0.8.41.bb create mode 100644 sources/poky/meta/recipes-core/ifupdown/ifupdown_0.8.43.bb delete mode 100644 sources/poky/meta/recipes-core/libxml/libxml2/CVE-2025-32414.patch delete mode 100644 sources/poky/meta/recipes-core/libxml/libxml2/CVE-2025-32415.patch delete mode 100644 sources/poky/meta/recipes-core/libxml/libxml2/CVE-2025-49794-CVE-2025-49796.patch delete mode 100644 sources/poky/meta/recipes-core/libxml/libxml2/CVE-2025-49795.patch delete mode 100644 sources/poky/meta/recipes-core/libxml/libxml2/CVE-2025-6021.patch delete mode 100644 sources/poky/meta/recipes-core/libxml/libxml2/CVE-2025-6170.patch delete mode 100644 sources/poky/meta/recipes-core/libxml/libxml2_2.12.10.bb create mode 100644 sources/poky/meta/recipes-core/libxml/libxml2_2.13.6.bb delete mode 100644 sources/poky/meta/recipes-core/musl/musl/0003-elf.h-add-typedefs-for-Elf64_Relr-and-Elf32_Relr.patch delete mode 100644 sources/poky/meta/recipes-core/ncurses/files/0001-Fix-CVE-2023-29491.patch delete mode 100644 sources/poky/meta/recipes-core/ncurses/files/0001-Updating-reset-code-ncurses-6.4-patch-20231104.patch delete mode 100644 sources/poky/meta/recipes-core/ncurses/files/CVE-2023-45918.patch delete mode 100644 sources/poky/meta/recipes-core/ncurses/files/CVE-2023-50495.patch delete mode 100644 sources/poky/meta/recipes-core/ncurses/files/CVE-2025-6141.patch delete mode 100644 sources/poky/meta/recipes-core/ncurses/ncurses_6.4.bb create mode 100644 sources/poky/meta/recipes-core/ncurses/ncurses_6.5.bb delete mode 100644 sources/poky/meta/recipes-core/ncurses/site_config/headers delete mode 100644 sources/poky/meta/recipes-core/ovmf/ovmf/0001-MdeModulePkg-Potential-UINT32-overflow-in-S3-ResumeC.patch delete mode 100644 sources/poky/meta/recipes-core/ovmf/ovmf/0001-MdePkg-Fix-overflow-issue-in-BasePeCoffLib.patch create mode 100644 sources/poky/meta/recipes-core/picolibc/picolibc-helloworld_git.bb create mode 100644 sources/poky/meta/recipes-core/picolibc/picolibc.inc create mode 100644 sources/poky/meta/recipes-core/picolibc/picolibc/avoid_polluting_cross_directories.patch create mode 100644 sources/poky/meta/recipes-core/picolibc/picolibc/no-early-compiler-checks.cross create mode 100644 sources/poky/meta/recipes-core/picolibc/picolibc_git.bb delete mode 100644 sources/poky/meta/recipes-core/readline/readline/readline82-001.patch delete mode 100644 sources/poky/meta/recipes-core/readline/readline/readline82-002.patch delete mode 100644 sources/poky/meta/recipes-core/readline/readline/readline82-003.patch delete mode 100644 sources/poky/meta/recipes-core/readline/readline/readline82-004.patch delete mode 100644 sources/poky/meta/recipes-core/readline/readline/readline82-005.patch delete mode 100644 sources/poky/meta/recipes-core/readline/readline/readline82-006.patch delete mode 100644 sources/poky/meta/recipes-core/readline/readline/readline82-007.patch delete mode 100644 sources/poky/meta/recipes-core/readline/readline/readline82-008.patch delete mode 100644 sources/poky/meta/recipes-core/readline/readline/readline82-009.patch delete mode 100644 sources/poky/meta/recipes-core/readline/readline/readline82-010.patch create mode 100644 sources/poky/meta/recipes-core/readline/readline_8.2.13.bb delete mode 100644 sources/poky/meta/recipes-core/readline/readline_8.2.bb rename sources/poky/meta/recipes-core/systemd/{systemd-boot-native_255.21.bb => systemd-boot-native_256.5.bb} (100%) delete mode 100644 sources/poky/meta/recipes-core/systemd/systemd-boot_255.21.bb create mode 100644 sources/poky/meta/recipes-core/systemd/systemd-boot_256.5.bb create mode 100644 sources/poky/meta/recipes-core/systemd/systemd/0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch delete mode 100644 sources/poky/meta/recipes-core/systemd/systemd/0001-missing_type.h-add-comparison_fn_t.patch delete mode 100644 sources/poky/meta/recipes-core/systemd/systemd/0002-add-fallback-parse_printf_format-implementation.patch delete mode 100644 sources/poky/meta/recipes-core/systemd/systemd/0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch create mode 100644 sources/poky/meta/recipes-core/systemd/systemd/0002-implment-systemd-sysv-install-for-OE.patch create mode 100644 sources/poky/meta/recipes-core/systemd/systemd/0003-coredump-set-ProtectHome-to-read-only.patch delete mode 100644 sources/poky/meta/recipes-core/systemd/systemd/0003-src-basic-missing.h-check-for-missing-strndupa.patch delete mode 100644 sources/poky/meta/recipes-core/systemd/systemd/0003-timedated-Respond-on-org.freedesktop.timedate1.SetNT.patch delete mode 100644 sources/poky/meta/recipes-core/systemd/systemd/0004-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch create mode 100644 sources/poky/meta/recipes-core/systemd/systemd/0004-missing_type.h-add-comparison_fn_t.patch create mode 100644 sources/poky/meta/recipes-core/systemd/systemd/0005-add-fallback-parse_printf_format-implementation.patch delete mode 100644 sources/poky/meta/recipes-core/systemd/systemd/0005-add-missing-FTW_-macros-for-musl.patch delete mode 100644 sources/poky/meta/recipes-core/systemd/systemd/0006-Use-uintmax_t-for-handling-rlim_t.patch create mode 100644 sources/poky/meta/recipes-core/systemd/systemd/0006-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch create mode 100644 sources/poky/meta/recipes-core/systemd/systemd/0007-add-missing-FTW_-macros-for-musl.patch delete mode 100644 sources/poky/meta/recipes-core/systemd/systemd/0007-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch delete mode 100644 sources/poky/meta/recipes-core/systemd/systemd/0008-Define-glibc-compatible-basename-for-non-glibc-syste.patch create mode 100644 sources/poky/meta/recipes-core/systemd/systemd/0008-Use-uintmax_t-for-handling-rlim_t.patch delete mode 100644 sources/poky/meta/recipes-core/systemd/systemd/0008-implment-systemd-sysv-install-for-OE.patch delete mode 100644 sources/poky/meta/recipes-core/systemd/systemd/0009-Do-not-disable-buffering-when-writing-to-oom_score_a.patch create mode 100644 sources/poky/meta/recipes-core/systemd/systemd/0009-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch create mode 100644 sources/poky/meta/recipes-core/systemd/systemd/0010-Define-glibc-compatible-basename-for-non-glibc-syste.patch delete mode 100644 sources/poky/meta/recipes-core/systemd/systemd/0010-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch create mode 100644 sources/poky/meta/recipes-core/systemd/systemd/0011-Do-not-disable-buffering-when-writing-to-oom_score_a.patch delete mode 100644 sources/poky/meta/recipes-core/systemd/systemd/0011-avoid-redefinition-of-prctl_mm_map-structure.patch create mode 100644 sources/poky/meta/recipes-core/systemd/systemd/0012-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch delete mode 100644 sources/poky/meta/recipes-core/systemd/systemd/0012-do-not-disable-buffer-in-writing-files.patch delete mode 100644 sources/poky/meta/recipes-core/systemd/systemd/0013-Handle-__cpu_mask-usage.patch create mode 100644 sources/poky/meta/recipes-core/systemd/systemd/0013-avoid-redefinition-of-prctl_mm_map-structure.patch delete mode 100644 sources/poky/meta/recipes-core/systemd/systemd/0014-Handle-missing-gshadow.patch create mode 100644 sources/poky/meta/recipes-core/systemd/systemd/0014-do-not-disable-buffer-in-writing-files.patch create mode 100644 sources/poky/meta/recipes-core/systemd/systemd/0015-Handle-__cpu_mask-usage.patch delete mode 100644 sources/poky/meta/recipes-core/systemd/systemd/0015-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch create mode 100644 sources/poky/meta/recipes-core/systemd/systemd/0016-Handle-missing-gshadow.patch delete mode 100644 sources/poky/meta/recipes-core/systemd/systemd/0016-pass-correct-parameters-to-getdents64.patch delete mode 100644 sources/poky/meta/recipes-core/systemd/systemd/0017-Adjust-for-musl-headers.patch create mode 100644 sources/poky/meta/recipes-core/systemd/systemd/0017-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch create mode 100644 sources/poky/meta/recipes-core/systemd/systemd/0018-pass-correct-parameters-to-getdents64.patch delete mode 100644 sources/poky/meta/recipes-core/systemd/systemd/0018-test-bus-error-strerror-is-assumed-to-be-GNU-specifi.patch create mode 100644 sources/poky/meta/recipes-core/systemd/systemd/0019-Adjust-for-musl-headers.patch delete mode 100644 sources/poky/meta/recipes-core/systemd/systemd/0019-errno-util-Make-STRERROR-portable-for-musl.patch delete mode 100644 sources/poky/meta/recipes-core/systemd/systemd/0020-sd-event-Make-malloc_trim-conditional-on-glibc.patch create mode 100644 sources/poky/meta/recipes-core/systemd/systemd/0020-test-bus-error-strerror-is-assumed-to-be-GNU-specifi.patch create mode 100644 sources/poky/meta/recipes-core/systemd/systemd/0021-errno-util-Make-STRERROR-portable-for-musl.patch delete mode 100644 sources/poky/meta/recipes-core/systemd/systemd/0021-shared-Do-not-use-malloc_info-on-musl.patch delete mode 100644 sources/poky/meta/recipes-core/systemd/systemd/0022-avoid-missing-LOCK_EX-declaration.patch create mode 100644 sources/poky/meta/recipes-core/systemd/systemd/0022-sd-event-Make-malloc_trim-conditional-on-glibc.patch create mode 100644 sources/poky/meta/recipes-core/systemd/systemd/0023-shared-Do-not-use-malloc_info-on-musl.patch create mode 100644 sources/poky/meta/recipes-core/systemd/systemd/0024-avoid-missing-LOCK_EX-declaration.patch create mode 100644 sources/poky/meta/recipes-core/systemd/systemd/0025-include-signal.h-to-avoid-the-undeclared-error.patch create mode 100644 sources/poky/meta/recipes-core/systemd/systemd/0026-undef-stdin-for-references-using-stdin-as-a-struct-m.patch create mode 100644 sources/poky/meta/recipes-core/systemd/systemd/0027-adjust-header-inclusion-order-to-avoid-redeclaration.patch create mode 100644 sources/poky/meta/recipes-core/systemd/systemd/0028-build-path.c-avoid-boot-time-segfault-for-musl.patch delete mode 100644 sources/poky/meta/recipes-core/systemd/systemd_255.21.bb create mode 100644 sources/poky/meta/recipes-core/systemd/systemd_256.5.bb delete mode 100644 sources/poky/meta/recipes-core/sysvinit/sysvinit/0001-Accepted-patch-from-Mark-Hindley-which-avoids-cleari.patch delete mode 100644 sources/poky/meta/recipes-core/ttyrun/ttyrun_2.31.0.bb create mode 100644 sources/poky/meta/recipes-core/ttyrun/ttyrun_2.34.0.bb rename sources/poky/meta/recipes-core/util-linux/{util-linux-libuuid_2.39.3.bb => util-linux-libuuid_2.40.2.bb} (100%) create mode 100644 sources/poky/meta/recipes-core/util-linux/util-linux/0001-Revert-autotools-make-pam-install-path-configurable.patch delete mode 100644 sources/poky/meta/recipes-core/util-linux/util-linux/0001-login-utils-include-libgen.h-for-basename-API.patch delete mode 100644 sources/poky/meta/recipes-core/util-linux/util-linux/CVE-2024-28085-0001.patch delete mode 100644 sources/poky/meta/recipes-core/util-linux/util-linux/CVE-2024-28085-0002.patch delete mode 100644 sources/poky/meta/recipes-core/util-linux/util-linux/fstab-isolation.patch delete mode 100644 sources/poky/meta/recipes-core/util-linux/util-linux/mit-license.patch delete mode 100644 sources/poky/meta/recipes-core/util-linux/util-linux_2.39.3.bb create mode 100644 sources/poky/meta/recipes-core/util-linux/util-linux_2.40.2.bb delete mode 100644 sources/poky/meta/recipes-core/zlib/site_config/headers delete mode 100644 sources/poky/meta/recipes-devtools/automake/automake/0001-Drop-ar-u-argument.patch delete mode 100644 sources/poky/meta/recipes-devtools/automake/automake/0001-automake-Update-for-python.m4-to-respect-libdir.patch delete mode 100644 sources/poky/meta/recipes-devtools/automake/automake/0001-build-fix-race-in-parallel-builds.patch create mode 100644 sources/poky/meta/recipes-devtools/automake/automake/0002-automake-Update-for-python.m4-to-respect-libdir.patch create mode 100644 sources/poky/meta/recipes-devtools/automake/automake/0003-build-fix-race-in-parallel-builds.patch create mode 100644 sources/poky/meta/recipes-devtools/automake/automake/0004-Add-a-new-distro-feature-ptest.patch create mode 100644 sources/poky/meta/recipes-devtools/automake/automake/0005-Set-relative-to-top_builddir-path-in-Makefile-to-acc.patch create mode 100644 sources/poky/meta/recipes-devtools/automake/automake/0006-automake-Remove-delays-in-configure-scripts-using-au.patch delete mode 100644 sources/poky/meta/recipes-devtools/automake/automake/buildtest.patch delete mode 100644 sources/poky/meta/recipes-devtools/automake/automake/new_rt_path_for_test-driver.patch delete mode 100644 sources/poky/meta/recipes-devtools/automake/automake/performance.patch delete mode 100644 sources/poky/meta/recipes-devtools/automake/automake_1.16.5.bb create mode 100644 sources/poky/meta/recipes-devtools/automake/automake_1.17.bb delete mode 100644 sources/poky/meta/recipes-devtools/binutils/binutils-2.42.inc create mode 100644 sources/poky/meta/recipes-devtools/binutils/binutils-2.43.1.inc rename sources/poky/meta/recipes-devtools/binutils/{binutils-cross-canadian_2.42.bb => binutils-cross-canadian_2.43.1.bb} (100%) delete mode 100644 sources/poky/meta/recipes-devtools/binutils/binutils-cross-testsuite_2.42.bb rename sources/poky/meta/recipes-devtools/binutils/{binutils-cross_2.42.bb => binutils-cross_2.43.1.bb} (100%) rename sources/poky/meta/recipes-devtools/binutils/{binutils-crosssdk_2.42.bb => binutils-crosssdk_2.43.1.bb} (100%) create mode 100644 sources/poky/meta/recipes-devtools/binutils/binutils-testsuite_2.43.1.bb rename sources/poky/meta/recipes-devtools/binutils/binutils/{0016-CVE-2024-53589.patch => 0015-CVE-2024-53589.patch} (100%) delete mode 100644 sources/poky/meta/recipes-devtools/binutils/binutils/0015-gprofng-change-use-of-bignum-to-bigint.patch create mode 100644 sources/poky/meta/recipes-devtools/binutils/binutils/0016-CVE-2025-0840.patch delete mode 100644 sources/poky/meta/recipes-devtools/binutils/binutils/0017-dlltool-file-name-too-long.patch delete mode 100644 sources/poky/meta/recipes-devtools/binutils/binutils/0018-CVE-2025-0840.patch delete mode 100644 sources/poky/meta/recipes-devtools/binutils/binutils/0019-CVE-2025-1153-1.patch delete mode 100644 sources/poky/meta/recipes-devtools/binutils/binutils/0020-CVE-2025-1153-2.patch delete mode 100644 sources/poky/meta/recipes-devtools/binutils/binutils/0021-CVE-2025-1153-3.patch delete mode 100644 sources/poky/meta/recipes-devtools/binutils/binutils/0022-CVE-2025-5244.patch delete mode 100644 sources/poky/meta/recipes-devtools/binutils/binutils/0022-CVE-2025-5245.patch delete mode 100644 sources/poky/meta/recipes-devtools/binutils/binutils/0023-CVE-2025-7545.patch delete mode 100644 sources/poky/meta/recipes-devtools/binutils/binutils/0023-CVE-2025-7546.patch delete mode 100644 sources/poky/meta/recipes-devtools/binutils/binutils/CVE-2024-57360.patch delete mode 100644 sources/poky/meta/recipes-devtools/binutils/binutils/CVE-2025-1176.patch delete mode 100644 sources/poky/meta/recipes-devtools/binutils/binutils/CVE-2025-1178.patch delete mode 100644 sources/poky/meta/recipes-devtools/binutils/binutils/CVE-2025-1179-pre.patch delete mode 100644 sources/poky/meta/recipes-devtools/binutils/binutils/CVE-2025-1179.patch delete mode 100644 sources/poky/meta/recipes-devtools/binutils/binutils/CVE-2025-1181-pre.patch delete mode 100644 sources/poky/meta/recipes-devtools/binutils/binutils/CVE-2025-1181.patch delete mode 100644 sources/poky/meta/recipes-devtools/binutils/binutils/CVE-2025-1182.patch rename sources/poky/meta/recipes-devtools/binutils/{binutils_2.42.bb => binutils_2.43.1.bb} (100%) create mode 100644 sources/poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_6.10.1.bb delete mode 100644 sources/poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_6.7.1.bb create mode 100644 sources/poky/meta/recipes-devtools/ccache/ccache_4.10.2.bb delete mode 100644 sources/poky/meta/recipes-devtools/ccache/ccache_4.9.1.bb delete mode 100644 sources/poky/meta/recipes-devtools/ccache/files/0001-xxhash.h-Fix-build-with-gcc-12.patch delete mode 100644 sources/poky/meta/recipes-devtools/cmake/cmake-native_3.28.3.bb create mode 100644 sources/poky/meta/recipes-devtools/cmake/cmake-native_3.30.2.bb delete mode 100644 sources/poky/meta/recipes-devtools/cmake/cmake/0001-CMakeDetermineCompilerABI-Strip-pipe-from-compile-fl.patch delete mode 100644 sources/poky/meta/recipes-devtools/cmake/cmake/0001-ctest-Allow-arbitrary-characters-in-test-names-of-CT.patch delete mode 100644 sources/poky/meta/recipes-devtools/cmake/cmake_3.28.3.bb create mode 100644 sources/poky/meta/recipes-devtools/cmake/cmake_3.30.2.bb delete mode 100644 sources/poky/meta/recipes-devtools/createrepo-c/createrepo-c_1.0.4.bb create mode 100644 sources/poky/meta/recipes-devtools/createrepo-c/createrepo-c_1.1.4.bb delete mode 100644 sources/poky/meta/recipes-devtools/dmidecode/dmidecode_3.5.bb create mode 100644 sources/poky/meta/recipes-devtools/dmidecode/dmidecode_3.6.bb delete mode 100644 sources/poky/meta/recipes-devtools/dnf/dnf_4.19.0.bb create mode 100644 sources/poky/meta/recipes-devtools/dnf/dnf_4.21.1.bb create mode 100644 sources/poky/meta/recipes-devtools/dpkg/dpkg/0001-script.c-avoid-use-of-chroot.patch delete mode 100644 sources/poky/meta/recipes-devtools/dpkg/dpkg/0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch delete mode 100644 sources/poky/meta/recipes-devtools/dpkg/dpkg/pager.patch delete mode 100644 sources/poky/meta/recipes-devtools/dpkg/dpkg_1.22.0.bb create mode 100644 sources/poky/meta/recipes-devtools/dpkg/dpkg_1.22.11.bb delete mode 100644 sources/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.47.0.bb create mode 100644 sources/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.47.1.bb delete mode 100644 sources/poky/meta/recipes-devtools/elfutils/files/0006-Fix-build-on-aarch64-musl.patch delete mode 100644 sources/poky/meta/recipes-devtools/elfutils/files/CVE-2025-1352.patch delete mode 100644 sources/poky/meta/recipes-devtools/elfutils/files/CVE-2025-1365.patch delete mode 100644 sources/poky/meta/recipes-devtools/elfutils/files/CVE-2025-1371.patch delete mode 100644 sources/poky/meta/recipes-devtools/elfutils/files/CVE-2025-1372.patch delete mode 100644 sources/poky/meta/recipes-devtools/erofs-utils/erofs-utils_1.7.1.bb create mode 100644 sources/poky/meta/recipes-devtools/erofs-utils/erofs-utils_1.8.1.bb create mode 100644 sources/poky/meta/recipes-devtools/expect/expect/tcl840.patch delete mode 100644 sources/poky/meta/recipes-devtools/fdisk/gptfdisk/0001-Fix-failure-crash-of-sgdisk-when-compiled-with-lates.patch delete mode 100644 sources/poky/meta/recipes-devtools/fdisk/gptfdisk/0001-Updated-guid.cc-to-deal-with-minor-change-in-libuuid.patch delete mode 100644 sources/poky/meta/recipes-devtools/fdisk/gptfdisk/0001-Use-64bit-time_t-on-linux-as-well.patch delete mode 100644 sources/poky/meta/recipes-devtools/fdisk/gptfdisk/popt-1.19-follow-up.patch create mode 100644 sources/poky/meta/recipes-devtools/fdisk/gptfdisk_1.0.10.bb delete mode 100644 sources/poky/meta/recipes-devtools/fdisk/gptfdisk_1.0.9.bb create mode 100644 sources/poky/meta/recipes-devtools/fmt/fmt/0001-Get-rid-of-std-copy.patch create mode 100644 sources/poky/meta/recipes-devtools/fmt/fmt_11.0.2.bb delete mode 100644 sources/poky/meta/recipes-devtools/gcc/gcc-13.4.inc create mode 100644 sources/poky/meta/recipes-devtools/gcc/gcc-14.2.inc rename sources/poky/meta/recipes-devtools/gcc/{gcc-cross-canadian_13.4.bb => gcc-cross-canadian_14.2.bb} (100%) rename sources/poky/meta/recipes-devtools/gcc/{gcc-cross_13.4.bb => gcc-cross_14.2.bb} (100%) rename sources/poky/meta/recipes-devtools/gcc/{gcc-crosssdk_13.4.bb => gcc-crosssdk_14.2.bb} (100%) rename sources/poky/meta/recipes-devtools/gcc/{gcc-runtime_13.4.bb => gcc-runtime_14.2.bb} (100%) rename sources/poky/meta/recipes-devtools/gcc/{gcc-sanitizers_13.4.bb => gcc-sanitizers_14.2.bb} (100%) delete mode 100644 sources/poky/meta/recipes-devtools/gcc/gcc-source_13.4.bb create mode 100644 sources/poky/meta/recipes-devtools/gcc/gcc-source_14.2.bb create mode 100644 sources/poky/meta/recipes-devtools/gcc/gcc/0026-gcc-Fix-c-tweak-for-Wrange-loop-construct.patch delete mode 100644 sources/poky/meta/recipes-devtools/gcc/gcc/0027-Fix-gcc-vect-module-testcases.patch create mode 100644 sources/poky/meta/recipes-devtools/gcc/gcc/gcc.git-ab884fffe3fc82a710bea66ad651720d71c938b8.patch rename sources/poky/meta/recipes-devtools/gcc/{gcc_13.4.bb => gcc_14.2.bb} (100%) rename sources/poky/meta/recipes-devtools/gcc/{libgcc-initial_13.4.bb => libgcc-initial_14.2.bb} (100%) rename sources/poky/meta/recipes-devtools/gcc/{libgcc_13.4.bb => libgcc_14.2.bb} (100%) rename sources/poky/meta/recipes-devtools/gcc/{libgfortran_13.4.bb => libgfortran_14.2.bb} (100%) rename sources/poky/meta/recipes-devtools/gdb/{gdb-cross-canadian_14.2.bb => gdb-cross-canadian_15.1.bb} (100%) rename sources/poky/meta/recipes-devtools/gdb/{gdb-cross_14.2.bb => gdb-cross_15.1.bb} (100%) create mode 100644 sources/poky/meta/recipes-devtools/gdb/gdb/0001-Fix-Wenum-constexpr-conversion-in-enum-flags.h.patch create mode 100644 sources/poky/meta/recipes-devtools/gdb/gdb/0006-Fix-invalid-sigprocmask-call.patch delete mode 100644 sources/poky/meta/recipes-devtools/gdb/gdb/0006-resolve-restrict-keyword-conflict.patch create mode 100644 sources/poky/meta/recipes-devtools/gdb/gdb/0007-Define-alignof-using-_Alignof-when-using-C11-or-newe.patch delete mode 100644 sources/poky/meta/recipes-devtools/gdb/gdb/0007-Fix-invalid-sigprocmask-call.patch delete mode 100644 sources/poky/meta/recipes-devtools/gdb/gdb/0008-Define-alignof-using-_Alignof-when-using-C11-or-newe.patch rename sources/poky/meta/recipes-devtools/gdb/{gdb_14.2.bb => gdb_15.1.bb} (100%) delete mode 100644 sources/poky/meta/recipes-devtools/git/git/environment.d-git.sh delete mode 100644 sources/poky/meta/recipes-devtools/git/git_2.44.4.bb create mode 100644 sources/poky/meta/recipes-devtools/git/git_2.46.1.bb delete mode 100644 sources/poky/meta/recipes-devtools/go/go/CVE-2025-22870.patch delete mode 100644 sources/poky/meta/recipes-devtools/go/go/CVE-2025-22871.patch delete mode 100644 sources/poky/meta/recipes-devtools/go/go/CVE-2025-4673.patch delete mode 100644 sources/poky/meta/recipes-devtools/libcomps/libcomps_0.1.20.bb create mode 100644 sources/poky/meta/recipes-devtools/libcomps/libcomps_0.1.21.bb delete mode 100644 sources/poky/meta/recipes-devtools/libdnf/libdnf_0.73.2.bb create mode 100644 sources/poky/meta/recipes-devtools/libdnf/libdnf_0.73.3.bb delete mode 100644 sources/poky/meta/recipes-devtools/libedit/libedit_20230828-3.1.bb create mode 100644 sources/poky/meta/recipes-devtools/libedit/libedit_20240808-3.1.bb delete mode 100644 sources/poky/meta/recipes-devtools/librepo/librepo/0001-gpg_gpgme.c-fix-build-errors-with-older-gcc.patch delete mode 100644 sources/poky/meta/recipes-devtools/librepo/librepo_1.17.0.bb create mode 100644 sources/poky/meta/recipes-devtools/librepo/librepo_1.18.1.bb delete mode 100644 sources/poky/meta/recipes-devtools/libtool/libtool-2.4.7.inc create mode 100644 sources/poky/meta/recipes-devtools/libtool/libtool-2.5.2.inc delete mode 100644 sources/poky/meta/recipes-devtools/libtool/libtool-cross_2.4.7.bb create mode 100644 sources/poky/meta/recipes-devtools/libtool/libtool-cross_2.5.2.bb delete mode 100644 sources/poky/meta/recipes-devtools/libtool/libtool-native_2.4.7.bb create mode 100644 sources/poky/meta/recipes-devtools/libtool/libtool-native_2.5.2.bb delete mode 100644 sources/poky/meta/recipes-devtools/libtool/libtool/0001-ltmain.in-Parse-additional-clang-options.patch delete mode 100644 sources/poky/meta/recipes-devtools/libtool/libtool/0002-libtool.m4-Rename-the-with-sysroot-option-to-avoid-c.patch delete mode 100644 sources/poky/meta/recipes-devtools/libtool/libtool/0003-libtool.m4-Cleanup-sysroot-trailing.patch delete mode 100644 sources/poky/meta/recipes-devtools/libtool/libtool/0003-ltmain.in-Add-missing-sysroot-to-library-path.patch delete mode 100644 sources/poky/meta/recipes-devtools/libtool/libtool/0007-libtool-Fix-support-for-NIOS2-processor.patch delete mode 100644 sources/poky/meta/recipes-devtools/libtool/libtool/0009-Makefile.am-make-sure-autoheader-run-before-autoconf.patch delete mode 100644 sources/poky/meta/recipes-devtools/libtool/libtool/0010-Makefile.am-make-sure-autoheader-run-before-automake.patch delete mode 100644 sources/poky/meta/recipes-devtools/libtool/libtool/0011-ltmain.in-Handle-prefix-map-compiler-options-correct.patch delete mode 100644 sources/poky/meta/recipes-devtools/libtool/libtool/0012-libtool.m4-For-reproducibility-stop-encoding-hostnam.patch rename sources/poky/meta/recipes-devtools/libtool/{libtool_2.4.7.bb => libtool_2.5.2.bb} (100%) delete mode 100644 sources/poky/meta/recipes-devtools/libtool/nativesdk-libtool_2.4.7.bb create mode 100644 sources/poky/meta/recipes-devtools/libtool/nativesdk-libtool_2.5.2.bb delete mode 100644 sources/poky/meta/recipes-devtools/llvm/llvm_18.1.6.bb create mode 100644 sources/poky/meta/recipes-devtools/llvm/llvm_18.1.8.bb delete mode 100644 sources/poky/meta/recipes-devtools/lua/lua_5.4.6.bb create mode 100644 sources/poky/meta/recipes-devtools/lua/lua_5.4.7.bb delete mode 100644 sources/poky/meta/recipes-devtools/meson/meson_1.3.1.bb create mode 100644 sources/poky/meta/recipes-devtools/meson/meson_1.5.1.bb create mode 100644 sources/poky/meta/recipes-devtools/mtools/mtools_4.0.44.bb delete mode 100644 sources/poky/meta/recipes-devtools/mtools/mtools_4.0.49.bb delete mode 100644 sources/poky/meta/recipes-devtools/ninja/ninja/885b4efb41c039789b81f0dc0d67c1ed0faea17c.patch delete mode 100644 sources/poky/meta/recipes-devtools/ninja/ninja_1.11.1.bb create mode 100644 sources/poky/meta/recipes-devtools/ninja/ninja_1.12.1.bb delete mode 100644 sources/poky/meta/recipes-devtools/opkg-utils/opkg-utils/0001-opkg-build-remove-numeric-owner-parameter-overzealou.patch delete mode 100644 sources/poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.6.3.bb create mode 100644 sources/poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.7.0.bb delete mode 100644 sources/poky/meta/recipes-devtools/opkg/opkg/0001-libopkg-Use-libgen.h-to-provide-basename-API.patch delete mode 100644 sources/poky/meta/recipes-devtools/opkg/opkg_0.6.3.bb create mode 100644 sources/poky/meta/recipes-devtools/opkg/opkg_0.7.0.bb delete mode 100644 sources/poky/meta/recipes-devtools/perl-cross/perlcross_1.6.2.bb create mode 100644 sources/poky/meta/recipes-devtools/perl-cross/perlcross_1.6.bb delete mode 100644 sources/poky/meta/recipes-devtools/perl/files/0001-Fix-intermittent-failure-of-test-t-op-sigsystem.t.patch delete mode 100644 sources/poky/meta/recipes-devtools/perl/liburi-perl_5.27.bb create mode 100644 sources/poky/meta/recipes-devtools/perl/liburi-perl_5.28.bb delete mode 100644 sources/poky/meta/recipes-devtools/perl/perl_5.38.4.bb create mode 100644 sources/poky/meta/recipes-devtools/perl/perl_5.40.0.bb delete mode 100644 sources/poky/meta/recipes-devtools/pkgconf/pkgconf_2.1.1.bb create mode 100644 sources/poky/meta/recipes-devtools/pkgconf/pkgconf_2.3.0.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python-cython.inc delete mode 100644 sources/poky/meta/recipes-devtools/python/python-pyasn1.inc delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-alabaster_0.7.16.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-alabaster_1.0.0.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-attrs/0001-conftest.py-disable-deadline.patch delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-attrs/0001-test_funcs-skip-test_unknown-for-pytest-8.patch delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-attrs_23.2.0.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-attrs_24.2.0.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-babel_2.14.0.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-babel_2.16.0.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-bcrypt/0001-Bump-pyo3-from-0.20.0-to-0.20.3-in-src-_bcrypt-746.patch delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-bcrypt_4.1.2.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-bcrypt_4.2.0.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-beartype_0.17.2.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-beartype_0.18.5.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-build_1.1.1.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-build_1.2.1.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-certifi/CVE-2024-39689.patch delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-certifi_2024.2.2.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-certifi_2024.8.30.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-cffi/run-ptest delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-cffi_1.16.0.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-cffi_1.17.0.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-cryptography-vectors_42.0.5.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-cryptography-vectors_42.0.8.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-cryptography_42.0.5.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-cryptography_42.0.8.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-cython_3.0.11.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-cython_3.0.8.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-dbusmock_0.31.1.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-dbusmock_0.32.1.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-docutils_0.20.1.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-docutils_0.21.2.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-dtschema_2024.2.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-dtschema_2024.5.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-git_3.1.42.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-git_3.1.43.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-hatchling_1.21.1.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-hatchling_1.25.0.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-hypothesis_6.111.2.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-hypothesis_6.98.15.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-idna/run-ptest delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-idna_3.7.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-idna_3.8.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-importlib-metadata_7.0.1.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-jinja2_3.1.4.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-jinja2_3.1.6.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-jsonpointer_2.4.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-jsonpointer_3.0.0.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-jsonschema_4.21.1.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-jsonschema_4.23.0.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-libarchive-c/run-ptest delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-libarchive-c_5.0.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-libarchive-c_5.1.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-license-expression_30.2.0.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-license-expression_30.3.1.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-lxml_5.0.2.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-lxml_5.3.0.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-mako/run-ptest delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-mako_1.3.2.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-mako_1.3.5.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-markdown_3.5.2.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-markdown_3.6.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-maturin/0001-Add-32-bit-RISC-V-support.patch create mode 100644 sources/poky/meta/recipes-devtools/python/python3-maturin/0001-build_context-improve-wheel-reproducibility-by-sorti.patch delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-maturin_1.4.0.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-maturin_1.7.1.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-meson-python_0.15.0.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-meson-python_0.16.0.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-more-itertools_10.2.0.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-more-itertools_10.4.0.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-packaging/run-ptest delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-packaging_23.2.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-packaging_24.1.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-pbr_6.0.0.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-pbr_6.1.0.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-pip_24.0.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-pip_24.2.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-pluggy_1.4.0.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-pluggy_1.5.0.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-psutil_5.9.8.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-psutil_6.0.0.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-pyasn1_0.5.1.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-pyasn1_0.6.0.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-pycairo_1.26.0.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-pycairo_1.26.1.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-pycparser_2.21.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-pycparser_2.22.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-pyelftools_0.30.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-pyelftools_0.31.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-pygments_2.17.2.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-pygments_2.18.0.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-pygobject_3.46.0.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-pygobject_3.48.2.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-pyopenssl_24.0.0.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-pyopenssl_24.2.1.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-pyparsing_3.1.1.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-pyparsing_3.1.4.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-pyproject-metadata_0.7.1.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-pyproject-metadata_0.8.0.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-pytest-subtests_0.11.0.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-pytest-subtests_0.13.1.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-pytest_8.0.2.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-pytest_8.3.2.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-pyyaml/0001-Fix-builds-with-Cython-3.patch delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-pyyaml_6.0.1.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-pyyaml_6.0.2.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-referencing_0.33.0.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-referencing_0.35.1.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-requests/environment.d-python3-requests.sh create mode 100644 sources/poky/meta/recipes-devtools/python/python3-requests_2.32.3.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-requests_2.32.4.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-rpds-py/run-ptest delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-rpds-py_0.18.0.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-rpds-py_0.20.0.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-scons/0001-Fix-man-page-installation.patch delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-scons_4.6.0.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-scons_4.8.0.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-setuptools-rust_1.10.1.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-setuptools-rust_1.9.0.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-setuptools-scm/0001-respect-GIT_CEILING_DIRECTORIES.patch delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-setuptools-scm_8.0.4.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-setuptools-scm_8.1.0.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-setuptools/CVE-2024-6345.patch delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-setuptools/CVE-2025-47273-pre1.patch delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-setuptools/CVE-2025-47273.patch delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-setuptools_69.1.1.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-setuptools_72.1.0.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-sphinx_7.2.6.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-sphinx_8.0.2.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-sphinxcontrib-applehelp_1.0.8.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-sphinxcontrib-applehelp_2.0.0.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-sphinxcontrib-devhelp_1.0.6.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-sphinxcontrib-devhelp_2.0.0.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-sphinxcontrib-htmlhelp_2.0.5.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-sphinxcontrib-htmlhelp_2.1.0.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-sphinxcontrib-qthelp_1.0.7.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-sphinxcontrib-qthelp_2.0.0.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-sphinxcontrib-serializinghtml_1.1.10.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-sphinxcontrib-serializinghtml_2.0.0.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-testtools_2.7.1.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-testtools_2.7.2.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-trove-classifiers_2024.2.23.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-trove-classifiers_2024.7.2.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-typing-extensions_4.10.0.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-typing-extensions_4.12.2.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-uritools/run-ptest delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-uritools_4.0.2.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-uritools_4.0.3.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-urllib3/CVE-2025-50181.patch delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-webcolors_1.13.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-webcolors_24.8.0.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-websockets_12.0.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-websockets_13.0.1.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-wheel_0.42.0.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-wheel_0.44.0.bb delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-zipp/CVE-2024-5569.patch delete mode 100644 sources/poky/meta/recipes-devtools/python/python3-zipp_3.17.0.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3-zipp_3.20.1.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3/0001-ctypes-correct-gcc-check-in-test.patch delete mode 100644 sources/poky/meta/recipes-devtools/python/python3_3.12.11.bb create mode 100644 sources/poky/meta/recipes-devtools/python/python3_3.12.9.bb rename sources/poky/meta/recipes-devtools/qemu/{qemu-native_8.2.7.bb => qemu-native_9.0.2.bb} (100%) delete mode 100644 sources/poky/meta/recipes-devtools/qemu/qemu-system-native_8.2.7.bb create mode 100644 sources/poky/meta/recipes-devtools/qemu/qemu-system-native_9.0.2.bb delete mode 100644 sources/poky/meta/recipes-devtools/qemu/qemu/0001-sched_attr-Do-not-define-for-glibc-2.41.patch create mode 100644 sources/poky/meta/recipes-devtools/qemu/qemu/0002-apic-fixup-fallthrough-to-PIC.patch delete mode 100644 sources/poky/meta/recipes-devtools/qemu/qemu/0002-linux-user-Replace-use-of-lfs64-related-functions-an.patch delete mode 100644 sources/poky/meta/recipes-devtools/qemu/qemu/0002-linux-user-loongarch64-Remove-TARGET_FORCE_SHMLBA.patch delete mode 100644 sources/poky/meta/recipes-devtools/qemu/qemu/0003-apic-fixup-fallthrough-to-PIC.patch create mode 100644 sources/poky/meta/recipes-devtools/qemu/qemu/0003-configure-Add-pkg-config-handling-for-libgcrypt.patch delete mode 100644 sources/poky/meta/recipes-devtools/qemu/qemu/0003-linux-user-Add-strace-for-shmat.patch delete mode 100644 sources/poky/meta/recipes-devtools/qemu/qemu/0004-configure-Add-pkg-config-handling-for-libgcrypt.patch delete mode 100644 sources/poky/meta/recipes-devtools/qemu/qemu/0004-linux-user-Rewrite-target_shmat.patch create mode 100644 sources/poky/meta/recipes-devtools/qemu/qemu/0004-qemu-Do-not-include-file-if-not-exists.patch create mode 100644 sources/poky/meta/recipes-devtools/qemu/qemu/0005-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch delete mode 100644 sources/poky/meta/recipes-devtools/qemu/qemu/0005-qemu-Do-not-include-file-if-not-exists.patch delete mode 100644 sources/poky/meta/recipes-devtools/qemu/qemu/0005-tests-tcg-Check-that-shmat-does-not-break-proc-self-.patch delete mode 100644 sources/poky/meta/recipes-devtools/qemu/qemu/0006-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch create mode 100644 sources/poky/meta/recipes-devtools/qemu/qemu/0006-qemu-Determinism-fixes.patch delete mode 100644 sources/poky/meta/recipes-devtools/qemu/qemu/0007-qemu-Determinism-fixes.patch create mode 100644 sources/poky/meta/recipes-devtools/qemu/qemu/0007-tests-meson.build-use-relative-path-to-refer-to-file.patch create mode 100644 sources/poky/meta/recipes-devtools/qemu/qemu/0008-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch delete mode 100644 sources/poky/meta/recipes-devtools/qemu/qemu/0008-tests-meson.build-use-relative-path-to-refer-to-file.patch delete mode 100644 sources/poky/meta/recipes-devtools/qemu/qemu/0009-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch create mode 100644 sources/poky/meta/recipes-devtools/qemu/qemu/0009-linux-user-Replace-use-of-lfs64-related-functions-an.patch create mode 100644 sources/poky/meta/recipes-devtools/qemu/qemu/0010-configure-lookup-meson-exutable-from-PATH.patch delete mode 100644 sources/poky/meta/recipes-devtools/qemu/qemu/0010-hw-pvrdma-Protect-against-buggy-or-malicious-guest-d.patch delete mode 100644 sources/poky/meta/recipes-devtools/qemu/qemu/0011-linux-user-workaround-for-missing-MAP_FIXED_NOREPLAC.patch create mode 100644 sources/poky/meta/recipes-devtools/qemu/qemu/0011-qemu-Ensure-pip-and-the-python-venv-aren-t-used-for-.patch delete mode 100644 sources/poky/meta/recipes-devtools/qemu/qemu/0012-linux-user-workaround-for-missing-MAP_SHARED_VALIDAT.patch delete mode 100644 sources/poky/meta/recipes-devtools/qemu/qemu/4a8579ad8629b57a43daa62e46cc7af6e1078116.patch create mode 100644 sources/poky/meta/recipes-devtools/qemu/qemu/CVE-2024-6505.patch create mode 100644 sources/poky/meta/recipes-devtools/qemu/qemu/fix-strerrorname_np.patch delete mode 100644 sources/poky/meta/recipes-devtools/qemu/qemu/fixedmeson.patch delete mode 100644 sources/poky/meta/recipes-devtools/qemu/qemu/no-pip.patch rename sources/poky/meta/recipes-devtools/qemu/{qemu_8.2.7.bb => qemu_9.0.2.bb} (100%) rename sources/poky/meta/recipes-devtools/quilt/{quilt-native_0.67.bb => quilt-native_0.68.bb} (100%) delete mode 100644 sources/poky/meta/recipes-devtools/quilt/quilt/0001-test-Fix-a-race-condition-in-merge.test.patch delete mode 100644 sources/poky/meta/recipes-devtools/quilt/quilt/faildiff-order.patch delete mode 100644 sources/poky/meta/recipes-devtools/quilt/quilt/fix-grep-3.8.patch rename sources/poky/meta/recipes-devtools/quilt/{quilt_0.67.bb => quilt_0.68.bb} (100%) delete mode 100644 sources/poky/meta/recipes-devtools/repo/repo_2.42.bb create mode 100644 sources/poky/meta/recipes-devtools/repo/repo_2.46.bb delete mode 100644 sources/poky/meta/recipes-devtools/rsync/files/CVE-2024-12084-0001.patch delete mode 100644 sources/poky/meta/recipes-devtools/rsync/files/CVE-2024-12084-0002.patch delete mode 100644 sources/poky/meta/recipes-devtools/rsync/files/CVE-2024-12085.patch delete mode 100644 sources/poky/meta/recipes-devtools/rsync/files/CVE-2024-12086-0001.patch delete mode 100644 sources/poky/meta/recipes-devtools/rsync/files/CVE-2024-12086-0002.patch delete mode 100644 sources/poky/meta/recipes-devtools/rsync/files/CVE-2024-12086-0003.patch delete mode 100644 sources/poky/meta/recipes-devtools/rsync/files/CVE-2024-12086-0004.patch delete mode 100644 sources/poky/meta/recipes-devtools/rsync/files/CVE-2024-12087-0001.patch delete mode 100644 sources/poky/meta/recipes-devtools/rsync/files/CVE-2024-12087-0002.patch delete mode 100644 sources/poky/meta/recipes-devtools/rsync/files/CVE-2024-12087-0003.patch delete mode 100644 sources/poky/meta/recipes-devtools/rsync/files/CVE-2024-12088.patch delete mode 100644 sources/poky/meta/recipes-devtools/rsync/files/CVE-2024-12747.patch delete mode 100644 sources/poky/meta/recipes-devtools/rsync/rsync_3.2.7.bb create mode 100644 sources/poky/meta/recipes-devtools/rsync/rsync_3.3.0.bb create mode 100644 sources/poky/meta/recipes-devtools/ruby/ruby/0002-Obey-LDFLAGS-for-the-link-of-libruby.patch delete mode 100644 sources/poky/meta/recipes-devtools/ruby/ruby/CVE-2025-27219.patch delete mode 100644 sources/poky/meta/recipes-devtools/ruby/ruby/CVE-2025-27220.patch delete mode 100644 sources/poky/meta/recipes-devtools/ruby/ruby/CVE-2025-27221-0001.patch delete mode 100644 sources/poky/meta/recipes-devtools/ruby/ruby/CVE-2025-27221-0002.patch create mode 100644 sources/poky/meta/recipes-devtools/ruby/ruby_3.3.4.bb delete mode 100644 sources/poky/meta/recipes-devtools/ruby/ruby_3.3.5.bb create mode 100644 sources/poky/meta/recipes-devtools/rust/cargo-c-native_0.10.3+cargo-0.81.0.bb delete mode 100644 sources/poky/meta/recipes-devtools/rust/cargo-c-native_0.9.30+cargo-0.77.0.bb delete mode 100644 sources/poky/meta/recipes-devtools/rust/cargo_1.75.0.bb create mode 100644 sources/poky/meta/recipes-devtools/rust/cargo_1.79.0.bb delete mode 100644 sources/poky/meta/recipes-devtools/rust/files/0001-Handle-vendored-sources-when-remapping-paths.patch delete mode 100644 sources/poky/meta/recipes-devtools/rust/files/0001-Revert-Map-source-absolute-paths-to-OUT_DIR-as-relat.patch delete mode 100644 sources/poky/meta/recipes-devtools/rust/files/custom-target-cfg.patch create mode 100644 sources/poky/meta/recipes-devtools/rust/files/repro-issue-fix-with-cc-crate-hashmap.patch delete mode 100644 sources/poky/meta/recipes-devtools/rust/files/repro-issue-fix-with-v175.patch create mode 100644 sources/poky/meta/recipes-devtools/rust/files/rust-oe-selftest.patch delete mode 100644 sources/poky/meta/recipes-devtools/rust/files/rustc-bootstrap.patch create mode 100644 sources/poky/meta/recipes-devtools/rust/files/rustdoc-repro-issue-fix-cargo-config-for-codegenunits.patch delete mode 100644 sources/poky/meta/recipes-devtools/rust/files/rv32-cargo-rustix-0.38.19-fix.patch create mode 100644 sources/poky/meta/recipes-devtools/rust/files/rv32-cargo-rustix-0.38.28-fix.patch delete mode 100644 sources/poky/meta/recipes-devtools/rust/files/rv32-missing-syscalls.patch delete mode 100644 sources/poky/meta/recipes-devtools/rust/files/target-build-value.patch delete mode 100644 sources/poky/meta/recipes-devtools/rust/libstd-rs_1.75.0.bb create mode 100644 sources/poky/meta/recipes-devtools/rust/libstd-rs_1.79.0.bb rename sources/poky/meta/recipes-devtools/rust/{rust-cross-canadian_1.75.0.bb => rust-cross-canadian_1.79.0.bb} (100%) delete mode 100644 sources/poky/meta/recipes-devtools/rust/rust-llvm/0004-llvm-Fix-CVE-2024-0151.patch delete mode 100644 sources/poky/meta/recipes-devtools/rust/rust-llvm_1.75.0.bb create mode 100644 sources/poky/meta/recipes-devtools/rust/rust-llvm_1.79.0.bb delete mode 100644 sources/poky/meta/recipes-devtools/rust/rust_1.75.0.bb create mode 100644 sources/poky/meta/recipes-devtools/rust/rust_1.79.0.bb create mode 100644 sources/poky/meta/recipes-devtools/strace/strace_6.10.bb delete mode 100644 sources/poky/meta/recipes-devtools/strace/strace_6.7.bb delete mode 100644 sources/poky/meta/recipes-devtools/subversion/subversion/CVE-2024-46901.patch delete mode 100644 sources/poky/meta/recipes-devtools/swig/swig.inc delete mode 100644 sources/poky/meta/recipes-devtools/swig/swig/0001-Use-proc-self-exe-for-swig-swiglib-on-non-Win32-plat.patch delete mode 100644 sources/poky/meta/recipes-devtools/swig/swig/0001-configure-use-pkg-config-for-pcre-detection.patch create mode 100644 sources/poky/meta/recipes-devtools/syslinux/syslinux/0001-ext2_fs.h-do-not-carry-an-outdated-copy.patch create mode 100644 sources/poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0001-Define-portable-basename-function.patch delete mode 100644 sources/poky/meta/recipes-devtools/tcltk/tcl/fix_issue_with_old_distro_glibc.patch delete mode 100644 sources/poky/meta/recipes-devtools/tcltk/tcl_8.6.13.bb create mode 100644 sources/poky/meta/recipes-devtools/tcltk/tcl_8.6.14.bb delete mode 100644 sources/poky/meta/recipes-devtools/vala/vala/0001-gtk4-Preserve-compatibility-with-4.14.patch delete mode 100644 sources/poky/meta/recipes-devtools/vala/vala_0.56.15.bb create mode 100644 sources/poky/meta/recipes-devtools/vala/vala_0.56.17.bb create mode 100644 sources/poky/meta/recipes-devtools/valgrind/valgrind/0001-configure-Drop-setting-mcpu-cortex-a8-on-arm.patch create mode 100644 sources/poky/meta/recipes-devtools/valgrind/valgrind/0001-tests-arm-Use-O-instead-of-O0.patch delete mode 100644 sources/poky/meta/recipes-devtools/valgrind/valgrind/0001-valgrind-monitor.py-regular-expressions-should-use-r.patch delete mode 100644 sources/poky/meta/recipes-devtools/valgrind/valgrind/0002-Bug-476548-valgrind-3.22.0-fails-on-assertion-when-l.patch delete mode 100644 sources/poky/meta/recipes-devtools/valgrind/valgrind/0003-Add-fchmodat2-syscall-on-linux.patch delete mode 100644 sources/poky/meta/recipes-devtools/valgrind/valgrind/0004-Bug-478624-Valgrind-incompatibility-with-binutils-2..patch delete mode 100644 sources/poky/meta/recipes-devtools/valgrind/valgrind_3.22.0.bb create mode 100644 sources/poky/meta/recipes-devtools/valgrind/valgrind_3.23.0.bb delete mode 100644 sources/poky/meta/recipes-devtools/xmlto/xmlto_0.0.28.bb create mode 100644 sources/poky/meta/recipes-devtools/xmlto/xmlto_0.0.29.bb delete mode 100644 sources/poky/meta/recipes-extended/acpica/acpica_20240322.bb create mode 100644 sources/poky/meta/recipes-extended/acpica/acpica_20240827.bb delete mode 100644 sources/poky/meta/recipes-extended/acpica/files/CVE-2024-24856.patch delete mode 100644 sources/poky/meta/recipes-extended/asciidoc/asciidoc_10.2.0.bb create mode 100644 sources/poky/meta/recipes-extended/asciidoc/asciidoc_10.2.1.bb delete mode 100644 sources/poky/meta/recipes-extended/bash/bash_5.2.21.bb create mode 100644 sources/poky/meta/recipes-extended/bash/bash_5.2.32.bb delete mode 100644 sources/poky/meta/recipes-extended/cracklib/cracklib/0001-packlib.c-support-dictionary-byte-order-dependent.patch create mode 100644 sources/poky/meta/recipes-extended/cracklib/cracklib_2.10.2.bb delete mode 100644 sources/poky/meta/recipes-extended/cracklib/cracklib_2.9.11.bb delete mode 100644 sources/poky/meta/recipes-extended/cups/cups/CVE-2024-47175-1.patch delete mode 100644 sources/poky/meta/recipes-extended/cups/cups/CVE-2024-47175-2.patch delete mode 100644 sources/poky/meta/recipes-extended/cups/cups/CVE-2024-47175-3.patch delete mode 100644 sources/poky/meta/recipes-extended/cups/cups/CVE-2024-47175-4.patch delete mode 100644 sources/poky/meta/recipes-extended/cups/cups/CVE-2024-47175-5.patch create mode 100644 sources/poky/meta/recipes-extended/ethtool/ethtool_6.10.bb delete mode 100644 sources/poky/meta/recipes-extended/ethtool/ethtool_6.7.bb delete mode 100644 sources/poky/meta/recipes-extended/findutils/findutils/autoconf-2.73.patch create mode 100644 sources/poky/meta/recipes-extended/findutils/findutils_4.10.0.bb delete mode 100644 sources/poky/meta/recipes-extended/findutils/findutils_4.9.0.bb create mode 100644 sources/poky/meta/recipes-extended/ghostscript/ghostscript_10.04.0.bb delete mode 100644 sources/poky/meta/recipes-extended/ghostscript/ghostscript_10.05.1.bb delete mode 100644 sources/poky/meta/recipes-extended/iptables/iptables/0002-iptables-xshared.h-add-missing-sys.types.h-include.patch rename sources/poky/meta/recipes-extended/iptables/iptables/{0005-nft-ruleparse-Add-missing-braces-around-ternary.patch => 0002-nft-ruleparse-Add-missing-braces-around-ternary.patch} (100%) delete mode 100644 sources/poky/meta/recipes-extended/iptables/iptables/0004-configure.ac-only-check-conntrack-when-libnfnetlink-.patch delete mode 100644 sources/poky/meta/recipes-extended/iputils/iputils/CVE-2025-47268.patch delete mode 100644 sources/poky/meta/recipes-extended/iputils/iputils/CVE-2025-48964.patch delete mode 100644 sources/poky/meta/recipes-extended/less/files/CVE-2024-32487.patch delete mode 100644 sources/poky/meta/recipes-extended/less/less_643.bb create mode 100644 sources/poky/meta/recipes-extended/less/less_661.bb create mode 100644 sources/poky/meta/recipes-extended/libarchive/libarchive/CVE-2024-48957.patch create mode 100644 sources/poky/meta/recipes-extended/libarchive/libarchive/CVE-2024-48958.patch delete mode 100644 sources/poky/meta/recipes-extended/libarchive/libarchive/CVE-2025-5914.patch delete mode 100644 sources/poky/meta/recipes-extended/libarchive/libarchive/CVE-2025-5915.patch delete mode 100644 sources/poky/meta/recipes-extended/libarchive/libarchive/CVE-2025-5916.patch delete mode 100644 sources/poky/meta/recipes-extended/libarchive/libarchive/CVE-2025-5917.patch delete mode 100644 sources/poky/meta/recipes-extended/libarchive/libarchive/CVE-2025-5918-0001.patch delete mode 100644 sources/poky/meta/recipes-extended/libarchive/libarchive/CVE-2025-5918-0002.patch create mode 100644 sources/poky/meta/recipes-extended/libarchive/libarchive_3.7.4.bb delete mode 100644 sources/poky/meta/recipes-extended/libarchive/libarchive_3.7.9.bb delete mode 100644 sources/poky/meta/recipes-extended/libsolv/libsolv_0.7.28.bb create mode 100644 sources/poky/meta/recipes-extended/libsolv/libsolv_0.7.30.bb delete mode 100644 sources/poky/meta/recipes-extended/libtirpc/libtirpc/ipv6.patch delete mode 100644 sources/poky/meta/recipes-extended/libtirpc/libtirpc_1.3.4.bb create mode 100644 sources/poky/meta/recipes-extended/libtirpc/libtirpc_1.3.5.bb delete mode 100644 sources/poky/meta/recipes-extended/lighttpd/lighttpd_1.4.74.bb create mode 100644 sources/poky/meta/recipes-extended/lighttpd/lighttpd_1.4.76.bb delete mode 100644 sources/poky/meta/recipes-extended/logrotate/logrotate_3.21.0.bb create mode 100644 sources/poky/meta/recipes-extended/logrotate/logrotate_3.22.0.bb create mode 100644 sources/poky/meta/recipes-extended/ltp/ltp/0001-Add-__clear_cache-declaration-for-clang.patch delete mode 100644 sources/poky/meta/recipes-extended/ltp/ltp/0001-cve-2015-3290-Disable-AVX-for-x86_64.patch delete mode 100644 sources/poky/meta/recipes-extended/ltp/ltp/0001-scenario_groups-default-remove-connectors.patch delete mode 100644 sources/poky/meta/recipes-extended/ltp/ltp/0001-sched_stress-Use-time_t-instead-of-long-for-type.patch delete mode 100644 sources/poky/meta/recipes-extended/ltp/ltp_20240129.bb create mode 100644 sources/poky/meta/recipes-extended/ltp/ltp_20240524.bb create mode 100644 sources/poky/meta/recipes-extended/lzip/lzip_1.24.1.bb delete mode 100644 sources/poky/meta/recipes-extended/lzip/lzip_1.24.bb delete mode 100644 sources/poky/meta/recipes-extended/man-db/man-db_2.12.0.bb create mode 100644 sources/poky/meta/recipes-extended/man-db/man-db_2.12.1.bb delete mode 100644 sources/poky/meta/recipes-extended/man-pages/man-pages/0001-GNUmakefile-use-env-from-PATH.patch delete mode 100644 sources/poky/meta/recipes-extended/man-pages/man-pages/0001-man.ml-do-not-use-dev-stdin.patch delete mode 100644 sources/poky/meta/recipes-extended/man-pages/man-pages_6.06.bb create mode 100644 sources/poky/meta/recipes-extended/man-pages/man-pages_6.9.1.bb delete mode 100644 sources/poky/meta/recipes-extended/mc/mc_4.8.31.bb create mode 100644 sources/poky/meta/recipes-extended/mc/mc_4.8.32.bb delete mode 100644 sources/poky/meta/recipes-extended/mdadm/files/0001-DDF-Cleanup-validate_geometry_ddf_container.patch delete mode 100644 sources/poky/meta/recipes-extended/mdadm/files/0001-Define-alignof-using-_Alignof-when-using-C11-or-newe.patch delete mode 100644 sources/poky/meta/recipes-extended/mdadm/files/0001-Fix-parsing-of-r-in-monitor-manager-mode.patch delete mode 100644 sources/poky/meta/recipes-extended/mdadm/files/0001-Revert-tests-wait-for-complete-rebuild-in-integrity-.patch create mode 100644 sources/poky/meta/recipes-extended/mdadm/files/0001-include-libgen.h-for-basename-API.patch delete mode 100644 sources/poky/meta/recipes-extended/mdadm/files/0001-mdadm-Fix-optional-write-behind-parameter.patch delete mode 100644 sources/poky/meta/recipes-extended/mdadm/files/0001-mdadm-skip-test-11spare-migration.patch delete mode 100644 sources/poky/meta/recipes-extended/mdadm/files/0001-tests-00raid0-add-a-test-that-validates-raid0-with-l.patch delete mode 100644 sources/poky/meta/recipes-extended/mdadm/files/0001-tests-00readonly-Run-udevadm-settle-before-setting-r.patch delete mode 100644 sources/poky/meta/recipes-extended/mdadm/files/0001-tests-02lineargrow-clear-the-superblock-at-every-ite.patch delete mode 100644 sources/poky/meta/recipes-extended/mdadm/files/0001-tests-04update-metadata-avoid-passing-chunk-size-to.patch delete mode 100644 sources/poky/meta/recipes-extended/mdadm/files/0001-tests-add-.broken-files-for-04update-uuid-and-07reve.patch delete mode 100644 sources/poky/meta/recipes-extended/mdadm/files/0001-tests-fix-raid0-tests-for-0.90-metadata.patch create mode 100644 sources/poky/meta/recipes-extended/mdadm/files/0001-util.c-add-limits.h-include-for-NAME_MAX-definition.patch create mode 100644 sources/poky/meta/recipes-extended/mdadm/files/0002-Create.c-include-linux-falloc.h-for-FALLOC_FL_ZERO_R.patch delete mode 100644 sources/poky/meta/recipes-extended/mdadm/files/0002-DDF-Fix-NULL-pointer-dereference-in-validate_geometr.patch delete mode 100644 sources/poky/meta/recipes-extended/mdadm/files/0003-mdadm-Grow-Fix-use-after-close-bug-by-closing-after-.patch delete mode 100644 sources/poky/meta/recipes-extended/mdadm/files/0004-monitor-Avoid-segfault-when-calling-NULL-get_bad_blo.patch delete mode 100644 sources/poky/meta/recipes-extended/mdadm/files/0005-mdadm-test-Mark-and-ignore-broken-test-failures.patch delete mode 100644 sources/poky/meta/recipes-extended/mdadm/files/0006-tests-Add-broken-files-for-all-broken-tests.patch delete mode 100644 sources/poky/meta/recipes-extended/mdadm/files/include_sysmacros.patch delete mode 100644 sources/poky/meta/recipes-extended/mdadm/mdadm_4.2.bb create mode 100644 sources/poky/meta/recipes-extended/mdadm/mdadm_4.3.bb delete mode 100644 sources/poky/meta/recipes-extended/msmtp/msmtp_1.8.25.bb create mode 100644 sources/poky/meta/recipes-extended/msmtp/msmtp_1.8.26.bb delete mode 100644 sources/poky/meta/recipes-extended/net-tools/net-tools/CVE-2025-46836-01.patch delete mode 100644 sources/poky/meta/recipes-extended/net-tools/net-tools/CVE-2025-46836-02.patch delete mode 100644 sources/poky/meta/recipes-extended/pam/libpam/0001-examples-Replace-use-of-termio.h-with-termios.h.patch delete mode 100644 sources/poky/meta/recipes-extended/pam/libpam/0001-pam-inline-pam-asprintf.patch delete mode 100644 sources/poky/meta/recipes-extended/pam/libpam/0001-pam_namespace-include-stdint-h.patch delete mode 100644 sources/poky/meta/recipes-extended/pam/libpam/0001-pam_pwhistory-fix-passing-NULL-filename-argument-to-.patch delete mode 100644 sources/poky/meta/recipes-extended/pam/libpam/0002-pam-namespace-rebase.patch delete mode 100644 sources/poky/meta/recipes-extended/pam/libpam/CVE-2024-10041-1.patch delete mode 100644 sources/poky/meta/recipes-extended/pam/libpam/CVE-2024-10041-2.patch delete mode 100644 sources/poky/meta/recipes-extended/pam/libpam/CVE-2024-22365.patch delete mode 100644 sources/poky/meta/recipes-extended/pam/libpam/CVE-2025-6020-01.patch delete mode 100644 sources/poky/meta/recipes-extended/pam/libpam/CVE-2025-6020-02.patch delete mode 100644 sources/poky/meta/recipes-extended/pam/libpam/CVE-2025-6020-03.patch delete mode 100644 sources/poky/meta/recipes-extended/pam/libpam_1.5.3.bb create mode 100644 sources/poky/meta/recipes-extended/pam/libpam_1.6.1.bb delete mode 100644 sources/poky/meta/recipes-extended/psmisc/psmisc.inc delete mode 100644 sources/poky/meta/recipes-extended/psmisc/psmisc/0001-Use-UINTPTR_MAX-instead-of-__WORDSIZE.patch delete mode 100644 sources/poky/meta/recipes-extended/psmisc/psmisc_23.6.bb create mode 100644 sources/poky/meta/recipes-extended/psmisc/psmisc_23.7.bb create mode 100644 sources/poky/meta/recipes-extended/quota/quota/0001-Fix-building-on-musl.patch delete mode 100644 sources/poky/meta/recipes-extended/quota/quota/fcntl.patch create mode 100644 sources/poky/meta/recipes-extended/rpcbind/rpcbind/rpcbind.systemd create mode 100644 sources/poky/meta/recipes-extended/rpcbind/rpcbind/rpcbind.tmpfiles delete mode 100644 sources/poky/meta/recipes-extended/rpcbind/rpcbind_1.2.6.bb create mode 100644 sources/poky/meta/recipes-extended/rpcbind/rpcbind_1.2.7.bb delete mode 100644 sources/poky/meta/recipes-extended/screen/screen/CVE-2025-46802.patch delete mode 100644 sources/poky/meta/recipes-extended/screen/screen/CVE-2025-46804.patch delete mode 100644 sources/poky/meta/recipes-extended/screen/screen/CVE-2025-46805.patch delete mode 100644 sources/poky/meta/recipes-extended/shadow/files/0001-lib-copydir-copy_entry-use-temporary-stat-buffer.patch rename sources/poky/meta/recipes-extended/shadow/{shadow_4.14.2.bb => shadow_4.16.0.bb} (100%) delete mode 100644 sources/poky/meta/recipes-extended/stress-ng/stress-ng_0.17.05.bb create mode 100644 sources/poky/meta/recipes-extended/stress-ng/stress-ng_0.18.02.bb create mode 100644 sources/poky/meta/recipes-extended/sudo/sudo_1.9.15p5.bb delete mode 100644 sources/poky/meta/recipes-extended/sudo/sudo_1.9.17p1.bb delete mode 100644 sources/poky/meta/recipes-extended/sysklogd/sysklogd_2.5.2.bb create mode 100644 sources/poky/meta/recipes-extended/sysklogd/sysklogd_2.6.1.bb delete mode 100644 sources/poky/meta/recipes-extended/sysstat/sysstat_12.7.5.bb create mode 100644 sources/poky/meta/recipes-extended/sysstat/sysstat_12.7.6.bb create mode 100644 sources/poky/meta/recipes-extended/texinfo/texinfo/0001-texinfo-several-changes-to-build-without-zlib-and-nc.patch create mode 100644 sources/poky/meta/recipes-extended/texinfo/texinfo/0002-dont-depend-on-help2man.patch create mode 100644 sources/poky/meta/recipes-extended/texinfo/texinfo/0003-texinfo-Update-to-5.1.patch delete mode 100644 sources/poky/meta/recipes-extended/texinfo/texinfo/disable-native-tools.patch delete mode 100644 sources/poky/meta/recipes-extended/texinfo/texinfo/dont-depend-on-help2man.patch delete mode 100644 sources/poky/meta/recipes-extended/texinfo/texinfo/link-zip.patch delete mode 100644 sources/poky/meta/recipes-extended/texinfo/texinfo/use_host_makedoc.patch delete mode 100644 sources/poky/meta/recipes-extended/texinfo/texinfo_7.0.3.bb create mode 100644 sources/poky/meta/recipes-extended/texinfo/texinfo_7.1.bb delete mode 100644 sources/poky/meta/recipes-extended/wget/wget/CVE-2024-10524.patch delete mode 100644 sources/poky/meta/recipes-extended/wget/wget_1.21.4.bb create mode 100644 sources/poky/meta/recipes-extended/wget/wget_1.24.5.bb delete mode 100644 sources/poky/meta/recipes-extended/xz/xz/CVE-2025-31115-01.patch delete mode 100644 sources/poky/meta/recipes-extended/xz/xz/CVE-2025-31115-02.patch delete mode 100644 sources/poky/meta/recipes-extended/xz/xz/CVE-2025-31115-03.patch delete mode 100644 sources/poky/meta/recipes-extended/xz/xz/CVE-2025-31115-04.patch delete mode 100644 sources/poky/meta/recipes-extended/xz/xz_5.4.7.bb create mode 100644 sources/poky/meta/recipes-extended/xz/xz_5.6.2.bb delete mode 100644 sources/poky/meta/recipes-extended/zstd/zstd/0001-pzstd-use-directly-for-the-test-c-snippet.patch delete mode 100644 sources/poky/meta/recipes-extended/zstd/zstd_1.5.5.bb create mode 100644 sources/poky/meta/recipes-extended/zstd/zstd_1.5.6.bb delete mode 100644 sources/poky/meta/recipes-gnome/epiphany/epiphany_46.0.bb create mode 100644 sources/poky/meta/recipes-gnome/epiphany/epiphany_46.3.bb delete mode 100644 sources/poky/meta/recipes-gnome/gcr/gcr_4.2.1.bb create mode 100644 sources/poky/meta/recipes-gnome/gcr/gcr_4.3.0.bb delete mode 100644 sources/poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/CVE-2025-7345.patch delete mode 100644 sources/poky/meta/recipes-gnome/gi-docgen/gi-docgen_2023.3.bb create mode 100644 sources/poky/meta/recipes-gnome/gi-docgen/gi-docgen_2024.1.bb delete mode 100644 sources/poky/meta/recipes-gnome/gnome/adwaita-icon-theme_45.0.bb create mode 100644 sources/poky/meta/recipes-gnome/gnome/adwaita-icon-theme_46.2.bb delete mode 100644 sources/poky/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.78.1.bb create mode 100644 sources/poky/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.80.1.bb delete mode 100644 sources/poky/meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas_46.0.bb create mode 100644 sources/poky/meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas_46.1.bb delete mode 100644 sources/poky/meta/recipes-gnome/gtk+/gtk+3_3.24.41.bb create mode 100644 sources/poky/meta/recipes-gnome/gtk+/gtk+3_3.24.43.bb delete mode 100644 sources/poky/meta/recipes-gnome/gtk+/gtk4_4.14.1.bb create mode 100644 sources/poky/meta/recipes-gnome/gtk+/gtk4_4.14.5.bb delete mode 100644 sources/poky/meta/recipes-gnome/gtk-doc/files/0001-Don-t-use-docdir-from-environment.patch delete mode 100644 sources/poky/meta/recipes-gnome/gtk-doc/gtk-doc_1.33.2.bb create mode 100644 sources/poky/meta/recipes-gnome/gtk-doc/gtk-doc_1.34.0.bb delete mode 100644 sources/poky/meta/recipes-gnome/hicolor-icon-theme/hicolor-icon-theme_0.17.bb create mode 100644 sources/poky/meta/recipes-gnome/hicolor-icon-theme/hicolor-icon-theme_0.18.bb delete mode 100644 sources/poky/meta/recipes-gnome/libadwaita/libadwaita_1.5.2.bb create mode 100644 sources/poky/meta/recipes-gnome/libadwaita/libadwaita_1.5.3.bb delete mode 100644 sources/poky/meta/recipes-gnome/librsvg/librsvg_2.57.1.bb create mode 100644 sources/poky/meta/recipes-gnome/librsvg/librsvg_2.58.2.bb delete mode 100644 sources/poky/meta/recipes-gnome/libxmlb/libxmlb_0.3.15.bb create mode 100644 sources/poky/meta/recipes-gnome/libxmlb/libxmlb_0.3.19.bb delete mode 100644 sources/poky/meta/recipes-graphics/cairo/cairo_1.18.0.bb create mode 100644 sources/poky/meta/recipes-graphics/cairo/cairo_1.18.2.bb delete mode 100644 sources/poky/meta/recipes-graphics/drm/libdrm_2.4.120.bb create mode 100644 sources/poky/meta/recipes-graphics/drm/libdrm_2.4.123.bb delete mode 100644 sources/poky/meta/recipes-graphics/freetype/freetype/CVE-2025-27363.patch delete mode 100644 sources/poky/meta/recipes-graphics/freetype/freetype_2.13.2.bb create mode 100644 sources/poky/meta/recipes-graphics/freetype/freetype_2.13.3.bb delete mode 100644 sources/poky/meta/recipes-graphics/glslang/glslang_1.3.275.0.bb create mode 100644 sources/poky/meta/recipes-graphics/glslang/glslang_1.3.290.0.bb delete mode 100644 sources/poky/meta/recipes-graphics/harfbuzz/harfbuzz_8.3.0.bb create mode 100644 sources/poky/meta/recipes-graphics/harfbuzz/harfbuzz_9.0.0.bb delete mode 100644 sources/poky/meta/recipes-graphics/libsdl2/libsdl2_2.30.1.bb create mode 100644 sources/poky/meta/recipes-graphics/libsdl2/libsdl2_2.30.7.bb rename sources/poky/meta/recipes-graphics/libva/{libva-initial_2.20.0.bb => libva-initial_2.22.0.bb} (100%) delete mode 100644 sources/poky/meta/recipes-graphics/libva/libva-utils_2.20.1.bb create mode 100644 sources/poky/meta/recipes-graphics/libva/libva-utils_2.22.0.bb rename sources/poky/meta/recipes-graphics/libva/{libva_2.20.0.bb => libva_2.22.0.bb} (100%) create mode 100644 sources/poky/meta/recipes-graphics/mesa/files/0001-amd-Include-missing-llvm-IR-header-Module.h.patch create mode 100644 sources/poky/meta/recipes-graphics/mesa/files/0001-freedreno-don-t-encode-build-path-into-binaries.patch rename sources/poky/meta/recipes-graphics/mesa/{mesa-gl_24.0.7.bb => mesa-gl.bb} (100%) rename sources/poky/meta/recipes-graphics/mesa/{mesa_24.0.7.bb => mesa.bb} (100%) delete mode 100644 sources/poky/meta/recipes-graphics/pango/pango/0001-Skip-running-test-layout-test.patch delete mode 100644 sources/poky/meta/recipes-graphics/pango/pango/run-ptest delete mode 100644 sources/poky/meta/recipes-graphics/pango/pango_1.52.1.bb create mode 100644 sources/poky/meta/recipes-graphics/pango/pango_1.54.0.bb create mode 100644 sources/poky/meta/recipes-graphics/piglit/piglit/0001-CMakeLists.txt-do-not-obtain-wayland-scanner-path-fr.patch delete mode 100644 sources/poky/meta/recipes-graphics/piglit/piglit/0001-utils-Include-libgen.h-on-musl-linux-systems.patch delete mode 100644 sources/poky/meta/recipes-graphics/shaderc/shaderc_2023.8.bb create mode 100644 sources/poky/meta/recipes-graphics/shaderc/shaderc_2024.1.bb delete mode 100644 sources/poky/meta/recipes-graphics/spir/spirv-headers_1.3.275.0.bb create mode 100644 sources/poky/meta/recipes-graphics/spir/spirv-headers_1.3.290.0.bb create mode 100644 sources/poky/meta/recipes-graphics/spir/spirv-tools/0001-update_build_version.py-support-an-envvar-to-force-t.patch delete mode 100644 sources/poky/meta/recipes-graphics/spir/spirv-tools_1.3.275.0.bb create mode 100644 sources/poky/meta/recipes-graphics/spir/spirv-tools_1.3.290.0.bb delete mode 100644 sources/poky/meta/recipes-graphics/vulkan/vulkan-headers_1.3.275.0.bb create mode 100644 sources/poky/meta/recipes-graphics/vulkan/vulkan-headers_1.3.290.0.bb delete mode 100644 sources/poky/meta/recipes-graphics/vulkan/vulkan-loader_1.3.275.0.bb create mode 100644 sources/poky/meta/recipes-graphics/vulkan/vulkan-loader_1.3.290.0.bb delete mode 100644 sources/poky/meta/recipes-graphics/vulkan/vulkan-samples/0001-Deprecate-u8string_view.patch delete mode 100644 sources/poky/meta/recipes-graphics/vulkan/vulkan-samples/0001-Do-not-use-LFS64-functions-on-linux-musl.patch delete mode 100644 sources/poky/meta/recipes-graphics/vulkan/vulkan-samples/32bit.patch delete mode 100644 sources/poky/meta/recipes-graphics/vulkan/vulkan-tools_1.3.275.0.bb create mode 100644 sources/poky/meta/recipes-graphics/vulkan/vulkan-tools_1.3.290.0.bb delete mode 100644 sources/poky/meta/recipes-graphics/vulkan/vulkan-utility-libraries_1.3.275.0.bb create mode 100644 sources/poky/meta/recipes-graphics/vulkan/vulkan-utility-libraries_1.3.290.0.bb delete mode 100644 sources/poky/meta/recipes-graphics/vulkan/vulkan-validation-layers_1.3.275.0.bb create mode 100644 sources/poky/meta/recipes-graphics/vulkan/vulkan-validation-layers_1.3.290.0.bb delete mode 100644 sources/poky/meta/recipes-graphics/vulkan/vulkan-volk_1.3.275.0.bb create mode 100644 sources/poky/meta/recipes-graphics/vulkan/vulkan-volk_1.3.290.0.bb delete mode 100644 sources/poky/meta/recipes-graphics/waffle/waffle/0001-meson.build-request-native-wayland-scanner.patch delete mode 100644 sources/poky/meta/recipes-graphics/waffle/waffle/0001-waffle-do-not-make-core-protocol-into-the-library.patch delete mode 100644 sources/poky/meta/recipes-graphics/waffle/waffle_1.7.2.bb create mode 100644 sources/poky/meta/recipes-graphics/waffle/waffle_1.8.1.bb delete mode 100644 sources/poky/meta/recipes-graphics/wayland/libinput_1.25.0.bb create mode 100644 sources/poky/meta/recipes-graphics/wayland/libinput_1.26.1.bb delete mode 100644 sources/poky/meta/recipes-graphics/wayland/mtdev_1.1.6.bb create mode 100644 sources/poky/meta/recipes-graphics/wayland/mtdev_1.1.7.bb delete mode 100644 sources/poky/meta/recipes-graphics/wayland/wayland-protocols_1.33.bb create mode 100644 sources/poky/meta/recipes-graphics/wayland/wayland-protocols_1.37.bb delete mode 100644 sources/poky/meta/recipes-graphics/wayland/wayland/0002-Consider-pkgconfig-sysroot-for-pkgdatadir.patch delete mode 100644 sources/poky/meta/recipes-graphics/wayland/wayland_1.22.0.bb create mode 100644 sources/poky/meta/recipes-graphics/wayland/wayland_1.23.1.bb delete mode 100644 sources/poky/meta/recipes-graphics/wayland/weston_13.0.1.bb create mode 100644 sources/poky/meta/recipes-graphics/wayland/weston_13.0.3.bb delete mode 100644 sources/poky/meta/recipes-graphics/xorg-app/mkfontscale_1.2.2.bb create mode 100644 sources/poky/meta/recipes-graphics/xorg-app/mkfontscale_1.2.3.bb delete mode 100644 sources/poky/meta/recipes-graphics/xorg-app/xauth_1.1.2.bb create mode 100644 sources/poky/meta/recipes-graphics/xorg-app/xauth_1.1.3.bb delete mode 100644 sources/poky/meta/recipes-graphics/xorg-app/xev_1.2.5.bb create mode 100644 sources/poky/meta/recipes-graphics/xorg-app/xev_1.2.6.bb delete mode 100644 sources/poky/meta/recipes-graphics/xorg-font/encodings_1.0.7.bb create mode 100644 sources/poky/meta/recipes-graphics/xorg-font/encodings_1.1.0.bb delete mode 100644 sources/poky/meta/recipes-graphics/xorg-lib/libfontenc_1.1.7.bb create mode 100644 sources/poky/meta/recipes-graphics/xorg-lib/libfontenc_1.1.8.bb create mode 100644 sources/poky/meta/recipes-graphics/xorg-lib/libpciaccess_0.18.1.bb delete mode 100644 sources/poky/meta/recipes-graphics/xorg-lib/libpciaccess_0.18.bb create mode 100644 sources/poky/meta/recipes-graphics/xorg-lib/libx11_1.8.10.bb delete mode 100644 sources/poky/meta/recipes-graphics/xorg-lib/libx11_1.8.9.bb delete mode 100644 sources/poky/meta/recipes-graphics/xorg-lib/libxcb_1.16.bb create mode 100644 sources/poky/meta/recipes-graphics/xorg-lib/libxcb_1.17.0.bb delete mode 100644 sources/poky/meta/recipes-graphics/xorg-lib/libxdmcp_1.1.4.bb create mode 100644 sources/poky/meta/recipes-graphics/xorg-lib/libxdmcp_1.1.5.bb delete mode 100644 sources/poky/meta/recipes-graphics/xorg-lib/libxfont2_2.0.6.bb create mode 100644 sources/poky/meta/recipes-graphics/xorg-lib/libxfont2_2.0.7.bb delete mode 100644 sources/poky/meta/recipes-graphics/xorg-lib/libxkbcommon_1.6.0.bb create mode 100644 sources/poky/meta/recipes-graphics/xorg-lib/libxkbcommon_1.7.0.bb delete mode 100644 sources/poky/meta/recipes-graphics/xorg-lib/libxmu_1.1.4.bb create mode 100644 sources/poky/meta/recipes-graphics/xorg-lib/libxmu_1.2.1.bb delete mode 100644 sources/poky/meta/recipes-graphics/xorg-lib/libxtst_1.2.4.bb create mode 100644 sources/poky/meta/recipes-graphics/xorg-lib/libxtst_1.2.5.bb create mode 100644 sources/poky/meta/recipes-graphics/xorg-lib/pixman/865e6ce00bb79a6b925ed4c2c436e1533e4472aa.patch create mode 100644 sources/poky/meta/recipes-graphics/xorg-lib/xcb-util-errors_1.0.1.bb delete mode 100644 sources/poky/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.41.bb create mode 100644 sources/poky/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.42.bb delete mode 100644 sources/poky/meta/recipes-graphics/xorg-proto/xcb-proto_1.16.0.bb create mode 100644 sources/poky/meta/recipes-graphics/xorg-proto/xcb-proto_1.17.0.bb delete mode 100644 sources/poky/meta/recipes-graphics/xorg-proto/xorgproto_2023.2.bb create mode 100644 sources/poky/meta/recipes-graphics/xorg-proto/xorgproto_2024.1.bb delete mode 100644 sources/poky/meta/recipes-graphics/xorg-util/util-macros_1.20.0.bb create mode 100644 sources/poky/meta/recipes-graphics/xorg-util/util-macros_1.20.1.bb create mode 100644 sources/poky/meta/recipes-graphics/xorg-xserver/xserver-xorg_21.1.16.bb delete mode 100644 sources/poky/meta/recipes-graphics/xorg-xserver/xserver-xorg_21.1.18.bb delete mode 100644 sources/poky/meta/recipes-graphics/xwayland/xwayland/CVE-2024-9632.patch delete mode 100644 sources/poky/meta/recipes-graphics/xwayland/xwayland/CVE-2025-26594-1.patch delete mode 100644 sources/poky/meta/recipes-graphics/xwayland/xwayland/CVE-2025-26594-2.patch delete mode 100644 sources/poky/meta/recipes-graphics/xwayland/xwayland/CVE-2025-26595.patch delete mode 100644 sources/poky/meta/recipes-graphics/xwayland/xwayland/CVE-2025-26596.patch delete mode 100644 sources/poky/meta/recipes-graphics/xwayland/xwayland/CVE-2025-26597.patch delete mode 100644 sources/poky/meta/recipes-graphics/xwayland/xwayland/CVE-2025-26598.patch delete mode 100644 sources/poky/meta/recipes-graphics/xwayland/xwayland/CVE-2025-26599-1.patch delete mode 100644 sources/poky/meta/recipes-graphics/xwayland/xwayland/CVE-2025-26599-2.patch delete mode 100644 sources/poky/meta/recipes-graphics/xwayland/xwayland/CVE-2025-26600.patch delete mode 100644 sources/poky/meta/recipes-graphics/xwayland/xwayland/CVE-2025-26601-1.patch delete mode 100644 sources/poky/meta/recipes-graphics/xwayland/xwayland/CVE-2025-26601-2.patch delete mode 100644 sources/poky/meta/recipes-graphics/xwayland/xwayland/CVE-2025-26601-3.patch delete mode 100644 sources/poky/meta/recipes-graphics/xwayland/xwayland/CVE-2025-26601-4.patch delete mode 100644 sources/poky/meta/recipes-graphics/xwayland/xwayland/CVE-2025-49175.patch delete mode 100644 sources/poky/meta/recipes-graphics/xwayland/xwayland/CVE-2025-49176-0001.patch delete mode 100644 sources/poky/meta/recipes-graphics/xwayland/xwayland/CVE-2025-49176-0002.patch delete mode 100644 sources/poky/meta/recipes-graphics/xwayland/xwayland/CVE-2025-49177.patch delete mode 100644 sources/poky/meta/recipes-graphics/xwayland/xwayland/CVE-2025-49178.patch delete mode 100644 sources/poky/meta/recipes-graphics/xwayland/xwayland/CVE-2025-49179.patch delete mode 100644 sources/poky/meta/recipes-graphics/xwayland/xwayland/CVE-2025-49180.patch delete mode 100644 sources/poky/meta/recipes-graphics/xwayland/xwayland_23.2.5.bb create mode 100644 sources/poky/meta/recipes-graphics/xwayland/xwayland_24.1.6.bb create mode 100644 sources/poky/meta/recipes-kernel/blktrace/blktrace/0001-bno_plot.py-btt_plot.py-Ask-for-python3-specifically.patch create mode 100644 sources/poky/meta/recipes-kernel/kexec/kexec-tools/0001-kexec.c-add-MFD_NOEXEC_SEAL-flag-explicitly.patch delete mode 100644 sources/poky/meta/recipes-kernel/kexec/kexec-tools/0001-x86-linux-setup.c-Use-POSIX-basename-API.patch delete mode 100644 sources/poky/meta/recipes-kernel/kexec/kexec-tools/0003-kexec-ARM-Fix-add_buffer_phys_virt-align-issue.patch delete mode 100644 sources/poky/meta/recipes-kernel/kexec/kexec-tools/Fix-building-on-x86_64-with-binutils-2.41.patch delete mode 100644 sources/poky/meta/recipes-kernel/kexec/kexec-tools_2.0.28.bb create mode 100644 sources/poky/meta/recipes-kernel/kexec/kexec-tools_2.0.29.bb delete mode 100644 sources/poky/meta/recipes-kernel/kmod/kmod/0001-Use-portable-implementation-for-basename-API.patch delete mode 100644 sources/poky/meta/recipes-kernel/kmod/kmod_31.bb create mode 100644 sources/poky/meta/recipes-kernel/kmod/kmod_33.bb delete mode 100644 sources/poky/meta/recipes-kernel/libtraceevent/libtraceevent/meson.patch delete mode 100644 sources/poky/meta/recipes-kernel/libtraceevent/libtraceevent_1.7.3.bb create mode 100644 sources/poky/meta/recipes-kernel/libtraceevent/libtraceevent_1.8.3.bb delete mode 100644 sources/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-connector-Fix-invalid-conversion-in-cn_proc.h.patch delete mode 100644 sources/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-kbuild-install_headers.sh-Strip-_UAPI-from-if-define.patch create mode 100644 sources/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_6.10.bb delete mode 100644 sources/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_6.6.bb create mode 100644 sources/poky/meta/recipes-kernel/linux/cve-exclusion_6.10.inc create mode 100644 sources/poky/meta/recipes-kernel/linux/linux-yocto-rt_6.10.bb create mode 100644 sources/poky/meta/recipes-kernel/linux/linux-yocto-tiny_6.10.bb create mode 100644 sources/poky/meta/recipes-kernel/linux/linux-yocto_6.10.bb delete mode 100644 sources/poky/meta/recipes-kernel/lttng/lttng-modules/0001-Fix-ASoC-snd_doc_dapm-on-linux-6.9-rc1.patch create mode 100644 sources/poky/meta/recipes-kernel/lttng/lttng-modules/0001-Fix-kfree_skb-changed-in-6.11-rc1.patch delete mode 100644 sources/poky/meta/recipes-kernel/lttng/lttng-modules/0002-Fix-ASoC-add-component-to-set_bias_level-events-in-l.patch create mode 100644 sources/poky/meta/recipes-kernel/lttng/lttng-modules/0002-Fix-ext4_da_reserve_space-changed-in-6.11-rc1.patch delete mode 100644 sources/poky/meta/recipes-kernel/lttng/lttng-modules/0003-Fix-mm_compaction_migratepages-changed-in-linux-6.9-.patch create mode 100644 sources/poky/meta/recipes-kernel/lttng/lttng-modules/0003-Fix-orig_start-removed-from-btrfs_get_extent-in-6.11.patch create mode 100644 sources/poky/meta/recipes-kernel/lttng/lttng-modules/0004-Fix-block_len-removed-frmo-btrfs_get_extent-in-6.11-.patch delete mode 100644 sources/poky/meta/recipes-kernel/lttng/lttng-modules/0004-Fix-dev_base_lock-removed-in-linux-6.9-rc1.patch create mode 100644 sources/poky/meta/recipes-kernel/lttng/lttng-modules/0005-Fix-block_start-removed-from-btrfs_get_extent-in-6.1.patch create mode 100644 sources/poky/meta/recipes-kernel/lttng/lttng-modules/0006-Fix-scsi-sd-Atomic-write-support-added-in-6.11-rc1.patch delete mode 100644 sources/poky/meta/recipes-kernel/lttng/lttng-modules_2.13.12.bb create mode 100644 sources/poky/meta/recipes-kernel/lttng/lttng-modules_2.13.14.bb delete mode 100644 sources/poky/meta/recipes-kernel/lttng/lttng-tools_2.13.13.bb create mode 100644 sources/poky/meta/recipes-kernel/lttng/lttng-tools_2.13.14.bb delete mode 100644 sources/poky/meta/recipes-kernel/lttng/lttng-ust/0001-Fix-Build-examples-when-rpath-is-stripped-from-in-bu.patch create mode 100644 sources/poky/meta/recipes-kernel/lttng/lttng-ust/0001-Makefile.am-update-rpath-link.patch delete mode 100644 sources/poky/meta/recipes-kernel/systemtap/systemtap/0001-Makefile.am-remove-runtime-linux-uprobes-and-runtime.patch delete mode 100644 sources/poky/meta/recipes-kernel/systemtap/systemtap/0001-bpf-translate.cxx-fix-build-against-upcoming-gcc-14-.patch delete mode 100644 sources/poky/meta/recipes-kernel/systemtap/systemtap/0001-configure.ac-fix-broken-libdebuginfod-library-auto-d.patch delete mode 100644 sources/poky/meta/recipes-kernel/systemtap/systemtap/0001-prerelease-datestamp-fixes.patch delete mode 100644 sources/poky/meta/recipes-kernel/systemtap/systemtap/0001-staprun-fix-build-against-upcoming-gcc-14-Werror-cal.patch delete mode 100644 sources/poky/meta/recipes-multimedia/alsa/alsa-lib/0001-topology-correct-version-script-path.patch delete mode 100644 sources/poky/meta/recipes-multimedia/alsa/alsa-lib_1.2.11.bb create mode 100644 sources/poky/meta/recipes-multimedia/alsa/alsa-lib_1.2.12.bb delete mode 100644 sources/poky/meta/recipes-multimedia/alsa/alsa-plugins/0001-arcam_av.c-Include-missing-string.h.patch create mode 100644 sources/poky/meta/recipes-multimedia/alsa/alsa-plugins_1.2.12.bb delete mode 100644 sources/poky/meta/recipes-multimedia/alsa/alsa-plugins_1.2.7.1.bb delete mode 100644 sources/poky/meta/recipes-multimedia/alsa/alsa-ucm-conf_1.2.11.bb create mode 100644 sources/poky/meta/recipes-multimedia/alsa/alsa-ucm-conf_1.2.12.bb delete mode 100644 sources/poky/meta/recipes-multimedia/alsa/alsa-utils_1.2.11.bb create mode 100644 sources/poky/meta/recipes-multimedia/alsa/alsa-utils_1.2.12.bb create mode 100644 sources/poky/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-configure-improve-check-for-POSIX-ioctl.patch create mode 100644 sources/poky/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-libavcodec-arm-mlpdsp_armv5te-fix-label-format-to-wo.patch delete mode 100644 sources/poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2023-49501.patch delete mode 100644 sources/poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2023-49502.patch delete mode 100644 sources/poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2023-49528.patch delete mode 100644 sources/poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2023-50007.patch delete mode 100644 sources/poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2023-50008.patch delete mode 100644 sources/poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2024-28661.patch delete mode 100644 sources/poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2024-31578.patch delete mode 100644 sources/poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2024-31582.patch delete mode 100644 sources/poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2024-35365.patch delete mode 100644 sources/poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2024-35367.patch delete mode 100644 sources/poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2024-35368.patch delete mode 100644 sources/poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2024-35369.patch delete mode 100644 sources/poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2024-36618.patch delete mode 100644 sources/poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2025-0518.patch delete mode 100644 sources/poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2025-22919.patch delete mode 100644 sources/poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2025-22921.patch delete mode 100644 sources/poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2025-25473.patch delete mode 100644 sources/poky/meta/recipes-multimedia/ffmpeg/ffmpeg/av1_ordering_info.patch delete mode 100644 sources/poky/meta/recipes-multimedia/ffmpeg/ffmpeg/vulkan_av1_stable_API.patch delete mode 100644 sources/poky/meta/recipes-multimedia/ffmpeg/ffmpeg/vulkan_fix_gcc14.patch delete mode 100644 sources/poky/meta/recipes-multimedia/ffmpeg/ffmpeg_6.1.2.bb create mode 100644 sources/poky/meta/recipes-multimedia/ffmpeg/ffmpeg_7.0.2.bb delete mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gst-devtools_1.22.12.bb create mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gst-devtools_1.24.10.bb delete mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.22.12.bb create mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.24.10.bb delete mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.22.12.bb delete mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.22.12.bb create mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.24.10.bb delete mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-vorbisdec-Set-at-most-64-channels-to-NONE-position.patch delete mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0005-opusdec-Set-at-most-64-channels-to-NONE-position.patch delete mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0006-vorbis_parse-check-writes-to-GstOggStream.vorbis_mod.patch delete mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0007-oggstream-review-and-fix-per-format-min_packet_size.patch delete mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0008-ssaparse-Search-for-closing-brace-after-opening-brac.patch delete mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0009-ssaparse-Don-t-use-strstr-on-strings-that-are-potent.patch delete mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0010-id3v2-Don-t-try-parsing-extended-header-if-not-enoug.patch delete mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0011-discoverer-Don-t-print-channel-layout-for-more-than-.patch delete mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0012-subparse-Check-for-NULL-return-of-strchr-when-parsin.patch delete mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.22.12.bb create mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.24.10.bb delete mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-qt-include-ext-qt-gstqtgl.h-instead-of-gst-gl-gstglf.patch delete mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-qtdemux-Skip-zero-sized-boxes-instead-of-stopping-to.patch delete mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-v4l2-Define-ioctl_req_t-for-posix-linux-case.patch delete mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0002-qtdemux-Fix-integer-overflow-when-allocating-the-sam.patch delete mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0003-qtdemux-Fix-debug-output-during-trun-parsing.patch delete mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0004-qtdemux-Don-t-iterate-over-all-trun-entries-if-none-.patch delete mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0005-qtdemux-Check-sizes-of-stsc-stco-stts-before-trying-.patch delete mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0006-qtdemux-Make-sure-only-an-even-number-of-bytes-is-pr.patch delete mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0007-qtdemux-Make-sure-enough-data-is-available-before-re.patch delete mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0008-qtdemux-Fix-length-checks-and-offsets-in-stsd-entry-.patch delete mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0009-qtdemux-Fix-error-handling-when-parsing-cenc-sample-.patch delete mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0010-qtdemux-Make-sure-there-are-enough-offsets-to-read-w.patch delete mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0011-qtdemux-Actually-handle-errors-returns-from-various-.patch delete mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0012-qtdemux-Check-for-invalid-atom-length-when-extractin.patch delete mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0013-qtdemux-Add-size-check-for-parsing-SMI-SEQH-atom.patch delete mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0014-gdkpixbufdec-Check-if-initializing-the-video-info-ac.patch delete mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0015-matroskademux-Only-unmap-GstMapInfo-in-WavPack-heade.patch delete mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0016-matroskademux-Fix-off-by-one-when-parsing-multi-chan.patch delete mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0017-matroskademux-Check-for-big-enough-WavPack-codec-pri.patch delete mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0018-matroskademux-Don-t-take-data-out-of-an-empty-adapte.patch delete mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0019-matroskademux-Skip-over-laces-directly-when-postproc.patch delete mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0020-matroskademux-Skip-over-zero-sized-Xiph-stream-heade.patch delete mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0021-matroskademux-Put-a-copy-of-the-codec-data-into-the-.patch delete mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0022-jpegdec-Directly-error-out-on-negotiation-failures.patch delete mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0023-qtdemux-Avoid-integer-overflow-when-parsing-Theora-e.patch delete mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0024-avisubtitle-Fix-size-checks-and-avoid-overflows-when.patch delete mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0025-wavparse-Check-for-short-reads-when-parsing-headers-.patch delete mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0026-wavparse-Make-sure-enough-data-for-the-tag-list-tag-.patch delete mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0027-wavparse-Fix-parsing-of-acid-chunk.patch delete mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0028-wavparse-Check-that-at-least-4-bytes-are-available-b.patch delete mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0029-wavparse-Check-that-at-least-32-bytes-are-available-.patch delete mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0030-wavparse-Fix-clipping-of-size-to-the-file-size.patch delete mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0031-wavparse-Check-size-before-reading-ds64-chunk.patch delete mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.22.12.bb create mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.24.10.bb delete mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.22.12.bb create mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.24.10.bb delete mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.22.12.bb create mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.24.10.bb delete mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server/CVE-2024-44331.patch delete mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.22.12.bb create mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.24.10.bb create mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi/0001-meson-Re-added-required-lines-accidentally-removed.patch delete mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.22.12.bb create mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.24.10.bb delete mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0/0005-allocator-Avoid-integer-overflow-when-allocating-sys.patch delete mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.22.12.bb create mode 100644 sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.24.10.bb delete mode 100644 sources/poky/meta/recipes-multimedia/liba52/liba52/buildcleanup.patch delete mode 100644 sources/poky/meta/recipes-multimedia/liba52/liba52_0.7.4.bb delete mode 100644 sources/poky/meta/recipes-multimedia/libomxil/libomxil-0.9.3/configure-fix.patch delete mode 100644 sources/poky/meta/recipes-multimedia/libomxil/libomxil-0.9.3/disable-so-versioning.patch delete mode 100644 sources/poky/meta/recipes-multimedia/libomxil/libomxil-0.9.3/dynamicloader-linking.patch delete mode 100644 sources/poky/meta/recipes-multimedia/libomxil/libomxil-0.9.3/makefile-docdir-fix.patch delete mode 100644 sources/poky/meta/recipes-multimedia/libomxil/libomxil-0.9.3/parallel-make.patch delete mode 100644 sources/poky/meta/recipes-multimedia/libomxil/libomxil_0.9.3.bb delete mode 100644 sources/poky/meta/recipes-multimedia/libpng/files/run-ptest delete mode 100644 sources/poky/meta/recipes-multimedia/libpng/libpng_1.6.42.bb create mode 100644 sources/poky/meta/recipes-multimedia/libpng/libpng_1.6.43.bb delete mode 100644 sources/poky/meta/recipes-multimedia/mpeg2dec/files/0001-Import-revision-1206-from-upstream-to-fix-PIE-build.patch delete mode 100644 sources/poky/meta/recipes-multimedia/mpeg2dec/files/0001-check-for-available-arm-optimizations.patch delete mode 100644 sources/poky/meta/recipes-multimedia/mpeg2dec/files/0002-Set-visibility-of-global-symbols-used-in-ARM-specifi.patch delete mode 100644 sources/poky/meta/recipes-multimedia/mpeg2dec/files/61_global-symbol-test.patch delete mode 100644 sources/poky/meta/recipes-multimedia/mpeg2dec/files/altivec_h_needed.patch delete mode 100644 sources/poky/meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.5.1.bb delete mode 100644 sources/poky/meta/recipes-multimedia/mpg123/mpg123_1.32.10.bb create mode 100644 sources/poky/meta/recipes-multimedia/mpg123/mpg123_1.32.7.bb delete mode 100644 sources/poky/meta/recipes-multimedia/webp/libwebp_1.3.2.bb create mode 100644 sources/poky/meta/recipes-multimedia/webp/libwebp_1.4.0.bb delete mode 100644 sources/poky/meta/recipes-multimedia/x264/x264/Fix-X32-build-by-disabling-asm.patch delete mode 100644 sources/poky/meta/recipes-multimedia/x264/x264/don-t-default-to-cortex-a9-with-neon.patch delete mode 100644 sources/poky/meta/recipes-sato/webkit/libwpe_1.14.2.bb create mode 100644 sources/poky/meta/recipes-sato/webkit/libwpe_1.16.0.bb create mode 100644 sources/poky/meta/recipes-sato/webkit/webkitgtk/0001-Fix-build-issues-with-latest-Clang.patch create mode 100644 sources/poky/meta/recipes-support/appstream/appstream/0002-Do-not-build-qt-tests.patch create mode 100644 sources/poky/meta/recipes-support/appstream/appstream/0003-Fix-PACKAGE_PREFIX_DIR-in-qt-cmake-AppStreamQtConfig.patch create mode 100644 sources/poky/meta/recipes-support/aspell/aspell/0001-modules-speller-default-vector_hash-t.hpp-fix-gcc-15.patch delete mode 100644 sources/poky/meta/recipes-support/atk/at-spi2-core_2.50.1.bb create mode 100644 sources/poky/meta/recipes-support/atk/at-spi2-core_2.52.0.bb delete mode 100644 sources/poky/meta/recipes-support/attr/attr_2.5.1.bb create mode 100644 sources/poky/meta/recipes-support/attr/attr_2.5.2.bb delete mode 100644 sources/poky/meta/recipes-support/bash-completion/bash-completion_2.12.0.bb create mode 100644 sources/poky/meta/recipes-support/bash-completion/bash-completion_2.14.0.bb delete mode 100644 sources/poky/meta/recipes-support/boost/boost-1.84.0.inc create mode 100644 sources/poky/meta/recipes-support/boost/boost-1.86.0.inc delete mode 100644 sources/poky/meta/recipes-support/boost/boost-build-native_1.84.0.bb create mode 100644 sources/poky/meta/recipes-support/boost/boost-build-native_1.86.0.bb rename sources/poky/meta/recipes-support/boost/{boost_1.84.0.bb => boost_1.86.0.bb} (100%) delete mode 100644 sources/poky/meta/recipes-support/ca-certificates/ca-certificates_20211016.bb create mode 100644 sources/poky/meta/recipes-support/ca-certificates/ca-certificates_20240203.bb create mode 100644 sources/poky/meta/recipes-support/curl/curl/0001-sigpipe-init-the-struct-so-that-first-apply-ignores.patch delete mode 100644 sources/poky/meta/recipes-support/curl/curl/721941aadf4adf4f6aeb3f4c0ab489bb89610c36.patch delete mode 100644 sources/poky/meta/recipes-support/curl/curl/CVE-2024-11053-0001.patch delete mode 100644 sources/poky/meta/recipes-support/curl/curl/CVE-2024-11053-0002.patch delete mode 100644 sources/poky/meta/recipes-support/curl/curl/CVE-2024-11053-0003.patch delete mode 100644 sources/poky/meta/recipes-support/curl/curl/CVE-2024-6197.patch delete mode 100644 sources/poky/meta/recipes-support/curl/curl/CVE-2024-7264-1.patch delete mode 100644 sources/poky/meta/recipes-support/curl/curl/CVE-2024-7264-2.patch delete mode 100644 sources/poky/meta/recipes-support/curl/curl/CVE-2024-8096.patch delete mode 100644 sources/poky/meta/recipes-support/curl/curl/CVE-2025-0167.patch delete mode 100644 sources/poky/meta/recipes-support/curl/curl/environment.d-curl.sh delete mode 100644 sources/poky/meta/recipes-support/curl/curl_8.7.1.bb create mode 100644 sources/poky/meta/recipes-support/curl/curl_8.9.1.bb delete mode 100644 sources/poky/meta/recipes-support/debianutils/debianutils_5.16.bb create mode 100644 sources/poky/meta/recipes-support/debianutils/debianutils_5.20.bb delete mode 100644 sources/poky/meta/recipes-support/diffoscope/diffoscope_259.bb create mode 100644 sources/poky/meta/recipes-support/diffoscope/diffoscope_277.bb delete mode 100644 sources/poky/meta/recipes-support/enchant/enchant2_2.6.7.bb create mode 100644 sources/poky/meta/recipes-support/enchant/enchant2_2.8.2.bb delete mode 100644 sources/poky/meta/recipes-support/fribidi/fribidi_1.0.14.bb create mode 100644 sources/poky/meta/recipes-support/fribidi/fribidi_1.0.15.bb delete mode 100644 sources/poky/meta/recipes-support/gdbm/gdbm_1.23.bb create mode 100644 sources/poky/meta/recipes-support/gdbm/gdbm_1.24.bb create mode 100644 sources/poky/meta/recipes-support/gnupg/gnupg/0001-fix-compile-failure-with-musl.patch delete mode 100644 sources/poky/meta/recipes-support/gnupg/gnupg_2.4.8.bb create mode 100644 sources/poky/meta/recipes-support/gnupg/gnupg_2.5.0.bb delete mode 100644 sources/poky/meta/recipes-support/gnutls/gnutls/0001-psk-fix-read-buffer-overrun-in-the-pre_shared_key-ex.patch delete mode 100644 sources/poky/meta/recipes-support/gnutls/gnutls/0001-x509-reject-zero-length-version-in-certificate-reque.patch delete mode 100644 sources/poky/meta/recipes-support/gnutls/gnutls/04939b75417cc95b7372c6f208c4bda4579bdc34 delete mode 100644 sources/poky/meta/recipes-support/gnutls/gnutls/3e94dcdff862ef5d6db8b5cc8e59310b5f0cdfe2 delete mode 100644 sources/poky/meta/recipes-support/gnutls/gnutls/5477db1bb507a35e8833c758ce344f4b5b246d8e delete mode 100644 sources/poky/meta/recipes-support/gnutls/gnutls/CVE-2024-12243.patch delete mode 100644 sources/poky/meta/recipes-support/gnutls/gnutls/CVE-2025-32988.patch delete mode 100644 sources/poky/meta/recipes-support/gnutls/gnutls/CVE-2025-32989.patch delete mode 100644 sources/poky/meta/recipes-support/gnutls/gnutls/CVE-2025-32990.patch delete mode 100644 sources/poky/meta/recipes-support/gnutls/gnutls/CVE-2025-6395.patch delete mode 100644 sources/poky/meta/recipes-support/gnutls/gnutls_3.8.4.bb create mode 100644 sources/poky/meta/recipes-support/gnutls/gnutls_3.8.6.bb delete mode 100644 sources/poky/meta/recipes-support/icu/icu/CVE-2025-5222.patch create mode 100644 sources/poky/meta/recipes-support/icu/icu/ICU-22813_rise_buffer_sizes_pkgdata_PR3058.patch delete mode 100644 sources/poky/meta/recipes-support/icu/icu_74-2.bb create mode 100644 sources/poky/meta/recipes-support/icu/icu_75-1.bb delete mode 100644 sources/poky/meta/recipes-support/libassuan/libassuan_2.5.6.bb create mode 100644 sources/poky/meta/recipes-support/libassuan/libassuan_3.0.1.bb delete mode 100644 sources/poky/meta/recipes-support/libbsd/libbsd_0.12.1.bb create mode 100644 sources/poky/meta/recipes-support/libbsd/libbsd_0.12.2.bb delete mode 100644 sources/poky/meta/recipes-support/libcap/files/CVE-2025-1390.patch delete mode 100644 sources/poky/meta/recipes-support/libcap/libcap_2.69.bb create mode 100644 sources/poky/meta/recipes-support/libcap/libcap_2.70.bb delete mode 100644 sources/poky/meta/recipes-support/libevdev/libevdev_1.13.1.bb create mode 100644 sources/poky/meta/recipes-support/libevdev/libevdev_1.13.3.bb delete mode 100644 sources/poky/meta/recipes-support/libfm/libfm-extra/0001-nls.m4-Take-it-from-gettext-0.15.patch delete mode 100644 sources/poky/meta/recipes-support/libgcrypt/files/0001-Fix-building-error-with-O2-in-sysroot-path.patch create mode 100644 sources/poky/meta/recipes-support/libgcrypt/files/0002-libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch delete mode 100644 sources/poky/meta/recipes-support/libgcrypt/libgcrypt_1.10.3.bb create mode 100644 sources/poky/meta/recipes-support/libgcrypt/libgcrypt_1.11.0.bb delete mode 100644 sources/poky/meta/recipes-support/libgit2/libgit2_1.7.2.bb create mode 100644 sources/poky/meta/recipes-support/libgit2/libgit2_1.8.1.bb delete mode 100644 sources/poky/meta/recipes-support/libgpg-error/libgpg-error_1.48.bb create mode 100644 sources/poky/meta/recipes-support/libgpg-error/libgpg-error_1.50.bb delete mode 100644 sources/poky/meta/recipes-support/libical/libical_3.0.17.bb create mode 100644 sources/poky/meta/recipes-support/libical/libical_3.0.18.bb delete mode 100644 sources/poky/meta/recipes-support/libjitterentropy/libjitterentropy_3.4.1.bb create mode 100644 sources/poky/meta/recipes-support/libjitterentropy/libjitterentropy_3.5.0.bb delete mode 100644 sources/poky/meta/recipes-support/libksba/libksba_1.6.6.bb create mode 100644 sources/poky/meta/recipes-support/libksba/libksba_1.6.7.bb create mode 100644 sources/poky/meta/recipes-support/libnl/files/0001-tests-cksuite-all-netns.c-disable-route_1.patch create mode 100644 sources/poky/meta/recipes-support/libnl/libnl_3.10.0.bb delete mode 100644 sources/poky/meta/recipes-support/libnl/libnl_3.9.0.bb delete mode 100644 sources/poky/meta/recipes-support/libpcre/libpcre2_10.43.bb create mode 100644 sources/poky/meta/recipes-support/libpcre/libpcre2_10.44.bb delete mode 100644 sources/poky/meta/recipes-support/libproxy/libproxy_0.5.4.bb create mode 100644 sources/poky/meta/recipes-support/libproxy/libproxy_0.5.8.bb delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup-2.4/CVE-2024-52530.patch delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup-2.4/CVE-2024-52531-1.patch delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup-2.4/CVE-2024-52531-2.patch delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup-2.4/CVE-2024-52532-1.patch delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup-2.4/CVE-2024-52532-2.patch delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup-2.4/CVE-2024-52532-3.patch delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-2784.patch delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-32050.patch delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-32052.patch delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-32053.patch delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-32906-1.patch delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-32906-2.patch delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-32907.patch delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-32909.patch delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-32910-1.patch delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-32910-2.patch delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-32910-3.patch delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-32911_CVE-2025-32913-1.patch delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-32911_CVE-2025-32913-2.patch delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-32912-1.patch delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-32912-2.patch delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-32914.patch delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-4476.patch delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-46420.patch delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-46421.patch delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-4945.patch delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-4948.patch delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-4969.patch delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup-3.4.4/CVE-2024-52530.patch delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup-3.4.4/CVE-2024-52531-1.patch delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup-3.4.4/CVE-2024-52531-2.patch delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup-3.4.4/CVE-2024-52531-3.patch delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup-3.4.4/CVE-2024-52532-0001.patch delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup-3.4.4/CVE-2024-52532-0002.patch delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup-3.4.4/CVE-2025-2784.patch delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup-3.4.4/CVE-2025-32050.patch delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup-3.4.4/CVE-2025-32051-1.patch delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup-3.4.4/CVE-2025-32051-2.patch delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup-3.4.4/CVE-2025-32052.patch delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup-3.4.4/CVE-2025-32053.patch delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup-3.4.4/CVE-2025-32906-1.patch delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup-3.4.4/CVE-2025-32906-2.patch delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup-3.4.4/CVE-2025-32907-1.patch delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup-3.4.4/CVE-2025-32907-2.patch delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup-3.4.4/CVE-2025-32908-1.patch delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup-3.4.4/CVE-2025-32908-2.patch delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup-3.4.4/CVE-2025-32909.patch delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup-3.4.4/CVE-2025-32910-1.patch delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup-3.4.4/CVE-2025-32910-2.patch delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup-3.4.4/CVE-2025-32910-3.patch delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup-3.4.4/CVE-2025-32911_CVE-2025-32913-1.patch delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup-3.4.4/CVE-2025-32911_CVE-2025-32913-2.patch delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup-3.4.4/CVE-2025-32912-1.patch delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup-3.4.4/CVE-2025-32912-2.patch delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup-3.4.4/CVE-2025-32914.patch delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup-3.4.4/CVE-2025-4476.patch delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup-3.4.4/CVE-2025-46420.patch delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup-3.4.4/CVE-2025-46421.patch delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup-3.4.4/CVE-2025-4945.patch delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup-3.4.4/CVE-2025-4948.patch delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup-3.4.4/CVE-2025-4969.patch delete mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup_3.4.4.bb create mode 100644 sources/poky/meta/recipes-support/libsoup/libsoup_3.6.0.bb create mode 100644 sources/poky/meta/recipes-support/libssh2/libssh2/0001-disable-DSA-by-default.patch delete mode 100644 sources/poky/meta/recipes-support/liburcu/liburcu_0.14.0.bb create mode 100644 sources/poky/meta/recipes-support/liburcu/liburcu_0.14.1.bb create mode 100644 sources/poky/meta/recipes-support/libxslt/libxslt_1.1.42.bb delete mode 100644 sources/poky/meta/recipes-support/libxslt/libxslt_1.1.43.bb create mode 100644 sources/poky/meta/recipes-support/lz4/lz4/reproducibility.patch rename sources/poky/meta/recipes-support/lz4/{files => lz4}/run-ptest (100%) create mode 100644 sources/poky/meta/recipes-support/lz4/lz4_1.10.0.bb delete mode 100644 sources/poky/meta/recipes-support/lz4/lz4_1.9.4.bb create mode 100644 sources/poky/meta/recipes-support/nettle/nettle_3.10.bb delete mode 100644 sources/poky/meta/recipes-support/nettle/nettle_3.9.1.bb delete mode 100644 sources/poky/meta/recipes-support/nghttp2/nghttp2_1.61.0.bb create mode 100644 sources/poky/meta/recipes-support/nghttp2/nghttp2_1.63.0.bb delete mode 100644 sources/poky/meta/recipes-support/npth/npth/0001-Revert-Fix-problem-with-regression-tests-on-recent-g.patch create mode 100644 sources/poky/meta/recipes-support/npth/npth/musl-fix.patch delete mode 100644 sources/poky/meta/recipes-support/npth/npth/pkgconfig.patch delete mode 100644 sources/poky/meta/recipes-support/npth/npth_1.6.bb create mode 100644 sources/poky/meta/recipes-support/npth/npth_1.7.bb delete mode 100644 sources/poky/meta/recipes-support/p11-kit/files/fix-parallel-build-failures.patch delete mode 100644 sources/poky/meta/recipes-support/p11-kit/p11-kit_0.25.3.bb create mode 100644 sources/poky/meta/recipes-support/p11-kit/p11-kit_0.25.5.bb rename sources/poky/meta/recipes-support/pinentry/{pinentry-1.2.1 => pinentry-1.3.1}/gpg-error_pkconf.patch (82%) rename sources/poky/meta/recipes-support/pinentry/{pinentry-1.2.1 => pinentry-1.3.1}/libassuan_pkgconf.patch (88%) delete mode 100644 sources/poky/meta/recipes-support/pinentry/pinentry_1.2.1.bb create mode 100644 sources/poky/meta/recipes-support/pinentry/pinentry_1.3.1.bb delete mode 100644 sources/poky/meta/recipes-support/rng-tools/rng-tools_6.16.bb create mode 100644 sources/poky/meta/recipes-support/rng-tools/rng-tools_6.17.bb delete mode 100644 sources/poky/meta/recipes-support/sqlite/sqlite3/CVE-2025-29088.patch delete mode 100644 sources/poky/meta/recipes-support/sqlite/sqlite3/CVE-2025-3277.patch delete mode 100644 sources/poky/meta/recipes-support/sqlite/sqlite3/CVE-2025-6965.patch delete mode 100644 sources/poky/meta/recipes-support/sqlite/sqlite3_3.45.3.bb create mode 100644 sources/poky/meta/recipes-support/sqlite/sqlite3_3.46.1.bb delete mode 100644 sources/poky/meta/recipes-support/taglib/taglib_2.0.1.bb create mode 100644 sources/poky/meta/recipes-support/taglib/taglib_2.0.2.bb delete mode 100644 sources/poky/meta/recipes-support/vte/vte/CVE-2024-37535-01.patch delete mode 100644 sources/poky/meta/recipes-support/vte/vte/CVE-2024-37535-02.patch delete mode 100644 sources/poky/meta/recipes-support/vte/vte_0.74.2.bb create mode 100644 sources/poky/meta/recipes-support/vte/vte_0.76.3.bb create mode 100755 sources/poky/scripts/cve-json-to-text.py delete mode 100755 sources/poky/scripts/gen-site-config create mode 100644 sources/poky/scripts/lib/resulttool/junit.py create mode 100755 sources/poky/scripts/makefile-getvar create mode 100755 sources/poky/scripts/pull-sdpx-licenses.py diff --git a/sources/meta-mylayer/conf/layer.conf b/sources/meta-mylayer/conf/layer.conf index f9690674..a9c58122 100644 --- a/sources/meta-mylayer/conf/layer.conf +++ b/sources/meta-mylayer/conf/layer.conf @@ -10,4 +10,4 @@ BBFILE_PATTERN_meta-mylayer = "^${LAYERDIR}/" BBFILE_PRIORITY_meta-mylayer = "6" LAYERDEPENDS_meta-mylayer = "core" -LAYERSERIES_COMPAT_meta-mylayer = "scarthgap" +LAYERSERIES_COMPAT_meta-mylayer = "styhead" diff --git a/sources/meta-mylayer/recipes-example/hello/hello_0.1.bb b/sources/meta-mylayer/recipes-example/hello/hello_0.1.bb index 6358587f..a9bfc403 100644 --- a/sources/meta-mylayer/recipes-example/hello/hello_0.1.bb +++ b/sources/meta-mylayer/recipes-example/hello/hello_0.1.bb @@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384 SRC_URI = "file://hello.py" -S = "${WORKDIR}" +S = "${UNPACKDIR}" #inherit setuptools diff --git a/sources/meta-openembedded/.subproject b/sources/meta-openembedded/.subproject index bd7c6a96..fdd1e78d 100644 --- a/sources/meta-openembedded/.subproject +++ b/sources/meta-openembedded/.subproject @@ -1,4 +1,4 @@ [upstream] - object-id = e8fd97d86af86cdcc5a6eb3f301cbaf6a2084943 - revision = refs/heads/scarthgap + object-id = c93994f1bb601c57548b588d4f77a044d90822cf + revision = styhead url = https://git.openembedded.org/meta-openembedded diff --git a/sources/meta-openembedded/meta-filesystems/README.md b/sources/meta-openembedded/meta-filesystems/README.md index bf488060..c04e2cc7 100644 --- a/sources/meta-openembedded/meta-filesystems/README.md +++ b/sources/meta-openembedded/meta-filesystems/README.md @@ -11,18 +11,18 @@ This layer depends on: URI: git://git.openembedded.org/openembedded-core layers: meta - branch: scarthgap + branch: styhead URI: git://git.openembedded.org/meta-openembedded layers: meta-oe - branch: scarthgap + branch: styhead Patches ======= Please submit any patches against the filesystems layer to the OpenEmbedded development mailing list (openembedded-devel@lists.openembedded.org) -with '[meta-filesystems][scarthgap]' in the subject. +with '[meta-filesystems][styhead]' in the subject. Layer maintainer: Armin Kuster @@ -30,7 +30,7 @@ When sending single patches, please use something like: git send-email -1 -M \ --to openembedded-devel@lists.openembedded.org \ - --subject-prefix='meta-filesystems][scarthgap][PATCH' + --subject-prefix='meta-filesystems][styhead][PATCH' Table of Contents diff --git a/sources/meta-openembedded/meta-filesystems/conf/include/non-repro-meta-filesystems.inc b/sources/meta-openembedded/meta-filesystems/conf/include/non-repro-meta-filesystems.inc index 49755932..509907d8 100644 --- a/sources/meta-openembedded/meta-filesystems/conf/include/non-repro-meta-filesystems.inc +++ b/sources/meta-openembedded/meta-filesystems/conf/include/non-repro-meta-filesystems.inc @@ -3,7 +3,4 @@ KNOWN_NON_REPRO_META_FILESYSTEMS = " \ e2tools-ptest \ xfsprogs-doc \ - zfs \ - zfs-dbg \ - zfs-dev \ " diff --git a/sources/meta-openembedded/meta-filesystems/conf/layer.conf b/sources/meta-openembedded/meta-filesystems/conf/layer.conf index c2263c89..52ca5a4c 100644 --- a/sources/meta-openembedded/meta-filesystems/conf/layer.conf +++ b/sources/meta-openembedded/meta-filesystems/conf/layer.conf @@ -15,4 +15,4 @@ LAYERVERSION_filesystems-layer = "1" LAYERDEPENDS_filesystems-layer = "core openembedded-layer networking-layer" -LAYERSERIES_COMPAT_filesystems-layer = "scarthgap" +LAYERSERIES_COMPAT_filesystems-layer = "styhead" diff --git a/sources/meta-openembedded/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/files/0001-unistr.c-Fix-use-after-free-in-ntfs_uppercase_mbs.patch b/sources/meta-openembedded/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/files/0001-unistr.c-Fix-use-after-free-in-ntfs_uppercase_mbs.patch new file mode 100644 index 00000000..3160f568 --- /dev/null +++ b/sources/meta-openembedded/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/files/0001-unistr.c-Fix-use-after-free-in-ntfs_uppercase_mbs.patch @@ -0,0 +1,42 @@ +From 7b6210c5be46e5120b42c09f910e8f104bf3edf1 Mon Sep 17 00:00:00 2001 +From: Erik Larsson +Date: Tue, 13 Jun 2023 17:47:15 +0300 +Subject: [PATCH] unistr.c: Fix use-after-free in 'ntfs_uppercase_mbs'. + +If 'utf8_to_unicode' throws an error due to an invalid UTF-8 sequence, +then 'n' will be less than 0 and the loop will terminate without storing +anything in '*t'. After the loop the uppercase string's allocation is +freed, however after it is freed it is unconditionally accessed through +'*t', which points into the freed allocation, for the purpose of NULL- +terminating the string. This leads to a use-after-free. +Fixed by only NULL-terminating the string when no error has been thrown. + +Thanks for Jeffrey Bencteux for reporting this issue: +https://github.com/tuxera/ntfs-3g/issues/84 + +Upstream-Status: Backport [https://github.com/tuxera/ntfs-3g/commit/75dcdc2cf37478fad6c0e3427403d198b554951d] +CVE: CVE-2023-52890 +Signed-off-by: Hongxu Jia + +--- + libntfs-3g/unistr.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/libntfs-3g/unistr.c b/libntfs-3g/unistr.c +index 5854b3b..db8ddf4 100644 +--- a/libntfs-3g/unistr.c ++++ b/libntfs-3g/unistr.c +@@ -1189,8 +1189,9 @@ char *ntfs_uppercase_mbs(const char *low, + free(upp); + upp = (char*)NULL; + errno = EILSEQ; ++ } else { ++ *t = 0; + } +- *t = 0; + } + return (upp); + } +-- +2.34.1 + diff --git a/sources/meta-openembedded/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/ntfs-3g-ntfsprogs_2022.10.3.bb b/sources/meta-openembedded/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/ntfs-3g-ntfsprogs_2022.10.3.bb index 37a8106b..be2a5245 100644 --- a/sources/meta-openembedded/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/ntfs-3g-ntfsprogs_2022.10.3.bb +++ b/sources/meta-openembedded/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/ntfs-3g-ntfsprogs_2022.10.3.bb @@ -8,6 +8,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \ SRC_URI = "http://tuxera.com/opensource/ntfs-3g_ntfsprogs-${PV}.tgz \ file://0001-libntfs-3g-Makefile.am-fix-install-failed-while-host.patch \ + file://0001-unistr.c-Fix-use-after-free-in-ntfs_uppercase_mbs.patch \ " S = "${WORKDIR}/ntfs-3g_ntfsprogs-${PV}" SRC_URI[sha256sum] = "f20e36ee68074b845e3629e6bced4706ad053804cbaf062fbae60738f854170c" diff --git a/sources/meta-openembedded/meta-filesystems/recipes-filesystems/owfs/owfs_3.2p3.bb b/sources/meta-openembedded/meta-filesystems/recipes-filesystems/owfs/owfs_3.2p3.bb index b641e4c2..7768a734 100644 --- a/sources/meta-openembedded/meta-filesystems/recipes-filesystems/owfs/owfs_3.2p3.bb +++ b/sources/meta-openembedded/meta-filesystems/recipes-filesystems/owfs/owfs_3.2p3.bb @@ -37,8 +37,8 @@ EXTRA_OECONF = " \ do_install:prepend() { install -d ${D}${sysconfdir}/default/ install -d ${D}${sysconfdir}/init.d/ - install -m 0755 ${WORKDIR}/owhttpd ${D}${sysconfdir}/init.d/owhttpd - install -m 0755 ${WORKDIR}/owserver ${D}${sysconfdir}/init.d/owserver + install -m 0755 ${UNPACKDIR}/owhttpd ${D}${sysconfdir}/init.d/owhttpd + install -m 0755 ${UNPACKDIR}/owserver ${D}${sysconfdir}/init.d/owserver } PACKAGES =+ "owftpd owhttpd owserver owshell libowcapi libow libownet owmon owtap" diff --git a/sources/meta-openembedded/meta-filesystems/recipes-filesystems/zfs/zfs_2.2.2.bb b/sources/meta-openembedded/meta-filesystems/recipes-filesystems/zfs/zfs_2.2.2.bb deleted file mode 100644 index d3ea6797..00000000 --- a/sources/meta-openembedded/meta-filesystems/recipes-filesystems/zfs/zfs_2.2.2.bb +++ /dev/null @@ -1,77 +0,0 @@ -SUMMARY = "OpenZFS on Linux and FreeBSD" -DESCRIPTION = "OpenZFS on Linux and FreeBSD" -LICENSE = "CDDL-1.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=7087caaf1dc8a2856585619f4a787faa" -HOMEPAGE ="https://github.com/openzfs/zfs" - -SRCREV = "494aaaed89cb9fe9f2da3b6c6f465a4bc9f6a7e1" -SRC_URI = "git://github.com/openzfs/zfs;protocol=https;branch=zfs-2.2-release \ - file://0001-Define-strndupa-if-it-does-not-exist.patch \ - file://aaf28a4630af60496c9d33db1d06a7d7d8983422.patch \ - file://0001-fs-tests-cmd-readmmap-Replace-uint_t-with-uint32_t.patch \ -" - -S = "${WORKDIR}/git" - -# Using both 'module' and 'autotools' classes seems a bit odd, they both -# define a do_compile function. -# That's why we opt for module-base, also this prevents module splitting. -inherit module-base pkgconfig autotools bash-completion - -DEPENDS = "virtual/kernel zlib util-linux libtirpc openssl curl" - -PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd sysvinit', d)}" - -PACKAGECONFIG[pam] = "--enable-pam --with-pamconfigsdir=${datadir}/pam-configs --with-pammoduledir=${libdir}/security, --disable-pam" -PACKAGECONFIG[systemd] = "--enable-systemd,--disable-systemd," -PACKAGECONFIG[sysvinit] = "--enable-sysvinit,--disable-sysvinit," - -EXTRA_OECONF:append = " \ - --disable-pyzfs \ - --with-linux=${STAGING_KERNEL_DIR} --with-linux-obj=${STAGING_KERNEL_BUILDDIR} \ - --with-mounthelperdir=${base_sbin} \ - --with-udevdir=${base_libdir}/udev \ - --with-systemdunitdir=${systemd_system_unitdir} \ - --with-systemdgeneratordir=${nonarch_base_libdir}/systemd/system-generators \ - --with-systemdpresetdir=${nonarch_base_libdir}/systemd/system-preset \ - --with-systemdmodulesloaddir=${sysconfdir}/module-load.d \ - --without-dracutdir \ -" - -EXTRA_OEMAKE:append = " \ - INSTALL_MOD_PATH=${D}${root_prefix} \ -" - -do_install:append() { - # /usr/share/zfs contains the zfs-tests folder which we do not need: - rm -rf ${D}${datadir}/zfs - - rm -rf ${D}${datadir}/initramfs-tools -} - -FILES:${PN} += "\ - ${nonarch_base_libdir}/modules \ - ${systemd_system_unitdir} \ - ${nonarch_base_libdir}/systemd/system-generators \ - ${nonarch_base_libdir}/systemd/system-preset \ - ${sysconfdir}/modules-load.d/${BPN}.conf \ - ${sysconfdir}/default/${BPN} \ - ${sysconfdir}/sudoers.d/${BPN} \ - ${sysconfdir}/${BPN} \ - ${base_libdir}/udev \ - ${sbindir} \ - ${bindir} \ - ${libexecdir}/${BPN} \ - ${libdir} \ -" - -FILES:${PN}-dev += "\ - ${prefix}/src/zfs-${PV} \ - ${prefix}/src/spl-${PV} \ -" -# Not yet ported to rv32 -COMPATIBLE_HOST:riscv32 = "null" -# conflicting definition of ABS macro from asm/asm.h from kernel -COMPATIBLE_HOST:mips = "null" -# FTBFS on aarch64 with 6.2+ kernel see https://github.com/openzfs/zfs/issues/14555 -COMPATIBLE_HOST:aarch64 = "null" diff --git a/sources/meta-openembedded/meta-filesystems/recipes-filesystems/zfs/zfs_2.2.5.bb b/sources/meta-openembedded/meta-filesystems/recipes-filesystems/zfs/zfs_2.2.5.bb new file mode 100644 index 00000000..504fe289 --- /dev/null +++ b/sources/meta-openembedded/meta-filesystems/recipes-filesystems/zfs/zfs_2.2.5.bb @@ -0,0 +1,77 @@ +SUMMARY = "OpenZFS on Linux and FreeBSD" +DESCRIPTION = "OpenZFS on Linux and FreeBSD" +LICENSE = "CDDL-1.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=7087caaf1dc8a2856585619f4a787faa" +HOMEPAGE ="https://github.com/openzfs/zfs" + +SRCREV = "33174af15112ed5c53299da2d28e763b0163f428" +SRC_URI = "git://github.com/openzfs/zfs;protocol=https;branch=zfs-2.2-release \ + file://0001-Define-strndupa-if-it-does-not-exist.patch \ + file://aaf28a4630af60496c9d33db1d06a7d7d8983422.patch \ + file://0001-fs-tests-cmd-readmmap-Replace-uint_t-with-uint32_t.patch \ +" + +S = "${WORKDIR}/git" + +# Using both 'module' and 'autotools' classes seems a bit odd, they both +# define a do_compile function. +# That's why we opt for module-base, also this prevents module splitting. +inherit module-base pkgconfig autotools bash-completion + +DEPENDS = "virtual/kernel zlib util-linux libtirpc openssl curl" + +PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd sysvinit', d)}" + +PACKAGECONFIG[pam] = "--enable-pam --with-pamconfigsdir=${datadir}/pam-configs --with-pammoduledir=${libdir}/security, --disable-pam" +PACKAGECONFIG[systemd] = "--enable-systemd,--disable-systemd," +PACKAGECONFIG[sysvinit] = "--enable-sysvinit,--disable-sysvinit," + +EXTRA_OECONF:append = " \ + --disable-pyzfs \ + --with-linux=${STAGING_KERNEL_DIR} --with-linux-obj=${STAGING_KERNEL_BUILDDIR} \ + --with-mounthelperdir=${base_sbin} \ + --with-udevdir=${base_libdir}/udev \ + --with-systemdunitdir=${systemd_system_unitdir} \ + --with-systemdgeneratordir=${nonarch_base_libdir}/systemd/system-generators \ + --with-systemdpresetdir=${nonarch_base_libdir}/systemd/system-preset \ + --with-systemdmodulesloaddir=${sysconfdir}/module-load.d \ + --without-dracutdir --enable-linux-builtin \ +" + +EXTRA_OEMAKE:append = " \ + INSTALL_MOD_PATH=${D}${root_prefix} \ +" + +do_install:append() { + # /usr/share/zfs contains the zfs-tests folder which we do not need: + rm -rf ${D}${datadir}/zfs + + rm -rf ${D}${datadir}/initramfs-tools +} + +FILES:${PN} += "\ + ${nonarch_base_libdir}/modules \ + ${systemd_system_unitdir} \ + ${nonarch_base_libdir}/systemd/system-generators \ + ${nonarch_base_libdir}/systemd/system-preset \ + ${sysconfdir}/modules-load.d/${BPN}.conf \ + ${sysconfdir}/default/${BPN} \ + ${sysconfdir}/sudoers.d/${BPN} \ + ${sysconfdir}/${BPN} \ + ${base_libdir}/udev \ + ${sbindir} \ + ${bindir} \ + ${libexecdir}/${BPN} \ + ${libdir} \ +" + +FILES:${PN}-dev += "\ + ${prefix}/src/zfs-${PV} \ + ${prefix}/src/spl-${PV} \ +" +# Not yet ported to rv32 +COMPATIBLE_HOST:riscv32 = "null" +# conflicting definition of ABS macro from asm/asm.h from kernel +COMPATIBLE_HOST:mips = "null" +# FTBFS on aarch64 with 6.2+ kernel see https://github.com/openzfs/zfs/issues/14555 +COMPATIBLE_HOST:aarch64 = "null" diff --git a/sources/meta-openembedded/meta-filesystems/recipes-support/composefs/composefs_1.0.3.bb b/sources/meta-openembedded/meta-filesystems/recipes-support/composefs/composefs_1.0.3.bb deleted file mode 100644 index 7607b0a1..00000000 --- a/sources/meta-openembedded/meta-filesystems/recipes-support/composefs/composefs_1.0.3.bb +++ /dev/null @@ -1,23 +0,0 @@ -SUMMARY = "Tools to handle creating and mounting composefs images" -HOMEPAGE = "https://github.com/containers/composefs" -LICENSE = "GPL-3.0-or-later & LGPL-2.0-or-later & Apache-2.0" -LIC_FILES_CHKSUM = "\ - file://BSD-2-Clause.txt;md5=121c8a0a8fa5961a26b7863034ebcce8 \ - file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://COPYING.LESSERv3;md5=6a6a8e020838b23406c81b19c1d46df6 \ - file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \ - file://COPYINGv3;md5=d32239bcb673463ab874e80d47fae504 \ - file://LICENSE.Apache-2.0;md5=3b83ef96387f14655fc854ddc3c6bd57 \ -" -DEPENDS = "fuse3 openssl" -SRCREV = "2d5cdcb9176cfe4ccf1761ef6d78e1c48de35649" -PV = "1.0.3" - -SRC_URI = "\ - git://github.com/containers/composefs.git;protocol=https;branch=main \ - file://0001-musl-basename-use-portable-implementation-for-basena.patch \ -" - -S = "${WORKDIR}/git" - -inherit autotools pkgconfig diff --git a/sources/meta-openembedded/meta-filesystems/recipes-support/composefs/files/0001-musl-basename-use-portable-implementation-for-basena.patch b/sources/meta-openembedded/meta-filesystems/recipes-support/composefs/files/0001-musl-basename-use-portable-implementation-for-basena.patch deleted file mode 100644 index 49a0b21c..00000000 --- a/sources/meta-openembedded/meta-filesystems/recipes-support/composefs/files/0001-musl-basename-use-portable-implementation-for-basena.patch +++ /dev/null @@ -1,75 +0,0 @@ -From b21a9d4f10a066cac76bb345d31fdd24afcf3e6f Mon Sep 17 00:00:00 2001 -From: Fathi Boudra -Date: Tue, 9 Apr 2024 08:47:37 +0200 -Subject: [PATCH] musl: basename: use portable implementation for basename API - -musl has removed the non-prototype declaration of basename from string.h which -now results in build errors with newer clang compilers. - -Implement GNU basename behavior using strchr which is portable across libcs. - -Fixes: -| ../../git/tools/mountcomposefs.c:43:20: -| error: call to undeclared function 'basename'; ISO C99 and later do not -| support implicit function declarations [-Wimplicit-function-declaration] -| 43 | const char *bin = basename(argv0); -| | ^ -| ../../git/tools/mountcomposefs.c:43:14: -| error: incompatible integer to pointer conversion initializing 'const char *' -| with an expression of type 'int' [-Wint-conversion] -| 43 | const char *bin = basename(argv0); -| | ^ ~~~~~~~~~~~~~~~ - -For reference: -https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7 - -Closes: https://github.com/containers/composefs/issues/272 - -Signed-off-by: Fathi Boudra - -Upstream-Status: Submitted [https://github.com/containers/composefs/pull/273] ---- - libcomposefs/lcfs-utils.h | 6 ++++++ - tools/mkcomposefs.c | 2 +- - tools/mountcomposefs.c | 3 ++- - 3 files changed, 9 insertions(+), 2 deletions(-) - ---- a/tools/mountcomposefs.c -+++ b/tools/mountcomposefs.c -@@ -37,10 +37,11 @@ - #include - - #include "libcomposefs/lcfs-mount.h" -+#include "libcomposefs/lcfs-utils.h" - - static void usage(const char *argv0) - { -- const char *bin = basename(argv0); -+ const char *bin = gnu_basename(argv0); - fprintf(stderr, - "usage: %s [-t type] [-o opt[,opts..]] IMAGE MOUNTPOINT\n" - "Example:\n" ---- a/libcomposefs/lcfs-utils.h -+++ b/libcomposefs/lcfs-utils.h -@@ -161,4 +161,10 @@ static inline void *steal_pointer(void * - /* type safety */ - #define steal_pointer(pp) (0 ? (*(pp)) : (steal_pointer)(pp)) - -+static inline const char *gnu_basename(const char *filename) -+{ -+ const char *p = strrchr(filename, '/'); -+ return p ? p+1 : filename; -+} -+ - #endif ---- a/tools/mkcomposefs.c -+++ b/tools/mkcomposefs.c -@@ -315,7 +315,7 @@ static int fill_store(struct lcfs_node_s - - static void usage(const char *argv0) - { -- const char *bin = basename(argv0); -+ const char *bin = gnu_basename(argv0); - fprintf(stderr, - "Usage: %s [OPTIONS] SOURCE IMAGE\n" - "Options:\n" diff --git a/sources/meta-openembedded/meta-filesystems/recipes-support/fuse/fuse_2.9.9.bb b/sources/meta-openembedded/meta-filesystems/recipes-support/fuse/fuse_2.9.9.bb index cee4879e..fca7d42b 100644 --- a/sources/meta-openembedded/meta-filesystems/recipes-support/fuse/fuse_2.9.9.bb +++ b/sources/meta-openembedded/meta-filesystems/recipes-support/fuse/fuse_2.9.9.bb @@ -23,7 +23,7 @@ SRC_URI[sha256sum] = "d0e69d5d608cc22ff4843791ad097f554dd32540ddc9bed7638cc6fea7 UPSTREAM_CHECK_URI = "https://github.com/libfuse/libfuse/releases" UPSTREAM_CHECK_REGEX = "fuse\-(?P2(\.\d+)+).tar.gz" -CVE_PRODUCT = "fuse_project:fuse" +CVE_PRODUCT = "fuse_project:fuse fuse:fuse" inherit autotools pkgconfig update-rc.d systemd @@ -68,7 +68,7 @@ do_install:append() { # Install systemd related configuration file if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then install -d ${D}${sysconfdir}/modules-load.d - install -m 0644 ${WORKDIR}/fuse.conf ${D}${sysconfdir}/modules-load.d + install -m 0644 ${UNPACKDIR}/fuse.conf ${D}${sysconfdir}/modules-load.d fi } diff --git a/sources/meta-openembedded/meta-filesystems/recipes-utils/aufs-util/aufs-util_git.bb b/sources/meta-openembedded/meta-filesystems/recipes-utils/aufs-util/aufs-util_git.bb index ad846af4..4d2b9098 100644 --- a/sources/meta-openembedded/meta-filesystems/recipes-utils/aufs-util/aufs-util_git.bb +++ b/sources/meta-openembedded/meta-filesystems/recipes-utils/aufs-util/aufs-util_git.bb @@ -33,7 +33,7 @@ do_configure:prepend() { do_configure:append () { install -d ${S}/include/linux/ - cp ${WORKDIR}/aufs_type.h ${S}/include/linux/ + cp ${UNPACKDIR}/aufs_type.h ${S}/include/linux/ sed -i -e 's;__user;;' ${S}/include/linux/aufs_type.h } diff --git a/sources/meta-openembedded/meta-filesystems/recipes-utils/e2tools/e2tools_git.bb b/sources/meta-openembedded/meta-filesystems/recipes-utils/e2tools/e2tools_git.bb index a0d194ca..459c7058 100644 --- a/sources/meta-openembedded/meta-filesystems/recipes-utils/e2tools/e2tools_git.bb +++ b/sources/meta-openembedded/meta-filesystems/recipes-utils/e2tools/e2tools_git.bb @@ -15,6 +15,7 @@ PV = "0.1.0+git" SRC_URI = " \ git://github.com/e2tools/e2tools;protocol=https;branch=master \ + file://0001-Disable-portability-warning-as-error.patch \ file://run-ptest \ " @@ -24,41 +25,14 @@ S = "${WORKDIR}/git" inherit autotools pkgconfig ptest -do_configure:prepend() { - git -C "${WORKDIR}/git" reset --hard HEAD - - # To install ptest for this package, special configuration needs to be - # done before do_configure(). So, do_configure_ptest() which is scheduled - # after do_configure() cannot be used. - - # We only do special configuration if we are installing ptest for this - # package. - if [ "${@d.getVar('PTEST_ENABLED')}" -eq "1" ]; then - # Since we guarantee run-time dependency when installing the ptest for - # this package, we do not need the check macros under section "checks - # for programs" in "configure.ac". Plus, these check macros set the - # ouput variables to incorrect values as these checks are performed on - # the host environment. Still, we need these variables outputted from - # these check macros. So, we insert the following lines to manually - # set these output variables to the correct value in "configure.ac". - - # Note that HAVE_DD_COMMAND and HAVE_MKE2FS_COMMAND are only ever used - # in tests/Makefile-files which determines whether to include the test - # cases. As for output variables CHMOD, DD, and MKE2FS, they only - # point to the programs which test cases need to run. Since these - # commands are guaranteed to be present due to RDEPENDS and are - # guaranteed to be accessible under PATH environment variable on the - # target, we only need to specify the name of these programs. - - perl -i -0777 -pe 's/(^dnl\s*=+\s*^dnl\s*Checks for compiler flags\s*^dnl\s*=+)/ -AC_SUBST([CHMOD], 'chmod') -AC_SUBST([DD], 'dd') -AC_SUBST([MKE2FS], 'mke2fs') -AM_CONDITIONAL([HAVE_DD_COMMAND], [true]) -AM_CONDITIONAL([HAVE_MKE2FS_COMMAND], [true]) -\1/ms' "${WORKDIR}/git/configure.ac" - fi -} +# Otherwise these tools will be detected from build host and +# assumptions will go wrong, Fun of cross compiling +EXTRA_OECONF += "\ + ac_cv_path_MKE2FS=${base_sbindir}/mke2fs \ + ac_cv_path_CHMOD=${base_bindir}/chmod \ + ac_cv_path_DD=${base_bindir}/dd \ + ac_cv_path_GREP=${base_bindir}/grep \ + " do_install_ptest() { rm -rf "${D}${PTEST_PATH}/*" diff --git a/sources/meta-openembedded/meta-filesystems/recipes-utils/e2tools/files/0001-Disable-portability-warning-as-error.patch b/sources/meta-openembedded/meta-filesystems/recipes-utils/e2tools/files/0001-Disable-portability-warning-as-error.patch new file mode 100644 index 00000000..dec793f3 --- /dev/null +++ b/sources/meta-openembedded/meta-filesystems/recipes-utils/e2tools/files/0001-Disable-portability-warning-as-error.patch @@ -0,0 +1,34 @@ +From e0aaedea30483bf5b9bb085e12fff79144fa1174 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 29 Aug 2024 11:12:57 -0700 +Subject: [PATCH] Disable portability warning as error + +With latest automake 1.17 its warning about escape hash +mark [1] and since configure.ac uses -werror to call automake +this becomes an error and reconfigure fails. + +escape hash mark is non-portable as discussed here [2] + +Fow now let it be a warning, it should be fixed in a portable way + +[1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=7610 +[2] https://lists.gnu.org/archive/html/automake/2011-08/msg00023.html + +Upstream-Status: Submitted [https://github.com/e2tools/e2tools/pull/31] +Signed-off-by: Khem Raj +--- + configure.ac | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/configure.ac b/configure.ac +index dd32c4d..9f37591 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -14,6 +14,7 @@ AC_CONFIG_MACRO_DIR([m4]) + AM_INIT_AUTOMAKE([ + -Wall + -Werror ++-Wno-portability + 1.9.6 + foreign + subdir-objects diff --git a/sources/meta-openembedded/meta-filesystems/recipes-utils/exfatprogs/exfatprogs_1.2.2.bb b/sources/meta-openembedded/meta-filesystems/recipes-utils/exfatprogs/exfatprogs_1.2.2.bb deleted file mode 100644 index 0dd5d8f5..00000000 --- a/sources/meta-openembedded/meta-filesystems/recipes-utils/exfatprogs/exfatprogs_1.2.2.bb +++ /dev/null @@ -1,24 +0,0 @@ -SUMMARY = "exFAT filesystem userspace utilities" -DESCRIPTION = "\ -As new exfat filesystem is merged into linux-5.7 kernel, exfatprogs is \ -created as an official userspace utilities that contain all of the standard \ -utilities for creating and fixing and debugging exfat filesystem in linux \ -system. The goal of exfatprogs is to provide high performance and quality \ -at the level of exfat utilities in windows. And this software is licensed \ -under the GNU General Public License Version 2." -HOMEPAGE = "https://github.com/${BPN}/${BPN}" -SECTION = "universe/otherosfs" -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" - -SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/${PV}/${BP}.tar.xz" -SRC_URI[sha256sum] = "61d517231f8ec177eeb5955fd6edb89748d3f88ba412c48bcb32741b430e359a" - -UPSTREAM_CHECK_URI = "https://github.com/${BPN}/${BPN}/releases" -UPSTREAM_CHECK_REGEX = "${BPN}-(?P\d+(\.\d+)+)" - -inherit autotools - -RPROVIDES:${PN} = "exfat-utils" -RCONFLICTS:${PN} = "exfat-utils" -RREPLACES:${PN} = "exfat-utils" diff --git a/sources/meta-openembedded/meta-filesystems/recipes-utils/exfatprogs/exfatprogs_1.2.5.bb b/sources/meta-openembedded/meta-filesystems/recipes-utils/exfatprogs/exfatprogs_1.2.5.bb new file mode 100644 index 00000000..c3ae8b83 --- /dev/null +++ b/sources/meta-openembedded/meta-filesystems/recipes-utils/exfatprogs/exfatprogs_1.2.5.bb @@ -0,0 +1,24 @@ +SUMMARY = "exFAT filesystem userspace utilities" +DESCRIPTION = "\ +As new exfat filesystem is merged into linux-5.7 kernel, exfatprogs is \ +created as an official userspace utilities that contain all of the standard \ +utilities for creating and fixing and debugging exfat filesystem in linux \ +system. The goal of exfatprogs is to provide high performance and quality \ +at the level of exfat utilities in windows. And this software is licensed \ +under the GNU General Public License Version 2." +HOMEPAGE = "https://github.com/${BPN}/${BPN}" +SECTION = "universe/otherosfs" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/${PV}/${BP}.tar.xz" +SRC_URI[sha256sum] = "f27160dcc1ddd17c96cd41a6ceef7037adc2796ab5c5633d3d85cf532c3ee2f0" + +UPSTREAM_CHECK_URI = "https://github.com/${BPN}/${BPN}/releases" +UPSTREAM_CHECK_REGEX = "${BPN}-(?P\d+(\.\d+)+)" + +inherit autotools + +RPROVIDES:${PN} = "exfat-utils" +RCONFLICTS:${PN} = "exfat-utils" +RREPLACES:${PN} = "exfat-utils" diff --git a/sources/meta-openembedded/meta-filesystems/recipes-utils/overlayfs/overlayfs-tools/0001-always-use-glibc-basename.patch b/sources/meta-openembedded/meta-filesystems/recipes-utils/overlayfs/overlayfs-tools/0001-always-use-glibc-basename.patch new file mode 100644 index 00000000..78802e39 --- /dev/null +++ b/sources/meta-openembedded/meta-filesystems/recipes-utils/overlayfs/overlayfs-tools/0001-always-use-glibc-basename.patch @@ -0,0 +1,38 @@ +From 2fa94fc7adf05fae46204f4665216c8b019010f3 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 5 Jul 2024 23:16:38 -0700 +Subject: [PATCH 1/2] always use glibc basename() + +There is a use of basename() which expects it to be GNU version of +basename, which is not available in other libcs e.g. musl on Linux +therefore provide a version for such cases + +Upstream-Status: Submitted [https://github.com/kmxz/overlayfs-tools/pull/26] +Signed-off-by: Khem Raj +--- + main.c | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git a/main.c b/main.c +index 7b669eb..ea0f5a5 100644 +--- a/main.c ++++ b/main.c +@@ -30,6 +30,18 @@ bool brief; + bool ignore; + extern char *program_name; + ++#ifndef __GLIBC__ ++/* ++ * GNU basename implementation ++ */ ++static const char *__basename(const char *filename) { ++ char *p = strrchr(filename, '/'); ++ return p ? p + 1 : filename; ++} ++ ++#define basename(x) __basename(x) ++#endif ++ + void print_help(const char *program) { + printf("Usage: %s command options\n", program); + puts(""); diff --git a/sources/meta-openembedded/meta-filesystems/recipes-utils/overlayfs/overlayfs-tools/0002-Change-program_name-to-have-const-attribute.patch b/sources/meta-openembedded/meta-filesystems/recipes-utils/overlayfs/overlayfs-tools/0002-Change-program_name-to-have-const-attribute.patch new file mode 100644 index 00000000..84530629 --- /dev/null +++ b/sources/meta-openembedded/meta-filesystems/recipes-utils/overlayfs/overlayfs-tools/0002-Change-program_name-to-have-const-attribute.patch @@ -0,0 +1,56 @@ +From be694ba90aa2e0fed3a4e9b53ad7a61efd0430c5 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 5 Jul 2024 23:18:07 -0700 +Subject: [PATCH 2/2] Change program_name to have const attribute + +This is how it is used in all places and it also avoids a const to +non-const conversion warning + +Upstream-Status: Submitted [https://github.com/kmxz/overlayfs-tools/pull/26] + +Signed-off-by: Khem Raj +--- + common.c | 2 +- + fsck.c | 2 +- + main.c | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/common.c b/common.c +index eaf24a8..a15b66f 100644 +--- a/common.c ++++ b/common.c +@@ -29,7 +29,7 @@ + #include "common.h" + #include "config.h" + +-char *program_name; ++const char *program_name; + + /* #define DEBUG 1 */ + #ifdef DEBUG +diff --git a/fsck.c b/fsck.c +index 4e513f5..285b9f1 100644 +--- a/fsck.c ++++ b/fsck.c +@@ -46,7 +46,7 @@ + #include "mount.h" + #include "overlayfs.h" + +-extern char *program_name; ++extern const char *program_name; + + struct ovl_fs ofs = {}; + int flags = 0; /* user input option flags */ +diff --git a/main.c b/main.c +index ea0f5a5..1a8b239 100644 +--- a/main.c ++++ b/main.c +@@ -28,7 +28,7 @@ + bool verbose; + bool brief; + bool ignore; +-extern char *program_name; ++extern const char *program_name; + + #ifndef __GLIBC__ + /* diff --git a/sources/meta-openembedded/meta-filesystems/recipes-utils/overlayfs/overlayfs-tools_git.bb b/sources/meta-openembedded/meta-filesystems/recipes-utils/overlayfs/overlayfs-tools_git.bb deleted file mode 100644 index 47613207..00000000 --- a/sources/meta-openembedded/meta-filesystems/recipes-utils/overlayfs/overlayfs-tools_git.bb +++ /dev/null @@ -1,28 +0,0 @@ -DESCRIPTION = "Maintenance tools for OverlayFS" -HOMEPAGE = "https://github.com/kmxz/overlayfs-tools" -LICENSE = "WTFPL" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=f312a7c4d02230e8f2b537295d375c69" - -SRC_URI = "\ - git://github.com/kmxz/overlayfs-tools.git;protocol=https;branch=master \ -" - -PV = "1.0+git" -SRCREV = "b5e5a829895ac98ccfe4629fbfbd8b819262bd00" - -S = "${WORKDIR}/git" -B = "${S}" - -# Required to have the fts.h header for musl -DEPENDS:append:libc-musl = " fts" - -EXTRA_OEMAKE += "'CC=${CC} -O2'" -# Fix the missing fts libs when using musl -EXTRA_OEMAKE:append:libc-musl = " LDLIBS=-lfts" -TARGET_CC_ARCH += "${LDFLAGS}" - -do_install () { - install -d ${D}${bindir} - install -m 0755 ${B}/overlay ${D}${bindir} - install -m 0755 ${B}/fsck.overlay ${D}${bindir} -} diff --git a/sources/meta-openembedded/meta-filesystems/recipes-utils/overlayfs/overlayfs-tools_v2024.07.bb b/sources/meta-openembedded/meta-filesystems/recipes-utils/overlayfs/overlayfs-tools_v2024.07.bb new file mode 100644 index 00000000..d11ee0c4 --- /dev/null +++ b/sources/meta-openembedded/meta-filesystems/recipes-utils/overlayfs/overlayfs-tools_v2024.07.bb @@ -0,0 +1,18 @@ +DESCRIPTION = "Maintenance tools for OverlayFS" +HOMEPAGE = "https://github.com/kmxz/overlayfs-tools" +LICENSE = "WTFPL" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=f312a7c4d02230e8f2b537295d375c69" + +SRC_URI = "\ + git://github.com/kmxz/overlayfs-tools.git;protocol=https;branch=master \ + file://0001-always-use-glibc-basename.patch \ + file://0002-Change-program_name-to-have-const-attribute.patch \ +" + +SRCREV = "7a4a0c4f2c6c86aa46a40e3468e394fd4a237491" + +S = "${WORKDIR}/git" + +inherit meson pkgconfig + +DEPENDS:append:libc-musl = " fts" diff --git a/sources/meta-openembedded/meta-filesystems/recipes-utils/xfsdump/xfsdump_3.1.12.bb b/sources/meta-openembedded/meta-filesystems/recipes-utils/xfsdump/xfsdump_3.1.12.bb deleted file mode 100644 index 9c039491..00000000 --- a/sources/meta-openembedded/meta-filesystems/recipes-utils/xfsdump/xfsdump_3.1.12.bb +++ /dev/null @@ -1,40 +0,0 @@ -SUMMARY = "XFS Filesystem Dump Utility" -DESCRIPTION = "The xfsdump package contains xfsdump, xfsrestore and a \ - number of other utilities for administering XFS filesystems.\ - xfsdump examines files in a filesystem, determines which \ - need to be backed up, and copies those files to a \ - specified disk, tape or other storage medium." -HOMEPAGE = "http://oss.sgi.com/projects/xfs" -SECTION = "base" -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://doc/COPYING;md5=15c832894d10ddd00dfcf57bee490ecc" -DEPENDS = "xfsprogs attr" - -SRC_URI = "https://www.kernel.org/pub/linux/utils/fs/xfs/xfsdump/${BP}.tar.xz \ - file://remove-install-as-user.patch \ - file://0001-include-libgen.h-for-basename-API-prototype.patch \ - ${@bb.utils.contains('DISTRO_FEATURES','usrmerge','file://0001-xfsdump-support-usrmerge.patch','',d)} \ - " -SRC_URI[sha256sum] = "f39c4c1b306b2dd7ec979c0e94d60fe69083d2ecf9af051cac5ef3bed772c74a" - -inherit autotools-brokensep - -PARALLEL_MAKE = "" -PACKAGECONFIG ??= "" -PACKAGECONFIG[gettext] = "--enable-gettext=yes,--enable-gettext=no,gettext" - -CFLAGS += "-D_FILE_OFFSET_BITS=64" -TARGET_CC_ARCH:append:libc-musl = " -D_LARGEFILE64_SOURCE" - -do_configure () { - export DEBUG="-DNDEBUG" - install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S} - install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S} - oe_runconf -} - -do_install () { - export DIST_ROOT=${D} - oe_runmake install - oe_runmake install-dev -} diff --git a/sources/meta-openembedded/meta-filesystems/recipes-utils/xfsdump/xfsdump_3.2.0.bb b/sources/meta-openembedded/meta-filesystems/recipes-utils/xfsdump/xfsdump_3.2.0.bb new file mode 100644 index 00000000..c65344f5 --- /dev/null +++ b/sources/meta-openembedded/meta-filesystems/recipes-utils/xfsdump/xfsdump_3.2.0.bb @@ -0,0 +1,40 @@ +SUMMARY = "XFS Filesystem Dump Utility" +DESCRIPTION = "The xfsdump package contains xfsdump, xfsrestore and a \ + number of other utilities for administering XFS filesystems.\ + xfsdump examines files in a filesystem, determines which \ + need to be backed up, and copies those files to a \ + specified disk, tape or other storage medium." +HOMEPAGE = "http://oss.sgi.com/projects/xfs" +SECTION = "base" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://doc/COPYING;md5=15c832894d10ddd00dfcf57bee490ecc" +DEPENDS = "xfsprogs attr" + +SRC_URI = "https://www.kernel.org/pub/linux/utils/fs/xfs/xfsdump/${BP}.tar.xz \ + file://remove-install-as-user.patch \ + file://0001-include-libgen.h-for-basename-API-prototype.patch \ + ${@bb.utils.contains('DISTRO_FEATURES','usrmerge','file://0001-xfsdump-support-usrmerge.patch','',d)} \ + " +SRC_URI[sha256sum] = "2914dbbe1ebc88c7d93ad88e220aa57dabc43d216e11f06221c01edf3cc10732" + +inherit autotools-brokensep + +PARALLEL_MAKE = "" +PACKAGECONFIG ??= "" +PACKAGECONFIG[gettext] = "--enable-gettext=yes,--enable-gettext=no,gettext" + +CFLAGS += "-D_FILE_OFFSET_BITS=64" +TARGET_CC_ARCH:append:libc-musl = " -D_LARGEFILE64_SOURCE" + +do_configure () { + export DEBUG="-DNDEBUG" + install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S} + install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S} + oe_runconf +} + +do_install () { + export DIST_ROOT=${D} + oe_runmake install + oe_runmake install-dev +} diff --git a/sources/meta-openembedded/meta-filesystems/recipes-utils/xfstests/xfstests_2024.03.03.bb b/sources/meta-openembedded/meta-filesystems/recipes-utils/xfstests/xfstests_2024.03.03.bb index c8a80523..8d997ef6 100644 --- a/sources/meta-openembedded/meta-filesystems/recipes-utils/xfstests/xfstests_2024.03.03.bb +++ b/sources/meta-openembedded/meta-filesystems/recipes-utils/xfstests/xfstests_2024.03.03.bb @@ -58,10 +58,16 @@ do_install() { unionmount_target_dir=${D}${prefix}/xfstests/unionmount-testsuite install -d $unionmount_target_dir/tests - install ${WORKDIR}/unionmount-testsuite/tests/* -t $unionmount_target_dir/tests - install ${WORKDIR}/unionmount-testsuite/*.py -t $unionmount_target_dir - install ${WORKDIR}/unionmount-testsuite/run -t $unionmount_target_dir - install ${WORKDIR}/unionmount-testsuite/README -t $unionmount_target_dir + install ${UNPACKDIR}/unionmount-testsuite/tests/* -t $unionmount_target_dir/tests + install ${UNPACKDIR}/unionmount-testsuite/*.py -t $unionmount_target_dir + install ${UNPACKDIR}/unionmount-testsuite/run -t $unionmount_target_dir + install ${UNPACKDIR}/unionmount-testsuite/README -t $unionmount_target_dir } FILES:${PN} += "${prefix}/xfstests" + +# This one is reproducible only on 32bit MACHINEs +# http://errors.yoctoproject.org/Errors/Details/766963/ +# lstat64.c:65:14: error: passing argument 1 of 'time' from incompatible pointer type [-Wincompatible-pointer-types] +# bstat.c:18:19: error: passing argument 1 of 'ctime' from incompatible pointer type [-Wincompatible-pointer-types] +CFLAGS += "-Wno-error=incompatible-pointer-types" diff --git a/sources/meta-openembedded/meta-gnome/README.md b/sources/meta-openembedded/meta-gnome/README.md index 2125c36d..30113583 100644 --- a/sources/meta-openembedded/meta-gnome/README.md +++ b/sources/meta-openembedded/meta-gnome/README.md @@ -3,14 +3,14 @@ Dependencies This layer depends on: URI: git://git.openembedded.org/openembedded-core -branch: scarthgap +branch: styhead URI: git://git.openembedded.org/meta-openembedded -branch: scarthgap +branch: styhead -Send pull requests to openembedded-devel@lists.openembedded.org with '[meta-gnome][scarthgap]' in the subject' +Send pull requests to openembedded-devel@lists.openembedded.org with '[meta-gnome][styhead]' in the subject' When sending single patches, please using something like: -git send-email -M -1 --to openembedded-devel@lists.openembedded.org --subject-prefix='meta-gnome][scarthgap][PATCH' +git send-email -M -1 --to openembedded-devel@lists.openembedded.org --subject-prefix='meta-gnome][styhead][PATCH' Layer maintainer: Armin Kuster diff --git a/sources/meta-openembedded/meta-gnome/conf/layer.conf b/sources/meta-openembedded/meta-gnome/conf/layer.conf index 75764e64..f831de78 100644 --- a/sources/meta-openembedded/meta-gnome/conf/layer.conf +++ b/sources/meta-openembedded/meta-gnome/conf/layer.conf @@ -17,7 +17,7 @@ LAYERVERSION_gnome-layer = "1" LAYERDEPENDS_gnome-layer = "core openembedded-layer networking-layer meta-python" -LAYERSERIES_COMPAT_gnome-layer = "scarthgap" +LAYERSERIES_COMPAT_gnome-layer = "styhead" SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += "\ faenza-icon-theme->gdk-pixbuf \ diff --git a/sources/meta-openembedded/meta-gnome/dynamic-layers/meta-security/recipes-gnome/gnome-remote-desktop/gnome-remote-desktop_46.2.bb b/sources/meta-openembedded/meta-gnome/dynamic-layers/meta-security/recipes-gnome/gnome-remote-desktop/gnome-remote-desktop_46.2.bb index 59ae9383..a16a02aa 100644 --- a/sources/meta-openembedded/meta-gnome/dynamic-layers/meta-security/recipes-gnome/gnome-remote-desktop/gnome-remote-desktop_46.2.bb +++ b/sources/meta-openembedded/meta-gnome/dynamic-layers/meta-security/recipes-gnome/gnome-remote-desktop/gnome-remote-desktop_46.2.bb @@ -4,7 +4,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" GNOMEBASEBUILDCLASS = "meson" -inherit gnomebase gettext gsettings features_check useradd +inherit gnomebase gettext gsettings features_check REQUIRED_DISTRO_FEATURES = "opengl polkit" @@ -36,15 +36,5 @@ PACKAGECONFIG[vnc] = "-Dvnc=true,-Dvnc=false,libvncserver" PACKAGECONFIG[rdp] = "-Drdp=true,-Drdp=false,freerdp3 fuse3 libxkbcommon" PACKAGECONFIG[systemd] = "-Dsystemd=true,-Dsystemd=false,systemd" -USERADD_PACKAGES = "${PN}" -USERADD_PARAM:${PN} = "--system --no-create-home --user-group --home-dir ${sysconfdir}/polkit-1 polkitd" - -do_install:append() { - if [ -d ${D}${datadir}/polkit-1/rules.d ]; then - chmod 700 ${D}${datadir}/polkit-1/rules.d - chown polkitd:root ${D}${datadir}/polkit-1/rules.d - fi -} - PACKAGE_DEBUG_SPLIT_STYLE = "debug-without-src" FILES:${PN} += "${systemd_user_unitdir} ${systemd_system_unitdir} ${datadir} ${libdir}/sysusers.d ${libdir}/tmpfiles.d" diff --git a/sources/meta-openembedded/meta-gnome/dynamic-layers/meta-virtualization/recipes-gnome/gnome-boxes/gnome-boxes_46.0.bb b/sources/meta-openembedded/meta-gnome/dynamic-layers/meta-virtualization/recipes-gnome/gnome-boxes/gnome-boxes_46.0.bb deleted file mode 100644 index 44fdd2db..00000000 --- a/sources/meta-openembedded/meta-gnome/dynamic-layers/meta-virtualization/recipes-gnome/gnome-boxes/gnome-boxes_46.0.bb +++ /dev/null @@ -1,41 +0,0 @@ -SUMMARY = "A simple GNOME application to access virtual machines." -SECTION = "network" -LICENSE = "LGPL-2.1-or-later" -LIC_FILES_CHKSUM = "file://copyright;md5=a65e9b0c9f78617732f09f68fc4ef79a" - -GNOMEBASEBUILDCLASS = "meson" - -REQUIRED_DISTRO_FEATURES += "gobject-introspection-data" - -DEPENDS = " \ - glib-2.0 \ - desktop-file-utils-native \ - libarchive \ - libgudev \ - libhandy \ - libosinfo \ - libportal \ - libsecret \ - libsoup \ - libvirt-glib \ - mtools \ - spice-gtk \ - tracker \ - webkitgtk3 \ - appstream-glib-native \ - spice-protocol \ - yelp-tools \ -" - -RDEPENDS:${PN} = "glib-2.0-dev libvirt-virsh qemu-common qemu-system-x86-64 genisoimage" - -inherit gnomebase gsettings pkgconfig mime-xdg gtk-icon-cache gobject-introspection vala features_check - -SRC_URI[archive.sha256sum] = "67eeb5e989294958b25c397cfc5615ff65f44315c700010f0b9e336e6f3407cb" - -GIR_MESON_OPTION = "" -VALA_MESON_OPTION = "" - -FILES:${PN} += "${datadir}" - -INSANE_SKIP:${PN} = "dev-deps" diff --git a/sources/meta-openembedded/meta-gnome/dynamic-layers/meta-virtualization/recipes-gnome/gnome-boxes/gnome-boxes_46.1.bb b/sources/meta-openembedded/meta-gnome/dynamic-layers/meta-virtualization/recipes-gnome/gnome-boxes/gnome-boxes_46.1.bb new file mode 100644 index 00000000..6272065d --- /dev/null +++ b/sources/meta-openembedded/meta-gnome/dynamic-layers/meta-virtualization/recipes-gnome/gnome-boxes/gnome-boxes_46.1.bb @@ -0,0 +1,43 @@ +SUMMARY = "A simple GNOME application to access virtual machines." +SECTION = "network" +LICENSE = "LGPL-2.1-or-later" +LIC_FILES_CHKSUM = "file://copyright;md5=a65e9b0c9f78617732f09f68fc4ef79a" + +GNOMEBASEBUILDCLASS = "meson" + +REQUIRED_DISTRO_FEATURES += "gobject-introspection-data" + +DEPENDS = " \ + glib-2.0 \ + desktop-file-utils-native \ + libarchive \ + libgudev \ + libhandy \ + libosinfo \ + libportal \ + libsecret \ + libsoup \ + libvirt-glib \ + mtools \ + spice-gtk \ + tracker \ + webkitgtk3 \ + appstream-glib-native \ + spice-protocol \ + yelp-tools \ +" + +RDEPENDS:${PN} = "glib-2.0-dev libvirt-virsh qemu-common qemu-system-x86-64 genisoimage" + +inherit gnomebase gsettings pkgconfig mime-xdg gtk-icon-cache gobject-introspection vala features_check + +SRC_URI[archive.sha256sum] = "900c177f6762640370a6634cf9e7d3cd8207e498367a8a667a6b731b04116036" + +GIR_MESON_OPTION = "" +VALA_MESON_OPTION = "" + +CFLAGS += "-Wno-int-conversion" + +FILES:${PN} += "${datadir}" + +INSANE_SKIP:${PN} = "dev-deps" diff --git a/sources/meta-openembedded/meta-gnome/recipes-connectivity/folks/folks_0.15.8.bb b/sources/meta-openembedded/meta-gnome/recipes-connectivity/folks/folks_0.15.8.bb deleted file mode 100644 index 4d268171..00000000 --- a/sources/meta-openembedded/meta-gnome/recipes-connectivity/folks/folks_0.15.8.bb +++ /dev/null @@ -1,28 +0,0 @@ -SUMMARY = "Folks is a contact aggregation library." -LICENSE = "LGPL-2.1-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=2d5025d4aa3495befef8f17206a5b0a1" - -DEPENDS = " \ - glib-2.0 \ - libgee \ -" - -EXTRA_OEMESON += "-Dtests=false -Db_lto=false " - -CFLAGS:append:toolchain-clang = " -Wno-error=implicit-function-declaration" -# gobject-introspection is mandatory and cannot be configured -REQUIRED_DISTRO_FEATURES = "gobject-introspection-data" -GIR_MESON_OPTION = "" - -PACKAGECONFIG[eds] = "-Deds_backend=true,-Deds_backend=false,evolution-data-server" -PACKAGECONFIG[bluez] = "-Dbluez_backend=true,-Dbluez_backend=false,evolution-data-server" -PACKAGECONFIG[ofono] = "-Deds_backend=true -Dofono_backend=true,-Dofono_backend=false,evolution-data-server" -PACKAGECONFIG[telepathy] = "-Dtelepathy_backend=true,-Dtelepathy_backend=false,telepathy-glib dbus-glib" -PACKAGECONFIG[import_tool] = "-Dimport_tool=true,-Dimport_tool=false,libxml2" -PACKAGECONFIG[inspect_tool] = "-Dinspect_tool=true,-Dinspect_tool=false" - -PACKAGECONFIG ??= "" - -inherit pkgconfig gnomebase gettext gobject-introspection vala features_check - -SRC_URI[archive.sha256sum] = "954a6afb3e378f01d310fd443790f235cb0eb71e2139cff4f05f09ab725e49c2" diff --git a/sources/meta-openembedded/meta-gnome/recipes-connectivity/folks/folks_0.15.9.bb b/sources/meta-openembedded/meta-gnome/recipes-connectivity/folks/folks_0.15.9.bb new file mode 100644 index 00000000..899b8da2 --- /dev/null +++ b/sources/meta-openembedded/meta-gnome/recipes-connectivity/folks/folks_0.15.9.bb @@ -0,0 +1,28 @@ +SUMMARY = "Folks is a contact aggregation library." +LICENSE = "LGPL-2.1-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=2d5025d4aa3495befef8f17206a5b0a1" + +DEPENDS = " \ + glib-2.0 \ + libgee \ +" + +EXTRA_OEMESON += "-Dtests=false -Db_lto=false " + +CFLAGS:append:toolchain-clang = " -Wno-error=implicit-function-declaration" +# gobject-introspection is mandatory and cannot be configured +REQUIRED_DISTRO_FEATURES = "gobject-introspection-data" +GIR_MESON_OPTION = "" + +PACKAGECONFIG[eds] = "-Deds_backend=true,-Deds_backend=false,evolution-data-server" +PACKAGECONFIG[bluez] = "-Dbluez_backend=true,-Dbluez_backend=false,evolution-data-server" +PACKAGECONFIG[ofono] = "-Deds_backend=true -Dofono_backend=true,-Dofono_backend=false,evolution-data-server" +PACKAGECONFIG[telepathy] = "-Dtelepathy_backend=true,-Dtelepathy_backend=false,telepathy-glib dbus-glib" +PACKAGECONFIG[import_tool] = "-Dimport_tool=true,-Dimport_tool=false,libxml2" +PACKAGECONFIG[inspect_tool] = "-Dinspect_tool=true,-Dinspect_tool=false" + +PACKAGECONFIG ??= "" + +inherit pkgconfig gnomebase gettext gobject-introspection vala features_check + +SRC_URI[archive.sha256sum] = "2311b37355c351f33f163fdc394874a22a0a0682c319493d6d8a6e420711415f" diff --git a/sources/meta-openembedded/meta-gnome/recipes-connectivity/geary/geary/0001-application-client.vala-hardcode-some-paths.patch b/sources/meta-openembedded/meta-gnome/recipes-connectivity/geary/geary/0001-application-client.vala-hardcode-some-paths.patch new file mode 100644 index 00000000..8162e50d --- /dev/null +++ b/sources/meta-openembedded/meta-gnome/recipes-connectivity/geary/geary/0001-application-client.vala-hardcode-some-paths.patch @@ -0,0 +1,40 @@ +From 98243ca43e40116c22f7b867e32ad27ffd314505 Mon Sep 17 00:00:00 2001 +From: Markus Volk +Date: Tue, 16 Jul 2024 07:30:09 +0200 +Subject: [PATCH] application-client.vala: hardcode some paths + +Otherwise the build values will be stored in the binary and used if geary was not installed +https://gitlab.gnome.org/GNOME/geary/-/blob/main/src/client/application/application-client.vala?ref_type=heads#L798 +https://gitlab.gnome.org/GNOME/geary/-/blob/main/src/client/application/application-client.vala?ref_type=heads#L365 + +This breaks reproducibility +WARNING: geary-46.0-r0 do_package_qa: QA Issue: File /usr/lib/geary/libgeary-client-46.0.so in package geary contains reference to TMPDIR [buildpaths] +WARNING: geary-46.0-r0 do_package_qa: QA Issue: File /usr/lib/geary/.debug/libgeary-client-46.0.so in package geary-dbg contains reference to TMPDIR [buildpaths] + +Upstream-Status: Inappropriate [oe-specific] + +Signed-off-by: Markus Volk +--- + src/client/application/application-client.vala | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/client/application/application-client.vala b/src/client/application/application-client.vala +index 51d0f632e..acc53a65f 100644 +--- a/src/client/application/application-client.vala ++++ b/src/client/application/application-client.vala +@@ -39,9 +39,9 @@ public class Application.Client : Gtk.Application { + + public const string VERSION = _VERSION; + public const string INSTALL_PREFIX = _INSTALL_PREFIX; +- public const string GSETTINGS_DIR = _GSETTINGS_DIR; +- public const string SOURCE_ROOT_DIR = _SOURCE_ROOT_DIR; +- public const string BUILD_ROOT_DIR = _BUILD_ROOT_DIR; ++ public const string GSETTINGS_DIR = "/usr/share/applications"; ++ public const string SOURCE_ROOT_DIR = "/usr/src"; ++ public const string BUILD_ROOT_DIR = "/usr/src"; + + // keep these in sync with meson_options.txt + public const string PROFILE_RELEASE = "release"; +-- +2.45.2 + diff --git a/sources/meta-openembedded/meta-gnome/recipes-connectivity/geary/geary/0001-meson-Use-PKG_CONFIG_SYSROOT_DIR-when-using-pkg-conf.patch b/sources/meta-openembedded/meta-gnome/recipes-connectivity/geary/geary/0001-meson-Use-PKG_CONFIG_SYSROOT_DIR-when-using-pkg-conf.patch deleted file mode 100644 index 1e0640a6..00000000 --- a/sources/meta-openembedded/meta-gnome/recipes-connectivity/geary/geary/0001-meson-Use-PKG_CONFIG_SYSROOT_DIR-when-using-pkg-conf.patch +++ /dev/null @@ -1,51 +0,0 @@ -From a300be5877f35379bb569313eec901bda9c8d762 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sun, 30 Apr 2023 22:08:39 -0700 -Subject: [PATCH] meson: Use PKG_CONFIG_SYSROOT_DIR when using pkg-config - -OE cross-builds and absolute paths found by pkg-config points to -non-sysroot'ed locations which are not correct as they point into native -sysroot from build machine which is incorrect. - -Upstream-Status: Inappropriate [OE-specific] -Signed-off-by: Khem Raj ---- - meson.build | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) - -diff --git a/meson.build b/meson.build -index d563dd08..9b72aeb4 100644 ---- a/meson.build -+++ b/meson.build -@@ -38,6 +38,9 @@ metadata_dir = meson.project_source_root() / 'bindings'/ 'metadata' - po_dir = meson.project_source_root() / 'po' - vapi_dir = meson.project_source_root() / 'bindings' / 'vapi' - -+# pkg-config sysroot location -+pkgconf_sysroot = run_command('python3', '-c', 'import os; print(os.environ.get("PKG_CONFIG_SYSROOT_DIR"))').stdout().strip() -+ - # Compiler configuration - add_project_arguments([ - # Make sure Meson can find custom VAPIs -@@ -120,7 +123,7 @@ icu_uc = declare_dependency( - if libunwind_dep.found() - # We need to add native lib to the search path for these so Flatpak - # builds can find it. -- unwind_lib = libunwind_dep.get_variable(pkgconfig: 'libdir') -+ unwind_lib = pkgconf_sysroot + libunwind_dep.get_variable(pkgconfig: 'libdir') - libunwind = declare_dependency( - dependencies: [ - valac.find_library('libunwind', dirs: [vapi_dir, unwind_lib]), -@@ -207,8 +210,7 @@ vala_unit_proj = subproject( - vala_unit_dep = vala_unit_proj.get_variable('vala_unit_dep') - - # Language detection -- --iso_codes_dir = iso_codes.get_variable(pkgconfig: 'prefix')/'share'/'xml'/'iso-codes' -+iso_codes_dir = pkgconf_sysroot + iso_codes.get_variable(pkgconfig: 'prefix')/'share'/'xml'/'iso-codes' - - iso_639_xml = get_option('iso_639_xml') - if iso_639_xml == '' --- -2.40.1 - diff --git a/sources/meta-openembedded/meta-gnome/recipes-connectivity/geary/geary_44.1.bb b/sources/meta-openembedded/meta-gnome/recipes-connectivity/geary/geary_44.1.bb deleted file mode 100644 index 93cad3fc..00000000 --- a/sources/meta-openembedded/meta-gnome/recipes-connectivity/geary/geary_44.1.bb +++ /dev/null @@ -1,62 +0,0 @@ -SUMMARY = "Geary is an email application built around conversations, for the GNOME 3 desktop." -SECTION = "network" -LICENSE = "LGPL-2.1-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=2a2244d5a13871ad950c55877546a6a2" - -DEPENDS = " \ - appstream-glib \ - cairo \ - desktop-file-utils-native \ - enchant2 \ - evolution-data-server \ - folks \ - gcr3 \ - gmime \ - gnome-online-accounts \ - gsound \ - gspell \ - gtk+3 \ - icu \ - iso-codes \ - itstool-native \ - json-glib \ - libhandy \ - libical \ - libpeas \ - libsecret \ - libstemmer \ - libxml2 \ - sqlite3 \ - webkitgtk3 \ -" - -RDEPENDS:${PN} = "gnome-keyring" - -inherit meson pkgconfig mime-xdg gtk-icon-cache gobject-introspection vala features_check - -SRC_URI = " \ - git://github.com/GNOME/geary.git;nobranch=1;protocol=https \ - file://0001-meson-Use-PKG_CONFIG_SYSROOT_DIR-when-using-pkg-conf.patch \ -" - -S = "${WORKDIR}/git" -SRCREV = "37c378a563d5b1c269d57c34671edc940d1cd180" - -ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" -REQUIRED_DISTRO_FEATURES = "gobject-introspection-data opengl" - -GIR_MESON_OPTION = "" -EXTRA_OEMESON = "-Dprofile=release" - -PACKAGECONFIG[libunwind] = "-Dlibunwind=enabled,-Dlibunwind=disabled,libunwind" -PACKAGECONFIG[tnef] = "-Dtnef=enabled,-Dtnef=disabled,libytnef" -PACKAGECONFIG[valadoc] = "-Dvaladoc=enabled,-Dvaladoc=disabled" - -PACKAGECONFIG ??= "" -# rfc822/rfc822-message.c:2097:12: error: incompatible pointer to integer conversion returning 'void *' from a function with result type 'gboolean' (aka 'int') [-Wint-conversion] -#| return NULL; -#| ^~~~ -CFLAGS:append:toolchain-clang = " -Wno-error=int-conversion" - -FILES:${PN} += "${datadir}" - diff --git a/sources/meta-openembedded/meta-gnome/recipes-connectivity/geary/geary_46.0.bb b/sources/meta-openembedded/meta-gnome/recipes-connectivity/geary/geary_46.0.bb new file mode 100644 index 00000000..2ca27c4f --- /dev/null +++ b/sources/meta-openembedded/meta-gnome/recipes-connectivity/geary/geary_46.0.bb @@ -0,0 +1,59 @@ +SUMMARY = "Geary is an email application built around conversations, for the GNOME 3 desktop." +SECTION = "network" +LICENSE = "LGPL-2.1-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=2a2244d5a13871ad950c55877546a6a2" + +DEPENDS = " \ + appstream-glib \ + cairo \ + desktop-file-utils-native \ + enchant2 \ + evolution-data-server \ + folks \ + gcr3 \ + gmime \ + gnome-online-accounts \ + gsound \ + gspell \ + gtk+3 \ + icu \ + iso-codes \ + itstool-native \ + json-glib \ + libhandy \ + libical \ + libpeas \ + libsecret \ + libsoup \ + libstemmer \ + libxml2 \ + sqlite3 \ + webkitgtk3 \ +" + +RDEPENDS:${PN} = "gnome-keyring" + +inherit meson pkgconfig mime-xdg gsettings gtk-icon-cache gobject-introspection vala features_check + +SRC_URI = " \ + git://github.com/GNOME/geary.git;nobranch=1;protocol=https \ + file://0001-application-client.vala-hardcode-some-paths.patch \ +" + +S = "${WORKDIR}/git" +SRCREV = "46e93c0c0dafc381e8a308b1befb07e908121722" + +ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" +REQUIRED_DISTRO_FEATURES = "gobject-introspection-data opengl" + +GIR_MESON_OPTION = "" +EXTRA_OEMESON = "-Dprofile=release" + +PACKAGECONFIG[libunwind] = "-Dlibunwind=enabled,-Dlibunwind=disabled,libunwind" +PACKAGECONFIG[tnef] = "-Dtnef=enabled,-Dtnef=disabled,libytnef" +PACKAGECONFIG[valadoc] = "-Dvaladoc=enabled,-Dvaladoc=disabled" + +PACKAGECONFIG ??= "" + +FILES:${PN} += "${datadir}" + diff --git a/sources/meta-openembedded/meta-gnome/recipes-extended/polkit-gnome/polkit-gnome_0.105.bb b/sources/meta-openembedded/meta-gnome/recipes-extended/polkit-gnome/polkit-gnome_0.105.bb index e0e4a59d..af1a7d86 100644 --- a/sources/meta-openembedded/meta-gnome/recipes-extended/polkit-gnome/polkit-gnome_0.105.bb +++ b/sources/meta-openembedded/meta-gnome/recipes-extended/polkit-gnome/polkit-gnome_0.105.bb @@ -24,6 +24,6 @@ S = "${WORKDIR}/git" do_install:append() { install -d ${D}${datadir}/applications - install -m644 ${WORKDIR}/polkit-gnome-authentication-agent-1.desktop \ + install -m644 ${UNPACKDIR}/polkit-gnome-authentication-agent-1.desktop \ ${D}${datadir}/applications } diff --git a/sources/meta-openembedded/meta-gnome/recipes-gimp/gimp/gimp/0001-file-tiff-load-fix-mismatching-variable-type.patch b/sources/meta-openembedded/meta-gnome/recipes-gimp/gimp/gimp/0001-file-tiff-load-fix-mismatching-variable-type.patch new file mode 100644 index 00000000..13b3dda1 --- /dev/null +++ b/sources/meta-openembedded/meta-gnome/recipes-gimp/gimp/gimp/0001-file-tiff-load-fix-mismatching-variable-type.patch @@ -0,0 +1,24 @@ +From a2458f1528e5733574bb26ff5452b1329116e6db Mon Sep 17 00:00:00 2001 +From: Simon Budig +Date: Sat, 20 May 2023 18:40:41 +0200 +Subject: [PATCH] file-tiff-load: fix mismatching variable type + +Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/gimp/-/commit/a2458f1528e5733574bb26ff5452b1329116e6db] +Signed-off-by: Khem Raj +--- + plug-ins/file-tiff/file-tiff-load.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/plug-ins/file-tiff/file-tiff-load.c ++++ b/plug-ins/file-tiff/file-tiff-load.c +@@ -1301,8 +1301,8 @@ load_image (GFile *file, + + /* any resolution info in the file? */ + { +- gfloat xres = 72.0; +- gfloat yres = 72.0; ++ gdouble xres = 72.0; ++ gdouble yres = 72.0; + gushort read_unit; + GimpUnit unit = GIMP_UNIT_PIXEL; /* invalid unit */ + diff --git a/sources/meta-openembedded/meta-gnome/recipes-gimp/gimp/gimp/0001-gimptool-allow-default-CC-override.patch b/sources/meta-openembedded/meta-gnome/recipes-gimp/gimp/gimp/0001-gimptool-allow-default-CC-override.patch new file mode 100644 index 00000000..b04a16ce --- /dev/null +++ b/sources/meta-openembedded/meta-gnome/recipes-gimp/gimp/gimp/0001-gimptool-allow-default-CC-override.patch @@ -0,0 +1,85 @@ +From 7e5b986cb7797a6535fe2471b9a5fb7c00821f51 Mon Sep 17 00:00:00 2001 +From: Yoann Congal +Date: Sun, 13 Oct 2024 01:00:10 +0200 +Subject: [PATCH] gimptool: allow default CC override + +From: Yoann Congal + +In OE, CC contains sysroot path. Storing CC in binary then leads to +non-reproducibility. + +This commit add a new configure option "--with-default-cc='cmd'" for +force the CC stored in gimptool to a reproducible value. + +Upstream-Status: Inappropriate [does not apply on master (upstream has moved to meson)] +Signed-off-by: Yoann Congal +--- + app-tools/Makefile.am | 2 +- + configure.ac | 13 +++++++++++++ + tools/Makefile.am | 2 +- + tools/gimptool.c | 2 +- + 4 files changed, 16 insertions(+), 3 deletions(-) + +diff --git a/app-tools/Makefile.am b/app-tools/Makefile.am +index a7cd4ce..81a3a00 100644 +--- a/app-tools/Makefile.am ++++ b/app-tools/Makefile.am +@@ -67,7 +67,7 @@ AM_CPPFLAGS = \ + -DMANDIR=\""$(mandir)"\" \ + -DGIMPPLUGINDIR=\""$(gimpplugindir)"\" \ + -DGIMPDATADIR=\""$(gimpdatadir)"\" \ +- -DCC=\""$(CC)"\" \ ++ -DDEFAULT_CC=\""@DEFAULT_CC@"\" \ + -DGIMPDIR=\""$(gimpdir)"\" \ + -DGIMP_PLUGIN_VERSION=\""$(GIMP_PLUGIN_VERSION)"\" \ + -I$(top_srcdir) \ +diff --git a/configure.ac b/configure.ac +index a88b7cc..d90b6db 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -2457,6 +2457,19 @@ fi + AM_CONDITIONAL(DESKTOP_DATADIR, test "x$with_desktop_dir" != xno) + AC_SUBST(DESKTOP_DATADIR) + ++###################### ++# Determine default CC ++###################### ++ ++AC_ARG_WITH(default-cc, [ --with-default-cc="cmd" default CC to print in gimptool (default=CC)]) ++ ++if test "x$with_default_cc" != x; then ++ DEFAULT_CC=$with_default_cc ++else ++ DEFAULT_CC=CC ++fi ++ ++AC_SUBST(DEFAULT_CC) + + ##################### + # Check for XML tools +diff --git a/tools/Makefile.am b/tools/Makefile.am +index 420b9b1..ccabde8 100644 +--- a/tools/Makefile.am ++++ b/tools/Makefile.am +@@ -87,7 +87,7 @@ AM_CPPFLAGS = \ + -DMANDIR=\""$(mandir)"\" \ + -DGIMPPLUGINDIR=\""$(gimpplugindir)"\" \ + -DGIMPDATADIR=\""$(gimpdatadir)"\" \ +- -DCC=\""$(CC)"\" \ ++ -DDEFAULT_CC=\""@DEFAULT_CC@"\" \ + -DGIMPDIR=\""$(gimpdir)"\" \ + -DGIMP_PLUGIN_VERSION=\""$(GIMP_PLUGIN_VERSION)"\" \ + -I$(top_srcdir) \ +diff --git a/tools/gimptool.c b/tools/gimptool.c +index 21fc043..bbf3fa5 100644 +--- a/tools/gimptool.c ++++ b/tools/gimptool.c +@@ -280,7 +280,7 @@ find_out_env_flags (void) + else if (msvc_syntax) + env_cc = "cl -MD"; + else +- env_cc = CC; ++ env_cc = DEFAULT_CC; + + if (g_ascii_strncasecmp (env_cc, "cl", 2) == 0 && + g_ascii_strncasecmp (env_cc, "clang", 5) != 0) diff --git a/sources/meta-openembedded/meta-gnome/recipes-gimp/gimp/gimp/0001-metadata-shut-up-a-weird-warning.patch b/sources/meta-openembedded/meta-gnome/recipes-gimp/gimp/gimp/0001-metadata-shut-up-a-weird-warning.patch new file mode 100644 index 00000000..4f04ac82 --- /dev/null +++ b/sources/meta-openembedded/meta-gnome/recipes-gimp/gimp/gimp/0001-metadata-shut-up-a-weird-warning.patch @@ -0,0 +1,22 @@ +From 51311f913d9f417d121f59b83d560c7b4b853d1c Mon Sep 17 00:00:00 2001 +From: Simon Budig +Date: Sat, 20 May 2023 22:25:40 +0200 +Subject: [PATCH] metadata: shut up a weird warning + +Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/gimp/-/commit/51311f913d9f417d121f59b83d560c7b4b853d1c] +Signed-off-by: Khem Raj +--- + plug-ins/metadata/metadata-editor.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/plug-ins/metadata/metadata-editor.c ++++ b/plug-ins/metadata/metadata-editor.c +@@ -2140,7 +2140,7 @@ metadata_dialog_editor_set_metadata (GEx + } + else + { +- if (! g_strv_contains (values, equiv_values[evi])) ++ if (! g_strv_contains ((const gchar * const *) values, equiv_values[evi])) + { + gchar *tmpvalue; + diff --git a/sources/meta-openembedded/meta-gnome/recipes-gimp/gimp/gimp_2.10.36.bb b/sources/meta-openembedded/meta-gnome/recipes-gimp/gimp/gimp_2.10.36.bb deleted file mode 100644 index 4526839a..00000000 --- a/sources/meta-openembedded/meta-gnome/recipes-gimp/gimp/gimp_2.10.36.bb +++ /dev/null @@ -1,72 +0,0 @@ -SUMMARY = "The GIMP is the GNU Image Manipulation Program" -HOMEPAGE = "http://www.gimp.org" -SECTION = "x11/graphics" -LICENSE = "GPL-3.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=c678957b0c8e964aa6c70fd77641a71e" - -DEPENDS = " \ - alsa-lib \ - atk \ - cairo \ - fontconfig \ - freetype \ - gdk-pixbuf-native \ - intltool-native \ - libxslt-native \ - gegl-native \ - dbus-glib \ - gtk+ \ - babl \ - gegl \ - libmypaint \ - mypaint-brushes-1.0 \ - gexiv2 \ - jpeg \ - libmng \ - libpng \ - libexif \ - tiff \ - lcms \ - poppler \ - poppler-data \ - jasper \ - bzip2 \ - libgudev \ - libmng \ - ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'libxmu libxpm', '', d)} \ -" -DEPENDS:append:libc-musl = " libexecinfo" - -GNOMEBASEBUILDCLASS = "autotools" -inherit features_check gnomebase gtk-icon-cache gtk-doc mime-xdg - -REQUIRED_DISTRO_FEATURES = "x11" - -SHPV = "${@gnome_verdir("${PV}")}" - -SRC_URI = "https://download.gimp.org/pub/${BPN}/v${SHPV}/${BP}.tar.bz2 \ - file://0001-configure-Keep-first-line-of-compiler-version-string.patch \ - file://0001-libtool-Do-not-add-build-time-library-paths-to-LD_LI.patch" -SRC_URI[sha256sum] = "3d3bc3c69a4bdb3aea9ba2d5385ed98ea03953f3857aafd1d6976011ed7cdbb2" - -EXTRA_OECONF = "--disable-python \ - --without-webkit \ - --disable-check-update \ - --without-wmf" - -EXTRA_OECONF += "${@oe.utils.conditional('SITEINFO_BITS', '32', ' --disable-vector-icons', '', d)}" - -do_configure:append() { - find ${B} -name Makefile | xargs sed -i s:'-I$(includedir)':'-I.':g - find ${B} -name Makefile | xargs sed -i s:'-I/usr/include':'-I${STAGING_INCDIR}':g -} - -do_compile:prepend() { - # Let native babl/gegl find their plugins - export BABL_PATH=`find ${STAGING_LIBDIR_NATIVE} -maxdepth 1 -name 'babl-*'` - export GEGL_PATH=`find ${STAGING_LIBDIR_NATIVE} -maxdepth 1 -name 'gegl-*'` -} - -FILES:${PN} += "${datadir}/metainfo" - -RDEPENDS:${PN} += "mypaint-brushes-1.0" diff --git a/sources/meta-openembedded/meta-gnome/recipes-gimp/gimp/gimp_2.10.38.bb b/sources/meta-openembedded/meta-gnome/recipes-gimp/gimp/gimp_2.10.38.bb new file mode 100644 index 00000000..0272e05e --- /dev/null +++ b/sources/meta-openembedded/meta-gnome/recipes-gimp/gimp/gimp_2.10.38.bb @@ -0,0 +1,101 @@ +SUMMARY = "The GIMP is the GNU Image Manipulation Program" +HOMEPAGE = "http://www.gimp.org" +SECTION = "x11/graphics" +LICENSE = "GPL-3.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=c678957b0c8e964aa6c70fd77641a71e" + +DEPENDS = " \ + alsa-lib \ + atk \ + cairo \ + fontconfig \ + freetype \ + gdk-pixbuf-native \ + intltool-native \ + libxslt-native \ + gegl-native \ + dbus-glib \ + gtk+ \ + babl \ + gegl \ + libmypaint \ + mypaint-brushes-1.0 \ + gexiv2 \ + jpeg \ + libmng \ + libpng \ + libexif \ + tiff \ + lcms \ + poppler \ + poppler-data \ + jasper \ + bzip2 \ + libgudev \ + libmng \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'libxmu libxpm', '', d)} \ +" +DEPENDS:append:libc-musl = " libexecinfo" + +GNOMEBASEBUILDCLASS = "autotools" +inherit features_check gnomebase gtk-icon-cache gtk-doc mime-xdg + +REQUIRED_DISTRO_FEATURES = "x11" + +SHPV = "${@gnome_verdir("${PV}")}" + +SRC_URI = "https://download.gimp.org/pub/${BPN}/v${SHPV}/${BP}.tar.bz2 \ + file://0001-configure-Keep-first-line-of-compiler-version-string.patch \ + file://0001-libtool-Do-not-add-build-time-library-paths-to-LD_LI.patch \ + file://0001-file-tiff-load-fix-mismatching-variable-type.patch \ + file://0001-metadata-shut-up-a-weird-warning.patch \ + file://0001-gimptool-allow-default-CC-override.patch \ + " +SRC_URI[sha256sum] = "50a845eec11c8831fe8661707950f5b8446e35f30edfb9acf98f85c1133f856e" + +EXTRA_OECONF = "--disable-python \ + --without-webkit \ + --disable-check-update \ + --without-wmf" + +EXTRA_OECONF += "${@oe.utils.conditional('SITEINFO_BITS', '32', ' --disable-vector-icons', '', d)}" + +do_configure:append() { + find ${B} -name Makefile | xargs sed -i s:'-I$(includedir)':'-I.':g + find ${B} -name Makefile | xargs sed -i s:'-I/usr/include':'-I${STAGING_INCDIR}':g +} + +do_compile:prepend() { + # Let native babl/gegl find their plugins + export BABL_PATH=`find ${STAGING_LIBDIR_NATIVE} -maxdepth 1 -name 'babl-*'` + export GEGL_PATH=`find ${STAGING_LIBDIR_NATIVE} -maxdepth 1 -name 'gegl-*'` +} + +FILES:${PN} += "${datadir}/metainfo" + +RDEPENDS:${PN} += "mypaint-brushes-1.0" + + +# gimptool + +# gimptool needs a CC definition, use current CC without sysroot +python __anonymous() { + import shlex + CC_WITHOUT_SYSROOT = shlex.join(filter(lambda x: not x.startswith("--sysroot="), shlex.split(d.getVar("CC")))) + d.setVar("CC_WITHOUT_SYSROOT", CC_WITHOUT_SYSROOT) +} +EXTRA_OECONF += "--with-default-cc='${CC_WITHOUT_SYSROOT}'" + +# Split gimptool in its own package +PACKAGE_BEFORE_PN += "${PN}-gimptool" +FILES:${PN}-gimptool += "${bindir}/gimptool-2.0" + +# gimptool depends on gimp .pc file being installed and tools to build the plugin. +RDEPENDS:${PN}-gimptool += "${PN}-dev packagegroup-core-buildessential" +INSANE_SKIP:${PN}-gimptool += "dev-deps" + + +CVE_STATUS[CVE-2007-3741] = "not-applicable-platform: This only applies for Mandriva Linux" +CVE_STATUS[CVE-2009-0581] = "cpe-incorrect: The current version (2.10.38) is not affected." +CVE_STATUS[CVE-2009-0723] = "cpe-incorrect: The current version (2.10.38) is not affected." +CVE_STATUS[CVE-2009-0733] = "cpe-incorrect: The current version (2.10.38) is not affected." diff --git a/sources/meta-openembedded/meta-gnome/recipes-gnome/devilspie/devilspie2_0.44.bb b/sources/meta-openembedded/meta-gnome/recipes-gnome/devilspie/devilspie2_0.44.bb index 90c12efa..9e641daa 100644 --- a/sources/meta-openembedded/meta-gnome/recipes-gnome/devilspie/devilspie2_0.44.bb +++ b/sources/meta-openembedded/meta-gnome/recipes-gnome/devilspie/devilspie2_0.44.bb @@ -29,7 +29,7 @@ do_compile() { do_install() { oe_runmake DESTDIR="${D}" PREFIX="${prefix}" install install -d ${D}/${sysconfdir}/devilspie2 - install -m 644 ${WORKDIR}/default.lua ${D}/${sysconfdir}/devilspie2 + install -m 644 ${UNPACKDIR}/default.lua ${D}/${sysconfdir}/devilspie2 install -d ${D}/${sysconfdir}/xdg/autostart - install -m 644 ${WORKDIR}/devilspie2.desktop ${D}/${sysconfdir}/xdg/autostart + install -m 644 ${UNPACKDIR}/devilspie2.desktop ${D}/${sysconfdir}/xdg/autostart } diff --git a/sources/meta-openembedded/meta-gnome/recipes-gnome/eog/eog_45.3.bb b/sources/meta-openembedded/meta-gnome/recipes-gnome/eog/eog_45.3.bb deleted file mode 100644 index f3892f82..00000000 --- a/sources/meta-openembedded/meta-gnome/recipes-gnome/eog/eog_45.3.bb +++ /dev/null @@ -1,31 +0,0 @@ -SUMMARY = "This is the Eye of GNOME, an image viewer program." -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" - -DEPENDS = " \ - itstool-native \ - librsvg \ - gnome-desktop \ - gsettings-desktop-schemas \ - gdk-pixbuf \ - gtk+3 \ - libhandy \ - libpeas \ - libportal \ - libexif \ - lcms \ -" - - -inherit gnomebase pkgconfig gsettings gobject-introspection gettext mime-xdg features_check gtk-icon-cache - -# FIXME: whilst eog uses libpeas <2, g-i is needed. This can be removed when libpeas2 is used. -REQUIRED_DISTRO_FEATURES = "opengl gobject-introspection-data" - -SRC_URI[archive.sha256sum] = "8650f662d4921d83a7904f6bb9ca245baf735f717b47fac5b37f0d90e5e891a8" - -GTKDOC_MESON_OPTION = "gtk_doc" - -EXTRA_OEMESON = "-Dxmp=false" - -FILES:${PN} += "${datadir}" diff --git a/sources/meta-openembedded/meta-gnome/recipes-gnome/eog/eog_47.0.bb b/sources/meta-openembedded/meta-gnome/recipes-gnome/eog/eog_47.0.bb new file mode 100644 index 00000000..82a1febe --- /dev/null +++ b/sources/meta-openembedded/meta-gnome/recipes-gnome/eog/eog_47.0.bb @@ -0,0 +1,31 @@ +SUMMARY = "This is the Eye of GNOME, an image viewer program." +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +DEPENDS = " \ + itstool-native \ + librsvg \ + gnome-desktop \ + gsettings-desktop-schemas \ + gdk-pixbuf \ + gtk+3 \ + libhandy \ + libpeas \ + libportal \ + libexif \ + lcms \ +" + + +inherit gnomebase pkgconfig gsettings gobject-introspection gettext mime-xdg features_check gtk-icon-cache + +# FIXME: whilst eog uses libpeas <2, g-i is needed. This can be removed when libpeas2 is used. +REQUIRED_DISTRO_FEATURES = "opengl gobject-introspection-data" + +SRC_URI[archive.sha256sum] = "db5edbf5224d75126a7b7d8ee4e9272a2f30a953331d5baf6d3f3c0ce0cbde66" + +GTKDOC_MESON_OPTION = "gtk_doc" + +EXTRA_OEMESON = "-Dxmp=false" + +FILES:${PN} += "${datadir}" diff --git a/sources/meta-openembedded/meta-gnome/recipes-gnome/evince/evince_46.0.bb b/sources/meta-openembedded/meta-gnome/recipes-gnome/evince/evince_46.0.bb deleted file mode 100644 index 57eb994e..00000000 --- a/sources/meta-openembedded/meta-gnome/recipes-gnome/evince/evince_46.0.bb +++ /dev/null @@ -1,58 +0,0 @@ -SUMMARY = "Evince is a document viewer for document formats like pdf, ps, djvu" -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=96f2f8d5ee576a2163977938ea36fa7b" -SECTION = "x11/office" -DEPENDS = " \ - adwaita-icon-theme \ - appstream-glib \ - cairo \ - desktop-file-utils-native \ - dbus \ - gdk-pixbuf \ - glib-2.0 \ - gnome-common-native \ - gnome-desktop \ - gsettings-desktop-schemas \ - gspell \ - gstreamer1.0-plugins-base \ - gtk+3 \ - libarchive \ - libhandy \ - libsecret \ - libxml2 \ - poppler \ - yelp-tools-native \ - zlib \ -" - - -inherit gnomebase itstool gnome-help pkgconfig gsettings gobject-introspection gettext mime-xdg gi-docgen features_check gtk-icon-cache - -REQUIRED_DISTRO_FEATURES = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'opengl', '', d)}" - -def gnome_verdir(v): - return oe.utils.trim_version(v, 1) - -SRC_URI[archive.sha256sum] = "aff6af69392c04956bfad976dec5d1583b41d5a334e937995f7c3ca0740de221" - -GTKDOC_MESON_OPTION = "gtk_doc" - -PACKAGECONFIG ??= "" -PACKAGECONFIG[nautilus] = "-Dnautilus=true,-Dnautilus=false,nautilus" - -RDEPENDS:${PN} += "glib-2.0-utils" -RRECOMMENDS:${PN} = "adwaita-icon-theme" - -PACKAGES =+ "${PN}-nautilus-extension" - -do_install:prepend() { - sed -i -e 's|${B}/../${PN}-${PV}|${TARGET_DBGSRC_DIR}|g' ${B}/libview/ev-view-type-builtins.c - sed -i -e 's|${B}/../${PN}-${PV}|${TARGET_DBGSRC_DIR}|g' ${B}/libdocument/ev-document-type-builtins.c -} - -FILES:${PN} += "${datadir}/dbus-1 \ - ${datadir}/metainfo \ - ${datadir}/thumbnailers \ - ${systemd_user_unitdir} \ -" -FILES:${PN}-nautilus-extension = "${libdir}/nautilus/*/*so" diff --git a/sources/meta-openembedded/meta-gnome/recipes-gnome/evince/evince_46.3.bb b/sources/meta-openembedded/meta-gnome/recipes-gnome/evince/evince_46.3.bb new file mode 100644 index 00000000..47c0950b --- /dev/null +++ b/sources/meta-openembedded/meta-gnome/recipes-gnome/evince/evince_46.3.bb @@ -0,0 +1,62 @@ +SUMMARY = "Evince is a document viewer for document formats like pdf, ps, djvu" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=96f2f8d5ee576a2163977938ea36fa7b" +SECTION = "x11/office" +DEPENDS = " \ + adwaita-icon-theme \ + appstream-glib \ + cairo \ + desktop-file-utils-native \ + dbus \ + gdk-pixbuf \ + glib-2.0 \ + gnome-common-native \ + gnome-desktop \ + gsettings-desktop-schemas \ + gspell \ + gstreamer1.0-plugins-base \ + gtk+3 \ + libarchive \ + libhandy \ + libsecret \ + libxml2 \ + poppler \ + yelp-tools-native \ + zlib \ +" + + +inherit gnomebase itstool gnome-help pkgconfig gsettings gobject-introspection gettext mime-xdg gi-docgen features_check gtk-icon-cache + +REQUIRED_DISTRO_FEATURES = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'opengl', '', d)}" + +def gnome_verdir(v): + return oe.utils.trim_version(v, 1) + +SRC_URI[archive.sha256sum] = "bc0d1d41b9d7ffc762e99d2abfafacbf745182f0b31d86db5eec8c67f5f3006b" + +GTKDOC_MESON_OPTION = "gtk_doc" + +PACKAGECONFIG ??= "" +PACKAGECONFIG[nautilus] = "-Dnautilus=true,-Dnautilus=false,nautilus" + +RDEPENDS:${PN} += "glib-2.0-utils" +RRECOMMENDS:${PN} = "adwaita-icon-theme" + +PACKAGES =+ "${PN}-nautilus-extension" + +do_install:prepend() { + sed -i -e 's|${B}/../${PN}-${PV}|${TARGET_DBGSRC_DIR}|g' ${B}/libview/ev-view-type-builtins.c + sed -i -e 's|${B}/../${PN}-${PV}|${TARGET_DBGSRC_DIR}|g' ${B}/libdocument/ev-document-type-builtins.c +} + +FILES:${PN} += "${datadir}/dbus-1 \ + ${datadir}/metainfo \ + ${datadir}/thumbnailers \ + ${systemd_user_unitdir} \ +" +FILES:${PN}-nautilus-extension = "${libdir}/nautilus/*/*so" + +CVE_PRODUCT = "evince" +CVE_STATUS[CVE-2011-0433] = "fixed-version: No action required. The current version (46.0) is not affected by the CVE which has been patched since version 3.1.2" +CVE_STATUS[CVE-2011-5244] = "fixed-version: No action required. The current version (46.0) is not affected by the CVE which has been patched since version 3.1.2" diff --git a/sources/meta-openembedded/meta-gnome/recipes-gnome/evolution-data-server/evolution-data-server.bb b/sources/meta-openembedded/meta-gnome/recipes-gnome/evolution-data-server/evolution-data-server.bb index 103bad1b..fc192531 100644 --- a/sources/meta-openembedded/meta-gnome/recipes-gnome/evolution-data-server/evolution-data-server.bb +++ b/sources/meta-openembedded/meta-gnome/recipes-gnome/evolution-data-server/evolution-data-server.bb @@ -58,7 +58,7 @@ LDFLAGS += "-lpthread -lgmodule-2.0 -lgthread-2.0" GI_DATA_ENABLED:libc-musl="False" do_configure:append () { - cp ${WORKDIR}/iconv-detect.h ${S}/src + cp ${UNPACKDIR}/iconv-detect.h ${S}/src # avoid writing perl-native path into csv2vcard shebang sed -i "s|@PERL@|${bindir}/perl|" ${S}/src/tools/addressbook-export/csv2vcard.in } diff --git a/sources/meta-openembedded/meta-gnome/recipes-gnome/faenza-icon-theme/faenza-icon-theme_1.3.bb b/sources/meta-openembedded/meta-gnome/recipes-gnome/faenza-icon-theme/faenza-icon-theme_1.3.bb index 12d344bf..5db94571 100644 --- a/sources/meta-openembedded/meta-gnome/recipes-gnome/faenza-icon-theme/faenza-icon-theme_1.3.bb +++ b/sources/meta-openembedded/meta-gnome/recipes-gnome/faenza-icon-theme/faenza-icon-theme_1.3.bb @@ -6,7 +6,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" inherit allarch gtk-icon-cache -S = "${WORKDIR}" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" SRC_URI = "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/${BPN}/${BPN}_${PV}.zip" SRC_URI[sha256sum] = "d4486fda0413f8a81a87e0dd2329f50f2a8a7cb4147b48cf147f0160add8174a" diff --git a/sources/meta-openembedded/meta-gnome/recipes-gnome/file-roller/file-roller_44.1.bb b/sources/meta-openembedded/meta-gnome/recipes-gnome/file-roller/file-roller_44.1.bb deleted file mode 100644 index 30760387..00000000 --- a/sources/meta-openembedded/meta-gnome/recipes-gnome/file-roller/file-roller_44.1.bb +++ /dev/null @@ -1,46 +0,0 @@ -SUMMARY = "An archive manager utility for the GNOME Environment" -LICENSE="GPL-2.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" - - -DEPENDS = " \ - desktop-file-utils-native \ - glib-2.0-native \ - glib-2.0 \ - json-glib \ - gtk4 \ - libadwaita \ - libarchive \ - libhandy \ - libportal \ -" - -inherit gnomebase gsettings itstool gobject-introspection gnome-help gettext upstream-version-is-even mime-xdg gtk-icon-cache features_check - -REQUIRED_DISTRO_FEATURES = "opengl" - -EXTRA_OEMESON += "-Dintrospection=enabled" - -SRC_URI = "git://gitlab.gnome.org/GNOME/file-roller.git;protocol=https;branch=master" -SRCREV = "299e86c77d8fe600ee6658357e209b15c674397e" -S = "${WORKDIR}/git" - -PACKAGECONFIG ??= "" - -PACKAGECONFIG[nautilus] = "-Dnautilus-actions=enabled,-Dnautilus-actions=disabled,nautilus" -PACKAGECONFIG[packagekit] = "-Dpackagekit=true,-Dpackagekit=false,,packagekit" - -FILES:${PN} += " \ - ${datadir}/dbus-1 \ - ${datadir}/metainfo \ - ${libdir}/nautilus \ -" - -EXTRA_OEMESON += "--cross-file=${WORKDIR}/meson-${PN}.cross" - -do_write_config:append() { - cat >${WORKDIR}/meson-${PN}.cross <${WORKDIR}/meson-${PN}.cross < Date: Mon, 18 Mar 2024 05:50:21 +0100 Subject: [PATCH] Add meson option to pass sysroot @@ -13,14 +13,14 @@ Upstream-Status: Inappropriate [OE specific] 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/meson_options.txt b/meson_options.txt -index f415a7e..8966632 100644 +index b2302bf..5b9baf5 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,3 +1,4 @@ +option('oe_sysroot', type: 'string', value: '', description: 'Directory for OE-sysroot') option('deprecated-declarations', type: 'feature', value: 'disabled', description: 'build with deprecated declaration warnings') option('documentation', type: 'boolean', value: false, description: 'build documentation') - option('location-services', type: 'feature', value: 'disabled', description: 'build with location services') + option('location-services', type: 'feature', value: 'enabled', description: 'build with location services') diff --git a/panels/background/meson.build b/panels/background/meson.build index 6ced050..df1f808 100644 --- a/panels/background/meson.build diff --git a/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-control-center/gnome-control-center_46.1.bb b/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-control-center/gnome-control-center_46.1.bb deleted file mode 100644 index 87daec0c..00000000 --- a/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-control-center/gnome-control-center_46.1.bb +++ /dev/null @@ -1,74 +0,0 @@ -SUMMARY = "GNOME Settings" -DESCRIPTION = "GNOME Settings is GNOME's main interface for configuration of various aspects of your desktop" -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=75859989545e37968a99b631ef42722e" - -GTKIC_VERSION = "4" - -DEPENDS = " \ - accountsservice \ - colord-gtk \ - gcr \ - gdk-pixbuf \ - glib-2.0 \ - gnome-bluetooth \ - gnome-desktop \ - gnome-online-accounts \ - gnome-settings-daemon \ - gsettings-desktop-schemas \ - gtk4 \ - libadwaita \ - libepoxy \ - libgtop \ - libgudev \ - libnma \ - libpwquality \ - libxml2 \ - polkit \ - pulseaudio \ - samba \ - setxkbmap-native \ - tecla \ - udisks2 \ - upower \ -" - -inherit gtk-icon-cache pkgconfig gnomebase gsettings gettext upstream-version-is-even bash-completion features_check useradd - -REQUIRED_DISTRO_FEATURES += "opengl polkit pulseaudio systemd x11" - -SRC_URI += "file://0001-Add-meson-option-to-pass-sysroot.patch" -SRC_URI[archive.sha256sum] = "81792423019deda1d2a074c1ecf6a7e6ef3172c09cbe6f4d7995a4b5dea28312" - -PACKAGECONFIG ??= "ibus ${@bb.utils.filter('DISTRO_FEATURES', 'wayland', d)}" -PACKAGECONFIG[cups] = ",,cups,cups" -PACKAGECONFIG[ibus] = "-Dibus=true, -Dibus=false, ibus" -PACKAGECONFIG[wayland] = "-Dwayland=true, -Dwayland=false, wayland" -PACKAGECONFIG[file-share] = ",,,gnome-user-share" -PACKAGECONFIG[media-share] = ",,,rygel-meta tumbler" - -EXTRA_OEMESON += "-Doe_sysroot=${STAGING_DIR_HOST}" - -export XDG_DATA_DIRS = "${STAGING_DATADIR}" - -USERADD_PACKAGES = "${PN}" -USERADD_PARAM:${PN} = "--system --no-create-home --user-group --home-dir ${sysconfdir}/polkit-1 polkitd" - -do_install:append() { - if [ -d ${D}${datadir}/polkit-1/rules.d ]; then - chmod 700 ${D}${datadir}/polkit-1/rules.d - chown polkitd:root ${D}${datadir}/polkit-1/rules.d - fi -} - -PACKAGE_DEBUG_SPLIT_STYLE = "debug-without-src" - -FILES:${PN} += " \ - ${datadir}/dbus-1 \ - ${datadir}/gnome-shell \ - ${datadir}/metainfo \ -" - -FILES:${PN}-dev += "${datadir}/gettext" - -RDEPENDS:${PN} += "gsettings-desktop-schemas tecla system-config-printer cups-pk-helper" diff --git a/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-control-center/gnome-control-center_46.2.bb b/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-control-center/gnome-control-center_46.2.bb new file mode 100644 index 00000000..ae96caf9 --- /dev/null +++ b/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-control-center/gnome-control-center_46.2.bb @@ -0,0 +1,65 @@ +SUMMARY = "GNOME Settings" +DESCRIPTION = "GNOME Settings is GNOME's main interface for configuration of various aspects of your desktop" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=75859989545e37968a99b631ef42722e" + +GTKIC_VERSION = "4" + +DEPENDS = " \ + accountsservice \ + colord-gtk \ + gcr \ + gdk-pixbuf \ + glib-2.0 \ + gnome-bluetooth \ + gnome-desktop \ + gnome-online-accounts \ + gnome-settings-daemon \ + gsettings-desktop-schemas \ + gtk4 \ + libadwaita \ + libepoxy \ + libgtop \ + libgudev \ + libnma \ + libpwquality \ + libxml2 \ + polkit \ + pulseaudio \ + samba \ + setxkbmap-native \ + tecla \ + udisks2 \ + upower \ +" + +inherit gtk-icon-cache pkgconfig gnomebase gsettings gettext upstream-version-is-even bash-completion features_check + +REQUIRED_DISTRO_FEATURES += "opengl polkit pulseaudio systemd x11" + +SRC_URI += "file://0001-Add-meson-option-to-pass-sysroot.patch" +SRC_URI[archive.sha256sum] = "6335c6cb8164e574db521fff61cfa3dfaa55f1db66ae3bca02750a193e1c4f3d" + +PACKAGECONFIG ??= "ibus ${@bb.utils.filter('DISTRO_FEATURES', 'wayland', d)}" +PACKAGECONFIG[cups] = ",,cups,cups system-config-printer cups-pk-helper" +PACKAGECONFIG[ibus] = "-Dibus=true, -Dibus=false, ibus" +PACKAGECONFIG[wayland] = "-Dwayland=true, -Dwayland=false, wayland" +PACKAGECONFIG[file-share] = ",,,gnome-user-share" +PACKAGECONFIG[media-share] = ",,,rygel-meta tumbler" +PACKAGECONFIG[malcontent] = "-Dmalcontent=true,-Dmalcontent=false,malcontent,malcontent-ui" + +EXTRA_OEMESON += "-Doe_sysroot=${STAGING_DIR_HOST}" + +export XDG_DATA_DIRS = "${STAGING_DATADIR}" + +PACKAGE_DEBUG_SPLIT_STYLE = "debug-without-src" + +FILES:${PN} += " \ + ${datadir}/dbus-1 \ + ${datadir}/gnome-shell \ + ${datadir}/metainfo \ +" + +FILES:${PN}-dev += "${datadir}/gettext" + +RDEPENDS:${PN} += "gsettings-desktop-schemas tecla" diff --git a/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-desktop/gnome-desktop_44.0.bb b/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-desktop/gnome-desktop_44.0.bb deleted file mode 100644 index 19bae74c..00000000 --- a/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-desktop/gnome-desktop_44.0.bb +++ /dev/null @@ -1,48 +0,0 @@ -SUMMARY = "GNOME library for reading .desktop files" -SECTION = "x11/gnome" -LICENSE = "GPL-2.0-only & LGPL-2.0-only" -LIC_FILES_CHKSUM = " \ - file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://COPYING.LIB;md5=5f30f0716dfdd0d91eb439ebec522ec2 \ -" - - -inherit gnomebase itstool pkgconfig upstream-version-is-even gobject-introspection features_check gtk-doc - -REQUIRED_DISTRO_FEATURES = "x11 opengl" - -GIR_MESON_OPTION = "" - -SRC_URI += "file://gnome-desktop-thumbnail-don-t-assume-time_t-is-long.patch \ - file://0001-meson-Add-riscv32-to-seccomp-unsupported-list.patch" -SRC_URI[archive.sha256sum] = "42c773745d84ba14bc1cf1c4c6f4606148803a5cd337941c63964795f3c59d42" - -DEPENDS += " \ - fontconfig \ - gdk-pixbuf \ - glib-2.0 \ - gsettings-desktop-schemas \ - gtk+3 \ - gtk4 \ - iso-codes \ - xext \ - libseccomp \ - libxkbcommon \ - xkeyboard-config \ - xrandr \ -" - -DEPENDS:remove:riscv32 = "libseccomp" - -GTKDOC_MESON_OPTION = "gtk_doc" -EXTRA_OEMESON = "-Ddesktop_docs=false" - -PACKAGES =+ "libgnome-desktop" -RDEPENDS:${PN} += "libgnome-desktop" -FILES:libgnome-desktop = " \ - ${libdir}/lib*${SOLIBS} \ - ${datadir}/libgnome-desktop*/pnp.ids \ - ${datadir}/gnome/*xml \ -" - -RRECOMMENDS:libgnome-desktop += "gsettings-desktop-schemas" diff --git a/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-desktop/gnome-desktop_44.1.bb b/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-desktop/gnome-desktop_44.1.bb new file mode 100644 index 00000000..63847fe3 --- /dev/null +++ b/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-desktop/gnome-desktop_44.1.bb @@ -0,0 +1,48 @@ +SUMMARY = "GNOME library for reading .desktop files" +SECTION = "x11/gnome" +LICENSE = "GPL-2.0-only & LGPL-2.0-only" +LIC_FILES_CHKSUM = " \ + file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://COPYING.LIB;md5=5f30f0716dfdd0d91eb439ebec522ec2 \ +" + + +inherit gnomebase itstool pkgconfig upstream-version-is-even gobject-introspection features_check gtk-doc + +REQUIRED_DISTRO_FEATURES = "x11 opengl" + +GIR_MESON_OPTION = "" + +SRC_URI += "file://gnome-desktop-thumbnail-don-t-assume-time_t-is-long.patch \ + file://0001-meson-Add-riscv32-to-seccomp-unsupported-list.patch" +SRC_URI[archive.sha256sum] = "ae7ca55dc9e08914999741523a17d29ce223915626bd2462a120bf96f47a79ab" + +DEPENDS += " \ + fontconfig \ + gdk-pixbuf \ + glib-2.0 \ + gsettings-desktop-schemas \ + gtk+3 \ + gtk4 \ + iso-codes \ + xext \ + libseccomp \ + libxkbcommon \ + xkeyboard-config \ + xrandr \ +" + +DEPENDS:remove:riscv32 = "libseccomp" + +GTKDOC_MESON_OPTION = "gtk_doc" +EXTRA_OEMESON = "-Ddesktop_docs=false" + +PACKAGES =+ "libgnome-desktop" +RDEPENDS:${PN} += "libgnome-desktop" +FILES:libgnome-desktop = " \ + ${libdir}/lib*${SOLIBS} \ + ${datadir}/libgnome-desktop*/pnp.ids \ + ${datadir}/gnome/*xml \ +" + +RRECOMMENDS:libgnome-desktop += "gsettings-desktop-schemas" diff --git a/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-disk-utility/gnome-disk-utility_46.0.bb b/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-disk-utility/gnome-disk-utility_46.0.bb deleted file mode 100644 index e4998f62..00000000 --- a/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-disk-utility/gnome-disk-utility_46.0.bb +++ /dev/null @@ -1,41 +0,0 @@ -SUMMARY = "GNOME disk utility" -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" - -SECTION = "x11/gnome" - -DEPENDS = " \ - desktop-file-utils-native \ - gtk+3 \ - libdvdread \ - libnotify \ - libsecret \ - libpwquality \ - udisks2 \ - libhandy \ - xz \ -" - - -inherit gnomebase gsettings gtk-icon-cache gettext features_check mime-xdg - -ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" -REQUIRED_DISTRO_FEATURES = "polkit" - -PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd x11', d)}" - -# As soon as elogind is of interest this needs rework: meson option is combo -PACKAGECONFIG[systemd] = "-Dlogind=libsystemd,-Dlogind=none,systemd" -PACKAGECONFIG[x11] = ",,libcanberra" - -SRC_URI:append = " ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'file://0001-gnome-disk-utility-remove-libcanberra-dependency.patch', '', d)}" -SRC_URI[archive.sha256sum] = "464649148c6d6771f1ac2ebfe43a4e519205b11c2d914a09f2a001821d06957d" - -EXTRA_OEMESON = "-Dman=false" - -PACKAGE_DEBUG_SPLIT_STYLE = "debug-without-src" - -FILES:${PN} += " \ - ${datadir}/metainfo \ - ${datadir}/dbus-1 \ -" diff --git a/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-disk-utility/gnome-disk-utility_46.1.bb b/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-disk-utility/gnome-disk-utility_46.1.bb new file mode 100644 index 00000000..6f910c4c --- /dev/null +++ b/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-disk-utility/gnome-disk-utility_46.1.bb @@ -0,0 +1,41 @@ +SUMMARY = "GNOME disk utility" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +SECTION = "x11/gnome" + +DEPENDS = " \ + desktop-file-utils-native \ + gtk+3 \ + libdvdread \ + libnotify \ + libsecret \ + libpwquality \ + udisks2 \ + libhandy \ + xz \ +" + + +inherit gnomebase gsettings gtk-icon-cache gettext features_check mime-xdg + +ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" +REQUIRED_DISTRO_FEATURES = "polkit" + +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd x11', d)}" + +# As soon as elogind is of interest this needs rework: meson option is combo +PACKAGECONFIG[systemd] = "-Dlogind=libsystemd,-Dlogind=none,systemd" +PACKAGECONFIG[x11] = ",,libcanberra" + +SRC_URI:append = " ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'file://0001-gnome-disk-utility-remove-libcanberra-dependency.patch', '', d)}" +SRC_URI[archive.sha256sum] = "c24e9439a04d70bcfae349ca134c7005435fe2b6f452114df878bff0b89bbffe" + +EXTRA_OEMESON = "-Dman=false" + +PACKAGE_DEBUG_SPLIT_STYLE = "debug-without-src" + +FILES:${PN} += " \ + ${datadir}/metainfo \ + ${datadir}/dbus-1 \ +" diff --git a/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-font-viewer/gnome-font-viewer_46.0.bb b/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-font-viewer/gnome-font-viewer_46.0.bb deleted file mode 100644 index dbce71d1..00000000 --- a/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-font-viewer/gnome-font-viewer_46.0.bb +++ /dev/null @@ -1,24 +0,0 @@ -SUMMARY = "GNOME font viewer" -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" - -SECTION = "x11/gnome" - -DEPENDS = " \ - gtk4 \ - gnome-desktop \ - libadwaita \ -" - - -inherit gnomebase gtk-icon-cache gettext features_check mime-xdg - -REQUIRED_DISTRO_FEATURES = "x11 opengl" - -SRC_URI[archive.sha256sum] = "592f401e485d02cc044d487bb5c8e04c961da6856216768a59f1ff98bd2d537c" - -FILES:${PN} += " \ - ${datadir}/dbus-1 \ - ${datadir}/metainfo \ - ${datadir}/thumbnailers \ -" diff --git a/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-font-viewer/gnome-font-viewer_47.0.bb b/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-font-viewer/gnome-font-viewer_47.0.bb new file mode 100644 index 00000000..4763d171 --- /dev/null +++ b/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-font-viewer/gnome-font-viewer_47.0.bb @@ -0,0 +1,24 @@ +SUMMARY = "GNOME font viewer" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" + +SECTION = "x11/gnome" + +DEPENDS = " \ + gtk4 \ + gnome-desktop \ + libadwaita \ +" + + +inherit gnomebase gtk-icon-cache gettext features_check mime-xdg + +REQUIRED_DISTRO_FEATURES = "x11 opengl" + +SRC_URI[archive.sha256sum] = "b8e5a042e0b241b0c7cae43f74da0d5f88e6423017a91feb86e7617edb4080ed" + +FILES:${PN} += " \ + ${datadir}/dbus-1 \ + ${datadir}/metainfo \ + ${datadir}/thumbnailers \ +" diff --git a/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-keyring/gnome-keyring_46.1.bb b/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-keyring/gnome-keyring_46.1.bb deleted file mode 100644 index 8df3710e..00000000 --- a/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-keyring/gnome-keyring_46.1.bb +++ /dev/null @@ -1,51 +0,0 @@ -SUMMARY = "Password and keyring managing daemon" -HOMEPAGE = "http://www.gnome.org/" -BUGTRACKER = "https://bugzilla.gnome.org/" -SECTION = "x11/gnome" - -LICENSE = "GPL-2.0-or-later & LGPL-2.0-or-later & LGPL-2.1-or-later" -LIC_FILES_CHKSUM = " \ - file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \ -" - -DEPENDS = " \ - glib-2.0-native \ - gtk+3 \ - gcr3 \ - libgcrypt \ - ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)} \ -" - -GNOMEBASEBUILDCLASS = "autotools" -inherit gnomebase gsettings features_check gettext - -ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" - -SRC_URI[archive.sha256sum] = "b1d3ae9132ff2f8b3f25a190790892968e3d0acf952a487e40f644a8550ce3f6" -SRC_URI += " \ - file://0001-Set-paths-to-ssh-agent-and-ssh-add-by-configure-opti.patch \ - file://musl.patch \ -" - -PACKAGECONFIG ??= "ssh-agent" -PACKAGECONFIG[ssh-agent] = "--enable-ssh-agent --with-ssh-agent-path=${bindir}/ssh-agent --with-ssh-add-path=${bindir}/ssh-add,--disable-ssh-agent,,openssh-misc" - -EXTRA_OECONF = " \ - --disable-doc \ - ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--enable-pam --with-pam-dir=${base_libdir}/security', '--disable-pam', d)} \ -" - -FILES:${PN} += " \ - ${datadir}/dbus-1/services \ - ${datadir}/p11-kit \ - ${datadir}/xdg-desktop-portal \ - ${base_libdir}/security/*${SOLIBSDEV} \ - ${libdir}/pkcs11/gnome-keyring-pkcs11.so \ - ${systemd_user_unitdir} \ -" -# fix | gnome-keyring-daemon: insufficient process capabilities, unsecure memory might get used -pkg_postinst:${PN} () { - setcap cap_ipc_lock+ep $D/${bindir}/gnome-keyring-daemon -} -PACKAGE_WRITE_DEPS += "libcap-native" diff --git a/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-keyring/gnome-keyring_46.2.bb b/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-keyring/gnome-keyring_46.2.bb new file mode 100644 index 00000000..e1731990 --- /dev/null +++ b/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-keyring/gnome-keyring_46.2.bb @@ -0,0 +1,51 @@ +SUMMARY = "Password and keyring managing daemon" +HOMEPAGE = "http://www.gnome.org/" +BUGTRACKER = "https://bugzilla.gnome.org/" +SECTION = "x11/gnome" + +LICENSE = "GPL-2.0-or-later & LGPL-2.0-or-later & LGPL-2.1-or-later" +LIC_FILES_CHKSUM = " \ + file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \ +" + +DEPENDS = " \ + glib-2.0-native \ + gtk+3 \ + gcr3 \ + libgcrypt \ + ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)} \ +" + +GNOMEBASEBUILDCLASS = "autotools" +inherit gnomebase gsettings features_check gettext + +ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" + +SRC_URI[archive.sha256sum] = "bf26c966b8a8b7f3285ecc8bb3e467b9c20f9535b94dc451c9c559ddcff61925" +SRC_URI += " \ + file://0001-Set-paths-to-ssh-agent-and-ssh-add-by-configure-opti.patch \ + file://musl.patch \ +" + +PACKAGECONFIG ??= "ssh-agent" +PACKAGECONFIG[ssh-agent] = "--enable-ssh-agent --with-ssh-agent-path=${bindir}/ssh-agent --with-ssh-add-path=${bindir}/ssh-add,--disable-ssh-agent,,openssh-misc" + +EXTRA_OECONF = " \ + --disable-doc \ + ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--enable-pam --with-pam-dir=${base_libdir}/security', '--disable-pam', d)} \ +" + +FILES:${PN} += " \ + ${datadir}/dbus-1/services \ + ${datadir}/p11-kit \ + ${datadir}/xdg-desktop-portal \ + ${base_libdir}/security/*${SOLIBSDEV} \ + ${libdir}/pkcs11/gnome-keyring-pkcs11.so \ + ${systemd_user_unitdir} \ +" +# fix | gnome-keyring-daemon: insufficient process capabilities, unsecure memory might get used +pkg_postinst:${PN} () { + setcap cap_ipc_lock+ep $D/${bindir}/gnome-keyring-daemon +} +PACKAGE_WRITE_DEPS += "libcap-native" diff --git a/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-online-accounts/gnome-online-accounts_3.50.1.bb b/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-online-accounts/gnome-online-accounts_3.50.1.bb deleted file mode 100644 index 66df8902..00000000 --- a/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-online-accounts/gnome-online-accounts_3.50.1.bb +++ /dev/null @@ -1,28 +0,0 @@ -SUMMARY = "GNOME Online Accounts - Single sign-on framework for GNOME" -LICENSE = "LGPL-2.0-or-later" -LIC_FILES_CHKSUM = "file://COPYING;md5=34c88b124db5fb2762c1676be7dadd36" - -GTKIC_VERSION = "4" -inherit gnomebase gsettings gobject-introspection gtk-icon-cache mime-xdg vala features_check -REQUIRED_DISTRO_FEATURES = "${@bb.utils.contains('PACKAGECONFIG', 'goabackend', 'opengl', '', d)}" - -DEPENDS += "gdk-pixbuf dbus glib-2.0 gcr" - -SRC_URI[archive.sha256sum] = "42ee43fd1e2942b9ff6106252ccdc834602815508bf7a3a52c0bdfffa56eaf40" - -PACKAGECONFIG ?= "goabackend kerberos owncloud google windows_live" - -PACKAGECONFIG[goabackend] = "-Dgoabackend=true,-Dgoabackend=false,gtk4 libadwaita json-glib libxml2 libsoup rest libsecret webkitgtk" -PACKAGECONFIG[kerberos] = "-Dkerberos=true, -Dkerberos=false,krb5" -PACKAGECONFIG[exchange] = "-Dexchange=true, -Dexchange=false" -PACKAGECONFIG[google] = "-Dgoogle=true, -Dgoogle=false" -PACKAGECONFIG[owncloud] = "-Downcloud=true, -Downcloud=false" -PACKAGECONFIG[windows_live] = "-Dwindows_live=true, -Dwindows_live=false" - -FILES:${PN} += " \ - ${datadir}/dbus-1 \ - ${libdir}/goa-1.0/web-extensions/*.so \ -" - -# looked into pkg-config file: it is not a bug - they mean it -FILES:${PN}-dev += "${libdir}/goa-1.0/include" diff --git a/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-online-accounts/gnome-online-accounts_3.50.2.bb b/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-online-accounts/gnome-online-accounts_3.50.2.bb new file mode 100644 index 00000000..adce7077 --- /dev/null +++ b/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-online-accounts/gnome-online-accounts_3.50.2.bb @@ -0,0 +1,28 @@ +SUMMARY = "GNOME Online Accounts - Single sign-on framework for GNOME" +LICENSE = "LGPL-2.0-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=34c88b124db5fb2762c1676be7dadd36" + +GTKIC_VERSION = "4" +inherit gnomebase gsettings gobject-introspection gtk-icon-cache mime-xdg vala features_check +REQUIRED_DISTRO_FEATURES = "${@bb.utils.contains('PACKAGECONFIG', 'goabackend', 'opengl', '', d)}" + +DEPENDS += "gdk-pixbuf dbus glib-2.0 gcr" + +SRC_URI[archive.sha256sum] = "df16ad975d139c6bfc4ebb2ec8bb8327297a791ef2bf0b977c78076af5faa98e" + +PACKAGECONFIG ?= "goabackend kerberos owncloud google windows_live" + +PACKAGECONFIG[goabackend] = "-Dgoabackend=true,-Dgoabackend=false,gtk4 libadwaita json-glib libxml2 libsoup rest libsecret webkitgtk" +PACKAGECONFIG[kerberos] = "-Dkerberos=true, -Dkerberos=false,krb5" +PACKAGECONFIG[exchange] = "-Dexchange=true, -Dexchange=false" +PACKAGECONFIG[google] = "-Dgoogle=true, -Dgoogle=false" +PACKAGECONFIG[owncloud] = "-Downcloud=true, -Downcloud=false" +PACKAGECONFIG[windows_live] = "-Dwindows_live=true, -Dwindows_live=false" + +FILES:${PN} += " \ + ${datadir}/dbus-1 \ + ${libdir}/goa-1.0/web-extensions/*.so \ +" + +# looked into pkg-config file: it is not a bug - they mean it +FILES:${PN}-dev += "${libdir}/goa-1.0/include" diff --git a/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-shell/gnome-shell-extensions_46.1.bb b/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-shell/gnome-shell-extensions_46.1.bb deleted file mode 100644 index b79f70c6..00000000 --- a/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-shell/gnome-shell-extensions_46.1.bb +++ /dev/null @@ -1,23 +0,0 @@ -SUMMARY = "GNOME Shell Extensions" -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=4cb3a392cbf81a9e685ec13b88c4c101" - -inherit gnomebase gettext gsettings features_check - -REQUIRED_DISTRO_FEATURES = "x11 polkit systemd pam gobject-introspection-data" - -SRC_URI[archive.sha256sum] = "c5ba50700da77a986f0060beedacfc017e7ec82283f2a6384842a0807bc4553f" - -EXTRA_OEMESON += " \ - -Dextension_set=all \ - -Dclassic_mode=true \ -" - -RDEPENDS:${PN} += "gnome-shell" - -FILES:${PN} += " \ - ${datadir}/gnome-shell \ - ${datadir}/gnome-session \ - ${datadir}/wayland-sessions \ - ${datadir}/xsessions \ -" diff --git a/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-shell/gnome-shell-extensions_46.2.bb b/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-shell/gnome-shell-extensions_46.2.bb new file mode 100644 index 00000000..5c2ae059 --- /dev/null +++ b/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-shell/gnome-shell-extensions_46.2.bb @@ -0,0 +1,23 @@ +SUMMARY = "GNOME Shell Extensions" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=4cb3a392cbf81a9e685ec13b88c4c101" + +inherit gnomebase gettext gsettings features_check + +REQUIRED_DISTRO_FEATURES = "x11 polkit systemd pam gobject-introspection-data" + +SRC_URI[archive.sha256sum] = "d442e9d26925125ff215a5c134290495655380741daafbb37a3a99d6f0c7d86f" + +EXTRA_OEMESON += " \ + -Dextension_set=all \ + -Dclassic_mode=true \ +" + +RDEPENDS:${PN} += "gnome-shell" + +FILES:${PN} += " \ + ${datadir}/gnome-shell \ + ${datadir}/gnome-session \ + ${datadir}/wayland-sessions \ + ${datadir}/xsessions \ +" diff --git a/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-shell/gnome-shell/0002-screencast-Correct-expected-bus-name-for-streams.patch b/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-shell/gnome-shell/0002-screencast-Correct-expected-bus-name-for-streams.patch deleted file mode 100644 index 73659471..00000000 --- a/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-shell/gnome-shell/0002-screencast-Correct-expected-bus-name-for-streams.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 50a011a19dcc6997ea6173c07bb80b2d9888d363 Mon Sep 17 00:00:00 2001 -From: Simon McVittie -Date: Mon, 6 May 2024 21:58:09 +0100 -Subject: [PATCH] screencast: Correct expected bus name for streams -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Previously, this only worked because GDBusConnection was not filtering -signals by their sender correctly (GNOME/glib#3268). - -Thanks: Alicia Boya García -Signed-off-by: Simon McVittie -Part-of: - -Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/gnome-shell/-/commit/50a011a19dcc6997ea6173c07bb80b2d9888d363] - -Signed-off-by: Peter Marko ---- - js/dbusServices/screencast/screencastService.js | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/js/dbusServices/screencast/screencastService.js b/js/dbusServices/screencast/screencastService.js -index d664a51b083..0645811fa0a 100644 ---- a/js/dbusServices/screencast/screencastService.js -+++ b/js/dbusServices/screencast/screencastService.js -@@ -340,7 +340,7 @@ class Recorder extends Signals.EventEmitter { - }); - - this._streamProxy = new ScreenCastStreamProxy(Gio.DBus.session, -- 'org.gnome.ScreenCast.Stream', -+ 'org.gnome.Mutter.ScreenCast', - streamPath); - - this._streamProxy.connectSignal('PipeWireStreamAdded', --- -2.30.2 - diff --git a/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-shell/gnome-shell_46.1.bb b/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-shell/gnome-shell_46.1.bb deleted file mode 100644 index 1bc9b6b3..00000000 --- a/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-shell/gnome-shell_46.1.bb +++ /dev/null @@ -1,87 +0,0 @@ -SUMMARY = "GNOME Shell is the graphical shell of the GNOME desktop environment" -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" - - -DEPENDS = " \ - libxml2-native \ - gtk4 \ - mutter \ - evolution-data-server \ - gcr \ - geocode-glib \ - gjs \ - gnome-autoar \ - gnome-desktop \ - polkit \ - pipewire \ - libsoup-3.0 \ - ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', '', 'startup-notification', d)} \ - ibus \ - gsettings-desktop-schemas \ -" - -inherit gnomebase gsettings gettext gobject-introspection gtk-icon-cache features_check bash-completion - -REQUIRED_DISTRO_FEATURES = "x11 polkit systemd pam" - -GTKIC_VERSION = "4" -GTKDOC_MESON_OPTION = "gtk_doc" -GIR_MESON_OPTION = "" - -# gobject-introspection is mandatory and cannot be configured -REQUIRED_DISTRO_FEATURES += "gobject-introspection-data" - -SRC_URI[archive.sha256sum] = "64f999844c101e63bf294d45b138de56319ad2f326282721aad0fa860653b369" -SRC_URI += "file://0001-Introduce-options-gjs_path-to-optionally-set-path-to.patch" -SRC_URI += "file://0002-screencast-Correct-expected-bus-name-for-streams.patch" - -PACKAGECONFIG ??= "bluetooth nm ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" -PACKAGECONFIG[bluetooth] = ",,gnome-bluetooth" -PACKAGECONFIG[nm] = "-Dnetworkmanager=true, -Dnetworkmanager=false,networkmanager libsecret,networkmanager" -PACKAGECONFIG[systemd] = "-Dsystemd=true, -Dsystemd=false, systemd" - -EXTRA_OEMESON = " \ - -Dgjs_path=${bindir}/gjs \ - -Dextensions-app:gjs_path=${bindir}/gjs \ - -Dtests=false \ - -Dman=false \ -" - -do_install:append() { - # fix shebangs - for tool in `find ${D}${bindir} -name '*-tool'`; do - sed -i 's:#!${PYTHON}:#!${bindir}/python3:' $tool - done -} - -GSETTINGS_PACKAGE = "${PN}-gsettings" - -FILES:${PN} += " \ - ${datadir}/metainfo \ - ${datadir}/dbus-1 \ - ${datadir}/gnome-control-center \ - ${datadir}/xdg-desktop-portal \ - ${systemd_user_unitdir} \ -" - -RDEPENDS:${PN} += " \ - accountsservice \ - adwaita-icon-theme \ - adwaita-icon-theme-cursors \ - gdm-base \ - gnome-control-center \ - gnome-backgrounds \ - gnome-bluetooth \ - gnome-desktop \ - gnome-session \ - gnome-settings-daemon \ - gnome-shell-gsettings \ - gsettings-desktop-schemas \ - librsvg-gtk \ -" - -PACKAGES =+ "${PN}-tools ${PN}-gsettings" -FILES:${PN}-tools = "${bindir}/*-tool" -RDEPENDS:${PN}-tools = "python3-core" - diff --git a/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-shell/gnome-shell_46.2.bb b/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-shell/gnome-shell_46.2.bb new file mode 100644 index 00000000..e166db0a --- /dev/null +++ b/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-shell/gnome-shell_46.2.bb @@ -0,0 +1,87 @@ +SUMMARY = "GNOME Shell is the graphical shell of the GNOME desktop environment" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + + +DEPENDS = " \ + libxml2-native \ + gtk4 \ + mutter \ + evolution-data-server \ + gcr \ + geocode-glib \ + gjs \ + gnome-autoar \ + gnome-desktop \ + gnome-control-center \ + polkit \ + pipewire \ + libsoup-3.0 \ + ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', '', 'startup-notification', d)} \ + ibus \ + gsettings-desktop-schemas \ +" + +inherit gnomebase gsettings gettext gobject-introspection gtk-icon-cache features_check bash-completion + +REQUIRED_DISTRO_FEATURES = "x11 polkit systemd pam" + +GTKIC_VERSION = "4" +GTKDOC_MESON_OPTION = "gtk_doc" +GIR_MESON_OPTION = "" + +# gobject-introspection is mandatory and cannot be configured +REQUIRED_DISTRO_FEATURES += "gobject-introspection-data" + +SRC_URI[archive.sha256sum] = "6b587101c04bfb364ab09cd38b5d93ebeeb4254754c807cf712fbc8ee3fde238" +SRC_URI += "file://0001-Introduce-options-gjs_path-to-optionally-set-path-to.patch" + +PACKAGECONFIG ??= "bluetooth nm ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" +PACKAGECONFIG[bluetooth] = ",,gnome-bluetooth" +PACKAGECONFIG[nm] = "-Dnetworkmanager=true, -Dnetworkmanager=false,networkmanager libsecret,networkmanager" +PACKAGECONFIG[systemd] = "-Dsystemd=true, -Dsystemd=false, systemd" + +EXTRA_OEMESON = " \ + -Dgjs_path=${bindir}/gjs \ + -Dextensions-app:gjs_path=${bindir}/gjs \ + -Dtests=false \ + -Dman=false \ +" + +do_install:append() { + # fix shebangs + for tool in `find ${D}${bindir} -name '*-tool'`; do + sed -i 's:#!${PYTHON}:#!${bindir}/python3:' $tool + done +} + +GSETTINGS_PACKAGE = "${PN}-gsettings" + +FILES:${PN} += " \ + ${datadir}/metainfo \ + ${datadir}/dbus-1 \ + ${datadir}/gnome-control-center \ + ${datadir}/xdg-desktop-portal \ + ${systemd_user_unitdir} \ +" + +RDEPENDS:${PN} += " \ + accountsservice \ + adwaita-icon-theme \ + adwaita-icon-theme-cursors \ + gdm-base \ + gnome-control-center \ + gnome-backgrounds \ + gnome-bluetooth \ + gnome-desktop \ + gnome-session \ + gnome-settings-daemon \ + gnome-shell-gsettings \ + gsettings-desktop-schemas \ + librsvg-gtk \ +" + +PACKAGES =+ "${PN}-tools ${PN}-gsettings" +FILES:${PN}-tools = "${bindir}/*-tool" +RDEPENDS:${PN}-tools = "python3-core" + diff --git a/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-software/gnome-software_46.0.bb b/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-software/gnome-software_46.0.bb deleted file mode 100644 index 40a7141f..00000000 --- a/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-software/gnome-software_46.0.bb +++ /dev/null @@ -1,43 +0,0 @@ -SUMMARY = "GNOME Software allows users to easily find, discover and install apps." -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" - -GTKDOC_MESON_OPTION ?= "gtk_doc" - -inherit gnomebase gsettings itstool gnome-help gtk-icon-cache gtk-doc mime mime-xdg gettext upstream-version-is-even features_check - -REQUIRED_DISTRO_FEATURES = "x11 polkit systemd pam" - -DEPENDS += " \ - appstream \ - gdk-pixbuf \ - glib-2.0 \ - glib-2.0-native \ - gsettings-desktop-schemas \ - gtk4 \ - iso-codes \ - json-glib \ - libadwaita \ - libgudev \ - libsoup-3.0 \ - libxmlb-native \ - polkit \ -" - -RDEPENDS:${PN} = "iso-codes" - -EXTRA_OEMESON += "-Dtests=false -Dsoup2=false" - -SRC_URI[archive.sha256sum] = "11893002bbb54082896683707bc3991ae55a2f3040811a760e3a92c96544f86e" - -PACKAGECONFIG ?= "flatpak" -PACKAGECONFIG[flatpak] = "-Dflatpak=true,-Dflatpak=false,flatpak ostree" -PACKAGECONFIG[snap] = "-Dsnap=true,-Dsnap=false,snapd-glib" -PACKAGECONFIG[gtk_doc] = "-Dgtk_doc=true,-Dgtk_doc=false,libxslt-native docbook-xsl-stylesheets" -PACKAGECONFIG[man] = "-Dman=true,-Dman=false,libxslt-native docbook-xsl-stylesheets" -PACKAGECONFIG[packagekit] = "-Dpackagekit=true,-Dpackagekit=false,gnome-packagekit,gnome-packagekit" -PACKAGECONFIG[fwupd] = "-Dfwupd=true,-Dfwupd=false,fwupd,fwupd" -PACKAGECONFIG[malcontent] = "-Dmalcontent=true,-Dmalcontent=false,malcontent" - -FILES:${PN} += "${datadir}" -FILES:${PN}-dev += "${libdir}/gnome-software/libgnomesoftware.so" diff --git a/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-software/gnome-software_46.2.bb b/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-software/gnome-software_46.2.bb new file mode 100644 index 00000000..24494178 --- /dev/null +++ b/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-software/gnome-software_46.2.bb @@ -0,0 +1,43 @@ +SUMMARY = "GNOME Software allows users to easily find, discover and install apps." +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +GTKDOC_MESON_OPTION ?= "gtk_doc" + +inherit gnomebase gsettings itstool gnome-help gtk-icon-cache gtk-doc mime mime-xdg gettext upstream-version-is-even features_check + +REQUIRED_DISTRO_FEATURES = "x11 polkit systemd pam" + +DEPENDS += " \ + appstream \ + gdk-pixbuf \ + glib-2.0 \ + glib-2.0-native \ + gsettings-desktop-schemas \ + gtk4 \ + iso-codes \ + json-glib \ + libadwaita \ + libgudev \ + libsoup-3.0 \ + libxmlb-native \ + polkit \ +" + +RDEPENDS:${PN} = "iso-codes" + +EXTRA_OEMESON += "-Dtests=false -Dsoup2=false" + +SRC_URI[archive.sha256sum] = "e700cba287764f5e2255514e312e160550fdbf7a5d3fe16358bb6f7b6732b974" + +PACKAGECONFIG ?= "flatpak" +PACKAGECONFIG[flatpak] = "-Dflatpak=true,-Dflatpak=false,flatpak ostree" +PACKAGECONFIG[snap] = "-Dsnap=true,-Dsnap=false,snapd-glib" +PACKAGECONFIG[gtk_doc] = "-Dgtk_doc=true,-Dgtk_doc=false,libxslt-native docbook-xsl-stylesheets" +PACKAGECONFIG[man] = "-Dman=true,-Dman=false,libxslt-native docbook-xsl-stylesheets" +PACKAGECONFIG[packagekit] = "-Dpackagekit=true,-Dpackagekit=false,gnome-packagekit,gnome-packagekit" +PACKAGECONFIG[fwupd] = "-Dfwupd=true,-Dfwupd=false,fwupd,fwupd" +PACKAGECONFIG[malcontent] = "-Dmalcontent=true,-Dmalcontent=false,malcontent" + +FILES:${PN} += "${datadir}" +FILES:${PN}-dev += "${libdir}/gnome-software/libgnomesoftware.so" diff --git a/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-text-editor/gnome-text-editor_46.1.bb b/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-text-editor/gnome-text-editor_46.1.bb deleted file mode 100644 index f37eb719..00000000 --- a/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-text-editor/gnome-text-editor_46.1.bb +++ /dev/null @@ -1,26 +0,0 @@ -SUMMARY = "A simple text editor" -LICENSE = "GPL-3.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=8f0e2cd40e05189ec81232da84bd6e1a" - - -DEPENDS = " \ - desktop-file-utils-native \ - libadwaita \ - gtk4 \ - gtksourceview5 \ - editorconfig-core-c \ - enchant2 \ -" - -GTKIC_VERSION = "4" - -inherit gnomebase gtk-icon-cache itstool gnome-help mime-xdg features_check - -REQUIRED_DISTRO_FEATURES = "opengl" - -SRC_URI[archive.sha256sum] = "8ebfa0bea12e75f5efeacc721be3b8ae65027b024aa81db9ecab8c312257a2eb" - -FILES:${PN} += " \ - ${datadir}/metainfo \ - ${datadir}/dbus-1 \ -" diff --git a/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-text-editor/gnome-text-editor_46.3.bb b/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-text-editor/gnome-text-editor_46.3.bb new file mode 100644 index 00000000..1e326823 --- /dev/null +++ b/sources/meta-openembedded/meta-gnome/recipes-gnome/gnome-text-editor/gnome-text-editor_46.3.bb @@ -0,0 +1,26 @@ +SUMMARY = "A simple text editor" +LICENSE = "GPL-3.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=8f0e2cd40e05189ec81232da84bd6e1a" + + +DEPENDS = " \ + desktop-file-utils-native \ + libadwaita \ + gtk4 \ + gtksourceview5 \ + editorconfig-core-c \ + enchant2 \ +" + +GTKIC_VERSION = "4" + +inherit gnomebase gtk-icon-cache itstool gnome-help mime-xdg features_check + +REQUIRED_DISTRO_FEATURES = "opengl" + +SRC_URI[archive.sha256sum] = "005b48104a909be66ae07448d2bc5706c7d113781057a24ff6da55bdf324c73d" + +FILES:${PN} += " \ + ${datadir}/metainfo \ + ${datadir}/dbus-1 \ +" diff --git a/sources/meta-openembedded/meta-gnome/recipes-gnome/grilo/grilo_0.3.16.bb b/sources/meta-openembedded/meta-gnome/recipes-gnome/grilo/grilo_0.3.16.bb index 14e1ca9f..b6ac75dd 100644 --- a/sources/meta-openembedded/meta-gnome/recipes-gnome/grilo/grilo_0.3.16.bb +++ b/sources/meta-openembedded/meta-gnome/recipes-gnome/grilo/grilo_0.3.16.bb @@ -26,5 +26,14 @@ PACKAGECONFIG[test-ui] = "-Denable-test-ui=true, -Denable-test-ui=false, gtk+3 l EXTRA_OEMESON = "-Denable-grl-pls=false" do_compile:append() { - sed -i -e 's,${B}/../,,' ${B}/src/grl-type-builtins.h + # grl-type-builtins.* are generated by glib-mkenums which leave full paths + # in comment and #include directives. Rewrite those before *-src packaging. + + # Path can be relative to B or WORKDIR in devtool modify + for base in ${B} ${WORKDIR} ; do + relpath="$(realpath --relative-to="$base" "${S}")" + sed -i -e "s,$base/$relpath/src/,," \ + ${B}/src/grl-type-builtins.h \ + ${B}/src/grl-type-builtins.c + done } diff --git a/sources/meta-openembedded/meta-gnome/recipes-gnome/gtksourceview/gtksourceview-classic-light_1.0.bb b/sources/meta-openembedded/meta-gnome/recipes-gnome/gtksourceview/gtksourceview-classic-light_1.0.bb index 4e1e4343..9d46b43c 100644 --- a/sources/meta-openembedded/meta-gnome/recipes-gnome/gtksourceview/gtksourceview-classic-light_1.0.bb +++ b/sources/meta-openembedded/meta-gnome/recipes-gnome/gtksourceview/gtksourceview-classic-light_1.0.bb @@ -6,13 +6,14 @@ inherit allarch SRC_URI = "file://classic-light.xml" -S = "${WORKDIR}" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" do_install() { install -d ${D}${datadir}/gtksourceview-3.0/styles - install -m 0644 ${WORKDIR}/classic-light.xml ${D}${datadir}/gtksourceview-3.0/styles/ + install -m 0644 ${UNPACKDIR}/classic-light.xml ${D}${datadir}/gtksourceview-3.0/styles/ install -d ${D}${datadir}/gtksourceview-4/styles - install -m 0644 ${WORKDIR}/classic-light.xml ${D}${datadir}/gtksourceview-4/styles/ + install -m 0644 ${UNPACKDIR}/classic-light.xml ${D}${datadir}/gtksourceview-4/styles/ } FILES:${PN} = " \ diff --git a/sources/meta-openembedded/meta-gnome/recipes-gnome/gtksourceview/gtksourceview3_3.24.11.bb b/sources/meta-openembedded/meta-gnome/recipes-gnome/gtksourceview/gtksourceview3_3.24.11.bb index e504186b..0ab9b146 100644 --- a/sources/meta-openembedded/meta-gnome/recipes-gnome/gtksourceview/gtksourceview3_3.24.11.bb +++ b/sources/meta-openembedded/meta-gnome/recipes-gnome/gtksourceview/gtksourceview3_3.24.11.bb @@ -15,6 +15,9 @@ inherit gnomebase lib_package gettext features_check gtk-doc gobject-introspecti REQUIRED_DISTRO_FEATURES = "x11" +EXTRA_OECONF += "--disable-glade-catalog --disable-gtk-doc --disable-Werror" + +CFLAGS += "-Wno-error=incompatible-pointer-types" SRC_URI = "http://ftp.gnome.org/pub/gnome/sources/gtksourceview/3.24/${PNAME}-${PV}.tar.xz" SRC_URI[md5sum] = "b748da426a7d64e1304f0c532b0f2a67" SRC_URI[sha256sum] = "691b074a37b2a307f7f48edc5b8c7afa7301709be56378ccf9cc9735909077fd" diff --git a/sources/meta-openembedded/meta-gnome/recipes-gnome/gvfs/gvfs_1.54.0.bb b/sources/meta-openembedded/meta-gnome/recipes-gnome/gvfs/gvfs_1.54.0.bb index 01cdb4ee..6549b190 100644 --- a/sources/meta-openembedded/meta-gnome/recipes-gnome/gvfs/gvfs_1.54.0.bb +++ b/sources/meta-openembedded/meta-gnome/recipes-gnome/gvfs/gvfs_1.54.0.bb @@ -2,7 +2,7 @@ DESCRIPTION = "gvfs is a userspace virtual filesystem" LICENSE = "LGPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=05df38dd77c35ec8431f212410a3329e" -inherit gnomebase gsettings bash-completion gettext upstream-version-is-even features_check useradd +inherit gnomebase gsettings bash-completion gettext upstream-version-is-even features_check DEPENDS += "\ dbus \ @@ -77,16 +77,7 @@ PACKAGECONFIG[fuse] = "-Dfuse=true, -Dfuse=false, fuse3" # libcdio-paranoia recipe doesn't exist yet PACKAGECONFIG[cdda] = "-Dcdda=true, -Dcdda=false, libcdio-paranoia" -USERADD_PACKAGES = "${PN}" -USERADD_PARAM:${PN} = "--system --no-create-home --user-group --home-dir ${sysconfdir}/polkit-1 polkitd" - do_install:append() { - if ${@bb.utils.contains('DISTRO_FEATURES', 'polkit', 'true', 'false', d)}; then - # Fix up permissions on polkit rules.d to work with rpm4 constraints - chmod 700 ${D}${datadir}/polkit-1/rules.d - chown polkitd:root ${D}${datadir}/polkit-1/rules.d - fi - # After rebuilds (not from scracth) it can happen that the executables in # libexec ar missing executable permission flag. Not sure but it came up # during transition to meson. Looked into build files and logs but could diff --git a/sources/meta-openembedded/meta-gnome/recipes-gnome/libgsf/libgsf/0001-Compilation-attempt-fixes-for-libxml-2.13.patch b/sources/meta-openembedded/meta-gnome/recipes-gnome/libgsf/libgsf/0001-Compilation-attempt-fixes-for-libxml-2.13.patch new file mode 100644 index 00000000..08ff5120 --- /dev/null +++ b/sources/meta-openembedded/meta-gnome/recipes-gnome/libgsf/libgsf/0001-Compilation-attempt-fixes-for-libxml-2.13.patch @@ -0,0 +1,105 @@ +From 4a84e9857d83f684bf53d616942a393ce558a328 Mon Sep 17 00:00:00 2001 +From: Morten Welinder +Date: Wed, 3 Jul 2024 19:18:15 -0400 +Subject: [PATCH] Compilation: attempt fixes for libxml 2.13 + +Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libgsf/-/commit/5d4bb55095d3d6ef793c1908a88504183e28644c] +Signed-off-by: Khem Raj +--- + configure.ac | 1 + + gsf/gsf-input-http.c | 19 +++++++++++++++++++ + 2 files changed, 20 insertions(+) + +diff --git a/configure.ac b/configure.ac +index fceb776..7c2f946 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -238,6 +238,7 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[(void)g_chown("/ + AC_MSG_RESULT(yes)], + [AC_MSG_RESULT(no)]) + AC_CHECK_FUNCS(g_date_time_new_from_iso8601 g_date_time_format_iso8601) ++AC_CHECK_FUNCS(xmlNanoHTTPOpen xmlNanoHTTPClose) + CFLAGS=$SAVE_CFLAGS + LIBS=$SAVE_LIBS + +diff --git a/gsf/gsf-input-http.c b/gsf/gsf-input-http.c +index bdde3c8..03f4045 100644 +--- a/gsf/gsf-input-http.c ++++ b/gsf/gsf-input-http.c +@@ -23,7 +23,10 @@ + #include + #include + ++#ifdef HAVE_XMLNANOHTTPOPEN ++// It's going away, so make it conditional + #include ++#endif + + struct _GsfInputHTTP { + GsfInput input; +@@ -74,7 +77,9 @@ gsf_input_http_finalize (GObject *obj_input) + input->content_type = NULL; + + if (input->ctx) { ++#ifdef HAVE_XMLNANOHTTPCLOSE + xmlNanoHTTPClose ((gpointer) input->ctx); ++#endif + input->ctx = NULL; + } + +@@ -215,6 +220,7 @@ gsf_input_http_get_content_type (GsfInputHTTP *input) + return content_type; + } + ++#ifdef HAVE_XMLNANOHTTPOPEN + static GsfInput * + make_local_copy (gpointer *ctx) + { +@@ -254,6 +260,7 @@ make_local_copy (gpointer *ctx) + + return copy; + } ++#endif + + /** + * gsf_input_http_new: +@@ -265,6 +272,7 @@ make_local_copy (gpointer *ctx) + GsfInput * + gsf_input_http_new (gchar const * url, GError **error G_GNUC_UNUSED) + { ++#ifdef HAVE_XMLNANOHTTPOPEN + GObject *obj; + GsfInput *input; + gpointer ctx; +@@ -293,6 +301,10 @@ gsf_input_http_new (gchar const * url, GError **error G_GNUC_UNUSED) + GSF_INPUT_HTTP (obj)->ctx = ctx; + + return GSF_INPUT (obj); ++#else ++ g_return_val_if_fail(url != NULL, NULL); ++ return NULL; ++#endif + } + + static GsfInput * +@@ -304,6 +316,7 @@ gsf_input_http_dup (GsfInput *src, GError **err) + static guint8 const * + gsf_input_http_read (GsfInput *input, size_t num_bytes, guint8 *buffer) + { ++#ifdef HAVE_XMLNANOHTTPOPEN + int nread; + size_t total_read; + gpointer ctx = GSF_INPUT_HTTP (input)->ctx; +@@ -324,6 +337,12 @@ gsf_input_http_read (GsfInput *input, size_t num_bytes, guint8 *buffer) + return NULL; + } + return buffer; ++#else ++ (void)input; ++ (void)num_bytes; ++ (void)buffer; ++ return NULL; ++#endif + } + + static gboolean diff --git a/sources/meta-openembedded/meta-gnome/recipes-gnome/libgsf/libgsf_1.14.52.bb b/sources/meta-openembedded/meta-gnome/recipes-gnome/libgsf/libgsf_1.14.52.bb new file mode 100644 index 00000000..97cbbe45 --- /dev/null +++ b/sources/meta-openembedded/meta-gnome/recipes-gnome/libgsf/libgsf_1.14.52.bb @@ -0,0 +1,23 @@ +SUMMARY = "GNOME Structured File Library" +LICENSE = "LGPL-2.1-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=61464cfe342798eeced82efe9ae55f63" + +SECTION = "libs" + +DEPENDS= "libxml2 bzip2 glib-2.0 zlib" + +GNOMEBASEBUILDCLASS = "autotools" +inherit gnomebase gobject-introspection gettext gtk-doc + +SRC_URI[archive.sha256sum] = "9181c914b9fac0e05d6bcaa34c7b552fe5fc0961d3c9f8c01ccc381fb084bcf0" +SRC_URI += "file://0001-configure.ac-drop-a-copy-paste-of-introspection.m4-m.patch \ + file://0001-Compilation-attempt-fixes-for-libxml-2.13.patch" + +PACKAGECONFIG ??= "" +PACKAGECONFIG[gdk-pixbuf] = "--with-gdk-pixbuf,--without-gdk-pixbuf,gdk-pixbuf" + +EXTRA_OECONF = "\ + --with-bz2 \ +" + +FILES:${PN} += "${datadir}/thumbnailers" diff --git a/sources/meta-openembedded/meta-gnome/recipes-gnome/libgsf/libgsf_1.14.53.bb b/sources/meta-openembedded/meta-gnome/recipes-gnome/libgsf/libgsf_1.14.53.bb deleted file mode 100644 index ffa24e81..00000000 --- a/sources/meta-openembedded/meta-gnome/recipes-gnome/libgsf/libgsf_1.14.53.bb +++ /dev/null @@ -1,22 +0,0 @@ -SUMMARY = "GNOME Structured File Library" -LICENSE = "LGPL-2.1-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=61464cfe342798eeced82efe9ae55f63" - -SECTION = "libs" - -DEPENDS= "libxml2 bzip2 glib-2.0 zlib" - -GNOMEBASEBUILDCLASS = "autotools" -inherit gnomebase gobject-introspection gettext gtk-doc - -SRC_URI[archive.sha256sum] = "0eb59a86e0c50f97ac9cfe4d8cc1969f623f2ae8c5296f2414571ff0a9e8bcba" -SRC_URI += " file://0001-configure.ac-drop-a-copy-paste-of-introspection.m4-m.patch" - -PACKAGECONFIG ??= "" -PACKAGECONFIG[gdk-pixbuf] = "--with-gdk-pixbuf,--without-gdk-pixbuf,gdk-pixbuf" - -EXTRA_OECONF = "\ - --with-bz2 \ -" - -FILES:${PN} += "${datadir}/thumbnailers" diff --git a/sources/meta-openembedded/meta-gnome/recipes-gnome/libspelling/libspelling_0.2.1.bb b/sources/meta-openembedded/meta-gnome/recipes-gnome/libspelling/libspelling_0.2.1.bb new file mode 100644 index 00000000..f5f8a332 --- /dev/null +++ b/sources/meta-openembedded/meta-gnome/recipes-gnome/libspelling/libspelling_0.2.1.bb @@ -0,0 +1,13 @@ +SUMMARY = "A spellcheck library for GTK 4" +HOMEPAGE = "https://gitlab.gnome.org/GNOME/libspelling" +LICENSE = "LGPL-2.1-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" + +DEPENDS = "enchant2 gtk4 gtksourceview5 icu" + +inherit gnomebase pkgconfig gettext gi-docgen vala gobject-introspection + +GIR_MESON_OPTION = '' +GIDOCGEN_MESON_OPTION = 'docs' + +SRC_URI[archive.sha256sum] = "7a787b467bd493f6baffb44138dbc4bef78aaab60efb76a7db88b243bf0f6343" diff --git a/sources/meta-openembedded/meta-gnome/recipes-gnome/msgraph/msgraph_0.2.1.bb b/sources/meta-openembedded/meta-gnome/recipes-gnome/msgraph/msgraph_0.2.1.bb deleted file mode 100644 index 9b4a8a03..00000000 --- a/sources/meta-openembedded/meta-gnome/recipes-gnome/msgraph/msgraph_0.2.1.bb +++ /dev/null @@ -1,19 +0,0 @@ -SUMMARY = "libmsgraph is a GLib-based library for accessing online serive APIs using MS Graph protocol." -LICENSE = "LGPL-3.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=3000208d539ec061b899bce1d9ce9404" - -inherit gnomebase gobject-introspection gi-docgen features_check -REQUIRED_DISTRO_FEATURES = "opengl" - -SRC_URI[archive.sha256sum] = "e0e59eaa8ae3e0a48ec0a6c2fed0470856a709248e9212b6a1d037de5792ecbb" - -GTKDOC_MESON_OPTION = "gtk_doc" - -EXTRA_OEMESON = "-Dtests=false" - -DEPENDS = " \ - glib-2.0\ - json-glib \ - rest \ - gnome-online-accounts \ -" diff --git a/sources/meta-openembedded/meta-gnome/recipes-gnome/msgraph/msgraph_0.2.3.bb b/sources/meta-openembedded/meta-gnome/recipes-gnome/msgraph/msgraph_0.2.3.bb new file mode 100644 index 00000000..f3f66c3d --- /dev/null +++ b/sources/meta-openembedded/meta-gnome/recipes-gnome/msgraph/msgraph_0.2.3.bb @@ -0,0 +1,19 @@ +SUMMARY = "libmsgraph is a GLib-based library for accessing online serive APIs using MS Graph protocol." +LICENSE = "LGPL-3.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=3000208d539ec061b899bce1d9ce9404" + +inherit gnomebase gobject-introspection gi-docgen features_check +REQUIRED_DISTRO_FEATURES = "opengl" + +SRC_URI[archive.sha256sum] = "ed42e800cb7f0a07477cd9e3e744cdc1a240a6ad7ab96b8a875806267a9fddb0" + +GTKDOC_MESON_OPTION = "gtk_doc" + +EXTRA_OEMESON = "-Dtests=false" + +DEPENDS = " \ + glib-2.0\ + json-glib \ + rest \ + gnome-online-accounts \ +" diff --git a/sources/meta-openembedded/meta-gnome/recipes-gnome/mutter/mutter_46.1.bb b/sources/meta-openembedded/meta-gnome/recipes-gnome/mutter/mutter_46.1.bb deleted file mode 100644 index b60ffefb..00000000 --- a/sources/meta-openembedded/meta-gnome/recipes-gnome/mutter/mutter_46.1.bb +++ /dev/null @@ -1,109 +0,0 @@ -SUMMARY = "Window and compositing manager based on Clutter" -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" - -DEPENDS = " \ - xserver-xorg-cvt-native \ - wayland-native \ - virtual/libx11 \ - colord \ - graphene \ - gtk4 \ - gdk-pixbuf \ - cairo \ - pango \ - gsettings-desktop-schemas \ - json-glib \ - libei \ - libxtst \ - libxkbfile \ - ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xinerama', '', d)} \ - xwayland \ -" - - -inherit gnomebase gsettings gobject-introspection gettext features_check - -SRC_URI[archive.sha256sum] = "63b2660dd0fa193fa662c80ee12eb8b16f2b8c3bc3896366200c79943824d51d" - -# x11 is still manadatory - see meson.build -REQUIRED_DISTRO_FEATURES = "wayland x11 polkit" - -# systemd can be replaced by libelogind (not available atow - make systemd -# mandatory distro feature) -LOGIND ?= "systemd" -REQUIRED_DISTRO_FEATURES += "systemd" - -# profiler requires sysprof 3.34 which is not willing to build atow -PACKAGECONFIG ??= " \ - native-backend \ - ${@bb.utils.contains('DISTRO_FEATURES', 'opengl x11', 'opengl glx', '', d)} \ - sm \ - startup-notification \ - gnome-desktop \ -" - -EXTRA_OEMESON += " \ - -Dtests=false \ - -Dnative_tests=false \ - -Dxwayland_path=${bindir}/Xwayland \ -" - -# combi-config - see meson_options.txt for more details -PACKAGECONFIG[native-backend] = "-Dnative_backend=true -Dudev=true, -Dnative_backend=false -Dudev=false, libdrm virtual/libgbm libinput ${LOGIND} virtual/egl virtual/libgles2 udev" -PACKAGECONFIG[opengl] = "-Dopengl=true, -Dopengl=true, virtual/libgl" -PACKAGECONFIG[glx] = "-Dglx=true, -Dglx=false" -PACKAGECONFIG[libdisplay-info] = "-Dlibdisplay_info=true, -Dlibdisplay_info=false, libdisplay-info" -PACKAGECONFIG[libwacom] = "-Dlibwacom=true, -Dlibwacom=false, libwacom" -# Remove depending on pipewire-0.2 when mutter is upgraded to 3.36+ -PACKAGECONFIG[remote-desktop] = "-Dremote_desktop=true, -Dremote_desktop=false, pipewire" -PACKAGECONFIG[gnome-desktop] = "-Dlibgnome_desktop=true, -Dlibgnome_desktop=false, gnome-desktop gnome-settings-daemon" -PACKAGECONFIG[sm] = "-Dsm=true, -Dsm=false, libsm" -PACKAGECONFIG[sound-player] = "-Dsound_player=true, -Dsound_player=false, libcanberra" -PACKAGECONFIG[profiler] = "-Dprofiler=true,-Dprofiler=false,sysprof" -PACKAGECONFIG[startup-notification] = "-Dstartup_notification=true, -Dstartup_notification=false, startup-notification, startup-notification" - -MUTTER_API_NAME = "mutter-14" - -do_install:prepend() { - sed -i -e 's|${B}/||g' ${B}/cogl/cogl/cogl-enum-types.c - sed -i -e 's|${B}/||g' ${B}/clutter/clutter/clutter-enum-types.c - sed -i -e 's|${B}/||g' ${B}/src/meta-private-enum-types.c - sed -i -e 's|${B}/||g' ${B}/src/meta/meta-enum-types.c -} - -do_install:append() { - # Add gir links in standard paths. That makes dependents life much easier - # to find them - install -d ${D}${datadir}/gir-1.0 - for gir_full in `find ${D}${libdir}/${MUTTER_API_NAME} -name '*.gir'`; do - gir=`basename "$gir_full"` - ln -sr "${D}${libdir}/${MUTTER_API_NAME}/$gir" "${D}${datadir}/gir-1.0/$gir" - done -} - -GSETTINGS_PACKAGE = "${PN}-gsettings" - -PACKAGES =+ "${PN}-tests ${PN}-gsettings" - -FILES:${PN} += " \ - ${datadir}/gnome-control-center \ - ${datadir}/gir-1.0 \ - ${libdir}/${MUTTER_API_NAME}/lib*${SOLIBS} \ - ${libdir}/${MUTTER_API_NAME}/*.typelib \ - ${libdir}/${MUTTER_API_NAME}/plugins \ -" - -FILES:${PN}-tests += " \ - ${datadir}/installed-tests \ - ${datadir}/${MUTTER_API_NAME}/tests \ - ${libexecdir}/installed-tests/${MUTTER_API_NAME} \ -" - -FILES:${PN}-dev += " \ - ${libdir}/${MUTTER_API_NAME}/*.gir \ - ${libdir}/${MUTTER_API_NAME}/lib*.so \ -" - -RDEPENDS:${PN} += "${PN}-gsettings gsettings-desktop-schemas" - diff --git a/sources/meta-openembedded/meta-gnome/recipes-gnome/mutter/mutter_46.4.bb b/sources/meta-openembedded/meta-gnome/recipes-gnome/mutter/mutter_46.4.bb new file mode 100644 index 00000000..c91744cf --- /dev/null +++ b/sources/meta-openembedded/meta-gnome/recipes-gnome/mutter/mutter_46.4.bb @@ -0,0 +1,109 @@ +SUMMARY = "Window and compositing manager based on Clutter" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +DEPENDS = " \ + xserver-xorg-cvt-native \ + wayland-native \ + virtual/libx11 \ + colord \ + graphene \ + gtk4 \ + gdk-pixbuf \ + cairo \ + pango \ + gsettings-desktop-schemas \ + json-glib \ + libei \ + libxtst \ + libxkbfile \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xinerama', '', d)} \ + xwayland \ +" + + +inherit gnomebase gsettings gobject-introspection gettext features_check + +SRC_URI[archive.sha256sum] = "611bd9cf982adb56597ce2b34224272fda619bb3bb912a684d75c6f2c37502e4" + +# x11 is still manadatory - see meson.build +REQUIRED_DISTRO_FEATURES = "wayland x11 polkit" + +# systemd can be replaced by libelogind (not available atow - make systemd +# mandatory distro feature) +LOGIND ?= "systemd" +REQUIRED_DISTRO_FEATURES += "systemd" + +# profiler requires sysprof 3.34 which is not willing to build atow +PACKAGECONFIG ??= " \ + native-backend \ + ${@bb.utils.contains('DISTRO_FEATURES', 'opengl x11', 'opengl glx', '', d)} \ + sm \ + startup-notification \ + gnome-desktop \ +" + +EXTRA_OEMESON += " \ + -Dtests=false \ + -Dnative_tests=false \ + -Dxwayland_path=${bindir}/Xwayland \ +" + +# combi-config - see meson_options.txt for more details +PACKAGECONFIG[native-backend] = "-Dnative_backend=true -Dudev=true, -Dnative_backend=false -Dudev=false, libdrm virtual/libgbm libinput ${LOGIND} virtual/egl virtual/libgles2 udev" +PACKAGECONFIG[opengl] = "-Dopengl=true, -Dopengl=true, virtual/libgl" +PACKAGECONFIG[glx] = "-Dglx=true, -Dglx=false" +PACKAGECONFIG[libdisplay-info] = "-Dlibdisplay_info=true, -Dlibdisplay_info=false, libdisplay-info" +PACKAGECONFIG[libwacom] = "-Dlibwacom=true, -Dlibwacom=false, libwacom" +# Remove depending on pipewire-0.2 when mutter is upgraded to 3.36+ +PACKAGECONFIG[remote-desktop] = "-Dremote_desktop=true, -Dremote_desktop=false, pipewire" +PACKAGECONFIG[gnome-desktop] = "-Dlibgnome_desktop=true, -Dlibgnome_desktop=false, gnome-desktop gnome-settings-daemon" +PACKAGECONFIG[sm] = "-Dsm=true, -Dsm=false, libsm" +PACKAGECONFIG[sound-player] = "-Dsound_player=true, -Dsound_player=false, libcanberra" +PACKAGECONFIG[profiler] = "-Dprofiler=true,-Dprofiler=false,sysprof" +PACKAGECONFIG[startup-notification] = "-Dstartup_notification=true, -Dstartup_notification=false, startup-notification, startup-notification" + +MUTTER_API_NAME = "mutter-14" + +do_install:prepend() { + sed -i -e 's|${B}/||g' ${B}/cogl/cogl/cogl-enum-types.c + sed -i -e 's|${B}/||g' ${B}/clutter/clutter/clutter-enum-types.c + sed -i -e 's|${B}/||g' ${B}/src/meta-private-enum-types.c + sed -i -e 's|${B}/||g' ${B}/src/meta/meta-enum-types.c +} + +do_install:append() { + # Add gir links in standard paths. That makes dependents life much easier + # to find them + install -d ${D}${datadir}/gir-1.0 + for gir_full in `find ${D}${libdir}/${MUTTER_API_NAME} -name '*.gir'`; do + gir=`basename "$gir_full"` + ln -sr "${D}${libdir}/${MUTTER_API_NAME}/$gir" "${D}${datadir}/gir-1.0/$gir" + done +} + +GSETTINGS_PACKAGE = "${PN}-gsettings" + +PACKAGES =+ "${PN}-tests ${PN}-gsettings" + +FILES:${PN} += " \ + ${datadir}/gnome-control-center \ + ${datadir}/gir-1.0 \ + ${libdir}/${MUTTER_API_NAME}/lib*${SOLIBS} \ + ${libdir}/${MUTTER_API_NAME}/*.typelib \ + ${libdir}/${MUTTER_API_NAME}/plugins \ +" + +FILES:${PN}-tests += " \ + ${datadir}/installed-tests \ + ${datadir}/${MUTTER_API_NAME}/tests \ + ${libexecdir}/installed-tests/${MUTTER_API_NAME} \ +" + +FILES:${PN}-dev += " \ + ${libdir}/${MUTTER_API_NAME}/*.gir \ + ${libdir}/${MUTTER_API_NAME}/lib*.so \ +" + +RDEPENDS:${PN} += "${PN}-gsettings gsettings-desktop-schemas" + diff --git a/sources/meta-openembedded/meta-gnome/recipes-gnome/nautilus/nautilus_45.1.bb b/sources/meta-openembedded/meta-gnome/recipes-gnome/nautilus/nautilus_45.1.bb deleted file mode 100644 index 9c0d154e..00000000 --- a/sources/meta-openembedded/meta-gnome/recipes-gnome/nautilus/nautilus_45.1.bb +++ /dev/null @@ -1,54 +0,0 @@ -SUMMARY = "File manager for GNOME" -SECTION = "x11/gnome" - -LICENSE="GPL-3.0-only" -LIC_FILES_CHKSUM = "file://LICENSE;md5=d32239bcb673463ab874e80d47fae504" - - -DEPENDS = " \ - appstream-glib-native \ - desktop-file-utils-native \ - glib-2.0 \ - gnome-autoar \ - gnome-desktop \ - gtk4 \ - libadwaita \ - libcloudproviders \ - libhandy \ - libportal \ - libxml2 \ - tracker \ -" - -inherit gnomebase gsettings gobject-introspection gi-docgen gettext features_check mime-xdg gtk-icon-cache - -SRC_URI[archive.sha256sum] = "23bdaa9a85466c5937a89daddd080ed03bcc2b49e8b64af607206353bde82fe3" - -REQUIRED_DISTRO_FEATURES = "x11 opengl gobject-introspection-data" - -GIDOCGEN_MESON_OPTION = "docs" -GIDOCGEN_MESON_ENABLE_FLAG = 'true' -GIDOCGEN_MESON_DISABLE_FLAG = 'false' - -EXTRA_OEMESON += " \ - -Dtests=none \ -" - -PACKAGECONFIG = "extensions" -PACKAGECONFIG[extensions] = "-Dextensions=true,-Dextensions=false, gexiv2 gstreamer1.0-plugins-base gdk-pixbuf" -PACKAGECONFIG[packagekit] = "-Dpackagekit=true,-Dpackagekit=false,packagekit" - -do_install:prepend() { - sed -i -e 's|${B}/||g' ${B}/src/nautilus-enum-types.c -} - -FILES:${PN} += " \ - ${datadir}/dbus-1 \ - ${datadir}/metainfo \ - ${datadir}/gnome-shell \ - ${datadir}/tracker3 \ -" - -# mandatory - not checked during configuration: -# | (org.gnome.Nautilus:863): GLib-GIO-ERROR **: 21:03:52.326: Settings schema 'org.freedesktop.Tracker.Miner.Files' is not installed -RDEPENDS:${PN} += "tracker-miners bubblewrap" diff --git a/sources/meta-openembedded/meta-gnome/recipes-gnome/nautilus/nautilus_46.2.bb b/sources/meta-openembedded/meta-gnome/recipes-gnome/nautilus/nautilus_46.2.bb new file mode 100644 index 00000000..30e0681a --- /dev/null +++ b/sources/meta-openembedded/meta-gnome/recipes-gnome/nautilus/nautilus_46.2.bb @@ -0,0 +1,54 @@ +SUMMARY = "File manager for GNOME" +SECTION = "x11/gnome" + +LICENSE="GPL-3.0-only" +LIC_FILES_CHKSUM = "file://LICENSE;md5=d32239bcb673463ab874e80d47fae504" + + +DEPENDS = " \ + appstream-glib-native \ + desktop-file-utils-native \ + glib-2.0 \ + gnome-autoar \ + gnome-desktop \ + gtk4 \ + libadwaita \ + libcloudproviders \ + libhandy \ + libportal \ + libxml2 \ + tracker \ +" + +inherit gnomebase gsettings gobject-introspection gi-docgen gettext features_check mime-xdg gtk-icon-cache + +SRC_URI[archive.sha256sum] = "6ee8c99019b9e3447f6918d68232a20deca89e5525c05805432b7d8840ca71fa" + +REQUIRED_DISTRO_FEATURES = "x11 opengl gobject-introspection-data" + +GIDOCGEN_MESON_OPTION = "docs" +GIDOCGEN_MESON_ENABLE_FLAG = 'true' +GIDOCGEN_MESON_DISABLE_FLAG = 'false' + +EXTRA_OEMESON += " \ + -Dtests=none \ +" + +PACKAGECONFIG = "extensions" +PACKAGECONFIG[extensions] = "-Dextensions=true,-Dextensions=false, gexiv2 gstreamer1.0-plugins-base gdk-pixbuf" +PACKAGECONFIG[packagekit] = "-Dpackagekit=true,-Dpackagekit=false,packagekit" + +do_install:prepend() { + sed -i -e 's|${B}/||g' ${B}/src/nautilus-enum-types.c +} + +FILES:${PN} += " \ + ${datadir}/dbus-1 \ + ${datadir}/metainfo \ + ${datadir}/gnome-shell \ + ${datadir}/tracker3 \ +" + +# mandatory - not checked during configuration: +# | (org.gnome.Nautilus:863): GLib-GIO-ERROR **: 21:03:52.326: Settings schema 'org.freedesktop.Tracker.Miner.Files' is not installed +RDEPENDS:${PN} += "tracker-miners bubblewrap" diff --git a/sources/meta-openembedded/meta-gnome/recipes-gnome/sysprof/sysprof/0001-libsysprof-Check-for-unw_set_caching_policy-before-u.patch b/sources/meta-openembedded/meta-gnome/recipes-gnome/sysprof/sysprof/0001-libsysprof-Check-for-unw_set_caching_policy-before-u.patch new file mode 100644 index 00000000..2dca95da --- /dev/null +++ b/sources/meta-openembedded/meta-gnome/recipes-gnome/sysprof/sysprof/0001-libsysprof-Check-for-unw_set_caching_policy-before-u.patch @@ -0,0 +1,27 @@ +From a3316e607db2a64e030df8551455c5700b5ddfcf Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 25 Jul 2024 20:18:17 -0700 +Subject: [PATCH] libsysprof: Check for unw_set_caching_policy before using + +llvm libunwind does not implement unw_cache_* functions yet + +Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/sysprof/-/merge_requests/95] +Signed-off-by: Khem Raj +--- + src/libsysprof/preload/backtrace-helper.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/libsysprof/preload/backtrace-helper.h b/src/libsysprof/preload/backtrace-helper.h +index 88dc194..5c23ad3 100644 +--- a/src/libsysprof/preload/backtrace-helper.h ++++ b/src/libsysprof/preload/backtrace-helper.h +@@ -32,7 +32,9 @@ static void + backtrace_init (void) + { + #ifdef ENABLE_LIBUNWIND ++# ifdef UNW_CACHE_PER_THREAD + unw_set_caching_policy (unw_local_addr_space, UNW_CACHE_PER_THREAD); ++# endif + # ifdef HAVE_UNW_SET_CACHE_SIZE + unw_set_cache_size (unw_local_addr_space, 1024, 0); + #endif diff --git a/sources/meta-openembedded/meta-gnome/recipes-gnome/sysprof/sysprof/0001-meson-Check-for-libunwind-instead-of-libunwind-gener.patch b/sources/meta-openembedded/meta-gnome/recipes-gnome/sysprof/sysprof/0001-meson-Check-for-libunwind-instead-of-libunwind-gener.patch index dc702a0e..ea9bdb2e 100644 --- a/sources/meta-openembedded/meta-gnome/recipes-gnome/sysprof/sysprof/0001-meson-Check-for-libunwind-instead-of-libunwind-gener.patch +++ b/sources/meta-openembedded/meta-gnome/recipes-gnome/sysprof/sysprof/0001-meson-Check-for-libunwind-instead-of-libunwind-gener.patch @@ -6,22 +6,22 @@ Subject: [PATCH] meson: Check for libunwind instead of libunwind-generic This helps it to use llvm unwinder since libunwind-generic is specific to nongnu libunwind. -Upstream-Status: Pending +Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/sysprof/-/merge_requests/95] Signed-off-by: Khem Raj --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build -index 2835782..0fdb39a 100644 +index 3d3d8b5..4a1963d 100644 --- a/meson.build +++ b/meson.build -@@ -81,7 +81,7 @@ config_h.set10('HAVE_POLKIT_AGENT', polkit_agent_dep.found()) - config_h.set10('HAVE_POLKIT', polkit_dep.found()) - +@@ -96,7 +96,7 @@ config_h.set10('HAVE_POLKIT', polkit_dep.found()) if get_option('libunwind') -- libunwind_dep = dependency('libunwind-generic') -+ libunwind_dep = dependency('libunwind') + # Force libunwind usage if it's specified to avoid back compiles + # and backtrace() showing up in builds +- libunwind_dep = dependency('libunwind-generic', required: true) ++ libunwind_dep = dependency('libunwind', required: true) config_h.set('ENABLE_LIBUNWIND', libunwind_dep.found()) config_h.set('HAVE_UNW_SET_CACHE_SIZE', libunwind_dep.found() and cc.has_header_symbol('libunwind.h', 'unw_set_cache_size', dependencies: [libunwind_dep])) endif diff --git a/sources/meta-openembedded/meta-gnome/recipes-gnome/sysprof/sysprof/0002-meson-Do-not-invoke-the-commands-to-update-the-icon-.patch b/sources/meta-openembedded/meta-gnome/recipes-gnome/sysprof/sysprof/0002-meson-Do-not-invoke-the-commands-to-update-the-icon-.patch new file mode 100644 index 00000000..998c20c6 --- /dev/null +++ b/sources/meta-openembedded/meta-gnome/recipes-gnome/sysprof/sysprof/0002-meson-Do-not-invoke-the-commands-to-update-the-icon-.patch @@ -0,0 +1,32 @@ +From 9ad120283f4b61b97da67f18a95bb3b4f1e8a3b9 Mon Sep 17 00:00:00 2001 +From: Carlos Alberto Lopez Perez +Date: Wed, 24 Jul 2024 15:51:05 +0100 +Subject: [PATCH] meson: Do not invoke the commands to update the icon caches + when cross-building + +This does not have any useful efect when cross-building and it requires +the cross-builder environment to have gtk4-native built in order to invoke +gtk-update-icon-cache program. + +Upstream-Status: Pending +Signed-off-by: Carlos Alberto Lopez Perez +--- + meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index 3d3d8b5..da622f1 100644 +--- a/meson.build ++++ b/meson.build +@@ -250,7 +250,7 @@ configure_file( + configuration: config_h + ) + +-if get_option('gtk') and gnome.found() ++if get_option('gtk') and gnome.found() and not meson.is_cross_build() + gnome.post_install( + gtk_update_icon_cache: true, + update_desktop_database: true +-- +2.39.2 + diff --git a/sources/meta-openembedded/meta-gnome/recipes-gnome/sysprof/sysprof_3.44.0.bb b/sources/meta-openembedded/meta-gnome/recipes-gnome/sysprof/sysprof_3.44.0.bb deleted file mode 100644 index 3523bad3..00000000 --- a/sources/meta-openembedded/meta-gnome/recipes-gnome/sysprof/sysprof_3.44.0.bb +++ /dev/null @@ -1,43 +0,0 @@ -SUMMARY = "System-wide Performance Profiler for Linux" -HOMEPAGE = "http://www.sysprof.com" -LICENSE = "GPL-3.0-or-later" -LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ - file://src/sysprof/sysprof-application.c;endline=17;md5=a3de8df3b0f8876dd01e1388d2d4b607" - -inherit gnomebase gnome-help gettext systemd upstream-version-is-even gsettings mime mime-xdg - -DEPENDS += " \ - glib-2.0-native \ - yelp-tools-native \ - libxml2-native \ - glib-2.0 \ - json-glib \ -" - -SRC_URI += "file://0001-meson-Check-for-libunwind-instead-of-libunwind-gener.patch" -SRC_URI[archive.sha256sum] = "ab5d9f5b71973b3088d58a1bfdf1dc23c39a02f5fce4e5e9c73e034b178b005b" - -PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'polkit', 'sysprofd libsysprof', '', d)} \ - ${@bb.utils.contains_any('DISTRO_FEATURES', '${GTK3DISTROFEATURES}', 'gtk', '', d)} \ - libunwind" -# nongnu libunwind needs porting to RV32 -PACKAGECONFIG:remove:riscv32 = "libunwind" - -PACKAGECONFIG[gtk] = "-Denable_gtk=true,-Denable_gtk=false,gtk+3 libdazzle" -PACKAGECONFIG[sysprofd] = "-Dwith_sysprofd=bundled,-Dwith_sysprofd=none,polkit" -PACKAGECONFIG[libsysprof] = "-Dlibsysprof=true,-Dlibsysprof=false,polkit" -PACKAGECONFIG[libunwind] = "-Dlibunwind=true,-Dlibunwind=false,libunwind" - -EXTRA_OEMESON += "-Dsystemdunitdir=${systemd_unitdir}/system" - -SOLIBS = ".so" -FILES_SOLIBSDEV = "" - -SYSTEMD_SERVICE:${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'sysprofd', 'sysprof2.service sysprof3.service', '', d)}" - -FILES:${PN} += " \ - ${datadir}/dbus-1/system-services \ - ${datadir}/dbus-1/system.d \ - ${datadir}/dbus-1/interfaces \ - ${datadir}/metainfo \ -" diff --git a/sources/meta-openembedded/meta-gnome/recipes-gnome/sysprof/sysprof_3.48.0.bb b/sources/meta-openembedded/meta-gnome/recipes-gnome/sysprof/sysprof_3.48.0.bb new file mode 100644 index 00000000..fccca1d8 --- /dev/null +++ b/sources/meta-openembedded/meta-gnome/recipes-gnome/sysprof/sysprof_3.48.0.bb @@ -0,0 +1,50 @@ +SUMMARY = "System-wide Performance Profiler for Linux" +HOMEPAGE = "http://www.sysprof.com" +LICENSE = "GPL-3.0-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ + file://src/sysprof/sysprof-application.c;endline=17;md5=a3de8df3b0f8876dd01e1388d2d4b607" + +inherit gnomebase gnome-help gettext systemd upstream-version-is-even gsettings mime mime-xdg + +DEPENDS += " \ + glib-2.0-native \ + yelp-tools-native \ + libxml2-native \ + glib-2.0 \ + json-glib \ +" + +SRC_URI += "file://0001-meson-Check-for-libunwind-instead-of-libunwind-gener.patch \ + file://0002-meson-Do-not-invoke-the-commands-to-update-the-icon-.patch \ + file://0001-libsysprof-Check-for-unw_set_caching_policy-before-u.patch \ + " +SRC_URI[archive.sha256sum] = "07d9081a66cf2fb52753f48ff2b85ada75c60ff1bc1af1bd14d8aeb627972168" + +PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'polkit', 'sysprofd', '', d)} \ + ${@bb.utils.contains_any('DISTRO_FEATURES', '${GTK3DISTROFEATURES}', 'gtk', '', d)} \ + agent \ + libsysprof \ + libunwind \ + " +# nongnu libunwind needs porting to RV32 +PACKAGECONFIG:remove:riscv32 = "libunwind" + +PACKAGECONFIG[gtk] = "-Dgtk=true,-Dgtk=false,gtk4 libadwaita" +PACKAGECONFIG[sysprofd] = "-Dsysprofd=bundled,-Dsysprofd=none,polkit" +PACKAGECONFIG[libsysprof] = "-Dlibsysprof=true,-Dlibsysprof=false,json-glib" +PACKAGECONFIG[libunwind] = "-Dlibunwind=true,-Dlibunwind=false,libunwind" +PACKAGECONFIG[agent] = "-Dagent=true,-Dagent=false," + +EXTRA_OEMESON += "-Dsystemdunitdir=${systemd_unitdir}/system" + +SOLIBS = ".so" +FILES_SOLIBSDEV = "" + +SYSTEMD_SERVICE:${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'sysprofd', 'sysprof2.service sysprof3.service', '', d)}" + +FILES:${PN} += " \ + ${datadir}/dbus-1/system-services \ + ${datadir}/dbus-1/system.d \ + ${datadir}/dbus-1/interfaces \ + ${datadir}/metainfo \ +" diff --git a/sources/meta-openembedded/meta-gnome/recipes-gnome/tecla/tecla_46.0.bb b/sources/meta-openembedded/meta-gnome/recipes-gnome/tecla/tecla_46.0.bb deleted file mode 100644 index 62b3aa3e..00000000 --- a/sources/meta-openembedded/meta-gnome/recipes-gnome/tecla/tecla_46.0.bb +++ /dev/null @@ -1,16 +0,0 @@ -SUMMARY = "Tecla is a keyboard layout viewer that uses GTK/Libadwaita for UI, and libxkbcommon to deal with keyboard maps." -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://LICENSE;md5=75859989545e37968a99b631ef42722e" - -DEPENDS = " \ - libxkbcommon \ - libadwaita \ - wayland \ - gtk4 \ -" - -REQUIRED_DISTRO_FEATURES = "wayland" - -inherit gnomebase pkgconfig features_check - -SRC_URI[archive.sha256sum] = "4a081eab867a5a8b09758991cad7645920f323aabca954408290fb6f44591b0f" diff --git a/sources/meta-openembedded/meta-gnome/recipes-gnome/tecla/tecla_47.0.bb b/sources/meta-openembedded/meta-gnome/recipes-gnome/tecla/tecla_47.0.bb new file mode 100644 index 00000000..e430b167 --- /dev/null +++ b/sources/meta-openembedded/meta-gnome/recipes-gnome/tecla/tecla_47.0.bb @@ -0,0 +1,16 @@ +SUMMARY = "Tecla is a keyboard layout viewer that uses GTK/Libadwaita for UI, and libxkbcommon to deal with keyboard maps." +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://LICENSE;md5=75859989545e37968a99b631ef42722e" + +DEPENDS = " \ + libxkbcommon \ + libadwaita \ + wayland \ + gtk4 \ +" + +REQUIRED_DISTRO_FEATURES = "wayland" + +inherit gnomebase pkgconfig features_check + +SRC_URI[archive.sha256sum] = "0790b99ec29137a54b546c510661a99aa6f039c8d75f10c08e928682c0804fe5" diff --git a/sources/meta-openembedded/meta-gnome/recipes-gnome/tracker/tracker-miners/0001-Set-header-file-to-a-fixed-path-instead-of-a-host-pa.patch b/sources/meta-openembedded/meta-gnome/recipes-gnome/tracker/tracker-miners/0001-Set-header-file-to-a-fixed-path-instead-of-a-host-pa.patch index 7a40ae33..36dd4a58 100644 --- a/sources/meta-openembedded/meta-gnome/recipes-gnome/tracker/tracker-miners/0001-Set-header-file-to-a-fixed-path-instead-of-a-host-pa.patch +++ b/sources/meta-openembedded/meta-gnome/recipes-gnome/tracker/tracker-miners/0001-Set-header-file-to-a-fixed-path-instead-of-a-host-pa.patch @@ -7,21 +7,22 @@ Upstream-Status: Inappropriate [embedded specific] Signed-off-by: Lei Maohui --- - src/libtracker-miners-common/tracker-miner-enum-types.c.template | 1 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + .../tracker-miners-enum-types.c.template | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libtracker-miners-common/tracker-miners-enum-types.c.template b/src/libtracker-miners-common/tracker-miners-enum-types.c.template -index c712dda..cb449e2 100644 +index 4db7ef1..7c44c13 100644 --- a/src/libtracker-miners-common/tracker-miners-enum-types.c.template +++ b/src/libtracker-miners-common/tracker-miners-enum-types.c.template @@ -7,7 +7,7 @@ - + /*** BEGIN file-production ***/ /* enumerations from "@basename@" */ -#include "@filename@" +#include "tracker-enums.h" /*** END file-production ***/ + + +-- +2.34.1 - --- -2.25.1 diff --git a/sources/meta-openembedded/meta-gnome/recipes-gnome/tracker/tracker-miners/0001-fix-reproducibility.patch b/sources/meta-openembedded/meta-gnome/recipes-gnome/tracker/tracker-miners/0001-fix-reproducibility.patch index 98618e5d..0812e88a 100644 --- a/sources/meta-openembedded/meta-gnome/recipes-gnome/tracker/tracker-miners/0001-fix-reproducibility.patch +++ b/sources/meta-openembedded/meta-gnome/recipes-gnome/tracker/tracker-miners/0001-fix-reproducibility.patch @@ -1,4 +1,4 @@ -From 2bbd07843e8ec34311cafab35f21b40c86e0dd7f Mon Sep 17 00:00:00 2001 +From 1b7a34b7de9eb2ae776f7cf4dc6221f49b2395ee Mon Sep 17 00:00:00 2001 From: Markus Volk Date: Tue, 12 Sep 2023 17:00:41 +0200 Subject: [PATCH] meson: fix reproducibility @@ -12,16 +12,18 @@ Upstream-Status: Inappropriate [oe-specific] Signed-off-by: Markus Volk --- - meson.build | 20 ++++++++++---------- - src/tracker-extract/meson.build | 2 +- - tests/tracker-miner-fs/meson.build | 2 +- - 3 files changed, 12 insertions(+), 12 deletions(-) + meson.build | 8 ++++---- + src/libtracker-miners-common/tracker-landlock.c | 4 ++-- + src/miners/fs/meson.build | 4 ++-- + src/tracker-extract/meson.build | 2 +- + tests/tracker-miner-fs/meson.build | 2 +- + 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/meson.build b/meson.build -index 935584185..aa6126081 100644 +index 37f5148..18f4bfa 100644 --- a/meson.build +++ b/meson.build -@@ -380,7 +380,7 @@ conf.set('PACKAGE_VERSION', '"@0@"'.format(meson.project_version())) +@@ -393,7 +393,7 @@ conf.set('PACKAGE_VERSION', '"@0@"'.format(meson.project_version())) conf.set('TRACKER_VERSION', '"@0@"'.format(meson.project_version())) # Config that goes in some other generated files (.desktop, .pc, etc) @@ -30,7 +32,7 @@ index 935584185..aa6126081 100644 conf.set('exec_prefix', get_option('prefix')) conf.set('bindir', join_paths(get_option('prefix'), get_option('bindir'))) conf.set('datadir', datadir) -@@ -409,7 +409,7 @@ tracker_c_args = [ +@@ -422,7 +422,7 @@ tracker_c_args = [ configinc = include_directories('./') srcinc = include_directories('src/') @@ -39,7 +41,7 @@ index 935584185..aa6126081 100644 # We use tracker-miners-3.0 rather than tracker3-miners inside the lib64 # directory, following the existing convention in that directory. -@@ -438,8 +438,8 @@ subdir('data') +@@ -451,8 +451,8 @@ subdir('data') subdir('docs') test_c_args = tracker_c_args + [ @@ -50,11 +52,48 @@ index 935584185..aa6126081 100644 ] if get_option('tests_tap_protocol') +diff --git a/src/libtracker-miners-common/tracker-landlock.c b/src/libtracker-miners-common/tracker-landlock.c +index 6d4510b..189d2fb 100644 +--- a/src/libtracker-miners-common/tracker-landlock.c ++++ b/src/libtracker-miners-common/tracker-landlock.c +@@ -282,7 +282,7 @@ tracker_landlock_init (const gchar * const *indexed_folders) + LANDLOCK_ACCESS_FS_READ_DIR); + } + } +- ++#if 0 + current_dir = g_get_current_dir (); + + /* Detect running in-tree */ +@@ -302,7 +302,7 @@ tracker_landlock_init (const gchar * const *indexed_folders) + in_tree_rules[i].flags); + } + } +- ++#endif + /* Add user cache for readonly databases */ + #ifdef MINER_FS_CACHE_LOCATION + add_rule (landlock_fd, MINER_FS_CACHE_LOCATION, +diff --git a/src/miners/fs/meson.build b/src/miners/fs/meson.build +index 6e58832..04750f8 100644 +--- a/src/miners/fs/meson.build ++++ b/src/miners/fs/meson.build +@@ -67,8 +67,8 @@ executable('tracker-miner-fs-@0@'.format(tracker_api_major), + dependencies: tracker_miner_fs_deps, + c_args: [ + tracker_c_args, +- '-DBUILDROOT="@0@"'.format(meson.global_build_root()), +- '-DBUILD_EXTRACTDIR="@0@"'.format(meson.build_root() / 'src' / 'tracker-extract'), ++ '-DBUILDROOT="@0@"'.format(get_option('prefix') / 'src'), ++ '-DBUILD_EXTRACTDIR="@0@"'.format(get_option('prefix') / 'src' / 'tracker-extract'), + '-DLIBEXECDIR="@0@"'.format(get_option('prefix') / get_option('libexecdir')), + ], + install: true, diff --git a/src/tracker-extract/meson.build b/src/tracker-extract/meson.build -index 4aaad5c41..d17cce221 100644 +index 2e4f61d..b47581c 100644 --- a/src/tracker-extract/meson.build +++ b/src/tracker-extract/meson.build -@@ -159,7 +159,7 @@ endif +@@ -158,7 +158,7 @@ endif executable('tracker-extract-@0@'.format(tracker_api_major), tracker_extract_sources, # Manually add the root dir to work around https://github.com/mesonbuild/meson/issues/1387 @@ -64,10 +103,10 @@ index 4aaad5c41..d17cce221 100644 dependencies: tracker_extract_dependencies, install: true, diff --git a/tests/tracker-miner-fs/meson.build b/tests/tracker-miner-fs/meson.build -index e131b85ad..59e509fa6 100644 +index 8c081fd..9792082 100644 --- a/tests/tracker-miner-fs/meson.build +++ b/tests/tracker-miner-fs/meson.build -@@ -19,7 +19,7 @@ libtracker_miner_test_c_args = [ +@@ -18,7 +18,7 @@ libtracker_miner_test_c_args = [ ] libtracker_miner_test_environment = environment() @@ -76,43 +115,3 @@ index e131b85ad..59e509fa6 100644 libtracker_miner_test_deps = [tracker_miners_common_dep, tracker_miner_dep, tracker_sparql] - -diff --git a/src/miners/fs/meson.build b/src/miners/fs/meson.build -index 6e5883288..04750f82b 100644 ---- a/src/miners/fs/meson.build -+++ b/src/miners/fs/meson.build -@@ -67,8 +67,8 @@ executable('tracker-miner-fs-@0@'.format(tracker_api_major), - dependencies: tracker_miner_fs_deps, - c_args: [ - tracker_c_args, -- '-DBUILDROOT="@0@"'.format(meson.global_build_root()), -- '-DBUILD_EXTRACTDIR="@0@"'.format(meson.build_root() / 'src' / 'tracker-extract'), -+ '-DBUILDROOT="@0@"'.format(get_option('prefix') / 'src'), -+ '-DBUILD_EXTRACTDIR="@0@"'.format(get_option('prefix') / 'src' / 'tracker-extract'), - '-DLIBEXECDIR="@0@"'.format(get_option('prefix') / get_option('libexecdir')), - ], - install: true, -diff --git a/src/libtracker-miners-common/tracker-landlock.c b/src/libtracker-miners-common/tracker-landlock.c -index 27e7db65b..3021343eb 100644 ---- a/src/libtracker-miners-common/tracker-landlock.c -+++ b/src/libtracker-miners-common/tracker-landlock.c -@@ -276,7 +276,7 @@ - LANDLOCK_ACCESS_FS_READ_DIR); - } - } -- -+#if 0 - current_dir = g_get_current_dir (); - - /* Detect running in-tree */ -@@ -296,7 +296,7 @@ - in_tree_rules[i].flags); - } - } -- -+#endif - /* Add user cache for readonly databases */ - #ifdef MINER_FS_CACHE_LOCATION - add_rule (landlock_fd, MINER_FS_CACHE_LOCATION, --- -2.41.0 diff --git a/sources/meta-openembedded/meta-gnome/recipes-gnome/tracker/tracker-miners_3.7.1.bb b/sources/meta-openembedded/meta-gnome/recipes-gnome/tracker/tracker-miners_3.7.1.bb deleted file mode 100644 index 7bbee2a8..00000000 --- a/sources/meta-openembedded/meta-gnome/recipes-gnome/tracker/tracker-miners_3.7.1.bb +++ /dev/null @@ -1,86 +0,0 @@ -SUMMARY = "Tracker miners and metadata extractors" -LICENSE = "GPL-2.0-only & LGPL-2.1-only" -LIC_FILES_CHKSUM = " \ - file://COPYING.GPL;md5=ee31012bf90e7b8c108c69f197f3e3a4 \ - file://COPYING.LGPL;md5=2d5025d4aa3495befef8f17206a5b0a1 \ -" - -DEPENDS = " \ - intltool-native \ - tracker \ - zlib \ -" - - -inherit gnomebase gsettings gobject-introspection vala bash-completion features_check - -SRC_URI:append = " \ - file://0001-fix-reproducibility.patch \ - file://0001-Set-header-file-to-a-fixed-path-instead-of-a-host-pa.patch \ -" -SRC_URI[archive.sha256sum] = "50a3abe40cfb0b35ced43ec716dbf1368992e444ef7a0babf202c7ac6ab2f6f4" - -# gobject-introspection is mandatory and cannot be configured -REQUIRED_DISTRO_FEATURES = "gobject-introspection-data" -GIR_MESON_OPTION = "" -VALA_MESON_OPTION = "" - -PACKAGECONFIG ??= " \ - ${@bb.utils.contains("LICENSE_FLAGS_ACCEPTED", "commercial", "ffmpeg", "", d)} \ - gexiv2 \ - gstreamer \ - icu \ - libexif \ - libgsf \ - jpeg \ - pdf \ - png \ - tiff \ - raw \ - xml \ - ${@bb.utils.filter('DISTRO_FEATURES', 'seccomp', d)} \ - battery \ - networkmanager \ -" -# Needs tgkill API which musl does not support -# see https://www.openwall.com/lists/musl/2019/08/02/1 -PACKAGECONFIG:remove:libc-musl = "seccomp" - -PACKAGECONFIG[battery] = "-Dbattery_detection=upower,-Dbattery_detection=none,upower" -PACKAGECONFIG[cue] = "-Dcue=enabled,-Dcue=disabled,libcue" -PACKAGECONFIG[ffmpeg] = "-Dgeneric_media_extractor=libav,,ffmpeg" -PACKAGECONFIG[gexiv2] = ",,gexiv2" -PACKAGECONFIG[gstreamer] = "-Dgeneric_media_extractor=gstreamer,,gstreamer1.0 gstreamer1.0-plugins-base" -PACKAGECONFIG[gupnp] = "-Dgstreamer_backend=gupnp,,gupnp-dlna" -PACKAGECONFIG[gif] = "-Dgif=enabled,-Dgif=disabled,giflib" -PACKAGECONFIG[icu] = "-Dcharset_detection=icu,,icu" -PACKAGECONFIG[iso] = "-Diso=enabled,-Diso=disabled,libosinfo" -PACKAGECONFIG[jpeg] = "-Djpeg=enabled,-Djpeg=disabled,jpeg" -PACKAGECONFIG[libexif] = "-Dexif=enabled,-Dexif=disabled,libexif" -PACKAGECONFIG[libgsf] = "-Dgsf=enabled,-Dgsf=disabled,libgsf" -PACKAGECONFIG[pdf] = "-Dpdf=enabled,-Dpdf=disabled,poppler" -PACKAGECONFIG[png] = "-Dpng=enabled,-Dpng=disabled,libpng" -PACKAGECONFIG[tiff] = "-Dtiff=enabled,-Dtiff=disabled,tiff" -PACKAGECONFIG[raw] = "-Draw=enabled,-Draw=disabled,libraw" -PACKAGECONFIG[xml] = "-Dxml=enabled,-Dxml=disabled,libxml2" -PACKAGECONFIG[networkmanager] = "-Dnetwork_manager=enabled,-Dnetwork_manager=disabled,networkmanager" -PACKAGECONFIG[landlock] = "-Dlandlock=enabled,-Dlandlock=disabled" - -# For security reasons it is strongly recommended to set add meta-security in -# your layers and 'libseccomp' to PACKAGECONFIG". -PACKAGECONFIG[seccomp] = "-Dseccomp=true,-Dseccomp=false,libseccomp" -# not yet in meta-gnome -PACKAGECONFIG[rss] = "-Dminer_rss=true,-Dminer_rss=false,libgrss" - -EXTRA_OEMESON += " \ - -Dman=false \ - -Dsystemd_user_services=${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)} \ - -Dsystemd_user_services_dir=${systemd_user_unitdir} \ -" - - -FILES:${PN} += " \ - ${datadir} \ - ${libdir}/tracker-miners-3.0 \ - ${systemd_user_unitdir} \ -" diff --git a/sources/meta-openembedded/meta-gnome/recipes-gnome/tracker/tracker-miners_3.7.3.bb b/sources/meta-openembedded/meta-gnome/recipes-gnome/tracker/tracker-miners_3.7.3.bb new file mode 100644 index 00000000..2b2dc7c4 --- /dev/null +++ b/sources/meta-openembedded/meta-gnome/recipes-gnome/tracker/tracker-miners_3.7.3.bb @@ -0,0 +1,86 @@ +SUMMARY = "Tracker miners and metadata extractors" +LICENSE = "GPL-2.0-only & LGPL-2.1-only" +LIC_FILES_CHKSUM = " \ + file://COPYING.GPL;md5=ee31012bf90e7b8c108c69f197f3e3a4 \ + file://COPYING.LGPL;md5=2d5025d4aa3495befef8f17206a5b0a1 \ +" + +DEPENDS = " \ + intltool-native \ + tracker \ + zlib \ +" + + +inherit gnomebase gsettings gobject-introspection vala bash-completion features_check + +SRC_URI:append = " \ + file://0001-fix-reproducibility.patch \ + file://0001-Set-header-file-to-a-fixed-path-instead-of-a-host-pa.patch \ +" +SRC_URI[archive.sha256sum] = "e74388154b5c197b4b7ee42f0dce8c5fbbddd4d361093ef88d4fb303e33da5fe" + +# gobject-introspection is mandatory and cannot be configured +REQUIRED_DISTRO_FEATURES = "gobject-introspection-data" +GIR_MESON_OPTION = "" +VALA_MESON_OPTION = "" + +PACKAGECONFIG ??= " \ + ${@bb.utils.contains("LICENSE_FLAGS_ACCEPTED", "commercial", "ffmpeg", "", d)} \ + gexiv2 \ + gstreamer \ + icu \ + libexif \ + libgsf \ + jpeg \ + pdf \ + png \ + tiff \ + raw \ + xml \ + ${@bb.utils.filter('DISTRO_FEATURES', 'seccomp', d)} \ + battery \ + networkmanager \ +" +# Needs tgkill API which musl does not support +# see https://www.openwall.com/lists/musl/2019/08/02/1 +PACKAGECONFIG:remove:libc-musl = "seccomp" + +PACKAGECONFIG[battery] = "-Dbattery_detection=upower,-Dbattery_detection=none,upower" +PACKAGECONFIG[cue] = "-Dcue=enabled,-Dcue=disabled,libcue" +PACKAGECONFIG[ffmpeg] = "-Dgeneric_media_extractor=libav,,ffmpeg" +PACKAGECONFIG[gexiv2] = ",,gexiv2" +PACKAGECONFIG[gstreamer] = "-Dgeneric_media_extractor=gstreamer,,gstreamer1.0 gstreamer1.0-plugins-base" +PACKAGECONFIG[gupnp] = "-Dgstreamer_backend=gupnp,,gupnp-dlna" +PACKAGECONFIG[gif] = "-Dgif=enabled,-Dgif=disabled,giflib" +PACKAGECONFIG[icu] = "-Dcharset_detection=icu,,icu" +PACKAGECONFIG[iso] = "-Diso=enabled,-Diso=disabled,libosinfo" +PACKAGECONFIG[jpeg] = "-Djpeg=enabled,-Djpeg=disabled,jpeg" +PACKAGECONFIG[libexif] = "-Dexif=enabled,-Dexif=disabled,libexif" +PACKAGECONFIG[libgsf] = "-Dgsf=enabled,-Dgsf=disabled,libgsf" +PACKAGECONFIG[pdf] = "-Dpdf=enabled,-Dpdf=disabled,poppler" +PACKAGECONFIG[png] = "-Dpng=enabled,-Dpng=disabled,libpng" +PACKAGECONFIG[tiff] = "-Dtiff=enabled,-Dtiff=disabled,tiff" +PACKAGECONFIG[raw] = "-Draw=enabled,-Draw=disabled,libraw" +PACKAGECONFIG[xml] = "-Dxml=enabled,-Dxml=disabled,libxml2" +PACKAGECONFIG[networkmanager] = "-Dnetwork_manager=enabled,-Dnetwork_manager=disabled,networkmanager" +PACKAGECONFIG[landlock] = "-Dlandlock=enabled,-Dlandlock=disabled" + +# For security reasons it is strongly recommended to set add meta-security in +# your layers and 'libseccomp' to PACKAGECONFIG". +PACKAGECONFIG[seccomp] = "-Dseccomp=true,-Dseccomp=false,libseccomp" +# not yet in meta-gnome +PACKAGECONFIG[rss] = "-Dminer_rss=true,-Dminer_rss=false,libgrss" + +EXTRA_OEMESON += " \ + -Dman=false \ + -Dsystemd_user_services=${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)} \ + -Dsystemd_user_services_dir=${systemd_user_unitdir} \ +" + + +FILES:${PN} += " \ + ${datadir} \ + ${libdir}/tracker-miners-3.0 \ + ${systemd_user_unitdir} \ +" diff --git a/sources/meta-openembedded/meta-gnome/recipes-gnome/tracker/tracker_3.7.1.bb b/sources/meta-openembedded/meta-gnome/recipes-gnome/tracker/tracker_3.7.1.bb deleted file mode 100644 index 1d5c79ab..00000000 --- a/sources/meta-openembedded/meta-gnome/recipes-gnome/tracker/tracker_3.7.1.bb +++ /dev/null @@ -1,59 +0,0 @@ -SUMMARY = "Tracker is a file search engine" -LICENSE = "GPL-2.0-only & LGPL-2.1-only" -LIC_FILES_CHKSUM = " \ - file://COPYING.GPL;md5=ee31012bf90e7b8c108c69f197f3e3a4 \ - file://COPYING.LGPL;md5=2d5025d4aa3495befef8f17206a5b0a1 \ -" - -DEPENDS = " \ - dbus-native \ - python3-pygobject-native \ - glib-2.0 \ - sqlite3 \ - libarchive \ - dbus \ - icu \ - json-glib \ - libsoup-3.0 \ - libstemmer \ -" - - -inherit gettext gnomebase gobject-introspection vala gtk-doc bash-completion python3native - -SRC_URI += "file://0001-fix-reproducibility.patch" -SRC_URI[archive.sha256sum] = "cd91b885ee9839cde5387f8e05ed24a7108d1627629cb6b1b2aa51a9603e130a" - -# text search is not an option anymore and requires sqlite3 build with -# PACKAGECONFIG[fts5] set (default) - -# set required cross property sqlite3_has_fts5 -do_write_config[vardeps] += "PACKAGECONFIG" -do_write_config:append() { - echo "[properties]" > ${WORKDIR}/meson-tracker.cross - echo "sqlite3_has_fts5 = 'true'" >> ${WORKDIR}/meson-tracker.cross -} - -EXTRA_OEMESON = " \ - --cross-file ${WORKDIR}/meson-tracker.cross \ - -Dman=false \ - -Dsystemd_user_services=${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)} \ - -Dsystemd_user_services_dir=${systemd_user_unitdir} \ - -Dsoup=soup3 \ - ${@bb.utils.contains('GI_DATA_ENABLED', 'True', '-Dvapi=enabled', '-Dvapi=disabled', d)} \ -" - -do_install:prepend() { - sed -i -e 's|${B}/../${PN}-${PV}|${TARGET_DBGSRC_DIR}|g' ${B}/src/libtracker-sparql/tracker-sparql-enum-types.c - sed -i -e 's|${B}/../${PN}-${PV}|${TARGET_DBGSRC_DIR}|g' ${B}/src/libtracker-sparql/core/tracker-data-enum-types.c -} - -GIR_MESON_ENABLE_FLAG = 'enabled' -GIR_MESON_DISABLE_FLAG = 'disabled' - -FILES:${PN} += " \ - ${datadir}/dbus-1 \ - ${datadir}/tracker3 \ - ${libdir}/tracker-3.0 \ - ${systemd_user_unitdir} \ -" diff --git a/sources/meta-openembedded/meta-gnome/recipes-gnome/tracker/tracker_3.7.3.bb b/sources/meta-openembedded/meta-gnome/recipes-gnome/tracker/tracker_3.7.3.bb new file mode 100644 index 00000000..885f3515 --- /dev/null +++ b/sources/meta-openembedded/meta-gnome/recipes-gnome/tracker/tracker_3.7.3.bb @@ -0,0 +1,59 @@ +SUMMARY = "Tracker is a file search engine" +LICENSE = "GPL-2.0-only & LGPL-2.1-only" +LIC_FILES_CHKSUM = " \ + file://COPYING.GPL;md5=ee31012bf90e7b8c108c69f197f3e3a4 \ + file://COPYING.LGPL;md5=2d5025d4aa3495befef8f17206a5b0a1 \ +" + +DEPENDS = " \ + dbus-native \ + python3-pygobject-native \ + glib-2.0 \ + sqlite3 \ + libarchive \ + dbus \ + icu \ + json-glib \ + libsoup-3.0 \ + libstemmer \ +" + + +inherit gettext gnomebase gobject-introspection vala gtk-doc bash-completion python3native + +SRC_URI += "file://0001-fix-reproducibility.patch" +SRC_URI[archive.sha256sum] = "ab3d4a50937e04c5ed7846f6dbb999e2909819402f389ca592ee6b77dd28d1f9" + +# text search is not an option anymore and requires sqlite3 build with +# PACKAGECONFIG[fts5] set (default) + +# set required cross property sqlite3_has_fts5 +do_write_config[vardeps] += "PACKAGECONFIG" +do_write_config:append() { + echo "[properties]" > ${WORKDIR}/meson-tracker.cross + echo "sqlite3_has_fts5 = 'true'" >> ${WORKDIR}/meson-tracker.cross +} + +EXTRA_OEMESON = " \ + --cross-file ${WORKDIR}/meson-tracker.cross \ + -Dman=false \ + -Dsystemd_user_services=${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)} \ + -Dsystemd_user_services_dir=${systemd_user_unitdir} \ + -Dsoup=soup3 \ + ${@bb.utils.contains('GI_DATA_ENABLED', 'True', '-Dvapi=enabled', '-Dvapi=disabled', d)} \ +" + +do_install:prepend() { + sed -i -e 's|${B}/../${PN}-${PV}|${TARGET_DBGSRC_DIR}|g' ${B}/src/libtracker-sparql/tracker-sparql-enum-types.c + sed -i -e 's|${B}/../${PN}-${PV}|${TARGET_DBGSRC_DIR}|g' ${B}/src/libtracker-sparql/core/tracker-data-enum-types.c +} + +GIR_MESON_ENABLE_FLAG = 'enabled' +GIR_MESON_DISABLE_FLAG = 'disabled' + +FILES:${PN} += " \ + ${datadir}/dbus-1 \ + ${datadir}/tracker3 \ + ${libdir}/tracker-3.0 \ + ${systemd_user_unitdir} \ +" diff --git a/sources/meta-openembedded/meta-gnome/recipes-gnome/yelp/yelp_42.2.bb b/sources/meta-openembedded/meta-gnome/recipes-gnome/yelp/yelp_42.2.bb index 1b3ded02..14986f26 100644 --- a/sources/meta-openembedded/meta-gnome/recipes-gnome/yelp/yelp_42.2.bb +++ b/sources/meta-openembedded/meta-gnome/recipes-gnome/yelp/yelp_42.2.bb @@ -39,3 +39,5 @@ FILES:${PN} += " \ " RDEPENDS:${PN} += "yelp-xsl" + +CVE_STATUS[CVE-2008-3533] = "cpe-incorrect: The current version (42.2) is not affected. Fixed in 2.24." diff --git a/sources/meta-openembedded/meta-gnome/recipes-gnome/zenity/zenity_4.0.1.bb b/sources/meta-openembedded/meta-gnome/recipes-gnome/zenity/zenity_4.0.1.bb deleted file mode 100644 index 88b4b5c8..00000000 --- a/sources/meta-openembedded/meta-gnome/recipes-gnome/zenity/zenity_4.0.1.bb +++ /dev/null @@ -1,26 +0,0 @@ -SUMMARY = "Display dialog boxes from the command line and shell scripts" -SECTION = "x11/gnome" -LICENSE = "LGPL-2.1-or-later" -LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" - -inherit gnomebase pkgconfig itstool gtk-icon-cache features_check gettext - -DEPENDS = " \ - desktop-file-utils-native \ - help2man-native \ - hicolor-icon-theme \ - gtk4 \ - gtk4-native \ - libadwaita \ -" - -ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" -REQUIRED_DISTRO_FEATURES = "opengl" -GTKIC_VERSION = "4" - -SRC_URI[archive.sha256sum] = "0c2f537813b10f728470d9d05d6c95713db2512f9c95096e1e85b1a6739605e6" - -PACKAGECONFIG ?= "webkitgtk" -PACKAGECONFIG[webkitgtk] = "-Dwebkitgtk=true,-Dwebkitgtk=false,webkitgtk" - -FILES:${PN}-doc = "${datadir}/man ${datadir}/help" diff --git a/sources/meta-openembedded/meta-gnome/recipes-gnome/zenity/zenity_4.0.2.bb b/sources/meta-openembedded/meta-gnome/recipes-gnome/zenity/zenity_4.0.2.bb new file mode 100644 index 00000000..801eaae8 --- /dev/null +++ b/sources/meta-openembedded/meta-gnome/recipes-gnome/zenity/zenity_4.0.2.bb @@ -0,0 +1,26 @@ +SUMMARY = "Display dialog boxes from the command line and shell scripts" +SECTION = "x11/gnome" +LICENSE = "LGPL-2.1-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" + +inherit gnomebase pkgconfig itstool gtk-icon-cache features_check gettext + +DEPENDS = " \ + desktop-file-utils-native \ + help2man-native \ + hicolor-icon-theme \ + gtk4 \ + gtk4-native \ + libadwaita \ +" + +ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" +REQUIRED_DISTRO_FEATURES = "opengl" +GTKIC_VERSION = "4" + +SRC_URI[archive.sha256sum] = "c16dcae46e29e22c2fa0b95e80e06c96b2aec93840161369c95c85ed9f093153" + +PACKAGECONFIG ?= "webkitgtk" +PACKAGECONFIG[webkitgtk] = "-Dwebkitgtk=true,-Dwebkitgtk=false,webkitgtk" + +FILES:${PN}-doc = "${datadir}/man ${datadir}/help" diff --git a/sources/meta-openembedded/meta-gnome/recipes-support/colord-gtk/colord-gtk_0.3.0.bb b/sources/meta-openembedded/meta-gnome/recipes-support/colord-gtk/colord-gtk_0.3.0.bb deleted file mode 100644 index 0e86d781..00000000 --- a/sources/meta-openembedded/meta-gnome/recipes-support/colord-gtk/colord-gtk_0.3.0.bb +++ /dev/null @@ -1,25 +0,0 @@ -SUMMARY = "GTK support library for colord" -HOMEPAGE = "https://www.freedesktop.org/software/colord/" -LICENSE = "LGPL-3.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=e6a600fd5e1d9cbde2d983680233ad02" - -inherit meson gobject-introspection gettext gtk-doc features_check - -DEPENDS = " \ - colord \ -" - -SRC_URI = "http://www.freedesktop.org/software/colord/releases/${BPN}-${PV}.tar.xz" -SRC_URI[sha256sum] = "b9466656d66d9a6ffbc2dd04fa91c8f6af516bf9efaacb69744eec0f56f3c1d0" - -PACKAGECONFIG ??= "gtk3 gtk4" -PACKAGECONFIG[gtk3] = "-Dgtk3=true, -Dgtk3=false, gtk+3" -PACKAGECONFIG[gtk4] = "-Dgtk4=true, -Dgtk4=false, gtk4" - -EXTRA_OEMESON = "-Dman=false" -GIR_MESON_OPTION = "" -# gobject-introspection is mandatory and cannot be configured -REQUIRED_DISTRO_FEATURES = "gobject-introspection-data" - -# colord -REQUIRED_DISTRO_FEATURES += "polkit" diff --git a/sources/meta-openembedded/meta-gnome/recipes-support/colord-gtk/colord-gtk_0.3.1.bb b/sources/meta-openembedded/meta-gnome/recipes-support/colord-gtk/colord-gtk_0.3.1.bb new file mode 100644 index 00000000..1c6d34e4 --- /dev/null +++ b/sources/meta-openembedded/meta-gnome/recipes-support/colord-gtk/colord-gtk_0.3.1.bb @@ -0,0 +1,25 @@ +SUMMARY = "GTK support library for colord" +HOMEPAGE = "https://www.freedesktop.org/software/colord/" +LICENSE = "LGPL-3.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=e6a600fd5e1d9cbde2d983680233ad02" + +inherit meson gobject-introspection gettext gtk-doc features_check + +DEPENDS = " \ + colord \ +" + +SRC_URI = "http://www.freedesktop.org/software/colord/releases/${BPN}-${PV}.tar.xz" +SRC_URI[sha256sum] = "c176b889b75630a17f4e3d7ef24c09a3e12368e633496087459c8b53ac3a122d" + +PACKAGECONFIG ??= "gtk3 gtk4" +PACKAGECONFIG[gtk3] = "-Dgtk3=true, -Dgtk3=false, gtk+3" +PACKAGECONFIG[gtk4] = "-Dgtk4=true, -Dgtk4=false, gtk4" + +EXTRA_OEMESON = "-Dman=false" +GIR_MESON_OPTION = "" +# gobject-introspection is mandatory and cannot be configured +REQUIRED_DISTRO_FEATURES = "gobject-introspection-data" + +# colord +REQUIRED_DISTRO_FEATURES += "polkit" diff --git a/sources/meta-openembedded/meta-gnome/recipes-support/xdg-desktop-portal/xdg-desktop-portal-gnome_46.1.bb b/sources/meta-openembedded/meta-gnome/recipes-support/xdg-desktop-portal/xdg-desktop-portal-gnome_46.1.bb deleted file mode 100644 index 847907a5..00000000 --- a/sources/meta-openembedded/meta-gnome/recipes-support/xdg-desktop-portal/xdg-desktop-portal-gnome_46.1.bb +++ /dev/null @@ -1,31 +0,0 @@ -SUMMARY = "A xdg-desktop-portal backend for gnome." -HOMEPAGE = "https://gitlab.gnome.org/GNOME/xdg-desktop-portal-gnome" -LICENSE = "LGPL-2.1-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" - -DEPENDS = " \ - glib-2.0-native \ - gtk4\ - xdg-desktop-portal \ - xdg-desktop-portal-gtk \ - libadwaita \ - fontconfig \ - gsettings-desktop-schemas \ - gnome-desktop \ - dconf \ -" - -RDEPENDS:${PN} = "xdg-desktop-portal xdg-desktop-portal-gtk" - -inherit gnomebase pkgconfig gsettings features_check - -REQUIRED_DISTRO_FEATURES = "polkit" - -SRC_URI[archive.sha256sum] = "7e8d9623e9d96a89c0897616827cd441dcf2832927d38f135c722552b1172aa1" - -PACKAGECONFIG ?= "screenshot screencast ${@bb.utils.filter('DISTRO_FEATURES', 'wayland', d)}" -PACKAGECONFIG[wayland] = ",,wayland-native" -PACKAGECONFIG[screenshot] = ",,,gnome-shell" -PACKAGECONFIG[screencast] = ",,,mutter" - -FILES:${PN} += "${systemd_user_unitdir} ${datadir}" diff --git a/sources/meta-openembedded/meta-gnome/recipes-support/xdg-desktop-portal/xdg-desktop-portal-gnome_46.2.bb b/sources/meta-openembedded/meta-gnome/recipes-support/xdg-desktop-portal/xdg-desktop-portal-gnome_46.2.bb new file mode 100644 index 00000000..e1dd8afa --- /dev/null +++ b/sources/meta-openembedded/meta-gnome/recipes-support/xdg-desktop-portal/xdg-desktop-portal-gnome_46.2.bb @@ -0,0 +1,31 @@ +SUMMARY = "A xdg-desktop-portal backend for gnome." +HOMEPAGE = "https://gitlab.gnome.org/GNOME/xdg-desktop-portal-gnome" +LICENSE = "LGPL-2.1-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" + +DEPENDS = " \ + glib-2.0-native \ + gtk4\ + xdg-desktop-portal \ + xdg-desktop-portal-gtk \ + libadwaita \ + fontconfig \ + gsettings-desktop-schemas \ + gnome-desktop \ + dconf \ +" + +RDEPENDS:${PN} = "xdg-desktop-portal xdg-desktop-portal-gtk" + +inherit gnomebase pkgconfig gsettings features_check + +REQUIRED_DISTRO_FEATURES = "polkit" + +SRC_URI[archive.sha256sum] = "b5c65ea25e8483502d033a613be6dc6b71883ac07f1a3e474ad18049c47d16d6" + +PACKAGECONFIG ?= "screenshot screencast ${@bb.utils.filter('DISTRO_FEATURES', 'wayland', d)}" +PACKAGECONFIG[wayland] = ",,wayland-native" +PACKAGECONFIG[screenshot] = ",,,gnome-shell" +PACKAGECONFIG[screencast] = ",,,mutter" + +FILES:${PN} += "${systemd_user_unitdir} ${datadir}" diff --git a/sources/meta-openembedded/meta-initramfs/README.md b/sources/meta-openembedded/meta-initramfs/README.md index da7acfca..0005c4a4 100644 --- a/sources/meta-openembedded/meta-initramfs/README.md +++ b/sources/meta-openembedded/meta-initramfs/README.md @@ -12,17 +12,17 @@ Dependencies This layer depends on: URI: git://git.openembedded.org/meta-openembedded -branch: scarthgap +branch: styhead Maintenance ----------- Send patches / pull requests to openembedded-devel@lists.openembedded.org -with '[meta-initramfs][scarthgap]' in the subject. +with '[meta-initramfs][styhead]' in the subject. When sending single patches, please using something like: -git send-email -M -1 --to openembedded-devel@lists.openembedded.org --subject-prefix='meta-initramfs][scarthgap][PATCH' +git send-email -M -1 --to openembedded-devel@lists.openembedded.org --subject-prefix='meta-initramfs][styhead][PATCH' Interm layer maintainer: Armin Kuster diff --git a/sources/meta-openembedded/meta-initramfs/classes/klibc.bbclass b/sources/meta-openembedded/meta-initramfs/classes/klibc.bbclass index 202d132d..ca50a3d4 100644 --- a/sources/meta-openembedded/meta-initramfs/classes/klibc.bbclass +++ b/sources/meta-openembedded/meta-initramfs/classes/klibc.bbclass @@ -9,7 +9,7 @@ CC:append:armv7ve = " ${@' -mfloat-abi=${TUNE_CCARGS_MFLOAT}' if (d.getVar('TUNE CC:append:armv7a = " ${@' -mfloat-abi=${TUNE_CCARGS_MFLOAT}' if (d.getVar('TUNE_CCARGS_MFLOAT') != '') else ''}" # klcc uses own optimizations by default. See klcc(1) man file. -export CFLAGS="${TUNE_CCARGS}" +export CFLAGS="${TUNE_CCARGS} ${DEBUG_PREFIX_MAP}" export CPPFLAGS="${TUNE_CCARGS}" export LDFLAGS="${TUNE_CCARGS}" diff --git a/sources/meta-openembedded/meta-initramfs/conf/layer.conf b/sources/meta-openembedded/meta-initramfs/conf/layer.conf index 25023cfc..c844085b 100644 --- a/sources/meta-openembedded/meta-initramfs/conf/layer.conf +++ b/sources/meta-openembedded/meta-initramfs/conf/layer.conf @@ -16,7 +16,7 @@ BBFILE_PATTERN_meta-initramfs := "^${LAYERDIR}/" BBFILE_PRIORITY_meta-initramfs = "5" LAYERDEPENDS_meta-initramfs = "core" -LAYERSERIES_COMPAT_meta-initramfs = "scarthgap" +LAYERSERIES_COMPAT_meta-initramfs = "styhead" SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += " \ dracut->virtual/kernel \ diff --git a/sources/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/kexecboot-cfg_0.2.bb b/sources/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/kexecboot-cfg_0.2.bb index 2dce19c6..d8134b22 100644 --- a/sources/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/kexecboot-cfg_0.2.bb +++ b/sources/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/kexecboot-cfg_0.2.bb @@ -6,7 +6,8 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda SRC_URI = "file://icon.xpm" -S = "${WORKDIR}" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" do_install:prepend () { echo '# /boot/boot.cfg - KEXECBOOT configuration file. diff --git a/sources/meta-openembedded/meta-initramfs/recipes-core/initrdscripts/initramfs-debug_1.0.bb b/sources/meta-openembedded/meta-initramfs/recipes-core/initrdscripts/initramfs-debug_1.0.bb index 4c063465..c2b3fadd 100644 --- a/sources/meta-openembedded/meta-initramfs/recipes-core/initrdscripts/initramfs-debug_1.0.bb +++ b/sources/meta-openembedded/meta-initramfs/recipes-core/initrdscripts/initramfs-debug_1.0.bb @@ -3,10 +3,11 @@ LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" SRC_URI = "file://init-debug.sh" -S = "${WORKDIR}" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" do_install() { - install -m 0755 ${WORKDIR}/init-debug.sh ${D}/init + install -m 0755 ${UNPACKDIR}/init-debug.sh ${D}/init } inherit allarch diff --git a/sources/meta-openembedded/meta-initramfs/recipes-devtools/dracut/dracut/0001-Guard-against-__GLIBC_PREREQ-for-musl-libc.patch b/sources/meta-openembedded/meta-initramfs/recipes-devtools/dracut/dracut/0001-Guard-against-__GLIBC_PREREQ-for-musl-libc.patch deleted file mode 100644 index bd768d00..00000000 --- a/sources/meta-openembedded/meta-initramfs/recipes-devtools/dracut/dracut/0001-Guard-against-__GLIBC_PREREQ-for-musl-libc.patch +++ /dev/null @@ -1,35 +0,0 @@ -From ff5e1a662ba93ba79e2aeaaaec48a2a8ec4b4701 Mon Sep 17 00:00:00 2001 -From: Yi Zhao -Date: Thu, 31 Mar 2022 22:22:44 +0800 -Subject: [PATCH] Guard against __GLIBC_PREREQ for musl libc - -Upstream-Status: Pending - -Signed-off-by: Yi Zhao ---- - src/install/util.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/src/install/util.c b/src/install/util.c -index 5721de89..784aec48 100644 ---- a/src/install/util.c -+++ b/src/install/util.c -@@ -27,6 +27,7 @@ - - #include "util.h" - -+#if defined(__GLIBC__) - #if __GLIBC_PREREQ(2, 30) == 0 - #include - #ifndef SYS_gettid -@@ -35,6 +36,7 @@ - - #define gettid() ((pid_t) syscall(SYS_gettid)) - #endif /*__GLIBC_PREREQ */ -+#endif /*__GLIBC__*/ - - size_t page_size(void) - { --- -2.25.1 - diff --git a/sources/meta-openembedded/meta-initramfs/recipes-devtools/dracut/dracut/0001-feat-dracut-install-split-ldd-command-arguments-for-.patch b/sources/meta-openembedded/meta-initramfs/recipes-devtools/dracut/dracut/0001-feat-dracut-install-split-ldd-command-arguments-for-.patch new file mode 100644 index 00000000..febdbdbd --- /dev/null +++ b/sources/meta-openembedded/meta-initramfs/recipes-devtools/dracut/dracut/0001-feat-dracut-install-split-ldd-command-arguments-for-.patch @@ -0,0 +1,91 @@ +From 38dea7dd671fd621b563377cfbd95e4783568c6e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zolt=C3=A1n=20B=C3=B6sz=C3=B6rm=C3=A9nyi?= + +Date: Fri, 7 Jun 2024 10:32:40 +0200 +Subject: [PATCH] feat(dracut-install): split ldd command arguments for + execvp() +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This restores a not-so-subtle feature of previously executing ldd +via popen(), i.e. the ability to use a cross-compiled sysroot. + +The ldd command may be passed in via the DRACUT_LDD environment +variable, and the command may contain command line arguments. +The number of such arguments are not known in advance. + +Split the command into executable and arguments and run it +via execvp(). + +Fixes: d010fa0d7f8ef42ad31729d027d2e4be6dd6e588 +Signed-off-by: Zoltán Böszörményi +Upstream-Status: Submitted [https://github.com/dracut-ng/dracut-ng/pull/339] +--- + src/install/dracut-install.c | 47 +++++++++++++++++++++++++++++++++++- + 1 file changed, 46 insertions(+), 1 deletion(-) + +diff --git a/src/install/dracut-install.c b/src/install/dracut-install.c +index e9708c45..724b27b5 100644 +--- a/src/install/dracut-install.c ++++ b/src/install/dracut-install.c +@@ -559,10 +559,55 @@ static int resolve_deps(const char *src) + log_debug("%s %s", ldd, fullsrcpath); + pid_t ldd_pid; + if ((ldd_pid = fork()) == 0) { ++ char **cmdline = NULL; ++ int start, pos, idx = 0; ++ /* Account for at least 2 elements plus the terminating NULL in cmdline */ ++ int args = 3; ++ ++ /* Estimate the number of space-separated elements in the "ldd" string */ ++ pos = 0; ++ while (isspace(ldd[pos])) ++ pos++; ++ for (; ldd[pos]; pos++) { ++ if (isspace(ldd[pos])) { ++ if (pos) ++ args++; ++ while (isspace(ldd[pos])) ++ pos++; ++ } ++ } ++ ++ cmdline = malloc(args * sizeof(char *)); ++ memset(cmdline, 0, args * sizeof(char *)); ++ ++ pos = 0; ++ while (isspace(ldd[pos])) ++ pos++; ++ start = pos; ++ for (; ldd[pos]; pos++) { ++ while (ldd[pos] && !isspace(ldd[pos])) ++ pos++; ++ ++ cmdline[idx] = malloc(pos - start + 1); ++ memcpy(cmdline[idx], ldd + start, pos - start); ++ cmdline[idx][pos - start] = 0; ++ idx++; ++ ++ if (!ldd[pos]) ++ break; ++ ++ while (isspace(ldd[pos])) ++ pos++; ++ start = pos; ++ } ++ ++ cmdline[idx++] = fullsrcpath; ++ cmdline[idx] = NULL; ++ + dup2(fds[1], 1); + dup2(fds[1], 2); + putenv("LC_ALL=C"); +- execlp(ldd, ldd, fullsrcpath, (char *)NULL); ++ execvp(cmdline[0], cmdline); + _exit(errno == ENOENT ? 127 : 126); + } + close(fds[1]); +-- +2.45.2 + diff --git a/sources/meta-openembedded/meta-initramfs/recipes-devtools/dracut/dracut/0001-install-Do-not-undef-_FILE_OFFSET_BITS.patch b/sources/meta-openembedded/meta-initramfs/recipes-devtools/dracut/dracut/0001-install-Do-not-undef-_FILE_OFFSET_BITS.patch deleted file mode 100644 index 170df711..00000000 --- a/sources/meta-openembedded/meta-initramfs/recipes-devtools/dracut/dracut/0001-install-Do-not-undef-_FILE_OFFSET_BITS.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 7f8ef553b7c433af153d48c6a16b2943780abf67 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sat, 31 Dec 2022 14:41:52 -0800 -Subject: [PATCH] install: Do not undef _FILE_OFFSET_BITS - -_FILE_OFFSET_BITS is a feature test macro to determine largefile -support. Usually its set to 64 on systems supporting LFS. Its also -needed to be set to 64 for supporting 64bit time_t on glibc on 32bit -systems. If its undefined explicitly, then 64bit time_t can not be -enabled. - -Upstream-Status: Submitted [https://github.com/dracutdevs/dracut/pull/2157] -Signed-off-by: Khem Raj ---- - src/install/dracut-install.c | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/src/install/dracut-install.c b/src/install/dracut-install.c -index dda0caca..05a67a03 100644 ---- a/src/install/dracut-install.c -+++ b/src/install/dracut-install.c -@@ -22,7 +22,6 @@ - #ifndef _GNU_SOURCE - #define _GNU_SOURCE - #endif --#undef _FILE_OFFSET_BITS - #include - #include - #include --- -2.39.0 - diff --git a/sources/meta-openembedded/meta-initramfs/recipes-devtools/dracut/dracut/0001-util.h-include-sys-reg.h-when-libc-glibc.patch b/sources/meta-openembedded/meta-initramfs/recipes-devtools/dracut/dracut/0001-util.h-include-sys-reg.h-when-libc-glibc.patch deleted file mode 100644 index 68ec2b8f..00000000 --- a/sources/meta-openembedded/meta-initramfs/recipes-devtools/dracut/dracut/0001-util.h-include-sys-reg.h-when-libc-glibc.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 9f7740c4c2fda64029c23674e9858ce8bd4367df Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Thu, 13 Jul 2017 17:14:05 -0700 -Subject: [PATCH] util.h: include when libc != glibc - -For musl libc it is required to include to -have __WORDSIZE defined to e.g. 32 for arm*-musl. - -Taken from void-linux -https://github.com/voidlinux/void-packages/blob/master/srcpkgs/dracut/patches/musl-__wordsize.patch - -Signed-off-by: Khem Raj ---- -Upstream-Status: Pending - - src/install/util.h | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/src/install/util.h b/src/install/util.h -index a6f9a184..82732913 100644 ---- a/src/install/util.h -+++ b/src/install/util.h -@@ -36,6 +36,9 @@ - #include - #include - #include -+#if !defined(__GLIBC__) -+#include -+#endif - - #include "macro.h" - --- -2.17.1 - diff --git a/sources/meta-openembedded/meta-initramfs/recipes-devtools/dracut/dracut_056.bb b/sources/meta-openembedded/meta-initramfs/recipes-devtools/dracut/dracut_056.bb deleted file mode 100644 index db08fffe..00000000 --- a/sources/meta-openembedded/meta-initramfs/recipes-devtools/dracut/dracut_056.bb +++ /dev/null @@ -1,71 +0,0 @@ -SUMMARY = "Initramfs generator using udev" -HOMEPAGE = "https://dracut.wiki.kernel.org/index.php/Main_Page" -DESCRIPTION = "Dracut is an event driven initramfs infrastructure. dracut (the tool) is used to create an initramfs image by copying tools and files from an installed system and combining it with the dracut framework, usually found in /usr/lib/dracut/modules.d." - -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" - -PE = "1" - -SRCREV = "631d5f72a223288aa1f48bb8e8d0313e75947400" -SRC_URI = "git://git.kernel.org/pub/scm/boot/dracut/dracut.git;protocol=http;branch=master \ - file://0001-util.h-include-sys-reg.h-when-libc-glibc.patch \ - file://0001-Guard-against-__GLIBC_PREREQ-for-musl-libc.patch \ - file://0001-install-Do-not-undef-_FILE_OFFSET_BITS.patch \ - " - -DEPENDS += "kmod" -DEPENDS:append:libc-musl = " fts" - -inherit bash-completion pkgconfig - -S = "${WORKDIR}/git" - -EXTRA_OECONF = "--prefix=${prefix} \ - --libdir=${prefix}/lib \ - --datadir=${datadir} \ - --sysconfdir=${sysconfdir} \ - --sbindir=${sbindir} \ - --disable-documentation \ - --bindir=${bindir} \ - --includedir=${includedir} \ - --localstatedir=${localstatedir} \ - " - -# RDEPEND on systemd optionally -PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" -PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,,,systemd" - -EXTRA_OEMAKE += 'libdir=${prefix}/lib LDLIBS="${LDLIBS}"' - -CFLAGS:append = " -fPIC" -LDLIBS:append:libc-musl = " -lfts" - -do_configure() { - ./configure ${EXTRA_OECONF} -} - -do_install() { - oe_runmake install DESTDIR=${D} - # Its Makefile uses cp -arx to install modules.d, so fix the owner - # to root:root - chown -R root:root ${D}/${prefix}/lib/dracut/modules.d -} - -FILES:${PN} += "${prefix}/lib/kernel \ - ${prefix}/lib/dracut \ - ${systemd_unitdir} \ - " -FILES:${PN}-dbg += "${prefix}/lib/dracut/.debug" - -CONFFILES:${PN} += "${sysconfdir}/dracut.conf" - -RDEPENDS:${PN} = "findutils cpio util-linux-blkid util-linux-getopt util-linux bash ldd" - -# This could be optimized a bit, but let's avoid non-booting systems :) -RRECOMMENDS:${PN} = " \ - kernel-modules \ - coreutils \ - " - -CVE_STATUS[CVE-2010-4176] = "not-applicable-platform: Applies only to Fedora" diff --git a/sources/meta-openembedded/meta-initramfs/recipes-devtools/dracut/dracut_103.bb b/sources/meta-openembedded/meta-initramfs/recipes-devtools/dracut/dracut_103.bb new file mode 100644 index 00000000..3ee348db --- /dev/null +++ b/sources/meta-openembedded/meta-initramfs/recipes-devtools/dracut/dracut_103.bb @@ -0,0 +1,69 @@ +SUMMARY = "Initramfs generator using udev" +HOMEPAGE = "https://dracut.wiki.kernel.org/index.php/Main_Page" +DESCRIPTION = "Dracut is an event driven initramfs infrastructure. dracut (the tool) is used to create an initramfs image by copying tools and files from an installed system and combining it with the dracut framework, usually found in /usr/lib/dracut/modules.d." + +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +PE = "1" + +SRCREV = "3fce598fb45aa5618cdf885eb48cf327104ffcb8" +SRC_URI = "git://github.com/dracut-ng/dracut-ng.git;protocol=http;branch=main \ + file://0001-feat-dracut-install-split-ldd-command-arguments-for-.patch \ + " + +DEPENDS += "kmod" +DEPENDS:append:libc-musl = " fts" + +inherit bash-completion pkgconfig + +S = "${WORKDIR}/git" + +EXTRA_OECONF = "--prefix=${prefix} \ + --libdir=${prefix}/lib \ + --datadir=${datadir} \ + --sysconfdir=${sysconfdir} \ + --sbindir=${sbindir} \ + --disable-documentation \ + --bindir=${bindir} \ + --includedir=${includedir} \ + --localstatedir=${localstatedir} \ + " + +# RDEPEND on systemd optionally +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" +PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,,,systemd" + +EXTRA_OEMAKE += 'libdir=${prefix}/lib LDLIBS="${LDLIBS}"' + +CFLAGS:append = " -fPIC" +LDLIBS:append:libc-musl = " -lfts" + +do_configure() { + ./configure ${EXTRA_OECONF} +} + +do_install() { + oe_runmake install DESTDIR=${D} + # Its Makefile uses cp -arx to install modules.d, so fix the owner + # to root:root + chown -R root:root ${D}/${prefix}/lib/dracut/modules.d +} + +FILES:${PN} += "${prefix}/lib/kernel \ + ${prefix}/lib/dracut \ + ${systemd_unitdir} \ + " +FILES:${PN}-dbg += "${prefix}/lib/dracut/.debug" + +CONFFILES:${PN} += "${sysconfdir}/dracut.conf" + +RDEPENDS:${PN} = "findutils cpio util-linux-blkid util-linux-getopt util-linux bash ldd" + +# This could be optimized a bit, but let's avoid non-booting systems :) +RRECOMMENDS:${PN} = " \ + kernel-modules \ + coreutils \ + " + +CVE_STATUS[CVE-2010-4176] = "not-applicable-platform: Applies only to Fedora" diff --git a/sources/meta-openembedded/meta-multimedia/README.md b/sources/meta-openembedded/meta-multimedia/README.md index 66c139ac..b7d1248a 100644 --- a/sources/meta-openembedded/meta-multimedia/README.md +++ b/sources/meta-openembedded/meta-multimedia/README.md @@ -1,16 +1,16 @@ This layer depends on: URI: git://git.openembedded.org/openembedded-core -branch: scarthgap +branch: styhead URI: git://git.openembedded.org/meta-openembedded layers: meta-oe -branch: scarthgap +branch: styhead -Send pull requests to openembedded-devel@lists.openembedded.org with '[meta-multimedia][scarthgap]' in the subject +Send pull requests to openembedded-devel@lists.openembedded.org with '[meta-multimedia][styhead]' in the subject When sending single patches, please use something like: -git send-email -M -1 --to openembedded-devel@lists.openembedded.org --subject-prefix='meta-multimedia][scarthgap][PATCH' +git send-email -M -1 --to openembedded-devel@lists.openembedded.org --subject-prefix='meta-multimedia][styhead][PATCH' You are encouraged to fork the mirror on github https://github.com/openembedded/meta-openembedded to share your patches, this is preferred for patch sets consisting of more than one patch. Other services like GitLab, repo.or.cz or self hosted setups are of course accepted as well, 'git fetch ' works the same on all of them. We recommend github because it is free, easy to use, has been proven to be reliable and has a really good web GUI. diff --git a/sources/meta-openembedded/meta-multimedia/conf/layer.conf b/sources/meta-openembedded/meta-multimedia/conf/layer.conf index 82e6f362..0442a57a 100644 --- a/sources/meta-openembedded/meta-multimedia/conf/layer.conf +++ b/sources/meta-openembedded/meta-multimedia/conf/layer.conf @@ -31,4 +31,4 @@ LAYERVERSION_multimedia-layer = "1" LAYERDEPENDS_multimedia-layer = "core openembedded-layer meta-python" -LAYERSERIES_COMPAT_multimedia-layer = "scarthgap" +LAYERSERIES_COMPAT_multimedia-layer = "styhead" diff --git a/sources/meta-openembedded/meta-multimedia/recipes-connectivity/rygel/rygel_0.42.5.bb b/sources/meta-openembedded/meta-multimedia/recipes-connectivity/rygel/rygel_0.42.5.bb deleted file mode 100644 index e79bd77a..00000000 --- a/sources/meta-openembedded/meta-multimedia/recipes-connectivity/rygel/rygel_0.42.5.bb +++ /dev/null @@ -1,83 +0,0 @@ -SUMMARY = "A UPnP AV media server and renderer" -DESCRIPTION = "Rygel is a home media solution (UPnP AV MediaServer) that \ -allow you to easily share audio, video and pictures to other devices. \ -Additionally, media player software may use Rygel to become a MediaRenderer \ -that may be controlled remotely by a UPnP or DLNA Controller." -HOMEPAGE = "http://live.gnome.org/Rygel" - -LICENSE = "LGPL-2.1-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" - -DEPENDS = "libxml2 glib-2.0 gssdp gupnp gupnp-av gupnp-dlna gstreamer1.0 \ - gstreamer1.0-plugins-base libgee libsoup libmediaart-2.0 \ - libunistring sqlite3 intltool-native gst-editing-services" - -RDEPENDS:${PN} = "gstreamer1.0-plugins-base-playback shared-mime-info" -RRECOMMENDS:${PN} = "rygel-plugin-media-export" - -inherit gnomebase features_check vala gobject-introspection gettext systemd - -# gobject-introspection is mandatory for libmediaart-2.0 and cannot be configured -REQUIRED_DISTRO_FEATURES = "gobject-introspection-data x11" - -SRC_URI[archive.sha256sum] = "1133602d2e6710aade6b22aa98d93384c8d56396f344763413e96e0110b7d89f" - -GIR_MESON_ENABLE_FLAG = 'enabled' -GIR_MESON_DISABLE_FLAG = 'disabled' - -EXTRA_OEMESON = "-Dengines=gstreamer -Dplugins=${@strip_comma('${RYGEL_PLUGINS}')}" -PACKAGECONFIG:append = "${@bb.utils.contains("DISTRO_FEATURES", "x11", " gtk+3", "", d)}" - -PACKAGECONFIG ?= "external mpris ruih gst-launch media-export" - -PACKAGECONFIG[external] = "" -PACKAGECONFIG[mpris] = "" -PACKAGECONFIG[ruih] = "" -PACKAGECONFIG[media-export] = "" -PACKAGECONFIG[gst-launch] = "" -PACKAGECONFIG[lms] = "" -PACKAGECONFIG[tracker3] = "" -PACKAGECONFIG[gtk+3] = ",-Dgtk=disabled,gtk+3" - -RYGEL_PLUGINS = "" -RYGEL_PLUGINS:append ="${@bb.utils.contains('PACKAGECONFIG', 'external', ',external', '', d)}" -RYGEL_PLUGINS:append ="${@bb.utils.contains('PACKAGECONFIG', 'mpris', ',mpris', '', d)}" -RYGEL_PLUGINS:append ="${@bb.utils.contains('PACKAGECONFIG', 'ruih', ',ruih', '', d)}" -RYGEL_PLUGINS:append ="${@bb.utils.contains('PACKAGECONFIG', 'gst-launch', ',gst-launch', '', d)}" -RYGEL_PLUGINS:append ="${@bb.utils.contains('PACKAGECONFIG', 'lms', ',lms', '', d)}" -RYGEL_PLUGINS:append ="${@bb.utils.contains('PACKAGECONFIG', 'media-export', ',media-export', '', d)}" -RYGEL_PLUGINS:append ="${@bb.utils.contains('PACKAGECONFIG', 'tracker3', ',tracker3', '', d)}" -RYGEL_PLUGINS:append ="${@bb.utils.contains('PACKAGECONFIG', 'playbin', ',playbin', '', d)}" - -LIBV = "2.8" - -CFLAGS:append:toolchain-clang = " -Wno-error=int-conversion" - -def strip_comma(s): - return s.strip(',') - -do_install:append() { - # Remove .la files for loadable modules - rm -f ${D}/${libdir}/rygel-${LIBV}/engines/*.la - rm -f ${D}/${libdir}/rygel-${LIBV}/plugins/*.la -} - -FILES:${PN} += "${libdir}/rygel-${LIBV}/engines ${systemd_user_unitdir} ${datadir}/dbus-1 ${datadir}/icons" -FILES:${PN}-dbg += "${libdir}/rygel-${LIBV}/engines/.debug ${libdir}/rygel-${LIBV}/plugins/.debug" - -PACKAGES += "${PN}-meta" -ALLOW_EMPTY:${PN}-meta = "1" - -PACKAGES_DYNAMIC = "${PN}-plugin-*" - -python populate_packages:prepend () { - rygel_libdir = d.expand('${libdir}/rygel-${LIBV}') - postinst = d.getVar('plugin_postinst') - pkgs = [] - - pkgs += do_split_packages(d, oe.path.join(rygel_libdir, "plugins"), r'librygel-(.*)\.so$', d.expand('${PN}-plugin-%s'), 'Rygel plugin for %s', postinst=postinst, extra_depends=d.expand('${PN}')) - pkgs += do_split_packages(d, oe.path.join(rygel_libdir, "plugins"), r'(.*)\.plugin$', d.expand('${PN}-plugin-%s'), 'Rygel plugin for %s', postinst=postinst, extra_depends=d.expand('${PN}')) - - metapkg = d.getVar('PN') + '-meta' - d.setVar('RDEPENDS:' + metapkg, ' '.join(pkgs)) -} diff --git a/sources/meta-openembedded/meta-multimedia/recipes-connectivity/rygel/rygel_0.44.0.bb b/sources/meta-openembedded/meta-multimedia/recipes-connectivity/rygel/rygel_0.44.0.bb new file mode 100644 index 00000000..8a506af4 --- /dev/null +++ b/sources/meta-openembedded/meta-multimedia/recipes-connectivity/rygel/rygel_0.44.0.bb @@ -0,0 +1,83 @@ +SUMMARY = "A UPnP AV media server and renderer" +DESCRIPTION = "Rygel is a home media solution (UPnP AV MediaServer) that \ +allow you to easily share audio, video and pictures to other devices. \ +Additionally, media player software may use Rygel to become a MediaRenderer \ +that may be controlled remotely by a UPnP or DLNA Controller." +HOMEPAGE = "http://live.gnome.org/Rygel" + +LICENSE = "LGPL-2.1-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" + +DEPENDS = "libxml2 glib-2.0 gssdp gupnp gupnp-av gupnp-dlna gstreamer1.0 \ + gstreamer1.0-plugins-base libgee libsoup libmediaart-2.0 \ + libunistring sqlite3 intltool-native gst-editing-services" + +RDEPENDS:${PN} = "gstreamer1.0-plugins-base-playback shared-mime-info" +RRECOMMENDS:${PN} = "rygel-plugin-media-export" + +inherit gnomebase features_check vala gobject-introspection gettext systemd + +# gobject-introspection is mandatory for libmediaart-2.0 and cannot be configured +REQUIRED_DISTRO_FEATURES = "gobject-introspection-data x11" + +SRC_URI[archive.sha256sum] = "5e1a76507209290530e6ce0141fc76946009edfb0fac3ed9432130821e5e4e72" + +GIR_MESON_ENABLE_FLAG = 'enabled' +GIR_MESON_DISABLE_FLAG = 'disabled' + +EXTRA_OEMESON = "-Dengines=gstreamer -Dplugins=${@strip_comma('${RYGEL_PLUGINS}')}" +PACKAGECONFIG:append = "${@bb.utils.contains("DISTRO_FEATURES", "x11", " gtk+3", "", d)}" + +PACKAGECONFIG ?= "external mpris ruih gst-launch media-export" + +PACKAGECONFIG[external] = "" +PACKAGECONFIG[mpris] = "" +PACKAGECONFIG[ruih] = "" +PACKAGECONFIG[media-export] = "" +PACKAGECONFIG[gst-launch] = "" +PACKAGECONFIG[lms] = "" +PACKAGECONFIG[tracker3] = "" +PACKAGECONFIG[gtk+3] = ",-Dgtk=disabled,gtk+3" + +RYGEL_PLUGINS = "" +RYGEL_PLUGINS:append ="${@bb.utils.contains('PACKAGECONFIG', 'external', ',external', '', d)}" +RYGEL_PLUGINS:append ="${@bb.utils.contains('PACKAGECONFIG', 'mpris', ',mpris', '', d)}" +RYGEL_PLUGINS:append ="${@bb.utils.contains('PACKAGECONFIG', 'ruih', ',ruih', '', d)}" +RYGEL_PLUGINS:append ="${@bb.utils.contains('PACKAGECONFIG', 'gst-launch', ',gst-launch', '', d)}" +RYGEL_PLUGINS:append ="${@bb.utils.contains('PACKAGECONFIG', 'lms', ',lms', '', d)}" +RYGEL_PLUGINS:append ="${@bb.utils.contains('PACKAGECONFIG', 'media-export', ',media-export', '', d)}" +RYGEL_PLUGINS:append ="${@bb.utils.contains('PACKAGECONFIG', 'tracker3', ',tracker3', '', d)}" +RYGEL_PLUGINS:append ="${@bb.utils.contains('PACKAGECONFIG', 'playbin', ',playbin', '', d)}" + +LIBV = "2.8" + +CFLAGS:append:toolchain-clang = " -Wno-error=int-conversion" + +def strip_comma(s): + return s.strip(',') + +do_install:append() { + # Remove .la files for loadable modules + rm -f ${D}/${libdir}/rygel-${LIBV}/engines/*.la + rm -f ${D}/${libdir}/rygel-${LIBV}/plugins/*.la +} + +FILES:${PN} += "${libdir}/rygel-${LIBV}/engines ${systemd_user_unitdir} ${datadir}/dbus-1 ${datadir}/icons" +FILES:${PN}-dbg += "${libdir}/rygel-${LIBV}/engines/.debug ${libdir}/rygel-${LIBV}/plugins/.debug" + +PACKAGES += "${PN}-meta" +ALLOW_EMPTY:${PN}-meta = "1" + +PACKAGES_DYNAMIC = "${PN}-plugin-*" + +python populate_packages:prepend () { + rygel_libdir = d.expand('${libdir}/rygel-${LIBV}') + postinst = d.getVar('plugin_postinst') + pkgs = [] + + pkgs += do_split_packages(d, oe.path.join(rygel_libdir, "plugins"), r'librygel-(.*)\.so$', d.expand('${PN}-plugin-%s'), 'Rygel plugin for %s', postinst=postinst, extra_depends=d.expand('${PN}')) + pkgs += do_split_packages(d, oe.path.join(rygel_libdir, "plugins"), r'(.*)\.plugin$', d.expand('${PN}-plugin-%s'), 'Rygel plugin for %s', postinst=postinst, extra_depends=d.expand('${PN}')) + + metapkg = d.getVar('PN') + '-meta' + d.setVar('RDEPENDS:' + metapkg, ' '.join(pkgs)) +} diff --git a/sources/meta-openembedded/meta-multimedia/recipes-dvb/oscam/oscam_1.20.bb b/sources/meta-openembedded/meta-multimedia/recipes-dvb/oscam/oscam_1.20.bb new file mode 100644 index 00000000..e2035895 --- /dev/null +++ b/sources/meta-openembedded/meta-multimedia/recipes-dvb/oscam/oscam_1.20.bb @@ -0,0 +1,20 @@ +SUMMARY = "OSCam: Open Source Conditional Access Module" +HOMEPAGE = "http://www.streamboard.tv/oscam/" + +LICENSE = "GPL-3.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" + +DEPENDS = "libusb1 openssl pcsc-lite" + +SRCREV = "190d6dee96ca70f8b614932b1498332b1504632b" +SRC_URI = "git://repo.or.cz/oscam.git;protocol=https;nobranch=1" + +S = "${UNPACKDIR}/git" + +inherit cmake + +EXTRA_OECMAKE = "-DDEFAULT_CS_CONFDIR=${sysconfdir} -DCMAKE_BUILD_TYPE=Debug" + +do_configure:append() { + sed -i -e '1 s|${TOPDIR}||g' ${B}/config.c +} diff --git a/sources/meta-openembedded/meta-multimedia/recipes-dvb/oscam/oscam_svn.bb b/sources/meta-openembedded/meta-multimedia/recipes-dvb/oscam/oscam_svn.bb deleted file mode 100644 index 8fbf9ab2..00000000 --- a/sources/meta-openembedded/meta-multimedia/recipes-dvb/oscam/oscam_svn.bb +++ /dev/null @@ -1,22 +0,0 @@ -SUMMARY = "OSCam: Open Source Conditional Access Module" -HOMEPAGE = "http://www.streamboard.tv/oscam/" - -LICENSE = "GPL-3.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" - -DEPENDS = "libusb1 openssl pcsc-lite" - -SRC_URI = "svn://www.streamboard.tv/svn/oscam;module=trunk;protocol=http \ - " -SRCREV = "11718" -PV = "1.10+" - -S = "${WORKDIR}/trunk" - -inherit cmake - -EXTRA_OECMAKE = "-DDEFAULT_CS_CONFDIR=${sysconfdir} -DCMAKE_BUILD_TYPE=Debug" - -do_configure:append() { - sed -i -e '1 s|${TOPDIR}||g' ${B}/config.c -} diff --git a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/aravis/aravis_0.8.31.bb b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/aravis/aravis_0.8.31.bb index a4386e80..950ce253 100644 --- a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/aravis/aravis_0.8.31.bb +++ b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/aravis/aravis_0.8.31.bb @@ -4,7 +4,6 @@ DESCRIPTION = "\ It currently implements the gigabit ethernet and USB3 protocols used by industrial cameras.\ It also provides a basic ethernet camera simulator and a simple video viewer.\ " -AUTHOR = "Emmanuel Pacaud" HOMEPAGE = "https://github.com/AravisProject/aravis" LICENSE = "LGPL-2.1-only" LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" diff --git a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/bluealsa/bluealsa/0001-Use-basename-implementation-from-glib-2.0.patch b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/bluealsa/bluealsa/0001-Use-basename-implementation-from-glib-2.0.patch new file mode 100644 index 00000000..fbd145e6 --- /dev/null +++ b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/bluealsa/bluealsa/0001-Use-basename-implementation-from-glib-2.0.patch @@ -0,0 +1,88 @@ +From 070ed35ac5cef8138ed4760582bb72e8d3e136e2 Mon Sep 17 00:00:00 2001 +From: Arkadiusz Bokowy +Date: Sun, 25 Aug 2024 08:42:39 +0200 +Subject: [PATCH] Fix compilation on strict POSIX platforms + +Signed-off-by: Khem Raj +Upstream-Status: Submitted [https://github.com/arkq/bluez-alsa/commit/070ed35ac5cef8138ed4760582bb72e8d3e136e2] +--- + src/main.c | 2 +- + test/mock/mock.c | 2 +- + utils/aplay/aplay.c | 1 + + utils/cli/cli.c | 1 + + utils/rfcomm/rfcomm.c | 1 + + 5 files changed, 5 insertions(+), 2 deletions(-) + +diff --git a/src/main.c b/src/main.c +index 96a66aee..eeb80165 100644 +--- a/src/main.c ++++ b/src/main.c +@@ -13,13 +13,13 @@ + #endif + + #include ++#include + #include + #include + #include + #include + #include + #include +-#include + #include + #include + #include +diff --git a/test/mock/mock.c b/test/mock/mock.c +index 947211a3..0a2f6091 100644 +--- a/test/mock/mock.c ++++ b/test/mock/mock.c +@@ -20,12 +20,12 @@ + #include + #include + #include ++#include + #include + #include + #include + #include + #include +-#include + #include + #include + #include +diff --git a/utils/aplay/aplay.c b/utils/aplay/aplay.c +index 3de77902..36843e95 100644 +--- a/utils/aplay/aplay.c ++++ b/utils/aplay/aplay.c +@@ -15,6 +15,7 @@ + #include + #include + #include ++#include + #include + #include + #include +diff --git a/utils/cli/cli.c b/utils/cli/cli.c +index aeeabe58..0338b9e2 100644 +--- a/utils/cli/cli.c ++++ b/utils/cli/cli.c +@@ -13,6 +13,7 @@ + #endif + + #include ++#include + #include + #include + #include +diff --git a/utils/rfcomm/rfcomm.c b/utils/rfcomm/rfcomm.c +index d01f0810..3dacfd67 100644 +--- a/utils/rfcomm/rfcomm.c ++++ b/utils/rfcomm/rfcomm.c +@@ -15,6 +15,7 @@ + #include + #include + #include ++#include + #include + #include + #include diff --git a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/bluealsa/bluealsa_4.3.0.bb b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/bluealsa/bluealsa_4.3.0.bb new file mode 100644 index 00000000..f089e036 --- /dev/null +++ b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/bluealsa/bluealsa_4.3.0.bb @@ -0,0 +1,79 @@ +SUMMARY = "Bluetooth Audio ALSA Backend" +DESCRIPTION = "\ + BlueALSA is a replacement for BlueZ >= 5, with which one can achieve the \ + same Bluetooth audio profile support as with PulseAudio, but with fewer \ + dependencies and at a lower level in the software stack. It is designed \ + specifically for use on small, low-powered, dedicated audio or audio/visual \ + systems where the high-level audio management features of PulseAudio or \ + PipeWire are not required. \ +" +HOMEPAGE = "https://github.com/Arkq/bluez-alsa" +BUGTRACKER = "https://github.com/arkq/bluez-alsa/issues" +SECTION = "libs" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=143bc4e73f39cc5e89d6e096ac0315ba" + +DEPENDS += "alsa-lib bluez5 dbus glib-2.0-native python3-packaging-native sbc" + +SRC_URI = "git://github.com/Arkq/bluez-alsa.git;protocol=https;branch=master \ + file://0001-Use-basename-implementation-from-glib-2.0.patch" + +SRCREV = "959573c2cccef5cf074f5b2fa7941abbd699c5f4" + +S = "${WORKDIR}/git" + +PACKAGECONFIG ??= "aplay cli hcitop ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" +PACKAGECONFIG[a2dpconf] = "--enable-a2dpconf,--disable-a2dpconf" +PACKAGECONFIG[aac] = "--enable-aac,--disable-aac,fdk-aac" +PACKAGECONFIG[aplay] = "--enable-aplay,--disable-aplay" +PACKAGECONFIG[cli] = "--enable-cli,--disable-cli" +PACKAGECONFIG[coverage] = "--with-coverage,--without-coverage,lcov-native" +PACKAGECONFIG[debug] = "--enable-debug,--disable-debug" +PACKAGECONFIG[debug-time] = "--enable-debug-time,--disable-debug-time" +PACKAGECONFIG[faststream] = "--enable-faststream,--disable-faststream" +PACKAGECONFIG[hcitop] = "--enable-hcitop,--disable-hcitop,libbsd ncurses" +PACKAGECONFIG[libunwind] = "--with-libunwind,--without-libunwind,libunwind" +PACKAGECONFIG[midi] = "--enable-midi,--disable-midi" +PACKAGECONFIG[mp3lame] = "--enable-mp3lame,--disable-mp3lame,lame" +PACKAGECONFIG[mpg123] = "--enable-mpg123,--disable-mpg123,mpg123,mpg123" +PACKAGECONFIG[msbc] = "--enable-msbc,--disable-msbc,spandsp" +PACKAGECONFIG[ofono] = "--enable-ofono,--disable-ofono,ofono" +PACKAGECONFIG[payloadcheck] = "--enable-payloadcheck,--disable-payloadcheck" +PACKAGECONFIG[rfcomm] = "--enable-rfcomm,--disable-rfcomm" +PACKAGECONFIG[systemd] = "--enable-systemd --with-systemdsystemunitdir=${systemd_system_unitdir} \ + --with-systemdbluealsaargs='${SYSTEMD_BLUEALSA_ARGS}' --with-systemdbluealsaaplayargs='${SYSTEMD_BLUEALSA_APLAY_ARGS}',--disable-systemd,systemd" +PACKAGECONFIG[test] = "--enable-test,--disable-test,libcheck libsndfile1" +PACKAGECONFIG[upower] = "--enable-upower,--disable-upower,,upower" + +inherit autotools pkgconfig python3native systemd + +# These proprietary codecs are not available in Yocto +EXTRA_OECONF = "\ + --disable-aptx \ + --disable-lc3plus \ + --disable-ldac \ + --disable-manpages \ +" + +PACKAGE_BEFORE_PN = "${PN}-aplay" + +FILES:${PN}-aplay += "${bindir}/bluealsa-aplay" +FILES:${PN} += "${libdir}/alsa-lib/* ${datadir}/dbus-1/system.d" + +RRECOMMENDS:${PN} = "${PN}-aplay" + +SYSTEMD_PACKAGES += "${PN}-aplay" +SYSTEMD_SERVICE:${PN} = "bluealsa.service" +SYSTEMD_SERVICE:${PN}-aplay = "bluealsa-aplay.service" + +SYSTEMD_AUTO_ENABLE:${PN}-aplay = "disable" + +# Choose bluez-alsa arguments to be used in bluealsa systemd service +# Usually could choose profiles with it: a2dp-source a2dp-sink hfp-hf hfp-ag hsp-hs hsp-ag hfp-ofono +# Enable bluez-alsa arguments by default: +SYSTEMD_BLUEALSA_ARGS ?= "-p a2dp-source -p a2dp-sink" + +# Choose bluealsa-aplay arguments to be used in bluealsa-aplay systemd service +# Defaults to be empty: +SYSTEMD_BLUEALSA_APLAY_ARGS ?= "" diff --git a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/bluealsa/bluealsa_git.bb b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/bluealsa/bluealsa_git.bb deleted file mode 100644 index 5007c88f..00000000 --- a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/bluealsa/bluealsa_git.bb +++ /dev/null @@ -1,66 +0,0 @@ -SUMMARY = "Bluetooth Audio ALSA Backend" -HOMEPAGE = "https://github.com/Arkq/bluez-alsa" -SECTION = "libs" - -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=8449a4f133a93f6254b496d4fb476e83" - -SRC_URI = "git://github.com/Arkq/bluez-alsa.git;protocol=https;branch=master" - -SRCREV = "dd05a1baa261b94da9ba977b5e3392c8b4dc7a5e" -PV = "4.0.0+git" - -S = "${WORKDIR}/git" - -DEPENDS += "alsa-lib bluez5 dbus glib-2.0 sbc" - -PACKAGECONFIG ??= "aplay cli hcitop ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" -PACKAGECONFIG[a2dpconf] = "--enable-a2dpconf,--disable-a2dpconf" -PACKAGECONFIG[aac] = "--enable-aac,--disable-aac,fdk-aac" -PACKAGECONFIG[aplay] = "--enable-aplay,--disable-aplay" -PACKAGECONFIG[cli] = "--enable-cli,--disable-cli" -PACKAGECONFIG[coverage] = "--with-coverage,--without-coverage,lcov-native" -PACKAGECONFIG[debug] = "--enable-debug,--disable-debug" -PACKAGECONFIG[debug-time] = "--enable-debug-time,--disable-debug-time" -PACKAGECONFIG[faststream] = "--enable-faststream,--disable-faststream" -PACKAGECONFIG[hcitop] = "--enable-hcitop,--disable-hcitop,libbsd ncurses" -PACKAGECONFIG[libunwind] = "--with-libunwind,--without-libunwind,libunwind" -PACKAGECONFIG[mp3lame] = "--enable-mp3lame,--disable-mp3lame,lame" -PACKAGECONFIG[mpg123] = "--enable-mpg123,--disable-mpg123,mpg123,mpg123" -PACKAGECONFIG[ofono] = "--enable-ofono,--disable-ofono,ofono" -PACKAGECONFIG[payloadcheck] = "--enable-payloadcheck,--disable-payloadcheck" -PACKAGECONFIG[rfcomm] = "--enable-rfcomm,--disable-rfcomm" -PACKAGECONFIG[systemd] = "--enable-systemd --with-systemdsystemunitdir=${systemd_system_unitdir} \ - --with-systemdbluealsaargs='${SYSTEMD_BLUEALSA_ARGS}' --with-systemdbluealsaaplayargs='${SYSTEMD_BLUEALSA_APLAY_ARGS}',--disable-systemd,systemd" -PACKAGECONFIG[test] = "--enable-test,--disable-test,libcheck libsndfile1" -PACKAGECONFIG[upower] = "--enable-upower,--disable-upower,,upower" - -inherit autotools pkgconfig systemd - -EXTRA_OECONF = " \ - --disable-aptx \ - --disable-lc3plus \ - --disable-ldac \ - --disable-manpages \ -" - -PACKAGE_BEFORE_PN = "${PN}-aplay" -RRECOMMENDS:${PN} = "${PN}-aplay" - -FILES:${PN}-aplay = "${bindir}/bluealsa-aplay" -FILES:${PN} += "${libdir}/alsa-lib/*" - -SYSTEMD_PACKAGES += "${PN}-aplay" -SYSTEMD_SERVICE:${PN} = "bluealsa.service" -SYSTEMD_SERVICE:${PN}-aplay = "bluealsa-aplay.service" - -SYSTEMD_AUTO_ENABLE:${PN}-aplay = "disable" - -# Choose bluez-alsa arguments to be used in bluealsa systemd service -# Usually could choose profiles with it: a2dp-source a2dp-sink hfp-hf hfp-ag hsp-hs hsp-ag hfp-ofono -# Enable bluez-alsa arguments by default: -SYSTEMD_BLUEALSA_ARGS ?= "-p a2dp-source -p a2dp-sink" - -# Choose bluealsa-aplay arguments to be used in bluealsa-aplay systemd service -# Defaults to be empty: -SYSTEMD_BLUEALSA_APLAY_ARGS ?= "" diff --git a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/dav1d/dav1d_1.4.1.bb b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/dav1d/dav1d_1.4.1.bb deleted file mode 100644 index 08607acd..00000000 --- a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/dav1d/dav1d_1.4.1.bb +++ /dev/null @@ -1,17 +0,0 @@ -SUMMARY = "dav1d AV1 decoder" -DESCRIPTION = "Targeted to be small, portable and fast." -HOMEPAGE = "https://code.videolan.org/videolan/dav1d" -SECTION = "multimedia" -LICENSE = "BSD-2-Clause" - -LIC_FILES_CHKSUM = "file://COPYING;md5=c8055cfe7548dfdaa3a6dc45d8793669" - -SRC_URI = "git://code.videolan.org/videolan/dav1d.git;protocol=https;branch=master" -SRCREV = "872e470ebf3e65b0b956f3a70329e885a2df1c2a" - -S = "${WORKDIR}/git" - -DEPENDS:append:x86 = " nasm-native" -DEPENDS:append:x86-64 = " nasm-native" - -inherit meson pkgconfig diff --git a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/dav1d/dav1d_1.4.3.bb b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/dav1d/dav1d_1.4.3.bb new file mode 100644 index 00000000..6b7f3090 --- /dev/null +++ b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/dav1d/dav1d_1.4.3.bb @@ -0,0 +1,20 @@ +SUMMARY = "dav1d AV1 decoder" +DESCRIPTION = "Targeted to be small, portable and fast." +HOMEPAGE = "https://code.videolan.org/videolan/dav1d" +SECTION = "multimedia" +LICENSE = "BSD-2-Clause" + +LIC_FILES_CHKSUM = "file://COPYING;md5=c8055cfe7548dfdaa3a6dc45d8793669" + +SRC_URI = "git://code.videolan.org/videolan/dav1d.git;protocol=https;nobranch=1" +SRCREV = "e9986de7f4264940af6fa1df1498fd2754077de4" + +S = "${WORKDIR}/git" + +DEPENDS:append:x86 = " nasm-native" +DEPENDS:append:x86-64 = " nasm-native" + +inherit meson pkgconfig + +# RVV assembler routines are not yet available for RISCV32 +EXTRA_OEMESON:append:riscv32 = " -Denable_asm=false" diff --git a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/dvb-apps/dvb-apps_1.1.1.20140321.bb b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/dvb-apps/dvb-apps_1.1.1.20140321.bb index 542ad348..f9115d81 100644 --- a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/dvb-apps/dvb-apps_1.1.1.20140321.bb +++ b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/dvb-apps/dvb-apps_1.1.1.20140321.bb @@ -33,7 +33,7 @@ do_install() { chmod a+rx ${D}/${libdir}/*.so* cp -R --no-dereference --preserve=mode,links ${S}/util/szap/channels-conf* ${D}/${docdir}/dvb-apps/szap/ cp -R --no-dereference --preserve=mode,links ${S}/util/szap/README ${D}/${docdir}/dvb-apps/szap/ - cp -R --no-dereference --preserve=mode,links ${WORKDIR}/dvb-scan-table/* ${D}/usr/share/dvb + cp -R --no-dereference --preserve=mode,links ${UNPACKDIR}/dvb-scan-table/* ${D}/usr/share/dvb } PACKAGES =+ "dvb-evtest dvb-evtest-dbg \ diff --git a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/flite/flite/0001-Remove-defining-const-as-nothing.patch b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/flite/flite/0001-Remove-defining-const-as-nothing.patch new file mode 100644 index 00000000..899ef266 --- /dev/null +++ b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/flite/flite/0001-Remove-defining-const-as-nothing.patch @@ -0,0 +1,79 @@ +From c71d844f5639ea447b9f795a4db5b5d43f0de814 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 2 Jul 2024 21:41:24 -0700 +Subject: [PATCH] Remove defining 'const' as nothing + +This is a hack to override constness of struct members +however, with modern compiler like clang with fortified +glibc ( 2.40+ ) headers this runs into compiler errors + +| /mnt/b/yoe/master/build/tmp/work/riscv64-yoe-linux/flite/2.2/recipe-sysroot/usr/include/bits/stdlib.h:38:54: error: pass_object_size attribute only applies to constant pointer arguments +| 38 | __fortify_clang_overload_arg (char *, __restrict, __resolved))) +| | ^ +| /mnt/b/yoe/master/build/tmp/work/riscv64-yoe-linux/flite/2.2/recipe-sysroot/usr/include/bits/stdlib.h:73:43: error: pass_object_size attribute only applies to constant pointer arguments +| 73 | __fortify_clang_overload_arg (char *, ,__buf), +| | ^ +| /mnt/b/yoe/master/build/tmp/work/riscv64-yoe-linux/flite/2.2/recipe-sysroot/usr/include/bits/stdlib.h:91:55: error: pass_object_size attribute only applies to constant pointer arguments +| 91 | __NTH (wctomb (__fortify_clang_overload_arg (char *, ,__s), wchar_t __wchar)) +| | ^ +| /mnt/b/yoe/master/build/tmp/work/riscv64-yoe-linux/flite/2.2/recipe-sysroot/usr/include/bits/stdlib.h:129:71: error: pass_object_size attribute only applies to constant pointer arguments +| 129 | __NTH (mbstowcs (__fortify_clang_overload_arg (wchar_t *, __restrict, __dst), +| | ^ +| /mnt/b/yoe/master/build/tmp/work/riscv64-yoe-linux/flite/2.2/recipe-sysroot/usr/include/bits/stdlib.h:159:68: error: pass_object_size attribute only applies to constant pointer arguments +| 159 | __NTH (wcstombs (__fortify_clang_overload_arg (char *, __restrict, __dst), +| | ^ +| 5 errors generated. +| + +Therefore take this out, instead cast away the 'const' qualifier where needed ( equilly dangerous ) +however limited to just this file instead of apply to all headers including system headers + +Upstream-Status: Submitted [https://github.com/festvox/flite/pull/112] +Signed-off-by: Khem Raj +--- + tools/find_sts_main.c | 11 ++++------- + 1 file changed, 4 insertions(+), 7 deletions(-) + +diff --git a/tools/find_sts_main.c b/tools/find_sts_main.c +index 3c94449..a5bf8ef 100644 +--- a/tools/find_sts_main.c ++++ b/tools/find_sts_main.c +@@ -41,9 +41,6 @@ + #include + #include + +-/* To allow some normally const fields to manipulated during building */ +-#define const +- + #include "cst_args.h" + #include "cst_wave.h" + #include "cst_track.h" +@@ -132,16 +129,16 @@ cst_sts *find_sts(cst_wave *sig, cst_track *lpc) + lpc->frames[i],lpc->num_channels, + resd, + size); +- sts[i].size = size; ++ *(int *)(&sts[i].size) = size; + sts[i].frame = cst_alloc(unsigned short,lpc->num_channels-1); + for (j=1; j < lpc->num_channels; j++) +- sts[i].frame[j-1] = (unsigned short) ++ *(unsigned short *)(&sts[i].frame[j-1]) = (unsigned short) + (((lpc->frames[i][j]-lpc_min)/lpc_range)*65535); + if (cst_streq(residual_codec,"ulaw")) + { + sts[i].residual = cst_alloc(unsigned char,size); + for (j=0; j < size; j++) +- sts[i].residual[j] = cst_short_to_ulaw((short)resd[j]); ++ *(unsigned char *)(&sts[i].residual[j]) = cst_short_to_ulaw((short)resd[j]); + } + else if (cst_streq(residual_codec,"g721")) + { +@@ -189,7 +186,7 @@ cst_sts *find_sts(cst_wave *sig, cst_track *lpc) + { + sts[i].residual = cst_alloc(unsigned char,size); + for (j=0; j < size; j++) +- sts[i].residual[j] = cst_short_to_ulaw((short)resd[j]); ++ *(unsigned char *)(&sts[i].residual[j]) = cst_short_to_ulaw((short)resd[j]); + } + else /* Unvoiced frame */ + { diff --git a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/flite/flite_2.2.bb b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/flite/flite_2.2.bb index 0a7680a8..bb9edfd5 100644 --- a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/flite/flite_2.2.bb +++ b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/flite/flite_2.2.bb @@ -9,6 +9,7 @@ inherit autotools-brokensep DEPENDS += "alsa-lib chrpath-replacement-native" SRC_URI = "git://github.com/festvox/flite.git;protocol=https;branch=master" +SRC_URI += "file://0001-Remove-defining-const-as-nothing.patch" SRCREV = "e9e2e37c329dbe98bfeb27a1828ef9a71fa84f88" @@ -25,3 +26,5 @@ do_install:append() { } # | make[1]: *** No rule to make target 'flite_voice_list.c', needed by 'all'. Stop. PARALLEL_MAKE = "" + +CLEANBROKEN = "1" diff --git a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/gerbera/gerbera_2.0.0.bb b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/gerbera/gerbera_2.0.0.bb deleted file mode 100644 index fea14fd8..00000000 --- a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/gerbera/gerbera_2.0.0.bb +++ /dev/null @@ -1,30 +0,0 @@ -Description = "Gerbera is a UPnP media server which allows you to stream your digital media through your home network and consume it on a variety of UPnP compatible devices." - -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://LICENSE.md;md5=25cdec9afe3f1f26212ead6bd2f7fac8" - -SRC_URI = "git://github.com/gerbera/gerbera.git;protocol=https;branch=master" -SRCREV = "2f26e656b16fb86132f27d1f8d47c6055041430d" - -S = "${WORKDIR}/git" - -DEPENDS = "pugixml sqlite3 zlib fmt spdlog util-linux-libuuid libupnp libnsl2" - -SYSTEMD_SERVICE:${PN} = "gerbera.service" - -inherit cmake pkgconfig systemd - -PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} curl taglib inotify exif matroska magic js" -PACKAGECONFIG[systemd] = "-DWITH_SYSTEMD=TRUE,-DWITH_SYSTEMD=FALSE,systemd" -PACKAGECONFIG[taglib] = "-DWITH_TAGLIB=TRUE,-DWITH_TAGLIB=FALSE,taglib" -PACKAGECONFIG[curl] = "-DWITH_CURL=TRUE,-DWITH_CURL=FALSE,curl" -PACKAGECONFIG[inotify] = "-DWITH_INOTIFY=TRUE,-DWITH_INOTIFY=FALSE,inotify-tools" -PACKAGECONFIG[avcodec] = "-DWITH_AVCODEC=TRUE,-DWITH_AVCODEC=FALSE,ffmpeg" -PACKAGECONFIG[wavpack] = "-DWITH_WAVPACK=TRUE,-DWITH_WAVPACK=FALSE,wavpack" -PACKAGECONFIG[exif] = "-DWITH_EXIF=TRUE,-DWITH_EXIF=FALSE,libexif" -PACKAGECONFIG[exiv2] = "-DWITH_EXIV2=TRUE,-DWITH_EXIV2=FALSE,exiv2" -PACKAGECONFIG[matroska] = "-DWITH_MATROSKA=TRUE,-DWITH_MATROSKA=FALSE,libebml libmatroska" -PACKAGECONFIG[magic] = "-DWITH_MAGIC=TRUE,-DWITH_MAGIC=FALSE,file" -PACKAGECONFIG[js] = "-DWITH_JS=TRUE,-DWITH_JS=FALSE,duktape" - -SECURITY_CFLAGS:riscv64 = "${SECURITY_NOPIE_CFLAGS}" diff --git a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/gerbera/gerbera_2.2.0.bb b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/gerbera/gerbera_2.2.0.bb new file mode 100644 index 00000000..da2953ef --- /dev/null +++ b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/gerbera/gerbera_2.2.0.bb @@ -0,0 +1,30 @@ +Description = "Gerbera is a UPnP media server which allows you to stream your digital media through your home network and consume it on a variety of UPnP compatible devices." + +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://LICENSE.md;md5=25cdec9afe3f1f26212ead6bd2f7fac8" + +SRC_URI = "git://github.com/gerbera/gerbera.git;protocol=https;branch=master" +SRCREV = "821d364d611dc30b3ef8a5e9beb0bf3e71b25199" + +S = "${WORKDIR}/git" + +DEPENDS = "pugixml sqlite3 zlib fmt spdlog util-linux-libuuid libupnp libnsl2" + +SYSTEMD_SERVICE:${PN} = "gerbera.service" + +inherit cmake pkgconfig systemd + +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} curl taglib inotify exif matroska magic js" +PACKAGECONFIG[systemd] = "-DWITH_SYSTEMD=TRUE,-DWITH_SYSTEMD=FALSE,systemd" +PACKAGECONFIG[taglib] = "-DWITH_TAGLIB=TRUE,-DWITH_TAGLIB=FALSE,taglib" +PACKAGECONFIG[curl] = "-DWITH_CURL=TRUE,-DWITH_CURL=FALSE,curl" +PACKAGECONFIG[inotify] = "-DWITH_INOTIFY=TRUE,-DWITH_INOTIFY=FALSE,inotify-tools" +PACKAGECONFIG[avcodec] = "-DWITH_AVCODEC=TRUE,-DWITH_AVCODEC=FALSE,ffmpeg" +PACKAGECONFIG[wavpack] = "-DWITH_WAVPACK=TRUE,-DWITH_WAVPACK=FALSE,wavpack" +PACKAGECONFIG[exif] = "-DWITH_EXIF=TRUE,-DWITH_EXIF=FALSE,libexif" +PACKAGECONFIG[exiv2] = "-DWITH_EXIV2=TRUE,-DWITH_EXIV2=FALSE,exiv2" +PACKAGECONFIG[matroska] = "-DWITH_MATROSKA=TRUE,-DWITH_MATROSKA=FALSE,libebml libmatroska" +PACKAGECONFIG[magic] = "-DWITH_MAGIC=TRUE,-DWITH_MAGIC=FALSE,file" +PACKAGECONFIG[js] = "-DWITH_JS=TRUE,-DWITH_JS=FALSE,duktape" + +SECURITY_CFLAGS:riscv64 = "${SECURITY_NOPIE_CFLAGS}" diff --git a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/libcamera/libcamera/0001-rpi-Use-malloc-instead-of-variable-length-arrays.patch b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/libcamera/libcamera/0001-rpi-Use-malloc-instead-of-variable-length-arrays.patch new file mode 100644 index 00000000..0ca2082c --- /dev/null +++ b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/libcamera/libcamera/0001-rpi-Use-malloc-instead-of-variable-length-arrays.patch @@ -0,0 +1,41 @@ +From a3e25b6aa9775c43336e30d3b350f54c085a32c8 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 20 Feb 2024 18:44:23 -0800 +Subject: [PATCH] rpi: Use malloc instead of variable length arrays + +Clang-18+ diagnoses this as error + +| ../git/src/ipa/rpi/controller/rpi/alsc.cpp:499:10: error: variable length arrays in C++ are a Clang extension [-Werror,-Wvla-cxx-extension] | 499 | int xLo[X], xHi[X]; +| | ^ + +Upstream-Status: Denied [https://lists.libcamera.org/pipermail/libcamera-devel/2024-February/040536.html] +Signed-off-by: Khem Raj +--- + src/ipa/rpi/controller/rpi/alsc.cpp | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/src/ipa/rpi/controller/rpi/alsc.cpp b/src/ipa/rpi/controller/rpi/alsc.cpp +index 67029fc3..6eca9fb7 100644 +--- a/src/ipa/rpi/controller/rpi/alsc.cpp ++++ b/src/ipa/rpi/controller/rpi/alsc.cpp +@@ -496,8 +496,8 @@ void resampleCalTable(const Array2D &calTableIn, + * Precalculate and cache the x sampling locations and phases to save + * recomputing them on every row. + */ +- int xLo[X], xHi[X]; +- double xf[X]; ++ int *xLo = (int *)malloc(X * sizeof(int)), *xHi = (int *)malloc(X * sizeof(int)); ++ double *xf = (double *)malloc(X * sizeof(double)); + double scaleX = cameraMode.sensorWidth / + (cameraMode.width * cameraMode.scaleX); + double xOff = cameraMode.cropX / (double)cameraMode.sensorWidth; +@@ -539,6 +539,9 @@ void resampleCalTable(const Array2D &calTableIn, + *(out++) = above * (1 - yf) + below * yf; + } + } ++ free(xf); ++ free(xHi); ++ free(xLo); + } + + /* Calculate chrominance statistics (R/G and B/G) for each region. */ diff --git a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/libcamera/libcamera/0002-options-Replace-use-of-VLAs-in-C.patch b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/libcamera/libcamera/0002-options-Replace-use-of-VLAs-in-C.patch new file mode 100644 index 00000000..47382065 --- /dev/null +++ b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/libcamera/libcamera/0002-options-Replace-use-of-VLAs-in-C.patch @@ -0,0 +1,128 @@ +From 6e4736180fcaffdb06acf52fd3eb50ba5baa3d2a Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 31 Jan 2024 21:04:28 -0800 +Subject: [PATCH] options: Replace use of VLAs in C++ + +Clang++ 18 is fussy about this with new warning checks. + + ../git/src/apps/common/options.cpp:882:20: error: variable length arrays in C++ are a Clang extension [-Werror,-Wvla-cxx-extension] + 882 | char shortOptions[optionsMap_.size() * 3 + 2]; + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ + +Therefore replace using VLAs with alloca and malloc/free + +Upstream-Status: Submitted [https://lists.libcamera.org/pipermail/libcamera-devel/2024-February/040381.html] +Signed-off-by: Khem Raj +--- + src/apps/common/options.cpp | 12 ++++++++++-- + src/libcamera/ipc_unixsocket.cpp | 13 +++++++++---- + 2 files changed, 19 insertions(+), 6 deletions(-) + +diff --git a/src/apps/common/options.cpp b/src/apps/common/options.cpp +index 4f7e8691..3656f3c1 100644 +--- a/src/apps/common/options.cpp ++++ b/src/apps/common/options.cpp +@@ -879,8 +879,8 @@ OptionsParser::Options OptionsParser::parse(int argc, char **argv) + * Allocate short and long options arrays large enough to contain all + * options. + */ +- char shortOptions[optionsMap_.size() * 3 + 2]; +- struct option longOptions[optionsMap_.size() + 1]; ++ char *shortOptions = (char*)malloc(optionsMap_.size() * 3 + 2); ++ struct option *longOptions = (struct option*)malloc(sizeof(struct option) * (optionsMap_.size() + 1)); + unsigned int ids = 0; + unsigned int idl = 0; + +@@ -935,12 +935,16 @@ OptionsParser::Options OptionsParser::parse(int argc, char **argv) + std::cerr << argv[optind - 1] << std::endl; + + usage(); ++ free(shortOptions); ++ free(longOptions); + return options; + } + + const Option &option = *optionsMap_[c]; + if (!parseValue(option, optarg, &options)) { + usage(); ++ free(shortOptions); ++ free(longOptions); + return options; + } + } +@@ -949,10 +953,14 @@ OptionsParser::Options OptionsParser::parse(int argc, char **argv) + std::cerr << "Invalid non-option argument '" << argv[optind] + << "'" << std::endl; + usage(); ++ free(shortOptions); ++ free(longOptions); + return options; + } + + options.valid_ = true; ++ free(shortOptions); ++ free(longOptions); + return options; + } + +diff --git a/src/libcamera/ipc_unixsocket.cpp b/src/libcamera/ipc_unixsocket.cpp +index 1980d374..3bd861cb 100644 +--- a/src/libcamera/ipc_unixsocket.cpp ++++ b/src/libcamera/ipc_unixsocket.cpp +@@ -8,6 +8,7 @@ + #include "libcamera/internal/ipc_unixsocket.h" + + #include ++#include + #include + #include + #include +@@ -247,8 +248,8 @@ int IPCUnixSocket::sendData(const void *buffer, size_t length, + iov[0].iov_base = const_cast(buffer); + iov[0].iov_len = length; + +- char buf[CMSG_SPACE(num * sizeof(uint32_t))]; +- memset(buf, 0, sizeof(buf)); ++ char *buf = (char*)malloc(CMSG_SPACE(num * sizeof(uint32_t))); ++ memset((void*)buf, 0, sizeof(buf)); + + struct cmsghdr *cmsg = (struct cmsghdr *)buf; + cmsg->cmsg_len = CMSG_LEN(num * sizeof(uint32_t)); +@@ -270,9 +271,11 @@ int IPCUnixSocket::sendData(const void *buffer, size_t length, + int ret = -errno; + LOG(IPCUnixSocket, Error) + << "Failed to sendmsg: " << strerror(-ret); ++ free(buf); + return ret; + } + ++ free(buf); + return 0; + } + +@@ -283,8 +286,8 @@ int IPCUnixSocket::recvData(void *buffer, size_t length, + iov[0].iov_base = buffer; + iov[0].iov_len = length; + +- char buf[CMSG_SPACE(num * sizeof(uint32_t))]; +- memset(buf, 0, sizeof(buf)); ++ char *buf = (char*)malloc(CMSG_SPACE(num * sizeof(uint32_t))); ++ memset((void*)buf, 0, sizeof(buf)); + + struct cmsghdr *cmsg = (struct cmsghdr *)buf; + cmsg->cmsg_len = CMSG_LEN(num * sizeof(uint32_t)); +@@ -305,12 +308,14 @@ int IPCUnixSocket::recvData(void *buffer, size_t length, + if (ret != -EAGAIN) + LOG(IPCUnixSocket, Error) + << "Failed to recvmsg: " << strerror(-ret); ++ free(buf); + return ret; + } + + if (fds) + memcpy(fds, CMSG_DATA(cmsg), num * sizeof(uint32_t)); + ++ free(buf); + return 0; + } + diff --git a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.3.0.bb b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.3.0.bb new file mode 100644 index 00000000..857f565f --- /dev/null +++ b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.3.0.bb @@ -0,0 +1,79 @@ +SUMMARY = "Linux libcamera framework" +SECTION = "libs" + +LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later" + +LIC_FILES_CHKSUM = "\ + file://LICENSES/GPL-2.0-or-later.txt;md5=fed54355545ffd980b814dab4a3b312c \ + file://LICENSES/LGPL-2.1-or-later.txt;md5=2a4f4fd2128ea2f65047ee63fbca9f68 \ +" + +SRC_URI = " \ + git://git.libcamera.org/libcamera/libcamera.git;protocol=https;branch=master \ + file://0001-media_device-Add-bool-return-type-to-unlock.patch \ + file://0002-options-Replace-use-of-VLAs-in-C.patch \ + file://0001-rpi-Use-malloc-instead-of-variable-length-arrays.patch \ +" + +SRCREV = "aee16c06913422a0ac84ee3217f87a9795e3c2d9" + +PE = "1" + +S = "${WORKDIR}/git" + +DEPENDS = "python3-pyyaml-native python3-jinja2-native python3-ply-native python3-jinja2-native udev gnutls chrpath-native libevent libyaml" +DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'qt', 'qtbase qtbase-native', '', d)}" + +PACKAGES =+ "${PN}-gst ${PN}-pycamera" + +PACKAGECONFIG ??= "" +PACKAGECONFIG[gst] = "-Dgstreamer=enabled,-Dgstreamer=disabled,gstreamer1.0 gstreamer1.0-plugins-base" +PACKAGECONFIG[pycamera] = "-Dpycamera=enabled,-Dpycamera=disabled,python3 python3-pybind11" + +LIBCAMERA_PIPELINES ??= "auto" + +EXTRA_OEMESON = " \ + -Dpipelines=${LIBCAMERA_PIPELINES} \ + -Dv4l2=true \ + -Dcam=enabled \ + -Dlc-compliance=disabled \ + -Dtest=false \ + -Ddocumentation=disabled \ +" + +RDEPENDS:${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland qt', 'qtwayland', '', d)}" + +inherit meson pkgconfig python3native + +do_configure:prepend() { + sed -i -e 's|py_compile=True,||' ${S}/utils/ipc/mojo/public/tools/mojom/mojom/generate/template_expander.py +} + +do_install:append() { + chrpath -d ${D}${libdir}/libcamera.so + chrpath -d ${D}${libexecdir}/libcamera/v4l2-compat.so +} + +do_package:append() { + bb.build.exec_func("do_package_recalculate_ipa_signatures", d) +} + +do_package_recalculate_ipa_signatures() { + local modules + for module in $(find ${PKGD}/usr/lib/libcamera -name "*.so.sign"); do + module="${module%.sign}" + if [ -f "${module}" ] ; then + modules="${modules} ${module}" + fi + done + + ${S}/src/ipa/ipa-sign-install.sh ${B}/src/ipa-priv-key.pem "${modules}" +} + +FILES:${PN} += " ${libexecdir}/libcamera/v4l2-compat.so" +FILES:${PN}-gst = "${libdir}/gstreamer-1.0" +FILES:${PN}-pycamera = "${PYTHON_SITEPACKAGES_DIR}/libcamera" + +# libcamera-v4l2 explicitly sets _FILE_OFFSET_BITS=32 to get access to +# both 32 and 64 bit file APIs. +GLIBC_64BIT_TIME_FLAGS = "" diff --git a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.4.0.bb b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.4.0.bb deleted file mode 100644 index 682e5673..00000000 --- a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.4.0.bb +++ /dev/null @@ -1,77 +0,0 @@ -SUMMARY = "Linux libcamera framework" -SECTION = "libs" - -LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later" - -LIC_FILES_CHKSUM = "\ - file://LICENSES/GPL-2.0-or-later.txt;md5=fed54355545ffd980b814dab4a3b312c \ - file://LICENSES/LGPL-2.1-or-later.txt;md5=2a4f4fd2128ea2f65047ee63fbca9f68 \ -" - -SRC_URI = " \ - git://git.libcamera.org/libcamera/libcamera.git;protocol=https;branch=master \ - file://0001-media_device-Add-bool-return-type-to-unlock.patch \ -" - -SRCREV = "35ed4b91291d9f3d08e4b51acfb51163e65df8f8" - -PE = "1" - -S = "${WORKDIR}/git" - -DEPENDS = "python3-pyyaml-native python3-jinja2-native python3-ply-native python3-jinja2-native udev gnutls chrpath-native libevent libyaml" -DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'qt', 'qtbase qtbase-native', '', d)}" - -PACKAGES =+ "${PN}-gst ${PN}-pycamera" - -PACKAGECONFIG ??= "" -PACKAGECONFIG[gst] = "-Dgstreamer=enabled,-Dgstreamer=disabled,gstreamer1.0 gstreamer1.0-plugins-base" -PACKAGECONFIG[pycamera] = "-Dpycamera=enabled,-Dpycamera=disabled,python3 python3-pybind11" - -LIBCAMERA_PIPELINES ??= "auto" - -EXTRA_OEMESON = " \ - -Dpipelines=${LIBCAMERA_PIPELINES} \ - -Dv4l2=true \ - -Dcam=enabled \ - -Dlc-compliance=disabled \ - -Dtest=false \ - -Ddocumentation=disabled \ -" - -RDEPENDS:${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland qt', 'qtwayland', '', d)}" - -inherit meson pkgconfig python3native - -do_configure:prepend() { - sed -i -e 's|py_compile=True,||' ${S}/utils/codegen/ipc/mojo/public/tools/mojom/mojom/generate/template_expander.py -} - -do_install:append() { - chrpath -d ${D}${libdir}/libcamera.so - chrpath -d ${D}${libexecdir}/libcamera/v4l2-compat.so -} - -do_package:append() { - bb.build.exec_func("do_package_recalculate_ipa_signatures", d) -} - -do_package_recalculate_ipa_signatures() { - local modules - for module in $(find ${PKGD}/usr/lib/libcamera -name "*.so.sign"); do - module="${module%.sign}" - if [ -f "${module}" ] ; then - modules="${modules} ${module}" - fi - done - - ${S}/src/ipa/ipa-sign-install.sh ${B}/src/ipa-priv-key.pem "${modules}" -} - -FILES:${PN} += " ${libexecdir}/libcamera/v4l2-compat.so" -FILES:${PN}-gst = "${libdir}/gstreamer-1.0" -FILES:${PN}-pycamera = "${PYTHON_SITEPACKAGES_DIR}/libcamera" - -# libcamera-v4l2 explicitly sets _FILE_OFFSET_BITS=32 to get access to -# both 32 and 64 bit file APIs. -GLIBC_64BIT_TIME_FLAGS = "" diff --git a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/libdvbcsa/libdvbcsa_1.1.0.bb b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/libdvbcsa/libdvbcsa_1.1.0.bb index 5de717c2..1e5381bb 100644 --- a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/libdvbcsa/libdvbcsa_1.1.0.bb +++ b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/libdvbcsa/libdvbcsa_1.1.0.bb @@ -15,5 +15,5 @@ inherit autotools lib_package pkgconfig do_install:append() { install -D -m 0644 ${S}/src/dvbcsa/dvbcsa.h ${D}${includedir}/dvbcsa/dvbcsa.h - install -D -m 0644 ${WORKDIR}/libdvbcsa.pc ${D}${libdir}/pkgconfig/libdvbcsa.pc + install -D -m 0644 ${UNPACKDIR}/libdvbcsa.pc ${D}${libdir}/pkgconfig/libdvbcsa.pc } diff --git a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/minidlna/minidlna.inc b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/minidlna/minidlna.inc index 4959a3c8..170e676b 100644 --- a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/minidlna/minidlna.inc +++ b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/minidlna/minidlna.inc @@ -11,9 +11,8 @@ inherit gettext autotools-brokensep update-rc.d systemd SRC_URI = "git://git.code.sf.net/p/minidlna/git;branch=master;module=git \ file://minidlna-daemon.init.d \ file://minidlna.service \ - file://0001-Update-Gettext-version.patch \ file://0001-configure-Check-for-clock_gettime-seprately-from-__N.patch \ - file://0001-configure.ac-drop-non-standard-checks.patch \ + file://0001-Add-compatibility-with-FFMPEG-7.0.patch \ " S = "${WORKDIR}/git" @@ -22,17 +21,21 @@ S = "${WORKDIR}/git" # configure.ac:30: error: required file './ABOUT-NLS' not found EXTRA_AUTORECONF = "" +# Reproducibility: force os-name and os-version to constants to avoid host +# related build differences +EXTRA_OECONF = "--with-os-name='${DISTRO_NAME}' --with-os-version=''" + do_install:append(){ install -d ${D}${sysconfdir} install -m 0755 minidlna.conf ${D}${sysconfdir} # Systemd script install -d ${D}${nonarch_base_libdir}/systemd/system - install -m 0755 ${WORKDIR}/minidlna.service ${D}${nonarch_base_libdir}/systemd/system + install -m 0755 ${UNPACKDIR}/minidlna.service ${D}${nonarch_base_libdir}/systemd/system # Sysvinit script install -d ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/minidlna-daemon.init.d ${D}${sysconfdir}/init.d/minidlna + install -m 0755 ${UNPACKDIR}/minidlna-daemon.init.d ${D}${sysconfdir}/init.d/minidlna } diff --git a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/minidlna/minidlna/0001-Add-compatibility-with-FFMPEG-7.0.patch b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/minidlna/minidlna/0001-Add-compatibility-with-FFMPEG-7.0.patch new file mode 100644 index 00000000..f9d9c694 --- /dev/null +++ b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/minidlna/minidlna/0001-Add-compatibility-with-FFMPEG-7.0.patch @@ -0,0 +1,49 @@ +From 92f8b94c697c225fb31062586f817c4fc3df8c2a Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 29 Aug 2024 13:22:33 -0700 +Subject: [PATCH] Add compatibility with FFMPEG 7.0 + +channel_layout has been replaced with ch_layout + +Upstream-Status: Submitted [https://sourceforge.net/p/minidlna/git/merge-requests/59/] +Signed-off-by: Khem Raj +--- + libav.h | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/libav.h b/libav.h +index b69752c..a3153bd 100644 +--- a/libav.h ++++ b/libav.h +@@ -58,6 +58,7 @@ + #endif + + #define USE_CODECPAR LIBAVFORMAT_VERSION_INT >= ((57<<16)+(50<<8)+100) ++#define USE_CH_LAYOUT (LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(57, 28, 100)) + + #ifndef FF_PROFILE_H264_BASELINE + #define FF_PROFILE_H264_BASELINE 66 +@@ -174,7 +175,11 @@ lav_get_interlaced(AVStream *s) + #define lav_codec_tag(s) s->codecpar->codec_tag + #define lav_sample_rate(s) s->codecpar->sample_rate + #define lav_bit_rate(s) s->codecpar->bit_rate ++#if USE_CH_LAYOUT ++#define lav_channels(s) s->codecpar->ch_layout.nb_channels ++#else + #define lav_channels(s) s->codecpar->channels ++#endif + #define lav_width(s) s->codecpar->width + #define lav_height(s) s->codecpar->height + #define lav_profile(s) s->codecpar->profile +@@ -186,7 +191,11 @@ lav_get_interlaced(AVStream *s) + #define lav_codec_tag(s) s->codec->codec_tag + #define lav_sample_rate(s) s->codec->sample_rate + #define lav_bit_rate(s) s->codec->bit_rate ++#if USE_CH_LAYOUT ++#define lav_channels(s) s->codec->ch_layout.nb_channels ++#else + #define lav_channels(s) s->codec->channels ++#endif + #define lav_width(s) s->codec->width + #define lav_height(s) s->codec->height + #define lav_profile(s) s->codec->profile diff --git a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/minidlna/minidlna/0001-Update-Gettext-version.patch b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/minidlna/minidlna/0001-Update-Gettext-version.patch deleted file mode 100644 index 6100da35..00000000 --- a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/minidlna/minidlna/0001-Update-Gettext-version.patch +++ /dev/null @@ -1,32 +0,0 @@ -From a4290bf1887f9203288858ca76bdd20b2edf337a Mon Sep 17 00:00:00 2001 -From: Baptiste Durand -Date: Sun, 9 Sep 2018 20:50:41 +0200 -Subject: [PATCH] Update Gettext version - -Upstream-Status: Inappropriate [oe-core specific] - -Signed-off-by: Baptiste Durand ---- - configure.ac | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - ---- a/configure.ac -+++ b/configure.ac -@@ -14,7 +14,7 @@ - # License along with MiniDLNA; if not, write to the Free Software - # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - # USA. --AC_INIT(MiniDLNA,1.1.3,,minidlna) -+AC_INIT(MiniDLNA,1.2.1,,minidlna) - #LT_INIT - - AC_CANONICAL_TARGET -@@ -28,7 +28,7 @@ m4_ifdef([AC_USE_SYSTEM_EXTENSIONS], [AC - - AM_ICONV - AM_GNU_GETTEXT([external]) --AM_GNU_GETTEXT_VERSION(0.18) -+AM_GNU_GETTEXT_VERSION(0.20) - - # Checks for programs. - AC_PROG_AWK diff --git a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/minidlna/minidlna/0001-configure.ac-drop-non-standard-checks.patch b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/minidlna/minidlna/0001-configure.ac-drop-non-standard-checks.patch deleted file mode 100644 index 93334b7d..00000000 --- a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/minidlna/minidlna/0001-configure.ac-drop-non-standard-checks.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 83425344b2d7339e8f5b0ad230c51278d330d613 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Sat, 22 Jan 2022 11:41:50 +0100 -Subject: [PATCH] configure.ac: drop non-standard checks - -Not sure what upstream is trying to do here but it does not work -with the latest autoconf. - -Upstream-Status: Inactive-Upstream -Signed-off-by: Alexander Kanavin ---- - configure.ac | 5 ----- - 1 file changed, 5 deletions(-) - -diff --git a/configure.ac b/configure.ac -index aa7dd1c..858db52 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -418,7 +418,6 @@ for dir in "" /usr/local $SEARCH_DIR; do - AC_CHECK_LIB([id3tag -lz], [id3_file_open], [LIBID3TAG_LIBS="-lid3tag -lz"], [unset ac_cv_lib_id3tag_id3_file_open; LDFLAGS="$LDFLAGS_SAVE"; continue]) - break - done --test x"$ac_cv_lib_id3tag__lz___id3_file_open" = x"yes" || AC_MSG_ERROR([Could not find libid3tag]) - AC_SUBST(LIBID3TAG_LIBS) - - LDFLAGS_SAVE="$LDFLAGS" -@@ -444,10 +443,6 @@ for dir in "" /usr/local $SEARCH_DIR; do - [unset ac_cv_lib_avformat_av_open_input_file; unset ac_cv_lib_avformat_avformat_open_input; LDFLAGS="$LDFLAGS_SAVE"; continue])]) - break - done --if test x"$ac_cv_lib_avformat__lavcodec__lavutil__lz___av_open_input_file" != x"yes" && -- test x"$ac_cv_lib_avformat__lavcodec__lavutil__lz___avformat_open_input" != x"yes"; then -- AC_MSG_ERROR([Could not find libavformat - part of ffmpeg]) --fi - AC_SUBST(LIBAVFORMAT_LIBS) - - AC_CHECK_LIB(pthread, pthread_create) diff --git a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/minidlna/minidlna_1.3.0.bb b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/minidlna/minidlna_1.3.0.bb deleted file mode 100644 index 4238918c..00000000 --- a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/minidlna/minidlna_1.3.0.bb +++ /dev/null @@ -1,4 +0,0 @@ -require ${BPN}.inc - -SRCREV = "109d63cb11ac207c18a784556834eb054b34b00b" -LIC_FILES_CHKSUM = "file://LICENCE.miniupnpd;md5=b0dabf9d8e0f871554e309d62ead8d2b" diff --git a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/minidlna/minidlna_1.3.3.bb b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/minidlna/minidlna_1.3.3.bb new file mode 100644 index 00000000..da0d90a9 --- /dev/null +++ b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/minidlna/minidlna_1.3.3.bb @@ -0,0 +1,4 @@ +require ${BPN}.inc + +SRCREV = "1a9b32ee7a1c89e54e9f148199b73f9b33ad45ba" +LIC_FILES_CHKSUM = "file://LICENCE.miniupnpd;md5=b0dabf9d8e0f871554e309d62ead8d2b" diff --git a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/musicpd/libmpdclient_2.20.bb b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/musicpd/libmpdclient_2.22.bb similarity index 100% rename from sources/meta-openembedded/meta-multimedia/recipes-multimedia/musicpd/libmpdclient_2.20.bb rename to sources/meta-openembedded/meta-multimedia/recipes-multimedia/musicpd/libmpdclient_2.22.bb diff --git a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/musicpd/mpc_0.34.bb b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/musicpd/mpc_0.35.bb similarity index 100% rename from sources/meta-openembedded/meta-multimedia/recipes-multimedia/musicpd/mpc_0.34.bb rename to sources/meta-openembedded/meta-multimedia/recipes-multimedia/musicpd/mpc_0.35.bb diff --git a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/musicpd/mpd/0001-patch-src_decoder_plugins_FfmpegIo.cxx.patch b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/musicpd/mpd/0001-patch-src_decoder_plugins_FfmpegIo.cxx.patch deleted file mode 100644 index b2dea331..00000000 --- a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/musicpd/mpd/0001-patch-src_decoder_plugins_FfmpegIo.cxx.patch +++ /dev/null @@ -1,26 +0,0 @@ -From e62fd0eefe8b475e70d87a673a7216aac3bb622f Mon Sep 17 00:00:00 2001 -From: Markus Volk -Date: Mon, 20 Nov 2023 17:49:59 +0100 -Subject: [PATCH] patch src_decoder_plugins_FfmpegIo.cxx - -Signed-off-by: Markus Volk -Upstream-Status: Pending [https://github.com/MusicPlayerDaemon/MPD/issues/1898] ---- - src/decoder/plugins/FfmpegIo.cxx | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/decoder/plugins/FfmpegIo.cxx b/src/decoder/plugins/FfmpegIo.cxx -index 572f1a86a..3e2347fec 100644 ---- a/src/decoder/plugins/FfmpegIo.cxx -+++ b/src/decoder/plugins/FfmpegIo.cxx -@@ -25,6 +25,7 @@ - #include "input/InputStream.hxx" - - extern "C" { -+#include - #include - } - --- -2.42.0 - diff --git a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/musicpd/mpd_0.23.14.bb b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/musicpd/mpd_0.23.14.bb deleted file mode 100644 index f30fffeb..00000000 --- a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/musicpd/mpd_0.23.14.bb +++ /dev/null @@ -1,105 +0,0 @@ -SUMMARY = "Music Player Daemon" -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" - -HOMEPAGE ="http://www.musicpd.org" - -inherit meson useradd systemd pkgconfig - -DEPENDS += " \ - curl \ - sqlite3 \ - ${@bb.utils.filter('DISTRO_FEATURES', 'pulseaudio', d)} \ - yajl \ - boost \ - icu \ - dbus \ - expat \ - fmt \ -" - -SRC_URI = "git://github.com/MusicPlayerDaemon/MPD;branch=master;protocol=https \ - file://0001-patch-src_decoder_plugins_FfmpegIo.cxx.patch \ - file://mpd.conf.in \ - " -SRCREV = "feac1a3f56591ccfb00870aba66c9ac3abac4773" -S = "${WORKDIR}/git" - -EXTRA_OEMESON += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '-Dsystemd=enabled -Dsystemd_system_unit_dir=${systemd_system_unitdir} -Dsystemd_user_unit_dir=${systemd_system_unitdir}', '-Dsystemd=disabled', d)}" - -PACKAGECONFIG ??= "${@bb.utils.contains("LICENSE_FLAGS_ACCEPTED", "commercial", "aac", "", d)} \ - alsa ao bzip2 daemon \ - ${@bb.utils.contains("LICENSE_FLAGS_ACCEPTED", "commercial", "ffmpeg aac", "", d)} \ - fifo flac fluidsynth iso9660 \ - jack libsamplerate httpd \ - mms mpg123 modplug sndfile \ - upnp openal opus oss recorder \ - vorbis wavpack zlib" - -PACKAGECONFIG[aac] = "-Dfaad=enabled,-Dfaad=disabled,faad2" -PACKAGECONFIG[alsa] = "-Dalsa=enabled,-Dalsa=disabled,alsa-lib" -PACKAGECONFIG[ao] = "-Dao=enabled,-Dao=disabled,libao" -PACKAGECONFIG[audiofile] = "-Daudiofile=enabled,-Daudiofile=disabled,audiofile" -PACKAGECONFIG[bzip2] = "-Dbzip2=enabled,-Dbzip2=disabled,bzip2" -PACKAGECONFIG[cdioparanoia] = "-Dcdio_paranoia=enabled,-Dcdio_paranoia=disabled,libcdio-paranoia" -PACKAGECONFIG[daemon] = "-Ddaemon=true,-Ddaemon=false" -PACKAGECONFIG[ffmpeg] = "-Dffmpeg=enabled,-Dffmpeg=disabled,ffmpeg" -PACKAGECONFIG[fifo] = "-Dfifo=true,-Dfifo=false" -PACKAGECONFIG[flac] = "-Dflac=enabled,-Dflac=disabled,flac" -PACKAGECONFIG[fluidsynth] = "-Dfluidsynth=enabled,-Dfluidsynth=disabled,fluidsynth" -PACKAGECONFIG[httpd] = "-Dhttpd=true,-Dhttpd=false" -PACKAGECONFIG[id3tag] = "-Did3tag=enabled,-Did3tag=disabled,libid3tag" -PACKAGECONFIG[iso9660] = "-Diso9660=enabled,-Diso9660=disabled,libcdio" -PACKAGECONFIG[jack] = "-Djack=enabled,-Djack=disabled,jack" -PACKAGECONFIG[lame] = "-Dlame=enabled,-Dlame=disabled,lame" -PACKAGECONFIG[libsamplerate] = "-Dlibsamplerate=enabled,-Dlibsamplerate=disabled,libsamplerate0" -PACKAGECONFIG[mad] = "-Dmad=enabled,-Dmad=disabled,libmad" -PACKAGECONFIG[mms] = "-Dmms=enabled,-Dmms=disabled,libmms" -PACKAGECONFIG[modplug] = "-Dmodplug=enabled,-Dmodplug=disabled,libmodplug" -PACKAGECONFIG[mpg123] = "-Dmpg123=enabled,-Dmpg123=disabled,mpg123" -PACKAGECONFIG[openal] = "-Dopenal=enabled,-Dopenal=disabled,openal-soft" -PACKAGECONFIG[opus] = "-Dopus=enabled,-Dopus=disabled,libopus libogg" -PACKAGECONFIG[oss] = "-Doss=enabled,-Doss=disabled," -PACKAGECONFIG[recorder] = "-Drecorder=true,-Drecorder=false" -PACKAGECONFIG[smb] = "-Dsmbclient=enabled,-Dsmbclient=disabled,samba" -PACKAGECONFIG[sndfile] = "-Dsndfile=enabled,-Dsndfile=disabled,libsndfile1" -PACKAGECONFIG[upnp] = "-Dupnp=pupnp,-Dupnp=disabled,libupnp" -PACKAGECONFIG[vorbis] = "-Dvorbis=enabled,-Dvorbis=disabled,libvorbis libogg" -PACKAGECONFIG[wavpack] = "-Dwavpack=enabled,-Dwavpack=disabled,wavpack" -PACKAGECONFIG[zlib] = "-Dzlib=enabled,-Dzlib=disabled,zlib" - -do_install:append() { - install -o mpd -d \ - ${D}/${localstatedir}/lib/mpd \ - ${D}/${localstatedir}/lib/mpd/playlists - install -m775 -o mpd -g mpd -d \ - ${D}/${localstatedir}/lib/mpd/music - - install -d ${D}/${sysconfdir} - install -m 644 ${WORKDIR}/mpd.conf.in ${D}/${sysconfdir}/mpd.conf - sed -i \ - -e 's|%music_directory%|${localstatedir}/lib/mpd/music|' \ - -e 's|%playlist_directory%|${localstatedir}/lib/mpd/playlists|' \ - -e 's|%db_file%|${localstatedir}/lib/mpd/mpd.db|' \ - -e 's|%log_file%|${localstatedir}/log/mpd.log|' \ - -e 's|%state_file%|${localstatedir}/lib/mpd/state|' \ - ${D}/${sysconfdir}/mpd.conf - - # we don't need the icon - rm -rf ${D}${datadir}/icons -} - -RPROVIDES:${PN} += "${PN}-systemd" -RREPLACES:${PN} += "${PN}-systemd" -RCONFLICTS:${PN} += "${PN}-systemd" -SYSTEMD_SERVICE:${PN} = "mpd.socket" - -USERADD_PACKAGES = "${PN}" -USERADD_PARAM:${PN} = " \ - --system --no-create-home \ - --home ${localstatedir}/lib/mpd \ - --groups audio \ - --user-group mpd" - -CVE_STATUS[CVE-2020-7465] = "cpe-incorrect: The recipe used in the meta-openembedded is a different mpd package compared to the one which has the CVE issue." -CVE_STATUS[CVE-2020-7466] = "cpe-incorrect: The recipe used in the meta-openembedded is a different mpd package compared to the one which has the CVE issue." diff --git a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/musicpd/mpd_0.23.16.bb b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/musicpd/mpd_0.23.16.bb new file mode 100644 index 00000000..4d854d6f --- /dev/null +++ b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/musicpd/mpd_0.23.16.bb @@ -0,0 +1,110 @@ +SUMMARY = "Music Player Daemon" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" + +HOMEPAGE ="http://www.musicpd.org" + +inherit meson useradd systemd pkgconfig + +DEPENDS += " \ + curl \ + sqlite3 \ + ${@bb.utils.filter('DISTRO_FEATURES', 'pulseaudio', d)} \ + yajl \ + boost \ + icu \ + dbus \ + expat \ + fmt \ +" + +PV .= "+git" +SRC_URI = "git://github.com/MusicPlayerDaemon/MPD;branch=master;protocol=https \ + file://mpd.conf.in \ + " +SRCREV = "b5bd294e5c88c062b1a9c0c4c60397fbf7f3f1c5" +S = "${WORKDIR}/git" + +EXTRA_OEMESON += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '-Dsystemd=enabled -Dsystemd_system_unit_dir=${systemd_system_unitdir} -Dsystemd_user_unit_dir=${systemd_system_unitdir}', '-Dsystemd=disabled', d)} \ + -Dadplug=disabled \ + -Dsndio=disabled \ + -Dshine=disabled \ + -Dtremor=disabled \ +" + +PACKAGECONFIG ??= "${@bb.utils.contains("LICENSE_FLAGS_ACCEPTED", "commercial", "aac", "", d)} \ + alsa ao bzip2 daemon \ + ${@bb.utils.contains("LICENSE_FLAGS_ACCEPTED", "commercial", "ffmpeg aac", "", d)} \ + fifo flac fluidsynth iso9660 \ + jack libsamplerate httpd \ + mms mpg123 modplug sndfile \ + upnp openal opus oss recorder \ + vorbis wavpack zlib" + +PACKAGECONFIG[aac] = "-Dfaad=enabled,-Dfaad=disabled,faad2" +PACKAGECONFIG[alsa] = "-Dalsa=enabled,-Dalsa=disabled,alsa-lib" +PACKAGECONFIG[ao] = "-Dao=enabled,-Dao=disabled,libao" +PACKAGECONFIG[audiofile] = "-Daudiofile=enabled,-Daudiofile=disabled,audiofile" +PACKAGECONFIG[bzip2] = "-Dbzip2=enabled,-Dbzip2=disabled,bzip2" +PACKAGECONFIG[cdioparanoia] = "-Dcdio_paranoia=enabled,-Dcdio_paranoia=disabled,libcdio-paranoia" +PACKAGECONFIG[daemon] = "-Ddaemon=true,-Ddaemon=false" +PACKAGECONFIG[ffmpeg] = "-Dffmpeg=enabled,-Dffmpeg=disabled,ffmpeg" +PACKAGECONFIG[fifo] = "-Dfifo=true,-Dfifo=false" +PACKAGECONFIG[flac] = "-Dflac=enabled,-Dflac=disabled,flac" +PACKAGECONFIG[fluidsynth] = "-Dfluidsynth=enabled,-Dfluidsynth=disabled,fluidsynth" +PACKAGECONFIG[httpd] = "-Dhttpd=true,-Dhttpd=false" +PACKAGECONFIG[id3tag] = "-Did3tag=enabled,-Did3tag=disabled,libid3tag" +PACKAGECONFIG[iso9660] = "-Diso9660=enabled,-Diso9660=disabled,libcdio" +PACKAGECONFIG[jack] = "-Djack=enabled,-Djack=disabled,jack" +PACKAGECONFIG[lame] = "-Dlame=enabled,-Dlame=disabled,lame" +PACKAGECONFIG[libsamplerate] = "-Dlibsamplerate=enabled,-Dlibsamplerate=disabled,libsamplerate0" +PACKAGECONFIG[mad] = "-Dmad=enabled,-Dmad=disabled,libmad" +PACKAGECONFIG[mms] = "-Dmms=enabled,-Dmms=disabled,libmms" +PACKAGECONFIG[modplug] = "-Dmodplug=enabled,-Dmodplug=disabled,libmodplug" +PACKAGECONFIG[mpg123] = "-Dmpg123=enabled,-Dmpg123=disabled,mpg123" +PACKAGECONFIG[openal] = "-Dopenal=enabled,-Dopenal=disabled,openal-soft" +PACKAGECONFIG[opus] = "-Dopus=enabled,-Dopus=disabled,libopus libogg" +PACKAGECONFIG[oss] = "-Doss=enabled,-Doss=disabled," +PACKAGECONFIG[recorder] = "-Drecorder=true,-Drecorder=false" +PACKAGECONFIG[smb] = "-Dsmbclient=enabled,-Dsmbclient=disabled,samba" +PACKAGECONFIG[sndfile] = "-Dsndfile=enabled,-Dsndfile=disabled,libsndfile1" +PACKAGECONFIG[upnp] = "-Dupnp=pupnp,-Dupnp=disabled,libupnp" +PACKAGECONFIG[vorbis] = "-Dvorbis=enabled,-Dvorbis=disabled,libvorbis libogg" +PACKAGECONFIG[wavpack] = "-Dwavpack=enabled,-Dwavpack=disabled,wavpack" +PACKAGECONFIG[zlib] = "-Dzlib=enabled,-Dzlib=disabled,zlib" + +do_install:append() { + install -o mpd -d \ + ${D}/${localstatedir}/lib/mpd \ + ${D}/${localstatedir}/lib/mpd/playlists + install -m775 -o mpd -g mpd -d \ + ${D}/${localstatedir}/lib/mpd/music + + install -d ${D}/${sysconfdir} + install -m 644 ${UNPACKDIR}/mpd.conf.in ${D}/${sysconfdir}/mpd.conf + sed -i \ + -e 's|%music_directory%|${localstatedir}/lib/mpd/music|' \ + -e 's|%playlist_directory%|${localstatedir}/lib/mpd/playlists|' \ + -e 's|%db_file%|${localstatedir}/lib/mpd/mpd.db|' \ + -e 's|%log_file%|${localstatedir}/log/mpd.log|' \ + -e 's|%state_file%|${localstatedir}/lib/mpd/state|' \ + ${D}/${sysconfdir}/mpd.conf + + # we don't need the icon + rm -rf ${D}${datadir}/icons +} + +RPROVIDES:${PN} += "${PN}-systemd" +RREPLACES:${PN} += "${PN}-systemd" +RCONFLICTS:${PN} += "${PN}-systemd" +SYSTEMD_SERVICE:${PN} = "mpd.socket" + +USERADD_PACKAGES = "${PN}" +USERADD_PARAM:${PN} = " \ + --system --no-create-home \ + --home ${localstatedir}/lib/mpd \ + --groups audio \ + --user-group mpd" + +CVE_STATUS[CVE-2020-7465] = "cpe-incorrect: The recipe used in the meta-openembedded is a different mpd package compared to the one which has the CVE issue." +CVE_STATUS[CVE-2020-7466] = "cpe-incorrect: The recipe used in the meta-openembedded is a different mpd package compared to the one which has the CVE issue." diff --git a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/mycroft/mycroft_19.8.1.bb b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/mycroft/mycroft_19.8.1.bb index 444bc1cf..8bedc693 100644 --- a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/mycroft/mycroft_19.8.1.bb +++ b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/mycroft/mycroft_19.8.1.bb @@ -33,17 +33,17 @@ do_install() { rm -r ${D}${libdir}/mycroft/.git # Install the dev opts so it doesn't ask us on initial setup. - install -m 644 ${WORKDIR}/dev_opts.json ${D}${libdir}/mycroft/.dev_opts.json + install -m 644 ${UNPACKDIR}/dev_opts.json ${D}${libdir}/mycroft/.dev_opts.json if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then install -d ${D}${systemd_unitdir}/system - install -m 644 ${WORKDIR}/mycroft-setup.service ${D}${systemd_unitdir}/system + install -m 644 ${UNPACKDIR}/mycroft-setup.service ${D}${systemd_unitdir}/system sed -i -e 's,@LIBDIR@,${libdir},g' ${D}${systemd_unitdir}/system/mycroft-setup.service fi if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then install -d ${D}${systemd_unitdir}/system - install -m 644 ${WORKDIR}/mycroft.service ${D}${systemd_unitdir}/system + install -m 644 ${UNPACKDIR}/mycroft.service ${D}${systemd_unitdir}/system sed -i -e 's,@LIBDIR@,${libdir},g' ${D}${systemd_unitdir}/system/mycroft.service fi } diff --git a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/packagegroups/packagegroup-meta-multimedia.bb b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/packagegroups/packagegroup-meta-multimedia.bb index 672c8abc..618eaa68 100644 --- a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/packagegroups/packagegroup-meta-multimedia.bb +++ b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/packagegroups/packagegroup-meta-multimedia.bb @@ -51,7 +51,6 @@ RDEPENDS:packagegroup-meta-multimedia = "\ openal-soft \ opusfile \ opus-tools \ - ${@bb.utils.contains("LICENSE_FLAGS_ACCEPTED", "commercial", bb.utils.contains("DISTRO_FEATURES", "x11", "vlc", "", d), "", d)} \ ${@bb.utils.contains("LICENSE_FLAGS_ACCEPTED", "commercial", "sox streamripper", "", d)} \ tinyalsa \ ${@bb.utils.contains("LICENSE_FLAGS_ACCEPTED", "commercial", bb.utils.contains_any("TRANSLATED_TARGET_ARCH", "i586 i686 x86-64", "x265", "", d), "", d)} \ diff --git a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/pipewire/pipewire-0.2/0001-module-suspend-on-idle-Include-time.h-for-struct-tim.patch b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/pipewire/pipewire-0.2/0001-module-suspend-on-idle-Include-time.h-for-struct-tim.patch new file mode 100644 index 00000000..ce381a78 --- /dev/null +++ b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/pipewire/pipewire-0.2/0001-module-suspend-on-idle-Include-time.h-for-struct-tim.patch @@ -0,0 +1,43 @@ +From b1d911fdab4a583f276d18395037d90bfc305109 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 20 May 2024 18:12:23 -0700 +Subject: [PATCH] module-suspend-on-idle: Include time.h for struct timespec + decl + +This is flagged as error with gcc-14 on musl targets + +In file included from ../git/src/pipewire/loop.h:27, + from ../git/src/pipewire/core.h:44, + from ../git/src/modules/module-suspend-on-idle.c:26: +../git/spa/include/spa/support/loop.h:184:37: warning: 'struct timespec' declared inside parameter list will not be visible outside of this definition or declaration + 184 | struct timespec *value, + | ^~~~~~~~ +../git/src/modules/module-suspend-on-idle.c: In function 'node_state_changed': +../git/src/modules/module-suspend-on-idle.c:110:69: error: passing argument 2 of 'main_loop->utils->update_timer' from incompatible pointer type [-Wincompatible-pointer-types] + 110 | pw_loop_update_timer(main_loop, info->idle_timeout, &value, NULL, false); + | ^~~~~~ + | | + | struct timespec * + +Upstream-Status: Inappropriate [Fixed in latest pipewire differently] + +Signed-off-by: Khem Raj +--- + src/modules/module-suspend-on-idle.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/modules/module-suspend-on-idle.c b/src/modules/module-suspend-on-idle.c +index e5c1fcb30..4dba3be71 100644 +--- a/src/modules/module-suspend-on-idle.c ++++ b/src/modules/module-suspend-on-idle.c +@@ -20,6 +20,7 @@ + #include + #include + #include ++#include + + #include "config.h" + +-- +2.45.1 + diff --git a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/pipewire/pipewire-0.2_git.bb b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/pipewire/pipewire-0.2_git.bb index 9895e897..7c8afd3d 100644 --- a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/pipewire/pipewire-0.2_git.bb +++ b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/pipewire/pipewire-0.2_git.bb @@ -10,7 +10,9 @@ DEPENDS = "alsa-lib dbus udev" SRCREV = "14c11c0fe4d366bad4cfecdee97b6652ff9ed63d" PV = "0.2.7" -SRC_URI = "git://github.com/PipeWire/pipewire;branch=master;protocol=https" +SRC_URI = "git://github.com/PipeWire/pipewire;branch=master;protocol=https \ + file://0001-module-suspend-on-idle-Include-time.h-for-struct-tim.patch \ + " S = "${WORKDIR}/git" diff --git a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/pipewire/pipewire_1.0.9.bb b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/pipewire/pipewire_1.0.9.bb deleted file mode 100644 index c1667252..00000000 --- a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/pipewire/pipewire_1.0.9.bb +++ /dev/null @@ -1,398 +0,0 @@ -SUMMARY = "Multimedia processing server for Linux" -DESCRIPTION = "Linux server for handling and routing audio and video streams between applications and multimedia I/O devices" -HOMEPAGE = "https://pipewire.org/" -BUGTRACKER = "https://gitlab.freedesktop.org/pipewire/pipewire/issues" -SECTION = "multimedia" - -LICENSE = "MIT & LGPL-2.1-or-later & GPL-2.0-only" -LIC_FILES_CHKSUM = " \ - file://LICENSE;md5=2158739e172e58dc9ab1bdd2d6ec9c72 \ - file://COPYING;md5=97be96ca4fab23e9657ffa590b931c1a \ -" - -DEPENDS = "dbus ncurses" - -SRCREV = "467fd4a02e37f93a8d27448eef548e247f020466" -SRC_URI = "git://gitlab.freedesktop.org/pipewire/pipewire.git;branch=1.0;protocol=https" - -S = "${WORKDIR}/git" - -inherit meson pkgconfig systemd gettext useradd - -USERADD_PACKAGES = "${PN}" - -GROUPADD_PARAM:${PN} = "--system pipewire" - -USERADD_PARAM:${PN} = "--system --home / --no-create-home \ - --comment 'PipeWire multimedia daemon' \ - --gid pipewire --groups audio,video \ - pipewire" - -SYSTEMD_PACKAGES = "${PN}" - -# For "EVL", look up https://evlproject.org/ . It involves -# a specially prepared kernel, and is currently unavailable -# in Yocto. -# -# -# manpage generation requires xmltoman, which is not available. -# -# The session-managers list specifies which session managers Meson -# shall download (via git clone) and build as subprojects. In OE, -# this is not how a session manager should be built. Instead, they -# should be integrated as separate OE recipes. To prevent PipeWire -# from using this Meson feature, set an empty list. -# This does not disable support or the need for session managers, -# it just prevents this subproject feature. -# -# AptX and LDAC are not available in OE. Currently, neither -# are lv2, ROC, and libmysofa. -# -# The RTKit module is deprecated in favor of the newer RT module. -# It still exists for legacy setups that still include it in -# their PipeWire configuration files. -EXTRA_OEMESON += " \ - -Devl=disabled \ - -Dtests=disabled \ - -Dudevrulesdir=${nonarch_base_libdir}/udev/rules.d/ \ - -Dsystemd-system-unit-dir=${systemd_system_unitdir} \ - -Dsystemd-user-unit-dir=${systemd_user_unitdir} \ - -Dman=disabled \ - -Dsession-managers='[]' \ - -Dlv2=disabled \ - -Droc=disabled \ - -Dbluez5-codec-aptx=disabled \ - -Dbluez5-codec-ldac=disabled \ - -Dlegacy-rtkit=false \ - -Dlibmysofa=disabled \ -" - -# spa alsa plugin code uses typedef redefinition, which is officially a C11 feature. -# Pipewire builds with 'c_std=gnu99' by default. Recent versions of gcc don't issue this warning in gnu99 -# mode but it looks like clang still does -CFLAGS:append = " -Wno-typedef-redefinition" - -# According to wireplumber documentation only one session manager should be installed at a time -# Possible options are media-session, which has fewer dependencies but is very simple, -# or wireplumber, which is more powerful. -PIPEWIRE_SESSION_MANAGER ??= "wireplumber" - -FFMPEG_AVAILABLE = "${@bb.utils.contains('LICENSE_FLAGS_ACCEPTED', 'commercial', 'ffmpeg', '', d)}" -BLUETOOTH_AAC = "${@bb.utils.contains('LICENSE_FLAGS_ACCEPTED', 'commercial', 'bluez-aac', '', d)}" - -PACKAGECONFIG:class-target ??= " \ - ${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez bluez-opus ${BLUETOOTH_AAC}', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd systemd-system-service systemd-user-service', '', d)} \ - ${@bb.utils.filter('DISTRO_FEATURES', 'alsa vulkan pulseaudio', d)} \ - ${PIPEWIRE_SESSION_MANAGER} \ - ${FFMPEG_AVAILABLE} avahi flatpak gstreamer gsettings jack libusb pw-cat raop sndfile v4l2 udev volume webrtc-echo-cancelling libcamera readline \ -" - -# "jack" and "pipewire-jack" packageconfigs cannot be both enabled, -# since "jack" imports libjack, and "pipewire-jack" generates -# libjack.so* files, thus colliding with the libpack package. This -# is why these two are marked in their respective packageconfigs -# as being in conflict. -PACKAGECONFIG[alsa] = "-Dalsa=enabled,-Dalsa=disabled,alsa-lib udev,,pipewire-alsa pipewire-alsa-card-profile" -PACKAGECONFIG[avahi] = "-Davahi=enabled,-Davahi=disabled,avahi" -PACKAGECONFIG[bluez] = "-Dbluez5=enabled,-Dbluez5=disabled,bluez5 sbc glib-2.0-native" -PACKAGECONFIG[bluez-aac] = "-Dbluez5-codec-aac=enabled,-Dbluez5-codec-aac=disabled,fdk-aac" -PACKAGECONFIG[bluez-opus] = "-Dbluez5-codec-opus=enabled,-Dbluez5-codec-opus=disabled,libopus" -PACKAGECONFIG[bluez-lc3] = "-Dbluez5-codec-lc3=enabled,-Dbluez5-codec-lc3=disabled,liblc3" -# From the pipewire git log: -# "Some Linux phones doesn't use oFono but ModemManager to control the modem." -# This packageconfig enables modemmanager specific code in the BlueZ backend. -PACKAGECONFIG[bluez-backend-native-mm] = "-Dbluez5-backend-native-mm=enabled,-Dbluez5-backend-native-mm=disabled,modemmanager" -PACKAGECONFIG[docs] = "-Ddocs=enabled,-Ddocs=disabled,doxygen-native graphviz-native" -PACKAGECONFIG[ffmpeg] = "-Dffmpeg=enabled,-Dffmpeg=disabled,ffmpeg" -PACKAGECONFIG[flatpak] = "-Dflatpak=enabled,-Dflatpak=disabled,glib-2.0" -PACKAGECONFIG[gsettings] = "-Dgsettings=enabled,-Dgsettings=disabled,glib-2.0" -PACKAGECONFIG[gstreamer] = "-Dgstreamer=enabled,-Dgstreamer=disabled,glib-2.0 gstreamer1.0 gstreamer1.0-plugins-base,,gstreamer1.0-pipewire" -PACKAGECONFIG[jack] = "-Djack=enabled,-Djack=disabled,jack,,,pipewire-jack" -PACKAGECONFIG[libcamera] = "-Dlibcamera=enabled,-Dlibcamera=disabled,libcamera libdrm" -PACKAGECONFIG[libcanberra] = "-Dlibcanberra=enabled,-Dlibcanberra=disabled,libcanberra" -PACKAGECONFIG[libusb] = "-Dlibusb=enabled,-Dlibusb=disabled,libusb" -PACKAGECONFIG[media-session] = ",,,pipewire-media-session,,wireplumber" -PACKAGECONFIG[pulseaudio] = "-Dlibpulse=enabled,-Dlibpulse=disabled,pulseaudio,,pipewire-pulse" -PACKAGECONFIG[pipewire-alsa] = "-Dpipewire-alsa=enabled,-Dpipewire-alsa=disabled,alsa-lib" -PACKAGECONFIG[pipewire-jack] = "-Dpipewire-jack=enabled -Dlibjack-path=${libdir}/${PW_MODULE_SUBDIR}/jack,-Dpipewire-jack=disabled,jack,,pipewire-jack,jack" -PACKAGECONFIG[pw-cat] = "-Dpw-cat=enabled,-Dpw-cat=disabled" -PACKAGECONFIG[raop] = "-Draop=enabled,-Draop=disabled,openssl" -# Starting with version 0.3.60, readline usage can be turned off in pw-cli. -# If it is disabled, getline() is used as a fallback. -PACKAGECONFIG[readline] = "-Dreadline=enabled,-Dreadline=disabled,readline" -PACKAGECONFIG[sdl2] = "-Dsdl2=enabled,-Dsdl2=disabled,libsdl2" -PACKAGECONFIG[sndfile] = "-Dsndfile=enabled,-Dsndfile=disabled,libsndfile1" -PACKAGECONFIG[systemd] = "-Dsystemd=enabled,-Dsystemd=disabled,systemd" -PACKAGECONFIG[systemd-system-service] = "-Dsystemd-system-service=enabled,-Dsystemd-system-service=disabled,systemd" -# "systemd-user-service" packageconfig will only install service -# files to rootfs but not enable them as systemd.bbclass -# currently lacks the feature of enabling user services. -PACKAGECONFIG[systemd-user-service] = "-Dsystemd-user-service=enabled,-Dsystemd-user-service=disabled,systemd" -# pw-cat needs sndfile packageconfig to be enabled -PACKAGECONFIG[udev] = "-Dudev=enabled,-Dudev=disabled,udev" -PACKAGECONFIG[v4l2] = "-Dv4l2=enabled,-Dv4l2=disabled,udev" -PACKAGECONFIG[volume] = "-Dvolume=enabled,-Dvolume=disabled" -PACKAGECONFIG[vulkan] = "-Dvulkan=enabled,-Dvulkan=disabled,vulkan-headers vulkan-loader" -PACKAGECONFIG[webrtc-echo-cancelling] = "-Decho-cancel-webrtc=enabled,-Decho-cancel-webrtc=disabled,webrtc-audio-processing-1" -PACKAGECONFIG[wireplumber] = ",,,wireplumber,,media-session" - -PACKAGESPLITFUNCS:prepend = " split_dynamic_packages " -PACKAGESPLITFUNCS:append = " set_dynamic_metapkg_rdepends " - -SPA_SUBDIR = "spa-0.2" -PW_MODULE_SUBDIR = "pipewire-0.3" - -remove_unused_installed_files() { - # jack.conf is used by pipewire-jack (not the JACK SPA plugin). - # Remove it if pipewire-jack is not built to avoid creating the - # pipewire-jack package. - if ${@bb.utils.contains('PACKAGECONFIG', 'pipewire-jack', 'false', 'true', d)}; then - rm -f "${D}${datadir}/pipewire/jack.conf" - fi - - # minimal.conf is an example of how to minimally configure the - # daemon and is not meant to be used for production. - rm -f "${D}${datadir}/pipewire/minimal.conf" -} - -do_install:append() { - # The pipewire-alsa plugin needs the following files in /etc/alsa/conf.d/ to - # be picked up by alsa. - install -d ${D}${sysconfdir}/alsa/conf.d - ln -sf ${datadir}/alsa/alsa.conf.d/50-pipewire.conf ${D}${sysconfdir}/alsa/conf.d/50-pipewire.conf - ln -sf ${datadir}/alsa/alsa.conf.d/99-pipewire-default.conf ${D}${sysconfdir}/alsa/conf.d/99-pipewire-default.conf -} - -do_install[postfuncs] += "remove_unused_installed_files" - -python split_dynamic_packages () { - # Create packages for each SPA plugin. These plugins are located - # in individual subdirectories, so a recursive search is needed. - spa_libdir = d.expand('${libdir}/${SPA_SUBDIR}') - do_split_packages(d, spa_libdir, r'^libspa-(.*)\.so$', d.expand('${PN}-spa-plugins-%s'), 'PipeWire SPA plugin for %s', extra_depends='', recursive=True) - - # Create packages for each PipeWire module. - pw_module_libdir = d.expand('${libdir}/${PW_MODULE_SUBDIR}') - do_split_packages(d, pw_module_libdir, r'^libpipewire-module-(.*)\.so$', d.expand('${PN}-modules-%s'), 'PipeWire %s module', extra_depends='', recursive=False) -} - -python set_dynamic_metapkg_rdepends () { - import os - import oe.utils - - if bb.data.inherits_class('nativesdk', d) or bb.data.inherits_class('native', d): - return - - # Go through all generated SPA plugin and PipeWire module packages - # (excluding the main package and the -meta package itself) and - # add them to the -meta package as RDEPENDS. - - base_pn = d.getVar('PN') - - spa_pn = base_pn + '-spa-plugins' - spa_metapkg = spa_pn + '-meta' - - pw_module_pn = base_pn + '-modules' - pw_module_metapkg = pw_module_pn + '-meta' - - d.setVar('ALLOW_EMPTY:' + spa_metapkg, "1") - d.setVar('FILES:' + spa_metapkg, "") - - d.setVar('ALLOW_EMPTY:' + pw_module_metapkg, "1") - d.setVar('FILES:' + pw_module_metapkg, "") - - blacklist = [ spa_pn, spa_metapkg, pw_module_pn, pw_module_metapkg ] - spa_metapkg_rdepends = [] - pw_module_metapkg_rdepends = [] - pkgdest = d.getVar('PKGDEST') - - for pkg in oe.utils.packages_filter_out_system(d): - if pkg in blacklist: - continue - - is_spa_pkg = pkg.startswith(spa_pn) - is_pw_module_pkg = pkg.startswith(pw_module_pn) - if not is_spa_pkg and not is_pw_module_pkg: - continue - - if pkg in spa_metapkg_rdepends or pkg in pw_module_metapkg_rdepends: - continue - - # See if the package is empty by looking at the contents of its - # PKGDEST subdirectory. If this subdirectory is empty, then then - # package is empty as well. Empty packages do not get added to - # the meta package's RDEPENDS. - pkgdir = os.path.join(pkgdest, pkg) - if os.path.exists(pkgdir): - dir_contents = os.listdir(pkgdir) or [] - else: - dir_contents = [] - is_empty = len(dir_contents) == 0 - if not is_empty: - if is_spa_pkg: - spa_metapkg_rdepends.append(pkg) - if is_pw_module_pkg: - pw_module_metapkg_rdepends.append(pkg) - - d.setVar('RDEPENDS:' + spa_metapkg, ' '.join(spa_metapkg_rdepends)) - d.setVar('DESCRIPTION:' + spa_metapkg, spa_pn + ' meta package') - - d.setVar('RDEPENDS:' + pw_module_metapkg, ' '.join(pw_module_metapkg_rdepends)) - d.setVar('DESCRIPTION:' + pw_module_metapkg, pw_module_pn + ' meta package') -} - -PACKAGES =+ "\ - libpipewire \ - ${PN}-tools \ - ${PN}-pulse \ - ${PN}-alsa \ - ${PN}-jack \ - ${PN}-spa-plugins \ - ${PN}-spa-plugins-meta \ - ${PN}-spa-tools \ - ${PN}-modules \ - ${PN}-modules-meta \ - ${PN}-alsa-card-profile \ - ${PN}-v4l2 \ - ${PN}-aes67 \ - gstreamer1.0-pipewire \ -" - -PACKAGES_DYNAMIC = "^${PN}-spa-plugins.* ^${PN}-modules.*" -PACKAGES_DYNAMIC:class-native = "" - -SYSTEMD_SERVICE:${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'systemd-system-service', 'pipewire.service', '', d)}" -CONFFILES:${PN} += "${datadir}/pipewire/pipewire.conf" -FILES:${PN} = " \ - ${datadir}/pipewire \ - ${systemd_system_unitdir}/pipewire* \ - ${systemd_user_unitdir} \ - ${bindir}/pipewire \ - ${bindir}/pipewire-avb \ - ${bindir}/pipewire-vulkan \ -" - -RRECOMMENDS:${PN}:class-target += " \ - pipewire-modules-meta \ - pipewire-spa-plugins-meta \ -" - -FILES:${PN}-dev += " \ - ${libdir}/${PW_MODULE_SUBDIR}/jack/libjack*.so \ -" - -CONFFILES:libpipewire += "${datadir}/pipewire/client.conf" -FILES:libpipewire = " \ - ${datadir}/pipewire/client.conf \ - ${libdir}/libpipewire-*.so.* \ -" -# Add the bare minimum modules and plugins required to be able -# to use libpipewire. Without these, it is essentially unusable. -RDEPENDS:libpipewire += " \ - ${PN}-modules-client-node \ - ${PN}-modules-protocol-native \ - ${PN}-spa-plugins-support \ -" - -FILES:${PN}-tools = " \ - ${bindir}/pw-cat \ - ${bindir}/pw-cli \ - ${bindir}/pw-config \ - ${bindir}/pw-dot \ - ${bindir}/pw-dsdplay \ - ${bindir}/pw-dump \ - ${bindir}/pw-encplay \ - ${bindir}/pw-link \ - ${bindir}/pw-loopback \ - ${bindir}/pw-metadata \ - ${bindir}/pw-mididump \ - ${bindir}/pw-midiplay \ - ${bindir}/pw-midirecord \ - ${bindir}/pw-mon \ - ${bindir}/pw-play \ - ${bindir}/pw-profiler \ - ${bindir}/pw-record \ - ${bindir}/pw-reserve \ - ${bindir}/pw-top \ -" - -# This is a shim daemon that is intended to be used as a -# drop-in PulseAudio replacement, providing a pulseaudio-compatible -# socket that can be used by applications that use libpulse. -CONFFILES:${PN}-pulse += "${datadir}/pipewire/pipewire-pulse.conf" -FILES:${PN}-pulse = " \ - ${datadir}/pipewire/pipewire-pulse.conf \ - ${systemd_system_unitdir}/pipewire-pulse.* \ - ${systemd_user_unitdir}/pipewire-pulse.* \ - ${bindir}/pipewire-pulse \ -" -RDEPENDS:${PN}-pulse += " \ - ${PN}-modules-protocol-pulse \ -" - -# ALSA plugin to redirect audio to pipewire. -FILES:${PN}-alsa = "\ - ${libdir}/alsa-lib/* \ - ${datadir}/alsa/alsa.conf.d/* \ - ${sysconfdir}/alsa/conf.d/50-pipewire.conf \ - ${sysconfdir}/alsa/conf.d/99-pipewire-default.conf \ -" - -# JACK drop-in libraries to redirect audio to pipewire. -CONFFILES:${PN}-jack = "${datadir}/pipewire/jack.conf" -FILES:${PN}-jack = "\ - ${bindir}/pw-jack \ - ${datadir}/pipewire/jack.conf \ - ${libdir}/${PW_MODULE_SUBDIR}/jack/libjack*.so.* \ -" - -# Dynamic SPA plugin packages (see set_dynamic_metapkg_rdepends). -FILES:${PN}-spa-plugins = "" -RRECOMMENDS:${PN}-spa-plugins += "${PN}-spa-plugins-meta" - -FILES:${PN}-spa-plugins-bluez5 += " \ - ${datadir}/${SPA_SUBDIR}/bluez5/* \ -" - -FILES:${PN}-spa-tools = " \ - ${bindir}/spa-* \ -" - -# Dynamic PipeWire module packages (see set_dynamic_metapkg_rdepends). -FILES:${PN}-modules = "" -RRECOMMENDS:${PN}-modules += "${PN}-modules-meta" - -CONFFILES:${PN}-modules-rt = "${datadir}/pipewire/client-rt.conf" -FILES:${PN}-modules-rt += " \ - ${datadir}/pipewire/client-rt.conf \ - ${sysconfdir}/security/limits.d/* \ - " - -CONFFILES:${PN}-modules-filter-chain = "${datadir}/pipewire/filter-chain/*" -FILES:${PN}-modules-filter-chain += " \ - ${datadir}/pipewire/filter-chain/* \ -" - -FILES:${PN}-alsa-card-profile = " \ - ${datadir}/alsa-card-profile/* \ - ${nonarch_base_libdir}/udev/rules.d/90-pipewire-alsa.rules \ -" - -# V4L2 interface emulator for sending/receiving data between PipeWire and V4L2 applications. -FILES:${PN}-v4l2 += " \ - ${bindir}/pw-v4l2 \ - ${libdir}/${PW_MODULE_SUBDIR}/v4l2/libpw-v4l2.so \ -" - -# AES67 is a standard for audio over IP, from the Audio Engineering Society (AES). -FILES:${PN}-aes67 += " \ - ${bindir}/pipewire-aes67 \ -" - -FILES:gstreamer1.0-pipewire = " \ - ${libdir}/gstreamer-1.0/* \ -" - -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/pipewire/pipewire_1.2.3.bb b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/pipewire/pipewire_1.2.3.bb new file mode 100644 index 00000000..0a2088a3 --- /dev/null +++ b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/pipewire/pipewire_1.2.3.bb @@ -0,0 +1,392 @@ +SUMMARY = "Multimedia processing server for Linux" +DESCRIPTION = "Linux server for handling and routing audio and video streams between applications and multimedia I/O devices" +HOMEPAGE = "https://pipewire.org/" +BUGTRACKER = "https://gitlab.freedesktop.org/pipewire/pipewire/issues" +SECTION = "multimedia" + +LICENSE = "MIT & LGPL-2.1-or-later & GPL-2.0-only" +LIC_FILES_CHKSUM = " \ + file://LICENSE;md5=2158739e172e58dc9ab1bdd2d6ec9c72 \ + file://COPYING;md5=97be96ca4fab23e9657ffa590b931c1a \ +" + +DEPENDS = "dbus ncurses" + +SRCREV = "e2a76824e2b112b15ae4a1a3d444696d5526f8d8" +SRC_URI = "git://gitlab.freedesktop.org/pipewire/pipewire.git;branch=1.2;protocol=https" + +S = "${WORKDIR}/git" + +inherit meson pkgconfig systemd gettext useradd + +USERADD_PACKAGES = "${PN}" + +GROUPADD_PARAM:${PN} = "--system pipewire" + +USERADD_PARAM:${PN} = "--system --home / --no-create-home \ + --comment 'PipeWire multimedia daemon' \ + --gid pipewire --groups audio,video \ + pipewire" + +SYSTEMD_PACKAGES = "${PN}" + +# For "EVL", look up https://evlproject.org/ . It involves +# a specially prepared kernel, and is currently unavailable +# in Yocto. +# +# +# manpage generation requires xmltoman, which is not available. +# +# The session-managers list specifies which session managers Meson +# shall download (via git clone) and build as subprojects. In OE, +# this is not how a session manager should be built. Instead, they +# should be integrated as separate OE recipes. To prevent PipeWire +# from using this Meson feature, set an empty list. +# This does not disable support or the need for session managers, +# it just prevents this subproject feature. +# +# AptX and LDAC are not available in OE. Currently, neither +# are lv2, ROC, and libmysofa. +# +# The RTKit module is deprecated in favor of the newer RT module. +# It still exists for legacy setups that still include it in +# their PipeWire configuration files. +EXTRA_OEMESON += " \ + -Devl=disabled \ + -Dtests=disabled \ + -Dudevrulesdir=${nonarch_base_libdir}/udev/rules.d/ \ + -Dsystemd-system-unit-dir=${systemd_system_unitdir} \ + -Dsystemd-user-unit-dir=${systemd_user_unitdir} \ + -Dman=disabled \ + -Dsession-managers='[]' \ + -Dlv2=disabled \ + -Droc=disabled \ + -Dbluez5-codec-aptx=disabled \ + -Dbluez5-codec-ldac=disabled \ + -Dlegacy-rtkit=false \ + -Dlibmysofa=disabled \ +" + +# spa alsa plugin code uses typedef redefinition, which is officially a C11 feature. +# Pipewire builds with 'c_std=gnu99' by default. Recent versions of gcc don't issue this warning in gnu99 +# mode but it looks like clang still does +CFLAGS:append = " -Wno-typedef-redefinition" + +# Specify linking with -latomic on architectures missing 64bit atomics. +LDFLAGS += "${@bb.utils.contains_any('TUNE_FEATURES', 'riscv32 armv5 mips ppc32 m32', '-latomic', '', d)}" + +# According to wireplumber documentation only one session manager should be installed at a time +# Possible options are media-session, which has fewer dependencies but is very simple, +# or wireplumber, which is more powerful. +PIPEWIRE_SESSION_MANAGER ??= "wireplumber" + +FFMPEG_AVAILABLE = "${@bb.utils.contains('LICENSE_FLAGS_ACCEPTED', 'commercial', 'ffmpeg', '', d)}" +BLUETOOTH_AAC = "${@bb.utils.contains('LICENSE_FLAGS_ACCEPTED', 'commercial', 'bluez-aac', '', d)}" + +PACKAGECONFIG:class-target ??= " \ + ${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez bluez-opus ${BLUETOOTH_AAC}', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd systemd-system-service systemd-user-service', '', d)} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'alsa vulkan pulseaudio', d)} \ + ${PIPEWIRE_SESSION_MANAGER} \ + ${FFMPEG_AVAILABLE} avahi flatpak gstreamer gsettings jack libusb pw-cat raop sndfile v4l2 udev volume webrtc-echo-cancelling libcamera readline \ +" + +# "jack" and "pipewire-jack" packageconfigs cannot be both enabled, +# since "jack" imports libjack, and "pipewire-jack" generates +# libjack.so* files, thus colliding with the libpack package. This +# is why these two are marked in their respective packageconfigs +# as being in conflict. +PACKAGECONFIG[alsa] = "-Dalsa=enabled,-Dalsa=disabled,alsa-lib udev,,pipewire-alsa pipewire-alsa-card-profile" +PACKAGECONFIG[avahi] = "-Davahi=enabled,-Davahi=disabled,avahi" +PACKAGECONFIG[bluez] = "-Dbluez5=enabled,-Dbluez5=disabled,bluez5 sbc" +PACKAGECONFIG[bluez-aac] = "-Dbluez5-codec-aac=enabled,-Dbluez5-codec-aac=disabled,fdk-aac" +PACKAGECONFIG[bluez-opus] = "-Dbluez5-codec-opus=enabled,-Dbluez5-codec-opus=disabled,libopus" +PACKAGECONFIG[bluez-lc3] = "-Dbluez5-codec-lc3=enabled,-Dbluez5-codec-lc3=disabled,liblc3" +# From the pipewire git log: +# "Some Linux phones doesn't use oFono but ModemManager to control the modem." +# This packageconfig enables modemmanager specific code in the BlueZ backend. +PACKAGECONFIG[bluez-backend-native-mm] = "-Dbluez5-backend-native-mm=enabled,-Dbluez5-backend-native-mm=disabled,modemmanager" +PACKAGECONFIG[docs] = "-Ddocs=enabled,-Ddocs=disabled,doxygen-native graphviz-native" +PACKAGECONFIG[ffmpeg] = "-Dffmpeg=enabled,-Dffmpeg=disabled,ffmpeg" +PACKAGECONFIG[flatpak] = "-Dflatpak=enabled,-Dflatpak=disabled,glib-2.0" +PACKAGECONFIG[gsettings] = "-Dgsettings=enabled,-Dgsettings=disabled,glib-2.0" +PACKAGECONFIG[gstreamer] = "-Dgstreamer=enabled,-Dgstreamer=disabled,glib-2.0 gstreamer1.0 gstreamer1.0-plugins-base,,gstreamer1.0-pipewire" +PACKAGECONFIG[jack] = "-Djack=enabled,-Djack=disabled,jack,,,pipewire-jack" +PACKAGECONFIG[libcamera] = "-Dlibcamera=enabled,-Dlibcamera=disabled,libcamera libdrm" +PACKAGECONFIG[libcanberra] = "-Dlibcanberra=enabled,-Dlibcanberra=disabled,libcanberra" +PACKAGECONFIG[libusb] = "-Dlibusb=enabled,-Dlibusb=disabled,libusb" +PACKAGECONFIG[media-session] = ",,,pipewire-media-session,,wireplumber" +PACKAGECONFIG[pulseaudio] = "-Dlibpulse=enabled,-Dlibpulse=disabled,pulseaudio,,pipewire-pulse" +PACKAGECONFIG[pipewire-alsa] = "-Dpipewire-alsa=enabled,-Dpipewire-alsa=disabled,alsa-lib" +PACKAGECONFIG[pipewire-jack] = "-Dpipewire-jack=enabled -Dlibjack-path=${libdir}/${PW_MODULE_SUBDIR}/jack,-Dpipewire-jack=disabled,jack,,pipewire-jack,jack" +PACKAGECONFIG[pw-cat] = "-Dpw-cat=enabled,-Dpw-cat=disabled" +PACKAGECONFIG[raop] = "-Draop=enabled,-Draop=disabled,openssl" +# Starting with version 0.3.60, readline usage can be turned off in pw-cli. +# If it is disabled, getline() is used as a fallback. +PACKAGECONFIG[readline] = "-Dreadline=enabled,-Dreadline=disabled,readline" +PACKAGECONFIG[sdl2] = "-Dsdl2=enabled,-Dsdl2=disabled,libsdl2" +PACKAGECONFIG[sndfile] = "-Dsndfile=enabled,-Dsndfile=disabled,libsndfile1" +PACKAGECONFIG[systemd] = "-Dsystemd=enabled,-Dsystemd=disabled,systemd" +PACKAGECONFIG[systemd-system-service] = "-Dsystemd-system-service=enabled,-Dsystemd-system-service=disabled,systemd" +# "systemd-user-service" packageconfig will only install service +# files to rootfs but not enable them as systemd.bbclass +# currently lacks the feature of enabling user services. +PACKAGECONFIG[systemd-user-service] = "-Dsystemd-user-service=enabled,-Dsystemd-user-service=disabled,systemd" +# pw-cat needs sndfile packageconfig to be enabled +PACKAGECONFIG[udev] = "-Dudev=enabled,-Dudev=disabled,udev" +PACKAGECONFIG[v4l2] = "-Dv4l2=enabled,-Dv4l2=disabled,udev" +PACKAGECONFIG[volume] = "-Dvolume=enabled,-Dvolume=disabled" +PACKAGECONFIG[vulkan] = "-Dvulkan=enabled,-Dvulkan=disabled,vulkan-headers vulkan-loader" +PACKAGECONFIG[webrtc-echo-cancelling] = "-Decho-cancel-webrtc=enabled,-Decho-cancel-webrtc=disabled,webrtc-audio-processing-1" +PACKAGECONFIG[wireplumber] = ",,,wireplumber,,media-session" + +PACKAGESPLITFUNCS:prepend = " split_dynamic_packages " +PACKAGESPLITFUNCS:append = " set_dynamic_metapkg_rdepends " + +SPA_SUBDIR = "spa-0.2" +PW_MODULE_SUBDIR = "pipewire-0.3" + +remove_unused_installed_files() { + # jack.conf is used by pipewire-jack (not the JACK SPA plugin). + # Remove it if pipewire-jack is not built to avoid creating the + # pipewire-jack package. + if ${@bb.utils.contains('PACKAGECONFIG', 'pipewire-jack', 'false', 'true', d)}; then + rm -f "${D}${datadir}/pipewire/jack.conf" + fi + + # minimal.conf is an example of how to minimally configure the + # daemon and is not meant to be used for production. + rm -f "${D}${datadir}/pipewire/minimal.conf" +} + +do_install[postfuncs] += "remove_unused_installed_files" + +python split_dynamic_packages () { + # Create packages for each SPA plugin. These plugins are located + # in individual subdirectories, so a recursive search is needed. + spa_libdir = d.expand('${libdir}/${SPA_SUBDIR}') + do_split_packages(d, spa_libdir, r'^libspa-(.*)\.so$', d.expand('${PN}-spa-plugins-%s'), 'PipeWire SPA plugin for %s', extra_depends='', recursive=True) + + # Create packages for each PipeWire module. + pw_module_libdir = d.expand('${libdir}/${PW_MODULE_SUBDIR}') + do_split_packages(d, pw_module_libdir, r'^libpipewire-module-(.*)\.so$', d.expand('${PN}-modules-%s'), 'PipeWire %s module', extra_depends='', recursive=False) +} + +python set_dynamic_metapkg_rdepends () { + import os + import oe.utils + + if bb.data.inherits_class('nativesdk', d) or bb.data.inherits_class('native', d): + return + + # Go through all generated SPA plugin and PipeWire module packages + # (excluding the main package and the -meta package itself) and + # add them to the -meta package as RDEPENDS. + + base_pn = d.getVar('PN') + + spa_pn = base_pn + '-spa-plugins' + spa_metapkg = spa_pn + '-meta' + + pw_module_pn = base_pn + '-modules' + pw_module_metapkg = pw_module_pn + '-meta' + + d.setVar('ALLOW_EMPTY:' + spa_metapkg, "1") + d.setVar('FILES:' + spa_metapkg, "") + + d.setVar('ALLOW_EMPTY:' + pw_module_metapkg, "1") + d.setVar('FILES:' + pw_module_metapkg, "") + + blacklist = [ spa_pn, spa_metapkg, pw_module_pn, pw_module_metapkg ] + spa_metapkg_rdepends = [] + pw_module_metapkg_rdepends = [] + pkgdest = d.getVar('PKGDEST') + + for pkg in oe.utils.packages_filter_out_system(d): + if pkg in blacklist: + continue + + is_spa_pkg = pkg.startswith(spa_pn) + is_pw_module_pkg = pkg.startswith(pw_module_pn) + if not is_spa_pkg and not is_pw_module_pkg: + continue + + if pkg in spa_metapkg_rdepends or pkg in pw_module_metapkg_rdepends: + continue + + # See if the package is empty by looking at the contents of its + # PKGDEST subdirectory. If this subdirectory is empty, then then + # package is empty as well. Empty packages do not get added to + # the meta package's RDEPENDS. + pkgdir = os.path.join(pkgdest, pkg) + if os.path.exists(pkgdir): + dir_contents = os.listdir(pkgdir) or [] + else: + dir_contents = [] + is_empty = len(dir_contents) == 0 + if not is_empty: + if is_spa_pkg: + spa_metapkg_rdepends.append(pkg) + if is_pw_module_pkg: + pw_module_metapkg_rdepends.append(pkg) + + d.setVar('RDEPENDS:' + spa_metapkg, ' '.join(spa_metapkg_rdepends)) + d.setVar('DESCRIPTION:' + spa_metapkg, spa_pn + ' meta package') + + d.setVar('RDEPENDS:' + pw_module_metapkg, ' '.join(pw_module_metapkg_rdepends)) + d.setVar('DESCRIPTION:' + pw_module_metapkg, pw_module_pn + ' meta package') +} + +PACKAGES =+ "\ + libpipewire \ + ${PN}-tools \ + ${PN}-pulse \ + ${PN}-alsa \ + ${PN}-jack \ + ${PN}-spa-plugins \ + ${PN}-spa-plugins-meta \ + ${PN}-spa-tools \ + ${PN}-modules \ + ${PN}-modules-meta \ + ${PN}-alsa-card-profile \ + ${PN}-v4l2 \ + ${PN}-aes67 \ + gstreamer1.0-pipewire \ +" + +PACKAGES_DYNAMIC = "^${PN}-spa-plugins.* ^${PN}-modules.*" +PACKAGES_DYNAMIC:class-native = "" + +SYSTEMD_SERVICE:${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'systemd-system-service', 'pipewire.service', '', d)}" +CONFFILES:${PN} += "${datadir}/pipewire/pipewire.conf" +FILES:${PN} = " \ + ${datadir}/pipewire \ + ${systemd_system_unitdir}/pipewire* \ + ${systemd_user_unitdir} \ + ${bindir}/pipewire \ + ${bindir}/pipewire-avb \ + ${bindir}/pipewire-vulkan \ +" + +RRECOMMENDS:${PN}:class-target += " \ + pipewire-modules-meta \ + pipewire-spa-plugins-meta \ +" + +FILES:${PN}-dev += " \ + ${libdir}/${PW_MODULE_SUBDIR}/jack/libjack*.so \ +" + +CONFFILES:libpipewire += "${datadir}/pipewire/client.conf" +FILES:libpipewire = " \ + ${datadir}/pipewire/client.conf \ + ${libdir}/libpipewire-*.so.* \ +" +# Add the bare minimum modules and plugins required to be able +# to use libpipewire. Without these, it is essentially unusable. +RDEPENDS:libpipewire += " \ + ${PN}-modules-client-node \ + ${PN}-modules-protocol-native \ + ${PN}-spa-plugins-support \ +" + +FILES:${PN}-tools = " \ + ${bindir}/pw-cat \ + ${bindir}/pw-cli \ + ${bindir}/pw-config \ + ${bindir}/pw-container \ + ${bindir}/pw-dot \ + ${bindir}/pw-dsdplay \ + ${bindir}/pw-dump \ + ${bindir}/pw-encplay \ + ${bindir}/pw-link \ + ${bindir}/pw-loopback \ + ${bindir}/pw-metadata \ + ${bindir}/pw-mididump \ + ${bindir}/pw-midiplay \ + ${bindir}/pw-midirecord \ + ${bindir}/pw-mon \ + ${bindir}/pw-play \ + ${bindir}/pw-profiler \ + ${bindir}/pw-record \ + ${bindir}/pw-reserve \ + ${bindir}/pw-top \ +" + +# This is a shim daemon that is intended to be used as a +# drop-in PulseAudio replacement, providing a pulseaudio-compatible +# socket that can be used by applications that use libpulse. +CONFFILES:${PN}-pulse += "${datadir}/pipewire/pipewire-pulse.conf" +FILES:${PN}-pulse = " \ + ${datadir}/pipewire/pipewire-pulse.conf \ + ${systemd_system_unitdir}/pipewire-pulse.* \ + ${systemd_user_unitdir}/pipewire-pulse.* \ + ${bindir}/pipewire-pulse \ +" +RDEPENDS:${PN}-pulse += " \ + ${PN}-modules-protocol-pulse \ +" + +# ALSA plugin to redirect audio to pipewire. +FILES:${PN}-alsa = "\ + ${libdir}/alsa-lib/* \ + ${datadir}/alsa/alsa.conf.d/* \ +" + +# JACK drop-in libraries to redirect audio to pipewire. +CONFFILES:${PN}-jack = "${datadir}/pipewire/jack.conf" +FILES:${PN}-jack = "\ + ${bindir}/pw-jack \ + ${datadir}/pipewire/jack.conf \ + ${libdir}/${PW_MODULE_SUBDIR}/jack/libjack*.so.* \ +" + +# Dynamic SPA plugin packages (see set_dynamic_metapkg_rdepends). +FILES:${PN}-spa-plugins = "" +RRECOMMENDS:${PN}-spa-plugins += "${PN}-spa-plugins-meta" + +FILES:${PN}-spa-plugins-bluez5 += " \ + ${datadir}/${SPA_SUBDIR}/bluez5/* \ +" + +FILES:${PN}-spa-tools = " \ + ${bindir}/spa-* \ +" + +# Dynamic PipeWire module packages (see set_dynamic_metapkg_rdepends). +FILES:${PN}-modules = "" +RRECOMMENDS:${PN}-modules += "${PN}-modules-meta" + +CONFFILES:${PN}-modules-rt = "${datadir}/pipewire/client-rt.conf" +FILES:${PN}-modules-rt += " \ + ${datadir}/pipewire/client-rt.conf \ + ${sysconfdir}/security/limits.d/* \ + " + +CONFFILES:${PN}-modules-filter-chain = "${datadir}/pipewire/filter-chain/*" +FILES:${PN}-modules-filter-chain += " \ + ${datadir}/pipewire/filter-chain/* \ +" + +FILES:${PN}-alsa-card-profile = " \ + ${datadir}/alsa-card-profile/* \ + ${nonarch_base_libdir}/udev/rules.d/90-pipewire-alsa.rules \ +" + +# V4L2 interface emulator for sending/receiving data between PipeWire and V4L2 applications. +FILES:${PN}-v4l2 += " \ + ${bindir}/pw-v4l2 \ + ${libdir}/${PW_MODULE_SUBDIR}/v4l2/libpw-v4l2.so \ +" + +# AES67 is a standard for audio over IP, from the Audio Engineering Society (AES). +FILES:${PN}-aes67 += " \ + ${bindir}/pipewire-aes67 \ +" + +FILES:gstreamer1.0-pipewire = " \ + ${libdir}/gstreamer-1.0/* \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/sample-content/bigbuckbunny-1080p.bb b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/sample-content/bigbuckbunny-1080p.bb index cb919d79..5eba4da2 100644 --- a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/sample-content/bigbuckbunny-1080p.bb +++ b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/sample-content/bigbuckbunny-1080p.bb @@ -9,9 +9,12 @@ SRC_URI[sha256sum] = "69fe2cfe7154a6e752688e3a0d7d6b07b1605bbaf75b56f6470dc7b4c2 inherit allarch +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" + do_install() { install -d ${D}${datadir}/movies - install -m 0644 ${WORKDIR}/big_buck_bunny_1080p_surround.avi ${D}${datadir}/movies/ + install -m 0644 ${UNPACKDIR}/big_buck_bunny_1080p_surround.avi ${D}${datadir}/movies/ } FILES:${PN} += "${datadir}/movies" diff --git a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/sample-content/bigbuckbunny-480p.bb b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/sample-content/bigbuckbunny-480p.bb index 40dc2aac..29e60cb0 100644 --- a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/sample-content/bigbuckbunny-480p.bb +++ b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/sample-content/bigbuckbunny-480p.bb @@ -9,9 +9,12 @@ SRC_URI[sha256sum] = "40d1cf5bc8e1b0e55dac7bb2e3fbc2aea05b6679444864781299b24db0 inherit allarch +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" + do_install() { install -d ${D}${datadir}/movies - install -m 0644 ${WORKDIR}/big_buck_bunny_480p_surround-fix.avi ${D}${datadir}/movies/ + install -m 0644 ${UNPACKDIR}/big_buck_bunny_480p_surround-fix.avi ${D}${datadir}/movies/ } FILES:${PN} += "${datadir}/movies" diff --git a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/sample-content/bigbuckbunny-720p.bb b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/sample-content/bigbuckbunny-720p.bb index ed1d027b..50ea2e3c 100644 --- a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/sample-content/bigbuckbunny-720p.bb +++ b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/sample-content/bigbuckbunny-720p.bb @@ -9,9 +9,12 @@ SRC_URI[sha256sum] = "b957d6e6212638441b52d3b620af157cc8d40c2a0342669294854a06ed inherit allarch +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" + do_install() { install -d ${D}${datadir}/movies - install -m 0644 ${WORKDIR}/big_buck_bunny_720p_surround.avi ${D}${datadir}/movies/ + install -m 0644 ${UNPACKDIR}/big_buck_bunny_720p_surround.avi ${D}${datadir}/movies/ } FILES:${PN} += "${datadir}/movies" diff --git a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/sample-content/tearsofsteel-1080p.bb b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/sample-content/tearsofsteel-1080p.bb index 78f15f14..ed3ff75a 100644 --- a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/sample-content/tearsofsteel-1080p.bb +++ b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/sample-content/tearsofsteel-1080p.bb @@ -8,9 +8,12 @@ SRC_URI[sha256sum] = "bd2b5bc6c16d4085034f47ef7e4b3938afe86b4eec4ac3cf2685367d3b inherit allarch +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" + do_install() { install -d ${D}${datadir}/movies - install -m 0644 ${WORKDIR}/ToS-4k-1920.mov ${D}${datadir}/movies/ + install -m 0644 ${UNPACKDIR}/ToS-4k-1920.mov ${D}${datadir}/movies/ } FILES:${PN} += "${datadir}/movies" diff --git a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/sox/sox/0001-tests-Include-math.h-for-fabs-definition.patch b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/sox/sox/0001-tests-Include-math.h-for-fabs-definition.patch new file mode 100644 index 00000000..5f9135a0 --- /dev/null +++ b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/sox/sox/0001-tests-Include-math.h-for-fabs-definition.patch @@ -0,0 +1,33 @@ +From afe336ab63ff9b64ef759255de6b03b897dc4453 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sun, 19 May 2024 09:09:46 -0700 +Subject: [PATCH] tests: Include math.h for fabs() definition + +Fixes build with gcc-14 + +../../sox-14.4.2/src/sox_sample_test.h:190:3: error: implicit declaration of function 'fabs' [-Wimplicit-function-declaration] + 190 | assert(fabs(d - 1) < 1e-9 && clips == 0); + | ^~~~~~ + ../../sox-14.4.2/src/sox_sample_test.h:23:1: note: include '' or provide a declaration of 'fabs' + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- + src/sox_sample_test.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/sox_sample_test.h b/src/sox_sample_test.h +index 62b55e4..17f0069 100644 +--- a/src/sox_sample_test.h ++++ b/src/sox_sample_test.h +@@ -19,6 +19,7 @@ + #undef NDEBUG /* Must undef above assert.h or other that might include it. */ + #endif + #include ++#include + #include "sox.h" + + #define TEST_UINT(bits) \ +-- +2.45.1 + diff --git a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/sox/sox_14.4.2.bb b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/sox/sox_14.4.2.bb index 011cbc2a..800fcad2 100644 --- a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/sox/sox_14.4.2.bb +++ b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/sox/sox_14.4.2.bb @@ -30,6 +30,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.GPL;md5=751419260aa954499f7abaabaa882bbe \ SRC_URI = "${SOURCEFORGE_MIRROR}/sox/sox-${PV}.tar.gz \ file://0001-remove-the-error-line-and-live-without-file-type-det.patch \ file://0001-Update-exported-symbol-list.patch \ + file://0001-tests-Include-math.h-for-fabs-definition.patch \ " SRC_URI[md5sum] = "d04fba2d9245e661f245de0577f48a33" SRC_URI[sha256sum] = "b45f598643ffbd8e363ff24d61166ccec4836fea6d3888881b8df53e3bb55f6c" diff --git a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/tinyalsa/tinyalsa_2.0.0.bb b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/tinyalsa/tinyalsa_2.0.0.bb index e261611a..b513e959 100644 --- a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/tinyalsa/tinyalsa_2.0.0.bb +++ b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/tinyalsa/tinyalsa_2.0.0.bb @@ -4,16 +4,15 @@ HOMEPAGE = "https://github.com/tinyalsa/tinyalsa" SECTION = "libs/multimedia" LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://NOTICE;md5=e04cd6fa58488e016f7fb648ebea1db4" +LIC_FILES_CHKSUM = "file://NOTICE;md5=d2918795d9185efcbf430b9ad5cda46d" -SRCREV = "1c5fb68ced57d838f2b7ecd0c00bc1fefc9ab60d" -SRC_URI = "git://github.com/tinyalsa/tinyalsa;branch=master;protocol=https \ - file://0001-fixed-compilation-error-caused-by-strncpy.patch \ - " +PV .= "+git" +SRCREV = "f78ed25aced2dfea743867b8205a787bfb091340" +SRC_URI = "git://github.com/tinyalsa/tinyalsa;branch=master;protocol=https" S = "${WORKDIR}/git" -inherit cmake +inherit meson # tinyalsa is built as a static library. Enable PIC to avoid relocation # errors like these: diff --git a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc_3.0.20.bb b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc_3.0.20.bb deleted file mode 100644 index 21bc408f..00000000 --- a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc_3.0.20.bb +++ /dev/null @@ -1,135 +0,0 @@ -DESCRIPTION = "Video player and streamer - davinci edition" -HOMEPAGE = "http://www.videolan.org" -SECTION = "multimedia" - -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" - -DEPENDS = "coreutils-native fribidi libtool libgcrypt libgcrypt-native bison-native \ - dbus libxml2 gnutls \ - tremor faad2 ffmpeg flac alsa-lib \ - lua-native lua libidn \ - avahi jpeg xz libmodplug \ - libmtp libopus orc libsamplerate0 libusb1 schroedinger taglib \ - tiff" - -LDFLAGS:append:riscv64 = " -latomic" -LDFLAGS:append:riscv32 = " -latomic" - -SRC_URI = "https://get.videolan.org/${BPN}/${PV}/${BP}.tar.xz \ - file://0001-make-opencv-configurable.patch \ - file://0002-use-vorbisidec.patch \ - file://0003-fix-luaL-checkint.patch \ - file://0004-Use-packageconfig-to-detect-mmal-support.patch \ - file://0005-ioctl-does-not-have-same-signature-between-glibc-and.patch \ - file://0006-configure-Disable-incompatible-function-pointer-type.patch \ - file://taglib-2.patch \ - file://0001-taglib-Fix-build-on-x86-32-bit.patch \ -" -SRC_URI[sha256sum] = "adc7285b4d2721cddf40eb5270cada2aaa10a334cb546fd55a06353447ba29b5" - -inherit autotools-brokensep features_check gettext pkgconfig mime-xdg - -REQUIRED_DISTRO_FEATURES = "x11" - -export BUILDCC = "${BUILD_CC}" -EXTRA_OECONF = "\ - --enable-run-as-root \ - --enable-xvideo \ - --disable-screen --disable-caca \ - --enable-vlm \ - --enable-freetype \ - --enable-tremor \ - --enable-v4l2 --disable-aa --disable-faad \ - --enable-dbus \ - --without-contrib \ - --without-kde-solid \ - --enable-realrtsp \ - --disable-libtar \ - --enable-avcodec \ - ac_cv_path_MOC=${STAGING_BINDIR_NATIVE}${QT_DIR_NAME}/moc \ - ac_cv_path_RCC=${STAGING_BINDIR_NATIVE}${QT_DIR_NAME}/rcc \ - ac_cv_path_UIC=${STAGING_BINDIR_NATIVE}${QT_DIR_NAME}/uic \ -" - -PACKAGECONFIG ?= " \ - live555 dc1394 dv1394 notify fontconfig fluidsynth freetype dvdread png \ - ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \ - x264 \ -" - -inherit ${@bb.utils.contains('PACKAGECONFIG', 'qt5', 'qmake5_paths', '', d)} - -PACKAGECONFIG[mmal] = "--enable-omxil --enable-omxil-vout --enable-rpi-omxil --enable-mmal,,userland" -PACKAGECONFIG[x264] = "--enable-x264,--disable-x264,x264" -PACKAGECONFIG[fluidsynth] = ",,fluidsynth" -PACKAGECONFIG[mad] = "--enable-mad,--disable-mad,libmad" -PACKAGECONFIG[a52] = "--enable-a52,--disable-a52,liba52" -PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack" -PACKAGECONFIG[live555] = "--enable-live555 LIVE555_PREFIX=${STAGING_DIR_HOST}${prefix},--disable-live555,live555" -PACKAGECONFIG[libass] = "--enable-libass,--disable-libass,libass" -PACKAGECONFIG[postproc] = "--enable-postproc,--disable-postproc,libpostproc" -PACKAGECONFIG[libva] = "--enable-libva,--disable-libva,libva" -PACKAGECONFIG[opencv] = "--enable-opencv,--disable-opencv,opencv" -PACKAGECONFIG[speex] = "--enable-speex,--disable-speex,speex" -PACKAGECONFIG[gstreamer] = "--enable-gst-decode,--disable-gst-decode,gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad" -PACKAGECONFIG[vpx] = "--enable-vpx,--disable-vpx, libvpx" -PACKAGECONFIG[qt5] = "--enable-qt,--disable-qt, qtbase-native qtx11extras qtsvg" -PACKAGECONFIG[freerdp] = "--enable-freerdp,--disable-freerdp, freerdp" -PACKAGECONFIG[dvbpsi] = "--enable-dvbpsi,--disable-dvbpsi, libdvbpsi" -PACKAGECONFIG[samba] = "--enable-smbclient,--disable-smbclient, samba" -PACKAGECONFIG[upnp] = "--enable-upnp,--disable-upnp,libupnp" -PACKAGECONFIG[dvdnav] = "--enable-dvdnav,--disable-dvdnav,libdvdnav libdvdcss" -PACKAGECONFIG[sftp] = "--enable-sftp,--disable-sftp,libssh2" -PACKAGECONFIG[vorbis] = "--enable-vorbis,--disable-vorbis,libvorbis libogg" -PACKAGECONFIG[ogg] = "--enable-ogg,--disable-ogg,libvorbis libogg" -PACKAGECONFIG[dc1394] = "--enable-dc1394,--disable-dc1394,libdc1394" -PACKAGECONFIG[dv1394] = "--enable-dv1394,--disable-dv1394,libraw1394 libavc1394" -PACKAGECONFIG[svg] = "--enable-svg,--disable-svg,librsvg" -PACKAGECONFIG[svgdec] = "--enable-svgdec,--disable-svgdec,librsvg cairo" -PACKAGECONFIG[notify] = "--enable-notify,--disable-notify, libnotify gtk+3" -PACKAGECONFIG[fontconfig] = "--enable-fontconfig,--disable-fontconfig, fontconfig" -PACKAGECONFIG[freetype] = "--enable-freetype,--disable-freetype, freetype" -PACKAGECONFIG[dvdread] = "--enable-dvdread,--disable-dvdread, libdvdread libdvdcss" -PACKAGECONFIG[vnc] = "--enable-vnc,--disable-vnc, libvncserver" -PACKAGECONFIG[x11] = "--with-x --enable-xcb,--without-x --disable-xcb, xcb-util-keysyms libxpm libxinerama" -PACKAGECONFIG[png] = "--enable-png,--disable-png,libpng" -PACKAGECONFIG[vdpau] = "--enable-vdpau,--disable-vdpau,libvdpau" -PACKAGECONFIG[wayland] = "--enable-wayland,--disable-wayland,wayland wayland-native" - -do_configure:append() { - # moc needs support: precreate build paths - for qtpath in adapters components/epg components/playlist components/sout dialogs managers styles util/buttons; do - mkdir -p "${B}/modules/gui/qt/$qtpath" - done - sed -i -e 's|${WORKDIR}||g' ${B}/config.h -} - -# This recipe packages vlc as a library as well, so qt4 dependencies -# can be avoided when only the library is installed. -PACKAGES =+ "libvlc" - -LEAD_SONAME_libvlc = "libvlc.so.5" -FILES:libvlc = "${libdir}/lib*.so.*" - -FILES:${PN} += "\ - ${bindir}/vlc \ - ${libdir}/vlc/vlc/libvlc_vdpau.so \ - ${datadir}/applications \ - ${datadir}/vlc/ \ - ${datadir}/icons \ - ${datadir}/metainfo/vlc.appdata.xml \ -" - -FILES:${PN}-dbg += "\ - ${libdir}/vlc/*/.debug \ - ${libdir}/vlc/plugins/*/.debug \ -" - -FILES:${PN}-staticdev += "\ - ${libdir}/vlc/plugins/*/*.a \ -" - -INSANE_SKIP:${PN} = "dev-so" - -EXCLUDE_FROM_WORLD = "${@bb.utils.contains("LICENSE_FLAGS_ACCEPTED", "commercial", "0", "1", d)}" diff --git a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc_3.0.21.bb b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc_3.0.21.bb new file mode 100644 index 00000000..2d2ecc63 --- /dev/null +++ b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc_3.0.21.bb @@ -0,0 +1,136 @@ +DESCRIPTION = "Video player and streamer - davinci edition" +HOMEPAGE = "http://www.videolan.org" +SECTION = "multimedia" + +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +DEPENDS = "coreutils-native fribidi libtool libgcrypt libgcrypt-native bison-native \ + dbus libxml2 gnutls \ + tremor faad2 ffmpeg flac alsa-lib \ + lua-native lua libidn \ + avahi jpeg xz libmodplug \ + libmtp libopus orc libsamplerate0 libusb1 schroedinger taglib \ + tiff" + +LDFLAGS:append:riscv64 = " -latomic" +LDFLAGS:append:riscv32 = " -latomic" + +SRC_URI = "https://get.videolan.org/${BPN}/${PV}/${BP}.tar.xz \ + file://0001-make-opencv-configurable.patch \ + file://0002-use-vorbisidec.patch \ + file://0003-fix-luaL-checkint.patch \ + file://0004-Use-packageconfig-to-detect-mmal-support.patch \ + file://0005-ioctl-does-not-have-same-signature-between-glibc-and.patch \ + file://0006-configure-Disable-incompatible-function-pointer-type.patch \ + file://taglib-2.patch \ + file://0001-taglib-Fix-build-on-x86-32-bit.patch \ +" +SRC_URI[sha256sum] = "24dbbe1d7dfaeea0994d5def0bbde200177347136dbfe573f5b6a4cee25afbb0" +inherit autotools-brokensep features_check gettext pkgconfig mime-xdg + +REQUIRED_DISTRO_FEATURES = "x11" + +export BUILDCC = "${BUILD_CC}" +EXTRA_OECONF = "\ + --enable-run-as-root \ + --enable-xvideo \ + --disable-screen --disable-caca \ + --enable-vlm \ + --enable-freetype \ + --enable-tremor \ + --enable-v4l2 --disable-aa --disable-faad \ + --enable-dbus \ + --without-contrib \ + --without-kde-solid \ + --enable-realrtsp \ + --disable-libtar \ + --enable-avcodec \ + ac_cv_path_MOC=${STAGING_BINDIR_NATIVE}${QT_DIR_NAME}/moc \ + ac_cv_path_RCC=${STAGING_BINDIR_NATIVE}${QT_DIR_NAME}/rcc \ + ac_cv_path_UIC=${STAGING_BINDIR_NATIVE}${QT_DIR_NAME}/uic \ +" + +PACKAGECONFIG ?= " \ + live555 dc1394 dv1394 notify fontconfig fluidsynth freetype dvdread png \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \ + x264 \ +" + +inherit ${@bb.utils.contains('PACKAGECONFIG', 'qt5', 'qmake5_paths', '', d)} + +PACKAGECONFIG[mmal] = "--enable-omxil --enable-omxil-vout --enable-rpi-omxil --enable-mmal,,userland" +PACKAGECONFIG[x264] = "--enable-x264,--disable-x264,x264" +PACKAGECONFIG[fluidsynth] = ",,fluidsynth" +PACKAGECONFIG[mad] = "--enable-mad,--disable-mad,libmad" +PACKAGECONFIG[a52] = "--enable-a52,--disable-a52,liba52" +PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack" +PACKAGECONFIG[live555] = "--enable-live555 LIVE555_PREFIX=${STAGING_DIR_HOST}${prefix},--disable-live555,live555" +PACKAGECONFIG[libass] = "--enable-libass,--disable-libass,libass" +PACKAGECONFIG[postproc] = "--enable-postproc,--disable-postproc,libpostproc" +PACKAGECONFIG[libva] = "--enable-libva,--disable-libva,libva" +PACKAGECONFIG[opencv] = "--enable-opencv,--disable-opencv,opencv" +PACKAGECONFIG[speex] = "--enable-speex,--disable-speex,speex" +PACKAGECONFIG[gstreamer] = "--enable-gst-decode,--disable-gst-decode,gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad" +PACKAGECONFIG[vpx] = "--enable-vpx,--disable-vpx, libvpx" +PACKAGECONFIG[qt5] = "--enable-qt,--disable-qt, qtbase-native qtx11extras qtsvg" +PACKAGECONFIG[freerdp] = "--enable-freerdp,--disable-freerdp, freerdp" +PACKAGECONFIG[dvbpsi] = "--enable-dvbpsi,--disable-dvbpsi, libdvbpsi" +PACKAGECONFIG[samba] = "--enable-smbclient,--disable-smbclient, samba" +PACKAGECONFIG[upnp] = "--enable-upnp,--disable-upnp,libupnp" +PACKAGECONFIG[dvdnav] = "--enable-dvdnav,--disable-dvdnav,libdvdnav libdvdcss" +PACKAGECONFIG[sftp] = "--enable-sftp,--disable-sftp,libssh2" +PACKAGECONFIG[vorbis] = "--enable-vorbis,--disable-vorbis,libvorbis libogg" +PACKAGECONFIG[ogg] = "--enable-ogg,--disable-ogg,libvorbis libogg" +PACKAGECONFIG[dc1394] = "--enable-dc1394,--disable-dc1394,libdc1394" +PACKAGECONFIG[dv1394] = "--enable-dv1394,--disable-dv1394,libraw1394 libavc1394" +PACKAGECONFIG[svg] = "--enable-svg,--disable-svg,librsvg" +PACKAGECONFIG[svgdec] = "--enable-svgdec,--disable-svgdec,librsvg cairo" +PACKAGECONFIG[notify] = "--enable-notify,--disable-notify, libnotify gtk+3" +PACKAGECONFIG[fontconfig] = "--enable-fontconfig,--disable-fontconfig, fontconfig" +PACKAGECONFIG[freetype] = "--enable-freetype,--disable-freetype, freetype" +PACKAGECONFIG[dvdread] = "--enable-dvdread,--disable-dvdread, libdvdread libdvdcss" +PACKAGECONFIG[vnc] = "--enable-vnc,--disable-vnc, libvncserver" +PACKAGECONFIG[x11] = "--with-x --enable-xcb,--without-x --disable-xcb, xcb-util-keysyms libxpm libxinerama" +PACKAGECONFIG[png] = "--enable-png,--disable-png,libpng" +PACKAGECONFIG[vdpau] = "--enable-vdpau,--disable-vdpau,libvdpau" +PACKAGECONFIG[wayland] = "--enable-wayland,--disable-wayland,wayland wayland-native" + +do_configure:append() { + # moc needs support: precreate build paths + for qtpath in adapters components/epg components/playlist components/sout dialogs managers styles util/buttons; do + mkdir -p "${B}/modules/gui/qt/$qtpath" + done + sed -i -e 's|${WORKDIR}||g' ${B}/config.h +} + +# This recipe packages vlc as a library as well, so qt4 dependencies +# can be avoided when only the library is installed. +PACKAGES =+ "libvlc" + +LEAD_SONAME_libvlc = "libvlc.so.5" +FILES:libvlc = "${libdir}/lib*.so.*" + +FILES:${PN} += "\ + ${bindir}/vlc \ + ${libdir}/vlc/vlc/libvlc_vdpau.so \ + ${datadir}/applications \ + ${datadir}/vlc/ \ + ${datadir}/icons \ + ${datadir}/metainfo/vlc.appdata.xml \ +" + +FILES:${PN}-dbg += "\ + ${libdir}/vlc/*/.debug \ + ${libdir}/vlc/plugins/*/.debug \ +" + +FILES:${PN}-staticdev += "\ + ${libdir}/vlc/plugins/*/*.a \ +" + +INSANE_SKIP:${PN} = "dev-so" + +EXCLUDE_FROM_WORLD = "${@bb.utils.contains("LICENSE_FLAGS_ACCEPTED", "commercial", "0", "1", d)}" + +SKIP_RECIPE[vlc] = "requires porting to ffmpeg >= 7 as of ffmpeg >= 5 it requires extensive changes disabling VAAPI (only supported with vlc >= 4)" diff --git a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/vorbis-tools/vorbis-tools/CVE-2023-43361.patch b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/vorbis-tools/vorbis-tools/CVE-2023-43361.patch new file mode 100644 index 00000000..7f5b6341 --- /dev/null +++ b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/vorbis-tools/vorbis-tools/CVE-2023-43361.patch @@ -0,0 +1,38 @@ +From 6ca16244ba70cd1c0c8d062d1416bdc79bf20898 Mon Sep 17 00:00:00 2001 +From: Peter Marko +Date: Fri, 17 Jan 2025 18:49:12 +0100 +Subject: [PATCH] oggenc: Don't assume the output path ends in a file name. + +oggenc attempts to create any specified directories in the output +file path if they don't exist. The parser was assuming there was +a final filename after the last directory separator, and so would +try to read off the end of the argument if it was a bare directory +such as `./` or `outdir/`. This adds a check to make sure the +scan isn't starting off the end of the path string. + +Thanks to Frank-Z7 (Zeng Yunxiang) at Huazhong University of Science +and Technology (cse.hust.edu.cn) for the report. + +CVE: CVE-2023-43361 +Upstream-Status: Submitted [https://gitlab.xiph.org/xiph/vorbis-tools/-/merge_requests/7] +Signed-off-by: Peter Marko +--- + oggenc/platform.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/oggenc/platform.c b/oggenc/platform.c +index 6d9f4ef..1ff02ca 100644 +--- a/oggenc/platform.c ++++ b/oggenc/platform.c +@@ -147,7 +147,7 @@ int create_directories(char *fn, int isutf8) + start = start+2; + #endif + +- while((end = strpbrk(start+1, PATH_SEPS)) != NULL) ++ while((end = strpbrk(start + strspn(start, PATH_SEPS), PATH_SEPS)) != NULL) + { + int rv; + memcpy(segment, fn, end-fn); +-- +2.30.2 + diff --git a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/vorbis-tools/vorbis-tools_1.4.2.bb b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/vorbis-tools/vorbis-tools_1.4.2.bb index 61a4aedb..2cbd8401 100644 --- a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/vorbis-tools/vorbis-tools_1.4.2.bb +++ b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/vorbis-tools/vorbis-tools_1.4.2.bb @@ -13,6 +13,7 @@ DEPENDS = "libogg libvorbis" SRC_URI = "http://downloads.xiph.org/releases/vorbis/${BP}.tar.gz \ file://gettext.patch \ file://0001-ogginfo-Include-utf8.h-for-missing-utf8_decode.patch \ + file://CVE-2023-43361.patch \ " SRC_URI[md5sum] = "998fca293bd4e4bdc2b96fb70f952f4e" diff --git a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/wireplumber/wireplumber_0.5.1.bb b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/wireplumber/wireplumber_0.5.1.bb deleted file mode 100644 index 9115076a..00000000 --- a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/wireplumber/wireplumber_0.5.1.bb +++ /dev/null @@ -1,145 +0,0 @@ -SUMMARY = "Session / policy manager implementation for PipeWire" -HOMEPAGE = "https://gitlab.freedesktop.org/pipewire/wireplumber" -BUGTRACKER = "https://gitlab.freedesktop.org/pipewire/wireplumber/issues" -SECTION = "multimedia" - -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=17d1fe479cdec331eecbc65d26bc7e77" - -DEPENDS = "glib-2.0 glib-2.0-native lua pipewire \ - ${@bb.utils.contains("DISTRO_FEATURES", "gobject-introspection-data", "python3-native python3-lxml-native doxygen-native", "", d)} \ -" - -SRCREV = "961450b2ac700e8c9c85a0beb2426b875fa08bff" -SRC_URI = " \ - git://gitlab.freedesktop.org/pipewire/wireplumber.git;branch=master;protocol=https \ - file://90-OE-disable-session-dbus-dependent-features.lua \ -" - -S = "${WORKDIR}/git" - -inherit meson pkgconfig gobject-introspection systemd - -GIR_MESON_ENABLE_FLAG = 'enabled' -GIR_MESON_DISABLE_FLAG = 'disabled' - -# Enable system-lua to let wireplumber use OE's lua. -# Documentation needs python-sphinx, which is not in oe-core or meta-python2 for now. -# elogind is not (yet) available in OE, so disable support. -EXTRA_OEMESON += " \ - -Ddoc=disabled \ - -Dsystem-lua=true \ - -Delogind=disabled \ - -Dsystemd-system-unit-dir=${systemd_system_unitdir} \ - -Dsystemd-user-unit-dir=${systemd_user_unitdir} \ - -Dtests=false \ -" - -PACKAGECONFIG ??= " dbus \ - ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd systemd-system-service systemd-user-service', '', d)} \ -" - -PACKAGECONFIG[systemd] = "-Dsystemd=enabled,-Dsystemd=disabled,systemd" -PACKAGECONFIG[systemd-system-service] = "-Dsystemd-system-service=true,-Dsystemd-system-service=false,systemd" -# "systemd-user-service" packageconfig will only install service -# files to rootfs but not enable them as systemd.bbclass -# currently lacks the feature of enabling user services. -PACKAGECONFIG[systemd-user-service] = "-Dsystemd-user-service=true,-Dsystemd-user-service=false,systemd" -PACKAGECONFIG[dbus] = "" - -PACKAGESPLITFUNCS:prepend = " split_dynamic_packages " -PACKAGESPLITFUNCS:append = " set_dynamic_metapkg_rdepends " - -WP_MODULE_SUBDIR = "wireplumber-0.5" - -do_install:append() { - if ${@bb.utils.contains('PACKAGECONFIG', 'dbus', 'false', 'true', d)}; then - install -m 0644 ${WORKDIR}/90-OE-disable-session-dbus-dependent-features.lua ${D}${datadir}/wireplumber/main.lua.d - fi -} - -python split_dynamic_packages () { - # Create packages for each WirePlumber module. - wp_module_libdir = d.expand('${libdir}/${WP_MODULE_SUBDIR}') - do_split_packages(d, wp_module_libdir, r'^libwireplumber-module-(.*)\.so$', d.expand('${PN}-modules-%s'), 'WirePlumber %s module', extra_depends='', recursive=False) -} - -python set_dynamic_metapkg_rdepends () { - import os - import oe.utils - - # Go through all generated WirePlumber module packages - # (excluding the main package and the -meta package itself) - # and add them to the -meta package as RDEPENDS. - - base_pn = d.getVar('PN') - - wp_module_pn = base_pn + '-modules' - wp_module_metapkg = wp_module_pn + '-meta' - - d.setVar('ALLOW_EMPTY:' + wp_module_metapkg, "1") - d.setVar('FILES:' + wp_module_metapkg, "") - - blacklist = [ wp_module_pn, wp_module_metapkg ] - wp_module_metapkg_rdepends = [] - pkgdest = d.getVar('PKGDEST') - - for pkg in oe.utils.packages_filter_out_system(d): - if pkg in blacklist: - continue - - is_wp_module_pkg = pkg.startswith(wp_module_pn) - if not is_wp_module_pkg: - continue - - if pkg in wp_module_metapkg_rdepends: - continue - - # See if the package is empty by looking at the contents of its - # PKGDEST subdirectory. If this subdirectory is empty, then then - # package is empty as well. Empty packages do not get added to - # the meta package's RDEPENDS. - pkgdir = os.path.join(pkgdest, pkg) - if os.path.exists(pkgdir): - dir_contents = os.listdir(pkgdir) or [] - else: - dir_contents = [] - is_empty = len(dir_contents) == 0 - if not is_empty: - if is_wp_module_pkg: - wp_module_metapkg_rdepends.append(pkg) - - d.setVar('RDEPENDS:' + wp_module_metapkg, ' '.join(wp_module_metapkg_rdepends)) - d.setVar('DESCRIPTION:' + wp_module_metapkg, wp_module_pn + ' meta package') -} - -PACKAGES =+ "\ - libwireplumber \ - ${PN}-default-config \ - ${PN}-scripts \ - ${PN}-modules \ - ${PN}-modules-meta \ -" - -PACKAGES_DYNAMIC = "^${PN}-modules.*" - -CONFFILES:${PN} += " \ - ${datadir}/wireplumber/wireplumber.conf \ - ${datadir}/wireplumber/*.lua.d/* \ -" -# Add pipewire to RRECOMMENDS, since WirePlumber expects a PipeWire daemon to -# be present. While in theory any application that uses libpipewire can configure -# itself to become a daemon, in practice, the PipeWire daemon is used. -RRECOMMENDS:${PN} += "pipewire ${PN}-scripts ${PN}-modules-meta" - -FILES:${PN} += "${systemd_user_unitdir} ${systemd_system_unitdir} ${datadir}/zsh" - -FILES:libwireplumber = " \ - ${libdir}/libwireplumber-*.so.* \ -" - -FILES:${PN}-scripts += "${datadir}/wireplumber/scripts/*" - -# Dynamic packages (see set_dynamic_metapkg_rdepends). -FILES:${PN}-modules = "" -RRECOMMENDS:${PN}-modules += "${PN}-modules-meta" diff --git a/sources/meta-openembedded/meta-multimedia/recipes-multimedia/wireplumber/wireplumber_0.5.6.bb b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/wireplumber/wireplumber_0.5.6.bb new file mode 100644 index 00000000..7c308bd4 --- /dev/null +++ b/sources/meta-openembedded/meta-multimedia/recipes-multimedia/wireplumber/wireplumber_0.5.6.bb @@ -0,0 +1,145 @@ +SUMMARY = "Session / policy manager implementation for PipeWire" +HOMEPAGE = "https://gitlab.freedesktop.org/pipewire/wireplumber" +BUGTRACKER = "https://gitlab.freedesktop.org/pipewire/wireplumber/issues" +SECTION = "multimedia" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=17d1fe479cdec331eecbc65d26bc7e77" + +DEPENDS = "glib-2.0 glib-2.0-native lua pipewire \ + ${@bb.utils.contains("DISTRO_FEATURES", "gobject-introspection-data", "python3-native python3-lxml-native doxygen-native", "", d)} \ +" + +SRCREV = "141b2d5d3f793e20f94421c554d8d9c51143ce0d" +SRC_URI = " \ + git://gitlab.freedesktop.org/pipewire/wireplumber.git;branch=master;protocol=https \ + file://90-OE-disable-session-dbus-dependent-features.lua \ +" + +S = "${WORKDIR}/git" + +inherit meson pkgconfig gobject-introspection systemd + +GIR_MESON_ENABLE_FLAG = 'enabled' +GIR_MESON_DISABLE_FLAG = 'disabled' + +# Enable system-lua to let wireplumber use OE's lua. +# Documentation needs python-sphinx, which is not in oe-core or meta-python2 for now. +# elogind is not (yet) available in OE, so disable support. +EXTRA_OEMESON += " \ + -Ddoc=disabled \ + -Dsystem-lua=true \ + -Delogind=disabled \ + -Dsystemd-system-unit-dir=${systemd_system_unitdir} \ + -Dsystemd-user-unit-dir=${systemd_user_unitdir} \ + -Dtests=false \ +" + +PACKAGECONFIG ??= " dbus \ + ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd systemd-system-service systemd-user-service', '', d)} \ +" + +PACKAGECONFIG[systemd] = "-Dsystemd=enabled,-Dsystemd=disabled,systemd" +PACKAGECONFIG[systemd-system-service] = "-Dsystemd-system-service=true,-Dsystemd-system-service=false,systemd" +# "systemd-user-service" packageconfig will only install service +# files to rootfs but not enable them as systemd.bbclass +# currently lacks the feature of enabling user services. +PACKAGECONFIG[systemd-user-service] = "-Dsystemd-user-service=true,-Dsystemd-user-service=false,systemd" +PACKAGECONFIG[dbus] = "" + +PACKAGESPLITFUNCS:prepend = " split_dynamic_packages " +PACKAGESPLITFUNCS:append = " set_dynamic_metapkg_rdepends " + +WP_MODULE_SUBDIR = "wireplumber-0.5" + +do_install:append() { + if ${@bb.utils.contains('PACKAGECONFIG', 'dbus', 'false', 'true', d)}; then + install -m 0644 ${UNPACKDIR}/90-OE-disable-session-dbus-dependent-features.lua ${D}${datadir}/wireplumber/main.lua.d + fi +} + +python split_dynamic_packages () { + # Create packages for each WirePlumber module. + wp_module_libdir = d.expand('${libdir}/${WP_MODULE_SUBDIR}') + do_split_packages(d, wp_module_libdir, r'^libwireplumber-module-(.*)\.so$', d.expand('${PN}-modules-%s'), 'WirePlumber %s module', extra_depends='', recursive=False) +} + +python set_dynamic_metapkg_rdepends () { + import os + import oe.utils + + # Go through all generated WirePlumber module packages + # (excluding the main package and the -meta package itself) + # and add them to the -meta package as RDEPENDS. + + base_pn = d.getVar('PN') + + wp_module_pn = base_pn + '-modules' + wp_module_metapkg = wp_module_pn + '-meta' + + d.setVar('ALLOW_EMPTY:' + wp_module_metapkg, "1") + d.setVar('FILES:' + wp_module_metapkg, "") + + blacklist = [ wp_module_pn, wp_module_metapkg ] + wp_module_metapkg_rdepends = [] + pkgdest = d.getVar('PKGDEST') + + for pkg in oe.utils.packages_filter_out_system(d): + if pkg in blacklist: + continue + + is_wp_module_pkg = pkg.startswith(wp_module_pn) + if not is_wp_module_pkg: + continue + + if pkg in wp_module_metapkg_rdepends: + continue + + # See if the package is empty by looking at the contents of its + # PKGDEST subdirectory. If this subdirectory is empty, then then + # package is empty as well. Empty packages do not get added to + # the meta package's RDEPENDS. + pkgdir = os.path.join(pkgdest, pkg) + if os.path.exists(pkgdir): + dir_contents = os.listdir(pkgdir) or [] + else: + dir_contents = [] + is_empty = len(dir_contents) == 0 + if not is_empty: + if is_wp_module_pkg: + wp_module_metapkg_rdepends.append(pkg) + + d.setVar('RDEPENDS:' + wp_module_metapkg, ' '.join(wp_module_metapkg_rdepends)) + d.setVar('DESCRIPTION:' + wp_module_metapkg, wp_module_pn + ' meta package') +} + +PACKAGES =+ "\ + libwireplumber \ + ${PN}-default-config \ + ${PN}-scripts \ + ${PN}-modules \ + ${PN}-modules-meta \ +" + +PACKAGES_DYNAMIC = "^${PN}-modules.*" + +CONFFILES:${PN} += " \ + ${datadir}/wireplumber/wireplumber.conf \ + ${datadir}/wireplumber/*.lua.d/* \ +" +# Add pipewire to RRECOMMENDS, since WirePlumber expects a PipeWire daemon to +# be present. While in theory any application that uses libpipewire can configure +# itself to become a daemon, in practice, the PipeWire daemon is used. +RRECOMMENDS:${PN} += "pipewire ${PN}-scripts ${PN}-modules-meta" + +FILES:${PN} += "${systemd_user_unitdir} ${systemd_system_unitdir} ${datadir}/zsh" + +FILES:libwireplumber = " \ + ${libdir}/libwireplumber-*.so.* \ +" + +FILES:${PN}-scripts += "${datadir}/wireplumber/scripts/*" + +# Dynamic packages (see set_dynamic_metapkg_rdepends). +FILES:${PN}-modules = "" +RRECOMMENDS:${PN}-modules += "${PN}-modules-meta" diff --git a/sources/meta-openembedded/meta-multimedia/recipes-support/xdg-desktop-portal-wlr/xdg-desktop-portal-wlr_0.7.0.bb b/sources/meta-openembedded/meta-multimedia/recipes-support/xdg-desktop-portal-wlr/xdg-desktop-portal-wlr_0.7.0.bb index 8ffe652b..0b90bc0d 100644 --- a/sources/meta-openembedded/meta-multimedia/recipes-support/xdg-desktop-portal-wlr/xdg-desktop-portal-wlr_0.7.0.bb +++ b/sources/meta-openembedded/meta-multimedia/recipes-support/xdg-desktop-portal-wlr/xdg-desktop-portal-wlr_0.7.0.bb @@ -20,7 +20,8 @@ SRC_URI = "git://github.com/emersion/xdg-desktop-portal-wlr.git;protocol=https;b file://0001-screencast-Fix-build-with-older-mesa.patch" S = "${WORKDIR}/git" -SRCREV = "776113a4f014639c29d8de8fcb513493ef7b491f" +PV .= "+git" +SRCREV = "d9ada849aeca6137915de2df69beaef4e272cc1d" PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', 'basu', d)}" diff --git a/sources/meta-openembedded/meta-networking/MAINTAINERS b/sources/meta-openembedded/meta-networking/MAINTAINERS index a424ab9c..4f7ef4e3 100644 --- a/sources/meta-openembedded/meta-networking/MAINTAINERS +++ b/sources/meta-openembedded/meta-networking/MAINTAINERS @@ -2,13 +2,13 @@ This file contains a list of maintainers for the meta-networking layer. Please submit any patches against meta-networking to the OpenEmbedded development mailing list (openembedded-devel@lists.openembedded.org) with -'[meta-networking][scarthgap]' in the subject. +'[meta-networking][styhead]' in the subject. When sending single patches, please use something like: git send-email -1 -M \ --to openembedded-devel@lists.openembedded.org \ - --subject-prefix='meta-networking][scarthgap][PATCH' + --subject-prefix='meta-networking][styhead][PATCH' You may also contact the maintainers directly. diff --git a/sources/meta-openembedded/meta-networking/conf/include/non-repro-meta-networking.inc b/sources/meta-openembedded/meta-networking/conf/include/non-repro-meta-networking.inc index 45eed539..c5313416 100755 --- a/sources/meta-openembedded/meta-networking/conf/include/non-repro-meta-networking.inc +++ b/sources/meta-openembedded/meta-networking/conf/include/non-repro-meta-networking.inc @@ -1,34 +1,19 @@ # List of known non-reproducible package of the meta-networking layer # Please keep this list sorted KNOWN_NON_REPRO_META_NETWORKING = " \ - blueman \ - blueman-dbg \ - blueman-src \ - civetweb-dev \ + babeld \ + babeld-dbg \ dhcp-relay-staticdev \ ettercap-src \ - fetchmail \ - fetchmail-dbg \ freediameter \ - freediameter-src \ freeradius \ htpdate-doc \ - keepalived \ - keepalived-dbg \ libbearssl-staticdev \ - libfko3 \ - libfko-client \ - libfko-daemon \ - libfko-dbg \ libmosquitto1 \ libowfat-staticdev \ libruli-staticdev \ - libsamba-util0 \ mosquitto \ - mosquitto-dbg \ ncftp \ - ncftp-dbg \ - ncftp-src \ ndisc6-dbg \ ndisc6-misc \ ndisc6-ndisc6 \ @@ -38,20 +23,9 @@ KNOWN_NON_REPRO_META_NETWORKING = " \ netsniff-ng-doc \ ntpsec-src \ openl2tp \ - openl2tp-dbg \ - ot-br-posix \ - ot-br-posix-dbg \ postfix-cfg \ - proftpd \ - proftpd-dbg \ - proftpd-dev \ - rdist \ - rdist-dbg \ - samba-dbg \ - tayga \ - tayga-dbg \ - wolfssl \ - wolfssl-dbg \ + rp-pppoe \ + udpcast-doc \ + unbound-doc \ znc \ - znc-doc \ " diff --git a/sources/meta-openembedded/meta-networking/conf/include/ptest-packagelists-meta-networking.inc b/sources/meta-openembedded/meta-networking/conf/include/ptest-packagelists-meta-networking.inc index c3a2202d..7ec6f906 100644 --- a/sources/meta-openembedded/meta-networking/conf/include/ptest-packagelists-meta-networking.inc +++ b/sources/meta-openembedded/meta-networking/conf/include/ptest-packagelists-meta-networking.inc @@ -19,7 +19,6 @@ PTESTS_FAST_META_NETWORKING = "\ openhpi \ squid \ tcpdump \ - wolfssl \ " # firewalld currently hangs forever so disable it for now diff --git a/sources/meta-openembedded/meta-networking/conf/layer.conf b/sources/meta-openembedded/meta-networking/conf/layer.conf index ac5d15a0..a9ba4aba 100644 --- a/sources/meta-openembedded/meta-networking/conf/layer.conf +++ b/sources/meta-openembedded/meta-networking/conf/layer.conf @@ -15,7 +15,7 @@ LAYERVERSION_networking-layer = "1" LAYERDEPENDS_networking-layer = "core meta-python openembedded-layer" -LAYERSERIES_COMPAT_networking-layer = "scarthgap" +LAYERSERIES_COMPAT_networking-layer = "styhead" LICENSE_PATH += "${LAYERDIR}/licenses" diff --git a/sources/meta-openembedded/meta-networking/dynamic-layers/meta-python/recipes-connectivity/firewalld/firewalld_1.3.2.bb b/sources/meta-openembedded/meta-networking/dynamic-layers/meta-python/recipes-connectivity/firewalld/firewalld_1.3.2.bb index 52157cf9..12cc6645 100644 --- a/sources/meta-openembedded/meta-networking/dynamic-layers/meta-python/recipes-connectivity/firewalld/firewalld_1.3.2.bb +++ b/sources/meta-openembedded/meta-networking/dynamic-layers/meta-python/recipes-connectivity/firewalld/firewalld_1.3.2.bb @@ -146,7 +146,7 @@ do_install:append() { # firewalld ships an init script but it contains Red Hat-isms, replace it with our own rm -rf ${D}${sysconfdir}/rc.d/ install -d ${D}${sysconfdir}/init.d - install -m0755 ${WORKDIR}/firewalld.init ${D}${sysconfdir}/init.d/firewalld + install -m0755 ${UNPACKDIR}/firewalld.init ${D}${sysconfdir}/init.d/firewalld fi if ${@bb.utils.contains('DISTRO_FEATURES', 'polkit', 'false', 'true', d)}; then diff --git a/sources/meta-openembedded/meta-networking/recipes-connectivity/blueman/blueman/0001-Search-for-cython3.patch b/sources/meta-openembedded/meta-networking/recipes-connectivity/blueman/blueman/0001-Search-for-cython3.patch deleted file mode 100644 index 913566dc..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-connectivity/blueman/blueman/0001-Search-for-cython3.patch +++ /dev/null @@ -1,24 +0,0 @@ -Subject: [PATCH] Search for cython3 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Upstream-Status: Inappropriate - -Signed-off-by: Markus Volk ---- - meson.build | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/module/meson.build 2022-02-10 08:49:35.000000000 +0100 -+++ b/module/meson.build 2022-03-29 12:58:03.456193737 +0200 -@@ -1,4 +1,4 @@ --cython = find_program('cython', required: true) -+cython = find_program('cython3', required: true) - - blueman_c = custom_target( - 'blueman_c', - --- -2.14.3 - diff --git a/sources/meta-openembedded/meta-networking/recipes-connectivity/blueman/blueman/0001-meson-DO-not-emit-absolute-path-when-S-B.patch b/sources/meta-openembedded/meta-networking/recipes-connectivity/blueman/blueman/0001-meson-DO-not-emit-absolute-path-when-S-B.patch index 10f89a12..6e48b702 100644 --- a/sources/meta-openembedded/meta-networking/recipes-connectivity/blueman/blueman/0001-meson-DO-not-emit-absolute-path-when-S-B.patch +++ b/sources/meta-openembedded/meta-networking/recipes-connectivity/blueman/blueman/0001-meson-DO-not-emit-absolute-path-when-S-B.patch @@ -1,7 +1,7 @@ -From 18af739fd96960bbc8c5db5dd290d2f9134cd347 Mon Sep 17 00:00:00 2001 +From 4947abc5ede2dc356f011b7c45f6760c9c2ce9f1 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 14 Aug 2024 21:26:24 -0700 -Subject: [PATCH] meson: DO not emit absolute path when S != B +Subject: [PATCH] meson: Do not emit absolute path when S != B build systems like OE build outside sourcetree in such cases it works ok but cython resolves the input file to absolute path and that gets @@ -17,14 +17,14 @@ See cython discussion on [1] [1] https://github.com/cython/cython/issues/5949 -Upstream-Status: Submitted [https://github.com/blueman-project/blueman/pull/2461] +Upstream-Status: Submitted [https://github.com/blueman-project/blueman/pull/2461] Signed-off-by: Khem Raj --- module/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/meson.build b/module/meson.build -index 096ad7c8..e3d96f17 100644 +index 096ad7c8..fddef547 100644 --- a/module/meson.build +++ b/module/meson.build @@ -4,7 +4,7 @@ blueman_c = custom_target( @@ -32,7 +32,7 @@ index 096ad7c8..e3d96f17 100644 output: '_blueman.c', input: '_blueman.pyx', - command: [cython, '--output-file', '@OUTPUT@', '@INPUT@']) -+ command: [cython, '-w', meson.source_root(), '--output-file', meson.build_root() + '/' + '@OUTPUT@', '@INPUT@']) ++ command: [cython, '-w', meson.source_root(), '--output-file', join_paths(meson.build_root(), '@OUTPUT@'), join_paths(meson.build_root(), '@INPUT@')]) sources = [ blueman_c, diff --git a/sources/meta-openembedded/meta-networking/recipes-connectivity/blueman/blueman/0001-meson-add-pythoninstalldir-option.patch b/sources/meta-openembedded/meta-networking/recipes-connectivity/blueman/blueman/0001-meson-add-pythoninstalldir-option.patch deleted file mode 100644 index cc448b4f..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-connectivity/blueman/blueman/0001-meson-add-pythoninstalldir-option.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 37f24a9bd62f0a8f3e37eaddd33f2f0c9d3aaa0a Mon Sep 17 00:00:00 2001 -From: Chen Qi -Date: Fri, 1 Apr 2022 23:12:17 -0700 -Subject: [PATCH] meson: add pythoninstalldir option - -In case of cross build, using host python to determine the python -site-packages directory for target is not feasible, add a new option -pythoninstalldir to fix the issue. - -Upstream-Status: Submitted [https://github.com/blueman-project/blueman/pull/1699] - -Signed-off-by: Chen Qi ---- - meson.build | 7 ++++++- - meson_options.txt | 1 + - 2 files changed, 7 insertions(+), 1 deletion(-) - -diff --git a/meson.build b/meson.build -index e12d0ce6..e84457a5 100644 ---- a/meson.build -+++ b/meson.build -@@ -26,7 +26,12 @@ pkgdatadir = join_paths([prefix, get_option('datadir'), package_name]) - bindir = join_paths([prefix, get_option('bindir')]) - libexecdir = join_paths([prefix, get_option('libexecdir')]) - schemadir = join_paths(['share', 'glib-2.0', 'schemas']) --pythondir = pyinstall.get_install_dir() -+pythoninstalldir = get_option('pythoninstalldir') -+if pythoninstalldir != '' -+ pythondir = join_paths([prefix, pythoninstalldir]) -+else -+ pythondir = join_paths([prefix, python.sysconfig_path('purelib')]) -+endif - - if get_option('policykit') - have_polkit = 'True' -diff --git a/meson_options.txt b/meson_options.txt -index 177d9ab8..3e397d8e 100644 ---- a/meson_options.txt -+++ b/meson_options.txt -@@ -2,6 +2,7 @@ option('runtime_deps_check', type: 'boolean', value: true, description: 'Disable - option('dhcp-config-path', type: 'string', value: '/etc/dhcp3/dhcpd.conf', description: 'Set dhcp3 server configuration path') - option('policykit', type: 'boolean', value: true, description: 'Enable policykit support') - option('pulseaudio', type: 'boolean', value: true, description: 'Enable PulseAudio support') -+option('pythoninstalldir', type: 'string', description: 'Path to python site-packages dir relative to ${prefix}') - option('systemdsystemunitdir', type: 'string', description: 'Path to systemd system unit dir relative to ${prefix}') - option('systemduserunitdir', type: 'string', description: 'Path to systemd user unit dir relative to ${prefix}') - option('sendto-plugins', type: 'array', choices: ['Caja', 'Nemo', 'Nautilus'], value: ['Caja', 'Nemo', 'Nautilus'], description: 'Install sendto plugins for various filemanagers') --- -2.34.1 - diff --git a/sources/meta-openembedded/meta-networking/recipes-connectivity/blueman/blueman/0002-fix-fail-to-enable-bluetooth.patch b/sources/meta-openembedded/meta-networking/recipes-connectivity/blueman/blueman/0002-fix-fail-to-enable-bluetooth.patch deleted file mode 100644 index 282d8213..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-connectivity/blueman/blueman/0002-fix-fail-to-enable-bluetooth.patch +++ /dev/null @@ -1,72 +0,0 @@ -Fix fail to enable bluetooth issue - -When launch blueman-manager while bluetooth is disable, it may fails -with error: - - Failed to enable bluetooth - -Because when get bluetooth status right after change its status, the -status may not be updated that plugin applet/KillSwitch.py sets the -bluetooth status via method of another dbus service which doesn't return -immediately. - -Provides a new dbus method for PowerManager which checks whether dbus -method SetBluetoothStatus() has finished. Then it makes sure to get -right bluetooth status. - -Upstream-Status: Inappropriate -Send to upstream but not accepted: -https://github.com/blueman-project/blueman/pull/1121 - -Signed-off-by: Kai Kang ---- - blueman/Functions.py | 10 ++++++++++ - blueman/plugins/applet/PowerManager.py | 4 ++++ - 2 files changed, 14 insertions(+) - -diff --git a/blueman/Functions.py b/blueman/Functions.py -index 3917f42..b4d5eae 100644 ---- a/blueman/Functions.py -+++ b/blueman/Functions.py -@@ -80,6 +80,16 @@ def check_bluetooth_status(message: str, exitfunc: Callable[[], Any]) -> None: - return - - applet.SetBluetoothStatus('(b)', True) -+ -+ timeout = time.time() + 10 -+ while applet.GetRequestStatus(): -+ time.sleep(0.1) -+ if time.time() > timeout: -+ # timeout 5s has been set in applet/PowerManager.py -+ # so it should NOT reach timeout here -+ logging.warning('Should NOT reach timeout.') -+ break -+ - if not applet.GetBluetoothStatus(): - print('Failed to enable bluetooth') - exitfunc() -diff --git a/blueman/plugins/applet/PowerManager.py b/blueman/plugins/applet/PowerManager.py -index c2f7bc3..bf6c99f 100644 ---- a/blueman/plugins/applet/PowerManager.py -+++ b/blueman/plugins/applet/PowerManager.py -@@ -63,6 +63,7 @@ class PowerManager(AppletPlugin, StatusIconProvider): - self._add_dbus_signal("BluetoothStatusChanged", "b") - self._add_dbus_method("SetBluetoothStatus", ("b",), "", self.request_power_state) - self._add_dbus_method("GetBluetoothStatus", (), "b", self.get_bluetooth_status) -+ self._add_dbus_method("GetRequestStatus", (), "b", self.get_request_status) - - def on_unload(self) -> None: - self.parent.Plugins.Menu.unregister(self) -@@ -196,6 +197,9 @@ class PowerManager(AppletPlugin, StatusIconProvider): - def get_bluetooth_status(self) -> bool: - return self.current_state - -+ def get_request_status(self): -+ return self.request_in_progress -+ - def on_adapter_property_changed(self, _path: str, key: str, value: Any) -> None: - if key == "Powered": - if value and not self.current_state: --- -2.31.1 - diff --git a/sources/meta-openembedded/meta-networking/recipes-connectivity/blueman/blueman_2.3.5.bb b/sources/meta-openembedded/meta-networking/recipes-connectivity/blueman/blueman_2.3.5.bb deleted file mode 100644 index 4174da72..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-connectivity/blueman/blueman_2.3.5.bb +++ /dev/null @@ -1,89 +0,0 @@ -DESCRIPTION = "Blueman is a GTK+ Bluetooth Manager" -LICENSE = "GPL-3.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" - -DEPENDS = "gtk+3 glib-2.0 bluez5 python3-pygobject python3-cython-native" - -inherit meson gettext systemd gsettings pkgconfig python3native gtk-icon-cache useradd features_check - -REQUIRED_DISTRO_FEATURES = "gobject-introspection-data" - -SRC_URI = " \ - git://github.com/blueman-project/blueman.git;protocol=https;branch=2-3-stable \ - file://0001-Search-for-cython3.patch \ - file://0002-fix-fail-to-enable-bluetooth.patch \ - file://0001-meson-add-pythoninstalldir-option.patch \ - file://0001-meson-DO-not-emit-absolute-path-when-S-B.patch \ -" -S = "${WORKDIR}/git" -SRCREV = "c85e7afb8d6547d4c35b7b639124de8e999c3650" - -EXTRA_OEMESON = "-Druntime_deps_check=false -Dpythoninstalldir=${@noprefix('PYTHON_SITEPACKAGES_DIR', d)}" - -SYSTEMD_SERVICE:${PN} = "${BPN}-mechanism.service" -SYSTEMD_AUTO_ENABLE:${PN} = "disable" - -RRECOMMENDS:${PN} += "adwaita-icon-theme" -RDEPENDS:${PN} += " \ - python3-core \ - python3-ctypes \ - python3-dbus \ - python3-pygobject \ - python3-terminal \ - python3-fcntl \ - packagegroup-tools-bluetooth \ -" - -PACKAGECONFIG ??= " \ - ${@bb.utils.filter('DISTRO_FEATURES', 'polkit pulseaudio ', d)} \ - thunar \ -" -PACKAGECONFIG[thunar] = "-Dthunar-sendto=true,-Dthunar-sendto=false" -PACKAGECONFIG[pulseaudio] = "-Dpulseaudio=true,-Dpulseaudio=false" -PACKAGECONFIG[polkit] = "-Dpolicykit=true,-Dpolicykit=false" - -FILES:${PN} += " \ - ${datadir} \ - ${systemd_user_unitdir} \ - ${PYTHON_SITEPACKAGES_DIR} \ -" - -# In code, path to python is a variable that is replaced with path to native version of it -# during the configure stage, e.g ../recipe-sysroot-native/usr/bin/python3-native/python3. -# Replace it with #!/usr/bin/env python3 -do_install:append() { - sed -i "1s/.*/#!\/usr\/bin\/env python3/" ${D}${prefix}/libexec/blueman-rfcomm-watcher \ - ${D}${prefix}/libexec/blueman-mechanism \ - ${D}${bindir}/blueman-adapters \ - ${D}${bindir}/blueman-applet \ - ${D}${bindir}/blueman-manager \ - ${D}${bindir}/blueman-sendto \ - ${D}${bindir}/blueman-services \ - ${D}${bindir}/blueman-tray -} - -do_install:append() { - install -d ${D}${datadir}/polkit-1/rules.d - cat >${D}${datadir}/polkit-1/rules.d/51-blueman.rules </dev/null || : - sed -i 's+${B}/++g' ${B}/tests/*.c 2>/dev/null || : -} - -# Export source files/headers needed by Arm Trusted Firmware -sysroot_stage_all:append() { - sysroot_stage_dir "${S}/library" "${SYSROOT_DESTDIR}/usr/share/mbedtls-source/library" - sysroot_stage_dir "${S}/include" "${SYSROOT_DESTDIR}/usr/share/mbedtls-source/include" -} - -do_install_ptest () { - install -d ${D}${PTEST_PATH}/tests - cp -f ${B}/tests/test_suite_* ${D}${PTEST_PATH}/tests/ - find ${D}${PTEST_PATH}/tests/ -type f -name "*.c" -delete - cp -fR ${S}/tests/data_files ${D}${PTEST_PATH}/tests/ -} diff --git a/sources/meta-openembedded/meta-networking/recipes-connectivity/mbedtls/mbedtls_2.28.9.bb b/sources/meta-openembedded/meta-networking/recipes-connectivity/mbedtls/mbedtls_2.28.9.bb new file mode 100644 index 00000000..abb5ad24 --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-connectivity/mbedtls/mbedtls_2.28.9.bb @@ -0,0 +1,80 @@ +SUMMARY = "Lightweight crypto and SSL/TLS library" +DESCRIPTION = "mbedtls is a lean open source crypto library \ +for providing SSL and TLS support in your programs. It offers \ +an intuitive API and documented header files, so you can actually \ +understand what the code does. It features: \ + \ + - Symmetric algorithms, like AES, Blowfish, Triple-DES, DES, ARC4, \ + Camellia and XTEA \ + - Hash algorithms, like SHA-1, SHA-2, RIPEMD-160 and MD5 \ + - Entropy pool and random generators, like CTR-DRBG and HMAC-DRBG \ + - Public key algorithms, like RSA, Elliptic Curves, Diffie-Hellman, \ + ECDSA and ECDH \ + - SSL v3 and TLS 1.0, 1.1 and 1.2 \ + - Abstraction layers for ciphers, hashes, public key operations, \ + platform abstraction and threading \ +" + +HOMEPAGE = "https://tls.mbed.org/" + +LICENSE = "Apache-2.0 | GPL-2.0-or-later" +LIC_FILES_CHKSUM = "file://LICENSE;md5=379d5819937a6c2f1ef1630d341e026d" + +SECTION = "libs" + +S = "${WORKDIR}/git" +SRCREV = "5e146adef63b326b04282252639bebc2730939c6" +SRC_URI = "git://github.com/Mbed-TLS/mbedtls.git;protocol=https;branch=mbedtls-2.28 \ + file://run-ptest \ + " + +inherit cmake update-alternatives ptest + +PACKAGECONFIG ??= "shared-libs programs ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}" +PACKAGECONFIG[shared-libs] = "-DUSE_SHARED_MBEDTLS_LIBRARY=ON,-DUSE_SHARED_MBEDTLS_LIBRARY=OFF" +PACKAGECONFIG[programs] = "-DENABLE_PROGRAMS=ON,-DENABLE_PROGRAMS=OFF" +PACKAGECONFIG[werror] = "-DMBEDTLS_FATAL_WARNINGS=ON,-DMBEDTLS_FATAL_WARNINGS=OFF" +# Make X.509 and TLS calls use PSA +# https://github.com/Mbed-TLS/mbedtls/blob/development/docs/use-psa-crypto.md +PACKAGECONFIG[psa] = "" +PACKAGECONFIG[tests] = "-DENABLE_TESTING=ON,-DENABLE_TESTING=OFF" + +EXTRA_OECMAKE = "-DLIB_INSTALL_DIR:STRING=${libdir}" + +# For now the only way to enable PSA is to explicitly pass a -D via CFLAGS +CFLAGS:append = "${@bb.utils.contains('PACKAGECONFIG', 'psa', ' -DMBEDTLS_USE_PSA_CRYPTO', '', d)}" + +PROVIDES += "polarssl" +RPROVIDES:${PN} = "polarssl" + +PACKAGES =+ "${PN}-programs" +FILES:${PN}-programs = "${bindir}/" + +ALTERNATIVE:${PN}-programs = "${@bb.utils.contains('PACKAGECONFIG', 'programs', 'hello', '', d)}" +ALTERNATIVE_LINK_NAME[hello] = "${bindir}/hello" + +BBCLASSEXTEND = "native nativesdk" + +CVE_PRODUCT = "mbed_tls" + +CVE_STATUS[CVE-2021-43666] = "backported-patch: Fix merged upstream https://github.com/Mbed-TLS/mbedtls/pull/5310" +CVE_STATUS[CVE-2021-45451] = "backported-patch: Fix merged upstream https://github.com/Mbed-TLS/mbedtls/commit/9a4a9c66a48edfe9ece03c7e4a53310adf73a86c" + +# Strip host paths from autogenerated test files +do_compile:append() { + sed -i 's+${S}/++g' ${B}/tests/*.c 2>/dev/null || : + sed -i 's+${B}/++g' ${B}/tests/*.c 2>/dev/null || : +} + +# Export source files/headers needed by Arm Trusted Firmware +sysroot_stage_all:append() { + sysroot_stage_dir "${S}/library" "${SYSROOT_DESTDIR}/usr/share/mbedtls-source/library" + sysroot_stage_dir "${S}/include" "${SYSROOT_DESTDIR}/usr/share/mbedtls-source/include" +} + +do_install_ptest () { + install -d ${D}${PTEST_PATH}/tests + cp -f ${B}/tests/test_suite_* ${D}${PTEST_PATH}/tests/ + find ${D}${PTEST_PATH}/tests/ -type f -name "*.c" -delete + cp -fR ${S}/tests/data_files ${D}${PTEST_PATH}/tests/ +} diff --git a/sources/meta-openembedded/meta-networking/recipes-connectivity/mbedtls/mbedtls_3.6.1.bb b/sources/meta-openembedded/meta-networking/recipes-connectivity/mbedtls/mbedtls_3.6.1.bb new file mode 100644 index 00000000..62c3add2 --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-connectivity/mbedtls/mbedtls_3.6.1.bb @@ -0,0 +1,81 @@ +SUMMARY = "Lightweight crypto and SSL/TLS library" +DESCRIPTION = "mbedtls is a lean open source crypto library \ +for providing SSL and TLS support in your programs. It offers \ +an intuitive API and documented header files, so you can actually \ +understand what the code does. It features: \ + \ + - Symmetric algorithms, like AES, Blowfish, Triple-DES, DES, ARC4, \ + Camellia and XTEA \ + - Hash algorithms, like SHA-1, SHA-2, RIPEMD-160 and MD5 \ + - Entropy pool and random generators, like CTR-DRBG and HMAC-DRBG \ + - Public key algorithms, like RSA, Elliptic Curves, Diffie-Hellman, \ + ECDSA and ECDH \ + - SSL v3 and TLS 1.0, 1.1 and 1.2 \ + - Abstraction layers for ciphers, hashes, public key operations, \ + platform abstraction and threading \ +" + +HOMEPAGE = "https://tls.mbed.org/" + +LICENSE = "Apache-2.0 | GPL-2.0-or-later" +LIC_FILES_CHKSUM = "file://LICENSE;md5=379d5819937a6c2f1ef1630d341e026d" + +SECTION = "libs" + +S = "${WORKDIR}/git" +SRC_URI = "git://github.com/Mbed-TLS/mbedtls.git;protocol=https;branch=mbedtls-3.6 \ + git://github.com/Mbed-TLS/mbedtls-framework.git;protocol=https;branch=main;destsuffix=git/framework;name=framework \ + file://run-ptest" + +SRCREV = "71c569d44bf3a8bd53d874c81ee8ac644dd6e9e3" +SRCREV_framework = "94599c0e3b5036e086446a51a3f79640f70f22f6" +SRCREV_FORMAT .= "_framework" + +UPSTREAM_CHECK_GITTAGREGEX = "v(?P\d+(\.\d+)+)" + +inherit cmake update-alternatives ptest + +PACKAGECONFIG ??= "shared-libs programs ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}" +PACKAGECONFIG[shared-libs] = "-DUSE_SHARED_MBEDTLS_LIBRARY=ON,-DUSE_SHARED_MBEDTLS_LIBRARY=OFF" +PACKAGECONFIG[programs] = "-DENABLE_PROGRAMS=ON,-DENABLE_PROGRAMS=OFF" +PACKAGECONFIG[werror] = "-DMBEDTLS_FATAL_WARNINGS=ON,-DMBEDTLS_FATAL_WARNINGS=OFF" +# Make X.509 and TLS calls use PSA +# https://github.com/Mbed-TLS/mbedtls/blob/development/docs/use-psa-crypto.md +PACKAGECONFIG[psa] = "" +PACKAGECONFIG[tests] = "-DENABLE_TESTING=ON,-DENABLE_TESTING=OFF" + +# For now the only way to enable PSA is to explicitly pass a -D via CFLAGS +CFLAGS:append = "${@bb.utils.contains('PACKAGECONFIG', 'psa', ' -DMBEDTLS_USE_PSA_CRYPTO', '', d)}" + +PROVIDES += "polarssl" +RPROVIDES:${PN} = "polarssl" + +PACKAGES =+ "${PN}-programs" +FILES:${PN}-programs = "${bindir}/" + +ALTERNATIVE:${PN}-programs = "${@bb.utils.contains('PACKAGECONFIG', 'programs', 'hello', '', d)}" +ALTERNATIVE_LINK_NAME[hello] = "${bindir}/hello" + +BBCLASSEXTEND = "native nativesdk" + +CVE_PRODUCT = "mbed_tls" + +# Strip host paths from autogenerated test files +do_compile:append() { + sed -i 's+${S}/++g' ${B}/tests/*.c 2>/dev/null || : + sed -i 's+${B}/++g' ${B}/tests/*.c 2>/dev/null || : +} + +# Export source files/headers needed by Arm Trusted Firmware +sysroot_stage_all:append() { + sysroot_stage_dir "${S}/library" "${SYSROOT_DESTDIR}/usr/share/mbedtls-source/library" + sysroot_stage_dir "${S}/include" "${SYSROOT_DESTDIR}/usr/share/mbedtls-source/include" +} + +do_install_ptest () { + install -d ${D}${PTEST_PATH}/tests + install -d ${D}${PTEST_PATH}/framework + cp -f ${B}/tests/test_suite_* ${D}${PTEST_PATH}/tests/ + find ${D}${PTEST_PATH}/tests/ -type f -name "*.c" -delete + cp -fR ${S}/framework/data_files ${D}${PTEST_PATH}/framework/ +} diff --git a/sources/meta-openembedded/meta-networking/recipes-connectivity/mbedtls/mbedtls_3.6.3.bb b/sources/meta-openembedded/meta-networking/recipes-connectivity/mbedtls/mbedtls_3.6.3.bb deleted file mode 100644 index 286d5c45..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-connectivity/mbedtls/mbedtls_3.6.3.bb +++ /dev/null @@ -1,80 +0,0 @@ -SUMMARY = "Lightweight crypto and SSL/TLS library" -DESCRIPTION = "mbedtls is a lean open source crypto library \ -for providing SSL and TLS support in your programs. It offers \ -an intuitive API and documented header files, so you can actually \ -understand what the code does. It features: \ - \ - - Symmetric algorithms, like AES, Blowfish, Triple-DES, DES, ARC4, \ - Camellia and XTEA \ - - Hash algorithms, like SHA-1, SHA-2, RIPEMD-160 and MD5 \ - - Entropy pool and random generators, like CTR-DRBG and HMAC-DRBG \ - - Public key algorithms, like RSA, Elliptic Curves, Diffie-Hellman, \ - ECDSA and ECDH \ - - SSL v3 and TLS 1.0, 1.1 and 1.2 \ - - Abstraction layers for ciphers, hashes, public key operations, \ - platform abstraction and threading \ -" - -HOMEPAGE = "https://tls.mbed.org/" - -LICENSE = "Apache-2.0 | GPL-2.0-or-later" -LIC_FILES_CHKSUM = "file://LICENSE;md5=379d5819937a6c2f1ef1630d341e026d" - -SECTION = "libs" - -S = "${WORKDIR}/git" -SRC_URI = "git://github.com/Mbed-TLS/mbedtls.git;protocol=https;branch=mbedtls-3.6 \ - file://run-ptest" - -SRCREV = "22098d41c6620ce07cf8a0134d37302355e1e5ef" - -UPSTREAM_CHECK_GITTAGREGEX = "v(?P\d+(\.\d+)+)" - -inherit cmake update-alternatives ptest - -PACKAGECONFIG ??= "shared-libs programs ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}" -PACKAGECONFIG[shared-libs] = "-DUSE_SHARED_MBEDTLS_LIBRARY=ON,-DUSE_SHARED_MBEDTLS_LIBRARY=OFF" -PACKAGECONFIG[programs] = "-DENABLE_PROGRAMS=ON,-DENABLE_PROGRAMS=OFF" -PACKAGECONFIG[werror] = "-DMBEDTLS_FATAL_WARNINGS=ON,-DMBEDTLS_FATAL_WARNINGS=OFF" -# Make X.509 and TLS calls use PSA -# https://github.com/Mbed-TLS/mbedtls/blob/development/docs/use-psa-crypto.md -PACKAGECONFIG[psa] = "" -PACKAGECONFIG[tests] = "-DENABLE_TESTING=ON,-DENABLE_TESTING=OFF" - -EXTRA_OECMAKE = "-DLIB_INSTALL_DIR:STRING=${libdir}" - -# For now the only way to enable PSA is to explicitly pass a -D via CFLAGS -CFLAGS:append = "${@bb.utils.contains('PACKAGECONFIG', 'psa', ' -DMBEDTLS_USE_PSA_CRYPTO', '', d)}" - -PROVIDES += "polarssl" -RPROVIDES:${PN} = "polarssl" - -PACKAGES =+ "${PN}-programs" -FILES:${PN}-programs = "${bindir}/" - -ALTERNATIVE:${PN}-programs = "hello" -ALTERNATIVE_LINK_NAME[hello] = "${bindir}/hello" - -BBCLASSEXTEND = "native nativesdk" - -CVE_PRODUCT = "mbed_tls" - -# Strip host paths from autogenerated test files -do_compile:append() { - sed -i 's+${S}/++g' ${B}/tests/*.c 2>/dev/null || : - sed -i 's+${B}/++g' ${B}/tests/*.c 2>/dev/null || : -} - -# Export source files/headers needed by Arm Trusted Firmware -sysroot_stage_all:append() { - sysroot_stage_dir "${S}/library" "${SYSROOT_DESTDIR}/usr/share/mbedtls-source/library" - sysroot_stage_dir "${S}/include" "${SYSROOT_DESTDIR}/usr/share/mbedtls-source/include" -} - -do_install_ptest () { - install -d ${D}${PTEST_PATH}/tests - install -d ${D}${PTEST_PATH}/framework - cp -f ${B}/tests/test_suite_* ${D}${PTEST_PATH}/tests/ - find ${D}${PTEST_PATH}/tests/ -type f -name "*.c" -delete - cp -fR ${S}/framework/data_files ${D}${PTEST_PATH}/framework/ -} diff --git a/sources/meta-openembedded/meta-networking/recipes-connectivity/miniupnpd/miniupnpd_2.1.20191006.bb b/sources/meta-openembedded/meta-networking/recipes-connectivity/miniupnpd/miniupnpd_2.1.20191006.bb index 468569ee..1c2f030f 100644 --- a/sources/meta-openembedded/meta-networking/recipes-connectivity/miniupnpd/miniupnpd_2.1.20191006.bb +++ b/sources/meta-openembedded/meta-networking/recipes-connectivity/miniupnpd/miniupnpd_2.1.20191006.bb @@ -44,7 +44,7 @@ do_install() { install ${S}/linux/miniupnpd.init.d.script ${D}/${sysconfdir}/init.d/miniupnpd install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/miniupnpd.service ${D}${systemd_unitdir}/system/ + install -m 0644 ${UNPACKDIR}/miniupnpd.service ${D}${systemd_unitdir}/system/ } SYSTEMD_SERVICE:${PN} = "miniupnpd.service" diff --git a/sources/meta-openembedded/meta-networking/recipes-connectivity/mosquitto/files/1571.patch b/sources/meta-openembedded/meta-networking/recipes-connectivity/mosquitto/files/1571.patch new file mode 100644 index 00000000..627638ec --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-connectivity/mosquitto/files/1571.patch @@ -0,0 +1,22 @@ +Upstream-Status: Submitted [https://github.com/eclipse/mosquitto/pull/1571] +From 3fe5468f1bdca1bff1d18cf43c9e338f41aa9e32 Mon Sep 17 00:00:00 2001 +From: Gianfranco Costamagna +Date: Wed, 22 Jan 2020 12:39:49 +0100 +Subject: [PATCH] Add dynamic symbols linking with cmake too + +Signed-off-by: Gianfranco Costamagna +--- + lib/CMakeLists.txt | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/lib/CMakeLists.txt ++++ b/lib/CMakeLists.txt +@@ -94,6 +94,8 @@ + OUTPUT_NAME mosquitto + VERSION ${VERSION} + SOVERSION 1 ++ LINK_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/linker.version ++ LINK_FLAGS "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/linker.version" + ) + + install(TARGETS libmosquitto diff --git a/sources/meta-openembedded/meta-networking/recipes-connectivity/mosquitto/files/2894.patch b/sources/meta-openembedded/meta-networking/recipes-connectivity/mosquitto/files/2894.patch new file mode 100644 index 00000000..7374cbd2 --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-connectivity/mosquitto/files/2894.patch @@ -0,0 +1,25 @@ +From: Joachim Zobel +Date: Wed, 13 Sep 2023 09:55:34 +0200 +Subject: [PATCH] Link correctly with shared websockets library if needed see: + https://github.com/eclipse/mosquitto/pull/2751 + +Patch contributed by Joachim Zobel and Daniel Engberg +--- +Upstream-Status: Pending + + src/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 9380a04..dce8313 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -200,7 +200,7 @@ if (WITH_WEBSOCKETS) + link_directories(${mosquitto_SOURCE_DIR}) + endif (WIN32) + else (STATIC_WEBSOCKETS) +- set (MOSQ_LIBS ${MOSQ_LIBS} websockets) ++ set (MOSQ_LIBS ${MOSQ_LIBS} websockets_shared) + endif (STATIC_WEBSOCKETS) + endif (WITH_WEBSOCKETS) + diff --git a/sources/meta-openembedded/meta-networking/recipes-connectivity/mosquitto/mosquitto_2.0.18.bb b/sources/meta-openembedded/meta-networking/recipes-connectivity/mosquitto/mosquitto_2.0.18.bb new file mode 100644 index 00000000..4ef06541 --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-connectivity/mosquitto/mosquitto_2.0.18.bb @@ -0,0 +1,92 @@ +SUMMARY = "Open source MQTT implementation" +DESCRIPTION = "Mosquitto is an open source (Eclipse licensed) message broker \ +that implements the MQ Telemetry Transport protocol version 3.1, 3.1.1 and \ +5, providing both an MQTT broker and several command-line clients. MQTT \ +provides a lightweight method of carrying out messaging using a \ +publish/subscribe model. " +HOMEPAGE = "http://mosquitto.org/" +SECTION = "console/network" +LICENSE = "EPL-2.0 | EDL-1.0" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=ca9a8f366c6babf593e374d0d7d58749 \ + file://edl-v10;md5=9f6accb1afcb570f8be65039e2fcd49e \ + file://epl-v20;md5=2dd765ca47a05140be15ebafddbeadfe \ + file://NOTICE.md;md5=a7a91b4754c6f7995020d1b49bc829c6 \ +" +DEPENDS = "uthash cjson" + +SRC_URI = "http://mosquitto.org/files/source/mosquitto-${PV}.tar.gz \ + file://mosquitto.init \ + file://1571.patch \ + file://2894.patch \ + file://2895.patch \ +" + +SRC_URI[sha256sum] = "d665fe7d0032881b1371a47f34169ee4edab67903b2cd2b4c083822823f4448a" + +inherit systemd update-rc.d useradd cmake pkgconfig + +PACKAGECONFIG ??= "ssl websockets \ + ${@bb.utils.filter('DISTRO_FEATURES','systemd', d)} \ + " + +PACKAGECONFIG[manpages] = "-DDOCUMENTATION=ON,-DDOCUMENTATION=OFF,libxslt-native docbook-xsl-stylesheets-native" +PACKAGECONFIG[dns-srv] = "-DWITH_SRV=ON,-DWITH_SRV=OFF,c-ares" +PACKAGECONFIG[ssl] = "-DWITH_TLS=ON -DWITH_TLS_PSK=ON -DWITH_EC=ON,-DWITH_TLS=OFF -DWITH_TLS_PSK=OFF -DWITH_EC=OFF,openssl" +PACKAGECONFIG[systemd] = "-DWITH_SYSTEMD=ON,-DWITH_SYSTEMD=OFF,systemd" +PACKAGECONFIG[websockets] = "-DWITH_WEBSOCKETS=ON,-DWITH_WEBSOCKETS=OFF,libwebsockets" +PACKAGECONFIG[dlt] = "-DWITH_DLT=ON,-DWITH_DLT=OFF,dlt-daemon" + +EXTRA_OECMAKE = " \ + -DWITH_BUNDLED_DEPS=OFF \ + -DWITH_ADNS=ON \ +" + +do_install:append() { + install -d ${D}${systemd_unitdir}/system/ + install -m 0644 ${S}/service/systemd/mosquitto.service.notify ${D}${systemd_unitdir}/system/mosquitto.service + + install -d ${D}${sysconfdir}/init.d/ + install -m 0755 ${UNPACKDIR}/mosquitto.init ${D}${sysconfdir}/init.d/mosquitto + sed -i -e 's,@SBINDIR@,${sbindir},g' \ + -e 's,@BASE_SBINDIR@,${base_sbindir},g' \ + -e 's,@LOCALSTATEDIR@,${localstatedir},g' \ + -e 's,@SYSCONFDIR@,${sysconfdir},g' \ + ${D}${sysconfdir}/init.d/mosquitto +} + +PACKAGES += "libmosquitto1 libmosquittopp1 ${PN}-clients" + +PACKAGE_BEFORE_PN = "${PN}-examples" + +FILES:${PN} = "${sbindir}/mosquitto \ + ${bindir}/mosquitto_passwd \ + ${bindir}/mosquitto_ctrl \ + ${libdir}/mosquitto_dynamic_security.so \ + ${sysconfdir}/mosquitto \ + ${sysconfdir}/init.d \ + ${systemd_unitdir}/system/mosquitto.service \ +" + +CONFFILES:${PN} += "${sysconfdir}/mosquitto/mosquitto.conf" + +FILES:libmosquitto1 = "${libdir}/libmosquitto.so.*" + +FILES:libmosquittopp1 = "${libdir}/libmosquittopp.so.*" + +FILES:${PN}-clients = "${bindir}/mosquitto_pub \ + ${bindir}/mosquitto_sub \ + ${bindir}/mosquitto_rr \ +" + +FILES:${PN}-examples = "${sysconfdir}/mosquitto/*.example" + +SYSTEMD_SERVICE:${PN} = "mosquitto.service" + +INITSCRIPT_NAME = "mosquitto" +INITSCRIPT_PARAMS = "defaults 30" + +USERADD_PACKAGES = "${PN}" +USERADD_PARAM:${PN} = "--system --no-create-home --shell /bin/false \ + --user-group mosquitto" + +BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-networking/recipes-connectivity/mosquitto/mosquitto_2.0.20.bb b/sources/meta-openembedded/meta-networking/recipes-connectivity/mosquitto/mosquitto_2.0.20.bb deleted file mode 100644 index 2bc13031..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-connectivity/mosquitto/mosquitto_2.0.20.bb +++ /dev/null @@ -1,90 +0,0 @@ -SUMMARY = "Open source MQTT implementation" -DESCRIPTION = "Mosquitto is an open source (Eclipse licensed) message broker \ -that implements the MQ Telemetry Transport protocol version 3.1, 3.1.1 and \ -5, providing both an MQTT broker and several command-line clients. MQTT \ -provides a lightweight method of carrying out messaging using a \ -publish/subscribe model. " -HOMEPAGE = "http://mosquitto.org/" -SECTION = "console/network" -LICENSE = "EPL-2.0 | EDL-1.0" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=ca9a8f366c6babf593e374d0d7d58749 \ - file://edl-v10;md5=9f6accb1afcb570f8be65039e2fcd49e \ - file://epl-v20;md5=2dd765ca47a05140be15ebafddbeadfe \ - file://NOTICE.md;md5=a7a91b4754c6f7995020d1b49bc829c6 \ -" -DEPENDS = "uthash cjson" - -SRC_URI = "http://mosquitto.org/files/source/mosquitto-${PV}.tar.gz \ - file://mosquitto.init \ - file://2895.patch \ -" - -SRC_URI[sha256sum] = "ebd07d89d2a446a7f74100ad51272e4a8bf300b61634a7812e19f068f2759de8" - -inherit systemd update-rc.d useradd cmake pkgconfig - -PACKAGECONFIG ??= "ssl websockets \ - ${@bb.utils.filter('DISTRO_FEATURES','systemd', d)} \ - " - -PACKAGECONFIG[manpages] = "-DDOCUMENTATION=ON,-DDOCUMENTATION=OFF,libxslt-native docbook-xsl-stylesheets-native" -PACKAGECONFIG[dns-srv] = "-DWITH_SRV=ON,-DWITH_SRV=OFF,c-ares" -PACKAGECONFIG[ssl] = "-DWITH_TLS=ON -DWITH_TLS_PSK=ON -DWITH_EC=ON,-DWITH_TLS=OFF -DWITH_TLS_PSK=OFF -DWITH_EC=OFF,openssl" -PACKAGECONFIG[systemd] = "-DWITH_SYSTEMD=ON,-DWITH_SYSTEMD=OFF,systemd" -PACKAGECONFIG[websockets] = "-DWITH_WEBSOCKETS=ON,-DWITH_WEBSOCKETS=OFF,libwebsockets" -PACKAGECONFIG[dlt] = "-DWITH_DLT=ON,-DWITH_DLT=OFF,dlt-daemon" - -EXTRA_OECMAKE = " \ - -DWITH_BUNDLED_DEPS=OFF \ - -DWITH_ADNS=ON \ -" - -do_install:append() { - install -d ${D}${systemd_unitdir}/system/ - install -m 0644 ${S}/service/systemd/mosquitto.service.notify ${D}${systemd_unitdir}/system/mosquitto.service - - install -d ${D}${sysconfdir}/init.d/ - install -m 0755 ${WORKDIR}/mosquitto.init ${D}${sysconfdir}/init.d/mosquitto - sed -i -e 's,@SBINDIR@,${sbindir},g' \ - -e 's,@BASE_SBINDIR@,${base_sbindir},g' \ - -e 's,@LOCALSTATEDIR@,${localstatedir},g' \ - -e 's,@SYSCONFDIR@,${sysconfdir},g' \ - ${D}${sysconfdir}/init.d/mosquitto -} - -PACKAGES += "libmosquitto1 libmosquittopp1 ${PN}-clients" - -PACKAGE_BEFORE_PN = "${PN}-examples" - -FILES:${PN} = "${sbindir}/mosquitto \ - ${bindir}/mosquitto_passwd \ - ${bindir}/mosquitto_ctrl \ - ${libdir}/mosquitto_dynamic_security.so \ - ${sysconfdir}/mosquitto \ - ${sysconfdir}/init.d \ - ${systemd_unitdir}/system/mosquitto.service \ -" - -CONFFILES:${PN} += "${sysconfdir}/mosquitto/mosquitto.conf" - -FILES:libmosquitto1 = "${libdir}/libmosquitto.so.*" - -FILES:libmosquittopp1 = "${libdir}/libmosquittopp.so.*" - -FILES:${PN}-clients = "${bindir}/mosquitto_pub \ - ${bindir}/mosquitto_sub \ - ${bindir}/mosquitto_rr \ -" - -FILES:${PN}-examples = "${sysconfdir}/mosquitto/*.example" - -SYSTEMD_SERVICE:${PN} = "mosquitto.service" - -INITSCRIPT_NAME = "mosquitto" -INITSCRIPT_PARAMS = "defaults 30" - -USERADD_PACKAGES = "${PN}" -USERADD_PARAM:${PN} = "--system --no-create-home --shell /bin/false \ - --user-group mosquitto" - -BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-networking/recipes-connectivity/nanomsg/nng_1.7.3.bb b/sources/meta-openembedded/meta-networking/recipes-connectivity/nanomsg/nng_1.7.3.bb index a6556249..9ae3b893 100644 --- a/sources/meta-openembedded/meta-networking/recipes-connectivity/nanomsg/nng_1.7.3.bb +++ b/sources/meta-openembedded/meta-networking/recipes-connectivity/nanomsg/nng_1.7.3.bb @@ -5,7 +5,7 @@ SECTION = "libs/networking" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=a41e579bb4326c21c774f8e51e41d8a3" -SRC_URI = "git://github.com/nanomsg/nng.git;branch=master;protocol=https" +SRC_URI = "git://github.com/nanomsg/nng.git;branch=main;protocol=https" SRCREV = "85fbe7f9e4642b554d0d97f2e3ff2aa12978691a" S = "${WORKDIR}/git" diff --git a/sources/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn_1.10.2.bb b/sources/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn_1.10.2.bb deleted file mode 100644 index cdef11c8..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn_1.10.2.bb +++ /dev/null @@ -1,55 +0,0 @@ -SUMMARY = "NetworkManager-openvpn-plugin" -SECTION = "net/misc" - -LICENSE = "GPL-2.0-or-later" -LIC_FILES_CHKSUM = "file://COPYING;md5=100d5a599bead70ddcd70dcd73f2e29c" - -DEPENDS = "dbus dbus-glib networkmanager openvpn intltool-native glib-2.0-native" - -GNOMEBASEBUILDCLASS = "autotools" -inherit gnomebase useradd gettext systemd - -SRC_URI = "${GNOME_MIRROR}/NetworkManager-openvpn/${@gnome_verdir("${PV}")}/NetworkManager-openvpn-${PV}.tar.xz" - -SRC_URI:append:libc-musl = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', ' file://0001-linker-scripts-Do-not-export-_IO_stdin_used.patch', '', d)}" - -SRC_URI[sha256sum] = "62f0f2a8782221b923f212ac2a8ebbc1002efd6a90ee945dad4adfb56d076d21" - -S = "${WORKDIR}/NetworkManager-openvpn-${PV}" - -# meta-gnome in layers is required using gnome: -PACKAGECONFIG[gnome] = "--with-gnome,--without-gnome,gtk+3 libnma libsecret" - -do_configure:append() { - # network-manager-openvpn.metainfo.xml is created in source folder but - # compile expects it in build folder. As long as nobody comes up with a - # better solution just support build: - if [ -e ${S}/appdata/network-manager-openvpn.metainfo.xml ]; then - mkdir -p ${B}/appdata - cp -f ${S}/appdata/network-manager-openvpn.metainfo.xml ${B}/appdata/ - fi -} - -do_install:append () { - rm -rf ${D}${libdir}/NetworkManager/*.la -} - -# Create user and group nm-openvpn that are needed since version 1.0.6 -USERADD_PACKAGES = "${PN}" -USERADD_PARAM:${PN} = "--system nm-openvpn" - -FILES:${PN} += " \ - ${datadir}/dbus-1 \ - ${datadir}/metainfo \ - ${libdir}/NetworkManager/*.so \ - ${nonarch_libdir}/NetworkManager/VPN/nm-openvpn-service.name \ -" - -FILES:${PN}-staticdev += " \ - ${libdir}/NetworkManager/*.a \ -" - -RDEPENDS:${PN} = " \ - networkmanager \ - openvpn \ -" diff --git a/sources/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn_1.12.0.bb b/sources/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn_1.12.0.bb new file mode 100644 index 00000000..2d2055ba --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn_1.12.0.bb @@ -0,0 +1,55 @@ +SUMMARY = "NetworkManager-openvpn-plugin" +SECTION = "net/misc" + +LICENSE = "GPL-2.0-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=100d5a599bead70ddcd70dcd73f2e29c" + +DEPENDS = "dbus dbus-glib networkmanager openvpn intltool-native glib-2.0-native" + +GNOMEBASEBUILDCLASS = "autotools" +inherit gnomebase useradd gettext systemd + +SRC_URI = "${GNOME_MIRROR}/NetworkManager-openvpn/${@gnome_verdir("${PV}")}/NetworkManager-openvpn-${PV}.tar.xz" + +SRC_URI:append:libc-musl = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', ' file://0001-linker-scripts-Do-not-export-_IO_stdin_used.patch', '', d)}" + +SRC_URI[sha256sum] = "903fd4c0aebd2aa7ac70c9d8c2bed8df922655d22d764514403566ae89b7e886" + +S = "${WORKDIR}/NetworkManager-openvpn-${PV}" + +# meta-gnome in layers is required using gnome: +PACKAGECONFIG[gnome] = "--with-gnome,--without-gnome,gtk+3 libnma libsecret" + +do_configure:append() { + # network-manager-openvpn.metainfo.xml is created in source folder but + # compile expects it in build folder. As long as nobody comes up with a + # better solution just support build: + if [ -e ${S}/appdata/network-manager-openvpn.metainfo.xml ]; then + mkdir -p ${B}/appdata + cp -f ${S}/appdata/network-manager-openvpn.metainfo.xml ${B}/appdata/ + fi +} + +do_install:append () { + rm -rf ${D}${libdir}/NetworkManager/*.la +} + +# Create user and group nm-openvpn that are needed since version 1.0.6 +USERADD_PACKAGES = "${PN}" +USERADD_PARAM:${PN} = "--system nm-openvpn" + +FILES:${PN} += " \ + ${datadir}/dbus-1 \ + ${datadir}/metainfo \ + ${libdir}/NetworkManager/*.so \ + ${nonarch_libdir}/NetworkManager/VPN/nm-openvpn-service.name \ +" + +FILES:${PN}-staticdev += " \ + ${libdir}/NetworkManager/*.a \ +" + +RDEPENDS:${PN} = " \ + networkmanager \ + openvpn \ +" diff --git a/sources/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-libnm-systemd-core-Disable-sd_dhcp6_client_set_duid_.patch b/sources/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-libnm-systemd-core-Disable-sd_dhcp6_client_set_duid_.patch new file mode 100644 index 00000000..8e246efe --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-libnm-systemd-core-Disable-sd_dhcp6_client_set_duid_.patch @@ -0,0 +1,65 @@ +From 34d7a6c9919a73c2e716835000944c17438b2ca1 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 7 Jun 2024 14:03:15 -0700 +Subject: [PATCH] libnm-systemd-core: Disable sd_dhcp6_client_set_duid_uuid + function + +When building on musl systems ( with out systemd ), and using LLD linker +from LLVM project we fail to link with undefined symbols. + +This symbol is in sd_id128.c but its disabled, so let disable the functions +which need this function. + +| x86_64-yoe-linux-musl-ld.lld: error: undefined symbol: sd_id128_get_machine_app_specific +| >>> referenced by sd-dhcp-duid.c:202 (/usr/src/debug/networkmanager/1.48.0/../NetworkManager-1.48.0/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp-duid.c:202) +| >>> libnm-systemd-core.a.p/src_libsystemd-network_sd-dhcp-duid.c.o:(sd_dhcp_duid_set_uuid) in archive src/libnm-systemd-core/libnm-systemd-core.a +| x86_64-yoe-linux-musl-clang: error: linker command failed with exit code 1 (use -v to see invocation) + +Upstream-Status: Submitted [https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1966] +Signed-off-by: Khem Raj +--- + src/libnm-systemd-core/src/libsystemd-network/sd-dhcp-duid.c | 2 ++ + .../src/libsystemd-network/sd-dhcp6-client.c | 3 ++- + 2 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp-duid.c b/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp-duid.c +index e664a4a..7ba5020 100644 +--- a/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp-duid.c ++++ b/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp-duid.c +@@ -193,6 +193,7 @@ int sd_dhcp_duid_set_en(sd_dhcp_duid *duid) { + return 0; + } + ++#if 0 + int sd_dhcp_duid_set_uuid(sd_dhcp_duid *duid) { + sd_id128_t machine_id; + int r; +@@ -209,6 +210,7 @@ int sd_dhcp_duid_set_uuid(sd_dhcp_duid *duid) { + duid->size = offsetof(struct duid, uuid.uuid) + sizeof(machine_id); + return 0; + } ++#endif + + int dhcp_duid_to_string_internal(uint16_t type, const void *data, size_t data_size, char **ret) { + _cleanup_free_ char *p = NULL, *x = NULL; +diff --git a/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp6-client.c b/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp6-client.c +index 7c20116..08c1e96 100644 +--- a/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp6-client.c ++++ b/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp6-client.c +@@ -244,6 +244,7 @@ int sd_dhcp6_client_set_duid_en(sd_dhcp6_client *client) { + return 0; + } + ++#if 0 + int sd_dhcp6_client_set_duid_uuid(sd_dhcp6_client *client) { + int r; + +@@ -256,7 +257,7 @@ int sd_dhcp6_client_set_duid_uuid(sd_dhcp6_client *client) { + + return 0; + } +- ++#endif + int sd_dhcp6_client_set_duid_raw(sd_dhcp6_client *client, uint16_t duid_type, const uint8_t *duid, size_t duid_len) { + int r; + diff --git a/sources/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.46.0.bb b/sources/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.46.0.bb deleted file mode 100644 index 1b4003df..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.46.0.bb +++ /dev/null @@ -1,323 +0,0 @@ -SUMMARY = "NetworkManager is a program for providing detection and \ -configuration for systems to automatically connect to networks." - -DESCRIPTION = "NetworkManager is a program for providing detection and \ -configuration for systems to automatically connect to networks. \ -NetworkManager's functionality can be useful for both wireless and wired \ -networks. For wireless networks, NetworkManager prefers known wireless \ -networks and has the ability to switch to the most reliable network. \ -NetworkManager-aware applications can switch from online and offline mode. \ -NetworkManager also prefers wired connections over wireless ones, has support \ -for modem connections and certain types of VPN." - -HOMEPAGE = "https://wiki.gnome.org/Projects/NetworkManager" -SECTION = "net/misc" - -LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://COPYING.LGPL;md5=4fbd65380cdd255951079008b364516c \ -" - -DEPENDS = " \ - python3-pygobject-native \ - coreutils-native \ - intltool-native \ - libxslt-native \ - libnl \ - udev \ - util-linux \ - libndp \ - curl \ - dbus \ -" -DEPENDS:append:class-target = " bash-completion" - -inherit gnomebase gettext update-rc.d systemd gobject-introspection gtk-doc update-alternatives upstream-version-is-even - -SRC_URI = " \ - ${GNOME_MIRROR}/NetworkManager/${@gnome_verdir("${PV}")}/NetworkManager-${PV}.tar.xz \ - file://${BPN}.initd \ - file://enable-dhcpcd.conf \ - file://enable-iwd.conf \ -" -SRC_URI:append:libc-musl = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', ' file://0001-linker-scripts-Do-not-export-_IO_stdin_used.patch', '', d)}" - -SRC_URI[sha256sum] = "722649e25362693b334371473802a729b0ec9ee283375096905f868808e74068" - -S = "${WORKDIR}/NetworkManager-${PV}" - -# ['auto', 'symlink', 'file', 'netconfig', 'resolvconf'] -NETWORKMANAGER_DNS_RC_MANAGER_DEFAULT ??= "auto" - -# ['dhcpcanon', 'dhclient', 'dhcpcd', 'internal', 'nettools'] -NETWORKMANAGER_DHCP_DEFAULT ??= "internal" - -# The default gets detected based on whether /usr/sbin/nft or /usr/sbin/iptables is installed, with nftables preferred. -# ['', 'iptables', 'nftables'] -NETWORKMANAGER_FIREWALL_DEFAULT ??= "nftables" - -EXTRA_OEMESON = "\ - -Difcfg_rh=false \ - -Dtests=yes \ - -Dnmtui=true \ - -Dudev_dir=${nonarch_base_libdir}/udev \ - -Dlibpsl=false \ - -Dqt=false \ - -Dconfig_dns_rc_manager_default=${NETWORKMANAGER_DNS_RC_MANAGER_DEFAULT} \ - -Dconfig_dhcp_default=${NETWORKMANAGER_DHCP_DEFAULT} \ - -Ddhcpcanon=false \ - -Diptables=${sbindir}/iptables \ - -Dnft=${sbindir}/nft \ -" - -# stolen from https://github.com/void-linux/void-packages/blob/master/srcpkgs/NetworkManager/template -# avoids: -# | ../NetworkManager-1.16.0/libnm-core/nm-json.c:106:50: error: 'RTLD_DEEPBIND' undeclared (first use in this function); did you mean 'RTLD_DEFAULT'? -CFLAGS:append:libc-musl = " \ - -DRTLD_DEEPBIND=0 \ -" -do_configure:prepend() { - cp -f ${STAGING_LIBDIR}/girepository-1.0/GObject*typelib ${STAGING_LIBDIR_NATIVE}/girepository-1.0/ - cp -f ${STAGING_LIBDIR}/girepository-1.0/Gio*typelib ${STAGING_LIBDIR_NATIVE}/girepository-1.0/ - cp -f ${STAGING_LIBDIR}/girepository-1.0/GModule*typelib ${STAGING_LIBDIR_NATIVE}/girepository-1.0/ -} - -PACKAGECONFIG ??= "readline nss ifupdown dnsmasq nmcli vala \ - ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', bb.utils.contains('DISTRO_FEATURES', 'x11', 'consolekit', '', d), d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez5', '', d)} \ - ${@bb.utils.filter('DISTRO_FEATURES', 'wifi polkit ppp', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux audit', '', d)} \ -" - -inherit ${@bb.utils.contains('PACKAGECONFIG', 'vala', 'vala', '', d)} - -PACKAGECONFIG[systemd] = "\ - -Dsystemdsystemunitdir=${systemd_unitdir}/system -Dsession_tracking=systemd,\ - -Dsystemdsystemunitdir=no -Dsystemd_journal=false -Dsession_tracking=no\ -" -PACKAGECONFIG[polkit] = "-Dpolkit=true,-Dpolkit=false,polkit" -PACKAGECONFIG[bluez5] = "-Dbluez5_dun=true,-Dbluez5_dun=false,bluez5" -# consolekit is not picked by shlibs, so add it to RDEPENDS too -PACKAGECONFIG[consolekit] = "-Dsession_tracking_consolekit=true,-Dsession_tracking_consolekit=false,consolekit,consolekit" -PACKAGECONFIG[modemmanager] = "-Dmodem_manager=true,-Dmodem_manager=false,modemmanager mobile-broadband-provider-info" -PACKAGECONFIG[ppp] = "-Dppp=true -Dpppd=${sbindir}/pppd,-Dppp=false,ppp" -PACKAGECONFIG[dnsmasq] = "-Ddnsmasq=${bindir}/dnsmasq" -PACKAGECONFIG[nss] = "-Dcrypto=nss,,nss" -PACKAGECONFIG[resolvconf] = "-Dresolvconf=${base_sbindir}/resolvconf,-Dresolvconf=no,,resolvconf" -PACKAGECONFIG[gnutls] = "-Dcrypto=gnutls,,gnutls" -PACKAGECONFIG[crypto-null] = "-Dcrypto=null" -PACKAGECONFIG[wifi] = "-Dwext=true -Dwifi=true,-Dwext=false -Dwifi=false" -PACKAGECONFIG[iwd] = "-Diwd=true,-Diwd=false" -PACKAGECONFIG[ifupdown] = "-Difupdown=true,-Difupdown=false" -PACKAGECONFIG[cloud-setup] = "-Dnm_cloud_setup=true,-Dnm_cloud_setup=false" -PACKAGECONFIG[nmcli] = "-Dnmcli=true,-Dnmcli=false" -PACKAGECONFIG[nmtui] = "-Dnmtui=true,-Dnmtui=false,libnewt" -PACKAGECONFIG[readline] = "-Dreadline=libreadline,,readline" -PACKAGECONFIG[libedit] = "-Dreadline=libedit,,libedit" -PACKAGECONFIG[ovs] = "-Dovs=true,-Dovs=false,jansson" -PACKAGECONFIG[audit] = "-Dlibaudit=yes,-Dlibaudit=no" -PACKAGECONFIG[selinux] = "-Dselinux=true,-Dselinux=false,libselinux" -PACKAGECONFIG[vala] = "-Dvapi=true,-Dvapi=false" -PACKAGECONFIG[dhcpcd] = "-Ddhcpcd=${base_sbindir}/dhcpcd,-Ddhcpcd=no,,dhcpcd" -PACKAGECONFIG[dhclient] = "-Ddhclient=yes,-Ddhclient=no,,dhcp" -PACKAGECONFIG[concheck] = "-Dconcheck=true,-Dconcheck=false" -PACKAGECONFIG[adsl] = ",," -PACKAGECONFIG[wwan] = ",," -# The following PACKAGECONFIG is used to determine whether NM is managing /etc/resolv.conf itself or not -PACKAGECONFIG[man-resolv-conf] = ",," - - -PACKAGES =+ " \ - libnm \ - ${PN}-adsl \ - ${PN}-bluetooth \ - ${PN}-cloud-setup \ - ${PN}-nmcli \ - ${PN}-nmcli-bash-completion \ - ${PN}-nmtui \ - ${PN}-wifi \ - ${PN}-wwan \ - ${PN}-ovs \ - ${PN}-ppp \ - ${PN}-daemon \ -" - -SYSTEMD_PACKAGES = "${PN}-daemon ${PN}-cloud-setup" -INITSCRIPT_PACKAGES = "${PN}-daemon" - -NETWORKMANAGER_PLUGINDIR = "${libdir}/NetworkManager/${PV}" -NETWORKMANAGER_DISPATCHERDIR = "${nonarch_libdir}/NetworkManager/dispatcher.d" - - -SUMMARY:libnm = "Libraries for adding NetworkManager support to applications" -FILES:libnm = "\ - ${libdir}/libnm.so.* \ - ${libdir}/girepository-1.0/NM-1.0.typelib \ -" - -SUMMARY:${PN}-adsl = "ADSL device plugin for NetworkManager" -FILES:${PN}-adsl = "${NETWORKMANAGER_PLUGINDIR}/libnm-device-plugin-adsl.so" -RDEPENDS:${PN}-adsl += "${PN}-daemon" - -SUMMARY:${PN}-bluetooth = "Bluetooth device plugin for NetworkManager" -FILES:${PN}-bluetooth = "${NETWORKMANAGER_PLUGINDIR}/libnm-device-plugin-bluetooth.so" -RDEPENDS:${PN}-bluetooth += "${PN}-daemon ${@bb.utils.contains('PACKAGECONFIG', 'bluez5', '${PN}-wwan bluez5', '', d)}" - -SUMMARY:${PN}-cloud-setup = "Automatically configure NetworkManager in cloud" -FILES:${PN}-cloud-setup = " \ - ${libexecdir}/nm-cloud-setup \ - ${systemd_system_unitdir}/nm-cloud-setup.service \ - ${systemd_system_unitdir}/nm-cloud-setup.timer \ - ${libdir}/NetworkManager/dispatcher.d/90-nm-cloud-setup.sh \ - ${libdir}/NetworkManager/dispatcher.d/no-wait.d/90-nm-cloud-setup.sh \ -" -RDEPENDS:${PN}-cloud-setup += "${PN}-daemon" -ALLOW_EMPTY:${PN}-cloud-setup = "1" -SYSTEMD_SERVICE:${PN}-cloud-setup = "${@bb.utils.contains('PACKAGECONFIG', 'cloud-setup', 'nm-cloud-setup.service nm-cloud-setup.timer', '', d)}" - -SUMMARY:${PN}-nmcli = "NetworkManager command line client" -FILES:${PN}-nmcli = " \ - ${bindir}/nmcli \ -" -RDEPENDS:${PN}-nmcli += "${PN}-daemon" - -SUMMARY:${PN}-nmcli-bash-completion = "NetworkManager command line client bash completion" -FILES:${PN}-nmcli-bash-completion = "${datadir}/bash-completion/completions/nmcli" -RDEPENDS:${PN}-nmcli-bash-completion = "bash-completion" - -SUMMARY:${PN}-nmtui = "NetworkManager curses-based UI" -FILES:${PN}-nmtui = " \ - ${bindir}/nmtui \ - ${bindir}/nmtui-edit \ - ${bindir}/nmtui-connect \ - ${bindir}/nmtui-hostname \ -" -RDEPENDS:${PN}-nmtui += "${PN}-daemon" - -SUMMARY:${PN}-wifi = "Wifi plugin for NetworkManager" -FILES:${PN}-wifi = "\ - ${NETWORKMANAGER_PLUGINDIR}/libnm-device-plugin-wifi.so \ - ${libdir}/NetworkManager/conf.d/enable-iwd.conf \ -" -def get_wifi_deps(d): - packageconfig = (d.getVar('PACKAGECONFIG') or "").split() - if 'wifi' in packageconfig: - if 'iwd' in packageconfig: - return 'iwd' - else: - return 'wpa-supplicant' - else: - return '' -RDEPENDS:${PN}-wifi += "${PN}-daemon ${@get_wifi_deps(d)}" - -SUMMARY:${PN}-wwan = "Mobile broadband device plugin for NetworkManager" -FILES:${PN}-wwan = "\ - ${NETWORKMANAGER_PLUGINDIR}/libnm-device-plugin-wwan.so \ - ${NETWORKMANAGER_PLUGINDIR}/libnm-wwan.so \ -" -RDEPENDS:${PN}-wwan += "${PN}-daemon ${@bb.utils.contains('PACKAGECONFIG','modemmanager','modemmanager','',d)}" - -SUMMARY:${PN}-ovs = "Open vSwitch device plugin for NetworkManager" -FILES:${PN}-ovs = "\ - ${NETWORKMANAGER_PLUGINDIR}/libnm-device-plugin-ovs.so \ - ${systemd_system_unitdir}/NetworkManager.service.d/NetworkManager-ovs.conf \ -" -RDEPENDS:${PN}-ovs += "${PN}-daemon" - -SUMMARY:${PN}-ppp = "PPP plugin for NetworkManager" -FILES:${PN}-ppp = "\ - ${NETWORKMANAGER_PLUGINDIR}/libnm-ppp-plugin.so \ - ${libdir}/pppd/*/nm-pppd-plugin.so \ -" -RDEPENDS:${PN}-ppp += "${PN}-daemon ${@bb.utils.contains('PACKAGECONFIG','ppp','ppp','',d)}" - -FILES:${PN}-dev += " \ - ${libdir}/pppd/*/*.la \ - ${libdir}/NetworkManager/*.la \ - ${NETWORKMANAGER_PLUGINDIR}/*.la \ - ${datadir}/dbus-1/interfaces/*.xml \ -" - -SUMMARY:${PN}-daemon += "The NetworkManager daemon" -FILES:${PN}-daemon += " \ - ${bindir}/nm-online \ - ${datadir}/dbus-1 \ - ${datadir}/polkit-1 \ - ${libdir}/NetworkManager \ - ${libexecdir} \ - ${localstatedir}/lib/NetworkManager \ - ${NETWORKMANAGER_DISPATCHERDIR} \ - ${nonarch_base_libdir}/udev/* \ - ${nonarch_libdir}/firewalld \ - ${nonarch_libdir}/NetworkManager/conf.d \ - ${nonarch_libdir}/NetworkManager/dispatcher.d/no-wait.d \ - ${nonarch_libdir}/NetworkManager/dispatcher.d/pre-down.d \ - ${nonarch_libdir}/NetworkManager/dispatcher.d/pre-up.d \ - ${nonarch_libdir}/NetworkManager/system-connections \ - ${nonarch_libdir}/NetworkManager/VPN \ - ${sbindir}/NetworkManager \ - ${sysconfdir}/init.d/network-manager \ - ${sysconfdir}/NetworkManager \ - ${sysconfdir}/resolv-conf.NetworkManager \ - ${sysconfdir}/sysconfig/network-scripts \ - ${systemd_system_unitdir} \ -" -RDEPENDS:${PN}-daemon += "\ - ${@bb.utils.contains('PACKAGECONFIG', 'ifupdown', 'bash', '', d)} \ -" -RRECOMMENDS:${PN}-daemon += "\ - ${NETWORKMANAGER_FIREWALL_DEFAULT} \ - ${@bb.utils.filter('PACKAGECONFIG', 'dnsmasq', d)} \ -" -INITSCRIPT_NAME:${PN}-daemon = "network-manager" -SYSTEMD_SERVICE:${PN}-daemon = "\ - NetworkManager.service \ - NetworkManager-dispatcher.service \ -" -RCONFLICTS:${PN}-daemon += "connman" -ALTERNATIVE_PRIORITY = "100" -ALTERNATIVE:${PN}-daemon = "${@bb.utils.contains('PACKAGECONFIG','man-resolv-conf','resolv-conf','',d)}" -ALTERNATIVE_TARGET[resolv-conf] = "${@bb.utils.contains('PACKAGECONFIG','man-resolv-conf','${sysconfdir}/resolv-conf.NetworkManager','',d)}" -ALTERNATIVE_LINK_NAME[resolv-conf] = "${@bb.utils.contains('PACKAGECONFIG','man-resolv-conf','${sysconfdir}/resolv.conf','',d)}" - - -# The networkmanager package is an empty meta package which weakly depends on all the compiled features. -# Install this package to get all plugins and related dependencies installed. Alternatively just install -# plugins and related dependencies e.g. by installing networkmanager-wifi or networkmanager-wwan -# packages to the firmware. -ALLOW_EMPTY:${PN} = "1" -RRECOMMENDS:${PN} += "\ - ${@bb.utils.contains('PACKAGECONFIG','adsl','${PN}-adsl','',d)} \ - ${@bb.utils.contains('PACKAGECONFIG','bluez5','${PN}-bluetooth','',d)} \ - ${@bb.utils.contains('PACKAGECONFIG','cloud-setup','${PN}-cloud-setup','',d)} \ - ${@bb.utils.contains('PACKAGECONFIG','nmcli','${PN}-nmcli','',d)} \ - ${@bb.utils.contains('PACKAGECONFIG','nmtui','${PN}-nmtui','',d)} \ - ${@bb.utils.contains('PACKAGECONFIG','wifi','${PN}-wifi','',d)} \ - ${@bb.utils.contains('PACKAGECONFIG','wwan','${PN}-wwan','',d)} \ - ${@bb.utils.contains('PACKAGECONFIG','ovs','${PN}-ovs','',d)} \ - ${@bb.utils.contains('PACKAGECONFIG','ppp','${PN}-ppp','',d)} \ -" - -do_install:append() { - install -Dm 0755 ${WORKDIR}/${BPN}.initd ${D}${sysconfdir}/init.d/network-manager - - rm -rf ${D}/run ${D}${localstatedir}/run - - if ${@bb.utils.contains('PACKAGECONFIG','man-resolv-conf','true','false',d)}; then - # For read-only filesystem, do not create links during bootup - ln -sf ../run/NetworkManager/resolv.conf ${D}${sysconfdir}/resolv-conf.NetworkManager - - # systemd v210 and newer do not need this rule file - rm ${D}/${nonarch_base_libdir}/udev/rules.d/84-nm-drivers.rules - fi - - # Enable iwd if compiled - if ${@bb.utils.contains('PACKAGECONFIG','iwd','true','false',d)}; then - install -Dm 0644 ${WORKDIR}/enable-iwd.conf ${D}${nonarch_libdir}/NetworkManager/conf.d/enable-iwd.conf - fi - - # Enable dhcpd if compiled - if ${@bb.utils.contains('PACKAGECONFIG','dhcpcd','true','false',d)}; then - install -Dm 0644 ${WORKDIR}/enable-dhcpcd.conf ${D}${nonarch_libdir}/NetworkManager/conf.d/enable-dhcpcd.conf - fi -} diff --git a/sources/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.48.10.bb b/sources/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.48.10.bb new file mode 100644 index 00000000..a9b9233b --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.48.10.bb @@ -0,0 +1,326 @@ +SUMMARY = "NetworkManager is a program for providing detection and \ +configuration for systems to automatically connect to networks." + +DESCRIPTION = "NetworkManager is a program for providing detection and \ +configuration for systems to automatically connect to networks. \ +NetworkManager's functionality can be useful for both wireless and wired \ +networks. For wireless networks, NetworkManager prefers known wireless \ +networks and has the ability to switch to the most reliable network. \ +NetworkManager-aware applications can switch from online and offline mode. \ +NetworkManager also prefers wired connections over wireless ones, has support \ +for modem connections and certain types of VPN." + +HOMEPAGE = "https://wiki.gnome.org/Projects/NetworkManager" +SECTION = "net/misc" + +LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://COPYING.LGPL;md5=4fbd65380cdd255951079008b364516c \ +" + +DEPENDS = " \ + glib-2.0 \ + python3-pygobject-native \ + coreutils-native \ + intltool-native \ + libxslt-native \ + libnl \ + udev \ + util-linux \ + libndp \ + curl \ + dbus \ +" +DEPENDS:append:class-target = " bash-completion" + +inherit gnomebase gettext update-rc.d systemd gobject-introspection gtk-doc update-alternatives upstream-version-is-even + +SRC_URI = " \ + ${GNOME_MIRROR}/NetworkManager/${@gnome_verdir("${PV}")}/NetworkManager-${PV}.tar.xz \ + file://${BPN}.initd \ + file://enable-dhcpcd.conf \ + file://enable-iwd.conf \ + file://0001-libnm-systemd-core-Disable-sd_dhcp6_client_set_duid_.patch \ +" +SRC_URI:append:libc-musl = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', ' file://0001-linker-scripts-Do-not-export-_IO_stdin_used.patch', '', d)}" + +SRC_URI[sha256sum] = "5dc188fdffcf2d23c89d34b1e6319a6b20203e12eaec24b30037b7ea8ac8c613" + +S = "${WORKDIR}/NetworkManager-${PV}" + +# ['auto', 'symlink', 'file', 'netconfig', 'resolvconf'] +NETWORKMANAGER_DNS_RC_MANAGER_DEFAULT ??= "auto" + +# ['dhcpcanon', 'dhclient', 'dhcpcd', 'internal', 'nettools'] +NETWORKMANAGER_DHCP_DEFAULT ??= "internal" + +# The default gets detected based on whether /usr/sbin/nft or /usr/sbin/iptables is installed, with nftables preferred. +# ['', 'iptables', 'nftables'] +NETWORKMANAGER_FIREWALL_DEFAULT ??= "nftables" + +EXTRA_OEMESON = "\ + -Difcfg_rh=false \ + -Dtests=yes \ + -Dnmtui=true \ + -Dudev_dir=${nonarch_base_libdir}/udev \ + -Dlibpsl=false \ + -Dqt=false \ + -Dconfig_dns_rc_manager_default=${NETWORKMANAGER_DNS_RC_MANAGER_DEFAULT} \ + -Dconfig_dhcp_default=${NETWORKMANAGER_DHCP_DEFAULT} \ + -Ddhcpcanon=false \ + -Diptables=${sbindir}/iptables \ + -Dnft=${sbindir}/nft \ +" + +# stolen from https://github.com/void-linux/void-packages/blob/master/srcpkgs/NetworkManager/template +# avoids: +# | ../NetworkManager-1.16.0/libnm-core/nm-json.c:106:50: error: 'RTLD_DEEPBIND' undeclared (first use in this function); did you mean 'RTLD_DEFAULT'? +CFLAGS:append:libc-musl = " \ + -DRTLD_DEEPBIND=0 \ +" +do_configure:prepend() { + cp -f ${STAGING_LIBDIR}/girepository-1.0/GLib*typelib ${STAGING_LIBDIR_NATIVE}/girepository-1.0/ + cp -f ${STAGING_LIBDIR}/girepository-1.0/GObject*typelib ${STAGING_LIBDIR_NATIVE}/girepository-1.0/ + cp -f ${STAGING_LIBDIR}/girepository-1.0/Gio*typelib ${STAGING_LIBDIR_NATIVE}/girepository-1.0/ + cp -f ${STAGING_LIBDIR}/girepository-1.0/GModule*typelib ${STAGING_LIBDIR_NATIVE}/girepository-1.0/ +} + +PACKAGECONFIG ??= "readline nss ifupdown dnsmasq nmcli vala \ + ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', bb.utils.contains('DISTRO_FEATURES', 'x11', 'consolekit', '', d), d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez5', '', d)} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'wifi polkit ppp', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux audit', '', d)} \ +" + +inherit ${@bb.utils.contains('PACKAGECONFIG', 'vala', 'vala', '', d)} + +PACKAGECONFIG[systemd] = "\ + -Dsystemdsystemunitdir=${systemd_unitdir}/system -Dsession_tracking=systemd,\ + -Dsystemdsystemunitdir=no -Dsystemd_journal=false -Dsession_tracking=no\ +" +PACKAGECONFIG[polkit] = "-Dpolkit=true,-Dpolkit=false,polkit" +PACKAGECONFIG[bluez5] = "-Dbluez5_dun=true,-Dbluez5_dun=false,bluez5" +# consolekit is not picked by shlibs, so add it to RDEPENDS too +PACKAGECONFIG[consolekit] = "-Dsession_tracking_consolekit=true,-Dsession_tracking_consolekit=false,consolekit,consolekit" +PACKAGECONFIG[modemmanager] = "-Dmodem_manager=true,-Dmodem_manager=false,modemmanager mobile-broadband-provider-info" +PACKAGECONFIG[ppp] = "-Dppp=true -Dpppd=${sbindir}/pppd,-Dppp=false,ppp" +PACKAGECONFIG[dnsmasq] = "-Ddnsmasq=${bindir}/dnsmasq" +PACKAGECONFIG[nss] = "-Dcrypto=nss,,nss" +PACKAGECONFIG[resolvconf] = "-Dresolvconf=${base_sbindir}/resolvconf,-Dresolvconf=no,,resolvconf" +PACKAGECONFIG[gnutls] = "-Dcrypto=gnutls,,gnutls" +PACKAGECONFIG[crypto-null] = "-Dcrypto=null" +PACKAGECONFIG[wifi] = "-Dwext=true -Dwifi=true,-Dwext=false -Dwifi=false" +PACKAGECONFIG[iwd] = "-Diwd=true,-Diwd=false" +PACKAGECONFIG[ifupdown] = "-Difupdown=true,-Difupdown=false" +PACKAGECONFIG[cloud-setup] = "-Dnm_cloud_setup=true,-Dnm_cloud_setup=false" +PACKAGECONFIG[nmcli] = "-Dnmcli=true,-Dnmcli=false" +PACKAGECONFIG[nmtui] = "-Dnmtui=true,-Dnmtui=false,libnewt" +PACKAGECONFIG[readline] = "-Dreadline=libreadline,,readline" +PACKAGECONFIG[libedit] = "-Dreadline=libedit,,libedit" +PACKAGECONFIG[ovs] = "-Dovs=true,-Dovs=false,jansson" +PACKAGECONFIG[audit] = "-Dlibaudit=yes,-Dlibaudit=no" +PACKAGECONFIG[selinux] = "-Dselinux=true,-Dselinux=false,libselinux" +PACKAGECONFIG[vala] = "-Dvapi=true,-Dvapi=false" +PACKAGECONFIG[dhcpcd] = "-Ddhcpcd=${base_sbindir}/dhcpcd,-Ddhcpcd=no,,dhcpcd" +PACKAGECONFIG[dhclient] = "-Ddhclient=yes,-Ddhclient=no,,dhcp" +PACKAGECONFIG[concheck] = "-Dconcheck=true,-Dconcheck=false" +PACKAGECONFIG[adsl] = ",," +PACKAGECONFIG[wwan] = ",," +# The following PACKAGECONFIG is used to determine whether NM is managing /etc/resolv.conf itself or not +PACKAGECONFIG[man-resolv-conf] = ",," + + +PACKAGES =+ " \ + libnm \ + ${PN}-adsl \ + ${PN}-bluetooth \ + ${PN}-cloud-setup \ + ${PN}-nmcli \ + ${PN}-nmcli-bash-completion \ + ${PN}-nmtui \ + ${PN}-wifi \ + ${PN}-wwan \ + ${PN}-ovs \ + ${PN}-ppp \ + ${PN}-daemon \ +" + +SYSTEMD_PACKAGES = "${PN}-daemon ${PN}-cloud-setup" +INITSCRIPT_PACKAGES = "${PN}-daemon" + +NETWORKMANAGER_PLUGINDIR = "${libdir}/NetworkManager/${PV}" +NETWORKMANAGER_DISPATCHERDIR = "${nonarch_libdir}/NetworkManager/dispatcher.d" + + +SUMMARY:libnm = "Libraries for adding NetworkManager support to applications" +FILES:libnm = "\ + ${libdir}/libnm.so.* \ + ${libdir}/girepository-1.0/NM-1.0.typelib \ +" + +SUMMARY:${PN}-adsl = "ADSL device plugin for NetworkManager" +FILES:${PN}-adsl = "${NETWORKMANAGER_PLUGINDIR}/libnm-device-plugin-adsl.so" +RDEPENDS:${PN}-adsl += "${PN}-daemon" + +SUMMARY:${PN}-bluetooth = "Bluetooth device plugin for NetworkManager" +FILES:${PN}-bluetooth = "${NETWORKMANAGER_PLUGINDIR}/libnm-device-plugin-bluetooth.so" +RDEPENDS:${PN}-bluetooth += "${PN}-daemon ${@bb.utils.contains('PACKAGECONFIG', 'bluez5', '${PN}-wwan bluez5', '', d)}" + +SUMMARY:${PN}-cloud-setup = "Automatically configure NetworkManager in cloud" +FILES:${PN}-cloud-setup = " \ + ${libexecdir}/nm-cloud-setup \ + ${systemd_system_unitdir}/nm-cloud-setup.service \ + ${systemd_system_unitdir}/nm-cloud-setup.timer \ + ${libdir}/NetworkManager/dispatcher.d/90-nm-cloud-setup.sh \ + ${libdir}/NetworkManager/dispatcher.d/no-wait.d/90-nm-cloud-setup.sh \ +" +RDEPENDS:${PN}-cloud-setup += "${PN}-daemon" +ALLOW_EMPTY:${PN}-cloud-setup = "1" +SYSTEMD_SERVICE:${PN}-cloud-setup = "${@bb.utils.contains('PACKAGECONFIG', 'cloud-setup', 'nm-cloud-setup.service nm-cloud-setup.timer', '', d)}" + +SUMMARY:${PN}-nmcli = "NetworkManager command line client" +FILES:${PN}-nmcli = " \ + ${bindir}/nmcli \ +" +RDEPENDS:${PN}-nmcli += "${PN}-daemon" + +SUMMARY:${PN}-nmcli-bash-completion = "NetworkManager command line client bash completion" +FILES:${PN}-nmcli-bash-completion = "${datadir}/bash-completion/completions/nmcli" +RDEPENDS:${PN}-nmcli-bash-completion = "bash-completion" + +SUMMARY:${PN}-nmtui = "NetworkManager curses-based UI" +FILES:${PN}-nmtui = " \ + ${bindir}/nmtui \ + ${bindir}/nmtui-edit \ + ${bindir}/nmtui-connect \ + ${bindir}/nmtui-hostname \ +" +RDEPENDS:${PN}-nmtui += "${PN}-daemon" + +SUMMARY:${PN}-wifi = "Wifi plugin for NetworkManager" +FILES:${PN}-wifi = "\ + ${NETWORKMANAGER_PLUGINDIR}/libnm-device-plugin-wifi.so \ + ${libdir}/NetworkManager/conf.d/enable-iwd.conf \ +" +def get_wifi_deps(d): + packageconfig = (d.getVar('PACKAGECONFIG') or "").split() + if 'wifi' in packageconfig: + if 'iwd' in packageconfig: + return 'iwd' + else: + return 'wpa-supplicant' + else: + return '' +RDEPENDS:${PN}-wifi += "${PN}-daemon ${@get_wifi_deps(d)}" + +SUMMARY:${PN}-wwan = "Mobile broadband device plugin for NetworkManager" +FILES:${PN}-wwan = "\ + ${NETWORKMANAGER_PLUGINDIR}/libnm-device-plugin-wwan.so \ + ${NETWORKMANAGER_PLUGINDIR}/libnm-wwan.so \ +" +RDEPENDS:${PN}-wwan += "${PN}-daemon ${@bb.utils.contains('PACKAGECONFIG','modemmanager','modemmanager','',d)}" + +SUMMARY:${PN}-ovs = "Open vSwitch device plugin for NetworkManager" +FILES:${PN}-ovs = "\ + ${NETWORKMANAGER_PLUGINDIR}/libnm-device-plugin-ovs.so \ + ${systemd_system_unitdir}/NetworkManager.service.d/NetworkManager-ovs.conf \ +" +RDEPENDS:${PN}-ovs += "${PN}-daemon" + +SUMMARY:${PN}-ppp = "PPP plugin for NetworkManager" +FILES:${PN}-ppp = "\ + ${NETWORKMANAGER_PLUGINDIR}/libnm-ppp-plugin.so \ + ${libdir}/pppd/*/nm-pppd-plugin.so \ +" +RDEPENDS:${PN}-ppp += "${PN}-daemon ${@bb.utils.contains('PACKAGECONFIG','ppp','ppp','',d)}" + +FILES:${PN}-dev += " \ + ${libdir}/pppd/*/*.la \ + ${libdir}/NetworkManager/*.la \ + ${NETWORKMANAGER_PLUGINDIR}/*.la \ + ${datadir}/dbus-1/interfaces/*.xml \ +" + +SUMMARY:${PN}-daemon += "The NetworkManager daemon" +FILES:${PN}-daemon += " \ + ${bindir}/nm-online \ + ${datadir}/dbus-1 \ + ${datadir}/polkit-1 \ + ${libdir}/NetworkManager \ + ${libexecdir} \ + ${localstatedir}/lib/NetworkManager \ + ${NETWORKMANAGER_DISPATCHERDIR} \ + ${nonarch_base_libdir}/udev/* \ + ${nonarch_libdir}/firewalld \ + ${nonarch_libdir}/NetworkManager/conf.d \ + ${nonarch_libdir}/NetworkManager/dispatcher.d/no-wait.d \ + ${nonarch_libdir}/NetworkManager/dispatcher.d/pre-down.d \ + ${nonarch_libdir}/NetworkManager/dispatcher.d/pre-up.d \ + ${nonarch_libdir}/NetworkManager/system-connections \ + ${nonarch_libdir}/NetworkManager/VPN \ + ${sbindir}/NetworkManager \ + ${sysconfdir}/init.d/network-manager \ + ${sysconfdir}/NetworkManager \ + ${sysconfdir}/resolv-conf.NetworkManager \ + ${sysconfdir}/sysconfig/network-scripts \ + ${systemd_system_unitdir} \ +" +RDEPENDS:${PN}-daemon += "\ + ${@bb.utils.contains('PACKAGECONFIG', 'ifupdown', 'bash', '', d)} \ +" +RRECOMMENDS:${PN}-daemon += "\ + ${NETWORKMANAGER_FIREWALL_DEFAULT} \ + ${@bb.utils.filter('PACKAGECONFIG', 'dnsmasq', d)} \ +" +INITSCRIPT_NAME:${PN}-daemon = "network-manager" +SYSTEMD_SERVICE:${PN}-daemon = "\ + NetworkManager.service \ + NetworkManager-dispatcher.service \ +" +RCONFLICTS:${PN}-daemon += "connman" +ALTERNATIVE_PRIORITY = "100" +ALTERNATIVE:${PN}-daemon = "${@bb.utils.contains('PACKAGECONFIG','man-resolv-conf','resolv-conf','',d)}" +ALTERNATIVE_TARGET[resolv-conf] = "${@bb.utils.contains('PACKAGECONFIG','man-resolv-conf','${sysconfdir}/resolv-conf.NetworkManager','',d)}" +ALTERNATIVE_LINK_NAME[resolv-conf] = "${@bb.utils.contains('PACKAGECONFIG','man-resolv-conf','${sysconfdir}/resolv.conf','',d)}" + + +# The networkmanager package is an empty meta package which weakly depends on all the compiled features. +# Install this package to get all plugins and related dependencies installed. Alternatively just install +# plugins and related dependencies e.g. by installing networkmanager-wifi or networkmanager-wwan +# packages to the firmware. +ALLOW_EMPTY:${PN} = "1" +RRECOMMENDS:${PN} += "\ + ${@bb.utils.contains('PACKAGECONFIG','adsl','${PN}-adsl','',d)} \ + ${@bb.utils.contains('PACKAGECONFIG','bluez5','${PN}-bluetooth','',d)} \ + ${@bb.utils.contains('PACKAGECONFIG','cloud-setup','${PN}-cloud-setup','',d)} \ + ${@bb.utils.contains('PACKAGECONFIG','nmcli','${PN}-nmcli','',d)} \ + ${@bb.utils.contains('PACKAGECONFIG','nmtui','${PN}-nmtui','',d)} \ + ${@bb.utils.contains('PACKAGECONFIG','wifi','${PN}-wifi','',d)} \ + ${@bb.utils.contains('PACKAGECONFIG','wwan','${PN}-wwan','',d)} \ + ${@bb.utils.contains('PACKAGECONFIG','ovs','${PN}-ovs','',d)} \ + ${@bb.utils.contains('PACKAGECONFIG','ppp','${PN}-ppp','',d)} \ +" + +do_install:append() { + install -Dm 0755 ${UNPACKDIR}/${BPN}.initd ${D}${sysconfdir}/init.d/network-manager + + rm -rf ${D}/run ${D}${localstatedir}/run + + if ${@bb.utils.contains('PACKAGECONFIG','man-resolv-conf','true','false',d)}; then + # For read-only filesystem, do not create links during bootup + ln -sf ../run/NetworkManager/resolv.conf ${D}${sysconfdir}/resolv-conf.NetworkManager + + # systemd v210 and newer do not need this rule file + rm ${D}/${nonarch_base_libdir}/udev/rules.d/84-nm-drivers.rules + fi + + # Enable iwd if compiled + if ${@bb.utils.contains('PACKAGECONFIG','iwd','true','false',d)}; then + install -Dm 0644 ${UNPACKDIR}/enable-iwd.conf ${D}${nonarch_libdir}/NetworkManager/conf.d/enable-iwd.conf + fi + + # Enable dhcpd if compiled + if ${@bb.utils.contains('PACKAGECONFIG','dhcpcd','true','false',d)}; then + install -Dm 0644 ${UNPACKDIR}/enable-dhcpcd.conf ${D}${nonarch_libdir}/NetworkManager/conf.d/enable-dhcpcd.conf + fi +} diff --git a/sources/meta-openembedded/meta-networking/recipes-connectivity/openfortivpn/openfortivpn_1.22.0.bb b/sources/meta-openembedded/meta-networking/recipes-connectivity/openfortivpn/openfortivpn_1.22.0.bb deleted file mode 100644 index 568593b2..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-connectivity/openfortivpn/openfortivpn_1.22.0.bb +++ /dev/null @@ -1,26 +0,0 @@ -SUMMARY = "Client for PPP+SSL VPN tunnel services" -LICENSE = "GPL-3.0-or-later" -LIC_FILES_CHKSUM = "file://LICENSE;md5=3d575262a651a6f1a17210ce41bf907d" - -SRC_URI = "git://github.com/adrienverge/openfortivpn.git;protocol=https;branch=master" -SRCREV = "82e4401162fc65efad8267f4cb3287c6ab6fc088" - -DEPENDS = "openssl" - -PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" - -PACKAGECONFIG[resolvconf] = "--with-resolvconf=${base_sbindir}/resolvconf --enable-resolvconf,--with-resolvconf=DISABLED,," -PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_system_unitdir},--without-systemdsystemunitdir,," - -S = "${WORKDIR}/git" - -inherit autotools pkgconfig systemd - -EXTRA_OECONF = " \ - --with-pppd=${sbindir}/pppd \ - --disable-proc \ -" - -SYSTEMD_SERVICE:${PN} = "openfortivpn@.service" - -RDEPENDS:${PN} = "ppp" diff --git a/sources/meta-openembedded/meta-networking/recipes-connectivity/openfortivpn/openfortivpn_1.22.1.bb b/sources/meta-openembedded/meta-networking/recipes-connectivity/openfortivpn/openfortivpn_1.22.1.bb new file mode 100644 index 00000000..b69a7e23 --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-connectivity/openfortivpn/openfortivpn_1.22.1.bb @@ -0,0 +1,26 @@ +SUMMARY = "Client for PPP+SSL VPN tunnel services" +LICENSE = "GPL-3.0-or-later" +LIC_FILES_CHKSUM = "file://LICENSE;md5=3d575262a651a6f1a17210ce41bf907d" + +SRC_URI = "git://github.com/adrienverge/openfortivpn.git;protocol=https;branch=master" +SRCREV = "388fa98f639ef91733461de50b06dd57f1ffb099" + +DEPENDS = "openssl" + +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" + +PACKAGECONFIG[resolvconf] = "--with-resolvconf=${base_sbindir}/resolvconf --enable-resolvconf,--with-resolvconf=DISABLED,," +PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_system_unitdir},--without-systemdsystemunitdir,," + +S = "${WORKDIR}/git" + +inherit autotools pkgconfig systemd + +EXTRA_OECONF = " \ + --with-pppd=${sbindir}/pppd \ + --disable-proc \ +" + +SYSTEMD_SERVICE:${PN} = "openfortivpn@.service" + +RDEPENDS:${PN} = "ppp" diff --git a/sources/meta-openembedded/meta-networking/recipes-connectivity/openthread/ot-br-posix_git.bb b/sources/meta-openembedded/meta-networking/recipes-connectivity/openthread/ot-br-posix_git.bb index d7be1cd7..ec930de2 100644 --- a/sources/meta-openembedded/meta-networking/recipes-connectivity/openthread/ot-br-posix_git.bb +++ b/sources/meta-openembedded/meta-networking/recipes-connectivity/openthread/ot-br-posix_git.bb @@ -29,11 +29,15 @@ inherit pkgconfig cmake systemd # for (uint8_t i = 0;; i++) CXXFLAGS:append:libc-musl:toolchain-clang = " -Wno-error=sign-compare -Wno-error=unused-but-set-variable" +LDFLAGS:append:riscv32 = " -latomic" + EXTRA_OECMAKE = "-DBUILD_TESTING=OFF \ -DOTBR_DBUS=ON \ -DOTBR_REST=ON \ -DOTBR_WEB=OFF \ -DCMAKE_LIBRARY_PATH=${libdir} \ + -DOT_POSIX_PRODUCT_CONFIG=${sysconfdir}/openthread.conf.example \ + -DOT_POSIX_FACTORY_CONFIG=${sysconfdir}/openthread.conf.example \ -DOTBR_MDNS=avahi \ -DOTBR_BACKBONE_ROUTER=ON \ -DOTBR_BORDER_ROUTING=ON \ @@ -63,3 +67,7 @@ RCONFLICTS:${PN} = "ot-daemon" FILES:${PN} += "${systemd_unitdir}/*" FILES:${PN} += "${datadir}/*" + +# http://errors.yoctoproject.org/Errors/Details/766903/ +# git/third_party/openthread/repo/src/core/border_router/routing_manager.hpp:615:11: error: 'ot::BorderRouter::RoutingManager::DiscoveredPrefixTable' declared with greater visibility than the type of its field 'ot::BorderRouter::RoutingManager::DiscoveredPrefixTable::mEntryTimer' [-Werror=attributes] +CXXFLAGS += "-Wno-error=attributes" diff --git a/sources/meta-openembedded/meta-networking/recipes-connectivity/samba/samba_4.19.8.bb b/sources/meta-openembedded/meta-networking/recipes-connectivity/samba/samba_4.19.8.bb index 429f983c..09d5608d 100644 --- a/sources/meta-openembedded/meta-networking/recipes-connectivity/samba/samba_4.19.8.bb +++ b/sources/meta-openembedded/meta-networking/recipes-connectivity/samba/samba_4.19.8.bb @@ -173,8 +173,8 @@ do_install:append() { install -d ${D}${sysconfdir}/samba echo "127.0.0.1 localhost" > ${D}${sysconfdir}/samba/lmhosts - install -m644 ${WORKDIR}/smb.conf ${D}${sysconfdir}/samba/smb.conf - install -D -m 644 ${WORKDIR}/volatiles.03_samba ${D}${sysconfdir}/default/volatiles/03_samba + install -m644 ${UNPACKDIR}/smb.conf ${D}${sysconfdir}/samba/smb.conf + install -D -m 644 ${UNPACKDIR}/volatiles.03_samba ${D}${sysconfdir}/default/volatiles/03_samba install -d ${D}${sysconfdir}/default install -m644 packaging/systemd/samba.sysconfig ${D}${sysconfdir}/default/samba diff --git a/sources/meta-openembedded/meta-networking/recipes-connectivity/snort/snort3/0001-cmake-Pass-noline-flag-to-flex.patch b/sources/meta-openembedded/meta-networking/recipes-connectivity/snort/snort3/0001-cmake-Pass-noline-flag-to-flex.patch index ec7b90cf..626f4127 100644 --- a/sources/meta-openembedded/meta-networking/recipes-connectivity/snort/snort3/0001-cmake-Pass-noline-flag-to-flex.patch +++ b/sources/meta-openembedded/meta-networking/recipes-connectivity/snort/snort3/0001-cmake-Pass-noline-flag-to-flex.patch @@ -8,6 +8,7 @@ could be absolute build paths, since these files end up in dbg packages this can be flagged as a build/packaging warning. Upstream-Status: Pending + Signed-off-by: Khem Raj --- cmake/configure_options.cmake | 2 +- diff --git a/sources/meta-openembedded/meta-networking/recipes-connectivity/snort/snort3_3.1.84.0.bb b/sources/meta-openembedded/meta-networking/recipes-connectivity/snort/snort3_3.1.84.0.bb deleted file mode 100644 index ee84aa17..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-connectivity/snort/snort3_3.1.84.0.bb +++ /dev/null @@ -1,38 +0,0 @@ -SUMMARY = "snort3" -DESCRIPTION = "snort3 - a free lightweight network intrusion detection system for UNIX and Windows." -HOMEPAGE = "http://www.snort.org/" -SECTION = "net" -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=78fa8ef966b48fbf9095e13cc92377c5" - -DEPENDS = "flex-native hwloc libdaq libdnet libpcap libpcre libtirpc libunwind luajit zlib" - -SRC_URI = "git://github.com/snort3/snort3.git;protocol=https;branch=master \ - file://0001-cmake-Check-for-HP-libunwind.patch \ - file://0001-cmake-Pass-noline-flag-to-flex.patch" -SRCREV = "e7312efd840d66a52a2019abe1db7cc89ca0f39a" - -S = "${WORKDIR}/git" - -PACKAGES =+ "${PN}-scripts" - -inherit cmake pkgconfig - -do_install:append() { - sed -i "s#${RECIPE_SYSROOT_NATIVE}##g; s#${RECIPE_SYSROOT}##g" ${D}${libdir}/pkgconfig/snort.pc -} - -FILES:${PN} += "${libdir}/snort/daq/*.so" - -FILES:${PN}-scripts = "${bindir}/appid_detector_builder.sh" - -RDEPENDS:${PN}-scripts += "bash" - -# mips64/ppc/ppc64/riscv64/riscv32 is not supported in this release -COMPATIBLE_HOST:mipsarchn32 = "null" -COMPATIBLE_HOST:mipsarchn64 = "null" -COMPATIBLE_HOST:powerpc = "null" -COMPATIBLE_HOST:powerpc64 = "null" -COMPATIBLE_HOST:powerpc64le = "null" -COMPATIBLE_HOST:riscv64 = "null" -COMPATIBLE_HOST:riscv32 = "null" diff --git a/sources/meta-openembedded/meta-networking/recipes-connectivity/snort/snort3_3.3.4.0.bb b/sources/meta-openembedded/meta-networking/recipes-connectivity/snort/snort3_3.3.4.0.bb new file mode 100644 index 00000000..0f3d0e98 --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-connectivity/snort/snort3_3.3.4.0.bb @@ -0,0 +1,39 @@ +SUMMARY = "snort3" +DESCRIPTION = "snort3 - a free lightweight network intrusion detection system for UNIX and Windows." +HOMEPAGE = "http://www.snort.org/" +SECTION = "net" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=78fa8ef966b48fbf9095e13cc92377c5" + +DEPENDS = "flex-native hwloc libdaq libdnet libpcap libpcre libtirpc libunwind luajit zlib" + +SRC_URI = "git://github.com/snort3/snort3.git;protocol=https;branch=master \ + file://0001-cmake-Check-for-HP-libunwind.patch \ + file://0001-cmake-Pass-noline-flag-to-flex.patch" + +SRCREV = "5598e8dd87829cb1bbb478a7b6d4f6fb8b5dabfe" + +S = "${WORKDIR}/git" + +PACKAGES =+ "${PN}-scripts" + +inherit cmake pkgconfig + +do_install:append() { + sed -i "s#${RECIPE_SYSROOT_NATIVE}##g; s#${RECIPE_SYSROOT}##g" ${D}${libdir}/pkgconfig/snort.pc +} + +FILES:${PN} += "${libdir}/snort/daq/*.so" + +FILES:${PN}-scripts = "${bindir}/appid_detector_builder.sh" + +RDEPENDS:${PN}-scripts += "bash" + +# mips64/ppc/ppc64/riscv64/riscv32 is not supported in this release +COMPATIBLE_HOST:mipsarchn32 = "null" +COMPATIBLE_HOST:mipsarchn64 = "null" +COMPATIBLE_HOST:powerpc = "null" +COMPATIBLE_HOST:powerpc64 = "null" +COMPATIBLE_HOST:powerpc64le = "null" +COMPATIBLE_HOST:riscv64 = "null" +COMPATIBLE_HOST:riscv32 = "null" diff --git a/sources/meta-openembedded/meta-networking/recipes-connectivity/snort/snort_2.9.20.bb b/sources/meta-openembedded/meta-networking/recipes-connectivity/snort/snort_2.9.20.bb index 8b9092b4..9bc14fc5 100644 --- a/sources/meta-openembedded/meta-networking/recipes-connectivity/snort/snort_2.9.20.bb +++ b/sources/meta-openembedded/meta-networking/recipes-connectivity/snort/snort_2.9.20.bb @@ -76,18 +76,18 @@ do_install:append() { cp ${S}/preproc_rules/*.rules ${D}${sysconfdir}/snort/preproc_rules/ if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then - install -m 755 ${WORKDIR}/snort.init ${D}${sysconfdir}/init.d/snort + install -m 755 ${UNPACKDIR}/snort.init ${D}${sysconfdir}/init.d/snort fi if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then install -d ${D}/${systemd_system_unitdir} - install -m 644 ${WORKDIR}/snort.service ${D}/${systemd_system_unitdir} + install -m 644 ${UNPACKDIR}/snort.service ${D}/${systemd_system_unitdir} # Install default environment file install -d ${D}/${sysconfdir}/default - install -m 0644 ${WORKDIR}/snort.default ${D}${sysconfdir}/default/snort + install -m 0644 ${UNPACKDIR}/snort.default ${D}${sysconfdir}/default/snort fi install -d ${D}${sysconfdir}/default/volatiles - install -m 0644 ${WORKDIR}/volatiles.99_snort ${D}${sysconfdir}/default/volatiles/99_snort + install -m 0644 ${UNPACKDIR}/volatiles.99_snort ${D}${sysconfdir}/default/volatiles/99_snort sed -i -e 's|-ffile-prefix-map[^ ]*||g; s|-fdebug-prefix-map[^ ]*||g; s|-fmacro-prefix-map[^ ]*||g; s|${STAGING_DIR_TARGET}||g' ${D}${libdir}/pkgconfig/*.pc } diff --git a/sources/meta-openembedded/meta-networking/recipes-connectivity/tayga/tayga_0.9.2.bb b/sources/meta-openembedded/meta-networking/recipes-connectivity/tayga/tayga_0.9.2.bb index 40dbccb8..f36435c8 100644 --- a/sources/meta-openembedded/meta-networking/recipes-connectivity/tayga/tayga_0.9.2.bb +++ b/sources/meta-openembedded/meta-networking/recipes-connectivity/tayga/tayga_0.9.2.bb @@ -15,9 +15,9 @@ SYSTEMD_SERVICE:${PN} = "tayga.service" EXTRA_OEMAKE += "CFLAGS='${CFLAGS}'" do_install:append() { - install -m 0644 ${WORKDIR}/tayga.conf ${D}${sysconfdir}/tayga.conf + install -m 0644 ${UNPACKDIR}/tayga.conf ${D}${sysconfdir}/tayga.conf install -d ${D}${systemd_unitdir}/system/ - install -m 0644 ${WORKDIR}/tayga.service ${D}${systemd_unitdir}/system/ + install -m 0644 ${UNPACKDIR}/tayga.service ${D}${systemd_unitdir}/system/ } inherit autotools systemd diff --git a/sources/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc_0.5.3.bb b/sources/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc_0.5.3.bb index fe9c038f..5876b582 100644 --- a/sources/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc_0.5.3.bb +++ b/sources/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc_0.5.3.bb @@ -38,14 +38,14 @@ inherit perlnative pkgconfig do_configure:append () { # Make sure we use our nativeperl wrapper sed -i "1s:#!.*:#!/usr/bin/env nativeperl:" ${S}/*.pl - cp ${WORKDIR}/long-help ${S} + cp ${UNPACKDIR}/long-help ${S} } do_install () { sed -i s:m600:m\ 600:g Makefile oe_runmake 'DESTDIR=${D}' 'PREFIX=/usr' install rm -f ${D}${sysconfdir}/vpnc/vpnc.conf #This file is useless - install ${WORKDIR}/default.conf ${D}${sysconfdir}/vpnc/default.conf + install ${UNPACKDIR}/default.conf ${D}${sysconfdir}/vpnc/default.conf } SYSROOT_PREPROCESS_FUNCS += "vpnc_sysroot_preprocess" diff --git a/sources/meta-openembedded/meta-networking/recipes-connectivity/wolfssl/files/run-ptest b/sources/meta-openembedded/meta-networking/recipes-connectivity/wolfssl/files/run-ptest deleted file mode 100644 index ff66f4ef..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-connectivity/wolfssl/files/run-ptest +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh - -echo "############ Running Wolfssl Ptest ##########" - -log_file=ptest.log -temp_dir=$(mktemp -d /tmp/wolfss_temp.XXXXXX) -echo "Wolfssl ptest logs are stored in ${temp_dir}/${log_file}" - -./test/unit.test > "$temp_dir/$log_file" 2>&1 - -echo "Test script returned: $?" - -MAGIC_SENTENCE=$(grep "unit_test: Success for all configured tests." $temp_dir/$log_file) - -if [ -n "$MAGIC_SENTENCE" ]; then - echo "$MAGIC_SENTENCE" - echo "PASS: Wolfssl" -else - echo "#### Issue with at least one test !####" - echo "FAIL: Wolfssl" -fi -NUM_FAILS=$(grep -c "Failed" $temp_dir/$log_file) - -exit $NUM_FAILS diff --git a/sources/meta-openembedded/meta-networking/recipes-connectivity/wolfssl/wolfssl_5.7.2.bb b/sources/meta-openembedded/meta-networking/recipes-connectivity/wolfssl/wolfssl_5.7.2.bb index 8f484d60..009434d9 100644 --- a/sources/meta-openembedded/meta-networking/recipes-connectivity/wolfssl/wolfssl_5.7.2.bb +++ b/sources/meta-openembedded/meta-networking/recipes-connectivity/wolfssl/wolfssl_5.7.2.bb @@ -12,33 +12,14 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" PROVIDES += "cyassl" RPROVIDES:${PN} = "cyassl" -SRC_URI = " \ - git://github.com/wolfSSL/wolfssl.git;protocol=https;branch=master \ - file://run-ptest \ -" +SRC_URI = "git://github.com/wolfSSL/wolfssl.git;protocol=https;branch=master" SRCREV = "00e42151ca061463ba6a95adb2290f678cbca472" S = "${WORKDIR}/git" -inherit autotools ptest +inherit autotools PACKAGECONFIG ?= "reproducible-build" PACKAGECONFIG[reproducible-build] = "--enable-reproducible-build,--disable-reproducible-build," BBCLASSEXTEND += "native nativesdk" - -RDEPENDS:${PN}-ptest += " bash" - -do_install_ptest() { - # Prevent QA Error "package contains reference to TMPDIR [buildpaths]" for unit.test script - # Replace the occurences of ${B}/src with '${PTEST_PATH}' - sed -i 's|${B}/src|${PTEST_PATH}|g' ${B}/tests/unit.test - - install -d ${D}${PTEST_PATH}/test - - # create an empty folder examples, needed in wolfssl's tests/api.c to "Test loading path with no files" - install -d ${D}${PTEST_PATH}/examples - cp -rf ${B}/tests/. ${D}${PTEST_PATH}/test - cp -rf ${S}/certs ${D}${PTEST_PATH} - cp -rf ${S}/tests ${D}${PTEST_PATH} -} diff --git a/sources/meta-openembedded/meta-networking/recipes-core/images/meta-networking-image-ptest.bb b/sources/meta-openembedded/meta-networking/recipes-core/images/meta-networking-image-ptest.bb index b6238d61..295da982 100644 --- a/sources/meta-openembedded/meta-networking/recipes-core/images/meta-networking-image-ptest.bb +++ b/sources/meta-openembedded/meta-networking/recipes-core/images/meta-networking-image-ptest.bb @@ -20,7 +20,6 @@ BBCLASSEXTEND = "${@' '.join(['mcextend:'+x for x in d.getVar('PTESTS_META_NETWO # box) and explicitly add up to 1500MB. IMAGE_OVERHEAD_FACTOR = "1.0" IMAGE_ROOTFS_EXTRA_SPACE = "324288" -IMAGE_ROOTFS_EXTRA_SPACE:virtclass-mcextend-wolfssl = "714288" # If a particular ptest needs more space, it can be customized: #IMAGE_ROOTFS_EXTRA_SPACE:virtclass-mcextend- = "1024288" diff --git a/sources/meta-openembedded/meta-networking/recipes-core/packagegroups/packagegroup-meta-networking.bb b/sources/meta-openembedded/meta-networking/recipes-core/packagegroups/packagegroup-meta-networking.bb index 2e3aa544..1fa95dcc 100644 --- a/sources/meta-openembedded/meta-networking/recipes-core/packagegroups/packagegroup-meta-networking.bb +++ b/sources/meta-openembedded/meta-networking/recipes-core/packagegroups/packagegroup-meta-networking.bb @@ -236,6 +236,7 @@ RDEPENDS:packagegroup-meta-networking-support = "\ rdma-core \ tcpreplay \ tinyproxy \ + udpcast \ uftp \ unbound \ vnstat \ diff --git a/sources/meta-openembedded/meta-networking/recipes-daemons/atftp/atftp_0.8.0.bb b/sources/meta-openembedded/meta-networking/recipes-daemons/atftp/atftp_0.8.0.bb index 50762179..41b7cf08 100644 --- a/sources/meta-openembedded/meta-networking/recipes-daemons/atftp/atftp_0.8.0.bb +++ b/sources/meta-openembedded/meta-networking/recipes-daemons/atftp/atftp_0.8.0.bb @@ -29,14 +29,14 @@ EXTRA_OEMAKE = "CFLAGS='${CFLAGS} -std=gnu89'" do_install:append() { install -d ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/atftpd.init ${D}${sysconfdir}/init.d/atftpd + install -m 0755 ${UNPACKDIR}/atftpd.init ${D}${sysconfdir}/init.d/atftpd install -d ${D}/srv/tftp rm ${D}${sbindir}/in.tftpd install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/atftpd.service ${D}${systemd_unitdir}/system + install -m 0644 ${UNPACKDIR}/atftpd.service ${D}${systemd_unitdir}/system } PACKAGES =+ "${PN}d" diff --git a/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-Bug-fix-for-pid_t-not-found-on-musl.patch b/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-Bug-fix-for-pid_t-not-found-on-musl.patch deleted file mode 100644 index 2a583466..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-Bug-fix-for-pid_t-not-found-on-musl.patch +++ /dev/null @@ -1,30 +0,0 @@ -From d0d5ac317dab11610a5fc91ca3e7f5ad72ce2236 Mon Sep 17 00:00:00 2001 -From: Zang Ruochen -Date: Tue, 29 Oct 2019 13:19:37 +0800 -Subject: [PATCH] Bug fix for pid_t not found on musl. - -When compiling version 5.1.6 on musl, the following error occurs: -log.h:49:8: error: unknown type name 'pid_t' - -Upstream-Status: Pending - -Signed-off-by: Zang Ruochen ---- - lib/defaults.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/lib/defaults.c b/lib/defaults.c -index a6ea116..b3ecfa5 100644 ---- a/lib/defaults.c -+++ b/lib/defaults.c -@@ -21,6 +21,7 @@ - #include - #include - #include -+#include - #include - - #include "config.h" --- -2.20.1 - diff --git a/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-Define-__SWORD_TYPE-and-_PATH_NSSWITCH_CONF.patch b/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-Define-__SWORD_TYPE-and-_PATH_NSSWITCH_CONF.patch deleted file mode 100644 index 6128f3d0..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-Define-__SWORD_TYPE-and-_PATH_NSSWITCH_CONF.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 987c8f4a718cdd6b764592ba7510090a59623959 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 31 Mar 2017 19:10:57 -0700 -Subject: [PATCH] Define __SWORD_TYPE and _PATH_NSSWITCH_CONF - -if they are not defined as is in musl then define -them here - -Signed-off-by: Khem Raj - ---- -Upstream-Status: Pending - - include/automount.h | 8 ++++++++ - include/nsswitch.h | 3 +++ - 2 files changed, 11 insertions(+) - -diff --git a/include/automount.h b/include/automount.h -index cc336ad..8bdcf12 100644 ---- a/include/automount.h -+++ b/include/automount.h -@@ -42,6 +42,14 @@ - - #define ENABLE_CORES 1 - -+#ifndef __SWORD_TYPE -+# if __WORDSIZE == 32 /* System word size */ -+# define __SWORD_TYPE int -+# else /* __WORDSIZE == 64 */ -+# define __SWORD_TYPE long int -+# endif -+#endif -+ - /* We MUST have the paths to mount(8) and umount(8) */ - #ifndef HAVE_MOUNT - #error Failed to locate mount(8)! -diff --git a/include/nsswitch.h b/include/nsswitch.h -index d3e4027..7a0c38f 100644 ---- a/include/nsswitch.h -+++ b/include/nsswitch.h -@@ -24,6 +24,9 @@ - #include - #include "list.h" - -+#ifndef _PATH_NSSWITCH_CONF -+#define _PATH_NSSWITCH_CONF "/etc/nsswitch.conf" -+#endif - #define NSSWITCH_FILE _PATH_NSSWITCH_CONF - - enum nsswitch_status { diff --git a/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-Define-__SWORD_TYPE-if-undefined.patch b/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-Define-__SWORD_TYPE-if-undefined.patch deleted file mode 100644 index f16ae527..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-Define-__SWORD_TYPE-if-undefined.patch +++ /dev/null @@ -1,115 +0,0 @@ -From 9fe90ab1e333b2e2bed370ff13ba552eb54c3aaf Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sat, 17 Jul 2021 09:56:28 -0700 -Subject: [PATCH] Define __SWORD_TYPE if undefined - -These fixes are inspired when building autofs on musl - -Upstream-Status: Pending -Signed-off-by: Khem Raj ---- - daemon/automount.c | 20 ++++++++++++++------ - include/hash.h | 5 +++++ - lib/log.c | 6 +++++- - 3 files changed, 24 insertions(+), 7 deletions(-) - ---- a/daemon/automount.c -+++ b/daemon/automount.c -@@ -1,7 +1,7 @@ - /* ----------------------------------------------------------------------- * - * - * automount.c - Linux automounter daemon -- * -+ * - * Copyright 1997 Transmeta Corporation - All Rights Reserved - * Copyright 1999-2000 Jeremy Fitzhardinge - * Copyright 2001-2005 Ian Kent -@@ -11,7 +11,7 @@ - * the Free Software Foundation, Inc., 675 Mass Ave, Cambridge MA 02139, - * USA; either version 2 of the License, or (at your option) any later - * version. -- * -+ * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -@@ -40,6 +40,14 @@ - #include - #endif - -+#ifndef __SWORD_TYPE -+# if __WORDSIZE == 32 /* System word size */ -+# define __SWORD_TYPE int -+# else /* __WORDSIZE == 64 */ -+# define __SWORD_TYPE long int -+# endif -+#endif -+ - #include "automount.h" - #if defined(LIBXML2_WORKAROUND) || defined(TIRPC_WORKAROUND) - #include -@@ -282,7 +290,7 @@ int rmdir_path(struct autofs_point *ap, - dev, buf, st.st_dev); - return -1; - } -- -+ - /* - * Last element of path may be a symbolic link; all others - * are directories (and the last directory element is -@@ -455,7 +463,7 @@ int count_mounts(struct autofs_point *ap - - counter.count = 0; - counter.dev = dev; -- -+ - if (walk_tree(path, counter_fn, 1, ap, &counter) == -1) - return -1; - -@@ -811,7 +819,7 @@ static char *automount_path_to_fifo(unsi - /* - * An automount path can be made up of subdirectories. So, to - * create the fifo name, we will just replace instances of '/' with -- * '-'. -+ * '-'. - */ - p = fifo_name + strlen(fifodir); - while (*p != '\0') { -@@ -1640,7 +1648,7 @@ static void return_start_status(void *ar - sc->done = 1; - - /* -- * Startup condition mutex must be locked during -+ * Startup condition mutex must be locked during - * the startup process. - */ - status = pthread_cond_signal(&sc->cond); ---- a/include/hash.h -+++ b/include/hash.h -@@ -5,6 +5,11 @@ - - #include - #include -+#include -+ -+#ifndef __GLIBC__ -+#include -+#endif - - /* - * The "GOLDEN_RATIO_PRIME" is used in ifs/btrfs/brtfs_inode.h and ---- a/lib/log.c -+++ b/lib/log.c -@@ -38,7 +38,11 @@ static char *prepare_attempt_prefix(cons - char buffer[ATTEMPT_ID_SIZE + 1]; - char *prefixed_msg = NULL; - -- attempt_id = pthread_getspecific(key_thread_attempt_id); -+ if (key_thread_attempt_id) { -+ attempt_id = pthread_getspecific(key_thread_attempt_id); -+ } else { -+ attempt_id = 0; -+ } - if (attempt_id) { - int len = sizeof(buffer) + 1 + strlen(msg) + 1; - diff --git a/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-Do-not-hardcode-path-for-pkg.m4.patch b/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-Do-not-hardcode-path-for-pkg.m4.patch deleted file mode 100644 index f18f237d..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-Do-not-hardcode-path-for-pkg.m4.patch +++ /dev/null @@ -1,31 +0,0 @@ -From d7a34bb388e33d16260b67275cdb58f9c877d324 Mon Sep 17 00:00:00 2001 -From: Changqing Li -Date: Tue, 27 Nov 2018 15:27:47 +0800 -Subject: [PATCH] From 6d24365f0828185fd1bb4d199209ca07eb95c41d Mon Sep 17 - 00:00:00 2001 From: Khem Raj Date: Fri, 24 Aug 2018 - 06:24:36 +0000 Subject: [PATCH] Do not hardcode path for pkg.m4 - -Upstream-Status: Pending - -Signed-off-by: Khem Raj - -update patch to version 5.1.6 -Signed-off-by: Changqing Li - ---- - configure.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/configure.in b/configure.in -index 07c2051..e85d718 100644 ---- a/configure.in -+++ b/configure.in -@@ -12,7 +12,7 @@ define([AC_CACHE_SAVE], )dnl - AC_INIT(.autofs-5.1.8) - - # for pkg-config macros --m4_include([/usr/share/aclocal/pkg.m4]) -+m4_include([pkg.m4]) - - # - # autofs installs by default in /usr diff --git a/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-autofs-5.1.8-add-autofs_strerror_r-helper-for-musl.patch b/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-autofs-5.1.8-add-autofs_strerror_r-helper-for-musl.patch deleted file mode 100644 index caf01051..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-autofs-5.1.8-add-autofs_strerror_r-helper-for-musl.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 88f991b0ebb6fb8fcaad3d0eb8fb51a7439d053e Mon Sep 17 00:00:00 2001 -From: Fabian Groffen -Date: Wed, 2 Feb 2022 09:27:13 +0800 -Subject: [PATCH 1/2] autofs-5.1.8 - add autofs_strerror_r() helper for musl - -If using musl libc the XSI-compliant variant strerror_r() which returns -an integer instead of a pointer so add a helper function to handle this -case. - -Signed-off-by: Fabian Groffen -Signed-off-by: Ian Kent -Signed-off-by: Khem Raj ---- -Upstream-Status: Pending - - include/automount.h | 5 +++++ - lib/log.c | 10 ++++++++++ - 2 files changed, 15 insertions(+) - -diff --git a/include/automount.h b/include/automount.h -index 8cd8b3a..f759e59 100644 ---- a/include/automount.h -+++ b/include/automount.h -@@ -51,6 +51,11 @@ - # endif - #endif - -+#ifndef __GLIBC__ -+# define strerror_r(N,B,S) autofs_strerror_r(N,B,S) -+char *autofs_strerror_r(int errnum, char *buf, size_t buflen); /* GNU */ -+#endif -+ - /* We MUST have the paths to mount(8) and umount(8) */ - #ifndef HAVE_MOUNT - #error Failed to locate mount(8)! -diff --git a/lib/log.c b/lib/log.c -index 39b1e3b..b99fa39 100644 ---- a/lib/log.c -+++ b/lib/log.c -@@ -368,3 +368,13 @@ pid_t log_pidinfo(struct autofs_point *ap, pid_t pid, char *label) { - - return ppid; - } -+ -+#ifndef __GLIBC__ -+# undef strerror_r -+char *autofs_strerror_r(int errnum, char *buf, size_t buflen) { -+ int s = strerror_r(errnum, buf, buflen); -+ if (s) -+ return NULL; -+ return buf; -+} -+#endif --- -2.37.3 - diff --git a/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-include-libgen.h-for-basename.patch b/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-include-libgen.h-for-basename.patch deleted file mode 100644 index 4c8b4ef7..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-include-libgen.h-for-basename.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 1651e7a35be8b3e2fa90ca57b073f6944664fa62 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Mon, 25 Mar 2024 12:04:03 -0700 -Subject: [PATCH] include libgen.h for basename - -basename prototype has been removed from string.h from latest musl [1] -compilers e.g. clang-18 flags the absense of prototype as error. therefore -include libgen.h for providing it. - -[1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7 - -Upstream-Status: Pending -Signed-off-by: Khem Raj ---- - daemon/automount.c | 1 + - daemon/master.c | 1 + - modules/lookup_file.c | 1 + - 3 files changed, 3 insertions(+) - -diff --git a/daemon/automount.c b/daemon/automount.c -index 3d9461d..61b3478 100644 ---- a/daemon/automount.c -+++ b/daemon/automount.c -@@ -21,6 +21,7 @@ - - #include - #include -+#include - #include - #include - #include -diff --git a/daemon/master.c b/daemon/master.c -index f99359c..3f56499 100644 ---- a/daemon/master.c -+++ b/daemon/master.c -@@ -21,6 +21,7 @@ - #include - #include - #include -+#include - #include - #include - #include -diff --git a/modules/lookup_file.c b/modules/lookup_file.c -index 6afc558..82b1f28 100644 ---- a/modules/lookup_file.c -+++ b/modules/lookup_file.c -@@ -15,6 +15,7 @@ - - #include - #include -+#include - #include - #include - #include --- -2.44.0 - diff --git a/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-modules-lookup_multi.c-Replace-__S_IEXEC-with-S_IEXE.patch b/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-modules-lookup_multi.c-Replace-__S_IEXEC-with-S_IEXE.patch deleted file mode 100644 index 8eec3014..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-modules-lookup_multi.c-Replace-__S_IEXEC-with-S_IEXE.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 745e355ac8b595a27e1fcca75bf01d3e244f4a5f Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Thu, 7 Sep 2017 22:22:31 -0700 -Subject: [PATCH] modules/lookup_multi.c: Replace __S_IEXEC with S_IEXEC - -__S_IEXEC is internal to libc and may not be available on -all libc e.g. musl - -Signed-off-by: Khem Raj - ---- -Upstream-Status: Pending - - modules/lookup_multi.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules/lookup_multi.c b/modules/lookup_multi.c -index 3ecda6d..cf109de 100644 ---- a/modules/lookup_multi.c -+++ b/modules/lookup_multi.c -@@ -452,7 +452,7 @@ int lookup_reinit(const char *my_mapfmt, - continue; - } - -- if (st.st_mode & __S_IEXEC) -+ if (st.st_mode & S_IEXEC) - type = src_prog; - else - type = src_file; diff --git a/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-no-bash.patch b/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-no-bash.patch new file mode 100644 index 00000000..cd9b1435 --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-no-bash.patch @@ -0,0 +1,36 @@ +From f53458e0b4cca0b0eedcd00b0e90b39d91228085 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 5 Jan 2013 19:53:10 -0800 +Subject: [PATCH] no bash + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + samples/auto.net | 2 +- + samples/auto.smb | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/samples/auto.net b/samples/auto.net +index c5b145d..a09d56d 100755 +--- a/samples/auto.net ++++ b/samples/auto.net +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + + # This file must be executable to work! chmod 755! + +diff --git a/samples/auto.smb b/samples/auto.smb +index f6d41d3..0d945ee 100755 +--- a/samples/auto.smb ++++ b/samples/auto.smb +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + + # This file must be executable to work! chmod 755! + +-- +2.25.1 + diff --git a/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0002-Replace-__S_IEXEC-with-S_IEXEC.patch b/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0002-Replace-__S_IEXEC-with-S_IEXEC.patch deleted file mode 100644 index d67f6300..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0002-Replace-__S_IEXEC-with-S_IEXEC.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 096e33743158e0e8c04d60d01cc66e2945d79777 Mon Sep 17 00:00:00 2001 -From: Changqing Li -Date: Tue, 27 Nov 2018 16:52:35 +0800 -Subject: [PATCH] From 557ca399f4b3a397f20bb147ec6dc4ab9732dd1e Mon Sep 17 - 00:00:00 2001 From: Khem Raj Date: Fri, 31 Mar 2017 - 19:12:10 -0700 Subject: [PATCH] Replace __S_IEXEC with S_IEXEC - -S_IEXEC is portable - -Signed-off-by: Khem Raj - -update patch to version 5.1.5 -Signed-off-by: Changqing Li ---- -Upstream-Status: Pending - - daemon/lookup.c | 6 +++--- - modules/lookup_multi.c | 2 +- - 2 files changed, 4 insertions(+), 4 deletions(-) - ---- a/daemon/lookup.c -+++ b/daemon/lookup.c -@@ -397,7 +397,7 @@ static int read_file_source_instance(str - return NSS_STATUS_NOTFOUND; - } - -- if (st.st_mode & __S_IEXEC) -+ if (st.st_mode & S_IEXEC) - type = src_prog; - else - type = src_file; -@@ -930,7 +930,7 @@ static int lookup_name_file_source_insta - return NSS_STATUS_NOTFOUND; - } - -- if (st.st_mode & __S_IEXEC) -+ if (st.st_mode & S_IEXEC) - type = src_prog; - else - type = src_file; -@@ -1077,7 +1077,7 @@ static struct map_source *lookup_get_map - if (!S_ISREG(st.st_mode)) - return NULL; - -- if (st.st_mode & __S_IEXEC) -+ if (st.st_mode & S_IEXEC) - type = "program"; - else - type = "file"; ---- a/modules/lookup_multi.c -+++ b/modules/lookup_multi.c -@@ -247,7 +247,7 @@ static struct lookup_mod *nss_open_looku - continue; - } - -- if (st.st_mode & __S_IEXEC) -+ if (st.st_mode & S_IEXEC) - type = src_prog; - else - type = src_file; diff --git a/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0002-autofs-5.1.8-handle-innetgr-not-present-in-musl.patch b/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0002-autofs-5.1.8-handle-innetgr-not-present-in-musl.patch deleted file mode 100644 index 9d0caae3..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0002-autofs-5.1.8-handle-innetgr-not-present-in-musl.patch +++ /dev/null @@ -1,106 +0,0 @@ -From 1c0b0b70a276280f431d72319109a0bbc0267970 Mon Sep 17 00:00:00 2001 -From: Fabian Groffen -Date: Wed, 2 Feb 2022 10:15:22 +0800 -Subject: [PATCH 2/2] autofs-5.1.8 - handle innetgr() not present in musl - -The function innetgr(3) may not be present in musl libc, add a check -for this. - -Originally contributed by Fabian, modified by me. - -Upstream-Status: Backport [https://git.kernel.org/pub/scm/linux/storage/autofs/autofs.git/commit/?id=f60e40af3c038b8955325a11b7294ad38c15c9e8] -Signed-off-by: Fabian Groffen -Signed-off-by: Ian Kent -Signed-off-by: Khem Raj ---- - configure | 6 ++++++ - configure.in | 2 +- - include/config.h.in | 3 +++ - modules/parse_amd.c | 7 +++++++ - 4 files changed, 17 insertions(+), 1 deletion(-) - ---- a/configure.in -+++ b/configure.in -@@ -169,7 +169,7 @@ AF_CHECK_SSS_LIB(SSS_AUTOFS, libsss_auto - AC_SUBST(HAVE_SSS_AUTOFS) - AC_SUBST(sssldir) - --AC_CHECK_FUNCS(pipe2) -+AC_CHECK_FUNCS(pipe2 innetgr) - - # - # Newer mounts have the -s (sloppy) option to ignore unknown options, ---- a/include/config.h.in -+++ b/include/config.h.in -@@ -30,6 +30,9 @@ - /* Define to 1 if you have the `getservbyname' function. */ - #undef HAVE_GETSERVBYNAME - -+/* Define to 1 if you have the `innetgr' function. */ -+#undef HAVE_INNETGR -+ - /* Define to 1 if you have the header file. */ - #undef HAVE_INTTYPES_H - -@@ -45,9 +48,6 @@ - /* Define if you have the Linux /proc filesystem. */ - #undef HAVE_LINUX_PROCFS - --/* Define to 1 if you have the header file. */ --#undef HAVE_MEMORY_H -- - /* define if you have MOUNT */ - #undef HAVE_MOUNT - -@@ -69,6 +69,9 @@ - /* Define to 1 if you have the header file. */ - #undef HAVE_STDINT_H - -+/* Define to 1 if you have the header file. */ -+#undef HAVE_STDIO_H -+ - /* Define to 1 if you have the header file. */ - #undef HAVE_STDLIB_H - -@@ -141,7 +144,9 @@ - /* define if you have YACC */ - #undef PATH_YACC - --/* Define to 1 if you have the ANSI C header files. */ -+/* Define to 1 if all of the C90 standard headers exist (not just the ones -+ required in a freestanding environment). This macro is provided for -+ backward compatibility; new code need not use it. */ - #undef STDC_HEADERS - - /* Define to 1 to use the libtirpc tsd usage workaround */ ---- a/modules/parse_amd.c -+++ b/modules/parse_amd.c -@@ -424,6 +424,7 @@ static int sel_in_network(struct autofs_ - return ret; - } - -+#ifdef HAVE_INNETGR - static int sel_netgrp(struct autofs_point *ap, - struct selector *s, struct substvar *sv) - { -@@ -488,6 +489,7 @@ out: - - return ret; - } -+#endif - - static int eval_selector(struct autofs_point *ap, - struct amd_entry *this, struct substvar *sv) -@@ -627,7 +629,12 @@ static int eval_selector(struct autofs_p - switch (s->sel->selector) { - case SEL_NETGRP: - case SEL_NETGRPD: -+#ifndef HAVE_INNETGR -+ error(logopt, MODPREFIX -+ "netgroups not available, function innetgr(3) not available"); -+#else - ret = sel_netgrp(ap, s, sv); -+#endif - break; - - default: diff --git a/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0002-using-pkg-config-to-detect-krb5.patch b/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0002-using-pkg-config-to-detect-krb5.patch new file mode 100644 index 00000000..1bf95b8a --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0002-using-pkg-config-to-detect-krb5.patch @@ -0,0 +1,38 @@ +From 796f1b5cfca595ba4e11ca9dab5c2c46c0710d95 Mon Sep 17 00:00:00 2001 +From: Roy Li +Date: Tue, 19 Aug 2014 11:31:35 +0800 +Subject: [PATCH] using pkg-config to detect krb5 + +Upstream-Status: Pending + +Signed-off-by: Roy Li + +update patch to 5.1.5 +Signed-off-by: Changqing Li +--- + configure.ac | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 76a38f4..1bb1a52 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -214,7 +214,14 @@ PKG_CHECK_MODULES([XML], [libxml-2.0], [ + AC_DEFINE(LIBXML2_WORKAROUND, 1, [Use libxml2 tsd usage workaround]) + ], [HAVE_LIBXML=0]) + +-AF_CHECK_KRB5() ++PKG_CHECK_MODULES(KRB5, [krb5], [ ++ HAVE_KRB5=1 ++ SAVE_CFLAGS=$CFLAGS ++ SAVE_LIBS=$LIBS ++ CFLAGS="$CFLAGS $KRB5_FLAGS" ++ LIBS="$LIBS $KRB5_LIBS" ++ AC_CHECK_FUNCS([krb5_principal_get_realm]) ++], [HAVE_KRB5=0]) + + AC_SEARCH_LIBS([versionsort],[]) + if test "$ac_cv_search_versionsort" = "no"; then +-- +2.25.1 + diff --git a/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0003-force-STRIP-to-emtpy.patch b/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0003-force-STRIP-to-emtpy.patch new file mode 100644 index 00000000..942f38d8 --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0003-force-STRIP-to-emtpy.patch @@ -0,0 +1,30 @@ +From efacbbe29b7212735046a7d0f2cd61148546ce9e Mon Sep 17 00:00:00 2001 +From: Roy Li +Date: Tue, 19 Aug 2014 11:31:35 +0800 +Subject: [PATCH] force STRIP to emtpy + +otherwise the generate file will be stripped + +Upstream-Status: Pending + +Signed-off-by: Roy Li +--- + Makefile.rules | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile.rules b/Makefile.rules +index 6ce39e5..a6dcd7b 100644 +--- a/Makefile.rules ++++ b/Makefile.rules +@@ -36,7 +36,7 @@ LDFLAGS ?= -s + endif + + ifdef DONTSTRIP +-STRIP ?= : ++STRIP = : + else + STRIP ?= strip --strip-debug + endif +-- +2.25.1 + diff --git a/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0004-autofs.init.in-remove-bashism.patch b/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0004-autofs.init.in-remove-bashism.patch new file mode 100644 index 00000000..6065bc71 --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0004-autofs.init.in-remove-bashism.patch @@ -0,0 +1,120 @@ +From b5f4a3c2f02244209ac613aeb8ea406bdc39af27 Mon Sep 17 00:00:00 2001 +From: Robert Yang +Date: Sat, 13 Sep 2014 20:19:28 -0700 +Subject: [PATCH] autofs.init.in: remove bashism + +It can work without the bashism. + +Upstream-Status: Pending + +Signed-off-by: Mike Looijmans +Signed-off-by: Robert Yang +--- + redhat/autofs.init.in | 12 ++++++------ + samples/rc.autofs.in | 10 +++++----- + 2 files changed, 11 insertions(+), 11 deletions(-) + +diff --git a/redhat/autofs.init.in b/redhat/autofs.init.in +index 9d008ff..4f1c0d8 100644 +--- a/redhat/autofs.init.in ++++ b/redhat/autofs.init.in +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + # + # rc file for automount using a Sun-style "master map". + # +@@ -42,7 +42,7 @@ if [ -r $confdir/autofs ]; then + . $confdir/autofs + fi + +-function start() { ++start() { + # Make sure autofs4 module is loaded + if ! grep -q autofs /proc/filesystems + then +@@ -102,7 +102,7 @@ function start() { + return $RETVAL + } + +-function stop() { ++stop() { + echo -n $"Stopping $prog: " + count=0 + while [ -n "`pidof $prog`" -a $count -lt 15 ] ; do +@@ -125,7 +125,7 @@ function stop() { + return $RETVAL + } + +-function restart() { ++restart() { + status autofs > /dev/null 2>&1 + if [ $? -eq 0 ]; then + stop +@@ -143,7 +143,7 @@ function restart() { + start + } + +-function reload() { ++reload() { + if [ ! -f /var/lock/subsys/autofs ]; then + echo $"$prog not running" + RETVAL=1 +@@ -161,7 +161,7 @@ function reload() { + return $RETVAL + } + +-function usage_message() { ++usage_message() { + echo $"Usage: $0 {start|forcestart|stop|status|restart|force-reload|forcerestart|reload|condrestart|try-restart|usage}" + } + +diff --git a/samples/rc.autofs.in b/samples/rc.autofs.in +index 487669f..e96cde1 100644 +--- a/samples/rc.autofs.in ++++ b/samples/rc.autofs.in +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + # + # rc file for automount using a Sun-style "master map". + # +@@ -36,7 +36,7 @@ if [ -r $confdir/autofs ]; then + . $confdir/autofs + fi + +-function start() { ++start() { + echo -n "Starting $prog: " + + # Make sure autofs4 module is loaded +@@ -85,7 +85,7 @@ function start() { + return $RETVAL + } + +-function stop() { ++stop() { + echo -n $"Stopping $prog: " + count=0 + while [ -n "`pidof $prog`" -a $count -lt 15 ] ; do +@@ -102,7 +102,7 @@ function stop() { + return $RETVAL + } + +-function restart() { ++restart() { + stop + while [ -n "`pidof $prog`" ] ; do + sleep 5 +@@ -110,7 +110,7 @@ function restart() { + start + } + +-function reload() { ++reload() { + pid=`pidof $prog` + if [ -z $pid ]; then + echo $"$prog not running" +-- +2.25.1 + diff --git a/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0005-fix-the-YACC-rule-to-fix-a-building-failure.patch b/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0005-fix-the-YACC-rule-to-fix-a-building-failure.patch new file mode 100644 index 00000000..462644b0 --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0005-fix-the-YACC-rule-to-fix-a-building-failure.patch @@ -0,0 +1,71 @@ +From 40318f4f6109d9810b7cb31518a7879ae7632f58 Mon Sep 17 00:00:00 2001 +From: Roy Li +Date: Mon, 18 May 2015 16:28:36 +0800 +Subject: [PATCH] fix the YACC rule to fix a building failure + +The original rule will create the header file twice, one is that the header +file as the object file is created, other time is when create the C source file. +since YACC always has "-d" parameter. + +This lead to a race when compile amd_tok.o, the header file maybe rewritten. + |---------------------- + |amd_tok.l:359:10: error: 'RBRACKET' undeclared (first use in this function) + | ")" { return RBRACKET; } + | ^ + |../Makefile.rules:64: recipe for target 'amd_tok.o' failed + |---------------------- + +Upstream-Status: Pending + +Signed-off-by: Roy Li +--- + daemon/Makefile | 3 ++- + lib/Makefile | 3 ++- + modules/Makefile | 3 ++- + 3 files changed, 6 insertions(+), 3 deletions(-) + +diff --git a/daemon/Makefile b/daemon/Makefile +index 3af38e6..2a7ffe9 100644 +--- a/daemon/Makefile ++++ b/daemon/Makefile +@@ -44,7 +44,8 @@ automount: $(OBJS) $(AUTOFS_LIB) + master_tok.c: master_tok.l + $(LEX) -o$@ -Pmaster_ $? + +-master_parse.tab.c master_parse.tab.h: master_parse.y ++master_parse.tab.h: master_parse.tab.c ++master_parse.tab.c: master_parse.y + $(YACC) -v -d -p master_ -b master_parse $? + + master_tok.o: master_tok.c master_parse.tab.h +diff --git a/lib/Makefile b/lib/Makefile +index d18c67b..51445fd 100644 +--- a/lib/Makefile ++++ b/lib/Makefile +@@ -35,7 +35,8 @@ libautofs.so: $(OBJS) + nss_tok.c: nss_tok.l + $(LEX) -o$@ -Pnss_ $? + +-nss_parse.tab.c nss_parse.tab.h: nss_parse.y ++nss_parse.tab.h: nss_parse.tab.c ++nss_parse.tab.c: nss_parse.y + $(YACC) -v -d -p nss_ -b nss_parse $? + + nss_tok.o: nss_tok.c nss_parse.tab.h +diff --git a/modules/Makefile b/modules/Makefile +index 6908da0..00dd7ce 100644 +--- a/modules/Makefile ++++ b/modules/Makefile +@@ -105,7 +105,8 @@ amd_tok.c: amd_tok.l + + amd_tok.o: amd_tok.c amd_parse.tab.h + +-amd_parse.tab.c amd_parse.tab.h: amd_parse.y ++amd_parse.tab.h: amd_parse.tab.c ++amd_parse.tab.c: amd_parse.y + $(YACC) -v -d -p amd_ -b amd_parse $? + + amd_parse.tab.o: amd_parse.tab.c amd_parse.tab.h +-- +2.25.1 + diff --git a/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0006-Do-not-hardcode-path-for-pkg.m4.patch b/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0006-Do-not-hardcode-path-for-pkg.m4.patch new file mode 100644 index 00000000..ab99a98c --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0006-Do-not-hardcode-path-for-pkg.m4.patch @@ -0,0 +1,31 @@ +From 349cc55c4cb7c7b2f5e7de937e11f3c581028b23 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 24 Aug 2018 06:24:36 +0000 +Subject: [PATCH] Do not hardcode path for pkg.m4 + +Upstream-Status: Pending + +Signed-off-by: Khem Raj + +update patch to version 5.1.6 +Signed-off-by: Changqing Li +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 1bb1a52..4cebbd2 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -12,7 +12,7 @@ define([AC_CACHE_SAVE], )dnl + AC_INIT(.autofs-5.1.9) + + # for pkg-config macros +-m4_include([/usr/share/aclocal/pkg.m4]) ++m4_include([pkg.m4]) + + # + # autofs installs by default in /usr +-- +2.25.1 + diff --git a/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0007-Avoid-conflicts-between-sys-mount.h-and-linux-mount..patch b/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0007-Avoid-conflicts-between-sys-mount.h-and-linux-mount..patch new file mode 100644 index 00000000..14faa0c7 --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0007-Avoid-conflicts-between-sys-mount.h-and-linux-mount..patch @@ -0,0 +1,45 @@ +From 96e0e3ed49a0e00573fa5907ae80e6d262cb7644 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 9 Sep 2024 23:01:06 +0800 +Subject: [PATCH] Avoid conflicts between sys/mount.h and linux/mount.h + +linux/fs.h includes linux/mount.h and this include file is unused so +do not include it and avoid conflict too with glibc 2.36+ see [1] + +[1] https://sourceware.org/glibc/wiki/Release/2.36#Usage_of_.3Clinux.2Fmount.h.3E_and_.3Csys.2Fmount.h.3E + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + modules/parse_amd.c | 1 - + modules/parse_sun.c | 1 - + 2 files changed, 2 deletions(-) + +diff --git a/modules/parse_amd.c b/modules/parse_amd.c +index fb6b1b7..d86adf1 100644 +--- a/modules/parse_amd.c ++++ b/modules/parse_amd.c +@@ -27,7 +27,6 @@ + #include + #include + #include +-#include + + #define MODULE_PARSE + #include "automount.h" +diff --git a/modules/parse_sun.c b/modules/parse_sun.c +index a5351fd..8509781 100644 +--- a/modules/parse_sun.c ++++ b/modules/parse_sun.c +@@ -30,7 +30,6 @@ + #include + #include + #include +-#include + + #define MODULE_PARSE + #include "automount.h" +-- +2.25.1 + diff --git a/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0008-include-libgen.h-for-basename.patch b/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0008-include-libgen.h-for-basename.patch new file mode 100644 index 00000000..13254f2c --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0008-include-libgen.h-for-basename.patch @@ -0,0 +1,59 @@ +From c754222ce955c893e8e3ad75d8c73835950d1931 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 25 Mar 2024 12:04:03 -0700 +Subject: [PATCH] include libgen.h for basename + +basename prototype has been removed from string.h from latest musl [1] +compilers e.g. clang-18 flags the absense of prototype as error. therefore +include libgen.h for providing it. + +[1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7 + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + daemon/automount.c | 1 + + daemon/master.c | 1 + + modules/lookup_file.c | 1 + + 3 files changed, 3 insertions(+) + +diff --git a/daemon/automount.c b/daemon/automount.c +index 6cb3b1b..efc2680 100644 +--- a/daemon/automount.c ++++ b/daemon/automount.c +@@ -21,6 +21,7 @@ + + #include + #include ++#include + #include + #include + #include +diff --git a/daemon/master.c b/daemon/master.c +index f2c11e9..1455e40 100644 +--- a/daemon/master.c ++++ b/daemon/master.c +@@ -21,6 +21,7 @@ + #include + #include + #include ++#include + #include + #include + #include +diff --git a/modules/lookup_file.c b/modules/lookup_file.c +index 99f2e21..4914395 100644 +--- a/modules/lookup_file.c ++++ b/modules/lookup_file.c +@@ -15,6 +15,7 @@ + + #include + #include ++#include + #include + #include + #include +-- +2.25.1 + diff --git a/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0009-hash.h-include-sys-reg.h-instead-of-bits-reg.h.patch b/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0009-hash.h-include-sys-reg.h-instead-of-bits-reg.h.patch new file mode 100644 index 00000000..442a3138 --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0009-hash.h-include-sys-reg.h-instead-of-bits-reg.h.patch @@ -0,0 +1,35 @@ +From 1a08bbed376c0dfa0ce2d12a93b34fb2d5620c05 Mon Sep 17 00:00:00 2001 +From: Yi Zhao +Date: Tue, 10 Sep 2024 21:08:09 +0800 +Subject: [PATCH] hash.h: include instead of + +Fix build on musl: +In file included from ../include/automount.h:25, + from parse_subs.c:29: +../include/hash.h:27:2: error: #error Wordsize not 32 or 64 + 27 | #error Wordsize not 32 or 64 + | ^~~~~ + +Upstream-Status: Pending + +Signed-off-by: Yi Zhao +--- + include/hash.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/hash.h b/include/hash.h +index 0f1d7b5..f465ab8 100644 +--- a/include/hash.h ++++ b/include/hash.h +@@ -6,7 +6,7 @@ + #ifdef __GLIBC__ + #include + #else +-#include ++#include + #endif + #include + #include +-- +2.25.1 + diff --git a/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0010-autofs-5.1.9-Fix-incompatible-function-pointer-types.patch b/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0010-autofs-5.1.9-Fix-incompatible-function-pointer-types.patch new file mode 100644 index 00000000..0e155873 --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0010-autofs-5.1.9-Fix-incompatible-function-pointer-types.patch @@ -0,0 +1,64 @@ +From a6a79230110e998f780796cb1d4c5d3f59f20d1d Mon Sep 17 00:00:00 2001 +From: Florian Weimer +Date: Mon, 18 Dec 2023 13:48:18 +0100 +Subject: [PATCH] autofs-5.1.9 - Fix incompatible function pointer types in + cyrus-sasl module + +Add casts to SASL callbacks to avoid incompatible-pointer-types +errors. Avoids a build failure with stricter compilers. + +Signed-off-by: Florian Weimer +Signed-off-by: Ian Kent + +Upstream-Status: Backport +[https://git.kernel.org/pub/scm/linux/storage/autofs/autofs.git/commit/?id=b7ff971bb8aa3fc609bb531ddc4c2ce56226383f] + +Signed-off-by: Yi Zhao +--- + CHANGELOG | 2 ++ + modules/cyrus-sasl.c | 14 +++++++------- + 2 files changed, 9 insertions(+), 7 deletions(-) + +diff --git a/CHANGELOG b/CHANGELOG +index 3e47daa..fd9d861 100644 +--- a/CHANGELOG ++++ b/CHANGELOG +@@ -1,4 +1,6 @@ + ++- Fix incompatible function pointer types in cyrus-sasl module. ++ + 02/11/2023 autofs-5.1.9 + - fix kernel mount status notification. + - fix fedfs build flags. +diff --git a/modules/cyrus-sasl.c b/modules/cyrus-sasl.c +index e742eaf..78b7794 100644 +--- a/modules/cyrus-sasl.c ++++ b/modules/cyrus-sasl.c +@@ -109,17 +109,17 @@ static int getpass_func(sasl_conn_t *, void *, int, sasl_secret_t **); + static int getuser_func(void *, int, const char **, unsigned *); + + static sasl_callback_t callbacks[] = { +- { SASL_CB_USER, &getuser_func, NULL }, +- { SASL_CB_AUTHNAME, &getuser_func, NULL }, +- { SASL_CB_PASS, &getpass_func, NULL }, ++ { SASL_CB_USER, (int(*)(void)) &getuser_func, NULL }, ++ { SASL_CB_AUTHNAME, (int(*)(void)) &getuser_func, NULL }, ++ { SASL_CB_PASS, (int(*)(void)) &getpass_func, NULL }, + { SASL_CB_LIST_END, NULL, NULL }, + }; + + static sasl_callback_t debug_callbacks[] = { +- { SASL_CB_LOG, &sasl_log_func, NULL }, +- { SASL_CB_USER, &getuser_func, NULL }, +- { SASL_CB_AUTHNAME, &getuser_func, NULL }, +- { SASL_CB_PASS, &getpass_func, NULL }, ++ { SASL_CB_LOG, (int(*)(void)) &sasl_log_func, NULL }, ++ { SASL_CB_USER, (int(*)(void)) &getuser_func, NULL }, ++ { SASL_CB_AUTHNAME, (int(*)(void)) &getuser_func, NULL }, ++ { SASL_CB_PASS, (int(*)(void)) &getpass_func, NULL }, + { SASL_CB_LIST_END, NULL, NULL }, + }; + +-- +2.25.1 + diff --git a/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/add-the-needed-stdarg.h.patch b/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/add-the-needed-stdarg.h.patch deleted file mode 100644 index 4cfd8edf..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/add-the-needed-stdarg.h.patch +++ /dev/null @@ -1,25 +0,0 @@ -From df5d45b2d7ad7e7b5f0542a816d08b0409a529a1 Mon Sep 17 00:00:00 2001 -From: Roy Li -Date: Tue, 19 Aug 2014 11:31:35 +0800 -Subject: [PATCH] [PATCH] add the needed stdarg.h - -Upstream-Status: Pending - -Signed-off-by: Roy Li - ---- - lib/defaults.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/lib/defaults.c b/lib/defaults.c -index 0e48a78..667f35d 100644 ---- a/lib/defaults.c -+++ b/lib/defaults.c -@@ -16,6 +16,7 @@ - - #include - #include -+#include - #include - #include - #include diff --git a/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/autofs-5.0.7-fix-lib-deps.patch b/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/autofs-5.0.7-fix-lib-deps.patch deleted file mode 100644 index 8e06db6e..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/autofs-5.0.7-fix-lib-deps.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 080626108c9ab70e2489752ef2a14006d0564b0c Mon Sep 17 00:00:00 2001 -From: Joe MacDonald -Date: Tue, 18 Jun 2013 10:05:21 -0400 -Subject: [PATCH] Fix the dependency issue - -Upstream-Status: Pending - -autofs's lib sources have a dependency on a number of files that are -generated by rpcgen during buildtime - -Signed-off-by: Roy.Li -Signed-off-by: Joe MacDonald - ---- - lib/Makefile | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/lib/Makefile b/lib/Makefile -index 518b483..4798a4b 100644 ---- a/lib/Makefile -+++ b/lib/Makefile -@@ -81,3 +81,4 @@ install: all - clean: - rm -f $(LIB) $(RPCS) $(OBJS) $(YACCSRC) *.output *~ - -+$(OBJS): $(RPCS) diff --git a/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/cross.patch b/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/cross.patch deleted file mode 100644 index 2a4f4fd0..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/cross.patch +++ /dev/null @@ -1,55 +0,0 @@ -From b9b44cd82caceeb638cc6a862b5bb90b93ad6c6a Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sat, 5 Jan 2013 19:53:10 -0800 - ---- -Upstream-Status: Pending - - aclocal.m4 | 2 ++ - configure.in | 8 ++++++-- - 2 files changed, 8 insertions(+), 2 deletions(-) - -diff --git a/aclocal.m4 b/aclocal.m4 -index 2115204..2a9a802 100644 ---- a/aclocal.m4 -+++ b/aclocal.m4 -@@ -7,6 +7,8 @@ dnl -------------------------------------------------------------------------- - AC_DEFUN(AF_PATH_INCLUDE, - [AC_PATH_PROGS($1,$2,$3,$4) - if test -n "$$1"; then -+ AH_TEMPLATE([HAVE_$1], [Have $2]) -+ AH_TEMPLATE([PATH_$1], [Have $2]) - AC_DEFINE(HAVE_$1,1,[define if you have $1]) - AC_DEFINE_UNQUOTED(PATH_$1, "$$1", [define if you have $1]) - HAVE_$1=1 -diff --git a/configure.in b/configure.in -index 25d7c4e..44a1c8b 100644 ---- a/configure.in -+++ b/configure.in -@@ -324,13 +324,15 @@ AC_PROG_CC - cat > pietest.c < -Date: Mon, 18 May 2015 16:28:36 +0800 -Subject: [PATCH] [PATCH] fix the YACC rule to fix a building failure - -Upstream-Statu: Pending - -The original rule will create the header file twice, one is that the header -file as the object file is created, other time is when create the C source file. -since YACC always has "-d" parameter. - -This lead to a race when compile amd_tok.o, the header file maybe rewritten. - |---------------------- - |amd_tok.l:359:10: error: 'RBRACKET' undeclared (first use in this function) - | ")" { return RBRACKET; } - | ^ - |../Makefile.rules:64: recipe for target 'amd_tok.o' failed - |---------------------- -Signed-off-by: Roy Li - ---- -Upstream-Status: Pending - - lib/Makefile | 6 ++++-- - modules/Makefile | 3 ++- - 2 files changed, 6 insertions(+), 3 deletions(-) - ---- a/lib/Makefile -+++ b/lib/Makefile -@@ -53,7 +53,8 @@ mount_xdr.o: mount_xdr.c - nss_tok.c: nss_tok.l - $(LEX) -o$@ -Pnss_ $? - --nss_parse.tab.c nss_parse.tab.h: nss_parse.y -+nss_parse.tab.h: nss_parse.tab.c -+nss_parse.tab.c: nss_parse.y - $(YACC) -v -d -p nss_ -b nss_parse $? - - nss_tok.o: nss_tok.c nss_parse.tab.h ---- a/modules/Makefile -+++ b/modules/Makefile -@@ -103,7 +103,8 @@ amd_tok.c: amd_tok.l - - amd_tok.o: amd_tok.c amd_parse.tab.h - --amd_parse.tab.c amd_parse.tab.h: amd_parse.y -+amd_parse.tab.h: amd_parse.tab.c -+amd_parse.tab.c: amd_parse.y - $(YACC) -v -d -p amd_ -b amd_parse $? - - amd_parse.tab.o: amd_parse.tab.c amd_parse.tab.h ---- a/daemon/Makefile -+++ b/daemon/Makefile -@@ -16,7 +16,7 @@ YACCSRC = master_tok.c master_parse.tab. - version := $(shell cat ../.version) - - CFLAGS += -rdynamic $(DAEMON_CFLAGS) -D_GNU_SOURCE -I../include --CFLAGS += -DAUTOFS_LIB_DIR=\"$(autofslibdir)\" -+CFLAGS += -DAUTOFS_LIB_DIR=\"$(autofslibdir)\" - CFLAGS += -DAUTOFS_MAP_DIR=\"$(autofsmapdir)\" - CFLAGS += -DAUTOFS_CONF_DIR=\"$(autofsconfdir)\" - CFLAGS += -DAUTOFS_FIFO_DIR=\"$(autofsfifodir)\" -@@ -44,7 +44,8 @@ automount: $(OBJS) $(AUTOFS_LIB) - master_tok.c: master_tok.l - $(LEX) -o$@ -Pmaster_ $? - --master_parse.tab.c master_parse.tab.h: master_parse.y -+master_parse.tab.h: master_parse.tab.c -+master_parse.tab.c: master_parse.y - $(YACC) -v -d -p master_ -b master_parse $? - - master_tok.o: master_tok.c master_parse.tab.h -@@ -57,5 +58,3 @@ clean: - install: all - install -d -m 755 $(INSTALLROOT)$(sbindir) - install -c automount -m 755 $(INSTALLROOT)$(sbindir) -- -- diff --git a/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/fix_disable_ldap.patch b/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/fix_disable_ldap.patch deleted file mode 100644 index 41432597..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/fix_disable_ldap.patch +++ /dev/null @@ -1,47 +0,0 @@ -From c500d9906f163bf716c872d37403b9de02ef0a86 Mon Sep 17 00:00:00 2001 -From: Amy Fong -Date: Fri, 18 Jan 2013 12:13:32 -0500 -Subject: [PATCH] autofs: fails to compile with openldap disabled - -As of 5.0.6, it appears that changes were introduced so that -if you compile with openldap disabled and openldap headers are not -available, then autofs fails to build. - -Upstream-Status: Pending - -Signed-off-by: Amy Fong --- - lookup_ldap.h | 4 ++++ - 1 file changed, 4 insertions(+) - ---- - include/lookup_ldap.h | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/include/lookup_ldap.h b/include/lookup_ldap.h -index 3a7aba7..bfdb0b3 100644 ---- a/include/lookup_ldap.h -+++ b/include/lookup_ldap.h -@@ -1,7 +1,9 @@ - #ifndef LOOKUP_LDAP_H - #define LOOKUP_LDAP_H - -+#ifdef WITH_LDAP - #include -+#endif - - #ifdef WITH_SASL - #include -@@ -117,10 +119,12 @@ struct lookup_context { - - #define LDAP_AUTH_USESIMPLE 0x0008 - -+#ifdef WITH_LDAP - /* lookup_ldap.c */ - LDAP *init_ldap_connection(unsigned logopt, const char *uri, struct lookup_context *ctxt); - int unbind_ldap_connection(unsigned logopt, struct ldap_conn *conn, struct lookup_context *ctxt); - int authtype_requires_creds(const char *authtype); -+#endif - - #ifdef WITH_SASL - /* cyrus-sasl.c */ diff --git a/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/force-STRIP-to-emtpy.patch b/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/force-STRIP-to-emtpy.patch deleted file mode 100644 index 1fc50031..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/force-STRIP-to-emtpy.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 3cbee00fe5725b87abdae80cfa2ee735e4513ca6 Mon Sep 17 00:00:00 2001 -From: Roy Li -Date: Tue, 19 Aug 2014 11:31:35 +0800 -Subject: [PATCH] [PATCH] force STRIP to emtpy - -otherwise the generate file will be stripped - -Signed-off-by: Roy Li - ---- -Upstream-Status: Pending - - Makefile.rules | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Makefile.rules b/Makefile.rules -index 709dd04..b1f7e50 100644 ---- a/Makefile.rules -+++ b/Makefile.rules -@@ -31,7 +31,7 @@ LDFLAGS ?= -s - endif - - ifdef DONTSTRIP --STRIP ?= : -+STRIP = : - else - STRIP ?= strip --strip-debug - endif diff --git a/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/mount_conflict.patch b/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/mount_conflict.patch deleted file mode 100644 index e2a94bf8..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/mount_conflict.patch +++ /dev/null @@ -1,30 +0,0 @@ -Avoid conflicts between sys/mount.h and linux/mount.h - -linux/fs.h includes linux/mount.h and this include file is unused so -do not include it and avoid conflict too with glibc 2.36+ see [1] - -[1] https://sourceware.org/glibc/wiki/Release/2.36#Usage_of_.3Clinux.2Fmount.h.3E_and_.3Csys.2Fmount.h.3E - -Upstream-Status: Pending - -Signed-off-by: Khem Raj ---- a/modules/parse_amd.c -+++ b/modules/parse_amd.c -@@ -27,7 +27,6 @@ - #include - #include - #include --#include - - #define MODULE_PARSE - #include "automount.h" ---- a/modules/parse_sun.c -+++ b/modules/parse_sun.c -@@ -30,7 +30,6 @@ - #include - #include - #include --#include - - #define MODULE_PARSE - #include "automount.h" diff --git a/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/no-bash.patch b/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/no-bash.patch deleted file mode 100644 index f91c307d..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/no-bash.patch +++ /dev/null @@ -1,31 +0,0 @@ -From a3007d7ea930823926611081bb873ddd771325cb Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sat, 5 Jan 2013 19:53:10 -0800 - ---- -Upstream-Status: Pending - - samples/auto.net | 2 +- - samples/auto.smb | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/samples/auto.net b/samples/auto.net -index 0384f61..61215f6 100755 ---- a/samples/auto.net -+++ b/samples/auto.net -@@ -1,4 +1,4 @@ --#!/bin/bash -+#!/bin/sh - - # This file must be executable to work! chmod 755! - -diff --git a/samples/auto.smb b/samples/auto.smb -index 6af5d85..d296b81 100755 ---- a/samples/auto.smb -+++ b/samples/auto.smb -@@ -1,4 +1,4 @@ --#!/bin/bash -+#!/bin/sh - - # This file must be executable to work! chmod 755! - diff --git a/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/pkgconfig-libnsl.patch b/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/pkgconfig-libnsl.patch deleted file mode 100644 index be750ab8..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/pkgconfig-libnsl.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 602f9ca83c2bdbf511bcb178fcb4b9fc54da955f Mon Sep 17 00:00:00 2001 -From: Changqing Li -Date: Tue, 27 Nov 2018 15:20:46 +0800 -Subject: [PATCH] From e3ae56cf0bb4063c31295f45d04e3c504f4b6cc7 Mon Sep 17 - 00:00:00 2001 From: Khem Raj Date: Mon, 24 Apr 2017 - 20:41:25 -0700 Subject: [PATCH] autofs: Upgrade to 5.1.2 release - -Use pkg-config first to look for external libnsl which is now -split out from glibc, if it does not exist then see if its provided -by glibc itself. - --Khem - -Upstream-Status: Pending - -update patch to version 5.1.5 -Signed-off-by: Changqing Li ---- - configure.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/configure.in b/configure.in -index 76ecb40..493b9f1 100644 ---- a/configure.in -+++ b/configure.in -@@ -238,7 +238,7 @@ AC_SUBST(LIBCLOCK_GETTIME) - - PKG_CHECK_MODULES([NSL],[libnsl],, - [ --AC_CHECK_LIB(nsl, yp_match, NSL_LIBS="-lnsl") -+PKG_CHECK_MODULES([NSL], [libnsl], [], [AC_CHECK_LIB([nsl],[yp_match],[LIBNSL="-lnsl"],[LIBNSL=""])]) - AC_SUBST(NSL_LIBS) - NSL_CFLAGS="" - ]) --- -2.7.4 - diff --git a/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/remove-bashism.patch b/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/remove-bashism.patch deleted file mode 100644 index 4183069b..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/remove-bashism.patch +++ /dev/null @@ -1,118 +0,0 @@ -From cfacbb917f87b903b50132a5025f86b0cc522e9c Mon Sep 17 00:00:00 2001 -From: Robert Yang -Date: Sat, 13 Sep 2014 20:19:28 -0700 -Subject: [PATCH] autofs.init.in: remove bashism - -It can work without the bashism. - -Upstream-Status: Pending - -Signed-off-by: Mike Looijmans -Signed-off-by: Robert Yang - ---- - redhat/autofs.init.in | 12 ++++++------ - samples/rc.autofs.in | 10 +++++----- - 2 files changed, 11 insertions(+), 11 deletions(-) - -diff --git a/redhat/autofs.init.in b/redhat/autofs.init.in -index 9d008ff..4f1c0d8 100644 ---- a/redhat/autofs.init.in -+++ b/redhat/autofs.init.in -@@ -1,4 +1,4 @@ --#!/bin/bash -+#!/bin/sh - # - # rc file for automount using a Sun-style "master map". - # -@@ -42,7 +42,7 @@ if [ -r $confdir/autofs ]; then - . $confdir/autofs - fi - --function start() { -+start() { - # Make sure autofs4 module is loaded - if ! grep -q autofs /proc/filesystems - then -@@ -102,7 +102,7 @@ function start() { - return $RETVAL - } - --function stop() { -+stop() { - echo -n $"Stopping $prog: " - count=0 - while [ -n "`pidof $prog`" -a $count -lt 15 ] ; do -@@ -125,7 +125,7 @@ function stop() { - return $RETVAL - } - --function restart() { -+restart() { - status autofs > /dev/null 2>&1 - if [ $? -eq 0 ]; then - stop -@@ -143,7 +143,7 @@ function restart() { - start - } - --function reload() { -+reload() { - if [ ! -f /var/lock/subsys/autofs ]; then - echo $"$prog not running" - RETVAL=1 -@@ -161,7 +161,7 @@ function reload() { - return $RETVAL - } - --function usage_message() { -+usage_message() { - echo $"Usage: $0 {start|forcestart|stop|status|restart|force-reload|forcerestart|reload|condrestart|try-restart|usage}" - } - -diff --git a/samples/rc.autofs.in b/samples/rc.autofs.in -index 487669f..e96cde1 100644 ---- a/samples/rc.autofs.in -+++ b/samples/rc.autofs.in -@@ -1,4 +1,4 @@ --#!/bin/bash -+#!/bin/sh - # - # rc file for automount using a Sun-style "master map". - # -@@ -36,7 +36,7 @@ if [ -r $confdir/autofs ]; then - . $confdir/autofs - fi - --function start() { -+start() { - echo -n "Starting $prog: " - - # Make sure autofs4 module is loaded -@@ -85,7 +85,7 @@ function start() { - return $RETVAL - } - --function stop() { -+stop() { - echo -n $"Stopping $prog: " - count=0 - while [ -n "`pidof $prog`" -a $count -lt 15 ] ; do -@@ -102,7 +102,7 @@ function stop() { - return $RETVAL - } - --function restart() { -+restart() { - stop - while [ -n "`pidof $prog`" ] ; do - sleep 5 -@@ -110,7 +110,7 @@ function restart() { - start - } - --function reload() { -+reload() { - pid=`pidof $prog` - if [ -z $pid ]; then - echo $"$prog not running" diff --git a/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/using-pkg-config-to-detect-libxml-2.0-and-krb5.patch b/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/using-pkg-config-to-detect-libxml-2.0-and-krb5.patch deleted file mode 100644 index 41de373f..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/using-pkg-config-to-detect-libxml-2.0-and-krb5.patch +++ /dev/null @@ -1,36 +0,0 @@ -From dd90a690f95569b999b8ac9ab57e834b3421dcbb Mon Sep 17 00:00:00 2001 -From: Changqing Li -Date: Tue, 27 Nov 2018 15:19:07 +0800 -Subject: [PATCH] From dabcbdae38038a8e4ad2c4286112381c407c5ce7 Mon Sep 17 - 00:00:00 2001 From: Roy Li Date: Tue, 19 Aug 2014 - 11:31:35 +0800 Subject: [PATCH] using pkg-config to detect libxml-2.0 and - krb5 - -Upstream-Status: Pending - -Signed-off-by: Roy Li - -update patch to 5.1.5 -Signed-off-by: Changqing Li ---- - configure.in | 16 ++++++++++++++-- - 1 file changed, 14 insertions(+), 2 deletions(-) - ---- a/configure.in -+++ b/configure.in -@@ -215,7 +215,14 @@ PKG_CHECK_MODULES([XML], [libxml-2.0], [ - AC_DEFINE(LIBXML2_WORKAROUND, 1, [Use libxml2 tsd usage workaround]) - ], [HAVE_LIBXML=0]) - --AF_CHECK_KRB5() -+PKG_CHECK_MODULES(KRB5, [krb5], [ -+ HAVE_KRB5=1 -+ SAVE_CFLAGS=$CFLAGS -+ SAVE_LIBS=$LIBS -+ CFLAGS="$CFLAGS $KRB5_FLAGS" -+ LIBS="$LIBS $KRB5_LIBS" -+ AC_CHECK_FUNCS([krb5_principal_get_realm]) -+], [HAVE_KRB5=0]) - - AC_SEARCH_LIBS([versionsort],[]) - if test "$ac_cv_search_versionsort" = "no"; then diff --git a/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs_5.1.8.bb b/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs_5.1.8.bb deleted file mode 100644 index e3f97773..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs_5.1.8.bb +++ /dev/null @@ -1,101 +0,0 @@ -SUMMARY = "Kernel based automounter for linux" -SECTION = "utils" -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=ee9324a6f564bb2376b63878ac396798" - -DEPENDS += "libtirpc flex-native bison-native e2fsprogs openssl libxml2 util-linux cyrus-sasl libnsl2" - -CFLAGS += "-I${STAGING_INCDIR}/tirpc" - -inherit autotools-brokensep systemd update-rc.d pkgconfig - -SRC_URI = "${KERNELORG_MIRROR}/linux/daemons/autofs/v5/autofs-${PV}.tar.gz \ - file://no-bash.patch \ - file://cross.patch \ - file://fix_disable_ldap.patch \ - file://autofs-5.0.7-fix-lib-deps.patch \ - file://add-the-needed-stdarg.h.patch \ - file://using-pkg-config-to-detect-libxml-2.0-and-krb5.patch \ - file://force-STRIP-to-emtpy.patch \ - file://remove-bashism.patch \ - file://fix-the-YACC-rule-to-fix-a-building-failure.patch \ - file://0001-Define-__SWORD_TYPE-and-_PATH_NSSWITCH_CONF.patch \ - file://0002-Replace-__S_IEXEC-with-S_IEXEC.patch \ - file://pkgconfig-libnsl.patch \ - file://0001-modules-lookup_multi.c-Replace-__S_IEXEC-with-S_IEXE.patch \ - file://0001-Do-not-hardcode-path-for-pkg.m4.patch \ - file://0001-Bug-fix-for-pid_t-not-found-on-musl.patch \ - file://0001-Define-__SWORD_TYPE-if-undefined.patch \ - file://mount_conflict.patch \ - file://0001-autofs-5.1.8-add-autofs_strerror_r-helper-for-musl.patch \ - file://0002-autofs-5.1.8-handle-innetgr-not-present-in-musl.patch \ - file://0001-include-libgen.h-for-basename.patch \ - " -SRC_URI[sha256sum] = "0bd401c56f0eb1ca6251344c3a3d70bface3eccf9c67117cd184422c4cace30c" - -UPSTREAM_CHECK_URI = "${KERNELORG_MIRROR}/linux/daemons/autofs/v5/" - -INITSCRIPT_NAME = "autofs" -INITSCRIPT_PARAMS = "defaults" - -# FIXME: modules/Makefile has crappy rules that don't obey LDFLAGS -#CFLAGS += "${LDFLAGS}" - -PACKAGECONFIG[systemd] = "--with-systemd=${systemd_unitdir}/system,--without-systemd,systemd" - -PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" - -EXTRA_OEMAKE = "DONTSTRIP=1" -EXTRA_OECONF += "--disable-mount-locking \ - --enable-ignore-busy --with-openldap=no \ - --with-confdir=${sysconfdir}/default \ - --with-fifodir=/run \ - --with-flagdir=/run \ - --with-sasl=no --with-libtirpc \ - --with-mapdir=${sysconfdir} \ - --with-path=${STAGING_BINDIR_NATIVE} \ - --with-fifodir=${localstatedir}/run \ - --with-flagdir=${localstatedir}/run \ -" -CACHED_CONFIGUREVARS = "ac_cv_path_RANLIB=${RANLIB} \ - ac_cv_path_RPCGEN=rpcgen \ - initdir=${INIT_D_DIR} \ - piddir=/run \ -" - -do_configure:prepend () { - if [ ! -e ${S}/acinclude.m4 ]; then - cp ${S}/aclocal.m4 ${S}/acinclude.m4 - fi - cp ${STAGING_DATADIR_NATIVE}/aclocal/pkg.m4 . -} - -do_install:append () { - # samples have been removed from SUBDIRS from 5.1.5, need to install separately - oe_runmake 'DESTDIR=${D}' install_samples - - if [ -d ${D}/run ]; then - rmdir ${D}/run - fi - if [ -d ${D}${localstatedir}/run ]; then - rmdir ${D}${localstatedir}/run - fi - # On hybrid systemd/sysvinit builds, we need to install the sysvinit script by hand. - if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then - install -d -m 755 ${D}${INIT_D_DIR} - install -m 755 ${S}/samples/rc.autofs ${D}${INIT_D_DIR}/autofs - fi -} -SECURITY_CFLAGS = "${SECURITY_NO_PIE_CFLAGS}" - -# all the libraries are unversioned, so don't pack it on PN-dev -SOLIBS = ".so" -FILES_SOLIBSDEV = "" -# Some symlinks are created in plugins dir e.g. -# mount_nfs4.so -> mount_nfs.so -INSANE_SKIP:${PN} = "dev-so" - -RPROVIDES:${PN} += "${PN}-systemd" -RREPLACES:${PN} += "${PN}-systemd" -RCONFLICTS:${PN} += "${PN}-systemd" -SYSTEMD_SERVICE:${PN} = "autofs.service" diff --git a/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs_5.1.9.bb b/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs_5.1.9.bb new file mode 100644 index 00000000..bc52f40d --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs_5.1.9.bb @@ -0,0 +1,90 @@ +SUMMARY = "Kernel based automounter for linux" +SECTION = "utils" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=ee9324a6f564bb2376b63878ac396798" + +DEPENDS += "libtirpc flex-native bison-native e2fsprogs openssl util-linux libnsl2" + +CFLAGS += "-I${STAGING_INCDIR}/tirpc" + +inherit autotools-brokensep systemd update-rc.d pkgconfig + +SRC_URI = "${KERNELORG_MIRROR}/linux/daemons/autofs/v5/autofs-${PV}.tar.gz \ + file://0001-no-bash.patch \ + file://0002-using-pkg-config-to-detect-krb5.patch \ + file://0003-force-STRIP-to-emtpy.patch \ + file://0004-autofs.init.in-remove-bashism.patch \ + file://0005-fix-the-YACC-rule-to-fix-a-building-failure.patch \ + file://0006-Do-not-hardcode-path-for-pkg.m4.patch \ + file://0007-Avoid-conflicts-between-sys-mount.h-and-linux-mount..patch \ + file://0008-include-libgen.h-for-basename.patch \ + file://0009-hash.h-include-sys-reg.h-instead-of-bits-reg.h.patch \ + file://0010-autofs-5.1.9-Fix-incompatible-function-pointer-types.patch \ + " +SRC_URI[sha256sum] = "46c30b763ef896f4c4a6df6d62aaaef7afc410e0b7f50d52dbfc6cf728cacd4f" + +UPSTREAM_CHECK_URI = "${KERNELORG_MIRROR}/linux/daemons/autofs/v5/" + +INITSCRIPT_NAME = "autofs" +INITSCRIPT_PARAMS = "defaults" + +PACKAGECONFIG[systemd] = "--with-systemd=${systemd_unitdir}/system,--without-systemd,systemd" +PACKAGECONFIG[openldap] = "--with-openldap=yes,--with-openldap=no,libxml2 openldap" +PACKAGECONFIG[sasl] = "--with-sasl=yes,--with-sasl=no,cyrus-sasl krb5" + +PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" + +EXTRA_OEMAKE = "DONTSTRIP=1" +EXTRA_OECONF += "--disable-mount-locking \ + --enable-ignore-busy \ + --with-confdir=${sysconfdir}/default \ + --with-fifodir=/run \ + --with-flagdir=/run \ + --with-libtirpc \ + --with-mapdir=${sysconfdir} \ + --with-path=${STAGING_BINDIR_NATIVE} \ + --with-fifodir=${localstatedir}/run \ + --with-flagdir=${localstatedir}/run \ +" +CACHED_CONFIGUREVARS = "ac_cv_path_RANLIB=${RANLIB} \ + ac_cv_path_RPCGEN=rpcgen \ + initdir=${INIT_D_DIR} \ + piddir=/run \ +" + +do_configure:prepend () { + if [ ! -e ${S}/acinclude.m4 ]; then + cp ${S}/aclocal.m4 ${S}/acinclude.m4 + fi + cp ${STAGING_DATADIR_NATIVE}/aclocal/pkg.m4 . +} + +do_install:append () { + # samples have been removed from SUBDIRS from 5.1.5, need to install separately + oe_runmake 'DESTDIR=${D}' install_samples + + if [ -d ${D}/run ]; then + rmdir ${D}/run + fi + if [ -d ${D}${localstatedir}/run ]; then + rmdir ${D}${localstatedir}/run + fi + # On hybrid systemd/sysvinit builds, we need to install the sysvinit script by hand. + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then + install -d -m 755 ${D}${INIT_D_DIR} + install -m 755 ${S}/samples/rc.autofs ${D}${INIT_D_DIR}/autofs + fi +} +SECURITY_CFLAGS = "${SECURITY_NO_PIE_CFLAGS}" + +# all the libraries are unversioned, so don't pack it on PN-dev +SOLIBS = ".so" +FILES_SOLIBSDEV = "" +# Some symlinks are created in plugins dir e.g. +# mount_nfs4.so -> mount_nfs.so +INSANE_SKIP:${PN} = "dev-so" + +RPROVIDES:${PN} += "${PN}-systemd" +RREPLACES:${PN} += "${PN}-systemd" +RCONFLICTS:${PN} += "${PN}-systemd" +SYSTEMD_SERVICE:${PN} = "autofs.service" diff --git a/sources/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool_1.3.bb b/sources/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool_1.3.bb index 36ea2899..90e7814a 100644 --- a/sources/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool_1.3.bb +++ b/sources/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool_1.3.bb @@ -42,7 +42,7 @@ inherit systemd DEPENDS = "readline ppp ncurses gzip-native rpcsvc-proto-native libtirpc" RDEPENDS:${PN} = "rpcbind" -EXTRA_OEMAKE = "CC='${CC}' AS='${AS}' LD='${LD}' AR='${AR}' NM='${NM}' STRIP='${STRIP}'" +EXTRA_OEMAKE = "CC='${CC} ${CFLAGS}' AS='${AS}' LD='${LD} ${LDFLAGS}' AR='${AR}' NM='${NM}' STRIP='${STRIP}'" EXTRA_OEMAKE += "PPPD_VERSION=${PPPD_VERSION} SYS_LIBDIR=${libdir}" # enable self tests EXTRA_OEMAKE += "IPPOOL_TEST=y" @@ -52,12 +52,7 @@ CPPFLAGS += "${SELECTED_OPTIMIZATION} -I${STAGING_INCDIR}/tirpc" SYSTEMD_SERVICE:${PN} = "ippool.service" do_compile:prepend() { - # fix the CFLAGS= and CPPFLAGS= in main Makefile, to have the extra CFLAGS in env - sed -i -e "s/^CFLAGS=/CFLAGS+=/" ${S}/Makefile - sed -i -e "s/^CPPFLAGS=/CPPFLAGS+=/" ${S}/Makefile - sed -i -e "s:-I/usr/include/pppd:-I=/usr/include/pppd:" ${S}/pppd/Makefile - } @@ -65,14 +60,14 @@ do_install() { oe_runmake DESTDIR=${D} install install -D -m 0755 ${S}/debian/init.d ${D}${sysconfdir}/init.d/ippoold - install -D -m 0644 ${WORKDIR}/ippool.service ${D}${systemd_system_unitdir}/ippool.service + install -D -m 0644 ${UNPACKDIR}/ippool.service ${D}${systemd_system_unitdir}/ippool.service sed -i -e 's:@SBINDIR@:${sbindir}:g' ${D}${systemd_system_unitdir}/ippool.service # install self test install -d ${D}/opt/${BPN} install ${S}/test/all.tcl ${S}/test/ippool.test \ ${S}/test/test_procs.tcl ${D}/opt/${BPN} - install ${WORKDIR}/runtest.sh ${D}/opt/${BPN} + install ${UNPACKDIR}/runtest.sh ${D}/opt/${BPN} # fix the ../ippoolconfig in test_procs.tcl sed -i -e "s:../ippoolconfig:ippoolconfig:" \ ${D}/opt/${BPN}/test_procs.tcl diff --git a/sources/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.1.10.bb b/sources/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.1.10.bb new file mode 100644 index 00000000..6a272775 --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.1.10.bb @@ -0,0 +1,118 @@ +SUMMARY = "iSCSI daemon and utility programs" +DESCRIPTION = "Open-iSCSI project is a high performance, transport \ +independent, multi-platform implementation of RFC3720. The iscsi package \ +provides the server daemon for the iSCSI protocol, as well as the utility \ +programs used to manage it. iSCSI is a protocol for distributed \ +disk access using SCSI commands sent over Internet Protocol networks." +HOMEPAGE = "http://www.open-iscsi.com/" +LICENSE = "GPL-2.0-only & LGPL-2.1-only" +SECTION = "net" +DEPENDS = "openssl flex-native bison-native open-isns util-linux kmod" +DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}" + +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +SRCREV = "d0f04ae4b9bf0bc0be55fbda5f235afdfbf5dd19" + +SRC_URI = "git://github.com/open-iscsi/open-iscsi;branch=master;protocol=https \ + file://0001-Makefile-Do-not-set-Werror.patch \ + file://initd.debian \ + file://99_iscsi-initiator-utils \ + file://iscsi-initiator \ + file://iscsi-initiator.service \ + file://iscsi-initiator-targets.service \ + file://set_initiatorname \ + " +S = "${WORKDIR}/git" + +inherit update-rc.d systemd autotools pkgconfig + +EXTRA_OECONF = " \ + --target=${TARGET_SYS} \ + --host=${BUILD_SYS} \ +" + +EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', '--without-systemd NO_SYSTEMD=1', d)}" + +EXTRA_OEMAKE = ' \ + OS="${TARGET_SYS}" \ + TARGET="${TARGET_OS}" \ + BASE="${prefix}" \ + MANDIR="${mandir}" \ + OPTFLAGS="-DNO_SYSTEMD ${CFLAGS}" \ + PKG_CONFIG="${STAGING_BINDIR_NATIVE}/pkg-config" \ + SED=sed \ +' + + +do_configure () { + cd ${S}/iscsiuio ; autoreconf --install; ./configure ${EXTRA_OECONF} +} + +do_compile () { + # Make sure we DO NOT regenerate prom_lex.c. + if [ -f ${S}/utils/fwparam_ibft/prom_lex.l ]; then + mv ${S}/utils/fwparam_ibft/prom_lex.l ${S}/utils/fwparam_ibft/prom_lex.l.unused + fi + oe_runmake -C ${S} ${EXTRA_OEMAKE} user +} + +do_install () { + #install necessary directories + install -d ${D}${sbindir} \ + ${D}${sysconfdir}/init.d \ + ${D}${sysconfdir}/iscsi \ + ${D}${localstatedir}/lib/iscsi/nodes \ + ${D}${localstatedir}/lib/iscsi/send_targets \ + ${D}${localstatedir}/lib/iscsi/static \ + ${D}${localstatedir}/lib/iscsi/isns \ + ${D}${localstatedir}/lib/iscsi/slp \ + ${D}${localstatedir}/lib/iscsi/ifaces \ + ${D}${libdir} \ + ${D}${mandir}/man8 + + install -p -m 755 ${S}/usr/iscsid ${S}/usr/iscsiadm \ + ${S}/utils/iscsi-iname \ + ${S}/usr/iscsistart ${D}/${sbindir} + + cp -dR ${S}/libopeniscsiusr/libopeniscsiusr.so* ${D}${libdir} + install -p -m 644 ${S}/doc/iscsiadm.8 ${S}/doc/iscsid.8 ${D}/${mandir}/man8 + install -p -m 644 ${S}/etc/iscsid.conf ${D}${sysconfdir}/iscsi + install -p -m 755 ${UNPACKDIR}/initd.debian ${D}${sysconfdir}/init.d/iscsid + + sed -i -e "s:= /sbin/iscsid:= ${sbindir}/iscsid:" ${D}${sysconfdir}/iscsi/iscsid.conf + + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + install -d ${D}${sysconfdir}/tmpfiles.d + echo "d /run/${BPN}/lock - - - -" \ + > ${D}${sysconfdir}/tmpfiles.d/iscsi.conf + install -d ${D}/etc/default/ + install -p -m 755 ${UNPACKDIR}/iscsi-initiator ${D}${sysconfdir}/default/ + + install -d ${D}${systemd_unitdir}/system/ + install -m 0644 ${UNPACKDIR}/iscsi-initiator.service \ + ${UNPACKDIR}/iscsi-initiator-targets.service \ + ${D}${systemd_unitdir}/system/ + install -d ${D}${nonarch_libdir}/iscsi + install -m 0755 ${UNPACKDIR}/set_initiatorname ${D}${nonarch_libdir}/iscsi + else + install -d ${D}/etc/default/volatiles + install -m 0644 ${UNPACKDIR}/99_iscsi-initiator-utils ${D}/etc/default/volatiles + fi +} + +pkg_postinst:${PN}() { + if [ "x$D" = "x" ]; then + if [ -e /etc/init.d/populate-volatile.sh ]; then + /etc/init.d/populate-volatile.sh update + elif command -v systemd-tmpfiles >/dev/null; then + systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/iscsi.conf + fi + fi +} + +SYSTEMD_SERVICE = " iscsi-initiator.service iscsi-initiator-targets.service " +INITSCRIPT_NAME = "iscsid" +INITSCRIPT_PARAMS = "start 30 1 2 3 4 5 . stop 70 0 1 2 3 4 5 6 ." + +FILES:${PN} += "${nonarch_libdir}/iscsi" diff --git a/sources/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.1.8.bb b/sources/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.1.8.bb deleted file mode 100644 index 2caddbb5..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.1.8.bb +++ /dev/null @@ -1,118 +0,0 @@ -SUMMARY = "iSCSI daemon and utility programs" -DESCRIPTION = "Open-iSCSI project is a high performance, transport \ -independent, multi-platform implementation of RFC3720. The iscsi package \ -provides the server daemon for the iSCSI protocol, as well as the utility \ -programs used to manage it. iSCSI is a protocol for distributed \ -disk access using SCSI commands sent over Internet Protocol networks." -HOMEPAGE = "http://www.open-iscsi.com/" -LICENSE = "GPL-2.0-only & LGPL-2.1-only" -SECTION = "net" -DEPENDS = "openssl flex-native bison-native open-isns util-linux kmod" -DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}" - -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" - -SRCREV = "543ba0f15d340b97f30782308cec424a6738fec3" - -SRC_URI = "git://github.com/open-iscsi/open-iscsi;branch=master;protocol=https \ - file://0001-Makefile-Do-not-set-Werror.patch \ - file://initd.debian \ - file://99_iscsi-initiator-utils \ - file://iscsi-initiator \ - file://iscsi-initiator.service \ - file://iscsi-initiator-targets.service \ - file://set_initiatorname \ - " -S = "${WORKDIR}/git" - -inherit update-rc.d systemd autotools pkgconfig - -EXTRA_OECONF = " \ - --target=${TARGET_SYS} \ - --host=${BUILD_SYS} \ -" - -EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', '--without-systemd NO_SYSTEMD=1', d)}" - -EXTRA_OEMAKE = ' \ - OS="${TARGET_SYS}" \ - TARGET="${TARGET_OS}" \ - BASE="${prefix}" \ - MANDIR="${mandir}" \ - OPTFLAGS="-DNO_SYSTEMD ${CFLAGS}" \ - PKG_CONFIG="${STAGING_BINDIR_NATIVE}/pkg-config" \ - SED=sed \ -' - - -do_configure () { - cd ${S}/iscsiuio ; autoreconf --install; ./configure ${EXTRA_OECONF} -} - -do_compile () { - # Make sure we DO NOT regenerate prom_lex.c. - if [ -f ${S}/utils/fwparam_ibft/prom_lex.l ]; then - mv ${S}/utils/fwparam_ibft/prom_lex.l ${S}/utils/fwparam_ibft/prom_lex.l.unused - fi - oe_runmake -C ${S} ${EXTRA_OEMAKE} user -} - -do_install () { - #install necessary directories - install -d ${D}${sbindir} \ - ${D}${sysconfdir}/init.d \ - ${D}${sysconfdir}/iscsi \ - ${D}${localstatedir}/lib/iscsi/nodes \ - ${D}${localstatedir}/lib/iscsi/send_targets \ - ${D}${localstatedir}/lib/iscsi/static \ - ${D}${localstatedir}/lib/iscsi/isns \ - ${D}${localstatedir}/lib/iscsi/slp \ - ${D}${localstatedir}/lib/iscsi/ifaces \ - ${D}${libdir} \ - ${D}${mandir}/man8 - - install -p -m 755 ${S}/usr/iscsid ${S}/usr/iscsiadm \ - ${S}/utils/iscsi-iname \ - ${S}/usr/iscsistart ${D}/${sbindir} - - cp -dR ${S}/libopeniscsiusr/libopeniscsiusr.so* ${D}${libdir} - install -p -m 644 ${S}/doc/iscsiadm.8 ${S}/doc/iscsid.8 ${D}/${mandir}/man8 - install -p -m 644 ${S}/etc/iscsid.conf ${D}${sysconfdir}/iscsi - install -p -m 755 ${WORKDIR}/initd.debian ${D}${sysconfdir}/init.d/iscsid - - sed -i -e "s:= /sbin/iscsid:= ${sbindir}/iscsid:" ${D}${sysconfdir}/iscsi/iscsid.conf - - if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then - install -d ${D}${sysconfdir}/tmpfiles.d - echo "d /run/${BPN}/lock - - - -" \ - > ${D}${sysconfdir}/tmpfiles.d/iscsi.conf - install -d ${D}/etc/default/ - install -p -m 755 ${WORKDIR}/iscsi-initiator ${D}${sysconfdir}/default/ - - install -d ${D}${systemd_unitdir}/system/ - install -m 0644 ${WORKDIR}/iscsi-initiator.service \ - ${WORKDIR}/iscsi-initiator-targets.service \ - ${D}${systemd_unitdir}/system/ - install -d ${D}${nonarch_libdir}/iscsi - install -m 0755 ${WORKDIR}/set_initiatorname ${D}${nonarch_libdir}/iscsi - else - install -d ${D}/etc/default/volatiles - install -m 0644 ${WORKDIR}/99_iscsi-initiator-utils ${D}/etc/default/volatiles - fi -} - -pkg_postinst:${PN}() { - if [ "x$D" = "x" ]; then - if [ -e /etc/init.d/populate-volatile.sh ]; then - /etc/init.d/populate-volatile.sh update - elif command -v systemd-tmpfiles >/dev/null; then - systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/iscsi.conf - fi - fi -} - -SYSTEMD_SERVICE = " iscsi-initiator.service iscsi-initiator-targets.service " -INITSCRIPT_NAME = "iscsid" -INITSCRIPT_PARAMS = "start 30 1 2 3 4 5 . stop 70 0 1 2 3 4 5 6 ." - -FILES:${PN} += "${nonarch_libdir}/iscsi" diff --git a/sources/meta-openembedded/meta-networking/recipes-daemons/lldpd/lldpd_1.0.18.bb b/sources/meta-openembedded/meta-networking/recipes-daemons/lldpd/lldpd_1.0.18.bb index 370465e1..4deab153 100644 --- a/sources/meta-openembedded/meta-networking/recipes-daemons/lldpd/lldpd_1.0.18.bb +++ b/sources/meta-openembedded/meta-networking/recipes-daemons/lldpd/lldpd_1.0.18.bb @@ -48,8 +48,8 @@ INITSCRIPT_PARAMS = "defaults" SYSTEMD_SERVICE:${PN} = "lldpd.service" do_install:append() { - install -Dm 0755 ${WORKDIR}/lldpd.init.d ${D}${sysconfdir}/init.d/lldpd - install -Dm 0644 ${WORKDIR}/lldpd.default ${D}${sysconfdir}/default/lldpd + install -Dm 0755 ${UNPACKDIR}/lldpd.init.d ${D}${sysconfdir}/init.d/lldpd + install -Dm 0644 ${UNPACKDIR}/lldpd.default ${D}${sysconfdir}/default/lldpd # Make an empty configuration file touch ${D}${sysconfdir}/lldpd.conf } diff --git a/sources/meta-openembedded/meta-networking/recipes-daemons/ncftp/ncftp_3.2.7.bb b/sources/meta-openembedded/meta-networking/recipes-daemons/ncftp/ncftp_3.2.7.bb index 15bb00a3..de111cac 100644 --- a/sources/meta-openembedded/meta-networking/recipes-daemons/ncftp/ncftp_3.2.7.bb +++ b/sources/meta-openembedded/meta-networking/recipes-daemons/ncftp/ncftp_3.2.7.bb @@ -28,3 +28,7 @@ do_install () { 'SYSCONFDIR=${D}${sysconfdir}' 'mandir=${D}${mandir}' \ install } + +# http://errors.yoctoproject.org/Errors/Details/766888/ +# ncftp/3.2.7/ncftp-3.2.7/config.h:358:28: error: passing argument 2 of 'select' from incompatible pointer type [-Wincompatible-pointer-types] +CFLAGS += "-Wno-error=incompatible-pointer-types" diff --git a/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/openhpi_3.8.0.bb b/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/openhpi_3.8.0.bb index 32c4783c..ac13d7a1 100644 --- a/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/openhpi_3.8.0.bb +++ b/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/openhpi_3.8.0.bb @@ -75,10 +75,10 @@ do_install:append () { install -m 0600 ${S}/openhpi.conf.example ${D}${sysconfdir}/${BPN}/openhpi.conf install -m 0644 ${S}/simulation.data.example ${D}${sysconfdir}/${BPN}/simulation.data install -m 0644 ${S}/test_agent.data.example ${D}${sysconfdir}/${BPN}/test_agent.data - install -m 0755 ${WORKDIR}/openhpi.init ${D}${sysconfdir}/init.d/openhpid + install -m 0755 ${UNPACKDIR}/openhpi.init ${D}${sysconfdir}/init.d/openhpid install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/openhpid.service ${D}${systemd_unitdir}/system + install -m 0644 ${UNPACKDIR}/openhpid.service ${D}${systemd_unitdir}/system sed -i -e "s,@SBINDIR@,${sbindir},g" -e "s,@SYSCONFDIR@,${sysconfdir},g" \ ${D}${systemd_unitdir}/system/openhpid.service } diff --git a/sources/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix_3.8.6.bb b/sources/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix_3.8.6.bb index 3ec7f22a..d48e9145 100644 --- a/sources/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix_3.8.6.bb +++ b/sources/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix_3.8.6.bb @@ -136,21 +136,21 @@ do_install () { mv ${D}${sysconfdir}/postfix/main.cf ${D}${sysconfdir}/postfix/${MLPREFIX}sample-main.cf install -m 755 ${S}/bin/smtp-sink ${D}/${sbindir}/ install -d ${D}${sysconfdir}/init.d - install -m 644 ${WORKDIR}/main.cf ${D}${sysconfdir}/postfix/main.cf + install -m 644 ${UNPACKDIR}/main.cf ${D}${sysconfdir}/postfix/main.cf sed -i 's#@LIBEXECDIR@#${libexecdir}#' ${D}${sysconfdir}/postfix/main.cf - install -m 755 ${WORKDIR}/check_hostname.sh ${D}${sbindir}/ + install -m 755 ${UNPACKDIR}/check_hostname.sh ${D}${sbindir}/ - install -m 755 ${WORKDIR}/postfix ${D}${sysconfdir}/init.d/postfix - install -m 644 ${WORKDIR}/internal_recipient ${D}${sysconfdir}/postfix/internal_recipient + install -m 755 ${UNPACKDIR}/postfix ${D}${sysconfdir}/init.d/postfix + install -m 644 ${UNPACKDIR}/internal_recipient ${D}${sysconfdir}/postfix/internal_recipient install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/postfix.service ${D}${systemd_unitdir}/system + install -m 0644 ${UNPACKDIR}/postfix.service ${D}${systemd_unitdir}/system sed -i -e 's#@LIBEXECDIR@#${libexecdir}#g' ${D}${systemd_unitdir}/system/postfix.service sed -i -e 's#@LOCALSTATEDIR@#${localstatedir}#g' ${D}${systemd_unitdir}/system/postfix.service sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/postfix.service - install -m 0755 ${WORKDIR}/aliasesdb ${D}${libexecdir}/postfix + install -m 0755 ${UNPACKDIR}/aliasesdb ${D}${libexecdir}/postfix install -m 770 -d ${D}${localstatedir}/spool/postfix chown postfix:postfix ${D}${localstatedir}/spool/postfix diff --git a/sources/meta-openembedded/meta-networking/recipes-daemons/proftpd/files/CVE-2024-57392.patch b/sources/meta-openembedded/meta-networking/recipes-daemons/proftpd/files/CVE-2024-57392.patch deleted file mode 100644 index 0b50175a..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-daemons/proftpd/files/CVE-2024-57392.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 981a37916fdb7b73435c6d5cdb01428b2269427d Mon Sep 17 00:00:00 2001 -From: TJ Saunders -Date: Sun, 9 Feb 2025 12:14:25 -0800 -Subject: [PATCH] Issue #1866: Some of the fuzzing tests submitted in the - advisory ran into existing null pointer dereferences (not buffer overflows); - let's correct them. (#1867) - -Upstream-Status: Backport [https://github.com/proftpd/proftpd/commit/981a37916fdb7b73435c6d5cdb01428b2269427d] -CVE: CVE-2024-57392 -Signed-off-by: Vijay Anusuri ---- - modules/mod_ls.c | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - -diff --git a/modules/mod_ls.c b/modules/mod_ls.c -index 45a3187bd..f7abfe540 100644 ---- a/modules/mod_ls.c -+++ b/modules/mod_ls.c -@@ -349,7 +349,8 @@ static int sendline(int flags, char *fmt, ...) { - errno != 0) { - int xerrno = errno; - -- if (session.d != NULL) { -+ if (session.d != NULL && -+ session.d->outstrm != NULL) { - xerrno = PR_NETIO_ERRNO(session.d->outstrm); - } - -@@ -1039,7 +1040,9 @@ static int outputfiles(cmd_rec *cmd) { - return res; - } - -- tail->down = NULL; -+ if (tail != NULL) { -+ tail->down = NULL; -+ } - tail = NULL; - colwidth = (colwidth | 7) + 1; - if (opt_l || !opt_C) { --- -2.25.1 - diff --git a/sources/meta-openembedded/meta-networking/recipes-daemons/proftpd/proftpd_1.3.7c.bb b/sources/meta-openembedded/meta-networking/recipes-daemons/proftpd/proftpd_1.3.7c.bb deleted file mode 100644 index b45cb6aa..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-daemons/proftpd/proftpd_1.3.7c.bb +++ /dev/null @@ -1,147 +0,0 @@ -SUMMARY = "Secure and configurable FTP server" -SECTION = "net" -HOMEPAGE = "http://www.proftpd.org" -LICENSE = "GPL-2.0-or-later" -LIC_FILES_CHKSUM = "file://COPYING;md5=fb0d1484d11915fa88a6a7702f1dc184" - -SRCREV = "75aa739805a6e05eeb31189934a3d324e7862962" -BRANCH = "1.3.7" - -SRC_URI = "git://github.com/proftpd/proftpd.git;branch=${BRANCH};protocol=https \ - file://basic.conf.patch \ - file://proftpd-basic.init \ - file://default \ - file://close-RequireValidShell-check.patch \ - file://contrib.patch \ - file://build_fixup.patch \ - file://proftpd.service \ - file://CVE-2024-57392.patch \ - " - -S = "${WORKDIR}/git" - -inherit autotools-brokensep useradd update-rc.d systemd multilib_script - -EXTRA_OECONF += "--enable-largefile" - -PACKAGECONFIG ??= "shadow \ - ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6 pam', d)} \ - static \ - " - -PACKAGECONFIG[curses] = "--enable-curses --enable-ncurses, --disable-curses --disable-ncurses, ncurses" -PACKAGECONFIG[openssl] = "--enable-openssl, --disable-openssl, openssl, openssl" -PACKAGECONFIG[pam] = "--enable-auth-pam, --disable-auth-pam, libpam, libpam" -PACKAGECONFIG[ipv6] = "--enable-ipv6, --disable-ipv6" -PACKAGECONFIG[shadow] = "--enable-shadow, --disable-shadow" -PACKAGECONFIG[pcre] = "--enable-pcre, --disable-pcre, libpcre " -PACKAGECONFIG[static] = "--enable-static=yes, --enable-static=no" - -# enable POSIX.1e capabilities -PACKAGECONFIG[cap] = "--enable-cap, --disable-cap, libcap, libcap" - -#enable support for POSIX ACLs -PACKAGECONFIG[acl] = "--enable-facl, --disable-facl" - -#enable proftpd controls via ftpdct -PACKAGECONFIG[ctrls] = "--enable-ctrls, --disable-crtls" - -#prevent proftpd from using its bundled getopt implementation. -PACKAGECONFIG[getopt] = "--with-getopt, --without-getopt" - -#do not strip debugging symbols from installed code -PACKAGECONFIG[strip] = "--enable-strip, --disable-strip" - -#enable SIA authentication support (Tru64) -PACKAGECONFIG[sia] = "--enable-sia, --disable-sia" -PACKAGECONFIG[sendfile] = "-enable-sendfile, --disable-sendfile" - -#enable Native Language Support (NLS) -PACKAGECONFIG[nls] = "--enable-nls, --disable-nls" - -#add mod_dso to core modules -PACKAGECONFIG[dso] = "--enable-dso, --disable-dso" - -#omit mod_auth_file from core modules -PACKAGECONFIG[auth] = "--enable-auth-file, --disable-auth-file" - -# proftpd uses libltdl which currently makes configuring using -# autotools.bbclass a pain... -do_configure () { - install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S} - install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S} - oe_runconf -} - -FTPUSER = "ftp" -FTPGROUP = "ftp" - -do_install () { - oe_runmake DESTDIR=${D} install - rmdir ${D}${libdir}/proftpd ${D}${datadir}/locale - [ -d ${D}${libexecdir} ] && rmdir ${D}${libexecdir} - sed -i '/ *User[ \t]*/s/ftp/${FTPUSER}/' ${D}${sysconfdir}/proftpd.conf - sed -i '/ *Group[ \t]*/s/ftp/${FTPGROUP}/' ${D}${sysconfdir}/proftpd.conf - install -d ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/proftpd-basic.init ${D}${sysconfdir}/init.d/proftpd - sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/proftpd - sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/proftpd - sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/proftpd - sed -i 's!^PATH=.*!PATH=${base_sbindir}:${base_bindir}:${sbindir}:${bindir}!' ${D}${sysconfdir}/init.d/proftpd - - install -d ${D}${sysconfdir}/default - install -m 0755 ${WORKDIR}/default ${D}${sysconfdir}/default/proftpd - - # create the pub directory - mkdir -p ${D}/home/${FTPUSER}/pub/ - chown -R ${FTPUSER}:${FTPGROUP} ${D}/home/${FTPUSER}/pub - if ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'true', 'false', d)}; then - # install proftpd pam configuration - install -d ${D}${sysconfdir}/pam.d - install -m 644 ${S}/contrib/dist/rpm/ftp.pamd ${D}${sysconfdir}/pam.d/proftpd - sed -i '/ftpusers/d' ${D}${sysconfdir}/pam.d/proftpd - # specify the user Authentication config - sed -i '/^MaxInstances/a\AuthPAM on\nAuthPAMConfig proftpd' \ - ${D}${sysconfdir}/proftpd.conf - fi - - install -d ${D}/${systemd_unitdir}/system - install -m 644 ${WORKDIR}/proftpd.service ${D}/${systemd_unitdir}/system - sed -e 's,@BASE_SBINDIR@,${base_sbindir},g' \ - -e 's,@SYSCONFDIR@,${sysconfdir},g' \ - -e 's,@SBINDIR@,${sbindir},g' \ - -i ${D}${systemd_unitdir}/system/*.service - - sed -e 's|--sysroot=${STAGING_DIR_HOST}||g' \ - -e 's|${STAGING_DIR_NATIVE}||g' \ - -e 's|-ffile-prefix-map=[^ ]*||g' \ - -e 's|-fdebug-prefix-map=[^ ]*||g' \ - -e 's|-fmacro-prefix-map=[^ ]*||g' \ - -i ${D}/${bindir}/prxs - - # ftpmail perl script, which reads the proftpd log file and sends - # automatic email notifications once an upload finishs, - # depends on an old perl Mail::Sendmail - # The Mail::Sendmail has not been maintained for almost 10 years - # Other distribution not ship with ftpmail, so do the same to - # avoid confusion about having it fails to run - rm -rf ${D}${bindir}/ftpmail - rm -rf ${D}${mandir}/man1/ftpmail.1 -} - -INITSCRIPT_NAME = "proftpd" -INITSCRIPT_PARAM = "defaults 85 15" - -SYSTEMD_PACKAGES = "${PN}" -SYSTEMD_SERVICE:${PN} = "proftpd.service" - -USERADD_PACKAGES = "${PN}" -GROUPADD_PARAM:${PN} = "--system ${FTPGROUP}" -USERADD_PARAM:${PN} = "--system -g ${FTPGROUP} --home-dir /var/lib/${FTPUSER} --no-create-home \ - --shell /bin/false ${FTPUSER}" - -MULTILIB_SCRIPTS = "${PN}:${bindir}/prxs" - -FILES:${PN} += "/home/${FTPUSER}" - -RDEPENDS:${PN} += "perl" diff --git a/sources/meta-openembedded/meta-networking/recipes-daemons/proftpd/proftpd_1.3.8b.bb b/sources/meta-openembedded/meta-networking/recipes-daemons/proftpd/proftpd_1.3.8b.bb new file mode 100644 index 00000000..ce31c8a4 --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-daemons/proftpd/proftpd_1.3.8b.bb @@ -0,0 +1,154 @@ +SUMMARY = "Secure and configurable FTP server" +SECTION = "net" +HOMEPAGE = "http://www.proftpd.org" +LICENSE = "GPL-2.0-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=fb0d1484d11915fa88a6a7702f1dc184" + +SRCREV = "0a7ea9b0ba9fcdf368374a226370d08f10397d99" +BRANCH = "1.3.8" + +SRC_URI = "git://github.com/proftpd/proftpd.git;branch=${BRANCH};protocol=https \ + file://basic.conf.patch \ + file://proftpd-basic.init \ + file://default \ + file://close-RequireValidShell-check.patch \ + file://contrib.patch \ + file://build_fixup.patch \ + file://proftpd.service \ + " + +S = "${WORKDIR}/git" + +inherit autotools-brokensep useradd update-rc.d systemd multilib_script + +CVE_STATUS[CVE-2001-0027] = "fixed-version: version 1.2.0rc3 removed affected module" + +EXTRA_OECONF += "--enable-largefile INSTALL=install" + +PACKAGECONFIG ??= "shadow \ + ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6 pam', d)} \ + static \ + " + +PACKAGECONFIG[curses] = "--enable-curses --enable-ncurses, --disable-curses --disable-ncurses, ncurses" +PACKAGECONFIG[openssl] = "--enable-openssl, --disable-openssl, openssl, openssl" +PACKAGECONFIG[pam] = "--enable-auth-pam, --disable-auth-pam, libpam, libpam" +PACKAGECONFIG[ipv6] = "--enable-ipv6, --disable-ipv6" +PACKAGECONFIG[shadow] = "--enable-shadow, --disable-shadow" +PACKAGECONFIG[pcre] = "--enable-pcre, --disable-pcre, libpcre " +PACKAGECONFIG[static] = "--enable-static=yes, --enable-static=no" + +# enable POSIX.1e capabilities +PACKAGECONFIG[cap] = "--enable-cap, --disable-cap, libcap, libcap" + +#enable support for POSIX ACLs +PACKAGECONFIG[acl] = "--enable-facl, --disable-facl" + +#enable proftpd controls via ftpdct +PACKAGECONFIG[ctrls] = "--enable-ctrls, --disable-crtls" + +#prevent proftpd from using its bundled getopt implementation. +PACKAGECONFIG[getopt] = "--with-getopt, --without-getopt" + +#do not strip debugging symbols from installed code +PACKAGECONFIG[strip] = "--enable-strip, --disable-strip" + +#enable SIA authentication support (Tru64) +PACKAGECONFIG[sia] = "--enable-sia, --disable-sia" +PACKAGECONFIG[sendfile] = "-enable-sendfile, --disable-sendfile" + +#enable Native Language Support (NLS) +PACKAGECONFIG[nls] = "--enable-nls, --disable-nls" + +#add mod_dso to core modules +PACKAGECONFIG[dso] = "--enable-dso, --disable-dso" + +#omit mod_auth_file from core modules +PACKAGECONFIG[auth] = "--enable-auth-file, --disable-auth-file" + +# proftpd uses libltdl which currently makes configuring using +# autotools.bbclass a pain... +do_configure () { + install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S} + install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S} + oe_runconf + sed -e 's|--sysroot=${STAGING_DIR_HOST}||g' \ + -e 's|${STAGING_DIR_NATIVE}||g' \ + -e 's|-ffile-prefix-map=[^ ]*||g' \ + -e 's|-fdebug-prefix-map=[^ ]*||g' \ + -e 's|-fmacro-prefix-map=[^ ]*||g' \ + -i ${B}/config.h +} + +FTPUSER = "ftp" +FTPGROUP = "ftp" + +do_install () { + oe_runmake DESTDIR=${D} install + rmdir ${D}${libdir}/proftpd ${D}${datadir}/locale + [ -d ${D}${libexecdir} ] && rmdir ${D}${libexecdir} + sed -i '/ *User[ \t]*/s/ftp/${FTPUSER}/' ${D}${sysconfdir}/proftpd.conf + sed -i '/ *Group[ \t]*/s/ftp/${FTPGROUP}/' ${D}${sysconfdir}/proftpd.conf + install -d ${D}${sysconfdir}/init.d + install -m 0755 ${UNPACKDIR}/proftpd-basic.init ${D}${sysconfdir}/init.d/proftpd + sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/proftpd + sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/proftpd + sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/proftpd + sed -i 's!^PATH=.*!PATH=${base_sbindir}:${base_bindir}:${sbindir}:${bindir}!' ${D}${sysconfdir}/init.d/proftpd + + install -d ${D}${sysconfdir}/default + install -m 0755 ${UNPACKDIR}/default ${D}${sysconfdir}/default/proftpd + + # create the pub directory + mkdir -p ${D}/home/${FTPUSER}/pub/ + chown -R ${FTPUSER}:${FTPGROUP} ${D}/home/${FTPUSER}/pub + if ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'true', 'false', d)}; then + # install proftpd pam configuration + install -d ${D}${sysconfdir}/pam.d + install -m 644 ${S}/contrib/dist/rpm/ftp.pamd ${D}${sysconfdir}/pam.d/proftpd + sed -i '/ftpusers/d' ${D}${sysconfdir}/pam.d/proftpd + # specify the user Authentication config + sed -i '/^MaxInstances/a\AuthPAM on\nAuthPAMConfig proftpd' \ + ${D}${sysconfdir}/proftpd.conf + fi + + install -d ${D}/${systemd_unitdir}/system + install -m 644 ${UNPACKDIR}/proftpd.service ${D}/${systemd_unitdir}/system + sed -e 's,@BASE_SBINDIR@,${base_sbindir},g' \ + -e 's,@SYSCONFDIR@,${sysconfdir},g' \ + -e 's,@SBINDIR@,${sbindir},g' \ + -i ${D}${systemd_unitdir}/system/*.service + + sed -e 's|--sysroot=${STAGING_DIR_HOST}||g' \ + -e 's|${STAGING_DIR_NATIVE}||g' \ + -e 's|-ffile-prefix-map=[^ ]*||g' \ + -e 's|-fdebug-prefix-map=[^ ]*||g' \ + -e 's|-fmacro-prefix-map=[^ ]*||g' \ + -i ${D}/${bindir}/prxs ${D}${includedir}/proftpd/Make.rules ${D}${includedir}/proftpd/config.h + + # ftpmail perl script, which reads the proftpd log file and sends + # automatic email notifications once an upload finishs, + # depends on an old perl Mail::Sendmail + # The Mail::Sendmail has not been maintained for almost 10 years + # Other distribution not ship with ftpmail, so do the same to + # avoid confusion about having it fails to run + rm -rf ${D}${bindir}/ftpmail + rm -rf ${D}${mandir}/man1/ftpmail.1 +} + +INITSCRIPT_NAME = "proftpd" +INITSCRIPT_PARAM = "defaults 85 15" + +SYSTEMD_PACKAGES = "${PN}" +SYSTEMD_SERVICE:${PN} = "proftpd.service" + +USERADD_PACKAGES = "${PN}" +GROUPADD_PARAM:${PN} = "--system ${FTPGROUP}" +USERADD_PARAM:${PN} = "--system -g ${FTPGROUP} --home-dir /var/lib/${FTPUSER} --no-create-home \ + --shell /bin/false ${FTPUSER}" + +MULTILIB_SCRIPTS = "${PN}:${bindir}/prxs" + +FILES:${PN} += "/home/${FTPUSER}" + +RDEPENDS:${PN} += "perl" diff --git a/sources/meta-openembedded/meta-networking/recipes-daemons/ptpd/ptpd_2.3.1.bb b/sources/meta-openembedded/meta-networking/recipes-daemons/ptpd/ptpd_2.3.1.bb index d1eb6e28..f2c30085 100644 --- a/sources/meta-openembedded/meta-networking/recipes-daemons/ptpd/ptpd_2.3.1.bb +++ b/sources/meta-openembedded/meta-networking/recipes-daemons/ptpd/ptpd_2.3.1.bb @@ -47,13 +47,13 @@ do_install() { if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/ptpd.service ${D}${systemd_unitdir}/system + install -m 0644 ${UNPACKDIR}/ptpd.service ${D}${systemd_unitdir}/system sed -i -e 's#@SYSCONFDIR@#${sysconfdir}#g' ${D}${systemd_unitdir}/system/ptpd.service sed -i -e 's#@BINDIR@#${bindir}#g' ${D}${systemd_unitdir}/system/ptpd.service install -d ${D}${sysconfdir}/default/ - install -m 0644 ${WORKDIR}/ptpd.conf ${D}${sysconfdir}/default/ptpd + install -m 0644 ${UNPACKDIR}/ptpd.conf ${D}${sysconfdir}/default/ptpd fi } diff --git a/sources/meta-openembedded/meta-networking/recipes-daemons/radvd/radvd_2.19.bb b/sources/meta-openembedded/meta-networking/recipes-daemons/radvd/radvd_2.19.bb index a9b5f794..a8a116cb 100644 --- a/sources/meta-openembedded/meta-networking/recipes-daemons/radvd/radvd_2.19.bb +++ b/sources/meta-openembedded/meta-networking/recipes-daemons/radvd/radvd_2.19.bb @@ -34,30 +34,30 @@ do_install:append () { ${D}${sysconfdir}/default/volatiles \ ${D}${docdir}/radvd # Install init script and volatiles - install -m 0755 ${WORKDIR}/radvd.init ${D}${sysconfdir}/init.d/radvd + install -m 0755 ${UNPACKDIR}/radvd.init ${D}${sysconfdir}/init.d/radvd sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/radvd sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/radvd sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/radvd sed -i 's!^PATH=.*!PATH=${base_sbindir}:${base_bindir}:${sbindir}:${bindir}!' ${D}${sysconfdir}/init.d/radvd - install -m 0644 ${WORKDIR}/volatiles.03_radvd ${D}${sysconfdir}/default/volatiles/03_radvd + install -m 0644 ${UNPACKDIR}/volatiles.03_radvd ${D}${sysconfdir}/default/volatiles/03_radvd # Install systemd service files install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/radvd.service ${D}${systemd_unitdir}/system + install -m 0644 ${UNPACKDIR}/radvd.service ${D}${systemd_unitdir}/system sed -i -e 's#@SYSCONFDIR@#${sysconfdir}#g' \ -e 's#@SBINDIR@#${sbindir}#g' \ -e 's#@BASE_BINDIR@#${base_bindir}#g' ${D}${systemd_unitdir}/system/radvd.service # Install default environment file - install -m 0644 ${WORKDIR}/radvd.default ${D}${sysconfdir}/default/radvd + install -m 0644 ${UNPACKDIR}/radvd.default ${D}${sysconfdir}/default/radvd # Documentation for i in radvd.conf.example README; do \ install -m 0644 ${S}/$i ${D}${docdir}/radvd; \ done - install -m 0644 ${WORKDIR}/radvd.conf ${D}${sysconfdir}/radvd.conf + install -m 0644 ${UNPACKDIR}/radvd.conf ${D}${sysconfdir}/radvd.conf } USERADD_PACKAGES = "${PN}" diff --git a/sources/meta-openembedded/meta-networking/recipes-daemons/squid/files/CVE-2024-37894.patch b/sources/meta-openembedded/meta-networking/recipes-daemons/squid/files/CVE-2024-37894.patch deleted file mode 100644 index ba12b71d..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-daemons/squid/files/CVE-2024-37894.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 920563e7a080155fae3ced73d6198781e8b0ff04 Mon Sep 17 00:00:00 2001 -From: Francesco Chemolli <5175948+kinkie@users.noreply.github.com> -Date: Sun, 2 Jun 2024 14:41:16 +0000 -Subject: [PATCH] Bug 5378: type mismatch in libTrie (#1830) - -TrieNode::add() incorrectly computed an offset of an internal data -structure, resulting in out-of-bounds memory accesses that could cause -corruption or crashes. - -This bug was discovered and detailed by Joshua Rogers at -https://megamansec.github.io/Squid-Security-Audit/esi-underflow.html -where it was filed as "Buffer Underflow in ESI". - -CVE: CVE-2024-37894 -Upstream-Status: Backport [https://github.com/squid-cache/squid/commit/920563e7a080155fae3ced73d6198781e8b0ff04] -Signed-off-by: Peter Marko ---- - lib/libTrie/TrieNode.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lib/libTrie/TrieNode.cc b/lib/libTrie/TrieNode.cc -index 0f991a06d..d417e0f54 100644 ---- a/lib/libTrie/TrieNode.cc -+++ b/lib/libTrie/TrieNode.cc -@@ -32,7 +32,7 @@ TrieNode::add(char const *aString, size_t theLength, void *privatedata, TrieChar - /* We trust that privatedata and existent keys have already been checked */ - - if (theLength) { -- int index = transform ? (*transform)(*aString): *aString; -+ const unsigned char index = transform ? (*transform)(*aString): *aString; - - if (!internal[index]) - internal[index] = new TrieNode; --- -2.30.2 - diff --git a/sources/meta-openembedded/meta-networking/recipes-daemons/squid/files/Skip-AC_RUN_IFELSE-tests.patch b/sources/meta-openembedded/meta-networking/recipes-daemons/squid/files/Skip-AC_RUN_IFELSE-tests.patch index e0d002c6..489850e3 100644 --- a/sources/meta-openembedded/meta-networking/recipes-daemons/squid/files/Skip-AC_RUN_IFELSE-tests.patch +++ b/sources/meta-openembedded/meta-networking/recipes-daemons/squid/files/Skip-AC_RUN_IFELSE-tests.patch @@ -37,7 +37,7 @@ Signed-off-by: Jackie Huang ]) --- a/acinclude/lib-checks.m4 +++ b/acinclude/lib-checks.m4 -@@ -205,7 +205,9 @@ AC_DEFUN([SQUID_CHECK_OPENSSL_CONST_SSL_ +@@ -205,7 +205,9 @@ AC_DEFUN([SQUID_CHECK_OPENSSL_CONST_SSL_METHOD],[ [ AC_MSG_RESULT([no]) ], diff --git a/sources/meta-openembedded/meta-networking/recipes-daemons/squid/squid_6.10.bb b/sources/meta-openembedded/meta-networking/recipes-daemons/squid/squid_6.10.bb new file mode 100644 index 00000000..984209ad --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-daemons/squid/squid_6.10.bb @@ -0,0 +1,148 @@ +SUMMARY = "A fully-featured http proxy and web-cache daemon for Linux" +DESCRIPTION = "A fully-featured http proxy and web-cache daemon for Linux. \ +Squid offers a rich access control, authorization and logging environment to \ +develop web proxy and content serving applications. \ +Squid offers a rich set of traffic optimization options, most of which are \ +enabled by default for simpler installation and high performance. \ +" +HOMEPAGE = "http://www.squid-cache.org" +SECTION = "web" +LICENSE = "GPL-2.0-or-later" + +MAJ_VER = "${@oe.utils.trim_version("${PV}", 1)}" +MIN_VER = "${@oe.utils.trim_version("${PV}", 2)}" + +SRC_URI = "http://www.squid-cache.org/Versions/v${MAJ_VER}/${BPN}-${PV}.tar.xz \ + file://Set-up-for-cross-compilation.patch \ + file://Skip-AC_RUN_IFELSE-tests.patch \ + file://squid-use-serial-tests-config-needed-by-ptest.patch \ + file://run-ptest \ + file://volatiles.03_squid \ + file://0002-squid-make-squid-conf-tests-run-on-target-device.patch \ + file://squid.nm \ + " + +SRC_URI[sha256sum] = "0b07b187e723f04770dd25beb89aec12030a158696aa8892d87c8b26853408a7" + +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://errors/COPYRIGHT;md5=d324bc1f9447d1d1588d75b22a678dc4 \ + " +DEPENDS = "libtool" + +inherit autotools pkgconfig useradd ptest perlnative systemd + +LDFLAGS:append:mipsarch = " -latomic" +LDFLAGS:append:powerpc = " -latomic" +LDFLAGS:append:riscv64 = " -latomic" +LDFLAGS:append:riscv32 = " -latomic" + +USERADD_PACKAGES = "${PN}" +USERADD_PARAM:${PN} = "--system --no-create-home --home-dir /var/run/squid --shell /bin/false --user-group squid" + +PACKAGECONFIG ??= "auth url-rewrite-helpers \ + ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \ +" + +PACKAGECONFIG[libnetfilter-conntrack] = "--with-netfilter-conntrack=${includedir}, --without-netfilter-conntrack, libnetfilter-conntrack" +PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," +PACKAGECONFIG[werror] = "--enable-strict-error-checking,--disable-strict-error-checking," +PACKAGECONFIG[esi] = "--enable-esi,--disable-esi,expat libxml2" +PACKAGECONFIG[ssl] = "--with-openssl=yes,--with-openssl=no,openssl" +PACKAGECONFIG[auth] = "--enable-auth-basic='${BASIC_AUTH}',--disable-auth --disable-auth-basic,krb5 openldap db cyrus-sasl" +PACKAGECONFIG[url-rewrite-helpers] = "--enable-url-rewrite-helpers,--disable-url-rewrite-helpers," +PACKAGECONFIG[systemd] = "--with-systemd,--without-systemd,systemd" + +PACKAGES =+ " \ + ${PN}-conf \ + ${PN}-networkmanager \ +" + +BASIC_AUTH = "DB SASL LDAP" + +DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" +BASIC_AUTH += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'PAM', '', d)}" + +EXTRA_OECONF += "--with-default-user=squid \ + --sysconfdir=${sysconfdir}/${BPN} \ + --with-logdir=${localstatedir}/log/${BPN} \ + 'PERL=${USRBINPATH}/env perl'" + +# Workaround a build failure when using a native compiler that need -std=c++17 +# with a cross-compiler that doesn't. +# Upstream issue closed as invalid : https://bugs.squid-cache.org/show_bug.cgi?id=5376 +BUILD_CXXFLAGS += "-std=c++17" + +export BUILDCXXFLAGS="${BUILD_CXXFLAGS}" + +TESTDIR = "test-suite" + +do_configure:prepend() { + export SYSROOT=$PKG_CONFIG_SYSROOT_DIR +} + +do_configure:append() { + sed -i -e 's|${WORKDIR}||g' ${B}/include/autoconf.h +} + +do_compile_ptest() { + oe_runmake -C ${TESTDIR} buildtest-TESTS +} + +do_install_ptest() { + cp -rf ${B}/${TESTDIR} ${D}${PTEST_PATH} + cp -rf ${S}/${TESTDIR} ${D}${PTEST_PATH} + + # Install default config + install -d ${D}${PTEST_PATH}/src + install -m 0644 ${B}/src/squid.conf.default ${D}${PTEST_PATH}/src + + # autoconf.h is needed during squid-conf-tests + install -d ${D}${PTEST_PATH}/include + install -m 0644 ${B}/include/autoconf.h ${D}${PTEST_PATH}/include + + # do NOT need to rebuild Makefile itself + sed -i 's/^Makefile:.*$/Makefile:/' ${D}${PTEST_PATH}/${TESTDIR}/Makefile + + # Ensure the path for command true is correct + sed -i 's:^TRUE = .*$:TRUE = /bin/true:' ${D}${PTEST_PATH}/${TESTDIR}/Makefile +} + +do_install:append() { + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + # Install service unit file + install -d ${D}/${systemd_unitdir}/system + install ${S}/tools/systemd/squid.service ${D}/${systemd_unitdir}/system + sed -i 's:/var/run/:/run/:g' ${D}/${systemd_unitdir}/system/squid.service + + # Configure tmpfiles.d + install -d ${D}${sysconfdir}/tmpfiles.d + echo "d ${localstatedir}/run/${BPN} 0755 squid squid -" >> ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf + echo "d ${localstatedir}/log/${BPN} 0750 squid squid -" >> ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf + fi + + install -d ${D}${sysconfdir}/default/volatiles + install -m 0644 ${UNPACKDIR}/volatiles.03_squid ${D}${sysconfdir}/default/volatiles/03_squid + + rmdir "${D}${localstatedir}/run/${BPN}" + rmdir --ignore-fail-on-non-empty "${D}${localstatedir}/run" + + rmdir "${D}${localstatedir}/log/${BPN}" + rmdir --ignore-fail-on-non-empty "${D}${localstatedir}/log" + + # Install NetworkManager dispatcher reload hooks + install -d ${D}${libdir}/NetworkManager/dispatcher.d + install -m 0755 ${UNPACKDIR}/squid.nm ${D}${libdir}/NetworkManager/dispatcher.d/20-squid +} + +SYSTEMD_AUTO_ENABLE = "disable" +SYSTEMD_SERVICE:${PN} = "squid.service" + +FILES:${PN} += "${libdir} ${datadir}/errors ${datadir}/icons" +FILES:${PN}-dbg += "/usr/src/debug" +FILES:${PN}-doc += "${datadir}/*.txt" +FILES:${PN}-conf += "${sysconfdir}/squid" +FILES:${PN}-networkmanager = "${libdir}/NetworkManager/dispatcher.d" + +RDEPENDS:${PN} += "perl ${PN}-conf" +RDEPENDS:${PN}-ptest += "perl make bash" diff --git a/sources/meta-openembedded/meta-networking/recipes-daemons/squid/squid_6.9.bb b/sources/meta-openembedded/meta-networking/recipes-daemons/squid/squid_6.9.bb deleted file mode 100644 index f6312521..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-daemons/squid/squid_6.9.bb +++ /dev/null @@ -1,155 +0,0 @@ -SUMMARY = "A fully-featured http proxy and web-cache daemon for Linux" -DESCRIPTION = "A fully-featured http proxy and web-cache daemon for Linux. \ -Squid offers a rich access control, authorization and logging environment to \ -develop web proxy and content serving applications. \ -Squid offers a rich set of traffic optimization options, most of which are \ -enabled by default for simpler installation and high performance. \ -" -HOMEPAGE = "http://www.squid-cache.org" -SECTION = "web" -LICENSE = "GPL-2.0-or-later" - -MAJ_VER = "${@oe.utils.trim_version("${PV}", 1)}" -MIN_VER = "${@oe.utils.trim_version("${PV}", 2)}" - -SRC_URI = "http://www.squid-cache.org/Versions/v${MAJ_VER}/${BPN}-${PV}.tar.xz \ - file://Set-up-for-cross-compilation.patch \ - file://Skip-AC_RUN_IFELSE-tests.patch \ - file://squid-use-serial-tests-config-needed-by-ptest.patch \ - file://run-ptest \ - file://volatiles.03_squid \ - file://0002-squid-make-squid-conf-tests-run-on-target-device.patch \ - file://squid.nm \ - file://CVE-2024-37894.patch \ - " - -SRC_URI[sha256sum] = "1ad72d46e1cb556e9561214f0fb181adb87c7c47927ef69bc8acd68a03f61882" - -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://errors/COPYRIGHT;md5=d324bc1f9447d1d1588d75b22a678dc4 \ - " -DEPENDS = "libtool" - -inherit autotools pkgconfig useradd ptest perlnative systemd - -LDFLAGS:append:mipsarch = " -latomic" -LDFLAGS:append:powerpc = " -latomic" -LDFLAGS:append:riscv64 = " -latomic" -LDFLAGS:append:riscv32 = " -latomic" - -USERADD_PACKAGES = "${PN}" -USERADD_PARAM:${PN} = "--system --no-create-home --home-dir /var/run/squid --shell /bin/false --user-group squid" - -PACKAGECONFIG ??= "auth url-rewrite-helpers \ - ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \ - ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \ -" - -PACKAGECONFIG[libnetfilter-conntrack] = "--with-netfilter-conntrack=${includedir}, --without-netfilter-conntrack, libnetfilter-conntrack" -PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," -PACKAGECONFIG[werror] = "--enable-strict-error-checking,--disable-strict-error-checking," -PACKAGECONFIG[esi] = "--enable-esi,--disable-esi,expat libxml2" -PACKAGECONFIG[ssl] = "--with-openssl=yes,--with-openssl=no,openssl" -PACKAGECONFIG[auth] = "--enable-auth-basic='${BASIC_AUTH}',--disable-auth --disable-auth-basic,krb5 openldap db cyrus-sasl" -PACKAGECONFIG[url-rewrite-helpers] = "--enable-url-rewrite-helpers,--disable-url-rewrite-helpers," -PACKAGECONFIG[systemd] = "--with-systemd,--without-systemd,systemd" - -PACKAGES =+ " \ - ${PN}-conf \ - ${PN}-networkmanager \ -" - -BASIC_AUTH = "DB SASL LDAP" - -DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" -BASIC_AUTH += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'PAM', '', d)}" - -EXTRA_OECONF += "--with-default-user=squid \ - --sysconfdir=${sysconfdir}/${BPN} \ - --with-logdir=${localstatedir}/log/${BPN} \ - 'PERL=${USRBINPATH}/env perl'" - -# Workaround a build failure when using a native compiler that need -std=c++17 -# with a cross-compiler that doesn't. -# Upstream issue closed as invalid : https://bugs.squid-cache.org/show_bug.cgi?id=5376 -BUILD_CXXFLAGS += "-std=c++17" - -export BUILDCXXFLAGS="${BUILD_CXXFLAGS}" - -TESTDIR = "test-suite" - -do_configure:prepend() { - export SYSROOT=$PKG_CONFIG_SYSROOT_DIR -} - -do_configure:append() { - sed -i -e 's|${WORKDIR}||g' ${B}/include/autoconf.h -} - -do_compile_ptest() { - oe_runmake -C ${TESTDIR} buildtest-TESTS -} - -do_install_ptest() { - cp -rf ${B}/${TESTDIR} ${D}${PTEST_PATH} - cp -rf ${S}/${TESTDIR} ${D}${PTEST_PATH} - - # Install default config - install -d ${D}${PTEST_PATH}/src - install -m 0644 ${B}/src/squid.conf.default ${D}${PTEST_PATH}/src - - # autoconf.h is needed during squid-conf-tests - install -d ${D}${PTEST_PATH}/include - install -m 0644 ${B}/include/autoconf.h ${D}${PTEST_PATH}/include - - # do NOT need to rebuild Makefile itself - sed -i 's/^Makefile:.*$/Makefile:/' ${D}${PTEST_PATH}/${TESTDIR}/Makefile - - # Ensure the path for command true is correct - sed -i 's:^TRUE = .*$:TRUE = /bin/true:' ${D}${PTEST_PATH}/${TESTDIR}/Makefile -} - -do_install:append() { - if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then - # Install service unit file - install -d ${D}/${systemd_unitdir}/system - install ${S}/tools/systemd/squid.service ${D}/${systemd_unitdir}/system - sed -i 's:/var/run/:/run/:g' ${D}/${systemd_unitdir}/system/squid.service - - # Configure tmpfiles.d - install -d ${D}${sysconfdir}/tmpfiles.d - echo "d ${localstatedir}/run/${BPN} 0755 squid squid -" >> ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf - echo "d ${localstatedir}/log/${BPN} 0750 squid squid -" >> ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf - fi - - install -d ${D}${sysconfdir}/default/volatiles - install -m 0644 ${WORKDIR}/volatiles.03_squid ${D}${sysconfdir}/default/volatiles/03_squid - - rmdir "${D}${localstatedir}/run/${BPN}" - rmdir --ignore-fail-on-non-empty "${D}${localstatedir}/run" - - rmdir "${D}${localstatedir}/log/${BPN}" - rmdir --ignore-fail-on-non-empty "${D}${localstatedir}/log" - - # Install NetworkManager dispatcher reload hooks - install -d ${D}${libdir}/NetworkManager/dispatcher.d - install -m 0755 ${WORKDIR}/squid.nm ${D}${libdir}/NetworkManager/dispatcher.d/20-squid -} - -SYSTEMD_AUTO_ENABLE = "disable" -SYSTEMD_SERVICE:${PN} = "squid.service" - -FILES:${PN} += "${libdir} ${datadir}/errors ${datadir}/icons" -FILES:${PN}-dbg += "/usr/src/debug" -FILES:${PN}-doc += "${datadir}/*.txt" -FILES:${PN}-conf += "${sysconfdir}/squid" -FILES:${PN}-networkmanager = "${libdir}/NetworkManager/dispatcher.d" - -RDEPENDS:${PN} += "perl ${PN}-conf" -RDEPENDS:${PN}-ptest += "perl make bash" - -python() { - # Only ESI feature is vulnerable - if not bb.utils.filter('PACKAGECONFIG', 'esi', d): - d.setVarFlag("CVE_STATUS", "CVE-2024-45802", "not-applicable-config: esi is disabled") -} diff --git a/sources/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/tftp-hpa_5.2.bb b/sources/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/tftp-hpa_5.2.bb index 565f493c..b5a2b9da 100644 --- a/sources/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/tftp-hpa_5.2.bb +++ b/sources/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/tftp-hpa_5.2.bb @@ -58,18 +58,18 @@ do_install() { install -m 755 -d ${D}${localstatedir}/lib/tftpboot/ install -d ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/tftpd-hpa + install -m 0755 ${UNPACKDIR}/init ${D}${sysconfdir}/init.d/tftpd-hpa sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/tftpd-hpa sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/tftpd-hpa sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/tftpd-hpa sed -i 's!^PATH=.*!PATH=${base_sbindir}:${base_bindir}:${sbindir}:${bindir}!' ${D}${sysconfdir}/init.d/tftpd-hpa install -d ${D}${sysconfdir}/default - install -m 0644 ${WORKDIR}/default ${D}${sysconfdir}/default/tftpd-hpa + install -m 0644 ${UNPACKDIR}/default ${D}${sysconfdir}/default/tftpd-hpa install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/tftpd-hpa.socket ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/tftpd-hpa.service ${D}${systemd_unitdir}/system + install -m 0644 ${UNPACKDIR}/tftpd-hpa.socket ${D}${systemd_unitdir}/system + install -m 0644 ${UNPACKDIR}/tftpd-hpa.service ${D}${systemd_unitdir}/system sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/tftpd-hpa.service } diff --git a/sources/meta-openembedded/meta-networking/recipes-daemons/vblade/vblade_25.bb b/sources/meta-openembedded/meta-networking/recipes-daemons/vblade/vblade_25.bb index 7c37fc16..7f20e927 100644 --- a/sources/meta-openembedded/meta-networking/recipes-daemons/vblade/vblade_25.bb +++ b/sources/meta-openembedded/meta-networking/recipes-daemons/vblade/vblade_25.bb @@ -27,22 +27,22 @@ do_install() { install -D -m 0755 ${S}/vbladed ${D}/${sbindir}/vbladed install -D -m 0644 ${S}/vblade.8 ${D}/${mandir}/man8/vblade.8 - install -D -m 0644 ${WORKDIR}/${BPN}.conf ${D}/${sysconfdir}/${BPN}.conf - install -D -m 0755 ${WORKDIR}/${BPN}.init ${D}/${sysconfdir}/init.d/${BPN} + install -D -m 0644 ${UNPACKDIR}/${BPN}.conf ${D}/${sysconfdir}/${BPN}.conf + install -D -m 0755 ${UNPACKDIR}/${BPN}.init ${D}/${sysconfdir}/init.d/${BPN} if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then install -d ${D}/${sysconfdir}/default/volatiles - install -m 0755 ${WORKDIR}/volatiles.99_vblade ${D}/${sysconfdir}/default/volatiles/99_vblade + install -m 0755 ${UNPACKDIR}/volatiles.99_vblade ${D}/${sysconfdir}/default/volatiles/99_vblade fi if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then install -d ${D}/${bindir} - install -m 0755 ${WORKDIR}/${BPN}.init ${D}/${bindir}/ + install -m 0755 ${UNPACKDIR}/${BPN}.init ${D}/${bindir}/ install -d ${D}${sysconfdir}/tmpfiles.d echo "d /var/run/${BPN} 0755 root root -" > ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf install -d ${D}${systemd_system_unitdir} - install -m 0644 ${WORKDIR}/vblade.service ${D}${systemd_system_unitdir} + install -m 0644 ${UNPACKDIR}/vblade.service ${D}${systemd_system_unitdir} sed -e 's,@BINDIR@,${bindir},g' -i ${D}${systemd_system_unitdir}/*.service fi diff --git a/sources/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.5.bb b/sources/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.5.bb index 0ae52c8d..4a843bd8 100644 --- a/sources/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.5.bb +++ b/sources/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.5.bb @@ -65,14 +65,14 @@ do_install() { install -d ${D}${mandir}/man5 oe_runmake 'DESTDIR=${D}' install install -d ${D}${sysconfdir} - install -m 600 ${WORKDIR}/vsftpd.conf ${D}${sysconfdir}/vsftpd.conf + install -m 600 ${UNPACKDIR}/vsftpd.conf ${D}${sysconfdir}/vsftpd.conf install -d ${D}${sysconfdir}/init.d/ - install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/vsftpd + install -m 755 ${UNPACKDIR}/init ${D}${sysconfdir}/init.d/vsftpd install -d ${D}/${sysconfdir}/default/volatiles - install -m 644 ${WORKDIR}/volatiles.99_vsftpd ${D}/${sysconfdir}/default/volatiles/99_vsftpd + install -m 644 ${UNPACKDIR}/volatiles.99_vsftpd ${D}/${sysconfdir}/default/volatiles/99_vsftpd - install -m 600 ${WORKDIR}/vsftpd.ftpusers ${D}${sysconfdir}/ - install -m 600 ${WORKDIR}/vsftpd.user_list ${D}${sysconfdir}/ + install -m 600 ${UNPACKDIR}/vsftpd.ftpusers ${D}${sysconfdir}/ + install -m 600 ${UNPACKDIR}/vsftpd.user_list ${D}${sysconfdir}/ if ! test -z "${PAMLIB}" ; then install -d ${D}${sysconfdir}/pam.d/ cp ${S}/RedHat/vsftpd.pam ${D}${sysconfdir}/pam.d/vsftpd @@ -87,7 +87,7 @@ do_install() { # Install systemd unit files install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/vsftpd.service ${D}${systemd_unitdir}/system + install -m 0644 ${UNPACKDIR}/vsftpd.service ${D}${systemd_unitdir}/system sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/vsftpd.service } diff --git a/sources/meta-openembedded/meta-networking/recipes-devtools/libcoap/libcoap_4.3.4.bb b/sources/meta-openembedded/meta-networking/recipes-devtools/libcoap/libcoap_4.3.4.bb index 98f0f02f..2f5d192a 100644 --- a/sources/meta-openembedded/meta-networking/recipes-devtools/libcoap/libcoap_4.3.4.bb +++ b/sources/meta-openembedded/meta-networking/recipes-devtools/libcoap/libcoap_4.3.4.bb @@ -51,7 +51,7 @@ do_compile:prepend() { do_install_ptest () { install -d ${D}${PTEST_PATH} - install -m 0755 ${WORKDIR}/run-ptest ${D}${PTEST_PATH}/run-ptest + install -m 0755 ${UNPACKDIR}/run-ptest ${D}${PTEST_PATH}/run-ptest install -m 0755 ${B}/tests/testdriver ${D}${PTEST_PATH}/testdriver } diff --git a/sources/meta-openembedded/meta-networking/recipes-extended/corosync/corosync_3.1.6.bb b/sources/meta-openembedded/meta-networking/recipes-extended/corosync/corosync_3.1.6.bb index 8fca5766..cbbbbc70 100644 --- a/sources/meta-openembedded/meta-networking/recipes-extended/corosync/corosync_3.1.6.bb +++ b/sources/meta-openembedded/meta-networking/recipes-extended/corosync/corosync_3.1.6.bb @@ -40,7 +40,7 @@ EXTRA_OEMAKE = "tmpfilesdir_DATA=" #} do_install:append() { - install -D -m 0644 ${WORKDIR}/corosync.conf ${D}${sysconfdir}/corosync/corosync.conf.example + install -D -m 0644 ${UNPACKDIR}/corosync.conf ${D}${sysconfdir}/corosync/corosync.conf.example install -d ${D}${sysconfdir}/sysconfig/ install -m 0644 ${S}/init/corosync.sysconfig.example ${D}${sysconfdir}/sysconfig/corosync install -m 0644 ${S}/tools/corosync-notifyd.sysconfig.example ${D}${sysconfdir}/sysconfig/corosync-notifyd diff --git a/sources/meta-openembedded/meta-networking/recipes-extended/dlm/dlm_4.2.0.bb b/sources/meta-openembedded/meta-networking/recipes-extended/dlm/dlm_4.2.0.bb index ee006efe..93d29349 100644 --- a/sources/meta-openembedded/meta-networking/recipes-extended/dlm/dlm_4.2.0.bb +++ b/sources/meta-openembedded/meta-networking/recipes-extended/dlm/dlm_4.2.0.bb @@ -37,6 +37,7 @@ SYSTEMD_AUTO_ENABLE = "enable" export EXTRA_OEMAKE = "" CFPROTECTION ?= "-fcf-protection=full" +CFPROTECTION:riscv32 = "" CFPROTECTION:riscv64 = "" CFPROTECTION:arm = "" CFPROTECTION:aarch64 = "" diff --git a/sources/meta-openembedded/meta-networking/recipes-extended/tgt/files/CVE-2024-45751.patch b/sources/meta-openembedded/meta-networking/recipes-extended/tgt/files/CVE-2024-45751.patch deleted file mode 100644 index 2de9ae9b..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-extended/tgt/files/CVE-2024-45751.patch +++ /dev/null @@ -1,71 +0,0 @@ -From abd8e0d987ab56013d360077202bf2aca20a42dd Mon Sep 17 00:00:00 2001 -From: Richard Weinberger -Date: Tue, 3 Sep 2024 16:14:58 +0200 -Subject: [PATCH] chap: Use proper entropy source - -The challenge sent to the initiator is based on a poor -source of randomness, it uses rand() without seeding it by srand(). -So the glibc PRNG is always seeded with 1 and as a consequence the -sequence of challenges is always the same. - -An attacker which is able to monitor network traffic can apply a replay -attack to bypass the CHAP authentication. All the attacker has to do -is waiting for the server or the service to restart and replay with a -previously record CHAP session which fits into the sequence. - -To overcome the issue, use getrandom() to query the kernel random -number generator. -Also always send a challenge of length CHAP_CHALLENGE_MAX, there is no -benefit in sending a variable length challenge. - -Signed-off-by: Richard Weinberger - -Upstream-Status: Backport [https://github.com/fujita/tgt/commit/abd8e0d987ab56013d360077202bf2aca20a42dd] -CVE: CVE-2024-45751 -Signed-off-by: Hitendra Prajapati ---- - usr/iscsi/chap.c | 12 +++++------- - 1 file changed, 5 insertions(+), 7 deletions(-) - -diff --git a/usr/iscsi/chap.c b/usr/iscsi/chap.c -index aa0fc67..b89ecab 100644 ---- a/usr/iscsi/chap.c -+++ b/usr/iscsi/chap.c -@@ -28,6 +28,7 @@ - #include - #include - #include -+#include - - #include "iscsid.h" - #include "tgtd.h" -@@ -359,22 +360,19 @@ static int chap_initiator_auth_create_challenge(struct iscsi_connection *conn) - sprintf(text, "%u", (unsigned char)conn->auth.chap.id); - text_key_add(conn, "CHAP_I", text); - -- /* -- * FIXME: does a random challenge length provide any benefits security- -- * wise, or should we rather always use the max. allowed length of -- * 1024 for the (unencoded) challenge? -- */ -- conn->auth.chap.challenge_size = (rand() % (CHAP_CHALLENGE_MAX / 2)) + CHAP_CHALLENGE_MAX / 2; -+ conn->auth.chap.challenge_size = CHAP_CHALLENGE_MAX; - - conn->auth.chap.challenge = malloc(conn->auth.chap.challenge_size); - if (!conn->auth.chap.challenge) - return CHAP_TARGET_ERROR; - -+ if (getrandom(conn->auth.chap.challenge, conn->auth.chap.challenge_size, 0) != conn->auth.chap.challenge_size) -+ return CHAP_TARGET_ERROR; -+ - p = text; - strcpy(p, "0x"); - p += 2; - for (i = 0; i < conn->auth.chap.challenge_size; i++) { -- conn->auth.chap.challenge[i] = rand(); - sprintf(p, "%.2hhx", conn->auth.chap.challenge[i]); - p += 2; - } --- -2.25.1 - diff --git a/sources/meta-openembedded/meta-networking/recipes-extended/tgt/tgt_1.0.90.bb b/sources/meta-openembedded/meta-networking/recipes-extended/tgt/tgt_1.0.90.bb index f70f77f5..e816b79e 100644 --- a/sources/meta-openembedded/meta-networking/recipes-extended/tgt/tgt_1.0.90.bb +++ b/sources/meta-openembedded/meta-networking/recipes-extended/tgt/tgt_1.0.90.bb @@ -11,7 +11,6 @@ SRC_URI = "git://github.com/fujita/tgt.git;branch=master;protocol=https \ file://0001-usr-Makefile-WARNING-fix.patch \ file://usr-Makefile-apply-LDFLAGS-to-all-executables.patch \ file://musl-__wordsize.patch \ - file://CVE-2024-45751.patch \ " SRC_URI += "file://tgtd.init \ file://tgtd.service \ @@ -40,12 +39,12 @@ do_install() { if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then install -d ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/tgtd.init ${D}${sysconfdir}/init.d/tgtd + install -m 0755 ${UNPACKDIR}/tgtd.init ${D}${sysconfdir}/init.d/tgtd elif ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/tgtd.service ${D}${systemd_unitdir}/system/tgtd.service + install -m 0644 ${UNPACKDIR}/tgtd.service ${D}${systemd_unitdir}/system/tgtd.service install -d ${D}${sysconfdir}/sysconfig - install -m 0644 ${WORKDIR}/tgtd ${D}${sysconfdir}/sysconfig/tgtd + install -m 0644 ${UNPACKDIR}/tgtd ${D}${sysconfdir}/sysconfig/tgtd sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/tgtd.service sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' ${D}${systemd_unitdir}/system/tgtd.service sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' ${D}${systemd_unitdir}/system/tgtd.service diff --git a/sources/meta-openembedded/meta-networking/recipes-filter/arno-iptables-firewall/arno-iptables-firewall_2.1.1.bb b/sources/meta-openembedded/meta-networking/recipes-filter/arno-iptables-firewall/arno-iptables-firewall_2.1.1.bb deleted file mode 100644 index e124fd29..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-filter/arno-iptables-firewall/arno-iptables-firewall_2.1.1.bb +++ /dev/null @@ -1,33 +0,0 @@ -SUMMARY = "IPTables based firewall scripts" -HOMEPAGE = "http://rocky.eld.leidenuniv.nl/joomla/index.php?option=com_content&view=article&id=45&Itemid=63" - -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://gpl_license.txt;md5=11c7b65c4a4acb9d5175f7e9bf99c403" - -SRCREV = "a96b81da4a9b619e4045805f5f13a1e982c95663" -SRC_URI = "git://github.com/arno-iptables-firewall/aif;branch=master;protocol=https" - -S = "${WORKDIR}/git" - -inherit systemd - -do_install() { - install -d ${D}${sysconfdir} ${D}${sbindir} ${D}${bindir} ${D}${systemd_unitdir}/system ${D}${sysconfdir}/init.d - install -d ${D}${datadir}/arno-iptables-firewall ${D}${sysconfdir}/arno-iptables-firewall - cp -r ${S}${sysconfdir}/arno-iptables-firewall ${D}${sysconfdir}/ - install -m 0755 ${S}${sysconfdir}/init.d/arno-iptables-firewall ${D}${bindir} - install -m 0755 ${S}/bin/arno-iptables-firewall ${D}${sbindir} - install -m 0755 ${S}/bin/arno-fwfilter ${D}${bindir} - cp -r ${S}/share/arno-iptables-firewall/* ${D}${datadir}/arno-iptables-firewall - cp -r ${S}/etc/arno-iptables-firewall/* ${D}${sysconfdir}/arno-iptables-firewall - install -m 0644 ${S}/lib/systemd/system/arno-iptables-firewall.service ${D}${systemd_unitdir}/system - sed -i -e 's%/usr/local/sbin%${bindir}%g' ${D}${systemd_unitdir}/system/arno-iptables-firewall.service - sed -i -e 's%/usr/local/sbin%${sbindir}%g' ${D}${bindir}/arno-iptables-firewall - sed -i -e 's%/usr/local%${exec_prefix}%g' ${D}${sysconfdir}/arno-iptables-firewall/firewall.conf - sed -i -e 's%#!/bin/bash%#!/bin/sh%g' ${D}${bindir}/arno-fwfilter - sed -i -e 's%#!/bin/bash%#!/bin/sh%g' ${D}${datadir}/arno-iptables-firewall/plugins/traffic-accounting-helper - sed -i -e 's%#!/bin/bash%#!/bin/sh%g' ${D}${datadir}/arno-iptables-firewall/plugins/dyndns-host-open-helper -} - -SYSTEMD_SERVICE:${PN} = "arno-iptables-firewall.service" -FILES:${PN} += "${systemd_unitdir}/system/arno-iptables-firewall.service" diff --git a/sources/meta-openembedded/meta-networking/recipes-filter/arno-iptables-firewall/arno-iptables-firewall_2.1.2.bb b/sources/meta-openembedded/meta-networking/recipes-filter/arno-iptables-firewall/arno-iptables-firewall_2.1.2.bb new file mode 100644 index 00000000..940454c3 --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-filter/arno-iptables-firewall/arno-iptables-firewall_2.1.2.bb @@ -0,0 +1,33 @@ +SUMMARY = "IPTables based firewall scripts" +HOMEPAGE = "http://rocky.eld.leidenuniv.nl/joomla/index.php?option=com_content&view=article&id=45&Itemid=63" + +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://gpl_license.txt;md5=11c7b65c4a4acb9d5175f7e9bf99c403" + +SRCREV = "c8dfd85b9e8e453e279525f30c1e3184c092f036" +SRC_URI = "git://github.com/arno-iptables-firewall/aif;branch=master;protocol=https" + +S = "${WORKDIR}/git" + +inherit systemd + +do_install() { + install -d ${D}${sysconfdir} ${D}${sbindir} ${D}${bindir} ${D}${systemd_unitdir}/system ${D}${sysconfdir}/init.d + install -d ${D}${datadir}/arno-iptables-firewall ${D}${sysconfdir}/arno-iptables-firewall + cp -r ${S}${sysconfdir}/arno-iptables-firewall ${D}${sysconfdir}/ + install -m 0755 ${S}${sysconfdir}/init.d/arno-iptables-firewall ${D}${bindir} + install -m 0755 ${S}/bin/arno-iptables-firewall ${D}${sbindir} + install -m 0755 ${S}/bin/arno-fwfilter ${D}${bindir} + cp -r ${S}/share/arno-iptables-firewall/* ${D}${datadir}/arno-iptables-firewall + cp -r ${S}/etc/arno-iptables-firewall/* ${D}${sysconfdir}/arno-iptables-firewall + install -m 0644 ${S}/lib/systemd/system/arno-iptables-firewall.service ${D}${systemd_unitdir}/system + sed -i -e 's%/usr/local/sbin%${bindir}%g' ${D}${systemd_unitdir}/system/arno-iptables-firewall.service + sed -i -e 's%/usr/local/sbin%${sbindir}%g' ${D}${bindir}/arno-iptables-firewall + sed -i -e 's%/usr/local%${exec_prefix}%g' ${D}${sysconfdir}/arno-iptables-firewall/firewall.conf + sed -i -e 's%#!/bin/bash%#!/bin/sh%g' ${D}${bindir}/arno-fwfilter + sed -i -e 's%#!/bin/bash%#!/bin/sh%g' ${D}${datadir}/arno-iptables-firewall/plugins/traffic-accounting-helper + sed -i -e 's%#!/bin/bash%#!/bin/sh%g' ${D}${datadir}/arno-iptables-firewall/plugins/dyndns-host-open-helper +} + +SYSTEMD_SERVICE:${PN} = "arno-iptables-firewall.service" +FILES:${PN} += "${systemd_unitdir}/system/arno-iptables-firewall.service" diff --git a/sources/meta-openembedded/meta-networking/recipes-filter/conntrack-tools/conntrack-tools_1.4.8.bb b/sources/meta-openembedded/meta-networking/recipes-filter/conntrack-tools/conntrack-tools_1.4.8.bb index 07e01845..524718d5 100644 --- a/sources/meta-openembedded/meta-networking/recipes-filter/conntrack-tools/conntrack-tools_1.4.8.bb +++ b/sources/meta-openembedded/meta-networking/recipes-filter/conntrack-tools/conntrack-tools_1.4.8.bb @@ -34,8 +34,8 @@ do_install:append() { install -d ${D}/${sysconfdir}/conntrackd install -d ${D}/${sysconfdir}/init.d install -m 0644 ${S}/doc/sync/ftfw/conntrackd.conf ${D}/${sysconfdir}/conntrackd/conntrackd.conf.sample - install -m 0755 ${WORKDIR}/conntrack-failover ${D}/${sysconfdir}/init.d/conntrack-failover - install -m 0755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/conntrackd + install -m 0755 ${UNPACKDIR}/conntrack-failover ${D}/${sysconfdir}/init.d/conntrack-failover + install -m 0755 ${UNPACKDIR}/init ${D}/${sysconfdir}/init.d/conntrackd # Fix hardcoded paths in scripts sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}/${sysconfdir}/init.d/conntrack-failover ${D}/${sysconfdir}/init.d/conntrackd @@ -45,7 +45,7 @@ do_install:append() { if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then install -d ${D}/${systemd_system_unitdir} - install -m 644 ${WORKDIR}/conntrackd.service ${D}/${systemd_system_unitdir} + install -m 644 ${UNPACKDIR}/conntrackd.service ${D}/${systemd_system_unitdir} fi } diff --git a/sources/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables_2.0.11.bb b/sources/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables_2.0.11.bb index 30a4c794..be8c4985 100644 --- a/sources/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables_2.0.11.bb +++ b/sources/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables_2.0.11.bb @@ -27,14 +27,14 @@ do_install:append () { # Replace upstream ebtables-save perl script with Fedora bash based rewrite # http://pkgs.fedoraproject.org/cgit/rpms/ebtables.git/tree/ebtables-save rm -f ${D}${sbindir}/ebtables-legacy-save - install -m 0755 ${WORKDIR}/ebtables-legacy-save ${D}${sbindir}/ebtables-legacy-save + install -m 0755 ${UNPACKDIR}/ebtables-legacy-save ${D}${sbindir}/ebtables-legacy-save # Install systemd service files if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/ebtables.service ${D}${systemd_unitdir}/system + install -m 0644 ${UNPACKDIR}/ebtables.service ${D}${systemd_unitdir}/system sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/ebtables.service - install -m 0755 ${WORKDIR}/ebtables.common ${D}${sbindir}/ebtables.common + install -m 0755 ${UNPACKDIR}/ebtables.common ${D}${sbindir}/ebtables.common fi install -d ${D}${base_sbindir} diff --git a/sources/meta-openembedded/meta-networking/recipes-filter/ipset/ipset_7.21.bb b/sources/meta-openembedded/meta-networking/recipes-filter/ipset/ipset_7.21.bb deleted file mode 100644 index c7ebdc1c..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-filter/ipset/ipset_7.21.bb +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (C) 2017 Aaron Brice -# Released under the MIT license (see COPYING.MIT for the terms) - -DESCRIPTION = "Administration tool for IP sets" -HOMEPAGE = "http://ipset.netfilter.org" -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" -SECTION = "base" - -DEPENDS = "libtool libmnl" - -SRC_URI = "http://ftp.netfilter.org/pub/ipset/${BP}.tar.bz2 \ - file://0001-ipset-Define-portable-basename-function.patch" -SRC_URI[sha256sum] = "e2c6ce4fcf3acb3893ca5d35c86935f80ad76fc5ccae601185842df760e0bc69" - -inherit autotools pkgconfig module-base - -EXTRA_OECONF += "-with-kbuild=${KBUILD_OUTPUT} --with-ksource=${STAGING_KERNEL_DIR}" - -RRECOMMENDS:${PN} = "\ - kernel-module-ip-set \ -" diff --git a/sources/meta-openembedded/meta-networking/recipes-filter/ipset/ipset_7.22.bb b/sources/meta-openembedded/meta-networking/recipes-filter/ipset/ipset_7.22.bb new file mode 100644 index 00000000..5eaf1424 --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-filter/ipset/ipset_7.22.bb @@ -0,0 +1,22 @@ +# Copyright (C) 2017 Aaron Brice +# Released under the MIT license (see COPYING.MIT for the terms) + +DESCRIPTION = "Administration tool for IP sets" +HOMEPAGE = "http://ipset.netfilter.org" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" +SECTION = "base" + +DEPENDS = "libtool libmnl" + +SRC_URI = "http://ftp.netfilter.org/pub/ipset/${BP}.tar.bz2 \ + file://0001-ipset-Define-portable-basename-function.patch" +SRC_URI[sha256sum] = "f6ac5a47c3ef9f4c67fcbdf55e791cbfe38eb0a4aa1baacd12646a140abacdd9" + +inherit autotools pkgconfig module-base + +EXTRA_OECONF += "-with-kbuild=${KBUILD_OUTPUT} --with-ksource=${STAGING_KERNEL_DIR}" + +RRECOMMENDS:${PN} = "\ + kernel-module-ip-set \ +" diff --git a/sources/meta-openembedded/meta-networking/recipes-filter/libnftnl/libnftnl_1.2.6.bb b/sources/meta-openembedded/meta-networking/recipes-filter/libnftnl/libnftnl_1.2.6.bb deleted file mode 100644 index 841a7267..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-filter/libnftnl/libnftnl_1.2.6.bb +++ /dev/null @@ -1,39 +0,0 @@ -SUMMARY = "Library for low-level interaction with nftables Netlink's API over libmnl" -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=79808397c3355f163c012616125c9e26" -SECTION = "libs" - -SRC_URI = "git://git.netfilter.org/libnftnl;branch=master \ - file://0001-configure.ac-Add-serial-tests.patch \ - file://run-ptest \ - " -SRCREV = "83dd4dc316b4189d16ead54cd30bfc89e5160cfd" - -S = "${WORKDIR}/git" - -inherit autotools pkgconfig ptest - -DEPENDS = "libmnl" -RDEPENDS:${PN}-ptest += " bash python3-core make" - -TESTDIR = "tests" - -do_compile_ptest() { - cp -rf ${S}/build-aux . - oe_runmake buildtest-TESTS -} - -do_install_ptest() { - cp -rf ${B}/build-aux ${D}${PTEST_PATH} - install -d ${D}${PTEST_PATH}/${TESTDIR} - cp -rf ${B}/${TESTDIR}/Makefile ${D}${PTEST_PATH}/${TESTDIR} - - # the binaries compiled in ${TESTDIR} will look for a compiler to - # use, which will cause failures. Substitute the binaries in - # ${TESTDIR}/.libs instead - cp -rf ${B}/${TESTDIR}/.libs/* ${D}${PTEST_PATH}/${TESTDIR} - - # Alter the Makefile so that it does not try and rebuild anything in - # other nonexistent paths before running the actual tests - sed -i 's/^Makefile/_Makefile/' ${D}${PTEST_PATH}/${TESTDIR}/Makefile -} diff --git a/sources/meta-openembedded/meta-networking/recipes-filter/libnftnl/libnftnl_1.2.7.bb b/sources/meta-openembedded/meta-networking/recipes-filter/libnftnl/libnftnl_1.2.7.bb new file mode 100644 index 00000000..b4652093 --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-filter/libnftnl/libnftnl_1.2.7.bb @@ -0,0 +1,39 @@ +SUMMARY = "Library for low-level interaction with nftables Netlink's API over libmnl" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=79808397c3355f163c012616125c9e26" +SECTION = "libs" + +SRC_URI = "git://git.netfilter.org/libnftnl;branch=master \ + file://0001-configure.ac-Add-serial-tests.patch \ + file://run-ptest \ + " +SRCREV = "116e95aa7b6358c917de8c69f6f173874030b46b" + +S = "${WORKDIR}/git" + +inherit autotools pkgconfig ptest + +DEPENDS = "libmnl" +RDEPENDS:${PN}-ptest += " bash python3-core make" + +TESTDIR = "tests" + +do_compile_ptest() { + cp -rf ${S}/build-aux . + oe_runmake buildtest-TESTS +} + +do_install_ptest() { + cp -rf ${B}/build-aux ${D}${PTEST_PATH} + install -d ${D}${PTEST_PATH}/${TESTDIR} + cp -rf ${B}/${TESTDIR}/Makefile ${D}${PTEST_PATH}/${TESTDIR} + + # the binaries compiled in ${TESTDIR} will look for a compiler to + # use, which will cause failures. Substitute the binaries in + # ${TESTDIR}/.libs instead + cp -rf ${B}/${TESTDIR}/.libs/* ${D}${PTEST_PATH}/${TESTDIR} + + # Alter the Makefile so that it does not try and rebuild anything in + # other nonexistent paths before running the actual tests + sed -i 's/^Makefile/_Makefile/' ${D}${PTEST_PATH}/${TESTDIR}/Makefile +} diff --git a/sources/meta-openembedded/meta-networking/recipes-filter/nftables/nftables/0001-tests-shell-Fix-sets-reset_command_0-for-current-ker.patch b/sources/meta-openembedded/meta-networking/recipes-filter/nftables/nftables/0001-tests-shell-Fix-sets-reset_command_0-for-current-ker.patch deleted file mode 100644 index 164182bb..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-filter/nftables/nftables/0001-tests-shell-Fix-sets-reset_command_0-for-current-ker.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 7a6089a400a573b9a4fd92f29c00a6be7b8ef269 Mon Sep 17 00:00:00 2001 -From: Phil Sutter -Date: Thu, 2 Nov 2023 16:02:14 +0100 -Subject: [PATCH] tests: shell: Fix sets/reset_command_0 for current kernels - -Since kernel commit 4c90bba60c26 ("netfilter: nf_tables: do not refresh -timeout when resetting element"), element reset won't touch expiry -anymore. Invert the one check to make sure it remains unaltered, drop -the other testing behaviour for per-element timeouts. - -Signed-off-by: Phil Sutter - -Upstream-Status: Backport -[https://git.netfilter.org/nftables/commit/?id=7a6089a400a573b9a4fd92f29c00a6be7b8ef269] - -Signed-off-by: William Lyu ---- - tests/shell/testcases/sets/reset_command_0 | 10 ++-------- - 1 file changed, 2 insertions(+), 8 deletions(-) - -diff --git a/tests/shell/testcases/sets/reset_command_0 b/tests/shell/testcases/sets/reset_command_0 -index e663dac8..d38ddb3f 100755 ---- a/tests/shell/testcases/sets/reset_command_0 -+++ b/tests/shell/testcases/sets/reset_command_0 -@@ -44,10 +44,10 @@ elem='element t s { 1.0.0.1 . udp . 53 }' - grep 'elements = ' | drop_seconds | uniq | wc -l) == 1 ]] - echo OK - --echo -n "counters and expiry are reset: " -+echo -n "counters are reset, expiry left alone: " - NEW=$($NFT "get $elem") - grep -q 'counter packets 0 bytes 0' <<< "$NEW" --[[ $(expires_minutes <<< "$NEW") -gt 20 ]] -+[[ $(expires_minutes <<< "$NEW") -lt 20 ]] - echo OK - - echo -n "get map elem matches reset map elem: " -@@ -80,12 +80,6 @@ OUT=$($NFT reset map t m) - $DIFF -u <(echo "$EXP") <(echo "$OUT") - echo OK - --echo -n "reset command respects per-element timeout: " --VAL=$($NFT get element t s '{ 2.0.0.2 . tcp . 22 }' | expires_minutes) --[[ $VAL -lt 15 ]] # custom timeout applies --[[ $VAL -gt 10 ]] # expires was reset --echo OK -- - echo -n "remaining elements are reset: " - OUT=$($NFT list ruleset) - grep -q '2.0.0.2 . tcp . 22 counter packets 0 bytes 0' <<< "$OUT" --- -2.43.0 - diff --git a/sources/meta-openembedded/meta-networking/recipes-filter/nftables/nftables/0001-tests-shell-skip-secmark-tests-if-kernel-does-not-su.patch b/sources/meta-openembedded/meta-networking/recipes-filter/nftables/nftables/0001-tests-shell-skip-secmark-tests-if-kernel-does-not-su.patch deleted file mode 100644 index 2a966ab4..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-filter/nftables/nftables/0001-tests-shell-skip-secmark-tests-if-kernel-does-not-su.patch +++ /dev/null @@ -1,46 +0,0 @@ -From fff913c1eefbc84eb2d9c52038ef29fe881e9ee9 Mon Sep 17 00:00:00 2001 -From: Pablo Neira Ayuso -Date: Tue, 21 Nov 2023 21:16:38 +0100 -Subject: [PATCH] tests: shell: skip secmark tests if kernel does not support - it - -Signed-off-by: Pablo Neira Ayuso - -Upstream-Status: Backport -[https://git.netfilter.org/nftables/commit/?id=fff913c1eefbc84eb2d9c52038ef29fe881e9ee9] - -Signed-off-by: William Lyu ---- - tests/shell/features/secmark.nft | 7 +++++++ - tests/shell/testcases/json/0005secmark_objref_0 | 1 + - 2 files changed, 8 insertions(+) - create mode 100644 tests/shell/features/secmark.nft - -diff --git a/tests/shell/features/secmark.nft b/tests/shell/features/secmark.nft -new file mode 100644 -index 00000000..ccbb572f ---- /dev/null -+++ b/tests/shell/features/secmark.nft -@@ -0,0 +1,7 @@ -+# fb961945457f ("netfilter: nf_tables: add SECMARK support") -+# v4.20-rc1~14^2~125^2~5 -+table inet x { -+ secmark ssh_server { -+ "system_u:object_r:ssh_server_packet_t:s0" -+ } -+} -diff --git a/tests/shell/testcases/json/0005secmark_objref_0 b/tests/shell/testcases/json/0005secmark_objref_0 -index 992d1b00..5c44f093 100755 ---- a/tests/shell/testcases/json/0005secmark_objref_0 -+++ b/tests/shell/testcases/json/0005secmark_objref_0 -@@ -1,6 +1,7 @@ - #!/bin/bash - - # NFT_TEST_REQUIRES(NFT_TEST_HAVE_json) -+# NFT_TEST_REQUIRES(NFT_TEST_HAVE_secmark) - - set -e - --- -2.43.0 - diff --git a/sources/meta-openembedded/meta-networking/recipes-filter/nftables/nftables_1.0.9.bb b/sources/meta-openembedded/meta-networking/recipes-filter/nftables/nftables_1.0.9.bb deleted file mode 100644 index 569ab6f6..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-filter/nftables/nftables_1.0.9.bb +++ /dev/null @@ -1,109 +0,0 @@ -SUMMARY = "Netfilter Tables userspace utillites" -DESCRIPTION = "nftables replaces the popular {ip,ip6,arp,eb}tables. \ - This software provides an in-kernel packet classification framework \ - that is based on a network-specific Virtual Machine (VM), \ - nft, a userspace command line tool and libnftables, a high-level userspace library." -HOMEPAGE = "https://netfilter.org/projects/nftables" -SECTION = "net" -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=81ec33bb3e47b460fc993ac768c74b62" - -DEPENDS = "libmnl libnftnl bison-native \ - ${@bb.utils.contains('PACKAGECONFIG', 'mini-gmp', '', 'gmp', d)}" - -SRC_URI = "http://www.netfilter.org/projects/nftables/files/${BP}.tar.xz \ - file://0001-tests-shell-Fix-sets-reset_command_0-for-current-ker.patch \ - file://0001-tests-shell-skip-secmark-tests-if-kernel-does-not-su.patch \ - file://run-ptest \ - " -SRC_URI[sha256sum] = "a3c304cd9ba061239ee0474f9afb938a9bb99d89b960246f66f0c3a0a85e14cd" - -inherit autotools manpages pkgconfig ptest - -PACKAGECONFIG ?= "python readline json" -PACKAGECONFIG[editline] = "--with-cli=editline, , libedit, , , linenoise readline" -PACKAGECONFIG[json] = "--with-json, --without-json, jansson" -PACKAGECONFIG[linenoise] = "--with-cli=linenoise, , linenoise, , , editline readline" -PACKAGECONFIG[manpages] = "--enable-man-doc, --disable-man-doc, asciidoc-native" -PACKAGECONFIG[mini-gmp] = "--with-mini-gmp, --without-mini-gmp" -PACKAGECONFIG[python] = ",, python3-setuptools-native" -PACKAGECONFIG[readline] = "--with-cli=readline, , readline, , , editline linenoise" -PACKAGECONFIG[xtables] = "--with-xtables, --without-xtables, iptables" - -EXTRA_OECONF = " \ - ${@bb.utils.contains_any('PACKAGECONFIG', 'editline linenoise readline', '', '--without-cli', d)}" - -SETUPTOOLS_SETUP_PATH = "${S}/py" - -inherit_defer ${@bb.utils.contains('PACKAGECONFIG', 'python', 'setuptools3', '', d)} - -PACKAGES =+ "${@bb.utils.contains('PACKAGECONFIG', 'python', '${PN}-python', '', d)}" -FILES:${PN}-python = "${PYTHON_SITEPACKAGES_DIR}" -RDEPENDS:${PN}-python = "python3-core python3-json ${PN}" - -# Explicitly define do_configure, do_compile and do_install because both autotools and setuptools3 -# have EXPORT_FUNCTIONS do_configure do_compile do_install -do_configure() { - autotools_do_configure - if ${@bb.utils.contains('PACKAGECONFIG', 'python', 'true', 'false', d)}; then - setuptools3_do_configure - fi -} - -do_compile() { - autotools_do_compile - if ${@bb.utils.contains('PACKAGECONFIG', 'python', 'true', 'false', d)}; then - setuptools3_do_compile - fi -} - -do_install() { - autotools_do_install - if ${@bb.utils.contains('PACKAGECONFIG', 'python', 'true', 'false', d)}; then - setuptools3_do_install - fi -} - -RDEPENDS:${PN}-ptest += " \ - bash coreutils make iproute2 iputils-ping procps python3-core python3-ctypes python3-json python3-misc sed util-linux \ - ${@bb.utils.contains('PACKAGECONFIG', 'python', '${PN}-python', '', d)} \ -" - -RRECOMMENDS:${PN}-ptest += "\ -kernel-module-nft-chain-nat kernel-module-nft-queue \ -kernel-module-nft-compat kernel-module-nft-quota \ -kernel-module-nft-connlimit kernel-module-nft-redir \ -kernel-module-nft-ct kernel-module-nft-reject \ -kernel-module-nft-flow-offload kernel-module-nft-reject-inet \ -kernel-module-nft-hash kernel-module-nft-reject-ipv4 \ -kernel-module-nft-limit kernel-module-nft-reject-ipv6 \ -kernel-module-nft-log kernel-module-nft-socket \ -kernel-module-nft-masq kernel-module-nft-synproxy \ -kernel-module-nft-nat kernel-module-nft-tunnel \ -kernel-module-nft-numgen kernel-module-nft-xfrm \ -kernel-module-nft-osf \ -kernel-module-nf-flow-table \ -kernel-module-nf-flow-table-inet \ -kernel-module-nf-nat \ -kernel-module-nf-log-syslog \ -kernel-module-nf-nat-ftp \ -kernel-module-nf-nat-sip \ -kernel-module-8021q \ -kernel-module-dummy" - -TESTDIR = "tests" - -PRIVATE_LIBS:${PN}-ptest:append = " libnftables.so.1" - -do_install_ptest() { - cp -rf ${S}/build-aux ${D}${PTEST_PATH} - cp -rf ${S}/src ${D}${PTEST_PATH} - mkdir -p ${D}${PTEST_PATH}/src/.libs - cp -rf ${B}/src/.libs/* ${D}${PTEST_PATH}/src/.libs - cp -rf ${B}/src/.libs/nft ${D}${PTEST_PATH}/src/ - cp -rf ${S}/${TESTDIR} ${D}${PTEST_PATH}/${TESTDIR} - sed -i 's#/usr/bin/python#/usr/bin/python3#' ${D}${PTEST_PATH}/${TESTDIR}/json_echo/run-test.py - sed -i 's#/usr/bin/env python#/usr/bin/env python3#' ${D}${PTEST_PATH}/${TESTDIR}/py/nft-test.py - # handle multilib - sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest -} diff --git a/sources/meta-openembedded/meta-networking/recipes-filter/nftables/nftables_1.1.0.bb b/sources/meta-openembedded/meta-networking/recipes-filter/nftables/nftables_1.1.0.bb new file mode 100644 index 00000000..98e7a85a --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-filter/nftables/nftables_1.1.0.bb @@ -0,0 +1,104 @@ +SUMMARY = "Netfilter Tables userspace utillites" +DESCRIPTION = "nftables replaces the popular {ip,ip6,arp,eb}tables. \ + This software provides an in-kernel packet classification framework \ + that is based on a network-specific Virtual Machine (VM), \ + nft, a userspace command line tool and libnftables, a high-level userspace library." +HOMEPAGE = "https://netfilter.org/projects/nftables" +SECTION = "net" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=81ec33bb3e47b460fc993ac768c74b62" + +DEPENDS = "libmnl libnftnl bison-native \ + ${@bb.utils.contains('PACKAGECONFIG', 'mini-gmp', '', 'gmp', d)}" + +SRC_URI = "http://www.netfilter.org/projects/nftables/files/${BP}.tar.xz \ + file://run-ptest \ + " +SRC_URI[sha256sum] = "ef3373294886c5b607ee7be82c56a25bc04e75f802f8e8adcd55aac91eb0aa24" + +inherit autotools manpages pkgconfig ptest + +PACKAGECONFIG ?= "python readline json" +PACKAGECONFIG[editline] = "--with-cli=editline, , libedit, , , linenoise readline" +PACKAGECONFIG[json] = "--with-json, --without-json, jansson" +PACKAGECONFIG[linenoise] = "--with-cli=linenoise, , linenoise, , , editline readline" +PACKAGECONFIG[manpages] = "--enable-man-doc, --disable-man-doc, asciidoc-native" +PACKAGECONFIG[mini-gmp] = "--with-mini-gmp, --without-mini-gmp" +PACKAGECONFIG[python] = "" +PACKAGECONFIG[readline] = "--with-cli=readline, , readline, , , editline linenoise" +PACKAGECONFIG[xtables] = "--with-xtables, --without-xtables, iptables" + +EXTRA_OECONF = " \ + ${@bb.utils.contains_any('PACKAGECONFIG', 'editline linenoise readline', '', '--without-cli', d)}" + +PEP517_SOURCE_PATH = "${S}/py" + +inherit_defer ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python_setuptools_build_meta', '', d)} + +PACKAGES =+ "${@bb.utils.contains('PACKAGECONFIG', 'python', '${PN}-python', '', d)}" +FILES:${PN}-python = "${PYTHON_SITEPACKAGES_DIR}" +RDEPENDS:${PN}-python = "python3-core python3-json ${PN}" + +# Explicitly define do_configure, do_compile and do_install because both autotools and setuptools3 +# have EXPORT_FUNCTIONS do_configure do_compile do_install +do_configure() { + autotools_do_configure + if ${@bb.utils.contains('PACKAGECONFIG', 'python', 'true', 'false', d)}; then + python_pep517_do_configure + fi +} + +do_compile() { + autotools_do_compile + if ${@bb.utils.contains('PACKAGECONFIG', 'python', 'true', 'false', d)}; then + python_pep517_do_compile + fi +} + +do_install() { + autotools_do_install + if ${@bb.utils.contains('PACKAGECONFIG', 'python', 'true', 'false', d)}; then + python_pep517_do_install + fi +} + +RDEPENDS:${PN}-ptest += " ${PN}-python bash coreutils make iproute2 iputils-ping procps python3-core python3-ctypes python3-json python3-misc sed util-linux" + +RRECOMMENDS:${PN}-ptest += "\ +kernel-module-nft-chain-nat kernel-module-nft-queue \ +kernel-module-nft-compat kernel-module-nft-quota \ +kernel-module-nft-connlimit kernel-module-nft-redir \ +kernel-module-nft-ct kernel-module-nft-reject \ +kernel-module-nft-flow-offload kernel-module-nft-reject-inet \ +kernel-module-nft-hash kernel-module-nft-reject-ipv4 \ +kernel-module-nft-limit kernel-module-nft-reject-ipv6 \ +kernel-module-nft-log kernel-module-nft-socket \ +kernel-module-nft-masq kernel-module-nft-synproxy \ +kernel-module-nft-nat kernel-module-nft-tunnel \ +kernel-module-nft-numgen kernel-module-nft-xfrm \ +kernel-module-nft-osf \ +kernel-module-nf-flow-table \ +kernel-module-nf-flow-table-inet \ +kernel-module-nf-nat \ +kernel-module-nf-log-syslog \ +kernel-module-nf-nat-ftp \ +kernel-module-nf-nat-sip \ +kernel-module-8021q \ +kernel-module-dummy" + +TESTDIR = "tests" + +PRIVATE_LIBS:${PN}-ptest:append = " libnftables.so.1" + +do_install_ptest() { + cp -rf ${S}/build-aux ${D}${PTEST_PATH} + cp -rf ${S}/src ${D}${PTEST_PATH} + mkdir -p ${D}${PTEST_PATH}/src/.libs + cp -rf ${B}/src/.libs/* ${D}${PTEST_PATH}/src/.libs + cp -rf ${B}/src/.libs/nft ${D}${PTEST_PATH}/src/ + cp -rf ${S}/${TESTDIR} ${D}${PTEST_PATH}/${TESTDIR} + sed -i 's#/usr/bin/python#/usr/bin/python3#' ${D}${PTEST_PATH}/${TESTDIR}/json_echo/run-test.py + sed -i 's#/usr/bin/env python#/usr/bin/env python3#' ${D}${PTEST_PATH}/${TESTDIR}/py/nft-test.py + # handle multilib + sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest +} diff --git a/sources/meta-openembedded/meta-networking/recipes-filter/ulogd2/ulogd2_2.0.8.bb b/sources/meta-openembedded/meta-networking/recipes-filter/ulogd2/ulogd2_2.0.8.bb index d075ec47..635fa6a4 100644 --- a/sources/meta-openembedded/meta-networking/recipes-filter/ulogd2/ulogd2_2.0.8.bb +++ b/sources/meta-openembedded/meta-networking/recipes-filter/ulogd2/ulogd2_2.0.8.bb @@ -42,11 +42,11 @@ do_install:append () { install -m 0644 ${S}/ulogd.8 ${D}${mandir}/man8/ulogd.8 install -d ${D}${systemd_system_unitdir} - install -m 0644 ${WORKDIR}/ulogd.service ${D}${systemd_system_unitdir} + install -m 0644 ${UNPACKDIR}/ulogd.service ${D}${systemd_system_unitdir} sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_system_unitdir}/ulogd.service install -d ${D}${sysconfdir}/init.d - install -m 755 ${WORKDIR}/ulogd.init ${D}${sysconfdir}/init.d/ulogd + install -m 755 ${UNPACKDIR}/ulogd.init ${D}${sysconfdir}/init.d/ulogd } PACKAGES += "${PN}-plugins" diff --git a/sources/meta-openembedded/meta-networking/recipes-protocols/freediameter/files/0001-bison-flex-Add-flags-for-carrying-user-specified-par.patch b/sources/meta-openembedded/meta-networking/recipes-protocols/freediameter/files/0001-bison-flex-Add-flags-for-carrying-user-specified-par.patch new file mode 100644 index 00000000..98ba4d52 --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-protocols/freediameter/files/0001-bison-flex-Add-flags-for-carrying-user-specified-par.patch @@ -0,0 +1,39 @@ +From fa6227d92725af5ae17b8435c0d50d92ff7a575c Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 14 Aug 2024 19:32:25 -0700 +Subject: [PATCH] bison/flex: Add flags for carrying user specified parameters + +This helps in passing cmdline to flex and bison e.g. to remove lines +from generated output to avoid absolute paths + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- + cmake/Modules/CMakeUserUseBison.cmake | 1 + + cmake/Modules/CMakeUserUseFlex.cmake | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/cmake/Modules/CMakeUserUseBison.cmake b/cmake/Modules/CMakeUserUseBison.cmake +index 9257545..b61bd0e 100644 +--- a/cmake/Modules/CMakeUserUseBison.cmake ++++ b/cmake/Modules/CMakeUserUseBison.cmake +@@ -52,6 +52,7 @@ IF(BISON_EXECUTABLE) + OUTPUT "${OUTFILE}" "${HEADER}" + COMMAND "${BISON_EXECUTABLE}" + ARGS "--name-prefix=${PREFIX}" ++ "${BISON_TARGET_ARG_COMPILE_FLAGS}" + "--defines" + "--output-file=${OUTFILE}" + "${CMAKE_CURRENT_SOURCE_DIR}/${FILENAME}" +diff --git a/cmake/Modules/CMakeUserUseFlex.cmake b/cmake/Modules/CMakeUserUseFlex.cmake +index 7d0394f..1221dca 100644 +--- a/cmake/Modules/CMakeUserUseFlex.cmake ++++ b/cmake/Modules/CMakeUserUseFlex.cmake +@@ -39,6 +39,7 @@ IF(FLEX_EXECUTABLE) + OUTPUT "${OUTFILE}" + COMMAND "${FLEX_EXECUTABLE}" + ARGS "-P${PREFIX}" ++ "${FLEX_TARGET_ARG_COMPILE_FLAGS}" + "-o${OUTFILE}" + "${CMAKE_CURRENT_SOURCE_DIR}/${FILENAME}" + DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${FILENAME}") diff --git a/sources/meta-openembedded/meta-networking/recipes-protocols/freediameter/freediameter_1.5.0.bb b/sources/meta-openembedded/meta-networking/recipes-protocols/freediameter/freediameter_1.5.0.bb index b3282d27..cf50a92a 100644 --- a/sources/meta-openembedded/meta-networking/recipes-protocols/freediameter/freediameter_1.5.0.bb +++ b/sources/meta-openembedded/meta-networking/recipes-protocols/freediameter/freediameter_1.5.0.bb @@ -7,7 +7,7 @@ Accounting needs." HOMEPAGE = "http://www.freediameter.net" -DEPENDS = "flex bison cmake-native libgcrypt gnutls libidn2 lksctp-tools virtual/kernel bison-native" +DEPENDS = "flex-native bison-native cmake-native libgcrypt gnutls libidn2 lksctp-tools virtual/kernel bison-native" PACKAGE_ARCH = "${MACHINE_ARCH}" @@ -23,6 +23,7 @@ SRC_URI = "git://github.com/freeDiameter/freeDiameter;protocol=https;branch=mast file://freeDiameter.conf \ file://install_test.patch \ file://0001-tests-use-EXTENSIONS_DIR.patch \ + file://0001-bison-flex-Add-flags-for-carrying-user-specified-par.patch \ " S = "${WORKDIR}/git" @@ -49,6 +50,8 @@ EXTRA_OECMAKE = " \ -DEXTENSIONS_DIR:PATH=${libdir}/${fd_pkgname} \ -DINSTALL_TEST_SUFFIX:PATH=${PTEST_PATH}-tests \ -DCMAKE_SKIP_RPATH:BOOL=ON \ + -DFLEX_TARGET_ARG_COMPILE_FLAGS='--noline' \ + -DBISON_TARGET_ARG_COMPILE_FLAGS='--no-lines' \ " # INSTALL_LIBRARY_SUFFIX is relative to CMAKE_INSTALL_PREFIX # specify it on cmd line will fix the SET bug in CMakeList.txt @@ -78,18 +81,18 @@ do_install:append() { mv ${D}${sysconfdir}/${fd_pkgname}/freediameter.conf.sample \ ${D}${sysconfdir}/${fd_pkgname}/freeDiameter.conf.sample install -d ${D}${sysconfdir}/freeDiameter - install ${WORKDIR}/freeDiameter.conf ${D}${sysconfdir}/${fd_pkgname}/freeDiameter.conf + install ${UNPACKDIR}/freeDiameter.conf ${D}${sysconfdir}/${fd_pkgname}/freeDiameter.conf # install daemon init related files install -d -m 0755 ${D}${sysconfdir}/default install -d -m 0755 ${D}${sysconfdir}/init.d install -m 0644 ${S}/contrib/debian/freediameter-daemon.default \ ${D}${sysconfdir}/default/${BPN} - install -m 0755 ${WORKDIR}/freediameter.init ${D}${sysconfdir}/init.d/${BPN} + install -m 0755 ${UNPACKDIR}/freediameter.init ${D}${sysconfdir}/init.d/${BPN} # install for systemd install -d ${D}${systemd_system_unitdir} - install -m 0644 ${WORKDIR}/freediameter.service ${D}${systemd_system_unitdir} + install -m 0644 ${UNPACKDIR}/freediameter.service ${D}${systemd_system_unitdir} sed -i -e 's,@BINDIR@,${bindir},g' ${D}${systemd_system_unitdir}/*.service cat >> ${D}${sysconfdir}/freeDiameter/freeDiameter.conf < -Date: Fri, 15 Mar 2024 14:34:06 -0700 -Subject: [PATCH] zebra: Mimic GNU basename() API for non-glibc library e.g. - musl musl only provides POSIX version of basename and it has also removed - providing it via string.h header [1] which now results in compile errors with - newer compilers e.g. clang-18 - -[1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7 - -Upstream-Status: Submitted [https://github.com/FRRouting/frr/pull/15561/] -Signed-off-by: Khem Raj ---- - zebra/zebra_netns_notify.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/zebra/zebra_netns_notify.c b/zebra/zebra_netns_notify.c -index 1bb1292e34..d55df2f62d 100644 ---- a/zebra/zebra_netns_notify.c -+++ b/zebra/zebra_netns_notify.c -@@ -41,6 +41,10 @@ - #define ZEBRA_NS_POLLING_INTERVAL_MSEC 1000 - #define ZEBRA_NS_POLLING_MAX_RETRIES 200 - -+#if !defined(__GLIBC__) -+#define basename(src) (strrchr(src,'/') ? strrchr(src,'/')+1 : src) -+#endif -+ - DEFINE_MTYPE_STATIC(ZEBRA, NETNS_MISC, "ZebraNetNSInfo"); - static struct event *zebra_netns_notify_current; - --- -2.44.0 - diff --git a/sources/meta-openembedded/meta-networking/recipes-protocols/frr/frr/CVE-2024-31948.patch b/sources/meta-openembedded/meta-networking/recipes-protocols/frr/frr/CVE-2024-31948.patch deleted file mode 100644 index bc1f2edc..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-protocols/frr/frr/CVE-2024-31948.patch +++ /dev/null @@ -1,130 +0,0 @@ -From a11446687169c679b5e51b57f151a6f6c119656c Mon Sep 17 00:00:00 2001 -From: Donatas Abraitis -Date: Wed, 27 Mar 2024 18:42:56 +0200 -Subject: [PATCH 1/2] bgpd: Fix error handling when receiving BGP Prefix SID - attribute - -Without this patch, we always set the BGP Prefix SID attribute flag without -checking if it's malformed or not. RFC8669 says that this attribute MUST be discarded. - -Also, this fixes the bgpd crash when a malformed Prefix SID attribute is received, -with malformed transitive flags and/or TLVs. - -Reported-by: Iggy Frankovic -Signed-off-by: Donatas Abraitis - -CVE: CVE-2024-31948 -Upstream-Status: Backport [https://github.com/FRRouting/frr/commit/ba6a8f1a31e1a88df2de69ea46068e8bd9b97138] - -Signed-off-by: Zhang Peng ---- - bgpd/bgp_attr.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c -index 56e77eb3a..2639ff864 100644 ---- a/bgpd/bgp_attr.c -+++ b/bgpd/bgp_attr.c -@@ -1390,6 +1390,7 @@ bgp_attr_malformed(struct bgp_attr_parser_args *args, uint8_t subcode, - case BGP_ATTR_AS4_AGGREGATOR: - case BGP_ATTR_AGGREGATOR: - case BGP_ATTR_ATOMIC_AGGREGATE: -+ case BGP_ATTR_PREFIX_SID: - return BGP_ATTR_PARSE_PROCEED; - - /* Core attributes, particularly ones which may influence route -@@ -3144,8 +3145,6 @@ enum bgp_attr_parse_ret bgp_attr_prefix_sid(struct bgp_attr_parser_args *args) - struct attr *const attr = args->attr; - enum bgp_attr_parse_ret ret; - -- attr->flag |= ATTR_FLAG_BIT(BGP_ATTR_PREFIX_SID); -- - uint8_t type; - uint16_t length; - size_t headersz = sizeof(type) + sizeof(length); -@@ -3195,6 +3194,8 @@ enum bgp_attr_parse_ret bgp_attr_prefix_sid(struct bgp_attr_parser_args *args) - } - } - -+ SET_FLAG(attr->flag, ATTR_FLAG_BIT(BGP_ATTR_PREFIX_SID)); -+ - return BGP_ATTR_PARSE_PROCEED; - } - --- -2.34.1 - -From 70555e1c0927b84f3aae9406379b00c976b2fa0c Mon Sep 17 00:00:00 2001 -From: Donatas Abraitis -Date: Wed, 27 Mar 2024 19:08:38 +0200 -Subject: [PATCH 2/2] bgpd: Prevent from one more CVE triggering this place - -If we receive an attribute that is handled by bgp_attr_malformed(), use -treat-as-withdraw behavior for unknown (or missing to add - if new) attributes. - -Signed-off-by: Donatas Abraitis - -CVE: CVE-2024-31948 -Upstream-Status: Backport [https://github.com/FRRouting/frr/commit/babb23b74855e23c987a63f8256d24e28c044d07] - -Signed-off-by: Zhang Peng ---- - bgpd/bgp_attr.c | 33 ++++++++++++++++++++++----------- - 1 file changed, 22 insertions(+), 11 deletions(-) - -diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c -index 2639ff864..797f05d60 100644 ---- a/bgpd/bgp_attr.c -+++ b/bgpd/bgp_attr.c -@@ -1381,6 +1381,15 @@ bgp_attr_malformed(struct bgp_attr_parser_args *args, uint8_t subcode, - (args->startp - STREAM_DATA(BGP_INPUT(peer))) - + args->total); - -+ /* Partial optional attributes that are malformed should not cause -+ * the whole session to be reset. Instead treat it as a withdrawal -+ * of the routes, if possible. -+ */ -+ if (CHECK_FLAG(flags, BGP_ATTR_FLAG_TRANS) && -+ CHECK_FLAG(flags, BGP_ATTR_FLAG_OPTIONAL) && -+ CHECK_FLAG(flags, BGP_ATTR_FLAG_PARTIAL)) -+ return BGP_ATTR_PARSE_WITHDRAW; -+ - switch (args->type) { - /* where an attribute is relatively inconsequential, e.g. it does not - * affect route selection, and can be safely ignored, then any such -@@ -1418,19 +1427,21 @@ bgp_attr_malformed(struct bgp_attr_parser_args *args, uint8_t subcode, - BGP_NOTIFY_UPDATE_ERR, subcode, - notify_datap, length); - return BGP_ATTR_PARSE_ERROR; -+ default: -+ /* Unknown attributes, that are handled by this function -+ * should be treated as withdraw, to prevent one more CVE -+ * from being introduced. -+ * RFC 7606 says: -+ * The "treat-as-withdraw" approach is generally preferred -+ * and the "session reset" approach is discouraged. -+ */ -+ flog_err(EC_BGP_ATTR_FLAG, -+ "%s(%u) attribute received, while it is not known how to handle it, treating as withdraw", -+ lookup_msg(attr_str, args->type, NULL), args->type); -+ break; - } - -- /* Partial optional attributes that are malformed should not cause -- * the whole session to be reset. Instead treat it as a withdrawal -- * of the routes, if possible. -- */ -- if (CHECK_FLAG(flags, BGP_ATTR_FLAG_TRANS) -- && CHECK_FLAG(flags, BGP_ATTR_FLAG_OPTIONAL) -- && CHECK_FLAG(flags, BGP_ATTR_FLAG_PARTIAL)) -- return BGP_ATTR_PARSE_WITHDRAW; -- -- /* default to reset */ -- return BGP_ATTR_PARSE_ERROR_NOTIFYPLS; -+ return BGP_ATTR_PARSE_WITHDRAW; - } - - /* Find out what is wrong with the path attribute flag bits and log the error. --- -2.34.1 - diff --git a/sources/meta-openembedded/meta-networking/recipes-protocols/frr/frr/CVE-2024-31949.patch b/sources/meta-openembedded/meta-networking/recipes-protocols/frr/frr/CVE-2024-31949.patch deleted file mode 100644 index dad0255e..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-protocols/frr/frr/CVE-2024-31949.patch +++ /dev/null @@ -1,163 +0,0 @@ -From 2779d7d7c4f465f8e117aa4c47982dd60d620bc9 Mon Sep 17 00:00:00 2001 -From: Donatas Abraitis -Date: Sat, 30 Mar 2024 15:35:18 +0200 -Subject: [PATCH] bgpd: Fix errors handling for MP/GR capabilities as dynamic - capability - -When receiving a MP/GR capability as dynamic capability, but malformed, do not -forget to advance the pointer to avoid hitting infinity loop. - -After: -``` -Mar 29 11:15:28 donatas-laptop bgpd[353550]: [GS0AQ-HKY0X] 127.0.0.1 rcv CAPABILITY -Mar 29 11:15:28 donatas-laptop bgpd[353550]: [JTVED-VGTQQ] 127.0.0.1(donatas-pc): CAPABILITY has action: 1, code: 5, length 0 -Mar 29 11:15:28 donatas-laptop bgpd[353550]: [JTVED-VGTQQ] 127.0.0.1(donatas-pc): CAPABILITY has action: 1, code: 0, length 0 -Mar 29 11:15:28 donatas-laptop bgpd[353550]: [HFHDS-QT71N][EC 33554494] 127.0.0.1(donatas-pc): unrecognized capability code: 0 - ignored -Mar 29 11:15:28 donatas-laptop bgpd[353550]: [JTVED-VGTQQ] 127.0.0.1(donatas-pc): CAPABILITY has action: 0, code: 0, length 0 -Mar 29 11:15:28 donatas-laptop bgpd[353550]: [HFHDS-QT71N][EC 33554494] 127.0.0.1(donatas-pc): unrecognized capability code: 0 - ignored -Mar 29 11:15:28 donatas-laptop bgpd[353550]: [JTVED-VGTQQ] 127.0.0.1(donatas-pc): CAPABILITY has action: 0, code: 0, length 0 -Mar 29 11:15:28 donatas-laptop bgpd[353550]: [HFHDS-QT71N][EC 33554494] 127.0.0.1(donatas-pc): unrecognized capability code: 0 - ignored -Mar 29 11:15:28 donatas-laptop bgpd[353550]: [JTVED-VGTQQ] 127.0.0.1(donatas-pc): CAPABILITY has action: 0, code: 0, length 1 -Mar 29 11:15:28 donatas-laptop bgpd[353550]: [HFHDS-QT71N][EC 33554494] 127.0.0.1(donatas-pc): unrecognized capability code: 0 - ignored -Mar 29 11:15:28 donatas-laptop bgpd[353550]: [JTVED-VGTQQ] 127.0.0.1(donatas-pc): CAPABILITY has action: 1, code: 1, length 10 -Mar 29 11:15:28 donatas-laptop bgpd[353550]: [Z1DRQ-N6Z5F] 127.0.0.1(donatas-pc): Dynamic Capability MultiProtocol Extensions afi/safi invalid (bad-value/unicast) -``` - -Before: -``` -Mar 29 11:14:54 donatas-laptop bgpd[347675]: [JTVED-VGTQQ] 127.0.0.1(donatas-pc): CAPABILITY has action: 1, code: 1, length 10 -Mar 29 11:14:54 donatas-laptop bgpd[347675]: [Z1DRQ-N6Z5F] 127.0.0.1(donatas-pc): Dynamic Capability MultiProtocol Extensions afi/safi invalid (bad-value/unicast) -Mar 29 11:14:54 donatas-laptop bgpd[347675]: [JTVED-VGTQQ] 127.0.0.1(donatas-pc): CAPABILITY has action: 1, code: 1, length 10 -Mar 29 11:14:54 donatas-laptop bgpd[347675]: [Z1DRQ-N6Z5F] 127.0.0.1(donatas-pc): Dynamic Capability MultiProtocol Extensions afi/safi invalid (bad-value/unicast) -Mar 29 11:14:54 donatas-laptop bgpd[347675]: [JTVED-VGTQQ] 127.0.0.1(donatas-pc): CAPABILITY has action: 1, code: 1, length 10 -Mar 29 11:14:54 donatas-laptop bgpd[347675]: [Z1DRQ-N6Z5F] 127.0.0.1(donatas-pc): Dynamic Capability MultiProtocol Extensions afi/safi invalid (bad-value/unicast) -Mar 29 11:14:54 donatas-laptop bgpd[347675]: [JTVED-VGTQQ] 127.0.0.1(donatas-pc): CAPABILITY has action: 1, code: 1, length 10 -Mar 29 11:14:54 donatas-laptop bgpd[347675]: [Z1DRQ-N6Z5F] 127.0.0.1(donatas-pc): Dynamic Capability MultiProtocol Extensions afi/safi invalid (bad-value/unicast) -Mar 29 11:14:54 donatas-laptop bgpd[347675]: [JTVED-VGTQQ] 127.0.0.1(donatas-pc): CAPABILITY has action: 1, code: 1, length 10 -Mar 29 11:14:54 donatas-laptop bgpd[347675]: [Z1DRQ-N6Z5F] 127.0.0.1(donatas-pc): Dynamic Capability MultiProtocol Extensions afi/safi invalid (bad-value/unicast) -Mar 29 11:14:54 donatas-laptop bgpd[347675]: [JTVED-VGTQQ] 127.0.0.1(donatas-pc): CAPABILITY has action: 1, code: 1, length 10 -Mar 29 11:14:54 donatas-laptop bgpd[347675]: [Z1DRQ-N6Z5F] 127.0.0.1(donatas-pc): Dynamic Capability MultiProtocol Extensions afi/safi invalid (bad-value/unicast) -Mar 29 11:14:54 donatas-laptop bgpd[347675]: [JTVED-VGTQQ] 127.0.0.1(donatas-pc): CAPABILITY has action: 1, code: 1, length 10 -Mar 29 11:14:54 donatas-laptop bgpd[347675]: [Z1DRQ-N6Z5F] 127.0.0.1(donatas-pc): Dynamic Capability MultiProtocol Extensions afi/safi invalid (bad-value/unicast) -Mar 29 11:14:54 donatas-laptop bgpd[347675]: [JTVED-VGTQQ] 127.0.0.1(donatas-pc): CAPABILITY has action: 1, code: 1, length 10 -Mar 29 11:14:54 donatas-laptop bgpd[347675]: [Z1DRQ-N6Z5F] 127.0.0.1(donatas-pc): Dynamic Capability MultiProtocol Extensions afi/safi invalid (bad-value/unicast) -Mar 29 11:14:54 donatas-laptop bgpd[347675]: [JTVED-VGTQQ] 127.0.0.1(donatas-pc): CAPABILITY has action: 1, code: 1, length 10 -Mar 29 11:14:54 donatas-laptop bgpd[347675]: [Z1DRQ-N6Z5F] 127.0.0.1(donatas-pc): Dynamic Capability MultiProtocol Extensions afi/safi invalid (bad-value/unicast) -Mar 29 11:14:54 donatas-laptop bgpd[347675]: [JTVED-VGTQQ] 127.0.0.1(donatas-pc): CAPABILITY has action: 1, code: 1, length 10 -Mar 29 11:14:54 donatas-laptop bgpd[347675]: [Z1DRQ-N6Z5F] 127.0.0.1(donatas-pc): Dynamic Capability MultiProtocol Extensions afi/safi invalid (bad-value/unicast) -Mar 29 11:14:54 donatas-laptop bgpd[347675]: [JTVED-VGTQQ] 127.0.0.1(donatas-pc): CAPABILITY has action: 1, code: 1, length 10 -Mar 29 11:14:54 donatas-laptop bgpd[347675]: [Z1DRQ-N6Z5F] 127.0.0.1(donatas-pc): Dynamic Capability MultiProtocol Extensions afi/safi invalid (bad-value/unicast) -Mar 29 11:14:54 donatas-laptop bgpd[347675]: [JTVED-VGTQQ] 127.0.0.1(donatas-pc): CAPABILITY has action: 1, code: 1, length 10 -Mar 29 11:14:54 donatas-laptop bgpd[347675]: [Z1DRQ-N6Z5F] 127.0.0.1(donatas-pc): Dynamic Capability MultiProtocol Extensions afi/safi invalid (bad-value/unicast) -Mar 29 11:14:54 donatas-laptop bgpd[347675]: [JTVED-VGTQQ] 127.0.0.1(donatas-pc): CAPABILITY has action: 1, code: 1, length 10 -Mar 29 11:14:54 donatas-laptop bgpd[347675]: [Z1DRQ-N6Z5F] 127.0.0.1(donatas-pc): Dynamic Capability MultiProtocol Extensions afi/safi invalid (bad-value/unicast) -Mar 29 11:14:54 donatas-laptop bgpd[347675]: [JTVED-VGTQQ] 127.0.0.1(donatas-pc): CAPABILITY has action: 1, code: 1, length 10 -Mar 29 11:14:54 donatas-laptop bgpd[347675]: [Z1DRQ-N6Z5F] 127.0.0.1(donatas-pc): Dynamic Capability MultiProtocol Extensions afi/safi invalid (bad-value/unicast) -Mar 29 11:14:54 donatas-laptop bgpd[347675]: [JTVED-VGTQQ] 127.0.0.1(donatas-pc): CAPABILITY has action: 1, code: 1, length 10 -Mar 29 11:14:54 donatas-laptop bgpd[347675]: [Z1DRQ-N6Z5F] 127.0.0.1(donatas-pc): Dynamic Capability MultiProtocol Extensions afi/safi invalid (bad-value/unicast) -Mar 29 11:14:54 donatas-laptop bgpd[347675]: [JTVED-VGTQQ] 127.0.0.1(donatas-pc): CAPABILITY has action: 1, code: 1, length 10 -``` - -Reported-by: Iggy Frankovic -Signed-off-by: Donatas Abraitis - -CVE: CVE-2024-31949 -Upstream-Status: Backport [https://github.com/FRRouting/frr/commit/30a332dad86fafd2b0b6c61d23de59ed969a219b] - -Signed-off-by: Zhang Peng ---- - bgpd/bgp_packet.c | 17 ++++++++++------- - 1 file changed, 10 insertions(+), 7 deletions(-) - -diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c -index cae82cbbb..50e5b54ab 100644 ---- a/bgpd/bgp_packet.c -+++ b/bgpd/bgp_packet.c -@@ -3121,6 +3121,7 @@ static int bgp_capability_msg_parse(struct peer *peer, uint8_t *pnt, - zlog_err("%pBP: Capability length error", peer); - bgp_notify_send(peer->connection, BGP_NOTIFY_CEASE, - BGP_NOTIFY_SUBCODE_UNSPECIFIC); -+ pnt += length; - return BGP_Stop; - } - action = *pnt; -@@ -3133,7 +3134,7 @@ static int bgp_capability_msg_parse(struct peer *peer, uint8_t *pnt, - action); - bgp_notify_send(peer->connection, BGP_NOTIFY_CEASE, - BGP_NOTIFY_SUBCODE_UNSPECIFIC); -- return BGP_Stop; -+ goto done; - } - - if (bgp_debug_neighbor_events(peer)) -@@ -3145,12 +3146,13 @@ static int bgp_capability_msg_parse(struct peer *peer, uint8_t *pnt, - zlog_err("%pBP: Capability length error", peer); - bgp_notify_send(peer->connection, BGP_NOTIFY_CEASE, - BGP_NOTIFY_SUBCODE_UNSPECIFIC); -+ pnt += length; - return BGP_Stop; - } - - /* Ignore capability when override-capability is set. */ - if (CHECK_FLAG(peer->flags, PEER_FLAG_OVERRIDE_CAPABILITY)) -- continue; -+ goto done; - - capability = lookup_msg(capcode_str, hdr->code, "Unknown"); - -@@ -3165,7 +3167,7 @@ static int bgp_capability_msg_parse(struct peer *peer, uint8_t *pnt, - peer, capability, - sizeof(struct capability_mp_data), - hdr->length); -- return BGP_Stop; -+ goto done; - } - - memcpy(&mpc, pnt + 3, sizeof(struct capability_mp_data)); -@@ -3180,7 +3182,7 @@ static int bgp_capability_msg_parse(struct peer *peer, uint8_t *pnt, - peer, capability, - iana_afi2str(pkt_afi), - iana_safi2str(pkt_safi)); -- continue; -+ goto done; - } - - /* Address family check. */ -@@ -3207,7 +3209,7 @@ static int bgp_capability_msg_parse(struct peer *peer, uint8_t *pnt, - if (peer_active_nego(peer)) - bgp_clear_route(peer, afi, safi); - else -- return BGP_Stop; -+ goto done; - } - break; - case CAPABILITY_CODE_RESTART: -@@ -3217,7 +3219,7 @@ static int bgp_capability_msg_parse(struct peer *peer, uint8_t *pnt, - bgp_notify_send(peer->connection, - BGP_NOTIFY_CEASE, - BGP_NOTIFY_SUBCODE_UNSPECIFIC); -- return BGP_Stop; -+ goto done; - } - - bgp_dynamic_capability_graceful_restart(pnt, action, -@@ -3243,7 +3245,7 @@ static int bgp_capability_msg_parse(struct peer *peer, uint8_t *pnt, - bgp_notify_send(peer->connection, - BGP_NOTIFY_CEASE, - BGP_NOTIFY_SUBCODE_UNSPECIFIC); -- return BGP_Stop; -+ goto done; - } - - uint8_t role; -@@ -3265,6 +3267,7 @@ static int bgp_capability_msg_parse(struct peer *peer, uint8_t *pnt, - break; - } - -+done: - pnt += hdr->length + 3; - } - --- -2.34.1 - diff --git a/sources/meta-openembedded/meta-networking/recipes-protocols/frr/frr/CVE-2024-31950.patch b/sources/meta-openembedded/meta-networking/recipes-protocols/frr/frr/CVE-2024-31950.patch deleted file mode 100644 index c579ec28..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-protocols/frr/frr/CVE-2024-31950.patch +++ /dev/null @@ -1,68 +0,0 @@ -From f69d1313b19047d3d83fc2b36a518355b861dfc4 Mon Sep 17 00:00:00 2001 -From: Olivier Dugeon -Date: Wed, 3 Apr 2024 16:28:23 +0200 -Subject: [PATCH] ospfd: Solved crash in RI parsing with OSPF TE - -Iggy Frankovic discovered another ospfd crash when performing fuzzing of OSPF -LSA packets. The crash occurs in ospf_te_parse_ri() function when attemping to -read Segment Routing subTLVs. The original code doesn't check if the size of -the SR subTLVs have the correct length. In presence of erronous LSA, this will -cause a buffer overflow and ospfd crash. - -This patch introduces new verification of the subTLVs size for Router -Information TLV. - -Co-authored-by: Iggy Frankovic -Signed-off-by: Olivier Dugeon - -CVE: CVE-2024-31950 -Upstream-Status: Backport [https://github.com/FRRouting/frr/commit/f69d1313b19047d3d83fc2b36a518355b861dfc4] - -Signed-off-by: Zhang Peng ---- - ospfd/ospf_te.c | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git a/ospfd/ospf_te.c b/ospfd/ospf_te.c -index 359dc1f5d4b8..091669d8ed36 100644 ---- a/ospfd/ospf_te.c -+++ b/ospfd/ospf_te.c -@@ -2456,6 +2456,9 @@ static int ospf_te_parse_ri(struct ls_ted *ted, struct ospf_lsa *lsa) - - switch (ntohs(tlvh->type)) { - case RI_SR_TLV_SR_ALGORITHM: -+ if (TLV_BODY_SIZE(tlvh) < 1 || -+ TLV_BODY_SIZE(tlvh) > ALGORITHM_COUNT) -+ break; - algo = (struct ri_sr_tlv_sr_algorithm *)tlvh; - - for (int i = 0; i < ntohs(algo->header.length); i++) { -@@ -2480,6 +2483,8 @@ static int ospf_te_parse_ri(struct ls_ted *ted, struct ospf_lsa *lsa) - break; - - case RI_SR_TLV_SRGB_LABEL_RANGE: -+ if (TLV_BODY_SIZE(tlvh) != RI_SR_TLV_LABEL_RANGE_SIZE) -+ break; - range = (struct ri_sr_tlv_sid_label_range *)tlvh; - size = GET_RANGE_SIZE(ntohl(range->size)); - lower = GET_LABEL(ntohl(range->lower.value)); -@@ -2497,6 +2502,8 @@ static int ospf_te_parse_ri(struct ls_ted *ted, struct ospf_lsa *lsa) - break; - - case RI_SR_TLV_SRLB_LABEL_RANGE: -+ if (TLV_BODY_SIZE(tlvh) != RI_SR_TLV_LABEL_RANGE_SIZE) -+ break; - range = (struct ri_sr_tlv_sid_label_range *)tlvh; - size = GET_RANGE_SIZE(ntohl(range->size)); - lower = GET_LABEL(ntohl(range->lower.value)); -@@ -2514,6 +2521,8 @@ static int ospf_te_parse_ri(struct ls_ted *ted, struct ospf_lsa *lsa) - break; - - case RI_SR_TLV_NODE_MSD: -+ if (TLV_BODY_SIZE(tlvh) < RI_SR_TLV_NODE_MSD_SIZE) -+ break; - msd = (struct ri_sr_tlv_node_msd *)tlvh; - if ((CHECK_FLAG(node->flags, LS_NODE_MSD)) - && (node->msd == msd->value)) --- -2.34.1 \ No newline at end of file diff --git a/sources/meta-openembedded/meta-networking/recipes-protocols/frr/frr/CVE-2024-31951.patch b/sources/meta-openembedded/meta-networking/recipes-protocols/frr/frr/CVE-2024-31951.patch deleted file mode 100644 index 7f19b031..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-protocols/frr/frr/CVE-2024-31951.patch +++ /dev/null @@ -1,110 +0,0 @@ -From 5557a289acdaeec8cc63ffc97b5c2abf6dee7b3a Mon Sep 17 00:00:00 2001 -From: Olivier Dugeon -Date: Fri, 5 Apr 2024 12:57:11 +0200 -Subject: [PATCH] ospfd: Correct Opaque LSA Extended parser - -Iggy Frankovic discovered another ospfd crash when performing fuzzing of OSPF -LSA packets. The crash occurs in ospf_te_parse_ext_link() function when -attemping to read Segment Routing Adjacency SID subTLVs. The original code -doesn't check if the size of the Extended Link TLVs and subTLVs have the correct -length. In presence of erronous LSA, this will cause a buffer overflow and ospfd -crashes. - -This patch introduces new verification of the subTLVs size for Extended Link -TLVs and subTLVs. Similar check has been also introduced for the Extended -Prefix TLV. - -Co-authored-by: Iggy Frankovic -Signed-off-by: Olivier Dugeon - -CVE: CVE-2024-31951 -Upstream-Status: Backport [https://github.com/FRRouting/frr/commit/5557a289acdaeec8cc63ffc97b5c2abf6dee7b3a] - -Signed-off-by: Zhang Peng ---- - ospfd/ospf_te.c | 35 +++++++++++++++++++++++++++++++++-- - 1 file changed, 33 insertions(+), 2 deletions(-) - -diff --git a/ospfd/ospf_te.c b/ospfd/ospf_te.c -index 091669d8ed36..e68f9444f512 100644 ---- a/ospfd/ospf_te.c -+++ b/ospfd/ospf_te.c -@@ -2620,6 +2620,7 @@ static int ospf_te_parse_ext_pref(struct ls_ted *ted, struct ospf_lsa *lsa) - struct ext_tlv_prefix *ext; - struct ext_subtlv_prefix_sid *pref_sid; - uint32_t label; -+ uint16_t len, size; - - /* Get corresponding Subnet from Link State Data Base */ - ext = (struct ext_tlv_prefix *)TLV_HDR_TOP(lsa->data); -@@ -2641,6 +2642,18 @@ static int ospf_te_parse_ext_pref(struct ls_ted *ted, struct ospf_lsa *lsa) - ote_debug(" |- Process Extended Prefix LSA %pI4 for subnet %pFX", - &lsa->data->id, &pref); - -+ /* -+ * Check Extended Prefix TLV size against LSA size -+ * as only one TLV is allowed per LSA -+ */ -+ len = TLV_BODY_SIZE(&ext->header); -+ size = lsa->size - (OSPF_LSA_HEADER_SIZE + TLV_HDR_SIZE); -+ if (len != size || len <= 0) { -+ ote_debug(" |- Wrong TLV size: %u instead of %u", -+ (uint32_t)len, (uint32_t)size); -+ return -1; -+ } -+ - /* Initialize TLV browsing */ - ls_pref = subnet->ls_pref; - pref_sid = (struct ext_subtlv_prefix_sid *)((char *)(ext) + TLV_HDR_SIZE -@@ -2751,8 +2764,20 @@ static int ospf_te_parse_ext_link(struct ls_ted *ted, struct ospf_lsa *lsa) - ote_debug(" |- Process Extended Link LSA %pI4 for edge %pI4", - &lsa->data->id, &edge->attributes->standard.local); - -- /* Initialize TLV browsing */ -- len = TLV_BODY_SIZE(&ext->header) - EXT_TLV_LINK_SIZE; -+ /* -+ * Check Extended Link TLV size against LSA size -+ * as only one TLV is allowed per LSA -+ */ -+ len = TLV_BODY_SIZE(&ext->header); -+ i = lsa->size - (OSPF_LSA_HEADER_SIZE + TLV_HDR_SIZE); -+ if (len != i || len <= 0) { -+ ote_debug(" |- Wrong TLV size: %u instead of %u", -+ (uint32_t)len, (uint32_t)i); -+ return -1; -+ } -+ -+ /* Initialize subTLVs browsing */ -+ len -= EXT_TLV_LINK_SIZE; - tlvh = (struct tlv_header *)((char *)(ext) + TLV_HDR_SIZE - + EXT_TLV_LINK_SIZE); - for (; sum < len; tlvh = TLV_HDR_NEXT(tlvh)) { -@@ -2762,6 +2787,8 @@ static int ospf_te_parse_ext_link(struct ls_ted *ted, struct ospf_lsa *lsa) - - switch (ntohs(tlvh->type)) { - case EXT_SUBTLV_ADJ_SID: -+ if (TLV_BODY_SIZE(tlvh) != EXT_SUBTLV_ADJ_SID_SIZE) -+ break; - adj = (struct ext_subtlv_adj_sid *)tlvh; - label = CHECK_FLAG(adj->flags, - EXT_SUBTLV_LINK_ADJ_SID_VFLG) -@@ -2788,6 +2815,8 @@ static int ospf_te_parse_ext_link(struct ls_ted *ted, struct ospf_lsa *lsa) - - break; - case EXT_SUBTLV_LAN_ADJ_SID: -+ if (TLV_BODY_SIZE(tlvh) != EXT_SUBTLV_LAN_ADJ_SID_SIZE) -+ break; - ladj = (struct ext_subtlv_lan_adj_sid *)tlvh; - label = CHECK_FLAG(ladj->flags, - EXT_SUBTLV_LINK_ADJ_SID_VFLG) -@@ -2817,6 +2846,8 @@ static int ospf_te_parse_ext_link(struct ls_ted *ted, struct ospf_lsa *lsa) - - break; - case EXT_SUBTLV_RMT_ITF_ADDR: -+ if (TLV_BODY_SIZE(tlvh) != EXT_SUBTLV_RMT_ITF_ADDR_SIZE) -+ break; - rmt = (struct ext_subtlv_rmt_itf_addr *)tlvh; - if (CHECK_FLAG(atr->flags, LS_ATTR_NEIGH_ADDR) - && IPV4_ADDR_SAME(&atr->standard.remote, --- -2.34.1 \ No newline at end of file diff --git a/sources/meta-openembedded/meta-networking/recipes-protocols/frr/frr/CVE-2024-34088.patch b/sources/meta-openembedded/meta-networking/recipes-protocols/frr/frr/CVE-2024-34088.patch deleted file mode 100644 index 72dffb13..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-protocols/frr/frr/CVE-2024-34088.patch +++ /dev/null @@ -1,83 +0,0 @@ -From 8c177d69e32b91b45bda5fc5da6511fa03dc11ca Mon Sep 17 00:00:00 2001 -From: Olivier Dugeon -Date: Tue, 16 Apr 2024 16:42:06 +0200 -Subject: [PATCH] ospfd: protect call to get_edge() in ospf_te.c - -During fuzzing, Iggy Frankovic discovered that get_edge() function in ospf_te.c -could return null pointer, in particular when the link_id or advertised router -IP addresses are fuzzed. As the null pointer returned by get_edge() function is -not handlei by calling functions, this could cause ospfd crash. - -This patch introduces new verification of returned pointer by get_edge() -function and stop the processing in case of null pointer. In addition, link ID -and advertiser router ID are validated before calling ls_find_edge_by_key() to -avoid the creation of a new edge with an invalid key. - -CVE-2024-34088 - -Co-authored-by: Iggy Frankovic -Signed-off-by: Olivier Dugeon - -CVE: CVE-2024-34088 -Upstream-Status: Backport [https://github.com/FRRouting/frr/commit/8c177d69e32b91b45bda5fc5da6511fa03dc11ca] - -Signed-off-by: Zhang Peng ---- - ospfd/ospf_te.c | 19 ++++++++++++++++--- - 1 file changed, 16 insertions(+), 3 deletions(-) - -diff --git a/ospfd/ospf_te.c b/ospfd/ospf_te.c -index e68f9444f512..d57990e1a174 100644 ---- a/ospfd/ospf_te.c -+++ b/ospfd/ospf_te.c -@@ -1670,6 +1670,11 @@ static struct ls_edge *get_edge(struct ls_ted *ted, struct ls_node_id adv, - struct ls_edge *edge; - struct ls_attributes *attr; - -+ /* Check that Link ID and Node ID are valid */ -+ if (IPV4_NET0(link_id.s_addr) || IPV4_NET0(adv.id.ip.addr.s_addr) || -+ adv.origin != OSPFv2) -+ return NULL; -+ - /* Search Edge that corresponds to the Link ID */ - key.family = AF_INET; - IPV4_ADDR_COPY(&key.k.addr, &link_id); -@@ -1743,6 +1748,10 @@ static void ospf_te_update_link(struct ls_ted *ted, struct ls_vertex *vertex, - - /* Get Corresponding Edge from Link State Data Base */ - edge = get_edge(ted, vertex->node->adv, link_data); -+ if (!edge) { -+ ote_debug(" |- Found no edge from Link Data. Abort!"); -+ return; -+ } - attr = edge->attributes; - - /* re-attached edge to vertex if needed */ -@@ -2246,11 +2255,11 @@ static int ospf_te_parse_te(struct ls_ted *ted, struct ospf_lsa *lsa) - } - - /* Get corresponding Edge from Link State Data Base */ -- if (IPV4_NET0(attr.standard.local.s_addr) && !attr.standard.local_id) { -- ote_debug(" |- Found no TE Link local address/ID. Abort!"); -+ edge = get_edge(ted, attr.adv, attr.standard.local); -+ if (!edge) { -+ ote_debug(" |- Found no edge from Link local add./ID. Abort!"); - return -1; - } -- edge = get_edge(ted, attr.adv, attr.standard.local); - old = edge->attributes; - - ote_debug(" |- Process Traffic Engineering LSA %pI4 for Edge %pI4", -@@ -2759,6 +2768,10 @@ static int ospf_te_parse_ext_link(struct ls_ted *ted, struct ospf_lsa *lsa) - lnid.id.ip.area_id = lsa->area->area_id; - ext = (struct ext_tlv_link *)TLV_HDR_TOP(lsa->data); - edge = get_edge(ted, lnid, ext->link_data); -+ if (!edge) { -+ ote_debug(" |- Found no edge from Extended Link Data. Abort!"); -+ return -1; -+ } - atr = edge->attributes; - - ote_debug(" |- Process Extended Link LSA %pI4 for edge %pI4", --- -2.34.1 \ No newline at end of file diff --git a/sources/meta-openembedded/meta-networking/recipes-protocols/frr/frr_10.1.1.bb b/sources/meta-openembedded/meta-networking/recipes-protocols/frr/frr_10.1.1.bb new file mode 100644 index 00000000..237b5259 --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-protocols/frr/frr_10.1.1.bb @@ -0,0 +1,138 @@ +SUMMARY = "BGP/OSPF/RIP routing daemon" +DESCRIPTION = "FRRouting is a free and open source Internet routing protocol suite for Linux \ +and Unix platforms. It implements BGP, OSPF, RIP, IS-IS, PIM, LDP, BFD, Babel, PBR, OpenFabric \ +and VRRP, with alpha support for EIGRP and NHRP." +HOMEPAGE = "https://frrouting.org/" +SECTION = "net" + +LICENSE = "GPL-2.0-only & LGPL-2.1-only" +LIC_FILES_CHKSUM = "file://doc/licenses/GPL-2.0;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://doc/licenses/LGPL-2.1;md5=4fbd65380cdd255951079008b364516c" + + +SRC_URI = "git://github.com/FRRouting/frr.git;protocol=https;branch=stable/10.1 \ + file://frr.pam \ + " + +SRCREV = "dbf8dac1cea2b1235746e2d966a8ded9cffd5dc3" + +UPSTREAM_CHECK_GITTAGREGEX = "frr-(?P\d+(\.\d+)+)$" + +CVE_PRODUCT = "frrouting" + +S = "${WORKDIR}/git" + +inherit autotools-brokensep python3native pkgconfig useradd systemd + +DEPENDS:class-native = "bison-native elfutils-native" +DEPENDS:class-target = "bison-native json-c readline c-ares libyang frr-native protobuf-c-native protobuf-c" + +RDEPENDS:${PN}:class-target = "iproute2 python3-core bash" + +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" +PACKAGECONFIG:class-native = "" + +PACKAGECONFIG[fpm] = "--enable-fpm,--disable-fpm" +PACKAGECONFIG[pam] = "--with-libpam,--without-libpam,libpam" +PACKAGECONFIG[grpc] = "--enable-grpc,--disable-grpc,grpc-native grpc" +PACKAGECONFIG[snmp] = "--enable-snmp,--disable-snmp,net-snmp" +PACKAGECONFIG[zeromq] = "--enable-zeromq,--disable-zeromq,zeromq" +PACKAGECONFIG[protobuf] = "--enable-protobuf,--disable-protobuf,protobuf-c-native protobuf-c" +PACKAGECONFIG[capabilities] = "--enable-capabilities,--disable-capabilities,libcap" +PACKAGECONFIG[cumulus] = "--enable-cumulus,--disable-cumulus" +PACKAGECONFIG[datacenter] = "--enable-datacenter,--disable-datacenter" +PACKAGECONFIG[ospfclient] = "--enable-ospfapi --enable-ospfclient,--disable-ospfapi --disable-ospfclient" + +EXTRA_OECONF:class-native = "--enable-clippy-only" + +EXTRA_OECONF:class-target = "--sbindir=${libexecdir}/frr \ + --sysconfdir=${sysconfdir}/frr \ + --localstatedir=${localstatedir}/run/frr \ + --enable-vtysh \ + --enable-multipath=64 \ + --enable-user=frr \ + --enable-group=frr \ + --enable-vty-group=frrvty \ + --enable-configfile-mask=0640 \ + --enable-logfile-mask=0640 \ + --disable-doc \ + --with-clippy=${RECIPE_SYSROOT_NATIVE}/usr/lib/clippy \ + " + +CACHED_CONFIGUREVARS += "ac_cv_path_PERL='/usr/bin/env perl'" + +# https://github.com/FRRouting/frr/issues/14469 +DEBUG_PREFIX_MAP:remove = "-fcanon-prefix-map" + +LDFLAGS:append:mips = " -latomic" +LDFLAGS:append:mipsel = " -latomic" +LDFLAGS:append:powerpc = " -latomic" +LDFLAGS:append:riscv32 = " -latomic" + +SYSTEMD_PACKAGES = "${PN}" +SYSTEMD_SERVICE:${PN} = "frr.service" +SYSTEMD_AUTO_ENABLE = "disable" + +inherit update-alternatives multilib_script multilib_header + +ALTERNATIVE_PRIORITY = "100" +ALTERNATIVE:${PN} = " ietf-interfaces ietf-netconf-acm ietf-netconf-with-defaults ietf-netconf" +ALTERNATIVE_LINK_NAME[ietf-interfaces] = "${datadir}/yang/ietf-interfaces.yang" +ALTERNATIVE_LINK_NAME[ietf-netconf-acm] = "${datadir}/yang/ietf-netconf-acm.yang" +ALTERNATIVE_LINK_NAME[ietf-netconf-with-defaults] = "${datadir}/yang/ietf-netconf-with-defaults.yang" +ALTERNATIVE_LINK_NAME[ietf-netconf] = "${datadir}/yang/ietf-netconf.yang" +do_compile:prepend () { + sed -i -e 's#${RECIPE_SYSROOT_NATIVE}##g' \ + -e 's#${RECIPE_SYSROOT}##g' ${S}/lib/version.h +} + +do_compile:class-native () { + oe_runmake clippy-only +} + +do_install:class-native () { + install -d ${D}${libdir} + install -m 755 ${S}/lib/clippy ${D}${libdir}/clippy +} + +do_install:append:class-target () { + install -m 0755 -d ${D}${sysconfdir}/frr + install -m 0755 -d ${D}${libexecdir}/frr + install -m 0640 ${S}/tools/etc/frr/* ${D}${sysconfdir}/frr/ + chown frr:frrvty ${D}${sysconfdir}/frr + chown frr:frr ${D}${sysconfdir}/frr/* + chown frr:frrvty ${D}${sysconfdir}/frr/vtysh.conf + chmod 640 ${D}${sysconfdir}/frr/* + + if ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'true', 'false', d)}; then + install -d ${D}/${sysconfdir}/pam.d + install -m 644 ${UNPACKDIR}/frr.pam ${D}/${sysconfdir}/pam.d/frr + fi + + if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then + install -d ${D}${sysconfdir}/init.d + install -m 0755 ${B}/tools/frrinit.sh ${D}${sysconfdir}/init.d/frr + + install -d ${D}${sysconfdir}/default/volatiles + echo "d frr frr 0755 ${localstatedir}/run/frr none" \ + > ${D}${sysconfdir}/default/volatiles/99_frr + fi + + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + install -d ${D}${systemd_system_unitdir} + install -m 0644 ${B}/tools/frr*.service ${D}${systemd_system_unitdir} + + install -d ${D}${sysconfdir}/tmpfiles.d + echo "d /run/frr 0755 frr frr -" \ + > ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf + fi + oe_multilib_header frr/version.h +} + +USERADD_PACKAGES = "${PN}" +GROUPADD_PARAM:${PN} = "--system frr ; --system frrvty" +USERADD_PARAM:${PN} = "--system --home ${localstatedir}/run/frr/ -M -g frr -G frrvty --shell /bin/false frr" + +FILES:${PN} += "${datadir}/yang" + +BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-networking/recipes-protocols/frr/frr_9.1.bb b/sources/meta-openembedded/meta-networking/recipes-protocols/frr/frr_9.1.bb deleted file mode 100644 index 7c169125..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-protocols/frr/frr_9.1.bb +++ /dev/null @@ -1,141 +0,0 @@ -SUMMARY = "BGP/OSPF/RIP routing daemon" -DESCRIPTION = "FRRouting is a free and open source Internet routing protocol suite for Linux \ -and Unix platforms. It implements BGP, OSPF, RIP, IS-IS, PIM, LDP, BFD, Babel, PBR, OpenFabric \ -and VRRP, with alpha support for EIGRP and NHRP." -HOMEPAGE = "https://frrouting.org/" -SECTION = "net" - -LICENSE = "GPL-2.0-only & LGPL-2.1-only" -LIC_FILES_CHKSUM = "file://doc/licenses/GPL-2.0;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://doc/licenses/LGPL-2.1;md5=4fbd65380cdd255951079008b364516c" - - -SRC_URI = "git://github.com/FRRouting/frr.git;protocol=https;branch=stable/9.1 \ - file://frr.pam \ - file://0001-zebra-Mimic-GNU-basename-API-for-non-glibc-library-e.patch \ - file://CVE-2024-34088.patch \ - file://CVE-2024-31950.patch \ - file://CVE-2024-31951.patch \ - file://CVE-2024-31948.patch \ - file://CVE-2024-31949.patch \ - " - -SRCREV = "ca2d6f0f1e000951224a18973cc1827f7f5215b5" - -UPSTREAM_CHECK_GITTAGREGEX = "frr-(?P\d+(\.\d+)+)$" - -CVE_PRODUCT = "frrouting" - -S = "${WORKDIR}/git" - -inherit autotools-brokensep python3native pkgconfig useradd systemd - -DEPENDS:class-native = "bison-native elfutils-native" -DEPENDS:class-target = "bison-native json-c readline c-ares libyang frr-native protobuf-c-native protobuf-c" - -RDEPENDS:${PN}:class-target = "iproute2 python3-core bash" - -PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" -PACKAGECONFIG:class-native = "" - -PACKAGECONFIG[fpm] = "--enable-fpm,--disable-fpm" -PACKAGECONFIG[pam] = "--with-libpam,--without-libpam,libpam" -PACKAGECONFIG[grpc] = "--enable-grpc,--disable-grpc,grpc-native grpc" -PACKAGECONFIG[snmp] = "--enable-snmp,--disable-snmp,net-snmp" -PACKAGECONFIG[zeromq] = "--enable-zeromq,--disable-zeromq,zeromq" -PACKAGECONFIG[protobuf] = "--enable-protobuf,--disable-protobuf,protobuf-c-native protobuf-c" -PACKAGECONFIG[capabilities] = "--enable-capabilities,--disable-capabilities,libcap" -PACKAGECONFIG[cumulus] = "--enable-cumulus,--disable-cumulus" -PACKAGECONFIG[datacenter] = "--enable-datacenter,--disable-datacenter" -PACKAGECONFIG[ospfclient] = "--enable-ospfapi --enable-ospfclient,--disable-ospfapi --disable-ospfclient" - -EXTRA_OECONF:class-native = "--enable-clippy-only" - -EXTRA_OECONF:class-target = "--sbindir=${libexecdir}/frr \ - --sysconfdir=${sysconfdir}/frr \ - --localstatedir=${localstatedir}/run/frr \ - --enable-vtysh \ - --enable-multipath=64 \ - --enable-user=frr \ - --enable-group=frr \ - --enable-vty-group=frrvty \ - --enable-configfile-mask=0640 \ - --enable-logfile-mask=0640 \ - --disable-doc \ - --with-clippy=${RECIPE_SYSROOT_NATIVE}/usr/lib/clippy \ - " - -CACHED_CONFIGUREVARS += "ac_cv_path_PERL='/usr/bin/env perl'" - -# https://github.com/FRRouting/frr/issues/14469 -DEBUG_PREFIX_MAP:remove = "-fcanon-prefix-map" - -LDFLAGS:append:mips = " -latomic" -LDFLAGS:append:mipsel = " -latomic" -LDFLAGS:append:powerpc = " -latomic" -LDFLAGS:append:riscv32 = " -latomic" - -SYSTEMD_PACKAGES = "${PN}" -SYSTEMD_SERVICE:${PN} = "frr.service" -SYSTEMD_AUTO_ENABLE = "disable" - -inherit update-alternatives multilib_script multilib_header - -ALTERNATIVE_PRIORITY = "100" -ALTERNATIVE:${PN} = " ietf-interfaces " -ALTERNATIVE_LINK_NAME[ietf-interfaces] = "${datadir}/yang/ietf-interfaces.yang" -do_compile:prepend () { - sed -i -e 's#${RECIPE_SYSROOT_NATIVE}##g' \ - -e 's#${RECIPE_SYSROOT}##g' ${S}/lib/version.h -} - -do_compile:class-native () { - oe_runmake clippy-only -} - -do_install:class-native () { - install -d ${D}${libdir} - install -m 755 ${S}/lib/clippy ${D}${libdir}/clippy -} - -do_install:append:class-target () { - install -m 0755 -d ${D}${sysconfdir}/frr - install -m 0755 -d ${D}${libexecdir}/frr - install -m 0640 ${S}/tools/etc/frr/* ${D}${sysconfdir}/frr/ - chown frr:frrvty ${D}${sysconfdir}/frr - chown frr:frr ${D}${sysconfdir}/frr/* - chown frr:frrvty ${D}${sysconfdir}/frr/vtysh.conf - chmod 640 ${D}${sysconfdir}/frr/* - - if ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'true', 'false', d)}; then - install -d ${D}/${sysconfdir}/pam.d - install -m 644 ${WORKDIR}/frr.pam ${D}/${sysconfdir}/pam.d/frr - fi - - if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then - install -d ${D}${sysconfdir}/init.d - install -m 0755 ${B}/tools/frrinit.sh ${D}${sysconfdir}/init.d/frr - - install -d ${D}${sysconfdir}/default/volatiles - echo "d frr frr 0755 ${localstatedir}/run/frr none" \ - > ${D}${sysconfdir}/default/volatiles/99_frr - fi - - if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then - install -d ${D}${systemd_system_unitdir} - install -m 0644 ${B}/tools/frr*.service ${D}${systemd_system_unitdir} - - install -d ${D}${sysconfdir}/tmpfiles.d - echo "d /run/frr 0755 frr frr -" \ - > ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf - fi - oe_multilib_header frr/version.h -} - -USERADD_PACKAGES = "${PN}" -GROUPADD_PARAM:${PN} = "--system frr ; --system frrvty" -USERADD_PARAM:${PN} = "--system --home ${localstatedir}/run/frr/ -M -g frr -G frrvty --shell /bin/false frr" - -FILES:${PN} += "${datadir}/yang" - -BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0001-Create-subroutine-for-cleaning-recent-interfaces.patch b/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0001-Create-subroutine-for-cleaning-recent-interfaces.patch index f5d424d5..68a395d6 100644 --- a/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0001-Create-subroutine-for-cleaning-recent-interfaces.patch +++ b/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0001-Create-subroutine-for-cleaning-recent-interfaces.patch @@ -1,7 +1,7 @@ -From c1f3e19d3cb0aa948248616eb1684a1e80aa39b4 Mon Sep 17 00:00:00 2001 +From 1fefe289d0c907392382eb2fa2f1f0ecac02f85d Mon Sep 17 00:00:00 2001 From: Nate Karstens Date: Wed, 28 Jun 2017 17:30:00 -0500 -Subject: [PATCH 1/8] Create subroutine for cleaning recent interfaces +Subject: [PATCH] Create subroutine for cleaning recent interfaces Moves functionality for cleaning the list of recent interfaces into its own subroutine. @@ -14,11 +14,11 @@ Signed-off-by: Alex Kiernan mDNSPosix/mDNSPosix.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) -Index: mDNSResponder/mDNSPosix/mDNSPosix.c -=================================================================== ---- mDNSResponder.orig/mDNSPosix/mDNSPosix.c -+++ mDNSResponder/mDNSPosix/mDNSPosix.c -@@ -1322,6 +1322,19 @@ mDNSlocal int SetupSocket(struct sockadd +diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c +index 3b761d04e3c4..5aa220cf694e 100644 +--- a/mDNSPosix/mDNSPosix.c ++++ b/mDNSPosix/mDNSPosix.c +@@ -1322,6 +1322,19 @@ mDNSlocal int SetupSocket(struct sockaddr *intfAddr, mDNSIPPort port, int interf return err; } @@ -38,7 +38,7 @@ Index: mDNSResponder/mDNSPosix/mDNSPosix.c // Creates a PosixNetworkInterface for the interface whose IP address is // intfAddr and whose name is intfName and registers it with mDNS core. mDNSlocal int SetupOneInterface(mDNS *const m, struct sockaddr *intfAddr, struct sockaddr *intfMask, -@@ -1559,16 +1572,7 @@ mDNSlocal int SetupInterfaceList(mDNS *c +@@ -1559,16 +1572,7 @@ mDNSlocal int SetupInterfaceList(mDNS *const m) // Clean up. if (intfList != NULL) freeifaddrs(intfList); diff --git a/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0001-Fix-SIGSEGV-during-DumpStateLog.patch b/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0001-Fix-SIGSEGV-during-DumpStateLog.patch index 4b0227f1..abf82b1e 100644 --- a/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0001-Fix-SIGSEGV-during-DumpStateLog.patch +++ b/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0001-Fix-SIGSEGV-during-DumpStateLog.patch @@ -1,4 +1,4 @@ -From 14cc53bb09a3d8adf301f3842c765598467e63e1 Mon Sep 17 00:00:00 2001 +From 2db1f5bc941e4b4cd1721e361a47cfe288b07a76 Mon Sep 17 00:00:00 2001 From: Alex Kiernan Date: Thu, 1 Feb 2024 14:07:03 +0000 Subject: [PATCH] Fix SIGSEGV during DumpStateLog() @@ -25,6 +25,3 @@ index 7a4ca19eff6d..d449dde320f6 100644 { return; } --- -2.39.0 - diff --git a/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0001-Handle-interface-without-ifa_addr.patch b/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0001-Handle-interface-without-ifa_addr.patch index 7e76f07c..7ec59960 100644 --- a/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0001-Handle-interface-without-ifa_addr.patch +++ b/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0001-Handle-interface-without-ifa_addr.patch @@ -1,4 +1,4 @@ -From 1cc54320306e07c1fc0eed98e7fbcbb07a2f3b28 Mon Sep 17 00:00:00 2001 +From c67102307f25c5f4d238c736e90519e56a76ae79 Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Fri, 23 Jun 2023 10:10:00 +0200 Subject: [PATCH] Handle interface without `ifa_addr` @@ -14,11 +14,11 @@ Signed-off-by: Alex Kiernan mDNSPosix/mDNSPosix.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -Index: mDNSResponder/mDNSPosix/mDNSPosix.c -=================================================================== ---- mDNSResponder.orig/mDNSPosix/mDNSPosix.c -+++ mDNSResponder/mDNSPosix/mDNSPosix.c -@@ -1895,6 +1895,7 @@ mDNSlocal void InterfaceChangeCallback(i +diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c +index 0c9dd2582660..c3ead26799e6 100644 +--- a/mDNSPosix/mDNSPosix.c ++++ b/mDNSPosix/mDNSPosix.c +@@ -1895,6 +1895,7 @@ mDNSlocal void InterfaceChangeCallback(int fd, void *context) continue; if ((ifa_loop4 == NULL) && @@ -26,7 +26,7 @@ Index: mDNSResponder/mDNSPosix/mDNSPosix.c ((*ifi)->ifa_addr->sa_family == AF_INET) && ((*ifi)->ifa_flags & IFF_UP) && ((*ifi)->ifa_flags & IFF_LOOPBACK)) -@@ -1903,7 +1904,8 @@ mDNSlocal void InterfaceChangeCallback(i +@@ -1903,7 +1904,8 @@ mDNSlocal void InterfaceChangeCallback(int fd, void *context) continue; } diff --git a/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0001-dns-sd-Include-missing-headers.patch b/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0001-dns-sd-Include-missing-headers.patch index 82825b29..0dc36ae1 100644 --- a/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0001-dns-sd-Include-missing-headers.patch +++ b/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0001-dns-sd-Include-missing-headers.patch @@ -1,7 +1,7 @@ -From cea342c10731cb1c8c8b52f03d55f9d15fc3b091 Mon Sep 17 00:00:00 2001 +From a5fe20fa00088683136a09a4da3c36d9b20fe1b9 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 4 Nov 2021 07:31:32 -0700 -Subject: [PATCH 1/6] dns-sd: Include missing headers +Subject: [PATCH] dns-sd: Include missing headers Fixes build on Musl @@ -11,10 +11,10 @@ Signed-off-by: Khem Raj mDNSPosix/nss_mdns.c | 3 +++ 1 file changed, 3 insertions(+) -Index: mDNSResponder/mDNSPosix/nss_mdns.c -=================================================================== ---- mDNSResponder.orig/mDNSPosix/nss_mdns.c -+++ mDNSResponder/mDNSPosix/nss_mdns.c +diff --git a/mDNSPosix/nss_mdns.c b/mDNSPosix/nss_mdns.c +index afadb3c6c33b..84c312759463 100644 +--- a/mDNSPosix/nss_mdns.c ++++ b/mDNSPosix/nss_mdns.c @@ -89,6 +89,9 @@ #include diff --git a/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0002-Create-subroutine-for-tearing-down-an-interface.patch b/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0002-Create-subroutine-for-tearing-down-an-interface.patch index 867db88a..5ce7eb10 100644 --- a/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0002-Create-subroutine-for-tearing-down-an-interface.patch +++ b/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0002-Create-subroutine-for-tearing-down-an-interface.patch @@ -1,7 +1,7 @@ -From 40ef0241afbb49f84e76afd65eb3ee17466bb582 Mon Sep 17 00:00:00 2001 +From d265ac9346d3dcbcf1187134318baafcfa75c054 Mon Sep 17 00:00:00 2001 From: Nate Karstens Date: Wed, 28 Jun 2017 17:30:00 -0500 -Subject: [PATCH 2/8] Create subroutine for tearing down an interface +Subject: [PATCH] Create subroutine for tearing down an interface Creates a subroutine for tearing down an interface. @@ -13,11 +13,11 @@ Signed-off-by: Alex Kiernan mDNSPosix/mDNSPosix.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) -Index: mDNSResponder/mDNSPosix/mDNSPosix.c -=================================================================== ---- mDNSResponder.orig/mDNSPosix/mDNSPosix.c -+++ mDNSResponder/mDNSPosix/mDNSPosix.c -@@ -1043,6 +1043,19 @@ mDNSlocal void FreePosixNetworkInterface +diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c +index 5aa220cf694e..a6041b04a21e 100644 +--- a/mDNSPosix/mDNSPosix.c ++++ b/mDNSPosix/mDNSPosix.c +@@ -1043,6 +1043,19 @@ mDNSlocal void FreePosixNetworkInterface(PosixNetworkInterface *intf) gRecentInterfaces = intf; } @@ -37,7 +37,7 @@ Index: mDNSResponder/mDNSPosix/mDNSPosix.c // Grab the first interface, deregister it, free it, and repeat until done. mDNSlocal void ClearInterfaceList(mDNS *const m) { -@@ -1051,13 +1064,10 @@ mDNSlocal void ClearInterfaceList(mDNS * +@@ -1051,13 +1064,10 @@ mDNSlocal void ClearInterfaceList(mDNS *const m) while (m->HostInterfaces) { PosixNetworkInterface *intf = (PosixNetworkInterface*)(m->HostInterfaces); diff --git a/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0002-make-Set-libdns_sd.so-soname-correctly.patch b/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0002-make-Set-libdns_sd.so-soname-correctly.patch index 03fb1bc0..86b659f8 100644 --- a/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0002-make-Set-libdns_sd.so-soname-correctly.patch +++ b/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0002-make-Set-libdns_sd.so-soname-correctly.patch @@ -1,7 +1,7 @@ -From a198bcd457abd04f2e22812ff3a37246aa564614 Mon Sep 17 00:00:00 2001 +From dfa9e2c494d1a834f5bdfe4dc24e8329dd8720eb Mon Sep 17 00:00:00 2001 From: Alex Kiernan Date: Mon, 5 Dec 2022 15:14:12 +0000 -Subject: [PATCH 2/6] make: Set libdns_sd.so soname correctly +Subject: [PATCH] make: Set libdns_sd.so soname correctly Upstream-Status: Pending Signed-off-by: Alex Kiernan @@ -9,11 +9,11 @@ Signed-off-by: Alex Kiernan mDNSPosix/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -Index: mDNSResponder/mDNSPosix/Makefile -=================================================================== ---- mDNSResponder.orig/mDNSPosix/Makefile -+++ mDNSResponder/mDNSPosix/Makefile -@@ -276,7 +276,7 @@ libdns_sd: setup $(BUILDDIR)/libdns_sd.$ +diff --git a/mDNSPosix/Makefile b/mDNSPosix/Makefile +index 041706523139..c877c8bb19e6 100755 +--- a/mDNSPosix/Makefile ++++ b/mDNSPosix/Makefile +@@ -276,7 +276,7 @@ libdns_sd: setup $(BUILDDIR)/libdns_sd.$(LDSUFFIX) CLIENTLIBOBJS = $(OBJDIR)/dnssd_clientlib.c.so.o $(OBJDIR)/dnssd_clientstub.c.so.o $(OBJDIR)/dnssd_ipc.c.so.o $(OBJDIR)/dnssd_errstring.c.so.o $(BUILDDIR)/libdns_sd.$(LDSUFFIX): $(CLIENTLIBOBJS) diff --git a/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0003-Track-interface-socket-family.patch b/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0003-Track-interface-socket-family.patch index f1cda2b8..59871eb6 100644 --- a/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0003-Track-interface-socket-family.patch +++ b/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0003-Track-interface-socket-family.patch @@ -1,7 +1,7 @@ -From deb3a2c51f32e0d2741be11a492e727129f770e2 Mon Sep 17 00:00:00 2001 +From 5f58e5671cd6dbd4cb49bd30fb606d430b626361 Mon Sep 17 00:00:00 2001 From: Nate Karstens Date: Wed, 28 Jun 2017 17:30:00 -0500 -Subject: [PATCH 3/8] Track interface socket family +Subject: [PATCH] Track interface socket family Tracks the socket family associated with the interface. @@ -14,11 +14,11 @@ Signed-off-by: Alex Kiernan mDNSPosix/mDNSPosix.h | 2 ++ 2 files changed, 3 insertions(+) -Index: mDNSResponder/mDNSPosix/mDNSPosix.c -=================================================================== ---- mDNSResponder.orig/mDNSPosix/mDNSPosix.c -+++ mDNSResponder/mDNSPosix/mDNSPosix.c -@@ -1415,6 +1415,7 @@ mDNSlocal int SetupOneInterface(mDNS *co +diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c +index a6041b04a21e..15bbecee04a4 100644 +--- a/mDNSPosix/mDNSPosix.c ++++ b/mDNSPosix/mDNSPosix.c +@@ -1415,6 +1415,7 @@ mDNSlocal int SetupOneInterface(mDNS *const m, struct sockaddr *intfAddr, struct // Set up the extra fields in PosixNetworkInterface. assert(intf->intfName != NULL); // intf->intfName already set up above intf->index = intfIndex; @@ -26,10 +26,10 @@ Index: mDNSResponder/mDNSPosix/mDNSPosix.c intf->multicastSocket4 = -1; #if HAVE_IPV6 intf->multicastSocket6 = -1; -Index: mDNSResponder/mDNSPosix/mDNSPosix.h -=================================================================== ---- mDNSResponder.orig/mDNSPosix/mDNSPosix.h -+++ mDNSResponder/mDNSPosix/mDNSPosix.h +diff --git a/mDNSPosix/mDNSPosix.h b/mDNSPosix/mDNSPosix.h +index 9675591b0434..dd7864cd0d5e 100644 +--- a/mDNSPosix/mDNSPosix.h ++++ b/mDNSPosix/mDNSPosix.h @@ -19,6 +19,7 @@ #define __mDNSPlatformPosix_h diff --git a/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0004-Indicate-loopback-interface-to-mDNS-core.patch b/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0004-Indicate-loopback-interface-to-mDNS-core.patch index 6bc36456..bf2b85c2 100644 --- a/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0004-Indicate-loopback-interface-to-mDNS-core.patch +++ b/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0004-Indicate-loopback-interface-to-mDNS-core.patch @@ -1,7 +1,7 @@ -From beab76b5708862f44d9acbe7a92db45e2f99259f Mon Sep 17 00:00:00 2001 +From 935033dd40772240c9bcc6b9610d78eb3753bfaf Mon Sep 17 00:00:00 2001 From: Nate Karstens Date: Tue, 1 Aug 2017 17:06:01 -0500 -Subject: [PATCH 4/8] Indicate loopback interface to mDNS core +Subject: [PATCH] Indicate loopback interface to mDNS core Tells the mDNS core if an interface is a loopback interface, similar to AddInterfaceToList() in the MacOS implementation. @@ -14,11 +14,11 @@ Signed-off-by: Alex Kiernan mDNSPosix/mDNSPosix.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) -Index: mDNSResponder/mDNSPosix/mDNSPosix.c -=================================================================== ---- mDNSResponder.orig/mDNSPosix/mDNSPosix.c -+++ mDNSResponder/mDNSPosix/mDNSPosix.c -@@ -1348,7 +1348,7 @@ mDNSlocal void CleanRecentInterfaces(voi +diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c +index 15bbecee04a4..f4c31a07d587 100644 +--- a/mDNSPosix/mDNSPosix.c ++++ b/mDNSPosix/mDNSPosix.c +@@ -1348,7 +1348,7 @@ mDNSlocal void CleanRecentInterfaces(void) // Creates a PosixNetworkInterface for the interface whose IP address is // intfAddr and whose name is intfName and registers it with mDNS core. mDNSlocal int SetupOneInterface(mDNS *const m, struct sockaddr *intfAddr, struct sockaddr *intfMask, @@ -27,7 +27,7 @@ Index: mDNSResponder/mDNSPosix/mDNSPosix.c { int err = 0; PosixNetworkInterface *intf; -@@ -1411,6 +1411,7 @@ mDNSlocal int SetupOneInterface(mDNS *co +@@ -1411,6 +1411,7 @@ mDNSlocal int SetupOneInterface(mDNS *const m, struct sockaddr *intfAddr, struct intf->coreIntf.Advertise = m->AdvertiseLocalAddresses; intf->coreIntf.McastTxRx = mDNStrue; @@ -35,7 +35,7 @@ Index: mDNSResponder/mDNSPosix/mDNSPosix.c // Set up the extra fields in PosixNetworkInterface. assert(intf->intfName != NULL); // intf->intfName already set up above -@@ -1561,7 +1562,7 @@ mDNSlocal int SetupInterfaceList(mDNS *c +@@ -1561,7 +1562,7 @@ mDNSlocal int SetupInterfaceList(mDNS *const m) } #endif if (SetupOneInterface(m, i->ifa_addr, i->ifa_netmask, @@ -44,7 +44,7 @@ Index: mDNSResponder/mDNSPosix/mDNSPosix.c { if (i->ifa_addr->sa_family == AF_INET) foundav4 = mDNStrue; -@@ -1578,7 +1579,7 @@ mDNSlocal int SetupInterfaceList(mDNS *c +@@ -1578,7 +1579,7 @@ mDNSlocal int SetupInterfaceList(mDNS *const m) // if ((m->HostInterfaces == NULL) && (firstLoopback != NULL)) if (!foundav4 && firstLoopback) (void) SetupOneInterface(m, firstLoopback->ifa_addr, firstLoopback->ifa_netmask, diff --git a/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0004-make-Separate-TLS-targets-from-libraries.patch b/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0004-make-Separate-TLS-targets-from-libraries.patch index 837580ac..8d1915de 100644 --- a/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0004-make-Separate-TLS-targets-from-libraries.patch +++ b/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0004-make-Separate-TLS-targets-from-libraries.patch @@ -1,7 +1,7 @@ -From 22316f200803225f2d375ae5c36ffead59e2f6b8 Mon Sep 17 00:00:00 2001 +From f871ac42165c29f763785aa0199dfc76f1731f4d Mon Sep 17 00:00:00 2001 From: Alex Kiernan Date: Mon, 5 Dec 2022 15:14:26 +0000 -Subject: [PATCH 4/6] make: Separate TLS targets from libraries +Subject: [PATCH] make: Separate TLS targets from libraries There are dependencies on TLSOBJS, which fails when `-lmbedtls` is listed as a dependency, so separate it out. @@ -12,10 +12,10 @@ Signed-off-by: Alex Kiernan mDNSPosix/Makefile | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) -Index: mDNSResponder/mDNSPosix/Makefile -=================================================================== ---- mDNSResponder.orig/mDNSPosix/Makefile -+++ mDNSResponder/mDNSPosix/Makefile +diff --git a/mDNSPosix/Makefile b/mDNSPosix/Makefile +index c877c8bb19e6..3a5897c4dbee 100755 +--- a/mDNSPosix/Makefile ++++ b/mDNSPosix/Makefile @@ -112,9 +112,11 @@ ifeq ($(findstring linux,$(os)),linux) ifeq ($(tls), no) CFLAGS_OS = -D_GNU_SOURCE -DHAVE_IPV6 -DNOT_HAVE_SA_LEN -DUSES_NETLINK -DHAVE_LINUX -DTARGET_OS_LINUX -ftabstop=4 -Wno-expansion-to-defined diff --git a/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0005-Use-list-for-changed-interfaces.patch b/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0005-Use-list-for-changed-interfaces.patch index f00116c6..ebdfe8c7 100644 --- a/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0005-Use-list-for-changed-interfaces.patch +++ b/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0005-Use-list-for-changed-interfaces.patch @@ -1,7 +1,7 @@ -From e79f81f5cd626ad77ec64de4325f6645cf253c5e Mon Sep 17 00:00:00 2001 +From 47118760466b74939cec9f5233062236a12bb3f4 Mon Sep 17 00:00:00 2001 From: Nate Karstens Date: Thu, 13 Jul 2017 09:00:00 -0500 -Subject: [PATCH 5/8] Use list for changed interfaces +Subject: [PATCH] Use list for changed interfaces Uses a linked list to store the index of changed network interfaces instead of a bitfield. This allows for network interfaces with an @@ -15,10 +15,10 @@ Signed-off-by: Alex Kiernan mDNSPosix/mDNSPosix.c | 58 ++++++++++++++++++++++++++++++++----------- 1 file changed, 43 insertions(+), 15 deletions(-) -Index: mDNSResponder/mDNSPosix/mDNSPosix.c -=================================================================== ---- mDNSResponder.orig/mDNSPosix/mDNSPosix.c -+++ mDNSResponder/mDNSPosix/mDNSPosix.c +diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c +index f4c31a07d587..6b2fe76d4b66 100644 +--- a/mDNSPosix/mDNSPosix.c ++++ b/mDNSPosix/mDNSPosix.c @@ -74,6 +74,14 @@ struct IfChangeRec }; typedef struct IfChangeRec IfChangeRec; @@ -34,7 +34,7 @@ Index: mDNSResponder/mDNSPosix/mDNSPosix.c // Note that static data is initialized to zero in (modern) C. static PosixEventSource *gEventSources; // linked list of PosixEventSource's static sigset_t gEventSignalSet; // Signals which event loop listens for -@@ -1621,6 +1629,23 @@ mDNSlocal mStatus OpenIfNotifySocket(int +@@ -1621,6 +1629,23 @@ mDNSlocal mStatus OpenIfNotifySocket(int *pFD) return err; } @@ -58,7 +58,7 @@ Index: mDNSResponder/mDNSPosix/mDNSPosix.c #if MDNS_DEBUGMSGS mDNSlocal void PrintNetLinkMsg(const struct nlmsghdr *pNLMsg) { -@@ -1648,14 +1673,13 @@ mDNSlocal void PrintNetLinkMsg(cons +@@ -1648,14 +1673,13 @@ mDNSlocal void PrintNetLinkMsg(const struct nlmsghdr *pNLMsg) } #endif @@ -74,7 +74,7 @@ Index: mDNSResponder/mDNSPosix/mDNSPosix.c // The structure here is more complex than it really ought to be because, // unfortunately, there's no good way to size a buffer in advance large -@@ -1691,9 +1715,9 @@ mDNSlocal mDNSu32 ProcessRoutingNo +@@ -1691,9 +1715,9 @@ mDNSlocal mDNSu32 ProcessRoutingNotification(int sd) // Process the NetLink message if (pNLMsg->nlmsg_type == RTM_GETLINK || pNLMsg->nlmsg_type == RTM_NEWLINK) @@ -86,7 +86,7 @@ Index: mDNSResponder/mDNSPosix/mDNSPosix.c // Advance pNLMsg to the next message in the buffer if ((pNLMsg->nlmsg_flags & NLM_F_MULTI) != 0 && pNLMsg->nlmsg_type != NLMSG_DONE) -@@ -1704,8 +1728,6 @@ mDNSlocal mDNSu32 ProcessRoutingNo +@@ -1704,8 +1728,6 @@ mDNSlocal mDNSu32 ProcessRoutingNotification(int sd) else break; // all done! } @@ -95,7 +95,7 @@ Index: mDNSResponder/mDNSPosix/mDNSPosix.c } #else // USES_NETLINK -@@ -1737,14 +1759,13 @@ mDNSlocal void PrintRoutingSocketMs +@@ -1737,14 +1759,13 @@ mDNSlocal void PrintRoutingSocketMsg(const struct ifa_msghdr *pRSMsg) } #endif @@ -111,7 +111,7 @@ Index: mDNSResponder/mDNSPosix/mDNSPosix.c readCount = read(sd, buff, sizeof buff); if (readCount < (ssize_t) sizeof(struct ifa_msghdr)) -@@ -1759,12 +1780,10 @@ mDNSlocal mDNSu32 ProcessRoutingNo +@@ -1759,12 +1780,10 @@ mDNSlocal mDNSu32 ProcessRoutingNotification(int sd) pRSMsg->ifam_type == RTM_IFINFO) { if (pRSMsg->ifam_type == RTM_IFINFO) @@ -126,7 +126,7 @@ Index: mDNSResponder/mDNSPosix/mDNSPosix.c } #endif // USES_NETLINK -@@ -1774,7 +1793,8 @@ mDNSlocal void InterfaceChangeCallback(i +@@ -1774,7 +1793,8 @@ mDNSlocal void InterfaceChangeCallback(int fd, void *context) { IfChangeRec *pChgRec = (IfChangeRec*) context; fd_set readFDs; @@ -136,7 +136,7 @@ Index: mDNSResponder/mDNSPosix/mDNSPosix.c struct timeval zeroTimeout = { 0, 0 }; (void)fd; // Unused -@@ -1782,17 +1802,25 @@ mDNSlocal void InterfaceChangeCallback(i +@@ -1782,17 +1802,25 @@ mDNSlocal void InterfaceChangeCallback(int fd, void *context) FD_ZERO(&readFDs); FD_SET(pChgRec->NotifySD, &readFDs); diff --git a/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0005-mDNSCore-Fix-broken-debug-parameter.patch b/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0005-mDNSCore-Fix-broken-debug-parameter.patch index fd2f2f11..3c46d599 100644 --- a/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0005-mDNSCore-Fix-broken-debug-parameter.patch +++ b/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0005-mDNSCore-Fix-broken-debug-parameter.patch @@ -1,20 +1,19 @@ -From 764b6202402e9e5687ff873330e5ad6be6f69df7 Mon Sep 17 00:00:00 2001 +From 0b3953dfdeef8dc9b8a23820659feee9e15b5bad Mon Sep 17 00:00:00 2001 From: Alex Kiernan Date: Mon, 5 Dec 2022 22:49:49 +0000 Subject: [PATCH] mDNSCore: Fix broken debug parameter Upstream-Status: Pending Signed-off-by: Alex Kiernan - --- mDNSCore/mDNS.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -Index: mDNSResponder/mDNSCore/mDNS.c -=================================================================== ---- mDNSResponder.orig/mDNSCore/mDNS.c -+++ mDNSResponder/mDNSCore/mDNS.c -@@ -10231,7 +10231,7 @@ mDNSlocal void mDNSCoreReceiveNoUnicastA +diff --git a/mDNSCore/mDNS.c b/mDNSCore/mDNS.c +index d4519a7f62aa..3090edb2ac5d 100644 +--- a/mDNSCore/mDNS.c ++++ b/mDNSCore/mDNS.c +@@ -10253,7 +10253,7 @@ mDNSlocal void mDNSCoreReceiveNoUnicastAnswers(mDNS *const m, const DNSMessage * #else const DNSServRef dnsserv = qptr->qDNSServer; #endif diff --git a/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0006-Handle-noisy-netlink-sockets.patch b/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0006-Handle-noisy-netlink-sockets.patch index 80cdbca5..be63471e 100644 --- a/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0006-Handle-noisy-netlink-sockets.patch +++ b/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0006-Handle-noisy-netlink-sockets.patch @@ -1,7 +1,7 @@ -From bfa1d68bed863e22c40a6d9a19ffbcc8694bbff6 Mon Sep 17 00:00:00 2001 +From 105514b75df6d7abd052ec64d8106f5c07cc4782 Mon Sep 17 00:00:00 2001 From: Nate Karstens Date: Mon, 24 Jul 2017 09:38:55 -0500 -Subject: [PATCH 6/8] Handle noisy netlink sockets +Subject: [PATCH] Handle noisy netlink sockets The POSIX implementation currently clears all network interfaces when netlink indicates that there has been a change. This causes @@ -27,11 +27,11 @@ Signed-off-by: Alex Kiernan mDNSPosix/mDNSPosix.c | 182 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 172 insertions(+), 10 deletions(-) -Index: mDNSResponder/mDNSPosix/mDNSPosix.c -=================================================================== ---- mDNSResponder.orig/mDNSPosix/mDNSPosix.c -+++ mDNSResponder/mDNSPosix/mDNSPosix.c -@@ -1788,14 +1788,43 @@ mDNSlocal void ProcessRoutingNo +diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c +index 6b2fe76d4b66..ecd5741d038d 100644 +--- a/mDNSPosix/mDNSPosix.c ++++ b/mDNSPosix/mDNSPosix.c +@@ -1788,14 +1788,43 @@ mDNSlocal void ProcessRoutingNotification(int sd, GenLinkedList *change #endif // USES_NETLINK @@ -75,7 +75,7 @@ Index: mDNSResponder/mDNSPosix/mDNSPosix.c (void)fd; // Unused -@@ -1810,12 +1839,149 @@ mDNSlocal void InterfaceChangeCallback(i +@@ -1810,12 +1839,149 @@ mDNSlocal void InterfaceChangeCallback(int fd, void *context) } while (0 < select(pChgRec->NotifySD + 1, &readFDs, (fd_set*) NULL, (fd_set*) NULL, &zeroTimeout)); @@ -230,7 +230,7 @@ Index: mDNSResponder/mDNSPosix/mDNSPosix.c while ((changedInterface = (NetworkInterfaceIndex*)changedInterfaces.Head) != NULL) { RemoveFromList(&changedInterfaces, changedInterface); -@@ -1947,15 +2113,11 @@ mDNSexport void mDNSPlatformClose(mDNS * +@@ -1947,15 +2113,11 @@ mDNSexport void mDNSPlatformClose(mDNS *const m) #endif } diff --git a/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0006-make-Add-top-level-Makefile.patch b/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0006-make-Add-top-level-Makefile.patch index c12a02fc..ffa3fa38 100644 --- a/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0006-make-Add-top-level-Makefile.patch +++ b/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0006-make-Add-top-level-Makefile.patch @@ -1,7 +1,7 @@ -From fa9ef50ab4c4225cf3ade4bafc38ddf93e6fe127 Mon Sep 17 00:00:00 2001 +From 626ccae85aab5b0902a8e3c05d9f0e3fbbe4fcd2 Mon Sep 17 00:00:00 2001 From: Alex Kiernan Date: Tue, 6 Dec 2022 13:28:31 +0000 -Subject: [PATCH 6/6] make: Add top-level Makefile +Subject: [PATCH] make: Add top-level Makefile Simple top level Makefile that just delegates to mDNSPosix. @@ -12,10 +12,11 @@ Signed-off-by: Alex Kiernan 1 file changed, 2 insertions(+) create mode 100644 Makefile -Index: mDNSResponder/Makefile -=================================================================== +diff --git a/Makefile b/Makefile +new file mode 100644 +index 000000000000..feb6ac67ef47 --- /dev/null -+++ mDNSResponder/Makefile ++++ b/Makefile @@ -0,0 +1,2 @@ +all clean: + cd mDNSPosix && $(MAKE) $@ diff --git a/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0007-Mark-deleted-interfaces-as-being-changed.patch b/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0007-Mark-deleted-interfaces-as-being-changed.patch index dae1ac7e..276f879d 100644 --- a/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0007-Mark-deleted-interfaces-as-being-changed.patch +++ b/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0007-Mark-deleted-interfaces-as-being-changed.patch @@ -1,7 +1,7 @@ -From a8accffb95267490b50401c8b65ec18db57b5ef5 Mon Sep 17 00:00:00 2001 +From 3715b3f4a0ba2d2cb05e5ba617b523c759c88d4b Mon Sep 17 00:00:00 2001 From: Nate Karstens Date: Wed, 9 Aug 2017 09:16:58 -0500 -Subject: [PATCH 7/8] Mark deleted interfaces as being changed +Subject: [PATCH] Mark deleted interfaces as being changed Netlink notification handling ignores messages for deleted links, RTM_DELLINK. It does handle RTM_GETLINK. According to libnl docu- @@ -22,11 +22,11 @@ Signed-off-by: Alex Kiernan mDNSPosix/mDNSPosix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -Index: mDNSResponder/mDNSPosix/mDNSPosix.c -=================================================================== ---- mDNSResponder.orig/mDNSPosix/mDNSPosix.c -+++ mDNSResponder/mDNSPosix/mDNSPosix.c -@@ -1714,7 +1714,7 @@ mDNSlocal void ProcessRoutingNo +diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c +index ecd5741d038d..776531dbc8e8 100644 +--- a/mDNSPosix/mDNSPosix.c ++++ b/mDNSPosix/mDNSPosix.c +@@ -1714,7 +1714,7 @@ mDNSlocal void ProcessRoutingNotification(int sd, GenLinkedList *change #endif // Process the NetLink message diff --git a/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0008-Handle-errors-from-socket-calls.patch b/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0008-Handle-errors-from-socket-calls.patch index 1789001e..f3c7f62d 100644 --- a/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0008-Handle-errors-from-socket-calls.patch +++ b/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0008-Handle-errors-from-socket-calls.patch @@ -1,7 +1,7 @@ -From ed58146d3aeecdb9920fdc017f85c18b5b10f2db Mon Sep 17 00:00:00 2001 +From 4e6621eee389e1cbb558fe268e02d5153a1d8f2d Mon Sep 17 00:00:00 2001 From: Nate Karstens Date: Thu, 10 Aug 2017 08:27:32 -0500 -Subject: [PATCH 8/8] Handle errors from socket calls +Subject: [PATCH] Handle errors from socket calls Adds handling for socket() or read() returning a negative value (indicating an error has occurred). @@ -14,11 +14,11 @@ Signed-off-by: Alex Kiernan mDNSPosix/mDNSPosix.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) -Index: mDNSResponder/mDNSPosix/mDNSPosix.c -=================================================================== ---- mDNSResponder.orig/mDNSPosix/mDNSPosix.c -+++ mDNSResponder/mDNSPosix/mDNSPosix.c -@@ -1677,7 +1677,7 @@ mDNSlocal void ProcessRoutingNo +diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c +index 776531dbc8e8..0c9dd2582660 100644 +--- a/mDNSPosix/mDNSPosix.c ++++ b/mDNSPosix/mDNSPosix.c +@@ -1677,7 +1677,7 @@ mDNSlocal void ProcessRoutingNotification(int sd, GenLinkedList *change // Read through the messages on sd and if any indicate that any interface records should // be torn down and rebuilt, return affected indices as a bitmask. Otherwise return 0. { @@ -27,7 +27,7 @@ Index: mDNSResponder/mDNSPosix/mDNSPosix.c char buff[4096]; struct nlmsghdr *pNLMsg = (struct nlmsghdr*) buff; -@@ -1686,7 +1686,10 @@ mDNSlocal void ProcessRoutingNo +@@ -1686,7 +1686,10 @@ mDNSlocal void ProcessRoutingNotification(int sd, GenLinkedList *change // enough to hold all pending data and so avoid message fragmentation. // (Note that FIONREAD is not supported on AF_NETLINK.) @@ -39,7 +39,7 @@ Index: mDNSResponder/mDNSPosix/mDNSPosix.c while (1) { // Make sure we've got an entire nlmsghdr in the buffer, and payload, too. -@@ -1702,7 +1705,9 @@ mDNSlocal void ProcessRoutingNo +@@ -1702,7 +1705,9 @@ mDNSlocal void ProcessRoutingNotification(int sd, GenLinkedList *change pNLMsg = (struct nlmsghdr*) buff; // read more data @@ -50,7 +50,7 @@ Index: mDNSResponder/mDNSPosix/mDNSPosix.c continue; // spin around and revalidate with new readCount } else -@@ -2017,6 +2022,7 @@ mDNSlocal mDNSBool mDNSPlatformInit_CanR +@@ -2017,6 +2022,7 @@ mDNSlocal mDNSBool mDNSPlatformInit_CanReceiveUnicast(void) int err; int s = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); struct sockaddr_in s5353; diff --git a/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0009-remove-unneeded-headers.patch b/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0009-remove-unneeded-headers.patch index d443bc97..81801703 100644 --- a/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0009-remove-unneeded-headers.patch +++ b/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0009-remove-unneeded-headers.patch @@ -1,4 +1,4 @@ -From 1d7e71e72c597ffcc19c04373a477d1fbd3ad955 Mon Sep 17 00:00:00 2001 +From 05cb409ce213f35798c02faf2032d4846a84b48e Mon Sep 17 00:00:00 2001 From: Beniamin Sandu Date: Thu, 15 Jun 2023 17:02:58 +0000 Subject: [PATCH] remove unneeded headers @@ -14,10 +14,10 @@ Signed-off-by: Beniamin Sandu mDNSPosix/mbedtls.c | 2 -- 1 file changed, 2 deletions(-) -Index: mDNSResponder/mDNSPosix/mbedtls.c -=================================================================== ---- mDNSResponder.orig/mDNSPosix/mbedtls.c -+++ mDNSResponder/mDNSPosix/mbedtls.c +diff --git a/mDNSPosix/mbedtls.c b/mDNSPosix/mbedtls.c +index a73681b6d528..ab8f8c772c00 100644 +--- a/mDNSPosix/mbedtls.c ++++ b/mDNSPosix/mbedtls.c @@ -38,10 +38,8 @@ #include #include diff --git a/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0015-Add-missing-limits.h.patch b/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0015-Add-missing-limits.h.patch deleted file mode 100644 index 511a6fdc..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns/0015-Add-missing-limits.h.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 9fc45a2cf3b78573a568abf538a6e6f4bd30b2d7 Mon Sep 17 00:00:00 2001 -From: Alex Kiernan -Date: Wed, 27 Sep 2023 11:45:26 +0100 -Subject: [PATCH] Add missing limits.h - -Upstream-Status: Pending -Signed-off-by: Alex Kiernan ---- - mDNSShared/PlatformCommon.c | 1 + - 1 file changed, 1 insertion(+) - -Index: mDNSResponder/mDNSShared/PlatformCommon.c -=================================================================== ---- mDNSResponder.orig/mDNSShared/PlatformCommon.c -+++ mDNSResponder/mDNSShared/PlatformCommon.c -@@ -32,6 +32,7 @@ - #include - #include // Needed for #include (). - #include -+#include - - - #include "mDNSEmbeddedAPI.h" // Defines the interface provided to the client layer above diff --git a/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns_2200.100.94.0.2.bb b/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns_2200.100.94.0.2.bb deleted file mode 100644 index 183f05eb..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns_2200.100.94.0.2.bb +++ /dev/null @@ -1,135 +0,0 @@ -SUMMARY = "Publishes & browses available services on a link according to the Zeroconf / Bonjour protocol" -DESCRIPTION = "Bonjour, also known as zero-configuration networking, enables automatic discovery of computers, devices, and services on IP networks." -HOMEPAGE = "https://developer.apple.com/bonjour/" -LICENSE = "Apache-2.0 & BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=31c50371921e0fb731003bbc665f29bf" - -DEPENDS:append:libc-musl = " musl-nscd" - -SRC_URI = "git://github.com/apple-oss-distributions/mDNSResponder;protocol=https;branch=rel/mDNSResponder-2200 \ - file://0001-dns-sd-Include-missing-headers.patch \ - file://0002-make-Set-libdns_sd.so-soname-correctly.patch \ - file://0004-make-Separate-TLS-targets-from-libraries.patch \ - file://0005-mDNSCore-Fix-broken-debug-parameter.patch \ - file://0006-make-Add-top-level-Makefile.patch \ - file://0001-Create-subroutine-for-cleaning-recent-interfaces.patch \ - file://0002-Create-subroutine-for-tearing-down-an-interface.patch \ - file://0003-Track-interface-socket-family.patch \ - file://0004-Indicate-loopback-interface-to-mDNS-core.patch \ - file://0005-Use-list-for-changed-interfaces.patch \ - file://0006-Handle-noisy-netlink-sockets.patch \ - file://0007-Mark-deleted-interfaces-as-being-changed.patch \ - file://0008-Handle-errors-from-socket-calls.patch \ - file://0009-remove-unneeded-headers.patch \ - file://mdns.service \ - file://0015-Add-missing-limits.h.patch \ - file://0001-Handle-interface-without-ifa_addr.patch \ - file://0001-Fix-SIGSEGV-during-DumpStateLog.patch \ - " -SRCREV = "8f70f98fc1d0cf439ca3a6470be6ad8ac2bcc019" - -# We install a stub Makefile in the top directory so that the various checks -# in base.bbclass pass their tests for a Makefile, this ensures (that amongst -# other things) the sstate checks will clean the build directory when the -# task hashes changes. -# -# We can't use the approach of setting ${S} to mDNSPosix as we need -# DEBUG_PREFIX_MAP to cover files which come from the Clients directory too. -S = "${WORKDIR}/git" - -inherit github-releases manpages systemd update-rc.d - -PACKAGECONFIG ?= "tls \ - ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" -PACKAGECONFIG[debug] = "DEBUG=1,DEBUG=0" -PACKAGECONFIG[ipv6] = "HAVE_IPV6=1,HAVE_IPV6=0" -PACKAGECONFIG[manpages] = "" -PACKAGECONFIG[tls] = ",tls=no,mbedtls" - -CVE_PRODUCT = "apple:mdnsresponder" - -CVE_STATUS[CVE-2007-0613] = "not-applicable-platform: Issue affects Apple products \ -i.e. ichat,mdnsresponder, instant message framework and MacOS. Also, \ -https://www.exploit-db.com/exploits/3230 shows the part of code \ -affected by CVE-2007-0613 which is not preset in upstream source code. \ -Hence, CVE-2007-0613 does not affect other Yocto implementations and \ -is not reported for other distros can be marked whitelisted. \ -Links: https://vulmon.com/vulnerabilitydetails?qid=CVE-2007-0613 \ -https://www.incibe-cert.es/en/early-warning/vulnerabilities/cve-2007-0613 \ -https://security-tracker.debian.org/tracker/CVE-2007-0613 \ -https://vulmon.com/vulnerabilitydetails?qid=CVE-2007-0613" - -PARALLEL_MAKE = "" - -EXTRA_OEMAKE = "os=linux 'CC=${CCLD}' 'LD=${CCLD}' 'LINKOPTS=${LDFLAGS}' STRIP=: ${PACKAGECONFIG_CONFARGS}" - -# MDNS_VERSIONSTR_NODTS disables __DATE__ and __TIME__ in the version string, -# which are fixed anyway for build reproducibility. -TARGET_CPPFLAGS += "-DMDNS_VERSIONSTR_NODTS" - -TARGET_CC_ARCH += "${LDFLAGS}" - -MDNS_BUILDDIR = "build/${@bb.utils.contains('PACKAGECONFIG','debug','debug','prod', d)}" - -do_install () { - cd mDNSPosix - - install -d ${D}${sbindir} - install ${MDNS_BUILDDIR}/mdnsd ${D}${sbindir} - - install -d ${D}${libdir} - install -m 0644 ${MDNS_BUILDDIR}/libdns_sd.so ${D}${libdir}/libdns_sd.so.1 - ln -s libdns_sd.so.1 ${D}${libdir}/libdns_sd.so - - install -d ${D}${includedir} - install -m 0644 ../mDNSShared/dns_sd.h ${D}${includedir} - - install -d ${D}${mandir}/man8 - install -m 0644 ../mDNSShared/mDNSResponder.8 ${D}${mandir}/man8/mdnsd.8 - - install -d ${D}${bindir} - install -m 0755 ../Clients/build/dns-sd ${D}${bindir} - - install -d ${D}${libdir} - oe_libinstall -C ${MDNS_BUILDDIR} -so libnss_mdns-0.2 ${D}${libdir} - ln -s libnss_mdns-0.2.so ${D}${libdir}/libnss_mdns.so.2 - - install -d ${D}${sysconfdir} - install -m 0644 nss_mdns.conf ${D}${sysconfdir} - - install -d ${D}${mandir}/man5 - install -m 0644 nss_mdns.conf.5 ${D}${mandir}/man5 - - install -d ${D}${mandir}/man8 - install -m 0644 libnss_mdns.8 ${D}${mandir}/man8 - - install -d ${D}${systemd_system_unitdir} - install -m 0644 ${WORKDIR}/mdns.service ${D}${systemd_system_unitdir} - - install -d ${D}${INIT_D_DIR} - install mdnsd.sh ${D}${INIT_D_DIR}/mdns -} - -pkg_postinst:${PN} () { - if [ -r $D${sysconfdir}/nsswitch.conf ]; then - sed -e '/^hosts:/s/\s*\//' \ - -e 's/\(^hosts:.*\)\(\\)\(.*\)\(\\)\(.*\)/\1\2 mdns\3\4\5/' \ - -i $D${sysconfdir}/nsswitch.conf - fi -} - -pkg_prerm:${PN} () { - if [ -r $D${sysconfdir}/nsswitch.conf ]; then - sed -e '/^hosts:/s/\s*\//' \ - -e '/^hosts:/s/\s*mdns//' \ - -i $D${sysconfdir}/nsswitch.conf - fi -} - -SYSTEMD_SERVICE:${PN} = "mdns.service" -INITSCRIPT_NAME = "mdns" - -FILES_SOLIBSDEV = "${libdir}/libdns_sd.so" -FILES:${PN} += "${libdir}/libnss_mdns-0.2.so" - -RPROVIDES:${PN} += "libdns_sd.so" diff --git a/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns_2200.140.11.bb b/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns_2200.140.11.bb new file mode 100644 index 00000000..e6ea7071 --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns_2200.140.11.bb @@ -0,0 +1,134 @@ +SUMMARY = "Publishes & browses available services on a link according to the Zeroconf / Bonjour protocol" +DESCRIPTION = "Bonjour, also known as zero-configuration networking, enables automatic discovery of computers, devices, and services on IP networks." +HOMEPAGE = "https://developer.apple.com/bonjour/" +LICENSE = "Apache-2.0 & BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=31c50371921e0fb731003bbc665f29bf" + +DEPENDS:append:libc-musl = " musl-nscd" + +SRC_URI = "git://github.com/apple-oss-distributions/mDNSResponder;protocol=https;branch=rel/mDNSResponder-2200 \ + file://0001-dns-sd-Include-missing-headers.patch \ + file://0002-make-Set-libdns_sd.so-soname-correctly.patch \ + file://0004-make-Separate-TLS-targets-from-libraries.patch \ + file://0005-mDNSCore-Fix-broken-debug-parameter.patch \ + file://0006-make-Add-top-level-Makefile.patch \ + file://0001-Create-subroutine-for-cleaning-recent-interfaces.patch \ + file://0002-Create-subroutine-for-tearing-down-an-interface.patch \ + file://0003-Track-interface-socket-family.patch \ + file://0004-Indicate-loopback-interface-to-mDNS-core.patch \ + file://0005-Use-list-for-changed-interfaces.patch \ + file://0006-Handle-noisy-netlink-sockets.patch \ + file://0007-Mark-deleted-interfaces-as-being-changed.patch \ + file://0008-Handle-errors-from-socket-calls.patch \ + file://0009-remove-unneeded-headers.patch \ + file://mdns.service \ + file://0001-Handle-interface-without-ifa_addr.patch \ + file://0001-Fix-SIGSEGV-during-DumpStateLog.patch \ + " +SRCREV = "12e84b9089e577e0c0a9f48c4b922d7349fcc5a4" + +# We install a stub Makefile in the top directory so that the various checks +# in base.bbclass pass their tests for a Makefile, this ensures (that amongst +# other things) the sstate checks will clean the build directory when the +# task hashes changes. +# +# We can't use the approach of setting ${S} to mDNSPosix as we need +# DEBUG_PREFIX_MAP to cover files which come from the Clients directory too. +S = "${WORKDIR}/git" + +inherit github-releases manpages systemd update-rc.d + +PACKAGECONFIG ?= "tls \ + ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" +PACKAGECONFIG[debug] = "DEBUG=1,DEBUG=0" +PACKAGECONFIG[ipv6] = "HAVE_IPV6=1,HAVE_IPV6=0" +PACKAGECONFIG[manpages] = "" +PACKAGECONFIG[tls] = ",tls=no,mbedtls" + +CVE_PRODUCT = "apple:mdnsresponder" + +CVE_STATUS[CVE-2007-0613] = "not-applicable-platform: Issue affects Apple products \ +i.e. ichat,mdnsresponder, instant message framework and MacOS. Also, \ +https://www.exploit-db.com/exploits/3230 shows the part of code \ +affected by CVE-2007-0613 which is not preset in upstream source code. \ +Hence, CVE-2007-0613 does not affect other Yocto implementations and \ +is not reported for other distros can be marked whitelisted. \ +Links: https://vulmon.com/vulnerabilitydetails?qid=CVE-2007-0613 \ +https://www.incibe-cert.es/en/early-warning/vulnerabilities/cve-2007-0613 \ +https://security-tracker.debian.org/tracker/CVE-2007-0613 \ +https://vulmon.com/vulnerabilitydetails?qid=CVE-2007-0613" + +PARALLEL_MAKE = "" + +EXTRA_OEMAKE = "os=linux 'CC=${CCLD}' 'LD=${CCLD}' 'LINKOPTS=${LDFLAGS}' STRIP=: ${PACKAGECONFIG_CONFARGS}" + +# MDNS_VERSIONSTR_NODTS disables __DATE__ and __TIME__ in the version string, +# which are fixed anyway for build reproducibility. +TARGET_CPPFLAGS += "-DMDNS_VERSIONSTR_NODTS" + +TARGET_CC_ARCH += "${LDFLAGS}" + +MDNS_BUILDDIR = "build/${@bb.utils.contains('PACKAGECONFIG','debug','debug','prod', d)}" + +do_install () { + cd mDNSPosix + + install -d ${D}${sbindir} + install ${MDNS_BUILDDIR}/mdnsd ${D}${sbindir} + + install -d ${D}${libdir} + install -m 0644 ${MDNS_BUILDDIR}/libdns_sd.so ${D}${libdir}/libdns_sd.so.1 + ln -s libdns_sd.so.1 ${D}${libdir}/libdns_sd.so + + install -d ${D}${includedir} + install -m 0644 ../mDNSShared/dns_sd.h ${D}${includedir} + + install -d ${D}${mandir}/man8 + install -m 0644 ../mDNSShared/mDNSResponder.8 ${D}${mandir}/man8/mdnsd.8 + + install -d ${D}${bindir} + install -m 0755 ../Clients/build/dns-sd ${D}${bindir} + + install -d ${D}${libdir} + oe_libinstall -C ${MDNS_BUILDDIR} -so libnss_mdns-0.2 ${D}${libdir} + ln -s libnss_mdns-0.2.so ${D}${libdir}/libnss_mdns.so.2 + + install -d ${D}${sysconfdir} + install -m 0644 nss_mdns.conf ${D}${sysconfdir} + + install -d ${D}${mandir}/man5 + install -m 0644 nss_mdns.conf.5 ${D}${mandir}/man5 + + install -d ${D}${mandir}/man8 + install -m 0644 libnss_mdns.8 ${D}${mandir}/man8 + + install -d ${D}${systemd_system_unitdir} + install -m 0644 ${UNPACKDIR}/mdns.service ${D}${systemd_system_unitdir} + + install -d ${D}${INIT_D_DIR} + install mdnsd.sh ${D}${INIT_D_DIR}/mdns +} + +pkg_postinst:${PN} () { + if [ -r $D${sysconfdir}/nsswitch.conf ]; then + sed -e '/^hosts:/s/\s*\//' \ + -e 's/\(^hosts:.*\)\(\\)\(.*\)\(\\)\(.*\)/\1\2 mdns\3\4\5/' \ + -i $D${sysconfdir}/nsswitch.conf + fi +} + +pkg_prerm:${PN} () { + if [ -r $D${sysconfdir}/nsswitch.conf ]; then + sed -e '/^hosts:/s/\s*\//' \ + -e '/^hosts:/s/\s*mdns//' \ + -i $D${sysconfdir}/nsswitch.conf + fi +} + +SYSTEMD_SERVICE:${PN} = "mdns.service" +INITSCRIPT_NAME = "mdns" + +FILES_SOLIBSDEV = "${libdir}/libdns_sd.so" +FILES:${PN} += "${libdir}/libnss_mdns-0.2.so" + +RPROVIDES:${PN} += "libdns_sd.so" diff --git a/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp_5.9.4.bb b/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp_5.9.4.bb index 395b02df..989ec541 100644 --- a/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp_5.9.4.bb +++ b/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp_5.9.4.bb @@ -73,6 +73,7 @@ CACHED_CONFIGUREVARS = " \ lt_cv_shlibpath_overrides_runpath=yes \ ac_cv_path_UNAMEPROG=${base_bindir}/uname \ ac_cv_path_PSPROG=${base_bindir}/ps \ + ac_cv_ps_flags="-e" \ ac_cv_file__etc_printcap=no \ NETSNMP_CONFIGURE_OPTIONS= \ " @@ -116,12 +117,12 @@ do_configure:append() { do_install:append() { install -d ${D}${sysconfdir}/snmp install -d ${D}${sysconfdir}/init.d - install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/snmpd - install -m 644 ${WORKDIR}/snmpd.conf ${D}${sysconfdir}/snmp/ - install -m 644 ${WORKDIR}/snmptrapd.conf ${D}${sysconfdir}/snmp/ + install -m 755 ${UNPACKDIR}/init ${D}${sysconfdir}/init.d/snmpd + install -m 644 ${UNPACKDIR}/snmpd.conf ${D}${sysconfdir}/snmp/ + install -m 644 ${UNPACKDIR}/snmptrapd.conf ${D}${sysconfdir}/snmp/ install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/snmpd.service ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/snmptrapd.service ${D}${systemd_unitdir}/system + install -m 0644 ${UNPACKDIR}/snmpd.service ${D}${systemd_unitdir}/system + install -m 0644 ${UNPACKDIR}/snmptrapd.service ${D}${systemd_unitdir}/system sed -e "s@^NSC_SRCDIR=.*@NSC_SRCDIR=.@g" \ -i ${D}${bindir}/net-snmp-create-v3-user sed -e 's@^NSC_SRCDIR=.*@NSC_SRCDIR=.@g' \ diff --git a/sources/meta-openembedded/meta-networking/recipes-protocols/openflow/openflow/0001-Link-in-libexecinfo-if-it-has-backtrace-API.patch b/sources/meta-openembedded/meta-networking/recipes-protocols/openflow/openflow/0001-Link-in-libexecinfo-if-it-has-backtrace-API.patch new file mode 100644 index 00000000..6382c2a9 --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-protocols/openflow/openflow/0001-Link-in-libexecinfo-if-it-has-backtrace-API.patch @@ -0,0 +1,62 @@ +From 2272df8407d86519d72504d6468b710e7eb56de8 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 18 May 2024 00:23:43 -0700 +Subject: [PATCH] Link in libexecinfo if it has backtrace() API + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- + m4/libopenflow.m4 | 5 +++++ + tests/automake.mk | 2 +- + utilities/automake.mk | 4 ++-- + 3 files changed, 8 insertions(+), 3 deletions(-) + +diff --git a/m4/libopenflow.m4 b/m4/libopenflow.m4 +index 58014ed..c9302b8 100644 +--- a/m4/libopenflow.m4 ++++ b/m4/libopenflow.m4 +@@ -96,6 +96,11 @@ AC_DEFUN([OFP_CHECK_FAULT_LIBS], + [AC_CHECK_LIB([dl], [dladdr], [FAULT_LIBS=-ldl]) + AC_SUBST([FAULT_LIBS])]) + ++dnl Checks for libraries needed by lib/fault.c. ++AC_DEFUN([OFP_CHECK_FAULT_LIBS], ++ [AC_CHECK_LIB([execinfo], [backtrace], [FAULT_LIBS=-lexecinfo]) ++ AC_SUBST([FAULT_LIBS])]) ++ + dnl Checks for libraries needed by lib/socket-util.c. + AC_DEFUN([OFP_CHECK_SOCKET_LIBS], + [AC_CHECK_LIB([socket], [connect]) +diff --git a/tests/automake.mk b/tests/automake.mk +index a4e945a..0944275 100644 +--- a/tests/automake.mk ++++ b/tests/automake.mk +@@ -27,7 +27,7 @@ EXTRA_DIST += tests/test-stp.sh + noinst_PROGRAMS += tests/test-stp + + tests_test_stp_SOURCES = tests/test-stp.c +-tests_test_stp_LDADD = lib/libopenflow.a ++tests_test_stp_LDADD = lib/libopenflow.a $(FAULT_LIBS) + stp_files = \ + tests/test-stp-ieee802.1d-1998 \ + tests/test-stp-ieee802.1d-2004-fig17.4 \ +diff --git a/utilities/automake.mk b/utilities/automake.mk +index d6f79a8..0608655 100644 +--- a/utilities/automake.mk ++++ b/utilities/automake.mk +@@ -36,10 +36,10 @@ utilities_dpctl_SOURCES = utilities/dpctl.c + utilities_dpctl_LDADD = lib/libopenflow.a $(FAULT_LIBS) $(SSL_LIBS) + + utilities_vlogconf_SOURCES = utilities/vlogconf.c +-utilities_vlogconf_LDADD = lib/libopenflow.a ++utilities_vlogconf_LDADD = lib/libopenflow.a $(FAULT_LIBS) + + utilities_ofp_discover_SOURCES = utilities/ofp-discover.c +-utilities_ofp_discover_LDADD = lib/libopenflow.a ++utilities_ofp_discover_LDADD = lib/libopenflow.a $(FAULT_LIBS) + + utilities_ofp_kill_SOURCES = utilities/ofp-kill.c + utilities_ofp_kill_LDADD = lib/libopenflow.a +-- +2.45.1 + diff --git a/sources/meta-openembedded/meta-networking/recipes-protocols/openflow/openflow_git.bb b/sources/meta-openembedded/meta-networking/recipes-protocols/openflow/openflow_git.bb index 41bedcd0..0061565f 100644 --- a/sources/meta-openembedded/meta-networking/recipes-protocols/openflow/openflow_git.bb +++ b/sources/meta-openembedded/meta-networking/recipes-protocols/openflow/openflow_git.bb @@ -21,6 +21,7 @@ SRC_URI = "git://github.com/mininet/openflow;protocol=https;branch=master \ file://0001-generate-not-static-get_dh-functions.patch \ file://0001-socket-util-Include-sys-stat.h-for-fchmod.patch \ file://0001-Makefile.am-Specify-export-dynamic-directly-to-linke.patch \ + file://0001-Link-in-libexecinfo-if-it-has-backtrace-API.patch \ " CVE_STATUS[CVE-2015-1611] = "not-applicable-config: Not referred to our implementation of openflow" CVE_STATUS[CVE-2015-1612] = "not-applicable-config: Not referred to our implementation of openflow" @@ -34,9 +35,7 @@ EXTRA_OECONF += " \ KARCH=${TARGET_ARCH} \ ${@bb.utils.contains('PACKAGECONFIG', 'openssl', 'SSL_LIBS="-lssl -lcrypto"', '', d)} \ " - DEPENDS:append:libc-musl = " libexecinfo" -LDFLAGS:append:libc-musl = " -lexecinfo" S = "${WORKDIR}/git" @@ -68,3 +67,8 @@ do_install:append() { } FILES:${PN} += "${nonarch_libdir}/tmpfiles.d" + +# http://errors.yoctoproject.org/Errors/Details/766898/ +# lib/flow.c:213:48: error: initialization of 'const struct arp_eth_header *' from incompatible pointer type 'struct arp_header *' [-Wincompatible-pointer-types] +# lib/backtrace.c:126:32: error: passing argument 1 of 'backtrace' from incompatible pointer type [-Wincompatible-pointer-types] +CFLAGS += "-Wno-error=incompatible-pointer-types" diff --git a/sources/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp_1.8.bb b/sources/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp_1.8.bb index 183c0066..f64c7340 100644 --- a/sources/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp_1.8.bb +++ b/sources/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp_1.8.bb @@ -74,7 +74,7 @@ do_install:append () { install -m 0755 ${S}/etc/sysconfig/openl2tpd ${D}${sysconfdir}/default/openl2tpd if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then - install -D -m 0644 ${WORKDIR}/openl2tpd.service ${D}${systemd_system_unitdir}/openl2tpd.service + install -D -m 0644 ${UNPACKDIR}/openl2tpd.service ${D}${systemd_system_unitdir}/openl2tpd.service sed -i -e 's,@STATEDIR@,${localstatedir},g' \ -e 's,@SYSCONFDIR@,${sysconfdir},g' \ -e 's,@SBINDIR@,${sbindir},g' \ diff --git a/sources/meta-openembedded/meta-networking/recipes-protocols/pptp-linux/pptp-linux_1.10.0.bb b/sources/meta-openembedded/meta-networking/recipes-protocols/pptp-linux/pptp-linux_1.10.0.bb index 0d26c338..cabe18ef 100644 --- a/sources/meta-openembedded/meta-networking/recipes-protocols/pptp-linux/pptp-linux_1.10.0.bb +++ b/sources/meta-openembedded/meta-networking/recipes-protocols/pptp-linux/pptp-linux_1.10.0.bb @@ -26,7 +26,7 @@ do_install() { install -d ${D}${sbindir} ${D}${sysconfdir}/ppp ${D}${mandir}/man8 install -m 555 pptp ${D}${sbindir} install -m 644 pptp.8 ${D}${mandir}/man8 - install -m 644 ${WORKDIR}/options.pptp ${D}${sysconfdir}/ppp + install -m 644 ${UNPACKDIR}/options.pptp ${D}${sysconfdir}/ppp } RDEPENDS:${PN} = "ppp" diff --git a/sources/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe_3.15.bb b/sources/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe_3.15.bb index 4dfdb8fc..c8e17671 100644 --- a/sources/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe_3.15.bb +++ b/sources/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe_3.15.bb @@ -29,7 +29,7 @@ CFLAGS += "-D_GNU_SOURCE" do_install:append() { install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/pppoe-server.service ${D}${systemd_unitdir}/system + install -m 0644 ${UNPACKDIR}/pppoe-server.service ${D}${systemd_unitdir}/system sed -i -e 's#@SYSCONFDIR@#${sysconfdir}#g' ${D}${systemd_unitdir}/system/pppoe-server.service sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/pppoe-server.service install -d ${D}${datadir}/doc/${PN} @@ -41,8 +41,8 @@ do_install:append() { do_install() { # Install init script and default settings install -m 0755 -d ${D}${sysconfdir}/default ${D}${sysconfdir}/init.d - install -m 0644 ${WORKDIR}/pppoe-server.default ${D}${sysconfdir}/default/pppoe-server - install -m 0755 ${WORKDIR}/pppoe-server.init ${D}${sysconfdir}/init.d/pppoe-server + install -m 0644 ${UNPACKDIR}/pppoe-server.default ${D}${sysconfdir}/default/pppoe-server + install -m 0755 ${UNPACKDIR}/pppoe-server.init ${D}${sysconfdir}/init.d/pppoe-server # Install oe_runmake -C ${S} DESTDIR=${D} docdir=${docdir} install chmod 4755 ${D}${sbindir}/pppoe diff --git a/sources/meta-openembedded/meta-networking/recipes-protocols/usrsctp/usrsctp_git.bb b/sources/meta-openembedded/meta-networking/recipes-protocols/usrsctp/usrsctp_git.bb index 4c18c6af..3769d5ca 100644 --- a/sources/meta-openembedded/meta-networking/recipes-protocols/usrsctp/usrsctp_git.bb +++ b/sources/meta-openembedded/meta-networking/recipes-protocols/usrsctp/usrsctp_git.bb @@ -25,3 +25,4 @@ PACKAGECONFIG[inet6] = "--enable-inet6,--disable-inet6," EXTRA_OECONF += "--disable-debug" CVE_VERSION = "0.9.5.0" +CVE_STATUS[CVE-2019-20503] = "cpe-incorrect: The current version (0.9.5.0) is not affected by the CVE which affects versions at least earlier than 0.9.4.0" diff --git a/sources/meta-openembedded/meta-networking/recipes-protocols/vsomeip/vsomeip/0001-Update-to-C-17-560.patch b/sources/meta-openembedded/meta-networking/recipes-protocols/vsomeip/vsomeip/0001-Update-to-C-17-560.patch new file mode 100644 index 00000000..c69a395f --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-protocols/vsomeip/vsomeip/0001-Update-to-C-17-560.patch @@ -0,0 +1,969 @@ +From 7acb528db20c08d90f72fa317b8e1ccf4d270cdc Mon Sep 17 00:00:00 2001 +From: Matthew Russell +Date: Wed, 10 Apr 2024 06:23:27 -0400 +Subject: [PATCH 1/2] Update to C++17 (#560) + +* Upgrading to C++17 + +* Code Quality: Address compiler warnings + +- Fixing narrowing issues +- Removing useless copies +- Removing unused lines +- unused-lambda-capture +- Removes unused variables +- Fix some casts (modernize c-style, or simply remove useless casts) +- Explicitly deleting unused endpoint_impl copy and move constructors +- Removing redundant std::bind +- Improving const correctness +- Moving thread init to constructor body +- Moved check_routing_credentials_ inside vsomeip security section where it's used +- Using =default destructor instead of empty destructor + +Thread init: +Moving the initialization of these threads into the constructor body to +ensure that they do not start with an incomplete "this". As they +capture this, it is possible that if the new thread begins before the +object is fully constructed, the new thread might operate on +uninitialized members of "this". + +* Attempting to fix syntax error on MSVC + +* Adjusting PR to conform to Covesa style + +* Using curly brace initialization + +* Using static_cast to narrow its_device.size() to a socklen_t + +* Avoided double integer promotion + +Upstream-Status: Backport [https://github.com/COVESA/vsomeip/pull/560] +Signed-off-by: Khem Raj +--- + Android.bp | 2 +- + CMakeLists.txt | 11 ++- + examples/hello_world/hello_world_service.hpp | 12 +-- + .../configuration/include/internal.hpp.in | 6 +- + .../include/internal_android.hpp | 10 +-- + .../configuration/src/configuration_impl.cpp | 13 ++-- + .../endpoints/include/endpoint_impl.hpp | 3 + + .../local_server_endpoint_impl_receive_op.hpp | 4 +- + .../local_uds_client_endpoint_impl.hpp | 2 +- + .../local_uds_server_endpoint_impl.hpp | 2 +- + .../udp_server_endpoint_impl_receive_op.hpp | 2 +- + .../endpoints/src/endpoint_manager_base.cpp | 2 +- + .../src/local_uds_client_endpoint_impl.cpp | 5 -- + .../src/local_uds_server_endpoint_impl.cpp | 6 -- + .../src/tcp_client_endpoint_impl.cpp | 2 +- + .../src/tcp_server_endpoint_impl.cpp | 14 ++-- + .../src/udp_client_endpoint_impl.cpp | 2 +- + .../src/udp_server_endpoint_impl.cpp | 4 +- + .../message/include/message_base_impl.hpp | 2 - + implementation/message/src/deserializer.cpp | 4 +- + .../plugin/src/plugin_manager_impl.cpp | 2 +- + .../routing/src/routing_manager_base.cpp | 10 +-- + .../runtime/include/application_impl.hpp | 4 +- + .../runtime/src/application_impl.cpp | 7 +- + implementation/security/src/policy.cpp | 4 +- + implementation/security/src/security.cpp | 1 + + .../src/service_discovery_impl.cpp | 34 +++++---- + interface/vsomeip/constants.hpp | 74 +++++++++---------- + .../application_tests/application_test.cpp | 1 + + tools/vsomeip_ctrl.cpp | 9 ++- + 30 files changed, 129 insertions(+), 125 deletions(-) + +diff --git a/Android.bp b/Android.bp +index c6caa4de..f314f22b 100644 +--- a/Android.bp ++++ b/Android.bp +@@ -30,9 +30,9 @@ libvsomeip_sd_srcs = [ + + cc_defaults { + name: "vsomeip_defaults", ++ cpp_std: "c++17", + + cppflags: [ +- "-std=c++14", + "-fexceptions", + "-Wno-non-virtual-dtor", + "-Wno-unused-const-variable", +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ab399a69..3d947055 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -64,6 +64,8 @@ if(NOT CMAKE_BUILD_TYPE) + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo") + endif() + ++set(CMAKE_CXX_STANDARD 17) ++ + # OS + if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") + set(DL_LIBRARY "dl") +@@ -248,13 +250,13 @@ if (MSVC) + # add_definitions(-DVSOMEIP_DLL_COMPILATION) now it is controlled per target + SET(BOOST_WINDOWS_VERSION "0x600" CACHE STRING "Set the same Version as the Version with which Boost was built, otherwise there will be errors. (normaly 0x600 is for Windows 7 and 0x501 is for Windows XP)") + # Disable warning C4250 since it warns that the compiler is correctly following the C++ Standard. It's a "We-Are-Doing-Things-By-The-Book" notice, not a real warning. +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS -D_WIN32_WINNT=${BOOST_WINDOWS_VERSION} -DWIN32 -DBOOST_ASIO_DISABLE_IOCP /EHsc /std:c++14 /wd4250") ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS -D_WIN32_WINNT=${BOOST_WINDOWS_VERSION} -DWIN32 -DBOOST_ASIO_DISABLE_IOCP /EHsc /wd4250") + set(USE_RT "") + link_directories(${Boost_LIBRARY_DIR_DEBUG}) + elseif(${CMAKE_SYSTEM_NAME} MATCHES "QNX") + set(USE_RT "") + else() +- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OS_CXX_FLAGS} -g ${OPTIMIZE} -std=c++14 ${NO_DEPRECATED} ${EXPORTSYMBOLS}") ++ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OS_CXX_FLAGS} -g ${OPTIMIZE} ${NO_DEPRECATED} ${EXPORTSYMBOLS}") + set(USE_RT "rt") + endif() + +@@ -268,6 +270,7 @@ list(SORT ${VSOMEIP_NAME}-cfg_SRC) + if (VSOMEIP_ENABLE_MULTIPLE_ROUTING_MANAGERS EQUAL 0) + add_library(${VSOMEIP_NAME}-cfg SHARED ${${VSOMEIP_NAME}-cfg_SRC}) + set_target_properties (${VSOMEIP_NAME}-cfg PROPERTIES VERSION ${VSOMEIP_VERSION} SOVERSION ${VSOMEIP_MAJOR_VERSION}) ++ target_compile_features(${VSOMEIP_NAME}-cfg PRIVATE cxx_std_17) + if (MSVC) + set_target_properties(${VSOMEIP_NAME}-cfg PROPERTIES COMPILE_DEFINITIONS "VSOMEIP_DLL_COMPILATION_PLUGIN") + endif() +@@ -302,6 +305,7 @@ list(SORT ${VSOMEIP_NAME}_SRC) + + add_library(${VSOMEIP_NAME} SHARED ${${VSOMEIP_NAME}_SRC}) + set_target_properties (${VSOMEIP_NAME} PROPERTIES VERSION ${VSOMEIP_VERSION} SOVERSION ${VSOMEIP_MAJOR_VERSION}) ++target_compile_features(${VSOMEIP_NAME} PRIVATE cxx_std_17) + if (MSVC) + set_target_properties(${VSOMEIP_NAME} PROPERTIES COMPILE_DEFINITIONS "VSOMEIP_DLL_COMPILATION") + else () +@@ -331,6 +335,7 @@ file(GLOB ${VSOMEIP_NAME}-sd_SRC + list(SORT ${VSOMEIP_NAME}-sd_SRC) + + add_library(${VSOMEIP_NAME}-sd SHARED ${${VSOMEIP_NAME}-sd_SRC}) ++target_compile_features(${VSOMEIP_NAME}-sd PRIVATE cxx_std_17) + set_target_properties (${VSOMEIP_NAME}-sd PROPERTIES VERSION ${VSOMEIP_VERSION} SOVERSION ${VSOMEIP_MAJOR_VERSION}) + if (MSVC) + set_target_properties(${VSOMEIP_NAME}-sd PROPERTIES COMPILE_DEFINITIONS "VSOMEIP_DLL_COMPILATION_PLUGIN") +@@ -348,6 +353,7 @@ file(GLOB_RECURSE ${VSOMEIP_NAME}-e2e_SRC + list(SORT ${VSOMEIP_NAME}-e2e_SRC) + + add_library(${VSOMEIP_NAME}-e2e SHARED ${${VSOMEIP_NAME}-e2e_SRC}) ++target_compile_features(${VSOMEIP_NAME}-e2e PRIVATE cxx_std_17) + set_target_properties (${VSOMEIP_NAME}-e2e PROPERTIES VERSION ${VSOMEIP_VERSION} SOVERSION ${VSOMEIP_MAJOR_VERSION}) + if (MSVC) + set_target_properties(${VSOMEIP_NAME}-e2e PROPERTIES COMPILE_DEFINITIONS "VSOMEIP_DLL_COMPILATION_PLUGIN") +@@ -375,6 +381,7 @@ file(GLOB_RECURSE ${VSOMEIP_COMPAT_NAME}_SRC + list(SORT ${VSOMEIP_COMPAT_NAME}_SRC) + + add_library(${VSOMEIP_COMPAT_NAME} SHARED ${${VSOMEIP_COMPAT_NAME}_SRC}) ++target_compile_features(${VSOMEIP_COMPAT_NAME} PRIVATE cxx_std_17) + set_target_properties (${VSOMEIP_COMPAT_NAME} PROPERTIES VERSION ${VSOMEIP_COMPAT_VERSION} SOVERSION ${VSOMEIP_COMPAT_MAJOR_VERSION}) + if (MSVC) + set_target_properties(${VSOMEIP_COMPAT_NAME} PROPERTIES COMPILE_DEFINITIONS "VSOMEIP_DLL_COMPILATION_PLUGIN") +diff --git a/examples/hello_world/hello_world_service.hpp b/examples/hello_world/hello_world_service.hpp +index 7ac3b1e7..b04cacea 100644 +--- a/examples/hello_world/hello_world_service.hpp ++++ b/examples/hello_world/hello_world_service.hpp +@@ -11,12 +11,12 @@ + #if defined ANDROID || defined __ANDROID__ + #include "android/log.h" + #define LOG_TAG "hello_world_service" +-#define LOG_INF(...) fprintf(stdout, __VA_ARGS__), fprintf(stdout, "\n"), (void)__android_log_print(ANDROID_LOG_INFO, LOG_TAG, ##__VA_ARGS__) +-#define LOG_ERR(...) fprintf(stderr, __VA_ARGS__), fprintf(stderr, "\n"), (void)__android_log_print(ANDROID_LOG_ERROR, LOG_TAG, ##__VA_ARGS__) ++#define LOG_INF(...) std::fprintf(stdout, __VA_ARGS__), std::fprintf(stdout, "\n"), (void)__android_log_print(ANDROID_LOG_INFO, LOG_TAG, ##__VA_ARGS__) ++#define LOG_ERR(...) std::fprintf(stderr, __VA_ARGS__), std::fprintf(stderr, "\n"), (void)__android_log_print(ANDROID_LOG_ERROR, LOG_TAG, ##__VA_ARGS__) + #else + #include +-#define LOG_INF(...) fprintf(stdout, __VA_ARGS__), fprintf(stdout, "\n") +-#define LOG_ERR(...) fprintf(stderr, __VA_ARGS__), fprintf(stderr, "\n") ++#define LOG_INF(...) std::fprintf(stdout, __VA_ARGS__), std::fprintf(stdout, "\n") ++#define LOG_ERR(...) std::fprintf(stderr, __VA_ARGS__), std::fprintf(stderr, "\n") + #endif + + static vsomeip::service_t service_id = 0x1111; +@@ -32,9 +32,9 @@ public: + hello_world_service() : + rtm_(vsomeip::runtime::get()), + app_(rtm_->create_application()), +- stop_(false), +- stop_thread_(std::bind(&hello_world_service::stop, this)) ++ stop_(false) + { ++ stop_thread_ = std::thread{&hello_world_service::stop, this}; + } + + ~hello_world_service() +diff --git a/implementation/configuration/include/internal.hpp.in b/implementation/configuration/include/internal.hpp.in +index 72c8d503..eff4efad 100644 +--- a/implementation/configuration/include/internal.hpp.in ++++ b/implementation/configuration/include/internal.hpp.in +@@ -141,14 +141,14 @@ typedef enum { + IS_SUBSCRIBING + } subscription_state_e; + +-const std::uint32_t MESSAGE_SIZE_UNLIMITED = (std::numeric_limits::max)(); ++inline constexpr std::uint32_t MESSAGE_SIZE_UNLIMITED = (std::numeric_limits::max)(); + +-const std::uint32_t QUEUE_SIZE_UNLIMITED = (std::numeric_limits::max)(); ++inline constexpr std::uint32_t QUEUE_SIZE_UNLIMITED = (std::numeric_limits::max)(); + + #define VSOMEIP_DEFAULT_NPDU_DEBOUNCING_NANO 2 * 1000 * 1000 + #define VSOMEIP_DEFAULT_NPDU_MAXIMUM_RETENTION_NANO 5 * 1000 * 1000 + +-const std::uint32_t MAX_RECONNECTS_UNLIMITED = (std::numeric_limits::max)(); ++inline constexpr std::uint32_t MAX_RECONNECTS_UNLIMITED = (std::numeric_limits::max)(); + + const std::uint32_t ANY_UID = 0xFFFFFFFF; + const std::uint32_t ANY_GID = 0xFFFFFFFF; +diff --git a/implementation/configuration/include/internal_android.hpp b/implementation/configuration/include/internal_android.hpp +index f5425722..8757a85a 100644 +--- a/implementation/configuration/include/internal_android.hpp ++++ b/implementation/configuration/include/internal_android.hpp +@@ -128,17 +128,17 @@ typedef enum { + IS_SUBSCRIBING + } subscription_state_e; + +-const std::uint32_t MESSAGE_SIZE_UNLIMITED = std::numeric_limits::max(); ++inline constexpr std::uint32_t MESSAGE_SIZE_UNLIMITED = std::numeric_limits::max(); + +-const std::uint32_t QUEUE_SIZE_UNLIMITED = std::numeric_limits::max(); ++inline constexpr std::uint32_t QUEUE_SIZE_UNLIMITED = std::numeric_limits::max(); + + #define VSOMEIP_DEFAULT_NPDU_DEBOUNCING_NANO 2 * 1000 * 1000 + #define VSOMEIP_DEFAULT_NPDU_MAXIMUM_RETENTION_NANO 5 * 1000 * 1000 + +-const std::uint32_t MAX_RECONNECTS_UNLIMITED = std::numeric_limits::max(); ++inline constexpr std::uint32_t MAX_RECONNECTS_UNLIMITED = std::numeric_limits::max(); + +-const std::uint32_t ANY_UID = 0xFFFFFFFF; +-const std::uint32_t ANY_GID = 0xFFFFFFFF; ++inline constexpr std::uint32_t ANY_UID = 0xFFFFFFFF; ++inline constexpr std::uint32_t ANY_GID = 0xFFFFFFFF; + + enum class port_type_e { + PT_OPTIONAL, +diff --git a/implementation/configuration/src/configuration_impl.cpp b/implementation/configuration/src/configuration_impl.cpp +index ca1bd1dc..380b2906 100644 +--- a/implementation/configuration/src/configuration_impl.cpp ++++ b/implementation/configuration/src/configuration_impl.cpp +@@ -333,7 +333,7 @@ bool configuration_impl::load(const std::string &_name) { + + // Tell, if reading of configuration file(s) failed. + // (This may file if the logger configuration is incomplete/missing). +- for (auto f : its_failed) ++ for (const auto& f : its_failed) + VSOMEIP_WARNING << "Reading of configuration file \"" + << f << "\" failed. Configuration may be incomplete."; + +@@ -342,7 +342,7 @@ bool configuration_impl::load(const std::string &_name) { + + std::chrono::steady_clock::time_point end = std::chrono::steady_clock::now(); + +- for (auto i : its_input) { ++ for (const auto& i : its_input) { + if (utility::is_file(i)) + VSOMEIP_INFO << "Using configuration file: \"" << i << "\"."; + +@@ -561,7 +561,7 @@ bool configuration_impl::load_data(const std::vector &_el + + if (is_logging_loaded_) { + logger::logger_impl::init(shared_from_this()); +- for (auto w : its_warnings) ++ for (const auto& w : its_warnings) + VSOMEIP_WARNING << w; + } + } +@@ -3255,7 +3255,7 @@ void configuration_impl::trim(std::string &_s) { + std::find_if( + _s.begin(), + _s.end(), +- [](unsigned char ch) { return !std::isspace(ch); } ++ [](const auto ch) { return !std::isspace(ch); } + ) + ); + +@@ -3263,8 +3263,9 @@ void configuration_impl::trim(std::string &_s) { + std::find_if( + _s.rbegin(), + _s.rend(), +- [](unsigned char ch) { return !std::isspace(ch); }).base(), +- _s.end() ++ [](const auto ch) { return !std::isspace(ch); } ++ ).base(), ++ _s.end() + ); + } + +diff --git a/implementation/endpoints/include/endpoint_impl.hpp b/implementation/endpoints/include/endpoint_impl.hpp +index 9d2b303c..685eba4e 100644 +--- a/implementation/endpoints/include/endpoint_impl.hpp ++++ b/implementation/endpoints/include/endpoint_impl.hpp +@@ -34,6 +34,9 @@ public: + std::uint32_t _max_message_size, + configuration::endpoint_queue_limit_t _queue_limit, + const std::shared_ptr& _configuration); ++ endpoint_impl(endpoint_impl const&) = delete; ++ endpoint_impl(endpoint_impl const&&) = delete; ++ + virtual ~endpoint_impl(); + + void enable_magic_cookies(); +diff --git a/implementation/endpoints/include/local_server_endpoint_impl_receive_op.hpp b/implementation/endpoints/include/local_server_endpoint_impl_receive_op.hpp +index 53f4769a..b1d8991d 100644 +--- a/implementation/endpoints/include/local_server_endpoint_impl_receive_op.hpp ++++ b/implementation/endpoints/include/local_server_endpoint_impl_receive_op.hpp +@@ -25,8 +25,8 @@ struct storage : + { + socket_type_t &socket_; + receive_handler_t handler_; +- byte_t *buffer_; +- std::size_t length_; ++ byte_t *buffer_ = nullptr; ++ size_t length_; + uid_t uid_; + gid_t gid_; + size_t bytes_; +diff --git a/implementation/endpoints/include/local_uds_client_endpoint_impl.hpp b/implementation/endpoints/include/local_uds_client_endpoint_impl.hpp +index d7eede3f..e1e1aaa2 100644 +--- a/implementation/endpoints/include/local_uds_client_endpoint_impl.hpp ++++ b/implementation/endpoints/include/local_uds_client_endpoint_impl.hpp +@@ -25,7 +25,7 @@ public: + const endpoint_type& _remote, + boost::asio::io_context &_io, + const std::shared_ptr& _configuration); +- virtual ~local_uds_client_endpoint_impl(); ++ virtual ~local_uds_client_endpoint_impl() = default; + + void start(); + void stop(); +diff --git a/implementation/endpoints/include/local_uds_server_endpoint_impl.hpp b/implementation/endpoints/include/local_uds_server_endpoint_impl.hpp +index 1e78822d..a4ed2eb5 100644 +--- a/implementation/endpoints/include/local_uds_server_endpoint_impl.hpp ++++ b/implementation/endpoints/include/local_uds_server_endpoint_impl.hpp +@@ -50,7 +50,7 @@ public: + const std::shared_ptr& _configuration, + bool _is_routing_endpoint); + +- virtual ~local_uds_server_endpoint_impl(); ++ virtual ~local_uds_server_endpoint_impl() = default; + + void start(); + void stop(); +diff --git a/implementation/endpoints/include/udp_server_endpoint_impl_receive_op.hpp b/implementation/endpoints/include/udp_server_endpoint_impl_receive_op.hpp +index 1e4f0fe0..35638cd7 100644 +--- a/implementation/endpoints/include/udp_server_endpoint_impl_receive_op.hpp ++++ b/implementation/endpoints/include/udp_server_endpoint_impl_receive_op.hpp +@@ -35,7 +35,7 @@ struct storage : + socket_type_t &socket_; + endpoint_type_t &sender_; + receive_handler_t handler_; +- byte_t *buffer_; ++ byte_t *buffer_ = nullptr; + size_t length_; + std::uint8_t multicast_id_; + bool is_v4_; +diff --git a/implementation/endpoints/src/endpoint_manager_base.cpp b/implementation/endpoints/src/endpoint_manager_base.cpp +index 9dff9785..4e484454 100644 +--- a/implementation/endpoints/src/endpoint_manager_base.cpp ++++ b/implementation/endpoints/src/endpoint_manager_base.cpp +@@ -38,7 +38,7 @@ std::shared_ptr endpoint_manager_base::create_local(client_t _client) + return create_local_unlocked(_client); + } + +-void endpoint_manager_base::remove_local(client_t _client) { ++void endpoint_manager_base::remove_local(const client_t _client) { + std::shared_ptr its_endpoint(find_local(_client)); + if (its_endpoint) { + its_endpoint->register_error_handler(nullptr); +diff --git a/implementation/endpoints/src/local_uds_client_endpoint_impl.cpp b/implementation/endpoints/src/local_uds_client_endpoint_impl.cpp +index 0b7e261c..56c621db 100644 +--- a/implementation/endpoints/src/local_uds_client_endpoint_impl.cpp ++++ b/implementation/endpoints/src/local_uds_client_endpoint_impl.cpp +@@ -40,12 +40,7 @@ local_uds_client_endpoint_impl::local_uds_client_endpoint_impl( + is_supporting_magic_cookies_ = false; + } + +-local_uds_client_endpoint_impl::~local_uds_client_endpoint_impl() { +- +-} +- + bool local_uds_client_endpoint_impl::is_local() const { +- + return true; + } + +diff --git a/implementation/endpoints/src/local_uds_server_endpoint_impl.cpp b/implementation/endpoints/src/local_uds_server_endpoint_impl.cpp +index 948fe925..33876c56 100644 +--- a/implementation/endpoints/src/local_uds_server_endpoint_impl.cpp ++++ b/implementation/endpoints/src/local_uds_server_endpoint_impl.cpp +@@ -104,17 +104,11 @@ local_uds_server_endpoint_impl::local_uds_server_endpoint_impl( + #endif + } + +-local_uds_server_endpoint_impl::~local_uds_server_endpoint_impl() { +- +-} +- + bool local_uds_server_endpoint_impl::is_local() const { +- + return true; + } + + void local_uds_server_endpoint_impl::start() { +- + std::lock_guard its_lock(acceptor_mutex_); + if (acceptor_.is_open()) { + connection::ptr new_connection = connection::create( +diff --git a/implementation/endpoints/src/tcp_client_endpoint_impl.cpp b/implementation/endpoints/src/tcp_client_endpoint_impl.cpp +index f42d93d4..e6755157 100644 +--- a/implementation/endpoints/src/tcp_client_endpoint_impl.cpp ++++ b/implementation/endpoints/src/tcp_client_endpoint_impl.cpp +@@ -178,7 +178,7 @@ void tcp_client_endpoint_impl::connect() { + std::string its_device(configuration_->get_device()); + if (its_device != "") { + if (setsockopt(socket_->native_handle(), +- SOL_SOCKET, SO_BINDTODEVICE, its_device.c_str(), (socklen_t)its_device.size()) == -1) { ++ SOL_SOCKET, SO_BINDTODEVICE, its_device.c_str(), static_cast(its_device.size())) == -1) { + VSOMEIP_WARNING << "TCP Client: Could not bind to device \"" << its_device << "\""; + } + } +diff --git a/implementation/endpoints/src/tcp_server_endpoint_impl.cpp b/implementation/endpoints/src/tcp_server_endpoint_impl.cpp +index f83252ae..5aef72be 100644 +--- a/implementation/endpoints/src/tcp_server_endpoint_impl.cpp ++++ b/implementation/endpoints/src/tcp_server_endpoint_impl.cpp +@@ -55,7 +55,7 @@ tcp_server_endpoint_impl::tcp_server_endpoint_impl( + std::string its_device(configuration_->get_device()); + if (its_device != "") { + if (setsockopt(acceptor_.native_handle(), +- SOL_SOCKET, SO_BINDTODEVICE, its_device.c_str(), (socklen_t)its_device.size()) == -1) { ++ SOL_SOCKET, SO_BINDTODEVICE, its_device.c_str(), static_cast(its_device.size())) == -1) { + VSOMEIP_WARNING << "TCP Server: Could not bind to device \"" << its_device << "\""; + } + } +@@ -295,8 +295,8 @@ void tcp_server_endpoint_impl::accept_cbk(const connection::ptr& _connection, + auto its_ep = std::dynamic_pointer_cast( + shared_from_this()); + its_timer->async_wait([its_timer, its_ep] +- (const boost::system::error_code& _error) { +- if (!_error) { ++ (const boost::system::error_code& _error_inner) { ++ if (!_error_inner) { + its_ep->start(); + } + }); +@@ -853,12 +853,12 @@ void tcp_server_endpoint_impl::connection::handle_recv_buffer_exception( + << std::setfill('0') << std::hex; + + for (std::size_t i = 0; i < recv_buffer_size_ && i < 16; i++) { +- its_message << std::setw(2) << (int) (recv_buffer_[i]) << " "; ++ its_message << std::setw(2) << static_cast(recv_buffer_[i]) << " "; + } + + its_message << " Last 16 Bytes captured: "; + for (int i = 15; recv_buffer_size_ > 15 && i >= 0; i--) { +- its_message << std::setw(2) << (int) (recv_buffer_[static_cast(i)]) << " "; ++ its_message << std::setw(2) << static_cast(recv_buffer_[static_cast(i)]) << " "; + } + VSOMEIP_ERROR << its_message.str(); + recv_buffer_.clear(); +@@ -954,7 +954,7 @@ void tcp_server_endpoint_impl::print_status() { + std::lock_guard its_lock(mutex_); + connections_t its_connections; + { +- std::lock_guard its_lock(connections_mutex_); ++ std::lock_guard its_lock_inner(connections_mutex_); + its_connections = connections_; + } + +@@ -1027,7 +1027,7 @@ void tcp_server_endpoint_impl::connection::wait_until_sent(const boost::system:: + } + } + { +- std::lock_guard its_lock(its_server->connections_mutex_); ++ std::lock_guard its_lock_inner(its_server->connections_mutex_); + stop(); + } + its_server->remove_connection(this); +diff --git a/implementation/endpoints/src/udp_client_endpoint_impl.cpp b/implementation/endpoints/src/udp_client_endpoint_impl.cpp +index d6952228..f52b2354 100644 +--- a/implementation/endpoints/src/udp_client_endpoint_impl.cpp ++++ b/implementation/endpoints/src/udp_client_endpoint_impl.cpp +@@ -67,7 +67,7 @@ void udp_client_endpoint_impl::connect() { + << get_address_port_remote(); + } + socket_->set_option(boost::asio::socket_base::receive_buffer_size( +- udp_receive_buffer_size_), its_error); ++ static_cast(udp_receive_buffer_size_)), its_error); + if (its_error) { + VSOMEIP_WARNING << "udp_client_endpoint_impl::connect: couldn't set " + << "SO_RCVBUF: " << its_error.message() +diff --git a/implementation/endpoints/src/udp_server_endpoint_impl.cpp b/implementation/endpoints/src/udp_server_endpoint_impl.cpp +index 48e35c5d..587fb94c 100644 +--- a/implementation/endpoints/src/udp_server_endpoint_impl.cpp ++++ b/implementation/endpoints/src/udp_server_endpoint_impl.cpp +@@ -72,7 +72,7 @@ udp_server_endpoint_impl::udp_server_endpoint_impl( + std::string its_device(configuration_->get_device()); + if (its_device != "") { + if (setsockopt(unicast_socket_.native_handle(), +- SOL_SOCKET, SO_BINDTODEVICE, its_device.c_str(), (socklen_t)its_device.size()) == -1) { ++ SOL_SOCKET, SO_BINDTODEVICE, its_device.c_str(), static_cast(its_device.size())) == -1) { + VSOMEIP_WARNING << "UDP Server: Could not bind to device \"" << its_device << "\""; + } + } +@@ -108,7 +108,7 @@ udp_server_endpoint_impl::udp_server_endpoint_impl( + const int its_udp_recv_buffer_size = + configuration_->get_udp_receive_buffer_size(); + unicast_socket_.set_option(boost::asio::socket_base::receive_buffer_size( +- its_udp_recv_buffer_size), ec); ++ static_cast(its_udp_recv_buffer_size)), ec); + + if (ec) { + VSOMEIP_WARNING << "udp_server_endpoint_impl: couldn't set " +diff --git a/implementation/message/include/message_base_impl.hpp b/implementation/message/include/message_base_impl.hpp +index acad2e89..2c953e98 100644 +--- a/implementation/message/include/message_base_impl.hpp ++++ b/implementation/message/include/message_base_impl.hpp +@@ -6,8 +6,6 @@ + #ifndef VSOMEIP_V3_MESSAGE_BASE_IMPL_HPP + #define VSOMEIP_V3_MESSAGE_BASE_IMPL_HPP + +-#include +- + #include + #include + +diff --git a/implementation/message/src/deserializer.cpp b/implementation/message/src/deserializer.cpp +index 3c4eddfa..bfa723d3 100644 +--- a/implementation/message/src/deserializer.cpp ++++ b/implementation/message/src/deserializer.cpp +@@ -115,8 +115,8 @@ bool deserializer::deserialize(std::string &_target, std::size_t _length) { + if (_length > remaining_ || _length > _target.capacity()) { + return false; + } +- _target.assign(position_, position_ + long(_length)); +- position_ += long(_length); ++ _target.assign(position_, position_ + static_cast::difference_type>(_length)); ++ position_ += static_cast::difference_type>(_length); + remaining_ -= _length; + + return true; +diff --git a/implementation/plugin/src/plugin_manager_impl.cpp b/implementation/plugin/src/plugin_manager_impl.cpp +index bea96d01..23b7b892 100644 +--- a/implementation/plugin/src/plugin_manager_impl.cpp ++++ b/implementation/plugin/src/plugin_manager_impl.cpp +@@ -164,7 +164,7 @@ bool plugin_manager_impl::unload_plugin(plugin_type_e _type) { + } + } else { + VSOMEIP_ERROR << "plugin_manager_impl::unload_plugin didn't find plugin" +- << " type:" << (int)_type; ++ << " type:" << static_cast(_type); + return false; + } + return plugins_.erase(_type); +diff --git a/implementation/routing/src/routing_manager_base.cpp b/implementation/routing/src/routing_manager_base.cpp +index dde6b260..047e6566 100644 +--- a/implementation/routing/src/routing_manager_base.cpp ++++ b/implementation/routing/src/routing_manager_base.cpp +@@ -1184,8 +1184,8 @@ void routing_manager_base::remove_local(client_t _client, + std::lock_guard its_lock(local_services_mutex_); + // Finally remove all services that are implemented by the client. + std::set> its_services; +- for (auto& s : local_services_) { +- for (auto& i : s.second) { ++ for (const auto& s : local_services_) { ++ for (const auto& i : s.second) { + if (std::get<2>(i.second) == _client) { + its_services.insert({ s.first, i.first }); + host_->on_availability(s.first, i.first, availability_state_e::AS_UNAVAILABLE, +@@ -1202,9 +1202,9 @@ void routing_manager_base::remove_local(client_t _client, + + // remove disconnected client from offer service history + std::set> its_clients; +- for (auto& s : local_services_history_) { +- for (auto& i : s.second) { +- for (auto& c : i.second) { ++ for (const auto& s : local_services_history_) { ++ for (const auto& i : s.second) { ++ for (const auto& c : i.second) { + if (c == _client) { + its_clients.insert(std::make_tuple(s.first, i.first, c)); + } +diff --git a/implementation/runtime/include/application_impl.hpp b/implementation/runtime/include/application_impl.hpp +index 67187a87..c647b531 100644 +--- a/implementation/runtime/include/application_impl.hpp ++++ b/implementation/runtime/include/application_impl.hpp +@@ -309,7 +309,7 @@ private: + std::shared_ptr get_next_handler(); + void reschedule_availability_handler(const std::shared_ptr &_handler); + bool has_active_dispatcher(); +- bool is_active_dispatcher(const std::thread::id &_id); ++ bool is_active_dispatcher(const std::thread::id &_id) const; + void remove_elapsed_dispatchers(); + + void shutdown(); +@@ -436,7 +436,7 @@ private: + // Dispatcher threads that are running + std::set running_dispatchers_; + // Mutex to protect access to dispatchers_ & elapsed_dispatchers_ +- std::mutex dispatcher_mutex_; ++ mutable std::mutex dispatcher_mutex_; + + // Condition to wakeup the dispatcher thread + mutable std::condition_variable dispatcher_condition_; +diff --git a/implementation/runtime/src/application_impl.cpp b/implementation/runtime/src/application_impl.cpp +index aba906b7..db880b42 100644 +--- a/implementation/runtime/src/application_impl.cpp ++++ b/implementation/runtime/src/application_impl.cpp +@@ -426,7 +426,8 @@ void application_impl::start() { + std::lock_guard its_lock(dispatcher_mutex_); + is_dispatching_ = true; + auto its_main_dispatcher = std::make_shared( +- std::bind(&application_impl::main_dispatch, shared_from_this())); ++ &application_impl::main_dispatch, shared_from_this() ++ ); + dispatchers_[its_main_dispatcher->get_id()] = its_main_dispatcher; + } + +@@ -1792,7 +1793,7 @@ void application_impl::main_dispatch() { + } + } else { + std::shared_ptr its_handler; +- while (is_dispatching_ && is_active_dispatcher(its_id) ++ while (is_dispatching_ && is_active_dispatcher(its_id) + && (its_handler = get_next_handler())) { + its_lock.unlock(); + invoke_handler(its_handler); +@@ -2048,7 +2049,7 @@ bool application_impl::has_active_dispatcher() { + return false; + } + +-bool application_impl::is_active_dispatcher(const std::thread::id &_id) { ++bool application_impl::is_active_dispatcher(const std::thread::id &_id) const { + while (is_dispatching_) { + if (dispatcher_mutex_.try_lock()) { + for (const auto &d : dispatchers_) { +diff --git a/implementation/security/src/policy.cpp b/implementation/security/src/policy.cpp +index 36341223..da0bbd86 100644 +--- a/implementation/security/src/policy.cpp ++++ b/implementation/security/src/policy.cpp +@@ -175,7 +175,7 @@ policy::deserialize_ids(const byte_t * &_data, uint32_t &_size, + if (its_result == false) + return false; + +- for (const auto i : its_instances) ++ for (const auto& i : its_instances) + its_ids += std::make_pair(i, its_methods); + + its_array_length -= (its_current_size - _size); +@@ -379,7 +379,7 @@ policy::serialize_interval_set( + uint32_t its_interval_set_size(0); + serialize_u32(its_interval_set_size, _data); + +- for (const auto i : _intervals) ++ for (const auto& i : _intervals) + serialize_interval(i, _data); + + its_interval_set_size = static_cast(_data.size() +diff --git a/implementation/security/src/security.cpp b/implementation/security/src/security.cpp +index a3b6ab3f..19ff73da 100644 +--- a/implementation/security/src/security.cpp ++++ b/implementation/security/src/security.cpp +@@ -14,6 +14,7 @@ + #include "../../plugin/include/plugin_manager.hpp" + + #include ++#include + #include + + #ifndef _WIN32 +diff --git a/implementation/service_discovery/src/service_discovery_impl.cpp b/implementation/service_discovery/src/service_discovery_impl.cpp +index de6e8467..c3880457 100644 +--- a/implementation/service_discovery/src/service_discovery_impl.cpp ++++ b/implementation/service_discovery/src/service_discovery_impl.cpp +@@ -5,8 +5,10 @@ + + #include + +-#include ++#include ++#include + #include ++#include + #include + + #include +@@ -869,7 +871,7 @@ service_discovery_impl::create_eventgroup_entry( + << std::setw(4) << _service << "." + << std::setw(4) << _instance << "." + << std::setw(4) << _eventgroup << "] " +- << (uint16_t) _reliability_type; ++ << static_cast(_reliability_type); + return its_data; + } + std::shared_ptr its_entry, its_other; +@@ -1074,7 +1076,7 @@ service_discovery_impl::insert_subscription_ack( + // Selective + if (_clients.size() > 1 || (*(_clients.begin())) != 0) { + auto its_selective_option = std::make_shared(); +- (void)its_selective_option->set_clients(_clients); ++ static_cast(its_selective_option->set_clients(_clients)); + + its_data.options_.push_back(its_selective_option); + } +@@ -1136,7 +1138,7 @@ service_discovery_impl::on_message( + static bool must_start_last_msg_received_timer(true); + boost::system::error_code ec; + +- std::lock_guard its_lock(last_msg_received_timer_mutex_); ++ std::lock_guard its_lock_inner(last_msg_received_timer_mutex_); + if (0 < last_msg_received_timer_.cancel(ec) || must_start_last_msg_received_timer) { + must_start_last_msg_received_timer = false; + last_msg_received_timer_.expires_from_now( +@@ -1272,7 +1274,7 @@ service_discovery_impl::on_message( + } + + { +- std::unique_lock its_lock(its_acknowledgement->get_lock()); ++ std::unique_lock its_lock_inner(its_acknowledgement->get_lock()); + its_acknowledgement->complete(); + // TODO: Check the following logic... + if (its_acknowledgement->has_subscription()) { +@@ -1543,7 +1545,7 @@ service_discovery_impl::process_offerservice_serviceentry( + << std::setw(4) << _instance << "." + << std::setw(4) << eg << "]" + << " using reliability type: " +- << std::setw(4) << (uint16_t) offer_type; ++ << std::setw(4) << static_cast(offer_type); + its_info->set_reliability(offer_type); + } + } +@@ -1947,7 +1949,7 @@ service_discovery_impl::process_eventgroupentry( + << ": SOME/IP length field in SubscribeEventGroup message header: [" + << std::dec << _entry->get_owning_message()->get_someip_length() + << "] bytes, is shorter than length of deserialized message: [" +- << (uint32_t) _entry->get_owning_message()->get_length() << "] bytes. " ++ << static_cast(_entry->get_owning_message()->get_length()) << "] bytes. " + << its_sender.to_string(ec) << " session: " + << std::hex << std::setw(4) << std::setfill('0') << its_session; + return; +@@ -2238,7 +2240,7 @@ service_discovery_impl::process_eventgroupentry( + boost::system::error_code ec; + VSOMEIP_WARNING << __func__ + << ": Unsupported eventgroup option [" +- << std::hex << (int)its_option->get_type() << "] " ++ << std::hex << static_cast(its_option->get_type()) << "] " + << its_sender.to_string(ec) << " session: " + << std::hex << std::setw(4) << std::setfill('0') << its_session; + if (its_ttl > 0) { +@@ -2332,7 +2334,7 @@ service_discovery_impl::handle_eventgroup_subscription( + << std::setw(4) << _instance << "." + << std::setw(4) << _eventgroup << "]" + << " not valid: Event configuration (" +- << (std::uint32_t)_info->get_reliability() ++ << static_cast(_info->get_reliability()) + << ") does not match the provided endpoint options: " + << _first_address.to_string(ec) << ":" << std::dec << _first_port << " " + << _second_address.to_string(ec) << ":" << _second_port; +@@ -2355,14 +2357,14 @@ service_discovery_impl::handle_eventgroup_subscription( + boost::system::error_code ec; + // TODO: Add session id + VSOMEIP_ERROR << __func__ +- << ": Requested major version:[" << (uint32_t) _major ++ << ": Requested major version:[" << static_cast(_major) + << "] in subscription to service: [" + << std::hex << std::setfill('0') + << std::setw(4) << _service << "." + << std::setw(4) << _instance << "." + << std::setw(4) << _eventgroup << "]" + << " does not match with services major version:[" +- << (uint32_t) _info->get_major() << "] subscriber: " ++ << static_cast(_info->get_major()) << "] subscriber: " + << _first_address.to_string(ec) << ":" << std::dec << _first_port; + if (_ttl > 0) { + insert_subscription_ack(_acknowledgement, its_info, 0, nullptr, _clients); +@@ -3107,8 +3109,8 @@ service_discovery_impl::move_offers_into_main_phase( + const auto its_timer = repetition_phase_timers_.find(_timer); + if (its_timer != repetition_phase_timers_.end()) { + for (const auto& its_service : its_timer->second) { +- for (const auto& instance : its_service.second) { +- instance.second->set_is_in_mainphase(true); ++ for (const auto& its_instance : its_service.second) { ++ its_instance.second->set_is_in_mainphase(true); + } + } + repetition_phase_timers_.erase(_timer); +@@ -3125,7 +3127,7 @@ service_discovery_impl::stop_offer_service( + bool stop_offer_required(false); + // Delete from initial phase offers + { +- std::lock_guard its_lock(collected_offers_mutex_); ++ std::lock_guard its_lock_inner(collected_offers_mutex_); + if (collected_offers_.size()) { + auto its_service_it = collected_offers_.find(its_service); + if (its_service_it != collected_offers_.end()) { +@@ -3147,7 +3149,7 @@ service_discovery_impl::stop_offer_service( + + // Delete from repetition phase offers + { +- std::lock_guard its_lock(repetition_phase_timers_mutex_); ++ std::lock_guard its_lock_inner(repetition_phase_timers_mutex_); + for (auto rpt = repetition_phase_timers_.begin(); + rpt != repetition_phase_timers_.end();) { + auto its_service_it = rpt->second.find(its_service); +@@ -3866,7 +3868,7 @@ reliability_type_e service_discovery_impl::get_eventgroup_reliability( + << std::setw(4) << _instance << "." + << std::setw(4) << _eventgroup << "]" + << " using reliability type: " +- << std::setw(4) << (uint16_t) its_reliability; ++ << std::setw(4) << static_cast(its_reliability); + its_info->set_reliability(its_reliability); + } + } else { +diff --git a/interface/vsomeip/constants.hpp b/interface/vsomeip/constants.hpp +index 2b040c5e..2519b57f 100644 +--- a/interface/vsomeip/constants.hpp ++++ b/interface/vsomeip/constants.hpp +@@ -13,54 +13,54 @@ + + namespace vsomeip_v3 { + +-const major_version_t DEFAULT_MAJOR = 0x00; +-const minor_version_t DEFAULT_MINOR = 0x00000000; +-const ttl_t DEFAULT_TTL = 0xFFFFFF; // "until next reboot" ++inline constexpr major_version_t DEFAULT_MAJOR = 0x00; ++inline constexpr minor_version_t DEFAULT_MINOR = 0x00000000; ++inline constexpr ttl_t DEFAULT_TTL = 0xFFFFFF; // "until next reboot" + + const std::string DEFAULT_MULTICAST = "224.0.0.0"; +-const uint16_t DEFAULT_PORT = 30500; +-const uint16_t ILLEGAL_PORT = 0xFFFF; +-const uint16_t ANY_PORT = 0; +- +-const uint16_t NO_TRACE_FILTER_EXPRESSION = 0x0000; +- +-const service_t ANY_SERVICE = 0xFFFF; +-const instance_t ANY_INSTANCE = 0xFFFF; +-const eventgroup_t ANY_EVENTGROUP = 0xFFFF; +-const method_t ANY_METHOD = 0xFFFF; +-const major_version_t ANY_MAJOR = 0xFF; +-const minor_version_t ANY_MINOR = 0xFFFFFFFF; +- +-const eventgroup_t DEFAULT_EVENTGROUP = 0x0001; +- +-const client_t ILLEGAL_CLIENT = 0x0000; +-const method_t INVALID_METHOD = 0x0000; +- +-const byte_t MAGIC_COOKIE_CLIENT_MESSAGE = 0x00; +-const byte_t MAGIC_COOKIE_SERVICE_MESSAGE = 0x80; +-const length_t MAGIC_COOKIE_SIZE = 0x00000008; +-const request_t MAGIC_COOKIE_REQUEST = 0xDEADBEEF; +-const client_t MAGIC_COOKIE_CLIENT = 0xDEAD; +-const protocol_version_t MAGIC_COOKIE_PROTOCOL_VERSION = 0x01; +-const interface_version_t MAGIC_COOKIE_INTERFACE_VERSION = 0x01; +-const message_type_e MAGIC_COOKIE_CLIENT_MESSAGE_TYPE = ++inline constexpr uint16_t DEFAULT_PORT = 30500; ++inline constexpr uint16_t ILLEGAL_PORT = 0xFFFF; ++inline constexpr uint16_t ANY_PORT = 0; ++ ++inline constexpr uint16_t NO_TRACE_FILTER_EXPRESSION = 0x0000; ++ ++inline constexpr service_t ANY_SERVICE = 0xFFFF; ++inline constexpr instance_t ANY_INSTANCE = 0xFFFF; ++inline constexpr eventgroup_t ANY_EVENTGROUP = 0xFFFF; ++inline constexpr method_t ANY_METHOD = 0xFFFF; ++inline constexpr major_version_t ANY_MAJOR = 0xFF; ++inline constexpr minor_version_t ANY_MINOR = 0xFFFFFFFF; ++ ++inline constexpr eventgroup_t DEFAULT_EVENTGROUP = 0x0001; ++ ++inline constexpr client_t ILLEGAL_CLIENT = 0x0000; ++inline constexpr method_t INVALID_METHOD = 0x0000; ++ ++inline constexpr byte_t MAGIC_COOKIE_CLIENT_MESSAGE = 0x00; ++inline constexpr byte_t MAGIC_COOKIE_SERVICE_MESSAGE = 0x80; ++inline constexpr length_t MAGIC_COOKIE_SIZE = 0x00000008; ++inline constexpr request_t MAGIC_COOKIE_REQUEST = 0xDEADBEEF; ++inline constexpr client_t MAGIC_COOKIE_CLIENT = 0xDEAD; ++inline constexpr protocol_version_t MAGIC_COOKIE_PROTOCOL_VERSION = 0x01; ++inline constexpr interface_version_t MAGIC_COOKIE_INTERFACE_VERSION = 0x01; ++inline constexpr message_type_e MAGIC_COOKIE_CLIENT_MESSAGE_TYPE = + message_type_e::MT_REQUEST_NO_RETURN; +-const message_type_e MAGIC_COOKIE_SERVICE_MESSAGE_TYPE = ++inline constexpr message_type_e MAGIC_COOKIE_SERVICE_MESSAGE_TYPE = + message_type_e::MT_NOTIFICATION; +-const return_code_e MAGIC_COOKIE_RETURN_CODE = return_code_e::E_OK; ++inline constexpr return_code_e MAGIC_COOKIE_RETURN_CODE = return_code_e::E_OK; + +-const byte_t CLIENT_COOKIE[] = { 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, ++inline constexpr byte_t CLIENT_COOKIE[] = { 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, + 0xDE, 0xAD, 0xBE, 0xEF, 0x01, 0x01, 0x01, 0x00 }; + +-const byte_t SERVICE_COOKIE[] = { 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00, 0x00, ++inline constexpr byte_t SERVICE_COOKIE[] = { 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x08, 0xDE, 0xAD, 0xBE, 0xEF, 0x01, 0x01, 0x02, 0x00 }; + +-const event_t ANY_EVENT = 0xFFFF; +-const client_t ANY_CLIENT = 0xFFFF; ++inline constexpr event_t ANY_EVENT = 0xFFFF; ++inline constexpr client_t ANY_CLIENT = 0xFFFF; + +-const int VSOMEIP_ALL = -1; ++inline constexpr int VSOMEIP_ALL = -1; + +-const pending_security_update_id_t DEFAULT_SECURITY_UPDATE_ID = 0x0; ++inline constexpr pending_security_update_id_t DEFAULT_SECURITY_UPDATE_ID = 0x0; + + } // namespace vsomeip_v3 + +diff --git a/test/network_tests/application_tests/application_test.cpp b/test/network_tests/application_tests/application_test.cpp +index a4a1923d..c70b6cd5 100644 +--- a/test/network_tests/application_tests/application_test.cpp ++++ b/test/network_tests/application_tests/application_test.cpp +@@ -3,6 +3,7 @@ + // License, v. 2.0. If a copy of the MPL was not distributed with this + // file, You can obtain one at http://mozilla.org/MPL/2.0/. + ++#include + #include + #include + #include +diff --git a/tools/vsomeip_ctrl.cpp b/tools/vsomeip_ctrl.cpp +index 74510427..3e74a832 100644 +--- a/tools/vsomeip_ctrl.cpp ++++ b/tools/vsomeip_ctrl.cpp +@@ -29,7 +29,6 @@ public: + instance_(_instance), + app_(vsomeip::runtime::get()->create_application("vsomeip_ctrl")), + wait_service_available_(true), +- send_thread_(std::bind(&vsomeip_sender::send, this)), + service_id_(0x0), + method_id_(0x0), + length_(0), +@@ -39,6 +38,8 @@ public: + return_code_(vsomeip::return_code_e::E_UNKNOWN), + wait_for_answer_(true) + { ++ send_thread_ = std::thread{&vsomeip_sender::send, this}; ++ + if (user_message_.size() < VSOMEIP_PAYLOAD_POS) { + VSOMEIP_ERROR << "Provided message is to short, min. length " + "is 16 Bytes, exiting."; +@@ -117,11 +118,11 @@ public: + << std::setw(4) << _response->get_instance() << "]:"; + VSOMEIP_INFO << "########## begin message"; + VSOMEIP_INFO << std::hex << std::setw(4) << std::setfill('0') +- << _response->get_service() ++ << _response->get_service() + << std::hex << std::setw(4) << std::setfill('0') + << _response->get_method() + << " # service id / instance id"; +- VSOMEIP_INFO << std::hex << std::setw(8) << std::setfill('0') ++ VSOMEIP_INFO << std::hex << std::setw(8) << std::setfill('0') + << _response->get_length() << " # length"; + VSOMEIP_INFO << std::hex << std::setw(4) << std::setfill('0') + << _response->get_client() +@@ -243,7 +244,7 @@ private: + } + + if (use_tcp_ && user_message_.size() > VSOMEIP_MAX_TCP_MESSAGE_SIZE) { +- VSOMEIP_WARNING << "Max allowed message size for TCP is " ++ VSOMEIP_WARNING << "Max allowed message size for TCP is " + << std::dec << VSOMEIP_MAX_TCP_MESSAGE_SIZE + << ". Provided message size is: " << user_message_.size(); + } diff --git a/sources/meta-openembedded/meta-networking/recipes-protocols/vsomeip/vsomeip/0002-network_tests-Include-iomanip-system-header.patch b/sources/meta-openembedded/meta-networking/recipes-protocols/vsomeip/vsomeip/0002-network_tests-Include-iomanip-system-header.patch new file mode 100644 index 00000000..b15c8029 --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-protocols/vsomeip/vsomeip/0002-network_tests-Include-iomanip-system-header.patch @@ -0,0 +1,324 @@ +From 9b806483d804ab335f7161fdd6248ae3e7ae3bde Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 9 Aug 2024 13:50:05 -0700 +Subject: [PATCH 2/2] network_tests: Include iomanip system header + +Latest gcc-14/clang-18 needs this header for setfill and setw + +Upstream-Status: Submitted [https://github.com/COVESA/vsomeip/pull/751] +Signed-off-by: Khem Raj +--- + .../network_tests/big_payload_tests/big_payload_test_service.hpp | 1 + + test/network_tests/cpu_load_tests/cpu_load_test_service.cpp | 1 + + test/network_tests/e2e_tests/e2e_profile_04_test_client.hpp | 1 + + test/network_tests/e2e_tests/e2e_profile_04_test_service.hpp | 1 + + test/network_tests/e2e_tests/e2e_profile_07_test_client.hpp | 1 + + test/network_tests/e2e_tests/e2e_profile_07_test_service.hpp | 1 + + test/network_tests/e2e_tests/e2e_test_client.hpp | 1 + + test/network_tests/e2e_tests/e2e_test_service.hpp | 1 + + test/network_tests/event_tests/event_test_service.cpp | 1 + + .../header_factory_tests/header_factory_test_client.hpp | 1 + + .../header_factory_tests/header_factory_test_service.hpp | 1 + + test/network_tests/npdu_tests/npdu_test_client.hpp | 1 + + test/network_tests/npdu_tests/npdu_test_service.hpp | 1 + + test/network_tests/payload_tests/payload_test_client.hpp | 1 + + test/network_tests/payload_tests/payload_test_service.hpp | 1 + + .../restart_routing_tests/restart_routing_test_client.hpp | 1 + + .../restart_routing_tests/restart_routing_test_service.hpp | 1 + + .../routing_tests/external_local_routing_test_service.hpp | 1 + + test/network_tests/routing_tests/local_routing_test_client.hpp | 1 + + test/network_tests/routing_tests/local_routing_test_service.hpp | 1 + + .../second_address_tests/second_address_test_service.cpp | 1 + + test/network_tests/security_tests/security_test_client.hpp | 1 + + test/network_tests/security_tests/security_test_service.hpp | 1 + + .../suspend_resume_tests/suspend_resume_test_service.cpp | 1 + + 24 files changed, 24 insertions(+) + +diff --git a/test/network_tests/big_payload_tests/big_payload_test_service.hpp b/test/network_tests/big_payload_tests/big_payload_test_service.hpp +index 44af28a9..101b6758 100644 +--- a/test/network_tests/big_payload_tests/big_payload_test_service.hpp ++++ b/test/network_tests/big_payload_tests/big_payload_test_service.hpp +@@ -14,6 +14,7 @@ + #include + #include + #include ++#include + + #include "big_payload_test_globals.hpp" + #include +diff --git a/test/network_tests/cpu_load_tests/cpu_load_test_service.cpp b/test/network_tests/cpu_load_tests/cpu_load_test_service.cpp +index 3d935e39..a98f3edf 100644 +--- a/test/network_tests/cpu_load_tests/cpu_load_test_service.cpp ++++ b/test/network_tests/cpu_load_tests/cpu_load_test_service.cpp +@@ -13,6 +13,7 @@ + #include + #include + #include // for isfinite ++#include + + #include "cpu_load_test_globals.hpp" + #include +diff --git a/test/network_tests/e2e_tests/e2e_profile_04_test_client.hpp b/test/network_tests/e2e_tests/e2e_profile_04_test_client.hpp +index ad002913..82d5e7e2 100644 +--- a/test/network_tests/e2e_tests/e2e_profile_04_test_client.hpp ++++ b/test/network_tests/e2e_tests/e2e_profile_04_test_client.hpp +@@ -14,6 +14,7 @@ + #include + #include + #include ++#include + + class e2e_profile_04_test_client { + public: +diff --git a/test/network_tests/e2e_tests/e2e_profile_04_test_service.hpp b/test/network_tests/e2e_tests/e2e_profile_04_test_service.hpp +index 25617917..17852b85 100644 +--- a/test/network_tests/e2e_tests/e2e_profile_04_test_service.hpp ++++ b/test/network_tests/e2e_tests/e2e_profile_04_test_service.hpp +@@ -17,6 +17,7 @@ + #include + #include + #include ++#include + + class e2e_profile_04_test_service { + public: +diff --git a/test/network_tests/e2e_tests/e2e_profile_07_test_client.hpp b/test/network_tests/e2e_tests/e2e_profile_07_test_client.hpp +index 9b10a589..30d889b5 100644 +--- a/test/network_tests/e2e_tests/e2e_profile_07_test_client.hpp ++++ b/test/network_tests/e2e_tests/e2e_profile_07_test_client.hpp +@@ -14,6 +14,7 @@ + #include + #include + #include ++#include + + class e2e_profile_07_test_client { + public: +diff --git a/test/network_tests/e2e_tests/e2e_profile_07_test_service.hpp b/test/network_tests/e2e_tests/e2e_profile_07_test_service.hpp +index ad6488a5..ea1cc05c 100644 +--- a/test/network_tests/e2e_tests/e2e_profile_07_test_service.hpp ++++ b/test/network_tests/e2e_tests/e2e_profile_07_test_service.hpp +@@ -17,6 +17,7 @@ + #include + #include + #include ++#include + + class e2e_profile_07_test_service { + public: +diff --git a/test/network_tests/e2e_tests/e2e_test_client.hpp b/test/network_tests/e2e_tests/e2e_test_client.hpp +index 10f49784..c253f101 100644 +--- a/test/network_tests/e2e_tests/e2e_test_client.hpp ++++ b/test/network_tests/e2e_tests/e2e_test_client.hpp +@@ -18,6 +18,7 @@ + #include + #include + #include ++#include + + class e2e_test_client { + public: +diff --git a/test/network_tests/e2e_tests/e2e_test_service.hpp b/test/network_tests/e2e_tests/e2e_test_service.hpp +index 7fd1c5a9..e839aacb 100644 +--- a/test/network_tests/e2e_tests/e2e_test_service.hpp ++++ b/test/network_tests/e2e_tests/e2e_test_service.hpp +@@ -16,6 +16,7 @@ + #include + #include + #include ++#include + + class e2e_test_service { + public: +diff --git a/test/network_tests/event_tests/event_test_service.cpp b/test/network_tests/event_tests/event_test_service.cpp +index 3728a827..d1f117e2 100644 +--- a/test/network_tests/event_tests/event_test_service.cpp ++++ b/test/network_tests/event_tests/event_test_service.cpp +@@ -10,6 +10,7 @@ + #include + #include + #include ++#include + + #include + +diff --git a/test/network_tests/header_factory_tests/header_factory_test_client.hpp b/test/network_tests/header_factory_tests/header_factory_test_client.hpp +index 79461b69..b72bbdca 100644 +--- a/test/network_tests/header_factory_tests/header_factory_test_client.hpp ++++ b/test/network_tests/header_factory_tests/header_factory_test_client.hpp +@@ -14,6 +14,7 @@ + #include + #include + #include ++#include + + #include "../someip_test_globals.hpp" + #include +diff --git a/test/network_tests/header_factory_tests/header_factory_test_service.hpp b/test/network_tests/header_factory_tests/header_factory_test_service.hpp +index 7879946a..a553adde 100644 +--- a/test/network_tests/header_factory_tests/header_factory_test_service.hpp ++++ b/test/network_tests/header_factory_tests/header_factory_test_service.hpp +@@ -13,6 +13,7 @@ + #include + #include + #include ++#include + + #include "../someip_test_globals.hpp" + #include +diff --git a/test/network_tests/npdu_tests/npdu_test_client.hpp b/test/network_tests/npdu_tests/npdu_test_client.hpp +index 2f469d40..7f615f14 100644 +--- a/test/network_tests/npdu_tests/npdu_test_client.hpp ++++ b/test/network_tests/npdu_tests/npdu_test_client.hpp +@@ -15,6 +15,7 @@ + #include + #include + #include ++#include + + #include "../npdu_tests/npdu_test_globals.hpp" + #include "../someip_test_globals.hpp" +diff --git a/test/network_tests/npdu_tests/npdu_test_service.hpp b/test/network_tests/npdu_tests/npdu_test_service.hpp +index bef06806..1caae785 100644 +--- a/test/network_tests/npdu_tests/npdu_test_service.hpp ++++ b/test/network_tests/npdu_tests/npdu_test_service.hpp +@@ -15,6 +15,7 @@ + #include + #include + #include ++#include + + class npdu_test_service + { +diff --git a/test/network_tests/payload_tests/payload_test_client.hpp b/test/network_tests/payload_tests/payload_test_client.hpp +index 1bab6ba6..1754320c 100644 +--- a/test/network_tests/payload_tests/payload_test_client.hpp ++++ b/test/network_tests/payload_tests/payload_test_client.hpp +@@ -15,6 +15,7 @@ + #include + #include + #include ++#include + + #include "../someip_test_globals.hpp" + #include +diff --git a/test/network_tests/payload_tests/payload_test_service.hpp b/test/network_tests/payload_tests/payload_test_service.hpp +index 7d3c01d5..06dbb684 100644 +--- a/test/network_tests/payload_tests/payload_test_service.hpp ++++ b/test/network_tests/payload_tests/payload_test_service.hpp +@@ -13,6 +13,7 @@ + #include + #include + #include ++#include + + #include "../someip_test_globals.hpp" + #include +diff --git a/test/network_tests/restart_routing_tests/restart_routing_test_client.hpp b/test/network_tests/restart_routing_tests/restart_routing_test_client.hpp +index 8a7c9e70..6a758318 100644 +--- a/test/network_tests/restart_routing_tests/restart_routing_test_client.hpp ++++ b/test/network_tests/restart_routing_tests/restart_routing_test_client.hpp +@@ -19,6 +19,7 @@ + #include + #include + #include ++#include + + class routing_restart_test_client { + public: +diff --git a/test/network_tests/restart_routing_tests/restart_routing_test_service.hpp b/test/network_tests/restart_routing_tests/restart_routing_test_service.hpp +index 7660b8fc..1fe4d86c 100644 +--- a/test/network_tests/restart_routing_tests/restart_routing_test_service.hpp ++++ b/test/network_tests/restart_routing_tests/restart_routing_test_service.hpp +@@ -16,6 +16,7 @@ + #include + #include + #include ++#include + + class routing_restart_test_service { + public: +diff --git a/test/network_tests/routing_tests/external_local_routing_test_service.hpp b/test/network_tests/routing_tests/external_local_routing_test_service.hpp +index 2499bc84..b1e2dfd8 100644 +--- a/test/network_tests/routing_tests/external_local_routing_test_service.hpp ++++ b/test/network_tests/routing_tests/external_local_routing_test_service.hpp +@@ -13,6 +13,7 @@ + #include + #include + #include ++#include + + #include "../someip_test_globals.hpp" + #include +diff --git a/test/network_tests/routing_tests/local_routing_test_client.hpp b/test/network_tests/routing_tests/local_routing_test_client.hpp +index 09af0bf0..69ee6bfc 100644 +--- a/test/network_tests/routing_tests/local_routing_test_client.hpp ++++ b/test/network_tests/routing_tests/local_routing_test_client.hpp +@@ -14,6 +14,7 @@ + #include + #include + #include ++#include + + #include "../someip_test_globals.hpp" + #include +diff --git a/test/network_tests/routing_tests/local_routing_test_service.hpp b/test/network_tests/routing_tests/local_routing_test_service.hpp +index 109dade4..932423d8 100644 +--- a/test/network_tests/routing_tests/local_routing_test_service.hpp ++++ b/test/network_tests/routing_tests/local_routing_test_service.hpp +@@ -13,6 +13,7 @@ + #include + #include + #include ++#include + + #include "../someip_test_globals.hpp" + #include +diff --git a/test/network_tests/second_address_tests/second_address_test_service.cpp b/test/network_tests/second_address_tests/second_address_test_service.cpp +index fc9d0a28..3ffa493f 100644 +--- a/test/network_tests/second_address_tests/second_address_test_service.cpp ++++ b/test/network_tests/second_address_tests/second_address_test_service.cpp +@@ -9,6 +9,7 @@ + #include + #include + #include ++#include + + #include + #include +diff --git a/test/network_tests/security_tests/security_test_client.hpp b/test/network_tests/security_tests/security_test_client.hpp +index ab3d98b8..bd331138 100644 +--- a/test/network_tests/security_tests/security_test_client.hpp ++++ b/test/network_tests/security_tests/security_test_client.hpp +@@ -18,6 +18,7 @@ + #include + #include + #include ++#include + + class security_test_client { + public: +diff --git a/test/network_tests/security_tests/security_test_service.hpp b/test/network_tests/security_tests/security_test_service.hpp +index 87fb94fd..1f227072 100644 +--- a/test/network_tests/security_tests/security_test_service.hpp ++++ b/test/network_tests/security_tests/security_test_service.hpp +@@ -16,6 +16,7 @@ + #include + #include + #include ++#include + + class security_test_service { + public: +diff --git a/test/network_tests/suspend_resume_tests/suspend_resume_test_service.cpp b/test/network_tests/suspend_resume_tests/suspend_resume_test_service.cpp +index 6f099ce7..dc9df239 100644 +--- a/test/network_tests/suspend_resume_tests/suspend_resume_test_service.cpp ++++ b/test/network_tests/suspend_resume_tests/suspend_resume_test_service.cpp +@@ -7,6 +7,7 @@ + #include + #include + #include ++#include + + #include + diff --git a/sources/meta-openembedded/meta-networking/recipes-protocols/vsomeip/vsomeip_3.4.10.bb b/sources/meta-openembedded/meta-networking/recipes-protocols/vsomeip/vsomeip_3.4.10.bb index 4c389702..36fa196a 100644 --- a/sources/meta-openembedded/meta-networking/recipes-protocols/vsomeip/vsomeip_3.4.10.bb +++ b/sources/meta-openembedded/meta-networking/recipes-protocols/vsomeip/vsomeip_3.4.10.bb @@ -13,6 +13,8 @@ SRC_URI = "git://github.com/GENIVI/${BPN}.git;branch=master;protocol=https;name= file://0003-Do-not-build-external-gtest.patch \ file://0004-Do-not-specify-PIE-flag-explicitly.patch \ file://0005-test-common-CMakeLists.txt-add-missing-link-with-dlt.patch \ + file://0001-Update-to-C-17-560.patch \ + file://0002-network_tests-Include-iomanip-system-header.patch \ " SRCREV = "02c199dff8aba814beebe3ca417fd991058fe90c" diff --git a/sources/meta-openembedded/meta-networking/recipes-protocols/zeroconf/zeroconf_0.9.bb b/sources/meta-openembedded/meta-networking/recipes-protocols/zeroconf/zeroconf_0.9.bb index 61f6b79d..cb266992 100644 --- a/sources/meta-openembedded/meta-networking/recipes-protocols/zeroconf/zeroconf_0.9.bb +++ b/sources/meta-openembedded/meta-networking/recipes-protocols/zeroconf/zeroconf_0.9.bb @@ -32,6 +32,6 @@ do_install () { install -d ${D}${sysconfdir}/network/if-up.d install -d ${D}${sysconfdir}/default install -c -m 755 ${S}/zeroconf ${D}${sbindir}/zeroconf - install -c -m 755 ${WORKDIR}/debian-zeroconf ${D}${sysconfdir}/network/if-up.d/zeroconf - install -c ${WORKDIR}/zeroconf-default ${D}${sysconfdir}/default/zeroconf + install -c -m 755 ${UNPACKDIR}/debian-zeroconf ${D}${sysconfdir}/network/if-up.d/zeroconf + install -c ${UNPACKDIR}/zeroconf-default ${D}${sysconfdir}/default/zeroconf } diff --git a/sources/meta-openembedded/meta-networking/recipes-support/arptables/arptables_git.bb b/sources/meta-openembedded/meta-networking/recipes-support/arptables/arptables_git.bb index 949794bf..f9dd66f6 100644 --- a/sources/meta-openembedded/meta-networking/recipes-support/arptables/arptables_git.bb +++ b/sources/meta-openembedded/meta-networking/recipes-support/arptables/arptables_git.bb @@ -25,7 +25,7 @@ do_install() { oe_runmake install DESTDIR=${D} if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then install -d ${D}${systemd_unitdir}/system - install -m 644 ${WORKDIR}/arptables.service ${D}${systemd_unitdir}/system + install -m 644 ${UNPACKDIR}/arptables.service ${D}${systemd_unitdir}/system fi } diff --git a/sources/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils_1.7.1.bb b/sources/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils_1.7.1.bb index cf0fc1c3..66c8f2d0 100644 --- a/sources/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils_1.7.1.bb +++ b/sources/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils_1.7.1.bb @@ -19,6 +19,8 @@ S = "${WORKDIR}/git" DEPENDS = "sysfsutils" +CVE_PRODUCT = "kernel:bridge-utils" + inherit autotools-brokensep update-alternatives ALTERNATIVE:${PN} = "brctl" diff --git a/sources/meta-openembedded/meta-networking/recipes-support/chrony/chrony_4.5.bb b/sources/meta-openembedded/meta-networking/recipes-support/chrony/chrony_4.5.bb index dbea4062..0681a343 100644 --- a/sources/meta-openembedded/meta-networking/recipes-support/chrony/chrony_4.5.bb +++ b/sources/meta-openembedded/meta-networking/recipes-support/chrony/chrony_4.5.bb @@ -30,7 +30,7 @@ SECTION = "net" LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" -SRC_URI = "https://chrony-project.org/releases/chrony-${PV}.tar.gz \ +SRC_URI = "https://download.tuxfamily.org/chrony/chrony-${PV}.tar.gz \ file://chrony.conf \ file://chronyd \ file://arm_eabi.patch \ @@ -48,7 +48,7 @@ DEPENDS = "pps-tools" inherit update-rc.d systemd pkgconfig # Add chronyd user if privdrop packageconfig is selected -inherit_defer ${@bb.utils.contains('PACKAGECONFIG', 'privdrop', 'useradd', '', d)} +inherit ${@bb.utils.contains('PACKAGECONFIG', 'privdrop', 'useradd', '', d)} USERADD_PACKAGES = "${@bb.utils.contains('PACKAGECONFIG', 'privdrop', '${PN}', '', d)}" USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'privdrop', '--system -d / -M --shell /bin/nologin chronyd;', '', d)}" @@ -90,7 +90,7 @@ do_install() { # Config file install -d ${D}${sysconfdir} - install -m 644 ${WORKDIR}/chrony.conf ${D}${sysconfdir} + install -m 644 ${UNPACKDIR}/chrony.conf ${D}${sysconfdir} if ${@bb.utils.contains('PACKAGECONFIG', 'privdrop', 'true', 'false', d)}; then echo "# Define user to drop to after dropping root privileges" >> ${D}${sysconfdir}/chrony.conf echo "user chronyd" >> ${D}${sysconfdir}/chrony.conf @@ -98,7 +98,7 @@ do_install() { # System V init script install -d ${D}${sysconfdir}/init.d - install -m 755 ${WORKDIR}/chronyd ${D}${sysconfdir}/init.d + install -m 755 ${UNPACKDIR}/chronyd ${D}${sysconfdir}/init.d # systemd unit configuration file install -d ${D}${systemd_unitdir}/system diff --git a/sources/meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema-docs_2.40.0.bb b/sources/meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema-docs_2.40.0.bb index 62daf327..86f6a0df 100644 --- a/sources/meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema-docs_2.40.0.bb +++ b/sources/meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema-docs_2.40.0.bb @@ -9,7 +9,7 @@ SRC_URI = "http://dmtf.org/sites/default/files/cim/cim_schema_v2400/cim_schema_$ " SRC_URI[md5sum] = "3d01940bc1085c6c42184c25fb61f739" SRC_URI[sha256sum] = "3174cf0f8657b19d80dc59e184778d8e553da424728cb2966fe9d5428dd84267" -LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=eecc6f71a56ff3caf17f15bf7aeac7b4" +LIC_FILES_CHKSUM = "file://${UNPACKDIR}/LICENSE;md5=eecc6f71a56ff3caf17f15bf7aeac7b4" do_install() { install -d -m 0755 ${D}${datadir}/doc/cim-schema-${PV}-docs diff --git a/sources/meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema-exper_2.50.0.bb b/sources/meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema-exper_2.50.0.bb index 7d51bc1c..45eee8f1 100644 --- a/sources/meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema-exper_2.50.0.bb +++ b/sources/meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema-exper_2.50.0.bb @@ -9,12 +9,12 @@ SRC_URI = "http://dmtf.org/sites/default/files/cim/cim_schema_v2500/cim_schema_$ " SRC_URI[md5sum] = "ee4ad6441a2b65ca60a3abc53e3ec629" SRC_URI[sha256sum] = "a44d67881325e267ef46b72eabe0c69f90470b1033b1ce7c26d9ba99072adb50" -LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=eecc6f71a56ff3caf17f15bf7aeac7b4" +LIC_FILES_CHKSUM = "file://${UNPACKDIR}/LICENSE;md5=eecc6f71a56ff3caf17f15bf7aeac7b4" do_install() { install -d -m 0755 ${D}${datadir}/mof/cimv${PV}/ install -d -m 0755 ${D}${datadir}/doc/cim-schema-${PV} - install -m 644 ${WORKDIR}/LICENSE ${D}${datadir}/doc/cim-schema-${PV} + install -m 644 ${UNPACKDIR}/LICENSE ${D}${datadir}/doc/cim-schema-${PV} cp -R --no-dereference --preserve=mode,links -v ${S}/* ${D}${datadir}/mof/cimv${PV}/ chown -R root:root ${D}${datadir}/mof/cimv${PV} diff --git a/sources/meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema-final_2.40.0.bb b/sources/meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema-final_2.40.0.bb index 32bd8acb..d046622d 100644 --- a/sources/meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema-final_2.40.0.bb +++ b/sources/meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema-final_2.40.0.bb @@ -9,12 +9,12 @@ SRC_URI = "http://dmtf.org/sites/default/files/cim/cim_schema_v2400/cim_schema_$ " SRC_URI[md5sum] = "a9bdf17c7374e3b5b7adeaac4842c4ad" SRC_URI[sha256sum] = "dbfa3064ea427acd71a4bebbc172ca2dc44b0b09a6d83b0945b9ffa988a9058a" -LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=eecc6f71a56ff3caf17f15bf7aeac7b4" +LIC_FILES_CHKSUM = "file://${UNPACKDIR}/LICENSE;md5=eecc6f71a56ff3caf17f15bf7aeac7b4" do_install() { install -d -m 0755 ${D}${datadir}/mof/cimv${PV}/ install -d -m 0755 ${D}${datadir}/doc/cim-schema-${PV} - install -m 644 ${WORKDIR}/LICENSE ${D}${datadir}/doc/cim-schema-${PV} + install -m 644 ${UNPACKDIR}/LICENSE ${D}${datadir}/doc/cim-schema-${PV} cp -R --no-dereference --preserve=mode,links -v ${S}/* ${D}${datadir}/mof/cimv${PV}/ chown -R root:root ${D}${datadir}/mof/cimv${PV}/ diff --git a/sources/meta-openembedded/meta-networking/recipes-support/curlpp/curlpp/0002-fix-invalid-conversion-from-int-to-CURLoption.patch b/sources/meta-openembedded/meta-networking/recipes-support/curlpp/curlpp/0002-fix-invalid-conversion-from-int-to-CURLoption.patch new file mode 100644 index 00000000..1712a534 --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-support/curlpp/curlpp/0002-fix-invalid-conversion-from-int-to-CURLoption.patch @@ -0,0 +1,36 @@ +From ebe9144fdfdc8154661b93322cec4a1c43aa75ff Mon Sep 17 00:00:00 2001 +From: alperak +Date: Tue, 1 Oct 2024 19:45:38 +0300 +Subject: [PATCH] Fix invalid conversion from int to CURLoption + +Options.hpp:281:74: error: invalid conversion from 'int' to 'CURLoption' [-fpermissive] + 281 | typedef curlpp::OptionTrait ClosePolicy; + | ^ + | | + | int + +Fix invalid conversion by adding explicit cast to CURLoption + +Upstream-Status: Pending + +Signed-off-by: alperak +--- + include/curlpp/Options.hpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/curlpp/Options.hpp b/include/curlpp/Options.hpp +index c705c9d..7c9a501 100644 +--- a/include/curlpp/Options.hpp ++++ b/include/curlpp/Options.hpp +@@ -278,7 +278,7 @@ namespace options + typedef curlpp::OptionTrait LowSpeedLimit; + typedef curlpp::OptionTrait LowSpeedTime; + typedef curlpp::OptionTrait MaxConnects; +- typedef curlpp::OptionTrait ClosePolicy; ++ typedef curlpp::OptionTrait ClosePolicy; + typedef curlpp::OptionTrait FreshConnect; + typedef curlpp::OptionTrait ForbidReuse; + typedef curlpp::OptionTrait ConnectTimeout; +-- +2.25.1 + diff --git a/sources/meta-openembedded/meta-networking/recipes-support/curlpp/curlpp_0.8.1.bb b/sources/meta-openembedded/meta-networking/recipes-support/curlpp/curlpp_0.8.1.bb index 131f1873..cacdc977 100644 --- a/sources/meta-openembedded/meta-networking/recipes-support/curlpp/curlpp_0.8.1.bb +++ b/sources/meta-openembedded/meta-networking/recipes-support/curlpp/curlpp_0.8.1.bb @@ -8,7 +8,8 @@ DEPENDS = "curl" DEPENDS:class-native = "curl-native" SRC_URI = "git://github.com/jpbarrette/curlpp.git;branch=master;protocol=https \ - file://0001-curlpp-config.in-Remove-references-to-absolute-build.patch" + file://0001-curlpp-config.in-Remove-references-to-absolute-build.patch \ + file://0002-fix-invalid-conversion-from-int-to-CURLoption.patch" SRCREV = "592552a165cc569dac7674cb7fc9de3dc829906f" diff --git a/sources/meta-openembedded/meta-networking/recipes-support/dnsmasq/dnsmasq_2.90.bb b/sources/meta-openembedded/meta-networking/recipes-support/dnsmasq/dnsmasq_2.90.bb index 38fa271d..ba783d03 100644 --- a/sources/meta-openembedded/meta-networking/recipes-support/dnsmasq/dnsmasq_2.90.bb +++ b/sources/meta-openembedded/meta-networking/recipes-support/dnsmasq/dnsmasq_2.90.bb @@ -12,7 +12,6 @@ DEPENDS += "gettext-native" #at least versions 2.69 and prior are moved to the archive folder on the server SRC_URI = "http://www.thekelleys.org.uk/dnsmasq/${@['archive/', ''][float(d.getVar('PV').split('.')[1]) > 69]}dnsmasq-${PV}.tar.gz \ file://init \ - file://dnsmasq.conf \ file://dnsmasq-resolvconf.service \ file://dnsmasq-noresolvconf.service \ file://dnsmasq-resolved.conf \ @@ -25,8 +24,13 @@ INITSCRIPT_NAME = "dnsmasq" INITSCRIPT_PARAMS = "defaults" # dnsmasq defaults -PACKAGECONFIG ?= "auth dhcp dhcp6 dumpfile inotify ipset loop script tftp" +PACKAGECONFIG ?= "\ + auth dhcp dumpfile inotify ipset loop script tftp \ + ${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'dhcp6', '', d)} \ + ${@bb.utils.contains('MACHINE_FEATURES', 'rtc', '', 'broken-rtc', d)} \ +" +# see src/config.h PACKAGECONFIG[auth] = "-DHAVE_AUTH,-DNO_AUTH" PACKAGECONFIG[broken-rtc] = "-DHAVE_BROKEN_RTC," PACKAGECONFIG[conntrack] = "-DHAVE_CONNTRACK,,libnetfilter-conntrack" @@ -81,20 +85,20 @@ do_install () { "MANDIR=${D}${mandir}" \ install-i18n install -d ${D}${sysconfdir}/ ${D}${sysconfdir}/init.d ${D}${sysconfdir}/dnsmasq.d - install -m 644 ${WORKDIR}/dnsmasq.conf ${D}${sysconfdir}/ - install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/dnsmasq + install -m 644 ${S}/dnsmasq.conf.example ${D}${sysconfdir}/dnsmasq.conf + install -m 755 ${UNPACKDIR}/init ${D}${sysconfdir}/init.d/dnsmasq install -d ${D}${systemd_unitdir}/system if [ "${@bb.utils.filter('PACKAGECONFIG', 'resolvconf', d)}" ]; then - install -m 0644 ${WORKDIR}/dnsmasq-resolvconf.service ${D}${systemd_unitdir}/system/dnsmasq.service + install -m 0644 ${UNPACKDIR}/dnsmasq-resolvconf.service ${D}${systemd_unitdir}/system/dnsmasq.service else - install -m 0644 ${WORKDIR}/dnsmasq-noresolvconf.service ${D}${systemd_unitdir}/system/dnsmasq.service + install -m 0644 ${UNPACKDIR}/dnsmasq-noresolvconf.service ${D}${systemd_unitdir}/system/dnsmasq.service fi if [ "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" ]; then install -d ${D}${sysconfdir}/systemd/resolved.conf.d/ - install -m 0644 ${WORKDIR}/dnsmasq-resolved.conf ${D}${sysconfdir}/systemd/resolved.conf.d/ + install -m 0644 ${UNPACKDIR}/dnsmasq-resolved.conf ${D}${sysconfdir}/systemd/resolved.conf.d/ fi if [ "${@bb.utils.filter('PACKAGECONFIG', 'dhcp', d)}" ]; then @@ -113,11 +117,11 @@ do_install () { if [ "${@bb.utils.filter('PACKAGECONFIG', 'resolvconf', d)}" ]; then install -d ${D}${sysconfdir}/resolvconf/update.d/ - install -m 0755 ${WORKDIR}/dnsmasq.resolvconf ${D}${sysconfdir}/resolvconf/update.d/dnsmasq + install -m 0755 ${UNPACKDIR}/dnsmasq.resolvconf ${D}${sysconfdir}/resolvconf/update.d/dnsmasq install -d ${D}${sysconfdir}/default/volatiles - install -m 0644 ${WORKDIR}/99_dnsmasq ${D}${sysconfdir}/default/volatiles - install -m 0755 ${WORKDIR}/dnsmasq-resolvconf-helper ${D}${bindir} + install -m 0644 ${UNPACKDIR}/99_dnsmasq ${D}${sysconfdir}/default/volatiles + install -m 0755 ${UNPACKDIR}/dnsmasq-resolvconf-helper ${D}${bindir} fi } diff --git a/sources/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/dnsmasq.conf b/sources/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/dnsmasq.conf deleted file mode 100755 index 2897b903..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/dnsmasq.conf +++ /dev/null @@ -1,298 +0,0 @@ -# Configuration file for dnsmasq. -# -# Format is one option per line, legal options are the same -# as the long options legal on the command line. See -# "/usr/bin/dnsmasq --help" or "man 8 dnsmasq" for details. - -# Listen on this specific port instead of the standard DNS port -# (53). Setting this to zero completely disables DNS function, -# leaving only DHCP and/or TFTP. -#port=5353 - -# Change these lines if you want dnsmasq to serve MX records. -# Only one of mx-host and mx-target need be set, the other defaults -# to the name of the host running dnsmasq. -#mx-host= -#mx-target= -#selfmx -#localmx - -# The following two options make you a better netizen, since they -# tell dnsmasq to filter out queries which the public DNS cannot -# answer, and which load the servers (especially the root servers) -# uneccessarily. If you have a dial-on-demand link they also stop -# these requests from bringing up the link uneccessarily. - -# Never forward plain names (with a dot or domain part) -domain-needed -# Never forward addresses in the non-routed address spaces. -bogus-priv - - -# Uncomment this to filter useless windows-originated DNS requests -# which can trigger dial-on-demand links needlessly. -# Note that (amongst other things) this blocks all SRV requests, -# so don't use it if you use eg Kerberos. -#filterwin2k - -# Change this line if you want dns to get its upstream servers from -# somewhere other that /etc/resolv.conf -#resolv-file= - -# By default, dnsmasq will send queries to any of the upstream -# servers it knows about and tries to favour servers to are known -# to be up. Uncommenting this forces dnsmasq to try each query -# with each server strictly in the order they appear in -# /etc/resolv.conf -#strict-order - -# If you don't want dnsmasq to read /etc/resolv.conf or any other -# file, getting its servers for this file instead (see below), then -# uncomment this -#no-resolv - -# If you don't want dnsmasq to poll /etc/resolv.conf or other resolv -# files for changes and re-read them then uncomment this. -#no-poll - -# Add other name servers here, with domain specs if they are for -# non-public domains. -#server=/localnet/192.168.0.1 - -# Add local-only domains here, queries in these domains are answered -# from /etc/hosts or DHCP only. -#local=/localnet/ - -# Add domains which you want to force to an IP address here. -# The example below send any host in doubleclick.net to a local -# webserver. -#address=/doubleclick.net/127.0.0.1 - -# You no longer (as of version 1.7) need to set these to enable -# dnsmasq to read /etc/ppp/resolv.conf since dnsmasq now uses the -# "dip" group to achieve this. -#user= -#group= - -# If you want dnsmasq to listen for requests only on specified interfaces -# (and the loopback) give the name of the interface (eg eth0) here. -# Repeat the line for more than one interface. -#interface= -# Or you can specify which interface _not_ to listen on -#except-interface= -# Or which to listen on by address (remember to include 127.0.0.1 if -# you use this.) -#listen-address=127.0.0.1 - -# On systems which support it, dnsmasq binds the wildcard address, -# even when it is listening on only some interfaces. It then discards -# requests that it shouldn't reply to. This has the advantage of -# working even when interfaces come and go and change address. If you -# want dnsmasq to really bind only the interfaces it is listening on, -# uncomment this option. About the only time you may need this is when -# running another nameserver on the same machine. -#bind-interfaces - -# If you don't want dnsmasq to read /etc/hosts, uncomment the -# following line. -#no-hosts -# or if you want it to read another file, as well as /etc/hosts, use -# this. -#addn-hosts=/etc/banner_add_hosts - -# Set this (and domain: see below) if you want to have a domain -# automatically added to simple names in a hosts-file. -#expand-hosts - -# Set the domain for dnsmasq. this is optional, but if it is set, it -# does the following things. -# 1) Allows DHCP hosts to have fully qualified domain names, as long -# as the domain part matches this setting. -# 2) Sets the "domain" DHCP option thereby potentially setting the -# domain of all systems configured by DHCP -# 3) Provides the domain part for "expand-hosts" -#domain=thekelleys.org.uk - -# Uncomment this to enable the integrated DHCP server, you need -# to supply the range of addresses available for lease and optionally -# a lease time. If you have more than one network, you will need to -# repeat this for each network on which you want to supply DHCP -# service. -#dhcp-range=192.168.0.50,192.168.0.150,12h -#dhcp-range=10.0.0.10,10.0.0.200,2h - -# This is an example of a DHCP range where the netmask is given. This -# is needed for networks we reach the dnsmasq DHCP server via a relay -# agent. If you don't know what a DHCP relay agent is, you probably -# don't need to worry about this. -#dhcp-range=192.168.0.50,192.168.0.150,255.255.255.0,12h - -# This is an example of a DHCP range with a network-id, so that -# some DHCP options may be set only for this network. -#dhcp-range=red,192.168.0.50,192.168.0.150 - -# Supply parameters for specified hosts using DHCP. There are lots -# of valid alternatives, so we will give examples of each. Note that -# IP addresses DO NOT have to be in the range given above, they just -# need to be on the same network. The order of the parameters in these -# do not matter, it's permissble to give name,adddress and MAC in any order - -# Always allocate the host with ethernet address 11:22:33:44:55:66 -# The IP address 192.168.0.60 -#dhcp-host=11:22:33:44:55:66,192.168.0.60 - -# Always set the name of the host with hardware address -# 11:22:33:44:55:66 to be "fred" -#dhcp-host=11:22:33:44:55:66,fred - -# Always give the host with ethernet address 11:22:33:44:55:66 -# the name fred and IP address 192.168.0.60 and lease time 45 minutes -#dhcp-host=11:22:33:44:55:66,fred,192.168.0.60,45m - -# Give the machine which says it's name is "bert" IP address -# 192.168.0.70 and an infinite lease -#dhcp-host=bert,192.168.0.70,infinite - -# Always give the host with client identifier 01:02:02:04 -# the IP address 192.168.0.60 -#dhcp-host=id:01:02:02:04,192.168.0.60 - -# Always give the host with client identifier "marjorie" -# the IP address 192.168.0.60 -#dhcp-host=id:marjorie,192.168.0.60 - -# Enable the address given for "judge" in /etc/hosts -# to be given to a machine presenting the name "judge" when -# it asks for a DHCP lease. -#dhcp-host=judge - -# Never offer DHCP service to a machine whose ethernet -# address is 11:22:33:44:55:66 -#dhcp-host=11:22:33:44:55:66,ignore - -# Ignore any client-id presented by the machine with ethernet -# address 11:22:33:44:55:66. This is useful to prevent a machine -# being treated differently when running under different OS's or -# between PXE boot and OS boot. -#dhcp-host=11:22:33:44:55:66,id:* - -# Send extra options which are tagged as "red" to -# the machine with ethernet address 11:22:33:44:55:66 -#dhcp-host=11:22:33:44:55:66,net:red - -# Send extra options which are tagged as "red" to any machine whose -# DHCP vendorclass string includes the substring "Linux" -#dhcp-vendorclass=red,Linux - -# Send extra options which are tagged as "red" to any machine one -# of whose DHCP userclass strings includes the substring "accounts" -#dhcp-userclass=red,accounts - -# If this line is uncommented, dnsmasq will read /etc/ethers and act -# on the ethernet-address/IP pairs found there just as if they had -# been given as --dhcp-host options. Useful if you keep -# MAC-address/host mappings there for other purposes. -#read-ethers - -# Send options to hosts which ask for a DHCP lease. -# See RFC 2132 for details of available options. -# Note that all the common settings, such as netmask and -# broadcast address, DNS server and default route, are given -# sane defaults by dnsmasq. You very likely will not need any -# any dhcp-options. If you use Windows clients and Samba, there -# are some options which are recommended, they are detailed at the -# end of this section. -# For reference, the common options are: -# subnet mask - 1 -# default router - 3 -# DNS server - 6 -# broadcast address - 28 - -# Set the NTP time server addresses to 192.168.0.4 and 10.10.0.5 -#dhcp-option=42,192.168.0.4,10.10.0.5 - -# Set the NTP time server address to be the same machine as -# is running dnsmasq -#dhcp-option=42,0.0.0.0 - -# Set the NIS domain name to "welly" -#dhcp-option=40,welly - -# Set the default time-to-live to 50 -#dhcp-option=23,50 - -# Set the "all subnets are local" flag -#dhcp-option=27,1 - -# Send the etherboot magic flag and then etherboot options (a string). -#dhcp-option=128,e4:45:74:68:00:00 -#dhcp-option=129,NIC=eepro100 - -# Specify an option which will only be sent to the "red" network -# (see dhcp-range for the declaration of the "red" network) -#dhcp-option=red,42,192.168.1.1 - -# The following DHCP options set up dnsmasq in the same way as is specified -# for the ISC dhcpcd in -# http://www.samba.org/samba/ftp/docs/textdocs/DHCP-Server-Configuration.txt -# adapted for a typical dnsmasq installation where the host running -# dnsmasq is also the host running samba. -# you may want to uncomment them if you use Windows clients and Samba. -#dhcp-option=19,0 # option ip-forwarding off -#dhcp-option=44,0.0.0.0 # set netbios-over-TCP/IP nameserver(s) aka WINS server(s) -#dhcp-option=45,0.0.0.0 # netbios datagram distribution server -#dhcp-option=46,8 # netbios node type -#dhcp-option=47 # empty netbios scope. - - -# Set the boot filename and tftpd server name and address -# for BOOTP. You will only need this is you want to -# boot machines over the network. -#dhcp-boot=/var/ftpd/pxelinux.0,boothost,192.168.0.3 - -# Set the limit on DHCP leases, the default is 150 -#dhcp-lease-max=150 - -# The DHCP server needs somewhere on disk to keep its lease database. -# This defaults to a sane location, but if you want to change it, use -# the line below. -#dhcp-leasefile=/var/lib/misc/dnsmasq.leases - -# Set the cachesize here. -#cache-size=150 - -# If you want to disable negative caching, uncomment this. -#no-negcache - -# Normally responses which come form /etc/hosts and the DHCP lease -# file have Time-To-Live set as zero, which conventionally means -# do not cache further. If you are happy to trade lower load on the -# server for potentially stale date, you can set a time-to-live (in -# seconds) here. -#local-ttl= - -# If you want dnsmasq to detect attempts by Verisign to send queries -# to unregistered .com and .net hosts to its sitefinder service and -# have dnsmasq instead return the correct NXDOMAIN response, uncomment -# this line. You can add similar lines to do the same for other -# registries which have implemented wildcard A records. -#bogus-nxdomain=64.94.110.11 - -# If you want to fix up DNS results from upstream servers, use the -# alias option. This only works for IPv4. -# This alias makes a result of 1.2.3.4 appear as 5.6.7.8 -#alias=1.2.3.4,5.6.7.8 -# and this maps 1.2.3.x to 5.6.7.x -#alias=1.2.3.0,5.6.7.0,255.255.255.0 - -# For debugging purposes, log each DNS query as it passes through -# dnsmasq. -#log-queries - -# Include a another lot of configuration options. -#conf-file=/etc/dnsmasq.more.conf - - - - - diff --git a/sources/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot_2.3.21.bb b/sources/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot_2.3.21.bb index 17fbd789..4e76d245 100644 --- a/sources/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot_2.3.21.bb +++ b/sources/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot_2.3.21.bb @@ -50,9 +50,10 @@ SYSTEMD_AUTO_ENABLE = "disable" do_install:append () { rm -rf ${D}${libdir}/dovecot/dovecot-config install -d 755 ${D}/etc/dovecot - touch 644 ${D}/etc/dovecot/dovecot.conf + touch ${D}/etc/dovecot/dovecot.conf + chmod 644 ${D}/etc/dovecot/dovecot.conf if [ "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" ]; then - install -m 0644 ${WORKDIR}/dovecot.service ${D}${systemd_unitdir}/system + install -m 0644 ${UNPACKDIR}/dovecot.service ${D}${systemd_unitdir}/system sed -i -e 's#@SYSCONFDIR@#${sysconfdir}#g' ${D}${systemd_unitdir}/system/dovecot.service sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/dovecot.service fi diff --git a/sources/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils/0001-configure.ac-Add-an-option-to-disable-host-udev-vers.patch b/sources/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils/0001-configure.ac-Add-an-option-to-disable-host-udev-vers.patch deleted file mode 100644 index b98e1e70..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils/0001-configure.ac-Add-an-option-to-disable-host-udev-vers.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 61991db099f66348dddbc3408e7ee8c05bda85cb Mon Sep 17 00:00:00 2001 -From: Yoann Congal -Date: Sat, 2 Mar 2024 16:23:07 +0100 -Subject: [PATCH] configure.ac: Add an option to disable host udev version - checks - -In cross-compilation environment, the build host might have an outdated -udev or no udev at all. But the user may still want to build with the -enabled udev rule (for its udev-enabled target). - -This patch adds a "--disable-udevchecks" option the disable build host -udev version check at configure-time and unconditionally install the -enabled udev rule. Without this new option, the behavior stays the same -(checks enabled). - -Signed-off-by: Yoann Congal -Upstream-Status: Backport [https://github.com/LINBIT/drbd-utils/commit/f2b5a7335ae52109dfb95a9d99ae20519c43d59a] ---- - configure.ac | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -diff --git a/configure.ac b/configure.ac -index f1d69ea3..4c56d33b 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -71,6 +71,11 @@ AC_ARG_WITH([udev], - [AS_HELP_STRING([--with-udev], - [Enable udev integration])], - [WITH_UDEV=$withval]) -+AC_ARG_ENABLE([udevchecks], -+ [AS_HELP_STRING([--disable-udevchecks], -+ [Disable host udev version checks])], -+ [], -+ [enable_udevchecks=yes]) - AC_ARG_WITH([xen], - [AS_HELP_STRING([--with-xen], - [Enable Xen integration])], -@@ -315,7 +320,7 @@ if test -z $GIT; then - AC_MSG_WARN(Cannot update buildtag without git. You may safely ignore this warning when building from a tarball.) - fi - --if test $UDEVADM = false && test $UDEVINFO = false; then -+if test "x$enable_udevchecks" != "xno" && test $UDEVADM = false && test $UDEVINFO = false; then - if test "$WITH_UDEV" = "yes"; then - AC_MSG_WARN([udev support enabled, but neither udevadm nor udevinfo found on this system.]) - fi -@@ -423,7 +428,7 @@ else - test -z $INITDIR && INITDIR="$sysconfdir/init.d" - - dnl Our udev rules file is known to work only with udev >= 85 -- if test "$WITH_UDEV" = "yes"; then -+ if test "x$enable_udevchecks" != "xno" && test "$WITH_UDEV" = "yes"; then - udev_version=$( set -- $($UDEVADM version); echo $1 ) - if test -z "$udev_version"; then - udev_version=$( set -- $($UDEVINFO -V); echo $3 ) diff --git a/sources/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils/0001-drbd-utils-support-usrmerge.patch b/sources/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils/0001-drbd-utils-support-usrmerge.patch index 27f0a9b5..ef0229d5 100644 --- a/sources/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils/0001-drbd-utils-support-usrmerge.patch +++ b/sources/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils/0001-drbd-utils-support-usrmerge.patch @@ -1,4 +1,4 @@ -From 264ae7b062ac52a5545a8a562b51001f7ce7369d Mon Sep 17 00:00:00 2001 +From 9109f15f5b8ae142823194b9ef50c392615fe38d Mon Sep 17 00:00:00 2001 From: Changqing Li Date: Thu, 21 Apr 2022 17:22:35 +0800 Subject: [PATCH] drbd-utils: support usermerge @@ -16,15 +16,14 @@ Signed-off-by: Sakib Sajal scripts/drbd.service | 6 +++--- scripts/drbd@.service | 6 +++--- scripts/ocf.ra@.service | 4 ++-- - user/v83/Makefile.in | 14 +++++++------- user/v84/Makefile.in | 14 +++++++------- - 10 files changed, 32 insertions(+), 32 deletions(-) + 9 files changed, 25 insertions(+), 25 deletions(-) diff --git a/configure.ac b/configure.ac -index f1d69ea3..3289ac7d 100644 +index d3ec5ff1..910232b1 100644 --- a/configure.ac +++ b/configure.ac -@@ -183,7 +183,7 @@ AC_ARG_WITH(tmpfilesdir, +@@ -178,7 +178,7 @@ AC_ARG_WITH(tmpfilesdir, AC_SUBST(tmpfilesdir) # set default early @@ -34,10 +33,10 @@ index f1d69ea3..3289ac7d 100644 test x"$with_udev" = xyes ; then if test x"$PKG_CONFIG" != x; then diff --git a/scripts/Makefile.in b/scripts/Makefile.in -index aca15a22..a1cd2ffe 100644 +index 15a26f37..ff028310 100644 --- a/scripts/Makefile.in +++ b/scripts/Makefile.in -@@ -91,11 +91,11 @@ ifeq ($(subst both,systemd,$(initscripttype)),systemd) +@@ -90,11 +90,11 @@ ifeq ($(subst both,systemd,$(initscripttype)),systemd) install -d $(DESTDIR)$(systemdunitdir) install -m 644 $(SYSTEMD_UNITS) $(DESTDIR)$(systemdunitdir)/ install -m 644 $(SYSTEMD_TEMPLATES) $(DESTDIR)$(systemdunitdir)/ @@ -137,37 +136,6 @@ index 9c2268a6..1666c482 100644 -ExecStopPost=/lib/drbd/scripts/ocf.ra.wrapper.sh stop %n +ExecStart=@nonarch_libdir@/drbd/scripts/ocf.ra.wrapper.sh start-and-monitor %n +ExecStopPost=@nonarch_libdir@/drbd/scripts/ocf.ra.wrapper.sh stop %n -diff --git a/user/v83/Makefile.in b/user/v83/Makefile.in -index 08cfe574..4c4971b6 100644 ---- a/user/v83/Makefile.in -+++ b/user/v83/Makefile.in -@@ -96,19 +96,19 @@ install: - ifeq ($(WITH_83_SUPPORT),yes) - install -d $(DESTDIR)$(localstatedir)/lib/drbd - install -d $(DESTDIR)$(localstatedir)/lock -- install -d $(DESTDIR)/lib/drbd/ -+ install -d $(DESTDIR)/${nonarch_libdir}/drbd/ - if getent group haclient > /dev/null 2> /dev/null ; then \ -- install -g haclient -m 4750 drbdsetup-83 $(DESTDIR)/lib/drbd/ ; \ -- install -m 755 drbdadm-83 $(DESTDIR)/lib/drbd/ ; \ -+ install -g haclient -m 4750 drbdsetup-83 $(DESTDIR)/${nonarch_libdir}/drbd/ ; \ -+ install -m 755 drbdadm-83 $(DESTDIR)/${nonarch_libdir}/drbd/ ; \ - else \ -- install -m 755 drbdsetup-83 $(DESTDIR)/lib/drbd/ ; \ -- install -m 755 drbdadm-83 $(DESTDIR)/lib/drbd/ ; \ -+ install -m 755 drbdsetup-83 $(DESTDIR)/${nonarch_libdir}/drbd/ ; \ -+ install -m 755 drbdadm-83 $(DESTDIR)/${nonarch_libdir}/drbd/ ; \ - fi - endif - - uninstall: -- rm -f $(DESTDIR)/lib/drbd/drbdsetup-83 -- rm -f $(DESTDIR)/lib/drbd/drbdadm-83 -+ rm -f $(DESTDIR)/${nonarch_libdir}/drbd/drbdsetup-83 -+ rm -f $(DESTDIR)/${nonarch_libdir}/drbd/drbdadm-83 - - .PHONY: install uninstall clean distclean - ../../configure: diff --git a/user/v84/Makefile.in b/user/v84/Makefile.in index 0fcefc5f..81f7d5ec 100644 --- a/user/v84/Makefile.in @@ -199,3 +167,6 @@ index 0fcefc5f..81f7d5ec 100644 spell: for f in drbdadm_adjust.c drbdadm_main.c drbdadm_parser.c drbdadm_usage_cnt.c drbdsetup.c drbdtool_common.c; do \ +-- +2.25.1 + diff --git a/sources/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils_9.27.0.bb b/sources/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils_9.27.0.bb deleted file mode 100644 index 63f0fd18..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils_9.27.0.bb +++ /dev/null @@ -1,76 +0,0 @@ -SUMMARY = "Distributed block device driver for Linux" -DESCRIPTION = "DRBD mirrors a block device over the network to another machine.\ -Think of it as networked raid 1. It is a building block for\ -setting up high availability (HA) clusters." -HOMEPAGE = "http://www.drbd.org/" -SECTION = "admin" -LICENSE = "GPL-2.0-or-later" -LIC_FILES_CHKSUM = "file://COPYING;md5=5574c6965ae5f583e55880e397fbb018" - -SRC_URI = "git://github.com/LINBIT/drbd-utils;name=drbd-utils;branch=master;protocol=https \ - git://github.com/LINBIT/drbd-headers;name=drbd-headers;destsuffix=git/drbd-headers;branch=master;protocol=https \ - file://0001-drbdmon-add-LDFLAGS-when-linking.patch \ - ${@bb.utils.contains('DISTRO_FEATURES','usrmerge','file://0001-drbd-utils-support-usrmerge.patch','',d)} \ - file://0001-configure.ac-Add-an-option-to-disable-host-udev-vers.patch \ - " -SRCREV_drbd-utils = "fdd9a4d603a9dc99d110d8bd0e288d7c0b6f586e" -SRCREV_drbd-headers = "0349f00825b4198d4ec3248f43884114a187676a" - -SRCREV_FORMAT = "drbd-utils_drbd-headers" - -S = "${WORKDIR}/git" - -UPSTREAM_CHECK_URI = "https://github.com/LINBIT/drbd-utils/releases" - -SYSTEMD_SERVICE:${PN} = "drbd.service" -SYSTEMD_AUTO_ENABLE = "disable" - -DEPENDS = "flex-native keyutils" - -inherit autotools-brokensep systemd - -# -Wunused-but-set-variable -Wunused-const-variable -Winconsistent-missing-override -CPPFLAGS:append = " -Wno-error" - -EXTRA_OECONF = " \ - --with-initdir=/etc/init.d \ - --without-pacemaker \ - --without-rgmanager \ - --without-bashcompletion \ - --with-distro debian \ - --with-initscripttype=both \ - --with-systemdunitdir=${systemd_unitdir}/system \ - --without-manual \ - --disable-udevchecks \ - " - -# If we have inherited reproducible_build, we want to use it. -export WANT_DRBD_REPRODUCIBLE_BUILD = "yes" - -do_install:append() { - # don't install empty /var/lock and /var/run to avoid conflict with base-files - rm -rf ${D}${localstatedir}/lock - rm -rf ${D}${localstatedir}/run - - sed -i -e 's#@nonarch_libdir@#${nonarch_libdir}#g' ${D}${systemd_unitdir}/system/drbd-demote-or-escalate@.service - sed -i -e 's#@nonarch_libdir@#${nonarch_libdir}#g' ${D}${systemd_unitdir}/system/drbd-promote@.service - sed -i -e 's#@nonarch_libdir@#${nonarch_libdir}#g' ${D}${systemd_unitdir}/system/drbd-wait-promotable@.service - sed -i -e 's#@nonarch_libdir@#${nonarch_libdir}#g' ${D}${systemd_unitdir}/system/drbd.service - sed -i -e 's#@nonarch_libdir@#${nonarch_libdir}#g' ${D}${systemd_unitdir}/system/drbd@.service - sed -i -e 's#@nonarch_libdir@#${nonarch_libdir}#g' ${D}${systemd_unitdir}/system/ocf.ra@.service -} - -RDEPENDS:${PN} += "bash perl-module-getopt-long perl-module-exporter perl-module-constant perl-module-overloading perl-module-exporter-heavy" - -# The drbd items are explicitly put under /lib when installed. -# -FILES:${PN} += "/run" -FILES:${PN} += "${nonarch_base_libdir}/drbd \ - ${nonarch_libdir}/drbd \ - ${nonarch_libdir}/tmpfiles.d \ - ${nonarch_libdir}/drbdscripts/* \ - ${systemd_unitdir}/system/* \ -" -FILES:${PN}-dbg += "${nonarch_base_libdir}/drbd/.debug" - -CLEANBROKEN = "1" diff --git a/sources/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils_9.28.0.bb b/sources/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils_9.28.0.bb new file mode 100644 index 00000000..af0afc2a --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils_9.28.0.bb @@ -0,0 +1,75 @@ +SUMMARY = "Distributed block device driver for Linux" +DESCRIPTION = "DRBD mirrors a block device over the network to another machine.\ +Think of it as networked raid 1. It is a building block for\ +setting up high availability (HA) clusters." +HOMEPAGE = "http://www.drbd.org/" +SECTION = "admin" +LICENSE = "GPL-2.0-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=5574c6965ae5f583e55880e397fbb018" + +SRC_URI = "git://github.com/LINBIT/drbd-utils;name=drbd-utils;branch=master;protocol=https \ + git://github.com/LINBIT/drbd-headers;name=drbd-headers;destsuffix=git/drbd-headers;branch=master;protocol=https \ + file://0001-drbdmon-add-LDFLAGS-when-linking.patch \ + ${@bb.utils.contains('DISTRO_FEATURES','usrmerge','file://0001-drbd-utils-support-usrmerge.patch','',d)} \ + " +SRCREV_drbd-utils = "ba2ce9037989b6141222c7901d1219cf852949f1" +SRCREV_drbd-headers = "0349f00825b4198d4ec3248f43884114a187676a" + +SRCREV_FORMAT = "drbd-utils_drbd-headers" + +S = "${WORKDIR}/git" + +UPSTREAM_CHECK_URI = "https://github.com/LINBIT/drbd-utils/releases" + +SYSTEMD_SERVICE:${PN} = "drbd.service" +SYSTEMD_AUTO_ENABLE = "disable" + +DEPENDS = "flex-native keyutils" + +inherit autotools-brokensep systemd + +# -Wunused-but-set-variable -Wunused-const-variable -Winconsistent-missing-override +CPPFLAGS:append = " -Wno-error" + +EXTRA_OECONF = " \ + --with-initdir=/etc/init.d \ + --without-pacemaker \ + --without-rgmanager \ + --without-bashcompletion \ + --with-distro debian \ + --with-initscripttype=both \ + --with-systemdunitdir=${systemd_unitdir}/system \ + --without-manual \ + --disable-udevchecks \ + " + +# If we have inherited reproducible_build, we want to use it. +export WANT_DRBD_REPRODUCIBLE_BUILD = "yes" + +do_install:append() { + # don't install empty /var/lock and /var/run to avoid conflict with base-files + rm -rf ${D}${localstatedir}/lock + rm -rf ${D}${localstatedir}/run + + sed -i -e 's#@nonarch_libdir@#${nonarch_libdir}#g' ${D}${systemd_unitdir}/system/drbd-demote-or-escalate@.service + sed -i -e 's#@nonarch_libdir@#${nonarch_libdir}#g' ${D}${systemd_unitdir}/system/drbd-promote@.service + sed -i -e 's#@nonarch_libdir@#${nonarch_libdir}#g' ${D}${systemd_unitdir}/system/drbd-wait-promotable@.service + sed -i -e 's#@nonarch_libdir@#${nonarch_libdir}#g' ${D}${systemd_unitdir}/system/drbd.service + sed -i -e 's#@nonarch_libdir@#${nonarch_libdir}#g' ${D}${systemd_unitdir}/system/drbd@.service + sed -i -e 's#@nonarch_libdir@#${nonarch_libdir}#g' ${D}${systemd_unitdir}/system/ocf.ra@.service +} + +RDEPENDS:${PN} += "bash perl-module-getopt-long perl-module-exporter perl-module-constant perl-module-overloading perl-module-exporter-heavy" + +# The drbd items are explicitly put under /lib when installed. +# +FILES:${PN} += "/run" +FILES:${PN} += "${nonarch_base_libdir}/drbd \ + ${nonarch_libdir}/drbd \ + ${nonarch_libdir}/tmpfiles.d \ + ${nonarch_libdir}/drbdscripts/* \ + ${systemd_unitdir}/system/* \ +" +FILES:${PN}-dbg += "${nonarch_base_libdir}/drbd/.debug" + +CLEANBROKEN = "1" diff --git a/sources/meta-openembedded/meta-networking/recipes-support/fping/fping/0001-fping-Initialize-msghdr-struct-in-a-portable-way.patch b/sources/meta-openembedded/meta-networking/recipes-support/fping/fping/0001-fping-Initialize-msghdr-struct-in-a-portable-way.patch deleted file mode 100644 index 9965d2ec..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-support/fping/fping/0001-fping-Initialize-msghdr-struct-in-a-portable-way.patch +++ /dev/null @@ -1,42 +0,0 @@ -From c3f476a763412be51b4df0e748af04d4150a2c71 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Mon, 29 Aug 2022 15:41:51 -0700 -Subject: [PATCH] fping: Initialize msghdr struct in a portable way - -Initializing the structure assuming glibc layout results in -compile errors on musl, therefore do partial intialization and then -assigning the members individually. - -Upstream-Status: Submitted [https://github.com/schweikert/fping/pull/263] -Signed-off-by: Khem Raj ---- - src/fping.c | 16 +++++++--------- - 1 file changed, 7 insertions(+), 9 deletions(-) - -diff --git a/src/fping.c b/src/fping.c -index e26b216..81a61d9 100644 ---- a/src/fping.c -+++ b/src/fping.c -@@ -1951,15 +1951,13 @@ int receive_packet(int64_t wait_time, - reply_buf, - reply_buf_len - }; -- struct msghdr recv_msghdr = { -- reply_src_addr, -- reply_src_addr_len, -- &msg_iov, -- 1, -- &msg_control, -- sizeof(msg_control), -- 0 -- }; -+ struct msghdr recv_msghdr = {0}; -+ recv_msghdr.msg_name = reply_src_addr; -+ recv_msghdr.msg_namelen = reply_src_addr_len; -+ recv_msghdr.msg_iov = &msg_iov; -+ recv_msghdr.msg_iovlen = 1; -+ recv_msghdr.msg_control = &msg_control; -+ recv_msghdr.msg_controllen = sizeof(msg_control); - #if HAVE_SO_TIMESTAMPNS - struct cmsghdr* cmsg; - #endif diff --git a/sources/meta-openembedded/meta-networking/recipes-support/fping/fping_5.1.bb b/sources/meta-openembedded/meta-networking/recipes-support/fping/fping_5.1.bb deleted file mode 100644 index 0682eafa..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-support/fping/fping_5.1.bb +++ /dev/null @@ -1,29 +0,0 @@ -SUMMARY = "sends ICMP ECHO_REQUEST packets to network hosts" -DESCRIPTION = "fping is a ping like program which uses the Internet Control \ -Message Protocol (ICMP) echo request to determine if a target host is \ -responding. fping differs from ping in that you can specify any number of \ -targets on the command line, or specify a file containing the lists of \ -targets to ping. Instead of sending to one target until it times out or \ -replies, fping will send out a ping packet and move on to the next target \ -in a round-robin fashion." -HOMEPAGE = "http://www.fping.org/" -BUGTRACKER = "https://github.com/schweikert/fping/issues" -SECTION = "net" - -LICENSE = "fping" -NO_GENERIC_LICENSE[fping] = "COPYING" -LIC_FILES_CHKSUM = "file://COPYING;md5=c6170fbadddfcd74f011515291d96901" - -SRC_URI = "http://www.fping.org/dist/fping-${PV}.tar.gz \ - file://0001-fping-Initialize-msghdr-struct-in-a-portable-way.patch \ - " -SRC_URI[sha256sum] = "1ee5268c063d76646af2b4426052e7d81a42b657e6a77d8e7d3d2e60fd7409fe" - -S = "${WORKDIR}/fping-${PV}" - -inherit autotools - -EXTRA_OECONF = "--enable-ipv4" - -PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" -PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," diff --git a/sources/meta-openembedded/meta-networking/recipes-support/fping/fping_5.2.bb b/sources/meta-openembedded/meta-networking/recipes-support/fping/fping_5.2.bb new file mode 100644 index 00000000..f75b6441 --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-support/fping/fping_5.2.bb @@ -0,0 +1,27 @@ +SUMMARY = "sends ICMP ECHO_REQUEST packets to network hosts" +DESCRIPTION = "fping is a ping like program which uses the Internet Control \ +Message Protocol (ICMP) echo request to determine if a target host is \ +responding. fping differs from ping in that you can specify any number of \ +targets on the command line, or specify a file containing the lists of \ +targets to ping. Instead of sending to one target until it times out or \ +replies, fping will send out a ping packet and move on to the next target \ +in a round-robin fashion." +HOMEPAGE = "http://www.fping.org/" +BUGTRACKER = "https://github.com/schweikert/fping/issues" +SECTION = "net" + +LICENSE = "fping" +NO_GENERIC_LICENSE[fping] = "COPYING" +LIC_FILES_CHKSUM = "file://COPYING;md5=c6170fbadddfcd74f011515291d96901" + +SRC_URI = "http://www.fping.org/dist/fping-${PV}.tar.gz" +SRC_URI[sha256sum] = "a7692d10d73fb0bb76e1f7459aa7f19bbcdbfc5adbedef02f468974b18b0e42f" + +S = "${WORKDIR}/fping-${PV}" + +inherit autotools + +EXTRA_OECONF = "--enable-ipv4" + +PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" +PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," diff --git a/sources/meta-openembedded/meta-networking/recipes-support/fwknop/fwknop/0001-Fix-compilation-with-GCC-s-fno-common-flag-fixes-305.patch b/sources/meta-openembedded/meta-networking/recipes-support/fwknop/fwknop/0001-Fix-compilation-with-GCC-s-fno-common-flag-fixes-305.patch deleted file mode 100644 index e696ac4e..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-support/fwknop/fwknop/0001-Fix-compilation-with-GCC-s-fno-common-flag-fixes-305.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 5aea816f27a71e6c88ad50e7326fa6584eeb7ad9 Mon Sep 17 00:00:00 2001 -From: Francois Marier -Date: Fri, 24 Jul 2020 21:22:47 -0700 -Subject: [PATCH] Fix compilation with GCC's -fno-common flag (fixes #305) - -Upstream-Status: Submitted [https://github.com/mrash/fwknop/pull/319] -Signed-off-by: Khem Raj ---- - client/log_msg.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/client/log_msg.h b/client/log_msg.h -index cc17716..3dda161 100644 ---- a/client/log_msg.h -+++ b/client/log_msg.h -@@ -38,7 +38,7 @@ enum - LOG_VERBOSITY_INFO, /*!< Constant to define a INFO message */ - LOG_VERBOSITY_DEBUG, /*!< Constant to define a DEBUG message */ - LOG_LAST_VERBOSITY --} log_level_t; -+}; - - #define LOG_DEFAULT_VERBOSITY LOG_VERBOSITY_NORMAL /*!< Default verbosity to use */ - --- -2.28.0 - diff --git a/sources/meta-openembedded/meta-networking/recipes-support/fwknop/fwknop/0001-configure.ac-Fix-missing-comma-in-AS_IF.patch b/sources/meta-openembedded/meta-networking/recipes-support/fwknop/fwknop/0001-configure.ac-Fix-missing-comma-in-AS_IF.patch deleted file mode 100644 index f3e17074..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-support/fwknop/fwknop/0001-configure.ac-Fix-missing-comma-in-AS_IF.patch +++ /dev/null @@ -1,29 +0,0 @@ -From fee4cb0ae2d1fcd012cb7f501c3db0d8ec910798 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sun, 2 Apr 2023 10:01:51 -0700 -Subject: [PATCH] configure.ac: Fix missing comma in AS_IF - -this is flagged with autconf 2.72 - -Upstream-Status: Pending -Signed-off-by: Khem Raj ---- - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index 47a069e..9cdfd3f 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -744,7 +744,7 @@ dnl - IPFW_EXE="" - IPTABLES_EXE="" - FIREWALLD_EXE="" -- ] -+ ], - ] - ] - ] --- -2.40.0 - diff --git a/sources/meta-openembedded/meta-networking/recipes-support/fwknop/fwknop_2.6.10.bb b/sources/meta-openembedded/meta-networking/recipes-support/fwknop/fwknop_2.6.10.bb deleted file mode 100644 index 7a8cfe19..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-support/fwknop/fwknop_2.6.10.bb +++ /dev/null @@ -1,32 +0,0 @@ -SUMMARY = "fwknop - Single Packet Authorization" -HOMEPAGE = "http://www.cipherdyne.org/fwknop/" -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \ - " -inherit autotools-brokensep pkgconfig - -SRC_URI = "http://www.cipherdyne.org/${BPN}/download/${BPN}-${PV}.tar.bz2 \ - file://0001-Fix-compilation-with-GCC-s-fno-common-flag-fixes-305.patch \ - file://0001-Use-pkg-config-to-find-gpgme.patch \ - file://0001-configure.ac-Fix-missing-comma-in-AS_IF.patch \ - " -SRC_URI[sha256sum] = "f6c09bec97ed8e474a98ae14f9f53e1bcdda33393f20667b6af3fb6bb894ca77" - -DEPENDS = "libpcap gpgme" - -EXTRA_OECONF = "--with-iptables=${sbindir}/iptables \ - --with-gpg=${bindir}/gpg \ - --with-wget=${base_bindir}/wget" - -do_configure:prepend () { - install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}/config - install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}/config -} - -PACKAGES =+ "${PN}-client ${PN}-daemon" - -FILES:${PN}-client = "${bindir}/fwknop" -FILES:${PN}-daemon = "${sbindir}/fwknopd \ - ${sysconfdir}/fwknop/access.conf \ - ${sysconfdir}/fwknop/fwknopd.conf" - diff --git a/sources/meta-openembedded/meta-networking/recipes-support/fwknop/fwknop_2.6.11.bb b/sources/meta-openembedded/meta-networking/recipes-support/fwknop/fwknop_2.6.11.bb new file mode 100644 index 00000000..7cc044d9 --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-support/fwknop/fwknop_2.6.11.bb @@ -0,0 +1,30 @@ +SUMMARY = "fwknop - Single Packet Authorization" +HOMEPAGE = "http://www.cipherdyne.org/fwknop/" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" + +inherit autotools-brokensep pkgconfig + +SRC_URI = "http://www.cipherdyne.org/${BPN}/download/${BPN}-${PV}.tar.bz2 \ + file://0001-Use-pkg-config-to-find-gpgme.patch \ + " +SRC_URI[sha256sum] = "a4ec7c22dd90dd684f9f7b96d3a901c4131ec8c7a3b9db26d0428513f6774c64" + +DEPENDS = "libpcap gpgme" + +EXTRA_OECONF = "--with-iptables=${sbindir}/iptables \ + --with-gpg=${bindir}/gpg \ + --with-wget=${base_bindir}/wget" + +do_configure:prepend () { + install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}/config + install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}/config +} + +PACKAGES =+ "${PN}-client ${PN}-daemon" + +FILES:${PN}-client = "${bindir}/fwknop" +FILES:${PN}-daemon = "${sbindir}/fwknopd \ + ${sysconfdir}/fwknop/access.conf \ + ${sysconfdir}/fwknop/fwknopd.conf" + diff --git a/sources/meta-openembedded/meta-networking/recipes-support/geoip/geoip-perl_1.51.bb b/sources/meta-openembedded/meta-networking/recipes-support/geoip/geoip-perl_1.51.bb index d8288f9b..8e23b66c 100644 --- a/sources/meta-openembedded/meta-networking/recipes-support/geoip/geoip-perl_1.51.bb +++ b/sources/meta-openembedded/meta-networking/recipes-support/geoip/geoip-perl_1.51.bb @@ -30,6 +30,7 @@ do_install_ptest () { install ${S}/t/*.t* ${D}${PTEST_PATH}/t install ${S}/t/data/* ${D}${PTEST_PATH}/t/data } +RDEPENDS:${PN}-ptest += "perl-modules" FILES:${PN}-dbg += "${libdir}/perl/vendor_perl/*/auto/Geo/IP/.debug" diff --git a/sources/meta-openembedded/meta-networking/recipes-support/geoip/geoip_1.6.12.bb b/sources/meta-openembedded/meta-networking/recipes-support/geoip/geoip_1.6.12.bb index 429cd69d..b247823c 100644 --- a/sources/meta-openembedded/meta-networking/recipes-support/geoip/geoip_1.6.12.bb +++ b/sources/meta-openembedded/meta-networking/recipes-support/geoip/geoip_1.6.12.bb @@ -46,10 +46,10 @@ EXTRA_OECONF = "--disable-static \ do_install() { make DESTDIR=${D} install install -d ${D}/${datadir}/GeoIP - install ${WORKDIR}/GeoIP.dat.${GEOIP_DATABASE_VERSION} ${D}/${datadir}/GeoIP/GeoIP.dat - install ${WORKDIR}/GeoIPv6.dat.${GEOIP_DATABASE_VERSION} ${D}/${datadir}/GeoIP/GeoIPv6.dat - install ${WORKDIR}/GeoLiteCity.dat.${GEOIP_DATABASE_VERSION} ${D}/${datadir}/GeoIP/GeoLiteCity.dat - install ${WORKDIR}/GeoLiteCityv6.dat.${GEOIP_DATABASE_VERSION} ${D}/${datadir}/GeoIP/GeoLiteCityv6.dat + install ${UNPACKDIR}/GeoIP.dat.${GEOIP_DATABASE_VERSION} ${D}/${datadir}/GeoIP/GeoIP.dat + install ${UNPACKDIR}/GeoIPv6.dat.${GEOIP_DATABASE_VERSION} ${D}/${datadir}/GeoIP/GeoIPv6.dat + install ${UNPACKDIR}/GeoLiteCity.dat.${GEOIP_DATABASE_VERSION} ${D}/${datadir}/GeoIP/GeoLiteCity.dat + install ${UNPACKDIR}/GeoLiteCityv6.dat.${GEOIP_DATABASE_VERSION} ${D}/${datadir}/GeoIP/GeoLiteCityv6.dat ln -s GeoLiteCity.dat ${D}${datadir}/GeoIP/GeoIPCity.dat } diff --git a/sources/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate_2.5.0.bb b/sources/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate_2.5.0.bb index 9a0292ea..e4dc9dee 100644 --- a/sources/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate_2.5.0.bb +++ b/sources/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate_2.5.0.bb @@ -28,6 +28,6 @@ inherit autotools do_install:append() { install -d ${D}/${sysconfdir} install -d ${D}/${sysconfdir}/cron.d - install ${WORKDIR}/GeoIP.conf ${D}/${sysconfdir}/ - install ${WORKDIR}/geoipupdate.cron ${D}/${sysconfdir}/cron.d/ + install ${UNPACKDIR}/GeoIP.conf ${D}/${sysconfdir}/ + install ${UNPACKDIR}/geoipupdate.cron ${D}/${sysconfdir}/cron.d/ } diff --git a/sources/meta-openembedded/meta-networking/recipes-support/libconfuse/libconfuse_3.3.bb b/sources/meta-openembedded/meta-networking/recipes-support/libconfuse/libconfuse_3.3.bb deleted file mode 100644 index b8d0536e..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-support/libconfuse/libconfuse_3.3.bb +++ /dev/null @@ -1,14 +0,0 @@ -DESCRIPTION = "libConfuse is a configuration file parser library" -LICENSE = "ISC" -LIC_FILES_CHKSUM = "file://LICENSE;md5=42fa47330d4051cd219f7d99d023de3a" - -SRCREV = "a42aebf13db33afd575da6e63f55163d371f776d" -SRC_URI = "git://github.com/libconfuse/libconfuse.git;branch=master;protocol=https" - -inherit autotools-brokensep pkgconfig gettext - -S = "${WORKDIR}/git" - -do_configure:prepend(){ - (cd ${S} && ${S}/autogen.sh) -} diff --git a/sources/meta-openembedded/meta-networking/recipes-support/libtdb/libtdb_1.4.10.bb b/sources/meta-openembedded/meta-networking/recipes-support/libtdb/libtdb_1.4.10.bb deleted file mode 100644 index bd3f9f63..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-support/libtdb/libtdb_1.4.10.bb +++ /dev/null @@ -1,63 +0,0 @@ -SUMMARY = "The tdb library" -HOMEPAGE = "https://tdb.samba.org/" -SECTION = "libs" -LICENSE = "LGPL-3.0-or-later & GPL-3.0-or-later" - -LIC_FILES_CHKSUM = "file://tools/tdbdump.c;endline=18;md5=b59cd45aa8624578126a8c98f48018c4 \ - file://include/tdb.h;endline=27;md5=f5bb544641d3081821bcc1dd58310be6" - -export PYTHONHASHSEED="1" -export PYTHONARCHDIR = "${PYTHON_SITEPACKAGES_DIR}" - -SRC_URI = "https://samba.org/ftp/tdb/tdb-${PV}.tar.gz \ - file://0001-tdb-Add-configure-options-for-packages.patch \ - file://0002-Fix-pyext_PATTERN-for-cross-compilation.patch \ - file://run-ptest \ -" - -SRC_URI[sha256sum] = "02338e33c16c21c9e29571cef523e76b2b708636254f6f30c6cf195d48c62daf" - -PACKAGECONFIG ??= "\ - ${@bb.utils.filter('DISTRO_FEATURES', 'acl', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)} \ -" - -PACKAGECONFIG[acl] = "--with-acl,--without-acl,acl" -PACKAGECONFIG[attr] = "--with-attr,--without-attr,attr" -PACKAGECONFIG[libbsd] = "--with-libbsd,--without-libbsd,libbsd" -PACKAGECONFIG[libcap] = "--with-libcap,--without-libcap,libcap" -PACKAGECONFIG[valgrind] = "--with-valgrind,--without-valgrind,valgrind" - -S = "${WORKDIR}/tdb-${PV}" - -inherit waf-samba pkgconfig ptest - -# Cross_compile cannot use preforked process, since fork process earlier than point subproces.popen -# to cross Popen -export WAF_NO_PREFORK="yes" - -EXTRA_OECONF += "--disable-rpath \ - --disable-rpath-install \ - --bundled-libraries=NONE \ - --builtin-libraries=replace \ - --with-libiconv=${STAGING_DIR_HOST}${prefix}\ - " - -do_install_ptest() { - install -d ${D}${PTEST_PATH}/tests - install -m 0755 ${B}/bin/tdb1-* ${D}${PTEST_PATH}/tests/ - install -m 0755 ${B}/bin/replace_testsuite ${D}${PTEST_PATH}/tests/ - install -d ${D}${PTEST_PATH}/tests/test - install -m 0644 ${B}/test/*.tdb ${D}${PTEST_PATH}/tests/test/ - install -m 0644 ${B}/test/*.corrupt ${D}${PTEST_PATH}/tests/test/ -} - -PACKAGES += "tdb-tools python3-tdb" - -RPROVIDES:${PN}-dbg += "python3-tdb-dbg" - -FILES:${PN} = "${libdir}/*.so.*" -FILES:tdb-tools = "${bindir}/*" -FILES:python3-tdb = "${PYTHON_SITEPACKAGES_DIR}/*" -RDEPENDS:python3-tdb = "python3" -INSANE_SKIP:${MLPREFIX}python3-tdb = "dev-so" diff --git a/sources/meta-openembedded/meta-networking/recipes-support/libtdb/libtdb_1.4.12.bb b/sources/meta-openembedded/meta-networking/recipes-support/libtdb/libtdb_1.4.12.bb new file mode 100644 index 00000000..a96527a3 --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-support/libtdb/libtdb_1.4.12.bb @@ -0,0 +1,63 @@ +SUMMARY = "The tdb library" +HOMEPAGE = "https://tdb.samba.org/" +SECTION = "libs" +LICENSE = "LGPL-3.0-or-later & GPL-3.0-or-later" + +LIC_FILES_CHKSUM = "file://tools/tdbdump.c;endline=18;md5=b59cd45aa8624578126a8c98f48018c4 \ + file://include/tdb.h;endline=27;md5=f5bb544641d3081821bcc1dd58310be6" + +export PYTHONHASHSEED="1" +export PYTHONARCHDIR = "${PYTHON_SITEPACKAGES_DIR}" + +SRC_URI = "https://samba.org/ftp/tdb/tdb-${PV}.tar.gz \ + file://0001-tdb-Add-configure-options-for-packages.patch \ + file://0002-Fix-pyext_PATTERN-for-cross-compilation.patch \ + file://run-ptest \ +" + +SRC_URI[sha256sum] = "6ce4b27498812d09237ece65a0d6dfac0941610e709848ecb822aa241084cd7a" + +PACKAGECONFIG ??= "\ + ${@bb.utils.filter('DISTRO_FEATURES', 'acl', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)} \ +" + +PACKAGECONFIG[acl] = "--with-acl,--without-acl,acl" +PACKAGECONFIG[attr] = "--with-attr,--without-attr,attr" +PACKAGECONFIG[libbsd] = "--with-libbsd,--without-libbsd,libbsd" +PACKAGECONFIG[libcap] = "--with-libcap,--without-libcap,libcap" +PACKAGECONFIG[valgrind] = "--with-valgrind,--without-valgrind,valgrind" + +S = "${WORKDIR}/tdb-${PV}" + +inherit waf-samba pkgconfig ptest + +# Cross_compile cannot use preforked process, since fork process earlier than point subproces.popen +# to cross Popen +export WAF_NO_PREFORK="yes" + +EXTRA_OECONF += "--disable-rpath \ + --disable-rpath-install \ + --bundled-libraries=NONE \ + --builtin-libraries=replace \ + --with-libiconv=${STAGING_DIR_HOST}${prefix}\ + " + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + install -m 0755 ${B}/bin/tdb1-* ${D}${PTEST_PATH}/tests/ + install -m 0755 ${B}/bin/replace_testsuite ${D}${PTEST_PATH}/tests/ + install -d ${D}${PTEST_PATH}/tests/test + install -m 0644 ${B}/test/*.tdb ${D}${PTEST_PATH}/tests/test/ + install -m 0644 ${B}/test/*.corrupt ${D}${PTEST_PATH}/tests/test/ +} + +PACKAGES += "tdb-tools python3-tdb" + +RPROVIDES:${PN}-dbg += "python3-tdb-dbg" + +FILES:${PN} = "${libdir}/*.so.*" +FILES:tdb-tools = "${bindir}/*" +FILES:python3-tdb = "${PYTHON_SITEPACKAGES_DIR}/*" +RDEPENDS:python3-tdb = "python3" +INSANE_SKIP:${MLPREFIX}python3-tdb = "dev-so" diff --git a/sources/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm_2.5.2.bb b/sources/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm_2.5.2.bb index 86b9112b..391e0e4a 100644 --- a/sources/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm_2.5.2.bb +++ b/sources/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm_2.5.2.bb @@ -32,3 +32,7 @@ inherit autotools pkgconfig EXTRA_OEMAKE += "ROOTPREFIX=${root_prefix}" FILES:${PN} += "${nonarch_base_libdir}/firmware" + +# http://errors.yoctoproject.org/Errors/Details/766901/ +# linux-atm-2.5.2/src/led/conn.c:414:57: error: passing argument 3 of 'accept' from incompatible pointer type [-Wincompatible-pointer-types] +CFLAGS += "-Wno-error=incompatible-pointer-types" diff --git a/sources/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools_1.0.19.bb b/sources/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools_1.0.19.bb deleted file mode 100644 index 3f945eee..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools_1.0.19.bb +++ /dev/null @@ -1,63 +0,0 @@ -SUMMARY = "The Linux Kernel Stream Control Transmission Protocol (lksctp) project" -HOMEPAGE = "http://lksctp.org" -SECTION = "net" -LICENSE = "LGPL-2.1-only & GPL-2.0-only" - -LIC_FILES_CHKSUM = " \ - file://COPYING.lib;md5=0a1b79af951c42a9c8573533fbba9a92 \ - file://COPYING;md5=0c56db0143f4f80c369ee3af7425af6e \ -" - -SRCREV = "05b50d379ff0037de4957bb2a1befcce88b70225" - -PV .= "+git" -LK_REL = "1.0.19" - -SRC_URI = " \ - git://github.com/sctp/lksctp-tools.git;branch=master;protocol=https \ - file://run-ptest \ - file://v4test.sh \ - file://v6test.sh \ -" - -S = "${WORKDIR}/git" - -BBCLASSEXTEND = "native" - -inherit autotools-brokensep pkgconfig binconfig ptest - -do_install_ptest () { - install -m 0755 ${WORKDIR}/v4test.sh ${D}${PTEST_PATH} - install -m 0755 ${WORKDIR}/v6test.sh ${D}${PTEST_PATH} - for testcase in `find ${B}/src/apps/.libs ${B}/src/func_tests/.libs -maxdepth 1 -type f -executable`; do - install $testcase ${D}${PTEST_PATH} - done -} - -SOLIBVERSION="${LK_REL}" -SOLIBMAJORVERSION="1" - -PACKAGES =+ "${PN}-withsctp ${PN}-utils" - -FILES:${PN} = " \ - ${libdir}/libsctp.so.${SOLIBVERSION} \ - ${libdir}/libsctp.so.${SOLIBMAJORVERSION} \ -" - -FILES:${PN}-withsctp = " \ - ${libdir}/lksctp-tools/libwithsctp.so.${SOLIBVERSION} \ - ${libdir}/lksctp-tools/libwithsctp.so.${SOLIBMAJORVERSION} \ -" - -FILES:${PN}-dev += " \ - ${libdir}/libsctp.so \ - ${libdir}/lksctp-tools/libwithsctp.so \ - ${datadir}/lksctp-tools/*.c \ - ${datadir}/lksctp-tools/*.h \ -" - -FILES:${PN}-utils = "${bindir}/*" - -RRECOMMENDS:${PN} += "kernel-module-sctp" -RRECOMMENDS:${PN}-utils += "kernel-module-sctp" -RRECOMMENDS:${PN}-ptest += "kernel-module-sctp" diff --git a/sources/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools_1.0.20.bb b/sources/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools_1.0.20.bb new file mode 100644 index 00000000..a5f9c554 --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools_1.0.20.bb @@ -0,0 +1,55 @@ +SUMMARY = "The Linux Kernel Stream Control Transmission Protocol (lksctp) project" +HOMEPAGE = "http://lksctp.org" +SECTION = "net" +LICENSE = "LGPL-2.1-only & GPL-2.0-only" + +LIC_FILES_CHKSUM = " \ + file://COPYING.lib;md5=0a1b79af951c42a9c8573533fbba9a92 \ + file://COPYING;md5=0c56db0143f4f80c369ee3af7425af6e \ +" + +SRCREV = "311fcdeb5cb41612d4be66b16f0f2ad6675a6af8" + +SRC_URI = " \ + git://github.com/sctp/lksctp-tools.git;branch=master;protocol=https \ + file://run-ptest \ + file://v4test.sh \ + file://v6test.sh \ +" + +S = "${WORKDIR}/git" + +BBCLASSEXTEND = "native" + +inherit autotools-brokensep pkgconfig binconfig ptest + +do_install_ptest () { + install -m 0755 ${UNPACKDIR}/v4test.sh ${D}${PTEST_PATH} + install -m 0755 ${UNPACKDIR}/v6test.sh ${D}${PTEST_PATH} + for testcase in `find ${B}/src/apps/.libs ${B}/src/func_tests/.libs -maxdepth 1 -type f -executable`; do + install $testcase ${D}${PTEST_PATH} + done +} + +PACKAGES =+ "${PN}-withsctp ${PN}-utils" + +FILES:${PN} = " \ + ${libdir}/libsctp.so.* \ +" + +FILES:${PN}-withsctp = " \ + ${libdir}/lksctp-tools/libwithsctp.so.* \ +" + +FILES:${PN}-dev += " \ + ${libdir}/libsctp.so \ + ${libdir}/lksctp-tools/libwithsctp.so \ + ${datadir}/lksctp-tools/*.c \ + ${datadir}/lksctp-tools/*.h \ +" + +FILES:${PN}-utils = "${bindir}/*" + +RRECOMMENDS:${PN} += "kernel-module-sctp" +RRECOMMENDS:${PN}-utils += "kernel-module-sctp" +RRECOMMENDS:${PN}-ptest += "kernel-module-sctp" diff --git a/sources/meta-openembedded/meta-networking/recipes-support/memcached/memcached_1.6.17.bb b/sources/meta-openembedded/meta-networking/recipes-support/memcached/memcached_1.6.17.bb index 270ad548..7234f02a 100644 --- a/sources/meta-openembedded/meta-networking/recipes-support/memcached/memcached_1.6.17.bb +++ b/sources/meta-openembedded/meta-networking/recipes-support/memcached/memcached_1.6.17.bb @@ -25,6 +25,8 @@ SRC_URI = "http://www.memcached.org/files/${BP}.tar.gz \ " SRC_URI[sha256sum] = "2055e373613d8fc21529aff9f0adce3e23b9ce01ba0478d30e7941d9f2bd1224" +CVE_STATUS[CVE-2022-26635] = "disputed: this is a problem of applications using php-memcached inproperly" + # set the same COMPATIBLE_HOST as libhugetlbfs COMPATIBLE_HOST = "(i.86|x86_64|powerpc|powerpc64|aarch64|arm).*-linux*" diff --git a/sources/meta-openembedded/meta-networking/recipes-support/nbd/nbd/0001-nbd-client-Fix-build-on-musl-gcc14.patch b/sources/meta-openembedded/meta-networking/recipes-support/nbd/nbd/0001-nbd-client-Fix-build-on-musl-gcc14.patch new file mode 100644 index 00000000..15b439e2 --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-support/nbd/nbd/0001-nbd-client-Fix-build-on-musl-gcc14.patch @@ -0,0 +1,43 @@ +From 909d20a2ee4afecd5ae4cc5950c8ee599f72972d Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 20 May 2024 17:48:13 -0700 +Subject: [PATCH] nbd-client: Fix build on musl + gcc14 + +GCC-14 has promoted incompatible-pointer-types warning into error which is +now flagged especially with when building on musl + +Fixes following error + +| ../nbd-3.26.1/nbd-client.c: In function 'openunix': +| ../nbd-3.26.1/nbd-client.c:345:27: error: passing argument 2 of 'connect' from incompatible pointer type [-Wincompatible-pointer-types] +| 345 | if (connect(sock, &un_addr, sizeof(un_addr)) == -1) { +| | ^~~~~~~~ +| | | +| | struct sockaddr_un * +| In file included from ../nbd-3.26.1/nbd-client.c:25: +| /mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux-musl/nbd/3.26.1/recipe-sysroot/usr/include/sys/socket.h:386:19: note: expected 'const struct sockaddr *' but argument is of type 'struct sockaddr_un *' +| 386 | int connect (int, const struct sockaddr *, socklen_t); +| | ^~~~~~~~~~~~~~~~~~~~~~~ + +Upstream-Status: Submitted [https://lists.debian.org/nbd/2024/05/msg00012.html] +Signed-off-by: Khem Raj +--- + nbd-client.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/nbd-client.c b/nbd-client.c +index 8d1101b..7b25c67 100644 +--- a/nbd-client.c ++++ b/nbd-client.c +@@ -342,7 +342,7 @@ int openunix(const char *path) { + return -1; + }; + +- if (connect(sock, &un_addr, sizeof(un_addr)) == -1) { ++ if (connect(sock, (struct sockaddr*)&un_addr, sizeof(un_addr)) == -1) { + err_nonfatal("CONNECT failed"); + close(sock); + return -1; +-- +2.45.1 + diff --git a/sources/meta-openembedded/meta-networking/recipes-support/nbd/nbd/f0418b0d8b54c21a1e5b0c6dce3277e938d07e7c.patch b/sources/meta-openembedded/meta-networking/recipes-support/nbd/nbd/f0418b0d8b54c21a1e5b0c6dce3277e938d07e7c.patch new file mode 100644 index 00000000..716ded55 --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-support/nbd/nbd/f0418b0d8b54c21a1e5b0c6dce3277e938d07e7c.patch @@ -0,0 +1,50 @@ +From f0418b0d8b54c21a1e5b0c6dce3277e938d07e7c Mon Sep 17 00:00:00 2001 +From: Dave Jones +Date: Thu, 14 Mar 2024 11:13:05 +0000 +Subject: [PATCH] Fix the check & no cases of enable_manpages + +Currently, running "configure --disable-manpages" while docbook2man *is* +installed results in the error "don't know what to do here" when it +should disable manpages. + +There also appears to be a missing conditional at the start of the line; +there's closing un-matched ]) at the end of the line. Still, at this +point the check can be done in pure shell; no need for AC macros. I've +also removed the confusing m4_divert_text call on the check case. Not +sure why that was there, but it appears unnecessary. + +Upstream-Status: Backport [https://github.com/NetworkBlockDevice/nbd/commit/f0418b0d8b54c21a1e5b0c6dce3277e938d07e7c] +Signed-off-by: Khem Raj +--- + configure.ac | 13 +++++++++---- + 1 file changed, 9 insertions(+), 4 deletions(-) + +--- a/configure.ac ++++ b/configure.ac +@@ -328,7 +328,7 @@ AC_MSG_CHECKING([whether man pages are r + AC_ARG_ENABLE([manpages], + AS_HELP_STRING([--disable-manpages], [Do not install man pages]), + [], +- [: m4_divert_text([DEFAULTS], [enable_manpages=check])] ++ [enable_manpages=check] + ) + AC_MSG_RESULT([$enable_manpages]) + +@@ -337,9 +337,14 @@ AS_IF([test "x$enable_manpages" != "xno" + ]) + AS_IF([test "x$enable_manpages" = "xyes" -a "x$DB2M" = "x"], [ + AC_MSG_ERROR([docbook2man not found, but is required to build manpages]) +- ], +- [test "x$DB2M" != "x"], [enable_manpages=yes], +- [AC_MSG_ERROR([don't know what to do here])]) ++ ]) ++if test "x$enable_manpages" = "xcheck"; then ++ if test "x$DB2M" = "x"; then ++ enable_manpages=no ++ else ++ enable_manpages=yes ++ fi ++fi + AC_MSG_CHECKING([whether to build manpages]) + AC_MSG_RESULT([$enable_manpages]) + diff --git a/sources/meta-openembedded/meta-networking/recipes-support/nbd/nbd_3.24.bb b/sources/meta-openembedded/meta-networking/recipes-support/nbd/nbd_3.24.bb deleted file mode 100644 index da9f8295..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-support/nbd/nbd_3.24.bb +++ /dev/null @@ -1,20 +0,0 @@ -DESCRIPTION = "Network Block Device" -HOMEPAGE = "http://nbd.sourceforge.net" -SECTION = "net" -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" - -DEPENDS = "autoconf-archive bison-native glib-2.0 libnl" - -SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.xz" -SRC_URI[md5sum] = "a6d9e7bbc311a2ed07ef84a58b82b5dd" -SRC_URI[sha256sum] = "6877156d23a7b33f75eee89d2f5c2c91c542afc3cdcb636dea5a88539a58d10c" - -inherit autotools pkgconfig - -PACKAGES = "${PN}-client ${PN}-dbg ${PN}-doc ${PN}-server ${PN}-trdump ${PN}-trplay" - -FILES:${PN}-client = "${sbindir}/${BPN}-client" -FILES:${PN}-server = "${bindir}/${BPN}-server" -FILES:${PN}-trdump = "${bindir}/${BPN}-trdump" -FILES:${PN}-trplay = "${bindir}/${BPN}-trplay" diff --git a/sources/meta-openembedded/meta-networking/recipes-support/nbd/nbd_3.26.1.bb b/sources/meta-openembedded/meta-networking/recipes-support/nbd/nbd_3.26.1.bb new file mode 100644 index 00000000..a69d35fa --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-support/nbd/nbd_3.26.1.bb @@ -0,0 +1,24 @@ +DESCRIPTION = "Network Block Device user-space tools (TCP version)" +HOMEPAGE = "https://github.com/NetworkBlockDevice/nbd" +SECTION = "net" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +DEPENDS = "autoconf-archive bison-native glib-2.0 libnl zlib bison-native" + +SRC_URI = "https://github.com/NetworkBlockDevice/${BPN}/releases/download/${BP}/${BP}.tar.xz \ + file://f0418b0d8b54c21a1e5b0c6dce3277e938d07e7c.patch \ + file://0001-nbd-client-Fix-build-on-musl-gcc14.patch \ + " +SRC_URI[sha256sum] = "f0cf509fa5b20b1a07f7904eb637e9b47d3e30b6ed6f00075af5d8b701c78fef" + +inherit autotools pkgconfig + +EXTRA_OECONF += "--enable-syslog --enable-lfs --disable-manpages" + +PACKAGES = "${PN}-client ${PN}-dbg ${PN}-doc ${PN}-server ${PN}-trdump ${PN}-trplay" + +FILES:${PN}-client = "${sbindir}/${BPN}-client" +FILES:${PN}-server = "${bindir}/${BPN}-server" +FILES:${PN}-trdump = "${bindir}/${BPN}-trdump" +FILES:${PN}-trplay = "${bindir}/${BPN}-trplay" diff --git a/sources/meta-openembedded/meta-networking/recipes-support/netperf/netperf_git.bb b/sources/meta-openembedded/meta-networking/recipes-support/netperf/netperf_git.bb index 6e459eee..579a04b8 100644 --- a/sources/meta-openembedded/meta-networking/recipes-support/netperf/netperf_git.bb +++ b/sources/meta-openembedded/meta-networking/recipes-support/netperf/netperf_git.bb @@ -42,14 +42,14 @@ do_configure:prepend() { } do_install() { - sed -e 's#/usr/sbin/#${sbindir}/#g' -i ${WORKDIR}/init + sed -e 's#/usr/sbin/#${sbindir}/#g' -i ${UNPACKDIR}/init install -d ${D}${sbindir} ${D}${bindir} ${D}${sysconfdir}/init.d ${D}${systemd_system_unitdir} if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then - sed -e 's#/usr/sbin/#${sbindir}/#g' ${WORKDIR}/netserver.service > ${D}${systemd_system_unitdir}/netserver.service + sed -e 's#/usr/sbin/#${sbindir}/#g' ${UNPACKDIR}/netserver.service > ${D}${systemd_system_unitdir}/netserver.service fi install -m 4755 src/netperf ${D}${bindir} install -m 4755 src/netserver ${D}${sbindir} - install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/netperf + install -m 0755 ${UNPACKDIR}/init ${D}${sysconfdir}/init.d/netperf # man install -d ${D}${mandir}/man1/ diff --git a/sources/meta-openembedded/meta-networking/recipes-support/nis/yp-tools_2.14.bb b/sources/meta-openembedded/meta-networking/recipes-support/nis/yp-tools_2.14.bb index 8b7ed6fa..0e147826 100644 --- a/sources/meta-openembedded/meta-networking/recipes-support/nis/yp-tools_2.14.bb +++ b/sources/meta-openembedded/meta-networking/recipes-support/nis/yp-tools_2.14.bb @@ -30,5 +30,5 @@ CACHED_CONFIGUREVARS += "ac_cv_prog_STRIP=/bin/true" do_install:append() { install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/domainname.service ${D}${systemd_unitdir}/system + install -m 0644 ${UNPACKDIR}/domainname.service ${D}${systemd_unitdir}/system } diff --git a/sources/meta-openembedded/meta-networking/recipes-support/nis/yp-tools_4.2.3.bb b/sources/meta-openembedded/meta-networking/recipes-support/nis/yp-tools_4.2.3.bb index d2535487..9b2c1868 100644 --- a/sources/meta-openembedded/meta-networking/recipes-support/nis/yp-tools_4.2.3.bb +++ b/sources/meta-openembedded/meta-networking/recipes-support/nis/yp-tools_4.2.3.bb @@ -43,5 +43,5 @@ FILES:${PN}-staticdev += " ${libdir}/yp-nis/*.a" do_install:append() { install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/domainname.service ${D}${systemd_unitdir}/system + install -m 0644 ${UNPACKDIR}/domainname.service ${D}${systemd_unitdir}/system } diff --git a/sources/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt_2.7.2.bb b/sources/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt_2.7.2.bb index a95062bc..e29730a2 100644 --- a/sources/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt_2.7.2.bb +++ b/sources/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt_2.7.2.bb @@ -49,10 +49,10 @@ do_install:append () { install -d ${D}${sysconfdir}/init.d install -d ${D}${sysconfdir}/rcS.d - install -m 0755 ${WORKDIR}/ypbind.init ${D}${sysconfdir}/init.d/ypbind + install -m 0755 ${UNPACKDIR}/ypbind.init ${D}${sysconfdir}/init.d/ypbind install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/ypbind.service ${D}${systemd_unitdir}/system + install -m 0644 ${UNPACKDIR}/ypbind.service ${D}${systemd_unitdir}/system } # uses glibc internal APIs e.g. _hostalias diff --git a/sources/meta-openembedded/meta-networking/recipes-support/ntopng/files/0001-Follow-rrd-post-1.8-change.patch b/sources/meta-openembedded/meta-networking/recipes-support/ntopng/files/0001-Follow-rrd-post-1.8-change.patch new file mode 100644 index 00000000..eefd4e1a --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-support/ntopng/files/0001-Follow-rrd-post-1.8-change.patch @@ -0,0 +1,32 @@ +From a3bd9efe78f9c381f19b99c8ceb7f52b4c2a52b8 Mon Sep 17 00:00:00 2001 +From: Dmitry Baryshkov +Date: Wed, 5 Jun 2024 09:40:17 +0300 +Subject: [PATCH] Follow rrd post-1.8 change + +Git version of rrdtool has changed rrd_tune argument from char pointer +to const char pointer. GCC 14 is more strict regarding the pointer +constantness checks and errors out in such a case. Update rrd_tune +invokation. + +Signed-off-by: Dmitry Baryshkov +Upstream-Status: Pending [CLA is not signed on our side] +--- + src/LuaEngineNtop.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/LuaEngineNtop.cpp b/src/LuaEngineNtop.cpp +index bd2de79e3021..dd00f1608f78 100644 +--- a/src/LuaEngineNtop.cpp ++++ b/src/LuaEngineNtop.cpp +@@ -5427,7 +5427,7 @@ static int ntop_rrd_tune(lua_State* vm) { + filename = argv[1]; + + reset_rrd_state(); +- status = rrd_tune(argc, (char**)argv); ++ status = rrd_tune(argc, (const char**)argv); + + if(status != 0) { + char *err = rrd_get_error(); +-- +2.39.2 + diff --git a/sources/meta-openembedded/meta-networking/recipes-support/ntopng/ntopng_5.2.1.bb b/sources/meta-openembedded/meta-networking/recipes-support/ntopng/ntopng_5.2.1.bb index 110ca368..9bb93910 100644 --- a/sources/meta-openembedded/meta-networking/recipes-support/ntopng/ntopng_5.2.1.bb +++ b/sources/meta-openembedded/meta-networking/recipes-support/ntopng/ntopng_5.2.1.bb @@ -19,6 +19,7 @@ SRC_URI = "git://github.com/ntop/ntopng.git;protocol=https;branch=5.2-stable \ file://0001-autogen.sh-generate-configure.ac-only.patch \ file://0001-configure.ac.in-not-check-clang-on-host.patch \ file://0001-configure.ac.in-Allow-dynamic-linking-against-ndpi-3.patch \ + file://0001-Follow-rrd-post-1.8-change.patch \ file://ntopng.service \ " @@ -34,7 +35,7 @@ inherit autotools-brokensep gettext pkgconfig systemd do_install:append() { install -d ${D}${systemd_unitdir}/system/ - install -m 0644 ${WORKDIR}/ntopng.service ${D}${systemd_unitdir}/system + install -m 0644 ${UNPACKDIR}/ntopng.service ${D}${systemd_unitdir}/system } FILES:${PN} += "\ diff --git a/sources/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpd b/sources/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpd index d1b9c490..a0c43ed5 100755 --- a/sources/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpd +++ b/sources/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpd @@ -72,7 +72,7 @@ case "$1" in startdaemon ;; status) - status /usr/sbin/ntpd; + status ntpd; exit $? ;; *) diff --git a/sources/meta-openembedded/meta-networking/recipes-support/ntp/ntp_4.2.8p17.bb b/sources/meta-openembedded/meta-networking/recipes-support/ntp/ntp_4.2.8p17.bb deleted file mode 100644 index 4ed58cd6..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-support/ntp/ntp_4.2.8p17.bb +++ /dev/null @@ -1,184 +0,0 @@ -SUMMARY = "Network Time Protocol daemon and utilities" -DESCRIPTION = "The Network Time Protocol (NTP) is used to \ -synchronize the time of a computer client or server to \ -another server or reference time source, such as a radio \ -or satellite receiver or modem." -HOMEPAGE = "http://support.ntp.org" -SECTION = "net" -LICENSE = "NTP" -LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=3a8ffebbcad335abf2c39fec38671eec" - -DEPENDS = "libevent" - -SRC_URI = "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-${PV}.tar.gz \ - file://ntp-4.2.4_p6-nano.patch \ - file://reproducibility-fixed-path-to-posix-shell.patch \ - file://0001-libntp-Do-not-use-PTHREAD_STACK_MIN-on-glibc.patch \ - file://0001-test-Fix-build-with-new-compiler-defaults-to-fno-com.patch \ - file://0001-sntp-Fix-types-in-check-for-pthread_detach.patch \ - file://ntpd \ - file://ntp.conf \ - file://ntpd.service \ - file://sntp.service \ - file://sntp \ - file://ntpd.list \ -" - -SRC_URI[sha256sum] = "103dd272e6a66c5b8df07dce5e9a02555fcd6f1397bdfb782237328e89d3a866" - -CVE_STATUS[CVE-2016-9312] = "not-applicable-platform: Issue only applies on Windows" -CVE_STATUS[CVE-2019-11331] = "upstream-wontfix: inherent to RFC 5905 and cannot be fixed without breaking compatibility" -CVE_STATUS_GROUPS += "CVE_STATUS_NTP" -CVE_STATUS_NTP[status] = "fixed-version: Yocto CVE check can not handle 'p' in ntp version" -CVE_STATUS_NTP = " \ - CVE-2015-5146 \ - CVE-2015-5300 \ - CVE-2015-7975 \ - CVE-2015-7976 \ - CVE-2015-7977 \ - CVE-2015-7978 \ - CVE-2015-7979 \ - CVE-2015-8138 \ - CVE-2015-8139 \ - CVE-2015-8140 \ - CVE-2015-8158 \ - CVE-2016-1547 \ - CVE-2016-2516 \ - CVE-2016-2517 \ - CVE-2016-2519 \ - CVE-2016-7429 \ - CVE-2016-7433 \ - CVE-2016-9310 \ - CVE-2016-9311 \ -" - - -inherit autotools update-rc.d useradd systemd pkgconfig - -# The ac_cv_header_readline_history is to stop ntpdc depending on either -# readline or curses -EXTRA_OECONF += "--with-net-snmp-config=no \ - --without-ntpsnmpd \ - ac_cv_header_readline_history_h=no \ - --with-yielding_select=yes \ - --with-locfile=redhat \ - --without-rpath \ - " -CFLAGS:append = " -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED" - -USERADD_PACKAGES = "${PN}" -NTP_USER_HOME ?= "/var/lib/ntp" -USERADD_PARAM:${PN} = "--system --home-dir ${NTP_USER_HOME} \ - --no-create-home \ - --shell /bin/false --user-group ntp" - -# NB: debug is default-enabled by NTP; keep it default-enabled here. -PACKAGECONFIG ??= "cap debug refclocks openssl \ - ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \ -" -PACKAGECONFIG[openssl] = "--with-openssl-libdir=${STAGING_LIBDIR} \ - --with-openssl-incdir=${STAGING_INCDIR} \ - --with-crypto, \ - --without-openssl --without-crypto, \ - openssl" -PACKAGECONFIG[cap] = "--enable-linuxcaps,--disable-linuxcaps,libcap" -PACKAGECONFIG[readline] = "--with-lineeditlibs,--without-lineeditlibs,readline" -PACKAGECONFIG[refclocks] = "--enable-all-clocks,--disable-all-clocks,pps-tools" -PACKAGECONFIG[debug] = "--enable-debugging,--disable-debugging" -PACKAGECONFIG[mdns] = "ac_cv_header_dns_sd_h=yes,ac_cv_header_dns_sd_h=no,mdns" -PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," - -do_install:append() { - install -d ${D}${sysconfdir}/init.d - install -m 644 ${WORKDIR}/ntp.conf ${D}${sysconfdir} - install -m 755 ${WORKDIR}/ntpd ${D}${sysconfdir}/init.d - - install -m 755 -d ${D}${NTP_USER_HOME} - chown ntp:ntp ${D}${NTP_USER_HOME} - - # Fix hardcoded paths in scripts - sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/ntpd - sed -i 's!/usr/bin/!${bindir}/!g' ${D}${sysconfdir}/init.d/ntpd - sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/ntpd - sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/ntpd - sed -i '1s,#!.*perl -w,#! ${bindir}/env perl,' ${D}${sbindir}/ntptrace - sed -i '/use/i use warnings;' ${D}${sbindir}/ntptrace - sed -i '1s,#!.*perl,#! ${bindir}/env perl,' ${D}${sbindir}/ntp-wait - sed -i '/use/i use warnings;' ${D}${sbindir}/ntp-wait - sed -i '1s,#!.*perl -w,#! ${bindir}/env perl,' ${D}${sbindir}/calc_tickadj - sed -i '/use/i use warnings;' ${D}${sbindir}/calc_tickadj - - install -d ${D}/${sysconfdir}/default - install -m 0644 ${WORKDIR}/sntp ${D}${sysconfdir}/default/ - - install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/ntpd.service ${D}${systemd_unitdir}/system/ - install -m 0644 ${WORKDIR}/sntp.service ${D}${systemd_unitdir}/system/ - - install -d ${D}${systemd_unitdir}/ntp-units.d - install -m 0644 ${WORKDIR}/ntpd.list ${D}${systemd_unitdir}/ntp-units.d/60-ntpd.list - - # Remove the empty libexecdir and bindir. - rmdir --ignore-fail-on-non-empty ${D}${libexecdir} - rmdir --ignore-fail-on-non-empty ${D}${bindir} -} - -PACKAGES += "sntp ntpdc ntpq ${PN}-tickadj ${PN}-utils" - -# ntp originally includes tickadj. It's split off for inclusion in small firmware images on platforms -# with wonky clocks (e.g. OpenSlug) -RDEPENDS:${PN} = "${PN}-tickadj" -# ntpd & sntp require libgcc for execution due to phtread_cancel/pthread_exit calls -RDEPENDS:${PN} += "libgcc" -RDEPENDS:sntp += "libgcc" -# Handle move from bin to utils package -RPROVIDES:${PN}-utils = "${PN}-bin" -RREPLACES:${PN}-utils = "${PN}-bin" -RCONFLICTS:${PN}-utils = "${PN}-bin" -# ntpdc and ntpq were split out of ntp-utils -RDEPENDS:${PN}-utils = "ntpdc ntpq \ - perl-module-lib \ - perl-module-exporter \ - perl-module-carp \ - perl-module-version \ - perl-module-socket \ - perl-module-getopt-long \ - " - -SYSTEMD_PACKAGES = "${PN} sntp" -SYSTEMD_SERVICE:${PN} = "ntpd.service" -SYSTEMD_SERVICE:sntp = "sntp.service" -SYSTEMD_AUTO_ENABLE:sntp = "disable" - -RPROVIDES:${PN} += "${PN}-systemd" -RREPLACES:${PN} += "${PN}-systemd" -RCONFLICTS:${PN} += "${PN}-systemd" - -RSUGGESTS:${PN} = "iana-etc" - -FILES:${PN} = "${sbindir}/ntpd.ntp ${sysconfdir}/ntp.conf ${sysconfdir}/init.d/ntpd \ - ${NTP_USER_HOME} \ - ${systemd_unitdir}/ntp-units.d/60-ntpd.list \ -" -FILES:${PN}-tickadj = "${sbindir}/tickadj" -FILES:${PN}-utils = "${sbindir} ${datadir}/ntp/lib" -RDEPENDS:${PN}-utils += "perl" -FILES:sntp = "${sbindir}/sntp \ - ${sysconfdir}/default/sntp \ - ${systemd_unitdir}/system/sntp.service \ - " -FILES:ntpdc = "${sbindir}/ntpdc" -FILES:ntpq = "${sbindir}/ntpq" - -CONFFILES:${PN} = "${sysconfdir}/ntp.conf" - -INITSCRIPT_NAME = "ntpd" -# No dependencies, so just go in at the standard level (20) -INITSCRIPT_PARAMS = "defaults" - -inherit update-alternatives - -ALTERNATIVE_PRIORITY = "100" - -ALTERNATIVE:${PN} = "ntpd" -ALTERNATIVE_LINK_NAME[ntpd] = "${sbindir}/ntpd" diff --git a/sources/meta-openembedded/meta-networking/recipes-support/ntp/ntp_4.2.8p18.bb b/sources/meta-openembedded/meta-networking/recipes-support/ntp/ntp_4.2.8p18.bb new file mode 100644 index 00000000..302cf991 --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-support/ntp/ntp_4.2.8p18.bb @@ -0,0 +1,184 @@ +SUMMARY = "Network Time Protocol daemon and utilities" +DESCRIPTION = "The Network Time Protocol (NTP) is used to \ +synchronize the time of a computer client or server to \ +another server or reference time source, such as a radio \ +or satellite receiver or modem." +HOMEPAGE = "http://support.ntp.org" +SECTION = "net" +LICENSE = "NTP" +LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=2311915f6d5142b06395231b0ffeaf29" + +DEPENDS = "libevent" + +SRC_URI = "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-${PV}.tar.gz \ + file://ntp-4.2.4_p6-nano.patch \ + file://reproducibility-fixed-path-to-posix-shell.patch \ + file://0001-libntp-Do-not-use-PTHREAD_STACK_MIN-on-glibc.patch \ + file://0001-test-Fix-build-with-new-compiler-defaults-to-fno-com.patch \ + file://0001-sntp-Fix-types-in-check-for-pthread_detach.patch \ + file://ntpd \ + file://ntp.conf \ + file://ntpd.service \ + file://sntp.service \ + file://sntp \ + file://ntpd.list \ +" + +SRC_URI[sha256sum] = "cf84c5f3fb1a295284942624d823fffa634144e096cfc4f9969ac98ef5f468e5" + +CVE_STATUS[CVE-2016-9312] = "not-applicable-platform: Issue only applies on Windows" +CVE_STATUS[CVE-2019-11331] = "upstream-wontfix: inherent to RFC 5905 and cannot be fixed without breaking compatibility" +CVE_STATUS_GROUPS += "CVE_STATUS_NTP" +CVE_STATUS_NTP[status] = "fixed-version: Yocto CVE check can not handle 'p' in ntp version" +CVE_STATUS_NTP = " \ + CVE-2015-5146 \ + CVE-2015-5300 \ + CVE-2015-7975 \ + CVE-2015-7976 \ + CVE-2015-7977 \ + CVE-2015-7978 \ + CVE-2015-7979 \ + CVE-2015-8138 \ + CVE-2015-8139 \ + CVE-2015-8140 \ + CVE-2015-8158 \ + CVE-2016-1547 \ + CVE-2016-2516 \ + CVE-2016-2517 \ + CVE-2016-2519 \ + CVE-2016-7429 \ + CVE-2016-7433 \ + CVE-2016-9310 \ + CVE-2016-9311 \ +" + + +inherit autotools update-rc.d useradd systemd pkgconfig + +# The ac_cv_header_readline_history is to stop ntpdc depending on either +# readline or curses +EXTRA_OECONF += "--with-net-snmp-config=no \ + --without-ntpsnmpd \ + ac_cv_header_readline_history_h=no \ + --with-yielding_select=yes \ + --with-locfile=redhat \ + --without-rpath \ + " +CFLAGS:append = " -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED" + +USERADD_PACKAGES = "${PN}" +NTP_USER_HOME ?= "/var/lib/ntp" +USERADD_PARAM:${PN} = "--system --home-dir ${NTP_USER_HOME} \ + --no-create-home \ + --shell /bin/false --user-group ntp" + +# NB: debug is default-enabled by NTP; keep it default-enabled here. +PACKAGECONFIG ??= "cap debug refclocks openssl \ + ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \ +" +PACKAGECONFIG[openssl] = "--with-openssl-libdir=${STAGING_LIBDIR} \ + --with-openssl-incdir=${STAGING_INCDIR} \ + --with-crypto, \ + --without-openssl --without-crypto, \ + openssl" +PACKAGECONFIG[cap] = "--enable-linuxcaps,--disable-linuxcaps,libcap" +PACKAGECONFIG[readline] = "--with-lineeditlibs,--without-lineeditlibs,readline" +PACKAGECONFIG[refclocks] = "--enable-all-clocks,--disable-all-clocks,pps-tools" +PACKAGECONFIG[debug] = "--enable-debugging,--disable-debugging" +PACKAGECONFIG[mdns] = "ac_cv_header_dns_sd_h=yes,ac_cv_header_dns_sd_h=no,mdns" +PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," + +do_install:append() { + install -d ${D}${sysconfdir}/init.d + install -m 644 ${UNPACKDIR}/ntp.conf ${D}${sysconfdir} + install -m 755 ${UNPACKDIR}/ntpd ${D}${sysconfdir}/init.d + + install -m 755 -d ${D}${NTP_USER_HOME} + chown ntp:ntp ${D}${NTP_USER_HOME} + + # Fix hardcoded paths in scripts + sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/ntpd + sed -i 's!/usr/bin/!${bindir}/!g' ${D}${sysconfdir}/init.d/ntpd + sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/ntpd + sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/ntpd + sed -i '1s,#!.*perl -w,#! ${bindir}/env perl,' ${D}${sbindir}/ntptrace + sed -i '/use/i use warnings;' ${D}${sbindir}/ntptrace + sed -i '1s,#!.*perl,#! ${bindir}/env perl,' ${D}${sbindir}/ntp-wait + sed -i '/use/i use warnings;' ${D}${sbindir}/ntp-wait + sed -i '1s,#!.*perl -w,#! ${bindir}/env perl,' ${D}${sbindir}/calc_tickadj + sed -i '/use/i use warnings;' ${D}${sbindir}/calc_tickadj + + install -d ${D}/${sysconfdir}/default + install -m 0644 ${UNPACKDIR}/sntp ${D}${sysconfdir}/default/ + + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${UNPACKDIR}/ntpd.service ${D}${systemd_unitdir}/system/ + install -m 0644 ${UNPACKDIR}/sntp.service ${D}${systemd_unitdir}/system/ + + install -d ${D}${systemd_unitdir}/ntp-units.d + install -m 0644 ${UNPACKDIR}/ntpd.list ${D}${systemd_unitdir}/ntp-units.d/60-ntpd.list + + # Remove the empty libexecdir and bindir. + rmdir --ignore-fail-on-non-empty ${D}${libexecdir} + rmdir --ignore-fail-on-non-empty ${D}${bindir} +} + +PACKAGES += "sntp ntpdc ntpq ${PN}-tickadj ${PN}-utils" + +# ntp originally includes tickadj. It's split off for inclusion in small firmware images on platforms +# with wonky clocks (e.g. OpenSlug) +RDEPENDS:${PN} = "${PN}-tickadj" +# ntpd & sntp require libgcc for execution due to phtread_cancel/pthread_exit calls +RDEPENDS:${PN} += "libgcc" +RDEPENDS:sntp += "libgcc" +# Handle move from bin to utils package +RPROVIDES:${PN}-utils = "${PN}-bin" +RREPLACES:${PN}-utils = "${PN}-bin" +RCONFLICTS:${PN}-utils = "${PN}-bin" +# ntpdc and ntpq were split out of ntp-utils +RDEPENDS:${PN}-utils = "ntpdc ntpq \ + perl-module-lib \ + perl-module-exporter \ + perl-module-carp \ + perl-module-version \ + perl-module-socket \ + perl-module-getopt-long \ + " + +SYSTEMD_PACKAGES = "${PN} sntp" +SYSTEMD_SERVICE:${PN} = "ntpd.service" +SYSTEMD_SERVICE:sntp = "sntp.service" +SYSTEMD_AUTO_ENABLE:sntp = "disable" + +RPROVIDES:${PN} += "${PN}-systemd" +RREPLACES:${PN} += "${PN}-systemd" +RCONFLICTS:${PN} += "${PN}-systemd" + +RSUGGESTS:${PN} = "iana-etc" + +FILES:${PN} = "${sbindir}/ntpd.ntp ${sysconfdir}/ntp.conf ${sysconfdir}/init.d/ntpd \ + ${NTP_USER_HOME} \ + ${systemd_unitdir}/ntp-units.d/60-ntpd.list \ +" +FILES:${PN}-tickadj = "${sbindir}/tickadj" +FILES:${PN}-utils = "${sbindir} ${datadir}/ntp/lib" +RDEPENDS:${PN}-utils += "perl" +FILES:sntp = "${sbindir}/sntp \ + ${sysconfdir}/default/sntp \ + ${systemd_unitdir}/system/sntp.service \ + " +FILES:ntpdc = "${sbindir}/ntpdc" +FILES:ntpq = "${sbindir}/ntpq" + +CONFFILES:${PN} = "${sysconfdir}/ntp.conf" + +INITSCRIPT_NAME = "ntpd" +# No dependencies, so just go in at the standard level (20) +INITSCRIPT_PARAMS = "defaults" + +inherit update-alternatives + +ALTERNATIVE_PRIORITY = "100" + +ALTERNATIVE:${PN} = "ntpd" +ALTERNATIVE_LINK_NAME[ntpd] = "${sbindir}/ntpd" diff --git a/sources/meta-openembedded/meta-networking/recipes-support/ntpsec/ntpsec_1.2.2a.bb b/sources/meta-openembedded/meta-networking/recipes-support/ntpsec/ntpsec_1.2.2a.bb index 9ad97e76..872d1ce4 100644 --- a/sources/meta-openembedded/meta-networking/recipes-support/ntpsec/ntpsec_1.2.2a.bb +++ b/sources/meta-openembedded/meta-networking/recipes-support/ntpsec/ntpsec_1.2.2a.bb @@ -81,7 +81,7 @@ do_install:append() { install -m 755 ${S}/etc/rc/ntpd ${D}${sysconfdir}/init.d cp -r ${S}/etc/ntp.d ${D}${sysconfdir} - sed -e 's:@NTP_USER_HOME@:${NTP_USER_HOME}:g' ${WORKDIR}/volatiles.ntpsec >${T}/volatiles.ntpsec + sed -e 's:@NTP_USER_HOME@:${NTP_USER_HOME}:g' ${UNPACKDIR}/volatiles.ntpsec >${T}/volatiles.ntpsec if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then cp ${B}/main/etc/* ${D}${systemd_system_unitdir} awk '{print $1, $5, $4, $2, $3, "-"}' ${T}/volatiles.ntpsec >${T}/tmpfiles.ntpsec diff --git a/sources/meta-openembedded/meta-networking/recipes-support/nuttcp/nuttcp_8.2.2.bb b/sources/meta-openembedded/meta-networking/recipes-support/nuttcp/nuttcp_8.2.2.bb index 115b51e9..b02f775a 100644 --- a/sources/meta-openembedded/meta-networking/recipes-support/nuttcp/nuttcp_8.2.2.bb +++ b/sources/meta-openembedded/meta-networking/recipes-support/nuttcp/nuttcp_8.2.2.bb @@ -18,7 +18,8 @@ SRC_URI = "http://nuttcp.net/${BPN}/beta/${BP}.c \ SRC_URI[md5sum] = "d3c92c4d2f261221193c3726c1b9a42f" SRC_URI[sha256sum] = "8c5595bcd27c2fd66831be74c390df078cfb1870aa427f2511ac2586d236c8a1" -S = "${WORKDIR}" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" do_compile () { ${CC} ${CFLAGS} ${LDFLAGS} -o nuttcp nuttcp-${PV}.c @@ -28,8 +29,8 @@ do_install () { install -d ${D}${bindir} install -d ${D}${systemd_system_unitdir} install -m 0755 nuttcp ${D}${bindir} - install -m 0644 ${WORKDIR}/nuttcp@.service ${D}${systemd_system_unitdir} - install -m 0644 ${WORKDIR}/nuttcp.socket ${D}${systemd_system_unitdir} + install -m 0644 ${UNPACKDIR}/nuttcp@.service ${D}${systemd_system_unitdir} + install -m 0644 ${UNPACKDIR}/nuttcp.socket ${D}${systemd_system_unitdir} } FILES:${PN} += " \ diff --git a/sources/meta-openembedded/meta-networking/recipes-support/open-vm-tools/open-vm-tools_12.3.5.bb b/sources/meta-openembedded/meta-networking/recipes-support/open-vm-tools/open-vm-tools_12.3.5.bb deleted file mode 100644 index 82aab051..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-support/open-vm-tools/open-vm-tools_12.3.5.bb +++ /dev/null @@ -1,124 +0,0 @@ -# This recipe is modified from the recipe originally found in the Open-Switch -# repository: -# -# https://github.com/open-switch/ops-build -# yocto/openswitch/meta-foss-openswitch/meta-oe/recipes-support/open-vm-tools/open-vm-tools_10.0.5.bb -# Commit 9008de2d8e100f3f868c66765742bca9fa98f3f9 -# -# The recipe packaging has been relicensed under the MIT license for inclusion -# in meta-openembedded by agreement of the author (Diego Dompe). -# - -SUMMARY = "Tools to enhance VMWare guest integration and performance" -HOMEPAGE = "https://github.com/vmware/open-vm-tools" -DESCRIPTION = "\ -open-vm-tools is a set of services and modules that enable several features in VMware products \ -for better management of and seamless user interactions with guests.\ -" -SECTION = "vmware-tools" - -LICENSE = "LGPL-2.0-only & GPL-2.0-only & BSD-2-Clause & CDDL-1.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=559317809c5444fb39ceaf6ac45c43ac" -LICENSE:modules/freebsd/vmblock = "BSD-2-Clause" -LICENSE:modules/freebsd/vmmemctl = "GPL-2.0-only" -LICENSE:modules/freebsd/vmxnet = "GPL-2.0-only" -LICENSE:modules/linux = "GPL-2.0-only" -LICENSE:modules/solaris = "CDDL-1.0" - -SRC_URI = "git://github.com/vmware/open-vm-tools.git;protocol=https;branch=stable-12.3.x \ - file://tools.conf \ - file://vmtoolsd.service \ - file://vmtoolsd.init \ - file://0001-configure.ac-don-t-use-dnet-config.patch;patchdir=.. \ - file://0002-Use-configure-test-for-struct-timespec.patch;patchdir=.. \ - file://0003-Fix-definition-of-ALLPERMS-and-ACCESSPERMS.patch;patchdir=.. \ - file://0004-Use-configure-to-test-for-feature-instead-of-platfor.patch;patchdir=.. \ - file://0005-Use-configure-test-for-sys-stat.h-include.patch;patchdir=.. \ - file://0006-Fix-subdir-objects-configure-error.patch;patchdir=.. \ - file://0007-include-poll.h-instead-of-sys-poll.h.patch;patchdir=.. \ - file://0008-Rename-poll.h-to-vm_poll.h.patch;patchdir=.. \ - file://0009-use-posix-strerror_r-unless-on-gnu-libc-system.patch;patchdir=.. \ - file://0010-Use-uintmax_t-for-handling-rlim_t.patch;patchdir=.. \ - file://0011-Use-off64_t-instead-of-__off64_t.patch;patchdir=.. \ - file://0012-hgfsServerLinux-Consider-64bit-time_t-possibility.patch;patchdir=.. \ - file://0013-open-vm-tools-Correct-include-path-for-poll.h.patch;patchdir=.. \ - file://0014-timeSync-Portable-way-to-print-64bit-time_t.patch;patchdir=.. \ - " - -UPSTREAM_CHECK_GITTAGREGEX = "stable-(?P\d+(\.\d+)+)" - -SRC_URI:append:libc-musl = " file://0001-Add-resolv_compat.h-for-musl-builds.patch;patchdir=.. \ -" - -SRCREV = "1b362b9eb449fb5de3809aaea4a636ece30ee5b7" - -S = "${WORKDIR}/git/open-vm-tools" - -DEPENDS = "glib-2.0 glib-2.0-native util-linux libdnet procps libtirpc" - -# open-vm-tools is supported only on x86. -COMPATIBLE_HOST = '(x86_64.*|i.86.*)-linux' - -inherit autotools pkgconfig systemd update-rc.d - -SYSTEMD_SERVICE:${PN} = "vmtoolsd.service" - -EXTRA_OECONF = "--without-icu --disable-multimon --disable-docs \ - --disable-tests --without-gtkmm --without-xerces --without-pam \ - --disable-vgauth --disable-deploypkg --disable-containerinfo \ - --without-root-privileges --without-kernel-modules --with-tirpc \ - --with-udev-rules-dir=${nonarch_base_libdir}/udev/rules.d" - -NO_X11_FLAGS = "--without-x --without-gtk2 --without-gtk3" -X11_DEPENDS = "libxext libxi libxrender libxrandr libxtst gtk+ gdk-pixbuf" -PACKAGECONFIG[x11] = ",${NO_X11_FLAGS},${X11_DEPENDS}" - -# fuse gets implicitly detected; there is no --without-fuse option. -PACKAGECONFIG[fuse] = ",,fuse" - -CFLAGS:append:toolchain-clang = " -Wno-address-of-packed-member -Wno-error=unused-function" -FILES:${PN} += "\ - ${libdir}/open-vm-tools/plugins/vmsvc/lib*.so \ - ${libdir}/open-vm-tools/plugins/common/lib*.so \ - ${sysconfdir}/vmware-tools/tools.conf \ -" -FILES:${PN}-locale += "${datadir}/open-vm-tools/messages" -FILES:${PN}-dev += "${libdir}/open-vm-tools/plugins/common/lib*.la" - -CONFFILES:${PN} += "${sysconfdir}/vmware-tools/tools.conf" - -RDEPENDS:${PN} = "util-linux libdnet fuse" - -do_install:append() { - if ! ${@bb.utils.contains('DISTRO_FEATURES','usrmerge','true','false',d)}; then - install -d ${D}/sbin - ln -sf ${sbindir}/mount.vmhgfs ${D}/sbin/mount.vmhgfs - fi - install -d ${D}${sysconfdir}/vmware-tools - if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then - install -d ${D}${systemd_unitdir}/system - install -m 644 ${WORKDIR}/*.service ${D}${systemd_unitdir}/system - else - install -d ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/vmtoolsd.init ${D}${sysconfdir}/init.d/vmtoolsd - fi - install -m 0644 ${WORKDIR}/tools.conf ${D}${sysconfdir}/vmware-tools/tools.conf -} - -do_configure:prepend() { - export CUSTOM_DNET_NAME=dnet - export CUSTOM_DNET_LIBS=-L${STAGING_LIBDIR}/libdnet.so -} - -INITSCRIPT_PACKAGES = "${PN}" -INITSCRIPT_NAME:${PN} = "vmtoolsd" -INITSCRIPT_PARAMS:${PN} = "start 90 2 3 4 5 . stop 60 0 1 6 ." - -python() { - if 'filesystems-layer' not in d.getVar('BBFILE_COLLECTIONS').split(): - raise bb.parse.SkipRecipe('Requires meta-filesystems to be present to provide fuse.') -} - -CVE_PRODUCT = "open-vm-tools vmware:tools" -CVE_STATUS[CVE-2014-4199] = "fixed-version: No action required. The current version (12.3.5) is not affected by the CVE which affects version 10.0.3" -CVE_STATUS[CVE-2014-4200] = "fixed-version: No action required. The current version (12.3.5) is not affected by the CVE which affects version 10.0.3" diff --git a/sources/meta-openembedded/meta-networking/recipes-support/open-vm-tools/open-vm-tools_12.4.5.bb b/sources/meta-openembedded/meta-networking/recipes-support/open-vm-tools/open-vm-tools_12.4.5.bb new file mode 100644 index 00000000..21782919 --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-support/open-vm-tools/open-vm-tools_12.4.5.bb @@ -0,0 +1,124 @@ +# This recipe is modified from the recipe originally found in the Open-Switch +# repository: +# +# https://github.com/open-switch/ops-build +# yocto/openswitch/meta-foss-openswitch/meta-oe/recipes-support/open-vm-tools/open-vm-tools_10.0.5.bb +# Commit 9008de2d8e100f3f868c66765742bca9fa98f3f9 +# +# The recipe packaging has been relicensed under the MIT license for inclusion +# in meta-openembedded by agreement of the author (Diego Dompe). +# + +SUMMARY = "Tools to enhance VMWare guest integration and performance" +HOMEPAGE = "https://github.com/vmware/open-vm-tools" +DESCRIPTION = "\ +open-vm-tools is a set of services and modules that enable several features in VMware products \ +for better management of and seamless user interactions with guests.\ +" +SECTION = "vmware-tools" + +LICENSE = "LGPL-2.0-only & GPL-2.0-only & BSD-2-Clause & CDDL-1.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=559317809c5444fb39ceaf6ac45c43ac" +LICENSE:modules/freebsd/vmblock = "BSD-2-Clause" +LICENSE:modules/freebsd/vmmemctl = "GPL-2.0-only" +LICENSE:modules/freebsd/vmxnet = "GPL-2.0-only" +LICENSE:modules/linux = "GPL-2.0-only" +LICENSE:modules/solaris = "CDDL-1.0" + +SRC_URI = "git://github.com/vmware/open-vm-tools.git;protocol=https;branch=stable-12.4.x \ + file://tools.conf \ + file://vmtoolsd.service \ + file://vmtoolsd.init \ + file://0001-configure.ac-don-t-use-dnet-config.patch;patchdir=.. \ + file://0002-Use-configure-test-for-struct-timespec.patch;patchdir=.. \ + file://0003-Fix-definition-of-ALLPERMS-and-ACCESSPERMS.patch;patchdir=.. \ + file://0004-Use-configure-to-test-for-feature-instead-of-platfor.patch;patchdir=.. \ + file://0005-Use-configure-test-for-sys-stat.h-include.patch;patchdir=.. \ + file://0006-Fix-subdir-objects-configure-error.patch;patchdir=.. \ + file://0007-include-poll.h-instead-of-sys-poll.h.patch;patchdir=.. \ + file://0008-Rename-poll.h-to-vm_poll.h.patch;patchdir=.. \ + file://0009-use-posix-strerror_r-unless-on-gnu-libc-system.patch;patchdir=.. \ + file://0010-Use-uintmax_t-for-handling-rlim_t.patch;patchdir=.. \ + file://0011-Use-off64_t-instead-of-__off64_t.patch;patchdir=.. \ + file://0012-hgfsServerLinux-Consider-64bit-time_t-possibility.patch;patchdir=.. \ + file://0013-open-vm-tools-Correct-include-path-for-poll.h.patch;patchdir=.. \ + file://0014-timeSync-Portable-way-to-print-64bit-time_t.patch;patchdir=.. \ + " + +UPSTREAM_CHECK_GITTAGREGEX = "stable-(?P\d+(\.\d+)+)" + +SRC_URI:append:libc-musl = " file://0001-Add-resolv_compat.h-for-musl-builds.patch;patchdir=.. \ +" + +SRCREV = "9b94132f54fbed0b86dce04ff4402d1d8fd059c3" + +S = "${WORKDIR}/git/open-vm-tools" + +DEPENDS = "glib-2.0 glib-2.0-native util-linux libdnet procps libtirpc" + +# open-vm-tools is supported only on x86. +COMPATIBLE_HOST = '(x86_64.*|i.86.*)-linux' + +inherit autotools pkgconfig systemd update-rc.d + +SYSTEMD_SERVICE:${PN} = "vmtoolsd.service" + +EXTRA_OECONF = "--without-icu --disable-multimon --disable-docs \ + --disable-tests --without-gtkmm --without-pam \ + --disable-vgauth --disable-deploypkg --disable-containerinfo \ + --without-root-privileges --without-kernel-modules --with-tirpc \ + --with-udev-rules-dir=${nonarch_base_libdir}/udev/rules.d" + +NO_X11_FLAGS = "--without-x --without-gtk2 --without-gtk3" +X11_DEPENDS = "libxext libxi libxrender libxrandr libxtst gtk+ gdk-pixbuf" +PACKAGECONFIG[x11] = ",${NO_X11_FLAGS},${X11_DEPENDS}" + +# fuse gets implicitly detected; there is no --without-fuse option. +PACKAGECONFIG[fuse] = ",,fuse" + +CFLAGS:append:toolchain-clang = " -Wno-address-of-packed-member -Wno-error=unused-function" +FILES:${PN} += "\ + ${libdir}/open-vm-tools/plugins/vmsvc/lib*.so \ + ${libdir}/open-vm-tools/plugins/common/lib*.so \ + ${sysconfdir}/vmware-tools/tools.conf \ +" +FILES:${PN}-locale += "${datadir}/open-vm-tools/messages" +FILES:${PN}-dev += "${libdir}/open-vm-tools/plugins/common/lib*.la" + +CONFFILES:${PN} += "${sysconfdir}/vmware-tools/tools.conf" + +RDEPENDS:${PN} = "util-linux libdnet fuse" + +do_install:append() { + if ! ${@bb.utils.contains('DISTRO_FEATURES','usrmerge','true','false',d)}; then + install -d ${D}/sbin + ln -sf ${sbindir}/mount.vmhgfs ${D}/sbin/mount.vmhgfs + fi + install -d ${D}${sysconfdir}/vmware-tools + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + install -d ${D}${systemd_unitdir}/system + install -m 644 ${UNPACKDIR}/*.service ${D}${systemd_unitdir}/system + else + install -d ${D}${sysconfdir}/init.d + install -m 0755 ${UNPACKDIR}/vmtoolsd.init ${D}${sysconfdir}/init.d/vmtoolsd + fi + install -m 0644 ${UNPACKDIR}/tools.conf ${D}${sysconfdir}/vmware-tools/tools.conf +} + +do_configure:prepend() { + export CUSTOM_DNET_NAME=dnet + export CUSTOM_DNET_LIBS=-L${STAGING_LIBDIR}/libdnet.so +} + +INITSCRIPT_PACKAGES = "${PN}" +INITSCRIPT_NAME:${PN} = "vmtoolsd" +INITSCRIPT_PARAMS:${PN} = "start 90 2 3 4 5 . stop 60 0 1 6 ." + +python() { + if 'filesystems-layer' not in d.getVar('BBFILE_COLLECTIONS').split(): + raise bb.parse.SkipRecipe('Requires meta-filesystems to be present to provide fuse.') +} + +CVE_PRODUCT = "open-vm-tools vmware:tools" +CVE_STATUS[CVE-2014-4199] = "fixed-version: No action required. The current version (12.3.5) is not affected by the CVE which affects version 10.0.3" +CVE_STATUS[CVE-2014-4200] = "fixed-version: No action required. The current version (12.3.5) is not affected by the CVE which affects version 10.0.3" diff --git a/sources/meta-openembedded/meta-networking/recipes-support/openipmi/openipmi_2.0.36.bb b/sources/meta-openembedded/meta-networking/recipes-support/openipmi/openipmi_2.0.36.bb index 583b64c7..74c5ef22 100644 --- a/sources/meta-openembedded/meta-networking/recipes-support/openipmi/openipmi_2.0.36.bb +++ b/sources/meta-openembedded/meta-networking/recipes-support/openipmi/openipmi_2.0.36.bb @@ -102,10 +102,10 @@ do_install:append () { # for systemd install -d ${D}${systemd_unitdir}/system - install -m 0664 ${WORKDIR}/ipmi.service ${D}${systemd_unitdir}/system + install -m 0664 ${UNPACKDIR}/ipmi.service ${D}${systemd_unitdir}/system sed -i -e "s,@LIBEXECDIR@,${libexecdir},g" ${D}${systemd_unitdir}/system/ipmi.service install -d ${D}${libexecdir} - install -m 0755 ${WORKDIR}/openipmi-helper ${D}${libexecdir} + install -m 0755 ${UNPACKDIR}/openipmi-helper ${D}${libexecdir} } INITSCRIPT_NAME = "ipmi" diff --git a/sources/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn/0001-configure.ac-eliminate-build-path-from-openvpn-versi.patch b/sources/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn/0001-configure.ac-eliminate-build-path-from-openvpn-versi.patch index 03b454d6..e1253db1 100644 --- a/sources/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn/0001-configure.ac-eliminate-build-path-from-openvpn-versi.patch +++ b/sources/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn/0001-configure.ac-eliminate-build-path-from-openvpn-versi.patch @@ -1,4 +1,4 @@ -From ea179d83b0aa62719d90748cd1fb260f40055f15 Mon Sep 17 00:00:00 2001 +From 9cc13bdcb71cd16d2873637c491e07c01de9a3ea Mon Sep 17 00:00:00 2001 From: Yi Zhao Date: Mon, 13 Jun 2022 22:44:28 +0800 Subject: [PATCH] configure.ac: eliminate build path from openvpn --version @@ -31,10 +31,10 @@ Signed-off-by: Yi Zhao 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac -index 2f5f6bc..eddcbc5 100644 +index df16c43..623ca65 100644 --- a/configure.ac +++ b/configure.ac -@@ -1377,7 +1377,7 @@ if test "${enable_async_push}" = "yes"; then +@@ -1463,7 +1463,7 @@ if test "${enable_async_push}" = "yes"; then esac fi @@ -43,6 +43,3 @@ index 2f5f6bc..eddcbc5 100644 AC_DEFINE_UNQUOTED([CONFIGURE_DEFINES], ["`echo ${CONFIGURE_DEFINES}`"], [Configuration settings]) TAP_WIN_COMPONENT_ID="PRODUCT_TAP_WIN_COMPONENT_ID" --- -2.25.1 - diff --git a/sources/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn_2.6.12.bb b/sources/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn_2.6.12.bb new file mode 100644 index 00000000..d81b8ce4 --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn_2.6.12.bb @@ -0,0 +1,76 @@ +SUMMARY = "A full-featured SSL VPN solution via tun device." +HOMEPAGE = "https://openvpn.net/" +SECTION = "net" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=89196bacc47ed37a5b242a535661a049" +DEPENDS = "lzo lz4 openssl iproute2 libcap-ng ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" + +inherit autotools systemd update-rc.d pkgconfig + +SRC_URI = "http://swupdate.openvpn.org/community/releases/${BP}.tar.gz \ + file://0001-configure.ac-eliminate-build-path-from-openvpn-versi.patch \ + file://openvpn \ + " + +UPSTREAM_CHECK_URI = "https://openvpn.net/community-downloads" + +SRC_URI[sha256sum] = "1c610fddeb686e34f1367c347e027e418e07523a10f4d8ce4a2c2af2f61a1929" + +CVE_STATUS[CVE-2020-27569] = "not-applicable-config: Applies only Aviatrix OpenVPN client, not openvpn" + +INITSCRIPT_PACKAGES = "${PN}" +INITSCRIPT_NAME:${PN} = "openvpn" +INITSCRIPT_PARAMS:${PN} = "start 10 2 3 4 5 . stop 70 0 1 6 ." + +CFLAGS += "-fno-inline" + +# I want openvpn to be able to read password from file (hrw) +EXTRA_OECONF += "--enable-iproute2" +EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '', '--disable-plugin-auth-pam', d)}" + +# Explicitly specify IPROUTE to bypass the configure-time check for /sbin/ip on the host. +EXTRA_OECONF += "IPROUTE=${base_sbindir}/ip" + +EXTRA_OECONF += "SYSTEMD_UNIT_DIR=${systemd_system_unitdir} \ + TMPFILES_DIR=${nonarch_libdir}/tmpfiles.d \ + " + +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'selinux', d)} \ + " + +PACKAGECONFIG[systemd] = "--enable-systemd,--disable-systemd,systemd" +PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux" + +do_install:append() { + install -d ${D}/${sysconfdir}/init.d + install -m 755 ${UNPACKDIR}/openvpn ${D}/${sysconfdir}/init.d + + install -d ${D}/${sysconfdir}/openvpn + install -d ${D}/${sysconfdir}/openvpn/server + install -d ${D}/${sysconfdir}/openvpn/client + + install -d ${D}/${sysconfdir}/openvpn/sample + install -m 644 ${S}/sample/sample-config-files/loopback-server ${D}${sysconfdir}/openvpn/sample/loopback-server.conf + install -m 644 ${S}/sample/sample-config-files/loopback-client ${D}${sysconfdir}/openvpn/sample/loopback-client.conf + install -dm 755 ${D}${sysconfdir}/openvpn/sample/sample-config-files + install -dm 755 ${D}${sysconfdir}/openvpn/sample/sample-keys + install -dm 755 ${D}${sysconfdir}/openvpn/sample/sample-scripts + install -m 644 ${S}/sample/sample-config-files/* ${D}${sysconfdir}/openvpn/sample/sample-config-files + install -m 644 ${S}/sample/sample-keys/* ${D}${sysconfdir}/openvpn/sample/sample-keys + install -m 644 ${S}/sample/sample-scripts/* ${D}${sysconfdir}/openvpn/sample/sample-scripts + + install -d -m 710 ${D}/${localstatedir}/lib/openvpn +} + +PACKAGES =+ " ${PN}-sample " + +RRECOMMENDS:${PN} = "kernel-module-tun" + +FILES:${PN}-dbg += "${libdir}/openvpn/plugins/.debug" +FILES:${PN} += "${systemd_system_unitdir}/openvpn-server@.service \ + ${systemd_system_unitdir}/openvpn-client@.service \ + ${nonarch_libdir}/tmpfiles.d \ + " +FILES:${PN}-sample = "${sysconfdir}/openvpn/sample/ \ + " diff --git a/sources/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn_2.6.14.bb b/sources/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn_2.6.14.bb deleted file mode 100644 index 5361709f..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn_2.6.14.bb +++ /dev/null @@ -1,76 +0,0 @@ -SUMMARY = "A full-featured SSL VPN solution via tun device." -HOMEPAGE = "https://openvpn.net/" -SECTION = "net" -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=89196bacc47ed37a5b242a535661a049" -DEPENDS = "lzo lz4 openssl iproute2 libcap-ng ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" - -inherit autotools systemd update-rc.d pkgconfig - -SRC_URI = "http://swupdate.openvpn.org/community/releases/${BP}.tar.gz \ - file://0001-configure.ac-eliminate-build-path-from-openvpn-versi.patch \ - file://openvpn \ - " - -UPSTREAM_CHECK_URI = "https://openvpn.net/community-downloads" - -SRC_URI[sha256sum] = "9eb6a6618352f9e7b771a9d38ae1631b5edfeed6d40233e243e602ddf2195e7a" - -CVE_STATUS[CVE-2020-27569] = "not-applicable-config: Applies only Aviatrix OpenVPN client, not openvpn" - -INITSCRIPT_PACKAGES = "${PN}" -INITSCRIPT_NAME:${PN} = "openvpn" -INITSCRIPT_PARAMS:${PN} = "start 10 2 3 4 5 . stop 70 0 1 6 ." - -CFLAGS += "-fno-inline" - -# I want openvpn to be able to read password from file (hrw) -EXTRA_OECONF += "--enable-iproute2" -EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '', '--disable-plugin-auth-pam', d)}" - -# Explicitly specify IPROUTE to bypass the configure-time check for /sbin/ip on the host. -EXTRA_OECONF += "IPROUTE=${base_sbindir}/ip" - -EXTRA_OECONF += "SYSTEMD_UNIT_DIR=${systemd_system_unitdir} \ - TMPFILES_DIR=${nonarch_libdir}/tmpfiles.d \ - " - -PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \ - ${@bb.utils.filter('DISTRO_FEATURES', 'selinux', d)} \ - " - -PACKAGECONFIG[systemd] = "--enable-systemd,--disable-systemd,systemd" -PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux" - -do_install:append() { - install -d ${D}/${sysconfdir}/init.d - install -m 755 ${WORKDIR}/openvpn ${D}/${sysconfdir}/init.d - - install -d ${D}/${sysconfdir}/openvpn - install -d ${D}/${sysconfdir}/openvpn/server - install -d ${D}/${sysconfdir}/openvpn/client - - install -d ${D}/${sysconfdir}/openvpn/sample - install -m 644 ${S}/sample/sample-config-files/loopback-server ${D}${sysconfdir}/openvpn/sample/loopback-server.conf - install -m 644 ${S}/sample/sample-config-files/loopback-client ${D}${sysconfdir}/openvpn/sample/loopback-client.conf - install -dm 755 ${D}${sysconfdir}/openvpn/sample/sample-config-files - install -dm 755 ${D}${sysconfdir}/openvpn/sample/sample-keys - install -dm 755 ${D}${sysconfdir}/openvpn/sample/sample-scripts - install -m 644 ${S}/sample/sample-config-files/* ${D}${sysconfdir}/openvpn/sample/sample-config-files - install -m 644 ${S}/sample/sample-keys/* ${D}${sysconfdir}/openvpn/sample/sample-keys - install -m 644 ${S}/sample/sample-scripts/* ${D}${sysconfdir}/openvpn/sample/sample-scripts - - install -d -m 710 ${D}/${localstatedir}/lib/openvpn -} - -PACKAGES =+ " ${PN}-sample " - -RRECOMMENDS:${PN} = "kernel-module-tun" - -FILES:${PN}-dbg += "${libdir}/openvpn/plugins/.debug" -FILES:${PN} += "${systemd_system_unitdir}/openvpn-server@.service \ - ${systemd_system_unitdir}/openvpn-client@.service \ - ${nonarch_libdir}/tmpfiles.d \ - " -FILES:${PN}-sample = "${sysconfdir}/openvpn/sample/ \ - " diff --git a/sources/meta-openembedded/meta-networking/recipes-support/pgpool2/pgpool2_4.5.1.bb b/sources/meta-openembedded/meta-networking/recipes-support/pgpool2/pgpool2_4.5.1.bb index ffb87995..ddcad46b 100644 --- a/sources/meta-openembedded/meta-networking/recipes-support/pgpool2/pgpool2_4.5.1.bb +++ b/sources/meta-openembedded/meta-networking/recipes-support/pgpool2/pgpool2_4.5.1.bb @@ -43,8 +43,8 @@ do_configure:append() { do_install:append() { install -d ${D}${sysconfdir}/pgpool-II - install -D -m 0644 ${WORKDIR}/pgpool.sysconfig ${D}${sysconfdir}/pgpool-II/pgpool.conf + install -D -m 0644 ${UNPACKDIR}/pgpool.sysconfig ${D}${sysconfdir}/pgpool-II/pgpool.conf install -D -m 0644 ${S}/src/sample/pcp.conf.sample ${D}${sysconfdir}/pgpool-II/pcp.conf install -D -m 0644 ${S}/src/sample/pool_hba.conf.sample ${D}${sysconfdir}/pgpool-II/pool_hba.conf - install -Dm 0644 ${WORKDIR}/pgpool.service ${D}${systemd_system_unitdir}/pgpool.service + install -Dm 0644 ${UNPACKDIR}/pgpool.service ${D}${systemd_system_unitdir}/pgpool.service } diff --git a/sources/meta-openembedded/meta-networking/recipes-support/rdma-core/rdma-core/0001-librdmacm-Use-overloadable-function-attribute-with-c.patch b/sources/meta-openembedded/meta-networking/recipes-support/rdma-core/rdma-core/0001-librdmacm-Use-overloadable-function-attribute-with-c.patch new file mode 100644 index 00000000..092f4431 --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-support/rdma-core/rdma-core/0001-librdmacm-Use-overloadable-function-attribute-with-c.patch @@ -0,0 +1,38 @@ +From c7de6834f0cd92b7341ab17a5c6996f3fbd40140 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 21 Jun 2024 22:16:47 -0700 +Subject: [PATCH] librdmacm: Use overloadable function attribute with clang + + This is to fix build warnings seen with upcoming clang19 and + glibc 2.40, since glibc 2.40 has improved fortyfying this + function with clang, it ends up with build errors like below + +librdmacm/preload.c:796:9: error: at most one overload for a given name may lack the 'overloadable' attribute +| 796 | ssize_t recvfrom(int socket, void *buf, size_t len, int flags, +| | ^ +| /mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux/rdma-core/51.0/recipe-sysroot/usr/include/sys/socket.h:163:16: note: previous unmarked overload of function is here +| 163 | extern ssize_t recvfrom (int __fd, void *__restrict __buf, size_t __n, +| | ^ + +Upstream-Status: Submitted [https://github.com/linux-rdma/rdma-core/pull/1475] +Signed-off-by: Khem Raj +--- + librdmacm/preload.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +--- a/librdmacm/preload.c ++++ b/librdmacm/preload.c +@@ -792,8 +792,11 @@ ssize_t recv(int socket, void *buf, size + return (fd_fork_get(socket, &fd) == fd_rsocket) ? + rrecv(fd, buf, len, flags) : real.recv(fd, buf, len, flags); + } +- +-ssize_t recvfrom(int socket, void *buf, size_t len, int flags, ++ssize_t ++#if defined(__clang__) && defined(__GLIBC__) ++__attribute__((overloadable)) ++#endif ++recvfrom(int socket, void *buf, size_t len, int flags, + struct sockaddr *src_addr, socklen_t *addrlen) + { + int fd; diff --git a/sources/meta-openembedded/meta-networking/recipes-support/rdma-core/rdma-core_51.0.bb b/sources/meta-openembedded/meta-networking/recipes-support/rdma-core/rdma-core_51.0.bb index 7c26a8c4..0c204c10 100644 --- a/sources/meta-openembedded/meta-networking/recipes-support/rdma-core/rdma-core_51.0.bb +++ b/sources/meta-openembedded/meta-networking/recipes-support/rdma-core/rdma-core_51.0.bb @@ -8,6 +8,7 @@ RDEPENDS:${PN} = "bash perl" SRC_URI = "git://github.com/linux-rdma/rdma-core.git;branch=master;protocol=https \ file://0001-cmake-Allow-SYSTEMCTL_BIN-to-be-overridden-from-envi.patch \ file://0001-include-libgen.h-for-basename.patch \ + file://0001-librdmacm-Use-overloadable-function-attribute-with-c.patch \ " SRCREV = "6cd09097ad2eebde9a7fa3d3bb09a2cea6e3c2d6" S = "${WORKDIR}/git" diff --git a/sources/meta-openembedded/meta-networking/recipes-support/smcroute/smcroute_2.5.6.bb b/sources/meta-openembedded/meta-networking/recipes-support/smcroute/smcroute_2.5.6.bb deleted file mode 100644 index 09752825..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-support/smcroute/smcroute_2.5.6.bb +++ /dev/null @@ -1,13 +0,0 @@ -SUMMARY = "Static Multicast Routing Daemon" -DESCRIPTION = "SMCRoute is a daemon and command line tool to manipulate the multicast routing table in the UNIX kernel." -HOMEPAGE = "http://troglobit.github.io/smcroute.html" -SECTION = "net" -LICENSE = "GPL-2.0-or-later" -LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" - -SRCREV = "999bdd724a1f963ac8bfd0598ffdd2a3d651646e" -SRC_URI = "git://github.com/troglobit/smcroute.git;branch=master;protocol=https" - -S = "${WORKDIR}/git" - -inherit autotools pkgconfig diff --git a/sources/meta-openembedded/meta-networking/recipes-support/smcroute/smcroute_2.5.7.bb b/sources/meta-openembedded/meta-networking/recipes-support/smcroute/smcroute_2.5.7.bb new file mode 100644 index 00000000..950f6a2e --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-support/smcroute/smcroute_2.5.7.bb @@ -0,0 +1,13 @@ +SUMMARY = "Static Multicast Routing Daemon" +DESCRIPTION = "SMCRoute is a daemon and command line tool to manipulate the multicast routing table in the UNIX kernel." +HOMEPAGE = "http://troglobit.github.io/smcroute.html" +SECTION = "net" +LICENSE = "GPL-2.0-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" + +SRCREV = "b315d06ddb0dad16a52fe91e5831b4030ce37010" +SRC_URI = "git://github.com/troglobit/smcroute.git;branch=master;protocol=https" + +S = "${WORKDIR}/git" + +inherit autotools pkgconfig diff --git a/sources/meta-openembedded/meta-networking/recipes-support/sngrep/sngrep_1.8.1.bb b/sources/meta-openembedded/meta-networking/recipes-support/sngrep/sngrep_1.8.1.bb deleted file mode 100644 index 50248078..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-support/sngrep/sngrep_1.8.1.bb +++ /dev/null @@ -1,37 +0,0 @@ -SUMMARY = "Ncurses SIP Messages flow viewer" -DESCRIPTION = "Tool for displaying SIP calls message flows from terminal" -HOMEPAGE = "https://github.com/irontec/sngrep" -BUGTRACKER = "https://github.com/irontec/sngrep/issues" -SECTION = "console/network" -LICENSE = "GPL-3.0-or-later & OpenSSL" -LIC_FILES_CHKSUM = "\ - file://LICENSE;md5=d32239bcb673463ab874e80d47fae504 \ - file://LICENSE.OpenSSL;md5=e39170c41c6f83de36426dbf49a03632 \ - file://README;beginline=100;endline=124;md5=758a88cf2b27572df05996a3810066b3 \ -" - -DEPENDS = "\ - libpcap \ - ncurses \ -" - -SRC_URI = "git://github.com/irontec/sngrep.git;protocol=https;branch=master" -SRCREV = "373abb90804ba71f980c7120e62f90d3a5c81213" - -S = "${WORKDIR}/git" - -inherit cmake pkgconfig - -PACKAGECONFIG ?= "\ - openssl \ - ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \ - unicode \ -" - -PACKAGECONFIG[openssl] = "-DWITH_OPENSSL=ON,-DWITH_OPENSSL=OFF,openssl" -PACKAGECONFIG[gnutls] = "-DWITH_GNUTLS=ON,-DWITH_GNUTLS=OFF,gnutls libgcrypt" -PACKAGECONFIG[pcre] = "-DWITH_PCRE=OFF,-DWITH_PCRE=OFF,libpcre" -PACKAGECONFIG[zlib] = "-DWITH_ZLIB=ON,-DWITH_ZLIB=OFF,zlib" -PACKAGECONFIG[unicode] = "-DWITH_UNICODE=ON,-DWITH_UNICODE=OFF" -PACKAGECONFIG[ipv6] = "-DUSE_IPV6=ON,-DUSE_IPV6=OFF" -PACKAGECONFIG[eep] = "-DUSE_EEP=ON,-DUSE_EEP=OFF" diff --git a/sources/meta-openembedded/meta-networking/recipes-support/sngrep/sngrep_1.8.2.bb b/sources/meta-openembedded/meta-networking/recipes-support/sngrep/sngrep_1.8.2.bb new file mode 100644 index 00000000..518ca9e2 --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-support/sngrep/sngrep_1.8.2.bb @@ -0,0 +1,37 @@ +SUMMARY = "Ncurses SIP Messages flow viewer" +DESCRIPTION = "Tool for displaying SIP calls message flows from terminal" +HOMEPAGE = "https://github.com/irontec/sngrep" +BUGTRACKER = "https://github.com/irontec/sngrep/issues" +SECTION = "console/network" +LICENSE = "GPL-3.0-or-later & OpenSSL" +LIC_FILES_CHKSUM = "\ + file://LICENSE;md5=d32239bcb673463ab874e80d47fae504 \ + file://LICENSE.OpenSSL;md5=e39170c41c6f83de36426dbf49a03632 \ + file://README;beginline=100;endline=124;md5=758a88cf2b27572df05996a3810066b3 \ +" + +DEPENDS = "\ + libpcap \ + ncurses \ +" + +SRC_URI = "git://github.com/irontec/sngrep.git;protocol=https;branch=master" +SRCREV = "dad1033640f249fa4994f976cf6ee96826c15702" + +S = "${WORKDIR}/git" + +inherit cmake pkgconfig + +PACKAGECONFIG ?= "\ + openssl \ + ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \ + unicode \ +" + +PACKAGECONFIG[openssl] = "-DWITH_OPENSSL=ON,-DWITH_OPENSSL=OFF,openssl" +PACKAGECONFIG[gnutls] = "-DWITH_GNUTLS=ON,-DWITH_GNUTLS=OFF,gnutls libgcrypt" +PACKAGECONFIG[pcre] = "-DWITH_PCRE=OFF,-DWITH_PCRE=OFF,libpcre" +PACKAGECONFIG[zlib] = "-DWITH_ZLIB=ON,-DWITH_ZLIB=OFF,zlib" +PACKAGECONFIG[unicode] = "-DWITH_UNICODE=ON,-DWITH_UNICODE=OFF" +PACKAGECONFIG[ipv6] = "-DUSE_IPV6=ON,-DUSE_IPV6=OFF" +PACKAGECONFIG[eep] = "-DUSE_EEP=ON,-DUSE_EEP=OFF" diff --git a/sources/meta-openembedded/meta-networking/recipes-support/spice/spice-gtk_0.42.bb b/sources/meta-openembedded/meta-networking/recipes-support/spice/spice-gtk_0.42.bb index c8a3f7f5..4ef39f09 100644 --- a/sources/meta-openembedded/meta-networking/recipes-support/spice/spice-gtk_0.42.bb +++ b/sources/meta-openembedded/meta-networking/recipes-support/spice/spice-gtk_0.42.bb @@ -12,6 +12,8 @@ SRCREV = "f04479c16f0969fb394ebe74b6eff74e560a42f0" SRC_URI = "gitsm://gitlab.freedesktop.org/spice/spice-gtk.git;protocol=https;branch=master" +CVE_STATUS[CVE-2012-4425] = "fixed-version: fixed since 0.15.3" + S = "${WORKDIR}/git" DEPENDS = " \ diff --git a/sources/meta-openembedded/meta-networking/recipes-support/spice/spice_git.bb b/sources/meta-openembedded/meta-networking/recipes-support/spice/spice_git.bb index 419316a2..5e6d8584 100644 --- a/sources/meta-openembedded/meta-networking/recipes-support/spice/spice_git.bb +++ b/sources/meta-openembedded/meta-networking/recipes-support/spice/spice_git.bb @@ -21,6 +21,7 @@ SRC_URI = "gitsm://gitlab.freedesktop.org/spice/spice;branch=master;protocol=htt S = "${WORKDIR}/git" +CVE_STATUS[CVE-2016-0749] = "fixed-version: patched since 0.13.2" CVE_STATUS[CVE-2018-10893] = "fixed-version: patched already, caused by inaccurate CPE in the NVD database." inherit meson gettext python3native python3-dir pkgconfig diff --git a/sources/meta-openembedded/meta-networking/recipes-support/spice/usbredir_0.13.0.bb b/sources/meta-openembedded/meta-networking/recipes-support/spice/usbredir_0.13.0.bb deleted file mode 100644 index 3a73f9b1..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-support/spice/usbredir_0.13.0.bb +++ /dev/null @@ -1,18 +0,0 @@ -SUMMARY = "usbredir libraries and utilities" - -LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://COPYING.LIB;md5=4b54a1fd55a448865a0b32d41598759d \ -" - -DEPENDS = "libusb1 glib-2.0" - -SRCREV = "5fc0e1c43194d948545941d408f4c10d084eb6ed" - -SRC_URI = "git://gitlab.freedesktop.org/spice/usbredir;branch=main;protocol=https" - -S = "${WORKDIR}/git" - -inherit meson pkgconfig - -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-networking/recipes-support/spice/usbredir_0.14.0.bb b/sources/meta-openembedded/meta-networking/recipes-support/spice/usbredir_0.14.0.bb new file mode 100644 index 00000000..82f48ccd --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-support/spice/usbredir_0.14.0.bb @@ -0,0 +1,18 @@ +SUMMARY = "usbredir libraries and utilities" + +LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://COPYING.LIB;md5=4b54a1fd55a448865a0b32d41598759d \ +" + +DEPENDS = "libusb1 glib-2.0" + +SRCREV = "2d373432e604960c1dcc14fb97098febe4d64025" + +SRC_URI = "git://gitlab.freedesktop.org/spice/usbredir;branch=main;protocol=https" + +S = "${WORKDIR}/git" + +inherit meson pkgconfig + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-networking/recipes-support/ssmping/ssmping_0.9.1.bb b/sources/meta-openembedded/meta-networking/recipes-support/ssmping/ssmping_0.9.1.bb index 0531ffe6..2d631197 100644 --- a/sources/meta-openembedded/meta-networking/recipes-support/ssmping/ssmping_0.9.1.bb +++ b/sources/meta-openembedded/meta-networking/recipes-support/ssmping/ssmping_0.9.1.bb @@ -15,3 +15,7 @@ CFLAGS += "-D_GNU_SOURCE " do_install() { oe_runmake 'DESTDIR=${D}' 'PREFIX=${prefix}' install } + +# http://errors.yoctoproject.org/Errors/Details/766895/ +# ssmping.c:55:51: error: passing argument 3 of 'getsockname' from incompatible pointer type [-Wincompatible-pointer-types] +CFLAGS += "-Wno-error=incompatible-pointer-types" diff --git a/sources/meta-openembedded/meta-networking/recipes-support/stunnel/stunnel/fix-openssl-no-des.patch b/sources/meta-openembedded/meta-networking/recipes-support/stunnel/stunnel/fix-openssl-no-des.patch index 82d35510..8c4ca55f 100644 --- a/sources/meta-openembedded/meta-networking/recipes-support/stunnel/stunnel/fix-openssl-no-des.patch +++ b/sources/meta-openembedded/meta-networking/recipes-support/stunnel/stunnel/fix-openssl-no-des.patch @@ -1,4 +1,4 @@ -From 7ff4eba20b5c4fc7365e5ee0dfb775ed29bdd5ce Mon Sep 17 00:00:00 2001 +From c815368a3e41dd3f639eb8fd82d21bc0bab55d1e Mon Sep 17 00:00:00 2001 From: Kai Kang Date: Wed, 1 Nov 2017 09:23:41 -0400 Subject: [PATCH] stunnel: fix compile error when openssl disable des support @@ -17,10 +17,10 @@ Signed-off-by: Kai Kang 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/common.h b/src/common.h -index 2b4869f..180d31a 100644 +index f112cf9..8d4be01 100644 --- a/src/common.h +++ b/src/common.h -@@ -492,7 +492,9 @@ extern char *sys_errlist[]; +@@ -496,7 +496,9 @@ extern char *sys_errlist[]; #ifndef OPENSSL_NO_MD4 #include #endif /* !defined(OPENSSL_NO_MD4) */ @@ -31,19 +31,19 @@ index 2b4869f..180d31a 100644 #include #if OPENSSL_VERSION_NUMBER<0x10100000L diff --git a/src/protocol.c b/src/protocol.c -index cfe6d3b..3936aea 100644 +index c8c65ea..b071b06 100644 --- a/src/protocol.c +++ b/src/protocol.c -@@ -81,7 +81,7 @@ NOEXPORT void ldap_client_middle(CLI *); - +@@ -82,7 +82,7 @@ NOEXPORT void ldap_client_middle(CLI *); NOEXPORT void connect_server_early(CLI *); + NOEXPORT const char *connect_client_init(SERVICE_OPTIONS *); NOEXPORT void connect_client_middle(CLI *); -#ifndef OPENSSL_NO_MD4 +#if !defined(OPENSSL_NO_MD4) && !defined(OPENSSL_NO_DES) NOEXPORT void ntlm(CLI *); NOEXPORT char *ntlm1(void); NOEXPORT char *ntlm3(char *, char *, char *, char *); -@@ -1331,7 +1331,7 @@ NOEXPORT void connect_client_middle(CLI *c) { +@@ -1334,7 +1334,7 @@ NOEXPORT void connect_client_middle(CLI *c) { fd_printf(c, c->remote_fd.fd, "Host: %s", c->opt->protocol_host); if(c->opt->protocol_username && c->opt->protocol_password) { if(!strcasecmp(c->opt->protocol_authentication, "ntlm")) { @@ -52,7 +52,7 @@ index cfe6d3b..3936aea 100644 ntlm(c); #else s_log(LOG_ERR, "NTLM authentication is not available"); -@@ -1374,7 +1374,7 @@ NOEXPORT void connect_client_middle(CLI *c) { +@@ -1377,7 +1377,7 @@ NOEXPORT void connect_client_middle(CLI *c) { str_free(line); } @@ -61,6 +61,3 @@ index cfe6d3b..3936aea 100644 /* * NTLM code is based on the following documentation: --- -2.34.1 - diff --git a/sources/meta-openembedded/meta-networking/recipes-support/stunnel/stunnel_5.72.bb b/sources/meta-openembedded/meta-networking/recipes-support/stunnel/stunnel_5.72.bb deleted file mode 100644 index 6d21027a..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-support/stunnel/stunnel_5.72.bb +++ /dev/null @@ -1,33 +0,0 @@ -SUMMARY = "Program for providing universal TLS/SSL tunneling service" -DESCRIPTION = "SSL encryption wrapper between remote client and local (inetd-startable) or remote server." -HOMEPAGE = "https://www.stunnel.org/" -SECTION = "net" -LICENSE = "GPL-2.0-or-later" -LIC_FILES_CHKSUM = "file://COPYING.md;md5=906ac034adaee9d093318e51b53453ca" - -DEPENDS = "autoconf-archive libnsl2 openssl" - -SRC_URI = "https://stunnel.org/archive/5.x/${BP}.tar.gz \ - file://fix-openssl-no-des.patch \ -" - -SRC_URI[sha256sum] = "3d532941281ae353319735144e4adb9ae489a10b7e309c58a48157f08f42e949" - -inherit autotools bash-completion pkgconfig - -PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6 systemd', d)} libwrap" - -PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," -PACKAGECONFIG[libwrap] = "--enable-libwrap,--disable-libwrap,tcp-wrappers" -PACKAGECONFIG[systemd] = "--enable-systemd,--disable-systemd,systemd" - -EXTRA_OECONF += "--with-ssl='${STAGING_EXECPREFIXDIR}' --disable-fips" - -# When cross compiling, configure defaults to nobody, but provides no option to change it. -EXTRA_OEMAKE += "DEFAULT_GROUP='nogroup'" - -# stunnel3 is a Perl wrapper to allow use of the legacy stunnel 3.x commandline -# syntax with stunnel >= 4.05 -PACKAGES =+ "stunnel3" -FILES:stunnel3 = "${bindir}/stunnel3" -RDEPENDS:stunnel3 += "${PN} perl" diff --git a/sources/meta-openembedded/meta-networking/recipes-support/stunnel/stunnel_5.73.bb b/sources/meta-openembedded/meta-networking/recipes-support/stunnel/stunnel_5.73.bb new file mode 100644 index 00000000..e13b7871 --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-support/stunnel/stunnel_5.73.bb @@ -0,0 +1,33 @@ +SUMMARY = "Program for providing universal TLS/SSL tunneling service" +DESCRIPTION = "SSL encryption wrapper between remote client and local (inetd-startable) or remote server." +HOMEPAGE = "https://www.stunnel.org/" +SECTION = "net" +LICENSE = "GPL-2.0-or-later" +LIC_FILES_CHKSUM = "file://COPYING.md;md5=906ac034adaee9d093318e51b53453ca" + +DEPENDS = "autoconf-archive libnsl2 openssl" + +SRC_URI = "https://stunnel.org/archive/5.x/${BP}.tar.gz \ + file://fix-openssl-no-des.patch \ +" + +SRC_URI[sha256sum] = "bc917c3bcd943a4d632360c067977a31e85e385f5f4845f69749bce88183cb38" + +inherit autotools bash-completion pkgconfig + +PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6 systemd', d)} libwrap" + +PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," +PACKAGECONFIG[libwrap] = "--enable-libwrap,--disable-libwrap,tcp-wrappers" +PACKAGECONFIG[systemd] = "--enable-systemd,--disable-systemd,systemd" + +EXTRA_OECONF += "--with-ssl='${STAGING_EXECPREFIXDIR}' --disable-fips" + +# When cross compiling, configure defaults to nobody, but provides no option to change it. +EXTRA_OEMAKE += "DEFAULT_GROUP='nogroup'" + +# stunnel3 is a Perl wrapper to allow use of the legacy stunnel 3.x commandline +# syntax with stunnel >= 4.05 +PACKAGES =+ "stunnel3" +FILES:stunnel3 = "${bindir}/stunnel3" +RDEPENDS:stunnel3 += "${PN} perl" diff --git a/sources/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump/CVE-2024-2397.patch b/sources/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump/CVE-2024-2397.patch deleted file mode 100644 index 69348030..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump/CVE-2024-2397.patch +++ /dev/null @@ -1,129 +0,0 @@ -From b9811ef5bb1b7d45a90e042f81f3aaf233c8bcb2 Mon Sep 17 00:00:00 2001 -From: Guy Harris -Date: Tue, 12 Mar 2024 00:37:23 -0700 -Subject: [PATCH] ppp: use the buffer stack for the de-escaping buffer. - -This both saves the buffer for freeing later and saves the packet -pointer and snapend to be restored when packet processing is complete, -even if an exception is thrown with longjmp. - -This means that the hex/ASCII printing in pretty_print_packet() -processes the packet data as captured or read from the savefile, rather -than as modified by the PPP printer, so that the bounds checking is -correct. - -That fixes CVE-2024-2397, which was caused by an exception being thrown -by the hex/ASCII printer (which should only happen if those routines are -called by a packet printer, not if they're called for the -X/-x/-A -flag), which jumps back to the setjmp() that surrounds the packet -printer. Hilarity^Winfinite looping ensues. - -Also, restore ndo->ndo_packetp before calling the hex/ASCII printing -routine, in case nd_pop_all_packet_info() didn't restore it. - -Upstream-Status: Backport [https://github.com/the-tcpdump-group/tcpdump/commit/b9811ef5bb1b7d45a90e042f81f3aaf233c8bcb2] -CVE: CVE-2024-2397 -Signed-off-by: Hitendra Prajapati ---- - print-ppp.c | 31 +++++++++++++++++-------------- - print.c | 8 ++++++-- - 2 files changed, 23 insertions(+), 16 deletions(-) - -diff --git a/print-ppp.c b/print-ppp.c -index aba243d..e5ae064 100644 ---- a/print-ppp.c -+++ b/print-ppp.c -@@ -42,6 +42,8 @@ - #include - #endif - -+#include -+ - #include "netdissect.h" - #include "extract.h" - #include "addrtoname.h" -@@ -1363,7 +1365,6 @@ ppp_hdlc(netdissect_options *ndo, - u_char *b, *t, c; - const u_char *s; - u_int i, proto; -- const void *sb, *se; - - if (caplen == 0) - return; -@@ -1371,9 +1372,11 @@ ppp_hdlc(netdissect_options *ndo, - if (length == 0) - return; - -- b = (u_char *)nd_malloc(ndo, caplen); -- if (b == NULL) -- return; -+ b = (u_char *)malloc(caplen); -+ if (b == NULL) { -+ (*ndo->ndo_error)(ndo, S_ERR_ND_MEM_ALLOC, -+ "%s: malloc", __func__); -+ } - - /* - * Unescape all the data into a temporary, private, buffer. -@@ -1394,13 +1397,15 @@ ppp_hdlc(netdissect_options *ndo, - } - - /* -- * Change the end pointer, so bounds checks work. -- * Change the pointer to packet data to help debugging. -+ * Switch to the output buffer for dissection, and save it -+ * on the buffer stack so it can be freed; our caller must -+ * pop it when done. - */ -- sb = ndo->ndo_packetp; -- se = ndo->ndo_snapend; -- ndo->ndo_packetp = b; -- ndo->ndo_snapend = t; -+ if (!nd_push_buffer(ndo, b, b, (u_int)(t - b))) { -+ free(b); -+ (*ndo->ndo_error)(ndo, S_ERR_ND_MEM_ALLOC, -+ "%s: can't push buffer on buffer stack", __func__); -+ } - length = ND_BYTES_AVAILABLE_AFTER(b); - - /* now lets guess about the payload codepoint format */ -@@ -1442,13 +1447,11 @@ ppp_hdlc(netdissect_options *ndo, - } - - cleanup: -- ndo->ndo_packetp = sb; -- ndo->ndo_snapend = se; -+ nd_pop_packet_info(ndo); - return; - - trunc: -- ndo->ndo_packetp = sb; -- ndo->ndo_snapend = se; -+ nd_pop_packet_info(ndo); - nd_print_trunc(ndo); - } - -diff --git a/print.c b/print.c -index 9c0ab86..33706b9 100644 ---- a/print.c -+++ b/print.c -@@ -431,10 +431,14 @@ pretty_print_packet(netdissect_options *ndo, const struct pcap_pkthdr *h, - nd_pop_all_packet_info(ndo); - - /* -- * Restore the original snapend, as a printer might have -- * changed it. -+ * Restore the originals snapend and packetp, as a printer -+ * might have changed them. -+ * -+ * XXX - nd_pop_all_packet_info() should have restored the -+ * original values, but, just in case.... - */ - ndo->ndo_snapend = sp + h->caplen; -+ ndo->ndo_packetp = sp; - if (ndo->ndo_Xflag) { - /* - * Print the raw packet data in hex and ASCII. --- -2.25.1 - diff --git a/sources/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump/run-ptest b/sources/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump/run-ptest old mode 100755 new mode 100644 diff --git a/sources/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump_4.99.4.bb b/sources/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump_4.99.4.bb deleted file mode 100644 index b05b832d..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump_4.99.4.bb +++ /dev/null @@ -1,53 +0,0 @@ -SUMMARY = "A sophisticated network protocol analyzer" -HOMEPAGE = "http://www.tcpdump.org/" -SECTION = "net" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=5eb289217c160e2920d2e35bddc36453" - -DEPENDS = "libpcap" - -RDEPENDS:${PN}-ptest += " make perl \ - perl-module-file-basename \ - perl-module-file-spec \ - perl-module-file-spec-unix \ - perl-module-file-path \ - perl-module-file-glob \ - perl-module-data-dumper \ - perl-module-bytes \ - perl-module-posix \ - perl-module-carp \ - perl-module-cwd \ - perl-module-constant \ -" - -SRC_URI = " \ - http://www.tcpdump.org/release/${BP}.tar.gz \ - file://add-ptest.patch \ - file://run-ptest \ - file://CVE-2024-2397.patch \ -" - -SRC_URI[sha256sum] = "0232231bb2f29d6bf2426e70a08a7e0c63a0d59a9b44863b7f5e2357a6e49fea" - -UPSTREAM_CHECK_REGEX = "tcpdump-(?P\d+(\.\d+)+)\.tar" - -inherit autotools-brokensep pkgconfig ptest - -PACKAGECONFIG ?= "openssl" - -PACKAGECONFIG[libcap-ng] = "--with-cap-ng,--without-cap-ng,libcap-ng" -PACKAGECONFIG[openssl] = "--with-crypto,--without-crypto,openssl" -PACKAGECONFIG[smi] = "--with-smi,--without-smi,libsmi" -# Note: CVE-2018-10103 (SMB - partially fixed, but SMB printing disabled) -PACKAGECONFIG[smb] = "--enable-smb,--disable-smb" - -EXTRA_AUTORECONF += "--exclude=aclocal" - -do_install:append() { - # make install installs an unneeded extra copy of the tcpdump binary - rm ${D}${bindir}/tcpdump.${PV} -} - -do_compile_ptest() { - oe_runmake buildtest-TESTS -} diff --git a/sources/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump_4.99.5.bb b/sources/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump_4.99.5.bb new file mode 100644 index 00000000..32b869f2 --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump_4.99.5.bb @@ -0,0 +1,52 @@ +SUMMARY = "A sophisticated network protocol analyzer" +HOMEPAGE = "http://www.tcpdump.org/" +SECTION = "net" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=5eb289217c160e2920d2e35bddc36453" + +DEPENDS = "libpcap" + +RDEPENDS:${PN}-ptest += " make perl \ + perl-module-file-basename \ + perl-module-file-spec \ + perl-module-file-spec-unix \ + perl-module-file-path \ + perl-module-file-glob \ + perl-module-data-dumper \ + perl-module-bytes \ + perl-module-posix \ + perl-module-carp \ + perl-module-cwd \ + perl-module-constant \ +" + +SRC_URI = " \ + http://www.tcpdump.org/release/${BP}.tar.xz \ + file://add-ptest.patch \ + file://run-ptest \ +" + +SRC_URI[sha256sum] = "d76395ab82d659d526291b013eee200201380930793531515abfc6e77b4f2ee5" + +UPSTREAM_CHECK_REGEX = "tcpdump-(?P\d+(\.\d+)+)\.tar" + +inherit autotools-brokensep pkgconfig ptest + +PACKAGECONFIG ?= "openssl" + +PACKAGECONFIG[libcap-ng] = "--with-cap-ng,--without-cap-ng,libcap-ng" +PACKAGECONFIG[openssl] = "--with-crypto,--without-crypto,openssl" +PACKAGECONFIG[smi] = "--with-smi,--without-smi,libsmi" +# Note: CVE-2018-10103 (SMB - partially fixed, but SMB printing disabled) +PACKAGECONFIG[smb] = "--enable-smb,--disable-smb" + +EXTRA_AUTORECONF += "--exclude=aclocal" + +do_install:append() { + # make install installs an unneeded extra copy of the tcpdump binary + rm ${D}${bindir}/tcpdump.${PV} +} + +do_compile_ptest() { + oe_runmake buildtest-TESTS +} diff --git a/sources/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpslice_1.7.bb b/sources/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpslice_1.7.bb deleted file mode 100644 index 93197dc3..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpslice_1.7.bb +++ /dev/null @@ -1,24 +0,0 @@ -SUMMARY = "tcpslice" -DESCRIPTION = "A tool for extracting parts of a tcpdump packet trace." -HOMEPAGE = "http://www.tcpdump.org/related.html" -SECTION = "net" - -LICENSE = "BSD-4-Clause" -LIC_FILES_CHKSUM = "file://tcpslice.c;endline=20;md5=99519e2e5234d1662a4ce16baa62c64e" - -SRC_URI = "http://www.tcpdump.org/release/${BP}.tar.gz \ - " -SRC_URI[sha256sum] = "e513f0710c4ab45ec627e5df6f7b80d12e488146e1bd500c92247e20ca608903" - -UPSTREAM_CHECK_REGEX = "tcpslice-(?P\d+(\.\d+)+)\.tar" - -inherit autotools-brokensep pkgconfig - -DEPENDS = "libpcap" - -EXTRA_AUTORECONF += "--exclude=aclocal" - -do_install () { - install -d ${D}${sbindir} - install -m 0755 tcpslice ${D}${sbindir} -} diff --git a/sources/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpslice_1.8.bb b/sources/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpslice_1.8.bb new file mode 100644 index 00000000..3d61160b --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpslice_1.8.bb @@ -0,0 +1,24 @@ +SUMMARY = "tcpslice" +DESCRIPTION = "A tool for extracting parts of a tcpdump packet trace." +HOMEPAGE = "http://www.tcpdump.org/related.html" +SECTION = "net" + +LICENSE = "BSD-4-Clause" +LIC_FILES_CHKSUM = "file://tcpslice.c;endline=20;md5=99519e2e5234d1662a4ce16baa62c64e" + +SRC_URI = "http://www.tcpdump.org/release/${BP}.tar.gz \ + " +SRC_URI[sha256sum] = "082967d6bf793499d3d655cea2149e07c0da97287f1877a6eab88d17cb703d0d" + +UPSTREAM_CHECK_REGEX = "tcpslice-(?P\d+(\.\d+)+)\.tar" + +inherit autotools-brokensep pkgconfig + +DEPENDS = "libpcap" + +EXTRA_AUTORECONF += "--exclude=aclocal" + +do_install () { + install -d ${D}${sbindir} + install -m 0755 tcpslice ${D}${sbindir} +} diff --git a/sources/meta-openembedded/meta-networking/recipes-support/tcpreplay/tcpreplay/0001-configure.ac-do-not-run-conftest-in-case-of-cross-co.patch b/sources/meta-openembedded/meta-networking/recipes-support/tcpreplay/tcpreplay/0001-configure.ac-do-not-run-conftest-in-case-of-cross-co.patch deleted file mode 100644 index 08cb3b88..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-support/tcpreplay/tcpreplay/0001-configure.ac-do-not-run-conftest-in-case-of-cross-co.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 42f7bbc1ce4913fe2c0bc76293c5445d31690f5d Mon Sep 17 00:00:00 2001 -From: Chen Qi -Date: Thu, 7 Mar 2024 21:02:07 -0800 -Subject: [PATCH] configure.ac: do not run conftest in case of cross - compilation - -It'll give us nothing but error like below: - - ./conftest: cannot execute binary file: Exec format error - ... - ./configure: line 23950: test: -eq: unary operator expected - -The version check only has effect on Apple systems. We'd better -avoid error like above when cross compilation. - -Also, in case of cross compilation, instead of having the above -Exec format error and resulting in unaligned_cv_fail to yes, set -it directly to yes. - -Upstream-Status: Submitted [https://github.com/appneta/tcpreplay/pull/849] - -Signed-off-by: Chen Qi ---- - configure.ac | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 387219de..15201601 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -928,7 +928,7 @@ cat >conftest.c </dev/null 2>&1 --if test -x conftest ; then -+if test -x conftest -a "$cross_compiling" != "yes"; then - full_libpcap_version=$(LD_LIBRARY_PATH="$LPCAP_LD_LIBRARY_PATH" ./conftest) - libpcap_version=$(echo "$full_libpcap_version" | ${CUT} -d' ' -f3) - pcap_version_ok=yes -@@ -1709,7 +1709,7 @@ case "$host_os" in - EOF - ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS \ - conftest.c $LIBS >/dev/null 2>&1 -- if test ! -x conftest ; then -+ if test ! -x conftest -o "$cross_compiling" = "yes" ; then - dnl failed to compile for some reason - unaligned_cv_fail=yes - else --- -2.42.0 - diff --git a/sources/meta-openembedded/meta-networking/recipes-support/tcpreplay/tcpreplay/0001-configure.ac-unify-search-dirs-for-pcap-and-add-lib3.patch b/sources/meta-openembedded/meta-networking/recipes-support/tcpreplay/tcpreplay/0001-configure.ac-unify-search-dirs-for-pcap-and-add-lib3.patch deleted file mode 100644 index 709d2ccc..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-support/tcpreplay/tcpreplay/0001-configure.ac-unify-search-dirs-for-pcap-and-add-lib3.patch +++ /dev/null @@ -1,82 +0,0 @@ -From 5f8c78362b3b1e06f5adff2d4b140509c4799894 Mon Sep 17 00:00:00 2001 -From: Martin Jansa -Date: Sun, 3 Sep 2023 12:31:59 +0200 -Subject: [PATCH] configure.ac: unify search dirs for pcap and add lib32 - -* add lib32 because when building lib32-tcpreplay it's - impossible to set --with-libpcap so that it would find - both include files as well as the library in lib32 directory - -* maybe it would be beneficial to split --with-libpcap - into --with-libpcap-includedir --with-libpcap-libdir as this - already searches in the --with-libpcap value with and - without any "lib" prefix, but include files always expect - "include" dir there - -* most of this code was added in: - https://github.com/appneta/tcpreplay/commit/202b8e82f9fd3c84ce5804577caeb36a33baabe7#diff-49473dca262eeab3b4a43002adb08b4db31020d190caaad1594b47f1d5daa810R570 - -* then search for - ${host_cpu} lib/${host_cpu} (without -${host_os} suffix) - and ${build_arch}-${host_os} lib/${build_arch}-${host_os} - was added, but only for search of dynamic library in: - https://github.com/appneta/tcpreplay/commit/c3d5236563985a99f8bb02c3f1bd6950e3929047 - -* ${build_arch}-${host_os} lib/${build_arch}-${host_os} - was later replaced with: - lib/${MULTIARCH} ${MULTIARCH} - and it was added to static library search as well - - but for dynamic library it was searching in reversed order: - ${MULTIARCH} lib/${MULTIARCH} - https://github.com/appneta/tcpreplay/commit/ed9e3a818bde04813144014561e62f018c9eb85f - - I don't think this reversed order was intentional, just unify all 4 cases - to use the same directories in the same order - -Signed-off-by: Martin Jansa -Upstream-Status: Submitted [https://github.com/appneta/tcpreplay/pull/819] ---- - configure.ac | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 387219de..26ba31a5 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -671,7 +671,7 @@ AC_ARG_WITH(libpcap, - LPCAPINCDIR=${testdir} - if test $dynamic_link = yes; then - for ext in .dylib .so .tbd ; do -- for dir in . lib lib64 lib/${host_cpu}-${host_os} ${host_cpu}-${host_os} lib/${MULTIARCH} ${MULTIARCH}; do -+ for dir in . lib lib64 lib32 lib/${host_cpu}-${host_os} ${host_cpu}-${host_os} lib/${MULTIARCH} ${MULTIARCH}; do - sharefile=$(ls ${testdir}/$dir/libpcap${ext}* 2> /dev/null | sort | head -n1) - if test -n "${sharefile}"; then - LPCAP_LD_LIBRARY_PATH="$(dirname ${sharefile})" -@@ -690,7 +690,7 @@ AC_ARG_WITH(libpcap, - dnl If dynamic library not found, try static - dnl - for ext in ${libext} .a .A.tbd ; do -- for dir in . lib lib64 lib/${host_cpu}-${host_os} ${host_cpu}-${host_os} lib/${MULTIARCH} ${MULTIARCH}; do -+ for dir in . lib lib64 lib32 lib/${host_cpu}-${host_os} ${host_cpu}-${host_os} lib/${MULTIARCH} ${MULTIARCH}; do - staticfile=$(ls ${testdir}/$dir/libpcap${ext} 2> /dev/null | sort | head -n1) - if test -n "${staticfile}"; then - LPCAPLIB="${staticfile}" -@@ -771,7 +771,7 @@ AC_ARG_WITH(libpcap, - LPCAPINCDIR="${testdir}/include" - if test $dynamic_link = yes; then - for ext in .dylib .so .tbd; do -- for dir in . lib lib64 ${host_cpu} lib/${host_cpu} ${host_cpu}-${host_os} lib/${host_cpu}-${host_os} ${MULTIARCH} lib/${MULTIARCH}; do -+ for dir in . lib lib64 lib32 lib/${host_cpu}-${host_os} ${host_cpu}-${host_os} lib/${MULTIARCH} ${MULTIARCH}; do - sharefile=$(ls "${testdir}/$dir/libpcap${ext}" 2> /dev/null | sort | head -n1) - if test -n "${sharefile}"; then - LPCAPLIB="-L$(dirname ${sharefile}) -lpcap" -@@ -790,7 +790,7 @@ AC_ARG_WITH(libpcap, - dnl If dynamic library not found, try static - dnl - for ext in ${libext} .a .A.tbd ; do -- for dir in . lib lib64 lib/${host_cpu}-${host_os} ${host_cpu}-${host_os} lib/${MULTIARCH} ${MULTIARCH}; do -+ for dir in . lib lib64 lib32 lib/${host_cpu}-${host_os} ${host_cpu}-${host_os} lib/${MULTIARCH} ${MULTIARCH}; do - staticfile=$(ls "${testdir}/$dir/libpcap${ext}" 2> /dev/null | sort | head -n1) - if test -n "${staticfile}"; then - LPCAPLIB="${staticfile}" diff --git a/sources/meta-openembedded/meta-networking/recipes-support/tcpreplay/tcpreplay/CVE-2023-4256.patch b/sources/meta-openembedded/meta-networking/recipes-support/tcpreplay/tcpreplay/CVE-2023-4256.patch deleted file mode 100644 index 2e4eee02..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-support/tcpreplay/tcpreplay/CVE-2023-4256.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 62bc10d4f1d2c9e2833ef2898fb0170e9300a9dd Mon Sep 17 00:00:00 2001 -From: Marsman1996 -Date: Tue, 2 Apr 2024 17:29:21 +0800 -Subject: [PATCH] dlt_jnpr_ether_cleanup: check config before cleanup - -CVE: CVE-2023-4256 -Upstream-Status: Backport [https://github.com/appneta/tcpreplay/pull/851] -Signed-off-by: Poonam Jadhav ---- - src/tcpedit/plugins/dlt_jnpr_ether/jnpr_ether.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/tcpedit/plugins/dlt_jnpr_ether/jnpr_ether.c b/src/tcpedit/plugins/dlt_jnpr_ether/jnpr_ether.c -index c53ec297..9642a2c2 100644 ---- a/src/tcpedit/plugins/dlt_jnpr_ether/jnpr_ether.c -+++ b/src/tcpedit/plugins/dlt_jnpr_ether/jnpr_ether.c -@@ -164,8 +164,9 @@ dlt_jnpr_ether_cleanup(tcpeditdlt_t *ctx) - jnpr_ether_config_t *config; - - config = (jnpr_ether_config_t *)ctx->encoder->config; -- if (config->subctx != NULL) -+ if (config != NULL && config->subctx != NULL) { - tcpedit_dlt_cleanup(config->subctx); -+ } - safe_free(plugin->config); - plugin->config = NULL; - plugin->config_size = 0; diff --git a/sources/meta-openembedded/meta-networking/recipes-support/tcpreplay/tcpreplay/CVE-2023-43279.patch b/sources/meta-openembedded/meta-networking/recipes-support/tcpreplay/tcpreplay/CVE-2023-43279.patch deleted file mode 100644 index 45581268..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-support/tcpreplay/tcpreplay/CVE-2023-43279.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 3164a75f2660a5c3537feff9fd8751346cf5ca57 Mon Sep 17 00:00:00 2001 -From: Gabriel Ganne -Date: Sun, 21 Jan 2024 09:16:38 +0100 -Subject: [PATCH] add check for empty cidr - -This causes tcprewrite to exit with an error instead of crashing. - -Fixes: #824 - -Upstream-Status: Backport -CVE: CVE-2023-43279 - -Reference to upstream patch: -https://github.com/appneta/tcpreplay/pull/860/commits/963842ceca79e97ac3242448a0de94fb901d3560 - -Signed-off-by: Gabriel Ganne -Signed-off-by: Jiaying Song ---- - src/common/cidr.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/src/common/cidr.c b/src/common/cidr.c -index 687fd04..9afbfec 100644 ---- a/src/common/cidr.c -+++ b/src/common/cidr.c -@@ -249,6 +249,10 @@ parse_cidr(tcpr_cidr_t **cidrdata, char *cidrin, char *delim) - char *network; - char *token = NULL; - -+ if (cidrin == NULL) { -+ errx(-1, "%s", "Unable to parse empty CIDR"); -+ } -+ - mask_cidr6(&cidrin, delim); - - /* first iteration of input using strtok */ --- -2.25.1 - diff --git a/sources/meta-openembedded/meta-networking/recipes-support/tcpreplay/tcpreplay/CVE-2024-22654-0001.patch b/sources/meta-openembedded/meta-networking/recipes-support/tcpreplay/tcpreplay/CVE-2024-22654-0001.patch deleted file mode 100644 index 26dedba8..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-support/tcpreplay/tcpreplay/CVE-2024-22654-0001.patch +++ /dev/null @@ -1,90 +0,0 @@ -From 5b5644356693f5c68dd4295e86f24f1d0a515d60 Mon Sep 17 00:00:00 2001 -From: Fred Klassen -Date: Sat, 1 Jun 2024 11:46:10 -0700 -Subject: [PATCH 1/2] Bug #827 PR# 842: add check for IPv6 extension header - length - -CVE: CVE-2024-22654 - -Upstream-Status: Backport [https://github.com/appneta/tcpreplay/commit/5b5644356693f5c68dd4295e86f24f1d0a515d60] - -Signed-off-by: Archana Polampalli ---- - src/common/get.c | 29 +++++++++++++++++++++-------- - 1 file changed, 21 insertions(+), 8 deletions(-) - -diff --git a/src/common/get.c b/src/common/get.c -index 2d91116..89fe95b 100644 ---- a/src/common/get.c -+++ b/src/common/get.c -@@ -41,8 +41,8 @@ extern const char pcap_version[]; - static void *get_ipv6_next(struct tcpr_ipv6_ext_hdr_base *exthdr, const u_char *end_ptr); - - /** -- * Depending on what version of libpcap/WinPcap there are different ways to get -- * the version of the libpcap/WinPcap library. This presents a unified way to -+ * Depending on what version of libpcap there are different ways to get -+ * the version of the libpcap library. This presents a unified way to - * get that information. - */ - const char * -@@ -196,8 +196,15 @@ parse_metadata(const u_char *pktdata, - uint32_t *vlan_offset) - { - bool done = false; -- int res = 0; -- while (!done && res == 0) { -+ assert(next_protocol); -+ assert(l2len); -+ assert(l2offset); -+ assert(vlan_offset); -+ -+ if (!pktdata || !datalen) -+ errx(-1, "parse_metadata: invalid L2 parameters: pktdata=0x%p len=%d", pktdata, datalen); -+ -+ while (!done) { - switch (*next_protocol) { - case ETHERTYPE_VLAN: - case ETHERTYPE_Q_IN_Q: -@@ -205,18 +212,22 @@ parse_metadata(const u_char *pktdata, - if (*vlan_offset == 0) - *vlan_offset = *l2len; - -- res = parse_vlan(pktdata, datalen, next_protocol, l2len); -+ if (parse_vlan(pktdata, datalen, next_protocol, l2len)) -+ return -1; -+ - break; - case ETHERTYPE_MPLS: - case ETHERTYPE_MPLS_MULTI: -- res = parse_mpls(pktdata, datalen, next_protocol, l2len, l2offset); -+ if (parse_mpls(pktdata, datalen, next_protocol, l2len, l2offset)) -+ return -1; -+ - break; - default: - done = true; - } - } - -- return res; -+ return 0; - } - - /* -@@ -605,9 +616,11 @@ get_layer4_v6(const ipv6_hdr_t *ip6_hdr, const u_char *end_ptr) - * no further processing, either TCP, UDP, ICMP, etc... - */ - default: -- if (proto != ip6_hdr->ip_nh) { -+ if (proto != ip6_hdr->ip_nh && next) { - dbgx(3, "Returning byte offset of this ext header: %u", IPV6_EXTLEN_TO_BYTES(next->ip_len)); - next = (void *)((u_char *)next + IPV6_EXTLEN_TO_BYTES(next->ip_len)); -+ if ((u_char*)next > end_ptr) -+ return NULL; - } else { - dbgx(3, "%s", "Returning end of IPv6 Header"); - } --- -2.40.0 - diff --git a/sources/meta-openembedded/meta-networking/recipes-support/tcpreplay/tcpreplay/CVE-2024-22654-0002.patch b/sources/meta-openembedded/meta-networking/recipes-support/tcpreplay/tcpreplay/CVE-2024-22654-0002.patch deleted file mode 100644 index bcf560c0..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-support/tcpreplay/tcpreplay/CVE-2024-22654-0002.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 52ed63329b37ae83cb86504db2c9deb6a91e2fe9 Mon Sep 17 00:00:00 2001 -From: Gabriel Ganne -Date: Sun, 21 Jan 2024 08:59:10 +0100 -Subject: [PATCH 2/2] ipv6 - add check for extension header length - -Fixes #827 - -Signed-off-by: Gabriel Ganne - -CVE: CVE-2024-22654 - -Upstream-Status: Backport [https://github.com/appneta/tcpreplay/commit/52ed63329b37ae83cb86504db2c9deb6a91e2fe9] - -Signed-off-by: Archana Polampalli ---- - src/common/get.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/src/common/get.c b/src/common/get.c -index 89fe95b..c31de5d 100644 ---- a/src/common/get.c -+++ b/src/common/get.c -@@ -676,6 +676,10 @@ get_ipv6_next(struct tcpr_ipv6_ext_hdr_base *exthdr, const u_char *end_ptr) - case TCPR_IPV6_NH_HBH: - case TCPR_IPV6_NH_AH: - extlen = IPV6_EXTLEN_TO_BYTES(exthdr->ip_len); -+ if (extlen == 0) { -+ dbg(3, "Malformed IPv6 extension header..."); -+ return NULL; -+ } - dbgx(3, - "Looks like we're an ext header (0x%hhx). Jumping %u bytes" - " to the next", --- -2.40.0 diff --git a/sources/meta-openembedded/meta-networking/recipes-support/tcpreplay/tcpreplay_4.4.4.bb b/sources/meta-openembedded/meta-networking/recipes-support/tcpreplay/tcpreplay_4.4.4.bb deleted file mode 100644 index a7841908..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-support/tcpreplay/tcpreplay_4.4.4.bb +++ /dev/null @@ -1,32 +0,0 @@ -SUMMARY = "Use previously captured traffic to test network devices" - -HOMEPAGE = "https://tcpreplay.appneta.com/" - -SECTION = "net" - -LICENSE = "GPL-3.0-only" -LIC_FILES_CHKSUM = "file://docs/LICENSE;md5=10f0474a2f0e5dccfca20f69d6598ad8" - -SRC_URI = "https://github.com/appneta/${BPN}/releases/download/v${PV}/${BP}.tar.gz \ - file://0001-libopts.m4-set-POSIX_SHELL-to-bin-sh.patch \ - file://0001-configure.ac-unify-search-dirs-for-pcap-and-add-lib3.patch \ - file://0001-configure.ac-do-not-run-conftest-in-case-of-cross-co.patch \ - file://CVE-2023-4256.patch \ - file://CVE-2023-43279.patch \ - file://CVE-2024-22654-0001.patch \ - file://CVE-2024-22654-0002.patch \ -" - -SRC_URI[sha256sum] = "44f18fb6d3470ecaf77a51b901a119dae16da5be4d4140ffbb2785e37ad6d4bf" - -UPSTREAM_CHECK_URI = "https://github.com/appneta/tcpreplay/releases" - -DEPENDS = "libpcap" - -EXTRA_OECONF += "--with-libpcap=${STAGING_DIR_HOST}${prefix}" - -inherit siteinfo autotools-brokensep - -do_install:append() { - sed -i -e 's:${RECIPE_SYSROOT}::g' ${S}/src/defines.h -} diff --git a/sources/meta-openembedded/meta-networking/recipes-support/tcpreplay/tcpreplay_4.5.1.bb b/sources/meta-openembedded/meta-networking/recipes-support/tcpreplay/tcpreplay_4.5.1.bb new file mode 100644 index 00000000..f01bbb95 --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-support/tcpreplay/tcpreplay_4.5.1.bb @@ -0,0 +1,26 @@ +SUMMARY = "Use previously captured traffic to test network devices" + +HOMEPAGE = "https://tcpreplay.appneta.com/" + +SECTION = "net" + +LICENSE = "GPL-3.0-only" +LIC_FILES_CHKSUM = "file://docs/LICENSE;md5=10f0474a2f0e5dccfca20f69d6598ad8" + +SRC_URI = "https://github.com/appneta/${BPN}/releases/download/v${PV}/${BP}.tar.gz \ + file://0001-libopts.m4-set-POSIX_SHELL-to-bin-sh.patch \ +" + +SRC_URI[sha256sum] = "2de79bfd67ec92ca9ae2ffb50456dd1d53ff40f3fa71b422c65e8062013c9e85" + +UPSTREAM_CHECK_URI = "https://github.com/appneta/tcpreplay/releases" + +DEPENDS = "libpcap" + +EXTRA_OECONF += "--with-libpcap=${STAGING_DIR_HOST}${prefix}" + +inherit siteinfo autotools-brokensep + +do_install:append() { + sed -i -e 's:${RECIPE_SYSROOT}::g' ${S}/src/defines.h +} diff --git a/sources/meta-openembedded/meta-networking/recipes-support/tinyproxy/tinyproxy_1.11.1.bb b/sources/meta-openembedded/meta-networking/recipes-support/tinyproxy/tinyproxy_1.11.1.bb index 999deff4..4f52ee2b 100644 --- a/sources/meta-openembedded/meta-networking/recipes-support/tinyproxy/tinyproxy_1.11.1.bb +++ b/sources/meta-openembedded/meta-networking/recipes-support/tinyproxy/tinyproxy_1.11.1.bb @@ -36,7 +36,7 @@ SYSTEMD_AUTO_ENABLE:${PN} = "enable" do_install:append() { if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then install -d ${D}${systemd_system_unitdir} - install -m 0644 ${WORKDIR}/tinyproxy.service ${D}${systemd_system_unitdir} + install -m 0644 ${UNPACKDIR}/tinyproxy.service ${D}${systemd_system_unitdir} fi - install -m 0644 ${WORKDIR}/tinyproxy.conf ${D}${sysconfdir}/tinyproxy.conf + install -m 0644 ${UNPACKDIR}/tinyproxy.conf ${D}${sysconfdir}/tinyproxy.conf } diff --git a/sources/meta-openembedded/meta-networking/recipes-support/tnftp/tnftp/0001-Add-casts-to-appease-conversions-between-wchar_t-and.patch b/sources/meta-openembedded/meta-networking/recipes-support/tnftp/tnftp/0001-Add-casts-to-appease-conversions-between-wchar_t-and.patch new file mode 100644 index 00000000..bbd6c784 --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-support/tnftp/tnftp/0001-Add-casts-to-appease-conversions-between-wchar_t-and.patch @@ -0,0 +1,77 @@ +From 46477eb182af51b5da8299b295a6d61e566e3693 Mon Sep 17 00:00:00 2001 +From: Changqing Li +Date: Fri, 14 Jun 2024 06:27:19 +0000 +Subject: [PATCH] Add casts to appease conversions between wchar_t and wint_t + +Upstream-Status: Backport [http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libedit/refresh.c.diff?r1=1.57&r2=1.58&only_with_tag=MAIN&f=h] + +Signed-off-by: Changqing Li +--- + libedit/refresh.c | 16 +++++++++------- + 1 file changed, 9 insertions(+), 7 deletions(-) + +diff --git a/libedit/refresh.c b/libedit/refresh.c +index 093f993..a6d4574 100644 +--- a/libedit/refresh.c ++++ b/libedit/refresh.c +@@ -111,7 +111,7 @@ re_nextline(EditLine *el) + */ + if (el->el_refresh.r_cursor.v + 1 >= el->el_terminal.t_size.v) { + int i, lins = el->el_terminal.t_size.v; +- wchar_t *firstline = el->el_vdisplay[0]; ++ wint_t *firstline = el->el_vdisplay[0]; + + for(i = 1; i < lins; i++) + el->el_vdisplay[i - 1] = el->el_vdisplay[i]; +@@ -340,7 +340,8 @@ re_refresh(EditLine *el) + ELRE_DEBUG(1, (__F, "updating %d lines.\r\n", el->el_refresh.r_newcv)); + for (i = 0; i <= el->el_refresh.r_newcv; i++) { + /* NOTE THAT re_update_line MAY CHANGE el_display[i] */ +- re_update_line(el, el->el_display[i], el->el_vdisplay[i], i); ++ re_update_line(el, (wchar_t *)el->el_display[i], ++ (wchar_t *)el->el_vdisplay[i], i); + + /* + * Copy the new line to be the current one, and pad out with +@@ -349,8 +350,9 @@ re_refresh(EditLine *el) + * end of the screen line, it won't be a NUL or some old + * leftover stuff. + */ +- re__copy_and_pad(el->el_display[i], el->el_vdisplay[i], +- (size_t) el->el_terminal.t_size.h); ++ re__copy_and_pad((wchar_t *)el->el_display[i], ++ (wchar_t *)el->el_vdisplay[i], ++ (size_t) el->el_terminal.t_size.h); + } + ELRE_DEBUG(1, (__F, + "\r\nel->el_refresh.r_cursor.v=%d,el->el_refresh.r_oldcv=%d i=%d\r\n", +@@ -361,7 +363,7 @@ re_refresh(EditLine *el) + terminal_move_to_line(el, i); + terminal_move_to_char(el, 0); + /* This wcslen should be safe even with MB_FILL_CHARs */ +- terminal_clear_EOL(el, (int) wcslen(el->el_display[i])); ++ terminal_clear_EOL(el, (int) wcslen((const wchar_t *)el->el_display[i])); + #ifdef DEBUG_REFRESH + terminal_overwrite(el, L"C\b", 2); + #endif /* DEBUG_REFRESH */ +@@ -1097,7 +1099,7 @@ re_refresh_cursor(EditLine *el) + static void + re_fastputc(EditLine *el, wint_t c) + { +- wchar_t *lastline; ++ wint_t *lastline; + int w; + + w = wcwidth(c); +@@ -1132,7 +1134,7 @@ re_fastputc(EditLine *el, wint_t c) + el->el_cursor.v++; + lastline = el->el_display[++el->el_refresh.r_oldcv]; + } +- re__copy_and_pad(lastline, L"", (size_t)el->el_terminal.t_size.h); ++ re__copy_and_pad((wchar_t *)lastline, L"", (size_t)el->el_terminal.t_size.h); + + if (EL_HAS_AUTO_MARGINS) { + if (EL_HAS_MAGIC_MARGINS) { +-- +2.35.5 + diff --git a/sources/meta-openembedded/meta-networking/recipes-support/tnftp/tnftp/0002-Add-casts-to-appease-conversions-between-wchar_t-and.patch b/sources/meta-openembedded/meta-networking/recipes-support/tnftp/tnftp/0002-Add-casts-to-appease-conversions-between-wchar_t-and.patch new file mode 100644 index 00000000..c041d0a9 --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-support/tnftp/tnftp/0002-Add-casts-to-appease-conversions-between-wchar_t-and.patch @@ -0,0 +1,29 @@ +From 5c8334f86d139de987c716a0d5acc0f40d8d3b7d Mon Sep 17 00:00:00 2001 +From: Changqing Li +Date: Fri, 14 Jun 2024 06:38:37 +0000 +Subject: [PATCH] Add casts to appease conversions between wchar_t and wint_t + +Upstream-Status: Backport [http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libedit/terminal.c.diff?r1=1.43&r2=1.44&only_with_tag=MAIN&f=h] + +Signed-off-by: Changqing Li +--- + libedit/terminal.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/libedit/terminal.c b/libedit/terminal.c +index 19cee48..13f7bcd 100644 +--- a/libedit/terminal.c ++++ b/libedit/terminal.c +@@ -594,7 +594,8 @@ mc_again: + * NOTE THAT terminal_overwrite() WILL CHANGE + * el->el_cursor.h!!! + */ +- terminal_overwrite(el, &el->el_display[ ++ terminal_overwrite(el, ++ (wchar_t *)&el->el_display[ + el->el_cursor.v][el->el_cursor.h], + (size_t)(where - el->el_cursor.h)); + +-- +2.35.5 + diff --git a/sources/meta-openembedded/meta-networking/recipes-support/tnftp/tnftp_20230507.bb b/sources/meta-openembedded/meta-networking/recipes-support/tnftp/tnftp_20230507.bb index bdd9759f..4ab694fb 100644 --- a/sources/meta-openembedded/meta-networking/recipes-support/tnftp/tnftp_20230507.bb +++ b/sources/meta-openembedded/meta-networking/recipes-support/tnftp/tnftp_20230507.bb @@ -16,6 +16,8 @@ DEPENDS = "ncurses" SRC_URI = "https://ftp.netbsd.org/pub/NetBSD/misc/tnftp/${BPN}-${PV}.tar.gz \ file://0001-libedit-Include-missing-header-stdc-predef.h.patch \ + file://0001-Add-casts-to-appease-conversions-between-wchar_t-and.patch \ + file://0002-Add-casts-to-appease-conversions-between-wchar_t-and.patch \ " inherit autotools update-alternatives pkgconfig diff --git a/sources/meta-openembedded/meta-networking/recipes-support/traceroute/traceroute_2.1.5.bb b/sources/meta-openembedded/meta-networking/recipes-support/traceroute/traceroute_2.1.5.bb deleted file mode 100644 index 862cba91..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-support/traceroute/traceroute_2.1.5.bb +++ /dev/null @@ -1,44 +0,0 @@ -SUMMARY = "A new modern implementation of traceroute(8) utility for Linux systems" -DESCRIPTION = "The traceroute utility displays the route used by IP packets on \ -their way to a specified network (or Internet) host. Traceroute displays \ -the IP number and host name (if possible) of the machines along the \ -route taken by the packets. Traceroute is used as a network debugging \ -tool. If you're having network connectivity problems, traceroute will \ -show you where the trouble is coming from along the route." -SECTION = "net" -HOMEPAGE = "http://traceroute.sourceforge.net/" -LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c" - -inherit update-alternatives - -UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/traceroute/files/traceroute/" - -SRC_URI = "${SOURCEFORGE_MIRROR}/traceroute/traceroute/${BP}/${BP}.tar.gz \ -" -SRC_URI[sha256sum] = "9c6c260d96eaab51e3ce461b0a84fe87123ebc6dd6c9a59fab803f95b35a859e" - -EXTRA_OEMAKE = "VPATH=${STAGING_LIBDIR}" -LTOEXTRA += "-flto-partition=none" - -do_compile() { - oe_runmake "env=yes" -} - -do_install() { - install -d ${D}${bindir} - install -m755 ${BPN}/${BPN} ${D}${bindir} - - install -m755 wrappers/tcptraceroute ${D}${bindir} - - install -d ${D}${mandir}/man8 - install -p -m644 ${BPN}/${BPN}.8 ${D}${mandir}/man8 - ln -s ${BPN}.8 ${D}${mandir}/man8/${BPN}6.8 - ln -s ${BPN}.8 ${D}${mandir}/man8/tcptraceroute.8 - -} - -ALTERNATIVE_PRIORITY = "100" -ALTERNATIVE:${PN} = "traceroute" -ALTERNATIVE_LINK_NAME[traceroute] = "${bindir}/traceroute" diff --git a/sources/meta-openembedded/meta-networking/recipes-support/traceroute/traceroute_2.1.6.bb b/sources/meta-openembedded/meta-networking/recipes-support/traceroute/traceroute_2.1.6.bb new file mode 100644 index 00000000..b72c3754 --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-support/traceroute/traceroute_2.1.6.bb @@ -0,0 +1,44 @@ +SUMMARY = "A new modern implementation of traceroute(8) utility for Linux systems" +DESCRIPTION = "The traceroute utility displays the route used by IP packets on \ +their way to a specified network (or Internet) host. Traceroute displays \ +the IP number and host name (if possible) of the machines along the \ +route taken by the packets. Traceroute is used as a network debugging \ +tool. If you're having network connectivity problems, traceroute will \ +show you where the trouble is coming from along the route." +SECTION = "net" +HOMEPAGE = "http://traceroute.sourceforge.net/" +LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c" + +inherit update-alternatives + +UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/traceroute/files/traceroute/" + +SRC_URI = "${SOURCEFORGE_MIRROR}/traceroute/traceroute/${BP}/${BP}.tar.gz \ +" +SRC_URI[sha256sum] = "9ccef9cdb9d7a98ff7fbf93f79ebd0e48881664b525c4b232a0fcec7dcb9db5e" + +EXTRA_OEMAKE = "VPATH=${STAGING_LIBDIR}" +LTOEXTRA += "-flto-partition=none" + +do_compile() { + oe_runmake "env=yes" +} + +do_install() { + install -d ${D}${bindir} + install -m755 ${BPN}/${BPN} ${D}${bindir} + + install -m755 wrappers/tcptraceroute ${D}${bindir} + + install -d ${D}${mandir}/man8 + install -p -m644 ${BPN}/${BPN}.8 ${D}${mandir}/man8 + ln -s ${BPN}.8 ${D}${mandir}/man8/${BPN}6.8 + ln -s ${BPN}.8 ${D}${mandir}/man8/tcptraceroute.8 + +} + +ALTERNATIVE_PRIORITY = "100" +ALTERNATIVE:${PN} = "traceroute" +ALTERNATIVE_LINK_NAME[traceroute] = "${bindir}/traceroute" diff --git a/sources/meta-openembedded/meta-networking/recipes-support/udpcast/udpcast/0001-include-stddef.h-for-ptrdiff_t.patch b/sources/meta-openembedded/meta-networking/recipes-support/udpcast/udpcast/0001-include-stddef.h-for-ptrdiff_t.patch new file mode 100644 index 00000000..e3d65db7 --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-support/udpcast/udpcast/0001-include-stddef.h-for-ptrdiff_t.patch @@ -0,0 +1,27 @@ +From 5203821a936b1927c401034fe323686ad9eafb04 Mon Sep 17 00:00:00 2001 +From: Enguerrand de Ribaucourt +Date: Thu, 6 Jun 2024 15:57:12 +0200 +Subject: [PATCH 1/1] include stddef.h for ptrdiff_t + +This fixes compilation with musl. + +Upstream-Status: Pending + +Signed-off-by: Enguerrand de Ribaucourt +--- + receivedata.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/receivedata.c b/receivedata.c +index 9a68f67..0aa797f 100644 +--- a/receivedata.c ++++ b/receivedata.c +@@ -1,4 +1,5 @@ + #include ++#include + #include + #include + #include +-- +2.34.1 + diff --git a/sources/meta-openembedded/meta-networking/recipes-support/udpcast/udpcast_20230924.bb b/sources/meta-openembedded/meta-networking/recipes-support/udpcast/udpcast_20230924.bb new file mode 100644 index 00000000..f93f9850 --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-support/udpcast/udpcast_20230924.bb @@ -0,0 +1,22 @@ +SUMMARY = "UDP broadcast file distribution and installation" +DESCRIPTION = "UDPcast is a file transfer tool that can send data \ +simultaneously to many destinations on a LAN. This can for instance be \ +used to install entire classrooms of PC's at once. The advantage of UDPcast \ +over using other methods (nfs, ftp, whatever) is that UDPcast uses UDP's \ +multicast abilities: it won't take longer to install 15 machines than it would \ +to install just 2." +HOMEPAGE = "http://www.udpcast.linux.lu/" +SECTION = "console/network" +LICENSE = "GPL-2.0-or-later & BSD-2-Clause" +LIC_FILES_CHKSUM = "file://COPYING;md5=e3cf524a29c8476be354bb329d36ff80" + +SRC_URI = "http://www.udpcast.linux.lu/download/${BP}.tar.gz \ + file://0001-include-stddef.h-for-ptrdiff_t.patch \ + " +SRC_URI[sha256sum] = "17b5cd8b1e54f7e2e53357ac02ee86e4198bf704096987a03a3b5c402a0ecea1" + +# Installation of rateGovernor.h fails without brokensep +inherit autotools-brokensep manpages + +# pod2man required to build manpages +DEPENDS += "perl-native" diff --git a/sources/meta-openembedded/meta-networking/recipes-support/unbound/unbound/CVE-2024-8508.patch b/sources/meta-openembedded/meta-networking/recipes-support/unbound/unbound/CVE-2024-8508.patch deleted file mode 100644 index 65219fc9..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-support/unbound/unbound/CVE-2024-8508.patch +++ /dev/null @@ -1,247 +0,0 @@ -Description: Limit name compression calculations to avoid DoS - Introduces a hard limit on the number of name compression calculations - per packet to prevent CPU lockup from maliciously crafted large RRsets. - This mitigates potential denial of service attacks. -Author: Yorgos Thessalonikefs -Fixes: CVE-2024-8508 -CVE: CVE-2024-8508 -Upstream-Status: Backport [https://github.com/NLnetLabs/unbound/commit/b7c61d7cc256d6a174e6179622c7fa968272c259] -Signed-off-by: Virendra Thakur ---- - -Index: unbound-1.19.3/util/data/msgencode.c -=================================================================== ---- unbound-1.19.3.orig/util/data/msgencode.c -+++ unbound-1.19.3/util/data/msgencode.c -@@ -62,6 +62,10 @@ - #define RETVAL_TRUNC -4 - /** return code that means all is peachy keen. Equal to DNS rcode NOERROR */ - #define RETVAL_OK 0 -+/** Max compressions we are willing to perform; more than that will result -+ * in semi-compressed messages, or truncated even on TCP for huge messages, to -+ * avoid locking the CPU for long */ -+#define MAX_COMPRESSION_PER_MESSAGE 120 - - /** - * Data structure to help domain name compression in outgoing messages. -@@ -284,15 +288,17 @@ write_compressed_dname(sldns_buffer* pkt - - /** compress owner name of RR, return RETVAL_OUTMEM RETVAL_TRUNC */ - static int --compress_owner(struct ub_packed_rrset_key* key, sldns_buffer* pkt, -- struct regional* region, struct compress_tree_node** tree, -- size_t owner_pos, uint16_t* owner_ptr, int owner_labs) -+compress_owner(struct ub_packed_rrset_key* key, sldns_buffer* pkt, -+ struct regional* region, struct compress_tree_node** tree, -+ size_t owner_pos, uint16_t* owner_ptr, int owner_labs, -+ size_t* compress_count) - { - struct compress_tree_node* p; - struct compress_tree_node** insertpt = NULL; - if(!*owner_ptr) { - /* compress first time dname */ -- if((p = compress_tree_lookup(tree, key->rk.dname, -+ if(*compress_count < MAX_COMPRESSION_PER_MESSAGE && -+ (p = compress_tree_lookup(tree, key->rk.dname, - owner_labs, &insertpt))) { - if(p->labs == owner_labs) - /* avoid ptr chains, since some software is -@@ -301,6 +307,7 @@ compress_owner(struct ub_packed_rrset_ke - if(!write_compressed_dname(pkt, key->rk.dname, - owner_labs, p)) - return RETVAL_TRUNC; -+ (*compress_count)++; - /* check if typeclass+4 ttl + rdatalen is available */ - if(sldns_buffer_remaining(pkt) < 4+4+2) - return RETVAL_TRUNC; -@@ -313,7 +320,8 @@ compress_owner(struct ub_packed_rrset_ke - if(owner_pos <= PTR_MAX_OFFSET) - *owner_ptr = htons(PTR_CREATE(owner_pos)); - } -- if(!compress_tree_store(key->rk.dname, owner_labs, -+ if(*compress_count < MAX_COMPRESSION_PER_MESSAGE && -+ !compress_tree_store(key->rk.dname, owner_labs, - owner_pos, region, p, insertpt)) - return RETVAL_OUTMEM; - } else { -@@ -333,20 +341,24 @@ compress_owner(struct ub_packed_rrset_ke - - /** compress any domain name to the packet, return RETVAL_* */ - static int --compress_any_dname(uint8_t* dname, sldns_buffer* pkt, int labs, -- struct regional* region, struct compress_tree_node** tree) -+compress_any_dname(uint8_t* dname, sldns_buffer* pkt, int labs, -+ struct regional* region, struct compress_tree_node** tree, -+ size_t* compress_count) - { - struct compress_tree_node* p; - struct compress_tree_node** insertpt = NULL; - size_t pos = sldns_buffer_position(pkt); -- if((p = compress_tree_lookup(tree, dname, labs, &insertpt))) { -+ if(*compress_count < MAX_COMPRESSION_PER_MESSAGE && -+ (p = compress_tree_lookup(tree, dname, labs, &insertpt))) { - if(!write_compressed_dname(pkt, dname, labs, p)) - return RETVAL_TRUNC; -+ (*compress_count)++; - } else { - if(!dname_buffer_write(pkt, dname)) - return RETVAL_TRUNC; - } -- if(!compress_tree_store(dname, labs, pos, region, p, insertpt)) -+ if(*compress_count < MAX_COMPRESSION_PER_MESSAGE && -+ !compress_tree_store(dname, labs, pos, region, p, insertpt)) - return RETVAL_OUTMEM; - return RETVAL_OK; - } -@@ -364,9 +376,9 @@ type_rdata_compressable(struct ub_packed - - /** compress domain names in rdata, return RETVAL_* */ - static int --compress_rdata(sldns_buffer* pkt, uint8_t* rdata, size_t todolen, -- struct regional* region, struct compress_tree_node** tree, -- const sldns_rr_descriptor* desc) -+compress_rdata(sldns_buffer* pkt, uint8_t* rdata, size_t todolen, -+ struct regional* region, struct compress_tree_node** tree, -+ const sldns_rr_descriptor* desc, size_t* compress_count) - { - int labs, r, rdf = 0; - size_t dname_len, len, pos = sldns_buffer_position(pkt); -@@ -380,8 +392,8 @@ compress_rdata(sldns_buffer* pkt, uint8_ - switch(desc->_wireformat[rdf]) { - case LDNS_RDF_TYPE_DNAME: - labs = dname_count_size_labels(rdata, &dname_len); -- if((r=compress_any_dname(rdata, pkt, labs, region, -- tree)) != RETVAL_OK) -+ if((r=compress_any_dname(rdata, pkt, labs, region, -+ tree, compress_count)) != RETVAL_OK) - return r; - rdata += dname_len; - todolen -= dname_len; -@@ -449,7 +461,8 @@ static int - packed_rrset_encode(struct ub_packed_rrset_key* key, sldns_buffer* pkt, - uint16_t* num_rrs, time_t timenow, struct regional* region, - int do_data, int do_sig, struct compress_tree_node** tree, -- sldns_pkt_section s, uint16_t qtype, int dnssec, size_t rr_offset) -+ sldns_pkt_section s, uint16_t qtype, int dnssec, size_t rr_offset, -+ size_t* compress_count) - { - size_t i, j, owner_pos; - int r, owner_labs; -@@ -477,9 +490,9 @@ packed_rrset_encode(struct ub_packed_rrs - for(i=0; icount; i++) { - /* rrset roundrobin */ - j = (i + rr_offset) % data->count; -- if((r=compress_owner(key, pkt, region, tree, -- owner_pos, &owner_ptr, owner_labs)) -- != RETVAL_OK) -+ if((r=compress_owner(key, pkt, region, tree, -+ owner_pos, &owner_ptr, owner_labs, -+ compress_count)) != RETVAL_OK) - return r; - sldns_buffer_write(pkt, &key->rk.type, 2); - sldns_buffer_write(pkt, &key->rk.rrset_class, 2); -@@ -489,8 +502,8 @@ packed_rrset_encode(struct ub_packed_rrs - else sldns_buffer_write_u32(pkt, data->rr_ttl[j]-adjust); - if(c) { - if((r=compress_rdata(pkt, data->rr_data[j], -- data->rr_len[j], region, tree, c)) -- != RETVAL_OK) -+ data->rr_len[j], region, tree, c, -+ compress_count)) != RETVAL_OK) - return r; - } else { - if(sldns_buffer_remaining(pkt) < data->rr_len[j]) -@@ -510,9 +523,9 @@ packed_rrset_encode(struct ub_packed_rrs - return RETVAL_TRUNC; - sldns_buffer_write(pkt, &owner_ptr, 2); - } else { -- if((r=compress_any_dname(key->rk.dname, -- pkt, owner_labs, region, tree)) -- != RETVAL_OK) -+ if((r=compress_any_dname(key->rk.dname, -+ pkt, owner_labs, region, tree, -+ compress_count)) != RETVAL_OK) - return r; - if(sldns_buffer_remaining(pkt) < - 4+4+data->rr_len[i]) -@@ -544,7 +557,8 @@ static int - insert_section(struct reply_info* rep, size_t num_rrsets, uint16_t* num_rrs, - sldns_buffer* pkt, size_t rrsets_before, time_t timenow, - struct regional* region, struct compress_tree_node** tree, -- sldns_pkt_section s, uint16_t qtype, int dnssec, size_t rr_offset) -+ sldns_pkt_section s, uint16_t qtype, int dnssec, size_t rr_offset, -+ size_t* compress_count) - { - int r; - size_t i, setstart; -@@ -560,7 +574,7 @@ insert_section(struct reply_info* rep, s - setstart = sldns_buffer_position(pkt); - if((r=packed_rrset_encode(rep->rrsets[rrsets_before+i], - pkt, num_rrs, timenow, region, 1, 1, tree, -- s, qtype, dnssec, rr_offset)) -+ s, qtype, dnssec, rr_offset, compress_count)) - != RETVAL_OK) { - /* Bad, but if due to size must set TC bit */ - /* trim off the rrset neatly. */ -@@ -573,7 +587,7 @@ insert_section(struct reply_info* rep, s - setstart = sldns_buffer_position(pkt); - if((r=packed_rrset_encode(rep->rrsets[rrsets_before+i], - pkt, num_rrs, timenow, region, 1, 0, tree, -- s, qtype, dnssec, rr_offset)) -+ s, qtype, dnssec, rr_offset, compress_count)) - != RETVAL_OK) { - sldns_buffer_set_position(pkt, setstart); - return r; -@@ -584,7 +598,7 @@ insert_section(struct reply_info* rep, s - setstart = sldns_buffer_position(pkt); - if((r=packed_rrset_encode(rep->rrsets[rrsets_before+i], - pkt, num_rrs, timenow, region, 0, 1, tree, -- s, qtype, dnssec, rr_offset)) -+ s, qtype, dnssec, rr_offset, compress_count)) - != RETVAL_OK) { - sldns_buffer_set_position(pkt, setstart); - return r; -@@ -677,6 +691,7 @@ reply_info_encode(struct query_info* qin - struct compress_tree_node* tree = 0; - int r; - size_t rr_offset; -+ size_t compress_count=0; - - sldns_buffer_clear(buffer); - if(udpsize < sldns_buffer_limit(buffer)) -@@ -723,7 +738,7 @@ reply_info_encode(struct query_info* qin - arep.rrsets = &qinfo->local_alias->rrset; - if((r=insert_section(&arep, 1, &ancount, buffer, 0, - timezero, region, &tree, LDNS_SECTION_ANSWER, -- qinfo->qtype, dnssec, rr_offset)) != RETVAL_OK) { -+ qinfo->qtype, dnssec, rr_offset, &compress_count)) != RETVAL_OK) { - if(r == RETVAL_TRUNC) { - /* create truncated message */ - sldns_buffer_write_u16_at(buffer, 6, ancount); -@@ -738,7 +753,7 @@ reply_info_encode(struct query_info* qin - /* insert answer section */ - if((r=insert_section(rep, rep->an_numrrsets, &ancount, buffer, - 0, timenow, region, &tree, LDNS_SECTION_ANSWER, qinfo->qtype, -- dnssec, rr_offset)) != RETVAL_OK) { -+ dnssec, rr_offset, &compress_count)) != RETVAL_OK) { - if(r == RETVAL_TRUNC) { - /* create truncated message */ - sldns_buffer_write_u16_at(buffer, 6, ancount); -@@ -756,7 +771,7 @@ reply_info_encode(struct query_info* qin - if((r=insert_section(rep, rep->ns_numrrsets, &nscount, buffer, - rep->an_numrrsets, timenow, region, &tree, - LDNS_SECTION_AUTHORITY, qinfo->qtype, -- dnssec, rr_offset)) != RETVAL_OK) { -+ dnssec, rr_offset, &compress_count)) != RETVAL_OK) { - if(r == RETVAL_TRUNC) { - /* create truncated message */ - sldns_buffer_write_u16_at(buffer, 8, nscount); -@@ -773,7 +788,7 @@ reply_info_encode(struct query_info* qin - if((r=insert_section(rep, rep->ar_numrrsets, &arcount, buffer, - rep->an_numrrsets + rep->ns_numrrsets, timenow, region, - &tree, LDNS_SECTION_ADDITIONAL, qinfo->qtype, -- dnssec, rr_offset)) != RETVAL_OK) { -+ dnssec, rr_offset, &compress_count)) != RETVAL_OK) { - if(r == RETVAL_TRUNC) { - /* no need to set TC bit, this is the additional */ - sldns_buffer_write_u16_at(buffer, 10, arcount); diff --git a/sources/meta-openembedded/meta-networking/recipes-support/unbound/unbound/run-ptest b/sources/meta-openembedded/meta-networking/recipes-support/unbound/unbound/run-ptest new file mode 100644 index 00000000..433a687c --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-support/unbound/unbound/run-ptest @@ -0,0 +1,17 @@ +#!/bin/sh + +cd tests || exit 1 +retVal=0 +./unittest +./testbound -s +for x in ./testdata/*.rpl; do + output="$(./testbound -p $x -o -vvvvv 2>&1)" + if test $? -eq 0; then + echo "$x :Pass" + else + echo "$output" + echo "$x :Fail" + retVal=1 + fi +done +exit $retVal diff --git a/sources/meta-openembedded/meta-networking/recipes-support/unbound/unbound_1.19.3.bb b/sources/meta-openembedded/meta-networking/recipes-support/unbound/unbound_1.19.3.bb deleted file mode 100644 index 6f54038c..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-support/unbound/unbound_1.19.3.bb +++ /dev/null @@ -1,48 +0,0 @@ -SUMMARY = "Unbound is a validating, recursive, and caching DNS resolver" -DESCRIPTION = "Unbound's design is a set of modular components which incorporate \ - features including enhanced security (DNSSEC) validation, Internet Protocol \ - Version 6 (IPv6), and a client resolver library API as an integral part of the \ - architecture" - -HOMEPAGE = "https://www.unbound.net/" -SECTION = "net" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=5308494bc0590c0cb036afd781d78f06" - -SRC_URI = "git://github.com/NLnetLabs/unbound.git;protocol=https;branch=branch-1.19.3 \ - file://CVE-2024-8508.patch \ - " -SRCREV = "48b6c60a24e9a5d6d369a7a37c9fe2a767f26abd" - -inherit autotools pkgconfig systemd update-rc.d - -DEPENDS = "openssl libtool-native bison-native expat" -RDEPENDS:${PN} = "bash openssl-bin daemonize" - -S = "${WORKDIR}/git" - -EXTRA_OECONF = "--with-libexpat=${STAGING_EXECPREFIXDIR} \ - --with-ssl=${STAGING_EXECPREFIXDIR} \ - --enable-largefile" - -PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" -PACKAGECONFIG[dnscrypt] = "--enable-dnscrypt, --disable-dnscrypt, libsodium" -PACKAGECONFIG[systemd] = "--enable-systemd,--disable-systemd,systemd" -PACKAGECONFIG[libevent] = "--with-libevent=${STAGING_EXECPREFIXDIR},,libevent" - -do_configure:append() { - sed -i -e 's#${RECIPE_SYSROOT}##g' ${B}/config.h -} - -do_install:append() { - install -d ${D}${systemd_unitdir}/system - install -m 0644 ${B}/contrib/unbound.service ${D}${systemd_unitdir}/system - - install -d ${D}${sysconfdir}/init.d - install -m 0755 ${S}/contrib/unbound.init_yocto ${D}${sysconfdir}/init.d/unbound -} - -SYSTEMD_SERVICE:${PN} = "${BPN}.service" - -INITSCRIPT_NAME = "unbound" -INITSCRIPT_PARAMS = "defaults" diff --git a/sources/meta-openembedded/meta-networking/recipes-support/unbound/unbound_1.21.0.bb b/sources/meta-openembedded/meta-networking/recipes-support/unbound/unbound_1.21.0.bb new file mode 100644 index 00000000..8c042dc5 --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-support/unbound/unbound_1.21.0.bb @@ -0,0 +1,65 @@ +SUMMARY = "Unbound is a validating, recursive, and caching DNS resolver" +DESCRIPTION = "Unbound's design is a set of modular components which incorporate \ + features including enhanced security (DNSSEC) validation, Internet Protocol \ + Version 6 (IPv6), and a client resolver library API as an integral part of the \ + architecture" + +HOMEPAGE = "https://www.unbound.net/" +SECTION = "net" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=5308494bc0590c0cb036afd781d78f06" + +SRC_URI = "git://github.com/NLnetLabs/unbound.git;protocol=https;branch=master \ + file://run-ptest \ + " +SRCREV = "79e4c578518886a32475cfbb0de383ff3a905033" + +inherit autotools pkgconfig systemd update-rc.d ptest + +DEPENDS = "openssl libtool-native bison-native expat" +RDEPENDS:${PN} = "bash openssl-bin daemonize" + +S = "${WORKDIR}/git" + +EXTRA_OECONF = "--with-libexpat=${STAGING_EXECPREFIXDIR} \ + --with-ssl=${STAGING_EXECPREFIXDIR} \ + --enable-largefile" + +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" +PACKAGECONFIG[dnscrypt] = "--enable-dnscrypt, --disable-dnscrypt, libsodium" +PACKAGECONFIG[systemd] = "--enable-systemd,--disable-systemd,systemd" +PACKAGECONFIG[libevent] = "--with-libevent=${STAGING_EXECPREFIXDIR},,libevent" + +do_configure:append() { + sed -i -e 's#${RECIPE_SYSROOT}##g' ${B}/config.h +} + +do_compile:append() { + oe_runmake tests +} + +do_install:append() { + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${B}/contrib/unbound.service ${D}${systemd_unitdir}/system + + install -d ${D}${sysconfdir}/init.d + install -m 0755 ${S}/contrib/unbound.init_yocto ${D}${sysconfdir}/init.d/unbound +} + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + install -d ${D}${PTEST_PATH}/tests/testdata + + install -m 0544 ${B}/unittest ${D}${PTEST_PATH}/tests/ + install -m 0544 ${B}/testbound ${D}${PTEST_PATH}/tests/ + install -m 0664 ${S}/testdata/test_signatures* ${D}${PTEST_PATH}/tests/ + install -m 0664 ${S}/testdata/test_sigs* ${D}${PTEST_PATH}/tests/ + install -m 0664 ${S}/testdata/test_ds* ${D}${PTEST_PATH}/tests/ + install -m 0664 ${S}/testdata/test_nsec3_hash* ${D}${PTEST_PATH}/tests/ + install -m 0644 ${S}/testdata/*.rpl ${D}/${PTEST_PATH}/tests/testdata/ +} + +SYSTEMD_SERVICE:${PN} = "${BPN}.service" + +INITSCRIPT_NAME = "unbound" +INITSCRIPT_PARAMS = "defaults" diff --git a/sources/meta-openembedded/meta-networking/recipes-support/wavemon/wavemon_0.9.5.bb b/sources/meta-openembedded/meta-networking/recipes-support/wavemon/wavemon_0.9.5.bb deleted file mode 100644 index 9da43cf9..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-support/wavemon/wavemon_0.9.5.bb +++ /dev/null @@ -1,28 +0,0 @@ -SUMMARY = "wavemon is a wireless device monitoring application" -HOMEPAGE = "https://github.com/uoaerg/wavemon" -DESCRIPTION = "wavemon is a wireless device monitoring application that \ - allows you to watch signal and noise levels, packet \ - statistics, device configuration and network parameters of \ - your wireless network hardware." - -LICENSE = "GPL-3.0-or-later" -LIC_FILES_CHKSUM = "file://LICENSE;md5=1ebbd3e34237af26da5dc08a4e440464" - -PACKAGECONFIG ??= "cap" -PACKAGECONFIG[cap] = "--with-libcap,--without-libcap,libcap" - -DEPENDS = "libnl ncurses" - -SRC_URI = "git://github.com/uoaerg/wavemon;branch=master;protocol=https" -SRCREV = "a7c2f190e010db508ead31fa952478e2a1c13d64" - -# Needs some help to find libnl3 headers. -# Reorder -pthread flag on the command line. -EXTRA_OEMAKE = "\ - CC='${CC}' CFLAGS='${CFLAGS} -pthread -I${STAGING_INCDIR}/libnl3' \ -" - -S = "${WORKDIR}/git" - -# wavemon does not support using out-of-tree builds -inherit autotools-brokensep pkgconfig diff --git a/sources/meta-openembedded/meta-networking/recipes-support/wavemon/wavemon_0.9.6.bb b/sources/meta-openembedded/meta-networking/recipes-support/wavemon/wavemon_0.9.6.bb new file mode 100644 index 00000000..c3de38a6 --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-support/wavemon/wavemon_0.9.6.bb @@ -0,0 +1,28 @@ +SUMMARY = "wavemon is a wireless device monitoring application" +HOMEPAGE = "https://github.com/uoaerg/wavemon" +DESCRIPTION = "wavemon is a wireless device monitoring application that \ + allows you to watch signal and noise levels, packet \ + statistics, device configuration and network parameters of \ + your wireless network hardware." + +LICENSE = "GPL-3.0-or-later" +LIC_FILES_CHKSUM = "file://LICENSE;md5=1ebbd3e34237af26da5dc08a4e440464" + +PACKAGECONFIG ??= "cap" +PACKAGECONFIG[cap] = "--with-libcap,--without-libcap,libcap" + +DEPENDS = "libnl ncurses" + +SRC_URI = "git://github.com/uoaerg/wavemon;branch=master;protocol=https" +SRCREV = "8ba6604027c0aa5131070e3fafdcda323d58a7ad" + +# Needs some help to find libnl3 headers. +# Reorder -pthread flag on the command line. +EXTRA_OEMAKE = "\ + CC='${CC}' CFLAGS='${CFLAGS} -pthread -I${STAGING_INCDIR}/libnl3' \ +" + +S = "${WORKDIR}/git" + +# wavemon does not support using out-of-tree builds +inherit autotools-brokensep pkgconfig diff --git a/sources/meta-openembedded/meta-networking/recipes-support/wireshark/wireshark_4.2.12.bb b/sources/meta-openembedded/meta-networking/recipes-support/wireshark/wireshark_4.2.12.bb deleted file mode 100644 index ab6160b7..00000000 --- a/sources/meta-openembedded/meta-networking/recipes-support/wireshark/wireshark_4.2.12.bb +++ /dev/null @@ -1,99 +0,0 @@ -DESCRIPTION = "wireshark - a popular network protocol analyzer" -HOMEPAGE = "http://www.wireshark.org" -SECTION = "net" -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=570a9b3749dd0463a1778803b12a6dce" - -DEPENDS = "pcre2 expat glib-2.0 glib-2.0-native libgcrypt libgpg-error libxml2 bison-native c-ares speexdsp" - -DEPENDS:append:class-target = " wireshark-native chrpath-replacement-native " - -SRC_URI = "https://1.eu.dl.wireshark.org/src/all-versions/wireshark-${PV}.tar.xz \ - file://0001-wireshark-src-improve-reproducibility.patch \ - file://0002-flex-Remove-line-directives.patch \ - file://0004-lemon-Remove-line-directives.patch \ - file://0001-UseLemon.cmake-do-not-use-lemon-data-from-the-host.patch \ - " - -UPSTREAM_CHECK_URI = "https://1.as.dl.wireshark.org/src/all-versions" - -SRC_URI[sha256sum] = "6ed51da5f6638aba609be8d1d64a7a85312749a49261146c391fea391a3e5f06" - -PE = "1" - -inherit cmake pkgconfig python3native python3targetconfig perlnative upstream-version-is-even mime mime-xdg - -PACKAGECONFIG ?= "libpcap gnutls libnl libcap sbc" - -PACKAGECONFIG:class-native = "libpcap gnutls ssl libssh" - -PACKAGECONFIG[libcap] = "-DENABLE_CAP=ON,-DENABLE_CAP=OFF -DENABLE_PCAP_NG_DEFAULT=ON, libcap" -PACKAGECONFIG[libpcap] = "-DENABLE_PCAP=ON,-DENABLE_PCAP=OFF -DENABLE_PCAP_NG_DEFAULT=ON , libpcap" -PACKAGECONFIG[libsmi] = "-DENABLE_SMI=ON,-DENABLE_SMI=OFF,libsmi" -PACKAGECONFIG[libnl] = ",,libnl" -PACKAGECONFIG[portaudio] = "-DENABLE_PORTAUDIO=ON,-DENABLE_PORTAUDIO=OFF, portaudio-v19" -PACKAGECONFIG[gnutls] = "-DENABLE_GNUTLS=ON,-DENABLE_GNUTLS=OFF, gnutls" -PACKAGECONFIG[ssl] = ",,openssl" -PACKAGECONFIG[krb5] = "-DENABLE_KRB5=ON,-DENABLE_KRB5=OFF, krb5" -PACKAGECONFIG[lua] = "-DENABLE_LUA=ON,-DENABLE_LUA=OFF, lua" -PACKAGECONFIG[zlib] = "-DENABLE_ZLIB=ON,-DENABLE_ZLIB=OFF, zlib" -PACKAGECONFIG[geoip] = ",, geoip" -PACKAGECONFIG[plugins] = "-DENABLE_PLUGINS=ON,-DENABLE_PLUGINS=OFF" -PACKAGECONFIG[sbc] = "-DENABLE_SBC=ON,-DENABLE_SBC=OFF, sbc" -PACKAGECONFIG[libssh] = "-DENABLE_LIBSSH=ON,-DENABLE_LIBSSH=OFF, libssh2" -PACKAGECONFIG[lz4] = "-DENABLE_LZ4=ON,-DENABLE_LZ4=OFF, lz4" -PACKAGECONFIG[zstd] = "-DENABLE_STTD=ON,-DENABLE_ZSTD=OFF, zstd" -PACKAGECONFIG[nghttp2] = "-DENABLE_NGHTTP2=ON,-DENABLE_NGHTTP2=OFF, nghttp2" - -# these next two options require addional layers -PACKAGECONFIG[qt5] = "-DENABLE_QT5=ON -DBUILD_wireshark=ON, -DENABLE_QT5=OFF -DBUILD_wireshark=OFF, qttools-native qtmultimedia qtsvg" - -inherit ${@bb.utils.contains('PACKAGECONFIG', 'qt5', 'cmake_qt5', '', d)} - -EXTRA_OECMAKE += "-DENABLE_NETLINK=ON \ - -DBUILD_mmdbresolve=OFF \ - -DBUILD_randpktdump=OFF \ - -DBUILD_androiddump=OFF \ - -DBUILD_dcerpcidl2wrs=OFF \ - -DM_INCLUDE_DIR=${includedir} \ - -DM_LIBRARY=${libdir} \ - " -CFLAGS:append = " -lm" - -do_compile:append:class-target() { - # Fix TMPDIR, these are in the comments section - sed -i -e "s:** source file.*::g" ${B}/wiretap/ascend_parser.c - sed -i -e "s:** source file.*::g" ${B}/wiretap/candump_parser.c - sed -i -e "s:** source file.*::g" ${B}/wiretap/busmaster_parser.c - sed -i -e "s:** source file.*::g" ${B}/epan/protobuf_lang_parser.c - sed -i -e "s:** source file.*::g" ${B}/epan/dtd_grammar.c - sed -i -e "s:** source file.*::g" ${B}/epan/dfilter/grammar.c -} - -do_install:append:class-native() { - install -d ${D}${bindir} - for f in lemon - do - install -m 0755 ${B}/run/$f ${D}${bindir} - done -} - -do_install:append:class-target() { - for f in `find ${D}${libdir} ${D}${bindir} -type f -executable` - do - chrpath --delete $f - done - - # We don't need the cmake files installed - rm -fr ${D}${usrlib}/${BPN}/cmake -} - -PACKAGE_BEFORE_PN += "tshark" - -FILES:tshark = "${bindir}/tshark ${mandir}/man1/tshark.*" - -FILES:${PN} += "${datadir}*" - -RDEPENDS:tshark = "wireshark" - -BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-networking/recipes-support/wireshark/wireshark_4.2.9.bb b/sources/meta-openembedded/meta-networking/recipes-support/wireshark/wireshark_4.2.9.bb new file mode 100644 index 00000000..ffd7bd56 --- /dev/null +++ b/sources/meta-openembedded/meta-networking/recipes-support/wireshark/wireshark_4.2.9.bb @@ -0,0 +1,99 @@ +DESCRIPTION = "wireshark - a popular network protocol analyzer" +HOMEPAGE = "http://www.wireshark.org" +SECTION = "net" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +DEPENDS = "pcre2 expat glib-2.0 glib-2.0-native libgcrypt libgpg-error libxml2 bison-native c-ares speexdsp" + +DEPENDS:append:class-target = " wireshark-native chrpath-replacement-native " + +SRC_URI = "https://1.eu.dl.wireshark.org/src/wireshark-${PV}.tar.xz \ + file://0001-wireshark-src-improve-reproducibility.patch \ + file://0002-flex-Remove-line-directives.patch \ + file://0004-lemon-Remove-line-directives.patch \ + file://0001-UseLemon.cmake-do-not-use-lemon-data-from-the-host.patch \ + " + +UPSTREAM_CHECK_URI = "https://1.as.dl.wireshark.org/src" + +SRC_URI[sha256sum] = "62c2b6652d7f9a50668867bd57b21609c9a9b6950f26e7f30a24b2de0e72ded3" + +PE = "1" + +inherit cmake pkgconfig python3native python3targetconfig perlnative upstream-version-is-even mime mime-xdg + +PACKAGECONFIG ?= "libpcap gnutls libnl libcap sbc" + +PACKAGECONFIG:class-native = "libpcap gnutls ssl libssh" + +PACKAGECONFIG[libcap] = "-DENABLE_CAP=ON,-DENABLE_CAP=OFF -DENABLE_PCAP_NG_DEFAULT=ON, libcap" +PACKAGECONFIG[libpcap] = "-DENABLE_PCAP=ON,-DENABLE_PCAP=OFF -DENABLE_PCAP_NG_DEFAULT=ON , libpcap" +PACKAGECONFIG[libsmi] = "-DENABLE_SMI=ON,-DENABLE_SMI=OFF,libsmi" +PACKAGECONFIG[libnl] = ",,libnl" +PACKAGECONFIG[portaudio] = "-DENABLE_PORTAUDIO=ON,-DENABLE_PORTAUDIO=OFF, portaudio-v19" +PACKAGECONFIG[gnutls] = "-DENABLE_GNUTLS=ON,-DENABLE_GNUTLS=OFF, gnutls" +PACKAGECONFIG[ssl] = ",,openssl" +PACKAGECONFIG[krb5] = "-DENABLE_KRB5=ON,-DENABLE_KRB5=OFF, krb5" +PACKAGECONFIG[lua] = "-DENABLE_LUA=ON,-DENABLE_LUA=OFF, lua" +PACKAGECONFIG[zlib] = "-DENABLE_ZLIB=ON,-DENABLE_ZLIB=OFF, zlib" +PACKAGECONFIG[geoip] = ",, geoip" +PACKAGECONFIG[plugins] = "-DENABLE_PLUGINS=ON,-DENABLE_PLUGINS=OFF" +PACKAGECONFIG[sbc] = "-DENABLE_SBC=ON,-DENABLE_SBC=OFF, sbc" +PACKAGECONFIG[libssh] = "-DENABLE_LIBSSH=ON,-DENABLE_LIBSSH=OFF, libssh2" +PACKAGECONFIG[lz4] = "-DENABLE_LZ4=ON,-DENABLE_LZ4=OFF, lz4" +PACKAGECONFIG[zstd] = "-DENABLE_ZSTD=ON,-DENABLE_ZSTD=OFF, zstd" +PACKAGECONFIG[nghttp2] = "-DENABLE_NGHTTP2=ON,-DENABLE_NGHTTP2=OFF, nghttp2" + +# these next two options require addional layers +PACKAGECONFIG[qt5] = "-DENABLE_QT5=ON -DBUILD_wireshark=ON, -DENABLE_QT5=OFF -DBUILD_wireshark=OFF, qttools-native qtmultimedia qtsvg" + +inherit_defer ${@bb.utils.contains('PACKAGECONFIG', 'qt5', 'cmake_qt5', '', d)} + +EXTRA_OECMAKE += "-DENABLE_NETLINK=ON \ + -DBUILD_mmdbresolve=OFF \ + -DBUILD_randpktdump=OFF \ + -DBUILD_androiddump=OFF \ + -DBUILD_dcerpcidl2wrs=OFF \ + -DM_INCLUDE_DIR=${includedir} \ + -DM_LIBRARY=${libdir} \ + " +CFLAGS:append = " -lm" + +do_compile:append:class-target() { + # Fix TMPDIR, these are in the comments section + sed -i -e "s:** source file.*::g" ${B}/wiretap/ascend_parser.c + sed -i -e "s:** source file.*::g" ${B}/wiretap/candump_parser.c + sed -i -e "s:** source file.*::g" ${B}/wiretap/busmaster_parser.c + sed -i -e "s:** source file.*::g" ${B}/epan/protobuf_lang_parser.c + sed -i -e "s:** source file.*::g" ${B}/epan/dtd_grammar.c + sed -i -e "s:** source file.*::g" ${B}/epan/dfilter/grammar.c +} + +do_install:append:class-native() { + install -d ${D}${bindir} + for f in lemon + do + install -m 0755 ${B}/run/$f ${D}${bindir} + done +} + +do_install:append:class-target() { + for f in `find ${D}${libdir} ${D}${bindir} -type f -executable` + do + chrpath --delete $f + done + + # We don't need the cmake files installed + rm -fr ${D}${usrlib}/${BPN}/cmake +} + +PACKAGE_BEFORE_PN += "tshark" + +FILES:tshark = "${bindir}/tshark ${mandir}/man1/tshark.*" + +FILES:${PN} += "${datadir}*" + +RDEPENDS:tshark = "wireshark" + +BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-oe/README.md b/sources/meta-openembedded/meta-oe/README.md index 9bc68a86..a4c98a79 100644 --- a/sources/meta-openembedded/meta-oe/README.md +++ b/sources/meta-openembedded/meta-oe/README.md @@ -4,7 +4,7 @@ meta-oe This layer depends on: URI: git://github.com/openembedded/openembedded-core.git -branch: scarthgap +branch: styhead luajit recipe requires host compiler to be able to generate 32bit code when target is 32bit e.g. arm, so ensure that $CC -m32 is functional on build host, if building this recipe, needed @@ -16,14 +16,19 @@ pacman -S lib32-gcc-libs lib32-glibc Ubuntu sudo apt-get install gcc-multilib linux-libc-dev:i386 -Send pull requests to openembedded-devel@lists.openembedded.org with '[meta-oe][scarthgap]' in the subject' +Send pull requests to openembedded-devel@lists.openembedded.org with '[meta-oe][styhead]' in the subject' When sending single patches, please use something like: -'git send-email -M -1 --to openembedded-devel@lists.openembedded.org --subject-prefix="meta-oe][scarthgap][PATCH"' +'git send-email -M -1 --to openembedded-devel@lists.openembedded.org --subject-prefix="meta-oe][styhead][PATCH"' You are encouraged to fork the mirror on GitHub https://github.com/openembedded/meta-openembedded to share your patches, this is preferred for patch sets consisting of more than one patch. +Note, it is discouraged to send patches via GitHub pull request system. Such +patches get less attention from developers and can be mishandled or not +reviewed properly. Please use emails instead. For exemple, you can use +'git request-pull' to generate an email referencing your git repository. + Other services like GitLab, repo.or.cz or self-hosted setups are of course accepted as well, 'git fetch ' works the same on all of them. We recommend GitHub because it is free, easy to use, has been proven to be reliable and has a really good web GUI. diff --git a/sources/meta-openembedded/meta-oe/conf/include/ptest-packagelists-meta-oe.inc b/sources/meta-openembedded/meta-oe/conf/include/ptest-packagelists-meta-oe.inc index 639daec9..0ea43f59 100644 --- a/sources/meta-openembedded/meta-oe/conf/include/ptest-packagelists-meta-oe.inc +++ b/sources/meta-openembedded/meta-oe/conf/include/ptest-packagelists-meta-oe.inc @@ -7,7 +7,6 @@ # # ptests which take less than ~30s each PTESTS_FAST_META_OE = "\ - asio \ cmocka \ cunit \ duktape \ @@ -18,7 +17,6 @@ PTESTS_FAST_META_OE = "\ jq \ leveldb \ libcereal \ - libee \ libgpiod \ libio-pty-perl \ libmanette \ @@ -35,8 +33,10 @@ PTESTS_FAST_META_OE = "\ nodejs \ onig \ oprofile \ + pegtl \ protobuf \ pv \ + python3-pefile \ sdbus-c++ \ uthash \ xmlsec1 \ diff --git a/sources/meta-openembedded/meta-oe/conf/layer.conf b/sources/meta-openembedded/meta-oe/conf/layer.conf index 9faf579b..a254990e 100644 --- a/sources/meta-openembedded/meta-oe/conf/layer.conf +++ b/sources/meta-openembedded/meta-oe/conf/layer.conf @@ -44,7 +44,7 @@ LAYERVERSION_openembedded-layer = "1" LAYERDEPENDS_openembedded-layer = "core" -LAYERSERIES_COMPAT_openembedded-layer = "scarthgap" +LAYERSERIES_COMPAT_openembedded-layer = "styhead" LICENSE_PATH += "${LAYERDIR}/licenses" diff --git a/sources/meta-openembedded/meta-oe/dynamic-layers/gnome-layer/recipes-graphics/openbox/openbox-xdgmenu_0.3.bb b/sources/meta-openembedded/meta-oe/dynamic-layers/gnome-layer/recipes-graphics/openbox/openbox-xdgmenu_0.3.bb index ac197a63..98184b22 100644 --- a/sources/meta-openembedded/meta-oe/dynamic-layers/gnome-layer/recipes-graphics/openbox/openbox-xdgmenu_0.3.bb +++ b/sources/meta-openembedded/meta-oe/dynamic-layers/gnome-layer/recipes-graphics/openbox/openbox-xdgmenu_0.3.bb @@ -16,6 +16,7 @@ SRC_URI = " \ file://fix-menu-generation.patch \ " SRC_URI[sha256sum] = "824e099928aab2fb628f0fa4870ef7bba10b95581e47c2d8fa216709a0f399b3" +UPSTREAM_CHECK_URI="https://launchpad.net/openbox-xdgmenu/" inherit pkgconfig features_check # depends on openbox, which is X11-only diff --git a/sources/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc_0.10.2.bb b/sources/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc_0.10.2.bb index d348ef8b..17a1d3c9 100644 --- a/sources/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc_0.10.2.bb +++ b/sources/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc_0.10.2.bb @@ -70,13 +70,13 @@ do_install:append() { install -m 0755 -d ${D}${sysconfdir} install -m 0755 -d ${D}${sysconfdir}/lirc - install -m 0644 ${WORKDIR}/lircd.conf ${D}${sysconfdir}/lirc/ - install -m 0644 ${WORKDIR}/lirc_options.conf ${D}${sysconfdir}/lirc/ + install -m 0644 ${UNPACKDIR}/lircd.conf ${D}${sysconfdir}/lirc/ + install -m 0644 ${UNPACKDIR}/lirc_options.conf ${D}${sysconfdir}/lirc/ if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then install -m 0755 -d ${D}${systemd_unitdir}/system ${D}${libdir}/tmpfiles.d - install -m 0644 ${WORKDIR}/lircd.service ${D}${systemd_unitdir}/system/ - install -m 0755 ${WORKDIR}/lircexec.init ${D}${systemd_unitdir}/system/ - install -m 0644 ${WORKDIR}/lirc.tmpfiles ${D}${libdir}/tmpfiles.d/lirc.conf + install -m 0644 ${UNPACKDIR}/lircd.service ${D}${systemd_unitdir}/system/ + install -m 0755 ${UNPACKDIR}/lircexec.init ${D}${systemd_unitdir}/system/ + install -m 0644 ${UNPACKDIR}/lirc.tmpfiles ${D}${libdir}/tmpfiles.d/lirc.conf else rm -rf ${D}/lib fi diff --git a/sources/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/netplan/netplan/0002-meson.build-do-not-use-Werror.patch b/sources/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/netplan/netplan/0001-meson.build-do-not-use-Werror.patch similarity index 100% rename from sources/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/netplan/netplan/0002-meson.build-do-not-use-Werror.patch rename to sources/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/netplan/netplan/0001-meson.build-do-not-use-Werror.patch diff --git a/sources/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/netplan/netplan/0001-meson.build-drop-unnecessary-build-dependencies.patch b/sources/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/netplan/netplan/0001-meson.build-drop-unnecessary-build-dependencies.patch deleted file mode 100644 index 4f385e91..00000000 --- a/sources/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/netplan/netplan/0001-meson.build-drop-unnecessary-build-dependencies.patch +++ /dev/null @@ -1,58 +0,0 @@ -From d3aa30f5cd7ba375e006a755752acbcfcd619452 Mon Sep 17 00:00:00 2001 -From: Yi Zhao -Date: Wed, 6 Mar 2024 19:27:15 +0800 -Subject: [PATCH] meson.build: drop unnecessary build dependencies - -The pytest and pycoverage are required by meson test but not for -building. Mark them as 'required: false' to get rid of unnecessary -build dependencies. - -Upstream-Status: Inappropriate [oe specific] - -Signed-off-by: Yi Zhao ---- - meson.build | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -diff --git a/meson.build b/meson.build -index 9556836a..30f33fe2 100644 ---- a/meson.build -+++ b/meson.build -@@ -25,8 +25,8 @@ bash_completions_dir = completions.get_variable(pkgconfig: 'completionsdir', def - # Order: Fedora/Mageia/openSUSE || Debian/Ubuntu - pyflakes = find_program('pyflakes-3', 'pyflakes3', required: false) - pycodestyle = find_program('pycodestyle-3', 'pycodestyle', 'pep8', required: false) --pytest = find_program('pytest-3', 'pytest3') # also requires the pytest-cov plugin --pycoverage = find_program('coverage-3', 'python3-coverage') -+pytest = find_program('pytest-3', 'pytest3', required: false) # also requires the pytest-cov plugin -+pycoverage = find_program('coverage-3', 'python3-coverage', required: false) - pandoc = find_program('pandoc', required: false) - find = find_program('find') - -@@ -75,6 +75,7 @@ if get_option('unit_testing') - endif - - #FIXME: exclude doc/env/ -+if pyflakes.found() and pycodestyle.found() - test('linting', - pyflakes, - timeout: 100, -@@ -91,7 +92,9 @@ test('legacy-tests', - find_program('tests/cli_legacy.py'), - timeout: 600, - env: test_env) -+endif - #TODO: split out dbus tests into own test() instance, to run in parallel -+if pycoverage.found() - test('unit-tests', - pycoverage, - args: ['run', '-a', '-m', 'pytest', '-s', '-v', '--cov-append', meson.current_source_dir()], -@@ -143,4 +146,5 @@ if get_option('b_coverage') - priority: -99, # run last - is_parallel: false) - endif -+endif - --- -2.25.1 - diff --git a/sources/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/netplan/netplan/0001-networkd.c-define-scope-specific-to-case-statement.patch b/sources/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/netplan/netplan/0001-networkd.c-define-scope-specific-to-case-statement.patch deleted file mode 100644 index 9f01108a..00000000 --- a/sources/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/netplan/netplan/0001-networkd.c-define-scope-specific-to-case-statement.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 6e3dd61bf90a7ca8c36c5b95943cbff7c1ad3c2d Mon Sep 17 00:00:00 2001 -From: Yi Zhao -Date: Wed, 6 Mar 2024 16:12:31 +0800 -Subject: [PATCH] networkd.c: define scope specific to case statement - -Per [1], define a scope specific to case statement to fix build with -clang. - -Fixes: -../git/src/networkd.c:544:13: error: expected expression - 544 | gchar* first = g_strcmp0(def->id, def->veth_peer_link->id) < 0 ? def->id : def->veth_peer_link->id; - | ^ -../git/src/networkd.c:545:17: error: use of undeclared identifier 'first' - 545 | if (first != def->id) { - | ^ - -[1] https://stackoverflow.com/questions/92396/why-cant-variables-be-declared-in-a-switch-statement - -Upstream-Status: Pending - -Signed-off-by: Yi Zhao ---- - src/networkd.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/src/networkd.c b/src/networkd.c -index 25121c48..5eb9c0fe 100644 ---- a/src/networkd.c -+++ b/src/networkd.c -@@ -541,12 +541,14 @@ write_netdev_file(const NetplanNetDefinition* def, const char* rootdir, const ch - * and, if the selected name is the name of the netdef being written, we generate - * the .netdev file. Otherwise we skip the netdef. - */ -+ { - gchar* first = g_strcmp0(def->id, def->veth_peer_link->id) < 0 ? def->id : def->veth_peer_link->id; - if (first != def->id) { - g_string_free(s, TRUE); - return; - } - g_string_append_printf(s, "Kind=veth\n\n[Peer]\nName=%s\n", def->veth_peer_link->id); -+ } - break; - - case NETPLAN_DEF_TYPE_TUNNEL: --- -2.25.1 - diff --git a/sources/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/netplan/netplan/CVE-2022-4968.patch b/sources/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/netplan/netplan/CVE-2022-4968.patch deleted file mode 100644 index a7a3c28f..00000000 --- a/sources/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/netplan/netplan/CVE-2022-4968.patch +++ /dev/null @@ -1,452 +0,0 @@ -From 9d9a67b00b18708ce190b806686065a6c7b73527 Mon Sep 17 00:00:00 2001 -From: Danilo Egea Gondolfo -Date: Wed, 22 May 2024 15:44:16 +0100 -Subject: [PATCH] libnetplan: use more restrictive file permissions - -A new util.c:_netplan_g_string_free_to_file_with_permissions() was added -and accepts the owner, group and file mode as arguments. When these -properties can't be set, when the generator is called by a non-root user -for example, it will not hard-fail. This function is called by unit -tests where we can't set the owner to a privileged account for example. - -When generating backend files, use more restrictive permissions: - -networkd related files will be owned by root:systemd-network and have -mode 0640. - -service unit files will be owned by root:root and have mode 0640. -udevd files will be owned by root:root with mode 0640. - -wpa_supplicant and Network Manager files will continue with the existing -permissions. - -Autopkgtests will check if the permissions are set as expected when -calling the generator. - -CVE: CVE-2022-4968 - -Upstream-Status: Backport [https://github.com/canonical/netplan/commit/4c39b75b5c6ae7d976bda6da68da60d9a7f085ee] - -Signed-off-by: Jinfeng Wang ---- - src/networkd.c | 36 +++------------ - src/networkd.h | 2 + - src/nm.c | 4 +- - src/openvswitch.c | 2 +- - src/sriov.c | 4 +- - src/util-internal.h | 3 ++ - src/util.c | 46 +++++++++++++++++++ - tests/generator/test_auth.py | 2 +- - tests/generator/test_wifis.py | 2 +- - tests/integration/base.py | 85 +++++++++++++++++++++++++++++++++++ - 10 files changed, 150 insertions(+), 36 deletions(-) - -diff --git a/src/networkd.c b/src/networkd.c -index 25121c4..a051c6f 100644 ---- a/src/networkd.c -+++ b/src/networkd.c -@@ -221,7 +221,6 @@ STATIC void - write_link_file(const NetplanNetDefinition* def, const char* rootdir, const char* path) - { - GString* s = NULL; -- mode_t orig_umask; - - /* Don't write .link files for virtual devices; they use .netdev instead. - * Don't write .link files for MODEM devices, as they aren't supported by networkd. -@@ -293,9 +292,7 @@ write_link_file(const NetplanNetDefinition* def, const char* rootdir, const char - g_string_append_printf(s, "LargeReceiveOffload=%s\n", - (def->large_receive_offload ? "true" : "false")); - -- orig_umask = umask(022); -- _netplan_g_string_free_to_file(s, rootdir, path, ".link"); -- umask(orig_umask); -+ _netplan_g_string_free_to_file_with_permissions(s, rootdir, path, ".link", "root", "root", 0640); - } - - STATIC gboolean -@@ -313,7 +310,7 @@ write_regdom(const NetplanNetDefinition* def, const char* rootdir, GError** erro - g_string_append(s, "\n[Service]\nType=oneshot\n"); - g_string_append_printf(s, "ExecStart="SBINDIR"/iw reg set %s\n", def->regulatory_domain); - -- _netplan_g_string_free_to_file(s, rootdir, path, NULL); -+ _netplan_g_string_free_to_file_with_permissions(s, rootdir, path, NULL, "root", "root", 0640); - _netplan_safe_mkdir_p_dir(link); - if (symlink(path, link) < 0 && errno != EEXIST) { - // LCOV_EXCL_START -@@ -493,7 +490,6 @@ STATIC void - write_netdev_file(const NetplanNetDefinition* def, const char* rootdir, const char* path) - { - GString* s = NULL; -- mode_t orig_umask; - - g_assert(def->type >= NETPLAN_DEF_TYPE_VIRTUAL); - -@@ -589,11 +585,7 @@ write_netdev_file(const NetplanNetDefinition* def, const char* rootdir, const ch - default: g_assert_not_reached(); // LCOV_EXCL_LINE - } - -- /* these do not contain secrets and need to be readable by -- * systemd-networkd - LP: #1736965 */ -- orig_umask = umask(022); -- _netplan_g_string_free_to_file(s, rootdir, path, ".netdev"); -- umask(orig_umask); -+ _netplan_g_string_free_to_file_with_permissions(s, rootdir, path, ".netdev", "root", NETWORKD_GROUP, 0640); - } - - STATIC void -@@ -737,7 +729,6 @@ _netplan_netdef_write_network_file( - g_autoptr(GString) network = NULL; - g_autoptr(GString) link = NULL; - GString* s = NULL; -- mode_t orig_umask; - gboolean is_optional = def->optional; - - SET_OPT_OUT_PTR(has_been_written, FALSE); -@@ -993,11 +984,7 @@ _netplan_netdef_write_network_file( - if (network->len > 0) - g_string_append_printf(s, "\n[Network]\n%s", network->str); - -- /* these do not contain secrets and need to be readable by -- * systemd-networkd - LP: #1736965 */ -- orig_umask = umask(022); -- _netplan_g_string_free_to_file(s, rootdir, path, ".network"); -- umask(orig_umask); -+ _netplan_g_string_free_to_file_with_permissions(s, rootdir, path, ".network", "root", NETWORKD_GROUP, 0640); - } - - SET_OPT_OUT_PTR(has_been_written, TRUE); -@@ -1009,7 +996,6 @@ write_rules_file(const NetplanNetDefinition* def, const char* rootdir) - { - GString* s = NULL; - g_autofree char* path = g_strjoin(NULL, "run/udev/rules.d/99-netplan-", def->id, ".rules", NULL); -- mode_t orig_umask; - - /* do we need to write a .rules file? - * It's only required for reliably setting the name of a physical device -@@ -1043,9 +1029,7 @@ write_rules_file(const NetplanNetDefinition* def, const char* rootdir) - - g_string_append_printf(s, "NAME=\"%s\"\n", def->set_name); - -- orig_umask = umask(022); -- _netplan_g_string_free_to_file(s, rootdir, path, NULL); -- umask(orig_umask); -+ _netplan_g_string_free_to_file_with_permissions(s, rootdir, path, NULL, "root", "root", 0640); - } - - STATIC gboolean -@@ -1194,7 +1178,6 @@ STATIC void - write_wpa_unit(const NetplanNetDefinition* def, const char* rootdir) - { - g_autofree gchar *stdouth = NULL; -- mode_t orig_umask; - - stdouth = systemd_escape(def->id); - -@@ -1213,9 +1196,7 @@ write_wpa_unit(const NetplanNetDefinition* def, const char* rootdir) - } else { - g_string_append(s, " -Dnl80211,wext\n"); - } -- orig_umask = umask(022); -- _netplan_g_string_free_to_file(s, rootdir, path, NULL); -- umask(orig_umask); -+ _netplan_g_string_free_to_file_with_permissions(s, rootdir, path, NULL, "root", "root", 0640); - } - - STATIC gboolean -@@ -1224,7 +1205,6 @@ write_wpa_conf(const NetplanNetDefinition* def, const char* rootdir, GError** er - GHashTableIter iter; - GString* s = g_string_new("ctrl_interface=/run/wpa_supplicant\n\n"); - g_autofree char* path = g_strjoin(NULL, "run/netplan/wpa-", def->id, ".conf", NULL); -- mode_t orig_umask; - - g_debug("%s: Creating wpa_supplicant configuration file %s", def->id, path); - if (def->type == NETPLAN_DEF_TYPE_WIFI) { -@@ -1313,9 +1293,7 @@ write_wpa_conf(const NetplanNetDefinition* def, const char* rootdir, GError** er - } - - /* use tight permissions as this contains secrets */ -- orig_umask = umask(077); -- _netplan_g_string_free_to_file(s, rootdir, path, NULL); -- umask(orig_umask); -+ _netplan_g_string_free_to_file_with_permissions(s, rootdir, path, NULL, "root", "root", 0600); - return TRUE; - } - -diff --git a/src/networkd.h b/src/networkd.h -index 2bd0848..36c34b3 100644 ---- a/src/networkd.h -+++ b/src/networkd.h -@@ -20,6 +20,8 @@ - #include "netplan.h" - #include - -+#define NETWORKD_GROUP "systemd-network" -+ - NETPLAN_INTERNAL gboolean - _netplan_netdef_write_networkd( - const NetplanState* np_state, -diff --git a/src/nm.c b/src/nm.c -index 2b850af..8f1bf05 100644 ---- a/src/nm.c -+++ b/src/nm.c -@@ -1150,13 +1150,13 @@ netplan_state_finish_nm_write( - - /* write generated NetworkManager drop-in config */ - if (nm_conf->len > 0) -- _netplan_g_string_free_to_file(nm_conf, rootdir, "run/NetworkManager/conf.d/netplan.conf", NULL); -+ _netplan_g_string_free_to_file_with_permissions(nm_conf, rootdir, "run/NetworkManager/conf.d/netplan.conf", NULL, "root", "root", 0640); - else - g_string_free(nm_conf, TRUE); - - /* write generated udev rules */ - if (udev_rules->len > 0) -- _netplan_g_string_free_to_file(udev_rules, rootdir, "run/udev/rules.d/90-netplan.rules", NULL); -+ _netplan_g_string_free_to_file_with_permissions(udev_rules, rootdir, "run/udev/rules.d/90-netplan.rules", NULL, "root", "root", 0640); - else - g_string_free(udev_rules, TRUE); - -diff --git a/src/openvswitch.c b/src/openvswitch.c -index 6eb0688..2ab77e7 100644 ---- a/src/openvswitch.c -+++ b/src/openvswitch.c -@@ -66,7 +66,7 @@ write_ovs_systemd_unit(const char* id, const GString* cmds, const char* rootdir, - g_string_append(s, "StartLimitBurst=0\n"); - g_string_append(s, cmds->str); - -- _netplan_g_string_free_to_file(s, rootdir, path, NULL); -+ _netplan_g_string_free_to_file_with_permissions(s, rootdir, path, NULL, "root", "root", 0640); - - _netplan_safe_mkdir_p_dir(link); - if (symlink(path, link) < 0 && errno != EEXIST) { -diff --git a/src/sriov.c b/src/sriov.c -index 1534c94..213f124 100644 ---- a/src/sriov.c -+++ b/src/sriov.c -@@ -54,7 +54,7 @@ write_sriov_rebind_systemd_unit(GHashTable* pfs, const char* rootdir, GError** e - g_string_truncate(interfaces, interfaces->len-1); /* cut trailing whitespace */ - g_string_append_printf(s, "ExecStart=" SBINDIR "/netplan rebind --debug %s\n", interfaces->str); - -- _netplan_g_string_free_to_file(s, rootdir, path, NULL); -+ _netplan_g_string_free_to_file_with_permissions(s, rootdir, path, NULL, "root", "root", 0640); - g_string_free(interfaces, TRUE); - - _netplan_safe_mkdir_p_dir(link); -@@ -90,7 +90,7 @@ write_sriov_apply_systemd_unit(GHashTable* pfs, const char* rootdir, GError** er - g_string_append(s, "\n[Service]\nType=oneshot\n"); - g_string_append_printf(s, "ExecStart=" SBINDIR "/netplan apply --sriov-only\n"); - -- _netplan_g_string_free_to_file(s, rootdir, path, NULL); -+ _netplan_g_string_free_to_file_with_permissions(s, rootdir, path, NULL, "root", "root", 0640); - - _netplan_safe_mkdir_p_dir(link); - if (symlink(path, link) < 0 && errno != EEXIST) { -diff --git a/src/util-internal.h b/src/util-internal.h -index 86bd1b7..7454e77 100644 ---- a/src/util-internal.h -+++ b/src/util-internal.h -@@ -40,6 +40,9 @@ _netplan_safe_mkdir_p_dir(const char* file_path); - NETPLAN_INTERNAL void - _netplan_g_string_free_to_file(GString* s, const char* rootdir, const char* path, const char* suffix); - -+void -+_netplan_g_string_free_to_file_with_permissions(GString* s, const char* rootdir, const char* path, const char* suffix, const char* owner, const char* group, mode_t mode); -+ - NETPLAN_INTERNAL void - _netplan_unlink_glob(const char* rootdir, const char* _glob); - -diff --git a/src/util.c b/src/util.c -index 36eb896..c2f9494 100644 ---- a/src/util.c -+++ b/src/util.c -@@ -23,6 +23,9 @@ - #include - #include - #include -+#include -+#include -+#include - - #include - #include -@@ -87,6 +90,49 @@ void _netplan_g_string_free_to_file(GString* s, const char* rootdir, const char* - } - } - -+void _netplan_g_string_free_to_file_with_permissions(GString* s, const char* rootdir, const char* path, const char* suffix, const char* owner, const char* group, mode_t mode) -+{ -+ g_autofree char* full_path = NULL; -+ g_autofree char* path_suffix = NULL; -+ g_autofree char* contents = g_string_free(s, FALSE); -+ GError* error = NULL; -+ struct passwd* pw = NULL; -+ struct group* gr = NULL; -+ int ret = 0; -+ -+ path_suffix = g_strjoin(NULL, path, suffix, NULL); -+ full_path = g_build_path(G_DIR_SEPARATOR_S, rootdir ?: G_DIR_SEPARATOR_S, path_suffix, NULL); -+ _netplan_safe_mkdir_p_dir(full_path); -+ if (!g_file_set_contents_full(full_path, contents, -1, G_FILE_SET_CONTENTS_CONSISTENT | G_FILE_SET_CONTENTS_ONLY_EXISTING, mode, &error)) { -+ /* the mkdir() just succeeded, there is no sensible -+ * method to test this without root privileges, bind mounts, and -+ * simulating ENOSPC */ -+ // LCOV_EXCL_START -+ g_fprintf(stderr, "ERROR: cannot create file %s: %s\n", path, error->message); -+ exit(1); -+ // LCOV_EXCL_STOP -+ } -+ -+ /* Here we take the owner and group names and look up for their IDs in the passwd and group files. -+ * It's OK to fail to set the owners and mode as this code will be called from unit tests. -+ * The autopkgtests will check if the owner/group and mode are correctly set. -+ */ -+ pw = getpwnam(owner); -+ if (!pw) { -+ g_debug("Failed to determine the UID of user %s: %s", owner, strerror(errno)); // LCOV_EXCL_LINE -+ } -+ gr = getgrnam(group); -+ if (!gr) { -+ g_debug("Failed to determine the GID of group %s: %s", group, strerror(errno)); // LCOV_EXCL_LINE -+ } -+ if (pw && gr) { -+ ret = chown(full_path, pw->pw_uid, gr->gr_gid); -+ if (ret != 0) { -+ g_debug("Failed to set owner and group for file %s: %s", full_path, strerror(errno)); -+ } -+ } -+} -+ - /** - * Remove all files matching given glob. - */ -diff --git a/tests/generator/test_auth.py b/tests/generator/test_auth.py -index de23adb..d3d886c 100644 ---- a/tests/generator/test_auth.py -+++ b/tests/generator/test_auth.py -@@ -226,7 +226,7 @@ network={ - - with open(os.path.join(self.workdir.name, 'run/systemd/system/netplan-wpa-eth0.service')) as f: - self.assertEqual(f.read(), SD_WPA % {'iface': 'eth0', 'drivers': 'wired'}) -- self.assertEqual(stat.S_IMODE(os.fstat(f.fileno()).st_mode), 0o644) -+ self.assertEqual(stat.S_IMODE(os.fstat(f.fileno()).st_mode), 0o640) - self.assertTrue(os.path.islink(os.path.join( - self.workdir.name, 'run/systemd/system/systemd-networkd.service.wants/netplan-wpa-eth0.service'))) - -diff --git a/tests/generator/test_wifis.py b/tests/generator/test_wifis.py -index b875172..610782a 100644 ---- a/tests/generator/test_wifis.py -+++ b/tests/generator/test_wifis.py -@@ -140,7 +140,7 @@ network={ - self.workdir.name, 'run/systemd/system/netplan-wpa-wl0.service'))) - with open(os.path.join(self.workdir.name, 'run/systemd/system/netplan-wpa-wl0.service')) as f: - self.assertEqual(f.read(), SD_WPA % {'iface': 'wl0', 'drivers': 'nl80211,wext'}) -- self.assertEqual(stat.S_IMODE(os.fstat(f.fileno()).st_mode), 0o644) -+ self.assertEqual(stat.S_IMODE(os.fstat(f.fileno()).st_mode), 0o640) - self.assertTrue(os.path.islink(os.path.join( - self.workdir.name, 'run/systemd/system/systemd-networkd.service.wants/netplan-wpa-wl0.service'))) - -diff --git a/tests/integration/base.py b/tests/integration/base.py -index e9c366c..74f0682 100644 ---- a/tests/integration/base.py -+++ b/tests/integration/base.py -@@ -32,6 +32,8 @@ import shutil - import gi - import glob - import json -+import pwd -+import grp - - # make sure we point to libnetplan properly. - os.environ.update({'LD_LIBRARY_PATH': '.:{}'.format(os.environ.get('LD_LIBRARY_PATH'))}) -@@ -367,6 +369,89 @@ class IntegrationTestsBase(unittest.TestCase): - if state: - self.wait_output(['ip', 'addr', 'show', iface], state, 30) - -+ # Assert file permissions -+ self.assert_file_permissions() -+ -+ def assert_file_permissions(self): -+ """ Check if the generated files have the expected permissions """ -+ -+ nd_expected_mode = 0o100640 -+ nd_expected_owner = 'root' -+ nd_expected_group = 'systemd-network' -+ -+ sd_expected_mode = 0o100640 -+ sd_expected_owner = 'root' -+ sd_expected_group = 'root' -+ -+ udev_expected_mode = 0o100640 -+ udev_expected_owner = 'root' -+ udev_expected_group = 'root' -+ -+ nm_expected_mode = 0o100600 -+ nm_expected_owner = 'root' -+ nm_expected_group = 'root' -+ -+ wpa_expected_mode = 0o100600 -+ wpa_expected_owner = 'root' -+ wpa_expected_group = 'root' -+ -+ # Check systemd-networkd files -+ base_path = '/run/systemd/network' -+ files = glob.glob(f'{base_path}/*.network') + glob.glob(f'{base_path}/*.netdev') -+ for file in files: -+ res = os.stat(file) -+ user = pwd.getpwuid(res.st_uid) -+ group = grp.getgrgid(res.st_gid) -+ self.assertEqual(res.st_mode, nd_expected_mode, f'file {file}') -+ self.assertEqual(user.pw_name, nd_expected_owner, f'file {file}') -+ self.assertEqual(group.gr_name, nd_expected_group, f'file {file}') -+ -+ # Check Network Manager files -+ base_path = '/run/NetworkManager/system-connections' -+ files = glob.glob(f'{base_path}/*.nmconnection') -+ for file in files: -+ res = os.stat(file) -+ user = pwd.getpwuid(res.st_uid) -+ group = grp.getgrgid(res.st_gid) -+ self.assertEqual(res.st_mode, nm_expected_mode, f'file {file}') -+ self.assertEqual(user.pw_name, nm_expected_owner, f'file {file}') -+ self.assertEqual(group.gr_name, nm_expected_group, f'file {file}') -+ -+ # Check wpa_supplicant configuration files -+ base_path = '/run/netplan' -+ files = glob.glob(f'{base_path}/wpa-*.conf') -+ for file in files: -+ res = os.stat(file) -+ user = pwd.getpwuid(res.st_uid) -+ group = grp.getgrgid(res.st_gid) -+ self.assertEqual(res.st_mode, wpa_expected_mode, f'file {file}') -+ self.assertEqual(user.pw_name, wpa_expected_owner, f'file {file}') -+ self.assertEqual(group.gr_name, wpa_expected_group, f'file {file}') -+ -+ # Check systemd service unit files -+ base_path = '/run/systemd/system/' -+ files = glob.glob(f'{base_path}/netplan-*.service') -+ files += glob.glob(f'{base_path}/systemd-networkd-wait-online.service.d/*.conf') -+ for file in files: -+ res = os.stat(file) -+ user = pwd.getpwuid(res.st_uid) -+ group = grp.getgrgid(res.st_gid) -+ self.assertEqual(res.st_mode, sd_expected_mode, f'file {file}') -+ self.assertEqual(user.pw_name, sd_expected_owner, f'file {file}') -+ self.assertEqual(group.gr_name, sd_expected_group, f'file {file}') -+ -+ # Check systemd-udevd files -+ udev_path = '/run/udev/rules.d' -+ link_path = '/run/systemd/network' -+ files = glob.glob(f'{udev_path}/*-netplan*.rules') + glob.glob(f'{link_path}/*.link') -+ for file in files: -+ res = os.stat(file) -+ user = pwd.getpwuid(res.st_uid) -+ group = grp.getgrgid(res.st_gid) -+ self.assertEqual(res.st_mode, udev_expected_mode, f'file {file}') -+ self.assertEqual(user.pw_name, udev_expected_owner, f'file {file}') -+ self.assertEqual(group.gr_name, udev_expected_group, f'file {file}') -+ - def state(self, iface, state): - '''Tell generate_and_settle() to wait for a specific state''' - return iface + '/' + state --- -2.44.1 - diff --git a/sources/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/netplan/netplan_1.0.bb b/sources/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/netplan/netplan_1.0.bb deleted file mode 100644 index 752acc23..00000000 --- a/sources/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/netplan/netplan_1.0.bb +++ /dev/null @@ -1,54 +0,0 @@ -SUMMARY = "The network configuration abstraction renderer" -DESCRIPTION = "Netplan is a utility for easily configuring networking on a \ -linux system. You simply create a YAML description of the required network \ -interfaces and what each should be configured to do. From this description \ -Netplan will generate all the necessary configuration for your chosen renderer \ -tool." -HOMEPAGE = "https://netplan.io" -SECTION = "net/misc" - -LICENSE = "GPL-3.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" - -inherit meson pkgconfig systemd python3targetconfig features_check - -REQUIRED_DISTRO_FEATURES = "systemd" - -SRC_URI = "git://github.com/CanonicalLtd/netplan.git;branch=main;protocol=https \ - file://0001-meson.build-drop-unnecessary-build-dependencies.patch \ - file://0002-meson.build-do-not-use-Werror.patch \ - file://CVE-2022-4968.patch \ - " - -SRC_URI:append:libc-musl = " file://0001-don-t-fail-if-GLOB_BRACE-is-not-defined.patch" -SRC_URI:append:toolchain-clang = " file://0001-networkd.c-define-scope-specific-to-case-statement.patch" - -SRCREV = "45f7cd1569896d9e316c130bf5c60b7ccfc8211d" - -S = "${WORKDIR}/git" - -DEPENDS = "glib-2.0 libyaml util-linux-libuuid \ - systemd python3-cffi-native \ - " - -EXTRA_OEMESON = "-Dunit_testing=false" - -RDEPENDS:${PN} = "python3-core python3-netifaces python3-pyyaml \ - python3-dbus python3-rich python3-cffi \ - python3-json python3-fcntl \ - util-linux-libuuid libnetplan \ - " - -do_install:append() { - install -d -m 755 ${D}${sysconfdir}/netplan -} - -PACKAGES += "${PN}-dbus libnetplan" - -FILES:libnetplan = "${libdir}/libnetplan.so.*" -FILES:${PN} = "${sbindir} ${libexecdir}/netplan/generate \ - ${datadir}/netplan ${datadir}/bash-completion \ - ${systemd_unitdir} ${PYTHON_SITEPACKAGES_DIR} \ - ${sysconfdir}/netplan \ - " -FILES:${PN}-dbus = "${libexecdir}/netplan/netplan-dbus ${datadir}/dbus-1" diff --git a/sources/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/netplan/netplan_1.1.bb b/sources/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/netplan/netplan_1.1.bb new file mode 100644 index 00000000..40d72caa --- /dev/null +++ b/sources/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/netplan/netplan_1.1.bb @@ -0,0 +1,51 @@ +SUMMARY = "The network configuration abstraction renderer" +DESCRIPTION = "Netplan is a utility for easily configuring networking on a \ +linux system. You simply create a YAML description of the required network \ +interfaces and what each should be configured to do. From this description \ +Netplan will generate all the necessary configuration for your chosen renderer \ +tool." +HOMEPAGE = "https://netplan.io" +SECTION = "net/misc" + +LICENSE = "GPL-3.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" + +inherit meson pkgconfig systemd python3targetconfig features_check + +REQUIRED_DISTRO_FEATURES = "systemd" + +SRC_URI = "git://github.com/CanonicalLtd/netplan.git;branch=main;protocol=https \ + file://0001-meson.build-do-not-use-Werror.patch \ + " + +SRC_URI:append:libc-musl = " file://0001-don-t-fail-if-GLOB_BRACE-is-not-defined.patch" + +SRCREV = "d27f32305f7f06de449b32239a89969e6ff2be31" + +S = "${WORKDIR}/git" + +DEPENDS = "glib-2.0 libyaml util-linux-libuuid \ + systemd python3-cffi-native \ + " + +EXTRA_OEMESON = "-Dtesting=false -Dunit_testing=false" + +RDEPENDS:${PN} = "python3-core python3-netifaces python3-pyyaml \ + python3-dbus python3-rich python3-cffi \ + python3-json python3-fcntl \ + util-linux-libuuid libnetplan \ + " + +do_install:append() { + install -d -m 755 ${D}${sysconfdir}/netplan +} + +PACKAGES += "${PN}-dbus libnetplan" + +FILES:libnetplan = "${libdir}/libnetplan.so.*" +FILES:${PN} = "${sbindir} ${libexecdir}/netplan/generate \ + ${datadir}/netplan ${datadir}/bash-completion \ + ${systemd_unitdir} ${PYTHON_SITEPACKAGES_DIR} \ + ${sysconfdir}/netplan \ + " +FILES:${PN}-dbus = "${libexecdir}/netplan/netplan-dbus ${datadir}/dbus-1" diff --git a/sources/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/thingsboard-gateway/thingsboard-gateway_3.4.6.bb b/sources/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/thingsboard-gateway/thingsboard-gateway_3.4.6.bb deleted file mode 100644 index 0d0f6fea..00000000 --- a/sources/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/thingsboard-gateway/thingsboard-gateway_3.4.6.bb +++ /dev/null @@ -1,67 +0,0 @@ -SUMMARY = "Open-source IoT platform for data collection, processing, visualization, and device management" -DESCRIPTION = "\ -The Thingsboard IoT Gateway is an open-source solution that allows you \ -to integrate devices connected to legacy and third-party systems with Thingsboard." -HOMEPAGE = "https://thingsboard.io/" - -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" - -SRC_URI[sha256sum] = "fc24bb674308f05d963a1dbed8d0b38ead77424ad7cf032a2652732af48f1336" - -inherit pypi setuptools3 - -PYPI_PACKAGE = "thingsboard-gateway" - -RDEPENDS:${PN} += " python3-jsonpath-rw \ - python3-regex \ - python3-paho-mqtt \ - python3-pyyaml \ - python3-simplejson \ - python3-requests \ - python3-pip \ - python3-pyrsistent \ -" - -SRC_URI += "file://bacnet.json \ - file://ble.json \ - file://can.json \ - file://custom_serial.json \ - file://modbus.json \ - file://modbus_serial.json \ - file://mqtt.json \ - file://opcua.json \ - file://odbc.json \ - file://request.json \ - file://rest.json \ - file://snmp.json \ - file://tb_gateway.yaml \ - file://logs.conf \ - file://thingsboard-gateway.service \ - " - - -inherit systemd - -SYSTEMD_PACKAGES = "${PN}" -SYSTEMD_SERVICE:${PN} = "thingsboard-gateway.service" - -FILES:${PN} += "/etc \ - /lib \ - /usr \ -" - -do_install:append(){ - - install -d ${D}${sysconfdir}/thingsboard-gateway/config - - for file in $(find ${WORKDIR} -maxdepth 1 -type f -name *.json); do - install -m 0644 "$file" ${D}${sysconfdir}/thingsboard-gateway/config - done - - install -m 0644 ${WORKDIR}/tb_gateway.yaml ${D}${sysconfdir}/thingsboard-gateway/config - install -m 0644 ${WORKDIR}/logs.conf ${D}${sysconfdir}/thingsboard-gateway/config - - install -d ${D}${systemd_unitdir}/system/ - install -m 0644 ${WORKDIR}/thingsboard-gateway.service ${D}${systemd_system_unitdir}/thingsboard-gateway.service -} diff --git a/sources/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/thingsboard-gateway/thingsboard-gateway_3.5.1.bb b/sources/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/thingsboard-gateway/thingsboard-gateway_3.5.1.bb new file mode 100644 index 00000000..7f285918 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/thingsboard-gateway/thingsboard-gateway_3.5.1.bb @@ -0,0 +1,67 @@ +SUMMARY = "Open-source IoT platform for data collection, processing, visualization, and device management" +DESCRIPTION = "\ +The Thingsboard IoT Gateway is an open-source solution that allows you \ +to integrate devices connected to legacy and third-party systems with Thingsboard." +HOMEPAGE = "https://thingsboard.io/" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" + +SRC_URI[sha256sum] = "3d4ae3026b76be94aef67eba7d7e3a64e436ba9556d74ad142ba8988e4e4b253" + +inherit pypi setuptools3 + +PYPI_PACKAGE = "thingsboard-gateway" + +RDEPENDS:${PN} += " python3-jsonpath-rw \ + python3-regex \ + python3-paho-mqtt \ + python3-pyyaml \ + python3-simplejson \ + python3-requests \ + python3-pip \ + python3-pyrsistent \ +" + +SRC_URI += "file://bacnet.json \ + file://ble.json \ + file://can.json \ + file://custom_serial.json \ + file://modbus.json \ + file://modbus_serial.json \ + file://mqtt.json \ + file://opcua.json \ + file://odbc.json \ + file://request.json \ + file://rest.json \ + file://snmp.json \ + file://tb_gateway.yaml \ + file://logs.conf \ + file://thingsboard-gateway.service \ + " + + +inherit systemd + +SYSTEMD_PACKAGES = "${PN}" +SYSTEMD_SERVICE:${PN} = "thingsboard-gateway.service" + +FILES:${PN} += "/etc \ + /lib \ + /usr \ +" + +do_install:append(){ + + install -d ${D}${sysconfdir}/thingsboard-gateway/config + + for file in $(find ${UNPACKDIR} -maxdepth 1 -type f -name *.json); do + install -m 0644 "$file" ${D}${sysconfdir}/thingsboard-gateway/config + done + + install -m 0644 ${UNPACKDIR}/tb_gateway.yaml ${D}${sysconfdir}/thingsboard-gateway/config + install -m 0644 ${UNPACKDIR}/logs.conf ${D}${sysconfdir}/thingsboard-gateway/config + + install -d ${D}${systemd_unitdir}/system/ + install -m 0644 ${UNPACKDIR}/thingsboard-gateway.service ${D}${systemd_system_unitdir}/thingsboard-gateway.service +} diff --git a/sources/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-free_mon-Include-missing-cstdint.patch b/sources/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-free_mon-Include-missing-cstdint.patch new file mode 100644 index 00000000..8cee1488 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-free_mon-Include-missing-cstdint.patch @@ -0,0 +1,28 @@ +From 5d8218b8a1b5bc71e2a0cf543a000e194daba599 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sun, 29 Jan 2023 17:15:30 -0800 +Subject: [PATCH] free_mon: Include missing + +gcc 13 moved some includes around and as a result is no +longer transitively included [1]. Explicitly include it +for uintXX_t. + +[1] https://gcc.gnu.org/gcc-13/porting_to.html#header-dep-changes + +Signed-off-by: Khem Raj + +Upstream-Status: Pending +--- + src/mongo/db/free_mon/free_mon_options.h | 1 + + 1 file changed, 1 insertion(+) + +--- a/src/mongo/db/free_mon/free_mon_options.h ++++ b/src/mongo/db/free_mon/free_mon_options.h +@@ -29,6 +29,7 @@ + + #pragma once + ++#include + #include + #include + diff --git a/sources/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-moduleconfig.py-python-3.12-compatibility.patch b/sources/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-moduleconfig.py-python-3.12-compatibility.patch deleted file mode 100644 index 51926b9d..00000000 --- a/sources/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-moduleconfig.py-python-3.12-compatibility.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 37580777bc5294d606584f3731d9f5f5425bb587 Mon Sep 17 00:00:00 2001 -From: Awais B -Date: Tue, 4 Mar 2025 11:27:10 +0000 -Subject: [PATCH] moduleconfig.py: python 3.12 compatibility - -The imp module was deprecated in python 3.4 and is dropped -with python 3.12. We now need to use importlib for the -purpose of manipulating/loading modules. - -Upstream-Status: Pending -Signed-off-by: Awais B ---- - buildscripts/moduleconfig.py | 21 ++++++++++++++------- - 1 file changed, 14 insertions(+), 7 deletions(-) - -diff --git a/buildscripts/moduleconfig.py b/buildscripts/moduleconfig.py -index b4d0bba0490..69dd91ab30d 100644 ---- a/buildscripts/moduleconfig.py -+++ b/buildscripts/moduleconfig.py -@@ -27,7 +27,8 @@ MongoDB SConscript files do. - __all__ = ('discover_modules', 'discover_module_directories', 'configure_modules', - 'register_module_test') # pylint: disable=undefined-all-variable - --import imp -+import importlib -+import sys - import inspect - import os - -@@ -71,12 +72,18 @@ def discover_modules(module_root, allowed_modules): - print("adding module: %s" % (name)) - fp = open(build_py, "r") - try: -- module = imp.load_module("module_" + name, fp, build_py, -- (".py", "r", imp.PY_SOURCE)) -- if getattr(module, "name", None) is None: -- module.name = name -- found_modules.append(module) -- found_module_names.append(name) -+ module_name = "module_" + name -+ module_spec = importlib.util.spec_from_file_location(module_name, build_py) -+ -+ if module_spec is not None: -+ module = importlib.util.module_from_spec(module_spec) -+ sys.modules[module_name] = module -+ module_spec.loader.exec_module(module) -+ -+ if not hasattr(module, "name"): -+ module.name = name -+ found_modules.append(module) -+ found_module_names.append(name) - finally: - fp.close() - except (FileNotFoundError, IOError): --- -2.34.1 - diff --git a/sources/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb b/sources/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb index 5d904dd4..ee5c77a8 100644 --- a/sources/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb +++ b/sources/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb @@ -11,9 +11,9 @@ DEPENDS = "openssl libpcap zlib boost curl python3 \ inherit scons dos2unix siteinfo python3native systemd useradd -PV = "4.4.29" -#v4.4.29 -SRCREV = "89d6ffe6fc67b36fd47aff6425087003966588e3" +PV = "4.4.24" +#v4.4.24 +SRCREV = "0b86b9b7b42ad9970c5f818c527dd86c0634243a" SRC_URI = "git://github.com/mongodb/mongo.git;branch=v4.4;protocol=https \ file://0001-Tell-scons-to-use-build-settings-from-environment-va.patch \ file://0001-Use-long-long-instead-of-int64_t.patch \ @@ -32,10 +32,10 @@ SRC_URI = "git://github.com/mongodb/mongo.git;branch=v4.4;protocol=https \ file://0001-add-explict-static_cast-size_t-to-maxMemoryUsageByte.patch \ file://0001-server-Adjust-the-cache-alignment-assumptions.patch \ file://0001-The-std-lib-unary-binary_function-base-classes-are-d.patch \ + file://0001-free_mon-Include-missing-cstdint.patch \ file://0001-apply-msvc-workaround-for-clang-16.patch \ file://0001-Fix-type-mismatch-on-32bit-arches.patch \ file://0001-Fix-build-on-32bit.patch \ - file://0001-moduleconfig.py-python-3.12-compatibility.patch \ " SRC_URI:append:libc-musl ="\ file://0001-Mark-one-of-strerror_r-implementation-glibc-specific.patch \ @@ -145,3 +145,5 @@ SYSTEMD_SERVICE:${PN} = "mongod.service" FILES:${PN} += "${nonarch_libdir}/tmpfiles.d" RDEPENDS:${PN} += "tzdata-core" + +SKIP_RECIPE[mongodb] ?= "Needs porting to python 3.12" diff --git a/sources/meta-openembedded/meta-oe/dynamic-layers/perl-layer/recipes-support/rasdaemon/rasdaemon_0.8.0.bb b/sources/meta-openembedded/meta-oe/dynamic-layers/perl-layer/recipes-support/rasdaemon/rasdaemon_0.8.0.bb index c083a3a3..a7a3bf12 100644 --- a/sources/meta-openembedded/meta-oe/dynamic-layers/perl-layer/recipes-support/rasdaemon/rasdaemon_0.8.0.bb +++ b/sources/meta-openembedded/meta-oe/dynamic-layers/perl-layer/recipes-support/rasdaemon/rasdaemon_0.8.0.bb @@ -34,9 +34,9 @@ LDFLAGS:append:libc-musl = " -largp" do_install:append() { install -d ${D}${sysconfdir}/init.d - install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/rasdaemon + install -m 755 ${UNPACKDIR}/init ${D}${sysconfdir}/init.d/rasdaemon install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/rasdaemon.service ${D}${systemd_unitdir}/system + install -m 0644 ${UNPACKDIR}/rasdaemon.service ${D}${systemd_unitdir}/system } FILES:${PN} += "${sbindir}/rasdaemon \ diff --git a/sources/meta-openembedded/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools-conf-configfs_1.0.bb b/sources/meta-openembedded/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools-conf-configfs_1.0.bb index 1c26c720..86b0ce07 100644 --- a/sources/meta-openembedded/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools-conf-configfs_1.0.bb +++ b/sources/meta-openembedded/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools-conf-configfs_1.0.bb @@ -3,6 +3,9 @@ SECTION = "console/utils" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" + SRC_URI = " \ file://android-gadget-setup \ file://android-gadget-start \ @@ -14,17 +17,17 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" do_install() { install -d ${D}${bindir} - install -m 0755 ${WORKDIR}/android-gadget-setup ${D}${bindir} - install -m 0755 ${WORKDIR}/android-gadget-start ${D}${bindir} - install -m 0755 ${WORKDIR}/android-gadget-cleanup ${D}${bindir} + install -m 0755 ${UNPACKDIR}/android-gadget-setup ${D}${bindir} + install -m 0755 ${UNPACKDIR}/android-gadget-start ${D}${bindir} + install -m 0755 ${UNPACKDIR}/android-gadget-cleanup ${D}${bindir} - if [ -r ${WORKDIR}/android-gadget-setup.machine ] ; then + if [ -r ${UNPACKDIR}/android-gadget-setup.machine ] ; then install -d ${D}${sysconfdir} - install -m 0644 ${WORKDIR}/android-gadget-setup.machine ${D}${sysconfdir} + install -m 0644 ${UNPACKDIR}/android-gadget-setup.machine ${D}${sysconfdir} fi install -d ${D}${systemd_unitdir}/system/android-tools-adbd.service.d - install -m 0644 ${WORKDIR}/10-adbd-configfs.conf ${D}${systemd_unitdir}/system/android-tools-adbd.service.d + install -m 0644 ${UNPACKDIR}/10-adbd-configfs.conf ${D}${systemd_unitdir}/system/android-tools-adbd.service.d } FILES:${PN} += " \ diff --git a/sources/meta-openembedded/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools-conf_1.0.bb b/sources/meta-openembedded/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools-conf_1.0.bb index b63ccbb0..b98c70db 100644 --- a/sources/meta-openembedded/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools-conf_1.0.bb +++ b/sources/meta-openembedded/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools-conf_1.0.bb @@ -5,9 +5,12 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda SRC_URI = "file://android-gadget-setup" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" + do_install() { install -d ${D}${bindir} - install -m 0755 ${WORKDIR}/android-gadget-setup ${D}${bindir} + install -m 0755 ${UNPACKDIR}/android-gadget-setup ${D}${bindir} } python () { diff --git a/sources/meta-openembedded/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools/0001-liblp-fix-building-with-GCC-14.patch b/sources/meta-openembedded/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools/0001-liblp-fix-building-with-GCC-14.patch new file mode 100644 index 00000000..ccd289c8 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools/0001-liblp-fix-building-with-GCC-14.patch @@ -0,0 +1,26 @@ +From 9f4d839847666019cadf57aa34fd366801c11a44 Mon Sep 17 00:00:00 2001 +From: Dmitry Baryshkov +Date: Fri, 24 May 2024 14:13:35 +0300 +Subject: [PATCH] liblp: fix building with GCC 14 + +Upstream-Status: Pending +Signed-off-by: Dmitry Baryshkov +--- + system/core/fs_mgr/liblp/utility.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/system/core/fs_mgr/liblp/utility.cpp b/system/core/fs_mgr/liblp/utility.cpp +index 48c5c8318d99..0aa8023aa87d 100644 +--- a/system/core/fs_mgr/liblp/utility.cpp ++++ b/system/core/fs_mgr/liblp/utility.cpp +@@ -24,6 +24,7 @@ + #include + #endif + ++#include + #include + #include + #include +-- +2.39.2 + diff --git a/sources/meta-openembedded/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools_29.0.6.r14.bb b/sources/meta-openembedded/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools_29.0.6.r14.bb index e9b0c97e..d2680b45 100644 --- a/sources/meta-openembedded/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools_29.0.6.r14.bb +++ b/sources/meta-openembedded/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools_29.0.6.r14.bb @@ -52,6 +52,7 @@ SRC_URI += " \ file://0003-Update-usage-of-usbdevfs_urb-to-match-new-kernel-UAP.patch \ file://0004-adb-Fix-build-on-big-endian-systems.patch \ file://0005-adb-Allow-adbd-to-be-run-as-root.patch \ + file://0001-liblp-fix-building-with-GCC-14.patch \ " S = "${WORKDIR}/git" @@ -67,6 +68,7 @@ COMPATIBLE_HOST:powerpc64le = "(null)" inherit systemd +SYSTEMD_PACKAGES = "${PN}-adbd" SYSTEMD_SERVICE:${PN}-adbd = "android-tools-adbd.service" # Find libbsd headers during native builds @@ -138,7 +140,7 @@ do_compile() { do_install() { install -d ${D}${base_sbindir} - install -m 0755 ${S}/../remount -D ${D}${base_sbindir}/remount + install -m 0755 ${UNPACKDIR}/remount -D ${D}${base_sbindir}/remount for tool in img2simg simg2img fastboot adbd; do if echo ${TOOLS_TO_BUILD} | grep -q "$tool" ; then @@ -153,7 +155,7 @@ do_install() { fi # Outside the if statement to avoid errors during do_package - install -D -p -m0644 ${WORKDIR}/android-tools-adbd.service \ + install -D -p -m0644 ${UNPACKDIR}/android-tools-adbd.service \ ${D}${systemd_unitdir}/system/android-tools-adbd.service install -d ${D}${libdir}/android/ diff --git a/sources/meta-openembedded/meta-oe/recipes-benchmark/dhrystone/dhrystone-2.1/dhrystone-c89.patch b/sources/meta-openembedded/meta-oe/recipes-benchmark/dhrystone/dhrystone-2.1/dhrystone-c89.patch new file mode 100644 index 00000000..faf710fe --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-benchmark/dhrystone/dhrystone-2.1/dhrystone-c89.patch @@ -0,0 +1,242 @@ +dhrystone: make it speak C89 + +Update Dhrystone sources to stop using K&R C and use something close to C89. +This fixes compilation errors reported by the GCC 14. + +Upstream-Status: Pending +Signed-off-by: Dmitry Baryshkov + +Index: dhrystone-2.1/dhry.h +=================================================================== +--- dhrystone-2.1.orig/dhry.h ++++ dhrystone-2.1/dhry.h +@@ -423,3 +423,13 @@ typedef struct record + #ifndef HZ + extern long HZ; + #endif ++ ++void Proc_2 (One_Fifty *Int_Par_Ref); ++void Proc_3 (Rec_Pointer *Ptr_Ref_Par); ++void Proc_4(); ++void Proc_5(); ++void Proc_6 (Enumeration Enum_Val_Par, Enumeration *Enum_Ref_Par); ++void Proc_7 (One_Fifty Int_1_Par_Val, One_Fifty Int_2_Par_Val, One_Fifty *Int_Par_Ref); ++void Proc_8 (Arr_1_Dim Arr_1_Par_Ref, Arr_2_Dim Arr_2_Par_Ref, int Int_1_Par_Val, int Int_2_Par_Val); ++ ++Boolean Func_2 (Str_30 Str_1_Par_Ref, Str_30 Str_2_Par_Ref); +Index: dhrystone-2.1/dhry_1.c +=================================================================== +--- dhrystone-2.1.orig/dhry_1.c ++++ dhrystone-2.1/dhry_1.c +@@ -14,6 +14,8 @@ + * + **************************************************************************** + */ ++#include ++#include + + #include "dhry.h" + +@@ -28,7 +30,6 @@ char Ch_1_Glob, + int Arr_1_Glob [50]; + int Arr_2_Glob [50] [50]; + +-extern char *malloc (); + Enumeration Func_1 (); + /* forward declaration necessary since Enumeration may not simply be int */ + +@@ -41,6 +42,8 @@ Enumeration Func_1 (); + Boolean Reg = true; + #endif + ++void Proc_1 (REG Rec_Pointer Ptr_Val_Par); ++ + /* variables for time measurement: */ + + #ifdef TIMES +@@ -70,7 +73,7 @@ float Microseconds, + /* end of variables for time measurement */ + + +-main () ++int main (void) + /*****/ + + /* main program, corresponds to procedures */ +@@ -218,7 +221,7 @@ main () + printf ("Arr_2_Glob[8][7]: %d\n", Arr_2_Glob[8][7]); + printf (" should be: Number_Of_Runs + 10\n"); + printf ("Ptr_Glob->\n"); +- printf (" Ptr_Comp: %d\n", (int) Ptr_Glob->Ptr_Comp); ++ printf (" Ptr_Comp: %lu\n", (unsigned long) Ptr_Glob->Ptr_Comp); + printf (" should be: (implementation-dependent)\n"); + printf (" Discr: %d\n", Ptr_Glob->Discr); + printf (" should be: %d\n", 0); +@@ -229,7 +232,7 @@ main () + printf (" Str_Comp: %s\n", Ptr_Glob->variant.var_1.Str_Comp); + printf (" should be: DHRYSTONE PROGRAM, SOME STRING\n"); + printf ("Next_Ptr_Glob->\n"); +- printf (" Ptr_Comp: %d\n", (int) Next_Ptr_Glob->Ptr_Comp); ++ printf (" Ptr_Comp: %lu\n", (unsigned long) Next_Ptr_Glob->Ptr_Comp); + printf (" should be: (implementation-dependent), same as above\n"); + printf (" Discr: %d\n", Next_Ptr_Glob->Discr); + printf (" should be: %d\n", 0); +@@ -280,14 +283,13 @@ main () + printf ("%6.1f \n", Dhrystones_Per_Second); + printf ("\n"); + } +- ++ return 0; + } + + +-Proc_1 (Ptr_Val_Par) ++void Proc_1 (REG Rec_Pointer Ptr_Val_Par) + /******************/ + +-REG Rec_Pointer Ptr_Val_Par; + /* executed once */ + { + REG Rec_Pointer Next_Record = Ptr_Val_Par->Ptr_Comp; +@@ -318,12 +320,10 @@ REG Rec_Pointer Ptr_Val_Par; + } /* Proc_1 */ + + +-Proc_2 (Int_Par_Ref) ++void Proc_2 (One_Fifty *Int_Par_Ref) + /******************/ + /* executed once */ + /* *Int_Par_Ref == 1, becomes 4 */ +- +-One_Fifty *Int_Par_Ref; + { + One_Fifty Int_Loc; + Enumeration Enum_Loc; +@@ -341,13 +341,10 @@ One_Fifty *Int_Par_Ref; + } /* Proc_2 */ + + +-Proc_3 (Ptr_Ref_Par) ++void Proc_3 (Rec_Pointer *Ptr_Ref_Par) + /******************/ + /* executed once */ + /* Ptr_Ref_Par becomes Ptr_Glob */ +- +-Rec_Pointer *Ptr_Ref_Par; +- + { + if (Ptr_Glob != Null) + /* then, executed */ +@@ -356,7 +353,7 @@ Rec_Pointer *Ptr_Ref_Par; + } /* Proc_3 */ + + +-Proc_4 () /* without parameters */ ++void Proc_4 () /* without parameters */ + /*******/ + /* executed once */ + { +@@ -368,7 +365,7 @@ Proc_4 () /* without parameters */ + } /* Proc_4 */ + + +-Proc_5 () /* without parameters */ ++void Proc_5 () /* without parameters */ + /*******/ + /* executed once */ + { +Index: dhrystone-2.1/dhry_2.c +=================================================================== +--- dhrystone-2.1.orig/dhry_2.c ++++ dhrystone-2.1/dhry_2.c +@@ -14,6 +14,7 @@ + * + **************************************************************************** + */ ++#include + + #include "dhry.h" + +@@ -26,14 +27,14 @@ + extern int Int_Glob; + extern char Ch_1_Glob; + ++Boolean Func_3 (Enumeration Enum_Par_Val); + +-Proc_6 (Enum_Val_Par, Enum_Ref_Par) ++ ++void Proc_6 (Enumeration Enum_Val_Par, Enumeration *Enum_Ref_Par) + /*********************************/ + /* executed once */ + /* Enum_Val_Par == Ident_3, Enum_Ref_Par becomes Ident_2 */ + +-Enumeration Enum_Val_Par; +-Enumeration *Enum_Ref_Par; + { + *Enum_Ref_Par = Enum_Val_Par; + if (! Func_3 (Enum_Val_Par)) +@@ -61,7 +62,7 @@ Enumeration *Enum_Ref_Par; + } /* Proc_6 */ + + +-Proc_7 (Int_1_Par_Val, Int_2_Par_Val, Int_Par_Ref) ++void Proc_7 (One_Fifty Int_1_Par_Val, One_Fifty Int_2_Par_Val, One_Fifty *Int_Par_Ref) + /**********************************************/ + /* executed three times */ + /* first call: Int_1_Par_Val == 2, Int_2_Par_Val == 3, */ +@@ -70,9 +71,6 @@ Proc_7 (Int_1_Par_Val, Int_2_Par_Val, In + /* Int_Par_Ref becomes 17 */ + /* third call: Int_1_Par_Val == 6, Int_2_Par_Val == 10, */ + /* Int_Par_Ref becomes 18 */ +-One_Fifty Int_1_Par_Val; +-One_Fifty Int_2_Par_Val; +-One_Fifty *Int_Par_Ref; + { + One_Fifty Int_Loc; + +@@ -81,15 +79,11 @@ One_Fifty *Int_Par_Ref; + } /* Proc_7 */ + + +-Proc_8 (Arr_1_Par_Ref, Arr_2_Par_Ref, Int_1_Par_Val, Int_2_Par_Val) ++void Proc_8 (Arr_1_Dim Arr_1_Par_Ref, Arr_2_Dim Arr_2_Par_Ref, int Int_1_Par_Val, int Int_2_Par_Val) + /*********************************************************************/ + /* executed once */ + /* Int_Par_Val_1 == 3 */ + /* Int_Par_Val_2 == 7 */ +-Arr_1_Dim Arr_1_Par_Ref; +-Arr_2_Dim Arr_2_Par_Ref; +-int Int_1_Par_Val; +-int Int_2_Par_Val; + { + REG One_Fifty Int_Index; + REG One_Fifty Int_Loc; +@@ -132,14 +126,11 @@ Capital_Letter Ch_2_Par_Val; + } /* Func_1 */ + + +-Boolean Func_2 (Str_1_Par_Ref, Str_2_Par_Ref) ++Boolean Func_2 (Str_30 Str_1_Par_Ref, Str_30 Str_2_Par_Ref) + /*************************************************/ + /* executed once */ + /* Str_1_Par_Ref == "DHRYSTONE PROGRAM, 1'ST STRING" */ + /* Str_2_Par_Ref == "DHRYSTONE PROGRAM, 2'ND STRING" */ +- +-Str_30 Str_1_Par_Ref; +-Str_30 Str_2_Par_Ref; + { + REG One_Thirty Int_Loc; + Capital_Letter Ch_Loc; +@@ -174,11 +165,10 @@ Str_30 Str_2_Par_Ref; + } /* Func_2 */ + + +-Boolean Func_3 (Enum_Par_Val) ++Boolean Func_3 (Enumeration Enum_Par_Val) + /***************************/ + /* executed once */ + /* Enum_Par_Val == Ident_3 */ +-Enumeration Enum_Par_Val; + { + Enumeration Enum_Loc; + diff --git a/sources/meta-openembedded/meta-oe/recipes-benchmark/dhrystone/dhrystone_2.1.bb b/sources/meta-openembedded/meta-oe/recipes-benchmark/dhrystone/dhrystone_2.1.bb index d809a564..db4377f5 100644 --- a/sources/meta-openembedded/meta-oe/recipes-benchmark/dhrystone/dhrystone_2.1.bb +++ b/sources/meta-openembedded/meta-oe/recipes-benchmark/dhrystone/dhrystone_2.1.bb @@ -3,7 +3,9 @@ LICENSE = "PD" LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/PD;md5=b3597d12946881e13cb3b548d1173851" SRC_URI = "http://www.netlib.org/benchmark/dhry-c;downloadfilename=dhry-c.shar \ - file://dhrystone.patch" + file://dhrystone.patch \ + file://dhrystone-c89.patch \ +" SRC_URI[md5sum] = "75aa5909c174eed98c134be2f56307da" SRC_URI[sha256sum] = "038a7e9169787125c3451a6c941f3aca5db2d2f3863871afcdce154ef17f4e3e" @@ -25,3 +27,27 @@ CFLAGS += "-fno-lto" CFLAGS:append:toolchain-clang = " -Wno-error=implicit-function-declaration -Wno-error=deprecated-non-prototype -Wno-error=implicit-int" LDFLAGS += "-fno-lto" + +# http://errors.yoctoproject.org/Errors/Details/766887/ +# dhry_1.c:101:3: error: implicit declaration of function 'strcpy' [-Wimplicit-function-declaration] +# dhry_1.c:149:5: error: implicit declaration of function 'Proc_5' [-Wimplicit-function-declaration] +# dhry_1.c:150:5: error: implicit declaration of function 'Proc_4' [-Wimplicit-function-declaration] +# dhry_1.c:156:19: error: implicit declaration of function 'Func_2'; did you mean 'Func_1'? [-Wimplicit-function-declaration] +# dhry_1.c:162:7: error: implicit declaration of function 'Proc_7' [-Wimplicit-function-declaration] +# dhry_1.c:167:5: error: implicit declaration of function 'Proc_8' [-Wimplicit-function-declaration] +# dhry_1.c:169:5: error: implicit declaration of function 'Proc_1' [-Wimplicit-function-declaration] +# dhry_1.c:176:9: error: implicit declaration of function 'Proc_6' [-Wimplicit-function-declaration] +# dhry_1.c:187:5: error: implicit declaration of function 'Proc_2' [-Wimplicit-function-declaration] +# dhry_1.c:287:1: error: return type defaults to 'int' [-Wimplicit-int] +# dhry_1.c:303:3: error: implicit declaration of function 'Proc_3'; did you mean 'Proc_1'? [-Wimplicit-function-declaration] +# dhry_1.c:321:1: error: return type defaults to 'int' [-Wimplicit-int] +# dhry_1.c:344:1: error: return type defaults to 'int' [-Wimplicit-int] +# dhry_1.c:359:1: error: return type defaults to 'int' [-Wimplicit-int] +# dhry_1.c:371:1: error: return type defaults to 'int' [-Wimplicit-int] +# dhry_1.c:73:1: error: return type defaults to 'int' [-Wimplicit-int] +# dhry_2.c:164:9: error: implicit declaration of function 'strcmp' [-Wimplicit-function-declaration] +# dhry_2.c:30:1: error: return type defaults to 'int' [-Wimplicit-int] +# dhry_2.c:39:9: error: implicit declaration of function 'Func_3' [-Wimplicit-function-declaration] +# dhry_2.c:64:1: error: return type defaults to 'int' [-Wimplicit-int] +# dhry_2.c:84:1: error: return type defaults to 'int' [-Wimplicit-int] +CFLAGS += "-Wno-error=implicit-int -Wno-error=implicit-function-declaration" diff --git a/sources/meta-openembedded/meta-oe/recipes-benchmark/iozone3/iozone3_506.bb b/sources/meta-openembedded/meta-oe/recipes-benchmark/iozone3/iozone3_506.bb index 5a1306b6..6ab1121e 100644 --- a/sources/meta-openembedded/meta-oe/recipes-benchmark/iozone3/iozone3_506.bb +++ b/sources/meta-openembedded/meta-oe/recipes-benchmark/iozone3/iozone3_506.bb @@ -37,8 +37,8 @@ do_install() { install -m 0755 ${S}/iozone ${D}${bindir} install -m 0755 ${S}/fileop ${D}${bindir} - install -m 0644 ${WORKDIR}/${BPN}_${PV}/docs/iozone.1 ${D}${mandir}/man1/ - install -m 0644 ${WORKDIR}/copyright.txt ${D}${datadir}/doc/${BPN}/ + install -m 0644 ${S}/../../docs/iozone.1 ${D}${mandir}/man1/ + install -m 0644 ${UNPACKDIR}/copyright.txt ${D}${datadir}/doc/${BPN}/ install -m 0644 ${S}/*.dem ${D}${datadir}/doc/${BPN}/examples install -m 0644 ${S}/client_list ${D}${datadir}/doc/${BPN}/examples @@ -48,9 +48,9 @@ do_install() { install -m 0755 ${S}/gengnuplot.sh ${D}${datadir}/doc/${BPN}/examples install -m 0755 ${S}/report.pl ${D}${datadir}/doc/${BPN}/examples - install -m 0644 ${WORKDIR}/${BPN}_${PV}/docs/Iozone_ps.gz ${D}${datadir}/doc/${BPN}/ - install -m 0644 ${WORKDIR}/${BPN}_${PV}/docs/IOzone_msword_98.pdf ${D}${datadir}/doc/${BPN}/ - install -m 0644 ${WORKDIR}/${BPN}_${PV}/docs/Run_rules.doc ${D}${datadir}/doc/${BPN}/ + install -m 0644 ${S}/../../docs/Iozone_ps.gz ${D}${datadir}/doc/${BPN}/ + install -m 0644 ${S}/../../docs/IOzone_msword_98.pdf ${D}${datadir}/doc/${BPN}/ + install -m 0644 ${S}/../../docs/Run_rules.doc ${D}${datadir}/doc/${BPN}/ } FILES:${PN} += "${datadir}/doc/${PN}/copyright.txt" diff --git a/sources/meta-openembedded/meta-oe/recipes-benchmark/iperf3/iperf3_3.17.1.bb b/sources/meta-openembedded/meta-oe/recipes-benchmark/iperf3/iperf3_3.17.1.bb new file mode 100644 index 00000000..44fae025 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-benchmark/iperf3/iperf3_3.17.1.bb @@ -0,0 +1,31 @@ +SUMMARY = "Network benchmark tool" +DESCRIPTION = "\ +iperf is a tool for active measurements of the maximum achievable bandwidth \ +on IP networks. It supports tuning of various parameters related to timing, \ +protocols, and buffers. For each test it reports the bandwidth, loss, and \ +other parameters." + +HOMEPAGE = "http://software.es.net/iperf/" +SECTION = "console/network" +BUGTRACKER = "https://github.com/esnet/iperf/issues" + +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=f9873a72f714e240530e759e103ac7b2" + +SRC_URI = "git://github.com/esnet/iperf.git;branch=master;protocol=https \ + file://0002-Remove-pg-from-profile_CFLAGS.patch \ + file://0001-configure.ac-check-for-CPP-prog.patch \ + " + +SRCREV = "2acfcfe94e928e74542c9f107e02aa6dd4748a79" + +S = "${WORKDIR}/git" + +inherit autotools + +PACKAGECONFIG ?= "openssl" + +PACKAGECONFIG[lksctp] = "ac_cv_header_netinet_sctp_h=yes,ac_cv_header_netinet_sctp_h=no,lksctp-tools" +PACKAGECONFIG[openssl] = "--with-openssl=${RECIPE_SYSROOT}${prefix},--without-openssl,openssl" + +CFLAGS += "-D_GNU_SOURCE" diff --git a/sources/meta-openembedded/meta-oe/recipes-benchmark/iperf3/iperf3_3.18.bb b/sources/meta-openembedded/meta-oe/recipes-benchmark/iperf3/iperf3_3.18.bb deleted file mode 100644 index d3bfc93f..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-benchmark/iperf3/iperf3_3.18.bb +++ /dev/null @@ -1,31 +0,0 @@ -SUMMARY = "Network benchmark tool" -DESCRIPTION = "\ -iperf is a tool for active measurements of the maximum achievable bandwidth \ -on IP networks. It supports tuning of various parameters related to timing, \ -protocols, and buffers. For each test it reports the bandwidth, loss, and \ -other parameters." - -HOMEPAGE = "http://software.es.net/iperf/" -SECTION = "console/network" -BUGTRACKER = "https://github.com/esnet/iperf/issues" - -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=f9873a72f714e240530e759e103ac7b2" - -SRC_URI = "git://github.com/esnet/iperf.git;branch=master;protocol=https \ - file://0002-Remove-pg-from-profile_CFLAGS.patch \ - file://0001-configure.ac-check-for-CPP-prog.patch \ - " - -SRCREV = "2a2984488d6de8f7a2d1f5938e03ca7be57e227c" - -S = "${WORKDIR}/git" - -inherit autotools - -PACKAGECONFIG ?= "openssl" - -PACKAGECONFIG[lksctp] = "ac_cv_header_netinet_sctp_h=yes,ac_cv_header_netinet_sctp_h=no,lksctp-tools" -PACKAGECONFIG[openssl] = "--with-openssl=${RECIPE_SYSROOT}${prefix},--without-openssl,openssl" - -CFLAGS += "-D_GNU_SOURCE" diff --git a/sources/meta-openembedded/meta-oe/recipes-benchmark/libc-bench/libc-bench_git.bb b/sources/meta-openembedded/meta-oe/recipes-benchmark/libc-bench/libc-bench_git.bb index 4ace4515..df76067a 100644 --- a/sources/meta-openembedded/meta-oe/recipes-benchmark/libc-bench/libc-bench_git.bb +++ b/sources/meta-openembedded/meta-oe/recipes-benchmark/libc-bench/libc-bench_git.bb @@ -13,6 +13,9 @@ SRC_URI = "git://git.musl-libc.org/libc-bench;branch=master \ file://0001-build-Do-not-override-ldflags-from-environment.patch \ " +# Upstream repo does not tag +UPSTREAM_CHECK_COMMITS = "1" + S = "${WORKDIR}/git" do_install () { diff --git a/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-Revert-ld.hugetlbfs-fix-Ttext-segment-argument-on-AA.patch b/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-Revert-ld.hugetlbfs-fix-Ttext-segment-argument-on-AA.patch deleted file mode 100644 index 0787ef27..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-Revert-ld.hugetlbfs-fix-Ttext-segment-argument-on-AA.patch +++ /dev/null @@ -1,210 +0,0 @@ -From 0a163f60b4a316c4b6f1726a71c84755f3bd85e7 Mon Sep 17 00:00:00 2001 -From: Martin Jansa -Date: Wed, 16 Sep 2020 04:36:04 -0700 -Subject: [PATCH] Revert "ld.hugetlbfs: fix -Ttext-segment argument on AArch64" - -This reverts commit 852dcc963ce44861ed7c4e225aa92ff2b5b43579. - -* works around - ERROR: libhugetlbfs-1_2.23-r0 do_populate_sysroot: Fatal errors occurred in subprocesses: - Command '['arm-oe-linux-gnueabi-strip', '--remove-section=.comment', '--remove-section=.note', 'libhugetlbfs/1_2.23-r0/sysroot-destdir/usr/lib/libhugetlbfs/tests/obj32/linkhuge_rw']' returned non-zero exit status 1. - Subprocess output:arm-oe-linux-gnueabi-strip: - libhugetlbfs/1_2.23-r0/sysroot-destdir/usr/lib/libhugetlbfs/tests/obj32/stmuFa58: error: PHDR segment not covered by LOAD segment - arm-oe-linux-gnueabi-strip: libhugetlbfs/1_2.23-r0/sysroot-destdir/usr/lib/libhugetlbfs/tests/obj32/stmuFa58[.interp]: file format not recognized - -I don't see anything suspicious in the build (the same cmdline as in 2.22 -version), but it uses - -libhugetlbfs/1_2.22-r0-old/temp/log.do_compile:arm-oe-linux-gnueabi-gcc - -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 -Wl,-O1 --Wl,--hash-style=gnu -Wl,--as-needed -Wl,-z,relro,-z,now --fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security --Werror=format-security -Werror=return-type ---sysroot=/jenkins/mjansa/build/ros/oe-melodic-gatesgarth/libhugetlbfs/1_2.22-r0/recipe-sysroot --I.. -O2 -Wall -g -o obj32/linkhuge_rw.o -c linkhuge_rw.c -libhugetlbfs/1_2.22-r0-old/temp/log.do_compile:arm-oe-linux-gnueabi-gcc - -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 -Wl,-O1 --Wl,--hash-style=gnu -Wl,--as-needed -Wl,-z,relro,-z,now --fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security --Werror=format-security -Werror=return-type ---sysroot=/jenkins/mjansa/build/ros/oe-melodic-gatesgarth/libhugetlbfs/1_2.22-r0/recipe-sysroot --B./obj32 -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,-z,relro,-z,now --ldl -L../obj32 -o obj32/linkhuge_rw -Wl,--no-as-needed -lpthread -ldl --lhugetlbfs_privutils -Wl,--hugetlbfs-align obj32/linkhuge_rw.o -obj32/testutils.o -libhugetlbfs/1_2.23-r0-new/temp/log.do_compile:arm-oe-linux-gnueabi-gcc - -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 -Wl,-O1 --Wl,--hash-style=gnu -Wl,--as-needed -Wl,-z,relro,-z,now --fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security --Werror=format-security -Werror=return-type ---sysroot=/jenkins/mjansa/build/ros/oe-melodic-gatesgarth/libhugetlbfs/1_2.23-r0/recipe-sysroot --I.. -O2 -Wall -g -o obj32/linkhuge_rw.o -c linkhuge_rw.c -libhugetlbfs/1_2.23-r0-new/temp/log.do_compile:arm-oe-linux-gnueabi-gcc - -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 -Wl,-O1 --Wl,--hash-style=gnu -Wl,--as-needed -Wl,-z,relro,-z,now --fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security --Werror=format-security -Werror=return-type ---sysroot=/jenkins/mjansa/build/ros/oe-melodic-gatesgarth/libhugetlbfs/1_2.23-r0/recipe-sysroot --B./obj32 -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,-z,relro,-z,now --ldl -L../obj32 -o obj32/linkhuge_rw -Wl,--no-as-needed -lpthread -ldl --lhugetlbfs_privutils -Wl,--hugetlbfs-align obj32/linkhuge_rw.o -obj32/testutils.o - -And the git log between 2.22 and 2.23 is also very short and looks -reasonable. -https://github.com/libhugetlbfs/libhugetlbfs/compare/2.22...2.23 - -When checking with readelf -l it also shows the error about PHDR segment: -arm-oe-linux-gnueabi-readelf -l -./1_2.22-r0-old/sysroot-destdir/usr/lib/libhugetlbfs/tests/obj32/linkhuge_rw - -Elf file type is DYN (Shared object file) -Entry point 0x201105 -There are 10 program headers, starting at offset 52 - -Program Headers: - Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align - PHDR 0x000034 0x00200034 0x00200034 0x00140 0x00140 R 0x4 - INTERP 0x000174 0x00200174 0x00200174 0x0001d 0x0001d R 0x1 - [Requesting program interpreter: /usr/lib/ld-linux-armhf.so.3] - LOAD 0x000000 0x00200000 0x00200000 0x1222c 0x1222c R E 0x200000 - LOAD 0x1ffdf0 0x005ffdf0 0x005ffdf0 0x102e0 0x202ec RW 0x200000 - DYNAMIC 0x1ffdf8 0x005ffdf8 0x005ffdf8 0x00128 0x00128 RW 0x4 - NOTE 0x000194 0x00200194 0x00200194 0x00044 0x00044 R 0x4 - GNU_EH_FRAME 0x012224 0x00212224 0x00212224 0x00008 0x00008 R 0x4 - GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RW 0x10 - EXIDX 0x001c5c 0x00201c5c 0x00201c5c 0x00008 0x00008 R 0x4 - GNU_RELRO 0x1ffdf0 0x005ffdf0 0x005ffdf0 0x00210 0x00210 RW 0x4 - - Section to Segment mapping: - Segment Sections... - 00 - 01 .interp - 02 .interp .note.ABI-tag .note.gnu.build-id .dynsym .dynstr -.gnu.hash .gnu.version .gnu.version_r .rel.dyn .rel.plt .init .plt .text -.fini .ARM.extab .ARM.exidx .rodata .eh_frame .eh_frame_hdr - 03 .fini_array .init_array .dynamic .got .data .bss - 04 .dynamic - 05 .note.ABI-tag .note.gnu.build-id - 06 .eh_frame_hdr - 07 - 08 .ARM.extab .ARM.exidx - 09 .fini_array .init_array .dynamic .got - -arm-oe-linux-gnueabi-readelf -l -./1_2.23-r0-new/sysroot-destdir/usr/lib/libhugetlbfs/tests/obj32/linkhuge_rw - -Elf file type is DYN (Shared object file) -Entry point 0x31cd1 -There are 10 program headers, starting at offset 52 - -Program Headers: - Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align - PHDR 0x000000 0x00000000 0x00000000 0x00000 0x00000 R 0 -readelf: Error: the PHDR segment is not covered by a LOAD segment - INTERP 0x030d40 0x00030d40 0x00030d40 0x0001d 0x0001d R 0x1 - [Requesting program interpreter: /usr/lib/ld-linux-armhf.so.3] - LOAD 0x030d40 0x00030d40 0x00030d40 0x120b8 0x120b8 R E 0x200000 - LOAD 0x1ffdf0 0x003ffdf0 0x003ffdf0 0x102e0 0x202ec RW 0x200000 - DYNAMIC 0x1ffdf8 0x003ffdf8 0x003ffdf8 0x00128 0x00128 RW 0x4 - NOTE 0x030d60 0x00030d60 0x00030d60 0x00044 0x00044 R 0x4 - GNU_EH_FRAME 0x042df0 0x00042df0 0x00042df0 0x00008 0x00008 R 0x4 - GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RW 0x10 - EXIDX 0x032828 0x00032828 0x00032828 0x00008 0x00008 R 0x4 - GNU_RELRO 0x1ffdf0 0x003ffdf0 0x003ffdf0 0x00210 0x00210 RW 0x4 - - Section to Segment mapping: - Segment Sections... - 00 - 01 .interp - 02 .interp .note.ABI-tag .note.gnu.build-id .dynsym .dynstr -.gnu.hash .gnu.version .gnu.version_r .rel.dyn .rel.plt .init .plt .text -.fini .ARM.extab .ARM.exidx .rodata .eh_frame .eh_frame_hdr - 03 .fini_array .init_array .dynamic .got .data .bss - 04 .dynamic - 05 .note.ABI-tag .note.gnu.build-id - 06 .eh_frame_hdr - 07 - 08 .ARM.extab .ARM.exidx - 09 .fini_array .init_array .dynamic .got - -And the diff between these 2: - -1_2.22-r0-old/sysroot-destdir/usr/lib/libhugetlbfs/tests/obj32/linkhuge_rw.readelf -1_2.23-r0-new/sysroot-destdir/usr/lib/libhugetlbfs/tests/obj32/linkhuge_rw.readelf - Elf file type is DYN (Shared object file) --Entry point 0x201105 -+Entry point 0x31cd1 - There are 10 program headers, starting at offset 52 - - Program Headers: - Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align -- PHDR 0x000034 0x00200034 0x00200034 0x00140 0x00140 R 0x4 -- INTERP 0x000174 0x00200174 0x00200174 0x0001d 0x0001d R 0x1 -+ PHDR 0x000000 0x00000000 0x00000000 0x00000 0x00000 R 0 -+readelf: Error: the PHDR segment is not covered by a LOAD segment -+ INTERP 0x030d40 0x00030d40 0x00030d40 0x0001d 0x0001d R 0x1 - [Requesting program interpreter: /usr/lib/ld-linux-armhf.so.3] -- LOAD 0x000000 0x00200000 0x00200000 0x1222c 0x1222c R E 0x200000 -- LOAD 0x1ffdf0 0x005ffdf0 0x005ffdf0 0x102e0 0x202ec RW 0x200000 -- DYNAMIC 0x1ffdf8 0x005ffdf8 0x005ffdf8 0x00128 0x00128 RW 0x4 -- NOTE 0x000194 0x00200194 0x00200194 0x00044 0x00044 R 0x4 -- GNU_EH_FRAME 0x012224 0x00212224 0x00212224 0x00008 0x00008 R 0x4 -+ LOAD 0x030d40 0x00030d40 0x00030d40 0x120b8 0x120b8 R E 0x200000 -+ LOAD 0x1ffdf0 0x003ffdf0 0x003ffdf0 0x102e0 0x202ec RW 0x200000 -+ DYNAMIC 0x1ffdf8 0x003ffdf8 0x003ffdf8 0x00128 0x00128 RW 0x4 -+ NOTE 0x030d60 0x00030d60 0x00030d60 0x00044 0x00044 R 0x4 -+ GNU_EH_FRAME 0x042df0 0x00042df0 0x00042df0 0x00008 0x00008 R 0x4 - GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RW 0x10 -- EXIDX 0x001c5c 0x00201c5c 0x00201c5c 0x00008 0x00008 R 0x4 -- GNU_RELRO 0x1ffdf0 0x005ffdf0 0x005ffdf0 0x00210 0x00210 RW 0x4 -+ EXIDX 0x032828 0x00032828 0x00032828 0x00008 0x00008 R 0x4 -+ GNU_RELRO 0x1ffdf0 0x003ffdf0 0x003ffdf0 0x00210 0x00210 RW 0x4 - - Section to Segment mapping: - -Revert fixes this build issue, but I still don't see why it fails this way. - -Upstream-Status: Pending - -Signed-off-by: Martin Jansa - -# Please enter the commit message for your changes. Lines starting -# with '#' will be ignored, and an empty message aborts the commit. -# -# Date: Wed Sep 16 13:43:09 2020 +0200 -# -# On branch jansa/master -# Changes to be committed: -# new file: meta-oe/recipes-benchmark/libhugetlbfs/files/0001-Revert-ld.hugetlbfs-fix-Ttext-segment-argument-on-AA.patch -# modified: meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb -# -# Untracked files: -# counts.txt -# diff -# log.svn -# log.svn2 -# wip/ -# ---- - ld.hugetlbfs | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) - -diff --git a/ld.hugetlbfs b/ld.hugetlbfs -index 5e4e497..6ee8238 100755 ---- a/ld.hugetlbfs -+++ b/ld.hugetlbfs -@@ -130,9 +130,7 @@ if [ "$HTLB_ALIGN" == "slice" ]; then - # targeting the ARM platform one needs to explicitly set the text segment offset - # otherwise it will be NULL. - case "$EMU" in -- armelf*_linux_eabi|aarch64elf*|aarch64linux*) -- printf -v TEXTADDR "%x" "$SLICE_SIZE" -- HTLBOPTS="$HTLBOPTS -Ttext-segment=$TEXTADDR" ;; -+ armelf*_linux_eabi|aarch64elf*|aarch64linux*) HTLBOPTS="$HTLBOPTS -Ttext-segment=$SLICE_SIZE" ;; - elf_i386) HTLBOPTS="$HTLBOPTS -Ttext-segment=0x08000000" ;; - elf64ppc|elf64lppc) - if [ "$MMU_TYPE" == "Hash" ] ; then --- -2.17.1 - diff --git a/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-huge_page_setup_helper-use-python3-interpreter.patch b/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-huge_page_setup_helper-use-python3-interpreter.patch deleted file mode 100644 index e45f283b..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-huge_page_setup_helper-use-python3-interpreter.patch +++ /dev/null @@ -1,29 +0,0 @@ -From b77c61de4d88d2c6e5d31f4f5a5877cc4c61272e Mon Sep 17 00:00:00 2001 -From: Andrey Zhizhikin -Date: Mon, 27 Jan 2020 17:27:55 +0000 -Subject: [PATCH] huge_page_setup_helper: use python3 interpreter - -Setup helper script is already prepared to be used with python3, use the -interpreter explicitly. This removes dependency to python2 and will not -fail the QA check. - -Upstream-Status: Inappropriate [OE-specific] - -Signed-off-by: Andrey Zhizhikin ---- - huge_page_setup_helper.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/huge_page_setup_helper.py b/huge_page_setup_helper.py -index a9ba2bf..7ba0c92 100755 ---- a/huge_page_setup_helper.py -+++ b/huge_page_setup_helper.py -@@ -1,4 +1,4 @@ --#!/usr/bin/python -+#!/usr/bin/env python3 - - # - # Tool to set up Linux large page support with minimal effort --- -2.17.1 - diff --git a/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-include-stddef.h-for-ptrdiff_t.patch b/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-include-stddef.h-for-ptrdiff_t.patch deleted file mode 100644 index 914b0514..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-include-stddef.h-for-ptrdiff_t.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 351d1de09dd80049b7a2cb02c5750635d0389873 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Thu, 21 Jun 2018 19:25:57 -0700 -Subject: [PATCH] include stddef.h for ptrdiff_t - -Signed-off-by: Khem Raj - ---- -Upstream-Status: Pending - - morecore.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/morecore.c b/morecore.c -index 6563bbd..0eef782 100644 ---- a/morecore.c -+++ b/morecore.c -@@ -19,6 +19,7 @@ - - #define _GNU_SOURCE - -+#include - #include - #include - #include diff --git a/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-run_test.py-not-use-hard-coded-path-.-obj-hugeadm.patch b/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-run_test.py-not-use-hard-coded-path-.-obj-hugeadm.patch deleted file mode 100644 index 83934abe..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-run_test.py-not-use-hard-coded-path-.-obj-hugeadm.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 0077532b07e268347cb8557be6d70148d5f0e840 Mon Sep 17 00:00:00 2001 -From: Ting Liu -Date: Wed, 21 Aug 2013 15:44:57 +0800 -Subject: [PATCH] run_test.py: not use hard coded path ../obj/hugeadm - -Hard coded path makes the script impossible to run out of source tree. -After 'make install', we can use hugeadm utility under DESTDIR. - -Upstream-Status: Submitted - -Signed-off-by: Ting Liu - -Update for 2.22. -Signed-off-by: Zheng Ruoqin - -Update to work for python3 -Signed-off-by: Changqing Li ---- - tests/run_tests.py | 12 +++++++++++- - 1 file changed, 11 insertions(+), 1 deletion(-) - -diff --git a/tests/run_tests.py b/tests/run_tests.py -index 018264d..0aabcd1 100755 ---- a/tests/run_tests.py -+++ b/tests/run_tests.py -@@ -245,9 +245,19 @@ def get_pagesizes(): - Use libhugetlbfs' hugeadm utility to get a list of page sizes that have - active mount points and at least one huge page allocated to the pool. - """ -+ local_env = os.environ.copy() -+ local_env["PATH"] = "../obj:%s" % local_env.get("PATH", "") - sizes = set() - out = "" -- (rc, out) = bash("../obj/hugeadm --page-sizes") -+ try: -+ p = subprocess.Popen("hugeadm --page-sizes", shell=True, env=local_env, stdout=subprocess.PIPE) -+ rc = p.wait() -+ except KeyboardInterrupt: -+ return sizes -+ except OSError: -+ return sizes -+ out = p.stdout.read().decode().strip() -+ - if rc != 0 or out == "": - return sizes - --- -2.7.4 - diff --git a/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-skip-checking-LIB32-and-LIB64-if-they-point-to-the-s.patch b/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-skip-checking-LIB32-and-LIB64-if-they-point-to-the-s.patch new file mode 100644 index 00000000..3dbc34d0 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-skip-checking-LIB32-and-LIB64-if-they-point-to-the-s.patch @@ -0,0 +1,27 @@ +From b448672f1bc08dcef2ae07727ae6f124a3032a35 Mon Sep 17 00:00:00 2001 +From: Ting Liu +Date: Mon, 18 Jun 2012 16:37:05 +0800 +Subject: [PATCH] skip checking LIB32 and LIB64 if they point to the same place + +Upstream-Status: Inappropriate [oe-core specific] + +Signed-off-by: Ting Liu +--- + Makefile.in | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/Makefile.in b/Makefile.in +index 65ae5a4..25be577 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -196,7 +196,6 @@ REALLIB32 = $(realpath $(PREFIX)/$(LIB32)) + REALLIB64 = $(realpath $(PREFIX)/$(LIB64)) + ifneq ($(realpath $(PREFIX)),) + ifeq ($(REALLIB32),$(REALLIB64)) +-$(error LIB32 ($(PREFIX)/$(LIB32) to $(REALLIB32)) and LIB64 ($(PREFIX)/$(LIB64) to $(REALLIB64)) are resolving to the same place. Manually specify LIB32 and LIB64. e.g. make PREFIX=$(PREFIX) LIB32=lib32 LIB64=lib64) + endif + endif + +-- +2.25.1 + diff --git a/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-tests-makefile-Append-CPPFLAGS-rather-then-override.patch b/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-tests-makefile-Append-CPPFLAGS-rather-then-override.patch deleted file mode 100644 index 78a4cb0f..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-tests-makefile-Append-CPPFLAGS-rather-then-override.patch +++ /dev/null @@ -1,31 +0,0 @@ -From b6dba773491bbb7b4664dacdd87a12af860f1bd8 Mon Sep 17 00:00:00 2001 -From: Oleksiy Obitotskyy -Date: Thu, 28 Jan 2021 05:43:33 -0800 -Subject: [PATCH] tests/makefile: Append CPPFLAGS rather then override - -CPPFLAGS overrided and we could miss some options needed. - -Upstream-Status: Submitted -Signed-off-by: Oleksiy Obitotskyy ---- - tests/Makefile | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/tests/Makefile b/tests/Makefile -index 0ca3716..d262932 100644 ---- a/tests/Makefile -+++ b/tests/Makefile -@@ -33,8 +33,8 @@ HELPERS = get_hugetlbfs_path compare_kvers - HELPER_LIBS = libheapshrink.so - BADTOOLCHAIN = bad-toolchain.sh - --CFLAGS = -O2 -Wall -g --CPPFLAGS = -I.. -+CFLAGS += -O2 -Wall -g -+CPPFLAGS += -I.. - STATIC_LIBHUGE = -Wl,--whole-archive -lhugetlbfs -Wl,--no-whole-archive - STATIC_LDLIBS = -Wl,--no-as-needed -lpthread - LDLIBS = $(STATIC_LDLIBS) -ldl -lhugetlbfs_privutils --- -2.26.2.Cisco - diff --git a/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0002-Mark-glibc-specific-code-so.patch b/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0002-Mark-glibc-specific-code-so.patch deleted file mode 100644 index 7ad6c43e..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0002-Mark-glibc-specific-code-so.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 0f548286848c70aa325c6748d80e8651389b4938 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Thu, 21 Jun 2018 19:32:59 -0700 -Subject: [PATCH] Mark glibc specific code so - -Signed-off-by: Khem Raj - ---- -Upstream-Status: Pending - - morecore.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/morecore.c b/morecore.c -index 0eef782..d48509c 100644 ---- a/morecore.c -+++ b/morecore.c -@@ -364,6 +364,7 @@ void hugetlbfs_setup_morecore(void) - - INFO("setup_morecore(): heapaddr = 0x%lx\n", heapaddr); - -+#ifdef __GLIBC__ - heaptop = heapbase = (void *)heapaddr; - if (__hugetlb_opts.thp_morecore) - __morecore = &thp_morecore; -@@ -371,7 +372,6 @@ void hugetlbfs_setup_morecore(void) - __morecore = &hugetlbfs_morecore; - - /* Set some allocator options more appropriate for hugepages */ -- - if (__hugetlb_opts.shrink_ok) - mallopt(M_TRIM_THRESHOLD, hpage_size + hpage_size / 2); - else -@@ -381,4 +381,5 @@ void hugetlbfs_setup_morecore(void) - * This doesn't appear to prohibit malloc() from falling back - * to mmap() if we run out of hugepages. */ - mallopt(M_MMAP_MAX, 0); -+#endif - } diff --git a/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0002-libhugetlbfs-avoid-search-host-library-path-for-cros.patch b/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0002-libhugetlbfs-avoid-search-host-library-path-for-cros.patch new file mode 100644 index 00000000..1b99c007 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0002-libhugetlbfs-avoid-search-host-library-path-for-cros.patch @@ -0,0 +1,99 @@ +From d3903cbe348c6ecb2f38b37f20dafa6b0ca3b114 Mon Sep 17 00:00:00 2001 +From: Chunrong Guo +Date: Sun, 8 Sep 2013 23:21:49 -0500 +Subject: [PATCH] libhugetlbfs: avoid search host library path for cross + compilation + +Upstream-Status: Inappropriate [oe-core specific] + +Signed-off-by: Chunrong Guo +--- + ldscripts/elf32ppclinux.xB | 2 +- + ldscripts/elf32ppclinux.xBDT | 2 +- + ldscripts/elf64ppc.xB | 2 +- + ldscripts/elf64ppc.xBDT | 2 +- + ldscripts/elf_x86_64.xB | 2 +- + ldscripts/elf_x86_64.xBDT | 2 +- + 6 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/ldscripts/elf32ppclinux.xB b/ldscripts/elf32ppclinux.xB +index 28ad88d..33d482d 100644 +--- a/ldscripts/elf32ppclinux.xB ++++ b/ldscripts/elf32ppclinux.xB +@@ -3,7 +3,7 @@ OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", + "elf32-powerpc") + OUTPUT_ARCH(powerpc:common) + ENTRY(_start) +-SEARCH_DIR("/usr/powerpc-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib"); ++/*SEARCH_DIR("/usr/powerpc-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib");*/ + INPUT(-lhugetlbfs); + PHDRS + { +diff --git a/ldscripts/elf32ppclinux.xBDT b/ldscripts/elf32ppclinux.xBDT +index 497882b..823475e 100644 +--- a/ldscripts/elf32ppclinux.xBDT ++++ b/ldscripts/elf32ppclinux.xBDT +@@ -3,7 +3,7 @@ OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", + "elf32-powerpc") + OUTPUT_ARCH(powerpc:common) + ENTRY(_start) +-SEARCH_DIR("/usr/powerpc-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib"); ++/*SEARCH_DIR("/usr/powerpc-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib");*/ + INPUT(-lhugetlbfs); + PHDRS + { +diff --git a/ldscripts/elf64ppc.xB b/ldscripts/elf64ppc.xB +index 1a9c1ab..8cc557d 100644 +--- a/ldscripts/elf64ppc.xB ++++ b/ldscripts/elf64ppc.xB +@@ -3,7 +3,7 @@ OUTPUT_FORMAT("elf64-powerpc", "elf64-powerpc", + "elf64-powerpc") + OUTPUT_ARCH(powerpc:common64) + ENTRY(_start) +-SEARCH_DIR("/usr/powerpc64-linux-gnu/lib64"); SEARCH_DIR("/usr/local/lib64"); SEARCH_DIR("/lib64"); SEARCH_DIR("/usr/lib64"); SEARCH_DIR("/usr/powerpc64-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib"); ++/*SEARCH_DIR("/usr/powerpc64-linux-gnu/lib64"); SEARCH_DIR("/usr/local/lib64"); SEARCH_DIR("/lib64"); SEARCH_DIR("/usr/lib64"); SEARCH_DIR("/usr/powerpc64-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib");*/ + INPUT(-lhugetlbfs); + PHDRS + { +diff --git a/ldscripts/elf64ppc.xBDT b/ldscripts/elf64ppc.xBDT +index 5477294..53e0749 100644 +--- a/ldscripts/elf64ppc.xBDT ++++ b/ldscripts/elf64ppc.xBDT +@@ -3,7 +3,7 @@ OUTPUT_FORMAT("elf64-powerpc", "elf64-powerpc", + "elf64-powerpc") + OUTPUT_ARCH(powerpc:common64) + ENTRY(_start) +-SEARCH_DIR("/usr/powerpc64-linux-gnu/lib64"); SEARCH_DIR("/usr/local/lib64"); SEARCH_DIR("/lib64"); SEARCH_DIR("/usr/lib64"); SEARCH_DIR("/usr/powerpc64-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib"); ++/*SEARCH_DIR("/usr/powerpc64-linux-gnu/lib64"); SEARCH_DIR("/usr/local/lib64"); SEARCH_DIR("/lib64"); SEARCH_DIR("/usr/lib64"); SEARCH_DIR("/usr/powerpc64-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib");*/ + INPUT( -lhugetlbfs ); + PHDRS + { +diff --git a/ldscripts/elf_x86_64.xB b/ldscripts/elf_x86_64.xB +index ed21a2c..ba50e9f 100644 +--- a/ldscripts/elf_x86_64.xB ++++ b/ldscripts/elf_x86_64.xB +@@ -3,7 +3,7 @@ OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", + "elf64-x86-64") + OUTPUT_ARCH(i386:x86-64) + ENTRY(_start) +-SEARCH_DIR("/usr/x86_64-linux-gnu/lib64"); SEARCH_DIR("/usr/local/lib64"); SEARCH_DIR("/lib64"); SEARCH_DIR("/usr/lib64"); SEARCH_DIR("/usr/x86_64-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib"); ++/*SEARCH_DIR("/usr/x86_64-linux-gnu/lib64"); SEARCH_DIR("/usr/local/lib64"); SEARCH_DIR("/lib64"); SEARCH_DIR("/usr/lib64"); SEARCH_DIR("/usr/x86_64-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib");*/ + INPUT(-lhugetlbfs); + /* Do we need any of these for elf? + __DYNAMIC = 0; */ +diff --git a/ldscripts/elf_x86_64.xBDT b/ldscripts/elf_x86_64.xBDT +index 1855202..c62d245 100644 +--- a/ldscripts/elf_x86_64.xBDT ++++ b/ldscripts/elf_x86_64.xBDT +@@ -3,7 +3,7 @@ OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", + "elf64-x86-64") + OUTPUT_ARCH(i386:x86-64) + ENTRY(_start) +-SEARCH_DIR("/usr/x86_64-linux-gnu/lib64"); SEARCH_DIR("/usr/local/lib64"); SEARCH_DIR("/lib64"); SEARCH_DIR("/usr/lib64"); SEARCH_DIR("/usr/x86_64-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib"); ++/*SEARCH_DIR("/usr/x86_64-linux-gnu/lib64"); SEARCH_DIR("/usr/local/lib64"); SEARCH_DIR("/lib64"); SEARCH_DIR("/usr/lib64"); SEARCH_DIR("/usr/x86_64-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib");*/ + INPUT(-lhugetlbfs); + /* Do we need any of these for elf? + __DYNAMIC = 0; */ +-- +2.25.1 + diff --git a/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0003-alloc.c-Avoid-sysconf-_SC_LEVEL2_CACHE_LINESIZE-on-l.patch b/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0003-alloc.c-Avoid-sysconf-_SC_LEVEL2_CACHE_LINESIZE-on-l.patch deleted file mode 100644 index 858a8e51..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0003-alloc.c-Avoid-sysconf-_SC_LEVEL2_CACHE_LINESIZE-on-l.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 9ff04d7acc700387e3837f8ab11a41efea5ee8b0 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Thu, 21 Jun 2018 19:44:26 -0700 -Subject: [PATCH] alloc.c: Avoid sysconf(_SC_LEVEL2_CACHE_LINESIZE) on linux - -musl does not have it - -Signed-off-by: Khem Raj - ---- -Upstream-Status: Pending - - alloc.c | 15 ++++++++++++++- - 1 file changed, 14 insertions(+), 1 deletion(-) - -diff --git a/alloc.c b/alloc.c -index bce9464..cf7eb40 100644 ---- a/alloc.c -+++ b/alloc.c -@@ -245,6 +245,19 @@ void free_huge_pages(void *ptr) - __free_huge_pages(ptr, 1); - } - -+static size_t get_cacheline_size() { -+#if defined(__linux__) -+ FILE * fp = fopen("/sys/devices/system/cpu/cpu0/cache/index0/coherency_line_size", "r"); -+ unsigned int line_size = 0; -+ if (fp) { -+ fscanf(fp, "%d", &line_size); -+ fclose(fp); -+ } -+ return line_size; -+#else -+ return sysconf(_SC_LEVEL2_CACHE_LINESIZE); -+#endif -+} - /* - * Offset the buffer using bytes wasted due to alignment to avoid using the - * same cache lines for the start of every buffer returned by -@@ -261,7 +274,7 @@ void *cachecolor(void *buf, size_t len, size_t color_bytes) - - /* Lookup our cacheline size once */ - if (cacheline_size == 0) { -- cacheline_size = sysconf(_SC_LEVEL2_CACHE_LINESIZE); -+ cacheline_size = get_cacheline_size(); - linemod = time(NULL); - } - diff --git a/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0003-tests-Makefile-install-static-4G-edge-testcases.patch b/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0003-tests-Makefile-install-static-4G-edge-testcases.patch new file mode 100644 index 00000000..98cdf2f5 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0003-tests-Makefile-install-static-4G-edge-testcases.patch @@ -0,0 +1,30 @@ +From 3e54866a0ea3c9e933e91213cbe6e55b7ff67b87 Mon Sep 17 00:00:00 2001 +From: Ting Liu +Date: Mon, 23 Sep 2013 08:00:55 +0000 +Subject: [PATCH] tests/Makefile: install static 4G edge testcases + +TESTS_64 is empty, install will fail due to missing file operand + +Upstream-Status: Submitted + +Signed-off-by: Ting Liu +--- + tests/Makefile.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/Makefile.in b/tests/Makefile.in +index d33a228..d262932 100644 +--- a/tests/Makefile.in ++++ b/tests/Makefile.in +@@ -295,7 +295,7 @@ obj64/install: + $(INSTALL) -m 755 wrapper-utils.sh $(DESTDIR)$(INST_TESTSDIR64)/obj64 + $(INSTALL) -m 755 $(HELPERS:%=obj64/%) $(DESTDIR)$(INST_TESTSDIR64)/obj64 + $(INSTALL) -m 755 $(HELPER_LIBS:%=obj64/%) $(DESTDIR)$(INST_TESTSDIR64)/obj64 +- $(INSTALL) -m 755 $(TESTS_64:%=obj64/%) $(DESTDIR)$(INST_TESTSDIR64)/obj64 ++ $(INSTALL) -m 755 $(TESTS_64_STATIC:%=obj64/%_static) $(DESTDIR)$(INST_TESTSDIR64)/obj64 + $(INSTALL) -m 755 run_tests.py $(DESTDIR)$(INST_TESTSDIR64) + + install: $(OBJDIRS:%=%/install) +-- +2.25.1 + diff --git a/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0004-run_test.py-not-use-hard-coded-path-.-obj-hugeadm.patch b/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0004-run_test.py-not-use-hard-coded-path-.-obj-hugeadm.patch new file mode 100644 index 00000000..6b010365 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0004-run_test.py-not-use-hard-coded-path-.-obj-hugeadm.patch @@ -0,0 +1,49 @@ +From 86d3ebfc4da5ccbc82fdee4abaf2cbf758d82403 Mon Sep 17 00:00:00 2001 +From: Ting Liu +Date: Wed, 21 Aug 2013 15:44:57 +0800 +Subject: [PATCH] run_test.py: not use hard coded path ../obj/hugeadm + +Hard coded path makes the script impossible to run out of source tree. +After 'make install', we can use hugeadm utility under DESTDIR. + +Upstream-Status: Submitted + +Signed-off-by: Ting Liu + +Update for 2.22. +Signed-off-by: Zheng Ruoqin + +Update to work for python3 +Signed-off-by: Changqing Li +--- + tests/run_tests.py | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) + +diff --git a/tests/run_tests.py b/tests/run_tests.py +index 4793262..6cd0241 100755 +--- a/tests/run_tests.py ++++ b/tests/run_tests.py +@@ -250,9 +250,19 @@ def get_pagesizes(): + Use libhugetlbfs' hugeadm utility to get a list of page sizes that have + active mount points and at least one huge page allocated to the pool. + """ ++ local_env = os.environ.copy() ++ local_env["PATH"] = "../obj:%s" % local_env.get("PATH", "") + sizes = set() + out = "" +- (rc, out) = bash("../obj/hugeadm --page-sizes") ++ try: ++ p = subprocess.Popen("hugeadm --page-sizes", shell=True, env=local_env, stdout=subprocess.PIPE) ++ rc = p.wait() ++ except KeyboardInterrupt: ++ return sizes ++ except OSError: ++ return sizes ++ out = p.stdout.read().decode().strip() ++ + if rc != 0 or out == "": + return sizes + +-- +2.25.1 + diff --git a/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0004-shm.c-Mark-glibc-specific-changes-so.patch b/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0004-shm.c-Mark-glibc-specific-changes-so.patch deleted file mode 100644 index c3f7b3e4..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0004-shm.c-Mark-glibc-specific-changes-so.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 9ce323432a7f4d99f617970c7e35b607b9bbf843 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Thu, 21 Jun 2018 19:48:04 -0700 -Subject: [PATCH] shm.c: Mark glibc specific changes so - -Signed-off-by: Khem Raj - ---- -Upstream-Status: Pending - - shm.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/shm.c b/shm.c -index 1f82cab..9447b63 100644 ---- a/shm.c -+++ b/shm.c -@@ -48,10 +48,11 @@ - * system shmget() may be performed without worry as there is no dynamic - * call chain. - */ -+#ifdef __GLIBC__ - extern void *dlsym (void *__restrict __handle, __const char *__restrict __name) - __attribute__((weak)) __THROW __nonnull ((2)); - extern char *dlerror (void) __attribute__((weak)) __THROW; -- -+#endif - - /* call syscall shmget through the generic syscall mechanism */ - static int syscall_shmget(key_t key, size_t size, int shmflg) diff --git a/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0005-Include-dirent.h-for-ino_t.patch b/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0005-Include-dirent.h-for-ino_t.patch deleted file mode 100644 index 8bd16333..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0005-Include-dirent.h-for-ino_t.patch +++ /dev/null @@ -1,33 +0,0 @@ -From bb8c370aaaf25b1fe1fbf984e73177018026cb91 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Thu, 21 Jun 2018 19:51:02 -0700 -Subject: [PATCH] Include dirent.h for ino_t - -Fixes -error: unknown type name 'ino_t'; did you mean 'int'? - -Signed-off-by: Khem Raj - -Update for 2.22. -Signed-off-by: Zheng Ruoqin ---- -Upstream-Status: Pending - - tests/hugetests.h | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/tests/hugetests.h b/tests/hugetests.h -index bc4e16a..fbe4dc0 100644 ---- a/tests/hugetests.h -+++ b/tests/hugetests.h -@@ -22,6 +22,7 @@ - - #include - #include -+#include - #include - - #include "libhugetlbfs_privutils.h" --- -2.7.4 - diff --git a/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0005-libhugetlbfs-elf_i386-avoid-search-host-library-path.patch b/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0005-libhugetlbfs-elf_i386-avoid-search-host-library-path.patch new file mode 100644 index 00000000..fc8776af --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0005-libhugetlbfs-elf_i386-avoid-search-host-library-path.patch @@ -0,0 +1,41 @@ +From 8c7a379876e3c7a32bef8620f94a85d20b7b186f Mon Sep 17 00:00:00 2001 +From: Jackie Huang +Date: Tue, 4 Nov 2014 00:49:11 -0800 +Subject: [PATCH] libhugetlbfs/elf_i386: avoid search host library path for + cross compilation + +Upstream-Status: Inappropriate [cross compile specific] + +Signed-off-by: Jackie Huang +--- + ldscripts/elf_i386.xB | 1 - + ldscripts/elf_i386.xBDT | 1 - + 2 files changed, 2 deletions(-) + +diff --git a/ldscripts/elf_i386.xB b/ldscripts/elf_i386.xB +index 43fe51c..eae0fa8 100644 +--- a/ldscripts/elf_i386.xB ++++ b/ldscripts/elf_i386.xB +@@ -3,7 +3,6 @@ OUTPUT_FORMAT("elf32-i386", "elf32-i386", + "elf32-i386") + OUTPUT_ARCH(i386) + ENTRY(_start) +-SEARCH_DIR("/usr/i486-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib"); + INPUT(-lhugetlbfs); + /* Do we need any of these for elf? + __DYNAMIC = 0; */ +diff --git a/ldscripts/elf_i386.xBDT b/ldscripts/elf_i386.xBDT +index d72aebe..3bac1b1 100644 +--- a/ldscripts/elf_i386.xBDT ++++ b/ldscripts/elf_i386.xBDT +@@ -3,7 +3,6 @@ OUTPUT_FORMAT("elf32-i386", "elf32-i386", + "elf32-i386") + OUTPUT_ARCH(i386) + ENTRY(_start) +-SEARCH_DIR("/usr/i486-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib"); + INPUT(-lhugetlbfs); + /* Do we need any of these for elf? + __DYNAMIC = 0; */ +-- +2.25.1 + diff --git a/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0006-include-limits.h-for-PATH_MAX.patch b/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0006-include-limits.h-for-PATH_MAX.patch deleted file mode 100644 index e4f80309..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0006-include-limits.h-for-PATH_MAX.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 5f64aa8c47c2d3a155a97e262f89cc47394a69eb Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Thu, 21 Jun 2018 19:58:53 -0700 -Subject: [PATCH] include limits.h for PATH_MAX - -Fixes - -error: 'PATH_MAX' undeclared - -Signed-off-by: Khem Raj - ---- -Upstream-Status: Pending - - hugeadm.c | 1 + - tests/gethugepagesizes.c | 1 + - 2 files changed, 2 insertions(+) - -diff --git a/hugeadm.c b/hugeadm.c -index fe4211d..8db274c 100644 ---- a/hugeadm.c -+++ b/hugeadm.c -@@ -33,6 +33,7 @@ - #include - #include - #include -+#include - - #include - #include -diff --git a/tests/gethugepagesizes.c b/tests/gethugepagesizes.c -index 9551b38..2645e3f 100644 ---- a/tests/gethugepagesizes.c -+++ b/tests/gethugepagesizes.c -@@ -29,6 +29,7 @@ - #include - #include - #include -+#include - - #include "hugetests.h" - diff --git a/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0006-include-stddef.h-for-ptrdiff_t.patch b/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0006-include-stddef.h-for-ptrdiff_t.patch new file mode 100644 index 00000000..33a4efb1 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0006-include-stddef.h-for-ptrdiff_t.patch @@ -0,0 +1,27 @@ +From 5fe5dae674e259bcdd57b9c6a0004111ab0700ce Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 21 Jun 2018 19:25:57 -0700 +Subject: [PATCH] include stddef.h for ptrdiff_t + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + morecore.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/morecore.c b/morecore.c +index 405c566..0edccd2 100644 +--- a/morecore.c ++++ b/morecore.c +@@ -19,6 +19,7 @@ + + #define _GNU_SOURCE + ++#include + #include + #include + #include +-- +2.25.1 + diff --git a/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0007-Mark-glibc-specific-code-so.patch b/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0007-Mark-glibc-specific-code-so.patch new file mode 100644 index 00000000..5b2c91b8 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0007-Mark-glibc-specific-code-so.patch @@ -0,0 +1,42 @@ +From c98e64c56d0118a2d5f950eaceaed0e85eaa2543 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 21 Jun 2018 19:32:59 -0700 +Subject: [PATCH] Mark glibc specific code so + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + morecore.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/morecore.c b/morecore.c +index 0edccd2..db22216 100644 +--- a/morecore.c ++++ b/morecore.c +@@ -371,6 +371,7 @@ void hugetlbfs_setup_morecore(void) + + INFO("setup_morecore(): heapaddr = 0x%lx\n", heapaddr); + ++#ifdef __GLIBC__ + heaptop = heapbase = (void *)heapaddr; + if (__hugetlb_opts.thp_morecore) + __morecore = &thp_morecore; +@@ -378,7 +379,6 @@ void hugetlbfs_setup_morecore(void) + __morecore = &hugetlbfs_morecore; + + /* Set some allocator options more appropriate for hugepages */ +- + if (__hugetlb_opts.shrink_ok) + mallopt(M_TRIM_THRESHOLD, hpage_size + hpage_size / 2); + else +@@ -388,5 +388,6 @@ void hugetlbfs_setup_morecore(void) + * This doesn't appear to prohibit malloc() from falling back + * to mmap() if we run out of hugepages. */ + mallopt(M_MMAP_MAX, 0); ++#endif + } + #endif /* HAS_MORECORE */ +-- +2.25.1 + diff --git a/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0008-alloc.c-Avoid-sysconf-_SC_LEVEL2_CACHE_LINESIZE-on-l.patch b/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0008-alloc.c-Avoid-sysconf-_SC_LEVEL2_CACHE_LINESIZE-on-l.patch new file mode 100644 index 00000000..73844b71 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0008-alloc.c-Avoid-sysconf-_SC_LEVEL2_CACHE_LINESIZE-on-l.patch @@ -0,0 +1,50 @@ +From 4f69eb130dc2c67a90f2460cedb78f6db11dd6d2 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 21 Jun 2018 19:44:26 -0700 +Subject: [PATCH] alloc.c: Avoid sysconf(_SC_LEVEL2_CACHE_LINESIZE) on linux + +musl does not have it + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + alloc.c | 15 ++++++++++++++- + 1 file changed, 14 insertions(+), 1 deletion(-) + +diff --git a/alloc.c b/alloc.c +index b8ed663..a58c43d 100644 +--- a/alloc.c ++++ b/alloc.c +@@ -245,6 +245,19 @@ void free_huge_pages(void *ptr) + __free_huge_pages(ptr, 1); + } + ++static size_t get_cacheline_size() { ++#if defined(__linux__) ++ FILE * fp = fopen("/sys/devices/system/cpu/cpu0/cache/index0/coherency_line_size", "r"); ++ unsigned int line_size = 0; ++ if (fp) { ++ fscanf(fp, "%d", &line_size); ++ fclose(fp); ++ } ++ return line_size; ++#else ++ return sysconf(_SC_LEVEL2_CACHE_LINESIZE); ++#endif ++} + /* + * Offset the buffer using bytes wasted due to alignment to avoid using the + * same cache lines for the start of every buffer returned by +@@ -261,7 +274,7 @@ void *cachecolor(void *buf, size_t len, size_t color_bytes) + + /* Lookup our cacheline size once */ + if (cacheline_size == 0) { +- cacheline_size = sysconf(_SC_LEVEL2_CACHE_LINESIZE); ++ cacheline_size = get_cacheline_size(); + linemod = time(NULL); + } + +-- +2.25.1 + diff --git a/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0009-shm.c-Mark-glibc-specific-changes-so.patch b/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0009-shm.c-Mark-glibc-specific-changes-so.patch new file mode 100644 index 00000000..4fbf30e2 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0009-shm.c-Mark-glibc-specific-changes-so.patch @@ -0,0 +1,32 @@ +From 37239dd5f14a34b05e77b3ca6e34f96161f1339a Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 21 Jun 2018 19:48:04 -0700 +Subject: [PATCH] shm.c: Mark glibc specific changes so + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + shm.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/shm.c b/shm.c +index 1f82cab..9447b63 100644 +--- a/shm.c ++++ b/shm.c +@@ -48,10 +48,11 @@ + * system shmget() may be performed without worry as there is no dynamic + * call chain. + */ ++#ifdef __GLIBC__ + extern void *dlsym (void *__restrict __handle, __const char *__restrict __name) + __attribute__((weak)) __THROW __nonnull ((2)); + extern char *dlerror (void) __attribute__((weak)) __THROW; +- ++#endif + + /* call syscall shmget through the generic syscall mechanism */ + static int syscall_shmget(key_t key, size_t size, int shmflg) +-- +2.25.1 + diff --git a/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0010-Include-dirent.h-for-ino_t.patch b/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0010-Include-dirent.h-for-ino_t.patch new file mode 100644 index 00000000..a530a526 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0010-Include-dirent.h-for-ino_t.patch @@ -0,0 +1,33 @@ +From ec9163c0436d1c77cecc941aca2e524b26001b15 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 21 Jun 2018 19:51:02 -0700 +Subject: [PATCH] Include dirent.h for ino_t + +Fixes +error: unknown type name 'ino_t'; did you mean 'int'? + +Upstream-Status: Pending + +Signed-off-by: Khem Raj + +Update for 2.22. +Signed-off-by: Zheng Ruoqin +--- + tests/hugetests.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/tests/hugetests.h b/tests/hugetests.h +index bc4e16a..fbe4dc0 100644 +--- a/tests/hugetests.h ++++ b/tests/hugetests.h +@@ -22,6 +22,7 @@ + + #include + #include ++#include + #include + + #include "libhugetlbfs_privutils.h" +-- +2.25.1 + diff --git a/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0011-include-limits.h-for-PATH_MAX.patch b/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0011-include-limits.h-for-PATH_MAX.patch new file mode 100644 index 00000000..08de396d --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0011-include-limits.h-for-PATH_MAX.patch @@ -0,0 +1,44 @@ +From 79b76433f4b6f2f14914817b7e8ac0db1df39250 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 21 Jun 2018 19:58:53 -0700 +Subject: [PATCH] include limits.h for PATH_MAX + +Fixes + +error: 'PATH_MAX' undeclared + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + hugeadm.c | 1 + + tests/gethugepagesizes.c | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/hugeadm.c b/hugeadm.c +index 79a4867..65d5136 100644 +--- a/hugeadm.c ++++ b/hugeadm.c +@@ -33,6 +33,7 @@ + #include + #include + #include ++#include + + #include + #include +diff --git a/tests/gethugepagesizes.c b/tests/gethugepagesizes.c +index 5777265..990db69 100644 +--- a/tests/gethugepagesizes.c ++++ b/tests/gethugepagesizes.c +@@ -29,6 +29,7 @@ + #include + #include + #include ++#include + + #include "hugetests.h" + +-- +2.25.1 + diff --git a/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0012-huge_page_setup_helper-use-python3-interpreter.patch b/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0012-huge_page_setup_helper-use-python3-interpreter.patch new file mode 100644 index 00000000..0583df95 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0012-huge_page_setup_helper-use-python3-interpreter.patch @@ -0,0 +1,29 @@ +From e5580e392b8764e1e6509c5a4ed13fb2ce7566b9 Mon Sep 17 00:00:00 2001 +From: Andrey Zhizhikin +Date: Mon, 27 Jan 2020 17:27:55 +0000 +Subject: [PATCH] huge_page_setup_helper: use python3 interpreter + +Setup helper script is already prepared to be used with python3, use the +interpreter explicitly. This removes dependency to python2 and will not +fail the QA check. + +Upstream-Status: Inappropriate [OE-specific] + +Signed-off-by: Andrey Zhizhikin +--- + huge_page_setup_helper.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/huge_page_setup_helper.py b/huge_page_setup_helper.py +index 01fc8dc..79a88ca 100755 +--- a/huge_page_setup_helper.py ++++ b/huge_page_setup_helper.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/python ++#!/usr/bin/env python3 + + # + # Tool to set up Linux large page support with minimal effort +-- +2.25.1 + diff --git a/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0013-elflink.c-include-libgen.h-for-basename.patch b/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0013-elflink.c-include-libgen.h-for-basename.patch new file mode 100644 index 00000000..264a535c --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0013-elflink.c-include-libgen.h-for-basename.patch @@ -0,0 +1,41 @@ +From 825444522d698991be04bbfa683a7cf785c6f72c Mon Sep 17 00:00:00 2001 +From: Yi Zhao +Date: Wed, 2 Oct 2024 00:06:34 +0800 +Subject: [PATCH] elflink.c: include libgen.h for basename + +Basename prototype has been removed from string.h from latest musl[1]. +Compilers e.g. clang-18 flags the absense of prototype as error. +Therefore include libgen.h for providing it. + +elflink.c: In function 'get_shared_file_name': +elflink.c:363:19: error: implicit declaration of function 'basename' [-Wimplicit-function-declaration] + 363 | binary2 = basename(binary); + | ^~~~~~~~ +elflink.c:363:17: error: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion] + 363 | binary2 = basename(binary); + | ^ + +[1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7 + +Upstream-Status: Pending + +Signed-off-by: Yi Zhao +--- + elflink.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/elflink.c b/elflink.c +index 278d338..0e78d61 100644 +--- a/elflink.c ++++ b/elflink.c +@@ -38,6 +38,7 @@ + #include + #include + #include ++#include + + #include "version.h" + #include "hugetlbfs.h" +-- +2.25.1 + diff --git a/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/libhugetlbfs-avoid-search-host-library-path-for-cros.patch b/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/libhugetlbfs-avoid-search-host-library-path-for-cros.patch deleted file mode 100644 index f95e9e85..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/libhugetlbfs-avoid-search-host-library-path-for-cros.patch +++ /dev/null @@ -1,97 +0,0 @@ -From 82a4f60ab24dff121f5f9d3bbcd9a8a28bb7caef Mon Sep 17 00:00:00 2001 -From: Chunrong Guo -Date: Sun, 8 Sep 2013 23:21:49 -0500 -Subject: [PATCH] libhugetlbfs: avoid search host library path for cross - compilation - -Upstream-Status: Inappropriate [oe-core specific] - -Signed-off-by: Chunrong Guo - ---- - ldscripts/elf32ppclinux.xB | 2 +- - ldscripts/elf32ppclinux.xBDT | 2 +- - ldscripts/elf64ppc.xB | 2 +- - ldscripts/elf64ppc.xBDT | 2 +- - ldscripts/elf_x86_64.xB | 2 +- - ldscripts/elf_x86_64.xBDT | 2 +- - 6 files changed, 6 insertions(+), 6 deletions(-) - -diff --git a/ldscripts/elf32ppclinux.xB b/ldscripts/elf32ppclinux.xB -index 28ad88d..33d482d 100644 ---- a/ldscripts/elf32ppclinux.xB -+++ b/ldscripts/elf32ppclinux.xB -@@ -3,7 +3,7 @@ OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", - "elf32-powerpc") - OUTPUT_ARCH(powerpc:common) - ENTRY(_start) --SEARCH_DIR("/usr/powerpc-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib"); -+/*SEARCH_DIR("/usr/powerpc-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib");*/ - INPUT(-lhugetlbfs); - PHDRS - { -diff --git a/ldscripts/elf32ppclinux.xBDT b/ldscripts/elf32ppclinux.xBDT -index 497882b..823475e 100644 ---- a/ldscripts/elf32ppclinux.xBDT -+++ b/ldscripts/elf32ppclinux.xBDT -@@ -3,7 +3,7 @@ OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", - "elf32-powerpc") - OUTPUT_ARCH(powerpc:common) - ENTRY(_start) --SEARCH_DIR("/usr/powerpc-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib"); -+/*SEARCH_DIR("/usr/powerpc-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib");*/ - INPUT(-lhugetlbfs); - PHDRS - { -diff --git a/ldscripts/elf64ppc.xB b/ldscripts/elf64ppc.xB -index 1a9c1ab..8cc557d 100644 ---- a/ldscripts/elf64ppc.xB -+++ b/ldscripts/elf64ppc.xB -@@ -3,7 +3,7 @@ OUTPUT_FORMAT("elf64-powerpc", "elf64-powerpc", - "elf64-powerpc") - OUTPUT_ARCH(powerpc:common64) - ENTRY(_start) --SEARCH_DIR("/usr/powerpc64-linux-gnu/lib64"); SEARCH_DIR("/usr/local/lib64"); SEARCH_DIR("/lib64"); SEARCH_DIR("/usr/lib64"); SEARCH_DIR("/usr/powerpc64-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib"); -+/*SEARCH_DIR("/usr/powerpc64-linux-gnu/lib64"); SEARCH_DIR("/usr/local/lib64"); SEARCH_DIR("/lib64"); SEARCH_DIR("/usr/lib64"); SEARCH_DIR("/usr/powerpc64-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib");*/ - INPUT(-lhugetlbfs); - PHDRS - { -diff --git a/ldscripts/elf64ppc.xBDT b/ldscripts/elf64ppc.xBDT -index 5477294..53e0749 100644 ---- a/ldscripts/elf64ppc.xBDT -+++ b/ldscripts/elf64ppc.xBDT -@@ -3,7 +3,7 @@ OUTPUT_FORMAT("elf64-powerpc", "elf64-powerpc", - "elf64-powerpc") - OUTPUT_ARCH(powerpc:common64) - ENTRY(_start) --SEARCH_DIR("/usr/powerpc64-linux-gnu/lib64"); SEARCH_DIR("/usr/local/lib64"); SEARCH_DIR("/lib64"); SEARCH_DIR("/usr/lib64"); SEARCH_DIR("/usr/powerpc64-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib"); -+/*SEARCH_DIR("/usr/powerpc64-linux-gnu/lib64"); SEARCH_DIR("/usr/local/lib64"); SEARCH_DIR("/lib64"); SEARCH_DIR("/usr/lib64"); SEARCH_DIR("/usr/powerpc64-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib");*/ - INPUT( -lhugetlbfs ); - PHDRS - { -diff --git a/ldscripts/elf_x86_64.xB b/ldscripts/elf_x86_64.xB -index ed21a2c..ba50e9f 100644 ---- a/ldscripts/elf_x86_64.xB -+++ b/ldscripts/elf_x86_64.xB -@@ -3,7 +3,7 @@ OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", - "elf64-x86-64") - OUTPUT_ARCH(i386:x86-64) - ENTRY(_start) --SEARCH_DIR("/usr/x86_64-linux-gnu/lib64"); SEARCH_DIR("/usr/local/lib64"); SEARCH_DIR("/lib64"); SEARCH_DIR("/usr/lib64"); SEARCH_DIR("/usr/x86_64-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib"); -+/*SEARCH_DIR("/usr/x86_64-linux-gnu/lib64"); SEARCH_DIR("/usr/local/lib64"); SEARCH_DIR("/lib64"); SEARCH_DIR("/usr/lib64"); SEARCH_DIR("/usr/x86_64-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib");*/ - INPUT(-lhugetlbfs); - /* Do we need any of these for elf? - __DYNAMIC = 0; */ -diff --git a/ldscripts/elf_x86_64.xBDT b/ldscripts/elf_x86_64.xBDT -index 1855202..c62d245 100644 ---- a/ldscripts/elf_x86_64.xBDT -+++ b/ldscripts/elf_x86_64.xBDT -@@ -3,7 +3,7 @@ OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", - "elf64-x86-64") - OUTPUT_ARCH(i386:x86-64) - ENTRY(_start) --SEARCH_DIR("/usr/x86_64-linux-gnu/lib64"); SEARCH_DIR("/usr/local/lib64"); SEARCH_DIR("/lib64"); SEARCH_DIR("/usr/lib64"); SEARCH_DIR("/usr/x86_64-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib"); -+/*SEARCH_DIR("/usr/x86_64-linux-gnu/lib64"); SEARCH_DIR("/usr/local/lib64"); SEARCH_DIR("/lib64"); SEARCH_DIR("/usr/lib64"); SEARCH_DIR("/usr/x86_64-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib");*/ - INPUT(-lhugetlbfs); - /* Do we need any of these for elf? - __DYNAMIC = 0; */ diff --git a/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/libhugetlbfs-elf_i386-avoid-search-host-library-path.patch b/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/libhugetlbfs-elf_i386-avoid-search-host-library-path.patch deleted file mode 100644 index 7cc180a4..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/libhugetlbfs-elf_i386-avoid-search-host-library-path.patch +++ /dev/null @@ -1,39 +0,0 @@ -From b5887693d90c430291b644c2f5713b5fdd1777ce Mon Sep 17 00:00:00 2001 -From: Jackie Huang -Date: Tue, 4 Nov 2014 00:49:11 -0800 -Subject: [PATCH] libhugetlbfs/elf_i386: avoid search host library path for - cross compilation - -Upstream-Status: Inappropriate [cross compile specific] - -Signed-off-by: Jackie Huang - ---- - ldscripts/elf_i386.xB | 1 - - ldscripts/elf_i386.xBDT | 1 - - 2 files changed, 2 deletions(-) - -diff --git a/ldscripts/elf_i386.xB b/ldscripts/elf_i386.xB -index 43fe51c..eae0fa8 100644 ---- a/ldscripts/elf_i386.xB -+++ b/ldscripts/elf_i386.xB -@@ -3,7 +3,6 @@ OUTPUT_FORMAT("elf32-i386", "elf32-i386", - "elf32-i386") - OUTPUT_ARCH(i386) - ENTRY(_start) --SEARCH_DIR("/usr/i486-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib"); - INPUT(-lhugetlbfs); - /* Do we need any of these for elf? - __DYNAMIC = 0; */ -diff --git a/ldscripts/elf_i386.xBDT b/ldscripts/elf_i386.xBDT -index d72aebe..3bac1b1 100644 ---- a/ldscripts/elf_i386.xBDT -+++ b/ldscripts/elf_i386.xBDT -@@ -3,7 +3,6 @@ OUTPUT_FORMAT("elf32-i386", "elf32-i386", - "elf32-i386") - OUTPUT_ARCH(i386) - ENTRY(_start) --SEARCH_DIR("/usr/i486-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib"); - INPUT(-lhugetlbfs); - /* Do we need any of these for elf? - __DYNAMIC = 0; */ diff --git a/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/skip-checking-LIB32-and-LIB64-if-they-point-to-the-s.patch b/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/skip-checking-LIB32-and-LIB64-if-they-point-to-the-s.patch deleted file mode 100644 index a13c5389..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/skip-checking-LIB32-and-LIB64-if-they-point-to-the-s.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 183a4dafe141197de5840f2e48c266ef209307aa Mon Sep 17 00:00:00 2001 -From: Ting Liu -Date: Mon, 18 Jun 2012 16:37:05 +0800 -Subject: [PATCH] skip checking LIB32 and LIB64 if they point to the same place - -Upstream-Status: Inappropriate [oe-core specific] -Signed-off-by: Ting Liu - ---- - Makefile | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/Makefile b/Makefile -index 51e41f0..373df3c 100644 ---- a/Makefile -+++ b/Makefile -@@ -177,7 +177,6 @@ REALLIB32 = $(realpath $(PREFIX)/$(LIB32)) - REALLIB64 = $(realpath $(PREFIX)/$(LIB64)) - ifneq ($(realpath $(PREFIX)),) - ifeq ($(REALLIB32),$(REALLIB64)) --$(error LIB32 ($(PREFIX)/$(LIB32) to $(REALLIB32)) and LIB64 ($(PREFIX)/$(LIB64) to $(REALLIB64)) are resolving to the same place. Manually specify LIB32 and LIB64. e.g. make PREFIX=$(PREFIX) LIB32=lib32 LIB64=lib64) - endif - endif - diff --git a/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/tests-Makefile-install-static-4G-edge-testcases.patch b/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/tests-Makefile-install-static-4G-edge-testcases.patch deleted file mode 100644 index b8b2f8e6..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/tests-Makefile-install-static-4G-edge-testcases.patch +++ /dev/null @@ -1,28 +0,0 @@ -From f1ad8ff887f16daee8d06eca3df0f2541bfdaac0 Mon Sep 17 00:00:00 2001 -From: Ting Liu -Date: Mon, 23 Sep 2013 08:00:55 +0000 -Subject: [PATCH] libhugetlbfs: add recipe - -Upstream-Status: Submitted - -TESTS_64 is empty, install will fail due to missing file operand - -Signed-off-by: Ting Liu - ---- - tests/Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tests/Makefile b/tests/Makefile -index 073df96..0ca3716 100644 ---- a/tests/Makefile -+++ b/tests/Makefile -@@ -295,7 +295,7 @@ obj64/install: - $(INSTALL) -m 755 wrapper-utils.sh $(DESTDIR)$(INST_TESTSDIR64)/obj64 - $(INSTALL) -m 755 $(HELPERS:%=obj64/%) $(DESTDIR)$(INST_TESTSDIR64)/obj64 - $(INSTALL) -m 755 $(HELPER_LIBS:%=obj64/%) $(DESTDIR)$(INST_TESTSDIR64)/obj64 -- $(INSTALL) -m 755 $(TESTS_64:%=obj64/%) $(DESTDIR)$(INST_TESTSDIR64)/obj64 -+ $(INSTALL) -m 755 $(TESTS_64_STATIC:%=obj64/%_static) $(DESTDIR)$(INST_TESTSDIR64)/obj64 - $(INSTALL) -m 755 run_tests.py $(DESTDIR)$(INST_TESTSDIR64) - - install: $(OBJDIRS:%=%/install) diff --git a/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_2.24.bb b/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_2.24.bb new file mode 100644 index 00000000..d82e03e8 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_2.24.bb @@ -0,0 +1,87 @@ +SUMMARY = "A library which provides easy access to huge pages of memory" +HOMEPAGE = "https://github.com/libhugetlbfs/libhugetlbfs" +LICENSE = "LGPL-2.1-only" +LIC_FILES_CHKSUM = "file://LGPL-2.1;md5=2d5025d4aa3495befef8f17206a5b0a1" + +DEPENDS = "sysfsutils" +RDEPENDS:${PN} += "bash python3-core" +RDEPENDS:${PN}-tests += "bash python3-core python3-resource" + +PE = "1" + +SRCREV = "1322884fb0d55dc55f53563c1aa6328d118997e7" +SRC_URI = " \ + git://github.com/libhugetlbfs/libhugetlbfs.git;protocol=https;branch=master \ + file://0001-skip-checking-LIB32-and-LIB64-if-they-point-to-the-s.patch \ + file://0002-libhugetlbfs-avoid-search-host-library-path-for-cros.patch \ + file://0003-tests-Makefile-install-static-4G-edge-testcases.patch \ + file://0004-run_test.py-not-use-hard-coded-path-.-obj-hugeadm.patch \ + file://0005-libhugetlbfs-elf_i386-avoid-search-host-library-path.patch \ + file://0006-include-stddef.h-for-ptrdiff_t.patch \ + file://0007-Mark-glibc-specific-code-so.patch \ + file://0008-alloc.c-Avoid-sysconf-_SC_LEVEL2_CACHE_LINESIZE-on-l.patch \ + file://0009-shm.c-Mark-glibc-specific-changes-so.patch \ + file://0010-Include-dirent.h-for-ino_t.patch \ + file://0011-include-limits.h-for-PATH_MAX.patch \ + file://0012-huge_page_setup_helper-use-python3-interpreter.patch \ + file://0013-elflink.c-include-libgen.h-for-basename.patch \ +" + +UPSTREAM_CHECK_GITTAGREGEX = "(?P\d+(\.\d+)+)" + +S = "${WORKDIR}/git" + +COMPATIBLE_HOST = "(i.86|x86_64|powerpc|powerpc64|aarch64|arm).*-linux*" + +LIBARGS = "LIB32=${baselib} LIB64=${baselib}" +LIBHUGETLBFS_ARCH = "${TARGET_ARCH}" +LIBHUGETLBFS_ARCH:powerpc = "ppc" +LIBHUGETLBFS_ARCH:powerpc64 = "ppc64" +LIBHUGETLBFS_ARCH:powerpc64le = "ppc64le" +EXTRA_OEMAKE = "'ARCH=${LIBHUGETLBFS_ARCH}' 'OPT=${CFLAGS}' 'CC=${CC}' ${LIBARGS} BUILDTYPE=NATIVEONLY V=2" +PARALLEL_MAKE = "" +CFLAGS += "-fexpensive-optimizations -frename-registers -fomit-frame-pointer -g0" + +export HUGETLB_LDSCRIPT_PATH="${S}/ldscripts" + +TARGET_CC_ARCH += "${LDFLAGS}" + +LDFLAGS += "-B${S}" + +inherit autotools-brokensep cpan-base + +#The CUSTOM_LDSCRIPTS doesn't work with the gold linker +do_configure:prepend() { + if [ "${@bb.utils.filter('DISTRO_FEATURES', 'ld-is-gold', d)}" ]; then + sed -i 's/CUSTOM_LDSCRIPTS = yes/CUSTOM_LDSCRIPTS = no/' Makefile.in + fi + + ln -sf ld.hugetlbfs ${S}/ld + ln -sf ld.hugetlbfs ${S}/ld.bfd + ln -sf ld.hugetlbfs ${S}/ld.gold + ln -sf ld.hugetlbfs ${S}/ld.lld +} + +do_install() { + oe_runmake PREFIX=${prefix} DESTDIR=${D} \ + INST_TESTSDIR32=${libdir}/libhugetlbfs/tests \ + INST_TESTSDIR64=${libdir}/libhugetlbfs/tests \ + install-tests + + sed -i \ + -e 's|${RECIPE_SYSROOT_NATIVE}||g' \ + -e 's|${RECIPE_SYSROOT}||g' \ + -e 's|${S}||g' \ + `find ${D}${libdir}/libhugetlbfs/tests -name dummy.ldscript` +} + +PACKAGES =+ "${PN}-tests " +FILES:${PN} += "${libdir}/*.so" +FILES:${PN}-dev = "${includedir}" +FILES:${PN}-dbg += "${libdir}/libhugetlbfs/tests/obj32/.debug ${libdir}/libhugetlbfs/tests/obj64/.debug" +FILES:${PN}-tests += "${libdir}/libhugetlbfs/tests" + +INSANE_SKIP:${PN} = "dev-so" + +INHIBIT_PACKAGE_STRIP = "1" +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" diff --git a/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb b/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb deleted file mode 100644 index 80af9873..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb +++ /dev/null @@ -1,79 +0,0 @@ -SUMMARY = "A library which provides easy access to huge pages of memory" -HOMEPAGE = "https://github.com/libhugetlbfs/libhugetlbfs" -LICENSE = "LGPL-2.1-only" -LIC_FILES_CHKSUM = "file://LGPL-2.1;md5=2d5025d4aa3495befef8f17206a5b0a1" - -DEPENDS = "sysfsutils" -RDEPENDS:${PN} += "bash python3-core" -RDEPENDS:${PN}-tests += "bash python3-core" - -PV = "2.23" -PE = "1" - -SRCREV = "6b126a4d7da9490fa40fe7e1b962edcb939feddc" -SRC_URI = " \ - git://github.com/libhugetlbfs/libhugetlbfs.git;protocol=https;branch=master \ - file://skip-checking-LIB32-and-LIB64-if-they-point-to-the-s.patch \ - file://libhugetlbfs-avoid-search-host-library-path-for-cros.patch \ - file://tests-Makefile-install-static-4G-edge-testcases.patch \ - file://0001-run_test.py-not-use-hard-coded-path-.-obj-hugeadm.patch \ - file://libhugetlbfs-elf_i386-avoid-search-host-library-path.patch \ - file://0001-include-stddef.h-for-ptrdiff_t.patch \ - file://0002-Mark-glibc-specific-code-so.patch \ - file://0003-alloc.c-Avoid-sysconf-_SC_LEVEL2_CACHE_LINESIZE-on-l.patch \ - file://0004-shm.c-Mark-glibc-specific-changes-so.patch \ - file://0005-Include-dirent.h-for-ino_t.patch \ - file://0006-include-limits.h-for-PATH_MAX.patch \ - file://0001-huge_page_setup_helper-use-python3-interpreter.patch \ - file://0001-Revert-ld.hugetlbfs-fix-Ttext-segment-argument-on-AA.patch \ - file://0001-tests-makefile-Append-CPPFLAGS-rather-then-override.patch \ -" - -UPSTREAM_CHECK_GITTAGREGEX = "(?P\d+(\.\d+)+)" - -S = "${WORKDIR}/git" - -COMPATIBLE_HOST = "(i.86|x86_64|powerpc|powerpc64|aarch64|arm).*-linux*" - -LIBARGS = "LIB32=${baselib} LIB64=${baselib}" -LIBHUGETLBFS_ARCH = "${TARGET_ARCH}" -LIBHUGETLBFS_ARCH:powerpc = "ppc" -LIBHUGETLBFS_ARCH:powerpc64 = "ppc64" -LIBHUGETLBFS_ARCH:powerpc64le = "ppc64le" -EXTRA_OEMAKE = "'ARCH=${LIBHUGETLBFS_ARCH}' 'OPT=${CFLAGS}' 'CC=${CC}' ${LIBARGS} BUILDTYPE=NATIVEONLY V=2" -PARALLEL_MAKE = "" -CFLAGS += "-fexpensive-optimizations -frename-registers -fomit-frame-pointer -g0" - -export HUGETLB_LDSCRIPT_PATH="${S}/ldscripts" - -TARGET_CC_ARCH += "${LDFLAGS}" - -#The CUSTOM_LDSCRIPTS doesn't work with the gold linker -inherit cpan-base -do_configure() { - if [ "${@bb.utils.filter('DISTRO_FEATURES', 'ld-is-gold', d)}" ]; then - sed -i 's/CUSTOM_LDSCRIPTS = yes/CUSTOM_LDSCRIPTS = no/' Makefile - fi -} - -do_install() { - oe_runmake PREFIX=${prefix} DESTDIR=${D} \ - INST_TESTSDIR32=${libdir}/libhugetlbfs/tests \ - INST_TESTSDIR64=${libdir}/libhugetlbfs/tests \ - install-tests -} - - -PACKAGES =+ "${PN}-tests " -FILES:${PN} += "${libdir}/*.so" -FILES:${PN}-dev = "${includedir}" -FILES:${PN}-dbg += "${libdir}/libhugetlbfs/tests/obj32/.debug ${libdir}/libhugetlbfs/tests/obj64/.debug" -FILES:${PN}-tests += "${libdir}/libhugetlbfs/tests" - -INSANE_SKIP:${PN} = "dev-so" - -INHIBIT_PACKAGE_STRIP = "1" -INHIBIT_PACKAGE_DEBUG_SPLIT = "1" - -# see https://github.com/libhugetlbfs/libhugetlbfs/issues/52 -SKIP_RECIPE[libhugetlbfs] ?= "Needs porting to glibc 2.34+" diff --git a/sources/meta-openembedded/meta-oe/recipes-benchmark/linpack/linpack_1.0.bb b/sources/meta-openembedded/meta-oe/recipes-benchmark/linpack/linpack_1.0.bb index 603004dd..a0327ee1 100644 --- a/sources/meta-openembedded/meta-oe/recipes-benchmark/linpack/linpack_1.0.bb +++ b/sources/meta-openembedded/meta-oe/recipes-benchmark/linpack/linpack_1.0.bb @@ -2,7 +2,7 @@ DESCRIPTION = "LINPACK Benchmarks are a measure of a system's floating point com SUMMARY = "LINPACK is a software library for performing numerical linear algebra on digital computers" LICENSE = "PD" -LIC_FILES_CHKSUM ="file://${WORKDIR}/linpacknew.c;beginline=1;endline=23;md5=aa025e3bc44190c71e4c5e3b084fed87" +LIC_FILES_CHKSUM ="file://${UNPACKDIR}/linpacknew.c;beginline=1;endline=23;md5=aa025e3bc44190c71e4c5e3b084fed87" SRC_URI = "http://www.netlib.org/benchmark/linpackc.new;downloadfilename=linpacknew.c \ file://0001-linpack-Define-DP-only-when-SP-is-not-defined.patch \ @@ -10,7 +10,8 @@ SRC_URI = "http://www.netlib.org/benchmark/linpackc.new;downloadfilename=linpack SRC_URI[md5sum] = "1c5d0b6a31264685d2e651c920e3cdf4" SRC_URI[sha256sum] = "a63f2ec86512959f1fd926bfafb85905b2d7b7402942ffae3af374d48745e97e" -S = "${WORKDIR}" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" do_compile () { ${CC} ${CFLAGS} ${LDFLAGS} -DDP -o linpack_dp linpacknew.c -lm diff --git a/sources/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb b/sources/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb index 57f73eed..6729e81f 100644 --- a/sources/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb +++ b/sources/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb @@ -75,7 +75,7 @@ do_install () { DESTDIR="${D}" \ -C src install mv ${D}${bindir}/line ${D}${bindir}/lm_line - install -m 0755 ${WORKDIR}/lmbench-run ${D}${bindir}/ + install -m 0755 ${UNPACKDIR}/lmbench-run ${D}${bindir}/ install -m 0755 ${S}/bin/${TARGET_SYS}/cache ${D}${bindir}/ sed -i -e 's,^SHAREDIR=.*$,SHAREDIR=${datadir}/${BPN},;' \ -e 's,^CONFIG=.*$,CONFIG=`$SCRIPTSDIR/config`,;' \ diff --git a/sources/meta-openembedded/meta-oe/recipes-benchmark/s-suite/s-suite_git.bb b/sources/meta-openembedded/meta-oe/recipes-benchmark/s-suite/s-suite_git.bb index 629b1230..2cfeb724 100644 --- a/sources/meta-openembedded/meta-oe/recipes-benchmark/s-suite/s-suite_git.bb +++ b/sources/meta-openembedded/meta-oe/recipes-benchmark/s-suite/s-suite_git.bb @@ -6,6 +6,10 @@ SRCREV = "f97f1ae321d1fb8111a2c638075702ed2512ff07" PV = "3.6" SRC_URI = "git://github.com/Algodev-github/S.git;protocol=https;branch=master" +# Current PV is not a git tag but a Readme content, track commits to detect +# upstream updates +UPSTREAM_CHECK_COMMITS = "1" + S = "${WORKDIR}/git" # installing in /opt/S-suite since the package has diff --git a/sources/meta-openembedded/meta-oe/recipes-benchmark/whetstone/whetstone_1.2.bb b/sources/meta-openembedded/meta-oe/recipes-benchmark/whetstone/whetstone_1.2.bb index 8fad04e3..ce28fc73 100644 --- a/sources/meta-openembedded/meta-oe/recipes-benchmark/whetstone/whetstone_1.2.bb +++ b/sources/meta-openembedded/meta-oe/recipes-benchmark/whetstone/whetstone_1.2.bb @@ -2,13 +2,14 @@ DESCRIPTION = "Whetstone benchmark is a synthetic benchmark for evaluating the p SUMMARY = "CPU benchmark to measure floating point performance" LICENSE = "PD" -LIC_FILES_CHKSUM ="file://${WORKDIR}/whetstone.c;beginline=1;endline=52;md5=c795edc15e7e1d92ca8f88ad718449f5" +LIC_FILES_CHKSUM ="file://${UNPACKDIR}/whetstone.c;beginline=1;endline=52;md5=c795edc15e7e1d92ca8f88ad718449f5" SRC_URI = "http://www.netlib.org/benchmark/whetstone.c" SRC_URI[md5sum] = "d8eb2cd7104bb5a12d614ac6d3f1f9fb" SRC_URI[sha256sum] = "333e4ceca042c146f63eec605573d16ae8b07166cbc44a17bec1ea97c6f1efbf" -S = "${WORKDIR}" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" do_compile () { ${CC} ${CFLAGS} ${LDFLAGS} -Ofast -o whetstone whetstone.c -lm diff --git a/sources/meta-openembedded/meta-oe/recipes-bsp/acpitool/acpitool_0.5.1.bb b/sources/meta-openembedded/meta-oe/recipes-bsp/acpitool/acpitool_0.5.1.bb index b392581e..db862c89 100644 --- a/sources/meta-openembedded/meta-oe/recipes-bsp/acpitool/acpitool_0.5.1.bb +++ b/sources/meta-openembedded/meta-oe/recipes-bsp/acpitool/acpitool_0.5.1.bb @@ -11,3 +11,5 @@ inherit autotools SRC_URI[md5sum] = "9e4ec55201be0be71ffbc56d38b42b57" SRC_URI[sha256sum] = "004fb6cd43102918b6302cf537a2db7ceadda04aef2e0906ddf230f820dad34f" + +UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/acpitool/files/acpitool/" diff --git a/sources/meta-openembedded/meta-oe/recipes-bsp/con2fbmap/con2fbmap_git.bb b/sources/meta-openembedded/meta-oe/recipes-bsp/con2fbmap/con2fbmap_git.bb index 302a61e8..b623d052 100644 --- a/sources/meta-openembedded/meta-oe/recipes-bsp/con2fbmap/con2fbmap_git.bb +++ b/sources/meta-openembedded/meta-oe/recipes-bsp/con2fbmap/con2fbmap_git.bb @@ -13,6 +13,9 @@ SRC_URI = "git://gitlab.com/pibox/con2fbmap.git;protocol=https;branch=master \ file://0001-con2fbmap-Add-missing-include-on-string.h.patch \ " +# Upstream repo does not tag +UPSTREAM_CHECK_COMMITS = "1" + S = "${WORKDIR}/git" inherit autotools diff --git a/sources/meta-openembedded/meta-oe/recipes-bsp/cpufrequtils/cpufrequtils_008.bb b/sources/meta-openembedded/meta-oe/recipes-bsp/cpufrequtils/cpufrequtils_008.bb index cb62ee46..fbe94837 100644 --- a/sources/meta-openembedded/meta-oe/recipes-bsp/cpufrequtils/cpufrequtils_008.bb +++ b/sources/meta-openembedded/meta-oe/recipes-bsp/cpufrequtils/cpufrequtils_008.bb @@ -14,6 +14,9 @@ SRC_URI = "git://github.com/emagii/cpufrequtils.git;branch=master;protocol=https file://0001-dont-unset-cflags.patch \ " +# Upstream repo does not tag +UPSTREAM_CHECK_COMMITS = "1" + EXTRA_OEMAKE:append = " ${@['', 'NLS=false']['${USE_NLS}' == 'no']} " diff --git a/sources/meta-openembedded/meta-oe/recipes-bsp/dediprog-flasher/dediprog-flasher/0001-add-support-for-cross-compilation.patch b/sources/meta-openembedded/meta-oe/recipes-bsp/dediprog-flasher/dediprog-flasher/0001-add-support-for-cross-compilation.patch new file mode 100644 index 00000000..fbc0f5a1 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-bsp/dediprog-flasher/dediprog-flasher/0001-add-support-for-cross-compilation.patch @@ -0,0 +1,21 @@ +Author: Maciej Pijanowski +Date: Fri Jul 5 16:39:13 2024 +0200 +Upstream-Status: Submitted [https://github.com/DediProgSW/SF100Linux/pull/86] + + Makefile: allow overriding CC + + Signed-off-by: Maciej Pijanowski + +diff --git a/Makefile b/Makefile +index 139e5c0c3c3c..226303a6921e 100644 +--- a/Makefile ++++ b/Makefile +@@ -12,7 +12,7 @@ endif + endif + + PROGRAM = dpcmd +-CC = gcc ++CC ?= gcc + PREFIX ?= /usr/local + + PKG_CONFIG ?= pkg-config diff --git a/sources/meta-openembedded/meta-oe/recipes-bsp/dediprog-flasher/dediprog-flasher/0002-Makefile-add-conditional-stripping.patch b/sources/meta-openembedded/meta-oe/recipes-bsp/dediprog-flasher/dediprog-flasher/0002-Makefile-add-conditional-stripping.patch new file mode 100644 index 00000000..0fc8ac5b --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-bsp/dediprog-flasher/dediprog-flasher/0002-Makefile-add-conditional-stripping.patch @@ -0,0 +1,39 @@ +From dac9d0ea5c419049c9ab0a5ba90d15d77a3271b0 Mon Sep 17 00:00:00 2001 +From: Tymoteusz Burak +Date: Mon, 22 Jul 2024 13:02:59 +0000 +Subject: [PATCH] Makefile: add conditional stripping +Upstream-Status: Submitted [https://github.com/DediProgSW/SF100Linux/pull/88] + +This patch introduces a `NOSTRIP` conditional flag to the `install` +target in the Makefile. The purpose of this flag is to allow the +disabling of binary stripping during installation. This is +particularly useful in development environments, such as BitBake, +which handle stripping internally. + +When `NOSTRIP` is set to `1`, the `strip` command will be skipped +during the installation process, preventing potential conflicts or +redundant operations. + +Signed-off-by: Tymoteusz Burak + +--- + Makefile | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/Makefile b/Makefile +index 139e5c0..8b33320 100644 +--- a/Makefile ++++ b/Makefile +@@ -58,7 +58,9 @@ install: $(PROGRAM) + [ $(shell id -u) -eq 0 ] || (echo "Error: install needs root privileges" && false) + install -v -o 0 -g 0 -m 755 -d $(DESTDIR)$(PREFIX)/bin $(DESTDIR)$(PREFIX)/share/DediProg + echo -n "install: " && install -v -o 0 -g 0 -m 0755 $(PROGRAM) $(DESTDIR)$(PREFIX)/bin/$(PROGRAM) ++ifneq ($(NOSTRIP),1) + strip $(DESTDIR)$(PREFIX)/bin/$(PROGRAM) ++endif + install -v -o 0 -g 0 -m 755 -d $(DESTDIR)$(PREFIX)/share/DediProg + echo -n "install: " && install -v -o 0 -g 0 -m 0644 ChipInfoDb.dedicfg $(DESTDIR)$(PREFIX)/share/DediProg/ChipInfoDb.dedicfg + install -v -o 0 -g 0 -m 755 -d $(DESTDIR)/etc/udev/rules.d +-- +2.30.2 + diff --git a/sources/meta-openembedded/meta-oe/recipes-bsp/dediprog-flasher/dediprog-flasher_1.14.20.bb b/sources/meta-openembedded/meta-oe/recipes-bsp/dediprog-flasher/dediprog-flasher_1.14.20.bb new file mode 100644 index 00000000..83a88ab7 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-bsp/dediprog-flasher/dediprog-flasher_1.14.20.bb @@ -0,0 +1,29 @@ +DESCRIPTION = "Linux software for Dediprog SF100 and SF600 SPI flash programmers" +SECTION = "devel" +LICENSE = "GPL-2.0-or-later" +LIC_FILES_CHKSUM = "file://LICENSE;md5=a23a74b3f4caf9616230789d94217acb" + +DEPENDS = "libusb" + +SRCREV = "e691f2d432144e3dbc82e9e0eea1ebaed4f3becf" +SRC_URI = " \ + git://github.com/DediProgSW/SF100Linux.git;protocol=https;branch=master \ + file://0001-add-support-for-cross-compilation.patch \ + file://0002-Makefile-add-conditional-stripping.patch \ + " + +EXTRA_OEMAKE = "NOSTRIP=1" + +PV = "1.0+${SRCPV}" + +S = "${WORKDIR}/git" + +do_install () { + oe_runmake DESTDIR=${D} PREFIX=/usr install +} + +FILES:${PN} += " \ + ${datadir}/DediProg \ +" + +inherit pkgconfig diff --git a/sources/meta-openembedded/meta-oe/recipes-bsp/edac-utils/edac-utils_git.bb b/sources/meta-openembedded/meta-oe/recipes-bsp/edac-utils/edac-utils_git.bb index 03076cbc..6c80f4c8 100644 --- a/sources/meta-openembedded/meta-oe/recipes-bsp/edac-utils/edac-utils_git.bb +++ b/sources/meta-openembedded/meta-oe/recipes-bsp/edac-utils/edac-utils_git.bb @@ -48,7 +48,7 @@ RDEPENDS:${PN}:append = " \ do_install:append() { install -d ${D}${systemd_unitdir}/system - install -m 644 ${WORKDIR}/edac.service ${D}/${systemd_unitdir}/system + install -m 644 ${UNPACKDIR}/edac.service ${D}/${systemd_unitdir}/system sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}/${systemd_unitdir}/system/edac.service } diff --git a/sources/meta-openembedded/meta-oe/recipes-bsp/firmwared/firmwared_git.bb b/sources/meta-openembedded/meta-oe/recipes-bsp/firmwared/firmwared_git.bb index 0a041835..2b7ed256 100644 --- a/sources/meta-openembedded/meta-oe/recipes-bsp/firmwared/firmwared_git.bb +++ b/sources/meta-openembedded/meta-oe/recipes-bsp/firmwared/firmwared_git.bb @@ -13,6 +13,9 @@ SRC_URI = "git://github.com/teg/firmwared.git;branch=master;protocol=https \ PV = "0+git" SRCREV = "2e6b5db43d63a5c0283a4cae9a6a20b7ad107a04" +# Upstream repo does not tag +UPSTREAM_CHECK_COMMITS = "1" + S = "${WORKDIR}/git" DEPENDS = "glib-2.0 systemd" @@ -29,6 +32,6 @@ do_configure:prepend() { do_install:append() { install -d ${D}${systemd_system_unitdir} - install -m 0644 ${WORKDIR}/firmwared.service ${D}${systemd_system_unitdir} + install -m 0644 ${UNPACKDIR}/firmwared.service ${D}${systemd_system_unitdir} sed -i -e 's,@BINDIR@,${bindir},g' ${D}${systemd_system_unitdir}/firmwared.service } diff --git a/sources/meta-openembedded/meta-oe/recipes-bsp/fwupd/fwupd-efi/0001-efi-generate_binary.py-Use-env-to-detect-python3.patch b/sources/meta-openembedded/meta-oe/recipes-bsp/fwupd/fwupd-efi/0001-efi-generate_binary.py-Use-env-to-detect-python3.patch new file mode 100644 index 00000000..c3626814 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-bsp/fwupd/fwupd-efi/0001-efi-generate_binary.py-Use-env-to-detect-python3.patch @@ -0,0 +1,23 @@ +From 4c8f95fedecbc590eb7cd98aaf97912fa36b8f2e Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 7 Jun 2024 23:58:36 -0700 +Subject: [PATCH] efi/generate_binary.py: Use env to detect python3 + +This enables python3 from native sysroot correctly + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- + efi/generate_binary.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/efi/generate_binary.py b/efi/generate_binary.py +index 443472a..a4611bb 100755 +--- a/efi/generate_binary.py ++++ b/efi/generate_binary.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/python3 ++#!/usr/bin/env python3 + # + # Copyright (C) 2021 Javier Martinez Canillas + # Copyright (C) 2021 Richard Hughes diff --git a/sources/meta-openembedded/meta-oe/recipes-bsp/fwupd/fwupd-efi/cc.patch b/sources/meta-openembedded/meta-oe/recipes-bsp/fwupd/fwupd-efi/cc.patch deleted file mode 100644 index 6fd2eca9..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-bsp/fwupd/fwupd-efi/cc.patch +++ /dev/null @@ -1,53 +0,0 @@ -Change the efi-cc argument to take an array, so that we can pass compiler flags -such as --sysroot. - -In the long term changing the fwupd-efi build to use the standard Meson -CC/LD/etc would be the preferred fix. - -Upstream-Status: Inappropriate [better fix in progress] -Signed-off-by: Ross Burton - -diff --git a/efi/generate_sbat.py b/efi/generate_sbat.py -index e42b365..4831a48 100755 ---- a/efi/generate_sbat.py -+++ b/efi/generate_sbat.py -@@ -7,6 +7,7 @@ - # - # pylint: disable=missing-docstring, invalid-name - -+import shlex - import subprocess - import sys - import argparse -@@ -19,7 +20,7 @@ def _generate_sbat(args): - FWUPD_URL = "https://github.com/fwupd/fwupd-efi" - - subprocess.run( -- [args.cc, "-x", "c", "-c", "-o", args.outfile, "/dev/null"], check=True -+ shlex.split(args.cc) + ["-x", "c", "-c", "-o", args.outfile, "/dev/null"], check=True - ) - - # not specified -diff --git a/efi/meson.build b/efi/meson.build -index 68ea4aa..dcf0d43 100644 ---- a/efi/meson.build -+++ b/efi/meson.build -@@ -187,7 +187,7 @@ o_file5 = custom_target('fwup-sbat.o', - command : [ - generate_sbat, - '@OUTPUT@', -- '--cc', efi_cc, -+ '--cc', ' '.join(efi_cc), - '--objcopy', objcopy, - '--project-name', meson.project_name(), - '--project-version', meson.project_version(), -diff --git a/meson_options.txt b/meson_options.txt -index d869cd2..17ef7fb 100644 ---- a/meson_options.txt -+++ b/meson_options.txt -@@ -1,4 +1,4 @@ --option('efi-cc', type : 'string', value : 'gcc', description : 'the compiler to use for EFI modules') -+option('efi-cc', type : 'array', value : ['gcc'], description : 'the compiler to use for EFI modules') - option('efi-ld', type : 'string', value : 'ld', description : 'the linker to use for EFI modules') - option('efi-libdir', type : 'string', description : 'path to the EFI lib directory') - option('efi-ldsdir', type : 'string', description : 'path to the EFI lds directory') diff --git a/sources/meta-openembedded/meta-oe/recipes-bsp/fwupd/fwupd-efi_1.3.bb b/sources/meta-openembedded/meta-oe/recipes-bsp/fwupd/fwupd-efi_1.3.bb deleted file mode 100644 index b53cabea..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-bsp/fwupd/fwupd-efi_1.3.bb +++ /dev/null @@ -1,33 +0,0 @@ -SUMMARY = "EFI executable for fwupd" -LICENSE = "LGPL-2.1-or-later" -LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" - -SRC_URI = "git://github.com/fwupd/fwupd-efi;protocol=https;branch=main \ - file://cc.patch" -SRCREV = "36ce593f58e391cca43fd388824496ff98d83480" -S = "${WORKDIR}/git" - -DEPENDS = "gnu-efi" - -COMPATIBLE_HOST = "(x86_64.*|i.86.*|aarch64.*|arm.*)-linux" - -inherit meson - -# These should be configured as needed -SBAT_DISTRO_ID ?= "${DISTRO}" -SBAT_DISTRO_SUMMARY ?= "${DISTRO_NAME}" -SBAT_DISTRO_URL ?= "" - -EXTRA_OEMESON += "-Defi-cc="${@meson_array('CC', d)}" \ - -Defi-ld='${HOST_PREFIX}ld' \ - -Defi-includedir=${STAGING_INCDIR}/efi \ - -Defi-libdir=${STAGING_LIBDIR} \ - -Defi_sbat_distro_id='${SBAT_DISTRO_ID}' \ - -Defi_sbat_distro_summary='${SBAT_DISTRO_SUMMARY}' \ - -Defi_sbat_distro_url='${SBAT_DISTRO_URL}' \ - -Defi_sbat_distro_pkgname='${PN}' \ - -Defi_sbat_distro_version='${PV}'\ - " - -# The compile assumes GCC at present -TOOLCHAIN = "gcc" diff --git a/sources/meta-openembedded/meta-oe/recipes-bsp/fwupd/fwupd-efi_1.6.bb b/sources/meta-openembedded/meta-oe/recipes-bsp/fwupd/fwupd-efi_1.6.bb new file mode 100644 index 00000000..d72f2d9c --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-bsp/fwupd/fwupd-efi_1.6.bb @@ -0,0 +1,39 @@ +SUMMARY = "EFI executable for fwupd" +LICENSE = "LGPL-2.1-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" + +SRC_URI = "git://github.com/fwupd/fwupd-efi;protocol=https;branch=main \ + file://0001-efi-generate_binary.py-Use-env-to-detect-python3.patch" + +SRCREV = "58a2928f778278ab1f7f8fcddbab81ba587a8962" +S = "${WORKDIR}/git" + +DEPENDS = "gnu-efi python3-pefile-native" + +COMPATIBLE_HOST = "(x86_64.*|i.86.*|aarch64.*|arm.*)-linux" + +inherit meson pkgconfig python3native + +# These should be configured as needed +SBAT_DISTRO_ID ?= "${DISTRO}" +SBAT_DISTRO_SUMMARY ?= "${DISTRO_NAME}" +SBAT_DISTRO_URL ?= "" + +EXTRA_OEMESON += "\ + -Defi-includedir=${STAGING_INCDIR}/efi \ + -Defi-libdir=${STAGING_LIBDIR} \ + -Defi_sbat_distro_id='${SBAT_DISTRO_ID}' \ + -Defi_sbat_distro_summary='${SBAT_DISTRO_SUMMARY}' \ + -Defi_sbat_distro_url='${SBAT_DISTRO_URL}' \ + -Defi_sbat_distro_pkgname='${PN}' \ + -Defi_sbat_distro_version='${PV}'\ + " + +# The compile assumes GCC at present +TOOLCHAIN = "gcc" + +# Multiple errors like below with gcc14 +#| ../git/efi/fwupdate.c:611:20: error: passing argument 5 of 'fwup_log' from incompatible pointer type [-Wincompatible-pointer-types] +#| 611 | fwup_debug(L"n_updates: %d", n_updates); +#| | ^~~~~~~~~~~~~~~~ +TOOLCHAIN_OPTIONS += "-Wno-error=incompatible-pointer-types" diff --git a/sources/meta-openembedded/meta-oe/recipes-bsp/fwupd/fwupd_1.9.18.bb b/sources/meta-openembedded/meta-oe/recipes-bsp/fwupd/fwupd_1.9.18.bb deleted file mode 100644 index a98ed67f..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-bsp/fwupd/fwupd_1.9.18.bb +++ /dev/null @@ -1,144 +0,0 @@ -SUMMARY = "A simple daemon to allow session software to update firmware" -LICENSE = "LGPL-2.1-or-later" -LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" - -DEPENDS = "glib-2.0 libxmlb json-glib libjcat gcab vala-native python3-jinja2-native" - -SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/${PV}/${BP}.tar.xz \ - file://run-ptest" -SRC_URI[sha256sum] = "4e554f77a8a73383a41d5637b62e6c8a8936e66cd1d18585baf29d7fe47fc4d7" - -UPSTREAM_CHECK_URI = "https://github.com/${BPN}/${BPN}/releases" - -# Machine-specific as we examine MACHINE_FEATURES to decide whether to build the UEFI plugins -PACKAGE_ARCH = "${MACHINE_ARCH}" - -inherit meson vala gobject-introspection systemd bash-completion pkgconfig gi-docgen ptest manpages useradd - -GIDOCGEN_MESON_OPTION = 'docs' -GIDOCGEN_MESON_ENABLE_FLAG = 'enabled' -GIDOCGEN_MESON_DISABLE_FLAG = 'disabled' -GIR_MESON_ENABLE_FLAG = 'enabled' -GIR_MESON_DISABLE_FLAG = 'disabled' - -PACKAGECONFIG ??= "curl gnutls gudev gusb \ - ${@bb.utils.filter('DISTRO_FEATURES', 'bluetooth polkit', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd offline', '', d)} \ - ${@bb.utils.contains('MACHINE_FEATURES', 'efi', 'plugin_uefi_capsule plugin_uefi_pk', '', d)} \ - ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)} \ - hsi \ - plugin_android_boot \ - plugin_acpi_phat \ - plugin_bcm57xx \ - plugin_emmc \ - plugin_ep963x \ - plugin_fastboot \ - plugin_flashrom \ - plugin_gpio \ - plugin_igsc \ - plugin_intel_me \ - plugin_intel_spi \ - plugin_logitech_bulkcontroller \ - plugin_logitech_scribe \ - plugin_modem_manager \ - plugin_msr \ - plugin_nitrokey \ - plugin_nvme \ - plugin_parade_lspcon \ - plugin_pixart_rf \ - plugin_realtek_mst \ - plugin_redfish \ - plugin_synaptics_mst \ - plugin_synaptics_rmi \ - plugin_scsi \ - plugin_uf2 \ - plugin_upower \ - sqlite" - -PACKAGECONFIG[bluetooth] = "-Dbluez=enabled,-Dbluez=disabled" -PACKAGECONFIG[compat-cli] = "-Dcompat_cli=true,-Dcompat_cli=false" -PACKAGECONFIG[consolekit] = "-Dconsolekit=enabled,-Dconsolekit=disabled,consolekit" -PACKAGECONFIG[curl] = "-Dcurl=enabled,-Dcurl=disabled,curl" -PACKAGECONFIG[firmware-packager] = "-Dfirmware-packager=true,-Dfirmware-packager=false" -PACKAGECONFIG[fish-completion] = "-Dfish_completion=true,-Dfish_completion=false" -PACKAGECONFIG[gnutls] = "-Dgnutls=enabled,-Dgnutls=disabled,gnutls" -PACKAGECONFIG[gudev] = "-Dgudev=enabled,-Dgudev=disabled,libgudev" -PACKAGECONFIG[gusb] = "-Dgusb=enabled,-Dgusb=disabled,libgusb" -PACKAGECONFIG[hsi] = "-Dhsi=enabled,-Dhsi=disabled" -PACKAGECONFIG[libarchive] = "-Dlibarchive=enabled,-Dlibarchive=disabled,libarchive" -PACKAGECONFIG[manpages] = "-Dman=true,-Dman=false" -PACKAGECONFIG[metainfo] = "-Dmetainfo=true,-Dmetainfo=false" -PACKAGECONFIG[offline] = "-Doffline=enabled,-Doffline=disabled" -PACKAGECONFIG[polkit] = "-Dpolkit=enabled,-Dpolkit=disabled,polkit" -PACKAGECONFIG[sqlite] = "-Dsqlite=enabled,-Dsqlite=disabled,sqlite3" -PACKAGECONFIG[systemd] = "-Dsystemd=enabled,-Dsystemd=disabled,systemd" -PACKAGECONFIG[tests] = "-Dtests=true,-Dtests=false,gcab-native" - - -# TODO plugins-all meta-option that expands to all plugin_*? -PACKAGECONFIG[plugin_acpi_phat] = "-Dplugin_acpi_phat=enabled,-Dplugin_acpi_phat=disabled" -PACKAGECONFIG[plugin_android_boot] = "-Dplugin_android_boot=enabled,-Dplugin_android_boot=disabled" -PACKAGECONFIG[plugin_bcm57xx] = "-Dplugin_bcm57xx=enabled,-Dplugin_bcm57xx=disabled" -PACKAGECONFIG[plugin_cfu] = "-Dplugin_cfu=enabled,-Dplugin_cfu=disabled" -PACKAGECONFIG[plugin_emmc] = "-Dplugin_emmc=enabled,-Dplugin_emmc=disabled" -PACKAGECONFIG[plugin_ep963x] = "-Dplugin_ep963x=enabled,-Dplugin_ep963x=disabled" -PACKAGECONFIG[plugin_fastboot] = "-Dplugin_fastboot=enabled,-Dplugin_fastboot=disabled" -PACKAGECONFIG[plugin_flashrom] = "-Dplugin_flashrom=enabled,-Dplugin_flashrom=disabled,flashrom" -PACKAGECONFIG[plugin_gpio] = "-Dplugin_gpio=enabled,-Dplugin_gpio=disabled" -PACKAGECONFIG[plugin_igsc] = "-Dplugin_igsc=enabled,-Dplugin_igsc=disabled" -PACKAGECONFIG[plugin_intel_me] = "-Dplugin_intel_me=enabled,-Dplugin_intel_me=disabled" -PACKAGECONFIG[plugin_intel_spi] = "-Dplugin_intel_spi=true -Dlzma=enabled,-Dplugin_intel_spi=false -Dlzma=disabled,xz" -PACKAGECONFIG[plugin_logitech_bulkcontroller] = "-Dplugin_logitech_bulkcontroller=enabled,-Dplugin_logitech_bulkcontroller=disabled,protobuf-c-native protobuf-c" -PACKAGECONFIG[plugin_logitech_scribe] = "-Dplugin_logitech_scribe=enabled,-Dplugin_logitech_scribe=disabled" -PACKAGECONFIG[plugin_modem_manager] = "-Dplugin_modem_manager=enabled,-Dplugin_modem_manager=disabled,libqmi modemmanager" -PACKAGECONFIG[plugin_msr] = "-Dplugin_msr=enabled,-Dplugin_msr=disabled,cpuid" -PACKAGECONFIG[plugin_nitrokey] = "-Dplugin_nitrokey=enabled,-Dplugin_nitrokey=disabled" -PACKAGECONFIG[plugin_nvme] = "-Dplugin_nvme=enabled,-Dplugin_nvme=disabled" -PACKAGECONFIG[plugin_parade_lspcon] = "-Dplugin_parade_lspcon=enabled,-Dplugin_parade_lspcon=disabled" -PACKAGECONFIG[plugin_pixart_rf] = "-Dplugin_pixart_rf=enabled,-Dplugin_pixart_rf=disabled" -PACKAGECONFIG[plugin_powerd] = "-Dplugin_powerd=enabled,-Dplugin_powerd=disabled" -PACKAGECONFIG[plugin_realtek_mst] = "-Dplugin_realtek_mst=enabled,-Dplugin_realtek_mst=disabled" -PACKAGECONFIG[plugin_redfish] = "-Dplugin_redfish=enabled,-Dplugin_redfish=disabled" -PACKAGECONFIG[plugin_scsi] = "-Dplugin_scsi=enabled,-Dplugin_scsi=disabled" -PACKAGECONFIG[plugin_synaptics_mst] = "-Dplugin_synaptics_mst=enabled,-Dplugin_synaptics_mst=disabled" -PACKAGECONFIG[plugin_synaptics_rmi] = "-Dplugin_synaptics_rmi=enabled,-Dplugin_synaptics_rmi=disabled" -PACKAGECONFIG[plugin_tpm] = "-Dplugin_tpm=enabled,-Dplugin_tpm=disabled,tpm2-tss" -# Turn off the capsule splash as it needs G-I at buildtime, which isn't currently supported -PACKAGECONFIG[plugin_uefi_capsule] = "-Dplugin_uefi_capsule=enabled -Dplugin_uefi_capsule_splash=false,-Dplugin_uefi_capsule=disabled,efivar fwupd-efi" -PACKAGECONFIG[plugin_uefi_pk] = "-Dplugin_uefi_pk=enabled,-Dplugin_uefi_pk=disabled" -PACKAGECONFIG[plugin_uf2] = "-Dplugin_uf2=enabled,-Dplugin_uf2=disabled" -PACKAGECONFIG[plugin_upower] = "-Dplugin_upower=enabled,-Dplugin_upower=disabled" - -# Always disable these plugins on non-x86 platforms as they don't compile or are useless -DISABLE_NON_X86 = "plugin_intel_me plugin_intel_spi plugin_msr" -DISABLE_NON_X86:x86 = "" -DISABLE_NON_X86:x86-64 = "" -PACKAGECONFIG:remove = "${DISABLE_NON_X86}" - -USERADD_PACKAGES = "${PN}" -USERADD_PARAM:${PN} = "--system --no-create-home --user-group --home-dir ${sysconfdir}/polkit-1 --shell /bin/nologin polkitd" - -do_install:append() { - if ${@bb.utils.contains('PACKAGECONFIG', 'polkit', 'true', 'false', d)}; then - #Fix up permissions on polkit rules.d to work with rpm4 constraints - chmod 700 ${D}/${datadir}/polkit-1/rules.d - chown polkitd:root ${D}/${datadir}/polkit-1/rules.d - fi -} - -FILES:${PN} += "${libdir}/fwupd-plugins-* \ - ${libdir}/fwupd-${PV} \ - ${systemd_unitdir} \ - ${nonarch_libdir}/sysusers.d/fwupd.conf \ - ${datadir}/fish \ - ${datadir}/metainfo \ - ${datadir}/icons \ - ${datadir}/dbus-1 \ - ${datadir}/polkit-1 \ - ${nonarch_libdir}/modules-load.d" - -FILES:${PN}-ptest += "${libexecdir}/installed-tests/ \ - ${datadir}/installed-tests/" -RDEPENDS:${PN}-ptest += "gnome-desktop-testing" - -INSANE_SKIP:${PN}-ptest += "buildpaths" diff --git a/sources/meta-openembedded/meta-oe/recipes-bsp/fwupd/fwupd_1.9.24.bb b/sources/meta-openembedded/meta-oe/recipes-bsp/fwupd/fwupd_1.9.24.bb new file mode 100644 index 00000000..15cde9f1 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-bsp/fwupd/fwupd_1.9.24.bb @@ -0,0 +1,134 @@ +SUMMARY = "A simple daemon to allow session software to update firmware" +LICENSE = "LGPL-2.1-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" + +DEPENDS = "glib-2.0 libxmlb json-glib libjcat gcab vala-native python3-jinja2-native" + +SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/${PV}/${BP}.tar.xz \ + file://run-ptest" +SRC_URI[sha256sum] = "12f560b35dbed981fde8cf774c6d1f2e658a157d3a63d6c439bf418dbcc44b4c" + +UPSTREAM_CHECK_URI = "https://github.com/${BPN}/${BPN}/releases" +UPSTREAM_CHECK_REGEX = "(?P\d+(\.\d+)+)" + +# Machine-specific as we examine MACHINE_FEATURES to decide whether to build the UEFI plugins +PACKAGE_ARCH = "${MACHINE_ARCH}" + +inherit meson vala gobject-introspection systemd bash-completion pkgconfig gi-docgen ptest manpages + +GIDOCGEN_MESON_OPTION = 'docs' +GIDOCGEN_MESON_ENABLE_FLAG = 'enabled' +GIDOCGEN_MESON_DISABLE_FLAG = 'disabled' +GIR_MESON_ENABLE_FLAG = 'enabled' +GIR_MESON_DISABLE_FLAG = 'disabled' + +PACKAGECONFIG ??= "curl gnutls gudev gusb \ + ${@bb.utils.filter('DISTRO_FEATURES', 'bluetooth polkit', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd offline', '', d)} \ + ${@bb.utils.contains('MACHINE_FEATURES', 'efi', 'plugin_uefi_capsule plugin_uefi_pk', '', d)} \ + ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)} \ + hsi \ + plugin_android_boot \ + plugin_acpi_phat \ + plugin_bcm57xx \ + plugin_emmc \ + plugin_ep963x \ + plugin_fastboot \ + plugin_flashrom \ + plugin_gpio \ + plugin_igsc \ + plugin_intel_me \ + plugin_intel_spi \ + plugin_logitech_bulkcontroller \ + plugin_logitech_scribe \ + plugin_modem_manager \ + plugin_msr \ + plugin_nitrokey \ + plugin_nvme \ + plugin_parade_lspcon \ + plugin_pixart_rf \ + plugin_realtek_mst \ + plugin_redfish \ + plugin_synaptics_mst \ + plugin_synaptics_rmi \ + plugin_scsi \ + plugin_uf2 \ + plugin_upower \ + sqlite" + +PACKAGECONFIG[bluetooth] = "-Dbluez=enabled,-Dbluez=disabled" +PACKAGECONFIG[compat-cli] = "-Dcompat_cli=true,-Dcompat_cli=false" +PACKAGECONFIG[consolekit] = "-Dconsolekit=enabled,-Dconsolekit=disabled,consolekit" +PACKAGECONFIG[curl] = "-Dcurl=enabled,-Dcurl=disabled,curl" +PACKAGECONFIG[firmware-packager] = "-Dfirmware-packager=true,-Dfirmware-packager=false" +PACKAGECONFIG[fish-completion] = "-Dfish_completion=true,-Dfish_completion=false" +PACKAGECONFIG[gnutls] = "-Dgnutls=enabled,-Dgnutls=disabled,gnutls" +PACKAGECONFIG[gudev] = "-Dgudev=enabled,-Dgudev=disabled,libgudev" +PACKAGECONFIG[gusb] = "-Dgusb=enabled,-Dgusb=disabled,libgusb" +PACKAGECONFIG[hsi] = "-Dhsi=enabled,-Dhsi=disabled" +PACKAGECONFIG[libarchive] = "-Dlibarchive=enabled,-Dlibarchive=disabled,libarchive" +PACKAGECONFIG[manpages] = "-Dman=true,-Dman=false" +PACKAGECONFIG[metainfo] = "-Dmetainfo=true,-Dmetainfo=false" +PACKAGECONFIG[offline] = "-Doffline=enabled,-Doffline=disabled" +PACKAGECONFIG[polkit] = "-Dpolkit=enabled,-Dpolkit=disabled,polkit" +PACKAGECONFIG[sqlite] = "-Dsqlite=enabled,-Dsqlite=disabled,sqlite3" +PACKAGECONFIG[systemd] = "-Dsystemd=enabled,-Dsystemd=disabled,systemd" +PACKAGECONFIG[tests] = "-Dtests=true,-Dtests=false,gcab-native" + + +# TODO plugins-all meta-option that expands to all plugin_*? +PACKAGECONFIG[plugin_acpi_phat] = "-Dplugin_acpi_phat=enabled,-Dplugin_acpi_phat=disabled" +PACKAGECONFIG[plugin_android_boot] = "-Dplugin_android_boot=enabled,-Dplugin_android_boot=disabled" +PACKAGECONFIG[plugin_bcm57xx] = "-Dplugin_bcm57xx=enabled,-Dplugin_bcm57xx=disabled" +PACKAGECONFIG[plugin_cfu] = "-Dplugin_cfu=enabled,-Dplugin_cfu=disabled" +PACKAGECONFIG[plugin_emmc] = "-Dplugin_emmc=enabled,-Dplugin_emmc=disabled" +PACKAGECONFIG[plugin_ep963x] = "-Dplugin_ep963x=enabled,-Dplugin_ep963x=disabled" +PACKAGECONFIG[plugin_fastboot] = "-Dplugin_fastboot=enabled,-Dplugin_fastboot=disabled" +PACKAGECONFIG[plugin_flashrom] = "-Dplugin_flashrom=enabled,-Dplugin_flashrom=disabled,flashrom" +PACKAGECONFIG[plugin_gpio] = "-Dplugin_gpio=enabled,-Dplugin_gpio=disabled" +PACKAGECONFIG[plugin_igsc] = "-Dplugin_igsc=enabled,-Dplugin_igsc=disabled" +PACKAGECONFIG[plugin_intel_me] = "-Dplugin_intel_me=enabled,-Dplugin_intel_me=disabled" +PACKAGECONFIG[plugin_intel_spi] = "-Dplugin_intel_spi=true -Dlzma=enabled,-Dplugin_intel_spi=false -Dlzma=disabled,xz" +PACKAGECONFIG[plugin_logitech_bulkcontroller] = "-Dplugin_logitech_bulkcontroller=enabled,-Dplugin_logitech_bulkcontroller=disabled,protobuf-c-native protobuf-c" +PACKAGECONFIG[plugin_logitech_scribe] = "-Dplugin_logitech_scribe=enabled,-Dplugin_logitech_scribe=disabled" +PACKAGECONFIG[plugin_modem_manager] = "-Dplugin_modem_manager=enabled,-Dplugin_modem_manager=disabled,libqmi modemmanager" +PACKAGECONFIG[plugin_msr] = "-Dplugin_msr=enabled,-Dplugin_msr=disabled,cpuid" +PACKAGECONFIG[plugin_nitrokey] = "-Dplugin_nitrokey=enabled,-Dplugin_nitrokey=disabled" +PACKAGECONFIG[plugin_nvme] = "-Dplugin_nvme=enabled,-Dplugin_nvme=disabled" +PACKAGECONFIG[plugin_parade_lspcon] = "-Dplugin_parade_lspcon=enabled,-Dplugin_parade_lspcon=disabled" +PACKAGECONFIG[plugin_pixart_rf] = "-Dplugin_pixart_rf=enabled,-Dplugin_pixart_rf=disabled" +PACKAGECONFIG[plugin_powerd] = "-Dplugin_powerd=enabled,-Dplugin_powerd=disabled" +PACKAGECONFIG[plugin_realtek_mst] = "-Dplugin_realtek_mst=enabled,-Dplugin_realtek_mst=disabled" +PACKAGECONFIG[plugin_redfish] = "-Dplugin_redfish=enabled,-Dplugin_redfish=disabled" +PACKAGECONFIG[plugin_scsi] = "-Dplugin_scsi=enabled,-Dplugin_scsi=disabled" +PACKAGECONFIG[plugin_synaptics_mst] = "-Dplugin_synaptics_mst=enabled,-Dplugin_synaptics_mst=disabled" +PACKAGECONFIG[plugin_synaptics_rmi] = "-Dplugin_synaptics_rmi=enabled,-Dplugin_synaptics_rmi=disabled" +PACKAGECONFIG[plugin_tpm] = "-Dplugin_tpm=enabled,-Dplugin_tpm=disabled,tpm2-tss" +# Turn off the capsule splash as it needs G-I at buildtime, which isn't currently supported +PACKAGECONFIG[plugin_uefi_capsule] = "-Dplugin_uefi_capsule=enabled -Dplugin_uefi_capsule_splash=false,-Dplugin_uefi_capsule=disabled,efivar fwupd-efi" +PACKAGECONFIG[plugin_uefi_pk] = "-Dplugin_uefi_pk=enabled,-Dplugin_uefi_pk=disabled" +PACKAGECONFIG[plugin_uf2] = "-Dplugin_uf2=enabled,-Dplugin_uf2=disabled" +PACKAGECONFIG[plugin_upower] = "-Dplugin_upower=enabled,-Dplugin_upower=disabled" + +# Always disable these plugins on non-x86 platforms as they don't compile or are useless +DISABLE_NON_X86 = "plugin_intel_me plugin_intel_spi plugin_msr" +DISABLE_NON_X86:x86 = "" +DISABLE_NON_X86:x86-64 = "" +PACKAGECONFIG:remove = "${DISABLE_NON_X86}" + +FILES:${PN} += "${libdir}/fwupd-plugins-* \ + ${libdir}/fwupd-${PV} \ + ${systemd_unitdir} \ + ${nonarch_libdir}/sysusers.d/fwupd.conf \ + ${datadir}/fish \ + ${datadir}/metainfo \ + ${datadir}/icons \ + ${datadir}/dbus-1 \ + ${datadir}/polkit-1 \ + ${nonarch_libdir}/modules-load.d" + +FILES:${PN}-ptest += "${libexecdir}/installed-tests/ \ + ${datadir}/installed-tests/" +RDEPENDS:${PN}-ptest += "gnome-desktop-testing" + +INSANE_SKIP:${PN}-ptest += "buildpaths" diff --git a/sources/meta-openembedded/meta-oe/recipes-bsp/irda-utils/irda-utils_0.9.18.bb b/sources/meta-openembedded/meta-oe/recipes-bsp/irda-utils/irda-utils_0.9.18.bb index fa1bb928..22bb30a5 100644 --- a/sources/meta-openembedded/meta-oe/recipes-bsp/irda-utils/irda-utils_0.9.18.bb +++ b/sources/meta-openembedded/meta-oe/recipes-bsp/irda-utils/irda-utils_0.9.18.bb @@ -60,5 +60,5 @@ do_install () { done install -d ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/${INITSCRIPT_NAME} + install -m 0755 ${UNPACKDIR}/init ${D}${sysconfdir}/init.d/${INITSCRIPT_NAME} } diff --git a/sources/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors-config_1.0.bb b/sources/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors-config_1.0.bb index 25ab44f7..6fad255c 100644 --- a/sources/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors-config_1.0.bb +++ b/sources/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors-config_1.0.bb @@ -12,7 +12,8 @@ SRC_URI = "file://fancontrol \ file://sensors.conf \ file://sensord \ " -S = "${WORKDIR}" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" PACKAGECONFIG ??= "sensord" PACKAGECONFIG[sensord] = ",," @@ -22,20 +23,20 @@ RDEPENDS:${PN}-dev = "" do_install() { # Install fancontrol configuration file install -d ${D}${sysconfdir}/sysconfig - install -m 0644 ${WORKDIR}/fancontrol ${D}${sysconfdir} - install -m 0644 ${WORKDIR}/sensord ${D}${sysconfdir}/sysconfig + install -m 0644 ${UNPACKDIR}/fancontrol ${D}${sysconfdir} + install -m 0644 ${UNPACKDIR}/sensord ${D}${sysconfdir}/sysconfig # Install libsensors configuration file install -d ${D}${sysconfdir}/sensors.d - install -m 0644 ${WORKDIR}/sensors.conf ${D}${sysconfdir}/sensors.d + install -m 0644 ${UNPACKDIR}/sensors.conf ${D}${sysconfdir}/sensors.d if ${@bb.utils.contains('PACKAGECONFIG', 'sensord', 'true', 'false', d)}; then # Install sensord configuration file - install -m 0644 ${WORKDIR}/sensord.conf ${D}${sysconfdir} + install -m 0644 ${UNPACKDIR}/sensord.conf ${D}${sysconfdir} # Install sensord.cgi script and create world-writable # web-accessible sensord directory install -d ${D}/www/pages/cgi-bin - install -m 0755 ${WORKDIR}/sensord.cgi ${D}/www/pages/cgi-bin + install -m 0755 ${UNPACKDIR}/sensord.cgi ${D}/www/pages/cgi-bin install -d -m a=rwxs ${D}/www/pages/sensord fi } diff --git a/sources/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors/0001-Fix-building-with-GCC-14.patch b/sources/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors/0001-Fix-building-with-GCC-14.patch new file mode 100644 index 00000000..0ff8b380 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors/0001-Fix-building-with-GCC-14.patch @@ -0,0 +1,36 @@ +From fd49cbcb7f3402e1a4a99b71b901a564060039b4 Mon Sep 17 00:00:00 2001 +From: Dmitry Baryshkov +Date: Fri, 24 May 2024 14:16:21 +0300 +Subject: [PATCH] Fix building with GCC 14 + +Signed-off-by: Dmitry Baryshkov +Upstream-Status: Submitted [https://github.com/lm-sensors/lm-sensors/pull/497] +--- + prog/sensord/rrd.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/prog/sensord/rrd.c b/prog/sensord/rrd.c +index a531362bddd5..36d685fce514 100644 +--- a/prog/sensord/rrd.c ++++ b/prog/sensord/rrd.c +@@ -299,7 +299,7 @@ int rrdInit(void) + argv[argc++] = rraBuff; + argv[argc] = NULL; + +- ret = rrd_create(argc, (char**) argv); ++ ret = rrd_create(argc, (const char**) argv); + if (ret == -1) { + sensorLog(LOG_ERR, "Error creating RRD file: %s: %s", + sensord_args.rrdFile, rrd_get_error()); +@@ -455,7 +455,7 @@ int rrdUpdate(void) + const char *argv[] = { + "sensord", sensord_args.rrdFile, rrdBuff, NULL + }; +- if ((ret = rrd_update(3, (char **) /* WEAK */ argv))) { ++ if ((ret = rrd_update(3, (const char **) /* WEAK */ argv))) { + sensorLog(LOG_ERR, "Error updating RRD file: %s: %s", + sensord_args.rrdFile, rrd_get_error()); + } +-- +2.39.2 + diff --git a/sources/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors_3.6.0.bb b/sources/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors_3.6.0.bb index 6e4cf29f..07027225 100644 --- a/sources/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors_3.6.0.bb +++ b/sources/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors_3.6.0.bb @@ -14,6 +14,7 @@ SRC_URI = "git://github.com/lm-sensors/lm-sensors.git;protocol=https;branch=mast file://fancontrol.init \ file://sensord.init \ file://0001-Change-PIDFile-path-from-var-run-to-run.patch \ + file://0001-Fix-building-with-GCC-14.patch \ " SRCREV = "1667b850a1ce38151dae17156276f981be6fb557" @@ -48,19 +49,15 @@ S = "${WORKDIR}/git" EXTRA_OEMAKE = 'EXLDFLAGS="${LDFLAGS}" \ MACHINE=${TARGET_ARCH} PREFIX=${prefix} MANDIR=${mandir} \ LIBDIR=${libdir} \ - CC="${CC}" AR="${AR}" \ - PROG_EXTRA="sensors ${PACKAGECONFIG_CONFARGS}"' - -do_configure:prepend() { - sed -i -e 's:^#\(PROG_EXTRA\):\1:' ${S}/Makefile -} + CC="${CC}" AR="${AR}"' do_compile() { + sed -i -e 's:^# \(PROG_EXTRA\):\1:' ${S}/Makefile # Respect LDFLAGS sed -i -e 's/\$(LIBDIR)$/\$(LIBDIR) \$(LDFLAGS)/g' ${S}/Makefile sed -i -e 's/\$(LIBSHSONAME) -o/$(LIBSHSONAME) \$(LDFLAGS) -o/g' \ ${S}/lib/Module.mk - oe_runmake user + oe_runmake user PROG_EXTRA="sensors ${PACKAGECONFIG_CONFARGS}" } do_install() { @@ -74,11 +71,11 @@ do_install() { install -d ${D}${INIT_D_DIR} # Install fancontrol init script - install -m 0755 ${WORKDIR}/fancontrol.init ${D}${INIT_D_DIR}/fancontrol + install -m 0755 ${UNPACKDIR}/fancontrol.init ${D}${INIT_D_DIR}/fancontrol if ${@bb.utils.contains('PACKAGECONFIG', 'sensord', 'true', 'false', d)}; then # Install sensord init script - install -m 0755 ${WORKDIR}/sensord.init ${D}${INIT_D_DIR}/sensord + install -m 0755 ${UNPACKDIR}/sensord.init ${D}${INIT_D_DIR}/sensord fi # Insall sensord service script diff --git a/sources/meta-openembedded/meta-oe/recipes-bsp/nvme-cli/nvme-cli_2.10.2.bb b/sources/meta-openembedded/meta-oe/recipes-bsp/nvme-cli/nvme-cli_2.10.2.bb new file mode 100644 index 00000000..2005a198 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-bsp/nvme-cli/nvme-cli_2.10.2.bb @@ -0,0 +1,36 @@ +SUMMARY = "NVMe management command line interface" +HOMEPAGE = "https://github.com/linux-nvme/nvme-cli" +SECTION = "console/utils" +LICENSE = "GPL-2.0-only & CC0-1.0 & MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=8264535c0c4e9c6c335635c4026a8022 \ + file://ccan/licenses/CC0;md5=c17af43b05840255a6fedc5eda9d56cc \ + file://ccan/licenses/BSD-MIT;md5=838c366f69b72c5df05c96dff79b35f2" +DEPENDS = "json-c libnvme" +SRCREV = "eeaa08c9a0e9184f3889df0bff3d2a23db6d6294" + +SRC_URI = "git://github.com/linux-nvme/nvme-cli.git;branch=master;protocol=https" + +S = "${WORKDIR}/git" + +inherit bash-completion meson pkgconfig systemd + +EXTRA_OEMESON += "-Dsystemddir=${systemd_unitdir}/system" + +pkg_postinst_ontarget:${PN}-user () { + ${sbindir}/nvme gen-hostnqn > ${sysconfdir}/nvme/hostnqn + ${bindir}/uuidgen > ${sysconfdir}/nvme/hostid +} + +PACKAGES =+ "${PN}-dracut ${PN}-zsh-completion ${PN}-user" + +FILES:${PN} += "${systemd_system_unitdir}" +FILES:${PN}-dracut = "${nonarch_libdir}/dracut/dracut.conf.d" +FILES:${PN}-zsh-completion = "${datadir}/zsh/site-functions" +ALLOW_EMPTY:${PN}-user = "1" + +RDEPENDS:${PN}-user = "util-linux-uuidgen" + +# This one is reproducible only on 32bit MACHINEs +# http://errors.yoctoproject.org/Errors/Details/766964/ +# git/plugins/virtium/virtium-nvme.c:205:63: error: passing argument 1 of 'localtime' from incompatible pointer type [-Wincompatible-pointer-types] +CFLAGS += "-Wno-error=incompatible-pointer-types" diff --git a/sources/meta-openembedded/meta-oe/recipes-bsp/nvme-cli/nvme-cli_2.8.bb b/sources/meta-openembedded/meta-oe/recipes-bsp/nvme-cli/nvme-cli_2.8.bb deleted file mode 100644 index 81b30c28..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-bsp/nvme-cli/nvme-cli_2.8.bb +++ /dev/null @@ -1,30 +0,0 @@ -SUMMARY = "NVMe management command line interface" -HOMEPAGE = "https://github.com/linux-nvme/nvme-cli" -SECTION = "console/utils" -LICENSE = "GPL-2.0-only & CC0-1.0 & MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=8264535c0c4e9c6c335635c4026a8022 \ - file://ccan/licenses/CC0;md5=c17af43b05840255a6fedc5eda9d56cc \ - file://ccan/licenses/BSD-MIT;md5=838c366f69b72c5df05c96dff79b35f2" -DEPENDS = "json-c libnvme" -SRCREV = "43b716b982da3df1cf8c4658f7c31b0fe28d377b" - -SRC_URI = "git://github.com/linux-nvme/nvme-cli.git;branch=master;protocol=https" - -S = "${WORKDIR}/git" - -inherit bash-completion meson pkgconfig systemd - -EXTRA_OEMESON += "-Dsystemddir=${systemd_unitdir}/system" - -pkg_postinst_ontarget:${PN}() { - ${sbindir}/nvme gen-hostnqn > ${sysconfdir}/nvme/hostnqn - ${bindir}/uuidgen > ${sysconfdir}/nvme/hostid -} - -PACKAGES =+ "${PN}-dracut ${PN}-zsh-completion" - -FILES:${PN} += "${systemd_system_unitdir}" -FILES:${PN}-dracut = "${nonarch_libdir}/dracut/dracut.conf.d" -FILES:${PN}-zsh-completion = "${datadir}/zsh/site-functions" - -RDEPENDS:${PN} = "util-linux-uuidgen" diff --git a/sources/meta-openembedded/meta-oe/recipes-bsp/pointercal/pointercal_0.0.bb b/sources/meta-openembedded/meta-oe/recipes-bsp/pointercal/pointercal_0.0.bb index 61be5b2d..20e870cc 100644 --- a/sources/meta-openembedded/meta-oe/recipes-bsp/pointercal/pointercal_0.0.bb +++ b/sources/meta-openembedded/meta-oe/recipes-bsp/pointercal/pointercal_0.0.bb @@ -6,7 +6,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=4b5fcfc87fb615860d398b5e38685edf" SRC_URI = "file://pointercal \ file://COPYING" -S = "${WORKDIR}" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" do_install() { # Only install file if it has a contents diff --git a/sources/meta-openembedded/meta-oe/recipes-connectivity/ace/ace_6.5.19.bb b/sources/meta-openembedded/meta-oe/recipes-connectivity/ace/ace_6.5.19.bb index af4f2c54..46e4795a 100644 --- a/sources/meta-openembedded/meta-oe/recipes-connectivity/ace/ace_6.5.19.bb +++ b/sources/meta-openembedded/meta-oe/recipes-connectivity/ace/ace_6.5.19.bb @@ -13,6 +13,11 @@ SRC_URI = "https://github.com/DOCGroup/ACE_TAO/releases/download/ACE%2BTAO-6_5_1 " SRC_URI[sha256sum] = "739be290a38229aaa5b5150e6ea55ce427e80970f0ace4c5040ac46644526f41" +UPSTREAM_CHECK_URI = "https://github.com/DOCGroup/ACE_TAO/releases" +UPSTREAM_CHECK_REGEX = "(?P\d+(\.\d+)+)" + +CVE_STATUS[CVE-2009-1147] = "cpe-incorrect: this CVE is for vmware ace" + COMPATIBLE_HOST:libc-musl = "null" S = "${WORKDIR}/ACE_wrappers" @@ -37,5 +42,3 @@ do_install() { rm -r ${D}/usr/share } - -UPSTREAM_CHECK_URI = "https://github.com/DOCGroup/ACE_TAO/releases" diff --git a/sources/meta-openembedded/meta-oe/recipes-connectivity/gammu/gammu_1.42.0.bb b/sources/meta-openembedded/meta-oe/recipes-connectivity/gammu/gammu_1.42.0.bb index aa52f625..e6ec9c35 100644 --- a/sources/meta-openembedded/meta-oe/recipes-connectivity/gammu/gammu_1.42.0.bb +++ b/sources/meta-openembedded/meta-oe/recipes-connectivity/gammu/gammu_1.42.0.bb @@ -22,8 +22,8 @@ do_install:append() { rm -rf ${D}/usr/share/gammu #install default configuration files install -d ${D}${sysconfdir} - install -m 0644 ${WORKDIR}/gammurc ${D}${sysconfdir}/gammurc - install -m 0644 ${WORKDIR}/gammu-smsdrc ${D}${sysconfdir}/gammu-smsdrc + install -m 0644 ${UNPACKDIR}/gammurc ${D}${sysconfdir}/gammurc + install -m 0644 ${UNPACKDIR}/gammu-smsdrc ${D}${sysconfdir}/gammu-smsdrc } EXTRA_OECONF = " \ diff --git a/sources/meta-openembedded/meta-oe/recipes-connectivity/gattlib/gattlib_git.bb b/sources/meta-openembedded/meta-oe/recipes-connectivity/gattlib/gattlib_git.bb index 7ad28d59..0841dc25 100644 --- a/sources/meta-openembedded/meta-oe/recipes-connectivity/gattlib/gattlib_git.bb +++ b/sources/meta-openembedded/meta-oe/recipes-connectivity/gattlib/gattlib_git.bb @@ -17,6 +17,8 @@ SRCREV = "33a8a275928b186381bb0aea0f9778e330e57ec3" S = "${WORKDIR}/git" +CVE_STATUS[CVE-2019-6498] = "fixed-version: patch is already included in sources" + PACKAGECONFIG[examples] = "-DGATTLIB_BUILD_EXAMPLES=ON,-DGATTLIB_BUILD_EXAMPLES=OFF" # Set this to force use of DBus API if Bluez version is older than 5.42 diff --git a/sources/meta-openembedded/meta-oe/recipes-connectivity/gensio/gensio_2.8.4.bb b/sources/meta-openembedded/meta-oe/recipes-connectivity/gensio/gensio_2.8.4.bb deleted file mode 100644 index 1f85c46e..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-connectivity/gensio/gensio_2.8.4.bb +++ /dev/null @@ -1,26 +0,0 @@ -SUMMARY = "A library to abstract stream I/O like serial port, TCP, telnet, etc" -HOMEPAGE = "https://github.com/cminyard/gensio" -LICENSE = "GPL-2.0-only & LGPL-2.1-only" -LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \ - file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - " - -SRCREV = "300644fc02b7099ca27ca5bac88c47e159ba8a6b" - -SRC_URI = "git://github.com/cminyard/gensio;protocol=https;branch=master" - -S = "${WORKDIR}/git" - -inherit autotools - -PACKAGECONFIG ??= "openssl tcp-wrappers" - -PACKAGECONFIG[openssl] = "--with-openssl=${STAGING_DIR_HOST}${prefix},--without-openssl, openssl" -PACKAGECONFIG[tcp-wrappers] = "--with-tcp-wrappers,--without-tcp-wrappers, tcp-wrappers" -PACKAGECONFIG[swig] = "--with-swig,--without-swig, swig" - -EXTRA_OECONF = "--without-python" - -RDEPENDS:${PN} += "bash" - -FILES:${PN}-staticdev += "${libexecdir}/gensio/${PV}/libgensio_*.a" diff --git a/sources/meta-openembedded/meta-oe/recipes-connectivity/gensio/gensio_2.8.7.bb b/sources/meta-openembedded/meta-oe/recipes-connectivity/gensio/gensio_2.8.7.bb new file mode 100644 index 00000000..f4d0c093 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-connectivity/gensio/gensio_2.8.7.bb @@ -0,0 +1,26 @@ +SUMMARY = "A library to abstract stream I/O like serial port, TCP, telnet, etc" +HOMEPAGE = "https://github.com/cminyard/gensio" +LICENSE = "GPL-2.0-only & LGPL-2.1-only" +LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \ + file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + " + +SRCREV = "e4dbb9687bd5e887fa98a4cdcec012ea85da1ef2" + +SRC_URI = "git://github.com/cminyard/gensio;protocol=https;branch=master" + +S = "${WORKDIR}/git" + +inherit autotools + +PACKAGECONFIG ??= "openssl tcp-wrappers" + +PACKAGECONFIG[openssl] = "--with-openssl=${STAGING_DIR_HOST}${prefix},--without-openssl, openssl" +PACKAGECONFIG[tcp-wrappers] = "--with-tcp-wrappers,--without-tcp-wrappers, tcp-wrappers" +PACKAGECONFIG[swig] = "--with-swig,--without-swig, swig" + +EXTRA_OECONF = "--without-python" + +RDEPENDS:${PN} += "bash" + +FILES:${PN}-staticdev += "${libexecdir}/gensio/${PV}/libgensio_*.a" diff --git a/sources/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0001-SAE-Check-for-invalid-Rejected-Groups-element-length.patch b/sources/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0001-SAE-Check-for-invalid-Rejected-Groups-element-length.patch deleted file mode 100644 index 5780f27f..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0001-SAE-Check-for-invalid-Rejected-Groups-element-length.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 364c2da8741f0979dae497551e70b94c0e6c8636 Mon Sep 17 00:00:00 2001 -From: Jouni Malinen -Date: Sun, 7 Jul 2024 11:46:49 +0300 -Subject: [PATCH 1/3] SAE: Check for invalid Rejected Groups element length - explicitly - -Instead of practically ignoring an odd octet at the end of the element, -check for such invalid case explicitly. This is needed to avoid a -potential group downgrade attack. - -Signed-off-by: Jouni Malinen - -CVE: CVE-2024-3596 -Upstream-Status: Backport [https://w1.fi/cgit/hostap/commit/?id=364c2da8741f0979dae497551e70b94c0e6c8636] -Signed-off-by: Peter Marko ---- - src/ap/ieee802_11.c | 12 ++++++++++-- - 1 file changed, 10 insertions(+), 2 deletions(-) - -diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c -index db4104928..1a62e30cc 100644 ---- a/src/ap/ieee802_11.c -+++ b/src/ap/ieee802_11.c -@@ -1258,7 +1258,7 @@ static int check_sae_rejected_groups(struct hostapd_data *hapd, - struct sae_data *sae) - { - const struct wpabuf *groups; -- size_t i, count; -+ size_t i, count, len; - const u8 *pos; - - if (!sae->tmp) -@@ -1268,7 +1268,15 @@ static int check_sae_rejected_groups(struct hostapd_data *hapd, - return 0; - - pos = wpabuf_head(groups); -- count = wpabuf_len(groups) / 2; -+ len = wpabuf_len(groups); -+ if (len & 1) { -+ wpa_printf(MSG_DEBUG, -+ "SAE: Invalid length of the Rejected Groups element payload: %zu", -+ len); -+ return 1; -+ } -+ -+ count = len / 2; - for (i = 0; i < count; i++) { - int enabled; - u16 group; --- -2.30.2 - diff --git a/sources/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0003-SAE-Reject-invalid-Rejected-Groups-element-in-the-pa.patch b/sources/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0003-SAE-Reject-invalid-Rejected-Groups-element-in-the-pa.patch deleted file mode 100644 index 5e9e8bc0..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0003-SAE-Reject-invalid-Rejected-Groups-element-in-the-pa.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 9716bf1160beb677e965d9e6475d6c9e162e8374 Mon Sep 17 00:00:00 2001 -From: Jouni Malinen -Date: Tue, 9 Jul 2024 23:34:34 +0300 -Subject: [PATCH 3/3] SAE: Reject invalid Rejected Groups element in the parser - -There is no need to depend on all uses (i.e., both hostapd and -wpa_supplicant) to verify that the length of the Rejected Groups field -in the Rejected Groups element is valid (i.e., a multiple of two octets) -since the common parser can reject the message when detecting this. - -Signed-off-by: Jouni Malinen - -Upstream-Status: Backport [https://w1.fi/cgit/hostap/commit/?id=9716bf1160beb677e965d9e6475d6c9e162e8374] -Signed-off-by: Peter Marko ---- - src/common/sae.c | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/src/common/sae.c b/src/common/sae.c -index c0f154e91..620bdf753 100644 ---- a/src/common/sae.c -+++ b/src/common/sae.c -@@ -2076,6 +2076,12 @@ static int sae_parse_rejected_groups(struct sae_data *sae, - return WLAN_STATUS_UNSPECIFIED_FAILURE; - epos++; /* skip ext ID */ - len--; -+ if (len & 1) { -+ wpa_printf(MSG_DEBUG, -+ "SAE: Invalid length of the Rejected Groups element payload: %u", -+ len); -+ return WLAN_STATUS_UNSPECIFIED_FAILURE; -+ } - - wpabuf_free(sae->tmp->peer_rejected_groups); - sae->tmp->peer_rejected_groups = wpabuf_alloc(len); --- -2.30.2 - diff --git a/sources/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/CVE-2023-52160.patch b/sources/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/CVE-2023-52160.patch deleted file mode 100644 index 7f46ea84..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/CVE-2023-52160.patch +++ /dev/null @@ -1,198 +0,0 @@ -From 6c81c2d98dc5a8a6296820bd9f083faae2c788c3 Mon Sep 17 00:00:00 2001 -From: Jouni Malinen -Date: Sat, 8 Jul 2023 19:55:32 +0300 -Subject: [PATCH] PEAP client: Update Phase 2 authentication requirements - -The previous PEAP client behavior allowed the server to skip Phase 2 -authentication with the expectation that the server was authenticated -during Phase 1 through TLS server certificate validation. Various PEAP -specifications are not exactly clear on what the behavior on this front -is supposed to be and as such, this ended up being more flexible than -the TTLS/FAST/TEAP cases. However, this is not really ideal when -unfortunately common misconfiguration of PEAP is used in deployed -devices where the server trust root (ca_cert) is not configured or the -user has an easy option for allowing this validation step to be skipped. - -Change the default PEAP client behavior to be to require Phase 2 -authentication to be successfully completed for cases where TLS session -resumption is not used and the client certificate has not been -configured. Those two exceptions are the main cases where a deployed -authentication server might skip Phase 2 and as such, where a more -strict default behavior could result in undesired interoperability -issues. Requiring Phase 2 authentication will end up disabling TLS -session resumption automatically to avoid interoperability issues. - -Allow Phase 2 authentication behavior to be configured with a new phase1 -configuration parameter option: -'phase2_auth' option can be used to control Phase 2 (i.e., within TLS -tunnel) behavior for PEAP: - * 0 = do not require Phase 2 authentication - * 1 = require Phase 2 authentication when client certificate - (private_key/client_cert) is no used and TLS session resumption was - not used (default) - * 2 = require Phase 2 authentication in all cases - -Signed-off-by: Jouni Malinen - -CVE: CVE-2023-52160 - -Upstream-Status: Backport -[https://w1.fi/cgit/hostap/commit/?id=8e6485a1bcb0baffdea9e55255a81270b768439c] - -Signed-off-by: Yi Zhao ---- - src/eap_peer/eap_config.h | 8 +++++++ - src/eap_peer/eap_peap.c | 40 ++++++++++++++++++++++++++++++++--- - src/eap_peer/eap_tls_common.c | 6 ++++++ - src/eap_peer/eap_tls_common.h | 5 +++++ - 4 files changed, 56 insertions(+), 3 deletions(-) - -diff --git a/src/eap_peer/eap_config.h b/src/eap_peer/eap_config.h -index 3238f74..047eec2 100644 ---- a/src/eap_peer/eap_config.h -+++ b/src/eap_peer/eap_config.h -@@ -469,6 +469,14 @@ struct eap_peer_config { - * 1 = use cryptobinding if server supports it - * 2 = require cryptobinding - * -+ * phase2_auth option can be used to control Phase 2 (i.e., within TLS -+ * tunnel) behavior for PEAP: -+ * 0 = do not require Phase 2 authentication -+ * 1 = require Phase 2 authentication when client certificate -+ * (private_key/client_cert) is no used and TLS session resumption was -+ * not used (default) -+ * 2 = require Phase 2 authentication in all cases -+ * - * EAP-WSC (WPS) uses following options: pin=Device_Password and - * uuid=Device_UUID - * -diff --git a/src/eap_peer/eap_peap.c b/src/eap_peer/eap_peap.c -index 12e30df..6080697 100644 ---- a/src/eap_peer/eap_peap.c -+++ b/src/eap_peer/eap_peap.c -@@ -67,6 +67,7 @@ struct eap_peap_data { - u8 cmk[20]; - int soh; /* Whether IF-TNCCS-SOH (Statement of Health; Microsoft NAP) - * is enabled. */ -+ enum { NO_AUTH, FOR_INITIAL, ALWAYS } phase2_auth; - }; - - -@@ -114,6 +115,19 @@ static void eap_peap_parse_phase1(struct eap_peap_data *data, - wpa_printf(MSG_DEBUG, "EAP-PEAP: Require cryptobinding"); - } - -+ if (os_strstr(phase1, "phase2_auth=0")) { -+ data->phase2_auth = NO_AUTH; -+ wpa_printf(MSG_DEBUG, -+ "EAP-PEAP: Do not require Phase 2 authentication"); -+ } else if (os_strstr(phase1, "phase2_auth=1")) { -+ data->phase2_auth = FOR_INITIAL; -+ wpa_printf(MSG_DEBUG, -+ "EAP-PEAP: Require Phase 2 authentication for initial connection"); -+ } else if (os_strstr(phase1, "phase2_auth=2")) { -+ data->phase2_auth = ALWAYS; -+ wpa_printf(MSG_DEBUG, -+ "EAP-PEAP: Require Phase 2 authentication for all cases"); -+ } - #ifdef EAP_TNC - if (os_strstr(phase1, "tnc=soh2")) { - data->soh = 2; -@@ -142,6 +156,7 @@ static void * eap_peap_init(struct eap_sm *sm) - data->force_peap_version = -1; - data->peap_outer_success = 2; - data->crypto_binding = OPTIONAL_BINDING; -+ data->phase2_auth = FOR_INITIAL; - - if (config && config->phase1) - eap_peap_parse_phase1(data, config->phase1); -@@ -454,6 +469,20 @@ static int eap_tlv_validate_cryptobinding(struct eap_sm *sm, - } - - -+static bool peap_phase2_sufficient(struct eap_sm *sm, -+ struct eap_peap_data *data) -+{ -+ if ((data->phase2_auth == ALWAYS || -+ (data->phase2_auth == FOR_INITIAL && -+ !tls_connection_resumed(sm->ssl_ctx, data->ssl.conn) && -+ !data->ssl.client_cert_conf) || -+ data->phase2_eap_started) && -+ !data->phase2_eap_success) -+ return false; -+ return true; -+} -+ -+ - /** - * eap_tlv_process - Process a received EAP-TLV message and generate a response - * @sm: Pointer to EAP state machine allocated with eap_peer_sm_init() -@@ -568,6 +597,11 @@ static int eap_tlv_process(struct eap_sm *sm, struct eap_peap_data *data, - " - force failed Phase 2"); - resp_status = EAP_TLV_RESULT_FAILURE; - ret->decision = DECISION_FAIL; -+ } else if (!peap_phase2_sufficient(sm, data)) { -+ wpa_printf(MSG_INFO, -+ "EAP-PEAP: Server indicated Phase 2 success, but sufficient Phase 2 authentication has not been completed"); -+ resp_status = EAP_TLV_RESULT_FAILURE; -+ ret->decision = DECISION_FAIL; - } else { - resp_status = EAP_TLV_RESULT_SUCCESS; - ret->decision = DECISION_UNCOND_SUCC; -@@ -887,8 +921,7 @@ continue_req: - /* EAP-Success within TLS tunnel is used to indicate - * shutdown of the TLS channel. The authentication has - * been completed. */ -- if (data->phase2_eap_started && -- !data->phase2_eap_success) { -+ if (!peap_phase2_sufficient(sm, data)) { - wpa_printf(MSG_DEBUG, "EAP-PEAP: Phase 2 " - "Success used to indicate success, " - "but Phase 2 EAP was not yet " -@@ -1199,8 +1232,9 @@ static struct wpabuf * eap_peap_process(struct eap_sm *sm, void *priv, - static bool eap_peap_has_reauth_data(struct eap_sm *sm, void *priv) - { - struct eap_peap_data *data = priv; -+ - return tls_connection_established(sm->ssl_ctx, data->ssl.conn) && -- data->phase2_success; -+ data->phase2_success && data->phase2_auth != ALWAYS; - } - - -diff --git a/src/eap_peer/eap_tls_common.c b/src/eap_peer/eap_tls_common.c -index c1837db..a53eeb1 100644 ---- a/src/eap_peer/eap_tls_common.c -+++ b/src/eap_peer/eap_tls_common.c -@@ -239,6 +239,12 @@ static int eap_tls_params_from_conf(struct eap_sm *sm, - - sm->ext_cert_check = !!(params->flags & TLS_CONN_EXT_CERT_CHECK); - -+ if (!phase2) -+ data->client_cert_conf = params->client_cert || -+ params->client_cert_blob || -+ params->private_key || -+ params->private_key_blob; -+ - return 0; - } - -diff --git a/src/eap_peer/eap_tls_common.h b/src/eap_peer/eap_tls_common.h -index 9ac0012..3348634 100644 ---- a/src/eap_peer/eap_tls_common.h -+++ b/src/eap_peer/eap_tls_common.h -@@ -79,6 +79,11 @@ struct eap_ssl_data { - * tls_v13 - Whether TLS v1.3 or newer is used - */ - int tls_v13; -+ -+ /** -+ * client_cert_conf: Whether client certificate has been configured -+ */ -+ bool client_cert_conf; - }; - - --- -2.25.1 - diff --git a/sources/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/CVE-2024-3596_00.patch b/sources/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/CVE-2024-3596_00.patch deleted file mode 100644 index 58e1327f..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/CVE-2024-3596_00.patch +++ /dev/null @@ -1,83 +0,0 @@ -From 945acf3ef06a6c312927da4fa055693dbac432d1 Mon Sep 17 00:00:00 2001 -From: Jouni Malinen -Date: Sat, 2 Apr 2022 16:28:12 +0300 -Subject: [PATCH 1/9] ieee802_11_auth: Coding style cleanup - no string - constant splitting - -Signed-off-by: Jouni Malinen - -CVE: CVE-2024-3596 -Upstream-Status: Backport [https://w1.fi/cgit/hostap/commit/?id=945acf3ef06a6c312927da4fa055693dbac432d1] -Signed-off-by: Peter Marko ---- - src/ap/ieee802_11_auth.c | 27 +++++++++++++++------------ - 1 file changed, 15 insertions(+), 12 deletions(-) - -diff --git a/src/ap/ieee802_11_auth.c b/src/ap/ieee802_11_auth.c -index 783ee6dea..47cc625be 100644 ---- a/src/ap/ieee802_11_auth.c -+++ b/src/ap/ieee802_11_auth.c -@@ -267,16 +267,16 @@ int hostapd_allowed_address(struct hostapd_data *hapd, const u8 *addr, - os_get_reltime(&query->timestamp); - os_memcpy(query->addr, addr, ETH_ALEN); - if (hostapd_radius_acl_query(hapd, addr, query)) { -- wpa_printf(MSG_DEBUG, "Failed to send Access-Request " -- "for ACL query."); -+ wpa_printf(MSG_DEBUG, -+ "Failed to send Access-Request for ACL query."); - hostapd_acl_query_free(query); - return HOSTAPD_ACL_REJECT; - } - - query->auth_msg = os_memdup(msg, len); - if (query->auth_msg == NULL) { -- wpa_printf(MSG_ERROR, "Failed to allocate memory for " -- "auth frame."); -+ wpa_printf(MSG_ERROR, -+ "Failed to allocate memory for auth frame."); - hostapd_acl_query_free(query); - return HOSTAPD_ACL_REJECT; - } -@@ -467,19 +467,21 @@ hostapd_acl_recv_radius(struct radius_msg *msg, struct radius_msg *req, - if (query == NULL) - return RADIUS_RX_UNKNOWN; - -- wpa_printf(MSG_DEBUG, "Found matching Access-Request for RADIUS " -- "message (id=%d)", query->radius_id); -+ wpa_printf(MSG_DEBUG, -+ "Found matching Access-Request for RADIUS message (id=%d)", -+ query->radius_id); - - if (radius_msg_verify(msg, shared_secret, shared_secret_len, req, 0)) { -- wpa_printf(MSG_INFO, "Incoming RADIUS packet did not have " -- "correct authenticator - dropped\n"); -+ wpa_printf(MSG_INFO, -+ "Incoming RADIUS packet did not have correct authenticator - dropped"); - return RADIUS_RX_INVALID_AUTHENTICATOR; - } - - if (hdr->code != RADIUS_CODE_ACCESS_ACCEPT && - hdr->code != RADIUS_CODE_ACCESS_REJECT) { -- wpa_printf(MSG_DEBUG, "Unknown RADIUS message code %d to ACL " -- "query", hdr->code); -+ wpa_printf(MSG_DEBUG, -+ "Unknown RADIUS message code %d to ACL query", -+ hdr->code); - return RADIUS_RX_UNKNOWN; - } - -@@ -506,8 +508,9 @@ hostapd_acl_recv_radius(struct radius_msg *msg, struct radius_msg *req, - msg, RADIUS_ATTR_ACCT_INTERIM_INTERVAL, - &info->acct_interim_interval) == 0 && - info->acct_interim_interval < 60) { -- wpa_printf(MSG_DEBUG, "Ignored too small " -- "Acct-Interim-Interval %d for STA " MACSTR, -+ wpa_printf(MSG_DEBUG, -+ "Ignored too small Acct-Interim-Interval %d for STA " -+ MACSTR, - info->acct_interim_interval, - MAC2STR(query->addr)); - info->acct_interim_interval = 0; --- -2.30.2 - diff --git a/sources/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/CVE-2024-3596_01.patch b/sources/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/CVE-2024-3596_01.patch deleted file mode 100644 index dab2eedd..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/CVE-2024-3596_01.patch +++ /dev/null @@ -1,165 +0,0 @@ -From adac846bd0e258a0aa50750bbd2b411fa0085c46 Mon Sep 17 00:00:00 2001 -From: Jouni Malinen -Date: Sat, 16 Mar 2024 11:11:44 +0200 -Subject: [PATCH 2/9] RADIUS: Allow Message-Authenticator attribute as the - first attribute - -If a Message-Authenticator attribute was already added to a RADIUS -message, use that attribute instead of adding a new one when finishing -message building. This allows the Message-Authenticator attribute to be -placed as the first attribute in the message. - -Signed-off-by: Jouni Malinen - -CVE: CVE-2024-3596 -Upstream-Status: Backport [https://w1.fi/cgit/hostap/commit/?id=adac846bd0e258a0aa50750bbd2b411fa0085c46] -Signed-off-by: Peter Marko ---- - src/radius/radius.c | 85 ++++++++++++++++++++++++++++----------------- - src/radius/radius.h | 1 + - 2 files changed, 54 insertions(+), 32 deletions(-) - -diff --git a/src/radius/radius.c b/src/radius/radius.c -index be16e27b9..2d2e00b5c 100644 ---- a/src/radius/radius.c -+++ b/src/radius/radius.c -@@ -364,25 +364,54 @@ void radius_msg_dump(struct radius_msg *msg) - } - - -+u8 * radius_msg_add_msg_auth(struct radius_msg *msg) -+{ -+ u8 auth[MD5_MAC_LEN]; -+ struct radius_attr_hdr *attr; -+ -+ os_memset(auth, 0, MD5_MAC_LEN); -+ attr = radius_msg_add_attr(msg, RADIUS_ATTR_MESSAGE_AUTHENTICATOR, -+ auth, MD5_MAC_LEN); -+ if (!attr) { -+ wpa_printf(MSG_ERROR, -+ "WARNING: Could not add Message-Authenticator"); -+ return NULL; -+ } -+ -+ return (u8 *) (attr + 1); -+} -+ -+ -+static u8 * radius_msg_auth_pos(struct radius_msg *msg) -+{ -+ u8 *pos; -+ size_t alen; -+ -+ if (radius_msg_get_attr_ptr(msg, RADIUS_ATTR_MESSAGE_AUTHENTICATOR, -+ &pos, &alen, NULL) == 0 && -+ alen == MD5_MAC_LEN) { -+ /* Use already added Message-Authenticator attribute */ -+ return pos; -+ } -+ -+ /* Add a Message-Authenticator attribute */ -+ return radius_msg_add_msg_auth(msg); -+} -+ -+ - int radius_msg_finish(struct radius_msg *msg, const u8 *secret, - size_t secret_len) - { - if (secret) { -- u8 auth[MD5_MAC_LEN]; -- struct radius_attr_hdr *attr; -+ u8 *pos; - -- os_memset(auth, 0, MD5_MAC_LEN); -- attr = radius_msg_add_attr(msg, -- RADIUS_ATTR_MESSAGE_AUTHENTICATOR, -- auth, MD5_MAC_LEN); -- if (attr == NULL) { -- wpa_printf(MSG_WARNING, "RADIUS: Could not add " -- "Message-Authenticator"); -+ pos = radius_msg_auth_pos(msg); -+ if (!pos) - return -1; -- } - msg->hdr->length = host_to_be16(wpabuf_len(msg->buf)); -- hmac_md5(secret, secret_len, wpabuf_head(msg->buf), -- wpabuf_len(msg->buf), (u8 *) (attr + 1)); -+ if (hmac_md5(secret, secret_len, wpabuf_head(msg->buf), -+ wpabuf_len(msg->buf), pos) < 0) -+ return -1; - } else - msg->hdr->length = host_to_be16(wpabuf_len(msg->buf)); - -@@ -398,23 +427,19 @@ int radius_msg_finish(struct radius_msg *msg, const u8 *secret, - int radius_msg_finish_srv(struct radius_msg *msg, const u8 *secret, - size_t secret_len, const u8 *req_authenticator) - { -- u8 auth[MD5_MAC_LEN]; -- struct radius_attr_hdr *attr; - const u8 *addr[4]; - size_t len[4]; -+ u8 *pos; - -- os_memset(auth, 0, MD5_MAC_LEN); -- attr = radius_msg_add_attr(msg, RADIUS_ATTR_MESSAGE_AUTHENTICATOR, -- auth, MD5_MAC_LEN); -- if (attr == NULL) { -- wpa_printf(MSG_ERROR, "WARNING: Could not add Message-Authenticator"); -+ pos = radius_msg_auth_pos(msg); -+ if (!pos) - return -1; -- } - msg->hdr->length = host_to_be16(wpabuf_len(msg->buf)); - os_memcpy(msg->hdr->authenticator, req_authenticator, - sizeof(msg->hdr->authenticator)); -- hmac_md5(secret, secret_len, wpabuf_head(msg->buf), -- wpabuf_len(msg->buf), (u8 *) (attr + 1)); -+ if (hmac_md5(secret, secret_len, wpabuf_head(msg->buf), -+ wpabuf_len(msg->buf), pos) < 0) -+ return -1; - - /* ResponseAuth = MD5(Code+ID+Length+RequestAuth+Attributes+Secret) */ - addr[0] = (u8 *) msg->hdr; -@@ -442,21 +467,17 @@ int radius_msg_finish_das_resp(struct radius_msg *msg, const u8 *secret, - { - const u8 *addr[2]; - size_t len[2]; -- u8 auth[MD5_MAC_LEN]; -- struct radius_attr_hdr *attr; -+ u8 *pos; - -- os_memset(auth, 0, MD5_MAC_LEN); -- attr = radius_msg_add_attr(msg, RADIUS_ATTR_MESSAGE_AUTHENTICATOR, -- auth, MD5_MAC_LEN); -- if (attr == NULL) { -- wpa_printf(MSG_WARNING, "Could not add Message-Authenticator"); -+ pos = radius_msg_auth_pos(msg); -+ if (!pos) - return -1; -- } - - msg->hdr->length = host_to_be16(wpabuf_len(msg->buf)); - os_memcpy(msg->hdr->authenticator, req_hdr->authenticator, 16); -- hmac_md5(secret, secret_len, wpabuf_head(msg->buf), -- wpabuf_len(msg->buf), (u8 *) (attr + 1)); -+ if (hmac_md5(secret, secret_len, wpabuf_head(msg->buf), -+ wpabuf_len(msg->buf), pos) < 0) -+ return -1; - - /* ResponseAuth = MD5(Code+ID+Length+RequestAuth+Attributes+Secret) */ - addr[0] = wpabuf_head_u8(msg->buf); -diff --git a/src/radius/radius.h b/src/radius/radius.h -index fb8148180..6b9dfbca2 100644 ---- a/src/radius/radius.h -+++ b/src/radius/radius.h -@@ -240,6 +240,7 @@ struct wpabuf * radius_msg_get_buf(struct radius_msg *msg); - struct radius_msg * radius_msg_new(u8 code, u8 identifier); - void radius_msg_free(struct radius_msg *msg); - void radius_msg_dump(struct radius_msg *msg); -+u8 * radius_msg_add_msg_auth(struct radius_msg *msg); - int radius_msg_finish(struct radius_msg *msg, const u8 *secret, - size_t secret_len); - int radius_msg_finish_srv(struct radius_msg *msg, const u8 *secret, --- -2.30.2 - diff --git a/sources/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/CVE-2024-3596_02.patch b/sources/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/CVE-2024-3596_02.patch deleted file mode 100644 index 02e35bd6..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/CVE-2024-3596_02.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 54abb0d3cf35894e7d86e3f7555e95b106306803 Mon Sep 17 00:00:00 2001 -From: Jouni Malinen -Date: Sat, 16 Mar 2024 11:13:32 +0200 -Subject: [PATCH 3/9] RADIUS server: Place Message-Authenticator attribute as - the first one - -Move the Message-Authenticator attribute to be the first attribute in -the RADIUS messages. This mitigates certain MD5 attacks against -RADIUS/UDP. - -Signed-off-by: Jouni Malinen - -CVE: CVE-2024-3596 -Upstream-Status: Backport [https://w1.fi/cgit/hostap/commit/?id=54abb0d3cf35894e7d86e3f7555e95b106306803] -Signed-off-by: Peter Marko ---- - src/radius/radius_server.c | 15 +++++++++++++++ - 1 file changed, 15 insertions(+) - -diff --git a/src/radius/radius_server.c b/src/radius/radius_server.c -index e02c21540..fa3691548 100644 ---- a/src/radius/radius_server.c -+++ b/src/radius/radius_server.c -@@ -920,6 +920,11 @@ radius_server_encapsulate_eap(struct radius_server_data *data, - return NULL; - } - -+ if (!radius_msg_add_msg_auth(msg)) { -+ radius_msg_free(msg); -+ return NULL; -+ } -+ - sess_id = htonl(sess->sess_id); - if (code == RADIUS_CODE_ACCESS_CHALLENGE && - !radius_msg_add_attr(msg, RADIUS_ATTR_STATE, -@@ -1204,6 +1209,11 @@ radius_server_macacl(struct radius_server_data *data, - return NULL; - } - -+ if (!radius_msg_add_msg_auth(msg)) { -+ radius_msg_free(msg); -+ return NULL; -+ } -+ - if (radius_msg_copy_attr(msg, request, RADIUS_ATTR_PROXY_STATE) < 0) { - RADIUS_DEBUG("Failed to copy Proxy-State attribute(s)"); - radius_msg_free(msg); -@@ -1253,6 +1263,11 @@ static int radius_server_reject(struct radius_server_data *data, - return -1; - } - -+ if (!radius_msg_add_msg_auth(msg)) { -+ radius_msg_free(msg); -+ return -1; -+ } -+ - os_memset(&eapfail, 0, sizeof(eapfail)); - eapfail.code = EAP_CODE_FAILURE; - eapfail.identifier = 0; --- -2.30.2 - diff --git a/sources/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/CVE-2024-3596_04.patch b/sources/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/CVE-2024-3596_04.patch deleted file mode 100644 index ce499ce8..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/CVE-2024-3596_04.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 37fe8e48ab44d44fe3cf5dd8f52cb0a10be0cd17 Mon Sep 17 00:00:00 2001 -From: Jouni Malinen -Date: Sat, 16 Mar 2024 11:22:43 +0200 -Subject: [PATCH 5/9] hostapd: Move Message-Authenticator attribute to be the - first one in req - -Even if this is not strictly speaking necessary for mitigating certain -RADIUS protocol attacks, be consistent with the RADIUS server behavior -and move the Message-Authenticator attribute to be the first attribute -in the message from RADIUS client in hostapd. - -Signed-off-by: Jouni Malinen - -CVE: CVE-2024-3596 -Upstream-Status: Backport [https://w1.fi/cgit/hostap/commit/?id=37fe8e48ab44d44fe3cf5dd8f52cb0a10be0cd17] -Signed-off-by: Peter Marko ---- - src/ap/ieee802_11_auth.c | 3 +++ - src/ap/ieee802_1x.c | 3 +++ - 2 files changed, 6 insertions(+) - -diff --git a/src/ap/ieee802_11_auth.c b/src/ap/ieee802_11_auth.c -index 47cc625be..2a950cf7f 100644 ---- a/src/ap/ieee802_11_auth.c -+++ b/src/ap/ieee802_11_auth.c -@@ -119,6 +119,9 @@ static int hostapd_radius_acl_query(struct hostapd_data *hapd, const u8 *addr, - goto fail; - } - -+ if (!radius_msg_add_msg_auth(msg)) -+ goto fail; -+ - os_snprintf(buf, sizeof(buf), RADIUS_ADDR_FORMAT, MAC2STR(addr)); - if (!radius_msg_add_attr(msg, RADIUS_ATTR_USER_NAME, (u8 *) buf, - os_strlen(buf))) { -diff --git a/src/ap/ieee802_1x.c b/src/ap/ieee802_1x.c -index 753c88335..89e3dd30e 100644 ---- a/src/ap/ieee802_1x.c -+++ b/src/ap/ieee802_1x.c -@@ -702,6 +702,9 @@ void ieee802_1x_encapsulate_radius(struct hostapd_data *hapd, - goto fail; - } - -+ if (!radius_msg_add_msg_auth(msg)) -+ goto fail; -+ - if (sm->identity && - !radius_msg_add_attr(msg, RADIUS_ATTR_USER_NAME, - sm->identity, sm->identity_len)) { --- -2.30.2 - diff --git a/sources/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/CVE-2024-3596_05.patch b/sources/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/CVE-2024-3596_05.patch deleted file mode 100644 index 44113afd..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/CVE-2024-3596_05.patch +++ /dev/null @@ -1,51 +0,0 @@ -From f54157077f799d84ce26bed6ad6b01c4a16e31cf Mon Sep 17 00:00:00 2001 -From: Jouni Malinen -Date: Sat, 16 Mar 2024 11:26:58 +0200 -Subject: [PATCH 6/9] RADIUS DAS: Move Message-Authenticator attribute to be - the first one - -Even if this might not be strictly speaking necessary for mitigating -certain RADIUS protocol attacks, be consistent with the RADIUS server -behavior and move the Message-Authenticator attribute to be the first -attribute in the RADIUS DAS responses from hostapd. - -Signed-off-by: Jouni Malinen - -CVE: CVE-2024-3596 -Upstream-Status: Backport [https://w1.fi/cgit/hostap/commit/?id=f54157077f799d84ce26bed6ad6b01c4a16e31cf] -Signed-off-by: Peter Marko ---- - src/radius/radius_das.c | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/src/radius/radius_das.c b/src/radius/radius_das.c -index aaa3fc267..8d7c9b4c4 100644 ---- a/src/radius/radius_das.c -+++ b/src/radius/radius_das.c -@@ -177,6 +177,11 @@ fail: - if (reply == NULL) - return NULL; - -+ if (!radius_msg_add_msg_auth(reply)) { -+ radius_msg_free(reply); -+ return NULL; -+ } -+ - if (error) { - if (!radius_msg_add_attr_int32(reply, RADIUS_ATTR_ERROR_CAUSE, - error)) { -@@ -368,6 +373,11 @@ fail: - if (!reply) - return NULL; - -+ if (!radius_msg_add_msg_auth(reply)) { -+ radius_msg_free(reply); -+ return NULL; -+ } -+ - if (error && - !radius_msg_add_attr_int32(reply, RADIUS_ATTR_ERROR_CAUSE, error)) { - radius_msg_free(reply); --- -2.30.2 - diff --git a/sources/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/CVE-2024-3596_06.patch b/sources/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/CVE-2024-3596_06.patch deleted file mode 100644 index 9a284b52..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/CVE-2024-3596_06.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 934b0c3a45ce0726560ccefbd992a9d385c36385 Mon Sep 17 00:00:00 2001 -From: Jouni Malinen -Date: Sat, 16 Mar 2024 11:31:37 +0200 -Subject: [PATCH 7/9] Require Message-Authenticator in Access-Reject even - without EAP-Message - -Do not allow the exception for missing Message-Authenticator in -Access-Reject without EAP-Message. While such exception is allowed in -RADIUS definition, there is no strong reason to maintain this since -Access-Reject is supposed to include EAP-Message and even if it doesn't, -discarding Access-Reject will result in the connection not completing. - -Signed-off-by: Jouni Malinen - -CVE: CVE-2024-3596 -Upstream-Status: Backport [https://w1.fi/cgit/hostap/commit/?id=934b0c3a45ce0726560ccefbd992a9d385c36385] -Signed-off-by: Peter Marko ---- - src/ap/ieee802_1x.c | 11 +---------- - 1 file changed, 1 insertion(+), 10 deletions(-) - -diff --git a/src/ap/ieee802_1x.c b/src/ap/ieee802_1x.c -index 89e3dd30e..6e7b75128 100644 ---- a/src/ap/ieee802_1x.c -+++ b/src/ap/ieee802_1x.c -@@ -1939,16 +1939,7 @@ ieee802_1x_receive_auth(struct radius_msg *msg, struct radius_msg *req, - } - sta = sm->sta; - -- /* RFC 2869, Ch. 5.13: valid Message-Authenticator attribute MUST be -- * present when packet contains an EAP-Message attribute */ -- if (hdr->code == RADIUS_CODE_ACCESS_REJECT && -- radius_msg_get_attr(msg, RADIUS_ATTR_MESSAGE_AUTHENTICATOR, NULL, -- 0) < 0 && -- radius_msg_get_attr(msg, RADIUS_ATTR_EAP_MESSAGE, NULL, 0) < 0) { -- wpa_printf(MSG_DEBUG, -- "Allowing RADIUS Access-Reject without Message-Authenticator since it does not include EAP-Message"); -- } else if (radius_msg_verify(msg, shared_secret, shared_secret_len, -- req, 1)) { -+ if (radius_msg_verify(msg, shared_secret, shared_secret_len, req, 1)) { - wpa_printf(MSG_INFO, - "Incoming RADIUS packet did not have correct Message-Authenticator - dropped"); - return RADIUS_RX_INVALID_AUTHENTICATOR; --- -2.30.2 - diff --git a/sources/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/CVE-2024-3596_07.patch b/sources/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/CVE-2024-3596_07.patch deleted file mode 100644 index 78d3f5d5..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/CVE-2024-3596_07.patch +++ /dev/null @@ -1,105 +0,0 @@ -From 58097123ec5ea6f8276b38cb9b07669ec368a6c1 Mon Sep 17 00:00:00 2001 -From: Jouni Malinen -Date: Sun, 17 Mar 2024 10:42:56 +0200 -Subject: [PATCH 8/9] RADIUS: Require Message-Authenticator attribute in MAC - ACL cases - -hostapd required Message-Authenticator attribute to be included in EAP -authentication cases, but that requirement was not in place for MAC ACL -cases. Start requiring Message-Authenticator attribute for MAC ACL by -default. Unlike the EAP case, this can still be disabled with -radius_require_message_authenticator=1 to maintain compatibility with -some RADIUS servers when used in a network where the connection to such -a server is secure. - -Signed-off-by: Jouni Malinen - -CVE: CVE-2024-3596 -Upstream-Status: Backport [https://w1.fi/cgit/hostap/commit/?id=58097123ec5ea6f8276b38cb9b07669ec368a6c1] -Signed-off-by: Peter Marko ---- - hostapd/config_file.c | 3 +++ - hostapd/hostapd.conf | 11 +++++++++++ - src/ap/ap_config.c | 1 + - src/ap/ap_config.h | 1 + - src/ap/ieee802_11_auth.c | 4 +++- - 5 files changed, 19 insertions(+), 1 deletion(-) - -diff --git a/hostapd/config_file.c b/hostapd/config_file.c -index b14728d1b..af1e81d1d 100644 ---- a/hostapd/config_file.c -+++ b/hostapd/config_file.c -@@ -2806,6 +2806,9 @@ static int hostapd_config_fill(struct hostapd_config *conf, - bss->radius->acct_server->shared_secret_len = len; - } else if (os_strcmp(buf, "radius_retry_primary_interval") == 0) { - bss->radius->retry_primary_interval = atoi(pos); -+ } else if (os_strcmp(buf, -+ "radius_require_message_authenticator") == 0) { -+ bss->radius_require_message_authenticator = atoi(pos); - } else if (os_strcmp(buf, "radius_acct_interim_interval") == 0) { - bss->acct_interim_interval = atoi(pos); - } else if (os_strcmp(buf, "radius_request_cui") == 0) { -diff --git a/hostapd/hostapd.conf b/hostapd/hostapd.conf -index 3c2019f73..c055946a6 100644 ---- a/hostapd/hostapd.conf -+++ b/hostapd/hostapd.conf -@@ -1447,6 +1447,17 @@ own_ip_addr=127.0.0.1 - # currently used secondary server is still working. - #radius_retry_primary_interval=600 - -+# Message-Authenticator attribute requirement for non-EAP cases -+# hostapd requires Message-Authenticator attribute to be included in all cases -+# where RADIUS is used for EAP authentication. This is also required for cases -+# where RADIUS is used for MAC ACL (macaddr_acl=2) by default, but that case -+# can be configured to not require this for compatibility with RADIUS servers -+# that do not include the attribute. This is not recommended due to potential -+# security concerns, but can be used as a temporary workaround in networks where -+# the connection to the RADIUS server is secure. -+# 0 = Do not require Message-Authenticator in MAC ACL response -+# 1 = Require Message-Authenticator in all authentication cases (default) -+#radius_require_message_authenticator=1 - - # Interim accounting update interval - # If this is set (larger than 0) and acct_server is configured, hostapd will -diff --git a/src/ap/ap_config.c b/src/ap/ap_config.c -index 86b6e097c..cf497a180 100644 ---- a/src/ap/ap_config.c -+++ b/src/ap/ap_config.c -@@ -120,6 +120,7 @@ void hostapd_config_defaults_bss(struct hostapd_bss_config *bss) - #endif /* CONFIG_IEEE80211R_AP */ - - bss->radius_das_time_window = 300; -+ bss->radius_require_message_authenticator = 1; - - bss->anti_clogging_threshold = 5; - bss->sae_sync = 5; -diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h -index 49cd3168a..22ad617f4 100644 ---- a/src/ap/ap_config.h -+++ b/src/ap/ap_config.h -@@ -302,6 +302,7 @@ struct hostapd_bss_config { - struct hostapd_ip_addr own_ip_addr; - char *nas_identifier; - struct hostapd_radius_servers *radius; -+ int radius_require_message_authenticator; - int acct_interim_interval; - int radius_request_cui; - struct hostapd_radius_attr *radius_auth_req_attr; -diff --git a/src/ap/ieee802_11_auth.c b/src/ap/ieee802_11_auth.c -index 2a950cf7f..dab9bcde3 100644 ---- a/src/ap/ieee802_11_auth.c -+++ b/src/ap/ieee802_11_auth.c -@@ -474,7 +474,9 @@ hostapd_acl_recv_radius(struct radius_msg *msg, struct radius_msg *req, - "Found matching Access-Request for RADIUS message (id=%d)", - query->radius_id); - -- if (radius_msg_verify(msg, shared_secret, shared_secret_len, req, 0)) { -+ if (radius_msg_verify( -+ msg, shared_secret, shared_secret_len, req, -+ hapd->conf->radius_require_message_authenticator)) { - wpa_printf(MSG_INFO, - "Incoming RADIUS packet did not have correct authenticator - dropped"); - return RADIUS_RX_INVALID_AUTHENTICATOR; --- -2.30.2 - diff --git a/sources/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/CVE-2024-3596_08.patch b/sources/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/CVE-2024-3596_08.patch deleted file mode 100644 index e23d1e00..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/CVE-2024-3596_08.patch +++ /dev/null @@ -1,47 +0,0 @@ -From f302d9f9646704cce745734af21d540baa0da65f Mon Sep 17 00:00:00 2001 -From: Jouni Malinen -Date: Sun, 17 Mar 2024 10:47:58 +0200 -Subject: [PATCH 9/9] RADIUS: Check Message-Authenticator if it is present even - if not required - -Always check the Message-Authenticator attribute in a received RADIUS -message if it is present. Previously, this would have been skipped if -the attribute was not required to be present. - -Signed-off-by: Jouni Malinen - -CVE: CVE-2024-3596 -Upstream-Status: Backport [https://w1.fi/cgit/hostap/commit/?id=f302d9f9646704cce745734af21d540baa0da65f] -Signed-off-by: Peter Marko ---- - src/radius/radius.c | 14 ++++++++++++++ - 1 file changed, 14 insertions(+) - -diff --git a/src/radius/radius.c b/src/radius/radius.c -index 2d2e00b5c..a0e3ce399 100644 ---- a/src/radius/radius.c -+++ b/src/radius/radius.c -@@ -879,6 +879,20 @@ int radius_msg_verify(struct radius_msg *msg, const u8 *secret, - return 1; - } - -+ if (!auth) { -+ u8 *pos; -+ size_t alen; -+ -+ if (radius_msg_get_attr_ptr(msg, -+ RADIUS_ATTR_MESSAGE_AUTHENTICATOR, -+ &pos, &alen, NULL) == 0) { -+ /* Check the Message-Authenticator attribute since it -+ * was included even if we are configured to not -+ * require it. */ -+ auth = 1; -+ } -+ } -+ - if (auth && - radius_msg_verify_msg_auth(msg, secret, secret_len, - sent_msg->hdr->authenticator)) { --- -2.30.2 - diff --git a/sources/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd_2.10.bb b/sources/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd_2.10.bb deleted file mode 100644 index 5ef6ac64..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd_2.10.bb +++ /dev/null @@ -1,59 +0,0 @@ -SUMMARY = "User space daemon for extended IEEE 802.11 management" -HOMEPAGE = "http://w1.fi/hostapd/" -SECTION = "kernel/userland" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://hostapd/README;beginline=5;endline=47;md5=aa03b8bd6216d1a7ca01fd4b89863073" - -DEPENDS = "libnl openssl" - -SRC_URI = " \ - http://w1.fi/releases/hostapd-${PV}.tar.gz \ - file://defconfig \ - file://init \ - file://hostapd.service \ - file://CVE-2024-3596_00.patch \ - file://CVE-2024-3596_01.patch \ - file://CVE-2024-3596_02.patch \ - file://CVE-2024-3596_04.patch \ - file://CVE-2024-3596_05.patch \ - file://CVE-2024-3596_06.patch \ - file://CVE-2024-3596_07.patch \ - file://CVE-2024-3596_08.patch \ - file://0001-SAE-Check-for-invalid-Rejected-Groups-element-length.patch \ - file://0003-SAE-Reject-invalid-Rejected-Groups-element-in-the-pa.patch \ - file://CVE-2023-52160.patch \ -" - - -SRC_URI[sha256sum] = "206e7c799b678572c2e3d12030238784bc4a9f82323b0156b4c9466f1498915d" - -inherit update-rc.d systemd pkgconfig features_check - -CONFLICT_DISTRO_FEATURES = "openssl-no-weak-ciphers" - -INITSCRIPT_NAME = "hostapd" - -SYSTEMD_SERVICE:${PN} = "hostapd.service" -SYSTEMD_AUTO_ENABLE:${PN} = "disable" - -do_configure:append() { - install -m 0644 ${WORKDIR}/defconfig ${B}/hostapd/.config -} - -do_compile() { - export CFLAGS="-MMD -O2 -Wall -g" - export EXTRA_CFLAGS="${CFLAGS}" - make -C hostapd V=1 -} - -do_install() { - install -d ${D}${sbindir} ${D}${sysconfdir}/init.d ${D}${systemd_unitdir}/system/ - install -m 0644 ${B}/hostapd/hostapd.conf ${D}${sysconfdir} - install -m 0755 ${B}/hostapd/hostapd ${D}${sbindir} - install -m 0755 ${B}/hostapd/hostapd_cli ${D}${sbindir} - install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/hostapd - install -m 0644 ${WORKDIR}/hostapd.service ${D}${systemd_unitdir}/system/ - sed -i -e 's,@SBINDIR@,${sbindir},g' -e 's,@SYSCONFDIR@,${sysconfdir},g' ${D}${systemd_unitdir}/system/hostapd.service -} - -CONFFILES:${PN} += "${sysconfdir}/hostapd.conf" diff --git a/sources/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd_2.11.bb b/sources/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd_2.11.bb new file mode 100644 index 00000000..693afe6c --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd_2.11.bb @@ -0,0 +1,48 @@ +SUMMARY = "User space daemon for extended IEEE 802.11 management" +HOMEPAGE = "http://w1.fi/hostapd/" +SECTION = "kernel/userland" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://hostapd/README;beginline=5;endline=47;md5=8e2c69e491b28390f9de0df1f64ebd6d" + +DEPENDS = "libnl openssl" + +SRC_URI = " \ + http://w1.fi/releases/hostapd-${PV}.tar.gz \ + file://defconfig \ + file://init \ + file://hostapd.service \ +" + + +SRC_URI[sha256sum] = "2b3facb632fd4f65e32f4bf82a76b4b72c501f995a4f62e330219fe7aed1747a" + +inherit update-rc.d systemd pkgconfig features_check + +CONFLICT_DISTRO_FEATURES = "openssl-no-weak-ciphers" + +INITSCRIPT_NAME = "hostapd" + +SYSTEMD_SERVICE:${PN} = "hostapd.service" +SYSTEMD_AUTO_ENABLE:${PN} = "disable" + +do_configure:append() { + install -m 0644 ${UNPACKDIR}/defconfig ${B}/hostapd/.config +} + +do_compile() { + export CFLAGS="-MMD -O2 -Wall -g" + export EXTRA_CFLAGS="${CFLAGS}" + make -C hostapd V=1 +} + +do_install() { + install -d ${D}${sbindir} ${D}${sysconfdir}/init.d ${D}${systemd_unitdir}/system/ + install -m 0644 ${B}/hostapd/hostapd.conf ${D}${sysconfdir} + install -m 0755 ${B}/hostapd/hostapd ${D}${sbindir} + install -m 0755 ${B}/hostapd/hostapd_cli ${D}${sbindir} + install -m 755 ${UNPACKDIR}/init ${D}${sysconfdir}/init.d/hostapd + install -m 0644 ${UNPACKDIR}/hostapd.service ${D}${systemd_unitdir}/system/ + sed -i -e 's,@SBINDIR@,${sbindir},g' -e 's,@SYSCONFDIR@,${sysconfdir},g' ${D}${systemd_unitdir}/system/hostapd.service +} + +CONFFILES:${PN} += "${sysconfdir}/hostapd.conf" diff --git a/sources/meta-openembedded/meta-oe/recipes-connectivity/irssi/irssi_1.4.5.bb b/sources/meta-openembedded/meta-oe/recipes-connectivity/irssi/irssi_1.4.5.bb index 5b5af306..95dba3a4 100644 --- a/sources/meta-openembedded/meta-oe/recipes-connectivity/irssi/irssi_1.4.5.bb +++ b/sources/meta-openembedded/meta-oe/recipes-connectivity/irssi/irssi_1.4.5.bb @@ -9,6 +9,7 @@ SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/${PV}/${BP}.tar.xz SRC_URI[sha256sum] = "72a951cb0ad622785a8962801f005a3a412736c7e7e3ce152f176287c52fe062" UPSTREAM_CHECK_URI = "https://github.com/${BPN}/${BPN}/releases" +UPSTREAM_CHECK_REGEX = "(?P\d+(\.\d+)+)" inherit autotools pkgconfig diff --git a/sources/meta-openembedded/meta-oe/recipes-connectivity/iwd/iwd_2.16.bb b/sources/meta-openembedded/meta-oe/recipes-connectivity/iwd/iwd_2.16.bb deleted file mode 100644 index a6bb7085..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-connectivity/iwd/iwd_2.16.bb +++ /dev/null @@ -1,55 +0,0 @@ -SUMMARY = "Wireless daemon for Linux" -HOMEPAGE = "https://iwd.wiki.kernel.org/" -LICENSE = "LGPL-2.1-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=fb504b67c50331fc78734fed90fb0e09" - -DEPENDS = "ell" - -SRC_URI = "https://www.kernel.org/pub/linux/network/wireless/${BP}.tar.xz \ - file://0001-build-Use-abs_top_srcdir-instead-of-abs_srcdir-for-e.patch \ - " -SRC_URI[sha256sum] = "c1a82032e994861e794cf3b5a16d07ae1aa03a6674f716c73408ffeae2a233ba" - -inherit autotools manpages pkgconfig python3native systemd - -PACKAGECONFIG ??= " \ - client \ - monitor \ - ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \ -" -PACKAGECONFIG[client] = "--enable-client,--disable-client,readline" -PACKAGECONFIG[monitor] = "--enable-monitor,--disable-monitor" -PACKAGECONFIG[manpages] = "--enable-manual-pages,--disable-manual-pages,python3-docutils-native" -PACKAGECONFIG[wired] = "--enable-wired,--disable-wired" -PACKAGECONFIG[ofono] = "--enable-ofono,--disable-ofono" -PACKAGECONFIG[systemd] = "--with-systemd-unitdir=${systemd_system_unitdir},--disable-systemd-service,systemd" - -EXTRA_OECONF = "--enable-external-ell" - -SYSTEMD_SERVICE:${PN} = " \ - iwd.service \ - ${@bb.utils.contains('PACKAGECONFIG', 'wired', 'ead.service', '', d)} \ -" - -do_configure:prepend() { - install -d ${S}/build-aux -} - -do_install:append() { - # If client and monitor are disabled, bindir is empty, causing a QA error - rmdir --ignore-fail-on-non-empty ${D}/${bindir} -} - -FILES:${PN} += " \ - ${datadir}/dbus-1 \ - ${nonarch_libdir}/modules-load.d \ - ${systemd_unitdir}/network \ -" - -RDEPENDS:${PN} = "dbus" - -RRECOMMENDS:${PN} = "\ - kernel-module-pkcs7-message \ - kernel-module-pkcs8-key-parser \ - kernel-module-x509-key-parser \ -" diff --git a/sources/meta-openembedded/meta-oe/recipes-connectivity/iwd/iwd_2.20.bb b/sources/meta-openembedded/meta-oe/recipes-connectivity/iwd/iwd_2.20.bb new file mode 100644 index 00000000..16d900dd --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-connectivity/iwd/iwd_2.20.bb @@ -0,0 +1,53 @@ +SUMMARY = "Wireless daemon for Linux" +HOMEPAGE = "https://iwd.wiki.kernel.org/" +LICENSE = "LGPL-2.1-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=fb504b67c50331fc78734fed90fb0e09" + +DEPENDS = "dbus" + +SRC_URI = "https://www.kernel.org/pub/linux/network/wireless/${BP}.tar.xz \ + file://0001-build-Use-abs_top_srcdir-instead-of-abs_srcdir-for-e.patch \ + " +SRC_URI[sha256sum] = "86827b97cb5b19ddecce36568c59378da2fae8cf37a0e2b9eacd1269f24c6f8e" + +inherit autotools manpages pkgconfig python3native systemd + +PACKAGECONFIG ??= " \ + client \ + monitor \ + ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \ +" +PACKAGECONFIG[client] = "--enable-client,--disable-client,readline" +PACKAGECONFIG[monitor] = "--enable-monitor,--disable-monitor" +PACKAGECONFIG[manpages] = "--enable-manual-pages,--disable-manual-pages,python3-docutils-native" +PACKAGECONFIG[wired] = "--enable-wired,--disable-wired" +PACKAGECONFIG[ofono] = "--enable-ofono,--disable-ofono" +PACKAGECONFIG[systemd] = "--with-systemd-unitdir=${systemd_system_unitdir},--disable-systemd-service,systemd" + +SYSTEMD_SERVICE:${PN} = " \ + iwd.service \ + ${@bb.utils.contains('PACKAGECONFIG', 'wired', 'ead.service', '', d)} \ +" + +do_configure:prepend() { + install -d ${S}/build-aux +} + +do_install:append() { + # If client and monitor are disabled, bindir is empty, causing a QA error + rmdir --ignore-fail-on-non-empty ${D}/${bindir} +} + +FILES:${PN} += " \ + ${datadir}/dbus-1 \ + ${nonarch_libdir}/modules-load.d \ + ${systemd_unitdir}/network \ +" + +RDEPENDS:${PN} = "dbus" + +RRECOMMENDS:${PN} = "\ + kernel-module-pkcs7-message \ + kernel-module-pkcs8-key-parser \ + kernel-module-x509-key-parser \ +" diff --git a/sources/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/CVE-2025-24528.patch b/sources/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/CVE-2025-24528.patch deleted file mode 100644 index ac6039ed..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/CVE-2025-24528.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 78ceba024b64d49612375be4a12d1c066b0bfbd0 Mon Sep 17 00:00:00 2001 -From: Zoltan Borbely -Date: Tue, 28 Jan 2025 16:39:25 -0500 -Subject: [PATCH] Prevent overflow when calculating ulog block size - -In kdb_log.c:resize(), log an error and fail if the update size is -larger than the largest possible block size (2^16-1). - -CVE-2025-24528: - -In MIT krb5 release 1.7 and later with incremental propagation -enabled, an authenticated attacker can cause kadmind to write beyond -the end of the mapped region for the iprop log file, likely causing a -process crash. - -[ghudson@mit.edu: edited commit message and added CVE description] - -ticket: 9159 (new) -tags: pullup -target_version: 1.21-next - -CVE: CVE-2025-24528 - -Upstream-Status: Backport [https://github.com/krb5/krb5/commit/78ceba024b64d49612375be4a12d1c066b0bfbd0] - -Signed-off-by: Divya Chellam ---- - src/lib/kdb/kdb_log.c | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) - -diff --git a/src/lib/kdb/kdb_log.c b/src/lib/kdb/kdb_log.c -index 2659a25..68fae91 100644 ---- a/src/lib/kdb/kdb_log.c -+++ b/src/lib/kdb/kdb_log.c -@@ -183,7 +183,7 @@ extend_file_to(int fd, unsigned int new_size) - */ - static krb5_error_code - resize(kdb_hlog_t *ulog, uint32_t ulogentries, int ulogfd, -- unsigned int recsize) -+ unsigned int recsize, const kdb_incr_update_t *upd) - { - unsigned int new_block, new_size; - -@@ -195,6 +195,12 @@ resize(kdb_hlog_t *ulog, uint32_t ulogentries, int ulogfd, - new_block *= ULOG_BLOCK; - new_size += ulogentries * new_block; - -+ if (new_block > UINT16_MAX) { -+ syslog(LOG_ERR, _("ulog overflow caused by principal %.*s"), -+ upd->kdb_princ_name.utf8str_t_len, -+ upd->kdb_princ_name.utf8str_t_val); -+ return KRB5_LOG_ERROR; -+ } - if (new_size > MAXLOGLEN) - return KRB5_LOG_ERROR; - -@@ -291,7 +297,7 @@ store_update(kdb_log_context *log_ctx, kdb_incr_update_t *upd) - recsize = sizeof(kdb_ent_header_t) + upd_size; - - if (recsize > ulog->kdb_block) { -- retval = resize(ulog, ulogentries, log_ctx->ulogfd, recsize); -+ retval = resize(ulog, ulogentries, log_ctx->ulogfd, recsize, upd); - if (retval) - return retval; - } --- -2.40.0 - diff --git a/sources/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5_1.21.3.bb b/sources/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5_1.21.3.bb index 4742fe47..74891813 100644 --- a/sources/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5_1.21.3.bb +++ b/sources/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5_1.21.3.bb @@ -29,7 +29,6 @@ SRC_URI = "http://web.mit.edu/kerberos/dist/${BPN}/${SHRT_VER}/${BP}.tar.gz \ file://krb5-kdc.service \ file://krb5-admin-server.service \ file://CVE-2024-26458_CVE-2024-26461.patch;striplevel=2 \ - file://CVE-2025-24528.patch;striplevel=2 \ " SRC_URI[sha256sum] = "b7a4cd5ead67fb08b980b21abd150ff7217e85ea320c9ed0c6dadd304840ad35" @@ -76,8 +75,8 @@ do_install:append() { if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then mkdir -p ${D}/${sysconfdir}/init.d ${D}/${sysconfdir}/default - install -m 0755 ${WORKDIR}/etc/init.d/* ${D}/${sysconfdir}/init.d - install -m 0644 ${WORKDIR}/etc/default/* ${D}/${sysconfdir}/default + install -m 0755 ${UNPACKDIR}/etc/init.d/* ${D}/${sysconfdir}/init.d + install -m 0644 ${UNPACKDIR}/etc/default/* ${D}/${sysconfdir}/default mkdir -p ${D}/${sysconfdir}/default/volatiles echo "d root root 0755 ${localstatedir}/run/krb5kdc none" \ @@ -92,11 +91,11 @@ do_install:append() { > ${D}${sysconfdir}/tmpfiles.d/krb5.conf mkdir -p ${D}/${sysconfdir}/default - install -m 0644 ${WORKDIR}/etc/default/* ${D}/${sysconfdir}/default + install -m 0644 ${UNPACKDIR}/etc/default/* ${D}/${sysconfdir}/default install -d ${D}${systemd_system_unitdir} - install -m 0644 ${WORKDIR}/krb5-admin-server.service ${D}${systemd_system_unitdir} - install -m 0644 ${WORKDIR}/krb5-kdc.service ${D}${systemd_system_unitdir} + install -m 0644 ${UNPACKDIR}/krb5-admin-server.service ${D}${systemd_system_unitdir} + install -m 0644 ${UNPACKDIR}/krb5-kdc.service ${D}${systemd_system_unitdir} fi sed -e 's@[^ ]*-ffile-prefix-map=[^ "]*@@g' \ diff --git a/sources/meta-openembedded/meta-oe/recipes-connectivity/libimobiledevice-glue/libimobiledevice-glue_1.3.0.bb b/sources/meta-openembedded/meta-oe/recipes-connectivity/libimobiledevice-glue/libimobiledevice-glue_1.3.0.bb new file mode 100644 index 00000000..8bd555d9 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-connectivity/libimobiledevice-glue/libimobiledevice-glue_1.3.0.bb @@ -0,0 +1,15 @@ +SUMMARY = "Library with common code used by the libraries and tools around the libimobiledevice project" +LICENSE = "LGPL-2.1-or-later" +LIC_FILES_CHKSUM = "\ + file://COPYING;md5=6ab17b41640564434dda85c06b7124f7 \ +" + +HOMEPAGE = "http://www.libimobiledevice.org/" + +DEPENDS = "libplist" + +SRCREV = "362f7848ac89b74d9dd113b38b51ecb601f76094" +SRC_URI = "git://github.com/libimobiledevice/libimobiledevice-glue;protocol=https;branch=master" + +S = "${WORKDIR}/git" +inherit autotools pkgconfig diff --git a/sources/meta-openembedded/meta-oe/recipes-connectivity/libimobiledevice-glue/libimobiledevice-glue_git.bb b/sources/meta-openembedded/meta-oe/recipes-connectivity/libimobiledevice-glue/libimobiledevice-glue_git.bb deleted file mode 100644 index d37c547c..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-connectivity/libimobiledevice-glue/libimobiledevice-glue_git.bb +++ /dev/null @@ -1,17 +0,0 @@ -SUMMARY = "Library with common code used by the libraries and tools around the libimobiledevice project" -LICENSE = "LGPL-2.1-or-later" -LIC_FILES_CHKSUM = "\ - file://COPYING;md5=6ab17b41640564434dda85c06b7124f7 \ -" - -HOMEPAGE = "http://www.libimobiledevice.org/" - -DEPENDS = "libplist" - -PV = "1.0.0+git" - -SRCREV = "114098d30e783fbb3def5c9b49427a86621cfcb1" -SRC_URI = "git://github.com/libimobiledevice/libimobiledevice-glue;protocol=https;branch=master" - -S = "${WORKDIR}/git" -inherit autotools pkgconfig diff --git a/sources/meta-openembedded/meta-oe/recipes-connectivity/libirecovery/libirecovery_1.2.0.bb b/sources/meta-openembedded/meta-oe/recipes-connectivity/libirecovery/libirecovery_1.2.0.bb new file mode 100644 index 00000000..29f67d39 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-connectivity/libirecovery/libirecovery_1.2.0.bb @@ -0,0 +1,15 @@ +SUMMARY = "The libirecovery library allows communication with iBoot/iBSS of iOS devices via USB" +LICENSE = "LGPL-2.1-or-later" +LIC_FILES_CHKSUM = "\ + file://COPYING;md5=23c2a5e0106b99d75238986559bb5fc6 \ +" + +HOMEPAGE = "http://www.libimobiledevice.org/" + +DEPENDS = "libimobiledevice-glue libusb1 readline" + +SRCREV = "2254dab893ec439f9a73235ea07194afa77399db" +SRC_URI = "git://github.com/libimobiledevice/libirecovery;protocol=https;branch=master" + +S = "${WORKDIR}/git" +inherit autotools pkgconfig diff --git a/sources/meta-openembedded/meta-oe/recipes-connectivity/libirecovery/libirecovery_git.bb b/sources/meta-openembedded/meta-oe/recipes-connectivity/libirecovery/libirecovery_git.bb deleted file mode 100644 index 24001959..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-connectivity/libirecovery/libirecovery_git.bb +++ /dev/null @@ -1,17 +0,0 @@ -SUMMARY = "The libirecovery library allows communication with iBoot/iBSS of iOS devices via USB" -LICENSE = "LGPL-2.1-or-later" -LIC_FILES_CHKSUM = "\ - file://COPYING;md5=23c2a5e0106b99d75238986559bb5fc6 \ -" - -HOMEPAGE = "http://www.libimobiledevice.org/" - -DEPENDS = "libimobiledevice-glue libusb1 readline" - -PV = "1.1.0" - -SRCREV = "98c9f7055ec1f2e09fac69ef1413a8757113b838" -SRC_URI = "git://github.com/libimobiledevice/libirecovery;protocol=https;branch=master" - -S = "${WORKDIR}/git" -inherit autotools pkgconfig diff --git a/sources/meta-openembedded/meta-oe/recipes-connectivity/libmtp/libmtp_1.1.21.bb b/sources/meta-openembedded/meta-oe/recipes-connectivity/libmtp/libmtp_1.1.21.bb index 94cbef8f..16f82c6b 100644 --- a/sources/meta-openembedded/meta-oe/recipes-connectivity/libmtp/libmtp_1.1.21.bb +++ b/sources/meta-openembedded/meta-oe/recipes-connectivity/libmtp/libmtp_1.1.21.bb @@ -21,6 +21,9 @@ SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/v${PV}/${BP}.tar.g SRC_URI:append:class-target = " file://0001-Use-native-mtp-hotplug.patch" SRC_URI[sha256sum] = "f4c1ceb3df020a6cb851110f620c14fe399518c494ed252039cbfb4e34335135" +UPSTREAM_CHECK_URI = "https://github.com/libmtp/libmtp/releases" +UPSTREAM_CHECK_REGEX = "(?P\d+(\.\d+)+)" + inherit autotools pkgconfig lib_package EXTRA_OECONF += " \ diff --git a/sources/meta-openembedded/meta-oe/recipes-connectivity/libndp/libndp/0001-libndp-Fix-signature-of-sendto-API.patch b/sources/meta-openembedded/meta-oe/recipes-connectivity/libndp/libndp/0001-libndp-Fix-signature-of-sendto-API.patch new file mode 100644 index 00000000..f625416a --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-connectivity/libndp/libndp/0001-libndp-Fix-signature-of-sendto-API.patch @@ -0,0 +1,40 @@ +From 14e036b5daf6b72483a1a21054b5133acabceabe Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 17 May 2024 18:14:04 -0700 +Subject: [PATCH] libndp: Fix signature of sendto API + +This fixes build with musl/gcc-14 + +| ../../git/libndp/libndp.c: In function 'mysendto6': +| ../../git/libndp/libndp.c:212:50: error: passing argument 5 of 'sendto' from incompatible pointer type [-Wincompatible-pointer-types] +| 212 | ret = sendto(sockfd, buf, buflen, flags, &sin6, sizeof(sin6)); +| | ^~~~~ +| | | +| | struct sockaddr_in6 * +| In file included from ../../git/libndp/libndp.c:27: +| /mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux-musl/libndp/1.8/recipe-sysroot/usr/include/sys/socket.h:396:49: note: expected 'const struct sockaddr *' but argument is of type 'struct sockaddr_in6 *' +| 396 | ssize_t sendto (int, const void *, size_t, int, const struct sockaddr *, socklen_t); +| | ^~~~~~~~~~~~~~~~~~~~~~~ + +Upstream-Status: Submitted [Sent to maintainer] +Signed-off-by: Khem Raj +--- + libndp/libndp.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libndp/libndp.c b/libndp/libndp.c +index 6314717..056df0f 100644 +--- a/libndp/libndp.c ++++ b/libndp/libndp.c +@@ -209,7 +209,7 @@ static int mysendto6(int sockfd, void *buf, size_t buflen, int flags, + memcpy(&sin6.sin6_addr, addr, sizeof(sin6.sin6_addr)); + sin6.sin6_scope_id = ifindex; + resend: +- ret = sendto(sockfd, buf, buflen, flags, &sin6, sizeof(sin6)); ++ ret = sendto(sockfd, buf, buflen, flags, (struct sockaddr*)&sin6, sizeof(sin6)); + if (ret == -1) { + switch(errno) { + case EINTR: +-- +2.45.1 + diff --git a/sources/meta-openembedded/meta-oe/recipes-connectivity/libndp/libndp/CVE-2024-5564.patch b/sources/meta-openembedded/meta-oe/recipes-connectivity/libndp/libndp/CVE-2024-5564.patch deleted file mode 100644 index fe7ce41b..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-connectivity/libndp/libndp/CVE-2024-5564.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 05e4ba7b0d126eea4c04387dcf40596059ee24af Mon Sep 17 00:00:00 2001 -From: Hangbin Liu -Date: Wed, 5 Jun 2024 11:57:43 +0800 -Subject: [PATCH] libndp: valid route information option length - -RFC 4191 specifies that the Route Information Option Length should be 1, 2, -or 3, depending on the Prefix Length. A malicious node could potentially -trigger a buffer overflow and crash the tool by sending an IPv6 router -advertisement message containing the "Route Information" option with a -"Length" field larger than 3. - -To address this, add a check on the length field. - -Fixes: 8296a5bf0755 ("add support for Route Information Option (rfc4191)") -Reported-by: Evgeny Vereshchagin -Suggested-by: Felix Maurer -Signed-off-by: Hangbin Liu -Signed-off-by: Jiri Pirko - -CVE: CVE-2024-5564 -Upstream-Status: Backport [https://github.com/jpirko/libndp/commit/05e4ba7b0d126eea4c04387dcf40596059ee24af] -Signed-off-by: Peter Marko ---- - libndp/libndp.c | 11 +++++++++++ - 1 file changed, 11 insertions(+) - -diff --git a/libndp/libndp.c b/libndp/libndp.c -index 6314717..72ec92e 100644 ---- a/libndp/libndp.c -+++ b/libndp/libndp.c -@@ -1231,6 +1231,17 @@ static bool ndp_msg_opt_route_check_valid(void *opt_data) - */ - if (((ri->nd_opt_ri_prf_reserved >> 3) & 3) == 2) - return false; -+ -+ /* The Length field is 1, 2, or 3 depending on the Prefix Length. -+ * If Prefix Length is greater than 64, then Length must be 3. -+ * If Prefix Length is greater than 0, then Length must be 2 or 3. -+ * If Prefix Length is zero, then Length must be 1, 2, or 3. -+ */ -+ if (ri->nd_opt_ri_len > 3 || -+ (ri->nd_opt_ri_prefix_len > 64 && ri->nd_opt_ri_len != 3) || -+ (ri->nd_opt_ri_prefix_len > 0 && ri->nd_opt_ri_len == 1)) -+ return false; -+ - return true; - } - diff --git a/sources/meta-openembedded/meta-oe/recipes-connectivity/libndp/libndp_1.8.bb b/sources/meta-openembedded/meta-oe/recipes-connectivity/libndp/libndp_1.8.bb deleted file mode 100644 index 70d6abec..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-connectivity/libndp/libndp_1.8.bb +++ /dev/null @@ -1,13 +0,0 @@ -SUMMARY = "Library for IPv6 Neighbor Discovery Protocol" -HOMEPAGE = "http://libndp.org/" -LICENSE = "LGPL-2.1-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" - -SRC_URI = "git://github.com/jpirko/libndp;branch=master;protocol=https \ - file://CVE-2024-5564.patch \ - " -# tag for v1.8 -SRCREV = "009ce9cd9b950ffa1f4f94c9436027b936850d0c" -S = "${WORKDIR}/git" - -inherit autotools diff --git a/sources/meta-openembedded/meta-oe/recipes-connectivity/libndp/libndp_1.9.bb b/sources/meta-openembedded/meta-oe/recipes-connectivity/libndp/libndp_1.9.bb new file mode 100644 index 00000000..69eecdd9 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-connectivity/libndp/libndp_1.9.bb @@ -0,0 +1,13 @@ +SUMMARY = "Library for IPv6 Neighbor Discovery Protocol" +HOMEPAGE = "http://libndp.org/" +LICENSE = "LGPL-2.1-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" + +SRC_URI = "git://github.com/jpirko/libndp;branch=master;protocol=https \ + file://0001-libndp-Fix-signature-of-sendto-API.patch \ + " +# tag for v1.8 +SRCREV = "2730638bf88984b09531813974f9bd14e1a50165" +S = "${WORKDIR}/git" + +inherit autotools diff --git a/sources/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp_4.1.bb b/sources/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp_4.1.bb index 9a5c9b52..d1a73841 100644 --- a/sources/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp_4.1.bb +++ b/sources/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp_4.1.bb @@ -46,10 +46,10 @@ do_install() { install -d ${D}/${systemd_unitdir}/system/ for service in ${LINUXPTP_SYSTEMD_SERVICES}; do sed -i -e 's,@SBINDIR@,${sbindir},g' \ - ${WORKDIR}/systemd/$service.in + ${UNPACKDIR}/systemd/$service.in sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' \ - ${WORKDIR}/systemd/$service.in - install -m 644 ${WORKDIR}/systemd/$service.in \ + ${UNPACKDIR}/systemd/$service.in + install -m 644 ${UNPACKDIR}/systemd/$service.in \ ${D}/${systemd_unitdir}/system/$service done } diff --git a/sources/meta-openembedded/meta-oe/recipes-connectivity/mosh/mosh_1.4.0.bb b/sources/meta-openembedded/meta-oe/recipes-connectivity/mosh/mosh_1.4.0.bb index 693ec12d..bea22b18 100644 --- a/sources/meta-openembedded/meta-oe/recipes-connectivity/mosh/mosh_1.4.0.bb +++ b/sources/meta-openembedded/meta-oe/recipes-connectivity/mosh/mosh_1.4.0.bb @@ -48,3 +48,4 @@ RDEPENDS:${PN}-server += "openssh-sshd" ARM_INSTRUCTION_SET = "arm" CXXFLAGS:append = " -std=c++17" +LDFLAGS:append:riscv32 = " -latomic" diff --git a/sources/meta-openembedded/meta-oe/recipes-connectivity/obex/openobex_1.7.2.bb b/sources/meta-openembedded/meta-oe/recipes-connectivity/obex/openobex_1.7.2.bb index 73482749..7d373a65 100644 --- a/sources/meta-openembedded/meta-oe/recipes-connectivity/obex/openobex_1.7.2.bb +++ b/sources/meta-openembedded/meta-oe/recipes-connectivity/obex/openobex_1.7.2.bb @@ -15,6 +15,9 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}/${PV}/${BP}-Source.tar.gz \ SRC_URI[md5sum] = "f6e0b6cb7dcfd731460a7e9a91429a3a" SRC_URI[sha256sum] = "158860aaea52f0fce0c8e4b64550daaae06df2689e05834697b7e8c7d73dd4fc" +UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/openobex/files/openobex/" +UPSTREAM_CHECK_REGEX = "${BPN}/(?P\d+(\.\d+)+)" + S = "${WORKDIR}/${BP}-Source" inherit cmake pkgconfig diff --git a/sources/meta-openembedded/meta-oe/recipes-connectivity/obexftp/obexftp_0.24.2.bb b/sources/meta-openembedded/meta-oe/recipes-connectivity/obexftp/obexftp_0.24.2.bb index f7a98fb6..01836590 100644 --- a/sources/meta-openembedded/meta-oe/recipes-connectivity/obexftp/obexftp_0.24.2.bb +++ b/sources/meta-openembedded/meta-oe/recipes-connectivity/obexftp/obexftp_0.24.2.bb @@ -14,6 +14,9 @@ SRC_URI = "http://downloads.sourceforge.net/openobex/${BP}-Source.tar.gz \ SRC_URI[md5sum] = "157a9d1b2ed220203f7084db906de73c" SRC_URI[sha256sum] = "d40fb48e0a0eea997b3e582774b29f793919a625d54b87182e31a3f3d1c989a3" +UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/openobex/files/obexftp/" +UPSTREAM_CHECK_REGEX = "${BPN}/(?P\d+(\.\d+)+)" + inherit cmake pkgconfig OECMAKE_GENERATOR = "Unix Makefiles" diff --git a/sources/meta-openembedded/meta-oe/recipes-connectivity/paho-mqtt-cpp/paho-mqtt-cpp/0001-cmake-Use-CMAKE_INSTALL_LIBDIR-and-CMAKE_INSTALL_BIN.patch b/sources/meta-openembedded/meta-oe/recipes-connectivity/paho-mqtt-cpp/paho-mqtt-cpp/0001-cmake-Use-CMAKE_INSTALL_LIBDIR-and-CMAKE_INSTALL_BIN.patch index fba9a876..a881c834 100644 --- a/sources/meta-openembedded/meta-oe/recipes-connectivity/paho-mqtt-cpp/paho-mqtt-cpp/0001-cmake-Use-CMAKE_INSTALL_LIBDIR-and-CMAKE_INSTALL_BIN.patch +++ b/sources/meta-openembedded/meta-oe/recipes-connectivity/paho-mqtt-cpp/paho-mqtt-cpp/0001-cmake-Use-CMAKE_INSTALL_LIBDIR-and-CMAKE_INSTALL_BIN.patch @@ -13,47 +13,41 @@ Upstream-Status: Pending src/samples/CMakeLists.txt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) -diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt -index a9f8908..7eadc60 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt -@@ -11,7 +11,7 @@ export(EXPORT ${package_name} - FILE "${CMAKE_CURRENT_BINARY_DIR}/${package_name}Targets.cmake" - NAMESPACE ${package_name}::) - --install(EXPORT ${package_name} DESTINATION lib/cmake/${package_name} -+install(EXPORT ${package_name} DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${package_name} - FILE ${package_name}Targets.cmake - NAMESPACE ${package_name}::) +@@ -34,7 +34,7 @@ export(EXPORT ${package_name} + ) -@@ -19,4 +19,4 @@ install(FILES - "${CMAKE_CURRENT_BINARY_DIR}/${package_name}Config.cmake" - FindPahoMqttC.cmake - "${CMAKE_CURRENT_BINARY_DIR}/${package_name}ConfigVersion.cmake" -- DESTINATION lib/cmake/${package_name}) -+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${package_name}) -diff --git a/src/samples/CMakeLists.txt b/src/samples/CMakeLists.txt -index 3ca0a75..c915cd5 100644 ---- a/src/samples/CMakeLists.txt -+++ b/src/samples/CMakeLists.txt -@@ -71,7 +71,7 @@ endforeach() + install(EXPORT ${package_name} +- DESTINATION lib/cmake/${package_name} ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${package_name} + FILE ${package_name}Targets.cmake + NAMESPACE ${package_name}:: + ) +@@ -42,5 +42,5 @@ install(EXPORT ${package_name} + install(FILES + "${CMAKE_CURRENT_BINARY_DIR}/${package_name}Config.cmake" + "${CMAKE_CURRENT_BINARY_DIR}/${package_name}ConfigVersion.cmake" +- DESTINATION lib/cmake/${package_name} ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${package_name} + ) +--- a/examples/CMakeLists.txt ++++ b/examples/CMakeLists.txt +@@ -65,7 +65,7 @@ endforeach() ## install binaries install(TARGETS ${EXECUTABLES} EXPORT PahoMqttCppSamples -- RUNTIME DESTINATION bin -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} +- RUNTIME DESTINATION bin ++ RUNTIME DESTINATION {CMAKE_INSTALL_BINDIR} ) ## Build the SSL/TLS samples, if selected -@@ -89,7 +89,7 @@ if(PAHO_WITH_SSL) - endforeach() +@@ -80,7 +80,7 @@ if(PAHO_WITH_SSL) + endforeach() - install(TARGETS ${SSL_EXECUTABLES} EXPORT PahoMqttCppSamples -- RUNTIME DESTINATION bin -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - ) + install(TARGETS ${SSL_EXECUTABLES} EXPORT PahoMqttCppSamples +- RUNTIME DESTINATION bin ++ RUNTIME DESTINATION {CMAKE_INSTALL_BINDIR} + ) endif() --- -2.34.1 - diff --git a/sources/meta-openembedded/meta-oe/recipes-connectivity/paho-mqtt-cpp/paho-mqtt-cpp_1.3.2.bb b/sources/meta-openembedded/meta-oe/recipes-connectivity/paho-mqtt-cpp/paho-mqtt-cpp_1.3.2.bb deleted file mode 100644 index 1b2e51c3..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-connectivity/paho-mqtt-cpp/paho-mqtt-cpp_1.3.2.bb +++ /dev/null @@ -1,24 +0,0 @@ -SUMMARY = "Paho MQTT - C++ libraries for the MQTT and MQTT-SN protocols" -DESCRIPTION = "Client implementation of open and standard messaging protocols for Machine-to-Machine (M2M) and Internet of Things (IoT)." -HOMEPAGE = "http://www.eclipse.org/paho/" -SECTION = "console/network" -LICENSE = "EPL-2.0 | EDL-1.0" - -LIC_FILES_CHKSUM = " \ - file://src/mqtt/message.h;beginline=9;endline=18;md5=c5ceecf5ab99d44dcfaaabdce289071b \ - file://edl-v10;md5=3adfcc70f5aeb7a44f3f9b495aa1fbf3 \ - file://epl-v20;md5=d9fc0efef5228704e7f5b37f27192723 \ -" - -SRC_URI = "git://github.com/eclipse/paho.mqtt.cpp;protocol=https;branch=v1.3.x \ - file://0001-cmake-Use-CMAKE_INSTALL_LIBDIR-and-CMAKE_INSTALL_BIN.patch \ - " -SRCREV = "5e0d1bf37b4826d680ec066ec42afd133851a681" - -DEPENDS = "openssl paho-mqtt-c" - -S = "${WORKDIR}/git" - -inherit cmake - -EXTRA_OECMAKE += "-DPAHO_WITH_SSL=ON" diff --git a/sources/meta-openembedded/meta-oe/recipes-connectivity/paho-mqtt-cpp/paho-mqtt-cpp_1.4.1.bb b/sources/meta-openembedded/meta-oe/recipes-connectivity/paho-mqtt-cpp/paho-mqtt-cpp_1.4.1.bb new file mode 100644 index 00000000..6f2efcda --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-connectivity/paho-mqtt-cpp/paho-mqtt-cpp_1.4.1.bb @@ -0,0 +1,25 @@ +SUMMARY = "Paho MQTT - C++ libraries for the MQTT and MQTT-SN protocols" +DESCRIPTION = "Client implementation of open and standard messaging protocols for Machine-to-Machine (M2M) and Internet of Things (IoT)." +HOMEPAGE = "http://www.eclipse.org/paho/" +SECTION = "console/network" +LICENSE = "EPL-2.0 | EDL-1.0" + +LIC_FILES_CHKSUM = " \ + file://LICENSE;md5=c0fa3a632eea67f4079c54df781d1441 \ + file://edl-v10;md5=3adfcc70f5aeb7a44f3f9b495aa1fbf3 \ + file://epl-v20;md5=d9fc0efef5228704e7f5b37f27192723 \ +" + +SRC_URI = "gitsm://github.com/eclipse/paho.mqtt.cpp;protocol=https;branch=v1.4.x \ + file://0001-cmake-Use-CMAKE_INSTALL_LIBDIR-and-CMAKE_INSTALL_BIN.patch \ + " +SRCREV = "ac1b023eab789e829656144f12b248602c40e37b" +PV .= "+git" + +DEPENDS = "openssl paho-mqtt-c" + +S = "${WORKDIR}/git" + +inherit cmake + +EXTRA_OECMAKE += "-DPAHO_WITH_SSL=ON -DPAHO_BUILD_EXAMPLES=OFF" diff --git a/sources/meta-openembedded/meta-oe/recipes-connectivity/ser2net/ser2net_4.6.1.bb b/sources/meta-openembedded/meta-oe/recipes-connectivity/ser2net/ser2net_4.6.1.bb deleted file mode 100644 index e5ebafa5..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-connectivity/ser2net/ser2net_4.6.1.bb +++ /dev/null @@ -1,30 +0,0 @@ -SUMMARY = "A serial to network proxy" -SECTION = "console/network" -HOMEPAGE = "http://sourceforge.net/projects/ser2net/" - -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" - -DEPENDS = "gensio libyaml" - -SRC_URI = "${SOURCEFORGE_MIRROR}/project/ser2net/ser2net/ser2net-${PV}.tar.gz \ - file://ser2net.service \ -" - -SRC_URI[sha256sum] = "78ffee19d9b97e93ae65b5cec072da2b7b947fc484e9ccb3f535702f36f6ed19" - -UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/ser2net/files/ser2net" - -inherit autotools pkgconfig systemd - -SYSTEMD_SERVICE:${PN} = "ser2net.service" - -CONFFILES:${PN} += "${sysconfdir}/ser2net/ser2net.yaml" - -do_install:append() { - if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then - install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/ser2net.service ${D}${systemd_unitdir}/system/ - sed -i -e 's,@SBINDIR@,${sbindir},g' -e 's,@SYSCONFDIR@,${sysconfdir},g' ${D}${systemd_unitdir}/system/ser2net.service - fi -} diff --git a/sources/meta-openembedded/meta-oe/recipes-connectivity/ser2net/ser2net_4.6.2.bb b/sources/meta-openembedded/meta-oe/recipes-connectivity/ser2net/ser2net_4.6.2.bb new file mode 100644 index 00000000..f2369281 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-connectivity/ser2net/ser2net_4.6.2.bb @@ -0,0 +1,30 @@ +SUMMARY = "A serial to network proxy" +SECTION = "console/network" +HOMEPAGE = "http://sourceforge.net/projects/ser2net/" + +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +DEPENDS = "gensio libyaml" + +SRC_URI = "${SOURCEFORGE_MIRROR}/project/ser2net/ser2net/ser2net-${PV}.tar.gz \ + file://ser2net.service \ +" + +SRC_URI[sha256sum] = "63bafcd65bb9270a93b7d5cdde58ccf4d279603ff6d044ac4b484a257cda82ce" + +UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/ser2net/files/ser2net" + +inherit autotools pkgconfig systemd + +SYSTEMD_SERVICE:${PN} = "ser2net.service" + +CONFFILES:${PN} += "${sysconfdir}/ser2net/ser2net.yaml" + +do_install:append() { + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${UNPACKDIR}/ser2net.service ${D}${systemd_unitdir}/system/ + sed -i -e 's,@SBINDIR@,${sbindir},g' -e 's,@SYSCONFDIR@,${sysconfdir},g' ${D}${systemd_unitdir}/system/ser2net.service + fi +} diff --git a/sources/meta-openembedded/meta-oe/recipes-connectivity/thrift/thrift/0001-thrift-pr2755.patch b/sources/meta-openembedded/meta-oe/recipes-connectivity/thrift/thrift/0001-thrift-pr2755.patch deleted file mode 100644 index b685d427..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-connectivity/thrift/thrift/0001-thrift-pr2755.patch +++ /dev/null @@ -1,599 +0,0 @@ -From f02ac2fb573bed72e9a2d1875807c6ff7ac19ec8 Mon Sep 17 00:00:00 2001 -From: Lukas Barth -Date: Wed, 8 Feb 2023 09:33:03 +0100 -Subject: [PATCH 1/5] Move default constructor and operator== implementation to - CPP file - -Both the default constructor and operator== implementations reference -certain member functions of the class' members. As an example, the default -constructor references (i.e., "uses") the default constructors of its -members. - -If a class contains a std::vector, and Foo has only been *forward*- -declared (which happens often in Thrift-generated code), this creates -undefined behavior: The std::vector specification states that as long as -Foo is an incomplete type, it is fine to reference std::vector, but -not any members (such as its default constructor). - -Thus, we must defer our default constructor's implementation (which references -the default constructor of std::vector) to a point where Foo is a -complete type. That is the case in the .cpp file. - -The same holds for operator==. - -Upstream-Status: Backport [https://github.com/apache/thrift/pull/2755] - -Signed-off-by: Stanislav Angelovic -Signed-off-by: Peter Marko ---- - .../src/thrift/generate/t_cpp_generator.cc | 187 +++++++++++------- - 1 file changed, 121 insertions(+), 66 deletions(-) - -diff --git a/compiler/cpp/src/thrift/generate/t_cpp_generator.cc b/compiler/cpp/src/thrift/generate/t_cpp_generator.cc -index 9724fae80..fecfa4bb5 100644 ---- a/compiler/cpp/src/thrift/generate/t_cpp_generator.cc -+++ b/compiler/cpp/src/thrift/generate/t_cpp_generator.cc -@@ -146,11 +146,13 @@ public: - bool is_user_struct = false); - void generate_copy_constructor(std::ostream& out, t_struct* tstruct, bool is_exception); - void generate_move_constructor(std::ostream& out, t_struct* tstruct, bool is_exception); -+ void generate_default_constructor(std::ostream& out, t_struct* tstruct, bool is_exception); - void generate_constructor_helper(std::ostream& out, - t_struct* tstruct, - bool is_excpetion, - bool is_move); - void generate_assignment_operator(std::ostream& out, t_struct* tstruct); -+ void generate_equality_operator(std::ostream& out, t_struct* tstruct); - void generate_move_assignment_operator(std::ostream& out, t_struct* tstruct); - void generate_assignment_helper(std::ostream& out, t_struct* tstruct, bool is_move); - void generate_struct_reader(std::ostream& out, t_struct* tstruct, bool pointers = false); -@@ -914,6 +916,10 @@ void t_cpp_generator::generate_cpp_struct(t_struct* tstruct, bool is_exception) - generate_struct_reader(out, tstruct); - generate_struct_writer(out, tstruct); - generate_struct_swap(f_types_impl_, tstruct); -+ if (!gen_no_default_operators_) { -+ generate_equality_operator(f_types_impl_, tstruct); -+ } -+ generate_default_constructor(f_types_impl_, tstruct, is_exception); - generate_copy_constructor(f_types_impl_, tstruct, is_exception); - if (gen_moveable_) { - generate_move_constructor(f_types_impl_, tstruct, is_exception); -@@ -934,6 +940,117 @@ void t_cpp_generator::generate_cpp_struct(t_struct* tstruct, bool is_exception) - has_members_ = true; - } - -+void t_cpp_generator::generate_equality_operator(std::ostream& out, t_struct* tstruct) { -+ // Get members -+ vector::const_iterator m_iter; -+ const vector& members = tstruct->get_members(); -+ -+ out << indent() << "bool " << tstruct->get_name() -+ << "::operator==(const " << tstruct->get_name() << " & " -+ << (members.size() > 0 ? "rhs" : "/* rhs */") << ") const" << endl; -+ scope_up(out); -+ for (m_iter = members.begin(); m_iter != members.end(); ++m_iter) { -+ // Most existing Thrift code does not use isset or optional/required, -+ // so we treat "default" fields as required. -+ if ((*m_iter)->get_req() != t_field::T_OPTIONAL) { -+ out << indent() << "if (!(" << (*m_iter)->get_name() << " == rhs." -+ << (*m_iter)->get_name() << "))" << endl << indent() << " return false;" << endl; -+ } else { -+ out << indent() << "if (__isset." << (*m_iter)->get_name() << " != rhs.__isset." -+ << (*m_iter)->get_name() << ")" << endl << indent() << " return false;" << endl -+ << indent() << "else if (__isset." << (*m_iter)->get_name() << " && !(" -+ << (*m_iter)->get_name() << " == rhs." << (*m_iter)->get_name() << "))" << endl -+ << indent() << " return false;" << endl; -+ } -+ } -+ indent(out) << "return true;" << endl; -+ scope_down(out); -+ out << "\n"; -+} -+ -+void t_cpp_generator::generate_default_constructor(ostream& out, -+ t_struct* tstruct, -+ bool is_exception) { -+ // Get members -+ vector::const_iterator m_iter; -+ const vector& members = tstruct->get_members(); -+ -+ // TODO(barth) this is duplicated from generate_struct_declaration -+ bool has_default_value = false; -+ for (m_iter = members.begin(); m_iter != members.end(); ++m_iter) { -+ t_type* t = get_true_type((*m_iter)->get_type()); -+ if (is_reference(*m_iter) || t->is_string()) { -+ t_const_value* cv = (*m_iter)->get_value(); -+ if (cv != nullptr) { -+ has_default_value = true; -+ break; -+ } -+ } -+ } -+ -+ std::string clsname_ctor = tstruct->get_name() + "::" + tstruct->get_name() + "()"; -+ indent(out) << clsname_ctor << (has_default_value ? "" : " noexcept"); -+ -+ if (has_default_value || is_exception) { -+ // We need an initializer block -+ -+ bool init_ctor = false; -+ std::string args_indent(" "); -+ -+ // Default-initialize TException, if it is our base type -+ if (is_exception) -+ { -+ out << "\n"; -+ indent(out) << " : "; -+ out << "TException()"; -+ init_ctor = true; -+ } -+ -+ // Default-initialize all members that should be initialized in -+ // the initializer block -+ for (m_iter = members.begin(); m_iter != members.end(); ++m_iter) { -+ t_type* t = get_true_type((*m_iter)->get_type()); -+ if (t->is_base_type() || t->is_enum() || is_reference(*m_iter)) { -+ string dval; -+ t_const_value* cv = (*m_iter)->get_value(); -+ if (cv != nullptr) { -+ dval += render_const_value(out, (*m_iter)->get_name(), t, cv); -+ } else if (t->is_enum()) { -+ dval += "static_cast<" + type_name(t) + ">(0)"; -+ } else { -+ dval += (t->is_string() || is_reference(*m_iter)) ? "" : "0"; -+ } -+ if (!init_ctor) { -+ out << "\n"; -+ indent(out) << " : "; -+ init_ctor = true; -+ } else { -+ out << ",\n"; -+ indent(out) << args_indent; -+ } -+ -+ out << (*m_iter)->get_name() << "(" << dval << ")"; -+ } -+ } -+ out << " {" << endl; -+ indent_up(); -+ // TODO(dreiss): When everything else in Thrift is perfect, -+ // do more of these in the initializer list. -+ for (m_iter = members.begin(); m_iter != members.end(); ++m_iter) { -+ t_type* t = get_true_type((*m_iter)->get_type()); -+ if (!t->is_base_type() && !t->is_enum() && !is_reference(*m_iter)) { -+ t_const_value* cv = (*m_iter)->get_value(); -+ if (cv != nullptr) { -+ print_const_value(out, (*m_iter)->get_name(), t, cv); -+ } -+ } -+ } -+ scope_down(out); -+ } else { -+ out << " {}\n"; -+ } -+} -+ - void t_cpp_generator::generate_copy_constructor(ostream& out, - t_struct* tstruct, - bool is_exception) { -@@ -1168,52 +1285,7 @@ void t_cpp_generator::generate_struct_declaration(ostream& out, - - // Default constructor - std::string clsname_ctor = tstruct->get_name() + "()"; -- indent(out) << clsname_ctor << (has_default_value ? "" : " noexcept"); -- -- bool init_ctor = false; -- std::string args_indent( -- indent().size() + clsname_ctor.size() + (has_default_value ? 3 : -1), ' '); -- -- for (m_iter = members.begin(); m_iter != members.end(); ++m_iter) { -- t_type* t = get_true_type((*m_iter)->get_type()); -- if (t->is_base_type() || t->is_enum() || is_reference(*m_iter)) { -- string dval; -- t_const_value* cv = (*m_iter)->get_value(); -- if (cv != nullptr) { -- dval += render_const_value(out, (*m_iter)->get_name(), t, cv); -- } else if (t->is_enum()) { -- dval += "static_cast<" + type_name(t) + ">(0)"; -- } else { -- dval += (t->is_string() || is_reference(*m_iter)) ? "" : "0"; -- } -- if (!init_ctor) { -- init_ctor = true; -- if(has_default_value) { -- out << " : "; -- } else { -- out << '\n' << args_indent << ": "; -- args_indent.append(" "); -- } -- } else { -- out << ",\n" << args_indent; -- } -- out << (*m_iter)->get_name() << "(" << dval << ")"; -- } -- } -- out << " {" << endl; -- indent_up(); -- // TODO(dreiss): When everything else in Thrift is perfect, -- // do more of these in the initializer list. -- for (m_iter = members.begin(); m_iter != members.end(); ++m_iter) { -- t_type* t = get_true_type((*m_iter)->get_type()); -- if (!t->is_base_type() && !t->is_enum() && !is_reference(*m_iter)) { -- t_const_value* cv = (*m_iter)->get_value(); -- if (cv != nullptr) { -- print_const_value(out, (*m_iter)->get_name(), t, cv); -- } -- } -- } -- scope_down(out); -+ indent(out) << clsname_ctor << (has_default_value ? "" : " noexcept") << ";" << endl; - } - - if (tstruct->annotations_.find("final") == tstruct->annotations_.end()) { -@@ -1254,27 +1326,10 @@ void t_cpp_generator::generate_struct_declaration(ostream& out, - if (!pointers) { - // Should we generate default operators? - if (!gen_no_default_operators_) { -- // Generate an equality testing operator. Make it inline since the compiler -- // will do a better job than we would when deciding whether to inline it. -+ // Generate an equality testing operator. - out << indent() << "bool operator == (const " << tstruct->get_name() << " & " -- << (members.size() > 0 ? "rhs" : "/* rhs */") << ") const" << endl; -- scope_up(out); -- for (m_iter = members.begin(); m_iter != members.end(); ++m_iter) { -- // Most existing Thrift code does not use isset or optional/required, -- // so we treat "default" fields as required. -- if ((*m_iter)->get_req() != t_field::T_OPTIONAL) { -- out << indent() << "if (!(" << (*m_iter)->get_name() << " == rhs." -- << (*m_iter)->get_name() << "))" << endl << indent() << " return false;" << endl; -- } else { -- out << indent() << "if (__isset." << (*m_iter)->get_name() << " != rhs.__isset." -- << (*m_iter)->get_name() << ")" << endl << indent() << " return false;" << endl -- << indent() << "else if (__isset." << (*m_iter)->get_name() << " && !(" -- << (*m_iter)->get_name() << " == rhs." << (*m_iter)->get_name() << "))" << endl -- << indent() << " return false;" << endl; -- } -- } -- indent(out) << "return true;" << endl; -- scope_down(out); -+ << (members.size() > 0 ? "rhs" : "/* rhs */") << ") const;" << endl; -+ - out << indent() << "bool operator != (const " << tstruct->get_name() << " &rhs) const {" - << endl << indent() << " return !(*this == rhs);" << endl << indent() << "}" << endl - << endl; - -From cedcd0e6424a08dd6feeb2533810054c9aca2a9e Mon Sep 17 00:00:00 2001 -From: Lukas Barth -Date: Wed, 8 Feb 2023 10:11:48 +0100 -Subject: [PATCH 2/5] Factor out duplicated code into helper function - ---- - .../src/thrift/generate/t_cpp_generator.cc | 43 ++++++++++--------- - 1 file changed, 23 insertions(+), 20 deletions(-) - -diff --git a/compiler/cpp/src/thrift/generate/t_cpp_generator.cc b/compiler/cpp/src/thrift/generate/t_cpp_generator.cc -index fecfa4bb5..a77982f61 100644 ---- a/compiler/cpp/src/thrift/generate/t_cpp_generator.cc -+++ b/compiler/cpp/src/thrift/generate/t_cpp_generator.cc -@@ -302,6 +302,12 @@ public: - */ - bool is_struct_storage_not_throwing(t_struct* tstruct) const; - -+ /** -+ * Helper function to determine whether any of the members of our struct -+ * has a default value. -+ */ -+ bool has_field_with_default_value(t_struct* tstruct); -+ - private: - /** - * Returns the include prefix to use for a file generated by program, or the -@@ -968,26 +974,33 @@ void t_cpp_generator::generate_equality_operator(std::ostream& out, t_struct* ts - out << "\n"; - } - --void t_cpp_generator::generate_default_constructor(ostream& out, -- t_struct* tstruct, -- bool is_exception) { -- // Get members -+bool t_cpp_generator::has_field_with_default_value(t_struct* tstruct) -+{ - vector::const_iterator m_iter; - const vector& members = tstruct->get_members(); - -- // TODO(barth) this is duplicated from generate_struct_declaration -- bool has_default_value = false; - for (m_iter = members.begin(); m_iter != members.end(); ++m_iter) { - t_type* t = get_true_type((*m_iter)->get_type()); - if (is_reference(*m_iter) || t->is_string()) { - t_const_value* cv = (*m_iter)->get_value(); - if (cv != nullptr) { -- has_default_value = true; -- break; -+ return true; - } - } - } - -+ return false; -+} -+ -+void t_cpp_generator::generate_default_constructor(ostream& out, -+ t_struct* tstruct, -+ bool is_exception) { -+ // Get members -+ vector::const_iterator m_iter; -+ const vector& members = tstruct->get_members(); -+ -+ bool has_default_value = has_field_with_default_value(tstruct); -+ - std::string clsname_ctor = tstruct->get_name() + "::" + tstruct->get_name() + "()"; - indent(out) << clsname_ctor << (has_default_value ? "" : " noexcept"); - -@@ -1271,18 +1284,8 @@ void t_cpp_generator::generate_struct_declaration(ostream& out, - << endl; - } - -- bool has_default_value = false; -- for (m_iter = members.begin(); m_iter != members.end(); ++m_iter) { -- t_type* t = get_true_type((*m_iter)->get_type()); -- if (is_reference(*m_iter) || t->is_string()) { -- t_const_value* cv = (*m_iter)->get_value(); -- if (cv != nullptr) { -- has_default_value = true; -- break; -- } -- } -- } -- -+ bool has_default_value = has_field_with_default_value(tstruct); -+ - // Default constructor - std::string clsname_ctor = tstruct->get_name() + "()"; - indent(out) << clsname_ctor << (has_default_value ? "" : " noexcept") << ";" << endl; - -From 16105fa1a1bb9ae633b805fcb7af3c7757beb6e0 Mon Sep 17 00:00:00 2001 -From: Lukas Barth -Date: Fri, 24 Feb 2023 13:46:58 +0100 -Subject: [PATCH 3/5] Move generate_default_constructor call into - generate_struct_definition - -This makes sure that helper structs like _args and _result also have -their default constructors defined. ---- - .../src/thrift/generate/t_cpp_generator.cc | 19 +++++++++++++------ - 1 file changed, 13 insertions(+), 6 deletions(-) - -diff --git a/compiler/cpp/src/thrift/generate/t_cpp_generator.cc b/compiler/cpp/src/thrift/generate/t_cpp_generator.cc -index a77982f61..ccb79bc48 100644 ---- a/compiler/cpp/src/thrift/generate/t_cpp_generator.cc -+++ b/compiler/cpp/src/thrift/generate/t_cpp_generator.cc -@@ -143,7 +143,8 @@ public: - std::ostream& force_cpp_out, - t_struct* tstruct, - bool setters = true, -- bool is_user_struct = false); -+ bool is_user_struct = false, -+ bool pointers = false); - void generate_copy_constructor(std::ostream& out, t_struct* tstruct, bool is_exception); - void generate_move_constructor(std::ostream& out, t_struct* tstruct, bool is_exception); - void generate_default_constructor(std::ostream& out, t_struct* tstruct, bool is_exception); -@@ -916,7 +917,7 @@ void t_cpp_generator::generate_forward_declaration(t_struct* tstruct) { - */ - void t_cpp_generator::generate_cpp_struct(t_struct* tstruct, bool is_exception) { - generate_struct_declaration(f_types_, tstruct, is_exception, false, true, true, true, true); -- generate_struct_definition(f_types_impl_, f_types_impl_, tstruct, true, true); -+ generate_struct_definition(f_types_impl_, f_types_impl_, tstruct, true, true, false); - - std::ostream& out = (gen_templates_ ? f_types_tcc_ : f_types_impl_); - generate_struct_reader(out, tstruct); -@@ -925,7 +926,6 @@ void t_cpp_generator::generate_cpp_struct(t_struct* tstruct, bool is_exception) - if (!gen_no_default_operators_) { - generate_equality_operator(f_types_impl_, tstruct); - } -- generate_default_constructor(f_types_impl_, tstruct, is_exception); - generate_copy_constructor(f_types_impl_, tstruct, is_exception); - if (gen_moveable_) { - generate_move_constructor(f_types_impl_, tstruct, is_exception); -@@ -1408,7 +1408,8 @@ void t_cpp_generator::generate_struct_definition(ostream& out, - ostream& force_cpp_out, - t_struct* tstruct, - bool setters, -- bool is_user_struct) { -+ bool is_user_struct, -+ bool pointers) { - // Get members - vector::const_iterator m_iter; - const vector& members = tstruct->get_members(); -@@ -1423,6 +1424,11 @@ void t_cpp_generator::generate_struct_definition(ostream& out, - force_cpp_out << indent() << "}" << endl << endl; - } - -+ if (!pointers) -+ { -+ generate_default_constructor(out, tstruct, false); -+ } -+ - // Create a setter function for each field - if (setters) { - for (m_iter = members.begin(); m_iter != members.end(); ++m_iter) { -@@ -2058,9 +2064,10 @@ void t_cpp_generator::generate_service_helpers(t_service* tservice) { - generate_struct_definition(out, f_service_, ts, false); - generate_struct_reader(out, ts); - generate_struct_writer(out, ts); -+ - ts->set_name(tservice->get_name() + "_" + (*f_iter)->get_name() + "_pargs"); - generate_struct_declaration(f_header_, ts, false, true, false, true); -- generate_struct_definition(out, f_service_, ts, false); -+ generate_struct_definition(out, f_service_, ts, false, false, true); - generate_struct_writer(out, ts, true); - ts->set_name(name_orig); - -@@ -3508,7 +3515,7 @@ void t_cpp_generator::generate_function_helpers(t_service* tservice, t_function* - - result.set_name(tservice->get_name() + "_" + tfunction->get_name() + "_presult"); - generate_struct_declaration(f_header_, &result, false, true, true, gen_cob_style_); -- generate_struct_definition(out, f_service_, &result, false); -+ generate_struct_definition(out, f_service_, &result, false, false, true); - generate_struct_reader(out, &result, true); - if (gen_cob_style_) { - generate_struct_writer(out, &result, true); - -From 4f56007baf46d4aa87eb7f8e5e34b773235c729a Mon Sep 17 00:00:00 2001 -From: Lukas Barth -Date: Mon, 6 Mar 2023 11:37:09 +0100 -Subject: [PATCH 4/5] Always generate an initializer list - ---- - .../src/thrift/generate/t_cpp_generator.cc | 102 +++++++++--------- - 1 file changed, 54 insertions(+), 48 deletions(-) - -diff --git a/compiler/cpp/src/thrift/generate/t_cpp_generator.cc b/compiler/cpp/src/thrift/generate/t_cpp_generator.cc -index ccb79bc48..2a65bfb96 100644 ---- a/compiler/cpp/src/thrift/generate/t_cpp_generator.cc -+++ b/compiler/cpp/src/thrift/generate/t_cpp_generator.cc -@@ -1004,64 +1004,70 @@ void t_cpp_generator::generate_default_constructor(ostream& out, - std::string clsname_ctor = tstruct->get_name() + "::" + tstruct->get_name() + "()"; - indent(out) << clsname_ctor << (has_default_value ? "" : " noexcept"); - -- if (has_default_value || is_exception) { -- // We need an initializer block -+ // -+ // Start generating initializer list -+ // - -- bool init_ctor = false; -- std::string args_indent(" "); -+ bool init_ctor = false; -+ std::string args_indent(" "); - -- // Default-initialize TException, if it is our base type -- if (is_exception) -- { -- out << "\n"; -- indent(out) << " : "; -- out << "TException()"; -- init_ctor = true; -- } -+ // Default-initialize TException, if it is our base type -+ if (is_exception) -+ { -+ out << "\n"; -+ indent(out) << " : "; -+ out << "TException()"; -+ init_ctor = true; -+ } - -- // Default-initialize all members that should be initialized in -- // the initializer block -- for (m_iter = members.begin(); m_iter != members.end(); ++m_iter) { -- t_type* t = get_true_type((*m_iter)->get_type()); -- if (t->is_base_type() || t->is_enum() || is_reference(*m_iter)) { -- string dval; -- t_const_value* cv = (*m_iter)->get_value(); -- if (cv != nullptr) { -- dval += render_const_value(out, (*m_iter)->get_name(), t, cv); -- } else if (t->is_enum()) { -- dval += "static_cast<" + type_name(t) + ">(0)"; -- } else { -- dval += (t->is_string() || is_reference(*m_iter)) ? "" : "0"; -- } -- if (!init_ctor) { -- out << "\n"; -- indent(out) << " : "; -- init_ctor = true; -+ // Default-initialize all members that should be initialized in -+ // the initializer block -+ for (m_iter = members.begin(); m_iter != members.end(); ++m_iter) { -+ t_type* t = get_true_type((*m_iter)->get_type()); -+ if (t->is_base_type() || t->is_enum() || is_reference(*m_iter)) { -+ string dval; -+ t_const_value* cv = (*m_iter)->get_value(); -+ if (cv != nullptr) { -+ dval += render_const_value(out, (*m_iter)->get_name(), t, cv); -+ } else if (t->is_enum()) { -+ dval += "static_cast<" + type_name(t) + ">(0)"; -+ } else { -+ dval += (t->is_string() || is_reference(*m_iter)) ? "" : "0"; -+ } -+ if (!init_ctor) { -+ init_ctor = true; -+ if(has_default_value) { -+ out << " : "; - } else { -- out << ",\n"; -- indent(out) << args_indent; -+ out << '\n' << args_indent << ": "; -+ args_indent.append(" "); - } -- -- out << (*m_iter)->get_name() << "(" << dval << ")"; -+ } else { -+ out << ",\n" << args_indent; - } -+ -+ out << (*m_iter)->get_name() << "(" << dval << ")"; - } -- out << " {" << endl; -- indent_up(); -- // TODO(dreiss): When everything else in Thrift is perfect, -- // do more of these in the initializer list. -- for (m_iter = members.begin(); m_iter != members.end(); ++m_iter) { -- t_type* t = get_true_type((*m_iter)->get_type()); -- if (!t->is_base_type() && !t->is_enum() && !is_reference(*m_iter)) { -- t_const_value* cv = (*m_iter)->get_value(); -- if (cv != nullptr) { -- print_const_value(out, (*m_iter)->get_name(), t, cv); -- } -+ } -+ -+ // -+ // Start generating body -+ // -+ -+ out << " {" << endl; -+ indent_up(); -+ // TODO(dreiss): When everything else in Thrift is perfect, -+ // do more of these in the initializer list. -+ for (m_iter = members.begin(); m_iter != members.end(); ++m_iter) { -+ t_type* t = get_true_type((*m_iter)->get_type()); -+ if (!t->is_base_type() && !t->is_enum() && !is_reference(*m_iter)) { -+ t_const_value* cv = (*m_iter)->get_value(); -+ if (cv != nullptr) { -+ print_const_value(out, (*m_iter)->get_name(), t, cv); - } - } -- scope_down(out); -- } else { -- out << " {}\n"; - } -+ scope_down(out); - } - - void t_cpp_generator::generate_copy_constructor(ostream& out, - -From 9bd8f1e1acb23cb3ef134291e56b2605a7356b04 Mon Sep 17 00:00:00 2001 -From: Lukas Barth -Date: Tue, 4 Apr 2023 16:25:06 +0200 -Subject: [PATCH 5/5] Fix ODR violations in cases where templates are involved - ---- - compiler/cpp/src/thrift/generate/t_cpp_generator.cc | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/compiler/cpp/src/thrift/generate/t_cpp_generator.cc b/compiler/cpp/src/thrift/generate/t_cpp_generator.cc -index 2a65bfb96..a085ada0e 100644 ---- a/compiler/cpp/src/thrift/generate/t_cpp_generator.cc -+++ b/compiler/cpp/src/thrift/generate/t_cpp_generator.cc -@@ -1432,7 +1432,10 @@ void t_cpp_generator::generate_struct_definition(ostream& out, - - if (!pointers) - { -- generate_default_constructor(out, tstruct, false); -+ // 'force_cpp_out' always goes into the .cpp file, and never into a .tcc -+ // file in case templates are involved. Since the constructor is not templated, -+ // putting it into the (later included) .tcc file would cause ODR violations. -+ generate_default_constructor(force_cpp_out, tstruct, false); - } - - // Create a setter function for each field diff --git a/sources/meta-openembedded/meta-oe/recipes-connectivity/thrift/thrift_0.20.0.bb b/sources/meta-openembedded/meta-oe/recipes-connectivity/thrift/thrift_0.20.0.bb index c908eab7..23db052b 100644 --- a/sources/meta-openembedded/meta-oe/recipes-connectivity/thrift/thrift_0.20.0.bb +++ b/sources/meta-openembedded/meta-oe/recipes-connectivity/thrift/thrift_0.20.0.bb @@ -9,9 +9,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=c40a383cb3f747e0c7abbf1482f194f0 \ DEPENDS = "thrift-native boost flex-native bison-native openssl zlib" SRC_URI = "https://downloads.apache.org/${BPN}/${PV}/${BP}.tar.gz \ - file://0001-DefineInstallationPaths.cmake-Define-libdir-in-terms.patch \ - file://0001-thrift-pr2755.patch \ -" + file://0001-DefineInstallationPaths.cmake-Define-libdir-in-terms.patch" SRC_URI[sha256sum] = "b5d8311a779470e1502c027f428a1db542f5c051c8e1280ccd2163fa935ff2d6" BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-oe/recipes-connectivity/transmission/transmission_4.0.6.bb b/sources/meta-openembedded/meta-oe/recipes-connectivity/transmission/transmission_4.0.6.bb new file mode 100644 index 00000000..199a7c6d --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-connectivity/transmission/transmission_4.0.6.bb @@ -0,0 +1,63 @@ +DESCRIPTION = "Transmission is a fast, easy, and free BitTorrent client" +SECTION = "network" +HOMEPAGE = "https://transmissionbt.com/" +LICENSE = "MIT & GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=ba8199e739948e198310093de27175fa" + +DEPENDS = "curl libevent libpsl gnutls openssl libtool intltool-native glib-2.0-native" +RDEPENDS:${PN}-web = "${PN}" + +SRC_URI = " \ + gitsm://github.com/transmission/transmission;branch=4.0.x;protocol=https \ + file://transmission-daemon \ +" + +# Transmission release 4.0.6 +SRCREV = "38c164933e9f77c110b48fe745861c3b98e3d83e" + +S = "${WORKDIR}/git" + +inherit cmake gettext update-rc.d pkgconfig systemd mime-xdg + +LDFLAGS:append:riscv32 = " -latomic" + +PACKAGECONFIG = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'gtk', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd','',d)}" + +PACKAGECONFIG[gtk] = "-DENABLE_GTK=ON,-DENABLE_GTK=OFF,gtk4 gtkmm4," +PACKAGECONFIG[systemd] = "-DWITH_SYSTEMD=ON,-DWITH_SYSTEMD=OFF,systemd," + +# Weak default values for transmission user and group +# Change them in bbappend if needed +TRANSMISSION_USER ??= "root" +TRANSMISSION_GROUP ??= "root" + +do_install:append() { + if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then + sed -i '/USERNAME=/c\USERNAME=${TRANSMISSION_USER}' ${UNPACKDIR}/transmission-daemon + install -d ${D}${sysconfdir}/init.d + install -m 0744 ${UNPACKDIR}/transmission-daemon ${D}${sysconfdir}/init.d/ + chown ${TRANSMISSION_USER}:${TRANSMISSION_GROUP} ${D}${sysconfdir}/init.d/transmission-daemon + fi + + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + sed -i '/User=/c\User=${TRANSMISSION_USER}' ${S}/daemon/transmission-daemon.service + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${S}/daemon/transmission-daemon.service ${D}${systemd_unitdir}/system + fi +} + +PACKAGES += "${PN}-gtk ${PN}-client ${PN}-web" + +FILES:${PN}-client = "${bindir}/transmission-remote ${bindir}/transmission-cli ${bindir}/transmission-create ${bindir}/transmission-show ${bindir}/transmission-edit" +FILES:${PN}-gtk += "${bindir}/transmission-gtk ${datadir}/icons ${datadir}/applications ${datadir}/pixmaps ${datadir}/metainfo" +FILES:${PN}-web = "${datadir}/transmission/web ${datadir}/transmission/public_html" +FILES:${PN} = "${bindir}/transmission-daemon ${sysconfdir}/init.d/transmission-daemon ${datadir}/appdata" + +SYSTEMD_SERVICE:${PN} = "transmission-daemon.service" + +# Script transmission-daemon following the guidelines in: +# https://trac.transmissionbt.com/wiki/Scripts/initd +INITSCRIPT_PACKAGES = "transmission-daemon" +INITSCRIPT_NAME = "transmission-daemon" +INITSCRIPT_PARAMS = "start 99 5 3 2 . stop 10 0 1 6 ." diff --git a/sources/meta-openembedded/meta-oe/recipes-connectivity/transmission/transmission_git.bb b/sources/meta-openembedded/meta-oe/recipes-connectivity/transmission/transmission_git.bb deleted file mode 100644 index 735db144..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-connectivity/transmission/transmission_git.bb +++ /dev/null @@ -1,76 +0,0 @@ -DESCRIPTION = "Transmission is a fast, easy, and free BitTorrent client" -SECTION = "network" -HOMEPAGE = "https://transmissionbt.com/" -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=73f535ddffcf2a0d3af4f381f84f9b33" - -DEPENDS = "curl libevent gnutls openssl libtool intltool-native glib-2.0-native" -RDEPENDS:${PN}-web = "${PN}" - -SRC_URI = " \ - gitsm://github.com/transmission/transmission;branch=master;protocol=https \ - file://transmission-daemon \ -" - -# Transmission release 3.00 -SRCREV = "bb6b5a062ee594dfd4b7a12a6b6e860c43849bfd" -PV = "3.00" - -S = "${WORKDIR}/git" - -inherit autotools-brokensep gettext update-rc.d pkgconfig systemd mime-xdg - -PACKAGECONFIG = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'gtk', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd','',d)}" - -PACKAGECONFIG[gtk] = " --with-gtk,--without-gtk,gtk+3," -PACKAGECONFIG[systemd] = "--with-systemd,--without-systemd,systemd," - -# Weak default values for transmission user and group -# Change them in bbappend if needed -TRANSMISSION_USER ??= "root" -TRANSMISSION_GROUP ??= "root" - -# Configure aborts with: -# config.status: error: po/Makefile.in.in was not created by intltoolize. -do_configure() { - sed -i /AM_GLIB_GNU_GETTEXT/d ${S}/configure.ac - cd ${S} - ./update-version-h.sh - intltoolize --copy --force --automake - aclocal - libtoolize --automake --copy --force - autoconf - automake -a - oe_runconf -} - -do_install:append() { - if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then - sed -i '/USERNAME=/c\USERNAME=${TRANSMISSION_USER}' ${WORKDIR}/transmission-daemon - install -d ${D}${sysconfdir}/init.d - install -m 0744 ${WORKDIR}/transmission-daemon ${D}${sysconfdir}/init.d/ - chown ${TRANSMISSION_USER}:${TRANSMISSION_GROUP} ${D}${sysconfdir}/init.d/transmission-daemon - fi - - if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then - sed -i '/User=/c\User=${TRANSMISSION_USER}' ${S}/daemon/transmission-daemon.service - install -d ${D}${systemd_unitdir}/system - install -m 0644 ${S}/daemon/transmission-daemon.service ${D}${systemd_unitdir}/system - fi -} - -PACKAGES += "${PN}-gtk ${PN}-client ${PN}-web" - -FILES:${PN}-client = "${bindir}/transmission-remote ${bindir}/transmission-cli ${bindir}/transmission-create ${bindir}/transmission-show ${bindir}/transmission-edit" -FILES:${PN}-gtk += "${bindir}/transmission-gtk ${datadir}/icons ${datadir}/applications ${datadir}/pixmaps" -FILES:${PN}-web = "${datadir}/transmission/web" -FILES:${PN} = "${bindir}/transmission-daemon ${sysconfdir}/init.d/transmission-daemon ${datadir}/appdata" - -SYSTEMD_SERVICE:${PN} = "transmission-daemon.service" - -# Script transmission-daemon following the guidelines in: -# https://trac.transmissionbt.com/wiki/Scripts/initd -INITSCRIPT_PACKAGES = "transmission-daemon" -INITSCRIPT_NAME = "transmission-daemon" -INITSCRIPT_PARAMS = "start 99 5 3 2 . stop 10 0 1 6 ." diff --git a/sources/meta-openembedded/meta-oe/recipes-connectivity/wifi-test-suite/wifi-test-suite_10.10.1.bb b/sources/meta-openembedded/meta-oe/recipes-connectivity/wifi-test-suite/wifi-test-suite_10.10.1.bb index eda01ca3..c372b030 100644 --- a/sources/meta-openembedded/meta-oe/recipes-connectivity/wifi-test-suite/wifi-test-suite_10.10.1.bb +++ b/sources/meta-openembedded/meta-oe/recipes-connectivity/wifi-test-suite/wifi-test-suite_10.10.1.bb @@ -38,3 +38,8 @@ do_install () { } RDEPENDS:${PN} = "wpa-supplicant" + +# http://errors.yoctoproject.org/Errors/Details/766893/ +# wfa_cmdproc.c:467:68: error: passing argument 3 of 'strtok_r' from incompatible pointer type [-Wincompatible-pointer-types] +# wfa_cs.c:4175:57: error: initialization of 'caStaGetEventDetails_t *' {aka 'struct ca_sta_get_event_details *'} from incompatible pointer type 'caStaMngServ_t *' {aka 'struct ca_sta_manage_service *'} [-Wincompatible-pointer-types] +CC += "-Wno-error=incompatible-pointer-types" diff --git a/sources/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvdial_1.61.bb b/sources/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvdial_1.61.bb index 99e3ccac..c1da15a1 100644 --- a/sources/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvdial_1.61.bb +++ b/sources/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvdial_1.61.bb @@ -16,6 +16,10 @@ SRC_URI = "https://storage.googleapis.com/google-code-archive-downloads/v2/code. SRC_URI[md5sum] = "37e9a2d664effe4efd44c0e1a20136de" SRC_URI[sha256sum] = "99906d9560cbdbc97e1855e7b0a7169f1e11983be3ac539140423f09debced82" +# code.google.com/archive page is generated by javascript from JSON and does not +# allow devtool to find the latest version +UPSTREAM_VERSION_UNKNOWN = "1" + COMPATIBLE_HOST:libc-musl = "null" EXTRA_OEMAKE = "" export WVLINK="${LD}" diff --git a/sources/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams_4.6.1.bb b/sources/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams_4.6.1.bb index 3453f3e9..3b72e441 100644 --- a/sources/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams_4.6.1.bb +++ b/sources/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams_4.6.1.bb @@ -28,6 +28,10 @@ SRC_URI = "https://storage.googleapis.com/google-code-archive-downloads/v2/code. SRC_URI[md5sum] = "2760dac31a43d452a19a3147bfde571c" SRC_URI[sha256sum] = "8403f5fbf83aa9ac0c6ce15d97fd85607488152aa84e007b7d0621b8ebc07633" +# The code.google.com/archive page is generated using Javascript from a JSON file and does not +# allow devtool to find the latest version +UPSTREAM_VERSION_UNKNOWN = "1" + COMPATIBLE_HOST:libc-musl = "null" inherit autotools-brokensep pkgconfig diff --git a/sources/meta-openembedded/meta-oe/recipes-connectivity/zabbix/zabbix_6.2.7.bb b/sources/meta-openembedded/meta-oe/recipes-connectivity/zabbix/zabbix_6.2.7.bb index 8708852c..46c09a02 100644 --- a/sources/meta-openembedded/meta-oe/recipes-connectivity/zabbix/zabbix_6.2.7.bb +++ b/sources/meta-openembedded/meta-oe/recipes-connectivity/zabbix/zabbix_6.2.7.bb @@ -68,7 +68,7 @@ do_configure:prepend() { do_install:append() { if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/zabbix-agent.service ${D}${systemd_unitdir}/system/ + install -m 0644 ${UNPACKDIR}/zabbix-agent.service ${D}${systemd_unitdir}/system/ sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/zabbix-agent.service fi } diff --git a/sources/meta-openembedded/meta-oe/recipes-connectivity/zeromq/czmq_4.2.1.bb b/sources/meta-openembedded/meta-oe/recipes-connectivity/zeromq/czmq_4.2.1.bb index 5ae72df8..f90b2cab 100644 --- a/sources/meta-openembedded/meta-oe/recipes-connectivity/zeromq/czmq_4.2.1.bb +++ b/sources/meta-openembedded/meta-oe/recipes-connectivity/zeromq/czmq_4.2.1.bb @@ -10,6 +10,7 @@ SRC_URI[md5sum] = "471e9ec120fc66a2fe2aae14359e3cfa" SRC_URI[sha256sum] = "5d720a204c2a58645d6f7643af15d563a712dad98c9d32c1ed913377daa6ac39" UPSTREAM_CHECK_URI = "https://github.com/zeromq/${BPN}/releases" +UPSTREAM_CHECK_REGEX = "(?P\d+(\.\d+)+)" inherit cmake pkgconfig diff --git a/sources/meta-openembedded/meta-oe/recipes-connectivity/zeromq/zeromq_4.3.5.bb b/sources/meta-openembedded/meta-oe/recipes-connectivity/zeromq/zeromq_4.3.5.bb index 55545821..7569d320 100644 --- a/sources/meta-openembedded/meta-oe/recipes-connectivity/zeromq/zeromq_4.3.5.bb +++ b/sources/meta-openembedded/meta-oe/recipes-connectivity/zeromq/zeromq_4.3.5.bb @@ -13,6 +13,7 @@ SRC_URI = "http://github.com/zeromq/libzmq/releases/download/v${PV}/zeromq-${PV} SRC_URI[sha256sum] = "6653ef5910f17954861fe72332e68b03ca6e4d9c7160eb3a8de5a5a913bfab43" UPSTREAM_CHECK_URI = "https://github.com/${BPN}/libzmq/releases" +UPSTREAM_CHECK_REGEX = "releases/tag/v(?P\d+\.\d+\.\d+)" inherit cmake ptest pkgconfig diff --git a/sources/meta-openembedded/meta-oe/recipes-core/dbus-cxx/dbus-cxx_2.5.1.bb b/sources/meta-openembedded/meta-oe/recipes-core/dbus-cxx/dbus-cxx_2.5.1.bb deleted file mode 100644 index e89d1327..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-core/dbus-cxx/dbus-cxx_2.5.1.bb +++ /dev/null @@ -1,25 +0,0 @@ -SUMMARY = "D-Bus wrapper in C++ for dbus" -HOMEPAGE = "https://dbus-cxx.github.io/" -BUGTRACKER = "https://github.com/libsigcplusplus/libsigcplusplus/issues" -SECTION = "base" -LICENSE = "LGPL-3.0-or-later | BSD-3-Clause" -LIC_FILES_CHKSUM = "file://COPYING;md5=24594f493407a4cd401ce9794e0b9308" - -SRC_URI = "git://github.com/dbus-cxx/dbus-cxx.git;branch=master;protocol=https" -SRCREV = "732a5becb4349e02ffce407a3fd4d75cc3d82421" - -DEPENDS = "\ - dbus \ - libsigc++-3 \ -" - -RDEPENDS:${PN} = "\ - dbus \ - libsigc++-3 \ -" - -S = "${WORKDIR}/git" - -inherit pkgconfig cmake - -OECMAKE_FIND_ROOT_PATH_MODE_PROGRAM = "BOTH" diff --git a/sources/meta-openembedded/meta-oe/recipes-core/dbus-cxx/dbus-cxx_2.5.2.bb b/sources/meta-openembedded/meta-oe/recipes-core/dbus-cxx/dbus-cxx_2.5.2.bb new file mode 100644 index 00000000..fbe1e347 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-core/dbus-cxx/dbus-cxx_2.5.2.bb @@ -0,0 +1,49 @@ +SUMMARY = "D-Bus implementation in C++" +HOMEPAGE = "https://dbus-cxx.github.io/" +BUGTRACKER = "https://github.com/dbus-cxx/dbus-cxx/issues" +SECTION = "base" +LICENSE = "LGPL-3.0-or-later | BSD-3-Clause" +LIC_FILES_CHKSUM = "file://COPYING;md5=24594f493407a4cd401ce9794e0b9308" + +SRC_URI = "git://github.com/dbus-cxx/dbus-cxx.git;branch=master;protocol=https" +SRCREV = "f2637e726207ecfbdaaf02744e1b36e54f929c9d" + +DEPENDS = "\ + dbus \ + libsigc++-3 \ +" + +RDEPENDS:${PN} = "\ + dbus \ + libsigc++-3 \ +" + +S = "${WORKDIR}/git" + +inherit pkgconfig cmake + +OECMAKE_FIND_ROOT_PATH_MODE_PROGRAM = "BOTH" +EXTRA_OECMAKE = "-DBUILD_TESTING=OFF -DTOOLS_BUNDLED_CPPGENERATE=OFF" + +PACKAGECONFIG ??= "" +PACKAGECONFIG:class-native ?= "tools" +PACKAGECONFIG:class-nativesdk ?= "tools" + +PACKAGECONFIG[tools] = "-DENABLE_TOOLS=ON,-DENABLE_TOOS=OFF,popt cppgenerate" +PACKAGECONFIG[glib] = "-DENABLE_GLIB_SUPPORT=ON,-DENABLE_GLIB_SUPPORT=OFF,glib-2.0" +PACKAGECONFIG[uv] = "-DENABLE_UV_SUPPORT=ON,-DENABLE_UV_SUPPORT=OFF,libuv" + +PACKAGES =+ " ${PN}-tools ${PN}-glib ${PN}-uv ${PN}-glib-dev ${PN}-uv-dev " +FILES:${PN}-tools = "${bindir}/dbus-cxx-xml2cpp ${bindir}/dbus-cxx-introspect" +FILES:${PN}-glib = "${libdir}/libdbus-cxx-glib.so.* " +FILES:${PN}-glib-dev = "${includedir}/dbus-cxx-glib-2.0/* \ + ${libdir}/pkgconfig/dbus-cxx-glib-2.0.pc \ + ${libdir}/libdbus-cxx-glib.so \ + " +FILES:${PN}-uv = "${libdir}/libdbus-cxx-uv.so.* " +FILES:${PN}-uv-dev = "${includedir}/dbus-cxx-uv-2.0/* \ + ${libdir}/pkgconfig/dbus-cxx-uv-2.0.pc\ + ${libdir}/libdbus-cxx-uv.so \ + " + +BBCLASSEXTEND="native nativesdk" diff --git a/sources/meta-openembedded/meta-oe/recipes-core/dbus/dbus-broker_32.bb b/sources/meta-openembedded/meta-oe/recipes-core/dbus/dbus-broker_32.bb deleted file mode 100644 index 900b5e3a..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-core/dbus/dbus-broker_32.bb +++ /dev/null @@ -1,32 +0,0 @@ -SUMMARY = "dbus broker" -DESCRIPTION = "Drop-in replacement for dbus-daemon." - -SECTION = "base" - -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=7b486c2338d225a1405d979ed2c15ce8" - -SRC_URI = "https://github.com/bus1/dbus-broker/releases/download/v${PV}/dbus-broker-${PV}.tar.xz" -SRC_URI[sha256sum] = "bea7f653e7251063c5f427e9e3f93562d38a0d8667ae6d49fb56f113605985de" - -UPSTREAM_CHECK_URI = "https://github.com/bus1/${BPN}/releases" - -inherit meson pkgconfig systemd features_check - -DEPENDS = "expat systemd" -DEPENDS += " ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'libselinux (>= 3.2)', '', d)}" -DEPENDS += " ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'audit (>= 3.0)', '', d)}" - -RDEPENDS:${PN} += "dbus-common" - -REQUIRED_DISTRO_FEATURES = "systemd" - -SYSTEMD_SERVICE:${PN} = "${BPN}.service" - -FILES:${PN} += "${systemd_system_unitdir}" -FILES:${PN} += "${systemd_user_unitdir}" -FILES:${PN} += "${nonarch_libdir}/systemd/catalog" - -EXTRA_OEMESON += " -Dselinux=${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'true', 'false', d)}" -EXTRA_OEMESON += " -Daudit=${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'true', 'false', d)}" - diff --git a/sources/meta-openembedded/meta-oe/recipes-core/dbus/dbus-broker_36.bb b/sources/meta-openembedded/meta-oe/recipes-core/dbus/dbus-broker_36.bb new file mode 100644 index 00000000..46cff86d --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-core/dbus/dbus-broker_36.bb @@ -0,0 +1,33 @@ +SUMMARY = "dbus broker" +DESCRIPTION = "Drop-in replacement for dbus-daemon." + +SECTION = "base" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=7b486c2338d225a1405d979ed2c15ce8" + +SRC_URI = "https://github.com/bus1/dbus-broker/releases/download/v${PV}/dbus-broker-${PV}.tar.xz" +SRC_URI[sha256sum] = "d333d99bd2688135b6d6961e7ad1360099d186078781c87102230910ea4e162b" + +UPSTREAM_CHECK_URI = "https://github.com/bus1/${BPN}/releases" +UPSTREAM_CHECK_REGEX = "releases/tag/v(?P\d+)" + +inherit meson pkgconfig systemd features_check + +DEPENDS = "expat systemd" +DEPENDS += " ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'libselinux (>= 3.2)', '', d)}" +DEPENDS += " ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'audit (>= 3.0)', '', d)}" + +RDEPENDS:${PN} += "dbus-common" + +REQUIRED_DISTRO_FEATURES = "systemd" + +SYSTEMD_SERVICE:${PN} = "${BPN}.service" + +FILES:${PN} += "${systemd_system_unitdir}" +FILES:${PN} += "${systemd_user_unitdir}" +FILES:${PN} += "${nonarch_libdir}/systemd/catalog" + +EXTRA_OEMESON += " -Dselinux=${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'true', 'false', d)}" +EXTRA_OEMESON += " -Daudit=${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'true', 'false', d)}" + diff --git a/sources/meta-openembedded/meta-oe/recipes-core/dbus/dbus-daemon-proxy_git.bb b/sources/meta-openembedded/meta-oe/recipes-core/dbus/dbus-daemon-proxy_git.bb index cbe82d42..086a37ca 100644 --- a/sources/meta-openembedded/meta-oe/recipes-core/dbus/dbus-daemon-proxy_git.bb +++ b/sources/meta-openembedded/meta-oe/recipes-core/dbus/dbus-daemon-proxy_git.bb @@ -8,6 +8,10 @@ PV = "0.0.0+git" SRC_URI = "git://github.com/alban/dbus-daemon-proxy;branch=master;protocol=https \ file://0001-dbus-daemon-proxy-Return-DBUS_HANDLER_RESULT_NOT_YET.patch \ " + +# Upstream repo does not tag +UPSTREAM_CHECK_COMMITS = "1" + S = "${WORKDIR}/git" inherit pkgconfig diff --git a/sources/meta-openembedded/meta-oe/recipes-core/dbus/libdbus-c++_0.9.0.bb b/sources/meta-openembedded/meta-oe/recipes-core/dbus/libdbus-c++_0.9.0.bb index 8e8f544e..8940e19f 100644 --- a/sources/meta-openembedded/meta-oe/recipes-core/dbus/libdbus-c++_0.9.0.bb +++ b/sources/meta-openembedded/meta-oe/recipes-core/dbus/libdbus-c++_0.9.0.bb @@ -18,6 +18,9 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/project/dbus-cplusplus/dbus-c++/${PV}/${BP}.tar SRC_URI[md5sum] = "e752116f523fa88ef041e63d3dee4de2" SRC_URI[sha256sum] = "bc11ac297b3cb010be904c72789695543ee3fdf3d75cdc8225fd371385af4e61" +UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/dbus-cplusplus/files" +UPSTREAM_CHECK_REGEX = "libdbus-c---(?P\d+(\.\d+)+)" + inherit autotools pkgconfig EXTRA_OECONF = "--disable-ecore --disable-examples --disable-tests" diff --git a/sources/meta-openembedded/meta-oe/recipes-core/emlog/emlog.inc b/sources/meta-openembedded/meta-oe/recipes-core/emlog/emlog.inc index 631e52f3..ec78a110 100644 --- a/sources/meta-openembedded/meta-oe/recipes-core/emlog/emlog.inc +++ b/sources/meta-openembedded/meta-oe/recipes-core/emlog/emlog.inc @@ -8,6 +8,8 @@ SRCREV = "a9bbf324fde131ff4cf064e32674086c4ced4dca" PV = "0.70+git" S = "${WORKDIR}/git" +CVE_PRODUCT = "nicupavel:emlog" + EXTRA_OEMAKE += " \ CFLAGS='${TARGET_CFLAGS}' \ " diff --git a/sources/meta-openembedded/meta-oe/recipes-core/emlog/emlog_git.bb b/sources/meta-openembedded/meta-oe/recipes-core/emlog/emlog_git.bb index 6331f618..3f3b5bc9 100644 --- a/sources/meta-openembedded/meta-oe/recipes-core/emlog/emlog_git.bb +++ b/sources/meta-openembedded/meta-oe/recipes-core/emlog/emlog_git.bb @@ -18,7 +18,7 @@ do_compile() { } do_install() { - install -Dm 0755 ${WORKDIR}/${BPN}.initd ${D}${sysconfdir}/init.d/${BPN} + install -Dm 0755 ${UNPACKDIR}/${BPN}.initd ${D}${sysconfdir}/init.d/${BPN} install -Dm 0755 ${S}/nbcat ${D}${bindir}/nbcat install -Dm 0755 ${S}/mkemlog ${D}${bindir}/mkemlog } diff --git a/sources/meta-openembedded/meta-oe/recipes-core/glib-2.0/glib-testing_0.1.1.bb b/sources/meta-openembedded/meta-oe/recipes-core/glib-2.0/glib-testing_0.1.1.bb new file mode 100644 index 00000000..ebcc2b26 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-core/glib-2.0/glib-testing_0.1.1.bb @@ -0,0 +1,14 @@ +SUMMARY = "libglib-testing provides test harnesses and mock classes to complement GLib classes" +HOMEPAGE = "https://gitlab.gnome.org/pwithnall/libglib-testing" +LICENSE = "LGPL-2.1-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" + +SRC_URI = "git://gitlab.gnome.org/pwithnall/libglib-testing.git;protocol=https;branch=main" + +PV = "0.1.1" +S = "${WORKDIR}/git" +SRCREV = "e326f73a7139c5e54fcf926896ae6e4cc899a1a7" + +inherit meson pkgconfig + +DEPENDS = "glib-2.0 gtk-doc-native libxslt-native docbook-xsl-stylesheets-native python3-pygments-native" diff --git a/sources/meta-openembedded/meta-oe/recipes-core/glib-2.0/glibmm-2.68_2.78.0.bb b/sources/meta-openembedded/meta-oe/recipes-core/glib-2.0/glibmm-2.68_2.78.0.bb deleted file mode 100644 index f40a8144..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-core/glib-2.0/glibmm-2.68_2.78.0.bb +++ /dev/null @@ -1,32 +0,0 @@ -SUMMARY = "C++ bindings for the glib library" -HOMEPAGE = "http://www.gtkmm.org/" -SECTION = "libs" -LICENSE = "LGPL-2.1-only & GPL-2.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=42dfffebc56fec7527aac53b7a89d1d8 \ - file://COPYING.tools;md5=751419260aa954499f7abaabaa882bbe" - -DEPENDS = "mm-common glib-2.0 libsigc++-3 glib-2.0-native" - -GNOMEBN = "glibmm" -inherit gnomebase - -SHRT_VER = "${@d.getVar('PV').split('.')[0]}.${@d.getVar('PV').split('.')[1]}" - -SRC_URI[archive.sha256sum] = "5d2e872564996f02a06d8bbac3677e7c394af8b00dd1526aebd47af842a3ef50" - -S = "${WORKDIR}/${GNOMEBN}-${PV}" - -FILES:${PN} = "${libdir}/lib*.so.*" -FILES:${PN}-dev += "${datadir}/glibmm-* ${libdir}/${BPN}/include/ ${libdir}/${BPN}/proc/ ${libdir}/giomm-2.68/include/" - -RDEPENDS:${PN}-dev = "perl" - -EXTRA_OEMESON += "--cross-file=${WORKDIR}/meson-${PN}.cross -Dmaintainer-mode=false" - -do_write_config:append() { - cat >${WORKDIR}/meson-${PN}.cross <${WORKDIR}/meson-${PN}.cross <${WORKDIR}/meson-${PN}.cross <${WORKDIR}/meson-${PN}.cross < -Date: Mon, 4 Nov 2019 19:19:47 +0100 -Subject: [PATCH] meson.build: do not ask for python installation / version -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Even by adding python3-setuptools-native the following error is not fixed so -just ask for python3 executable. - -| meson.build:9:0: ERROR: ['<...>/recipe-sysroot-native/usr/bin/python3-native/python3']> is not a valid python or it is missing setuptools - -Upstream-Status: Inappropriate [OE specific] - -Signed-off-by: Andreas Müller - -rebase for 1.0.4 -Signed-off-by: Wang Mingyu - ---- - meson.build | 7 +------ - 1 file changed, 1 insertion(+), 6 deletions(-) - -diff --git a/meson.build b/meson.build -index 8a18c36..34fd546 100644 ---- a/meson.build -+++ b/meson.build -@@ -7,12 +7,7 @@ project('mm-common', - # and meson.add_install_script(python3, ...) - ) - --python3 = import('python').find_installation() --python_version = python3.language_version() --python_version_req = '>= 3.5' --if not python_version.version_compare(python_version_req) -- error('Requires Python @0@, found @1@.'.format(python_version_req, python_version)) --endif -+python3 = import('python3').find_python() - - # Use these instead of meson.source_root() and meson.build_root(). - # source_root() and build_root() are not useful, if this is a subproject. --- -2.25.1 - diff --git a/sources/meta-openembedded/meta-oe/recipes-core/mm-common/mm-common_1.0.4.bb b/sources/meta-openembedded/meta-oe/recipes-core/mm-common/mm-common_1.0.4.bb deleted file mode 100644 index 56f7b5af..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-core/mm-common/mm-common_1.0.4.bb +++ /dev/null @@ -1,27 +0,0 @@ -SUMMARY = "Common GNOME build files for C++ bindings" -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" - - -inherit gnomebase - -# All the recipe does is stage python and shell script, some autotools files; nothing is compiled. -inherit allarch - -SRC_URI[archive.sha256sum] = "e954c09b4309a7ef93e13b69260acdc5738c907477eb381b78bb1e414ee6dbd8" -SRC_URI += "file://0001-meson.build-do-not-ask-for-python-installation-versi.patch" - -BBCLASSEXTEND = "native" - -# These files aren't very usefull on target image, package them all in nnPN-dev -FILES:${PN} = "" - -FILES:${PN}-dev += " \ - ${datadir}/${BPN}/build \ - ${datadir}/${BPN}/doctags \ - ${datadir}/${BPN}/doctool \ - ${bindir}/mm-common-get \ - ${bindir}/mm-common-prepare \ -" -# ${PN} package is empty, remove the default dependency on it -RDEPENDS:${PN}-dev = "" diff --git a/sources/meta-openembedded/meta-oe/recipes-core/mm-common/mm-common_1.0.6.bb b/sources/meta-openembedded/meta-oe/recipes-core/mm-common/mm-common_1.0.6.bb new file mode 100644 index 00000000..a252a6b4 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-core/mm-common/mm-common_1.0.6.bb @@ -0,0 +1,26 @@ +SUMMARY = "Common GNOME build files for C++ bindings" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" + + +inherit gnomebase + +# All the recipe does is stage python and shell script, some autotools files; nothing is compiled. +inherit allarch + +SRC_URI[archive.sha256sum] = "b55c46037dbcdabc5cee3b389ea11cc3910adb68ebe883e9477847aa660862e7" + +BBCLASSEXTEND = "native nativesdk" + +# These files aren't very usefull on target image, package them all in nnPN-dev +FILES:${PN} = "" + +FILES:${PN}-dev += " \ + ${datadir}/${BPN}/build \ + ${datadir}/${BPN}/doctags \ + ${datadir}/${BPN}/doctool \ + ${bindir}/mm-common-get \ + ${bindir}/mm-common-prepare \ +" +# ${PN} package is empty, remove the default dependency on it +RDEPENDS:${PN}-dev = "" diff --git a/sources/meta-openembedded/meta-oe/recipes-core/musl-rpmatch/musl-rpmatch_git.bb b/sources/meta-openembedded/meta-oe/recipes-core/musl-rpmatch/musl-rpmatch_git.bb index 0bb45b8e..fe3cf73e 100644 --- a/sources/meta-openembedded/meta-oe/recipes-core/musl-rpmatch/musl-rpmatch_git.bb +++ b/sources/meta-openembedded/meta-oe/recipes-core/musl-rpmatch/musl-rpmatch_git.bb @@ -7,6 +7,9 @@ SRC_URI = "gitsm://github.com/pullmoll/musl-rpmatch.git;protocol=https;branch=ma PV = "1.0+git" SRCREV = "46267b154987d3e1f25d3a75423faa62bb5ee342" +# Upstream repo has not made releases/tags after 1.0 +UPSTREAM_CHECK_COMMITS = "1" + inherit autotools S = "${WORKDIR}/git" diff --git a/sources/meta-openembedded/meta-oe/recipes-core/ndctl/ndctl_v78.bb b/sources/meta-openembedded/meta-oe/recipes-core/ndctl/ndctl_v78.bb deleted file mode 100644 index 907c02c7..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-core/ndctl/ndctl_v78.bb +++ /dev/null @@ -1,34 +0,0 @@ -SUMMARY = "libnvdimm utility library" -DESCRIPTION = "Utility library for managing the libnvdimm \ -(non-volatile memory device) sub-system in the Linux kernel. \ -The LIBNVDIMM subsystem provides support for three types of \ -NVDIMMs, namely,PMEM, BLK, and NVDIMM devices that can \ -simultaneously support both PMEM and BLK mode access." -HOMEPAGE = "https://git.kernel.org/cgit/linux/kernel/git/nvdimm/nvdimm.git/tree/Documentation/nvdimm/nvdimm.txt?h=libnvdimm-for-next" -LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later & MIT & CC0-1.0" -LIC_FILES_CHKSUM = "file://COPYING;md5=74a614eac8b2657a4b8e6607421a0883" - -inherit meson pkgconfig bash-completion systemd - -SRCREV = "a871e6153b11fe63780b37cdcb1eb347b296095c" -SRC_URI = "git://github.com/pmem/ndctl.git;branch=main;protocol=https \ - file://0001-include-libgen.h-for-basename.patch" - -UPSTREAM_CHECK_GITTAGREGEX = "(?Pv\d+(\.\d+)*)" - -DEPENDS = "kmod udev json-c keyutils iniparser libtraceevent libtracefs" - -S = "${WORKDIR}/git" - -EXTRA_OEMESON += "-Ddestructive=enabled -Diniparserdir=${STAGING_INCDIR}/iniparser" - -PACKAGECONFIG ??= "tests ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd','',d)}" -PACKAGECONFIG[systemd] = "-Dsystemd=enabled,-Dsystemd=disabled,systemd" -PACKAGECONFIG[tests] = "-Dtest=enabled, -Dtest=disabled," -PACKAGECONFIG[docs] = "-Ddocs=enabled -Dasciidoctor=enabled,-Ddocs=disabled -Dasciidoctor=disabled, asciidoc-native" - -SYSTEMD_PACKAGES = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${PN}','',d)}" -SYSTEMD_SERVICE:${PN} = "ndctl-monitor.service daxdev-reconfigure@.service" -SYSTEMD_AUTO_ENABLE:${PN} = "disable" - -FILES:${PN} += "${datadir}/daxctl/daxctl.conf ${nonarch_libdir}/systemd/system" diff --git a/sources/meta-openembedded/meta-oe/recipes-core/ndctl/ndctl_v79.bb b/sources/meta-openembedded/meta-oe/recipes-core/ndctl/ndctl_v79.bb new file mode 100644 index 00000000..9a4bc49d --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-core/ndctl/ndctl_v79.bb @@ -0,0 +1,34 @@ +SUMMARY = "libnvdimm utility library" +DESCRIPTION = "Utility library for managing the libnvdimm \ +(non-volatile memory device) sub-system in the Linux kernel. \ +The LIBNVDIMM subsystem provides support for three types of \ +NVDIMMs, namely,PMEM, BLK, and NVDIMM devices that can \ +simultaneously support both PMEM and BLK mode access." +HOMEPAGE = "https://git.kernel.org/cgit/linux/kernel/git/nvdimm/nvdimm.git/tree/Documentation/nvdimm/nvdimm.txt?h=libnvdimm-for-next" +LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later & MIT & CC0-1.0" +LIC_FILES_CHKSUM = "file://COPYING;md5=74a614eac8b2657a4b8e6607421a0883" + +inherit meson pkgconfig bash-completion systemd + +SRCREV = "16f45755f991f4fb6d76fec70a42992426c84234" +SRC_URI = "git://github.com/pmem/ndctl.git;branch=main;protocol=https \ + file://0001-include-libgen.h-for-basename.patch" + +UPSTREAM_CHECK_GITTAGREGEX = "(?Pv\d+(\.\d+)*)" + +DEPENDS = "kmod udev json-c keyutils iniparser libtraceevent libtracefs" + +S = "${WORKDIR}/git" + +EXTRA_OEMESON += "-Ddestructive=enabled -Diniparserdir=${STAGING_INCDIR}/iniparser" + +PACKAGECONFIG ??= "tests ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd','',d)}" +PACKAGECONFIG[systemd] = "-Dsystemd=enabled,-Dsystemd=disabled,systemd" +PACKAGECONFIG[tests] = "-Dtest=enabled, -Dtest=disabled," +PACKAGECONFIG[docs] = "-Ddocs=enabled -Dasciidoctor=enabled,-Ddocs=disabled -Dasciidoctor=disabled, asciidoc-native" + +SYSTEMD_PACKAGES = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${PN}','',d)}" +SYSTEMD_SERVICE:${PN} = "ndctl-monitor.service daxdev-reconfigure@.service" +SYSTEMD_AUTO_ENABLE:${PN} = "disable" + +FILES:${PN} += "${datadir}/daxctl/daxctl.conf ${nonarch_libdir}/systemd/system" diff --git a/sources/meta-openembedded/meta-oe/recipes-core/opencl/opencl-headers_2023.12.14.bb b/sources/meta-openembedded/meta-oe/recipes-core/opencl/opencl-headers_2023.12.14.bb deleted file mode 100644 index 8b1c7956..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-core/opencl/opencl-headers_2023.12.14.bb +++ /dev/null @@ -1,19 +0,0 @@ -SUMMARY = "OpenCL API Headers" -DESCRIPTION = "OpenCL compute API headers from Khronos Group" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" -SECTION = "base" - -S = "${WORKDIR}/git" -SRCREV = "2368105c0531069fe927989505de7d125ec58c55" -SRC_URI = "git://github.com/KhronosGroup/OpenCL-Headers.git;branch=main;protocol=https" - -do_configure[noexec] = "1" -do_compile[noexec] = "1" -ALLOW_EMPTY:${PN} = "1" - -do_install () { - install -d ${D}${includedir}/CL/ - install -m 0644 ${S}/CL/*.h ${D}${includedir}/CL -} -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-oe/recipes-core/opencl/opencl-headers_2024.05.08.bb b/sources/meta-openembedded/meta-oe/recipes-core/opencl/opencl-headers_2024.05.08.bb new file mode 100644 index 00000000..01e83c81 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-core/opencl/opencl-headers_2024.05.08.bb @@ -0,0 +1,19 @@ +SUMMARY = "OpenCL API Headers" +DESCRIPTION = "OpenCL compute API headers from Khronos Group" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" +SECTION = "base" + +S = "${WORKDIR}/git" +SRCREV = "8275634cf9ec31b6484c2e6be756237cb583999d" +SRC_URI = "git://github.com/KhronosGroup/OpenCL-Headers.git;branch=main;protocol=https" + +do_configure[noexec] = "1" +do_compile[noexec] = "1" +ALLOW_EMPTY:${PN} = "1" + +do_install () { + install -d ${D}${includedir}/CL/ + install -m 0644 ${S}/CL/*.h ${D}${includedir}/CL +} +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-oe/recipes-core/opencl/opencl-icd-loader_2023.12.14.bb b/sources/meta-openembedded/meta-oe/recipes-core/opencl/opencl-icd-loader_2023.12.14.bb deleted file mode 100644 index 146ec6e4..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-core/opencl/opencl-icd-loader_2023.12.14.bb +++ /dev/null @@ -1,54 +0,0 @@ -SUMMARY = "OpenCL ICD Loader" -DESCRIPTION = "OpenCL compute ICD Loader from Khronos Group" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" -SECTION = "base" - -inherit pkgconfig cmake - -DEPENDS += "opencl-headers" - -PROVIDES = "virtual/opencl-icd" -RPROVIDES:${PN} = "virtual-opencl-icd" - -S = "${WORKDIR}/git" - -SRCREV = "229410f86a8c8c9e0f86f195409e5481a2bae067" -SRC_URI = "git://github.com/KhronosGroup/OpenCL-ICD-Loader.git;branch=main;protocol=https" - -EXTRA_OECMAKE:append = " \ - -DOPENCL_ICD_LOADER_HEADERS_DIR=${STAGING_INCDIR} \ -" - -do_install() { - install -d ${D}${bindir} - install -m 0755 ${B}/icd_loader_test ${D}${bindir}/ - chrpath -d ${D}${bindir}/icd_loader_test - install -d ${D}${libdir} - install -m 0644 ${B}/libIcdLog.so ${D}${libdir}/ - install -m 0644 ${B}/libOpenCLDriverStub.so ${D}${libdir}/ - chrpath -d ${D}${libdir}/libOpenCLDriverStub.so - install -m 0644 ${B}/libOpenCL.so.1.2 ${D}${libdir}/ - cd ${D}${libdir} - ln -s libOpenCL.so.1.2 libOpenCL.so.1 - ln -s libOpenCL.so.1 libOpenCL.so -} - -PACKAGES = "opencl-icd-loader opencl-icd-loader-dev" -PACKAGES += "libicdlog libicdlog-dbg" -PACKAGE_DEBUG_SPLIT_STYLE = "debug-without-src" - -FILES:${PN} = " \ - ${bindir}/icd_loader_test \ - ${libdir}/libOpenCLDriverStub.so \ - ${libdir}/libOpenCL.so.1.2 \ - ${libdir}/libOpenCL.so.1 \ -" -FILES:${PN}-dev = " \ - ${libdir}/libOpenCL.so \ -" - -FILES:libicdlog = "${libdir}/libIcdLog.so" -FILES:libicdlog-dbg = "${libdir}/.debug/libIcdLog.so" - -RDEPENDS:${PN} = "libicdlog" diff --git a/sources/meta-openembedded/meta-oe/recipes-core/opencl/opencl-icd-loader_2024.05.08.bb b/sources/meta-openembedded/meta-oe/recipes-core/opencl/opencl-icd-loader_2024.05.08.bb new file mode 100644 index 00000000..38db7a24 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-core/opencl/opencl-icd-loader_2024.05.08.bb @@ -0,0 +1,54 @@ +SUMMARY = "OpenCL ICD Loader" +DESCRIPTION = "OpenCL compute ICD Loader from Khronos Group" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" +SECTION = "base" + +inherit pkgconfig cmake + +DEPENDS += "opencl-headers" + +PROVIDES = "virtual/opencl-icd" +RPROVIDES:${PN} = "virtual-opencl-icd" + +S = "${WORKDIR}/git" + +SRCREV = "861b68b290e76d08e7241608479c16431f529945" +SRC_URI = "git://github.com/KhronosGroup/OpenCL-ICD-Loader.git;branch=main;protocol=https" + +EXTRA_OECMAKE:append = " \ + -DOPENCL_ICD_LOADER_HEADERS_DIR=${STAGING_INCDIR} \ +" + +do_install() { + install -d ${D}${bindir} + install -m 0755 ${B}/icd_loader_test ${D}${bindir}/ + chrpath -d ${D}${bindir}/icd_loader_test + install -d ${D}${libdir} + install -m 0644 ${B}/libIcdLog.so ${D}${libdir}/ + install -m 0644 ${B}/libOpenCLDriverStub.so ${D}${libdir}/ + chrpath -d ${D}${libdir}/libOpenCLDriverStub.so + install -m 0644 ${B}/libOpenCL.so.1.2 ${D}${libdir}/ + cd ${D}${libdir} + ln -s libOpenCL.so.1.2 libOpenCL.so.1 + ln -s libOpenCL.so.1 libOpenCL.so +} + +PACKAGES = "opencl-icd-loader opencl-icd-loader-dev" +PACKAGES += "libicdlog libicdlog-dbg" +PACKAGE_DEBUG_SPLIT_STYLE = "debug-without-src" + +FILES:${PN} = " \ + ${bindir}/icd_loader_test \ + ${libdir}/libOpenCLDriverStub.so \ + ${libdir}/libOpenCL.so.1.2 \ + ${libdir}/libOpenCL.so.1 \ +" +FILES:${PN}-dev = " \ + ${libdir}/libOpenCL.so \ +" + +FILES:libicdlog = "${libdir}/libIcdLog.so" +FILES:libicdlog-dbg = "${libdir}/.debug/libIcdLog.so" + +RDEPENDS:${PN} = "libicdlog" diff --git a/sources/meta-openembedded/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb b/sources/meta-openembedded/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb index 71f74287..6f31283f 100644 --- a/sources/meta-openembedded/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb +++ b/sources/meta-openembedded/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb @@ -243,6 +243,7 @@ RDEPENDS:packagegroup-meta-oe-devtools ="\ cloc \ icon-slicer \ cscope \ + dbd-mariadb \ dmalloc \ ${@bb.utils.contains("PACKAGE_CLASSES", "package_rpm", "dnf-plugin-tui", "", d)} \ doxygen \ @@ -287,7 +288,6 @@ RDEPENDS:packagegroup-meta-oe-devtools ="\ openocd \ pax-utils \ ipc-run \ - libdbd-mysql-perl \ libdbi-perl \ libdev-checklib-perl \ libio-pty-perl \ @@ -353,7 +353,6 @@ RDEPENDS:packagegroup-meta-oe-extended ="\ figlet \ libcec \ libdivecomputer \ - fluentbit \ ${@bb.utils.contains("DISTRO_FEATURES", "x11", "libgxim", "", d)} \ liblognorm \ libmodbus \ @@ -607,12 +606,13 @@ RDEPENDS:packagegroup-meta-oe-graphics ="\ ${@bb.utils.contains("DISTRO_FEATURES", "x11 pam", "tigervnc", "", d)} \ tslib \ unclutter-xfixes \ - libvdpau \ + ${@bb.utils.contains("DISTRO_FEATURES", "x11", "libvdpau vdpauinfo", "", d)} \ xcursorgen \ ${@bb.utils.contains("DISTRO_FEATURES", "x11 pam", "xscreensaver", "", d)} \ yad \ ydotool \ parallel-deqp-runner \ + deqp-runner \ ${@bb.utils.contains("DISTRO_FEATURES", "opengl", "opengl-es-cts", "", d)} \ ${@bb.utils.contains("DISTRO_FEATURES", "opengl vulkan", "vulkan-cts", "", d)} \ " @@ -688,7 +688,6 @@ RDEPENDS:packagegroup-meta-oe-multimedia ="\ RDEPENDS:packagegroup-meta-oe-navigation ="\ geos \ ${@bb.utils.contains("DISTRO_FEATURES", "bluz4", "gpsd-machine-conf gpsd", "", d)} \ - ${@bb.utils.contains("DISTRO_FEATURES", "x11", "orrery", "", d)} \ geoclue \ libspatialite \ proj \ @@ -743,7 +742,6 @@ RDEPENDS:packagegroup-meta-oe-support ="\ exiv2 \ libnice \ c-periphery \ - fmt \ function2 \ gd \ gflags \ @@ -813,13 +811,11 @@ RDEPENDS:packagegroup-meta-oe-support ="\ libcanberra \ libssh \ libssh2 \ - libee \ libusbgx-config \ libusbgx \ lockdev \ logwarn \ libjs-sizzle \ - liblinebreak \ mailcap \ liboauth \ mg \ @@ -974,7 +970,6 @@ RDEPENDS:packagegroup-meta-oe-ptest-packages = "\ oprofile-ptest \ libteam-ptest \ uthash-ptest \ - libee-ptest \ poco-ptest \ cmocka-ptest \ minicoredumper-ptest \ diff --git a/sources/meta-openembedded/meta-oe/recipes-core/pim435/pim435_git.bb b/sources/meta-openembedded/meta-oe/recipes-core/pim435/pim435_git.bb index 80e3cc62..8fc8749a 100644 --- a/sources/meta-openembedded/meta-oe/recipes-core/pim435/pim435_git.bb +++ b/sources/meta-openembedded/meta-oe/recipes-core/pim435/pim435_git.bb @@ -11,6 +11,10 @@ LIC_FILES_CHKSUM = "file://LICENSES/MIT.txt;md5=7dda4e90ded66ab88b86f76169f28663 SRC_URI = "git://gitlab.eclipse.org/eclipse/oniro-blueprints/core/pim435;protocol=https;branch=main" SRCREV = "445ed623ec8d3ecbb1d566900b4ef3fb3031d689" + +# Upstream repo does not tag +UPSTREAM_CHECK_COMMITS = "1" + S = "${WORKDIR}/git" DEPENDS = "i2c-tools" diff --git a/sources/meta-openembedded/meta-oe/recipes-core/proxy-libintl/proxy-libintl_20100902.bb b/sources/meta-openembedded/meta-oe/recipes-core/proxy-libintl/proxy-libintl_20100902.bb index 247cc426..28213f38 100644 --- a/sources/meta-openembedded/meta-oe/recipes-core/proxy-libintl/proxy-libintl_20100902.bb +++ b/sources/meta-openembedded/meta-oe/recipes-core/proxy-libintl/proxy-libintl_20100902.bb @@ -2,7 +2,7 @@ SUMMARY = "Proxy libintl" HOMEPAGE = "http://ftp.gnome.org/pub/GNOME/binaries/win32/dependencies/" SECTION = "libs" LICENSE = "LGPL-2.0-only" -LIC_FILES_CHKSUM = "file://src/proxy-libintl/COPYING.LIB.txt;md5=bc400bc21422f9a92e76ec2c5167ca2e" +LIC_FILES_CHKSUM = "file://${UNPACKDIR}/src/proxy-libintl/COPYING.LIB.txt;md5=bc400bc21422f9a92e76ec2c5167ca2e" PROVIDES = "virtual/libintl" @@ -12,7 +12,8 @@ SRC_URI = " \ SRC_URI[md5sum] = "aef407c2b97ee829383aadd867c61d1e" SRC_URI[sha256sum] = "291ac350cc5eb4a01b0d651ca99fae64cee8a1c06b2005277fab5a4356f9ae91" -S = "${WORKDIR}" +UPSTREAM_CHECK_REGEX = "${BPN}-dev_(?P\d+)_win32\.zip" + PACKAGES = "${PN} ${PN}-dev" FILES:${PN}-dev = "${includedir}/libintl.h ${libdir}/libintl.a" INSANE_SKIP:${PN}-dev = "staticdev" @@ -21,13 +22,13 @@ CFLAGS:append = " -fPIC -Wall -I ../../include ${@['-DSTUB_ONLY', ''][d.getVar(' TARGET_CC_ARCH += "${LDFLAGS}" do_compile() { - cd ${WORKDIR}/src/proxy-libintl + cd ${UNPACKDIR}/src/proxy-libintl oe_runmake ../../lib/libintl.a } do_install() { install -d ${D}/${includedir} install -d ${D}/${libdir} - install -m 0644 ${WORKDIR}/include/libintl.h ${D}/${includedir} - install -m 0644 ${WORKDIR}/lib/libintl.a ${D}/${libdir} + install -m 0644 ${UNPACKDIR}/include/libintl.h ${D}/${includedir} + install -m 0644 ${UNPACKDIR}/lib/libintl.a ${D}/${libdir} } diff --git a/sources/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0012-do-not-disable-buffer-in-writing-files.patch b/sources/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0012-do-not-disable-buffer-in-writing-files.patch index 66be7907..c23d9b75 100644 --- a/sources/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0012-do-not-disable-buffer-in-writing-files.patch +++ b/sources/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0012-do-not-disable-buffer-in-writing-files.patch @@ -46,11 +46,9 @@ Signed-off-by: Chen Qi src/vconsole/vconsole-setup.c | 2 +- 22 files changed, 50 insertions(+), 51 deletions(-) -diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c -index d2be79622f..e65fecb68d 100644 --- a/src/basic/cgroup-util.c +++ b/src/basic/cgroup-util.c -@@ -417,7 +417,7 @@ int cg_kill_kernel_sigkill(const char *path) { +@@ -417,7 +417,7 @@ int cg_kill_kernel_sigkill(const char *p if (r < 0) return r; @@ -59,7 +57,7 @@ index d2be79622f..e65fecb68d 100644 if (r < 0) return r; -@@ -843,7 +843,7 @@ int cg_install_release_agent(const char *controller, const char *agent) { +@@ -843,7 +843,7 @@ int cg_install_release_agent(const char sc = strstrip(contents); if (isempty(sc)) { @@ -68,7 +66,7 @@ index d2be79622f..e65fecb68d 100644 if (r < 0) return r; } else if (!path_equal(sc, agent)) -@@ -861,7 +861,7 @@ int cg_install_release_agent(const char *controller, const char *agent) { +@@ -861,7 +861,7 @@ int cg_install_release_agent(const char sc = strstrip(contents); if (streq(sc, "0")) { @@ -77,7 +75,7 @@ index d2be79622f..e65fecb68d 100644 if (r < 0) return r; -@@ -888,7 +888,7 @@ int cg_uninstall_release_agent(const char *controller) { +@@ -888,7 +888,7 @@ int cg_uninstall_release_agent(const cha if (r < 0) return r; @@ -86,7 +84,7 @@ index d2be79622f..e65fecb68d 100644 if (r < 0) return r; -@@ -898,7 +898,7 @@ int cg_uninstall_release_agent(const char *controller) { +@@ -898,7 +898,7 @@ int cg_uninstall_release_agent(const cha if (r < 0) return r; @@ -95,7 +93,7 @@ index d2be79622f..e65fecb68d 100644 if (r < 0) return r; -@@ -1814,7 +1814,7 @@ int cg_set_attribute(const char *controller, const char *path, const char *attri +@@ -1814,7 +1814,7 @@ int cg_set_attribute(const char *control if (r < 0) return r; @@ -104,11 +102,9 @@ index d2be79622f..e65fecb68d 100644 } int cg_get_attribute(const char *controller, const char *path, const char *attribute, char **ret) { -diff --git a/src/basic/namespace-util.c b/src/basic/namespace-util.c -index 2101f617ad..63817bae17 100644 --- a/src/basic/namespace-util.c +++ b/src/basic/namespace-util.c -@@ -227,12 +227,12 @@ int userns_acquire(const char *uid_map, const char *gid_map) { +@@ -227,12 +227,12 @@ int userns_acquire(const char *uid_map, freeze(); xsprintf(path, "/proc/" PID_FMT "/uid_map", pid); @@ -123,11 +119,9 @@ index 2101f617ad..63817bae17 100644 if (r < 0) return log_error_errno(r, "Failed to write GID map: %m"); -diff --git a/src/basic/procfs-util.c b/src/basic/procfs-util.c -index 6cb0ddf575..247cf9e1d1 100644 --- a/src/basic/procfs-util.c +++ b/src/basic/procfs-util.c -@@ -64,13 +64,13 @@ int procfs_tasks_set_limit(uint64_t limit) { +@@ -64,13 +64,13 @@ int procfs_tasks_set_limit(uint64_t limi * decrease it, as threads-max is the much more relevant sysctl. */ if (limit > pid_max-1) { sprintf(buffer, "%" PRIu64, limit+1); /* Add one, since PID 0 is not a valid PID */ @@ -143,11 +137,9 @@ index 6cb0ddf575..247cf9e1d1 100644 if (r < 0) { uint64_t threads_max; -diff --git a/src/basic/sysctl-util.c b/src/basic/sysctl-util.c -index b66a6622ae..8d1c93008a 100644 --- a/src/basic/sysctl-util.c +++ b/src/basic/sysctl-util.c -@@ -58,7 +58,7 @@ int sysctl_write(const char *property, const char *value) { +@@ -58,7 +58,7 @@ int sysctl_write(const char *property, c log_debug("Setting '%s' to '%s'", p, value); @@ -156,8 +148,6 @@ index b66a6622ae..8d1c93008a 100644 } int sysctl_writef(const char *property, const char *format, ...) { -diff --git a/src/binfmt/binfmt.c b/src/binfmt/binfmt.c -index d21f3f79ff..258607cc7e 100644 --- a/src/binfmt/binfmt.c +++ b/src/binfmt/binfmt.c @@ -30,7 +30,7 @@ static bool arg_unregister = false; @@ -169,7 +159,7 @@ index d21f3f79ff..258607cc7e 100644 } static int apply_rule(const char *filename, unsigned line, const char *rule) { -@@ -58,7 +58,7 @@ static int apply_rule(const char *filename, unsigned line, const char *rule) { +@@ -58,7 +58,7 @@ static int apply_rule(const char *filena if (r >= 0) log_debug("%s:%u: Rule '%s' deleted.", filename, line, rulename); @@ -187,11 +177,9 @@ index d21f3f79ff..258607cc7e 100644 if (r < 0) log_warning_errno(r, "Failed to flush binfmt_misc rules, ignoring: %m"); else -diff --git a/src/core/cgroup.c b/src/core/cgroup.c -index 61ac4df1a6..ea18970196 100644 --- a/src/core/cgroup.c +++ b/src/core/cgroup.c -@@ -4578,7 +4578,7 @@ int unit_cgroup_freezer_action(Unit *u, FreezerAction action) { +@@ -4578,7 +4578,7 @@ int unit_cgroup_freezer_action(Unit *u, u->freezer_state = FREEZER_THAWING; } @@ -200,11 +188,9 @@ index 61ac4df1a6..ea18970196 100644 if (r < 0) return r; -diff --git a/src/core/main.c b/src/core/main.c -index 3f71cc0947..0e5aec3e9e 100644 --- a/src/core/main.c +++ b/src/core/main.c -@@ -1678,7 +1678,7 @@ static void initialize_core_pattern(bool skip_setup) { +@@ -1678,7 +1678,7 @@ static void initialize_core_pattern(bool if (getpid_cached() != 1) return; @@ -213,11 +199,9 @@ index 3f71cc0947..0e5aec3e9e 100644 if (r < 0) log_warning_errno(r, "Failed to write '%s' to /proc/sys/kernel/core_pattern, ignoring: %m", arg_early_core_pattern); -diff --git a/src/core/smack-setup.c b/src/core/smack-setup.c -index 7ea902b6f9..1aef2988d0 100644 --- a/src/core/smack-setup.c +++ b/src/core/smack-setup.c -@@ -321,17 +321,17 @@ int mac_smack_setup(bool *loaded_policy) { +@@ -321,17 +321,17 @@ int mac_smack_setup(bool *loaded_policy) } #if HAVE_SMACK_RUN_LABEL @@ -239,8 +223,6 @@ index 7ea902b6f9..1aef2988d0 100644 if (r < 0) log_warning_errno(r, "Failed to set SMACK netlabel rule \"127.0.0.1 -CIPSO\": %m"); #endif -diff --git a/src/home/homework.c b/src/home/homework.c -index 066483e342..5f92dd7064 100644 --- a/src/home/homework.c +++ b/src/home/homework.c @@ -278,7 +278,7 @@ static void drop_caches_now(void) { @@ -252,11 +234,9 @@ index 066483e342..5f92dd7064 100644 if (r < 0) log_warning_errno(r, "Failed to drop caches, ignoring: %m"); else -diff --git a/src/libsystemd/sd-device/sd-device.c b/src/libsystemd/sd-device/sd-device.c -index 2fbc619a34..09d9591e37 100644 --- a/src/libsystemd/sd-device/sd-device.c +++ b/src/libsystemd/sd-device/sd-device.c -@@ -2516,7 +2516,7 @@ _public_ int sd_device_set_sysattr_value(sd_device *device, const char *sysattr, +@@ -2516,7 +2516,7 @@ _public_ int sd_device_set_sysattr_value if (!value) return -ENOMEM; @@ -265,11 +245,9 @@ index 2fbc619a34..09d9591e37 100644 if (r < 0) { /* On failure, clear cache entry, as we do not know how it fails. */ device_remove_cached_sysattr_value(device, sysattr); -diff --git a/src/nspawn/nspawn-cgroup.c b/src/nspawn/nspawn-cgroup.c -index a5002437c6..b12e6cd9c9 100644 --- a/src/nspawn/nspawn-cgroup.c +++ b/src/nspawn/nspawn-cgroup.c -@@ -124,7 +124,7 @@ int sync_cgroup(pid_t pid, CGroupUnified unified_requested, uid_t uid_shift) { +@@ -124,7 +124,7 @@ int sync_cgroup(pid_t pid, CGroupUnified fn = strjoina(tree, cgroup, "/cgroup.procs"); sprintf(pid_string, PID_FMT, pid); @@ -278,11 +256,9 @@ index a5002437c6..b12e6cd9c9 100644 if (r < 0) { log_error_errno(r, "Failed to move process: %m"); goto finish; -diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c -index 6ab604d3dc..bbec6b686c 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c -@@ -2688,7 +2688,7 @@ static int reset_audit_loginuid(void) { +@@ -2690,7 +2690,7 @@ static int reset_audit_loginuid(void) { if (streq(p, "4294967295")) return 0; @@ -291,7 +267,7 @@ index 6ab604d3dc..bbec6b686c 100644 if (r < 0) { log_error_errno(r, "Failed to reset audit login UID. This probably means that your kernel is too\n" -@@ -4141,7 +4141,7 @@ static int setup_uid_map( +@@ -4143,7 +4143,7 @@ static int setup_uid_map( return log_oom(); xsprintf(uid_map, "/proc/" PID_FMT "/uid_map", pid); @@ -300,7 +276,7 @@ index 6ab604d3dc..bbec6b686c 100644 if (r < 0) return log_error_errno(r, "Failed to write UID map: %m"); -@@ -4151,7 +4151,7 @@ static int setup_uid_map( +@@ -4153,7 +4153,7 @@ static int setup_uid_map( return log_oom(); xsprintf(uid_map, "/proc/" PID_FMT "/gid_map", pid); @@ -309,8 +285,6 @@ index 6ab604d3dc..bbec6b686c 100644 if (r < 0) return log_error_errno(r, "Failed to write GID map: %m"); -diff --git a/src/shared/binfmt-util.c b/src/shared/binfmt-util.c -index a26175474b..1413a9c72c 100644 --- a/src/shared/binfmt-util.c +++ b/src/shared/binfmt-util.c @@ -46,7 +46,7 @@ int disable_binfmt(void) { @@ -322,11 +296,9 @@ index a26175474b..1413a9c72c 100644 if (r < 0) return log_warning_errno(r, "Failed to unregister binfmt_misc entries: %m"); -diff --git a/src/shared/cgroup-setup.c b/src/shared/cgroup-setup.c -index 934a16eaf3..c921ced861 100644 --- a/src/shared/cgroup-setup.c +++ b/src/shared/cgroup-setup.c -@@ -351,7 +351,7 @@ int cg_attach(const char *controller, const char *path, pid_t pid) { +@@ -351,7 +351,7 @@ int cg_attach(const char *controller, co xsprintf(c, PID_FMT "\n", pid); @@ -344,11 +316,9 @@ index 934a16eaf3..c921ced861 100644 if (r < 0) { log_debug_errno(r, "Failed to %s controller %s for %s (%s): %m", FLAGS_SET(mask, bit) ? "enable" : "disable", n, p, fs); -diff --git a/src/shared/coredump-util.c b/src/shared/coredump-util.c -index 805503f366..01a7ccb291 100644 --- a/src/shared/coredump-util.c +++ b/src/shared/coredump-util.c -@@ -163,7 +163,7 @@ int set_coredump_filter(uint64_t value) { +@@ -163,7 +163,7 @@ int set_coredump_filter(uint64_t value) xsprintf(t, "0x%"PRIx64, value); return write_string_file("/proc/self/coredump_filter", t, @@ -366,11 +336,9 @@ index 805503f366..01a7ccb291 100644 if (r < 0) log_debug_errno(r, "Failed to turn off coredumps, ignoring: %m"); } -diff --git a/src/shared/hibernate-util.c b/src/shared/hibernate-util.c -index 3eb13d48f6..d09b901be1 100644 --- a/src/shared/hibernate-util.c +++ b/src/shared/hibernate-util.c -@@ -481,7 +481,7 @@ int write_resume_config(dev_t devno, uint64_t offset, const char *device) { +@@ -501,7 +501,7 @@ int write_resume_config(dev_t devno, uin /* We write the offset first since it's safer. Note that this file is only available in 4.17+, so * fail gracefully if it doesn't exist and we're only overwriting it with 0. */ @@ -379,7 +347,7 @@ index 3eb13d48f6..d09b901be1 100644 if (r == -ENOENT) { if (offset != 0) return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP), -@@ -497,7 +497,7 @@ int write_resume_config(dev_t devno, uint64_t offset, const char *device) { +@@ -517,7 +517,7 @@ int write_resume_config(dev_t devno, uin log_debug("Wrote resume_offset=%s for device '%s' to /sys/power/resume_offset.", offset_str, device); @@ -388,11 +356,9 @@ index 3eb13d48f6..d09b901be1 100644 if (r < 0) return log_error_errno(r, "Failed to write device '%s' (%s) to /sys/power/resume: %m", -diff --git a/src/shared/smack-util.c b/src/shared/smack-util.c -index 1f88e724d0..feb18b320a 100644 --- a/src/shared/smack-util.c +++ b/src/shared/smack-util.c -@@ -113,7 +113,7 @@ int mac_smack_apply_pid(pid_t pid, const char *label) { +@@ -113,7 +113,7 @@ int mac_smack_apply_pid(pid_t pid, const return 0; p = procfs_file_alloca(pid, "attr/current"); @@ -401,24 +367,20 @@ index 1f88e724d0..feb18b320a 100644 if (r < 0) return r; -diff --git a/src/shared/watchdog.c b/src/shared/watchdog.c -index 4c1a968718..6faf6806a5 100644 --- a/src/shared/watchdog.c +++ b/src/shared/watchdog.c -@@ -93,7 +93,7 @@ static int set_pretimeout_governor(const char *governor) { +@@ -93,7 +93,7 @@ static int set_pretimeout_governor(const r = write_string_file(sys_fn, governor, - WRITE_STRING_FILE_DISABLE_BUFFER | WRITE_STRING_FILE_VERIFY_ON_FAILURE | WRITE_STRING_FILE_VERIFY_IGNORE_NEWLINE); + WRITE_STRING_FILE_VERIFY_ON_FAILURE | WRITE_STRING_FILE_VERIFY_IGNORE_NEWLINE); if (r < 0) - return log_error_errno(r, "Failed to set pretimeout_governor to '%s': %m", governor); + return log_error_errno(r, "Failed to set watchdog pretimeout_governor to '%s': %m", governor); -diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c -index 21af3e9e52..6d4b84b5d5 100644 --- a/src/sleep/sleep.c +++ b/src/sleep/sleep.c -@@ -137,7 +137,7 @@ static int write_state(int fd, char * const *states) { +@@ -137,7 +137,7 @@ static int write_state(int fd, char * co if (k < 0) return RET_GATHER(r, k); @@ -427,7 +389,7 @@ index 21af3e9e52..6d4b84b5d5 100644 if (k >= 0) { log_debug("Using sleep state '%s'.", *state); return 0; -@@ -155,7 +155,7 @@ static int write_mode(char * const *modes) { +@@ -155,7 +155,7 @@ static int write_mode(char * const *mode STRV_FOREACH(mode, modes) { int k; @@ -436,11 +398,9 @@ index 21af3e9e52..6d4b84b5d5 100644 if (k >= 0) { log_debug("Using sleep disk mode '%s'.", *mode); return 0; -diff --git a/src/storagetm/storagetm.c b/src/storagetm/storagetm.c -index ae63baaf79..82eeca479a 100644 --- a/src/storagetm/storagetm.c +++ b/src/storagetm/storagetm.c -@@ -186,7 +186,7 @@ static int nvme_subsystem_unlink(NvmeSubsystem *s) { +@@ -186,7 +186,7 @@ static int nvme_subsystem_unlink(NvmeSub if (!enable_fn) return log_oom(); @@ -449,7 +409,7 @@ index ae63baaf79..82eeca479a 100644 if (r < 0) log_warning_errno(r, "Failed to disable namespace '%s' of NVME subsystem '%s', ignoring: %m", e->d_name, s->name); -@@ -254,7 +254,7 @@ static int nvme_subsystem_write_metadata(int subsystem_fd, sd_device *device) { +@@ -254,7 +254,7 @@ static int nvme_subsystem_write_metadata _cleanup_free_ char *truncated = strndup(w, 40); /* kernel refuses more than 40 chars (as per nvme spec) */ /* The default string stored in 'attr_model' is "Linux" btw. */ @@ -458,7 +418,7 @@ index ae63baaf79..82eeca479a 100644 if (r < 0) log_warning_errno(r, "Failed to set model of subsystem to '%s', ignoring: %m", w); } -@@ -268,7 +268,7 @@ static int nvme_subsystem_write_metadata(int subsystem_fd, sd_device *device) { +@@ -268,7 +268,7 @@ static int nvme_subsystem_write_metadata return log_oom(); /* The default string stored in 'attr_firmware' is `uname -r` btw, but truncated to 8 chars. */ @@ -467,7 +427,7 @@ index ae63baaf79..82eeca479a 100644 if (r < 0) log_warning_errno(r, "Failed to set model of subsystem to '%s', ignoring: %m", truncated); } -@@ -295,7 +295,7 @@ static int nvme_subsystem_write_metadata(int subsystem_fd, sd_device *device) { +@@ -295,7 +295,7 @@ static int nvme_subsystem_write_metadata if (!truncated) return log_oom(); @@ -476,7 +436,7 @@ index ae63baaf79..82eeca479a 100644 if (r < 0) log_warning_errno(r, "Failed to set serial of subsystem to '%s', ignoring: %m", truncated); } -@@ -345,7 +345,7 @@ static int nvme_namespace_write_metadata(int namespace_fd, sd_device *device, co +@@ -345,7 +345,7 @@ static int nvme_namespace_write_metadata id = id128_digest(j, l); } @@ -485,7 +445,7 @@ index ae63baaf79..82eeca479a 100644 if (r < 0) log_warning_errno(r, "Failed to set uuid of namespace to '%s', ignoring: %m", SD_ID128_TO_UUID_STRING(id)); -@@ -408,7 +408,7 @@ static int nvme_subsystem_add(const char *node, int consumed_fd, sd_device *devi +@@ -408,7 +408,7 @@ static int nvme_subsystem_add(const char if (subsystem_fd < 0) return log_error_errno(subsystem_fd, "Failed to create NVME subsystem '%s': %m", j); @@ -494,7 +454,7 @@ index ae63baaf79..82eeca479a 100644 if (r < 0) return log_error_errno(r, "Failed to set 'attr_allow_any_host' flag: %m"); -@@ -423,11 +423,11 @@ static int nvme_subsystem_add(const char *node, int consumed_fd, sd_device *devi +@@ -423,11 +423,11 @@ static int nvme_subsystem_add(const char /* We use /proc/$PID/fd/$FD rather than /proc/self/fd/$FD, because this string is visible to others * via configfs, and by including the PID it's clear to who the stuff belongs. */ @@ -532,11 +492,9 @@ index ae63baaf79..82eeca479a 100644 if (r < 0) return log_error_errno(r, "Failed to set IP address on NVME port %" PRIu16 ": %m", portnr); -diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c -index febe345b4c..a90b610ba1 100644 --- a/src/udev/udev-rules.c +++ b/src/udev/udev-rules.c -@@ -2711,7 +2711,6 @@ static int udev_rule_apply_token_to_event( +@@ -2711,7 +2711,6 @@ static int udev_rule_apply_token_to_even log_event_debug(dev, token, "ATTR '%s' writing '%s'", buf, value); r = write_string_file(buf, value, WRITE_STRING_FILE_VERIFY_ON_FAILURE | @@ -544,11 +502,9 @@ index febe345b4c..a90b610ba1 100644 WRITE_STRING_FILE_AVOID_NEWLINE | WRITE_STRING_FILE_VERIFY_IGNORE_NEWLINE); if (r < 0) -diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c -index 4d82c65f0a..3a3d861b83 100644 --- a/src/vconsole/vconsole-setup.c +++ b/src/vconsole/vconsole-setup.c -@@ -261,7 +261,7 @@ static int toggle_utf8_vc(const char *name, int fd, bool utf8) { +@@ -261,7 +261,7 @@ static int toggle_utf8_vc(const char *na static int toggle_utf8_sysfs(bool utf8) { int r; @@ -557,6 +513,3 @@ index 4d82c65f0a..3a3d861b83 100644 if (r < 0) return log_warning_errno(r, "Failed to %s sysfs UTF-8 flag: %m", enable_disable(utf8)); --- -2.34.1 - diff --git a/sources/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0022-avoid-missing-LOCK_EX-declaration.patch b/sources/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0022-avoid-missing-LOCK_EX-declaration.patch index 24f3bf74..56755ac5 100644 --- a/sources/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0022-avoid-missing-LOCK_EX-declaration.patch +++ b/sources/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0022-avoid-missing-LOCK_EX-declaration.patch @@ -1,7 +1,7 @@ -From fd52f1764647e03a35e8f0ed0ef952049073ccbd Mon Sep 17 00:00:00 2001 +From 97d3ed7834bd86615ba4acdbef984c677b7e7791 Mon Sep 17 00:00:00 2001 From: Chen Qi Date: Tue, 2 Jan 2024 11:03:27 +0800 -Subject: [PATCH 22/22] avoid missing LOCK_EX declaration +Subject: [PATCH] avoid missing LOCK_EX declaration This only happens on MUSL. Include sys/file.h to avoid compilation error about missing LOCK_EX declaration. @@ -14,8 +14,6 @@ Signed-off-by: Chen Qi src/shared/dev-setup.h | 1 + 2 files changed, 2 insertions(+) -diff --git a/src/core/exec-invoke.c b/src/core/exec-invoke.c -index 70d963e269..7084811439 100644 --- a/src/core/exec-invoke.c +++ b/src/core/exec-invoke.c @@ -4,6 +4,7 @@ @@ -26,8 +24,6 @@ index 70d963e269..7084811439 100644 #if HAVE_PAM #include -diff --git a/src/shared/dev-setup.h b/src/shared/dev-setup.h -index 5339bc4e5e..0697495f23 100644 --- a/src/shared/dev-setup.h +++ b/src/shared/dev-setup.h @@ -2,6 +2,7 @@ @@ -38,6 +34,3 @@ index 5339bc4e5e..0697495f23 100644 int lock_dev_console(void); --- -2.34.1 - diff --git a/sources/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd_255.4.bb b/sources/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd_255.4.bb deleted file mode 100644 index 3b44e023..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd_255.4.bb +++ /dev/null @@ -1,77 +0,0 @@ -SUMMARY = "libsystemd static library" -DESCRIPTION = "libsystemd static library built specifically as an integral component of sdbus-c++" - -SECTION = "libs" - -LICENSE = "LGPL-2.1-or-later" -LIC_FILES_CHKSUM = "file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c" - -inherit meson pkgconfig - -DEPENDS += "gperf-native gettext-native util-linux libcap util-linux python3-jinja2-native" - -SRCREV = "387a14a7b67b8b76adaed4175e14bb7e39b2f738" -SRCBRANCH = "v255-stable" -SRC_URI = "git://github.com/systemd/systemd-stable.git;protocol=https;branch=${SRCBRANCH} \ - file://static-libsystemd-pkgconfig.patch \ - " - -# patches needed by musl -SRC_URI:append:libc-musl = " ${SRC_URI_MUSL}" - -SRC_URI_MUSL = "\ - file://0001-missing_type.h-add-comparison_fn_t.patch \ - file://0002-add-fallback-parse_printf_format-implementation.patch \ - file://0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch \ - file://0003-src-basic-missing.h-check-for-missing-strndupa.patch \ - file://0004-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch \ - file://0005-add-missing-FTW_-macros-for-musl.patch \ - file://0006-Use-uintmax_t-for-handling-rlim_t.patch \ - file://0007-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch \ - file://0008-Define-glibc-compatible-basename-for-non-glibc-syste.patch \ - file://0008-implment-systemd-sysv-install-for-OE.patch \ - file://0009-Do-not-disable-buffering-when-writing-to-oom_score_a.patch \ - file://0010-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch \ - file://0011-avoid-redefinition-of-prctl_mm_map-structure.patch \ - file://0012-do-not-disable-buffer-in-writing-files.patch \ - file://0013-Handle-__cpu_mask-usage.patch \ - file://0014-Handle-missing-gshadow.patch \ - file://0015-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch \ - file://0016-pass-correct-parameters-to-getdents64.patch \ - file://0017-Adjust-for-musl-headers.patch \ - file://0018-test-bus-error-strerror-is-assumed-to-be-GNU-specifi.patch \ - file://0019-errno-util-Make-STRERROR-portable-for-musl.patch \ - file://0020-sd-event-Make-malloc_trim-conditional-on-glibc.patch \ - file://0021-shared-Do-not-use-malloc_info-on-musl.patch \ - file://0022-avoid-missing-LOCK_EX-declaration.patch \ -" - -PACKAGECONFIG ??= "gshadow idn" -PACKAGECONFIG:remove:libc-musl = " gshadow idn" -PACKAGECONFIG[gshadow] = "-Dgshadow=true,-Dgshadow=false" -PACKAGECONFIG[idn] = "-Didn=true,-Didn=false" - -CFLAGS:append:libc-musl = " -D__UAPI_DEF_ETHHDR=0 " - -EXTRA_OEMESON += "-Dstatic-libsystemd=pic" - -S = "${WORKDIR}/git" - -RDEPENDS:${PN}-dev = "" - -do_compile() { - ninja -v ${PARALLEL_MAKE} version.h - ninja -v ${PARALLEL_MAKE} libsystemd.a - ninja -v ${PARALLEL_MAKE} src/libsystemd/libsystemd.pc -} - -do_install () { - install -d ${D}${libdir} - install ${B}/libsystemd.a ${D}${libdir} - - install -d ${D}${includedir}/systemd - install ${S}/src/systemd/*.h ${D}${includedir}/systemd - - install -d ${D}${libdir}/pkgconfig - install ${B}/src/libsystemd/libsystemd.pc ${D}${libdir}/pkgconfig -} diff --git a/sources/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd_255.6.bb b/sources/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd_255.6.bb new file mode 100644 index 00000000..ceb42232 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd_255.6.bb @@ -0,0 +1,77 @@ +SUMMARY = "libsystemd static library" +DESCRIPTION = "libsystemd static library built specifically as an integral component of sdbus-c++" + +SECTION = "libs" + +LICENSE = "LGPL-2.1-or-later" +LIC_FILES_CHKSUM = "file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c" + +inherit meson pkgconfig + +DEPENDS += "gperf-native gettext-native util-linux libcap util-linux python3-jinja2-native" + +SRCREV = "5810c25792d4268282dd3892af1a253b690423c9" +SRCBRANCH = "v255-stable" +SRC_URI = "git://github.com/systemd/systemd-stable.git;protocol=https;branch=${SRCBRANCH} \ + file://static-libsystemd-pkgconfig.patch \ + " + +# patches needed by musl +SRC_URI:append:libc-musl = " ${SRC_URI_MUSL}" + +SRC_URI_MUSL = "\ + file://0001-missing_type.h-add-comparison_fn_t.patch \ + file://0002-add-fallback-parse_printf_format-implementation.patch \ + file://0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch \ + file://0003-src-basic-missing.h-check-for-missing-strndupa.patch \ + file://0004-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch \ + file://0005-add-missing-FTW_-macros-for-musl.patch \ + file://0006-Use-uintmax_t-for-handling-rlim_t.patch \ + file://0007-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch \ + file://0008-Define-glibc-compatible-basename-for-non-glibc-syste.patch \ + file://0008-implment-systemd-sysv-install-for-OE.patch \ + file://0009-Do-not-disable-buffering-when-writing-to-oom_score_a.patch \ + file://0010-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch \ + file://0011-avoid-redefinition-of-prctl_mm_map-structure.patch \ + file://0012-do-not-disable-buffer-in-writing-files.patch \ + file://0013-Handle-__cpu_mask-usage.patch \ + file://0014-Handle-missing-gshadow.patch \ + file://0015-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch \ + file://0016-pass-correct-parameters-to-getdents64.patch \ + file://0017-Adjust-for-musl-headers.patch \ + file://0018-test-bus-error-strerror-is-assumed-to-be-GNU-specifi.patch \ + file://0019-errno-util-Make-STRERROR-portable-for-musl.patch \ + file://0020-sd-event-Make-malloc_trim-conditional-on-glibc.patch \ + file://0021-shared-Do-not-use-malloc_info-on-musl.patch \ + file://0022-avoid-missing-LOCK_EX-declaration.patch \ +" + +PACKAGECONFIG ??= "gshadow idn" +PACKAGECONFIG:remove:libc-musl = " gshadow idn" +PACKAGECONFIG[gshadow] = "-Dgshadow=true,-Dgshadow=false" +PACKAGECONFIG[idn] = "-Didn=true,-Didn=false" + +CFLAGS:append:libc-musl = " -D__UAPI_DEF_ETHHDR=0 " + +EXTRA_OEMESON += "-Dstatic-libsystemd=pic" + +S = "${WORKDIR}/git" + +RDEPENDS:${PN}-dev = "" + +do_compile() { + ninja -v ${PARALLEL_MAKE} version.h + ninja -v ${PARALLEL_MAKE} libsystemd.a + ninja -v ${PARALLEL_MAKE} src/libsystemd/libsystemd.pc +} + +do_install () { + install -d ${D}${libdir} + install ${B}/libsystemd.a ${D}${libdir} + + install -d ${D}${includedir}/systemd + install ${S}/src/systemd/*.h ${D}${includedir}/systemd + + install -d ${D}${libdir}/pkgconfig + install ${B}/src/libsystemd/libsystemd.pc ${D}${libdir}/pkgconfig +} diff --git a/sources/meta-openembedded/meta-oe/recipes-core/usleep/files/usleep.c b/sources/meta-openembedded/meta-oe/recipes-core/usleep/files/usleep.c index a5e7d9d7..dfa52ec1 100644 --- a/sources/meta-openembedded/meta-oe/recipes-core/usleep/files/usleep.c +++ b/sources/meta-openembedded/meta-oe/recipes-core/usleep/files/usleep.c @@ -34,7 +34,7 @@ int main(int argc, char **argv) { int showVersion = 0; int showOot = 0; int rc; - char * countStr = NULL; + const char * countStr = NULL; struct poptOption options[] = { { "version", 'v', POPT_ARG_NONE, &showVersion, 0, "Display the version of this program, and exit" }, @@ -44,7 +44,7 @@ int main(int argc, char **argv) { { 0, 0, 0, 0, 0 } }; - optCon = poptGetContext("usleep", argc, argv, options,0); + optCon = poptGetContext("usleep", argc, (const char **)argv, options,0); /*poptReadDefaultConfig(optCon, 1);*/ poptSetOtherOptionHelp(optCon, "[microseconds]"); diff --git a/sources/meta-openembedded/meta-oe/recipes-core/usleep/usleep_1.2.bb b/sources/meta-openembedded/meta-oe/recipes-core/usleep/usleep_1.2.bb index a529032a..e8b4a7fe 100644 --- a/sources/meta-openembedded/meta-oe/recipes-core/usleep/usleep_1.2.bb +++ b/sources/meta-openembedded/meta-oe/recipes-core/usleep/usleep_1.2.bb @@ -3,7 +3,8 @@ SECTION = "base" LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" -S = "${WORKDIR}" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" DEPENDS = "popt" SRC_URI = "file://usleep.c \ @@ -19,8 +20,8 @@ do_install() { install -d ${D}${base_bindir} install -d ${D}${mandir}/man1 - install -m 0755 ${WORKDIR}/usleep ${D}${base_bindir} - install -m 0644 ${WORKDIR}/usleep.1 ${D}${mandir}/man1 + install -m 0755 ${UNPACKDIR}/usleep ${D}${base_bindir} + install -m 0644 ${UNPACKDIR}/usleep.1 ${D}${mandir}/man1 } inherit update-alternatives @@ -31,3 +32,7 @@ ALTERNATIVE_LINK_NAME[usleep] = "${base_bindir}/usleep" ALTERNATIVE:${PN}-doc = "usleep.1" ALTERNATIVE_LINK_NAME[usleep.1] = "${mandir}/man1/usleep.1" + +# http://errors.yoctoproject.org/Errors/Details/766900/ +# usleep.c:47:43: error: passing argument 3 of 'poptGetContext' from incompatible pointer type [-Wincompatible-pointer-types] +CFLAGS += "-Wno-error=incompatible-pointer-types" diff --git a/sources/meta-openembedded/meta-oe/recipes-core/uutils-coreutils/files/0001-Cargo.lock-revert-to-selinux-sys-0.6.9-and-fts-sys-0.patch b/sources/meta-openembedded/meta-oe/recipes-core/uutils-coreutils/files/0001-Cargo.lock-revert-to-selinux-sys-0.6.9-and-fts-sys-0.patch deleted file mode 100644 index d91c3688..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-core/uutils-coreutils/files/0001-Cargo.lock-revert-to-selinux-sys-0.6.9-and-fts-sys-0.patch +++ /dev/null @@ -1,178 +0,0 @@ -From 2b578f1c2eee4e3552300d672eceea0804118896 Mon Sep 17 00:00:00 2001 -From: Etienne Cordonnier -Date: Mon, 10 Feb 2025 14:43:54 +0100 -Subject: [PATCH] Cargo.lock: revert to selinux-sys 0.6.9 and fts-sys 0.2.9 - -selinux-sys 0.6.12 and fts-sys 0.2.11 uses offset_of which requires Rust 1.77. -selinux 0.6.9 and fts-sys 0.2.9 compile with Rust 1.70. - -This fixes the compilation of uutils-coreutils when meta-selinux is included. - -This reverts https://github.com/uutils/coreutils/commit/10d3e98eda9342cf8d5f56d5082e38096743eb80 - -Upstream-Status: Inappropriate [OE Specific] - -Signed-off-by: Etienne Cordonnier ---- - Cargo.lock | 61 ++++++++++++++++++++++++++++++++++++++++++++---------- - 1 file changed, 50 insertions(+), 11 deletions(-) - -diff --git a/Cargo.lock b/Cargo.lock -index b59405071..5f7b420fc 100644 ---- a/Cargo.lock -+++ b/Cargo.lock -@@ -167,14 +167,16 @@ dependencies = [ - - [[package]] - name = "bindgen" --version = "0.70.1" -+version = "0.69.5" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "f49d8fed880d473ea71efb9bf597651e77201bdd4893efe54c9e5d65ae04ce6f" -+checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088" - dependencies = [ - "bitflags 2.6.0", - "cexpr", - "clang-sys", -- "itertools", -+ "itertools 0.12.1", -+ "lazy_static", -+ "lazycell", - "log", - "prettyplease", - "proc-macro2", -@@ -183,6 +185,7 @@ dependencies = [ - "rustc-hash", - "shlex", - "syn 2.0.86", -+ "which", - ] - - [[package]] -@@ -961,9 +964,9 @@ dependencies = [ - - [[package]] - name = "fts-sys" --version = "0.2.11" -+version = "0.2.9" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "28ab6a6dfd9184fe8a5097924dea6e7648f499121b3e933bb8486a17f817122e" -+checksum = "4e184d5f593d19793f26afb6f9a58d25f0bc755c4e48890ffcba6db416153ebb" - dependencies = [ - "bindgen", - "libc", -@@ -1156,6 +1159,15 @@ version = "0.4.1" - source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" - -+[[package]] -+name = "home" -+version = "0.5.9" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" -+dependencies = [ -+ "windows-sys 0.52.0", -+] -+ - [[package]] - name = "hostname" - version = "0.4.0" -@@ -1244,6 +1256,15 @@ dependencies = [ - "windows-sys 0.48.0", - ] - -+[[package]] -+name = "itertools" -+version = "0.12.1" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" -+dependencies = [ -+ "either", -+] -+ - [[package]] - name = "itertools" - version = "0.13.0" -@@ -1303,6 +1324,12 @@ version = "1.4.0" - source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - -+[[package]] -+name = "lazycell" -+version = "1.3.0" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" -+ - [[package]] - name = "libc" - version = "0.2.161" -@@ -2120,9 +2147,9 @@ dependencies = [ - - [[package]] - name = "selinux-sys" --version = "0.6.12" -+version = "0.6.9" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "8d557667087c5b4791e180b80979cd1a92fdb9bfd92cfd4b9ab199c4d7402423" -+checksum = "89d45498373dc17ec8ebb72e1fd320c015647b0157fc81dddf678e2e00205fec" - dependencies = [ - "bindgen", - "cc", -@@ -3100,7 +3127,7 @@ version = "0.0.28" - dependencies = [ - "chrono", - "clap", -- "itertools", -+ "itertools 0.13.0", - "quick-error 2.0.1", - "regex", - "uucore", -@@ -3236,7 +3263,7 @@ dependencies = [ - "compare", - "ctrlc", - "fnv", -- "itertools", -+ "itertools 0.13.0", - "memchr", - "nix", - "rand", -@@ -3520,7 +3547,7 @@ name = "uu_yes" - version = "0.0.28" - dependencies = [ - "clap", -- "itertools", -+ "itertools 0.13.0", - "nix", - "uucore", - ] -@@ -3539,7 +3566,7 @@ dependencies = [ - "dunce", - "glob", - "hex", -- "itertools", -+ "itertools 0.13.0", - "libc", - "md-5", - "memchr", -@@ -3687,6 +3714,18 @@ dependencies = [ - "wasm-bindgen", - ] - -+[[package]] -+name = "which" -+version = "4.4.2" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" -+dependencies = [ -+ "either", -+ "home", -+ "once_cell", -+ "rustix 0.38.37", -+] -+ - [[package]] - name = "wild" - version = "2.2.1" --- -2.43.0 - diff --git a/sources/meta-openembedded/meta-oe/recipes-core/uutils-coreutils/uutils-coreutils-crates.inc b/sources/meta-openembedded/meta-oe/recipes-core/uutils-coreutils/uutils-coreutils-crates.inc index f2b00f27..e5bde3d0 100644 --- a/sources/meta-openembedded/meta-oe/recipes-core/uutils-coreutils/uutils-coreutils-crates.inc +++ b/sources/meta-openembedded/meta-oe/recipes-core/uutils-coreutils/uutils-coreutils-crates.inc @@ -4,7 +4,7 @@ SRC_URI += " \ crate://crates.io/adler/1.0.2 \ crate://crates.io/ahash/0.8.11 \ - crate://crates.io/aho-corasick/1.1.3 \ + crate://crates.io/aho-corasick/1.0.4 \ crate://crates.io/allocator-api2/0.2.18 \ crate://crates.io/android-tzdata/0.1.1 \ crate://crates.io/android_system_properties/0.1.5 \ @@ -18,26 +18,24 @@ SRC_URI += " \ crate://crates.io/arrayref/0.3.6 \ crate://crates.io/arrayvec/0.7.4 \ crate://crates.io/autocfg/1.1.0 \ - crate://crates.io/bigdecimal/0.4.6 \ + crate://crates.io/bigdecimal/0.4.5 \ crate://crates.io/binary-heap-plus/0.5.0 \ crate://crates.io/bincode/1.3.3 \ - crate://crates.io/bindgen/0.69.5 \ - crate://crates.io/bit-set/0.5.3 \ - crate://crates.io/bit-vec/0.6.3 \ + crate://crates.io/bindgen/0.69.4 \ crate://crates.io/bitflags/1.3.2 \ - crate://crates.io/bitflags/2.6.0 \ + crate://crates.io/bitflags/2.5.0 \ crate://crates.io/bitvec/1.0.1 \ crate://crates.io/blake2b_simd/1.0.2 \ - crate://crates.io/blake3/1.5.4 \ + crate://crates.io/blake3/1.5.1 \ crate://crates.io/block-buffer/0.10.3 \ - crate://crates.io/bstr/1.10.0 \ + crate://crates.io/bstr/1.9.1 \ crate://crates.io/bumpalo/3.11.1 \ crate://crates.io/bytecount/0.6.8 \ crate://crates.io/byteorder/1.5.0 \ - crate://crates.io/cc/1.1.13 \ + crate://crates.io/cc/1.0.79 \ crate://crates.io/cexpr/0.6.0 \ crate://crates.io/cfg-if/1.0.0 \ - crate://crates.io/cfg_aliases/0.2.1 \ + crate://crates.io/cfg_aliases/0.1.1 \ crate://crates.io/chrono/0.4.38 \ crate://crates.io/clang-sys/1.4.0 \ crate://crates.io/clap/4.4.2 \ @@ -67,7 +65,7 @@ SRC_URI += " \ crate://crates.io/crossterm_winapi/0.9.1 \ crate://crates.io/crunchy/0.2.2 \ crate://crates.io/crypto-common/0.1.6 \ - crate://crates.io/ctrlc/3.4.5 \ + crate://crates.io/ctrlc/3.4.4 \ crate://crates.io/data-encoding/2.6.0 \ crate://crates.io/data-encoding-macro/0.1.15 \ crate://crates.io/data-encoding-macro-internal/0.1.13 \ @@ -78,34 +76,35 @@ SRC_URI += " \ crate://crates.io/displaydoc/0.2.4 \ crate://crates.io/dlv-list/0.5.0 \ crate://crates.io/dns-lookup/2.0.4 \ - crate://crates.io/dunce/1.0.5 \ + crate://crates.io/dunce/1.0.4 \ crate://crates.io/either/1.8.0 \ crate://crates.io/encode_unicode/0.3.6 \ + crate://crates.io/env_logger/0.8.4 \ crate://crates.io/equivalent/1.0.1 \ crate://crates.io/errno/0.3.8 \ crate://crates.io/exacl/0.12.0 \ - crate://crates.io/fastrand/2.1.1 \ + crate://crates.io/fastrand/2.0.1 \ crate://crates.io/file_diff/1.0.0 \ crate://crates.io/filedescriptor/0.8.2 \ - crate://crates.io/filetime/0.2.25 \ + crate://crates.io/filetime/0.2.23 \ crate://crates.io/flate2/1.0.28 \ crate://crates.io/fnv/1.0.7 \ crate://crates.io/fs_extra/1.3.0 \ crate://crates.io/fsevent-sys/4.1.0 \ crate://crates.io/fts-sys/0.2.9 \ - crate://crates.io/fundu/2.0.1 \ - crate://crates.io/fundu-core/0.3.1 \ + crate://crates.io/fundu/2.0.0 \ + crate://crates.io/fundu-core/0.3.0 \ crate://crates.io/funty/2.0.0 \ - crate://crates.io/futures/0.3.30 \ - crate://crates.io/futures-channel/0.3.31 \ - crate://crates.io/futures-core/0.3.31 \ - crate://crates.io/futures-executor/0.3.30 \ - crate://crates.io/futures-io/0.3.31 \ - crate://crates.io/futures-macro/0.3.31 \ - crate://crates.io/futures-sink/0.3.31 \ - crate://crates.io/futures-task/0.3.31 \ - crate://crates.io/futures-timer/3.0.3 \ - crate://crates.io/futures-util/0.3.31 \ + crate://crates.io/futures/0.3.28 \ + crate://crates.io/futures-channel/0.3.28 \ + crate://crates.io/futures-core/0.3.28 \ + crate://crates.io/futures-executor/0.3.28 \ + crate://crates.io/futures-io/0.3.28 \ + crate://crates.io/futures-macro/0.3.28 \ + crate://crates.io/futures-sink/0.3.28 \ + crate://crates.io/futures-task/0.3.28 \ + crate://crates.io/futures-timer/3.0.2 \ + crate://crates.io/futures-util/0.3.28 \ crate://crates.io/gcd/2.3.0 \ crate://crates.io/generic-array/0.14.6 \ crate://crates.io/getrandom/0.2.9 \ @@ -115,14 +114,14 @@ SRC_URI += " \ crate://crates.io/hermit-abi/0.3.2 \ crate://crates.io/hex/0.4.3 \ crate://crates.io/hex-literal/0.4.1 \ - crate://crates.io/home/0.5.9 \ crate://crates.io/hostname/0.4.0 \ crate://crates.io/iana-time-zone/0.1.53 \ crate://crates.io/iana-time-zone-haiku/0.1.2 \ - crate://crates.io/indexmap/2.5.0 \ - crate://crates.io/indicatif/0.17.9 \ + crate://crates.io/indexmap/2.2.6 \ + crate://crates.io/indicatif/0.17.8 \ crate://crates.io/inotify/0.9.6 \ crate://crates.io/inotify-sys/0.1.5 \ + crate://crates.io/instant/0.1.12 \ crate://crates.io/io-lifetimes/1.0.11 \ crate://crates.io/itertools/0.12.1 \ crate://crates.io/itertools/0.13.0 \ @@ -133,43 +132,40 @@ SRC_URI += " \ crate://crates.io/kqueue-sys/1.0.3 \ crate://crates.io/lazy_static/1.4.0 \ crate://crates.io/lazycell/1.3.0 \ - crate://crates.io/libc/0.2.161 \ + crate://crates.io/libc/0.2.155 \ crate://crates.io/libloading/0.7.4 \ crate://crates.io/libm/0.2.7 \ - crate://crates.io/libredox/0.1.3 \ crate://crates.io/linux-raw-sys/0.3.8 \ - crate://crates.io/linux-raw-sys/0.4.14 \ + crate://crates.io/linux-raw-sys/0.4.12 \ crate://crates.io/lock_api/0.4.9 \ crate://crates.io/log/0.4.20 \ crate://crates.io/lru/0.12.3 \ - crate://crates.io/lscolors/0.20.0 \ + crate://crates.io/lscolors/0.16.0 \ crate://crates.io/md-5/0.10.6 \ crate://crates.io/memchr/2.7.4 \ - crate://crates.io/memmap2/0.9.5 \ + crate://crates.io/memmap2/0.9.4 \ crate://crates.io/minimal-lexical/0.2.1 \ crate://crates.io/miniz_oxide/0.7.2 \ crate://crates.io/mio/0.8.11 \ - crate://crates.io/nix/0.29.0 \ + crate://crates.io/nix/0.28.0 \ crate://crates.io/nom/7.1.3 \ crate://crates.io/notify/6.0.1 \ - crate://crates.io/nu-ansi-term/0.50.0 \ - crate://crates.io/num-bigint/0.4.6 \ + crate://crates.io/nu-ansi-term/0.49.0 \ + crate://crates.io/num-bigint/0.4.5 \ crate://crates.io/num-conv/0.1.0 \ crate://crates.io/num-integer/0.1.46 \ crate://crates.io/num-modular/0.5.1 \ crate://crates.io/num-prime/0.4.4 \ crate://crates.io/num-traits/0.2.19 \ - crate://crates.io/num_enum/0.7.3 \ - crate://crates.io/num_enum_derive/0.7.3 \ crate://crates.io/num_threads/0.1.6 \ crate://crates.io/number_prefix/0.4.0 \ - crate://crates.io/once_cell/1.20.2 \ + crate://crates.io/once_cell/1.19.0 \ crate://crates.io/onig/6.4.0 \ crate://crates.io/onig_sys/69.8.1 \ crate://crates.io/ordered-multimap/0.7.3 \ crate://crates.io/os_display/0.1.3 \ crate://crates.io/parking_lot/0.12.1 \ - crate://crates.io/parking_lot_core/0.9.10 \ + crate://crates.io/parking_lot_core/0.9.9 \ crate://crates.io/parse_datetime/0.6.0 \ crate://crates.io/phf/0.11.2 \ crate://crates.io/phf_codegen/0.11.2 \ @@ -178,53 +174,51 @@ SRC_URI += " \ crate://crates.io/pin-project-lite/0.2.9 \ crate://crates.io/pin-utils/0.1.0 \ crate://crates.io/pkg-config/0.3.26 \ - crate://crates.io/platform-info/2.0.4 \ + crate://crates.io/platform-info/2.0.3 \ crate://crates.io/portable-atomic/1.6.0 \ crate://crates.io/powerfmt/0.2.0 \ crate://crates.io/ppv-lite86/0.2.17 \ - crate://crates.io/pretty_assertions/1.4.1 \ + crate://crates.io/pretty_assertions/1.4.0 \ crate://crates.io/prettyplease/0.2.19 \ - crate://crates.io/proc-macro-crate/3.2.0 \ - crate://crates.io/proc-macro2/1.0.89 \ - crate://crates.io/procfs/0.17.0 \ - crate://crates.io/procfs-core/0.17.0 \ - crate://crates.io/proptest/1.5.0 \ - crate://crates.io/quick-error/1.2.3 \ + crate://crates.io/proc-macro-crate/3.1.0 \ + crate://crates.io/proc-macro2/1.0.86 \ + crate://crates.io/procfs/0.16.0 \ + crate://crates.io/procfs-core/0.16.0 \ crate://crates.io/quick-error/2.0.1 \ - crate://crates.io/quote/1.0.37 \ + crate://crates.io/quickcheck/1.0.3 \ + crate://crates.io/quote/1.0.36 \ crate://crates.io/radium/0.7.0 \ crate://crates.io/rand/0.8.5 \ crate://crates.io/rand_chacha/0.3.1 \ crate://crates.io/rand_core/0.6.4 \ crate://crates.io/rand_pcg/0.3.1 \ - crate://crates.io/rand_xorshift/0.3.0 \ crate://crates.io/rayon/1.10.0 \ crate://crates.io/rayon-core/1.12.1 \ - crate://crates.io/redox_syscall/0.5.7 \ + crate://crates.io/redox_syscall/0.4.1 \ + crate://crates.io/redox_syscall/0.5.2 \ crate://crates.io/reference-counted-singleton/0.1.2 \ - crate://crates.io/regex/1.11.1 \ - crate://crates.io/regex-automata/0.4.8 \ - crate://crates.io/regex-syntax/0.8.5 \ - crate://crates.io/relative-path/1.9.3 \ - crate://crates.io/rlimit/0.10.2 \ + crate://crates.io/regex/1.10.5 \ + crate://crates.io/regex-automata/0.4.4 \ + crate://crates.io/regex-syntax/0.8.2 \ + crate://crates.io/relative-path/1.8.0 \ + crate://crates.io/rlimit/0.10.1 \ crate://crates.io/roff/0.2.1 \ - crate://crates.io/rstest/0.23.0 \ - crate://crates.io/rstest_macros/0.23.0 \ - crate://crates.io/rust-ini/0.21.1 \ + crate://crates.io/rstest/0.21.0 \ + crate://crates.io/rstest_macros/0.21.0 \ + crate://crates.io/rust-ini/0.21.0 \ crate://crates.io/rustc-hash/1.1.0 \ - crate://crates.io/rustc_version/0.4.1 \ + crate://crates.io/rustc_version/0.4.0 \ crate://crates.io/rustix/0.37.26 \ - crate://crates.io/rustix/0.38.37 \ - crate://crates.io/rusty-fork/0.3.0 \ + crate://crates.io/rustix/0.38.31 \ crate://crates.io/same-file/1.0.6 \ crate://crates.io/scopeguard/1.2.0 \ crate://crates.io/self_cell/1.0.4 \ - crate://crates.io/selinux/0.4.6 \ + crate://crates.io/selinux/0.4.4 \ crate://crates.io/selinux-sys/0.6.9 \ crate://crates.io/semver/1.0.14 \ - crate://crates.io/serde/1.0.214 \ + crate://crates.io/serde/1.0.203 \ crate://crates.io/serde-big-array/0.5.1 \ - crate://crates.io/serde_derive/1.0.214 \ + crate://crates.io/serde_derive/1.0.203 \ crate://crates.io/sha1/0.10.6 \ crate://crates.io/sha2/0.10.8 \ crate://crates.io/sha3/0.10.8 \ @@ -240,37 +234,32 @@ SRC_URI += " \ crate://crates.io/socket2/0.5.3 \ crate://crates.io/strsim/0.10.0 \ crate://crates.io/syn/1.0.109 \ - crate://crates.io/syn/2.0.86 \ + crate://crates.io/syn/2.0.60 \ crate://crates.io/tap/1.0.1 \ - crate://crates.io/tempfile/3.13.0 \ + crate://crates.io/tempfile/3.10.1 \ crate://crates.io/terminal_size/0.2.6 \ - crate://crates.io/terminal_size/0.4.0 \ + crate://crates.io/terminal_size/0.3.0 \ crate://crates.io/textwrap/0.16.1 \ - crate://crates.io/thiserror/1.0.66 \ - crate://crates.io/thiserror-impl/1.0.66 \ + crate://crates.io/thiserror/1.0.61 \ + crate://crates.io/thiserror-impl/1.0.61 \ crate://crates.io/time/0.3.36 \ crate://crates.io/time-core/0.1.2 \ crate://crates.io/time-macros/0.2.18 \ crate://crates.io/tiny-keccak/2.0.2 \ - crate://crates.io/toml_datetime/0.6.8 \ - crate://crates.io/toml_edit/0.22.22 \ + crate://crates.io/toml_datetime/0.6.6 \ + crate://crates.io/toml_edit/0.21.1 \ crate://crates.io/trim-in-place/0.1.7 \ crate://crates.io/typenum/1.15.0 \ - crate://crates.io/unarray/0.1.4 \ - crate://crates.io/unicode-ident/1.0.13 \ + crate://crates.io/unicode-ident/1.0.5 \ crate://crates.io/unicode-linebreak/0.1.5 \ - crate://crates.io/unicode-segmentation/1.12.0 \ - crate://crates.io/unicode-width/0.1.13 \ - crate://crates.io/unicode-width/0.2.0 \ + crate://crates.io/unicode-segmentation/1.11.0 \ + crate://crates.io/unicode-width/0.1.12 \ crate://crates.io/unicode-xid/0.2.4 \ crate://crates.io/unindent/0.2.3 \ crate://crates.io/utf8parse/0.2.1 \ - crate://crates.io/utmp-classic/0.1.6 \ - crate://crates.io/utmp-classic-raw/0.1.3 \ crate://crates.io/uuid/1.7.0 \ crate://crates.io/uutils_term_grid/0.6.0 \ crate://crates.io/version_check/0.9.4 \ - crate://crates.io/wait-timeout/0.2.0 \ crate://crates.io/walkdir/2.5.0 \ crate://crates.io/wasi/0.11.0+wasi-snapshot-preview1 \ crate://crates.io/wasm-bindgen/0.2.87 \ @@ -278,57 +267,54 @@ SRC_URI += " \ crate://crates.io/wasm-bindgen-macro/0.2.87 \ crate://crates.io/wasm-bindgen-macro-support/0.2.87 \ crate://crates.io/wasm-bindgen-shared/0.2.87 \ - crate://crates.io/web-time/1.1.0 \ - crate://crates.io/which/4.4.2 \ + crate://crates.io/which/4.3.0 \ crate://crates.io/wild/2.2.1 \ crate://crates.io/winapi/0.3.9 \ crate://crates.io/winapi-i686-pc-windows-gnu/0.4.0 \ - crate://crates.io/winapi-util/0.1.9 \ + crate://crates.io/winapi-util/0.1.8 \ crate://crates.io/winapi-x86_64-pc-windows-gnu/0.4.0 \ crate://crates.io/windows/0.52.0 \ crate://crates.io/windows-core/0.52.0 \ crate://crates.io/windows-sys/0.45.0 \ crate://crates.io/windows-sys/0.48.0 \ crate://crates.io/windows-sys/0.52.0 \ - crate://crates.io/windows-sys/0.59.0 \ crate://crates.io/windows-targets/0.42.2 \ - crate://crates.io/windows-targets/0.48.5 \ - crate://crates.io/windows-targets/0.52.6 \ + crate://crates.io/windows-targets/0.48.0 \ + crate://crates.io/windows-targets/0.52.0 \ crate://crates.io/windows_aarch64_gnullvm/0.42.2 \ - crate://crates.io/windows_aarch64_gnullvm/0.48.5 \ - crate://crates.io/windows_aarch64_gnullvm/0.52.6 \ + crate://crates.io/windows_aarch64_gnullvm/0.48.0 \ + crate://crates.io/windows_aarch64_gnullvm/0.52.0 \ crate://crates.io/windows_aarch64_msvc/0.42.2 \ - crate://crates.io/windows_aarch64_msvc/0.48.5 \ - crate://crates.io/windows_aarch64_msvc/0.52.6 \ + crate://crates.io/windows_aarch64_msvc/0.48.0 \ + crate://crates.io/windows_aarch64_msvc/0.52.0 \ crate://crates.io/windows_i686_gnu/0.42.2 \ - crate://crates.io/windows_i686_gnu/0.48.5 \ - crate://crates.io/windows_i686_gnu/0.52.6 \ - crate://crates.io/windows_i686_gnullvm/0.52.6 \ + crate://crates.io/windows_i686_gnu/0.48.0 \ + crate://crates.io/windows_i686_gnu/0.52.0 \ crate://crates.io/windows_i686_msvc/0.42.2 \ - crate://crates.io/windows_i686_msvc/0.48.5 \ - crate://crates.io/windows_i686_msvc/0.52.6 \ + crate://crates.io/windows_i686_msvc/0.48.0 \ + crate://crates.io/windows_i686_msvc/0.52.0 \ crate://crates.io/windows_x86_64_gnu/0.42.2 \ - crate://crates.io/windows_x86_64_gnu/0.48.5 \ - crate://crates.io/windows_x86_64_gnu/0.52.6 \ + crate://crates.io/windows_x86_64_gnu/0.48.0 \ + crate://crates.io/windows_x86_64_gnu/0.52.0 \ crate://crates.io/windows_x86_64_gnullvm/0.42.2 \ - crate://crates.io/windows_x86_64_gnullvm/0.48.5 \ - crate://crates.io/windows_x86_64_gnullvm/0.52.6 \ + crate://crates.io/windows_x86_64_gnullvm/0.48.0 \ + crate://crates.io/windows_x86_64_gnullvm/0.52.0 \ crate://crates.io/windows_x86_64_msvc/0.42.2 \ - crate://crates.io/windows_x86_64_msvc/0.48.5 \ - crate://crates.io/windows_x86_64_msvc/0.52.6 \ - crate://crates.io/winnow/0.6.20 \ + crate://crates.io/windows_x86_64_msvc/0.48.0 \ + crate://crates.io/windows_x86_64_msvc/0.52.0 \ + crate://crates.io/winnow/0.5.40 \ crate://crates.io/wyz/0.5.1 \ crate://crates.io/xattr/1.3.1 \ - crate://crates.io/yansi/1.0.1 \ + crate://crates.io/yansi/0.5.1 \ crate://crates.io/z85/3.0.5 \ - crate://crates.io/zerocopy/0.7.34 \ - crate://crates.io/zerocopy-derive/0.7.34 \ - crate://crates.io/zip/1.1.4 \ + crate://crates.io/zerocopy/0.7.33 \ + crate://crates.io/zerocopy-derive/0.7.33 \ + crate://crates.io/zip/1.3.0 \ " SRC_URI[adler-1.0.2.sha256sum] = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" SRC_URI[ahash-0.8.11.sha256sum] = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" -SRC_URI[aho-corasick-1.1.3.sha256sum] = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +SRC_URI[aho-corasick-1.0.4.sha256sum] = "6748e8def348ed4d14996fa801f4122cd763fff530258cdc03f64b25f89d3a5a" SRC_URI[allocator-api2-0.2.18.sha256sum] = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" SRC_URI[android-tzdata-0.1.1.sha256sum] = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" SRC_URI[android_system_properties-0.1.5.sha256sum] = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" @@ -342,26 +328,24 @@ SRC_URI[arbitrary-1.3.2.sha256sum] = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b SRC_URI[arrayref-0.3.6.sha256sum] = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" SRC_URI[arrayvec-0.7.4.sha256sum] = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" SRC_URI[autocfg-1.1.0.sha256sum] = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" -SRC_URI[bigdecimal-0.4.6.sha256sum] = "8f850665a0385e070b64c38d2354e6c104c8479c59868d1e48a0c13ee2c7a1c1" +SRC_URI[bigdecimal-0.4.5.sha256sum] = "51d712318a27c7150326677b321a5fa91b55f6d9034ffd67f20319e147d40cee" SRC_URI[binary-heap-plus-0.5.0.sha256sum] = "e4551d8382e911ecc0d0f0ffb602777988669be09447d536ff4388d1def11296" SRC_URI[bincode-1.3.3.sha256sum] = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" -SRC_URI[bindgen-0.69.5.sha256sum] = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088" -SRC_URI[bit-set-0.5.3.sha256sum] = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" -SRC_URI[bit-vec-0.6.3.sha256sum] = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" +SRC_URI[bindgen-0.69.4.sha256sum] = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0" SRC_URI[bitflags-1.3.2.sha256sum] = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" -SRC_URI[bitflags-2.6.0.sha256sum] = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +SRC_URI[bitflags-2.5.0.sha256sum] = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" SRC_URI[bitvec-1.0.1.sha256sum] = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" SRC_URI[blake2b_simd-1.0.2.sha256sum] = "23285ad32269793932e830392f2fe2f83e26488fd3ec778883a93c8323735780" -SRC_URI[blake3-1.5.4.sha256sum] = "d82033247fd8e890df8f740e407ad4d038debb9eb1f40533fffb32e7d17dc6f7" +SRC_URI[blake3-1.5.1.sha256sum] = "30cca6d3674597c30ddf2c587bf8d9d65c9a84d2326d941cc79c9842dfe0ef52" SRC_URI[block-buffer-0.10.3.sha256sum] = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" -SRC_URI[bstr-1.10.0.sha256sum] = "40723b8fb387abc38f4f4a37c09073622e41dd12327033091ef8950659e6dc0c" +SRC_URI[bstr-1.9.1.sha256sum] = "05efc5cfd9110c8416e471df0e96702d58690178e206e61b7173706673c93706" SRC_URI[bumpalo-3.11.1.sha256sum] = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba" SRC_URI[bytecount-0.6.8.sha256sum] = "5ce89b21cab1437276d2650d57e971f9d548a2d9037cc231abdc0562b97498ce" SRC_URI[byteorder-1.5.0.sha256sum] = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" -SRC_URI[cc-1.1.13.sha256sum] = "72db2f7947ecee9b03b510377e8bb9077afa27176fdbff55c51027e976fdcc48" +SRC_URI[cc-1.0.79.sha256sum] = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" SRC_URI[cexpr-0.6.0.sha256sum] = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" SRC_URI[cfg-if-1.0.0.sha256sum] = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" -SRC_URI[cfg_aliases-0.2.1.sha256sum] = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" +SRC_URI[cfg_aliases-0.1.1.sha256sum] = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" SRC_URI[chrono-0.4.38.sha256sum] = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" SRC_URI[clang-sys-1.4.0.sha256sum] = "fa2e27ae6ab525c3d369ded447057bca5438d86dc3a68f6faafb8269ba82ebf3" SRC_URI[clap-4.4.2.sha256sum] = "6a13b88d2c62ff462f88e4a121f17a82c1af05693a2f192b5c38d14de73c19f6" @@ -391,7 +375,7 @@ SRC_URI[crossterm-0.27.0.sha256sum] = "f476fe445d41c9e991fd07515a6f463074b782242 SRC_URI[crossterm_winapi-0.9.1.sha256sum] = "acdd7c62a3665c7f6830a51635d9ac9b23ed385797f70a83bb8bafe9c572ab2b" SRC_URI[crunchy-0.2.2.sha256sum] = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" SRC_URI[crypto-common-0.1.6.sha256sum] = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" -SRC_URI[ctrlc-3.4.5.sha256sum] = "90eeab0aa92f3f9b4e87f258c72b139c207d251f9cbc1080a0086b86a8870dd3" +SRC_URI[ctrlc-3.4.4.sha256sum] = "672465ae37dc1bc6380a6547a8883d5dd397b0f1faaad4f265726cc7042a5345" SRC_URI[data-encoding-2.6.0.sha256sum] = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" SRC_URI[data-encoding-macro-0.1.15.sha256sum] = "f1559b6cba622276d6d63706db152618eeb15b89b3e4041446b05876e352e639" SRC_URI[data-encoding-macro-internal-0.1.13.sha256sum] = "332d754c0af53bc87c108fed664d121ecf59207ec4196041f04d6ab9002ad33f" @@ -402,34 +386,35 @@ SRC_URI[digest-0.10.7.sha256sum] = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff424 SRC_URI[displaydoc-0.2.4.sha256sum] = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" SRC_URI[dlv-list-0.5.0.sha256sum] = "d529fd73d344663edfd598ccb3f344e46034db51ebd103518eae34338248ad73" SRC_URI[dns-lookup-2.0.4.sha256sum] = "e5766087c2235fec47fafa4cfecc81e494ee679d0fd4a59887ea0919bfb0e4fc" -SRC_URI[dunce-1.0.5.sha256sum] = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" +SRC_URI[dunce-1.0.4.sha256sum] = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" SRC_URI[either-1.8.0.sha256sum] = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" SRC_URI[encode_unicode-0.3.6.sha256sum] = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" +SRC_URI[env_logger-0.8.4.sha256sum] = "a19187fea3ac7e84da7dacf48de0c45d63c6a76f9490dae389aead16c243fce3" SRC_URI[equivalent-1.0.1.sha256sum] = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" SRC_URI[errno-0.3.8.sha256sum] = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" SRC_URI[exacl-0.12.0.sha256sum] = "22be12de19decddab85d09f251ec8363f060ccb22ec9c81bc157c0c8433946d8" -SRC_URI[fastrand-2.1.1.sha256sum] = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" +SRC_URI[fastrand-2.0.1.sha256sum] = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" SRC_URI[file_diff-1.0.0.sha256sum] = "31a7a908b8f32538a2143e59a6e4e2508988832d5d4d6f7c156b3cbc762643a5" SRC_URI[filedescriptor-0.8.2.sha256sum] = "7199d965852c3bac31f779ef99cbb4537f80e952e2d6aa0ffeb30cce00f4f46e" -SRC_URI[filetime-0.2.25.sha256sum] = "35c0522e981e68cbfa8c3f978441a5f34b30b96e146b33cd3359176b50fe8586" +SRC_URI[filetime-0.2.23.sha256sum] = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" SRC_URI[flate2-1.0.28.sha256sum] = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" SRC_URI[fnv-1.0.7.sha256sum] = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" SRC_URI[fs_extra-1.3.0.sha256sum] = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" SRC_URI[fsevent-sys-4.1.0.sha256sum] = "76ee7a02da4d231650c7cea31349b889be2f45ddb3ef3032d2ec8185f6313fd2" SRC_URI[fts-sys-0.2.9.sha256sum] = "4e184d5f593d19793f26afb6f9a58d25f0bc755c4e48890ffcba6db416153ebb" -SRC_URI[fundu-2.0.1.sha256sum] = "2ce12752fc64f35be3d53e0a57017cd30970f0cffd73f62c791837d8845badbd" -SRC_URI[fundu-core-0.3.1.sha256sum] = "e463452e2d8b7600d38dcea1ed819773a57f0d710691bfc78db3961bd3f4c3ba" +SRC_URI[fundu-2.0.0.sha256sum] = "6c04cb831a8dccadfe3774b07cba4574a1ec24974d761510e65d8a543c2d7cb4" +SRC_URI[fundu-core-0.3.0.sha256sum] = "76a889e633afd839fb5b04fe53adfd588cefe518e71ec8d3c929698c6daf2acd" SRC_URI[funty-2.0.0.sha256sum] = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" -SRC_URI[futures-0.3.30.sha256sum] = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" -SRC_URI[futures-channel-0.3.31.sha256sum] = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" -SRC_URI[futures-core-0.3.31.sha256sum] = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" -SRC_URI[futures-executor-0.3.30.sha256sum] = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" -SRC_URI[futures-io-0.3.31.sha256sum] = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" -SRC_URI[futures-macro-0.3.31.sha256sum] = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" -SRC_URI[futures-sink-0.3.31.sha256sum] = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" -SRC_URI[futures-task-0.3.31.sha256sum] = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" -SRC_URI[futures-timer-3.0.3.sha256sum] = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" -SRC_URI[futures-util-0.3.31.sha256sum] = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +SRC_URI[futures-0.3.28.sha256sum] = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" +SRC_URI[futures-channel-0.3.28.sha256sum] = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" +SRC_URI[futures-core-0.3.28.sha256sum] = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" +SRC_URI[futures-executor-0.3.28.sha256sum] = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" +SRC_URI[futures-io-0.3.28.sha256sum] = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" +SRC_URI[futures-macro-0.3.28.sha256sum] = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" +SRC_URI[futures-sink-0.3.28.sha256sum] = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" +SRC_URI[futures-task-0.3.28.sha256sum] = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" +SRC_URI[futures-timer-3.0.2.sha256sum] = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" +SRC_URI[futures-util-0.3.28.sha256sum] = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" SRC_URI[gcd-2.3.0.sha256sum] = "1d758ba1b47b00caf47f24925c0074ecb20d6dfcffe7f6d53395c0465674841a" SRC_URI[generic-array-0.14.6.sha256sum] = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" SRC_URI[getrandom-0.2.9.sha256sum] = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" @@ -439,14 +424,14 @@ SRC_URI[hashbrown-0.14.3.sha256sum] = "290f1a1d9242c78d09ce40a5e87e7554ee637af13 SRC_URI[hermit-abi-0.3.2.sha256sum] = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" SRC_URI[hex-0.4.3.sha256sum] = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" SRC_URI[hex-literal-0.4.1.sha256sum] = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" -SRC_URI[home-0.5.9.sha256sum] = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" SRC_URI[hostname-0.4.0.sha256sum] = "f9c7c7c8ac16c798734b8a24560c1362120597c40d5e1459f09498f8f6c8f2ba" SRC_URI[iana-time-zone-0.1.53.sha256sum] = "64c122667b287044802d6ce17ee2ddf13207ed924c712de9a66a5814d5b64765" SRC_URI[iana-time-zone-haiku-0.1.2.sha256sum] = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" -SRC_URI[indexmap-2.5.0.sha256sum] = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5" -SRC_URI[indicatif-0.17.9.sha256sum] = "cbf675b85ed934d3c67b5c5469701eec7db22689d0a2139d856e0925fa28b281" +SRC_URI[indexmap-2.2.6.sha256sum] = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +SRC_URI[indicatif-0.17.8.sha256sum] = "763a5a8f45087d6bcea4222e7b72c291a054edf80e4ef6efd2a4979878c7bea3" SRC_URI[inotify-0.9.6.sha256sum] = "f8069d3ec154eb856955c1c0fbffefbf5f3c40a104ec912d4797314c1801abff" SRC_URI[inotify-sys-0.1.5.sha256sum] = "e05c02b5e89bff3b946cedeca278abc628fe811e604f027c45a8aa3cf793d0eb" +SRC_URI[instant-0.1.12.sha256sum] = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" SRC_URI[io-lifetimes-1.0.11.sha256sum] = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" SRC_URI[itertools-0.12.1.sha256sum] = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" SRC_URI[itertools-0.13.0.sha256sum] = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" @@ -457,43 +442,40 @@ SRC_URI[kqueue-1.0.7.sha256sum] = "2c8fc60ba15bf51257aa9807a48a61013db043fcf3a78 SRC_URI[kqueue-sys-1.0.3.sha256sum] = "8367585489f01bc55dd27404dcf56b95e6da061a256a666ab23be9ba96a2e587" SRC_URI[lazy_static-1.4.0.sha256sum] = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" SRC_URI[lazycell-1.3.0.sha256sum] = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" -SRC_URI[libc-0.2.161.sha256sum] = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" +SRC_URI[libc-0.2.155.sha256sum] = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" SRC_URI[libloading-0.7.4.sha256sum] = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" SRC_URI[libm-0.2.7.sha256sum] = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4" -SRC_URI[libredox-0.1.3.sha256sum] = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" SRC_URI[linux-raw-sys-0.3.8.sha256sum] = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" -SRC_URI[linux-raw-sys-0.4.14.sha256sum] = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +SRC_URI[linux-raw-sys-0.4.12.sha256sum] = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" SRC_URI[lock_api-0.4.9.sha256sum] = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" SRC_URI[log-0.4.20.sha256sum] = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" SRC_URI[lru-0.12.3.sha256sum] = "d3262e75e648fce39813cb56ac41f3c3e3f65217ebf3844d818d1f9398cfb0dc" -SRC_URI[lscolors-0.20.0.sha256sum] = "61183da5de8ba09a58e330d55e5ea796539d8443bd00fdeb863eac39724aa4ab" +SRC_URI[lscolors-0.16.0.sha256sum] = "ab0b209ec3976527806024406fe765474b9a1750a0ed4b8f0372364741f50e7b" SRC_URI[md-5-0.10.6.sha256sum] = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" SRC_URI[memchr-2.7.4.sha256sum] = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" -SRC_URI[memmap2-0.9.5.sha256sum] = "fd3f7eed9d3848f8b98834af67102b720745c4ec028fcd0aa0239277e7de374f" +SRC_URI[memmap2-0.9.4.sha256sum] = "fe751422e4a8caa417e13c3ea66452215d7d63e19e604f4980461212f3ae1322" SRC_URI[minimal-lexical-0.2.1.sha256sum] = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" SRC_URI[miniz_oxide-0.7.2.sha256sum] = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" SRC_URI[mio-0.8.11.sha256sum] = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" -SRC_URI[nix-0.29.0.sha256sum] = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" +SRC_URI[nix-0.28.0.sha256sum] = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4" SRC_URI[nom-7.1.3.sha256sum] = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" SRC_URI[notify-6.0.1.sha256sum] = "5738a2795d57ea20abec2d6d76c6081186709c0024187cd5977265eda6598b51" -SRC_URI[nu-ansi-term-0.50.0.sha256sum] = "dd2800e1520bdc966782168a627aa5d1ad92e33b984bf7c7615d31280c83ff14" -SRC_URI[num-bigint-0.4.6.sha256sum] = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" +SRC_URI[nu-ansi-term-0.49.0.sha256sum] = "c073d3c1930d0751774acf49e66653acecb416c3a54c6ec095a9b11caddb5a68" +SRC_URI[num-bigint-0.4.5.sha256sum] = "c165a9ab64cf766f73521c0dd2cfdff64f488b8f0b3e621face3462d3db536d7" SRC_URI[num-conv-0.1.0.sha256sum] = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" SRC_URI[num-integer-0.1.46.sha256sum] = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" SRC_URI[num-modular-0.5.1.sha256sum] = "64a5fe11d4135c3bcdf3a95b18b194afa9608a5f6ff034f5d857bc9a27fb0119" SRC_URI[num-prime-0.4.4.sha256sum] = "e238432a7881ec7164503ccc516c014bf009be7984cde1ba56837862543bdec3" SRC_URI[num-traits-0.2.19.sha256sum] = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" -SRC_URI[num_enum-0.7.3.sha256sum] = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179" -SRC_URI[num_enum_derive-0.7.3.sha256sum] = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" SRC_URI[num_threads-0.1.6.sha256sum] = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44" SRC_URI[number_prefix-0.4.0.sha256sum] = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" -SRC_URI[once_cell-1.20.2.sha256sum] = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" +SRC_URI[once_cell-1.19.0.sha256sum] = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" SRC_URI[onig-6.4.0.sha256sum] = "8c4b31c8722ad9171c6d77d3557db078cab2bd50afcc9d09c8b315c59df8ca4f" SRC_URI[onig_sys-69.8.1.sha256sum] = "7b829e3d7e9cc74c7e315ee8edb185bf4190da5acde74afd7fc59c35b1f086e7" SRC_URI[ordered-multimap-0.7.3.sha256sum] = "49203cdcae0030493bad186b28da2fa25645fa276a51b6fec8010d281e02ef79" SRC_URI[os_display-0.1.3.sha256sum] = "7a6229bad892b46b0dcfaaeb18ad0d2e56400f5aaea05b768bde96e73676cf75" SRC_URI[parking_lot-0.12.1.sha256sum] = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" -SRC_URI[parking_lot_core-0.9.10.sha256sum] = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" +SRC_URI[parking_lot_core-0.9.9.sha256sum] = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" SRC_URI[parse_datetime-0.6.0.sha256sum] = "a8720474e3dd4af20cea8716703498b9f3b690f318fa9d9d9e2e38eaf44b96d0" SRC_URI[phf-0.11.2.sha256sum] = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" SRC_URI[phf_codegen-0.11.2.sha256sum] = "e8d39688d359e6b34654d328e262234662d16cc0f60ec8dcbe5e718709342a5a" @@ -502,53 +484,51 @@ SRC_URI[phf_shared-0.11.2.sha256sum] = "90fcb95eef784c2ac79119d1dd819e162b5da872 SRC_URI[pin-project-lite-0.2.9.sha256sum] = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" SRC_URI[pin-utils-0.1.0.sha256sum] = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" SRC_URI[pkg-config-0.3.26.sha256sum] = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" -SRC_URI[platform-info-2.0.4.sha256sum] = "91077ffd05d058d70d79eefcd7d7f6aac34980860a7519960f7913b6563a8c3a" +SRC_URI[platform-info-2.0.3.sha256sum] = "d5ff316b9c4642feda973c18f0decd6c8b0919d4722566f6e4337cce0dd88217" SRC_URI[portable-atomic-1.6.0.sha256sum] = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" SRC_URI[powerfmt-0.2.0.sha256sum] = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" SRC_URI[ppv-lite86-0.2.17.sha256sum] = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" -SRC_URI[pretty_assertions-1.4.1.sha256sum] = "3ae130e2f271fbc2ac3a40fb1d07180839cdbbe443c7a27e1e3c13c5cac0116d" +SRC_URI[pretty_assertions-1.4.0.sha256sum] = "af7cee1a6c8a5b9208b3cb1061f10c0cb689087b3d8ce85fb9d2dd7a29b6ba66" SRC_URI[prettyplease-0.2.19.sha256sum] = "5ac2cf0f2e4f42b49f5ffd07dae8d746508ef7526c13940e5f524012ae6c6550" -SRC_URI[proc-macro-crate-3.2.0.sha256sum] = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" -SRC_URI[proc-macro2-1.0.89.sha256sum] = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" -SRC_URI[procfs-0.17.0.sha256sum] = "cc5b72d8145275d844d4b5f6d4e1eef00c8cd889edb6035c21675d1bb1f45c9f" -SRC_URI[procfs-core-0.17.0.sha256sum] = "239df02d8349b06fc07398a3a1697b06418223b1c7725085e801e7c0fc6a12ec" -SRC_URI[proptest-1.5.0.sha256sum] = "b4c2511913b88df1637da85cc8d96ec8e43a3f8bb8ccb71ee1ac240d6f3df58d" -SRC_URI[quick-error-1.2.3.sha256sum] = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" +SRC_URI[proc-macro-crate-3.1.0.sha256sum] = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +SRC_URI[proc-macro2-1.0.86.sha256sum] = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +SRC_URI[procfs-0.16.0.sha256sum] = "731e0d9356b0c25f16f33b5be79b1c57b562f141ebfcdb0ad8ac2c13a24293b4" +SRC_URI[procfs-core-0.16.0.sha256sum] = "2d3554923a69f4ce04c4a754260c338f505ce22642d3830e049a399fc2059a29" SRC_URI[quick-error-2.0.1.sha256sum] = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" -SRC_URI[quote-1.0.37.sha256sum] = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" +SRC_URI[quickcheck-1.0.3.sha256sum] = "588f6378e4dd99458b60ec275b4477add41ce4fa9f64dcba6f15adccb19b50d6" +SRC_URI[quote-1.0.36.sha256sum] = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" SRC_URI[radium-0.7.0.sha256sum] = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" SRC_URI[rand-0.8.5.sha256sum] = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" SRC_URI[rand_chacha-0.3.1.sha256sum] = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" SRC_URI[rand_core-0.6.4.sha256sum] = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" SRC_URI[rand_pcg-0.3.1.sha256sum] = "59cad018caf63deb318e5a4586d99a24424a364f40f1e5778c29aca23f4fc73e" -SRC_URI[rand_xorshift-0.3.0.sha256sum] = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" SRC_URI[rayon-1.10.0.sha256sum] = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" SRC_URI[rayon-core-1.12.1.sha256sum] = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" -SRC_URI[redox_syscall-0.5.7.sha256sum] = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" +SRC_URI[redox_syscall-0.4.1.sha256sum] = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +SRC_URI[redox_syscall-0.5.2.sha256sum] = "c82cf8cff14456045f55ec4241383baeff27af886adb72ffb2162f99911de0fd" SRC_URI[reference-counted-singleton-0.1.2.sha256sum] = "f1bfbf25d7eb88ddcbb1ec3d755d0634da8f7657b2cb8b74089121409ab8228f" -SRC_URI[regex-1.11.1.sha256sum] = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" -SRC_URI[regex-automata-0.4.8.sha256sum] = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" -SRC_URI[regex-syntax-0.8.5.sha256sum] = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" -SRC_URI[relative-path-1.9.3.sha256sum] = "ba39f3699c378cd8970968dcbff9c43159ea4cfbd88d43c00b22f2ef10a435d2" -SRC_URI[rlimit-0.10.2.sha256sum] = "7043b63bd0cd1aaa628e476b80e6d4023a3b50eb32789f2728908107bd0c793a" +SRC_URI[regex-1.10.5.sha256sum] = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" +SRC_URI[regex-automata-0.4.4.sha256sum] = "3b7fa1134405e2ec9353fd416b17f8dacd46c473d7d3fd1cf202706a14eb792a" +SRC_URI[regex-syntax-0.8.2.sha256sum] = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +SRC_URI[relative-path-1.8.0.sha256sum] = "4bf2521270932c3c7bed1a59151222bd7643c79310f2916f01925e1e16255698" +SRC_URI[rlimit-0.10.1.sha256sum] = "3560f70f30a0f16d11d01ed078a07740fe6b489667abc7c7b029155d9f21c3d8" SRC_URI[roff-0.2.1.sha256sum] = "b833d8d034ea094b1ea68aa6d5c740e0d04bad9d16568d08ba6f76823a114316" -SRC_URI[rstest-0.23.0.sha256sum] = "0a2c585be59b6b5dd66a9d2084aa1d8bd52fbdb806eafdeffb52791147862035" -SRC_URI[rstest_macros-0.23.0.sha256sum] = "825ea780781b15345a146be27eaefb05085e337e869bff01b4306a4fd4a9ad5a" -SRC_URI[rust-ini-0.21.1.sha256sum] = "4e310ef0e1b6eeb79169a1171daf9abcb87a2e17c03bee2c4bb100b55c75409f" +SRC_URI[rstest-0.21.0.sha256sum] = "9afd55a67069d6e434a95161415f5beeada95a01c7b815508a82dcb0e1593682" +SRC_URI[rstest_macros-0.21.0.sha256sum] = "4165dfae59a39dd41d8dec720d3cbfbc71f69744efb480a3920f5d4e0cc6798d" +SRC_URI[rust-ini-0.21.0.sha256sum] = "0d625ed57d8f49af6cfa514c42e1a71fadcff60eb0b1c517ff82fe41aa025b41" SRC_URI[rustc-hash-1.1.0.sha256sum] = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" -SRC_URI[rustc_version-0.4.1.sha256sum] = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +SRC_URI[rustc_version-0.4.0.sha256sum] = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" SRC_URI[rustix-0.37.26.sha256sum] = "84f3f8f960ed3b5a59055428714943298bf3fa2d4a1d53135084e0544829d995" -SRC_URI[rustix-0.38.37.sha256sum] = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" -SRC_URI[rusty-fork-0.3.0.sha256sum] = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" +SRC_URI[rustix-0.38.31.sha256sum] = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" SRC_URI[same-file-1.0.6.sha256sum] = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" SRC_URI[scopeguard-1.2.0.sha256sum] = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" SRC_URI[self_cell-1.0.4.sha256sum] = "d369a96f978623eb3dc28807c4852d6cc617fed53da5d3c400feff1ef34a714a" -SRC_URI[selinux-0.4.6.sha256sum] = "0139b2436c81305eb6bda33af151851f75bd62783817b25f44daa371119c30b5" +SRC_URI[selinux-0.4.4.sha256sum] = "53371b1e9bbbfffd65e5ac3c895c786ec35b7695bdc4a67a8b08c29c8d057e0b" SRC_URI[selinux-sys-0.6.9.sha256sum] = "89d45498373dc17ec8ebb72e1fd320c015647b0157fc81dddf678e2e00205fec" SRC_URI[semver-1.0.14.sha256sum] = "e25dfac463d778e353db5be2449d1cce89bd6fd23c9f1ea21310ce6e5a1b29c4" -SRC_URI[serde-1.0.214.sha256sum] = "f55c3193aca71c12ad7890f1785d2b73e1b9f63a0bbc353c08ef26fe03fc56b5" +SRC_URI[serde-1.0.203.sha256sum] = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" SRC_URI[serde-big-array-0.5.1.sha256sum] = "11fc7cc2c76d73e0f27ee52abbd64eec84d46f370c88371120433196934e4b7f" -SRC_URI[serde_derive-1.0.214.sha256sum] = "de523f781f095e28fa605cdce0f8307e451cc0fd14e2eb4cd2e98a355b147766" +SRC_URI[serde_derive-1.0.203.sha256sum] = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" SRC_URI[sha1-0.10.6.sha256sum] = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" SRC_URI[sha2-0.10.8.sha256sum] = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" SRC_URI[sha3-0.10.8.sha256sum] = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" @@ -564,37 +544,32 @@ SRC_URI[smawk-0.3.1.sha256sum] = "f67ad224767faa3c7d8b6d91985b78e70a1324408abcb1 SRC_URI[socket2-0.5.3.sha256sum] = "2538b18701741680e0322a2302176d3253a35388e2e62f172f64f4f16605f877" SRC_URI[strsim-0.10.0.sha256sum] = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" SRC_URI[syn-1.0.109.sha256sum] = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -SRC_URI[syn-2.0.86.sha256sum] = "e89275301d38033efb81a6e60e3497e734dfcc62571f2854bf4b16690398824c" +SRC_URI[syn-2.0.60.sha256sum] = "909518bc7b1c9b779f1bbf07f2929d35af9f0f37e47c6e9ef7f9dddc1e1821f3" SRC_URI[tap-1.0.1.sha256sum] = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" -SRC_URI[tempfile-3.13.0.sha256sum] = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" +SRC_URI[tempfile-3.10.1.sha256sum] = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" SRC_URI[terminal_size-0.2.6.sha256sum] = "8e6bf6f19e9f8ed8d4048dc22981458ebcf406d67e94cd422e5ecd73d63b3237" -SRC_URI[terminal_size-0.4.0.sha256sum] = "4f599bd7ca042cfdf8f4512b277c02ba102247820f9d9d4a9f521f496751a6ef" +SRC_URI[terminal_size-0.3.0.sha256sum] = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7" SRC_URI[textwrap-0.16.1.sha256sum] = "23d434d3f8967a09480fb04132ebe0a3e088c173e6d0ee7897abbdf4eab0f8b9" -SRC_URI[thiserror-1.0.66.sha256sum] = "5d171f59dbaa811dbbb1aee1e73db92ec2b122911a48e1390dfe327a821ddede" -SRC_URI[thiserror-impl-1.0.66.sha256sum] = "b08be0f17bd307950653ce45db00cd31200d82b624b36e181337d9c7d92765b5" +SRC_URI[thiserror-1.0.61.sha256sum] = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" +SRC_URI[thiserror-impl-1.0.61.sha256sum] = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" SRC_URI[time-0.3.36.sha256sum] = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" SRC_URI[time-core-0.1.2.sha256sum] = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" SRC_URI[time-macros-0.2.18.sha256sum] = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" SRC_URI[tiny-keccak-2.0.2.sha256sum] = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" -SRC_URI[toml_datetime-0.6.8.sha256sum] = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" -SRC_URI[toml_edit-0.22.22.sha256sum] = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" +SRC_URI[toml_datetime-0.6.6.sha256sum] = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" +SRC_URI[toml_edit-0.21.1.sha256sum] = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" SRC_URI[trim-in-place-0.1.7.sha256sum] = "343e926fc669bc8cde4fa3129ab681c63671bae288b1f1081ceee6d9d37904fc" SRC_URI[typenum-1.15.0.sha256sum] = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" -SRC_URI[unarray-0.1.4.sha256sum] = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" -SRC_URI[unicode-ident-1.0.13.sha256sum] = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" +SRC_URI[unicode-ident-1.0.5.sha256sum] = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" SRC_URI[unicode-linebreak-0.1.5.sha256sum] = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f" -SRC_URI[unicode-segmentation-1.12.0.sha256sum] = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" -SRC_URI[unicode-width-0.1.13.sha256sum] = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" -SRC_URI[unicode-width-0.2.0.sha256sum] = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" +SRC_URI[unicode-segmentation-1.11.0.sha256sum] = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" +SRC_URI[unicode-width-0.1.12.sha256sum] = "68f5e5f3158ecfd4b8ff6fe086db7c8467a2dfdac97fe420f2b7c4aa97af66d6" SRC_URI[unicode-xid-0.2.4.sha256sum] = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" SRC_URI[unindent-0.2.3.sha256sum] = "c7de7d73e1754487cb58364ee906a499937a0dfabd86bcb980fa99ec8c8fa2ce" SRC_URI[utf8parse-0.2.1.sha256sum] = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" -SRC_URI[utmp-classic-0.1.6.sha256sum] = "e24c654e19afaa6b8f3877ece5d3bed849c2719c56f6752b18ca7da4fcc6e85a" -SRC_URI[utmp-classic-raw-0.1.3.sha256sum] = "22c226537a3d6e01c440c1926ca0256dbee2d19b2229ede6fc4863a6493dd831" SRC_URI[uuid-1.7.0.sha256sum] = "f00cc9702ca12d3c81455259621e676d0f7251cec66a21e98fe2e9a37db93b2a" SRC_URI[uutils_term_grid-0.6.0.sha256sum] = "f89defb4adb4ba5703a57abc879f96ddd6263a444cacc446db90bf2617f141fb" SRC_URI[version_check-0.9.4.sha256sum] = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" -SRC_URI[wait-timeout-0.2.0.sha256sum] = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" SRC_URI[walkdir-2.5.0.sha256sum] = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" SRC_URI[wasi-0.11.0+wasi-snapshot-preview1.sha256sum] = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" SRC_URI[wasm-bindgen-0.2.87.sha256sum] = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" @@ -602,309 +577,46 @@ SRC_URI[wasm-bindgen-backend-0.2.87.sha256sum] = "5ef2b6d3c510e9625e5fe6f509ab07 SRC_URI[wasm-bindgen-macro-0.2.87.sha256sum] = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" SRC_URI[wasm-bindgen-macro-support-0.2.87.sha256sum] = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" SRC_URI[wasm-bindgen-shared-0.2.87.sha256sum] = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" -SRC_URI[web-time-1.1.0.sha256sum] = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" -SRC_URI[which-4.4.2.sha256sum] = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" +SRC_URI[which-4.3.0.sha256sum] = "1c831fbbee9e129a8cf93e7747a82da9d95ba8e16621cae60ec2cdc849bacb7b" SRC_URI[wild-2.2.1.sha256sum] = "a3131afc8c575281e1e80f36ed6a092aa502c08b18ed7524e86fbbb12bb410e1" SRC_URI[winapi-0.3.9.sha256sum] = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" SRC_URI[winapi-i686-pc-windows-gnu-0.4.0.sha256sum] = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -SRC_URI[winapi-util-0.1.9.sha256sum] = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" +SRC_URI[winapi-util-0.1.8.sha256sum] = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" SRC_URI[winapi-x86_64-pc-windows-gnu-0.4.0.sha256sum] = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" SRC_URI[windows-0.52.0.sha256sum] = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" SRC_URI[windows-core-0.52.0.sha256sum] = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" SRC_URI[windows-sys-0.45.0.sha256sum] = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" SRC_URI[windows-sys-0.48.0.sha256sum] = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" SRC_URI[windows-sys-0.52.0.sha256sum] = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -SRC_URI[windows-sys-0.59.0.sha256sum] = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" SRC_URI[windows-targets-0.42.2.sha256sum] = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" -SRC_URI[windows-targets-0.48.5.sha256sum] = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -SRC_URI[windows-targets-0.52.6.sha256sum] = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +SRC_URI[windows-targets-0.48.0.sha256sum] = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +SRC_URI[windows-targets-0.52.0.sha256sum] = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" SRC_URI[windows_aarch64_gnullvm-0.42.2.sha256sum] = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" -SRC_URI[windows_aarch64_gnullvm-0.48.5.sha256sum] = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" -SRC_URI[windows_aarch64_gnullvm-0.52.6.sha256sum] = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" +SRC_URI[windows_aarch64_gnullvm-0.48.0.sha256sum] = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +SRC_URI[windows_aarch64_gnullvm-0.52.0.sha256sum] = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" SRC_URI[windows_aarch64_msvc-0.42.2.sha256sum] = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" -SRC_URI[windows_aarch64_msvc-0.48.5.sha256sum] = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" -SRC_URI[windows_aarch64_msvc-0.52.6.sha256sum] = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" +SRC_URI[windows_aarch64_msvc-0.48.0.sha256sum] = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +SRC_URI[windows_aarch64_msvc-0.52.0.sha256sum] = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" SRC_URI[windows_i686_gnu-0.42.2.sha256sum] = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" -SRC_URI[windows_i686_gnu-0.48.5.sha256sum] = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" -SRC_URI[windows_i686_gnu-0.52.6.sha256sum] = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" -SRC_URI[windows_i686_gnullvm-0.52.6.sha256sum] = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" +SRC_URI[windows_i686_gnu-0.48.0.sha256sum] = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +SRC_URI[windows_i686_gnu-0.52.0.sha256sum] = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" SRC_URI[windows_i686_msvc-0.42.2.sha256sum] = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" -SRC_URI[windows_i686_msvc-0.48.5.sha256sum] = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" -SRC_URI[windows_i686_msvc-0.52.6.sha256sum] = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" +SRC_URI[windows_i686_msvc-0.48.0.sha256sum] = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +SRC_URI[windows_i686_msvc-0.52.0.sha256sum] = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" SRC_URI[windows_x86_64_gnu-0.42.2.sha256sum] = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" -SRC_URI[windows_x86_64_gnu-0.48.5.sha256sum] = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" -SRC_URI[windows_x86_64_gnu-0.52.6.sha256sum] = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" +SRC_URI[windows_x86_64_gnu-0.48.0.sha256sum] = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +SRC_URI[windows_x86_64_gnu-0.52.0.sha256sum] = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" SRC_URI[windows_x86_64_gnullvm-0.42.2.sha256sum] = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" -SRC_URI[windows_x86_64_gnullvm-0.48.5.sha256sum] = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" -SRC_URI[windows_x86_64_gnullvm-0.52.6.sha256sum] = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" +SRC_URI[windows_x86_64_gnullvm-0.48.0.sha256sum] = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +SRC_URI[windows_x86_64_gnullvm-0.52.0.sha256sum] = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" SRC_URI[windows_x86_64_msvc-0.42.2.sha256sum] = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" -SRC_URI[windows_x86_64_msvc-0.48.5.sha256sum] = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" -SRC_URI[windows_x86_64_msvc-0.52.6.sha256sum] = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" -SRC_URI[winnow-0.6.20.sha256sum] = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" +SRC_URI[windows_x86_64_msvc-0.48.0.sha256sum] = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +SRC_URI[windows_x86_64_msvc-0.52.0.sha256sum] = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" +SRC_URI[winnow-0.5.40.sha256sum] = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" SRC_URI[wyz-0.5.1.sha256sum] = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" SRC_URI[xattr-1.3.1.sha256sum] = "8da84f1a25939b27f6820d92aed108f83ff920fdf11a7b19366c27c4cda81d4f" -SRC_URI[yansi-1.0.1.sha256sum] = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" +SRC_URI[yansi-0.5.1.sha256sum] = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" SRC_URI[z85-3.0.5.sha256sum] = "2a599daf1b507819c1121f0bf87fa37eb19daac6aff3aefefd4e6e2e0f2020fc" -SRC_URI[zerocopy-0.7.34.sha256sum] = "ae87e3fcd617500e5d106f0380cf7b77f3c6092aae37191433159dda23cfb087" -SRC_URI[zerocopy-derive-0.7.34.sha256sum] = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b" -SRC_URI[zip-1.1.4.sha256sum] = "9cc23c04387f4da0374be4533ad1208cbb091d5c11d070dfef13676ad6497164" -# from fuzz/Cargo.lock -SRC_URI += " \ - crate://crates.io/aho-corasick/1.1.3 \ - crate://crates.io/android-tzdata/0.1.1 \ - crate://crates.io/android_system_properties/0.1.5 \ - crate://crates.io/anstream/0.6.14 \ - crate://crates.io/anstyle/1.0.7 \ - crate://crates.io/anstyle-parse/0.2.4 \ - crate://crates.io/anstyle-query/1.0.3 \ - crate://crates.io/anstyle-wincon/3.0.3 \ - crate://crates.io/arbitrary/1.3.2 \ - crate://crates.io/autocfg/1.3.0 \ - crate://crates.io/bigdecimal/0.4.3 \ - crate://crates.io/binary-heap-plus/0.5.0 \ - crate://crates.io/bitflags/1.3.2 \ - crate://crates.io/bitflags/2.5.0 \ - crate://crates.io/bstr/1.9.1 \ - crate://crates.io/bumpalo/3.16.0 \ - crate://crates.io/bytecount/0.6.8 \ - crate://crates.io/cc/1.0.98 \ - crate://crates.io/cfg-if/1.0.0 \ - crate://crates.io/cfg_aliases/0.1.1 \ - crate://crates.io/cfg_aliases/0.2.1 \ - crate://crates.io/chrono/0.4.38 \ - crate://crates.io/clap/4.5.4 \ - crate://crates.io/clap_builder/4.5.2 \ - crate://crates.io/clap_lex/0.7.0 \ - crate://crates.io/colorchoice/1.0.1 \ - crate://crates.io/compare/0.1.0 \ - crate://crates.io/const-random/0.1.18 \ - crate://crates.io/const-random-macro/0.1.16 \ - crate://crates.io/core-foundation-sys/0.8.6 \ - crate://crates.io/crossbeam-deque/0.8.5 \ - crate://crates.io/crossbeam-epoch/0.9.18 \ - crate://crates.io/crossbeam-utils/0.8.20 \ - crate://crates.io/crunchy/0.2.2 \ - crate://crates.io/ctrlc/3.4.4 \ - crate://crates.io/dlv-list/0.5.2 \ - crate://crates.io/dunce/1.0.4 \ - crate://crates.io/either/1.12.0 \ - crate://crates.io/errno/0.3.9 \ - crate://crates.io/fastrand/2.1.1 \ - crate://crates.io/fnv/1.0.7 \ - crate://crates.io/getrandom/0.2.15 \ - crate://crates.io/glob/0.3.1 \ - crate://crates.io/hashbrown/0.14.5 \ - crate://crates.io/iana-time-zone/0.1.60 \ - crate://crates.io/iana-time-zone-haiku/0.1.2 \ - crate://crates.io/is_terminal_polyfill/1.70.0 \ - crate://crates.io/itertools/0.13.0 \ - crate://crates.io/jobserver/0.1.31 \ - crate://crates.io/js-sys/0.3.69 \ - crate://crates.io/libc/0.2.161 \ - crate://crates.io/libfuzzer-sys/0.4.7 \ - crate://crates.io/libm/0.2.8 \ - crate://crates.io/linux-raw-sys/0.4.14 \ - crate://crates.io/log/0.4.21 \ - crate://crates.io/memchr/2.7.2 \ - crate://crates.io/minimal-lexical/0.2.1 \ - crate://crates.io/nix/0.28.0 \ - crate://crates.io/nix/0.29.0 \ - crate://crates.io/nom/7.1.3 \ - crate://crates.io/num-bigint/0.4.5 \ - crate://crates.io/num-integer/0.1.46 \ - crate://crates.io/num-traits/0.2.19 \ - crate://crates.io/number_prefix/0.4.0 \ - crate://crates.io/once_cell/1.19.0 \ - crate://crates.io/onig/6.4.0 \ - crate://crates.io/onig_sys/69.8.1 \ - crate://crates.io/ordered-multimap/0.7.3 \ - crate://crates.io/os_display/0.1.3 \ - crate://crates.io/parse_datetime/0.6.0 \ - crate://crates.io/pkg-config/0.3.30 \ - crate://crates.io/ppv-lite86/0.2.17 \ - crate://crates.io/proc-macro2/1.0.83 \ - crate://crates.io/quote/1.0.36 \ - crate://crates.io/rand/0.8.5 \ - crate://crates.io/rand_chacha/0.3.1 \ - crate://crates.io/rand_core/0.6.4 \ - crate://crates.io/rayon/1.10.0 \ - crate://crates.io/rayon-core/1.12.1 \ - crate://crates.io/regex/1.10.4 \ - crate://crates.io/regex-automata/0.4.6 \ - crate://crates.io/regex-syntax/0.8.3 \ - crate://crates.io/rust-ini/0.21.0 \ - crate://crates.io/rustix/0.38.37 \ - crate://crates.io/self_cell/1.0.4 \ - crate://crates.io/serde/1.0.202 \ - crate://crates.io/serde_derive/1.0.202 \ - crate://crates.io/similar/2.6.0 \ - crate://crates.io/strsim/0.11.1 \ - crate://crates.io/syn/2.0.65 \ - crate://crates.io/tempfile/3.13.0 \ - crate://crates.io/terminal_size/0.3.0 \ - crate://crates.io/thiserror/1.0.61 \ - crate://crates.io/thiserror-impl/1.0.61 \ - crate://crates.io/tiny-keccak/2.0.2 \ - crate://crates.io/trim-in-place/0.1.7 \ - crate://crates.io/unicode-ident/1.0.12 \ - crate://crates.io/unicode-width/0.1.12 \ - crate://crates.io/utf8parse/0.2.1 \ - crate://crates.io/wasi/0.11.0+wasi-snapshot-preview1 \ - crate://crates.io/wasm-bindgen/0.2.92 \ - crate://crates.io/wasm-bindgen-backend/0.2.92 \ - crate://crates.io/wasm-bindgen-macro/0.2.92 \ - crate://crates.io/wasm-bindgen-macro-support/0.2.92 \ - crate://crates.io/wasm-bindgen-shared/0.2.92 \ - crate://crates.io/wild/2.2.1 \ - crate://crates.io/winapi-util/0.1.8 \ - crate://crates.io/windows-core/0.52.0 \ - crate://crates.io/windows-sys/0.48.0 \ - crate://crates.io/windows-sys/0.52.0 \ - crate://crates.io/windows-sys/0.59.0 \ - crate://crates.io/windows-targets/0.48.5 \ - crate://crates.io/windows-targets/0.52.6 \ - crate://crates.io/windows_aarch64_gnullvm/0.48.5 \ - crate://crates.io/windows_aarch64_gnullvm/0.52.6 \ - crate://crates.io/windows_aarch64_msvc/0.48.5 \ - crate://crates.io/windows_aarch64_msvc/0.52.6 \ - crate://crates.io/windows_i686_gnu/0.48.5 \ - crate://crates.io/windows_i686_gnu/0.52.6 \ - crate://crates.io/windows_i686_gnullvm/0.52.6 \ - crate://crates.io/windows_i686_msvc/0.48.5 \ - crate://crates.io/windows_i686_msvc/0.52.6 \ - crate://crates.io/windows_x86_64_gnu/0.48.5 \ - crate://crates.io/windows_x86_64_gnu/0.52.6 \ - crate://crates.io/windows_x86_64_gnullvm/0.48.5 \ - crate://crates.io/windows_x86_64_gnullvm/0.52.6 \ - crate://crates.io/windows_x86_64_msvc/0.48.5 \ - crate://crates.io/windows_x86_64_msvc/0.52.6 \ -" - -SRC_URI[aho-corasick-1.1.3.sha256sum] = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" -SRC_URI[android-tzdata-0.1.1.sha256sum] = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" -SRC_URI[android_system_properties-0.1.5.sha256sum] = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" -SRC_URI[anstream-0.6.14.sha256sum] = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" -SRC_URI[anstyle-1.0.7.sha256sum] = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" -SRC_URI[anstyle-parse-0.2.4.sha256sum] = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" -SRC_URI[anstyle-query-1.0.3.sha256sum] = "a64c907d4e79225ac72e2a354c9ce84d50ebb4586dee56c82b3ee73004f537f5" -SRC_URI[anstyle-wincon-3.0.3.sha256sum] = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" -SRC_URI[arbitrary-1.3.2.sha256sum] = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" -SRC_URI[autocfg-1.3.0.sha256sum] = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" -SRC_URI[bigdecimal-0.4.3.sha256sum] = "9324c8014cd04590682b34f1e9448d38f0674d0f7b2dc553331016ef0e4e9ebc" -SRC_URI[binary-heap-plus-0.5.0.sha256sum] = "e4551d8382e911ecc0d0f0ffb602777988669be09447d536ff4388d1def11296" -SRC_URI[bitflags-1.3.2.sha256sum] = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" -SRC_URI[bitflags-2.5.0.sha256sum] = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" -SRC_URI[bstr-1.9.1.sha256sum] = "05efc5cfd9110c8416e471df0e96702d58690178e206e61b7173706673c93706" -SRC_URI[bumpalo-3.16.0.sha256sum] = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" -SRC_URI[bytecount-0.6.8.sha256sum] = "5ce89b21cab1437276d2650d57e971f9d548a2d9037cc231abdc0562b97498ce" -SRC_URI[cc-1.0.98.sha256sum] = "41c270e7540d725e65ac7f1b212ac8ce349719624d7bcff99f8e2e488e8cf03f" -SRC_URI[cfg-if-1.0.0.sha256sum] = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" -SRC_URI[cfg_aliases-0.1.1.sha256sum] = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" -SRC_URI[cfg_aliases-0.2.1.sha256sum] = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" -SRC_URI[chrono-0.4.38.sha256sum] = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" -SRC_URI[clap-4.5.4.sha256sum] = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" -SRC_URI[clap_builder-4.5.2.sha256sum] = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" -SRC_URI[clap_lex-0.7.0.sha256sum] = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" -SRC_URI[colorchoice-1.0.1.sha256sum] = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" -SRC_URI[compare-0.1.0.sha256sum] = "120133d4db2ec47efe2e26502ee984747630c67f51974fca0b6c1340cf2368d3" -SRC_URI[const-random-0.1.18.sha256sum] = "87e00182fe74b066627d63b85fd550ac2998d4b0bd86bfed477a0ae4c7c71359" -SRC_URI[const-random-macro-0.1.16.sha256sum] = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" -SRC_URI[core-foundation-sys-0.8.6.sha256sum] = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" -SRC_URI[crossbeam-deque-0.8.5.sha256sum] = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" -SRC_URI[crossbeam-epoch-0.9.18.sha256sum] = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" -SRC_URI[crossbeam-utils-0.8.20.sha256sum] = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" -SRC_URI[crunchy-0.2.2.sha256sum] = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" -SRC_URI[ctrlc-3.4.4.sha256sum] = "672465ae37dc1bc6380a6547a8883d5dd397b0f1faaad4f265726cc7042a5345" -SRC_URI[dlv-list-0.5.2.sha256sum] = "442039f5147480ba31067cb00ada1adae6892028e40e45fc5de7b7df6dcc1b5f" -SRC_URI[dunce-1.0.4.sha256sum] = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" -SRC_URI[either-1.12.0.sha256sum] = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b" -SRC_URI[errno-0.3.9.sha256sum] = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" -SRC_URI[fastrand-2.1.1.sha256sum] = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" -SRC_URI[fnv-1.0.7.sha256sum] = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" -SRC_URI[getrandom-0.2.15.sha256sum] = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" -SRC_URI[glob-0.3.1.sha256sum] = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" -SRC_URI[hashbrown-0.14.5.sha256sum] = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" -SRC_URI[iana-time-zone-0.1.60.sha256sum] = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" -SRC_URI[iana-time-zone-haiku-0.1.2.sha256sum] = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" -SRC_URI[is_terminal_polyfill-1.70.0.sha256sum] = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" -SRC_URI[itertools-0.13.0.sha256sum] = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" -SRC_URI[jobserver-0.1.31.sha256sum] = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" -SRC_URI[js-sys-0.3.69.sha256sum] = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" -SRC_URI[libc-0.2.161.sha256sum] = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" -SRC_URI[libfuzzer-sys-0.4.7.sha256sum] = "a96cfd5557eb82f2b83fed4955246c988d331975a002961b07c81584d107e7f7" -SRC_URI[libm-0.2.8.sha256sum] = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" -SRC_URI[linux-raw-sys-0.4.14.sha256sum] = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" -SRC_URI[log-0.4.21.sha256sum] = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" -SRC_URI[memchr-2.7.2.sha256sum] = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" -SRC_URI[minimal-lexical-0.2.1.sha256sum] = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" -SRC_URI[nix-0.28.0.sha256sum] = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4" -SRC_URI[nix-0.29.0.sha256sum] = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" -SRC_URI[nom-7.1.3.sha256sum] = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" -SRC_URI[num-bigint-0.4.5.sha256sum] = "c165a9ab64cf766f73521c0dd2cfdff64f488b8f0b3e621face3462d3db536d7" -SRC_URI[num-integer-0.1.46.sha256sum] = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" -SRC_URI[num-traits-0.2.19.sha256sum] = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" -SRC_URI[number_prefix-0.4.0.sha256sum] = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" -SRC_URI[once_cell-1.19.0.sha256sum] = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" -SRC_URI[onig-6.4.0.sha256sum] = "8c4b31c8722ad9171c6d77d3557db078cab2bd50afcc9d09c8b315c59df8ca4f" -SRC_URI[onig_sys-69.8.1.sha256sum] = "7b829e3d7e9cc74c7e315ee8edb185bf4190da5acde74afd7fc59c35b1f086e7" -SRC_URI[ordered-multimap-0.7.3.sha256sum] = "49203cdcae0030493bad186b28da2fa25645fa276a51b6fec8010d281e02ef79" -SRC_URI[os_display-0.1.3.sha256sum] = "7a6229bad892b46b0dcfaaeb18ad0d2e56400f5aaea05b768bde96e73676cf75" -SRC_URI[parse_datetime-0.6.0.sha256sum] = "a8720474e3dd4af20cea8716703498b9f3b690f318fa9d9d9e2e38eaf44b96d0" -SRC_URI[pkg-config-0.3.30.sha256sum] = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" -SRC_URI[ppv-lite86-0.2.17.sha256sum] = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" -SRC_URI[proc-macro2-1.0.83.sha256sum] = "0b33eb56c327dec362a9e55b3ad14f9d2f0904fb5a5b03b513ab5465399e9f43" -SRC_URI[quote-1.0.36.sha256sum] = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" -SRC_URI[rand-0.8.5.sha256sum] = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -SRC_URI[rand_chacha-0.3.1.sha256sum] = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -SRC_URI[rand_core-0.6.4.sha256sum] = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -SRC_URI[rayon-1.10.0.sha256sum] = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" -SRC_URI[rayon-core-1.12.1.sha256sum] = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" -SRC_URI[regex-1.10.4.sha256sum] = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" -SRC_URI[regex-automata-0.4.6.sha256sum] = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" -SRC_URI[regex-syntax-0.8.3.sha256sum] = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" -SRC_URI[rust-ini-0.21.0.sha256sum] = "0d625ed57d8f49af6cfa514c42e1a71fadcff60eb0b1c517ff82fe41aa025b41" -SRC_URI[rustix-0.38.37.sha256sum] = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" -SRC_URI[self_cell-1.0.4.sha256sum] = "d369a96f978623eb3dc28807c4852d6cc617fed53da5d3c400feff1ef34a714a" -SRC_URI[serde-1.0.202.sha256sum] = "226b61a0d411b2ba5ff6d7f73a476ac4f8bb900373459cd00fab8512828ba395" -SRC_URI[serde_derive-1.0.202.sha256sum] = "6048858004bcff69094cd972ed40a32500f153bd3be9f716b2eed2e8217c4838" -SRC_URI[similar-2.6.0.sha256sum] = "1de1d4f81173b03af4c0cbed3c898f6bff5b870e4a7f5d6f4057d62a7a4b686e" -SRC_URI[strsim-0.11.1.sha256sum] = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" -SRC_URI[syn-2.0.65.sha256sum] = "d2863d96a84c6439701d7a38f9de935ec562c8832cc55d1dde0f513b52fad106" -SRC_URI[tempfile-3.13.0.sha256sum] = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" -SRC_URI[terminal_size-0.3.0.sha256sum] = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7" -SRC_URI[thiserror-1.0.61.sha256sum] = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" -SRC_URI[thiserror-impl-1.0.61.sha256sum] = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" -SRC_URI[tiny-keccak-2.0.2.sha256sum] = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" -SRC_URI[trim-in-place-0.1.7.sha256sum] = "343e926fc669bc8cde4fa3129ab681c63671bae288b1f1081ceee6d9d37904fc" -SRC_URI[unicode-ident-1.0.12.sha256sum] = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" -SRC_URI[unicode-width-0.1.12.sha256sum] = "68f5e5f3158ecfd4b8ff6fe086db7c8467a2dfdac97fe420f2b7c4aa97af66d6" -SRC_URI[utf8parse-0.2.1.sha256sum] = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" -SRC_URI[wasi-0.11.0+wasi-snapshot-preview1.sha256sum] = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" -SRC_URI[wasm-bindgen-0.2.92.sha256sum] = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" -SRC_URI[wasm-bindgen-backend-0.2.92.sha256sum] = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" -SRC_URI[wasm-bindgen-macro-0.2.92.sha256sum] = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" -SRC_URI[wasm-bindgen-macro-support-0.2.92.sha256sum] = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" -SRC_URI[wasm-bindgen-shared-0.2.92.sha256sum] = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" -SRC_URI[wild-2.2.1.sha256sum] = "a3131afc8c575281e1e80f36ed6a092aa502c08b18ed7524e86fbbb12bb410e1" -SRC_URI[winapi-util-0.1.8.sha256sum] = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" -SRC_URI[windows-core-0.52.0.sha256sum] = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" -SRC_URI[windows-sys-0.48.0.sha256sum] = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -SRC_URI[windows-sys-0.52.0.sha256sum] = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -SRC_URI[windows-sys-0.59.0.sha256sum] = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" -SRC_URI[windows-targets-0.48.5.sha256sum] = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -SRC_URI[windows-targets-0.52.6.sha256sum] = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" -SRC_URI[windows_aarch64_gnullvm-0.48.5.sha256sum] = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" -SRC_URI[windows_aarch64_gnullvm-0.52.6.sha256sum] = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" -SRC_URI[windows_aarch64_msvc-0.48.5.sha256sum] = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" -SRC_URI[windows_aarch64_msvc-0.52.6.sha256sum] = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" -SRC_URI[windows_i686_gnu-0.48.5.sha256sum] = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" -SRC_URI[windows_i686_gnu-0.52.6.sha256sum] = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" -SRC_URI[windows_i686_gnullvm-0.52.6.sha256sum] = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" -SRC_URI[windows_i686_msvc-0.48.5.sha256sum] = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" -SRC_URI[windows_i686_msvc-0.52.6.sha256sum] = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" -SRC_URI[windows_x86_64_gnu-0.48.5.sha256sum] = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" -SRC_URI[windows_x86_64_gnu-0.52.6.sha256sum] = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" -SRC_URI[windows_x86_64_gnullvm-0.48.5.sha256sum] = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" -SRC_URI[windows_x86_64_gnullvm-0.52.6.sha256sum] = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" -SRC_URI[windows_x86_64_msvc-0.48.5.sha256sum] = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" -SRC_URI[windows_x86_64_msvc-0.52.6.sha256sum] = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +SRC_URI[zerocopy-0.7.33.sha256sum] = "087eca3c1eaf8c47b94d02790dd086cd594b912d2043d4de4bfdd466b3befb7c" +SRC_URI[zerocopy-derive-0.7.33.sha256sum] = "6f4b6c273f496d8fd4eaf18853e6b448760225dc030ff2c485a786859aea6393" +SRC_URI[zip-1.3.0.sha256sum] = "f1f4a27345eb6f7aa7bd015ba7eb4175fa4e1b462a29874b779e0bbcf96c6ac7" diff --git a/sources/meta-openembedded/meta-oe/recipes-core/uutils-coreutils/uutils-coreutils_0.0.27.bb b/sources/meta-openembedded/meta-oe/recipes-core/uutils-coreutils/uutils-coreutils_0.0.27.bb new file mode 100644 index 00000000..320739be --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-core/uutils-coreutils/uutils-coreutils_0.0.27.bb @@ -0,0 +1,76 @@ +# Copyright (c) 2022, Snap Inc. +# Released under the MIT license (see COPYING.MIT for the terms) +SUMMARY = "coreutils ~ GNU coreutils (updated); implemented as universal (cross-platform) utils, written in Rust" +HOMEPAGE = "https://github.com/uutils/coreutils" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=e74349878141b240070458d414ab3b64" + +inherit cargo cargo-update-recipe-crates + +SRC_URI += "git://github.com/uutils/coreutils.git;protocol=https;branch=main" + +# musl not supported because the libc crate does not support functions like "endutxent" at the moment, +# so src/uucore/src/lib/features.rs disables utmpx when targetting musl. +COMPATIBLE_HOST:libc-musl = "null" + +SRCREV = "9b11753e7cb06b0f76f4221fc237019c0a86f8f5" +S = "${WORKDIR}/git" + +require ${BPN}-crates.inc + +PROVIDES = "coreutils" +RPROVIDES:${PN} = "coreutils" + +PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'selinux', d)}" + +PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux" + +CARGO_BUILD_FLAGS += "--features unix" +CARGO_BUILD_FLAGS += "${@bb.utils.contains('PACKAGECONFIG', 'selinux', '--features feat_selinux', '', d)}" + +DEPENDS += "${@bb.utils.contains('PACKAGECONFIG', 'selinux', 'clang-native libselinux-native', '', d)}" + +export LIBCLANG_PATH = "${WORKDIR}/recipe-sysroot-native${libdir}" +export SELINUX_LIB_DIR = "${WORKDIR}/recipe-sysroot-native${libdir}" +export SELINUX_INCLUDE_DIR = "${WORKDIR}/recipe-sysroot-native${includedir}" + +# The code which follows is strongly inspired from the GNU coreutils bitbake recipe: + +# [ df mktemp nice printenv base64 gets a special treatment and is not included in this +bindir_progs = "[ arch basename cksum comm csplit cut dir dircolors dirname du \ + env expand expr factor fmt fold groups head hostid id install \ + join link logname md5sum mkfifo nl nohup nproc od paste pathchk \ + pinky pr printf ptx readlink realpath seq sha1sum sha224sum sha256sum \ + sha384sum sha512sum shred shuf sort split sum tac tail tee test timeout \ + tr truncate tsort tty unexpand uniq unlink uptime users vdir wc who whoami yes" + +bindir_progs += "${@bb.utils.contains('PACKAGECONFIG', 'selinux', 'chcon runcon', '', d)}" + +base_bindir_progs = "cat chgrp chmod chown cp date dd echo false hostname kill ln ls mkdir \ + mknod mv pwd rm rmdir sleep stty sync touch true uname stat" + +sbindir_progs= "chroot" + +inherit update-alternatives + +# Higher than busybox (which uses 50) +ALTERNATIVE_PRIORITY = "100" + +# Higher than net-tools (which uses 100) +ALTERNATIVE_PRIORITY[hostname] = "110" + +ALTERNATIVE:${PN} = "${bindir_progs} ${base_bindir_progs} ${sbindir_progs} base32 base64 nice printenv mktemp df" + +# Use the multicall binary named "coreutils" for symlinks +ALTERNATIVE_TARGET = "${bindir}/coreutils" + +python __anonymous() { + for prog in d.getVar('base_bindir_progs').split(): + d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_bindir'), prog)) + + for prog in d.getVar('sbindir_progs').split(): + d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('sbindir'), prog)) +} + +ERROR_QA:remove = "buildpaths" +WARN_QA:append = " buildpaths" diff --git a/sources/meta-openembedded/meta-oe/recipes-core/uutils-coreutils/uutils-coreutils_0.0.28.bb b/sources/meta-openembedded/meta-oe/recipes-core/uutils-coreutils/uutils-coreutils_0.0.28.bb deleted file mode 100644 index 76cecac5..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-core/uutils-coreutils/uutils-coreutils_0.0.28.bb +++ /dev/null @@ -1,74 +0,0 @@ -# Copyright (c) 2022, Snap Inc. -# Released under the MIT license (see COPYING.MIT for the terms) -SUMMARY = "coreutils ~ GNU coreutils (updated); implemented as universal (cross-platform) utils, written in Rust" -HOMEPAGE = "https://github.com/uutils/coreutils" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=e74349878141b240070458d414ab3b64" - -inherit cargo cargo-update-recipe-crates - -SRC_URI += "git://github.com/uutils/coreutils.git;protocol=https;branch=main \ - file://0001-Cargo.lock-revert-to-selinux-sys-0.6.9-and-fts-sys-0.patch" - -# musl not supported because the libc crate does not support functions like "endutxent" at the moment, -# so src/uucore/src/lib/features.rs disables utmpx when targetting musl. -COMPATIBLE_HOST:libc-musl = "null" - -SRCREV = "1d9e1626377cbaea3b21842a3525a62ba60f905f" -S = "${WORKDIR}/git" - -require ${BPN}-crates.inc - -PROVIDES = "coreutils" -RPROVIDES:${PN} = "coreutils" - -PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'selinux', d)}" - -PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux" - -CARGO_BUILD_FLAGS += "--features unix" -CARGO_BUILD_FLAGS += "${@bb.utils.contains('PACKAGECONFIG', 'selinux', '--features feat_selinux', '', d)}" - -DEPENDS += "${@bb.utils.contains('PACKAGECONFIG', 'selinux', 'clang-native libselinux-native', '', d)}" - -export LIBCLANG_PATH = "${WORKDIR}/recipe-sysroot-native${libdir}" -export SELINUX_LIB_DIR = "${WORKDIR}/recipe-sysroot-native${libdir}" -export SELINUX_INCLUDE_DIR = "${WORKDIR}/recipe-sysroot-native${includedir}" - -# The code which follows is strongly inspired from the GNU coreutils bitbake recipe: - -# [ df mktemp nice printenv base64 gets a special treatment and is not included in this -bindir_progs = "[ arch basename cksum comm csplit cut dir dircolors dirname du \ - env expand expr factor fmt fold groups head hostid id install \ - join link logname md5sum mkfifo nl nohup nproc od paste pathchk \ - pinky pr printf ptx readlink realpath seq sha1sum sha224sum sha256sum \ - sha384sum sha512sum shred shuf sort split sum tac tail tee test timeout \ - tr truncate tsort tty unexpand uniq unlink uptime users vdir wc who whoami yes" - -bindir_progs += "${@bb.utils.contains('PACKAGECONFIG', 'selinux', 'chcon runcon', '', d)}" - -base_bindir_progs = "cat chgrp chmod chown cp date dd echo false hostname kill ln ls mkdir \ - mknod mv pwd rm rmdir sleep stty sync touch true uname stat" - -sbindir_progs= "chroot" - -inherit update-alternatives - -# Higher than busybox (which uses 50) -ALTERNATIVE_PRIORITY = "100" - -# Higher than net-tools (which uses 100) -ALTERNATIVE_PRIORITY[hostname] = "110" - -ALTERNATIVE:${PN} = "${bindir_progs} ${base_bindir_progs} ${sbindir_progs} base32 base64 nice printenv mktemp df" - -# Use the multicall binary named "coreutils" for symlinks -ALTERNATIVE_TARGET = "${bindir}/coreutils" - -python __anonymous() { - for prog in d.getVar('base_bindir_progs').split(): - d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_bindir'), prog)) - - for prog in d.getVar('sbindir_progs').split(): - d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('sbindir'), prog)) -} diff --git a/sources/meta-openembedded/meta-oe/recipes-crypto/botan/botan_3.2.0.bb b/sources/meta-openembedded/meta-oe/recipes-crypto/botan/botan_3.2.0.bb deleted file mode 100644 index 1fdda65a..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-crypto/botan/botan_3.2.0.bb +++ /dev/null @@ -1,52 +0,0 @@ -SUMMARY = "Crypto and TLS for C++11" -HOMEPAGE = "https://botan.randombit.net" -LICENSE = "BSD-2-Clause" -LIC_FILES_CHKSUM = "file://license.txt;md5=f5254d3abe90ec5bb82c5694ff751546" -SECTION = "libs" - -SRC_URI = "https://botan.randombit.net/releases/Botan-${PV}.tar.xz" -SRC_URI[sha256sum] = "049c847835fcf6ef3a9e206b33de05dd38999c325e247482772a5598d9e5ece3" - -S = "${WORKDIR}/Botan-${PV}" - -inherit python3native siteinfo lib_package - -CPU ?= "${TARGET_ARCH}" -CPU:x86 = "x86_32" -CPU:armv7a = "armv7" -CPU:armv7ve = "armv7" - -do_configure() { - python3 ${S}/configure.py \ - --prefix="${exec_prefix}" \ - --libdir="${libdir}" \ - --cpu="${CPU}" \ - --cc-bin="${CXX}" \ - --cxxflags="${CXXFLAGS}" \ - --ldflags="${LDFLAGS}" \ - --with-endian=${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', 'little', 'big', d)} \ - ${@bb.utils.contains("TUNE_FEATURES","neon","","--disable-neon",d)} \ - --with-sysroot-dir=${STAGING_DIR_HOST} \ - --with-build-dir="${B}" \ - --optimize-for-size \ - --with-stack-protector \ - --enable-shared-library \ - --with-python-versions=3 \ - ${EXTRA_OECONF} -} - -do_compile() { - oe_runmake -} -do_install() { - oe_runmake DESTDIR=${D} install - sed -i -e 's|${WORKDIR}||g' ${D}${includedir}/botan-3/botan/build.h -} - -PACKAGES += "${PN}-python3" - -FILES:${PN}-python3 = "${libdir}/python3" - -RDEPENDS:${PN}-python3 += "python3" - -COMPATIBLE_HOST:riscv32 = "null" diff --git a/sources/meta-openembedded/meta-oe/recipes-crypto/botan/botan_3.5.0.bb b/sources/meta-openembedded/meta-oe/recipes-crypto/botan/botan_3.5.0.bb new file mode 100644 index 00000000..3a40680a --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-crypto/botan/botan_3.5.0.bb @@ -0,0 +1,52 @@ +SUMMARY = "Crypto and TLS for C++11" +HOMEPAGE = "https://botan.randombit.net" +LICENSE = "BSD-2-Clause" +LIC_FILES_CHKSUM = "file://license.txt;md5=573e74513ae3057b04757df65b537de0" +SECTION = "libs" + +SRC_URI = "https://botan.randombit.net/releases/Botan-${PV}.tar.xz" +SRC_URI[sha256sum] = "67e8dae1ca2468d90de4e601c87d5f31ff492b38e8ab8bcbd02ddf7104ed8a9f" + +S = "${WORKDIR}/Botan-${PV}" + +inherit python3native siteinfo lib_package + +CPU ?= "${TARGET_ARCH}" +CPU:x86 = "x86_32" +CPU:armv7a = "armv7" +CPU:armv7ve = "armv7" + +do_configure() { + python3 ${S}/configure.py \ + --prefix="${exec_prefix}" \ + --libdir="${libdir}" \ + --cpu="${CPU}" \ + --cc-bin="${CXX}" \ + --cxxflags="${CXXFLAGS}" \ + --ldflags="${LDFLAGS}" \ + --with-endian=${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', 'little', 'big', d)} \ + ${@bb.utils.contains("TUNE_FEATURES","neon","","--disable-neon",d)} \ + --with-sysroot-dir=${STAGING_DIR_HOST} \ + --with-build-dir="${B}" \ + --optimize-for-size \ + --with-stack-protector \ + --enable-shared-library \ + --with-python-versions=3 \ + ${EXTRA_OECONF} +} + +do_compile() { + oe_runmake +} +do_install() { + oe_runmake DESTDIR=${D} install + sed -i -e 's|${WORKDIR}||g' ${D}${includedir}/botan-3/botan/build.h +} + +PACKAGES += "${PN}-python3" + +FILES:${PN}-python3 = "${libdir}/python3" + +RDEPENDS:${PN}-python3 += "python3" + +COMPATIBLE_HOST:riscv32 = "null" diff --git a/sources/meta-openembedded/meta-oe/recipes-crypto/cryptsetup/cryptsetup_2.7.2.bb b/sources/meta-openembedded/meta-oe/recipes-crypto/cryptsetup/cryptsetup_2.7.2.bb deleted file mode 100644 index 504c718b..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-crypto/cryptsetup/cryptsetup_2.7.2.bb +++ /dev/null @@ -1,117 +0,0 @@ -SUMMARY = "Manage plain dm-crypt and LUKS encrypted volumes" -DESCRIPTION = "Cryptsetup is used to conveniently setup dm-crypt managed \ -device-mapper mappings. These include plain dm-crypt volumes and \ -LUKS volumes. The difference is that LUKS uses a metadata header \ -and can hence offer more features than plain dm-crypt. On the other \ -hand, the header is visible and vulnerable to damage." -HOMEPAGE = "https://gitlab.com/cryptsetup/cryptsetup" -SECTION = "console" -LICENSE = "GPL-2.0-with-OpenSSL-exception" -LIC_FILES_CHKSUM = "file://COPYING;md5=32107dd283b1dfeb66c9b3e6be312326" - -DEPENDS = " \ - json-c \ - libdevmapper \ - popt \ - util-linux-libuuid \ -" - -DEPENDS:append:libc-musl = " argp-standalone" -LDFLAGS:append:libc-musl = " -largp" - -SRC_URI = "${KERNELORG_MIRROR}/linux/utils/${BPN}/v${@d.getVar('PV').split('.')[0]}.${@d.getVar('PV').split('.')[1]}/${BP}.tar.xz" -SRC_URI[sha256sum] = "219ebf74e8eddf96624a0376477e5a6f8f350a67aaf36e7dadb114d94b3afef4" - -inherit autotools gettext pkgconfig - -# Use openssl because libgcrypt drops root privileges -# if libgcrypt is linked with libcap support -PACKAGECONFIG ??= " \ - keyring \ - cryptsetup \ - veritysetup \ - luks2-reencryption \ - integritysetup \ - ${@bb.utils.filter('DISTRO_FEATURES', 'selinux', d)} \ - kernel_crypto \ - internal-argon2 \ - blkid \ - luks-adjust-xts-keysize \ - openssl \ - ssh-token \ -" -PACKAGECONFIG:append:class-target = " \ - udev \ -" - -PACKAGECONFIG[keyring] = "--enable-keyring,--disable-keyring" -PACKAGECONFIG[fips] = "--enable-fips,--disable-fips" -PACKAGECONFIG[pwquality] = "--enable-pwquality,--disable-pwquality,libpwquality" -PACKAGECONFIG[passwdqc] = "--enable-passwdqc,--disable-passwdqc,passwdqc" -PACKAGECONFIG[cryptsetup] = "--enable-cryptsetup,--disable-cryptsetup" -PACKAGECONFIG[veritysetup] = "--enable-veritysetup,--disable-veritysetup" -PACKAGECONFIG[luks2-reencryption] = "--enable-luks2-reencryption,--disable-luks2-reencryption" -PACKAGECONFIG[integritysetup] = "--enable-integritysetup,--disable-integritysetup" -PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux" -PACKAGECONFIG[udev] = "--enable-udev,--disable-udev,,udev lvm2-udevrules" -PACKAGECONFIG[kernel_crypto] = "--enable-kernel_crypto,--disable-kernel_crypto" -# gcrypt-pkbdf2 requries --with-crypto_backend=gcrypt or the flag isn't -# recognized. -PACKAGECONFIG[gcrypt-pbkdf2] = "--enable-gcrypt-pbkdf2" -PACKAGECONFIG[internal-argon2] = "--enable-internal-argon2,--disable-internal-argon2" -PACKAGECONFIG[internal-sse-argon2] = "--enable-internal-sse-argon2,--disable-internal-sse-argon2" -PACKAGECONFIG[blkid] = "--enable-blkid,--disable-blkid,util-linux" -PACKAGECONFIG[dev-random] = "--enable-dev-random,--disable-dev-random" -PACKAGECONFIG[luks-adjust-xts-keysize] = "--enable-luks-adjust-xts-keysize,--disable-luks-adjust-xts-keysize" -PACKAGECONFIG[openssl] = "--with-crypto_backend=openssl,,openssl" -PACKAGECONFIG[gcrypt] = "--with-crypto_backend=gcrypt,,libgcrypt" -PACKAGECONFIG[nss] = "--with-crypto_backend=nss,,nss" -PACKAGECONFIG[kernel] = "--with-crypto_backend=kernel" -PACKAGECONFIG[nettle] = "--with-crypto_backend=nettle,,nettle" -PACKAGECONFIG[luks2] = "--with-default-luks-format=LUKS2,--with-default-luks-format=LUKS1" -PACKAGECONFIG[ssh-token] = "--enable-ssh-token,--disable-ssh-token,libssh" - -EXTRA_OECONF = "--enable-static" -# Building without largefile is not supported by upstream -EXTRA_OECONF += "--enable-largefile" -# Requires a static popt library -EXTRA_OECONF += "--disable-static-cryptsetup" -# There's no recipe for libargon2 yet -EXTRA_OECONF += "--disable-libargon2" -# Disable documentation, there is no asciidoctor-native available in OE -EXTRA_OECONF += "--disable-asciidoc" -# libcryptsetup default PBKDF algorithm, Argon2 memory cost (KB), parallel threads and iteration time (ms) -LUKS2_PBKDF ?= "argon2i" -LUKS2_MEMORYKB ?= "1048576" -LUKS2_PARALLEL_THREADS ?= "4" -LUKS2_ITERTIME ?= "2000" - -EXTRA_OECONF += "--with-luks2-pbkdf=${LUKS2_PBKDF} \ - --with-luks2-memory-kb=${LUKS2_MEMORYKB} \ - --with-luks2-parallel-threads=${LUKS2_PARALLEL_THREADS} \ - --with-luks2-iter-time=${LUKS2_ITERTIME}" - -do_install:append() { - # The /usr/lib/cryptsetup directory is always created, even when ssh-token - # is disabled. In that case it is empty and causes a packaging error. Since - # there is no reason to distribute the empty directory, the easiest solution - # is to remove it if it is empty. - rmdir -p --ignore-fail-on-non-empty ${D}${libdir}/${BPN} -} - -FILES:${PN} += "${@bb.utils.contains('DISTRO_FEATURES','systemd','${exec_prefix}/lib/tmpfiles.d/cryptsetup.conf', '', d)}" - -RDEPENDS:${PN} = " \ - libdevmapper \ -" - -RRECOMMENDS:${PN}:class-target = " \ - kernel-module-aes-generic \ - kernel-module-dm-crypt \ - kernel-module-md5 \ - kernel-module-cbc \ - kernel-module-sha256-generic \ - kernel-module-xts \ -" - -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-oe/recipes-crypto/cryptsetup/cryptsetup_2.7.5.bb b/sources/meta-openembedded/meta-oe/recipes-crypto/cryptsetup/cryptsetup_2.7.5.bb new file mode 100644 index 00000000..60bf501e --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-crypto/cryptsetup/cryptsetup_2.7.5.bb @@ -0,0 +1,117 @@ +SUMMARY = "Manage plain dm-crypt and LUKS encrypted volumes" +DESCRIPTION = "Cryptsetup is used to conveniently setup dm-crypt managed \ +device-mapper mappings. These include plain dm-crypt volumes and \ +LUKS volumes. The difference is that LUKS uses a metadata header \ +and can hence offer more features than plain dm-crypt. On the other \ +hand, the header is visible and vulnerable to damage." +HOMEPAGE = "https://gitlab.com/cryptsetup/cryptsetup" +SECTION = "console" +LICENSE = "GPL-2.0-with-OpenSSL-exception" +LIC_FILES_CHKSUM = "file://COPYING;md5=32107dd283b1dfeb66c9b3e6be312326" + +DEPENDS = " \ + json-c \ + libdevmapper \ + popt \ + util-linux-libuuid \ +" + +DEPENDS:append:libc-musl = " argp-standalone" +LDFLAGS:append:libc-musl = " -largp" + +SRC_URI = "${KERNELORG_MIRROR}/linux/utils/${BPN}/v${@d.getVar('PV').split('.')[0]}.${@d.getVar('PV').split('.')[1]}/${BP}.tar.xz" +SRC_URI[sha256sum] = "d2be4395b8f503b0ebf4b2d81db90c35a97050a358ee21fe62a0dfb66e5d5522" + +inherit autotools gettext pkgconfig + +# Use openssl because libgcrypt drops root privileges +# if libgcrypt is linked with libcap support +PACKAGECONFIG ??= " \ + keyring \ + cryptsetup \ + veritysetup \ + luks2-reencryption \ + integritysetup \ + ${@bb.utils.filter('DISTRO_FEATURES', 'selinux', d)} \ + kernel_crypto \ + internal-argon2 \ + blkid \ + luks-adjust-xts-keysize \ + openssl \ + ssh-token \ +" +PACKAGECONFIG:append:class-target = " \ + udev \ +" + +PACKAGECONFIG[keyring] = "--enable-keyring,--disable-keyring" +PACKAGECONFIG[fips] = "--enable-fips,--disable-fips" +PACKAGECONFIG[pwquality] = "--enable-pwquality,--disable-pwquality,libpwquality" +PACKAGECONFIG[passwdqc] = "--enable-passwdqc,--disable-passwdqc,passwdqc" +PACKAGECONFIG[cryptsetup] = "--enable-cryptsetup,--disable-cryptsetup" +PACKAGECONFIG[veritysetup] = "--enable-veritysetup,--disable-veritysetup" +PACKAGECONFIG[luks2-reencryption] = "--enable-luks2-reencryption,--disable-luks2-reencryption" +PACKAGECONFIG[integritysetup] = "--enable-integritysetup,--disable-integritysetup" +PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux" +PACKAGECONFIG[udev] = "--enable-udev,--disable-udev,,udev lvm2" +PACKAGECONFIG[kernel_crypto] = "--enable-kernel_crypto,--disable-kernel_crypto" +# gcrypt-pkbdf2 requries --with-crypto_backend=gcrypt or the flag isn't +# recognized. +PACKAGECONFIG[gcrypt-pbkdf2] = "--enable-gcrypt-pbkdf2" +PACKAGECONFIG[internal-argon2] = "--enable-internal-argon2,--disable-internal-argon2" +PACKAGECONFIG[internal-sse-argon2] = "--enable-internal-sse-argon2,--disable-internal-sse-argon2" +PACKAGECONFIG[blkid] = "--enable-blkid,--disable-blkid,util-linux" +PACKAGECONFIG[dev-random] = "--enable-dev-random,--disable-dev-random" +PACKAGECONFIG[luks-adjust-xts-keysize] = "--enable-luks-adjust-xts-keysize,--disable-luks-adjust-xts-keysize" +PACKAGECONFIG[openssl] = "--with-crypto_backend=openssl,,openssl" +PACKAGECONFIG[gcrypt] = "--with-crypto_backend=gcrypt,,libgcrypt" +PACKAGECONFIG[nss] = "--with-crypto_backend=nss,,nss" +PACKAGECONFIG[kernel] = "--with-crypto_backend=kernel" +PACKAGECONFIG[nettle] = "--with-crypto_backend=nettle,,nettle" +PACKAGECONFIG[luks2] = "--with-default-luks-format=LUKS2,--with-default-luks-format=LUKS1" +PACKAGECONFIG[ssh-token] = "--enable-ssh-token,--disable-ssh-token,libssh" + +EXTRA_OECONF = "--enable-static" +# Building without largefile is not supported by upstream +EXTRA_OECONF += "--enable-largefile" +# Requires a static popt library +EXTRA_OECONF += "--disable-static-cryptsetup" +# There's no recipe for libargon2 yet +EXTRA_OECONF += "--disable-libargon2" +# Disable documentation, there is no asciidoctor-native available in OE +EXTRA_OECONF += "--disable-asciidoc" +# libcryptsetup default PBKDF algorithm, Argon2 memory cost (KB), parallel threads and iteration time (ms) +LUKS2_PBKDF ?= "argon2i" +LUKS2_MEMORYKB ?= "1048576" +LUKS2_PARALLEL_THREADS ?= "4" +LUKS2_ITERTIME ?= "2000" + +EXTRA_OECONF += "--with-luks2-pbkdf=${LUKS2_PBKDF} \ + --with-luks2-memory-kb=${LUKS2_MEMORYKB} \ + --with-luks2-parallel-threads=${LUKS2_PARALLEL_THREADS} \ + --with-luks2-iter-time=${LUKS2_ITERTIME}" + +do_install:append() { + # The /usr/lib/cryptsetup directory is always created, even when ssh-token + # is disabled. In that case it is empty and causes a packaging error. Since + # there is no reason to distribute the empty directory, the easiest solution + # is to remove it if it is empty. + rmdir -p --ignore-fail-on-non-empty ${D}${libdir}/${BPN} +} + +FILES:${PN} += "${@bb.utils.contains('DISTRO_FEATURES','systemd','${exec_prefix}/lib/tmpfiles.d/cryptsetup.conf', '', d)}" + +RDEPENDS:${PN} = " \ + libdevmapper \ +" + +RRECOMMENDS:${PN}:class-target = " \ + kernel-module-aes-generic \ + kernel-module-dm-crypt \ + kernel-module-md5 \ + kernel-module-cbc \ + kernel-module-sha256-generic \ + kernel-module-xts \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-oe/recipes-crypto/libsodium/libsodium/0001-fix-aarch64-Move-target-pragma-after-arm_neon.h-incl.patch b/sources/meta-openembedded/meta-oe/recipes-crypto/libsodium/libsodium/0001-fix-aarch64-Move-target-pragma-after-arm_neon.h-incl.patch deleted file mode 100644 index 7a6fae79..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-crypto/libsodium/libsodium/0001-fix-aarch64-Move-target-pragma-after-arm_neon.h-incl.patch +++ /dev/null @@ -1,49 +0,0 @@ -From d3253310f7c0fc0f1aad6864e3b57958ea1bb9c5 Mon Sep 17 00:00:00 2001 -From: tux3 -Date: Mon, 16 Oct 2023 16:42:04 +0200 -Subject: [PATCH] fix(aarch64): Move target #pragma after arm_neon.h include - -Fix per https://github.com/android/ndk/issues/1945 - -If the pragma is done before the header include, -in NDK 26 the attribute may apply to the functions in arm_neon.h - -Upstream-Status: Backport [https://github.com/jedisct1/libsodium/pull/1321] -Signed-off-by: Khem Raj ---- - .../aes256gcm/armcrypto/aead_aes256gcm_armcrypto.c | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -diff --git a/src/libsodium/crypto_aead/aes256gcm/armcrypto/aead_aes256gcm_armcrypto.c b/src/libsodium/crypto_aead/aes256gcm/armcrypto/aead_aes256gcm_armcrypto.c -index 0a5a128..aa76f5c 100644 ---- a/src/libsodium/crypto_aead/aes256gcm/armcrypto/aead_aes256gcm_armcrypto.c -+++ b/src/libsodium/crypto_aead/aes256gcm/armcrypto/aead_aes256gcm_armcrypto.c -@@ -19,12 +19,6 @@ - #define __vectorcall - #endif - --#ifdef __clang__ --#pragma clang attribute push(__attribute__((target("neon,crypto,aes"))), apply_to = function) --#elif defined(__GNUC__) --#pragma GCC target("+simd+crypto") --#endif -- - #ifndef __ARM_FEATURE_CRYPTO - #define __ARM_FEATURE_CRYPTO 1 - #endif -@@ -34,6 +28,12 @@ - - #include - -+#ifdef __clang__ -+#pragma clang attribute push(__attribute__((target("neon,crypto,aes"))), apply_to = function) -+#elif defined(__GNUC__) -+#pragma GCC target("+simd+crypto") -+#endif -+ - #define ABYTES crypto_aead_aes256gcm_ABYTES - #define NPUBBYTES crypto_aead_aes256gcm_NPUBBYTES - #define KEYBYTES crypto_aead_aes256gcm_KEYBYTES --- -2.42.1 - diff --git a/sources/meta-openembedded/meta-oe/recipes-crypto/libsodium/libsodium_1.0.19.bb b/sources/meta-openembedded/meta-oe/recipes-crypto/libsodium/libsodium_1.0.19.bb deleted file mode 100644 index 2e678f3f..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-crypto/libsodium/libsodium_1.0.19.bb +++ /dev/null @@ -1,14 +0,0 @@ -SUMMARY = "The Sodium crypto library" -HOMEPAGE = "http://libsodium.org/" -BUGTRACKER = "https://github.com/jedisct1/libsodium/issues" -LICENSE = "ISC" -LIC_FILES_CHKSUM = "file://LICENSE;md5=49ce3b426e6a002e23a1387248e6dbe9" - -SRC_URI = "https://download.libsodium.org/libsodium/releases/${BPN}-${PV}.tar.gz \ - file://0001-fix-aarch64-Move-target-pragma-after-arm_neon.h-incl.patch" -SRC_URI[sha256sum] = "018d79fe0a045cca07331d37bd0cb57b2e838c51bc48fd837a1472e50068bbea" - -inherit autotools - -S = "${WORKDIR}/libsodium-stable" -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-oe/recipes-crypto/libsodium/libsodium_1.0.20.bb b/sources/meta-openembedded/meta-oe/recipes-crypto/libsodium/libsodium_1.0.20.bb new file mode 100644 index 00000000..63d21576 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-crypto/libsodium/libsodium_1.0.20.bb @@ -0,0 +1,12 @@ +SUMMARY = "The Sodium crypto library" +HOMEPAGE = "http://libsodium.org/" +BUGTRACKER = "https://github.com/jedisct1/libsodium/issues" +LICENSE = "ISC" +LIC_FILES_CHKSUM = "file://LICENSE;md5=c59be7bb29f8e431b5f2d690b6734185" + +SRC_URI = "https://download.libsodium.org/libsodium/releases/${BPN}-${PV}.tar.gz" +SRC_URI[sha256sum] = "ebb65ef6ca439333c2bb41a0c1990587288da07f6c7fd07cb3a18cc18d30ce19" + +inherit autotools + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-oe/recipes-dbs/influxdb/influxdb_1.8.10.bb b/sources/meta-openembedded/meta-oe/recipes-dbs/influxdb/influxdb_1.8.10.bb index 53010715..cc8161cc 100644 --- a/sources/meta-openembedded/meta-oe/recipes-dbs/influxdb/influxdb_1.8.10.bb +++ b/sources/meta-openembedded/meta-oe/recipes-dbs/influxdb/influxdb_1.8.10.bb @@ -38,19 +38,20 @@ USERADD_PACKAGES = "${PN}" USERADD_PARAM:${PN} = "--system -d /var/lib/influxdb -m -s /bin/nologin influxdb" do_install:prepend() { - rm ${B}/src/${GO_IMPORT}/build.py - rm ${B}/src/${GO_IMPORT}/build.sh - rm ${B}/src/${GO_IMPORT}/Dockerfile* + test -e ${B}/src/${GO_IMPORT}/build.py && rm ${B}/src/${GO_IMPORT}/build.py + test -e ${B}/src/${GO_IMPORT}/build.sh && rm ${B}/src/${GO_IMPORT}/build.sh + rm -rf ${B}/src/${GO_IMPORT}/Dockerfile* + sed -i -e "s#usr/bin/sh#bin/sh#g" ${B}/src/${GO_IMPORT}/scripts/ci/run_perftest.sh } do_install:append() { install -d ${D}${sysconfdir}/influxdb - install -m 0644 ${WORKDIR}/influxdb.conf ${D}${sysconfdir}/influxdb + install -m 0644 ${UNPACKDIR}/influxdb.conf ${D}${sysconfdir}/influxdb chown -R root:influxdb ${D}${sysconfdir}/influxdb install -d ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/influxdb ${D}${sysconfdir}/init.d/influxdb + install -m 0755 ${UNPACKDIR}/influxdb ${D}${sysconfdir}/init.d/influxdb if [ "${@bb.utils.filter('DISTRO_FEATURES', 'sysvinit', d)}" ] ; then install -d ${D}${sysconfdir}/logrotate.d @@ -74,3 +75,5 @@ INITSCRIPT_NAME = "influxdb" INITSCRIPT_PARAMS = "defaults" SYSTEMD_SERVICE:${PN} = "influxdb.service" + +CVE_STATUS[CVE-2019-10329] = "cpe-incorrect: Version does not match and only the Jenkins plugin is affected." diff --git a/sources/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb.inc b/sources/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb.inc index f52947f3..f3b8b5ee 100644 --- a/sources/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb.inc +++ b/sources/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb.inc @@ -23,20 +23,22 @@ SRC_URI = "https://archive.mariadb.org/${BP}/source/${BP}.tar.gz \ file://0001-sql-CMakeLists.txt-fix-gen_lex_hash-not-found.patch \ file://lfs64.patch \ file://0001-Add-missing-includes-cstdint-and-cstdio.patch \ + file://0001-Use-a-lambda-function-as-deleter-prototype-in-unique.patch \ + file://0001-Ensure-compatibility-with-ARMv9-by-updating-.arch-di.patch \ " SRC_URI:append:libc-musl = " file://ppc-remove-glibc-dep.patch" SRC_URI[sha256sum] = "0a00180864cd016187c986faab8010de23a117b9a75f91d6456421f894e48d20" -UPSTREAM_CHECK_URI = "https://github.com/MariaDB/server/releases" - -S = "${WORKDIR}/mariadb-${PV}" +UPSTREAM_CHECK_URI = "https://github.com/MariaDB/server/tags" BINCONFIG_GLOB = "mysql_config" -inherit cmake gettext binconfig update-rc.d systemd multilib_script pkgconfig +inherit cmake gettext binconfig update-rc.d systemd multilib_script multilib_header pkgconfig MULTILIB_SCRIPTS = "${PN}-server:${bindir}/mariadbd-safe \ - ${PN}-setupdb:${bindir}/mariadb-install-db" + ${PN}-setupdb:${bindir}/mariadb-install-db \ + libmysqlclient-dev:${bindir}/mysql_config \ + " INITSCRIPT_PACKAGES = "${PN}-server ${PN}-setupdb" INITSCRIPT_NAME:${PN}-server = "mysqld" @@ -78,6 +80,7 @@ BUILD_CFLAGS += "-fuse-ld=bfd" BUILD_CXXFLAGS += "-fuse-ld=bfd" LDFLAGS:x86:toolchain-clang = "-latomic" +LDFLAGS:riscv32:toolchain-clang = "-latomic" EXTRA_OECMAKE = "-DWITH_EMBEDDED_SERVER=ON \ -DWITH_JEMALLOC=no \ @@ -159,20 +162,21 @@ mariadb_sysroot_preprocess () { do_install() { oe_runmake 'DESTDIR=${D}' install + oe_multilib_header mysql/mariadb_version.h mysql/server/my_config.h mysql/server/private/config.h install -d ${D}/${sysconfdir}/init.d - install -m 0644 ${WORKDIR}/my.cnf ${D}/${sysconfdir}/ - install -m 0755 ${WORKDIR}/install_db ${D}/${sysconfdir}/init.d/ + install -m 0644 ${UNPACKDIR}/my.cnf ${D}/${sysconfdir}/ + install -m 0755 ${UNPACKDIR}/install_db ${D}/${sysconfdir}/init.d/ mv ${D}/${sysconfdir}/init.d/mysql ${D}/${sysconfdir}/init.d/mysqld install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/mysqld.service ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/install_db.service ${D}${systemd_unitdir}/system + install -m 0644 ${UNPACKDIR}/mysqld.service ${D}${systemd_unitdir}/system + install -m 0644 ${UNPACKDIR}/install_db.service ${D}${systemd_unitdir}/system sed -i -e 's,@BINDIR@,${bindir},g' -e 's,@PREFIX@,${prefix},g' ${D}${systemd_unitdir}/system/mysqld.service \ ${D}${systemd_unitdir}/system/install_db.service install -d ${D}${bindir} - install -m 755 ${WORKDIR}/mysql-systemd-start ${D}${bindir} + install -m 755 ${UNPACKDIR}/mysql-systemd-start ${D}${bindir} install -d ${D}${datadir}/doc/${PN} if [ -f ${D}${datadir}/doc/README ]; then mv ${D}${datadir}/doc/README ${D}${datadir}/doc/${PN}/ @@ -214,7 +218,7 @@ RDEPENDS:${PN}-client = "perl perl-module-getopt-long perl-module-file-temp \ RDEPENDS:${PN}-server = "perl perl-module-getopt-long perl-module-data-dumper \ perl-module-file-basename perl-module-file-path perl-module-sys-hostname \ perl-module-file-copy perl-module-file-temp perl-module-posix \ - ${PN}-client ${PN}-setupdb libdbi-perl libdbd-mysql-perl lzo" + ${PN}-client ${PN}-setupdb libdbi-perl dbd-mariadb lzo" RDEPENDS:${PN}-leftovers = "perl perl-module-cwd perl-module-benchmark perl-module-getopt-long \ perl-module-posix perl-module-data-dumper perl-module-sigtrap perl-module-threads \ perl-module-threads-shared perl-module-io-socket perl-module-sys-hostname perl-module-file-copy \ diff --git a/sources/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/0001-Ensure-compatibility-with-ARMv9-by-updating-.arch-di.patch b/sources/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/0001-Ensure-compatibility-with-ARMv9-by-updating-.arch-di.patch new file mode 100644 index 00000000..11d17247 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/0001-Ensure-compatibility-with-ARMv9-by-updating-.arch-di.patch @@ -0,0 +1,44 @@ +From 1b0c05b53ede7decb3f4dfe6187f9573cab5e0ab Mon Sep 17 00:00:00 2001 +From: Ruiqiang Hao +Date: Mon, 2 Dec 2024 02:18:46 +0000 +Subject: [PATCH] Ensure compatibility with ARMv9 by updating .arch directive + +The pmem_cvap() function currently uses the '.arch armv8.2-a' directive +for the 'dc cvap' instruction. This will cause build errors below when +compiling for ARMv9 systems. Update the '.arch' directive to 'armv9.4-a' +to ensure compatibility with ARMv9 architectures. + +{standard input}: Assembler messages: +{standard input}:169: Error: selected processor does not support `retaa' +{standard input}:286: Error: selected processor does not support `retaa' +make[2]: *** [storage/innobase/CMakeFiles/innobase_embedded.dir/build.make: +1644: storage/innobase/CMakeFiles/innobase_embedded.dir/sync/cache.cc.o] +Error 1 + +Upstream-Status: Submitted + +Signed-off-by: Ruiqiang Hao +--- + storage/innobase/sync/cache.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/storage/innobase/sync/cache.cc b/storage/innobase/sync/cache.cc +index 43d642d05b5..af2d1f3d221 100644 +--- a/storage/innobase/sync/cache.cc ++++ b/storage/innobase/sync/cache.cc +@@ -82,7 +82,12 @@ static void pmem_cvap(const void* buf, size_t size) + for (uintptr_t u= uintptr_t(buf) & ~(CPU_LEVEL1_DCACHE_LINESIZE), + end= uintptr_t(buf) + size; + u < end; u+= CPU_LEVEL1_DCACHE_LINESIZE) ++#if defined __ARM_ARCH && __ARM_ARCH == 9 ++ __asm__ __volatile__(".arch armv9.4-a\n dc cvap, %0" :: "r"(u) : "memory"); ++#else + __asm__ __volatile__(".arch armv8.2-a\n dc cvap, %0" :: "r"(u) : "memory"); ++#endif ++ + __asm__ __volatile__("dmb ishst" ::: "memory"); + } + +-- +2.43.0 + diff --git a/sources/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/0001-Use-a-lambda-function-as-deleter-prototype-in-unique.patch b/sources/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/0001-Use-a-lambda-function-as-deleter-prototype-in-unique.patch new file mode 100644 index 00000000..416b17ba --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/0001-Use-a-lambda-function-as-deleter-prototype-in-unique.patch @@ -0,0 +1,26 @@ +From 713c21880e25108bf0703433432acca58377cc7b Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 27 Sep 2024 11:55:53 -0700 +Subject: [PATCH] Use a lambda function as deleter prototype in unique_ptr + +Fixes build with clang/libc++ 20+ + +Upstream-Status: Submitted [https://jira.mariadb.org/browse/MDEV-35040] +Signed-off-by: Khem Raj +--- + extra/mariabackup/backup_copy.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/extra/mariabackup/backup_copy.cc b/extra/mariabackup/backup_copy.cc +index a328f5e0ec7..2ab04b78bce 100644 +--- a/extra/mariabackup/backup_copy.cc ++++ b/extra/mariabackup/backup_copy.cc +@@ -1641,7 +1641,7 @@ is_aria_log_dir_file(const datadir_node_t &node) + bool + copy_back_aria_logs(const char *dstdir) + { +- std::unique_ptr ++ std::unique_ptr> + ds_ctxt_aria_log_dir_path(ds_create(dstdir, DS_TYPE_LOCAL), ds_destroy); + + datadir_node_t node; diff --git a/sources/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0003-configure.ac-bypass-autoconf-2.69-version-check.patch b/sources/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0003-configure.ac-bypass-autoconf-2.69-version-check.patch index f7890419..0388bc1b 100644 --- a/sources/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0003-configure.ac-bypass-autoconf-2.69-version-check.patch +++ b/sources/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0003-configure.ac-bypass-autoconf-2.69-version-check.patch @@ -13,12 +13,12 @@ Signed-off-by: Yi Fan Yu 1 file changed, 4 deletions(-) diff --git a/configure.ac b/configure.ac -index d707a0a..8895a3d 100644 +index df61ab4..b795f8c 100644 --- a/configure.ac +++ b/configure.ac @@ -19,10 +19,6 @@ m4_pattern_forbid(^PGAC_)dnl to catch undefined macros - AC_INIT([PostgreSQL], [16.9], [pgsql-bugs@lists.postgresql.org], [], [https://www.postgresql.org/]) + AC_INIT([PostgreSQL], [16.5], [pgsql-bugs@lists.postgresql.org], [], [https://www.postgresql.org/]) -m4_if(m4_defn([m4_PACKAGE_VERSION]), [2.69], [], [m4_fatal([Autoconf version 2.69 is required. -Untested combinations of 'autoconf' and PostgreSQL versions are not diff --git a/sources/meta-openembedded/meta-oe/recipes-dbs/postgresql/postgresql.inc b/sources/meta-openembedded/meta-oe/recipes-dbs/postgresql/postgresql.inc index 5e0c0edf..4fc2e47b 100644 --- a/sources/meta-openembedded/meta-oe/recipes-dbs/postgresql/postgresql.inc +++ b/sources/meta-openembedded/meta-oe/recipes-dbs/postgresql/postgresql.inc @@ -19,7 +19,7 @@ DESCRIPTION = "\ " HOMEPAGE = "http://www.postgresql.com" LICENSE = "0BSD" -DEPENDS = "libnsl2 readline tzcode-native perl" +DEPENDS = "libnsl2 tzcode-native perl" ARM_INSTRUCTION_SET = "arm" @@ -55,7 +55,7 @@ pkg_postinst:${PN} () { PACKAGECONFIG ??= " \ ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd', d)} \ - openssl python uuid libxml tcl perl zlib icu \ + openssl python uuid libxml tcl perl zlib icu readline \ " PACKAGECONFIG[tcl] = "--with-tcl --with-tclconfig=${STAGING_BINDIR_CROSS},--without-tcl,tcl tcl-native," PACKAGECONFIG[perl] = "--with-perl,--without-perl,perl,perl" @@ -71,6 +71,7 @@ PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib" PACKAGECONFIG[lz4] = "--with-lz4,--without-lz4,lz4" PACKAGECONFIG[openssl] = "--with-ssl=openssl,ac_cv_file__dev_urandom=yes,openssl" PACKAGECONFIG[icu] = "--with-icu,--without-icu,icu,icu" +PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline" EXTRA_OECONF += "--enable-thread-safety --disable-rpath \ --datadir=${datadir}/${BPN} \ @@ -204,24 +205,24 @@ do_install:append() { # install dirs and server init install -d ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/${BPN}.init ${D}${sysconfdir}/init.d/${BPN}-server + install -m 0755 ${UNPACKDIR}/${BPN}.init ${D}${sysconfdir}/init.d/${BPN}-server sed -i -e "s/^PGVERSION=.*$/PGVERSION=${PV}/g" ${D}${sysconfdir}/init.d/${BPN}-server - install -m 0755 ${WORKDIR}/${BPN}-setup ${D}${bindir}/${BPN}-setup + install -m 0755 ${UNPACKDIR}/${BPN}-setup ${D}${bindir}/${BPN}-setup install -d -m 700 ${D}${localstatedir}/lib/${BPN}/data install -d -m 700 ${D}${localstatedir}/lib/${BPN}/backups - install -m 644 ${WORKDIR}/${BPN}-profile ${D}${localstatedir}/lib/${BPN}/.profile + install -m 644 ${UNPACKDIR}/${BPN}-profile ${D}${localstatedir}/lib/${BPN}/.profile chown -R postgres:postgres ${D}${localstatedir}/lib/${BPN} # multiple server config directory install -d -m 700 ${D}${sysconfdir}/default/${BPN} if ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'true', 'false', d)}; then install -d ${D}${sysconfdir}/pam.d - install -m 644 ${WORKDIR}/postgresql.pam ${D}${sysconfdir}/pam.d/postgresql + install -m 644 ${UNPACKDIR}/postgresql.pam ${D}${sysconfdir}/pam.d/postgresql fi # Install systemd unit files install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/postgresql.service ${D}${systemd_unitdir}/system + install -m 0644 ${UNPACKDIR}/postgresql.service ${D}${systemd_unitdir}/system sed -i -e 's,@BINDIR@,${bindir},g' \ ${D}${systemd_unitdir}/system/postgresql.service # Remove the build path diff --git a/sources/meta-openembedded/meta-oe/recipes-dbs/postgresql/postgresql_16.5.bb b/sources/meta-openembedded/meta-oe/recipes-dbs/postgresql/postgresql_16.5.bb new file mode 100644 index 00000000..76498375 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-dbs/postgresql/postgresql_16.5.bb @@ -0,0 +1,16 @@ +require postgresql.inc + +LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=89afbb2d7716371015101c2b2cb4297a" + +SRC_URI += "\ + file://not-check-libperl.patch \ + file://0001-Add-support-for-RISC-V.patch \ + file://0002-Improve-reproducibility.patch \ + file://0003-configure.ac-bypass-autoconf-2.69-version-check.patch \ + file://0004-config_info.c-not-expose-build-info.patch \ + file://0005-postgresql-fix-ptest-failure-of-sysviews.patch \ +" + +SRC_URI[sha256sum] = "a6cbbb7037f98cb8afa7d3970b7c48040cf02b115e39253a0c037a8bb8e778f0" + +CVE_STATUS[CVE-2017-8806] = "not-applicable-config: Ddoesn't apply to out configuration of postgresql so we can safely ignore it." diff --git a/sources/meta-openembedded/meta-oe/recipes-dbs/postgresql/postgresql_16.9.bb b/sources/meta-openembedded/meta-oe/recipes-dbs/postgresql/postgresql_16.9.bb deleted file mode 100644 index a1b80a5a..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-dbs/postgresql/postgresql_16.9.bb +++ /dev/null @@ -1,16 +0,0 @@ -require postgresql.inc - -LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=d5dd73e90ee1a572679460ee67233fcc" - -SRC_URI += "\ - file://not-check-libperl.patch \ - file://0001-Add-support-for-RISC-V.patch \ - file://0002-Improve-reproducibility.patch \ - file://0003-configure.ac-bypass-autoconf-2.69-version-check.patch \ - file://0004-config_info.c-not-expose-build-info.patch \ - file://0005-postgresql-fix-ptest-failure-of-sysviews.patch \ -" - -SRC_URI[sha256sum] = "07c00fb824df0a0c295f249f44691b86e3266753b380c96f633c3311e10bd005" - -CVE_STATUS[CVE-2017-8806] = "not-applicable-config: Ddoesn't apply to out configuration of postgresql so we can safely ignore it." diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-absl-always-use-asm-sgidefs.h.patch b/sources/meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-absl-always-use-asm-sgidefs.h.patch index 5242b29e..6fecf256 100644 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-absl-always-use-asm-sgidefs.h.patch +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-absl-always-use-asm-sgidefs.h.patch @@ -1,7 +1,7 @@ -From 738549dea7a4e6c462a79962c414eaa450c2cffd Mon Sep 17 00:00:00 2001 +From 11faa06436fdeb0c9948080a11f9a99d3b5ba16c Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 9 Apr 2020 13:06:27 -0700 -Subject: [PATCH 1/3] absl: always use +Subject: [PATCH] absl: always use Fixes mips/musl build, since sgidefs.h is not present on all C libraries but on linux asm/sgidefs.h is there and contains same definitions, using @@ -10,13 +10,12 @@ that makes it portable. Upstream-Status: Pending Signed-off-by: Khem Raj - --- absl/base/internal/direct_mmap.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/absl/base/internal/direct_mmap.h b/absl/base/internal/direct_mmap.h -index e492bb0..c8a4fba 100644 +index 1beb2ee4..140b0697 100644 --- a/absl/base/internal/direct_mmap.h +++ b/absl/base/internal/direct_mmap.h @@ -41,13 +41,9 @@ diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0002-Remove-maes-option-from-cross-compilation.patch b/sources/meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0002-Remove-maes-option-from-cross-compilation.patch index b92a4875..d49e860f 100644 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0002-Remove-maes-option-from-cross-compilation.patch +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0002-Remove-maes-option-from-cross-compilation.patch @@ -1,20 +1,19 @@ -From d25cf3b9aa873595a19e197cc29ab46c0093bff1 Mon Sep 17 00:00:00 2001 +From a573ccd57e713486e7d8e782d6b3b34fde01ff9e Mon Sep 17 00:00:00 2001 From: Sinan Kaya Date: Mon, 3 Feb 2020 03:25:57 +0000 -Subject: [PATCH 2/3] Remove maes option from cross-compilation +Subject: [PATCH] Remove maes option from cross-compilation ---- Upstream-Status: Pending - +--- absl/copts/GENERATED_AbseilCopts.cmake | 4 ---- absl/copts/GENERATED_copts.bzl | 4 ---- 2 files changed, 8 deletions(-) diff --git a/absl/copts/GENERATED_AbseilCopts.cmake b/absl/copts/GENERATED_AbseilCopts.cmake -index a4ab1aa2041e..23b9253c1f00 100644 +index da2282fe..5e0e8dfd 100644 --- a/absl/copts/GENERATED_AbseilCopts.cmake +++ b/absl/copts/GENERATED_AbseilCopts.cmake -@@ -158,7 +158,3 @@ list(APPEND ABSL_RANDOM_HWAES_ARM64_FLAGS +@@ -229,7 +229,3 @@ list(APPEND ABSL_RANDOM_HWAES_ARM64_FLAGS list(APPEND ABSL_RANDOM_HWAES_MSVC_X64_FLAGS ) @@ -23,10 +22,10 @@ index a4ab1aa2041e..23b9253c1f00 100644 - "-msse4.1" -) diff --git a/absl/copts/GENERATED_copts.bzl b/absl/copts/GENERATED_copts.bzl -index a6efc98e11d4..1e847f769501 100644 +index b9e0071e..0072008c 100644 --- a/absl/copts/GENERATED_copts.bzl +++ b/absl/copts/GENERATED_copts.bzl -@@ -159,7 +159,3 @@ ABSL_RANDOM_HWAES_ARM64_FLAGS = [ +@@ -230,7 +230,3 @@ ABSL_RANDOM_HWAES_ARM64_FLAGS = [ ABSL_RANDOM_HWAES_MSVC_X64_FLAGS = [ ] @@ -35,5 +34,5 @@ index a6efc98e11d4..1e847f769501 100644 - "-msse4.1", -] -- -2.36.1 +2.25.1 diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0003-Remove-neon-option-from-cross-compilation.patch b/sources/meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0003-Remove-neon-option-from-cross-compilation.patch index 1a80a428..c82b9e1b 100644 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0003-Remove-neon-option-from-cross-compilation.patch +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0003-Remove-neon-option-from-cross-compilation.patch @@ -1,24 +1,24 @@ -From fb24c3e3539b5743d398a429a302a3886186f261 Mon Sep 17 00:00:00 2001 +From 632632508daf8bb3a5800dac937ffc33c6d85973 Mon Sep 17 00:00:00 2001 From: Jonas Gorski Date: Thu, 16 Jun 2022 11:46:31 +0000 -Subject: [PATCH 3/3] Remove neon option from cross compilation +Subject: [PATCH] Remove neon option from cross compilation Not every arm platform supports neon instructions, so do not enforce them. -Signed-off-by: Jonas Gorski ---- Upstream-Status: Pending +Signed-off-by: Jonas Gorski +--- absl/copts/GENERATED_AbseilCopts.cmake | 4 ---- absl/copts/GENERATED_copts.bzl | 4 ---- 2 files changed, 8 deletions(-) diff --git a/absl/copts/GENERATED_AbseilCopts.cmake b/absl/copts/GENERATED_AbseilCopts.cmake -index 23b9253c1f00..5d112a97f3e4 100644 +index 5e0e8dfd..57cfc4d3 100644 --- a/absl/copts/GENERATED_AbseilCopts.cmake +++ b/absl/copts/GENERATED_AbseilCopts.cmake -@@ -147,10 +147,6 @@ list(APPEND ABSL_MSVC_TEST_FLAGS +@@ -218,10 +218,6 @@ list(APPEND ABSL_MSVC_TEST_FLAGS "/DNOMINMAX" ) @@ -30,10 +30,10 @@ index 23b9253c1f00..5d112a97f3e4 100644 "-march=armv8-a+crypto" ) diff --git a/absl/copts/GENERATED_copts.bzl b/absl/copts/GENERATED_copts.bzl -index 1e847f769501..3e10db204faf 100644 +index 0072008c..72840fda 100644 --- a/absl/copts/GENERATED_copts.bzl +++ b/absl/copts/GENERATED_copts.bzl -@@ -148,10 +148,6 @@ ABSL_MSVC_TEST_FLAGS = [ +@@ -219,10 +219,6 @@ ABSL_MSVC_TEST_FLAGS = [ "/DNOMINMAX", ] @@ -45,5 +45,5 @@ index 1e847f769501..3e10db204faf 100644 "-march=armv8-a+crypto", ] -- -2.36.1 +2.25.1 diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0004-PR-1644-unscaledcycleclock-remove-RISC-V-support.patch b/sources/meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0004-PR-1644-unscaledcycleclock-remove-RISC-V-support.patch deleted file mode 100644 index 461df7a6..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0004-PR-1644-unscaledcycleclock-remove-RISC-V-support.patch +++ /dev/null @@ -1,82 +0,0 @@ -From 7335a36d0b5c1c597566f9aa3f458a5b6817c3b4 Mon Sep 17 00:00:00 2001 -From: aurel32 -Date: Fri, 22 Mar 2024 14:21:13 -0700 -Subject: [PATCH] PR #1644: unscaledcycleclock: remove RISC-V support - -Imported from GitHub PR https://github.com/abseil/abseil-cpp/pull/1644 - -Starting with Linux 6.6 [1], RDCYCLE is a privileged instruction on RISC-V and can't be used directly from userland. There is a sysctl option to change that as a transition period, but it will eventually disappear. - -The RDTIME instruction is another less accurate alternative, however its frequency varies from board to board, and there is currently now way to get its frequency from userland [2]. - -Therefore this patch just removes the code for unscaledcycleclock on RISC-V. Without processor specific implementation, abseil relies on std::chrono::steady_clock::now().time_since_epoch() which is basically a wrapper around clock_gettime (CLOCK_MONOTONIC), which in turns use __vdso_clock_gettime(). On RISC-V this VDSO is just a wrapper around RDTIME correctly scaled to use nanoseconds units. - -This fixes the testsuite on riscv64, tested on a VisionFive 2 board. - -[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cc4c07c89aada16229084eeb93895c95b7eabaa3 -[2] https://github.com/abseil/abseil-cpp/pull/1631 -Merge 43356a2548cfde76e164d446cb69004b488c6a71 into 76f8011beabdaee872b5fde7546e02407b220cb1 - -Merging this change closes #1644 - -COPYBARA_INTEGRATE_REVIEW=https://github.com/abseil/abseil-cpp/pull/1644 from aurel32:rv64-no-unscaledcycleclock 43356a2548cfde76e164d446cb69004b488c6a71 -PiperOrigin-RevId: 618286262 -Change-Id: Ie4120a727e7d0bb185df6e06ea145c780ebe6652 - -Upstream-Status: Backport [https://github.com/abseil/abseil-cpp/commit/7335a36d] -[Adapted to apply on top of meta-oe's patch stack] -Signed-off-by: Scott Murray ---- - absl/base/internal/unscaledcycleclock.cc | 12 ------------ - absl/base/internal/unscaledcycleclock_config.h | 5 ++--- - 2 files changed, 2 insertions(+), 15 deletions(-) - -diff --git a/absl/base/internal/unscaledcycleclock.cc b/absl/base/internal/unscaledcycleclock.cc -index f11fecb3..103b4f6a 100644 ---- a/absl/base/internal/unscaledcycleclock.cc -+++ b/absl/base/internal/unscaledcycleclock.cc -@@ -121,18 +121,6 @@ double UnscaledCycleClock::Frequency() { - return aarch64_timer_frequency; - } - --#elif defined(__riscv) -- --int64_t UnscaledCycleClock::Now() { -- int64_t virtual_timer_value; -- asm volatile("rdcycle %0" : "=r"(virtual_timer_value)); -- return virtual_timer_value; --} -- --double UnscaledCycleClock::Frequency() { -- return base_internal::NominalCPUFrequency(); --} -- - #elif defined(_M_IX86) || defined(_M_X64) - - #pragma intrinsic(__rdtsc) -diff --git a/absl/base/internal/unscaledcycleclock_config.h b/absl/base/internal/unscaledcycleclock_config.h -index 5e232c1a..83552fc5 100644 ---- a/absl/base/internal/unscaledcycleclock_config.h -+++ b/absl/base/internal/unscaledcycleclock_config.h -@@ -22,7 +22,6 @@ - // The following platforms have an implementation of a hardware counter. - #if defined(__i386__) || defined(__x86_64__) || defined(__aarch64__) || \ - ((defined(__powerpc__) || defined(__ppc__)) && defined(__GLIBC__)) || \ -- defined(__riscv) || \ - defined(_M_IX86) || (defined(_M_X64) && !defined(_M_ARM64EC)) - #define ABSL_HAVE_UNSCALED_CYCLECLOCK_IMPLEMENTATION 1 - #else -@@ -54,8 +53,8 @@ - #if ABSL_USE_UNSCALED_CYCLECLOCK - // This macro can be used to test if UnscaledCycleClock::Frequency() - // is NominalCPUFrequency() on a particular platform. --#if (defined(__i386__) || defined(__x86_64__) || defined(__riscv) || \ -- defined(_M_IX86) || defined(_M_X64)) -+#if (defined(__i386__) || defined(__x86_64__) || defined(_M_IX86) || \ -+ defined(_M_X64)) - #define ABSL_INTERNAL_UNSCALED_CYCLECLOCK_FREQUENCY_IS_CPU_FREQUENCY - #endif - #endif --- -2.44.0 - diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0004-abseil-ppc-fixes.patch b/sources/meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0004-abseil-ppc-fixes.patch new file mode 100644 index 00000000..ba0cd669 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0004-abseil-ppc-fixes.patch @@ -0,0 +1,103 @@ +From f9607924225ca59fb6c60222e6424b84e6f70029 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 21 Sep 2024 20:53:06 +0800 +Subject: [PATCH] abseil: ppc fixes + +An all-in-one patch that fixes several issues: + +1) UnscaledCycleClock not fully implemented for ppc*-musl (disabled on musl) +2) powerpc stacktrace implementation only works on glibc (disabled on musl) +3) powerpc stacktrace implementation has ppc64 assumptions (fixed) +4) examine_stack.cpp makes glibc assumptions on powerpc (fixed) + +Sourced from void linux + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + absl/base/internal/unscaledcycleclock.cc | 4 ++-- + absl/base/internal/unscaledcycleclock_config.h | 3 ++- + absl/debugging/internal/examine_stack.cc | 8 +++++++- + absl/debugging/internal/stacktrace_config.h | 2 +- + 4 files changed, 12 insertions(+), 5 deletions(-) + +diff --git a/absl/base/internal/unscaledcycleclock.cc b/absl/base/internal/unscaledcycleclock.cc +index a0bf3a65..103b4f6a 100644 +--- a/absl/base/internal/unscaledcycleclock.cc ++++ b/absl/base/internal/unscaledcycleclock.cc +@@ -20,7 +20,7 @@ + #include + #endif + +-#if defined(__powerpc__) || defined(__ppc__) ++#if (defined(__powerpc__) || defined(__ppc__)) && defined(__GLIBC__) + #ifdef __GLIBC__ + #include + #elif defined(__FreeBSD__) +@@ -58,7 +58,7 @@ double UnscaledCycleClock::Frequency() { + return base_internal::NominalCPUFrequency(); + } + +-#elif defined(__powerpc__) || defined(__ppc__) ++#elif (defined(__powerpc__) || defined(__ppc__)) && defined(__GLIBC__) + + int64_t UnscaledCycleClock::Now() { + #ifdef __GLIBC__ +diff --git a/absl/base/internal/unscaledcycleclock_config.h b/absl/base/internal/unscaledcycleclock_config.h +index 43a3dabe..196a8535 100644 +--- a/absl/base/internal/unscaledcycleclock_config.h ++++ b/absl/base/internal/unscaledcycleclock_config.h +@@ -21,7 +21,8 @@ + + // The following platforms have an implementation of a hardware counter. + #if defined(__i386__) || defined(__x86_64__) || defined(__aarch64__) || \ +- defined(__powerpc__) || defined(__ppc__) || defined(_M_IX86) || \ ++ ((defined(__powerpc__) || defined(__ppc__)) && defined(__GLIBC__)) || \ ++ defined(_M_IX86) || \ + (defined(_M_X64) && !defined(_M_ARM64EC)) + #define ABSL_HAVE_UNSCALED_CYCLECLOCK_IMPLEMENTATION 1 + #else +diff --git a/absl/debugging/internal/examine_stack.cc b/absl/debugging/internal/examine_stack.cc +index 3dd6ba1a..f923b055 100644 +--- a/absl/debugging/internal/examine_stack.cc ++++ b/absl/debugging/internal/examine_stack.cc +@@ -36,6 +36,10 @@ + #include + #include + ++#if defined(__powerpc__) ++#include ++#endif ++ + #include "absl/base/attributes.h" + #include "absl/base/internal/raw_logging.h" + #include "absl/base/macros.h" +@@ -177,8 +181,10 @@ void* GetProgramCounter(void* const vuc) { + return reinterpret_cast(context->uc_mcontext.pc); + #elif defined(__powerpc64__) + return reinterpret_cast(context->uc_mcontext.gp_regs[32]); +-#elif defined(__powerpc__) ++#elif defined(__powerpc__) && defined(__GLIBC__) + return reinterpret_cast(context->uc_mcontext.uc_regs->gregs[32]); ++#elif defined(__powerpc__) ++ return reinterpret_cast((context->uc_regs)->gregs[32]); + #elif defined(__riscv) + return reinterpret_cast(context->uc_mcontext.__gregs[REG_PC]); + #elif defined(__s390__) && !defined(__s390x__) +diff --git a/absl/debugging/internal/stacktrace_config.h b/absl/debugging/internal/stacktrace_config.h +index 3929b1b7..23d5e504 100644 +--- a/absl/debugging/internal/stacktrace_config.h ++++ b/absl/debugging/internal/stacktrace_config.h +@@ -60,7 +60,7 @@ + #elif defined(__i386__) || defined(__x86_64__) + #define ABSL_STACKTRACE_INL_HEADER \ + "absl/debugging/internal/stacktrace_x86-inl.inc" +-#elif defined(__ppc__) || defined(__PPC__) ++#elif (defined(__ppc__) || defined(__PPC__)) && defined(__GLIBC__) + #define ABSL_STACKTRACE_INL_HEADER \ + "absl/debugging/internal/stacktrace_powerpc-inl.inc" + #elif defined(__aarch64__) +-- +2.25.1 + diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0005-Don-t-match-Wnon-virtual-dtor-in-the-flags-are-neede.patch b/sources/meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0005-Don-t-match-Wnon-virtual-dtor-in-the-flags-are-neede.patch new file mode 100644 index 00000000..9a4fc0b4 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0005-Don-t-match-Wnon-virtual-dtor-in-the-flags-are-neede.patch @@ -0,0 +1,30 @@ +From 9cb5e5d15c142e5cc43a2c1db87c8e4e5b6d38a5 Mon Sep 17 00:00:00 2001 +From: Derek Mauro +Date: Mon, 5 Aug 2024 07:35:05 -0700 +Subject: [PATCH] Don't match -Wnon-virtual-dtor in the "flags are needed to + suppress warnings in headers". It should fall through to the "don't impose + our warnings on others" case. Do this by matching on "-Wno-*" instead of + "-Wno*". + +Fixes #1737 + +PiperOrigin-RevId: 659548798 +Change-Id: I49d7ba7ddcd7be30f946fca90ba9be467181e854 +Upstream-Status: Backport [https://github.com/abseil/abseil-cpp/commit/9cb5e5d15c142e5cc43a2c1db87c8e4e5b6d38a5] +--- + CMake/AbseilHelpers.cmake | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMake/AbseilHelpers.cmake b/CMake/AbseilHelpers.cmake +index b177e590..3c4c92fe 100644 +--- a/CMake/AbseilHelpers.cmake ++++ b/CMake/AbseilHelpers.cmake +@@ -195,7 +195,7 @@ function(absl_cc_library) + # specified platform. Filter both of them out before the successor + # reaches the "^-m" filter. + set(skip_next_cflag ON) +- elseif(${cflag} MATCHES "^(-Wno|/wd)") ++ elseif(${cflag} MATCHES "^(-Wno-|/wd)") + # These flags are needed to suppress warnings that might fire in our headers. + set(PC_CFLAGS "${PC_CFLAGS} ${cflag}") + elseif(${cflag} MATCHES "^(-W|/w[1234eo])") diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/abseil-ppc-fixes.patch b/sources/meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/abseil-ppc-fixes.patch deleted file mode 100644 index f2ebd9f0..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/abseil-ppc-fixes.patch +++ /dev/null @@ -1,81 +0,0 @@ -Upstream-Status: Pending - -An all-in-one patch that fixes several issues: - -1) UnscaledCycleClock not fully implemented for ppc*-musl (disabled on musl) -2) powerpc stacktrace implementation only works on glibc (disabled on musl) -3) powerpc stacktrace implementation has ppc64 assumptions (fixed) -4) examine_stack.cpp makes glibc assumptions on powerpc (fixed) - -Sourced from void linux - -Signed-off-by: Khem Raj - ---- a/absl/base/internal/unscaledcycleclock.cc -+++ b/absl/base/internal/unscaledcycleclock.cc -@@ -20,7 +20,7 @@ - #include - #endif - --#if defined(__powerpc__) || defined(__ppc__) -+#if (defined(__powerpc__) || defined(__ppc__)) && defined(__GLIBC__) - #ifdef __GLIBC__ - #include - #elif defined(__FreeBSD__) -@@ -58,7 +58,7 @@ double UnscaledCycleClock::Frequency() { - return base_internal::NominalCPUFrequency(); - } - --#elif defined(__powerpc__) || defined(__ppc__) -+#elif (defined(__powerpc__) || defined(__ppc__)) && defined(__GLIBC__) - - int64_t UnscaledCycleClock::Now() { - #ifdef __GLIBC__ ---- a/absl/base/internal/unscaledcycleclock_config.h -+++ b/absl/base/internal/unscaledcycleclock_config.h -@@ -21,7 +21,8 @@ - - // The following platforms have an implementation of a hardware counter. - #if defined(__i386__) || defined(__x86_64__) || defined(__aarch64__) || \ -- defined(__powerpc__) || defined(__ppc__) || defined(__riscv) || \ -+ ((defined(__powerpc__) || defined(__ppc__)) && defined(__GLIBC__)) || \ -+ defined(__riscv) || \ - defined(_M_IX86) || (defined(_M_X64) && !defined(_M_ARM64EC)) - #define ABSL_HAVE_UNSCALED_CYCLECLOCK_IMPLEMENTATION 1 - #else ---- a/absl/debugging/internal/examine_stack.cc -+++ b/absl/debugging/internal/examine_stack.cc -@@ -33,6 +33,10 @@ - #include - #include - -+#if defined(__powerpc__) -+#include -+#endif -+ - #include "absl/base/attributes.h" - #include "absl/base/internal/raw_logging.h" - #include "absl/base/macros.h" -@@ -174,8 +178,10 @@ void* GetProgramCounter(void* const vuc) { - return reinterpret_cast(context->uc_mcontext.pc); - #elif defined(__powerpc64__) - return reinterpret_cast(context->uc_mcontext.gp_regs[32]); --#elif defined(__powerpc__) -+#elif defined(__powerpc__) && defined(__GLIBC__) - return reinterpret_cast(context->uc_mcontext.uc_regs->gregs[32]); -+#elif defined(__powerpc__) -+ return reinterpret_cast((context->uc_regs)->gregs[32]); - #elif defined(__riscv) - return reinterpret_cast(context->uc_mcontext.__gregs[REG_PC]); - #elif defined(__s390__) && !defined(__s390x__) ---- a/absl/debugging/internal/stacktrace_config.h -+++ b/absl/debugging/internal/stacktrace_config.h -@@ -60,7 +60,7 @@ - #elif defined(__i386__) || defined(__x86_64__) - #define ABSL_STACKTRACE_INL_HEADER \ - "absl/debugging/internal/stacktrace_x86-inl.inc" --#elif defined(__ppc__) || defined(__PPC__) -+#elif (defined(__ppc__) || defined(__PPC__)) && defined(__GLIBC__) - #define ABSL_STACKTRACE_INL_HEADER \ - "absl/debugging/internal/stacktrace_powerpc-inl.inc" - #elif defined(__aarch64__) diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_20240116.3.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_20240116.3.bb deleted file mode 100644 index 11f4f3f9..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_20240116.3.bb +++ /dev/null @@ -1,54 +0,0 @@ -SUMMARY = "Abseil is a cpp library like STL" -DESCRIPTION = "Abseil provides pieces missing from the C++ standard. Contains \ -additional useful libraries like algorithm, container, debugging, hash, memory, \ -meta, numeric, strings, synchronization, time, types and utility." -HOMEPAGE = "https://abseil.io/" -SECTION = "libs" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=df52c6edb7adc22e533b2bacc3bd3915" - -SRCREV = "54fac219c4ef0bc379dfffb0b8098725d77ac81b" -BRANCH = "lts_2024_01_16" -SRC_URI = "git://github.com/abseil/abseil-cpp;branch=${BRANCH};protocol=https \ - file://0001-absl-always-use-asm-sgidefs.h.patch \ - file://0002-Remove-maes-option-from-cross-compilation.patch \ - file://abseil-ppc-fixes.patch \ - file://0003-Remove-neon-option-from-cross-compilation.patch \ - file://0004-PR-1644-unscaledcycleclock-remove-RISC-V-support.patch \ - " - -S = "${WORKDIR}/git" - -inherit cmake - -EXTRA_OECMAKE = "-DBUILD_SHARED_LIBS=ON \ - -DBUILD_TESTING=OFF \ - -DABSL_ENABLE_INSTALL=ON \ - " - -SYSROOT_DIRS:append:class-nativesdk:mingw32 = " ${bindir}" - -PACKAGES_DYNAMIC = "^libabsl-*" -PACKAGES_DYNAMIC:class-native = "" - -PACKAGESPLITFUNCS =+ "split_dynamic_packages" - -python split_dynamic_packages() { - libdir = d.getVar('libdir') - - libpackages = do_split_packages( - d, - root=libdir, - file_regex=r'^libabsl_(.*)\.so\..*$', - output_pattern='libabsl-%s', - description="abseil shared library %s", - prepend=True, - extra_depends='', - ) - if libpackages: - d.appendVar('RDEPENDS:' + d.getVar('PN'), ' ' + ' '.join(libpackages)) -} - -ALLOW_EMPTY:${PN} = "1" - -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_20240722.0.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_20240722.0.bb new file mode 100644 index 00000000..d9634b2b --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_20240722.0.bb @@ -0,0 +1,54 @@ +SUMMARY = "Abseil is a cpp library like STL" +DESCRIPTION = "Abseil provides pieces missing from the C++ standard. Contains \ +additional useful libraries like algorithm, container, debugging, hash, memory, \ +meta, numeric, strings, synchronization, time, types and utility." +HOMEPAGE = "https://abseil.io/" +SECTION = "libs" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=df52c6edb7adc22e533b2bacc3bd3915" + +SRCREV = "4447c7562e3bc702ade25105912dce503f0c4010" +BRANCH = "lts_2024_07_22" +SRC_URI = "git://github.com/abseil/abseil-cpp;branch=${BRANCH};protocol=https \ + file://0001-absl-always-use-asm-sgidefs.h.patch \ + file://0002-Remove-maes-option-from-cross-compilation.patch \ + file://0003-Remove-neon-option-from-cross-compilation.patch \ + file://0004-abseil-ppc-fixes.patch \ + file://0005-Don-t-match-Wnon-virtual-dtor-in-the-flags-are-neede.patch \ + " + +S = "${WORKDIR}/git" + +inherit cmake + +EXTRA_OECMAKE = "-DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DABSL_ENABLE_INSTALL=ON \ + " + +SYSROOT_DIRS:append:class-nativesdk:mingw32 = " ${bindir}" + +PACKAGES_DYNAMIC = "^libabsl-*" +PACKAGES_DYNAMIC:class-native = "" + +PACKAGESPLITFUNCS =+ "split_dynamic_packages" + +python split_dynamic_packages() { + libdir = d.getVar('libdir') + + libpackages = do_split_packages( + d, + root=libdir, + file_regex=r'^libabsl_(.*)\.so\..*$', + output_pattern='libabsl-%s', + description="abseil shared library %s", + prepend=True, + extra_depends='', + ) + if libpackages: + d.appendVar('RDEPENDS:' + d.getVar('PN'), ' ' + ' '.join(libpackages)) +} + +ALLOW_EMPTY:${PN} = "1" + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/android-tools/android-tools-conf-configfs_1.0.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/android-tools/android-tools-conf-configfs_1.0.bb index 3f9d49a2..a91229f9 100644 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/android-tools/android-tools-conf-configfs_1.0.bb +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/android-tools/android-tools-conf-configfs_1.0.bb @@ -3,6 +3,9 @@ SECTION = "console/utils" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" + SRC_URI = " \ file://android-gadget-setup \ file://android-gadget-start \ @@ -14,17 +17,17 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" do_install() { install -d ${D}${bindir} - install -m 0755 ${WORKDIR}/android-gadget-setup ${D}${bindir} - install -m 0755 ${WORKDIR}/android-gadget-start ${D}${bindir} - install -m 0755 ${WORKDIR}/android-gadget-cleanup ${D}${bindir} + install -m 0755 ${UNPACKDIR}/android-gadget-setup ${D}${bindir} + install -m 0755 ${UNPACKDIR}/android-gadget-start ${D}${bindir} + install -m 0755 ${UNPACKDIR}/android-gadget-cleanup ${D}${bindir} - if [ -r ${WORKDIR}/android-gadget-setup.machine ] ; then + if [ -r ${UNPACKDIR}/android-gadget-setup.machine ] ; then install -d ${D}${sysconfdir} - install -m 0644 ${WORKDIR}/android-gadget-setup.machine ${D}${sysconfdir} + install -m 0644 ${UNPACKDIR}/android-gadget-setup.machine ${D}${sysconfdir} fi install -d ${D}${systemd_unitdir}/system/android-tools-adbd.service.d - install -m 0644 ${WORKDIR}/10-adbd-configfs.conf ${D}${systemd_unitdir}/system/android-tools-adbd.service.d + install -m 0644 ${UNPACKDIR}/10-adbd-configfs.conf ${D}${systemd_unitdir}/system/android-tools-adbd.service.d } FILES:${PN} += " \ diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/android-tools/android-tools-conf_1.0.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/android-tools/android-tools-conf_1.0.bb index 34b1a9bd..abf21803 100644 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/android-tools/android-tools-conf_1.0.bb +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/android-tools/android-tools-conf_1.0.bb @@ -5,11 +5,14 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda SRC_URI = "file://android-gadget-setup" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" + PACKAGE_ARCH = "${MACHINE_ARCH}" do_install() { install -d ${D}${bindir} - install -m 0755 ${WORKDIR}/android-gadget-setup ${D}${bindir} + install -m 0755 ${UNPACKDIR}/android-gadget-setup ${D}${bindir} } python () { diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/android-tools/android-tools/core/adb_libssl_11.diff b/sources/meta-openembedded/meta-oe/recipes-devtools/android-tools/android-tools/core/adb_libssl_11.diff index 177d69a9..ddb41ea4 100644 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/android-tools/android-tools/core/adb_libssl_11.diff +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/android-tools/android-tools/core/adb_libssl_11.diff @@ -17,9 +17,10 @@ Upstream-Status: Pending +++ b/adb/adb_auth_host.c @@ -75,6 +75,7 @@ static int RSA_to_RSAPublicKey(RSA *rsa, BIGNUM* rem = BN_new(); - BIGNUM* n = BN_new(); +- BIGNUM* n = BN_new(); ++ const BIGNUM* n; BIGNUM* n0inv = BN_new(); -+ BIGNUM* e = BN_new(); ++ const BIGNUM* e; if (RSA_size(rsa) != RSANUMBYTES) { ret = 0; @@ -32,7 +33,7 @@ Upstream-Status: Pending BN_set_bit(r, RSANUMWORDS * 32); BN_mod_sqr(rr, r, n, ctx); BN_div(NULL, rem, n, r32, ctx); -@@ -96,7 +97,7 @@ static int RSA_to_RSAPublicKey(RSA *rsa, +@@ -96,11 +97,10 @@ static int RSA_to_RSAPublicKey(RSA *rsa, BN_div(n, rem, n, r32, ctx); pkey->n[i] = BN_get_word(rem); } @@ -41,3 +42,7 @@ Upstream-Status: Pending out: BN_free(n0inv); +- BN_free(n); + BN_free(rem); + BN_free(r); + BN_free(rr); diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/android-tools/android-tools_5.1.1.r37.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/android-tools/android-tools_5.1.1.r37.bb index 9f02d703..a291fc39 100644 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/android-tools/android-tools_5.1.1.r37.bb +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/android-tools/android-tools_5.1.1.r37.bb @@ -88,7 +88,7 @@ TOOLS:class-native = "fastboot ext4_utils mkbootimg" TOOLS:class-nativesdk = "fastboot ext4_utils mkbootimg" do_compile() { - cp ${WORKDIR}/gitignore ${S}/.gitignore + cp ${UNPACKDIR}/gitignore ${S}/.gitignore # Setting both variables below causing our makefiles to not work with # implicit make rules @@ -123,7 +123,7 @@ do_compile() { for tool in ${TOOLS}; do mkdir -p ${B}/${tool} - oe_runmake -f ${B}/${tool}.mk -C ${B}/${tool} + oe_runmake -f ${UNPACKDIR}/${BPN}/${tool}.mk -C ${B}/${tool} done } @@ -151,7 +151,7 @@ do_install() { fi # Outside the if statement to avoid errors during do_package - install -D -p -m0644 ${WORKDIR}/android-tools-adbd.service \ + install -D -p -m0644 ${UNPACKDIR}/android-tools-adbd.service \ ${D}${systemd_unitdir}/system/android-tools-adbd.service if echo ${TOOLS} | grep -q "fastboot" ; then @@ -193,3 +193,8 @@ android_tools_enable_devmode() { } ROOTFS_POSTPROCESS_COMMAND_${PN}-adbd += "${@bb.utils.contains("USB_DEBUGGING_ENABLED", "1", "android_tools_enable_devmode;", "", d)}" + +# http://errors.yoctoproject.org/Errors/Details/766881/ +# android-tools/5.1.1.r37/git/system/core/adb/adb_auth_host.c:86:23: error: passing argument 2 of 'RSA_get0_key' from incompatible pointer type [-Wincompatible-pointer-types] +# android-tools/5.1.1.r37/git/system/core/adb/adb_auth_host.c:86:27: error: passing argument 3 of 'RSA_get0_key' from incompatible pointer type [-Wincompatible-pointer-types] +CC += "-Wno-error=incompatible-pointer-types" diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/capnproto/capnproto_1.0.2.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/capnproto/capnproto_1.0.2.bb index cb4aef52..daeeb975 100644 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/capnproto/capnproto_1.0.2.bb +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/capnproto/capnproto_1.0.2.bb @@ -12,6 +12,8 @@ S = "${WORKDIR}/git/c++" inherit cmake +CVE_PRODUCT = "capnproto capnp" + CXXFLAGS:append:mips = " -latomic" CXXFLAGS:append:powerpc = " -latomic" CXXFLAGS:append:riscv32 = " -latomic" diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/cloc/cloc_1.98.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/cloc/cloc_1.98.bb index ea5f0066..acf882cc 100644 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/cloc/cloc_1.98.bb +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/cloc/cloc_1.98.bb @@ -8,6 +8,7 @@ SRC_URI = "https://github.com/AlDanial/cloc/releases/download/v${PV}/${BP}.tar.g SRC_URI[sha256sum] = "5fe0b159eb75718df7308a4f61470eaddf82170733929999e37a3fbb4651cf8a" UPSTREAM_CHECK_URI = "https://github.com/AlDanial/${BPN}/releases" +UPSTREAM_CHECK_REGEX = "(?P\d+(\.\d+)+)" do_configure[noexec] = "1" do_compile[noexec] = "1" diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/cppgenerate/cppgenerate_0.3.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/cppgenerate/cppgenerate_0.3.bb new file mode 100644 index 00000000..0d7bdc83 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/cppgenerate/cppgenerate_0.3.bb @@ -0,0 +1,14 @@ +SUMMARY = "C++ Code Generator library" +BUGTRACKER = "https://github.com/rm5248/libcppgenerate/issues" +SECTION = "libs" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=fa818a259cbed7ce8bc2a22d35a464fc" + +SRC_URI = "git://github.com/rm5248/libcppgenerate.git;branch=master;protocol=https" +SRCREV = "930c5503f76c877b72b9ff8546353d6f422bd010" + +S = "${WORKDIR}/git" + +inherit cmake + +BBCLASSEXTEND="native nativesdk" diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/cpuset/cpuset_1.6.2.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/cpuset/cpuset_1.6.2.bb new file mode 100644 index 00000000..b404d413 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/cpuset/cpuset_1.6.2.bb @@ -0,0 +1,13 @@ +SUMMARY = "Cpuset manipulation tool" +HOMEPAGE = "https://github.com/SUSE/cpuset" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" + +SRC_URI = "git://github.com/SUSE/cpuset.git;protocol=https;branch=master" + +SRCREV = "4f80263208935f0df4f616cf9d8cb7285599a670" +S = "${WORKDIR}/git" + +inherit setuptools3 + +RDEPENDS:${PN} += "python3-core python3-logging python3-pydoc" diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/ctags/ctags_6.1.20240310.0.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/ctags/ctags_6.1.20240310.0.bb deleted file mode 100644 index d4ffbb7f..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/ctags/ctags_6.1.20240310.0.bb +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright (C) 2015 Igor Santos -# Released under the MIT license (see COPYING.MIT for the terms) - -SUMMARY = "Universal Ctags" -DESCRIPTION = "Universal Ctags is a multilanguage reimplementation of the \ - Unix ctags utility. Ctags generates an index of source code \ - definitions which is used by numerous editors and utilities \ - to instantly locate the definitions." - -HOMEPAGE = "https://ctags.io/" - -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3" - -inherit autotools-brokensep pkgconfig manpages - -SRCREV = "38fd8e39b877a79666393b90e38400fd8d7d5d14" -SRC_URI = "git://github.com/universal-ctags/ctags;branch=master;protocol=https" - -S = "${WORKDIR}/git" - -PACKAGECONFIG ??= " \ - readcmd \ - xml \ - json \ - yaml \ -" -PACKAGECONFIG[readcmd] = "--enable-readcmd,--disable-readcmd" -PACKAGECONFIG[etags] = "--enable-etags,--disable-etags" -PACKAGECONFIG[xml] = "--enable-xml,--disable-xml,libxml2" -PACKAGECONFIG[json] = "--enable-json,--disable-json,jansson" -PACKAGECONFIG[seccomp] = "--enable-seccomp,--disable-seccomp,libseccomp" -PACKAGECONFIG[yaml] = "--enable-yaml,--disable-yaml,libyaml" -PACKAGECONFIG[manpages] = ",,python3-docutils-native" - -BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/ctags/ctags_6.1.20240915.0.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/ctags/ctags_6.1.20240915.0.bb new file mode 100644 index 00000000..247e1a84 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/ctags/ctags_6.1.20240915.0.bb @@ -0,0 +1,36 @@ +# Copyright (C) 2015 Igor Santos +# Released under the MIT license (see COPYING.MIT for the terms) + +SUMMARY = "Universal Ctags" +DESCRIPTION = "Universal Ctags is a multilanguage reimplementation of the \ + Unix ctags utility. Ctags generates an index of source code \ + definitions which is used by numerous editors and utilities \ + to instantly locate the definitions." + +HOMEPAGE = "https://ctags.io/" + +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3" + +inherit autotools-brokensep pkgconfig manpages + +SRCREV = "40b58618f9f0dc4123a205cbd50b73c6ab2e6f5c" +SRC_URI = "git://github.com/universal-ctags/ctags;branch=master;protocol=https" + +S = "${WORKDIR}/git" + +PACKAGECONFIG ??= " \ + readcmd \ + xml \ + json \ + yaml \ +" +PACKAGECONFIG[readcmd] = "--enable-readcmd,--disable-readcmd" +PACKAGECONFIG[etags] = "--enable-etags,--disable-etags" +PACKAGECONFIG[xml] = "--enable-xml,--disable-xml,libxml2" +PACKAGECONFIG[json] = "--enable-json,--disable-json,jansson" +PACKAGECONFIG[seccomp] = "--enable-seccomp,--disable-seccomp,libseccomp" +PACKAGECONFIG[yaml] = "--enable-yaml,--disable-yaml,libyaml" +PACKAGECONFIG[manpages] = ",,python3-docutils-native" + +BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/debootstrap/debootstrap/0001-do-not-hardcode-the-full-path-of-dpkg.patch b/sources/meta-openembedded/meta-oe/recipes-devtools/debootstrap/debootstrap/0001-do-not-hardcode-the-full-path-of-dpkg.patch deleted file mode 100644 index 2a5f2331..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/debootstrap/debootstrap/0001-do-not-hardcode-the-full-path-of-dpkg.patch +++ /dev/null @@ -1,33 +0,0 @@ -From e735fb23f46f0c3c7a1144ba6b4050bfc0015a05 Mon Sep 17 00:00:00 2001 -From: Hongxu Jia -Date: Wed, 2 Jun 2021 13:34:35 +0800 -Subject: [PATCH] do not hardcode the full path of dpkg - -While calling debootstrap in sdk, if host does not install dpkg package, -the full path calling will fail - -Do not hardcode the full path of dpkg, then then sdk's dpkg will be used. - -Upstream-Status: Inappropriate [oe specific] - -Signed-off-by: Hongxu Jia ---- - debootstrap | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/debootstrap b/debootstrap -index a3cf3af..5e96c3e 100755 ---- a/debootstrap -+++ b/debootstrap -@@ -538,7 +538,7 @@ fi - - if in_path dpkg && \ - dpkg --print-architecture >/dev/null 2>&1; then -- HOST_ARCH=$(/usr/bin/dpkg --print-architecture) -+ HOST_ARCH=$(dpkg --print-architecture) - elif in_path udpkg && \ - udpkg --print-architecture >/dev/null 2>&1; then - HOST_ARCH=$(/usr/bin/udpkg --print-architecture) --- -2.27.0 - diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/debootstrap/debootstrap/0001-support-to-override-usr-sbin-and-usr-share.patch b/sources/meta-openembedded/meta-oe/recipes-devtools/debootstrap/debootstrap/0001-support-to-override-usr-sbin-and-usr-share.patch index 12dd2381..faa66e02 100644 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/debootstrap/debootstrap/0001-support-to-override-usr-sbin-and-usr-share.patch +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/debootstrap/debootstrap/0001-support-to-override-usr-sbin-and-usr-share.patch @@ -1,20 +1,20 @@ -From 87d0174e8d56e7458dc94f05f82ab7a67a5cf7d0 Mon Sep 17 00:00:00 2001 +From 6c8b0a3f9c09a7a135d95ff18038bcba22e87b86 Mon Sep 17 00:00:00 2001 From: Hongxu Jia Date: Thu, 8 Apr 2021 14:06:05 +0800 -Subject: [PATCH 1/2] support to override /usr/sbin and /usr/share +Subject: [PATCH] support to override /usr/sbin and /usr/share Upstream-Status: Submitted [https://salsa.debian.org/installer-team/debootstrap/-/merge_requests/55] Signed-off-by: Hongxu Jia --- - Makefile | 12 +++++++----- - 1 file changed, 7 insertions(+), 5 deletions(-) + Makefile | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile -index 8516803..a2d8c00 100644 +index 21a9a39..649f465 100644 --- a/Makefile +++ b/Makefile -@@ -5,14 +5,16 @@ all: +@@ -5,13 +5,15 @@ all: clean: @@ -28,14 +28,12 @@ index 8516803..a2d8c00 100644 + mkdir -p $(DESTDIR)$(sbindir) cp -a scripts/* $(DSDIR)/scripts/ - install -o root -g root -m 0644 functions $(DSDIR)/ + install -m 0644 functions $(DSDIR)/ - sed 's/@VERSION@/$(VERSION)/g' debootstrap >$(DESTDIR)/usr/sbin/debootstrap -- chown root:root $(DESTDIR)/usr/sbin/debootstrap - chmod 0755 $(DESTDIR)/usr/sbin/debootstrap + sed 's/@VERSION@/$(VERSION)/g' debootstrap >$(DESTDIR)$(sbindir)/debootstrap -+ chown root:root $(DESTDIR)$(sbindir)/debootstrap + chmod 0755 $(DESTDIR)$(sbindir)/debootstrap -- -2.17.1 +2.25.1 diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/debootstrap/debootstrap/0002-support-to-override-usr-bin-arch-test.patch b/sources/meta-openembedded/meta-oe/recipes-devtools/debootstrap/debootstrap/0002-support-to-override-usr-bin-arch-test.patch index 69329df4..5de65779 100644 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/debootstrap/debootstrap/0002-support-to-override-usr-bin-arch-test.patch +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/debootstrap/debootstrap/0002-support-to-override-usr-bin-arch-test.patch @@ -1,7 +1,7 @@ -From f0420b201f2fb5286ccf5657faa6b38cd2680e10 Mon Sep 17 00:00:00 2001 +From 3fee46c7e50f432fbd5c97c60b918d71c91f1adc Mon Sep 17 00:00:00 2001 From: Hongxu Jia Date: Thu, 8 Apr 2021 14:08:06 +0800 -Subject: [PATCH 2/2] support to override /usr/bin/arch-test +Subject: [PATCH] support to override /usr/bin/arch-test Upstream-Status: Submitted [https://salsa.debian.org/installer-team/debootstrap/-/merge_requests/55] @@ -11,12 +11,12 @@ Signed-off-by: Hongxu Jia 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/debootstrap b/debootstrap -index 9b9e58d..a3cf3af 100755 +index 552c8d6..11a9465 100755 --- a/debootstrap +++ b/debootstrap @@ -51,6 +51,10 @@ INRELEASE_PATH="" + DEF_MIRROR="http://deb.debian.org/debian" - DEF_HTTPS_MIRROR="https://deb.debian.org/debian" +if [ -z "$ARCH_TEST" ]; then + ARCH_TEST="/usr/bin/arch-test" @@ -25,7 +25,7 @@ index 9b9e58d..a3cf3af 100755 # set $CONTAINER detect_container -@@ -645,12 +649,12 @@ fi +@@ -661,12 +665,12 @@ fi ########################################################################### @@ -43,5 +43,5 @@ index 9b9e58d..a3cf3af 100755 ret=3 fi -- -2.17.1 +2.25.1 diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/debootstrap/debootstrap/0003-do-not-hardcode-the-full-path-of-dpkg.patch b/sources/meta-openembedded/meta-oe/recipes-devtools/debootstrap/debootstrap/0003-do-not-hardcode-the-full-path-of-dpkg.patch new file mode 100644 index 00000000..5cd1ce88 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/debootstrap/debootstrap/0003-do-not-hardcode-the-full-path-of-dpkg.patch @@ -0,0 +1,33 @@ +From e92554e57b4aae242cb0416025883ccc2c539d2a Mon Sep 17 00:00:00 2001 +From: Hongxu Jia +Date: Wed, 2 Jun 2021 13:34:35 +0800 +Subject: [PATCH] do not hardcode the full path of dpkg + +While calling debootstrap in sdk, if host does not install dpkg package, +the full path calling will fail + +Do not hardcode the full path of dpkg, then then sdk's dpkg will be used. + +Upstream-Status: Inappropriate [oe specific] + +Signed-off-by: Hongxu Jia +--- + debootstrap | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/debootstrap b/debootstrap +index 11a9465..17ab05a 100755 +--- a/debootstrap ++++ b/debootstrap +@@ -551,7 +551,7 @@ fi + + if in_path dpkg && \ + dpkg --print-architecture >/dev/null 2>&1; then +- HOST_ARCH=$(/usr/bin/dpkg --print-architecture) ++ HOST_ARCH=$(dpkg --print-architecture) + elif in_path udpkg && \ + udpkg --print-architecture >/dev/null 2>&1; then + HOST_ARCH=$(/usr/bin/udpkg --print-architecture) +-- +2.25.1 + diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/debootstrap/debootstrap_1.0.132.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/debootstrap/debootstrap_1.0.132.bb deleted file mode 100644 index 94c112d3..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/debootstrap/debootstrap_1.0.132.bb +++ /dev/null @@ -1,27 +0,0 @@ -SUMMARY = "Install a Debian system into a subdirectory" -HOMEPAGE = "https://wiki.debian.org/Debootstrap" -SECTION = "devel" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://debian/copyright;md5=1e68ced6e1689d4cd9dac75ff5225608" - -SRC_URI = "\ - https://salsa.debian.org/installer-team/debootstrap/-/archive/${PV}/debootstrap_${PV}.tar.gz \ - file://0001-support-to-override-usr-sbin-and-usr-share.patch \ - file://0002-support-to-override-usr-bin-arch-test.patch \ - file://0001-do-not-hardcode-the-full-path-of-dpkg.patch \ -" - -SRC_URI[sha256sum] = "d963a465314ac0e8fd5392573def042e6663e8edf3d08ace4bbd0d27ee8431f7" - -S = "${WORKDIR}/debootstrap" - -DEPENDS = " \ - virtual/fakeroot-native \ -" - -fakeroot do_install() { - oe_runmake 'DESTDIR=${D}' install - chown -R root:root ${D}${datadir}/debootstrap -} - -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/debootstrap/debootstrap_1.0.137.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/debootstrap/debootstrap_1.0.137.bb new file mode 100644 index 00000000..d4783b35 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/debootstrap/debootstrap_1.0.137.bb @@ -0,0 +1,27 @@ +SUMMARY = "Install a Debian system into a subdirectory" +HOMEPAGE = "https://wiki.debian.org/Debootstrap" +SECTION = "devel" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://debian/copyright;md5=e7b45429ef05610abf91ac199fdb3a6e" + +SRC_URI = "\ + ${DEBIAN_MIRROR}/main/d/debootstrap/debootstrap_${PV}.tar.gz \ + file://0001-support-to-override-usr-sbin-and-usr-share.patch \ + file://0002-support-to-override-usr-bin-arch-test.patch \ + file://0003-do-not-hardcode-the-full-path-of-dpkg.patch \ +" + +SRC_URI[sha256sum] = "666927457ee4b0b3e68e55a0efbf3fb69189610b7abbd534017d7032cb3ae833" + +S = "${WORKDIR}/debootstrap" + +DEPENDS = " \ + virtual/fakeroot-native \ +" + +fakeroot do_install() { + oe_runmake 'DESTDIR=${D}' install + chown -R root:root ${D}${datadir}/debootstrap +} + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/dnf-plugin-tui/dnf-plugin-tui_1.4.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/dnf-plugin-tui/dnf-plugin-tui_1.4.bb index 479b98d4..599675a3 100644 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/dnf-plugin-tui/dnf-plugin-tui_1.4.bb +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/dnf-plugin-tui/dnf-plugin-tui_1.4.bb @@ -24,7 +24,7 @@ do_install:append() { do_install:append:class-target() { install -d ${D}${sysconfdir}/yum.repos.d - install -m 0644 ${WORKDIR}/oe-remote.repo.sample ${D}${sysconfdir}/yum.repos.d + install -m 0644 ${UNPACKDIR}/oe-remote.repo.sample ${D}${sysconfdir}/yum.repos.d } do_install:append:class-nativesdk() { diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/doxygen/doxygen_1.9.3.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/doxygen/doxygen_1.9.3.bb index 8bd0992b..16a4250b 100644 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/doxygen/doxygen_1.9.3.bb +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/doxygen/doxygen_1.9.3.bb @@ -12,6 +12,9 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.src.tar.gz \ SRC_URI:append:class-native = " file://doxygen-native-only-check-python3.patch" SRC_URI[sha256sum] = "f352dbc3221af7012b7b00935f2dfdc9fb67a97d43287d2f6c81c50449d254e0" +UPSTREAM_CHECK_URI = "https://github.com/doxygen/doxygen/releases" +UPSTREAM_CHECK_REGEX = "(?P\d+(\.\d+)+)" + inherit cmake python3native EXTRA_OECMAKE += "\ diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/editorconfig/editorconfig-core-c_0.12.6.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/editorconfig/editorconfig-core-c_0.12.6.bb deleted file mode 100644 index 976120b5..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/editorconfig/editorconfig-core-c_0.12.6.bb +++ /dev/null @@ -1,18 +0,0 @@ -SUMMARY = "EditorConfig helps maintain consistent coding styles across various editors and IDEs." -HOMEPAGE = "https://https://editorconfig.org" -SECTION = "libs" -LICENSE = "BSD-2-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=f515fff3ea0a2b9797eda60d83c0e5ca" - -SRC_URI = "git://github.com/editorconfig/editorconfig-core-c.git;protocol=https;branch=master" - -S = "${WORKDIR}/git" -SRCREV = "b7837029494c03af5ea70ed9d265e8c2123bff53" - -inherit cmake - -DEPENDS = "pcre2" - -do_install:append() { - sed -i -e 's|${STAGING_DIR_HOST}||g' ${D}${libdir}/cmake/EditorConfig/EditorConfigTargets.cmake -} diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/editorconfig/editorconfig-core-c_0.12.9.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/editorconfig/editorconfig-core-c_0.12.9.bb new file mode 100644 index 00000000..b567f11f --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/editorconfig/editorconfig-core-c_0.12.9.bb @@ -0,0 +1,18 @@ +SUMMARY = "EditorConfig helps maintain consistent coding styles across various editors and IDEs." +HOMEPAGE = "https://https://editorconfig.org" +SECTION = "libs" +LICENSE = "BSD-2-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=38f617473e9f7373b5e79baf437accf8" + +SRC_URI = "git://github.com/editorconfig/editorconfig-core-c.git;protocol=https;branch=master" + +S = "${WORKDIR}/git" +SRCREV = "e082c947e7f7b14240195d55c060a6e1eda1b0a1" + +inherit cmake + +DEPENDS = "pcre2" + +do_install:append() { + sed -i -e 's|${STAGING_DIR_HOST}||g' ${D}${libdir}/cmake/EditorConfig/EditorConfigTargets.cmake +} diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/glade/glade/CVE-2020-36774.patch b/sources/meta-openembedded/meta-oe/recipes-devtools/glade/glade/CVE-2020-36774.patch deleted file mode 100644 index 5049b44e..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/glade/glade/CVE-2020-36774.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 7acdd3c6f6934f47b8974ebc2190a59ea5d2ed17 Mon Sep 17 00:00:00 2001 -From: Juan Pablo Ugarte -Date: Fri, 2 Oct 2020 16:08:23 -0300 -Subject: [PATCH] GladeGtkBox: fix glade_gtk_box_post_create - -Some widgets with contruct properties like GtkMessageDialog get -rebuilt right after they are created on project loading so we need -to check glade_project_is_loading() intead of GLADE_CREATE_LOAD -and use the object ad the connect data to make sure it gets disconected -if it was the object being rebuilt - -Fix issue #479 "Glade 3.36.0 segfaults when opening a file" - -CVE: CVE-2020-36774 -Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glade/-/commit/7acdd3c6f6934f47b8974ebc2190a59ea5d2ed17] - -Signed-off-by: Peng Zhang ---- - plugins/gtk+/glade-gtk-box.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/plugins/gtk+/glade-gtk-box.c b/plugins/gtk+/glade-gtk-box.c -index 0c157a6d..a0252b6a 100644 ---- a/plugins/gtk+/glade-gtk-box.c -+++ b/plugins/gtk+/glade-gtk-box.c -@@ -58,9 +58,9 @@ glade_gtk_box_create_editable (GladeWidgetAdaptor *adaptor, - } - - static void --glade_gtk_box_parse_finished (GladeProject * project, GladeWidget *gbox) -+glade_gtk_box_parse_finished (GladeProject *project, GObject *box) - { -- GObject *box = glade_widget_get_object (gbox); -+ GladeWidget *gbox = glade_widget_get_from_gobject (box); - - glade_widget_property_set (gbox, "use-center-child", - gtk_box_get_center_widget (GTK_BOX (box)) != NULL); -@@ -87,11 +87,11 @@ glade_gtk_box_post_create (GladeWidgetAdaptor *adaptor, - g_signal_connect (G_OBJECT (gwidget), "configure-end", - G_CALLBACK (glade_gtk_box_configure_end), container); - -- if (reason == GLADE_CREATE_LOAD) -+ if (glade_project_is_loading (project)) - { - g_signal_connect_object (project, "parse-finished", - G_CALLBACK (glade_gtk_box_parse_finished), -- gwidget, 0); -+ container, 0); - } - } - --- -GitLab - diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/glade/glade_3.22.2.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/glade/glade_3.22.2.bb index 4a1c5fc8..72c4036b 100644 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/glade/glade_3.22.2.bb +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/glade/glade_3.22.2.bb @@ -17,7 +17,6 @@ ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" SRC_URI = "http://ftp.gnome.org/pub/GNOME/sources/glade/3.22/glade-${PV}.tar.xz \ file://remove-yelp-help-rules-var.patch \ - file://CVE-2020-36774.patch \ " SRC_URI[md5sum] = "c074fa378c8f1ad80d20133c4ae6f42d" SRC_URI[sha256sum] = "edefa6eb24b4d15bd52589121dc109bc08c286157c41288deb74dd9cc3f26a21" @@ -25,3 +24,10 @@ SRC_URI[sha256sum] = "edefa6eb24b4d15bd52589121dc109bc08c286157c41288deb74dd9cc3 EXTRA_OECONF += "--disable-man-pages" FILES:${PN} += "${datadir}/glade ${datadir}/metainfo ${libdir}/glade/modules/libgladegtk.so" + +# http://errors.yoctoproject.org/Errors/Details/766882/ +# glade-3.22.2/gladeui/glade-widget.c:1822:36: error: assignment to 'GtkWidget *' {aka 'struct _GtkWidget *'} from incompatible pointer type 'GObject *' {aka 'struct _GObject *'} [-Wincompatible-pointer-types] +# glade-3.22.2/gladeui/glade-command.c:920:23: error: assignment to 'GladeProperty *' {aka 'struct _GladeProperty *'} from incompatible pointer type 'GObject *' {aka 'struct _GObject *'} [-Wincompatible-pointer-types] +# glade-3.22.2/gladeui/glade-command.c:1253:21: error: assignment to 'GladeWidget *' {aka 'struct _GladeWidget *'} from incompatible pointer type 'GObject *' {aka 'struct _GObject *'} [-Wincompatible-pointer-types] +# glade-3.22.2/gladeui/glade-command.c:1419:21: error: assignment to 'GladeWidget *' {aka 'struct _GladeWidget *'} from incompatible pointer type 'GObject *' {aka 'struct _GObject *'} [-Wincompatible-pointer-types] +CFLAGS += "-Wno-error=incompatible-pointer-types" diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/grpc/grpc/CVE-2024-11407.patch b/sources/meta-openembedded/meta-oe/recipes-devtools/grpc/grpc/CVE-2024-11407.patch deleted file mode 100644 index beaff6a4..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/grpc/grpc/CVE-2024-11407.patch +++ /dev/null @@ -1,32 +0,0 @@ -From e9046b2bbebc0cb7f5dc42008f807f6c7e98e791 Mon Sep 17 00:00:00 2001 -From: Vignesh Babu -Date: Thu, 12 Sep 2024 11:13:45 -0700 -Subject: [PATCH] [EventEngine] Fix bug in Tx0cp code path in posix endpoint. - -This fix ensures that the iov_base pointers point to the right address. - -PiperOrigin-RevId: 673923651 - -CVE: CVE-2024-11407 -Upstream-Status: Backport [https://github.com/grpc/grpc/commit/e9046b2bbebc0cb7f5dc42008f807f6c7e98e791] -Signed-off-by: Peter Marko ---- - src/core/lib/event_engine/posix_engine/posix_endpoint.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/core/lib/event_engine/posix_engine/posix_endpoint.cc b/src/core/lib/event_engine/posix_engine/posix_endpoint.cc -index 7634bb1334b..c5708db02c5 100644 ---- a/src/core/lib/event_engine/posix_engine/posix_endpoint.cc -+++ b/src/core/lib/event_engine/posix_engine/posix_endpoint.cc -@@ -239,7 +239,7 @@ msg_iovlen_type TcpZerocopySendRecord::PopulateIovs(size_t* unwind_slice_idx, - iov_size++) { - MutableSlice& slice = internal::SliceCast( - buf_.MutableSliceAt(out_offset_.slice_idx)); -- iov[iov_size].iov_base = slice.begin(); -+ iov[iov_size].iov_base = slice.begin() + out_offset_.byte_idx; - iov[iov_size].iov_len = slice.length() - out_offset_.byte_idx; - *sending_length += iov[iov_size].iov_len; - ++(out_offset_.slice_idx); --- -2.30.2 - diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/grpc/grpc/CVE-2024-7246.patch b/sources/meta-openembedded/meta-oe/recipes-devtools/grpc/grpc/CVE-2024-7246.patch deleted file mode 100644 index a690b49c..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/grpc/grpc/CVE-2024-7246.patch +++ /dev/null @@ -1,420 +0,0 @@ -From ac0948e39eb19c3325a576e152709d4cc915a7e4 Mon Sep 17 00:00:00 2001 -From: Craig Tiller -Date: Thu, 1 Aug 2024 13:02:27 -0700 -Subject: [PATCH] [v1.60] [chttp2] Fix a bug in hpack error handling (#37361) - -PiperOrigin-RevId: 657234128 -PiperOrigin-RevId: 658458047 - -Craig Tiller - -CVE: CVE-2024-7246 - -Upstream-Status: Backport -[https://github.com/grpc/grpc/pull/37361/files] - -Signed-off-by: Libo Chen ---- - .../chttp2/transport/hpack_parser.cc | 63 +++++++------ - .../transport/chttp2/transport/hpack_parser.h | 2 + - .../transport/chttp2/hpack_parser_test.cc | 89 ++++++++++++++++--- - .../transport/chttp2/hpack_sync_fuzzer.cc | 62 +++++++++++++ - .../transport/chttp2/hpack_sync_fuzzer.proto | 3 + - 5 files changed, 179 insertions(+), 40 deletions(-) - -diff --git a/src/core/ext/transport/chttp2/transport/hpack_parser.cc b/src/core/ext/transport/chttp2/transport/hpack_parser.cc -index 31bf464..f2fe80c 100644 ---- a/src/core/ext/transport/chttp2/transport/hpack_parser.cc -+++ b/src/core/ext/transport/chttp2/transport/hpack_parser.cc -@@ -91,12 +91,14 @@ constexpr Base64InverseTable kBase64InverseTable; - class HPackParser::Input { - public: - Input(grpc_slice_refcount* current_slice_refcount, const uint8_t* begin, -- const uint8_t* end, absl::BitGenRef bitsrc, HpackParseResult& error) -+ const uint8_t* end, absl::BitGenRef bitsrc, -+ HpackParseResult& frame_error, HpackParseResult& field_error) - : current_slice_refcount_(current_slice_refcount), - begin_(begin), - end_(end), - frontier_(begin), -- error_(error), -+ frame_error_(frame_error), -+ field_error_(field_error), - bitsrc_(bitsrc) {} - - // If input is backed by a slice, retrieve its refcount. If not, return -@@ -215,14 +217,18 @@ class HPackParser::Input { - - // Check if we saw an EOF - bool eof_error() const { -- return min_progress_size_ != 0 || error_.connection_error(); -+ return min_progress_size_ != 0 || frame_error_.connection_error(); -+ } -+ -+ // Reset the field error to be ok -+ void ClearFieldError() { -+ if (field_error_.ok()) return; -+ field_error_ = HpackParseResult(); - } - - // Minimum number of bytes to unstuck the current parse - size_t min_progress_size() const { return min_progress_size_; } - -- bool has_error() const { return !error_.ok(); } -- - // Set the current error - tweaks the error to include a stream id so that - // chttp2 does not close the connection. - // Intended for errors that are specific to a stream and recoverable. -@@ -246,10 +252,7 @@ class HPackParser::Input { - // read prior to being able to get further in this parse. - void UnexpectedEOF(size_t min_progress_size) { - GPR_ASSERT(min_progress_size > 0); -- if (min_progress_size_ != 0 || error_.connection_error()) { -- GPR_DEBUG_ASSERT(eof_error()); -- return; -- } -+ if (eof_error()) return; - // Set min progress size, taking into account bytes parsed already but not - // consumed. - min_progress_size_ = min_progress_size + (begin_ - frontier_); -@@ -302,13 +305,18 @@ class HPackParser::Input { - // Do not use this directly, instead use SetErrorAndContinueParsing or - // SetErrorAndStopParsing. - void SetError(HpackParseResult error) { -- if (!error_.ok() || min_progress_size_ > 0) { -- if (error.connection_error() && !error_.connection_error()) { -- error_ = std::move(error); // connection errors dominate -+ SetErrorFor(frame_error_, error); -+ SetErrorFor(field_error_, std::move(error)); -+ } -+ -+ void SetErrorFor(HpackParseResult& error, HpackParseResult new_error) { -+ if (!error.ok() || min_progress_size_ > 0) { -+ if (new_error.connection_error() && !error.connection_error()) { -+ error = std::move(new_error); // connection errors dominate - } - return; - } -- error_ = std::move(error); -+ error = std::move(new_error); - } - - // Refcount if we are backed by a slice -@@ -320,7 +328,8 @@ class HPackParser::Input { - // Frontier denotes the first byte past successfully processed input - const uint8_t* frontier_; - // Current error -- HpackParseResult& error_; -+ HpackParseResult& frame_error_; -+ HpackParseResult& field_error_; - // If the error was EOF, we flag it here by noting how many more bytes would - // be needed to make progress - size_t min_progress_size_ = 0; -@@ -597,6 +606,7 @@ class HPackParser::Parser { - bool ParseTop() { - GPR_DEBUG_ASSERT(state_.parse_state == ParseState::kTop); - auto cur = *input_->Next(); -+ input_->ClearFieldError(); - switch (cur >> 4) { - // Literal header not indexed - First byte format: 0000xxxx - // Literal header never indexed - First byte format: 0001xxxx -@@ -702,7 +712,7 @@ class HPackParser::Parser { - break; - } - gpr_log( -- GPR_DEBUG, "HTTP:%d:%s:%s: %s%s", log_info_.stream_id, type, -+ GPR_INFO, "HTTP:%d:%s:%s: %s%s", log_info_.stream_id, type, - log_info_.is_client ? "CLI" : "SVR", memento.md.DebugString().c_str(), - memento.parse_status == nullptr - ? "" -@@ -951,11 +961,10 @@ class HPackParser::Parser { - state_.string_length) - : String::Parse(input_, state_.is_string_huff_compressed, - state_.string_length); -- HpackParseResult& status = state_.frame_error; - absl::string_view key_string; - if (auto* s = absl::get_if(&state_.key)) { - key_string = s->as_string_view(); -- if (status.ok()) { -+ if (state_.field_error.ok()) { - auto r = ValidateKey(key_string); - if (r != ValidateMetadataResult::kOk) { - input_->SetErrorAndContinueParsing( -@@ -965,7 +974,7 @@ class HPackParser::Parser { - } else { - const auto* memento = absl::get(state_.key); - key_string = memento->md.key(); -- if (status.ok() && memento->parse_status != nullptr) { -+ if (state_.field_error.ok() && memento->parse_status != nullptr) { - input_->SetErrorAndContinueParsing(*memento->parse_status); - } - } -@@ -992,16 +1001,16 @@ class HPackParser::Parser { - key_string.size() + value.wire_size + hpack_constants::kEntryOverhead; - auto md = grpc_metadata_batch::Parse( - key_string, std::move(value_slice), state_.add_to_table, transport_size, -- [key_string, &status, this](absl::string_view message, const Slice&) { -- if (!status.ok()) return; -+ [key_string, this](absl::string_view message, const Slice&) { -+ if (!state_.field_error.ok()) return; - input_->SetErrorAndContinueParsing( - HpackParseResult::MetadataParseError(key_string)); - gpr_log(GPR_ERROR, "Error parsing '%s' metadata: %s", - std::string(key_string).c_str(), - std::string(message).c_str()); - }); -- HPackTable::Memento memento{std::move(md), -- status.PersistentStreamErrorOrNullptr()}; -+ HPackTable::Memento memento{ -+ std::move(md), state_.field_error.PersistentStreamErrorOrNullptr()}; - input_->UpdateFrontier(); - state_.parse_state = ParseState::kTop; - if (state_.add_to_table) { -@@ -1163,13 +1172,13 @@ grpc_error_handle HPackParser::Parse( - std::vector buffer = std::move(unparsed_bytes_); - return ParseInput( - Input(nullptr, buffer.data(), buffer.data() + buffer.size(), bitsrc, -- state_.frame_error), -+ state_.frame_error, state_.field_error), - is_last, call_tracer); - } -- return ParseInput( -- Input(slice.refcount, GRPC_SLICE_START_PTR(slice), -- GRPC_SLICE_END_PTR(slice), bitsrc, state_.frame_error), -- is_last, call_tracer); -+ return ParseInput(Input(slice.refcount, GRPC_SLICE_START_PTR(slice), -+ GRPC_SLICE_END_PTR(slice), bitsrc, state_.frame_error, -+ state_.field_error), -+ is_last, call_tracer); - } - - grpc_error_handle HPackParser::ParseInput( -diff --git a/src/core/ext/transport/chttp2/transport/hpack_parser.h b/src/core/ext/transport/chttp2/transport/hpack_parser.h -index 3745668..55842e4 100644 ---- a/src/core/ext/transport/chttp2/transport/hpack_parser.h -+++ b/src/core/ext/transport/chttp2/transport/hpack_parser.h -@@ -236,6 +236,8 @@ class HPackParser { - HPackTable hpack_table; - // Error so far for this frame (set by class Input) - HpackParseResult frame_error; -+ // Error so far for this field (set by class Input) -+ HpackParseResult field_error; - // Length of frame so far. - uint32_t frame_length = 0; - // Length of the string being parsed -diff --git a/test/core/transport/chttp2/hpack_parser_test.cc b/test/core/transport/chttp2/hpack_parser_test.cc -index 3772d90..d5b9c6c 100644 ---- a/test/core/transport/chttp2/hpack_parser_test.cc -+++ b/test/core/transport/chttp2/hpack_parser_test.cc -@@ -440,19 +440,82 @@ INSTANTIATE_TEST_SUITE_P( - Test{"Base64LegalEncoding", - {}, - {}, -- {// Binary metadata: created using: -- // tools/codegen/core/gen_header_frame.py -- // --compression inc --no_framing --output hexstr -- // < test/core/transport/chttp2/bad-base64.headers -- {"4009612e622e632d62696e1c6c75636b696c7920666f722075732c206974" -- "27732074756573646179", -- absl::InternalError("Error parsing 'a.b.c-bin' metadata: " -- "illegal base64 encoding"), -- 0}, -- {"be", -- absl::InternalError("Error parsing 'a.b.c-bin' metadata: " -- "illegal base64 encoding"), -- 0}}}, -+ { -+ // Binary metadata: created using: -+ // tools/codegen/core/gen_header_frame.py -+ // --compression inc --no_framing --output hexstr -+ // < test/core/transport/chttp2/bad-base64.headers -+ {"4009612e622e632d62696e1c6c75636b696c7920666f722075732c206974" -+ "27732074756573646179", -+ absl::InternalError("Error parsing 'a.b.c-bin' metadata: " -+ "illegal base64 encoding"), -+ 0}, -+ {"be", -+ absl::InternalError("Error parsing 'a.b.c-bin' metadata: " -+ "illegal base64 encoding"), -+ kEndOfHeaders}, -+ {"82", ":method: GET\n", 0}, -+ }}, -+ Test{"Base64LegalEncodingWorksAfterFailure", -+ {}, -+ {}, -+ { -+ // Binary metadata: created using: -+ // tools/codegen/core/gen_header_frame.py -+ // --compression inc --no_framing --output hexstr -+ // < test/core/transport/chttp2/bad-base64.headers -+ {"4009612e622e632d62696e1c6c75636b696c7920666f722075732c206974" -+ "27732074756573646179", -+ absl::InternalError("Error parsing 'a.b.c-bin' metadata: " -+ "illegal base64 encoding"), -+ 0}, -+ {"be", -+ absl::InternalError("Error parsing 'a.b.c-bin' metadata: " -+ "illegal base64 encoding"), -+ 0}, -+ {"400e636f6e74656e742d6c656e6774680135", -+ absl::InternalError("Error parsing 'a.b.c-bin' metadata: " -+ "illegal base64 encoding"), -+ kEndOfHeaders}, -+ {"be", "content-length: 5\n", 0}, -+ }}, -+ Test{"Base64LegalEncodingWorksAfterFailure2", -+ {}, -+ {}, -+ { -+ {// Generated with: tools/codegen/core/gen_header_frame.py -+ // --compression inc --output hexstr --no_framing < -+ // test/core/transport/chttp2/MiXeD-CaSe.headers -+ "400a4d695865442d436153651073686f756c64206e6f74207061727365", -+ absl::InternalError("Illegal header key: MiXeD-CaSe"), 0}, -+ // Binary metadata: created using: -+ // tools/codegen/core/gen_header_frame.py -+ // --compression inc --no_framing --output hexstr -+ // < test/core/transport/chttp2/bad-base64.headers -+ {"4009612e622e632d62696e1c6c75636b696c7920666f722075732c206974" -+ "27732074756573646179", -+ absl::InternalError("Illegal header key: MiXeD-CaSe"), 0}, -+ {"be", absl::InternalError("Illegal header key: MiXeD-CaSe"), -+ 0}, -+ {"400e636f6e74656e742d6c656e6774680135", -+ absl::InternalError("Illegal header key: MiXeD-CaSe"), -+ kEndOfHeaders}, -+ {"be", "content-length: 5\n", 0}, -+ {"bf", -+ absl::InternalError("Error parsing 'a.b.c-bin' metadata: " -+ "illegal base64 encoding"), -+ 0}, -+ // Only the first error in each frame is reported, so we should -+ // still see the same error here... -+ {"c0", -+ absl::InternalError("Error parsing 'a.b.c-bin' metadata: " -+ "illegal base64 encoding"), -+ kEndOfHeaders}, -+ // ... but if we look at the next frame we should see the -+ // stored error -+ {"c0", absl::InternalError("Illegal header key: MiXeD-CaSe"), -+ kEndOfHeaders}, -+ }}, - Test{"TeIsTrailers", - {}, - {}, -diff --git a/test/core/transport/chttp2/hpack_sync_fuzzer.cc b/test/core/transport/chttp2/hpack_sync_fuzzer.cc -index 47e4265..9afa41f 100644 ---- a/test/core/transport/chttp2/hpack_sync_fuzzer.cc -+++ b/test/core/transport/chttp2/hpack_sync_fuzzer.cc -@@ -85,6 +85,10 @@ void FuzzOneInput(const hpack_sync_fuzzer::Msg& msg) { - // Not an interesting case to fuzz - continue; - } -+ if (msg.check_ab_preservation() && -+ header.literal_inc_idx().key() == "a") { -+ continue; -+ } - if (absl::EndsWith(header.literal_inc_idx().value(), "-bin")) { - std::ignore = encoder.EmitLitHdrWithBinaryStringKeyIncIdx( - Slice::FromCopiedString(header.literal_inc_idx().key()), -@@ -96,6 +100,10 @@ void FuzzOneInput(const hpack_sync_fuzzer::Msg& msg) { - } - break; - case hpack_sync_fuzzer::Header::kLiteralNotIdx: -+ if (msg.check_ab_preservation() && -+ header.literal_not_idx().key() == "a") { -+ continue; -+ } - if (absl::EndsWith(header.literal_not_idx().value(), "-bin")) { - encoder.EmitLitHdrWithBinaryStringKeyNotIdx( - Slice::FromCopiedString(header.literal_not_idx().key()), -@@ -114,6 +122,10 @@ void FuzzOneInput(const hpack_sync_fuzzer::Msg& msg) { - break; - } - } -+ if (msg.check_ab_preservation()) { -+ std::ignore = encoder.EmitLitHdrWithNonBinaryStringKeyIncIdx( -+ Slice::FromCopiedString("a"), Slice::FromCopiedString("b")); -+ } - - // STAGE 2: Decode the buffer (encode_output) into a list of headers - HPackParser parser; -@@ -140,6 +152,21 @@ void FuzzOneInput(const hpack_sync_fuzzer::Msg& msg) { - } - } - -+ if (seen_errors.empty() && msg.check_ab_preservation()) { -+ std::string backing; -+ auto a_value = read_metadata.GetStringValue("a", &backing); -+ if (!a_value.has_value()) { -+ fprintf(stderr, "Expected 'a' header to be present: %s\n", -+ read_metadata.DebugString().c_str()); -+ abort(); -+ } -+ if (a_value != "b") { -+ fprintf(stderr, "Expected 'a' header to be 'b', got '%s'\n", -+ std::string(*a_value).c_str()); -+ abort(); -+ } -+ } -+ - // STAGE 3: If we reached here we either had a stream error or no error - // parsing. - // Either way, the hpack tables should be of the same size between client and -@@ -168,6 +195,41 @@ void FuzzOneInput(const hpack_sync_fuzzer::Msg& msg) { - } - abort(); - } -+ -+ if (msg.check_ab_preservation()) { -+ SliceBuffer encode_output_2; -+ hpack_encoder_detail::Encoder encoder_2( -+ &compressor, msg.use_true_binary_metadata(), encode_output_2); -+ encoder_2.EmitIndexed(62); -+ GPR_ASSERT(encode_output_2.Count() == 1); -+ grpc_metadata_batch read_metadata_2(arena.get()); -+ parser.BeginFrame( -+ &read_metadata_2, 1024, 1024, HPackParser::Boundary::EndOfHeaders, -+ HPackParser::Priority::None, -+ HPackParser::LogInfo{3, HPackParser::LogInfo::kHeaders, false}); -+ auto err = parser.Parse(encode_output_2.c_slice_at(0), true, -+ absl::BitGenRef(proto_bit_src), -+ /*call_tracer=*/nullptr); -+ if (!err.ok()) { -+ fprintf(stderr, "Error parsing preservation encoded data: %s\n", -+ err.ToString().c_str()); -+ abort(); -+ } -+ std::string backing; -+ auto a_value = read_metadata_2.GetStringValue("a", &backing); -+ if (!a_value.has_value()) { -+ fprintf(stderr, -+ "Expected 'a' header to be present: %s\nfirst metadata: %s\n", -+ read_metadata_2.DebugString().c_str(), -+ read_metadata.DebugString().c_str()); -+ abort(); -+ } -+ if (a_value != "b") { -+ fprintf(stderr, "Expected 'a' header to be 'b', got '%s'\n", -+ std::string(*a_value).c_str()); -+ abort(); -+ } -+ } - } - - } // namespace -diff --git a/test/core/transport/chttp2/hpack_sync_fuzzer.proto b/test/core/transport/chttp2/hpack_sync_fuzzer.proto -index 72792b6..2c075a6 100644 ---- a/test/core/transport/chttp2/hpack_sync_fuzzer.proto -+++ b/test/core/transport/chttp2/hpack_sync_fuzzer.proto -@@ -44,4 +44,7 @@ message Msg { - repeated Header headers = 2; - grpc.testing.FuzzConfigVars config_vars = 3; - repeated uint64 random_numbers = 4; -+ // Ensure that a header "a: b" appended to headers with hpack incremental -+ // indexing is correctly added to the hpack table. -+ bool check_ab_preservation = 5; - } --- -2.44.1 - diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/grpc/grpc_1.60.1.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/grpc/grpc_1.60.1.bb deleted file mode 100644 index 1594353e..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/grpc/grpc_1.60.1.bb +++ /dev/null @@ -1,69 +0,0 @@ -DESCRIPTION = "A high performance, open source, general-purpose RPC framework. \ -Provides gRPC libraries for multiple languages written on top of shared C core library \ -(C++, Node.js, Python, Ruby, Objective-C, PHP, C#)" -HOMEPAGE = "https://github.com/grpc/grpc" -SECTION = "libs" -LICENSE = "Apache-2.0 & BSD-3-Clause & MPL-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=731e401b36f8077ae0c134b59be5c906" - -DEPENDS = "c-ares protobuf protobuf-native openssl libnsl2 abseil-cpp re2 zlib" -DEPENDS:append:class-target = " googletest grpc-native " -DEPENDS:append:class-nativesdk = " grpc-native " - -PACKAGE_BEFORE_PN = "${PN}-compiler" - -RDEPENDS:${PN}-compiler = "${PN}" -RDEPENDS:${PN}-dev:append:class-native = " ${PN}-compiler" -# Configuration above allows to cross-compile gRPC applications -# In order to compile applications on the target, use the dependency below -# Both dependencies are mutually exclusive -# RDEPENDS:${PN}-dev += "${PN}-compiler" - -S = "${WORKDIR}/git" -SRCREV_grpc = "e5ae3b6b44bf3b64d24bfb4b4f82556239b986db" -BRANCH = "v1.60.x" -SRC_URI = "gitsm://github.com/grpc/grpc.git;protocol=https;name=grpc;branch=${BRANCH} \ - file://0001-cmake-Link-with-libatomic-on-rv32-rv64.patch \ - file://CVE-2024-7246.patch \ - file://CVE-2024-11407.patch \ - " -# Fixes build with older compilers 4.8 especially on ubuntu 14.04 -CXXFLAGS:append:class-native = " -Wl,--no-as-needed" - -inherit cmake pkgconfig - -EXTRA_OECMAKE = " \ - -DgRPC_CARES_PROVIDER=package \ - -DgRPC_ZLIB_PROVIDER=package \ - -DgRPC_SSL_PROVIDER=package \ - -DgRPC_PROTOBUF_PROVIDER=package \ - -D_gRPC_PROTOBUF_PROTOC_EXECUTABLE=${STAGING_BINDIR_NATIVE}/protoc \ - -DgRPC_ABSL_PROVIDER=package \ - -DgRPC_RE2_PROVIDER=package \ - -DgRPC_INSTALL=ON \ - -DCMAKE_CROSSCOMPILING=ON \ - -DgRPC_INSTALL_LIBDIR=${baselib} \ - -DgRPC_INSTALL_CMAKEDIR=${baselib}/cmake/${BPN} \ - " - -PACKAGECONFIG ??= "cpp shared" -PACKAGECONFIG[cpp] = "-DgRPC_BUILD_GRPC_CPP_PLUGIN=ON,-DgRPC_BUILD_GRPC_CPP_PLUGIN=OFF" -PACKAGECONFIG[csharp] = "-DgRPC_BUILD_GRPC_CSHARP_PLUGIN=ON,-DgRPC_BUILD_GRPC_CSHARP_PLUGIN=OFF" -PACKAGECONFIG[node] = "-DgRPC_BUILD_GRPC_NODE_PLUGIN=ON,-DgRPC_BUILD_GRPC_NODE_PLUGIN=OFF" -PACKAGECONFIG[objective-c] = "-DgRPC_BUILD_GRPC_OBJECTIVE_C_PLUGIN=ON,-DgRPC_BUILD_GRPC_OBJECTIVE_C_PLUGIN=OFF" -PACKAGECONFIG[php] = "-DgRPC_BUILD_GRPC_PHP_PLUGIN=ON,-DgRPC_BUILD_GRPC_PHP_PLUGIN=OFF" -PACKAGECONFIG[python] = "-DgRPC_BUILD_GRPC_PYTHON_PLUGIN=ON,-DgRPC_BUILD_GRPC_PYTHON_PLUGIN=OFF" -PACKAGECONFIG[ruby] = "-DgRPC_BUILD_GRPC_RUBY_PLUGIN=ON,-DgRPC_BUILD_GRPC_RUBY_PLUGIN=OFF" -PACKAGECONFIG[protobuf-lite] = "-DgRPC_USE_PROTO_LITE=ON,-DgRPC_USE_PROTO_LITE=OFF,protobuf-lite" -PACKAGECONFIG[shared] = "-DBUILD_SHARED_LIBS=ON,-DBUILD_SHARED_LIBS=OFF,," - -do_configure:prepend() { - sed -i -e "s#lib/pkgconfig/#${baselib}/pkgconfig/#g" ${S}/CMakeLists.txt -} - -BBCLASSEXTEND = "native nativesdk" - -FILES:${PN}-compiler += " \ - ${bindir} \ - ${libdir}/libgrpc_plugin_support${SOLIBS} \ - " diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/grpc/grpc_1.66.1.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/grpc/grpc_1.66.1.bb new file mode 100644 index 00000000..7968d63a --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/grpc/grpc_1.66.1.bb @@ -0,0 +1,67 @@ +DESCRIPTION = "A high performance, open source, general-purpose RPC framework. \ +Provides gRPC libraries for multiple languages written on top of shared C core library \ +(C++, Node.js, Python, Ruby, Objective-C, PHP, C#)" +HOMEPAGE = "https://github.com/grpc/grpc" +SECTION = "libs" +LICENSE = "Apache-2.0 & BSD-3-Clause & MPL-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=731e401b36f8077ae0c134b59be5c906" + +DEPENDS = "c-ares protobuf protobuf-native openssl libnsl2 abseil-cpp re2 zlib" +DEPENDS:append:class-target = " googletest grpc-native " +DEPENDS:append:class-nativesdk = " grpc-native " + +PACKAGE_BEFORE_PN = "${PN}-compiler" + +RDEPENDS:${PN}-compiler = "${PN}" +RDEPENDS:${PN}-dev:append:class-native = " ${PN}-compiler" +# Configuration above allows to cross-compile gRPC applications +# In order to compile applications on the target, use the dependency below +# Both dependencies are mutually exclusive +# RDEPENDS:${PN}-dev += "${PN}-compiler" + +S = "${WORKDIR}/git" +SRCREV_grpc = "e821cdc231bda9ee93139a6daab6311dd8953832" +BRANCH = "v1.66.x" +SRC_URI = "gitsm://github.com/grpc/grpc.git;protocol=https;name=grpc;branch=${BRANCH} \ + file://0001-cmake-Link-with-libatomic-on-rv32-rv64.patch \ + " +# Fixes build with older compilers 4.8 especially on ubuntu 14.04 +CXXFLAGS:append:class-native = " -Wl,--no-as-needed" + +inherit cmake pkgconfig + +EXTRA_OECMAKE = " \ + -DgRPC_CARES_PROVIDER=package \ + -DgRPC_ZLIB_PROVIDER=package \ + -DgRPC_SSL_PROVIDER=package \ + -DgRPC_PROTOBUF_PROVIDER=package \ + -D_gRPC_PROTOBUF_PROTOC_EXECUTABLE=${STAGING_BINDIR_NATIVE}/protoc \ + -DgRPC_ABSL_PROVIDER=package \ + -DgRPC_RE2_PROVIDER=package \ + -DgRPC_INSTALL=ON \ + -DCMAKE_CROSSCOMPILING=ON \ + -DgRPC_INSTALL_LIBDIR=${baselib} \ + -DgRPC_INSTALL_CMAKEDIR=${baselib}/cmake/${BPN} \ + " + +PACKAGECONFIG ??= "cpp shared" +PACKAGECONFIG[cpp] = "-DgRPC_BUILD_GRPC_CPP_PLUGIN=ON,-DgRPC_BUILD_GRPC_CPP_PLUGIN=OFF" +PACKAGECONFIG[csharp] = "-DgRPC_BUILD_GRPC_CSHARP_PLUGIN=ON,-DgRPC_BUILD_GRPC_CSHARP_PLUGIN=OFF" +PACKAGECONFIG[node] = "-DgRPC_BUILD_GRPC_NODE_PLUGIN=ON,-DgRPC_BUILD_GRPC_NODE_PLUGIN=OFF" +PACKAGECONFIG[objective-c] = "-DgRPC_BUILD_GRPC_OBJECTIVE_C_PLUGIN=ON,-DgRPC_BUILD_GRPC_OBJECTIVE_C_PLUGIN=OFF" +PACKAGECONFIG[php] = "-DgRPC_BUILD_GRPC_PHP_PLUGIN=ON,-DgRPC_BUILD_GRPC_PHP_PLUGIN=OFF" +PACKAGECONFIG[python] = "-DgRPC_BUILD_GRPC_PYTHON_PLUGIN=ON,-DgRPC_BUILD_GRPC_PYTHON_PLUGIN=OFF" +PACKAGECONFIG[ruby] = "-DgRPC_BUILD_GRPC_RUBY_PLUGIN=ON,-DgRPC_BUILD_GRPC_RUBY_PLUGIN=OFF" +PACKAGECONFIG[protobuf-lite] = "-DgRPC_USE_PROTO_LITE=ON,-DgRPC_USE_PROTO_LITE=OFF,protobuf-lite" +PACKAGECONFIG[shared] = "-DBUILD_SHARED_LIBS=ON,-DBUILD_SHARED_LIBS=OFF,," + +do_configure:prepend() { + sed -i -e "s#lib/pkgconfig/#${baselib}/pkgconfig/#g" ${S}/CMakeLists.txt +} + +BBCLASSEXTEND = "native nativesdk" + +FILES:${PN}-compiler += " \ + ${bindir} \ + ${libdir}/libgrpc_plugin_support${SOLIBS} \ + " diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/heaptrack/heaptrack_1.2.0.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/heaptrack/heaptrack_1.2.0.bb index be2c0f53..599fd2c3 100644 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/heaptrack/heaptrack_1.2.0.bb +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/heaptrack/heaptrack_1.2.0.bb @@ -30,3 +30,33 @@ COMPATIBLE_HOST:riscv32 = "null" COMPATIBLE_HOST:riscv64 = "null" BBCLASSEXTEND = "native" + +# http://errors.yoctoproject.org/Errors/Details/766879/ +# buildResult: +# variable: "LIBUNWIND_HAS_UNW_BACKTRACE" +# cached: true +# stdout: | +# Change Dir: '/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/heaptrack/1.2.0/build/CMakeFiles/CMakeScratch/TryCompile-kguYrO' +# +# Run Build Command(s): ninja -v cmTC_51d86 +# [1/2] ccache /OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/heaptrack/1.2.0/recipe-sysroot-native/usr/bin/aarch64-webos-linux/aarch64-webos-linux-gcc --sysroot=/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/heaptrack/1.2.0/recipe-sysroot -DLIBUNWIND_HAS_UNW_BACKTRACE -mcpu=cortex-a72+crc -mbranch-protection=standard -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -Werror=return-type --sysroot=/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/heaptrack/1.2.0/recipe-sysroot -O2 -pipe -g -feliminate-unused-debug-types -fcanon-prefix-map -fmacro-prefix-map=/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/heaptrack/1.2.0/git=/usr/src/debug/heaptrack/1.2.0 -fdebug-prefix-map=/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/heaptrack/1.2.0/git=/usr/src/debug/heaptrack/1.2.0 -fmacro-prefix-map=/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/heaptrack/1.2.0/build=/usr/src/debug/heaptrack/1.2.0 -fdebug-prefix-map=/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/heaptrack/1.2.0/build=/usr/src/debug/heaptrack/1.2.0 -fdebug-prefix-map=/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/heaptrack/1.2.0/recipe-sysroot= -fmacro-prefix-map=/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/heaptrack/1.2.0/recipe-sysroot= -fdebug-prefix-map=/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/heaptrack/1.2.0/recipe-sysroot-native= -o CMakeFiles/cmTC_51d86.dir/src.c.o -c /OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/heaptrack/1.2.0/build/CMakeFiles/CMakeScratch/TryCompile-kguYrO/src.c +# FAILED: CMakeFiles/cmTC_51d86.dir/src.c.o +# ccache /OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/heaptrack/1.2.0/recipe-sysroot-native/usr/bin/aarch64-webos-linux/aarch64-webos-linux-gcc --sysroot=/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/heaptrack/1.2.0/recipe-sysroot -DLIBUNWIND_HAS_UNW_BACKTRACE -mcpu=cortex-a72+crc -mbranch-protection=standard -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -Werror=return-type --sysroot=/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/heaptrack/1.2.0/recipe-sysroot -O2 -pipe -g -feliminate-unused-debug-types -fcanon-prefix-map -fmacro-prefix-map=/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/heaptrack/1.2.0/git=/usr/src/debug/heaptrack/1.2.0 -fdebug-prefix-map=/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/heaptrack/1.2.0/git=/usr/src/debug/heaptrack/1.2.0 -fmacro-prefix-map=/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/heaptrack/1.2.0/build=/usr/src/debug/heaptrack/1.2.0 -fdebug-prefix-map=/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/heaptrack/1.2.0/build=/usr/src/debug/heaptrack/1.2.0 -fdebug-prefix-map=/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/heaptrack/1.2.0/recipe-sysroot= -fmacro-prefix-map=/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/heaptrack/1.2.0/recipe-sysroot= -fdebug-prefix-map=/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/heaptrack/1.2.0/recipe-sysroot-native= -o CMakeFiles/cmTC_51d86.dir/src.c.o -c /OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/heaptrack/1.2.0/build/CMakeFiles/CMakeScratch/TryCompile-kguYrO/src.c +# src.c: In function 'main': +# src.c:3:43: error: passing argument 1 of 'unw_backtrace' from incompatible pointer type [-Wincompatible-pointer-types] +# 3 | int main() { void* buf[10]; unw_backtrace(&buf, 10); return 0; } +# | ^~~~ +# | | +# | void * (*)[10] +# In file included from ../../../../recipe-sysroot/usr/include/libunwind-aarch64.h:232, +# from ../../../../recipe-sysroot/usr/include/libunwind-64.h:7, +# from ../../../../recipe-sysroot/usr/include/libunwind.h:27, +# from src.c:2: +# ../../../../recipe-sysroot/usr/include/libunwind-common.h:290:27: note: expected 'void **' but argument is of type 'void * (*)[10]' +# 290 | extern int unw_backtrace (void **, int); +# | ^~~~~~~ +# ninja: build stopped: subcommand failed. +# +# exitCode: 1 +# +CFLAGS += "-Wno-error=incompatible-pointer-types" diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/iptraf/iptraf-ng_1.2.1.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/iptraf/iptraf-ng_1.2.1.bb index 0f6bbb4d..f9e2c787 100644 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/iptraf/iptraf-ng_1.2.1.bb +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/iptraf/iptraf-ng_1.2.1.bb @@ -42,7 +42,7 @@ do_compile() { do_install() { oe_runmake DESTDIR=${D} install install -D -m 0644 -p ${S}/iptraf-ng-logrotate.conf ${D}${sysconfdir}/logrotate.d/iptraf-ng - install -Dm 0644 ${WORKDIR}/iptraf-ng-tmpfiles.conf ${D}${libdir}/tmpfiles.d/iptraf-ng-tmpfiles.conf + install -Dm 0644 ${UNPACKDIR}/iptraf-ng-tmpfiles.conf ${D}${libdir}/tmpfiles.d/iptraf-ng-tmpfiles.conf } FILES:${PN} += "${libdir}/tmpfiles.d" diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/jq/jq/CVE-2024-23337.patch b/sources/meta-openembedded/meta-oe/recipes-devtools/jq/jq/CVE-2024-23337.patch deleted file mode 100644 index 93f55eec..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/jq/jq/CVE-2024-23337.patch +++ /dev/null @@ -1,233 +0,0 @@ -From d9237e3d607f946fe74540efa42a2eacca2a6fbd Mon Sep 17 00:00:00 2001 -From: itchyny -Date: Wed, 21 May 2025 07:45:00 +0900 -Subject: [PATCH] Fix signed integer overflow in jvp_array_write and - jvp_object_rehash - -This commit fixes signed integer overflow and SEGV issues on growing -arrays and objects. The size of arrays and objects is now limited to -`536870912` (`0x20000000`). This fixes CVE-2024-23337 and fixes #3262. - -(cherry picked from commit de21386681c0df0104a99d9d09db23a9b2a78b1e) -Signed-off-by: Roland Kovacs ---- - src/jv.c | 57 ++++++++++++++++++++++++++++++++++++++++----------- - src/jv_aux.c | 9 ++++---- - tests/jq.test | 4 ++++ - 3 files changed, 54 insertions(+), 16 deletions(-) - -diff --git a/src/jv.c b/src/jv.c -index 34573b8..15990f1 100644 ---- a/src/jv.c -+++ b/src/jv.c -@@ -1001,6 +1001,11 @@ jv jv_array_set(jv j, int idx, jv val) { - jv_free(val); - return jv_invalid_with_msg(jv_string("Out of bounds negative array index")); - } -+ if (idx > (INT_MAX >> 2) - jvp_array_offset(j)) { -+ jv_free(j); -+ jv_free(val); -+ return jv_invalid_with_msg(jv_string("Array index too large")); -+ } - // copy/free of val,j coalesced - jv* slot = jvp_array_write(&j, idx); - jv_free(*slot); -@@ -1020,6 +1025,7 @@ jv jv_array_concat(jv a, jv b) { - // FIXME: could be faster - jv_array_foreach(b, i, elem) { - a = jv_array_append(a, elem); -+ if (!jv_is_valid(a)) break; - } - jv_free(b); - return a; -@@ -1283,15 +1289,22 @@ jv jv_string_indexes(jv j, jv k) { - assert(JVP_HAS_KIND(k, JV_KIND_STRING)); - const char *jstr = jv_string_value(j); - const char *idxstr = jv_string_value(k); -- const char *p; -+ const char *p, *lp; - int jlen = jv_string_length_bytes(jv_copy(j)); - int idxlen = jv_string_length_bytes(jv_copy(k)); - jv a = jv_array(); - - if (idxlen != 0) { -- p = jstr; -+ int n = 0; -+ p = lp = jstr; - while ((p = _jq_memmem(p, (jstr + jlen) - p, idxstr, idxlen)) != NULL) { -- a = jv_array_append(a, jv_number(p - jstr)); -+ while (lp < p) { -+ lp += jvp_utf8_decode_length(*lp); -+ n++; -+ } -+ -+ a = jv_array_append(a, jv_number(n)); -+ if (!jv_is_valid(a)) break; - p++; - } - } -@@ -1314,14 +1327,17 @@ jv jv_string_split(jv j, jv sep) { - - if (seplen == 0) { - int c; -- while ((jstr = jvp_utf8_next(jstr, jend, &c))) -+ while ((jstr = jvp_utf8_next(jstr, jend, &c))) { - a = jv_array_append(a, jv_string_append_codepoint(jv_string(""), c)); -+ if (!jv_is_valid(a)) break; -+ } - } else { - for (p = jstr; p < jend; p = s + seplen) { - s = _jq_memmem(p, jend - p, sepstr, seplen); - if (s == NULL) - s = jend; - a = jv_array_append(a, jv_string_sized(p, s - p)); -+ if (!jv_is_valid(a)) break; - // Add an empty string to denote that j ends on a sep - if (s + seplen == jend && seplen != 0) - a = jv_array_append(a, jv_string("")); -@@ -1339,8 +1355,10 @@ jv jv_string_explode(jv j) { - const char* end = i + len; - jv a = jv_array_sized(len); - int c; -- while ((i = jvp_utf8_next(i, end, &c))) -+ while ((i = jvp_utf8_next(i, end, &c))) { - a = jv_array_append(a, jv_number(c)); -+ if (!jv_is_valid(a)) break; -+ } - jv_free(j); - return a; - } -@@ -1614,10 +1632,13 @@ static void jvp_object_free(jv o) { - } - } - --static jv jvp_object_rehash(jv object) { -+static int jvp_object_rehash(jv *objectp) { -+ jv object = *objectp; - assert(JVP_HAS_KIND(object, JV_KIND_OBJECT)); - assert(jvp_refcnt_unshared(object.u.ptr)); - int size = jvp_object_size(object); -+ if (size > INT_MAX >> 2) -+ return 0; - jv new_object = jvp_object_new(size * 2); - for (int i=0; ivalue; -+ *valpp = &slot->value; -+ return 1; - } - slot = jvp_object_add_slot(*object, key, bucket); - if (slot) { - slot->value = jv_invalid(); - } else { -- *object = jvp_object_rehash(*object); -+ if (!jvp_object_rehash(object)) { -+ *valpp = NULL; -+ return 0; -+ } - bucket = jvp_object_find_bucket(*object, key); - assert(!jvp_object_find_slot(*object, key, bucket)); - slot = jvp_object_add_slot(*object, key, bucket); - assert(slot); - slot->value = jv_invalid(); - } -- return &slot->value; -+ *valpp = &slot->value; -+ return 1; - } - - static int jvp_object_delete(jv* object, jv key) { -@@ -1779,7 +1806,11 @@ jv jv_object_set(jv object, jv key, jv value) { - assert(JVP_HAS_KIND(object, JV_KIND_OBJECT)); - assert(JVP_HAS_KIND(key, JV_KIND_STRING)); - // copy/free of object, key, value coalesced -- jv* slot = jvp_object_write(&object, key); -+ jv* slot; -+ if (!jvp_object_write(&object, key, &slot)) { -+ jv_free(object); -+ return jv_invalid_with_msg(jv_string("Object too big")); -+ } - jv_free(*slot); - *slot = value; - return object; -@@ -1804,6 +1835,7 @@ jv jv_object_merge(jv a, jv b) { - assert(JVP_HAS_KIND(a, JV_KIND_OBJECT)); - jv_object_foreach(b, k, v) { - a = jv_object_set(a, k, v); -+ if (!jv_is_valid(a)) break; - } - jv_free(b); - return a; -@@ -1823,6 +1855,7 @@ jv jv_object_merge_recursive(jv a, jv b) { - jv_free(elem); - a = jv_object_set(a, k, v); - } -+ if (!jv_is_valid(a)) break; - } - jv_free(b); - return a; -diff --git a/src/jv_aux.c b/src/jv_aux.c -index 6004799..bbe1c0d 100644 ---- a/src/jv_aux.c -+++ b/src/jv_aux.c -@@ -193,18 +193,19 @@ jv jv_set(jv t, jv k, jv v) { - if (slice_len < insert_len) { - // array is growing - int shift = insert_len - slice_len; -- for (int i = array_len - 1; i >= end; i--) { -+ for (int i = array_len - 1; i >= end && jv_is_valid(t); i--) { - t = jv_array_set(t, i + shift, jv_array_get(jv_copy(t), i)); - } - } else if (slice_len > insert_len) { - // array is shrinking - int shift = slice_len - insert_len; -- for (int i = end; i < array_len; i++) { -+ for (int i = end; i < array_len && jv_is_valid(t); i++) { - t = jv_array_set(t, i - shift, jv_array_get(jv_copy(t), i)); - } -- t = jv_array_slice(t, 0, array_len - shift); -+ if (jv_is_valid(t)) -+ t = jv_array_slice(t, 0, array_len - shift); - } -- for (int i=0; i < insert_len; i++) { -+ for (int i = 0; i < insert_len && jv_is_valid(t); i++) { - t = jv_array_set(t, start + i, jv_array_get(jv_copy(v), i)); - } - jv_free(v); -diff --git a/tests/jq.test b/tests/jq.test -index d052b22..22bfd3a 100644 ---- a/tests/jq.test -+++ b/tests/jq.test -@@ -198,6 +198,10 @@ null - [0,1,2] - [0,5,2] - -+try (.[999999999] = 0) catch . -+null -+"Array index too large" -+ - # - # Multiple outputs, iteration - # diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/jq/jq/CVE-2024-53427.patch b/sources/meta-openembedded/meta-oe/recipes-devtools/jq/jq/CVE-2024-53427.patch deleted file mode 100644 index 3e27a130..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/jq/jq/CVE-2024-53427.patch +++ /dev/null @@ -1,79 +0,0 @@ -From fa6131eb6e9d43e88e35982fa5f6049da2a77a87 Mon Sep 17 00:00:00 2001 -From: itchyny -Date: Wed, 5 Mar 2025 07:43:54 +0900 -Subject: [PATCH] Reject NaN with payload while parsing JSON - -This commit drops support for parsing NaN with payload in JSON like -`NaN123` and fixes CVE-2024-53427. Other JSON extensions like `NaN` and -`Infinity` are still supported. Fixes #3023, fixes #3196, fixes #3246. - -(cherry picked from commit a09a4dfd55e6c24d04b35062ccfe4509748b1dd3) -Signed-off-by: Roland Kovacs ---- - src/jv.c | 9 +++++++++ - tests/jq.test | 14 ++++++++++---- - tests/shtest | 5 ----- - 3 files changed, 19 insertions(+), 9 deletions(-) - -diff --git a/src/jv.c b/src/jv.c -index e23d8ec..34573b8 100644 ---- a/src/jv.c -+++ b/src/jv.c -@@ -589,6 +589,15 @@ static jv jvp_literal_number_new(const char * literal) { - jv_mem_free(n); - return JV_INVALID; - } -+ if (decNumberIsNaN(&n->num_decimal)) { -+ // Reject NaN with payload. -+ if (n->num_decimal.digits > 1 || *n->num_decimal.lsu != 0) { -+ jv_mem_free(n); -+ return JV_INVALID; -+ } -+ jv_mem_free(n); -+ return jv_number(NAN); -+ } - - jv r = {JVP_FLAGS_NUMBER_LITERAL, 0, 0, JV_NUMBER_SIZE_INIT, {&n->refcnt}}; - return r; -diff --git a/tests/jq.test b/tests/jq.test -index 7036df2..d052b22 100644 ---- a/tests/jq.test -+++ b/tests/jq.test -@@ -1938,11 +1938,17 @@ tojson | fromjson - {"a":nan} - {"a":null} - --# also "nan with payload" #2985 --fromjson | isnan --"nan1234" -+# NaN with payload is not parsed -+.[] | try (fromjson | isnan) catch . -+["NaN","-NaN","NaN1","NaN10","NaN100","NaN1000","NaN10000","NaN100000"] - true -- -+true -+"Invalid numeric literal at EOF at line 1, column 4 (while parsing 'NaN1')" -+"Invalid numeric literal at EOF at line 1, column 5 (while parsing 'NaN10')" -+"Invalid numeric literal at EOF at line 1, column 6 (while parsing 'NaN100')" -+"Invalid numeric literal at EOF at line 1, column 7 (while parsing 'NaN1000')" -+"Invalid numeric literal at EOF at line 1, column 8 (while parsing 'NaN10000')" -+"Invalid numeric literal at EOF at line 1, column 9 (while parsing 'NaN100000')" - - # calling input/0, or debug/0 in a test doesn't crash jq - -diff --git a/tests/shtest b/tests/shtest -index 14aafbf..a471889 100755 ---- a/tests/shtest -+++ b/tests/shtest -@@ -594,11 +594,6 @@ if ! x=$($JQ -n "1 # foo$cr + 2") || [ "$x" != 1 ]; then - exit 1 - fi - --# CVE-2023-50268: No stack overflow comparing a nan with a large payload --$VALGRIND $Q $JQ '1 != .' <<\EOF >/dev/null --Nan4000 --EOF -- - # Allow passing the inline jq script before -- #2919 - if ! r=$($JQ --args -rn -- '$ARGS.positional[0]' bar) || [ "$r" != bar ]; then - echo "passing the inline script after -- didn't work" diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/jq/jq/CVE-2025-48060.patch b/sources/meta-openembedded/meta-oe/recipes-devtools/jq/jq/CVE-2025-48060.patch deleted file mode 100644 index 237a5041..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/jq/jq/CVE-2025-48060.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 35c08446e4bcd89e0e87e7750c68306d6c0e9ec5 Mon Sep 17 00:00:00 2001 -From: itchyny -Date: Sat, 31 May 2025 11:46:40 +0900 -Subject: [PATCH] Fix heap buffer overflow when formatting an empty string - -The `jv_string_empty` did not properly null-terminate the string data, -which could lead to a heap buffer overflow. The test case of -GHSA-p7rr-28xf-3m5w (`0[""*0]`) was fixed by the commit dc849e9bb74a, -but another case (`0[[]|implode]`) was still vulnerable. This commit -ensures string data is properly null-terminated, and fixes CVE-2025-48060. - -(cherry picked from commit c6e041699d8cd31b97375a2596217aff2cfca85b) -Signed-off-by: Roland Kovacs ---- - src/jv.c | 1 + - tests/jq.test | 4 ++++ - 2 files changed, 5 insertions(+) - -diff --git a/src/jv.c b/src/jv.c -index 15990f1..18dbb54 100644 ---- a/src/jv.c -+++ b/src/jv.c -@@ -1125,6 +1125,7 @@ static jv jvp_string_empty_new(uint32_t length) { - jvp_string* s = jvp_string_alloc(length); - s->length_hashed = 0; - memset(s->data, 0, length); -+ s->data[length] = 0; - jv r = {JVP_FLAGS_STRING, 0, 0, 0, {&s->refcnt}}; - return r; - } -diff --git a/tests/jq.test b/tests/jq.test -index 22bfd3a..ecb9116 100644 ---- a/tests/jq.test -+++ b/tests/jq.test -@@ -2030,6 +2030,10 @@ map(try implode catch .) - [123,["a"],[nan]] - ["implode input must be an array","string (\"a\") can't be imploded, unicode codepoint needs to be numeric","number (null) can't be imploded, unicode codepoint needs to be numeric"] - -+try 0[implode] catch . -+[] -+"Cannot index number with string \"\"" -+ - # walk - walk(.) - {"x":0} diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/jq/jq_1.7.1.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/jq/jq_1.7.1.bb index 92384743..6b123355 100644 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/jq/jq_1.7.1.bb +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/jq/jq_1.7.1.bb @@ -11,9 +11,6 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=488f4e0b04c0456337fb70d1ac1758ba" GITHUB_BASE_URI = "https://github.com/jqlang/${BPN}/releases/" SRC_URI = "${GITHUB_BASE_URI}/download/${BPN}-${PV}/${BPN}-${PV}.tar.gz \ file://run-ptest \ - file://CVE-2024-23337.patch \ - file://CVE-2024-53427.patch \ - file://CVE-2025-48060.patch \ " SRC_URI[sha256sum] = "478c9ca129fd2e3443fe27314b455e211e0d8c60bc8ff7df703873deeee580c2" diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.9.5.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.9.5.bb deleted file mode 100644 index c54dc946..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.9.5.bb +++ /dev/null @@ -1,25 +0,0 @@ -SUMMARY = "JSON C++ lib used to read and write json file." -DESCRIPTION = "Jsoncpp is an implementation of a JSON (http://json.org) reader \ - and writer in C++. JSON (JavaScript Object Notation) is a \ - lightweight data-interchange format. It is easy for humans to \ - read and write. It is easy for machines to parse and generate." - -HOMEPAGE = "https://github.com/open-source-parsers/jsoncpp" - -SECTION = "libs" - -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=5d73c165a0f9e86a1342f32d19ec5926" - -PE = "1" - -SRCREV = "5defb4ed1a4293b8e2bf641e16b156fb9de498cc" -SRC_URI = "git://github.com/open-source-parsers/jsoncpp;branch=master;protocol=https" - -S = "${WORKDIR}/git" - -inherit cmake - -EXTRA_OECMAKE += "-DBUILD_SHARED_LIBS=ON -DBUILD_OBJECT_LIBS=OFF -DJSONCPP_WITH_TESTS=OFF" - -BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.9.6.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.9.6.bb new file mode 100644 index 00000000..ade9f35d --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.9.6.bb @@ -0,0 +1,25 @@ +SUMMARY = "JSON C++ lib used to read and write json file." +DESCRIPTION = "Jsoncpp is an implementation of a JSON (http://json.org) reader \ + and writer in C++. JSON (JavaScript Object Notation) is a \ + lightweight data-interchange format. It is easy for humans to \ + read and write. It is easy for machines to parse and generate." + +HOMEPAGE = "https://github.com/open-source-parsers/jsoncpp" + +SECTION = "libs" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=5d73c165a0f9e86a1342f32d19ec5926" + +PE = "1" + +SRCREV = "89e2973c754a9c02a49974d839779b151e95afd6" +SRC_URI = "git://github.com/open-source-parsers/jsoncpp;branch=master;protocol=https" + +S = "${WORKDIR}/git" + +inherit cmake + +EXTRA_OECMAKE += "-DBUILD_SHARED_LIBS=ON -DBUILD_OBJECT_LIBS=OFF -DJSONCPP_WITH_TESTS=OFF" + +BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/kconfig-frontends/kconfig-frontends_4.11.0.1.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/kconfig-frontends/kconfig-frontends_4.11.0.1.bb index b894f0ba..efa8c936 100644 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/kconfig-frontends/kconfig-frontends_4.11.0.1.bb +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/kconfig-frontends/kconfig-frontends_4.11.0.1.bb @@ -20,6 +20,9 @@ SRC_URI = "git://gitlab.com/ymorin/kconfig-frontends.git;protocol=https;branch=4 SRCREV = "f22fce3a308be1c7790ebefc6bbedb33c5f7c86a" +# Upstream repo does not tag +UPSTREAM_CHECK_COMMITS = "1" + S = "${WORKDIR}/git" inherit autotools pkgconfig diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/ldns/ldns_1.8.3.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/ldns/ldns_1.8.3.bb deleted file mode 100644 index 80e55719..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/ldns/ldns_1.8.3.bb +++ /dev/null @@ -1,24 +0,0 @@ -SUMMARY = "LDNS is a DNS library that facilitates DNS tool programming" -HOMEPAGE = "https://nlnetlabs.nl/ldns" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=34330f15b2b4abbbaaa7623f79a6a019" - -SRC_URI = "https://www.nlnetlabs.nl/downloads/ldns/ldns-${PV}.tar.gz" -SRC_URI[sha256sum] = "c3f72dd1036b2907e3a56e6acf9dfb2e551256b3c1bbd9787942deeeb70e7860" - -DEPENDS = "openssl" - -inherit autotools-brokensep - -PACKAGECONFIG ??= "" -PACKAGECONFIG[drill] = "--with-drill,--without-drill" - -EXTRA_OECONF = "--with-ssl=${STAGING_EXECPREFIXDIR}" - -do_install:append() { - sed -e 's@[^ ]*-ffile-prefix-map=[^ "]*@@g' \ - -e 's@[^ ]*-fdebug-prefix-map=[^ "]*@@g' \ - -e 's@[^ ]*-fmacro-prefix-map=[^ "]*@@g' \ - -e 's@${RECIPE_SYSROOT}@@g' \ - -i ${D}${libdir}/pkgconfig/*.pc ${D}${bindir}/ldns-config -} diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/ldns/ldns_1.8.4.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/ldns/ldns_1.8.4.bb new file mode 100644 index 00000000..f071f579 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/ldns/ldns_1.8.4.bb @@ -0,0 +1,24 @@ +SUMMARY = "LDNS is a DNS library that facilitates DNS tool programming" +HOMEPAGE = "https://nlnetlabs.nl/ldns" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=34330f15b2b4abbbaaa7623f79a6a019" + +SRC_URI = "https://www.nlnetlabs.nl/downloads/ldns/ldns-${PV}.tar.gz" +SRC_URI[sha256sum] = "838b907594baaff1cd767e95466a7745998ae64bc74be038dccc62e2de2e4247" + +DEPENDS = "openssl" + +inherit autotools-brokensep + +PACKAGECONFIG ??= "" +PACKAGECONFIG[drill] = "--with-drill,--without-drill" + +EXTRA_OECONF = "--with-ssl=${STAGING_EXECPREFIXDIR}" + +do_install:append() { + sed -e 's@[^ ]*-ffile-prefix-map=[^ "]*@@g' \ + -e 's@[^ ]*-fdebug-prefix-map=[^ "]*@@g' \ + -e 's@[^ ]*-fmacro-prefix-map=[^ "]*@@g' \ + -e 's@${RECIPE_SYSROOT}@@g' \ + -i ${D}${libdir}/pkgconfig/*.pc ${D}${bindir}/ldns-config +} diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/libabigail/libabigail/0001-Check-for-correct-fts-module.patch b/sources/meta-openembedded/meta-oe/recipes-devtools/libabigail/libabigail/0001-Check-for-correct-fts-module.patch new file mode 100644 index 00000000..7c500e0b --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/libabigail/libabigail/0001-Check-for-correct-fts-module.patch @@ -0,0 +1,91 @@ +From 0db4af09f1bf4456527b5f6ec60fc1305e770c4c Mon Sep 17 00:00:00 2001 +From: Ross Burton +Date: Tue, 9 Jul 2024 15:19:35 +0100 +Subject: [PATCH] configure.ac: improve fts checks + +The current code checks explicitly for musl and if so uses pkg-config to +find fts-standalone. This is suboptimal because musl may not be the only +libc to need a standalone fts implementation, and fts-standalone is an +old gentoo-specific name[1] so libabigail won't build on any other system +against musl. + +Instead, use AC_SEARCH_LIBS to look for fts_open in libc then libfts. Do +this before the check for behaviour just in case someone has a standalone +and broken implementation. I assume that the standalone fts is installed +on the standard search path, which should be a fair assumption. + +As we're not using pkg-config anymore the required link flags are now in +LIBS, so remove all instances of FTS_CFLAGS and FTS_LIBS. + +[1] https://gitweb.gentoo.org/repo/gentoo.git/commit/sys-libs/fts-standalone?id=a403fe6c61d1aaeecd58d521f3def2f6d3513449 + +Upstream-Status: Submitted [https://sourceware.org/pipermail/libabigail/2024q3/005973.html] +Signed-off-by: Ross Burton +--- + configure.ac | 9 ++++----- + src/Makefile.am | 4 ++-- + tools/Makefile.am | 2 -- + 3 files changed, 6 insertions(+), 9 deletions(-) + +diff --git a/configure.ac b/configure.ac +index e118a9c0..0aff2ec2 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -281,6 +281,10 @@ fi + + AC_SUBST(VISIBILITY_FLAGS) + ++# glibc and BSD include fts into their libc, but musl does not so check if we ++# need to explicitly link to the standalone musl-fts. ++AC_SEARCH_LIBS([fts_open], [fts]) ++ + dnl Older glibc had a broken fts that didn't work with Large File Systems. + dnl We want the version that can handler LFS, but include workaround if we + dnl get a bad one. Add define to CFLAGS (not AC_DEFINE it) since we need to +@@ -295,11 +299,6 @@ AS_IF([test "x$ac_cv_bad_fts" = "xyes"], + [CFLAGS="$CFLAGS -DBAD_FTS=1", + CXXFLAGS="$CXXFLAGS -DBAD_FTS=1"]) + +-dnl On musl, we need to find fts-standalone +-AS_CASE( +- [${host_os}], [*-musl*], [ +- PKG_CHECK_MODULES([FTS], [fts-standalone]) +-]) + + dnl Check for dependency: libelf, libdw, libebl (elfutils) + dnl Note that we need to use at least elfutils 0.159 but +diff --git a/src/Makefile.am b/src/Makefile.am +index 3044c136..1c98bf84 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -52,12 +52,12 @@ if BTF_READER + libabigail_la_SOURCES += abg-btf-reader.cc + endif + +-libabigail_la_LIBADD = $(DEPS_LIBS) $(FTS_LIBS) ++libabigail_la_LIBADD = $(DEPS_LIBS) + libabigail_la_LDFLAGS = -lpthread -Wl,--as-needed -no-undefined -version-info $(LIBABIGAIL_SO_CURRENT):$(LIBABIGAIL_SO_REVISION):$(LIBABIGAIL_SO_AGE) + + CUSTOM_MACROS = -DABIGAIL_ROOT_SYSTEM_LIBDIR=\"${libdir}\" + + AM_CPPFLAGS=\ +-$(CUSTOM_MACROS) $(DEPS_CPPFLAGS) $(FTS_CFLAGS) \ ++$(CUSTOM_MACROS) $(DEPS_CPPFLAGS) \ + -Wall -I$(abs_top_srcdir) -I$(abs_top_srcdir)/include \ + -I$(abs_top_builddir)/include -I$(abs_top_builddir) +diff --git a/tools/Makefile.am b/tools/Makefile.am +index cbb5ce10..ea2d300c 100644 +--- a/tools/Makefile.am ++++ b/tools/Makefile.am +@@ -41,8 +41,6 @@ abicompatdir = $(bindir) + + abipkgdiff_SOURCES = abipkgdiff.cc + abipkgdiffdir = $(bindir) +-abipkgdiff_CPPFLAGS = $(FTS_CFLAGS) +-abipkgdiff_LDADD = $(FTS_LIBS) + abipkgdiff_LDFLAGS = $(abs_top_builddir)/src/libabigail.la -pthread + + kmidiff_SOURCES = kmidiff.cc +-- +2.34.1 + diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/libabigail/libabigail_2.5.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/libabigail/libabigail_2.5.bb new file mode 100644 index 00000000..5c262d28 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/libabigail/libabigail_2.5.bb @@ -0,0 +1,17 @@ +SUMMARY = "The ABI Generic Analysis and Instrumentation Library" +HOMEPAGE = "https://sourceware.org/libabigail/" + +LICENSE = "Apache-2.0-with-LLVM-exception" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=0bcd48c3bdfef0c9d9fd17726e4b7dab" + +SRC_URI = "http://mirrors.kernel.org/sourceware/${BPN}/${BP}.tar.xz \ + file://0001-Check-for-correct-fts-module.patch \ + " +SRC_URI[sha256sum] = "7cfc4e9b00ae38d87fb0c63beabb32b9cbf9ce410e52ceeb5ad5b3c5beb111f3" + +DEPENDS = "elfutils libxml2" +DEPENDS:append:libc-musl = " fts" + +inherit autotools pkgconfig lib_package + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/libgee/libgee_0.20.6.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/libgee/libgee_0.20.6.bb index 0ed6e823..7e2781bc 100644 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/libgee/libgee_0.20.6.bb +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/libgee/libgee_0.20.6.bb @@ -11,6 +11,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24" GNOMEBASEBUILDCLASS = "autotools" inherit gnomebase vala gobject-introspection +CFLAGS += "-Wno-incompatible-pointer-types" + do_configure:prepend() { MACROS="libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4" for i in ${MACROS}; do @@ -19,3 +21,38 @@ do_configure:prepend() { } SRC_URI[archive.sha256sum] = "1bf834f5e10d60cc6124d74ed3c1dd38da646787fbf7872220b8b4068e476d4d" + +# http://errors.yoctoproject.org/Errors/Details/766884/ +# libgee-0.20.6/gee/concurrentlist.c:1169:177: error: passing argument 4 of 'gee_hazard_pointer_get_pointer' from incompatible pointer type [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/concurrentlist.c:1175:168: error: passing argument 4 of 'gee_hazard_pointer_set_pointer' from incompatible pointer type [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/concurrentlist.c:2385:194: error: passing argument 4 of 'gee_hazard_pointer_compare_and_exchange_pointer' from incompatible pointer type [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/concurrentlist.c:2438:177: error: passing argument 4 of 'gee_hazard_pointer_get_pointer' from incompatible pointer type [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/concurrentlist.c:2460:168: error: passing argument 4 of 'gee_hazard_pointer_set_pointer' from incompatible pointer type [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/concurrentlist.c:2469:177: error: passing argument 4 of 'gee_hazard_pointer_get_pointer' from incompatible pointer type [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/concurrentlist.c:2481:185: error: passing argument 4 of 'gee_hazard_pointer_compare_and_exchange_pointer' from incompatible pointer type [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/concurrentlist.c:2640:168: error: passing argument 4 of 'gee_hazard_pointer_set_pointer' from incompatible pointer type [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/concurrentlist.c:2641:168: error: passing argument 4 of 'gee_hazard_pointer_set_pointer' from incompatible pointer type [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/concurrentlist.c:2750:168: error: passing argument 4 of 'gee_hazard_pointer_set_pointer' from incompatible pointer type [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/concurrentlist.c:469:168: error: passing argument 4 of 'gee_hazard_pointer_set_pointer' from incompatible pointer type [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/concurrentlist.c:514:168: error: passing argument 4 of 'gee_hazard_pointer_set_pointer' from incompatible pointer type [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/concurrentlist.c:713:168: error: passing argument 4 of 'gee_hazard_pointer_set_pointer' from incompatible pointer type [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/concurrentset.c:3635:185: error: passing argument 4 of 'gee_hazard_pointer_get_pointer' from incompatible pointer type [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/concurrentset.c:4950:201: error: passing argument 4 of 'gee_hazard_pointer_get_pointer' from incompatible pointer type [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/concurrentset.c:5378:201: error: passing argument 4 of 'gee_hazard_pointer_get_pointer' from incompatible pointer type [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/concurrentset.c:5428:226: error: passing argument 4 of 'gee_hazard_pointer_get_pointer' from incompatible pointer type [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/concurrentset.c:5480:218: error: passing argument 4 of 'gee_hazard_pointer_get_pointer' from incompatible pointer type [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/concurrentset.c:5530:238: error: passing argument 4 of 'gee_hazard_pointer_compare_and_exchange_pointer' from incompatible pointer type [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/concurrentset.c:5532:234: error: passing argument 4 of 'gee_hazard_pointer_get_pointer' from incompatible pointer type [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/concurrentset.c:5623:246: error: passing argument 4 of 'gee_hazard_pointer_compare_and_exchange_pointer' from incompatible pointer type [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/concurrentset.c:5625:242: error: passing argument 4 of 'gee_hazard_pointer_get_pointer' from incompatible pointer type [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/concurrentset.c:7088:194: error: passing argument 4 of 'gee_hazard_pointer_compare_and_exchange_pointer' from incompatible pointer type [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/concurrentset.c:7157:177: error: passing argument 4 of 'gee_hazard_pointer_get_pointer' from incompatible pointer type [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/concurrentset.c:7184:168: error: passing argument 4 of 'gee_hazard_pointer_set_pointer' from incompatible pointer type [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/concurrentset.c:7198:177: error: passing argument 4 of 'gee_hazard_pointer_get_pointer' from incompatible pointer type [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/concurrentset.c:7215:185: error: passing argument 4 of 'gee_hazard_pointer_compare_and_exchange_pointer' from incompatible pointer type [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/hashmap.c:4089:30: error: assignment to 'gboolean (*)(GeeMapIterator *)' {aka 'int (*)(struct _GeeMapIterator *)'} from incompatible pointer type 'gboolean (*)(GeeHashMapNodeIterator *)' {aka 'int (*)(struct _GeeHashMapNodeIterator *)'} [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/hazardpointer.c:430:134: error: passing argument 4 of 'gee_hazard_pointer_release_policy_swap' from incompatible pointer type [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/hazardpointer.c:430:171: error: passing argument 5 of 'gee_hazard_pointer_release_policy_swap' from incompatible pointer type [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/hazardpointer.c:434:134: error: passing argument 4 of 'gee_hazard_pointer_release_policy_swap' from incompatible pointer type [-Wincompatible-pointer-types] +# libgee-0.20.6/gee/hazardpointer.c:434:171: error: passing argument 5 of 'gee_hazard_pointer_release_policy_swap' from incompatible pointer type [-Wincompatible-pointer-types] +CFLAGS += "-Wno-error=incompatible-pointer-types" diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/libubox/libubox_git.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/libubox/libubox_git.bb index 39e18cda..131929b3 100644 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/libubox/libubox_git.bb +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/libubox/libubox_git.bb @@ -22,6 +22,9 @@ SRC_URI = "\ SRCREV = "07413cce72e19520af55dfcbc765484f5ab41dd9" PV = "1.0.1+git" +# Upstream repo does not tag +UPSTREAM_CHECK_COMMITS = "1" + S = "${WORKDIR}/git" inherit cmake pkgconfig diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/ltrace/ltrace/0001-ARM-code-has-unreachable-code-after-switch-statement.patch b/sources/meta-openembedded/meta-oe/recipes-devtools/ltrace/ltrace/0001-ARM-code-has-unreachable-code-after-switch-statement.patch deleted file mode 100644 index c896e3eb..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/ltrace/ltrace/0001-ARM-code-has-unreachable-code-after-switch-statement.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 95ff340a74af16cca89fd5c5ca99890821053209 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sat, 22 Apr 2017 00:47:16 -0700 -Subject: [PATCH] ARM code has unreachable code after switch statement move - initialization - -Fixed -sysdeps/linux-gnu/arm/trace.c:173:33: error: statement will never be executed [-Werror=switch-unreachable] - uint32_t operand1, operand2, result = 0; - ^~~~~~ - -Signed-off-by: Khem Raj ---- -Upstream-Status: Pending - - sysdeps/linux-gnu/arm/trace.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/sysdeps/linux-gnu/arm/trace.c b/sysdeps/linux-gnu/arm/trace.c -index 5e51e91..f974d1f 100644 ---- a/sysdeps/linux-gnu/arm/trace.c -+++ b/sysdeps/linux-gnu/arm/trace.c -@@ -155,6 +155,8 @@ arm_get_next_pcs(struct process *proc, - const unsigned cond = BITS(this_instr, 28, 31); - const unsigned opcode = BITS(this_instr, 24, 27); - -+ uint32_t operand1, operand2, result = 0; -+ - if (cond == COND_NV) - switch (opcode) { - arch_addr_t addr; -@@ -170,7 +172,6 @@ arm_get_next_pcs(struct process *proc, - } - else - switch (opcode) { -- uint32_t operand1, operand2, result = 0; - case 0x0: - case 0x1: /* data processing */ - case 0x2: --- -2.12.2 - diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/ltrace/ltrace/0001-Fix-tautological-compare-warning.patch b/sources/meta-openembedded/meta-oe/recipes-devtools/ltrace/ltrace/0001-Fix-tautological-compare-warning.patch deleted file mode 100644 index a599d0e1..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/ltrace/ltrace/0001-Fix-tautological-compare-warning.patch +++ /dev/null @@ -1,261 +0,0 @@ -From 0af8ced6376f2256b9daac301c851e1c99c3b035 Mon Sep 17 00:00:00 2001 -From: Adam Trhon -Date: Fri, 12 May 2017 13:39:11 +0200 -Subject: [PATCH] Fix tautological compare warning - -By default, gcc ignores warning from code generated by macros -(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80369). When -ltrace is compiled under icecream the warning *is generated* -(https://github.com/icecc/icecream/issues/202) -and the compilation fails (because of -Werror). - -Upstream-Status: Submitted [ltrace-devel@lists.alioth.debian.org] - -Signed-off-by: Adam Trhon ---- - filter.c | 4 ++-- - sysdeps/linux-gnu/arm/fetch.c | 2 +- - sysdeps/linux-gnu/arm/trace.c | 2 +- - sysdeps/linux-gnu/ia64/fetch.c | 2 +- - sysdeps/linux-gnu/metag/trace.c | 2 +- - sysdeps/linux-gnu/mips/plt.c | 2 +- - sysdeps/linux-gnu/ppc/fetch.c | 2 +- - sysdeps/linux-gnu/ppc/plt.c | 2 +- - sysdeps/linux-gnu/ppc/trace.c | 4 ++-- - sysdeps/linux-gnu/s390/fetch.c | 2 +- - sysdeps/linux-gnu/s390/trace.c | 4 ++-- - sysdeps/linux-gnu/x86/fetch.c | 2 +- - sysdeps/linux-gnu/x86/trace.c | 4 ++-- - value.c | 4 ++-- - 14 files changed, 19 insertions(+), 19 deletions(-) - -diff --git a/filter.c b/filter.c -index ba50c40..a65856d 100644 ---- a/filter.c -+++ b/filter.c -@@ -79,7 +79,7 @@ filter_lib_matcher_name_init(struct filter_lib_matcher *matcher, - { - switch (type) { - case FLM_MAIN: -- assert(type != type); -+ assert(!"Unexpected value of type"); - abort(); - - case FLM_SONAME: -@@ -137,7 +137,7 @@ matcher_matches_library(struct filter_lib_matcher *matcher, struct library *lib) - case FLM_MAIN: - return lib->type == LT_LIBTYPE_MAIN; - } -- assert(matcher->type != matcher->type); -+ assert(!"Unexpected value of matcher->type"); - abort(); - } - -diff --git a/sysdeps/linux-gnu/arm/fetch.c b/sysdeps/linux-gnu/arm/fetch.c -index b500448..8f75fcf 100644 ---- a/sysdeps/linux-gnu/arm/fetch.c -+++ b/sysdeps/linux-gnu/arm/fetch.c -@@ -317,7 +317,7 @@ arch_fetch_retval(struct fetch_context *ctx, enum tof type, - memmove(data, ctx->regs.uregs, sz); - return 0; - } -- assert(info->type != info->type); -+ assert(!"Unexpected value of info->type"); - abort(); - } - -diff --git a/sysdeps/linux-gnu/arm/trace.c b/sysdeps/linux-gnu/arm/trace.c -index 5e51e91..e76bf63 100644 ---- a/sysdeps/linux-gnu/arm/trace.c -+++ b/sysdeps/linux-gnu/arm/trace.c -@@ -701,7 +701,7 @@ arch_type_sizeof(struct process *proc, struct arg_type_info *info) - return (size_t)-2; - - default: -- assert(info->type != info->type); -+ assert(!"Unexpected value of info->type"); - abort(); - } - } -diff --git a/sysdeps/linux-gnu/ia64/fetch.c b/sysdeps/linux-gnu/ia64/fetch.c -index 171c7a2..ee2fbc7 100644 ---- a/sysdeps/linux-gnu/ia64/fetch.c -+++ b/sysdeps/linux-gnu/ia64/fetch.c -@@ -409,7 +409,7 @@ arch_fetch_arg_next(struct fetch_context *ctx, enum tof type, - case ARGTYPE_ARRAY: - /* Arrays decay into pointers. XXX Fortran? */ - default: -- assert(info->type != info->type); -+ assert(!"Unexpected value of info->type"); - abort(); - } - } -diff --git a/sysdeps/linux-gnu/metag/trace.c b/sysdeps/linux-gnu/metag/trace.c -index ad5fffe..7a843d6 100644 ---- a/sysdeps/linux-gnu/metag/trace.c -+++ b/sysdeps/linux-gnu/metag/trace.c -@@ -142,7 +142,7 @@ get_regval_from_unit(enum metag_unitnum unit, unsigned int reg, - return regs->ax[reg][0]; - /* We really shouldn't be here. */ - default: -- assert(unit != unit); -+ assert(!"Unexpected value of unit"); - abort(); - } - return 0; -diff --git a/sysdeps/linux-gnu/mips/plt.c b/sysdeps/linux-gnu/mips/plt.c -index c7c10ac..ca2307d 100644 ---- a/sysdeps/linux-gnu/mips/plt.c -+++ b/sysdeps/linux-gnu/mips/plt.c -@@ -651,7 +651,7 @@ mips_stub_bp_continue(struct breakpoint *bp, struct process *proc) - break; - } - -- assert(bp->libsym->arch.type != bp->libsym->arch.type); -+ assert(!"Unexpected value of bp->libsym->arch.type"); - abort(); - } - -diff --git a/sysdeps/linux-gnu/ppc/fetch.c b/sysdeps/linux-gnu/ppc/fetch.c -index c6cbd71..5db5675 100644 ---- a/sysdeps/linux-gnu/ppc/fetch.c -+++ b/sysdeps/linux-gnu/ppc/fetch.c -@@ -502,7 +502,7 @@ allocate_argument(struct fetch_context *ctx, struct process *proc, - case ARGTYPE_ARRAY: - /* Arrays decay into pointers. XXX Fortran? */ - default: -- assert(info->type != info->type); -+ assert(!"Unexpected value of info->type"); - abort(); - } - -diff --git a/sysdeps/linux-gnu/ppc/plt.c b/sysdeps/linux-gnu/ppc/plt.c -index 5f81889..781da03 100644 ---- a/sysdeps/linux-gnu/ppc/plt.c -+++ b/sysdeps/linux-gnu/ppc/plt.c -@@ -1085,7 +1085,7 @@ ppc_plt_bp_continue(struct breakpoint *bp, struct process *proc) - break; - } - -- assert(bp->libsym->arch.type != bp->libsym->arch.type); -+ assert(!"Unexpected value of bp->libsym->arch.type"); - abort(); - } - -diff --git a/sysdeps/linux-gnu/ppc/trace.c b/sysdeps/linux-gnu/ppc/trace.c -index 5aab538..caa6035 100644 ---- a/sysdeps/linux-gnu/ppc/trace.c -+++ b/sysdeps/linux-gnu/ppc/trace.c -@@ -217,7 +217,7 @@ arch_type_sizeof(struct process *proc, struct arg_type_info *info) - return (size_t)-2; - - default: -- assert(info->type != info->type); -+ assert(!"Unexpected value of info->type"); - abort(); - break; - } -@@ -231,7 +231,7 @@ arch_type_alignof(struct process *proc, struct arg_type_info *info) - - switch (info->type) { - default: -- assert(info->type != info->type); -+ assert(!"Unexpected value of info->type"); - abort(); - break; - -diff --git a/sysdeps/linux-gnu/s390/fetch.c b/sysdeps/linux-gnu/s390/fetch.c -index 4ad5951..4721c30 100644 ---- a/sysdeps/linux-gnu/s390/fetch.c -+++ b/sysdeps/linux-gnu/s390/fetch.c -@@ -266,7 +266,7 @@ arch_fetch_arg_next(struct fetch_context *ctx, enum tof type, - return allocate_gpr(ctx, proc, info, valuep, sz); - - default: -- assert(info->type != info->type); -+ assert(!"Unexpected value of info->type"); - abort(); - } - return -1; -diff --git a/sysdeps/linux-gnu/s390/trace.c b/sysdeps/linux-gnu/s390/trace.c -index 78b04c3..24f7801 100644 ---- a/sysdeps/linux-gnu/s390/trace.c -+++ b/sysdeps/linux-gnu/s390/trace.c -@@ -213,7 +213,7 @@ arch_type_sizeof(struct process *proc, struct arg_type_info *info) - return (size_t)-2; - - default: -- assert(info->type != info->type); -+ assert(!"Unexpected value of info->type"); - abort(); - } - } -@@ -226,7 +226,7 @@ arch_type_alignof(struct process *proc, struct arg_type_info *info) - - switch (info->type) { - default: -- assert(info->type != info->type); -+ assert(!"Unexpected value of info->type"); - break; - - case ARGTYPE_CHAR: -diff --git a/sysdeps/linux-gnu/x86/fetch.c b/sysdeps/linux-gnu/x86/fetch.c -index 6868101..ae2ed79 100644 ---- a/sysdeps/linux-gnu/x86/fetch.c -+++ b/sysdeps/linux-gnu/x86/fetch.c -@@ -523,7 +523,7 @@ classify(struct process *proc, struct fetch_context *context, - - default: - /* Unsupported type. */ -- assert(info->type != info->type); -+ assert(!"Unexpected value of info->type"); - abort(); - } - abort(); -diff --git a/sysdeps/linux-gnu/x86/trace.c b/sysdeps/linux-gnu/x86/trace.c -index 6a1a6a5..d8d2115 100644 ---- a/sysdeps/linux-gnu/x86/trace.c -+++ b/sysdeps/linux-gnu/x86/trace.c -@@ -145,7 +145,7 @@ arch_type_sizeof(struct process *proc, struct arg_type_info *info) - return (size_t)-2; - - default: -- assert(info->type != info->type); -+ assert(!"Unexpected value of info->type"); - abort(); - } - } -@@ -158,7 +158,7 @@ arch_type_alignof(struct process *proc, struct arg_type_info *info) - - switch (info->type) { - default: -- assert(info->type != info->type); -+ assert(!"Unexpected value of info->type"); - abort(); - break; - -diff --git a/value.c b/value.c -index 2125ba9..30edb4e 100644 ---- a/value.c -+++ b/value.c -@@ -363,7 +363,7 @@ value_set_word(struct value *value, long word) - u.u64 = word; - break; - default: -- assert(sz != sz); -+ assert(!"Unexpected value of sz"); - abort(); - } - -@@ -414,7 +414,7 @@ value_extract_word(struct value *value, long *retp, - *retp = (long)u.u64; - return 0; - default: -- assert(sz != sz); -+ assert(!"Unexpected value of sz"); - abort(); - } - } --- -2.12.0 - diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/ltrace/ltrace/0001-ensure-the-struct-pointers-are-null-initilized.patch b/sources/meta-openembedded/meta-oe/recipes-devtools/ltrace/ltrace/0001-ensure-the-struct-pointers-are-null-initilized.patch deleted file mode 100644 index 9def41ca..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/ltrace/ltrace/0001-ensure-the-struct-pointers-are-null-initilized.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 67a8fa478a4484bc4dbfb3ac74e11be1dd5af594 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Mon, 23 Dec 2019 19:35:48 -0800 -Subject: [PATCH] ensure the struct pointers are null initilized - -Do not delete if pointer is already null - -Upstream-Status: Pending - -Signed-off-by: Khem Raj ---- - expr.c | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/expr.c b/expr.c -index 4059a32..5ffd0ad 100644 ---- a/expr.c -+++ b/expr.c -@@ -189,10 +189,8 @@ int - expr_clone(struct expr_node *retp, const struct expr_node *node) - { - *retp = *node; -- -+ struct expr_node *nlhs = 0, *nrhs = 0; - switch (node->kind) { -- struct expr_node *nlhs; -- struct expr_node *nrhs; - - case EXPR_OP_ARGNO: - case EXPR_OP_SELF: -@@ -236,8 +234,10 @@ expr_clone(struct expr_node *retp, const struct expr_node *node) - if (expr_alloc_and_clone(&nlhs, node->lhs, node->own_lhs) < 0) { - if (node->kind == EXPR_OP_CALL2 - && node->u.call.own_rhs) { -- expr_destroy(nrhs); -- free(nrhs); -+ if (nrhs) { -+ expr_destroy(nrhs); -+ free(nrhs); -+ } - return -1; - } - } --- -2.24.1 - diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/ltrace/ltrace/0001-ppc-plt-do-not-free-symbol-libsym.patch b/sources/meta-openembedded/meta-oe/recipes-devtools/ltrace/ltrace/0001-ppc-plt-do-not-free-symbol-libsym.patch deleted file mode 100644 index 4793e561..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/ltrace/ltrace/0001-ppc-plt-do-not-free-symbol-libsym.patch +++ /dev/null @@ -1,29 +0,0 @@ -From f47672bed5905ae382e80b09dafca9a8da45aa67 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Tue, 19 Apr 2022 18:44:36 -0700 -Subject: [PATCH] ppc/plt: do not free symbol libsym - -delete_symbol_chain() will call free as well if sybol is non-null -it also fixes use-after-free warnings that compiler emits - -Upstream-Status: Submitted [https://gitlab.com/cespedes/ltrace/-/merge_requests/2] -Signed-off-by: Khem Raj ---- - sysdeps/linux-gnu/ppc/plt.c | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/sysdeps/linux-gnu/ppc/plt.c b/sysdeps/linux-gnu/ppc/plt.c -index 5f81889..7c1c025 100644 ---- a/sysdeps/linux-gnu/ppc/plt.c -+++ b/sysdeps/linux-gnu/ppc/plt.c -@@ -687,7 +687,6 @@ arch_elf_add_func_entry(struct process *proc, struct ltelf *lte, - if (libsym == NULL - || library_symbol_init(libsym, addr, full_name, 1, - LS_TOPLT_NONE) < 0) { -- free(libsym); - delete_symbol_chain(libsym); - libsym = NULL; - fprintf(stderr, "Couldn't add symbol %s" --- -2.36.0 - diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/ltrace/ltrace/0001-proc-Make-PROC_PID_FILE-not-use-variable-length-arra.patch b/sources/meta-openembedded/meta-oe/recipes-devtools/ltrace/ltrace/0001-proc-Make-PROC_PID_FILE-not-use-variable-length-arra.patch new file mode 100644 index 00000000..3e166f0d --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/ltrace/ltrace/0001-proc-Make-PROC_PID_FILE-not-use-variable-length-arra.patch @@ -0,0 +1,34 @@ +From f2f6082cb112cf3b8a6a5bfc989e4a4f6a1bff27 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 3 Sep 2024 20:41:20 +0000 +Subject: [PATCH] proc: Make PROC_PID_FILE not use variable length array + +This helps in compiling with clang which is not happy about VLA + +| ../../../git/sysdeps/linux-gnu/proc.c:70:3: error: variable length array folded to constant array as an extension [-Werror,-Wgnu-folding-constant] +| 70 | PROC_PID_FILE(proc_exe, "/proc/%d/exe", pid); +| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +| ../../../git/sysdeps/linux-gnu/proc.c:59:11: note: expanded from macro 'PROC_PID_FILE' +| 59 | char VAR[strlen(FORMAT) + 6]; \ +| | ^~~~~~~~~~~~~~~~~~ + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- + sysdeps/linux-gnu/proc.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/sysdeps/linux-gnu/proc.c b/sysdeps/linux-gnu/proc.c +index b954997..f37e4e8 100644 +--- a/sysdeps/linux-gnu/proc.c ++++ b/sysdeps/linux-gnu/proc.c +@@ -56,7 +56,8 @@ + #define MAX_DELAY 100000 /* 100000 microseconds = 0.1 seconds */ + + #define PROC_PID_FILE(VAR, FORMAT, PID) \ +- char VAR[strlen(FORMAT) + 6]; \ ++ enum { buflen_ ## VAR = strlen(FORMAT)}; \ ++ char VAR[buflen_ ## VAR + 6]; \ + sprintf(VAR, FORMAT, PID) + + /* diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/ltrace/ltrace/0001-replace-readdir_r-with-readdir.patch b/sources/meta-openembedded/meta-oe/recipes-devtools/ltrace/ltrace/0001-replace-readdir_r-with-readdir.patch deleted file mode 100644 index 65c7d535..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/ltrace/ltrace/0001-replace-readdir_r-with-readdir.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 64f98f84fd88797e219f9dde1ca387fee4b509f0 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sun, 24 Apr 2016 16:58:17 -0700 -Subject: [PATCH] replace readdir_r with readdir - -glibc 2.24 has deprecated readdir_r - -https://sourceware.org/ml/libc-alpha/2016-02/msg00093.html - -Signed-off-by: Khem Raj ---- -Upstream-Status: Submitted - - sysdeps/linux-gnu/proc.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/sysdeps/linux-gnu/proc.c b/sysdeps/linux-gnu/proc.c -index 953fd86..edb716d 100644 ---- a/sysdeps/linux-gnu/proc.c -+++ b/sysdeps/linux-gnu/proc.c -@@ -242,9 +242,10 @@ process_tasks(pid_t pid, pid_t **ret_tasks, size_t *ret_n) - size_t alloc = 0; - - while (1) { -- struct dirent entry; - struct dirent *result; -- if (readdir_r(d, &entry, &result) != 0) { -+ errno = 0; -+ result = readdir(d); -+ if (errno != 0) { - fail: - free(tasks); - closedir(d); --- -2.8.0 - diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/ltrace/ltrace_git.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/ltrace/ltrace_git.bb index 63971970..a3ddf2a7 100644 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/ltrace/ltrace_git.bb +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/ltrace/ltrace_git.bb @@ -11,27 +11,23 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a" PE = "1" PV = "7.91+git" -SRCREV = "c22d359433b333937ee3d803450dc41998115685" +SRCREV = "8eabf684ba6b11ae7a1a843aca3c0657c6329d73" DEPENDS = "elfutils" -SRC_URI = "git://github.com/sparkleholic/ltrace.git;protocol=https;branch=master \ +SRC_URI = "git://gitlab.com/cespedes/ltrace.git;protocol=https;branch=main \ file://configure-allow-to-disable-selinux-support.patch \ - file://0001-replace-readdir_r-with-readdir.patch \ file://0001-Use-correct-enum-type.patch \ file://0002-Fix-const-qualifier-error.patch \ - file://0001-ARM-code-has-unreachable-code-after-switch-statement.patch \ - file://0001-Fix-tautological-compare-warning.patch \ file://0001-Add-support-for-mips64-n32-n64.patch \ file://0001-configure-Recognise-linux-musl-as-a-host-OS.patch \ file://0001-mips-plt.c-Delete-include-error.h.patch \ file://0001-move-fprintf-into-same-block-where-modname-and-symna.patch \ file://0001-hook-Do-not-append-int-to-std-string.patch \ file://0001-Bug-fix-for-data-type-length-judgment.patch \ - file://0001-ensure-the-struct-pointers-are-null-initilized.patch \ file://0001-ppc-Remove-unused-host_powerpc64-function.patch \ file://0001-mips-Use-hardcodes-values-for-ABI-syscall-bases.patch \ - file://0001-ppc-plt-do-not-free-symbol-libsym.patch \ file://0001-Fix-type-of-single-bit-bitfields.patch \ + file://0001-proc-Make-PROC_PID_FILE-not-use-variable-length-arra.patch \ " SRC_URI:append:libc-musl = " file://add_ppc64le.patch" diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/luajit/luajit_git.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/luajit/luajit_git.bb index 240271d4..41892175 100644 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/luajit/luajit_git.bb +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/luajit/luajit_git.bb @@ -21,7 +21,7 @@ BBCLASSEXTEND = "native" # Host luajit needs to be compiled with the same pointer size # If you want to cross-compile to any 32 bit target on an x64 OS, # you need to install the multilib development package (e.g. -# libc6-dev-i386 on Debian/Ubuntu) and build a 32 bit host part +# libc6-dev:i386 on Debian/Ubuntu) and build a 32 bit host part # (HOST_CC="gcc -m32"). BUILD_CC_ARCH:append = " ${@['-m32',''][d.getVar('SITEINFO_BITS') != '32']}" diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/mcpp/mcpp_2.7.2.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/mcpp/mcpp_2.7.2.bb index 94458567..b44c6d66 100644 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/mcpp/mcpp_2.7.2.bb +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/mcpp/mcpp_2.7.2.bb @@ -10,9 +10,15 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \ SRC_URI[md5sum] = "512de48c87ab023a69250edc7a0c7b05" SRC_URI[sha256sum] = "3b9b4421888519876c4fc68ade324a3bbd81ceeb7092ecdbbc2055099fcb8864" +UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/mcpp/files/mcpp/" +UPSTREAM_CHECK_REGEX = "${BPN}/V\.(?P\d+(\.\d+)+)" + inherit autotools EXTRA_OECONF = " --enable-mcpplib " BBCLASSEXTEND = "native nativesdk" +# http://errors.yoctoproject.org/Errors/Details/766883/ +# mcpp-2.7.2/src/expand.c:713:21: error: assignment to 'char *' from incompatible pointer type 'LOCATION *' {aka 'struct location *'} [-Wincompatible-pointer-types] +CFLAGS += "-Wno-error=incompatible-pointer-types" diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/memtool/memtool/run-ptest b/sources/meta-openembedded/meta-oe/recipes-devtools/memtool/memtool/run-ptest new file mode 100644 index 00000000..865da9f6 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/memtool/memtool/run-ptest @@ -0,0 +1,27 @@ +#!/bin/sh + +# SPDX-FileCopyrightText: 2024 Bosch Sicherheitssysteme GmbH +# +# SPDX-License-Identifier: MIT + +fail_count=0 +all_count=0 + +for test_suite in tests/test_* +do + if "./$test_suite" + then + echo "PASS: $test_suite" + else + echo "FAIL: $test_suite" + fail_count=$((fail_count + 1)) + fi + all_count=$((all_count + 1)) +done + +if [ $fail_count -eq 0 ] +then + echo "PASS: All $all_count tests passed" +else + echo "FAIL: $fail_count of $all_count tests failed" +fi diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/memtool/memtool/test_read_write_plainfiles.sh b/sources/meta-openembedded/meta-oe/recipes-devtools/memtool/memtool/test_read_write_plainfiles.sh new file mode 100644 index 00000000..a74975d3 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/memtool/memtool/test_read_write_plainfiles.sh @@ -0,0 +1,69 @@ +#!/bin/bash + +# SPDX-FileCopyrightText: 2024 Bosch Sicherheitssysteme GmbH +# +# SPDX-License-Identifier: MIT + +# This script verifies the behavior of memtool against plain files. + +readonly PLAIN_FILE=$(mktemp) +FAIL_COUNT=0 + +setup() { + echo "Hello World!" >"$PLAIN_FILE" +} + +teardown() { + rm "$PLAIN_FILE" +} + +verify() { + ACTUAL=$1 + EXPECTED=$2 + TEST_NAME=$3 + + if [ "$ACTUAL" = "$EXPECTED" ]; then + echo "pass: $TEST_NAME" + else + echo "FAIL: $TEST_NAME" + echo " Expected: $EXPECTED" + echo " Actual: $ACTUAL" + FAIL_COUNT=$((FAIL_COUNT + 1)) + fi +} + +# Test Case: Verifies that the expected string of bytes is read from a plain file starting from +# the offset 6 and reading 6 bytes. +test_memtool_read() { + EXPECTED="00000006: 57 6f 72 6c 64 21 World!" + ACTUAL=$(memtool md -s "$PLAIN_FILE" -b 0x6+6) + verify "$ACTUAL" "$EXPECTED" "memtool read from plain file" +} + +# Test Case 2: Verifies that the expected string of bytes is written to a plain file starting from +# and then read the result. +test_memtool_write() { + # Usage of 'od' ensures correct endianess. + readonly replace_str_bytes=$(echo "Yocto!" | od -t d4 -A n) + + # shellcheck disable=SC2086 # We want to pass the bytes as separate arguments. + memtool mw -d "$PLAIN_FILE" 0x6+6 $replace_str_bytes + + EXPECTED="00000006: 59 6f 63 74 6f 21 Yocto!" + ACTUAL=$(memtool md -s "$PLAIN_FILE" -b 0x6+6) + verify "$ACTUAL" "$EXPECTED" "memtool write to plain file" +} + +for test_case in $(declare -F | grep test_memtool_ | cut -f 3 -d ' '); do + setup + $test_case + teardown +done + +if [ $FAIL_COUNT -eq 0 ]; then + echo "Test Passed: memtool plain file read/write functionality is correct." + exit 0 +else + echo "Test FAILED: memtool plain file read/write functionality is incorrect. Check the logs." + exit 1 +fi diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/memtool/memtool_2018.03.0.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/memtool/memtool_2018.03.0.bb new file mode 100644 index 00000000..1e2e93bc --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/memtool/memtool_2018.03.0.bb @@ -0,0 +1,31 @@ +# SPDX-FileCopyrightText: 2024 Bosch Sicherheitssysteme GmbH +# +# SPDX-License-Identifier: MIT + +SUMMARY = "A tool to manipulate and read memory mapped registers" +DESCRIPTION = "memtool is a program that allows to access memory mapped registers. This is useful \ +to inspect and modify registers from the command line. memtool can also operate on plain files, \ +and access PHY registers." +HOMEPAGE = "https://github.com/pengutronix/memtool" +BUGTRACKER = "https://github.com/pengutronix/memtool/issues" +SECTION = "devtool" + +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +SRC_URI = " \ + http://www.pengutronix.de/software/memtool/downloads/memtool-${PV}.tar.xz \ + file://run-ptest \ + file://test_read_write_plainfiles.sh \ +" + +SRC_URI[sha256sum] = "87cb7175266ff3a00a9c1f541c4c6c93693ffbe8dcc0d97a60d13c45ff860900" + +inherit autotools ptest + +do_install_ptest () { + install -d ${D}${PTEST_PATH}/tests + install -m 0755 ${UNPACKDIR}/test_* ${D}${PTEST_PATH}/tests +} + +RDEPENDS:${PN}-ptest += "bash coreutils" diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/mercurial/mercurial_6.5.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/mercurial/mercurial_6.5.bb deleted file mode 100644 index 2451a36b..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/mercurial/mercurial_6.5.bb +++ /dev/null @@ -1,36 +0,0 @@ -SUMMARY = "The Mercurial distributed SCM" -HOMEPAGE = "http://mercurial.selenic.com/" -SECTION = "console/utils" -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" - -DEPENDS = "python3 python3-native python3-setuptools-native" -RDEPENDS:${PN} = "python3 python3-modules" - -inherit python3native python3targetconfig - -SRC_URI = "https://www.mercurial-scm.org/release/${BP}.tar.gz" -SRC_URI[sha256sum] = "a5603d0d395ebf67fe5d27abbb3bd37fcc01871ecf394c793672d2c1e68be7e7" - -S = "${WORKDIR}/mercurial-${PV}" - -BBCLASSEXTEND = "native" - -export LDSHARED="${CCLD} -shared" - -EXTRA_OEMAKE = "STAGING_LIBDIR=${STAGING_LIBDIR} STAGING_INCDIR=${STAGING_INCDIR} \ - PREFIX=${prefix}" - -do_configure:append () { - sed -i -e 's:PYTHON?=python:PYTHON=python3:g' ${S}/Makefile -} - -do_install () { - oe_runmake -e install-bin DESTDIR=${D} PREFIX=${prefix} - sed -i -e 's:${STAGING_BINDIR_NATIVE}/python3-native/python3:${USRBINPATH}/env python3:g' ${D}${bindir}/hg -} -PACKAGES =+ "${PN}-python" - -FILES:${PN} += "${PYTHON_SITEPACKAGES_DIR} ${datadir}" -FILES:${PN}-python = "${nonarch_libdir}/${PYTHON_DIR}" - diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/mercurial/mercurial_6.6.3.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/mercurial/mercurial_6.6.3.bb new file mode 100644 index 00000000..395a3307 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/mercurial/mercurial_6.6.3.bb @@ -0,0 +1,37 @@ +SUMMARY = "The Mercurial distributed SCM" +HOMEPAGE = "http://mercurial.selenic.com/" +SECTION = "console/utils" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +DEPENDS = "python3 python3-native python3-setuptools-native" +RDEPENDS:${PN} = "python3 python3-modules" + +inherit python3native python3targetconfig + +SRC_URI = "https://www.mercurial-scm.org/release/${BP}.tar.gz" +SRC_URI[sha256sum] = "f75d6a4a75823a1b7d713a4967eca2f596f466e58fc6bc06d72642932fd7e307" + +S = "${WORKDIR}/mercurial-${PV}" + +BBCLASSEXTEND = "native" + +export LDSHARED="${CCLD} -shared" + +EXTRA_OEMAKE = "STAGING_LIBDIR=${STAGING_LIBDIR} STAGING_INCDIR=${STAGING_INCDIR} \ + PREFIX=${prefix}" + +do_configure:append () { + sed -i -e 's:PYTHON?=python:PYTHON=python3:g' ${S}/Makefile +} + +do_install () { + oe_runmake -e install-bin DESTDIR=${D} PREFIX=${prefix} + sed -i -e 's:${STAGING_BINDIR_NATIVE}/python3-native/python3:${USRBINPATH}/env python3:g' ${D}${bindir}/hg +} +PACKAGES =+ "${PN}-python" + +FILES:${PN} += "${PYTHON_SITEPACKAGES_DIR} ${datadir}" +FILES:${PN}-python = "${nonarch_libdir}/${PYTHON_DIR}" + +CVE_STATUS[CVE-2022-43410] = "cpe-incorrect: The recipe used in the `meta-openembedded` is a different mercurial package compared to the one which has the CVE issue." diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/microcom/microcom_2023.09.0.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/microcom/microcom_2023.09.0.bb index 4bb3e62d..73d434cb 100644 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/microcom/microcom_2023.09.0.bb +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/microcom/microcom_2023.09.0.bb @@ -6,6 +6,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=c9f7c009791eaa4b9ca90dc4c9538d24" SRC_URI = "https://github.com/pengutronix/microcom/releases/download/v${PV}/microcom-${PV}.tar.xz" SRC_URI[sha256sum] = "ef42184bb35c9762b3e9c70748696f7478efacad8412a88aaf2d9a6a500231a1" +UPSTREAM_CHECK_URI = "${HOMEPAGE}/releases" +UPSTREAM_CHECK_REGEX = "(?P\d+(\.\d+)+)" + DEPENDS = "readline" inherit autotools update-alternatives diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/microsoft-gsl/microsoft-gsl_4.0.0.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/microsoft-gsl/microsoft-gsl_4.0.0.bb index 6e29b245..8ba121d5 100644 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/microsoft-gsl/microsoft-gsl_4.0.0.bb +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/microsoft-gsl/microsoft-gsl_4.0.0.bb @@ -43,3 +43,8 @@ FILES:${PN}-ptest = "${bindir}/gsl*_tests" CVE_PRODUCT = "microsoft:gsl" BBCLASSEXTEND = "native nativesdk" + +# This one is reproducible only on 32bit arm MACHINEs (didn't see it with qemux86 or qemux86-64 builds) +# http://errors.yoctoproject.org/Errors/Details/766976/ +# lib32-microsoft-gsl/4.0.0/git/tests/span_tests.cpp:1275:34: error: value computed is not used [-Werror=unused-value] +CXXFLAGS += "-Wno-error=unused-value" diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/mpich/mpich_4.2.1.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/mpich/mpich_4.2.1.bb deleted file mode 100644 index 9fd8c3bb..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/mpich/mpich_4.2.1.bb +++ /dev/null @@ -1,67 +0,0 @@ -SUMMARY = "Message Passing Interface (MPI) implementation" -HOMEPAGE = "http://www.mpich.org/" -SECTION = "devel" - -LICENSE = "BSD-2-Clause" -LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=7a88f0d96d0d7396a7c66bf353235b62" - -SRC_URI = "http://www.mpich.org/static/downloads/${PV}/mpich-${PV}.tar.gz" -SRC_URI[sha256sum] = "23331b2299f287c3419727edc2df8922d7e7abbb9fd0ac74e03b9966f9ad42d7" - -RDEPENDS:${PN} += "bash perl libxml2" - -EXTRA_OECONF = "--enable-debuginfo \ - --enable-fast \ - --enable-shared \ - --with-pm=gforker \ - BASH_SHELL='${USRBINPATH}/env bash' \ - PERL='${USRBINPATH}/env perl' \ - --with-device=ch3:nemesis \ -" - -PACKAGECONFIG ??= "" - -PACKAGECONFIG[cxx] = "--enable-cxx,--disable-cxx" -PACKAGECONFIG[fortran] = "--with-cross=${WORKDIR}/cross_values.txt --enable-fortran,--disable-f77 --disable-fortran,libgfortran" - -# libmpi.so needs symbols like __multf3 and somehow it does not respect --rtlib option passed by clang -LDFLAGS:append:x86-64 = " -lgcc" -LDFLAGS:append:x86 = " -lgcc" - -inherit autotools gettext pkgconfig qemu - -DEPENDS += "qemu-native" - -do_configure() { - if [ "${@bb.utils.contains('PACKAGECONFIG', 'fortran', '1', '', d)}" = "1" ]; then - qemu_binary="${@qemu_wrapper_cmdline(d, d.getVar('STAGING_DIR_HOST'), [d.expand('${STAGING_DIR_HOST}${libdir}'),d.expand('${STAGING_DIR_HOST}${base_libdir}')])}" - cat > ${WORKDIR}/qemuwrapper << EOF -#!/bin/sh -$qemu_binary "\$@" -EOF - chmod +x ${WORKDIR}/qemuwrapper - - sed -i 's:my \(.*\) ./t`;:my \1 ${WORKDIR}/qemuwrapper ${WORKDIR}/t`;:' ${S}/maint/gen_cross.pl - - cd ${WORKDIR} - perl ${S}/maint/gen_cross.pl - - sed -i 's:\(CROSS_F90_INTEGER_MODEL_MAP=.*\) }"$:\1 }, ":' ${WORKDIR}/cross_values.txt - fi - - cd ${S} - ./autogen.sh - - cd ${B} - oe_runconf - sed -i -e 's,${WORKDIR},,g' ${B}/src/include/mpichinfo.h -} - -do_install:append() { - sed -i 's,${S}/,,g' ${D}/${libdir}/libmpi.la - sed -i 's,${DEBUG_PREFIX_MAP},,g' ${D}${bindir}/mpicxx - sed -i 's,${DEBUG_PREFIX_MAP},,g' ${D}${bindir}/mpicc - sed -i 's,${DEBUG_PREFIX_MAP},,g' ${D}/${libdir}/pkgconfig/mpich.pc - sed -i 's,${RECIPE_SYSROOT},/,g' ${D}${bindir}/mpicc - sed -i 's,${RECIPE_SYSROOT},/,g' ${D}${bindir}/mpicxx -} diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/mpich/mpich_4.2.2.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/mpich/mpich_4.2.2.bb new file mode 100644 index 00000000..f9ff0774 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/mpich/mpich_4.2.2.bb @@ -0,0 +1,67 @@ +SUMMARY = "Message Passing Interface (MPI) implementation" +HOMEPAGE = "http://www.mpich.org/" +SECTION = "devel" + +LICENSE = "BSD-2-Clause" +LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=7a88f0d96d0d7396a7c66bf353235b62" + +SRC_URI = "http://www.mpich.org/static/downloads/${PV}/mpich-${PV}.tar.gz" +SRC_URI[sha256sum] = "883f5bb3aeabf627cb8492ca02a03b191d09836bbe0f599d8508351179781d41" + +RDEPENDS:${PN} += "bash perl libxml2" + +EXTRA_OECONF = "--enable-debuginfo \ + --enable-fast \ + --enable-shared \ + --with-pm=gforker \ + BASH_SHELL='${USRBINPATH}/env bash' \ + PERL='${USRBINPATH}/env perl' \ + --with-device=ch3:nemesis \ +" + +PACKAGECONFIG ??= "" + +PACKAGECONFIG[cxx] = "--enable-cxx,--disable-cxx" +PACKAGECONFIG[fortran] = "--with-cross=${WORKDIR}/cross_values.txt --enable-fortran,--disable-f77 --disable-fortran,libgfortran" + +# libmpi.so needs symbols like __multf3 and somehow it does not respect --rtlib option passed by clang +LDFLAGS:append:x86-64 = " -lgcc" +LDFLAGS:append:x86 = " -lgcc" + +inherit autotools gettext pkgconfig qemu + +DEPENDS += "qemu-native" + +do_configure() { + if [ "${@bb.utils.contains('PACKAGECONFIG', 'fortran', '1', '', d)}" = "1" ]; then + qemu_binary="${@qemu_wrapper_cmdline(d, d.getVar('STAGING_DIR_HOST'), [d.expand('${STAGING_DIR_HOST}${libdir}'),d.expand('${STAGING_DIR_HOST}${base_libdir}')])}" + cat > ${WORKDIR}/qemuwrapper << EOF +#!/bin/sh +$qemu_binary "\$@" +EOF + chmod +x ${WORKDIR}/qemuwrapper + + sed -i 's:my \(.*\) ./t`;:my \1 ${WORKDIR}/qemuwrapper ${WORKDIR}/t`;:' ${S}/maint/gen_cross.pl + + cd ${WORKDIR} + perl ${S}/maint/gen_cross.pl + + sed -i 's:\(CROSS_F90_INTEGER_MODEL_MAP=.*\) }"$:\1 }, ":' ${WORKDIR}/cross_values.txt + fi + + cd ${S} + ./autogen.sh + + cd ${B} + oe_runconf + sed -i -e 's,${WORKDIR},,g' ${B}/src/include/mpichinfo.h +} + +do_install:append() { + sed -i 's,${S}/,,g' ${D}/${libdir}/libmpi.la + sed -i 's,${DEBUG_PREFIX_MAP},,g' ${D}${bindir}/mpicxx + sed -i 's,${DEBUG_PREFIX_MAP},,g' ${D}${bindir}/mpicc + sed -i 's,${DEBUG_PREFIX_MAP},,g' ${D}/${libdir}/pkgconfig/mpich.pc + sed -i 's,${RECIPE_SYSROOT},/,g' ${D}${bindir}/mpicc + sed -i 's,${RECIPE_SYSROOT},/,g' ${D}${bindir}/mpicxx +} diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/msgpack/msgpack-cpp_6.1.0.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/msgpack/msgpack-cpp_6.1.0.bb deleted file mode 100644 index 5f5507bc..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/msgpack/msgpack-cpp_6.1.0.bb +++ /dev/null @@ -1,21 +0,0 @@ -SUMMARY = "MessagePack implementation for C and C++" -DESCRIPTION = "MessagePack is an efficient binary serialization format. It's like JSON. but fast and small" -HOMEPAGE = "http://msgpack.org/index.html" -LICENSE = "BSL-1.0" -LIC_FILES_CHKSUM = "file://NOTICE;md5=7a858c074723608e08614061dc044352 \ - file://COPYING;md5=0639c4209b6f2abf1437c813b208f2d3 \ - file://LICENSE_1_0.txt;md5=e4224ccaecb14d942c71d31bef20d78c \ - " - -SRC_URI = "https://github.com/msgpack/msgpack-c/releases/download/cpp-${PV}/msgpack-cxx-${PV}.tar.gz" -SRC_URI[sha256sum] = "23ede7e93c8efee343ad8c6514c28f3708207e5106af3b3e4969b3a9ed7039e7" - -S = "${WORKDIR}/msgpack-cxx-${PV}" - -DEPENDS += "boost" - -inherit cmake pkgconfig - -RDEPENDS:${PN}-dev = "" - -BBCLASSEXTEND += "native nativesdk" diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/msgpack/msgpack-cpp_6.1.1.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/msgpack/msgpack-cpp_6.1.1.bb new file mode 100644 index 00000000..ccbaf9ce --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/msgpack/msgpack-cpp_6.1.1.bb @@ -0,0 +1,24 @@ +SUMMARY = "MessagePack implementation for C and C++" +DESCRIPTION = "MessagePack is an efficient binary serialization format. It's like JSON. but fast and small" +HOMEPAGE = "http://msgpack.org/index.html" +LICENSE = "BSL-1.0" +LIC_FILES_CHKSUM = "file://NOTICE;md5=7a858c074723608e08614061dc044352 \ + file://COPYING;md5=0639c4209b6f2abf1437c813b208f2d3 \ + file://LICENSE_1_0.txt;md5=e4224ccaecb14d942c71d31bef20d78c \ + " + +SRC_URI = "https://github.com/msgpack/msgpack-c/releases/download/cpp-${PV}/msgpack-cxx-${PV}.tar.gz" +SRC_URI[sha256sum] = "5fd555742e37bbd58d166199e669f01f743c7b3c6177191dd7b31fb0c37fa191" + +UPSTREAM_CHECK_URI = "https://github.com/msgpack/msgpack-c/releases" +UPSTREAM_CHECK_REGEX = "(?P\d+(\.\d+)+)" + +S = "${WORKDIR}/msgpack-cxx-${PV}" + +DEPENDS += "boost" + +inherit cmake pkgconfig + +RDEPENDS:${PN}-dev = "" + +BBCLASSEXTEND += "native nativesdk" diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-native_20.18.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-native_20.18.bb index a61dd501..d4b818f9 100644 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-native_20.18.bb +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-native_20.18.bb @@ -8,10 +8,13 @@ SRC_URI = "\ inherit native +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" + B = "${WORKDIR}/build" do_configure() { - sed -e 's!@@libdir@@!${libdir}!g' < '${WORKDIR}/oe-npm-cache' > '${B}/oe-npm-cache' + sed -e 's!@@libdir@@!${libdir}!g' < '${UNPACKDIR}/oe-npm-cache' > '${B}/oe-npm-cache' } do_install() { diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/182d9c05e78.patch b/sources/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/182d9c05e78.patch index 9b3fc566..689512cb 100644 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/182d9c05e78.patch +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/182d9c05e78.patch @@ -35,25 +35,25 @@ Signed-off-by: Khem Raj @@ -27,7 +27,7 @@ bool isSpaceOrNewLine(UChar c) { return isASCII(c) && c <= ' ' && (c == ' ' || (c <= 0xD && c >= 0x9)); } - + -int64_t charactersToInteger(const UChar* characters, size_t length, +int64_t charactersToInteger(const uint16_t* characters, size_t length, bool* ok = nullptr) { std::vector buffer; buffer.reserve(length + 1); @@ -50,6 +50,8 @@ int64_t charactersToInteger(const UChar* - + String16::String16(const UChar* characters, size_t size) : m_impl(characters, size) {} +String16::String16(const uint16_t* characters, size_t size) + : m_impl(reinterpret_cast(characters), size) {} - + String16::String16(const UChar* characters) : m_impl(characters) {} - + @@ -241,6 +243,10 @@ String16 String16::fromUTF16LE(const UCh #endif // V8_TARGET_BIG_ENDIAN } - + +String16 String16::fromUTF16LE(const uint16_t* stringStart, size_t length) { + return fromUTF16LE(reinterpret_cast(stringStart), length); +} @@ -65,19 +65,19 @@ Signed-off-by: Khem Raj +++ b/deps/v8/src/inspector/string-16.h @@ -6,6 +6,7 @@ #define V8_INSPECTOR_STRING_16_H_ - + #include +#include - + #include #include @@ -17,7 +18,7 @@ - + namespace v8_inspector { - + -using UChar = uint16_t; +using UChar = char16_t; - + class String16 { public: @@ -27,6 +28,7 @@ class String16 { @@ -105,28 +105,28 @@ Signed-off-by: Khem Raj size_t length); + V8_EXPORT static String16 fromUTF16LE(const uint16_t* stringStart, + size_t length); - + std::size_t hash() const { if (!hash_code) { --- a/deps/v8/src/inspector/v8-string-conversions.cc +++ b/deps/v8/src/inspector/v8-string-conversions.cc @@ -12,7 +12,7 @@ - + namespace v8_inspector { namespace { -using UChar = uint16_t; +using UChar = char16_t; using UChar32 = uint32_t; - + bool isASCII(UChar c) { return !(c & ~0x7F); } @@ -386,7 +386,7 @@ std::string UTF16ToUTF8(const UChar* str - + std::basic_string UTF8ToUTF16(const char* stringStart, size_t length) { if (!stringStart || !length) return std::basic_string(); - std::vector buffer(length); + std::vector buffer(length); UChar* bufferStart = buffer.data(); - + UChar* bufferCurrent = bufferStart; @@ -395,7 +395,7 @@ std::basic_string UTF8ToUTF16(con reinterpret_cast(stringStart + length), @@ -142,12 +142,12 @@ Signed-off-by: Khem Raj @@ -5,14 +5,16 @@ #ifndef V8_INSPECTOR_V8_STRING_CONVERSIONS_H_ #define V8_INSPECTOR_V8_STRING_CONVERSIONS_H_ - + +#include + #include #include - + // Conversion routines between UT8 and UTF16, used by string-16.{h,cc}. You may // want to use string-16.h directly rather than these. namespace v8_inspector { @@ -156,19 +156,19 @@ Signed-off-by: Khem Raj +std::basic_string UTF8ToUTF16(const char* stringStart, size_t length); +std::string UTF16ToUTF8(const char16_t* stringStart, size_t length); } // namespace v8_inspector - + #endif // V8_INSPECTOR_V8_STRING_CONVERSIONS_H_ --- a/deps/v8/third_party/inspector_protocol/crdtp/test_platform_v8.cc +++ b/deps/v8/third_party/inspector_protocol/crdtp/test_platform_v8.cc @@ -11,13 +11,16 @@ namespace v8_crdtp { - + std::string UTF16ToUTF8(span in) { - return v8_inspector::UTF16ToUTF8(in.data(), in.size()); + return v8_inspector::UTF16ToUTF8(reinterpret_cast(in.data()), + in.size()); } - + std::vector UTF8ToUTF16(span in) { - std::basic_string utf16 = v8_inspector::UTF8ToUTF16( + std::basic_string utf16 = v8_inspector::UTF8ToUTF16( @@ -178,5 +178,5 @@ Signed-off-by: Khem Raj + reinterpret_cast(utf16.data()), + reinterpret_cast(utf16.data()) + utf16.size()); } - + } // namespace v8_crdtp diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/libatomic.patch b/sources/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/libatomic.patch index 22dc6c15..d987ac50 100644 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/libatomic.patch +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/libatomic.patch @@ -72,5 +72,6 @@ index b23263cf..dcabf4ca 100644 }], ], }, # v8_base_without_compiler --- +-- 2.35.5 + diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/zlib-fix-pointer-alignment.patch b/sources/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/zlib-fix-pointer-alignment.patch deleted file mode 100644 index 824ff678..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/zlib-fix-pointer-alignment.patch +++ /dev/null @@ -1,64 +0,0 @@ -From bbcd1f33161fd9874e8a61999d2739b177f99723 Mon Sep 17 00:00:00 2001 -From: Jeroen Hofstee -Date: Mon, 28 Apr 2025 14:21:44 +0000 -Subject: [PATCH] zlib: fix pointer alignment -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The function AllocForBrotli prefixes the allocated memory with its -size, and returns a pointer to the region after it. This pointer can -however no longer be suitably aligned. Correct this by allocating -the maximum of the the size of the size_t and the max alignment. - -On Arm 32bits the size_t is 4 bytes long, but the alignment is 8 for -some NEON instructions. When Brotli is compiled with optimizations -enabled newer GCC versions will use the NEON instructions and trigger -a bus error killing node. - -see https://github.com/google/brotli/issues/1159 - -PR-URL: https://github.com/nodejs/node/pull/57727 -Reviewed-By: Shelley Vohr -Reviewed-By: Tobias Nießen -Reviewed-By: Daniel Lemire -Reviewed-By: Gerhard Stöbich - -Upstream-Status: Backport [https://github.com/nodejs/node/commit/dc035bbc9b310ff8067bc0dad22230978489c061] ---- - src/node_zlib.cc | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) - -diff --git a/src/node_zlib.cc b/src/node_zlib.cc -index 66370e41..a537e766 100644 ---- a/src/node_zlib.cc -+++ b/src/node_zlib.cc -@@ -493,20 +493,22 @@ class CompressionStream : public AsyncWrap, public ThreadPoolWork { - } - - static void* AllocForBrotli(void* data, size_t size) { -- size += sizeof(size_t); -+ constexpr size_t offset = std::max(sizeof(size_t), alignof(max_align_t)); -+ size += offset; - CompressionStream* ctx = static_cast(data); - char* memory = UncheckedMalloc(size); - if (UNLIKELY(memory == nullptr)) return nullptr; - *reinterpret_cast(memory) = size; - ctx->unreported_allocations_.fetch_add(size, - std::memory_order_relaxed); -- return memory + sizeof(size_t); -+ return memory + offset; - } - - static void FreeForZlib(void* data, void* pointer) { - if (UNLIKELY(pointer == nullptr)) return; - CompressionStream* ctx = static_cast(data); -- char* real_pointer = static_cast(pointer) - sizeof(size_t); -+ constexpr size_t offset = std::max(sizeof(size_t), alignof(max_align_t)); -+ char* real_pointer = static_cast(pointer) - offset; - size_t real_size = *reinterpret_cast(real_pointer); - ctx->unreported_allocations_.fetch_sub(real_size, - std::memory_order_relaxed); --- -2.43.0 - diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs_20.18.0.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs_20.18.0.bb new file mode 100644 index 00000000..cb11ad29 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs_20.18.0.bb @@ -0,0 +1,212 @@ +DESCRIPTION = "nodeJS Evented I/O for V8 JavaScript" +HOMEPAGE = "http://nodejs.org" +LICENSE = "MIT & ISC & BSD-2-Clause & BSD-3-Clause & Artistic-2.0 & Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=c83fcdcd43ab352be6429ee1fd8827a0" + +CVE_PRODUCT = "nodejs node.js" + +DEPENDS = "openssl openssl-native file-replacement-native python3-packaging-native" +DEPENDS:append:class-target = " qemu-native" +DEPENDS:append:class-native = " c-ares-native" + +inherit pkgconfig python3native qemu ptest siteinfo + +COMPATIBLE_MACHINE:armv4 = "(!.*armv4).*" +COMPATIBLE_MACHINE:armv5 = "(!.*armv5).*" +COMPATIBLE_MACHINE:mips64 = "(!.*mips64).*" + +COMPATIBLE_HOST:riscv64 = "null" +COMPATIBLE_HOST:riscv32 = "null" +COMPATIBLE_HOST:powerpc = "null" + +SRC_URI = "http://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz \ + file://0001-Disable-running-gyp-files-for-bundled-deps.patch \ + file://0004-v8-don-t-override-ARM-CFLAGS.patch \ + file://system-c-ares.patch \ + file://0001-liftoff-Correct-function-signatures.patch \ + file://libatomic.patch \ + file://182d9c05e78.patch \ + file://run-ptest \ + " +SRC_URI:append:class-target = " \ + file://0001-Using-native-binaries.patch \ + " +SRC_URI:append:toolchain-clang:powerpc64le = " \ + file://0001-ppc64-Do-not-use-mminimal-toc-with-clang.patch \ + " +SRC_URI[sha256sum] = "7d9433e91fd88d82ba8de86e711ec41907638e227993d22e95126b02f6cd714a" + +S = "${WORKDIR}/node-v${PV}" + +CVE_PRODUCT += "node.js" + +# v8 errors out if you have set CCACHE +CCACHE = "" + +def map_nodejs_arch(a, d): + import re + + if re.match('i.86$', a): return 'ia32' + elif re.match('x86_64$', a): return 'x64' + elif re.match('aarch64$', a): return 'arm64' + elif re.match('(powerpc64|powerpc64le|ppc64le)$', a): return 'ppc64' + elif re.match('powerpc$', a): return 'ppc' + return a + +ARCHFLAGS:arm = "${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', '--with-arm-float-abi=hard', '--with-arm-float-abi=softfp', d)} \ + ${@bb.utils.contains('TUNE_FEATURES', 'neon', '--with-arm-fpu=neon', \ + bb.utils.contains('TUNE_FEATURES', 'vfpv3d16', '--with-arm-fpu=vfpv3-d16', \ + bb.utils.contains('TUNE_FEATURES', 'vfpv3', '--with-arm-fpu=vfpv3', \ + '--with-arm-fpu=vfp', d), d), d)}" +ARCHFLAGS:append:mips = " --v8-lite-mode" +ARCHFLAGS:append:mipsel = " --v8-lite-mode" +ARCHFLAGS ?= "" + +PACKAGECONFIG ??= "ares brotli icu zlib" + +PACKAGECONFIG[ares] = "--shared-cares,,c-ares c-ares-native" +PACKAGECONFIG[brotli] = "--shared-brotli,,brotli brotli-native" +PACKAGECONFIG[icu] = "--with-intl=system-icu,--without-intl,icu icu-native" +PACKAGECONFIG[libuv] = "--shared-libuv,,libuv" +PACKAGECONFIG[nghttp2] = "--shared-nghttp2,,nghttp2" +PACKAGECONFIG[shared] = "--shared" +PACKAGECONFIG[zlib] = "--shared-zlib,,zlib" + +EXTRANATIVEPATH += "file-native" + +python prune_sources() { + import shutil + + shutil.rmtree(d.getVar('S') + '/deps/openssl') + if 'ares' in d.getVar('PACKAGECONFIG'): + shutil.rmtree(d.getVar('S') + '/deps/cares') + if 'brotli' in d.getVar('PACKAGECONFIG'): + shutil.rmtree(d.getVar('S') + '/deps/brotli') + if 'libuv' in d.getVar('PACKAGECONFIG'): + shutil.rmtree(d.getVar('S') + '/deps/uv') + if 'nghttp2' in d.getVar('PACKAGECONFIG'): + shutil.rmtree(d.getVar('S') + '/deps/nghttp2') + if 'zlib' in d.getVar('PACKAGECONFIG'): + shutil.rmtree(d.getVar('S') + '/deps/zlib') +} +do_unpack[postfuncs] += "prune_sources" + +# V8's JIT infrastructure requires binaries such as mksnapshot and +# mkpeephole to be run in the host during the build. However, these +# binaries must have the same bit-width as the target (e.g. a x86_64 +# host targeting ARMv6 needs to produce a 32-bit binary). +# 1. If host and target have the different bit width, run those +# binaries for the target and run them on the host with QEMU. +# 2. If host and target have the same bit width, enable upstream +# cross crompile support and no QEMU +python do_create_v8_qemu_wrapper () { + """Creates a small wrapper that invokes QEMU to run some target V8 binaries + on the host.""" + qemu_libdirs = [d.expand('${STAGING_DIR_HOST}${libdir}'), + d.expand('${STAGING_DIR_HOST}${base_libdir}')] + qemu_cmd = qemu_wrapper_cmdline(d, d.getVar('STAGING_DIR_HOST'), + qemu_libdirs) + + if d.getVar("HOST_AND_TARGET_SAME_WIDTH") == "1": + qemu_cmd = "" + + wrapper_path = d.expand('${B}/v8-qemu-wrapper.sh') + with open(wrapper_path, 'w') as wrapper_file: + wrapper_file.write("""#!/bin/sh + +# This file has been generated automatically. +# It invokes QEMU to run binaries built for the target in the host during the +# build process. + +%s "$@" +""" % qemu_cmd) + os.chmod(wrapper_path, 0o755) +} + +do_create_v8_qemu_wrapper[dirs] = "${B}" +addtask create_v8_qemu_wrapper after do_configure before do_compile + +LDFLAGS:append:x86 = " -latomic" + +export CC_host +export CFLAGS_host +export CXX_host +export CXXFLAGS_host +export LDFLAGS_host +export AR_host +export HOST_AND_TARGET_SAME_WIDTH + +CROSS_FLAGS = "--cross-compiling" +CROSS_FLAGS:class-native = "--no-cross-compiling" + +# Node is way too cool to use proper autotools, so we install two wrappers to forcefully inject proper arch cflags to workaround gypi +do_configure () { + GYP_DEFINES="${GYP_DEFINES}" export GYP_DEFINES + # $TARGET_ARCH settings don't match --dest-cpu settings + python3 configure.py --verbose --prefix=${prefix} \ + --shared-openssl \ + --dest-cpu="${@map_nodejs_arch(d.getVar('TARGET_ARCH'), d)}" \ + --dest-os=linux \ + --libdir=${baselib} \ + ${CROSS_FLAGS} \ + ${ARCHFLAGS} \ + ${PACKAGECONFIG_CONFARGS} +} + +do_compile () { + install -D ${RECIPE_SYSROOT_NATIVE}/etc/ssl/openssl.cnf ${B}/deps/openssl/nodejs-openssl.cnf + install -D ${B}/v8-qemu-wrapper.sh ${B}/out/Release/v8-qemu-wrapper.sh + oe_runmake BUILDTYPE=Release +} + +do_install () { + oe_runmake install DESTDIR=${D} +} + +do_install_ptest () { + cp -r ${B}/out/Release/cctest ${D}${PTEST_PATH}/ + cp -r ${B}/test ${D}${PTEST_PATH} + chown -R root:root ${D}${PTEST_PATH} +} + +PACKAGES =+ "${PN}-npm" +FILES:${PN}-npm = "${nonarch_libdir}/node_modules ${bindir}/npm ${bindir}/npx ${bindir}/corepack" +RDEPENDS:${PN}-npm = "bash python3-core python3-shell python3-datetime \ + python3-misc python3-multiprocessing" + +PACKAGES =+ "${PN}-systemtap" +FILES:${PN}-systemtap = "${datadir}/systemtap" + +do_configure[prefuncs] += "set_gyp_variables" +do_compile[prefuncs] += "set_gyp_variables" +do_install[prefuncs] += "set_gyp_variables" +python set_gyp_variables () { + if d.getVar("HOST_AND_TARGET_SAME_WIDTH") == "0": + # We don't want to cross-compile during target compile, + # and we need to use the right flags during host compile, + # too. + d.setVar("CC_host", d.getVar("CC") + " -pie -fPIE") + d.setVar("CFLAGS_host", d.getVar("CFLAGS")) + d.setVar("CXX_host", d.getVar("CXX") + " -pie -fPIE") + d.setVar("CXXFLAGS_host", d.getVar("CXXFLAGS")) + d.setVar("LDFLAGS_host", d.getVar("LDFLAGS")) + d.setVar("AR_host", d.getVar("AR")) + elif d.getVar("HOST_AND_TARGET_SAME_WIDTH") == "1": + # Enable upstream cross crompile support + d.setVar("CC_host", d.getVar("BUILD_CC")) + d.setVar("CFLAGS_host", d.getVar("BUILD_CFLAGS")) + d.setVar("CXX_host", d.getVar("BUILD_CXX")) + d.setVar("CXXFLAGS_host", d.getVar("BUILD_CXXFLAGS")) + d.setVar("LDFLAGS_host", d.getVar("BUILD_LDFLAGS")) + d.setVar("AR_host", d.getVar("BUILD_AR")) +} + +python __anonymous () { + # 32 bit target and 64 bit host (x86-64 or aarch64) have different bit width + if d.getVar("SITEINFO_BITS") == "32" and "64" in d.getVar("BUILD_ARCH"): + d.setVar("HOST_AND_TARGET_SAME_WIDTH", "0") + else: + d.setVar("HOST_AND_TARGET_SAME_WIDTH", "1") +} + +BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs_20.18.2.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs_20.18.2.bb deleted file mode 100644 index bef62f88..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs_20.18.2.bb +++ /dev/null @@ -1,212 +0,0 @@ -DESCRIPTION = "nodeJS Evented I/O for V8 JavaScript" -HOMEPAGE = "http://nodejs.org" -LICENSE = "MIT & ISC & BSD-2-Clause & BSD-3-Clause & Artistic-2.0 & Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=c83fcdcd43ab352be6429ee1fd8827a0" - -CVE_PRODUCT = "nodejs node.js" - -DEPENDS = "openssl openssl-native file-replacement-native python3-packaging-native" -DEPENDS:append:class-target = " qemu-native" -DEPENDS:append:class-native = " c-ares-native" - -inherit pkgconfig python3native qemu ptest siteinfo - -COMPATIBLE_MACHINE:armv4 = "(!.*armv4).*" -COMPATIBLE_MACHINE:armv5 = "(!.*armv5).*" -COMPATIBLE_MACHINE:mips64 = "(!.*mips64).*" - -COMPATIBLE_HOST:riscv64 = "null" -COMPATIBLE_HOST:riscv32 = "null" -COMPATIBLE_HOST:powerpc = "null" - -SRC_URI = "http://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz \ - file://0001-Disable-running-gyp-files-for-bundled-deps.patch \ - file://0004-v8-don-t-override-ARM-CFLAGS.patch \ - file://system-c-ares.patch \ - file://0001-liftoff-Correct-function-signatures.patch \ - file://libatomic.patch \ - file://182d9c05e78.patch \ - file://zlib-fix-pointer-alignment.patch \ - file://run-ptest \ - " -SRC_URI:append:class-target = " \ - file://0001-Using-native-binaries.patch \ - " -SRC_URI:append:toolchain-clang:powerpc64le = " \ - file://0001-ppc64-Do-not-use-mminimal-toc-with-clang.patch \ - " -SRC_URI[sha256sum] = "69bf81b70f3a95ae0763459f02860c282d7e3a47567c8afaf126cc778176a882" - -S = "${WORKDIR}/node-v${PV}" - -CVE_PRODUCT += "node.js" - -# v8 errors out if you have set CCACHE -CCACHE = "" - -def map_nodejs_arch(a, d): - import re - - if re.match('i.86$', a): return 'ia32' - elif re.match('x86_64$', a): return 'x64' - elif re.match('aarch64$', a): return 'arm64' - elif re.match('(powerpc64|powerpc64le|ppc64le)$', a): return 'ppc64' - elif re.match('powerpc$', a): return 'ppc' - return a - -ARCHFLAGS:arm = "${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', '--with-arm-float-abi=hard', '--with-arm-float-abi=softfp', d)} \ - ${@bb.utils.contains('TUNE_FEATURES', 'neon', '--with-arm-fpu=neon', \ - bb.utils.contains('TUNE_FEATURES', 'vfpv3d16', '--with-arm-fpu=vfpv3-d16', \ - bb.utils.contains('TUNE_FEATURES', 'vfpv3', '--with-arm-fpu=vfpv3', \ - '--with-arm-fpu=vfp', d), d), d)}" -ARCHFLAGS:append:mips = " --v8-lite-mode" -ARCHFLAGS:append:mipsel = " --v8-lite-mode" -ARCHFLAGS ?= "" - -PACKAGECONFIG ??= "ares brotli icu zlib" - -PACKAGECONFIG[ares] = "--shared-cares,,c-ares c-ares-native" -PACKAGECONFIG[brotli] = "--shared-brotli,,brotli brotli-native" -PACKAGECONFIG[icu] = "--with-intl=system-icu,--without-intl,icu icu-native" -PACKAGECONFIG[libuv] = "--shared-libuv,,libuv" -PACKAGECONFIG[nghttp2] = "--shared-nghttp2,,nghttp2" -PACKAGECONFIG[shared] = "--shared" -PACKAGECONFIG[zlib] = "--shared-zlib,,zlib" - -EXTRANATIVEPATH += "file-native" - -python prune_sources() { - import shutil - - shutil.rmtree(d.getVar('S') + '/deps/openssl') - if 'ares' in d.getVar('PACKAGECONFIG'): - shutil.rmtree(d.getVar('S') + '/deps/cares') - if 'brotli' in d.getVar('PACKAGECONFIG'): - shutil.rmtree(d.getVar('S') + '/deps/brotli') - if 'libuv' in d.getVar('PACKAGECONFIG'): - shutil.rmtree(d.getVar('S') + '/deps/uv') - if 'nghttp2' in d.getVar('PACKAGECONFIG'): - shutil.rmtree(d.getVar('S') + '/deps/nghttp2') - if 'zlib' in d.getVar('PACKAGECONFIG'): - shutil.rmtree(d.getVar('S') + '/deps/zlib') -} -do_unpack[postfuncs] += "prune_sources" - -# V8's JIT infrastructure requires binaries such as mksnapshot and -# mkpeephole to be run in the host during the build. However, these -# binaries must have the same bit-width as the target (e.g. a x86_64 -# host targeting ARMv6 needs to produce a 32-bit binary). -# 1. If host and target have the different bit width, run those -# binaries for the target and run them on the host with QEMU. -# 2. If host and target have the same bit width, enable upstream -# cross crompile support and no QEMU -python do_create_v8_qemu_wrapper () { - """Creates a small wrapper that invokes QEMU to run some target V8 binaries - on the host.""" - qemu_libdirs = [d.expand('${STAGING_DIR_HOST}${libdir}'), - d.expand('${STAGING_DIR_HOST}${base_libdir}')] - qemu_cmd = qemu_wrapper_cmdline(d, d.getVar('STAGING_DIR_HOST'), - qemu_libdirs) - - if d.getVar("HOST_AND_TARGET_SAME_WIDTH") == "1": - qemu_cmd = "" - - wrapper_path = d.expand('${B}/v8-qemu-wrapper.sh') - with open(wrapper_path, 'w') as wrapper_file: - wrapper_file.write("""#!/bin/sh - -# This file has been generated automatically. -# It invokes QEMU to run binaries built for the target in the host during the -# build process. - -%s "$@" -""" % qemu_cmd) - os.chmod(wrapper_path, 0o755) -} - -do_create_v8_qemu_wrapper[dirs] = "${B}" -addtask create_v8_qemu_wrapper after do_configure before do_compile - -LDFLAGS:append:x86 = " -latomic" - -export CC_host -export CFLAGS_host -export CXX_host -export CXXFLAGS_host -export LDFLAGS_host -export AR_host -export HOST_AND_TARGET_SAME_WIDTH - -CROSS_FLAGS = "--cross-compiling" -CROSS_FLAGS:class-native = "--no-cross-compiling" - -# Node is way too cool to use proper autotools, so we install two wrappers to forcefully inject proper arch cflags to workaround gypi -do_configure () { - GYP_DEFINES="${GYP_DEFINES}" export GYP_DEFINES - # $TARGET_ARCH settings don't match --dest-cpu settings - python3 configure.py --verbose --prefix=${prefix} \ - --shared-openssl \ - --dest-cpu="${@map_nodejs_arch(d.getVar('TARGET_ARCH'), d)}" \ - --dest-os=linux \ - --libdir=${baselib} \ - ${CROSS_FLAGS} \ - ${ARCHFLAGS} \ - ${PACKAGECONFIG_CONFARGS} -} - -do_compile () { - install -D ${RECIPE_SYSROOT_NATIVE}/etc/ssl/openssl.cnf ${B}/deps/openssl/nodejs-openssl.cnf - install -D ${B}/v8-qemu-wrapper.sh ${B}/out/Release/v8-qemu-wrapper.sh - oe_runmake BUILDTYPE=Release -} - -do_install () { - oe_runmake install DESTDIR=${D} -} - -do_install_ptest () { - cp -r ${B}/out/Release/cctest ${D}${PTEST_PATH}/ - cp -r ${B}/test ${D}${PTEST_PATH} - chown -R root:root ${D}${PTEST_PATH} -} - -PACKAGES =+ "${PN}-npm" -FILES:${PN}-npm = "${nonarch_libdir}/node_modules ${bindir}/npm ${bindir}/npx ${bindir}/corepack" -RDEPENDS:${PN}-npm = "bash python3-core python3-shell python3-datetime \ - python3-misc python3-multiprocessing" - -PACKAGES =+ "${PN}-systemtap" -FILES:${PN}-systemtap = "${datadir}/systemtap" - -do_configure[prefuncs] += "set_gyp_variables" -do_compile[prefuncs] += "set_gyp_variables" -do_install[prefuncs] += "set_gyp_variables" -python set_gyp_variables () { - if d.getVar("HOST_AND_TARGET_SAME_WIDTH") == "0": - # We don't want to cross-compile during target compile, - # and we need to use the right flags during host compile, - # too. - d.setVar("CC_host", d.getVar("CC") + " -pie -fPIE") - d.setVar("CFLAGS_host", d.getVar("CFLAGS")) - d.setVar("CXX_host", d.getVar("CXX") + " -pie -fPIE") - d.setVar("CXXFLAGS_host", d.getVar("CXXFLAGS")) - d.setVar("LDFLAGS_host", d.getVar("LDFLAGS")) - d.setVar("AR_host", d.getVar("AR")) - elif d.getVar("HOST_AND_TARGET_SAME_WIDTH") == "1": - # Enable upstream cross crompile support - d.setVar("CC_host", d.getVar("BUILD_CC")) - d.setVar("CFLAGS_host", d.getVar("BUILD_CFLAGS")) - d.setVar("CXX_host", d.getVar("BUILD_CXX")) - d.setVar("CXXFLAGS_host", d.getVar("BUILD_CXXFLAGS")) - d.setVar("LDFLAGS_host", d.getVar("BUILD_LDFLAGS")) - d.setVar("AR_host", d.getVar("BUILD_AR")) -} -python __anonymous () { - # 32 bit target and 64 bit host (x86-64 or aarch64) have different bit width - if d.getVar("SITEINFO_BITS") == "32" and "64" in d.getVar("BUILD_ARCH"): - d.setVar("HOST_AND_TARGET_SAME_WIDTH", "0") - else: - d.setVar("HOST_AND_TARGET_SAME_WIDTH", "1") -} - -BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/packagegroups/packagegroup-sdk-target.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/packagegroups/packagegroup-sdk-target.bb index 4a0383e0..ee7674a0 100644 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/packagegroups/packagegroup-sdk-target.bb +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/packagegroups/packagegroup-sdk-target.bb @@ -21,5 +21,5 @@ RDEPENDS:${PN} = "gcc-symlinks g++-symlinks cpp cpp-symlinks \ libtool libtool-dev \ pkgconfig" -# usefull, but not in oe-core/meta-oe yet: patchutils -RRECOMMENDS:${PN} = " g77-symlinks gfortran-symlinks" +# useful, but not in oe-core/meta-oe yet: patchutils +RRECOMMENDS:${PN} = "${@bb.utils.contains('FORTRAN', ',fortran', 'gfortran gfortran-symlinks', '', d)}" diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/pcimem/pcimem_2.0.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/pcimem/pcimem_2.0.bb index 85c4fa95..52af9b99 100644 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/pcimem/pcimem_2.0.bb +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/pcimem/pcimem_2.0.bb @@ -10,6 +10,9 @@ COMPATIBLE_HOST = "(x86_64|aarch64|arm|riscv64)" SRCREV = "09724edb1783a98da2b7ae53c5aaa87493aabc9b" SRC_URI = "git://github.com/billfarrow/pcimem.git;branch=master;protocol=https" +# Upstream repo does not tag +UPSTREAM_CHECK_COMMITS = "1" + S = "${WORKDIR}/git" do_install() { diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/perfetto/common/0001-fix-musl-build.patch b/sources/meta-openembedded/meta-oe/recipes-devtools/perfetto/common/0001-fix-musl-build.patch new file mode 100644 index 00000000..3b7ca951 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/perfetto/common/0001-fix-musl-build.patch @@ -0,0 +1,40 @@ +From 485c21940eb0100a33b7efea40a83e7f79e765f8 Mon Sep 17 00:00:00 2001 +From: Etienne Cordonnier +Date: Sun, 22 Sep 2024 20:17:52 +0200 +Subject: [PATCH] fix musl build + +Signed-off-by: Etienne Cordonnier +--- +Upstream-Status: Pending + + sdk/perfetto.cc | 1 - + src/base/utils.cc | 1 - + 2 files changed, 2 deletions(-) + +diff --git a/sdk/perfetto.cc b/sdk/perfetto.cc +index b10dd5aa92..2eb90f0d15 100644 +--- a/sdk/perfetto.cc ++++ b/sdk/perfetto.cc +@@ -6558,7 +6558,6 @@ std::optional GetTimezoneOffsetMins() { + + #if PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) || \ + PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) +-#include + #include + + #ifndef PR_GET_TAGGED_ADDR_CTRL +diff --git a/src/base/utils.cc b/src/base/utils.cc +index 0d9318c136..419c7dbc1a 100644 +--- a/src/base/utils.cc ++++ b/src/base/utils.cc +@@ -40,7 +40,6 @@ + + #if PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) || \ + PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) +-#include + #include + + #ifndef PR_GET_TAGGED_ADDR_CTRL +-- +2.43.0 + diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/perfetto/files/0001-Add-missing-header-cstdint-for-uintXX_t-types.patch b/sources/meta-openembedded/meta-oe/recipes-devtools/perfetto/files/0001-Add-missing-header-cstdint-for-uintXX_t-types.patch deleted file mode 100644 index d08721ae..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/perfetto/files/0001-Add-missing-header-cstdint-for-uintXX_t-types.patch +++ /dev/null @@ -1,58 +0,0 @@ -From e63949205682bbd2a0e33e256119472d704a2549 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sun, 29 Jan 2023 22:03:01 -0800 -Subject: [PATCH] Add missing header for uintXX_t types - -This is detected by gcc-13 -gcc 13 moved some includes around and as a result is no -longer transitively included [1]. Explicitly include it for uintXX_t. - -[1] https://gcc.gnu.org/gcc-13/porting_to.html#header-dep-changes - -Upstream-Status: Submitted [https://android-review.googlesource.com/c/platform/external/perfetto/+/2399128] -Signed-off-by: Khem Raj ---- - include/perfetto/ext/base/http/sha1.h | 1 + - include/perfetto/ext/base/uuid.h | 1 + - src/traced/probes/common/cpu_freq_info.h | 1 + - 3 files changed, 3 insertions(+) - -diff --git a/include/perfetto/ext/base/http/sha1.h b/include/perfetto/ext/base/http/sha1.h -index c583d69d4..7e3a48c83 100644 ---- a/include/perfetto/ext/base/http/sha1.h -+++ b/include/perfetto/ext/base/http/sha1.h -@@ -20,6 +20,7 @@ - #include - - #include -+#include - #include - - namespace perfetto { -diff --git a/include/perfetto/ext/base/uuid.h b/include/perfetto/ext/base/uuid.h -index 1b4c53815..472042fab 100644 ---- a/include/perfetto/ext/base/uuid.h -+++ b/include/perfetto/ext/base/uuid.h -@@ -18,6 +18,7 @@ - #define INCLUDE_PERFETTO_EXT_BASE_UUID_H_ - - #include -+#include - #include - - #include "perfetto/ext/base/optional.h" -diff --git a/src/traced/probes/common/cpu_freq_info.h b/src/traced/probes/common/cpu_freq_info.h -index 36f7f9c09..8232cbf64 100644 ---- a/src/traced/probes/common/cpu_freq_info.h -+++ b/src/traced/probes/common/cpu_freq_info.h -@@ -17,6 +17,7 @@ - #ifndef SRC_TRACED_PROBES_COMMON_CPU_FREQ_INFO_H_ - #define SRC_TRACED_PROBES_COMMON_CPU_FREQ_INFO_H_ - -+#include - #include - #include - #include --- -2.39.1 - diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/perfetto/files/0001-meson-add-pc-file-for-lib_perfetto.patch b/sources/meta-openembedded/meta-oe/recipes-devtools/perfetto/files/0001-meson-add-pc-file-for-lib_perfetto.patch deleted file mode 100644 index ae644747..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/perfetto/files/0001-meson-add-pc-file-for-lib_perfetto.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 027f90dc9386ec08f2a5107025683e5fed6f3444 Mon Sep 17 00:00:00 2001 -From: Markus Volk -Date: Mon, 17 Oct 2022 19:20:53 +0200 -Subject: [PATCH] meson: add PC file for lib_perfetto - ---- -Upstream-Status: Pending - - meson.build | 12 ++++++++++-- - 1 file changed, 10 insertions(+), 2 deletions(-) - ---- a/meson.build -+++ b/meson.build -@@ -19,9 +19,12 @@ - project( - 'perfetto', - ['cpp'], -- default_options: ['cpp_std=c++17'] -+ default_options: ['cpp_std=c++17'], -+ version: '31.0' - ) - -+soversion = meson.project_version() -+ - fs = import('fs') - - if not fs.is_dir('sdk') -@@ -36,8 +39,9 @@ if host_machine.system() == 'android' - deps_perfetto += cpp.find_library('log') - endif - --lib_perfetto = static_library( -+lib_perfetto = shared_library( - 'perfetto', -+ version: soversion, - sources: 'sdk/perfetto.cc', - dependencies: deps_perfetto, - install: true, -@@ -50,6 +54,10 @@ dir_perfetto_trace = join_paths(meson.cu - - install_data(dir_perfetto_trace / 'perfetto_trace.proto') - -+install_headers('sdk/perfetto.h') -+pkg = import('pkgconfig') -+pkg.generate(lib_perfetto) -+ - dep_perfetto = declare_dependency( - link_with: lib_perfetto, - include_directories: inc_perfetto, diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/perfetto/libperfetto.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/perfetto/libperfetto.bb index c8f56fd5..8383db3c 100644 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/perfetto/libperfetto.bb +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/perfetto/libperfetto.bb @@ -1,5 +1,5 @@ LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=f87516e0b698007e9e75a1fe1012b390" +LIC_FILES_CHKSUM = "file://LICENSE;md5=d2572d98547d43906b53615f856a8c2d" require perfetto.inc diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/perfetto/libperfetto/0001-meson-add-pc-file-for-lib_perfetto.patch b/sources/meta-openembedded/meta-oe/recipes-devtools/perfetto/libperfetto/0001-meson-add-pc-file-for-lib_perfetto.patch new file mode 100644 index 00000000..719663a8 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/perfetto/libperfetto/0001-meson-add-pc-file-for-lib_perfetto.patch @@ -0,0 +1,53 @@ +From 027f90dc9386ec08f2a5107025683e5fed6f3444 Mon Sep 17 00:00:00 2001 +From: Markus Volk +Date: Mon, 17 Oct 2022 19:20:53 +0200 +Subject: [PATCH] meson: add PC file for lib_perfetto + +Signed-off-by: Etienne Cordonnier +--- +Upstream-Status: Pending + + meson.build | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index 8fb1e26275..3ef3ebf27d 100644 +--- a/meson.build ++++ b/meson.build +@@ -19,8 +19,11 @@ + project( + 'perfetto', + ['cpp'], ++ version: '47.0' + ) + ++soversion = meson.project_version() ++ + fs = import('fs') + + if not fs.is_dir('sdk') +@@ -35,8 +38,9 @@ if host_machine.system() == 'android' + deps_perfetto += cpp.find_library('log') + endif + +-lib_perfetto = static_library( ++lib_perfetto = shared_library( + 'perfetto', ++ version: soversion, + sources: 'sdk/perfetto.cc', + dependencies: deps_perfetto, + install: true, +@@ -50,6 +54,10 @@ dir_perfetto_trace = join_paths(meson.current_source_dir(), + + install_data(dir_perfetto_trace / 'perfetto_trace.proto') + ++install_headers('sdk/perfetto.h') ++pkg = import('pkgconfig') ++pkg.generate(lib_perfetto) ++ + dep_perfetto = declare_dependency( + link_with: lib_perfetto, + include_directories: inc_perfetto, +-- +2.43.0 + diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/perfetto/perfetto.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/perfetto/perfetto.bb index 884e0a02..d2a6fbe6 100644 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/perfetto/perfetto.bb +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/perfetto/perfetto.bb @@ -1,16 +1,17 @@ LICENSE = "Apache-2.0 & BSD-3-Clause & MIT & Zlib" -LIC_FILES_CHKSUM = "file://LICENSE;md5=f87516e0b698007e9e75a1fe1012b390 \ +LIC_FILES_CHKSUM = "file://LICENSE;md5=d2572d98547d43906b53615f856a8c2d \ file://buildtools/libcxx/LICENSE.TXT;md5=55d89dd7eec8d3b4204b680e27da3953 \ file://buildtools/libcxxabi/LICENSE.TXT;md5=7b9334635b542c56868400a46b272b1e \ file://buildtools/libunwind/LICENSE.TXT;md5=f66970035d12f196030658b11725e1a1 \ file://buildtools/protobuf/LICENSE;md5=37b5762e07f0af8c74ce80a8bda4266b \ - file://buildtools/zlib/LICENSE;md5=f09575dbfb09420642318b413159496f \ + file://buildtools/zlib/LICENSE;md5=8c75f2b4df47a77f9445315a9500cd1c \ file://debian/copyright;md5=4e08364c82141f181de69d0a2b89d612 \ file://python/LICENSE;md5=c602a632c34ade9c78a976734077bce7" +# Dependencies from perfetto/tools/install-build-deps SRC_URI:append = " \ - git://github.com/protocolbuffers/protobuf.git;branch=3.9.x;protocol=https;destsuffix=git/buildtools/protobuf;name=protobuf \ + git://github.com/protocolbuffers/protobuf.git;branch=main;protocol=https;destsuffix=git/buildtools/protobuf;name=protobuf \ git://chromium.googlesource.com/external/github.com/llvm/llvm-project/libcxx.git;protocol=https;destsuffix=git/buildtools/libcxx;branch=main;name=libcxx \ git://chromium.googlesource.com/external/github.com/llvm/llvm-project/libcxxabi.git;protocol=https;destsuffix=git/buildtools/libcxxabi;branch=main;name=libcxxabi \ git://chromium.googlesource.com/external/github.com/llvm/llvm-project/libunwind.git;protocol=https;destsuffix=git/buildtools/libunwind;branch=main;name=libunwind \ @@ -22,25 +23,28 @@ SRC_URI:append = " \ git://android.googlesource.com/platform/bionic.git;branch=master;protocol=https;destsuffix=git/buildtools/bionic;name=bionic \ git://android.googlesource.com/platform/external/zlib.git;branch=master;protocol=https;destsuffix=git/buildtools/zlib;name=zlib \ git://android.googlesource.com/platform/external/lzma.git;branch=master;protocol=https;destsuffix=git/buildtools/lzma;name=lzma \ + git://android.googlesource.com/platform/external/zstd.git;branch=master;protocol=https;destsuffix=git/buildtools/zstd;name=zstd \ https://storage.googleapis.com/perfetto/gn-linux64-1968-0725d782;subdir=git/buildtools/;name=gn \ \ file://0001-Remove-check_build_deps-build-steps.patch \ - file://0001-Add-missing-header-cstdint-for-uintXX_t-types.patch" + file://0002-traced-fix-missing-include.patch \ + " -SRCREV_bionic = "4b0e16bc72a82a63c699977376a7d6eadca1b206" +SRCREV_bionic = "a0d0355105cb9d4a4b5384897448676133d7b8e2" SRCREV_core = "9e6cef7f07d8c11b3ea820938aeb7ff2e9dbaa52" SRCREV_lzma = "7851dce6f4ca17f5caa1c93a4e0a45686b1d56c3" SRCREV_libprocinfo = "fd214c13ededecae97a3b15b5fccc8925a749a84" SRCREV_logging = "7b36b566c9113fc703d68f76e8f40c0c2432481c" -SRCREV_unwinding = "d66882575ebe3700d6a6b10185f3aee28acc1051" -SRCREV_protobuf = "6a59a2ad1f61d9696092f79b6d74368b4d7970a3" +SRCREV_unwinding = "4b59ea8471e89d01300481a92de3230b79b6d7c7" +SRCREV_protobuf = "f0dc78d7e6e331b8c6bb2d5283e06aa26883ca7c" SRCREV_libbase = "78f1c2f83e625bdf66d55b48bdb3a301c20d2fb3" -SRCREV_libcxx = "f8571eaba606bde2eb8cd34b30104ca33e7c207e" -SRCREV_libcxxabi = "8dd405113a4f3694e910b79785dd7fb7535a888a" -SRCREV_libunwind = "aabcd8753678f1536e15eb6385a948470debdae4" -SRCREV_zlib = "5c85a2da4c13eda07f69d81a1579a5afddd35f59" +SRCREV_libcxx = "852bc6746f45add53fec19f3a29280e69e358d44" +SRCREV_libcxxabi = "a37a3aa431f132b02a58656f13984d51098330a2" +SRCREV_libunwind = "419b03c0b8f20d6da9ddcb0d661a94a97cdd7dad" +SRCREV_zlib = "6d3f6aa0f87c9791ca7724c279ef61384f331dfd" +SRCREV_zstd = "77211fcc5e08c781734a386402ada93d0d18d093" -SRCREV_FORMAT .="_bionic_core_lzma_libprocinfo_logging_unwinding_protobuf_libbase_libcxx_libcxxabi_libunwind_zlib" +SRCREV_FORMAT .="_bionic_core_lzma_libprocinfo_logging_unwinding_protobuf_libbase_libcxx_libcxxabi_libunwind_zlib_zstd" SRC_URI[gn.sha256sum] = "f706aaa0676e3e22f5fc9ca482295d7caee8535d1869f99efa2358177b64f5cd" @@ -97,7 +101,7 @@ do_configure () { ARGS=$ARGS" target_os=\"linux\"" ARGS=$ARGS" target_cpu=\"$arch\"" ARGS=$ARGS" target_cc=\"$CC_BIN ${TUNE_CCARGS} ${DEBUG_PREFIX_MAP}\"" - ARGS=$ARGS" target_cxx=\"$CXX_BIN -std=c++11 ${TUNE_CCARGS} ${DEBUG_PREFIX_MAP}\"" + ARGS=$ARGS" target_cxx=\"$CXX_BIN ${TUNE_CCARGS} ${DEBUG_PREFIX_MAP}\"" ARGS=$ARGS" target_strip=\"$STRIP_BIN\"" # ARGS=$ARGS" target_sysroot=\"${RECIPE_SYSROOT}\"" ARGS=$ARGS" target_linker=\"$CC_BIN ${TUNE_CCARGS} ${LDFLAGS}\"" diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/perfetto/perfetto.inc b/sources/meta-openembedded/meta-oe/recipes-devtools/perfetto/perfetto.inc index 4b06c5bf..e0e4f04a 100644 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/perfetto/perfetto.inc +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/perfetto/perfetto.inc @@ -1,10 +1,15 @@ SUMMARY = "Perfetto - System profiling, app tracing and trace analysis." HOMEPAGE = "https://github.com/google/perfetto" -SRC_URI = "git://github.com/google/perfetto.git;protocol=https;name=perfetto;nobranch=1" +FILESEXTRAPATHS:prepend := "${THISDIR}/common:" -SRCREV_perfetto = "b8da07095979310818f0efde2ef3c69ea70d62c5" +# Add only patches here which are used by both perfetto and libperfetto +SRC_URI = "git://github.com/google/perfetto.git;protocol=https;name=perfetto;nobranch=1 \ + file://0001-fix-musl-build.patch \ + " + +SRCREV_perfetto = "c74251226a8caa0b43377902ee06d2570faa0c15" SRCREV_FORMAT = "perfetto" -PV = "31.0" +PV = "47.0" S = "${WORKDIR}/git" diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/perfetto/files/0001-Remove-check_build_deps-build-steps.patch b/sources/meta-openembedded/meta-oe/recipes-devtools/perfetto/perfetto/0001-Remove-check_build_deps-build-steps.patch similarity index 85% rename from sources/meta-openembedded/meta-oe/recipes-devtools/perfetto/files/0001-Remove-check_build_deps-build-steps.patch rename to sources/meta-openembedded/meta-oe/recipes-devtools/perfetto/perfetto/0001-Remove-check_build_deps-build-steps.patch index c10400ae..118c3aed 100644 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/perfetto/files/0001-Remove-check_build_deps-build-steps.patch +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/perfetto/perfetto/0001-Remove-check_build_deps-build-steps.patch @@ -1,4 +1,4 @@ -From 3b7091243ec03054ca8800b51b85a1c09e7e3075 Mon Sep 17 00:00:00 2001 +From 07ddc4b9b7a6fec73cdc295baba353944857212e Mon Sep 17 00:00:00 2001 From: Sui Chen Date: Mon, 13 Jun 2022 17:46:49 +0000 Subject: [PATCH] Remove "check_build_deps" build steps @@ -11,6 +11,7 @@ Also setting "is_cross_compiling" to true, so that the host-side tools rather than the Bitbake-generated one. Signed-off-by: Sui Chen +Signed-off-by: Etienne Cordonnier --- Upstream-Status: Pending @@ -20,10 +21,10 @@ Upstream-Status: Pending 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/gn/BUILD.gn b/gn/BUILD.gn -index 8a7ca72a8..e4a2d39f0 100644 +index ed055ee700..ea79979ec5 100644 --- a/gn/BUILD.gn +++ b/gn/BUILD.gn -@@ -111,7 +111,6 @@ group("default_deps") { +@@ -117,7 +117,6 @@ group("default_deps") { deps = [ ":gen_buildflags" ] if (perfetto_build_standalone) { public_deps = [ @@ -32,10 +33,10 @@ index 8a7ca72a8..e4a2d39f0 100644 "//gn/standalone/sanitizers:deps", ] diff --git a/gn/standalone/BUILD.gn b/gn/standalone/BUILD.gn -index 582e9b867..9c77ac64c 100644 +index 36fb6371a5..f7bc97b1a6 100644 --- a/gn/standalone/BUILD.gn +++ b/gn/standalone/BUILD.gn -@@ -441,10 +441,10 @@ config("android_liblog") { +@@ -469,10 +469,10 @@ config("android_liblog") { } # Checks that tools/install-build-deps has been run since it last changed. @@ -53,7 +54,7 @@ index 582e9b867..9c77ac64c 100644 +# args = [ "--android" ] +#} diff --git a/gn/standalone/BUILDCONFIG.gn b/gn/standalone/BUILDCONFIG.gn -index 6f32686c1..c041989b0 100644 +index 05ed548f9d..94db724b2b 100644 --- a/gn/standalone/BUILDCONFIG.gn +++ b/gn/standalone/BUILDCONFIG.gn @@ -59,8 +59,9 @@ declare_args() { @@ -67,7 +68,4 @@ index 6f32686c1..c041989b0 100644 + is_cross_compiling = true } default_configs = [ - "//gn/standalone:debug_symbols", --- -2.37.1 - + "//gn/standalone:default", diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/perfetto/perfetto/0002-traced-fix-missing-include.patch b/sources/meta-openembedded/meta-oe/recipes-devtools/perfetto/perfetto/0002-traced-fix-missing-include.patch new file mode 100644 index 00000000..49b79893 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/perfetto/perfetto/0002-traced-fix-missing-include.patch @@ -0,0 +1,28 @@ +From d005c0123b2f929b918359a53ffe61d7ca2212a0 Mon Sep 17 00:00:00 2001 +From: Lalit Maganti +Date: Wed, 14 Aug 2024 11:56:47 +0100 +Subject: [PATCH] traced: fix missing include + +Change-Id: Ib9ce8ce5b057e89fa451ccef228228d607b36793 +Signed-off-by: Etienne Cordonnier +--- +Upstream-Status: Backport [https://github.com/google/perfetto/commit/d005c0123b2f929b918359a53ffe61d7ca2212a0] + + src/traced/probes/sys_stats/sys_stats_data_source.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/traced/probes/sys_stats/sys_stats_data_source.h b/src/traced/probes/sys_stats/sys_stats_data_source.h +index e09cd8a2ca..7e4749bdcd 100644 +--- a/src/traced/probes/sys_stats/sys_stats_data_source.h ++++ b/src/traced/probes/sys_stats/sys_stats_data_source.h +@@ -21,6 +21,7 @@ + + #include + #include ++#include + #include + + #include "perfetto/ext/base/paged_memory.h" +-- +2.43.0 + diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/perl/dbd-mariadb_1.23.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/perl/dbd-mariadb_1.23.bb new file mode 100644 index 00000000..0eaf2137 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/perl/dbd-mariadb_1.23.bb @@ -0,0 +1,20 @@ +DESPCRIPTION = "DBD::MariaDB is the Perl5 Database Interface driver for MariaDB and MySQL databases." +HOMEPAGE = "https://metacpan.org/dist/DBD-MariaDB" +LICENSE = "GPL-1.0-only" +LIC_FILES_CHKSUM = "file://LICENSE;md5=d0a06964340e5c0cde88b7af611f755c" + +DEPENDS = "libdbi-perl-native libdev-checklib-perl-native libmysqlclient" + +SRC_URI = "${CPAN_MIRROR}/authors/id/P/PA/PALI/DBD-MariaDB-${PV}.tar.gz" +SRC_URI[sha256sum] = "0d0c76c660ddd55570e48f3e2fdea8f621a69ac0ed48190e8cfcafcb5e9b859d" + +RDEPENDS:${PN} = "libdbi-perl" + +S = "${WORKDIR}/DBD-MariaDB-${PV}" + +inherit cpan + +RDEPENDS:${PN}-ptest += " \ + libtest-warnings-perl \ + perl-module-test-more \ +" diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/perl/exiftool_12.72.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/perl/exiftool_12.72.bb deleted file mode 100644 index ba3e3fdf..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/perl/exiftool_12.72.bb +++ /dev/null @@ -1,22 +0,0 @@ -SUMMARY = "Exiftool" -DESCRIPTION = "ExifTool is a platform-independent Perl library plus a command-line application for reading, writing and editing meta information in a wide variety of files." -HOMEPAGE = "https://exiftool.org/" -SECTION = "libs" -LICENSE = "GPL-3.0-only" -LIC_FILES_CHKSUM = "file://perl-Image-ExifTool.spec;beginline=5;endline=5;md5=ffefffc98dab025cb49489bd4d88ee10" - -inherit cpan - -SRCREV = "fc4f6614ff0c19bb5f332a9c464dcef7267931df" -SRC_URI = "git://github.com/exiftool/exiftool;protocol=https;branch=master" - -S = "${WORKDIR}/git" - -RDEPENDS:${PN} = " \ - perl \ - perl-module-list-util \ - perl-module-overload \ - perl-module-file-glob \ - perl-module-scalar-util \ - perl-module-compress-zlib \ -" diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/perl/exiftool_12.89.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/perl/exiftool_12.89.bb new file mode 100644 index 00000000..3d745146 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/perl/exiftool_12.89.bb @@ -0,0 +1,22 @@ +SUMMARY = "Exiftool" +DESCRIPTION = "ExifTool is a platform-independent Perl library plus a command-line application for reading, writing and editing meta information in a wide variety of files." +HOMEPAGE = "https://exiftool.org/" +SECTION = "libs" +LICENSE = "GPL-3.0-only" +LIC_FILES_CHKSUM = "file://perl-Image-ExifTool.spec;beginline=5;endline=5;md5=ffefffc98dab025cb49489bd4d88ee10" + +inherit cpan + +SRCREV = "e04534a40925354187e8432d44248229d774f34a" +SRC_URI = "git://github.com/exiftool/exiftool;protocol=https;branch=master" + +S = "${WORKDIR}/git" + +RDEPENDS:${PN} = " \ + perl \ + perl-module-list-util \ + perl-module-overload \ + perl-module-file-glob \ + perl-module-scalar-util \ + perl-module-compress-zlib \ +" diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/perl/libdbd-mysql-perl/0001-Makefile.PL-avoid-running-assert_lib-at-configure.patch b/sources/meta-openembedded/meta-oe/recipes-devtools/perl/libdbd-mysql-perl/0001-Makefile.PL-avoid-running-assert_lib-at-configure.patch deleted file mode 100644 index 2e010931..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/perl/libdbd-mysql-perl/0001-Makefile.PL-avoid-running-assert_lib-at-configure.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 577cdd6a571cfed506ec902b9021e60a2b854e4a Mon Sep 17 00:00:00 2001 -From: Chen Qi -Date: Sun, 7 Jul 2024 22:32:30 -0700 -Subject: [PATCH] Makefile.PL: avoid running assert_lib at configure - -The assert_lib will run the generated binary. When cross compiling, -e.g., for qemuarm64, we'll see error like below: - - /usr/lib64/ld-linux-aarch64.so.1: No such file or directory - -We should just skip library checking, because in OE, if these libs are -not available, the do_compile process will fail anyway. - -Upstream-Status: Inappropriate [OE Specific] - -Signed-off-by: Chen Qi ---- - Makefile.PL | 6 +----- - 1 file changed, 1 insertion(+), 5 deletions(-) - -diff --git a/Makefile.PL b/Makefile.PL -index a1b38f6..939cadc 100644 ---- a/Makefile.PL -+++ b/Makefile.PL -@@ -206,11 +206,7 @@ To change these settings, see 'perl Makefile.PL --help' and - MSG - - print "Checking if libs are available for compiling...\n"; -- --assert_lib( -- LIBS => ($opt->{'embedded'} ? $opt->{'embedded'} : $opt->{libs}), --); -- -+print "Skip checking libs at configure stage as we are cross compiling.\n"; - print "Looks good.\n\n"; - - sleep 1; --- -2.25.1 - diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/perl/libdbd-mysql-perl_4.050.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/perl/libdbd-mysql-perl_4.050.bb deleted file mode 100644 index 99a9fcf6..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/perl/libdbd-mysql-perl_4.050.bb +++ /dev/null @@ -1,24 +0,0 @@ -SUMMARY = "A Perl DBI driver for MySQL" -DESCRIPTION = "DBD::mysql is the Perl5 Database Interface driver for \ -the MySQL database. In other words: DBD::mysql is an interface between \ -the Perl programming language and the MySQL programming API that comes \ -with the MySQL relational database management system. Most functions \ -provided by this programming API are supported. Some rarely used \ -functions are missing, mainly because no-one ever requested them. \ -" -HOMEPAGE = "https://github.com/perl5-dbi/DBD-mysql" - -SECTION = "libs" -LICENSE = "Artistic-1.0 | GPL-1.0-or-later" -DEPENDS += "libdev-checklib-perl-native libdbi-perl-native libmysqlclient" - -LIC_FILES_CHKSUM = "file://LICENSE;md5=d0a06964340e5c0cde88b7af611f755c" - -SRCREV = "9b5b70ea372f49fe9bc9e592dae3870596d1e3d6" -SRC_URI = "git://github.com/perl5-dbi/DBD-mysql.git;protocol=https;branch=master \ - file://0001-Makefile.PL-avoid-running-assert_lib-at-configure.patch \ - " - -S = "${WORKDIR}/git" - -inherit cpan diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/perl/libdbi-perl/0001-Fix-building-on-Fedora-40-with-GCC-14.2.1.patch b/sources/meta-openembedded/meta-oe/recipes-devtools/perl/libdbi-perl/0001-Fix-building-on-Fedora-40-with-GCC-14.2.1.patch new file mode 100644 index 00000000..f29d6c4d --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/perl/libdbi-perl/0001-Fix-building-on-Fedora-40-with-GCC-14.2.1.patch @@ -0,0 +1,28 @@ +From dc970a868a4c2d7e2051b533e0a3588ef1d35530 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Dani=C3=ABl=20van=20Eeden?= +Date: Mon, 26 Aug 2024 10:17:01 +0200 +Subject: [PATCH] Fix building on Fedora 40 with GCC 14.2.1 + +Upstream-Status: Backport [https://github.com/perl5-dbi/dbi/commit/d6e2bf13ac6043f5b0a9a147805b4915bd70e631] + +Signed-off-by: Changqing Li +--- + DBI.xs | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/DBI.xs b/DBI.xs +index 747e341..9b1d136 100644 +--- a/DBI.xs ++++ b/DBI.xs +@@ -1106,7 +1106,7 @@ dbih_inner(pTHX_ SV *orv, const char *what) + if (!SvMAGICAL(ohv)) { + if (!what) + return NULL; +- if (!hv_fetch(ohv,"_NO_DESTRUCT_WARN",17,0)) ++ if (!hv_fetch((HV*)ohv,"_NO_DESTRUCT_WARN",17,0)) + sv_dump(orv); + croak("%s handle %s is not a DBI handle (has no magic)", + what, neatsvpv(orv,0)); +-- +2.46.0 + diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/perl/libdbi-perl/CVE-2014-10402.patch b/sources/meta-openembedded/meta-oe/recipes-devtools/perl/libdbi-perl/CVE-2014-10402.patch deleted file mode 100644 index b41bbe0a..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/perl/libdbi-perl/CVE-2014-10402.patch +++ /dev/null @@ -1,56 +0,0 @@ -Backport patch to fix CVE-2014-10402. - -CVE: CVE-2014-10402 -Upstream-Status: Backport [https://github.com/rehsack/dbi/commit/19d0fb1] - -Ref: -https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=972180#12 - -Signed-off-by: Kai Kang - - -From 19d0fb169eed475e1c053e99036b8668625cfa94 Mon Sep 17 00:00:00 2001 -From: Jens Rehsack -Date: Tue, 6 Oct 2020 10:22:17 +0200 -Subject: [PATCH] lib/DBD/File.pm: fix CVE-2014-10401 - -Dig into the root cause of RT#99508 - which resulted in CVE-2014-10401 - and -figure out that DBI->parse_dsn is the wrong helper to parse our attributes in -DSN, since in DBD::dr::connect only the "dbname" remains from DSN which causes -parse_dsn to bailout. - -Parsing on our own similar to parse_dsn shows the way out. - -Signed-off-by: Jens Rehsack ---- - lib/DBD/File.pm | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - -diff --git a/lib/DBD/File.pm b/lib/DBD/File.pm -index fb14e9a..f55076f 100644 ---- a/lib/DBD/File.pm -+++ b/lib/DBD/File.pm -@@ -109,7 +109,11 @@ sub connect - # We do not (yet) care about conflicting attributes here - # my $dbh = DBI->connect ("dbi:CSV:f_dir=test", undef, undef, { f_dir => "text" }); - # will test here that both test and text should exist -- if (my $attr_hash = (DBI->parse_dsn ($dbname))[3]) { -+ # -+ # Parsing on our own similar to parse_dsn to find attributes in 'dbname' parameter. -+ if ($dbname) { -+ my @attrs = split /;/ => $dbname; -+ my $attr_hash = { map { split /\s*=>?\s*|\s*,\s*/, $_} @attrs }; - if (defined $attr_hash->{f_dir} && ! -d $attr_hash->{f_dir}) { - my $msg = "No such directory '$attr_hash->{f_dir}"; - $drh->set_err (2, $msg); -@@ -120,7 +124,6 @@ sub connect - if ($attr and defined $attr->{f_dir} && ! -d $attr->{f_dir}) { - my $msg = "No such directory '$attr->{f_dir}"; - $drh->set_err (2, $msg); -- $attr->{RaiseError} and croak $msg; - return; - } - --- -2.17.1 - diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/perl/libdbi-perl_1.643.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/perl/libdbi-perl_1.643.bb deleted file mode 100644 index 1fee83a8..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/perl/libdbi-perl_1.643.bb +++ /dev/null @@ -1,69 +0,0 @@ -SUMMARY = "The Perl Database Interface" -DESCRIPTION = "DBI is a database access Application Programming Interface \ -(API) for the Perl Language. The DBI API Specification defines a set \ -of functions, variables and conventions that provide a consistent \ -database interface independent of the actual database being used. \ -" -HOMEPAGE = "http://search.cpan.org/dist/DBI/" -SECTION = "libs" -LICENSE = "Artistic-1.0 | GPL-1.0-or-later" -LIC_FILES_CHKSUM = "file://LICENSE;md5=10982c7148e0a012c0fd80534522f5c5" - -SRC_URI = "http://search.cpan.org/CPAN/authors/id/T/TI/TIMB/DBI-${PV}.tar.gz \ - file://CVE-2014-10402.patch \ - " -SRC_URI[md5sum] = "352f80b1e23769c116082a90905d7398" -SRC_URI[sha256sum] = "8a2b993db560a2c373c174ee976a51027dd780ec766ae17620c20393d2e836fa" - -S = "${WORKDIR}/DBI-${PV}" - -inherit cpan ptest-perl - -do_install:prepend() { - # test requires "-T" (taint) command line option - rm -rf ${B}/t/pod-coverage.t - rm -rf ${B}/t/13taint.t - # source of test failure not obvious - rm -rf ${B}/t/85gofer.t - # unclear why there are several duplicates of tests in tarball - rm -rf ${B}/t/z*.t -} - -do_install:append() { - sed -i "s:^#!.*:#!/usr/bin/env perl:" ${D}${bindir}/dbiproxy \ - ${D}${bindir}/dbiprof ${D}${bindir}/dbilogstrip -} - -RDEPENDS:${PN}:class-target = " \ - perl \ - perl-module-carp \ - perl-module-exporter \ - perl-module-exporter-heavy \ - perl-module-dynaloader \ - perl-module-io-dir \ - perl-module-scalar-util \ - perl-module-universal \ -" - -RDEPENDS:${PN}-ptest = " \ - ${PN} \ - perl-module-b \ - perl-module-benchmark \ - perl-module-cwd \ - perl-module-data-dumper \ - perl-module-encode \ - perl-module-encode-byte \ - perl-module-encode-encoding \ - perl-module-file-copy \ - perl-module-file-path \ - perl-module-lib \ - perl-module-perlio \ - perl-module-perlio-scalar \ - perl-module-perlio-via \ - perl-module-sdbm-file \ - perl-module-storable \ - perl-module-test-more \ - perl-module-utf8 \ - " - -BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/perl/libdbi-perl_1.644.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/perl/libdbi-perl_1.644.bb new file mode 100644 index 00000000..7f6c9059 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/perl/libdbi-perl_1.644.bb @@ -0,0 +1,68 @@ +SUMMARY = "The Perl Database Interface" +DESCRIPTION = "DBI is a database access Application Programming Interface \ +(API) for the Perl Language. The DBI API Specification defines a set \ +of functions, variables and conventions that provide a consistent \ +database interface independent of the actual database being used. \ +" +HOMEPAGE = "http://search.cpan.org/dist/DBI/" +SECTION = "libs" +LICENSE = "Artistic-1.0 | GPL-1.0-or-later" +LIC_FILES_CHKSUM = "file://LICENSE;md5=8097b88c6165f0d43949441e6ea581cd" + +SRC_URI = "https://cpan.metacpan.org/authors/id/H/HM/HMBRAND/DBI-${PV}.tar.gz \ + file://0001-Fix-building-on-Fedora-40-with-GCC-14.2.1.patch \ + " +SRC_URI[sha256sum] = "2297b99de09e67086640b590699e0e982fb469da63a93fe28dc14782db7a53c8" + +S = "${WORKDIR}/DBI-${PV}" + +inherit cpan ptest-perl + +do_install:prepend() { + # test requires "-T" (taint) command line option + rm -rf ${B}/t/pod-coverage.t + rm -rf ${B}/t/13taint.t + # source of test failure not obvious + rm -rf ${B}/t/85gofer.t + # unclear why there are several duplicates of tests in tarball + rm -rf ${B}/t/z*.t +} + +do_install:append() { + sed -i "s:^#!.*:#!/usr/bin/env perl:" ${D}${bindir}/dbiproxy \ + ${D}${bindir}/dbiprof ${D}${bindir}/dbilogstrip +} + +RDEPENDS:${PN}:class-target = " \ + perl \ + perl-module-carp \ + perl-module-exporter \ + perl-module-exporter-heavy \ + perl-module-dynaloader \ + perl-module-io-dir \ + perl-module-scalar-util \ + perl-module-universal \ +" + +RDEPENDS:${PN}-ptest = " \ + ${PN} \ + perl-module-b \ + perl-module-benchmark \ + perl-module-cwd \ + perl-module-data-dumper \ + perl-module-encode \ + perl-module-encode-byte \ + perl-module-encode-encoding \ + perl-module-file-copy \ + perl-module-file-path \ + perl-module-lib \ + perl-module-perlio \ + perl-module-perlio-scalar \ + perl-module-perlio-via \ + perl-module-sdbm-file \ + perl-module-storable \ + perl-module-test-more \ + perl-module-utf8 \ + " + +BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/perl/libdev-checklib-perl_1.16.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/perl/libdev-checklib-perl_1.16.bb index bda1771c..74a09e7b 100644 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/perl/libdev-checklib-perl_1.16.bb +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/perl/libdev-checklib-perl_1.16.bb @@ -8,7 +8,7 @@ LICENSE = "Artistic-1.0 | GPL-1.0-or-later" LIC_FILES_CHKSUM = "file://README;md5=7911cdbb572d25c5f2e2ea17f669efc2" -SRC_URI = "https://cpan.metacpan.org/authors/id/M/MA/MATTN/Devel-CheckLib-${PV}.tar.gz \ +SRC_URI = "https://cpan.metacpan.org/modules/by-module/Devel/Devel-CheckLib-${PV}.tar.gz \ file://0001-CheckLib.pm-don-t-execute-the-binary.patch \ " SRC_URI[sha256sum] = "869d38c258e646dcef676609f0dd7ca90f085f56cf6fd7001b019a5d5b831fca" diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/perl/libpcsc-perl_1.4.14.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/perl/libpcsc-perl_1.4.14.bb deleted file mode 100644 index ff4e1f05..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/perl/libpcsc-perl_1.4.14.bb +++ /dev/null @@ -1,22 +0,0 @@ -SUMMARY = "Perl interface to the PC/SC smart card library" -DESCRIPTION = "Perl wrapper to the PC/SC smartcard library (pcsc-lite) \ -together with some small examples. \ -The provided modules are Chipcard::PCSC and Chipcard::PCSC::Card." -HOMEPAGE = "https://metacpan.org/dist/pcsc-perl" -SECTION = "libs" -LICENSE = "Artistic-1.0 | GPL-1.0-or-later" -LIC_FILES_CHKSUM = "file://LICENCE;md5=b234ee4d69f5fce4486a80fdaf4a4263" - -SRC_URI = "https://cpan.metacpan.org/authors/id/W/WH/WHOM/pcsc-perl-${PV}.tar.bz2" -SRC_URI[md5sum] = "45601505dbb7b27329811ac9bad35fab" -SRC_URI[sha256sum] = "2722b7e5543e4faf3ba1ec6b29a7dfec6d92be1edec09d0a3191992d4d88c69d" - -S = "${WORKDIR}/pcsc-perl-${PV}" - -inherit cpan pkgconfig - -DEPENDS += "pcsc-lite" - -RDEPENDS:${PN} += "perl-module-carp" - -BBCLASSEXTEND="native" diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/perl/libpcsc-perl_1.4.15.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/perl/libpcsc-perl_1.4.15.bb new file mode 100644 index 00000000..ff1552a9 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/perl/libpcsc-perl_1.4.15.bb @@ -0,0 +1,24 @@ +SUMMARY = "Perl interface to the PC/SC smart card library" +DESCRIPTION = "Perl wrapper to the PC/SC smartcard library (pcsc-lite) \ +together with some small examples. \ +The provided modules are Chipcard::PCSC and Chipcard::PCSC::Card." +HOMEPAGE = "https://metacpan.org/dist/pcsc-perl" +SECTION = "libs" +LICENSE = "Artistic-1.0 | GPL-1.0-or-later" +LIC_FILES_CHKSUM = "file://LICENCE;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +SRC_URI = "https://cpan.metacpan.org/authors/id/W/WH/WHOM/pcsc-perl-${PV}.tar.bz2" +SRC_URI[sha256sum] = "5cc834438739bd6e4e837fb7e10bd8befb809cd185ae6cf4b33e5fa9161f59fe" + +UPSTREAM_CHECK_URI = "https://cpan.metacpan.org/authors/id/W/WH/WHOM/" +UPSTREAM_CHECK_REGEX = "pcsc-perl-(?P\d+(\.\d+)+)" + +S = "${WORKDIR}/pcsc-perl-${PV}" + +inherit cpan pkgconfig + +DEPENDS += "pcsc-lite" + +RDEPENDS:${PN} += "perl-module-carp" + +BBCLASSEXTEND="native" diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/php/php/0001-ext-opcache-config.m4-enable-opcache.patch b/sources/meta-openembedded/meta-oe/recipes-devtools/php/php/0001-ext-opcache-config.m4-enable-opcache.patch index 49621354..009d4d65 100644 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/php/php/0001-ext-opcache-config.m4-enable-opcache.patch +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/php/php/0001-ext-opcache-config.m4-enable-opcache.patch @@ -1,6 +1,6 @@ -From aa99f9db92817358d6b91040cc555f5ca31b727c Mon Sep 17 00:00:00 2001 -From: Yogita Urade -Date: Mon, 25 Nov 2024 07:07:38 +0000 +From 889583912ddd7abc628f2703892ec4884db6419a Mon Sep 17 00:00:00 2001 +From: Soumya Sambu +Date: Tue, 7 May 2024 08:39:16 +0000 Subject: [PATCH 01/11] ext/opcache/config.m4: enable opcache We can't use AC_TRY_RUN to run programs in a cross compile @@ -23,15 +23,12 @@ Signed-off-by: Mingli Yu update patch to version 8.2.18 Signed-off-by: Soumya Sambu - -update patch to version 8.2.24 -Signed-off-by: Yogita Urade --- ext/opcache/config.m4 | 204 ++---------------------------------------- 1 file changed, 8 insertions(+), 196 deletions(-) diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4 -index b3929382..ba1a9aff 100644 +index 6bf07ad3..5d645b86 100644 --- a/ext/opcache/config.m4 +++ b/ext/opcache/config.m4 @@ -113,209 +113,21 @@ if test "$PHP_OPCACHE" != "no"; then diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/php/php/0002-build-php.m4-don-t-unset-cache-variables.patch b/sources/meta-openembedded/meta-oe/recipes-devtools/php/php/0002-build-php.m4-don-t-unset-cache-variables.patch index 6183f49c..2e1e752d 100644 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/php/php/0002-build-php.m4-don-t-unset-cache-variables.patch +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/php/php/0002-build-php.m4-don-t-unset-cache-variables.patch @@ -31,7 +31,7 @@ index 9746ba28f3..93551d9ca7 100644 unset found AC_CHECK_LIB($2, $1, [found=yes], [ AC_CHECK_LIB($2, __$1, [found=yes], [found=no]) -@@ -1601,8 +1599,6 @@ dnl and as a fall back in the specified library. Defines HAVE_func and +@@ -1604,8 +1602,6 @@ dnl and as a fall back in the specified library. Defines HAVE_func and dnl HAVE_library if found and adds the library to LIBS. dnl AC_DEFUN([PHP_CHECK_FUNC],[ diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/php/php/0003-php-remove-host-specific-info-from-header-file.patch b/sources/meta-openembedded/meta-oe/recipes-devtools/php/php/0003-php-remove-host-specific-info-from-header-file.patch index 9637ed95..1aa28e2a 100644 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/php/php/0003-php-remove-host-specific-info-from-header-file.patch +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/php/php/0003-php-remove-host-specific-info-from-header-file.patch @@ -22,7 +22,7 @@ diff --git a/configure.ac b/configure.ac index 1eafd62a44..90c94323aa 100644 --- a/configure.ac +++ b/configure.ac -@@ -1289,7 +1289,7 @@ PHP_REMOVE_USR_LIB(LDFLAGS) +@@ -1462,7 +1462,7 @@ PHP_REMOVE_USR_LIB(LDFLAGS) EXTRA_LDFLAGS="$EXTRA_LDFLAGS $PHP_LDFLAGS" EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $PHP_LDFLAGS" diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/php/php/0006-ext-phar-Makefile.frag-Fix-phar-packaging.patch b/sources/meta-openembedded/meta-oe/recipes-devtools/php/php/0006-ext-phar-Makefile.frag-Fix-phar-packaging.patch index acf29408..04bd40f4 100644 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/php/php/0006-ext-phar-Makefile.frag-Fix-phar-packaging.patch +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/php/php/0006-ext-phar-Makefile.frag-Fix-phar-packaging.patch @@ -18,9 +18,11 @@ Signed-off-by: Claude Bing ext/phar/Makefile.frag | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) +diff --git a/ext/phar/Makefile.frag b/ext/phar/Makefile.frag +index 7a867dd7..4dbcafd4 100644 --- a/ext/phar/Makefile.frag +++ b/ext/phar/Makefile.frag -@@ -10,20 +10,9 @@ pharcmd: $(builddir)/phar.php $(builddir +@@ -10,20 +10,9 @@ pharcmd: $(builddir)/phar.php $(builddir)/phar.phar PHP_PHARCMD_SETTINGS = -n -d 'open_basedir=' -d 'output_buffering=0' -d 'memory_limit=-1' -d phar.readonly=0 PHP_PHARCMD_EXECUTABLE = ` \ diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/php/php/0008-ext-imap-config.m4-fix-include-paths.patch b/sources/meta-openembedded/meta-oe/recipes-devtools/php/php/0008-ext-imap-config.m4-fix-include-paths.patch index 78bae58e..a1b93a23 100644 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/php/php/0008-ext-imap-config.m4-fix-include-paths.patch +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/php/php/0008-ext-imap-config.m4-fix-include-paths.patch @@ -16,7 +16,7 @@ diff --git a/ext/imap/config.m4 b/ext/imap/config.m4 index 5086a312d0..0e938bd544 100644 --- a/ext/imap/config.m4 +++ b/ext/imap/config.m4 -@@ -110,7 +110,7 @@ if test "$PHP_IMAP" != "no"; then +@@ -122,7 +122,7 @@ if test "$PHP_IMAP" != "no"; then PHP_NEW_EXTENSION(imap, php_imap.c, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1) AC_DEFINE(HAVE_IMAP,1,[ ]) @@ -25,7 +25,7 @@ index 5086a312d0..0e938bd544 100644 IMAP_INC_CHK() el[]IMAP_INC_CHK(/include/c-client) el[]IMAP_INC_CHK(/include/imap) -@@ -199,13 +199,7 @@ if test "$PHP_IMAP" != "no"; then +@@ -211,13 +211,7 @@ if test "$PHP_IMAP" != "no"; then AC_MSG_ERROR(Cannot find rfc822.h. Please check your c-client installation.) fi diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/php/php/0009-php-don-t-use-broken-wrapper-for-mkdir.patch b/sources/meta-openembedded/meta-oe/recipes-devtools/php/php/0009-php-don-t-use-broken-wrapper-for-mkdir.patch index b5a33cca..d329387e 100644 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/php/php/0009-php-don-t-use-broken-wrapper-for-mkdir.patch +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/php/php/0009-php-don-t-use-broken-wrapper-for-mkdir.patch @@ -10,9 +10,8 @@ Signed-off-by: Changqing Li update patch to version 8.0.12 Signed-off-by: Claude Bing ---- Upstream-Status: Pending - +--- build/Makefile.global | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/php/php/0010-iconv-fix-detection.patch b/sources/meta-openembedded/meta-oe/recipes-devtools/php/php/0010-iconv-fix-detection.patch index e3b8cd47..49fb3a58 100644 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/php/php/0010-iconv-fix-detection.patch +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/php/php/0010-iconv-fix-detection.patch @@ -20,7 +20,7 @@ diff --git a/build/php.m4 b/build/php.m4 index 93551d9ca7..dba50825fb 100644 --- a/build/php.m4 +++ b/build/php.m4 -@@ -1919,7 +1919,8 @@ AC_DEFUN([PHP_SETUP_ICONV], [ +@@ -1945,7 +1945,8 @@ AC_DEFUN([PHP_SETUP_ICONV], [ unset ICONV_DIR dnl Check libc first if no path is provided in --with-iconv. diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/php/php_8.2.26.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/php/php_8.2.26.bb new file mode 100644 index 00000000..f5e57ab3 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/php/php_8.2.26.bb @@ -0,0 +1,300 @@ +SUMMARY = "A server-side, HTML-embedded scripting language" +HOMEPAGE = "http://www.php.net" +SECTION = "console/network" + +LICENSE = "PHP-3.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=fd469cce1a919f0cc95bab7afb28d19d" + +BBCLASSEXTEND = "native" +DEPENDS = "zlib bzip2 libxml2 virtual/libiconv php-native" +DEPENDS:append:libc-musl = " libucontext" +DEPENDS:class-native = "zlib-native libxml2-native" + +PHP_MAJOR_VERSION = "${@d.getVar('PV').split('.')[0]}" + +SRC_URI = "http://php.net/distributions/php-${PV}.tar.bz2 \ + file://0002-build-php.m4-don-t-unset-cache-variables.patch \ + file://0003-php-remove-host-specific-info-from-header-file.patch \ + file://0004-configure.ac-don-t-include-build-libtool.m4.patch \ + file://0006-ext-phar-Makefile.frag-Fix-phar-packaging.patch \ + file://0009-php-don-t-use-broken-wrapper-for-mkdir.patch \ + file://0010-iconv-fix-detection.patch \ + file://0001-Change-whether-to-inline-XXH3_hashLong_withSecret-to.patch \ + " + +SRC_URI:append:class-target = " \ + file://0001-ext-opcache-config.m4-enable-opcache.patch \ + file://0005-pear-fix-Makefile.frag-for-Yocto.patch \ + file://0007-sapi-cli-config.m4-fix-build-directory.patch \ + file://0008-ext-imap-config.m4-fix-include-paths.patch \ + file://php-fpm.conf \ + file://php-fpm-apache.conf \ + file://70_mod_php${PHP_MAJOR_VERSION}.conf \ + file://php-fpm.service \ + " + +S = "${WORKDIR}/php-${PV}" +SRC_URI[sha256sum] = "be57c347d451c905bcb4336832a864d9928dd0e20989b872705fea0ba6476c6b" + +CVE_STATUS_GROUPS += "CVE_STATUS_PHP" +CVE_STATUS_PHP[status] = "fixed-version: The name of this product is exactly the same as github.com/emlog/emlog. CVE can be safely ignored." +CVE_STATUS_PHP = " \ + CVE-2007-2728 \ + CVE-2007-3205 \ + CVE-2007-4596 \ +" +CVE_STATUS[CVE-2022-4900] = "cpe-incorrect: The current version (8.2.20) is not affected." + +inherit autotools pkgconfig python3native gettext multilib_header multilib_script systemd + +# phpize is not scanned for absolute paths by default (but php-config is). +# +SSTATE_SCAN_FILES += "phpize" +SSTATE_SCAN_FILES += "build-defs.h" + +PHP_LIBDIR = "${libdir}/php${PHP_MAJOR_VERSION}" + +# Common EXTRA_OECONF +COMMON_EXTRA_OECONF = "--enable-sockets \ + --enable-pcntl \ + --enable-shared \ + --disable-rpath \ + --with-pic \ + --libdir=${PHP_LIBDIR} \ +" +EXTRA_OECONF = "--enable-mbstring \ + --enable-fpm \ + --with-libdir=${baselib} \ + --with-gettext=${STAGING_LIBDIR}/.. \ + --with-zlib=${STAGING_LIBDIR}/.. \ + --with-iconv=${STAGING_LIBDIR}/.. \ + --with-bz2=${STAGING_DIR_TARGET}${exec_prefix} \ + --with-config-file-path=${sysconfdir}/php/apache2-php${PHP_MAJOR_VERSION} \ + ${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', 'ac_cv_c_bigendian_php=no', 'ac_cv_c_bigendian_php=yes', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'pam', '', 'ac_cv_lib_pam_pam_start=no', d)} \ + ${COMMON_EXTRA_OECONF} \ +" + +EXTRA_OECONF:append:riscv64 = " --with-pcre-jit=no" +EXTRA_OECONF:append:riscv32 = " --with-pcre-jit=no" +# Needs fibers assembly implemented for rv32 +# for example rv64 implementation is below +# see https://github.com/php/php-src/commit/70b02d75f2abe3a292d49c4a4e9e4f850c2fee68 +EXTRA_OECONF:append:riscv32:libc-musl = " --disable-fiber-asm" + +CACHED_CONFIGUREVARS += "ac_cv_func_dlopen=no ac_cv_lib_dl_dlopen=yes" + +EXTRA_OECONF:class-native = " \ + --with-zlib=${STAGING_LIBDIR_NATIVE}/.. \ + --without-iconv \ + ${COMMON_EXTRA_OECONF} \ +" + +PACKAGECONFIG ??= "mysql sqlite3 imap opcache openssl \ + ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6 pam', d)} \ +" +PACKAGECONFIG:class-native = "" + +PACKAGECONFIG[zip] = "--with-zip --with-zlib-dir=${STAGING_EXECPREFIXDIR},,libzip" + +PACKAGECONFIG[mysql] = "--with-mysqli=mysqlnd \ + --with-pdo-mysql=mysqlnd \ + ,--without-mysqli --without-pdo-mysql \ + ,mysql5" + +PACKAGECONFIG[sqlite3] = "--with-sqlite3=${STAGING_LIBDIR}/.. \ + --with-pdo-sqlite=${STAGING_LIBDIR}/.. \ + ,--without-sqlite3 --without-pdo-sqlite \ + ,sqlite3" +PACKAGECONFIG[pgsql] = "--with-pgsql=${STAGING_DIR_TARGET}${exec_prefix},--without-pgsql,postgresql" +PACKAGECONFIG[soap] = "--enable-soap, --disable-soap, libxml2" +PACKAGECONFIG[apache2] = "--with-apxs2=${STAGING_BINDIR_CROSS}/apxs,,apache2-native apache2" +PACKAGECONFIG[pam] = ",,libpam" +PACKAGECONFIG[imap] = "--with-imap=${STAGING_DIR_HOST} \ + --with-imap-ssl=${STAGING_DIR_HOST} \ + ,--without-imap --without-imap-ssl \ + ,uw-imap" +PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," +PACKAGECONFIG[opcache] = "--enable-opcache,--disable-opcache" +PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl" +PACKAGECONFIG[valgrind] = "--with-valgrind=${STAGING_DIR_TARGET}/usr,--with-valgrind=no,valgrind" +PACKAGECONFIG[mbregex] = "--enable-mbregex, --disable-mbregex, oniguruma" +PACKAGECONFIG[mbstring] = "--enable-mbstring,," + +export HOSTCC = "${BUILD_CC}" +export PHP_NATIVE_DIR = "${STAGING_BINDIR_NATIVE}" +export PHP_PEAR_PHP_BIN = "${STAGING_BINDIR_NATIVE}/php" +CFLAGS += " -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -g -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED -I${STAGING_INCDIR}/apache2" + +# Adding these flags enables dynamic library support, which is disabled by +# default when cross compiling +# See https://bugs.php.net/bug.php?id=60109 +CFLAGS += " -DHAVE_LIBDL " +LDFLAGS += " -ldl " +LDFLAGS:append:libc-musl = " -lucontext " +LDFLAGS:append:riscv64 = " -latomic" + +EXTRA_OEMAKE = "INSTALL_ROOT=${D}" + +acpaths = "" + +do_configure:prepend () { + rm -f ${S}/build/libtool.m4 ${S}/ltmain.sh ${S}/aclocal.m4 + find ${S} -name config.m4 | xargs -n1 sed -i 's!APXS_HTTPD=.*!APXS_HTTPD=${STAGING_SBINDIR_NATIVE}/httpd!' +} + +do_configure:append() { + # No, libtool, we really don't want rpath set... + sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool + sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool + sed -i -e's@${RECIPE_SYSROOT}@@g' \ + -e's@-ffile-prefix-map=[^ ]*[ ]*@@g' \ + -e's@-fdebug-prefix-map=[^ ]*[ ]*@@g' \ + -e's@-ffile-prefix-map=[^ ]*[ ]*@@g' \ + -e's@-fmacro-prefix-map=[^ ]*[ ]*@@g' \ + ${B}/main/build-defs.h \ + ${B}/scripts/php-config +} + +do_install:append:class-native() { + rm -rf ${D}/${PHP_LIBDIR}/php/.registry + rm -rf ${D}/${PHP_LIBDIR}/php/.channels + rm -rf ${D}/${PHP_LIBDIR}/php/.[a-z]* +} + +do_install:prepend() { + cat ${ACLOCALDIR}/libtool.m4 ${ACLOCALDIR}/lt~obsolete.m4 ${ACLOCALDIR}/ltoptions.m4 \ + ${ACLOCALDIR}/ltsugar.m4 ${ACLOCALDIR}/ltversion.m4 > ${S}/build/libtool.m4 +} + +do_install:prepend:class-target() { + if ${@bb.utils.contains('PACKAGECONFIG', 'apache2', 'true', 'false', d)}; then + # Install dummy config file so apxs doesn't fail + install -d ${D}${sysconfdir}/apache2 + printf "\nLoadModule dummy_module modules/mod_dummy.so\n" > ${D}${sysconfdir}/apache2/httpd.conf + fi +} + +# fixme +do_install:append:class-target() { + install -d ${D}${sysconfdir}/ + rm -rf ${D}/.registry + rm -rf ${D}/.channels + rm -rf ${D}/.[a-z]* + rm -rf ${D}/var + rm -f ${D}/${sysconfdir}/php-fpm.conf.default + install -m 0644 ${UNPACKDIR}/php-fpm.conf ${D}/${sysconfdir}/php-fpm.conf + install -d ${D}/${sysconfdir}/apache2/conf.d + install -m 0644 ${UNPACKDIR}/php-fpm-apache.conf ${D}/${sysconfdir}/apache2/conf.d/php-fpm.conf + install -d ${D}${sysconfdir}/init.d + sed -i 's:=/usr/sbin:=${sbindir}:g' ${B}/sapi/fpm/init.d.php-fpm + sed -i 's:=/etc:=${sysconfdir}:g' ${B}/sapi/fpm/init.d.php-fpm + sed -i 's:=/var:=${localstatedir}:g' ${B}/sapi/fpm/init.d.php-fpm + install -m 0755 ${B}/sapi/fpm/init.d.php-fpm ${D}${sysconfdir}/init.d/php-fpm + install -m 0644 ${UNPACKDIR}/php-fpm-apache.conf ${D}/${sysconfdir}/apache2/conf.d/php-fpm.conf + + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)};then + install -d ${D}${systemd_system_unitdir} + install -m 0644 ${UNPACKDIR}/php-fpm.service ${D}${systemd_system_unitdir}/php-fpm.service + sed -i -e 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${systemd_system_unitdir}/php-fpm.service + sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_system_unitdir}/php-fpm.service + sed -i -e 's,@BINDIR@,${bindir},g' ${D}${systemd_system_unitdir}/php-fpm.service + fi + + if ${@bb.utils.contains('PACKAGECONFIG', 'apache2', 'true', 'false', d)}; then + install -d ${D}${sysconfdir}/apache2/modules.d + install -d ${D}${sysconfdir}/php/apache2-php${PHP_MAJOR_VERSION} + install -m 644 ${UNPACKDIR}/70_mod_php${PHP_MAJOR_VERSION}.conf ${D}${sysconfdir}/apache2/modules.d + sed -i s,lib/,${libexecdir}/, ${D}${sysconfdir}/apache2/modules.d/70_mod_php${PHP_MAJOR_VERSION}.conf + cat ${S}/php.ini-production | \ + sed -e 's,extension_dir = \"\./\",extension_dir = \"/usr/lib/extensions\",' \ + > ${D}${sysconfdir}/php/apache2-php${PHP_MAJOR_VERSION}/php.ini + rm -f ${D}${sysconfdir}/apache2/httpd.conf* + fi +} + +MULTILIB_SCRIPTS += "${PN}:${bindir}/php-config \ + ${PN}:${bindir}/phpize \ +" + +do_install:append () { + oe_multilib_header php/main/build-defs.h php/main/php_config.h +} + +SYSROOT_PREPROCESS_FUNCS += "php_sysroot_preprocess" + +php_sysroot_preprocess () { + install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/ + install -m 755 ${D}${bindir}/phpize ${SYSROOT_DESTDIR}${bindir_crossscripts}/ + install -m 755 ${D}${bindir}/php-config ${SYSROOT_DESTDIR}${bindir_crossscripts}/ + + sed -i 's!eval echo /!eval echo ${STAGING_DIR_HOST}/!' ${SYSROOT_DESTDIR}${bindir_crossscripts}/phpize + sed -i 's!^include_dir=.*!include_dir=${STAGING_INCDIR}/php!' ${SYSROOT_DESTDIR}${bindir_crossscripts}/php-config +} + +MODPHP_PACKAGE = "${@bb.utils.contains('PACKAGECONFIG', 'apache2', '${PN}-modphp', '', d)}" + +PACKAGES = "${PN}-dbg ${PN}-cli ${PN}-phpdbg ${PN}-cgi ${PN}-fpm ${PN}-fpm-apache2 ${PN}-pear ${PN}-phar ${MODPHP_PACKAGE} ${PN}-dev ${PN}-staticdev ${PN}-doc ${PN}-opcache ${PN}" + +RDEPENDS:${PN} += "libgcc" +RDEPENDS:${PN}-pear = "${PN}" +RDEPENDS:${PN}-phar = "${PN}-cli" +RDEPENDS:${PN}-cli = "${PN}" +RDEPENDS:${PN}-modphp = "${PN} apache2" +RDEPENDS:${PN}-opcache = "${PN}" + +ALLOW_EMPTY:${PN} = "1" + +INITSCRIPT_PACKAGES = "${PN}-fpm" +inherit update-rc.d + +# WARNING: lib32-php-8.0.12-r0 do_package_qa: QA Issue: lib32-php: ELF binary /usr/libexec/apache2/modules/libphp.so has relocations in .text [textrel] +#WARNING: lib32-php-8.0.12-r0 do_package_qa: QA Issue: lib32-php-opcache: ELF binary /usr/lib/php8/extensions/no-debug-zts-20200930/opcache.so has relocations in .text [textrel] +INSANE_SKIP:${PN}:append:x86 = " textrel" +INSANE_SKIP:${PN}-opcache:append:x86 = " textrel" + +FILES:${PN}-dbg =+ "${bindir}/.debug \ + ${libexecdir}/apache2/modules/.debug" +FILES:${PN}-doc += "${PHP_LIBDIR}/php/doc" +FILES:${PN}-cli = "${bindir}/php" +FILES:${PN}-phpdbg = "${bindir}/phpdbg" +FILES:${PN}-phar = "${bindir}/phar*" +FILES:${PN}-cgi = "${bindir}/php-cgi" +FILES:${PN}-fpm = "${sbindir}/php-fpm ${sysconfdir}/php-fpm.conf ${datadir}/fpm ${sysconfdir}/init.d/php-fpm ${sysconfdir}/php-fpm.d/www.conf.default" +FILES:${PN}-fpm-apache2 = "${sysconfdir}/apache2/conf.d/php-fpm.conf" +CONFFILES:${PN}-fpm = "${sysconfdir}/php-fpm.conf" +CONFFILES:${PN}-fpm-apache2 = "${sysconfdir}/apache2/conf.d/php-fpm.conf" +INITSCRIPT_NAME:${PN}-fpm = "php-fpm" +INITSCRIPT_PARAMS:${PN}-fpm = "defaults 60" +FILES:${PN}-pear = "${bindir}/pear* ${bindir}/pecl ${PHP_LIBDIR}/php/PEAR \ + ${PHP_LIBDIR}/php/PEAR*.php ${PHP_LIBDIR}/php/System.php \ + ${PHP_LIBDIR}/php/peclcmd.php ${PHP_LIBDIR}/php/pearcmd.php \ + ${PHP_LIBDIR}/php/.channels ${PHP_LIBDIR}/php/.channels/.alias \ + ${PHP_LIBDIR}/php/.registry ${PHP_LIBDIR}/php/Archive/Tar.php \ + ${PHP_LIBDIR}/php/Console/Getopt.php ${PHP_LIBDIR}/php/OS/Guess.php \ + ${PHP_LIBDIR}/php/data/PEAR \ + ${sysconfdir}/pear.conf" +FILES:${PN}-dev = "${includedir}/php ${PHP_LIBDIR}/build ${bindir}/phpize \ + ${bindir}/php-config ${PHP_LIBDIR}/php/.depdb \ + ${PHP_LIBDIR}/php/.depdblock ${PHP_LIBDIR}/php/.filemap \ + ${PHP_LIBDIR}/php/.lock ${PHP_LIBDIR}/php/test" +FILES:${PN}-staticdev += "${PHP_LIBDIR}/extensions/*/*.a" +FILES:${PN}-opcache = "${PHP_LIBDIR}/extensions/*/opcache${SOLIBSDEV}" +FILES:${PN} = "${PHP_LIBDIR}/php" +FILES:${PN} += "${bindir} ${libexecdir}/apache2" + +SUMMARY:${PN}-modphp = "PHP module for the Apache HTTP server" +FILES:${PN}-modphp = "${libdir}/apache2 ${sysconfdir}" + +MODPHP_OLDPACKAGE = "${@bb.utils.contains('PACKAGECONFIG', 'apache2', 'modphp', '', d)}" +RPROVIDES:${PN}-modphp = "${MODPHP_OLDPACKAGE}" +RREPLACES:${PN}-modphp = "${MODPHP_OLDPACKAGE}" +RCONFLICTS:${PN}-modphp = "${MODPHP_OLDPACKAGE}" + +SYSTEMD_SERVICE:${PN}-fpm = "php-fpm.service" +SYSTEMD_PACKAGES += "${PN}-fpm" + +do_install:append:class-native() { + create_wrapper ${D}${bindir}/php \ + PHP_PEAR_SYSCONF_DIR=${sysconfdir}/ +} diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/php/php_8.2.28.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/php/php_8.2.28.bb deleted file mode 100644 index 1d5162fa..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/php/php_8.2.28.bb +++ /dev/null @@ -1,299 +0,0 @@ -SUMMARY = "A server-side, HTML-embedded scripting language" -HOMEPAGE = "http://www.php.net" -SECTION = "console/network" - -LICENSE = "PHP-3.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=fd469cce1a919f0cc95bab7afb28d19d" - -BBCLASSEXTEND = "native" -DEPENDS = "zlib bzip2 libxml2 virtual/libiconv php-native" -DEPENDS:append:libc-musl = " libucontext" -DEPENDS:class-native = "zlib-native libxml2-native" - -PHP_MAJOR_VERSION = "${@d.getVar('PV').split('.')[0]}" - -SRC_URI = "http://php.net/distributions/php-${PV}.tar.bz2 \ - file://0002-build-php.m4-don-t-unset-cache-variables.patch \ - file://0003-php-remove-host-specific-info-from-header-file.patch \ - file://0004-configure.ac-don-t-include-build-libtool.m4.patch \ - file://0006-ext-phar-Makefile.frag-Fix-phar-packaging.patch \ - file://0009-php-don-t-use-broken-wrapper-for-mkdir.patch \ - file://0010-iconv-fix-detection.patch \ - file://0001-Change-whether-to-inline-XXH3_hashLong_withSecret-to.patch \ - " - -SRC_URI:append:class-target = " \ - file://0001-ext-opcache-config.m4-enable-opcache.patch \ - file://0005-pear-fix-Makefile.frag-for-Yocto.patch \ - file://0007-sapi-cli-config.m4-fix-build-directory.patch \ - file://0008-ext-imap-config.m4-fix-include-paths.patch \ - file://php-fpm.conf \ - file://php-fpm-apache.conf \ - file://70_mod_php${PHP_MAJOR_VERSION}.conf \ - file://php-fpm.service \ - " - -S = "${WORKDIR}/php-${PV}" -SRC_URI[sha256sum] = "2919cc1b92190a58dc17904b92e626600b96ce49a4c72e77513786a4406acce5" - -CVE_STATUS_GROUPS += "CVE_STATUS_PHP" -CVE_STATUS_PHP[status] = "fixed-version: The name of this product is exactly the same as github.com/emlog/emlog. CVE can be safely ignored." -CVE_STATUS_PHP = " \ - CVE-2007-2728 \ - CVE-2007-3205 \ - CVE-2007-4596 \ -" - -inherit autotools pkgconfig python3native gettext multilib_header multilib_script systemd - -# phpize is not scanned for absolute paths by default (but php-config is). -# -SSTATE_SCAN_FILES += "phpize" -SSTATE_SCAN_FILES += "build-defs.h" - -PHP_LIBDIR = "${libdir}/php${PHP_MAJOR_VERSION}" - -# Common EXTRA_OECONF -COMMON_EXTRA_OECONF = "--enable-sockets \ - --enable-pcntl \ - --enable-shared \ - --disable-rpath \ - --with-pic \ - --libdir=${PHP_LIBDIR} \ -" -EXTRA_OECONF = "--enable-mbstring \ - --enable-fpm \ - --with-libdir=${baselib} \ - --with-gettext=${STAGING_LIBDIR}/.. \ - --with-zlib=${STAGING_LIBDIR}/.. \ - --with-iconv=${STAGING_LIBDIR}/.. \ - --with-bz2=${STAGING_DIR_TARGET}${exec_prefix} \ - --with-config-file-path=${sysconfdir}/php/apache2-php${PHP_MAJOR_VERSION} \ - ${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', 'ac_cv_c_bigendian_php=no', 'ac_cv_c_bigendian_php=yes', d)} \ - ${@bb.utils.contains('PACKAGECONFIG', 'pam', '', 'ac_cv_lib_pam_pam_start=no', d)} \ - ${COMMON_EXTRA_OECONF} \ -" - -EXTRA_OECONF:append:riscv64 = " --with-pcre-jit=no" -EXTRA_OECONF:append:riscv32 = " --with-pcre-jit=no" -# Needs fibers assembly implemented for rv32 -# for example rv64 implementation is below -# see https://github.com/php/php-src/commit/70b02d75f2abe3a292d49c4a4e9e4f850c2fee68 -EXTRA_OECONF:append:riscv32:libc-musl = " --disable-fiber-asm" - -CACHED_CONFIGUREVARS += "ac_cv_func_dlopen=no ac_cv_lib_dl_dlopen=yes" - -EXTRA_OECONF:class-native = " \ - --with-zlib=${STAGING_LIBDIR_NATIVE}/.. \ - --without-iconv \ - ${COMMON_EXTRA_OECONF} \ -" - -PACKAGECONFIG ??= "mysql sqlite3 imap opcache openssl \ - ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6 pam', d)} \ -" -PACKAGECONFIG:class-native = "" - -PACKAGECONFIG[zip] = "--with-zip --with-zlib-dir=${STAGING_EXECPREFIXDIR},,libzip" - -PACKAGECONFIG[mysql] = "--with-mysqli=mysqlnd \ - --with-pdo-mysql=mysqlnd \ - ,--without-mysqli --without-pdo-mysql \ - ,mysql5" - -PACKAGECONFIG[sqlite3] = "--with-sqlite3=${STAGING_LIBDIR}/.. \ - --with-pdo-sqlite=${STAGING_LIBDIR}/.. \ - ,--without-sqlite3 --without-pdo-sqlite \ - ,sqlite3" -PACKAGECONFIG[pgsql] = "--with-pgsql=${STAGING_DIR_TARGET}${exec_prefix},--without-pgsql,postgresql" -PACKAGECONFIG[soap] = "--enable-soap, --disable-soap, libxml2" -PACKAGECONFIG[apache2] = "--with-apxs2=${STAGING_BINDIR_CROSS}/apxs,,apache2-native apache2" -PACKAGECONFIG[pam] = ",,libpam" -PACKAGECONFIG[imap] = "--with-imap=${STAGING_DIR_HOST} \ - --with-imap-ssl=${STAGING_DIR_HOST} \ - ,--without-imap --without-imap-ssl \ - ,uw-imap" -PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," -PACKAGECONFIG[opcache] = "--enable-opcache,--disable-opcache" -PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl" -PACKAGECONFIG[valgrind] = "--with-valgrind=${STAGING_DIR_TARGET}/usr,--with-valgrind=no,valgrind" -PACKAGECONFIG[mbregex] = "--enable-mbregex, --disable-mbregex, oniguruma" -PACKAGECONFIG[mbstring] = "--enable-mbstring,," - -export HOSTCC = "${BUILD_CC}" -export PHP_NATIVE_DIR = "${STAGING_BINDIR_NATIVE}" -export PHP_PEAR_PHP_BIN = "${STAGING_BINDIR_NATIVE}/php" -CFLAGS += " -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -g -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED -I${STAGING_INCDIR}/apache2" - -# Adding these flags enables dynamic library support, which is disabled by -# default when cross compiling -# See https://bugs.php.net/bug.php?id=60109 -CFLAGS += " -DHAVE_LIBDL " -LDFLAGS += " -ldl " -LDFLAGS:append:libc-musl = " -lucontext " -LDFLAGS:append:riscv64 = " -latomic" - -EXTRA_OEMAKE = "INSTALL_ROOT=${D}" - -acpaths = "" - -do_configure:prepend () { - rm -f ${S}/build/libtool.m4 ${S}/ltmain.sh ${S}/aclocal.m4 - find ${S} -name config.m4 | xargs -n1 sed -i 's!APXS_HTTPD=.*!APXS_HTTPD=${STAGING_SBINDIR_NATIVE}/httpd!' -} - -do_configure:append() { - # No, libtool, we really don't want rpath set... - sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool - sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool - sed -i -e's@${RECIPE_SYSROOT}@@g' \ - -e's@-ffile-prefix-map=[^ ]*[ ]*@@g' \ - -e's@-fdebug-prefix-map=[^ ]*[ ]*@@g' \ - -e's@-ffile-prefix-map=[^ ]*[ ]*@@g' \ - -e's@-fmacro-prefix-map=[^ ]*[ ]*@@g' \ - ${B}/main/build-defs.h \ - ${B}/scripts/php-config -} - -do_install:append:class-native() { - rm -rf ${D}/${PHP_LIBDIR}/php/.registry - rm -rf ${D}/${PHP_LIBDIR}/php/.channels - rm -rf ${D}/${PHP_LIBDIR}/php/.[a-z]* -} - -do_install:prepend() { - cat ${ACLOCALDIR}/libtool.m4 ${ACLOCALDIR}/lt~obsolete.m4 ${ACLOCALDIR}/ltoptions.m4 \ - ${ACLOCALDIR}/ltsugar.m4 ${ACLOCALDIR}/ltversion.m4 > ${S}/build/libtool.m4 -} - -do_install:prepend:class-target() { - if ${@bb.utils.contains('PACKAGECONFIG', 'apache2', 'true', 'false', d)}; then - # Install dummy config file so apxs doesn't fail - install -d ${D}${sysconfdir}/apache2 - printf "\nLoadModule dummy_module modules/mod_dummy.so\n" > ${D}${sysconfdir}/apache2/httpd.conf - fi -} - -# fixme -do_install:append:class-target() { - install -d ${D}${sysconfdir}/ - rm -rf ${D}/.registry - rm -rf ${D}/.channels - rm -rf ${D}/.[a-z]* - rm -rf ${D}/var - rm -f ${D}/${sysconfdir}/php-fpm.conf.default - install -m 0644 ${WORKDIR}/php-fpm.conf ${D}/${sysconfdir}/php-fpm.conf - install -d ${D}/${sysconfdir}/apache2/conf.d - install -m 0644 ${WORKDIR}/php-fpm-apache.conf ${D}/${sysconfdir}/apache2/conf.d/php-fpm.conf - install -d ${D}${sysconfdir}/init.d - sed -i 's:=/usr/sbin:=${sbindir}:g' ${B}/sapi/fpm/init.d.php-fpm - sed -i 's:=/etc:=${sysconfdir}:g' ${B}/sapi/fpm/init.d.php-fpm - sed -i 's:=/var:=${localstatedir}:g' ${B}/sapi/fpm/init.d.php-fpm - install -m 0755 ${B}/sapi/fpm/init.d.php-fpm ${D}${sysconfdir}/init.d/php-fpm - install -m 0644 ${WORKDIR}/php-fpm-apache.conf ${D}/${sysconfdir}/apache2/conf.d/php-fpm.conf - - if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)};then - install -d ${D}${systemd_system_unitdir} - install -m 0644 ${WORKDIR}/php-fpm.service ${D}${systemd_system_unitdir}/php-fpm.service - sed -i -e 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${systemd_system_unitdir}/php-fpm.service - sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_system_unitdir}/php-fpm.service - sed -i -e 's,@BINDIR@,${bindir},g' ${D}${systemd_system_unitdir}/php-fpm.service - fi - - if ${@bb.utils.contains('PACKAGECONFIG', 'apache2', 'true', 'false', d)}; then - install -d ${D}${sysconfdir}/apache2/modules.d - install -d ${D}${sysconfdir}/php/apache2-php${PHP_MAJOR_VERSION} - install -m 644 ${WORKDIR}/70_mod_php${PHP_MAJOR_VERSION}.conf ${D}${sysconfdir}/apache2/modules.d - sed -i s,lib/,${libexecdir}/, ${D}${sysconfdir}/apache2/modules.d/70_mod_php${PHP_MAJOR_VERSION}.conf - cat ${S}/php.ini-production | \ - sed -e 's,extension_dir = \"\./\",extension_dir = \"/usr/lib/extensions\",' \ - > ${D}${sysconfdir}/php/apache2-php${PHP_MAJOR_VERSION}/php.ini - rm -f ${D}${sysconfdir}/apache2/httpd.conf* - fi -} - -MULTILIB_SCRIPTS += "${PN}:${bindir}/php-config \ - ${PN}:${bindir}/phpize \ -" - -do_install:append () { - oe_multilib_header php/main/build-defs.h php/main/php_config.h -} - -SYSROOT_PREPROCESS_FUNCS += "php_sysroot_preprocess" - -php_sysroot_preprocess () { - install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/ - install -m 755 ${D}${bindir}/phpize ${SYSROOT_DESTDIR}${bindir_crossscripts}/ - install -m 755 ${D}${bindir}/php-config ${SYSROOT_DESTDIR}${bindir_crossscripts}/ - - sed -i 's!eval echo /!eval echo ${STAGING_DIR_HOST}/!' ${SYSROOT_DESTDIR}${bindir_crossscripts}/phpize - sed -i 's!^include_dir=.*!include_dir=${STAGING_INCDIR}/php!' ${SYSROOT_DESTDIR}${bindir_crossscripts}/php-config -} - -MODPHP_PACKAGE = "${@bb.utils.contains('PACKAGECONFIG', 'apache2', '${PN}-modphp', '', d)}" - -PACKAGES = "${PN}-dbg ${PN}-cli ${PN}-phpdbg ${PN}-cgi ${PN}-fpm ${PN}-fpm-apache2 ${PN}-pear ${PN}-phar ${MODPHP_PACKAGE} ${PN}-dev ${PN}-staticdev ${PN}-doc ${PN}-opcache ${PN}" - -RDEPENDS:${PN} += "libgcc" -RDEPENDS:${PN}-pear = "${PN}" -RDEPENDS:${PN}-phar = "${PN}-cli" -RDEPENDS:${PN}-cli = "${PN}" -RDEPENDS:${PN}-modphp = "${PN} apache2" -RDEPENDS:${PN}-opcache = "${PN}" - -ALLOW_EMPTY:${PN} = "1" - -INITSCRIPT_PACKAGES = "${PN}-fpm" -inherit update-rc.d - -# WARNING: lib32-php-8.0.12-r0 do_package_qa: QA Issue: lib32-php: ELF binary /usr/libexec/apache2/modules/libphp.so has relocations in .text [textrel] -#WARNING: lib32-php-8.0.12-r0 do_package_qa: QA Issue: lib32-php-opcache: ELF binary /usr/lib/php8/extensions/no-debug-zts-20200930/opcache.so has relocations in .text [textrel] -INSANE_SKIP:${PN}:append:x86 = " textrel" -INSANE_SKIP:${PN}-opcache:append:x86 = " textrel" - -FILES:${PN}-dbg =+ "${bindir}/.debug \ - ${libexecdir}/apache2/modules/.debug" -FILES:${PN}-doc += "${PHP_LIBDIR}/php/doc" -FILES:${PN}-cli = "${bindir}/php" -FILES:${PN}-phpdbg = "${bindir}/phpdbg" -FILES:${PN}-phar = "${bindir}/phar*" -FILES:${PN}-cgi = "${bindir}/php-cgi" -FILES:${PN}-fpm = "${sbindir}/php-fpm ${sysconfdir}/php-fpm.conf ${datadir}/fpm ${sysconfdir}/init.d/php-fpm ${sysconfdir}/php-fpm.d/www.conf.default" -FILES:${PN}-fpm-apache2 = "${sysconfdir}/apache2/conf.d/php-fpm.conf" -CONFFILES:${PN}-fpm = "${sysconfdir}/php-fpm.conf" -CONFFILES:${PN}-fpm-apache2 = "${sysconfdir}/apache2/conf.d/php-fpm.conf" -INITSCRIPT_NAME:${PN}-fpm = "php-fpm" -INITSCRIPT_PARAMS:${PN}-fpm = "defaults 60" -FILES:${PN}-pear = "${bindir}/pear* ${bindir}/pecl ${PHP_LIBDIR}/php/PEAR \ - ${PHP_LIBDIR}/php/PEAR*.php ${PHP_LIBDIR}/php/System.php \ - ${PHP_LIBDIR}/php/peclcmd.php ${PHP_LIBDIR}/php/pearcmd.php \ - ${PHP_LIBDIR}/php/.channels ${PHP_LIBDIR}/php/.channels/.alias \ - ${PHP_LIBDIR}/php/.registry ${PHP_LIBDIR}/php/Archive/Tar.php \ - ${PHP_LIBDIR}/php/Console/Getopt.php ${PHP_LIBDIR}/php/OS/Guess.php \ - ${PHP_LIBDIR}/php/data/PEAR \ - ${sysconfdir}/pear.conf" -FILES:${PN}-dev = "${includedir}/php ${PHP_LIBDIR}/build ${bindir}/phpize \ - ${bindir}/php-config ${PHP_LIBDIR}/php/.depdb \ - ${PHP_LIBDIR}/php/.depdblock ${PHP_LIBDIR}/php/.filemap \ - ${PHP_LIBDIR}/php/.lock ${PHP_LIBDIR}/php/test" -FILES:${PN}-staticdev += "${PHP_LIBDIR}/extensions/*/*.a" -FILES:${PN}-opcache = "${PHP_LIBDIR}/extensions/*/opcache${SOLIBSDEV}" -FILES:${PN} = "${PHP_LIBDIR}/php" -FILES:${PN} += "${bindir} ${libexecdir}/apache2" - -SUMMARY:${PN}-modphp = "PHP module for the Apache HTTP server" -FILES:${PN}-modphp = "${libdir}/apache2 ${sysconfdir}" - -MODPHP_OLDPACKAGE = "${@bb.utils.contains('PACKAGECONFIG', 'apache2', 'modphp', '', d)}" -RPROVIDES:${PN}-modphp = "${MODPHP_OLDPACKAGE}" -RREPLACES:${PN}-modphp = "${MODPHP_OLDPACKAGE}" -RCONFLICTS:${PN}-modphp = "${MODPHP_OLDPACKAGE}" - -SYSTEMD_SERVICE:${PN}-fpm = "php-fpm.service" -SYSTEMD_PACKAGES += "${PN}-fpm" - -do_install:append:class-native() { - create_wrapper ${D}${bindir}/php \ - PHP_PEAR_SYSCONF_DIR=${sysconfdir}/ -} diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/poke/poke/0001-build-do-not-check-for-Tcl-Tk-if-disable-gui-is-spec.patch b/sources/meta-openembedded/meta-oe/recipes-devtools/poke/poke/0001-build-do-not-check-for-Tcl-Tk-if-disable-gui-is-spec.patch deleted file mode 100644 index a41f985e..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/poke/poke/0001-build-do-not-check-for-Tcl-Tk-if-disable-gui-is-spec.patch +++ /dev/null @@ -1,45 +0,0 @@ -From cef3fc90f02ef4fc49515745194bac3d81a2265b Mon Sep 17 00:00:00 2001 -From: "Jose E. Marchesi" -Date: Fri, 30 Apr 2021 13:17:05 +0200 -Subject: [PATCH] build: do not check for Tcl/Tk if --disable-gui is specified - -2021-04-30 Jose E. Marchesi - - * configure.ac: Do not check for tcl/tk if --disable-gui is - specified at configure time. - -(cherry picked from commit 280a5e154287e43c0a40d9530a9cc658a7367a9c) -[Romain: remove Changelog entry] -Signed-off-by: Romain Naour ---- -Upstream-Status: Pending - - configure.ac | 9 ++++++--- - 1 file changed, 6 insertions(+), 3 deletions(-) - -diff --git a/configure.ac b/configure.ac -index c7205513..c2f0760a 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -214,12 +214,15 @@ fi - dnl The GUI is optional, and depends on the availability of Tcl and - dnl Tk. - --POKE_TCLTK -- - AC_ARG_ENABLE([gui], - AS_HELP_STRING([--enable-gui], - [Enable the GUI (default is YES)]), -- [gui_enabled=$enableval], [gui_enabled=$has_tcltk]) -+ [gui_enabled=$enableval], [gui_enabled=yes]) -+ -+if test "x$gui_enabled" = "xyes"; then -+ POKE_TCLTK -+ gui_enabled=$has_tcltk -+fi - - AM_CONDITIONAL([GUI], [test "x$gui_enabled" = "xyes"]) - --- -2.30.2 - diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/poke/poke/0002-jitter-jitter-config.in-avoit-host-poisoning-while-c.patch b/sources/meta-openembedded/meta-oe/recipes-devtools/poke/poke/0002-jitter-jitter-config.in-avoit-host-poisoning-while-c.patch deleted file mode 100644 index 660b19f5..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/poke/poke/0002-jitter-jitter-config.in-avoit-host-poisoning-while-c.patch +++ /dev/null @@ -1,47 +0,0 @@ -From c37419e459bd5863534719fa50755174d0912e6d Mon Sep 17 00:00:00 2001 -From: Romain Naour -Date: Fri, 30 Apr 2021 14:32:21 +0200 -Subject: [PATCH] jitter: jitter-config.in: avoit host poisoning while - cross-compiling - -When jitter is bundled into another project (poke), jitter-config --cppflags -return an unsafe path "-I /usr/include". - -In the context of Buildroot, such configuration script woulf be "fixed" -after installation. But jitter-config is not installed by poke since it's -build as static library and liked to poke. - -For now, patch jitter-config.in instead of jitter-config.in.m4sh since -there is an issue while converting the M4sh m4sh script ( .in.m4sh ) -into a portable shell script ( .in ) ready to be processed by aclocal -for @-substitutions. - -[1] https://git.buildroot.net/buildroot/tree/package/pkg-generic.mk?h=2021.02.1#n291 - -Signed-off-by: Romain Naour ---- -Upstream-Status: Pending - - jitter/bin/jitter-config.in | 6 +----- - 1 file changed, 1 insertion(+), 5 deletions(-) - -diff --git a/jitter/bin/jitter-config.in b/jitter/bin/jitter-config.in -index 5e124f0..af0ac9d 100644 ---- a/jitter/bin/jitter-config.in -+++ b/jitter/bin/jitter-config.in -@@ -998,11 +998,7 @@ while test "$#" != "0"; do - append_to_output cflags;; - --cppflags) - no_option_argument -- append_to_output cppflags -- # Append a -I argument. This is defined separately from the rest, -- # as the installation prefix can be decided very late, at Jitter -- # installation time. -- output="$output -I $includedir";; -+ append_to_output cppflags;; - --ldadd) - no_option_argument - append_to_output ldadd;; --- -2.30.2 - diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/poke/poke/0003-configure.ac-HELP2MAN-replace-by-true-when-cross-com.patch b/sources/meta-openembedded/meta-oe/recipes-devtools/poke/poke/0003-configure.ac-HELP2MAN-replace-by-true-when-cross-com.patch index ad2bf764..67384b73 100644 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/poke/poke/0003-configure.ac-HELP2MAN-replace-by-true-when-cross-com.patch +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/poke/poke/0003-configure.ac-HELP2MAN-replace-by-true-when-cross-com.patch @@ -11,18 +11,16 @@ Avoid: ./../poke/poke -o ./poke.1 ../run: line 51: exec: :: not found +Upstream-Status: Pending Signed-off-by: Romain Naour --- -Upstream-Status: Pending configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/configure.ac b/configure.ac -index c2f0760a..93769ef9 100644 --- a/configure.ac +++ b/configure.ac -@@ -74,7 +74,7 @@ gl_LIBTEXTSTYLE_OPTIONAL([0.20.5]) +@@ -148,7 +148,7 @@ gl_LIBTEXTSTYLE_OPTIONAL([0.20.5]) if test $cross_compiling = no; then AM_MISSING_PROG(HELP2MAN, help2man) else @@ -30,7 +28,4 @@ index c2f0760a..93769ef9 100644 + HELP2MAN=true fi - dnl recfix is part of the GNU recutils suite, and is used in cfg.mk to --- -2.30.2 - + dnl The following Automake conditional is used in some Makefile.am files diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/poke/poke_1.2.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/poke/poke_1.2.bb deleted file mode 100644 index af85d217..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/poke/poke_1.2.bb +++ /dev/null @@ -1,32 +0,0 @@ -SUMMARY = "GNU poke is an extensible editor for structured binary data" -HOMEPAGE = "https://pokology.org" -DESCRIPTION = "GNU poke is an interactive, extensible editor for binary data. Not limited to editing basic entities such as bits and bytes, it provides a full-fledged procedural, interactive programming language designed to describe data structures and to operate on them." -SECTION = "console/utils" -LICENSE = "GPL-3.0-or-later" -LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" - -SRC_URI = "${GNU_MIRROR}/poke/poke-${PV}.tar.gz \ - file://0001-build-do-not-check-for-Tcl-Tk-if-disable-gui-is-spec.patch \ - file://0002-jitter-jitter-config.in-avoit-host-poisoning-while-c.patch \ - file://0003-configure.ac-HELP2MAN-replace-by-true-when-cross-com.patch \ - " - -DEPENDS = "flex-native bison-native bdwgc readline" - -SRC_URI[sha256sum] = "f61cf8da5b64c01a1359373725aad1ca257f35c1c9269e4d50dd0664183ddf62" - -# poke does not support using out-of-tree builds -inherit autotools-brokensep gettext pkgconfig - -# The automatic m4 path detection gets confused, so force the right value from -# the poke bootstrap script. -acpaths = "-I ./m4" - -EXTRA_OECONF = "--disable-gui \ - --disable-libnbd \ - --with-libreadline-prefix=${STAGING_INCDIR} \ - " - -PACKAGECONFIG[mi] = "--enable-mi,--disable-mi,json-c" - -FILES:${PN} += "${datadir}/emacs/site-lisp" diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/poke/poke_4.2.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/poke/poke_4.2.bb new file mode 100644 index 00000000..eb840435 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/poke/poke_4.2.bb @@ -0,0 +1,33 @@ +SUMMARY = "GNU poke is an extensible editor for structured binary data" +HOMEPAGE = "https://pokology.org" +DESCRIPTION = "GNU poke is an interactive, extensible editor for binary data. Not limited to editing basic entities such as bits and bytes, it provides a full-fledged procedural, interactive programming language designed to describe data structures and to operate on them." +SECTION = "console/utils" +LICENSE = "GPL-3.0-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" + +SRC_URI = "${GNU_MIRROR}/poke/poke-${PV}.tar.gz \ + file://0003-configure.ac-HELP2MAN-replace-by-true-when-cross-com.patch \ + " + +DEPENDS = "flex-native bison-native bdwgc readline" + +SRC_URI[sha256sum] = "8aaf36e61e367a53140ea40e2559e9ec512e779c42bee34e7ac24b34ba119bde" + +# poke does not support using out-of-tree builds +inherit autotools-brokensep gettext pkgconfig + +# The automatic m4 path detection gets confused, so force the right value from +# the poke bootstrap script. +acpaths = "-I ./m4" + +EXTRA_OECONF = "--disable-gui \ + --disable-libnbd \ + --with-libreadline-prefix=${STAGING_INCDIR} \ + " + +PACKAGECONFIG[mi] = "--enable-mi,--disable-mi,json-c" + +PACKAGES =+ "${PN}-emacs ${PN}-vim" + +FILES:${PN}-emacs += "${datadir}/emacs/site-lisp" +FILES:${PN}-vim += "${datadir}/vim/vimfiles" diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf-c_1.5.0.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf-c_1.5.0.bb index 24de6b81..82aaf1ba 100644 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf-c_1.5.0.bb +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf-c_1.5.0.bb @@ -36,3 +36,6 @@ RDEPENDS:${PN}-compiler = "protobuf-compiler" RDEPENDS:${PN}-dev += "${PN}-compiler" BBCLASSEXTEND = "native nativesdk" + +# No 64bit atomics +LDFLAGS:append:riscv32 = " -latomic" diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf_4.25.5.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf_4.25.5.bb new file mode 100644 index 00000000..d5fd9013 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf_4.25.5.bb @@ -0,0 +1,123 @@ +SUMMARY = "Protocol Buffers - structured data serialisation mechanism" +DESCRIPTION = "Protocol Buffers are a way of encoding structured data in an \ +efficient yet extensible format. Google uses Protocol Buffers for almost \ +all of its internal RPC protocols and file formats." +HOMEPAGE = "https://github.com/google/protobuf" +SECTION = "console/tools" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=37b5762e07f0af8c74ce80a8bda4266b" + +DEPENDS = "zlib abseil-cpp" +DEPENDS:append:class-target = " protobuf-native" + +SRCREV = "9d0ec0f92b5b5fdeeda11f9dcecc1872ff378014" + +SRC_URI = "gitsm://github.com/protocolbuffers/protobuf.git;branch=25.x;protocol=https \ + file://run-ptest \ + file://0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch \ + " +SRC_URI:append:mips:toolchain-clang = " file://0001-Fix-build-on-mips-clang.patch " +SRC_URI:append:mipsel:toolchain-clang = " file://0001-Fix-build-on-mips-clang.patch " + +UPSTREAM_CHECK_GITTAGREGEX = "v(?P.(25\.(\d+)))" + +S = "${WORKDIR}/git" + +inherit cmake pkgconfig ptest + +PACKAGECONFIG ??= "" +PACKAGECONFIG:class-native ?= "compiler" +PACKAGECONFIG:class-nativesdk ?= "compiler" +PACKAGECONFIG[python] = ",," +PACKAGECONFIG[compiler] = "-Dprotobuf_BUILD_PROTOC_BINARIES=ON,-Dprotobuf_BUILD_PROTOC_BINARIES=OFF" + +EXTRA_OECMAKE += "\ + -Dprotobuf_BUILD_SHARED_LIBS=ON \ + -Dprotobuf_BUILD_LIBPROTOC=ON \ + -Dprotobuf_BUILD_TESTS=OFF \ + -Dprotobuf_BUILD_EXAMPLES=OFF \ + -Dprotobuf_ABSL_PROVIDER="package" \ +" + +TEST_SRC_DIR = "examples" +LANG_SUPPORT = "cpp ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python', '', d)}" + +do_compile_ptest() { + mkdir -p "${B}/${TEST_SRC_DIR}" + + # Add the location of the cross-compiled header and library files + # which haven't been installed yet. + cp "${B}/protobuf.pc" "${B}/${TEST_SRC_DIR}/protobuf.pc" + cp ${S}/${TEST_SRC_DIR}/*.cc "${B}/${TEST_SRC_DIR}/" + cp ${S}/${TEST_SRC_DIR}/*.proto "${B}/${TEST_SRC_DIR}/" + cp ${S}/${TEST_SRC_DIR}/*.py "${B}/${TEST_SRC_DIR}/" + cp ${S}/${TEST_SRC_DIR}/Makefile "${B}/${TEST_SRC_DIR}/" + # Adapt protobuf.pc + sed -e 's|libdir=|libdir=${PKG_CONFIG_SYSROOT_DIR}|' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" + sed -e 's|Cflags:|Cflags: -I${S}/src |' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" + sed -e 's|Cflags:|Cflags: -I${WORKDIR}/recipe-sysroot${includedir} |' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" + sed -e 's|Libs:|Libs: -L${B}|' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" + sed -e 's|Libs:|Libs: -L${WORKDIR}/recipe-sysroot/usr/lib |' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" + sed -e 's|Libs:|Libs: -labsl_log_internal_check_op |' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" + sed -e 's|Libs:|Libs: -labsl_log_internal_message |' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" + # Adapt uf8_range.pc + cp "${B}/third_party/utf8_range/utf8_range.pc" "${B}/${TEST_SRC_DIR}/utf8_range.pc" + sed -e 's|libdir=|libdir=${PKG_CONFIG_SYSROOT_DIR}|' -i "${B}/${TEST_SRC_DIR}/utf8_range.pc" + sed -e 's|Libs:|Libs= -L${B}/third_party/utf8_range |' -i "${B}/${TEST_SRC_DIR}/utf8_range.pc" + # Until out-of-tree build of examples is supported, we have to use this approach + sed -e 's|../src/google/protobuf/.libs/timestamp.pb.o|${B}/CMakeFiles/libprotobuf.dir/src/google/protobuf/timestamp.pb.cc.o|' -i "${B}/${TEST_SRC_DIR}/Makefile" + export PKG_CONFIG_PATH="${B}/${TEST_SRC_DIR}" + + # Save the pkgcfg sysroot variable, and update it to nothing so + # that it doesn't append the sysroot to the beginning of paths. + # The header and library files aren't installed to the target + # system yet. So the absolute paths were specified above. + save_pkg_config_sysroot_dir=$PKG_CONFIG_SYSROOT_DIR + export PKG_CONFIG_SYSROOT_DIR= + + # Compile the tests + for lang in ${LANG_SUPPORT}; do + oe_runmake -C "${B}/${TEST_SRC_DIR}" ${lang} + done + + # Restore the pkgconfig sysroot variable + export PKG_CONFIG_SYSROOT_DIR=$save_pkg_config_sysroot_dir +} + +do_install_ptest() { + local olddir=`pwd` + + cd "${S}/${TEST_SRC_DIR}" + install -d "${D}/${PTEST_PATH}" + for i in add_person* list_people*; do + if [ -x "$i" ]; then + install "$i" "${D}/${PTEST_PATH}" + fi + done + cp "${B}/${TEST_SRC_DIR}/addressbook_pb2.py" "${D}/${PTEST_PATH}" + cd "$olddir" +} + +PACKAGE_BEFORE_PN = "${PN}-compiler ${PN}-lite" + +FILES:${PN}-compiler = "${bindir} ${libdir}/libprotoc${SOLIBS}" +FILES:${PN}-lite = "${libdir}/libprotobuf-lite${SOLIBS}" + +# CMake requires protoc binary to exist in sysroot, even if it has wrong architecture. +SYSROOT_DIRS += "${bindir}" + +RDEPENDS:${PN} = "abseil-cpp" +RDEPENDS:${PN}-lite = "abseil-cpp" +RDEPENDS:${PN}-compiler = "${PN}" +RDEPENDS:${PN}-dev += "${PN}-compiler" +RDEPENDS:${PN}-ptest = "bash ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3-protobuf', '', d)}" + +MIPS_INSTRUCTION_SET = "mips" + +BBCLASSEXTEND = "native nativesdk" + +LDFLAGS:append:arm = " -latomic" +LDFLAGS:append:mips = " -latomic" +LDFLAGS:append:powerpc = " -latomic" +LDFLAGS:append:mipsel = " -latomic" +LDFLAGS:append:riscv32 = " -latomic" diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf_4.25.8.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf_4.25.8.bb deleted file mode 100644 index 949a3b20..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf_4.25.8.bb +++ /dev/null @@ -1,118 +0,0 @@ -SUMMARY = "Protocol Buffers - structured data serialisation mechanism" -DESCRIPTION = "Protocol Buffers are a way of encoding structured data in an \ -efficient yet extensible format. Google uses Protocol Buffers for almost \ -all of its internal RPC protocols and file formats." -HOMEPAGE = "https://github.com/google/protobuf" -SECTION = "console/tools" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=37b5762e07f0af8c74ce80a8bda4266b" - -DEPENDS = "zlib abseil-cpp" -DEPENDS:append:class-target = " protobuf-native" - -SRCREV = "a4cbdd3ed0042e8f9b9c30e8b0634096d9532809" - -SRC_URI = "gitsm://github.com/protocolbuffers/protobuf.git;branch=25.x;protocol=https \ - file://run-ptest \ - file://0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch \ - " -SRC_URI:append:mips:toolchain-clang = " file://0001-Fix-build-on-mips-clang.patch " -SRC_URI:append:mipsel:toolchain-clang = " file://0001-Fix-build-on-mips-clang.patch " - -S = "${WORKDIR}/git" - -inherit cmake pkgconfig ptest - -PACKAGECONFIG ??= "" -PACKAGECONFIG:class-native ?= "compiler" -PACKAGECONFIG:class-nativesdk ?= "compiler" -PACKAGECONFIG[python] = ",," -PACKAGECONFIG[compiler] = "-Dprotobuf_BUILD_PROTOC_BINARIES=ON,-Dprotobuf_BUILD_PROTOC_BINARIES=OFF" - -EXTRA_OECMAKE += "\ - -Dprotobuf_BUILD_SHARED_LIBS=ON \ - -Dprotobuf_BUILD_LIBPROTOC=ON \ - -Dprotobuf_BUILD_TESTS=OFF \ - -Dprotobuf_BUILD_EXAMPLES=OFF \ - -Dprotobuf_ABSL_PROVIDER="package" \ -" - -TEST_SRC_DIR = "examples" -LANG_SUPPORT = "cpp ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python', '', d)}" - -do_compile_ptest() { - mkdir -p "${B}/${TEST_SRC_DIR}" - - # Add the location of the cross-compiled header and library files - # which haven't been installed yet. - cp "${B}/protobuf.pc" "${B}/${TEST_SRC_DIR}/protobuf.pc" - cp ${S}/${TEST_SRC_DIR}/*.cc "${B}/${TEST_SRC_DIR}/" - cp ${S}/${TEST_SRC_DIR}/*.proto "${B}/${TEST_SRC_DIR}/" - cp ${S}/${TEST_SRC_DIR}/*.py "${B}/${TEST_SRC_DIR}/" - cp ${S}/${TEST_SRC_DIR}/Makefile "${B}/${TEST_SRC_DIR}/" - # Adapt protobuf.pc - sed -e 's|libdir=|libdir=${PKG_CONFIG_SYSROOT_DIR}|' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" - sed -e 's|Cflags:|Cflags: -I${S}/src |' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" - sed -e 's|Cflags:|Cflags: -I${WORKDIR}/recipe-sysroot${includedir} |' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" - sed -e 's|Libs:|Libs: -L${B}|' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" - sed -e 's|Libs:|Libs: -L${WORKDIR}/recipe-sysroot/usr/lib |' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" - sed -e 's|Libs:|Libs: -labsl_log_internal_check_op |' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" - sed -e 's|Libs:|Libs: -labsl_log_internal_message |' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" - # Adapt uf8_range.pc - cp "${B}/third_party/utf8_range/utf8_range.pc" "${B}/${TEST_SRC_DIR}/utf8_range.pc" - sed -e 's|libdir=|libdir=${PKG_CONFIG_SYSROOT_DIR}|' -i "${B}/${TEST_SRC_DIR}/utf8_range.pc" - sed -e 's|Libs:|Libs= -L${B}/third_party/utf8_range |' -i "${B}/${TEST_SRC_DIR}/utf8_range.pc" - # Until out-of-tree build of examples is supported, we have to use this approach - sed -e 's|../src/google/protobuf/.libs/timestamp.pb.o|${B}/CMakeFiles/libprotobuf.dir/src/google/protobuf/timestamp.pb.cc.o|' -i "${B}/${TEST_SRC_DIR}/Makefile" - export PKG_CONFIG_PATH="${B}/${TEST_SRC_DIR}" - - # Save the pkgcfg sysroot variable, and update it to nothing so - # that it doesn't append the sysroot to the beginning of paths. - # The header and library files aren't installed to the target - # system yet. So the absolute paths were specified above. - save_pkg_config_sysroot_dir=$PKG_CONFIG_SYSROOT_DIR - export PKG_CONFIG_SYSROOT_DIR= - - # Compile the tests - for lang in ${LANG_SUPPORT}; do - oe_runmake -C "${B}/${TEST_SRC_DIR}" ${lang} - done - - # Restore the pkgconfig sysroot variable - export PKG_CONFIG_SYSROOT_DIR=$save_pkg_config_sysroot_dir -} - -do_install_ptest() { - local olddir=`pwd` - - cd "${S}/${TEST_SRC_DIR}" - install -d "${D}/${PTEST_PATH}" - for i in add_person* list_people*; do - if [ -x "$i" ]; then - install "$i" "${D}/${PTEST_PATH}" - fi - done - cp "${B}/${TEST_SRC_DIR}/addressbook_pb2.py" "${D}/${PTEST_PATH}" - cd "$olddir" -} - -PACKAGE_BEFORE_PN = "${PN}-compiler ${PN}-lite" - -FILES:${PN}-compiler = "${bindir} ${libdir}/libprotoc${SOLIBS}" -FILES:${PN}-lite = "${libdir}/libprotobuf-lite${SOLIBS}" - -# CMake requires protoc binary to exist in sysroot, even if it has wrong architecture. -SYSROOT_DIRS += "${bindir}" - -RDEPENDS:${PN}-compiler = "${PN}" -RDEPENDS:${PN}-dev += "${PN}-compiler" -RDEPENDS:${PN}-ptest = "bash ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3-protobuf', '', d)}" - -MIPS_INSTRUCTION_SET = "mips" - -BBCLASSEXTEND = "native nativesdk" - -LDFLAGS:append:arm = " -latomic" -LDFLAGS:append:mips = " -latomic" -LDFLAGS:append:powerpc = " -latomic" -LDFLAGS:append:mipsel = " -latomic" diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/pugixml/pugixml_1.14.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/pugixml/pugixml_1.14.bb index 458958ed..19207883 100644 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/pugixml/pugixml_1.14.bb +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/pugixml/pugixml_1.14.bb @@ -13,6 +13,7 @@ SRC_URI = "https://github.com/zeux/${BPN}/releases/download/v${PV}/${BP}.tar.gz" SRC_URI[sha256sum] = "2f10e276870c64b1db6809050a75e11a897a8d7456c4be5c6b2e35a11168a015" UPSTREAM_CHECK_URI = "https://github.com/zeux/${BPN}/releases" +UPSTREAM_CHECK_REGEX = "releases/tag/v(?P\d+(\.\d+)+)" inherit cmake diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/python/python3-pefile/run-ptest b/sources/meta-openembedded/meta-oe/recipes-devtools/python/python3-pefile/run-ptest new file mode 100644 index 00000000..95ae7230 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/python/python3-pefile/run-ptest @@ -0,0 +1,3 @@ +#!/bin/sh + +pytest --automake --ignore=./tests/pefile_test.py diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/python/python3-pefile_2024.8.26.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/python/python3-pefile_2024.8.26.bb new file mode 100644 index 00000000..87e651d9 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/python/python3-pefile_2024.8.26.bb @@ -0,0 +1,28 @@ +SUMMARY = "Python PE parsing module" +DESCRIPTION = "A multi-platform Python module to parse and work with Portable Executable (PE) files." +HOMEPAGE = "https://github.com/erocarrera/pefile" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=e34c75178086aca0a17551ffbacaca53" + +inherit setuptools3 ptest +SRCREV = "4b3b1e2e568a88d4f1897d694d684f23d9e270c4" +SRC_URI = "git://github.com/erocarrera/pefile;branch=master;protocol=https \ + file://run-ptest" +S = "${WORKDIR}/git" + +BBCLASSEXTEND = "native nativesdk" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ +} + +RDEPENDS:${PN} += " \ + python3-mmap \ + python3-netclient \ + python3-stringold \ +" +RDEPENDS:${PN}-ptest += "\ + python3-pytest \ + python3-unittest-automake-output \ +" diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/python/python3-psycopg_3.2.2.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/python/python3-psycopg_3.2.2.bb new file mode 100644 index 00000000..f92c5560 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/python/python3-psycopg_3.2.2.bb @@ -0,0 +1,14 @@ +SUMMARY = "Psycopg 3 is the implementation of a PostgreSQL adapter for Python." +DESCRIPTION = "Psycopg is the most popular PostgreSQL adapter for the Python \ +programming language. Its core is a complete implementation of the Python DB \ +API 2.0 specifications. Several extensions allow access to many of the \ +features offered by PostgreSQL." + +LICENSE = "LGPL-3.0-only" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3000208d539ec061b899bce1d9ce9404" + +SRC_URI[sha256sum] = "8bad2e497ce22d556dac1464738cb948f8d6bab450d965cf1d8a8effd52412e0" + +inherit pypi python_setuptools_build_meta + +RDEPENDS:${PN} = "libpq" diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/sexpect/sexpect_2.3.14.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/sexpect/sexpect_2.3.14.bb new file mode 100644 index 00000000..1b064faf --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/sexpect/sexpect_2.3.14.bb @@ -0,0 +1,12 @@ +SUMMARY = "sexpect is another implementation of Expect which is specifically designed for Shell scripts" +HOMEPAGE = "https://github.com/clarkwang/sexpect" +LICENSE = "GPL-3.0-only" +LIC_FILES_CHKSUM = "file://LICENSE;md5=d32239bcb673463ab874e80d47fae504" + +BRANCH = "master" +SRC_URI = "git://github.com/clarkwang/sexpect;branch=${BRANCH};protocol=https" +SRCREV = "532a52d36aae442b7fe1ce20a59effd1dbc6e6fe" + +S = "${WORKDIR}/git" + +inherit cmake diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/squashfs-tools-ng/squashfs-tools-ng_1.2.0.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/squashfs-tools-ng/squashfs-tools-ng_1.2.0.bb deleted file mode 100644 index 880af82b..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/squashfs-tools-ng/squashfs-tools-ng_1.2.0.bb +++ /dev/null @@ -1,32 +0,0 @@ -SUMMARY = "New set of tools for working with SquashFS images" -SECTION = "base" -LICENSE = "GPL-3.0-or-later & LGPL-3.0-or-later & MIT & BSD-2-Clause" -LIC_FILES_CHKSUM = "file://COPYING.md;md5=a709b68f1ce8a9f10aeea6401446c1f4 \ - file://licenses/GPLv3.txt;md5=1ebbd3e34237af26da5dc08a4e440464 \ - file://licenses/hash_table.txt;md5=874823605326caeaabaa95bfbd0f9fb0 \ - file://licenses/LGPLv3.txt;md5=3000208d539ec061b899bce1d9ce9404 \ - file://licenses/LZ4.txt;md5=ebc2ea4814a64de7708f1571904b32cc \ - file://licenses/xxhash.txt;md5=f042a9be092bd6d7fe6f217d8d00f4ca \ - file://licenses/xz.txt;md5=1c389b9610ccfdb25f7abaea6a0bb5a4 \ - file://licenses/zstd.txt;md5=8df8137b630239cbdd4c0674124cb0c8 \ - " - -SRCREV = "f2a3ad56e40c9711b23371238f9fa07dd24245f1" -SRC_URI = "git://github.com/AgentD/squashfs-tools-ng.git;protocol=https;branch=master" - -S = "${WORKDIR}/git" - -inherit autotools pkgconfig - -PACKAGECONFIG ??= "gzip xz lzo lz4 zstd ${@bb.utils.filter('DISTRO_FEATURES', 'selinux', d)}" -PACKAGECONFIG[gzip] = "--with-gzip,--without-gzip,zlib" -PACKAGECONFIG[xz] = "--with-xz,--without-xz,xz" -PACKAGECONFIG[lzo] = "--with-lzo,--without-lzo,lzo" -PACKAGECONFIG[lz4] = "--with-lz4,--without-lz4,lz4" -PACKAGECONFIG[zstd] = "--with-zstd,--without-zstd,zstd" -PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux" - -PACKAGES =+ "libsquashfs" -FILES:libsquashfs = "${libdir}/libsquashfs*${SOLIBS}" - -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/squashfs-tools-ng/squashfs-tools-ng_1.3.1.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/squashfs-tools-ng/squashfs-tools-ng_1.3.1.bb new file mode 100644 index 00000000..a542396d --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/squashfs-tools-ng/squashfs-tools-ng_1.3.1.bb @@ -0,0 +1,32 @@ +SUMMARY = "New set of tools for working with SquashFS images" +SECTION = "base" +LICENSE = "GPL-3.0-or-later & LGPL-3.0-or-later & MIT & BSD-2-Clause" +LIC_FILES_CHKSUM = "file://COPYING.md;md5=a709b68f1ce8a9f10aeea6401446c1f4 \ + file://licenses/GPLv3.txt;md5=1ebbd3e34237af26da5dc08a4e440464 \ + file://licenses/hash_table.txt;md5=874823605326caeaabaa95bfbd0f9fb0 \ + file://licenses/LGPLv3.txt;md5=3000208d539ec061b899bce1d9ce9404 \ + file://licenses/LZ4.txt;md5=ebc2ea4814a64de7708f1571904b32cc \ + file://licenses/xxhash.txt;md5=f042a9be092bd6d7fe6f217d8d00f4ca \ + file://licenses/xz.txt;md5=1c389b9610ccfdb25f7abaea6a0bb5a4 \ + file://licenses/zstd.txt;md5=8df8137b630239cbdd4c0674124cb0c8 \ + " + +SRCREV = "8f9966c8ea3ea8a854941d041e7fcb9eb4f772fb" +SRC_URI = "git://github.com/AgentD/squashfs-tools-ng.git;protocol=https;branch=fixes-1.3.0" + +S = "${WORKDIR}/git" + +inherit autotools pkgconfig + +PACKAGECONFIG ??= "gzip xz lzo lz4 zstd ${@bb.utils.filter('DISTRO_FEATURES', 'selinux', d)}" +PACKAGECONFIG[gzip] = "--with-gzip,--without-gzip,zlib" +PACKAGECONFIG[xz] = "--with-xz,--without-xz,xz" +PACKAGECONFIG[lzo] = "--with-lzo,--without-lzo,lzo" +PACKAGECONFIG[lz4] = "--with-lz4,--without-lz4,lz4" +PACKAGECONFIG[zstd] = "--with-zstd,--without-zstd,zstd" +PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux" + +PACKAGES =+ "libsquashfs" +FILES:libsquashfs = "${libdir}/libsquashfs*${SOLIBS}" + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/systemd/nativesdk-systemd-systemctl.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/systemd/nativesdk-systemd-systemctl.bb index f7160f50..3360ccf3 100644 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/systemd/nativesdk-systemd-systemctl.bb +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/systemd/nativesdk-systemd-systemctl.bb @@ -7,9 +7,10 @@ inherit nativesdk SRC_URI = "file://systemctl" -S = "${WORKDIR}" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" do_install() { install -d ${D}${bindir} - install -m 0755 ${WORKDIR}/systemctl ${D}${bindir} + install -m 0755 ${UNPACKDIR}/systemctl ${D}${bindir} } diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/tcltk/tk_8.6.10.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/tcltk/tk_8.6.10.bb index 237c4e73..7159e74c 100644 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/tcltk/tk_8.6.10.bb +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/tcltk/tk_8.6.10.bb @@ -26,6 +26,9 @@ SRC_URI = "\ SRC_URI[md5sum] = "602a47ad9ecac7bf655ada729d140a94" SRC_URI[sha256sum] = "63df418a859d0a463347f95ded5cd88a3dd3aaa1ceecaeee362194bc30f3e386" +UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/tcl/files/Tcl/" +UPSTREAM_CHECK_REGEX = "Tcl/(?P\d+(\.\d+)+)/" + S = "${WORKDIR}/${BPN}${PV}/unix" DEBUG_PREFIX_MAP += "-fdebug-prefix-map=${S}/../=${TARGET_DBGSRC_DIR}/.." diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/uftrace/uftrace_0.15.2.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/uftrace/uftrace_0.15.2.bb deleted file mode 100644 index 60436025..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/uftrace/uftrace_0.15.2.bb +++ /dev/null @@ -1,44 +0,0 @@ -SUMMARY = "Trace and analyze execution of a program written in C/C++, Rust and Python" -HOMEPAGE = "https://github.com/namhyung/uftrace" -BUGTRACKER = "https://github.com/namhyung/uftrace/issues" -SECTION = "devel" -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" - -DEPENDS = "elfutils" -DEPENDS:append:libc-musl = " argp-standalone" - -inherit autotools - -SRCREV = "9d8657e90b918994d7d2bcf6dd2cc7354c35a1b4" -SRC_URI = "git://github.com/namhyung/${BPN};branch=master;protocol=https \ - file://0001-include-libgen.h-for-basename.patch" -S = "${WORKDIR}/git" - -LDFLAGS:append:libc-musl = " -largp" - -def set_target_arch(d): - import re - arch = d.getVar('TARGET_ARCH') - if re.match(r'i.86', arch, re.I): - return 'i386' - elif re.match('armeb', arch, re.I): - return 'arm' - else: - return arch - -EXTRA_UFTRACE_OECONF = "ARCH=${@set_target_arch(d)} \ - with_elfutils=/use/libelf/from/sysroot" - -do_configure() { - ${S}/configure ${EXTRA_UFTRACE_OECONF} -} - -FILES_SOLIBSDEV = "" -FILES:${PN} += "${libdir}/*.so" - -COMPATIBLE_HOST = "(i.86|x86_64|aarch64|arm|riscv64)" - -# uftrace supports armv6 and above -COMPATIBLE_HOST:armv4 = 'null' -COMPATIBLE_HOST:armv5 = 'null' diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/uftrace/uftrace_0.16.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/uftrace/uftrace_0.16.bb new file mode 100644 index 00000000..320b5a88 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/uftrace/uftrace_0.16.bb @@ -0,0 +1,44 @@ +SUMMARY = "Trace and analyze execution of a program written in C/C++, Rust and Python" +HOMEPAGE = "https://github.com/namhyung/uftrace" +BUGTRACKER = "https://github.com/namhyung/uftrace/issues" +SECTION = "devel" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +DEPENDS = "elfutils" +DEPENDS:append:libc-musl = " argp-standalone" + +inherit autotools + +SRCREV = "68aed9b0a20d3d1b5e1dc15e0f8aabba7e34735b" +SRC_URI = "git://github.com/namhyung/${BPN};branch=master;protocol=https \ + file://0001-include-libgen.h-for-basename.patch" +S = "${WORKDIR}/git" + +LDFLAGS:append:libc-musl = " -largp" + +def set_target_arch(d): + import re + arch = d.getVar('TARGET_ARCH') + if re.match(r'i.86', arch, re.I): + return 'i386' + elif re.match('armeb', arch, re.I): + return 'arm' + else: + return arch + +EXTRA_UFTRACE_OECONF = "ARCH=${@set_target_arch(d)} \ + with_elfutils=/use/libelf/from/sysroot" + +do_configure() { + ${S}/configure ${EXTRA_UFTRACE_OECONF} +} + +FILES_SOLIBSDEV = "" +FILES:${PN} += "${libdir}/*.so" + +COMPATIBLE_HOST = "(i.86|x86_64|aarch64|arm|riscv64)" + +# uftrace supports armv6 and above +COMPATIBLE_HOST:armv4 = 'null' +COMPATIBLE_HOST:armv5 = 'null' diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/uw-imap/uw-imap/uw-imap-fix-incompatible-pointer-types.patch b/sources/meta-openembedded/meta-oe/recipes-devtools/uw-imap/uw-imap/uw-imap-fix-incompatible-pointer-types.patch new file mode 100644 index 00000000..8744cdd1 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/uw-imap/uw-imap/uw-imap-fix-incompatible-pointer-types.patch @@ -0,0 +1,355 @@ +Fix compile errors when gcc option '-Wincompatible-pointer-types' set: + +mx.c: In function 'mx_setdate': +mx.c:1286:15: error: passing argument 2 of 'utime' from incompatible pointer type [-Wincompatible-pointer-types] + 1286 | utime (file,tp); /* set the times */ + | ^~ + | | + | time_t * {aka long int *} + +Upstream-Status: Inactive-Upstream [lastrelease: 2011] + +[1]: https://en.wikipedia.org/wiki/UW_IMAP + +Signed-off-by: Kai Kang + +--- + src/osdep/unix/mbx.c | 12 ++++++------ + src/osdep/unix/mh.c | 2 +- + src/osdep/unix/mmdf.c | 10 +++++----- + src/osdep/unix/mtx.c | 16 ++++++++-------- + src/osdep/unix/mx.c | 2 +- + src/osdep/unix/tenex.c | 16 ++++++++-------- + src/osdep/unix/unix.c | 10 +++++----- + 7 files changed, 34 insertions(+), 34 deletions(-) + +diff --git a/src/osdep/unix/mbx.c b/src/osdep/unix/mbx.c +index c8a45a5..0a587fe 100644 +--- a/src/osdep/unix/mbx.c ++++ b/src/osdep/unix/mbx.c +@@ -302,7 +302,7 @@ int mbx_isvalid (MAILSTREAM **stream,char *name,char *tmp,int *ld,char *lock, + if (sbuf.st_ctime > sbuf.st_atime) { + tp[0] = sbuf.st_atime; /* preserve atime and mtime */ + tp[1] = sbuf.st_mtime; +- utime (tmp,tp); /* set the times */ ++ utime (tmp, (const struct utimbuf *)tp); /* set the times */ + } + } + /* in case INBOX but not mbx format */ +@@ -776,7 +776,7 @@ void mbx_flag (MAILSTREAM *stream,char *sequence,char *flag,long flags) + stream->user_flags[LOCAL->ffuserflag]) || (oldpid != LOCAL->lastpid)) + mbx_update_header (stream); + tp[0] = time (0); /* make sure read comes after all that */ +- utime (stream->mailbox,tp); ++ utime (stream->mailbox, (const struct utimbuf *)tp); + } + if (LOCAL->ld >= 0) { /* unlock now */ + unlockfd (LOCAL->ld,LOCAL->lock); +@@ -1075,7 +1075,7 @@ long mbx_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options) + /* else preserve \Marked status */ + else tp[0] = (sbuf.st_ctime > sbuf.st_atime) ? sbuf.st_atime : time(0); + tp[1] = sbuf.st_mtime; /* preserve mtime */ +- utime (file,tp); /* set the times */ ++ utime (file, (const struct utimbuf *)tp); /* set the times */ + close (fd); /* close the file */ + MM_NOCRITICAL (stream); /* release critical */ + unlockfd (ld,lock); /* release exclusive parse/append permission */ +@@ -1213,7 +1213,7 @@ long mbx_append (MAILSTREAM *stream,char *mailbox,append_t af,void *data) + /* else preserve \Marked status */ + else tp[0] = (sbuf.st_ctime > sbuf.st_atime) ? sbuf.st_atime : time(0); + tp[1] = sbuf.st_mtime; /* preserve mtime */ +- utime (file,tp); /* set the times */ ++ utime (file, (const struct utimbuf *)tp); /* set the times */ + fclose (df); /* close the file */ + MM_NOCRITICAL (dstream); /* release critical */ + } +@@ -1446,7 +1446,7 @@ long mbx_parse (MAILSTREAM *stream) + time_t tp[2]; + tp[0] = time (0); + tp[1] = LOCAL->filetime; +- utime (stream->mailbox,tp); ++ utime (stream->mailbox, (const struct utimbuf *)tp); + } + stream->silent = silent; /* can pass up events now */ + mail_exists (stream,nmsgs); /* notify upper level of new mailbox size */ +@@ -1814,7 +1814,7 @@ unsigned long mbx_rewrite (MAILSTREAM *stream,unsigned long *reclaimed, + fstat (LOCAL->fd,&sbuf); /* get new write time */ + tp[1] = LOCAL->filetime = sbuf.st_mtime; + tp[0] = time (0); /* reset atime to now */ +- utime (stream->mailbox,tp); ++ utime (stream->mailbox, (const struct utimbuf *)tp); + unlockfd (ld,lock); /* release exclusive parse/append permission */ + /* notify upper level of new mailbox size */ + mail_exists (stream,stream->nmsgs); +diff --git a/src/osdep/unix/mh.c b/src/osdep/unix/mh.c +index 9264624..26f3539 100644 +--- a/src/osdep/unix/mh.c ++++ b/src/osdep/unix/mh.c +@@ -1279,5 +1279,5 @@ void mh_setdate (char *file,MESSAGECACHE *elt) + time_t tp[2]; + tp[0] = time (0); /* atime is now */ + tp[1] = mail_longdate (elt); /* modification time */ +- utime (file,tp); /* set the times */ ++ utime (file, (const struct utimbuf *)tp); /* set the times */ + } +diff --git a/src/osdep/unix/mmdf.c b/src/osdep/unix/mmdf.c +index e962434..c0adbee 100644 +--- a/src/osdep/unix/mmdf.c ++++ b/src/osdep/unix/mmdf.c +@@ -379,7 +379,7 @@ long mmdf_isvalid (char *name,char *tmp) + if ((sbuf.st_ctime > sbuf.st_atime) || (sbuf.st_mtime > sbuf.st_atime)) { + tp[0] = sbuf.st_atime; /* preserve atime and mtime */ + tp[1] = sbuf.st_mtime; +- utime (file,tp); /* set the times */ ++ utime (file, (const struct utimbuf *)tp); /* set the times */ + } + } + } +@@ -1131,7 +1131,7 @@ long mmdf_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options) + else tp[0] = /* else preserve \Marked status */ + ((sbuf.st_ctime > sbuf.st_atime) || (sbuf.st_mtime > sbuf.st_atime)) ? + sbuf.st_atime : tp[1]; +- utime (file,tp); /* set the times */ ++ utime (file, (const struct utimbuf *)tp); /* set the times */ + mmdf_unlock (fd,NIL,&lock); /* unlock and close mailbox */ + if (tstream) { /* update last UID if we can */ + MMDFLOCAL *local = (MMDFLOCAL *) tstream->local; +@@ -1292,7 +1292,7 @@ long mmdf_append (MAILSTREAM *stream,char *mailbox,append_t af,void *data) + ret = NIL; /* return error */ + } + else tp[0] = tp[1] - 1; /* set atime to now-1 if successful copy */ +- utime (file,tp); /* set the times */ ++ utime (file, (const struct utimbuf *)tp); /* set the times */ + fclose (sf); /* done with scratch file */ + /* force UIDVALIDITY assignment now */ + if (tstream && !tstream->uid_validity) tstream->uid_validity = time (0); +@@ -1550,7 +1550,7 @@ void mmdf_unlock (int fd,MAILSTREAM *stream,DOTLOCK *lock) + } + else now = 0; /* no time change needed */ + /* set the times, note change */ +- if (now && !utime (stream->mailbox,tp)) LOCAL->filetime = tp[1]; ++ if (now && !utime (stream->mailbox, (const struct utimbuf *)tp)) LOCAL->filetime = tp[1]; + } + flock (fd,LOCK_UN); /* release flock'ers */ + if (!stream) close (fd); /* close the file if no stream */ +@@ -2393,7 +2393,7 @@ long mmdf_rewrite (MAILSTREAM *stream,unsigned long *nexp,DOTLOCK *lock, + /* set atime to now, mtime a second earlier */ + tp[1] = (tp[0] = time (0)) - 1; + /* set the times, note change */ +- if (!utime (stream->mailbox,tp)) LOCAL->filetime = tp[1]; ++ if (!utime (stream->mailbox, (const struct utimbuf *)tp)) LOCAL->filetime = tp[1]; + close (LOCAL->fd); /* close and reopen file */ + if ((LOCAL->fd = open (stream->mailbox,O_RDWR, + (long) mail_parameters (NIL,GET_MBXPROTECTION,NIL))) +diff --git a/src/osdep/unix/mtx.c b/src/osdep/unix/mtx.c +index 8e6f76e..f64142b 100644 +--- a/src/osdep/unix/mtx.c ++++ b/src/osdep/unix/mtx.c +@@ -196,7 +196,7 @@ int mtx_isvalid (char *name,char *tmp) + if (sbuf.st_ctime > sbuf.st_atime) { + tp[0] = sbuf.st_atime; /* preserve atime and mtime */ + tp[1] = sbuf.st_mtime; +- utime (file,tp); /* set the times */ ++ utime (file, (const struct utimbuf *)tp); /* set the times */ + } + } + } +@@ -565,7 +565,7 @@ void mtx_flag (MAILSTREAM *stream,char *sequence,char *flag,long flags) + fstat (LOCAL->fd,&sbuf); /* get current write time */ + tp[1] = LOCAL->filetime = sbuf.st_mtime; + tp[0] = time (0); /* make sure read comes after all that */ +- utime (stream->mailbox,tp); ++ utime (stream->mailbox, (const struct utimbuf *)tp); + } + } + +@@ -834,7 +834,7 @@ long mtx_expunge (MAILSTREAM *stream,char *sequence,long options) + fstat (LOCAL->fd,&sbuf); /* get new write time */ + tp[1] = LOCAL->filetime = sbuf.st_mtime; + tp[0] = time (0); /* reset atime to now */ +- utime (stream->mailbox,tp); ++ utime (stream->mailbox, (const struct utimbuf *)tp); + MM_NOCRITICAL (stream); /* release critical */ + /* notify upper level of new mailbox size */ + mail_exists (stream,stream->nmsgs); +@@ -929,7 +929,7 @@ long mtx_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options) + /* else preserve \Marked status */ + else tp[0] = (sbuf.st_ctime > sbuf.st_atime) ? sbuf.st_atime : time(0); + tp[1] = sbuf.st_mtime; /* preserve mtime */ +- utime (file,tp); /* set the times */ ++ utime (file, (const struct utimbuf *)tp); /* set the times */ + close (fd); /* close the file */ + unlockfd (ld,lock); /* release exclusive parse/append permission */ + MM_NOCRITICAL (stream); /* release critical */ +@@ -946,7 +946,7 @@ long mtx_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options) + fstat (LOCAL->fd,&sbuf); /* get current write time */ + tp[1] = LOCAL->filetime = sbuf.st_mtime; + tp[0] = time (0); /* make sure atime remains greater */ +- utime (stream->mailbox,tp); ++ utime (stream->mailbox, (const struct utimbuf *)tp); + } + } + if (ret && mail_parameters (NIL,GET_COPYUID,NIL)) +@@ -1062,7 +1062,7 @@ long mtx_append (MAILSTREAM *stream,char *mailbox,append_t af,void *data) + /* else preserve \Marked status */ + else tp[0] = (sbuf.st_ctime > sbuf.st_atime) ? sbuf.st_atime : time(0); + tp[1] = sbuf.st_mtime; /* preserve mtime */ +- utime (file,tp); /* set the times */ ++ utime (file, (const struct utimbuf *)tp); /* set the times */ + fclose (df); /* close the file */ + unlockfd (ld,lock); /* release exclusive parse/append permission */ + MM_NOCRITICAL (stream); /* release critical */ +@@ -1212,7 +1212,7 @@ long mtx_parse (MAILSTREAM *stream) + time_t tp[2]; + tp[0] = time (0); + tp[1] = LOCAL->filetime; +- utime (stream->mailbox,tp); ++ utime (stream->mailbox, (const struct utimbuf *)tp); + } + stream->silent = silent; /* can pass up events now */ + mail_exists (stream,nmsgs); /* notify upper level of new mailbox size */ +@@ -1312,7 +1312,7 @@ void mtx_update_status (MAILSTREAM *stream,unsigned long msgno,long syncflag) + fstat (LOCAL->fd,&sbuf); /* get new write time */ + tp[1] = LOCAL->filetime = sbuf.st_mtime; + tp[0] = time (0); /* make sure read is later */ +- utime (stream->mailbox,tp); ++ utime (stream->mailbox, (const struct utimbuf *)tp); + } + } + } +diff --git a/src/osdep/unix/mx.c b/src/osdep/unix/mx.c +index b5c5adf..4146409 100644 +--- a/src/osdep/unix/mx.c ++++ b/src/osdep/unix/mx.c +@@ -1283,5 +1283,5 @@ void mx_setdate (char *file,MESSAGECACHE *elt) + time_t tp[2]; + tp[0] = time (0); /* atime is now */ + tp[1] = mail_longdate (elt); /* modification time */ +- utime (file,tp); /* set the times */ ++ utime (file, (const struct utimbuf *)tp); /* set the times */ + } +diff --git a/src/osdep/unix/tenex.c b/src/osdep/unix/tenex.c +index eee61fb..622da61 100644 +--- a/src/osdep/unix/tenex.c ++++ b/src/osdep/unix/tenex.c +@@ -203,7 +203,7 @@ int tenex_isvalid (char *name,char *tmp) + if (sbuf.st_ctime > sbuf.st_atime) { + tp[0] = sbuf.st_atime; /* preserve atime and mtime */ + tp[1] = sbuf.st_mtime; +- utime (file,tp); /* set the times */ ++ utime (file, (const struct utimbuf *)tp); /* set the times */ + } + } + } +@@ -654,7 +654,7 @@ void tenex_flag (MAILSTREAM *stream,char *sequence,char *flag,long flags) + fstat (LOCAL->fd,&sbuf); /* get current write time */ + tp[1] = LOCAL->filetime = sbuf.st_mtime; + tp[0] = time (0); /* make sure read comes after all that */ +- utime (stream->mailbox,tp); ++ utime (stream->mailbox, (const struct utimbuf *)tp); + } + } + +@@ -924,7 +924,7 @@ long tenex_expunge (MAILSTREAM *stream,char *sequence,long options) + fstat (LOCAL->fd,&sbuf); /* get new write time */ + tp[1] = LOCAL->filetime = sbuf.st_mtime; + tp[0] = time (0); /* reset atime to now */ +- utime (stream->mailbox,tp); ++ utime (stream->mailbox, (const struct utimbuf *)tp); + MM_NOCRITICAL (stream); /* release critical */ + /* notify upper level of new mailbox size */ + mail_exists (stream,stream->nmsgs); +@@ -1019,7 +1019,7 @@ long tenex_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options) + /* else preserve \Marked status */ + else tp[0] = (sbuf.st_ctime > sbuf.st_atime) ? sbuf.st_atime : time(0); + tp[1] = sbuf.st_mtime; /* preserve mtime */ +- utime (file,tp); /* set the times */ ++ utime (file, (const struct utimbuf *)tp); /* set the times */ + close (fd); /* close the file */ + unlockfd (ld,lock); /* release exclusive parse/append permission */ + MM_NOCRITICAL (stream); /* release critical */ +@@ -1036,7 +1036,7 @@ long tenex_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options) + fstat (LOCAL->fd,&sbuf); /* get current write time */ + tp[1] = LOCAL->filetime = sbuf.st_mtime; + tp[0] = time (0); /* make sure atime remains greater */ +- utime (stream->mailbox,tp); ++ utime (stream->mailbox, (const struct utimbuf *)tp); + } + } + if (ret && mail_parameters (NIL,GET_COPYUID,NIL)) +@@ -1159,7 +1159,7 @@ long tenex_append (MAILSTREAM *stream,char *mailbox,append_t af,void *data) + /* else preserve \Marked status */ + else tp[0] = (sbuf.st_ctime > sbuf.st_atime) ? sbuf.st_atime : time(0); + tp[1] = sbuf.st_mtime; /* preserve mtime */ +- utime (file,tp); /* set the times */ ++ utime (file, (const struct utimbuf *)tp); /* set the times */ + fclose (df); /* close the file */ + unlockfd (ld,lock); /* release exclusive parse/append permission */ + MM_NOCRITICAL (stream); /* release critical */ +@@ -1324,7 +1324,7 @@ long tenex_parse (MAILSTREAM *stream) + time_t tp[2]; + tp[0] = time (0); + tp[1] = LOCAL->filetime; +- utime (stream->mailbox,tp); ++ utime (stream->mailbox, (const struct utimbuf *)tp); + } + stream->silent = silent; /* can pass up events now */ + mail_exists (stream,nmsgs); /* notify upper level of new mailbox size */ +@@ -1424,7 +1424,7 @@ void tenex_update_status (MAILSTREAM *stream,unsigned long msgno,long syncflag) + fstat (LOCAL->fd,&sbuf); /* get new write time */ + tp[1] = LOCAL->filetime = sbuf.st_mtime; + tp[0] = time (0); /* make sure read is later */ +- utime (stream->mailbox,tp); ++ utime (stream->mailbox, (const struct utimbuf *)tp); + } + } + } +diff --git a/src/osdep/unix/unix.c b/src/osdep/unix/unix.c +index 86be3f9..012dc83 100644 +--- a/src/osdep/unix/unix.c ++++ b/src/osdep/unix/unix.c +@@ -232,7 +232,7 @@ DRIVER *unix_valid (char *name) + if ((sbuf.st_ctime > sbuf.st_atime) || (sbuf.st_mtime > sbuf.st_atime)) { + tp[0] = sbuf.st_atime; /* yes, preserve atime and mtime */ + tp[1] = sbuf.st_mtime; +- utime (file,tp); /* set the times */ ++ utime (file, (const struct utimbuf *)tp); /* set the times */ + } + } + } +@@ -999,7 +999,7 @@ long unix_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options) + else tp[0] = /* else preserve \Marked status */ + ((sbuf.st_ctime > sbuf.st_atime) || (sbuf.st_mtime > sbuf.st_atime)) ? + sbuf.st_atime : tp[1]; +- utime (file,tp); /* set the times */ ++ utime (file, (const struct utimbuf *)tp); /* set the times */ + unix_unlock (fd,NIL,&lock); /* unlock and close mailbox */ + if (tstream) { /* update last UID if we can */ + UNIXLOCAL *local = (UNIXLOCAL *) tstream->local; +@@ -1160,7 +1160,7 @@ long unix_append (MAILSTREAM *stream,char *mailbox,append_t af,void *data) + ret = NIL; /* return error */ + } + else tp[0] = tp[1] - 1; /* set atime to now-1 if successful copy */ +- utime (file,tp); /* set the times */ ++ utime (file, (const struct utimbuf *)tp); /* set the times */ + fclose (sf); /* done with scratch file */ + /* force UIDVALIDITY assignment now */ + if (tstream && !tstream->uid_validity) tstream->uid_validity = time (0); +@@ -1425,7 +1425,7 @@ void unix_unlock (int fd,MAILSTREAM *stream,DOTLOCK *lock) + } + else now = 0; /* no time change needed */ + /* set the times, note change */ +- if (now && !utime (stream->mailbox,tp)) LOCAL->filetime = tp[1]; ++ if (now && !utime (stream->mailbox, (const struct utimbuf *)tp)) LOCAL->filetime = tp[1]; + } + flock (fd,LOCK_UN); /* release flock'ers */ + if (!stream) close (fd); /* close the file if no stream */ +@@ -2251,7 +2251,7 @@ long unix_rewrite (MAILSTREAM *stream,unsigned long *nexp,DOTLOCK *lock, + /* set atime to now, mtime a second earlier */ + tp[1] = (tp[0] = time (0)) - 1; + /* set the times, note change */ +- if (!utime (stream->mailbox,tp)) LOCAL->filetime = tp[1]; ++ if (!utime (stream->mailbox, (const struct utimbuf *)tp)) LOCAL->filetime = tp[1]; + close (LOCAL->fd); /* close and reopen file */ + if ((LOCAL->fd = open (stream->mailbox,O_RDWR, + (long) mail_parameters (NIL,GET_MBXPROTECTION,NIL))) diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/uw-imap/uw-imap/uw-imap-newer-tls.patch b/sources/meta-openembedded/meta-oe/recipes-devtools/uw-imap/uw-imap/uw-imap-newer-tls.patch new file mode 100644 index 00000000..958abc90 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/uw-imap/uw-imap/uw-imap-newer-tls.patch @@ -0,0 +1,29 @@ +Signed-off-by: Zoltán Böszörményi +Upstream-Status: Pending + +--- imap-2007f/src/osdep/unix/ssl_unix.c.old 2024-05-08 09:41:06.183450584 +0200 ++++ imap-2007f/src/osdep/unix/ssl_unix.c 2024-05-08 09:43:38.512931933 +0200 +@@ -220,7 +220,11 @@ + if (ssl_last_error) fs_give ((void **) &ssl_last_error); + ssl_last_host = host; + if (!(stream->context = SSL_CTX_new ((flags & NET_TLSCLIENT) ? ++#if OPENSSL_VERSION_NUMBER >= 0x10100000 ++ TLS_client_method () : ++#else + TLSv1_client_method () : ++#endif + SSLv23_client_method ()))) + return "SSL context failed"; + SSL_CTX_set_options (stream->context,0); +@@ -703,7 +707,11 @@ + } + /* create context */ + if (!(stream->context = SSL_CTX_new (start_tls ? ++#if OPENSSL_VERSION_NUMBER >= 0x10100000 ++ TLS_server_method () : ++#else + TLSv1_server_method () : ++#endif + SSLv23_server_method ()))) + syslog (LOG_ALERT,"Unable to create SSL context, host=%.80s", + tcp_clienthost ()); diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/uw-imap/uw-imap_2007f.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/uw-imap/uw-imap_2007f.bb index dcb59f4e..3b8da914 100644 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/uw-imap/uw-imap_2007f.bb +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/uw-imap/uw-imap_2007f.bb @@ -15,6 +15,8 @@ SRC_URI = "https://fossies.org/linux/misc/old/imap-${PV}.tar.gz \ file://0001-Do-not-build-mtest.patch \ file://0002-tmail-Include-ctype.h-for-isdigit.patch \ file://0001-Fix-Wincompatible-function-pointer-types.patch \ + file://uw-imap-newer-tls.patch \ + file://uw-imap-fix-incompatible-pointer-types.patch \ " SRC_URI[md5sum] = "2126fd125ea26b73b20f01fcd5940369" @@ -51,3 +53,10 @@ ALLOW_EMPTY:${PN} = "1" PARALLEL_MAKE = "" +# http://errors.yoctoproject.org/Errors/Details/766915/ +# unix.c:235:21: error: passing argument 2 of 'utime' from incompatible pointer type [-Wincompatible-pointer-types] +# unix.c:1002:15: error: passing argument 2 of 'utime' from incompatible pointer type [-Wincompatible-pointer-types] +# unix.c:1163:15: error: passing argument 2 of 'utime' from incompatible pointer type [-Wincompatible-pointer-types] +# unix.c:1428:40: error: passing argument 2 of 'utime' from incompatible pointer type [-Wincompatible-pointer-types] +# unix.c:2254:33: error: passing argument 2 of 'utime' from incompatible pointer type [-Wincompatible-pointer-types] +CFLAGS += "-Wno-error=incompatible-pointer-types" diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/valijson/valijson_1.0.2.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/valijson/valijson_1.0.2.bb deleted file mode 100644 index f531218a..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-devtools/valijson/valijson_1.0.2.bb +++ /dev/null @@ -1,22 +0,0 @@ -SUMMARY = "Header-only C++ library for JSON Schema validation" -HOMEPAGE = "https://github.com/tristanpenman/valijson" -LICENSE = "BSD-2-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=5c4583a434195e4f3b418e17c8ca2daf" - -SRC_URI = "git://github.com/tristanpenman/valijson.git;branch=master;protocol=https" -SRCREV = "0b4771e273a065d437814baf426bcfcafec0f434" - -S = "${WORKDIR}/git" - -inherit cmake - -PACKAGECONFIG ?= "boost" - -PACKAGECONFIG[boost] = "-Dvalijson_EXCLUDE_BOOST=FALSE,-Dvalijson_EXCLUDE_BOOST=TRUE,boost" -PACKAGECONFIG[examples] = "-Dvalijson_BUILD_EXAMPLES=TRUE,-Dvalijson_BUILD_EXAMPLES=FALSE,curlpp" -PACKAGECONFIG[tests] = "-Dvalijson_BUILD_TESTS=TRUE,-Dvalijson_BUILD_TESTS=FALSE,curlpp" - -# valijson is a header only C++ library, so the main package will be empty. -RDEPENDS:${PN}-dev = "" - -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-oe/recipes-devtools/valijson/valijson_1.0.3.bb b/sources/meta-openembedded/meta-oe/recipes-devtools/valijson/valijson_1.0.3.bb new file mode 100644 index 00000000..82201211 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-devtools/valijson/valijson_1.0.3.bb @@ -0,0 +1,22 @@ +SUMMARY = "Header-only C++ library for JSON Schema validation" +HOMEPAGE = "https://github.com/tristanpenman/valijson" +LICENSE = "BSD-2-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=5c4583a434195e4f3b418e17c8ca2daf" + +SRC_URI = "git://github.com/tristanpenman/valijson.git;branch=master;protocol=https" +SRCREV = "fc9ddf14db683c9443c48ae3a6bf83e0ce3ad37c" + +S = "${WORKDIR}/git" + +inherit cmake + +PACKAGECONFIG ?= "boost" + +PACKAGECONFIG[boost] = "-Dvalijson_EXCLUDE_BOOST=FALSE,-Dvalijson_EXCLUDE_BOOST=TRUE,boost" +PACKAGECONFIG[examples] = "-Dvalijson_BUILD_EXAMPLES=TRUE,-Dvalijson_BUILD_EXAMPLES=FALSE,curlpp" +PACKAGECONFIG[tests] = "-Dvalijson_BUILD_TESTS=TRUE,-Dvalijson_BUILD_TESTS=FALSE,curlpp" + +# valijson is a header only C++ library, so the main package will be empty. +RDEPENDS:${PN}-dev = "" + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/bitwise/bitwise_0.50.bb b/sources/meta-openembedded/meta-oe/recipes-extended/bitwise/bitwise_0.50.bb index 5cd20c5b..4d560eb4 100644 --- a/sources/meta-openembedded/meta-oe/recipes-extended/bitwise/bitwise_0.50.bb +++ b/sources/meta-openembedded/meta-oe/recipes-extended/bitwise/bitwise_0.50.bb @@ -18,6 +18,7 @@ SRC_URI = "https://github.com/mellowcandle/bitwise/releases/download/v${PV}/bitw SRC_URI[sha256sum] = "806271fa5bf31de0600315e8720004a8f529954480e991ca84a9868dc1cae97e" UPSTREAM_CHECK_URI = "https://github.com/mellowcandle/bitwise/releases" +UPSTREAM_CHECK_REGEX = "releases/tag/v(?P\d+(\.\d+)+)" S = "${WORKDIR}/${BPN}-v${PV}" @@ -27,6 +28,6 @@ inherit autotools ptest do_install_ptest() { install -d ${D}${PTEST_PATH} - install -m 0644 ${WORKDIR}/ptest.out.expected ${D}${PTEST_PATH}/ptest.out.expected + install -m 0644 ${UNPACKDIR}/ptest.out.expected ${D}${PTEST_PATH}/ptest.out.expected } diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/cfengine/cfengine-masterfiles_3.21.0.bb b/sources/meta-openembedded/meta-oe/recipes-extended/cfengine/cfengine-masterfiles_3.21.0.bb deleted file mode 100644 index 68d40425..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-extended/cfengine/cfengine-masterfiles_3.21.0.bb +++ /dev/null @@ -1,40 +0,0 @@ -# -# Copyright (C) 2014 - 2017 Wind River Systems, Inc. -# -SUMMARY = "Base policy for CFEngine" - -DESCRIPTION = "CFEngine is an IT infrastructure automation framework \ -that helps engineers, system administrators and other stakeholders \ -in an IT system to manage and understand IT infrastructure throughout \ -its lifecycle. CFEngine takes systems from Build to Deploy, Manage and Audit. \ - \ -This package is intended to provide a stable base policy for \ -installations and upgrades, and is used by CFEngine 3.6 and newer. \ - \ -The contents of this packge are intended to live in `/var/cfengine/masterfiles` \ -or wherever `$(sys.masterdir)` points. \ -" - -HOMEPAGE = "http://cfengine.com" - -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=bb843e794feb6890f7697637b461c36e" - -SRC_URI = "https://cfengine-package-repos.s3.amazonaws.com/tarballs/${BP}.tar.gz \ - " -#SRC_URI[md5sum] = "5df2f85c75efc351ffadebcc11046a98" -SRC_URI[sha256sum] = "013ebe68599915cedb4bf753b471713d91901a991623358b9a967d9a779bcc16" - -inherit autotools - -export EXPLICIT_VERSION="${PV}" - -EXTRA_OECONF = "--prefix=${datadir}/cfengine" - -do_install:append() { - rm -rf ${D}${datadir}/cfengine/modules/packages/zypper ${D}${datadir}/cfengine/modules/packages/yum -} - -FILES:${PN} = "${datadir}/cfengine" - -RDEPENDS:${PN} += "python3-core" diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/cfengine/cfengine-masterfiles_3.21.5.bb b/sources/meta-openembedded/meta-oe/recipes-extended/cfengine/cfengine-masterfiles_3.21.5.bb new file mode 100644 index 00000000..acd5b1e8 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-extended/cfengine/cfengine-masterfiles_3.21.5.bb @@ -0,0 +1,43 @@ +# +# Copyright (C) 2014 - 2017 Wind River Systems, Inc. +# +SUMMARY = "Base policy for CFEngine" + +DESCRIPTION = "CFEngine is an IT infrastructure automation framework \ +that helps engineers, system administrators and other stakeholders \ +in an IT system to manage and understand IT infrastructure throughout \ +its lifecycle. CFEngine takes systems from Build to Deploy, Manage and Audit. \ + \ +This package is intended to provide a stable base policy for \ +installations and upgrades, and is used by CFEngine 3.6 and newer. \ + \ +The contents of this packge are intended to live in `/var/cfengine/masterfiles` \ +or wherever `$(sys.masterdir)` points. \ +" + +HOMEPAGE = "http://cfengine.com" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=bb843e794feb6890f7697637b461c36e" + +SRC_URI = "https://cfengine-package-repos.s3.amazonaws.com/tarballs/${BP}.tar.gz \ + " +#SRC_URI[md5sum] = "5df2f85c75efc351ffadebcc11046a98" +SRC_URI[sha256sum] = "0adcfcf36d47317776ad64331058a4d2e3669683314716ddb885f8a13309f47d" + +UPSTREAM_CHECK_URI = "https://github.com/cfengine/masterfiles/releases" +UPSTREAM_CHECK_REGEX = "(?P\d+(\.\d+)+)" + +inherit autotools + +export EXPLICIT_VERSION="${PV}" + +EXTRA_OECONF = "--prefix=${datadir}/cfengine" + +do_install:append() { + rm -rf ${D}${datadir}/cfengine/modules/packages/zypper ${D}${datadir}/cfengine/modules/packages/yum +} + +FILES:${PN} = "${datadir}/cfengine" + +RDEPENDS:${PN} += "python3-core" diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/cmpi-bindings/cmpi-bindings/0001-cmpi-bindings-Fix-build-error-with-gcc14.patch b/sources/meta-openembedded/meta-oe/recipes-extended/cmpi-bindings/cmpi-bindings/0001-cmpi-bindings-Fix-build-error-with-gcc14.patch new file mode 100644 index 00000000..750d10a5 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-extended/cmpi-bindings/cmpi-bindings/0001-cmpi-bindings-Fix-build-error-with-gcc14.patch @@ -0,0 +1,46 @@ +From 9e4063a9a3fb2fab69d906902a8432da2544654b Mon Sep 17 00:00:00 2001 +From: Lei Maohui +Date: Tue, 11 Jun 2024 01:38:55 +0000 +Subject: [PATCH] cmpi-bindings: Fix build error with gcc14. + +The build error is as the following: + +| build-daily-2/tmp/work/aarch64-ubinux-linux/cmpi-bindings/1.0.4/git/swig/python/../../src/target_python.c:168:21: error: passing argument 1 of 'Py_SetProgramName' from incompatible pointer type [-Wincompatible-pointer-types] +| 168 | Py_SetProgramName("cmpi_swig"); +| | ^~~~~~~~~~~ +| | | +| | char * +| build-daily-2/tmp/work/aarch64-ubinux-linux/cmpi-bindings/1.0.4/recipe-sysroot/usr/include/python3.12/pylifecycle.h:37:56: note: expected 'const wchar_t *' {aka 'const unsigned int *'} but argument is of type 'char *' +| 37 | Py_DEPRECATED(3.11) PyAPI_FUNC(void) Py_SetProgramName(const wchar_t *); +| | + +Upstream-Status: Submitted +Signed-off-by: Lei Maohui +--- + src/target_python.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/target_python.c b/src/target_python.c +index a8dfd30..69a2515 100644 +--- a/src/target_python.c ++++ b/src/target_python.c +@@ -154,6 +154,7 @@ cleanup: + static int + PyGlobalInitialize(const CMPIBroker* broker, CMPIStatus* st) + { ++ const wchar_t proname[] = L"cmpi_swig"; + /* _SBLIM_TRACE(1,("<%d/0x%x> PyGlobalInitialize() called", getpid(), pthread_self())); */ + + if (_TARGET_INIT) +@@ -165,7 +166,7 @@ PyGlobalInitialize(const CMPIBroker* broker, CMPIStatus* st) + + _SBLIM_TRACE(1,("<%d/0x%x> Python: Loading", getpid(), pthread_self())); + +- Py_SetProgramName("cmpi_swig"); ++ Py_SetProgramName(proname); + Py_Initialize(); + #if PY_MAJOR_VERSION < 3 + SWIGEXPORT void SWIG_init(void); +-- +2.34.1 + diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/cmpi-bindings/cmpi-bindings_1.0.4.bb b/sources/meta-openembedded/meta-oe/recipes-extended/cmpi-bindings/cmpi-bindings_1.0.4.bb index 781dc83d..4f2585fe 100644 --- a/sources/meta-openembedded/meta-oe/recipes-extended/cmpi-bindings/cmpi-bindings_1.0.4.bb +++ b/sources/meta-openembedded/meta-oe/recipes-extended/cmpi-bindings/cmpi-bindings_1.0.4.bb @@ -10,6 +10,7 @@ SRC_URI = "git://github.com/kkaempf/cmpi-bindings.git;protocol=https;branch=mast file://cmpi-bindings-0.4.17-no-ruby-perl.patch \ file://cmpi-bindings-0.4.17-sblim-sigsegv.patch \ file://0001-Fix-error.patch \ + file://0001-cmpi-bindings-Fix-build-error-with-gcc14.patch \ " SRCREV = "69077ee4d249816ed428155fc933dca424167e77" @@ -32,3 +33,7 @@ FILES:${PN} =+"${libdir}/cmpi/libpy3CmpiProvider.so ${PYTHON_SITEPACKAGES_DIR}/* FILES:${PN}-dbg =+ "${libdir}/cmpi/.debug/libpyCmpiProvider.so" BBCLASSEXTEND = "native" + +# http://errors.yoctoproject.org/Errors/Details/766910/ +# cmpi-bindings/1.0.4/git/swig/python/../../src/target_python.c:168:21: error: passing argument 1 of 'Py_SetProgramName' from incompatible pointer type [-Wincompatible-pointer-types] +CFLAGS += "-Wno-error=incompatible-pointer-types" diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/collectd/collectd_5.12.0.bb b/sources/meta-openembedded/meta-oe/recipes-extended/collectd/collectd_5.12.0.bb index 02f1fcb4..df36b646 100644 --- a/sources/meta-openembedded/meta-oe/recipes-extended/collectd/collectd_5.12.0.bb +++ b/sources/meta-openembedded/meta-oe/recipes-extended/collectd/collectd_5.12.0.bb @@ -63,7 +63,7 @@ EXTRA_OECONF = " \ do_install:append() { install -d ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/collectd.init ${D}${sysconfdir}/init.d/collectd + install -m 0755 ${UNPACKDIR}/collectd.init ${D}${sysconfdir}/init.d/collectd sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/collectd sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/collectd sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/collectd @@ -77,7 +77,7 @@ do_install:append() { # Install systemd unit files install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/collectd.service ${D}${systemd_unitdir}/system + install -m 0644 ${UNPACKDIR}/collectd.service ${D}${systemd_unitdir}/system sed -i -e 's,@SBINDIR@,${sbindir},g' \ ${D}${systemd_unitdir}/system/collectd.service } diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/dialog/dialog_1.3-20240307.bb b/sources/meta-openembedded/meta-oe/recipes-extended/dialog/dialog_1.3-20240307.bb deleted file mode 100644 index a4971753..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-extended/dialog/dialog_1.3-20240307.bb +++ /dev/null @@ -1,31 +0,0 @@ -SUMMARY = "display dialog boxes from shell scripts" -DESCRIPTION = "Dialog lets you to present a variety of questions \ -or display messages using dialog boxes from a shell \ -script (or any scripting language)." -HOMEPAGE = "http://invisible-island.net/dialog/" -SECTION = "console/utils" -DEPENDS = "ncurses" -LICENSE = "LGPL-2.1-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343" - -SRC_URI = "https://invisible-mirror.net/archives/${BPN}/${BP}.tgz" -SRC_URI[sha256sum] = "339d311c6abb240213426b99ad63565cbcb3e8641ef1989c033e945b754d34ef" - -# hardcoded here for use in dialog-static recipe -S = "${WORKDIR}/dialog-${PV}" - -inherit autotools-brokensep pkgconfig - -PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" - -PACKAGECONFIG[x11] = "--with-x --x-includes=${STAGING_INCDIR} --x-libraries=${STAGING_LIBDIR},--without-x,virtual/libx11" - -EXTRA_OECONF = "--with-ncurses \ - --disable-rpath-hack" - -do_configure() { - gnu-configize --force - sed -i 's,${cf_ncuconfig_root}6-config,${cf_ncuconfig_root}-config,g' -i configure - sed -i 's,cf_have_ncuconfig=unknown,cf_have_ncuconfig=yes,g' -i configure - oe_runconf -} diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/dialog/dialog_1.3-20240619.bb b/sources/meta-openembedded/meta-oe/recipes-extended/dialog/dialog_1.3-20240619.bb new file mode 100644 index 00000000..0fccce5e --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-extended/dialog/dialog_1.3-20240619.bb @@ -0,0 +1,31 @@ +SUMMARY = "display dialog boxes from shell scripts" +DESCRIPTION = "Dialog lets you to present a variety of questions \ +or display messages using dialog boxes from a shell \ +script (or any scripting language)." +HOMEPAGE = "http://invisible-island.net/dialog/" +SECTION = "console/utils" +DEPENDS = "ncurses" +LICENSE = "LGPL-2.1-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343" + +SRC_URI = "https://invisible-mirror.net/archives/${BPN}/${BP}.tgz" +SRC_URI[sha256sum] = "5d8c4318963db3fd383525340276e0e05ee3dea9a6686c20779f5433b199547d" + +# hardcoded here for use in dialog-static recipe +S = "${WORKDIR}/dialog-${PV}" + +inherit autotools-brokensep pkgconfig + +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" + +PACKAGECONFIG[x11] = "--with-x --x-includes=${STAGING_INCDIR} --x-libraries=${STAGING_LIBDIR},--without-x,virtual/libx11" + +EXTRA_OECONF = "--with-ncurses \ + --disable-rpath-hack" + +do_configure() { + gnu-configize --force + sed -i 's,${cf_ncuconfig_root}6-config,${cf_ncuconfig_root}-config,g' -i configure + sed -i 's,cf_have_ncuconfig=unknown,cf_have_ncuconfig=yes,g' -i configure + oe_runconf +} diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/dlt-daemon/dlt-daemon/0001-CMakeLists-txt-make-DLT_WatchdogSec-can-be-set-by-user.patch b/sources/meta-openembedded/meta-oe/recipes-extended/dlt-daemon/dlt-daemon/0001-CMakeLists-txt-make-DLT_WatchdogSec-can-be-set-by-user.patch deleted file mode 100644 index 335872c4..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-extended/dlt-daemon/dlt-daemon/0001-CMakeLists-txt-make-DLT_WatchdogSec-can-be-set-by-user.patch +++ /dev/null @@ -1,40 +0,0 @@ -From bc03f142507da92add8ba325fdf8187d47a7d719 Mon Sep 17 00:00:00 2001 -From: Changqing Li -Date: Fri, 13 Dec 2024 16:37:24 +0800 -Subject: [PATCH] CMakeLists.txt: make DLT_WatchdogSec can be set by user - -In my test env, WatchdogSec default value 2 is not enough, manually -changed to 3 is ok. This makes dlt.service/dlt-system.service start -failed during boot time. So, make DLT_WatchdogSec can be set by user, so -user can set them to proper value at build time, then service can start -successfully in boot time. - -Signed-off-by: Changqing Li - -Upstream-Status: Backport [https://github.com/COVESA/dlt-daemon/pull/720/commits/bc03f142507da92add8ba325fdf8187d47a7d719] - -Signed-off-by: Changqing Li ---- - systemd/CMakeLists.txt | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -diff --git a/systemd/CMakeLists.txt b/systemd/CMakeLists.txt -index 16cbe86b5..659378d16 100644 ---- a/systemd/CMakeLists.txt -+++ b/systemd/CMakeLists.txt -@@ -18,10 +18,14 @@ if(WITH_SYSTEMD) - set(SYSTEMD_CONFIGURATIONS_FILES_DIR ${SYSTEMD_UNITDIR} ) - - if(WITH_SYSTEMD_WATCHDOG) -- set( DLT_WatchdogSec 2 ) -+ if(NOT DEFINED DLT_WatchdogSec) -+ set(DLT_WatchdogSec 2 CACHE STRING "Watchdog timeout in seconds") -+ endif() - message( STATUS "The systemd watchdog is enabled - timeout is set to ${DLT_WatchdogSec} seconds") - else(WITH_SYSTEMD_WATCHDOG) -- set( DLT_WatchdogSec 0 ) -+ if(NOT DEFINED DLT_WatchdogSec) -+ set(DLT_WatchdogSec 0 CACHE STRING "Watchdog timeout in seconds") -+ endif() - message( STATUS "The systemd watchdog is disabled") - endif(WITH_SYSTEMD_WATCHDOG) diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/dlt-daemon/dlt-daemon_2.18.10.bb b/sources/meta-openembedded/meta-oe/recipes-extended/dlt-daemon/dlt-daemon_2.18.10.bb index 888289b3..3d2e4a73 100644 --- a/sources/meta-openembedded/meta-oe/recipes-extended/dlt-daemon/dlt-daemon_2.18.10.bb +++ b/sources/meta-openembedded/meta-oe/recipes-extended/dlt-daemon/dlt-daemon_2.18.10.bb @@ -19,7 +19,6 @@ SRC_URI = "git://github.com/COVESA/${BPN}.git;protocol=https;branch=master \ file://0004-Modify-systemd-config-directory.patch \ file://544.patch \ file://567.patch \ - file://0001-CMakeLists-txt-make-DLT_WatchdogSec-can-be-set-by-user.patch \ " SRCREV = "0f2d4cfffada6f8448a2cb27995b38eb4271044f" diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/duktape/duktape_2.7.0.bb b/sources/meta-openembedded/meta-oe/recipes-extended/duktape/duktape_2.7.0.bb index 22b6c782..afa0e4c8 100644 --- a/sources/meta-openembedded/meta-oe/recipes-extended/duktape/duktape_2.7.0.bb +++ b/sources/meta-openembedded/meta-oe/recipes-extended/duktape/duktape_2.7.0.bb @@ -11,6 +11,8 @@ inherit ptest SRC_URI[sha256sum] = "90f8d2fa8b5567c6899830ddef2c03f3c27960b11aca222fa17aa7ac613c2890" +UPSTREAM_CHECK_URI = "https://duktape.org/download" + EXTRA_OEMAKE = "INSTALL_PREFIX='${prefix}' DESTDIR='${D}' LIBDIR='/${baselib}'" do_compile () { @@ -30,11 +32,11 @@ do_install () { } do_install_ptest() { - install -m 0755 "${WORKDIR}/duktape-2.7.0/hello" "${D}${PTEST_PATH}" - install -m 0755 "${WORKDIR}/duktape-2.7.0/eval" "${D}${PTEST_PATH}" - install -m 0755 "${WORKDIR}/duktape-2.7.0/evloop" "${D}${PTEST_PATH}" - install -m 0755 "${WORKDIR}/duktape-2.7.0/examples/eventloop/timer-test.js" "${D}${PTEST_PATH}" - install -m 0755 "${WORKDIR}/duktape-2.7.0/examples/eventloop/ecma_eventloop.js" "${D}${PTEST_PATH}" + install -m 0755 "${S}/hello" "${D}${PTEST_PATH}" + install -m 0755 "${S}/eval" "${D}${PTEST_PATH}" + install -m 0755 "${S}/evloop" "${D}${PTEST_PATH}" + install -m 0755 "${S}/examples/eventloop/timer-test.js" "${D}${PTEST_PATH}" + install -m 0755 "${S}/examples/eventloop/ecma_eventloop.js" "${D}${PTEST_PATH}" } RDEPENDS:${PN}-ptest += "make" diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/etcd/etcd-cpp-apiv3/0001-Replacing-GPR_ASSERT-with-c-assert.patch b/sources/meta-openembedded/meta-oe/recipes-extended/etcd/etcd-cpp-apiv3/0001-Replacing-GPR_ASSERT-with-c-assert.patch new file mode 100644 index 00000000..87000b66 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-extended/etcd/etcd-cpp-apiv3/0001-Replacing-GPR_ASSERT-with-c-assert.patch @@ -0,0 +1,33 @@ +From aeb34f58782fb6d06aea4f5cbeccb23a0224466e Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 4 Sep 2024 14:54:42 -0700 +Subject: [PATCH] Replacing GPR_ASSERT with c assert + +Latest GRPC >= 2.66 has dropped GRPC_ASSERT macro [1] + +[1] https://github.com/grpc/grpc/commit/0e23c2259da967a037e839e80cafd62bc6f9f68e + +Upstream-Status: Submitted [https://github.com/etcd-cpp-apiv3/etcd-cpp-apiv3/pull/281] +Signed-off-by: Khem Raj +--- + src/v3/Action.cpp | 9 +++++++++ + 1 file changed, 9 insertions(+) + +--- a/src/v3/Action.cpp ++++ b/src/v3/Action.cpp +@@ -2,6 +2,15 @@ + #include + #include + #include "etcd/v3/action_constants.hpp" ++#include ++ ++#ifndef GPR_ASSERT ++#define GPR_ASSERT(x) \ ++ if (!(x)) { \ ++ fprintf(stderr, "%s:%d assert failed\n", __FILE__, __LINE__); \ ++ abort(); \ ++} ++#endif + + etcdv3::Action::Action(etcdv3::ActionParameters const& params) { + parameters = params; diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/etcd/etcd-cpp-apiv3/0001-cmake-fix-when-cross-compiling.patch b/sources/meta-openembedded/meta-oe/recipes-extended/etcd/etcd-cpp-apiv3/0001-cmake-fix-when-cross-compiling.patch deleted file mode 100644 index ce12d427..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-extended/etcd/etcd-cpp-apiv3/0001-cmake-fix-when-cross-compiling.patch +++ /dev/null @@ -1,68 +0,0 @@ -From cb79329010d73e36ce64830914005f1c17f8f53c Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Cl=C3=A9ment=20P=C3=A9ron?= -Date: Sat, 23 Sep 2023 11:32:18 +0200 -Subject: [PATCH] cmake: fix when cross compiling -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -In order to generate protobuf files CMake need to use the protoc -and grpc-cpp-plugin compiled for the host architecture. - -Unfortunately, the protoc and grpc-cpp-plugin in the gRPC CMake -configuration file are the one for the target architecture. - -Fix this by properly finding the correct executable when -CMake is cross compiling. - -Signed-off-by: Clément Péron ---- -Upstream-Status: Pending - - CMakeLists.txt | 28 ++++++++++++++++++++++++++-- - 1 file changed, 26 insertions(+), 2 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 5aa1310..80ebad2 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -120,10 +120,34 @@ if(Protobuf_PROTOC_EXECUTABLE) - endif() - endif() - -+# When cross compiling we look for the native protoc compiler -+# overwrite protobuf::protoc with the proper protoc -+if(CMAKE_CROSSCOMPILING) -+ find_program(Protobuf_PROTOC_EXECUTABLE REQUIRED NAMES protoc) -+ if(NOT TARGET protobuf::protoc) -+ add_executable(protobuf::protoc IMPORTED) -+ endif() -+ set_target_properties(protobuf::protoc PROPERTIES -+ IMPORTED_LOCATION "${Protobuf_PROTOC_EXECUTABLE}") -+endif() -+ - find_package(gRPC QUIET) --if(gRPC_FOUND AND TARGET gRPC::grpc AND TARGET gRPC::grpc_cpp_plugin) -+if(gRPC_FOUND AND TARGET gRPC::grpc) -+ # When cross compiling we look for the native grpc_cpp_plugin -+ if(CMAKE_CROSSCOMPILING) -+ find_program(GRPC_CPP_PLUGIN REQUIRED NAMES grpc_cpp_plugin) -+ if(NOT TARGET gRPC::grpc_cpp_plugin) -+ add_executable(gRPC::grpc_cpp_plugin IMPORTED) -+ endif() -+ set_target_properties(gRPC::grpc_cpp_plugin PROPERTIES -+ IMPORTED_LOCATION "${GRPC_CPP_PLUGIN}") -+ elseif(TARGET gRPC::grpc_cpp_plugin) -+ get_target_property(GRPC_CPP_PLUGIN gRPC::grpc_cpp_plugin LOCATION) -+ else() -+ message(FATAL_ERROR "Found gRPC but no gRPC CPP plugin defined") -+ endif() -+ - set(GRPC_LIBRARIES gRPC::gpr gRPC::grpc gRPC::grpc++) -- get_target_property(GRPC_CPP_PLUGIN gRPC::grpc_cpp_plugin LOCATION) - get_target_property(GRPC_INCLUDE_DIR gRPC::grpc INTERFACE_INCLUDE_DIRECTORIES) - else() - include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/FindGRPC.cmake) --- -2.39.3 (Apple Git-145) - diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/etcd/etcd-cpp-apiv3/0001-include-stdint.h-for-int64_t-types.patch b/sources/meta-openembedded/meta-oe/recipes-extended/etcd/etcd-cpp-apiv3/0001-include-stdint.h-for-int64_t-types.patch new file mode 100644 index 00000000..373e146b --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-extended/etcd/etcd-cpp-apiv3/0001-include-stdint.h-for-int64_t-types.patch @@ -0,0 +1,27 @@ +From 44f4254fe96c43437400f94a8a2800175ddf3279 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 20 May 2024 21:00:48 -0700 +Subject: [PATCH] include stdint.h for int64_t types + +This is exposed when compiling for musl platforms where this +header is not included indirectly. + +Upstream-Status: Submitted [https://github.com/etcd-cpp-apiv3/etcd-cpp-apiv3/pull/270] +Signed-off-by: Khem Raj +--- + src/Value.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/Value.cpp b/src/Value.cpp +index cbda697..d6f2c9c 100644 +--- a/src/Value.cpp ++++ b/src/Value.cpp +@@ -1,4 +1,5 @@ + #include ++#include + + #include "etcd/Value.hpp" + #include "etcd/v3/KeyValue.hpp" +-- +2.45.1 + diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/etcd/etcd-cpp-apiv3_0.15.3.bb b/sources/meta-openembedded/meta-oe/recipes-extended/etcd/etcd-cpp-apiv3_0.15.3.bb deleted file mode 100644 index e6fe8af8..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-extended/etcd/etcd-cpp-apiv3_0.15.3.bb +++ /dev/null @@ -1,27 +0,0 @@ -DESCRIPTION = "C++ API for etcd's v3 client API" -HOMEPAGE = "https://github.com/etcd-cpp-apiv3/etcd-cpp-apiv3" - -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=eae7da6a2cd1788a5cf8a9f838cf6450" - -SRC_URI = " \ - git://github.com/etcd-cpp-apiv3/etcd-cpp-apiv3.git;branch=master;protocol=https \ - file://0001-cmake-fix-when-cross-compiling.patch \ -" - -SRCREV = "e31ac4d4caa55fa662e207150ba40f8151b7ad96" - -inherit cmake - -DEPENDS += "grpc protobuf cpprest grpc-native protobuf-native" - -S = "${WORKDIR}/git" - -EXTRA_OECONF += "-DCPPREST_EXCLUDE_WEBSOCKETS=ON" - -do_install:append() { - sed -i -e 's#${RECIPE_SYSROOT}##g' ${D}${libdir}/cmake/etcd-cpp-api/etcd-targets.cmake -} - -SOLIBS = ".so" -FILES_SOLIBSDEV = "" diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/etcd/etcd-cpp-apiv3_0.15.4.bb b/sources/meta-openembedded/meta-oe/recipes-extended/etcd/etcd-cpp-apiv3_0.15.4.bb new file mode 100644 index 00000000..0e6509d2 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-extended/etcd/etcd-cpp-apiv3_0.15.4.bb @@ -0,0 +1,28 @@ +DESCRIPTION = "C++ API for etcd's v3 client API" +HOMEPAGE = "https://github.com/etcd-cpp-apiv3/etcd-cpp-apiv3" + +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=eae7da6a2cd1788a5cf8a9f838cf6450" + +SRC_URI = " \ + git://github.com/etcd-cpp-apiv3/etcd-cpp-apiv3.git;branch=master;protocol=https \ + file://0001-include-stdint.h-for-int64_t-types.patch \ + file://0001-Replacing-GPR_ASSERT-with-c-assert.patch \ +" + +SRCREV = "ba6216385fc332b23d95683966824c2b86c2474e" + +inherit cmake + +DEPENDS += "grpc protobuf cpprest grpc-native protobuf-native" + +S = "${WORKDIR}/git" + +EXTRA_OECONF += "-DCPPREST_EXCLUDE_WEBSOCKETS=ON" + +do_install:append() { + sed -i -e 's#${RECIPE_SYSROOT}##g' ${D}${libdir}/cmake/etcd-cpp-api/etcd-targets.cmake +} + +SOLIBS = ".so" +FILES_SOLIBSDEV = "" diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/etcd/etcd_3.5.7.bb b/sources/meta-openembedded/meta-oe/recipes-extended/etcd/etcd_3.5.7.bb index 0794158a..24e111de 100644 --- a/sources/meta-openembedded/meta-oe/recipes-extended/etcd/etcd_3.5.7.bb +++ b/sources/meta-openembedded/meta-oe/recipes-extended/etcd/etcd_3.5.7.bb @@ -2,12 +2,12 @@ DESCRIPTION = "etcd is a distributed key-value store for distributed systems" HOMEPAGE = "https://etcd.io/" LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://${S}/${GO_INSTALL}/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" +LIC_FILES_CHKSUM = "file://${GO_INSTALL}/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" SRC_URI = " \ - git://github.com/etcd-io/etcd;branch=release-3.5;protocol=https \ - file://0001-xxhash-bump-to-v2.1.2.patch;patchdir=src/${GO_IMPORT} \ - file://0001-test_lib.sh-remove-gobin-requirement-during-build.patch;patchdir=src/${GO_IMPORT} \ + git://github.com/etcd-io/etcd;branch=release-3.5;protocol=https;destsuffix=${GO_SRCURI_DESTSUFFIX} \ + file://0001-xxhash-bump-to-v2.1.2.patch;patchdir=${GO_INSTALL} \ + file://0001-test_lib.sh-remove-gobin-requirement-during-build.patch;patchdir=${GO_INSTALL} \ file://etcd.service \ file://etcd-existing.conf \ file://etcd-new.service \ @@ -62,11 +62,11 @@ do_install:append() { install -m 0755 ${D}${libdir}/go/src/go.etcd.io/etcd/v3/bin/etcd ${D}${bindir} install -m 0755 ${D}${libdir}/go/src/go.etcd.io/etcd/v3/bin/etcdctl ${D}${bindir} install -m 0755 ${D}${libdir}/go/src/go.etcd.io/etcd/v3/bin/etcdutl ${D}${bindir} - install -m 0644 ${WORKDIR}/etcd-existing.conf -D -t ${D}${sysconfdir}/etcd.d + install -m 0644 ${UNPACKDIR}/etcd-existing.conf -D -t ${D}${sysconfdir}/etcd.d install -d ${D}${systemd_system_unitdir} - install -m 0644 ${WORKDIR}/etcd.service ${D}${systemd_system_unitdir}/ - install -m 0644 ${WORKDIR}/etcd-new.service ${D}${systemd_system_unitdir}/ - install -m 0644 ${WORKDIR}/etcd-new.path ${D}${systemd_system_unitdir}/ + install -m 0644 ${UNPACKDIR}/etcd.service ${D}${systemd_system_unitdir}/ + install -m 0644 ${UNPACKDIR}/etcd-new.service ${D}${systemd_system_unitdir}/ + install -m 0644 ${UNPACKDIR}/etcd-new.path ${D}${systemd_system_unitdir}/ } FILES:${PN}:append = " ${sysconfdir}/etcd.d/etcd-existing.conf" diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/flatpak/flatpak-xdg-utils_1.0.5.bb b/sources/meta-openembedded/meta-oe/recipes-extended/flatpak/flatpak-xdg-utils_1.0.5.bb deleted file mode 100644 index 423c6faf..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-extended/flatpak/flatpak-xdg-utils_1.0.5.bb +++ /dev/null @@ -1,14 +0,0 @@ -DESCRIPTION = "This repository contains a number of commandline utilities for use inside Flatpak sandboxes." -HOMEPAGE = "http://flatpak.org" -LICENSE = "LGPL-2.1-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" - -SRC_URI = "git://github.com/flatpak/flatpak-xdg-utils.git;protocol=https;branch=main" - -SRCREV = "5ba39872f81bf8d98d58c5f8acb86604645be468" - -S = "${WORKDIR}/git" - -inherit meson pkgconfig - -DEPENDS = "glib-2.0" diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/flatpak/flatpak-xdg-utils_1.0.6.bb b/sources/meta-openembedded/meta-oe/recipes-extended/flatpak/flatpak-xdg-utils_1.0.6.bb new file mode 100644 index 00000000..5dfba251 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-extended/flatpak/flatpak-xdg-utils_1.0.6.bb @@ -0,0 +1,14 @@ +DESCRIPTION = "This repository contains a number of commandline utilities for use inside Flatpak sandboxes." +HOMEPAGE = "http://flatpak.org" +LICENSE = "LGPL-2.1-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" + +SRC_URI = "git://github.com/flatpak/flatpak-xdg-utils.git;protocol=https;branch=main" + +SRCREV = "05abdd7421688be5835a6b12f2b068086c38d4aa" + +S = "${WORKDIR}/git" + +inherit meson pkgconfig + +DEPENDS = "glib-2.0" diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/flatpak/flatpak_1.15.10.bb b/sources/meta-openembedded/meta-oe/recipes-extended/flatpak/flatpak_1.15.10.bb new file mode 100644 index 00000000..c9d04e92 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-extended/flatpak/flatpak_1.15.10.bb @@ -0,0 +1,78 @@ +DESCRIPTION = "Desktop containment framework." +HOMEPAGE = "http://flatpak.org" +LICENSE = "LGPL-2.1-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" + +SRC_URI = " \ + git://github.com/flatpak/flatpak;protocol=https;branch=main \ + file://0001-flatpak-pc-add-pc_sysrootdir.patch \ +" + +SRCREV = "8b4f523c4f8287d57f1a84a3a8216efe200c5fbf" + +S = "${WORKDIR}/git" + +inherit meson pkgconfig gettext systemd gtk-doc gobject-introspection python3native mime features_check + +REQUIRED_DISTRO_FEATURES = "polkit" + +DEPENDS = " \ + appstream \ + bison-native \ + bubblewrap-native \ + fuse3 \ + gdk-pixbuf \ + glib-2.0 \ + gpgme \ + json-glib \ + libarchive \ + libcap \ + libxml2 \ + ostree \ + polkit \ + python3-pyparsing-native \ + xdg-dbus-proxy-native \ + zstd \ +" + +RDEPENDS:${PN} = " \ + ca-certificates \ + flatpak-xdg-utils \ + fuse3-utils \ + bubblewrap \ + xdg-dbus-proxy \ +" + +GIR_MESON_OPTION = "gir" +GIR_MESON_ENABLE_FLAG = 'enabled' +GIR_MESON_DISABLE_FLAG = 'disabled' +GTKDOC_MESON_OPTION = 'gtkdoc' +GTKDOC_MESON_ENABLE_FLAG = 'enabled' +GTKDOC_MESON_DISABLE_FLAG = 'disabled' + +PACKAGECONFIG[curl] = "-Dhttp_backend=curl,,curl" +PACKAGECONFIG[dconf] = "-Ddconf=enabled,-Ddconf=disabled,dconf" +PACKAGECONFIG[docbook_docs] = "-Ddocbook_docs=enabled,-Ddocbook_docs=disabled,xmlto-native" +PACKAGECONFIG[man] = "-Dman=enabled,-Dman=disabled,libxslt-native" +PACKAGECONFIG[soup] = "-Dhttp_backend=soup,,libsoup-2.4" +PACKAGECONFIG[tests] = "-Dtests=true,-Dtests=false,xauth socat-native" +PACKAGECONFIG[xauth] = "-Dxauth=enabled,-Dxauth=disabled,xauth" +PACKAGECONFIG[seccomp] = "-Dseccomp=enabled,-Dseccomp=disabled,libseccomp" +PACKAGECONFIG[malcontent] = "-Dmalcontent=enabled,-Dmalcontent=disabled,malcontent" +PACKAGECONFIG[selinux] = "-Dselinux_module=enabled,-Dselinux_module=disabled,libselinux" +PACKAGECONFIG[wayland-security-context] = "-Dwayland_security_context=enabled,-Dwayland_security_context=disabled,wayland wayland-native wayland-protocols" + +PACKAGECONFIG ?= " \ + curl \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xauth', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'seccomp', 'seccomp', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland-security-context', '', d)} \ +" + +EXTRA_OEMESON = " \ + -Dsystem_fusermount=fusermount3 \ + -Dsystem_bubblewrap=bwrap \ + -Dsystem_dbus_proxy=xdg-dbus-proxy \ +" + +FILES:${PN} += "${libdir} ${datadir}" diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/flatpak/flatpak_1.15.8.bb b/sources/meta-openembedded/meta-oe/recipes-extended/flatpak/flatpak_1.15.8.bb deleted file mode 100644 index 8719d3ef..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-extended/flatpak/flatpak_1.15.8.bb +++ /dev/null @@ -1,78 +0,0 @@ -DESCRIPTION = "Desktop containment framework." -HOMEPAGE = "http://flatpak.org" -LICENSE = "LGPL-2.1-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" - -SRC_URI = " \ - gitsm://github.com/flatpak/flatpak;protocol=https;branch=main \ - file://0001-flatpak-pc-add-pc_sysrootdir.patch \ -" - -SRCREV = "925c80f913d69e7ca424428823e1431c4ffb0deb" - -S = "${WORKDIR}/git" - -inherit meson pkgconfig gettext systemd gtk-doc gobject-introspection python3native useradd mime features_check - -REQUIRED_DISTRO_FEATURES = "polkit" - -DEPENDS = " \ - appstream \ - bison-native \ - dconf \ - fuse3 \ - gdk-pixbuf \ - glib-2.0 \ - gpgme \ - json-glib \ - libarchive \ - libcap \ - libxml2 \ - ostree \ - polkit \ - python3-pyparsing-native \ - zstd \ -" - -RDEPENDS:${PN} = " \ - ca-certificates \ - dconf \ - flatpak-xdg-utils \ -" - -GIR_MESON_OPTION = "gir" -GIR_MESON_ENABLE_FLAG = 'enabled' -GIR_MESON_DISABLE_FLAG = 'disabled' -GTKDOC_MESON_OPTION = 'gtkdoc' -GTKDOC_MESON_ENABLE_FLAG = 'enabled' -GTKDOC_MESON_DISABLE_FLAG = 'disabled' - -PACKAGECONFIG[curl] = "-Dhttp_backend=curl,,curl" -PACKAGECONFIG[docbook_docs] = "-Ddocbook_docs=enabled,-Ddocbook_docs=disabled,xmlto-native" -PACKAGECONFIG[man] = "-Dman=enabled,-Dman=disabled,libxslt-native" -PACKAGECONFIG[soup] = "-Dhttp_backend=soup,,libsoup-2.4" -PACKAGECONFIG[tests] = "-Dtests=true,-Dtests=false,xauth socat-native" -PACKAGECONFIG[xauth] = "-Dxauth=enabled,-Dxauth=disabled,xauth" -PACKAGECONFIG[seccomp] = "-Dseccomp=enabled,-Dseccomp=disabled,libseccomp" -PACKAGECONFIG[selinux] = "-Dselinux_module=enabled,-Dselinux_module=disabled,libselinux" -PACKAGECONFIG[wayland-security-context] = "-Dwayland_security_context=enabled,-Dwayland_security_context=disabled,wayland wayland-native wayland-protocols" - -PACKAGECONFIG ?= " \ - curl \ - ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xauth', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'seccomp', 'seccomp', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland-security-context', '', d)} \ -" - -EXTRA_OEMESON = "-Dsystem_fusermount=${bindir}/fusermount3" - -FILES:${PN} += "${libdir} ${datadir}" - -USERADD_PACKAGES = "${PN}" -USERADD_PARAM:${PN} = "--system --no-create-home --user-group --home-dir ${sysconfdir}/polkit-1 polkitd" - -do_install:append() { - chmod 0700 ${D}/${datadir}/polkit-1/rules.d - chown polkitd ${D}/${datadir}/polkit-1/rules.d - chgrp root ${D}/${datadir}/polkit-1/rules.d -} diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit/0001-CMakeLists.txt-Do-not-use-private-makefile-target.patch b/sources/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit/0001-CMakeLists.txt-Do-not-use-private-makefile-target.patch index f5a1716c..0cabed96 100644 --- a/sources/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit/0001-CMakeLists.txt-Do-not-use-private-makefile-target.patch +++ b/sources/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit/0001-CMakeLists.txt-Do-not-use-private-makefile-target.patch @@ -15,8 +15,6 @@ Upstream-Status: Pending [https://github.com/fluent/fluent-bit/issues/5492] lib/cmetrics/CMakeLists.txt | 7 +------ 3 files changed, 3 insertions(+), 17 deletions(-) -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 3dba5a8..d94b988 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,11 +46,7 @@ else() @@ -32,8 +30,6 @@ index 3dba5a8..d94b988 100644 if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "armv7l") set(CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} -latomic") -diff --git a/lib/chunkio/CMakeLists.txt b/lib/chunkio/CMakeLists.txt -index bbe1f39..809ea93 100644 --- a/lib/chunkio/CMakeLists.txt +++ b/lib/chunkio/CMakeLists.txt @@ -14,12 +14,7 @@ else() @@ -50,21 +46,19 @@ index bbe1f39..809ea93 100644 include(cmake/macros.cmake) -diff --git a/lib/cmetrics/CMakeLists.txt b/lib/cmetrics/CMakeLists.txt -index 60e8774..e3d6149 100644 --- a/lib/cmetrics/CMakeLists.txt +++ b/lib/cmetrics/CMakeLists.txt @@ -34,12 +34,7 @@ set(CMT_VERSION_MINOR 3) - set(CMT_VERSION_PATCH 5) + set(CMT_VERSION_PATCH 7) set(CMT_VERSION_STR "${CMT_VERSION_MAJOR}.${CMT_VERSION_MINOR}.${CMT_VERSION_PATCH}") --# Define __FILENAME__ consistently across Operating Systems +-# Define __CMT_FILENAME__ consistently across Operating Systems -if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Windows") -- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__FILENAME__='\"$(subst ${CMAKE_SOURCE_DIR}/,,$(abspath $<))\"'") +- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__CMT_FILENAME__='\"$(subst ${CMAKE_SOURCE_DIR}/,,$(abspath $<))\"'") -else() -- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__FILENAME__=__FILE__") +- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__CMT_FILENAME__=__FILE__") -endif() -+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__FILENAME__=__FILE__") ++set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__CMT_FILENAME__=__FILE__") # Configuration options - option(CMT_DEV "Enable development mode" No) + option(CMT_DEV "Enable development mode" No) diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit_1.9.7.bb b/sources/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit_1.9.7.bb deleted file mode 100644 index fc060954..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit_1.9.7.bb +++ /dev/null @@ -1,92 +0,0 @@ -SUMMARY = "Fast Log processor and Forwarder" -DESCRIPTION = "Fluent Bit is a data collector, processor and \ -forwarder for Linux. It supports several input sources and \ -backends (destinations) for your data. \ -" - -HOMEPAGE = "http://fluentbit.io" -BUGTRACKER = "https://github.com/fluent/fluent-bit/issues" - -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=2ee41112a44fe7014dce33e26468ba93" -SECTION = "net" - -SRC_URI = "https://releases.fluentbit.io/1.9/source-${PV}.tar.gz;subdir=fluent-bit-${PV};downloadfilename=${BPN}-${PV}.tar.gz \ - file://0001-CMakeLists.txt-Do-not-use-private-makefile-target.patch \ - file://0002-flb_info.h.in-Do-not-hardcode-compilation-directorie.patch \ - file://0003-mbedtls-Do-not-overwrite-CFLAGS.patch \ - file://0004-build-Make-systemd-init-systemd-detection-contingent.patch \ - file://0001-monkey-Define-_GNU_SOURCE-for-memmem-API-check.patch \ - file://0002-mbedtls-Remove-unused-variable.patch \ - file://0003-mbedtls-Disable-documentation-warning-as-error-with-.patch \ - file://0004-Use-correct-type-to-store-return-from-flb_kv_item_cr.patch \ - file://0005-stackdriver-Fix-return-type-mismatch.patch \ - file://0006-monkey-Fix-TLS-detection-testcase.patch \ - file://0007-cmake-Do-not-check-for-upstart-on-build-host.patch \ - " -SRC_URI:remove:x86 = "file://0002-mbedtls-Remove-unused-variable.patch" -SRC_URI:append:libc-musl = "\ - file://0001-Use-posix-strerror_r-with-musl.patch \ - file://0002-chunkio-Link-with-fts-library-with-musl.patch \ - " -SRC_URI[sha256sum] = "8ca2ac081d7eee717483c06608adcb5e3d5373e182ad87dba21a23f8278c6540" -S = "${WORKDIR}/fluent-bit-${PV}" - -DEPENDS = "zlib bison-native flex-native openssl" -DEPENDS += "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" - -PACKAGECONFIG[yaml] = "-DFLB_CONFIG_YAML=On,-DFLB_CONFIG_YAML=Off,libyaml" -PACKAGECONFIG[kafka] = "-DFLB_OUT_KAFKA=On,-DFLB_OUT_KAFKA=Off,librdkafka" -PACKAGECONFIG[examples] = "-DFLB_EXAMPLES=On,-DFLB_EXAMPLES=Off" -PACKAGECONFIG[jemalloc] = "-DFLB_JEMALLOC=On,-DFLB_JEMALLOC=Off,jemalloc" -#TODO add more fluentbit options to PACKAGECONFIG[] - -DEPENDS:append:libc-musl = " fts " - -# flex hardcodes the input file in #line directives leading to TMPDIR contamination of debug sources. -do_compile:append() { - find ${B} -name '*.c' -or -name '*.h' | xargs sed -i -e 's|${TMPDIR}|${TARGET_DBGSRC_DIR}/|g' -} - -PACKAGECONFIG ?= "yaml" - -LTO = "" - -# Use CMake 'Unix Makefiles' generator -OECMAKE_GENERATOR ?= "Unix Makefiles" - -# Fluent Bit build options -# ======================== - -# Host related setup -EXTRA_OECMAKE += "-DGNU_HOST=${HOST_SYS} -DFLB_TD=1" - -# Disable LuaJIT and filter_lua support -EXTRA_OECMAKE += "-DFLB_LUAJIT=Off -DFLB_FILTER_LUA=Off " - -# Disable Library and examples -EXTRA_OECMAKE += "-DFLB_SHARED_LIB=Off" - -# Enable systemd iff systemd is in DISTRO_FEATURES -EXTRA_OECMAKE += "${@bb.utils.contains('DISTRO_FEATURES','systemd','-DFLB_SYSTEMD=On','-DFLB_SYSTEMD=Off',d)}" - -# Enable release builds -EXTRA_OECMAKE += "-DFLB_RELEASE=On" - -# musl needs these options -EXTRA_OECMAKE:append:libc-musl = ' -DFLB_JEMALLOC_OPTIONS="--with-jemalloc-prefix=je_ --with-lg-quantum=3" -DFLB_CORO_STACK_SIZE=24576' - -EXTRA_OECMAKE:append:riscv64 = " -DCMAKE_C_STANDARD_LIBRARIES=-latomic" -EXTRA_OECMAKE:append:riscv32 = " -DCMAKE_C_STANDARD_LIBRARIES=-latomic" -EXTRA_OECMAKE:append:mips = " -DCMAKE_C_STANDARD_LIBRARIES=-latomic" -EXTRA_OECMAKE:append:powerpc = " -DCMAKE_C_STANDARD_LIBRARIES=-latomic" -EXTRA_OECMAKE:append:x86 = " -DCMAKE_C_STANDARD_LIBRARIES=-latomic" - -CFLAGS:append:x86 = " -DMBEDTLS_HAVE_SSE2" - -inherit cmake systemd pkgconfig - -SYSTEMD_SERVICE:${PN} = "td-agent-bit.service" - -EXTRA_OECMAKE += "-DCMAKE_DEBUG_SRCDIR=${TARGET_DBGSRC_DIR}/" -TARGET_CC_ARCH += " ${SELECTED_OPTIMIZATION}" diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit_1.9.9.bb b/sources/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit_1.9.9.bb new file mode 100644 index 00000000..660a3a63 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit_1.9.9.bb @@ -0,0 +1,97 @@ +SUMMARY = "Fast Log processor and Forwarder" +DESCRIPTION = "Fluent Bit is a data collector, processor and \ +forwarder for Linux. It supports several input sources and \ +backends (destinations) for your data. \ +" + +HOMEPAGE = "http://fluentbit.io" +BUGTRACKER = "https://github.com/fluent/fluent-bit/issues" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=2ee41112a44fe7014dce33e26468ba93" +SECTION = "net" + +SRC_URI = "https://releases.fluentbit.io/1.9/source-${PV}.tar.gz;subdir=fluent-bit-${PV};downloadfilename=${BPN}-${PV}.tar.gz \ + file://0001-CMakeLists.txt-Do-not-use-private-makefile-target.patch \ + file://0002-flb_info.h.in-Do-not-hardcode-compilation-directorie.patch \ + file://0003-mbedtls-Do-not-overwrite-CFLAGS.patch \ + file://0004-build-Make-systemd-init-systemd-detection-contingent.patch \ + file://0001-monkey-Define-_GNU_SOURCE-for-memmem-API-check.patch \ + file://0002-mbedtls-Remove-unused-variable.patch \ + file://0003-mbedtls-Disable-documentation-warning-as-error-with-.patch \ + file://0004-Use-correct-type-to-store-return-from-flb_kv_item_cr.patch \ + file://0005-stackdriver-Fix-return-type-mismatch.patch \ + file://0006-monkey-Fix-TLS-detection-testcase.patch \ + file://0007-cmake-Do-not-check-for-upstart-on-build-host.patch \ + " +SRC_URI:remove:x86 = "file://0002-mbedtls-Remove-unused-variable.patch" +SRC_URI:append:libc-musl = "\ + file://0001-Use-posix-strerror_r-with-musl.patch \ + file://0002-chunkio-Link-with-fts-library-with-musl.patch \ + " +SRC_URI[sha256sum] = "3f6cd4bd1894cda16b465aef6ffec7e920d54c4209b3e2320fcffe7ae345700e" +S = "${WORKDIR}/fluent-bit-${PV}" + +DEPENDS = "zlib bison-native flex-native openssl" +DEPENDS += "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" + +PACKAGECONFIG[yaml] = "-DFLB_CONFIG_YAML=On,-DFLB_CONFIG_YAML=Off,libyaml" +PACKAGECONFIG[kafka] = "-DFLB_OUT_KAFKA=On,-DFLB_OUT_KAFKA=Off,librdkafka" +PACKAGECONFIG[examples] = "-DFLB_EXAMPLES=On,-DFLB_EXAMPLES=Off" +PACKAGECONFIG[jemalloc] = "-DFLB_JEMALLOC=On,-DFLB_JEMALLOC=Off,jemalloc" +#TODO add more fluentbit options to PACKAGECONFIG[] + +DEPENDS:append:libc-musl = " fts " + +# flex hardcodes the input file in #line directives leading to TMPDIR contamination of debug sources. +do_compile:append() { + find ${B} -name '*.c' -or -name '*.h' | xargs sed -i -e 's|${TMPDIR}|${TARGET_DBGSRC_DIR}/|g' +} + +PACKAGECONFIG ?= "yaml" + +LTO = "" + +# Use CMake 'Unix Makefiles' generator +OECMAKE_GENERATOR ?= "Unix Makefiles" + +# Fluent Bit build options +# ======================== + +# Host related setup +EXTRA_OECMAKE += "-DGNU_HOST=${HOST_SYS} -DFLB_TD=1" + +# Disable LuaJIT and filter_lua support +EXTRA_OECMAKE += "-DFLB_LUAJIT=Off -DFLB_FILTER_LUA=Off " + +# Disable Library and examples +EXTRA_OECMAKE += "-DFLB_SHARED_LIB=Off" + +# Enable systemd iff systemd is in DISTRO_FEATURES +EXTRA_OECMAKE += "${@bb.utils.contains('DISTRO_FEATURES','systemd','-DFLB_SYSTEMD=On','-DFLB_SYSTEMD=Off',d)}" + +# Enable release builds +EXTRA_OECMAKE += "-DFLB_RELEASE=On" + +# musl needs these options +EXTRA_OECMAKE:append:libc-musl = ' -DFLB_JEMALLOC_OPTIONS="--with-jemalloc-prefix=je_ --with-lg-quantum=3" -DFLB_CORO_STACK_SIZE=24576' + +EXTRA_OECMAKE:append:riscv64 = " -DCMAKE_C_STANDARD_LIBRARIES=-latomic" +EXTRA_OECMAKE:append:riscv32 = " -DCMAKE_C_STANDARD_LIBRARIES=-latomic" +EXTRA_OECMAKE:append:mips = " -DCMAKE_C_STANDARD_LIBRARIES=-latomic" +EXTRA_OECMAKE:append:powerpc = " -DCMAKE_C_STANDARD_LIBRARIES=-latomic" +EXTRA_OECMAKE:append:x86 = " -DCMAKE_C_STANDARD_LIBRARIES=-latomic" + +CFLAGS:append:x86 = " -DMBEDTLS_HAVE_SSE2" + +# Fixes build with GCC-14 +CFLAGS += "-Wno-error=incompatible-pointer-types" + +inherit cmake systemd pkgconfig + +SYSTEMD_SERVICE:${PN} = "td-agent-bit.service" + +EXTRA_OECMAKE += "-DCMAKE_DEBUG_SRCDIR=${TARGET_DBGSRC_DIR}/" +TARGET_CC_ARCH += " ${SELECTED_OPTIMIZATION}" + +SKIP_RECIPE[fluentbit] ?= "It is not reproducible. QA Issue: File /usr/bin/.debug/td-agent-bit in package fluentbit-dbg contains reference to TMPDIR [buildpaths]" diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/gnuplot/gnuplot_5.4.3.bb b/sources/meta-openembedded/meta-oe/recipes-extended/gnuplot/gnuplot_5.4.3.bb index fe5e5c06..a293048a 100644 --- a/sources/meta-openembedded/meta-oe/recipes-extended/gnuplot/gnuplot_5.4.3.bb +++ b/sources/meta-openembedded/meta-oe/recipes-extended/gnuplot/gnuplot_5.4.3.bb @@ -50,14 +50,14 @@ EXTRA_OECONF = " \ " do_compile:prepend() { - install -m 0644 ${WORKDIR}/qtplot-0.2/qtopia.trm ${S}/term/ + install -m 0644 ${UNPACKDIR}/qtplot-0.2/qtopia.trm ${S}/term/ } do_install:append:class-target() { install -d ${D}${datadir}/applications/ - install -m 0644 ${WORKDIR}/gnuplot.desktop ${D}${datadir}/applications/ + install -m 0644 ${UNPACKDIR}/gnuplot.desktop ${D}${datadir}/applications/ install -d ${D}${datadir}/pixmaps/ - install -m 0644 ${WORKDIR}/gnuplot.png ${D}${datadir}/pixmaps/ + install -m 0644 ${UNPACKDIR}/gnuplot.png ${D}${datadir}/pixmaps/ } PACKAGES =+ "${PN}-x11" diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/highway/highway/0001-Add-cmake-check-for-deducing-32bit-or-64bit-RISCV.patch b/sources/meta-openembedded/meta-oe/recipes-extended/highway/highway/0001-Add-cmake-check-for-deducing-32bit-or-64bit-RISCV.patch new file mode 100644 index 00000000..bafe218f --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-extended/highway/highway/0001-Add-cmake-check-for-deducing-32bit-or-64bit-RISCV.patch @@ -0,0 +1,76 @@ +From 5d40c0c49f9acde83ba71b6f59094cdbd12e1b78 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 17 Sep 2024 18:22:36 +0000 +Subject: [PATCH] Add cmake check for deducing 32bit or 64bit RISCV + +Currently its only compilable for RV64 when RVV is +enabled, this will extend it to build for RV32 with +RVV as well + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- + CMakeLists.txt | 36 ++++++++++++++++++++++++++++++++++-- + 1 file changed, 34 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ea8b330c..cd824787 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -65,6 +65,34 @@ if (NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE RelWithDebInfo) + endif() + ++include(CheckCSourceCompiles) ++ ++check_c_source_compiles(" ++#if __riscv_xlen == 64 ++int main() { return 0; } ++#else ++#error Not RISCV-64 ++#endif ++" IS_RISCV_XLEN_64) ++ ++check_c_source_compiles(" ++#if __riscv_xlen == 32 ++int main() { return 0; } ++#else ++#error Not RISCV-32 ++#endif ++" IS_RISCV_XLEN_32) ++ ++if(IS_RISCV_XLEN_32) ++ set(RISCV_XLEN 32) ++elseif(IS_RISCV_XLEN_64) ++ set(RISCV_XLEN 64) ++else() ++ message(WARNING "Unable to determine RISC-V XLEN") ++endif() ++ ++message(STATUS "RISC-V XLEN: ${RISCV_XLEN}") ++ + # The following is only required with GCC < 6.1.0 or CLANG < 16.0 + set(HWY_CMAKE_ARM7 OFF CACHE BOOL "Set copts for Armv7 with NEON (requires vfpv4)?") + +@@ -72,7 +100,7 @@ set(HWY_CMAKE_ARM7 OFF CACHE BOOL "Set copts for Armv7 with NEON (requires vfpv4 + # skipped. For GCC 13.1+, you can also build with -fexcess-precision=standard. + set(HWY_CMAKE_SSE2 OFF CACHE BOOL "Set SSE2 as baseline for 32-bit x86?") + +-# Currently this will compile the entire codebase with `-march=rv64gcv1p0`: ++# Currently this will compile the entire codebase with `-march=rvgcv1p0`: + set(HWY_CMAKE_RVV ON CACHE BOOL "Set copts for RISCV with RVV?") + + # Unconditionally adding -Werror risks breaking the build when new warnings +@@ -378,7 +406,11 @@ else() + # we add the gcv compiler flag, which then requires the CPU (now when using + # either compiler) to support V. + if(HWY_CMAKE_RVV) +- list(APPEND HWY_FLAGS -march=rv64gcv1p0) ++ if(RISCV_XLEN EQUAL 64) ++ list(APPEND HWY_FLAGS -march=rv64gcv1p0) ++ elseif(RISCV_XLEN EQUAL 32) ++ list(APPEND HWY_FLAGS -march=rv32gcv1p0) ++ endif() + if(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang") + list(APPEND HWY_FLAGS -menable-experimental-extensions) + endif() diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/highway/highway_1.1.0.bb b/sources/meta-openembedded/meta-oe/recipes-extended/highway/highway_1.1.0.bb deleted file mode 100644 index 11d9e7cd..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-extended/highway/highway_1.1.0.bb +++ /dev/null @@ -1,17 +0,0 @@ -SUMMARY = "Highway is a C++ library for SIMD (Single Instruction, Multiple Data)" -HOMEPAGE = "https://github.com/google/highway/" - -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=2b42edef8fa55315f34f2370b4715ca9" - -inherit cmake - -SRC_URI = "git://github.com/google/highway.git;protocol=https;branch=master" - -SRCREV = "58b52a717469e62b2d9b8eaa2f5dddb44d4a4cbf" -S = "${WORKDIR}/git" - -EXTRA_OECMAKE = "-DBUILD_TESTING=0 -DCMAKE_BUILD_TYPE=Release" -CXXFLAGS:append:arm = " -mfp16-format=ieee" -# Option not supported with clang and its default format for __fp16 anyway with clang -CXXFLAGS:remove:toolchain-clang = "-mfp16-format=ieee" diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/highway/highway_1.2.0.bb b/sources/meta-openembedded/meta-oe/recipes-extended/highway/highway_1.2.0.bb new file mode 100644 index 00000000..d226cd82 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-extended/highway/highway_1.2.0.bb @@ -0,0 +1,21 @@ +SUMMARY = "Highway is a C++ library for SIMD (Single Instruction, Multiple Data)" +HOMEPAGE = "https://github.com/google/highway/" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=2b42edef8fa55315f34f2370b4715ca9" + +inherit cmake + +SRC_URI = "git://github.com/google/highway.git;protocol=https;branch=master \ + file://0001-Add-cmake-check-for-deducing-32bit-or-64bit-RISCV.patch" + +SRCREV = "457c891775a7397bdb0376bb1031e6e027af1c48" +S = "${WORKDIR}/git" + +EXTRA_OECMAKE = "-DBUILD_TESTING=0 -DCMAKE_BUILD_TYPE=Release" + +CXXFLAGS:append:arm = " -mfp16-format=ieee" +# Option not supported with clang and its default format for __fp16 anyway with clang +CXXFLAGS:remove:toolchain-clang = "-mfp16-format=ieee" + +TOOLCHAIN = "gcc" diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/hplip/hplip_3.22.10.bb b/sources/meta-openembedded/meta-oe/recipes-extended/hplip/hplip_3.22.10.bb index 991c6955..c54b2e0d 100644 --- a/sources/meta-openembedded/meta-oe/recipes-extended/hplip/hplip_3.22.10.bb +++ b/sources/meta-openembedded/meta-oe/recipes-extended/hplip/hplip_3.22.10.bb @@ -19,6 +19,8 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.gz \ file://0001-Drop-using-register-storage-classifier.patch" SRC_URI[sha256sum] = "533c3f2f6b53e4163ded4fd81d1f11ae6162a0f6451bd5e62a8382d0c1366624" +UPSTREAM_CHECK_URI = "https://sourceforge.net/p/hplip/activity" + DEPENDS += "cups python3 libusb1 python3-setuptools-native" inherit autotools-brokensep python3-dir python3native python3targetconfig pkgconfig systemd diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/icewm/icewm/0001-configure.ac-skip-running-test-program-when-cross-co.patch b/sources/meta-openembedded/meta-oe/recipes-extended/icewm/icewm/0001-configure.ac-skip-running-test-program-when-cross-co.patch index c5e210af..994f252a 100644 --- a/sources/meta-openembedded/meta-oe/recipes-extended/icewm/icewm/0001-configure.ac-skip-running-test-program-when-cross-co.patch +++ b/sources/meta-openembedded/meta-oe/recipes-extended/icewm/icewm/0001-configure.ac-skip-running-test-program-when-cross-co.patch @@ -1,4 +1,4 @@ -From c2a67c1f62175ab061bc03d10dd766f968c6a097 Mon Sep 17 00:00:00 2001 +From 06207b1340963e77f2e5d08ebf9727180ad86a36 Mon Sep 17 00:00:00 2001 From: Naveen Saini Date: Fri, 2 Aug 2019 10:41:26 +0800 Subject: [PATCH] configure.ac: skip running test program when cross-compiling @@ -7,12 +7,14 @@ Upstream-Status: Inappropriate [OE-Specific] Signed-off-by: Naveen Saini --- - configure.ac | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + configure.ac | 19 ++----------------- + 1 file changed, 2 insertions(+), 17 deletions(-) +diff --git a/configure.ac b/configure.ac +index c4a9b02..3f5a792 100644 --- a/configure.ac +++ b/configure.ac -@@ -160,7 +160,7 @@ AC_CHECK_FUNCS([backtrace_symbols_fd mem +@@ -151,7 +151,7 @@ AC_CHECK_FUNCS([backtrace_symbols_fd memrchr sysctl sysctlbyname]) AC_FUNC_SELECT_ARGTYPES AC_MSG_CHECKING([for strlcpy]) @@ -21,7 +23,7 @@ Signed-off-by: Naveen Saini char a[2]; if (strlcpy(a, "yes", 2) != 3) return 1;]])], -@@ -176,7 +176,7 @@ AC_RUN_IFELSE([AC_LANG_PROGRAM([[#includ +@@ -167,7 +167,7 @@ AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include ]],[[ ]) AC_MSG_CHECKING([for strlcat]) @@ -30,7 +32,7 @@ Signed-off-by: Naveen Saini char a[4] = "no"; if (strlcat(a, "yes", 4) != 5) return 1;]])], -@@ -191,21 +191,6 @@ AC_RUN_IFELSE([AC_LANG_PROGRAM([[#includ +@@ -182,21 +182,6 @@ AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include ]],[[ [Define to 1 if you have the strlcat function.]) ]) diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/icewm/icewm_3.4.5.bb b/sources/meta-openembedded/meta-oe/recipes-extended/icewm/icewm_3.4.5.bb deleted file mode 100644 index 6e50231c..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-extended/icewm/icewm_3.4.5.bb +++ /dev/null @@ -1,46 +0,0 @@ -DESCRIPTION = "Ice Window Manager (IceWM)" -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=4a26952467ef79a7efca4a9cf52d417b" - -SRC_URI = "https://github.com/ice-wm/${BPN}/releases/download/${PV}/${BPN}-${PV}.tar.lz \ - file://0001-configure.ac-skip-running-test-program-when-cross-co.patch \ - " -SRC_URI[sha256sum] = "8d1afe9a2d5e28e88261b68906337449307e53f06c08218e1a6409083998a5f1" - -UPSTREAM_CHECK_URI = "https://github.com/ice-wm/${BPN}/releases" - -inherit autotools pkgconfig gettext perlnative features_check qemu update-alternatives -REQUIRED_DISTRO_FEATURES = "x11" - -EXTRA_OECONF += "--with-libdir=${datadir}/icewm \ - --with-cfgdir=${sysconfdir}/icewm \ - --with-docdir=${docdir}/icewm \ - --enable-fribidi \ - --enable-xinerama \ - --enable-shape" - -DEPENDS = "asciidoc-native fontconfig fribidi gdk-pixbuf imlib2 libxft libxpm libxrandr \ - libxinerama libice libsm libx11 libxext libxrender libxcomposite libxdamage \ - libxfixes" -DEPENDS:append = " qemu-native" -RDEPENDS:${PN} = "perl fribidi imlib2 imlib2-loaders" - -do_compile:prepend:class-target() { - - cd ${B} - oe_runmake -C src genpref - - qemu_binary="${@qemu_wrapper_cmdline(d, '${STAGING_DIR_TARGET}',['${B}/src/.libs','${STAGING_DIR_TARGET}/${libdir}','${STAGING_DIR_TARGET}/${base_libdir}'])}" - cat >qemuwrapper < src/preferences -} - -ALTERNATIVE:${PN} = "x-session-manager" -ALTERNATIVE_TARGET[x-session-manager] = "${bindir}/icewm-session" -ALTERNATIVE_PRIORITY_${PN} = "100" - -FILES:${PN} += "${datadir}/xsessions" diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/icewm/icewm_3.6.0.bb b/sources/meta-openembedded/meta-oe/recipes-extended/icewm/icewm_3.6.0.bb new file mode 100644 index 00000000..c6202905 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-extended/icewm/icewm_3.6.0.bb @@ -0,0 +1,47 @@ +DESCRIPTION = "Ice Window Manager (IceWM)" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=4a26952467ef79a7efca4a9cf52d417b" + +SRC_URI = "https://github.com/ice-wm/${BPN}/releases/download/${PV}/${BPN}-${PV}.tar.lz \ + file://0001-configure.ac-skip-running-test-program-when-cross-co.patch \ + " +SRC_URI[sha256sum] = "979fafd3a3371f73cbafe592e2be052475637ac4bb4385bb132331fd6924bc76" + +UPSTREAM_CHECK_URI = "https://github.com/ice-wm/${BPN}/releases" +UPSTREAM_CHECK_REGEX = "(?P\d+(\.\d+)+)" + +inherit autotools pkgconfig gettext perlnative features_check qemu update-alternatives +REQUIRED_DISTRO_FEATURES = "x11" + +EXTRA_OECONF += "--with-libdir=${datadir}/icewm \ + --with-cfgdir=${sysconfdir}/icewm \ + --with-docdir=${docdir}/icewm \ + --enable-fribidi \ + --enable-xinerama \ + --enable-shape" + +DEPENDS = "asciidoc-native fontconfig fribidi gdk-pixbuf imlib2 libxft libxpm libxrandr \ + libxinerama libice libsm libx11 libxext libxrender libxcomposite libxdamage \ + libxfixes" +DEPENDS:append = " qemu-native" +RDEPENDS:${PN} = "perl fribidi imlib2 imlib2-loaders" + +do_compile:prepend:class-target() { + + cd ${B} + oe_runmake -C src genpref + + qemu_binary="${@qemu_wrapper_cmdline(d, '${STAGING_DIR_TARGET}',['${B}/src/.libs','${STAGING_DIR_TARGET}/${libdir}','${STAGING_DIR_TARGET}/${base_libdir}'])}" + cat >qemuwrapper < src/preferences +} + +ALTERNATIVE:${PN} = "x-session-manager" +ALTERNATIVE_TARGET[x-session-manager] = "${bindir}/icewm-session" +ALTERNATIVE_PRIORITY_${PN} = "100" + +FILES:${PN} += "${datadir}/xsessions" diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/inputattach-config/inputattach-config.bb b/sources/meta-openembedded/meta-oe/recipes-extended/inputattach-config/inputattach-config.bb index 84ed3b05..9bb2e2f1 100644 --- a/sources/meta-openembedded/meta-oe/recipes-extended/inputattach-config/inputattach-config.bb +++ b/sources/meta-openembedded/meta-oe/recipes-extended/inputattach-config/inputattach-config.bb @@ -4,9 +4,12 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0-only;md5=801f80980d171d SRC_URI = "file://inputattach.conf" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" + do_configure[noexec] = "1" do_compile[noexec] = "1" do_install() { - install -Dm 0644 ${WORKDIR}/inputattach.conf ${D}${sysconfdir}/inputattach.conf + install -Dm 0644 ${UNPACKDIR}/inputattach.conf ${D}${sysconfdir}/inputattach.conf } diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/isomd5sum/isomd5sum_1.2.4.bb b/sources/meta-openembedded/meta-oe/recipes-extended/isomd5sum/isomd5sum_1.2.4.bb deleted file mode 100644 index 5f2993dd..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-extended/isomd5sum/isomd5sum_1.2.4.bb +++ /dev/null @@ -1,36 +0,0 @@ -SUMMARY = "Tools for taking the MD5 sum of ISO images" -DESCRIPTION = "Tools for taking the MD5 sum of ISO images" - -DEPENDS = "popt python3 openssl curl popt-native" -RDEPENDS:${BPN} = "openssl curl" - -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b" - -SRC_URI = "git://github.com/rhinstaller/isomd5sum.git;branch=master;protocol=https \ - file://0001-tweak-install-prefix.patch \ - file://0002-fix-parallel-error.patch \ -" - -S = "${WORKDIR}/git" -inherit python3native - -EXTRA_OEMAKE += " \ - DESTDIR='${D}' \ - PYTHONINCLUDE='-I${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI}' \ - PYTHONSITEPACKAGES='${PYTHON_SITEPACKAGES_DIR}' \ -" - -do_install () { - oe_runmake install -} - -PACKAGES += "python3-${BPN}" - -RPROVIDES:${BPN}-dbg += "python3-${BPN}-dbg" - -FILES:python3-${BPN} = "${PYTHON_SITEPACKAGES_DIR}/pyisomd5sum.so" - -SRCREV = "3f4c9bd3f21ec9ac75a025dfa3fa30fe3f621831" - -BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/isomd5sum/isomd5sum_1.2.5.bb b/sources/meta-openembedded/meta-oe/recipes-extended/isomd5sum/isomd5sum_1.2.5.bb new file mode 100644 index 00000000..87fcf8cc --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-extended/isomd5sum/isomd5sum_1.2.5.bb @@ -0,0 +1,36 @@ +SUMMARY = "Tools for taking the MD5 sum of ISO images" +DESCRIPTION = "Tools for taking the MD5 sum of ISO images" + +DEPENDS = "popt python3 openssl curl popt-native" +RDEPENDS:${BPN} = "openssl curl" + +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b" + +SRC_URI = "git://github.com/rhinstaller/isomd5sum.git;branch=master;protocol=https \ + file://0001-tweak-install-prefix.patch \ + file://0002-fix-parallel-error.patch \ +" + +S = "${WORKDIR}/git" +inherit python3native + +EXTRA_OEMAKE += " \ + DESTDIR='${D}' \ + PYTHONINCLUDE='-I${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI}' \ + PYTHONSITEPACKAGES='${PYTHON_SITEPACKAGES_DIR}' \ +" + +do_install () { + oe_runmake install +} + +PACKAGES += "python3-${BPN}" + +RPROVIDES:${BPN}-dbg += "python3-${BPN}-dbg" + +FILES:python3-${BPN} = "${PYTHON_SITEPACKAGES_DIR}/pyisomd5sum.so" + +SRCREV = "ed1f54de86b5d507c4cfa552923e9ddfddd9b893" + +BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/jansson/jansson/0001-add-back-JSON_INTEGER_IS_LONG_LONG-for-cmake.patch b/sources/meta-openembedded/meta-oe/recipes-extended/jansson/jansson/0001-add-back-JSON_INTEGER_IS_LONG_LONG-for-cmake.patch new file mode 100644 index 00000000..5298cfbe --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-extended/jansson/jansson/0001-add-back-JSON_INTEGER_IS_LONG_LONG-for-cmake.patch @@ -0,0 +1,51 @@ +From 521d37abc0ed1178a39298d06d80d8d0e2a43e28 Mon Sep 17 00:00:00 2001 +From: Chen Qi +Date: Tue, 10 Sep 2024 00:48:00 -0700 +Subject: [PATCH] add back JSON_INTEGER_IS_LONG_LONG for cmake + +For autotools, JSON_INTEGER_IS_LONG_LONG is defined, but for +cmake, it's not. This means such macro, which is also documented, +is not consistent across different build systems. This is not +good, so add it for cmake. + +This patch refers 8b975abca1055d40637c90b1dc4585af1d7df76c and is +part of it. So the upstream-status is marked as 'oe specific'. + +Upstream-Status: Inappropriate [OE Specific] + +Signed-off-by: Chen Qi +--- + CMakeLists.txt | 1 + + cmake/jansson_config.h.cmake | 4 +--- + 2 files changed, 2 insertions(+), 3 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 39b9ad3..0e95a94 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -193,6 +193,7 @@ endif () + # detect what to use for the 64 bit type. + # Note: I will prefer long long if I can get it, as that is what the automake system aimed for. + if (NOT DEFINED JSON_INT_T) ++ set (JSON_INTEGER_IS_LONG_LONG 1) + if (HAVE_LONG_LONG_INT AND (LONG_LONG_INT EQUAL 8)) + set (JSON_INT_T "long long") + elseif (HAVE_INT64_T) +diff --git a/cmake/jansson_config.h.cmake b/cmake/jansson_config.h.cmake +index 2f248cb..bec64da 100644 +--- a/cmake/jansson_config.h.cmake ++++ b/cmake/jansson_config.h.cmake +@@ -21,9 +21,7 @@ + #define JANSSON_USING_CMAKE + #endif + +-/* Note: when using cmake, JSON_INTEGER_IS_LONG_LONG is not defined nor used, +- * as we will also check for __int64 etc types. +- * (the definition was used in the automake system) */ ++#cmakedefine JSON_INTEGER_IS_LONG_LONG 1 + + /* Bring in the cmake-detected defines */ + #cmakedefine HAVE_STDINT_H 1 +-- +2.42.0 + diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/jansson/jansson_2.14.bb b/sources/meta-openembedded/meta-oe/recipes-extended/jansson/jansson_2.14.bb index 83306068..9f5cdcf4 100644 --- a/sources/meta-openembedded/meta-oe/recipes-extended/jansson/jansson_2.14.bb +++ b/sources/meta-openembedded/meta-oe/recipes-extended/jansson/jansson_2.14.bb @@ -7,11 +7,12 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=afd92c4cfc08f4896003251b878cc0bf" SRC_URI = "https://github.com/akheron/${BPN}/releases/download/v${PV}/${BP}.tar.bz2 \ file://0001-Fix-overwriting-linker-flags.patch \ file://0001-Honour-multilib-paths.patch \ + file://0001-add-back-JSON_INTEGER_IS_LONG_LONG-for-cmake.patch \ " SRC_URI[sha256sum] = "fba956f27c6ae56ce6dfd52fbf9d20254aad42821f74fa52f83957625294afb9" UPSTREAM_CHECK_URI = "https://github.com/akheron/${BPN}/releases" -UPSTREAM_CHECK_REGEX = "${BPN}-(?P\d+(\.\d+)+)\.tar" +UPSTREAM_CHECK_REGEX = "(?P\d+(\.\d+)+)" inherit cmake pkgconfig diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/lastlog2/lastlog2_1.2.0.bb b/sources/meta-openembedded/meta-oe/recipes-extended/lastlog2/lastlog2_1.2.0.bb deleted file mode 100644 index 43deac38..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-extended/lastlog2/lastlog2_1.2.0.bb +++ /dev/null @@ -1,36 +0,0 @@ -SUMMARY = "Y2038 safe version of lastlog" -HOMEPAGE = "https://github.com/thkukuk/lastlog2" -DESCRIPTION = "lastlog reports the last login of a given user or of all users who did ever login on a system." -LICENSE = "BSD-2-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=020090a00b69dd2af9ab82eb0003ea2c" -SECTION = "libs" - -SRCREV = "6138dff6f2a5216065fa4833a223b56d98cb62f3" - -SRC_URI = "git://github.com/thkukuk/lastlog2.git;branch=main;protocol=https \ - file://0001-remove-lto-to-fix-link-error-of-clang.patch \ -" - -S = "${WORKDIR}/git" - -inherit meson pkgconfig systemd features_check - -DEPENDS += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)} sqlite3 " -REQUIRED_DISTRO_FEATURES = "pam" - -SYSTEMD_SERVICE:${PN} = "lastlog2-import.service" - -EXTRA_OEMESON = " -Dpamlibdir=${libdir}" - -do_install:append () { - if [ -d ${D}${prefix}/lib/systemd -a ${D}${prefix}/lib != `dirname ${D}${systemd_unitdir}` ]; then - # Fix makefile hardcoded path assumptions for systemd (assumes $prefix) - # without usrmerge distro feature enabled - install -d `dirname ${D}${systemd_unitdir}` - mv ${D}${prefix}/lib/systemd `dirname ${D}${systemd_unitdir}` - fi -} - -FILES:${PN} += " ${systemd_system_unitdir} " -FILES:${PN} += " ${libdir} " -FILES:${PN} += " ${nonarch_libdir}/tmpfiles.d/* " diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/libbacktrace/libbacktrace_git.bb b/sources/meta-openembedded/meta-oe/recipes-extended/libbacktrace/libbacktrace_git.bb index d540737b..0c2382fe 100644 --- a/sources/meta-openembedded/meta-oe/recipes-extended/libbacktrace/libbacktrace_git.bb +++ b/sources/meta-openembedded/meta-oe/recipes-extended/libbacktrace/libbacktrace_git.bb @@ -13,6 +13,9 @@ SRC_URI = "git://github.com/ianlancetaylor/libbacktrace;protocol=https;branch=ma PV = "1.0+git" SRCREV = "9ae4f4ae4481b1e69d38ed810980d33103544613" +# The current PV is not a git tag but a README content +UPSTREAM_CHECK_COMMITS = "1" + S = "${WORKDIR}/git" inherit autotools diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/libblockdev/files/0001-libext2fs-unused-parameters-fix.patch b/sources/meta-openembedded/meta-oe/recipes-extended/libblockdev/files/0001-libext2fs-unused-parameters-fix.patch new file mode 100644 index 00000000..8129c1e2 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-extended/libblockdev/files/0001-libext2fs-unused-parameters-fix.patch @@ -0,0 +1,92 @@ +From 3aad8d471201da4125bd03d7a6921707461fe182 Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Fri, 7 Jun 2024 10:06:22 +0200 +Subject: [PATCH 1/3] fs: Ignore unused-parameter warning in the FS plugin + +There are some unused parameters in the libext2fs header which +together with Wall and Werror means the plugin compilation fails. +As a workaround we'll disable the unused-parameter warning for +now. + +Fixes: #1026 + +Taken from Fedora + +Upstream-Status: Pending +Signed-off-by: Khem Raj + +--- + src/plugins/fs/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/plugins/fs/Makefile.am b/src/plugins/fs/Makefile.am +index 7d4849c0..00474d5a 100644 +--- a/src/plugins/fs/Makefile.am ++++ b/src/plugins/fs/Makefile.am +@@ -2,7 +2,7 @@ AUTOMAKE_OPTIONS = subdir-objects + + lib_LTLIBRARIES = libbd_fs.la + +-libbd_fs_la_CFLAGS = $(GLIB_CFLAGS) $(GIO_CFLAGS) $(BLKID_CFLAGS) $(MOUNT_CFLAGS) $(UUID_CFLAGS) $(EXT2FS_CFLAGS) -Wall -Wextra -Werror ++libbd_fs_la_CFLAGS = $(GLIB_CFLAGS) $(GIO_CFLAGS) $(BLKID_CFLAGS) $(MOUNT_CFLAGS) $(UUID_CFLAGS) $(EXT2FS_CFLAGS) -Wall -Wextra -Werror -Wno-unused-parameter + libbd_fs_la_LIBADD = ${builddir}/../../utils/libbd_utils.la $(GLIB_LIBS) $(GIO_LIBS) $(BLKID_LIBS) $(MOUNT_LIBS) $(UUID_LIBS) $(EXT2FS_LIBS) + libbd_fs_la_LDFLAGS = -L${srcdir}/../../utils/ -version-info 3:0:0 -Wl,--no-undefined -export-symbols-regex '^bd_.*' + libbd_fs_la_CPPFLAGS = -I${builddir}/../../../include/ -I${srcdir}/../ +-- +2.45.2 + + +From da5c14f3e2f83c8c40203897154ee2b788782792 Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Fri, 7 Jun 2024 15:21:09 +0200 +Subject: [PATCH 2/3] fs: Ignore shift-count-overflow warning in FS plugin + +The warning happens in the libext2fs header. +--- + src/plugins/fs/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/plugins/fs/Makefile.am b/src/plugins/fs/Makefile.am +index 00474d5a..42e1c777 100644 +--- a/src/plugins/fs/Makefile.am ++++ b/src/plugins/fs/Makefile.am +@@ -2,7 +2,7 @@ AUTOMAKE_OPTIONS = subdir-objects + + lib_LTLIBRARIES = libbd_fs.la + +-libbd_fs_la_CFLAGS = $(GLIB_CFLAGS) $(GIO_CFLAGS) $(BLKID_CFLAGS) $(MOUNT_CFLAGS) $(UUID_CFLAGS) $(EXT2FS_CFLAGS) -Wall -Wextra -Werror -Wno-unused-parameter ++libbd_fs_la_CFLAGS = $(GLIB_CFLAGS) $(GIO_CFLAGS) $(BLKID_CFLAGS) $(MOUNT_CFLAGS) $(UUID_CFLAGS) $(EXT2FS_CFLAGS) -Wall -Wextra -Werror -Wno-unused-parameter -Wno-shift-count-overflow + libbd_fs_la_LIBADD = ${builddir}/../../utils/libbd_utils.la $(GLIB_LIBS) $(GIO_LIBS) $(BLKID_LIBS) $(MOUNT_LIBS) $(UUID_LIBS) $(EXT2FS_LIBS) + libbd_fs_la_LDFLAGS = -L${srcdir}/../../utils/ -version-info 3:0:0 -Wl,--no-undefined -export-symbols-regex '^bd_.*' + libbd_fs_la_CPPFLAGS = -I${builddir}/../../../include/ -I${srcdir}/../ +-- +2.45.2 + + +From 90ceb4b52fbda34673fe5303da84b9a902187503 Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Wed, 12 Jun 2024 15:34:02 +0200 +Subject: [PATCH 3/3] fs: Fix ignoring errors from libext2fs + +Follow-up for #1028, we still want to show the warning and not +completely supress it. +--- + src/plugins/fs/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/plugins/fs/Makefile.am b/src/plugins/fs/Makefile.am +index 42e1c777..1ee256f0 100644 +--- a/src/plugins/fs/Makefile.am ++++ b/src/plugins/fs/Makefile.am +@@ -2,7 +2,7 @@ AUTOMAKE_OPTIONS = subdir-objects + + lib_LTLIBRARIES = libbd_fs.la + +-libbd_fs_la_CFLAGS = $(GLIB_CFLAGS) $(GIO_CFLAGS) $(BLKID_CFLAGS) $(MOUNT_CFLAGS) $(UUID_CFLAGS) $(EXT2FS_CFLAGS) -Wall -Wextra -Werror -Wno-unused-parameter -Wno-shift-count-overflow ++libbd_fs_la_CFLAGS = $(GLIB_CFLAGS) $(GIO_CFLAGS) $(BLKID_CFLAGS) $(MOUNT_CFLAGS) $(UUID_CFLAGS) $(EXT2FS_CFLAGS) -Wall -Wextra -Werror -Wno-error=unused-parameter -Wno-error=shift-count-overflow + libbd_fs_la_LIBADD = ${builddir}/../../utils/libbd_utils.la $(GLIB_LIBS) $(GIO_LIBS) $(BLKID_LIBS) $(MOUNT_LIBS) $(UUID_LIBS) $(EXT2FS_LIBS) + libbd_fs_la_LDFLAGS = -L${srcdir}/../../utils/ -version-info 3:0:0 -Wl,--no-undefined -export-symbols-regex '^bd_.*' + libbd_fs_la_CPPFLAGS = -I${builddir}/../../../include/ -I${srcdir}/../ +-- +2.45.2 + diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/libblockdev/files/CVE-2025-6019.patch b/sources/meta-openembedded/meta-oe/recipes-extended/libblockdev/files/CVE-2025-6019.patch deleted file mode 100644 index 2575578e..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-extended/libblockdev/files/CVE-2025-6019.patch +++ /dev/null @@ -1,31 +0,0 @@ -From b2e9c16c726f62e500241617f8f3a03aa658fbe3 Mon Sep 17 00:00:00 2001 -From: Thomas Blume -Date: Fri, 16 May 2025 14:27:10 +0200 -Subject: [PATCH] Don't allow suid and dev set on fs resize - -Fixes: CVE-2025-6019 - -CVE: CVE-2025-6019 -Upstream-Status: Backport [ https://github.com/storaged-project/libblockdev/commit/46b54414f66e965e3c37f8f51e621f96258ae22e ] - -Signed-off-by: Changqing Li ---- - src/plugins/fs/generic.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/plugins/fs/generic.c b/src/plugins/fs/generic.c -index 2b2180aa..60f7d75e 100644 ---- a/src/plugins/fs/generic.c -+++ b/src/plugins/fs/generic.c -@@ -661,7 +661,7 @@ static gchar* fs_mount (const gchar *device, gchar *fstype, gboolean read_only, - "Failed to create temporary directory for mounting '%s'.", device); - return NULL; - } -- ret = bd_fs_mount (device, mountpoint, fstype, read_only ? "ro" : NULL, NULL, &l_error); -+ ret = bd_fs_mount (device, mountpoint, fstype, read_only ? "nosuid,nodev,ro" : "nosuid,nodev", NULL, &l_error); - if (!ret) { - g_propagate_prefixed_error (error, l_error, "Failed to mount '%s': ", device); - g_rmdir (mountpoint); --- -2.34.1 - diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/libblockdev/libblockdev_3.1.1.bb b/sources/meta-openembedded/meta-oe/recipes-extended/libblockdev/libblockdev_3.1.1.bb index a7e7162c..a42e09d3 100644 --- a/sources/meta-openembedded/meta-oe/recipes-extended/libblockdev/libblockdev_3.1.1.bb +++ b/sources/meta-openembedded/meta-oe/recipes-extended/libblockdev/libblockdev_3.1.1.bb @@ -14,7 +14,7 @@ DEPENDS = "autoconf-archive-native glib-2.0 kmod udev libnvme" SRC_URI = "git://github.com/storaged-project/libblockdev;branch=3.1.x-devel;protocol=https \ file://0001-fix-pythondir-for-multilib-when-cross-compiling.patch \ - file://CVE-2025-6019.patch \ + file://0001-libext2fs-unused-parameters-fix.patch \ " SRCREV = "68aaff5556afe26be749c29a2b7cbd714dce3050" S = "${WORKDIR}/git" @@ -27,12 +27,12 @@ PACKAGECONFIG[lvm] = "--with-lvm, --without-lvm, multipath-tools, lvm2" PACKAGECONFIG[lvm-dbus] = "--with-lvm_dbus, --without-lvm_dbus, multipath-tools, lvm2" PACKAGECONFIG[dm] = "--with-dm, --without-dm, multipath-tools, lvm2" PACKAGECONFIG[parted] = "--with-part, --without-part, parted" -PACKAGECONFIG[fs] = "--with-fs, --without-fs, util-linux" +PACKAGECONFIG[fs] = "--with-fs, --without-fs, e2fsprogs util-linux" PACKAGECONFIG[doc] = "--with-gtk-doc, --without-gtk-doc, gtk-doc-native" PACKAGECONFIG[nvdimm] = "--with-nvdimm, --without-nvdimm, ndctl util-linux" PACKAGECONFIG[escrow] = "--with-escrow, --without-escrow, nss volume-key" PACKAGECONFIG[btrfs] = "--with-btrfs,--without-btrfs,libbytesize btrfs-tools" -PACKAGECONFIG[crypto] = "--with-crypto,--without-crypto,cryptsetup nss volume-key" +PACKAGECONFIG[crypto] = "--with-crypto,--without-crypto,cryptsetup keyutils nss volume-key" PACKAGECONFIG[mdraid] = "--with-mdraid,--without-mdraid,libbytesize" PACKAGECONFIG[mpath] = "--with-mpath,--without-mpath, multipath-tools, lvm2" PACKAGECONFIG[tools] = "--with-tools,--without-tools,libbytesize libdevmapper" diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/libconfig/libconfig_1.7.3.bb b/sources/meta-openembedded/meta-oe/recipes-extended/libconfig/libconfig_1.7.3.bb index 65092710..63825699 100644 --- a/sources/meta-openembedded/meta-oe/recipes-extended/libconfig/libconfig_1.7.3.bb +++ b/sources/meta-openembedded/meta-oe/recipes-extended/libconfig/libconfig_1.7.3.bb @@ -7,7 +7,7 @@ SECTION = "libs" LICENSE = "LGPL-2.1-only" LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=fad9b3332be894bab9bc501572864b29" -SRC_URI = "https://github.com/hyperrealm/libconfig/releases/download/v${PV}/libconfig-${PV}.tar.gz" +SRC_URI = "https://hyperrealm.github.io/libconfig/dist/libconfig-${PV}.tar.gz" UPSTREAM_CHECK_URI = "https://github.com/hyperrealm/libconfig/releases" UPSTREAM_CHECK_REGEX = "Version (?P\d+(\.\d+)+)" diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/libmodbus/libmodbus/CVE-2024-10918-01.patch b/sources/meta-openembedded/meta-oe/recipes-extended/libmodbus/libmodbus/CVE-2024-10918-01.patch deleted file mode 100644 index f50bee68..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-extended/libmodbus/libmodbus/CVE-2024-10918-01.patch +++ /dev/null @@ -1,177 +0,0 @@ -From df79a02feb253c0a9a009bcdbb21e47581315111 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?St=C3=A9phane=20Raimbault?= -Date: Fri, 18 Oct 2024 10:47:14 +0200 -Subject: [PATCH] Check length passed to modbus_reply (write_bit) - -The modbus_reply function is designed to receive arguments -from modbus_receive. This patch avoid a wrong use of memcpy if -the user chooses to inject a bad length argument. - -Thank you Nozomi Networks Labs Advisory for the report. - -CVE: CVE-2024-10918 -Upstream-Status: Backport [https://github.com/stephane/libmodbus/commit/df79a02feb253c0a9a009bcdbb21e47581315111] -Signed-off-by: Peter Marko ---- - src/modbus.c | 54 +++++++++++++++++++++++++--------------- - tests/unit-test-client.c | 9 +++++-- - tests/unit-test-server.c | 16 +++++++++--- - tests/unit-test.h.in | 1 + - 4 files changed, 55 insertions(+), 25 deletions(-) - -diff --git a/src/modbus.c b/src/modbus.c -index 5a9b867..33086ec 100644 ---- a/src/modbus.c -+++ b/src/modbus.c -@@ -897,24 +897,37 @@ int modbus_reply(modbus_t *ctx, - FALSE, - "Illegal data address 0x%0X in write_bit\n", - address); -+ break; -+ } -+ -+ /* This check is only done here to ensure using memcpy is safe. */ -+ rsp_length = compute_response_length_from_request(ctx, (uint8_t *) req); -+ if (rsp_length != req_length) { -+ /* Bad use of modbus_reply */ -+ rsp_length = response_exception(ctx, -+ &sft, -+ MODBUS_EXCEPTION_ILLEGAL_DATA_VALUE, -+ rsp, -+ FALSE, -+ "Invalid request length (%d)\n", -+ req_length); -+ break; -+ } -+ -+ int data = (req[offset + 3] << 8) + req[offset + 4]; -+ if (data == 0xFF00 || data == 0x0) { -+ mb_mapping->tab_bits[mapping_address] = data ? ON : OFF; -+ memcpy(rsp, req, rsp_length); - } else { -- int data = (req[offset + 3] << 8) + req[offset + 4]; -- -- if (data == 0xFF00 || data == 0x0) { -- mb_mapping->tab_bits[mapping_address] = data ? ON : OFF; -- memcpy(rsp, req, req_length); -- rsp_length = req_length; -- } else { -- rsp_length = response_exception( -- ctx, -- &sft, -- MODBUS_EXCEPTION_ILLEGAL_DATA_VALUE, -- rsp, -- FALSE, -- "Illegal data value 0x%0X in write_bit request at address %0X\n", -- data, -- address); -- } -+ rsp_length = response_exception( -+ ctx, -+ &sft, -+ MODBUS_EXCEPTION_ILLEGAL_DATA_VALUE, -+ rsp, -+ FALSE, -+ "Illegal data value 0x%0X in write_bit request at address %0X\n", -+ data, -+ address); - } - } break; - case MODBUS_FC_WRITE_SINGLE_REGISTER: { -@@ -1127,8 +1140,8 @@ int modbus_reply(modbus_t *ctx, - break; - } - -- /* Suppress any responses in RTU when the request was a broadcast, excepted when quirk -- * is enabled. */ -+ /* Suppress any responses in RTU when the request was a broadcast, excepted when -+ * quirk is enabled. */ - if (ctx->backend->backend_type == _MODBUS_BACKEND_TYPE_RTU && - slave == MODBUS_BROADCAST_ADDRESS && - !(ctx->quirks & MODBUS_QUIRK_REPLY_TO_BROADCAST)) { -@@ -1821,7 +1834,8 @@ int modbus_set_byte_timeout(modbus_t *ctx, uint32_t to_sec, uint32_t to_usec) - return 0; - } - --/* Get the timeout interval used by the server to wait for an indication from a client */ -+/* Get the timeout interval used by the server to wait for an indication from a client -+ */ - int modbus_get_indication_timeout(modbus_t *ctx, uint32_t *to_sec, uint32_t *to_usec) - { - if (ctx == NULL) { -diff --git a/tests/unit-test-client.c b/tests/unit-test-client.c -index a441766..50859f8 100644 ---- a/tests/unit-test-client.c -+++ b/tests/unit-test-client.c -@@ -400,11 +400,11 @@ int main(int argc, char *argv[]) - ASSERT_TRUE(rc == -1 && errno == EMBXILADD, ""); - - rc = modbus_write_bits(ctx, 0, 1, tab_rp_bits); -- printf("* modbus_write_coils (0): "); -+ printf("* modbus_write_bits (0): "); - ASSERT_TRUE(rc == -1 && errno == EMBXILADD, ""); - - rc = modbus_write_bits(ctx, UT_BITS_ADDRESS + UT_BITS_NB, UT_BITS_NB, tab_rp_bits); -- printf("* modbus_write_coils (max): "); -+ printf("* modbus_write_bits (max): "); - ASSERT_TRUE(rc == -1 && errno == EMBXILADD, ""); - - rc = modbus_write_register(ctx, 0, tab_rp_registers[0]); -@@ -500,6 +500,11 @@ int main(int argc, char *argv[]) - rc = modbus_set_slave(ctx, old_slave); - ASSERT_TRUE(rc == 0, "Uanble to restore slave value") - -+ /** BAD USE OF REPLY FUNCTION **/ -+ rc = modbus_write_bit(ctx, UT_BITS_ADDRESS_INVALID_REQUEST_LENGTH, ON); -+ printf("* modbus_write_bit (triggers invalid reply): "); -+ ASSERT_TRUE(rc == -1 && errno == EMBXILVAL, ""); -+ - /** SLAVE REPLY **/ - - printf("\nTEST SLAVE REPLY:\n"); -diff --git a/tests/unit-test-server.c b/tests/unit-test-server.c -index 561d64d..8e28124 100644 ---- a/tests/unit-test-server.c -+++ b/tests/unit-test-server.c -@@ -150,9 +150,8 @@ int main(int argc, char *argv[]) - break; - } - -- /* Special server behavior to test client */ -- if (query[header_length] == 0x03) { -- /* Read holding registers */ -+ /** Special server behavior to test client **/ -+ if (query[header_length] == MODBUS_FC_READ_HOLDING_REGISTERS) { - - if (MODBUS_GET_INT16_FROM_INT8(query, header_length + 3) == - UT_REGISTERS_NB_SPECIAL) { -@@ -204,6 +203,17 @@ int main(int argc, char *argv[]) - } - continue; - } -+ -+ } else if (query[header_length] == MODBUS_FC_WRITE_SINGLE_COIL) { -+ if (MODBUS_GET_INT16_FROM_INT8(query, header_length + 1) == -+ UT_BITS_ADDRESS_INVALID_REQUEST_LENGTH) { -+ // The valid length is lengths of header + checkum + FC + address + value -+ // (max 12) -+ rc = 34; -+ printf("Special modbus_write_bit detected. Inject a wrong rc value (%d) " -+ "in modbus_reply\n", -+ rc); -+ } - } - - rc = modbus_reply(ctx, query, rc, mb_mapping); -diff --git a/tests/unit-test.h.in b/tests/unit-test.h.in -index 5e379bb..21d09e3 100644 ---- a/tests/unit-test.h.in -+++ b/tests/unit-test.h.in -@@ -30,6 +30,7 @@ - const uint16_t UT_BITS_ADDRESS = 0x130; - const uint16_t UT_BITS_NB = 0x25; - const uint8_t UT_BITS_TAB[] = { 0xCD, 0x6B, 0xB2, 0x0E, 0x1B }; -+const uint16_t UT_BITS_ADDRESS_INVALID_REQUEST_LENGTH = UT_BITS_ADDRESS + 2; - - const uint16_t UT_INPUT_BITS_ADDRESS = 0x1C4; - const uint16_t UT_INPUT_BITS_NB = 0x16; diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/libmodbus/libmodbus/CVE-2024-10918-02.patch b/sources/meta-openembedded/meta-oe/recipes-extended/libmodbus/libmodbus/CVE-2024-10918-02.patch deleted file mode 100644 index 16b9ba72..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-extended/libmodbus/libmodbus/CVE-2024-10918-02.patch +++ /dev/null @@ -1,121 +0,0 @@ -From d8a971e04d52be16bf405b51d934a30b8aa3f2c3 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?St=C3=A9phane=20Raimbault?= -Date: Sun, 20 Oct 2024 18:02:22 +0200 -Subject: [PATCH] Check length passed to modbus_reply (write_register) - -Related to df79a02feb253c. - -CVE: CVE-2024-10918 -Upstream-Status: Backport [https://github.com/stephane/libmodbus/commit/d8a971e04d52be16bf405b51d934a30b8aa3f2c3] -Signed-off-by: Peter Marko ---- - src/modbus.c | 38 ++++++++++++++++++++++++++------------ - tests/unit-test-client.c | 6 +++++- - tests/unit-test-server.c | 13 +++++++++++-- - 3 files changed, 42 insertions(+), 15 deletions(-) - -diff --git a/src/modbus.c b/src/modbus.c -index 33086ec..fe192a7 100644 ---- a/src/modbus.c -+++ b/src/modbus.c -@@ -904,13 +904,14 @@ int modbus_reply(modbus_t *ctx, - rsp_length = compute_response_length_from_request(ctx, (uint8_t *) req); - if (rsp_length != req_length) { - /* Bad use of modbus_reply */ -- rsp_length = response_exception(ctx, -- &sft, -- MODBUS_EXCEPTION_ILLEGAL_DATA_VALUE, -- rsp, -- FALSE, -- "Invalid request length (%d)\n", -- req_length); -+ rsp_length = -+ response_exception(ctx, -+ &sft, -+ MODBUS_EXCEPTION_ILLEGAL_DATA_VALUE, -+ rsp, -+ FALSE, -+ "Invalid request length used in modbus_reply (%d)\n", -+ req_length); - break; - } - -@@ -942,13 +943,26 @@ int modbus_reply(modbus_t *ctx, - FALSE, - "Illegal data address 0x%0X in write_register\n", - address); -- } else { -- int data = (req[offset + 3] << 8) + req[offset + 4]; -+ break; -+ } - -- mb_mapping->tab_registers[mapping_address] = data; -- memcpy(rsp, req, req_length); -- rsp_length = req_length; -+ rsp_length = compute_response_length_from_request(ctx, (uint8_t *) req); -+ if (rsp_length != req_length) { -+ /* Bad use of modbus_reply */ -+ rsp_length = -+ response_exception(ctx, -+ &sft, -+ MODBUS_EXCEPTION_ILLEGAL_DATA_VALUE, -+ rsp, -+ FALSE, -+ "Invalid request length used in modbus_reply (%d)\n", -+ req_length); -+ break; - } -+ int data = (req[offset + 3] << 8) + req[offset + 4]; -+ -+ mb_mapping->tab_registers[mapping_address] = data; -+ memcpy(rsp, req, rsp_length); - } break; - case MODBUS_FC_WRITE_MULTIPLE_COILS: { - int nb = (req[offset + 3] << 8) + req[offset + 4]; -diff --git a/tests/unit-test-client.c b/tests/unit-test-client.c -index 50859f8..84d5840 100644 ---- a/tests/unit-test-client.c -+++ b/tests/unit-test-client.c -@@ -498,13 +498,17 @@ int main(int argc, char *argv[]) - - modbus_disable_quirks(ctx, MODBUS_QUIRK_MAX_SLAVE); - rc = modbus_set_slave(ctx, old_slave); -- ASSERT_TRUE(rc == 0, "Uanble to restore slave value") -+ ASSERT_TRUE(rc == 0, "Unable to restore slave value") - - /** BAD USE OF REPLY FUNCTION **/ - rc = modbus_write_bit(ctx, UT_BITS_ADDRESS_INVALID_REQUEST_LENGTH, ON); - printf("* modbus_write_bit (triggers invalid reply): "); - ASSERT_TRUE(rc == -1 && errno == EMBXILVAL, ""); - -+ rc = modbus_write_register(ctx, UT_REGISTERS_ADDRESS_SPECIAL, 0x42); -+ printf("* modbus_write_register (triggers invalid reply): "); -+ ASSERT_TRUE(rc == -1 && errno == EMBXILVAL, ""); -+ - /** SLAVE REPLY **/ - - printf("\nTEST SLAVE REPLY:\n"); -diff --git a/tests/unit-test-server.c b/tests/unit-test-server.c -index 8e28124..fc7ceb3 100644 ---- a/tests/unit-test-server.c -+++ b/tests/unit-test-server.c -@@ -210,8 +210,17 @@ int main(int argc, char *argv[]) - // The valid length is lengths of header + checkum + FC + address + value - // (max 12) - rc = 34; -- printf("Special modbus_write_bit detected. Inject a wrong rc value (%d) " -- "in modbus_reply\n", -+ printf( -+ "Special modbus_write_bit detected. Inject a wrong length value (%d) " -+ "in modbus_reply\n", -+ rc); -+ } -+ } else if (query[header_length] == MODBUS_FC_WRITE_SINGLE_REGISTER) { -+ if (MODBUS_GET_INT16_FROM_INT8(query, header_length + 1) == -+ UT_REGISTERS_ADDRESS_SPECIAL) { -+ rc = 45; -+ printf("Special modbus_write_register detected. Inject a wrong length " -+ "value (%d) in modbus_reply\n", - rc); - } - } diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/libmodbus/libmodbus/CVE-2024-10918-03.patch b/sources/meta-openembedded/meta-oe/recipes-extended/libmodbus/libmodbus/CVE-2024-10918-03.patch deleted file mode 100644 index 6ae9305b..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-extended/libmodbus/libmodbus/CVE-2024-10918-03.patch +++ /dev/null @@ -1,84 +0,0 @@ -From 7ea85f1b41f7066849f4bde7c0a3549b1e087bbf Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?St=C3=A9phane=20Raimbault?= -Date: Sun, 20 Oct 2024 18:23:26 +0200 -Subject: [PATCH] Small cleanups of unit test server - -CVE: CVE-2024-10918 -Upstream-Status: Backport [https://github.com/stephane/libmodbus/commit/7ea85f1b41f7066849f4bde7c0a3549b1e087bbf] -Signed-off-by: Peter Marko ---- - tests/unit-test-server.c | 29 ++++++++++++----------------- - 1 file changed, 12 insertions(+), 17 deletions(-) - -diff --git a/tests/unit-test-server.c b/tests/unit-test-server.c -index fc7ceb3..bb25ba4 100644 ---- a/tests/unit-test-server.c -+++ b/tests/unit-test-server.c -@@ -150,21 +150,21 @@ int main(int argc, char *argv[]) - break; - } - -+ uint8_t function = query[header_length]; -+ uint16_t address = MODBUS_GET_INT16_FROM_INT8(query, header_length + 1); -+ - /** Special server behavior to test client **/ -- if (query[header_length] == MODBUS_FC_READ_HOLDING_REGISTERS) { -- -+ if (function == MODBUS_FC_READ_HOLDING_REGISTERS) { - if (MODBUS_GET_INT16_FROM_INT8(query, header_length + 3) == - UT_REGISTERS_NB_SPECIAL) { - printf("Set an incorrect number of values\n"); - MODBUS_SET_INT16_TO_INT8( - query, header_length + 3, UT_REGISTERS_NB_SPECIAL - 1); -- } else if (MODBUS_GET_INT16_FROM_INT8(query, header_length + 1) == -- UT_REGISTERS_ADDRESS_SPECIAL) { -+ } else if (address == UT_REGISTERS_ADDRESS_SPECIAL) { - printf("Reply to this special register address by an exception\n"); - modbus_reply_exception(ctx, query, MODBUS_EXCEPTION_SLAVE_OR_SERVER_BUSY); - continue; -- } else if (MODBUS_GET_INT16_FROM_INT8(query, header_length + 1) == -- UT_REGISTERS_ADDRESS_INVALID_TID_OR_SLAVE) { -+ } else if (address == UT_REGISTERS_ADDRESS_INVALID_TID_OR_SLAVE) { - const int RAW_REQ_LENGTH = 5; - uint8_t raw_req[] = {(use_backend == RTU) ? INVALID_SERVER_ID : 0xFF, - 0x03, -@@ -175,12 +175,10 @@ int main(int argc, char *argv[]) - printf("Reply with an invalid TID or slave\n"); - modbus_send_raw_request(ctx, raw_req, RAW_REQ_LENGTH * sizeof(uint8_t)); - continue; -- } else if (MODBUS_GET_INT16_FROM_INT8(query, header_length + 1) == -- UT_REGISTERS_ADDRESS_SLEEP_500_MS) { -+ } else if (address == UT_REGISTERS_ADDRESS_SLEEP_500_MS) { - printf("Sleep 0.5 s before replying\n"); - usleep(500000); -- } else if (MODBUS_GET_INT16_FROM_INT8(query, header_length + 1) == -- UT_REGISTERS_ADDRESS_BYTE_SLEEP_5_MS) { -+ } else if (address == UT_REGISTERS_ADDRESS_BYTE_SLEEP_5_MS) { - /* Test low level only available in TCP mode */ - /* Catch the reply and send reply byte a byte */ - uint8_t req[] = "\x00\x1C\x00\x00\x00\x05\xFF\x03\x02\x00\x00"; -@@ -203,10 +201,8 @@ int main(int argc, char *argv[]) - } - continue; - } -- -- } else if (query[header_length] == MODBUS_FC_WRITE_SINGLE_COIL) { -- if (MODBUS_GET_INT16_FROM_INT8(query, header_length + 1) == -- UT_BITS_ADDRESS_INVALID_REQUEST_LENGTH) { -+ } else if (function == MODBUS_FC_WRITE_SINGLE_COIL) { -+ if (address == UT_BITS_ADDRESS_INVALID_REQUEST_LENGTH) { - // The valid length is lengths of header + checkum + FC + address + value - // (max 12) - rc = 34; -@@ -215,9 +211,8 @@ int main(int argc, char *argv[]) - "in modbus_reply\n", - rc); - } -- } else if (query[header_length] == MODBUS_FC_WRITE_SINGLE_REGISTER) { -- if (MODBUS_GET_INT16_FROM_INT8(query, header_length + 1) == -- UT_REGISTERS_ADDRESS_SPECIAL) { -+ } else if (function == MODBUS_FC_WRITE_SINGLE_REGISTER) { -+ if (address == UT_REGISTERS_ADDRESS_SPECIAL) { - rc = 45; - printf("Special modbus_write_register detected. Inject a wrong length " - "value (%d) in modbus_reply\n", diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/libmodbus/libmodbus/CVE-2024-10918-04.patch b/sources/meta-openembedded/meta-oe/recipes-extended/libmodbus/libmodbus/CVE-2024-10918-04.patch deleted file mode 100644 index 45380541..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-extended/libmodbus/libmodbus/CVE-2024-10918-04.patch +++ /dev/null @@ -1,239 +0,0 @@ -From 81bf713cf029bfa5b5da87b945c1e8817b4398f9 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?St=C3=A9phane=20Raimbault?= -Date: Mon, 21 Oct 2024 17:32:39 +0200 -Subject: [PATCH] Fix request length check in modbus_reply in RTU - -- rename internal *_prepare_response_tid to *_get_response_tid -- change signature, don't need req length anymore -- remove misleading modification of req_length -- check of req length before use in memcpy for mask write register - -Related to df79a02feb253c0a9a009bcdbb21e47581315111 - -CVE: CVE-2024-10918 -Upstream-Status: Backport [https://github.com/stephane/libmodbus/commit/81bf713cf029bfa5b5da87b945c1e8817b4398f9] -Signed-off-by: Peter Marko ---- - src/modbus-private.h | 2 +- - src/modbus-rtu.c | 5 ++-- - src/modbus-tcp.c | 6 ++-- - src/modbus.c | 71 ++++++++++++++++++++++++++++---------------- - 4 files changed, 52 insertions(+), 32 deletions(-) - -diff --git a/src/modbus-private.h b/src/modbus-private.h -index 6cd3424..ea83187 100644 ---- a/src/modbus-private.h -+++ b/src/modbus-private.h -@@ -75,7 +75,7 @@ typedef struct _modbus_backend { - int (*build_request_basis)( - modbus_t *ctx, int function, int addr, int nb, uint8_t *req); - int (*build_response_basis)(sft_t *sft, uint8_t *rsp); -- int (*prepare_response_tid)(const uint8_t *req, int *req_length); -+ int (*get_response_tid)(const uint8_t *req); - int (*send_msg_pre)(uint8_t *req, int req_length); - ssize_t (*send)(modbus_t *ctx, const uint8_t *req, int req_length); - int (*receive)(modbus_t *ctx, uint8_t *req); -diff --git a/src/modbus-rtu.c b/src/modbus-rtu.c -index b774923..8b5ee08 100644 ---- a/src/modbus-rtu.c -+++ b/src/modbus-rtu.c -@@ -129,9 +129,8 @@ static uint16_t crc16(uint8_t *buffer, uint16_t buffer_length) - return (crc_hi << 8 | crc_lo); - } - --static int _modbus_rtu_prepare_response_tid(const uint8_t *req, int *req_length) -+static int _modbus_rtu_get_response_tid(const uint8_t *req) - { -- (*req_length) -= _MODBUS_RTU_CHECKSUM_LENGTH; - /* No TID */ - return 0; - } -@@ -1187,7 +1186,7 @@ const modbus_backend_t _modbus_rtu_backend = { - _modbus_set_slave, - _modbus_rtu_build_request_basis, - _modbus_rtu_build_response_basis, -- _modbus_rtu_prepare_response_tid, -+ _modbus_rtu_get_response_tid, - _modbus_rtu_send_msg_pre, - _modbus_rtu_send, - _modbus_rtu_receive, -diff --git a/src/modbus-tcp.c b/src/modbus-tcp.c -index 733a4a9..60ac6b4 100644 ---- a/src/modbus-tcp.c -+++ b/src/modbus-tcp.c -@@ -151,7 +151,7 @@ static int _modbus_tcp_build_response_basis(sft_t *sft, uint8_t *rsp) - return _MODBUS_TCP_PRESET_RSP_LENGTH; - } - --static int _modbus_tcp_prepare_response_tid(const uint8_t *req, int *req_length) -+static int _modbus_tcp_get_response_tid(const uint8_t *req) - { - return (req[0] << 8) + req[1]; - } -@@ -812,7 +812,7 @@ const modbus_backend_t _modbus_tcp_backend = { - _modbus_set_slave, - _modbus_tcp_build_request_basis, - _modbus_tcp_build_response_basis, -- _modbus_tcp_prepare_response_tid, -+ _modbus_tcp_get_response_tid, - _modbus_tcp_send_msg_pre, - _modbus_tcp_send, - _modbus_tcp_receive, -@@ -835,7 +835,7 @@ const modbus_backend_t _modbus_tcp_pi_backend = { - _modbus_set_slave, - _modbus_tcp_build_request_basis, - _modbus_tcp_build_response_basis, -- _modbus_tcp_prepare_response_tid, -+ _modbus_tcp_get_response_tid, - _modbus_tcp_send_msg_pre, - _modbus_tcp_send, - _modbus_tcp_receive, -diff --git a/src/modbus.c b/src/modbus.c -index fe192a7..e3737bb 100644 ---- a/src/modbus.c -+++ b/src/modbus.c -@@ -125,7 +125,7 @@ int modbus_flush(modbus_t *ctx) - return rc; - } - --/* Computes the length of the expected response */ -+/* Computes the length of the expected response including checksum */ - static unsigned int compute_response_length_from_request(modbus_t *ctx, uint8_t *req) - { - int length; -@@ -386,8 +386,7 @@ int _modbus_receive_msg(modbus_t *ctx, uint8_t *msg, msg_type_t msg_type) - length_to_read = ctx->backend->header_length + 1; - - if (msg_type == MSG_INDICATION) { -- /* Wait for a message, we don't know when the message will be -- * received */ -+ /* Wait for a message, we don't know when the message will be received */ - if (ctx->indication_timeout.tv_sec == 0 && ctx->indication_timeout.tv_usec == 0) { - /* By default, the indication timeout isn't set */ - p_tv = NULL; -@@ -799,7 +798,7 @@ int modbus_reply(modbus_t *ctx, - - sft.slave = slave; - sft.function = function; -- sft.t_id = ctx->backend->prepare_response_tid(req, &req_length); -+ sft.t_id = ctx->backend->get_response_tid(req); - - /* Data are flushed on illegal number of values errors. */ - switch (function) { -@@ -895,7 +894,7 @@ int modbus_reply(modbus_t *ctx, - MODBUS_EXCEPTION_ILLEGAL_DATA_ADDRESS, - rsp, - FALSE, -- "Illegal data address 0x%0X in write_bit\n", -+ "Illegal data address 0x%0X in write bit\n", - address); - break; - } -@@ -904,20 +903,26 @@ int modbus_reply(modbus_t *ctx, - rsp_length = compute_response_length_from_request(ctx, (uint8_t *) req); - if (rsp_length != req_length) { - /* Bad use of modbus_reply */ -- rsp_length = -- response_exception(ctx, -- &sft, -- MODBUS_EXCEPTION_ILLEGAL_DATA_VALUE, -- rsp, -- FALSE, -- "Invalid request length used in modbus_reply (%d)\n", -- req_length); -+ rsp_length = response_exception( -+ ctx, -+ &sft, -+ MODBUS_EXCEPTION_ILLEGAL_DATA_VALUE, -+ rsp, -+ FALSE, -+ "Invalid request length in modbus_reply to write bit (%d)\n", -+ req_length); - break; - } - -+ /* Don't copy the CRC, if any, it will be computed later (even if identical to the -+ * request) */ -+ rsp_length -= ctx->backend->checksum_length; -+ - int data = (req[offset + 3] << 8) + req[offset + 4]; - if (data == 0xFF00 || data == 0x0) { -+ /* Apply the change to mapping */ - mb_mapping->tab_bits[mapping_address] = data ? ON : OFF; -+ /* Prepare response */ - memcpy(rsp, req, rsp_length); - } else { - rsp_length = response_exception( -@@ -949,19 +954,21 @@ int modbus_reply(modbus_t *ctx, - rsp_length = compute_response_length_from_request(ctx, (uint8_t *) req); - if (rsp_length != req_length) { - /* Bad use of modbus_reply */ -- rsp_length = -- response_exception(ctx, -- &sft, -- MODBUS_EXCEPTION_ILLEGAL_DATA_VALUE, -- rsp, -- FALSE, -- "Invalid request length used in modbus_reply (%d)\n", -- req_length); -+ rsp_length = response_exception( -+ ctx, -+ &sft, -+ MODBUS_EXCEPTION_ILLEGAL_DATA_VALUE, -+ rsp, -+ FALSE, -+ "Invalid request length in modbus_reply to write register (%d)\n", -+ req_length); - break; - } - int data = (req[offset + 3] << 8) + req[offset + 4]; - - mb_mapping->tab_registers[mapping_address] = data; -+ -+ rsp_length -= ctx->backend->checksum_length; - memcpy(rsp, req, rsp_length); - } break; - case MODBUS_FC_WRITE_MULTIPLE_COILS: { -@@ -1082,8 +1089,23 @@ int modbus_reply(modbus_t *ctx, - - data = (data & and) | (or &(~and)); - mb_mapping->tab_registers[mapping_address] = data; -- memcpy(rsp, req, req_length); -- rsp_length = req_length; -+ -+ rsp_length = compute_response_length_from_request(ctx, (uint8_t *) req); -+ if (rsp_length != req_length) { -+ /* Bad use of modbus_reply */ -+ rsp_length = response_exception(ctx, -+ &sft, -+ MODBUS_EXCEPTION_ILLEGAL_DATA_VALUE, -+ rsp, -+ FALSE, -+ "Invalid request length in modbus_reply " -+ "to mask write register (%d)\n", -+ req_length); -+ break; -+ } -+ -+ rsp_length -= ctx->backend->checksum_length; -+ memcpy(rsp, req, rsp_length); - } - } break; - case MODBUS_FC_WRITE_AND_READ_REGISTERS: { -@@ -1171,7 +1193,6 @@ int modbus_reply_exception(modbus_t *ctx, const uint8_t *req, unsigned int excep - int function; - uint8_t rsp[MAX_MESSAGE_LENGTH]; - int rsp_length; -- int dummy_length = 99; - sft_t sft; - - if (ctx == NULL) { -@@ -1185,7 +1206,7 @@ int modbus_reply_exception(modbus_t *ctx, const uint8_t *req, unsigned int excep - - sft.slave = slave; - sft.function = function + 0x80; -- sft.t_id = ctx->backend->prepare_response_tid(req, &dummy_length); -+ sft.t_id = ctx->backend->get_response_tid(req); - rsp_length = ctx->backend->build_response_basis(&sft, rsp); - - /* Positive exception code */ diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/libmodbus/libmodbus_3.1.10.bb b/sources/meta-openembedded/meta-oe/recipes-extended/libmodbus/libmodbus_3.1.10.bb index 853abced..9e17f916 100644 --- a/sources/meta-openembedded/meta-oe/recipes-extended/libmodbus/libmodbus_3.1.10.bb +++ b/sources/meta-openembedded/meta-oe/recipes-extended/libmodbus/libmodbus_3.1.10.bb @@ -6,13 +6,7 @@ SECTION = "libs" LICENSE = "LGPL-2.1-or-later" LIC_FILES_CHKSUM = "file://COPYING.LESSER;md5=4fbd65380cdd255951079008b364516c" -SRC_URI = " \ - git://github.com/stephane/libmodbus;branch=master;protocol=https \ - file://CVE-2024-10918-01.patch \ - file://CVE-2024-10918-02.patch \ - file://CVE-2024-10918-03.patch \ - file://CVE-2024-10918-04.patch \ -" +SRC_URI = "git://github.com/stephane/libmodbus;branch=master;protocol=https" SRCREV = "2cbafa3113e276c3697d297f68e88d112b53174d" S = "${WORKDIR}/git" @@ -21,6 +15,3 @@ inherit autotools pkgconfig PACKAGECONFIG ??= "" PACKAGECONFIG[test] = "--enable-tests,--disable-tests,," - -CVE_STATUS[CVE-2023-26793] = "disputed: The buffer overflow concerns unit-test-client and it's intentional." -CVE_STATUS[CVE-2024-34244] = "disputed: This issue is invalid and only found a bug in the fuzzing driver" diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/libstatgrab/libstatgrab_0.92.1.bb b/sources/meta-openembedded/meta-oe/recipes-extended/libstatgrab/libstatgrab_0.92.1.bb index 7498a570..85d3853f 100644 --- a/sources/meta-openembedded/meta-oe/recipes-extended/libstatgrab/libstatgrab_0.92.1.bb +++ b/sources/meta-openembedded/meta-oe/recipes-extended/libstatgrab/libstatgrab_0.92.1.bb @@ -14,6 +14,7 @@ SRC_URI = "https://github.com/libstatgrab/libstatgrab/releases/download/LIBSTATG SRC_URI[sha256sum] = "5688aa4a685547d7174a8a373ea9d8ee927e766e3cc302bdee34523c2c5d6c11" UPSTREAM_CHECK_URI = "https://github.com/${BPN}/${BPN}/releases" +UPSTREAM_CHECK_REGEX = "(?P\d+(\_\d+)+)" # Perl5 is for tests only EXTRA_OECONF = "--without-perl5 --with-mnttab=/proc/mounts" diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/libwmf/libwmf_0.2.8.4.bb b/sources/meta-openembedded/meta-oe/recipes-extended/libwmf/libwmf_0.2.8.4.bb index 93b58057..58bfd1f2 100644 --- a/sources/meta-openembedded/meta-oe/recipes-extended/libwmf/libwmf_0.2.8.4.bb +++ b/sources/meta-openembedded/meta-oe/recipes-extended/libwmf/libwmf_0.2.8.4.bb @@ -24,6 +24,13 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/wvware/${BPN}/${PV}/${BPN}-${PV}.tar.gz;name=ta SRC_URI[tarball.md5sum] = "d1177739bf1ceb07f57421f0cee191e0" SRC_URI[tarball.sha256sum] = "5b345c69220545d003ad52bfd035d5d6f4f075e65204114a9e875e84895a7cf8" +UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/wvware/files/libwmf/" +UPSTREAM_CHECK_REGEX = "${BPN}/(?P\d+(\.\d+)+)" + +do_install:append() { + sed -i -e 's@${RECIPE_SYSROOT}@@g' ${D}${bindir}/libwmf-config +} + FILES:${PN}-dbg += "${libdir}/gtk-2.0/2.10.0/loaders/.debug" FILES:${PN}-dev += "${libdir}/gtk-2.0/2.10.0/loaders/*.la" FILES:${PN}-staticdev += "${libdir}/gtk-2.0/2.10.0/loaders/*.a" diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/libx86-1/libx86-1_1.1.bb b/sources/meta-openembedded/meta-oe/recipes-extended/libx86-1/libx86-1_1.1.bb index f11c52dd..ae2714d7 100644 --- a/sources/meta-openembedded/meta-oe/recipes-extended/libx86-1/libx86-1_1.1.bb +++ b/sources/meta-openembedded/meta-oe/recipes-extended/libx86-1/libx86-1_1.1.bb @@ -16,6 +16,8 @@ SRC_URI = "https://mirrors.slackware.com/slackware/slackware-current/source/ap/l " SRC_URI[sha256sum] = "5bf13104cb327472b5cb65643352a9138646becacc06763088d83001d832d048" +UPSTREAM_CHECK_URI = "https://mirrors.slackware.com/slackware/slackware-current/source/ap/libx86/" + BPN = "libx86" COMPATIBLE_HOST = '(x86_64|i.86).*-linux' diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/linuxconsole/linuxconsole_1.7.1.bb b/sources/meta-openembedded/meta-oe/recipes-extended/linuxconsole/linuxconsole_1.7.1.bb index 5716817e..a2a420ce 100644 --- a/sources/meta-openembedded/meta-oe/recipes-extended/linuxconsole/linuxconsole_1.7.1.bb +++ b/sources/meta-openembedded/meta-oe/recipes-extended/linuxconsole/linuxconsole_1.7.1.bb @@ -50,11 +50,11 @@ do_compile() { do_install() { oe_runmake install - install -Dm 0644 ${WORKDIR}/51-these-are-not-joysticks-rm.rules ${D}${nonarch_base_libdir}/udev/rules.d/51-these-are-not-joysticks-rm.rules - install -Dm 0644 ${WORKDIR}/60-joystick.rules ${D}${nonarch_base_libdir}/udev/rules.d/60-joystick.rules + install -Dm 0644 ${UNPACKDIR}/51-these-are-not-joysticks-rm.rules ${D}${nonarch_base_libdir}/udev/rules.d/51-these-are-not-joysticks-rm.rules + install -Dm 0644 ${UNPACKDIR}/60-joystick.rules ${D}${nonarch_base_libdir}/udev/rules.d/60-joystick.rules - install -Dm 0644 ${WORKDIR}/inputattach.service ${D}${systemd_system_unitdir}/inputattach.service - install -Dm 0755 ${WORKDIR}/inputattachctl ${D}${bindir}/inputattachctl + install -Dm 0644 ${UNPACKDIR}/inputattach.service ${D}${systemd_system_unitdir}/inputattach.service + install -Dm 0755 ${UNPACKDIR}/inputattachctl ${D}${bindir}/inputattachctl } PACKAGES += "inputattach joystick-jscal joystick" diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/logwatch/logwatch_7.10.bb b/sources/meta-openembedded/meta-oe/recipes-extended/logwatch/logwatch_7.10.bb deleted file mode 100644 index 2efaa2b3..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-extended/logwatch/logwatch_7.10.bb +++ /dev/null @@ -1,57 +0,0 @@ -SUMMARY = "A log file analysis program" -DESCRIPTION = "\ -Logwatch is a customizable, pluggable log-monitoring system. It will go \ -through your logs for a given period of time and make a report in the areas \ -that you wish with the detail that you wish. Easy to use - works right out of \ -the package on many systems.\ -" -SECTION = "devel" -HOMEPAGE = "http://www.logwatch.org/" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=ba882fa9b4b6b217a51780be3f4db9c8" -RDEPENDS:${PN} = "perl" - -SRC_URI = "http://jaist.dl.sourceforge.net/project/${BPN}/${BP}/${BP}.tar.gz" -SRC_URI[sha256sum] = "329df0991b879764ed7e50a869de5b6bfa70d241eb254397a5659d1ff5f2588f" - -do_install() { - install -m 0755 -d ${D}${sysconfdir}/logwatch/scripts - install -m 0755 -d ${D}${datadir}/logwatch/dist.conf/logfiles - install -m 0755 -d ${D}${datadir}/logwatch/dist.conf/services - install -m 0755 -d ${D}${localstatedir}/cache/logwatch - cp -r -f conf/ ${D}${datadir}/logwatch/default.conf - cp -r -f scripts/ ${D}${datadir}/logwatch/scripts - cp -r -f lib ${D}${datadir}/logwatch/lib - chown -R root:root ${D}${datadir}/logwatch - - install -m 0755 -d ${D}${mandir}/man1 - install -m 0755 -d ${D}${mandir}/man5 - install -m 0755 -d ${D}${mandir}/man8 - install -m 0644 amavis-logwatch.1 ${D}${mandir}/man1 - install -m 0644 postfix-logwatch.1 ${D}${mandir}/man1 - install -m 0644 ignore.conf.5 ${D}${mandir}/man5 - install -m 0644 override.conf.5 ${D}${mandir}/man5 - install -m 0644 logwatch.conf.5 ${D}${mandir}/man5 - install -m 0644 logwatch.8 ${D}${mandir}/man8 - - install -m 0755 -d ${D}${sysconfdir}/cron.daily - install -m 0755 -d ${D}${sbindir} - ln -sf ../..${datadir}/logwatch/scripts/logwatch.pl ${D}${sbindir}/logwatch - cat > ${D}${sysconfdir}/cron.daily/0logwatch < ${D}${sysconfdir}/logwatch/conf/logwatch.conf - echo "###### REGULAR EXPRESSIONS IN THIS FILE WILL BE TRIMMED FROM REPORT OUTPUT #####" > ${D}${sysconfdir}/logwatch/conf/ignore.conf - echo "# Configuration overrides for specific logfiles/services may be placed here." > ${D}${sysconfdir}/logwatch/conf/override.conf -} diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/logwatch/logwatch_7.11.bb b/sources/meta-openembedded/meta-oe/recipes-extended/logwatch/logwatch_7.11.bb new file mode 100644 index 00000000..89012f88 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-extended/logwatch/logwatch_7.11.bb @@ -0,0 +1,57 @@ +SUMMARY = "A log file analysis program" +DESCRIPTION = "\ +Logwatch is a customizable, pluggable log-monitoring system. It will go \ +through your logs for a given period of time and make a report in the areas \ +that you wish with the detail that you wish. Easy to use - works right out of \ +the package on many systems.\ +" +SECTION = "devel" +HOMEPAGE = "http://www.logwatch.org/" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ba882fa9b4b6b217a51780be3f4db9c8" +RDEPENDS:${PN} = "perl" + +SRC_URI = "http://jaist.dl.sourceforge.net/project/${BPN}/${BP}/${BP}.tar.gz" +SRC_URI[sha256sum] = "5eb42d983a9667003368b572149fce788c0d7e13daaf1f28ad1bf3a140b865cf" + +do_install() { + install -m 0755 -d ${D}${sysconfdir}/logwatch/scripts + install -m 0755 -d ${D}${datadir}/logwatch/dist.conf/logfiles + install -m 0755 -d ${D}${datadir}/logwatch/dist.conf/services + install -m 0755 -d ${D}${localstatedir}/cache/logwatch + cp -r -f conf/ ${D}${datadir}/logwatch/default.conf + cp -r -f scripts/ ${D}${datadir}/logwatch/scripts + cp -r -f lib ${D}${datadir}/logwatch/lib + chown -R root:root ${D}${datadir}/logwatch + + install -m 0755 -d ${D}${mandir}/man1 + install -m 0755 -d ${D}${mandir}/man5 + install -m 0755 -d ${D}${mandir}/man8 + install -m 0644 amavis-logwatch.1 ${D}${mandir}/man1 + install -m 0644 postfix-logwatch.1 ${D}${mandir}/man1 + install -m 0644 ignore.conf.5 ${D}${mandir}/man5 + install -m 0644 override.conf.5 ${D}${mandir}/man5 + install -m 0644 logwatch.conf.5 ${D}${mandir}/man5 + install -m 0644 logwatch.8 ${D}${mandir}/man8 + + install -m 0755 -d ${D}${sysconfdir}/cron.daily + install -m 0755 -d ${D}${sbindir} + ln -sf ../..${datadir}/logwatch/scripts/logwatch.pl ${D}${sbindir}/logwatch + cat > ${D}${sysconfdir}/cron.daily/0logwatch < ${D}${sysconfdir}/logwatch/conf/logwatch.conf + echo "###### REGULAR EXPRESSIONS IN THIS FILE WILL BE TRIMMED FROM REPORT OUTPUT #####" > ${D}${sysconfdir}/logwatch/conf/ignore.conf + echo "# Configuration overrides for specific logfiles/services may be placed here." > ${D}${sysconfdir}/logwatch/conf/override.conf +} diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/lprng/lprng_3.8.C.bb b/sources/meta-openembedded/meta-oe/recipes-extended/lprng/lprng_3.8.C.bb index cd9d9e8a..c1a8aadf 100644 --- a/sources/meta-openembedded/meta-oe/recipes-extended/lprng/lprng_3.8.C.bb +++ b/sources/meta-openembedded/meta-oe/recipes-extended/lprng/lprng_3.8.C.bb @@ -9,6 +9,9 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \ SRC_URI[md5sum] = "5901bed95e61d2bea3ba3056056af432" SRC_URI[sha256sum] = "694a1747a96385b89e93f43343bf35cee5c8c73353a83814106911c99f09de10" +UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/lprng/files/lprng/" +UPSTREAM_CHECK_REGEX = "(?P\d+(\.\d+)+)\.tar" + inherit autotools gettext EXTRA_OECONF = "--disable-ssl --disable-kerberos --enable-force_localhost \ diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/magic-enum/magic-enum/run-ptest b/sources/meta-openembedded/meta-oe/recipes-extended/magic-enum/magic-enum/run-ptest new file mode 100644 index 00000000..865da9f6 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-extended/magic-enum/magic-enum/run-ptest @@ -0,0 +1,27 @@ +#!/bin/sh + +# SPDX-FileCopyrightText: 2024 Bosch Sicherheitssysteme GmbH +# +# SPDX-License-Identifier: MIT + +fail_count=0 +all_count=0 + +for test_suite in tests/test_* +do + if "./$test_suite" + then + echo "PASS: $test_suite" + else + echo "FAIL: $test_suite" + fail_count=$((fail_count + 1)) + fi + all_count=$((all_count + 1)) +done + +if [ $fail_count -eq 0 ] +then + echo "PASS: All $all_count tests passed" +else + echo "FAIL: $fail_count of $all_count tests failed" +fi diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/magic-enum/magic-enum_0.9.6.bb b/sources/meta-openembedded/meta-oe/recipes-extended/magic-enum/magic-enum_0.9.6.bb new file mode 100644 index 00000000..01a134a5 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-extended/magic-enum/magic-enum_0.9.6.bb @@ -0,0 +1,44 @@ +# SPDX-FileCopyrightText: 2024 Bosch Sicherheitssysteme GmbH +# +# SPDX-License-Identifier: MIT + +SUMMARY = "Static reflection for enums" +DESCRIPTION = "Header-only C++17 library provides static reflection for enums, works \ +with any enum type without any macro or boilerplate code." +BUGTRACKER = "https://github.com/Neargye/magic_enum/issues" +HOMEPAGE = "https://github.com/Neargye/magic_enum" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=7e7717cf723eb72f57e80fdb651cb318" + +SRC_URI = " \ + git://github.com/Neargye/magic_enum.git;protocol=https;branch=master \ + file://run-ptest \ +" + +SRCREV = "dd6a39d0ba1852cf06907e0f0573a2a10d23c2ad" +S = "${WORKDIR}/git" + +inherit cmake ptest + +EXTRA_OECMAKE = "\ + -DMAGIC_ENUM_OPT_BUILD_EXAMPLES=OFF \ +" + +do_install_ptest () { + install -d ${D}${PTEST_PATH}/tests + install -m 0755 ${B}/test/test_* ${D}${PTEST_PATH}/tests +} + +# Add catkin and colcon (ROS build system) support +FILES:${PN}-dev += "\ + ${datadir}/magic_enum/package.xml \ +" + +# Header-only library +# ${PN} is empty so we need to tweak -dev and -dbg package dependencies +RDEPENDS:${PN}-dev = "" +RDEPENDS:${PN}-ptest = "" +RRECOMMENDS:${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})" + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/minifi-cpp/files/0001-libminifi-Rename-mutex_-to-mtx_-member-of-Concurrent.patch b/sources/meta-openembedded/meta-oe/recipes-extended/minifi-cpp/files/0001-libminifi-Rename-mutex_-to-mtx_-member-of-Concurrent.patch new file mode 100644 index 00000000..a09a17bf --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-extended/minifi-cpp/files/0001-libminifi-Rename-mutex_-to-mtx_-member-of-Concurrent.patch @@ -0,0 +1,37 @@ +From cd2b5362fe2e63dff3666ce72da27979fe06a519 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 28 May 2024 22:24:52 -0700 +Subject: [PATCH] libminifi: Rename mutex_ to mtx_ member of ConcurrentQueue + +Fixes +libminifi/include/utils/MinifiConcurrentQueue.h:48:75: error: no member named 'mutex_' in 'ConcurrentQueue'; did you mean 'mtx_'? +| 48 | : ConcurrentQueue(std::move(other), std::lock_guard(other.mutex_)) {} +| | ^~~~~~ +| | mtx_ +| libminifi/include/utils/MinifiConcurrentQueue.h:140:22: note: 'mtx_' declared here +| 140 | mutable std::mutex mtx_; +| | ^ +| 1 error generated. + +Upstream-Status: Submitted [https://github.com/apache/nifi-minifi-cpp/pull/1803] +Signed-off-by: Khem Raj +--- + libminifi/include/utils/MinifiConcurrentQueue.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libminifi/include/utils/MinifiConcurrentQueue.h b/libminifi/include/utils/MinifiConcurrentQueue.h +index 8abc0ec93..1db58080b 100644 +--- a/libminifi/include/utils/MinifiConcurrentQueue.h ++++ b/libminifi/include/utils/MinifiConcurrentQueue.h +@@ -45,7 +45,7 @@ class ConcurrentQueue { + ConcurrentQueue(const ConcurrentQueue& other) = delete; + ConcurrentQueue& operator=(const ConcurrentQueue& other) = delete; + ConcurrentQueue(ConcurrentQueue&& other) +- : ConcurrentQueue(std::move(other), std::lock_guard(other.mutex_)) {} ++ : ConcurrentQueue(std::move(other), std::lock_guard(other.mtx_)) {} + + ConcurrentQueue& operator=(ConcurrentQueue&& other) { + if (this != &other) { +-- +2.45.1 + diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/minifi-cpp/minifi-cpp_0.15.0.bb b/sources/meta-openembedded/meta-oe/recipes-extended/minifi-cpp/minifi-cpp_0.15.0.bb index beb247c2..fca8d9e7 100644 --- a/sources/meta-openembedded/meta-oe/recipes-extended/minifi-cpp/minifi-cpp_0.15.0.bb +++ b/sources/meta-openembedded/meta-oe/recipes-extended/minifi-cpp/minifi-cpp_0.15.0.bb @@ -27,6 +27,7 @@ SRC_URI = "git://github.com/apache/nifi-minifi-cpp.git;protocol=https;branch=mai file://0006-OsUtils.h-add-missing-header-cstdint-for-int64_t.patch \ file://0007-CMakeLists.txt-do-not-use-ccache.patch \ file://0008-libsodium-aarch64_crypto.patch \ + file://0001-libminifi-Rename-mutex_-to-mtx_-member-of-Concurrent.patch \ file://systemd-volatile.conf \ file://sysvinit-volatile.conf \ " @@ -47,7 +48,7 @@ SRCREV_FORMAT .= "_expected-lite_range-v3_magic-enum_cxxopts_gsl-lite_date_asio_ SRC_URI[ossp-uuid.sha256sum] = "11a615225baa5f8bb686824423f50e4427acd3f70d394765bdff32801f0fd5b0" SRC_URI[libsodium.sha256sum] = "018d79fe0a045cca07331d37bd0cb57b2e838c51bc48fd837a1472e50068bbea" -S = "${WORKDIR}/git" +S = "${UNPACKDIR}/git" inherit pkgconfig cmake systemd @@ -55,6 +56,8 @@ DEPENDS = "virtual/crypt bison-native flex-native flex openssl curl zlib xz bzip OECMAKE_FIND_ROOT_PATH_MODE_PROGRAM = "BOTH" +LDFLAGS:append:riscv32 = " -latomic" + EXTRA_OECMAKE = " \ -DCMAKE_BUILD_TYPE=Release \ -DHOST_SYS=${HOST_SYS} -DBUILD_SYS=${BUILD_SYS} \ @@ -162,7 +165,7 @@ do_install() { if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then install -m 755 -d ${D}${sysconfdir}/tmpfiles.d - install -m 644 ${WORKDIR}/systemd-volatile.conf ${D}${sysconfdir}/tmpfiles.d/minifi.conf + install -m 644 ${UNPACKDIR}/systemd-volatile.conf ${D}${sysconfdir}/tmpfiles.d/minifi.conf sed -i "s|@MINIFI_LOG@|${MINIFI_LOG}|g" ${D}${sysconfdir}/tmpfiles.d/minifi.conf install -m 755 -d ${D}${systemd_system_unitdir} @@ -174,7 +177,7 @@ do_install() { if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then install -d ${D}${sysconfdir}/default/volatiles - install -m 0644 ${WORKDIR}/sysvinit-volatile.conf ${D}${sysconfdir}/default/volatiles/99_minifi + install -m 0644 ${UNPACKDIR}/sysvinit-volatile.conf ${D}${sysconfdir}/default/volatiles/99_minifi sed -i "s|@MINIFI_LOG@|${MINIFI_LOG}|g" ${D}${sysconfdir}/default/volatiles/99_minifi fi diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs-115/1849070.patch b/sources/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs-115/1849070.patch new file mode 100644 index 00000000..c19a3269 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs-115/1849070.patch @@ -0,0 +1,36 @@ +Bug 1849070 - Avoid using char_traits. r=spidermonkey-reviewers,anba + +It is not guaranteed to exist by the standard, and is actively being +removed from libc++ in LLVM 18. + +Differential Revision: https://phabricator.services.mozilla.com/D186421 + +Upstream-Status: Backport [https://hg.mozilla.org/mozilla-central/rev/68ff4d3f7338248b4d67cf03aade5a73f8d396b2] +Signed-off-by: Khem Raj + +--- a/js/src/builtin/intl/Locale.cpp ++++ b/js/src/builtin/intl/Locale.cpp +@@ -802,8 +802,10 @@ static inline auto FindUnicodeExtensionT + UnicodeKey key) { + JS::AutoCheckCannotGC nogc; + return unicodeExtension->hasLatin1Chars() +- ? FindUnicodeExtensionType(unicodeExtension->latin1Chars(nogc), +- unicodeExtension->length(), key) ++ ? FindUnicodeExtensionType( ++ reinterpret_cast( ++ unicodeExtension->latin1Chars(nogc)), ++ unicodeExtension->length(), key) + : FindUnicodeExtensionType(unicodeExtension->twoByteChars(nogc), + unicodeExtension->length(), key); + } +@@ -920,7 +922,9 @@ static BaseNamePartsResult BaseNameParts + static inline auto BaseNameParts(JSLinearString* baseName) { + JS::AutoCheckCannotGC nogc; + return baseName->hasLatin1Chars() +- ? BaseNameParts(baseName->latin1Chars(nogc), baseName->length()) ++ ? BaseNameParts( ++ reinterpret_cast(baseName->latin1Chars(nogc)), ++ baseName->length()) + : BaseNameParts(baseName->twoByteChars(nogc), baseName->length()); + } + diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs-115/1894423.patch b/sources/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs-115/1894423.patch new file mode 100644 index 00000000..93e0f0f4 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs-115/1894423.patch @@ -0,0 +1,30 @@ +Bug 1894423 - Remove unused ExclusiveData move constructor. r=spidermonkey-reviewers,jonco + +Because the constructor is actually not used, the compiler used to not +complain about it being broken. Recent changes on clang trunk made it +catch this problem without the constructor being used. + +As Mutex doesn't have a move constructor, it's also not only a matter of +adding the missing underscore to lock. + +As the constructor is never used, just remove it. + +Differential Revision: https://phabricator.services.mozilla.com/D209108 + +Upstream-Status: Backport [https://hg.mozilla.org/mozilla-central/rev/223087fdc29f] +Signed-off-by: Khem Raj + +--- a/js/src/threading/ExclusiveData.h ++++ b/js/src/threading/ExclusiveData.h +@@ -109,11 +109,6 @@ class ExclusiveData { + explicit ExclusiveData(const MutexId& id, Args&&... args) + : lock_(id), value_(std::forward(args)...) {} + +- ExclusiveData(ExclusiveData&& rhs) +- : lock_(std::move(rhs.lock)), value_(std::move(rhs.value_)) { +- MOZ_ASSERT(&rhs != this, "self-move disallowed!"); +- } +- + ExclusiveData& operator=(ExclusiveData&& rhs) { + this->~ExclusiveData(); + new (mozilla::KnownNotNull, this) ExclusiveData(std::move(rhs)); diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs-115_115.11.0.bb b/sources/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs-115_115.11.0.bb new file mode 100644 index 00000000..f25c5a8f --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs-115_115.11.0.bb @@ -0,0 +1,105 @@ +SUMMARY = "SpiderMonkey is Mozilla's JavaScript engine written in C/C++" +HOMEPAGE = "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey" +LICENSE = "MPL-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=dc9b6ecd19a14a54a628edaaf23733bf" + +SRC_URI = "https://archive.mozilla.org/pub/firefox/releases/${PV}esr/source/firefox-${PV}esr.source.tar.xz \ + file://0001-Cargo.toml-do-not-abort-on-panic.patch \ + file://0002-moz.configure-do-not-look-for-llvm-objdump.patch \ + file://0003-rust.configure-do-not-try-to-find-a-suitable-upstrea.patch \ + file://0004-use-asm-sgidefs.h.patch \ + file://fix-musl-build.patch \ + file://0001-build-do-not-use-autoconf-s-config.sub-to-canonicali.patch \ + file://riscv32.patch \ + file://0001-util.configure-fix-one-occasionally-reproduced-confi.patch \ + file://0001-rewrite-cargo-host-linker-in-python3.patch \ + file://musl-disable-stackwalk.patch \ + file://0001-add-arm-to-list-of-mozinline.patch \ + file://armv5.patch \ + file://1849070.patch \ + file://1894423.patch \ + " +SRC_URI[sha256sum] = "16be46f16a356a2b8bd3541805a24c8a2acf6f077cf8a65859689685c26025e0" + +UPSTREAM_CHECK_URI = "https://tracker.debian.org/pkg/mozjs115" +UPSTREAM_CHECK_REGEX = "(?P\d+(\.\d+)+)" + +S = "${WORKDIR}/firefox-${PV}" + +inherit pkgconfig perlnative python3native rust + +DEPENDS += "zlib cargo-native python3 icu" +DEPENDS:remove:mipsarch = "icu" +DEPENDS:remove:powerpc:toolchain-clang = "icu" + +B = "${WORKDIR}/build" + +export PYTHONPATH = "${S}/build:\ +${S}/third_party/python/PyYAML/lib3:\ +${S}/testing/mozbase/mozfile:\ +${S}/python/mozboot:\ +${S}/third_party/python/distro:\ +${S}/testing/mozbase/mozinfo:\ +${S}/config:\ +${S}/testing/mozbase/manifestparser:\ +${S}/third_party/python/pytoml:\ +${S}/testing/mozbase/mozprocess:\ +${S}/third_party/python/six:\ +${S}/python/mozbuild:\ +${S}/python/mozbuild/mozbuild:\ +${S}/python/mach:\ +${S}/third_party/python/jsmin:\ +${S}/python/mozversioncontrol" + +export HOST_CC = "${BUILD_CC}" +export HOST_CXX = "${BUILD_CXX}" +export HOST_CFLAGS = "${BUILD_CFLAGS}" +export HOST_CPPFLAGS = "${BUILD_CPPFLAGS}" +export HOST_CXXFLAGS = "${BUILD_CXXFLAGS}" + +export AS = "${CC}" + +export RUSTFLAGS + +JIT ?= "" +JIT:mipsarch = "--disable-jit" +ICU ?= "--with-system-icu" +ICU:mipsarch = "" +ICU:powerpc:toolchain-clang = "" + +LDFLAGS:append:riscv32 = " -latomic" + +do_configure() { + cd ${B} + python3 ${S}/configure.py \ + --enable-project=js \ + --target=${RUST_HOST_SYS} \ + --host=${BUILD_SYS} \ + --prefix=${prefix} \ + --libdir=${libdir} \ + --disable-jemalloc \ + --disable-strip \ + ${JIT} \ + ${ICU} +} +do_configure[cleandirs] += "${B}" + +do_install() { + oe_runmake 'DESTDIR=${D}' install +} + +inherit multilib_script multilib_header + +MAJ_VER = "${@oe.utils.trim_version("${PV}", 1)}" +MULTILIB_SCRIPTS += "${PN}-dev:${bindir}/js${MAJ_VER}-config" + +do_install:append() { + oe_multilib_header mozjs-${MAJ_VER}/js-config.h + sed -e 's@${STAGING_DIR_HOST}@@g' \ + -i ${D}${bindir}/js${MAJ_VER}-config + rm -f ${D}${libdir}/libjs_static.ajs +} + +PACKAGE_DEBUG_SPLIT_STYLE = "debug-without-src" +PACKAGES =+ "lib${BPN}" +FILES:lib${BPN} += "${libdir}/lib*" diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs-115_115.8.0.bb b/sources/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs-115_115.8.0.bb deleted file mode 100644 index 1269795d..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs-115_115.8.0.bb +++ /dev/null @@ -1,98 +0,0 @@ -SUMMARY = "SpiderMonkey is Mozilla's JavaScript engine written in C/C++" -HOMEPAGE = "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey" -LICENSE = "MPL-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=dc9b6ecd19a14a54a628edaaf23733bf" - -SRC_URI = "https://archive.mozilla.org/pub/firefox/releases/${PV}esr/source/firefox-${PV}esr.source.tar.xz \ - file://0001-Cargo.toml-do-not-abort-on-panic.patch \ - file://0002-moz.configure-do-not-look-for-llvm-objdump.patch \ - file://0003-rust.configure-do-not-try-to-find-a-suitable-upstrea.patch \ - file://0004-use-asm-sgidefs.h.patch \ - file://fix-musl-build.patch \ - file://0001-build-do-not-use-autoconf-s-config.sub-to-canonicali.patch \ - file://riscv32.patch \ - file://0001-util.configure-fix-one-occasionally-reproduced-confi.patch \ - file://0001-rewrite-cargo-host-linker-in-python3.patch \ - file://musl-disable-stackwalk.patch \ - file://0001-add-arm-to-list-of-mozinline.patch \ - file://armv5.patch \ - " -SRC_URI[sha256sum] = "af8086f23efc8492d286671f6035b1a915de6f4ed5c7897e40be0e1cb6b895ea" - -S = "${WORKDIR}/firefox-${PV}" - -inherit pkgconfig perlnative python3native rust - -DEPENDS += "zlib cargo-native python3 icu" -DEPENDS:remove:mipsarch = "icu" -DEPENDS:remove:powerpc:toolchain-clang = "icu" - -B = "${WORKDIR}/build" - -export PYTHONPATH = "${S}/build:\ -${S}/third_party/python/PyYAML/lib3:\ -${S}/testing/mozbase/mozfile:\ -${S}/python/mozboot:\ -${S}/third_party/python/distro:\ -${S}/testing/mozbase/mozinfo:\ -${S}/config:\ -${S}/testing/mozbase/manifestparser:\ -${S}/third_party/python/pytoml:\ -${S}/testing/mozbase/mozprocess:\ -${S}/third_party/python/six:\ -${S}/python/mozbuild:\ -${S}/python/mozbuild/mozbuild:\ -${S}/python/mach:\ -${S}/third_party/python/jsmin:\ -${S}/python/mozversioncontrol" - -export HOST_CC = "${BUILD_CC}" -export HOST_CXX = "${BUILD_CXX}" -export HOST_CFLAGS = "${BUILD_CFLAGS}" -export HOST_CPPFLAGS = "${BUILD_CPPFLAGS}" -export HOST_CXXFLAGS = "${BUILD_CXXFLAGS}" - -export AS = "${CC}" - -export RUSTFLAGS - -JIT ?= "" -JIT:mipsarch = "--disable-jit" -ICU ?= "--with-system-icu" -ICU:mipsarch = "" -ICU:powerpc:toolchain-clang = "" - -do_configure() { - cd ${B} - python3 ${S}/configure.py \ - --enable-project=js \ - --target=${RUST_HOST_SYS} \ - --host=${BUILD_SYS} \ - --prefix=${prefix} \ - --libdir=${libdir} \ - --disable-jemalloc \ - --disable-strip \ - ${JIT} \ - ${ICU} -} -do_configure[cleandirs] += "${B}" - -do_install() { - oe_runmake 'DESTDIR=${D}' install -} - -inherit multilib_script multilib_header - -MAJ_VER = "${@oe.utils.trim_version("${PV}", 1)}" -MULTILIB_SCRIPTS += "${PN}-dev:${bindir}/js${MAJ_VER}-config" - -do_install:append() { - oe_multilib_header mozjs-${MAJ_VER}/js-config.h - sed -e 's@${STAGING_DIR_HOST}@@g' \ - -i ${D}${bindir}/js${MAJ_VER}-config - rm -f ${D}${libdir}/libjs_static.ajs -} - -PACKAGE_DEBUG_SPLIT_STYLE = "debug-without-src" -PACKAGES =+ "lib${BPN}" -FILES:lib${BPN} += "${libdir}/lib*" diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/networking/mstpd_git.bb b/sources/meta-openembedded/meta-oe/recipes-extended/networking/mstpd_git.bb index b2043ef0..e6e1f9a3 100644 --- a/sources/meta-openembedded/meta-oe/recipes-extended/networking/mstpd_git.bb +++ b/sources/meta-openembedded/meta-oe/recipes-extended/networking/mstpd_git.bb @@ -26,8 +26,8 @@ do_install:append() { rmdir ${D}${libdir} || true install -d -m 0755 ${D}${sbindir} - install -m 0755 ${WORKDIR}/bridge-stp ${D}${sbindir} + install -m 0755 ${UNPACKDIR}/bridge-stp ${D}${sbindir} install -d -m 0755 ${D}${systemd_system_unitdir} - install -m 0644 ${WORKDIR}/mstpd.service ${D}${systemd_system_unitdir} + install -m 0644 ${UNPACKDIR}/mstpd.service ${D}${systemd_system_unitdir} } diff --git a/sources/poky/meta/recipes-extended/newt/files/0001-detect-gold-as-GNU-linker-too.patch b/sources/meta-openembedded/meta-oe/recipes-extended/newt/files/0001-detect-gold-as-GNU-linker-too.patch similarity index 100% rename from sources/poky/meta/recipes-extended/newt/files/0001-detect-gold-as-GNU-linker-too.patch rename to sources/meta-openembedded/meta-oe/recipes-extended/newt/files/0001-detect-gold-as-GNU-linker-too.patch diff --git a/sources/poky/meta/recipes-extended/newt/files/Makefile.in-Add-tinfo-library-to-the-linking-librari.patch b/sources/meta-openembedded/meta-oe/recipes-extended/newt/files/Makefile.in-Add-tinfo-library-to-the-linking-librari.patch similarity index 100% rename from sources/poky/meta/recipes-extended/newt/files/Makefile.in-Add-tinfo-library-to-the-linking-librari.patch rename to sources/meta-openembedded/meta-oe/recipes-extended/newt/files/Makefile.in-Add-tinfo-library-to-the-linking-librari.patch diff --git a/sources/poky/meta/recipes-extended/newt/files/cross_ar.patch b/sources/meta-openembedded/meta-oe/recipes-extended/newt/files/cross_ar.patch similarity index 100% rename from sources/poky/meta/recipes-extended/newt/files/cross_ar.patch rename to sources/meta-openembedded/meta-oe/recipes-extended/newt/files/cross_ar.patch diff --git a/sources/poky/meta/recipes-extended/newt/libnewt_0.52.24.bb b/sources/meta-openembedded/meta-oe/recipes-extended/newt/libnewt_0.52.24.bb similarity index 100% rename from sources/poky/meta/recipes-extended/newt/libnewt_0.52.24.bb rename to sources/meta-openembedded/meta-oe/recipes-extended/newt/libnewt_0.52.24.bb diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/openwsman/openwsman_2.7.2.bb b/sources/meta-openembedded/meta-oe/recipes-extended/openwsman/openwsman_2.7.2.bb index 1c68b5f4..5437ea13 100644 --- a/sources/meta-openembedded/meta-oe/recipes-extended/openwsman/openwsman_2.7.2.bb +++ b/sources/meta-openembedded/meta-oe/recipes-extended/openwsman/openwsman_2.7.2.bb @@ -57,7 +57,7 @@ do_install:append() { chmod 755 ${D}/${sysconfdir}/openwsman/owsmangencert.sh if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then install -d ${D}/${systemd_unitdir}/system - install -m 644 ${WORKDIR}/openwsmand.service ${D}/${systemd_unitdir}/system + install -m 644 ${UNPACKDIR}/openwsmand.service ${D}/${systemd_unitdir}/system sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/openwsmand.service sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' ${D}${systemd_unitdir}/system/openwsmand.service diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/ostree/ostree_2024.5.bb b/sources/meta-openembedded/meta-oe/recipes-extended/ostree/ostree_2024.5.bb deleted file mode 100644 index 2ea92f19..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-extended/ostree/ostree_2024.5.bb +++ /dev/null @@ -1,214 +0,0 @@ -SUMMARY = "Versioned Operating System Repository." -DESCRIPTION = "libostree is both a shared library and suite of command line \ -tools that combines a \"git-like\" model for committing and downloading \ -bootable filesystem trees, along with a layer for deploying them and managing \ -the bootloader configuration." -HOMEPAGE = "https://ostree.readthedocs.io" -LICENSE = "LGPL-2.1-only" - -LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2" - -DEPENDS = " \ - glib-2.0-native \ - glib-2.0 \ - e2fsprogs \ - libcap \ - zlib \ - xz \ - bison-native \ -" - -GITHUB_BASE_URI = "https://github.com/ostreedev/ostree/releases" -SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/libostree-${PV}.tar.xz \ - file://run-ptest \ - " -SRC_URI[sha256sum] = "bc12d8493db64152093ee5be77cf62a29cc67a4a9e430dc987103e78aada4a6f" - -S = "${WORKDIR}/libostree-${PV}" - -inherit autotools bash-completion gobject-introspection github-releases gtk-doc manpages pkgconfig ptest-gnome systemd - -UNKNOWN_CONFIGURE_OPT_IGNORE = "--disable-introspection --enable-introspection" - -# Workaround compile failure: -# |../git/src/libotutil/zbase32.c:37:1: error: function returns an aggregate [-Werror=aggregate-return] -# so remove -Og and use -O2 as workaround -DEBUG_OPTIMIZATION:remove = "-Og" -DEBUG_OPTIMIZATION:append = " -O2" -BUILD_OPTIMIZATION:remove = "-Og" -BUILD_OPTIMIZATION:append = " -O2" - -# Package configuration - match ostree defaults, but without rofiles-fuse -# otherwise we introduce a dependendency on meta-filesystems and swap -# soup for curl to avoid bringing in deprecated libsoup2 (though -# to run ptest requires that you have soup2 or soup3). -PACKAGECONFIG ??= " \ - ${@bb.utils.filter('DISTRO_FEATURES', 'selinux smack', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd libmount', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'soup3', '', d)} \ - glib \ - gpgme \ - curl \ -" - -# We include curl because ostree can't (currently) be built without -# soup or curl - https://github.com/ostreedev/ostree/issues/1897 -PACKAGECONFIG:class-native ??= " \ - ${@bb.utils.filter('DISTRO_FEATURES', 'selinux smack', d)} \ - builtin-grub2-mkconfig \ - gpgme \ - curl \ -" - -PACKAGECONFIG:class-nativesdk ??= " \ - ${@bb.utils.filter('DISTRO_FEATURES', 'selinux smack', d)} \ - builtin-grub2-mkconfig \ - gpgme \ - curl \ -" - -PACKAGECONFIG[avahi] = "--with-avahi, --without-avahi, avahi" -PACKAGECONFIG[builtin-grub2-mkconfig] = "--with-builtin-grub2-mkconfig, --without-builtin-grub2-mkconfig" -PACKAGECONFIG[curl] = "--with-curl, --without-curl, curl" -PACKAGECONFIG[dracut] = "--with-dracut, --without-dracut" -PACKAGECONFIG[ed25519-libsodium] = "--with-ed25519-libsodium, --without-ed25519-libsodium, libsodium" -PACKAGECONFIG[ed25519-openssl] = "--with-openssl, --without-openssl, openssl" -PACKAGECONFIG[gjs] = "ac_cv_path_GJS=${bindir}/gjs" -PACKAGECONFIG[glib] = "--with-crypto=glib, , , , , gnutls openssl" -PACKAGECONFIG[gnutls] = "--with-crypto=gnutls, , gnutls, , , glib openssl" -PACKAGECONFIG[gpgme] = "--with-gpgme, --without-gpgme, gpgme" -PACKAGECONFIG[libarchive] = "--with-libarchive, --without-libarchive, libarchive" -PACKAGECONFIG[libmount] = "--with-libmount, --without-libmount, util-linux" -PACKAGECONFIG[manpages] = "--enable-man, --disable-man, libxslt-native docbook-xsl-stylesheets-native" -PACKAGECONFIG[mkinitcpio] = "--with-mkinitcpio, --without-mkinitcpio" -PACKAGECONFIG[no-http2] = "--disable-http2, --enable-http2" -PACKAGECONFIG[openssl] = "--with-crypto=openssl, , openssl, , , glib gnutls" -PACKAGECONFIG[rofiles-fuse] = "--enable-rofiles-fuse, --disable-rofiles-fuse, fuse3" -PACKAGECONFIG[selinux] = "--with-selinux, --without-selinux, libselinux, bubblewrap" -PACKAGECONFIG[smack] = "--with-smack, --without-smack, smack" -PACKAGECONFIG[soup2] = "--with-soup, --without-soup, libsoup-2.4, , , soup3" -PACKAGECONFIG[soup3] = "--with-soup3, --without-soup3, libsoup, , , soup2" -PACKAGECONFIG[static] = "" -PACKAGECONFIG[systemd] = "--with-libsystemd --with-systemdsystemunitdir=${systemd_system_unitdir}, --without-libsystemd, systemd" - -EXTRA_OECONF = " \ - ${@bb.utils.contains('PACKAGECONFIG', 'static', '--with-static-compiler=\'${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}\'', '', d)} \ -" - -# Makefile-libostree.am overrides this to avoid a build problem with clang, -# but that fix breaks cross compilation and we don't need it -EXTRA_OEMAKE = " \ - INTROSPECTION_SCANNER_ENV= \ -" - -EXTRA_OECONF:class-native = " \ - --enable-wrpseudo-compat \ - --disable-otmpfile \ -" - -EXTRA_OECONF:class-nativesdk = " \ - --enable-wrpseudo-compat \ - --disable-otmpfile \ -" - -# Path to ${prefix}/lib/ostree/ostree-grub-generator is hardcoded on the -# do_configure stage so we do depend on it -SYSROOT_DIR = "${STAGING_DIR_TARGET}" -SYSROOT_DIR:class-native = "${STAGING_DIR_NATIVE}" -do_configure[vardeps] += "SYSROOT_DIR" - -do_configure:prepend() { - # this reflects what autogen.sh does, but the OE wrappers for autoreconf - # allow it to work without the other gyrations which exist there - cp ${S}/libglnx/Makefile-libglnx.am ${S}/libglnx/Makefile-libglnx.am.inc - cp ${S}/bsdiff/Makefile-bsdiff.am ${S}/bsdiff/Makefile-bsdiff.am.inc -} - -do_install:append:class-native() { - create_wrapper ${D}${bindir}/ostree OSTREE_GRUB2_EXEC="${STAGING_LIBDIR_NATIVE}/ostree/ostree-grub-generator" -} - -do_install:append:class-nativesdk() { - create_wrapper ${D}${bindir}/ostree OSTREE_GRUB2_EXEC="\$OECORE_NATIVE_SYSROOT/usr/lib/ostree/ostree-grub-generator" -} - -PACKAGE_BEFORE_PN = " \ - ${PN}-dracut \ - ${PN}-grub \ - ${PN}-mkinitcpio \ - ${PN}-switchroot \ -" - -FILES:${PN} += " \ - ${nonarch_libdir}/${BPN} \ - ${nonarch_libdir}/tmpfiles.d \ - ${systemd_system_unitdir} \ - ${systemd_unitdir}/system-generators \ -" -FILES:${PN}-dracut = " \ - ${sysconfdir}/dracut.conf.d \ - ${libdir}/dracut \ -" -FILES:${PN}-grub = " \ - ${sysconfdir}/grub.d \ - ${libexecdir}/libostree/grub2-15_ostree \ -" -FILES:${PN}-mkinitcpio = " \ - ${sysconfdir}/ostree-mkinitcpio.conf \ - ${libdir}/initcpio \ -" -FILES:${PN}-switchroot = " \ - ${nonarch_libdir}/${BPN}/ostree-prepare-root \ - ${systemd_system_unitdir}/ostree-prepare-root.service \ -" - -RDEPENDS:${PN}-dracut = "bash" -RDEPENDS:${PN}-mkinitcpio = "bash" -RDEPENDS:${PN}:class-target = " \ - ${@bb.utils.contains('PACKAGECONFIG', 'gpgme', 'gnupg', '', d)} \ - ${PN}-switchroot \ -" - -# -# Note that to get ptest to pass you also need: -# -# xattr in DISTRO_FEATURES (default) -# static ostree-prepare-root -# overlayfs in your kernel -# busybox built statically -# C.UTF-8 locale available (default) -# Sufficient disk space/RAM (e.g. core-image-sato-sdk) -# -# Something like this in your local.conf: -# -# PACKAGECONFIG:append:pn-ostree = " static soup3" -# KERNEL_EXTRA_FEATURES:append = " features/overlayfs/overlayfs.scc" -# TARGET_CFLAGS:append:pn-busybox = " -static" -# -RDEPENDS:${PN}-ptest += " \ - attr \ - bash \ - coreutils \ - cpio \ - diffutils \ - findutils \ - grep \ - locale-base-en-us \ - python3-core \ - python3-multiprocessing \ - strace \ - tar \ - util-linux \ - xz \ - python3-pyyaml \ - ${@bb.utils.contains('PACKAGECONFIG', 'gjs', 'gjs', '', d)} \ -" -RDEPENDS:${PN}-ptest:remove:riscv32 = "strace" -RDEPENDS:${PN}-ptest:append:libc-glibc = " glibc-utils glibc-localedata-en-us" - -RRECOMMENDS:${PN}:append:class-target = " kernel-module-overlay" - -SYSTEMD_SERVICE:${PN} = "ostree-remount.service ostree-finalize-staged.path" -SYSTEMD_SERVICE:${PN}-switchroot = "ostree-prepare-root.service" - -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/ostree/ostree_2024.7.bb b/sources/meta-openembedded/meta-oe/recipes-extended/ostree/ostree_2024.7.bb new file mode 100644 index 00000000..8cecf533 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-extended/ostree/ostree_2024.7.bb @@ -0,0 +1,215 @@ +SUMMARY = "Versioned Operating System Repository." +DESCRIPTION = "libostree is both a shared library and suite of command line \ +tools that combines a \"git-like\" model for committing and downloading \ +bootable filesystem trees, along with a layer for deploying them and managing \ +the bootloader configuration." +HOMEPAGE = "https://ostree.readthedocs.io" +LICENSE = "LGPL-2.1-only" + +LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2" + +DEPENDS = " \ + glib-2.0-native \ + glib-2.0 \ + e2fsprogs \ + libcap \ + zlib \ + xz \ + bison-native \ +" + +GITHUB_BASE_URI = "https://github.com/ostreedev/ostree/releases" +SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/libostree-${PV}.tar.xz \ + file://run-ptest \ + " +SRC_URI[sha256sum] = "72451efffe5a10acb4cfdd6eb849db97fa9e61a81e4113fc656eece77eb93355" + +S = "${WORKDIR}/libostree-${PV}" + +inherit autotools bash-completion gobject-introspection github-releases gtk-doc manpages pkgconfig ptest-gnome systemd + +UNKNOWN_CONFIGURE_OPT_IGNORE += "--disable-introspection --enable-introspection" + +# Workaround compile failure: +# |../git/src/libotutil/zbase32.c:37:1: error: function returns an aggregate [-Werror=aggregate-return] +# so remove -Og and use -O2 as workaround +DEBUG_OPTIMIZATION:remove = "-Og" +DEBUG_OPTIMIZATION:append = " -O2" +BUILD_OPTIMIZATION:remove = "-Og" +BUILD_OPTIMIZATION:append = " -O2" + +# Package configuration - match ostree defaults, but without rofiles-fuse +# otherwise we introduce a dependendency on meta-filesystems and swap +# soup for curl to avoid bringing in deprecated libsoup2 (though +# to run ptest requires that you have soup2 or soup3). +PACKAGECONFIG ??= " \ + ${@bb.utils.filter('DISTRO_FEATURES', 'selinux smack', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd libmount', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'soup3', '', d)} \ + glib \ + gpgme \ + curl \ +" + +# We include curl because ostree can't (currently) be built without +# soup or curl - https://github.com/ostreedev/ostree/issues/1897 +PACKAGECONFIG:class-native ??= " \ + ${@bb.utils.filter('DISTRO_FEATURES', 'selinux smack', d)} \ + builtin-grub2-mkconfig \ + gpgme \ + curl \ +" + +PACKAGECONFIG:class-nativesdk ??= " \ + ${@bb.utils.filter('DISTRO_FEATURES', 'selinux smack', d)} \ + builtin-grub2-mkconfig \ + gpgme \ + curl \ +" + +PACKAGECONFIG[avahi] = "--with-avahi, --without-avahi, avahi" +PACKAGECONFIG[builtin-grub2-mkconfig] = "--with-builtin-grub2-mkconfig, --without-builtin-grub2-mkconfig" +PACKAGECONFIG[composefs] = "--with-composefs, --without-composefs, composefs" +PACKAGECONFIG[curl] = "--with-curl, --without-curl, curl" +PACKAGECONFIG[dracut] = "--with-dracut, --without-dracut" +PACKAGECONFIG[ed25519-libsodium] = "--with-ed25519-libsodium, --without-ed25519-libsodium, libsodium" +PACKAGECONFIG[ed25519-openssl] = "--with-openssl, --without-openssl, openssl" +PACKAGECONFIG[gjs] = "ac_cv_path_GJS=${bindir}/gjs" +PACKAGECONFIG[glib] = "--with-crypto=glib, , , , , gnutls openssl" +PACKAGECONFIG[gnutls] = "--with-crypto=gnutls, , gnutls, , , glib openssl" +PACKAGECONFIG[gpgme] = "--with-gpgme, --without-gpgme, gpgme" +PACKAGECONFIG[libarchive] = "--with-libarchive, --without-libarchive, libarchive" +PACKAGECONFIG[libmount] = "--with-libmount, --without-libmount, util-linux" +PACKAGECONFIG[manpages] = "--enable-man, --disable-man, libxslt-native docbook-xsl-stylesheets-native" +PACKAGECONFIG[mkinitcpio] = "--with-mkinitcpio, --without-mkinitcpio" +PACKAGECONFIG[no-http2] = "--disable-http2, --enable-http2" +PACKAGECONFIG[openssl] = "--with-crypto=openssl, , openssl, , , glib gnutls" +PACKAGECONFIG[rofiles-fuse] = "--enable-rofiles-fuse, --disable-rofiles-fuse, fuse3" +PACKAGECONFIG[selinux] = "--with-selinux, --without-selinux, libselinux, bubblewrap" +PACKAGECONFIG[smack] = "--with-smack, --without-smack, smack" +PACKAGECONFIG[soup2] = "--with-soup, --without-soup, libsoup-2.4, , , soup3" +PACKAGECONFIG[soup3] = "--with-soup3, --without-soup3, libsoup, , , soup2" +PACKAGECONFIG[static] = "" +PACKAGECONFIG[systemd] = "--with-libsystemd --with-systemdsystemunitdir=${systemd_system_unitdir}, --without-libsystemd, systemd" + +EXTRA_OECONF = " \ + ${@bb.utils.contains('PACKAGECONFIG', 'static', '--with-static-compiler=\'${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}\'', '', d)} \ +" + +# Makefile-libostree.am overrides this to avoid a build problem with clang, +# but that fix breaks cross compilation and we don't need it +EXTRA_OEMAKE = " \ + INTROSPECTION_SCANNER_ENV= \ +" + +EXTRA_OECONF:class-native = " \ + --enable-wrpseudo-compat \ + --disable-otmpfile \ +" + +EXTRA_OECONF:class-nativesdk = " \ + --enable-wrpseudo-compat \ + --disable-otmpfile \ +" + +# Path to ${prefix}/lib/ostree/ostree-grub-generator is hardcoded on the +# do_configure stage so we do depend on it +SYSROOT_DIR = "${STAGING_DIR_TARGET}" +SYSROOT_DIR:class-native = "${STAGING_DIR_NATIVE}" +do_configure[vardeps] += "SYSROOT_DIR" + +do_configure:prepend() { + # this reflects what autogen.sh does, but the OE wrappers for autoreconf + # allow it to work without the other gyrations which exist there + cp ${S}/libglnx/Makefile-libglnx.am ${S}/libglnx/Makefile-libglnx.am.inc + cp ${S}/bsdiff/Makefile-bsdiff.am ${S}/bsdiff/Makefile-bsdiff.am.inc +} + +do_install:append:class-native() { + create_wrapper ${D}${bindir}/ostree OSTREE_GRUB2_EXEC="${STAGING_LIBDIR_NATIVE}/ostree/ostree-grub-generator" +} + +do_install:append:class-nativesdk() { + create_wrapper ${D}${bindir}/ostree OSTREE_GRUB2_EXEC="\$OECORE_NATIVE_SYSROOT/usr/lib/ostree/ostree-grub-generator" +} + +PACKAGE_BEFORE_PN = " \ + ${PN}-dracut \ + ${PN}-grub \ + ${PN}-mkinitcpio \ + ${PN}-switchroot \ +" + +FILES:${PN} += " \ + ${nonarch_libdir}/${BPN} \ + ${nonarch_libdir}/tmpfiles.d \ + ${systemd_system_unitdir} \ + ${systemd_unitdir}/system-generators \ +" +FILES:${PN}-dracut = " \ + ${sysconfdir}/dracut.conf.d \ + ${libdir}/dracut \ +" +FILES:${PN}-grub = " \ + ${sysconfdir}/grub.d \ + ${libexecdir}/libostree/grub2-15_ostree \ +" +FILES:${PN}-mkinitcpio = " \ + ${sysconfdir}/ostree-mkinitcpio.conf \ + ${libdir}/initcpio \ +" +FILES:${PN}-switchroot = " \ + ${nonarch_libdir}/${BPN}/ostree-prepare-root \ + ${systemd_system_unitdir}/ostree-prepare-root.service \ +" + +RDEPENDS:${PN}-dracut = "bash" +RDEPENDS:${PN}-mkinitcpio = "bash" +RDEPENDS:${PN}:class-target = " \ + ${@bb.utils.contains('PACKAGECONFIG', 'gpgme', 'gnupg', '', d)} \ + ${PN}-switchroot \ +" + +# +# Note that to get ptest to pass you also need: +# +# xattr in DISTRO_FEATURES (default) +# static ostree-prepare-root +# overlayfs in your kernel +# busybox built statically +# C.UTF-8 locale available (default) +# Sufficient disk space/RAM (e.g. core-image-sato-sdk) +# +# Something like this in your local.conf: +# +# PACKAGECONFIG:append:pn-ostree = " static soup3" +# KERNEL_EXTRA_FEATURES:append = " features/overlayfs/overlayfs.scc" +# TARGET_CFLAGS:append:pn-busybox = " -static" +# +RDEPENDS:${PN}-ptest += " \ + attr \ + bash \ + coreutils \ + cpio \ + diffutils \ + findutils \ + grep \ + locale-base-en-us \ + python3-core \ + python3-multiprocessing \ + strace \ + tar \ + util-linux \ + xz \ + python3-pyyaml \ + ${@bb.utils.contains('PACKAGECONFIG', 'gjs', 'gjs', '', d)} \ +" +RDEPENDS:${PN}-ptest:remove:riscv32 = "strace" +RDEPENDS:${PN}-ptest:append:libc-glibc = " glibc-utils glibc-localedata-en-us" + +RRECOMMENDS:${PN}:append:class-target = " kernel-module-overlay" + +SYSTEMD_SERVICE:${PN} = "ostree-remount.service ostree-finalize-staged.path" +SYSTEMD_SERVICE:${PN}-switchroot = "ostree-prepare-root.service" + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/p7zip/files/0001-Fix-two-buffer-overflow-vulnerabilities.patch b/sources/meta-openembedded/meta-oe/recipes-extended/p7zip/files/0001-Fix-two-buffer-overflow-vulnerabilities.patch deleted file mode 100644 index d149c341..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-extended/p7zip/files/0001-Fix-two-buffer-overflow-vulnerabilities.patch +++ /dev/null @@ -1,455 +0,0 @@ -From 1f266347b154ed90b8262126f04e8cc8f59fa617 Mon Sep 17 00:00:00 2001 -From: Hongxu Jia -Date: Fri, 22 Nov 2024 21:25:21 +0800 -Subject: [PATCH] Fix two buffer overflow vulnerabilities - -According to [1][2], Igor Pavlov, the author of 7-Zip, refused to -provide an advisory or any related change log entries. We have to -backport a part of ./CPP/7zip/Archive/NtfsHandler.cpp from upstream -big commit - -Upstream-Status: Backport [https://github.com/ip7z/7zip/commit/fc662341e6f85da78ada0e443f6116b978f79f22] - -[1] https://dfir.ru/2024/06/19/vulnerabilities-in-7-zip-and-ntfs3/ -[2] https://dfir.ru/wp-content/uploads/2024/07/screenshot-2024-07-03-at-02-13-40-7-zip-_-bugs-_-2402-two-vulnerabilities-in-the-ntfs-handler.png - -CVE: CVE-2023-52169 -CVE: CVE-2023-52168 - -Signed-off-by: Hongxu Jia ---- - CPP/7zip/Archive/NtfsHandler.cpp | 229 ++++++++++++++++++++----------- - 1 file changed, 151 insertions(+), 78 deletions(-) - -diff --git a/CPP/7zip/Archive/NtfsHandler.cpp b/CPP/7zip/Archive/NtfsHandler.cpp -index 93e9f88..2701439 100644 ---- a/CPP/7zip/Archive/NtfsHandler.cpp -+++ b/CPP/7zip/Archive/NtfsHandler.cpp -@@ -71,8 +71,9 @@ struct CHeader - { - unsigned SectorSizeLog; - unsigned ClusterSizeLog; -+ unsigned MftRecordSizeLog; - // Byte MediaType; -- UInt32 NumHiddenSectors; -+ //UInt32 NumHiddenSectors; - UInt64 NumSectors; - UInt64 NumClusters; - UInt64 MftCluster; -@@ -111,30 +112,42 @@ bool CHeader::Parse(const Byte *p) - if (memcmp(p + 3, "NTFS ", 8) != 0) - return false; - { -- int t = GetLog(Get16(p + 11)); -- if (t < 9 || t > 12) -- return false; -- SectorSizeLog = t; -- t = GetLog(p[13]); -- if (t < 0) -- return false; -- sectorsPerClusterLog = t; -- ClusterSizeLog = SectorSizeLog + sectorsPerClusterLog; -- if (ClusterSizeLog > 30) -- return false; -+ { -+ const int t = GetLog(Get16(p + 11)); -+ if (t < 9 || t > 12) -+ return false; -+ SectorSizeLog = (unsigned)t; -+ } -+ { -+ const unsigned v = p[13]; -+ if (v <= 0x80) -+ { -+ const int t = GetLog(v); -+ if (t < 0) -+ return false; -+ sectorsPerClusterLog = (unsigned)t; -+ } -+ else -+ sectorsPerClusterLog = 0x100 - v; -+ ClusterSizeLog = SectorSizeLog + sectorsPerClusterLog; -+ if (ClusterSizeLog > 30) -+ return false; -+ } - } - - for (int i = 14; i < 21; i++) - if (p[i] != 0) - return false; - -+ // F8 : a hard disk -+ // F0 : high-density 3.5-inch floppy disk - if (p[21] != 0xF8) // MediaType = Fixed_Disk - return false; - if (Get16(p + 22) != 0) // NumFatSectors - return false; -- G16(p + 24, SectorsPerTrack); // 63 usually -- G16(p + 26, NumHeads); // 255 -- G32(p + 28, NumHiddenSectors); // 63 (XP) / 2048 (Vista and win7) / (0 on media that are not partitioned ?) -+ // G16(p + 24, SectorsPerTrack); // 63 usually -+ // G16(p + 26, NumHeads); // 255 -+ // G32(p + 28, NumHiddenSectors); // 63 (XP) / 2048 (Vista and win7) / (0 on media that are not partitioned ?) - if (Get32(p + 32) != 0) // NumSectors32 - return false; - -@@ -156,14 +169,47 @@ bool CHeader::Parse(const Byte *p) - - NumClusters = NumSectors >> sectorsPerClusterLog; - -- G64(p + 0x30, MftCluster); -+ G64(p + 0x30, MftCluster); // $MFT. - // G64(p + 0x38, Mft2Cluster); -- G64(p + 0x48, SerialNumber); -- UInt32 numClustersInMftRec; -- UInt32 numClustersInIndexBlock; -- G32(p + 0x40, numClustersInMftRec); // -10 means 2 ^10 = 1024 bytes. -- G32(p + 0x44, numClustersInIndexBlock); -- return (numClustersInMftRec < 256 && numClustersInIndexBlock < 256); -+ G64(p + 0x48, SerialNumber); // $MFTMirr -+ -+ /* -+ numClusters_per_MftRecord: -+ numClusters_per_IndexBlock: -+ only low byte from 4 bytes is used. Another 3 high bytes are zeros. -+ If the number is positive (number < 0x80), -+ then it represents the number of clusters. -+ If the number is negative (number >= 0x80), -+ then the size of the file record is 2 raised to the absolute value of this number. -+ example: (0xF6 == -10) means 2^10 = 1024 bytes. -+ */ -+ { -+ UInt32 numClusters_per_MftRecord; -+ G32(p + 0x40, numClusters_per_MftRecord); -+ if (numClusters_per_MftRecord >= 0x100 || numClusters_per_MftRecord == 0) -+ return false; -+ if (numClusters_per_MftRecord < 0x80) -+ { -+ const int t = GetLog(numClusters_per_MftRecord); -+ if (t < 0) -+ return false; -+ MftRecordSizeLog = (unsigned)t + ClusterSizeLog; -+ } -+ else -+ MftRecordSizeLog = 0x100 - numClusters_per_MftRecord; -+ // what exact MFT record sizes are possible and supported by Windows? -+ // do we need to change this limit here? -+ const unsigned k_MftRecordSizeLog_MAX = 12; -+ if (MftRecordSizeLog > k_MftRecordSizeLog_MAX) -+ return false; -+ if (MftRecordSizeLog < SectorSizeLog) -+ return false; -+ } -+ { -+ UInt32 numClusters_per_IndexBlock; -+ G32(p + 0x44, numClusters_per_IndexBlock); -+ return (numClusters_per_IndexBlock < 0x100); -+ } - } - - struct CMftRef -@@ -235,7 +281,7 @@ struct CFileNameAttr - bool Parse(const Byte *p, unsigned size); - }; - --static void GetString(const Byte *p, unsigned len, UString2 &res) -+static void GetString(const Byte *p, const unsigned len, UString2 &res) - { - if (len == 0 && res.IsEmpty()) - return; -@@ -266,8 +312,8 @@ bool CFileNameAttr::Parse(const Byte *p, unsigned size) - G32(p + 0x38, Attrib); - // G16(p + 0x3C, PackedEaSize); - NameType = p[0x41]; -- unsigned len = p[0x40]; -- if (0x42 + len > size) -+ const unsigned len = p[0x40]; -+ if (0x42 + len * 2 > size) - return false; - if (len != 0) - GetString(p + 0x42, len, Name); -@@ -954,6 +1000,14 @@ struct CDataRef - static const UInt32 kMagic_FILE = 0x454C4946; - static const UInt32 kMagic_BAAD = 0x44414142; - -+// 22.02: we support some rare case magic values: -+static const UInt32 kMagic_INDX = 0x58444e49; -+static const UInt32 kMagic_HOLE = 0x454c4f48; -+static const UInt32 kMagic_RSTR = 0x52545352; -+static const UInt32 kMagic_RCRD = 0x44524352; -+static const UInt32 kMagic_CHKD = 0x444b4843; -+static const UInt32 kMagic_FFFFFFFF = 0xFFFFFFFF; -+ - struct CMftRec - { - UInt32 Magic; -@@ -1030,6 +1084,26 @@ struct CMftRec - - bool Parse(Byte *p, unsigned sectorSizeLog, UInt32 numSectors, UInt32 recNumber, CObjectVector *attrs); - -+ bool Is_Magic_Empty() const -+ { -+ // what exact Magic values are possible for empty and unused records? -+ const UInt32 k_Magic_Unused_MAX = 5; // 22.02 -+ return (Magic <= k_Magic_Unused_MAX); -+ } -+ bool Is_Magic_FILE() const { return (Magic == kMagic_FILE); } -+ // bool Is_Magic_BAAD() const { return (Magic == kMagic_BAAD); } -+ bool Is_Magic_CanIgnore() const -+ { -+ return Is_Magic_Empty() -+ || Magic == kMagic_BAAD -+ || Magic == kMagic_INDX -+ || Magic == kMagic_HOLE -+ || Magic == kMagic_RSTR -+ || Magic == kMagic_RCRD -+ || Magic == kMagic_CHKD -+ || Magic == kMagic_FFFFFFFF; -+ } -+ - bool IsEmpty() const { return (Magic <= 2); } - bool IsFILE() const { return (Magic == kMagic_FILE); } - bool IsBAAD() const { return (Magic == kMagic_BAAD); } -@@ -1141,9 +1215,8 @@ bool CMftRec::Parse(Byte *p, unsigned sectorSizeLog, UInt32 numSectors, UInt32 r - CObjectVector *attrs) - { - G32(p, Magic); -- if (!IsFILE()) -- return IsEmpty() || IsBAAD(); -- -+ if (!Is_Magic_FILE()) -+ return Is_Magic_CanIgnore(); - - { - UInt32 usaOffset; -@@ -1188,12 +1261,12 @@ bool CMftRec::Parse(Byte *p, unsigned sectorSizeLog, UInt32 numSectors, UInt32 r - G16(p + 0x10, SeqNumber); - // G16(p + 0x12, LinkCount); - // PRF(printf(" L=%d", LinkCount)); -- UInt32 attrOffs = Get16(p + 0x14); -+ const UInt32 attrOffs = Get16(p + 0x14); - G16(p + 0x16, Flags); - PRF(printf(" F=%4X", Flags)); - -- UInt32 bytesInUse = Get32(p + 0x18); -- UInt32 bytesAlloc = Get32(p + 0x1C); -+ const UInt32 bytesInUse = Get32(p + 0x18); -+ const UInt32 bytesAlloc = Get32(p + 0x1C); - G64(p + 0x20, BaseMftRef.Val); - if (BaseMftRef.Val != 0) - { -@@ -1667,68 +1740,57 @@ HRESULT CDatabase::Open() - - SeekToCluster(Header.MftCluster); - -- CMftRec mftRec; -- UInt32 numSectorsInRec; -- -+ // we use ByteBuf for records reading. -+ // so the size of ByteBuf must be >= mftRecordSize -+ const size_t recSize = (size_t)1 << Header.MftRecordSizeLog; -+ const size_t kBufSize = MyMax((size_t)(1 << 15), recSize); -+ ByteBuf.Alloc(kBufSize); -+ RINOK(ReadStream_FALSE(InStream, ByteBuf, recSize)) -+ { -+ const UInt32 allocSize = Get32(ByteBuf + 0x1C); -+ if (allocSize != recSize) -+ return S_FALSE; -+ } -+ // MftRecordSizeLog >= SectorSizeLog -+ const UInt32 numSectorsInRec = 1u << (Header.MftRecordSizeLog - Header.SectorSizeLog); - CMyComPtr mftStream; -+ CMftRec mftRec; - { -- UInt32 blockSize = 1 << 12; -- ByteBuf.Alloc(blockSize); -- RINOK(ReadStream_FALSE(InStream, ByteBuf, blockSize)); -- -- { -- UInt32 allocSize = Get32(ByteBuf + 0x1C); -- int t = GetLog(allocSize); -- if (t < (int)Header.SectorSizeLog) -- return S_FALSE; -- RecSizeLog = t; -- if (RecSizeLog > 15) -- return S_FALSE; -- } -- -- numSectorsInRec = 1 << (RecSizeLog - Header.SectorSizeLog); - if (!mftRec.Parse(ByteBuf, Header.SectorSizeLog, numSectorsInRec, 0, NULL)) - return S_FALSE; -- if (!mftRec.IsFILE()) -+ if (!mftRec.Is_Magic_FILE()) - return S_FALSE; - mftRec.ParseDataNames(); - if (mftRec.DataRefs.IsEmpty()) - return S_FALSE; -- RINOK(mftRec.GetStream(InStream, 0, Header.ClusterSizeLog, Header.NumClusters, &mftStream)); -+ RINOK(mftRec.GetStream(InStream, 0, Header.ClusterSizeLog, Header.NumClusters, &mftStream)) - if (!mftStream) - return S_FALSE; - } - - // CObjectVector SecurityAttrs; - -- UInt64 mftSize = mftRec.DataAttrs[0].Size; -+ const UInt64 mftSize = mftRec.DataAttrs[0].Size; - if ((mftSize >> 4) > Header.GetPhySize_Clusters()) - return S_FALSE; - -- const size_t kBufSize = (1 << 15); -- const size_t recSize = ((size_t)1 << RecSizeLog); -- if (kBufSize < recSize) -- return S_FALSE; -- - { -- const UInt64 numFiles = mftSize >> RecSizeLog; -+ const UInt64 numFiles = mftSize >> Header.MftRecordSizeLog; - if (numFiles > (1 << 30)) - return S_FALSE; - if (OpenCallback) - { - RINOK(OpenCallback->SetTotal(&numFiles, &mftSize)); - } -- -- ByteBuf.Alloc(kBufSize); - Recs.ClearAndReserve((unsigned)numFiles); - } -- -+ - for (UInt64 pos64 = 0;;) - { - if (OpenCallback) - { - const UInt64 numFiles = Recs.Size(); -- if ((numFiles & 0x3FF) == 0) -+ if ((numFiles & 0x3FFF) == 0) - { - RINOK(OpenCallback->SetCompleted(&numFiles, &pos64)); - } -@@ -1817,12 +1879,18 @@ HRESULT CDatabase::Open() - for (i = 0; i < Recs.Size(); i++) - { - CMftRec &rec = Recs[i]; -+ if (!rec.Is_Magic_FILE()) -+ continue; -+ - if (!rec.BaseMftRef.IsBaseItself()) - { -- UInt64 refIndex = rec.BaseMftRef.GetIndex(); -- if (refIndex > (UInt32)Recs.Size()) -+ const UInt64 refIndex = rec.BaseMftRef.GetIndex(); -+ if (refIndex >= Recs.Size()) - return S_FALSE; - CMftRec &refRec = Recs[(unsigned)refIndex]; -+ if (!refRec.Is_Magic_FILE()) -+ continue; -+ - bool moveAttrs = (refRec.SeqNumber == rec.BaseMftRef.GetNumber() && refRec.BaseMftRef.IsBaseItself()); - if (rec.InUse() && refRec.InUse()) - { -@@ -1837,12 +1905,17 @@ HRESULT CDatabase::Open() - } - - for (i = 0; i < Recs.Size(); i++) -- Recs[i].ParseDataNames(); -+ { -+ CMftRec &rec = Recs[i]; -+ if (!rec.Is_Magic_FILE()) -+ continue; -+ rec.ParseDataNames(); -+ } - - for (i = 0; i < Recs.Size(); i++) - { - CMftRec &rec = Recs[i]; -- if (!rec.IsFILE() || !rec.BaseMftRef.IsBaseItself()) -+ if (!rec.Is_Magic_FILE() || !rec.BaseMftRef.IsBaseItself()) - continue; - if (i < kNumSysRecs && !_showSystemFiles) - continue; -@@ -1864,7 +1937,7 @@ HRESULT CDatabase::Open() - FOR_VECTOR (di, rec.DataRefs) - if (rec.DataAttrs[rec.DataRefs[di].Start].Name.IsEmpty()) - { -- indexOfUnnamedStream = di; -+ indexOfUnnamedStream = (int)di; - break; - } - } -@@ -1922,14 +1995,14 @@ HRESULT CDatabase::Open() - indexOfUnnamedStream); - - if (rec.MyItemIndex < 0) -- rec.MyItemIndex = Items.Size(); -- item.ParentHost = Items.Add(item); -+ rec.MyItemIndex = (int)Items.Size(); -+ item.ParentHost = (int)Items.Add(item); - - /* we can use that code to reduce the number of alt streams: - it will not show how alt streams for hard links. */ - // if (!isMainName) continue; isMainName = false; - -- unsigned numAltStreams = 0; -+ // unsigned numAltStreams = 0; - - FOR_VECTOR (di, rec.DataRefs) - { -@@ -1947,9 +2020,9 @@ HRESULT CDatabase::Open() - continue; - } - -- numAltStreams++; -+ // numAltStreams++; - ThereAreAltStreams = true; -- item.DataIndex = di; -+ item.DataIndex = (int)di; - Items.Add(item); - } - } -@@ -1964,10 +2037,10 @@ HRESULT CDatabase::Open() - if (attr.Name == L"$SDS") - { - CMyComPtr sdsStream; -- RINOK(rec.GetStream(InStream, di, Header.ClusterSizeLog, Header.NumClusters, &sdsStream)); -+ RINOK(rec.GetStream(InStream, (int)di, Header.ClusterSizeLog, Header.NumClusters, &sdsStream)); - if (sdsStream) - { -- UInt64 size64 = attr.GetSize(); -+ const UInt64 size64 = attr.GetSize(); - if (size64 < (UInt32)1 << 29) - { - size_t size = (size_t)size64; -@@ -1997,7 +2070,7 @@ HRESULT CDatabase::Open() - const CMftRec &rec = Recs[item.RecIndex]; - const CFileNameAttr &fn = rec.FileNames[item.NameIndex]; - const CMftRef &parentDirRef = fn.ParentDirRef; -- UInt64 refIndex = parentDirRef.GetIndex(); -+ const UInt64 refIndex = parentDirRef.GetIndex(); - if (refIndex == kRecIndex_RootDir) - item.ParentFolder = -1; - else -@@ -2024,17 +2097,17 @@ HRESULT CDatabase::Open() - unsigned virtIndex = Items.Size(); - if (_showSystemFiles) - { -- _systemFolderIndex = virtIndex++; -+ _systemFolderIndex = (int)(virtIndex++); - VirtFolderNames.Add(kVirtualFolder_System); - } - if (thereAreUnknownFolders_Normal) - { -- _lostFolderIndex_Normal = virtIndex++; -+ _lostFolderIndex_Normal = (int)(virtIndex++); - VirtFolderNames.Add(kVirtualFolder_Lost_Normal); - } - if (thereAreUnknownFolders_Deleted) - { -- _lostFolderIndex_Deleted = virtIndex++; -+ _lostFolderIndex_Deleted = (int)(virtIndex++); - VirtFolderNames.Add(kVirtualFolder_Lost_Deleted); - } - --- -2.34.1 - diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/p7zip/p7zip_16.02.bb b/sources/meta-openembedded/meta-oe/recipes-extended/p7zip/p7zip_16.02.bb index 31a12fdb..498623cc 100644 --- a/sources/meta-openembedded/meta-oe/recipes-extended/p7zip/p7zip_16.02.bb +++ b/sources/meta-openembedded/meta-oe/recipes-extended/p7zip/p7zip_16.02.bb @@ -12,12 +12,14 @@ SRC_URI = "http://downloads.sourceforge.net/p7zip/p7zip/${PV}/p7zip_${PV}_src_al file://change_numMethods_from_bool_to_unsigned.patch \ file://CVE-2018-5996.patch \ file://CVE-2016-9296.patch \ - file://0001-Fix-two-buffer-overflow-vulnerabilities.patch \ " SRC_URI[md5sum] = "a0128d661cfe7cc8c121e73519c54fbf" SRC_URI[sha256sum] = "5eb20ac0e2944f6cb9c2d51dd6c4518941c185347d4089ea89087ffdd6e2341f" +UPSTREAM_CHECK_URI = "https://tracker.debian.org/pkg/p7zip" +UPSTREAM_CHECK_REGEX = "(?P\d+(\.\d+)+)" + S = "${WORKDIR}/${BPN}_${PV}" do_compile:append() { diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/pam/pam-plugin-ccreds_11.bb b/sources/meta-openembedded/meta-oe/recipes-extended/pam/pam-plugin-ccreds_11.bb index 81d0746f..1637389d 100644 --- a/sources/meta-openembedded/meta-oe/recipes-extended/pam/pam-plugin-ccreds_11.bb +++ b/sources/meta-openembedded/meta-oe/recipes-extended/pam/pam-plugin-ccreds_11.bb @@ -15,6 +15,9 @@ SRC_URI = "git://github.com/PADL/pam_ccreds;branch=master;protocol=https \ file://0001-configure-Check-for-function-from-libdb-during-confi.patch \ " +# Upstream repo does not tag +UPSTREAM_CHECK_COMMITS = "1" + S = "${WORKDIR}/git" inherit autotools diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/pam/pam-ssh-agent-auth_0.10.3.bb b/sources/meta-openembedded/meta-oe/recipes-extended/pam/pam-ssh-agent-auth_0.10.3.bb index b5bcc633..e9508b6d 100644 --- a/sources/meta-openembedded/meta-oe/recipes-extended/pam/pam-ssh-agent-auth_0.10.3.bb +++ b/sources/meta-openembedded/meta-oe/recipes-extended/pam/pam-ssh-agent-auth_0.10.3.bb @@ -53,3 +53,16 @@ do_compile () { # FILES:${PN} += "${base_libdir}/security/pam*" FILES:${PN}-dbg += "${base_libdir}/security/.debug" + +# This one is reproducible only on 32bit MACHINEs +# http://errors.yoctoproject.org/Errors/Details/766965/ +# ssh-rsa.c:59:24: error: passing argument 1 of 'EVP_DigestInit' from incompatible pointer type [-Wincompatible-pointer-types] +# ssh-rsa.c:60:26: error: passing argument 1 of 'EVP_DigestUpdate' from incompatible pointer type [-Wincompatible-pointer-types] +# ssh-rsa.c:61:25: error: passing argument 1 of 'EVP_DigestFinal' from incompatible pointer type [-Wincompatible-pointer-types] +# ssh-ecdsa.c:76:18: error: passing argument 1 of 'DSA_SIG_get0' from incompatible pointer type [-Wincompatible-pointer-types] +# ssh-ecdsa.c:76:23: error: passing argument 2 of 'DSA_SIG_get0' from incompatible pointer type [-Wincompatible-pointer-types] +# ssh-ecdsa.c:76:27: error: passing argument 3 of 'DSA_SIG_get0' from incompatible pointer type [-Wincompatible-pointer-types] +# ssh-ecdsa.c:148:18: error: passing argument 1 of 'DSA_SIG_get0' from incompatible pointer type [-Wincompatible-pointer-types] +# ssh-ecdsa.c:148:23: error: passing argument 2 of 'DSA_SIG_get0' from incompatible pointer type [-Wincompatible-pointer-types] +# ssh-ecdsa.c:148:27: error: passing argument 3 of 'DSA_SIG_get0' from incompatible pointer type [-Wincompatible-pointer-types] +CFLAGS += "-Wno-error=incompatible-pointer-types" diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/pegtl/pegtl/run-ptest b/sources/meta-openembedded/meta-oe/recipes-extended/pegtl/pegtl/run-ptest new file mode 100644 index 00000000..e819628c --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-extended/pegtl/pegtl/run-ptest @@ -0,0 +1,23 @@ +#!/bin/sh + +fail_count=0 +all_count=0 + +for test_suite in src/test/pegtl/pegtl-test-* +do + if "./$test_suite" + then + echo "PASS: $test_suite" + else + echo "FAIL: $test_suite" + fail_count=$((fail_count + 1)) + fi + all_count=$((all_count + 1)) +done + +if [ $fail_count -eq 0 ] +then + echo "PASS: All $all_count tests passed" +else + echo "FAIL: $fail_count of $all_count tests failed" +fi diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/pegtl/pegtl_3.2.7.bb b/sources/meta-openembedded/meta-oe/recipes-extended/pegtl/pegtl_3.2.7.bb deleted file mode 100644 index 237828db..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-extended/pegtl/pegtl_3.2.7.bb +++ /dev/null @@ -1,13 +0,0 @@ -DESCRIPTION="header-only library for creating parsers according to Parsing Expression Grammar" -HOMEPAGE="https://github.com/taocpp/PEGTL" -LICENSE="MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=dccf35ef30bf912bb07b01d469965293" - -SRC_URI = "git://github.com/taocpp/PEGTL.git;protocol=https;branch=3.x" -SRCREV = "cf639f7f4ee125f68e1ccfba8d99ebc0de57b9fe" - -inherit cmake - -S = "${WORKDIR}/git" - -CXXFLAGS += " -Wno-error=type-limits" diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/pegtl/pegtl_3.2.8.bb b/sources/meta-openembedded/meta-oe/recipes-extended/pegtl/pegtl_3.2.8.bb new file mode 100644 index 00000000..fc227734 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-extended/pegtl/pegtl_3.2.8.bb @@ -0,0 +1,24 @@ +DESCRIPTION="header-only library for creating parsers according to Parsing Expression Grammar" +HOMEPAGE="https://github.com/taocpp/PEGTL" +LICENSE="MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=dccf35ef30bf912bb07b01d469965293" + +SRC_URI = " \ + git://github.com/taocpp/PEGTL.git;protocol=https;branch=3.x \ + file://run-ptest \ +" + +SRCREV = "be527327653e94b02e711f7eff59285ad13e1db0" + +inherit cmake ptest + +S = "${WORKDIR}/git" + +do_install_ptest () { + install -d ${D}${PTEST_PATH}/src/test/pegtl/data + install -m 0755 ${B}/src/test/pegtl/pegtl-test-* ${D}${PTEST_PATH}/src/test/pegtl + install ${S}/src/test/pegtl/file_*.txt ${D}${PTEST_PATH}/src/test/pegtl + install ${S}/src/test/pegtl/data/*.json ${D}${PTEST_PATH}/src/test/pegtl/data +} + +CXXFLAGS += " -Wno-error=type-limits" diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/pmdk/pmdk_2.0.0.bb b/sources/meta-openembedded/meta-oe/recipes-extended/pmdk/pmdk_2.0.0.bb deleted file mode 100644 index aeda2369..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-extended/pmdk/pmdk_2.0.0.bb +++ /dev/null @@ -1,48 +0,0 @@ -SUMMARY = "Persistent Memory Development Kit" -DESCRIPTION = "Persistent Memory Development Kit" -HOMEPAGE = "http://pmem.io" -SECTION = "libs" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=b44ee63f162f9cdb18fff1224877aafd" -DEPENDS = "ndctl cmake-native" - -# Required to have the fts.h header for musl -DEPENDS:append:libc-musl = " fts" - -S = "${WORKDIR}/git" - -SRC_URI = "git://github.com/pmem/pmdk.git;branch=master;protocol=https" -SRCREV = "ba92d6b469d52d16f26279bebaf317bbdbb3822c" - -inherit autotools-brokensep pkgconfig - -# Fix jemalloc error: -# | configure: error: cannot run C compiled programs. -# | If you meant to cross compile, use `--host'. -# -# Also fix #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Werror=cpp] -EXTRA_OEMAKE = "BUILD_EXAMPLES='n' DOC='n' HOST_SYS='${HOST_SYS}' EXTRA_CFLAGS='${SELECTED_OPTIMIZATION}' LIB_PREFIX=${baselib}" - -# Fix the missing fts libs when using musl -EXTRA_OEMAKE:append:libc-musl = " EXTRA_LIBS='-lfts'" - -do_configure:prepend() { - touch .skip-doc -} - -do_install() { - oe_runmake prefix=${prefix} DESTDIR=${D} install - - # Remove uneeded files - rm -rf ${D}/usr/${baselib}/pmdk_debug -} - -# Include these by default otherwise the SDK is not very useful -FILES:${PN} += "${bindir}/pmempool ${bindir}/daxio" -FILES:${PN} += "${libdir}/*so*" -FILES:${PN} += "${libdir}/pkgconfig/*.pc" -FILES:${PN} += "${includedir}/libpmemobj++/* ${includedir}/libpmemobj/* /usr/*/include/" -FILES:${PN} += "/usr/etc" -FILES:${PN} += "/usr/share" - -COMPATIBLE_HOST='(x86_64).*' diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/pmdk/pmdk_2.1.0.bb b/sources/meta-openembedded/meta-oe/recipes-extended/pmdk/pmdk_2.1.0.bb new file mode 100644 index 00000000..100ff420 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-extended/pmdk/pmdk_2.1.0.bb @@ -0,0 +1,48 @@ +SUMMARY = "Persistent Memory Development Kit" +DESCRIPTION = "Persistent Memory Development Kit" +HOMEPAGE = "http://pmem.io" +SECTION = "libs" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=b44ee63f162f9cdb18fff1224877aafd" +DEPENDS = "ndctl cmake-native" + +# Required to have the fts.h header for musl +DEPENDS:append:libc-musl = " fts" + +S = "${WORKDIR}/git" + +SRC_URI = "git://github.com/pmem/pmdk.git;branch=master;protocol=https" +SRCREV = "5705fdffa755d00b4dbb4d6c30eb49671436f961" + +inherit autotools-brokensep pkgconfig + +# Fix jemalloc error: +# | configure: error: cannot run C compiled programs. +# | If you meant to cross compile, use `--host'. +# +# Also fix #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Werror=cpp] +EXTRA_OEMAKE = "BUILD_EXAMPLES='n' DOC='n' HOST_SYS='${HOST_SYS}' EXTRA_CFLAGS='${SELECTED_OPTIMIZATION}' LIB_PREFIX=${baselib}" + +# Fix the missing fts libs when using musl +EXTRA_OEMAKE:append:libc-musl = " EXTRA_LIBS='-lfts'" + +do_configure:prepend() { + touch .skip-doc +} + +do_install() { + oe_runmake prefix=${prefix} DESTDIR=${D} install + + # Remove uneeded files + rm -rf ${D}/usr/${baselib}/pmdk_debug +} + +# Include these by default otherwise the SDK is not very useful +FILES:${PN} += "${bindir}/pmempool ${bindir}/daxio" +FILES:${PN} += "${libdir}/*so*" +FILES:${PN} += "${libdir}/pkgconfig/*.pc" +FILES:${PN} += "${includedir}/libpmemobj++/* ${includedir}/libpmemobj/* /usr/*/include/" +FILES:${PN} += "/usr/etc" +FILES:${PN} += "/usr/share" + +COMPATIBLE_HOST='(x86_64).*' diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/polkit/files/meson-build-Support-openembedded-OS-for-PAM-config.patch b/sources/meta-openembedded/meta-oe/recipes-extended/polkit/files/meson-build-Support-openembedded-OS-for-PAM-config.patch new file mode 100644 index 00000000..445f2fbd --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-extended/polkit/files/meson-build-Support-openembedded-OS-for-PAM-config.patch @@ -0,0 +1,48 @@ +From 7c89b88f0f81ad220d08d69d212c14c6eeefb647 Mon Sep 17 00:00:00 2001 +From: Yoann Congal +Date: Tue, 3 Sep 2024 12:17:42 +0200 +Subject: [PATCH] meson.build: Support "openembedded" OS for PAM config + +In Openembedded, same as Suse/Solaris: PAM files are common-*: +* PAM_FILE_INCLUDE_AUTH: common-auth +* PAM_FILE_INCLUDE_ACCOUNT: common-account +* PAM_FILE_INCLUDE_PASSWORD: common-password +* PAM_FILE_INCLUDE_SESSION: common-session +See OE-Core libpam recipe. + +NB: This is also the same config as Debian but its not mentioned in the +code. + +Signed-off-by: Yoann Congal +Upstream-Status: Backport [https://github.com/polkit-org/polkit/commit/1d4f7f4d9f3d74fb2649c96faa8677416c1aefc2] +--- + meson.build | 2 +- + meson_options.txt | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/meson.build b/meson.build +index 302c189..a55f2d6 100644 +--- a/meson.build ++++ b/meson.build +@@ -311,7 +311,7 @@ endif + + pam_include = get_option('pam_include') + if pam_include == '' +- if ['suse', 'solaris'].contains(os_type) ++ if ['suse', 'solaris', 'openembedded'].contains(os_type) + pam_conf = { + 'PAM_FILE_INCLUDE_AUTH': 'common-auth', + 'PAM_FILE_INCLUDE_ACCOUNT': 'common-account', +diff --git a/meson_options.txt b/meson_options.txt +index c2e4a6c..14d7a50 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -6,7 +6,7 @@ option('polkitd_user', type: 'string', value: 'polkitd', description: 'User for + option('polkitd_uid', type: 'string', value: '-', description: 'Fixed UID for user running polkitd (polkitd)') + + option('authfw', type: 'combo', choices: ['pam', 'shadow', 'bsdauth'], value: 'pam', description: 'Authentication framework (pam/shadow)') +-option('os_type', type: 'combo', choices: ['redhat', 'suse', 'gentoo', 'pardus', 'solaris', 'netbsd', 'lfs', ''], value: '', description: 'distribution or OS') ++option('os_type', type: 'combo', choices: ['redhat', 'suse', 'gentoo', 'pardus', 'solaris', 'netbsd', 'lfs', 'openembedded', ''], value: '', description: 'distribution or OS') + + option('pam_include', type: 'string', value: '', description: 'pam file to include') + option('pam_module_dir', type: 'string', value: '', description: 'directory to install PAM security module') diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/polkit/polkit-group-rule-datetime.bb b/sources/meta-openembedded/meta-oe/recipes-extended/polkit/polkit-group-rule-datetime.bb index 8a14018a..c0066d56 100644 --- a/sources/meta-openembedded/meta-oe/recipes-extended/polkit/polkit-group-rule-datetime.bb +++ b/sources/meta-openembedded/meta-oe/recipes-extended/polkit/polkit-group-rule-datetime.bb @@ -7,7 +7,7 @@ require polkit-group-rule.inc SRC_URI = "file://50-org.freedesktop.timedate1.rules" do_install() { - install -m 0755 ${WORKDIR}/50-org.freedesktop.timedate1.rules ${D}${sysconfdir}/polkit-1/rules.d + install -D -m 0755 ${UNPACKDIR}/50-org.freedesktop.timedate1.rules ${D}${datadir}/polkit-1/rules.d } USERADD_PACKAGES = "${PN}" diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/polkit/polkit-group-rule-network.bb b/sources/meta-openembedded/meta-oe/recipes-extended/polkit/polkit-group-rule-network.bb index 8266fa63..ec8ff868 100644 --- a/sources/meta-openembedded/meta-oe/recipes-extended/polkit/polkit-group-rule-network.bb +++ b/sources/meta-openembedded/meta-oe/recipes-extended/polkit/polkit-group-rule-network.bb @@ -7,7 +7,7 @@ require polkit-group-rule.inc SRC_URI = "file://50-org.freedesktop.NetworkManager.rules" do_install() { - install -m 0755 ${WORKDIR}/50-org.freedesktop.NetworkManager.rules ${D}${sysconfdir}/polkit-1/rules.d + install -D -m 0755 ${UNPACKDIR}/50-org.freedesktop.NetworkManager.rules ${D}${datadir}/polkit-1/rules.d } USERADD_PACKAGES = "${PN}" diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/polkit/polkit-group-rule-udisks2.bb b/sources/meta-openembedded/meta-oe/recipes-extended/polkit/polkit-group-rule-udisks2.bb index db2ed015..884590d4 100644 --- a/sources/meta-openembedded/meta-oe/recipes-extended/polkit/polkit-group-rule-udisks2.bb +++ b/sources/meta-openembedded/meta-oe/recipes-extended/polkit/polkit-group-rule-udisks2.bb @@ -10,7 +10,7 @@ SRC_URI = "file://50-org.freedesktop.udiskie.rules" RDEPENDS:${PN} += "udisks2" do_install() { - install -m 0755 ${WORKDIR}/50-org.freedesktop.udiskie.rules ${D}${sysconfdir}/polkit-1/rules.d + install -D -m 0755 ${UNPACKDIR}/50-org.freedesktop.udiskie.rules ${D}${datadir}/polkit-1/rules.d } USERADD_PACKAGES = "${PN}" diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/polkit/polkit-group-rule.inc b/sources/meta-openembedded/meta-oe/recipes-extended/polkit/polkit-group-rule.inc index 4aeeb77d..f57ca261 100644 --- a/sources/meta-openembedded/meta-oe/recipes-extended/polkit/polkit-group-rule.inc +++ b/sources/meta-openembedded/meta-oe/recipes-extended/polkit/polkit-group-rule.inc @@ -6,8 +6,4 @@ REQUIRED_DISTRO_FEATURES = "polkit" inherit useradd -do_install:prepend() { - install -m 700 -d ${D}${sysconfdir}/polkit-1/rules.d - chown polkitd:root ${D}/${sysconfdir}/polkit-1/rules.d -} -USERADD_PARAM:${PN}:prepend = "--system --no-create-home --user-group --home-dir ${sysconfdir}/polkit-1 polkitd;" +FILES:${PN} += "${datadir}/polkit-1/rules.d" diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/polkit/polkit_124.bb b/sources/meta-openembedded/meta-oe/recipes-extended/polkit/polkit_124.bb deleted file mode 100644 index a597b40e..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-extended/polkit/polkit_124.bb +++ /dev/null @@ -1,60 +0,0 @@ -SUMMARY = "Polkit Authorization Framework" -DESCRIPTION = "The polkit package is an application-level toolkit for defining and handling the policy that allows unprivileged processes to speak to privileged processes." -HOMEPAGE = "http://www.freedesktop.org/wiki/Software/polkit" -LICENSE = "LGPL-2.0-or-later" -LIC_FILES_CHKSUM = "file://COPYING;md5=155db86cdbafa7532b41f390409283eb" -BUGTRACKER = "https://github.com/polkit-org/polkit/issues" - -SRC_URI = "git://github.com/polkit-org/polkit.git;protocol=https;branch=main" - -S = "${WORKDIR}/git" -SRCREV = "82f0924dc0eb23b9df68e88dbaf9e07c81940a5a" - -DEPENDS = "expat glib-2.0" - -inherit meson pkgconfig useradd systemd gettext gobject-introspection features_check - -REQUIRED_DISTRO_FEATURES = "polkit" - -PACKAGECONFIG = " \ - ${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', 'consolekit', d)} \ - dbus \ - mozjs \ -" -PACKAGECONFIG[dbus] = ",,dbus" -PACKAGECONFIG[gtk-doc] = "-Dgtk_doc=true,-Dgtk_doc=false,gtk-doc-native" -PACKAGECONFIG[pam] = "-Dauthfw=pam,-Dauthfw=shadow,libpam,libpam" -PACKAGECONFIG[systemd] = "-Dsession_tracking=libsystemd-login,-Dsession_tracking=ConsoleKit,systemd" -PACKAGECONFIG[consolekit] = ",,,consolekit" - -# Default to mozjs javascript library -PACKAGECONFIG[mozjs] = "-Djs_engine=mozjs,,mozjs-115,,,duktape" -# duktape javascript engine is much smaller and faster but is not compatible with -# same javascript standards as mozjs. For example array.includes() function is not -# supported. Test rule compatibility when switching to duktape. -PACKAGECONFIG[duktape] = "-Djs_engine=duktape,,duktape,,,mozjs" - -USERADD_PACKAGES = "${PN}" -USERADD_PARAM:${PN} = "--system --no-create-home --user-group --home-dir ${sysconfdir}/${BPN}-1 --shell /bin/nologin polkitd" - -SYSTEMD_SERVICE:${PN} = "${BPN}.service" -SYSTEMD_AUTO_ENABLE = "disable" - -do_install:append() { - #Fix up permissions on polkit rules.d to work with rpm4 constraints - chmod 700 ${D}/${datadir}/polkit-1/rules.d - chmod 700 ${D}/${sysconfdir}/polkit-1/rules.d - chown polkitd:root ${D}/${datadir}/polkit-1/rules.d - chown polkitd:root ${D}/${sysconfdir}/polkit-1/rules.d -} - -FILES:${PN} += " \ - ${libdir}/pam.d/polkit-1 \ - ${libdir}/sysusers.d \ - ${libdir}/polkit-1 \ - ${nonarch_libdir}/pam.d/polkit-1 \ - ${nonarch_libdir}/sysusers.d \ - ${nonarch_libdir}/polkit-1 \ - ${datadir} \ -" diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/polkit/polkit_125.bb b/sources/meta-openembedded/meta-oe/recipes-extended/polkit/polkit_125.bb new file mode 100644 index 00000000..a67aaf90 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-extended/polkit/polkit_125.bb @@ -0,0 +1,76 @@ +SUMMARY = "Polkit Authorization Framework" +DESCRIPTION = "The polkit package is an application-level toolkit for defining and handling the policy that allows unprivileged processes to speak to privileged processes." +HOMEPAGE = "http://www.freedesktop.org/wiki/Software/polkit" +LICENSE = "LGPL-2.0-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=155db86cdbafa7532b41f390409283eb" +BUGTRACKER = "https://github.com/polkit-org/polkit/issues" + +SRC_URI = "git://github.com/polkit-org/polkit.git;protocol=https;branch=main \ + file://meson-build-Support-openembedded-OS-for-PAM-config.patch \ + " + +S = "${WORKDIR}/git" +SRCREV = "112752c12da812a163dac67d7f675b60de8f7d7b" + +DEPENDS = "expat glib-2.0" + +inherit meson pkgconfig useradd systemd gettext gobject-introspection features_check + +REQUIRED_DISTRO_FEATURES = "polkit" + +# Prevent meson.build to try to autodetect host OS (which could lead to +# non-reproducibility) +EXTRA_OEMESON = "-Dos_type=openembedded" + +PACKAGECONFIG = " \ + ${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', 'consolekit', d)} \ + dbus \ + mozjs \ +" +PACKAGECONFIG[dbus] = ",,dbus" +PACKAGECONFIG[gtk-doc] = "-Dgtk_doc=true,-Dgtk_doc=false,gtk-doc-native" +PACKAGECONFIG[pam] = "-Dauthfw=pam,-Dauthfw=shadow,libpam,libpam" +PACKAGECONFIG[systemd] = "-Dsession_tracking=logind,,systemd,,,consolekit elogind" +PACKAGECONFIG[consolekit] = "-Dsession_tracking=ConsoleKit,,,consolekit,,systemd elogind" +PACKAGECONFIG[elogind] = "-Dsession_tracking=libelogin,,elogind,,,systemd consolekit" +PACKAGECONFIG[libs-only] = "-Dlibs-only=true,-Dlibs-only=false" + +# Default to mozjs javascript library +PACKAGECONFIG[mozjs] = "-Djs_engine=mozjs,,mozjs-115,,,duktape" +# duktape javascript engine is much smaller and faster but is not compatible with +# same javascript standards as mozjs. For example array.includes() function is not +# supported. Test rule compatibility when switching to duktape. +PACKAGECONFIG[duktape] = "-Djs_engine=duktape,,duktape,,,mozjs" + +USERADD_PACKAGES = "${PN}" +USERADD_PARAM:${PN} = "--system --no-create-home --user-group --home-dir ${sysconfdir}/${BPN}-1 --shell /bin/nologin polkitd" + +SYSTEMD_SERVICE:${PN} = "${BPN}.service" +SYSTEMD_AUTO_ENABLE = "disable" + +do_install:append() { + #Fix up permissions on polkit rules.d to work with rpm4 constraints + if ${@bb.utils.contains('PACKAGECONFIG', 'libs-only', 'false', 'true', d)}; then + chmod 700 ${D}/${sysconfdir}/polkit-1/rules.d + chown polkitd:root ${D}/${sysconfdir}/polkit-1/rules.d + fi + + # Polkit unconditionally installs a systemd service, remove it on SysVinit + # systems to avoid "installed but not packaged file" error. + if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then + rm -r ${D}${libdir}/systemd + fi +} + +FILES:${PN} += " \ + ${libdir}/pam.d/polkit-1 \ + ${libdir}/sysusers.d \ + ${libdir}/tmpfiles.d \ + ${libdir}/polkit-1 \ + ${nonarch_libdir}/pam.d/polkit-1 \ + ${nonarch_libdir}/sysusers.d \ + ${nonarch_libdir}/tmpfiles.d \ + ${nonarch_libdir}/polkit-1 \ + ${datadir} \ +" diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/properties-cpp/properties-cpp_git.bb b/sources/meta-openembedded/meta-oe/recipes-extended/properties-cpp/properties-cpp_git.bb index 25951c9d..029ec233 100644 --- a/sources/meta-openembedded/meta-oe/recipes-extended/properties-cpp/properties-cpp_git.bb +++ b/sources/meta-openembedded/meta-oe/recipes-extended/properties-cpp/properties-cpp_git.bb @@ -11,6 +11,9 @@ PV = "0.0.1+git" SRCREV = "45863e849b39c4921d6553e6d27e267a96ac7d77" SRC_URI = "git://github.com/lib-cpp/${BPN}.git;branch=master;protocol=https" +# Upstream repo does not tag +UPSTREAM_CHECK_COMMITS = "1" + S = "${WORKDIR}/git" do_configure:prepend() { diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/qad/qad_git.bb b/sources/meta-openembedded/meta-oe/recipes-extended/qad/qad_git.bb index 0bc94121..c68469fc 100644 --- a/sources/meta-openembedded/meta-oe/recipes-extended/qad/qad_git.bb +++ b/sources/meta-openembedded/meta-oe/recipes-extended/qad/qad_git.bb @@ -14,6 +14,9 @@ SRC_URI = "git://gitlab.com/CodethinkLabs/qad/qad;branch=main;protocol=https \ SRCREV = "ae0c099c1fdc0ca6f5d631cea6b302937122b362" +# Upstream repo does not tag +UPSTREAM_CHECK_COMMITS = "1" + S = "${WORKDIR}/git" PV = "0.0+git" diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/qcbor/qcbor_1.4.1.bb b/sources/meta-openembedded/meta-oe/recipes-extended/qcbor/qcbor_1.4.1.bb new file mode 100644 index 00000000..b04d8df1 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-extended/qcbor/qcbor_1.4.1.bb @@ -0,0 +1,30 @@ +DESCRIPTION = " \ + QCBOR is a powerful, commercial-quality CBOR encoder/decoder that \ + implements these RFCs: RFC8949, RFC7049, RFC8742, RFC8943 \ +" + +HOMEPAGE = "https://github.com/laurencelundblade/QCBOR" + +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=498c298542365dfcfe29948c72a5849b" + +SRC_URI = "git://github.com/laurencelundblade/QCBOR;protocol=https;branch=master" + +SRCREV = "4487f10e1bf258434fb8a39e4f59c29e31910ad0" + +S = "${WORKDIR}/git" + +inherit pkgconfig + +CFLAGS += " \ + -DUSEFULBUF_DISABLE_ALL_FLOAT \ +" + +do_install(){ + install -d ${D}${libdir} + install -m 755 ${S}/libqcbor.a ${D}${libdir}/ + install -d ${D}${includedir}/qcbor + install -m 644 ${S}/inc/*.h ${D}${includedir} + install -m 644 ${S}/inc/qcbor/*.h ${D}${includedir}/qcbor +} + diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/qcbor/qcbor_git.bb b/sources/meta-openembedded/meta-oe/recipes-extended/qcbor/qcbor_git.bb deleted file mode 100644 index a87454fa..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-extended/qcbor/qcbor_git.bb +++ /dev/null @@ -1,32 +0,0 @@ -DESCRIPTION = " \ - QCBOR is a powerful, commercial-quality CBOR encoder/decoder that \ - implements these RFCs: RFC8949, RFC7049, RFC8742, RFC8943 \ -" - -HOMEPAGE = "https://github.com/laurencelundblade/QCBOR" - -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://README.md;beginline=442;endline=463;md5=b55643261d6d221dac2b7a395105af62" - -SRC_URI = "git://github.com/laurencelundblade/QCBOR;protocol=https;branch=master" - -SRCREV = "44754f738c6534a4304a83d4c6e97b3d3193d887" - -PV = "1.2+git" - -S = "${WORKDIR}/git" - -inherit pkgconfig - -CFLAGS += " \ - -DUSEFULBUF_DISABLE_ALL_FLOAT \ -" - -do_install(){ - install -d ${D}${libdir} - install -m 755 ${S}/libqcbor.a ${D}${libdir}/ - install -d ${D}${includedir}/qcbor - install -m 644 ${S}/inc/*.h ${D}${includedir} - install -m 644 ${S}/inc/qcbor/*.h ${D}${includedir}/qcbor -} - diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/rarpd/rarpd_ss981107.bb b/sources/meta-openembedded/meta-oe/recipes-extended/rarpd/rarpd_ss981107.bb index 7359c125..29343124 100644 --- a/sources/meta-openembedded/meta-oe/recipes-extended/rarpd/rarpd_ss981107.bb +++ b/sources/meta-openembedded/meta-oe/recipes-extended/rarpd/rarpd_ss981107.bb @@ -36,10 +36,10 @@ do_install() { install -m 755 rarpd.init ${D}${sysconfdir}/init.d/rarpd install -m 755 rarpd ${D}${sbindir}/rarpd install -m 644 rarpd.8 ${D}${mandir}/man8/rarpd.8 - install -m 644 ${WORKDIR}/ethers.sample ${D}${sysconfdir}/ethers + install -m 644 ${UNPACKDIR}/ethers.sample ${D}${sysconfdir}/ethers install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/rarpd.service ${D}${systemd_unitdir}/system/ + install -m 0644 ${UNPACKDIR}/rarpd.service ${D}${systemd_unitdir}/system/ } inherit systemd diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.5/0001-src-Do-not-reset-FINAL_LIBS.patch b/sources/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.5/0001-src-Do-not-reset-FINAL_LIBS.patch new file mode 100644 index 00000000..01e53e3f --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.5/0001-src-Do-not-reset-FINAL_LIBS.patch @@ -0,0 +1,30 @@ +From d9d1f9a501ef7caa80d1e6595218898e9989ec2b Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 10 Sep 2019 20:04:26 -0700 +Subject: [PATCH] src: Do not reset FINAL_LIBS + +This helps case where additional libraries are needed to be passed from +environment to get it going + +e.g. -latomic is needed on clang/x86 to provide for 64bit atomics + +Upstream-Status: Pending +Signed-off-by: Khem Raj + +--- + src/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/Makefile b/src/Makefile +index 39decee..f5efe82 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -119,7 +119,7 @@ endif + + FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(REDIS_CFLAGS) + FINAL_LDFLAGS=$(LDFLAGS) $(REDIS_LDFLAGS) $(DEBUG) +-FINAL_LIBS=-lm ++FINAL_LIBS+=-lm + DEBUG=-g -ggdb + + # Linux ARM32 needs -latomic at linking time diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.8/0006-Define-correct-gregs-for-RISCV32.patch b/sources/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.5/0006-Define-correct-gregs-for-RISCV32.patch similarity index 97% rename from sources/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.8/0006-Define-correct-gregs-for-RISCV32.patch rename to sources/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.5/0006-Define-correct-gregs-for-RISCV32.patch index 70090481..93c35952 100644 --- a/sources/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.8/0006-Define-correct-gregs-for-RISCV32.patch +++ b/sources/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.5/0006-Define-correct-gregs-for-RISCV32.patch @@ -1,14 +1,14 @@ -From dd3ecb07bbf80b986b8f2c656ea11d1346e212f6 Mon Sep 17 00:00:00 2001 +From 634f62be6c135ece93cb4e44a69ce3cb66f394ca Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 26 Oct 2020 21:32:22 -0700 Subject: [PATCH] Define correct gregs for RISCV32 Upstream-Status: Pending - Signed-off-by: Khem Raj Updated patch for 6.2.8 Signed-off-by: Changqing Li + --- src/debug.c | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.5/GNU_SOURCE-7.patch b/sources/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.5/GNU_SOURCE-7.patch new file mode 100644 index 00000000..6e07c25c --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.5/GNU_SOURCE-7.patch @@ -0,0 +1,29 @@ +From a22512ac1cbd6de1f5646219722e49752d1f60ac Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 21 Dec 2019 12:09:51 -0800 +Subject: [PATCH] Define _GNU_SOURCE to get PTHREAD_MUTEX_INITIALIZER + +Fixes +| zmalloc.c:87:37: error: 'PTHREAD_MUTEX_DEFAULT' undeclared here (not in a function) +| 87 | pthread_mutex_t used_memory_mutex = PTHREAD_MUTEX_INITIALIZER; +| | ^~~~~~~~~~~~~~~~~~~~~~~~~ + +Upstream-Status: Pending +Signed-off-by: Khem Raj + +--- + src/zmalloc.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/zmalloc.c b/src/zmalloc.c +index ba03685..322304f 100644 +--- a/src/zmalloc.c ++++ b/src/zmalloc.c +@@ -32,6 +32,7 @@ + #include "config.h" + #include "solarisfixes.h" + ++#define _GNU_SOURCE + #include + #include + #include diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.5/hiredis-use-default-CC-if-it-is-set.patch b/sources/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.5/hiredis-use-default-CC-if-it-is-set.patch new file mode 100644 index 00000000..7785acca --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.5/hiredis-use-default-CC-if-it-is-set.patch @@ -0,0 +1,38 @@ +From 41efa2f0cf08c91ff935bbb2d16ab233df7f5811 Mon Sep 17 00:00:00 2001 +From: Venture Research +Date: Fri, 8 Feb 2013 17:39:52 -0600 +Subject: [PATCH] hiredis: use default CC if it is set +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Instead of trying to automagically figure out CC, which breaks with OE +as CC has spaces in it, just skip it if one was already passed in. + +Signed-off-by: Venture Research + +Update to work with 4.0.8 +Signed-off-by: Alistair Francis + +Reworked for 6.0.4 +Signed-off-by: Andreas Müller + +--- +Upstream-Status: Pending + + deps/hiredis/Makefile | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/deps/hiredis/Makefile b/deps/hiredis/Makefile +index bd2106b..9ce768d 100644 +--- a/deps/hiredis/Makefile ++++ b/deps/hiredis/Makefile +@@ -36,8 +36,6 @@ endef + export REDIS_TEST_CONFIG + + # Fallback to gcc when $CC is not in $PATH. +-CC:=$(shell sh -c 'type $${CC%% *} >/dev/null 2>/dev/null && echo $(CC) || echo gcc') +-CXX:=$(shell sh -c 'type $${CXX%% *} >/dev/null 2>/dev/null && echo $(CXX) || echo g++') + OPTIMIZATION?=-O3 + WARNINGS=-Wall -Wextra -Werror -Wstrict-prototypes -Wwrite-strings -Wno-missing-field-initializers + DEBUG_FLAGS?= -g -ggdb diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.8/init-redis-server b/sources/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.5/init-redis-server old mode 100644 new mode 100755 similarity index 100% rename from sources/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.8/init-redis-server rename to sources/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.5/init-redis-server diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.5/lua-update-Makefile-to-use-environment-build-setting.patch b/sources/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.5/lua-update-Makefile-to-use-environment-build-setting.patch new file mode 100644 index 00000000..20708eda --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.5/lua-update-Makefile-to-use-environment-build-setting.patch @@ -0,0 +1,77 @@ +From aa3d31355f3cc140b1dc2f4fcff8e3c0aa261549 Mon Sep 17 00:00:00 2001 +From: Venture Research +Date: Fri, 8 Feb 2013 20:22:19 -0600 +Subject: [PATCH] lua: update Makefile to use environment build settings + +OE-specific parameters, instead of overriding all of these simply use +the ones that are already passed in. Also configure for only Linux... + +Signed-off-by: Venture Research + +Updated to work with 3.0.x + +Signed-off-by: Armin Kuster + +updated to work wtih 6.2.1 +Signed-off-by: Yi Fan Yu + +Upstream-Status: Pending +--- + deps/Makefile | 1 - + deps/lua/Makefile | 1 - + deps/lua/src/Makefile | 16 ++++++---------- + 3 files changed, 6 insertions(+), 12 deletions(-) + +diff --git a/deps/Makefile b/deps/Makefile +index 3bf0363..fd8765a 100644 +--- a/deps/Makefile ++++ b/deps/Makefile +@@ -94,7 +94,6 @@ endif + # lua's Makefile defines AR="ar rcu", which is unusual, and makes it more + # challenging to cross-compile lua (and redis). These defines make it easier + # to fit redis into cross-compilation environments, which typically set AR. +-AR=ar + ARFLAGS=rc + + lua: .make-prerequisites +diff --git a/deps/lua/Makefile b/deps/lua/Makefile +index 209a132..72f4b2b 100644 +--- a/deps/lua/Makefile ++++ b/deps/lua/Makefile +@@ -33,7 +33,6 @@ INSTALL_DATA= $(INSTALL) -m 0644 + + # Utilities. + MKDIR= mkdir -p +-RANLIB= ranlib + + # == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE ========= + +diff --git a/deps/lua/src/Makefile b/deps/lua/src/Makefile +index f3bba2f..1555ec0 100644 +--- a/deps/lua/src/Makefile ++++ b/deps/lua/src/Makefile +@@ -5,18 +5,14 @@ + # == CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT ======================= + + # Your platform. See PLATS for possible values. +-PLAT= none ++PLAT= linux + +-CC?= gcc +-CFLAGS= -O2 -Wall $(MYCFLAGS) +-AR= ar rcu +-RANLIB= ranlib +-RM= rm -f +-LIBS= -lm $(MYLIBS) +- +-MYCFLAGS= ++MYCFLAGS=-DLUA_USE_LINUX + MYLDFLAGS= +-MYLIBS= ++MYLIBS=-Wl,-E -ldl -lreadline -lhistory -lncurses ++ ++CFLAGS += $(MYCFLAGS) ++LIBS += -lm $(MYLIBS) + + # == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE ========= + diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.5/oe-use-libc-malloc.patch b/sources/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.5/oe-use-libc-malloc.patch new file mode 100644 index 00000000..7b601e02 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.5/oe-use-libc-malloc.patch @@ -0,0 +1,36 @@ +From 38a5f403b033d03cdac3ff814687d83f61527d8e Mon Sep 17 00:00:00 2001 +From: Venture Research +Date: Wed, 6 Feb 2013 20:51:02 -0600 +Subject: [PATCH] hack to force use of libc malloc + +Hack to force libc usage as it seems the option to pass it in has been +removed in favor of magic. + +Note that this of course doesn't allow tcmalloc and jemalloc, however +jemalloc wasn't building correctly. + +Signed-off-by: Venture Research + +Update to work with 4.0.8 +Signed-off-by: Alistair Francis + +--- +Upstream-Status: Pending + + src/Makefile | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/Makefile b/src/Makefile +index ecbd275..39decee 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -13,7 +13,8 @@ + # Just use 'make dep', but this is only needed by developers. + + release_hdr := $(shell sh -c './mkreleasehdr.sh') +-uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not') ++# use fake uname option to force use of generic libc ++uname_S := "USE_LIBC_MALLOC" + uname_M := $(shell sh -c 'uname -m 2>/dev/null || echo not') + CLANG := $(findstring clang,$(shell sh -c '$(CC) --version | head -1')) + OPTIMIZATION?=-O3 diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.8/redis.conf b/sources/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.5/redis.conf similarity index 100% rename from sources/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.8/redis.conf rename to sources/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.5/redis.conf diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.8/redis.service b/sources/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.5/redis.service similarity index 100% rename from sources/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.8/redis.service rename to sources/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.5/redis.service diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.8/0001-hiredis-use-default-CC-if-it-is-set.patch b/sources/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.8/0001-hiredis-use-default-CC-if-it-is-set.patch deleted file mode 100644 index 63bf4034..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.8/0001-hiredis-use-default-CC-if-it-is-set.patch +++ /dev/null @@ -1,37 +0,0 @@ -From af4fc632c03b2a68be4206b4896f27fc4bb865ae Mon Sep 17 00:00:00 2001 -From: Venture Research -Date: Fri, 8 Feb 2013 17:39:52 -0600 -Subject: [PATCH] hiredis: use default CC if it is set -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Instead of trying to automagically figure out CC, which breaks with OE -as CC has spaces in it, just skip it if one was already passed in. - -Upstream-Status: Pending - -Signed-off-by: Venture Research - -Update to work with 4.0.8 -Signed-off-by: Alistair Francis - -Reworked for 6.0.4 -Signed-off-by: Andreas Müller ---- - deps/hiredis/Makefile | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/deps/hiredis/Makefile b/deps/hiredis/Makefile -index bd2106b..9ce768d 100644 ---- a/deps/hiredis/Makefile -+++ b/deps/hiredis/Makefile -@@ -36,8 +36,6 @@ endef - export REDIS_TEST_CONFIG - - # Fallback to gcc when $CC is not in $PATH. --CC:=$(shell sh -c 'type $${CC%% *} >/dev/null 2>/dev/null && echo $(CC) || echo gcc') --CXX:=$(shell sh -c 'type $${CXX%% *} >/dev/null 2>/dev/null && echo $(CXX) || echo g++') - OPTIMIZATION?=-O3 - WARNINGS=-Wall -Wextra -Werror -Wstrict-prototypes -Wwrite-strings -Wno-missing-field-initializers - DEBUG_FLAGS?= -g -ggdb diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.8/0002-lua-update-Makefile-to-use-environment-build-setting.patch b/sources/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.8/0002-lua-update-Makefile-to-use-environment-build-setting.patch deleted file mode 100644 index 46330f50..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.8/0002-lua-update-Makefile-to-use-environment-build-setting.patch +++ /dev/null @@ -1,77 +0,0 @@ -From 45ae5eb5c3482054073e06ab1a78e0aa9b96447f Mon Sep 17 00:00:00 2001 -From: Venture Research -Date: Fri, 8 Feb 2013 20:22:19 -0600 -Subject: [PATCH] lua: update Makefile to use environment build settings - -OE-specific parameters, instead of overriding all of these simply use -the ones that are already passed in. Also configure for only Linux... - -Upstream-Status: Pending - -Signed-off-by: Venture Research - -Updated to work with 3.0.x - -Signed-off-by: Armin Kuster - -updated to work wtih 6.2.1 -Signed-off-by: Yi Fan Yu ---- - deps/Makefile | 1 - - deps/lua/Makefile | 1 - - deps/lua/src/Makefile | 16 ++++++---------- - 3 files changed, 6 insertions(+), 12 deletions(-) - -diff --git a/deps/Makefile b/deps/Makefile -index 3bf0363..fd8765a 100644 ---- a/deps/Makefile -+++ b/deps/Makefile -@@ -94,7 +94,6 @@ endif - # lua's Makefile defines AR="ar rcu", which is unusual, and makes it more - # challenging to cross-compile lua (and redis). These defines make it easier - # to fit redis into cross-compilation environments, which typically set AR. --AR=ar - ARFLAGS=rc - - lua: .make-prerequisites -diff --git a/deps/lua/Makefile b/deps/lua/Makefile -index 209a132..72f4b2b 100644 ---- a/deps/lua/Makefile -+++ b/deps/lua/Makefile -@@ -33,7 +33,6 @@ INSTALL_DATA= $(INSTALL) -m 0644 - - # Utilities. - MKDIR= mkdir -p --RANLIB= ranlib - - # == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE ========= - -diff --git a/deps/lua/src/Makefile b/deps/lua/src/Makefile -index f3bba2f..1555ec0 100644 ---- a/deps/lua/src/Makefile -+++ b/deps/lua/src/Makefile -@@ -5,18 +5,14 @@ - # == CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT ======================= - - # Your platform. See PLATS for possible values. --PLAT= none -+PLAT= linux - --CC?= gcc --CFLAGS= -O2 -Wall $(MYCFLAGS) --AR= ar rcu --RANLIB= ranlib --RM= rm -f --LIBS= -lm $(MYLIBS) -- --MYCFLAGS= -+MYCFLAGS=-DLUA_USE_LINUX - MYLDFLAGS= --MYLIBS= -+MYLIBS=-Wl,-E -ldl -lreadline -lhistory -lncurses -+ -+CFLAGS += $(MYCFLAGS) -+LIBS += -lm $(MYLIBS) - - # == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE ========= - diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.8/0003-hack-to-force-use-of-libc-malloc.patch b/sources/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.8/0003-hack-to-force-use-of-libc-malloc.patch deleted file mode 100644 index 1f97f978..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.8/0003-hack-to-force-use-of-libc-malloc.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 7a98e3ac480413ce7db3a5edd5dc70458b921b29 Mon Sep 17 00:00:00 2001 -From: Venture Research -Date: Wed, 6 Feb 2013 20:51:02 -0600 -Subject: [PATCH] hack to force use of libc malloc - -Hack to force libc usage as it seems the option to pass it in has been -removed in favor of magic. - -Note that this of course doesn't allow tcmalloc and jemalloc, however -jemalloc wasn't building correctly. - -Upstream-Status: Pending - -Signed-off-by: Venture Research - -Update to work with 4.0.8 -Signed-off-by: Alistair Francis ---- - src/Makefile | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/Makefile b/src/Makefile -index ecbd275..39decee 100644 ---- a/src/Makefile -+++ b/src/Makefile -@@ -13,7 +13,8 @@ - # Just use 'make dep', but this is only needed by developers. - - release_hdr := $(shell sh -c './mkreleasehdr.sh') --uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not') -+# use fake uname option to force use of generic libc -+uname_S := "USE_LIBC_MALLOC" - uname_M := $(shell sh -c 'uname -m 2>/dev/null || echo not') - CLANG := $(findstring clang,$(shell sh -c '$(CC) --version | head -1')) - OPTIMIZATION?=-O3 diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.8/0004-src-Do-not-reset-FINAL_LIBS.patch b/sources/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.8/0004-src-Do-not-reset-FINAL_LIBS.patch deleted file mode 100644 index 974cf516..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.8/0004-src-Do-not-reset-FINAL_LIBS.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 50fc46a12f6cf97e7b927d3ea29eecc9ebdea34d Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Tue, 10 Sep 2019 20:04:26 -0700 -Subject: [PATCH] src: Do not reset FINAL_LIBS - -This helps case where additional libraries are needed to be passed from -environment to get it going - -e.g. -latomic is needed on clang/x86 to provide for 64bit atomics - -Upstream-Status: Pending - -Signed-off-by: Khem Raj ---- - src/Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/Makefile b/src/Makefile -index 39decee..f5efe82 100644 ---- a/src/Makefile -+++ b/src/Makefile -@@ -119,7 +119,7 @@ endif - - FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(REDIS_CFLAGS) - FINAL_LDFLAGS=$(LDFLAGS) $(REDIS_LDFLAGS) $(DEBUG) --FINAL_LIBS=-lm -+FINAL_LIBS+=-lm - DEBUG=-g -ggdb - - # Linux ARM32 needs -latomic at linking time diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.8/0005-Define-_GNU_SOURCE-to-get-PTHREAD_MUTEX_INITIALIZER.patch b/sources/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.8/0005-Define-_GNU_SOURCE-to-get-PTHREAD_MUTEX_INITIALIZER.patch deleted file mode 100644 index 8e5f3099..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-extended/redis/redis-7.2.8/0005-Define-_GNU_SOURCE-to-get-PTHREAD_MUTEX_INITIALIZER.patch +++ /dev/null @@ -1,29 +0,0 @@ -From acd832d76002a1916b3128ac05bc0296425aea6d Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sat, 21 Dec 2019 12:09:51 -0800 -Subject: [PATCH] Define _GNU_SOURCE to get PTHREAD_MUTEX_INITIALIZER - -Fixes -| zmalloc.c:87:37: error: 'PTHREAD_MUTEX_DEFAULT' undeclared here (not in a function) -| 87 | pthread_mutex_t used_memory_mutex = PTHREAD_MUTEX_INITIALIZER; -| | ^~~~~~~~~~~~~~~~~~~~~~~~~ - -Upstream-Status: Pending - -Signed-off-by: Khem Raj ---- - src/zmalloc.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/zmalloc.c b/src/zmalloc.c -index bbfa386..93e07ff 100644 ---- a/src/zmalloc.c -+++ b/src/zmalloc.c -@@ -32,6 +32,7 @@ - #include "config.h" - #include "solarisfixes.h" - -+#define _GNU_SOURCE - #include - #include - #include diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/redis/redis_6.2.14.bb b/sources/meta-openembedded/meta-oe/recipes-extended/redis/redis_6.2.14.bb index fa430ce4..2433abba 100644 --- a/sources/meta-openembedded/meta-oe/recipes-extended/redis/redis_6.2.14.bb +++ b/sources/meta-openembedded/meta-oe/recipes-extended/redis/redis_6.2.14.bb @@ -43,14 +43,14 @@ do_install() { export PREFIX=${D}/${prefix} oe_runmake install install -d ${D}/${sysconfdir}/redis - install -m 0644 ${WORKDIR}/redis.conf ${D}/${sysconfdir}/redis/redis.conf + install -m 0644 ${UNPACKDIR}/redis.conf ${D}/${sysconfdir}/redis/redis.conf install -d ${D}/${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/init-redis-server ${D}/${sysconfdir}/init.d/redis-server + install -m 0755 ${UNPACKDIR}/init-redis-server ${D}/${sysconfdir}/init.d/redis-server install -d ${D}/var/lib/redis/ chown redis.redis ${D}/var/lib/redis/ install -d ${D}${systemd_system_unitdir} - install -m 0644 ${WORKDIR}/redis.service ${D}${systemd_system_unitdir} + install -m 0644 ${UNPACKDIR}/redis.service ${D}${systemd_system_unitdir} sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${systemd_system_unitdir}/redis.service if [ "${REDIS_ON_SYSTEMD}" = true ]; then diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/redis/redis_7.2.5.bb b/sources/meta-openembedded/meta-oe/recipes-extended/redis/redis_7.2.5.bb new file mode 100644 index 00000000..ee67f8ae --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-extended/redis/redis_7.2.5.bb @@ -0,0 +1,73 @@ +SUMMARY = "Redis key-value store" +DESCRIPTION = "Redis is an open source, advanced key-value store." +HOMEPAGE = "http://redis.io" +SECTION = "libs" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://COPYING;md5=8ffdd6c926faaece928cf9d9640132d2" +DEPENDS = "readline lua ncurses" + +SRC_URI = "http://download.redis.io/releases/${BP}.tar.gz \ + file://redis.conf \ + file://init-redis-server \ + file://redis.service \ + file://hiredis-use-default-CC-if-it-is-set.patch \ + file://lua-update-Makefile-to-use-environment-build-setting.patch \ + file://oe-use-libc-malloc.patch \ + file://0001-src-Do-not-reset-FINAL_LIBS.patch \ + file://GNU_SOURCE-7.patch \ + file://0006-Define-correct-gregs-for-RISCV32.patch \ + " +SRC_URI[sha256sum] = "5981179706f8391f03be91d951acafaeda91af7fac56beffb2701963103e423d" + +inherit autotools-brokensep pkgconfig update-rc.d systemd useradd + +FINAL_LIBS:x86:toolchain-clang = "-latomic" +FINAL_LIBS:riscv32:toolchain-clang = "-latomic" +FINAL_LIBS:mips = "-latomic" +FINAL_LIBS:arm = "-latomic" +FINAL_LIBS:powerpc = "-latomic" + +export FINAL_LIBS + +USERADD_PACKAGES = "${PN}" +USERADD_PARAM:${PN} = "--system --home-dir /var/lib/redis -g redis --shell /bin/false redis" +GROUPADD_PARAM:${PN} = "--system redis" + +PACKAGECONFIG = "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" +PACKAGECONFIG[systemd] = "USE_SYSTEMD=yes,USE_SYSTEMD=no,systemd" + +EXTRA_OEMAKE += "${PACKAGECONFIG_CONFARGS}" + +do_compile:prepend() { + (cd deps && oe_runmake hiredis lua linenoise) +} + +do_install() { + export PREFIX=${D}/${prefix} + oe_runmake install + install -d ${D}/${sysconfdir}/redis + install -m 0644 ${UNPACKDIR}/redis.conf ${D}/${sysconfdir}/redis/redis.conf + install -d ${D}/${sysconfdir}/init.d + install -m 0755 ${UNPACKDIR}/init-redis-server ${D}/${sysconfdir}/init.d/redis-server + install -d ${D}/var/lib/redis/ + chown redis.redis ${D}/var/lib/redis/ + + install -d ${D}${systemd_system_unitdir} + install -m 0644 ${UNPACKDIR}/redis.service ${D}${systemd_system_unitdir} + sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${systemd_system_unitdir}/redis.service + + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + sed -i 's!daemonize yes!# daemonize yes!' ${D}/${sysconfdir}/redis/redis.conf + sed -i 's!supervised no!supervised systemd!' ${D}/${sysconfdir}/redis/redis.conf + fi +} + +CONFFILES:${PN} = "${sysconfdir}/redis/redis.conf" + +INITSCRIPT_NAME = "redis-server" +INITSCRIPT_PARAMS = "defaults 87" + +SYSTEMD_SERVICE:${PN} = "redis.service" + +CVE_STATUS[CVE-2022-3734] = "not-applicable-platform: CVE only applies for Windows." +CVE_STATUS[CVE-2022-0543] = "not-applicable-platform: Debian-specific CVE" diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/redis/redis_7.2.8.bb b/sources/meta-openembedded/meta-oe/recipes-extended/redis/redis_7.2.8.bb deleted file mode 100644 index bf9de7a1..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-extended/redis/redis_7.2.8.bb +++ /dev/null @@ -1,71 +0,0 @@ -SUMMARY = "Redis key-value store" -DESCRIPTION = "Redis is an open source, advanced key-value store." -HOMEPAGE = "http://redis.io" -SECTION = "libs" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://COPYING;md5=8ffdd6c926faaece928cf9d9640132d2" -DEPENDS = "readline lua ncurses" - -SRC_URI = "http://download.redis.io/releases/${BP}.tar.gz \ - file://redis.conf \ - file://init-redis-server \ - file://redis.service \ - file://0001-hiredis-use-default-CC-if-it-is-set.patch \ - file://0002-lua-update-Makefile-to-use-environment-build-setting.patch \ - file://0003-hack-to-force-use-of-libc-malloc.patch \ - file://0004-src-Do-not-reset-FINAL_LIBS.patch \ - file://0005-Define-_GNU_SOURCE-to-get-PTHREAD_MUTEX_INITIALIZER.patch \ - file://0006-Define-correct-gregs-for-RISCV32.patch \ - " - -SRC_URI[sha256sum] = "6be4fdfcdb2e5ac91454438246d00842d2671f792673390e742dfcaf1bf01574" - -inherit autotools-brokensep pkgconfig update-rc.d systemd useradd - -FINAL_LIBS:x86:toolchain-clang = "-latomic" -FINAL_LIBS:riscv32 = "-latomic" -FINAL_LIBS:mips = "-latomic" -FINAL_LIBS:arm = "-latomic" -FINAL_LIBS:powerpc = "-latomic" - -export FINAL_LIBS - -USERADD_PACKAGES = "${PN}" -USERADD_PARAM:${PN} = "--system --home-dir /var/lib/redis -g redis --shell /bin/false redis" -GROUPADD_PARAM:${PN} = "--system redis" - -PACKAGECONFIG = "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" -PACKAGECONFIG[systemd] = "USE_SYSTEMD=yes,USE_SYSTEMD=no,systemd" - -EXTRA_OEMAKE += "${PACKAGECONFIG_CONFARGS}" - -do_compile:prepend() { - (cd deps && oe_runmake hiredis lua linenoise) -} - -do_install() { - export PREFIX=${D}/${prefix} - oe_runmake install - install -d ${D}/${sysconfdir}/redis - install -m 0644 ${WORKDIR}/redis.conf ${D}/${sysconfdir}/redis/redis.conf - install -d ${D}/${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/init-redis-server ${D}/${sysconfdir}/init.d/redis-server - install -d ${D}/var/lib/redis/ - chown redis.redis ${D}/var/lib/redis/ - - install -d ${D}${systemd_system_unitdir} - install -m 0644 ${WORKDIR}/redis.service ${D}${systemd_system_unitdir} - sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${systemd_system_unitdir}/redis.service - - if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then - sed -i 's!daemonize yes!# daemonize yes!' ${D}/${sysconfdir}/redis/redis.conf - sed -i 's!supervised no!supervised systemd!' ${D}/${sysconfdir}/redis/redis.conf - fi -} - -CONFFILES:${PN} = "${sysconfdir}/redis/redis.conf" - -INITSCRIPT_NAME = "redis-server" -INITSCRIPT_PARAMS = "defaults 87" - -SYSTEMD_SERVICE:${PN} = "redis.service" diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/rrdtool/rrdtool/b76e3c578f1e9f582e9c28f50d82b1f569602075.patch b/sources/meta-openembedded/meta-oe/recipes-extended/rrdtool/rrdtool/b76e3c578f1e9f582e9c28f50d82b1f569602075.patch new file mode 100644 index 00000000..7f54a372 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-extended/rrdtool/rrdtool/b76e3c578f1e9f582e9c28f50d82b1f569602075.patch @@ -0,0 +1,1583 @@ +From b76e3c578f1e9f582e9c28f50d82b1f569602075 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Michal=20Such=C3=A1nek?= +Date: Fri, 5 Jan 2024 15:31:48 +0100 +Subject: [PATCH] Constify argv, fix warnings. (#1242) + +* Fix perl warnings + + - cast POPs to void to avoid unused value warning + - declare functions that don't set RETVAL as returning void + +Signed-off-by: Michal Suchanek + +* Constify argv + +rrd has no business modifying the string pointed to by passed agrv, and +as far as gcc can see it does indeed not modify them because it compiles +with const argv. + +This fixes warnings when passing const strings into rrd, and avoids the +need to duplicate all strings in the tcl bindings. + +This fixes warnings like these: +[ 3s] prog/sensord/rrd.c: In function 'rrdInit': +[ 3s] prog/sensord/rrd.c:302:40: warning: cast discards 'const' qualifier from pointer target type [-Wcast-qual] +[ 3s] 302 | ret = rrd_create(argc, (char**) argv); +[ 3s] | ^ +[ 3s] prog/sensord/rrd.c: In function 'rrdUpdate': +[ 3s] prog/sensord/rrd.c:458:42: warning: cast discards 'const' qualifier from pointer target type [-Wcast-qual] +[ 3s] 458 | if ((ret = rrd_update(3, (char **) /* WEAK */ argv))) { +[ 3s] | ^ + +Signed-off-by: Michal Suchanek + +* tcl: Do not duplicate const strings + +--------- + +Signed-off-by: Michal Suchanek +Upstream-Status: Backport [https://github.com/oetiker/rrdtool-1.x/commit/b76e3c578f1e9f582e9c28f50d82b1f569602075] +--- + CHANGES | 3 ++ + bindings/lua/rrdlua.c | 25 +++++----- + bindings/perl-shared/RRDs.xs | 36 +++++++------- + bindings/python/rrdtoolmodule.c | 38 +++++++-------- + bindings/ruby/main.c | 10 ++-- + bindings/tcl/tclrrd.c | 84 ++++++++------------------------- + src/optparse.c | 14 +++--- + src/optparse.h | 6 +-- + src/rrd.h | 38 +++++++-------- + src/rrd_cgi.c | 24 +++++----- + src/rrd_create.c | 2 +- + src/rrd_daemon.c | 12 ++--- + src/rrd_dump.c | 4 +- + src/rrd_fetch.c | 2 +- + src/rrd_first.c | 2 +- + src/rrd_flushcached.c | 2 +- + src/rrd_graph.c | 6 +-- + src/rrd_graph.h | 4 +- + src/rrd_graph_helper.c | 2 +- + src/rrd_info.c | 2 +- + src/rrd_last.c | 2 +- + src/rrd_lastupdate.c | 2 +- + src/rrd_list.c | 6 +-- + src/rrd_modify.c | 2 +- + src/rrd_modify.h | 2 +- + src/rrd_resize.c | 4 +- + src/rrd_restore.c | 2 +- + src/rrd_tool.c | 26 +++++----- + src/rrd_tune.c | 2 +- + src/rrd_update.c | 4 +- + src/rrd_xport.c | 2 +- + src/rrdupdate.c | 7 +-- + 32 files changed, 168 insertions(+), 209 deletions(-) + +diff --git a/bindings/lua/rrdlua.c b/bindings/lua/rrdlua.c +index d1a700641..2095c3b5b 100644 +--- a/bindings/lua/rrdlua.c ++++ b/bindings/lua/rrdlua.c +@@ -37,8 +37,8 @@ + extern void rrd_freemem(void *mem); + + extern int luaopen_rrd (lua_State * L); +-typedef int (*RRD_FUNCTION)(int, char **); +-typedef rrd_info_t *(RRD_FUNCTION_V)(int, char **); ++typedef int (*RRD_FUNCTION)(int, const char **); ++typedef rrd_info_t *(RRD_FUNCTION_V)(int, const char **); + + /**********************************************************/ + +@@ -49,9 +49,9 @@ static void reset_rrd_state(void) + rrd_clear_error(); + } + +-static char **make_argv(const char *cmd, lua_State * L) ++static const char **make_argv(const char *cmd, lua_State * L) + { +- char **argv; ++ const char **argv; + int i; + int argc = lua_gettop(L) + 1; + +@@ -60,13 +60,12 @@ static char **make_argv(const char *cmd, lua_State * L) + luaL_error(L, "Can't allocate memory for arguments array", cmd); + + /* fprintf(stderr, "Args:\n"); */ +- argv[0] = (char *) cmd; /* Dummy arg. Cast to (char *) because rrd */ +- /* functions don't expect (const * char) */ ++ argv[0] = cmd; + /* fprintf(stderr, "%s\n", argv[0]); */ + for (i=1; i + #include "../../src/rrd_tool.h" + #include "../../src/rrd_format.h" ++#include "../../src/unused.h" + + /* support pre-8.4 tcl */ + +@@ -41,47 +42,39 @@ extern int Tclrrd_SafeInit( + * Hence, we need to do some preparation before + * calling the rrd library functions. + */ +-static char **getopt_init( ++static const char **getopt_init( + int argc, + CONST84 char *argv[]) + { +- char **argv2; ++ const char **argv2; + int i; + + argv2 = calloc(argc, sizeof(char *)); + for (i = 0; i < argc; i++) { +- argv2[i] = strdup(argv[i]); ++ argv2[i] = argv[i]; + } + return argv2; + } + + static void getopt_cleanup( +- int argc, +- char **argv2) ++ int UNUSED(argc), ++ const char **argv2) + { +- int i; +- +- for (i = 0; i < argc; i++) { +- if (argv2[i] != NULL) { +- free(argv2[i]); +- } +- } +- free(argv2); ++ free((void *)argv2); + } + + static void getopt_free_element( +- char *argv2[], ++ const char *argv2[], + int argn) + { + if (argv2[argn] != NULL) { +- free(argv2[argn]); + argv2[argn] = NULL; + } + } + + static void getopt_squieeze( + int *argc, +- char *argv2[]) ++ const char *argv2[]) + { + int i, null_i = 0, argc_tmp = *argc; + +@@ -104,7 +97,7 @@ static int Rrd_Create( + CONST84 char *argv[]) + { + int argv_i; +- char **argv2; ++ const char **argv2; + char *parsetime_error = NULL; + time_t last_up = time(NULL) - 10; + long int long_tmp; +@@ -295,7 +288,7 @@ static int Rrd_Flushcached( + return TCL_ERROR; + } + +- rrd_flushcached(argc, (char**)argv); ++ rrd_flushcached(argc, argv); + + if (rrd_test_error()) { + Tcl_AppendResult(interp, "RRD Error: ", +@@ -380,7 +373,7 @@ static int Rrd_Update( + CONST84 char *argv[]) + { + int argv_i; +- char **argv2, *template = NULL; ++ const char **argv2, *template = NULL; + + argv2 = getopt_init(argc, argv); + +@@ -391,16 +384,10 @@ static int Rrd_Update( + Tcl_AppendResult(interp, "RRD Error: option '", + argv2[argv_i - 1], "' needs an argument", + (char *) NULL); +- if (template != NULL) { +- free(template); +- } + getopt_cleanup(argc, argv2); + return TCL_ERROR; + } +- if (template != NULL) { +- free(template); +- } +- template = strdup(argv2[argv_i]); ++ template = argv2[argv_i]; + getopt_free_element(argv2, argv_i - 1); + getopt_free_element(argv2, argv_i); + } else if (!strcmp(argv2[argv_i], "--")) { +@@ -409,9 +396,6 @@ static int Rrd_Update( + } else if (argv2[argv_i][0] == '-') { + Tcl_AppendResult(interp, "RRD Error: unknown option '", + argv2[argv_i], "'", (char *) NULL); +- if (template != NULL) { +- free(template); +- } + getopt_cleanup(argc, argv2); + return TCL_ERROR; + } +@@ -422,18 +406,12 @@ static int Rrd_Update( + if (argc < 2) { + Tcl_AppendResult(interp, "RRD Error: needs rrd filename", + (char *) NULL); +- if (template != NULL) { +- free(template); +- } + getopt_cleanup(argc, argv2); + return TCL_ERROR; + } + + rrd_update_r(argv2[1], template, argc - 2, (const char **)argv2 + 2); + +- if (template != NULL) { +- free(template); +- } + getopt_cleanup(argc, argv2); + + if (rrd_test_error()) { +@@ -454,7 +432,6 @@ static int Rrd_Info( + { + int status = TCL_OK; + rrd_info_t *data; +- char **argv2; + + /* TODO: support for rrdcached */ + if (argc != 2) { +@@ -463,9 +440,7 @@ static int Rrd_Info( + return TCL_ERROR; + } + +- argv2 = getopt_init(argc, argv); +- +- data = rrd_info_r(argv2[1]); ++ data = rrd_info_r(argv[1]); + + if (data) { + Tcl_SetObjResult(interp, convert_info(data)); +@@ -477,7 +452,6 @@ static int Rrd_Info( + status = TCL_ERROR; + } + +- getopt_cleanup(argc, argv2); + return status; + } + +@@ -488,7 +462,6 @@ static int Rrd_Lastupdate( + CONST84 char *argv[]) + { + time_t last_update; +- char **argv2; + char **ds_namv; + char **last_ds; + char s[30]; +@@ -502,8 +475,7 @@ static int Rrd_Lastupdate( + return TCL_ERROR; + } + +- argv2 = getopt_init(argc, argv); +- if (rrd_lastupdate_r(argv2[1], &last_update, ++ if (rrd_lastupdate_r(argv[1], &last_update, + &ds_cnt, &ds_namv, &last_ds) == 0) { + listPtr = Tcl_GetObjResult(interp); + for (i = 0; i < ds_cnt; i++) { +@@ -527,7 +499,6 @@ static int Rrd_Lastupdate( + free(ds_namv); + } + } +- getopt_cleanup(argc, argv2); + return TCL_OK; + } + +@@ -543,10 +514,8 @@ static int Rrd_Fetch( + char **ds_namv; + Tcl_Obj *listPtr; + char s[30]; +- char **argv2; + +- argv2 = getopt_init(argc, argv); +- if (rrd_fetch(argc, argv2, &start, &end, &step, ++ if (rrd_fetch(argc, argv, &start, &end, &step, + &ds_cnt, &ds_namv, &data) != -1) { + datai = data; + listPtr = Tcl_GetObjResult(interp); +@@ -562,7 +531,6 @@ static int Rrd_Fetch( + free(ds_namv); + free(data); + } +- getopt_cleanup(argc, argv2); + + if (rrd_test_error()) { + Tcl_AppendResult(interp, "RRD Error: ", +@@ -590,7 +558,7 @@ static int Rrd_Graph( + int rc, xsize, ysize; + double ymin, ymax; + char dimensions[50]; +- char **argv2; ++ const char **argv2; + CONST84 char *save; + + /* +@@ -692,11 +660,7 @@ static int Rrd_Tune( + int argc, + CONST84 char *argv[]) + { +- char **argv2; +- +- argv2 = getopt_init(argc, argv); +- rrd_tune(argc, argv2); +- getopt_cleanup(argc, argv2); ++ rrd_tune(argc, argv); + + if (rrd_test_error()) { + Tcl_AppendResult(interp, "RRD Error: ", +@@ -716,11 +680,7 @@ static int Rrd_Resize( + int argc, + CONST84 char *argv[]) + { +- char **argv2; +- +- argv2 = getopt_init(argc, argv); +- rrd_resize(argc, argv2); +- getopt_cleanup(argc, argv2); ++ rrd_resize(argc, argv); + + if (rrd_test_error()) { + Tcl_AppendResult(interp, "RRD Error: ", +@@ -740,11 +700,7 @@ static int Rrd_Restore( + int argc, + CONST84 char *argv[]) + { +- char **argv2; +- +- argv2 = getopt_init(argc, argv); +- rrd_restore(argc, argv2); +- getopt_cleanup(argc, argv2); ++ rrd_restore(argc, argv); + + if (rrd_test_error()) { + Tcl_AppendResult(interp, "RRD Error: ", +diff --git a/src/optparse.c b/src/optparse.c +index 9040ba8b2..79a3efe11 100644 +--- a/src/optparse.c ++++ b/src/optparse.c +@@ -10,7 +10,7 @@ + #define options_argv(i) \ + ((i) < options->argc ? options->argv[i] : NULL) + +-void optparse_init(struct optparse *options, int argc, char **argv) ++void optparse_init(struct optparse *options, int argc, const char **argv) + { + options->argv = argv; + options->argc = argc; +@@ -42,7 +42,7 @@ is_longopt(const char *arg) + static void + permute(struct optparse *options, int index) + { +- char *nonoption = options->argv[index]; ++ const char *nonoption = options->argv[index]; + for (int i = index; i < options->optind - 1; i++) + options->argv[i] = options->argv[i + 1]; + options->argv[options->optind - 1] = nonoption; +@@ -67,7 +67,7 @@ int optparse(struct optparse *options, const char *optstring) + options->errmsg[0] = '\0'; + options->optopt = 0; + options->optarg = NULL; +- char *option = options_argv(options->optind); ++ const char *option = options_argv(options->optind); + if (option == NULL) { + return -1; + } else if (is_dashdash(option)) { +@@ -88,7 +88,7 @@ int optparse(struct optparse *options, const char *optstring) + option += options->subopt + 1; + options->optopt = option[0]; + int type = argtype(optstring, option[0]); +- char *next = options_argv(options->optind + 1); ++ const char *next = options_argv(options->optind + 1); + switch (type) { + case -1: + opterror(options, "invalid option -- '%c'", option[0]); +@@ -128,10 +128,10 @@ int optparse(struct optparse *options, const char *optstring) + return 0; + } + +-char *optparse_arg(struct optparse *options) ++const char *optparse_arg(struct optparse *options) + { + options->subopt = 0; +- char *option = options->argv[options->optind]; ++ const char *option = options->argv[options->optind]; + if (option != NULL) + options->optind++; + return option; +@@ -222,7 +222,7 @@ optparse_long(struct optparse *options, + int *longindex) + { + // printf("%i < %i\n",options->optind,options->argc); +- char *option = options_argv(options->optind); ++ const char *option = options_argv(options->optind); + if (option == NULL) { + return -1; + } else if (is_dashdash(option)) { +diff --git a/src/optparse.h b/src/optparse.h +index c4b0ec19c..7a0bb3885 100644 +--- a/src/optparse.h ++++ b/src/optparse.h +@@ -44,7 +44,7 @@ + */ + + struct optparse { +- char **argv; ++ const char **argv; + int argc; + int permute; + int optind; +@@ -65,7 +65,7 @@ struct optparse_long { + /** + * Initializes the parser state. + */ +-void optparse_init(struct optparse *options, int argc, char **argv); ++void optparse_init(struct optparse *options, int argc, const char **argv); + + /** + * Read the next option in the argv array. +@@ -98,6 +98,6 @@ optparse_long(struct optparse *options, + * subcommand returned by optparse_arg(). This function allows you to + * ignore the value of optind. + */ +-char *optparse_arg(struct optparse *options); ++const char *optparse_arg(struct optparse *options); + + #endif +diff --git a/src/rrd.h b/src/rrd.h +index 184887ccc..b40f9a449 100644 +--- a/src/rrd.h ++++ b/src/rrd.h +@@ -155,10 +155,10 @@ extern "C" { + /* main function blocks */ + int rrd_create( + int, +- char **); ++ const char **); + rrd_info_t *rrd_info( + int, +- char **); ++ const char **); + rrd_info_t *rrd_info_push( + rrd_info_t *, + char *, +@@ -170,19 +170,19 @@ extern "C" { + rrd_info_t *); + char *rrd_list( + int, +- char **); ++ const char **); + char *rrd_list_r( + int, +- char *dirname); ++ const char *dirname); + int rrd_update( + int, +- char **); ++ const char **); + rrd_info_t *rrd_update_v( + int, +- char **); ++ const char **); + int rrd_graph( + int, +- char **, ++ const char **, + char ***, + int *, + int *, +@@ -191,11 +191,11 @@ extern "C" { + double *); + rrd_info_t *rrd_graph_v( + int, +- char **); ++ const char **); + + int rrd_fetch( + int, +- char **, ++ const char **, + time_t *, + time_t *, + unsigned long *, +@@ -204,32 +204,32 @@ extern "C" { + rrd_value_t **); + int rrd_restore( + int, +- char **); ++ const char **); + int rrd_dump( + int, +- char **); ++ const char **); + int rrd_tune( + int, +- char **); ++ const char **); + time_t rrd_last( + int, +- char **); ++ const char **); + int rrd_lastupdate( + int argc, +- char **argv); ++ const char **argv); + time_t rrd_first( + int, +- char **); ++ const char **); + int rrd_resize( + int, +- char **); ++ const char **); + char *rrd_strversion( + void); + double rrd_version( + void); + int rrd_xport( + int, +- char **, ++ const char **, + int *, + time_t *, + time_t *, +@@ -239,7 +239,7 @@ extern "C" { + rrd_value_t **); + int rrd_flushcached( + int argc, +- char **argv); ++ const char **argv); + + void rrd_freemem( + void *mem); +@@ -323,7 +323,7 @@ extern "C" { + const char **argv); + int rrd_dump_opt_r( + const char *filename, +- char *outname, ++ const char *outname, + int opt_noheader); + int rrd_dump_r( + const char *filename, +diff --git a/src/rrd_cgi.c b/src/rrd_cgi.c +index b82c310db..14a4f511a 100644 +--- a/src/rrd_cgi.c ++++ b/src/rrd_cgi.c +@@ -102,7 +102,7 @@ static char *rrdstrip( + static char *scanargs( + char *line, + int *argc, +- char ***args); ++ const char ***args); + + /* format at-time specified times using strftime */ + static char *printstrftime( +@@ -317,7 +317,7 @@ static const char *putvar( + } + + /* expand those RRD:* directives that can be used recursively */ +-static char *rrd_expand_vars( ++static const char *rrd_expand_vars( + char *buffer) + { + int i; +@@ -434,7 +434,7 @@ static int readfile( + + int main( + int argc, +- char *argv[]) ++ const char *argv[]) + { + char *buffer; + long i; +@@ -926,7 +926,7 @@ static char *drawgraph( + } + calfree(); + if (rrd_graph +- (argc + 1, (char **) args - 1, &calcpr, &xsize, &ysize, NULL, &ymin, ++ (argc + 1, args - 1, &calcpr, &xsize, &ysize, NULL, &ymin, + &ymax) != -1) { + return stralloc(calcpr[0]); + } else { +@@ -973,7 +973,7 @@ static char *printtimelast( + /* not raising argc in step with args - 1 since the last argument + will be used below for strftime */ + +- last = rrd_last(argc, (char **) args - 1); ++ last = rrd_last(argc, args - 1); + if (rrd_test_error()) { + char err[4096]; + +@@ -1027,7 +1027,7 @@ static char *printtimenow( + static char *scanargs( + char *line, + int *argument_count, +- char ***arguments) ++ const char ***arguments) + { + char *getP; /* read cursor */ + char *putP; /* write cursor */ +@@ -1039,8 +1039,8 @@ static char *scanargs( + + /* local array of arguments while parsing */ + int argc = 1; +- char **argv; +- char **argv_tmp; /* temp variable for realloc() */ ++ const char **argv; ++ const char **argv_tmp; /* temp variable for realloc() */ + + #ifdef DEBUG_PARSER + printf("<-- scanargs(%s) -->\n", line); +@@ -1051,7 +1051,7 @@ static char *scanargs( + + /* create initial argument array of char pointers */ + argsz = 32; +- argv = (char **) malloc(argsz * sizeof(char *)); ++ argv = malloc(argsz * sizeof(char *)); + if (!argv) { + return NULL; + } +@@ -1146,7 +1146,7 @@ static char *scanargs( + if (argc == argsz - 2) { + /* resize argument array */ + argsz *= 2; +- argv_tmp = (char **) rrd_realloc(argv, argsz * sizeof(char *)); ++ argv_tmp = rrd_realloc(argv, argsz * sizeof(char *)); + if (*argv_tmp == NULL) { + return NULL; + } +@@ -1213,7 +1213,7 @@ static int parse( + /* the name of the vairable ... */ + char *val; + long valln; +- char **args; ++ const char **args; + char *end; + long end_offset; + int argc; +@@ -1264,7 +1264,7 @@ static int parse( + /* make sure we do not shrink the mallocd block */ + size_t newbufsize = i + strlen(end) + valln + 1; + +- *buf = (char *) rrd_realloc(*buf, newbufsize); ++ *buf = rrd_realloc(*buf, newbufsize); + + if (*buf == NULL) { + perror("Realoc buf:"); +diff --git a/src/rrd_create.c b/src/rrd_create.c +index f9bad0866..919b4195a 100644 +--- a/src/rrd_create.c ++++ b/src/rrd_create.c +@@ -76,7 +76,7 @@ static void parseGENERIC_DS( + + int rrd_create( + int argc, +- char **argv) ++ const char **argv) + { + struct optparse_long longopts[] = { + {"start", 'b', OPTPARSE_REQUIRED}, +diff --git a/src/rrd_daemon.c b/src/rrd_daemon.c +index 751798aa1..21c38a11d 100644 +--- a/src/rrd_daemon.c ++++ b/src/rrd_daemon.c +@@ -1877,7 +1877,7 @@ static int handle_request_tune( + HANDLER_PROTO) + { /* {{{ */ + int status; +- char** argv = NULL; ++ const char** argv = NULL; + int argc, argc_tmp; + char* i; + int rc; +@@ -1916,7 +1916,7 @@ static int handle_request_tune( + goto done; + } + +- if ((argv = (char **) malloc(argc * sizeof(char*))) == NULL) { ++ if ((argv = malloc(argc * sizeof(char*))) == NULL) { + rc = send_response(sock, RESP_ERR, "%s\n", rrd_strerror(ENOMEM)); + goto done; + } +@@ -1927,7 +1927,7 @@ static int handle_request_tune( + argc_tmp += 1; + } + +- status = rrd_tune_r(file, argc, (const char **)argv); ++ status = rrd_tune_r(file, argc, argv); + if (status != 0) { + rc = send_response(sock, RESP_ERR, "Got error %s\n", rrd_get_error()); + goto done; +@@ -1935,7 +1935,7 @@ static int handle_request_tune( + rc = send_response(sock, RESP_OK, "Success\n"); + done: + free(file); +- free(argv); ++ free((void *)argv); + return rc; + } + +@@ -4505,7 +4505,7 @@ static int cleanup( + + static int read_options( + int argc, +- char **argv) ++ const char **argv) + { /* {{{ */ + struct optparse_long longopts[] = { + {NULL, 'a', OPTPARSE_REQUIRED}, +@@ -5050,7 +5050,7 @@ static int read_options( + + int main( + int argc, +- char **argv) ++ const char **argv) + { + int status; + +diff --git a/src/rrd_dump.c b/src/rrd_dump.c +index a4490d594..c58e0ee4a 100644 +--- a/src/rrd_dump.c ++++ b/src/rrd_dump.c +@@ -497,7 +497,7 @@ static size_t rrd_dump_opt_cb_fileout( + + int rrd_dump_opt_r( + const char *filename, +- char *outname, ++ const char *outname, + int opt_noheader) + { + FILE *out_file; +@@ -543,7 +543,7 @@ int rrd_dump_r( + + int rrd_dump( + int argc, +- char **argv) ++ const char **argv) + { + int opt; + struct optparse_long longopts[] = { +diff --git a/src/rrd_fetch.c b/src/rrd_fetch.c +index c739bfc45..54780f19b 100644 +--- a/src/rrd_fetch.c ++++ b/src/rrd_fetch.c +@@ -61,7 +61,7 @@ + + int rrd_fetch( + int argc, +- char **argv, ++ const char **argv, + time_t *start, + time_t *end, /* which time frame do you want ? + * will be changed to represent reality */ +diff --git a/src/rrd_first.c b/src/rrd_first.c +index a696c5c38..f3dde5404 100644 +--- a/src/rrd_first.c ++++ b/src/rrd_first.c +@@ -13,7 +13,7 @@ + + time_t rrd_first( + int argc, +- char **argv) ++ const char **argv) + { + struct optparse_long longopts[] = { + {"rraindex", 129, OPTPARSE_REQUIRED}, +diff --git a/src/rrd_flushcached.c b/src/rrd_flushcached.c +index 090bca749..3bf6cd29d 100644 +--- a/src/rrd_flushcached.c ++++ b/src/rrd_flushcached.c +@@ -22,7 +22,7 @@ + #include "rrd_tool.h" + #include "rrd_client.h" + +-int rrd_flushcached (int argc, char **argv) ++int rrd_flushcached (int argc, const char **argv) + { + struct optparse_long longopts[] = { + {"daemon", 'd', OPTPARSE_REQUIRED}, +diff --git a/src/rrd_graph.c b/src/rrd_graph.c +index b32d45085..46511e9a3 100644 +--- a/src/rrd_graph.c ++++ b/src/rrd_graph.c +@@ -4607,7 +4607,7 @@ int scan_for_col( + /* Now just a wrapper around rrd_graph_v */ + int rrd_graph( + int argc, +- char **argv, ++ const char **argv, + char ***prdata, + int *xsize, + int *ysize, +@@ -4690,7 +4690,7 @@ int rrd_graph( + + rrd_info_t *rrd_graph_v( + int argc, +- char **argv) ++ const char **argv) + { + image_desc_t im; + rrd_info_t *grinfo; +@@ -4953,7 +4953,7 @@ void rrd_graph_init( + + void rrd_graph_options( + int argc, +- char *argv[], ++ const char **argv, + struct optparse *poptions, + image_desc_t *im) + { +diff --git a/src/rrd_graph.h b/src/rrd_graph.h +index 4df32ec66..083cf3800 100644 +--- a/src/rrd_graph.h ++++ b/src/rrd_graph.h +@@ -473,12 +473,12 @@ void time_clean( + + void rrd_graph_options( + int, +- char **, ++ const char **, + struct optparse *, + image_desc_t *); + void rrd_graph_script( + int, +- char **, ++ const char **, + image_desc_t *const, + int); + int rrd_graph_color( +diff --git a/src/rrd_graph_helper.c b/src/rrd_graph_helper.c +index 99cdefa65..ba90e1a6c 100644 +--- a/src/rrd_graph_helper.c ++++ b/src/rrd_graph_helper.c +@@ -1952,7 +1952,7 @@ static int parse_xport( + + void rrd_graph_script( + int argc, +- char *argv[], ++ const char **argv, + image_desc_t *const im, + int optno) + { +diff --git a/src/rrd_info.c b/src/rrd_info.c +index c0c6f68c7..eb0d4e4de 100644 +--- a/src/rrd_info.c ++++ b/src/rrd_info.c +@@ -82,7 +82,7 @@ rrd_info_t + + rrd_info_t *rrd_info( + int argc, +- char **argv) ++ const char **argv) + { + struct optparse_long longopts[] = { + {"daemon", 'd', OPTPARSE_REQUIRED}, +diff --git a/src/rrd_last.c b/src/rrd_last.c +index 026a1e828..1aae72512 100644 +--- a/src/rrd_last.c ++++ b/src/rrd_last.c +@@ -11,7 +11,7 @@ + + time_t rrd_last( + int argc, +- char **argv) ++ const char **argv) + { + char *opt_daemon = NULL; + time_t lastupdate; +diff --git a/src/rrd_lastupdate.c b/src/rrd_lastupdate.c +index ab30dcf67..4f7f4770e 100644 +--- a/src/rrd_lastupdate.c ++++ b/src/rrd_lastupdate.c +@@ -14,7 +14,7 @@ + #include "rrd_client.h" + #include + +-int rrd_lastupdate (int argc, char **argv) ++int rrd_lastupdate (int argc, const char **argv) + { + struct optparse_long longopts[] = { + {"daemon", 'd', OPTPARSE_REQUIRED}, +diff --git a/src/rrd_list.c b/src/rrd_list.c +index e743b9b7d..6e96220ea 100644 +--- a/src/rrd_list.c ++++ b/src/rrd_list.c +@@ -37,7 +37,7 @@ static char *move_past_prefix(const char *prefix, const char *string) + return (char *)&(string[index]); + } + +-static char *rrd_list_rec(int recursive, char *root, char *dirname) ++static char *rrd_list_rec(int recursive, const char *root, const char *dirname) + { + #define SANE_ASPRINTF2(_dest_str, _format, ...) \ + if (asprintf(&_dest_str, _format, __VA_ARGS__) == -1) { \ +@@ -138,7 +138,7 @@ static char *rrd_list_rec(int recursive, char *root, char *dirname) + return out; + } + +-char *rrd_list_r(int recursive, char *dirname) ++char *rrd_list_r(int recursive, const char *dirname) + { + #define SANE_ASPRINTF(_dest_str, _format, ...) \ + if (asprintf(&_dest_str, _format, __VA_ARGS__) == -1) { \ +@@ -240,7 +240,7 @@ char *rrd_list_r(int recursive, char *dirname) + return rrd_list_rec(recursive, dirname, dirname); + } + +-char *rrd_list(int argc, char **argv) ++char *rrd_list(int argc, const char **argv) + { + char *opt_daemon = NULL; + int status; +diff --git a/src/rrd_modify.c b/src/rrd_modify.c +index a2b07f640..70ac9e77f 100644 +--- a/src/rrd_modify.c ++++ b/src/rrd_modify.c +@@ -1297,7 +1297,7 @@ static int add_rras(const rrd_t *in, rrd_t *out, const int *ds_map, + } + + int handle_modify(const rrd_t *in, const char *outfilename, +- int argc, char **argv, int optidx, ++ int argc, const char **argv, int optidx, + int newstep) { + // parse add/remove options + int rc = -1; +diff --git a/src/rrd_modify.h b/src/rrd_modify.h +index 52d8789be..64a39926e 100644 +--- a/src/rrd_modify.h ++++ b/src/rrd_modify.h +@@ -28,7 +28,7 @@ typedef struct { + } rra_mod_op_t; + + int handle_modify(const rrd_t *in, const char *outfilename, +- int argc, char **argv, int optind, ++ int argc, const char **argv, int optind, + int newstep); + + typedef union { +diff --git a/src/rrd_resize.c b/src/rrd_resize.c +index fb75d81ff..742e6d141 100644 +--- a/src/rrd_resize.c ++++ b/src/rrd_resize.c +@@ -12,9 +12,9 @@ + + int rrd_resize( + int argc, +- char **argv) ++ const char **argv) + { +- char *infilename, outfilename[11] = "resize.rrd"; ++ const char *infilename, outfilename[11] = "resize.rrd"; + rrd_t rrdold, rrdnew; + rrd_value_t buffer; + int version; +diff --git a/src/rrd_restore.c b/src/rrd_restore.c +index 85d481e0c..ebef5efe8 100644 +--- a/src/rrd_restore.c ++++ b/src/rrd_restore.c +@@ -1378,7 +1378,7 @@ int write_file( + + int rrd_restore( + int argc, +- char **argv) ++ const char **argv) + { + struct optparse_long longopts[] = { + {"range-check", 'r', OPTPARSE_NONE}, +diff --git a/src/rrd_tool.c b/src/rrd_tool.c +index cc6119d9a..56321ee1a 100644 +--- a/src/rrd_tool.c ++++ b/src/rrd_tool.c +@@ -22,16 +22,16 @@ + + + static void PrintUsage( +- char *cmd); ++ const char *cmd); + static int CountArgs( + char *aLine); + static int CreateArgs( ++ const char *, + char *, +- char *, +- char **); ++ const char **); + static int HandleInputLine( + int, +- char **, ++ const char **, + FILE *); + int RemoteMode = 0; + int ChangeRoot = 0; +@@ -42,7 +42,7 @@ int ChangeRoot = 0; + + + static void PrintUsage( +- char *cmd) ++ const char *cmd) + { + + const char *help_main = +@@ -443,11 +443,11 @@ static char *fgetslong( + + int main( + int argc, +- char *argv[]) ++ const char *argv[]) + { +- char **myargv; ++ const char **myargv; + char *aLine; +- char *firstdir = ""; ++ const char *firstdir = ""; + + #ifdef MUST_DISABLE_SIGFPE + signal(SIGFPE, SIG_IGN); +@@ -526,7 +526,7 @@ int main( + printf("ERROR: not enough arguments\n"); + continue; + } +- if ((myargv = (char **) malloc((argc + 1) * ++ if ((myargv = malloc((argc + 1) * + sizeof(char *))) == NULL) { + perror("malloc"); + exit(1); +@@ -572,7 +572,7 @@ int main( + resolving them portably is not really simple. */ + static int HandleInputLine( + int argc, +- char **argv, ++ const char **argv, + FILE * out) + { + #if defined(HAVE_OPENDIR) && defined (HAVE_READDIR) +@@ -887,12 +887,12 @@ static int CountArgs( + * CreateArgs - take a string (aLine) and tokenize + */ + static int CreateArgs( +- char *pName, ++ const char *pName, + char *aLine, +- char **argv) ++ const char **argv) + { + char *getP, *putP; +- char **pargv = argv; ++ const char **pargv = argv; + char Quote = 0; + int inArg = 0; + int len; +diff --git a/src/rrd_tune.c b/src/rrd_tune.c +index 198817f37..dd3f3f7cb 100644 +--- a/src/rrd_tune.c ++++ b/src/rrd_tune.c +@@ -71,7 +71,7 @@ static int set_hwsmootharg( + + int rrd_tune( + int argc, +- char **argv) ++ const char **argv) + { + char *opt_daemon = NULL; + const char *in_filename = NULL; +diff --git a/src/rrd_update.c b/src/rrd_update.c +index fbbe2820a..bb9a0602c 100644 +--- a/src/rrd_update.c ++++ b/src/rrd_update.c +@@ -299,7 +299,7 @@ static void initialize_time( + + rrd_info_t *rrd_update_v( + int argc, +- char **argv) ++ const char **argv) + { + struct optparse_long longopts[] = { + {"template", 't', OPTPARSE_REQUIRED}, +@@ -674,7 +674,7 @@ static int rrd_template_update(const char *filename, /* {{{ */ + + int rrd_update( + int argc, +- char **argv) ++ const char **argv) + { + struct optparse_long longopts[] = { + {"template", 't', OPTPARSE_REQUIRED}, +diff --git a/src/rrd_xport.c b/src/rrd_xport.c +index d15d33dd9..93c02f926 100644 +--- a/src/rrd_xport.c ++++ b/src/rrd_xport.c +@@ -73,7 +73,7 @@ static int rrd_xport_format_addprints( + + int rrd_xport( + int argc, +- char **argv, ++ const char **argv, + int UNUSED(*xsize), + time_t *start, + time_t *end, /* which time frame do you want ? +diff --git a/src/rrdupdate.c b/src/rrdupdate.c +index cbbf48cc1..e368516c8 100644 +--- a/src/rrdupdate.c ++++ b/src/rrdupdate.c +@@ -20,19 +20,20 @@ int main( + int argc, + char **argv) + { ++ const char **cargv = (const char **)argv; + char *name=basename(argv[0]); + rrd_info_t *info; + + if (!strcmp(name, "rrdcreate")) { +- rrd_create(argc, argv); ++ rrd_create(argc, cargv); + } + else if (!strcmp(name, "rrdinfo")) { +- info=rrd_info(argc, argv); ++ info=rrd_info(argc, cargv); + rrd_info_print(info); + rrd_info_free(info); + } + else { +- rrd_update(argc, argv); ++ rrd_update(argc, cargv); + } + + if (rrd_test_error()) { diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/rrdtool/rrdtool_1.8.0.bb b/sources/meta-openembedded/meta-oe/recipes-extended/rrdtool/rrdtool_1.8.0.bb index 5afb3f2f..af19043e 100644 --- a/sources/meta-openembedded/meta-oe/recipes-extended/rrdtool/rrdtool_1.8.0.bb +++ b/sources/meta-openembedded/meta-oe/recipes-extended/rrdtool/rrdtool_1.8.0.bb @@ -11,6 +11,7 @@ PV = "1.8.0" SRC_URI = "\ git://github.com/oetiker/rrdtool-1.x.git;protocol=https;branch=master \ + file://b76e3c578f1e9f582e9c28f50d82b1f569602075.patch \ " S = "${WORKDIR}/git" @@ -59,7 +60,7 @@ export STAGING_LIBDIR export STAGING_INCDIR # emulate cpan_do_configure -EXTRA_OEMAKE = ' PERL5LIB="${PERL_ARCHLIB}" ' +EXTRA_OEMAKE = ' CC="${CC} -Wno-incompatible-pointer-types" PERL5LIB="${PERL_ARCHLIB}" ' # Avoid do_configure error on some hosts do_configure() { @@ -134,3 +135,7 @@ RDEPENDS:${PN}-python = "python3" FILES:${PN}-dbg += "${libdir}/perl/vendor_perl/*/auto/RRDs/.debug \ ${PYTHON_SITEPACKAGES_DIR}/.debug" + +# http://errors.yoctoproject.org/Errors/Details/766911/ +# rrd_tune.c:239:35: error: passing argument 3 of 'optparse_init' from incompatible pointer type [-Wincompatible-pointer-types] +CFLAGS += "-Wno-error=incompatible-pointer-types" diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/rsyslog/librelp/0001-relp-fix-build-against-upcoming-gcc-14-Werror-calloc.patch b/sources/meta-openembedded/meta-oe/recipes-extended/rsyslog/librelp/0001-relp-fix-build-against-upcoming-gcc-14-Werror-calloc.patch new file mode 100644 index 00000000..cf4f4080 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-extended/rsyslog/librelp/0001-relp-fix-build-against-upcoming-gcc-14-Werror-calloc.patch @@ -0,0 +1,37 @@ +From baf992f82aa987c608731866876adb856847ea45 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 6 May 2024 18:03:40 -0700 +Subject: [PATCH] relp: fix build against upcoming `gcc-14` + (`-Werror=calloc-transposed-args`) + +`gcc-14` added a new `-Wcalloc-transposed-args` warning recently. It + detected minor infelicity in `calloc()` API usage + +Fixes +../../git/src/relp.c: In function 'addToEpollSet': +../../git/src/relp.c:101:39: error: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Werror=calloc-transposed-args] + 101 | CHKmalloc(epd = calloc(sizeof(epolld_t), 1)); + | ^~~~~~~~ + +Upstream-Status: Submitted [https://github.com/rsyslog/librelp/pull/264] +Signed-off-by: Khem Raj +--- + src/relp.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/relp.c b/src/relp.c +index eadda36..6268f1d 100644 +--- a/src/relp.c ++++ b/src/relp.c +@@ -98,7 +98,7 @@ addToEpollSet(relpEngine_t *const pThis, epolld_type_t typ, void *ptr, int sock, + epolld_t *epd = NULL; + ENTER_RELPFUNC; + +- CHKmalloc(epd = calloc(sizeof(epolld_t), 1)); ++ CHKmalloc(epd = calloc(1, sizeof(epolld_t))); + epd->typ = typ; + epd->ptr = ptr; + epd->sock = sock; +-- +2.45.0 + diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/rsyslog/librelp_1.11.0.bb b/sources/meta-openembedded/meta-oe/recipes-extended/rsyslog/librelp_1.11.0.bb index 9d949c63..49847047 100644 --- a/sources/meta-openembedded/meta-oe/recipes-extended/rsyslog/librelp_1.11.0.bb +++ b/sources/meta-openembedded/meta-oe/recipes-extended/rsyslog/librelp_1.11.0.bb @@ -11,6 +11,7 @@ SRC_URI = "git://github.com/rsyslog/librelp.git;protocol=https;branch=stable \ file://0001-tests-Fix-callback-prototype.patch \ file://0001-tcp-fix-some-compiler-warnings-with-enable-tls-opens.patch \ file://0001-tests-Include-missing-sys-time.h.patch \ + file://0001-relp-fix-build-against-upcoming-gcc-14-Werror-calloc.patch \ file://run-ptest \ " diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/0001-tests-disable-the-check-for-inotify.patch b/sources/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/0001-tests-disable-the-check-for-inotify.patch index c1480406..13d1a781 100644 --- a/sources/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/0001-tests-disable-the-check-for-inotify.patch +++ b/sources/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/0001-tests-disable-the-check-for-inotify.patch @@ -1,4 +1,4 @@ -From 194e199ce08acc2192f6a63420ff24d9064666e5 Mon Sep 17 00:00:00 2001 +From 640b191b9566a6c18af73bf9cc4b9366a76acf62 Mon Sep 17 00:00:00 2001 From: Yi Fan Yu Date: Sat, 27 Mar 2021 19:18:25 -0400 Subject: [PATCH] tests: disable the check for inotify @@ -20,10 +20,10 @@ Signed-off-by: Yi Fan Yu 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/diag.sh b/tests/diag.sh -index 6cd60ea88..7424f48c5 100755 +index f4f3d86..497bb17 100755 --- a/tests/diag.sh +++ b/tests/diag.sh -@@ -2672,7 +2672,7 @@ case $1 in +@@ -2950,7 +2950,7 @@ case $1 in fi ;; 'check-inotify') # Check for inotify/fen support @@ -32,7 +32,7 @@ index 6cd60ea88..7424f48c5 100755 echo [inotify mode] elif [ -n "$(find /usr/include/sys/ -name 'port.h' -print -quit)" ]; then grep -qF "PORT_SOURCE_FILE" < /usr/include/sys/port.h -@@ -2687,7 +2687,7 @@ case $1 in +@@ -2965,7 +2965,7 @@ case $1 in fi ;; 'check-inotify-only') # Check for ONLY inotify support @@ -41,6 +41,3 @@ index 6cd60ea88..7424f48c5 100755 echo [inotify mode] else echo [inotify not supported, skipping...] --- -2.29.2 - diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/0001-tests-tcpflood.c-Pass-correct-parameter-type-to-send.patch b/sources/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/0001-tests-tcpflood.c-Pass-correct-parameter-type-to-send.patch new file mode 100644 index 00000000..5df29e7d --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/0001-tests-tcpflood.c-Pass-correct-parameter-type-to-send.patch @@ -0,0 +1,35 @@ +From 1e0a77d8a5ae7cd0223afadf46cdbb540119774d Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 11 May 2024 23:31:46 -0700 +Subject: [PATCH] tests/tcpflood.c: Pass correct parameter type to sendto() + +Fixes build with GCC-14 and musl + +../../rsyslog-8.2404.0/tests/tcpflood.c:811:70: error: passing argument 5 of 'sendto' from incompatible pointer type [-Wincompatible-pointer-types] + 811 | lenSend = sendto(udpsockout, buf, lenBuf, 0, &udpRcvr, sizeof(udpRcvr)); + | ^~~~~~~~ + | | + | struct sockaddr_in * + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- + tests/tcpflood.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/tcpflood.c b/tests/tcpflood.c +index bd8edaf..0feda23 100644 +--- a/tests/tcpflood.c ++++ b/tests/tcpflood.c +@@ -808,7 +808,7 @@ int sendMessages(struct instdata *inst) + } + lenSend = sendPlainTCP(socknum, buf, lenBuf, &error_number); + } else if(transport == TP_UDP) { +- lenSend = sendto(udpsockout, buf, lenBuf, 0, &udpRcvr, sizeof(udpRcvr)); ++ lenSend = sendto(udpsockout, buf, lenBuf, 0, (const struct sockaddr *)&udpRcvr, sizeof(udpRcvr)); + error_number = errno; + } else if(transport == TP_TLS) { + if(sockArray[socknum] == -1) { +-- +2.45.0 + diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/use-pkgconfig-to-check-libgcrypt.patch b/sources/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/use-pkgconfig-to-check-libgcrypt.patch index 03525872..45359a16 100644 --- a/sources/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/use-pkgconfig-to-check-libgcrypt.patch +++ b/sources/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/use-pkgconfig-to-check-libgcrypt.patch @@ -1,4 +1,4 @@ -From d0852006bf3d305e8984b85b41997d43d4476937 Mon Sep 17 00:00:00 2001 +From ceeaadb282531a416c1f605fa2100faa5de701e0 Mon Sep 17 00:00:00 2001 From: Roy Li Date: Wed, 18 Jun 2014 13:46:52 +0800 Subject: [PATCH] use pkgconfig to check libgcrypt @@ -10,16 +10,15 @@ libgcrypt does no longer provide libgcrypt-config, and provide Signed-off-by: Roy Li Signed-off-by: Wenzong Fan - --- configure.ac | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/configure.ac b/configure.ac -index 62178c3..b56c9c7 100644 +index 4af95c4..97e6282 100644 --- a/configure.ac +++ b/configure.ac -@@ -889,20 +889,7 @@ AC_ARG_ENABLE(libgcrypt, +@@ -1200,20 +1200,7 @@ AC_ARG_ENABLE(libgcrypt, [enable_libgcrypt=yes] ) if test "x$enable_libgcrypt" = "xyes"; then @@ -40,4 +39,4 @@ index 62178c3..b56c9c7 100644 + PKG_CHECK_MODULES(LIBGCRYPT, libgcrypt) fi AM_CONDITIONAL(ENABLE_LIBGCRYPT, test x$enable_libgcrypt = xyes) - AC_SUBST(LIBGCRYPT_CFLAGS) + AM_CONDITIONAL(ENABLE_RSCRYUTIL, test x$enable_libgcrypt = xyes || test x$enable_openssl_crypto_provider = xyes) diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog_8.2402.0.bb b/sources/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog_8.2402.0.bb deleted file mode 100644 index af46cc14..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog_8.2402.0.bb +++ /dev/null @@ -1,207 +0,0 @@ -SUMMARY = "Rsyslog is an enhanced multi-threaded syslogd" -DESCRIPTION = "\ -Rsyslog is an enhanced syslogd supporting, among others, MySQL,\ - PostgreSQL, failover log destinations, syslog/tcp, fine grain\ - output format control, high precision timestamps, queued operations\ - and the ability to filter on any message part. It is quite\ - compatible to stock sysklogd and can be used as a drop-in replacement.\ - Its advanced features make it suitable for enterprise-class,\ - encryption protected syslog relay chains while at the same time being\ - very easy to setup for the novice user." - -DEPENDS = "zlib libestr libfastjson bison-native flex-native liblogging" -HOMEPAGE = "http://www.rsyslog.com/" -LICENSE = "GPL-3.0-only & LGPL-3.0-only & Apache-2.0" -LIC_FILES_CHKSUM = "file://COPYING;md5=51d9635e646fb75e1b74c074f788e973 \ - file://COPYING.LESSER;md5=cb7903f1e5c39ae838209e130dca270a \ - file://COPYING.ASL20;md5=052f8a09206615ab07326ff8ce2d9d32\ -" - -SRC_URI = "https://www.rsyslog.com/files/download/rsyslog/${BPN}-${PV}.tar.gz \ - file://initscript \ - file://rsyslog.conf \ - file://rsyslog.logrotate \ - file://rsyslog.service \ - file://use-pkgconfig-to-check-libgcrypt.patch \ - file://run-ptest \ - file://0001-tests-disable-the-check-for-inotify.patch \ -" - -SRC_URI:append:libc-musl = " \ - file://0001-Include-sys-time-h.patch \ - file://disable-omfile-outchannel.patch \ -" - -SRC_URI[sha256sum] = "acbdd8579489df36b4a383dc6909a61b7623807f0aff54c062115f2de7ea85ba" - -UPSTREAM_CHECK_URI = "https://github.com/rsyslog/rsyslog/releases" -UPSTREAM_CHECK_REGEX = "(?P\d+(\.\d+)+)" - -inherit autotools pkgconfig systemd update-rc.d ptest - -EXTRA_OECONF += "--disable-generate-man-pages ap_cv_atomic_builtins=yes" -EXTRA_OECONF += "--enable-imfile-tests" -EXTRA_OECONF:remove:mipsarch = "ap_cv_atomic_builtins=yes" -EXTRA_OECONF:remove:powerpc = "ap_cv_atomic_builtins=yes" -EXTRA_OECONF:remove:riscv32 = "ap_cv_atomic_builtins=yes" - -# first line is default yes in configure -PACKAGECONFIG ??= " \ - rsyslogd rsyslogrt klog inet regexp uuid libcap-ng libgcrypt \ - fmhttp imdiag openssl imfile \ - ${@bb.utils.filter('DISTRO_FEATURES', 'snmp systemd', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'testbench relp ${VALGRIND}', '', d)} \ -" - -# default yes in configure -PACKAGECONFIG[relp] = "--enable-relp,--disable-relp,librelp," -PACKAGECONFIG[rsyslogd] = "--enable-rsyslogd,--disable-rsyslogd,," -PACKAGECONFIG[rsyslogrt] = "--enable-rsyslogrt,--disable-rsyslogrt,," -PACKAGECONFIG[fmhttp] = "--enable-fmhttp,--disable-fmhttp,curl," -PACKAGECONFIG[inet] = "--enable-inet,--disable-inet,," -PACKAGECONFIG[klog] = "--enable-klog,--disable-klog,," -PACKAGECONFIG[libcap-ng] = "--enable-libcap-ng,--disable-libcap-ng,libcap-ng," -PACKAGECONFIG[regexp] = "--enable-regexp,--disable-regexp,," -PACKAGECONFIG[uuid] = "--enable-uuid,--disable-uuid,util-linux," -PACKAGECONFIG[libgcrypt] = "--enable-libgcrypt,--disable-libgcrypt,libgcrypt," -PACKAGECONFIG[testbench] = "--enable-testbench --enable-omstdout,--disable-testbench --disable-omstdout,," - -# default no in configure -PACKAGECONFIG[debug] = "--enable-debug,--disable-debug,," -PACKAGECONFIG[imdiag] = "--enable-imdiag,--disable-imdiag,," -PACKAGECONFIG[imfile] = "--enable-imfile,--disable-imfile,," -PACKAGECONFIG[snmp] = "--enable-snmp,--disable-snmp,net-snmp," -PACKAGECONFIG[gnutls] = "--enable-gnutls,--disable-gnutls,gnutls," -PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl," -PACKAGECONFIG[systemd] = "--enable-libsystemd,--disable-libsystemd,systemd," -PACKAGECONFIG[imjournal] = "--enable-imjournal,--disable-imjournal," -PACKAGECONFIG[mmjsonparse] = "--enable-mmjsonparse,--disable-mmjsonparse," -PACKAGECONFIG[mysql] = "--enable-mysql,--disable-mysql,mysql5," -PACKAGECONFIG[postgresql] = "--enable-pgsql,--disable-pgsql,postgresql," -PACKAGECONFIG[libdbi] = "--enable-libdbi,--disable-libdbi,libdbi," -PACKAGECONFIG[mail] = "--enable-mail,--disable-mail,," -PACKAGECONFIG[valgrind] = ",--without-valgrind-testbench,valgrind," -PACKAGECONFIG[imhttp] = "--enable-imhttp,--disable-imhttp,civetweb," - - -TESTDIR = "tests" -do_compile_ptest() { - echo 'buildtest-TESTS: $(check_PROGRAMS)' >> ${TESTDIR}/Makefile - oe_runmake -C ${TESTDIR} buildtest-TESTS -} - -do_install_ptest() { - # install the tests - cp -rf ${S}/${TESTDIR} ${D}${PTEST_PATH} - cp -rf ${B}/${TESTDIR} ${D}${PTEST_PATH} - - # give permissions to all users - # some tests need to write to this directory as user 'daemon' - chmod 777 -R ${D}${PTEST_PATH}/tests - - # do NOT need to rebuild Makefile itself - sed -i 's/^Makefile:.*$/Makefile:/' ${D}${PTEST_PATH}/${TESTDIR}/Makefile - # do NOT need to rebuild $(check_PROGRAMS) - sed -i 's/^check-TESTS:.*$/check-TESTS:/' ${D}${PTEST_PATH}/${TESTDIR}/Makefile - - # fix the srcdir, top_srcdir - sed -i 's,^\(srcdir = \).*,\1${PTEST_PATH}/tests,' ${D}${PTEST_PATH}/${TESTDIR}/Makefile - sed -i 's,^\(top_srcdir = \).*,\1${PTEST_PATH}/tests,' ${D}${PTEST_PATH}/${TESTDIR}/Makefile - # fix the abs_top_builddir - sed -i 's,^\(abs_top_builddir = \).*,\1${PTEST_PATH}/,' ${D}${PTEST_PATH}/${TESTDIR}/Makefile - - # install test-driver - install -m 644 ${S}/test-driver ${D}${PTEST_PATH} - - # install necessary links - install -d ${D}${PTEST_PATH}/tools - ln -sf ${sbindir}/rsyslogd ${D}${PTEST_PATH}/tools/rsyslogd - - install -d ${D}${PTEST_PATH}/runtime - install -d ${D}${PTEST_PATH}/runtime/.libs - ( - cd ${D}/${libdir}/rsyslog - allso="*.so" - for i in $allso; do - ln -sf ${libdir}/rsyslog/$i ${D}${PTEST_PATH}/runtime/.libs/$i - done - ) - - # fix the module load path with runtime/.libs - find ${D}${PTEST_PATH}/${TESTDIR} -name "*.conf" -o -name "*.sh" -o -name "*.c" | xargs \ - sed -i -e 's:../plugins/.*/.libs/:../runtime/.libs/:g' - # fix the python3 path for tests/set-envar - sed -i -e s:${HOSTTOOLS_DIR}:${bindir}:g ${D}${PTEST_PATH}/tests/set-envvars -} - -do_install:append() { - install -d "${D}${sysconfdir}/init.d" - install -d "${D}${sysconfdir}/logrotate.d" - install -m 755 ${WORKDIR}/initscript ${D}${sysconfdir}/init.d/syslog - install -m 644 ${WORKDIR}/rsyslog.conf ${D}${sysconfdir}/rsyslog.conf - install -m 644 ${WORKDIR}/rsyslog.logrotate ${D}${sysconfdir}/logrotate.d/logrotate.rsyslog - sed -i -e "s#@BINDIR@#${bindir}#g" ${D}${sysconfdir}/logrotate.d/logrotate.rsyslog - - if ${@bb.utils.contains('PACKAGECONFIG', 'imjournal', 'true', 'false', d)}; then - install -d 0755 ${D}${sysconfdir}/rsyslog.d - echo '$ModLoad imjournal' >> ${D}${sysconfdir}/rsyslog.d/imjournal.conf - fi - if ${@bb.utils.contains('PACKAGECONFIG', 'mmjsonparse', 'true', 'false', d)}; then - install -d 0755 ${D}${sysconfdir}/rsyslog.d - echo '$ModLoad mmjsonparse' >> ${D}${sysconfdir}/rsyslog.d/mmjsonparse.conf - fi - if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then - install -d ${D}${systemd_system_unitdir} - install -m 644 ${WORKDIR}/rsyslog.service ${D}${systemd_system_unitdir} - sed -i -e "s,@sbindir@,${sbindir},g" ${D}${systemd_system_unitdir}/rsyslog.service - fi -} - -FILES:${PN} += "${bindir}" - -INITSCRIPT_NAME = "syslog" -INITSCRIPT_PARAMS = "defaults" - -CONFFILES:${PN} = "${sysconfdir}/rsyslog.conf" - -RCONFLICTS:${PN} = "busybox-syslog sysklogd syslog-ng" - -RPROVIDES:${PN} += "${PN}-systemd" -RREPLACES:${PN} += "${PN}-systemd" -RCONFLICTS:${PN} += "${PN}-systemd" -SYSTEMD_SERVICE:${PN} = "${BPN}.service" - -RDEPENDS:${PN} += "logrotate" - -# for rsyslog-ptest -VALGRIND = "valgrind" - -# valgrind supports armv7 and above -VALGRIND:armv4 = '' -VALGRIND:armv5 = '' -VALGRIND:armv6 = '' - -# X32 isn't supported by valgrind at this time -VALGRIND:linux-gnux32 = '' -VALGRIND:linux-muslx32 = '' - -# Disable for some MIPS variants -VALGRIND:mipsarchr6 = '' -VALGRIND:linux-gnun32 = '' - -# Disable for powerpc64 with musl -VALGRIND:libc-musl:powerpc64 = '' -VALGRIND:libc-musl:powerpc64le = '' - -# RISC-V support for valgrind is not there yet -VALGRIND:riscv64 = "" -VALGRIND:riscv32 = "" - -# util-linux: logger needs the -d option -RDEPENDS:${PN}-ptest += "\ - make diffutils gzip bash gawk coreutils procps \ - libgcc python3-core python3-io python3-json \ - curl util-linux shadow \ - " - -RRECOMMENDS:${PN}-ptest += "${TCLIBC}-dbg ${VALGRIND}" diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog_8.2408.0.bb b/sources/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog_8.2408.0.bb new file mode 100644 index 00000000..cf833de2 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog_8.2408.0.bb @@ -0,0 +1,208 @@ +SUMMARY = "Rsyslog is an enhanced multi-threaded syslogd" +DESCRIPTION = "\ +Rsyslog is an enhanced syslogd supporting, among others, MySQL,\ + PostgreSQL, failover log destinations, syslog/tcp, fine grain\ + output format control, high precision timestamps, queued operations\ + and the ability to filter on any message part. It is quite\ + compatible to stock sysklogd and can be used as a drop-in replacement.\ + Its advanced features make it suitable for enterprise-class,\ + encryption protected syslog relay chains while at the same time being\ + very easy to setup for the novice user." + +DEPENDS = "zlib libestr libfastjson bison-native flex-native liblogging" +HOMEPAGE = "http://www.rsyslog.com/" +LICENSE = "GPL-3.0-only & LGPL-3.0-only & Apache-2.0" +LIC_FILES_CHKSUM = "file://COPYING;md5=51d9635e646fb75e1b74c074f788e973 \ + file://COPYING.LESSER;md5=cb7903f1e5c39ae838209e130dca270a \ + file://COPYING.ASL20;md5=052f8a09206615ab07326ff8ce2d9d32\ +" + +SRC_URI = "https://www.rsyslog.com/files/download/rsyslog/${BPN}-${PV}.tar.gz \ + file://initscript \ + file://rsyslog.conf \ + file://rsyslog.logrotate \ + file://rsyslog.service \ + file://use-pkgconfig-to-check-libgcrypt.patch \ + file://run-ptest \ + file://0001-tests-disable-the-check-for-inotify.patch \ + file://0001-tests-tcpflood.c-Pass-correct-parameter-type-to-send.patch \ +" + +SRC_URI:append:libc-musl = " \ + file://0001-Include-sys-time-h.patch \ + file://disable-omfile-outchannel.patch \ +" +SRC_URI[sha256sum] = "8bb2f15f9bf9bb7e635182e3d3e370bfc39d08bf35a367dce9714e186f787206" + +UPSTREAM_CHECK_URI = "https://github.com/rsyslog/rsyslog/tags" +UPSTREAM_CHECK_REGEX = "(?P\d+(\.\d+)+)" + +inherit autotools pkgconfig systemd update-rc.d ptest + +EXTRA_OECONF += "--enable-imfile-tests ${ATOMICS}" +ATOMICS = "ap_cv_atomic_builtins_64=yes ap_cv_atomic_builtins=yes" +ATOMICS:mipsarch = "" +ATOMICS:powerpc = "" +ATOMICS:riscv32 = "" +ATOMICS:armv5 = "" + +# first line is default yes in configure +PACKAGECONFIG ??= " \ + rsyslogd rsyslogrt klog inet regexp uuid libcap-ng libgcrypt \ + fmhttp imdiag openssl imfile \ + ${@bb.utils.filter('DISTRO_FEATURES', 'snmp systemd', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'testbench relp ${VALGRIND}', '', d)} \ +" + +# default yes in configure +PACKAGECONFIG[relp] = "--enable-relp,--disable-relp,librelp," +PACKAGECONFIG[rsyslogd] = "--enable-rsyslogd,--disable-rsyslogd,," +PACKAGECONFIG[rsyslogrt] = "--enable-rsyslogrt,--disable-rsyslogrt,," +PACKAGECONFIG[fmhttp] = "--enable-fmhttp,--disable-fmhttp,curl," +PACKAGECONFIG[inet] = "--enable-inet,--disable-inet,," +PACKAGECONFIG[klog] = "--enable-klog,--disable-klog,," +PACKAGECONFIG[libcap-ng] = "--enable-libcap-ng,--disable-libcap-ng,libcap-ng," +PACKAGECONFIG[regexp] = "--enable-regexp,--disable-regexp,," +PACKAGECONFIG[uuid] = "--enable-uuid,--disable-uuid,util-linux," +PACKAGECONFIG[libgcrypt] = "--enable-libgcrypt,--disable-libgcrypt,libgcrypt," +PACKAGECONFIG[testbench] = "--enable-testbench --enable-omstdout,--disable-testbench --disable-omstdout,," + +# default no in configure +PACKAGECONFIG[debug] = "--enable-debug,--disable-debug,," +PACKAGECONFIG[imdiag] = "--enable-imdiag,--disable-imdiag,," +PACKAGECONFIG[imfile] = "--enable-imfile,--disable-imfile,," +PACKAGECONFIG[snmp] = "--enable-snmp,--disable-snmp,net-snmp," +PACKAGECONFIG[gnutls] = "--enable-gnutls,--disable-gnutls,gnutls," +PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl," +PACKAGECONFIG[systemd] = "--enable-libsystemd,--disable-libsystemd,systemd," +PACKAGECONFIG[imjournal] = "--enable-imjournal,--disable-imjournal," +PACKAGECONFIG[mmjsonparse] = "--enable-mmjsonparse,--disable-mmjsonparse," +PACKAGECONFIG[mysql] = "--enable-mysql,--disable-mysql,mysql5," +PACKAGECONFIG[postgresql] = "--enable-pgsql,--disable-pgsql,postgresql," +PACKAGECONFIG[libdbi] = "--enable-libdbi,--disable-libdbi,libdbi," +PACKAGECONFIG[mail] = "--enable-mail,--disable-mail,," +PACKAGECONFIG[valgrind] = ",--without-valgrind-testbench,valgrind," +PACKAGECONFIG[imhttp] = "--enable-imhttp,--disable-imhttp,civetweb," + + +TESTDIR = "tests" +do_compile_ptest() { + echo 'buildtest-TESTS: $(check_PROGRAMS)' >> ${TESTDIR}/Makefile + oe_runmake -C ${TESTDIR} buildtest-TESTS +} + +do_install_ptest() { + # install the tests + cp -rf ${S}/${TESTDIR} ${D}${PTEST_PATH} + cp -rf ${B}/${TESTDIR} ${D}${PTEST_PATH} + + # give permissions to all users + # some tests need to write to this directory as user 'daemon' + chmod 777 -R ${D}${PTEST_PATH}/tests + + # do NOT need to rebuild Makefile itself + sed -i 's/^Makefile:.*$/Makefile:/' ${D}${PTEST_PATH}/${TESTDIR}/Makefile + # do NOT need to rebuild $(check_PROGRAMS) + sed -i 's/^check-TESTS:.*$/check-TESTS:/' ${D}${PTEST_PATH}/${TESTDIR}/Makefile + + # fix the srcdir, top_srcdir + sed -i 's,^\(srcdir = \).*,\1${PTEST_PATH}/tests,' ${D}${PTEST_PATH}/${TESTDIR}/Makefile + sed -i 's,^\(top_srcdir = \).*,\1${PTEST_PATH}/tests,' ${D}${PTEST_PATH}/${TESTDIR}/Makefile + # fix the abs_top_builddir + sed -i 's,^\(abs_top_builddir = \).*,\1${PTEST_PATH}/,' ${D}${PTEST_PATH}/${TESTDIR}/Makefile + + # install test-driver + install -m 644 ${S}/test-driver ${D}${PTEST_PATH} + + # install necessary links + install -d ${D}${PTEST_PATH}/tools + ln -sf ${sbindir}/rsyslogd ${D}${PTEST_PATH}/tools/rsyslogd + + install -d ${D}${PTEST_PATH}/runtime + install -d ${D}${PTEST_PATH}/runtime/.libs + ( + cd ${D}/${libdir}/rsyslog + allso="*.so" + for i in $allso; do + ln -sf ${libdir}/rsyslog/$i ${D}${PTEST_PATH}/runtime/.libs/$i + done + ) + + # fix the module load path with runtime/.libs + find ${D}${PTEST_PATH}/${TESTDIR} -name "*.conf" -o -name "*.sh" -o -name "*.c" | xargs \ + sed -i -e 's:../plugins/.*/.libs/:../runtime/.libs/:g' + # fix the python3 path for tests/set-envar + sed -i -e s:${HOSTTOOLS_DIR}:${bindir}:g ${D}${PTEST_PATH}/tests/set-envvars +} + +do_install:append() { + install -d "${D}${sysconfdir}/init.d" + install -d "${D}${sysconfdir}/logrotate.d" + install -m 755 ${UNPACKDIR}/initscript ${D}${sysconfdir}/init.d/syslog + install -m 644 ${UNPACKDIR}/rsyslog.conf ${D}${sysconfdir}/rsyslog.conf + install -m 644 ${UNPACKDIR}/rsyslog.logrotate ${D}${sysconfdir}/logrotate.d/logrotate.rsyslog + sed -i -e "s#@BINDIR@#${bindir}#g" ${D}${sysconfdir}/logrotate.d/logrotate.rsyslog + + if ${@bb.utils.contains('PACKAGECONFIG', 'imjournal', 'true', 'false', d)}; then + install -d 0755 ${D}${sysconfdir}/rsyslog.d + echo '$ModLoad imjournal' >> ${D}${sysconfdir}/rsyslog.d/imjournal.conf + fi + if ${@bb.utils.contains('PACKAGECONFIG', 'mmjsonparse', 'true', 'false', d)}; then + install -d 0755 ${D}${sysconfdir}/rsyslog.d + echo '$ModLoad mmjsonparse' >> ${D}${sysconfdir}/rsyslog.d/mmjsonparse.conf + fi + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then + install -d ${D}${systemd_system_unitdir} + install -m 644 ${UNPACKDIR}/rsyslog.service ${D}${systemd_system_unitdir} + sed -i -e "s,@sbindir@,${sbindir},g" ${D}${systemd_system_unitdir}/rsyslog.service + fi +} + +FILES:${PN} += "${bindir}" + +INITSCRIPT_NAME = "syslog" +INITSCRIPT_PARAMS = "defaults" + +CONFFILES:${PN} = "${sysconfdir}/rsyslog.conf" + +RCONFLICTS:${PN} = "busybox-syslog sysklogd syslog-ng" + +RPROVIDES:${PN} += "${PN}-systemd" +RREPLACES:${PN} += "${PN}-systemd" +RCONFLICTS:${PN} += "${PN}-systemd" +SYSTEMD_SERVICE:${PN} = "${BPN}.service" + +RDEPENDS:${PN} += "logrotate" + +# for rsyslog-ptest +VALGRIND = "valgrind" + +# valgrind supports armv7 and above +VALGRIND:armv4 = '' +VALGRIND:armv5 = '' +VALGRIND:armv6 = '' + +# X32 isn't supported by valgrind at this time +VALGRIND:linux-gnux32 = '' +VALGRIND:linux-muslx32 = '' + +# Disable for some MIPS variants +VALGRIND:mipsarchr6 = '' +VALGRIND:linux-gnun32 = '' + +# Disable for powerpc64 with musl +VALGRIND:libc-musl:powerpc64 = '' +VALGRIND:libc-musl:powerpc64le = '' + +# RISC-V support for valgrind is not there yet +VALGRIND:riscv64 = "" +VALGRIND:riscv32 = "" + +# util-linux: logger needs the -d option +RDEPENDS:${PN}-ptest += "\ + make diffutils gzip bash gawk coreutils procps \ + libgcc python3-core python3-io python3-json \ + curl util-linux shadow \ + " + +RRECOMMENDS:${PN}-ptest += "${TCLIBC}-dbg ${VALGRIND}" diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/s-nail/files/0001-su_INLINE-eh-no-give-up-share-detection.patch b/sources/meta-openembedded/meta-oe/recipes-extended/s-nail/files/0001-su_INLINE-eh-no-give-up-share-detection.patch deleted file mode 100644 index 41f98281..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-extended/s-nail/files/0001-su_INLINE-eh-no-give-up-share-detection.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 9db4c0f6bc0dd11c77b54296fce6b8afe18f4325 Mon Sep 17 00:00:00 2001 -From: Steffen Nurpmeso -Date: Thu, 9 Jun 2022 18:26:38 +0800 -Subject: [PATCH] su_INLINE: eh no; give up, share detection with clang but for - a thing - -Upstream-Status: Backport [https://git.sdaoden.eu/browse/s-nail.git/commit/?id=de2a44c393a39d80ddf12154aec94cace84b19c1] - -Signed-off-by: Mingli Yu ---- - include/su/code.h | 34 +++++++++------------------------- - 1 file changed, 9 insertions(+), 25 deletions(-) - -diff --git a/include/su/code.h b/include/su/code.h -index 9683f4a..c7a2af3 100644 ---- a/include/su/code.h -+++ b/include/su/code.h -@@ -308,29 +308,8 @@ do{\ - # ifdef DOXYGEN - # define su_INLINE inline - # define su_SINLINE inline --# elif su_CC_GCC --# if !su_CC_VCHECK_GCC(3, 1) --# define su_INLINE extern __inline__ --# define su_SINLINE static __inline__ --# elif !defined __GNUC_GNU_INLINE__ /*4.1.3; !su_CC_VCHECK_GCC(4, 2)*/ --# define su_INLINE extern __inline __attribute__((always_inline)) --# define su_SINLINE static __inline __attribute__((always_inline)) -- /* gcc 8.3.0 bug: does not gracefully inline with -Os -- * gcc 12.1.0 bug: ditto, -Og -- * Thus: always gcc-specific! */ --# elif 1 /*!defined __OPTIMIZE__ || \ -- !defined __STDC_VERSION__ || __STDC_VERSION__ +0 < 199901L*/ --# define su_INLINE extern __inline __attribute__((gnu_inline)) --# define su_SINLINE static __inline __attribute__((gnu_inline)) --# elif !defined NDEBUG || !defined __OPTIMIZE__ --# define su_INLINE static inline --# define su_SINLINE static inline --# else --# define su_INLINE inline --# define su_SINLINE static inline --# endif --# elif su_CC_CLANG || su_CC_PCC --# if defined __STDC_VERSION__ && __STDC_VERSION__ +0 >= 199901L -+# elif su_CC_CLANG || su_CC_GCC || su_CC_PCC -+# if defined __STDC_VERSION__ && __STDC_VERSION__ +0 >= 199901l - # if !defined NDEBUG || !defined __OPTIMIZE__ - # define su_INLINE static inline - # define su_SINLINE static inline -@@ -340,8 +319,13 @@ do{\ - # define su_SINLINE static inline __attribute__((always_inline)) - # endif - # else --# define su_INLINE static __inline --# define su_SINLINE static __inline -+# if su_CC_VCHECK_GCC(3, 1) -+# define su_INLINE static __inline __attribute__((always_inline)) -+# define su_SINLINE static __inline __attribute__((always_inline)) -+# else -+# define su_INLINE static __inline -+# define su_SINLINE static __inline -+# endif - # endif - # else - # define su_INLINE static /* TODO __attribute__((unused)) alike? */ --- -2.25.1 - diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/s-nail/files/0001-su_INLINE-gcc-only-GNU-specifics-after-Og.patch b/sources/meta-openembedded/meta-oe/recipes-extended/s-nail/files/0001-su_INLINE-gcc-only-GNU-specifics-after-Og.patch deleted file mode 100644 index 37ecb0c1..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-extended/s-nail/files/0001-su_INLINE-gcc-only-GNU-specifics-after-Og.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 5429b9e343c808951b1418d8626e544c9dcb28de Mon Sep 17 00:00:00 2001 -From: Steffen Nurpmeso -Date: Thu, 9 Jun 2022 18:06:04 +0800 -Subject: [PATCH] su_INLINE: gcc: only GNU specifics after -Og - -Upstream-Status: Backport [https://git.sdaoden.eu/browse/s-nail.git/commit/?id=c5544b66c3b4b2e161166562349908a07e324b38] - -Signed-off-by: Mingli Yu ---- - include/su/code.h | 17 +++++++++-------- - 1 file changed, 9 insertions(+), 8 deletions(-) - -diff --git a/include/su/code.h b/include/su/code.h -index 4d552c1..9683f4a 100644 ---- a/include/su/code.h -+++ b/include/su/code.h -@@ -309,16 +309,17 @@ do{\ - # define su_INLINE inline - # define su_SINLINE inline - # elif su_CC_GCC -- /* After lots of trouble with OpenBSD/gcc 4.2.1 and SunOS/gcc 3.4.3 */ --# if !su_CC_VCHECK_GCC(3, 2) /* Unsure: only used C++ at that time */ --# define su_INLINE extern __inline --# define su_SINLINE static __inline --# elif !su_CC_VCHECK_GCC(4, 3) -+# if !su_CC_VCHECK_GCC(3, 1) -+# define su_INLINE extern __inline__ -+# define su_SINLINE static __inline__ -+# elif !defined __GNUC_GNU_INLINE__ /*4.1.3; !su_CC_VCHECK_GCC(4, 2)*/ - # define su_INLINE extern __inline __attribute__((always_inline)) - # define su_SINLINE static __inline __attribute__((always_inline)) -- /* xxx gcc 8.3.0 bug: does not truly inline with -Os */ --# elif !su_CC_VCHECK_GCC(8, 3) || !defined __OPTIMIZE__ ||\ -- !defined __STDC_VERSION__ || __STDC_VERSION__ +0 < 199901L -+ /* gcc 8.3.0 bug: does not gracefully inline with -Os -+ * gcc 12.1.0 bug: ditto, -Og -+ * Thus: always gcc-specific! */ -+# elif 1 /*!defined __OPTIMIZE__ || \ -+ !defined __STDC_VERSION__ || __STDC_VERSION__ +0 < 199901L*/ - # define su_INLINE extern __inline __attribute__((gnu_inline)) - # define su_SINLINE static __inline __attribute__((gnu_inline)) - # elif !defined NDEBUG || !defined __OPTIMIZE__ --- -2.25.1 - diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/s-nail/s-nail_14.9.24.bb b/sources/meta-openembedded/meta-oe/recipes-extended/s-nail/s-nail_14.9.24.bb deleted file mode 100644 index bcdb1e47..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-extended/s-nail/s-nail_14.9.24.bb +++ /dev/null @@ -1,49 +0,0 @@ -SUMMARY = "Feature-rich BSD mail(1)" -HOMEPAGE = "https://www.sdaoden.eu/code.html#s-mailx" -SECTION = "console/network" - -LICENSE = "ISC & BSD-3-Clause & BSD-4-Clause" -LIC_FILES_CHKSUM = "file://COPYING;md5=87266591c81260f10221f1f38872d023" - -SRC_URI = "https://ftp.sdaoden.eu/${BP}.tar.xz \ - file://make-errors.patch \ - file://0001-make.rc-set-VAL_MTA.patch \ - file://0001-su_INLINE-gcc-only-GNU-specifics-after-Og.patch \ - file://0001-su_INLINE-eh-no-give-up-share-detection.patch \ - file://0001-mk-make-config.sh-not-reveal-the-build-env.patch \ -" -SRC_URI[sha256sum] = "2714d6b8fb2af3b363fc7c79b76d058753716345d1b6ebcd8870ecd0e4f7ef8c" - -DEPENDS = "coreutils-native" - -B = "${WORKDIR}/build" - -inherit update-alternatives - -EXTRA_OEMAKE = "VERBOSE=yes \ - CONFIG=minimal \ - OPT_AUTOCC=no \ - OPT_CROSS_BUILD=yes \ - OBJDIR=${B} \ - strip=true \ - VAL_PREFIX=${prefix} \ - VAL_BINDIR=${bindir} \ - VAL_LIBEXECDIR=${libexecdir} \ - VAL_MANDIR=${mandir} \ - VAL_SYSCONFDIR=${sysconfdir}" - -do_configure[cleandirs] += "${B}" -do_configure() { - oe_runmake -C ${S} config -} - -do_compile() { - oe_runmake -C ${S} build -} - -do_install() { - oe_runmake -C ${S} install DESTDIR=${D} -} - -ALTERNATIVE:${PN} = "mailx" -ALTERNATIVE_TARGET[mailx] = "${bindir}/s-nail" diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/s-nail/s-nail_14.9.25.bb b/sources/meta-openembedded/meta-oe/recipes-extended/s-nail/s-nail_14.9.25.bb new file mode 100644 index 00000000..93a852a6 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-extended/s-nail/s-nail_14.9.25.bb @@ -0,0 +1,47 @@ +SUMMARY = "Feature-rich BSD mail(1)" +HOMEPAGE = "https://www.sdaoden.eu/code.html#s-mailx" +SECTION = "console/network" + +LICENSE = "ISC & BSD-3-Clause & BSD-4-Clause" +LIC_FILES_CHKSUM = "file://COPYING;md5=87266591c81260f10221f1f38872d023" + +SRC_URI = "https://ftp.sdaoden.eu/${BP}.tar.xz \ + file://make-errors.patch \ + file://0001-make.rc-set-VAL_MTA.patch \ + file://0001-mk-make-config.sh-not-reveal-the-build-env.patch \ +" +SRC_URI[sha256sum] = "20ff055be9829b69d46ebc400dfe516a40d287d7ce810c74355d6bdc1a28d8a9" + +DEPENDS = "coreutils-native" + +B = "${WORKDIR}/build" + +inherit update-alternatives + +EXTRA_OEMAKE = "VERBOSE=yes \ + CONFIG=minimal \ + OPT_AUTOCC=no \ + OPT_CROSS_BUILD=yes \ + OBJDIR=${B} \ + strip=true \ + VAL_PREFIX=${prefix} \ + VAL_BINDIR=${bindir} \ + VAL_LIBEXECDIR=${libexecdir} \ + VAL_MANDIR=${mandir} \ + VAL_SYSCONFDIR=${sysconfdir}" + +do_configure[cleandirs] += "${B}" +do_configure() { + oe_runmake -C ${S} config +} + +do_compile() { + oe_runmake -C ${S} build +} + +do_install() { + oe_runmake -C ${S} install DESTDIR=${D} +} + +ALTERNATIVE:${PN} = "mailx" +ALTERNATIVE_TARGET[mailx] = "${bindir}/s-nail" diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/sanlock/sanlock_3.9.2.bb b/sources/meta-openembedded/meta-oe/recipes-extended/sanlock/sanlock_3.9.2.bb deleted file mode 100644 index d369af1c..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-extended/sanlock/sanlock_3.9.2.bb +++ /dev/null @@ -1,48 +0,0 @@ -SUMMARY = "A shared storage lock manager" -DESCRIPTION = "sanlock is a lock manager built on shared storage. Hosts with access \ -to the storage can perform locking. An application running on the \ -hosts is given a small amount of space on the shared block device or \ -file, and uses sanlock for its own application-specific synchronization. \ -Internally, the sanlock daemon manages locks using two disk-based \ -lease algorithms: delta leases and paxos leases." -HOMEPAGE = "https://pagure.io/sanlock" -SECTION = "utils" - -LICENSE = "LGPL-2.0-or-later & GPL-2.0-only & GPL-2.0-or-later" -LIC_FILES_CHKSUM = "file://README.license;md5=60487bf0bf429d6b5aa72b6d37a0eb22" - -PV .= "+git" - -SRC_URI = "git://pagure.io/sanlock.git;protocol=http;branch=master \ - file://0001-sanlock-Replace-cp-a-with-cp-R-no-dereference-preser.patch \ - file://0001-add-missing-system-header-string.h.patch \ - " -SRCREV = "e005fbec2324aa8de7e2f302e5a17483c525b1d1" - -S = "${WORKDIR}/git" - -CVE_STATUS[CVE-2012-5638] = "fixed-version: The CPE in the NVD database doesn't reflect correctly the vulnerable versions." - -DEPENDS = "libaio util-linux" - -inherit setuptools3 useradd - -SETUPTOOLS_SETUP_PATH = "${S}/python" - -do_compile:prepend () { - oe_runmake -C ${S}/wdmd CMD_LDFLAGS="${LDFLAGS}" LIB_LDFLAGS="${LDFLAGS}" - oe_runmake -C ${S}/src CMD_LDFLAGS="${LDFLAGS}" LIB_ENTIRE_LDFLAGS="${LDFLAGS}" LIB_CLIENT_LDFLAGS="${LDFLAGS}" -} - -do_install:prepend () { - oe_runmake -C ${S}/wdmd DESTDIR=${D} LIBDIR=${libdir} install - oe_runmake -C ${S}/src DESTDIR=${D} LIBDIR=${libdir} install -} - -SANLOCKGROUP ?= "sanlock" -SANLOCKUSER ?= "sanlock" -USERADD_PACKAGES = "${PN}" -GROUPADD_PARAM:${PN} = "--system ${SANLOCKGROUP}" -USERADD_PARAM:${PN} = "--system -g ${SANLOCKGROUP} -G disk \ - --home-dir /run/${SANLOCKUSER} --no-create-home \ - --shell /sbin/nologin ${SANLOCKUSER}" diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/sanlock/sanlock_3.9.4.bb b/sources/meta-openembedded/meta-oe/recipes-extended/sanlock/sanlock_3.9.4.bb new file mode 100644 index 00000000..9e879ff3 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-extended/sanlock/sanlock_3.9.4.bb @@ -0,0 +1,48 @@ +SUMMARY = "A shared storage lock manager" +DESCRIPTION = "sanlock is a lock manager built on shared storage. Hosts with access \ +to the storage can perform locking. An application running on the \ +hosts is given a small amount of space on the shared block device or \ +file, and uses sanlock for its own application-specific synchronization. \ +Internally, the sanlock daemon manages locks using two disk-based \ +lease algorithms: delta leases and paxos leases." +HOMEPAGE = "https://pagure.io/sanlock" +SECTION = "utils" + +LICENSE = "LGPL-2.0-or-later & GPL-2.0-only & GPL-2.0-or-later" +LIC_FILES_CHKSUM = "file://README.license;md5=60487bf0bf429d6b5aa72b6d37a0eb22" + +PV .= "+git" + +SRC_URI = "git://pagure.io/sanlock.git;protocol=http;branch=master \ + file://0001-sanlock-Replace-cp-a-with-cp-R-no-dereference-preser.patch \ + file://0001-add-missing-system-header-string.h.patch \ + " +SRCREV = "e077f1a99a07c32ef460db89ed395b441f5e8b03" + +S = "${WORKDIR}/git" + +CVE_STATUS[CVE-2012-5638] = "fixed-version: The CPE in the NVD database doesn't reflect correctly the vulnerable versions." + +DEPENDS = "libaio util-linux" + +inherit setuptools3 useradd + +SETUPTOOLS_SETUP_PATH = "${S}/python" + +do_compile:prepend () { + oe_runmake -C ${S}/wdmd CMD_LDFLAGS="${LDFLAGS}" LIB_LDFLAGS="${LDFLAGS}" + oe_runmake -C ${S}/src CMD_LDFLAGS="${LDFLAGS}" LIB_ENTIRE_LDFLAGS="${LDFLAGS}" LIB_CLIENT_LDFLAGS="${LDFLAGS}" +} + +do_install:prepend () { + oe_runmake -C ${S}/wdmd DESTDIR=${D} LIBDIR=${libdir} install + oe_runmake -C ${S}/src DESTDIR=${D} LIBDIR=${libdir} install +} + +SANLOCKGROUP ?= "sanlock" +SANLOCKUSER ?= "sanlock" +USERADD_PACKAGES = "${PN}" +GROUPADD_PARAM:${PN} = "--system ${SANLOCKGROUP}" +USERADD_PARAM:${PN} = "--system -g ${SANLOCKGROUP} -G disk \ + --home-dir /run/${SANLOCKUSER} --no-create-home \ + --shell /sbin/nologin ${SANLOCKUSER}" diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/sblim-cmpi-devel/sblim-cmpi-devel_2.0.3.bb b/sources/meta-openembedded/meta-oe/recipes-extended/sblim-cmpi-devel/sblim-cmpi-devel_2.0.3.bb index 0e5fc7b6..b71ad234 100644 --- a/sources/meta-openembedded/meta-oe/recipes-extended/sblim-cmpi-devel/sblim-cmpi-devel_2.0.3.bb +++ b/sources/meta-openembedded/meta-oe/recipes-extended/sblim-cmpi-devel/sblim-cmpi-devel_2.0.3.bb @@ -13,6 +13,9 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/sblim/${BP}.tar.bz2 \ SRC_URI[md5sum] = "b934616f88a848f17ca3cf1b9e792cbf" SRC_URI[sha256sum] = "1671cabff6b922b6fde897673d9fdafd56c9310f82a7eacc0547d596b9cdfea6" +UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/sblim/files/development%20pkgs/sblim-cmpi-devel/" +UPSTREAM_CHECK_REGEX = "${BPN}/(?P\d+(\.\d+)+)" + inherit autotools BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/sblim-sfc-common/sblim-sfc-common_1.0.1.bb b/sources/meta-openembedded/meta-oe/recipes-extended/sblim-sfc-common/sblim-sfc-common_1.0.1.bb index 4e90215c..d2bab6ce 100644 --- a/sources/meta-openembedded/meta-oe/recipes-extended/sblim-sfc-common/sblim-sfc-common_1.0.1.bb +++ b/sources/meta-openembedded/meta-oe/recipes-extended/sblim-sfc-common/sblim-sfc-common_1.0.1.bb @@ -14,6 +14,8 @@ SRC_URI = "http://downloads.sourceforge.net/sblim/sblim-sfcCommon-${PV}.tar.bz2" SRC_URI[md5sum] = "8aa2655d97bdea54c4750f220b40990c" SRC_URI[sha256sum] = "b9b1037173d6ae0181c3bd5a316ddab5afd6a342ad0dbdc18e940fc0ad2c3297" +UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/sblim/files/sblim-sfcCommon/" + inherit autotools do_install() { diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb_1.4.9.bb b/sources/meta-openembedded/meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb_1.4.9.bb index 2a7cf228..6126a3a3 100644 --- a/sources/meta-openembedded/meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb_1.4.9.bb +++ b/sources/meta-openembedded/meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb_1.4.9.bb @@ -64,7 +64,7 @@ do_install() { oe_runmake DESTDIR=${D} install install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/sfcb.service ${D}${systemd_unitdir}/system/sblim-sfcb.service + install -m 0644 ${UNPACKDIR}/sfcb.service ${D}${systemd_unitdir}/system/sblim-sfcb.service install -d ${D}${sysconfdir}/init.d mv ${D}${sysconfdir}/init.d/sfcb ${D}${sysconfdir}/init.d/sblim-sfcb @@ -86,3 +86,8 @@ FILES:${PN} += "${libdir}/sfcb ${datadir}/sfcb" FILES:${PN}-dbg += "${libdir}/sfcb/.debug" RDEPENDS:${PN} = "perl bash" + +# This one is reproducible only on 32bit MACHINEs +# http://errors.yoctoproject.org/Errors/Details/766970/ +# sblim-sfcb-1.4.9/trace.c:214:18: error: passing argument 1 of 'gmtime_r' from incompatible pointer type [-Wincompatible-pointer-types] +CFLAGS += "-Wno-error=incompatible-pointer-types" diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/sblim-sfcc/sblim-sfcc/0001-Fix-incompatible-pointer-type-error-with-gcc-option.patch b/sources/meta-openembedded/meta-oe/recipes-extended/sblim-sfcc/sblim-sfcc/0001-Fix-incompatible-pointer-type-error-with-gcc-option.patch new file mode 100644 index 00000000..5e8f4fa0 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-extended/sblim-sfcc/sblim-sfcc/0001-Fix-incompatible-pointer-type-error-with-gcc-option.patch @@ -0,0 +1,72 @@ +From 5151163d6f4d4de0699d1e85c54fbe2cb5b55460 Mon Sep 17 00:00:00 2001 +From: Wang Mingyu +Date: Thu, 27 Jun 2024 01:51:36 +0000 +Subject: Fix incompatible pointer type error with gcc option + -Wincompatible-pointer-types + +| ../../sblim-sfcc-2.2.8/TEST/v2test_ec.c: In function 'main': +| ../../sblim-sfcc-2.2.8/TEST/v2test_ec.c:86:31: error: passing argument 1 of 'showClass' from incompatible pointer type [-Wincompatible-pointer-types] +| 86 | showClass(data.value.cls); +| | ~~~~~~~~~~^~~~ +| | | +| | CIMCClass * {aka struct _CIMCClass *} +| In file included from ../../sblim-sfcc-2.2.8/TEST/v2test_ec.c:7: +| ../../sblim-sfcc-2.2.8/TEST/show.h:9:34: note: expected 'CMPIConstClass *' {aka 'struct _CMPIConstClass *'} but argument is of type 'CIMCClass *' {aka 'struct _CIMCClass *'} +| 9 | void showClass( CMPIConstClass * in_class ); +| | ~~~~~~~~~~~~~~~~~^~~~~~~~ + +| ../../sblim-sfcc-2.2.8/TEST/v2test_ein.c: In function 'main': +| ../../sblim-sfcc-2.2.8/TEST/v2test_ein.c:96:36: error: passing argument 1 of 'showObjectPath' from incompatible pointer type [-Wincompatible-pointer-types] +| 96 | showObjectPath(data.value.ref); +| | ~~~~~~~~~~^~~~ +| | | +| | CIMCObjectPath * {aka struct _CIMCObjectPath *} +| In file included from ../../sblim-sfcc-2.2.8/TEST/v2test_ein.c:7: +| ../../sblim-sfcc-2.2.8/TEST/show.h:7:39: note: expected 'CMPIObjectPath *' {aka 'struct _CMPIObjectPath *'} but argument is of type 'CIMCObjectPath *' {aka 'struct _CIMCObjectPath *'} +| 7 | void showObjectPath( CMPIObjectPath * objectpath ); +| | ~~~~~~~~~~~~~~~~~^~~~~~~~~~ +| make[2]: *** [Makefile:1110: v2test_ein.o] Error 1 +| make[2]: *** Waiting for unfinished jobs.... +| ../../sblim-sfcc-2.2.8/TEST/v2test_im.c: In function 'main': +| ../../sblim-sfcc-2.2.8/TEST/v2test_im.c:82:40: warning: '%s' directive argument is null [-Wformat-overflow=] +| 82 | printf( "invokeMethod() rc=%d, msg=%s\n", +| | ^~ + +Upstream-Status: Backport +[https://github.com/kkaempf/sblim-sfcc/commit/881fccbaf19e26cbef3da1bebe2b42b3a9de1147#diff-ad9eeee99837ead0f29c70cd5f3956178dc3d51bd79618affd53d72a31404d5f] + +Signed-off-by: Wang Mingyu +--- + TEST/v2test_ec.c | 2 +- + TEST/v2test_ein.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/TEST/v2test_ec.c b/TEST/v2test_ec.c +index 940ca57..72a93a5 100644 +--- a/TEST/v2test_ec.c ++++ b/TEST/v2test_ec.c +@@ -83,7 +83,7 @@ int main() + count = enm->ft->hasNext(enm, NULL) ; + while (count > 0) { + data = enm->ft->getNext(enm, NULL); +- showClass(data.value.cls); ++ showClass((CMPIConstClass *)data.value.cls); + /* + * see if we have any more + */ +diff --git a/TEST/v2test_ein.c b/TEST/v2test_ein.c +index ede95c1..c9d1152 100644 +--- a/TEST/v2test_ein.c ++++ b/TEST/v2test_ein.c +@@ -93,7 +93,7 @@ int count = 0; + + data = enm->ft->getNext(enm, NULL); + +- showObjectPath(data.value.ref); ++ showObjectPath((CMPIObjectPath *)data.value.ref); + /* + * see if we have any more + */ +-- +2.34.1 + diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/sblim-sfcc/sblim-sfcc_2.2.8.bb b/sources/meta-openembedded/meta-oe/recipes-extended/sblim-sfcc/sblim-sfcc_2.2.8.bb index c9d3ddd6..4eb1c2f2 100644 --- a/sources/meta-openembedded/meta-oe/recipes-extended/sblim-sfcc/sblim-sfcc_2.2.8.bb +++ b/sources/meta-openembedded/meta-oe/recipes-extended/sblim-sfcc/sblim-sfcc_2.2.8.bb @@ -5,14 +5,22 @@ HOMEPAGE = "http://www.sblim.org" SRC_URI = "http://netcologne.dl.sourceforge.net/project/sblim/${BPN}/${BPN}-${PV}.tar.bz2 \ file://0001-cimxml-Include-sys-select.h-for-fd_set.patch \ file://0001-Fix-implicit-function-declarations.patch \ + file://0001-Fix-incompatible-pointer-type-error-with-gcc-option.patch \ " SRC_URI[md5sum] = "0bac0dec19f17ec065b6c332a56d7bae" SRC_URI[sha256sum] = "1b8f187583bc6c6b0a63aae0165ca37892a2a3bd4bb0682cd76b56268b42c3d6" +UPSTREAM_CHECK_URI="https://sourceforge.net/projects/sblim/files/sblim-sfcc/" + LICENSE = "EPL-1.0" LIC_FILES_CHKSUM = "file://COPYING;md5=f300afd598546add034364cd0a533261" DEPENDS = "curl" inherit autotools + +# http://errors.yoctoproject.org/Errors/Details/766897/ +# sblim-sfcc-2.2.8/TEST/v2test_ec.c:86:31: error: passing argument 1 of 'showClass' from incompatible pointer type [-Wincompatible-pointer-types] +# sblim-sfcc-2.2.8/TEST/v2test_ein.c:96:36: error: passing argument 1 of 'showObjectPath' from incompatible pointer type [-Wincompatible-pointer-types] +CFLAGS += "-Wno-error=incompatible-pointer-types" diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/scsirastools/scsirastools_1.6.6.bb b/sources/meta-openembedded/meta-oe/recipes-extended/scsirastools/scsirastools_1.6.6.bb index 4fefd516..c9a5bd1f 100644 --- a/sources/meta-openembedded/meta-oe/recipes-extended/scsirastools/scsirastools_1.6.6.bb +++ b/sources/meta-openembedded/meta-oe/recipes-extended/scsirastools/scsirastools_1.6.6.bb @@ -24,7 +24,7 @@ EXTRA_OEMAKE += "CC='${CC}' CFLAGS='${CFLAGS} -D_LARGEFILE64_SOURCE=1' sbindir=$ do_configure:append() { oe_runmake -C mdadm.d mdadm-1.3.0 - patch -p0 < ${WORKDIR}/mdadm.patch + patch -p0 < ${UNPACKDIR}/mdadm.patch } INITSCRIPT_PACKAGES = "${PN}-diskmon ${PN}-raidmon" INITSCRIPT_NAME:${PN}-diskmon = "sgdisk" @@ -44,3 +44,18 @@ FILES:${PN}-raidmon = "${sbindir}/sgraidmon ${sysconfdir}/init.d/sgraid" RDEPENDS:${PN} += "bash" RDEPENDS:${PN}-diskmon += "${PN} bash" RDEPENDS:${PN}-raidmon += "${PN} bash" + +# This one is reproducible only on 32bit MACHINEs +# http://errors.yoctoproject.org/Errors/Details/766967/ +# scsirastools-1.6.6/src/sgdiag.c:238:23: error: passing argument 1 of 'ctime' from incompatible pointer type [-Wincompatible-pointer-types] +# scsirastools-1.6.6/src/sgdiag.c:697:10: error: passing argument 1 of 'time' from incompatible pointer type [-Wincompatible-pointer-types] +# scsirastools-1.6.6/src/sgdiag.c:699:30: error: passing argument 1 of 'ctime' from incompatible pointer type [-Wincompatible-pointer-types] +# scsirastools-1.6.6/src/sgdiag.c:733:10: error: passing argument 1 of 'time' from incompatible pointer type [-Wincompatible-pointer-types] +# scsirastools-1.6.6/src/sgdefects.c:214:23: error: passing argument 1 of 'ctime' from incompatible pointer type [-Wincompatible-pointer-types] +# scsirastools-1.6.6/src/sgmode.c:290:23: error: passing argument 1 of 'ctime' from incompatible pointer type [-Wincompatible-pointer-types] +# scsirastools-1.6.6/src/sgdiskmon.c:1278:23: error: passing argument 1 of 'ctime' from incompatible pointer type [-Wincompatible-pointer-types] +# scsirastools-1.6.6/src/sgdskfl.c:318:23: error: passing argument 1 of 'ctime' from incompatible pointer type [-Wincompatible-pointer-types] +# scsirastools-1.6.6/src/sgdskfl.c:829:37: error: passing argument 1 of 'ctime' from incompatible pointer type [-Wincompatible-pointer-types] +# scsirastools-1.6.6/src/sgraidmon.c:1641:23: error: passing argument 1 of 'ctime' from incompatible pointer type [-Wincompatible-pointer-types] +# scsirastools-1.6.6/src/sgsafte.c:1298:23: error: passing argument 1 of 'ctime' from incompatible pointer type [-Wincompatible-pointer-types] +CFLAGS += "-Wno-error=incompatible-pointer-types" diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/smartmontools/smartmontools_7.4.bb b/sources/meta-openembedded/meta-oe/recipes-extended/smartmontools/smartmontools_7.4.bb index f3871474..bd92b162 100644 --- a/sources/meta-openembedded/meta-oe/recipes-extended/smartmontools/smartmontools_7.4.bb +++ b/sources/meta-openembedded/meta-oe/recipes-extended/smartmontools/smartmontools_7.4.bb @@ -33,13 +33,13 @@ SYSTEMD_AUTO_ENABLE = "disable" do_install:append () { #install the init.d/smartd install -d ${D}${sysconfdir}/init.d - install -p -m 0755 ${WORKDIR}/initd.smartd ${D}${sysconfdir}/init.d/smartd + install -p -m 0755 ${UNPACKDIR}/initd.smartd ${D}${sysconfdir}/init.d/smartd install -d ${D}${sysconfdir}/default - install -p -m 0644 ${WORKDIR}/smartmontools.default ${D}${sysconfdir}/default/smartmontools + install -p -m 0644 ${UNPACKDIR}/smartmontools.default ${D}${sysconfdir}/default/smartmontools #install systemd service file install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/smartd.service ${D}${systemd_unitdir}/system + install -m 0644 ${UNPACKDIR}/smartd.service ${D}${systemd_unitdir}/system sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \ -e 's,@SYSCONFDIR@,${sysconfdir},g' \ -e 's,@SBINDIR@,${sbindir},g' \ diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/socketcan/can-isotp_git.bb b/sources/meta-openembedded/meta-oe/recipes-extended/socketcan/can-isotp_git.bb index ab97356e..fa43c9de 100644 --- a/sources/meta-openembedded/meta-oe/recipes-extended/socketcan/can-isotp_git.bb +++ b/sources/meta-openembedded/meta-oe/recipes-extended/socketcan/can-isotp_git.bb @@ -5,6 +5,8 @@ PV = "1.0+git" SRC_URI = "git://github.com/hartkopp/can-isotp.git;protocol=https;branch=master" +# Upstream repo does not tag +UPSTREAM_CHECK_COMMITS = "1" S = "${WORKDIR}/git" diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/socketcan/can-utils/0001-lib-snprintf_can_error_frame-don-t-bail-out-if-CAN_E.patch b/sources/meta-openembedded/meta-oe/recipes-extended/socketcan/can-utils/0001-lib-snprintf_can_error_frame-don-t-bail-out-if-CAN_E.patch deleted file mode 100644 index f393cce0..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-extended/socketcan/can-utils/0001-lib-snprintf_can_error_frame-don-t-bail-out-if-CAN_E.patch +++ /dev/null @@ -1,70 +0,0 @@ -From 7d59157d4d570ba994f7dd07243ac5fb1c541410 Mon Sep 17 00:00:00 2001 -From: Marc Kleine-Budde -Date: Wed, 27 Sep 2023 16:15:52 +0200 -Subject: [PATCH] lib: snprintf_can_error_frame(): don't bail out if - CAN_ERR_CNT is set - -If CAN_ERR_CNT is set, the snprintf_can_error_frame() bails out, as it -cannot decode CAN_ERR_CNT. - -Fixes: 21fb43532e80 ("lib: snprintf_can_error_frame: print counter errors if CAN_ERR_CNT is set") - -Upstream-Status: Backport [https://github.com/linux-can/can-utils/commit/7d59157d4d570ba994f7dd07243ac5fb1c541410] ---- - lib.c | 23 +++++++++++++++++++---- - 1 file changed, 19 insertions(+), 4 deletions(-) - -diff --git a/lib.c b/lib.c -index d665c69..0201e94 100644 ---- a/lib.c -+++ b/lib.c -@@ -499,6 +499,7 @@ static const char *error_classes[] = { - "bus-off", - "bus-error", - "restarted-after-bus-off", -+ "error-counter-tx-rx", - }; - - static const char *controller_problems[] = { -@@ -636,6 +637,19 @@ static int snprintf_error_prot(char *buf, size_t len, const struct canfd_frame * - return n; - } - -+static int snprintf_error_cnt(char *buf, size_t len, const struct canfd_frame *cf) -+{ -+ int n = 0; -+ -+ if (len <= 0) -+ return 0; -+ -+ n += snprintf(buf + n, len - n, "{{%d}{%d}}", -+ cf->data[6], cf->data[7]); -+ -+ return n; -+} -+ - void snprintf_can_error_frame(char *buf, size_t len, const struct canfd_frame *cf, - const char* sep) - { -@@ -679,13 +693,14 @@ void snprintf_can_error_frame(char *buf, size_t len, const struct canfd_frame *c - n += snprintf_error_ctrl(buf + n, len - n, cf); - if (mask == CAN_ERR_PROT) - n += snprintf_error_prot(buf + n, len - n, cf); -+ if (mask == CAN_ERR_CNT) -+ n += snprintf_error_cnt(buf + n, len - n, cf); - classes++; - } - } - -- if (cf->can_id & CAN_ERR_CNT || cf->data[6] || cf->data[7]) { -- n += snprintf(buf + n, len - n, "%s", sep); -- n += snprintf(buf + n, len - n, "error-counter-tx-rx{{%d}{%d}}", -- cf->data[6], cf->data[7]); -+ if (!(cf->can_id & CAN_ERR_CNT) && (cf->data[6] || cf->data[7])) { -+ n += snprintf(buf + n, len - n, "%serror-counter-tx-rx", sep); -+ n += snprintf_error_cnt(buf + n, len - n, cf); - } - } --- -2.43.0 - diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/socketcan/can-utils/0001-timestamp-formatting-always-use-64-bit-for-timestamp.patch b/sources/meta-openembedded/meta-oe/recipes-extended/socketcan/can-utils/0001-timestamp-formatting-always-use-64-bit-for-timestamp.patch deleted file mode 100644 index 47f3792c..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-extended/socketcan/can-utils/0001-timestamp-formatting-always-use-64-bit-for-timestamp.patch +++ /dev/null @@ -1,422 +0,0 @@ -From 05eb82fc959328f851d4b939d394529ac377de19 Mon Sep 17 00:00:00 2001 -From: TyK -Date: Mon, 27 Nov 2023 10:59:21 +0800 -Subject: [PATCH] timestamp formatting: always use 64-bit for timestamp - formatting. - -Using C99 `unsigned long long` to format `struct timeval`'s `tv_sec` -and `tv_usec`, fix incorrect print on some 32bit platform which -are using time64. - -Upstream-Status: Backport [https://github.com/linux-can/can-utils/commit/ceda93bd5c56927c72d48dcaa30e17d6ecea86b8] ---- - asc2log.c | 38 +++++++++++++++++++++++--------------- - candump.c | 6 +++--- - canlogserver.c | 4 ++-- - canplayer.c | 11 +++++++---- - isotpdump.c | 8 ++++---- - isotpperf.c | 4 ++-- - isotpsniffer.c | 6 +++--- - j1939cat.c | 4 ++-- - j1939spy.c | 6 +++--- - log2asc.c | 11 +++++++---- - slcanpty.c | 4 ++-- - 11 files changed, 58 insertions(+), 44 deletions(-) - -diff --git a/asc2log.c b/asc2log.c -index ea6b486..4eb3609 100644 ---- a/asc2log.c -+++ b/asc2log.c -@@ -73,7 +73,7 @@ void print_usage(char *prg) - - void prframe(FILE *file, struct timeval *tv, int dev, struct canfd_frame *cf, unsigned int max_dlen, char *extra_info) { - -- fprintf(file, "(%lu.%06lu) ", tv->tv_sec, tv->tv_usec); -+ fprintf(file, "(%llu.%06llu) ", (unsigned long long)tv->tv_sec, (unsigned long long)tv->tv_usec); - - if (dev > 0) - fprintf(file, "can%d ", dev-1); -@@ -141,11 +141,14 @@ void eval_can(char* buf, struct timeval *date_tvp, char timestamps, char base, i - char dir[3]; /* 'Rx' or 'Tx' plus terminating zero */ - char *extra_info; - int i, items; -+ unsigned long long sec, usec; - - /* check for ErrorFrames */ -- if (sscanf(buf, "%lu.%lu %d %s", -- &read_tv.tv_sec, &read_tv.tv_usec, -+ if (sscanf(buf, "%llu.%llu %d %s", -+ &sec, &usec, - &interface, tmp1) == 4) { -+ read_tv.tv_sec = sec; -+ read_tv.tv_usec = usec; - - if (!strncmp(tmp1, "ErrorFrame", strlen("ErrorFrame"))) { - -@@ -165,18 +168,20 @@ void eval_can(char* buf, struct timeval *date_tvp, char timestamps, char base, i - - /* check for CAN frames with (hexa)decimal values */ - if (base == 'h') -- items = sscanf(buf, "%lu.%lu %d %s %2s %c %x %x %x %x %x %x %x %x %x", -- &read_tv.tv_sec, &read_tv.tv_usec, &interface, -+ items = sscanf(buf, "%llu.%llu %d %s %2s %c %x %x %x %x %x %x %x %x %x", -+ &sec, &usec, &interface, - tmp1, dir, &rtr, &dlc, - &data[0], &data[1], &data[2], &data[3], - &data[4], &data[5], &data[6], &data[7]); - else -- items = sscanf(buf, "%lu.%lu %d %s %2s %c %x %d %d %d %d %d %d %d %d", -- &read_tv.tv_sec, &read_tv.tv_usec, &interface, -+ items = sscanf(buf, "%llu.%llu %d %s %2s %c %x %d %d %d %d %d %d %d %d", -+ &sec, &usec, &interface, - tmp1, dir, &rtr, &dlc, - &data[0], &data[1], &data[2], &data[3], - &data[4], &data[5], &data[6], &data[7]); - -+ read_tv.tv_sec = sec; -+ read_tv.tv_usec = usec; - if (items < 7 ) /* make sure we've read the dlc */ - return; - -@@ -246,6 +251,7 @@ void eval_canfd(char* buf, struct timeval *date_tvp, char timestamps, int dplace - char *extra_info; - char *ptr; - int i; -+ unsigned long long sec, usec; - - /* The CANFD format is mainly in hex representation but - and probably some content we skip anyway. Don't trust the docs! */ -@@ -255,19 +261,21 @@ void eval_canfd(char* buf, struct timeval *date_tvp, char timestamps, int dplace - 100000 214 223040 80000000 46500250 460a0250 20011736 20010205 */ - - /* check for valid line without symbolic name */ -- if (sscanf(buf, "%lu.%lu %*s %d %2s %s %hhx %hhx %x %d ", -- &read_tv.tv_sec, &read_tv.tv_usec, &interface, -+ if (sscanf(buf, "%llu.%llu %*s %d %2s %s %hhx %hhx %x %d ", -+ &sec, &usec, &interface, - dir, tmp1, &brs, &esi, &dlc, &dlen) != 9) { - - /* check for valid line with a symbolic name */ -- if (sscanf(buf, "%lu.%lu %*s %d %2s %s %*s %hhx %hhx %x %d ", -- &read_tv.tv_sec, &read_tv.tv_usec, &interface, -+ if (sscanf(buf, "%llu.%llu %*s %d %2s %s %*s %hhx %hhx %x %d ", -+ &sec, &usec, &interface, - dir, tmp1, &brs, &esi, &dlc, &dlen) != 9) { - - /* no valid CANFD format pattern */ - return; - } - } -+ read_tv.tv_sec = sec; -+ read_tv.tv_usec = usec; - - /* check for allowed (unsigned) value ranges */ - if ((dlen > CANFD_MAX_DLEN) || (dlc > CANFD_MAX_DLC) || -@@ -427,12 +435,12 @@ int main(int argc, char **argv) - FILE *infile = stdin; - FILE *outfile = stdout; - static int verbose; -- static struct timeval tmp_tv; /* tmp frame timestamp from ASC file */ - static struct timeval date_tv; /* date of the ASC file */ - static int dplace; /* decimal place 4, 5 or 6 or uninitialized */ - static char base; /* 'd'ec or 'h'ex */ - static char timestamps; /* 'a'bsolute or 'r'elative */ - int opt; -+ unsigned long long sec, usec; - - while ((opt = getopt(argc, argv, "I:O:v?")) != -1) { - switch (opt) { -@@ -505,12 +513,12 @@ int main(int argc, char **argv) - gettimeofday(&date_tv, NULL); - } - if (verbose) -- printf("date %lu => %s", date_tv.tv_sec, ctime(&date_tv.tv_sec)); -+ printf("date %llu => %s", (unsigned long long)date_tv.tv_sec, ctime(&date_tv.tv_sec)); - continue; - } - - /* check for decimal places length in valid CAN frames */ -- if (sscanf(buf, "%lu.%s %s ", &tmp_tv.tv_sec, tmp2, -+ if (sscanf(buf, "%llu.%s %s ", &sec, tmp2, - tmp1) != 3) - continue; /* dplace remains zero until first found CAN frame */ - -@@ -529,7 +537,7 @@ int main(int argc, char **argv) - /* so try to get CAN frames and ErrorFrames and convert them */ - - /* check classic CAN format or the CANFD tag which can take both types */ -- if (sscanf(buf, "%lu.%lu %s ", &tmp_tv.tv_sec, &tmp_tv.tv_usec, tmp1) == 3){ -+ if (sscanf(buf, "%llu.%llu %s ", &sec, &usec, tmp1) == 3){ - if (!strncmp(tmp1, "CANFD", 5)) - eval_canfd(buf, &date_tv, timestamps, dplace, outfile); - else -diff --git a/candump.c b/candump.c -index 82f75b1..4ae8864 100644 ---- a/candump.c -+++ b/candump.c -@@ -224,7 +224,7 @@ static inline void sprint_timestamp(const char timestamp, const struct timeval * - { - switch (timestamp) { - case 'a': /* absolute with timestamp */ -- sprintf(ts_buffer, "(%010lu.%06lu) ", tv->tv_sec, tv->tv_usec); -+ sprintf(ts_buffer, "(%010llu.%06llu) ", (unsigned long long)tv->tv_sec, (unsigned long long)tv->tv_usec); - break; - - case 'A': /* absolute with date */ -@@ -234,7 +234,7 @@ static inline void sprint_timestamp(const char timestamp, const struct timeval * - - tm = *localtime(&tv->tv_sec); - strftime(timestring, 24, "%Y-%m-%d %H:%M:%S", &tm); -- sprintf(ts_buffer, "(%s.%06lu) ", timestring, tv->tv_usec); -+ sprintf(ts_buffer, "(%s.%06llu) ", timestring, (unsigned long long)tv->tv_usec); - } - break; - -@@ -251,7 +251,7 @@ static inline void sprint_timestamp(const char timestamp, const struct timeval * - diff.tv_sec--, diff.tv_usec += 1000000; - if (diff.tv_sec < 0) - diff.tv_sec = diff.tv_usec = 0; -- sprintf(ts_buffer, "(%03lu.%06lu) ", diff.tv_sec, diff.tv_usec); -+ sprintf(ts_buffer, "(%03llu.%06llu) ", (unsigned long long)diff.tv_sec, (unsigned long long)diff.tv_usec); - - if (timestamp == 'd') - *last_tv = *tv; /* update for delta calculation */ -diff --git a/canlogserver.c b/canlogserver.c -index 51d548f..349d64e 100644 ---- a/canlogserver.c -+++ b/canlogserver.c -@@ -408,8 +408,8 @@ int main(int argc, char **argv) - - idx = idx2dindex(addr.can_ifindex, s[i]); - -- sprintf(temp, "(%lu.%06lu) %*s ", -- tv.tv_sec, tv.tv_usec, max_devname_len, devname[idx]); -+ sprintf(temp, "(%llu.%06llu) %*s ", -+ (unsigned long long)tv.tv_sec, (unsigned long long)tv.tv_usec, max_devname_len, devname[idx]); - sprint_canframe(temp+strlen(temp), &frame, 0, maxdlen); - strcat(temp, "\n"); - -diff --git a/canplayer.c b/canplayer.c -index 51adc77..96346ce 100644 ---- a/canplayer.c -+++ b/canplayer.c -@@ -259,6 +259,7 @@ int main(int argc, char **argv) - int txidx; /* sendto() interface index */ - int eof, txmtu, i, j; - char *fret; -+ unsigned long long sec, usec; - - while ((opt = getopt(argc, argv, "I:l:tin:g:s:xv?")) != -1) { - switch (opt) { -@@ -419,11 +420,12 @@ int main(int argc, char **argv) - - eof = 0; - -- if (sscanf(buf, "(%lu.%lu) %s %s", &log_tv.tv_sec, &log_tv.tv_usec, -- device, ascframe) != 4) { -+ if (sscanf(buf, "(%llu.%llu) %s %s", &sec, &usec, device, ascframe) != 4) { - fprintf(stderr, "incorrect line format in logfile\n"); - return 1; - } -+ log_tv.tv_sec = sec; -+ log_tv.tv_usec = usec; - - if (use_timestamps) { /* throttle sending due to logfile timestamps */ - -@@ -505,11 +507,12 @@ int main(int argc, char **argv) - break; - } - -- if (sscanf(buf, "(%lu.%lu) %s %s", &log_tv.tv_sec, &log_tv.tv_usec, -- device, ascframe) != 4) { -+ if (sscanf(buf, "(%llu.%llu) %s %s", &sec, &usec, device, ascframe) != 4) { - fprintf(stderr, "incorrect line format in logfile\n"); - return 1; - } -+ log_tv.tv_sec = sec; -+ log_tv.tv_usec = usec; - - /* - * ensure the fractions of seconds are 6 decimal places long to catch -diff --git a/isotpdump.c b/isotpdump.c -index d22725e..e9e96ce 100644 ---- a/isotpdump.c -+++ b/isotpdump.c -@@ -361,7 +361,7 @@ int main(int argc, char **argv) - - switch (timestamp) { - case 'a': /* absolute with timestamp */ -- printf("(%lu.%06lu) ", tv.tv_sec, tv.tv_usec); -+ printf("(%llu.%06llu) ", (unsigned long long)tv.tv_sec, (unsigned long long)tv.tv_usec); - break; - - case 'A': /* absolute with date */ -@@ -372,7 +372,7 @@ int main(int argc, char **argv) - tm = *localtime(&tv.tv_sec); - strftime(timestring, 24, "%Y-%m-%d %H:%M:%S", - &tm); -- printf("(%s.%06lu) ", timestring, tv.tv_usec); -+ printf("(%s.%06llu) ", timestring, (unsigned long long)tv.tv_usec); - } break; - - case 'd': /* delta */ -@@ -388,8 +388,8 @@ int main(int argc, char **argv) - diff.tv_sec--, diff.tv_usec += 1000000; - if (diff.tv_sec < 0) - diff.tv_sec = diff.tv_usec = 0; -- printf("(%lu.%06lu) ", diff.tv_sec, -- diff.tv_usec); -+ printf("(%llu.%06llu) ", (unsigned long long)diff.tv_sec, -+ (unsigned long long)diff.tv_usec); - - if (timestamp == 'd') - last_tv = -diff --git a/isotpperf.c b/isotpperf.c -index 154d5cd..ad0dc2a 100644 ---- a/isotpperf.c -+++ b/isotpperf.c -@@ -403,9 +403,9 @@ int main(int argc, char **argv) - - /* check devisor to be not zero */ - if (diff_tv.tv_sec * 1000 + diff_tv.tv_usec / 1000){ -- printf("%lu.%06lus ", diff_tv.tv_sec, diff_tv.tv_usec); -+ printf("%llu.%06llus ", (unsigned long long)diff_tv.tv_sec, (unsigned long long)diff_tv.tv_usec); - printf("=> %lu byte/s", (fflen * 1000) / -- (diff_tv.tv_sec * 1000 + diff_tv.tv_usec / 1000)); -+ (unsigned long)(diff_tv.tv_sec * 1000 + diff_tv.tv_usec / 1000)); - } else - printf("(no time available) "); - -diff --git a/isotpsniffer.c b/isotpsniffer.c -index 2b6de40..f976149 100644 ---- a/isotpsniffer.c -+++ b/isotpsniffer.c -@@ -101,7 +101,7 @@ void printbuf(unsigned char *buffer, int nbytes, int color, int timestamp, - switch (timestamp) { - - case 'a': /* absolute with timestamp */ -- printf("(%lu.%06lu) ", tv->tv_sec, tv->tv_usec); -+ printf("(%llu.%06llu) ", (unsigned long long)tv->tv_sec, (unsigned long long)tv->tv_usec); - break; - - case 'A': /* absolute with date */ -@@ -111,7 +111,7 @@ void printbuf(unsigned char *buffer, int nbytes, int color, int timestamp, - - tm = *localtime(&tv->tv_sec); - strftime(timestring, 24, "%Y-%m-%d %H:%M:%S", &tm); -- printf("(%s.%06lu) ", timestring, tv->tv_usec); -+ printf("(%s.%06llu) ", timestring, (unsigned long long)tv->tv_usec); - } - break; - -@@ -128,7 +128,7 @@ void printbuf(unsigned char *buffer, int nbytes, int color, int timestamp, - diff.tv_sec--, diff.tv_usec += 1000000; - if (diff.tv_sec < 0) - diff.tv_sec = diff.tv_usec = 0; -- printf("(%lu.%06lu) ", diff.tv_sec, diff.tv_usec); -+ printf("(%llu.%06llu) ", (unsigned long long)diff.tv_sec, (unsigned long long)diff.tv_usec); - - if (timestamp == 'd') - *last_tv = *tv; /* update for delta calculation */ -diff --git a/j1939cat.c b/j1939cat.c -index 4234aad..238c4ff 100644 ---- a/j1939cat.c -+++ b/j1939cat.c -@@ -148,8 +148,8 @@ static void j1939cat_print_timestamp(struct j1939cat_priv *priv, const char *nam - if (!(cur->tv_sec | cur->tv_nsec)) - return; - -- fprintf(stderr, " %s: %lu s %lu us (seq=%03u, send=%07u)", -- name, cur->tv_sec, cur->tv_nsec / 1000, -+ fprintf(stderr, " %s: %llu s %llu us (seq=%03u, send=%07u)", -+ name, (unsigned long long)cur->tv_sec, (unsigned long long)cur->tv_nsec / 1000, - stats->tskey, stats->send); - - fprintf(stderr, "\n"); -diff --git a/j1939spy.c b/j1939spy.c -index e49ed14..56950ea 100644 ---- a/j1939spy.c -+++ b/j1939spy.c -@@ -268,14 +268,14 @@ int main(int argc, char **argv) - goto abs_time; - } else if ('a' == s.time) { - abs_time: -- printf("(%lu.%04lu)", tdut.tv_sec, tdut.tv_usec / 100); -+ printf("(%llu.%04llu)", (unsigned long long)tdut.tv_sec, (unsigned long long)tdut.tv_usec / 100); - } else if ('A' == s.time) { - struct tm tm; - tm = *localtime(&tdut.tv_sec); -- printf("(%04u%02u%02uT%02u%02u%02u.%04lu)", -+ printf("(%04u%02u%02uT%02u%02u%02u.%04llu)", - tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, - tm.tm_hour, tm.tm_min, tm.tm_sec, -- tdut.tv_usec/100); -+ (unsigned long long)tdut.tv_usec/100); - } - } - printf(" %s ", libj1939_addr2str(&src)); -diff --git a/log2asc.c b/log2asc.c -index a1cf364..85634f8 100644 ---- a/log2asc.c -+++ b/log2asc.c -@@ -190,6 +190,7 @@ int main(int argc, char **argv) - FILE *infile = stdin; - FILE *outfile = stdout; - static int maxdev, devno, i, crlf, fdfmt, nortrdlc, d4, opt, mtu; -+ unsigned long long sec, usec; - - while ((opt = getopt(argc, argv, "I:O:4nfr?")) != -1) { - switch (opt) { -@@ -259,18 +260,20 @@ int main(int argc, char **argv) - if (buf[0] != '(') - continue; - -- if (sscanf(buf, "(%lu.%lu) %s %s %s", &tv.tv_sec, &tv.tv_usec, -+ if (sscanf(buf, "(%llu.%llu) %s %s %s", &sec, &usec, - device, ascframe, extra_info) != 5) { - - /* do not evaluate the extra info */ - extra_info[0] = 0; - -- if (sscanf(buf, "(%lu.%lu) %s %s", &tv.tv_sec, &tv.tv_usec, -+ if (sscanf(buf, "(%llu.%llu) %s %s", &sec, &usec, - device, ascframe) != 4) { - fprintf(stderr, "incorrect line format in logfile\n"); - return 1; - } - } -+ tv.tv_sec = sec; -+ tv.tv_usec = usec; - - if (!start_tv.tv_sec) { /* print banner */ - start_tv = tv; -@@ -305,9 +308,9 @@ int main(int argc, char **argv) - tv.tv_sec = tv.tv_usec = 0; - - if (d4) -- fprintf(outfile, "%4lu.%04lu ", tv.tv_sec, tv.tv_usec/100); -+ fprintf(outfile, "%4llu.%04llu ", (unsigned long long)tv.tv_sec, (unsigned long long)tv.tv_usec/100); - else -- fprintf(outfile, "%4lu.%06lu ", tv.tv_sec, tv.tv_usec); -+ fprintf(outfile, "%4llu.%06llu ", (unsigned long long)tv.tv_sec, (unsigned long long)tv.tv_usec); - - if ((mtu == CAN_MTU) && (fdfmt == 0)) - can_asc(&cf, devno, nortrdlc, extra_info, outfile); -diff --git a/slcanpty.c b/slcanpty.c -index fa97cd6..fc86d4f 100644 ---- a/slcanpty.c -+++ b/slcanpty.c -@@ -363,8 +363,8 @@ int can2pty(int pty, int socket, int *tstamp) - if (ioctl(socket, SIOCGSTAMP, &tv) < 0) - perror("SIOCGSTAMP"); - -- sprintf(&buf[ptr + 2*frame.can_dlc], "%04lX", -- (tv.tv_sec%60)*1000 + tv.tv_usec/1000); -+ sprintf(&buf[ptr + 2*frame.can_dlc], "%04llX", -+ (unsigned long long)(tv.tv_sec%60)*1000 + tv.tv_usec/1000); - } - - strcat(buf, "\r"); /* add terminating character */ --- -2.43.0 - diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/socketcan/can-utils_2023.03.bb b/sources/meta-openembedded/meta-oe/recipes-extended/socketcan/can-utils_2023.03.bb index 0804b514..ca6cb7db 100644 --- a/sources/meta-openembedded/meta-oe/recipes-extended/socketcan/can-utils_2023.03.bb +++ b/sources/meta-openembedded/meta-oe/recipes-extended/socketcan/can-utils_2023.03.bb @@ -4,10 +4,7 @@ LIC_FILES_CHKSUM = "file://include/linux/can.h;endline=44;md5=a9e1169c6c9a114a61 DEPENDS = "libsocketcan" -SRC_URI = "git://github.com/linux-can/${BPN}.git;protocol=https;branch=master \ - file://0001-timestamp-formatting-always-use-64-bit-for-timestamp.patch \ - file://0001-lib-snprintf_can_error_frame-don-t-bail-out-if-CAN_E.patch \ -" +SRC_URI = "git://github.com/linux-can/${BPN}.git;protocol=https;branch=master" SRCREV = "cfe41963f3425e9adb01a70cfaddedf5e5982720" diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/socketcan/canutils_4.0.6.bb b/sources/meta-openembedded/meta-oe/recipes-extended/socketcan/canutils_4.0.6.bb index 6989531c..ab4710e8 100644 --- a/sources/meta-openembedded/meta-oe/recipes-extended/socketcan/canutils_4.0.6.bb +++ b/sources/meta-openembedded/meta-oe/recipes-extended/socketcan/canutils_4.0.6.bb @@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" DEPENDS = "libsocketcan" SRCREV = "299dff7f5322bf0348dcdd60071958ebedf5f09d" -SRC_URI = "git://git.pengutronix.de/git/tools/canutils.git;protocol=https;branch=master \ +SRC_URI = "git://git.pengutronix.de/git/tools/canutils.git;protocol=git;branch=master \ file://0001-canutils-candump-Add-error-frame-s-handling.patch \ " diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/socketcan/libsocketcan_0.0.12.bb b/sources/meta-openembedded/meta-oe/recipes-extended/socketcan/libsocketcan_0.0.12.bb index f45c2d75..9f6ef85c 100644 --- a/sources/meta-openembedded/meta-oe/recipes-extended/socketcan/libsocketcan_0.0.12.bb +++ b/sources/meta-openembedded/meta-oe/recipes-extended/socketcan/libsocketcan_0.0.12.bb @@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://src/libsocketcan.c;beginline=3;endline=17;md5=97e38ad SRCREV = "077def398ad303043d73339112968e5112d8d7c8" -SRC_URI = "git://git.pengutronix.de/git/tools/libsocketcan.git;protocol=https;branch=master" +SRC_URI = "git://git.pengutronix.de/git/tools/libsocketcan.git;protocol=git;branch=master" S = "${WORKDIR}/git" diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/tipcutils/tipcutils_git.bb b/sources/meta-openembedded/meta-oe/recipes-extended/tipcutils/tipcutils_git.bb index 580d03cb..71b62cc5 100644 --- a/sources/meta-openembedded/meta-oe/recipes-extended/tipcutils/tipcutils_git.bb +++ b/sources/meta-openembedded/meta-oe/recipes-extended/tipcutils/tipcutils_git.bb @@ -46,7 +46,7 @@ do_install:append() { # Install systemd related configuration file if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then install -d ${D}${sysconfdir}/modules-load.d - install -m 0644 ${WORKDIR}/tipcutils.conf ${D}${sysconfdir}/modules-load.d + install -m 0644 ${UNPACKDIR}/tipcutils.conf ${D}${sysconfdir}/modules-load.d fi } diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/tmux/tmux_3.3a.bb b/sources/meta-openembedded/meta-oe/recipes-extended/tmux/tmux_3.3a.bb deleted file mode 100644 index 51872228..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-extended/tmux/tmux_3.3a.bb +++ /dev/null @@ -1,25 +0,0 @@ -SUMMARY = "Terminal multiplexer" -HOMEPAGE = "http://tmux.sourceforge.net" -SECTION = "console/utils" - -LICENSE = "ISC" -LIC_FILES_CHKSUM = "file://tmux.c;beginline=3;endline=17;md5=f256b76d52e7b4d02bf19144bdaca107" - -DEPENDS = "ncurses libevent" - -SRC_URI = "https://github.com/tmux/tmux/releases/download/${PV}/tmux-${PV}.tar.gz" -SRC_URI[md5sum] = "8eee5883b9f6550fa4efaad0c9ec38f3" -SRC_URI[sha256sum] = "e4fd347843bd0772c4f48d6dde625b0b109b7a380ff15db21e97c11a4dcdf93f" - -UPSTREAM_CHECK_URI = "https://github.com/tmux/tmux/releases" - -inherit autotools pkgconfig - -PACKAGECONFIG ??= "" -PACKAGECONFIG[utempter] = "ac_cv_header_utempter_h=yes,ac_cv_header_utempter_h=no,libutempter," - -do_configure:prepend() { - # The 'compat' directory is needed for output during the build but it's - # not automatically created when building outside the source directory. - mkdir -p ${B}/compat -} diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/tmux/tmux_3.4.bb b/sources/meta-openembedded/meta-oe/recipes-extended/tmux/tmux_3.4.bb new file mode 100644 index 00000000..4360edf4 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-extended/tmux/tmux_3.4.bb @@ -0,0 +1,25 @@ +SUMMARY = "Terminal multiplexer" +HOMEPAGE = "http://tmux.sourceforge.net" +SECTION = "console/utils" + +LICENSE = "ISC" +LIC_FILES_CHKSUM = "file://tmux.c;beginline=3;endline=17;md5=f256b76d52e7b4d02bf19144bdaca107" + +DEPENDS = "ncurses libevent bison-native" + +SRC_URI = "https://github.com/tmux/tmux/releases/download/${PV}/tmux-${PV}.tar.gz" +SRC_URI[sha256sum] = "551ab8dea0bf505c0ad6b7bb35ef567cdde0ccb84357df142c254f35a23e19aa" + +UPSTREAM_CHECK_URI = "https://github.com/tmux/tmux/releases" +UPSTREAM_CHECK_REGEX = "(?P\d+(\.\d+)+)" + +inherit autotools pkgconfig + +PACKAGECONFIG ??= "" +PACKAGECONFIG[utempter] = "ac_cv_header_utempter_h=yes,ac_cv_header_utempter_h=no,libutempter," + +do_configure:prepend() { + # The 'compat' directory is needed for output during the build but it's + # not automatically created when building outside the source directory. + mkdir -p ${B}/compat +} diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/uml-utilities/uml-utilities_20040406.bb b/sources/meta-openembedded/meta-oe/recipes-extended/uml-utilities/uml-utilities_20040406.bb index 6a99e8d2..93daafbe 100644 --- a/sources/meta-openembedded/meta-oe/recipes-extended/uml-utilities/uml-utilities_20040406.bb +++ b/sources/meta-openembedded/meta-oe/recipes-extended/uml-utilities/uml-utilities_20040406.bb @@ -14,6 +14,7 @@ SRC_URI = "http://downloads.sourceforge.net/project/user-mode-linux/tools/1/uml_ SRC_URI[md5sum] = "2c1ccd9efacbfb39e42d482b89b2550a" SRC_URI[sha256sum] = "4f179b1db021ef15ac7e9b2eed57c525db127a754c574f591c367460cded9f41" +UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/user-mode-linux/files/tools/1/" S = "${WORKDIR}/tools" diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/vlock/vlock_2.2.3.bb b/sources/meta-openembedded/meta-oe/recipes-extended/vlock/vlock_2.2.3.bb index 84289515..948d8a28 100644 --- a/sources/meta-openembedded/meta-oe/recipes-extended/vlock/vlock_2.2.3.bb +++ b/sources/meta-openembedded/meta-oe/recipes-extended/vlock/vlock_2.2.3.bb @@ -50,7 +50,7 @@ do_configure () { do_install:append () { if [ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'yes', '', d)} = yes ]; then install -d -m 0755 ${D}/${sysconfdir}/pam.d - install -m 0644 ${WORKDIR}/vlock_pam ${D}${sysconfdir}/pam.d/vlock + install -m 0644 ${UNPACKDIR}/vlock_pam ${D}${sysconfdir}/pam.d/vlock fi } diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/wtmpdb/wtmpdb_0.11.0.bb b/sources/meta-openembedded/meta-oe/recipes-extended/wtmpdb/wtmpdb_0.11.0.bb index 785ae50e..d4a8b49e 100644 --- a/sources/meta-openembedded/meta-oe/recipes-extended/wtmpdb/wtmpdb_0.11.0.bb +++ b/sources/meta-openembedded/meta-oe/recipes-extended/wtmpdb/wtmpdb_0.11.0.bb @@ -19,7 +19,7 @@ REQUIRED_DISTRO_FEATURES = "pam" SYSTEMD_SERVICE:${PN} = "wtmpdb-update-boot.service wtmpdb-rotate.service" -EXTRA_OEMESON = " -Dpamlibdir=${libdir}" +EXTRA_OEMESON = " -Dpamlibdir=${base_libdir}/security" do_install:append () { if [ -d ${D}${prefix}/lib/systemd -a ${D}${prefix}/lib != `dirname ${D}${systemd_unitdir}` ]; then @@ -33,3 +33,4 @@ do_install:append () { FILES:${PN} += " ${systemd_system_unitdir} " FILES:${PN} += " ${libdir} " FILES:${PN} += " ${nonarch_libdir}/tmpfiles.d/* " +FILES:${PN} += " ${base_libdir}/security/*.so " diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/zram/zram_0.2.bb b/sources/meta-openembedded/meta-oe/recipes-extended/zram/zram_0.2.bb index b4b3a27b..89292118 100644 --- a/sources/meta-openembedded/meta-oe/recipes-extended/zram/zram_0.2.bb +++ b/sources/meta-openembedded/meta-oe/recipes-extended/zram/zram_0.2.bb @@ -17,21 +17,24 @@ SRC_URI = " \ file://dev-zram0.swap \ " +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" + do_install () { # Install systemd related configuration file if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then install -d ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/zram + install -m 0755 ${UNPACKDIR}/init ${D}${sysconfdir}/init.d/zram fi if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then install -d ${D}${libexecdir} - install -m 0755 ${WORKDIR}/zram-swap-init ${D}${libexecdir} - install -m 0755 ${WORKDIR}/zram-swap-deinit ${D}${libexecdir} + install -m 0755 ${UNPACKDIR}/zram-swap-init ${D}${libexecdir} + install -m 0755 ${UNPACKDIR}/zram-swap-deinit ${D}${libexecdir} install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/zram-swap.service ${D}${systemd_unitdir}/system/zram-swap.service + install -m 0644 ${UNPACKDIR}/zram-swap.service ${D}${systemd_unitdir}/system/zram-swap.service sed -i -e "s,@LIBEXECDIR@,${libexecdir},g" ${D}${systemd_unitdir}/system/zram-swap.service - install -m 0644 ${WORKDIR}/dev-zram0.swap ${D}${systemd_unitdir}/system/dev-zram0.swap + install -m 0644 ${UNPACKDIR}/dev-zram0.swap ${D}${systemd_unitdir}/system/dev-zram0.swap fi } diff --git a/sources/meta-openembedded/meta-oe/recipes-extended/zsync/zsync-curl_git.bb b/sources/meta-openembedded/meta-oe/recipes-extended/zsync/zsync-curl_git.bb index 1bc4010f..be658561 100644 --- a/sources/meta-openembedded/meta-oe/recipes-extended/zsync/zsync-curl_git.bb +++ b/sources/meta-openembedded/meta-oe/recipes-extended/zsync/zsync-curl_git.bb @@ -12,9 +12,18 @@ SRCREV = "00141c2806ccc4ddf2ff6263ee1612d19c0b713f" PV = "0.6.2+git" +# Upstream repo does not tag +UPSTREAM_CHECK_COMMITS = "1" + inherit autotools S = "${WORKDIR}/git" AUTOTOOLS_SCRIPT_PATH = "${S}/src" BBCLASSEXTEND = "native nativesdk" + +# http://errors.yoctoproject.org/Errors/Details/766891/ +# git/src/libzsync/zsync.c:445:18: error: returning 'char **' from a function with incompatible return type 'const char * const*' [-Wincompatible-pointer-types] +# git/src/libzsync/zsync.c:450:18: error: returning 'char **' from a function with incompatible return type 'const char * const*' [-Wincompatible-pointer-types] +# git/src/libzsync/zsync.c:932:43: error: passing argument 4 of 'zsync_configure_zstream_for_zdata' from incompatible pointer type [-Wincompatible-pointer-types] +CFLAGS += "-Wno-error=incompatible-pointer-types" diff --git a/sources/meta-openembedded/meta-oe/recipes-gnome/atk/atkmm-2.36_2.36.2.bb b/sources/meta-openembedded/meta-oe/recipes-gnome/atk/atkmm-2.36_2.36.2.bb deleted file mode 100644 index fa47cbd4..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-gnome/atk/atkmm-2.36_2.36.2.bb +++ /dev/null @@ -1,22 +0,0 @@ -SUMMARY = "C++ bindings for the atk" -SECTION = "libs" - -LICENSE = "LGPL-2.1-only & GPL-2.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=2d5025d4aa3495befef8f17206a5b0a1 \ - file://COPYING.tools;md5=751419260aa954499f7abaabaa882bbe" - -DEPENDS = "atk glibmm-2.68" - -GNOMEBN = "atkmm" - -inherit gnomebase features_check - -ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" - -SRC_URI[archive.sha256sum] = "6f62dd99f746985e573605937577ccfc944368f606a71ca46342d70e1cdae079" - -S = "${WORKDIR}/${GNOMEBN}-${PV}" - -EXTRA_OEMESON = "-Dbuild-documentation=false" - -FILES:${PN}-dev += "${libdir}/*/include ${libdir}/*/proc/m4" diff --git a/sources/meta-openembedded/meta-oe/recipes-gnome/atk/atkmm-2.36_2.36.3.bb b/sources/meta-openembedded/meta-oe/recipes-gnome/atk/atkmm-2.36_2.36.3.bb new file mode 100644 index 00000000..62ca0153 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-gnome/atk/atkmm-2.36_2.36.3.bb @@ -0,0 +1,22 @@ +SUMMARY = "C++ bindings for the atk" +SECTION = "libs" + +LICENSE = "LGPL-2.1-only & GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=2d5025d4aa3495befef8f17206a5b0a1 \ + file://COPYING.tools;md5=751419260aa954499f7abaabaa882bbe" + +DEPENDS = "atk glibmm-2.68" + +GNOMEBN = "atkmm" + +inherit gnomebase features_check + +ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" + +SRC_URI[archive.sha256sum] = "6ec264eaa0c4de0adb7202c600170bde9a7fbe4d466bfbe940eaf7faaa6c5974" + +S = "${WORKDIR}/${GNOMEBN}-${PV}" + +EXTRA_OEMESON = "-Dbuild-documentation=false" + +FILES:${PN}-dev += "${libdir}/*/include ${libdir}/*/proc/m4" diff --git a/sources/meta-openembedded/meta-oe/recipes-gnome/gmime/gmime_3.2.13.bb b/sources/meta-openembedded/meta-oe/recipes-gnome/gmime/gmime_3.2.13.bb deleted file mode 100644 index f51451d9..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-gnome/gmime/gmime_3.2.13.bb +++ /dev/null @@ -1,23 +0,0 @@ -LICENSE = "LGPL-2.1-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24" -DESCRIPTION = "Runtime libraries for parsing and creating MIME mail" -SECTION = "libs" - -DEPENDS = "glib-2.0 zlib" - -GNOMEBASEBUILDCLASS = "autotools" -inherit gnomebase gobject-introspection vala gtk-doc - -SRC_URI = "https://github.com/jstedfast/${BPN}/releases/download/${PV}/${BP}.tar.xz \ - file://iconv-detect.h \ -" -SRC_URI[sha256sum] = "2e10a54d4821daf8b16c019ad5d567e0fb8e766f8ffe5fec3d4c6a37373d6406" - -EXTRA_OECONF += "--enable-largefile" - -export ac_cv_have_iconv_detect_h="yes" -export ac_cv_sys_file_offset_bits="64" - -do_configure:append () { - cp ${WORKDIR}/iconv-detect.h ${S} -} diff --git a/sources/meta-openembedded/meta-oe/recipes-gnome/gmime/gmime_3.2.15.bb b/sources/meta-openembedded/meta-oe/recipes-gnome/gmime/gmime_3.2.15.bb new file mode 100644 index 00000000..c49859af --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-gnome/gmime/gmime_3.2.15.bb @@ -0,0 +1,26 @@ +LICENSE = "LGPL-2.1-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24" +DESCRIPTION = "Runtime libraries for parsing and creating MIME mail" +SECTION = "libs" + +DEPENDS = "glib-2.0 zlib" + +GNOMEBASEBUILDCLASS = "autotools" +inherit gnomebase gobject-introspection vala gtk-doc + +SRC_URI = "https://github.com/jstedfast/${BPN}/releases/download/${PV}/${BP}.tar.xz \ + file://iconv-detect.h \ +" +SRC_URI[sha256sum] = "84cd2a481a27970ec39b5c95f72db026722904a2ccf3fdbd57b280cf2d02b5c4" + +UPSTREAM_CHECK_URI = "https://github.com/jstedfast/gmime/releases" +UPSTREAM_CHECK_REGEX = "(?P\d+(\.\d+)+)" + +EXTRA_OECONF += "--enable-largefile" + +export ac_cv_have_iconv_detect_h="yes" +export ac_cv_sys_file_offset_bits="64" + +do_configure:append () { + cp ${UNPACKDIR}/iconv-detect.h ${S} +} diff --git a/sources/meta-openembedded/meta-oe/recipes-gnome/gnome-doc-utils-stub/gnome-doc-utils-stub_1.0.bb b/sources/meta-openembedded/meta-oe/recipes-gnome/gnome-doc-utils-stub/gnome-doc-utils-stub_1.0.bb index db55f223..c9297637 100644 --- a/sources/meta-openembedded/meta-oe/recipes-gnome/gnome-doc-utils-stub/gnome-doc-utils-stub_1.0.bb +++ b/sources/meta-openembedded/meta-oe/recipes-gnome/gnome-doc-utils-stub/gnome-doc-utils-stub_1.0.bb @@ -5,13 +5,17 @@ it requires libxml2 and python 2 at the same time, which can no longer be satisf LICENSE = "GPL-2.0-only & LGPL-2.1-only" LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6 \ file://${COREBASE}/meta/files/common-licenses/LGPL-2.1-only;md5=1a6d268fd218675ffea8be556788b780" + SRC_URI = "file://gnome-doc-utils.m4" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" + PROVIDES = "gnome-doc-utils" do_install:append() { install -d ${D}${datadir}/aclocal/ - install ${WORKDIR}/gnome-doc-utils.m4 ${D}${datadir}/aclocal/ + install ${UNPACKDIR}/gnome-doc-utils.m4 ${D}${datadir}/aclocal/ } FILES:${PN} += "${datadir}" diff --git a/sources/meta-openembedded/meta-oe/recipes-gnome/gnome-themes/gnome-themes-extra_3.28.bb b/sources/meta-openembedded/meta-oe/recipes-gnome/gnome-themes/gnome-themes-extra_3.28.bb index 3456383c..90756dac 100644 --- a/sources/meta-openembedded/meta-oe/recipes-gnome/gnome-themes/gnome-themes-extra_3.28.bb +++ b/sources/meta-openembedded/meta-oe/recipes-gnome/gnome-themes/gnome-themes-extra_3.28.bb @@ -19,6 +19,9 @@ SRC_URI = "${GNOME_MIRROR}/${BPN}/${PV}/${BPN}-${PV}.tar.xz;name=archive" SRC_URI[archive.md5sum] = "f9f2c6c521948da427f702372e16f826" SRC_URI[archive.sha256sum] = "7c4ba0bff001f06d8983cfc105adaac42df1d1267a2591798a780bac557a5819" +UPSTREAM_CHECK_URI = "https://gitlab.gnome.org/Archive/gnome-themes-extra/-/tags" +UPSTREAM_CHECK_REGEX = "(?P\d+(\.\d+)+)" + EXTRA_OECONF = "--disable-gtk2-engine" do_install:append() { diff --git a/sources/meta-openembedded/meta-oe/recipes-gnome/gtk+/gtk+_2.24.33.bb b/sources/meta-openembedded/meta-oe/recipes-gnome/gtk+/gtk+_2.24.33.bb index 8b9f6723..d55aa8d2 100644 --- a/sources/meta-openembedded/meta-oe/recipes-gnome/gtk+/gtk+_2.24.33.bb +++ b/sources/meta-openembedded/meta-oe/recipes-gnome/gtk+/gtk+_2.24.33.bb @@ -33,3 +33,5 @@ python populate_packages:prepend () { if (d.getVar('DEBIAN_NAMES')): d.setVar(d.expand('PKG:${PN}'), '${MLPREFIX}libgtk-2.0') } + +CFLAGS += "-Wno-error=incompatible-pointer-types" diff --git a/sources/meta-openembedded/meta-oe/recipes-gnome/malcontent/malcontent-ui.bb b/sources/meta-openembedded/meta-oe/recipes-gnome/malcontent/malcontent-ui.bb new file mode 100644 index 00000000..ca3bf081 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-gnome/malcontent/malcontent-ui.bb @@ -0,0 +1,48 @@ +SUMMARY = "User-Interface for malcontent." +HOMEPAGE = "https://gitlab.freedesktop.org/pwithnall/malcontent" +LICENSE = "LGPL-2.1-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" + +require malcontent.inc + +DEPENDS = " \ + malcontent \ + accountsservice \ + glib-2.0 \ + glib-testing \ + dbus \ + desktop-file-utils-native \ + itstool-native \ + libpam \ + polkit \ + appstream \ + flatpak \ + libadwaita \ + gtk4 \ +" + +GIR_MESON_OPTION = "" + +GTKIC_VERSION = "4" +inherit meson pkgconfig gtk-icon-cache gobject-introspection gettext features_check + +REQUIRED_DISTRO_FEATURES = "pam polkit gobject-introspection" + +EXTRA_OEMESON = "-Dui=enabled" + +do_install() { + install -d ${D}${datadir}/gir-1.0 ${D}${libdir}/girepository-1.0 ${D}${bindir} + install -d ${D}${datadir}/polkit-1/actions ${D}${datadir}/metainfo ${D}${datadir}/applications + install -m 0644 ${B}/libmalcontent-ui/MalcontentUi-1.gir ${D}${datadir}/gir-1.0 + install -m 0644 ${B}/libmalcontent-ui/MalcontentUi-1.typelib ${D}${libdir}/girepository-1.0 + install -m 0644 ${B}/libmalcontent-ui/libmalcontent-ui-1.so.${PV} ${D}${libdir} + ln -sf libmalcontent-ui-1.so.${PV} ${D}${libdir}/libmalcontent-ui-1.so + ln -sf libmalcontent-ui-1.so.${PV} ${D}${libdir}/libmalcontent-ui-1.so.1 + install -m 0755 ${B}/malcontent-control/malcontent-control ${D}${bindir} + install -m 0644 ${B}/malcontent-control/org.freedesktop.MalcontentControl.policy ${D}${datadir}/polkit-1/actions + install -m 0644 ${B}/malcontent-control/org.freedesktop.MalcontentControl.appdata.xml ${D}${datadir}/metainfo + install -m 0644 ${B}/malcontent-control/org.freedesktop.MalcontentControl.desktop ${D}${datadir}/applications +} + +FILES:${PN} += "${bindir} ${libdir} ${datadir}" + diff --git a/sources/meta-openembedded/meta-oe/recipes-gnome/malcontent/malcontent.bb b/sources/meta-openembedded/meta-oe/recipes-gnome/malcontent/malcontent.bb new file mode 100644 index 00000000..b30d8508 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-gnome/malcontent/malcontent.bb @@ -0,0 +1,35 @@ +SUMMARY = "malcontent implements support for restricting the type of content." +HOMEPAGE = "https://gitlab.freedesktop.org/pwithnall/malcontent" +LICENSE = "LGPL-2.1-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" + +require malcontent.inc + +DEPENDS = " \ + accountsservice \ + glib-2.0 \ + glib-testing \ + dbus \ + itstool-native \ + libpam \ + polkit \ +" + +GIR_MESON_OPTION = "" + +inherit meson pkgconfig gobject-introspection gettext features_check + +REQUIRED_DISTRO_FEATURES = "pam polkit gobject-introspection" + +PACKAGECONFIG ?= "ui" +PACKAGECONFIG[ui] = ",,,malcontent-ui" + +EXTRA_OEMESON = "-Dui=disabled" + +FILES:${PN} += " \ + ${libdir}/security/pam_malcontent.so \ + ${datadir}/accountsservice \ + ${datadir}/help \ + ${datadir}/dbus-1 \ + ${datadir}/polkit-1 \ +" diff --git a/sources/meta-openembedded/meta-oe/recipes-gnome/malcontent/malcontent.inc b/sources/meta-openembedded/meta-oe/recipes-gnome/malcontent/malcontent.inc new file mode 100644 index 00000000..d48be08b --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-gnome/malcontent/malcontent.inc @@ -0,0 +1,4 @@ +SRC_URI = "git://gitlab.freedesktop.org/pwithnall/malcontent.git;protocol=https;branch=main" +S = "${WORKDIR}/git" +SRCREV = "3ba80995bb25b7aeda7e21d547f9e39ff9a81736" +PV = "0.12.0" diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/cglm/cglm_0.9.2.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/cglm/cglm_0.9.2.bb deleted file mode 100644 index b503c6ed..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/cglm/cglm_0.9.2.bb +++ /dev/null @@ -1,25 +0,0 @@ -SUMMARY = "OpenGL Mathematics Library for C" -DESCRIPTION = "Highly optimized 2D|3D math library, also known as OpenGL Mathematics (glm) for `C`. \ -cglm provides lot of utils to help math operations to be fast and quick to write. It is community \ -friendly, feel free to bring any issues, bugs you faced." -HOMEPAGE = "https://github.com/recp/cglm" -BUGTRACKER = "https://github.com/recp/cglm/issues" -SECTION = "libs" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=8dc95c4110ba741c43832734b51b7de7" - -SRC_URI = "git://github.com/recp/cglm;branch=master;protocol=https" -# Tag v0.9.1 -SRCREV = "c8781615183ce3cb4f5d72caf70f2c01d7d4d2af" - -S = "${WORKDIR}/git" - -PACKAGECONFIG[build_tests] = "-Dbuild_tests=true,-Dbuild_tests=false," - -PACKAGECONFIG ?= "" - -inherit meson pkgconfig - -EXTRA_OEMESON += "--buildtype release" - -BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/cglm/cglm_0.9.4.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/cglm/cglm_0.9.4.bb new file mode 100644 index 00000000..6fcc07d9 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/cglm/cglm_0.9.4.bb @@ -0,0 +1,25 @@ +SUMMARY = "OpenGL Mathematics Library for C" +DESCRIPTION = "Highly optimized 2D|3D math library, also known as OpenGL Mathematics (glm) for `C`. \ +cglm provides lot of utils to help math operations to be fast and quick to write. It is community \ +friendly, feel free to bring any issues, bugs you faced." +HOMEPAGE = "https://github.com/recp/cglm" +BUGTRACKER = "https://github.com/recp/cglm/issues" +SECTION = "libs" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=8dc95c4110ba741c43832734b51b7de7" + +SRC_URI = "git://github.com/recp/cglm;branch=master;protocol=https" +# Tag v0.9.1 +SRCREV = "1796cc5ce298235b615dc7a4750b8c3ba56a05dd" + +S = "${WORKDIR}/git" + +PACKAGECONFIG[build_tests] = "-Dbuild_tests=true,-Dbuild_tests=false," + +PACKAGECONFIG ?= "" + +inherit meson pkgconfig + +EXTRA_OEMESON += "--buildtype release" + +BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/deqp-runner/deqp-runner-crates.inc b/sources/meta-openembedded/meta-oe/recipes-graphics/deqp-runner/deqp-runner-crates.inc new file mode 100644 index 00000000..09a3f675 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/deqp-runner/deqp-runner-crates.inc @@ -0,0 +1,268 @@ +# Autogenerated with 'bitbake -c update_crates deqp-runner' + +# from Cargo.lock +SRC_URI += " \ + crate://crates.io/adler/1.0.2 \ + crate://crates.io/aho-corasick/1.0.5 \ + crate://crates.io/android-tzdata/0.1.1 \ + crate://crates.io/android_system_properties/0.1.5 \ + crate://crates.io/ansi_term/0.12.1 \ + crate://crates.io/anyhow/1.0.75 \ + crate://crates.io/atty/0.2.14 \ + crate://crates.io/autocfg/1.1.0 \ + crate://crates.io/bitflags/1.3.2 \ + crate://crates.io/bitflags/2.4.0 \ + crate://crates.io/bumpalo/3.13.0 \ + crate://crates.io/cast/0.3.0 \ + crate://crates.io/cc/1.0.83 \ + crate://crates.io/cfg-if/1.0.0 \ + crate://crates.io/chrono/0.4.30 \ + crate://crates.io/clap/2.34.0 \ + crate://crates.io/core-foundation-sys/0.8.4 \ + crate://crates.io/crc32fast/1.3.2 \ + crate://crates.io/criterion/0.3.6 \ + crate://crates.io/criterion-plot/0.4.5 \ + crate://crates.io/crossbeam-channel/0.5.8 \ + crate://crates.io/crossbeam-deque/0.8.3 \ + crate://crates.io/crossbeam-epoch/0.9.15 \ + crate://crates.io/crossbeam-utils/0.8.16 \ + crate://crates.io/csv/1.2.2 \ + crate://crates.io/csv-core/0.1.10 \ + crate://crates.io/derive-getters/0.1.1 \ + crate://crates.io/either/1.9.0 \ + crate://crates.io/errno/0.3.3 \ + crate://crates.io/errno-dragonfly/0.1.2 \ + crate://crates.io/fastrand/2.0.0 \ + crate://crates.io/flate2/1.0.27 \ + crate://crates.io/getrandom/0.1.16 \ + crate://crates.io/half/1.8.2 \ + crate://crates.io/hashbrown/0.12.3 \ + crate://crates.io/heck/0.3.3 \ + crate://crates.io/hermit-abi/0.1.19 \ + crate://crates.io/hermit-abi/0.3.2 \ + crate://crates.io/iana-time-zone/0.1.57 \ + crate://crates.io/iana-time-zone-haiku/0.1.2 \ + crate://crates.io/indexmap/1.9.3 \ + crate://crates.io/itertools/0.10.5 \ + crate://crates.io/itoa/1.0.9 \ + crate://crates.io/js-sys/0.3.64 \ + crate://crates.io/junit-report/0.4.0 \ + crate://crates.io/lazy_static/1.4.0 \ + crate://crates.io/libc/0.2.147 \ + crate://crates.io/linux-raw-sys/0.4.7 \ + crate://crates.io/log/0.4.20 \ + crate://crates.io/memchr/2.6.3 \ + crate://crates.io/memoffset/0.9.0 \ + crate://crates.io/miniz_oxide/0.7.1 \ + crate://crates.io/mio/0.8.8 \ + crate://crates.io/num-traits/0.2.16 \ + crate://crates.io/num_cpus/1.16.0 \ + crate://crates.io/once_cell/1.18.0 \ + crate://crates.io/oorandom/11.1.3 \ + crate://crates.io/plotters/0.3.5 \ + crate://crates.io/plotters-backend/0.3.5 \ + crate://crates.io/plotters-svg/0.3.5 \ + crate://crates.io/ppv-lite86/0.2.17 \ + crate://crates.io/proc-macro-error/1.0.4 \ + crate://crates.io/proc-macro-error-attr/1.0.4 \ + crate://crates.io/proc-macro2/1.0.66 \ + crate://crates.io/quote/1.0.33 \ + crate://crates.io/rand/0.7.3 \ + crate://crates.io/rand_chacha/0.2.2 \ + crate://crates.io/rand_core/0.5.1 \ + crate://crates.io/rand_hc/0.2.0 \ + crate://crates.io/rayon/1.7.0 \ + crate://crates.io/rayon-core/1.11.0 \ + crate://crates.io/redox_syscall/0.3.5 \ + crate://crates.io/regex/1.9.5 \ + crate://crates.io/regex-automata/0.3.8 \ + crate://crates.io/regex-syntax/0.7.5 \ + crate://crates.io/roxmltree/0.13.1 \ + crate://crates.io/rustix/0.38.13 \ + crate://crates.io/ryu/1.0.15 \ + crate://crates.io/same-file/1.0.6 \ + crate://crates.io/scopeguard/1.2.0 \ + crate://crates.io/serde/1.0.188 \ + crate://crates.io/serde-tuple-vec-map/1.0.1 \ + crate://crates.io/serde_cbor/0.11.2 \ + crate://crates.io/serde_derive/1.0.188 \ + crate://crates.io/serde_json/1.0.106 \ + crate://crates.io/serde_yaml/0.9.21 \ + crate://crates.io/stderrlog/0.5.4 \ + crate://crates.io/strsim/0.8.0 \ + crate://crates.io/structopt/0.3.26 \ + crate://crates.io/structopt-derive/0.4.18 \ + crate://crates.io/syn/1.0.109 \ + crate://crates.io/syn/2.0.32 \ + crate://crates.io/tempfile/3.8.0 \ + crate://crates.io/termcolor/1.1.3 \ + crate://crates.io/textwrap/0.11.0 \ + crate://crates.io/thiserror/1.0.48 \ + crate://crates.io/thiserror-impl/1.0.48 \ + crate://crates.io/thread_local/1.1.7 \ + crate://crates.io/tinytemplate/1.2.1 \ + crate://crates.io/toml/0.5.11 \ + crate://crates.io/unicode-ident/1.0.11 \ + crate://crates.io/unicode-segmentation/1.10.1 \ + crate://crates.io/unicode-width/0.1.10 \ + crate://crates.io/unsafe-libyaml/0.2.9 \ + crate://crates.io/vec_map/0.8.2 \ + crate://crates.io/version_check/0.9.4 \ + crate://crates.io/walkdir/2.4.0 \ + crate://crates.io/wasi/0.9.0+wasi-snapshot-preview1 \ + crate://crates.io/wasi/0.11.0+wasi-snapshot-preview1 \ + crate://crates.io/wasm-bindgen/0.2.87 \ + crate://crates.io/wasm-bindgen-backend/0.2.87 \ + crate://crates.io/wasm-bindgen-macro/0.2.87 \ + crate://crates.io/wasm-bindgen-macro-support/0.2.87 \ + crate://crates.io/wasm-bindgen-shared/0.2.87 \ + crate://crates.io/web-sys/0.3.64 \ + crate://crates.io/winapi/0.3.9 \ + crate://crates.io/winapi-i686-pc-windows-gnu/0.4.0 \ + crate://crates.io/winapi-util/0.1.5 \ + crate://crates.io/winapi-x86_64-pc-windows-gnu/0.4.0 \ + crate://crates.io/windows/0.48.0 \ + crate://crates.io/windows-sys/0.48.0 \ + crate://crates.io/windows-targets/0.48.5 \ + crate://crates.io/windows_aarch64_gnullvm/0.48.5 \ + crate://crates.io/windows_aarch64_msvc/0.48.5 \ + crate://crates.io/windows_i686_gnu/0.48.5 \ + crate://crates.io/windows_i686_msvc/0.48.5 \ + crate://crates.io/windows_x86_64_gnu/0.48.5 \ + crate://crates.io/windows_x86_64_gnullvm/0.48.5 \ + crate://crates.io/windows_x86_64_msvc/0.48.5 \ + crate://crates.io/xml-rs/0.8.18 \ + crate://crates.io/xmlparser/0.13.5 \ +" + +SRC_URI[adler-1.0.2.sha256sum] = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +SRC_URI[aho-corasick-1.0.5.sha256sum] = "0c378d78423fdad8089616f827526ee33c19f2fddbd5de1629152c9593ba4783" +SRC_URI[android-tzdata-0.1.1.sha256sum] = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" +SRC_URI[android_system_properties-0.1.5.sha256sum] = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +SRC_URI[ansi_term-0.12.1.sha256sum] = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" +SRC_URI[anyhow-1.0.75.sha256sum] = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" +SRC_URI[atty-0.2.14.sha256sum] = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +SRC_URI[autocfg-1.1.0.sha256sum] = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +SRC_URI[bitflags-1.3.2.sha256sum] = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +SRC_URI[bitflags-2.4.0.sha256sum] = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" +SRC_URI[bumpalo-3.13.0.sha256sum] = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" +SRC_URI[cast-0.3.0.sha256sum] = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" +SRC_URI[cc-1.0.83.sha256sum] = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +SRC_URI[cfg-if-1.0.0.sha256sum] = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +SRC_URI[chrono-0.4.30.sha256sum] = "defd4e7873dbddba6c7c91e199c7fcb946abc4a6a4ac3195400bcfb01b5de877" +SRC_URI[clap-2.34.0.sha256sum] = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" +SRC_URI[core-foundation-sys-0.8.4.sha256sum] = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" +SRC_URI[crc32fast-1.3.2.sha256sum] = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" +SRC_URI[criterion-0.3.6.sha256sum] = "b01d6de93b2b6c65e17c634a26653a29d107b3c98c607c765bf38d041531cd8f" +SRC_URI[criterion-plot-0.4.5.sha256sum] = "2673cc8207403546f45f5fd319a974b1e6983ad1a3ee7e6041650013be041876" +SRC_URI[crossbeam-channel-0.5.8.sha256sum] = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" +SRC_URI[crossbeam-deque-0.8.3.sha256sum] = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" +SRC_URI[crossbeam-epoch-0.9.15.sha256sum] = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" +SRC_URI[crossbeam-utils-0.8.16.sha256sum] = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" +SRC_URI[csv-1.2.2.sha256sum] = "626ae34994d3d8d668f4269922248239db4ae42d538b14c398b74a52208e8086" +SRC_URI[csv-core-0.1.10.sha256sum] = "2b2466559f260f48ad25fe6317b3c8dac77b5bdb5763ac7d9d6103530663bc90" +SRC_URI[derive-getters-0.1.1.sha256sum] = "16dc4e2517f08ca167440ccb11023c1308ee19a4022d7b03c0e652f971171869" +SRC_URI[either-1.9.0.sha256sum] = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +SRC_URI[errno-0.3.3.sha256sum] = "136526188508e25c6fef639d7927dfb3e0e3084488bf202267829cf7fc23dbdd" +SRC_URI[errno-dragonfly-0.1.2.sha256sum] = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +SRC_URI[fastrand-2.0.0.sha256sum] = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" +SRC_URI[flate2-1.0.27.sha256sum] = "c6c98ee8095e9d1dcbf2fcc6d95acccb90d1c81db1e44725c6a984b1dbdfb010" +SRC_URI[getrandom-0.1.16.sha256sum] = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +SRC_URI[half-1.8.2.sha256sum] = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" +SRC_URI[hashbrown-0.12.3.sha256sum] = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +SRC_URI[heck-0.3.3.sha256sum] = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" +SRC_URI[hermit-abi-0.1.19.sha256sum] = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +SRC_URI[hermit-abi-0.3.2.sha256sum] = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" +SRC_URI[iana-time-zone-0.1.57.sha256sum] = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613" +SRC_URI[iana-time-zone-haiku-0.1.2.sha256sum] = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +SRC_URI[indexmap-1.9.3.sha256sum] = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +SRC_URI[itertools-0.10.5.sha256sum] = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +SRC_URI[itoa-1.0.9.sha256sum] = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" +SRC_URI[js-sys-0.3.64.sha256sum] = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" +SRC_URI[junit-report-0.4.0.sha256sum] = "e4e00ad2de771fc4988af88b02cbd618c08c17920208c35c4bbfe67ccfab31eb" +SRC_URI[lazy_static-1.4.0.sha256sum] = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +SRC_URI[libc-0.2.147.sha256sum] = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" +SRC_URI[linux-raw-sys-0.4.7.sha256sum] = "1a9bad9f94746442c783ca431b22403b519cd7fbeed0533fdd6328b2f2212128" +SRC_URI[log-0.4.20.sha256sum] = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +SRC_URI[memchr-2.6.3.sha256sum] = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c" +SRC_URI[memoffset-0.9.0.sha256sum] = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" +SRC_URI[miniz_oxide-0.7.1.sha256sum] = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +SRC_URI[mio-0.8.8.sha256sum] = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" +SRC_URI[num-traits-0.2.16.sha256sum] = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" +SRC_URI[num_cpus-1.16.0.sha256sum] = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +SRC_URI[once_cell-1.18.0.sha256sum] = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +SRC_URI[oorandom-11.1.3.sha256sum] = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" +SRC_URI[plotters-0.3.5.sha256sum] = "d2c224ba00d7cadd4d5c660deaf2098e5e80e07846537c51f9cfa4be50c1fd45" +SRC_URI[plotters-backend-0.3.5.sha256sum] = "9e76628b4d3a7581389a35d5b6e2139607ad7c75b17aed325f210aa91f4a9609" +SRC_URI[plotters-svg-0.3.5.sha256sum] = "38f6d39893cca0701371e3c27294f09797214b86f1fb951b89ade8ec04e2abab" +SRC_URI[ppv-lite86-0.2.17.sha256sum] = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +SRC_URI[proc-macro-error-1.0.4.sha256sum] = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +SRC_URI[proc-macro-error-attr-1.0.4.sha256sum] = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +SRC_URI[proc-macro2-1.0.66.sha256sum] = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" +SRC_URI[quote-1.0.33.sha256sum] = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +SRC_URI[rand-0.7.3.sha256sum] = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +SRC_URI[rand_chacha-0.2.2.sha256sum] = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +SRC_URI[rand_core-0.5.1.sha256sum] = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +SRC_URI[rand_hc-0.2.0.sha256sum] = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +SRC_URI[rayon-1.7.0.sha256sum] = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" +SRC_URI[rayon-core-1.11.0.sha256sum] = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" +SRC_URI[redox_syscall-0.3.5.sha256sum] = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +SRC_URI[regex-1.9.5.sha256sum] = "697061221ea1b4a94a624f67d0ae2bfe4e22b8a17b6a192afb11046542cc8c47" +SRC_URI[regex-automata-0.3.8.sha256sum] = "c2f401f4955220693b56f8ec66ee9c78abffd8d1c4f23dc41a23839eb88f0795" +SRC_URI[regex-syntax-0.7.5.sha256sum] = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" +SRC_URI[roxmltree-0.13.1.sha256sum] = "dbf7d7b1ea646d380d0e8153158063a6da7efe30ddbf3184042848e3f8a6f671" +SRC_URI[rustix-0.38.13.sha256sum] = "d7db8590df6dfcd144d22afd1b83b36c21a18d7cbc1dc4bb5295a8712e9eb662" +SRC_URI[ryu-1.0.15.sha256sum] = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" +SRC_URI[same-file-1.0.6.sha256sum] = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +SRC_URI[scopeguard-1.2.0.sha256sum] = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" +SRC_URI[serde-1.0.188.sha256sum] = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" +SRC_URI[serde-tuple-vec-map-1.0.1.sha256sum] = "a04d0ebe0de77d7d445bb729a895dcb0a288854b267ca85f030ce51cdc578c82" +SRC_URI[serde_cbor-0.11.2.sha256sum] = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5" +SRC_URI[serde_derive-1.0.188.sha256sum] = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" +SRC_URI[serde_json-1.0.106.sha256sum] = "2cc66a619ed80bf7a0f6b17dd063a84b88f6dea1813737cf469aef1d081142c2" +SRC_URI[serde_yaml-0.9.21.sha256sum] = "d9d684e3ec7de3bf5466b32bd75303ac16f0736426e5a4e0d6e489559ce1249c" +SRC_URI[stderrlog-0.5.4.sha256sum] = "69a26bbf6de627d389164afa9783739b56746c6c72c4ed16539f4ff54170327b" +SRC_URI[strsim-0.8.0.sha256sum] = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" +SRC_URI[structopt-0.3.26.sha256sum] = "0c6b5c64445ba8094a6ab0c3cd2ad323e07171012d9c98b0b15651daf1787a10" +SRC_URI[structopt-derive-0.4.18.sha256sum] = "dcb5ae327f9cc13b68763b5749770cb9e048a99bd9dfdfa58d0cf05d5f64afe0" +SRC_URI[syn-1.0.109.sha256sum] = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +SRC_URI[syn-2.0.32.sha256sum] = "239814284fd6f1a4ffe4ca893952cdd93c224b6a1571c9a9eadd670295c0c9e2" +SRC_URI[tempfile-3.8.0.sha256sum] = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" +SRC_URI[termcolor-1.1.3.sha256sum] = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" +SRC_URI[textwrap-0.11.0.sha256sum] = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" +SRC_URI[thiserror-1.0.48.sha256sum] = "9d6d7a740b8a666a7e828dd00da9c0dc290dff53154ea77ac109281de90589b7" +SRC_URI[thiserror-impl-1.0.48.sha256sum] = "49922ecae66cc8a249b77e68d1d0623c1b2c514f0060c27cdc68bd62a1219d35" +SRC_URI[thread_local-1.1.7.sha256sum] = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" +SRC_URI[tinytemplate-1.2.1.sha256sum] = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc" +SRC_URI[toml-0.5.11.sha256sum] = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +SRC_URI[unicode-ident-1.0.11.sha256sum] = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" +SRC_URI[unicode-segmentation-1.10.1.sha256sum] = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" +SRC_URI[unicode-width-0.1.10.sha256sum] = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" +SRC_URI[unsafe-libyaml-0.2.9.sha256sum] = "f28467d3e1d3c6586d8f25fa243f544f5800fec42d97032474e17222c2b75cfa" +SRC_URI[vec_map-0.8.2.sha256sum] = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" +SRC_URI[version_check-0.9.4.sha256sum] = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +SRC_URI[walkdir-2.4.0.sha256sum] = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" +SRC_URI[wasi-0.9.0+wasi-snapshot-preview1.sha256sum] = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" +SRC_URI[wasi-0.11.0+wasi-snapshot-preview1.sha256sum] = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +SRC_URI[wasm-bindgen-0.2.87.sha256sum] = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" +SRC_URI[wasm-bindgen-backend-0.2.87.sha256sum] = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" +SRC_URI[wasm-bindgen-macro-0.2.87.sha256sum] = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" +SRC_URI[wasm-bindgen-macro-support-0.2.87.sha256sum] = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" +SRC_URI[wasm-bindgen-shared-0.2.87.sha256sum] = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" +SRC_URI[web-sys-0.3.64.sha256sum] = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" +SRC_URI[winapi-0.3.9.sha256sum] = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +SRC_URI[winapi-i686-pc-windows-gnu-0.4.0.sha256sum] = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +SRC_URI[winapi-util-0.1.5.sha256sum] = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +SRC_URI[winapi-x86_64-pc-windows-gnu-0.4.0.sha256sum] = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +SRC_URI[windows-0.48.0.sha256sum] = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" +SRC_URI[windows-sys-0.48.0.sha256sum] = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +SRC_URI[windows-targets-0.48.5.sha256sum] = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +SRC_URI[windows_aarch64_gnullvm-0.48.5.sha256sum] = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" +SRC_URI[windows_aarch64_msvc-0.48.5.sha256sum] = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" +SRC_URI[windows_i686_gnu-0.48.5.sha256sum] = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" +SRC_URI[windows_i686_msvc-0.48.5.sha256sum] = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" +SRC_URI[windows_x86_64_gnu-0.48.5.sha256sum] = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" +SRC_URI[windows_x86_64_gnullvm-0.48.5.sha256sum] = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" +SRC_URI[windows_x86_64_msvc-0.48.5.sha256sum] = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" +SRC_URI[xml-rs-0.8.18.sha256sum] = "bab77e97b50aee93da431f2cee7cd0f43b4d1da3c408042f2d7d164187774f0a" +SRC_URI[xmlparser-0.13.5.sha256sum] = "4d25c75bf9ea12c4040a97f829154768bbbce366287e2dc044af160cd79a13fd" diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/deqp-runner/deqp-runner/0001-deqp-runner-drop-zstd-support.patch b/sources/meta-openembedded/meta-oe/recipes-graphics/deqp-runner/deqp-runner/0001-deqp-runner-drop-zstd-support.patch new file mode 100644 index 00000000..e29b78fd --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/deqp-runner/deqp-runner/0001-deqp-runner-drop-zstd-support.patch @@ -0,0 +1,172 @@ +From f453ec77fa9e6fd961a1f5f0b221260a5a21bba2 Mon Sep 17 00:00:00 2001 +From: Dmitry Baryshkov +Date: Tue, 27 Aug 2024 14:08:47 +0300 +Subject: [PATCH] deqp-runner: drop zstd support + +Building zstd-sys results in the "foo contains reference to TMPDIR" QA +error. Revert commit 1adddf3aa89f21b472d8046347ccdfa4612f141b to drop +zstd dependency. + +Upstream-Status: Inappropriate [oe specific] +Signed-off-by: Dmitry Baryshkov +--- + Cargo.lock | 45 --------------------------------------------- + Cargo.toml | 3 --- + src/lib.rs | 31 +++++++------------------------ + 3 files changed, 7 insertions(+), 72 deletions(-) + +diff --git a/Cargo.lock b/Cargo.lock +index 8443695e2bd5..50924576a8e3 100644 +--- a/Cargo.lock ++++ b/Cargo.lock +@@ -94,7 +94,6 @@ version = "1.0.83" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" + dependencies = [ +- "jobserver", + "libc", + ] + +@@ -271,7 +270,6 @@ dependencies = [ + "structopt", + "tempfile", + "toml", +- "zstd", + ] + + [[package]] +@@ -423,15 +421,6 @@ version = "1.0.9" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" + +-[[package]] +-name = "jobserver" +-version = "0.1.31" +-source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" +-dependencies = [ +- "libc", +-] +- + [[package]] + name = "js-sys" + version = "0.3.64" +@@ -544,12 +533,6 @@ version = "11.1.3" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" + +-[[package]] +-name = "pkg-config" +-version = "0.3.30" +-source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +- + [[package]] + name = "plotters" + version = "0.3.5" +@@ -1217,31 +1200,3 @@ name = "xmlparser" + version = "0.13.5" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "4d25c75bf9ea12c4040a97f829154768bbbce366287e2dc044af160cd79a13fd" +- +-[[package]] +-name = "zstd" +-version = "0.13.1" +-source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "2d789b1514203a1120ad2429eae43a7bd32b90976a7bb8a05f7ec02fa88cc23a" +-dependencies = [ +- "zstd-safe", +-] +- +-[[package]] +-name = "zstd-safe" +-version = "7.1.0" +-source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "1cd99b45c6bc03a018c8b8a86025678c87e55526064e38f9df301989dce7ec0a" +-dependencies = [ +- "zstd-sys", +-] +- +-[[package]] +-name = "zstd-sys" +-version = "2.0.11+zstd.1.5.6" +-source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "75652c55c0b6f3e6f12eb786fe1bc960396bf05a1eb3bf1f3691c3610ac2e6d4" +-dependencies = [ +- "cc", +- "pkg-config", +-] +diff --git a/Cargo.toml b/Cargo.toml +index ac6295763e87..1fa1344a3105 100644 +--- a/Cargo.toml ++++ b/Cargo.toml +@@ -120,9 +120,6 @@ version = "3.2" + [dependencies.toml] + version = "0.5" + +-[dependencies.zstd] +-version = "0.13.0" +- + [dev-dependencies.criterion] + version = "0.3.0" + +diff --git a/src/lib.rs b/src/lib.rs +index e7095267f1cd..ff7bc4f5d025 100644 +--- a/src/lib.rs ++++ b/src/lib.rs +@@ -63,7 +63,6 @@ use rayon::prelude::*; + use regex::RegexSet; + use serde::Deserialize; + use std::collections::HashMap; +-use std::ffi::OsStr; + use std::fs::File; + use std::io::prelude::*; + use std::io::BufReader; +@@ -76,7 +75,6 @@ use std::time::Duration; + use std::time::Instant; + use structopt::StructOpt; + use timeout::{TimeoutChildExt, TimeoutChildStdout, Timer}; +-use zstd::stream::read::Decoder; + + fn parse_key_val(s: &str) -> Result<(T, U), Box> + where +@@ -1082,32 +1080,17 @@ pub fn read_lines>>(files: I) -> Result< + let mut lines: Vec = Vec::new(); + + for path in files { +- let mut path: &Path = path.as_ref(); +- let mut path_compressed: PathBuf = path.to_path_buf(); +- +- // always try append zst extension (and keep existing one, e.g. .txt) +- let ext = if let Some(file_ext) = path.extension().and_then(|ext| ext.to_str()) { +- format!("{}.zst", file_ext) +- } else { +- (".zst").to_string() +- }; +- +- path_compressed.set_extension(ext); +- if path_compressed.exists() { +- path = path_compressed.as_ref(); +- } +- let file = File::open(path).with_context(|| format!("opening path: {}", path.display()))?; +- let reader: Box = match path.extension().and_then(OsStr::to_str) { +- Some("zst") => Box::new(Decoder::new(file).unwrap()), +- _ => Box::new(file), +- }; +- +- for line in BufReader::new(reader).lines() { ++ let path = path.as_ref(); ++ for line in BufReader::new( ++ File::open(path).with_context(|| format!("opening path: {}", path.display()))?, ++ ) ++ .lines() ++ { + let line = line.with_context(|| format!("reading line from {}", path.display()))?; + // In newer dEQP, vk-master.txt just contains a list of .txt + // caselist files relative to its current path, so recursively read + // thoseand append their contents. +- if line.ends_with(".txt") || line.ends_with(".txt.zst") { ++ if line.ends_with(".txt") { + let sub_path = path.parent().context("Getting path parent dir")?.join(line); + + lines.extend_from_slice( diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/deqp-runner/deqp-runner_0.20.0.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/deqp-runner/deqp-runner_0.20.0.bb new file mode 100644 index 00000000..04de074d --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/deqp-runner/deqp-runner_0.20.0.bb @@ -0,0 +1,18 @@ +SUMMARY = "A VK-GL-CTS/dEQP wrapper program to parallelize it across CPUs and report results against a baseline." +HOMEPAGE = "https://gitlab.freedesktop.org/mesa/deqp-runner" +LICENSE = "MIT" + +LIC_FILES_CHKSUM = " \ + file://LICENSE;md5=4f59d6446bf2e004e80df1a0937129fa\ +" + +inherit cargo cargo-update-recipe-crates + +SRC_URI += " \ + crate://crates.io/deqp-runner/0.20.0 \ + file://0001-deqp-runner-drop-zstd-support.patch \ +" + +SRC_URI[deqp-runner-0.20.0.sha256sum] = "a3f4fab1179a01cbbdbe4b93e0a040f74de7b9086498d91976d93844a31439dd" + +require deqp-runner-crates.inc diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/directfb/directfb.inc b/sources/meta-openembedded/meta-oe/recipes-graphics/directfb/directfb.inc index 4d38632e..59796cc6 100644 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/directfb/directfb.inc +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/directfb/directfb.inc @@ -9,7 +9,7 @@ LICENSE = "LGPL-2.1-only" LIC_FILES_CHKSUM = "file://COPYING;md5=dcf3c825659e82539645da41a7908589" HOMEPAGE = "http://directfb.org" -DEPENDS = "jpeg libpng freetype zlib sysfsutils" +DEPENDS = "jpeg libpng sysfsutils" SRC_URI = "http://downloads.yoctoproject.org/mirror/sources/DirectFB-${PV}.tar.gz \ file://configurefix.patch \ @@ -24,6 +24,8 @@ SRC_URI = "http://downloads.yoctoproject.org/mirror/sources/DirectFB-${PV}.tar.g file://0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch \ file://0001-os-linux-Fix-build-when-__NR_futex-is-not-available.patch \ file://0001-include-libgen.h-for-basename.patch \ + file://0001-inputdrivers-Correct-the-signature-of-bind-call-on-m.patch \ + file://0001-libdirect-remove-use-of-keyword-register.patch \ " S = "${WORKDIR}/DirectFB-${PV}" @@ -39,21 +41,21 @@ BINCONFIG = "${bindir}/directfb-config" inherit autotools binconfig-disabled pkgconfig -PACKAGECONFIG ??= "linuxinput" -PACKAGECONFIG[jpeg2000] = "--enable-jpeg2000,--disable-jpeg2000,jasper" +PACKAGECONFIG ??= "freetype linuxinput zlib" PACKAGECONFIG[drmkms] = "--enable-drmkms,--disable-drmkms,libdrm" -PACKAGECONFIG[tiff] = "--enable-tiff,--disable-tiff,tiff" -PACKAGECONFIG[webp] = "--enable-webp,--disable-webp,libwebp" -PACKAGECONFIG[tslib] = "--with-inputdrivers=tslib,,tslib" +PACKAGECONFIG[freetype] = "--enable-freetype,--disable-freetype,freetype" +PACKAGECONFIG[jpeg2000] = "--enable-jpeg2000,--disable-jpeg2000,jasper" +PACKAGECONFIG[mesa] = "--enable-mesa,--disable-mesa,virtual/mesa," PACKAGECONFIG[linuxinput] = "--with-inputdrivers=linuxinput,," PACKAGECONFIG[noinput] = "--with-inputdrivers=none,," -PACKAGECONFIG[mesa] = "--enable-mesa,--disable-mesa,virtual/mesa," +PACKAGECONFIG[tiff] = "--enable-tiff,--disable-tiff,tiff" +PACKAGECONFIG[tslib] = "--with-inputdrivers=tslib,,tslib" +PACKAGECONFIG[webp] = "--enable-webp,--disable-webp,libwebp" PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,xserver-xorg," +PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib" EXTRA_OECONF = "\ --with-gfxdrivers=none \ - --enable-freetype=yes \ - --enable-zlib \ --disable-imlib2 \ --disable-sdl \ --disable-vnc \ diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/directfb/directfb/0001-inputdrivers-Correct-the-signature-of-bind-call-on-m.patch b/sources/meta-openembedded/meta-oe/recipes-graphics/directfb/directfb/0001-inputdrivers-Correct-the-signature-of-bind-call-on-m.patch new file mode 100644 index 00000000..574bba0b --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/directfb/directfb/0001-inputdrivers-Correct-the-signature-of-bind-call-on-m.patch @@ -0,0 +1,36 @@ +From 18f4eca291cabf93d87e7c9051268d9c385b8f37 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 20 May 2024 18:23:06 -0700 +Subject: [PATCH] inputdrivers: Correct the signature of bind() call on musl + systems + +Its flagged with GCC14 + +../../../DirectFB-1.7.7/inputdrivers/linux_input/linux_input.c:1551:27: error: passing argument 2 of 'bind' from incompatible pointer type [-Wincompatible-pointer-types] + 1551 | rt = bind(socket_fd, &sock_addr, + | ^~~~~~~~~~ + | | + | struct sockaddr_un * + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- + inputdrivers/linux_input/linux_input.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/inputdrivers/linux_input/linux_input.c b/inputdrivers/linux_input/linux_input.c +index 03deebc..207f5a5 100644 +--- a/inputdrivers/linux_input/linux_input.c ++++ b/inputdrivers/linux_input/linux_input.c +@@ -1548,7 +1548,7 @@ udev_hotplug_EventThread(DirectThread *thread, void * hotplug_data) + "/org/kernel/udev/monitor", + sizeof(sock_addr.sun_path) - 1); + +- rt = bind(socket_fd, &sock_addr, ++ rt = bind(socket_fd, (struct sockaddr *)&sock_addr, + sizeof(sock_addr.sun_family)+1+strlen(&sock_addr.sun_path[1])); + if (rt < 0) { + D_PERROR( "DirectFB/linux_input: bind() failed: %s\n", +-- +2.45.1 + diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/directfb/directfb/0001-libdirect-remove-use-of-keyword-register.patch b/sources/meta-openembedded/meta-oe/recipes-graphics/directfb/directfb/0001-libdirect-remove-use-of-keyword-register.patch new file mode 100644 index 00000000..24d977f4 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/directfb/directfb/0001-libdirect-remove-use-of-keyword-register.patch @@ -0,0 +1,44 @@ +From f6cdb9f1c3dbef8ef695703a2a5fb4e92b2dd8a0 Mon Sep 17 00:00:00 2001 +From: Simon Barth +Date: Mon, 5 Aug 2024 19:35:16 +0200 +Subject: [PATCH] libdirect: remove use of keyword 'register' + +The 'register' keyword was removed in C++17 and is now unused and +reserved. When compiling code that uses DirecthFB with C++17, +compilation fails. + +Since modern compilers likely don't produce different code whether the +'register' keyword is used or not, there shouldn't be any performance +impact introduced by this change. + +Signed-off-by: Simon Barth + +Upstream-Status: Submitted [https://github.com/deniskropp/DirectFB/pull/25] +--- + lib/direct/util.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/lib/direct/util.h b/lib/direct/util.h +index 2109b6ca1..734645796 100644 +--- a/lib/direct/util.h ++++ b/lib/direct/util.h +@@ -220,7 +220,7 @@ void DIRECT_API direct_md5_sum( void *dst, const void *src, const int len ); + static __inline__ int + direct_util_count_bits( unsigned int mask ) + { +- register int ret = 0; ++ int ret = 0; + + while (mask) { + ret += mask & 1; +@@ -325,7 +325,7 @@ D_ICEIL(float f) + static __inline__ int + direct_log2( int val ) + { +- register int ret = 0; ++ int ret = 0; + + while (val >> ++ret); + +-- +2.25.1 diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/fbida/fbida_git.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/fbida/fbida_git.bb index 247a1fcb..6c067484 100644 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/fbida/fbida_git.bb +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/fbida/fbida_git.bb @@ -26,7 +26,7 @@ S = "${WORKDIR}/git" inherit meson pkgconfig features_check # Depends on libepoxy -REQUIRED_DISTRO_FEATURES = "opengl" +REQUIRED_DISTRO_FEATURES = "${@bb.utils.contains('PACKAGECONFIG', 'pdf', 'opengl', '', d)}" PACKAGECONFIG ??= "gif png pdf" PACKAGECONFIG[gif] = "-Dgif=enabled,-Dgif=disabled,giflib" diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/feh/feh_3.10.2.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/feh/feh_3.10.2.bb deleted file mode 100644 index 2c38ce61..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/feh/feh_3.10.2.bb +++ /dev/null @@ -1,30 +0,0 @@ -SUMMARY = "X11 image viewer aimed mostly at console users" -HOMEPAGE = "https://feh.finalrewind.org/" -SECTION = "x11/utils" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://COPYING;md5=150e4c518ff8aaecfe35694e47661d9a" -DEPENDS = "\ - imlib2 \ - virtual/libx11 libxt\ -" - -SRC_URI = "https://feh.finalrewind.org/feh-${PV}.tar.bz2" -SRC_URI[sha256sum] = "5f94a77de25c5398876f0cf431612d782b842f4db154d2139b778c8f196e8969" - -inherit mime-xdg features_check -# depends on virtual/libx11 -REQUIRED_DISTRO_FEATURES = "x11" - -EXTRA_OEMAKE = "curl=0 xinerama=0 PREFIX=/usr" - -do_compile () { - oe_runmake -} - -do_install () { - oe_runmake install app=1 'DESTDIR=${D}' 'ICON_PREFIX=${D}${datadir}/icons' -} - -RDEPENDS:${PN} += "imlib2-loaders" - -FILES:${PN} += "${datadir}/icons" diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/feh/feh_3.10.3.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/feh/feh_3.10.3.bb new file mode 100644 index 00000000..5ab333c6 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/feh/feh_3.10.3.bb @@ -0,0 +1,30 @@ +SUMMARY = "X11 image viewer aimed mostly at console users" +HOMEPAGE = "https://feh.finalrewind.org/" +SECTION = "x11/utils" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=150e4c518ff8aaecfe35694e47661d9a" +DEPENDS = "\ + imlib2 \ + virtual/libx11 libxt\ +" + +SRC_URI = "https://feh.finalrewind.org/feh-${PV}.tar.bz2" +SRC_URI[sha256sum] = "5426e2799770217af1e01c2e8c182d9ca8687d84613321d8ab4a66fe4041e9c8" + +inherit mime-xdg features_check +# depends on virtual/libx11 +REQUIRED_DISTRO_FEATURES = "x11" + +EXTRA_OEMAKE = "curl=0 xinerama=0 PREFIX=/usr" + +do_compile () { + oe_runmake +} + +do_install () { + oe_runmake install app=1 'DESTDIR=${D}' 'ICON_PREFIX=${D}${datadir}/icons' +} + +RDEPENDS:${PN} += "imlib2-loaders" + +FILES:${PN} += "${datadir}/icons" diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/fontforge/libspiro_20221101.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/fontforge/libspiro_20221101.bb deleted file mode 100644 index 0adac846..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/fontforge/libspiro_20221101.bb +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (C) 2022 Khem Raj -# Released under the MIT license (see COPYING.MIT for the terms) - -SUMMARY = "LibSpiro is an adaptation of Spiro formula and functions into a sharable library" -HOMEPAGE = "https://github.com/fontforge/libspiro" -LICENSE = "GPL-3.0-or-later" -LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" - -SRC_URI = "https://github.com/fontforge/libspiro/releases/download/${PV}/libspiro-dist-${PV}.tar.gz" -SRC_URI[sha256sum] = "5984fb5af3e4e1f927f3a74850b705a711fb86284802a5e6170b09786440e8be" - -inherit autotools - -BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/fontforge/libspiro_20240903.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/fontforge/libspiro_20240903.bb new file mode 100644 index 00000000..7e07906e --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/fontforge/libspiro_20240903.bb @@ -0,0 +1,17 @@ +# Copyright (C) 2022 Khem Raj +# Released under the MIT license (see COPYING.MIT for the terms) + +SUMMARY = "LibSpiro is an adaptation of Spiro formula and functions into a sharable library" +HOMEPAGE = "https://github.com/fontforge/libspiro" +LICENSE = "GPL-3.0-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" + +SRC_URI = "https://github.com/fontforge/libspiro/releases/download/${PV}/libspiro-dist-${PV}.tar.gz" +SRC_URI[sha256sum] = "1412a21b943c6e1db834ee2d74145aad20b3f62b12152d475613b8241d9cde10" + +UPSTREAM_CHECK_URI = "https://github.com/fontforge/libspiro/releases" +UPSTREAM_CHECK_REGEX = "(?P\d+)" + +inherit autotools + +BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/ftgl/ftgl/0001-Explicit-typecast-to-avoid-implicit-double-to-float-.patch b/sources/meta-openembedded/meta-oe/recipes-graphics/ftgl/ftgl/0001-Explicit-typecast-to-avoid-implicit-double-to-float-.patch deleted file mode 100644 index 385bff8d..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/ftgl/ftgl/0001-Explicit-typecast-to-avoid-implicit-double-to-float-.patch +++ /dev/null @@ -1,38 +0,0 @@ -From e3bce98a60d6db3b719bbf5d71f732f9b86cb566 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sat, 9 Feb 2019 08:28:09 -0800 -Subject: [PATCH] Explicit typecast to avoid implicit double to float - conversion - -fixes compile errors e.g. - -../../ftgl-2.1.3~rc5/demo/simple.cpp:110:27: error: non-constant-expression cannot be narrowed from type 'double' to - 'float' in initializer list [-Wc++11-narrowing] - (t3 + 2.0) / 3, 0.3 }; - ^~~~~~~~~~~~~~ -Upstream-Status: Pending -Signed-off-by: Khem Raj ---- - demo/simple.cpp | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/demo/simple.cpp b/demo/simple.cpp -index 532e862..aba55b4 100644 ---- a/demo/simple.cpp -+++ b/demo/simple.cpp -@@ -105,9 +105,9 @@ static void RenderScene(void) - float t2 = sin(n / 50 + 1); - float t3 = sin(n / 30 + 2); - -- float ambient[4] = { (t1 + 2.0) / 3, -- (t2 + 2.0) / 3, -- (t3 + 2.0) / 3, 0.3 }; -+ float ambient[4] = { float(t1 + 2.0) / 3, -+ float(t2 + 2.0) / 3, -+ float(t3 + 2.0) / 3, 0.3 }; - float diffuse[4] = { 1.0, 0.9, 0.9, 1.0 }; - float specular[4] = { 1.0, 0.7, 0.7, 1.0 }; - float position[4] = { 100.0, 100.0, 0.0, 1.0 }; --- -2.20.1 - diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/ftgl/ftgl/0001-Fix-type-mismatch-with-latest-FreeType.patch b/sources/meta-openembedded/meta-oe/recipes-graphics/ftgl/ftgl/0001-Fix-type-mismatch-with-latest-FreeType.patch new file mode 100644 index 00000000..9c91b5be --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/ftgl/ftgl/0001-Fix-type-mismatch-with-latest-FreeType.patch @@ -0,0 +1,33 @@ +From d11219b681a080c71e33c51c9404c28b134e1745 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 21 Aug 2024 13:50:34 -0700 +Subject: [PATCH] Fix type mismatch with latest FreeType + +This change is intrumented due to a type change in freetype [1] with release 2.13.3 + +Fixes +| ../../git/src/FTVectoriser.cpp:171:15: error: cannot initialize a variable of type 'char *' with an rvalue of type 'unsigned char *' +| 171 | char* tagList = &outline.tags[startIndex]; +| | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~ + +[1] https://gitlab.freedesktop.org/freetype/freetype/-/commit/044d142be7b6a93b6940367a1bc5847451ff4775 + +Upstream-Status: Submitted [https://github.com/HamzaM3/ftgl/pull/1] +Signed-off-by: Khem Raj +--- + src/FTVectoriser.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/FTVectoriser.cpp b/src/FTVectoriser.cpp +index 26e7da8..3610215 100644 +--- a/src/FTVectoriser.cpp ++++ b/src/FTVectoriser.cpp +@@ -168,7 +168,7 @@ void FTVectoriser::ProcessContours() + for(int i = 0; i < ftContourCount; ++i) + { + FT_Vector* pointList = &outline.points[startIndex]; +- char* tagList = &outline.tags[startIndex]; ++ char* tagList = (char*)&outline.tags[startIndex]; + + endIndex = outline.contours[i]; + contourLength = (endIndex - startIndex) + 1; diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/ftgl/ftgl/0001-use-pkg-config-to-find-freetype2.patch b/sources/meta-openembedded/meta-oe/recipes-graphics/ftgl/ftgl/0001-use-pkg-config-to-find-freetype2.patch deleted file mode 100644 index e5ed0bdb..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/ftgl/ftgl/0001-use-pkg-config-to-find-freetype2.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 8bb183926078b6dd54048fb6820838fe7b6e6163 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Andreas=20M=C3=BCller?= -Date: Sun, 23 Oct 2016 22:46:43 +0200 -Subject: [PATCH] use pkg-config to find freetype2 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Upstream-Status: Inappropriate [OE specific] - -Signed-off-by: Andreas Müller ---- - configure.ac | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 53560ea..b5bb6a3 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -41,8 +41,13 @@ AC_CHECK_FUNCS(strndup) - - AC_PATH_X - --AC_CHECK_FT2([9.0.3],[], -- [AC_MSG_ERROR([FreeType2 is required to compile this library])]) -+PKG_CHECK_MODULES(FT2, freetype2, -+ CFLAGS="$CFLAGS $FT2_CFLAGS" -+ LIBS="$LIBS $FT2_LIBS", -+ AC_MSG_ERROR([FreeType2 is required to compile this library]) -+) -+AC_SUBST([FT2_CFLAGS]) -+AC_SUBST([FT2_LIBS]) - - AC_PATH_XTRA - --- -2.5.5 - diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/ftgl/ftgl/0002-Makefile.am-remove-useless-and-breaking-code.patch b/sources/meta-openembedded/meta-oe/recipes-graphics/ftgl/ftgl/0002-Makefile.am-remove-useless-and-breaking-code.patch deleted file mode 100644 index 830783e2..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/ftgl/ftgl/0002-Makefile.am-remove-useless-and-breaking-code.patch +++ /dev/null @@ -1,38 +0,0 @@ -From daabb4110661c4358ec73293d5c0b2106f567c1f Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Andreas=20M=C3=BCller?= -Date: Sun, 23 Oct 2016 23:54:14 +0200 -Subject: [PATCH] Makefile.am: remove useless and breaking code -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Upstream-Status: Pending - -Signed-off-by: Andreas Müller ---- - Makefile.am | 9 --------- - 1 file changed, 9 deletions(-) - -diff --git a/Makefile.am b/Makefile.am -index 89a8a7f..e582a34 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -24,15 +24,6 @@ EXTRA_DIST = \ - m4 \ - $(NULL) - --# Print out an informative summary. --all-local: -- @$(ECHO) "Done." -- @$(ECHO) -- @if test "x$(MAKECMDGOALS)" = "xall-am" -o "x$(.TARGETS)" = "xall-am" -o "x$(MAKECMDGOALS)" = "x" -o "x$(.TARGETS)" = "x" ; then \ -- $(ECHO) "---" ;\ -- $(ECHO) "Run 'make install' to begin installation into $(prefix)" ;\ -- fi -- @$(ECHO) - - # Upload documentation - DOC = docs/html docs/latex/ftgl.pdf --- -2.5.5 - diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/ftgl/ftgl_2.1.3-rc5.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/ftgl/ftgl_2.1.3-rc5.bb deleted file mode 100644 index 65f72747..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/ftgl/ftgl_2.1.3-rc5.bb +++ /dev/null @@ -1,27 +0,0 @@ -SUMMARY = "OpenGL frontend to Freetype 2" -HOMEPAGE = "https://sourceforge.net/projects/ftgl/" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://COPYING;md5=527a83e92c7bf363025380eec05df6e4" - -inherit autotools pkgconfig features_check - -REQUIRED_DISTRO_FEATURES = "opengl x11" - -DEPENDS += " \ - freetype \ - freeglut \ -" - -SRC_URI = " \ - ${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \ - file://0001-use-pkg-config-to-find-freetype2.patch \ - file://0002-Makefile.am-remove-useless-and-breaking-code.patch \ - file://0001-Explicit-typecast-to-avoid-implicit-double-to-float-.patch \ -" -SRC_URI[md5sum] = "c7879018cde844059495b3029b0b6503" -SRC_URI[sha256sum] = "521ff7bd62c459ff5372e269c223e2a6107a6a99a36afdc2ae634a973af70c59" - -S = "${WORKDIR}/ftgl-2.1.3~rc5" - -# undefined reference to symbol 'sin@@GLIBC_2.4' -CFLAGS += "-lm" diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/ftgl/ftgl_2.4.0.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/ftgl/ftgl_2.4.0.bb new file mode 100644 index 00000000..4db453bc --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/ftgl/ftgl_2.4.0.bb @@ -0,0 +1,20 @@ +SUMMARY = "OpenGL frontend to Freetype 2" +HOMEPAGE = "https://sourceforge.net/projects/ftgl/" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=527a83e92c7bf363025380eec05df6e4" + +inherit autotools pkgconfig features_check + +REQUIRED_DISTRO_FEATURES = "opengl x11" + +DEPENDS += " \ + freetype \ + freeglut \ +" +SRCREV = "b787042cc1d1e4861337d5f9a6727e4c6900a4f2" +PV .= "+git" + +SRC_URI = "git://github.com/HamzaM3/ftgl;protocol=https;branch=master \ + file://0001-Fix-type-mismatch-with-latest-FreeType.patch" + +S = "${WORKDIR}/git" diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/fvwm/fvwm/0001-configure-Do-not-require-support-for-implicit-ints.patch b/sources/meta-openembedded/meta-oe/recipes-graphics/fvwm/fvwm/0001-configure-Do-not-require-support-for-implicit-ints.patch new file mode 100644 index 00000000..356bd73f --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/fvwm/fvwm/0001-configure-Do-not-require-support-for-implicit-ints.patch @@ -0,0 +1,45 @@ +From cbba378a23410241176d62f3bb43965c044615e3 Mon Sep 17 00:00:00 2001 +From: Florian Weimer +Date: Thu, 24 Nov 2022 13:06:50 +0100 +Subject: [PATCH 1/3] configure: Do not require support for implicit ints + +Implicit ints have not been part of C since 1999, and future +compilers will disable support for them by default. Fortunatenly, +only one configure check needs adjusting. + +Upstream-Status: Submitted [https://github.com/fvwmorg/fvwm/pull/100] +Signed-off-by: Khem Raj +--- + acinclude.m4 | 2 +- + configure.ac | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/acinclude.m4 b/acinclude.m4 +index 8b74ff1e..b66042f9 100644 +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -30,7 +30,7 @@ if test "$ac_cv_func_select" = yes; then + #ifdef HAVE_SYS_SOCKET_H + #include + #endif], +-[extern select ($ac_cv_type_fd_set_size_t, ++[extern int select ($ac_cv_type_fd_set_size_t, + $ac_cv_type_fd_set *, $ac_cv_type_fd_set *, $ac_cv_type_fd_set *, + $ac_type_timeval *);], + [ac_found=yes ; break 3],ac_found=no) +diff --git a/configure.ac b/configure.ac +index 97ab9e7a..c9fcede6 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -220,7 +220,7 @@ AC_MINIX + + # catch -Werror and similar options when running configure + AC_TRY_COMPILE([#include ], +-[int i; static j; int *p; char *c; ++[int i; int *p; char *c; + switch (*p = p = *c) { case 0: printf("%Q", c, p); } + *c = &i; c = p; + while (1 || (unsigned int)3 >= 0 || ((int)-1) == ((unsigned int)1)); +-- +2.45.0 + diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/fvwm/fvwm/0002-acinclude.m4-Add-missing-unistd.h-to-AM_SAFETY_CHECK.patch b/sources/meta-openembedded/meta-oe/recipes-graphics/fvwm/fvwm/0002-acinclude.m4-Add-missing-unistd.h-to-AM_SAFETY_CHECK.patch new file mode 100644 index 00000000..50ecb20c --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/fvwm/fvwm/0002-acinclude.m4-Add-missing-unistd.h-to-AM_SAFETY_CHECK.patch @@ -0,0 +1,32 @@ +From 51287fb60263530f61b14df5519e10dabe67d2ad Mon Sep 17 00:00:00 2001 +From: Florian Weimer +Date: Thu, 24 Nov 2022 13:07:56 +0100 +Subject: [PATCH 2/3] acinclude.m4: Add missing to + AM_SAFETY_CHECK_MKSTEMP + +Otherwise, the check fails on a compiler which does not support +implicit function declarations (a language feature removed in 1999). + +Upstream-Status: Submitted [https://github.com/fvwmorg/fvwm/pull/100] +Signed-off-by: Khem Raj +--- + acinclude.m4 | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/acinclude.m4 b/acinclude.m4 +index b66042f9..4dee2abe 100644 +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -1154,6 +1154,9 @@ AC_DEFUN([AM_SAFETY_CHECK_MKSTEMP],[ + #include + #include + #include ++#ifdef HAVE_UNISTD_H ++#include ++#endif + int main(void) + { + char template[128]; +-- +2.45.0 + diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/fvwm/fvwm/0003-configure-Further-defang-the-Werror-check.patch b/sources/meta-openembedded/meta-oe/recipes-graphics/fvwm/fvwm/0003-configure-Further-defang-the-Werror-check.patch new file mode 100644 index 00000000..e9d780dd --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/fvwm/fvwm/0003-configure-Further-defang-the-Werror-check.patch @@ -0,0 +1,35 @@ +From 542c6f25327587d5a6bffb8a45b457ec85dcf8e1 Mon Sep 17 00:00:00 2001 +From: Florian Weimer +Date: Tue, 19 Dec 2023 13:24:50 +0100 +Subject: [PATCH 3/3] configure: Further defang the -Werror check + +Incompatible pointer types are actually errors (in the sense +that they are invalid C). Compilers have merely tolerated them as +warnings for backwards compatibility. This is changing with Clang 16 +and GCC 14, so relax the check a little. + +Upstream-Status: Submitted [https://github.com/fvwmorg/fvwm/pull/100] +Signed-off-by: Khem Raj +--- + configure.ac | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/configure.ac b/configure.ac +index c9fcede6..2e9615b2 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -220,9 +220,8 @@ AC_MINIX + + # catch -Werror and similar options when running configure + AC_TRY_COMPILE([#include ], +-[int i; int *p; char *c; +- switch (*p = p = *c) { case 0: printf("%Q", c, p); } +- *c = &i; c = p; ++[int unused; int *p; char *c; ++ printf("%Q", c, p); + while (1 || (unsigned int)3 >= 0 || ((int)-1) == ((unsigned int)1)); + ], , AC_MSG_ERROR(" + configure is not able to compile programs with warnings. Please +-- +2.45.0 + diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/fvwm/fvwm_2.7.0.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/fvwm/fvwm_2.7.0.bb index 8daf38a0..fcf1bd9c 100644 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/fvwm/fvwm_2.7.0.bb +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/fvwm/fvwm_2.7.0.bb @@ -34,6 +34,9 @@ DEPENDS = " \ SRC_URI = " \ git://github.com/fvwmorg/fvwm.git;protocol=https;branch=master \ file://0001-Fix-compilation-for-disabled-gnome.patch \ + file://0001-configure-Do-not-require-support-for-implicit-ints.patch \ + file://0002-acinclude.m4-Add-missing-unistd.h-to-AM_SAFETY_CHECK.patch \ + file://0003-configure-Further-defang-the-Werror-check.patch \ " SRCREV = "7baf540e56fb1a3e91752acba872a88543529d46" @@ -69,6 +72,8 @@ EXTRA_OECONF = " \ --without-xpm-library \ ac_cv_func_mkstemp=no \ has_safety_mkstemp=yes \ + ac_cv_path_FVWM_CPP=cpp \ + ac_cv_path_PERL=perl \ " # show the exact commands in the log file @@ -87,6 +92,7 @@ do_install:append() { sed -i -e 's:${STAGING_BINDIR_NATIVE}/perl-native/perl:${USRBINPATH}/env perl:g' ${D}${bindir}/fvwm-* sed -i -e 's:${STAGING_BINDIR_NATIVE}/perl-native/perl:${USRBINPATH}/env perl:g' ${D}${libexecdir}/fvwm/*/Fvwm* sed -i -e 's:${STAGING_BINDIR_NATIVE}/python3-native/python3:${USRBINPATH}/env python3:g' ${D}${bindir}/fvwm-menu-desktop + sed -i -e 's:${WORKDIR}::g' ${D}${bindir}/fvwm-bug } # the only needed packages (note: locale packages are automatically generated diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/glm/glm_0.9.9.8.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/glm/glm_0.9.9.8.bb index dd520b24..e313d7a1 100644 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/glm/glm_0.9.9.8.bb +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/glm/glm_0.9.9.8.bb @@ -29,10 +29,10 @@ do_install() { cp -R --no-dereference --preserve=mode,links ${S}/glm ${D}${includedir} cp -R --no-dereference --preserve=mode,links ${S}/doc ${D}${docdir}/glm rm ${D}${includedir}/glm/CMakeLists.txt - sed "s/@VERSION@/${PV}/" ${WORKDIR}/glmConfigVersion.cmake.in > ${D}${libdir}/cmake/glm/glmConfigVersion.cmake - sed "s/@VERSION@/${PV}/" ${WORKDIR}/glmConfig.cmake.in > ${D}${libdir}/cmake/glm/glmConfig.cmake - sed "s/@VERSION@/${PV}/" ${WORKDIR}/glm.pc.in > ${D}${libdir}/pkgconfig/glm.pc - install -Dm644 ${WORKDIR}/glmTargets.cmake ${D}${libdir}/cmake/glm/glmTargets.cmake + sed "s/@VERSION@/${PV}/" ${UNPACKDIR}/glmConfigVersion.cmake.in > ${D}${libdir}/cmake/glm/glmConfigVersion.cmake + sed "s/@VERSION@/${PV}/" ${UNPACKDIR}/glmConfig.cmake.in > ${D}${libdir}/cmake/glm/glmConfig.cmake + sed "s/@VERSION@/${PV}/" ${UNPACKDIR}/glm.pc.in > ${D}${libdir}/pkgconfig/glm.pc + install -Dm644 ${UNPACKDIR}/glmTargets.cmake ${D}${libdir}/cmake/glm/glmTargets.cmake } diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/gphoto2/libgphoto2/fix-build-with-gcc-14.patch b/sources/meta-openembedded/meta-oe/recipes-graphics/gphoto2/libgphoto2/fix-build-with-gcc-14.patch new file mode 100644 index 00000000..0c2a8d4b --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/gphoto2/libgphoto2/fix-build-with-gcc-14.patch @@ -0,0 +1,36 @@ +From 721f7f8c3ec8058d504607873e4c317aac0c99c5 Mon Sep 17 00:00:00 2001 +From: Marcus Meissner +Date: Mon, 4 Dec 2023 13:26:08 +0100 +Subject: [PATCH] align outlen length with jpeg jeaders. fixes + https://github.com/gphoto/libgphoto2/issues/941 + +--- +Upstream-Status: Backport [https://github.com/gphoto/libgphoto2/commit/721f7f8c3ec8058d504607873e4c317aac0c99c5] + + camlibs/ptp2/chdk.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/camlibs/ptp2/chdk.c b/camlibs/ptp2/chdk.c +index e1d898f378..e775ea1d4b 100644 +--- a/camlibs/ptp2/chdk.c ++++ b/camlibs/ptp2/chdk.c +@@ -1150,7 +1150,7 @@ static void yuv_live_to_jpeg(unsigned char *p_yuv, + struct jpeg_error_mgr jerr; + JSAMPROW row_ptr[1]; + uint8_t *outbuf = NULL, *tmprowbuf = NULL; +- uint64_t outlen = 0; ++ unsigned long outlen = 0; + unsigned int row_inc; + int sshift, dshift, xshift, skip; + +@@ -1161,8 +1161,8 @@ static void yuv_live_to_jpeg(unsigned char *p_yuv, + sshift = 6; + dshift = (width/height > 2) ? 6 : 12; + xshift = 4; +- /* Digic 6 cameras: 8 bit per element UYVY, +- * 4 bytes used to encode 2 pixels, need 6 bytes raw YUV data for jpeg encoding */ ++ /* Digic 6 cameras: 8 bit per element UYVY, ++ * 4 bytes used to encode 2 pixels, need 6 bytes raw YUV data for jpeg encoding */ + } else { + row_inc = buf_width*2; + sshift = 4; diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/gphoto2/libgphoto2_2.5.31.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/gphoto2/libgphoto2_2.5.31.bb index cc42b6a9..57c9d199 100644 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/gphoto2/libgphoto2_2.5.31.bb +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/gphoto2/libgphoto2_2.5.31.bb @@ -13,6 +13,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/gphoto/libgphoto2-${PV}.tar.bz2;name=libgphoto2 file://40-libgphoto2.rules \ file://0001-configure.ac-remove-AM_PO_SUBDIRS.patch \ file://0001-configure-Filter-out-buildpaths-from-CC.patch \ + file://fix-build-with-gcc-14.patch \ " SRC_URI[libgphoto2.sha256sum] = "4f81c34c0b812bee67afd5f144940fbcbe01a2055586a6a1fa2d0626024a545b" @@ -38,7 +39,7 @@ do_configure:append() { do_install:append() { install -d ${D}${sysconfdir}/udev/rules.d/ - install -m 0644 ${WORKDIR}/*.rules ${D}${sysconfdir}/udev/rules.d/ + install -m 0644 ${UNPACKDIR}/*.rules ${D}${sysconfdir}/udev/rules.d/ } PACKAGES =+ "libgphotoport libgphoto2-camlibs" diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/graphviz/graphviz/0001-Set-use_tcl-to-be-empty-string-if-tcl-is-disabled.patch b/sources/meta-openembedded/meta-oe/recipes-graphics/graphviz/graphviz/0001-Set-use_tcl-to-be-empty-string-if-tcl-is-disabled.patch new file mode 100644 index 00000000..99b53e2e --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/graphviz/graphviz/0001-Set-use_tcl-to-be-empty-string-if-tcl-is-disabled.patch @@ -0,0 +1,33 @@ +From 564901ab78da2b2b1bed92351dc3c102dc0a8154 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 6 Aug 2019 17:51:39 -0700 +Subject: [PATCH] Set use_tcl to be empty string if tcl is disabled + +Upstream-Status: Inappropriate [Cross-compile specific] +Signed-off-by: Khem Raj +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/configure.ac ++++ b/configure.ac +@@ -1225,7 +1225,7 @@ AC_ARG_ENABLE(tcl, + [], [enable_tcl=yes]) + + if test "x$enable_tcl" != "xyes"; then +- use_tcl="No (disabled)" ++ use_tcl="" + fi + + if test "x$use_tcl" = "x"; then +--- a/Makefile.am ++++ b/Makefile.am +@@ -11,7 +11,7 @@ pkginclude_HEADERS = $(top_builddir)/gra + dist_man_MANS = graphviz.7 + + # $(subdirs) contains the list from: AC_CONFIG_SUBDIRS +-SUBDIRS = $(subdirs) lib plugin cmd tclpkg doc contrib share graphs tests ++SUBDIRS = $(subdirs) lib plugin cmd doc contrib share graphs tests + + .PHONY: doxygen + doxygen: diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/graphviz/graphviz/CVE-2023-46045-0001.patch b/sources/meta-openembedded/meta-oe/recipes-graphics/graphviz/graphviz/CVE-2023-46045-0001.patch deleted file mode 100644 index 7b177370..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/graphviz/graphviz/CVE-2023-46045-0001.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 361f274ca901c3c476697a6404662d95f4dd43cb Mon Sep 17 00:00:00 2001 -From: Matthew Fernandez -Date: Wed, 24 Jul 2024 13:19:03 +0800 -Subject: [PATCH] gvc gvconfig_plugin_install_from_config: more tightly scope - 'gv_api' - -CVE: CVE-2023-46045 -Upstream-Status: Backport [https://gitlab.com/graphviz/graphviz/-/commit/361f274ca901c3c476697a6404662d95f4dd43cb] - -Signed-off-by: Yogita Urade ---- - lib/gvc/gvconfig.c | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/lib/gvc/gvconfig.c b/lib/gvc/gvconfig.c -index d03de09..2f31b98 100644 ---- a/lib/gvc/gvconfig.c -+++ b/lib/gvc/gvconfig.c -@@ -174,7 +174,6 @@ static int gvconfig_plugin_install_from_config(GVC_t * gvc, char *s) - { - char *package_path, *name, *api; - const char *type; -- api_t gv_api; - int quality; - int nest = 0; - gvplugin_package_t *package; -@@ -189,7 +188,7 @@ static int gvconfig_plugin_install_from_config(GVC_t * gvc, char *s) - package = gvplugin_package_record(gvc, package_path, name); - do { - api = token(&nest, &s); -- gv_api = gvplugin_api(api); -+ const api_t gv_api = gvplugin_api(api); - do { - if (nest == 2) { - type = token(&nest, &s); --- -2.25.1 diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/graphviz/graphviz/CVE-2023-46045-0002.patch b/sources/meta-openembedded/meta-oe/recipes-graphics/graphviz/graphviz/CVE-2023-46045-0002.patch deleted file mode 100644 index fbab10bb..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/graphviz/graphviz/CVE-2023-46045-0002.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 3f31704cafd7da3e86bb2861accf5e90c973e62a Mon Sep 17 00:00:00 2001 -From: Matthew Fernandez -Date: Wed, 24 Jul 2024 13:39:39 +0800 -Subject: [PATCH] gvc gvconfig_plugin_install_from_config: more tightly scope - 'api' - -CVE: CVE-2023-46045 -Upstream-Status: Backport [https://gitlab.com/graphviz/graphviz/-/commit/3f31704cafd7da3e86bb2861accf5e90c973e62a] - -Signed-off-by: Yogita Urade ---- - lib/gvc/gvconfig.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/lib/gvc/gvconfig.c b/lib/gvc/gvconfig.c -index 2f31b98..ea0d81b 100644 ---- a/lib/gvc/gvconfig.c -+++ b/lib/gvc/gvconfig.c -@@ -172,7 +172,7 @@ static char *token(int *nest, char **tokens) - - static int gvconfig_plugin_install_from_config(GVC_t * gvc, char *s) - { -- char *package_path, *name, *api; -+ char *package_path, *name; - const char *type; - int quality; - int nest = 0; -@@ -187,7 +187,7 @@ static int gvconfig_plugin_install_from_config(GVC_t * gvc, char *s) - name = "x"; - package = gvplugin_package_record(gvc, package_path, name); - do { -- api = token(&nest, &s); -+ const char *api = token(&nest, &s); - const api_t gv_api = gvplugin_api(api); - do { - if (nest == 2) { --- -2.25.1 diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/graphviz/graphviz/CVE-2023-46045-0003.patch b/sources/meta-openembedded/meta-oe/recipes-graphics/graphviz/graphviz/CVE-2023-46045-0003.patch deleted file mode 100644 index 372f44ef..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/graphviz/graphviz/CVE-2023-46045-0003.patch +++ /dev/null @@ -1,33 +0,0 @@ -From a95f977f5d809915ec4b14836d2b5b7f5e74881e Mon Sep 17 00:00:00 2001 -From: Matthew Fernandez -Date: Wed, 24 Jul 2024 15:02:06 +0800 -Subject: [PATCH] gvc: detect plugin installation failure and display an error - -Gitlab: fixes #2441 -Reported-by: GJDuck - -CVE: CVE-2023-46045 -Upstream-Status: Backport [https://gitlab.com/graphviz/graphviz/-/commit/a95f977f5d809915ec4b14836d2b5b7f5e74881e] - -Signed-off-by: Yogita Urade ---- - lib/gvc/gvconfig.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/lib/gvc/gvconfig.c b/lib/gvc/gvconfig.c -index ea0d81b..1eccc70 100644 ---- a/lib/gvc/gvconfig.c -+++ b/lib/gvc/gvconfig.c -@@ -189,6 +189,10 @@ static int gvconfig_plugin_install_from_config(GVC_t * gvc, char *s) - do { - const char *api = token(&nest, &s); - const api_t gv_api = gvplugin_api(api); -+ if (gv_api == (api_t)-1) { -+ agerr(AGERR, "config error: %s %s not found\n", package_path, api); -+ return 0; -+ } - do { - if (nest == 2) { - type = token(&nest, &s); --- -2.25.1 diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/graphviz/graphviz_8.1.0.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/graphviz/graphviz_8.1.0.bb index 5108f032..7548e976 100644 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/graphviz/graphviz_8.1.0.bb +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/graphviz/graphviz_8.1.0.bb @@ -20,15 +20,19 @@ inherit autotools-brokensep pkgconfig gettext qemu SRC_URI = "https://gitlab.com/api/v4/projects/4207231/packages/generic/${BPN}-releases/${PV}/${BP}.tar.xz \ file://0001-Autotools-fix-do-not-put-prefix-based-paths-in-compi.patch \ - file://CVE-2023-46045-0001.patch \ - file://CVE-2023-46045-0002.patch \ - file://CVE-2023-46045-0003.patch \ " +# Use native mkdefs +SRC_URI:append:class-target = "\ + file://0001-Set-use_tcl-to-be-empty-string-if-tcl-is-disabled.patch \ +" SRC_URI:append:class-nativesdk = "\ file://graphviz-setup.sh \ " SRC_URI[sha256sum] = "d593695fdaa8a19297523b679ad13d3ef2027b0b7f14cc2bc23e77969ed81565" +UPSTREAM_CHECK_URI = "https://graphviz.org/download/" +UPSTREAM_CHECK_REGEX = "(?P\d+(\.\d+)+)" + PACKAGECONFIG ??= "librsvg" PACKAGECONFIG[librsvg] = "--with-librsvg,--without-librsvg,librsvg" @@ -66,7 +70,7 @@ do_configure:prepend() { do_install:append:class-nativesdk() { # graphviz-setup.sh must be executed at SDK installation install -d ${D}${SDKPATHNATIVE}/post-relocate-setup.d - install -m 0755 ${WORKDIR}/graphviz-setup.sh ${D}${SDKPATHNATIVE}/post-relocate-setup.d + install -m 0755 ${UNPACKDIR}/graphviz-setup.sh ${D}${SDKPATHNATIVE}/post-relocate-setup.d } FILES:${PN}:class-nativesdk += "${SDKPATHNATIVE}" diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/gtkperf/gtkperf_0.40.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/gtkperf/gtkperf_0.40.bb index a70d31fe..a5c8de8f 100644 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/gtkperf/gtkperf_0.40.bb +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/gtkperf/gtkperf_0.40.bb @@ -14,6 +14,9 @@ SRC_URI = "http://prdownloads.sourceforge.net/${BPN}/${BPN}_${PV}.tar.gz \ SRC_URI[md5sum] = "4331dde4bb83865e15482885fcb0cc53" SRC_URI[sha256sum] = "9704344e732038eecbd007dd996a56293a6b027b5b76f3f036273a3fae1ab27b" +UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/gtkperf/files/gtkperf/" +UPSTREAM_CHECK_REGEX = "${BPN}_(?P\d+(\.\d+)+)" + DEPENDS = "gtk+" S = "${WORKDIR}/${BPN}" @@ -24,7 +27,7 @@ REQUIRED_DISTRO_FEATURES = "x11" do_configure:prepend () { rm -f ${S}/m4/init.m4 - cp -f ${WORKDIR}/Makevars ${S}/po/ + cp -f ${UNPACKDIR}/Makevars ${S}/po/ } do_install:append () { diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/gtkwave/gtkwave_3.3.119.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/gtkwave/gtkwave_3.3.119.bb deleted file mode 100644 index 0b1b0540..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/gtkwave/gtkwave_3.3.119.bb +++ /dev/null @@ -1,44 +0,0 @@ -SUMMARY = "VCD (Value Change Dump) file waveform viewer" -DESCRIPTION = "gtkwave is a viewer for VCD (Value Change Dump) files which are usually created by digital circuit simulators. (These files have no connection to video CDs!) " -HOMEPAGE = "http://gtkwave.sourceforge.net/" - -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=75859989545e37968a99b631ef42722e" - -SRC_URI = "http://gtkwave.sourceforge.net/gtkwave-gtk3-${PV}.tar.gz" -SRC_URI[sha256sum] = "eab3e09e7641115c07848bfb30f7dd0c3bbe2b8cbe45017e95e077dbba6ac038" -S = "${WORKDIR}/${BPN}-gtk3-${PV}" - -DEPENDS = " \ - gperf-native \ - gtk+3 \ - gdk-pixbuf \ - tcl \ - tk \ - bzip2 \ - xz \ - pango \ - zlib \ -" - -inherit pkgconfig autotools gettext texinfo mime mime-xdg - -inherit features_check -# depends on gtk+3 which has this restriction -# ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" -# but https://github.com/gtkwave/gtkwave/blob/f9d82a82aa3ddc30ca47984278371f62c9a3bd81/gtkwave3-gtk3/src/gtk23compat.h#L10 -# explicitly includes gdk/gdkwayland.h for gtk-3.22.26 and newer (oe-core currently has 3.24.29) -# and it needs x11 as well for tk dependency (so it happends to be both GTK3DISTROFEATURES instead of either of them) -REQUIRED_DISTRO_FEATURES = "wayland x11" - -EXTRA_OECONF = " \ - --enable-gtk3 \ - --with-tcl=${STAGING_BINDIR_CROSS} \ - --with-tk=${STAGING_BINDIR_CROSS} \ - --with-tirpc \ - --disable-mime-update \ -" - -FILES:${PN} = "${bindir} ${datadir}" - -RDEPENDS:${PN} += "tk-lib" diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/gtkwave/gtkwave_3.3.120.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/gtkwave/gtkwave_3.3.120.bb new file mode 100644 index 00000000..b7807c88 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/gtkwave/gtkwave_3.3.120.bb @@ -0,0 +1,44 @@ +SUMMARY = "VCD (Value Change Dump) file waveform viewer" +DESCRIPTION = "gtkwave is a viewer for VCD (Value Change Dump) files which are usually created by digital circuit simulators. (These files have no connection to video CDs!) " +HOMEPAGE = "http://gtkwave.sourceforge.net/" + +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=75859989545e37968a99b631ef42722e" + +SRC_URI = "http://gtkwave.sourceforge.net/gtkwave-gtk3-${PV}.tar.gz" +SRC_URI[sha256sum] = "5da94863fb2e5d88cc019e2bfdc676022398113894b585d864e11ca8341b24d8" +S = "${WORKDIR}/${BPN}-gtk3-${PV}" + +DEPENDS = " \ + gperf-native \ + gtk+3 \ + gdk-pixbuf \ + tcl \ + tk \ + bzip2 \ + xz \ + pango \ + zlib \ +" + +inherit pkgconfig autotools gettext texinfo mime mime-xdg + +inherit features_check +# depends on gtk+3 which has this restriction +# ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" +# but https://github.com/gtkwave/gtkwave/blob/f9d82a82aa3ddc30ca47984278371f62c9a3bd81/gtkwave3-gtk3/src/gtk23compat.h#L10 +# explicitly includes gdk/gdkwayland.h for gtk-3.22.26 and newer (oe-core currently has 3.24.29) +# and it needs x11 as well for tk dependency (so it happends to be both GTK3DISTROFEATURES instead of either of them) +REQUIRED_DISTRO_FEATURES = "wayland x11" + +EXTRA_OECONF = " \ + --enable-gtk3 \ + --with-tcl=${STAGING_BINDIR_CROSS} \ + --with-tk=${STAGING_BINDIR_CROSS} \ + --with-tirpc \ + --disable-mime-update \ +" + +FILES:${PN} = "${bindir} ${datadir}" + +RDEPENDS:${PN} += "tk-lib" diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/imlib2/imlib2_git.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/imlib2/imlib2_git.bb index 87e7ed4a..8e5febd7 100644 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/imlib2/imlib2_git.bb +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/imlib2/imlib2_git.bb @@ -7,8 +7,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=344895f253c32f38e182dcaf30fe8a35" DEPENDS = "freetype " PROVIDES = "virtual/imlib2" -PV = "1.12.2" -SRCREV = "a860e34b19af6b0a73d86ddc0e4829145e18fa6e" +PV = "1.12.3" +SRCREV = "143c60194c0948aac484d37bb23c59edea2ccf19" inherit autotools pkgconfig lib_package diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/leptonica/leptonica_1.82.0.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/leptonica/leptonica_1.82.0.bb deleted file mode 100644 index c0a2b45a..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/leptonica/leptonica_1.82.0.bb +++ /dev/null @@ -1,19 +0,0 @@ -DESCRIPTION = "A pedagogically-oriented open source site containing software that is broadly useful for image processing and image analysis applications" -DEPENDS = "jpeg tiff libpng zlib" -LICENSE = "BSD-2-Clause" -LIC_FILES_CHKSUM = "file://leptonica-license.txt;md5=809b282cea2df68975fbe0ffe02b560f" - -UPSTREAM_CHECK_URI = "https://github.com/DanBloomberg/leptonica/releases" - -SRC_URI = "http://www.leptonica.org/source/leptonica-${PV}.tar.gz" -SRC_URI[sha256sum] = "155302ee914668c27b6fe3ca9ff2da63b245f6d62f3061c8f27563774b8ae2d6" - -EXTRA_OECONF += " \ - --without-libwebp \ -" - -PACKAGECONFIG ??= "giflib" -PACKAGECONFIG[openjpeg] = "--with-libopenjpeg,--without-libopenjpeg,openjpeg" -PACKAGECONFIG[giflib] = "--with-giflib,--without-giflib,giflib" - -inherit autotools pkgconfig diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/leptonica/leptonica_1.84.1.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/leptonica/leptonica_1.84.1.bb new file mode 100644 index 00000000..89a35116 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/leptonica/leptonica_1.84.1.bb @@ -0,0 +1,20 @@ +DESCRIPTION = "A pedagogically-oriented open source site containing software that is broadly useful for image processing and image analysis applications" +DEPENDS = "jpeg tiff libpng zlib" +LICENSE = "BSD-2-Clause" +LIC_FILES_CHKSUM = "file://leptonica-license.txt;md5=809b282cea2df68975fbe0ffe02b560f" + +UPSTREAM_CHECK_URI = "https://github.com/DanBloomberg/leptonica/releases" +UPSTREAM_CHECK_REGEX = "(?P\d+(\.\d+)+)" + +SRC_URI = "http://www.leptonica.org/source/leptonica-${PV}.tar.gz" +SRC_URI[sha256sum] = "2b3e1254b1cca381e77c819b59ca99774ff43530209b9aeb511e1d46588a64f6" + +EXTRA_OECONF += " \ + --without-libwebp \ +" + +PACKAGECONFIG ??= "giflib" +PACKAGECONFIG[openjpeg] = "--with-libopenjpeg,--without-libopenjpeg,openjpeg" +PACKAGECONFIG[giflib] = "--with-giflib,--without-giflib,giflib" + +inherit autotools pkgconfig diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/libforms/libforms_1.2.5pre1.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/libforms/libforms_1.2.5pre1.bb index 251c07ad..db648ec8 100644 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/libforms/libforms_1.2.5pre1.bb +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/libforms/libforms_1.2.5pre1.bb @@ -24,3 +24,8 @@ DEPENDS = "libxpm jpeg libx11 virtual/libgl" RDEPENDS:${PN} = "bash" EXTRA_OECONF = "--with-extra-inc=${S}/lib" + +do_compile:append() { + sed -i -e 's|${B}|.|' ${B}/fd2ps/fd2ps + sed -i -e 's|${B}|.|' ${B}/fdesign/fdesign +} diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/libmng/libmng_2.0.3.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/libmng/libmng_2.0.3.bb index ba928d28..f9d3496d 100644 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/libmng/libmng_2.0.3.bb +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/libmng/libmng_2.0.3.bb @@ -13,6 +13,9 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.gz" SRC_URI[md5sum] = "7e9a12ba2a99dff7e736902ea07383d4" SRC_URI[sha256sum] = "cf112a1fb02f5b1c0fce5cab11ea8243852c139e669c44014125874b14b7dfaa" +UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/libmng/files/libmng-devel/" +UPSTREAM_CHECK_REGEX = "libmng-devel/(?P\d+(\.\d+)+)" + inherit autotools-brokensep pkgconfig PACKAGECONFIG ??= "jpeg" diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/libsdl/libsdl-1.2.15/0001-stdlib-Make-iconv-use-portable-across-glibc-musl.patch b/sources/meta-openembedded/meta-oe/recipes-graphics/libsdl/libsdl-1.2.15/0001-stdlib-Make-iconv-use-portable-across-glibc-musl.patch new file mode 100644 index 00000000..2007766f --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/libsdl/libsdl-1.2.15/0001-stdlib-Make-iconv-use-portable-across-glibc-musl.patch @@ -0,0 +1,52 @@ +From 6c35fc94ca30a4d0662479f7ef8a704d97aa7352 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 18 May 2024 18:13:30 -0700 +Subject: [PATCH] stdlib: Make iconv use portable across glibc/musl + +This is a backport from libsdl2 + +Upstream-Status: Backport [https://github.com/libsdl-org/SDL/blob/main/src/stdlib/SDL_iconv.c#L49C1-L51C1] +Signed-off-by: Khem Raj +--- + src/stdlib/SDL_iconv.c | 19 ++++--------------- + 1 file changed, 4 insertions(+), 15 deletions(-) + +diff --git a/src/stdlib/SDL_iconv.c b/src/stdlib/SDL_iconv.c +index fa56a99..087b6ec 100644 +--- a/src/stdlib/SDL_iconv.c ++++ b/src/stdlib/SDL_iconv.c +@@ -28,27 +28,16 @@ + + #ifdef HAVE_ICONV + +-/* Depending on which standard the iconv() was implemented with, +- iconv() may or may not use const char ** for the inbuf param. +- If we get this wrong, it's just a warning, so no big deal. +-*/ +-#if defined(_XGP6) || \ +- defined(__GLIBC__) && ((__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)) +-#define ICONV_INBUF_NONCONST +-#endif +- + #include + + size_t SDL_iconv(SDL_iconv_t cd, + const char **inbuf, size_t *inbytesleft, + char **outbuf, size_t *outbytesleft) + { +- size_t retCode; +-#ifdef ICONV_INBUF_NONCONST +- retCode = iconv(cd, (char **)inbuf, inbytesleft, outbuf, outbytesleft); +-#else +- retCode = iconv(cd, inbuf, inbytesleft, outbuf, outbytesleft); +-#endif ++ /* iconv's second parameter may or may not be `const char const *` depending on the ++ C runtime's whims. Casting to void * seems to make everyone happy, though. */ ++ ++ const size_t retCode = iconv((iconv_t)((uintptr_t)cd), (void *)inbuf, inbytesleft, outbuf, outbytesleft); + if ( retCode == (size_t)-1 ) { + switch(errno) { + case E2BIG: +-- +2.45.1 + diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/libsdl/libsdl-gfx_2.0.25.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/libsdl/libsdl-gfx_2.0.25.bb deleted file mode 100644 index 666442fb..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/libsdl/libsdl-gfx_2.0.25.bb +++ /dev/null @@ -1,19 +0,0 @@ -SUMMARY = "SDL graphics drawing primitives and other support functions" -SECTION = "libs" -LICENSE = "Zlib" -LIC_FILES_CHKSUM = "file://LICENSE;md5=5d1de21f0b70830e299905eac3419084" - -DEPENDS = "libsdl" - -SRC_URI = "http://www.ferzkopp.net/Software/SDL_gfx-2.0/SDL_gfx-${PV}.tar.gz" -SRC_URI[md5sum] = "ea24ed4b82ff1304809c363494fa8e16" -SRC_URI[sha256sum] = "556eedc06b6cf29eb495b6d27f2dcc51bf909ad82389ba2fa7bdc4dec89059c0" - -S = "${WORKDIR}/SDL_gfx-${PV}" - -inherit autotools pkgconfig - -EXTRA_OECONF += " \ - --disable-mmx \ -" - diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/libsdl/libsdl-gfx_2.0.27.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/libsdl/libsdl-gfx_2.0.27.bb new file mode 100644 index 00000000..4f702029 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/libsdl/libsdl-gfx_2.0.27.bb @@ -0,0 +1,20 @@ +SUMMARY = "SDL graphics drawing primitives and other support functions" +SECTION = "libs" +LICENSE = "Zlib" +LIC_FILES_CHKSUM = "file://LICENSE;md5=5d1de21f0b70830e299905eac3419084" + +DEPENDS = "libsdl" + +SRC_URI = "http://www.ferzkopp.net/Software/SDL_gfx-2.0/SDL_gfx-${PV}.tar.gz" +SRC_URI[sha256sum] = "dfb15ac5f8ce7a4952dc12d2aed9747518c5e6b335c0e31636d23f93c630f419" + +UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/sdlgfx/files/" + +S = "${WORKDIR}/SDL_gfx-${PV}" + +inherit autotools pkgconfig + +EXTRA_OECONF += " \ + --disable-mmx \ +" + diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/libsdl/libsdl2-image_2.0.5.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/libsdl/libsdl2-image_2.0.5.bb deleted file mode 100644 index 57f0f997..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/libsdl/libsdl2-image_2.0.5.bb +++ /dev/null @@ -1,31 +0,0 @@ -SUMMARY = "Simple DirectMedia Layer image library v2" -SECTION = "libs" - -LICENSE = "Zlib" -LIC_FILES_CHKSUM = "file://COPYING.txt;md5=822edb694b20ff16ceef85b27f61c11f" - -DEPENDS = "tiff zlib libpng jpeg libsdl2 libwebp" - -SRC_URI = "http://www.libsdl.org/projects/SDL_image/release/SDL2_image-${PV}.tar.gz" -SRC_URI[md5sum] = "f26f3a153360a8f09ed5220ef7b07aea" -SRC_URI[sha256sum] = "bdd5f6e026682f7d7e1be0b6051b209da2f402a2dd8bd1c4bd9c25ad263108d0" - -S = "${WORKDIR}/SDL2_image-${PV}" - -inherit autotools pkgconfig - -# Disable the run-time loading of the libs and bring back the soname dependencies. -EXTRA_OECONF += "--disable-jpg-shared --disable-png-shared -disable-tif-shared" - -do_configure:prepend() { - # make autoreconf happy - touch ${S}/NEWS ${S}/README ${S}/AUTHORS ${S}/ChangeLog - # Removing these files fixes a libtool version mismatch. - rm -f ${S}/acinclude/libtool.m4 - rm -f ${S}/acinclude/sdl2.m4 - rm -f ${S}/acinclude/pkg.m4 - rm -f ${S}/acinclude/lt~obsolete.m4 - rm -f ${S}/acinclude/ltoptions.m4 - rm -f ${S}/acinclude/ltsugar.m4 - rm -f ${S}/acinclude/ltversion.m4 -} diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/libsdl/libsdl2-image_2.8.2.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/libsdl/libsdl2-image_2.8.2.bb new file mode 100644 index 00000000..26731185 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/libsdl/libsdl2-image_2.8.2.bb @@ -0,0 +1,30 @@ +SUMMARY = "Simple DirectMedia Layer image library v2" +SECTION = "libs" + +LICENSE = "Zlib" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=2f6d9e01c97958aa851954ed5acf82ee" + +DEPENDS = "tiff zlib libpng jpeg libsdl2 libwebp" + +SRC_URI = "http://www.libsdl.org/projects/SDL_image/release/SDL2_image-${PV}.tar.gz" +SRC_URI[sha256sum] = "8f486bbfbcf8464dd58c9e5d93394ab0255ce68b51c5a966a918244820a76ddc" + +S = "${WORKDIR}/SDL2_image-${PV}" + +inherit autotools pkgconfig + +# Disable the run-time loading of the libs and bring back the soname dependencies. +EXTRA_OECONF += "--disable-jpg-shared --disable-png-shared -disable-tif-shared" + +do_configure:prepend() { + # make autoreconf happy + touch ${S}/NEWS ${S}/README ${S}/AUTHORS ${S}/ChangeLog + # Removing these files fixes a libtool version mismatch. + rm -f ${S}/acinclude/libtool.m4 + rm -f ${S}/acinclude/sdl2.m4 + rm -f ${S}/acinclude/pkg.m4 + rm -f ${S}/acinclude/lt~obsolete.m4 + rm -f ${S}/acinclude/ltoptions.m4 + rm -f ${S}/acinclude/ltsugar.m4 + rm -f ${S}/acinclude/ltversion.m4 +} diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/libsdl/libsdl_1.2.15.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/libsdl/libsdl_1.2.15.bb index 4fc4679f..1f436c6d 100644 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/libsdl/libsdl_1.2.15.bb +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/libsdl/libsdl_1.2.15.bb @@ -15,6 +15,7 @@ SRC_URI = "http://www.libsdl.org/release/SDL-${PV}.tar.gz \ file://libsdl-1.2.15-xdata32.patch \ file://pkgconfig.patch \ file://0001-build-Pass-tag-CC-explictly-when-using-libtool.patch \ + file://0001-stdlib-Make-iconv-use-portable-across-glibc-musl.patch \ file://CVE-2019-7577.patch \ file://CVE-2019-7574.patch \ file://CVE-2019-7572.patch \ diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/libyui/libyui-ncurses/0001-libyui-ncurses-Replace-off64_t-with-off_t-and-stat64.patch b/sources/meta-openembedded/meta-oe/recipes-graphics/libyui/libyui-ncurses/0001-libyui-ncurses-Replace-off64_t-with-off_t-and-stat64.patch deleted file mode 100644 index b29e5dc7..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/libyui/libyui-ncurses/0001-libyui-ncurses-Replace-off64_t-with-off_t-and-stat64.patch +++ /dev/null @@ -1,176 +0,0 @@ -From b81fb7942ab77b0bf6791e5fd98411dd68f133d9 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sun, 18 Dec 2022 15:13:00 -0800 -Subject: [PATCH] libyui-ncurses: Replace off64_t with off_t and stat64 with stat - -stat is same as stat64 when 64bit off_t is used. - -Upstream-Status: Submitted [https://github.com/libyui/libyui/pull/88] -Signed-off-by: Khem Raj ---- - CMakeLists.txt | 2 +- - src/NCAskForFile.cc | 6 +++--- - src/NCFileSelection.cc | 24 ++++++++++++------------ - src/NCFileSelection.h | 6 +++--- - 4 files changed, 19 insertions(+), 19 deletions(-) - -diff --git a/CMakeLists.txt b/libyui-ncurses/CMakeLists.txt -index b10eab8e..2000bb58 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -58,7 +58,7 @@ set( CMAKE_INSTALL_MESSAGE LAZY ) # Suppress "up-to-date" messages during "make - # Initialize compiler flags for all targets in all subdirectories - add_compile_options( "-Wall" ) - add_compile_options( "-Os" ) # Optimize for size (overrides CMake's -O3 in RELEASE builds) -- -+add_compile_options( "-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" ) # Enable largefile support - if ( WERROR ) - add_compile_options( "-Werror" ) - endif() -diff --git a/src/NCAskForFile.cc b/libyui-ncurses/src/NCAskForFile.cc -index aba6e0a6..44bb81bc 100644 ---- a/src/NCAskForFile.cc -+++ b/src/NCAskForFile.cc -@@ -73,8 +73,8 @@ std::string NCAskForFile::checkIniDir( std::string iniDir ) - { - std::string dname = ""; - -- struct stat64 statInfo; -- stat64( iniDir.c_str(), &statInfo ); -+ struct stat statInfo; -+ stat( iniDir.c_str(), &statInfo ); - - if ( S_ISDIR( statInfo.st_mode ) ) - { -@@ -90,7 +90,7 @@ std::string NCAskForFile::checkIniDir( std::string iniDir ) - && pos != 0 ) - { - std::string dir = iniDir.substr( 0, pos ); -- stat64( dir.c_str(), &statInfo ); -+ stat( dir.c_str(), &statInfo ); - - if ( S_ISDIR( statInfo.st_mode ) ) - { -diff --git a/src/NCFileSelection.cc b/libyui-ncurses/src/NCFileSelection.cc -index 3eb9c908..8894dc72 100644 ---- a/src/NCFileSelection.cc -+++ b/src/NCFileSelection.cc -@@ -46,7 +46,7 @@ using std::list; - - - NCFileInfo::NCFileInfo( string fileName, -- struct stat64 * statInfo, -+ struct stat * statInfo, - bool link ) - { - _name = fileName; -@@ -146,7 +146,7 @@ NCFileInfo::NCFileInfo() - _mode = ( mode_t )0; - _device = ( dev_t )0; - _links = ( nlink_t )0; -- _size = ( off64_t )0; -+ _size = ( off_t )0; - _mtime = ( time_t )0; - } - -@@ -177,11 +177,11 @@ NCFileSelection::NCFileSelection( YWidget * parent, - { - SetSepChar( ' ' ); - -- struct stat64 statInfo; -+ struct stat statInfo; - - if ( !iniDir.empty() ) - { -- stat64( iniDir.c_str(), &statInfo ); -+ stat( iniDir.c_str(), &statInfo ); - } - - if ( iniDir.empty() -@@ -559,8 +559,8 @@ NCursesEvent NCFileTable::wHandleInput( wint_t key ) - bool NCFileTable::fillList() - { - -- struct stat64 statInfo; -- struct stat64 linkInfo; -+ struct stat statInfo; -+ struct stat linkInfo; - struct dirent * entry; - list tmpList; - list::iterator it; -@@ -592,7 +592,7 @@ bool NCFileTable::fillList() - { - string fullName = currentDir + "/" + ( *it ); - -- if ( lstat64( fullName.c_str(), &statInfo ) == 0 ) -+ if ( lstat( fullName.c_str(), &statInfo ) == 0 ) - { - if ( S_ISREG( statInfo.st_mode ) || S_ISBLK( statInfo.st_mode ) ) - { -@@ -604,7 +604,7 @@ bool NCFileTable::fillList() - } - else if ( S_ISLNK( statInfo.st_mode ) ) - { -- if ( stat64( fullName.c_str(), &linkInfo ) == 0 ) -+ if ( stat( fullName.c_str(), &linkInfo ) == 0 ) - { - if ( S_ISREG( linkInfo.st_mode ) || S_ISBLK( linkInfo.st_mode ) ) - { -@@ -701,8 +701,8 @@ void NCDirectoryTable::fillHeader() - - bool NCDirectoryTable::fillList() - { -- struct stat64 statInfo; -- struct stat64 linkInfo; -+ struct stat statInfo; -+ struct stat linkInfo; - struct dirent * entry; - list tmpList; - list::iterator it; -@@ -734,7 +734,7 @@ bool NCDirectoryTable::fillList() - { - string fullName = currentDir + "/" + ( *it ); - -- if ( lstat64( fullName.c_str(), &statInfo ) == 0 ) -+ if ( lstat( fullName.c_str(), &statInfo ) == 0 ) - { - if ( S_ISDIR( statInfo.st_mode ) ) - { -@@ -746,7 +746,7 @@ bool NCDirectoryTable::fillList() - } - else if ( S_ISLNK( statInfo.st_mode ) ) - { -- if ( stat64( fullName.c_str(), &linkInfo ) == 0 ) -+ if ( stat( fullName.c_str(), &linkInfo ) == 0 ) - { - if ( S_ISDIR( linkInfo.st_mode ) ) - { -diff --git a/src/NCFileSelection.h b/libyui-ncurses/src/NCFileSelection.h -index 0569215d..5c459d62 100644 ---- a/src/NCFileSelection.h -+++ b/src/NCFileSelection.h -@@ -44,10 +44,10 @@ - struct NCFileInfo - { - /** -- * Constructor from a stat buffer (i.e. based on an lstat64() call). -+ * Constructor from a stat buffer (i.e. based on an lstat() call). - **/ - NCFileInfo( std::string fileName, -- struct stat64 * statInfo, -+ struct stat * statInfo, - bool link = false ); - - NCFileInfo(); -@@ -65,7 +65,7 @@ struct NCFileInfo - dev_t _device; // device this object resides on - mode_t _mode; // file permissions + object type - nlink_t _links; // number of links -- off64_t _size; // size in bytes -+ off_t _size; // size in bytes - time_t _mtime; // modification time - - bool isDir() { return (( S_ISDIR( _mode ) ) ? true : false ); } --- -2.39.0 - diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/libyui/libyui-ncurses_4.2.3.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/libyui/libyui-ncurses_4.2.3.bb deleted file mode 100644 index bcc5ef33..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/libyui/libyui-ncurses_4.2.3.bb +++ /dev/null @@ -1,50 +0,0 @@ -SUMMARY = "Character Based User Interface for libyui" -LICENSE = "LGPL-3.0-only" -LIC_FILES_CHKSUM = "file://../COPYING.lgpl-3;md5=e6a600fd5e1d9cbde2d983680233ad02 \ - file://../COPYING.lgpl-2.1;md5=4fbd65380cdd255951079008b364516c \ -" - -SRC_URI = "git://github.com/libyui/libyui.git;branch=master;protocol=https \ - file://0001-libyui-ncurses-Replace-off64_t-with-off_t-and-stat64.patch \ - " - -SRC_URI:append:class-target = " file://0001-Fix-the-error-of-can-t-find-header-file.patch" - -SRCREV = "dabdcd9cc6a0058fd6966d7d2e19d508debcc0ac" - -S = "${WORKDIR}/git/libyui-ncurses" - -inherit cmake gettext pkgconfig - -DEPENDS += "boost libyui ncurses" - -BBCLASSEXTEND = "nativesdk" - -EXTRA_OECMAKE += "-DCMAKE_BUILD_TYPE=RELWITHDEBINFO -DWERROR=OFF" - -CXXFLAGS += "-DNCURSES_WIDECHAR" - -do_configure:prepend () { - cd ${S} - if [ -e ${PKG_CONFIG_SYSROOT_DIR}${base_prefix}/usr/lib/libyui.so ]; then - mkdir -p ${PKG_CONFIG_SYSROOT_DIR}${base_prefix}/usr/lib64/ - cp ${PKG_CONFIG_SYSROOT_DIR}${base_prefix}/usr/lib/libyui.so* ${PKG_CONFIG_SYSROOT_DIR}${base_prefix}/usr/lib64/ - fi - cd - - sed -i -e "s#\${YPREFIX}#\${PKG_CONFIG_SYSROOT_DIR}${base_prefix}&#" ${S}/CMakeLists.txt -} - -do_install:append () { - if [ "${libdir}" = "${base_prefix}/usr/lib" ] && [ -d ${D}/usr/lib64 ]; then - mv ${D}/usr/lib64 ${D}/usr/lib - fi -} - -do_install:append:class-nativesdk () { - mkdir -p ${D}/${base_prefix} - mv ${D}/usr ${D}/${base_prefix} -} - -FILES:${PN} += "${datadir}/*" - -FILES:${PN}-dev += "${libdir}/*" diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/libyui/libyui-ncurses_4.6.2.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/libyui/libyui-ncurses_4.6.2.bb new file mode 100644 index 00000000..4196449f --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/libyui/libyui-ncurses_4.6.2.bb @@ -0,0 +1,56 @@ +SUMMARY = "Character Based User Interface for libyui" +LICENSE = "LGPL-3.0-only" +LIC_FILES_CHKSUM = "file://../COPYING.lgpl-3;md5=e6a600fd5e1d9cbde2d983680233ad02 \ + file://../COPYING.lgpl-2.1;md5=4fbd65380cdd255951079008b364516c \ +" + +SRC_URI = "git://github.com/libyui/libyui.git;branch=master;protocol=https \ + " + +SRC_URI:append:class-target = " file://0001-Fix-the-error-of-can-t-find-header-file.patch" + +SRCREV = "e691b563262306a40a61bbf228839fa06e4f0516" + +S = "${WORKDIR}/git/libyui-ncurses" + +inherit cmake gettext pkgconfig + +DEPENDS += "boost libyui ncurses" + +BBCLASSEXTEND = "nativesdk" + +EXTRA_OECMAKE += "-DCMAKE_BUILD_TYPE=Release -DWERROR=OFF -DCMAKE_SKIP_RPATH=1" + +# TODO: Check with newer GCC, it works ok with GCC +# GCC-14 causes buildpaths QA error +# WARNING: libyui-ncurses-4.6.2-r0 do_package_qa: QA Issue: File /usr/lib/yui/.debug/libyui-ncurses.so.16.0.0 in package libyui-ncurses-dbg contains reference to TMPDIR [buildpaths + +DEBUG_LEVELFLAG = "" + +CXXFLAGS += "-DNCURSES_WIDECHAR" +LDFLAGS += "-L${B}/src" + +do_configure:prepend () { + cd ${S} + if [ -e ${PKG_CONFIG_SYSROOT_DIR}${base_prefix}/usr/lib/libyui.so ]; then + mkdir -p ${PKG_CONFIG_SYSROOT_DIR}${base_prefix}/usr/lib64/ + cp ${PKG_CONFIG_SYSROOT_DIR}${base_prefix}/usr/lib/libyui.so* ${PKG_CONFIG_SYSROOT_DIR}${base_prefix}/usr/lib64/ + fi + cd - + sed -i -e "s#\${YPREFIX}#\${PKG_CONFIG_SYSROOT_DIR}${base_prefix}&#" ${S}/CMakeLists.txt +} + +do_install:append () { + if [ "${libdir}" = "${base_prefix}/usr/lib" ] && [ -d ${D}/usr/lib64 ]; then + mv ${D}/usr/lib64 ${D}/usr/lib + fi +} + +do_install:append:class-nativesdk () { + mkdir -p ${D}/${base_prefix} + mv ${D}/usr ${D}/${base_prefix} +} + +FILES:${PN} += "${datadir}/*" + +FILES:${PN}-dev += "${libdir}/*" diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/libyui/libyui_4.2.3.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/libyui/libyui_4.2.3.bb deleted file mode 100644 index 939f3f36..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/libyui/libyui_4.2.3.bb +++ /dev/null @@ -1,36 +0,0 @@ -SUMMARY = "Libyui is a widget abstraction library providing Qt, GTK and ncurses frontends." -LICENSE = "LGPL-3.0-only" -LIC_FILES_CHKSUM = "file://../COPYING.gpl-3;md5=d32239bcb673463ab874e80d47fae504 \ - file://../COPYING.lgpl-2.1;md5=4fbd65380cdd255951079008b364516c \ - file://../COPYING.lgpl-3;md5=e6a600fd5e1d9cbde2d983680233ad02 \ - " - -SRC_URI = "git://github.com/libyui/libyui.git;branch=master;protocol=https \ - file://0001-Fix-build-with-clang.patch \ - file://0001-Use-relative-install-paths-for-CMake.patch \ - " - -SRCREV = "dabdcd9cc6a0058fd6966d7d2e19d508debcc0ac" - -S = "${WORKDIR}/git/libyui" - -inherit cmake gettext pkgconfig - -DEPENDS += "boost" - -EXTRA_OECMAKE += "-DCMAKE_BUILD_TYPE=RELWITHDEBINFO -DWERROR=OFF" - -BBCLASSEXTEND = "native nativesdk" - -do_install:append () { - if [ "${libdir}" = "${base_prefix}/usr/lib" ] && [ -d ${D}/usr/lib64 ]; then - mv ${D}/usr/lib64 ${D}/usr/lib - fi -} - -do_install:append:class-nativesdk () { - mkdir -p ${D}/${base_prefix} - mv ${D}/usr ${D}/${base_prefix} -} - -FILES:${PN}-dev = "${libdir}/* ${includedir}/yui*" diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/libyui/libyui_4.6.2.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/libyui/libyui_4.6.2.bb new file mode 100644 index 00000000..419a9522 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/libyui/libyui_4.6.2.bb @@ -0,0 +1,37 @@ +SUMMARY = "Libyui is a widget abstraction library providing Qt, GTK and ncurses frontends." +LICENSE = "LGPL-3.0-only" +LIC_FILES_CHKSUM = "file://../COPYING.gpl-3;md5=d32239bcb673463ab874e80d47fae504 \ + file://../COPYING.lgpl-2.1;md5=4fbd65380cdd255951079008b364516c \ + file://../COPYING.lgpl-3;md5=e6a600fd5e1d9cbde2d983680233ad02 \ + " + +SRC_URI = "git://github.com/libyui/libyui.git;branch=master;protocol=https \ + file://0001-Fix-build-with-clang.patch \ + file://0001-Use-relative-install-paths-for-CMake.patch \ + " + +SRCREV = "e691b563262306a40a61bbf228839fa06e4f0516" + +S = "${WORKDIR}/git/libyui" + +inherit cmake gettext pkgconfig + +DEPENDS += "boost" + +EXTRA_OECMAKE += "-DCMAKE_BUILD_TYPE=RELWITHDEBINFO -DWERROR=OFF" + +LDFLAGS += "-L${B}/src" +BBCLASSEXTEND = "native nativesdk" + +do_install:append () { + if [ "${libdir}" = "${base_prefix}/usr/lib" ] && [ -d ${D}/usr/lib64 ]; then + mv ${D}/usr/lib64 ${D}/usr/lib + fi +} + +do_install:append:class-nativesdk () { + mkdir -p ${D}/${base_prefix} + mv ${D}/usr ${D}/${base_prefix} +} + +FILES:${PN}-dev = "${libdir}/* ${includedir}/yui*" diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/lvgl/files/0002-fix-sdl-handle-both-LV_IMAGE_SRC_FILE-and-LV_IMAGE_S.patch b/sources/meta-openembedded/meta-oe/recipes-graphics/lvgl/files/0002-fix-sdl-handle-both-LV_IMAGE_SRC_FILE-and-LV_IMAGE_S.patch index bd619b15..0bfc3f3e 100644 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/lvgl/files/0002-fix-sdl-handle-both-LV_IMAGE_SRC_FILE-and-LV_IMAGE_S.patch +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/lvgl/files/0002-fix-sdl-handle-both-LV_IMAGE_SRC_FILE-and-LV_IMAGE_S.patch @@ -10,7 +10,7 @@ the case, e.g. the lv_demo_fb uses encoded images which are of type LV_IMAGE_SRC_VARIABLE and instead of filename, come with a buffer of pixels. Handle the later using SDL_CreateRGBSurfaceFrom(). -Upstream-Status: Submitted [https://github.com/lvgl/lvgl/pull/5852] +Upstream-Status: Backport [b339e67581864b2fb6bb8897735a1e110c324ddc] Signed-off-by: Marek Vasut --- src/draw/sdl/lv_draw_sdl.c | 30 +++++++++++++++++++++++++++--- diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/lvgl/files/0003-Make-fbdev-device-node-runtime-configurable-via-envi.patch b/sources/meta-openembedded/meta-oe/recipes-graphics/lvgl/files/0003-Make-fbdev-device-node-runtime-configurable-via-envi.patch index 73c01cb5..7e542bcf 100644 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/lvgl/files/0003-Make-fbdev-device-node-runtime-configurable-via-envi.patch +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/lvgl/files/0003-Make-fbdev-device-node-runtime-configurable-via-envi.patch @@ -9,7 +9,7 @@ case it is, use it as the video card file in lv_linux_fbdev_set_file(). Otherwise fall back to /dev/fb0, i.e. the current behavior. This way, it is possible to test LVGL on systems with multiple fbdev devices. -Upstream-Status: Submitted [https://github.com/lvgl/lv_port_linux_frame_buffer/pull/47] +Upstream-Status: Backport [a0f03515bd7417a0d100058b133c3e8d69be9451] Signed-off-by: Marek Vasut --- main.c | 8 +++++++- diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/lvgl/files/0004-Factor-out-fbdev-initialization-code.patch b/sources/meta-openembedded/meta-oe/recipes-graphics/lvgl/files/0004-Factor-out-fbdev-initialization-code.patch index d24d150c..6843af0a 100644 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/lvgl/files/0004-Factor-out-fbdev-initialization-code.patch +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/lvgl/files/0004-Factor-out-fbdev-initialization-code.patch @@ -8,7 +8,7 @@ around it, so it can be conditionally compiled in. This is done in preparation for addition of other backend initialization example code. -Upstream-Status: Submitted [https://github.com/lvgl/lv_port_linux_frame_buffer/pull/47] +Upstream-Status: Backport [a0f03515bd7417a0d100058b133c3e8d69be9451] Signed-off-by: Marek Vasut --- main.c | 18 ++++++++++++++---- diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/lvgl/files/0005-Add-DRM-KMS-example-support.patch b/sources/meta-openembedded/meta-oe/recipes-graphics/lvgl/files/0005-Add-DRM-KMS-example-support.patch index 9ee7a7f1..2d2c4c60 100644 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/lvgl/files/0005-Add-DRM-KMS-example-support.patch +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/lvgl/files/0005-Add-DRM-KMS-example-support.patch @@ -13,7 +13,7 @@ To use DRM/KMS support, adjust lv_conf.h as follows: LV_USE_LINUX_FBDEV=0 LV_USE_LINUX_DRM=1 -Upstream-Status: Submitted [https://github.com/lvgl/lv_port_linux_frame_buffer/pull/47] +Upstream-Status: Backport [a0f03515bd7417a0d100058b133c3e8d69be9451] Signed-off-by: Marek Vasut --- CMakeLists.txt | 5 ++++- diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/lvgl/files/0006-Add-SDL2-example-support.patch b/sources/meta-openembedded/meta-oe/recipes-graphics/lvgl/files/0006-Add-SDL2-example-support.patch index 691ee80b..cfb6c6e8 100644 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/lvgl/files/0006-Add-SDL2-example-support.patch +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/lvgl/files/0006-Add-SDL2-example-support.patch @@ -22,7 +22,7 @@ LV_USE_LINUX_FBDEV=0 LV_USE_LINUX_DRM=0 LV_USE_SDL=1 -Upstream-Status: Submitted [https://github.com/lvgl/lv_port_linux_frame_buffer/pull/47] +Upstream-Status: Backport [a0f03515bd7417a0d100058b133c3e8d69be9451] Signed-off-by: Marek Vasut --- CMakeLists.txt | 6 +++++- diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/lvgl/files/0007-fix-cmake-generate-versioned-shared-libraries.patch b/sources/meta-openembedded/meta-oe/recipes-graphics/lvgl/files/0007-fix-cmake-generate-versioned-shared-libraries.patch index 6997d841..f5d39396 100644 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/lvgl/files/0007-fix-cmake-generate-versioned-shared-libraries.patch +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/lvgl/files/0007-fix-cmake-generate-versioned-shared-libraries.patch @@ -7,10 +7,10 @@ Add missing version suffix to shared libraries. Currently the filename of generated shared libraries is only liblvgl.so, which prevents coexistence of different versions of LVGL on the same system. Set VERSION and SOVERSION to make cmake add the version suffix to generated shared libraries. That -changes the filename to liblvgl.so.9.0.0 and includes symlink with major +changes the filename to liblvgl.so.9.1.0 and includes symlink with major ABI version, i.e. liblvgl.so.9 . -Upstream-Status: Submitted [https://github.com/lvgl/lvgl/pull/5865] +Upstream-Status: Backport [2c469279f53f9dee63d71295c6058749bc87ce73] Signed-off-by: Marek Vasut --- env_support/cmake/custom.cmake | 11 +++++++++++ @@ -21,7 +21,7 @@ index 9800468eb..6f33f1cc8 100644 --- a/env_support/cmake/custom.cmake +++ b/env_support/cmake/custom.cmake @@ -1,3 +1,6 @@ -+set(LVGL_VERSION "9.0.0") ++set(LVGL_VERSION "9.1.0") +set(LVGL_SOVERSION "9") + # Option to define LV_LVGL_H_INCLUDE_SIMPLE, default: ON diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/lvgl/files/0008-fix-fbdev-set-resolution-prior-to-buffer.patch b/sources/meta-openembedded/meta-oe/recipes-graphics/lvgl/files/0008-fix-fbdev-set-resolution-prior-to-buffer.patch index 449db53d..5cafb41d 100644 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/lvgl/files/0008-fix-fbdev-set-resolution-prior-to-buffer.patch +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/lvgl/files/0008-fix-fbdev-set-resolution-prior-to-buffer.patch @@ -6,7 +6,7 @@ Subject: [PATCH] fix(fbdev): set resolution prior to buffer Otherwise it ends up with using the default value 800x480 and may fail at lv_display_set_buffers due to incorrect resolution. -Upstream-Status: Submitted [https://github.com/lvgl/lvgl/pull/6004] +Upstream-Status: Backport [29662d1c357c15135d076a2a924b9ef056c82120] Signed-off-by: Jaeyoon Jung --- diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/lvgl/lv-conf.inc b/sources/meta-openembedded/meta-oe/recipes-graphics/lvgl/lv-conf.inc index 8fd3412c..91860155 100644 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/lvgl/lv-conf.inc +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/lvgl/lv-conf.inc @@ -2,6 +2,7 @@ PACKAGECONFIG ??= "drm" PACKAGECONFIG[drm] = ",,libdrm" PACKAGECONFIG[fbdev] = ",," +PACKAGECONFIG[gridnav] = ",," PACKAGECONFIG[sdl] = ",,virtual/libsdl2 libsdl2-image" # Add libdrm include if drm is selected in PACKAGECONFIG @@ -14,6 +15,7 @@ LVGL_CONFIG_USE_EVDEV = "${@bb.utils.contains_any('PACKAGECONFIG', 'drm fbdev', LVGL_CONFIG_USE_FBDEV = "${@bb.utils.contains('PACKAGECONFIG', 'fbdev', '1', '0', d)}" LVGL_CONFIG_USE_SDL = "${@bb.utils.contains('PACKAGECONFIG', 'sdl', '1', '0', d)}" + LVGL_CONFIG_SDL_FULLSCREEN ?= "0" LVGL_CONFIG_LV_MEM_CUSTOM ?= "0" @@ -26,6 +28,8 @@ LVGL_CONFIG_LV_LOG_PRINTF ?= "0" LVGL_CONFIG_LV_USE_FONT_COMPRESSED ?= "0" +LVGL_CONFIG_LV_USE_GRIDNAV = "${@bb.utils.contains('PACKAGECONFIG', 'gridnav', '1', '0', d)}" + LVGL_CONFIG_LV_THEME_DEFAULT_DARK ?= "0" DEBUG_BUILD ??= "0" @@ -70,6 +74,7 @@ do_configure:append() { -e "s|^([[:space:]]*#define LV_LOG_PRINTF[[:space:]]).*|\1${LVGL_CONFIG_LV_LOG_PRINTF}|" \ \ -e "s|^([[:space:]]*#define LV_USE_FONT_COMPRESSED[[:space:]]).*|\1${LVGL_CONFIG_LV_USE_FONT_COMPRESSED}|" \ + -e "s|^([[:space:]]*#define LV_USE_GRIDNAV[[:space:]]).*|\1${LVGL_CONFIG_LV_USE_GRIDNAV}|" \ -e "s|^([[:space:]]*#define LV_THEME_DEFAULT_DARK[[:space:]]).*|\1${LVGL_CONFIG_LV_THEME_DEFAULT_DARK}|" \ \ -i "${S}/lv_conf.h" diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/lvgl/lvgl_9.1.0.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/lvgl/lvgl_9.1.0.bb index 4435c407..63c810d7 100644 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/lvgl/lvgl_9.1.0.bb +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/lvgl/lvgl_9.1.0.bb @@ -24,10 +24,5 @@ S = "${WORKDIR}/git" require lv-conf.inc do_install:append() { - install -d "${D}${includedir}/${PN}" - install -m 0644 "${S}/lv_conf.h" "${D}${includedir}/${PN}/lv_conf.h" + install -m 0644 "${S}/lv_conf.h" "${D}${includedir}/${BPN}/lv_conf.h" } - -FILES:${PN}-dev += "\ - ${includedir}/${PN}/ \ - " diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/lxdm/lxdm_0.5.3.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/lxdm/lxdm_0.5.3.bb index adf9cb59..ae452582 100644 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/lxdm/lxdm_0.5.3.bb +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/lxdm/lxdm_0.5.3.bb @@ -61,12 +61,12 @@ do_compile:append() { do_install:append() { install -d ${D}${localstatedir}/lib/lxdm - install -m 644 ${WORKDIR}/lxdm.conf ${D}${localstatedir}/lib/lxdm + install -m 644 ${UNPACKDIR}/lxdm.conf ${D}${localstatedir}/lib/lxdm if ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'true', 'false', d)}; then # ArchLinux version of pam config has the following advantages: # * simple setup of passwordless login # * in XFCE powerdown/restart enabled in logoff dialog - install -m 644 ${WORKDIR}/${@bb.utils.contains("DISTRO_TYPE", "debug", "lxdm-pam-debug", "lxdm-pam",d)} ${D}${sysconfdir}/pam.d/lxdm + install -m 644 ${UNPACKDIR}/${@bb.utils.contains("DISTRO_TYPE", "debug", "lxdm-pam-debug", "lxdm-pam",d)} ${D}${sysconfdir}/pam.d/lxdm fi } diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/neatvnc/neatvnc_0.8.0.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/neatvnc/neatvnc_0.8.0.bb deleted file mode 100644 index c9c4a6c2..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/neatvnc/neatvnc_0.8.0.bb +++ /dev/null @@ -1,38 +0,0 @@ -SUMMARY = "A liberally licensed VNC server library" -DESCRIPTION = "This is a liberally licensed VNC server library that's intended to be fast and neat." -HOMEPAGE = "https://github.com/any1/neatvnc" -LICENSE = "ISC" -LIC_FILES_CHKSUM = "file://COPYING;md5=94fc374e7174f41e3afe0f027ee59ff7" - -SRC_URI = "git://github.com/any1/neatvnc;branch=master;protocol=https" - -SRCREV = "46432ce8cade0b54a38d4bb42eb07f96c8ff49fd" - -S = "${WORKDIR}/git" - -DEPENDS = "libdrm pixman aml zlib" - -PACKAGECONFIG ??= "" -PACKAGECONFIG[tls] = "-Dtls=enabled,-Dtls=disabled,gnutls" -PACKAGECONFIG[jpeg] = "-Djpeg=enabled,-Djpeg=disabled,libjpeg-turbo" -PACKAGECONFIG[examples] = "-Dexamples=true,-Dexamples=false,libpng" -PACKAGECONFIG[benchmarks] = "-Dbenchmarks=true,-Dbenchmarks=false,libpng" - -PACKAGE_BEFORE_PN += "${PN}-examples" -ALLOW_EMPTY:${PN}-examples = "1" -FILES:${PN}-examples = "${bindir}" - -NEATVNC_EXAMPLES = "draw png-server" - -inherit meson pkgconfig - -do_install:append () { - if ${@bb.utils.contains('PACKAGECONFIG', 'examples', 'true', 'false', d)}; then - install -d ${D}${bindir} - for bin in ${NEATVNC_EXAMPLES}; do - install -m 0755 ${B}/examples/$bin ${D}${bindir} - done - fi -} - -BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/neatvnc/neatvnc_0.8.1.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/neatvnc/neatvnc_0.8.1.bb new file mode 100644 index 00000000..9065050c --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/neatvnc/neatvnc_0.8.1.bb @@ -0,0 +1,38 @@ +SUMMARY = "A liberally licensed VNC server library" +DESCRIPTION = "This is a liberally licensed VNC server library that's intended to be fast and neat." +HOMEPAGE = "https://github.com/any1/neatvnc" +LICENSE = "ISC" +LIC_FILES_CHKSUM = "file://COPYING;md5=94fc374e7174f41e3afe0f027ee59ff7" + +SRC_URI = "git://github.com/any1/neatvnc;branch=v0.8;protocol=https" + +SRCREV = "07081567ab21a2b099ceb41ae8cab872a31cbb9a" + +S = "${WORKDIR}/git" + +DEPENDS = "libdrm pixman aml zlib" + +PACKAGECONFIG ??= "" +PACKAGECONFIG[tls] = "-Dtls=enabled,-Dtls=disabled,gnutls" +PACKAGECONFIG[jpeg] = "-Djpeg=enabled,-Djpeg=disabled,libjpeg-turbo" +PACKAGECONFIG[examples] = "-Dexamples=true,-Dexamples=false,libpng" +PACKAGECONFIG[benchmarks] = "-Dbenchmarks=true,-Dbenchmarks=false,libpng" + +PACKAGE_BEFORE_PN += "${PN}-examples" +ALLOW_EMPTY:${PN}-examples = "1" +FILES:${PN}-examples = "${bindir}" + +NEATVNC_EXAMPLES = "draw png-server" + +inherit meson pkgconfig + +do_install:append () { + if ${@bb.utils.contains('PACKAGECONFIG', 'examples', 'true', 'false', d)}; then + install -d ${D}${bindir} + for bin in ${NEATVNC_EXAMPLES}; do + install -m 0755 ${B}/examples/$bin ${D}${bindir} + done + fi +} + +BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/openbox/openbox_3.6.1.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/openbox/openbox_3.6.1.bb index 1851a84b..50231602 100644 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/openbox/openbox_3.6.1.bb +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/openbox/openbox_3.6.1.bb @@ -14,6 +14,9 @@ SRC_URI = " \ SRC_URI[md5sum] = "b72794996c6a3ad94634727b95f9d204" SRC_URI[sha256sum] = "8b4ac0760018c77c0044fab06a4f0c510ba87eae934d9983b10878483bde7ef7" +UPSTREAM_CHECK_URI = "https://github.com/Mikachu/openbox/tags" +UPSTREAM_CHECK_REGEX = "(?P\d+(\.\d+)+)" + inherit autotools gettext update-alternatives pkgconfig features_check # depends on virtual/libx11 REQUIRED_DISTRO_FEATURES = "x11" diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/openjpeg/openjpeg_2.5.2.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/openjpeg/openjpeg_2.5.2.bb new file mode 100644 index 00000000..45f1b5ef --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/openjpeg/openjpeg_2.5.2.bb @@ -0,0 +1,21 @@ +DESCRIPTION = "OpenJPEG library is an open-source JPEG 2000 codec" +HOMEPAGE = "http://www.openjpeg.org" +LICENSE = "BSD-2-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=c648878b4840d7babaade1303e7f108c" + +DEPENDS = "libpng tiff lcms zlib" + +SRC_URI = "git://github.com/uclouvain/openjpeg.git;branch=master;protocol=https \ + file://0001-Do-not-ask-cmake-to-export-binaries-they-don-t-make-.patch \ + " +SRCREV = "39e8c50a2f9bdcf36810ee3d41bcbf1cc78968ae" +S = "${WORKDIR}/git" + +inherit cmake + +# for multilib +EXTRA_OECMAKE += "-DOPENJPEG_INSTALL_LIB_DIR=${@d.getVar('baselib').replace('/', '')}" + +FILES:${PN} += "${libdir}/openjpeg*" + +BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/openjpeg/openjpeg_2.5.3.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/openjpeg/openjpeg_2.5.3.bb deleted file mode 100644 index 231bf845..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/openjpeg/openjpeg_2.5.3.bb +++ /dev/null @@ -1,21 +0,0 @@ -DESCRIPTION = "OpenJPEG library is an open-source JPEG 2000 codec" -HOMEPAGE = "http://www.openjpeg.org" -LICENSE = "BSD-2-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=c648878b4840d7babaade1303e7f108c" - -DEPENDS = "libpng tiff lcms zlib" - -SRC_URI = "git://github.com/uclouvain/openjpeg.git;branch=master;protocol=https \ - file://0001-Do-not-ask-cmake-to-export-binaries-they-don-t-make-.patch \ - " -SRCREV = "210a8a5690d0da66f02d49420d7176a21ef409dc" -S = "${WORKDIR}/git" - -inherit cmake - -# for multilib -EXTRA_OECMAKE += "-DOPENJPEG_INSTALL_LIB_DIR=${@d.getVar('baselib').replace('/', '')}" - -FILES:${PN} += "${libdir}/openjpeg*" - -BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/pango/pangomm-2.48_2.50.1.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/pango/pangomm-2.48_2.50.1.bb deleted file mode 100644 index 86787a6b..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/pango/pangomm-2.48_2.50.1.bb +++ /dev/null @@ -1,19 +0,0 @@ -SUMMARY = "C++ bindings for the pango library" -SECTION = "libs" -LICENSE = "LGPL-2.1-only & GPL-2.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=d8045f3b8f929c1cb29a1e3fd737b499 \ - file://COPYING.tools;md5=751419260aa954499f7abaabaa882bbe" - -DEPENDS = "mm-common cairomm-1.16 glibmm-2.68 pango" - -GNOMEBN = "pangomm" -inherit gnomebase features_check - -SRC_URI[archive.sha256sum] = "ccc9923413e408c2bff637df663248327d72822f11e394b423e1c5652b7d9214" -REQUIRED_DISTRO_FEATURES = "x11" - -S = "${WORKDIR}/${GNOMEBN}-${PV}" - -FILES:${PN} = "${libdir}/lib*.so.*" -FILES:${PN}-dev += "${libdir}/*/include/ ${libdir}/pangomm-*/" - diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/pango/pangomm-2.48_2.52.0.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/pango/pangomm-2.48_2.52.0.bb new file mode 100644 index 00000000..3b0fbd3e --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/pango/pangomm-2.48_2.52.0.bb @@ -0,0 +1,19 @@ +SUMMARY = "C++ bindings for the pango library" +SECTION = "libs" +LICENSE = "LGPL-2.1-only & GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=d8045f3b8f929c1cb29a1e3fd737b499 \ + file://COPYING.tools;md5=751419260aa954499f7abaabaa882bbe" + +DEPENDS = "mm-common cairomm-1.16 glibmm-2.68 pango" + +GNOMEBN = "pangomm" +inherit gnomebase features_check + +SRC_URI[archive.sha256sum] = "34a134126a6484ff12f774358c36ecc44d0e9df094e1b83796d9774bb7d24947" +REQUIRED_DISTRO_FEATURES = "x11" + +S = "${WORKDIR}/${GNOMEBN}-${PV}" + +FILES:${PN} = "${libdir}/lib*.so.*" +FILES:${PN}-dev += "${libdir}/*/include/ ${libdir}/pangomm-*/" + diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/renderdoc/renderdoc/0001-jpeg-compressor-Reorder-stdio.h-include-location.patch b/sources/meta-openembedded/meta-oe/recipes-graphics/renderdoc/renderdoc/0001-jpeg-compressor-Reorder-stdio.h-include-location.patch new file mode 100644 index 00000000..1c714f84 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/renderdoc/renderdoc/0001-jpeg-compressor-Reorder-stdio.h-include-location.patch @@ -0,0 +1,43 @@ +From 4eb26927eebebfc4df8789ba69f60f3c28b8ba33 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 2 Jul 2024 23:36:23 -0700 +Subject: [PATCH] jpeg-compressor: Reorder stdio.h include location + +Current, location ends up with compile errors with clang and glibc 2.40 +fortified headers + +| /mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux/renderdoc/1.33/recipe-sysroot/usr/include/bits/stdio2.h:128:13: error: use of undeclared identifier '__builtin___vfprintf_chk'; did you mean '__builtin___sprintf_chk'? +| 128 | int __r = __builtin___vfprintf_chk (__stream, __USE_FORTIFY_LEVEL - 1, +| | ^ +| /mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux/renderdoc/1.33/recipe-sysroot/usr/include/bits/stdio2.h:128:39: error: cannot initialize a parameter of type 'char *' with an lvalue of type 'FILE *const __restrict' (aka 'jpge::_IO_FILE *const __restrict') +| 128 | int __r = __builtin___vfprintf_chk (__stream, __USE_FORTIFY_LEVEL - 1, +| | ^~~~~~~~ + +This re-ordering ensures that fortified function prototypes are used correctly. + +Upstream-Status: Submitted [https://github.com/baldurk/renderdoc/pull/3369] +Signed-off-by: Khem Raj +--- + renderdoc/3rdparty/jpeg-compressor/jpge.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/renderdoc/3rdparty/jpeg-compressor/jpge.cpp b/renderdoc/3rdparty/jpeg-compressor/jpge.cpp +index 74d9d1006..d58e41664 100644 +--- a/renderdoc/3rdparty/jpeg-compressor/jpge.cpp ++++ b/renderdoc/3rdparty/jpeg-compressor/jpge.cpp +@@ -10,6 +10,7 @@ + + #include "jpge.h" + ++#include + #include + #include + +@@ -897,7 +898,6 @@ bool jpeg_encoder::process_scanline(const void* pScanline) + } + + // Higher level wrappers/examples (optional). +-#include + + class cfile_stream : public output_stream + { diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/renderdoc/renderdoc_1.27.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/renderdoc/renderdoc_1.27.bb deleted file mode 100644 index 58f22757..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/renderdoc/renderdoc_1.27.bb +++ /dev/null @@ -1,38 +0,0 @@ -SUMMARY = "RenderDoc recipe providing renderdoccmd" -DESCRIPTION = "RenderDoc is a frame-capture based graphics debugger" -HOMEPAGE = "https://github.com/baldurk/renderdoc" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE.md;md5=36d34a46cb71546195d2b0c626a52e5d" - -SRCREV = "35b13a8e8fd2a331854dba6da81a20452e142d6f" -SRC_URI = " \ - git://github.com/baldurk/${BPN}.git;protocol=https;branch=v1.x \ -" -S = "${WORKDIR}/git" - -DEPENDS += "virtual/libx11 virtual/libgl libxcb xcb-util-keysyms" - -RDEPENDS:${PN} = "libxcb xcb-util-keysyms" - -inherit cmake pkgconfig python3native features_check - -REQUIRED_DISTRO_FEATURES = "x11 opengl" - -python __anonymous () { - # only works on glibc systems - if d.getVar('TCLIBC') != "glibc": - raise bb.parse.SkipRecipe("incompatible with %s C library" % d.getVar('TCLIBC')) -} - -COMPATIBLE_HOST = "(x86_64|i.86|arm|aarch64).*-linux" - -EXTRA_OECMAKE += "\ - -DENABLE_QRENDERDOC=OFF \ - -DENABLE_PYRENDERDOC=OFF \ - -DENABLE_RENDERDOCCMD=ON \ - -DCMAKE_BUILD_TYPE=Release \ - -DHOST_NATIVE_CPP_COMPILER="${BUILD_CXX}" \ -" - -FILES:${PN} += "${libdir}" -FILES:${PN}-dev = "${includedir}" diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/renderdoc/renderdoc_1.33.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/renderdoc/renderdoc_1.33.bb new file mode 100644 index 00000000..833845b5 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/renderdoc/renderdoc_1.33.bb @@ -0,0 +1,39 @@ +SUMMARY = "RenderDoc recipe providing renderdoccmd" +DESCRIPTION = "RenderDoc is a frame-capture based graphics debugger" +HOMEPAGE = "https://github.com/baldurk/renderdoc" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE.md;md5=5536c2b72eeed14bafaf4d2a6c032b87" + +SRCREV = "cae289323847ce0a84a0deca4958183567eee17e" +SRC_URI = " \ + git://github.com/baldurk/${BPN}.git;protocol=https;branch=v1.x \ + file://0001-jpeg-compressor-Reorder-stdio.h-include-location.patch \ +" +S = "${WORKDIR}/git" + +DEPENDS += "virtual/libx11 virtual/libgl libxcb xcb-util-keysyms" + +RDEPENDS:${PN} = "libxcb xcb-util-keysyms" + +inherit cmake pkgconfig python3native features_check + +REQUIRED_DISTRO_FEATURES = "x11 opengl" + +python __anonymous () { + # only works on glibc systems + if d.getVar('TCLIBC') != "glibc": + raise bb.parse.SkipRecipe("incompatible with %s C library" % d.getVar('TCLIBC')) +} + +COMPATIBLE_HOST = "(x86_64|i.86|arm|aarch64).*-linux" + +EXTRA_OECMAKE += "\ + -DENABLE_QRENDERDOC=OFF \ + -DENABLE_PYRENDERDOC=OFF \ + -DENABLE_RENDERDOCCMD=ON \ + -DCMAKE_BUILD_TYPE=Release \ + -DHOST_NATIVE_CPP_COMPILER="${BUILD_CXX}" \ +" + +FILES:${PN} += "${libdir}" +FILES:${PN}-dev = "${includedir}" diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/stalonetray/stalonetray_0.8.3.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/stalonetray/stalonetray_0.8.3.bb index 161650f7..f2ffee64 100644 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/stalonetray/stalonetray_0.8.3.bb +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/stalonetray/stalonetray_0.8.3.bb @@ -11,6 +11,8 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2" SRC_URI[md5sum] = "ae95dbbacc2620e032acea8abab8c9ef" SRC_URI[sha256sum] = "36548a588b2d466913423245dda6ffb6313132cd0cec635a117d37b3dab5fd4c" +UPSTREAM_CHECK_REGEX = "files/v(?P\d+(\.\d+)+)" + inherit autotools features_check REQUIRED_DISTRO_FEATURES = "x11" diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/tesseract/tesseract_5.3.4.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/tesseract/tesseract_5.3.4.bb deleted file mode 100644 index b32bf345..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/tesseract/tesseract_5.3.4.bb +++ /dev/null @@ -1,21 +0,0 @@ -SUMMARY = "A commercial quality OCR engine " -HOMEPAGE = "https://github.com/tesseract-ocr/tesseract" -BUGTRACKER = "https://github.com/tesseract-ocr/tesseract/issues" - -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" - -SRCREV = "8ee020e14cf5be4e3f0e9beb09b6b050a1871854" -SRC_URI = "git://github.com/${BPN}-ocr/${BPN}.git;branch=main;protocol=https" - -S = "${WORKDIR}/git" - -DEPENDS = "leptonica" - -EXTRA_OECONF += "LIBLEPT_HEADERSDIR=${STAGING_INCDIR}/leptonica" - -inherit autotools pkgconfig - -FILES:${PN} += "${datadir}/tessdata" - -RRECOMMENDS:${PN} += "tesseract-lang-eng" diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/tesseract/tesseract_5.4.1.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/tesseract/tesseract_5.4.1.bb new file mode 100644 index 00000000..1177e34c --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/tesseract/tesseract_5.4.1.bb @@ -0,0 +1,21 @@ +SUMMARY = "A commercial quality OCR engine " +HOMEPAGE = "https://github.com/tesseract-ocr/tesseract" +BUGTRACKER = "https://github.com/tesseract-ocr/tesseract/issues" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" + +SRCREV = "b5f279ec7582dc57f6464557ed938558791f200d" +SRC_URI = "git://github.com/${BPN}-ocr/${BPN}.git;branch=main;protocol=https" + +S = "${WORKDIR}/git" + +DEPENDS = "leptonica" + +EXTRA_OECONF += "LIBLEPT_HEADERSDIR=${STAGING_INCDIR}/leptonica" + +inherit autotools pkgconfig + +FILES:${PN} += "${datadir}/tessdata" + +RRECOMMENDS:${PN} += "tesseract-lang-eng" diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/tigervnc/tigervnc_1.11.0.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/tigervnc/tigervnc_1.11.0.bb index 5cde7c9f..668ca79d 100644 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/tigervnc/tigervnc_1.11.0.bb +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/tigervnc/tigervnc_1.11.0.bb @@ -27,7 +27,7 @@ SRC_URI = "git://github.com/TigerVNC/tigervnc.git;branch=1.11-branch;protocol=ht XORG_PN ?= "xorg-server" XORG_PV ?= "1.20.6" SRC_URI += "${XORG_MIRROR}/individual/xserver/${XORG_PN}-${XORG_PV}.tar.bz2;name=xorg" -XORG_S = "${WORKDIR}/${XORG_PN}-${XORG_PV}" +XORG_S = "${UNPACKDIR}/${XORG_PN}-${XORG_PV}" SRC_URI[xorg.md5sum] = "a98170084f2c8fed480d2ff601f8a14b" SRC_URI[xorg.sha256sum] = "6316146304e6e8a36d5904987ae2917b5d5b195dc9fc63d67f7aca137e5a51d1" diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/tslib/tslib_1.22.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/tslib/tslib_1.22.bb deleted file mode 100644 index 01da03a4..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/tslib/tslib_1.22.bb +++ /dev/null @@ -1,84 +0,0 @@ -SUMMARY = "An abstraction layer for touchscreen panel events" -DESCRIPTION = "Tslib is an abstraction layer for touchscreen panel \ -events, as well as a filter stack for the manipulation of those events. \ -Tslib is generally used on embedded devices to provide a common user \ -space interface to touchscreen functionality." -HOMEPAGE = "http://tslib.org/" - -SECTION = "base" -LICENSE = "LGPL-2.0-or-later & GPL-2.0-or-later" -LIC_FILES_CHKSUM = "\ - file://COPYING;md5=fc178bcd425090939a8b634d1d6a9594 \ - file://tests/COPYING;md5=a23a74b3f4caf9616230789d94217acb \ -" - -SRC_URI = "https://github.com/kergoth/tslib/releases/download/${PV}/tslib-${PV}.tar.xz;downloadfilename=tslib-${PV}.tar.xz \ - file://ts.conf \ - file://tslib.sh \ - " -SRC_URI[sha256sum] = "aaf0aed410a268d7b51385d07fe4d9d64312038e87c447ec8a24c8db0a15617a" - -UPSTREAM_CHECK_URI = "https://github.com/kergoth/tslib/releases" - -inherit autotools pkgconfig - -PACKAGECONFIG ??= "debounce dejitter evthres iir linear median pthres skip lowpass invert variance input touchkit waveshare" -PACKAGECONFIG[debounce] = "--enable-debounce,--disable-debounce" -PACKAGECONFIG[dejitter] = "--enable-dejitter,--disable-dejitter" -PACKAGECONFIG[evthres] = "--enable-evthres,--disable-evthres" -PACKAGECONFIG[iir] = "--enable-iir,--disable-iir" -PACKAGECONFIG[linear] = "--enable-linear,--disable-linear" -PACKAGECONFIG[median] = "--enable-median,--disable-median" -PACKAGECONFIG[pthres] = "--enable-pthres,--disable-pthres" -PACKAGECONFIG[skip] = "--enable-skip,--disable-skip" -PACKAGECONFIG[lowpass] = "--enable-lowpass,--disable-lowpass" -PACKAGECONFIG[invert] = "--enable-invert,--disable-invert" -PACKAGECONFIG[variance] = "--enable-variance,--disable-variance" -PACKAGECONFIG[input] = "--enable-input,--disable-input" -PACKAGECONFIG[tatung] = "--enable-tatung,--disable-tatung" -PACKAGECONFIG[touchkit] = "--enable-touchkit,--disable-touchkit" -PACKAGECONFIG[waveshare] = "--enable-waveshare,--disable-waveshare" -PACKAGECONFIG[ucb1x00] = "--enable-ucb1x00,--disable-ucb1x00" -PACKAGECONFIG[mk712] = "--enable-mk712,--disable-mk712" -PACKAGECONFIG[h3600] = "--enable-h3600,--disable-h3600" -PACKAGECONFIG[dmc] = "--enable-dmc,--disable-dmc" -PACKAGECONFIG[linear-h2200] = "--enable-linear-h2200,--disable-linear-h2200" -PACKAGECONFIG[corgi] = "--enable-corgi,--disable-corgi" -PACKAGECONFIG[collie] = "--enable-collie,--disable-collie" -PACKAGECONFIG[arctic2] = "--enable-arctic2,--disable-arctic2" -PACKAGECONFIG[dmc_dus3000] = "--enable-dmc_dus3000,--disable-dmc_dus3000" -PACKAGECONFIG[cy8mrln-palmpre] = "--enable-cy8mrln-palmpre,--disable-cy8mrln-palmpre" -PACKAGECONFIG[galax] = "--enable-galax,--disable-galax" -PACKAGECONFIG[one-wire-ts-input] = "--enable-one-wire-ts-input,--disable-one-wire-ts-input" -PACKAGECONFIG[debug] = "--enable-debug,--disable-debug" - -do_install:prepend() { - install -m 0644 ${WORKDIR}/ts.conf ${S}/etc/ts.conf -} - -do_install:append() { - install -d ${D}${sysconfdir}/profile.d/ - install -m 0755 ${WORKDIR}/tslib.sh ${D}${sysconfdir}/profile.d/ -} - -RPROVIDES:tslib-conf = "libts-0.0-conf" - -PACKAGES =+ "tslib-conf tslib-tests tslib-calibrate tslib-uinput" -DEBIAN_NOAUTONAME:tslib-conf = "1" -DEBIAN_NOAUTONAME:tslib-tests = "1" -DEBIAN_NOAUTONAME:tslib-calibrate = "1" -DEBIAN_NOAUTONAME:tslib-uinput = "1" - -RDEPENDS:${PN} = "tslib-conf" -RRECOMMENDS:${PN} = "pointercal" - -FILES:${PN}-dev += "${libdir}/ts/*.la" -FILES:tslib-conf = "${sysconfdir}/ts.conf ${sysconfdir}/profile.d/tslib.sh ${datadir}/tslib" -FILES:${PN} = "${libdir}/*.so.* ${libdir}/ts/*.so*" -FILES:tslib-calibrate += "${bindir}/ts_calibrate" -FILES:tslib-uinput += "${bindir}/ts_uinput" - -FILES:tslib-tests = "${bindir}/ts_harvest ${bindir}/ts_print ${bindir}/ts_print_raw ${bindir}/ts_print_mt \ - ${bindir}/ts_test ${bindir}/ts_test_mt ${bindir}/ts_verify ${bindir}/ts_finddev ${bindir}/ts_conf" - -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/tslib/tslib_1.23.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/tslib/tslib_1.23.bb new file mode 100644 index 00000000..299aa2a2 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/tslib/tslib_1.23.bb @@ -0,0 +1,84 @@ +SUMMARY = "An abstraction layer for touchscreen panel events" +DESCRIPTION = "Tslib is an abstraction layer for touchscreen panel \ +events, as well as a filter stack for the manipulation of those events. \ +Tslib is generally used on embedded devices to provide a common user \ +space interface to touchscreen functionality." +HOMEPAGE = "http://tslib.org/" + +SECTION = "base" +LICENSE = "LGPL-2.0-or-later & GPL-2.0-or-later" +LIC_FILES_CHKSUM = "\ + file://COPYING;md5=fc178bcd425090939a8b634d1d6a9594 \ + file://tests/COPYING;md5=a23a74b3f4caf9616230789d94217acb \ +" + +SRC_URI = "https://github.com/kergoth/tslib/releases/download/${PV}/tslib-${PV}.tar.xz;downloadfilename=tslib-${PV}.tar.xz \ + file://ts.conf \ + file://tslib.sh \ + " +SRC_URI[sha256sum] = "9b489a54d48006201f2fe955a88c3f857535ac93b6cf8e5a16c7b166c8991dac" + +UPSTREAM_CHECK_URI = "https://github.com/kergoth/tslib/releases" + +inherit autotools pkgconfig + +PACKAGECONFIG ??= "debounce dejitter evthres iir linear median pthres skip lowpass invert variance input touchkit waveshare" +PACKAGECONFIG[debounce] = "--enable-debounce,--disable-debounce" +PACKAGECONFIG[dejitter] = "--enable-dejitter,--disable-dejitter" +PACKAGECONFIG[evthres] = "--enable-evthres,--disable-evthres" +PACKAGECONFIG[iir] = "--enable-iir,--disable-iir" +PACKAGECONFIG[linear] = "--enable-linear,--disable-linear" +PACKAGECONFIG[median] = "--enable-median,--disable-median" +PACKAGECONFIG[pthres] = "--enable-pthres,--disable-pthres" +PACKAGECONFIG[skip] = "--enable-skip,--disable-skip" +PACKAGECONFIG[lowpass] = "--enable-lowpass,--disable-lowpass" +PACKAGECONFIG[invert] = "--enable-invert,--disable-invert" +PACKAGECONFIG[variance] = "--enable-variance,--disable-variance" +PACKAGECONFIG[input] = "--enable-input,--disable-input" +PACKAGECONFIG[tatung] = "--enable-tatung,--disable-tatung" +PACKAGECONFIG[touchkit] = "--enable-touchkit,--disable-touchkit" +PACKAGECONFIG[waveshare] = "--enable-waveshare,--disable-waveshare" +PACKAGECONFIG[ucb1x00] = "--enable-ucb1x00,--disable-ucb1x00" +PACKAGECONFIG[mk712] = "--enable-mk712,--disable-mk712" +PACKAGECONFIG[h3600] = "--enable-h3600,--disable-h3600" +PACKAGECONFIG[dmc] = "--enable-dmc,--disable-dmc" +PACKAGECONFIG[linear-h2200] = "--enable-linear-h2200,--disable-linear-h2200" +PACKAGECONFIG[corgi] = "--enable-corgi,--disable-corgi" +PACKAGECONFIG[collie] = "--enable-collie,--disable-collie" +PACKAGECONFIG[arctic2] = "--enable-arctic2,--disable-arctic2" +PACKAGECONFIG[dmc_dus3000] = "--enable-dmc_dus3000,--disable-dmc_dus3000" +PACKAGECONFIG[cy8mrln-palmpre] = "--enable-cy8mrln-palmpre,--disable-cy8mrln-palmpre" +PACKAGECONFIG[galax] = "--enable-galax,--disable-galax" +PACKAGECONFIG[one-wire-ts-input] = "--enable-one-wire-ts-input,--disable-one-wire-ts-input" +PACKAGECONFIG[debug] = "--enable-debug,--disable-debug" + +do_install:prepend() { + install -m 0644 ${UNPACKDIR}/ts.conf ${S}/etc/ts.conf +} + +do_install:append() { + install -d ${D}${sysconfdir}/profile.d/ + install -m 0755 ${UNPACKDIR}/tslib.sh ${D}${sysconfdir}/profile.d/ +} + +RPROVIDES:tslib-conf = "libts-0.0-conf" + +PACKAGES =+ "tslib-conf tslib-tests tslib-calibrate tslib-uinput" +DEBIAN_NOAUTONAME:tslib-conf = "1" +DEBIAN_NOAUTONAME:tslib-tests = "1" +DEBIAN_NOAUTONAME:tslib-calibrate = "1" +DEBIAN_NOAUTONAME:tslib-uinput = "1" + +RDEPENDS:${PN} = "tslib-conf" +RRECOMMENDS:${PN} = "pointercal" + +FILES:${PN}-dev += "${libdir}/ts/*.la" +FILES:tslib-conf = "${sysconfdir}/ts.conf ${sysconfdir}/profile.d/tslib.sh ${datadir}/tslib" +FILES:${PN} = "${libdir}/*.so.* ${libdir}/ts/*.so*" +FILES:tslib-calibrate += "${bindir}/ts_calibrate" +FILES:tslib-uinput += "${bindir}/ts_uinput" + +FILES:tslib-tests = "${bindir}/ts_harvest ${bindir}/ts_print ${bindir}/ts_print_raw ${bindir}/ts_print_mt \ + ${bindir}/ts_test ${bindir}/ts_test_mt ${bindir}/ts_verify ${bindir}/ts_finddev ${bindir}/ts_conf" + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/source-code-pro-fonts_2.030_1.050.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/source-code-pro-fonts_2.030_1.050.bb index 3402d0d4..15449b21 100644 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/source-code-pro-fonts_2.030_1.050.bb +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/source-code-pro-fonts_2.030_1.050.bb @@ -14,9 +14,12 @@ SRC_URI = " \ SRC_URI[sha256sum] = "da2ac159497d31b0c6d9daa8fc390fb8252e75b4a9805ace6a2c9cccaed4932e" S = "${WORKDIR}/source-code-pro-2.030R-ro-1.050R-it" +UPSTREAM_CHECK_URI = "https://github.com/adobe-fonts/source-code-pro/tags" +UPSTREAM_CHECK_REGEX = "releases/tag/(?P\d+\.\d+)R" + do_install() { install -d ${D}${sysconfdir}/fonts/conf.d/ - install -m 0644 ${WORKDIR}/44-source-code-pro-fonts-fontconfig.conf ${D}${sysconfdir}/fonts/conf.d/ + install -m 0644 ${UNPACKDIR}/44-source-code-pro-fonts-fontconfig.conf ${D}${sysconfdir}/fonts/conf.d/ install -d ${D}${datadir}/fonts/truetype/ find ./ -name '*.otf' -exec install -m 0644 {} ${D}${datadir}/fonts/truetype/ \; diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/source-han-sans-cn-fonts/44-source-han-sans-cn.conf b/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/source-han-sans-cn-fonts/44-source-han-sans-cn-fonts.conf similarity index 100% rename from sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/source-han-sans-cn-fonts/44-source-han-sans-cn.conf rename to sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/source-han-sans-cn-fonts/44-source-han-sans-cn-fonts.conf diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/source-han-sans-cn-fonts_2.004.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/source-han-sans-cn-fonts_2.004.bb index 391d4655..c46952cc 100644 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/source-han-sans-cn-fonts_2.004.bb +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/source-han-sans-cn-fonts_2.004.bb @@ -1,31 +1,6 @@ -require ttf.inc +require source-han-sans-fonts.inc SUMMARY = "Adobe OpenType Pan-CJK font family for Simplified Chinese" -HOMEPAGE = "https://github.com/adobe-fonts/source-han-sans" -LICENSE = "OFL-1.1" -LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/${LICENSE};md5=fac3a519e5e9eb96316656e0ca4f2b90" +ZIPNAME = "SourceHanSansCN" -inherit allarch fontcache - -# Download tends to break - so - or not? -#EXCLUDE_FROM_WORLD = "1" - -SRC_URI = " \ - https://github.com/adobe-fonts/source-han-sans/releases/download/2.004R/SourceHanSansCN.zip;subdir=${BP} \ - file://44-source-han-sans-cn.conf \ -" SRC_URI[sha256sum] = "6841fc13f1c0d255cfeb33d2a2c68d24bbebd94ae2c070347a2b2b200a1db4d6" - -do_install() { - install -d ${D}${sysconfdir}/fonts/conf.d/ - install -m 0644 ${WORKDIR}/44-source-han-sans-cn.conf ${D}${sysconfdir}/fonts/conf.d/ - - install -d ${D}${datadir}/fonts/truetype/ - find ./ -name '*.otf' -exec install -m 0644 {} ${D}${datadir}/fonts/truetype/ \; -} - -FILES:${PN} = " \ - ${sysconfdir}/fonts \ - ${datadir}/fonts \ -" - diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/source-han-sans-fonts.inc b/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/source-han-sans-fonts.inc new file mode 100644 index 00000000..03ca4c09 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/source-han-sans-fonts.inc @@ -0,0 +1,26 @@ +require ttf.inc + +HOMEPAGE = "https://github.com/adobe-fonts/source-han-sans" +LICENSE = "OFL-1.1" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/${LICENSE};md5=fac3a519e5e9eb96316656e0ca4f2b90" + +inherit allarch fontcache + +SRC_URI = " \ + https://github.com/adobe-fonts/source-han-sans/releases/download/${PV}R/${ZIPNAME}.zip;subdir=${BP};downloadfilename=${BP}.zip \ + file://44-${BPN}.conf \ +" + +do_install() { + install -d ${D}${sysconfdir}/fonts/conf.d/ + install -m 0644 ${UNPACKDIR}/44-${BPN}.conf ${D}${sysconfdir}/fonts/conf.d/ + + install -d ${D}${datadir}/fonts/truetype/ + find ./ -name '*.otf' -exec install -m 0644 {} ${D}${datadir}/fonts/truetype/ \; +} + +FILES:${PN} = " \ + ${sysconfdir}/fonts \ + ${datadir}/fonts \ +" + diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/source-han-sans-jp-fonts/44-source-han-sans-jp.conf b/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/source-han-sans-jp-fonts/44-source-han-sans-jp-fonts.conf similarity index 100% rename from sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/source-han-sans-jp-fonts/44-source-han-sans-jp.conf rename to sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/source-han-sans-jp-fonts/44-source-han-sans-jp-fonts.conf diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/source-han-sans-jp-fonts_2.004.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/source-han-sans-jp-fonts_2.004.bb index f940478a..40128f97 100644 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/source-han-sans-jp-fonts_2.004.bb +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/source-han-sans-jp-fonts_2.004.bb @@ -1,31 +1,6 @@ -require ttf.inc +require source-han-sans-fonts.inc SUMMARY = "Adobe OpenType Pan-CJK font family for Japanese" -HOMEPAGE = "https://github.com/adobe-fonts/source-han-sans" -LICENSE = "OFL-1.1" -LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/${LICENSE};md5=fac3a519e5e9eb96316656e0ca4f2b90" +ZIPNAME = "SourceHanSansJP" -inherit allarch fontcache - -# Download tends to break - so - or not? -#EXCLUDE_FROM_WORLD = "1" - -SRC_URI = " \ - https://github.com/adobe-fonts/source-han-sans/releases/download/2.004R/SourceHanSansJP.zip;subdir=${BP} \ - file://44-source-han-sans-jp.conf \ -" SRC_URI[sha256sum] = "1ae9f62ad620d686c4a049ce25cf54e3afd8fefc954a678c644cf9802750c17e" - -do_install() { - install -d ${D}${sysconfdir}/fonts/conf.d/ - install -m 0644 ${WORKDIR}/44-source-han-sans-jp.conf ${D}${sysconfdir}/fonts/conf.d/ - - install -d ${D}${datadir}/fonts/truetype/ - find ./ -name '*.otf' -exec install -m 0644 {} ${D}${datadir}/fonts/truetype/ \; -} - -FILES:${PN} = " \ - ${sysconfdir}/fonts \ - ${datadir}/fonts \ -" - diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/source-han-sans-kr-fonts/44-source-han-sans-kr.conf b/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/source-han-sans-kr-fonts/44-source-han-sans-kr-fonts.conf similarity index 100% rename from sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/source-han-sans-kr-fonts/44-source-han-sans-kr.conf rename to sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/source-han-sans-kr-fonts/44-source-han-sans-kr-fonts.conf diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/source-han-sans-kr-fonts_2.004.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/source-han-sans-kr-fonts_2.004.bb index f536d1b6..8b32ab82 100644 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/source-han-sans-kr-fonts_2.004.bb +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/source-han-sans-kr-fonts_2.004.bb @@ -1,31 +1,6 @@ -require ttf.inc +require source-han-sans-fonts.inc SUMMARY = "Adobe OpenType Pan-CJK font family for Korean" -HOMEPAGE = "https://github.com/adobe-fonts/source-han-sans" -LICENSE = "OFL-1.1" -LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/${LICENSE};md5=fac3a519e5e9eb96316656e0ca4f2b90" +ZIPNAME = "SourceHanSansKR" -inherit allarch fontcache - -# Download tends to break - so - or not? -#EXCLUDE_FROM_WORLD = "1" - -SRC_URI = " \ - https://github.com/adobe-fonts/source-han-sans/releases/download/2.004R/SourceHanSansKR.zip;subdir=${BP} \ - file://44-source-han-sans-kr.conf \ -" SRC_URI[sha256sum] = "02fe28a48c6381c49d61c27a1b173c77f0e6f2b9f2b68e79f076f10a6a8f4bfe" - -do_install() { - install -d ${D}${sysconfdir}/fonts/conf.d/ - install -m 0644 ${WORKDIR}/44-source-han-sans-kr.conf ${D}${sysconfdir}/fonts/conf.d/ - - install -d ${D}${datadir}/fonts/truetype/ - find ./ -name '*.otf' -exec install -m 0644 {} ${D}${datadir}/fonts/truetype/ \; -} - -FILES:${PN} = " \ - ${sysconfdir}/fonts \ - ${datadir}/fonts \ -" - diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/source-han-sans-tw-fonts/44-source-han-sans-tw.conf b/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/source-han-sans-tw-fonts/44-source-han-sans-tw-fonts.conf similarity index 100% rename from sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/source-han-sans-tw-fonts/44-source-han-sans-tw.conf rename to sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/source-han-sans-tw-fonts/44-source-han-sans-tw-fonts.conf diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/source-han-sans-tw-fonts_2.004.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/source-han-sans-tw-fonts_2.004.bb index 0a4aff5e..b841660e 100644 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/source-han-sans-tw-fonts_2.004.bb +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/source-han-sans-tw-fonts_2.004.bb @@ -1,31 +1,6 @@ -require ttf.inc +require source-han-sans-fonts.inc SUMMARY = "Adobe OpenType Pan-CJK font family for Traditional Chinese" -HOMEPAGE = "https://github.com/adobe-fonts/source-han-sans" -LICENSE = "OFL-1.1" -LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/${LICENSE};md5=fac3a519e5e9eb96316656e0ca4f2b90" +ZIPNAME = "SourceHanSansTW" -inherit allarch fontcache - -# Download tends to break - so - or not? -#EXCLUDE_FROM_WORLD = "1" - -SRC_URI = " \ - https://github.com/adobe-fonts/source-han-sans/releases/download/2.004R/SourceHanSansTW.zip;subdir=${BP} \ - file://44-source-han-sans-tw.conf \ -" SRC_URI[sha256sum] = "11d78c8fbc1a4bb04a453cdd65c99db8d41ec5cd6ba6d68c8638e6ba170de806" - -do_install() { - install -d ${D}${sysconfdir}/fonts/conf.d/ - install -m 0644 ${WORKDIR}/44-source-han-sans-tw.conf ${D}${sysconfdir}/fonts/conf.d/ - - install -d ${D}${datadir}/fonts/truetype/ - find ./ -name '*.otf' -exec install -m 0644 {} ${D}${datadir}/fonts/truetype/ \; -} - -FILES:${PN} = " \ - ${sysconfdir}/fonts \ - ${datadir}/fonts \ -" - diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-abyssinica_2.100.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-abyssinica_2.100.bb deleted file mode 100644 index bce37a2e..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-abyssinica_2.100.bb +++ /dev/null @@ -1,15 +0,0 @@ -require ttf.inc - -SUMMARY = "Ethiopia and Eritrea (Amharic) font - TTF Edition" -HOMEPAGE = "http://software.sil.org/abyssinica/" -LICENSE = "OFL-1.1" -LIC_FILES_CHKSUM = "file://OFL.txt;md5=fd664aaab50445c3c1c97544554a6bda" - -SRCNAME = "AbyssinicaSIL" -SRC_URI = "http://software.sil.org/downloads/r/abyssinica/${SRCNAME}-${PV}.zip" -S = "${WORKDIR}/${SRCNAME}-${PV}" - -SRC_URI[sha256sum] = "1a1fc8e82f0c0f2e824f42bff05c1f4a0356330a89dc7ba798c1a20bc3e333e0" - -FONT_PACKAGES = "${PN}" -FILES:${PN} = "${datadir}" diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-abyssinica_2.201.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-abyssinica_2.201.bb new file mode 100644 index 00000000..1253cf88 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-abyssinica_2.201.bb @@ -0,0 +1,17 @@ +require ttf.inc + +SUMMARY = "Ethiopia and Eritrea (Amharic) font - TTF Edition" +HOMEPAGE = "http://software.sil.org/abyssinica/" +LICENSE = "OFL-1.1" +LIC_FILES_CHKSUM = "file://OFL.txt;md5=347eaa34fdf555aaf6b2144a5ccca45b" + +SRCNAME = "AbyssinicaSIL" +SRC_URI = "http://software.sil.org/downloads/r/abyssinica/${SRCNAME}-${PV}.zip" +S = "${WORKDIR}/${SRCNAME}-${PV}" + +UPSTREAM_CHECK_URI = "https://software.sil.org/abyssinica/download/" + +SRC_URI[sha256sum] = "961259a1d9ace083f737eb1e55cec40c9a56f4855866d7474bf212d2a4366ab8" + +FONT_PACKAGES = "${PN}" +FILES:${PN} = "${datadir}" diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-dejavu_2.37.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-dejavu_2.37.bb index 43a387b8..54aeb318 100644 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-dejavu_2.37.bb +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-dejavu_2.37.bb @@ -23,7 +23,7 @@ UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/dejavu/files/dejavu/" do_install:append () { install -d ${D}${sysconfdir}/fonts/conf.d/ - install -m 0644 ${WORKDIR}/30-dejavu-aliases.conf ${D}${sysconfdir}/fonts/conf.d/ + install -m 0644 ${UNPACKDIR}/30-dejavu-aliases.conf ${D}${sysconfdir}/fonts/conf.d/ } PACKAGES = "\ diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-google-fira.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-google-fira.bb index d6186074..c142f1dd 100644 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-google-fira.bb +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-google-fira.bb @@ -23,7 +23,8 @@ SRC_URI = "git://github.com/google/fonts.git;protocol=https;branch=main;subpath= git://github.com/google/fonts.git;protocol=https;branch=main;subpath=ofl/firasanscondensed;name=firasanscondensed \ git://github.com/google/fonts.git;protocol=https;branch=main;subpath=ofl/firasansextracondensed;name=firasansextracondensed" -S = "${WORKDIR}" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" do_install:append() { install -d ${D}${datadir}/fonts/truetype/ diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-inconsolata_20100526.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-inconsolata_20100526.bb index 2ae1d619..43b4614f 100644 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-inconsolata_20100526.bb +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-inconsolata_20100526.bb @@ -3,23 +3,24 @@ require ttf.inc SUMMARY = "Inconsolata font - TTF Version" HOMEPAGE = "http://www.levien.com/type/myfonts/inconsolata.html" LICENSE = "OFL-1.1" -LIC_FILES_CHKSUM = "file://../OFL.txt;md5=969851e3a70122069a4d9ee61dd5a2ed" +LIC_FILES_CHKSUM = "file://${UNPACKDIR}/OFL.txt;md5=969851e3a70122069a4d9ee61dd5a2ed" SRC_URI = "http://levien.com/type/myfonts/Inconsolata.otf \ file://OFL.txt" -S = "${WORKDIR}/ttf-inconsolata-${PV}" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" FILES:${PN} = "${datadir}/fonts/truetype/Inconsolata.ttf \ ${datadir}/doc/ttf-inconsolata/*" do_configure() { - cp -fr ${WORKDIR}/Inconsolata.otf ${S}/Inconsolata.ttf + cp -fr ${UNPACKDIR}/Inconsolata.otf ${S}/Inconsolata.ttf } do_install:append() { install -d ${D}${datadir}/doc/ttf-inconsolata/ - install -m 0644 ${WORKDIR}/OFL.txt ${D}${datadir}/doc/ttf-inconsolata/ + install -m 0644 ${UNPACKDIR}/OFL.txt ${D}${datadir}/doc/ttf-inconsolata/ } SRC_URI[md5sum] = "0fbe014c1f0fb5e3c71140ff0dc63edf" diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-liberation-sans-narrow_1.07.4.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-liberation-sans-narrow_1.07.4.bb index f386d6ec..a0fb7b6a 100644 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-liberation-sans-narrow_1.07.4.bb +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-liberation-sans-narrow_1.07.4.bb @@ -22,7 +22,7 @@ do_install:append () { install -d ${D}${datadir}/fonts/TTF/ install -d ${D}${sysconfdir}/fonts/conf.d/ install -m 0644 LiberationSansNarrow*.ttf ${D}${datadir}/fonts/TTF/ - install -D -m 0644 ${WORKDIR}/30-0-liberation-sans-narrow.conf ${D}${sysconfdir}/conf.avail/30-${PN}-sans.conf + install -D -m 0644 ${UNPACKDIR}/30-0-liberation-sans-narrow.conf ${D}${sysconfdir}/conf.avail/30-${PN}-sans.conf install -D -m 0644 ${S}/License.txt ${D}${datadir}/licenses/${PN}/LICENSE # normal liberation fonts come from ttf-liberation recipe so delete here rm -rf ${D}${datadir}/fonts/truetype diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-lklug_0.6-14.20090803cvs.fc24.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-lklug_0.6-14.20090803cvs.fc24.bb index 39516473..65d0f0bb 100644 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-lklug_0.6-14.20090803cvs.fc24.bb +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-lklug_0.6-14.20090803cvs.fc24.bb @@ -10,7 +10,8 @@ SRC_URI[sha256sum] = "de5750f7048973f851961050f76b8b58e9bda400d5007c3078d9317fbe DEPENDS = "fontforge-native" -S = "${WORKDIR}" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" FONT_PACKAGES = "${PN}" FILES:${PN} = "${datadir}" diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-pt-sans_1.1.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-pt-sans_1.1.bb index e9aa5721..fce76418 100644 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-pt-sans_1.1.bb +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-pt-sans_1.1.bb @@ -5,7 +5,7 @@ HOMEPAGE = "http://www.paratype.com/public/" SECTION = "x11/fonts" LICENSE = "ParaTypeFFL-1.3" -LIC_FILES_CHKSUM = "file://../PT%20Free%20Font%20License_eng.txt;md5=d720f3a281ed81c3f4cfc465e11b1d0d" +LIC_FILES_CHKSUM = "file://${UNPACKDIR}/PT%20Free%20Font%20License_eng.txt;md5=d720f3a281ed81c3f4cfc465e11b1d0d" inherit allarch fontcache @@ -16,9 +16,10 @@ SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/paratype-pt-sans-fonts/PTSans SRC_URI[md5sum] = "c3f5a0e20a75cf628387510a720924a7" SRC_URI[sha256sum] = "0164f824e03c32c99e8a225853ec168893a04a09ade132e93a674e85ae033b2e" +S = "${UNPACKDIR}" + do_install () { install -d ${D}${datadir}/fonts/X11/TTF/ - cd .. for i in *.ttf; do install -m 0644 $i ${D}${prefix}/share/fonts/X11/TTF/${i} done diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-roboto_2.138.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-roboto_2.138.bb index 1870c78f..3752ec39 100644 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-roboto_2.138.bb +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-roboto_2.138.bb @@ -9,6 +9,7 @@ SRC_URI = "https://github.com/google/roboto/releases/download/v${PV}/roboto-andr SRC_URI[md5sum] = "3b43a5cb33196ec25e44d5fcb40219e1" SRC_URI[sha256sum] = "c825453253f590cfe62557733e7173f9a421fff103b00f57d33c4ad28ae53baf" -S = "${WORKDIR}" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" FILES:${PN} = "${datadir}/fonts/truetype/*.ttf" diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-tlwg_0.6.1.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-tlwg_0.6.1.bb index 461e3def..0131a62e 100644 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-tlwg_0.6.1.bb +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-tlwg_0.6.1.bb @@ -3,7 +3,7 @@ require ttf.inc SUMMARY = "Thai Linux Working Group Fonts" HOMEPAGE = "http://linux.thai.net/projects/fonts-tlwg" LICENSE = "GPL-2.0-only & TLWG" -LIC_FILES_CHKSUM = "file://../fonts-tlwg-${PV}/COPYING;md5=3d20cd7eadf4afd5460c0adb32e387fd" +LIC_FILES_CHKSUM = "file://${UNPACKDIR}/fonts-tlwg-${PV}/COPYING;md5=3d20cd7eadf4afd5460c0adb32e387fd" SRC_URI = "http://linux.thai.net/pub/ThaiLinux/software/fonts-tlwg/fonts-tlwg-${PV}.tar.xz;name=source \ http://linux.thai.net/pub/ThaiLinux/software/ttf-tlwg/ttf-tlwg-${PV}.tar.xz;name=ttf" diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-ubuntu-font-family_0.83.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-ubuntu-font-family_0.83.bb index d118769c..0c29a20c 100644 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-ubuntu-font-family_0.83.bb +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-ubuntu-font-family_0.83.bb @@ -13,6 +13,9 @@ SRC_URI = "https://assets.ubuntu.com/v1/${SHA1SUM}-ubuntu-font-family-${PV}.zip" SRC_URI[md5sum] = "c5a5059d6856b4ddf79d824dcaf5ad32" SRC_URI[sha256sum] = "61a2b342526fd552f19fef438bb9211a8212de19ad96e32a1209c039f1d68ecf" +UPSTREAM_CHECK_URI = "https://repology.org/project/fonts:ubuntu/packages" +UPSTREAM_CHECK_REGEX = "${BPN}-(?P\d+(\.\d+)+)" + S = "${WORKDIR}/ubuntu-font-family-${PV}" PACKAGES = "ttf-ubuntu-mono ttf-ubuntu-sans" diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-wqy-zenhei_0.9.45.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-wqy-zenhei_0.9.45.bb index 21897a75..e2925b6c 100644 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-wqy-zenhei_0.9.45.bb +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-wqy-zenhei_0.9.45.bb @@ -9,6 +9,9 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/wqy/wqy-zenhei-${PV}.tar.gz" SRC_URI[md5sum] = "4c6c3f4e902dd5ee0a121e8c41d040bd" SRC_URI[sha256sum] = "e4b7e306475bf9427d1757578f0e4528930c84c44eaa3f167d4c42f110ee75d6" +UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/wqy/files/wqy-zenhei/" +UPSTREAM_CHECK_REGEX = "wqy-zenhei/(?P\d+(\.\d+)+)" + S = "${WORKDIR}/wqy-zenhei" do_install:append () { diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/vdpau/vdpauinfo_1.5.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/vdpau/vdpauinfo_1.5.bb new file mode 100644 index 00000000..3f44e537 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/vdpau/vdpauinfo_1.5.bb @@ -0,0 +1,20 @@ +DESCRIPTION = "Tool to query the capabilities of a VDPAU implementation" +HOMEPAGE = "https://gitlab.freedesktop.org/vdpau/vdpauinfo" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=5b6e110c362fe46168199f3490e52c3c" + +DEPENDS = "libvdpau" + +# libvdpau is available only with x11 +inherit features_check +REQUIRED_DISTRO_FEATURES = "x11" + +RDEPENDS:${PN} = "libvdpau" + +SRCREV = "d3c5bd63bf8878d59b22d618d2bb5116db392d28" +SRC_URI = "git://anongit.freedesktop.org/vdpau/vdpauinfo;branch=master" + +S = "${WORKDIR}/git" + +inherit autotools pkgconfig diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/vk-gl-cts/files/0001-cmake-Define-WAYLAND_SCANNER-and-WAYLAND_PROTOCOLS_D.patch b/sources/meta-openembedded/meta-oe/recipes-graphics/vk-gl-cts/files/0001-cmake-Define-WAYLAND_SCANNER-and-WAYLAND_PROTOCOLS_D.patch index f659e360..9eef9a70 100644 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/vk-gl-cts/files/0001-cmake-Define-WAYLAND_SCANNER-and-WAYLAND_PROTOCOLS_D.patch +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/vk-gl-cts/files/0001-cmake-Define-WAYLAND_SCANNER-and-WAYLAND_PROTOCOLS_D.patch @@ -15,15 +15,15 @@ Signed-off-by: Khem Raj --- a/framework/platform/CMakeLists.txt +++ b/framework/platform/CMakeLists.txt -@@ -73,8 +73,9 @@ if (NOT DEFINED TCUTIL_PLATFORM_SRCS) - add_definitions(-DDEQP_SUPPORT_WAYLAND=1) - include_directories(lnx/wayland) - -- pkg_get_variable(WAYLAND_PROTOCOLS_DIR wayland-protocols pkgdatadir) +@@ -83,8 +83,9 @@ if (NOT DEFINED TCUTIL_PLATFORM_SRCS) + configure_file(${WAYLAND_XDG_SHELL_SRC_DIR}/xdg-shell.c ${DEQP_XDG_SHELL_GEN_OUTPUTS_DIR}/xdg-shell.c COPYONLY) + configure_file(${WAYLAND_XDG_SHELL_SRC_DIR}/xdg-shell.h ${DEQP_XDG_SHELL_GEN_OUTPUTS_DIR}/xdg-shell.h COPYONLY) + else () +- pkg_get_variable(WAYLAND_PROTOCOLS_DIR wayland-protocols pkgdatadir) - -+ if (NOT WAYLAND_PROTOCOLS_DIR) -+ pkg_get_variable(WAYLAND_PROTOCOLS_DIR wayland-protocols pkgdatadir) -+ endif() - if (NOT WAYLAND_SCANNER) - pkg_get_variable(WAYLAND_SCANNER wayland-scanner wayland_scanner) - endif() ++ if (NOT WAYLAND_PROTOCOL_DIR) ++ pkg_get_variable(WAYLAND_PROTOCOLS_DIR wayland-protocols pkgdatadir) ++ endif() + if (NOT WAYLAND_SCANNER) + pkg_get_variable(WAYLAND_SCANNER wayland-scanner wayland_scanner) + endif() diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/vk-gl-cts/files/0001-use-library-sonames-for-linking.patch b/sources/meta-openembedded/meta-oe/recipes-graphics/vk-gl-cts/files/0001-use-library-sonames-for-linking.patch new file mode 100644 index 00000000..774b7aef --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/vk-gl-cts/files/0001-use-library-sonames-for-linking.patch @@ -0,0 +1,123 @@ +From acd25c4b8d5b7e420a7a89bdfd6551c70de828b3 Mon Sep 17 00:00:00 2001 +From: Trevor Woerner +Date: Thu, 23 Sep 2021 19:36:43 -0400 +Subject: [PATCH] use library sonames for linking + +The recommended "best practices" for applications is to link to library +sonames (e.g. libGL.so.1) instead of library names (e.g. libGL.so). This +ensures that applications don't try to use libraries if an incompatible ABI +change occurs. + +Upstream-Status: Denied [https://github.com/KhronosGroup/VK-GL-CTS/pull/288] +Signed-off-by: Trevor Woerner +--- + framework/egl/egluGLContextFactory.cpp | 4 ++-- + framework/egl/wrapper/eglwLibrary.cpp | 2 +- + framework/platform/android/tcuAndroidPlatform.cpp | 2 +- + framework/platform/lnx/X11/tcuLnxX11EglDisplayFactory.cpp | 2 +- + .../platform/lnx/wayland/tcuLnxWaylandEglDisplayFactory.cpp | 2 +- + framework/platform/surfaceless/tcuSurfacelessPlatform.cpp | 6 +++--- + 6 files changed, 9 insertions(+), 9 deletions(-) + +--- a/framework/egl/egluGLContextFactory.cpp ++++ b/framework/egl/egluGLContextFactory.cpp +@@ -63,7 +63,7 @@ using std::vector; + #if (DE_OS == DE_OS_WIN32) + #define DEQP_GLES2_LIBRARY_PATH "libGLESv2.dll" + #else +-#define DEQP_GLES2_LIBRARY_PATH "libGLESv2.so" ++#define DEQP_GLES2_LIBRARY_PATH "libGLESv2.so.2" + #endif + #endif + +@@ -75,7 +75,7 @@ using std::vector; + #if (DE_OS == DE_OS_WIN32) + #define DEQP_OPENGL_LIBRARY_PATH "opengl32.dll" + #else +-#define DEQP_OPENGL_LIBRARY_PATH "libGL.so" ++#define DEQP_OPENGL_LIBRARY_PATH "libGL.so.1" + #endif + #endif + +--- a/framework/egl/wrapper/eglwLibrary.cpp ++++ b/framework/egl/wrapper/eglwLibrary.cpp +@@ -145,7 +145,7 @@ DefaultLibrary::~DefaultLibrary(void) + const char *DefaultLibrary::getLibraryFileName(void) + { + #if (DE_OS == DE_OS_ANDROID) || (DE_OS == DE_OS_UNIX) +- return "libEGL.so"; ++ return "libEGL.so.1"; + #elif (DE_OS == DE_OS_WIN32) + return "libEGL.dll"; + #else +--- a/framework/platform/android/tcuAndroidPlatform.cpp ++++ b/framework/platform/android/tcuAndroidPlatform.cpp +@@ -56,7 +56,7 @@ static const eglu::NativeWindow::Capabil + class NativeDisplay : public eglu::NativeDisplay + { + public: +- NativeDisplay(void) : eglu::NativeDisplay(DISPLAY_CAPABILITIES), m_library("libEGL.so") ++ NativeDisplay(void) : eglu::NativeDisplay(DISPLAY_CAPABILITIES), m_library("libEGL.so.1") + { + } + virtual ~NativeDisplay(void) +@@ -223,7 +223,7 @@ class VulkanLibrary : public vk::Library + { + public: + VulkanLibrary(const char *libraryPath) +- : m_library(libraryPath != DE_NULL ? libraryPath : "libvulkan.so") ++ : m_library(libraryPath != DE_NULL ? libraryPath : "libvulkan.so.1") + , m_driver(m_library) + { + } +--- a/framework/platform/lnx/X11/tcuLnxX11EglDisplayFactory.cpp ++++ b/framework/platform/lnx/X11/tcuLnxX11EglDisplayFactory.cpp +@@ -77,7 +77,7 @@ using tcu::TextureLevel; + class Library : public eglw::DefaultLibrary + { + public: +- Library(void) : eglw::DefaultLibrary("libEGL.so") ++ Library(void) : eglw::DefaultLibrary("libEGL.so.1") + { + } + +--- a/framework/platform/lnx/wayland/tcuLnxWaylandEglDisplayFactory.cpp ++++ b/framework/platform/lnx/wayland/tcuLnxWaylandEglDisplayFactory.cpp +@@ -64,7 +64,7 @@ public: + Display(MovePtr waylandDisplay) + : NativeDisplay(CAPABILITIES, EGL_PLATFORM_WAYLAND_KHR, "EGL_KHR_platform_wayland") + , m_display(waylandDisplay) +- , m_library("libEGL.so") ++ , m_library("libEGL.so.1") + { + } + +--- a/framework/platform/surfaceless/tcuSurfacelessPlatform.cpp ++++ b/framework/platform/surfaceless/tcuSurfacelessPlatform.cpp +@@ -69,7 +69,7 @@ using std::vector; + + // Default library names + #if !defined(DEQP_GLES2_LIBRARY_PATH) +-#define DEQP_GLES2_LIBRARY_PATH "libGLESv2.so" ++#define DEQP_GLES2_LIBRARY_PATH "libGLESv2.so.2" + #endif + + #if !defined(DEQP_GLES3_LIBRARY_PATH) +@@ -77,7 +77,7 @@ using std::vector; + #endif + + #if !defined(DEQP_OPENGL_LIBRARY_PATH) +-#define DEQP_OPENGL_LIBRARY_PATH "libGL.so" ++#define DEQP_OPENGL_LIBRARY_PATH "libGL.so.1" + #endif + + #if !defined(DEQP_VULKAN_LIBRARY_PATH) +@@ -258,7 +258,7 @@ glu::RenderContext *ContextFactory::crea + + EglRenderContext::EglRenderContext(const glu::RenderConfig &config, const tcu::CommandLine &cmdLine, + const glu::RenderContext *sharedContext) +- : m_egl("libEGL.so") ++ : m_egl("libEGL.so.1") + , m_contextType(config.type) + , m_eglDisplay(EGL_NO_DISPLAY) + , m_eglContext(EGL_NO_CONTEXT) diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/vk-gl-cts/files/0001-vulkan-cts-include-missing-cstdint.patch b/sources/meta-openembedded/meta-oe/recipes-graphics/vk-gl-cts/files/0001-vulkan-cts-include-missing-cstdint.patch deleted file mode 100644 index 0dd59713..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/vk-gl-cts/files/0001-vulkan-cts-include-missing-cstdint.patch +++ /dev/null @@ -1,34 +0,0 @@ -From b07f6ecd6ab83b788301a555dc546b9a5c9dd8a2 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Wed, 25 Jan 2023 19:19:34 -0800 -Subject: [PATCH] Include missing - -This error is seen with gcc-13 where include headers are not implicitly -included [1] - -Fixes errors e.g. -error: 'uint32_t' does not name a type - -[1] https://www.gnu.org/software/gcc/gcc-13/porting_to.html - -Upstream-Status: Submitted [https://github.com/KhronosGroup/VK-GL-CTS/pull/378] -Signed-off-by: Khem Raj ---- - framework/common/tcuDefs.hpp | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/framework/common/tcuDefs.hpp b/framework/common/tcuDefs.hpp -index ad3d0736d..6dfac10fb 100644 ---- a/framework/common/tcuDefs.hpp -+++ b/framework/common/tcuDefs.hpp -@@ -26,6 +26,7 @@ - #include "deDefs.hpp" - #include "qpTestLog.h" - -+#include - #include - #include - --- -2.39.1 - diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/vk-gl-cts/files/0001-vulkancts-Include-missing-cstdint.patch b/sources/meta-openembedded/meta-oe/recipes-graphics/vk-gl-cts/files/0001-vulkancts-Include-missing-cstdint.patch deleted file mode 100644 index 40aea8f2..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/vk-gl-cts/files/0001-vulkancts-Include-missing-cstdint.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 1b7646ced0f0b969f818084887885827ed1a4244 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Mon, 31 May 2021 17:31:33 -0700 -Subject: [PATCH] vulkancts: Include missing - -Fixes build with gcc-13 - -../git/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmFloatControlsTests.cpp:2798:102: error: 'uintptr_t' in namespace 'std' does not name a type - 2798 | BufferDataType type = static_cast(reinterpret_cast(expectedOutputs[resultIndex].getUserData())); - | ^~~~~~~~~ - -Upstream-Status: Submitted [https://github.com/KhronosGroup/VK-GL-CTS/pull/378] -Signed-off-by: Khem Raj ---- - .../vulkan/spirv_assembly/vktSpvAsmFloatControlsTests.cpp | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmFloatControlsTests.cpp b/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmFloatControlsTests.cpp -index ab02be1dc..3d3ee4829 100644 ---- a/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmFloatControlsTests.cpp -+++ b/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmFloatControlsTests.cpp -@@ -33,6 +33,7 @@ - #include "deFloat16.h" - #include "vkQueryUtil.hpp" - #include "vkRefUtil.hpp" -+#include - #include - #include - #include --- -2.39.1 - diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/vk-gl-cts/files/fix-clang-private-operator.patch b/sources/meta-openembedded/meta-oe/recipes-graphics/vk-gl-cts/files/fix-clang-private-operator.patch index 4ecc371c..af59dd3e 100644 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/vk-gl-cts/files/fix-clang-private-operator.patch +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/vk-gl-cts/files/fix-clang-private-operator.patch @@ -2,7 +2,7 @@ Upstream-Status: Pending --- a/external/glslang/src/glslang/Include/PoolAlloc.h +++ b/external/glslang/src/glslang/Include/PoolAlloc.h -@@ -240,8 +240,9 @@ protected: +@@ -245,8 +245,9 @@ protected: int numCalls; // just an interesting statistic size_t totalBytes; // just an interesting statistic diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/vk-gl-cts/files/fix-musl.patch b/sources/meta-openembedded/meta-oe/recipes-graphics/vk-gl-cts/files/fix-musl.patch index 58dc1f24..717d4897 100644 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/vk-gl-cts/files/fix-musl.patch +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/vk-gl-cts/files/fix-musl.patch @@ -2,9 +2,9 @@ Upstream-Status: Pending --- a/framework/delibs/dethread/CMakeLists.txt +++ b/framework/delibs/dethread/CMakeLists.txt -@@ -42,6 +42,7 @@ if (DE_OS_IS_UNIX) +@@ -41,6 +41,7 @@ if (DE_OS_IS_UNIX) + if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") add_definitions(-D__BSD_VISIBLE) - add_definitions(-D_XOPEN_SOURCE=600) endif () + add_definitions(-D_XOPEN_SOURCE=600) add_definitions(-D_GNU_SOURCE) diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/vk-gl-cts/files/gen-framework-path.patch b/sources/meta-openembedded/meta-oe/recipes-graphics/vk-gl-cts/files/gen-framework-path.patch deleted file mode 100644 index 8a8d8d2c..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/vk-gl-cts/files/gen-framework-path.patch +++ /dev/null @@ -1,20 +0,0 @@ -Prepend instead of append to the module search path, as this script needs to use -the local module build, not the host module build. - -Upstream-Status: Submitted -Signed-off-by: Ross Burton - -diff --git a/external/vulkancts/scripts/gen_framework.py b/external/vulkancts/scripts/gen_framework.py -index 83c5329ce..10e720910 100755 ---- a/external/vulkancts/scripts/gen_framework.py -+++ b/external/vulkancts/scripts/gen_framework.py -@@ -33 +33 @@ from collections import OrderedDict --sys.path.append(os.path.join(os.path.dirname(__file__), "..", "..", "..", "scripts")) -+sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", "..", "..", "scripts")) -diff --git a/external/vulkancts/scripts/gen_framework_c.py b/external/vulkancts/scripts/gen_framework_c.py -index 95587e642..84b878cb2 100644 ---- a/external/vulkancts/scripts/gen_framework_c.py -+++ b/external/vulkancts/scripts/gen_framework_c.py -@@ -28 +28 @@ import re --sys.path.append(os.path.join(os.path.dirname(__file__), "..", "..", "..", "scripts")) -+sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", "..", "..", "scripts")) diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/vk-gl-cts/khronos-cts.inc b/sources/meta-openembedded/meta-oe/recipes-graphics/vk-gl-cts/khronos-cts.inc index 09f1fbca..0322ef45 100644 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/vk-gl-cts/khronos-cts.inc +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/vk-gl-cts/khronos-cts.inc @@ -3,20 +3,19 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" SRC_URI = "\ git://github.com/KhronosGroup/VK-GL-CTS.git;protocol=https;name=vk-gl-cts;nobranch=1 \ - git://github.com/google/amber;protocol=https;destsuffix=git/external/amber/src;name=amber;branch=main \ - git://github.com/KhronosGroup/glslang.git;protocol=https;destsuffix=git/external/glslang/src;name=glslang;branch=main \ - git://github.com/KhronosGroup/SPIRV-Headers.git;protocol=https;destsuffix=git/external/spirv-headers/src;name=spirv-headers;branch=main \ - git://github.com/KhronosGroup/SPIRV-Tools.git;protocol=https;destsuffix=git/external/spirv-tools/src;name=spirv-tools;branch=main \ - git://github.com/open-source-parsers/jsoncpp.git;protocol=https;destsuffix=git/external/jsoncpp/src;name=jsoncpp;branch=master \ - git://github.com/KhronosGroup/Vulkan-Docs.git;protocol=https;destsuffix=git/external/vulkan-docs/src;name=vulkan-docs;branch=main \ - https://raw.githubusercontent.com/baldurk/renderdoc/v1.1/renderdoc/api/app/renderdoc_app.h;subdir=git/external/renderdoc/src;name=renderdoc \ - git://github.com/Igalia/ESExtractor.git;protocol=https;destsuffix=git/external/ESExtractor/src;name=ESExtractor;branch=main \ - git://github.com/Igalia/vk_video_samples.git;protocol=https;destsuffix=git/external/nvidia-video-samples/src;name=video-parser;nobranch=1 \ + git://github.com/google/amber;protocol=https;destsuffix=git/external/amber/src;name=amber;nobranch=1 \ + git://github.com/KhronosGroup/glslang.git;protocol=https;destsuffix=git/external/glslang/src;name=glslang;nobranch=1 \ + git://github.com/KhronosGroup/SPIRV-Headers.git;protocol=https;destsuffix=git/external/spirv-headers/src;name=spirv-headers;nobranch=1 \ + git://github.com/KhronosGroup/SPIRV-Tools.git;protocol=https;destsuffix=git/external/spirv-tools/src;name=spirv-tools;nobranch=1 \ + git://github.com/open-source-parsers/jsoncpp.git;protocol=https;destsuffix=git/external/jsoncpp/src;name=jsoncpp;nobranch=1 \ + git://github.com/KhronosGroup/Vulkan-Docs.git;protocol=https;destsuffix=git/external/vulkan-docs/src;name=vulkan-docs;nobranch=1 \ + git://github.com/KhronosGroup/Vulkan-ValidationLayers.git;protocol=https;destsuffix=git/external/vulkan-validationlayers/src;name=vulkan-validationlayers;nobranch=1 \ + git://github.com/Igalia/ESExtractor.git;protocol=https;destsuffix=git/external/ESExtractor/src;name=ESExtractor;nobranch=1 \ + git://github.com/Igalia/vk_video_samples.git;protocol=https;destsuffix=git/external/nvidia-video-samples/src;name=video-parser;nobranch=1 \ + https://raw.githubusercontent.com/baldurk/renderdoc/v1.1/renderdoc/api/app/renderdoc_app.h;subdir=git/external/renderdoc/src;name=renderdoc \ " -S = "${WORKDIR}/git" - -SRCREV_FORMAT = "vk-gl-cts_amber_glslang_spirv-headers_spirv-tools_jsoncpp_vulkan-docs" +SRCREV_FORMAT = "vk-gl-cts_amber_glslang_spirv-headers_spirv-tools_jsoncpp_video-parser_vulkan-docs_vulkan-validationlayers" S = "${WORKDIR}/git" @@ -27,7 +26,7 @@ ANY_OF_DISTRO_FEATURES += "opengl vulkan" DEPENDS += "python3-lxml-native libpng zlib virtual/libgles2 qemu-native" SRC_URI += " \ - file://0001-vulkancts-Include-missing-cstdint.patch \ + file://0001-cmake-Define-WAYLAND_SCANNER-and-WAYLAND_PROTOCOLS_D.patch \ file://0001-use-library-sonames-for-linking.patch \ " @@ -39,7 +38,7 @@ DEPENDS:append:libc-musl = " libexecinfo" SRC_URI:append:toolchain-clang = "\ file://fix-clang-private-operator.patch \ " - +EXTRA_OECMAKE += "-DUPDATE_DEPS=OFF" EXTRA_OECMAKE:prepend:class-target = "-DCMAKE_CROSSCOMPILING_EMULATOR=${WORKDIR}/qemuwrapper -DWAYLAND_SCANNER=${STAGING_BINDIR_NATIVE}/wayland-scanner -DWAYLAND_PROTOCOLS_DIR=${STAGING_DATADIR}/wayland-protocols -DAMBER_DISABLE_WERROR=ON" # The best thing for the user to do is to not specify any of the following @@ -81,3 +80,11 @@ python __anonymous() { CTSDIR = "/usr/lib/${BPN}" FILES:${PN} += "${CTSDIR}" + +# does not work with libc++-19 due +# error: implicit instantiation of undefined template 'std::char_traits' +TOOLCHAIN = "gcc" + +# Validation-layers requires access during configure as it fetches validation-headers +# and bunch of other packages from khronos github +do_configure[network] = "1" diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/vk-gl-cts/opengl-es-cts/0001-use-library-sonames-for-linking.patch b/sources/meta-openembedded/meta-oe/recipes-graphics/vk-gl-cts/opengl-es-cts/0001-use-library-sonames-for-linking.patch deleted file mode 100644 index b5a1d331..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/vk-gl-cts/opengl-es-cts/0001-use-library-sonames-for-linking.patch +++ /dev/null @@ -1,114 +0,0 @@ -From acd25c4b8d5b7e420a7a89bdfd6551c70de828b3 Mon Sep 17 00:00:00 2001 -From: Trevor Woerner -Date: Thu, 23 Sep 2021 19:36:43 -0400 -Subject: [PATCH] use library sonames for linking - -The recommended "best practices" for applications is to link to library -sonames (e.g. libGL.so.1) instead of library names (e.g. libGL.so). This -ensures that applications don't try to use libraries if an incompatible ABI -change occurs. - -Upstream-Status: Submitted [https://github.com/KhronosGroup/VK-GL-CTS/pull/288] -Signed-off-by: Trevor Woerner ---- - framework/egl/egluGLContextFactory.cpp | 4 ++-- - framework/egl/wrapper/eglwLibrary.cpp | 2 +- - framework/platform/android/tcuAndroidPlatform.cpp | 2 +- - framework/platform/lnx/X11/tcuLnxX11EglDisplayFactory.cpp | 2 +- - .../platform/lnx/wayland/tcuLnxWaylandEglDisplayFactory.cpp | 2 +- - framework/platform/surfaceless/tcuSurfacelessPlatform.cpp | 6 +++--- - 6 files changed, 9 insertions(+), 9 deletions(-) - ---- a/framework/egl/egluGLContextFactory.cpp -+++ b/framework/egl/egluGLContextFactory.cpp -@@ -63,7 +63,7 @@ using std::vector; - # if (DE_OS == DE_OS_WIN32) - # define DEQP_GLES2_LIBRARY_PATH "libGLESv2.dll" - # else --# define DEQP_GLES2_LIBRARY_PATH "libGLESv2.so" -+# define DEQP_GLES2_LIBRARY_PATH "libGLESv2.so.2" - # endif - #endif - -@@ -75,7 +75,7 @@ using std::vector; - # if (DE_OS == DE_OS_WIN32) - # define DEQP_OPENGL_LIBRARY_PATH "opengl32.dll" - # else --# define DEQP_OPENGL_LIBRARY_PATH "libGL.so" -+# define DEQP_OPENGL_LIBRARY_PATH "libGL.so.1" - # endif - #endif - ---- a/framework/egl/wrapper/eglwLibrary.cpp -+++ b/framework/egl/wrapper/eglwLibrary.cpp -@@ -148,7 +148,7 @@ DefaultLibrary::~DefaultLibrary (void) - const char* DefaultLibrary::getLibraryFileName (void) - { - #if (DE_OS == DE_OS_ANDROID) || (DE_OS == DE_OS_UNIX) -- return "libEGL.so"; -+ return "libEGL.so.1"; - #elif (DE_OS == DE_OS_WIN32) - return "libEGL.dll"; - #else ---- a/framework/platform/android/tcuAndroidPlatform.cpp -+++ b/framework/platform/android/tcuAndroidPlatform.cpp -@@ -57,7 +57,7 @@ static const eglu::NativeWindow::Capabil - class NativeDisplay : public eglu::NativeDisplay - { - public: -- NativeDisplay (void) : eglu::NativeDisplay(DISPLAY_CAPABILITIES), m_library("libEGL.so") {} -+ NativeDisplay (void) : eglu::NativeDisplay(DISPLAY_CAPABILITIES), m_library("libEGL.so.1") {} - virtual ~NativeDisplay (void) {} - - virtual EGLNativeDisplayType getLegacyNative (void) { return EGL_DEFAULT_DISPLAY; } ---- a/framework/platform/lnx/X11/tcuLnxX11EglDisplayFactory.cpp -+++ b/framework/platform/lnx/X11/tcuLnxX11EglDisplayFactory.cpp -@@ -75,7 +75,7 @@ class Library : public eglw::DefaultLibr - { - public: - Library (void) -- : eglw::DefaultLibrary("libEGL.so") -+ : eglw::DefaultLibrary("libEGL.so.1") - { - } - ---- a/framework/platform/lnx/wayland/tcuLnxWaylandEglDisplayFactory.cpp -+++ b/framework/platform/lnx/wayland/tcuLnxWaylandEglDisplayFactory.cpp -@@ -66,7 +66,7 @@ public: - EGL_PLATFORM_WAYLAND_KHR, - "EGL_KHR_platform_wayland") - , m_display (waylandDisplay) -- , m_library ("libEGL.so") {} -+ , m_library ("libEGL.so.1") {} - - ~Display(void) {} - wayland::Display& getWaylandDisplay (void) { return *m_display; } ---- a/framework/platform/surfaceless/tcuSurfacelessPlatform.cpp -+++ b/framework/platform/surfaceless/tcuSurfacelessPlatform.cpp -@@ -69,7 +69,7 @@ using std::vector; - - // Default library names - #if !defined(DEQP_GLES2_LIBRARY_PATH) --# define DEQP_GLES2_LIBRARY_PATH "libGLESv2.so" -+# define DEQP_GLES2_LIBRARY_PATH "libGLESv2.so.2" - #endif - - #if !defined(DEQP_GLES3_LIBRARY_PATH) -@@ -77,7 +77,7 @@ using std::vector; - #endif - - #if !defined(DEQP_OPENGL_LIBRARY_PATH) --# define DEQP_OPENGL_LIBRARY_PATH "libGL.so" -+# define DEQP_OPENGL_LIBRARY_PATH "libGL.so.1" - #endif - - #if !defined(DEQP_VULKAN_LIBRARY_PATH) -@@ -234,7 +234,7 @@ glu::RenderContext* ContextFactory::crea - } - - EglRenderContext::EglRenderContext(const glu::RenderConfig& config, const tcu::CommandLine& cmdLine) -- : m_egl("libEGL.so") -+ : m_egl("libEGL.so.1") - , m_contextType(config.type) - , m_eglDisplay(EGL_NO_DISPLAY) - , m_eglContext(EGL_NO_CONTEXT) diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/vk-gl-cts/opengl-es-cts_3.2.11.0.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/vk-gl-cts/opengl-es-cts_3.2.11.0.bb new file mode 100644 index 00000000..7dd60dff --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/vk-gl-cts/opengl-es-cts_3.2.11.0.bb @@ -0,0 +1,34 @@ +DESCRIPTION = "OpenGL CTS" + +require khronos-cts.inc +# opengl-es-cts-3.2.11.0 +SRCREV_vk-gl-cts = "66956d195169596472e956e3aebf2df8e3bd960d" +SRCREV_amber = "0f003c2785489f59cd01bb2440fcf303149100f2" +SRCREV_glslang = "4da479aa6afa43e5a2ce4c4148c572a03123faf3" +SRCREV_spirv-headers = "ff2afc3afc48dff4eec2a10f0212402a80708e38" +SRCREV_spirv-tools = "148c97f6876e427efd76d2328122c3075eab4b8f" +SRCREV_ESExtractor = "ce5d7ebcf0ebb0d78385ee4cc34653eb6764bfc4" +# Not yet needed +SRCREV_jsoncpp = "9059f5cad030ba11d37818847443a53918c327b1" +SRCREV_vulkan-docs = "ed4ba0242beb89a1795d6084709fa9e713559c94" +SRCREV_vulkan-validationlayers = "a92629196a4fed15e59c74aa965dd47bd5ece3b7" +SRCREV_video-parser = "6821adf11eb4f84a2168264b954c170d03237699" +SRC_URI[renderdoc.sha256sum] = "e7b5f0aa5b1b0eadc63a1c624c0ca7f5af133aa857d6a4271b0ef3d0bdb6868e" + +do_install() { + install -d ${D}/${CTSDIR} + cp -r ${B}/external/openglcts/modules/* ${D}/${CTSDIR} + + install -m 0755 ${B}/modules/egl/deqp-egl ${D}/${CTSDIR} + install -m 0755 ${B}/modules/gles2/deqp-gles2 ${D}/${CTSDIR} + install -m 0755 ${B}/modules/gles3/deqp-gles3 ${D}/${CTSDIR} + install -m 0755 ${B}/modules/gles31/deqp-gles31 ${D}/${CTSDIR} + install -m 0755 ${B}/modules/internal/de-internal-tests ${D}/${CTSDIR} + + rm -rf ${D}/${CTSDIR}/*.a ${D}/${CTSDIR}/cmake_install.cmake ${D}/${CTSDIR}/CMakeFiles + rm -rf ${D}/${CTSDIR}/*/*.a ${D}/${CTSDIR}/*/cmake_install.cmake ${D}/${CTSDIR}/*/CMakeFiles + rm -rf ${D}/${CTSDIR}/common/subgroups/*.a ${D}/${CTSDIR}/common/subgroups/cmake_install.cmake ${D}/${CTSDIR}/common/subgroups/CMakeFiles +} + +SECURITY_CFLAGS:riscv64 = "${SECURITY_NOPIE_CFLAGS}" +LTO = "" diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/vk-gl-cts/opengl-es-cts_3.2.9.3.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/vk-gl-cts/opengl-es-cts_3.2.9.3.bb deleted file mode 100644 index 0656d724..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/vk-gl-cts/opengl-es-cts_3.2.9.3.bb +++ /dev/null @@ -1,40 +0,0 @@ -DESCRIPTION = "OpenGL CTS" - -require khronos-cts.inc -# opengl-es-cts-3.2.9.3 -SRCREV_vk-gl-cts = "7f5fb62245d535a1fc0bf50b2c7e5a342dc551fe" -SRCREV_amber = "933ecb4d6288675a92eb1650e0f52b1d7afe8273" -SRCREV_glslang = "a0ad0d7067521fff880e36acfb8ce453421c3f25" -SRCREV_spirv-headers = "87d5b782bec60822aa878941e6b13c0a9a954c9b" -SRCREV_spirv-tools = "f98473ceeb1d33700d01e20910433583e5256030" -SRCREV_ESExtractor = "ce5d7ebcf0ebb0d78385ee4cc34653eb6764bfc4" -# Not yet needed -SRCREV_jsoncpp = "9059f5cad030ba11d37818847443a53918c327b1" -SRCREV_vulkan-docs = "9a2e576a052a1e65a5d41b593e693ff02745604b" -SRCREV_video-parser = "7d68747d3524842afaf050c5e00a10f5b8c07904" -SRC_URI[renderdoc.sha256sum] = "e7b5f0aa5b1b0eadc63a1c624c0ca7f5af133aa857d6a4271b0ef3d0bdb6868e" - -SRC_URI += "\ - git://github.com/nvpro-samples/vk_video_samples.git;protocol=https;destsuffix=git/external/video-parser/src;name=video-parser;branch=main \ - file://gen-framework-path.patch \ - " -S = "${WORKDIR}/git" - -do_install() { - install -d ${D}/${CTSDIR} - cp -r ${B}/external/openglcts/modules/* ${D}/${CTSDIR} - - install -m 0755 ${B}/modules/egl/deqp-egl ${D}/${CTSDIR} - install -m 0755 ${B}/modules/gles2/deqp-gles2 ${D}/${CTSDIR} - install -m 0755 ${B}/modules/gles3/deqp-gles3 ${D}/${CTSDIR} - install -m 0755 ${B}/modules/gles31/deqp-gles31 ${D}/${CTSDIR} - install -m 0755 ${B}/modules/internal/de-internal-tests ${D}/${CTSDIR} - - rm -rf ${D}/${CTSDIR}/*.a ${D}/${CTSDIR}/cmake_install.cmake ${D}/${CTSDIR}/CMakeFiles - rm -rf ${D}/${CTSDIR}/*/*.a ${D}/${CTSDIR}/*/cmake_install.cmake ${D}/${CTSDIR}/*/CMakeFiles - rm -rf ${D}/${CTSDIR}/common/subgroups/*.a ${D}/${CTSDIR}/common/subgroups/cmake_install.cmake ${D}/${CTSDIR}/common/subgroups/CMakeFiles -} - -SECURITY_CFLAGS:riscv64 = "${SECURITY_NOPIE_CFLAGS}" -LTO = "" - diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/vk-gl-cts/vulkan-cts/0001-use-library-sonames-for-linking.patch b/sources/meta-openembedded/meta-oe/recipes-graphics/vk-gl-cts/vulkan-cts/0001-use-library-sonames-for-linking.patch deleted file mode 100644 index f12abd0c..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/vk-gl-cts/vulkan-cts/0001-use-library-sonames-for-linking.patch +++ /dev/null @@ -1,114 +0,0 @@ -From acd25c4b8d5b7e420a7a89bdfd6551c70de828b3 Mon Sep 17 00:00:00 2001 -From: Trevor Woerner -Date: Thu, 23 Sep 2021 19:36:43 -0400 -Subject: [PATCH] use library sonames for linking - -The recommended "best practices" for applications is to link to library -sonames (e.g. libGL.so.1) instead of library names (e.g. libGL.so). This -ensures that applications don't try to use libraries if an incompatible ABI -change occurs. - -Upstream-Status: Submitted [https://github.com/KhronosGroup/VK-GL-CTS/pull/288] -Signed-off-by: Trevor Woerner ---- - framework/egl/egluGLContextFactory.cpp | 4 ++-- - framework/egl/wrapper/eglwLibrary.cpp | 2 +- - framework/platform/android/tcuAndroidPlatform.cpp | 2 +- - framework/platform/lnx/X11/tcuLnxX11EglDisplayFactory.cpp | 2 +- - .../platform/lnx/wayland/tcuLnxWaylandEglDisplayFactory.cpp | 2 +- - framework/platform/surfaceless/tcuSurfacelessPlatform.cpp | 6 +++--- - 6 files changed, 9 insertions(+), 9 deletions(-) - ---- a/framework/egl/egluGLContextFactory.cpp -+++ b/framework/egl/egluGLContextFactory.cpp -@@ -63,7 +63,7 @@ using std::vector; - # if (DE_OS == DE_OS_WIN32) - # define DEQP_GLES2_LIBRARY_PATH "libGLESv2.dll" - # else --# define DEQP_GLES2_LIBRARY_PATH "libGLESv2.so" -+# define DEQP_GLES2_LIBRARY_PATH "libGLESv2.so.2" - # endif - #endif - -@@ -75,7 +75,7 @@ using std::vector; - # if (DE_OS == DE_OS_WIN32) - # define DEQP_OPENGL_LIBRARY_PATH "opengl32.dll" - # else --# define DEQP_OPENGL_LIBRARY_PATH "libGL.so" -+# define DEQP_OPENGL_LIBRARY_PATH "libGL.so.1" - # endif - #endif - ---- a/framework/egl/wrapper/eglwLibrary.cpp -+++ b/framework/egl/wrapper/eglwLibrary.cpp -@@ -148,7 +148,7 @@ DefaultLibrary::~DefaultLibrary (void) - const char* DefaultLibrary::getLibraryFileName (void) - { - #if (DE_OS == DE_OS_ANDROID) || (DE_OS == DE_OS_UNIX) -- return "libEGL.so"; -+ return "libEGL.so.1"; - #elif (DE_OS == DE_OS_WIN32) - return "libEGL.dll"; - #else ---- a/framework/platform/android/tcuAndroidPlatform.cpp -+++ b/framework/platform/android/tcuAndroidPlatform.cpp -@@ -57,7 +57,7 @@ static const eglu::NativeWindow::Capabil - class NativeDisplay : public eglu::NativeDisplay - { - public: -- NativeDisplay (void) : eglu::NativeDisplay(DISPLAY_CAPABILITIES), m_library("libEGL.so") {} -+ NativeDisplay (void) : eglu::NativeDisplay(DISPLAY_CAPABILITIES), m_library("libEGL.so.1") {} - virtual ~NativeDisplay (void) {} - - virtual EGLNativeDisplayType getLegacyNative (void) { return EGL_DEFAULT_DISPLAY; } ---- a/framework/platform/lnx/X11/tcuLnxX11EglDisplayFactory.cpp -+++ b/framework/platform/lnx/X11/tcuLnxX11EglDisplayFactory.cpp -@@ -75,7 +75,7 @@ class Library : public eglw::DefaultLibr - { - public: - Library (void) -- : eglw::DefaultLibrary("libEGL.so") -+ : eglw::DefaultLibrary("libEGL.so.1") - { - } - ---- a/framework/platform/lnx/wayland/tcuLnxWaylandEglDisplayFactory.cpp -+++ b/framework/platform/lnx/wayland/tcuLnxWaylandEglDisplayFactory.cpp -@@ -66,7 +66,7 @@ public: - EGL_PLATFORM_WAYLAND_KHR, - "EGL_KHR_platform_wayland") - , m_display (waylandDisplay) -- , m_library ("libEGL.so") {} -+ , m_library ("libEGL.so.1") {} - - ~Display(void) {} - wayland::Display& getWaylandDisplay (void) { return *m_display; } ---- a/framework/platform/surfaceless/tcuSurfacelessPlatform.cpp -+++ b/framework/platform/surfaceless/tcuSurfacelessPlatform.cpp -@@ -69,7 +69,7 @@ using std::vector; - - // Default library names - #if !defined(DEQP_GLES2_LIBRARY_PATH) --# define DEQP_GLES2_LIBRARY_PATH "libGLESv2.so" -+# define DEQP_GLES2_LIBRARY_PATH "libGLESv2.so.2" - #endif - - #if !defined(DEQP_GLES3_LIBRARY_PATH) -@@ -77,7 +77,7 @@ using std::vector; - #endif - - #if !defined(DEQP_OPENGL_LIBRARY_PATH) --# define DEQP_OPENGL_LIBRARY_PATH "libGL.so" -+# define DEQP_OPENGL_LIBRARY_PATH "libGL.so.1" - #endif - - #if !defined(DEQP_VULKAN_LIBRARY_PATH) -@@ -237,7 +237,7 @@ glu::RenderContext* ContextFactory::crea - } - - EglRenderContext::EglRenderContext(const glu::RenderConfig& config, const tcu::CommandLine& cmdLine, const glu::RenderContext *sharedContext) -- : m_egl("libEGL.so") -+ : m_egl("libEGL.so.1") - , m_contextType(config.type) - , m_eglDisplay(EGL_NO_DISPLAY) - , m_eglContext(EGL_NO_CONTEXT) diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/vk-gl-cts/vulkan-cts_1.3.7.3.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/vk-gl-cts/vulkan-cts_1.3.7.3.bb deleted file mode 100644 index 7492fe9a..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/vk-gl-cts/vulkan-cts_1.3.7.3.bb +++ /dev/null @@ -1,41 +0,0 @@ -DESCRIPTION = "Vulkan CTS" - -require khronos-cts.inc - -SRC_URI += "git://github.com/Igalia/vk_video_samples.git;protocol=https;destsuffix=git/external/nvidia-video-samples/src;name=video-parser;nobranch=1" - -# vulkan-cts-1.3.7.3 -SRCREV_vk-gl-cts = "d71a36db16d98313c431829432a136dbda692a08" -SRCREV_amber = "933ecb4d6288675a92eb1650e0f52b1d7afe8273" -SRCREV_glslang = "c5117b328afc86e16edff6ed6afe0fe7872a7cf3" -SRCREV_spirv-headers = "b8b9eb8640c8c0107ba580fbcb10f969022ca32c" -SRCREV_spirv-tools = "bfc94f63a7adbcf8ae166f5f108ac9f69079efc0" -SRCREV_jsoncpp = "9059f5cad030ba11d37818847443a53918c327b1" -SRCREV_vulkan-docs = "b9aad705f0d9e5e6734ac2ad671d5d1de57b05e0" -SRC_URI[renderdoc.sha256sum] = "e7b5f0aa5b1b0eadc63a1c624c0ca7f5af133aa857d6a4271b0ef3d0bdb6868e" -# Not yet needed -SRCREV_ESExtractor = "75ffcaf55bb069f7a23764194742d2fb78c7f71f" -SRCREV_video-parser = "138bbe048221d315962ddf8413aa6a08cc62a381" - -SRC_URI += "file://0001-cmake-Define-WAYLAND_SCANNER-and-WAYLAND_PROTOCOLS_D.patch \ - file://0001-vulkan-cts-include-missing-cstdint.patch \ -" - -TOOLCHAIN = "gcc" - -# Workaround an optimization bug that breaks createMeshShaderMiscTestsEXT -OECMAKE_CXX_FLAGS:remove:toolchain-gcc = "-O2" - -S = "${WORKDIR}/git" - -REQUIRED_DISTRO_FEATURES = "vulkan" -inherit features_check - -DEPENDS += " vulkan-loader" - -do_install() { - install -d ${D}/${CTSDIR} - cp -r ${B}/external/vulkancts/modules/vulkan/* ${D}/${CTSDIR}/ - rm -rf ${D}/${CTSDIR}/*.a ${D}/${CTSDIR}/cmake_install.cmake ${D}/${CTSDIR}/CMakeFiles - rm -rf ${D}/${CTSDIR}/*/*.a ${D}/${CTSDIR}/*/cmake_install.cmake ${D}/${CTSDIR}/*/CMakeFiles -} diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/vk-gl-cts/vulkan-cts_1.3.9.2.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/vk-gl-cts/vulkan-cts_1.3.9.2.bb new file mode 100644 index 00000000..4ba761b6 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/vk-gl-cts/vulkan-cts_1.3.9.2.bb @@ -0,0 +1,32 @@ +DESCRIPTION = "Vulkan CTS" + +require khronos-cts.inc + +# vulkan-cts-1.3.9.2 +SRCREV_vk-gl-cts = "24c1b1498ba4f05777f47541968ffe686265c645" +SRCREV_amber = "0f003c2785489f59cd01bb2440fcf303149100f2" +SRCREV_glslang = "2b19bf7e1bc0b60cf2fe9d33e5ba6b37dfc1cc83" +SRCREV_spirv-headers = "db5a00f8cebe81146cafabf89019674a3c4bf03d" +SRCREV_spirv-tools = "4c7e1fa5c3d988cca0e626d359d30b117b9c2822" +SRCREV_jsoncpp = "9059f5cad030ba11d37818847443a53918c327b1" +SRCREV_vulkan-docs = "7bb606eb87cde1d34f65f36f4d4c6f2c78f072c8" +SRCREV_vulkan-validationlayers = "a92629196a4fed15e59c74aa965dd47bd5ece3b7" +SRC_URI[renderdoc.sha256sum] = "e7b5f0aa5b1b0eadc63a1c624c0ca7f5af133aa857d6a4271b0ef3d0bdb6868e" +# Not yet needed +SRCREV_ESExtractor = "75ffcaf55bb069f7a23764194742d2fb78c7f71f" +SRCREV_video-parser = "6821adf11eb4f84a2168264b954c170d03237699" + +# Workaround an optimization bug that breaks createMeshShaderMiscTestsEXT +OECMAKE_CXX_FLAGS:remove:toolchain-gcc = "-O2" + +REQUIRED_DISTRO_FEATURES = "vulkan" +inherit features_check + +DEPENDS += " vulkan-loader" + +do_install() { + install -d ${D}/${CTSDIR} + cp -r ${B}/external/vulkancts/modules/vulkan/* ${D}/${CTSDIR}/ + rm -rf ${D}/${CTSDIR}/*.a ${D}/${CTSDIR}/cmake_install.cmake ${D}/${CTSDIR}/CMakeFiles + rm -rf ${D}/${CTSDIR}/*/*.a ${D}/${CTSDIR}/*/cmake_install.cmake ${D}/${CTSDIR}/*/CMakeFiles +} diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/wayland/libei_1.2.1.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/wayland/libei_1.2.1.bb deleted file mode 100644 index 807dcea1..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/wayland/libei_1.2.1.bb +++ /dev/null @@ -1,25 +0,0 @@ -SUMMARY = "libei is a library for Emulated Input, primarily aimed at the Wayland stack." -HOMEPAGE = "https://gitlab.freedesktop.org/libinput/libei" -SECTION = "graphics" -LICENSE = "MIT" - -LIC_FILES_CHKSUM = "file://COPYING;md5=a98fa76460f96f41696611d6f07e8d49" - -DEPENDS = " \ - libxkbcommon \ - libevdev \ - libxslt-native \ - python3-attrs-native \ - python3-jinja2-native \ - ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', 'basu', d)} \ -" - -SRC_URI = "git://gitlab.freedesktop.org/libinput/libei.git;protocol=https;branch=main" - -S = "${WORKDIR}/git" -SRCREV = "08f1d41085a6ae4bac7bc52abe2955d3354342cb" - -inherit meson pkgconfig - -EXTRA_OEMESON = "-Dtests=disabled" - diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/wayland/libei_1.3.0.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/wayland/libei_1.3.0.bb new file mode 100644 index 00000000..ee3ee01c --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/wayland/libei_1.3.0.bb @@ -0,0 +1,25 @@ +SUMMARY = "libei is a library for Emulated Input, primarily aimed at the Wayland stack." +HOMEPAGE = "https://gitlab.freedesktop.org/libinput/libei" +SECTION = "graphics" +LICENSE = "MIT" + +LIC_FILES_CHKSUM = "file://COPYING;md5=a98fa76460f96f41696611d6f07e8d49" + +DEPENDS = " \ + libxkbcommon \ + libevdev \ + libxslt-native \ + python3-attrs-native \ + python3-jinja2-native \ + ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', 'basu', d)} \ +" + +SRC_URI = "git://gitlab.freedesktop.org/libinput/libei.git;protocol=https;branch=main" + +S = "${WORKDIR}/git" +SRCREV = "997b7c0f37faea4f8bae59613c8f27370925d5b0" + +inherit meson pkgconfig + +EXTRA_OEMESON = "-Dtests=disabled" + diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/xdotool/xdotool_3.20211022.1.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/xdotool/xdotool_3.20211022.1.bb index cef82bd3..33e4e099 100644 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/xdotool/xdotool_3.20211022.1.bb +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/xdotool/xdotool_3.20211022.1.bb @@ -14,6 +14,9 @@ SRC_URI[sha256sum] = "96f0facfde6d78eacad35b91b0f46fecd0b35e474c03e00e30da3fdd34 EXTRA_OEMAKE = "PREFIX=${prefix} INSTALLLIB=${libdir} INSTALLMAN=${mandir}" +UPSTREAM_CHECK_URI="https://github.com/jordansissel/xdotool/tags" +UPSTREAM_CHECK_REGEX = "v(?P\d+\.\d{8}\.\d+)" + do_install() { oe_runmake install DESTDIR=${D} PREFIX=${prefix} } diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/xorg-app/xkbutils_1.0.5.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/xorg-app/xkbutils_1.0.5.bb deleted file mode 100644 index f078ad60..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/xorg-app/xkbutils_1.0.5.bb +++ /dev/null @@ -1,17 +0,0 @@ -require recipes-graphics/xorg-app/xorg-app-common.inc - -SUMMARY = "XKeyboard (XKB) extension to the X11 protocol" -DESCRIPTION = " \ -xkbutils is a collection of small utilities utilizing the XKeyboard (XKB) \ -extension to the X11 protocol. \ -It includes: \ - xkbbell - generate XKB bell events \ - xkbvleds - display the state of LEDs on an XKB keyboard in a window \ - xkbwatch - reports changes in the XKB keyboard state \ -" -LIC_FILES_CHKSUM = "file://COPYING;md5=64322fab5239f5c8d97cf6e0e14f1c62" - -DEPENDS += "libxaw libxkbfile" - -SRC_URI_EXT = "xz" -SRC_URI[sha256sum] = "f6a4a8e9c54582beb3787b1faa8168caab125c1fee0ca9cfa5b6c9c1df25eea4" diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/xorg-app/xkbutils_1.0.6.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/xorg-app/xkbutils_1.0.6.bb new file mode 100644 index 00000000..0274608d --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/xorg-app/xkbutils_1.0.6.bb @@ -0,0 +1,17 @@ +require recipes-graphics/xorg-app/xorg-app-common.inc + +SUMMARY = "XKeyboard (XKB) extension to the X11 protocol" +DESCRIPTION = " \ +xkbutils is a collection of small utilities utilizing the XKeyboard (XKB) \ +extension to the X11 protocol. \ +It includes: \ + xkbbell - generate XKB bell events \ + xkbvleds - display the state of LEDs on an XKB keyboard in a window \ + xkbwatch - reports changes in the XKB keyboard state \ +" +LIC_FILES_CHKSUM = "file://COPYING;md5=6767a97a97e21260134637b657b922ae" + +DEPENDS += "libxaw libxkbfile" + +SRC_URI_EXT = "xz" +SRC_URI[sha256sum] = "31a2bbee1e09ccba01de92897b8f540b545de812f318d31de07bd3a5a75ee25e" diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/xorg-app/xlsfonts_1.0.7.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/xorg-app/xlsfonts_1.0.7.bb deleted file mode 100644 index e5cd0ce6..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/xorg-app/xlsfonts_1.0.7.bb +++ /dev/null @@ -1,10 +0,0 @@ -require recipes-graphics/xorg-app/xorg-app-common.inc - -SUMMARY = "server font list displayer for X" -HOMEPAGE = "http://cgit.freedesktop.org/xorg/app/xlsfonts/" -SECTION = "x11/app" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://COPYING;md5=5ec74dd7ea4d10c4715a7c44f159a40b" - -SRC_URI_EXT = "xz" -SRC_URI[sha256sum] = "7b726945a967b44c35cddee5edd74802907a239ce2e2e515730b8a32c8e50465" diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/xorg-app/xlsfonts_1.0.8.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/xorg-app/xlsfonts_1.0.8.bb new file mode 100644 index 00000000..4ddb1b98 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/xorg-app/xlsfonts_1.0.8.bb @@ -0,0 +1,10 @@ +require recipes-graphics/xorg-app/xorg-app-common.inc + +SUMMARY = "server font list displayer for X" +HOMEPAGE = "http://cgit.freedesktop.org/xorg/app/xlsfonts/" +SECTION = "x11/app" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=5ec74dd7ea4d10c4715a7c44f159a40b" + +SRC_URI_EXT = "xz" +SRC_URI[sha256sum] = "807f909eace684b866fc63b3e962729c120822a6c96e051ff51cf350b3ffb6cd" diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/xorg-app/xterm/0001-Add-configure-time-check-for-setsid.patch b/sources/meta-openembedded/meta-oe/recipes-graphics/xorg-app/xterm/0001-Add-configure-time-check-for-setsid.patch deleted file mode 100644 index a6cf16e4..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/xorg-app/xterm/0001-Add-configure-time-check-for-setsid.patch +++ /dev/null @@ -1,75 +0,0 @@ -From b23d38f1216c4d70738edaa367cf9ecd2dd4b660 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 13 Dec 2019 12:59:26 -0800 -Subject: [PATCH] Add configure time check for setsid - -Do not assume glibc == linux - -Upstream-Status: Pending -Signed-off-by: Khem Raj - ---- - configure | 1 + - configure.in | 1 + - main.c | 4 ++-- - xtermcfg.hin | 1 + - 4 files changed, 5 insertions(+), 2 deletions(-) - -diff --git a/configure b/configure -index 72342c7..c2ec2ac 100755 ---- a/configure -+++ b/configure -@@ -5803,6 +5803,7 @@ for ac_func in \ - unsetenv \ - sched_yield \ - setpgid \ -+ setsid \ - strftime \ - tcgetattr \ - waitpid \ -diff --git a/configure.in b/configure.in -index 56dbc25..0608c80 100644 ---- a/configure.in -+++ b/configure.in -@@ -99,6 +99,7 @@ AC_CHECK_FUNCS( \ - unsetenv \ - sched_yield \ - setpgid \ -+ setsid \ - strftime \ - tcgetattr \ - waitpid \ -diff --git a/main.c b/main.c -index 24da0eb..332174c 100644 ---- a/main.c -+++ b/main.c -@@ -2956,7 +2956,7 @@ main(int argc, char *argv[]ENVP_ARG) - } - } - --#if defined(__osf__) || (defined(__GLIBC__) && !defined(USE_USG_PTYS)) || defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__) -+#if defined(__osf__) || (defined(__linux__) && !defined(USE_USG_PTYS)) || defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__) - #define USE_OPENPTY 1 - static int opened_tty = -1; - #endif -@@ -4205,7 +4205,7 @@ spawnXTerm(XtermWidget xw, unsigned line_speed) - /* - * now in child process - */ --#if defined(_POSIX_SOURCE) || defined(SVR4) || defined(__convex__) || defined(__SCO__) || defined(__QNX__) -+#if HAVE_SETSID - int pgrp = setsid(); /* variable may not be used... */ - #else - int pgrp = getpid(); -diff --git a/xtermcfg.hin b/xtermcfg.hin -index 19048cd..e54d2cd 100644 ---- a/xtermcfg.hin -+++ b/xtermcfg.hin -@@ -98,6 +98,7 @@ - #undef HAVE_SCHED_YIELD /* AC_CHECK_FUNCS(sched_yield) */ - #undef HAVE_SETITIMER /* CF_SETITIMER */ - #undef HAVE_SETPGID /* AC_CHECK_FUNCS(setpgid) */ -+#undef HAVE_SETSID /* AC_CHECK_FUNCS(setsid) */ - #undef HAVE_STDINT_H /* AC_PROG_CC_STDC */ - #undef HAVE_STDLIB_H /* AC_CHECK_HEADERS(stdlib.h) */ - #undef HAVE_STDNORETURN_H /* CF_C11_NORETURN */ diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/xorg-app/xterm/0001-include-missing-pty.h-header-for-openpty.patch b/sources/meta-openembedded/meta-oe/recipes-graphics/xorg-app/xterm/0001-include-missing-pty.h-header-for-openpty.patch new file mode 100644 index 00000000..0c9d64c8 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/xorg-app/xterm/0001-include-missing-pty.h-header-for-openpty.patch @@ -0,0 +1,30 @@ +From e30ab2d73a21bc55511cbedbb9ae603246dbfcd1 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 16 May 2024 23:10:00 -0700 +Subject: [PATCH] include missing pty.h header for openpty() + +On musl this problem is unearthed + +Fix +./main.c: In function 'get_pty': +./main.c:3123:14: error: implicit declaration of function 'openpty'; did you mean 'openat'? [-Wimplicit-function-declaration] + 3123 | result = openpty(pty, &opened_tty, ttydev, NULL, NULL); + | ^~~~~~~ + | openat + +Upstream-Status: Submitted [sent to dickey@invisible-island.net] +Signed-off-by: Khem Raj +--- + main.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/main.c ++++ b/main.c +@@ -89,6 +89,7 @@ + + #define RES_OFFSET(field) XtOffsetOf(XTERM_RESOURCE, field) + ++#include + #include + #include + #include diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/xorg-app/xterm_388.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/xorg-app/xterm_388.bb deleted file mode 100644 index 8578f0cc..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/xorg-app/xterm_388.bb +++ /dev/null @@ -1,50 +0,0 @@ -require recipes-graphics/xorg-app/xorg-app-common.inc -SUMMARY = "xterm is the standard terminal emulator for the X Window System" -DEPENDS = "libxaw xorgproto libxext libxau libxinerama libxpm ncurses desktop-file-utils-native" - -LIC_FILES_CHKSUM = "file://xterm.h;beginline=3;endline=31;md5=9c96124b492c0c02356850c243aaeca2" - -SRC_URI = "http://invisible-mirror.net/archives/${BPN}/${BP}.tgz \ - file://0001-Add-configure-time-check-for-setsid.patch \ - " - -SRC_URI[sha256sum] = "ac429345e6f937a5945a89d425a265fee6c215fc669dbdc6a0326e21f4c5f674" - -PACKAGECONFIG ?= "" -PACKAGECONFIG[xft] = "--enable-freetype,--disable-freetype,libxft fontconfig freetype-native" - -# Let xterm install .desktop files -inherit mime-xdg - -EXTRA_OECONF = " --x-includes=${STAGING_INCDIR} \ - --x-libraries=${STAGING_LIBDIR} \ - FREETYPE_CONFIG=${STAGING_BINDIR_CROSS}/freetype-config \ - --disable-imake \ - --disable-rpath-hack \ - --disable-setuid \ - --with-app-defaults=${datadir}/X11/app-defaults \ - " - -B = "${S}" - -CFLAGS += "-D_GNU_SOURCE" - -do_configure() { - gnu-configize --force - sed -e "s%/usr/contrib/X11R6%${STAGING_LIBDIR}%g" -i configure - oe_runconf -} - -do_install:append() { - oe_runmake install-desktop DESTDIR="${D}" DESKTOP_FLAGS="--dir=${D}${DESKTOPDIR}" -} - -RPROVIDES:${PN} = "virtual-x-terminal-emulator" - -# busybox can supply resize too -inherit update-alternatives - -ALTERNATIVE:${PN} = "resize x-terminal-emulator" -ALTERNATIVE_TARGET[x-terminal-emulator] = "${bindir}/xterm" -# rxvt-unicode defaults to priority 10. Let's be one point lower to let it override xterm. -ALTERNATIVE_PRIORITY[x-terminal-emulator] = "9" diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/xorg-app/xterm_394.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/xorg-app/xterm_394.bb new file mode 100644 index 00000000..94953b28 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/xorg-app/xterm_394.bb @@ -0,0 +1,51 @@ +require recipes-graphics/xorg-app/xorg-app-common.inc +SUMMARY = "xterm is the standard terminal emulator for the X Window System" +DEPENDS = "libxaw xorgproto libxext libxau libxinerama libxpm ncurses desktop-file-utils-native" + +LIC_FILES_CHKSUM = "file://xterm.h;beginline=3;endline=31;md5=1a3032aa728f8fda9d686948940ca58d" + +SRC_URI = "http://invisible-mirror.net/archives/${BPN}/${BP}.tgz \ + file://0001-include-missing-pty.h-header-for-openpty.patch \ + " +SRC_URI[sha256sum] = "a2a0cb206eb0423dedc34794f5c2d38c83390d2dd1106b66aba0960c3a976c7a" + +PACKAGECONFIG ?= "" +PACKAGECONFIG[xft] = "--enable-freetype,--disable-freetype,libxft fontconfig freetype-native" + +# Let xterm install .desktop files +inherit mime-xdg + +EXTRA_OECONF = " --x-includes=${STAGING_INCDIR} \ + --x-libraries=${STAGING_LIBDIR} \ + FREETYPE_CONFIG=${STAGING_BINDIR_CROSS}/freetype-config \ + --disable-imake \ + --disable-rpath-hack \ + --disable-setuid \ + --with-app-defaults=${datadir}/X11/app-defaults \ + " + +B = "${S}" + +CFLAGS += "-D_GNU_SOURCE" + +do_configure() { + gnu-configize --force + sed -e "s%/usr/contrib/X11R6%${STAGING_LIBDIR}%g" -i configure + oe_runconf +} + +do_install:append() { + oe_runmake install-desktop DESTDIR="${D}" DESKTOP_FLAGS="--dir=${D}${DESKTOPDIR}" +} + +RPROVIDES:${PN} = "virtual-x-terminal-emulator" + +# busybox can supply resize too +inherit update-alternatives + +ALTERNATIVE:${PN} = "resize x-terminal-emulator" +ALTERNATIVE_TARGET[x-terminal-emulator] = "${bindir}/xterm" +# rxvt-unicode defaults to priority 10. Let's be one point lower to let it override xterm. +ALTERNATIVE_PRIORITY[x-terminal-emulator] = "9" + +CVE_STATUS[CVE-1999-0965] = "cpe-incorrect: Current version (392) not affected. This was fixed in version X11R5-fix-26 (R11R6 from 1994)" diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib_1.1.1.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib_1.1.1.bb index 9f445ff2..171b2dec 100644 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib_1.1.1.bb +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib_1.1.1.bb @@ -9,12 +9,14 @@ RRECOMMENDS:${PN} += "tslib-calibrate" SRC_URI = "https://github.com/merge/xf86-input-tslib/releases/download/${PV}/xf86-input-tslib-${PV}.tar.xz \ file://99-xf86-input-tslib.rules \ " +UPSTREAM_CHECK_URI="https://github.com/merge/xf86-input-tslib/tags" +UPSTREAM_CHECK_REGEX = "(?P\d+(\.\d+)+)$" SRC_URI[sha256sum] = "b596168c4ed2f1023212dc828ce49cbe82a0bbd1aac3c5e2958154d78870ca88" do_install:append() { install -d ${D}${nonarch_base_libdir}/udev/rules.d - install -m 0644 ${WORKDIR}/99-xf86-input-tslib.rules ${D}${nonarch_base_libdir}/udev/rules.d/ + install -m 0644 ${UNPACKDIR}/99-xf86-input-tslib.rules ${D}${nonarch_base_libdir}/udev/rules.d/ } FILES:${PN} += "${nonarch_base_libdir}/udev" diff --git a/sources/meta-openembedded/meta-oe/recipes-graphics/xscreensaver/xscreensaver_6.04.bb b/sources/meta-openembedded/meta-oe/recipes-graphics/xscreensaver/xscreensaver_6.04.bb index dc909ed7..073b3f09 100644 --- a/sources/meta-openembedded/meta-oe/recipes-graphics/xscreensaver/xscreensaver_6.04.bb +++ b/sources/meta-openembedded/meta-oe/recipes-graphics/xscreensaver/xscreensaver_6.04.bb @@ -13,6 +13,8 @@ MIRRORS += "https://www.jwz.org/${BPN} https://ftp.osuosl.org/pub/blfs/conglomer SRC_URI[sha256sum] = "787014b29f0c5793ecc2d93e1109a049ff48ab0c29b851dab34f683ceef6b152" +UPSTREAM_CHECK_URI = "https://www.jwz.org/xscreensaver/download.html" + DEPENDS = "intltool-native libx11 libxext libxt libxft libxi glib-2.0-native bc-native libpam jpeg" # These are only needed as part of the stopgap screensaver implementation: RDEPENDS:${PN} = " \ @@ -34,11 +36,11 @@ PACKAGECONFIG = "png ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd', PACKAGECONFIG[systemd] = "--with-systemd=yes,--with-systemd=no,systemd" PACKAGECONFIG[png] = "--with-png=yes,--with-png=no,libpng" -CONFIGUREOPTS:remove = "--disable-silent-rules --disable-dependency-tracking ${@append_libtool_sysroot(d)}" +CONFIGUREOPTS:remove = "--disable-silent-rules --disable-dependency-tracking" EXTRA_OECONF:remove = "--disable-static" do_install:append() { - install -D ${WORKDIR}/xscreensaver.service ${D}${systemd_unitdir}/system/xscreensaver.service + install -D ${UNPACKDIR}/xscreensaver.service ${D}${systemd_unitdir}/system/xscreensaver.service for f in xscreensaver-getimage-file xscreensaver-getimage-video webcollage xscreensaver-text vidwhacker do sed -i -e "s|${STAGING_BINDIR_NATIVE}/perl-native/perl|/usr/bin/perl|g" ${D}/${libexecdir}/${PN}/$f diff --git a/sources/meta-openembedded/meta-oe/recipes-kernel/bpftool/bpftool.bb b/sources/meta-openembedded/meta-oe/recipes-kernel/bpftool/bpftool.bb index ec778c6e..8bddde94 100644 --- a/sources/meta-openembedded/meta-oe/recipes-kernel/bpftool/bpftool.bb +++ b/sources/meta-openembedded/meta-oe/recipes-kernel/bpftool/bpftool.bb @@ -14,7 +14,7 @@ EXTRA_OEMAKE = "\ -C ${S}/tools/bpf/bpftool \ O=${B} \ CROSS=${TARGET_PREFIX} \ - CC="${CC} ${DEBUG_PREFIX_MAP} -fdebug-prefix-map=${STAGING_KERNEL_DIR}=${KERNEL_SRC_PATH} ${CFLAGS}" \ + CC="${CC} ${DEBUG_PREFIX_MAP} -fdebug-prefix-map=${STAGING_KERNEL_DIR}=${KERNEL_SRC_PATH}" \ HOSTCC="${BUILD_CC} ${BUILD_CFLAGS}" \ LD="${LD}" \ AR=${AR} \ diff --git a/sources/meta-openembedded/meta-oe/recipes-kernel/cpupower/cpupower.bb b/sources/meta-openembedded/meta-oe/recipes-kernel/cpupower/cpupower.bb index 453ebe8c..18e36380 100644 --- a/sources/meta-openembedded/meta-oe/recipes-kernel/cpupower/cpupower.bb +++ b/sources/meta-openembedded/meta-oe/recipes-kernel/cpupower/cpupower.bb @@ -7,7 +7,7 @@ PROVIDES = "virtual/cpupower" inherit kernelsrc kernel-arch bash-completion -do_populate_lic[depends] += "virtual/kernel:do_shared_workdir" +do_populate_lic[depends] += "virtual/kernel:do_patch" EXTRA_OEMAKE = "-C ${S}/tools/power/cpupower O=${B} CROSS=${TARGET_PREFIX} CC="${CC}" LD="${LD}" AR=${AR} ARCH=${ARCH}" diff --git a/sources/meta-openembedded/meta-oe/recipes-kernel/crash/crash-cross-canadian_8.0.4.bb b/sources/meta-openembedded/meta-oe/recipes-kernel/crash/crash-cross-canadian_8.0.5.bb similarity index 100% rename from sources/meta-openembedded/meta-oe/recipes-kernel/crash/crash-cross-canadian_8.0.4.bb rename to sources/meta-openembedded/meta-oe/recipes-kernel/crash/crash-cross-canadian_8.0.5.bb diff --git a/sources/meta-openembedded/meta-oe/recipes-kernel/crash/crash.inc b/sources/meta-openembedded/meta-oe/recipes-kernel/crash/crash.inc index c8c85183..29cff569 100644 --- a/sources/meta-openembedded/meta-oe/recipes-kernel/crash/crash.inc +++ b/sources/meta-openembedded/meta-oe/recipes-kernel/crash/crash.inc @@ -22,9 +22,8 @@ SRC_URI = "git://github.com/crash-utility/${BPN}.git;branch=master;protocol=http file://0001-cross_add_configure_option.patch \ file://donnot-extract-gdb-during-do-compile.patch \ file://gdb_build_jobs_and_not_write_crash_target.patch \ - file://0001-symbol-fix-S-cannot-work-with-kaslr-detection.patch \ " -SRCREV = "a6832f608cb5d473739cf33bbf84ab1df8d98fd5" +SRCREV = "ceacceef7d13134d327719a624cfafed99e90f8a" SRC_URI[gdb.sha256sum] = "b33ad58d687487a821ec8d878daab0f716be60d0936f2e3ac5cf08419ce70350" diff --git a/sources/meta-openembedded/meta-oe/recipes-kernel/crash/crash/0001-symbol-fix-S-cannot-work-with-kaslr-detection.patch b/sources/meta-openembedded/meta-oe/recipes-kernel/crash/crash/0001-symbol-fix-S-cannot-work-with-kaslr-detection.patch deleted file mode 100644 index 47182f8b..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-kernel/crash/crash/0001-symbol-fix-S-cannot-work-with-kaslr-detection.patch +++ /dev/null @@ -1,89 +0,0 @@ -From 329bd56da28fc1b5b53a60ca2172643d2090435d Mon Sep 17 00:00:00 2001 -From: Tao Liu -Date: Fri, 13 Dec 2024 08:36:03 +0000 -Subject: [PATCH] symbol: fix -S cannot work with kaslr detection - -When kernel enabled the CONFIG_RANDOMIZE_BASE, crash needs to add "kaslr=auto" -in crash command line to tell crash to decode the random address. -But when with "-S" in command line, crash would bypass the kaslr option -that cause symbol from kernel image is mismatch with ram on a live system. - -The fix is provided by Tao Liu from crash-utility upstream, -and not merged to crash master yet. - -Upstream-Status: Pending -[https://lists.crash-utility.osci.io/archives/list/devel@lists.crash-utility.osci.io/thread/5OXNYPPU6GLLQKCWH7WBNBJXLNZ4EBZD/] - -Signed-off-by: Xiangyu Chen ---- - symbols.c | 18 ++++++++++-------- - 1 file changed, 10 insertions(+), 8 deletions(-) - -diff --git a/symbols.c b/symbols.c -index a3cd0f3..6062d21 100644 ---- a/symbols.c -+++ b/symbols.c -@@ -25,7 +25,7 @@ - - static void store_symbols(bfd *, int, void *, long, unsigned int); - static void store_sysmap_symbols(void); --static ulong relocate(ulong, char *, int); -+static ulong relocate(ulong, char *, int *); - static int relocate_force(ulong, char *); - static void kaslr_init(void); - static void strip_module_symbol_end(char *s); -@@ -230,6 +230,7 @@ symtab_init(void) - DEBUGINFO_ERROR_MESSAGE1 : - DEBUGINFO_ERROR_MESSAGE2); - } -+ kt->flags |= RELOC_FORCE; - store_sysmap_symbols(); - return; - } else if (LKCD_KERNTYPES()) -@@ -817,7 +818,7 @@ store_symbols(bfd *abfd, int dynamic, void *minisyms, long symcount, - syminfo.type)) { - if (kt->flags & (RELOC_SET|RELOC_FORCE)) - sp->value = relocate(syminfo.value, -- (char *)syminfo.name, !(first++)); -+ (char *)syminfo.name, &first); - else - sp->value = syminfo.value; - sp->type = syminfo.type; -@@ -893,9 +894,9 @@ store_sysmap_symbols(void) - - if (machdep->verify_symbol(name, syment.value, - syment.type)) { -- if (kt->flags & RELOC_SET) -+ if (kt->flags & (RELOC_SET|RELOC_FORCE)) - sp->value = relocate(syment.value, -- syment.name, !(first++)); -+ syment.name, &first); - else - sp->value = syment.value; - sp->type = syment.type; -@@ -924,7 +925,7 @@ store_sysmap_symbols(void) - * are not as loaded into the kernel (not unity-mapped). - */ - static ulong --relocate(ulong symval, char *symname, int first_symbol) -+relocate(ulong symval, char *symname, int *first_symbol) - { - if (XEN_HYPER_MODE()) { - kt->flags &= ~(RELOC_SET|RELOC_FORCE); -@@ -937,9 +938,10 @@ relocate(ulong symval, char *symname, int first_symbol) - break; - - case RELOC_FORCE: -- if (first_symbol && !relocate_force(symval, symname)) -- kt->flags &= ~RELOC_FORCE; -- break; -+ if (!(*first_symbol) && relocate_force(symval, symname)) { -+ *first_symbol += 1; -+ } -+ return symval - kt->relocate; - } - - if (machine_type("X86_64")) { --- -2.35.5 - diff --git a/sources/meta-openembedded/meta-oe/recipes-kernel/crash/crash_8.0.4.bb b/sources/meta-openembedded/meta-oe/recipes-kernel/crash/crash_8.0.5.bb similarity index 100% rename from sources/meta-openembedded/meta-oe/recipes-kernel/crash/crash_8.0.4.bb rename to sources/meta-openembedded/meta-oe/recipes-kernel/crash/crash_8.0.5.bb diff --git a/sources/meta-openembedded/meta-oe/recipes-kernel/drgn/python3-drgn_0.0.27.bb b/sources/meta-openembedded/meta-oe/recipes-kernel/drgn/python3-drgn_0.0.27.bb new file mode 100644 index 00000000..10d7c6ff --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-kernel/drgn/python3-drgn_0.0.27.bb @@ -0,0 +1,80 @@ +SUMMARY = "drgn (pronounced dragon) is a debugger with an emphasis on \ +programmability. drgn exposes the types and variables in a program for easy, \ +expressive scripting in Python." +HOMEPAGE = "https://github.com/osandov/drgn" +LICENSE = " LGPL-2.1-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=7c83d30e99508d6b790eacdd3abab846" + +SRC_URI = "git://github.com/osandov/drgn.git;protocol=https;branch=main" +SRCREV = "a8dfc9e31f551d4b3c3d4307fa19ab6b3bfafb1c" + +S = "${WORKDIR}/git" + +DEPENDS = "\ + autoconf-native \ + automake-native \ + libtool-native \ + elfutils \ + " + +DEPENDS:append:toolchain-clang:class-target ="\ + openmp \ + " + +OPENMP_LIB = "libgomp" +OPENMP_LIB:toolchain-clang:class-target = "openmp" + +RDEPENDS:${PN} = "\ + python3-crypt \ + python3-io \ + python3-logging \ + python3-math \ + python3-pickle \ + python3-stringold \ + python3-compression \ + " + +RDEPENDS:${PN}:append:class-target = "\ + libdw \ + libelf \ + ${OPENMP_LIB} \ + " + +RDEPENDS:${PN}:append:class-native = "\ + elfutils-native \ + " + +RDEPENDS:${PN}:append:class-nativesdk = "\ + nativesdk-elfutils \ + " + +OPENMP_LIB_NAME = "gomp" +OPENMP_LIB_NAME:toolchain-clang:class-target = "omp" + +export CONFIGURE_FLAGS = "\ + --build=${BUILD_SYS}, \ + --host=${HOST_SYS}, \ + --target=${TARGET_SYS}, \ + --prefix=${prefix}, \ + --exec_prefix=${exec_prefix}, \ + --bindir=${bindir}, \ + --sbindir=${sbindir}, \ + --libexecdir=${libexecdir}, \ + --datadir=${datadir}, \ + --sysconfdir=${sysconfdir}, \ + --sharedstatedir=${sharedstatedir}, \ + --localstatedir=${localstatedir}, \ + --libdir=${libdir}, \ + --includedir=${includedir}, \ + --oldincludedir=${includedir}, \ + --infodir=${infodir}, \ + --mandir=${mandir}, \ + --enable-openmp=${OPENMP_LIB_NAME} \ + " + +export PYTHON_CPPFLAGS = "-I${STAGING_INCDIR}/${PYTHON_DIR}" + +inherit python3native pkgconfig setuptools3 + +BBCLASSEXTEND = "native nativesdk" + diff --git a/sources/meta-openembedded/meta-oe/recipes-kernel/intel-speed-select/intel-speed-select.bb b/sources/meta-openembedded/meta-oe/recipes-kernel/intel-speed-select/intel-speed-select.bb index 3b586618..23ea0d8a 100644 --- a/sources/meta-openembedded/meta-oe/recipes-kernel/intel-speed-select/intel-speed-select.bb +++ b/sources/meta-openembedded/meta-oe/recipes-kernel/intel-speed-select/intel-speed-select.bb @@ -13,7 +13,7 @@ COMPATIBLE_HOST:libc-musl = 'null' DEPENDS = "libnl" -do_populate_lic[depends] += "virtual/kernel:do_shared_workdir" +do_populate_lic[depends] += "virtual/kernel:do_patch" B = "${WORKDIR}/${BPN}-${PV}" diff --git a/sources/meta-openembedded/meta-oe/recipes-kernel/ipmitool/ipmitool_1.8.19.bb b/sources/meta-openembedded/meta-oe/recipes-kernel/ipmitool/ipmitool_1.8.19.bb index 0f1c8846..dcd3edaf 100644 --- a/sources/meta-openembedded/meta-oe/recipes-kernel/ipmitool/ipmitool_1.8.19.bb +++ b/sources/meta-openembedded/meta-oe/recipes-kernel/ipmitool/ipmitool_1.8.19.bb @@ -37,8 +37,8 @@ S = "${WORKDIR}/git" inherit autotools pkgconfig do_install:append() { - if [ -e ${WORKDIR}/iana-enterprise-numbers ]; then - install -Dm 0755 ${WORKDIR}/iana-enterprise-numbers ${D}${datadir}/misc/enterprise-numbers + if [ -e ${UNPACKDIR}/iana-enterprise-numbers ]; then + install -Dm 0755 ${UNPACKDIR}/iana-enterprise-numbers ${D}${datadir}/misc/enterprise-numbers fi } @@ -57,3 +57,6 @@ EXTRA_OECONF = "--disable-dependency-tracking --enable-file-security --disable-i --disable-registry-download \ " +# http://errors.yoctoproject.org/Errors/Details/766896/ +# git/lib/ipmi_fru.c:1556:41: error: initialization of 'struct fru_multirec_mgmt *' from incompatible pointer type 'struct fru_multirect_mgmt *' [-Wincompatible-pointer-types] +CFLAGS += "-Wno-error=incompatible-pointer-types" diff --git a/sources/meta-openembedded/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest.bb b/sources/meta-openembedded/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest.bb index a070ceab..f83b07dd 100644 --- a/sources/meta-openembedded/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest.bb +++ b/sources/meta-openembedded/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest.bb @@ -2,7 +2,7 @@ SUMMARY = "Kernel selftest for Linux" DESCRIPTION = "Kernel selftest for Linux" LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://../COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" +LIC_FILES_CHKSUM = "file://${UNPACKDIR}/COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" DEPENDS = "rsync-native llvm-native" @@ -12,6 +12,7 @@ SRC_URI:append:libc-musl = "\ " SRC_URI += "file://run-ptest \ file://COPYING \ + file://0001-selftests-timers-Fix-clock_adjtime-for-newer-32-bit-.patch \ " # now we just test bpf and vm @@ -108,7 +109,7 @@ do_install() { } do_configure() { - install -D -m 0644 ${WORKDIR}/COPYING ${S}/COPYING + install -D -m 0644 ${UNPACKDIR}/COPYING ${S}/COPYING } do_patch[prefuncs] += "copy_kselftest_source_from_kernel remove_unrelated" @@ -137,6 +138,8 @@ remove_unrelated() { fi } +do_configure[dirs] = "${S}" + PACKAGE_ARCH = "${MACHINE_ARCH}" INHIBIT_PACKAGE_DEBUG_SPLIT="1" diff --git a/sources/meta-openembedded/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest/0001-selftests-timers-Fix-clock_adjtime-for-newer-32-bit-.patch b/sources/meta-openembedded/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest/0001-selftests-timers-Fix-clock_adjtime-for-newer-32-bit-.patch new file mode 100644 index 00000000..bf5525c3 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest/0001-selftests-timers-Fix-clock_adjtime-for-newer-32-bit-.patch @@ -0,0 +1,34 @@ +From 34021e84d03e2becb88e6c28e8e4867e82a81da5 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 17 Sep 2024 17:40:03 -0700 +Subject: [PATCH] selftests: timers: Fix clock_adjtime for newer 32-bit arches + +Newer 32-bit architectures e.g. riscv32 are using 64-bit time_t +from get go, they have not wired __NR_clock_adjtime at all +valid-adjtimex testcase fails to compile on such architectures. +if this condition is found then use 64-bit adjtime syscall + +Upstream-Status: Submitted [https://patchwork.kernel.org/project/linux-kselftest/patch/20240918004731.3295870-1-raj.khem@gmail.com/] +Signed-off-by: Khem Raj +Cc: John Stultz +Cc: Shuah Khan +--- + tools/testing/selftests/timers/valid-adjtimex.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/tools/testing/selftests/timers/valid-adjtimex.c b/tools/testing/selftests/timers/valid-adjtimex.c +index d500884801d8..ff4ff8b1d127 100644 +--- a/tools/testing/selftests/timers/valid-adjtimex.c ++++ b/tools/testing/selftests/timers/valid-adjtimex.c +@@ -39,7 +39,11 @@ + #include + int clock_adjtime(clockid_t id, struct timex *tx) + { ++#if !defined(__NR_clock_adjtime) && defined(__NR_clock_adjtime64) ++ return syscall(__NR_clock_adjtime64, id, tx); ++#else + return syscall(__NR_clock_adjtime, id, tx); ++#endif + } + + diff --git a/sources/meta-openembedded/meta-oe/recipes-kernel/libbpf/libbpf_1.4.0.bb b/sources/meta-openembedded/meta-oe/recipes-kernel/libbpf/libbpf_1.4.0.bb deleted file mode 100644 index f2ec48f3..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-kernel/libbpf/libbpf_1.4.0.bb +++ /dev/null @@ -1,36 +0,0 @@ -SUMMARY = "Library for BPF handling" -DESCRIPTION = "Library for BPF handling" -HOMEPAGE = "https://github.com/libbpf/libbpf" -SECTION = "libs" -LICENSE = "LGPL-2.1-or-later" - -LIC_FILES_CHKSUM = "file://../LICENSE.LGPL-2.1;md5=b370887980db5dd40659b50909238dbd" - -DEPENDS = "zlib elfutils" - -SRC_URI = "git://github.com/libbpf/libbpf.git;protocol=https;branch=master" -SRCREV = "20ea95b4505c477af3b6ff6ce9d19cee868ddc5d" - -PACKAGE_ARCH = "${MACHINE_ARCH}" -COMPATIBLE_HOST = "(x86_64|i.86|arm|aarch64|riscv64|powerpc|powerpc64|mips64).*-linux" - -S = "${WORKDIR}/git/src" - -EXTRA_OEMAKE += "DESTDIR=${D} LIBDIR=${libdir} INCLUDEDIR=${includedir}" -EXTRA_OEMAKE:append:class-native = " UAPIDIR=${includedir}" - -inherit pkgconfig - -do_compile() { - oe_runmake -} - -do_install() { - oe_runmake install -} - -do_install:append:class-native() { - oe_runmake install_uapi_headers -} - -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-oe/recipes-kernel/libbpf/libbpf_1.4.6.bb b/sources/meta-openembedded/meta-oe/recipes-kernel/libbpf/libbpf_1.4.6.bb new file mode 100644 index 00000000..914ac9f0 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-kernel/libbpf/libbpf_1.4.6.bb @@ -0,0 +1,36 @@ +SUMMARY = "Library for BPF handling" +DESCRIPTION = "Library for BPF handling" +HOMEPAGE = "https://github.com/libbpf/libbpf" +SECTION = "libs" +LICENSE = "LGPL-2.1-or-later" + +LIC_FILES_CHKSUM = "file://../LICENSE.LGPL-2.1;md5=b370887980db5dd40659b50909238dbd" + +DEPENDS = "zlib elfutils" + +SRC_URI = "git://github.com/libbpf/libbpf.git;protocol=https;branch=libbpf-1.4.6" +SRCREV = "fdf402b384cc42ce29bb9e27011633be3cbafe1e" + +PACKAGE_ARCH = "${MACHINE_ARCH}" +COMPATIBLE_HOST = "(x86_64|i.86|arm|aarch64|riscv64|powerpc|powerpc64|mips64).*-linux" + +S = "${WORKDIR}/git/src" + +EXTRA_OEMAKE += "DESTDIR=${D} LIBDIR=${libdir} INCLUDEDIR=${includedir}" +EXTRA_OEMAKE:append:class-native = " UAPIDIR=${includedir}" + +inherit pkgconfig + +do_compile() { + oe_runmake +} + +do_install() { + oe_runmake install +} + +do_install:append:class-native() { + oe_runmake install_uapi_headers +} + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-oe/recipes-kernel/libtracefs/libtracefs/0001-makefile-Do-not-preserve-ownership-in-cp-command.patch b/sources/meta-openembedded/meta-oe/recipes-kernel/libtracefs/libtracefs/0001-makefile-Do-not-preserve-ownership-in-cp-command.patch index 7ae0856f..7eaf29e4 100644 --- a/sources/meta-openembedded/meta-oe/recipes-kernel/libtracefs/libtracefs/0001-makefile-Do-not-preserve-ownership-in-cp-command.patch +++ b/sources/meta-openembedded/meta-oe/recipes-kernel/libtracefs/libtracefs/0001-makefile-Do-not-preserve-ownership-in-cp-command.patch @@ -1,4 +1,4 @@ -From 6650d0e79eea330b53635574885208a138fef97e Mon Sep 17 00:00:00 2001 +From ab6f78bfd6811c648ee71663cfc4dc8be151a519 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 21 Dec 2022 22:50:56 -0800 Subject: [PATCH] makefile: Do not preserve ownership in cp command @@ -14,10 +14,10 @@ Signed-off-by: Khem Raj 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile -index 27d425c..3aea142 100644 +index 7f4f5c3..1ba7b9d 100644 --- a/Makefile +++ b/Makefile -@@ -273,7 +273,7 @@ endif # DESTDIR = "" +@@ -296,7 +296,7 @@ endif # DESTDIR = "" install_libs: libs install_pkgconfig $(Q)$(call do_install,$(LIBTRACEFS_SHARED),$(libdir_SQ)); \ @@ -26,6 +26,3 @@ index 27d425c..3aea142 100644 $(Q)$(call do_install,$(src)/include/tracefs.h,$(includedir_SQ),644) $(Q)$(call install_ld_config) --- -2.39.0 - diff --git a/sources/meta-openembedded/meta-oe/recipes-kernel/libtracefs/libtracefs/0001-tracefs-perf-Add-missing-headers-for-syscall-and-SYS.patch b/sources/meta-openembedded/meta-oe/recipes-kernel/libtracefs/libtracefs/0001-tracefs-perf-Add-missing-headers-for-syscall-and-SYS.patch deleted file mode 100644 index a24dd131..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-kernel/libtracefs/libtracefs/0001-tracefs-perf-Add-missing-headers-for-syscall-and-SYS.patch +++ /dev/null @@ -1,31 +0,0 @@ -From f539d96ef4a34ad23d33c552d1770ab429b0220e Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Wed, 14 Jun 2023 00:24:36 -0700 -Subject: [PATCH] tracefs-perf: Add missing headers for syscall() and SYS_* - defines - -These headers are needed to provide prototype definitions for functions -e.g. close(), syscall(), getpagesize(), getpid() - -The issue is observed with clang-16+ compiler on musl systems - -Upstream-Status: Submitted [https://lore.kernel.org/linux-trace-devel/20230614072759.316154-1-raj.khem@gmail.com/T/#u] -Signed-off-by: Khem Raj ---- - src/tracefs-perf.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/tracefs-perf.c b/src/tracefs-perf.c -index 96d12cd..62c1508 100644 ---- a/src/tracefs-perf.c -+++ b/src/tracefs-perf.c -@@ -1,4 +1,5 @@ --#include -+#include -+#include - #include - #include - #include --- -2.41.0 - diff --git a/sources/meta-openembedded/meta-oe/recipes-kernel/libtracefs/libtracefs_1.7.0.bb b/sources/meta-openembedded/meta-oe/recipes-kernel/libtracefs/libtracefs_1.7.0.bb deleted file mode 100644 index 9a408ba1..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-kernel/libtracefs/libtracefs_1.7.0.bb +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright (C) 2022 Khem Raj -# Released under the MIT license (see COPYING.MIT for the terms) - -SUMMARY = "Library to parse raw trace event formats " -HOMEPAGE = "https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/" -LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later" -LIC_FILES_CHKSUM = "file://LICENSES/GPL-2.0;md5=e6a75371ba4d16749254a51215d13f97 \ - file://LICENSES/LGPL-2.1;md5=b370887980db5dd40659b50909238dbd" -SECTION = "libs" -DEPENDS = "libtraceevent bison-native flex-native" - -SRCREV = "aebab37379d0fbadc702d64aca0fe5cf18676404" -SRC_URI = "git://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git;branch=${BPN};protocol=https \ - file://0001-makefile-Do-not-preserve-ownership-in-cp-command.patch \ - file://0001-tracefs-perf-Add-missing-headers-for-syscall-and-SYS.patch \ - " -S = "${WORKDIR}/git" - -inherit pkgconfig - -do_install() { - oe_runmake install DESTDIR=${D} pkgconfig_dir=${libdir}/pkgconfig -} diff --git a/sources/meta-openembedded/meta-oe/recipes-kernel/libtracefs/libtracefs_1.8.1.bb b/sources/meta-openembedded/meta-oe/recipes-kernel/libtracefs/libtracefs_1.8.1.bb new file mode 100644 index 00000000..66869b29 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-kernel/libtracefs/libtracefs_1.8.1.bb @@ -0,0 +1,22 @@ +# Copyright (C) 2022 Khem Raj +# Released under the MIT license (see COPYING.MIT for the terms) + +SUMMARY = "Library to parse raw trace event formats " +HOMEPAGE = "https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/" +LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later" +LIC_FILES_CHKSUM = "file://LICENSES/GPL-2.0;md5=e6a75371ba4d16749254a51215d13f97 \ + file://LICENSES/LGPL-2.1;md5=b370887980db5dd40659b50909238dbd" +SECTION = "libs" +DEPENDS = "libtraceevent bison-native flex-native" + +SRCREV = "417c2e3aa21af670cc5c13db633dd35292f2d0fa" +SRC_URI = "git://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git;branch=${BPN};protocol=https \ + file://0001-makefile-Do-not-preserve-ownership-in-cp-command.patch \ + " +S = "${WORKDIR}/git" + +inherit pkgconfig + +do_install() { + oe_runmake install DESTDIR=${D} pkgconfig_dir=${libdir}/pkgconfig +} diff --git a/sources/meta-openembedded/meta-oe/recipes-kernel/linux/linux.inc b/sources/meta-openembedded/meta-oe/recipes-kernel/linux/linux.inc index b4b06612..79a916d4 100644 --- a/sources/meta-openembedded/meta-oe/recipes-kernel/linux/linux.inc +++ b/sources/meta-openembedded/meta-oe/recipes-kernel/linux/linux.inc @@ -41,8 +41,8 @@ do_configure:prepend() { # # logo support, if you supply logo_linux_clut224.ppm in SRC_URI, then it's going to be used # - if [ -e ${WORKDIR}/logo_linux_clut224.ppm ]; then - install -m 0644 ${WORKDIR}/logo_linux_clut224.ppm drivers/video/logo/logo_linux_clut224.ppm + if [ -e ${UNPACKDIR}/logo_linux_clut224.ppm ]; then + install -m 0644 ${UNPACKDIR}/logo_linux_clut224.ppm drivers/video/logo/logo_linux_clut224.ppm kernel_conf_variable LOGO y kernel_conf_variable LOGO_LINUX_CLUT224 y fi diff --git a/sources/meta-openembedded/meta-oe/recipes-kernel/minicoredumper/minicoredumper_2.0.7.bb b/sources/meta-openembedded/meta-oe/recipes-kernel/minicoredumper/minicoredumper_2.0.7.bb index 726aa60c..90e847c1 100644 --- a/sources/meta-openembedded/meta-oe/recipes-kernel/minicoredumper/minicoredumper_2.0.7.bb +++ b/sources/meta-openembedded/meta-oe/recipes-kernel/minicoredumper/minicoredumper_2.0.7.bb @@ -36,9 +36,9 @@ do_install:append() { cp -rf ${S}/etc/* ${D}/${sysconfdir}/ install -d ${D}${systemd_system_unitdir} - install -m 0644 ${WORKDIR}/minicoredumper.service ${D}${systemd_system_unitdir} + install -m 0644 ${UNPACKDIR}/minicoredumper.service ${D}${systemd_system_unitdir} install -d ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/minicoredumper.init ${D}${sysconfdir}/init.d/minicoredumper + install -m 0755 ${UNPACKDIR}/minicoredumper.init ${D}${sysconfdir}/init.d/minicoredumper # correct path of minicoredumper sed -i -e s:/usr/bin/minicoredumper:${sbindir}/minicoredumper:g ${D}${sysconfdir}/init.d/minicoredumper diff --git a/sources/meta-openembedded/meta-oe/recipes-kernel/oprofile/oprofile/0011-replace-__FILE__-with-__FILE_NAME__.patch b/sources/meta-openembedded/meta-oe/recipes-kernel/oprofile/oprofile/0011-replace-__FILE__-with-__FILE_NAME__.patch new file mode 100644 index 00000000..90203296 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-kernel/oprofile/oprofile/0011-replace-__FILE__-with-__FILE_NAME__.patch @@ -0,0 +1,47 @@ +From 640b116618b89eeddd61a91b793bb3c879adfe57 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 7 May 2024 19:56:59 -0700 +Subject: [PATCH] replace __FILE__ with __FILE_NAME__ + +This helps build paths not beeing assumed during runtime +since in cross-builds its possible that absolute paths during +build will not match runtime paths + +Upstream-Status: Inappropriate [OE-Specific] + +Signed-off-by: Khem Raj +--- + libutil++/tests/file_manip_tests.cpp | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/libutil++/tests/file_manip_tests.cpp b/libutil++/tests/file_manip_tests.cpp +index dfe161b..3d960bc 100644 +--- a/libutil++/tests/file_manip_tests.cpp ++++ b/libutil++/tests/file_manip_tests.cpp +@@ -138,9 +138,9 @@ static void is_directory_tests() + static input_output, bool> + expect_is_files_identical[] = { + #define MAKE_PAIR(a, b) make_pair(string(a), string(b)) +- { MAKE_PAIR(__FILE__, __FILE__), true }, +- { MAKE_PAIR(__FILE__, "not_existing"), false }, +- { MAKE_PAIR("not_exisiting", __FILE__), false }, ++ { MAKE_PAIR(__FILE_NAME__, __FILE_NAME__), true }, ++ { MAKE_PAIR(__FILE_NAME__, "not_existing"), false }, ++ { MAKE_PAIR("not_exisiting", __FILE_NAME__), false }, + { MAKE_PAIR("not_exisiting", "not_existing"), false }, + { MAKE_PAIR("", ""), false } + #undef MAKE_PAIR +@@ -163,8 +163,8 @@ void is_files_identical_tests(char const * prog_name) + + static input_output expect_op_file_readable[] = + { +- { __FILE__, true }, +- { "./" __FILE__, true }, ++ { __FILE_NAME__, true }, ++ { "./" __FILE_NAME__, true }, + { ".", false }, + { "/.", false }, + { "./", false }, +-- +2.45.0 + diff --git a/sources/meta-openembedded/meta-oe/recipes-kernel/oprofile/oprofile_1.4.0.bb b/sources/meta-openembedded/meta-oe/recipes-kernel/oprofile/oprofile_1.4.0.bb index 092d2274..45f70aa3 100644 --- a/sources/meta-openembedded/meta-oe/recipes-kernel/oprofile/oprofile_1.4.0.bb +++ b/sources/meta-openembedded/meta-oe/recipes-kernel/oprofile/oprofile_1.4.0.bb @@ -30,6 +30,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \ file://0008-include-linux-limits.h-for-MAX_INPUT.patch \ file://0009-Prevent-running-check-tests-on-host-if-cross-compili.patch \ file://0010-oprofile-Determine-the-root-home-directory-dynamical.patch \ + file://0011-replace-__FILE__-with-__FILE_NAME__.patch \ file://0001-configure-Include-unistd.h-for-getpid-API.patch \ file://0001-Replace-std-bind2nd-with-generic-lambda.patch \ " @@ -42,7 +43,7 @@ inherit autotools pkgconfig ptest EXTRA_OECONF = "--with-kernel=${STAGING_DIR_HOST}${prefix} --without-x ac_cv_prog_XSLTPROC=" do_configure () { - cp ${WORKDIR}/acinclude.m4 ${S}/ + cp ${UNPACKDIR}/acinclude.m4 ${S}/ autotools_do_configure } diff --git a/sources/meta-openembedded/meta-oe/recipes-kernel/spidev-test/spidev-test.bb b/sources/meta-openembedded/meta-oe/recipes-kernel/spidev-test/spidev-test.bb index 7b87dd28..2e8c5cbb 100644 --- a/sources/meta-openembedded/meta-oe/recipes-kernel/spidev-test/spidev-test.bb +++ b/sources/meta-openembedded/meta-oe/recipes-kernel/spidev-test/spidev-test.bb @@ -6,7 +6,7 @@ PROVIDES = "virtual/spidev-test" inherit bash-completion kernelsrc kernel-arch -do_populate_lic[depends] += "virtual/kernel:do_shared_workdir" +do_populate_lic[depends] += "virtual/kernel:do_patch" EXTRA_OEMAKE = "-C ${S}/tools/spi O=${B} CROSS=${TARGET_PREFIX} CC="${CC}" LD="${LD}" AR=${AR} ARCH=${ARCH}" diff --git a/sources/meta-openembedded/meta-oe/recipes-kernel/turbostat/turbostat_3.4.bb b/sources/meta-openembedded/meta-oe/recipes-kernel/turbostat/turbostat_3.4.bb index bdc37c03..cfe3bb96 100644 --- a/sources/meta-openembedded/meta-oe/recipes-kernel/turbostat/turbostat_3.4.bb +++ b/sources/meta-openembedded/meta-oe/recipes-kernel/turbostat/turbostat_3.4.bb @@ -12,7 +12,7 @@ processor frequency and idle power saving state residency on supported \ processors." LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://../COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" +LIC_FILES_CHKSUM = "file://${UNPACKDIR}/COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" COMPATIBLE_HOST = '(x86_64.*|i.86.*)-linux' COMPATIBLE_HOST:libc-musl = "null" @@ -20,6 +20,9 @@ SRC_URI += "\ file://COPYING \ " +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" + PACKAGE_ARCH = "${MACHINE_ARCH}" DEPENDS = "libcap" @@ -30,7 +33,7 @@ do_populate_lic[depends] = "${PN}:do_configure" EXTRA_OEMAKE = '\ - CC="${CC}" 'CFLAGS=-Wall ${LDFLAGS}' \ + CC="${CC}" 'CFLAGS=-Wall ${LDFLAGS}' \ ' # If we build under STAGING_KERNEL_DIR, source will not be put @@ -49,13 +52,21 @@ do_configure:prepend() { cp -r ${STAGING_KERNEL_DIR}/include/linux/bits.h ${S} cp -r ${STAGING_KERNEL_DIR}/include/linux/const.h ${S} fi + if [ -f "${STAGING_KERNEL_DIR}/tools/include/linux/build_bug.h" ]; then + cp -r ${STAGING_KERNEL_DIR}/tools/include/linux/build_bug.h ${S} + fi + cp -r ${STAGING_KERNEL_DIR}/tools/include/linux/compiler.h ${S} + cp -r ${STAGING_KERNEL_DIR}/tools/include/linux/compiler_types.h ${S} + cp -r ${STAGING_KERNEL_DIR}/tools/include/linux/compiler-gcc.h ${S} cp -r ${STAGING_KERNEL_DIR}/tools/power/x86/turbostat/* ${S} - cp -r ${WORKDIR}/COPYING ${S} } do_compile() { sed -i 's##"bits.h"#' msr-index.h + sed -i 's##"compiler.h"#' build_bug.h + sed -i 's##"compiler_types.h"#' compiler.h + sed -i 's##"compiler-gcc.h"#' compiler_types.h 'TMPCHECK='grep "" bits.h'' || true if [ -n $TMPCHECK ]; then sed -i 's##"const.h"#' bits.h @@ -64,8 +75,15 @@ do_compile() { sed -i 's##"const.h"#' bits.h sed -i -e 's###' -e 's#_LINUX_CONST_H#_LINUX_CONST_H_KERNEL#' const.h fi + echo '#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))' >> msr-index.h + echo "#define BIT(x) (1 << (x))" > bits.h + echo "#define BIT_ULL(nr) (1ULL << (nr))" >> bits.h + echo "#define GENMASK(h, l) (((~0UL) << (l)) & (~0UL >> (sizeof(long) * 8 - 1 - (h))))" >> bits.h + echo "#define GENMASK_ULL(h, l) (((~0ULL) << (l)) & (~0ULL >> (sizeof(long long) * 8 - 1 - (h))))" >> bits.h + sed -i 's#MSRHEADER#"msr-index.h"#' turbostat.c sed -i 's#INTEL_FAMILY_HEADER#"intel-family.h"#' turbostat.c + sed -i 's#BUILD_BUG_HEADER#"build_bug.h"#' turbostat.c sed -i 's#\$(CC) \$(CFLAGS) \$< -o \$(BUILD_OUTPUT)/\$@#\$(CC) \$(CFLAGS) \$(LDFLAGS) \$< -o \$(BUILD_OUTPUT)/\$@#' Makefile oe_runmake STAGING_KERNEL_DIR=${STAGING_KERNEL_DIR} } diff --git a/sources/meta-openembedded/meta-oe/recipes-multimedia/audiofile/audiofile_0.3.6.bb b/sources/meta-openembedded/meta-oe/recipes-multimedia/audiofile/audiofile_0.3.6.bb index a09f8438..d10c7a8b 100644 --- a/sources/meta-openembedded/meta-oe/recipes-multimedia/audiofile/audiofile_0.3.6.bb +++ b/sources/meta-openembedded/meta-oe/recipes-multimedia/audiofile/audiofile_0.3.6.bb @@ -13,6 +13,11 @@ SRC_URI = " \ file://0001-fix-negative-shift-constants.patch \ file://0002-fix-build-on-gcc6.patch \ file://0003-fix-CVE-2015-7747.patch \ + file://0004-Always-check-the-number-of-coefficients.patch \ + file://0005-clamp-index-values-to-fix-index-overflow-in-IMA.cpp.patch \ + file://0006-Check-for-multiplication-overflow-in-sfconvert.patch \ + file://0007-Actually-fail-when-error-occurs-in-parseFormat.patch \ + file://0008-Check-for-multiplication-overflow-in-MSADPCM-decodeS.patch \ " SRC_URI[md5sum] = "235dde14742317328f0109e9866a8008" SRC_URI[sha256sum] = "ea2449ad3f201ec590d811db9da6d02ffc5e87a677d06b92ab15363d8cb59782" diff --git a/sources/meta-openembedded/meta-oe/recipes-multimedia/audiofile/files/0004-Always-check-the-number-of-coefficients.patch b/sources/meta-openembedded/meta-oe/recipes-multimedia/audiofile/files/0004-Always-check-the-number-of-coefficients.patch new file mode 100644 index 00000000..17a97163 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-multimedia/audiofile/files/0004-Always-check-the-number-of-coefficients.patch @@ -0,0 +1,46 @@ +From c48e4c6503f7dabd41f11d4c9c7b7f8960e7f2c0 Mon Sep 17 00:00:00 2001 +From: Antonio Larrosa +Date: Mon, 6 Mar 2017 12:51:22 +0100 +Subject: [PATCH] Always check the number of coefficients + +When building the library with NDEBUG, asserts are eliminated +so it's better to always check that the number of coefficients +is inside the array range. + +This fixes the 00191-audiofile-indexoob issue in #41 + +Signed-off-by: Peter Korsgaard + +CVE: CVE-2017-6827 +CVE: CVE-2017-6828 +CVE: CVE-2017-6832 +CVE: CVE-2017-6833 +CVE: CVE-2017-6835 +CVE: CVE-2017-6837 +CVE: CVE-2020-18781 +Upstream-Status: Inactive-Upstream [lastrelease: 2013] +Signed-off-by: Peter Marko +--- + libaudiofile/WAVE.cpp | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/libaudiofile/WAVE.cpp b/libaudiofile/WAVE.cpp +index 0e81cf7..61f9541 100644 +--- a/libaudiofile/WAVE.cpp ++++ b/libaudiofile/WAVE.cpp +@@ -281,6 +281,12 @@ status WAVEFile::parseFormat(const Tag &id, uint32_t size) + + /* numCoefficients should be at least 7. */ + assert(numCoefficients >= 7 && numCoefficients <= 255); ++ if (numCoefficients < 7 || numCoefficients > 255) ++ { ++ _af_error(AF_BAD_HEADER, ++ "Bad number of coefficients"); ++ return AF_FAIL; ++ } + + m_msadpcmNumCoefficients = numCoefficients; + +-- +2.11.0 + diff --git a/sources/meta-openembedded/meta-oe/recipes-multimedia/audiofile/files/0005-clamp-index-values-to-fix-index-overflow-in-IMA.cpp.patch b/sources/meta-openembedded/meta-oe/recipes-multimedia/audiofile/files/0005-clamp-index-values-to-fix-index-overflow-in-IMA.cpp.patch new file mode 100644 index 00000000..00bb7e59 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-multimedia/audiofile/files/0005-clamp-index-values-to-fix-index-overflow-in-IMA.cpp.patch @@ -0,0 +1,43 @@ +From 25eb00ce913452c2e614548d7df93070bf0d066f Mon Sep 17 00:00:00 2001 +From: Antonio Larrosa +Date: Mon, 6 Mar 2017 18:02:31 +0100 +Subject: [PATCH] clamp index values to fix index overflow in IMA.cpp + +This fixes #33 +(also reported at https://bugzilla.opensuse.org/show_bug.cgi?id=1026981 +and https://blogs.gentoo.org/ago/2017/02/20/audiofile-global-buffer-overflow-in-decodesample-ima-cpp/) + +Signed-off-by: Peter Korsgaard + +CVE: CVE-2017-6829 +Upstream-Status: Inactive-Upstream [lastrelease: 2013] +Signed-off-by: Peter Marko +--- + libaudiofile/modules/IMA.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libaudiofile/modules/IMA.cpp b/libaudiofile/modules/IMA.cpp +index 7476d44..df4aad6 100644 +--- a/libaudiofile/modules/IMA.cpp ++++ b/libaudiofile/modules/IMA.cpp +@@ -169,7 +169,7 @@ int IMA::decodeBlockWAVE(const uint8_t *encoded, int16_t *decoded) + if (encoded[1] & 0x80) + m_adpcmState[c].previousValue -= 0x10000; + +- m_adpcmState[c].index = encoded[2]; ++ m_adpcmState[c].index = clamp(encoded[2], 0, 88); + + *decoded++ = m_adpcmState[c].previousValue; + +@@ -210,7 +210,7 @@ int IMA::decodeBlockQT(const uint8_t *encoded, int16_t *decoded) + predictor -= 0x10000; + + state.previousValue = clamp(predictor, MIN_INT16, MAX_INT16); +- state.index = encoded[1] & 0x7f; ++ state.index = clamp(encoded[1] & 0x7f, 0, 88); + encoded += 2; + + for (int n=0; n +Date: Mon, 6 Mar 2017 13:54:52 +0100 +Subject: [PATCH] Check for multiplication overflow in sfconvert + +Checks that a multiplication doesn't overflow when +calculating the buffer size, and if it overflows, +reduce the buffer size instead of failing. + +This fixes the 00192-audiofile-signintoverflow-sfconvert case +in #41 + +Signed-off-by: Peter Korsgaard + +CVE: CVE-2017-6830 +CVE: CVE-2017-6834 +CVE: CVE-2017-6836 +CVE: CVE-2017-6838 +Upstream-Status: Inactive-Upstream [lastrelease: 2013] +Signed-off-by: Peter Marko +--- + sfcommands/sfconvert.c | 34 ++++++++++++++++++++++++++++++++-- + 1 file changed, 32 insertions(+), 2 deletions(-) + +diff --git a/sfcommands/sfconvert.c b/sfcommands/sfconvert.c +index 80a1bc4..970a3e4 100644 +--- a/sfcommands/sfconvert.c ++++ b/sfcommands/sfconvert.c +@@ -45,6 +45,33 @@ void printusage (void); + void usageerror (void); + bool copyaudiodata (AFfilehandle infile, AFfilehandle outfile, int trackid); + ++int firstBitSet(int x) ++{ ++ int position=0; ++ while (x!=0) ++ { ++ x>>=1; ++ ++position; ++ } ++ return position; ++} ++ ++#ifndef __has_builtin ++#define __has_builtin(x) 0 ++#endif ++ ++int multiplyCheckOverflow(int a, int b, int *result) ++{ ++#if (defined __GNUC__ && __GNUC__ >= 5) || ( __clang__ && __has_builtin(__builtin_mul_overflow)) ++ return __builtin_mul_overflow(a, b, result); ++#else ++ if (firstBitSet(a)+firstBitSet(b)>31) // int is signed, so we can't use 32 bits ++ return true; ++ *result = a * b; ++ return false; ++#endif ++} ++ + int main (int argc, char **argv) + { + if (argc == 2) +@@ -323,8 +350,11 @@ bool copyaudiodata (AFfilehandle infile, AFfilehandle outfile, int trackid) + { + int frameSize = afGetVirtualFrameSize(infile, trackid, 1); + +- const int kBufferFrameCount = 65536; +- void *buffer = malloc(kBufferFrameCount * frameSize); ++ int kBufferFrameCount = 65536; ++ int bufferSize; ++ while (multiplyCheckOverflow(kBufferFrameCount, frameSize, &bufferSize)) ++ kBufferFrameCount /= 2; ++ void *buffer = malloc(bufferSize); + + AFframecount totalFrames = afGetFrameCount(infile, AF_DEFAULT_TRACK); + AFframecount totalFramesWritten = 0; +-- +2.11.0 + diff --git a/sources/meta-openembedded/meta-oe/recipes-multimedia/audiofile/files/0007-Actually-fail-when-error-occurs-in-parseFormat.patch b/sources/meta-openembedded/meta-oe/recipes-multimedia/audiofile/files/0007-Actually-fail-when-error-occurs-in-parseFormat.patch new file mode 100644 index 00000000..38294ca2 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-multimedia/audiofile/files/0007-Actually-fail-when-error-occurs-in-parseFormat.patch @@ -0,0 +1,46 @@ +From a2e9eab8ea87c4ffc494d839ebb4ea145eb9f2e6 Mon Sep 17 00:00:00 2001 +From: Antonio Larrosa +Date: Mon, 6 Mar 2017 18:59:26 +0100 +Subject: [PATCH] Actually fail when error occurs in parseFormat + +When there's an unsupported number of bits per sample or an invalid +number of samples per block, don't only print an error message using +the error handler, but actually stop parsing the file. + +This fixes #35 (also reported at +https://bugzilla.opensuse.org/show_bug.cgi?id=1026983 and +https://blogs.gentoo.org/ago/2017/02/20/audiofile-heap-based-buffer-overflow-in-imadecodeblockwave-ima-cpp/ +) + +Signed-off-by: Peter Korsgaard + +CVE: CVE-2017-6831 +Upstream-Status: Inactive-Upstream [lastrelease: 2013] +Signed-off-by: Peter Marko +--- + libaudiofile/WAVE.cpp | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/libaudiofile/WAVE.cpp b/libaudiofile/WAVE.cpp +index 0e81cf7..d762249 100644 +--- a/libaudiofile/WAVE.cpp ++++ b/libaudiofile/WAVE.cpp +@@ -326,6 +326,7 @@ status WAVEFile::parseFormat(const Tag &id, uint32_t size) + { + _af_error(AF_BAD_NOT_IMPLEMENTED, + "IMA ADPCM compression supports only 4 bits per sample"); ++ return AF_FAIL; + } + + int bytesPerBlock = (samplesPerBlock + 14) / 8 * 4 * channelCount; +@@ -333,6 +334,7 @@ status WAVEFile::parseFormat(const Tag &id, uint32_t size) + { + _af_error(AF_BAD_CODEC_CONFIG, + "Invalid samples per block for IMA ADPCM compression"); ++ return AF_FAIL; + } + + track->f.sampleWidth = 16; +-- +2.11.0 + diff --git a/sources/meta-openembedded/meta-oe/recipes-multimedia/audiofile/files/0008-Check-for-multiplication-overflow-in-MSADPCM-decodeS.patch b/sources/meta-openembedded/meta-oe/recipes-multimedia/audiofile/files/0008-Check-for-multiplication-overflow-in-MSADPCM-decodeS.patch new file mode 100644 index 00000000..857ed78c --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-multimedia/audiofile/files/0008-Check-for-multiplication-overflow-in-MSADPCM-decodeS.patch @@ -0,0 +1,126 @@ +From beacc44eb8cdf6d58717ec1a5103c5141f1b37f9 Mon Sep 17 00:00:00 2001 +From: Antonio Larrosa +Date: Mon, 6 Mar 2017 13:43:53 +0100 +Subject: [PATCH] Check for multiplication overflow in MSADPCM decodeSample + +Check for multiplication overflow (using __builtin_mul_overflow +if available) in MSADPCM.cpp decodeSample and return an empty +decoded block if an error occurs. + +This fixes the 00193-audiofile-signintoverflow-MSADPCM case of #41 + +Signed-off-by: Peter Korsgaard + +CVE: CVE-2017-6839 +Upstream-Status: Inactive-Upstream [lastrelease: 2013] +Signed-off-by: Peter Marko +--- + libaudiofile/modules/BlockCodec.cpp | 5 ++-- + libaudiofile/modules/MSADPCM.cpp | 47 +++++++++++++++++++++++++++++++++---- + 2 files changed, 46 insertions(+), 6 deletions(-) + +diff --git a/libaudiofile/modules/BlockCodec.cpp b/libaudiofile/modules/BlockCodec.cpp +index 45925e8..4731be1 100644 +--- a/libaudiofile/modules/BlockCodec.cpp ++++ b/libaudiofile/modules/BlockCodec.cpp +@@ -52,8 +52,9 @@ void BlockCodec::runPull() + // Decompress into m_outChunk. + for (int i=0; i(m_inChunk->buffer) + i * m_bytesPerPacket, +- static_cast(m_outChunk->buffer) + i * m_framesPerPacket * m_track->f.channelCount); ++ if (decodeBlock(static_cast(m_inChunk->buffer) + i * m_bytesPerPacket, ++ static_cast(m_outChunk->buffer) + i * m_framesPerPacket * m_track->f.channelCount)==0) ++ break; + + framesRead += m_framesPerPacket; + } +diff --git a/libaudiofile/modules/MSADPCM.cpp b/libaudiofile/modules/MSADPCM.cpp +index 8ea3c85..ef9c38c 100644 +--- a/libaudiofile/modules/MSADPCM.cpp ++++ b/libaudiofile/modules/MSADPCM.cpp +@@ -101,24 +101,60 @@ static const int16_t adaptationTable[] = + 768, 614, 512, 409, 307, 230, 230, 230 + }; + ++int firstBitSet(int x) ++{ ++ int position=0; ++ while (x!=0) ++ { ++ x>>=1; ++ ++position; ++ } ++ return position; ++} ++ ++#ifndef __has_builtin ++#define __has_builtin(x) 0 ++#endif ++ ++int multiplyCheckOverflow(int a, int b, int *result) ++{ ++#if (defined __GNUC__ && __GNUC__ >= 5) || ( __clang__ && __has_builtin(__builtin_mul_overflow)) ++ return __builtin_mul_overflow(a, b, result); ++#else ++ if (firstBitSet(a)+firstBitSet(b)>31) // int is signed, so we can't use 32 bits ++ return true; ++ *result = a * b; ++ return false; ++#endif ++} ++ ++ + // Compute a linear PCM value from the given differential coded value. + static int16_t decodeSample(ms_adpcm_state &state, +- uint8_t code, const int16_t *coefficient) ++ uint8_t code, const int16_t *coefficient, bool *ok=NULL) + { + int linearSample = (state.sample1 * coefficient[0] + + state.sample2 * coefficient[1]) >> 8; ++ int delta; + + linearSample += ((code & 0x08) ? (code - 0x10) : code) * state.delta; + + linearSample = clamp(linearSample, MIN_INT16, MAX_INT16); + +- int delta = (state.delta * adaptationTable[code]) >> 8; ++ if (multiplyCheckOverflow(state.delta, adaptationTable[code], &delta)) ++ { ++ if (ok) *ok=false; ++ _af_error(AF_BAD_COMPRESSION, "Error decoding sample"); ++ return 0; ++ } ++ delta >>= 8; + if (delta < 16) + delta = 16; + + state.delta = delta; + state.sample2 = state.sample1; + state.sample1 = linearSample; ++ if (ok) *ok=true; + + return static_cast(linearSample); + } +@@ -212,13 +248,16 @@ int MSADPCM::decodeBlock(const uint8_t *encoded, int16_t *decoded) + { + uint8_t code; + int16_t newSample; ++ bool ok; + + code = *encoded >> 4; +- newSample = decodeSample(*state[0], code, coefficient[0]); ++ newSample = decodeSample(*state[0], code, coefficient[0], &ok); ++ if (!ok) return 0; + *decoded++ = newSample; + + code = *encoded & 0x0f; +- newSample = decodeSample(*state[1], code, coefficient[1]); ++ newSample = decodeSample(*state[1], code, coefficient[1], &ok); ++ if (!ok) return 0; + *decoded++ = newSample; + + encoded++; +-- +2.11.0 + diff --git a/sources/meta-openembedded/meta-oe/recipes-multimedia/cdrkit/cdrkit_1.1.11.bb b/sources/meta-openembedded/meta-oe/recipes-multimedia/cdrkit/cdrkit_1.1.11.bb index 9fd91114..225bc8ec 100644 --- a/sources/meta-openembedded/meta-oe/recipes-multimedia/cdrkit/cdrkit_1.1.11.bb +++ b/sources/meta-openembedded/meta-oe/recipes-multimedia/cdrkit/cdrkit_1.1.11.bb @@ -13,6 +13,7 @@ SRC_URI = "${DEBIAN_MIRROR}/main/c/${BPN}/${BPN}_${PV}.orig.tar.gz \ file://0001-genisoimage-Add-missing-extern-definition.patch \ file://0001-add-new-option-eltorito-platform.patch \ file://0001-genisoimage-Add-checksum.h-and-md5.h-for-function-pr.patch \ + file://fix-incompatible-pointer-type-error.patch \ " SRC_URI:append:class-nativesdk = " \ file://0001-install-netscsid-to-bin-for-nativesdk.patch \ @@ -62,3 +63,8 @@ do_install:append() { } BBCLASSEXTEND = "native nativesdk" + +# http://errors.yoctoproject.org/Errors/Details/766905/ +# cdrkit/1.1.11/cdrkit-1.1.11/genisoimage/eltorito.c:399:41: error: passing argument 1 of 'set_721' from incompatible pointer type [-Wincompatible-pointer-types] +# cdrkit/1.1.11/cdrkit-1.1.11/genisoimage/eltorito.c:422:25: error: passing argument 1 of 'set_721' from incompatible pointer type [-Wincompatible-pointer-types] +CFLAGS += "-Wno-error=incompatible-pointer-types" diff --git a/sources/meta-openembedded/meta-oe/recipes-multimedia/cdrkit/files/fix-incompatible-pointer-type-error.patch b/sources/meta-openembedded/meta-oe/recipes-multimedia/cdrkit/files/fix-incompatible-pointer-type-error.patch new file mode 100644 index 00000000..887a54f7 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-multimedia/cdrkit/files/fix-incompatible-pointer-type-error.patch @@ -0,0 +1,44 @@ +Fix incompatible pointer type error when gcc option '-Wincompatible-pointer-types' set: + +cdrkit-1.1.11/genisoimage/eltorito.c:399:41: error: passing argument 1 of 'set_721' from incompatible pointer type [-Wincompatible-pointer-types] + 399 | set_721(&last_section_header->entry_count, nentries); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | | + | char (*)[2] +In file included from cdrkit/1.1.11/cdrkit-1.1.11/genisoimage/eltorito.c:39: +cdrkit-1.1.11/genisoimage/genisoimage.h:507:21: note: expected 'char *' but argument is of type 'char (*)[2]' + 507 | extern void set_721(char *, unsigned int); + | ^~~~~~ + +Upstream-Status: Inactive-Upstream [lastrelease: 2010] + +[1]: https://en.wikipedia.org/wiki/Cdrkit + +Signed-off-by: Kai Kang + +--- + genisoimage/eltorito.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/genisoimage/eltorito.c b/genisoimage/eltorito.c +index a804988..e48d58c 100644 +--- a/genisoimage/eltorito.c ++++ b/genisoimage/eltorito.c +@@ -396,7 +396,7 @@ get_torito_desc(struct eltorito_boot_descriptor *boot_desc) + (arch != newarch) || + (current_boot_entry->type & ELTORITO_SECTION_HEADER)) { + if (last_section_header) +- set_721(&last_section_header->entry_count, nentries); ++ set_721((char *)(&last_section_header->entry_count), nentries); + nentries = 1; + last_section_header = (struct eltorito_sectionheader_entry *) + (de2->table + offset); +@@ -419,7 +419,7 @@ get_torito_desc(struct eltorito_boot_descriptor *boot_desc) + } + + if (last_section_header) { +- set_721(&last_section_header->entry_count, nentries); ++ set_721((char *)(&last_section_header->entry_count), nentries); + last_section_header->header_id[0] = EL_TORITO_SHDR_ID_LAST_SHDR; + } + diff --git a/sources/meta-openembedded/meta-oe/recipes-multimedia/libass/libass_0.17.1.bb b/sources/meta-openembedded/meta-oe/recipes-multimedia/libass/libass_0.17.1.bb deleted file mode 100644 index 800ad1b1..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-multimedia/libass/libass_0.17.1.bb +++ /dev/null @@ -1,27 +0,0 @@ -DESCRIPTION = "libass is a portable subtitle renderer for the ASS/SSA (Advanced Substation Alpha/Substation Alpha) subtitle format. It is mostly compatible with VSFilter." -HOMEPAGE = "https://github.com/libass/libass" -SECTION = "libs/multimedia" - -LICENSE = "ISC" -LIC_FILES_CHKSUM = "file://COPYING;md5=a42532a0684420bdb15556c3cdd49a75" - -DEPENDS = "fontconfig freetype fribidi harfbuzz" - -SRC_URI = "git://github.com/libass/libass.git;protocol=https;branch=0.17.1-branch" -SRCREV = "e8ad72accd3a84268275a9385beb701c9284e5b3" -S = "${WORKDIR}/git" - -inherit autotools pkgconfig - -PACKAGECONFIG[asm] = "--enable-asm,--disable-asm,nasm-native" -# use larger tiles in the rasterizer (better performance, slightly worse quality) -PACKAGECONFIG[largetiles] = "--enable-large-tiles,--disable-large-tiles" - -PACKAGECONFIG ??= "" -PACKAGECONFIG:append:x86-64 = " asm" - -PACKAGES =+ "${PN}-tests" - -FILES:${PN}-tests = " \ - ${libdir}/test/test \ -" diff --git a/sources/meta-openembedded/meta-oe/recipes-multimedia/libass/libass_0.17.3.bb b/sources/meta-openembedded/meta-oe/recipes-multimedia/libass/libass_0.17.3.bb new file mode 100644 index 00000000..3dd678f0 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-multimedia/libass/libass_0.17.3.bb @@ -0,0 +1,27 @@ +DESCRIPTION = "libass is a portable subtitle renderer for the ASS/SSA (Advanced Substation Alpha/Substation Alpha) subtitle format. It is mostly compatible with VSFilter." +HOMEPAGE = "https://github.com/libass/libass" +SECTION = "libs/multimedia" + +LICENSE = "ISC" +LIC_FILES_CHKSUM = "file://COPYING;md5=a42532a0684420bdb15556c3cdd49a75" + +DEPENDS = "fontconfig freetype fribidi harfbuzz" + +SRC_URI = "git://github.com/libass/libass.git;protocol=https;branch=master" +SRCREV = "e46aedea0a0d17da4c4ef49d84b94a7994664ab5" +S = "${WORKDIR}/git" + +inherit autotools pkgconfig + +PACKAGECONFIG[asm] = "--enable-asm,--disable-asm,nasm-native" +# use larger tiles in the rasterizer (better performance, slightly worse quality) +PACKAGECONFIG[largetiles] = "--enable-large-tiles,--disable-large-tiles" + +PACKAGECONFIG ??= "" +PACKAGECONFIG:append:x86-64 = " asm" + +PACKAGES =+ "${PN}-tests" + +FILES:${PN}-tests = " \ + ${libdir}/test/test \ +" diff --git a/sources/meta-openembedded/meta-oe/recipes-multimedia/libcdio/libcdio-paranoia_10.2+2.0.1.bb b/sources/meta-openembedded/meta-oe/recipes-multimedia/libcdio/libcdio-paranoia_10.2+2.0.1.bb index 53404e54..42507051 100644 --- a/sources/meta-openembedded/meta-oe/recipes-multimedia/libcdio/libcdio-paranoia_10.2+2.0.1.bb +++ b/sources/meta-openembedded/meta-oe/recipes-multimedia/libcdio/libcdio-paranoia_10.2+2.0.1.bb @@ -9,6 +9,9 @@ DEPENDS = "libcdio" SRC_URI = "${GNU_MIRROR}/libcdio/${BP}.tar.bz2" SRC_URI[sha256sum] = "33b1cf305ccfbfd03b43936975615000ce538b119989c4bec469577570b60e8a" +UPSTREAM_CHECK_URI = "https://github.com/rocky/libcdio-paranoia/releases" +UPSTREAM_CHECK_REGEX = "release-(?P\d+(\.\d+)+\+\d+(\.\d+)+)" + inherit autotools pkgconfig PACKAGES += "${PN}-utils" diff --git a/sources/meta-openembedded/meta-oe/recipes-multimedia/libjxl/libjxl/0001-cmake-Do-not-use-mrelax-all-with-clang-on-RISCV64.patch b/sources/meta-openembedded/meta-oe/recipes-multimedia/libjxl/libjxl/0001-cmake-Do-not-use-mrelax-all-with-clang-on-RISCV64.patch new file mode 100644 index 00000000..287dfc8c --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-multimedia/libjxl/libjxl/0001-cmake-Do-not-use-mrelax-all-with-clang-on-RISCV64.patch @@ -0,0 +1,56 @@ +From 0cf439c243dfdb6eee6133ee87172235a42e59c9 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 14 Sep 2024 22:04:06 +0000 +Subject: [PATCH] cmake: Do not use -mrelax-all with clang on RISCV64 + +This option causes clang 19+ to crash on riscv64 + +For RISC-V -mrelax-all causes the assembler stage to convert +all conditional branches into + + bcc reg, reg, tmplabel + jmp target +tmplabel: + +Unconditional jmp can reach targets a lot further than a conditional branch. +Unfortunately, jmp also has a limited range so sometimes needs to be +converted to an indirect jump which requires a scratch register. +We do all branch relaxation early for RISC-V during the compilation +stage so we can allocate the scratch register. + +If the assembler also does branch relaxation it will increase the size +of the function and may cause unconditional jmps to go out of range. +If this happens, linking will fail. + +Upstream-Status: Submitted [https://github.com/libjxl/libjxl/pull/3826] +Signed-off-by: Khem Raj +--- + CMakeLists.txt | 2 +- + CONTRIBUTORS | 1 + + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8b2ccb57..39bee096 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -335,7 +335,7 @@ else () + + # Machine flags. + add_compile_options(-funwind-tables) +- if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") ++ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND NOT CMAKE_SYSTEM_PROCESSOR MATCHES "riscv") + add_compile_options("SHELL:-Xclang -mrelax-all") + endif() + if (CXX_CONSTRUCTOR_ALIASES_SUPPORTED) +diff --git a/CONTRIBUTORS b/CONTRIBUTORS +index 848096f9..a88c6157 100644 +--- a/CONTRIBUTORS ++++ b/CONTRIBUTORS +@@ -10,6 +10,7 @@ Iulia-Maria Comșa + Jan Wassenberg + Jon Sneyers + Jyrki Alakuijala ++Khem Raj + Krzysztof Potempa + Lode Vandevenne + Luca Versari diff --git a/sources/meta-openembedded/meta-oe/recipes-multimedia/libjxl/libjxl_0.10.2.bb b/sources/meta-openembedded/meta-oe/recipes-multimedia/libjxl/libjxl_0.10.2.bb deleted file mode 100644 index eced6c77..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-multimedia/libjxl/libjxl_0.10.2.bb +++ /dev/null @@ -1,39 +0,0 @@ -SUMMARY = "Reference implementation of JPEG XL (encoder and decoder)" -HOMEPAGE = "https://github.com/libjxl/libjxl/" - -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=6a905a337cc228a1f68f0b5416f52a7f" - -inherit cmake pkgconfig mime - -DEPENDS = "highway brotli" - -SRC_URI = "gitsm://github.com/libjxl/libjxl.git;protocol=https;nobranch=1" - -SRCREV = "e1489592a770b989303b0edc5cc1dc447bbe0515" -S = "${WORKDIR}/git" - -EXTRA_OECMAKE = " \ - -DCMAKE_BUILD_TYPE=Release \ - -DJPEGXL_ENABLE_PLUGINS=ON \ - -DBUILD_TESTING=OFF \ - -DJPEGXL_WARNINGS_AS_ERRORS=OFF \ - -DJPEGXL_ENABLE_SIZELESS_VECTORS=ON \ - -DJPEGXL_ENABLE_SJPEG=OFF \ - -DJPEGXL_ENABLE_BENCHMARK=OFF \ - -DJPEGXL_ENABLE_EXAMPLES=OFF \ - -DJPEGXL_ENABLE_MANPAGES=OFF \ - -DJPEGXL_ENABLE_SKCMS=ON \ - -DJPEGXL_FORCE_SYSTEM_BROTLI=ON \ - -DJPEGXL_FORCE_SYSTEM_HWY=ON \ - -DJPEGXL_ENABLE_JNI=OFF \ - -DJPEGXL_ENABLE_TCMALLOC=OFF \ - -DJPEGXL_ENABLE_TOOLS=OFF \ -" - -PACKAGECONFIG ?= "mime gdk-pixbuf-loader" -PACKAGECONFIG[gdk-pixbuf-loader] = "-DJPEGXL_ENABLE_PLUGIN_GDKPIXBUF=ON,-DJPEGXL_ENABLE_PLUGIN_GDKPIXBUF=OFF,gdk-pixbuf" -PACKAGECONFIG[gimp] = "-DJPEGXL_ENABLE_PLUGIN_GIMP210=ON,-DJPEGXL_ENABLE_PLUGIN_GIMP210=OFF,gimp" -PACKAGECONFIG[mime] = "-DJPEGXL_ENABLE_PLUGIN_MIME=ON,-DJPEGXL_ENABLE_PLUGIN_MIME=OFF" - -FILES:${PN} += "${libdir}/gdk-pixbuf-2.0 ${datadir}" diff --git a/sources/meta-openembedded/meta-oe/recipes-multimedia/libjxl/libjxl_0.10.3.bb b/sources/meta-openembedded/meta-oe/recipes-multimedia/libjxl/libjxl_0.10.3.bb new file mode 100644 index 00000000..505fca4c --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-multimedia/libjxl/libjxl_0.10.3.bb @@ -0,0 +1,47 @@ +SUMMARY = "Reference implementation of JPEG XL (encoder and decoder)" +HOMEPAGE = "https://github.com/libjxl/libjxl/" + +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=6a905a337cc228a1f68f0b5416f52a7f" + +inherit cmake pkgconfig mime + +DEPENDS = "highway brotli" + +SRC_URI = "gitsm://github.com/libjxl/libjxl.git;protocol=https;nobranch=1 \ + file://0001-cmake-Do-not-use-mrelax-all-with-clang-on-RISCV64.patch \ + " + +SRCREV = "4a3b22d2600f92d8706fb72d85d52bfee2acbd54" +S = "${WORKDIR}/git" + +EXTRA_OECMAKE = " \ + -DCMAKE_BUILD_TYPE=Release \ + -DJPEGXL_ENABLE_PLUGINS=ON \ + -DBUILD_TESTING=OFF \ + -DJPEGXL_WARNINGS_AS_ERRORS=OFF \ + -DJPEGXL_ENABLE_SJPEG=OFF \ + -DJPEGXL_ENABLE_BENCHMARK=OFF \ + -DJPEGXL_ENABLE_EXAMPLES=OFF \ + -DJPEGXL_ENABLE_MANPAGES=OFF \ + -DJPEGXL_ENABLE_SKCMS=ON \ + -DJPEGXL_FORCE_SYSTEM_BROTLI=ON \ + -DJPEGXL_FORCE_SYSTEM_HWY=ON \ + -DJPEGXL_ENABLE_JNI=OFF \ + -DJPEGXL_ENABLE_TCMALLOC=OFF \ + -DJPEGXL_ENABLE_TOOLS=OFF \ +" + +PACKAGECONFIG ?= "mime gdk-pixbuf-loader sizeless-vectors" +# libjxl/0.10.2/recipe-sysroot/usr/include/hwy/ops/rvv-inl.h:591:17: error: use +# of undeclared identifier '__riscv_vsetvlmax_e8mf8' +# 591 | HWY_RVV_FOREACH(HWY_RVV_LANES, Lanes, setvlmax_e, _ALL) +# | ^ +PACKAGECONFIG:remove:riscv64 = "sizeless-vectors" +PACKAGECONFIG:remove:riscv32 = "sizeless-vectors" +PACKAGECONFIG[gdk-pixbuf-loader] = "-DJPEGXL_ENABLE_PLUGIN_GDKPIXBUF=ON,-DJPEGXL_ENABLE_PLUGIN_GDKPIXBUF=OFF,gdk-pixbuf" +PACKAGECONFIG[gimp] = "-DJPEGXL_ENABLE_PLUGIN_GIMP210=ON,-DJPEGXL_ENABLE_PLUGIN_GIMP210=OFF,gimp" +PACKAGECONFIG[mime] = "-DJPEGXL_ENABLE_PLUGIN_MIME=ON,-DJPEGXL_ENABLE_PLUGIN_MIME=OFF" +PACKAGECONFIG[sizeless-vectors] = "-DJPEGXL_ENABLE_SIZELESS_VECTORS=ON,-DJPEGXL_ENABLE_SIZELESS_VECTORS=OFF" + +FILES:${PN} += "${libdir}/gdk-pixbuf-2.0 ${datadir}" diff --git a/sources/meta-openembedded/meta-oe/recipes-multimedia/libopusenc/libopusenc_0.2.1.bb b/sources/meta-openembedded/meta-oe/recipes-multimedia/libopusenc/libopusenc_0.2.1.bb index 596c5fe8..151530ab 100644 --- a/sources/meta-openembedded/meta-oe/recipes-multimedia/libopusenc/libopusenc_0.2.1.bb +++ b/sources/meta-openembedded/meta-oe/recipes-multimedia/libopusenc/libopusenc_0.2.1.bb @@ -8,7 +8,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=174b92049c2c697eb73112801662a07c" DEPENDS = "libopus" -UPSTREAM_CHECK_URI = "https://github.com/xiph/libopusenc/releases" +UPSTREAM_CHECK_URI = "https://github.com/xiph/libopusenc/tags" +UPSTREAM_CHECK_REGEX = "releases/tag/v(?P\d+(\.\d+)+)" SRC_URI = "https://ftp.osuosl.org/pub/xiph/releases/opus/libopusenc-${PV}.tar.gz" SRC_URI[md5sum] = "f038ea0f4168d184c76b42d293697c57" diff --git a/sources/meta-openembedded/meta-oe/recipes-multimedia/live555/live555_20210824.bb b/sources/meta-openembedded/meta-oe/recipes-multimedia/live555/live555_20210824.bb index a899049b..80c770c3 100644 --- a/sources/meta-openembedded/meta-oe/recipes-multimedia/live555/live555_20210824.bb +++ b/sources/meta-openembedded/meta-oe/recipes-multimedia/live555/live555_20210824.bb @@ -27,7 +27,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ TARGET_CC_ARCH += "${LDFLAGS}" do_configure() { - cp ${WORKDIR}/config.linux-cross . + cp ${UNPACKDIR}/config.linux-cross . echo "COMPILE_OPTS+=" -fPIC -DXLOCALE_NOT_USED"" >> config.linux-cross ./genMakefiles linux-cross } diff --git a/sources/meta-openembedded/meta-oe/recipes-multimedia/mplayer/libplacebo_7.349.0.bb b/sources/meta-openembedded/meta-oe/recipes-multimedia/mplayer/libplacebo_7.349.0.bb new file mode 100644 index 00000000..b68e67a8 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-multimedia/mplayer/libplacebo_7.349.0.bb @@ -0,0 +1,22 @@ +SUMMARY ="Reusable library for GPU-accelerated video/image rendering primitives" +LICENSE = "Apache-2.0 & BSD-3-Clause & BSL-1.0 & MIT" +LIC_FILES_CHKSUM = "file://3rdparty/Vulkan-Headers/LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57 \ + file://3rdparty/fast_float/LICENSE-APACHE;md5=81db248e90379bcfc0582b578b009bc3 \ + file://3rdparty/fast_float/LICENSE-BOOST;md5=2c7a3fa82e66676005cd4ee2608fd7d2 \ + file://3rdparty/fast_float/LICENSE-MIT;md5=32b11d50c7d9788d4270f6a83f3e68eb \ + file://3rdparty/glad/LICENSE;md5=ae570f26774ac096cff8f992091a223c \ + file://3rdparty/jinja/LICENSE.rst;md5=5dc88300786f1c214c1e9827a5229462 \ + file://3rdparty/jinja/docs/license.rst;md5=5f4c795946979fabc2361be4c70d0a9f \ + file://3rdparty/markupsafe/LICENSE.rst;md5=ffeffa59c90c9c4a033c7574f8f3fb75 \ + file://3rdparty/markupsafe/docs/license.rst;md5=5f4c795946979fabc2361be4c70d0a9f \ + file://LICENSE;md5=435ed639f84d4585d93824e7da3d85da \ + file://demos/3rdparty/nuklear/src/LICENSE;md5=6052431ae6cd4f0082276c54996e7770 \ + file://demos/LICENSE;md5=65d3616852dbf7b1a6d4b53b00626032" + +SRC_URI = "gitsm://github.com/haasn/libplacebo;protocol=https;branch=master" + +SRCREV = "1fd3c7bde7b943fe8985c893310b5269a09b46c5" + +inherit meson pkgconfig + +S = "${WORKDIR}/git" diff --git a/sources/meta-openembedded/meta-oe/recipes-multimedia/mplayer/mpv/0001-file2string-Avoid-emitting-absolute-filepaths-into-g.patch b/sources/meta-openembedded/meta-oe/recipes-multimedia/mplayer/mpv/0001-file2string-Avoid-emitting-absolute-filepaths-into-g.patch new file mode 100644 index 00000000..b96ec5d4 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-multimedia/mplayer/mpv/0001-file2string-Avoid-emitting-absolute-filepaths-into-g.patch @@ -0,0 +1,33 @@ +From 9878681df9919d28da3e4c6cc706e264abd9df92 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 29 Aug 2024 17:54:15 -0700 +Subject: [PATCH] file2string: Avoid emitting absolute filepaths into generated + sources + +These sources are bundled into src packages to be distributed and leaking +buildpaths results in violating reproducibility norms. + +Upstream-Status: Submitted [https://github.com/mpv-player/mpv/pull/14763] + +Signed-off-by: Khem Raj +--- + TOOLS/file2string.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/TOOLS/file2string.py b/TOOLS/file2string.py +index 5b1c4a95d1..39c1122a35 100755 +--- a/TOOLS/file2string.py ++++ b/TOOLS/file2string.py +@@ -22,10 +22,10 @@ + # License along with mpv. If not, see . + # + +-import sys ++import os, sys + + def file2string(infilename, infile, outfile): +- outfile.write("// Generated from %s\n\n" % infilename) ++ outfile.write("// Generated from %s\n\n" % os.path.basename(infilename)) + + conv = ["\\%03o" % c for c in range(256)] + safe_chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" \ diff --git a/sources/meta-openembedded/meta-oe/recipes-multimedia/mplayer/mpv_0.35.1.bb b/sources/meta-openembedded/meta-oe/recipes-multimedia/mplayer/mpv_0.35.1.bb deleted file mode 100644 index 0f50a6e8..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-multimedia/mplayer/mpv_0.35.1.bb +++ /dev/null @@ -1,116 +0,0 @@ -SUMMARY = "Open Source multimedia player" -DESCRIPTION = "mpv is a fork of mplayer2 and MPlayer. It shares some features with the former projects while introducing many more." -SECTION = "multimedia" -HOMEPAGE = "http://www.mpv.io/" - -DEPENDS = " \ - zlib \ - ffmpeg \ - jpeg \ - libv4l \ - libass \ -" - -LICENSE = "GPL-2.0-or-later" -LIC_FILES_CHKSUM = "file://LICENSE.GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263" - -SRCREV_mpv = "140ec21c89d671d392877a7f3b91d67e7d7b9239" -SRC_URI = "git://github.com/mpv-player/mpv;name=mpv;branch=release/0.35;protocol=https \ - https://waf.io/waf-2.0.25;name=waf;subdir=git \ - " -SRC_URI[waf.sha256sum] = "21199cd220ccf60434133e1fd2ab8c8e5217c3799199c82722543970dc8e38d5" - -S = "${WORKDIR}/git" - -inherit waf pkgconfig mime-xdg - -LDFLAGS:append:riscv64 = " -latomic" - -LUA ?= "lua" -LUA:mips64 = "" -LUA:powerpc64 = "" -LUA:powerpc64le = "" -LUA:riscv64 = "" -LUA:riscv32 = "" -LUA:powerpc = "" - -# Note: lua is required to get on-screen-display (controls) -PACKAGECONFIG ??= " \ - ${LUA} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland egl', '', d)} \ - ${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)} \ - ${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)} \ -" - -PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,virtual/libx11 xsp libxv libxscrnsaver libxinerama libxpresent libxext" -PACKAGECONFIG[xv] = "--enable-xv,--disable-xv,libxv" -PACKAGECONFIG[opengl] = "--enable-gl,--disable-gl,virtual/libgl" -PACKAGECONFIG[egl] = "--enable-egl,--disable-egl,virtual/egl" -PACKAGECONFIG[drm] = "--enable-drm,--disable-drm,libdrm" -PACKAGECONFIG[gbm] = "--enable-gbm,--disable-gbm,virtual/libgbm" -PACKAGECONFIG[lua] = "--enable-lua,--disable-lua,lua luajit" -PACKAGECONFIG[libarchive] = "--enable-libarchive,--disable-libarchive,libarchive" -PACKAGECONFIG[jack] = "--enable-jack, --disable-jack, jack" -PACKAGECONFIG[vaapi] = "--enable-vaapi,--disable-vaapi,libva" -PACKAGECONFIG[vdpau] = "--enable-vdpau,--disable-vdpau,libvdpau" -PACKAGECONFIG[wayland] = "--enable-wayland,--disable-wayland,wayland wayland-native libxkbcommon" - -python __anonymous() { - packageconfig = (d.getVar("PACKAGECONFIG") or "").split() - extras = [] - if "x11" in packageconfig and "opengl" in packageconfig: - extras.append(" --enable-gl-x11") - if "x11" in packageconfig and "egl" in packageconfig: - extras.append(" --enable-egl-x11") - if "egl" in packageconfig and "drm" in packageconfig: - extras.append(" --enable-egl-drm") - if "vaapi" in packageconfig and "x11" in packageconfig: - extras.append(" --enable-vaapi-x11") - if "vaapi" in packageconfig and "drm" in packageconfig: - extras.append(" --enable-vaapi-drm") - if "vaapi" in packageconfig and "x11" in packageconfig and "egl" in packageconfig: - extras.append(" --enable-vaapi-x-egl") - if "vdpau" in packageconfig and "opengl" in packageconfig and "x11" in packageconfig: - extras.append(" --enable-vdpau-gl-x11") - if "wayland" in packageconfig and "opengl" in packageconfig: - extras.append(" --enable-gl-wayland") - if "wayland" in packageconfig and "vaapi" in packageconfig: - extras.append(" --enable-vaapi-wayland") - if extras: - d.appendVar("EXTRA_OECONF", "".join(extras)) -} - -SIMPLE_TARGET_SYS = "${@'${TARGET_SYS}'.replace('${TARGET_VENDOR}', '')}" - -EXTRA_OECONF = " \ - --prefix=${prefix} \ - --target=${SIMPLE_TARGET_SYS} \ - --confdir=${sysconfdir} \ - --datadir=${datadir} \ - --disable-manpage-build \ - --disable-libbluray \ - --disable-dvdnav \ - --disable-cdda \ - --disable-uchardet \ - --disable-rubberband \ - --disable-lcms2 \ - --disable-vapoursynth \ - ${PACKAGECONFIG_CONFARGS} \ -" - -do_configure:append() { - sed -i -e 's#${WORKDIR}##g' ${B}/config.h -} - -link_waf() { - ln -s waf-2.0.25 ${S}/waf -} -do_unpack[postfuncs] += "link_waf" - -FILES:${PN} += " \ - ${datadir}/icons \ - ${datadir}/zsh \ - ${datadir}/bash-completion \ - ${datadir}/metainfo \ - " -EXCLUDE_FROM_WORLD = "${@bb.utils.contains("LICENSE_FLAGS_ACCEPTED", "commercial", "0", "1", d)}" diff --git a/sources/meta-openembedded/meta-oe/recipes-multimedia/mplayer/mpv_0.38.0.bb b/sources/meta-openembedded/meta-oe/recipes-multimedia/mplayer/mpv_0.38.0.bb new file mode 100644 index 00000000..80e0f7ca --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-multimedia/mplayer/mpv_0.38.0.bb @@ -0,0 +1,107 @@ +SUMMARY = "Open Source multimedia player" +DESCRIPTION = "mpv is a fork of mplayer2 and MPlayer. It shares some features with the former projects while introducing many more." +SECTION = "multimedia" +HOMEPAGE = "http://www.mpv.io/" + +DEPENDS = " \ + zlib \ + ffmpeg \ + jpeg \ + libv4l \ + libass \ + libplacebo \ +" + +LICENSE = "GPL-2.0-or-later" +LIC_FILES_CHKSUM = "file://LICENSE.GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +SRCREV_mpv = "02254b92dd237f03aa0a151c2a68778c4ea848f9" +SRC_URI = "git://github.com/mpv-player/mpv;name=mpv;branch=release/0.38;protocol=https \ + file://0001-file2string-Avoid-emitting-absolute-filepaths-into-g.patch \ + " + +S = "${WORKDIR}/git" + +inherit meson pkgconfig mime-xdg + +LDFLAGS:append:riscv64 = " -latomic" + +LUA ?= "lua" +LUA:mips64 = "" +LUA:powerpc64 = "" +LUA:powerpc64le = "" +LUA:riscv64 = "" +LUA:riscv32 = "" +LUA:powerpc = "" + +# Note: lua is required to get on-screen-display (controls) +PACKAGECONFIG ??= " \ + ${LUA} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland egl', '', d)} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)} \ +" + +PACKAGECONFIG[x11] = "-Dx11=enabled,-Dx11=disabled,virtual/libx11 xsp libxv libxscrnsaver libxinerama libxpresent libxext" +PACKAGECONFIG[xv] = "-Dxv=enabled,-Dxv=disabled,libxv" +PACKAGECONFIG[opengl] = "-Dgl=enabled,-Dgl=disabled,virtual/libgl" +PACKAGECONFIG[egl] = "-Degl=enabled,-Degl-disabled,virtual/egl" +PACKAGECONFIG[drm] = "-Ddrm=enabled,-Ddrm=disabled,libdrm" +PACKAGECONFIG[gbm] = "-Dgbm=enabled,-Dgbm=disabled,virtual/libgbm" +PACKAGECONFIG[lua] = "-Dlua=luajit,-Dlua=disabled,lua luajit" +PACKAGECONFIG[libarchive] = "-Dlibarchive=enabled,-Dlibarchive=disabled,libarchive" +PACKAGECONFIG[jack] = "-Djack=enabled,-Djack=disabled,jack" +PACKAGECONFIG[vaapi] = "-Dvaapi=enabled,-Dvaapi=disabled,libva" +PACKAGECONFIG[vdpau] = "-Dvdpau=enabled,-Dvdpau=disabled,libvdpau" +PACKAGECONFIG[wayland] = "-Dwayland=enabled,-Dwayland=disabled,wayland wayland-native libxkbcommon" + +python __anonymous() { + packageconfig = (d.getVar("PACKAGECONFIG") or "").split() + extras = [] + if "x11" in packageconfig and "opengl" in packageconfig: + extras.append(" -Dgl-x11=enabled") + if "x11" in packageconfig and "egl" in packageconfig: + extras.append(" -Degl-x11=enabled") + if "egl" in packageconfig and "drm" in packageconfig: + extras.append(" -Degl-drm=enabled") + if "vaapi" in packageconfig and "x11" in packageconfig: + extras.append(" -Dvaapi-x11=enabled") + if "vaapi" in packageconfig and "drm" in packageconfig: + extras.append(" -Dvaapi-drm=enabled") + if "vaapi" in packageconfig and "x11" in packageconfig and "egl" in packageconfig: + extras.append(" -Dvaapi-x-egl=enabled") + if "vdpau" in packageconfig and "opengl" in packageconfig and "x11" in packageconfig: + extras.append(" -Dvdpau-gl-x11=enabled") + if "wayland" in packageconfig and "opengl" in packageconfig: + extras.append(" -Dgl-wayland=enabled") + if "wayland" in packageconfig and "vaapi" in packageconfig: + extras.append(" -Dvaapi-wayland=enabled") + if extras: + d.appendVar("EXTRA_OECONF", "".join(extras)) +} + +#SIMPLE_TARGET_SYS = "${@'${TARGET_SYS}'.replace('${TARGET_VENDOR}', '')}" + +EXTRA_OECONF = " \ + -Dmanpage-build=disabled \ + -Dlibbluray=disabled \ + -Ddvdnav=disabled \ + -Dcdda=disabled \ + -Duchardet=disabled \ + -Drubberband=disabled \ + -Dlcms2=disabled \ + -Dvapoursynth=disabled \ + ${PACKAGECONFIG_CONFARGS} \ +" + +do_configure:append() { + sed -i -e 's#${WORKDIR}##g' ${B}/config.h +} + +FILES:${PN} += " \ + ${datadir}/icons \ + ${datadir}/zsh \ + ${datadir}/bash-completion \ + ${datadir}/metainfo \ + " +EXCLUDE_FROM_WORLD = "${@bb.utils.contains("LICENSE_FLAGS_ACCEPTED", "commercial", "0", "1", d)}" diff --git a/sources/meta-openembedded/meta-oe/recipes-multimedia/sound-themes/sound-theme-freedesktop_0.8.bb b/sources/meta-openembedded/meta-oe/recipes-multimedia/sound-themes/sound-theme-freedesktop_0.8.bb index 87320a98..508519e4 100644 --- a/sources/meta-openembedded/meta-oe/recipes-multimedia/sound-themes/sound-theme-freedesktop_0.8.bb +++ b/sources/meta-openembedded/meta-oe/recipes-multimedia/sound-themes/sound-theme-freedesktop_0.8.bb @@ -11,6 +11,6 @@ inherit autotools gettext DEPENDS += "glib-2.0-native" -SRC_URI = "http://people.freedesktop.org/~mccann/dist/${BPN}-${PV}.tar.bz2" +SRC_URI = "https://people.freedesktop.org/~mccann/dist/${BPN}-${PV}.tar.bz2" SRC_URI[md5sum] = "d7387912cfd275282d1ec94483cb2f62" SRC_URI[sha256sum] = "cb518b20eef05ec2e82dda1fa89a292c1760dc023aba91b8aa69bafac85e8a14" diff --git a/sources/meta-openembedded/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0001-keytable-meson-Restrict-the-installation-of-50-rc_ke.patch b/sources/meta-openembedded/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0001-keytable-meson-Restrict-the-installation-of-50-rc_ke.patch deleted file mode 100644 index 64c01e49..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0001-keytable-meson-Restrict-the-installation-of-50-rc_ke.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 502c0302827cec3d2b2a69fb25189646685ef2ff Mon Sep 17 00:00:00 2001 -From: Fabio Estevam -Date: Fri, 12 Jan 2024 00:17:14 -0300 -Subject: [PATCH] keytable: meson: Restrict the installation of - 50-rc_keymap.conf - -Currently, meson tries to install 50-rc_keymap.conf even if systemd -is not used. - -Commit 01f2c6c58e6f ("keytable: restrict installation of 50-rc_keymap.conf"), -only allowed 50-rc_keymap.conf to be installed when both BPF and systemd -were used. - -Apply the same logic in meson to fix the problem. - -Signed-off-by: Fabio Estevam -Signed-off-by: Sean Young -Upstream-Status: Backport [https://git.linuxtv.org/v4l-utils.git/commit/?id=a21924ec424c4744af6f2a794e0677eba35dd168] ---- - utils/keytable/meson.build | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/utils/keytable/meson.build b/utils/keytable/meson.build -index 4130a4bea514..76ce329eae8e 100644 ---- a/utils/keytable/meson.build -+++ b/utils/keytable/meson.build -@@ -69,6 +69,8 @@ ir_keytable_udev_rules = files( - install_data(ir_keytable_udev_rules, - install_dir : ir_keytable_system_dir / 'rules.d') - -+if ir_bpf_enabled -+if dep_systemd.found() - if have_udevdsyscallfilter - ir_keytable_systemd_files = files( - '50-rc_keymap.conf', -@@ -76,6 +78,8 @@ if have_udevdsyscallfilter - install_data(ir_keytable_systemd_files, - install_dir : systemd_systemdir / 'systemd-udevd.service.d') - endif -+endif -+endif - - # Install non-existing directory to create empty directory structure - # See: https://github.com/mesonbuild/meson/issues/2904 --- -2.34.1 diff --git a/sources/meta-openembedded/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0002-media-ctl-Install-media-ctl-pkg-config-files.patch b/sources/meta-openembedded/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0002-media-ctl-Install-media-ctl-pkg-config-files.patch new file mode 100644 index 00000000..8a009ae8 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0002-media-ctl-Install-media-ctl-pkg-config-files.patch @@ -0,0 +1,49 @@ +From a422ddf7f8805d34ff1fbb46d335993c9cd05ead Mon Sep 17 00:00:00 2001 +From: Einar Jon Gunnarsson +Date: Fri, 10 May 2024 11:56:17 +0200 +Subject: [PATCH] media-ctl: Install media-ctl pkg-config files + +libv4l2subdev/libmediactl can not be used in projects without the +pkg-config files. This adds them as well. + +Upstream-Status: Denied + +This is an add-on to the previous patch: +0001-media-ctl-Install-media-ctl-header-and-library-files.patch +so same restrictions apply. + +Signed-off-by: Einar Jon Gunnarsson +--- + utils/media-ctl/meson.build | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git a/utils/media-ctl/meson.build b/utils/media-ctl/meson.build +index 40669b4c..6feba1af 100644 +--- a/utils/media-ctl/meson.build ++++ b/utils/media-ctl/meson.build +@@ -38,6 +38,12 @@ libv4l2subdev = library('v4l2subdev', + + dep_libv4l2subdev = declare_dependency(link_with : libv4l2subdev) + ++pkg.generate( ++ libv4l2subdev, ++ name : 'libv4l2subdev', ++ version : meson.project_version(), ++ description : 'v4l2 subdev library') ++ + media_ctl_sources = files( + 'media-ctl.c', + 'options.c', +@@ -55,3 +61,9 @@ media_ctl = executable('media-ctl', + dependencies : media_ctl_deps, + install : true, + include_directories : v4l2_utils_incdir) ++ ++pkg.generate( ++ libmediactl, ++ name : 'libmediactl', ++ version : meson.project_version(), ++ description : 'v4l2 mediactl library') +-- +2.43.5 + diff --git a/sources/meta-openembedded/meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.26.1.bb b/sources/meta-openembedded/meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.26.1.bb deleted file mode 100644 index eb38d971..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.26.1.bb +++ /dev/null @@ -1,86 +0,0 @@ -SUMMARY = "v4l2 and IR applications" -LICENSE = "GPL-2.0-only & LGPL-2.1-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=48da9957849056017dc568bbc43d8975 \ - file://COPYING.libv4l;md5=d749e86a105281d7a44c2328acebc4b0" -PROVIDES = "libv4l media-ctl" - -DEPENDS = "jpeg \ - ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/libx11', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'alsa', 'alsa-lib', '', d)} \ - ${@bb.utils.contains_any('PACKAGECONFIG', 'qv4l2 qvidcap', 'qtbase qtbase-native', '', d)}" - -DEPENDS:append:libc-musl = " argp-standalone" -DEPENDS:append:class-target = " udev" -LDFLAGS:append = " -pthread" -# v4l2 explicitly sets _FILE_OFFSET_BITS=32 to get access to -# both 32 and 64 bit file APIs. But it does not handle the time side? -# Needs further investigation -GLIBC_64BIT_TIME_FLAGS = "" - -inherit meson gettext pkgconfig - -PACKAGECONFIG ??= "" -PACKAGECONFIG[qv4l2] = ",-Dqv4l2=disabled" -PACKAGECONFIG[qvidcap] = ",-Dqvidcap=disabled" -PACKAGECONFIG[v4l2-tracer] = ",-Dv4l2-tracer=disabled,json-c" - -SRC_URI = "\ - git://git.linuxtv.org/v4l-utils.git;protocol=https;branch=stable-1.26 \ - file://0001-keytable-meson-Restrict-the-installation-of-50-rc_ke.patch \ - file://0001-media-ctl-Install-media-ctl-header-and-library-files.patch \ -" - -SRCREV = "4aee01a027923cab1e40969f56f8ba58d3e6c0d1" - -PV .= "+git" - -S = "${WORKDIR}/git" - -EXTRA_OEMESON = "-Dudevdir=${base_libdir}/udev -Dv4l2-compliance-32=false -Dv4l2-ctl-32=false" - -# Disable the erroneous installation of gconv-modules that would break glib -# like it is done in Debian and ArchLinux. -EXTRA_OEMESON += "-Dgconv=disabled" - -VIRTUAL-RUNTIME_ir-keytable-keymaps ?= "rc-keymaps" - -PACKAGES =+ "media-ctl ir-keytable rc-keymaps libv4l libv4l-dev qv4l2 qvidcap" - -RPROVIDES:${PN}-dbg += "libv4l-dbg" - -FILES:media-ctl = "${bindir}/media-ctl ${libdir}/libmediactl.so.*" -FILES:qv4l2 = "\ - ${bindir}/qv4l2 \ - ${datadir}/applications/qv4l2.desktop \ - ${datadir}/icons/hicolor/*/apps/qv4l2.* \ -" -FILES:qvidcap = "\ - ${bindir}/qvidcap \ - ${datadir}/applications/qvidcap.desktop \ - ${datadir}/icons/hicolor/*/apps/qvidcap.* \ -" - -FILES:ir-keytable = "${bindir}/ir-keytable ${base_libdir}/udev/rules.d/*-infrared.rules" -RDEPENDS:ir-keytable += "${VIRTUAL-RUNTIME_ir-keytable-keymaps}" -RDEPENDS:qv4l2 += "\ - ${@bb.utils.contains('PACKAGECONFIG', 'qv4l2', 'qtbase', '', d)}" -RDEPENDS:qvidcap += "\ - ${@bb.utils.contains('PACKAGECONFIG', 'qvidcap', 'qtbase', '', d)}" - -FILES:rc-keymaps = "${sysconfdir}/rc* ${base_libdir}/udev/rc*" - -FILES:${PN} = "${bindir} ${sbindir}" - -FILES:libv4l += "${libdir}/libv4l*${SOLIBS} ${libdir}/libv4l/*.so ${libdir}/libv4l/plugins/*.so \ - ${libdir}/libdvbv5*${SOLIBS} \ - ${libdir}/libv4l/*-decomp \ - ${libdir}/libv4l2tracer.so \ -" - -FILES:libv4l-dev += "${includedir} ${libdir}/pkgconfig \ - ${libdir}/libv4l*${SOLIBSDEV} ${libdir}/*.la \ - ${libdir}/v4l*${SOLIBSDEV} ${libdir}/libv4l/*.la ${libdir}/libv4l/plugins/*.la" - -PARALLEL_MAKE:class-native = "" -BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.28.1.bb b/sources/meta-openembedded/meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.28.1.bb new file mode 100644 index 00000000..afe217e1 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.28.1.bb @@ -0,0 +1,86 @@ +SUMMARY = "v4l2 and IR applications" +LICENSE = "GPL-2.0-only & LGPL-2.1-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=48da9957849056017dc568bbc43d8975 \ + file://COPYING.libv4l;md5=d749e86a105281d7a44c2328acebc4b0" +PROVIDES = "libv4l media-ctl" + +DEPENDS = "jpeg \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/libx11', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'alsa', 'alsa-lib', '', d)} \ + ${@bb.utils.contains_any('PACKAGECONFIG', 'qv4l2 qvidcap', 'qtbase qtbase-native', '', d)}" + +DEPENDS:append:libc-musl = " argp-standalone" +DEPENDS:append:class-target = " udev" +LDFLAGS:append = " -pthread" +# v4l2 explicitly sets _FILE_OFFSET_BITS=32 to get access to +# both 32 and 64 bit file APIs. But it does not handle the time side? +# Needs further investigation +GLIBC_64BIT_TIME_FLAGS = "" + +inherit meson gettext pkgconfig + +PACKAGECONFIG ??= "" +PACKAGECONFIG[qv4l2] = ",-Dqv4l2=disabled" +PACKAGECONFIG[qvidcap] = ",-Dqvidcap=disabled" +PACKAGECONFIG[v4l2-tracer] = ",-Dv4l2-tracer=disabled,json-c" + +SRC_URI = "\ + git://git.linuxtv.org/v4l-utils.git;protocol=https;branch=stable-1.28 \ + file://0001-media-ctl-Install-media-ctl-header-and-library-files.patch \ + file://0002-media-ctl-Install-media-ctl-pkg-config-files.patch \ +" + +SRCREV = "fc15e229d9d337e46d730f00647821adbbd58548" + +S = "${WORKDIR}/git" + +UPSTREAM_CHECK_GITTAGREGEX = "v4l-utils-(?P\d+(\.\d+)+)" + +EXTRA_OEMESON = "-Dudevdir=${base_libdir}/udev -Dv4l2-compliance-32=false -Dv4l2-ctl-32=false" + +# Disable the erroneous installation of gconv-modules that would break glib +# like it is done in Debian and ArchLinux. +EXTRA_OEMESON += "-Dgconv=disabled" + +VIRTUAL-RUNTIME_ir-keytable-keymaps ?= "rc-keymaps" + +PACKAGES =+ "media-ctl ir-keytable rc-keymaps libv4l libv4l-dev qv4l2 qvidcap" + +RPROVIDES:${PN}-dbg += "libv4l-dbg" + +FILES:media-ctl = "${bindir}/media-ctl ${libdir}/libmediactl.so.*" +FILES:qv4l2 = "\ + ${bindir}/qv4l2 \ + ${datadir}/applications/qv4l2.desktop \ + ${datadir}/icons/hicolor/*/apps/qv4l2.* \ +" +FILES:qvidcap = "\ + ${bindir}/qvidcap \ + ${datadir}/applications/qvidcap.desktop \ + ${datadir}/icons/hicolor/*/apps/qvidcap.* \ +" + +FILES:ir-keytable = "${bindir}/ir-keytable ${base_libdir}/udev/rules.d/*-infrared.rules" +RDEPENDS:ir-keytable += "${VIRTUAL-RUNTIME_ir-keytable-keymaps}" +RDEPENDS:qv4l2 += "\ + ${@bb.utils.contains('PACKAGECONFIG', 'qv4l2', 'qtbase', '', d)}" +RDEPENDS:qvidcap += "\ + ${@bb.utils.contains('PACKAGECONFIG', 'qvidcap', 'qtbase', '', d)}" + +FILES:rc-keymaps = "${sysconfdir}/rc* ${base_libdir}/udev/rc*" + +FILES:${PN} = "${bindir} ${sbindir}" + +FILES:libv4l += "${libdir}/libv4l*${SOLIBS} ${libdir}/libv4l/*.so ${libdir}/libv4l/plugins/*.so \ + ${libdir}/libdvbv5*${SOLIBS} \ + ${libdir}/libv4l/*-decomp \ + ${libdir}/libv4l2tracer.so \ +" + +FILES:libv4l-dev += "${includedir} ${libdir}/pkgconfig \ + ${libdir}/libv4l*${SOLIBSDEV} ${libdir}/*.la \ + ${libdir}/v4l*${SOLIBSDEV} ${libdir}/libv4l/*.la ${libdir}/libv4l/plugins/*.la" + +PARALLEL_MAKE:class-native = "" +BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-oe/recipes-multimedia/v4l2apps/yavta_git.bb b/sources/meta-openembedded/meta-oe/recipes-multimedia/v4l2apps/yavta_git.bb index 30695283..699b5608 100644 --- a/sources/meta-openembedded/meta-oe/recipes-multimedia/v4l2apps/yavta_git.bb +++ b/sources/meta-openembedded/meta-oe/recipes-multimedia/v4l2apps/yavta_git.bb @@ -2,23 +2,14 @@ SUMMARY = "Yet Another V4L2 Test Application" LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=751419260aa954499f7abaabaa882bbe" -SRC_URI = "git://git.ideasonboard.org/yavta.git;branch=master \ +SRC_URI = "git://git.ideasonboard.org/yavta.git;branch=master;protocol=https \ " -SRCREV = "65f740aa1758531fd810339bc1b7d1d33666e28a" +SRCREV = "52c975e5542504ac10bed8b1d68df5c75951d202" PV = "0.0" S = "${WORKDIR}/git" -EXTRA_OEMAKE = "-e MAKEFLAGS=" - -# The yavta sources include copies of the headers required to build in the -# include directory. The Makefile uses CFLAGS to include these, but since -# we override the CFLAGS then we need to add this include path back in. -CFLAGS += "-I${S}/include" - -do_install() { - install -d ${D}${bindir} - install -m 0755 yavta ${D}${bindir} -} - +# Upstream repo does not tag +UPSTREAM_CHECK_COMMITS = "1" +inherit meson diff --git a/sources/meta-openembedded/meta-oe/recipes-multimedia/webm/libvpx/libvpx-configure-support-blank-prefix.patch b/sources/meta-openembedded/meta-oe/recipes-multimedia/webm/libvpx/libvpx-configure-support-blank-prefix.patch index 463651aa..bd3d6978 100644 --- a/sources/meta-openembedded/meta-oe/recipes-multimedia/webm/libvpx/libvpx-configure-support-blank-prefix.patch +++ b/sources/meta-openembedded/meta-oe/recipes-multimedia/webm/libvpx/libvpx-configure-support-blank-prefix.patch @@ -1,4 +1,4 @@ -From 2829e6998b7595dd2108c1497fdd02485ef99e2c Mon Sep 17 00:00:00 2001 +From 1bbbf27a23c91dcc271b773a97153063461b986d Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Tue, 16 Aug 2011 16:04:35 +0200 Subject: [PATCH] Upstream: not yet @@ -11,10 +11,10 @@ Upstream-Status: Pending 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/build/make/configure.sh b/build/make/configure.sh -index b645a666f..0b99a8b38 100644 +index 93643f3de..e84198200 100644 --- a/build/make/configure.sh +++ b/build/make/configure.sh -@@ -658,6 +658,8 @@ process_common_cmdline() { +@@ -692,6 +692,8 @@ process_common_cmdline() { ;; --prefix=*) prefix="${optval}" @@ -23,7 +23,7 @@ index b645a666f..0b99a8b38 100644 ;; --libdir=*) libdir="${optval}" -@@ -687,13 +689,23 @@ process_cmdline() { +@@ -721,13 +723,23 @@ process_cmdline() { } post_process_common_cmdline() { diff --git a/sources/meta-openembedded/meta-oe/recipes-multimedia/webm/libvpx_1.14.0.bb b/sources/meta-openembedded/meta-oe/recipes-multimedia/webm/libvpx_1.14.0.bb deleted file mode 100644 index b4d49842..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-multimedia/webm/libvpx_1.14.0.bb +++ /dev/null @@ -1,51 +0,0 @@ -SUMMARY = "VPX multi-format codec" -DESCRIPTION = "The BSD-licensed libvpx reference implementation provides en- and decoders for VP8 and VP9 bitstreams." -HOMEPAGE = "http://www.webmproject.org/code/" -BUGTRACKER = "http://code.google.com/p/webm/issues/list" -SECTION = "libs/multimedia" -LICENSE = "BSD-3-Clause" - -LIC_FILES_CHKSUM = "file://LICENSE;md5=d5b04755015be901744a78cc30d390d4" - -SRCREV = "602e2e8979d111b02c959470da5322797dd96a19" -SRC_URI += "git://chromium.googlesource.com/webm/libvpx;protocol=https;branch=main \ - file://libvpx-configure-support-blank-prefix.patch \ - " - -S = "${WORKDIR}/git" - -# ffmpeg links with this and fails -# sysroots/armv4t-oe-linux-gnueabi/usr/lib/libvpx.a(vpx_encoder.c.o)(.text+0xc4): unresolvable R_ARM_THM_CALL relocation against symbol `memcpy@@GLIBC_2.4' -ARM_INSTRUCTION_SET = "arm" - -CFLAGS += "-fPIC" -BUILD_LDFLAGS += "-pthread" - -export CC -export LD = "${CC}" - -VPXTARGET:armv7a = "${@bb.utils.contains("TUNE_FEATURES","neon","armv7-linux-gcc","generic-gnu",d)}" -VPXTARGET ?= "generic-gnu" - -CONFIGUREOPTS = " \ - --target=${VPXTARGET} \ - --enable-vp9 \ - --enable-libs \ - --disable-install-docs \ - --disable-static \ - --enable-shared \ - --prefix=${prefix} \ - --libdir=${libdir} \ - --size-limit=16384x16384 \ -" - -do_configure() { - ${S}/configure ${CONFIGUREOPTS} -} - -do_install() { - oe_runmake install DESTDIR=${D} - chown -R root:root ${D} -} - -BBCLASSEXTEND += "native" diff --git a/sources/meta-openembedded/meta-oe/recipes-multimedia/webm/libvpx_1.14.1.bb b/sources/meta-openembedded/meta-oe/recipes-multimedia/webm/libvpx_1.14.1.bb new file mode 100644 index 00000000..f32c7842 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-multimedia/webm/libvpx_1.14.1.bb @@ -0,0 +1,51 @@ +SUMMARY = "VPX multi-format codec" +DESCRIPTION = "The BSD-licensed libvpx reference implementation provides en- and decoders for VP8 and VP9 bitstreams." +HOMEPAGE = "http://www.webmproject.org/code/" +BUGTRACKER = "http://code.google.com/p/webm/issues/list" +SECTION = "libs/multimedia" +LICENSE = "BSD-3-Clause" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=d5b04755015be901744a78cc30d390d4" + +SRCREV = "12f3a2ac603e8f10742105519e0cd03c3b8f71dd" +SRC_URI += "git://chromium.googlesource.com/webm/libvpx;protocol=https;branch=main \ + file://libvpx-configure-support-blank-prefix.patch \ + " + +S = "${WORKDIR}/git" + +# ffmpeg links with this and fails +# sysroots/armv4t-oe-linux-gnueabi/usr/lib/libvpx.a(vpx_encoder.c.o)(.text+0xc4): unresolvable R_ARM_THM_CALL relocation against symbol `memcpy@@GLIBC_2.4' +ARM_INSTRUCTION_SET = "arm" + +CFLAGS += "-fPIC" +BUILD_LDFLAGS += "-pthread" + +export CC +export LD = "${CC}" + +VPXTARGET:armv7a = "${@bb.utils.contains("TUNE_FEATURES","neon","armv7-linux-gcc","generic-gnu",d)}" +VPXTARGET ?= "generic-gnu" + +CONFIGUREOPTS = " \ + --target=${VPXTARGET} \ + --enable-vp9 \ + --enable-libs \ + --disable-install-docs \ + --disable-static \ + --enable-shared \ + --prefix=${prefix} \ + --libdir=${libdir} \ + --size-limit=16384x16384 \ +" + +do_configure() { + ${S}/configure ${CONFIGUREOPTS} +} + +do_install() { + oe_runmake install DESTDIR=${D} + chown -R root:root ${D} +} + +BBCLASSEXTEND += "native" diff --git a/sources/meta-openembedded/meta-oe/recipes-multimedia/xsp/xsp_1.0.0-8.bb b/sources/meta-openembedded/meta-oe/recipes-multimedia/xsp/xsp_1.0.0-8.bb index c611da48..32f7bae0 100644 --- a/sources/meta-openembedded/meta-oe/recipes-multimedia/xsp/xsp_1.0.0-8.bb +++ b/sources/meta-openembedded/meta-oe/recipes-multimedia/xsp/xsp_1.0.0-8.bb @@ -13,3 +13,5 @@ REQUIRED_DISTRO_FEATURES = "x11" SRC_URI[md5sum] = "2a0d8d02228d4cbd28b6e07bb7c17cf5" SRC_URI[sha256sum] = "8b722b952b64841d996c70c3278499886c81bb5012991beed5f66f4158418f59" + +CVE_STATUS[CVE-2006-2658] = "cpe-incorrect: The recipe used in the `meta-openembedded` is a different xsp package compared to the one which has the CVE issue." diff --git a/sources/meta-openembedded/meta-oe/recipes-navigation/geoclue/geoclue/0001-libgeoclue-don-t-try-to-use-g-ir-scanner-when-intros.patch b/sources/meta-openembedded/meta-oe/recipes-navigation/geoclue/geoclue/0001-libgeoclue-don-t-try-to-use-g-ir-scanner-when-intros.patch index 18e71856..d2c0e4df 100644 --- a/sources/meta-openembedded/meta-oe/recipes-navigation/geoclue/geoclue/0001-libgeoclue-don-t-try-to-use-g-ir-scanner-when-intros.patch +++ b/sources/meta-openembedded/meta-oe/recipes-navigation/geoclue/geoclue/0001-libgeoclue-don-t-try-to-use-g-ir-scanner-when-intros.patch @@ -8,10 +8,10 @@ Subject: [PATCH] libgeoclue: don't try to use g-ir-scanner when introspection http://errors.yoctoproject.org/Errors/Details/702778/ geoclue/2.7.0-r0/recipe-sysroot/usr/bin/g-ir-scanner-wrapper: line 5: g-ir-scanner: command not found -Signed-off-by: Martin Jansa ---- Upstream-Status: Pending +Signed-off-by: Martin Jansa +--- libgeoclue/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/meta-openembedded/meta-oe/recipes-navigation/geoclue/geoclue_2.7.1.bb b/sources/meta-openembedded/meta-oe/recipes-navigation/geoclue/geoclue_2.7.1.bb deleted file mode 100644 index 9fcd1e6f..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-navigation/geoclue/geoclue_2.7.1.bb +++ /dev/null @@ -1,61 +0,0 @@ -SUMMARY = "The Geolocation Service" -DESCRIPTION = "Geoclue is a D-Bus service that provides location information. \ -The primary goal of the Geoclue project is to make creating location-aware applications \ -as simple as possible, while the secondary goal is to ensure that no application \ -can access location information without explicit permission from user." -LICENSE = "GPL-2.0-or-later" -SECTION = "console/network" - -LIC_FILES_CHKSUM = "file://COPYING;md5=bdfdd4986a0853eb84eeba85f9d0c4d6" - -DEPENDS = "glib-2.0 dbus json-glib libsoup-3.0 intltool-native" - -inherit meson pkgconfig gtk-doc gobject-introspection vala useradd - -SRCREV = "8a24f60969d4c235d9918796c38a6a9c42e10131" -SRC_URI = "git://gitlab.freedesktop.org/geoclue/geoclue.git;protocol=https;branch=master \ - file://0001-libgeoclue-don-t-try-to-use-g-ir-scanner-when-intros.patch \ -" - -S = "${WORKDIR}/git" - -# Without this line, package is declared a library and named libgeoclue* -AUTO_LIBNAME_PKGS = "" - -PACKAGECONFIG ??= "3g modem-gps cdma nmea lib agent" -PACKAGECONFIG[3g] = "-D3g-source=true,-D3g-source=false,modemmanager" -PACKAGECONFIG[modem-gps] = "-Dmodem-gps-source=true,-Dmodem-gps-source=false,modemmanager" -PACKAGECONFIG[cdma] = "-Dcdma-source=true,-Dcdma-source=false,modemmanager" -PACKAGECONFIG[nmea] = "-Dnmea-source=true,-Dnmea-source=false,avahi,avahi-daemon" -PACKAGECONFIG[lib] = "-Dlibgeoclue=true,-Dlibgeoclue=false" -PACKAGECONFIG[agent] = "-Ddemo-agent=true,-Ddemo-agent=false,libnotify" - -GTKDOC_MESON_OPTION = "gtk-doc" - -EXTRA_OEMESON += " \ - -Ddbus-sys-dir=${sysconfdir}/dbus-1/system.d \ -" - -USERADD_PACKAGES = "${PN}" -USERADD_PARAM:${PN} = "--system --no-create-home --user-group --home-dir ${sysconfdir}/polkit-1 --shell /bin/nologin polkitd" - -do_install:append() { - if ${@bb.utils.contains('PACKAGECONFIG', 'modem-gps', 'true', 'false', d)}; then - # Fix up permissions on polkit rules.d to work with rpm4 constraints - chmod 700 ${D}/${datadir}/polkit-1/rules.d - chown polkitd:root ${D}/${datadir}/polkit-1/rules.d - fi -} - -FILES:${PN} += " \ - ${datadir}/dbus-1/system-services \ - ${datadir}/polkit-1/rules.d \ - ${libdir} \ - ${systemd_unitdir} \ - ${prefix}/libexec \ -" - -FILES:${PN}-dev += " \ - ${datadir}/dbus-1/interfaces \ - ${datadir}/gir-1.0 \ -" diff --git a/sources/meta-openembedded/meta-oe/recipes-navigation/geoclue/geoclue_2.7.2.bb b/sources/meta-openembedded/meta-oe/recipes-navigation/geoclue/geoclue_2.7.2.bb new file mode 100644 index 00000000..db014250 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-navigation/geoclue/geoclue_2.7.2.bb @@ -0,0 +1,50 @@ +SUMMARY = "The Geolocation Service" +DESCRIPTION = "Geoclue is a D-Bus service that provides location information. \ +The primary goal of the Geoclue project is to make creating location-aware applications \ +as simple as possible, while the secondary goal is to ensure that no application \ +can access location information without explicit permission from user." +LICENSE = "GPL-2.0-or-later" +SECTION = "console/network" + +LIC_FILES_CHKSUM = "file://COPYING;md5=bdfdd4986a0853eb84eeba85f9d0c4d6" + +DEPENDS = "glib-2.0 dbus json-glib libsoup-3.0 intltool-native" + +inherit meson pkgconfig gtk-doc gobject-introspection vala + +SRCREV = "ab0a7a447ac037d5043aa04df3030796bf47d94d" +SRC_URI = "git://gitlab.freedesktop.org/geoclue/geoclue.git;protocol=https;branch=master \ + file://0001-libgeoclue-don-t-try-to-use-g-ir-scanner-when-intros.patch \ +" + +S = "${WORKDIR}/git" + +# Without this line, package is declared a library and named libgeoclue* +AUTO_LIBNAME_PKGS = "" + +PACKAGECONFIG ??= "3g modem-gps cdma nmea lib agent" +PACKAGECONFIG[3g] = "-D3g-source=true,-D3g-source=false,modemmanager" +PACKAGECONFIG[modem-gps] = "-Dmodem-gps-source=true,-Dmodem-gps-source=false,modemmanager" +PACKAGECONFIG[cdma] = "-Dcdma-source=true,-Dcdma-source=false,modemmanager" +PACKAGECONFIG[nmea] = "-Dnmea-source=true,-Dnmea-source=false,avahi,avahi-daemon" +PACKAGECONFIG[lib] = "-Dlibgeoclue=true,-Dlibgeoclue=false" +PACKAGECONFIG[agent] = "-Ddemo-agent=true,-Ddemo-agent=false,libnotify" + +GTKDOC_MESON_OPTION = "gtk-doc" + +EXTRA_OEMESON += " \ + -Ddbus-sys-dir=${sysconfdir}/dbus-1/system.d \ +" + +FILES:${PN} += " \ + ${datadir}/dbus-1/system-services \ + ${datadir}/polkit-1/rules.d \ + ${libdir} \ + ${systemd_unitdir} \ + ${prefix}/libexec \ +" + +FILES:${PN}-dev += " \ + ${datadir}/dbus-1/interfaces \ + ${datadir}/gir-1.0 \ +" diff --git a/sources/meta-openembedded/meta-oe/recipes-navigation/gpsd/gpsd/fix-pps_strerror_r.patch b/sources/meta-openembedded/meta-oe/recipes-navigation/gpsd/gpsd/fix-pps_strerror_r.patch new file mode 100644 index 00000000..8942b395 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-navigation/gpsd/gpsd/fix-pps_strerror_r.patch @@ -0,0 +1,51 @@ +From c72a489e2eb13296c7b514b7341033114abf430a Mon Sep 17 00:00:00 2001 +From: Miroslav Lichvar +Date: Mon, 22 Apr 2024 11:31:24 +0200 +Subject: [PATCH 1/2] SConscript: provide variable names to MergeFlags + +If the scons MergeFlags() function is provided with a list of +compiler/linker options, it needs to guess what options belong where. If +it doesn't recognize an option, it is silently ignored. There are also +ambiguous options that could be both in CFLAGS and LINKFLAGS (e.g. -spec). + +Provide MergeFlags() with a dict instead of list to avoid the guesswork +in order to pass all options, even if some are not recognized by scons. +Switch LDFLAGS to LINKFLAGS for better compatibility with existing +scripts. + +Upstream-Status: Submitted [https://gitlab.com/gpsd/gpsd/-/merge_requests/406] +Signed-off-by: Dmitry Baryshkov + +--- + SConscript | 11 ++++++----- + 1 file changed, 6 insertions(+), 5 deletions(-) + +diff --git a/SConscript b/SConscript +index dab481654..ee90d87c4 100644 +--- a/SConscript ++++ b/SConscript +@@ -585,8 +585,8 @@ env['SC_PYTHON'] = sys.executable # Path to SCons Python + # explicitly quote them or (better yet) use the "=" form of GNU option + # settings. + # +-# Scons also uses different internal names than most other build-systems. +-# So we rely on MergeFlags/ParseFlags to do the right thing for us. ++# Scons also uses different internal names than most other build-systems, ++# e.g. it uses LINKFLAGS instead of LDFLAGS. + # + # scons uses gcc, or clang, to link. Thus LDFLAGS does not serve its + # traditional function of providing arguments to ln. LDFLAGS set in the +@@ -618,7 +618,10 @@ for i in ["ARFLAGS", + "SHLINKFLAGS", + ]: + if i in os.environ: +- env.MergeFlags(Split(os.getenv(i))) ++ t = i ++ if t == "LDFLAGS": ++ t = "LINKFLAGS" ++ env.MergeFlags({t: Split(os.getenv(i))}) + + + # Keep scan-build options in the environment +-- +GitLab diff --git a/sources/meta-openembedded/meta-oe/recipes-navigation/gpsd/gpsd_3.24.bb b/sources/meta-openembedded/meta-oe/recipes-navigation/gpsd/gpsd_3.24.bb deleted file mode 100644 index a755e39e..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-navigation/gpsd/gpsd_3.24.bb +++ /dev/null @@ -1,159 +0,0 @@ -SUMMARY = "A TCP/IP Daemon simplifying the communication with GPS devices" -SECTION = "console/network" -LICENSE = "BSD-2-Clause" -LIC_FILES_CHKSUM = "file://COPYING;md5=7a5d174db44ec45f9638b2c747806821" -DEPENDS = "dbus ncurses python3 pps-tools" -PROVIDES = "virtual/gpsd" - -SRC_URI = "${SAVANNAH_GNU_MIRROR}/${BPN}/${BP}.tar.gz \ - file://gpsd.init \ - " -SRC_URI[sha256sum] = "00ee13f615655284874a661be13553abe66128e6deb5cd648af9bc0cb345fe5c" - -inherit scons update-rc.d python3-dir python3native systemd update-alternatives pkgconfig - -INITSCRIPT_PACKAGES = "gpsd-conf" -INITSCRIPT_NAME = "gpsd" -INITSCRIPT_PARAMS = "defaults 35" - -SYSTEMD_OESCONS = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false',d)}" - -export STAGING_INCDIR -export STAGING_LIBDIR - -CLEANBROKEN = "1" - -PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} usb" -PACKAGECONFIG[bluez] = "bluez='true',bluez='false',bluez5" -PACKAGECONFIG[qt] = "qt='yes' qt_versioned=5,qt='no',qtbase" -PACKAGECONFIG[usb] = "usb='true',usb='false',libusb1" -EXTRA_OESCONS = " \ - sysroot=${STAGING_DIR_TARGET} \ - libQgpsmm='false' \ - debug='false' \ - nostrip='true' \ - systemd='${SYSTEMD_OESCONS}' \ - libdir='${libdir}' \ - sbindir='${sbindir}' \ - udevdir='${nonarch_base_libdir}/udev' \ - unitdir='${systemd_system_unitdir}' \ - manbuild='false' \ - LINK='${CC}' \ - ${PACKAGECONFIG_CONFARGS} \ -" -# This cannot be used, because then chrpath is not found and only static lib is built -# target=${HOST_SYS} - -do_compile:prepend() { - export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}" - export PKG_CONFIG="PKG_CONFIG_SYSROOT_DIR=\"${PKG_CONFIG_SYSROOT_DIR}\" pkg-config" - export STAGING_PREFIX="${STAGING_DIR_HOST}/${prefix}" - export CC="${CC}" - export LD="${CC}" - export LINKFLAGS="${LDFLAGS}" -} - -do_install() { - export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}" - export PKG_CONFIG="PKG_CONFIG_SYSROOT_DIR=\"${PKG_CONFIG_SYSROOT_DIR}\" pkg-config" - export STAGING_PREFIX="${STAGING_DIR_HOST}/${prefix}" - export LD="${CC}" - export LINKFLAGS="${LDFLAGS}" - - export DESTDIR="${D}" - # prefix is used for RPATH and DESTDIR/prefix for installation - ${STAGING_BINDIR_NATIVE}/scons prefix=${prefix} python_libdir=${libdir} udev-install ${EXTRA_OESCONS} || \ - bbfatal "scons install execution failed." -} - -do_install:append() { - install -d ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/gpsd.init ${D}${sysconfdir}/init.d/gpsd - install -d ${D}${sysconfdir}/default - install -m 0644 ${S}/packaging/deb/etc_default_gpsd ${D}${sysconfdir}/default/gpsd.default - - # Support for python - if [ -d ${D}${libdir}/gps ]; then - install -d ${D}${PYTHON_SITEPACKAGES_DIR}/gps - install -m 755 ${D}${libdir}/gps/*.py ${D}${PYTHON_SITEPACKAGES_DIR}/gps - fi -} - -PACKAGES =+ "libgps python3-pygps gpsd-udev gpsd-conf gpsd-gpsctl gps-utils gps-utils-python" - -RPROVIDES:${PN}-dbg += "python-pygps-dbg" - -FILES:${PN}-dev += "${libdir}/libQgpsmm.prl" - -FILES:${PN}-doc += "${datadir}/${BPN}/doc" - -RDEPENDS:${PN} = "gpsd-gpsctl" -RRECOMMENDS:${PN} = "gpsd-conf gpsd-udev gpsd-machine-conf" - -SUMMARY:gpsd-udev = "udev relevant files to use gpsd hotplugging" -FILES:gpsd-udev = "${nonarch_base_libdir}/udev" -RDEPENDS:gpsd-udev += "udev gpsd-conf" - -SUMMARY:libgps = "C service library used for communicating with gpsd" -FILES:libgps = "${libdir}/libgps.so.*" - -SUMMARY:gpsd-conf = "gpsd configuration files and init scripts" -FILES:gpsd-conf = "${sysconfdir}" -CONFFILES:gpsd-conf = "${sysconfdir}/default/gpsd.default" - -SUMMARY:gpsd-gpsctl = "Tool for tweaking GPS modes" -FILES:gpsd-gpsctl = "${bindir}/gpsctl" - -SUMMARY:gps-utils = "Utils used for simulating, monitoring,... a GPS" -FILES:gps-utils = "\ - ${bindir}/cgps \ - ${bindir}/gps2udp \ - ${bindir}/gpsctl \ - ${bindir}/gpsdebuginfo \ - ${bindir}/gpsdecode \ - ${bindir}/gpsmon \ - ${bindir}/gpspipe \ - ${bindir}/gpsrinex \ - ${bindir}/gpssnmp \ - ${bindir}/gpxlogger \ - ${bindir}/lcdgps \ - ${bindir}/ntpshmmon \ - ${bindir}/ppscheck \ -" -RRECOMMENDS:gps-utils = "gps-utils-python" - -SUMMARY:gps-utils-python = "Python utils used for simulating, monitoring,... a GPS" -FILES:gps-utils-python = "\ - ${bindir}/gegps \ - ${bindir}/gpscat \ - ${bindir}/gpscsv \ - ${bindir}/gpsfake \ - ${bindir}/gpsplot \ - ${bindir}/gpsprof \ - ${bindir}/gpssubframe \ - ${bindir}/ubxtool \ - ${bindir}/xgps \ - ${bindir}/xgpsspeed \ - ${bindir}/zerk \ -" -RDEPENDS:gps-utils-python = "python3-pygps" - -SUMMARY:python3-pygps = "Python bindings to gpsd" -FILES:python3-pygps = "${PYTHON_SITEPACKAGES_DIR}/* ${libdir}/gps/*.py ${libdir}/*.egg-info" -RDEPENDS:python3-pygps = " \ - python3-core \ - python3-io \ - python3-pyserial \ - python3-threading \ - python3-terminal \ - gpsd \ - python3-json" - -RPROVIDES:${PN} += "${PN}-systemd" -RREPLACES:${PN} += "${PN}-systemd" -RCONFLICTS:${PN} += "${PN}-systemd" -SYSTEMD_SERVICE:${PN} = "${BPN}.socket ${BPN}ctl@.service" - -ALTERNATIVE:${PN} = "gpsd-defaults" -ALTERNATIVE_LINK_NAME[gpsd-defaults] = "${sysconfdir}/default/gpsd" -ALTERNATIVE_TARGET[gpsd-defaults] = "${sysconfdir}/default/gpsd.default" diff --git a/sources/meta-openembedded/meta-oe/recipes-navigation/gpsd/gpsd_3.25.bb b/sources/meta-openembedded/meta-oe/recipes-navigation/gpsd/gpsd_3.25.bb new file mode 100644 index 00000000..e3b2f8bf --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-navigation/gpsd/gpsd_3.25.bb @@ -0,0 +1,164 @@ +SUMMARY = "A TCP/IP Daemon simplifying the communication with GPS devices" +SECTION = "console/network" +LICENSE = "BSD-2-Clause" +LIC_FILES_CHKSUM = "file://COPYING;md5=7a5d174db44ec45f9638b2c747806821" +DEPENDS = "dbus ncurses python3 pps-tools" +PROVIDES = "virtual/gpsd" + +SRC_URI = "${SAVANNAH_GNU_MIRROR}/${BPN}/${BP}.tar.gz \ + file://gpsd.init \ + file://fix-pps_strerror_r.patch \ + " +SRC_URI[sha256sum] = "b368b6a305e3f7a6382d23a0cbfc1d78923060b6b7f54cf7987a73c7b4a9afc2" + +inherit scons update-rc.d python3-dir python3native systemd update-alternatives pkgconfig + +INITSCRIPT_PACKAGES = "gpsd-conf" +INITSCRIPT_NAME = "gpsd" +INITSCRIPT_PARAMS = "defaults 35" + +SYSTEMD_OESCONS = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false',d)}" + +export STAGING_INCDIR +export STAGING_LIBDIR + +CLEANBROKEN = "1" + +PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} usb" +PACKAGECONFIG[bluez] = "bluez='true',bluez='false',bluez5" +PACKAGECONFIG[qt] = "qt='yes' qt_versioned=5,qt='no',qtbase" +PACKAGECONFIG[pyserial] = "" +PACKAGECONFIG[usb] = "usb='true',usb='false',libusb1" +EXTRA_OESCONS = " \ + sysroot=${STAGING_DIR_TARGET} \ + libQgpsmm='false' \ + debug='false' \ + nostrip='true' \ + systemd='${SYSTEMD_OESCONS}' \ + libdir='${libdir}' \ + sbindir='${sbindir}' \ + udevdir='${nonarch_base_libdir}/udev' \ + unitdir='${systemd_system_unitdir}' \ + manbuild='false' \ + LINK='${CC}' \ + ${PACKAGECONFIG_CONFARGS} \ +" +# This cannot be used, because then chrpath is not found and only static lib is built +# target=${HOST_SYS} + +do_compile:prepend() { + export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}" + export PKG_CONFIG="PKG_CONFIG_SYSROOT_DIR=\"${PKG_CONFIG_SYSROOT_DIR}\" pkg-config" + export STAGING_PREFIX="${STAGING_DIR_HOST}/${prefix}" + export CC="${CC}" + export LD="${CC}" + export LINKFLAGS="${LDFLAGS}" +} + +do_install() { + export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}" + export PKG_CONFIG="PKG_CONFIG_SYSROOT_DIR=\"${PKG_CONFIG_SYSROOT_DIR}\" pkg-config" + export STAGING_PREFIX="${STAGING_DIR_HOST}/${prefix}" + export LD="${CC}" + export LINKFLAGS="${LDFLAGS}" + + export DESTDIR="${D}" + # prefix is used for RPATH and DESTDIR/prefix for installation + ${STAGING_BINDIR_NATIVE}/scons prefix=${prefix} python_libdir=${libdir} udev-install ${EXTRA_OESCONS} || \ + bbfatal "scons install execution failed." +} + +do_install:append() { + install -d ${D}${sysconfdir}/init.d + install -m 0755 ${UNPACKDIR}/gpsd.init ${D}${sysconfdir}/init.d/gpsd + install -d ${D}${sysconfdir}/default + install -m 0644 ${S}/packaging/deb/etc_default_gpsd ${D}${sysconfdir}/default/gpsd.default + + # Support for python + if [ -d ${D}${libdir}/gps ]; then + install -d ${D}${PYTHON_SITEPACKAGES_DIR}/gps + install -m 755 ${D}${libdir}/gps/*.py ${D}${PYTHON_SITEPACKAGES_DIR}/gps + fi +} + +PACKAGES =+ "libgps python3-pygps gpsd-udev gpsd-conf gpsd-gpsctl gpsd-snmp gps-utils gps-utils-python" + +RPROVIDES:${PN}-dbg += "python-pygps-dbg" + +FILES:${PN}-dev += "${libdir}/libQgpsmm.prl" + +FILES:${PN}-doc += "${datadir}/${BPN}/doc" + +RDEPENDS:${PN} = "gpsd-gpsctl" +RRECOMMENDS:${PN} = "gpsd-conf gpsd-udev gpsd-machine-conf" + +SUMMARY:gpsd-udev = "udev relevant files to use gpsd hotplugging" +FILES:gpsd-udev = "${nonarch_base_libdir}/udev" +RDEPENDS:gpsd-udev += "udev gpsd-conf" + +SUMMARY:libgps = "C service library used for communicating with gpsd" +FILES:libgps = "${libdir}/libgps.so.*" + +SUMMARY:gpsd-conf = "gpsd configuration files and init scripts" +FILES:gpsd-conf = "${sysconfdir}" +CONFFILES:gpsd-conf = "${sysconfdir}/default/gpsd.default" + +SUMMARY:gpsd-gpsctl = "Tool for tweaking GPS modes" +FILES:gpsd-gpsctl = "${bindir}/gpsctl" + +SUMMARY:gpsd-snmp = "MIB for using SNMP with gpsd" +FILES:gpsd-snmp = "${datadir}/snmp" + +SUMMARY:gps-utils = "Utils used for simulating, monitoring,... a GPS" +FILES:gps-utils = "\ + ${bindir}/cgps \ + ${bindir}/gps2udp \ + ${bindir}/gpsctl \ + ${bindir}/gpsdebuginfo \ + ${bindir}/gpsdecode \ + ${bindir}/gpsmon \ + ${bindir}/gpspipe \ + ${bindir}/gpsrinex \ + ${bindir}/gpssnmp \ + ${bindir}/gpxlogger \ + ${bindir}/lcdgps \ + ${bindir}/ntpshmmon \ + ${bindir}/ppscheck \ +" +RRECOMMENDS:gps-utils = "gps-utils-python" + +SUMMARY:gps-utils-python = "Python utils used for simulating, monitoring,... a GPS" +FILES:gps-utils-python = "\ + ${bindir}/gegps \ + ${bindir}/gpscat \ + ${bindir}/gpscsv \ + ${bindir}/gpsfake \ + ${bindir}/gpsplot \ + ${bindir}/gpsprof \ + ${bindir}/gpssubframe \ + ${bindir}/ubxtool \ + ${bindir}/xgps \ + ${bindir}/xgpsspeed \ + ${bindir}/zerk \ +" +RDEPENDS:gps-utils-python = "python3-pygps" + +SUMMARY:python3-pygps = "Python bindings to gpsd" +FILES:python3-pygps = "${PYTHON_SITEPACKAGES_DIR}/* ${libdir}/gps/*.py ${libdir}/*.egg-info" +RDEPENDS:python3-pygps = " \ + python3-core \ + python3-io \ + ${@bb.utils.contains('PACKAGECONFIG', 'pyserial', 'python3-pyserial', '', d)} \ + python3-threading \ + python3-terminal \ + gpsd \ + python3-json" + +RPROVIDES:${PN} += "${PN}-systemd" +RREPLACES:${PN} += "${PN}-systemd" +RCONFLICTS:${PN} += "${PN}-systemd" +SYSTEMD_SERVICE:${PN} = "${BPN}.socket ${BPN}ctl@.service" + +ALTERNATIVE:${PN} = "gpsd-defaults" +ALTERNATIVE_LINK_NAME[gpsd-defaults] = "${sysconfdir}/default/gpsd" +ALTERNATIVE_TARGET[gpsd-defaults] = "${sysconfdir}/default/gpsd.default" diff --git a/sources/meta-openembedded/meta-oe/recipes-navigation/libspatialite/libspatialite/0001-wfs-Cover-xmlNanoHTTPCleanup-with-LIBXML_HTTP_ENABLE.patch b/sources/meta-openembedded/meta-oe/recipes-navigation/libspatialite/libspatialite/0001-wfs-Cover-xmlNanoHTTPCleanup-with-LIBXML_HTTP_ENABLE.patch new file mode 100644 index 00000000..daef7fab --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-navigation/libspatialite/libspatialite/0001-wfs-Cover-xmlNanoHTTPCleanup-with-LIBXML_HTTP_ENABLE.patch @@ -0,0 +1,29 @@ +From 406e841b3e011e1090f23dba12b12cdd9ec4707e Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 24 Aug 2024 15:19:35 -0700 +Subject: [PATCH] wfs: Cover xmlNanoHTTPCleanup with LIBXML_HTTP_ENABLED + +libxml2 has deprecated internal http support [1] + +[1] https://www.gaia-gis.it/fossil/libspatialite/tktview?name=7c452740fe + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- + src/wfs/wfs_in.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/wfs/wfs_in.c b/src/wfs/wfs_in.c +index 1cfe39d..41ad2ab 100644 +--- a/src/wfs/wfs_in.c ++++ b/src/wfs/wfs_in.c +@@ -4638,7 +4638,9 @@ SPATIALITE_DECLARE void + reset_wfs_http_connection (void) + { + /* Resets the libxml2 "nano HTTP": useful when changing the HTTP_PROXY settings */ ++#ifdef LIBXML_HTTP_ENABLED + xmlNanoHTTPCleanup (); ++#endif + } + + #else /* LIBXML2 isn't enabled */ diff --git a/sources/meta-openembedded/meta-oe/recipes-navigation/libspatialite/libspatialite/libspatialite_macros.patch b/sources/meta-openembedded/meta-oe/recipes-navigation/libspatialite/libspatialite/libspatialite_macros.patch deleted file mode 100644 index 6f1c165f..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-navigation/libspatialite/libspatialite/libspatialite_macros.patch +++ /dev/null @@ -1,14 +0,0 @@ -Upstream-Status: Pending - -diff -rupN --no-dereference libspatialite-5.0.1/configure.ac libspatialite-5.0.1-new/configure.ac ---- libspatialite-5.0.1/configure.ac 2021-03-08 08:57:18.748858216 +0100 -+++ libspatialite-5.0.1-new/configure.ac 2021-03-08 08:57:18.751858215 +0100 -@@ -96,7 +96,7 @@ AC_PROG_INSTALL - AC_PROG_LN_S - AC_PROG_MAKE_SET - AC_LIBTOOL_WIN32_DLL --AC_PROG_LIBTOOL -+LT_INIT - - # Checks for typedefs, structures, and compiler characteristics. - AC_C_CONST diff --git a/sources/meta-openembedded/meta-oe/recipes-navigation/libspatialite/libspatialite/libspatialite_pkgconfig.patch b/sources/meta-openembedded/meta-oe/recipes-navigation/libspatialite/libspatialite/libspatialite_pkgconfig.patch index de6e50a5..4b381eda 100644 --- a/sources/meta-openembedded/meta-oe/recipes-navigation/libspatialite/libspatialite/libspatialite_pkgconfig.patch +++ b/sources/meta-openembedded/meta-oe/recipes-navigation/libspatialite/libspatialite/libspatialite_pkgconfig.patch @@ -1,13 +1,13 @@ Upstream-Status: Pending -diff -rupN libspatialite-5.0.1/spatialite.pc.in libspatialite-5.0.1-new/spatialite.pc.in ---- libspatialite-5.0.1/spatialite.pc.in 2021-02-07 16:53:46.000000000 +0100 -+++ libspatialite-5.0.1-new/spatialite.pc.in 2021-02-10 09:54:09.647552994 +0100 -@@ -8,5 +8,6 @@ includedir=@includedir@ +--- a/spatialite.pc.in ++++ b/spatialite.pc.in +@@ -8,5 +8,7 @@ includedir=@includedir@ Name: spatialite Description: Spatial SQL database engine based on SQLite Version: @VERSION@ --Libs: -L${libdir} -lspatialite @LIBS@ @LIBXML2_LIBS@ -lm -+Libs.private: -L${libdir} @LIBS@ @LIBXML2_LIBS@ -lm +-Libs: -L${libdir} -lspatialite @LIBS@ @LIBXML2_LIBS@ @SQLITE3_LIBS@ -lm ++Libs.private: -L${libdir} @LIBS@ @LIBXML2_LIBS@ @SQLITE3_LIBS@ -lm +Libs: -L${libdir} -lspatialite ++ Cflags: -I${includedir} diff --git a/sources/meta-openembedded/meta-oe/recipes-navigation/libspatialite/libspatialite_5.0.1.bb b/sources/meta-openembedded/meta-oe/recipes-navigation/libspatialite/libspatialite_5.0.1.bb deleted file mode 100644 index f46b1083..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-navigation/libspatialite/libspatialite_5.0.1.bb +++ /dev/null @@ -1,24 +0,0 @@ -DESCRIPTION = "Library extending the SQLite core to support fully fledged Spatial SQL capabilities" -HOMEPAGE = "https://www.gaia-gis.it/fossil/libspatialite/" -SECTION = "libs" -DEPENDS = "proj geos sqlite3 libxml2 zlib" - -LICENSE = "MPL-1.1 & GPL-2.0-or-later & LGPL-2.1-or-later" -LIC_FILES_CHKSUM = "file://COPYING;md5=0e92e1a36cc384b60f5b31dde0bdd39e" - -SRC_URI = "http://www.gaia-gis.it/gaia-sins/libspatialite-sources/libspatialite-${PV}.tar.gz \ - file://libspatialite_geos.patch \ - file://libspatialite_macros.patch \ - file://libspatialite_pkgconfig.patch \ -" - -SRC_URI[sha256sum] = "eecbc94311c78012d059ebc0fae86ea5ef6eecb13303e6e82b3753c1b3409e98" - -inherit autotools-brokensep pkgconfig - -EXTRA_OECONF = "--enable-freexl=no --disable-rttopo --disable-minizip" - -# package plugins for SQLite3 -PACKAGES += "${PN}-plugin" -INSANE_SKIP:${PN}-plugin = "dev-so" -FILES:${PN}-plugin += "${libdir}/mod_*" diff --git a/sources/meta-openembedded/meta-oe/recipes-navigation/libspatialite/libspatialite_5.1.0.bb b/sources/meta-openembedded/meta-oe/recipes-navigation/libspatialite/libspatialite_5.1.0.bb new file mode 100644 index 00000000..0fe0bb11 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-navigation/libspatialite/libspatialite_5.1.0.bb @@ -0,0 +1,23 @@ +DESCRIPTION = "Library extending the SQLite core to support fully fledged Spatial SQL capabilities" +HOMEPAGE = "https://www.gaia-gis.it/fossil/libspatialite/" +SECTION = "libs" +DEPENDS = "proj geos sqlite3 libxml2 zlib" + +LICENSE = "MPL-1.1 & GPL-2.0-or-later & LGPL-2.1-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=0e92e1a36cc384b60f5b31dde0bdd39e" + +SRC_URI = "http://www.gaia-gis.it/gaia-sins/libspatialite-sources/libspatialite-${PV}.tar.gz \ + file://libspatialite_geos.patch \ + file://libspatialite_pkgconfig.patch \ + file://0001-wfs-Cover-xmlNanoHTTPCleanup-with-LIBXML_HTTP_ENABLE.patch \ +" +SRC_URI[sha256sum] = "43be2dd349daffe016dd1400c5d11285828c22fea35ca5109f21f3ed50605080" + +inherit autotools-brokensep pkgconfig + +EXTRA_OECONF = "--enable-freexl=no --disable-rttopo --disable-minizip" + +# package plugins for SQLite3 +PACKAGES += "${PN}-plugin" +INSANE_SKIP:${PN}-plugin = "dev-so" +FILES:${PN}-plugin += "${libdir}/mod_*" diff --git a/sources/meta-openembedded/meta-oe/recipes-navigation/orrery/orrery/0001-Append-cflags-instead-of-overriding-in-Makefile.am.patch b/sources/meta-openembedded/meta-oe/recipes-navigation/orrery/orrery/0001-Append-cflags-instead-of-overriding-in-Makefile.am.patch deleted file mode 100644 index 829ace09..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-navigation/orrery/orrery/0001-Append-cflags-instead-of-overriding-in-Makefile.am.patch +++ /dev/null @@ -1,28 +0,0 @@ -From e13f15205425c67e1101031a33107fa9cd2d65f9 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 26 May 2023 10:32:53 -0700 -Subject: [PATCH] Append cflags instead of overriding in Makefile.am - -Fixes -WARNING: orrery-2.7-r0 do_package_qa: QA Issue: File /usr/bin/.debug/orrery in package orrery-dbg contains reference to TMPDIR [buildpaths] - -Upstream-Status: Pending - -Signed-off-by: Khem Raj ---- - Makefile.am | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Makefile.am b/Makefile.am -index b64449f..23637b3 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -1,4 +1,4 @@ --CFLAGS = -g -O3 -Wall -+CFLAGS += -g -O3 -Wall - - bin_PROGRAMS = orrery - orrery_SOURCES = planetInfo.c orrery.c orrery.h phaseConstants.h --- -2.40.1 - diff --git a/sources/meta-openembedded/meta-oe/recipes-navigation/orrery/orrery/0001-orrery-Fix-sprintf-format.patch b/sources/meta-openembedded/meta-oe/recipes-navigation/orrery/orrery/0001-orrery-Fix-sprintf-format.patch deleted file mode 100644 index 3d582801..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-navigation/orrery/orrery/0001-orrery-Fix-sprintf-format.patch +++ /dev/null @@ -1,28 +0,0 @@ -From e600d3c09d2f97a197f86e6987d44d142e7b7cdf Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Tue, 27 Jun 2017 21:12:17 -0700 -Subject: [PATCH] orrery: Fix sprintf format - -Signed-off-by: Khem Raj ---- -Upstream-Status: Pending - - orrery.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/orrery.c b/orrery.c -index e3a1f6d..1b31a9f 100644 ---- a/orrery.c -+++ b/orrery.c -@@ -3767,7 +3767,7 @@ static void drawOptsScreens(void) - displayWidth/2 - gdk_string_width(smallFont, scratchString)/2, - 12, scratchString); - for (day = 0; day < 7; day++) { -- sprintf(scratchString, dayName[day]); -+ sprintf(scratchString, "%s", dayName[day]); - gdk_draw_string(pixmap, smallFont, blueGC, - CAL_DAY_WIDTH/2 + day*CAL_DAY_WIDTH + CAL_LEFT_OFFSET - - gdk_string_width(smallFont, scratchString)/2, --- -2.13.2 - diff --git a/sources/meta-openembedded/meta-oe/recipes-navigation/orrery/orrery/orrery.png b/sources/meta-openembedded/meta-oe/recipes-navigation/orrery/orrery/orrery.png deleted file mode 100644 index d9865b70ce777d6e4b4c437f73095d2329e222ce..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 19475 zcmXxM2Y6N0wl+Lh@4NT3o!)!zBmt68k^mtIH3R|#LhrpdLAq2aB1o04G^GjBRFEd1 z*abay&pDp^opZl?{oc9x|L0l8WV5rg#vEh3;~j0iR991Js6LetVpLak?1}%^(f?!? zUzv$R|AYVW!^^st5psOB_J3Oh{G2zbQ`4kgV~0(e+A?7%X=?B{44p7>#Mm+Z%#`%B z7Qese&?yD}^o-Pu{M7s`e;odTe_YF?A#MKjl#KY#ohj9X_(^rgvifNZQ`hzATZCmK zmRLNlaE{R>!NL-aWpzSyj#XJk;W>?GbdG32-YAi`;dMgHV@A(p7>#ADxENyMIeXw6 zn=!?oS9|JvgE}32~p_BavDQao>Mqt4g3`cN9+RcBE%~3;UXU_ zi@_Wl&M;nFgm`#9m}R3_HiqXDEJjD3OC@YRArYz?gNq?y92>#1!2;*iRlg!e^Q?yu zM?ze2;Kr;RYvUL<&$>Cr#jzGD0_5aa2bGhU2+C5RCga|*}B6DFA#vK67HVRTpY9)egR%PAb2 zB=9NtEshJrZ7?K=VS-rV!dc_?a1Sr;hapaZIC#b;@HQ$V&l(U|5>5DqB?iYpY^XvJ zID7+}5^xrQAE`2N$&%ZohYP$z6x^8^<@j8uJq|BIT|wRyhdmr}DpDBqjI$ScA3hv{ z;Y1*qBs!?JiAiAXgxK-B^tKq6rUvs&u-lc#avnoTVwp%ujAocfx2xox6W>cDp5u#j zORXsP;-v;gsVAh87drD|nXZ%&5-YH&3=V}2gXFL>*a*%Y2Zuw%4M67{u}M5m-|WQg z!Dt0ur(!cY%gM3~Z5xK>f#e)#z`SvPJa1uHs#_?8hix$C7cXiWl@pSfrO?1PhN|GC zp#)0U0l#G1SX6qiWYb>BNb>CG#Xl`o4&YQ>=Zg-7|~f8YHoS zaFv2kAqxennl`roELF+mdA}r46cEKwfeXSPdVw;yVV<=RQP3EMF&TCU$q+*k-OyWF zS`jpc_XRM(3dc|s=uHwuYUdm)8wOk#Xsf^k=tWF84wx&f7gDKm2$V)h7|ZyfMwa#A z6X4sr9s|r|nM9VvF(k$?B?FKmBg$AVf?;AMImT{-iADgQ1U^ZUk~O7(VY023{)DNq zI>z(fB{gHNeE9I6M&fqHxtM69MR@=tlt)Gm5rlkMNR!26Lc-0a6qZlG`NF($(5mcr z*kVlv079gm#WB1r!NFMkOc9%cHuYo}t=Sv|4eOd0){h@ex*Luy@Q_o&alCjZB*eeE zT`~AZRoq?=zOloM85Y1Bp=zc56ST!LZSpQ8pxEH z*@q?6G9kPuCJAi5$Q1}o2`AMNrk>Zw7-92Qp7^V6!6R?R0l_vyFpm?IK|#JYletzF za~TqcPs3M^i^W+($@q&I6ZZ|XoTr~iC zuw=X&;Y1d#B5#GY<8^vK#DKIA6&`{&;QPTXV{t|>W`GvtgfP&pDB?aMbTtD?<487? zEbvze-#Z?lxCaskhGAzZzp4YoMO%8n^!|I3b~ z&5S-pvyLaEQ8C(ry(2}r6O3O|3Sl4upT=`I#}Gp35wox|;so@VjR?d7uREHCdXxUb zOA&{lbQ+Ct!CV`!esbfz_8-OGW1V*ssAtx@tHKc-)p*>Y~Kq|Z_3HItrL;?je;{rs%uvHlm_U|_tINDvzWDcl%_%CQNsSc^3kSPH`nXgCjXMU(DPvx^omLM_90C8R_YN`pMz z35mmz30xK-F)WF8x?thK433*YNOytKzy>K+1EQg1Pz%Ic$O#w41*=97f?z;wSTg<< z-+(RP2=F=pOpy`aK`J0Kl<%eCl(hx$*@a-M%C6|>Qj-Da$qWnY#FA9P07VK|rdVJ* z5vGKfYGkb^FZSZax(;OvM5T@wdoWygC>%0yVk2RCGF+XkHcD!vKYBRB_hz^z(HP1r zLq&bCto0{sH&yN-a}_REJITvJM6a zvtoCPW1wakLr7miYga83IAsJ;hH=tBhHn?4Pp&Vg3|F*4@MLHhXGEB8RAvUE0s<;r z&K^KP=$RwAx?0GwDToL#Y?g@+aA_L(Wywng_P9aTRk$DIdBGwmy8>3Rswz{gg1{7_ zI6$|BA~564$^=Njyq%gBt0>_hz>t%IIdMudH0*`iM~_DAiHr(wm4$jntb$G?p) ziXbfUg2Zx^Hd9Y#a2X)__#WQN^We|Wm|d1oCD6lFk`X~F}PrpyTj>~_S$s$tJiIJIz^(3wjUa}7OIkv%{u zkpci>w^xv3Wib)VhUX$+(g;726ei125E7Xh-k_-nszFYBImcI;Z7qatl1;4^+fa~U z!#2$As$-=lA`W7tW=S6j!l;?s2;U~!rV;xh$u-*?zLNF6q=v5IJur%M8GSOZ zk2M^#h&oDjOqNZfIDQbX4#KIy&IP77BQ^o;c&VGJRsp)^&pjp!MGQ&PP1&HU0l236 zfS!q}m;uWHD7M0Y14=e1=OhLqliLO600n|qQS}mHkrl*r%5o7}2^*xUQ33M~N=WDo z#fnlSVUQBULuQ)0adm(n#XMfHP81B>;z->-S~N{0#u!c?PlSQGWw>mcBv@z5o~1_E zYQZtn7Q2oQ-e^kMX-PhuQT>h0-X>c+ zXP(?R=pyf!B$}t$f@c$DnqZshiCCywN2u0OlHAJZZA72uP26Nn+GUF05nXj5bHE2d zrH38GC(Uu&^u*U3sjtfs>w{AEh(XIZ^Gs{#65TTg79m?EKwx;dq>d2e;edU@_Cnm| zq)I>rh$?`Srqjd&C^fW5Ne-a}08Ig8Q`#tr8h(TWBM8BIkrGi$=Dn(nc?)9E0|8RKmA$QgR zJ#IJ7!WO@!y6;tMtvA-WZE&WXrz9y&79dE%AbI#E| z?VmZK*P5a?nZs8T>r}y*An6le)jfN^E{N53*HkTJp)F(zA_7Y~A{0XnvJ@jqD2aq1 zd9WbMLB<~-lBji{fWXKHLo0SLZ_L+idL?B8bIHlk|X=b88ZSln7=p}Q=#f^ZR zz$zWNMF6N^)lj|(K^5QxsdygZ;WzzItf3VNTz25I62aQR-BFh?n=2$4r;`tkAxmY5 z5QKE@)8{B5{Y8Bgr%#qcmir41wamHQf6hZo@@_eDBg|3^TEn;&65BF8X?NzpJ7r@Y zp1AZ&-{nthWo{a}2H3+Z-SVp1)N(?l{ zHz3AHsc31A3uE}m;NTLl7FB^IrvwOk{0mqD^wTO#Ai2R;@c01r$;``{EO4M1oz14c zyfR!hPgG&j*4awLMm_T_Yu<4_XoVWR*_O0hj^0W_Hv+EIxYwgns22 zJmd4+;U8qRe9~p&2PGr!G%fsk{PL$;4?bV8>2Y=Yos5QSuJVgPMaT5$ZMuI8=U(av zS;WX7VZ9Oa9Ih6RZzwdZ%M~J9D)O1g!zulO48VBAQBxSw#lyfO30ejF6Z@>H|=R}D6u=$l)dKUH%u|Fn-X8MWgkjx`XHsx<)nch z<+gvE+WbL6zxN8;KdKn>pwraHZL7ZAaqO#S-~RXRlh50ieUdfcT6Epz(6ZA}9gdhH zx60lXj6O|J$Hb*Bw>gG`y75d6I4syZ;c^5i4ct~z(kNmh@IXk=Mr1$0C$LSB62x1c z@hfs1_%|VmZ~!Fe;N=`CfYKNN##|uq9fE_AXBP2XB`eh9b&jiExZpx?&;W+%O4B+P z*$+4~h{pg)ZQruvHvs@+TfqC4CzhX3A!qEX0l(d?r0r7@wkPzuo-+7e{+QeOqwfvb z@{hWOU(_x7^wf8MjaYc8Vael(o1Sgi_sQ?S{n!3e-;P{zCuh)AU-`QcT`!uG4;XRV z-6=a@)j$fu4Uj>?g}xSZ4@s?M*b2gyGNgmaTnb8$N(+);tD*alH_@^iC0`yvKqWEE z&=Ubjw347!KsHINf{@7XkN|LEAX<+v&GtWF3SX_W1@`O%)=alatktfL(wy z!?2O=f_#BCaZF4gdyYo>&hg0CTRZoAbKSoGT)8g>m^h1$)?G7UHL~XaT^Cue;1ytI!4oSpKUZN4#&+f@(`rliq;Vo zFP_OEsHo9QkOAd@-=fqUDyf;MstKeNaaH2;8MYIMn>&1gJ$NCfv{1+unvlxI#LZ=; ze#lW}_aw=&h_%cNj$S1>=c%q)oHj->#uA|iCy(JxV^!;Pt9Pd2oN5l5ues(4mKj?Q z{-uY%tVeD_Skj_*m{a#oTK_-M^_RNL{j&f1XKOC}wfXqpKKty?pMLo5_ve3n^TltM zKKl3OQ$LT`@WqgI-}Qaz+q_YCqZ@BT*I$DRMAg0*+5L(=_bA1`@U<`;-ZD#e&f(Mv zl6kz1g*6Xuzh*ag)0DjAgcjs?AP<7t z=JAcygwLdhi`E1v_KRtZ- z$In0f`}gO+KL6$)Z@vGIwa0&+d-T6*7kp7U^Q)q94?}7%CHA`+-s56e)j4m)Sx4S6 zF=`ueEkST%Jxfi#Wyq@-r5$krnI;iOFnlio_In5p@F;68#R;$J2mPCQ~^| z2dD-ze5I<^!-l)o>|~`ryxh!412pS!ppnhoUvN%UgVvg2x7%X(1Sh>}iC!lor*kZH zMXd&N3`yT3g|1V>)@k8uW#1BO%oZczH6?PJCt-~ozR41`iMZ#pfkV4m(!#2yV>98X~oseI=L)M29zCSDU6u6EEr~%?c zQ(TmtonANSNEAx`sD^PIs>f*@Q;yJLvGj$C$zwDP)a5 z_ka=kDg^LlZstSQYGLb;$I8JgJ#m{H@voSoH&|jf1*h*YM{RMZ?RBQSZb{f>id=)> z*=5ibbM$sGYOgD8pPu<P6%&z`o1~5>{7^|7 zBiqOFmN|?uQ}Zt2T&wh`H5UH@PwMVbFa0G(?Jy;lY0gXYRJd z@06m~YyJ&Ec}HxiZ&>5D+S3nPQ+N6D-g4%>8B~7O)8TAp|J#M5pO(-5x^B^<@w2k>5@lsFkr2LG2z^D2*e(UHcIF(kX1!_8J{HsUf<0rOGh=^p*LRX@E=E?JOl!KC zQ1xMS=Y6*9!+O>cd(NBAob9gEH)1N!HB7%%-1-4Rj=%C<2%p^lTF%hRrK9c_kNtS? z`fo<;`rphUHw#8Sj_G~9WW>FWW9~)vy_nbfQHL?NyUcuCJmh0*{z)zMfSRz&9Q_LM zE|1IE;*3~Ca1DK=?V5AEc!b0JYhOMAHpt!4j0tOYA}8z?nSWiL@Xp zPEN|+%9y5T-bG<4yZDgxfLx?I5S18nbpIN-u@1Wp->SvFZc5pwB=55oA9I$R^H*Mq zu6R4N>T+D~TO}6uJ43*z3MADqKwJG}OT0o?!Tj)ERXzlq<;a*14Es zK*lUc$qHYD_D@LI1XL{wD>fs&G=Z!dGZ5SXOG3mZBYLOg-$=Zx-AS7`-zs0yW& zAHGEjUuQ{uQ%>5a=DwLW=uTqq_Y)f~W)8kpI`K)-kP8DBd{Q^-VR75XDc#-;DL!MQ zQA_q@9Ma;pqoCo--s{WT8&q&Kwd*dEtY`hS2R zTs8IU+(EZ;2Y*o3{sby50w*Ar^qjjT9lP1&u+ZWDrEMw9}|z?p%yjMyqF z4VqfRb43i7L^FAjqm?dMN=GuK(&j}OdIBiH$i@hSHOW4gcP?e!%S~|`vwB`)Lf4z( zcJiScU*}w%csg^yN1evsD;xcBw`osGhF|Hs;OpWMAEx%X?#XFWN`Oi9};Ne5uwM$9%;GZ0`wdW^(3LOPrYt3I95 zbgg{cz2yi0XT+M%7VPy7!8Pd{{dELH*26 zn&y2q2`D%#crH{lJa1|7{}QcK&p_u1JNZXdbZvE>DRx8%(+uB z^lo_WURUOU?3%02ls#(1whn#nSkvC{mhbQfsfJ)xTFa=Ho|S{?#hYhZZ2bX6oTAYW zfWX=9k3*`?x+=~D|GEC~k3&~{)ot?K1LuAZD?XIa;jklqjXrA-g zfir)MT>7Yd#EsOZTk$=v80m-1nTHVx`KVW+aA)pGMAV!?w>ylwGhpeH8JoY}@#d2+ z9zXx-`~UOn^MCyM{clem{j&S`HTfH@JS=U#7E^K7+u-p79)I{t0*^xGNzu0~bAi!kfW zJ8Vwa;7Q%!%6c=r<2i5nsmR{f22Z-yb>3HF)_t|<@bkx?{0vbc@Xycx`QX97UOD`H z{@!0|XWeaB^i9>|r}6dY!^_V3is5_5U?~9Y=#n8`xK%s*%f>|yXYc;{(#^j=efqC&KL5w3Pybwf;Jf}yKCNv3AiMrjc;SJ#;=Q)S zou;6Ll6eC9TgU~_2~m_D=%=El$8urB?M4v<$uPd=CMJx6#WU@~%_hAhGqxiPqCw>KZ?@^(_s^PSpm zS5Nx1b?KA2JAXKN<=K;mzkdJ4AD`d*&+Bh}vuNix^Iw0~d&$F!v7Z8aeU%s7S#O1Q zcsIECm^t&1rNhyf-ZxWv--_$;QO>|S{*Ldu^H1A~k0dwTimAKMaoB_6w!8HU9-;Iz zfBW+jSN=Hi_LrLu{n+r*r+wys(xK%>PUTTs(spa)YJ1p9&Y)SU#We-xTS2LlB;<*C zRHG>O$WkisnnmG@WU)*I+H<-w0!4jG@G{1;T!`B2?{aSX+Rx6O|Mu4(|9#`ecMI2k zT-5tqc&F2H+!j~rZd>B6_`+R!!d@|Qv$x=|r|2|rsN>j&4GW$$&bzZ<#}8YN{;=oR zS8I-ZGjrRQOW*iq%=VvB`@R?7`%+TljmXOPyan(0J6|?3-UzO_oHOh};pp3?E9&j_Z$K{l!t9h+=(i`8)Y<{oXr2F;rp489%sCCIlH4|>6_P!5ppZo0&E00rZP z-aHzd+GsTI6wgXIe!Hjit?FSg=`U`6_{)hiKMbG$Np8add(km9eup(-2U2iad<|a@ z&SXy7g=h?<$sKSbtNBJj>#fH5_xmllJ7W2h5vxC)xaBMS*nRrr%)uW*TG*|xbl-uC ze}z?^O>F+CX3=-$Gd?RG|EO%rSBV2Zh;6vgeeB(kn(GlY?|^$$Pyf7Q+a)xglIu?4 zpE`}b-*xh%x@jMm54&F0dMl>mDTHxP>aNJ_T}=Z|U_?T;PLWWQCylbwj}Vkr%N(v= zC}Q#qLNThhOSD^x=Kz*R-I3+yOLXXFsJ2i#n5YYlkRn$ z^Q3b8qukaHibp?*?{g!p`l3DWPWj&G@NDotjf_f-Y9j#h9P^@Z}^|8El zItVjDu{-xjR_~kf)n^>}hk}bvMt8bkjajQkZi2Mv>k96LAlQ2Jt6IcH6a%#ASHg=9 zBQl4TpNj5wIilmyjK+&u&G%CJ+>GsY3DKy>wCf?=-b1bvUVf@{=)IvYKiP8bx2?yY zZ9nn-qBnjRu=2~gm%go@^F_|^kD?mhFBtj|ziZ0e?df=~(aZElPZgDsqInW;oxwX6%OS52W4<|chb3*7EnzbVx+~#TVp}LW=A*=; z`xdk2xoXg26aa{q_O;#VuUS*}ps}LGZyL4YFHgaKM6B@6?<6(e0*pu2U2ztj%vdr=8{*%Gr6mTdA&hqf$^sTi`r@PR1SF-)1q zgMxXdq=f#WkV+i(Qo?4V_scM)g3=ii6jsL&!VPr$reji_i0#CfjP8LoaxEk@MXWc4 zqW<_2F{TLid9Lu~l5J*q%**+m_OaG!c*U2rRSR3~O5A8k*eryt49-31$v6<-@$KN8 z!=C(uAsx?#RJ{{c^_HXLEqCF`{J{?fuKITM@jtHL`tzsf|M!<~e|_-T|Jiot$JTAn z2d#NlKK8@H;UC90UWc>_B3AX;tUg!4mdy# zYr+H&-^#0lCAAM7ECK5fdjqu4=!ECe>=;92C|INHj)@q8;U}$*kXlI@$OwaYsnuke zq+6#-mdQk&=!)COITy0lDWY|@Xh#icx}=X|&0~3GJa3G`D@2*BxaWzE*{}jJd>se? zP|cCNJEHt-diBYm?7f!E1KzTCJSAr>Ime-{kRF$3?ftdS+ArR^^7Fm>f4_V0*W361 zvF6xMvk&}GGw(^+gvaQoS&NSLoceW4_2sClbD}(905|JrGoB>ELIY}LJ*q> z*OL?aBV=>ZAWWRdrZKu}8af)PXFeL-F{zu)!3%W9R8}5_Sre;kB%RX`TR43Lkw);w zB+W51JaMJPG0g~FZi(NHmbVzaI;Qi<(1h1ek@ggva%3K}7M}^Py%^l{LXV|iPuTm% z>Lb4%zyABNOW(b5>c{nO{n)nl>)QFBcAWfKT+{W8ruQQ|pF{B^x8Kd|ZWmIzoDR?5 z=S+T8^>2mK`Vuz@LCd`fuK;fBo+;oJV9LQ_Z7gbZE_EJR$QP=4J?wmJ-p&Nsgt#nQKF`_Ne|fV(BH>$d4;0-m4n(B(?XM#BQfk z>)uJ|@=iqAq4cVAsEuL#Me!{%g{`pqrV92svUP^$m@eDKW7Zb8WHk@5>;2IvHyPEU zPzJan1fe%g)8h!wVn`!V)$%dzO8EMz)85fYPqQ=tqk$&N0Pr%@YYod-4ACrI{heT) zykN$uF5S1W=E;~=k&G5mZ4uP|CdULiM`dXxd_S{&6w3FkfzUqz1!|&>gm0T;*65KN zpmTfl3Ul-}bkarcgPM+J zZUUzuY`U(OVA9j)sT4T$cT;1cx)O|H(he$<;B5wsReXkktXQ-iz;u}28XNFudS$M!Bz zgO>}g1&VXA9=?$c+aM*pE@vI?Jn6yFM}JM&^4->pf6aUS=Si=8J$&UC0~SB+HTQAt zl>439KdfrMQ{4AbhXGfzdc2)ceRj?(|3TP;0mHvgb<*6k?e1w9Ta-=1(BeX63IK#V z;jkKF!SE*PbE!Ow{x+s?5)>tM&g`9-5)YH5SU5B--|=O5H$mf*uSUZKgRN-8VX#q> zdSGynNWIaH5cC18K7{a1MCgV7i@^6(O-+Uwg)&;%Me#t@n`8WFsWnp`s}4m-L?48B z7D=(=FmXlnNkpBYMsGxuNse8gJM3Qb%5Nv^_`YrBXY+PFU$*m`Nn8Hbvixbkg`f4E z{itci{VpS})r`K?dC2vmK9>{9kNI=nu*I%nFez@IrMhPDR&+T=qj=7W&FKCKQcsTS zD$6}(r3=~9}Y}s8gOA71zmAg0vVJL>ChSTaNIT?mzpV zLF2EOJTpZ5Oh@=y;#y2yI`hqtvXh<1T$#A;S^Jttv$lM>V#hZ~3?{wu<`?2xp=w#o9P z5?gLHRT3s$WXj;Z_4U(uA(*Q{6!HDsfo460V9codJe80_4&!F0%~?j}mt;;0MFESiEzfSULFR zvD3~+C$6+dz9M>-v7W`C-wAam3x-}9IR8G3dFq<4Ht+jl#l}xwe)X$)>%Sbnk?F!G_=}CMAvroEbhH6F>oZ<4!!e5aLdhuK>f)FN8Fn?0h zeLAKVoQ@Lo31Pp;2m#O7N`Mbzw%LrHvm4G2Tl{#`(g#bne7@)4cUxckbj^;>rY-xVefFKkVVBG6 z&z1B(pHg}tp?GgZ?rX7muj!$S%XT!FlF7{6+BMR5r_JsD~6CuN41n} zEJAQxG^Dj!GO!edCR1QalJ=Rb7?VVQm_iwboCyMQKY<^K-^blkLPGM*rb^&D%!6UU zzjKg3BehsxaAFtZ{`O>wIr!0HWI_+-P<_iPIKdNXvliU5g zC*{?Mv@L>bjx%(zGh!KllkkH?%UCcfm=Ys)0kWt%(5EvjlrU(Rg~56yF$ViWJQpc2 zn34Ch3_AWnU|Kdq!=M=kilYK~VhUmV5Hfh_-p@s47)CdBsgh1$3kC3SG^Q|_3{wG3 zb65j&egs~SYBoynmmK!)bYp>(N&-v(J=ZQaM>9%-ylJ>IZ2nuPp4wb9!XhzBx4;Np zrp0au%6PrJ&&|Y&qn-M{+dS*TY3n|py8OxbMfV4cxl!MKqjJEd4h`>ScRrF@@`mo7 z7nQzRcFlz)n}cVdl!0!h*)dMkF-JTgEo}<=yBJ#z04+LX7?%r2m!D7xF(vAub4he* z&#RJfDlo=8@B`j~;dyM)uv{0^*qkIT5ij0)?dtv#9`sX?PKE zkKrxEIz=g^?MYfl$b;|zd^9dF!#i1BjwNlyec?s z4W{NXT#nQiF+!GW409h$iJ>k@m>4XA!B=J3uPI@g9F0vm%mnLdSYWr&P6eiu9>hk~ zO(G3F3tFnJStANPWC>xq0Am3VDG<0ZL<-^^ha<$08Wc-MY}s@ytpun{8f+VAf%31R zqB~W_kxtm08$JHU$6x*Bk6O)}MjOrob zmo%L%=yoive1AsAgV1eM_I7{94n1VCP`$cyi&MysCqdS+B(x>(2gkLV1yYcC2}bk8OPuX zRASLf&}6ZiW6=_)(^+VpVw?wahnf(jYVRQQpddu+5 zGY2m+g)fiJeHHr5D%ly4xgA$X+NP-VtDy51xgHD=86Vp19wiaif>yhQ>JaSWUY1V#aY!{isqq?DCQ1awmXCzQ}7#v`y*xlCPagz~!HgfiiRG;^6qTuGqD<_|=#g!hDQ5WQi6u+Y`RbWFHF!Cty>7Nevu2#K8ST(rr8zssgpZ7CG$Bi#-p_vRh1KSgT+uq&Y%JV>M2}jfS-tRKVBJtRR_ZibqzMBBF|M3Yf>l;o&UthaoE6E+lYW3@4+bL3i)q$vi2<)K>t&bAe~E(G8N+ z9sNr>)JN)2WHV_~0?PtJh%i|9&euYhntfA@;F*$h8m*zL%`{`-y0ABACQ3!0EV&^Oo#P3_V3rtIG$g^nahN;BXgtiD4%c!{j6&dhTtGZz&ae=W6MV%- z2WGERAt%K!CWQk?GDX;nplV@j3F%4*Hoh@~3xlT@bPnJlq@yS`28YmPJ6`M~u>Cl# zzn~8%N|VJ2%H67(FflaPVr_A_Q9`Pxv#cxz(?Q*`3=M9Q1hxZ%f2n@|NVN$wlisO)8!`+^B@BzMBNT?p@i>US#0 zIkqcVo=$<{T)<2Or59EUQK>MQ2SY;C8Bu0I0|c|Y$Uso0F?5;$x!v6Xjnr3Z)iJfO zutne!a6c4csCnbUih9V9Au|J;S#)KNZY*Ih6noBeABzf%hfP2_>_X#5dJ0&2hkfI0 z@Fob1bxK8rVbC=myB#!(GIH1t-TVIksR*qBa`BiK7x_*MDQDSkwBW$jC`v7o7{Xx_ zIHm!xcXwv5~;Pt-h`RwP$Rs z8;4jq)#)QG@Iyd!tc25DN=mp{S7}irM?l3W_XOWYe8wl5%!yuaF~$~gu1KT{hc`@njbmEPkY0(0HT;Au7vAW|IRoYWiprMCZUh z53(pP!OpArG)BP&o+rRU9-=#Vt3Z|L9)19yfXR`n8UarX7;xap1RxmnVK~@vzz*Jv zC({JBX`y6bbxbs(2#rQy9RZ6EJhcRKv6BaBgMF!Z5D8ow878b91P6^=}m${daqpm1UCjFl{hR9(;#Fv zkS3VS2G(}4S!!UR78f37f=(hml@~DyUm-T23qp3N+ys;d7sXkClh9|e(37)6W|NMv zj7Wwj(x7@osR+XtZrgN`uyIy%2Tq_S5EO)S#N7l`As~2o=^Zm6nwkKNrN0tbas$%7 zAj1Kco{Xmu1^y}K#nLW#B160>DP2%wH4H!(-XcdV*`iYeZeRfIU8B$On1O~OlS3sBDg#0TsuyP8UM?k|9 z5^N9{eiFz%;3Tki%;x%#KjFy>2wHGmcx-Lm(7-+6aZxyX_yTrVDdT}_5EhTJ$)lS> zTq0d!=P*e`e+xodjlgyliN+%ofW2^99W4?z1Wy_F2^Xz&I4J$;r4d@u~3iEIIP z7$A~Xa6}5o6pHB;*qx;drFire2o}VK%sy|}-N{!b-B`zbMX+c)sk(b7>9MY`8Tp0B ScFe&`q`Fg0$0Ox~7W_XxaP++Z diff --git a/sources/meta-openembedded/meta-oe/recipes-navigation/orrery/orrery/use.GdkPixbuf.patch b/sources/meta-openembedded/meta-oe/recipes-navigation/orrery/orrery/use.GdkPixbuf.patch deleted file mode 100644 index 2abb320d..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-navigation/orrery/orrery/use.GdkPixbuf.patch +++ /dev/null @@ -1,61 +0,0 @@ -Upstream-Status: Pending - -From: Benjamin Deering -Subject: orrery crashing X -Date: Thursday, September 2, 2010 - 5:25 pm -Link: http://kerneltrap.org/mailarchive/openmoko-community/2010/9/3/13218 - -diff -uNr orrery.orig//orrery.c orrery/orrery.c ---- orrery.orig//orrery.c 2009-11-30 06:59:44.000000000 +0100 -+++ orrery/orrery.c 2010-11-15 22:33:17.000000000 +0100 -@@ -1238,12 +1238,44 @@ - } - currentEntry = currentEntry->forwardPointer; - } -- if (nDarkGreyPoints > 0) -- gdk_draw_points(pixmap, darkGreyGC, darkGreyPoints, nDarkGreyPoints); -- if (nGreyPoints > 0) -- gdk_draw_points(pixmap, greyGC, greyPoints, nGreyPoints); -- if (nWhitePoints > 0) -- gdk_draw_points(pixmap, whiteGC, whitePoints, nWhitePoints); -+ GdkPixbuf* starDrawingBuf = gdk_pixbuf_get_from_drawable( NULL, -+ pixmap, -+ gdk_colormap_get_system() -+ , 0, 0, 0, 0, displayWidth, displayHeight); -+ g_assert (gdk_pixbuf_get_bits_per_sample (starDrawingBuf) == 8); -+ guchar* p; -+ int rowstride = gdk_pixbuf_get_rowstride (starDrawingBuf); -+ guchar* pixels = gdk_pixbuf_get_pixels (starDrawingBuf); -+ int n_channels = gdk_pixbuf_get_n_channels (starDrawingBuf); -+ GdkGCValues starGCval; -+ GdkColor starColor; -+ int pointNum; -+ gdk_gc_get_values(darkGreyGC, &starGCval); -+ gdk_colormap_query_color( gdk_gc_get_colormap(darkGreyGC),starGCval.foreground.pixel, &starColor ); -+ for( pointNum = 0; pointNum < nDarkGreyPoints; pointNum++) { -+ p = pixels + darkGreyPoints[pointNum].y * rowstride + darkGreyPoints[pointNum].x * n_channels; -+ p[0] = starColor.red & 0xff; -+ p[1] = starColor.green & 0xff; -+ p[2] = starColor.blue & 0xff; -+ } -+ gdk_gc_get_values(greyGC, &starGCval); -+ gdk_colormap_query_color( gdk_gc_get_colormap(greyGC), starGCval.foreground.pixel, &starColor ); -+ for( pointNum = 0; pointNum < nGreyPoints; pointNum++) { -+ p = pixels + greyPoints[pointNum].y * rowstride + greyPoints[pointNum].x * n_channels; -+ p[0] = starColor.red & 0xff; -+ p[1] = starColor.green & 0xff; -+ p[2] = starColor.blue & 0xff; -+ } -+ gdk_gc_get_values(whiteGC, &starGCval); -+ gdk_colormap_query_color( gdk_gc_get_colormap(whiteGC), starGCval.foreground.pixel, &starColor ); -+ for( pointNum = 0; pointNum < nWhitePoints; pointNum++) { -+ p = pixels + whitePoints[pointNum].y * rowstride + whitePoints[pointNum].x * n_channels; -+ p[0] = starColor.red & 0xff; -+ p[1] = starColor.green & 0xff; -+ p[2] = starColor.blue & 0xff; -+ } -+ gdk_draw_pixbuf ( pixmap , NULL , starDrawingBuf, -+ 0, 0, 0, 0, displayWidth, displayHeight, GDK_RGB_DITHER_NORMAL, 0, 0 ) ; - } - - void makeTimeString(char *string) diff --git a/sources/meta-openembedded/meta-oe/recipes-navigation/orrery/orrery_2.7.bb b/sources/meta-openembedded/meta-oe/recipes-navigation/orrery/orrery_2.7.bb deleted file mode 100644 index 96a7018d..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-navigation/orrery/orrery_2.7.bb +++ /dev/null @@ -1,37 +0,0 @@ -SUMMARY = "Astronomical application which displays the night sky" -HOMEPAGE = "http://projects.openmoko.org/projects/orrery/" -SECTION = "x11/scientific" -LICENSE = "GPL-2.0-or-later" -LIC_FILES_CHKSUM = "file://orrery.c;endline=25;md5=d792bdf2b591972da175aecc38d88cfe" -DEPENDS = "gtk+" - -inherit features_check autotools-brokensep pkgconfig - -REQUIRED_DISTRO_FEATURES = "x11" - -SRC_URI = "http://projects.openmoko.org/frs/download.php/923/orrery_2.7_clean.tar.gz \ - file://orrery.png \ - file://use.GdkPixbuf.patch \ - file://0001-orrery-Fix-sprintf-format.patch \ - file://0001-Append-cflags-instead-of-overriding-in-Makefile.am.patch \ - " - -SRC_URI[md5sum] = "bd62a33e7554ee1030313dfcdefcda8b" -SRC_URI[sha256sum] = "645166a5e05b2064ab630534a514697fc47b681951e7fe1d635c259cbdf7a5e6" - -S = "${WORKDIR}/${BPN}" - -do_configure:prepend() { - # fix DSO issue with binutils-2.22 - sed -i 's/ -lrt$/ -lrt -lm/g' ${S}/Makefile.am -} -do_install:append() { - install -d ${D}${datadir}/orrery - cp -R --no-dereference --preserve=mode,links -v ${S}/data/* ${D}${datadir}/orrery - chown -R root:root ${D}${datadir}/orrery - install -d ${D}${datadir}/icons - install -m 0755 ${WORKDIR}/orrery.png ${D}${datadir}/icons - rm -rf ${D}${datadir}/orrery/Makefile* -} - -FILES:${PN} += "${datadir}/icons/orrery.png" diff --git a/sources/meta-openembedded/meta-oe/recipes-networking/cyrus-sasl/cyrus-sasl_2.1.28.bb b/sources/meta-openembedded/meta-oe/recipes-networking/cyrus-sasl/cyrus-sasl_2.1.28.bb index d85ef205..a6703ecf 100644 --- a/sources/meta-openembedded/meta-oe/recipes-networking/cyrus-sasl/cyrus-sasl_2.1.28.bb +++ b/sources/meta-openembedded/meta-oe/recipes-networking/cyrus-sasl/cyrus-sasl_2.1.28.bb @@ -58,7 +58,7 @@ do_compile:prepend () { do_install:append() { if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/saslauthd.service ${D}${systemd_unitdir}/system + install -m 0644 ${UNPACKDIR}/saslauthd.service ${D}${systemd_unitdir}/system sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/saslauthd.service sed -i -e 's#@LOCALSTATEDIR@#${localstatedir}#g' ${D}${systemd_unitdir}/system/saslauthd.service @@ -68,7 +68,7 @@ do_install:append() { echo "d /run/saslauthd/ - - - -" > ${D}${sysconfdir}/tmpfiles.d/saslauthd.conf install -d ${D}${sysconfdir}/default/ - install -m 0644 ${WORKDIR}/saslauthd.conf ${D}${sysconfdir}/default/saslauthd + install -m 0644 ${UNPACKDIR}/saslauthd.conf ${D}${sysconfdir}/default/saslauthd sed -i -e 's#@LOCALSTATEDIR@#${localstatedir}#g' ${D}${sysconfdir}/default/saslauthd fi } diff --git a/sources/meta-openembedded/meta-oe/recipes-printing/cups/cups-filters_2.0.0.bb b/sources/meta-openembedded/meta-oe/recipes-printing/cups/cups-filters_2.0.0.bb index efcd1aab..ff4ed167 100644 --- a/sources/meta-openembedded/meta-oe/recipes-printing/cups/cups-filters_2.0.0.bb +++ b/sources/meta-openembedded/meta-oe/recipes-printing/cups/cups-filters_2.0.0.bb @@ -11,6 +11,8 @@ SRC_URI = " \ " SRC_URI[sha256sum] = "b5152e3dd148ed73835827ac2f219df7cf5808dbf9dbaec2aa0127b44de800d8" +UPSTREAM_CHECK_URI = "https://github.com/OpenPrinting/cups-filters/releases" + inherit autotools gettext pkgconfig github-releases EXTRA_OECONF += " \ diff --git a/sources/meta-openembedded/meta-oe/recipes-printing/qpdf/qpdf_11.8.0.bb b/sources/meta-openembedded/meta-oe/recipes-printing/qpdf/qpdf_11.8.0.bb deleted file mode 100644 index a13c9a02..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-printing/qpdf/qpdf_11.8.0.bb +++ /dev/null @@ -1,31 +0,0 @@ -DESCRIPTION = "PDF transformation/inspection software" -HOMEPAGE = "http://qpdf.sourceforge.net" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57" - -DEPENDS = "zlib jpeg ${@bb.utils.contains('PACKAGECONFIG', 'gnutls', 'gnutls', 'openssl', d)}" - -SRC_URI = "git://github.com/qpdf/qpdf.git;protocol=https;branch=main" -SRCREV = "452e1f5c20ec6adf62cd296cb9dddacbc06e6ffa" - -inherit cmake pkgconfig gettext - -EXTRA_OECMAKE = ' \ - -DRANDOM_DEVICE="/dev/random" \ - -DBUILD_STATIC_LIBS=OFF \ - -DALLOW_CRYPTO_NATIVE=OFF \ - -DUSE_IMPLICIT_CRYPTO=OFF \ -' - -LDFLAGS:append:mipsarch = " -latomic" -LDFLAGS:append:riscv32 = " -latomic" - -S="${WORKDIR}/git" - -PACKAGECONFIG ?= "gnutls" -PACKAGECONFIG[gnutls] = "-DREQUIRE_CRYPTO_GNUTLS=ON,-DREQUIRE_CRYPTO_OPENSSL=ON" - -do_install:append() { - # Change the fully defined path on the target - sed -i -e 's|${STAGING_LIBDIR}|${libdir}|g' ${D}${libdir}/cmake/${BPN}/libqpdfTargets.cmake -} diff --git a/sources/meta-openembedded/meta-oe/recipes-printing/qpdf/qpdf_11.9.1.bb b/sources/meta-openembedded/meta-oe/recipes-printing/qpdf/qpdf_11.9.1.bb new file mode 100644 index 00000000..f8b398c3 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-printing/qpdf/qpdf_11.9.1.bb @@ -0,0 +1,31 @@ +DESCRIPTION = "PDF transformation/inspection software" +HOMEPAGE = "http://qpdf.sourceforge.net" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57" + +DEPENDS = "zlib jpeg ${@bb.utils.contains('PACKAGECONFIG', 'gnutls', 'gnutls', 'openssl', d)}" + +SRC_URI = "git://github.com/qpdf/qpdf.git;protocol=https;branch=main" +SRCREV = "c03ee7aa663c4361e23ca32b596adf6e8be0e8ac" + +inherit cmake pkgconfig gettext + +EXTRA_OECMAKE = ' \ + -DRANDOM_DEVICE="/dev/random" \ + -DBUILD_STATIC_LIBS=OFF \ + -DALLOW_CRYPTO_NATIVE=OFF \ + -DUSE_IMPLICIT_CRYPTO=OFF \ +' + +LDFLAGS:append:mipsarch = " -latomic" +LDFLAGS:append:riscv32 = " -latomic" + +S="${WORKDIR}/git" + +PACKAGECONFIG ?= "gnutls" +PACKAGECONFIG[gnutls] = "-DREQUIRE_CRYPTO_GNUTLS=ON,-DREQUIRE_CRYPTO_OPENSSL=ON" + +do_install:append() { + # Change the fully defined path on the target + sed -i -e 's|${STAGING_LIBDIR}|${libdir}|g' ${D}${libdir}/cmake/${BPN}/libqpdfTargets.cmake +} diff --git a/sources/meta-openembedded/meta-oe/recipes-security/audit/audit/0001-Replace-__attribute_malloc__-with-__attribute__-__ma.patch b/sources/meta-openembedded/meta-oe/recipes-security/audit/audit/0001-Replace-__attribute_malloc__-with-__attribute__-__ma.patch deleted file mode 100644 index b1f324f2..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-security/audit/audit/0001-Replace-__attribute_malloc__-with-__attribute__-__ma.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 88c9b2c5cebebf13f90890baebbadc60d9fe8d16 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Tue, 9 Aug 2022 23:57:03 -0700 -Subject: [PATCH] Replace __attribute_malloc__ with __attribute__((__malloc__)) - -__attribute_malloc__ is not available on musl - -Fixes -| ../../git/auparse/auparse.h:54:2: error: expected function body after function declarator -| __attribute_malloc__ __attr_dealloc (auparse_destroy, 1); -| ^ - -Upstream-Status: Pending - -Signed-off-by: Khem Raj ---- - audisp/plugins/remote/queue.h | 2 +- - auparse/auparse.h | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/audisp/plugins/remote/queue.h b/audisp/plugins/remote/queue.h -index 36b70d04..031507dc 100644 ---- a/audisp/plugins/remote/queue.h -+++ b/audisp/plugins/remote/queue.h -@@ -53,7 +53,7 @@ void q_close(struct queue *q); - * On error, return NULL and set errno. */ - struct queue *q_open(int q_flags, const char *path, size_t num_entries, - size_t entry_size) -- __attribute_malloc__ __attr_dealloc (q_close, 1) __wur; -+ __attribute__((__malloc__)) __attr_dealloc (q_close, 1) __wur; - - /* Add DATA to tail of Q. Return 0 on success, -1 on error and set errno. */ - int q_append(struct queue *q, const char *data); -diff --git a/auparse/auparse.h b/auparse/auparse.h -index c27f1ff9..87c52965 100644 ---- a/auparse/auparse.h -+++ b/auparse/auparse.h -@@ -55,7 +55,7 @@ typedef void (*auparse_callback_ptr)(auparse_state_t *au, - void auparse_destroy(auparse_state_t *au); - void auparse_destroy_ext(auparse_state_t *au, auparse_destroy_what_t what); - auparse_state_t *auparse_init(ausource_t source, const void *b) -- __attribute_malloc__ __attr_dealloc (auparse_destroy, 1); -+ __attribute__((__malloc__)) __attr_dealloc (auparse_destroy, 1); - int auparse_new_buffer(auparse_state_t *au, const char *data, size_t data_len) - __attr_access ((__read_only__, 2, 3)); - int auparse_feed(auparse_state_t *au, const char *data, size_t data_len) --- -2.25.1 - diff --git a/sources/meta-openembedded/meta-oe/recipes-security/audit/audit_4.0.1.bb b/sources/meta-openembedded/meta-oe/recipes-security/audit/audit_4.0.1.bb deleted file mode 100644 index a37ae3bb..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-security/audit/audit_4.0.1.bb +++ /dev/null @@ -1,103 +0,0 @@ -SUMMARY = "User space tools for kernel auditing" -DESCRIPTION = "The audit package contains the user space utilities for \ -storing and searching the audit records generated by the audit subsystem \ -in the Linux kernel." -HOMEPAGE = "http://people.redhat.com/sgrubb/audit/" -SECTION = "base" -LICENSE = "GPL-2.0-or-later & LGPL-2.0-or-later" -LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" - -SRC_URI = "git://github.com/linux-audit/${BPN}-userspace.git;branch=master;protocol=https \ - file://0001-Fixed-swig-host-contamination-issue.patch \ - file://auditd \ - file://audit-volatile.conf \ - " - -SRC_URI:append:libc-musl = " file://0001-Replace-__attribute_malloc__-with-__attribute__-__ma.patch" - -S = "${WORKDIR}/git" -SRCREV = "22ccbd984e493524050ac445f796e9a7e90e1149" - -inherit autotools python3targetconfig update-rc.d systemd - -UPDATERCPN = "auditd" -INITSCRIPT_NAME = "auditd" -INITSCRIPT_PARAMS = "defaults" - -SYSTEMD_PACKAGES = "auditd" -SYSTEMD_SERVICE:auditd = "auditd.service audit-rules.service" - -DEPENDS = "python3 tcp-wrappers libcap-ng linux-libc-headers swig-native python3-setuptools-native coreutils-native" - -EXTRA_OECONF = " \ - --with-libwrap \ - --with-libcap-ng \ - --with-python3 \ - --with-arm \ - --with-aarch64 \ - --without-golang \ - --disable-gssapi-krb5 \ - --disable-zos-remote \ - --sbindir=${base_sbindir} \ - --runstatedir=/run \ - " - -EXTRA_OEMAKE = " \ - PYTHON=python3 \ - pythondir=${PYTHON_SITEPACKAGES_DIR} \ - pyexecdir=${PYTHON_SITEPACKAGES_DIR} \ - STDINC='${STAGING_INCDIR}' \ - " - -SUMMARY:audispd-plugins = "Plugins for the audit event dispatcher" -DESCRIPTION:audispd-plugins = "The audispd-plugins package provides plugins for the real-time \ -interface to the audit system, audispd. These plugins can do things \ -like relay events to remote machines or analyze events for suspicious \ -behavior." - -PACKAGES =+ "audispd-plugins" -PACKAGES += "auditd ${PN}-python" - -FILES:${PN} = "${sysconfdir}/libaudit.conf ${libdir}/libau*.so.*" -FILES:auditd = "${bindir}/* ${base_sbindir}/* ${sysconfdir}/* ${datadir}/audit-rules/* ${libexecdir}/*" -FILES:audispd-plugins = "${sysconfdir}/audit/audisp-remote.conf \ - ${sysconfdir}/audit/plugins.d/au-remote.conf \ - ${sysconfdir}/audit/plugins.d/syslog.conf \ - ${base_sbindir}/audisp-remote \ - ${base_sbindir}/audisp-syslog \ - ${localstatedir}/spool/audit \ - " -FILES:${PN}-dbg += "${libdir}/python${PYTHON_BASEVERSION}/*/.debug" -FILES:${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}" - -CONFFILES:auditd = "${sysconfdir}/audit/audit.rules" - -do_configure:prepend() { - sed -e 's|buf\[];|buf[0];|g' ${STAGING_INCDIR}/linux/audit.h > ${S}/lib/audit.h - sed -i -e 's|#include |#include "audit.h"|g' ${S}/lib/libaudit.h -} - -do_install:append() { - sed -i -e 's|#include "audit.h"|#include |g' ${D}${includedir}/libaudit.h - - # Install default rules - install -d -m 750 ${D}/etc/audit - install -d -m 750 ${D}/etc/audit/rules.d - - install -m 0640 ${S}/rules/10-base-config.rules ${D}/etc/audit/rules.d/audit.rules - - # Based on the audit.spec "Copy default rules into place on new installation" - install -m 0640 ${D}/etc/audit/rules.d/audit.rules ${D}/etc/audit/audit.rules - - if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then - install -D -m 0644 ${WORKDIR}/audit-volatile.conf ${D}${sysconfdir}/tmpfiles.d/audit.conf - fi - - if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then - install -D -m 0755 ${WORKDIR}/auditd ${D}/etc/init.d/auditd - rm -rf ${D}${libdir}/systemd - fi - - # Create /var/spool/audit directory for audisp-remote - install -d -m 0700 ${D}${localstatedir}/spool/audit -} diff --git a/sources/meta-openembedded/meta-oe/recipes-security/audit/audit_4.0.2.bb b/sources/meta-openembedded/meta-oe/recipes-security/audit/audit_4.0.2.bb new file mode 100644 index 00000000..4f150792 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-security/audit/audit_4.0.2.bb @@ -0,0 +1,109 @@ +SUMMARY = "User space tools for kernel auditing" +DESCRIPTION = "The audit package contains the user space utilities for \ +storing and searching the audit records generated by the audit subsystem \ +in the Linux kernel." +HOMEPAGE = "http://people.redhat.com/sgrubb/audit/" +SECTION = "base" +LICENSE = "GPL-2.0-or-later & LGPL-2.0-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" + +SRC_URI = "git://github.com/linux-audit/${BPN}-userspace.git;branch=master;protocol=https \ + file://0001-Fixed-swig-host-contamination-issue.patch \ + file://auditd \ + file://audit-volatile.conf \ + " + +S = "${WORKDIR}/git" +SRCREV = "4e6deae41d4646d28bb3ba9524a8a227a38ccd0b" + +inherit autotools python3targetconfig update-rc.d systemd + +UPDATERCPN = "auditd" +INITSCRIPT_NAME = "auditd" +INITSCRIPT_PARAMS = "defaults" + +SYSTEMD_PACKAGES = "auditd" +SYSTEMD_SERVICE:auditd = "auditd.service audit-rules.service" + +DEPENDS = "python3 tcp-wrappers libcap-ng linux-libc-headers swig-native python3-setuptools-native coreutils-native" + +EXTRA_OECONF = " \ + --with-libwrap \ + --with-libcap-ng \ + --with-python3 \ + --with-arm \ + --with-aarch64 \ + --without-golang \ + --disable-gssapi-krb5 \ + --disable-zos-remote \ + --sbindir=${base_sbindir} \ + --runstatedir=/run \ + " + +EXTRA_OEMAKE = " \ + PYTHON=python3 \ + pythondir=${PYTHON_SITEPACKAGES_DIR} \ + pyexecdir=${PYTHON_SITEPACKAGES_DIR} \ + STDINC='${STAGING_INCDIR}' \ + " + +SUMMARY:audispd-plugins = "Plugins for the audit event dispatcher" +DESCRIPTION:audispd-plugins = "The audispd-plugins package provides plugins for the real-time \ +interface to the audit system, audispd. These plugins can do things \ +like relay events to remote machines or analyze events for suspicious \ +behavior." + +PACKAGES =+ "audispd-plugins" +PACKAGES += "auditd ${PN}-python" + +FILES:${PN} = "${sysconfdir}/libaudit.conf ${libdir}/libau*.so.*" +FILES:auditd = "${bindir}/* ${base_sbindir}/* ${sysconfdir}/* ${datadir}/audit-rules/* ${libexecdir}/*" +FILES:audispd-plugins = "${sysconfdir}/audit/audisp-remote.conf \ + ${sysconfdir}/audit/plugins.d/au-remote.conf \ + ${sysconfdir}/audit/plugins.d/syslog.conf \ + ${base_sbindir}/audisp-remote \ + ${base_sbindir}/audisp-syslog \ + ${localstatedir}/spool/audit \ + " +FILES:${PN}-dbg += "${libdir}/python${PYTHON_BASEVERSION}/*/.debug" +FILES:${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}" + +CONFFILES:auditd = "${sysconfdir}/audit/audit.rules" + +do_configure:prepend() { + sed -e 's|buf\[];|buf[0];|g' ${STAGING_INCDIR}/linux/audit.h > ${S}/lib/audit.h + sed -i -e 's|#include |#include "audit.h"|g' ${S}/lib/libaudit.h +} + +do_install:append() { + sed -i -e 's|#include "audit.h"|#include |g' ${D}${includedir}/libaudit.h + + # Install default rules + install -d -m 750 ${D}/etc/audit + install -d -m 750 ${D}/etc/audit/rules.d + + install -m 0640 ${S}/rules/10-base-config.rules ${D}/etc/audit/rules.d/audit.rules + + # Based on the audit.spec "Copy default rules into place on new installation" + install -m 0640 ${D}/etc/audit/rules.d/audit.rules ${D}/etc/audit/audit.rules + + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + install -D -m 0644 ${UNPACKDIR}/audit-volatile.conf ${D}${sysconfdir}/tmpfiles.d/audit.conf + fi + + if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then + install -D -m 0755 ${UNPACKDIR}/auditd ${D}/etc/init.d/auditd + fi + + if ! ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + rm -rf ${D}${libdir}/systemd + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${B}/init.d/auditd.service ${D}${systemd_unitdir}/system/ + install -m 0644 ${B}/init.d/audit-rules.service ${D}${systemd_unitdir}/system/ + fi + + # Create /var/spool/audit directory for audisp-remote + install -d -m 0700 ${D}${localstatedir}/spool/audit +} + +CVE_PRODUCT = "linux:audit" diff --git a/sources/meta-openembedded/meta-oe/recipes-security/bubblewrap/bubblewrap_0.10.0.bb b/sources/meta-openembedded/meta-oe/recipes-security/bubblewrap/bubblewrap_0.10.0.bb new file mode 100644 index 00000000..60155e03 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-security/bubblewrap/bubblewrap_0.10.0.bb @@ -0,0 +1,24 @@ +DESCRIPTION = "Unprivileged sandboxing tool" +HOMEPAGE = "https://github.com/containers/bubblewrap" +LICENSE = "LGPL-2.0-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2" + +DEPENDS = "libcap" + +SRC_URI = "https://github.com/containers/${BPN}/releases/download/v${PV}/${BP}.tar.xz" +SRC_URI[sha256sum] = "65d92cf44a63a51e1b7771f70c05013dce5bd6b0b2841c4b4be54b0c45565471" + +inherit autotools bash-completion github-releases manpages pkgconfig + +GITHUB_BASE_URI = "https://github.com/containers/${BPN}/releases/" + +PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'selinux', d)}" +PACKAGECONFIG[manpages] = "--enable-man,--disable-man,libxslt-native docbook-xsl-stylesheets-native xmlto-native" +PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux" +PACKAGECONFIG[setuid] = "--with-priv-mode=setuid,--with-priv-mode=none" + +PACKAGES += "${PN}-zsh-completion" + +FILES:${PN}-zsh-completion = "${datadir}/zsh/site-functions" + +BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-oe/recipes-security/bubblewrap/bubblewrap_0.8.0.bb b/sources/meta-openembedded/meta-oe/recipes-security/bubblewrap/bubblewrap_0.8.0.bb deleted file mode 100644 index 06c42add..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-security/bubblewrap/bubblewrap_0.8.0.bb +++ /dev/null @@ -1,24 +0,0 @@ -DESCRIPTION = "Unprivileged sandboxing tool" -HOMEPAGE = "https://github.com/containers/bubblewrap" -LICENSE = "LGPL-2.0-or-later" -LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2" - -DEPENDS = "libcap" - -SRC_URI = "https://github.com/containers/${BPN}/releases/download/v${PV}/${BP}.tar.xz" -SRC_URI[sha256sum] = "957ad1149db9033db88e988b12bcebe349a445e1efc8a9b59ad2939a113d333a" - -inherit autotools bash-completion github-releases manpages pkgconfig - -GITHUB_BASE_URI = "https://github.com/containers/${BPN}/releases/" - -PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'selinux', d)}" -PACKAGECONFIG[manpages] = "--enable-man,--disable-man,libxslt-native docbook-xsl-stylesheets-native xmlto-native" -PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux" -PACKAGECONFIG[setuid] = "--with-priv-mode=setuid,--with-priv-mode=none" - -PACKAGES += "${PN}-zsh-completion" - -FILES:${PN}-zsh-completion = "${datadir}/zsh/site-functions" - -BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-oe/recipes-security/nmap/files/0001-Make-ndiff-support-python3.patch b/sources/meta-openembedded/meta-oe/recipes-security/nmap/files/0001-Make-ndiff-support-python3.patch deleted file mode 100644 index 2ca18b0e..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-security/nmap/files/0001-Make-ndiff-support-python3.patch +++ /dev/null @@ -1,1720 +0,0 @@ -From bbbf474b2ebdbdac4d557e3351210f3fe2175c33 Mon Sep 17 00:00:00 2001 -From: Mingli Yu -Date: Fri, 14 Feb 2020 10:09:55 +0000 -Subject: [PATCH] Make ndiff support python3 - -Backport a patch from debian to make ndiff support -python3. - -Refer to https://sources.debian.org/data/main/n/nmap/7.80+dfsg1-2/debian/patches/0004-Python3-port-of-ndiff.patch - -Upstream-Status: Pending - -Signed-off-by: Mingli Yu ---- - Makefile.in | 12 +- - ndiff/ndiff.py | 495 +++++++++++++++++----------------- - ndiff/ndifftest.py | 94 +++---- - ndiff/scripts/ndiff | 14 +- - ndiff/setup.py | 34 +-- - ndiff/test-scans/anonymize.py | 18 +- - 6 files changed, 333 insertions(+), 334 deletions(-) - mode change 100644 => 100755 ndiff/setup.py - -diff --git a/Makefile.in b/Makefile.in -index eee8863..32f86ba 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -35,6 +35,7 @@ ZENMAPDIR = @ZENMAPDIR@ - NDIFFDIR = @NDIFFDIR@ - NPINGDIR = @NPINGDIR@ - PYTHON = @PYTHON@ -+PYTHON3 = /usr/bin/env python3 - DEFS = @DEFS@ -DNMAP_PLATFORM=\"$(NMAP_PLATFORM)\" -DNMAPDATADIR=\"$(nmapdatadir)\" - # With GCC, add extra security checks to source code. - # http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02055.html -@@ -260,7 +261,7 @@ clean-zenmap: - rm -f $(ZENMAPDIR)/zenmapCore/Name.pyc - - clean-ndiff: -- -cd $(NDIFFDIR) && $(PYTHON) setup.py clean --all -+ -cd $(NDIFFDIR) && $(PYTHON3) setup.py clean --all - - clean-nping: - -cd $(NPINGDIR) && $(MAKE) clean -@@ -368,6 +369,7 @@ tests/check_dns: $(OBJS) - # this as the location of the interpreter whenever we're not doing a - # local installation. - DEFAULT_PYTHON_PATH = /usr/bin/env python -+DEFAULT_PYTHON3_PATH = /usr/bin/env python3 - - build-zenmap: $(ZENMAPDIR)/setup.py $(ZENMAPDIR)/zenmapCore/Version.py - # When DESTDIR is defined, assume we're building an executable -@@ -388,13 +390,13 @@ install-zenmap: $(ZENMAPDIR)/setup.py - ln -sf zenmap $(DESTDIR)$(bindir)/xnmap - - build-ndiff: -- cd $(NDIFFDIR) && $(PYTHON) setup.py build $(if $(DESTDIR),--executable "$(DEFAULT_PYTHON_PATH)") -+ cd $(NDIFFDIR) && $(PYTHON3) setup.py build $(if $(DESTDIR),--executable "$(DEFAULT_PYTHON3_PATH)") - - build-nping: $(NPINGDIR)/Makefile build-nbase build-nsock build-netutil $(NPINGDIR)/nping.h @DNET_BUILD@ @PCAP_BUILD@ - @cd $(NPINGDIR) && $(MAKE) - - install-ndiff: -- cd $(NDIFFDIR) && $(PYTHON) setup.py install --prefix "$(prefix)" --install-lib="${PYTHON_SITEPACKAGES_DIR}" $(if $(DESTDIR),--root "$(DESTDIR)") -+ cd $(NDIFFDIR) && $(PYTHON3) setup.py install --prefix "$(prefix)" --install-lib="${PYTHON_SITEPACKAGES_DIR}" $(if $(DESTDIR),--root "$(DESTDIR)") - - NSE_FILES = scripts/script.db scripts/*.nse - NSE_LIB_LUA_FILES = nselib/*.lua nselib/*.luadoc -@@ -443,7 +445,7 @@ uninstall-zenmap: - rm -f $(DESTDIR)$(bindir)/xnmap - - uninstall-ndiff: -- cd $(NDIFFDIR) && $(PYTHON) setup.py uninstall -+ cd $(NDIFFDIR) && $(PYTHON3) setup.py uninstall - - uninstall-ncat: - @cd $(NCATDIR) && $(MAKE) uninstall -@@ -458,7 +460,7 @@ check-ncat: - @cd $(NCATDIR) && $(MAKE) check - - check-ndiff: -- @cd $(NDIFFDIR) && $(PYTHON) ndifftest.py -+ @cd $(NDIFFDIR) && $(PYTHON3) ndifftest.py - - check-nsock: - @cd $(NSOCKDIR)/src && $(MAKE) check -diff --git a/ndiff/ndiff.py b/ndiff/ndiff.py -index 043273f..abbd1c5 100755 ---- a/ndiff/ndiff.py -+++ b/ndiff/ndiff.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python3 - - # Ndiff - # -@@ -26,11 +26,11 @@ xml.__path__ = [x for x in xml.__path__ if "_xmlplus" not in x] - import xml.sax - import xml.sax.saxutils - import xml.dom.minidom --from StringIO import StringIO -+from io import StringIO - - verbose = False - --NDIFF_XML_VERSION = u"1" -+NDIFF_XML_VERSION = "1" - - - class OverrideEntityResolver(xml.sax.handler.EntityResolver): -@@ -78,35 +78,35 @@ class Scan(object): - def write_nmaprun_open(self, writer): - attrs = {} - if self.scanner is not None: -- attrs[u"scanner"] = self.scanner -+ attrs["scanner"] = self.scanner - if self.args is not None: -- attrs[u"args"] = self.args -+ attrs["args"] = self.args - if self.start_date is not None: -- attrs[u"start"] = "%d" % time.mktime(self.start_date.timetuple()) -- attrs[u"startstr"] = self.start_date.strftime( -+ attrs["start"] = "%d" % time.mktime(self.start_date.timetuple()) -+ attrs["startstr"] = self.start_date.strftime( - "%a %b %d %H:%M:%S %Y") - if self.version is not None: -- attrs[u"version"] = self.version -- writer.startElement(u"nmaprun", attrs) -+ attrs["version"] = self.version -+ writer.startElement("nmaprun", attrs) - - def write_nmaprun_close(self, writer): -- writer.endElement(u"nmaprun") -+ writer.endElement("nmaprun") - - def nmaprun_to_dom_fragment(self, document): - frag = document.createDocumentFragment() -- elem = document.createElement(u"nmaprun") -+ elem = document.createElement("nmaprun") - if self.scanner is not None: -- elem.setAttribute(u"scanner", self.scanner) -+ elem.setAttribute("scanner", self.scanner) - if self.args is not None: -- elem.setAttribute(u"args", self.args) -+ elem.setAttribute("args", self.args) - if self.start_date is not None: - elem.setAttribute( -- u"start", "%d" % time.mktime(self.start_date.timetuple())) -+ "start", "%d" % time.mktime(self.start_date.timetuple())) - elem.setAttribute( -- u"startstr", -+ "startstr", - self.start_date.strftime("%a %b %d %H:%M:%S %Y")) - if self.version is not None: -- elem.setAttribute(u"version", self.version) -+ elem.setAttribute("version", self.version) - frag.appendChild(elem) - return frag - -@@ -136,17 +136,17 @@ class Host(object): - - def format_name(self): - """Return a human-readable identifier for this host.""" -- address_s = u", ".join(a.s for a in sorted(self.addresses)) -- hostname_s = u", ".join(sorted(self.hostnames)) -+ address_s = ", ".join(a.s for a in sorted(self.addresses)) -+ hostname_s = ", ".join(sorted(self.hostnames)) - if len(hostname_s) > 0: - if len(address_s) > 0: -- return u"%s (%s)" % (hostname_s, address_s) -+ return "%s (%s)" % (hostname_s, address_s) - else: - return hostname_s - elif len(address_s) > 0: - return address_s - else: -- return u"" -+ return "" - - def add_port(self, port): - self.ports[port.spec] = port -@@ -163,46 +163,46 @@ class Host(object): - return state is None or state in self.extraports - - def extraports_string(self): -- list = [(count, state) for (state, count) in self.extraports.items()] -+ locallist = [(count, state) for (state, count) in list(self.extraports.items())] - # Reverse-sort by count. -- list.sort(reverse=True) -- return u", ".join( -- [u"%d %s ports" % (count, state) for (count, state) in list]) -+ locallist.sort(reverse=True) -+ return ", ".join( -+ ["%d %s ports" % (count, state) for (count, state) in locallist]) - - def state_to_dom_fragment(self, document): - frag = document.createDocumentFragment() - if self.state is not None: -- elem = document.createElement(u"status") -- elem.setAttribute(u"state", self.state) -+ elem = document.createElement("status") -+ elem.setAttribute("state", self.state) - frag.appendChild(elem) - return frag - - def hostname_to_dom_fragment(self, document, hostname): - frag = document.createDocumentFragment() -- elem = document.createElement(u"hostname") -- elem.setAttribute(u"name", hostname) -+ elem = document.createElement("hostname") -+ elem.setAttribute("name", hostname) - frag.appendChild(elem) - return frag - - def extraports_to_dom_fragment(self, document): - frag = document.createDocumentFragment() -- for state, count in self.extraports.items(): -- elem = document.createElement(u"extraports") -- elem.setAttribute(u"state", state) -- elem.setAttribute(u"count", unicode(count)) -+ for state, count in list(self.extraports.items()): -+ elem = document.createElement("extraports") -+ elem.setAttribute("state", state) -+ elem.setAttribute("count", str(count)) - frag.appendChild(elem) - return frag - - def os_to_dom_fragment(self, document, os): - frag = document.createDocumentFragment() -- elem = document.createElement(u"osmatch") -- elem.setAttribute(u"name", os) -+ elem = document.createElement("osmatch") -+ elem.setAttribute("name", os) - frag.appendChild(elem) - return frag - - def to_dom_fragment(self, document): - frag = document.createDocumentFragment() -- elem = document.createElement(u"host") -+ elem = document.createElement("host") - - if self.state is not None: - elem.appendChild(self.state_to_dom_fragment(document)) -@@ -211,13 +211,13 @@ class Host(object): - elem.appendChild(addr.to_dom_fragment(document)) - - if len(self.hostnames) > 0: -- hostnames_elem = document.createElement(u"hostnames") -+ hostnames_elem = document.createElement("hostnames") - for hostname in self.hostnames: - hostnames_elem.appendChild( - self.hostname_to_dom_fragment(document, hostname)) - elem.appendChild(hostnames_elem) - -- ports_elem = document.createElement(u"ports") -+ ports_elem = document.createElement("ports") - ports_elem.appendChild(self.extraports_to_dom_fragment(document)) - for port in sorted(self.ports.values()): - if not self.is_extraports(port.state): -@@ -226,13 +226,13 @@ class Host(object): - elem.appendChild(ports_elem) - - if len(self.os) > 0: -- os_elem = document.createElement(u"os") -+ os_elem = document.createElement("os") - for os in self.os: - os_elem.appendChild(self.os_to_dom_fragment(document, os)) - elem.appendChild(os_elem) - - if len(self.script_results) > 0: -- hostscript_elem = document.createElement(u"hostscript") -+ hostscript_elem = document.createElement("hostscript") - for sr in self.script_results: - hostscript_elem.appendChild(sr.to_dom_fragment(document)) - elem.appendChild(hostscript_elem) -@@ -246,7 +246,7 @@ class Address(object): - self.s = s - - def __eq__(self, other): -- return self.__cmp__(other) == 0 -+ return self.sort_key() == other.sort_key() - - def __ne__(self, other): - return not self.__eq__(other) -@@ -254,8 +254,8 @@ class Address(object): - def __hash__(self): - return hash(self.sort_key()) - -- def __cmp__(self, other): -- return cmp(self.sort_key(), other.sort_key()) -+ def __lt__(self, other): -+ return self.sort_key() < other.sort_key() - - def __str__(self): - return str(self.s) -@@ -264,21 +264,21 @@ class Address(object): - return self.s - - def new(type, s): -- if type == u"ipv4": -+ if type == "ipv4": - return IPv4Address(s) -- elif type == u"ipv6": -+ elif type == "ipv6": - return IPv6Address(s) -- elif type == u"mac": -+ elif type == "mac": - return MACAddress(s) - else: -- raise ValueError(u"Unknown address type %s." % type) -+ raise ValueError("Unknown address type %s." % type) - new = staticmethod(new) - - def to_dom_fragment(self, document): - frag = document.createDocumentFragment() -- elem = document.createElement(u"address") -- elem.setAttribute(u"addr", self.s) -- elem.setAttribute(u"addrtype", self.type) -+ elem = document.createElement("address") -+ elem.setAttribute("addr", self.s) -+ elem.setAttribute("addrtype", self.type) - frag.appendChild(elem) - return frag - -@@ -287,21 +287,21 @@ class Address(object): - - - class IPv4Address(Address): -- type = property(lambda self: u"ipv4") -+ type = property(lambda self: "ipv4") - - def sort_key(self): - return (0, self.s) - - - class IPv6Address(Address): -- type = property(lambda self: u"ipv6") -+ type = property(lambda self: "ipv6") - - def sort_key(self): - return (1, self.s) - - - class MACAddress(Address): -- type = property(lambda self: u"mac") -+ type = property(lambda self: "mac") - - def sort_key(self): - return (2, self.s) -@@ -320,28 +320,25 @@ class Port(object): - - def state_string(self): - if self.state is None: -- return u"unknown" -+ return "unknown" - else: -- return unicode(self.state) -+ return str(self.state) - - def spec_string(self): -- return u"%d/%s" % self.spec -+ return "%d/%s" % self.spec - -- def __cmp__(self, other): -- d = cmp(self.spec, other.spec) -- if d != 0: -- return d -- return cmp((self.spec, self.service, self.script_results), -- (other.spec, other.service, other.script_results)) -+ def __lt__(self, other): -+ return (self.spec, self.service, self.script_results) < ( -+ other.spec, other.service, other.script_results) - - def to_dom_fragment(self, document): - frag = document.createDocumentFragment() -- elem = document.createElement(u"port") -- elem.setAttribute(u"portid", unicode(self.spec[0])) -- elem.setAttribute(u"protocol", self.spec[1]) -+ elem = document.createElement("port") -+ elem.setAttribute("portid", str(self.spec[0])) -+ elem.setAttribute("protocol", self.spec[1]) - if self.state is not None: -- state_elem = document.createElement(u"state") -- state_elem.setAttribute(u"state", self.state) -+ state_elem = document.createElement("state") -+ state_elem.setAttribute("state", self.state) - elem.appendChild(state_elem) - elem.appendChild(self.service.to_dom_fragment(document)) - for sr in self.script_results: -@@ -385,7 +382,7 @@ class Service(object): - if len(parts) == 0: - return None - else: -- return u"/".join(parts) -+ return "/".join(parts) - - def version_string(self): - """Get a string like in the VERSION column of Nmap output.""" -@@ -395,17 +392,17 @@ class Service(object): - if self.version is not None: - parts.append(self.version) - if self.extrainfo is not None: -- parts.append(u"(%s)" % self.extrainfo) -+ parts.append("(%s)" % self.extrainfo) - - if len(parts) == 0: - return None - else: -- return u" ".join(parts) -+ return " ".join(parts) - - def to_dom_fragment(self, document): - frag = document.createDocumentFragment() -- elem = document.createElement(u"service") -- for attr in (u"name", u"product", u"version", u"extrainfo", u"tunnel"): -+ elem = document.createElement("service") -+ for attr in ("name", "product", "version", "extrainfo", "tunnel"): - v = getattr(self, attr) - if v is None: - continue -@@ -435,53 +432,53 @@ class ScriptResult(object): - result = [] - lines = self.output.splitlines() - if len(lines) > 0: -- lines[0] = self.id + u": " + lines[0] -+ lines[0] = self.id + ": " + lines[0] - for line in lines[:-1]: -- result.append(u"| " + line) -+ result.append("| " + line) - if len(lines) > 0: -- result.append(u"|_ " + lines[-1]) -+ result.append("|_ " + lines[-1]) - return result - - def to_dom_fragment(self, document): - frag = document.createDocumentFragment() -- elem = document.createElement(u"script") -- elem.setAttribute(u"id", self.id) -- elem.setAttribute(u"output", self.output) -+ elem = document.createElement("script") -+ elem.setAttribute("id", self.id) -+ elem.setAttribute("output", self.output) - frag.appendChild(elem) - return frag - - - def format_banner(scan): - """Format a startup banner more or less like Nmap does.""" -- scanner = u"Nmap" -- if scan.scanner is not None and scan.scanner != u"nmap": -+ scanner = "Nmap" -+ if scan.scanner is not None and scan.scanner != "nmap": - scanner = scan.scanner - parts = [scanner] - if scan.version is not None: - parts.append(scan.version) -- parts.append(u"scan") -+ parts.append("scan") - if scan.start_date is not None: -- parts.append(u"initiated %s" % scan.start_date.strftime( -+ parts.append("initiated %s" % scan.start_date.strftime( - "%a %b %d %H:%M:%S %Y")) - if scan.args is not None: -- parts.append(u"as: %s" % scan.args) -- return u" ".join(parts) -+ parts.append("as: %s" % scan.args) -+ return " ".join(parts) - - - def print_script_result_diffs_text(title, script_results_a, script_results_b, - script_result_diffs, f=sys.stdout): -- table = Table(u"*") -+ table = Table("*") - for sr_diff in script_result_diffs: - sr_diff.append_to_port_table(table) - if len(table) > 0: -- print >> f -+ print(file=f) - if len(script_results_b) == 0: -- print >> f, u"-%s:" % title -+ print("-%s:" % title, file=f) - elif len(script_results_a) == 0: -- print >> f, u"+%s:" % title -+ print("+%s:" % title, file=f) - else: -- print >> f, u" %s:" % title -- print >> f, table -+ print(" %s:" % title, file=f) -+ print(table, file=f) - - - def script_result_diffs_to_dom_fragment(elem, script_results_a, -@@ -489,13 +486,13 @@ def script_result_diffs_to_dom_fragment(elem, script_results_a, - if len(script_results_a) == 0 and len(script_results_b) == 0: - return document.createDocumentFragment() - elif len(script_results_b) == 0: -- a_elem = document.createElement(u"a") -+ a_elem = document.createElement("a") - for sr in script_results_a: - elem.appendChild(sr.to_dom_fragment(document)) - a_elem.appendChild(elem) - return a_elem - elif len(script_results_a) == 0: -- b_elem = document.createElement(u"b") -+ b_elem = document.createElement("b") - for sr in script_results_b: - elem.appendChild(sr.to_dom_fragment(document)) - b_elem.appendChild(elem) -@@ -581,10 +578,10 @@ class ScanDiffText(ScanDiff): - banner_a = format_banner(self.scan_a) - banner_b = format_banner(self.scan_b) - if banner_a != banner_b: -- print >> self.f, u"-%s" % banner_a -- print >> self.f, u"+%s" % banner_b -+ print("-%s" % banner_a, file=self.f) -+ print("+%s" % banner_b, file=self.f) - elif verbose: -- print >> self.f, u" %s" % banner_a -+ print(" %s" % banner_a, file=self.f) - - def output_pre_scripts(self, pre_script_result_diffs): - print_script_result_diffs_text("Pre-scan script results", -@@ -597,7 +594,7 @@ class ScanDiffText(ScanDiff): - post_script_result_diffs, self.f) - - def output_host_diff(self, h_diff): -- print >> self.f -+ print(file=self.f) - h_diff.print_text(self.f) - - def output_ending(self): -@@ -622,8 +619,8 @@ class ScanDiffXML(ScanDiff): - - def output_beginning(self): - self.writer.startDocument() -- self.writer.startElement(u"nmapdiff", {u"version": NDIFF_XML_VERSION}) -- self.writer.startElement(u"scandiff", {}) -+ self.writer.startElement("nmapdiff", {"version": NDIFF_XML_VERSION}) -+ self.writer.startElement("scandiff", {}) - - if self.nmaprun_differs(): - self.writer.frag_a( -@@ -636,7 +633,7 @@ class ScanDiffXML(ScanDiff): - - def output_pre_scripts(self, pre_script_result_diffs): - if len(pre_script_result_diffs) > 0 or verbose: -- prescript_elem = self.document.createElement(u"prescript") -+ prescript_elem = self.document.createElement("prescript") - frag = script_result_diffs_to_dom_fragment( - prescript_elem, self.scan_a.pre_script_results, - self.scan_b.pre_script_results, pre_script_result_diffs, -@@ -646,7 +643,7 @@ class ScanDiffXML(ScanDiff): - - def output_post_scripts(self, post_script_result_diffs): - if len(post_script_result_diffs) > 0 or verbose: -- postscript_elem = self.document.createElement(u"postscript") -+ postscript_elem = self.document.createElement("postscript") - frag = script_result_diffs_to_dom_fragment( - postscript_elem, self.scan_a.post_script_results, - self.scan_b.post_script_results, post_script_result_diffs, -@@ -660,8 +657,8 @@ class ScanDiffXML(ScanDiff): - frag.unlink() - - def output_ending(self): -- self.writer.endElement(u"scandiff") -- self.writer.endElement(u"nmapdiff") -+ self.writer.endElement("scandiff") -+ self.writer.endElement("nmapdiff") - self.writer.endDocument() - - -@@ -719,9 +716,9 @@ class HostDiff(object): - self.cost += os_cost - - extraports_a = tuple((count, state) -- for (state, count) in self.host_a.extraports.items()) -+ for (state, count) in list(self.host_a.extraports.items())) - extraports_b = tuple((count, state) -- for (state, count) in self.host_b.extraports.items()) -+ for (state, count) in list(self.host_b.extraports.items())) - if extraports_a != extraports_b: - self.extraports_changed = True - self.cost += 1 -@@ -747,69 +744,69 @@ class HostDiff(object): - # Names and addresses. - if self.id_changed: - if host_a.state is not None: -- print >> f, u"-%s:" % host_a.format_name() -+ print("-%s:" % host_a.format_name(), file=f) - if self.host_b.state is not None: -- print >> f, u"+%s:" % host_b.format_name() -+ print("+%s:" % host_b.format_name(), file=f) - else: -- print >> f, u" %s:" % host_a.format_name() -+ print(" %s:" % host_a.format_name(), file=f) - - # State. - if self.state_changed: - if host_a.state is not None: -- print >> f, u"-Host is %s." % host_a.state -+ print("-Host is %s." % host_a.state, file=f) - if host_b.state is not None: -- print >> f, u"+Host is %s." % host_b.state -+ print("+Host is %s." % host_b.state, file=f) - elif verbose: -- print >> f, u" Host is %s." % host_b.state -+ print(" Host is %s." % host_b.state, file=f) - - # Extraports. - if self.extraports_changed: - if len(host_a.extraports) > 0: -- print >> f, u"-Not shown: %s" % host_a.extraports_string() -+ print("-Not shown: %s" % host_a.extraports_string(), file=f) - if len(host_b.extraports) > 0: -- print >> f, u"+Not shown: %s" % host_b.extraports_string() -+ print("+Not shown: %s" % host_b.extraports_string(), file=f) - elif verbose: - if len(host_a.extraports) > 0: -- print >> f, u" Not shown: %s" % host_a.extraports_string() -+ print(" Not shown: %s" % host_a.extraports_string(), file=f) - - # Port table. -- port_table = Table(u"** * * *") -+ port_table = Table("** * * *") - if host_a.state is None: -- mark = u"+" -+ mark = "+" - elif host_b.state is None: -- mark = u"-" -+ mark = "-" - else: -- mark = u" " -- port_table.append((mark, u"PORT", u"STATE", u"SERVICE", u"VERSION")) -+ mark = " " -+ port_table.append((mark, "PORT", "STATE", "SERVICE", "VERSION")) - - for port in self.ports: - port_diff = self.port_diffs[port] - port_diff.append_to_port_table(port_table, host_a, host_b) - - if len(port_table) > 1: -- print >> f, port_table -+ print(port_table, file=f) - - # OS changes. - if self.os_changed or verbose: - if len(host_a.os) > 0: - if len(host_b.os) > 0: -- print >> f, u" OS details:" -+ print(" OS details:", file=f) - else: -- print >> f, u"-OS details:" -+ print("-OS details:", file=f) - elif len(host_b.os) > 0: -- print >> f, u"+OS details:" -+ print("+OS details:", file=f) - # os_diffs is a list of 5-tuples returned by - # difflib.SequenceMatcher. - for op, i1, i2, j1, j2 in self.os_diffs: - if op == "replace" or op == "delete": - for i in range(i1, i2): -- print >> f, "- %s" % host_a.os[i] -+ print("- %s" % host_a.os[i], file=f) - if op == "replace" or op == "insert": - for i in range(j1, j2): -- print >> f, "+ %s" % host_b.os[i] -+ print("+ %s" % host_b.os[i], file=f) - if op == "equal": - for i in range(i1, i2): -- print >> f, " %s" % host_a.os[i] -+ print(" %s" % host_a.os[i], file=f) - - print_script_result_diffs_text("Host script results", - host_a.script_results, host_b.script_results, -@@ -820,32 +817,32 @@ class HostDiff(object): - host_b = self.host_b - - frag = document.createDocumentFragment() -- hostdiff_elem = document.createElement(u"hostdiff") -+ hostdiff_elem = document.createElement("hostdiff") - frag.appendChild(hostdiff_elem) - - if host_a.state is None or host_b.state is None: - # The host is missing in one scan. Output the whole thing. - if host_a.state is not None: -- a_elem = document.createElement(u"a") -+ a_elem = document.createElement("a") - a_elem.appendChild(host_a.to_dom_fragment(document)) - hostdiff_elem.appendChild(a_elem) - elif host_b.state is not None: -- b_elem = document.createElement(u"b") -+ b_elem = document.createElement("b") - b_elem.appendChild(host_b.to_dom_fragment(document)) - hostdiff_elem.appendChild(b_elem) - return frag - -- host_elem = document.createElement(u"host") -+ host_elem = document.createElement("host") - - # State. - if host_a.state == host_b.state: - if verbose: - host_elem.appendChild(host_a.state_to_dom_fragment(document)) - else: -- a_elem = document.createElement(u"a") -+ a_elem = document.createElement("a") - a_elem.appendChild(host_a.state_to_dom_fragment(document)) - host_elem.appendChild(a_elem) -- b_elem = document.createElement(u"b") -+ b_elem = document.createElement("b") - b_elem.appendChild(host_b.state_to_dom_fragment(document)) - host_elem.appendChild(b_elem) - -@@ -854,31 +851,31 @@ class HostDiff(object): - addrset_b = set(host_b.addresses) - for addr in sorted(addrset_a.intersection(addrset_b)): - host_elem.appendChild(addr.to_dom_fragment(document)) -- a_elem = document.createElement(u"a") -+ a_elem = document.createElement("a") - for addr in sorted(addrset_a - addrset_b): - a_elem.appendChild(addr.to_dom_fragment(document)) - if a_elem.hasChildNodes(): - host_elem.appendChild(a_elem) -- b_elem = document.createElement(u"b") -+ b_elem = document.createElement("b") - for addr in sorted(addrset_b - addrset_a): - b_elem.appendChild(addr.to_dom_fragment(document)) - if b_elem.hasChildNodes(): - host_elem.appendChild(b_elem) - - # Host names. -- hostnames_elem = document.createElement(u"hostnames") -+ hostnames_elem = document.createElement("hostnames") - hostnameset_a = set(host_a.hostnames) - hostnameset_b = set(host_b.hostnames) - for hostname in sorted(hostnameset_a.intersection(hostnameset_b)): - hostnames_elem.appendChild( - host_a.hostname_to_dom_fragment(document, hostname)) -- a_elem = document.createElement(u"a") -+ a_elem = document.createElement("a") - for hostname in sorted(hostnameset_a - hostnameset_b): - a_elem.appendChild( - host_a.hostname_to_dom_fragment(document, hostname)) - if a_elem.hasChildNodes(): - hostnames_elem.appendChild(a_elem) -- b_elem = document.createElement(u"b") -+ b_elem = document.createElement("b") - for hostname in sorted(hostnameset_b - hostnameset_a): - b_elem.appendChild( - host_b.hostname_to_dom_fragment(document, hostname)) -@@ -887,15 +884,15 @@ class HostDiff(object): - if hostnames_elem.hasChildNodes(): - host_elem.appendChild(hostnames_elem) - -- ports_elem = document.createElement(u"ports") -+ ports_elem = document.createElement("ports") - # Extraports. - if host_a.extraports == host_b.extraports: - ports_elem.appendChild(host_a.extraports_to_dom_fragment(document)) - else: -- a_elem = document.createElement(u"a") -+ a_elem = document.createElement("a") - a_elem.appendChild(host_a.extraports_to_dom_fragment(document)) - ports_elem.appendChild(a_elem) -- b_elem = document.createElement(u"b") -+ b_elem = document.createElement("b") - b_elem.appendChild(host_b.extraports_to_dom_fragment(document)) - ports_elem.appendChild(b_elem) - # Port list. -@@ -911,18 +908,18 @@ class HostDiff(object): - - # OS changes. - if self.os_changed or verbose: -- os_elem = document.createElement(u"os") -+ os_elem = document.createElement("os") - # os_diffs is a list of 5-tuples returned by - # difflib.SequenceMatcher. - for op, i1, i2, j1, j2 in self.os_diffs: - if op == "replace" or op == "delete": -- a_elem = document.createElement(u"a") -+ a_elem = document.createElement("a") - for i in range(i1, i2): - a_elem.appendChild(host_a.os_to_dom_fragment( - document, host_a.os[i])) - os_elem.appendChild(a_elem) - if op == "replace" or op == "insert": -- b_elem = document.createElement(u"b") -+ b_elem = document.createElement("b") - for i in range(j1, j2): - b_elem.appendChild(host_b.os_to_dom_fragment( - document, host_b.os[i])) -@@ -936,7 +933,7 @@ class HostDiff(object): - - # Host script changes. - if len(self.script_result_diffs) > 0 or verbose: -- hostscript_elem = document.createElement(u"hostscript") -+ hostscript_elem = document.createElement("hostscript") - host_elem.appendChild(script_result_diffs_to_dom_fragment( - hostscript_elem, host_a.script_results, - host_b.script_results, self.script_result_diffs, -@@ -989,38 +986,38 @@ class PortDiff(object): - self.port_b.service.version_string()] - if a_columns == b_columns: - if verbose or self.script_result_diffs > 0: -- table.append([u" "] + a_columns) -+ table.append([" "] + a_columns) - else: - if not host_a.is_extraports(self.port_a.state): -- table.append([u"-"] + a_columns) -+ table.append(["-"] + a_columns) - if not host_b.is_extraports(self.port_b.state): -- table.append([u"+"] + b_columns) -+ table.append(["+"] + b_columns) - - for sr_diff in self.script_result_diffs: - sr_diff.append_to_port_table(table) - - def to_dom_fragment(self, document): - frag = document.createDocumentFragment() -- portdiff_elem = document.createElement(u"portdiff") -+ portdiff_elem = document.createElement("portdiff") - frag.appendChild(portdiff_elem) - if (self.port_a.spec == self.port_b.spec and - self.port_a.state == self.port_b.state): -- port_elem = document.createElement(u"port") -- port_elem.setAttribute(u"portid", unicode(self.port_a.spec[0])) -- port_elem.setAttribute(u"protocol", self.port_a.spec[1]) -+ port_elem = document.createElement("port") -+ port_elem.setAttribute("portid", str(self.port_a.spec[0])) -+ port_elem.setAttribute("protocol", self.port_a.spec[1]) - if self.port_a.state is not None: -- state_elem = document.createElement(u"state") -- state_elem.setAttribute(u"state", self.port_a.state) -+ state_elem = document.createElement("state") -+ state_elem.setAttribute("state", self.port_a.state) - port_elem.appendChild(state_elem) - if self.port_a.service == self.port_b.service: - port_elem.appendChild( - self.port_a.service.to_dom_fragment(document)) - else: -- a_elem = document.createElement(u"a") -+ a_elem = document.createElement("a") - a_elem.appendChild( - self.port_a.service.to_dom_fragment(document)) - port_elem.appendChild(a_elem) -- b_elem = document.createElement(u"b") -+ b_elem = document.createElement("b") - b_elem.appendChild( - self.port_b.service.to_dom_fragment(document)) - port_elem.appendChild(b_elem) -@@ -1028,10 +1025,10 @@ class PortDiff(object): - port_elem.appendChild(sr_diff.to_dom_fragment(document)) - portdiff_elem.appendChild(port_elem) - else: -- a_elem = document.createElement(u"a") -+ a_elem = document.createElement("a") - a_elem.appendChild(self.port_a.to_dom_fragment(document)) - portdiff_elem.appendChild(a_elem) -- b_elem = document.createElement(u"b") -+ b_elem = document.createElement("b") - b_elem.appendChild(self.port_b.to_dom_fragment(document)) - portdiff_elem.appendChild(b_elem) - -@@ -1086,13 +1083,13 @@ class ScriptResultDiff(object): - for op, i1, i2, j1, j2 in diffs.get_opcodes(): - if op == "replace" or op == "delete": - for k in range(i1, i2): -- table.append_raw(u"-" + a_lines[k]) -+ table.append_raw("-" + a_lines[k]) - if op == "replace" or op == "insert": - for k in range(j1, j2): -- table.append_raw(u"+" + b_lines[k]) -+ table.append_raw("+" + b_lines[k]) - if op == "equal": - for k in range(i1, i2): -- table.append_raw(u" " + a_lines[k]) -+ table.append_raw(" " + a_lines[k]) - - def to_dom_fragment(self, document): - frag = document.createDocumentFragment() -@@ -1102,11 +1099,11 @@ class ScriptResultDiff(object): - frag.appendChild(self.sr_a.to_dom_fragment(document)) - else: - if self.sr_a is not None: -- a_elem = document.createElement(u"a") -+ a_elem = document.createElement("a") - a_elem.appendChild(self.sr_a.to_dom_fragment(document)) - frag.appendChild(a_elem) - if self.sr_b is not None: -- b_elem = document.createElement(u"b") -+ b_elem = document.createElement("b") - b_elem.appendChild(self.sr_b.to_dom_fragment(document)) - frag.appendChild(b_elem) - return frag -@@ -1120,7 +1117,7 @@ class Table(object): - copied to the output.""" - self.widths = [] - self.rows = [] -- self.prefix = u"" -+ self.prefix = "" - self.padding = [] - j = 0 - while j < len(template) and template[j] != "*": -@@ -1145,7 +1142,7 @@ class Table(object): - - for i in range(len(row)): - if row[i] is None: -- s = u"" -+ s = "" - else: - s = str(row[i]) - if i == len(self.widths): -@@ -1167,7 +1164,7 @@ class Table(object): - for row in self.rows: - parts = [self.prefix] - i = 0 -- if isinstance(row, basestring): -+ if isinstance(row, str): - # A raw string. - lines.append(row) - else: -@@ -1176,13 +1173,13 @@ class Table(object): - if i < len(self.padding): - parts.append(self.padding[i]) - i += 1 -- lines.append(u"".join(parts).rstrip()) -- return u"\n".join(lines) -+ lines.append("".join(parts).rstrip()) -+ return "\n".join(lines) - - - def warn(str): - """Print a warning to stderr.""" -- print >> sys.stderr, str -+ print(str, file=sys.stderr) - - - class NmapContentHandler(xml.sax.handler.ContentHandler): -@@ -1200,22 +1197,22 @@ class NmapContentHandler(xml.sax.handler.ContentHandler): - self.current_port = None - - self._start_elem_handlers = { -- u"nmaprun": self._start_nmaprun, -- u"host": self._start_host, -- u"status": self._start_status, -- u"address": self._start_address, -- u"hostname": self._start_hostname, -- u"extraports": self._start_extraports, -- u"port": self._start_port, -- u"state": self._start_state, -- u"service": self._start_service, -- u"script": self._start_script, -- u"osmatch": self._start_osmatch, -- u"finished": self._start_finished, -+ "nmaprun": self._start_nmaprun, -+ "host": self._start_host, -+ "status": self._start_status, -+ "address": self._start_address, -+ "hostname": self._start_hostname, -+ "extraports": self._start_extraports, -+ "port": self._start_port, -+ "state": self._start_state, -+ "service": self._start_service, -+ "script": self._start_script, -+ "osmatch": self._start_osmatch, -+ "finished": self._start_finished, - } - self._end_elem_handlers = { -- u'host': self._end_host, -- u'port': self._end_port, -+ 'host': self._end_host, -+ 'port': self._end_port, - } - - def parent_element(self): -@@ -1245,68 +1242,68 @@ class NmapContentHandler(xml.sax.handler.ContentHandler): - def _start_nmaprun(self, name, attrs): - assert self.parent_element() is None - if "start" in attrs: -- start_timestamp = int(attrs.get(u"start")) -+ start_timestamp = int(attrs.get("start")) - self.scan.start_date = datetime.datetime.fromtimestamp( - start_timestamp) -- self.scan.scanner = attrs.get(u"scanner") -- self.scan.args = attrs.get(u"args") -- self.scan.version = attrs.get(u"version") -+ self.scan.scanner = attrs.get("scanner") -+ self.scan.args = attrs.get("args") -+ self.scan.version = attrs.get("version") - - def _start_host(self, name, attrs): -- assert self.parent_element() == u"nmaprun" -+ assert self.parent_element() == "nmaprun" - self.current_host = Host() - self.scan.hosts.append(self.current_host) - - def _start_status(self, name, attrs): -- assert self.parent_element() == u"host" -+ assert self.parent_element() == "host" - assert self.current_host is not None -- state = attrs.get(u"state") -+ state = attrs.get("state") - if state is None: - warn(u'%s element of host %s is missing the "state" attribute; ' -- 'assuming \unknown\.' % ( -+ r'assuming \unknown\.' % ( - name, self.current_host.format_name())) - return - self.current_host.state = state - - def _start_address(self, name, attrs): -- assert self.parent_element() == u"host" -+ assert self.parent_element() == "host" - assert self.current_host is not None -- addr = attrs.get(u"addr") -+ addr = attrs.get("addr") - if addr is None: -- warn(u'%s element of host %s is missing the "addr" ' -+ warn('%s element of host %s is missing the "addr" ' - 'attribute; skipping.' % ( - name, self.current_host.format_name())) - return -- addrtype = attrs.get(u"addrtype", u"ipv4") -+ addrtype = attrs.get("addrtype", "ipv4") - self.current_host.add_address(Address.new(addrtype, addr)) - - def _start_hostname(self, name, attrs): -- assert self.parent_element() == u"hostnames" -+ assert self.parent_element() == "hostnames" - assert self.current_host is not None -- hostname = attrs.get(u"name") -+ hostname = attrs.get("name") - if hostname is None: -- warn(u'%s element of host %s is missing the "name" ' -+ warn('%s element of host %s is missing the "name" ' - 'attribute; skipping.' % ( - name, self.current_host.format_name())) - return - self.current_host.add_hostname(hostname) - - def _start_extraports(self, name, attrs): -- assert self.parent_element() == u"ports" -+ assert self.parent_element() == "ports" - assert self.current_host is not None -- state = attrs.get(u"state") -+ state = attrs.get("state") - if state is None: -- warn(u'%s element of host %s is missing the "state" ' -+ warn('%s element of host %s is missing the "state" ' - 'attribute; assuming "unknown".' % ( - name, self.current_host.format_name())) - state = None - if state in self.current_host.extraports: -- warn(u'Duplicate extraports state "%s" in host %s.' % ( -+ warn('Duplicate extraports state "%s" in host %s.' % ( - state, self.current_host.format_name())) - -- count = attrs.get(u"count") -+ count = attrs.get("count") - if count is None: -- warn(u'%s element of host %s is missing the "count" ' -+ warn('%s element of host %s is missing the "count" ' - 'attribute; assuming 0.' % ( - name, self.current_host.format_name())) - count = 0 -@@ -1314,99 +1311,99 @@ class NmapContentHandler(xml.sax.handler.ContentHandler): - try: - count = int(count) - except ValueError: -- warn(u"Can't convert extraports count \"%s\" " -+ warn("Can't convert extraports count \"%s\" " - "to an integer in host %s; assuming 0." % ( -- attrs[u"count"], self.current_host.format_name())) -+ attrs["count"], self.current_host.format_name())) - count = 0 - self.current_host.extraports[state] = count - - def _start_port(self, name, attrs): -- assert self.parent_element() == u"ports" -+ assert self.parent_element() == "ports" - assert self.current_host is not None -- portid_str = attrs.get(u"portid") -+ portid_str = attrs.get("portid") - if portid_str is None: -- warn(u'%s element of host %s missing the "portid" ' -+ warn('%s element of host %s missing the "portid" ' - 'attribute; skipping.' % ( - name, self.current_host.format_name())) - return - try: - portid = int(portid_str) - except ValueError: -- warn(u"Can't convert portid \"%s\" to an integer " -+ warn("Can't convert portid \"%s\" to an integer " - "in host %s; skipping port." % ( - portid_str, self.current_host.format_name())) - return -- protocol = attrs.get(u"protocol") -+ protocol = attrs.get("protocol") - if protocol is None: -- warn(u'%s element of host %s missing the "protocol" ' -+ warn('%s element of host %s missing the "protocol" ' - 'attribute; skipping.' % ( - name, self.current_host.format_name())) - return - self.current_port = Port((portid, protocol)) - - def _start_state(self, name, attrs): -- assert self.parent_element() == u"port" -+ assert self.parent_element() == "port" - assert self.current_host is not None - if self.current_port is None: - return - if "state" not in attrs: -- warn(u'%s element of port %s is missing the "state" ' -+ warn('%s element of port %s is missing the "state" ' - 'attribute; assuming "unknown".' % ( - name, self.current_port.spec_string())) - return -- self.current_port.state = attrs[u"state"] -+ self.current_port.state = attrs["state"] - self.current_host.add_port(self.current_port) - - def _start_service(self, name, attrs): -- assert self.parent_element() == u"port" -+ assert self.parent_element() == "port" - assert self.current_host is not None - if self.current_port is None: - return -- self.current_port.service.name = attrs.get(u"name") -- self.current_port.service.product = attrs.get(u"product") -- self.current_port.service.version = attrs.get(u"version") -- self.current_port.service.extrainfo = attrs.get(u"extrainfo") -- self.current_port.service.tunnel = attrs.get(u"tunnel") -+ self.current_port.service.name = attrs.get("name") -+ self.current_port.service.product = attrs.get("product") -+ self.current_port.service.version = attrs.get("version") -+ self.current_port.service.extrainfo = attrs.get("extrainfo") -+ self.current_port.service.tunnel = attrs.get("tunnel") - - def _start_script(self, name, attrs): - result = ScriptResult() -- result.id = attrs.get(u"id") -+ result.id = attrs.get("id") - if result.id is None: -- warn(u'%s element missing the "id" attribute; skipping.' % name) -+ warn('%s element missing the "id" attribute; skipping.' % name) - return - -- result.output = attrs.get(u"output") -+ result.output = attrs.get("output") - if result.output is None: -- warn(u'%s element missing the "output" attribute; skipping.' -+ warn('%s element missing the "output" attribute; skipping.' - % name) - return -- if self.parent_element() == u"prescript": -+ if self.parent_element() == "prescript": - self.scan.pre_script_results.append(result) -- elif self.parent_element() == u"postscript": -+ elif self.parent_element() == "postscript": - self.scan.post_script_results.append(result) -- elif self.parent_element() == u"hostscript": -+ elif self.parent_element() == "hostscript": - self.current_host.script_results.append(result) -- elif self.parent_element() == u"port": -+ elif self.parent_element() == "port": - self.current_port.script_results.append(result) - else: -- warn(u"%s element not inside prescript, postscript, hostscript, " -+ warn("%s element not inside prescript, postscript, hostscript, " - "or port element; ignoring." % name) - return - - def _start_osmatch(self, name, attrs): -- assert self.parent_element() == u"os" -+ assert self.parent_element() == "os" - assert self.current_host is not None - if "name" not in attrs: -- warn(u'%s element of host %s is missing the "name" ' -+ warn('%s element of host %s is missing the "name" ' - 'attribute; skipping.' % ( - name, self.current_host.format_name())) - return -- self.current_host.os.append(attrs[u"name"]) -+ self.current_host.os.append(attrs["name"]) - - def _start_finished(self, name, attrs): -- assert self.parent_element() == u"runstats" -+ assert self.parent_element() == "runstats" - if "time" in attrs: -- end_timestamp = int(attrs.get(u"time")) -+ end_timestamp = int(attrs.get("time")) - self.scan.end_date = datetime.datetime.fromtimestamp(end_timestamp) - - def _end_host(self, name): -@@ -1425,23 +1422,23 @@ class XMLWriter (xml.sax.saxutils.XMLGenerator): - - def frag(self, frag): - for node in frag.childNodes: -- node.writexml(self.f, newl=u"\n") -+ node.writexml(self.f, newl="\n") - - def frag_a(self, frag): -- self.startElement(u"a", {}) -+ self.startElement("a", {}) - for node in frag.childNodes: -- node.writexml(self.f, newl=u"\n") -- self.endElement(u"a") -+ node.writexml(self.f, newl="\n") -+ self.endElement("a") - - def frag_b(self, frag): -- self.startElement(u"b", {}) -+ self.startElement("b", {}) - for node in frag.childNodes: -- node.writexml(self.f, newl=u"\n") -- self.endElement(u"b") -+ node.writexml(self.f, newl="\n") -+ self.endElement("b") - - - def usage(): -- print u"""\ -+ print("""\ - Usage: %s [option] FILE1 FILE2 - Compare two Nmap XML files and display a list of their differences. - Differences include host state changes, port state changes, and changes to -@@ -1451,7 +1448,7 @@ service and OS detection. - -v, --verbose also show hosts and ports that haven't changed. - --text display output in text format (default) - --xml display output in XML format\ --""" % sys.argv[0] -+""" % sys.argv[0]) - - EXIT_EQUAL = 0 - EXIT_DIFFERENT = 1 -@@ -1459,8 +1456,8 @@ EXIT_ERROR = 2 - - - def usage_error(msg): -- print >> sys.stderr, u"%s: %s" % (sys.argv[0], msg) -- print >> sys.stderr, u"Try '%s -h' for help." % sys.argv[0] -+ print("%s: %s" % (sys.argv[0], msg), file=sys.stderr) -+ print("Try '%s -h' for help." % sys.argv[0], file=sys.stderr) - sys.exit(EXIT_ERROR) - - -@@ -1471,7 +1468,7 @@ def main(): - try: - opts, input_filenames = getopt.gnu_getopt( - sys.argv[1:], "hv", ["help", "text", "verbose", "xml"]) -- except getopt.GetoptError, e: -+ except getopt.GetoptError as e: - usage_error(e.msg) - for o, a in opts: - if o == "-h" or o == "--help": -@@ -1481,15 +1478,15 @@ def main(): - verbose = True - elif o == "--text": - if output_format is not None and output_format != "text": -- usage_error(u"contradictory output format options.") -+ usage_error("contradictory output format options.") - output_format = "text" - elif o == "--xml": - if output_format is not None and output_format != "xml": -- usage_error(u"contradictory output format options.") -+ usage_error("contradictory output format options.") - output_format = "xml" - - if len(input_filenames) != 2: -- usage_error(u"need exactly two input filenames.") -+ usage_error("need exactly two input filenames.") - - if output_format is None: - output_format = "text" -@@ -1502,8 +1499,8 @@ def main(): - scan_a.load_from_file(filename_a) - scan_b = Scan() - scan_b.load_from_file(filename_b) -- except IOError, e: -- print >> sys.stderr, u"Can't open file: %s" % str(e) -+ except IOError as e: -+ print("Can't open file: %s" % str(e), file=sys.stderr) - sys.exit(EXIT_ERROR) - - if output_format == "text": -diff --git a/ndiff/ndifftest.py b/ndiff/ndifftest.py -index 2fa4ae0..27fc525 100755 ---- a/ndiff/ndifftest.py -+++ b/ndiff/ndifftest.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python3 - - # Unit tests for Ndiff. - -@@ -22,7 +22,7 @@ for x in dir(ndiff): - sys.dont_write_bytecode = dont_write_bytecode - del dont_write_bytecode - --import StringIO -+import io - - - class scan_test(unittest.TestCase): -@@ -52,7 +52,7 @@ class scan_test(unittest.TestCase): - scan.load_from_file("test-scans/single.xml") - host = scan.hosts[0] - self.assertEqual(len(host.ports), 5) -- self.assertEqual(host.extraports.items(), [("filtered", 95)]) -+ self.assertEqual(list(host.extraports.items()), [("filtered", 95)]) - - def test_extraports_multi(self): - """Test that the correct number of known ports is returned when there -@@ -68,9 +68,9 @@ class scan_test(unittest.TestCase): - """Test that nmaprun information is recorded.""" - scan = Scan() - scan.load_from_file("test-scans/empty.xml") -- self.assertEqual(scan.scanner, u"nmap") -- self.assertEqual(scan.version, u"4.90RC2") -- self.assertEqual(scan.args, u"nmap -oX empty.xml -p 1-100") -+ self.assertEqual(scan.scanner, "nmap") -+ self.assertEqual(scan.version, "4.90RC2") -+ self.assertEqual(scan.args, "nmap -oX empty.xml -p 1-100") - - def test_addresses(self): - """Test that addresses are recorded.""" -@@ -84,7 +84,7 @@ class scan_test(unittest.TestCase): - scan = Scan() - scan.load_from_file("test-scans/simple.xml") - host = scan.hosts[0] -- self.assertEqual(host.hostnames, [u"scanme.nmap.org"]) -+ self.assertEqual(host.hostnames, ["scanme.nmap.org"]) - - def test_os(self): - """Test that OS information is recorded.""" -@@ -99,7 +99,7 @@ class scan_test(unittest.TestCase): - scan.load_from_file("test-scans/complex.xml") - host = scan.hosts[0] - self.assertTrue(len(host.script_results) > 0) -- self.assertTrue(len(host.ports[(22, u"tcp")].script_results) > 0) -+ self.assertTrue(len(host.ports[(22, "tcp")].script_results) > 0) - - # This test is commented out because Nmap XML doesn't store any information - # about down hosts, not even the fact that they are down. Recovering the list -@@ -128,16 +128,16 @@ class host_test(unittest.TestCase): - - def test_format_name(self): - h = Host() -- self.assertTrue(isinstance(h.format_name(), basestring)) -- h.add_address(IPv4Address(u"127.0.0.1")) -- self.assertTrue(u"127.0.0.1" in h.format_name()) -+ self.assertTrue(isinstance(h.format_name(), str)) -+ h.add_address(IPv4Address("127.0.0.1")) -+ self.assertTrue("127.0.0.1" in h.format_name()) - h.add_address(IPv6Address("::1")) -- self.assertTrue(u"127.0.0.1" in h.format_name()) -- self.assertTrue(u"::1" in h.format_name()) -- h.add_hostname(u"localhost") -- self.assertTrue(u"127.0.0.1" in h.format_name()) -- self.assertTrue(u"::1" in h.format_name()) -- self.assertTrue(u"localhost" in h.format_name()) -+ self.assertTrue("127.0.0.1" in h.format_name()) -+ self.assertTrue("::1" in h.format_name()) -+ h.add_hostname("localhost") -+ self.assertTrue("127.0.0.1" in h.format_name()) -+ self.assertTrue("::1" in h.format_name()) -+ self.assertTrue("localhost" in h.format_name()) - - def test_empty_get_port(self): - h = Host() -@@ -197,8 +197,8 @@ class host_test(unittest.TestCase): - h = s.hosts[0] - self.assertEqual(len(h.ports), 5) - self.assertEqual(len(h.extraports), 1) -- self.assertEqual(h.extraports.keys()[0], u"filtered") -- self.assertEqual(h.extraports.values()[0], 95) -+ self.assertEqual(list(h.extraports.keys())[0], "filtered") -+ self.assertEqual(list(h.extraports.values())[0], 95) - self.assertEqual(h.state, "up") - - -@@ -241,13 +241,13 @@ class port_test(unittest.TestCase): - """Test the Port class.""" - def test_spec_string(self): - p = Port((10, "tcp")) -- self.assertEqual(p.spec_string(), u"10/tcp") -+ self.assertEqual(p.spec_string(), "10/tcp") - p = Port((100, "ip")) -- self.assertEqual(p.spec_string(), u"100/ip") -+ self.assertEqual(p.spec_string(), "100/ip") - - def test_state_string(self): - p = Port((10, "tcp")) -- self.assertEqual(p.state_string(), u"unknown") -+ self.assertEqual(p.state_string(), "unknown") - - - class service_test(unittest.TestCase): -@@ -255,47 +255,47 @@ class service_test(unittest.TestCase): - def test_compare(self): - """Test that services with the same contents compare equal.""" - a = Service() -- a.name = u"ftp" -- a.product = u"FooBar FTP" -- a.version = u"1.1.1" -- a.tunnel = u"ssl" -+ a.name = "ftp" -+ a.product = "FooBar FTP" -+ a.version = "1.1.1" -+ a.tunnel = "ssl" - self.assertEqual(a, a) - b = Service() -- b.name = u"ftp" -- b.product = u"FooBar FTP" -- b.version = u"1.1.1" -- b.tunnel = u"ssl" -+ b.name = "ftp" -+ b.product = "FooBar FTP" -+ b.version = "1.1.1" -+ b.tunnel = "ssl" - self.assertEqual(a, b) -- b.name = u"http" -+ b.name = "http" - self.assertNotEqual(a, b) - c = Service() - self.assertNotEqual(a, c) - - def test_tunnel(self): - serv = Service() -- serv.name = u"http" -- serv.tunnel = u"ssl" -- self.assertEqual(serv.name_string(), u"ssl/http") -+ serv.name = "http" -+ serv.tunnel = "ssl" -+ self.assertEqual(serv.name_string(), "ssl/http") - - def test_version_string(self): - serv = Service() -- serv.product = u"FooBar" -+ serv.product = "FooBar" - self.assertTrue(len(serv.version_string()) > 0) - serv = Service() -- serv.version = u"1.2.3" -+ serv.version = "1.2.3" - self.assertTrue(len(serv.version_string()) > 0) - serv = Service() -- serv.extrainfo = u"misconfigured" -+ serv.extrainfo = "misconfigured" - self.assertTrue(len(serv.version_string()) > 0) - serv = Service() -- serv.product = u"FooBar" -- serv.version = u"1.2.3" -+ serv.product = "FooBar" -+ serv.version = "1.2.3" - # Must match Nmap output. - self.assertEqual(serv.version_string(), -- u"%s %s" % (serv.product, serv.version)) -- serv.extrainfo = u"misconfigured" -+ "%s %s" % (serv.product, serv.version)) -+ serv.extrainfo = "misconfigured" - self.assertEqual(serv.version_string(), -- u"%s %s (%s)" % (serv.product, serv.version, serv.extrainfo)) -+ "%s %s (%s)" % (serv.product, serv.version, serv.extrainfo)) - - - class ScanDiffSub(ScanDiff): -@@ -703,7 +703,7 @@ class scan_diff_xml_test(unittest.TestCase): - a.load_from_file("test-scans/empty.xml") - b = Scan() - b.load_from_file("test-scans/simple.xml") -- f = StringIO.StringIO() -+ f = io.StringIO() - self.scan_diff = ScanDiffXML(a, b, f) - self.scan_diff.output() - self.xml = f.getvalue() -@@ -712,8 +712,8 @@ class scan_diff_xml_test(unittest.TestCase): - def test_well_formed(self): - try: - document = xml.dom.minidom.parseString(self.xml) -- except Exception, e: -- self.fail(u"Parsing XML diff output caused the exception: %s" -+ except Exception as e: -+ self.fail("Parsing XML diff output caused the exception: %s" - % str(e)) - - -@@ -739,8 +739,8 @@ def host_apply_diff(host, diff): - host.os = diff.host_b.os[:] - - if diff.extraports_changed: -- for state in host.extraports.keys(): -- for port in host.ports.values(): -+ for state in list(host.extraports.keys()): -+ for port in list(host.ports.values()): - if port.state == state: - del host.ports[port.spec] - host.extraports = diff.host_b.extraports.copy() -diff --git a/ndiff/scripts/ndiff b/ndiff/scripts/ndiff -index 8517c07..4671e73 100755 ---- a/ndiff/scripts/ndiff -+++ b/ndiff/scripts/ndiff -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python3 - - # Ndiff - # -@@ -67,15 +67,15 @@ if INSTALL_LIB is not None and is_secure_dir(INSTALL_LIB): - - try: - import ndiff --except ImportError, e: -- print >> sys.stderr, """\ -+except ImportError as e: -+ print("""\ - Could not import the ndiff module: %s. --I checked in these directories:""" % repr(e.message) -+I checked in these directories:""" % repr(e), file=sys.stderr) - for dir in sys.path: -- print >> sys.stderr, " %s" % dir -- print >> sys.stderr, """\ -+ print(" %s" % dir, file=sys.stderr) -+ print("""\ - If you installed Ndiff in another directory, you may have to add the --modules directory to the PYTHONPATH environment variable.""" -+modules directory to the PYTHONPATH environment variable.""", file=sys.stderr) - sys.exit(1) - - import ndiff -diff --git a/ndiff/setup.py b/ndiff/setup.py -old mode 100644 -new mode 100755 -index b5e254c..c49bcf3 ---- a/ndiff/setup.py -+++ b/ndiff/setup.py -@@ -94,7 +94,7 @@ class checked_install(distutils.command.install.install): - self.saved_prefix = sys.prefix - try: - distutils.command.install.install.finalize_options(self) -- except distutils.errors.DistutilsPlatformError, e: -+ except distutils.errors.DistutilsPlatformError as e: - raise distutils.errors.DistutilsPlatformError(str(e) + """ - Installing your distribution's python-dev package may solve this problem.""") - -@@ -155,13 +155,13 @@ Installing your distribution's python-dev package may solve this problem.""") - #!/usr/bin/env python - import errno, os, os.path, sys - --print 'Uninstall %(name)s' -+print('Uninstall %(name)s') - - answer = raw_input('Are you sure that you want to uninstall ' - '%(name)s (yes/no) ') - - if answer != 'yes' and answer != 'y': -- print 'Not uninstalling.' -+ print('Not uninstalling.') - sys.exit(0) - - """ % {'name': APP_NAME} -@@ -177,8 +177,8 @@ if answer != 'yes' and answer != 'y': - # This should never happen (everything gets installed - # inside the root), but if it does, be safe and don't - # delete anything. -- uninstaller += ("print '%s was not installed inside " -- "the root %s; skipping.'\n" % (output, self.root)) -+ uninstaller += ("print('%s was not installed inside " -+ "the root %s; skipping.')\n" % (output, self.root)) - continue - output = path_strip_prefix(output, self.root) - assert os.path.isabs(output) -@@ -202,24 +202,24 @@ for path in INSTALLED_FILES: - dirs.append(path) - # Delete the files. - for file in files: -- print "Removing '%s'." % file -+ print("Removing '%s'." % file) - try: - os.remove(file) -- except OSError, e: -- print >> sys.stderr, ' Error: %s.' % str(e) -+ except OSError as e: -+ print(' Error: %s.' % str(e), file=sys.stderr) - # Delete the directories. First reverse-sort the normalized paths by - # length so that child directories are deleted before their parents. - dirs = [os.path.normpath(dir) for dir in dirs] - dirs.sort(key = len, reverse = True) - for dir in dirs: - try: -- print "Removing the directory '%s'." % dir -+ print("Removing the directory '%s'." % dir) - os.rmdir(dir) -- except OSError, e: -+ except OSError as e: - if e.errno == errno.ENOTEMPTY: -- print "Directory '%s' not empty; not removing." % dir -+ print("Directory '%s' not empty; not removing." % dir) - else: -- print >> sys.stderr, str(e) -+ print(str(e), file=sys.stderr) - """ - - uninstaller_file = open(uninstaller_filename, 'w') -@@ -227,7 +227,7 @@ for dir in dirs: - uninstaller_file.close() - - # Set exec bit for uninstaller -- mode = ((os.stat(uninstaller_filename)[ST_MODE]) | 0555) & 07777 -+ mode = ((os.stat(uninstaller_filename)[ST_MODE]) | 0o555) & 0o7777 - os.chmod(uninstaller_filename, mode) - - def write_installed_files(self): -@@ -242,7 +242,7 @@ for dir in dirs: - try: - for output in self.get_installed_files(): - assert "\n" not in output -- print >> f, output -+ print(output, file=f) - finally: - f.close() - -@@ -266,7 +266,7 @@ class my_uninstall(distutils.cmd.Command): - # Read the list of installed files. - try: - f = open(INSTALLED_FILES_NAME, "r") -- except IOError, e: -+ except IOError as e: - if e.errno == errno.ENOENT: - log.error("Couldn't open the installation record '%s'. " - "Have you installed yet?" % INSTALLED_FILES_NAME) -@@ -289,7 +289,7 @@ class my_uninstall(distutils.cmd.Command): - try: - if not self.dry_run: - os.remove(file) -- except OSError, e: -+ except OSError as e: - log.error(str(e)) - # Delete the directories. First reverse-sort the normalized paths by - # length so that child directories are deleted before their parents. -@@ -300,7 +300,7 @@ class my_uninstall(distutils.cmd.Command): - log.info("Removing the directory '%s'." % dir) - if not self.dry_run: - os.rmdir(dir) -- except OSError, e: -+ except OSError as e: - if e.errno == errno.ENOTEMPTY: - log.info("Directory '%s' not empty; not removing." % dir) - else: -diff --git a/ndiff/test-scans/anonymize.py b/ndiff/test-scans/anonymize.py -index 9ba612a..fd251fe 100755 ---- a/ndiff/test-scans/anonymize.py -+++ b/ndiff/test-scans/anonymize.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python3 - - # Anonymize an Nmap XML file, replacing host name and IP addresses with random - # anonymous ones. Anonymized names will be consistent between runs of the -@@ -20,20 +20,20 @@ r = random.Random() - - - def hash(s): -- digest = hashlib.sha512(s).hexdigest() -+ digest = hashlib.sha512(s.encode()).hexdigest() - return int(digest, 16) - - - def anonymize_mac_address(addr): - r.seed(hash(addr)) - nums = (0, 0, 0) + tuple(r.randrange(256) for i in range(3)) -- return u":".join(u"%02X" % x for x in nums) -+ return ":".join("%02X" % x for x in nums) - - - def anonymize_ipv4_address(addr): - r.seed(hash(addr)) - nums = (10,) + tuple(r.randrange(256) for i in range(3)) -- return u".".join(unicode(x) for x in nums) -+ return ".".join(str(x) for x in nums) - - - def anonymize_ipv6_address(addr): -@@ -41,7 +41,7 @@ def anonymize_ipv6_address(addr): - # RFC 4193. - nums = (0xFD00 + r.randrange(256),) - nums = nums + tuple(r.randrange(65536) for i in range(7)) -- return u":".join("%04X" % x for x in nums) -+ return ":".join("%04X" % x for x in nums) - - # Maps to memoize address and host name conversions. - hostname_map = {} -@@ -54,11 +54,11 @@ def anonymize_hostname(name): - LETTERS = "acbdefghijklmnopqrstuvwxyz" - r.seed(hash(name)) - length = r.randrange(5, 10) -- prefix = u"".join(r.sample(LETTERS, length)) -+ prefix = "".join(r.sample(LETTERS, length)) - num = r.randrange(1000) -- hostname_map[name] = u"%s-%d.example.com" % (prefix, num) -+ hostname_map[name] = "%s-%d.example.com" % (prefix, num) - if VERBOSE: -- print >> sys.stderr, "Replace %s with %s" % (name, hostname_map[name]) -+ print("Replace %s with %s" % (name, hostname_map[name]), file=sys.stderr) - return hostname_map[name] - - mac_re = re.compile(r'\b([0-9a-fA-F]{2}:){5}[0-9a-fA-F]{2}\b') -@@ -78,7 +78,7 @@ def anonymize_address(addr): - else: - assert False - if VERBOSE: -- print >> sys.stderr, "Replace %s with %s" % (addr, address_map[addr]) -+ print("Replace %s with %s" % (addr, address_map[addr]), file=sys.stderr) - return address_map[addr] - - --- -2.24.1 - diff --git a/sources/meta-openembedded/meta-oe/recipes-security/nmap/files/0001-configure.ac-make-ndiff-depend-on-python3.patch b/sources/meta-openembedded/meta-oe/recipes-security/nmap/files/0001-configure.ac-make-ndiff-depend-on-python3.patch deleted file mode 100644 index c43ff9f4..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-security/nmap/files/0001-configure.ac-make-ndiff-depend-on-python3.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 562893e665a6c9e1b60c8b3242bab6fe78318b3b Mon Sep 17 00:00:00 2001 -From: Mingli Yu -Date: Fri, 14 Feb 2020 08:19:54 +0000 -Subject: [PATCH] configure.ac: make ndiff depend on python3 - -Python 2 ceased being maintained on the 1st January 2020. -We've already removed all users of it from oe-core, so -let ndiff depend on python3. - -Upstream-Status: Pending - -Signed-off-by: Mingli Yu ---- - .../nmap/7.80-r0/nmap-7.80/configure.ac | 11 ++++++++--- - 1 file changed, 8 insertions(+), 3 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 9d2fff8..5ffdd55 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -237,16 +237,21 @@ if test $HAVE_PYTHON && test "x${PYTHON_VERSION%%.*}" = "x2"; then - HAVE_PYTHON2=true - fi - -+HAVE_PYTHON3=false -+if test $HAVE_PYTHON && test "x${PYTHON_VERSION%%.*}" = "x3"; then -+ HAVE_PYTHON3=true -+fi -+ - NDIFFDIR=ndiff - - # Do they want Ndiff? - AC_ARG_WITH(ndiff, AC_HELP_STRING([--without-ndiff], [Skip installation of the Ndiff utility]), [], [with_ndiff=check]) --if $HAVE_PYTHON2 ; then : ; -+if $HAVE_PYTHON3 ; then : ; - else - if test "$with_ndiff" = "check" ; then -- AC_MSG_WARN([Not building Ndiff because Python 2.x with x>=4 was not found]) -+ AC_MSG_WARN([Not building Ndiff because Python3 was not found]) - elif test "$with_ndiff" = "yes"; then -- AC_MSG_FAILURE([--with-ndiff requires Python 2.x with x>=4]) -+ AC_MSG_FAILURE([--with-ndiff requires Python3]) - fi - with_ndiff=no - fi --- -2.24.1 - diff --git a/sources/meta-openembedded/meta-oe/recipes-security/nmap/files/0003-Fix-off-by-one-overflow-in-the-IP-protocol-table.patch b/sources/meta-openembedded/meta-oe/recipes-security/nmap/files/0003-Fix-off-by-one-overflow-in-the-IP-protocol-table.patch new file mode 100644 index 00000000..bcb04250 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-security/nmap/files/0003-Fix-off-by-one-overflow-in-the-IP-protocol-table.patch @@ -0,0 +1,165 @@ +From 364d089250d1acf459e9e8580161e7bb06268106 Mon Sep 17 00:00:00 2001 +From: Wang Mingyu +Date: Tue, 15 Oct 2024 02:47:38 +0000 +Subject: [PATCH] Fix off-by-one overflow in the IP protocol table. + +Fixes #2896, closes #2897, closes #2900 + +Upstream-Status: Backport [https://github.com/nmap/nmap/commit/efa0dc36f2ecade6ba8d2ed25dd4d5fbffdea308] + +Signed-off-by: Wang Mingyu +--- + CHANGELOG | 3 +++ + portlist.cc | 8 ++++---- + protocols.cc | 6 +++--- + protocols.h | 2 ++ + scan_lists.cc | 10 +++++----- + 5 files changed, 17 insertions(+), 12 deletions(-) + +diff --git a/CHANGELOG b/CHANGELOG +index f01262c..5b204bd 100644 +--- a/CHANGELOG ++++ b/CHANGELOG +@@ -1,5 +1,8 @@ + #Nmap Changelog ($Id: CHANGELOG 38849 2024-04-18 17:16:42Z dmiller $); -*-text-*- + ++o [GH#2900, GH#2896, GH#2897] Nmap is now able to scan IP protocol 255. ++ [nnposter] ++ + Nmap 7.95 [2024-04-19] + + o [Windows] Upgraded Npcap (our Windows raw packet capturing and +diff --git a/portlist.cc b/portlist.cc +index 8258853..cd08437 100644 +--- a/portlist.cc ++++ b/portlist.cc +@@ -480,7 +480,7 @@ void PortList::setPortState(u16 portno, u8 protocol, int state, int *oldstate) { + state != PORT_CLOSEDFILTERED) + fatal("%s: attempt to add port number %d with illegal state %d\n", __func__, portno, state); + +- assert(protocol!=IPPROTO_IP || portno<256); ++ assert(protocol!=IPPROTO_IP || portno<=MAX_IPPROTONUM); + + bool created = false; + current = createPort(portno, protocol, &created); +@@ -566,7 +566,7 @@ Port *PortList::nextPort(const Port *cur, Port *next, + if (cur) { + proto = INPROTO2PORTLISTPROTO(cur->proto); + assert(port_map[proto]!=NULL); // Hmm, it's not possible to handle port that doesn't have anything in map +- assert(cur->proto!=IPPROTO_IP || cur->portno<256); ++ assert(cur->proto!=IPPROTO_IP || cur->portno<=MAX_IPPROTONUM); + mapped_pno = port_map[proto][cur->portno]; + mapped_pno++; // we're interested in next port after current + } else { // running for the first time +@@ -615,7 +615,7 @@ void PortList::mapPort(u16 *portno, u8 *protocol) const { + mapped_protocol = INPROTO2PORTLISTPROTO(*protocol); + + if (*protocol == IPPROTO_IP) +- assert(*portno < 256); ++ assert(*portno <= MAX_IPPROTONUM); + if(port_map[mapped_protocol]==NULL || port_list[mapped_protocol]==NULL) { + fatal("%s(%i,%i): you're trying to access uninitialized protocol", __func__, *portno, *protocol); + } +@@ -713,7 +713,7 @@ int PortList::port_list_count[PORTLIST_PROTO_MAX]; + * should be sorted. */ + void PortList::initializePortMap(int protocol, u16 *ports, int portcount) { + int i; +- int ports_max = (protocol == IPPROTO_IP) ? 256 : 65536; ++ int ports_max = (protocol == IPPROTO_IP) ? MAX_IPPROTONUM + 1 : 65536; + int proto = INPROTO2PORTLISTPROTO(protocol); + + if (port_map[proto] != NULL || port_map_rev[proto] != NULL) +diff --git a/protocols.cc b/protocols.cc +index 76e42c7..85e55e4 100644 +--- a/protocols.cc ++++ b/protocols.cc +@@ -79,7 +79,7 @@ struct strcmp_comparator { + + // IP Protocol number is 8 bits wide + // protocol_table[IPPROTO_TCP] == {"tcp", 6} +-static struct nprotoent *protocol_table[UCHAR_MAX]; ++static struct nprotoent *protocol_table[MAX_IPPROTONUM + 1]; + // proto_map["tcp"] = {"tcp", 6} + typedef std::map ProtoMap; + static ProtoMap proto_map; +@@ -119,7 +119,7 @@ static int nmap_protocols_init() { + if (*p == '#' || *p == '\0') + continue; + res = sscanf(line, "%127s %hu", protocolname, &protno); +- if (res !=2 || protno > UCHAR_MAX) { ++ if (res !=2 || protno > MAX_IPPROTONUM) { + error("Parse error in protocols file %s line %d", filename, lineno); + continue; + } +@@ -191,7 +191,7 @@ const struct nprotoent *nmap_getprotbynum(int num) { + if (nmap_protocols_init() == -1) + return NULL; + +- assert(num >= 0 && num < UCHAR_MAX); ++ assert(num >= 0 && num <= MAX_IPPROTONUM); + return protocol_table[num]; + } + +diff --git a/protocols.h b/protocols.h +index 8934284..2de0aa4 100644 +--- a/protocols.h ++++ b/protocols.h +@@ -79,6 +79,8 @@ int addprotocolsfromservmask(char *mask, u8 *porttbl); + const struct nprotoent *nmap_getprotbynum(int num); + const struct nprotoent *nmap_getprotbyname(const char *name); + ++#define MAX_IPPROTONUM 255 ++ + #define MAX_IPPROTOSTRLEN 4 + #define IPPROTO2STR(p) \ + ((p)==IPPROTO_TCP ? "tcp" : \ +diff --git a/scan_lists.cc b/scan_lists.cc +index f02e279..ebe1357 100644 +--- a/scan_lists.cc ++++ b/scan_lists.cc +@@ -165,7 +165,7 @@ void getpts(const char *origexpr, struct scan_lists *ports) { + ports->udp_count++; + if (porttbl[i] & SCAN_SCTP_PORT) + ports->sctp_count++; +- if (porttbl[i] & SCAN_PROTOCOLS && i < 256) ++ if (porttbl[i] & SCAN_PROTOCOLS && i <= MAX_IPPROTONUM) + ports->prot_count++; + } + +@@ -192,7 +192,7 @@ void getpts(const char *origexpr, struct scan_lists *ports) { + ports->udp_ports[udpi++] = i; + if (porttbl[i] & SCAN_SCTP_PORT) + ports->sctp_ports[sctpi++] = i; +- if (porttbl[i] & SCAN_PROTOCOLS && i < 256) ++ if (porttbl[i] & SCAN_PROTOCOLS && i <= MAX_IPPROTONUM) + ports->prots[proti++] = i; + } + +@@ -388,7 +388,7 @@ static void getpts_aux(const char *origexpr, int nested, u8 *porttbl, int range_ + } else if (isdigit((int) (unsigned char) *current_range)) { + rangestart = strtol(current_range, &endptr, 10); + if (range_type & SCAN_PROTOCOLS) { +- if (rangestart < 0 || rangestart > 255) ++ if (rangestart < 0 || rangestart > MAX_IPPROTONUM) + fatal("Protocols specified must be between 0 and 255 inclusive"); + } else { + if (rangestart < 0 || rangestart > 65535) +@@ -429,13 +429,13 @@ static void getpts_aux(const char *origexpr, int nested, u8 *porttbl, int range_ + if (!*current_range || *current_range == ',' || *current_range == ']') { + /* Ended with a -, meaning up until the last possible port */ + if (range_type & SCAN_PROTOCOLS) +- rangeend = 255; ++ rangeend = MAX_IPPROTONUM; + else + rangeend = 65535; + } else if (isdigit((int) (unsigned char) *current_range)) { + rangeend = strtol(current_range, &endptr, 10); + if (range_type & SCAN_PROTOCOLS) { +- if (rangeend < 0 || rangeend > 255) ++ if (rangeend < 0 || rangeend > MAX_IPPROTONUM) + fatal("Protocols specified must be between 0 and 255 inclusive"); + } else { + if (rangeend < 0 || rangeend > 65535) +-- +2.34.1 + diff --git a/sources/meta-openembedded/meta-oe/recipes-security/nmap/files/nmap-redefine-the-python-library-dir.patch b/sources/meta-openembedded/meta-oe/recipes-security/nmap/files/nmap-redefine-the-python-library-dir.patch index 356b5071..5669ccdf 100644 --- a/sources/meta-openembedded/meta-oe/recipes-security/nmap/files/nmap-redefine-the-python-library-dir.patch +++ b/sources/meta-openembedded/meta-oe/recipes-security/nmap/files/nmap-redefine-the-python-library-dir.patch @@ -10,20 +10,9 @@ Signed-off-by: Roy Li Makefile.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -diff --git a/Makefile.in b/Makefile.in -index 1bb062c..cced2fb 100644 --- a/Makefile.in +++ b/Makefile.in -@@ -311,7 +311,7 @@ build-zenmap: $(ZENMAPDIR)/setup.py $(ZENMAPDIR)/zenmapCore/Version.py - - install-zenmap: $(ZENMAPDIR)/setup.py - $(INSTALL) -d $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man1 -- cd $(ZENMAPDIR) && $(PYTHON) setup.py --quiet install --prefix "$(prefix)" --force $(if $(DESTDIR),--root "$(DESTDIR)") -+ cd $(ZENMAPDIR) && $(PYTHON) setup.py --quiet install --prefix "$(prefix)" --install-lib="${PYTHON_SITEPACKAGES_DIR}" --force $(if $(DESTDIR),--root "$(DESTDIR)") - $(INSTALL) -c -m 644 docs/zenmap.1 $(DESTDIR)$(mandir)/man1/ - # Create a symlink from nmapfe to zenmap if nmapfe doesn't exist or is - # already a link. -@@ -328,7 +328,7 @@ build-nping: $(NPINGDIR)/Makefile nbase_build nsock_build netutil_build $(NPINGD +@@ -383,7 +383,7 @@ build-nping: $(NPINGDIR)/Makefile build- @cd $(NPINGDIR) && $(MAKE) install-ndiff: @@ -32,6 +21,3 @@ index 1bb062c..cced2fb 100644 NSE_FILES = scripts/script.db scripts/*.nse NSE_LIB_LUA_FILES = nselib/*.lua nselib/*.luadoc --- -1.9.1 - diff --git a/sources/meta-openembedded/meta-oe/recipes-security/nmap/files/nmap-replace-shtool-mkdir-with-coreutils-mkdir-command.patch b/sources/meta-openembedded/meta-oe/recipes-security/nmap/files/nmap-replace-shtool-mkdir-with-coreutils-mkdir-command.patch index cfe043af..a07061d4 100644 --- a/sources/meta-openembedded/meta-oe/recipes-security/nmap/files/nmap-replace-shtool-mkdir-with-coreutils-mkdir-command.patch +++ b/sources/meta-openembedded/meta-oe/recipes-security/nmap/files/nmap-replace-shtool-mkdir-with-coreutils-mkdir-command.patch @@ -12,11 +12,9 @@ Signed-off-by: Roy Li nmap-update/Makefile.in | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) -diff --git a/ncat/Makefile.in b/ncat/Makefile.in -index cfd306d..2166e08 100644 --- a/ncat/Makefile.in +++ b/ncat/Makefile.in -@@ -163,11 +163,11 @@ $(NSOCKDIR)/libnsock.a: $(NSOCKDIR)/Makefile +@@ -162,11 +162,11 @@ $(NSOCKDIR)/libnsock.a: $(NSOCKDIR)/Make install: $(TARGET) @echo Installing Ncat; @@ -30,19 +28,3 @@ index cfd306d..2166e08 100644 $(INSTALL) -c -m 644 $(DATAFILES) $(DESTDIR)$(pkgdatadir)/; \ fi $(INSTALL) -c -m 644 docs/$(TARGET).1 $(DESTDIR)$(mandir)/man1/$(TARGET).1 -diff --git a/nmap-update/Makefile.in b/nmap-update/Makefile.in -index 89ff928..93f48d8 100644 ---- a/nmap-update/Makefile.in -+++ b/nmap-update/Makefile.in -@@ -37,7 +37,7 @@ $(NBASELIB): - cd $(NBASEDIR) && $(MAKE) - - install: nmap-update -- $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man1 -+ mkdir -p -m 755 $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man1 - $(INSTALL) -c -m 755 nmap-update $(DESTDIR)$(bindir) - $(STRIP) -x $(DESTDIR)$(bindir)/nmap-update - $(INSTALL) -c -m 644 ../docs/nmap-update.1 $(DESTDIR)$(mandir)/man1/ --- -1.9.1 - diff --git a/sources/meta-openembedded/meta-oe/recipes-security/nmap/nmap_7.80.bb b/sources/meta-openembedded/meta-oe/recipes-security/nmap/nmap_7.80.bb deleted file mode 100644 index f9fe82a9..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-security/nmap/nmap_7.80.bb +++ /dev/null @@ -1,66 +0,0 @@ -SUMMARY = "network auditing tool" -DESCRIPTION = "Nmap ("Network Mapper") is a free and open source (license) utility for network discovery and security auditing.\nGui support via appending to IMAGE_FEATURES x11-base in local.conf" -SECTION = "security" -LICENSE = "GPL-2.0-only" - -LIC_FILES_CHKSUM = "file://COPYING;beginline=7;endline=12;md5=66938a7e5b4c118eda78271de14874c2" - -SRC_URI = "http://nmap.org/dist/${BP}.tar.bz2 \ - file://nmap-redefine-the-python-library-dir.patch \ - file://nmap-replace-shtool-mkdir-with-coreutils-mkdir-command.patch \ - file://0001-Include-time.h-header-to-pass-clang-compilation.patch \ - file://0002-Fix-building-with-libc.patch \ - file://0001-Make-ndiff-support-python3.patch \ - file://0001-configure.ac-make-ndiff-depend-on-python3.patch \ - " - -SRC_URI[md5sum] = "d37b75b06d1d40f27b76d60db420a1f5" -SRC_URI[sha256sum] = "fcfa5a0e42099e12e4bf7a68ebe6fde05553383a682e816a7ec9256ab4773faa" - -inherit autotools-brokensep pkgconfig python3native - -PACKAGECONFIG ?= "ncat nping pcap" - -PACKAGECONFIG[pcap] = "--with-pcap=linux, --without-pcap, libpcap, libpcap" -PACKAGECONFIG[pcre] = "--with-libpcre=${STAGING_LIBDIR}/.., --with-libpcre=included, libpcre" -PACKAGECONFIG[ssl] = "--with-openssl=${STAGING_LIBDIR}/.., --without-openssl, openssl, openssl" -PACKAGECONFIG[ssh2] = "--with-openssh2=${STAGING_LIBDIR}/.., --without-openssh2, libssh2, libssh2" -PACKAGECONFIG[libz] = "--with-libz=${STAGING_LIBDIR}/.., --without-libz, zlib, zlib" - -#disable/enable packages -PACKAGECONFIG[nping] = ",--without-nping," -PACKAGECONFIG[ncat] = ",--without-ncat," -PACKAGECONFIG[ndiff] = "--with-ndiff=yes,--without-ndiff,python3" -PACKAGECONFIG[update] = ",--without-nmap-update," - -EXTRA_OECONF = "--with-libdnet=included --with-liblinear=included --without-subversion --with-liblua=included" - -# zenmap needs python-pygtk which has been removed -# it also only works with python2 -# disable for now until py3 is supported -EXTRA_OECONF += "--without-zenmap" - -export PYTHON_SITEPACKAGES_DIR - -do_configure() { - autoconf - install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S} - install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S} - oe_runconf -} - -do_install:append() { - for f in ndiff uninstall_ndiff; do - if [ -f ${D}${bindir}/$f ]; then - sed -i 's@^#!.*$@#!/usr/bin/env python3@g' ${D}${bindir}/$f - fi - done -} - -FILES:${PN} += "${PYTHON_SITEPACKAGES_DIR} ${datadir}/ncat" - -RDEPENDS:${PN} += " \ - python3-difflib \ - python3-asyncio \ - python3-xml \ -" diff --git a/sources/meta-openembedded/meta-oe/recipes-security/nmap/nmap_7.95.bb b/sources/meta-openembedded/meta-oe/recipes-security/nmap/nmap_7.95.bb new file mode 100644 index 00000000..a319be4f --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-security/nmap/nmap_7.95.bb @@ -0,0 +1,62 @@ +SUMMARY = "network auditing tool" +DESCRIPTION = "Nmap (Network Mapper) is a free and open source (license) utility for network discovery and security auditing.\nGui support via appending to IMAGE_FEATURES x11-base in local.conf" +SECTION = "security" +LICENSE = "GPL-2.0-only" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=895af8527fe4bcb72f271fd1841fd2f6" + +SRC_URI = "http://nmap.org/dist/${BP}.tar.bz2 \ + file://nmap-redefine-the-python-library-dir.patch \ + file://nmap-replace-shtool-mkdir-with-coreutils-mkdir-command.patch \ + file://0001-Include-time.h-header-to-pass-clang-compilation.patch \ + file://0002-Fix-building-with-libc.patch \ + file://0003-Fix-off-by-one-overflow-in-the-IP-protocol-table.patch \ + " +SRC_URI[sha256sum] = "e14ab530e47b5afd88f1c8a2bac7f89cd8fe6b478e22d255c5b9bddb7a1c5778" +inherit autotools-brokensep pkgconfig python3native + +PACKAGECONFIG ?= "pcre ncat nping pcap" + +PACKAGECONFIG[pcap] = "--with-pcap=linux, --without-pcap, libpcap, libpcap" +PACKAGECONFIG[pcre] = "--with-libpcre=${STAGING_LIBDIR}/.., --with-libpcre=included, libpcre2" +PACKAGECONFIG[ssl] = "--with-openssl=${STAGING_LIBDIR}/.., --without-openssl, openssl, openssl" +PACKAGECONFIG[ssh2] = "--with-openssh2=${STAGING_LIBDIR}/.., --without-openssh2, libssh2, libssh2" +PACKAGECONFIG[libz] = "--with-libz=${STAGING_LIBDIR}/.., --without-libz, zlib, zlib" + +#disable/enable packages +PACKAGECONFIG[nping] = ",--without-nping," +PACKAGECONFIG[ncat] = ",--without-ncat," +PACKAGECONFIG[ndiff] = "--with-ndiff=yes,--without-ndiff,python3" +PACKAGECONFIG[update] = ",--without-nmap-update," + +EXTRA_OECONF = "--with-libdnet=included --with-liblinear=included --without-subversion --with-liblua=included" + +# zenmap needs python-pygtk which has been removed +# it also only works with python2 +# disable for now until py3 is supported +EXTRA_OECONF += "--without-zenmap" + +export PYTHON_SITEPACKAGES_DIR + +do_configure() { + autoconf + install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S} + install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S} + oe_runconf +} + +do_install:append() { + for f in ndiff uninstall_ndiff; do + if [ -f ${D}${bindir}/$f ]; then + sed -i 's@^#!.*$@#!/usr/bin/env python3@g' ${D}${bindir}/$f + fi + done +} + +FILES:${PN} += "${PYTHON_SITEPACKAGES_DIR} ${datadir}/ncat" + +RDEPENDS:${PN} += " \ + python3-difflib \ + python3-asyncio \ + python3-xml \ +" diff --git a/sources/meta-openembedded/meta-oe/recipes-security/softhsm/files/0002-Prevent-accessing-of-global-c-objects-once-they-are-.patch b/sources/meta-openembedded/meta-oe/recipes-security/softhsm/files/0002-Prevent-accessing-of-global-c-objects-once-they-are-.patch new file mode 100644 index 00000000..6e61aeac --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-security/softhsm/files/0002-Prevent-accessing-of-global-c-objects-once-they-are-.patch @@ -0,0 +1,672 @@ +From 41968e7b742ad59046523a7eeb63514237fb63af Mon Sep 17 00:00:00 2001 +From: Neil Horman +Date: Fri, 27 Oct 2023 14:57:37 -0400 +Subject: [PATCH] Prevent accessing of global c++ objects once they are deleted + +Fixes (Maybe) #729. +Reset objects_deleted after reset is called. + +Upstream-Status: Submitted [https://github.com/opendnssec/SoftHSMv2/pull/742] +--- + src/lib/SoftHSM.cpp | 5 ++ + src/lib/main.cpp | 138 ++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 143 insertions(+) + +diff --git a/src/lib/SoftHSM.cpp b/src/lib/SoftHSM.cpp +index 02c0f95..95bf208 100644 +--- a/src/lib/SoftHSM.cpp ++++ b/src/lib/SoftHSM.cpp +@@ -89,6 +89,8 @@ + + // Initialise the one-and-only instance + ++int objects_deleted = 0; ++ + #ifdef HAVE_CXX11 + + std::unique_ptr MutexFactory::instance(nullptr); +@@ -406,6 +408,8 @@ void SoftHSM::reset() + { + if (instance.get()) + instance.reset(); ++ ++ objects_deleted = 0; + } + + // Constructor +@@ -445,6 +449,7 @@ SoftHSM::~SoftHSM() + + isInitialised = false; + ++ objects_deleted = 1; + resetMutexFactoryCallbacks(); + } + +diff --git a/src/lib/main.cpp b/src/lib/main.cpp +index 2dfd0eb..e89f18c 100644 +--- a/src/lib/main.cpp ++++ b/src/lib/main.cpp +@@ -49,6 +49,8 @@ + #define PKCS_API + #endif + ++extern int objects_deleted; ++ + // PKCS #11 function list + static CK_FUNCTION_LIST functionList = + { +@@ -130,6 +132,8 @@ PKCS_API CK_RV C_Initialize(CK_VOID_PTR pInitArgs) + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_Initialize(pInitArgs); + } + catch (...) +@@ -145,6 +149,8 @@ PKCS_API CK_RV C_Finalize(CK_VOID_PTR pReserved) + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_Finalize(pReserved); + } + catch (...) +@@ -160,6 +166,8 @@ PKCS_API CK_RV C_GetInfo(CK_INFO_PTR pInfo) + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_GetInfo(pInfo); + } + catch (...) +@@ -175,6 +183,8 @@ PKCS_API CK_RV C_GetFunctionList(CK_FUNCTION_LIST_PTR_PTR ppFunctionList) + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + if (ppFunctionList == NULL_PTR) return CKR_ARGUMENTS_BAD; + + *ppFunctionList = &functionList; +@@ -194,6 +204,8 @@ PKCS_API CK_RV C_GetSlotList(CK_BBOOL tokenPresent, CK_SLOT_ID_PTR pSlotList, CK + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_GetSlotList(tokenPresent, pSlotList, pulCount); + } + catch (...) +@@ -209,6 +221,8 @@ PKCS_API CK_RV C_GetSlotInfo(CK_SLOT_ID slotID, CK_SLOT_INFO_PTR pInfo) + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_GetSlotInfo(slotID, pInfo); + } + catch (...) +@@ -224,6 +238,8 @@ PKCS_API CK_RV C_GetTokenInfo(CK_SLOT_ID slotID, CK_TOKEN_INFO_PTR pInfo) + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_GetTokenInfo(slotID, pInfo); + } + catch (...) +@@ -239,6 +255,8 @@ PKCS_API CK_RV C_GetMechanismList(CK_SLOT_ID slotID, CK_MECHANISM_TYPE_PTR pMech + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_GetMechanismList(slotID, pMechanismList, pulCount); + } + catch (...) +@@ -254,6 +272,8 @@ PKCS_API CK_RV C_GetMechanismInfo(CK_SLOT_ID slotID, CK_MECHANISM_TYPE type, CK_ + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_GetMechanismInfo(slotID, type, pInfo); + } + catch (...) +@@ -269,6 +289,8 @@ PKCS_API CK_RV C_InitToken(CK_SLOT_ID slotID, CK_UTF8CHAR_PTR pPin, CK_ULONG ulP + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_InitToken(slotID, pPin, ulPinLen, pLabel); + } + catch (...) +@@ -284,6 +306,8 @@ PKCS_API CK_RV C_InitPIN(CK_SESSION_HANDLE hSession, CK_UTF8CHAR_PTR pPin, CK_UL + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_InitPIN(hSession, pPin, ulPinLen); + } + catch (...) +@@ -299,6 +323,8 @@ PKCS_API CK_RV C_SetPIN(CK_SESSION_HANDLE hSession, CK_UTF8CHAR_PTR pOldPin, CK_ + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_SetPIN(hSession, pOldPin, ulOldLen, pNewPin, ulNewLen); + } + catch (...) +@@ -314,6 +340,8 @@ PKCS_API CK_RV C_OpenSession(CK_SLOT_ID slotID, CK_FLAGS flags, CK_VOID_PTR pApp + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_OpenSession(slotID, flags, pApplication, notify, phSession); + } + catch (...) +@@ -329,6 +357,8 @@ PKCS_API CK_RV C_CloseSession(CK_SESSION_HANDLE hSession) + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_CloseSession(hSession); + } + catch (...) +@@ -344,6 +374,8 @@ PKCS_API CK_RV C_CloseAllSessions(CK_SLOT_ID slotID) + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_CloseAllSessions(slotID); + } + catch (...) +@@ -359,6 +391,8 @@ PKCS_API CK_RV C_GetSessionInfo(CK_SESSION_HANDLE hSession, CK_SESSION_INFO_PTR + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_GetSessionInfo(hSession, pInfo); + } + catch (...) +@@ -374,6 +408,8 @@ PKCS_API CK_RV C_GetOperationState(CK_SESSION_HANDLE hSession, CK_BYTE_PTR pOper + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_GetOperationState(hSession, pOperationState, pulOperationStateLen); + } + catch (...) +@@ -389,6 +425,8 @@ PKCS_API CK_RV C_SetOperationState(CK_SESSION_HANDLE hSession, CK_BYTE_PTR pOper + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_SetOperationState(hSession, pOperationState, ulOperationStateLen, hEncryptionKey, hAuthenticationKey); + } + catch (...) +@@ -404,6 +442,8 @@ PKCS_API CK_RV C_Login(CK_SESSION_HANDLE hSession, CK_USER_TYPE userType, CK_UTF + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_Login(hSession, userType, pPin, ulPinLen); + } + catch (...) +@@ -419,6 +459,8 @@ PKCS_API CK_RV C_Logout(CK_SESSION_HANDLE hSession) + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_Logout(hSession); + } + catch (...) +@@ -434,6 +476,8 @@ PKCS_API CK_RV C_CreateObject(CK_SESSION_HANDLE hSession, CK_ATTRIBUTE_PTR pTemp + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_CreateObject(hSession, pTemplate, ulCount, phObject); + } + catch (...) +@@ -449,6 +493,8 @@ PKCS_API CK_RV C_CopyObject(CK_SESSION_HANDLE hSession, CK_OBJECT_HANDLE hObject + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_CopyObject(hSession, hObject, pTemplate, ulCount, phNewObject); + } + catch (...) +@@ -464,6 +510,8 @@ PKCS_API CK_RV C_DestroyObject(CK_SESSION_HANDLE hSession, CK_OBJECT_HANDLE hObj + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_DestroyObject(hSession, hObject); + } + catch (...) +@@ -479,6 +527,8 @@ PKCS_API CK_RV C_GetObjectSize(CK_SESSION_HANDLE hSession, CK_OBJECT_HANDLE hObj + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_GetObjectSize(hSession, hObject, pulSize); + } + catch (...) +@@ -494,6 +544,8 @@ PKCS_API CK_RV C_GetAttributeValue(CK_SESSION_HANDLE hSession, CK_OBJECT_HANDLE + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_GetAttributeValue(hSession, hObject, pTemplate, ulCount); + } + catch (...) +@@ -509,6 +561,8 @@ PKCS_API CK_RV C_SetAttributeValue(CK_SESSION_HANDLE hSession, CK_OBJECT_HANDLE + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_SetAttributeValue(hSession, hObject, pTemplate, ulCount); + } + catch (...) +@@ -524,6 +578,8 @@ PKCS_API CK_RV C_FindObjectsInit(CK_SESSION_HANDLE hSession, CK_ATTRIBUTE_PTR pT + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_FindObjectsInit(hSession, pTemplate, ulCount); + } + catch (...) +@@ -539,6 +595,8 @@ PKCS_API CK_RV C_FindObjects(CK_SESSION_HANDLE hSession, CK_OBJECT_HANDLE_PTR ph + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_FindObjects(hSession, phObject, ulMaxObjectCount, pulObjectCount); + } + catch (...) +@@ -554,6 +612,8 @@ PKCS_API CK_RV C_FindObjectsFinal(CK_SESSION_HANDLE hSession) + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_FindObjectsFinal(hSession); + } + catch (...) +@@ -569,6 +629,8 @@ PKCS_API CK_RV C_EncryptInit(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMecha + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_EncryptInit(hSession, pMechanism, hObject); + } + catch (...) +@@ -584,6 +646,8 @@ PKCS_API CK_RV C_Encrypt(CK_SESSION_HANDLE hSession, CK_BYTE_PTR pData, CK_ULONG + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_Encrypt(hSession, pData, ulDataLen, pEncryptedData, pulEncryptedDataLen); + } + catch (...) +@@ -599,6 +663,8 @@ PKCS_API CK_RV C_EncryptUpdate(CK_SESSION_HANDLE hSession, CK_BYTE_PTR pData, CK + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_EncryptUpdate(hSession, pData, ulDataLen, pEncryptedData, pulEncryptedDataLen); + } + catch (...) +@@ -614,6 +680,8 @@ PKCS_API CK_RV C_EncryptFinal(CK_SESSION_HANDLE hSession, CK_BYTE_PTR pEncrypted + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_EncryptFinal(hSession, pEncryptedData, pulEncryptedDataLen); + } + catch (...) +@@ -629,6 +697,8 @@ PKCS_API CK_RV C_DecryptInit(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMecha + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_DecryptInit(hSession, pMechanism, hObject); + } + catch (...) +@@ -644,6 +714,8 @@ PKCS_API CK_RV C_Decrypt(CK_SESSION_HANDLE hSession, CK_BYTE_PTR pEncryptedData, + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_Decrypt(hSession, pEncryptedData, ulEncryptedDataLen, pData, pulDataLen); + } + catch (...) +@@ -659,6 +731,8 @@ PKCS_API CK_RV C_DecryptUpdate(CK_SESSION_HANDLE hSession, CK_BYTE_PTR pEncrypte + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_DecryptUpdate(hSession, pEncryptedData, ulEncryptedDataLen, pData, pDataLen); + } + catch (...) +@@ -674,6 +748,8 @@ PKCS_API CK_RV C_DecryptFinal(CK_SESSION_HANDLE hSession, CK_BYTE_PTR pData, CK_ + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_DecryptFinal(hSession, pData, pDataLen); + } + catch (...) +@@ -689,6 +765,8 @@ PKCS_API CK_RV C_DigestInit(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechan + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_DigestInit(hSession, pMechanism); + } + catch (...) +@@ -704,6 +782,8 @@ PKCS_API CK_RV C_Digest(CK_SESSION_HANDLE hSession, CK_BYTE_PTR pData, CK_ULONG + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_Digest(hSession, pData, ulDataLen, pDigest, pulDigestLen); + } + catch (...) +@@ -719,6 +799,8 @@ PKCS_API CK_RV C_DigestUpdate(CK_SESSION_HANDLE hSession, CK_BYTE_PTR pPart, CK_ + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_DigestUpdate(hSession, pPart, ulPartLen); + } + catch (...) +@@ -734,6 +816,8 @@ PKCS_API CK_RV C_DigestKey(CK_SESSION_HANDLE hSession, CK_OBJECT_HANDLE hObject) + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_DigestKey(hSession, hObject); + } + catch (...) +@@ -749,6 +833,8 @@ PKCS_API CK_RV C_DigestFinal(CK_SESSION_HANDLE hSession, CK_BYTE_PTR pDigest, CK + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_DigestFinal(hSession, pDigest, pulDigestLen); + } + catch (...) +@@ -764,6 +850,8 @@ PKCS_API CK_RV C_SignInit(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanis + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_SignInit(hSession, pMechanism, hKey); + } + catch (...) +@@ -779,6 +867,8 @@ PKCS_API CK_RV C_Sign(CK_SESSION_HANDLE hSession, CK_BYTE_PTR pData, CK_ULONG ul + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_Sign(hSession, pData, ulDataLen, pSignature, pulSignatureLen); + } + catch (...) +@@ -794,6 +884,8 @@ PKCS_API CK_RV C_SignUpdate(CK_SESSION_HANDLE hSession, CK_BYTE_PTR pPart, CK_UL + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_SignUpdate(hSession, pPart, ulPartLen); + } + catch (...) +@@ -809,6 +901,8 @@ PKCS_API CK_RV C_SignFinal(CK_SESSION_HANDLE hSession, CK_BYTE_PTR pSignature, C + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_SignFinal(hSession, pSignature, pulSignatureLen); + } + catch (...) +@@ -824,6 +918,8 @@ PKCS_API CK_RV C_SignRecoverInit(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pM + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_SignRecoverInit(hSession, pMechanism, hKey); + } + catch (...) +@@ -839,6 +935,8 @@ PKCS_API CK_RV C_SignRecover(CK_SESSION_HANDLE hSession, CK_BYTE_PTR pData, CK_U + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_SignRecover(hSession, pData, ulDataLen, pSignature, pulSignatureLen); + } + catch (...) +@@ -854,6 +952,8 @@ PKCS_API CK_RV C_VerifyInit(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechan + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_VerifyInit(hSession, pMechanism, hKey); + } + catch (...) +@@ -869,6 +969,8 @@ PKCS_API CK_RV C_Verify(CK_SESSION_HANDLE hSession, CK_BYTE_PTR pData, CK_ULONG + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_Verify(hSession, pData, ulDataLen, pSignature, ulSignatureLen); + } + catch (...) +@@ -884,6 +986,8 @@ PKCS_API CK_RV C_VerifyUpdate(CK_SESSION_HANDLE hSession, CK_BYTE_PTR pPart, CK_ + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_VerifyUpdate(hSession, pPart, ulPartLen); + } + catch (...) +@@ -899,6 +1003,8 @@ PKCS_API CK_RV C_VerifyFinal(CK_SESSION_HANDLE hSession, CK_BYTE_PTR pSignature, + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_VerifyFinal(hSession, pSignature, ulSignatureLen); + } + catch (...) +@@ -914,6 +1020,8 @@ PKCS_API CK_RV C_VerifyRecoverInit(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_VerifyRecoverInit(hSession, pMechanism, hKey); + } + catch (...) +@@ -929,6 +1037,8 @@ PKCS_API CK_RV C_VerifyRecover(CK_SESSION_HANDLE hSession, CK_BYTE_PTR pSignatur + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_VerifyRecover(hSession, pSignature, ulSignatureLen, pData, pulDataLen); + } + catch (...) +@@ -944,6 +1054,8 @@ PKCS_API CK_RV C_DigestEncryptUpdate(CK_SESSION_HANDLE hSession, CK_BYTE_PTR pPa + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_DigestEncryptUpdate(hSession, pPart, ulPartLen, pEncryptedPart, pulEncryptedPartLen); + } + catch (...) +@@ -959,6 +1071,8 @@ PKCS_API CK_RV C_DecryptDigestUpdate(CK_SESSION_HANDLE hSession, CK_BYTE_PTR pPa + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_DecryptDigestUpdate(hSession, pPart, ulPartLen, pDecryptedPart, pulDecryptedPartLen); + } + catch (...) +@@ -974,6 +1088,8 @@ PKCS_API CK_RV C_SignEncryptUpdate(CK_SESSION_HANDLE hSession, CK_BYTE_PTR pPart + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_SignEncryptUpdate(hSession, pPart, ulPartLen, pEncryptedPart, pulEncryptedPartLen); + } + catch (...) +@@ -989,6 +1105,8 @@ PKCS_API CK_RV C_DecryptVerifyUpdate(CK_SESSION_HANDLE hSession, CK_BYTE_PTR pEn + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_DecryptVerifyUpdate(hSession, pEncryptedPart, ulEncryptedPartLen, pPart, pulPartLen); + } + catch (...) +@@ -1004,6 +1122,8 @@ PKCS_API CK_RV C_GenerateKey(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMecha + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_GenerateKey(hSession, pMechanism, pTemplate, ulCount, phKey); + } + catch (...) +@@ -1029,6 +1149,8 @@ PKCS_API CK_RV C_GenerateKeyPair + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_GenerateKeyPair(hSession, pMechanism, pPublicKeyTemplate, ulPublicKeyAttributeCount, pPrivateKeyTemplate, ulPrivateKeyAttributeCount, phPublicKey, phPrivateKey); + } + catch (...) +@@ -1052,6 +1174,8 @@ PKCS_API CK_RV C_WrapKey + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_WrapKey(hSession, pMechanism, hWrappingKey, hKey, pWrappedKey, pulWrappedKeyLen); + } + catch (...) +@@ -1077,6 +1201,8 @@ PKCS_API CK_RV C_UnwrapKey + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_UnwrapKey(hSession, pMechanism, hUnwrappingKey, pWrappedKey, ulWrappedKeyLen, pTemplate, ulCount, phKey); + } + catch (...) +@@ -1100,6 +1226,8 @@ PKCS_API CK_RV C_DeriveKey + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_DeriveKey(hSession, pMechanism, hBaseKey, pTemplate, ulCount, phKey); + } + catch (...) +@@ -1115,6 +1243,8 @@ PKCS_API CK_RV C_SeedRandom(CK_SESSION_HANDLE hSession, CK_BYTE_PTR pSeed, CK_UL + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_SeedRandom(hSession, pSeed, ulSeedLen); + } + catch (...) +@@ -1130,6 +1260,8 @@ PKCS_API CK_RV C_GenerateRandom(CK_SESSION_HANDLE hSession, CK_BYTE_PTR pRandomD + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_GenerateRandom(hSession, pRandomData, ulRandomLen); + } + catch (...) +@@ -1145,6 +1277,8 @@ PKCS_API CK_RV C_GetFunctionStatus(CK_SESSION_HANDLE hSession) + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_GetFunctionStatus(hSession); + } + catch (...) +@@ -1160,6 +1294,8 @@ PKCS_API CK_RV C_CancelFunction(CK_SESSION_HANDLE hSession) + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_CancelFunction(hSession); + } + catch (...) +@@ -1175,6 +1311,8 @@ PKCS_API CK_RV C_WaitForSlotEvent(CK_FLAGS flags, CK_SLOT_ID_PTR pSlot, CK_VOID_ + { + try + { ++ if (objects_deleted == 1) ++ return CKR_FUNCTION_FAILED; + return SoftHSM::i()->C_WaitForSlotEvent(flags, pSlot, pReserved); + } + catch (...) +-- +2.42.0 + diff --git a/sources/meta-openembedded/meta-oe/recipes-security/softhsm/softhsm_2.6.1.bb b/sources/meta-openembedded/meta-oe/recipes-security/softhsm/softhsm_2.6.1.bb index 930bca96..66f04887 100644 --- a/sources/meta-openembedded/meta-oe/recipes-security/softhsm/softhsm_2.6.1.bb +++ b/sources/meta-openembedded/meta-oe/recipes-security/softhsm/softhsm_2.6.1.bb @@ -7,6 +7,7 @@ DEPENDS = "sqlite3" SRC_URI = "https://dist.opendnssec.org/source/softhsm-2.6.1.tar.gz \ file://0001-avoid-unnecessary-check-for-sqlite3-binary.patch \ + file://0002-Prevent-accessing-of-global-c-objects-once-they-are-.patch \ " SRC_URI[sha256sum] = "61249473054bcd1811519ef9a989a880a7bdcc36d317c9c25457fc614df475f2" diff --git a/sources/meta-openembedded/meta-oe/recipes-security/usbguard/usbguard/0001-include-missing-cstdint.patch b/sources/meta-openembedded/meta-oe/recipes-security/usbguard/usbguard/0001-include-missing-cstdint.patch deleted file mode 100644 index 5cbe6409..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-security/usbguard/usbguard/0001-include-missing-cstdint.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 1da0cfbb9ae978822d961d8b22d8d5125c11247a Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Thu, 26 Jan 2023 23:46:56 -0800 -Subject: [PATCH] include missing - -gcc 13 moved some includes around and as a result is no -longer transitively included [1]. Explicitly include it for -uint8_t. - -[1] https://gcc.gnu.org/gcc-13/porting_to.html#header-dep-changes - -Upstream-Status: Submitted [https://github.com/USBGuard/usbguard/pull/583] -Signed-off-by: Khem Raj ---- - src/Library/Base64.cpp | 1 - - src/Library/Base64.hpp | 1 + - 2 files changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/Library/Base64.cpp b/src/Library/Base64.cpp -index ddb28dc..0246a13 100644 ---- a/src/Library/Base64.cpp -+++ b/src/Library/Base64.cpp -@@ -22,7 +22,6 @@ - - #include "Base64.hpp" - #include --#include - - namespace usbguard - { -diff --git a/src/Library/Base64.hpp b/src/Library/Base64.hpp -index 0947f21..e0c745c 100644 ---- a/src/Library/Base64.hpp -+++ b/src/Library/Base64.hpp -@@ -23,6 +23,7 @@ - #endif - - #include -+#include - #include - - namespace usbguard --- -2.39.1 - diff --git a/sources/meta-openembedded/meta-oe/recipes-security/usbguard/usbguard_1.1.2.bb b/sources/meta-openembedded/meta-oe/recipes-security/usbguard/usbguard_1.1.2.bb deleted file mode 100644 index c062f270..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-security/usbguard/usbguard_1.1.2.bb +++ /dev/null @@ -1,70 +0,0 @@ -# Copyright (c) 2021 Koninklijke Philips N.V. -# -# SPDX-License-Identifier: MIT -# -SUMMARY = "USBGuard daemon for blacklisting and whitelisting of USB devices" -DESCRIPTION = "The USBGuard software framework helps to protect your computer against \ -rogue USB devices (a.k.a. Bad USB) by implementing basic whitelisting and blacklisting \ -capabilities based on device attributes. This recipe takes OpenSSL as crypto-backend for \ -computing device hashes (Supported values are sodium, gcrypt, openssl)." -HOMEPAGE = "https://usbguard.github.io/" -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263" - -SRC_URI = "https://github.com/USBGuard/usbguard/releases/download/${BPN}-${PV}/${BPN}-${PV}.tar.gz \ - file://0001-include-missing-cstdint.patch \ - file://0001-Add-and-use-pkgconfig-instead-of-libgcrypt-config.patch" - -SRC_URI[sha256sum] = "dcf5c90f3f93030e04df1baeb8d388b678c40dd48b135ea12a7be7dee8944934" - -inherit autotools-brokensep bash-completion pkgconfig systemd github-releases - -DEPENDS = "glib-2.0-native libcap-ng libqb libxml2-native libxslt-native protobuf protobuf-native xmlto-native" - -UPSTREAM_CHECK_REGEX = "releases/tag/usbguard-(?P\d+(\.\d+)+)" - -EXTRA_OECONF += "\ - --with-bundled-catch \ - --with-bundled-pegtl \ -" - -PACKAGECONFIG ?= "\ - openssl \ - ${@bb.utils.filter('DISTRO_FEATURES', 'polkit', d)} \ - ${@bb.utils.filter('DISTRO_FEATURES', 'seccomp', d)} \ - ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \ -" - -# USBGuard has made polkit mandatory to configure with-dbus -PACKAGECONFIG[dbus] = "--with-dbus,--without-dbus,dbus-glib polkit" -PACKAGECONFIG[libgcrypt] = "--with-crypto-library=gcrypt,,libgcrypt,,,libsodium openssl" -PACKAGECONFIG[libsodium] = "--with-crypto-library=sodium,,libsodium,,,libgcrypt openssl" -PACKAGECONFIG[openssl] = "--with-crypto-library=openssl,,openssl,,,libgcrypt libsodium" -PACKAGECONFIG[polkit] = "--with-polkit,--without-polkit,polkit" -PACKAGECONFIG[seccomp] = "--enable-seccomp,--disable-seccomp,libseccomp" -PACKAGECONFIG[systemd] = "--enable-systemd,--disable-systemd,systemd" - -SYSTEMD_PACKAGES = "${PN}" - -SYSTEMD_SERVICE:${PN} = "usbguard.service ${@bb.utils.contains('PACKAGECONFIG', 'dbus', 'usbguard-dbus.service', '', d)}" - -FILES:${PN} += "\ - ${systemd_unitdir}/system/usbguard.service \ - ${systemd_unitdir}/system/usbguard-dbus.service \ - ${datadir}/polkit-1 \ - ${datadir}/dbus-1 \ - ${nonarch_libdir}/tmpfiles.d \ -" - -do_install:append() { -# Create /var/log/usbguard in runtime. - if [ "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" ]; then - install -d ${D}${nonarch_libdir}/tmpfiles.d - echo "d ${localstatedir}/log/${BPN} 0755 root root -" > ${D}${nonarch_libdir}/tmpfiles.d/${BPN}.conf - fi - if [ "${@bb.utils.filter('DISTRO_FEATURES', 'sysvinit', d)}" ]; then - install -d ${D}${sysconfdir}/default/volatiles - echo "d root root 0755 ${localstatedir}/log/${BPN} none" > ${D}${sysconfdir}/default/volatiles/99_${BPN} - fi - rm -rf ${D}${localstatedir}/log -} diff --git a/sources/meta-openembedded/meta-oe/recipes-security/usbguard/usbguard_1.1.3.bb b/sources/meta-openembedded/meta-oe/recipes-security/usbguard/usbguard_1.1.3.bb new file mode 100644 index 00000000..ede9a5f0 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-security/usbguard/usbguard_1.1.3.bb @@ -0,0 +1,71 @@ +# Copyright (c) 2021 Koninklijke Philips N.V. +# +# SPDX-License-Identifier: MIT +# +SUMMARY = "USBGuard daemon for blacklisting and whitelisting of USB devices" +DESCRIPTION = "The USBGuard software framework helps to protect your computer against \ +rogue USB devices (a.k.a. Bad USB) by implementing basic whitelisting and blacklisting \ +capabilities based on device attributes. This recipe takes OpenSSL as crypto-backend for \ +computing device hashes (Supported values are sodium, gcrypt, openssl)." +HOMEPAGE = "https://usbguard.github.io/" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +SRC_URI = "https://github.com/USBGuard/usbguard/releases/download/${BPN}-${PV}/${BPN}-${PV}.tar.gz \ + file://0001-Add-and-use-pkgconfig-instead-of-libgcrypt-config.patch" + +SRC_URI[sha256sum] = "707dad2938923202697f636c2b4e0be80f192242039a2af3fc7ac35d03f78551" + +inherit autotools-brokensep bash-completion pkgconfig systemd github-releases + +DEPENDS = "glib-2.0-native libcap-ng libqb libxml2-native libxslt-native protobuf protobuf-native xmlto-native" + +UPSTREAM_CHECK_REGEX = "releases/tag/usbguard-(?P\d+(\.\d+)+)" + +EXTRA_OECONF += "\ + --with-bundled-catch \ + --with-bundled-pegtl \ +" + +LDFLAGS:append:riscv32 = " -latomic" + +PACKAGECONFIG ?= "\ + openssl \ + ${@bb.utils.filter('DISTRO_FEATURES', 'polkit', d)} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'seccomp', d)} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \ +" + +# USBGuard has made polkit mandatory to configure with-dbus +PACKAGECONFIG[dbus] = "--with-dbus,--without-dbus,dbus-glib polkit" +PACKAGECONFIG[libgcrypt] = "--with-crypto-library=gcrypt,,libgcrypt,,,libsodium openssl" +PACKAGECONFIG[libsodium] = "--with-crypto-library=sodium,,libsodium,,,libgcrypt openssl" +PACKAGECONFIG[openssl] = "--with-crypto-library=openssl,,openssl,,,libgcrypt libsodium" +PACKAGECONFIG[polkit] = "--with-polkit,--without-polkit,polkit" +PACKAGECONFIG[seccomp] = "--enable-seccomp,--disable-seccomp,libseccomp" +PACKAGECONFIG[systemd] = "--enable-systemd,--disable-systemd,systemd" + +SYSTEMD_PACKAGES = "${PN}" + +SYSTEMD_SERVICE:${PN} = "usbguard.service ${@bb.utils.contains('PACKAGECONFIG', 'dbus', 'usbguard-dbus.service', '', d)}" + +FILES:${PN} += "\ + ${systemd_unitdir}/system/usbguard.service \ + ${systemd_unitdir}/system/usbguard-dbus.service \ + ${datadir}/polkit-1 \ + ${datadir}/dbus-1 \ + ${nonarch_libdir}/tmpfiles.d \ +" + +do_install:append() { +# Create /var/log/usbguard in runtime. + if [ "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" ]; then + install -d ${D}${nonarch_libdir}/tmpfiles.d + echo "d ${localstatedir}/log/${BPN} 0755 root root -" > ${D}${nonarch_libdir}/tmpfiles.d/${BPN}.conf + fi + if [ "${@bb.utils.filter('DISTRO_FEATURES', 'sysvinit', d)}" ]; then + install -d ${D}${sysconfdir}/default/volatiles + echo "d root root 0755 ${localstatedir}/log/${BPN} none" > ${D}${sysconfdir}/default/volatiles/99_${BPN} + fi + rm -rf ${D}${localstatedir}/log +} diff --git a/sources/meta-openembedded/meta-oe/recipes-shells/dash/dash_0.5.12.bb b/sources/meta-openembedded/meta-oe/recipes-shells/dash/dash_0.5.12.bb index 947ef702..1bf36257 100644 --- a/sources/meta-openembedded/meta-oe/recipes-shells/dash/dash_0.5.12.bb +++ b/sources/meta-openembedded/meta-oe/recipes-shells/dash/dash_0.5.12.bb @@ -10,6 +10,8 @@ inherit autotools update-alternatives SRC_URI = "http://gondor.apana.org.au/~herbert/${BPN}/files/${BP}.tar.gz" SRC_URI[sha256sum] = "6a474ac46e8b0b32916c4c60df694c82058d3297d8b385b74508030ca4a8f28a" +CVE_PRODUCT = "dash:dash" + EXTRA_OECONF += "--bindir=${base_bindir}" ALTERNATIVE:${PN} = "sh" diff --git a/sources/meta-openembedded/meta-oe/recipes-shells/zsh/zsh/CVE-2021-45444_1.patch b/sources/meta-openembedded/meta-oe/recipes-shells/zsh/zsh/CVE-2021-45444_1.patch deleted file mode 100644 index fb8fa342..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-shells/zsh/zsh/CVE-2021-45444_1.patch +++ /dev/null @@ -1,60 +0,0 @@ -Origin: commit c187154f47697cdbf822c2f9d714d570ed4a0fd1 -From: Oliver Kiddle -Date: Wed, 15 Dec 2021 01:56:40 +0100 -Subject: [PATCH 1/9] security/41: Don't perform PROMPT_SUBST evaluation on - %F/%K arguments - -Mitigates CVE-2021-45444 - -https://salsa.debian.org/debian/zsh/-/raw/debian/5.8-6+deb11u1/debian/patches/cherry-pick-CVE-2021-45444_1.patch?inline=false -Upstream-Status: Backport -CVE: CVE-2021-45444 -Signed-off-by: Chee Yang Lee ---- - ChangeLog | 5 +++++ - Src/prompt.c | 10 ++++++++++ - 2 files changed, 15 insertions(+) - -diff --git a/ChangeLog b/ChangeLog -index 8d7dfc169..eb248ec06 100644 ---- a/ChangeLog -+++ b/ChangeLog -@@ -1,3 +1,8 @@ -+2022-01-27 dana -+ -+ * Oliver Kiddle: security/41: Src/prompt.c: Prevent recursive -+ PROMPT_SUBST -+ - 2020-02-14 dana - - * unposted: Config/version.mk: Update for 5.8 -diff --git a/Src/prompt.c b/Src/prompt.c -index b65bfb86b..91e21c8e9 100644 ---- a/Src/prompt.c -+++ b/Src/prompt.c -@@ -244,6 +244,12 @@ parsecolorchar(zattr arg, int is_fg) - bv->fm += 2; /* skip over F{ */ - if ((ep = strchr(bv->fm, '}'))) { - char oc = *ep, *col, *coll; -+ int ops = opts[PROMPTSUBST], opb = opts[PROMPTBANG]; -+ int opp = opts[PROMPTPERCENT]; -+ -+ opts[PROMPTPERCENT] = 1; -+ opts[PROMPTSUBST] = opts[PROMPTBANG] = 0; -+ - *ep = '\0'; - /* expand the contents of the argument so you can use - * %v for example */ -@@ -252,6 +258,10 @@ parsecolorchar(zattr arg, int is_fg) - arg = match_colour((const char **)&coll, is_fg, 0); - free(col); - bv->fm = ep; -+ -+ opts[PROMPTSUBST] = ops; -+ opts[PROMPTBANG] = opb; -+ opts[PROMPTPERCENT] = opp; - } else { - arg = match_colour((const char **)&bv->fm, is_fg, 0); - if (*bv->fm != '}') --- -2.34.1 diff --git a/sources/meta-openembedded/meta-oe/recipes-shells/zsh/zsh/CVE-2021-45444_2.patch b/sources/meta-openembedded/meta-oe/recipes-shells/zsh/zsh/CVE-2021-45444_2.patch deleted file mode 100644 index e5b6d7cd..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-shells/zsh/zsh/CVE-2021-45444_2.patch +++ /dev/null @@ -1,140 +0,0 @@ -From 8a4d65ef6d0023ab9b238529410afb433553d2fa Mon Sep 17 00:00:00 2001 -From: Marc Cornellà -Date: Mon, 24 Jan 2022 09:43:28 +0100 -Subject: [PATCH 2/9] security/89: Add patch which can optionally be used to - work around CVE-2021-45444 in VCS_Info -Comment: Updated to use the same file name without blanks as actually - used in the final 5.8.1 release. - - -https://salsa.debian.org/debian/zsh/-/blob/debian/5.8-6+deb11u1/debian/patches/cherry-pick-CVE-2021-45444_2.patch -Upstream-Status: Backport -CVE: CVE-2021-45444 -Signed-off-by: Chee Yang Lee ---- - ChangeLog | 5 + - Etc/CVE-2021-45444-VCS_Info-workaround.patch | 98 ++++++++++++++++++++ - 2 files changed, 103 insertions(+) - create mode 100644 Etc/CVE-2021-45444-VCS_Info-workaround.patch - -diff --git a/ChangeLog b/ChangeLog -index eb248ec06..9a05a09e1 100644 ---- a/ChangeLog -+++ b/ChangeLog -@@ -1,5 +1,10 @@ - 2022-01-27 dana - -+ * Marc Cornellà: security/89: -+ Etc/CVE-2021-45444-VCS_Info-workaround.patch: Add patch which -+ can optionally be used to work around recursive PROMPT_SUBST -+ issue in VCS_Info -+ - * Oliver Kiddle: security/41: Src/prompt.c: Prevent recursive - PROMPT_SUBST - -diff --git a/Etc/CVE-2021-45444-VCS_Info-workaround.patch b/Etc/CVE-2021-45444-VCS_Info-workaround.patch -new file mode 100644 -index 000000000..13e54be77 ---- /dev/null -+++ b/Etc/CVE-2021-45444-VCS_Info-workaround.patch -@@ -0,0 +1,98 @@ -+From 972887bbe5eb6a00e5f0e73781d6d73bfdcafb93 Mon Sep 17 00:00:00 2001 -+From: =?UTF-8?q?Marc=20Cornell=C3=A0?= -+Date: Mon, 24 Jan 2022 09:43:28 +0100 -+Subject: [PATCH] security/89: Partially work around CVE-2021-45444 in VCS_Info -+MIME-Version: 1.0 -+Content-Type: text/plain; charset=UTF-8 -+Content-Transfer-Encoding: 8bit -+ -+This patch is a partial, VCS_Info-specific work-around for CVE-2021-45444, -+which is mitigated in the shell itself in 5.8.1 and later versions. It is -+offered for users who are concerned about an exploit but are unable to update -+their binaries to receive the complete fix. -+ -+The patch works around the vulnerability by pre-escaping values substituted -+into format strings in VCS_Info. Please note that this may break some user -+configurations that rely on those values being un-escaped (which is why it was -+not included directly in 5.8.1). It may be possible to limit this breakage by -+adjusting exactly which ones are pre-escaped, but of course this may leave -+them vulnerable again. -+ -+If applying the patch to the file system is inconvenient or not possible, the -+following script can be used to idempotently patch the relevant function -+running in memory (and thus must be re-run when the shell is restarted): -+ -+ -+# Impacted versions go from v5.0.3 to v5.8 (v5.8.1 is the first patched version) -+autoload -Uz is-at-least -+if is-at-least 5.8.1 || ! is-at-least 5.0.3; then -+ return -+fi -+ -+# Quote necessary $hook_com[] items just before they are used -+# in the line "VCS_INFO_hook 'post-backend'" of the VCS_INFO_formats -+# function, where is: -+# -+# base: the full path of the repository's root directory. -+# base-name: the name of the repository's root directory. -+# branch: the name of the currently checked out branch. -+# revision: an identifier of the currently checked out revision. -+# subdir: the path of the current directory relative to the -+# repository's root directory. -+# misc: a string that may contain anything the vcs_info backend wants. -+# -+# This patch %-quotes these fields previous to their use in vcs_info hooks and -+# the zformat call and, eventually, when they get expanded in the prompt. -+# It's important to quote these here, and not later after hooks have modified the -+# fields, because then we could be quoting % characters from valid prompt sequences, -+# like %F{color}, %B, etc. -+# -+# 32 │ hook_com[subdir]="$(VCS_INFO_reposub ${hook_com[base]})" -+# 33 │ hook_com[subdir_orig]="${hook_com[subdir]}" -+# 34 │ -+# 35 + │ for tmp in base base-name branch misc revision subdir; do -+# 36 + │ hook_com[$tmp]="${hook_com[$tmp]//\%/%%}" -+# 37 + │ done -+# 38 + │ -+# 39 │ VCS_INFO_hook 'post-backend' -+# -+# This is especially important so that no command substitution is performed -+# due to malicious input as a consequence of CVE-2021-45444, which affects -+# zsh versions from 5.0.3 to 5.8. -+# -+autoload -Uz +X regexp-replace VCS_INFO_formats -+ -+# We use $tmp here because it's already a local variable in VCS_INFO_formats -+typeset PATCH='for tmp (base base-name branch misc revision subdir) hook_com[$tmp]="${hook_com[$tmp]//\%/%%}"' -+# Unique string to avoid reapplying the patch if this code gets called twice -+typeset PATCH_ID=vcs_info-patch-9b9840f2-91e5-4471-af84-9e9a0dc68c1b -+# Only patch the VCS_INFO_formats function if not already patched -+if [[ "$functions[VCS_INFO_formats]" != *$PATCH_ID* ]]; then -+ regexp-replace 'functions[VCS_INFO_formats]' \ -+ "VCS_INFO_hook 'post-backend'" \ -+ ': ${PATCH_ID}; ${PATCH}; ${MATCH}' -+fi -+unset PATCH PATCH_ID -+ -+ -+--- -+ Functions/VCS_Info/VCS_INFO_formats | 4 ++++ -+ 1 file changed, 4 insertions(+) -+ -+diff --git a/Functions/VCS_Info/VCS_INFO_formats b/Functions/VCS_Info/VCS_INFO_formats -+index e0e1dc738..4d88e28b6 100644 -+--- a/Functions/VCS_Info/VCS_INFO_formats -++++ b/Functions/VCS_Info/VCS_INFO_formats -+@@ -32,6 +32,10 @@ hook_com[base-name_orig]="${hook_com[base_name]}" -+ hook_com[subdir]="$(VCS_INFO_reposub ${hook_com[base]})" -+ hook_com[subdir_orig]="${hook_com[subdir]}" -+ -++for tmp in base base-name branch misc revision subdir; do -++ hook_com[$tmp]="${hook_com[$tmp]//\%/%%}" -++done -++ -+ VCS_INFO_hook 'post-backend' -+ -+ ## description (for backend authors): -+-- -+2.34.1 --- -2.34.1 diff --git a/sources/meta-openembedded/meta-oe/recipes-shells/zsh/zsh/CVE-2021-45444_3.patch b/sources/meta-openembedded/meta-oe/recipes-shells/zsh/zsh/CVE-2021-45444_3.patch deleted file mode 100644 index adfc00ae..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-shells/zsh/zsh/CVE-2021-45444_3.patch +++ /dev/null @@ -1,77 +0,0 @@ -From 4abf2fc193fc2f3e680deecbf81289a7b02e245b Mon Sep 17 00:00:00 2001 -From: dana -Date: Tue, 21 Dec 2021 13:13:33 -0600 -Subject: [PATCH 3/9] CVE-2021-45444: Update NEWS/README - -https://salsa.debian.org/debian/zsh/-/blob/debian/5.8-6+deb11u1/debian/patches/cherry-pick-CVE-2021-45444_3.patch -Upstream-Status: Backport -CVE: CVE-2021-45444 -Signed-off-by: Chee Yang Lee ---- - ChangeLog | 2 ++ - NEWS | 20 ++++++++++++++++++++ - README | 6 ++++++ - 3 files changed, 28 insertions(+) - -diff --git a/ChangeLog b/ChangeLog -index 9a05a09e1..93b0bc337 100644 ---- a/ChangeLog -+++ b/ChangeLog -@@ -1,5 +1,7 @@ - 2022-01-27 dana - -+ * CVE-2021-45444: NEWS, README: Document preceding two changes -+ - * Marc Cornellà: security/89: - Etc/CVE-2021-45444-VCS_Info-workaround.patch: Add patch which - can optionally be used to work around recursive PROMPT_SUBST -diff --git a/NEWS b/NEWS -index 964e1633f..d34b3f79e 100644 ---- a/NEWS -+++ b/NEWS -@@ -4,6 +4,26 @@ CHANGES FROM PREVIOUS VERSIONS OF ZSH - - Note also the list of incompatibilities in the README file. - -+Changes since 5.8 -+----------------- -+ -+CVE-2021-45444: Some prompt expansion sequences, such as %F, support -+'arguments' which are themselves expanded in case they contain colour -+values, etc. This additional expansion would trigger PROMPT_SUBST -+evaluation, if enabled. This could be abused to execute code the user -+didn't expect. e.g., given a certain prompt configuration, an attacker -+could trick a user into executing arbitrary code by having them check -+out a Git branch with a specially crafted name. -+ -+This is fixed in the shell itself by no longer performing PROMPT_SUBST -+evaluation on these prompt-expansion arguments. -+ -+Users who are concerned about an exploit but unable to update their -+binaries may apply the partial work-around described in the file -+'Etc/CVE-2021-45444 VCS_Info workaround.patch' included with the shell -+source. [ Reported by RyotaK . Additional thanks to -+Marc Cornellà . ] -+ - Changes since 5.7.1-test-3 - -------------------------- - -diff --git a/README b/README -index 7f1dd5f92..c9e994ab3 100644 ---- a/README -+++ b/README -@@ -31,6 +31,12 @@ Zsh is a shell with lots of features. For a list of some of these, see the - file FEATURES, and for the latest changes see NEWS. For more - details, see the documentation. - -+Incompatibilities since 5.8 -+--------------------------- -+ -+PROMPT_SUBST expansion is no longer performed on arguments to prompt- -+expansion sequences such as %F. -+ - Incompatibilities since 5.7.1 - ----------------------------- - --- -2.34.1 diff --git a/sources/meta-openembedded/meta-oe/recipes-shells/zsh/zsh_5.8.bb b/sources/meta-openembedded/meta-oe/recipes-shells/zsh/zsh_5.8.bb deleted file mode 100644 index 7602ff9f..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-shells/zsh/zsh_5.8.bb +++ /dev/null @@ -1,62 +0,0 @@ -SUMMARY = "UNIX Shell similar to the Korn shell" -DESCRIPTION = "Zsh is a shell designed for interactive use, although it is also a \ - powerful scripting language. Many of the useful features of bash, \ - ksh, and tcsh were incorporated into zsh; many original features were added." -HOMEPAGE = "http://www.zsh.org" -SECTION = "base/shell" - -LICENSE = "zsh" -LIC_FILES_CHKSUM = "file://LICENCE;md5=1a4c4cda3e8096d2fd483ff2f4514fec" - -DEPENDS = "ncurses bison-native libcap libpcre gdbm groff-native" - -SRC_URI = "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}/5.8/${BP}.tar.xz \ - file://CVE-2021-45444_1.patch \ - file://CVE-2021-45444_2.patch \ - file://CVE-2021-45444_3.patch \ - " -SRC_URI[sha256sum] = "dcc4b54cc5565670a65581760261c163d720991f0d06486da61f8d839b52de27" - -inherit autotools-brokensep gettext update-alternatives manpages - -EXTRA_OECONF = " \ - --bindir=${base_bindir} \ - --enable-etcdir=${sysconfdir} \ - --enable-fndir=${datadir}/${BPN}/${PV}/functions \ - --enable-site-fndir=${datadir}/${BPN}/site-functions \ - --with-term-lib='ncursesw ncurses' \ - --with-tcsetpgrp \ - --enable-cap \ - --enable-multibyte \ - --disable-gdbm \ - --disable-dynamic \ - zsh_cv_shared_environ=yes \ -" - -# Configure respects --bindir from EXTRA_OECONF, but then Src/Makefile will read bindir from environment -export bindir="${base_bindir}" - -EXTRA_OEMAKE = "-e MAKEFLAGS=" - -ALTERNATIVE:${PN} = "sh" -ALTERNATIVE_LINK_NAME[sh] = "${base_bindir}/sh" -ALTERNATIVE_TARGET[sh] = "${base_bindir}/${BPN}" -ALTERNATIVE_PRIORITY = "90" - -export AUTOHEADER = "true" - -do_configure () { - gnu-configize --force ${S} - oe_runconf -} - -pkg_postinst:${PN} () { - touch $D${sysconfdir}/shells - grep -q "bin/zsh" $D${sysconfdir}/shells || echo /bin/zsh >> $D${sysconfdir}/shells - grep -q "bin/sh" $D${sysconfdir}/shells || echo /bin/sh >> $D${sysconfdir}/shells -} - -# work around QA failures with usrmerge installing zsh in /usr/bin/zsh instead of /bin/zsh -# ERROR: QA Issue: /usr/share/zsh/5.8/functions/zed contained in package zsh requires /bin/zsh, but no providers found in RDEPENDS:zsh? [file-rdeps] -# like bash does since https://git.openembedded.org/openembedded-core/commit/?id=4759408677a4e60c5fa7131afcb5bc184cf2f90a -RPROVIDES:${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', '/bin/zsh', '', d)}" diff --git a/sources/meta-openembedded/meta-oe/recipes-shells/zsh/zsh_5.9.bb b/sources/meta-openembedded/meta-oe/recipes-shells/zsh/zsh_5.9.bb new file mode 100644 index 00000000..7940970e --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-shells/zsh/zsh_5.9.bb @@ -0,0 +1,62 @@ +SUMMARY = "UNIX Shell similar to the Korn shell" +DESCRIPTION = "Zsh is a shell designed for interactive use, although it is also a \ + powerful scripting language. Many of the useful features of bash, \ + ksh, and tcsh were incorporated into zsh; many original features were added." +HOMEPAGE = "http://www.zsh.org" +SECTION = "base/shell" + +LICENSE = "zsh" +LIC_FILES_CHKSUM = "file://LICENCE;md5=1a4c4cda3e8096d2fd483ff2f4514fec" + +DEPENDS = "ncurses bison-native libcap libpcre gdbm groff-native" + +SRC_URI = "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}/${PV}/${BP}.tar.xz" +SRC_URI[sha256sum] = "9b8d1ecedd5b5e81fbf1918e876752a7dd948e05c1a0dba10ab863842d45acd5" + +inherit autotools-brokensep gettext update-alternatives manpages + +EXTRA_OECONF = " \ + --bindir=${base_bindir} \ + --enable-etcdir=${sysconfdir} \ + --enable-fndir=${datadir}/${BPN}/${PV}/functions \ + --enable-site-fndir=${datadir}/${BPN}/site-functions \ + --with-term-lib='ncursesw ncurses' \ + --with-tcsetpgrp \ + --enable-cap \ + --enable-multibyte \ + --disable-gdbm \ + --disable-dynamic \ + zsh_cv_shared_environ=yes \ +" + +# Configure respects --bindir from EXTRA_OECONF, but then Src/Makefile will read bindir from environment +export bindir="${base_bindir}" + +EXTRA_OEMAKE = "-e MAKEFLAGS=" + +ALTERNATIVE:${PN} = "sh" +ALTERNATIVE_LINK_NAME[sh] = "${base_bindir}/sh" +ALTERNATIVE_TARGET[sh] = "${base_bindir}/${BPN}" +ALTERNATIVE_PRIORITY = "90" + +export AUTOHEADER = "true" + +do_configure () { + gnu-configize --force ${S} + oe_runconf +} + +do_install:append() { + sed -i -e '1!b; s:^#!.*[ /]zsh:#!${bindir}/zsh:; s#/usr/local/bin#${bindir}#;' \ + `find ${D}/usr/share/zsh/${PV}/functions -type f` +} + +pkg_postinst:${PN} () { + touch $D${sysconfdir}/shells + for i in zsh sh + do + grep -q "bin/$i" $D${sysconfdir}/shells || \ + printf >> $D${sysconfdir}/shells \ + "${bindir}/$i\n${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', '/bin/$i\n', '', d)}" + done +} diff --git a/sources/meta-openembedded/meta-oe/recipes-support/anthy/anthy_9100h.bb b/sources/meta-openembedded/meta-oe/recipes-support/anthy/anthy_9100h.bb index f2bf52cd..ed87b3de 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/anthy/anthy_9100h.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/anthy/anthy_9100h.bb @@ -17,6 +17,9 @@ SRC_URI:append:class-native = " file://native-helpers.patch" SRC_URI[md5sum] = "1f558ff7ed296787b55bb1c6cf131108" SRC_URI[sha256sum] = "d256f075f018b4a3cb0d165ed6151fda4ba7db1621727e0eb54569b6e2275547" +UPSTREAM_CHECK_URI = "https://osdn.net/projects/anthy/releases/" +UPSTREAM_CHECK_REGEX = "${BPN}-(?P(\d+)+(\w*))" + DEPENDS:class-target = "anthy-native" RDEPENDS:${PN}:class-target = "libanthy0" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/asio/asio/0001-tests-Remove-blocking_adaptation.cpp.patch b/sources/meta-openembedded/meta-oe/recipes-support/asio/asio/0001-tests-Remove-blocking_adaptation.cpp.patch deleted file mode 100644 index 5aa50291..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/asio/asio/0001-tests-Remove-blocking_adaptation.cpp.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 7d76513b82a67e117d195a1b5a0d6c2e8591488b Mon Sep 17 00:00:00 2001 -From: Mingli Yu -Date: Thu, 10 Oct 2024 13:58:38 +0800 -Subject: [PATCH] tests: Remove blocking_adaptation.cpp - -The test failed to build with clang as below. -../../../asio-1.30.2/src/tests/../../include/asio/execution/blocking_adaptation.hpp:216:13: error: call to 'query' is ambiguous - 216 | conditional_t::query(static_cast(p)) - | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -../../../asio-1.30.2/src/tests/../../include/asio/execution/blocking_adaptation.hpp:213:29: note: in instantiation of exception specification for 'query>' requested here - 213 | static constexpr auto query(P&& p) - | - -We can add the case back once the above build failure resolved then. - -Upstream-Status: Pending - -Signed-off-by: Mingli Yu ---- - src/tests/Makefile.am | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am -index 04f8a03..eab2d56 100644 ---- a/src/tests/Makefile.am -+++ b/src/tests/Makefile.am -@@ -68,7 +68,6 @@ check_PROGRAMS = \ - unit/error \ - unit/execution/any_executor \ - unit/execution/blocking \ -- unit/execution/blocking_adaptation \ - unit/execution/context_as \ - unit/execution/executor \ - unit/execution/invocable_archetype \ --- -2.34.1 - diff --git a/sources/meta-openembedded/meta-oe/recipes-support/asio/asio/run-ptest b/sources/meta-openembedded/meta-oe/recipes-support/asio/asio/run-ptest deleted file mode 100644 index d37db0b3..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/asio/asio/run-ptest +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh - -ptestdir=$(dirname "$(readlink -f "$0")") -cd "$ptestdir"/tests || exit - -tests=$(find * -type f -executable) - -rm -rf test.log - -for f in $tests -do - if test -x ./"$f"; then - if ./"$f" > test.log 2>&1; then - echo "PASS: $f" - else - echo "FAIL: $f" - fi - fi -done diff --git a/sources/meta-openembedded/meta-oe/recipes-support/asio/asio_1.30.2.bb b/sources/meta-openembedded/meta-oe/recipes-support/asio/asio_1.30.2.bb index 1f492b71..6930381e 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/asio/asio_1.30.2.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/asio/asio_1.30.2.bb @@ -8,12 +8,9 @@ LICENSE = "BSL-1.0" DEPENDS = "openssl" -SRC_URI = "${SOURCEFORGE_MIRROR}/asio/${BP}.tar.bz2 \ - file://0001-tests-Remove-blocking_adaptation.cpp.patch \ - file://run-ptest \ -" +SRC_URI = "${SOURCEFORGE_MIRROR}/asio/${BP}.tar.bz2" -inherit autotools ptest +inherit autotools ALLOW_EMPTY:${PN} = "1" @@ -25,16 +22,4 @@ PACKAGECONFIG ??= "boost" PACKAGECONFIG[boost] = "--with-boost=${STAGING_LIBDIR},--without-boost,boost" -TESTDIR = "src/tests" -do_compile_ptest() { - echo 'buildtest-TESTS: $(check_PROGRAMS)' >> ${TESTDIR}/Makefile - oe_runmake -C ${TESTDIR} buildtest-TESTS -} - -do_install_ptest() { - install -d ${D}${PTEST_PATH}/tests - # copy executables - find ${B}/${TESTDIR}/unit -type f -executable -exec cp {} ${D}${PTEST_PATH}/tests/ \; -} - BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/atop/atop_2.4.0.bb b/sources/meta-openembedded/meta-oe/recipes-support/atop/atop_2.4.0.bb index bb1f5362..df45eede 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/atop/atop_2.4.0.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/atop/atop_2.4.0.bb @@ -24,6 +24,9 @@ SRC_URI = "http://www.atoptool.nl/download/${BP}.tar.gz \ SRC_URI[md5sum] = "1077da884ed94f2bc3c81ac3ab970436" SRC_URI[sha256sum] = "be1c010a77086b7d98376fce96514afcd73c3f20a8d1fe01520899ff69a73d69" +UPSTREAM_CHECK_URI = "https://atoptool.nl/downloadatop.php" +UPSTREAM_CHECK_REGEX = "(?P\d+(\.\d+)+).tar" + CVE_STATUS[CVE-2011-3618] = "fixed-version: The CPE in the NVD database doesn't reflect correctly the vulnerable versions." do_compile() { @@ -35,12 +38,12 @@ do_install() { make DESTDIR=${D} VERS=${PV} SYSDPATH=${systemd_system_unitdir} \ PMPATHD=${systemd_unitdir}/system-sleep systemdinstall install -d ${D}${sysconfdir}/tmpfiles.d - install -m 644 ${WORKDIR}/volatiles.atop.conf ${D}${sysconfdir}/tmpfiles.d/atop.conf + install -m 644 ${UNPACKDIR}/volatiles.atop.conf ${D}${sysconfdir}/tmpfiles.d/atop.conf rm -f ${D}${systemd_system_unitdir}/atopacct.service else make DESTDIR=${D} VERS=${PV} sysvinstall install -d ${D}${sysconfdir}/default/volatiles - install -m 644 ${WORKDIR}/volatiles.99_atop ${D}${sysconfdir}/default/volatiles/99_atop + install -m 644 ${UNPACKDIR}/volatiles.99_atop ${D}${sysconfdir}/default/volatiles/99_atop rm -f ${D}${sysconfdir}/init.d/atopacct fi diff --git a/sources/meta-openembedded/meta-oe/recipes-support/avro/avro-c++_1.11.3.bb b/sources/meta-openembedded/meta-oe/recipes-support/avro/avro-c++_1.11.3.bb index 6ec25bdd..0ac1decc 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/avro/avro-c++_1.11.3.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/avro/avro-c++_1.11.3.bb @@ -20,3 +20,8 @@ S = "${WORKDIR}/git/lang/c++" inherit cmake pkgconfig BBCLASSEXTEND = "native nativesdk" + +# http://errors.yoctoproject.org/Errors/Details/766913/ +# avro-c++/1.11.3/git/lang/c++/impl/Compiler.cc:304:18: error: possibly dangling reference to a temporary [-Werror=dangling-reference] +# avro-c++/1.11.3/git/lang/c++/impl/Compiler.cc:370:18: error: possibly dangling reference to a temporary [-Werror=dangling-reference] +CXXFLAGS += "-Wno-error=dangling-reference" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/avro/avro-c_1.11.3.bb b/sources/meta-openembedded/meta-oe/recipes-support/avro/avro-c_1.11.3.bb index bb7f53e4..bf84242e 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/avro/avro-c_1.11.3.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/avro/avro-c_1.11.3.bb @@ -15,3 +15,9 @@ SRC_URI = "git://github.com/apache/avro;branch=${BRANCH};protocol=https \ S = "${WORKDIR}/git/lang/c" inherit cmake pkgconfig + +# http://errors.yoctoproject.org/Errors/Details/766902/ +# avro-c/1.11.3/git/lang/c/examples/quickstop.c:123:61: error: passing argument 3 of 'first_value.iface->get_string' from incompatible pointer type [-Wincompatible-pointer-types] +# avro-c/1.11.3/git/lang/c/examples/quickstop.c:127:60: error: passing argument 3 of 'last_value.iface->get_string' from incompatible pointer type [-Wincompatible-pointer-types] +# avro-c/1.11.3/git/lang/c/examples/quickstop.c:131:61: error: passing argument 3 of 'phone_value.iface->get_string' from incompatible pointer type [-Wincompatible-pointer-types] +CFLAGS += "-Wno-error=incompatible-pointer-types" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/bdwgc/bdwgc_8.2.6.bb b/sources/meta-openembedded/meta-oe/recipes-support/bdwgc/bdwgc_8.2.6.bb deleted file mode 100644 index a5a7a636..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/bdwgc/bdwgc_8.2.6.bb +++ /dev/null @@ -1,37 +0,0 @@ -SUMMARY = "A garbage collector for C and C++" - -DESCRIPTION = "The Boehm-Demers-Weiser conservative garbage collector can be\ - used as a garbage collecting replacement for C malloc or C++ new. It allows\ - you to allocate memory basically as you normally would, without explicitly\ - deallocating memory that is no longer useful. The collector automatically\ - recycles memory when it determines that it can no longer be otherwise\ - accessed.\ - The collector is also used by a number of programming language\ - implementations that either use C as intermediate code, want to facilitate\ - easier interoperation with C libraries, or just prefer the simple collector\ - interface.\ - Alternatively, the garbage collector may be used as a leak detector for C\ - or C++ programs, though that is not its primary goal.\ - Empirically, this collector works with most unmodified C programs, simply\ - by replacing malloc with GC_malloc calls, replacing realloc with GC_realloc\ - calls, and removing free calls." - -HOMEPAGE = "https://www.hboehm.info/gc/" -SECTION = "devel" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://README.QUICK;md5=dd27361ad00943bb27bc3e0589037075" - -DEPENDS = "libatomic-ops" - -SRCREV = "e340b2e869e02718de9c9d7fa440ef4b35785388" -SRC_URI = "git://github.com/ivmai/bdwgc.git;branch=release-8_2;protocol=https" - -S = "${WORKDIR}/git" - -inherit autotools pkgconfig - -EXTRA_OECONF += "--enable-cplusplus" - -FILES:${PN}-doc = "${datadir}" - -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/bdwgc/bdwgc_8.2.8.bb b/sources/meta-openembedded/meta-oe/recipes-support/bdwgc/bdwgc_8.2.8.bb new file mode 100644 index 00000000..fe51c102 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/bdwgc/bdwgc_8.2.8.bb @@ -0,0 +1,37 @@ +SUMMARY = "A garbage collector for C and C++" + +DESCRIPTION = "The Boehm-Demers-Weiser conservative garbage collector can be\ + used as a garbage collecting replacement for C malloc or C++ new. It allows\ + you to allocate memory basically as you normally would, without explicitly\ + deallocating memory that is no longer useful. The collector automatically\ + recycles memory when it determines that it can no longer be otherwise\ + accessed.\ + The collector is also used by a number of programming language\ + implementations that either use C as intermediate code, want to facilitate\ + easier interoperation with C libraries, or just prefer the simple collector\ + interface.\ + Alternatively, the garbage collector may be used as a leak detector for C\ + or C++ programs, though that is not its primary goal.\ + Empirically, this collector works with most unmodified C programs, simply\ + by replacing malloc with GC_malloc calls, replacing realloc with GC_realloc\ + calls, and removing free calls." + +HOMEPAGE = "https://www.hboehm.info/gc/" +SECTION = "devel" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://README.QUICK;md5=dd27361ad00943bb27bc3e0589037075" + +DEPENDS = "libatomic-ops" + +SRCREV = "ee59af3722e56de8404de6cd0c21c2493cc4d855" +SRC_URI = "git://github.com/ivmai/bdwgc.git;branch=release-8_2;protocol=https" + +S = "${WORKDIR}/git" + +inherit autotools pkgconfig + +EXTRA_OECONF += "--enable-cplusplus" + +FILES:${PN}-doc = "${datadir}" + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/c-ares/c-ares_1.27.0.bb b/sources/meta-openembedded/meta-oe/recipes-support/c-ares/c-ares_1.27.0.bb index f6de2810..ddd081e1 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/c-ares/c-ares_1.27.0.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/c-ares/c-ares_1.27.0.bb @@ -20,7 +20,7 @@ EXTRA_OECMAKE = "-DCARES_STATIC=${@ 'ON' if d.getVar('DISABLE_STATIC') == '' els do_install_ptest () { install -d ${D}${PTEST_PATH} install -m 0755 ${B}/bin/arestest ${D}${PTEST_PATH} - install -m 0755 ${WORKDIR}/run-ptest ${D}${PTEST_PATH} + install -m 0755 ${UNPACKDIR}/run-ptest ${D}${PTEST_PATH} } PACKAGE_BEFORE_PN = "${PN}-utils" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/cabextract/cabextract/fix-fnmatch.patch b/sources/meta-openembedded/meta-oe/recipes-support/cabextract/cabextract/fix-fnmatch.patch new file mode 100644 index 00000000..bd486283 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/cabextract/cabextract/fix-fnmatch.patch @@ -0,0 +1,40 @@ +From - Mon Jun 11 00:00:00 2024 +From: Dmitry Baryshkov +Subject: [PATCH] Don't play with fnmatch.c replacement + +Currently fnmatch.c, even if it is selected, conditionally disables compilation +of fnmatch() funciton even though the rest of the code expects to get it (e.g. +because Autoconf didn't detect the working implementation and enabled fnmatch.c +to replace it). Drop the extra conditionals, to fix Autoconf magic. + +Observed error: + +ld: src/cabextract.o: in function `process_cabinet': +/usr/src/debug/cabextract/1.11/src/cabextract.c:499:(.text.startup+0xf1c): undefined reference to `rpl_fnmatch' +collect2: error: ld returned 1 exit status + +Upstream-Status: Submitted [https://github.com/kyz/libmspack/pull/51] +Signed-off-by: Dmitry Baryshkov + +Index: cabextract-1.11/fnmatch.c +=================================================================== +--- cabextract-1.11.orig/fnmatch.c ++++ cabextract-1.11/fnmatch.c +@@ -49,11 +49,6 @@ static const char rcsid[] = + it is simpler to just do this in the source for each such file. + */ + +-#if defined (_LIBC) || !defined (__GNU_LIBRARY__) +- +-#if !defined(__GNU_LIBRARY__) && !defined(STDC_HEADERS) +-#endif +- + /* Match STRING against the filename pattern PATTERN, returning zero if + it matches, nonzero if not. */ + int +@@ -216,5 +211,3 @@ int flags; + + return FNM_NOMATCH; + } +- +-#endif /* _LIBC or not __GNU_LIBRARY__. */ diff --git a/sources/meta-openembedded/meta-oe/recipes-support/cabextract/cabextract_1.11.bb b/sources/meta-openembedded/meta-oe/recipes-support/cabextract/cabextract_1.11.bb new file mode 100644 index 00000000..0f06489c --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/cabextract/cabextract_1.11.bb @@ -0,0 +1,22 @@ +SUMMARY = "Software for extracting Microsoft cabinet files" +DESCRIPTION = "tool for extracting Microsoft cabinet files" +HOMEPAGE = "http://www.cabextract.org.uk/" +SECTION = "console/utils" + +LICENSE = "GPL-3.0-or-later" +LIC_FILES_CHKSUM = "file://src/cabextract.c;beginline=4;endline=11;md5=b0a10c6d3843f262114e7ecf91fc7e78" + +SRC_URI = "\ + https://www.cabextract.org.uk/cabextract-${PV}.tar.gz \ + file://fix-fnmatch.patch \ +" + +SRC_URI[sha256sum] = "b5546db1155e4c718ff3d4b278573604f30dd64c3c5bfd4657cd089b823a3ac6" + +DEPENDS = "libmspack" + +EXTRA_OECONF = "--with-external-libmspack" + +inherit autotools pkgconfig + +BBCLASSEXTEND += "native nativesdk" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/cabextract/libmspack_0.11alpha.bb b/sources/meta-openembedded/meta-oe/recipes-support/cabextract/libmspack_0.11alpha.bb new file mode 100644 index 00000000..169a5f27 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/cabextract/libmspack_0.11alpha.bb @@ -0,0 +1,16 @@ +SUMMARY = "A library for Microsoft compression formats" +DESCRIPTION = "The library provides compressors and decompressors,\ +archivers and dearchivers for Microsoft compression formats: CAB, CHM, WIM,\ +LIT, HLP, KWAJ and SZDD." +HOMEPAGE = "http://www.cabextract.org.uk/libmspack/" +SECTION = "lib" +LICENSE = "LGPL-2.1-only" + +LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=7fbc338309ac38fefcd64b04bb903e34" + +SRC_URI = "https://www.cabextract.org.uk/libmspack/libmspack-${PV}.tar.gz" +SRC_URI[sha256sum] = "70dd1fb2f0aecc36791b71a1e1840e62173079eadaa081192d1c323a0eeea21b" + +inherit autotools + +BBCLASSEXTEND += "native nativesdk" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/ckermit/ckermit_302.bb b/sources/meta-openembedded/meta-oe/recipes-support/ckermit/ckermit_302.bb index 53f2b9d2..e32aba93 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/ckermit/ckermit_302.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/ckermit/ckermit_302.bb @@ -14,6 +14,8 @@ SRC_URI = "http://www.kermitproject.org/ftp/kermit/archives/cku${PV}.tar.gz;subd SRC_URI[md5sum] = "eac4dbf18b45775e4cdee5a7c74762b0" SRC_URI[sha256sum] = "0d5f2cd12bdab9401b4c836854ebbf241675051875557783c332a6a40dac0711" +UPSTREAM_CHECK_URI = "https://www.kermitproject.org/ck90.html" +UPSTREAM_CHECK_REGEX = "cku(?P\d+)\.tar" export CC2 = "${CC}" export BINDIR = "${bindir}" @@ -45,7 +47,7 @@ do_compile () { -DNORESEND -DNOAUTODL -DNOSTREAMING -DNOHINTS -DNOCKXYZ -DNOLEARN \ -DNOMKDIR -DNOPERMS -DNOCKTIMERS -DNOCKREGEX -DNOREALPATH \ -DCK_SMALL -DNOLOGDIAL -DNORENAME -DNOWHATAMI \ - -DNOARROWKEYS" + -DNOARROWKEYS -DMAINTYPE=int" } do_install () { @@ -55,3 +57,11 @@ do_install () { rm ${D}${BINDIR}/kermit-sshsub (cd ${D}${BINDIR} && ln -s ${BINDIR}/kermit kermit-sshusb) } + +# This one is reproducible only on 32bit MACHINEs +# http://errors.yoctoproject.org/Errors/Details/766966/ +# ckutio.c:12057:10: error: passing argument 1 of 'time' from incompatible pointer type [-Wincompatible-pointer-types] +# ckutio.c:12058:20: error: passing argument 1 of 'localtime' from incompatible pointer type [-Wincompatible-pointer-types] +# ckufio.c:5043:32: error: passing argument 1 of 'localtime' from incompatible pointer type [-Wincompatible-pointer-types] +# ckufio.c:5263:32: error: passing argument 1 of 'localtime' from incompatible pointer type [-Wincompatible-pointer-types] +CFLAGS += "-Wno-error=incompatible-pointer-types" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/cmark/cmark_0.31.0.bb b/sources/meta-openembedded/meta-oe/recipes-support/cmark/cmark_0.31.0.bb deleted file mode 100644 index ce8b4cd4..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/cmark/cmark_0.31.0.bb +++ /dev/null @@ -1,15 +0,0 @@ -SUMMARY = "CommonMark parsing and rendering library and program in C" -HOMEPAGE = "https://github.com/commonmark/cmark" -LICENSE = "BSD-2-Clause & MIT" -LIC_FILES_CHKSUM = "file://COPYING;md5=81f9cae6293cc0345a9144b78152ab62" - -SRC_URI = "git://github.com/commonmark/cmark.git;branch=master;protocol=https" -SRCREV = "8fbf029685482827828b5858444157052f1b0a5f" -S = "${WORKDIR}/git" - -inherit cmake lib_package - -EXTRA_OECMAKE += " \ - -DCMARK_TESTS=OFF \ - -DCMARK_STATIC=OFF \ -" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/cmark/cmark_0.31.1.bb b/sources/meta-openembedded/meta-oe/recipes-support/cmark/cmark_0.31.1.bb new file mode 100644 index 00000000..1edb95e4 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/cmark/cmark_0.31.1.bb @@ -0,0 +1,15 @@ +SUMMARY = "CommonMark parsing and rendering library and program in C" +HOMEPAGE = "https://github.com/commonmark/cmark" +LICENSE = "BSD-2-Clause & MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=81f9cae6293cc0345a9144b78152ab62" + +SRC_URI = "git://github.com/commonmark/cmark.git;branch=master;protocol=https" +SRCREV = "bb3678d7a73cb02d35c8876ecd097072636200a8" +S = "${WORKDIR}/git" + +inherit cmake lib_package + +EXTRA_OECMAKE += " \ + -DCMARK_TESTS=OFF \ + -DCMARK_STATIC=OFF \ +" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/colord/colord-native/0001-Move-the-function-cd_icc_create_from_edid-to-avoid-u.patch b/sources/meta-openembedded/meta-oe/recipes-support/colord/colord-native/0001-Move-the-function-cd_icc_create_from_edid-to-avoid-u.patch index aae2be8c..a120b731 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/colord/colord-native/0001-Move-the-function-cd_icc_create_from_edid-to-avoid-u.patch +++ b/sources/meta-openembedded/meta-oe/recipes-support/colord/colord-native/0001-Move-the-function-cd_icc_create_from_edid-to-avoid-u.patch @@ -1,4 +1,4 @@ -From cbb8f5c05fce1d56ae2e5fa9f57fc49c47bed5ab Mon Sep 17 00:00:00 2001 +From d16aed3118bee1e0a7d0bc9e0f34c427a405a6d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Sun, 12 May 2019 21:58:02 +0200 Subject: [PATCH] Move the function cd_icc_create_from_edid to avoid udev @@ -89,10 +89,10 @@ index a5e2328..dec509a 100644 +} + diff --git a/lib/colord/cd-icc.c b/lib/colord/cd-icc.c -index 8beec43..398ff7a 100644 +index 3937d8a..daf6f4d 100644 --- a/lib/colord/cd-icc.c +++ b/lib/colord/cd-icc.c -@@ -3114,68 +3114,6 @@ cd_icc_create_default (CdIcc *icc, GError **error) +@@ -3117,68 +3117,6 @@ cd_icc_create_default (CdIcc *icc, GError **error) return cd_icc_create_default_full (icc, CD_ICC_LOAD_FLAGS_NONE, error); } @@ -161,6 +161,3 @@ index 8beec43..398ff7a 100644 /** * cd_icc_create_from_edid: * @icc: A valid #CdIcc --- -2.20.1 - diff --git a/sources/meta-openembedded/meta-oe/recipes-support/colord/colord.bb b/sources/meta-openembedded/meta-oe/recipes-support/colord/colord.bb index e3002225..6eb9db8d 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/colord/colord.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/colord/colord.bb @@ -1,28 +1,33 @@ require ${BPN}.inc -inherit meson gobject-introspection gsettings gettext bash-completion systemd features_check useradd pkgconfig +inherit meson gobject-introspection gsettings gtk-doc gettext bash-completion systemd features_check useradd pkgconfig # polkit and gobject-introspection are mandatory and cannot be configured REQUIRED_DISTRO_FEATURES = "polkit gobject-introspection-data" GIR_MESON_OPTION = "" DEPENDS += " \ - ${BPN}-native \ - glib-2.0 \ - lcms \ - sqlite3 \ - libgusb \ - libgudev \ - polkit \ + ${BPN}-native \ + dbus \ + glib-2.0 \ + lcms \ + libgudev \ + libgusb \ + polkit \ + sqlite3 \ " +RDEPENDS:${PN} += "hwdata" + SRC_URI += " \ - file://0001-Run-native-cd_idt8-cd_create_profile.patch \ + file://0001-Run-native-cd_idt8-cd_create_profile.patch \ + file://08a32b2379fb5582f4312e59bf51a2823df56276.patch \ " -EXTRA_OEMESON = " \ - -Dman=false \ - -Ddocs=false \ +EXTRA_OEMESON += " \ + -Dman=false \ + -Ddaemon_user=colord \ + -Dpnp_ids=${datadir}/hwdata/pnp.ids \ " PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" @@ -42,4 +47,5 @@ FILES:${PN} += " \ " USERADD_PACKAGES = "${PN}" -USERADD_PARAM:${PN} = "--system --user-group -d /var/lib/colord -s /bin/false colord" +USERADD_PARAM:${PN} = "--system --user-group -s /bin/false colord" + diff --git a/sources/meta-openembedded/meta-oe/recipes-support/colord/colord.inc b/sources/meta-openembedded/meta-oe/recipes-support/colord/colord.inc index 0ae1a30f..cafbaaa6 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/colord/colord.inc +++ b/sources/meta-openembedded/meta-oe/recipes-support/colord/colord.inc @@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = " \ file://meson.build;beginline=3;endline=3;md5=f42198707d793be58b274d34fd5238c3 \ " -PV = "1.4.6" +PV = "1.4.7" SRC_URI = "https://www.freedesktop.org/software/colord/releases/${BPN}-${PV}.tar.xz" -SRC_URI[sha256sum] = "7407631a27bfe5d1b672e7ae42777001c105d860b7b7392283c8c6300de88e6f" +SRC_URI[sha256sum] = "de02d9910634ae159547585cec414e450f711c27235453b4f9b38a9f2361a653" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/colord/colord/08a32b2379fb5582f4312e59bf51a2823df56276.patch b/sources/meta-openembedded/meta-oe/recipes-support/colord/colord/08a32b2379fb5582f4312e59bf51a2823df56276.patch new file mode 100644 index 00000000..860e6ab4 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/colord/colord/08a32b2379fb5582f4312e59bf51a2823df56276.patch @@ -0,0 +1,28 @@ +From 08a32b2379fb5582f4312e59bf51a2823df56276 Mon Sep 17 00:00:00 2001 +From: Richard Hughes +Date: Mon, 29 Jan 2024 10:37:11 +0000 +Subject: [PATCH] Fix writing to the database with ProtectSystem=strict + +Fixes https://github.com/hughsie/colord/issues/166 + +Upstream-Status: Backport [https://github.com/hughsie/colord/commit/08a32b2379fb5582f4312e59bf51a2823df56276] +Signed-off-by: Markus Volk +--- + data/colord.service.in | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/data/colord.service.in b/data/colord.service.in +index 6825d944..c358dc4b 100644 +--- a/data/colord.service.in ++++ b/data/colord.service.in +@@ -17,6 +17,10 @@ ProtectControlGroups=true + RestrictRealtime=true + RestrictAddressFamilies=AF_UNIX + ++ConfigurationDirectory=colord ++StateDirectory=colord ++CacheDirectory=colord ++ + # drop all capabilities + CapabilityBoundingSet=~CAP_SETUID CAP_SETGID CAP_SETPCAP CAP_SYS_ADMIN CAP_SYS_PTRACE CAP_CHOWN CAP_FSETID CAP_SETFCAP CAP_DAC_OVERRIDE CAP_DAC_READ_SEARCH CAP_FOWNER CAP_IPC_OWNER CAP_NET_ADMIN CAP_SYS_RAWIO CAP_SYS_TIME CAP_AUDIT_CONTROL CAP_AUDIT_READ CAP_AUDIT_WRITE CAP_KILL CAP_MKNOD CAP_NET_BIND_SERVICE CAP_NET_BROADCAST CAP_NET_RAW CAP_SYS_NICE CAP_SYS_RESOURCE CAP_MAC_ADMIN CAP_MAC_OVERRIDE CAP_SYS_BOOT CAP_LINUX_IMMUTABLE CAP_IPC_LOCK CAP_SYS_CHROOT CAP_BLOCK_SUSPEND CAP_LEASE CAP_SYS_PACCT CAP_SYS_TTY_CONFIG CAP_WAKE_ALARM + diff --git a/sources/meta-openembedded/meta-oe/recipes-support/composefs/composefs_1.0.5.bb b/sources/meta-openembedded/meta-oe/recipes-support/composefs/composefs_1.0.5.bb new file mode 100644 index 00000000..14133fdc --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/composefs/composefs_1.0.5.bb @@ -0,0 +1,30 @@ +SUMMARY = "Tools to handle creating and mounting composefs images" +DESCRIPTION = "The composefs project combines several underlying Linux \ +features to provide a very flexible mechanism to support read-only mountable \ +filesystem trees, stacking on top of an underlying "lower" Linux filesystem." +HOMEPAGE = "https://github.com/containers/composefs" +LICENSE = "GPL-3.0-or-later & LGPL-2.0-or-later & Apache-2.0" +LIC_FILES_CHKSUM = "\ + file://BSD-2-Clause.txt;md5=121c8a0a8fa5961a26b7863034ebcce8 \ + file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://COPYING.LESSERv3;md5=6a6a8e020838b23406c81b19c1d46df6 \ + file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \ + file://COPYINGv3;md5=d32239bcb673463ab874e80d47fae504 \ + file://LICENSE.Apache-2.0;md5=3b83ef96387f14655fc854ddc3c6bd57 \ +" + +SRCREV = "098d985a1b9a15ac828d7b2382297a6955e31e40" +SRC_URI = "git://github.com/containers/composefs.git;protocol=https;branch=main" + +S = "${WORKDIR}/git" + +inherit meson + +DEPENDS = "openssl" + +EXTRA_OEMESON += " \ + -Dman=disabled \ + -Dfuse=disabled \ +" + +BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/crucible/crucible_2023.11.02.bb b/sources/meta-openembedded/meta-oe/recipes-support/crucible/crucible_2023.11.02.bb index d53e1a27..4247263b 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/crucible/crucible_2023.11.02.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/crucible/crucible_2023.11.02.bb @@ -3,7 +3,7 @@ LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://src/${GO_IMPORT}/LICENSE;md5=201414b6610203caed355323b1ab3116" GO_IMPORT = "github.com/usbarmory/crucible" -SRC_URI = "git://${GO_IMPORT}.git;protocol=https;branch=master" +SRC_URI = "git://${GO_IMPORT}.git;protocol=https;branch=master;destsuffix=${GO_SRCURI_DESTSUFFIX}" GO_INSTALL = "\ ${GO_IMPORT}/cmd/crucible \ diff --git a/sources/meta-openembedded/meta-oe/recipes-support/ctapi-common/ctapi-common_1.1-14.bb b/sources/meta-openembedded/meta-oe/recipes-support/ctapi-common/ctapi-common_1.1-14.bb index 0e994d8b..ece30a59 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/ctapi-common/ctapi-common_1.1-14.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/ctapi-common/ctapi-common_1.1-14.bb @@ -2,15 +2,18 @@ SUMMARY = "Common files and packaging infrastructure for CT-API modules" HOMEPAGE = "http://fedoraproject.org/" SECTION = "System Environment/Libraries" LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://../ctapi-common.LICENSE;md5=8744cd52545ecb45befebd0da6f70f0a" +LIC_FILES_CHKSUM = "file://${UNPACKDIR}/ctapi-common.LICENSE;md5=8744cd52545ecb45befebd0da6f70f0a" SRC_URI = "https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/23/Everything/source/SRPMS/c/${BPN}-${PV}.fc23.src.rpm;extract=ctapi-common.LICENSE \ https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/23/Everything/source/SRPMS/c/${BPN}-${PV}.fc23.src.rpm;extract=ctapi-common.README" SRC_URI[sha256sum] = "87a74eb0a66055c34ba2c5c919e74f3211c5950ae1c2cbab967fdf4137f5de91" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" + do_compile() { - install -pm 644 ${WORKDIR}/ctapi-common.LICENSE LICENSE - install -pm 644 ${WORKDIR}/ctapi-common.README README + install -pm 644 ${UNPACKDIR}/ctapi-common.LICENSE LICENSE + install -pm 644 ${UNPACKDIR}/ctapi-common.README README echo ${libdir}/ctapi > ctapi.conf } diff --git a/sources/meta-openembedded/meta-oe/recipes-support/daemontools/daemontools_0.76.bb b/sources/meta-openembedded/meta-oe/recipes-support/daemontools/daemontools_0.76.bb index a35b54e3..6561a4ae 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/daemontools/daemontools_0.76.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/daemontools/daemontools_0.76.bb @@ -29,6 +29,8 @@ SRC_URI = "http://cr.yp.to/daemontools/${BPN}-${PV}.tar.gz \ SRC_URI[md5sum] = "1871af2453d6e464034968a0fbcb2bfc" SRC_URI[sha256sum] = "a55535012b2be7a52dcd9eccabb9a198b13be50d0384143bd3b32b8710df4c1f" +UPSTREAM_CHECK_URI = "http://cr.yp.to/daemontools/install.html" + S = "${WORKDIR}/admin/${BP}" do_compile() { @@ -46,3 +48,10 @@ do_install:append:class-target() { inherit update-alternatives ALTERNATIVE_PRIORITY = "100" ALTERNATIVE:${PN} = "svc svok" + +# http://errors.yoctoproject.org/Errors/Details/766886/ +# pathexec_run.c:19:17: error: passing argument 2 of 'execve' from incompatible pointer type [-Wincompatible-pointer-types] +# pathexec_run.c:19:22: error: passing argument 3 of 'execve' from incompatible pointer type [-Wincompatible-pointer-types] +# pathexec_run.c:36:18: error: passing argument 2 of 'execve' from incompatible pointer type [-Wincompatible-pointer-types] +# pathexec_run.c:36:23: error: passing argument 3 of 'execve' from incompatible pointer type [-Wincompatible-pointer-types] +CC += "-Wno-error=incompatible-pointer-types" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/devmem2/devmem2_2.0.bb b/sources/meta-openembedded/meta-oe/recipes-support/devmem2/devmem2_2.0.bb index aee6bfe3..5d2e8463 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/devmem2/devmem2_2.0.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/devmem2/devmem2_2.0.bb @@ -5,6 +5,9 @@ LIC_FILES_CHKSUM = "file://devmem2.c;endline=38;md5=a9eb9f3890384519f435aedf9862 SRC_URI = "git://github.com/denix0/devmem2.git;protocol=https;branch=main" SRCREV = "5b395a946894eb4f4ef5d07c80a50a88573a541e" +# Upstream repo does not tag +UPSTREAM_CHECK_COMMITS = "1" + S = "${WORKDIR}/git" CFLAGS += "-DFORCE_STRICT_ALIGNMENT" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/dfu-util/dfu-util_0.11.bb b/sources/meta-openembedded/meta-oe/recipes-support/dfu-util/dfu-util_0.11.bb index 17547ca8..23913e31 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/dfu-util/dfu-util_0.11.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/dfu-util/dfu-util_0.11.bb @@ -9,3 +9,5 @@ SRC_URI = "http://dfu-util.sourceforge.net/releases/${BP}.tar.gz" SRC_URI[sha256sum] = "b4b53ba21a82ef7e3d4c47df2952adf5fa494f499b6b0b57c58c5d04ae8ff19e" inherit autotools pkgconfig + +BBCLASSEXTEND = "nativesdk" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/dool/dool_1.3.1.bb b/sources/meta-openembedded/meta-oe/recipes-support/dool/dool_1.3.1.bb deleted file mode 100644 index b20f8b40..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/dool/dool_1.3.1.bb +++ /dev/null @@ -1,23 +0,0 @@ -SUMMARY = "Dool is a Python3 compatible fork of Dstat" -DESCRIPTION = "Dool is a command line tool to monitor many aspects of your system: \ -CPU, Memory, Network, Load Average, etc. It also includes a robust plug-in architecture \ -to allow monitoring other system metrics." -HOMEPAGE = "http://dag.wiee.rs/home-made/dstat" -LICENSE = "GPL-3.0-only" -LIC_FILES_CHKSUM = "file://LICENSE;md5=1ebbd3e34237af26da5dc08a4e440464" - -DEPENDS += "asciidoc-native xmlto-native" -RDEPENDS:${PN} += "python3-core python3-misc python3-resource python3-shell python3-six python3-unixadmin" - -SRC_URI = "git://github.com/scottchiefbaker/dool.git;branch=master;protocol=https \ - " - -SRCREV = "30847c748483bc088549486292232d805b086b1f" - -S = "${WORKDIR}/git" - -do_install() { - oe_runmake 'DESTDIR=${D}' install -} - - diff --git a/sources/meta-openembedded/meta-oe/recipes-support/dool/dool_1.3.2.bb b/sources/meta-openembedded/meta-oe/recipes-support/dool/dool_1.3.2.bb new file mode 100644 index 00000000..f7e40301 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/dool/dool_1.3.2.bb @@ -0,0 +1,23 @@ +SUMMARY = "Dool is a Python3 compatible fork of Dstat" +DESCRIPTION = "Dool is a command line tool to monitor many aspects of your system: \ +CPU, Memory, Network, Load Average, etc. It also includes a robust plug-in architecture \ +to allow monitoring other system metrics." +HOMEPAGE = "http://dag.wiee.rs/home-made/dstat" +LICENSE = "GPL-3.0-only" +LIC_FILES_CHKSUM = "file://LICENSE;md5=1ebbd3e34237af26da5dc08a4e440464" + +DEPENDS += "asciidoc-native xmlto-native" +RDEPENDS:${PN} += "python3-core python3-misc python3-resource python3-shell python3-six python3-unixadmin" + +SRC_URI = "git://github.com/scottchiefbaker/dool.git;branch=master;protocol=https \ + " + +SRCREV = "b2862905be841232c9e36ce1e059d3fe34ef0cdf" + +S = "${WORKDIR}/git" + +do_install() { + oe_runmake 'DESTDIR=${D}' install +} + + diff --git a/sources/meta-openembedded/meta-oe/recipes-support/edid-decode/edid-decode_git.bb b/sources/meta-openembedded/meta-oe/recipes-support/edid-decode/edid-decode_git.bb index 6eaec800..37fe0e1b 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/edid-decode/edid-decode_git.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/edid-decode/edid-decode_git.bb @@ -9,6 +9,10 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=2ef696d66c156139232201f223c22592" SRC_URI= "git://git.linuxtv.org/edid-decode.git;protocol=https;branch=master" SRCREV = "5920bf2a756b2f748c49ff6a08b9f421026473c5" PV = "0.0+git" + +# Upstream repo does not tag +UPSTREAM_CHECK_COMMITS = "1" + S = "${WORKDIR}/git" do_install() { diff --git a/sources/meta-openembedded/meta-oe/recipes-support/eject/eject_2.1.5.bb b/sources/meta-openembedded/meta-oe/recipes-support/eject/eject_2.1.5.bb index 953c2e54..dd5489e7 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/eject/eject_2.1.5.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/eject/eject_2.1.5.bb @@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b" inherit autotools gettext update-alternatives -SRC_URI = "https://downloads.yoctoproject.org/mirror/sources/${BP}.tar.gz \ +SRC_URI = "http://sources.openembedded.org/${BP}.tar.gz \ file://eject-2.1.5-error-return.patch \ file://eject-2.1.1-verbose.patch \ file://eject-2.1.5-spaces.patch \ diff --git a/sources/meta-openembedded/meta-oe/recipes-support/fbset/fbset-modes.bb b/sources/meta-openembedded/meta-oe/recipes-support/fbset/fbset-modes.bb index aa5f631c..fcaf3179 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/fbset/fbset-modes.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/fbset/fbset-modes.bb @@ -6,11 +6,13 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384 PV = "0.1.0" SRC_URI = "file://fb.modes" -S = "${WORKDIR}" + +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" do_install() { install -d ${D}${sysconfdir} - install -m 0644 ${WORKDIR}/fb.modes ${D}${sysconfdir} + install -m 0644 ${UNPACKDIR}/fb.modes ${D}${sysconfdir} } # fb.modes file is MACHINE_ARCH, base.bbclass correctly changes it to MACHINE_ARCH, but too late for allarch.bbclass diff --git a/sources/meta-openembedded/meta-oe/recipes-support/fftw/fftw_3.3.10.bb b/sources/meta-openembedded/meta-oe/recipes-support/fftw/fftw_3.3.10.bb index af7117da..52122b9c 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/fftw/fftw_3.3.10.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/fftw/fftw_3.3.10.bb @@ -11,6 +11,8 @@ SRC_URI = " \ " SRC_URI[sha256sum] = "56c932549852cddcfafdab3820b0200c7742675be92179e59e6215b340e26467" +UPSTREAM_CHECK_URI = "http://www.fftw.org/download.html" + inherit autotools pkgconfig ptest # we had multiple recipes in the past diff --git a/sources/meta-openembedded/meta-oe/recipes-support/fltk/fltk-native.bb b/sources/meta-openembedded/meta-oe/recipes-support/fltk/fltk-native.bb index 3e8e2cdf..322a2843 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/fltk/fltk-native.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/fltk/fltk-native.bb @@ -4,6 +4,8 @@ DEPENDS = "zlib-native jpeg-native libpng-native libxext-native libxft-native" SRC_URI += "file://fltk-native-link-libdl.patch" +UPSTREAM_CHECK_URI = "https://www.fltk.org/software.php" + inherit native EXTRA_OECMAKE += " \ diff --git a/sources/meta-openembedded/meta-oe/recipes-support/fltk/fltk.bb b/sources/meta-openembedded/meta-oe/recipes-support/fltk/fltk.bb index 82007c4c..4278a2fa 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/fltk/fltk.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/fltk/fltk.bb @@ -7,6 +7,8 @@ REQUIRED_DISTRO_FEATURES = "x11" SRC_URI += "file://0003-fluid-CMakeLists.txt-Do-not-export-fluid-target.patch" +UPSTREAM_CHECK_URI = "https://www.fltk.org/software.php" + EXTRA_OECMAKE = " \ -DOPTION_BUILD_SHARED_LIBS=ON \ -DOPTION_USE_THREADS=ON \ diff --git a/sources/meta-openembedded/meta-oe/recipes-support/fltk/fltk.inc b/sources/meta-openembedded/meta-oe/recipes-support/fltk/fltk.inc index b1bc8357..0b292109 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/fltk/fltk.inc +++ b/sources/meta-openembedded/meta-oe/recipes-support/fltk/fltk.inc @@ -11,8 +11,8 @@ SRC_URI = " \ file://0002-always-build-fluid-and-export-pointers.patch \ " -PV = "1.3.8" -SRC_URI[sha256sum] = "1d9832409fc08c908c64ab40ad9fd8b0e8af5d203651eb9690b810f41e2f412d" +PV = "1.3.9" +SRC_URI[sha256sum] = "103441134915402808fd45424d4061778609437e804334434e946cfd26b196c2" inherit cmake pkgconfig diff --git a/sources/meta-openembedded/meta-oe/recipes-support/fltk/fltk/0001-Fl_Preferences.cxx-do-not-use-dlopen-in-case-glibc-s.patch b/sources/meta-openembedded/meta-oe/recipes-support/fltk/fltk/0001-Fl_Preferences.cxx-do-not-use-dlopen-in-case-glibc-s.patch index d1cbb354..0d47dac2 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/fltk/fltk/0001-Fl_Preferences.cxx-do-not-use-dlopen-in-case-glibc-s.patch +++ b/sources/meta-openembedded/meta-oe/recipes-support/fltk/fltk/0001-Fl_Preferences.cxx-do-not-use-dlopen-in-case-glibc-s.patch @@ -16,10 +16,10 @@ Content-Transfer-Encoding: 8bit | ^ | src/CMakeFiles/fltk.dir/build.make:1217: recipe for target 'src/CMakeFiles/fltk.dir/Fl_Preferences.cxx.o' failed -Signed-off-by: Andreas Müller ---- Upstream-Status: Pending +Signed-off-by: Andreas Müller +--- src/Fl_Preferences.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/meta-openembedded/meta-oe/recipes-support/fmt/fmt_10.2.1.bb b/sources/meta-openembedded/meta-oe/recipes-support/fmt/fmt_10.2.1.bb deleted file mode 100644 index 1437eb48..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/fmt/fmt_10.2.1.bb +++ /dev/null @@ -1,16 +0,0 @@ -SUMMARY = "open-source formatting library for C++" -DESCRIPTION = "{fmt} is an open-source formatting library for C++. It can be used as a safe and fast alternative to (s)printf and iostreams." -HOMEPAGE = "https://fmt.dev" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=b9257785fc4f3803a4b71b76c1412729" - -SRC_URI = "git://github.com/fmtlib/fmt;branch=10.x;protocol=https" -SRCREV = "e69e5f977d458f2650bb346dadf2ad30c5320281" - -S = "${WORKDIR}/git" - -inherit cmake - -EXTRA_OECMAKE += "-DBUILD_SHARED_LIBS=ON" - -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/freeipmi/freeipmi/0001-Fix-undeclared-function-errors.patch b/sources/meta-openembedded/meta-oe/recipes-support/freeipmi/freeipmi/0001-Fix-undeclared-function-errors.patch new file mode 100644 index 00000000..43e905f3 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/freeipmi/freeipmi/0001-Fix-undeclared-function-errors.patch @@ -0,0 +1,48 @@ +From 3018aa9822c680663ebd19542bcd757dc9baf20a Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sun, 8 Sep 2024 20:16:49 -0700 +Subject: [PATCH] Fix undeclared function errors + +e.g. + +ipmi-sel-string-supermicro-x10dimm-common.c:87:14: error: call to undeclared function 'sel_string_output_supermicro_dimm_event_d + | 87 | if ((ret = sel_string_output_supermicro_dimm_event_data2_event_data3 (ctx, + +Upstream-Status: Submitted [https://lists.gnu.org/archive/html/freeipmi-devel/2024-09/msg00001.html] + +Signed-off-by: Khem Raj +--- + ipmi-sensors/ipmi-sensors-oem-intel.c | 1 + + libfreeipmi/sel/ipmi-sel-string-supermicro-common.h | 9 +++++++++ + 2 files changed, 10 insertions(+) + +diff --git a/ipmi-sensors/ipmi-sensors-oem-intel.c b/ipmi-sensors/ipmi-sensors-oem-intel.c +index 5e0f373..872a730 100644 +--- a/ipmi-sensors/ipmi-sensors-oem-intel.c ++++ b/ipmi-sensors/ipmi-sensors-oem-intel.c +@@ -36,6 +36,7 @@ + #include "ipmi-sensors-oem-intel-s2600jf.h" + #include "ipmi-sensors-oem-intel-quanta-qssc-s4r.h" + #include "ipmi-sensors-oem-intel-node-manager.h" ++#include "ipmi-sensors-oem-intel-s2600wp.h" + + #include "freeipmi-portability.h" + #include "pstdout.h" +diff --git a/libfreeipmi/sel/ipmi-sel-string-supermicro-common.h b/libfreeipmi/sel/ipmi-sel-string-supermicro-common.h +index 5785f2b..9e29bd6 100644 +--- a/libfreeipmi/sel/ipmi-sel-string-supermicro-common.h ++++ b/libfreeipmi/sel/ipmi-sel-string-supermicro-common.h +@@ -39,4 +39,13 @@ int sel_string_output_supermicro_overheat_event_data1_class_oem (ipmi_sel_ctx_t + unsigned int *wlen, + struct ipmi_sel_system_event_record_data *system_event_record_data); + ++int sel_string_output_supermicro_dimm_event_data2_event_data3 (ipmi_sel_ctx_t ctx, ++ struct ipmi_sel_entry *sel_entry, ++ uint8_t sel_record_type, ++ char *buf, ++ unsigned int buflen, ++ unsigned int flags, ++ unsigned int *wlen, ++ struct ipmi_sel_system_event_record_data *system_event_record_data, ++ int *oem_rv); + #endif /* IPMI_SEL_STRING_SUPERMICRO_COMMON_H */ diff --git a/sources/meta-openembedded/meta-oe/recipes-support/freeipmi/freeipmi_1.6.14.bb b/sources/meta-openembedded/meta-oe/recipes-support/freeipmi/freeipmi_1.6.14.bb new file mode 100644 index 00000000..e9b28cee --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/freeipmi/freeipmi_1.6.14.bb @@ -0,0 +1,26 @@ +LICENSE = "GPL-3.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ + file://COPYING.ZRESEARCH;md5=d32239bcb673463ab874e80d47fae504 \ + file://COPYING.bmc-watchdog;md5=d32239bcb673463ab874e80d47fae504 \ + file://COPYING.ipmi-dcmi;md5=d32239bcb673463ab874e80d47fae504 \ + file://COPYING.ipmi-fru;md5=d32239bcb673463ab874e80d47fae504 \ + file://COPYING.ipmiconsole;md5=d32239bcb673463ab874e80d47fae504 \ + file://COPYING.ipmidetect;md5=d32239bcb673463ab874e80d47fae504 \ + file://COPYING.ipmimonitoring;md5=d32239bcb673463ab874e80d47fae504 \ + file://COPYING.ipmiping;md5=d32239bcb673463ab874e80d47fae504 \ + file://COPYING.ipmipower;md5=d32239bcb673463ab874e80d47fae504 \ + file://COPYING.ipmiseld;md5=d32239bcb673463ab874e80d47fae504 \ + file://COPYING.pstdout;md5=d32239bcb673463ab874e80d47fae504 \ + file://COPYING.sunbmc;md5=c03f21cd76ff5caba6b890d1213cbfbb" + +SRC_URI = "${GNU_MIRROR}/freeipmi/freeipmi-${PV}.tar.gz \ + file://0001-Fix-undeclared-function-errors.patch" +SRC_URI[sha256sum] = "1a3dac5c76b7ccc4d4f86aa12b8ef9b212baef7489bf05e899b89abb7e14edb5" + +DEPENDS = "libgcrypt" +DEPENDS:append:libc-musl = " argp-standalone" + +inherit pkgconfig autotools + +EXTRA_OECONF = "--without-random-device" + diff --git a/sources/meta-openembedded/meta-oe/recipes-support/freerdp/freerdp/0001-Fixed-compilation-warnings-in-ainput-channel.patch b/sources/meta-openembedded/meta-oe/recipes-support/freerdp/freerdp/0001-Fixed-compilation-warnings-in-ainput-channel.patch new file mode 100644 index 00000000..62600cdd --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/freerdp/freerdp/0001-Fixed-compilation-warnings-in-ainput-channel.patch @@ -0,0 +1,72 @@ +From 130094de3244d5039e463e1142e1ec487c1104ef Mon Sep 17 00:00:00 2001 +From: Armin Novak +Date: Tue, 22 Feb 2022 12:05:08 +0100 +Subject: [PATCH] Fixed compilation warnings in ainput channel + +Upstream-Status: Backport [130094de3 Fixed compilation warnings in ainput channel] +Signed-off-by: Martin Jansa +--- + channels/ainput/server/ainput_main.c | 18 ++++++++++++------ + 1 file changed, 12 insertions(+), 6 deletions(-) + +diff --git a/channels/ainput/server/ainput_main.c b/channels/ainput/server/ainput_main.c +index bc1737ee1..17d2ec681 100644 +--- a/channels/ainput/server/ainput_main.c ++++ b/channels/ainput/server/ainput_main.c +@@ -192,7 +192,7 @@ static UINT ainput_server_recv_mouse_event(ainput_server* ainput, wStream* s) + + static HANDLE ainput_server_get_channel_handle(ainput_server* ainput) + { +- BYTE* buffer = NULL; ++ void* buffer = NULL; + DWORD BytesReturned = 0; + HANDLE ChannelEvent = NULL; + +@@ -389,7 +389,7 @@ ainput_server_context* ainput_server_context_new(HANDLE vcm) + goto fail; + return &ainput->context; + fail: +- ainput_server_context_free(ainput); ++ ainput_server_context_free(&ainput->context); + return NULL; + } + +@@ -496,17 +496,23 @@ UINT ainput_server_context_poll_int(ainput_server_context* context) + break; + case AINPUT_OPENED: + { +- BYTE* buffer = NULL; ++ union ++ { ++ BYTE* pb; ++ void* pv; ++ } buffer; + DWORD BytesReturned = 0; + +- if (WTSVirtualChannelQuery(ainput->ainput_channel, WTSVirtualChannelReady, &buffer, ++ buffer.pv = NULL; ++ ++ if (WTSVirtualChannelQuery(ainput->ainput_channel, WTSVirtualChannelReady, &buffer.pv, + &BytesReturned) != TRUE) + { + WLog_ERR(TAG, "WTSVirtualChannelReady failed,"); + } + else + { +- if (*buffer != 0) ++ if (*buffer.pb != 0) + { + error = ainput_server_send_version(ainput); + if (error) +@@ -518,7 +524,7 @@ UINT ainput_server_context_poll_int(ainput_server_context* context) + else + error = CHANNEL_RC_OK; + } +- WTSFreeMemory(buffer); ++ WTSFreeMemory(buffer.pv); + } + break; + case AINPUT_VERSION_SENT: +-- +2.43.0 + diff --git a/sources/meta-openembedded/meta-oe/recipes-support/freerdp/freerdp/0001-Fixed-compilation-warnings.patch b/sources/meta-openembedded/meta-oe/recipes-support/freerdp/freerdp/0001-Fixed-compilation-warnings.patch new file mode 100644 index 00000000..7fae2703 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/freerdp/freerdp/0001-Fixed-compilation-warnings.patch @@ -0,0 +1,27 @@ +From 75fa1fa5bd5ef2350390564245fd0984209ac092 Mon Sep 17 00:00:00 2001 +From: akallabeth +Date: Mon, 4 Jul 2022 14:34:46 +0200 +Subject: [PATCH] Fixed compilation warnings + +Upstream-Status: Backport [https://github.com/FreeRDP/FreeRDP/commit/2da280b8a1748052b70b3f5a1ef0d8e932c33adc] +Signed-off-by: Khem Raj +--- + client/X11/xf_graphics.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/client/X11/xf_graphics.c b/client/X11/xf_graphics.c +index 5aa1fd48b..fe81e0ed9 100644 +--- a/client/X11/xf_graphics.c ++++ b/client/X11/xf_graphics.c +@@ -438,7 +438,7 @@ static BOOL xf_Pointer_New(rdpContext* context, rdpPointer* pointer) + + #endif + fail: +- WLog_DBG(TAG, "%s: %ld", __func__, rc ? pointer : -1); ++ WLog_DBG(TAG, "%s: %p", __func__, rc ? pointer : NULL); + return rc; + } + +-- +2.45.0 + diff --git a/sources/meta-openembedded/meta-oe/recipes-support/freerdp/freerdp3_3.4.0.bb b/sources/meta-openembedded/meta-oe/recipes-support/freerdp/freerdp3_3.4.0.bb deleted file mode 100644 index 537d1926..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/freerdp/freerdp3_3.4.0.bb +++ /dev/null @@ -1,61 +0,0 @@ -DESCRIPTION = "FreeRDP RDP client & server library" -HOMEPAGE = "http://www.freerdp.com" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" - -DEPENDS = "openssl libusb1 uriparser cairo icu pkcs11-helper zlib jpeg" - -inherit pkgconfig cmake - -SRCREV = "708f3764897e06297469a7b0507b3c9ecc041ad7" -SRC_URI = "git://github.com/FreeRDP/FreeRDP.git;branch=master;protocol=https" - -S = "${WORKDIR}/git" - -PACKAGECONFIG ??= " \ - ${@bb.utils.filter('DISTRO_FEATURES', 'pam pulseaudio wayland x11', d)} \ - ${@bb.utils.contains('LICENSE_FLAGS_ACCEPTED', 'commercial', 'ffmpeg', '', d)} \ - gstreamer cups pcsc \ -" - -EXTRA_OECMAKE = " \ - -DRDTK_FORCE_STATIC_BUILD=ON \ - -DUWAC_FORCE_STATIC_BUILD=ON \ - -DWITH_ADD=ON \ - -DWITH_BINARY_VERSIONING=ON \ - -DWITH_CHANNELS=ON \ - -DWITH_CLIENT_CHANNELS=ON \ - -DWITH_JPEG=ON \ - -DWITH_PKCS11=ON \ - -DWITH_SERVER_CHANNELS=ON \ - -DWITH_SERVER=ON \ - -DPKG_CONFIG_RELOCATABLE=OFF \ - -DWITH_ALSA=OFF \ - -DWITH_CLIENT_SDL=OFF \ - -DWITH_SAMPLE=OFF \ - " - -X11_DEPS = "virtual/libx11 libxinerama libxext libxcursor libxv libxi libxrender libxfixes libxdamage libxrandr libxkbfile" -PACKAGECONFIG[x11] = "-DWITH_X11=ON -DWITH_XINERAMA=ON -DWITH_XEXT=ON -DWITH_XCURSOR=ON -DWITH_XV=ON -DWITH_XI=ON -DWITH_XRENDER=ON -DWITH_XFIXES=ON -DWITH_XDAMAGE=ON -DWITH_XRANDR=ON -DWITH_XKBFILE=ON,-DWITH_X11=OFF -DWITH_SHADOW=OFF,${X11_DEPS}" -PACKAGECONFIG[wayland] = "-DWITH_WAYLAND=ON,-DWITH_WAYLAND=OFF,wayland wayland-native libxkbcommon" -PACKAGECONFIG[pam] = "-DWITH_PAM=ON,-DWITH_PAM=OFF,libpam" -PACKAGECONFIG[pulseaudio] = "-DWITH_PULSEAUDIO=ON,-DWITH_PULSEAUDIO=OFF,pulseaudio" -PACKAGECONFIG[gstreamer] = "-DWITH_GSTREAMER_1_0=ON,-DWITH_GSTREAMER_1_0=OFF,gstreamer1.0 gstreamer1.0-plugins-base" -PACKAGECONFIG[cups] = "-DWITH_CUPS=ON,-DWITH_CUPS=OFF,cups" -PACKAGECONFIG[fuse] = "-DWITH_FUSE=ON,-DWITH_FUSE=OFF,fuse3,fuse3" -PACKAGECONFIG[pcsc] = "-DWITH_PCSC=ON,-DWITH_PCSC=OFF,pcsc-lite" -PACKAGECONFIG[manpages] = "-DWITH_MANPAGES=ON,-DWITH_MANPAGES=OFF, libxslt-native docbook-xsl-stylesheets-native" -PACKAGECONFIG[ffmpeg] = "-DWITH_DSP_FFMPEG=ON -DWITH_FFMPEG=ON -DWITH_SWSCALE=ON, -DWITH_DSP_FFMPEG=OFF -DWITH_FFMPEG=OFF -DWITH_SWSCALE=OFF,ffmpeg" -PACKAGECONFIG[krb5] = "-DWITH_KRB5=ON -DWITH_KRB5_NO_NTLM_FALLBACK=OFF,-DWITH_KRB5=OFF,krb5" -PACKAGECONFIG[openh264] = "-DWITH_OPENH264=ON,-DWITH_OPENH264=OFF,openh264" -PACKAGECONFIG[opencl] = "-DWITH_OPENCL=ON,-DWITH_OPENCL=OFF,opencl-icd-loader" -PACKAGECONFIG[lame] = "-DWITH_LAME=ON,-DWITH_LAME=OFF,lame" -PACKAGECONFIG[faad] = "-DWITH_FAAD=ON,-DWITH_FAAD=OFF,faad2" -PACKAGECONFIG[faac] = "-DWITH_FAAC=ON,-DWITH_FAAC=OFF,faac" - -do_configure:append() { - sed -i -e 's|${WORKDIR}||g' ${B}/include/freerdp/buildflags.h - sed -i -e 's|${WORKDIR}||g' ${B}/winpr/include/winpr/buildflags.h -} - -FILES:${PN} += "${datadir}" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/freerdp/freerdp3_3.5.1.bb b/sources/meta-openembedded/meta-oe/recipes-support/freerdp/freerdp3_3.5.1.bb new file mode 100644 index 00000000..b6974af7 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/freerdp/freerdp3_3.5.1.bb @@ -0,0 +1,61 @@ +DESCRIPTION = "FreeRDP RDP client & server library" +HOMEPAGE = "http://www.freerdp.com" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" + +DEPENDS = "openssl libusb1 uriparser cairo icu pkcs11-helper zlib jpeg" + +inherit pkgconfig cmake + +SRCREV = "eda5c99686e15327f2f37b9cadf307e852b96adf" +SRC_URI = "git://github.com/FreeRDP/FreeRDP.git;branch=master;protocol=https" + +S = "${WORKDIR}/git" + +PACKAGECONFIG ??= " \ + ${@bb.utils.filter('DISTRO_FEATURES', 'pam pulseaudio wayland x11', d)} \ + ${@bb.utils.contains('LICENSE_FLAGS_ACCEPTED', 'commercial', 'ffmpeg', '', d)} \ + gstreamer cups pcsc \ +" + +EXTRA_OECMAKE = " \ + -DRDTK_FORCE_STATIC_BUILD=ON \ + -DUWAC_FORCE_STATIC_BUILD=ON \ + -DWITH_ADD=ON \ + -DWITH_BINARY_VERSIONING=ON \ + -DWITH_CHANNELS=ON \ + -DWITH_CLIENT_CHANNELS=ON \ + -DWITH_JPEG=ON \ + -DWITH_PKCS11=ON \ + -DWITH_SERVER_CHANNELS=ON \ + -DWITH_SERVER=ON \ + -DPKG_CONFIG_RELOCATABLE=OFF \ + -DWITH_ALSA=OFF \ + -DWITH_CLIENT_SDL=OFF \ + -DWITH_SAMPLE=OFF \ + " + +X11_DEPS = "virtual/libx11 libxinerama libxext libxcursor libxv libxi libxrender libxfixes libxdamage libxrandr libxkbfile" +PACKAGECONFIG[x11] = "-DWITH_X11=ON -DWITH_XINERAMA=ON -DWITH_XEXT=ON -DWITH_XCURSOR=ON -DWITH_XV=ON -DWITH_XI=ON -DWITH_XRENDER=ON -DWITH_XFIXES=ON -DWITH_XDAMAGE=ON -DWITH_XRANDR=ON -DWITH_XKBFILE=ON,-DWITH_X11=OFF -DWITH_SHADOW=OFF,${X11_DEPS}" +PACKAGECONFIG[wayland] = "-DWITH_WAYLAND=ON,-DWITH_WAYLAND=OFF,wayland wayland-native libxkbcommon" +PACKAGECONFIG[pam] = "-DWITH_PAM=ON,-DWITH_PAM=OFF,libpam" +PACKAGECONFIG[pulseaudio] = "-DWITH_PULSEAUDIO=ON,-DWITH_PULSEAUDIO=OFF,pulseaudio" +PACKAGECONFIG[gstreamer] = "-DWITH_GSTREAMER_1_0=ON,-DWITH_GSTREAMER_1_0=OFF,gstreamer1.0 gstreamer1.0-plugins-base" +PACKAGECONFIG[cups] = "-DWITH_CUPS=ON,-DWITH_CUPS=OFF,cups" +PACKAGECONFIG[fuse] = "-DWITH_FUSE=ON,-DWITH_FUSE=OFF,fuse3,fuse3" +PACKAGECONFIG[pcsc] = "-DWITH_PCSC=ON,-DWITH_PCSC=OFF,pcsc-lite" +PACKAGECONFIG[manpages] = "-DWITH_MANPAGES=ON,-DWITH_MANPAGES=OFF, libxslt-native docbook-xsl-stylesheets-native" +PACKAGECONFIG[ffmpeg] = "-DWITH_DSP_FFMPEG=ON -DWITH_FFMPEG=ON -DWITH_SWSCALE=ON, -DWITH_DSP_FFMPEG=OFF -DWITH_FFMPEG=OFF -DWITH_SWSCALE=OFF,ffmpeg" +PACKAGECONFIG[krb5] = "-DWITH_KRB5=ON -DWITH_KRB5_NO_NTLM_FALLBACK=OFF,-DWITH_KRB5=OFF,krb5" +PACKAGECONFIG[openh264] = "-DWITH_OPENH264=ON,-DWITH_OPENH264=OFF,openh264" +PACKAGECONFIG[opencl] = "-DWITH_OPENCL=ON,-DWITH_OPENCL=OFF,opencl-icd-loader" +PACKAGECONFIG[lame] = "-DWITH_LAME=ON,-DWITH_LAME=OFF,lame" +PACKAGECONFIG[faad] = "-DWITH_FAAD=ON,-DWITH_FAAD=OFF,faad2" +PACKAGECONFIG[faac] = "-DWITH_FAAC=ON,-DWITH_FAAC=OFF,faac" + +do_configure:append() { + sed -i -e 's|${WORKDIR}||g' ${B}/include/freerdp/buildflags.h + sed -i -e 's|${WORKDIR}||g' ${B}/winpr/include/winpr/buildflags.h +} + +FILES:${PN} += "${datadir}" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/freerdp/freerdp_2.11.2.bb b/sources/meta-openembedded/meta-oe/recipes-support/freerdp/freerdp_2.11.2.bb deleted file mode 100644 index 8de0e39a..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/freerdp/freerdp_2.11.2.bb +++ /dev/null @@ -1,92 +0,0 @@ -# Copyright (C) 2010-2012 O.S. Systems Software Ltda. All Rights Reserved -# Released under the MIT license - -DESCRIPTION = "FreeRDP RDP client & server library" -HOMEPAGE = "http://www.freerdp.com" -DEPENDS = "openssl alsa-lib libusb1" -SECTION = "net" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" - -inherit pkgconfig cmake gitpkgv - -PE = "1" -PKGV = "${GITPKGVTAG}" - -SRCREV = "a38c1be9eee39a9bc22b511fffe96e63fdf8ebe7" -SRC_URI = "git://github.com/FreeRDP/FreeRDP.git;branch=stable-2.0;protocol=https \ - file://winpr-makecert-Build-with-install-RPATH.patch \ - file://0001-Fix-const-qualifier-error.patch \ - file://0002-Do-not-install-tools-a-CMake-targets.patch \ - " - -S = "${WORKDIR}/git" - -EXTRA_OECMAKE += " \ - -DWITH_ALSA=ON \ - -DWITH_FFMPEG=OFF \ - -DWITH_CUNIT=OFF \ - -DWITH_NEON=OFF \ - -DBUILD_STATIC_LIBS=OFF \ - -DCMAKE_POSITION_INDEPENDANT_CODE=ON \ - -DWITH_MANPAGES=OFF \ - -DPROXY_PLUGINDIR=${libdir}/freerdp/proxy/plugins \ -" - -PACKAGECONFIG ??= " \ - ${@bb.utils.filter('DISTRO_FEATURES', 'directfb pam pulseaudio wayland x11', d)}\ - gstreamer cups pcsc server \ -" - -X11_DEPS = "virtual/libx11 libxinerama libxext libxcursor libxv libxi libxrender libxfixes libxdamage libxrandr libxkbfile" -PACKAGECONFIG[x11] = "-DWITH_X11=ON -DWITH_XINERAMA=ON -DWITH_XEXT=ON -DWITH_XCURSOR=ON -DWITH_XV=ON -DWITH_XI=ON -DWITH_XRENDER=ON -DWITH_XFIXES=ON -DWITH_XDAMAGE=ON -DWITH_XRANDR=ON -DWITH_XKBFILE=ON,-DWITH_X11=OFF,${X11_DEPS}" -PACKAGECONFIG[wayland] = "-DWITH_WAYLAND=ON,-DWITH_WAYLAND=OFF,wayland wayland-native libxkbcommon" -PACKAGECONFIG[directfb] = "-DWITH_DIRECTFB=ON,-DWITH_DIRECTFB=OFF,directfb" -PACKAGECONFIG[pam] = "-DWITH_PAM=ON,-DWITH_PAM=OFF,libpam" -PACKAGECONFIG[pcsc] = "-DWITH_PCSC=ON,-DWITH_PCSC=OFF,pcsc-lite" -PACKAGECONFIG[pulseaudio] = "-DWITH_PULSEAUDIO=ON,-DWITH_PULSEAUDIO=OFF,pulseaudio" -PACKAGECONFIG[gstreamer] = "-DWITH_GSTREAMER_1_0=ON,-DWITH_GSTREAMER_1_0=OFF,gstreamer1.0 gstreamer1.0-plugins-base" -PACKAGECONFIG[cups] = "-DWITH_CUPS=ON,-DWITH_CUPS=OFF,cups" -PACKAGECONFIG[server] = "-DWITH_SERVER=ON,-DWITH_SERVER=OFF" - -PACKAGES =+ "libfreerdp" - -LEAD_SONAME = "libfreerdp.so" -FILES:libfreerdp = "${libdir}/lib*${SOLIBS}" - -PACKAGES_DYNAMIC += "^libfreerdp-plugin-.*" - -do_configure:append() { - sed -i -e 's|${WORKDIR}||g' ${B}/buildflags.h -} - -# we will need winpr-makecert to generate TLS certificates -do_install:append () { - install -d ${D}${bindir} - install -m755 winpr/tools/makecert-cli/winpr-makecert ${D}${bindir} - rm -rf ${D}${libdir}/freerdp -} - -python populate_packages:prepend () { - freerdp_root = d.expand('${libdir}/freerdp') - - do_split_packages(d, freerdp_root, r'^(audin_.*)\.so$', - output_pattern='libfreerdp-plugin-%s', - description='FreeRDP plugin %s', - prepend=True, extra_depends='libfreerdp-plugin-audin') - - do_split_packages(d, freerdp_root, r'^(rdpsnd_.*)\.so$', - output_pattern='libfreerdp-plugin-%s', - description='FreeRDP plugin %s', - prepend=True, extra_depends='libfreerdp-plugin-rdpsnd') - - do_split_packages(d, freerdp_root, r'^(tsmf_.*)\.so$', - output_pattern='libfreerdp-plugin-%s', - description='FreeRDP plugin %s', - prepend=True, extra_depends='libfreerdp-plugin-tsmf') - - do_split_packages(d, freerdp_root, r'^([^-]*)\.so$', - output_pattern='libfreerdp-plugin-%s', - description='FreeRDP plugin %s', - prepend=True, extra_depends='') -} diff --git a/sources/meta-openembedded/meta-oe/recipes-support/freerdp/freerdp_2.11.7.bb b/sources/meta-openembedded/meta-oe/recipes-support/freerdp/freerdp_2.11.7.bb new file mode 100644 index 00000000..ee4d4530 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/freerdp/freerdp_2.11.7.bb @@ -0,0 +1,94 @@ +# Copyright (C) 2010-2012 O.S. Systems Software Ltda. All Rights Reserved +# Released under the MIT license + +DESCRIPTION = "FreeRDP RDP client & server library" +HOMEPAGE = "http://www.freerdp.com" +DEPENDS = "openssl alsa-lib libusb1" +SECTION = "net" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" + +inherit pkgconfig cmake gitpkgv + +PE = "1" +PKGV = "${GITPKGVTAG}" + +SRCREV = "efa899d3deb8595a29fabb2a2251722f9d7e0d7f" +SRC_URI = "git://github.com/FreeRDP/FreeRDP.git;branch=stable-2.0;protocol=https \ + file://winpr-makecert-Build-with-install-RPATH.patch \ + file://0001-Fixed-compilation-warnings.patch \ + file://0001-Fix-const-qualifier-error.patch \ + file://0002-Do-not-install-tools-a-CMake-targets.patch \ + file://0001-Fixed-compilation-warnings-in-ainput-channel.patch \ + " + +S = "${WORKDIR}/git" + +EXTRA_OECMAKE += " \ + -DWITH_ALSA=ON \ + -DWITH_FFMPEG=OFF \ + -DWITH_CUNIT=OFF \ + -DWITH_NEON=OFF \ + -DBUILD_STATIC_LIBS=OFF \ + -DCMAKE_POSITION_INDEPENDANT_CODE=ON \ + -DWITH_MANPAGES=OFF \ + -DPROXY_PLUGINDIR=${libdir}/freerdp/proxy/plugins \ +" + +PACKAGECONFIG ??= " \ + ${@bb.utils.filter('DISTRO_FEATURES', 'directfb pam pulseaudio wayland x11', d)}\ + gstreamer cups pcsc server \ +" + +X11_DEPS = "virtual/libx11 libxinerama libxext libxcursor libxv libxi libxrender libxfixes libxdamage libxrandr libxkbfile" +PACKAGECONFIG[x11] = "-DWITH_X11=ON -DWITH_XINERAMA=ON -DWITH_XEXT=ON -DWITH_XCURSOR=ON -DWITH_XV=ON -DWITH_XI=ON -DWITH_XRENDER=ON -DWITH_XFIXES=ON -DWITH_XDAMAGE=ON -DWITH_XRANDR=ON -DWITH_XKBFILE=ON,-DWITH_X11=OFF,${X11_DEPS}" +PACKAGECONFIG[wayland] = "-DWITH_WAYLAND=ON,-DWITH_WAYLAND=OFF,wayland wayland-native libxkbcommon" +PACKAGECONFIG[directfb] = "-DWITH_DIRECTFB=ON,-DWITH_DIRECTFB=OFF,directfb" +PACKAGECONFIG[pam] = "-DWITH_PAM=ON,-DWITH_PAM=OFF,libpam" +PACKAGECONFIG[pcsc] = "-DWITH_PCSC=ON,-DWITH_PCSC=OFF,pcsc-lite" +PACKAGECONFIG[pulseaudio] = "-DWITH_PULSEAUDIO=ON,-DWITH_PULSEAUDIO=OFF,pulseaudio" +PACKAGECONFIG[gstreamer] = "-DWITH_GSTREAMER_1_0=ON,-DWITH_GSTREAMER_1_0=OFF,gstreamer1.0 gstreamer1.0-plugins-base" +PACKAGECONFIG[cups] = "-DWITH_CUPS=ON,-DWITH_CUPS=OFF,cups" +PACKAGECONFIG[server] = "-DWITH_SERVER=ON,-DWITH_SERVER=OFF" + +PACKAGES =+ "libfreerdp" + +LEAD_SONAME = "libfreerdp.so" +FILES:libfreerdp = "${libdir}/lib*${SOLIBS}" + +PACKAGES_DYNAMIC += "^libfreerdp-plugin-.*" + +do_configure:append() { + sed -i -e 's|${WORKDIR}||g' ${B}/buildflags.h +} + +# we will need winpr-makecert to generate TLS certificates +do_install:append () { + install -d ${D}${bindir} + install -m755 winpr/tools/makecert-cli/winpr-makecert ${D}${bindir} + rm -rf ${D}${libdir}/freerdp +} + +python populate_packages:prepend () { + freerdp_root = d.expand('${libdir}/freerdp') + + do_split_packages(d, freerdp_root, r'^(audin_.*)\.so$', + output_pattern='libfreerdp-plugin-%s', + description='FreeRDP plugin %s', + prepend=True, extra_depends='libfreerdp-plugin-audin') + + do_split_packages(d, freerdp_root, r'^(rdpsnd_.*)\.so$', + output_pattern='libfreerdp-plugin-%s', + description='FreeRDP plugin %s', + prepend=True, extra_depends='libfreerdp-plugin-rdpsnd') + + do_split_packages(d, freerdp_root, r'^(tsmf_.*)\.so$', + output_pattern='libfreerdp-plugin-%s', + description='FreeRDP plugin %s', + prepend=True, extra_depends='libfreerdp-plugin-tsmf') + + do_split_packages(d, freerdp_root, r'^([^-]*)\.so$', + output_pattern='libfreerdp-plugin-%s', + description='FreeRDP plugin %s', + prepend=True, extra_depends='') +} diff --git a/sources/meta-openembedded/meta-filesystems/recipes-support/fuse/fuse3/fuse3.conf b/sources/meta-openembedded/meta-oe/recipes-support/fuse/fuse3/fuse3.conf similarity index 100% rename from sources/meta-openembedded/meta-filesystems/recipes-support/fuse/fuse3/fuse3.conf rename to sources/meta-openembedded/meta-oe/recipes-support/fuse/fuse3/fuse3.conf diff --git a/sources/meta-openembedded/meta-filesystems/recipes-support/fuse/fuse3/run-ptest b/sources/meta-openembedded/meta-oe/recipes-support/fuse/fuse3/run-ptest similarity index 100% rename from sources/meta-openembedded/meta-filesystems/recipes-support/fuse/fuse3/run-ptest rename to sources/meta-openembedded/meta-oe/recipes-support/fuse/fuse3/run-ptest diff --git a/sources/meta-openembedded/meta-filesystems/recipes-support/fuse/fuse3_3.16.2.bb b/sources/meta-openembedded/meta-oe/recipes-support/fuse/fuse3_3.16.2.bb similarity index 95% rename from sources/meta-openembedded/meta-filesystems/recipes-support/fuse/fuse3_3.16.2.bb rename to sources/meta-openembedded/meta-oe/recipes-support/fuse/fuse3_3.16.2.bb index b946b63e..47b07055 100644 --- a/sources/meta-openembedded/meta-filesystems/recipes-support/fuse/fuse3_3.16.2.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/fuse/fuse3_3.16.2.bb @@ -13,9 +13,7 @@ LIC_FILES_CHKSUM = " \ file://LICENSE;md5=a55c12a2d7d742ecb41ca9ae0a6ddc66 \ " -SRC_URI = "https://github.com/libfuse/libfuse/releases/download/fuse-${PV}/fuse-${PV}.tar.gz \ - file://fuse3.conf \ -" +SRC_URI = "https://github.com/libfuse/libfuse/releases/download/fuse-${PV}/fuse-${PV}.tar.gz" SRC_URI[sha256sum] = "f797055d9296b275e981f5f62d4e32e089614fc253d1ef2985851025b8a0ce87" S = "${WORKDIR}/fuse-${PV}" @@ -29,6 +27,7 @@ inherit meson pkgconfig ptest SRC_URI += " \ file://run-ptest \ + file://fuse3.conf \ " RDEPENDS:${PN}-ptest += " \ @@ -94,6 +93,6 @@ do_install:append() { # Install systemd related configuration file if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then install -d ${D}${sysconfdir}/modules-load.d - install -m 0644 ${WORKDIR}/fuse3.conf ${D}${sysconfdir}/modules-load.d + install -m 0644 ${UNPACKDIR}/fuse3.conf ${D}${sysconfdir}/modules-load.d fi } diff --git a/sources/meta-openembedded/meta-oe/recipes-support/genimage/genimage_18.bb b/sources/meta-openembedded/meta-oe/recipes-support/genimage/genimage_18.bb new file mode 100644 index 00000000..23169f5d --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/genimage/genimage_18.bb @@ -0,0 +1,22 @@ +SUMMARY = "genimage - The image creation tool" +DESCRIPTION = "Genimage is a tool for generating filesystem and disk/flash images \ +from a root filesystem tree or existing filesystem images." +HOMEPAGE = "https://github.com/pengutronix/genimage" + +SECTION = "base" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +DEPENDS = "libconfuse" + +SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/genimage-${PV}.tar.xz" +SRC_URI[sha256sum] = "ebc3f886c4d80064dd6c6d5e3c2e98e5a670078264108ce2f89ada8a2e13fedd" + +EXTRA_OECONF = "--enable-largefile" + +inherit pkgconfig autotools gettext github-releases + +GITHUB_BASE_URI = "https://github.com/pengutronix/genimage/releases" +UPSTREAM_CHECK_REGEX = "releases/tag/v?(?P\d+(\.\d+)*)" + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/googlebenchmark/googlebenchmark/0001-cycleclock-Fix-type-conversion-to-match-function-ret.patch b/sources/meta-openembedded/meta-oe/recipes-support/googlebenchmark/googlebenchmark/0001-cycleclock-Fix-type-conversion-to-match-function-ret.patch new file mode 100644 index 00000000..3017314a --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/googlebenchmark/googlebenchmark/0001-cycleclock-Fix-type-conversion-to-match-function-ret.patch @@ -0,0 +1,33 @@ +From 7f0e99af540a333108b92d792923ec7fc9e9fad9 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 28 May 2024 20:14:54 -0700 +Subject: [PATCH] cycleclock: Fix type conversion to match function return type + (#1794) + +fixes build with clang19 + +src/cycleclock.h:208:52: error: implicit conversion changes signedness: 'uint64_t' (aka 'unsigned long long') to 'int64_t' (aka 'long long') [-Werror,-Wsign-conversion] + 208 | return (static_cast(cycles_hi1) << 32) | cycles_lo; + | ~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~ +1 error generated. + +Upstream-Status: Backport [https://github.com/google/benchmark/commit/7f0e99af540a333108b92d792923ec7fc9e9fad9] +Signed-off-by: Khem Raj +--- + src/cycleclock.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/cycleclock.h b/src/cycleclock.h +index a25843760..c657414e5 100644 +--- a/src/cycleclock.h ++++ b/src/cycleclock.h +@@ -205,7 +205,8 @@ inline BENCHMARK_ALWAYS_INLINE int64_t Now() { + "sub %0, zero, %0\n" + "and %1, %1, %0\n" + : "=r"(cycles_hi0), "=r"(cycles_lo), "=r"(cycles_hi1)); +- return (static_cast(cycles_hi1) << 32) | cycles_lo; ++ return static_cast((static_cast(cycles_hi1) << 32) | ++ cycles_lo); + #else + uint64_t cycles; + asm volatile("rdtime %0" : "=r"(cycles)); diff --git a/sources/meta-openembedded/meta-oe/recipes-support/googlebenchmark/googlebenchmark/0002-cycleclock-Fix-type-conversion-to-match-function-ret.patch b/sources/meta-openembedded/meta-oe/recipes-support/googlebenchmark/googlebenchmark/0002-cycleclock-Fix-type-conversion-to-match-function-ret.patch new file mode 100644 index 00000000..cc22a7e8 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/googlebenchmark/googlebenchmark/0002-cycleclock-Fix-type-conversion-to-match-function-ret.patch @@ -0,0 +1,32 @@ +From 54bca09aca6ccec41f852cb1f834463bc51290d0 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 10 Jun 2024 21:45:22 -0700 +Subject: [PATCH] cycleclock: Fix type conversion to match function return type + on riscv64 + +Fixes builds with clang + +src/cycleclock.h:213:10: error: implicit conversion changes signedness: 'uint64_t' (aka 'unsigned long') to 'int64_t' (aka 'long') [-Werror,-Wsign-conversion] + 213 | return cycles; + | ~~~~~~ ^~~~~~ + 1 error generated. + +Upstream-Status: Submitted [https://github.com/google/benchmark/pull/1802] +Signed-off-by: Khem Raj +--- + src/cycleclock.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/cycleclock.h b/src/cycleclock.h +index c657414..bd62f5d 100644 +--- a/src/cycleclock.h ++++ b/src/cycleclock.h +@@ -210,7 +210,7 @@ inline BENCHMARK_ALWAYS_INLINE int64_t Now() { + #else + uint64_t cycles; + asm volatile("rdtime %0" : "=r"(cycles)); +- return cycles; ++ return static_cast(cycles); + #endif + #elif defined(__e2k__) || defined(__elbrus__) + struct timeval tv; diff --git a/sources/meta-openembedded/meta-oe/recipes-support/googlebenchmark/googlebenchmark_1.8.3.bb b/sources/meta-openembedded/meta-oe/recipes-support/googlebenchmark/googlebenchmark_1.8.3.bb deleted file mode 100644 index f945a30f..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/googlebenchmark/googlebenchmark_1.8.3.bb +++ /dev/null @@ -1,20 +0,0 @@ -DESCRIPTION = "A microbenchmark support library" -HOMEPAGE = "https://github.com/google/benchmark" -SECTION = "libs" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" - -SRC_URI = "git://github.com/google/benchmark.git;protocol=https;branch=main" -SRCREV = "344117638c8ff7e239044fd0fa7085839fc03021" - -S = "${WORKDIR}/git" - -EXTRA_OECMAKE = " \ - -DBUILD_SHARED_LIBS=yes \ - -DBENCHMARK_ENABLE_TESTING=no \ - -DCMAKE_BUILD_TYPE=Release \ -" - -inherit cmake - -FILES:${PN}-dev += "${libdir}/cmake" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/googlebenchmark/googlebenchmark_1.8.4.bb b/sources/meta-openembedded/meta-oe/recipes-support/googlebenchmark/googlebenchmark_1.8.4.bb new file mode 100644 index 00000000..706862f2 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/googlebenchmark/googlebenchmark_1.8.4.bb @@ -0,0 +1,22 @@ +DESCRIPTION = "A microbenchmark support library" +HOMEPAGE = "https://github.com/google/benchmark" +SECTION = "libs" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" + +SRC_URI = "git://github.com/google/benchmark.git;protocol=https;branch=main \ + file://0001-cycleclock-Fix-type-conversion-to-match-function-ret.patch \ + file://0002-cycleclock-Fix-type-conversion-to-match-function-ret.patch" +SRCREV = "a4cf155615c63e019ae549e31703bf367df5b471" + +S = "${WORKDIR}/git" + +EXTRA_OECMAKE = " \ + -DBUILD_SHARED_LIBS=yes \ + -DBENCHMARK_ENABLE_TESTING=no \ + -DCMAKE_BUILD_TYPE=Release \ +" + +inherit cmake + +FILES:${PN}-dev += "${libdir}/cmake" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/gosu/gosu_1.17.bb b/sources/meta-openembedded/meta-oe/recipes-support/gosu/gosu_1.17.bb index a29d6bce..6a4441fc 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/gosu/gosu_1.17.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/gosu/gosu_1.17.bb @@ -5,9 +5,9 @@ LICENSE = "Apache-2.0 " LIC_FILES_CHKSUM = "file://src/${GO_IMPORT}/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" GO_IMPORT = "github.com/tianon/gosu" -SRC_URI = "git://${GO_IMPORT}.git;branch=master;protocol=https \ - git://github.com/moby/sys;name=user;destsuffix=${S}/src/github.com/moby/sys;branch=main;protocol=https \ - git://github.com/golang/sys;name=sys;destsuffix=${S}/src/golang.org/x/sys;branch=master;protocol=https \ +SRC_URI = "git://${GO_IMPORT}.git;destsuffix=src/${GO_IMPORT};branch=master;protocol=https \ + git://github.com/moby/sys;name=user;destsuffix=src/github.com/moby/sys;branch=main;protocol=https \ + git://github.com/golang/sys;name=sys;destsuffix=src/golang.org/x/sys;branch=master;protocol=https \ " SRCREV = "0d1847490b448a17eb347e5e357f2c0478df87ad" #v0.1.0 @@ -17,6 +17,7 @@ SRCREV_sys = "95e765b1cc43ac521bd4fd501e00774e34401449" SRCREV_FORMAT .= "_user_sys" +S = "${UNPACKDIR}" inherit go CGO_ENABLED = "1" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/gpm/gpm_git.bb b/sources/meta-openembedded/meta-oe/recipes-support/gpm/gpm_git.bb index 1a96bea0..a0664886 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/gpm/gpm_git.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/gpm/gpm_git.bb @@ -34,8 +34,8 @@ do_configure:prepend() { do_install:append () { install -d ${D}${systemd_system_unitdir} - sed 's:@bindir@:${sbindir}:' < ${WORKDIR}/gpm.service.in >${D}${systemd_system_unitdir}/gpm.service - install -D -m 0755 ${WORKDIR}/init ${D}${INIT_D_DIR}/gpm + sed 's:@bindir@:${sbindir}:' < ${UNPACKDIR}/gpm.service.in >${D}${systemd_system_unitdir}/gpm.service + install -D -m 0755 ${UNPACKDIR}/init ${D}${INIT_D_DIR}/gpm ln -s libgpm.so.2 ${D}${libdir}/libgpm.so } diff --git a/sources/meta-openembedded/meta-oe/recipes-support/gradm/gradm_3.1-202111052217.bb b/sources/meta-openembedded/meta-oe/recipes-support/gradm/gradm_3.1-202111052217.bb index c82b529f..6238a04d 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/gradm/gradm_3.1-202111052217.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/gradm/gradm_3.1-202111052217.bb @@ -18,6 +18,8 @@ SRC_URI = "http://grsecurity.net/stable/${BP}.tar.gz \ " SRC_URI[sha256sum] = "2459290f367a47c8a1ce4ea2ec08359799ea33dc15ed4436439596ce88284fb9" +UPSTREAM_CHECK_URI = "https://grsecurity.net/download" + S = "${WORKDIR}/gradm" inherit autotools-brokensep diff --git a/sources/meta-openembedded/meta-oe/recipes-support/gsl/gsl_2.7.1.bb b/sources/meta-openembedded/meta-oe/recipes-support/gsl/gsl_2.7.1.bb deleted file mode 100644 index a4dc1437..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/gsl/gsl_2.7.1.bb +++ /dev/null @@ -1,4 +0,0 @@ -include gsl.inc - -SRC_URI = "${GNU_MIRROR}/gsl/gsl-${PV}.tar.gz" -SRC_URI[sha256sum] = "dcb0fbd43048832b757ff9942691a8dd70026d5da0ff85601e52687f6deeb34b" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/gsl/gsl_2.8.bb b/sources/meta-openembedded/meta-oe/recipes-support/gsl/gsl_2.8.bb new file mode 100644 index 00000000..45c77611 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/gsl/gsl_2.8.bb @@ -0,0 +1,4 @@ +include gsl.inc + +SRC_URI = "${GNU_MIRROR}/gsl/gsl-${PV}.tar.gz" +SRC_URI[sha256sum] = "6a99eeed15632c6354895b1dd542ed5a855c0f15d9ad1326c6fe2b2c9e423190" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/gsoap/gsoap/0001-Provide-strtod_l-signature-on-non-glibc-linux-musl-s.patch b/sources/meta-openembedded/meta-oe/recipes-support/gsoap/gsoap/0001-Provide-strtod_l-signature-on-non-glibc-linux-musl-s.patch new file mode 100644 index 00000000..df27a59e --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/gsoap/gsoap/0001-Provide-strtod_l-signature-on-non-glibc-linux-musl-s.patch @@ -0,0 +1,85 @@ +From 2b7a51556185539a0f9baef0f109e0814933d6b3 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sun, 19 May 2024 17:11:20 -0700 +Subject: [PATCH] Provide strtod_l signature on non-glibc linux ( musl ) + systems + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- + gsoap/stdsoap2.c | 5 +++++ + 1 file changed, 5 insertions(+) + +--- a/gsoap/stdsoap2.cpp ++++ b/gsoap/stdsoap2.cpp +@@ -74,6 +74,11 @@ A commercial use license is available fr + + #include "stdsoap2.h" + ++#if defined(__linux__) && !defined(__GLIBC__) ++struct __locale_struct; ++double strtod_l(const char *__restrict, char **__restrict, struct __locale_struct *); ++#endif ++ + #if GSOAP_VERSION != GSOAP_LIB_VERSION + # error "GSOAP VERSION MISMATCH IN LIBRARY: PLEASE REINSTALL PACKAGE" + #endif +@@ -5457,7 +5462,7 @@ tcp_gethostbyname(struct soap *soap, con + { + #if (defined(_AIX43) || defined(TRU64) || defined(HP_UX)) && defined(HAVE_GETHOSTBYNAME_R) + struct hostent_data ht_data; +-#elif (!defined(_GNU_SOURCE) || (!(~_GNU_SOURCE+1) && !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600 || defined(__ANDROID__) || defined(FREEBSD) || defined(__FreeBSD__)) && !defined(SUN_OS) && !defined(__QNX__) && !defined(QNX) && defined(HAVE_GETHOSTBYNAME_R) ++#elif (!defined(__GLIBC__) || (!(~_GNU_SOURCE+1) && !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600 || defined(__ANDROID__) || defined(FREEBSD) || defined(__FreeBSD__)) && !defined(SUN_OS) && !defined(__QNX__) && !defined(QNX) && defined(HAVE_GETHOSTBYNAME_R) + int r; + char *tmpbuf = soap->tmpbuf; + size_t tmplen = sizeof(soap->tmpbuf); +@@ -5490,7 +5495,7 @@ tcp_gethostbyname(struct soap *soap, con + hostent = NULL; + soap->errnum = h_errno; + } +-#elif (!defined(_GNU_SOURCE) || (!(~_GNU_SOURCE+1) && !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600 || defined(__ANDROID__) || defined(FREEBSD) || defined(__FreeBSD__)) && !defined(SUN_OS) && !defined(__QNX__) && !defined(QNX) && defined(HAVE_GETHOSTBYNAME_R) ++#elif (!defined(__GLIBC__) || (!(~_GNU_SOURCE+1) && !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600 || defined(__ANDROID__) || defined(FREEBSD) || defined(__FreeBSD__)) && !defined(SUN_OS) && !defined(__QNX__) && !defined(QNX) && defined(HAVE_GETHOSTBYNAME_R) + while ((r = gethostbyname_r(addr, hostent, tmpbuf, tmplen, &hostent, &soap->errnum)) < 0) + { + if (tmpbuf != soap->tmpbuf) +@@ -23192,7 +23197,7 @@ soap_strerror(struct soap *soap) + { + #ifndef WIN32 + # ifdef HAVE_STRERROR_R +-# if !defined(_GNU_SOURCE) || (!(~_GNU_SOURCE+1) && ((!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || (_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600))) ++# if !defined(__GLIBC__) || (!(~_GNU_SOURCE+1) && ((!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || (_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600))) + err = strerror_r(err, soap->msgbuf, sizeof(soap->msgbuf)); /* XSI-compliant */ + if (err != 0) + soap_strcpy(soap->msgbuf, sizeof(soap->msgbuf), "unknown error"); +--- a/gsoap/stdsoap2.c ++++ b/gsoap/stdsoap2.c +@@ -74,6 +74,11 @@ A commercial use license is available fr + + #include "stdsoap2.h" + ++#if defined(__linux__) && !defined(__GLIBC__) ++struct __locale_struct; ++double strtod_l(const char *__restrict, char **__restrict, struct __locale_struct *); ++#endif ++ + #if GSOAP_VERSION != GSOAP_LIB_VERSION + # error "GSOAP VERSION MISMATCH IN LIBRARY: PLEASE REINSTALL PACKAGE" + #endif +@@ -5490,7 +5495,7 @@ tcp_gethostbyname(struct soap *soap, con + hostent = NULL; + soap->errnum = h_errno; + } +-#elif (!defined(_GNU_SOURCE) || (!(~_GNU_SOURCE+1) && !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600 || defined(__ANDROID__) || defined(FREEBSD) || defined(__FreeBSD__)) && !defined(SUN_OS) && !defined(__QNX__) && !defined(QNX) && defined(HAVE_GETHOSTBYNAME_R) ++#elif (!defined(__GLIBC__) || (!(~_GNU_SOURCE+1) && !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600 || defined(__ANDROID__) || defined(FREEBSD) || defined(__FreeBSD__)) && !defined(SUN_OS) && !defined(__QNX__) && !defined(QNX) && defined(HAVE_GETHOSTBYNAME_R) + while ((r = gethostbyname_r(addr, hostent, tmpbuf, tmplen, &hostent, &soap->errnum)) < 0) + { + if (tmpbuf != soap->tmpbuf) +@@ -23192,7 +23197,7 @@ soap_strerror(struct soap *soap) + { + #ifndef WIN32 + # ifdef HAVE_STRERROR_R +-# if !defined(_GNU_SOURCE) || (!(~_GNU_SOURCE+1) && ((!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || (_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600))) ++# if !defined(__GLIBC__) || (!(~_GNU_SOURCE+1) && ((!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || (_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600))) + err = strerror_r(err, soap->msgbuf, sizeof(soap->msgbuf)); /* XSI-compliant */ + if (err != 0) + soap_strcpy(soap->msgbuf, sizeof(soap->msgbuf), "unknown error"); diff --git a/sources/meta-openembedded/meta-oe/recipes-support/gsoap/gsoap/0001-Simplify-check-for-gethostbyname_r.patch b/sources/meta-openembedded/meta-oe/recipes-support/gsoap/gsoap/0001-Simplify-check-for-gethostbyname_r.patch deleted file mode 100644 index 6ae02deb..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/gsoap/gsoap/0001-Simplify-check-for-gethostbyname_r.patch +++ /dev/null @@ -1,96 +0,0 @@ -From fa923a50790c907725c822b2fc7d63b2da62b4ad Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sun, 12 Mar 2023 13:34:55 -0700 -Subject: [PATCH] Simplify check for gethostbyname_r() - -This helps build fix with musl. - -Imported from Alpine: https://git.alpinelinux.org/aports/tree/community/gsoap/musl-fixes.patch - -Signed-off-by: Khem Raj ---- -Upstream-Status: Pending - - gsoap/stdsoap2.c | 6 ++---- - gsoap/stdsoap2.cpp | 10 ++-------- - 2 files changed, 4 insertions(+), 12 deletions(-) - -diff --git a/gsoap/stdsoap2.c b/gsoap/stdsoap2.c -index 654a1e1..fa31d02 100644 ---- a/gsoap/stdsoap2.c -+++ b/gsoap/stdsoap2.c -@@ -5463,7 +5463,7 @@ tcp_gethostbyname(struct soap *soap, const char *addr, struct hostent *hostent, - hostent = NULL; - soap->errnum = h_errno; - } --#elif (!defined(_GNU_SOURCE) || (!(~_GNU_SOURCE+1) && !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600 || defined(__ANDROID__) || defined(FREEBSD) || defined(__FreeBSD__)) && !defined(SUN_OS) && defined(HAVE_GETHOSTBYNAME_R) -+#elif defined(HAVE_GETHOSTBYNAME_R) - while ((r = gethostbyname_r(addr, hostent, tmpbuf, tmplen, &hostent, &soap->errnum)) < 0) - { - if (tmpbuf != soap->tmpbuf) -@@ -5478,8 +5478,6 @@ tcp_gethostbyname(struct soap *soap, const char *addr, struct hostent *hostent, - if (!tmpbuf) - break; - } --#elif defined(HAVE_GETHOSTBYNAME_R) -- hostent = gethostbyname_r(addr, hostent, tmpbuf, tmplen, &soap->errnum); - #elif defined(VXWORKS) - /* vxWorks compatible */ - /* If the DNS resolver library resolvLib has been configured in the vxWorks -@@ -23112,7 +23110,7 @@ soap_strerror(struct soap *soap) - { - #ifndef WIN32 - # ifdef HAVE_STRERROR_R --# if !defined(_GNU_SOURCE) || (!(~_GNU_SOURCE+1) && ((!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || (_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600))) -+# if 1 - err = strerror_r(err, soap->msgbuf, sizeof(soap->msgbuf)); /* XSI-compliant */ - if (err != 0) - soap_strcpy(soap->msgbuf, sizeof(soap->msgbuf), "unknown error"); -diff --git a/gsoap/stdsoap2.cpp b/gsoap/stdsoap2.cpp -index 654a1e1..5fd5fd6 100644 ---- a/gsoap/stdsoap2.cpp -+++ b/gsoap/stdsoap2.cpp -@@ -5430,7 +5430,7 @@ tcp_gethostbyname(struct soap *soap, const char *addr, struct hostent *hostent, - { - #if (defined(_AIX43) || defined(TRU64) || defined(HP_UX)) && defined(HAVE_GETHOSTBYNAME_R) - struct hostent_data ht_data; --#elif (!defined(_GNU_SOURCE) || (!(~_GNU_SOURCE+1) && !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600 || defined(__ANDROID__) || defined(FREEBSD) || defined(__FreeBSD__)) && defined(HAVE_GETHOSTBYNAME_R) -+#elif defined(HAVE_GETHOSTBYNAME_R) - int r; - char *tmpbuf = soap->tmpbuf; - size_t tmplen = sizeof(soap->tmpbuf); -@@ -5463,7 +5463,7 @@ tcp_gethostbyname(struct soap *soap, const char *addr, struct hostent *hostent, - hostent = NULL; - soap->errnum = h_errno; - } --#elif (!defined(_GNU_SOURCE) || (!(~_GNU_SOURCE+1) && !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600 || defined(__ANDROID__) || defined(FREEBSD) || defined(__FreeBSD__)) && !defined(SUN_OS) && defined(HAVE_GETHOSTBYNAME_R) -+#elif defined(HAVE_GETHOSTBYNAME_R) - while ((r = gethostbyname_r(addr, hostent, tmpbuf, tmplen, &hostent, &soap->errnum)) < 0) - { - if (tmpbuf != soap->tmpbuf) -@@ -5478,8 +5478,6 @@ tcp_gethostbyname(struct soap *soap, const char *addr, struct hostent *hostent, - if (!tmpbuf) - break; - } --#elif defined(HAVE_GETHOSTBYNAME_R) -- hostent = gethostbyname_r(addr, hostent, tmpbuf, tmplen, &soap->errnum); - #elif defined(VXWORKS) - /* vxWorks compatible */ - /* If the DNS resolver library resolvLib has been configured in the vxWorks -@@ -23112,13 +23110,9 @@ soap_strerror(struct soap *soap) - { - #ifndef WIN32 - # ifdef HAVE_STRERROR_R --# if !defined(_GNU_SOURCE) || (!(~_GNU_SOURCE+1) && ((!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || (_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600))) - err = strerror_r(err, soap->msgbuf, sizeof(soap->msgbuf)); /* XSI-compliant */ - if (err != 0) - soap_strcpy(soap->msgbuf, sizeof(soap->msgbuf), "unknown error"); --# else -- return strerror_r(err, soap->msgbuf, sizeof(soap->msgbuf)); /* GNU-specific */ --# endif - # else - return strerror(err); - # endif --- -2.39.2 - diff --git a/sources/meta-openembedded/meta-oe/recipes-support/gsoap/gsoap_2.8.126.bb b/sources/meta-openembedded/meta-oe/recipes-support/gsoap/gsoap_2.8.126.bb deleted file mode 100644 index 6d8b53d3..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/gsoap/gsoap_2.8.126.bb +++ /dev/null @@ -1,42 +0,0 @@ -DESCRIPTION = "The gSOAP toolkit provides a unique SOAP-to-C/C++ language binding \ -for the development of SOAP Web Services and clients." -SECTION = "devel" -LICENSE = "GPL-2.0-with-OpenSSL-exception" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=4f40a941379143186f9602242c3fb729 \ - file://GPLv2_license.txt;md5=a33672dbe491b6517750a0389063508b" - -SRC_URI = "https://prdownloads.sourceforge.net/${BPN}2/${BPN}_${PV}.zip" -SRC_URI:append:libc-musl = " file://0001-Simplify-check-for-gethostbyname_r.patch" -SRC_URI[sha256sum] = "b65190ebf8c2517d6fafbdc2000bc7bc650d921a02f4aa53eb1e3df267592c4a" - -inherit autotools - -BBCLASSEXTEND = "native" - -S = "${WORKDIR}/${BPN}-2.8" - -EXTRA_OECONF += "--enable-ipv6 --enable-c-locale" -PARALLEL_MAKE = "" - -EXTRA_OEMAKE:class-target = "SOAP=${STAGING_BINDIR_NATIVE}/soapcpp2" - -DEPENDS = "openssl zlib flex bison bison-native" -DEPENDS:append:class-target = " gsoap-native" - -do_install:append() { - install -d ${D}${libdir} - for lib in libgsoapssl libgsoapssl++ libgsoap libgsoapck++ libgsoap++ libgsoapck - do - oe_libinstall -C gsoap $lib ${D}${libdir} - done -} - -do_install:class-native() { - oe_runmake DESTDIR=${D} BINDIR=${D}${bindir} install -} - -FILES:${PN} = "${bindir}/wsdl2h ${bindir}/soapcpp2" -FILES:${PN} += "${datadir}" -FILES:${PN}-staticdev = "${libdir}" -FILES:${PN}-dev = "${includedir}" -RRECOMMENDS:${PN}-dev = "${PN}-staticdev" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/gsoap/gsoap_2.8.134.bb b/sources/meta-openembedded/meta-oe/recipes-support/gsoap/gsoap_2.8.134.bb new file mode 100644 index 00000000..5528e87e --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/gsoap/gsoap_2.8.134.bb @@ -0,0 +1,42 @@ +DESCRIPTION = "The gSOAP toolkit provides a unique SOAP-to-C/C++ language binding \ +for the development of SOAP Web Services and clients." +SECTION = "devel" +LICENSE = "GPL-2.0-with-OpenSSL-exception" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=4f40a941379143186f9602242c3fb729 \ + file://GPLv2_license.txt;md5=a33672dbe491b6517750a0389063508b" + +SRC_URI = "https://prdownloads.sourceforge.net/${BPN}2/${BPN}_${PV}.zip \ + file://0001-Provide-strtod_l-signature-on-non-glibc-linux-musl-s.patch" +SRC_URI[sha256sum] = "63478e555c0ccde0164f055ff605b02805db0abc6712a04bcb14cb617b047218" + +inherit autotools + +BBCLASSEXTEND = "native" + +S = "${WORKDIR}/${BPN}-2.8" + +EXTRA_OECONF += "--enable-ipv6 --enable-c-locale" +PARALLEL_MAKE = "" + +EXTRA_OEMAKE:class-target = "SOAP=${STAGING_BINDIR_NATIVE}/soapcpp2" + +DEPENDS = "openssl zlib flex bison bison-native" +DEPENDS:append:class-target = " gsoap-native" + +do_install:append() { + install -d ${D}${libdir} + for lib in libgsoapssl libgsoapssl++ libgsoap libgsoapck++ libgsoap++ libgsoapck + do + oe_libinstall -C gsoap $lib ${D}${libdir} + done +} + +do_install:class-native() { + oe_runmake DESTDIR=${D} BINDIR=${D}${bindir} install +} + +FILES:${PN} = "${bindir}/wsdl2h ${bindir}/soapcpp2" +FILES:${PN} += "${datadir}" +FILES:${PN}-staticdev = "${libdir}" +FILES:${PN}-dev = "${includedir}" +RRECOMMENDS:${PN}-dev = "${PN}-staticdev" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/hddtemp/hddtemp/0001-po-force-Language-header-for-fr-and-de-locals.patch b/sources/meta-openembedded/meta-oe/recipes-support/hddtemp/hddtemp/0001-po-force-Language-header-for-fr-and-de-locals.patch new file mode 100644 index 00000000..38f5c889 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/hddtemp/hddtemp/0001-po-force-Language-header-for-fr-and-de-locals.patch @@ -0,0 +1,46 @@ +From 04149f9ec9b37b5bb4c2b6c38d4560b2c122c483 Mon Sep 17 00:00:00 2001 +From: Yoann Congal +Date: Thu, 23 May 2024 23:28:42 +0200 +Subject: [PATCH] po: force Language: header for "fr" and "de" locals + +Language: header is "new" and used to be derived from Language-Team +header. But, for fr.po and de.po, Language can't be derived. + +Force "Language" header to avoid having a default Language header. + +Upstream-Status: Inactive-Upstream [lastrelease: 26-Apr-2006] +See: http://download.savannah.nongnu.org/releases/hddtemp/?C=M&O=D + +Signed-off-by: Yoann Congal +--- + po/de.po | 1 + + po/fr.po | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/po/de.po b/po/de.po +index 3b79e08..d04976b 100644 +--- a/po/de.po ++++ b/po/de.po +@@ -13,6 +13,7 @@ msgstr "" + "PO-Revision-Date: 2011-08-30 16:40+0200\n" + "Last-Translator: Vinzenz Vietzke \n" + "Language-Team: \n" ++"Language: de\n" + "MIME-Version: 1.0\n" + "Content-Type: text/plain; charset=UTF-8\n" + "Content-Transfer-Encoding: 8bit" +diff --git a/po/fr.po b/po/fr.po +index 2fd97c5..0b3bf19 100644 +--- a/po/fr.po ++++ b/po/fr.po +@@ -12,6 +12,7 @@ msgstr "" + "PO-Revision-Date: 2011-08-30 16:38+0200\n" + "Last-Translator: Aurelien Jarno \n" + "Language-Team: FRANCAIS \n" ++"Language: fr\n" + "MIME-Version: 1.0\n" + "Content-Type: text/plain; charset=ISO-8859-1\n" + "Content-Transfer-Encoding: 8bit\n" +-- +2.39.2 + diff --git a/sources/meta-openembedded/meta-oe/recipes-support/hddtemp/hddtemp_0.3-beta15.bb b/sources/meta-openembedded/meta-oe/recipes-support/hddtemp/hddtemp_0.3-beta15.bb index b204ea4d..75feccb8 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/hddtemp/hddtemp_0.3-beta15.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/hddtemp/hddtemp_0.3-beta15.bb @@ -10,6 +10,7 @@ SRC_URI = "${SAVANNAH_NONGNU_MIRROR}/hddtemp/hddtemp-0.3-beta15.tar.bz2 \ file://0001-backtrace-Replace-struct-ucontext-with-ucontext_t.patch \ file://0001-configure.ac-Rename-to-configure.ac-and-use-external.patch \ file://0001-sata.c-Declare-ata_get_powermode-prototype.patch \ + file://0001-po-force-Language-header-for-fr-and-de-locals.patch \ file://hddtemp.db \ file://init \ " @@ -25,9 +26,9 @@ FILES:${PN} += "/usr/share/misc/hddtemp.db" do_install:append() { install -d ${D}/usr/share/misc/ - install -m 0644 ${WORKDIR}/hddtemp.db ${D}/usr/share/misc/hddtemp.db + install -m 0644 ${UNPACKDIR}/hddtemp.db ${D}/usr/share/misc/hddtemp.db install -d ${D}${sysconfdir}/init.d - install -m 0644 ${WORKDIR}/init ${D}${sysconfdir}/init.d/hddtemp + install -m 0644 ${UNPACKDIR}/init ${D}${sysconfdir}/init.d/hddtemp } INITSCRIPT_NAME = "hddtemp" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/hunspell/hunspell-dictionaries.bb b/sources/meta-openembedded/meta-oe/recipes-support/hunspell/hunspell-dictionaries.bb index 0ec426af..ed342d67 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/hunspell/hunspell-dictionaries.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/hunspell/hunspell-dictionaries.bb @@ -135,7 +135,10 @@ RDEPENDS:${PN} = "hunspell" PV = "0.0.0+git" SRCREV = "820a65e539e34a3a8c2a855d2450b84745c624ee" -SRC_URI = "git://github.com/wooorm/dictionaries.git;branch=master;protocol=https" +SRC_URI = "git://github.com/wooorm/dictionaries.git;branch=main;protocol=https" + +# Upstream repo does not tag +UPSTREAM_CHECK_COMMITS = "1" S = "${WORKDIR}/git" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/hwdata/hwdata_0.381.bb b/sources/meta-openembedded/meta-oe/recipes-support/hwdata/hwdata_0.381.bb deleted file mode 100644 index 291b2737..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/hwdata/hwdata_0.381.bb +++ /dev/null @@ -1,26 +0,0 @@ -DESCRIPTION = "Hardware identification and configuration data" -HOMEPAGE = "https://github.com/vcrhonek/hwdata" -SECTION = "System/Base" - -LICENSE = "GPL-2.0-or-later | XFree86-1.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=1556547711e8246992b999edd9445a57" - -SRCREV = "4463530857af32d9dbfcfa9939c2304b51e5e58d" -SRC_URI = "git://github.com/vcrhonek/${BPN}.git;branch=master;protocol=https" - -S = "${WORKDIR}/git" - -inherit allarch - -do_configure() { - ${S}/configure --datadir=${datadir} --libdir=${libdir} -} - -do_compile[noexec] = "1" - -do_install() { - oe_runmake install DESTDIR=${D} -} - -FILES:${PN} = "${libdir}/* \ - ${datadir}/* " diff --git a/sources/meta-openembedded/meta-oe/recipes-support/hwdata/hwdata_0.387.bb b/sources/meta-openembedded/meta-oe/recipes-support/hwdata/hwdata_0.387.bb new file mode 100644 index 00000000..d73bb93a --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/hwdata/hwdata_0.387.bb @@ -0,0 +1,26 @@ +DESCRIPTION = "Hardware identification and configuration data" +HOMEPAGE = "https://github.com/vcrhonek/hwdata" +SECTION = "System/Base" + +LICENSE = "GPL-2.0-or-later | XFree86-1.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=1556547711e8246992b999edd9445a57" + +SRCREV = "f0ba62c0b0401c215aed8abb42cf7dcdb7e6fecc" +SRC_URI = "git://github.com/vcrhonek/${BPN}.git;branch=master;protocol=https" + +S = "${WORKDIR}/git" + +inherit allarch + +do_configure() { + ${S}/configure --datadir=${datadir} --libdir=${libdir} +} + +do_compile[noexec] = "1" + +do_install() { + oe_runmake install DESTDIR=${D} +} + +FILES:${PN} = "${libdir}/* \ + ${datadir}/* " diff --git a/sources/meta-openembedded/meta-oe/recipes-support/iksemel/iksemel_1.5.bb b/sources/meta-openembedded/meta-oe/recipes-support/iksemel/iksemel_1.5.bb index 017e7d26..b27c2b2e 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/iksemel/iksemel_1.5.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/iksemel/iksemel_1.5.bb @@ -11,6 +11,9 @@ SRC_URI = "git://github.com/meduketto/iksemel.git;protocol=https;branch=master \ file://fix-configure-option-parsing.patch \ file://avoid-obsolete-gnutls-apis.patch" +# The current PV is not a git tag but a README content +UPSTREAM_CHECK_COMMITS = "1" + S = "${WORKDIR}/git" inherit autotools pkgconfig lib_package texinfo diff --git a/sources/meta-openembedded/meta-oe/recipes-support/imagemagick/imagemagick_7.1.1.bb b/sources/meta-openembedded/meta-oe/recipes-support/imagemagick/imagemagick_7.1.1.bb index 752fef30..5407c4e4 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/imagemagick/imagemagick_7.1.1.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/imagemagick/imagemagick_7.1.1.bb @@ -36,24 +36,13 @@ PACKAGECONFIG[x11] = "--with-x,--without-x,virtual/libx11 libxext libxt" PACKAGECONFIG[xml] = "--with-xml,--without-xml,libxml2" do_install:append:class-target() { - for file in MagickCore-config.im7 MagickWand-config.im7; do - sed -i 's,${STAGING_DIR_TARGET},,g' "${D}${bindir}/$file" + for file in MagickCore-config.im7 MagickWand-config.im7 Magick++-config.im7; do + sed -i 's,${STAGING_DIR_TARGET},,g' ${D}${bindir}/"$file" done - - if ${@bb.utils.contains('PACKAGECONFIG', 'cxx', 'true', 'false', d)}; then - sed -i 's,${STAGING_DIR_TARGET},,g' "${D}${bindir}/Magick++-config.im7" - fi - - if ${@bb.utils.contains('PACKAGECONFIG', 'xml', 'true', 'false', d)}; then - xml_config="${D}${libdir}/ImageMagick-${BASE_PV}/config-Q16HDRI/configure.xml" - sed -i 's,${S},,g' "$xml_config" - sed -i 's,${B},,g' "$xml_config" - sed -i 's,${RECIPE_SYSROOT},,g' "$xml_config" - fi - - if ${@bb.utils.contains_any('PACKAGECONFIG', 'webp openjpeg', 'true', 'false', d)}; then - sed -i 's,${HOSTTOOLS_DIR},${bindir},g' "${D}${sysconfdir}/ImageMagick-7/delegates.xml" - fi + sed -i 's,${S},,g' ${D}${libdir}/ImageMagick-${BASE_PV}/config-Q16HDRI/configure.xml + sed -i 's,${B},,g' ${D}${libdir}/ImageMagick-${BASE_PV}/config-Q16HDRI/configure.xml + sed -i 's,${RECIPE_SYSROOT},,g' ${D}${libdir}/ImageMagick-${BASE_PV}/config-Q16HDRI/configure.xml + sed -i 's,${HOSTTOOLS_DIR},${bindir},g' ${D}${sysconfdir}/ImageMagick-7/delegates.xml } FILES:${PN} += "${libdir}/ImageMagick-${BASE_PV}/config-Q16* \ diff --git a/sources/meta-openembedded/meta-oe/recipes-support/imx-cst/imx-cst_3.4.0.bb b/sources/meta-openembedded/meta-oe/recipes-support/imx-cst/imx-cst_3.4.0.bb new file mode 100644 index 00000000..c4b7ce03 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/imx-cst/imx-cst_3.4.0.bb @@ -0,0 +1,39 @@ +SUMMARY = "i.MX code signing tool" +DESCRIPTION = "Code signing support that integrates the HABv4 and AHAB library for i.MX processors" +LICENSE = "BSD-3-Clause & Apache-2.0" + +LIC_FILES_CHKSUM = "\ + file://LICENSE.bsd3;md5=14aba05f9fa6c25527297c8aac95fcf6 \ + file://LICENSE.hidapi;md5=e0ea014f523f64f0adb13409055ee59e \ + file://LICENSE.openssl;md5=3441526b1df5cc01d812c7dfc218cea6 \ +" + +DEPENDS = "byacc-native flex-native openssl" + +# debian: 3.4.0+dfsg-2 +DEBIAN_PGK_NAME = "imx-code-signing-tool" +DEBIAN_PGK_VERSION = "${PV}+dfsg" + +SRC_URI = "\ + ${DEBIAN_MIRROR}/main/i/${DEBIAN_PGK_NAME}/${DEBIAN_PGK_NAME}_${DEBIAN_PGK_VERSION}.orig.tar.xz \ +" + +SRC_URI[sha256sum] = "52ee3cee3bc500a42095f73c4584e223b4b9d2dfc1cd3e5df965c5952eba8c8d" + +S = "${WORKDIR}/${DEBIAN_PGK_NAME}-${DEBIAN_PGK_VERSION}" + +EXTRA_OEMAKE = 'CC="${CC}" LD="${CC}" AR="${AR}" OBJCOPY="${OBJCOPY}"' + +do_compile() { + oe_runmake -C code/obj.linux64 OSTYPE=linux64 ENCRYPTION=yes COPTIONS="${CFLAGS} ${CPPFLAGS}" LDOPTIONS="${LDFLAGS}" + oe_runmake -C add-ons/hab_csf_parser COPTS="${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" +} + +do_install () { + install -d ${D}${bindir} + install -m 755 ${S}/code/obj.linux64/cst ${D}${bindir}/ + install -m 755 ${S}/code/obj.linux64/srktool ${D}${bindir} + install -m 755 ${S}/add-ons/hab_csf_parser/csf_parser ${D}${bindir} +} + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/iniparser/iniparser/0001-iniparser.pc-Make-libpath-a-variable.patch b/sources/meta-openembedded/meta-oe/recipes-support/iniparser/iniparser/0001-iniparser.pc-Make-libpath-a-variable.patch deleted file mode 100644 index 4824344f..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/iniparser/iniparser/0001-iniparser.pc-Make-libpath-a-variable.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 1761298b73c759c07e4652ada307f68512a75ff1 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 25 Mar 2022 20:44:41 -0700 -Subject: [PATCH] iniparser.pc: Make libpath a variable - -Will set according to baselib that yocto exports. - -Upstream-Status: Inappropriate [OE-specific] -Signed-off-by: Khem Raj ---- - iniparser.pc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/iniparser.pc -+++ b/iniparser.pc -@@ -1,6 +1,6 @@ - prefix=/usr - exec_prefix=/usr --libdir=${exec_prefix}/lib -+libdir=${exec_prefix}/@baselib@ - includedir=${prefix}/include - datarootdir=${prefix}/share - datadir=${datarootdir} diff --git a/sources/meta-openembedded/meta-oe/recipes-support/iniparser/iniparser/Add-CMake-support.patch b/sources/meta-openembedded/meta-oe/recipes-support/iniparser/iniparser/Add-CMake-support.patch deleted file mode 100644 index 46c1b0f7..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/iniparser/iniparser/Add-CMake-support.patch +++ /dev/null @@ -1,65 +0,0 @@ -Origin: Debian packaging -From: Klee Dienes -Date: Thu, 13 Feb 2014 07:03:26 -0500 -Subject: Add CMake support. - ---- -Upstream-Status: Pending - - CMakeLists.txt | 44 ++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 44 insertions(+) - create mode 100644 CMakeLists.txt - ---- /dev/null -+++ b/CMakeLists.txt -@@ -0,0 +1,50 @@ -+cmake_minimum_required (VERSION 2.8.8) -+ -+project (iniparser) -+include (GNUInstallDirs) -+ -+include_directories (src) -+ -+set(INIPARSER_SRCS src/dictionary.c src/iniparser.c) -+set(INIPARSER_HDRS src/dictionary.h src/iniparser.h) -+ -+add_library(iniparser-shared SHARED ${INIPARSER_SRCS} ${INIPARSER_HDRS}) -+add_library(iniparser-static STATIC ${INIPARSER_SRCS} ${INIPARSER_HDRS}) -+ -+set_target_properties(iniparser-shared PROPERTIES SOVERSION 1) -+set_target_properties(iniparser-shared PROPERTIES OUTPUT_NAME iniparser) -+set_target_properties(iniparser-static PROPERTIES OUTPUT_NAME iniparser) -+ -+install (TARGETS iniparser-shared -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) -+ -+install (TARGETS iniparser-static -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) -+ -+find_package(Doxygen) -+if (NOT DOXYGEN_FOUND) -+message(FATAL_ERROR "Doxygen is needed to build the documentation. Please install it correctly") -+endif() -+ -+file (WRITE ${CMAKE_CURRENT_BINARY_DIR}/iniparser.dox -+ "@INCLUDE = ${CMAKE_CURRENT_SOURCE_DIR}/doc/iniparser.dox\n" -+ "OUTPUT_DIRECTORY = ${CMAKE_CURRENT_BINARY_DIR}\n" -+ ) -+ -+add_custom_target (doc ALL -+ COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/iniparser.dox -+ SOURCES doc/iniparser.dox) -+ -+enable_testing() -+ -+add_test(NAME testsuite -+ COMMAND make -+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/test) -+ -+install (FILES ${INIPARSER_HDRS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/iniparser) -+ -+install (DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html DESTINATION ${CMAKE_INSTALL_DOCDIR}) diff --git a/sources/meta-openembedded/meta-oe/recipes-support/iniparser/iniparser/CVE-2023-33461.patch b/sources/meta-openembedded/meta-oe/recipes-support/iniparser/iniparser/CVE-2023-33461.patch deleted file mode 100644 index db5fb06a..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/iniparser/iniparser/CVE-2023-33461.patch +++ /dev/null @@ -1,48 +0,0 @@ -CVE: CVE-2023-33461 -Upstream-Status: Backport [https://github.com/ndevilla/iniparser/pull/146/commits/ace9871f65d11b5d73f0b9ee8cf5d2807439442d] -Signed-off-by: Lee Chee Yang - - -From ace9871f65d11b5d73f0b9ee8cf5d2807439442d Mon Sep 17 00:00:00 2001 -From: Antonio -Date: Fri, 2 Jun 2023 15:03:10 -0300 -Subject: [PATCH] Handle null return from iniparser_getstring - -Fix handling of NULL returns from iniparser_getstring in -iniparser_getboolean, iniparser_getlongint and iniparser_getdouble, -avoiding a crash. ---- - src/iniparser.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/src/iniparser.c b/src/iniparser.c -index f1d1658..dbceb20 100644 ---- a/src/iniparser.c -+++ b/src/iniparser.c -@@ -456,7 +456,7 @@ long int iniparser_getlongint(const dictionary * d, const char * key, long int n - const char * str ; - - str = iniparser_getstring(d, key, INI_INVALID_KEY); -- if (str==INI_INVALID_KEY) return notfound ; -+ if (str==NULL || str==INI_INVALID_KEY) return notfound ; - return strtol(str, NULL, 0); - } - -@@ -511,7 +511,7 @@ double iniparser_getdouble(const dictionary * d, const char * key, double notfou - const char * str ; - - str = iniparser_getstring(d, key, INI_INVALID_KEY); -- if (str==INI_INVALID_KEY) return notfound ; -+ if (str==NULL || str==INI_INVALID_KEY) return notfound ; - return atof(str); - } - -@@ -553,7 +553,7 @@ int iniparser_getboolean(const dictionary * d, const char * key, int notfound) - const char * c ; - - c = iniparser_getstring(d, key, INI_INVALID_KEY); -- if (c==INI_INVALID_KEY) return notfound ; -+ if (c==NULL || c==INI_INVALID_KEY) return notfound ; - if (c[0]=='y' || c[0]=='Y' || c[0]=='1' || c[0]=='t' || c[0]=='T') { - ret = 1 ; - } else if (c[0]=='n' || c[0]=='N' || c[0]=='0' || c[0]=='f' || c[0]=='F') { diff --git a/sources/meta-openembedded/meta-oe/recipes-support/iniparser/iniparser/CVE-2025-0633.patch b/sources/meta-openembedded/meta-oe/recipes-support/iniparser/iniparser/CVE-2025-0633.patch deleted file mode 100644 index a9d2a19b..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/iniparser/iniparser/CVE-2025-0633.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 072a39a772a38c475e35a1be311304ca99e9de7f Mon Sep 17 00:00:00 2001 -From: Lars Möllendorf -Date: Sun, 26 Jan 2025 08:48:23 +0100 -Subject: [PATCH] Fix heap overflow in `iniparser_dumpsection_ini()` - -...reported in #177 - -As suggested by the issue reporter this is fixed by returning from -`iniparser_dumpsection_ini()` in case the length of the passed section name -of dictionary to dump was bigger than the size of the internal buffer used -to copy this string to. - -Changelog: changed - -CVE: CVE-2025-0633 - -Upstream-Status: Backport [https://gitlab.com/iniparser/iniparser/-/commit/072a39a772a38c475e35a1be311304ca99e9de7f] - -Signed-off-by: Soumya Sambu ---- - src/iniparser.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/iniparser.c b/src/iniparser.c -index dbceb20..2aeecf4 100644 ---- a/src/iniparser.c -+++ b/src/iniparser.c -@@ -301,6 +301,7 @@ void iniparser_dumpsection_ini(const dictionary * d, const char * s, FILE * f) - - if (d==NULL || f==NULL) return ; - if (! iniparser_find_entry(d, s)) return ; -+ if (strlen(s) > sizeof(keym)) return; - - seclen = (int)strlen(s); - fprintf(f, "\n[%s]\n", s); --- -2.40.0 diff --git a/sources/meta-openembedded/meta-oe/recipes-support/iniparser/iniparser_4.1.bb b/sources/meta-openembedded/meta-oe/recipes-support/iniparser/iniparser_4.1.bb deleted file mode 100644 index 13a3a1f9..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/iniparser/iniparser_4.1.bb +++ /dev/null @@ -1,29 +0,0 @@ -SUMMARY = "The iniParser library is a simple C library offering INI file parsing services (both reading and writing)." -SECTION = "libs" -HOMEPAGE = "https://github.com/ndevilla/iniparser" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=e02baf71c76e0650e667d7da133379ac" - -DEPENDS = "doxygen-native" - -PV .= "+git" - -SRC_URI = "git://github.com/ndevilla/iniparser.git;protocol=https;branch=master \ - file://0001-iniparser.pc-Make-libpath-a-variable.patch \ - file://Add-CMake-support.patch \ - file://CVE-2023-33461.patch \ - file://CVE-2025-0633.patch \ -" - -SRCREV= "deb85ad4936d4ca32cc2260ce43323d47936410d" - -S = "${WORKDIR}/git" - -inherit cmake - -do_install:append() { - install -Dm 0644 ${S}/iniparser.pc ${D}${libdir}/pkgconfig/iniparser.pc - sed -i -e 's,@baselib@,${baselib},g' ${D}${libdir}/pkgconfig/iniparser.pc -} - -BBCLASSEXTEND += "native" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/iniparser/iniparser_4.2.4.bb b/sources/meta-openembedded/meta-oe/recipes-support/iniparser/iniparser_4.2.4.bb new file mode 100644 index 00000000..aeac9c30 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/iniparser/iniparser_4.2.4.bb @@ -0,0 +1,18 @@ +SUMMARY = "The iniParser library is a simple C library offering INI file parsing services (both reading and writing)." +SECTION = "libs" +HOMEPAGE = "https://gitlab.com/iniparser/iniparser" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=8474d3b745f77e203f1fc82fb0bb7678" +SRCBRANCH = "main" +SRCREV = "4e5d1cc10215ce328c61bb5fd7839746e47375f9" + +SRC_URI = "git://gitlab.com/iniparser/iniparser.git;protocol=https;branch=${SRCBRANCH}" +S = "${WORKDIR}/git" + +inherit cmake + +EXTRA_OECMAKE = " \ + -DBUILD_DOCS=OFF \ + " + +FILES_${PN}-staticdev += "${libdir}/cmake/iniparser/iniparser-staticTargets*.cmake" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/lcov/lcov_1.16.bb b/sources/meta-openembedded/meta-oe/recipes-support/lcov/lcov_1.16.bb index 81b80790..4f35eff9 100755 --- a/sources/meta-openembedded/meta-oe/recipes-support/lcov/lcov_1.16.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/lcov/lcov_1.16.bb @@ -9,13 +9,13 @@ LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" RDEPENDS:${PN} += " \ - libjson-perl \ perl \ - perl-module-compress-zlib \ - perl-module-constant \ - perl-module-cwd \ + perl-module-filehandle \ + perl-module-getopt-std \ perl-module-digest-md5 \ perl-module-digest-sha \ + perl-module-constant \ + perl-module-cwd \ perl-module-errno \ perl-module-file-basename \ perl-module-file-copy \ @@ -25,16 +25,12 @@ RDEPENDS:${PN} += " \ perl-module-file-spec-functions \ perl-module-file-spec-unix \ perl-module-file-temp \ - perl-module-filehandle \ perl-module-getopt-long \ - perl-module-getopt-std \ perl-module-list-util \ - perl-module-load \ - perl-module-metadata \ perl-module-mro \ perl-module-overload \ - perl-module-overload-numbers \ perl-module-overloading \ + perl-module-overload-numbers \ perl-module-parent \ perl-module-pod-usage \ perl-module-posix \ diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libbytesize/libbytesize_2.10.bb b/sources/meta-openembedded/meta-oe/recipes-support/libbytesize/libbytesize_2.10.bb deleted file mode 100644 index daa01bfc..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/libbytesize/libbytesize_2.10.bb +++ /dev/null @@ -1,29 +0,0 @@ -DESCRIPTION = "The goal of this project is to provide a tiny library that would \ -facilitate the common operations with sizes in bytes." -HOMEPAGE = "https://github.com/rhinstaller/libbytesize" -LICENSE = "LGPL-2.0-or-later" -SECTION = "devel/lib" - -LIC_FILES_CHKSUM = "file://LICENSE;md5=c07cb499d259452f324bb90c3067d85c" - -S = "${WORKDIR}/git" - -SRCREV = "6e83cc6f6dff4f126fc79284e0c3c1c50123380d" -SRC_URI = "git://github.com/storaged-project/libbytesize;branch=main;protocol=https" - -inherit gettext autotools pkgconfig python3native - -DEPENDS += " \ - libpcre2 \ - gmp \ - mpfr \ - gettext-native \ -" - -FILES:${PN} += "${PYTHON_SITEPACKAGES_DIR}/bytesize" - -PACKAGECONFIG ??= "python3" -PACKAGECONFIG[python3] = "--with-python3, --without-python3,,python3-core" - -EXTRA_OECONF = "--without-gtk-doc" -EXTRA_OEMAKE = "py3libdir=${PYTHON_SITEPACKAGES_DIR}" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libbytesize/libbytesize_2.11.bb b/sources/meta-openembedded/meta-oe/recipes-support/libbytesize/libbytesize_2.11.bb new file mode 100644 index 00000000..214c2b28 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/libbytesize/libbytesize_2.11.bb @@ -0,0 +1,29 @@ +DESCRIPTION = "The goal of this project is to provide a tiny library that would \ +facilitate the common operations with sizes in bytes." +HOMEPAGE = "https://github.com/rhinstaller/libbytesize" +LICENSE = "LGPL-2.0-or-later" +SECTION = "devel/lib" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=c07cb499d259452f324bb90c3067d85c" + +S = "${WORKDIR}/git" + +SRCREV = "9da72b2732508b0ba0ceed27f5e50bc276ef31f2" +SRC_URI = "git://github.com/storaged-project/libbytesize;branch=main;protocol=https" + +inherit gettext autotools pkgconfig python3native + +DEPENDS += " \ + libpcre2 \ + gmp \ + mpfr \ + gettext-native \ +" + +FILES:${PN} += "${PYTHON_SITEPACKAGES_DIR}/bytesize" + +PACKAGECONFIG ??= "python3" +PACKAGECONFIG[python3] = "--with-python3, --without-python3,,python3-core" + +EXTRA_OECONF = "--without-gtk-doc" +EXTRA_OEMAKE = "py3libdir=${PYTHON_SITEPACKAGES_DIR}" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libcereal/files/0001-Fix-instances-of-Wmissing-template-arg-list-after-te.patch b/sources/meta-openembedded/meta-oe/recipes-support/libcereal/files/0001-Fix-instances-of-Wmissing-template-arg-list-after-te.patch new file mode 100644 index 00000000..86ee6902 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/libcereal/files/0001-Fix-instances-of-Wmissing-template-arg-list-after-te.patch @@ -0,0 +1,41 @@ +From 395cd70a8c28a4ea408a227d745fe20ed8af9105 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 10 Sep 2024 18:11:40 -0700 +Subject: [PATCH] Fix instances of + -Wmissing-template-arg-list-after-template-kw. + +Clang has a new warning that requires a template argument list after using +the template keyword. Remove uses of the template keyword when we're not +specifying types. + +See https://github.com/llvm/llvm-project/issues/94194 for the upstream +clang changes + +Upstream-Status: Submitted [https://github.com/USCiLab/cereal/pull/835] +Signed-off-by: Khem Raj +--- + include/cereal/types/tuple.hpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/include/cereal/types/tuple.hpp b/include/cereal/types/tuple.hpp +index 80c68075..5c79eca9 100644 +--- a/include/cereal/types/tuple.hpp ++++ b/include/cereal/types/tuple.hpp +@@ -95,7 +95,7 @@ namespace cereal + template inline + static void apply( Archive & ar, std::tuple & tuple ) + { +- serialize::template apply( ar, tuple ); ++ serialize::apply( ar, tuple ); + ar( CEREAL_NVP_(tuple_element_name::c_str(), + std::get( tuple )) ); + } +@@ -116,7 +116,7 @@ namespace cereal + template inline + void CEREAL_SERIALIZE_FUNCTION_NAME( Archive & ar, std::tuple & tuple ) + { +- tuple_detail::serialize>::value>::template apply( ar, tuple ); ++ tuple_detail::serialize>::value>::apply( ar, tuple ); + } + } // namespace cereal + diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libcereal/libcereal_1.3.2.bb b/sources/meta-openembedded/meta-oe/recipes-support/libcereal/libcereal_1.3.2.bb index 6ad20d63..c2ab0d61 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/libcereal/libcereal_1.3.2.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/libcereal/libcereal_1.3.2.bb @@ -22,6 +22,7 @@ SRC_URI = "git://github.com/USCiLab/cereal.git;branch=master;protocol=https \ file://0001-sandbox-Do-not-use-int8_t-in-std-uniform_int_distrib.patch \ file://0001-cmake-Use-idirafter-instead-of-isystem.patch \ file://0001-doctest-Do-not-use-unnamed-class.patch \ + file://0001-Fix-instances-of-Wmissing-template-arg-list-after-te.patch \ file://run-ptest \ " diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libconfuse/files/0001-only-apply-search-path-logic-to-relative-pathnames.patch b/sources/meta-openembedded/meta-oe/recipes-support/libconfuse/files/0001-only-apply-search-path-logic-to-relative-pathnames.patch new file mode 100644 index 00000000..aa9fab86 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/libconfuse/files/0001-only-apply-search-path-logic-to-relative-pathnames.patch @@ -0,0 +1,48 @@ +From b684f4cc25821b6e86a58576f864e4b12dfdfecc Mon Sep 17 00:00:00 2001 +From: Rasmus Villemoes +Date: Sat, 5 Jun 2021 22:57:51 +0200 +Subject: [PATCH] only apply search path logic to relative pathnames + +Adding any directory to the search path via cfg_add_searchpath breaks +lookup of absolute paths. So change the logic in cfg_searchpath() to +ignore the search path when the given filename is absolute, and merely +check that for existence. + +This is technically an ABI change, but the current behaviour is quite +unusual and unexpected. + +Upstream-Status: Backport [https://github.com/libconfuse/libconfuse/pull/155] + +Signed-off-by: Rasmus Villemoes +--- + src/confuse.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/src/confuse.c b/src/confuse.c +index 2ea0254..19b56e3 100644 +--- a/src/confuse.c ++++ b/src/confuse.c +@@ -1746,12 +1746,20 @@ DLLIMPORT char *cfg_searchpath(cfg_searchpath_t *p, const char *file) + return NULL; + } + ++ if (file[0] == '/') { ++ fullpath = strdup(file); ++ if (!fullpath) ++ return NULL; ++ goto check; ++ } ++ + if ((fullpath = cfg_searchpath(p->next, file)) != NULL) + return fullpath; + + if ((fullpath = cfg_make_fullpath(p->dir, file)) == NULL) + return NULL; + ++check: + #ifdef HAVE_SYS_STAT_H + err = stat((const char *)fullpath, &st); + if ((!err) && S_ISREG(st.st_mode)) +-- +2.31.1 + diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libconfuse/libconfuse_3.3.bb b/sources/meta-openembedded/meta-oe/recipes-support/libconfuse/libconfuse_3.3.bb new file mode 100644 index 00000000..e6f28c7b --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/libconfuse/libconfuse_3.3.bb @@ -0,0 +1,14 @@ +SUMMARY = "libConfuse is a configuration file parser library" +LICENSE = "ISC" +LIC_FILES_CHKSUM = "file://LICENSE;md5=42fa47330d4051cd219f7d99d023de3a" + +SRC_URI = "https://github.com/libconfuse/libconfuse/releases/download/v${PV}/confuse-${PV}.tar.gz" +SRC_URI[sha256sum] = "3a59ded20bc652eaa8e6261ab46f7e483bc13dad79263c15af42ecbb329707b8" + +SRC_URI += "file://0001-only-apply-search-path-logic-to-relative-pathnames.patch" + +inherit autotools-brokensep pkgconfig gettext + +S = "${WORKDIR}/confuse-${PV}" + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libee/libee.inc b/sources/meta-openembedded/meta-oe/recipes-support/libee/libee.inc deleted file mode 100644 index 16fe557f..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/libee/libee.inc +++ /dev/null @@ -1,39 +0,0 @@ -SUMMARY = "An Event Expression Library inspired by CEE" -DESCRIPTION = "The core idea of libee is to provide a small \ -but hopefully convenient API layer above the CEE standard." - -HOMEPAGE = "http://www.libee.org" -SECTION = "base" - -LICENSE = "LGPL-2.1-or-later" -LIC_FILES_CHKSUM = "file://COPYING;md5=1c2687de35e36ba3b999136236a66cd6" - -SRC_URI = "http://www.libee.org/download/files/download/${BPN}-${PV}.tar.gz\ - file://libee-parallel-make.patch \ - file://run-ptest \ - file://ezapi1.sh \ -" - -inherit autotools ptest pkgconfig - -DEPENDS += "libestr" - -PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'testbench', '', d)}" - -PACKAGECONFIG[debug] = "--enable-debug,--disable-debug,," -PACKAGECONFIG[testbench] = "--enable-testbench,--disable-testbench,," - -TESTDIR = "tests" - -# We presume the tests we are going to install so just build them directly. -# -do_compile_ptest() { - oe_runmake -C ${TESTDIR} genfile ezapi1 -} - -do_install_ptest() { - install -d ${D}${PTEST_PATH} - install -m 0755 ${B}/${TESTDIR}/genfile ${D}${PTEST_PATH} - install -m 0755 ${B}/${TESTDIR}/.libs/ezapi1 ${D}${PTEST_PATH} - install -m 0755 ${WORKDIR}/ezapi1.sh ${D}${PTEST_PATH} -} diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libee/libee/ezapi1.sh b/sources/meta-openembedded/meta-oe/recipes-support/libee/libee/ezapi1.sh deleted file mode 100755 index e9db5e61..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/libee/libee/ezapi1.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -# -echo --------------------------------------------------------------------------- -echo A very basic test for the event class -echo --------------------------------------------------------------------------- -rm -f infile -./genfile 100 > infile -./ezapi1 -iinfile -if [ $? -ne 0 ] ; then - echo "FAIL: $0" - exit 1 -fi -echo "PASS: $0" -rm -f infile diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libee/libee/libee-parallel-make.patch b/sources/meta-openembedded/meta-oe/recipes-support/libee/libee/libee-parallel-make.patch deleted file mode 100644 index 8bb23aaf..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/libee/libee/libee-parallel-make.patch +++ /dev/null @@ -1,20 +0,0 @@ -fix parallel compiling problem - -without specifying libee_convert_DEPENDENCIES = libee.la, libee_convert -can't find libee.la when linking as libee is not generated yet. - -Upstream-Status: Pending - -Signed-off-by: Yao Zhao ---- -diff --git a/src/Makefile.am b/src/Makefile.am -index 08aaa9e..f0c78f7 100644 ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -46,5 +46,6 @@ libee_la_LDFLAGS = -version-info 0:0:0 - libee_convert_SOURCES = convert.c - libee_convert_CPPFLAGS = -I$(top_srcdir) $(LIBEE_CFLAGS) $(LIBESTR_CFLAGS) $(LIBXML2_CFLAGS) - libee_convert_LDADD = $(LIBEE_LIBS) $(LIBXML2_LIBS) $(LIBESTR_LIBS) -+libee_convert_DEPENDENCIES = libee.la - - include_HEADERS = diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libee/libee/run-ptest b/sources/meta-openembedded/meta-oe/recipes-support/libee/libee/run-ptest deleted file mode 100755 index 3cb66076..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/libee/libee/run-ptest +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -# -./ezapi1.sh diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libee/libee_0.4.1.bb b/sources/meta-openembedded/meta-oe/recipes-support/libee/libee_0.4.1.bb deleted file mode 100644 index ef2c20db..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/libee/libee_0.4.1.bb +++ /dev/null @@ -1,4 +0,0 @@ -require ${BPN}.inc - -SRC_URI[md5sum] = "7bbf4160876c12db6193c06e2badedb2" -SRC_URI[sha256sum] = "c0dac01938593deee06c3d161e4eda4ecc0fd7317e1321bd96e301aceb7fb027" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libeigen/libeigen_3.4.0.bb b/sources/meta-openembedded/meta-oe/recipes-support/libeigen/libeigen_3.4.0.bb index d7c11712..998a396a 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/libeigen/libeigen_3.4.0.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/libeigen/libeigen_3.4.0.bb @@ -1,10 +1,10 @@ DESCRIPTION = "Eigen is a C++ template library for linear algebra: matrices, vectors, numerical solvers, and related algorithms." HOMEPAGE = "http://eigen.tuxfamily.org/" -LICENSE = "MPL-2.0 & Apache-2.0 & BSD-3-Clause & GPL-2.0-only & MINPACK" +LICENSE = "MPL-2.0 & Apache-2.0 & BSD-3-Clause & GPL-2.0-only & Minpack" # The GPL code is only used for benchmark tests and does not affect what is installed. -LICENSE:${PN} = "MPL-2.0 & Apache-2.0 & BSD-3-Clause & MINPACK" -LICENSE:${PN}-dbg = "MPL-2.0 & Apache-2.0 & BSD-3-Clause & MINPACK" -LICENSE:${PN}-dev = "MPL-2.0 & Apache-2.0 & BSD-3-Clause & MINPACK" +LICENSE:${PN} = "MPL-2.0 & Apache-2.0 & BSD-3-Clause & Minpack" +LICENSE:${PN}-dbg = "MPL-2.0 & Apache-2.0 & BSD-3-Clause & Minpack" +LICENSE:${PN}-dev = "MPL-2.0 & Apache-2.0 & BSD-3-Clause & Minpack" LIC_FILES_CHKSUM = "file://COPYING.MPL2;md5=815ca599c9df247a0c7f619bab123dad \ file://COPYING.APACHE;md5=8de23b8e93c63005353056b2475e9aa5 \ file://COPYING.BSD;md5=2dd0510ee95e59ca28834b875bc96596 \ diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libfido2/libfido2_1.14.0.bb b/sources/meta-openembedded/meta-oe/recipes-support/libfido2/libfido2_1.14.0.bb deleted file mode 100644 index d453d0ab..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/libfido2/libfido2_1.14.0.bb +++ /dev/null @@ -1,23 +0,0 @@ -SUMMARY = "FIDO 2.0 support library" -DESCRIPTION = "libfido2 provides library functionality and command-line tools to \ -communicate with a FIDO device over USB, and to verify attestation and \ -assertion signatures." -HOMEPAGE = "https://developers.yubico.com/libfido2" -LICENSE = "BSD-2-Clause" -SECTION = "libs/network" -DEPENDS = "libcbor openssl zlib udev" - -LIC_FILES_CHKSUM = "file://LICENSE;md5=5f14cb32bdf2b87063e0a2d20c4178d0" - -SRC_URI = "https://developers.yubico.com/${BPN}/Releases/${BPN}-${PV}.tar.gz" -SRC_URI[sha256sum] = "3601792e320032d428002c4cce8499a4c7b803319051a25a0c9f1f138ffee45a" - -inherit cmake pkgconfig manpages - -PACKAGECONFIG[manpages] = "-DBUILD_MANPAGES:BOOL=ON,-DBUILD_MANPAGES:BOOL=OFF" - -EXTRA_OECMAKE = "-DUDEV_RULES_DIR=${nonarch_base_libdir}/udev/rules.d -DBUILD_EXAMPLES:BOOL=OFF" - -PACKAGE_BEFORE_PN = "${PN}-tools" - -FILES:${PN}-tools = "${bindir}/fido2-*" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libfido2/libfido2_1.15.0.bb b/sources/meta-openembedded/meta-oe/recipes-support/libfido2/libfido2_1.15.0.bb new file mode 100644 index 00000000..74844855 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/libfido2/libfido2_1.15.0.bb @@ -0,0 +1,23 @@ +SUMMARY = "FIDO 2.0 support library" +DESCRIPTION = "libfido2 provides library functionality and command-line tools to \ +communicate with a FIDO device over USB, and to verify attestation and \ +assertion signatures." +HOMEPAGE = "https://developers.yubico.com/libfido2" +LICENSE = "BSD-2-Clause" +SECTION = "libs/network" +DEPENDS = "libcbor openssl zlib udev" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=20be19aaa222f71738712b26f7f8717b" + +SRC_URI = "https://developers.yubico.com/${BPN}/Releases/${BPN}-${PV}.tar.gz" +SRC_URI[sha256sum] = "abaab1318d21d262ece416fb8a7132fa9374bda89f6fa52b86a98a2f5712b61e" + +inherit cmake pkgconfig manpages + +PACKAGECONFIG[manpages] = "-DBUILD_MANPAGES:BOOL=ON,-DBUILD_MANPAGES:BOOL=OFF" + +EXTRA_OECMAKE = "-DUDEV_RULES_DIR=${nonarch_base_libdir}/udev/rules.d -DBUILD_EXAMPLES:BOOL=OFF" + +PACKAGE_BEFORE_PN = "${PN}-tools" + +FILES:${PN}-tools = "${bindir}/fido2-*" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libftdi/libftdi_1.5.bb b/sources/meta-openembedded/meta-oe/recipes-support/libftdi/libftdi_1.5.bb index eae1c02f..24dc5b22 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/libftdi/libftdi_1.5.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/libftdi/libftdi_1.5.bb @@ -14,6 +14,8 @@ DEPENDS = "libusb1 python3 swig-native" SRC_URI = "http://www.intra2net.com/en/developer/${BPN}/download/${BPN}1-${PV}.tar.bz2" SRC_URI[sha256sum] = "7c7091e9c86196148bd41177b4590dccb1510bfe6cea5bf7407ff194482eb049" +UPSTREAM_CHECK_URI = "http://www.intra2net.com/en/developer/libftdi/download.php" + S = "${WORKDIR}/${BPN}1-${PV}" inherit cmake binconfig pkgconfig python3native diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod-1.x/0001-bindings-cxx-disable-tests.patch b/sources/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod-1.x/0001-bindings-cxx-disable-tests.patch new file mode 100644 index 00000000..0b850ba1 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod-1.x/0001-bindings-cxx-disable-tests.patch @@ -0,0 +1,33 @@ +From 8293f0b8a329beed542f5c8a2efa4641759fccf4 Mon Sep 17 00:00:00 2001 +From: Bartosz Golaszewski +Date: Tue, 11 Jun 2024 10:34:14 +0200 +Subject: [PATCH] bindings: cxx: disable tests + +Meta-openembedded is moving to catch2 v3 which will make the C++ tests +incompatible with the testing library. As this is an older version of +the project, just disable C++ tests entirely. + +Signed-off-by: Bartosz Golaszewski +--- +Upstream-Status: Inappropriate [upstream continues to use Catch2 v2] + + bindings/cxx/Makefile.am | 6 ------ + 1 file changed, 6 deletions(-) + +diff --git a/bindings/cxx/Makefile.am b/bindings/cxx/Makefile.am +index 5c40ceb..d901836 100644 +--- a/bindings/cxx/Makefile.am ++++ b/bindings/cxx/Makefile.am +@@ -19,9 +19,3 @@ pkgconfigdir = $(libdir)/pkgconfig + pkgconfig_DATA = libgpiodcxx.pc + + SUBDIRS = . examples +- +-if WITH_TESTS +- +-SUBDIRS += tests +- +-endif +-- +2.40.1 + diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod-1.x/run-ptest b/sources/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod-1.x/run-ptest index 61b9b69f..a56c2bb6 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod-1.x/run-ptest +++ b/sources/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod-1.x/run-ptest @@ -1,6 +1,6 @@ #!/bin/sh -testbins="gpiod-test gpio-tools-test gpiod-cxx-test gpiod_py_test.py" +testbins="gpiod-test gpio-tools-test gpiod_py_test.py" ptestdir=$(dirname "$(readlink -f "$0")") cd $ptestdir/tests diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod-2.x/0001-bindings-cxx-Migrate-C-tests-to-use-Catch2-v3.patch b/sources/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod-2.x/0001-bindings-cxx-Migrate-C-tests-to-use-Catch2-v3.patch new file mode 100644 index 00000000..ac1eff51 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod-2.x/0001-bindings-cxx-Migrate-C-tests-to-use-Catch2-v3.patch @@ -0,0 +1,530 @@ +From 0d3e1b3923a1fac80e9d75d8b5e33cd36f4fe659 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 31 May 2024 09:03:22 -0700 +Subject: [PATCH] bindings: cxx: Migrate C++ tests to use Catch2 v3 + +Catch2 v3.x has API changes which needs to be addressed +in the tests themselves, hence this changeset is to fix +those. + +Upstream-Status: Submitted [https://lore.kernel.org/linux-gpio/20240531184223.3949069-1-raj.khem@gmail.com/T/#u] +Signed-off-by: Khem Raj +Cc: Bartosz Golaszewski +--- + bindings/cxx/tests/Makefile.am | 2 +- + bindings/cxx/tests/gpiod-cxx-test-main.cpp | 3 +-- + bindings/cxx/tests/helpers.hpp | 8 +++--- + bindings/cxx/tests/tests-chip-info.cpp | 30 ++++++++++----------- + bindings/cxx/tests/tests-chip.cpp | 14 +++++----- + bindings/cxx/tests/tests-edge-event.cpp | 2 +- + bindings/cxx/tests/tests-info-event.cpp | 2 +- + bindings/cxx/tests/tests-line-config.cpp | 2 +- + bindings/cxx/tests/tests-line-info.cpp | 22 +++++++-------- + bindings/cxx/tests/tests-line-request.cpp | 16 +++++------ + bindings/cxx/tests/tests-line-settings.cpp | 2 +- + bindings/cxx/tests/tests-line.cpp | 2 +- + bindings/cxx/tests/tests-misc.cpp | 2 +- + bindings/cxx/tests/tests-request-config.cpp | 10 +++---- + configure.ac | 4 +-- + 15 files changed, 60 insertions(+), 61 deletions(-) + +diff --git a/bindings/cxx/tests/Makefile.am b/bindings/cxx/tests/Makefile.am +index fbf80a1..d9284da 100644 +--- a/bindings/cxx/tests/Makefile.am ++++ b/bindings/cxx/tests/Makefile.am +@@ -4,7 +4,7 @@ + AM_CXXFLAGS = -I$(top_srcdir)/bindings/cxx/ -I$(top_srcdir)/include + AM_CXXFLAGS += -I$(top_srcdir)/tests/gpiosim/ + AM_CXXFLAGS += -Wall -Wextra -g -std=gnu++17 $(CATCH2_CFLAGS) +-AM_LDFLAGS = -pthread ++AM_LDFLAGS = -pthread $(CATCH2_LIBS) + LDADD = $(top_builddir)/bindings/cxx/libgpiodcxx.la + LDADD += $(top_builddir)/tests/gpiosim/libgpiosim.la + +diff --git a/bindings/cxx/tests/gpiod-cxx-test-main.cpp b/bindings/cxx/tests/gpiod-cxx-test-main.cpp +index 11bf8e5..ec48286 100644 +--- a/bindings/cxx/tests/gpiod-cxx-test-main.cpp ++++ b/bindings/cxx/tests/gpiod-cxx-test-main.cpp +@@ -1,5 +1,4 @@ + // SPDX-License-Identifier: GPL-2.0-or-later + // SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski + +-#define CATCH_CONFIG_MAIN +-#include ++#include +diff --git a/bindings/cxx/tests/helpers.hpp b/bindings/cxx/tests/helpers.hpp +index 62d9827..62bbdf5 100644 +--- a/bindings/cxx/tests/helpers.hpp ++++ b/bindings/cxx/tests/helpers.hpp +@@ -4,13 +4,13 @@ + #ifndef __GPIOD_CXX_TEST_HELPERS_HPP__ + #define __GPIOD_CXX_TEST_HELPERS_HPP__ + +-#include ++#include + #include + #include + #include + #include + +-class system_error_matcher : public Catch::MatcherBase<::std::system_error> ++class system_error_matcher : public Catch::Matchers::MatcherBase<::std::system_error> + { + public: + explicit system_error_matcher(int expected_errno); +@@ -21,7 +21,7 @@ private: + ::std::error_condition _m_cond; + }; + +-class regex_matcher : public Catch::MatcherBase<::std::string> ++class regex_matcher : public Catch::Matchers::MatcherBase<::std::string> + { + public: + explicit regex_matcher(const ::std::string& pattern); +@@ -33,7 +33,7 @@ private: + ::std::string _m_repr; + }; + +-template class stringify_matcher : public Catch::MatcherBase ++template class stringify_matcher : public Catch::Matchers::MatcherBase + { + public: + explicit stringify_matcher(const ::std::string& expected) : _m_expected(expected) +diff --git a/bindings/cxx/tests/tests-chip-info.cpp b/bindings/cxx/tests/tests-chip-info.cpp +index 717c387..2c54f53 100644 +--- a/bindings/cxx/tests/tests-chip-info.cpp ++++ b/bindings/cxx/tests/tests-chip-info.cpp +@@ -1,7 +1,7 @@ + // SPDX-License-Identifier: GPL-2.0-or-later + // SPDX-FileCopyrightText: 2021-2022 Bartosz Golaszewski + +-#include ++#include + #include + #include + +@@ -24,12 +24,12 @@ TEST_CASE("chip_info properties can be read", "[chip-info][chip]") + + SECTION("get chip name") + { +- REQUIRE_THAT(info.name(), Catch::Equals(sim.name())); ++ REQUIRE_THAT(info.name(), Catch::Matchers::Equals(sim.name())); + } + + SECTION("get chip label") + { +- REQUIRE_THAT(info.label(), Catch::Equals("foobar")); ++ REQUIRE_THAT(info.label(), Catch::Matchers::Equals("foobar")); + } + + SECTION("get num_lines") +@@ -52,12 +52,12 @@ TEST_CASE("chip_info can be copied and moved", "[chip-info]") + { + auto copy(info); + +- REQUIRE_THAT(copy.name(), Catch::Equals(sim.name())); +- REQUIRE_THAT(copy.label(), Catch::Equals("foobar")); ++ REQUIRE_THAT(copy.name(), Catch::Matchers::Equals(sim.name())); ++ REQUIRE_THAT(copy.label(), Catch::Matchers::Equals("foobar")); + REQUIRE(copy.num_lines() == 4); + +- REQUIRE_THAT(info.name(), Catch::Equals(sim.name())); +- REQUIRE_THAT(info.label(), Catch::Equals("foobar")); ++ REQUIRE_THAT(info.name(), Catch::Matchers::Equals(sim.name())); ++ REQUIRE_THAT(info.label(), Catch::Matchers::Equals("foobar")); + REQUIRE(info.num_lines() == 4); + } + +@@ -67,12 +67,12 @@ TEST_CASE("chip_info can be copied and moved", "[chip-info]") + + copy = info; + +- REQUIRE_THAT(copy.name(), Catch::Equals(sim.name())); +- REQUIRE_THAT(copy.label(), Catch::Equals("foobar")); ++ REQUIRE_THAT(copy.name(), Catch::Matchers::Equals(sim.name())); ++ REQUIRE_THAT(copy.label(), Catch::Matchers::Equals("foobar")); + REQUIRE(copy.num_lines() == 4); + +- REQUIRE_THAT(info.name(), Catch::Equals(sim.name())); +- REQUIRE_THAT(info.label(), Catch::Equals("foobar")); ++ REQUIRE_THAT(info.name(), Catch::Matchers::Equals(sim.name())); ++ REQUIRE_THAT(info.label(), Catch::Matchers::Equals("foobar")); + REQUIRE(info.num_lines() == 4); + } + +@@ -80,8 +80,8 @@ TEST_CASE("chip_info can be copied and moved", "[chip-info]") + { + auto moved(std::move(info)); + +- REQUIRE_THAT(moved.name(), Catch::Equals(sim.name())); +- REQUIRE_THAT(moved.label(), Catch::Equals("foobar")); ++ REQUIRE_THAT(moved.name(), Catch::Matchers::Equals(sim.name())); ++ REQUIRE_THAT(moved.label(), Catch::Matchers::Equals("foobar")); + REQUIRE(moved.num_lines() == 4); + } + +@@ -91,8 +91,8 @@ TEST_CASE("chip_info can be copied and moved", "[chip-info]") + + moved = ::std::move(info); + +- REQUIRE_THAT(moved.name(), Catch::Equals(sim.name())); +- REQUIRE_THAT(moved.label(), Catch::Equals("foobar")); ++ REQUIRE_THAT(moved.name(), Catch::Matchers::Equals(sim.name())); ++ REQUIRE_THAT(moved.label(), Catch::Matchers::Equals("foobar")); + REQUIRE(moved.num_lines() == 4); + } + } +diff --git a/bindings/cxx/tests/tests-chip.cpp b/bindings/cxx/tests/tests-chip.cpp +index c5ec19b..1ab7add 100644 +--- a/bindings/cxx/tests/tests-chip.cpp ++++ b/bindings/cxx/tests/tests-chip.cpp +@@ -1,7 +1,7 @@ + // SPDX-License-Identifier: GPL-2.0-or-later + // SPDX-FileCopyrightText: 2021-2022 Bartosz Golaszewski + +-#include ++#include + #include + #include + #include +@@ -48,9 +48,9 @@ TEST_CASE("chip constructor works", "[chip]") + .build(); + + ::gpiod::chip first(sim.dev_path()); +- REQUIRE_THAT(first.get_info().label(), Catch::Equals("foobar")); ++ REQUIRE_THAT(first.get_info().label(), Catch::Matchers::Equals("foobar")); + ::gpiod::chip second(::std::move(first)); +- REQUIRE_THAT(second.get_info().label(), Catch::Equals("foobar")); ++ REQUIRE_THAT(second.get_info().label(), Catch::Matchers::Equals("foobar")); + } + } + +@@ -70,9 +70,9 @@ TEST_CASE("chip operators work", "[chip]") + + ::gpiod::chip moved_chip(moved_sim.dev_path()); + +- REQUIRE_THAT(chip.get_info().label(), Catch::Equals("foobar")); ++ REQUIRE_THAT(chip.get_info().label(), Catch::Matchers::Equals("foobar")); + chip = ::std::move(moved_chip); +- REQUIRE_THAT(chip.get_info().label(), Catch::Equals("moved")); ++ REQUIRE_THAT(chip.get_info().label(), Catch::Matchers::Equals("moved")); + } + + SECTION("boolean operator") +@@ -94,7 +94,7 @@ TEST_CASE("chip properties can be read", "[chip]") + + SECTION("get device path") + { +- REQUIRE_THAT(chip.path(), Catch::Equals(sim.dev_path())); ++ REQUIRE_THAT(chip.path(), Catch::Matchers::Equals(sim.dev_path())); + } + + SECTION("get file descriptor") +@@ -169,7 +169,7 @@ TEST_CASE("stream insertion operator works for chip", "[chip]") + "\", label=\"foobar\", num_lines=4))"; + + buf << chip; +- REQUIRE_THAT(buf.str(), Catch::Equals(expected.str())); ++ REQUIRE_THAT(buf.str(), Catch::Matchers::Equals(expected.str())); + } + + SECTION("closed chip") +diff --git a/bindings/cxx/tests/tests-edge-event.cpp b/bindings/cxx/tests/tests-edge-event.cpp +index 19a6ab3..db387be 100644 +--- a/bindings/cxx/tests/tests-edge-event.cpp ++++ b/bindings/cxx/tests/tests-edge-event.cpp +@@ -1,7 +1,7 @@ + // SPDX-License-Identifier: GPL-2.0-or-later + // SPDX-FileCopyrightText: 2022 Bartosz Golaszewski + +-#include ++#include + #include + #include + #include +diff --git a/bindings/cxx/tests/tests-info-event.cpp b/bindings/cxx/tests/tests-info-event.cpp +index 21c0ef0..f7ae309 100644 +--- a/bindings/cxx/tests/tests-info-event.cpp ++++ b/bindings/cxx/tests/tests-info-event.cpp +@@ -1,7 +1,7 @@ + // SPDX-License-Identifier: GPL-2.0-or-later + // SPDX-FileCopyrightText: 2022 Bartosz Golaszewski + +-#include ++#include + #include + #include + #include +diff --git a/bindings/cxx/tests/tests-line-config.cpp b/bindings/cxx/tests/tests-line-config.cpp +index 5e439a1..2f510fb 100644 +--- a/bindings/cxx/tests/tests-line-config.cpp ++++ b/bindings/cxx/tests/tests-line-config.cpp +@@ -1,7 +1,7 @@ + // SPDX-License-Identifier: GPL-2.0-or-later + // SPDX-FileCopyrightText: 2022 Bartosz Golaszewski + +-#include ++#include + #include + + #include "gpiosim.hpp" +diff --git a/bindings/cxx/tests/tests-line-info.cpp b/bindings/cxx/tests/tests-line-info.cpp +index 21211f2..8589da3 100644 +--- a/bindings/cxx/tests/tests-line-info.cpp ++++ b/bindings/cxx/tests/tests-line-info.cpp +@@ -1,7 +1,7 @@ + // SPDX-License-Identifier: GPL-2.0-or-later + // SPDX-FileCopyrightText: 2022 Bartosz Golaszewski + +-#include ++#include + #include + #include + +@@ -35,9 +35,9 @@ TEST_CASE("get_line_info() works", "[chip][line-info]") + auto info = chip.get_line_info(0); + + REQUIRE(info.offset() == 0); +- REQUIRE_THAT(info.name(), Catch::Equals("foobar")); ++ REQUIRE_THAT(info.name(), Catch::Matchers::Equals("foobar")); + REQUIRE(info.used()); +- REQUIRE_THAT(info.consumer(), Catch::Equals("hog")); ++ REQUIRE_THAT(info.consumer(), Catch::Matchers::Equals("hog")); + REQUIRE(info.direction() == ::gpiod::line::direction::OUTPUT); + REQUIRE_FALSE(info.active_low()); + REQUIRE(info.bias() == ::gpiod::line::bias::UNKNOWN); +@@ -74,9 +74,9 @@ TEST_CASE("line properties can be retrieved", "[line-info]") + auto info6 = chip.get_line_info(6); + + REQUIRE(info4.offset() == 4); +- REQUIRE_THAT(info4.name(), Catch::Equals("baz")); ++ REQUIRE_THAT(info4.name(), Catch::Matchers::Equals("baz")); + REQUIRE(info4.used()); +- REQUIRE_THAT(info4.consumer(), Catch::Equals("hog4")); ++ REQUIRE_THAT(info4.consumer(), Catch::Matchers::Equals("hog4")); + REQUIRE(info4.direction() == direction::OUTPUT); + REQUIRE(info4.edge_detection() == edge::NONE); + REQUIRE_FALSE(info4.active_low()); +@@ -102,10 +102,10 @@ TEST_CASE("line_info can be copied and moved") + { + auto copy(info); + REQUIRE(copy.offset() == 2); +- REQUIRE_THAT(copy.name(), Catch::Equals("foobar")); ++ REQUIRE_THAT(copy.name(), Catch::Matchers::Equals("foobar")); + /* info can still be used */ + REQUIRE(info.offset() == 2); +- REQUIRE_THAT(info.name(), Catch::Equals("foobar")); ++ REQUIRE_THAT(info.name(), Catch::Matchers::Equals("foobar")); + } + + SECTION("assignment operator works") +@@ -113,17 +113,17 @@ TEST_CASE("line_info can be copied and moved") + auto copy = chip.get_line_info(0); + copy = info; + REQUIRE(copy.offset() == 2); +- REQUIRE_THAT(copy.name(), Catch::Equals("foobar")); ++ REQUIRE_THAT(copy.name(), Catch::Matchers::Equals("foobar")); + /* info can still be used */ + REQUIRE(info.offset() == 2); +- REQUIRE_THAT(info.name(), Catch::Equals("foobar")); ++ REQUIRE_THAT(info.name(), Catch::Matchers::Equals("foobar")); + } + + SECTION("move constructor works") + { + auto copy(::std::move(info)); + REQUIRE(copy.offset() == 2); +- REQUIRE_THAT(copy.name(), Catch::Equals("foobar")); ++ REQUIRE_THAT(copy.name(), Catch::Matchers::Equals("foobar")); + } + + SECTION("move assignment operator works") +@@ -131,7 +131,7 @@ TEST_CASE("line_info can be copied and moved") + auto copy = chip.get_line_info(0); + copy = ::std::move(info); + REQUIRE(copy.offset() == 2); +- REQUIRE_THAT(copy.name(), Catch::Equals("foobar")); ++ REQUIRE_THAT(copy.name(), Catch::Matchers::Equals("foobar")); + } + } + +diff --git a/bindings/cxx/tests/tests-line-request.cpp b/bindings/cxx/tests/tests-line-request.cpp +index 9632ae0..af8b979 100644 +--- a/bindings/cxx/tests/tests-line-request.cpp ++++ b/bindings/cxx/tests/tests-line-request.cpp +@@ -1,7 +1,7 @@ + // SPDX-License-Identifier: GPL-2.0-or-later + // SPDX-FileCopyrightText: 2022 Bartosz Golaszewski + +-#include ++#include + #include + #include + #include +@@ -20,7 +20,7 @@ using pull = ::gpiosim::chip::pull; + + namespace { + +-class value_matcher : public Catch::MatcherBase ++class value_matcher : public Catch::Matchers::MatcherBase + { + public: + value_matcher(pull pull, bool active_low = false) +@@ -117,7 +117,7 @@ TEST_CASE("consumer string is set correctly", "[line-request]") + auto info = chip.get_line_info(2); + + REQUIRE(info.used()); +- REQUIRE_THAT(info.consumer(), Catch::Equals("foobar")); ++ REQUIRE_THAT(info.consumer(), Catch::Matchers::Equals("foobar")); + } + + SECTION("empty consumer") +@@ -130,7 +130,7 @@ TEST_CASE("consumer string is set correctly", "[line-request]") + auto info = chip.get_line_info(2); + + REQUIRE(info.used()); +- REQUIRE_THAT(info.consumer(), Catch::Equals("?")); ++ REQUIRE_THAT(info.consumer(), Catch::Matchers::Equals("?")); + } + } + +@@ -380,7 +380,7 @@ TEST_CASE("line_request can be moved", "[line-request]") + auto moved(::std::move(request)); + + REQUIRE(moved.fd() == fd); +- REQUIRE_THAT(moved.offsets(), Catch::Equals(offs)); ++ REQUIRE_THAT(moved.offsets(), Catch::Matchers::Equals(offs)); + } + + SECTION("move assignment operator works") +@@ -388,7 +388,7 @@ TEST_CASE("line_request can be moved", "[line-request]") + another = ::std::move(request); + + REQUIRE(another.fd() == fd); +- REQUIRE_THAT(another.offsets(), Catch::Equals(offs)); ++ REQUIRE_THAT(another.offsets(), Catch::Matchers::Equals(offs)); + } + } + +@@ -484,7 +484,7 @@ TEST_CASE("line_request stream insertion operator works", "[line-request]") + { + buf << request; + +- REQUIRE_THAT(buf.str(), Catch::Equals(expected.str())); ++ REQUIRE_THAT(buf.str(), Catch::Matchers::Equals(expected.str())); + } + + SECTION("request released") +@@ -493,7 +493,7 @@ TEST_CASE("line_request stream insertion operator works", "[line-request]") + + buf << request; + +- REQUIRE_THAT(buf.str(), Catch::Equals("gpiod::line_request(released)")); ++ REQUIRE_THAT(buf.str(), Catch::Matchers::Equals("gpiod::line_request(released)")); + } + } + +diff --git a/bindings/cxx/tests/tests-line-settings.cpp b/bindings/cxx/tests/tests-line-settings.cpp +index dc821bb..2690331 100644 +--- a/bindings/cxx/tests/tests-line-settings.cpp ++++ b/bindings/cxx/tests/tests-line-settings.cpp +@@ -1,7 +1,7 @@ + // SPDX-License-Identifier: GPL-2.0-or-later + // SPDX-FileCopyrightText: 2022 Bartosz Golaszewski + +-#include ++#include + #include + + #include "helpers.hpp" +diff --git a/bindings/cxx/tests/tests-line.cpp b/bindings/cxx/tests/tests-line.cpp +index 319012a..abd0e08 100644 +--- a/bindings/cxx/tests/tests-line.cpp ++++ b/bindings/cxx/tests/tests-line.cpp +@@ -1,7 +1,7 @@ + // SPDX-License-Identifier: GPL-2.0-or-later + // SPDX-FileCopyrightText: 2021-2022 Bartosz Golaszewski + +-#include ++#include + #include + + #include "helpers.hpp" +diff --git a/bindings/cxx/tests/tests-misc.cpp b/bindings/cxx/tests/tests-misc.cpp +index f06dc39..33fc3fa 100644 +--- a/bindings/cxx/tests/tests-misc.cpp ++++ b/bindings/cxx/tests/tests-misc.cpp +@@ -1,7 +1,7 @@ + // SPDX-License-Identifier: GPL-2.0-or-later + // SPDX-FileCopyrightText: 2021-2022 Bartosz Golaszewski + +-#include ++#include + #include + #include + #include +diff --git a/bindings/cxx/tests/tests-request-config.cpp b/bindings/cxx/tests/tests-request-config.cpp +index 66eb748..d71e91b 100644 +--- a/bindings/cxx/tests/tests-request-config.cpp ++++ b/bindings/cxx/tests/tests-request-config.cpp +@@ -1,7 +1,7 @@ + // SPDX-License-Identifier: GPL-2.0-or-later + // SPDX-FileCopyrightText: 2021-2022 Bartosz Golaszewski + +-#include ++#include + #include + #include + #include +@@ -33,7 +33,7 @@ TEST_CASE("request_config can be moved", "[request-config]") + SECTION("move constructor works") + { + auto moved(::std::move(cfg)); +- REQUIRE_THAT(moved.consumer(), Catch::Equals("foobar")); ++ REQUIRE_THAT(moved.consumer(), Catch::Matchers::Equals("foobar")); + REQUIRE(moved.event_buffer_size() == 64); + } + +@@ -43,7 +43,7 @@ TEST_CASE("request_config can be moved", "[request-config]") + + moved = ::std::move(cfg); + +- REQUIRE_THAT(moved.consumer(), Catch::Equals("foobar")); ++ REQUIRE_THAT(moved.consumer(), Catch::Matchers::Equals("foobar")); + REQUIRE(moved.event_buffer_size() == 64); + } + } +@@ -55,7 +55,7 @@ TEST_CASE("request_config mutators work", "[request-config]") + SECTION("set consumer") + { + cfg.set_consumer("foobar"); +- REQUIRE_THAT(cfg.consumer(), Catch::Equals("foobar")); ++ REQUIRE_THAT(cfg.consumer(), Catch::Matchers::Equals("foobar")); + } + + SECTION("set event_buffer_size") +@@ -77,7 +77,7 @@ TEST_CASE("request_config stream insertion operator works", "[request-config]") + + ::std::string expected("gpiod::request_config(consumer='foobar', event_buffer_size=32)"); + +- REQUIRE_THAT(buf.str(), Catch::Equals(expected)); ++ REQUIRE_THAT(buf.str(), Catch::Matchers::Equals(expected)); + } + + } /* namespace */ +diff --git a/configure.ac b/configure.ac +index a2370c5..216007e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -206,9 +206,9 @@ then + + if test "x$with_tests" = xtrue + then +- PKG_CHECK_MODULES([CATCH2], [catch2],, [ ++ PKG_CHECK_MODULES([CATCH2], [catch2-with-main],, [ + AC_LANG_PUSH([C++]) +- AC_CHECK_HEADERS([catch2/catch.hpp], [], [HEADER_NOT_FOUND_CXX([catch2/catch.hpp])]) ++ AC_CHECK_HEADERS([catch2/catch_all.hpp], [], [HEADER_NOT_FOUND_CXX([catch2/catch_all.hpp])]) + AC_LANG_POP([C++]) + ]) + fi diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod-2.x/0001-bindings-cxx-tests-set-direction-when-reconfiguring-.patch b/sources/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod-2.x/0001-bindings-cxx-tests-set-direction-when-reconfiguring-.patch deleted file mode 100644 index f8b94f0b..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod-2.x/0001-bindings-cxx-tests-set-direction-when-reconfiguring-.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 8c7126b7b5dee0ed5433cf9265ccc79095d53939 Mon Sep 17 00:00:00 2001 -From: Bartosz Golaszewski -Date: Mon, 8 Jul 2024 11:48:27 +0200 -Subject: [PATCH] bindings: cxx: tests: set direction when reconfiguring lines - -Linux kernel commit b44039638741 ("gpiolib: cdev: Ignore reconfiguration -without direction") made the direction setting mandatory for line config -passed to the kernel when reconfiguring requested lines. Fix the C++ test -case which doesn't do it and now fails due to the rest of the settings -being ignored. - -Reviewed-by: Kent Gibson -Link: https://lore.kernel.org/r/20240708094827.84986-1-brgl@bgdev.pl -Signed-off-by: Bartosz Golaszewski - -Upstream-Status: Backport -[https://web.git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/commit/?id=3e224d885b1de54fe5510b9c5e7296260a1a4507] - -Signed-off-by: Libo Chen ---- - bindings/cxx/tests/tests-line-request.cpp | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/bindings/cxx/tests/tests-line-request.cpp b/bindings/cxx/tests/tests-line-request.cpp -index 9632ae0..6e29532 100644 ---- a/bindings/cxx/tests/tests-line-request.cpp -+++ b/bindings/cxx/tests/tests-line-request.cpp -@@ -208,6 +208,7 @@ TEST_CASE("values can be read", "[line-request]") - .add_line_settings( - offs, - ::gpiod::line_settings() -+ .set_direction(direction::INPUT) - .set_active_low(true)) - ); - --- -2.44.1 - diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod.inc b/sources/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod.inc index dc1fb4fe..7b68f77d 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod.inc +++ b/sources/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod.inc @@ -52,9 +52,5 @@ do_install_ptest() { for tool in ${FILES:${PN}-tools}; do install ${B}/tools/.libs/$(basename $tool) ${D}${PTEST_PATH}/tests/ done - - if ${@bb.utils.contains('PACKAGECONFIG', 'cxx', 'true', 'false', d)}; then - install -m 0755 ${B}/bindings/cxx/tests/.libs/gpiod-cxx-test ${D}${PTEST_PATH}/tests/ - fi } diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod_1.6.4.bb b/sources/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod_1.6.4.bb deleted file mode 100644 index 111a5727..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod_1.6.4.bb +++ /dev/null @@ -1,45 +0,0 @@ -require libgpiod.inc - -LICENSE = "LGPL-2.1-or-later" -LIC_FILES_CHKSUM = "file://COPYING;md5=2caced0b25dfefd4c601d92bd15116de" - -SRC_URI[sha256sum] = "7b146e12f28fbca3df7557f176eb778c5ccf952ca464698dba8a61b2e1e3f9b5" - -FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}-1.x:" - -inherit python3native - -PACKAGECONFIG[tests] = "--enable-tests,--disable-tests,kmod udev glib-2.0 catch2" -PACKAGECONFIG[python3] = "--enable-bindings-python,--disable-bindings-python,python3" - -# Always build tools - they don't have any additional -# requirements over the library. -EXTRA_OECONF = "--enable-tools" - -PACKAGES =+ "${PN}-python" -FILES:${PN}-tools += "${bindir}/gpiofind" -FILES:${PN}-ptest += " \ - ${bindir}/gpiod_py_test.py \ - ${libdir}/libgpiomockup.so.* \ -" -FILES:${PN}-python = "${PYTHON_SITEPACKAGES_DIR}/*.so" -FILES:${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a" - -RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'python3', '${PN}-python', '', d)}" -RRECOMMENDS:${PN}-ptest += " \ - kernel-module-gpio-mockup \ - ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3-unittest', '', d)} \ -" -RDEPENDS:${PN}-ptest += " \ - python3-packaging \ - ${@bb.utils.contains('PTEST_ENABLED', '1', 'bats', '', d)} \ -" - -do_install_ptest:append() { - install -m 0755 ${S}/tools/gpio-tools-test ${D}${PTEST_PATH}/tests/ - install -m 0755 ${S}/tools/gpio-tools-test.bats ${D}${PTEST_PATH}/tests/ - - if ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'true', 'false', d)}; then - install -m 0755 ${S}/bindings/python/tests/gpiod_py_test.py ${D}${PTEST_PATH}/tests/ - fi -} diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod_1.6.5.bb b/sources/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod_1.6.5.bb new file mode 100644 index 00000000..07958394 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod_1.6.5.bb @@ -0,0 +1,47 @@ +require libgpiod.inc + +LICENSE = "LGPL-2.1-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=2caced0b25dfefd4c601d92bd15116de" + +SRC_URI += "file://0001-bindings-cxx-disable-tests.patch" + +SRC_URI[sha256sum] = "ae280f697bf035a1fb780c9972e5c81d0d2712b7ab6124fb3fba24619daa72bc" + +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}-1.x:" + +inherit python3native + +PACKAGECONFIG[tests] = "--enable-tests,--disable-tests,kmod udev glib-2.0 catch2" +PACKAGECONFIG[python3] = "--enable-bindings-python,--disable-bindings-python,python3" + +# Always build tools - they don't have any additional +# requirements over the library. +EXTRA_OECONF = "--enable-tools" + +PACKAGES =+ "${PN}-python" +FILES:${PN}-tools += "${bindir}/gpiofind" +FILES:${PN}-ptest += " \ + ${bindir}/gpiod_py_test.py \ + ${libdir}/libgpiomockup.so.* \ +" +FILES:${PN}-python = "${PYTHON_SITEPACKAGES_DIR}/*.so" +FILES:${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a" + +RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'python3', '${PN}-python', '', d)}" +RRECOMMENDS:${PN}-ptest += " \ + kernel-module-gpio-mockup \ + ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3-unittest', '', d)} \ +" +RDEPENDS:${PN}-ptest += " \ + python3-packaging \ + ${@bb.utils.contains('PTEST_ENABLED', '1', 'bats', '', d)} \ +" + +do_install_ptest:append() { + install -m 0755 ${S}/tools/gpio-tools-test ${D}${PTEST_PATH}/tests/ + install -m 0755 ${S}/tools/gpio-tools-test.bats ${D}${PTEST_PATH}/tests/ + + if ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'true', 'false', d)}; then + install -m 0755 ${S}/bindings/python/tests/gpiod_py_test.py ${D}${PTEST_PATH}/tests/ + fi +} diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod_2.1.2.bb b/sources/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod_2.1.2.bb deleted file mode 100644 index edbde0f7..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod_2.1.2.bb +++ /dev/null @@ -1,33 +0,0 @@ -require libgpiod.inc - -LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later & CC-BY-SA-4.0" -LIC_FILES_CHKSUM = " \ - file://LICENSES/GPL-2.0-or-later.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://LICENSES/LGPL-2.1-or-later.txt;md5=4b54a1fd55a448865a0b32d41598759d \ - file://LICENSES/CC-BY-SA-4.0.txt;md5=fba3b94d88bfb9b81369b869a1e9a20f \ -" - -SRC_URI += "file://0001-bindings-cxx-tests-set-direction-when-reconfiguring-.patch" - -FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}-2.x:" - -SRC_URI[sha256sum] = "7a148a5a7d1c97a1abb40474b9a392b6edd7a42fe077dfd7ff42cfba24308548" - -# Enable all project features for ptest -PACKAGECONFIG[tests] = "--enable-tests --enable-tools --enable-bindings-cxx --enable-gpioset-interactive,--disable-tests,kmod util-linux glib-2.0 catch2 libedit" -PACKAGECONFIG[gpioset-interactive] = "--enable-gpioset-interactive,--disable-gpioset-interactive,libedit" - -PACKAGES =+ "${PN}-ptest-dev" -FILES:${PN}-tools += "${bindir}/gpionotify" -FILES:${PN}-ptest += "${libdir}/libgpiosim.so.*" -FILES:${PN}-ptest-dev += "${includedir}/gpiosim.h" - -RDEPENDS:${PN}-ptest += " \ - ${@bb.utils.contains('PTEST_ENABLED', '1', 'shunit2 bash', '', d)} \ -" -RRECOMMENDS:${PN}-ptest += "kernel-module-gpio-sim kernel-module-configfs" - -do_install_ptest:append() { - install -m 0755 ${S}/tools/gpio-tools-test.bash ${D}${PTEST_PATH}/tests/ - install -m 0644 ${S}/tests/gpiosim/gpiosim.h ${D}${includedir}/gpiosim.h -} diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod_2.1.3.bb b/sources/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod_2.1.3.bb new file mode 100644 index 00000000..6130371e --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod_2.1.3.bb @@ -0,0 +1,33 @@ +require libgpiod.inc + +LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later & CC-BY-SA-4.0" +LIC_FILES_CHKSUM = " \ + file://LICENSES/GPL-2.0-or-later.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://LICENSES/LGPL-2.1-or-later.txt;md5=4b54a1fd55a448865a0b32d41598759d \ + file://LICENSES/CC-BY-SA-4.0.txt;md5=fba3b94d88bfb9b81369b869a1e9a20f \ +" + +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}-2.x:" + +SRC_URI += "file://0001-bindings-cxx-Migrate-C-tests-to-use-Catch2-v3.patch" +SRC_URI[sha256sum] = "2be4c0b03e995d236c0e476e14aeb475d7b431dd1439609b6d65c540f91eaf58" + +# Enable all project features for ptest +PACKAGECONFIG[tests] = "--enable-tests --enable-tools --enable-bindings-cxx --enable-gpioset-interactive,--disable-tests,kmod util-linux glib-2.0 catch2 libedit" +PACKAGECONFIG[gpioset-interactive] = "--enable-gpioset-interactive,--disable-gpioset-interactive,libedit" + +PACKAGES =+ "${PN}-ptest-dev" +FILES:${PN}-tools += "${bindir}/gpionotify" +FILES:${PN}-ptest += "${libdir}/libgpiosim.so.*" +FILES:${PN}-ptest-dev += "${includedir}/gpiosim.h" + +RDEPENDS:${PN}-ptest += " \ + ${@bb.utils.contains('PTEST_ENABLED', '1', 'shunit2 bash', '', d)} \ +" +RRECOMMENDS:${PN}-ptest += "kernel-module-gpio-sim kernel-module-configfs" + +do_install_ptest:append() { + install -m 0755 ${B}/bindings/cxx/tests/.libs/gpiod-cxx-test ${D}${PTEST_PATH}/tests/ + install -m 0755 ${S}/tools/gpio-tools-test.bash ${D}${PTEST_PATH}/tests/ + install -m 0644 ${S}/tests/gpiosim/gpiosim.h ${D}${includedir}/gpiosim.h +} diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libiodbc/libiodbc_3.52.15.bb b/sources/meta-openembedded/meta-oe/recipes-support/libiodbc/libiodbc_3.52.15.bb deleted file mode 100644 index ff976ed9..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/libiodbc/libiodbc_3.52.15.bb +++ /dev/null @@ -1,30 +0,0 @@ -SUMMARY = "iODBC driver manager maintained by OpenLink Software." - -DESCRIPTION = "This kit will provide you with everything you need to \ -develop ODBC-compliant applications under Unix without having to pay \ -royalties to other parties. \ -" - -HOMEPAGE = "http://www.iodbc.org/" - -LICENSE = "LGPL-2.0-only | BSD-2-Clause" -LIC_FILES_CHKSUM = "file://LICENSE.LGPL;md5=8c0138a8701f0e1282f5c8b2c7d39114 \ - file://LICENSE.BSD;md5=ff3a66a194e500df485da930da7f2c62 \ - " - -SRC_URI = "https://github.com/openlink/iODBC/releases/download/v${PV}/${BP}.tar.gz" -SRC_URI[sha256sum] = "c74541e3327fc9a1c7ccf103645471c67bc014542d70f572476eb07c0b2dd43c" - -inherit autotools - -EXTRA_OECONF += " --prefix=/usr/local \ - --includedir=/usr/include/iodbc \ - --with-iodbc-inidir=/etc \ - --enable-odbc3 \ - --enable-pthreads \ - --disable-libodbc \ - --disable-static \ - " - -inherit multilib_script -MULTILIB_SCRIPTS = "${PN}:${bindir}/iodbc-config" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libiodbc/libiodbc_3.52.16.bb b/sources/meta-openembedded/meta-oe/recipes-support/libiodbc/libiodbc_3.52.16.bb new file mode 100644 index 00000000..644c3ba0 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/libiodbc/libiodbc_3.52.16.bb @@ -0,0 +1,33 @@ +SUMMARY = "iODBC driver manager maintained by OpenLink Software." + +DESCRIPTION = "This kit will provide you with everything you need to \ +develop ODBC-compliant applications under Unix without having to pay \ +royalties to other parties. \ +" + +HOMEPAGE = "http://www.iodbc.org/" + +LICENSE = "LGPL-2.0-only | BSD-2-Clause" +LIC_FILES_CHKSUM = "file://LICENSE.LGPL;md5=8c0138a8701f0e1282f5c8b2c7d39114 \ + file://LICENSE.BSD;md5=5b36348a404e1d65b57df8d33fd6e414 \ + " + +SRC_URI = "https://github.com/openlink/iODBC/releases/download/v${PV}/${BP}.tar.gz" +SRC_URI[sha256sum] = "3898b32d07961360f6f2cf36db36036b719a230e476469258a80f32243e845fa" + +UPSTREAM_CHECK_URI = "https://github.com/openlink/iODBC/releases" +UPSTREAM_CHECK_REGEX = "(?P\d+(\.\d+)+)" + +inherit autotools + +EXTRA_OECONF += " --prefix=/usr/local \ + --includedir=/usr/include/iodbc \ + --with-iodbc-inidir=/etc \ + --enable-odbc3 \ + --enable-pthreads \ + --disable-libodbc \ + --disable-static \ + " + +inherit multilib_script +MULTILIB_SCRIPTS = "${PN}:${bindir}/iodbc-config" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libjs/libjs-jquery_3.3.1.bb b/sources/meta-openembedded/meta-oe/recipes-support/libjs/libjs-jquery_3.3.1.bb index 9130b110..68b50867 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/libjs/libjs-jquery_3.3.1.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/libjs/libjs-jquery_3.3.1.bb @@ -7,10 +7,14 @@ SRC_URI = "http://kr.archive.ubuntu.com/ubuntu/pool/main/j/jquery/${BPN}_${PV}~d SRC_URI[sha256sum] = "e04d192c2356e9d4c2b2c7d83fde9408713212b53c4d106e5b9e46c1a56da33b" +UPSTREAM_CHECK_URI = "http://kr.archive.ubuntu.com/ubuntu/pool/main/j/jquery/" +UPSTREAM_CHECK_REGEX = "(?P\d+(\.\d+)+)" + JQUERYDIR = "${datadir}/javascript/jquery" JQUERYDOCDIR = "${docdir}/libjs-jquery" -S = "${WORKDIR}" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" do_install() { install -d -m 0755 ${D}${JQUERYDIR} diff --git a/sources/meta-openembedded/meta-oe/recipes-support/liblinebreak/liblinebreak_1.2.bb b/sources/meta-openembedded/meta-oe/recipes-support/liblinebreak/liblinebreak_1.2.bb deleted file mode 100644 index d0463a64..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/liblinebreak/liblinebreak_1.2.bb +++ /dev/null @@ -1,11 +0,0 @@ -DESCRIPTION = "Liblinebreak is an implementation of the line breaking algorithm as described in Unicode 5.1.0 Standard Annex 14, Revision 22" -HOMEPAGE = "http://vimgadgets.sourceforge.net/liblinebreak/" -SECTION = "libs" -LICENSE = "Zlib" -LIC_FILES_CHKSUM = "file://LICENCE;md5=3715191da62bafb5cfc4ff36195b2ec3" - -SRC_URI = "${SOURCEFORGE_MIRROR}/project/vimgadgets/liblinebreak/${PV}/liblinebreak-${PV}.tar.gz" -SRC_URI[md5sum] = "d18039259001ccb24b5dd4648c49c5ad" -SRC_URI[sha256sum] = "9efcb0cb1afc75ad1e92d2b2dbf4d9c77b072d6656c5f1a150af8b718d0c7b76" - -inherit autotools diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libmanette/libmanette_0.2.7.bb b/sources/meta-openembedded/meta-oe/recipes-support/libmanette/libmanette_0.2.7.bb deleted file mode 100644 index db054226..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/libmanette/libmanette_0.2.7.bb +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright (C) 2021 Khem Raj -# Released under the MIT license (see COPYING.MIT for the terms) -SUMMARY = "The simple GObject game controller library" -HOMEPAGE = "https://gnome.pages.gitlab.gnome.org/libmanette/" -LICENSE = "LGPL-2.1-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" - -DEPENDS = "libevdev libgudev" - -SRC_URI = "https://download.gnome.org/sources/libmanette/0.2/libmanette-${PV}.tar.xz" -SRC_URI[sha256sum] = "cddd5c02a131072c19c6cde6f2cb2cd57eae7dacb50d14c337efd980baa51a51" - -inherit meson pkgconfig gobject-introspection ptest vala - -FILES:${PN}-ptest =+ "${bindir}/manette-test" -FILES:${PN}-dev =+ "${libdir}/girepository-1.0" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libmanette/libmanette_0.2.9.bb b/sources/meta-openembedded/meta-oe/recipes-support/libmanette/libmanette_0.2.9.bb new file mode 100644 index 00000000..2e594018 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/libmanette/libmanette_0.2.9.bb @@ -0,0 +1,16 @@ +# Copyright (C) 2021 Khem Raj +# Released under the MIT license (see COPYING.MIT for the terms) +SUMMARY = "The simple GObject game controller library" +HOMEPAGE = "https://gnome.pages.gitlab.gnome.org/libmanette/" +LICENSE = "LGPL-2.1-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" + +DEPENDS = "libevdev libgudev" + +SRC_URI = "https://download.gnome.org/sources/libmanette/0.2/libmanette-${PV}.tar.xz" +SRC_URI[sha256sum] = "29366be5452f60a74c65fc64ffe2d74eddd4e6e6824c2cefa567a43bd92b688f" + +inherit meson pkgconfig gobject-introspection ptest vala + +FILES:${PN}-ptest =+ "${bindir}/manette-test" +FILES:${PN}-dev =+ "${libdir}/girepository-1.0" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libmxml/libmxml_3.3.1.bb b/sources/meta-openembedded/meta-oe/recipes-support/libmxml/libmxml_3.3.1.bb deleted file mode 100644 index 38e270c0..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/libmxml/libmxml_3.3.1.bb +++ /dev/null @@ -1,31 +0,0 @@ -DESCRIPTION = "Tiny XML Library" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" -HOMEPAGE = "https://www.msweet.org/mxml/" -BUGTRACKER = "https://github.com/michaelrsweet/mxml/issues" - -SRC_URI = "git://github.com/michaelrsweet/mxml.git;branch=master;protocol=https" -SRCREV = "fd47c7d115191c8a6bce2c781ffee41e179530f2" -S = "${WORKDIR}/git" - -# Package does not support out of tree builds. -inherit autotools-brokensep - -PACKAGECONFIG ??= "threads" -PACKAGECONFIG[threads] = "--enable-threads,--disable-threads" - -# MXML uses autotools but it explicitly states it does not support autoheader. -EXTRA_AUTORECONF = "--exclude=autopoint,autoheader" - -do_configure:prepend() { - # Respect optimization CFLAGS specified by OE. - sed -e 's/-Os -g//' -i ${S}/configure.ac - - # Enable verbose compilation output. This is required for extra QA checks to work. - sed -e '/.SILENT:/d' -i ${S}/Makefile.in -} - -do_install() { - # Package uses DSTROOT instread of standard DESTDIR to specify install location. - oe_runmake install DSTROOT=${D} -} diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libmxml/libmxml_4.0.3.bb b/sources/meta-openembedded/meta-oe/recipes-support/libmxml/libmxml_4.0.3.bb new file mode 100644 index 00000000..54582e70 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/libmxml/libmxml_4.0.3.bb @@ -0,0 +1,31 @@ +DESCRIPTION = "Tiny XML Library" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" +HOMEPAGE = "https://www.msweet.org/mxml/" +BUGTRACKER = "https://github.com/michaelrsweet/mxml/issues" + +SRC_URI = "git://github.com/michaelrsweet/mxml.git;branch=master;protocol=https" +SRCREV = "804c4f4d922e4ca240ce2cad3ec7bc5d00c08691" +S = "${WORKDIR}/git" + +# Package does not support out of tree builds. +inherit autotools-brokensep + +PACKAGECONFIG ??= "threads" +PACKAGECONFIG[threads] = "--enable-threads,--disable-threads" + +# MXML uses autotools but it explicitly states it does not support autoheader. +EXTRA_AUTORECONF = "--exclude=autopoint,autoheader" + +do_configure:prepend() { + # Respect optimization CFLAGS specified by OE. + sed -e 's/-Os -g//' -i ${S}/configure.ac + + # Enable verbose compilation output. This is required for extra QA checks to work. + sed -e '/.SILENT:/d' -i ${S}/Makefile.in +} + +do_install() { + # Package uses DSTROOT instread of standard DESTDIR to specify install location. + oe_runmake install DSTROOT=${D} +} diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libnice/libnice_0.1.22.bb b/sources/meta-openembedded/meta-oe/recipes-support/libnice/libnice_0.1.22.bb index 175e10fd..4b932029 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/libnice/libnice_0.1.22.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/libnice/libnice_0.1.22.bb @@ -11,6 +11,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=9c42325015702feda4f4d2f19a55b767 \ SRC_URI = "http://nice.freedesktop.org/releases/${BP}.tar.gz" SRC_URI[sha256sum] = "a5f724cf09eae50c41a7517141d89da4a61ec9eaca32da4a0073faed5417ad7e" +UPSTREAM_CHECK_URI = "https://gitlab.freedesktop.org/libnice/libnice/-/tags" +UPSTREAM_CHECK_REGEX = "(?P\d+(\.\d+)+)" + DEPENDS = "glib-2.0 gnutls ${@bb.utils.contains('DISTRO_FEATURES', 'api-documentation', 'graphviz-native', '', d)}" PACKAGECONFIG[gupnp] = "-Dgupnp=enabled,-Dgupnp=disabled,gupnp" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libnvme/libnvme_1.10.bb b/sources/meta-openembedded/meta-oe/recipes-support/libnvme/libnvme_1.10.bb new file mode 100644 index 00000000..a05d1168 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/libnvme/libnvme_1.10.bb @@ -0,0 +1,22 @@ +SUMMARY = "libnvme development C library" +DESCRIPTION = "\ +libnvme provides type definitions for NVMe specification structures, \ +enumerations, and bit fields, helper functions to construct, dispatch, \ +and decode commands and payloads, and utilities to connect, scan, and \ +manage nvme devices on a Linux system." +HOMEPAGE = "https://github.com/linux-nvme/${BPN}" +SECTION = "libs" +LICENSE = "LGPL-2.1-only & CC0-1.0 & MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \ + file://ccan/licenses/CC0;md5=c17af43b05840255a6fedc5eda9d56cc \ + file://ccan/licenses/BSD-MIT;md5=838c366f69b72c5df05c96dff79b35f2" +DEPENDS = "json-c" +SRCREV = "dd51fa8550564c93436423a4d8ed4be92ae50290" + +SRC_URI = "git://github.com/linux-nvme/libnvme;protocol=https;branch=master" + +S = "${WORKDIR}/git" + +inherit meson pkgconfig + +EXTRA_OEMESON += "-Dkeyutils=disabled -Dopenssl=disabled -Dpython=disabled" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libnvme/libnvme_1.8.bb b/sources/meta-openembedded/meta-oe/recipes-support/libnvme/libnvme_1.8.bb deleted file mode 100644 index 3894face..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/libnvme/libnvme_1.8.bb +++ /dev/null @@ -1,22 +0,0 @@ -SUMMARY = "libnvme development C library" -DESCRIPTION = "\ -libnvme provides type definitions for NVMe specification structures, \ -enumerations, and bit fields, helper functions to construct, dispatch, \ -and decode commands and payloads, and utilities to connect, scan, and \ -manage nvme devices on a Linux system." -HOMEPAGE = "https://github.com/linux-nvme/${BPN}" -SECTION = "libs" -LICENSE = "LGPL-2.1-only & CC0-1.0 & MIT" -LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \ - file://ccan/licenses/CC0;md5=c17af43b05840255a6fedc5eda9d56cc \ - file://ccan/licenses/BSD-MIT;md5=838c366f69b72c5df05c96dff79b35f2" -DEPENDS = "json-c" -SRCREV = "bff7dda7e2a0f883d0b89e23fed725c916de3e61" - -SRC_URI = "git://github.com/linux-nvme/libnvme;protocol=https;branch=master" - -S = "${WORKDIR}/git" - -inherit meson pkgconfig - -EXTRA_OEMESON += "-Dkeyutils=disabled -Dopenssl=disabled -Dpython=disabled" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libosinfo/libosinfo_1.11.0.bb b/sources/meta-openembedded/meta-oe/recipes-support/libosinfo/libosinfo_1.11.0.bb index 8ef7ac3d..727d5ecf 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/libosinfo/libosinfo_1.11.0.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/libosinfo/libosinfo_1.11.0.bb @@ -32,4 +32,4 @@ EXTRA_OEMESON += " \ -Dwith-usb-ids-path=${datadir}/hwdata/usb.ids \ " -RDEPENDS:${PN} = "hwdata" +RDEPENDS:${PN} = "hwdata osinfo-db" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libosinfo/osinfo-db-tools/0001-Make-xmlError-structs-constant.patch b/sources/meta-openembedded/meta-oe/recipes-support/libosinfo/osinfo-db-tools/0001-Make-xmlError-structs-constant.patch new file mode 100644 index 00000000..edff5732 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/libosinfo/osinfo-db-tools/0001-Make-xmlError-structs-constant.patch @@ -0,0 +1,56 @@ +Upstream-Status: Backport [https://gitlab.com/libosinfo/osinfo-db-tools/-/commit/34378a4] + +Signed-off-by: Kai Kang + +From 34378a4ac257f2f5fcf364786d1634a8c36b304f Mon Sep 17 00:00:00 2001 +From: Michal Privoznik +Date: Mon, 27 Nov 2023 15:04:43 +0100 +Subject: [PATCH] Make xmlError structs constant + +In libxml2 commits v2.12.0~14 and v2.12.0~77 the API changed so +that: + +1) xmlGetLastError() returns pointer to a constant xmlError + struct, and + +2) xmlSetStructuredErrorFunc() changed the signature of callback + (validate_structured_error_nop()), it too is passed pointer to + a constant xmlError struct. + +But of course, older libxml2 expects different callback +signature. Therefore, we need to typecast it anyway. + +Also, drop obviously incorrect @error annotation in +validate_structured_error_nop; the variable is used. + +Signed-off-by: Michal Privoznik +--- + tools/osinfo-db-validate.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/tools/osinfo-db-validate.c b/tools/osinfo-db-validate.c +index a721b4d..b1434a6 100644 +--- a/tools/osinfo-db-validate.c ++++ b/tools/osinfo-db-validate.c +@@ -35,7 +35,7 @@ static void validate_generic_error_nop(void *userData G_GNUC_UNUSED, + } + + static void validate_structured_error_nop(void *userData G_GNUC_UNUSED, +- xmlErrorPtr error G_GNUC_UNUSED) ++ const xmlError *error) + { + if (error->file) + g_printerr("%s:%d %s", error->file, error->line, error->message); +@@ -173,7 +173,8 @@ static gboolean validate_files(GFile *schema, gsize nfiles, GFile **files, GErro + g_autofree gchar *schemapath = NULL; + + xmlSetGenericErrorFunc(NULL, validate_generic_error_nop); +- xmlSetStructuredErrorFunc(NULL, validate_structured_error_nop); ++ /* Drop this typecast when >=libxml2-2.12.0 is required */ ++ xmlSetStructuredErrorFunc(NULL, (xmlStructuredErrorFunc) validate_structured_error_nop); + + schemapath = g_file_get_path(schema); + rngParser = xmlRelaxNGNewParserCtxt(schemapath); +-- +2.34.1 + diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libosinfo/osinfo-db-tools_1.11.0.bb b/sources/meta-openembedded/meta-oe/recipes-support/libosinfo/osinfo-db-tools_1.11.0.bb new file mode 100644 index 00000000..0584bee1 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/libosinfo/osinfo-db-tools_1.11.0.bb @@ -0,0 +1,18 @@ +SUMMARY = "Tools for managing the libosinfo database files" +HOMEPAGE = "https://libosinfo.org" + +LICENSE = "GPL-2.0-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" + +DEPENDS = "glib-2.0 json-glib libarchive libsoup-2.4" + +SRC_URI = "git://gitlab.com/libosinfo/osinfo-db-tools.git;branch=main;protocol=https \ + file://0001-Make-xmlError-structs-constant.patch \ + " +SRCREV = "85a1788c6977419b6facad11dbfbf823e739eb3b" + +S = "${WORKDIR}/git" + +inherit meson pkgconfig + +BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libosinfo/osinfo-db_20240701.bb b/sources/meta-openembedded/meta-oe/recipes-support/libosinfo/osinfo-db_20240701.bb new file mode 100644 index 00000000..d3690460 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/libosinfo/osinfo-db_20240701.bb @@ -0,0 +1,21 @@ +SUMMARY = "osinfo-db provides the database files for use with the libosinfo library" +HOMEPAGE = "https://libosinfo.org" + +LICENSE = "GPL-2.0-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" + +DEPENDS = "osinfo-db-tools-native" + +SRC_URI = "git://gitlab.com/libosinfo/osinfo-db.git;branch=main;protocol=https" + +SRCREV = "cde78484ab747c87532d47cf3f09b76f280c0b74" + +S = "${WORKDIR}/git" + +inherit allarch autotools-brokensep + +EXTRA_OEMAKE = "OSINFO_DB_TARGET='--dir ${datadir}/osinfo'" + +do_configure[noexec] = "1" + +FILES:${PN} = "${datadir}/osinfo" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libp11/files/0001-detect-correct-openssl-3.x.patch b/sources/meta-openembedded/meta-oe/recipes-support/libp11/files/0001-detect-correct-openssl-3.x.patch deleted file mode 100644 index aa61e9d9..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/libp11/files/0001-detect-correct-openssl-3.x.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 74497e0fa5b69b15790d6697e1ebce13af842d4c Mon Sep 17 00:00:00 2001 -From: Mike Gilbert -Date: Thu, 13 Jul 2023 13:52:54 -0400 -Subject: [PATCH] configure: treat all openssl-3.x releases the same - -OpenSSL's soversion will not change for any 3.x minor release. - -https://www.openssl.org/policies/general/versioning-policy.html ---- - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Upstream-Status: Backport [https://github.com/OpenSC/libp11/commit/74497e0fa5b69b15790d6697e1ebce13af842d4c.patch] -Signed-off-by: Sana Kazi - -diff --git a/configure.ac b/configure.ac -index b96979d9..c344e84a 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -33,7 +33,7 @@ AC_C_BIGENDIAN - # issues with applications linking to new openssl, old libp11, and vice versa - case "`$PKG_CONFIG --modversion --silence-errors libcrypto || \ - $PKG_CONFIG --modversion openssl`" in -- 3.0.*) # Predicted engines directory prefix for OpenSSL 3.x -+ 3.*) # Predicted engines directory prefix for OpenSSL 3.x - LIBP11_LT_OLDEST="3" - debian_ssl_prefix="openssl-3.0.0";; - 1.1.*) # Predicted engines directory prefix for OpenSSL 1.1.x diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libp11/libp11_0.4.12.bb b/sources/meta-openembedded/meta-oe/recipes-support/libp11/libp11_0.4.12.bb index cc4a138e..22377820 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/libp11/libp11_0.4.12.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/libp11/libp11_0.4.12.bb @@ -9,10 +9,7 @@ LICENSE = "LGPL-2.0-or-later" LIC_FILES_CHKSUM = "file://COPYING;md5=fad9b3332be894bab9bc501572864b29" DEPENDS = "libtool openssl" -SRC_URI = "git://github.com/OpenSC/libp11.git;branch=master;protocol=https \ - file://0001-detect-correct-openssl-3.x.patch \ -" - +SRC_URI = "git://github.com/OpenSC/libp11.git;branch=master;protocol=https" SRCREV = "53d65dc48cf436694f7edcfc805414e608e8a2bf" UPSTREAM_CHECK_GITTAGREGEX = "libp11-(?P\d+(\.\d+)+)" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libpaper/libpaper_2.1.2.bb b/sources/meta-openembedded/meta-oe/recipes-support/libpaper/libpaper_2.1.2.bb deleted file mode 100644 index a45ffe18..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/libpaper/libpaper_2.1.2.bb +++ /dev/null @@ -1,9 +0,0 @@ -LICENSE = "LGPL-2.1-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" - -SRC_URI = "https://github.com/rrthomas/libpaper/releases/download/v${PV}/libpaper-${PV}.tar.gz" -SRC_URI[sha256sum] = "1fda0cf64efa46b9684a4ccc17df4386c4cc83254805419222c064bf62ea001f" - -inherit perlnative autotools - -BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libpaper/libpaper_2.2.5.bb b/sources/meta-openembedded/meta-oe/recipes-support/libpaper/libpaper_2.2.5.bb new file mode 100644 index 00000000..3b0e1bf0 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/libpaper/libpaper_2.2.5.bb @@ -0,0 +1,12 @@ +LICENSE = "LGPL-2.1-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" + +SRC_URI = "https://github.com/rrthomas/libpaper/releases/download/v${PV}/libpaper-${PV}.tar.gz" +SRC_URI[sha256sum] = "7be50974ce0df0c74e7587f10b04272cd53fd675cb6a1273ae1cc5c9cc9cab09" + +UPSTREAM_CHECK_URI = "https://github.com/rrthomas/libpaper/releases" +UPSTREAM_CHECK_REGEX = "(?P\d+(\.\d+)+)" + +inherit perlnative autotools + +BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libraw/libraw_0.21.2.bb b/sources/meta-openembedded/meta-oe/recipes-support/libraw/libraw_0.21.2.bb index 4d089f3b..6b1355fa 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/libraw/libraw_0.21.2.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/libraw/libraw_0.21.2.bb @@ -9,3 +9,6 @@ S = "${WORKDIR}/git" inherit autotools pkgconfig DEPENDS = "jpeg jasper lcms" + +CVE_STATUS[CVE-2020-22628] = "cpe-incorrect: The current version (0.21.2) is not affected by the CVE which affects versions earlier than 0.21.2" +CVE_STATUS[CVE-2023-1729] = "cpe-incorrect: The current version (0.21.2) is not affected by the CVE which affects versions earlier than 0.21.2" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libsmi/libsmi_0.5.0.bb b/sources/meta-openembedded/meta-oe/recipes-support/libsmi/libsmi_0.5.0.bb index 822b7ffc..0dda756d 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/libsmi/libsmi_0.5.0.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/libsmi/libsmi_0.5.0.bb @@ -14,19 +14,25 @@ SRC_URI = "https://www.ibr.cs.tu-bs.de/projects/${BPN}/download/${BP}.tar.gz \ SRC_URI[md5sum] = "4bf47483c06c9f07d1b10fbc74eddf11" SRC_URI[sha256sum] = "f21accdadb1bb328ea3f8a13fc34d715baac6e2db66065898346322c725754d3" +UPSTREAM_CHECK_URI = "https://repology.org/project/libsmi/information" +UPSTREAM_CHECK_REGEX = "${BPN}-(?P\d+(\.\d+)+)" + DEPENDS += "bison-native flex-native wget-native gawk-native" inherit autotools-brokensep update-alternatives ALTERNATIVE_PRIORITY = "50" -ALTERNATIVE:${PN}-yang = "ietf-interfaces " +ALTERNATIVE:${PN}-yang = " ietf-interfaces ietf-netconf-acm ietf-netconf-with-defaults ietf-netconf" ALTERNATIVE_LINK_NAME[ietf-interfaces] = "${datadir}/yang/ietf-interfaces.yang" +ALTERNATIVE_LINK_NAME[ietf-netconf-acm] = "${datadir}/yang/ietf-netconf-acm.yang" +ALTERNATIVE_LINK_NAME[ietf-netconf-with-defaults] = "${datadir}/yang/ietf-netconf-with-defaults.yang" +ALTERNATIVE_LINK_NAME[ietf-netconf] = "${datadir}/yang/ietf-netconf.yang" EXTRA_OECONF:class-native = "ac_cv_path_SH=/bin/sh" EXTRA_OECONF:class-target = "ac_cv_path_SH=/bin/sh ac_cv_path_WGET=${bindir}/wget ac_cv_path_AWK=${bindir}/awk" do_install:append () { install -d ${D}${sysconfdir} - install -m 0644 ${WORKDIR}/smi.conf ${D}${sysconfdir}/smi.conf + install -m 0644 ${UNPACKDIR}/smi.conf ${D}${sysconfdir}/smi.conf } PACKAGES += "${PN}-mibs ${PN}-pibs ${PN}-yang" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libssh/libssh/0001-CompilerChecks.cmake-drop-Wunused-variable-flag.patch b/sources/meta-openembedded/meta-oe/recipes-support/libssh/libssh/0001-CompilerChecks.cmake-drop-Wunused-variable-flag.patch new file mode 100644 index 00000000..21af9a5a --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/libssh/libssh/0001-CompilerChecks.cmake-drop-Wunused-variable-flag.patch @@ -0,0 +1,37 @@ +From 98a330971f4344619b698d4603a45bd31d6935d9 Mon Sep 17 00:00:00 2001 +From: Yi Zhao +Date: Sun, 15 Sep 2024 20:31:55 +0800 +Subject: [PATCH] CompilerChecks.cmake: drop -Wunused-variable flag + +Drop -Wunused-variable flag to fix build with clang: + +libssh/0.11.1/git/src/threads/libgcrypt.c:29:1: error: unused variable 'gcry_threads_pthread' [-Werror,-Wunused-variable] + 29 | GCRY_THREAD_OPTION_PTHREAD_IMPL; + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +libssh/0.11.1/recipe-sysroot/usr/include/gcrypt.h:217:33: note: expanded from macro 'GCRY_THREAD_OPTION_PTHREAD_IMPL' + 217 | static struct gcry_thread_cbs gcry_threads_pthread = { \ + | ^~~~~~~~~~~~~~~~~~~~ + +Upstream-Status: Inappropriate [embedded specific] + +Signed-off-by: Yi Zhao +--- + CompilerChecks.cmake | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CompilerChecks.cmake b/CompilerChecks.cmake +index 9719e699..ec15fa2a 100644 +--- a/CompilerChecks.cmake ++++ b/CompilerChecks.cmake +@@ -48,7 +48,7 @@ if (UNIX) + add_c_compiler_flag("-Werror=implicit-int" SUPPORTED_COMPILER_FLAGS) + add_c_compiler_flag("-Wint-conversion" SUPPORTED_COMPILER_FLAGS) + add_c_compiler_flag("-Werror=int-conversion" SUPPORTED_COMPILER_FLAGS) +- add_c_compiler_flag("-Werror=unused-variable" SUPPORTED_COMPILER_FLAGS) ++ #add_c_compiler_flag("-Werror=unused-variable" SUPPORTED_COMPILER_FLAGS) + + check_c_compiler_flag("-Wformat" REQUIRED_FLAGS_WFORMAT) + if (REQUIRED_FLAGS_WFORMAT) +-- +2.25.1 + diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libssh/libssh/0001-libgcrypt.c-Fix-prototype-of-des3_encrypt-des3_decry.patch b/sources/meta-openembedded/meta-oe/recipes-support/libssh/libssh/0001-libgcrypt.c-Fix-prototype-of-des3_encrypt-des3_decry.patch deleted file mode 100644 index d2d1fb59..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/libssh/libssh/0001-libgcrypt.c-Fix-prototype-of-des3_encrypt-des3_decry.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 49a8ae4d6f77434ed9f7a601b9df488b921e4a22 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Mon, 20 Mar 2023 21:59:19 -0700 -Subject: [PATCH] libgcrypt.c: Fix prototype of des3_encrypt/des3_decrypt - -This is to match the prototype for callback functions which are now emitted as -errors by clang16 - -Fixes - -TOPDIR/build/tmp/work/cortexa15t2hf-neon-yoe-linux-gnueabi/libssh/0.10.4-r0/git/src/libgcrypt.c:903:20: error: incompatible function pointer types initializing 'void (*)(struct ssh_cipher_struct *, void *, void *, size_t)' (aka 'void (*)(struct ssh_cipher_struct *, void *, void *, unsigned int)') with an expression of type 'void (struct ssh_cipher_struct *, void *, void *, unsigned long)' [-Wincompatible-function-pointer-types] - .encrypt = des3_encrypt, - ^~~~~~~~~~~~ -TOPDIR/build/tmp/work/cortexa15t2hf-neon-yoe-linux-gnueabi/libssh/0.10.4-r0/git/src/libgcrypt.c:904:20: error: incompatible function pointer types initializing 'void (*)(struct ssh_cipher_struct *, void *, void *, size_t)' (aka 'void (*)(struct ssh_cipher_struct *, void *, void *, unsigned int)') with an expression of type 'void (struct ssh_cipher_struct *, void *, void *, unsigned long)' [-Wincompatible-function-pointer-types] - .decrypt = des3_decrypt - ^~~~~~~~~~~~ - -Upstream-Status: Pending - -Signed-off-by: Khem Raj - ---- - src/libgcrypt.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/libgcrypt.c b/src/libgcrypt.c -index f410d997..e3f66781 100644 ---- a/src/libgcrypt.c -+++ b/src/libgcrypt.c -@@ -416,12 +416,12 @@ static int des3_set_key(struct ssh_cipher_struct *cipher, void *key, void *IV) { - } - - static void des3_encrypt(struct ssh_cipher_struct *cipher, void *in, -- void *out, unsigned long len) { -+ void *out, size_t len) { - gcry_cipher_encrypt(cipher->key[0], out, len, in, len); - } - - static void des3_decrypt(struct ssh_cipher_struct *cipher, void *in, -- void *out, unsigned long len) { -+ void *out, size_t len) { - gcry_cipher_decrypt(cipher->key[0], out, len, in, len); - } - diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libssh/libssh/0001-tests-CMakeLists.txt-do-not-search-ssh-sshd-commands.patch b/sources/meta-openembedded/meta-oe/recipes-support/libssh/libssh/0001-tests-CMakeLists.txt-do-not-search-ssh-sshd-commands.patch index d6bc75c3..4803ff81 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/libssh/libssh/0001-tests-CMakeLists.txt-do-not-search-ssh-sshd-commands.patch +++ b/sources/meta-openembedded/meta-oe/recipes-support/libssh/libssh/0001-tests-CMakeLists.txt-do-not-search-ssh-sshd-commands.patch @@ -1,4 +1,4 @@ -From 69a89e8f015802f61637fed0d3791d20a594f298 Mon Sep 17 00:00:00 2001 +From 99fcb71903cca8458bcd6c0d5b676619a9710dab Mon Sep 17 00:00:00 2001 From: Yi Zhao Date: Wed, 15 Mar 2023 16:51:58 +0800 Subject: [PATCH] tests/CMakeLists.txt: do not search ssh/sshd commands on host @@ -9,16 +9,15 @@ not required by unittests, we can skip the search. Upstream-Status: Inappropriate [embedded specific] Signed-off-by: Yi Zhao - --- tests/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt -index f5c30061..885c926a 100644 +index 89b95d08..e481534c 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt -@@ -86,6 +86,7 @@ set(TEST_TARGET_LIBRARIES +@@ -96,6 +96,7 @@ set(TEST_TARGET_LIBRARIES add_subdirectory(unittests) @@ -26,11 +25,14 @@ index f5c30061..885c926a 100644 # OpenSSH Capabilities are required for all unit tests find_program(SSH_EXECUTABLE NAMES ssh) if (SSH_EXECUTABLE) -@@ -302,6 +303,7 @@ if (CLIENT_TESTING OR SERVER_TESTING) +@@ -345,6 +346,7 @@ endif (WITH_PKCS11_URI) + file(COPY gss/kdcsetup.sh DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/gss FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE) - message(STATUS "TORTURE_ENVIRONMENT=${TORTURE_ENVIRONMENT}") - endif () + message(STATUS "TORTURE_ENVIRONMENT=${TORTURE_ENVIRONMENT}") +endif () configure_file(tests_config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/tests_config.h) +-- +2.25.1 + diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libssh/libssh/CVE-2025-5318.patch b/sources/meta-openembedded/meta-oe/recipes-support/libssh/libssh/CVE-2025-5318.patch deleted file mode 100644 index 02efc7a8..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/libssh/libssh/CVE-2025-5318.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 5f4ffda88770f95482fd0e66aa44106614dbf466 Mon Sep 17 00:00:00 2001 -From: Jakub Jelen -Date: Tue, 22 Apr 2025 21:18:44 +0200 -Subject: CVE-2025-5318: sftpserver: Fix possible buffer overrun - -Signed-off-by: Jakub Jelen -Reviewed-by: Andreas Schneider - -Upstream-Status: Backport [https://git.libssh.org/projects/libssh.git/commit/?id=5f4ffda88770f95482fd0e66aa44106614dbf466] -CVE: CVE-2025-5318 -Signed-off-by: Hitendra Prajapati ---- - src/sftpserver.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/sftpserver.c b/src/sftpserver.c -index 9117f155..b3349e16 100644 ---- a/src/sftpserver.c -+++ b/src/sftpserver.c -@@ -538,7 +538,7 @@ void *sftp_handle(sftp_session sftp, ssh_string handle){ - - memcpy(&val, ssh_string_data(handle), sizeof(uint32_t)); - -- if (val > SFTP_HANDLES) { -+ if (val >= SFTP_HANDLES) { - return NULL; - } - --- -2.49.0 - diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libssh/libssh_0.10.6.bb b/sources/meta-openembedded/meta-oe/recipes-support/libssh/libssh_0.10.6.bb deleted file mode 100644 index 3123500f..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/libssh/libssh_0.10.6.bb +++ /dev/null @@ -1,49 +0,0 @@ -SUMMARY = "Multiplatform C library implementing the SSHv2 and SSHv1 protocol" -HOMEPAGE = "http://www.libssh.org" -SECTION = "libs" -LICENSE = "LGPL-2.1-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=dabb4958b830e5df11d2b0ed8ea255a0" - -DEPENDS = "zlib openssl" - -SRC_URI = "git://git.libssh.org/projects/libssh.git;protocol=https;branch=stable-0.10 \ - file://0001-tests-CMakeLists.txt-do-not-search-ssh-sshd-commands.patch \ - file://0001-libgcrypt.c-Fix-prototype-of-des3_encrypt-des3_decry.patch \ - file://run-ptest \ - file://CVE-2025-5318.patch \ - " -SRCREV = "10e09e273f69e149389b3e0e5d44b8c221c2e7f6" - -S = "${WORKDIR}/git" - -inherit cmake ptest - -PACKAGECONFIG ??= "gcrypt ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}" -PACKAGECONFIG[gssapi] = "-DWITH_GSSAPI=1, -DWITH_GSSAPI=0, krb5, " -PACKAGECONFIG[gcrypt] = "-DWITH_GCRYPT=1, -DWITH_GCRYPT=0, libgcrypt, " -PACKAGECONFIG[tests] = "-DUNIT_TESTING=1, -DUNIT_TESTING=0, cmocka" - -ARM_INSTRUCTION_SET:armv5 = "arm" - -EXTRA_OECMAKE = " \ - -DWITH_PCAP=1 \ - -DWITH_SFTP=1 \ - -DWITH_ZLIB=1 \ - -DWITH_EXAMPLES=0 \ - " - -do_compile:prepend () { - if [ ${PTEST_ENABLED} = "1" ]; then - sed -i -e 's|${B}|${PTEST_PATH}|g' ${B}/config.h - sed -i -e 's|${S}|${PTEST_PATH}|g' ${B}/config.h - fi -} - -do_install_ptest () { - install -d ${D}${PTEST_PATH}/tests - cp -f ${B}/tests/unittests/torture_* ${D}${PTEST_PATH}/tests/ - install -d ${D}${PTEST_PATH}/tests/unittests - cp -f ${S}/tests/unittests/hello*.sh ${D}${PTEST_PATH}/tests/unittests/ -} - -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libssh/libssh_0.11.1.bb b/sources/meta-openembedded/meta-oe/recipes-support/libssh/libssh_0.11.1.bb new file mode 100644 index 00000000..5f39c2d7 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/libssh/libssh_0.11.1.bb @@ -0,0 +1,50 @@ +SUMMARY = "Multiplatform C library implementing the SSHv2 and SSHv1 protocol" +HOMEPAGE = "http://www.libssh.org" +SECTION = "libs" +LICENSE = "LGPL-2.1-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=dabb4958b830e5df11d2b0ed8ea255a0" + +DEPENDS = "zlib openssl" + +SRC_URI = "git://git.libssh.org/projects/libssh.git;protocol=https;branch=stable-0.11 \ + file://0001-tests-CMakeLists.txt-do-not-search-ssh-sshd-commands.patch \ + file://run-ptest \ + " + +SRC_URI:append:toolchain-clang = " file://0001-CompilerChecks.cmake-drop-Wunused-variable-flag.patch" + +SRCREV = "854795c654eda518ed6de6c1ebb4e2107fcb2e73" + +S = "${WORKDIR}/git" + +inherit cmake ptest + +PACKAGECONFIG ??= "gcrypt ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}" +PACKAGECONFIG[gssapi] = "-DWITH_GSSAPI=1, -DWITH_GSSAPI=0, krb5, " +PACKAGECONFIG[gcrypt] = "-DWITH_GCRYPT=1, -DWITH_GCRYPT=0, libgcrypt, " +PACKAGECONFIG[tests] = "-DUNIT_TESTING=1, -DUNIT_TESTING=0, cmocka" + +ARM_INSTRUCTION_SET:armv5 = "arm" + +EXTRA_OECMAKE = " \ + -DWITH_PCAP=1 \ + -DWITH_SFTP=1 \ + -DWITH_ZLIB=1 \ + -DWITH_EXAMPLES=0 \ + " + +do_compile:prepend () { + if [ ${PTEST_ENABLED} = "1" ]; then + sed -i -e 's|${B}|${PTEST_PATH}|g' ${B}/config.h + sed -i -e 's|${S}|${PTEST_PATH}|g' ${B}/config.h + fi +} + +do_install_ptest () { + install -d ${D}${PTEST_PATH}/tests + cp -f ${B}/tests/unittests/torture_* ${D}${PTEST_PATH}/tests/ + install -d ${D}${PTEST_PATH}/tests/unittests + cp -f ${S}/tests/unittests/hello*.sh ${D}${PTEST_PATH}/tests/unittests/ +} + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libtar/files/0003-Fix-missing-prototype-compiler-warnings.patch b/sources/meta-openembedded/meta-oe/recipes-support/libtar/files/0003-Fix-missing-prototype-compiler-warnings.patch new file mode 100644 index 00000000..f0fd2a4a --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/libtar/files/0003-Fix-missing-prototype-compiler-warnings.patch @@ -0,0 +1,53 @@ +From 9426ac3d232e2f90c571979a2166c5e1328967d1 Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Tue, 15 Oct 2013 14:39:04 +0200 +Subject: [PATCH] Fix missing prototype compiler warnings + +Signed-off-by: Kamil Dudka + +Upstream-Status: Backport [https://repo.or.cz/libtar.git/commit/30e5556d1c9323e9f1887b28d42581c2954b53c9] + +Signed-off-by: Katariina Lounento +--- + lib/append.c | 2 ++ + lib/output.c | 1 + + lib/wrapper.c | 1 + + 3 files changed, 4 insertions(+) + +diff --git a/lib/append.c b/lib/append.c +index 13e1ace..e8bd89d 100644 +--- a/lib/append.c ++++ b/lib/append.c +@@ -13,6 +13,8 @@ + #include + + #include ++#include ++#include + #include + #include + #include +diff --git a/lib/output.c b/lib/output.c +index a2db929..a5262ee 100644 +--- a/lib/output.c ++++ b/lib/output.c +@@ -13,6 +13,7 @@ + #include + + #include ++#include + #include + #include + #include +diff --git a/lib/wrapper.c b/lib/wrapper.c +index 4cd0652..44cc435 100644 +--- a/lib/wrapper.c ++++ b/lib/wrapper.c +@@ -13,6 +13,7 @@ + #include + + #include ++#include + #include + #include + #include diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libtar/files/0004-Fix-invalid-memory-de-reference-issue.patch b/sources/meta-openembedded/meta-oe/recipes-support/libtar/files/0004-Fix-invalid-memory-de-reference-issue.patch new file mode 100644 index 00000000..b1ecb552 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/libtar/files/0004-Fix-invalid-memory-de-reference-issue.patch @@ -0,0 +1,44 @@ +From c0a89709860acae5ef67727db7b23db385703bf6 Mon Sep 17 00:00:00 2001 +From: Huzaifa Sidhpurwala +Date: Tue, 15 Oct 2013 14:39:05 +0200 +Subject: [PATCH] Fix invalid memory de-reference issue + +Bug: https://bugzilla.redhat.com/551415 + +Signed-off-by: Kamil Dudka + +Upstream-Status: Backport [https://repo.or.cz/libtar.git/commit/560911b694055b0c677431cf85d4d0d5ebd1a3fd] + +Signed-off-by: Katariina Lounento +--- + lib/libtar.h | 1 + + lib/util.c | 4 +--- + 2 files changed, 2 insertions(+), 3 deletions(-) + +diff --git a/lib/libtar.h b/lib/libtar.h +index 55f509a..7fc4d03 100644 +--- a/lib/libtar.h ++++ b/lib/libtar.h +@@ -172,6 +172,7 @@ int th_write(TAR *t); + #define TH_ISDIR(t) ((t)->th_buf.typeflag == DIRTYPE \ + || S_ISDIR((mode_t)oct_to_int((t)->th_buf.mode)) \ + || ((t)->th_buf.typeflag == AREGTYPE \ ++ && strlen((t)->th_buf.name) \ + && ((t)->th_buf.name[strlen((t)->th_buf.name) - 1] == '/'))) + #define TH_ISFIFO(t) ((t)->th_buf.typeflag == FIFOTYPE \ + || S_ISFIFO((mode_t)oct_to_int((t)->th_buf.mode))) +diff --git a/lib/util.c b/lib/util.c +index 31e8315..11438ef 100644 +--- a/lib/util.c ++++ b/lib/util.c +@@ -148,9 +148,7 @@ oct_to_int(char *oct) + { + int i; + +- sscanf(oct, "%o", &i); +- +- return i; ++ return sscanf(oct, "%o", &i) == 1 ? i : 0; + } + + diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libtar/files/0005-fix-file-descriptor-leaks-reported-by-cppcheck.patch b/sources/meta-openembedded/meta-oe/recipes-support/libtar/files/0005-fix-file-descriptor-leaks-reported-by-cppcheck.patch new file mode 100644 index 00000000..627c2701 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/libtar/files/0005-fix-file-descriptor-leaks-reported-by-cppcheck.patch @@ -0,0 +1,101 @@ +From d998b9f75c79aab68255dace641dd30db239eff6 Mon Sep 17 00:00:00 2001 +From: Kamil Dudka +Date: Tue, 15 Oct 2013 19:48:41 -0400 +Subject: [PATCH] fix file descriptor leaks reported by cppcheck + +Bug: https://bugzilla.redhat.com/785760 + +Authored by Kamil Dudka . + +Upstream-Status: Backport [https://repo.or.cz/libtar.git/commit/abd0274e6b2f708e9eaa29414b07b3f542cec694] + +Signed-off-by: Katariina Lounento +--- + lib/append.c | 14 +++++++++----- + lib/extract.c | 4 ++++ + libtar/libtar.c | 3 +++ + 3 files changed, 16 insertions(+), 5 deletions(-) + +diff --git a/lib/append.c b/lib/append.c +index e8bd89d..ff58532 100644 +--- a/lib/append.c ++++ b/lib/append.c +@@ -216,6 +216,7 @@ tar_append_regfile(TAR *t, const char *realname) + int filefd; + int i, j; + size_t size; ++ int rv = -1; + + filefd = open(realname, O_RDONLY); + if (filefd == -1) +@@ -234,25 +235,28 @@ tar_append_regfile(TAR *t, const char *realname) + { + if (j != -1) + errno = EINVAL; +- return -1; ++ goto fail; + } + if (tar_block_write(t, &block) == -1) +- return -1; ++ goto fail; + } + + if (i > 0) + { + j = read(filefd, &block, i); + if (j == -1) +- return -1; ++ goto fail; + memset(&(block[i]), 0, T_BLOCKSIZE - i); + if (tar_block_write(t, &block) == -1) +- return -1; ++ goto fail; + } + ++ /* success! */ ++ rv = 0; ++fail: + close(filefd); + +- return 0; ++ return rv; + } + + +diff --git a/lib/extract.c b/lib/extract.c +index 36357e7..9fc6ad5 100644 +--- a/lib/extract.c ++++ b/lib/extract.c +@@ -228,13 +228,17 @@ tar_extract_regfile(TAR *t, char *realname) + { + if (k != -1) + errno = EINVAL; ++ close(fdout); + return -1; + } + + /* write block to output file */ + if (write(fdout, buf, + ((i > T_BLOCKSIZE) ? T_BLOCKSIZE : i)) == -1) ++ { ++ close(fdout); + return -1; ++ } + } + + /* close output file */ +diff --git a/libtar/libtar.c b/libtar/libtar.c +index 9fa92b2..bb5644c 100644 +--- a/libtar/libtar.c ++++ b/libtar/libtar.c +@@ -83,7 +83,10 @@ gzopen_frontend(char *pathname, int oflags, int mode) + return -1; + + if ((oflags & O_CREAT) && fchmod(fd, mode)) ++ { ++ close(fd); + return -1; ++ } + + gzf = gzdopen(fd, gzoflags); + if (!gzf) diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libtar/files/0006-fix-memleak-on-tar_open-failure.patch b/sources/meta-openembedded/meta-oe/recipes-support/libtar/files/0006-fix-memleak-on-tar_open-failure.patch new file mode 100644 index 00000000..90809ad8 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/libtar/files/0006-fix-memleak-on-tar_open-failure.patch @@ -0,0 +1,26 @@ +From f6c5cba59444ecda9bbc22b8e8e57fd1015a688d Mon Sep 17 00:00:00 2001 +From: Huzaifa Sidhpurwala +Date: Tue, 15 Oct 2013 20:02:58 -0400 +Subject: [PATCH] fix memleak on tar_open() failure + +Authored by Huzaifa Sidhpurwala . + +Upstream-Status: Backport [https://repo.or.cz/libtar.git/commit/36629a41208375f5105427e98078127551692028] + +Signed-off-by: Katariina Lounento +--- + lib/handle.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/lib/handle.c b/lib/handle.c +index 33a262c..002d23c 100644 +--- a/lib/handle.c ++++ b/lib/handle.c +@@ -82,6 +82,7 @@ tar_open(TAR **t, const char *pathname, tartype_t *type, + (*t)->fd = (*((*t)->type->openfunc))(pathname, oflags, mode); + if ((*t)->fd == -1) + { ++ libtar_hash_free((*t)->h, NULL); + free(*t); + return -1; + } diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libtar/files/0007-fix-memleaks-in-libtar-sample-program.patch b/sources/meta-openembedded/meta-oe/recipes-support/libtar/files/0007-fix-memleaks-in-libtar-sample-program.patch new file mode 100644 index 00000000..f88bcbf9 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/libtar/files/0007-fix-memleaks-in-libtar-sample-program.patch @@ -0,0 +1,119 @@ +From e3888e452aee72e0d658185ac20e8e63bed1aff8 Mon Sep 17 00:00:00 2001 +From: Huzaifa Sidhpurwala +Date: Tue, 15 Oct 2013 20:05:04 -0400 +Subject: [PATCH] fix memleaks in libtar sample program + +Authored by Huzaifa Sidhpurwala . + +Upstream-Status: Backport [https://repo.or.cz/libtar.git/commit/f3c711cf3054ff366a1a3500cdc8c64ecc2d2da6] + +Signed-off-by: Katariina Lounento +--- + libtar/libtar.c | 29 ++++++++++++++++++----------- + 1 file changed, 18 insertions(+), 11 deletions(-) + +diff --git a/libtar/libtar.c b/libtar/libtar.c +index bb5644c..23f8741 100644 +--- a/libtar/libtar.c ++++ b/libtar/libtar.c +@@ -253,6 +253,7 @@ extract(char *tarfile, char *rootdir) + if (tar_extract_all(t, rootdir) != 0) + { + fprintf(stderr, "tar_extract_all(): %s\n", strerror(errno)); ++ tar_close(t); + return -1; + } + +@@ -270,12 +271,13 @@ extract(char *tarfile, char *rootdir) + + + void +-usage() ++usage(void *rootdir) + { + printf("Usage: %s [-C rootdir] [-g] [-z] -x|-t filename.tar\n", + progname); + printf(" %s [-C rootdir] [-g] [-z] -c filename.tar ...\n", + progname); ++ free(rootdir); + exit(-1); + } + +@@ -292,6 +294,7 @@ main(int argc, char *argv[]) + int c; + int mode = 0; + libtar_list_t *l; ++ int return_code = -2; + + progname = basename(argv[0]); + +@@ -313,17 +316,17 @@ main(int argc, char *argv[]) + break; + case 'c': + if (mode) +- usage(); ++ usage(rootdir); + mode = MODE_CREATE; + break; + case 'x': + if (mode) +- usage(); ++ usage(rootdir); + mode = MODE_EXTRACT; + break; + case 't': + if (mode) +- usage(); ++ usage(rootdir); + mode = MODE_LIST; + break; + #ifdef HAVE_LIBZ +@@ -332,7 +335,7 @@ main(int argc, char *argv[]) + break; + #endif /* HAVE_LIBZ */ + default: +- usage(); ++ usage(rootdir); + } + + if (!mode || ((argc - optind) < (mode == MODE_CREATE ? 2 : 1))) +@@ -341,7 +344,7 @@ main(int argc, char *argv[]) + printf("argc - optind == %d\tmode == %d\n", argc - optind, + mode); + #endif +- usage(); ++ usage(rootdir); + } + + #ifdef DEBUG +@@ -351,21 +354,25 @@ main(int argc, char *argv[]) + switch (mode) + { + case MODE_EXTRACT: +- return extract(argv[optind], rootdir); ++ return_code = extract(argv[optind], rootdir); ++ break; + case MODE_CREATE: + tarfile = argv[optind]; + l = libtar_list_new(LIST_QUEUE, NULL); + for (c = optind + 1; c < argc; c++) + libtar_list_add(l, argv[c]); +- return create(tarfile, rootdir, l); ++ return_code = create(tarfile, rootdir, l); ++ libtar_list_free(l, NULL); ++ break; + case MODE_LIST: +- return list(argv[optind]); ++ return_code = list(argv[optind]); ++ break; + default: + break; + } + +- /* NOTREACHED */ +- return -2; ++ free(rootdir); ++ return return_code; + } + + diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libtar/files/0008-decode-avoid-using-a-static-buffer-in-th_get_pathnam.patch b/sources/meta-openembedded/meta-oe/recipes-support/libtar/files/0008-decode-avoid-using-a-static-buffer-in-th_get_pathnam.patch new file mode 100644 index 00000000..beba4540 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/libtar/files/0008-decode-avoid-using-a-static-buffer-in-th_get_pathnam.patch @@ -0,0 +1,89 @@ +From edbee9832475347183a841a8fd5be71f74e10392 Mon Sep 17 00:00:00 2001 +From: Kamil Dudka +Date: Wed, 23 Oct 2013 15:04:22 +0200 +Subject: [PATCH] decode: avoid using a static buffer in th_get_pathname() + +A solution suggested by Chris Frey: +https://lists.feep.net:8080/pipermail/libtar/2013-October/000377.html + +Note this can break programs that expect sizeof(TAR) to be fixed. + +Authored by Kamil Dudka . + +Upstream-Status: Backport [https://repo.or.cz/libtar.git/commit/ec613af2e9371d7a3e1f7c7a6822164a4255b4d1] + +Signed-off-by: Katariina Lounento +--- + lib/decode.c | 24 +++++++++++++++++------- + lib/handle.c | 1 + + lib/libtar.h | 3 +++ + 3 files changed, 21 insertions(+), 7 deletions(-) + +diff --git a/lib/decode.c b/lib/decode.c +index c16ea2d..edb2185 100644 +--- a/lib/decode.c ++++ b/lib/decode.c +@@ -26,20 +26,30 @@ + char * + th_get_pathname(TAR *t) + { +- static TLS_THREAD char filename[MAXPATHLEN]; +- + if (t->th_buf.gnu_longname) + return t->th_buf.gnu_longname; + +- if (t->th_buf.prefix[0] != '\0') ++ /* allocate the th_pathname buffer if not already */ ++ if (t->th_pathname == NULL) ++ { ++ t->th_pathname = malloc(MAXPATHLEN * sizeof(char)); ++ if (t->th_pathname == NULL) ++ /* out of memory */ ++ return NULL; ++ } ++ ++ if (t->th_buf.prefix[0] == '\0') ++ { ++ snprintf(t->th_pathname, MAXPATHLEN, "%.100s", t->th_buf.name); ++ } ++ else + { +- snprintf(filename, sizeof(filename), "%.155s/%.100s", ++ snprintf(t->th_pathname, MAXPATHLEN, "%.155s/%.100s", + t->th_buf.prefix, t->th_buf.name); +- return filename; + } + +- snprintf(filename, sizeof(filename), "%.100s", t->th_buf.name); +- return filename; ++ /* will be deallocated in tar_close() */ ++ return t->th_pathname; + } + + +diff --git a/lib/handle.c b/lib/handle.c +index 002d23c..a19c046 100644 +--- a/lib/handle.c ++++ b/lib/handle.c +@@ -122,6 +122,7 @@ tar_close(TAR *t) + libtar_hash_free(t->h, ((t->oflags & O_ACCMODE) == O_RDONLY + ? free + : (libtar_freefunc_t)tar_dev_free)); ++ free(t->th_pathname); + free(t); + + return i; +diff --git a/lib/libtar.h b/lib/libtar.h +index 7fc4d03..08a8e0f 100644 +--- a/lib/libtar.h ++++ b/lib/libtar.h +@@ -85,6 +85,9 @@ typedef struct + int options; + struct tar_header th_buf; + libtar_hash_t *h; ++ ++ /* introduced in libtar 1.2.21 */ ++ char *th_pathname; + } + TAR; + diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libtar/files/0009-Check-for-NULL-before-freeing-th_pathname.patch b/sources/meta-openembedded/meta-oe/recipes-support/libtar/files/0009-Check-for-NULL-before-freeing-th_pathname.patch new file mode 100644 index 00000000..2d8f2117 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/libtar/files/0009-Check-for-NULL-before-freeing-th_pathname.patch @@ -0,0 +1,30 @@ +From bc8ec7d940d7ffc870638521bd134098d2efa5df Mon Sep 17 00:00:00 2001 +From: Chris Frey +Date: Thu, 24 Oct 2013 17:55:12 -0400 +Subject: [PATCH] Check for NULL before freeing th_pathname + +Thanks to Harald Koch for pointing out that AIX 4 and 5 still need this. + +Authored by Chris Frey . + +Upstream-Status: Backport [https://repo.or.cz/libtar.git/commit/495d0c0eabc5648186e7d58ad54b508d14af38f4] + +Signed-off-by: Katariina Lounento +--- + lib/handle.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/lib/handle.c b/lib/handle.c +index a19c046..28a7dc2 100644 +--- a/lib/handle.c ++++ b/lib/handle.c +@@ -122,7 +122,8 @@ tar_close(TAR *t) + libtar_hash_free(t->h, ((t->oflags & O_ACCMODE) == O_RDONLY + ? free + : (libtar_freefunc_t)tar_dev_free)); +- free(t->th_pathname); ++ if (t->th_pathname != NULL) ++ free(t->th_pathname); + free(t); + + return i; diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libtar/files/0010-Added-stdlib.h-for-malloc-in-lib-decode.c.patch b/sources/meta-openembedded/meta-oe/recipes-support/libtar/files/0010-Added-stdlib.h-for-malloc-in-lib-decode.c.patch new file mode 100644 index 00000000..edbd636b --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/libtar/files/0010-Added-stdlib.h-for-malloc-in-lib-decode.c.patch @@ -0,0 +1,26 @@ +From c64dfdc6ec5bc752aafd1ac16a380f47602197c4 Mon Sep 17 00:00:00 2001 +From: Chris Frey +Date: Thu, 24 Oct 2013 17:58:47 -0400 +Subject: [PATCH] Added stdlib.h for malloc() in lib/decode.c + +Authored by Chris Frey . + +Upstream-Status: Backport [https://repo.or.cz/libtar.git/commit/20aa09bd7775094a2beb0f136c2c7d9e9fd6c7e6] + +Signed-off-by: Katariina Lounento +--- + lib/decode.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/lib/decode.c b/lib/decode.c +index edb2185..35312be 100644 +--- a/lib/decode.c ++++ b/lib/decode.c +@@ -13,6 +13,7 @@ + #include + + #include ++#include + #include + #include + #include diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libtar/files/0011-libtar-fix-programming-mistakes-detected-by-static-a.patch b/sources/meta-openembedded/meta-oe/recipes-support/libtar/files/0011-libtar-fix-programming-mistakes-detected-by-static-a.patch new file mode 100644 index 00000000..7b39df42 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/libtar/files/0011-libtar-fix-programming-mistakes-detected-by-static-a.patch @@ -0,0 +1,100 @@ +From b469d621c0143e652c51bb238fd2060135aa2009 Mon Sep 17 00:00:00 2001 +From: Kamil Dudka +Date: Tue, 6 Nov 2018 17:24:05 +0100 +Subject: [PATCH] libtar: fix programming mistakes detected by static analysis + +Authored by Kamil Dudka . + +meta-openembedded uses Debian's release tarball [1]. Debian uses +repo.or.cz/libtar.git as their upstream [2]. repo.or.cz/libtar.git has +been inactive since 2013 [3]. + +Upstream-Status: Inactive-Upstream [lastrelease: 2013 lastcommit: 2013] + +[1] https://git.openembedded.org/meta-openembedded/tree/meta-oe/recipes-support/libtar/libtar_1.2.20.bb?h=master#n8 +[2] http://svn.kibibyte.se/libtar/trunk/debian/control (rev 51; not tagged) +[3] https://repo.or.cz/libtar.git/shortlog/refs/heads/master + +Signed-off-by: Katariina Lounento +--- + lib/append.c | 7 +++++++ + lib/wrapper.c | 11 +++++++---- + libtar/libtar.c | 1 + + 3 files changed, 15 insertions(+), 4 deletions(-) + +diff --git a/lib/append.c b/lib/append.c +index ff58532..6386a50 100644 +--- a/lib/append.c ++++ b/lib/append.c +@@ -110,9 +110,16 @@ tar_append_file(TAR *t, const char *realname, const char *savename) + td->td_dev = s.st_dev; + td->td_h = libtar_hash_new(256, (libtar_hashfunc_t)ino_hash); + if (td->td_h == NULL) ++ { ++ free(td); + return -1; ++ } + if (libtar_hash_add(t->h, td) == -1) ++ { ++ libtar_hash_free(td->td_h, free); ++ free(td); + return -1; ++ } + } + libtar_hashptr_reset(&hp); + if (libtar_hash_getkey(td->td_h, &hp, &(s.st_ino), +diff --git a/lib/wrapper.c b/lib/wrapper.c +index 44cc435..2d3f5b9 100644 +--- a/lib/wrapper.c ++++ b/lib/wrapper.c +@@ -97,6 +97,7 @@ tar_append_tree(TAR *t, char *realdir, char *savedir) + struct dirent *dent; + DIR *dp; + struct stat s; ++ int ret = -1; + + #ifdef DEBUG + printf("==> tar_append_tree(0x%lx, \"%s\", \"%s\")\n", +@@ -130,24 +131,26 @@ tar_append_tree(TAR *t, char *realdir, char *savedir) + dent->d_name); + + if (lstat(realpath, &s) != 0) +- return -1; ++ goto fail; + + if (S_ISDIR(s.st_mode)) + { + if (tar_append_tree(t, realpath, + (savedir ? savepath : NULL)) != 0) +- return -1; ++ goto fail; + continue; + } + + if (tar_append_file(t, realpath, + (savedir ? savepath : NULL)) != 0) +- return -1; ++ goto fail; + } + ++ ret = 0; ++fail: + closedir(dp); + +- return 0; ++ return ret; + } + + +diff --git a/libtar/libtar.c b/libtar/libtar.c +index 23f8741..ac339e7 100644 +--- a/libtar/libtar.c ++++ b/libtar/libtar.c +@@ -92,6 +92,7 @@ gzopen_frontend(char *pathname, int oflags, int mode) + if (!gzf) + { + errno = ENOMEM; ++ close(fd); + return -1; + } + diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libtar/files/CVE-2013-4420.patch b/sources/meta-openembedded/meta-oe/recipes-support/libtar/files/CVE-2013-4420.patch new file mode 100644 index 00000000..93b35cbc --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/libtar/files/CVE-2013-4420.patch @@ -0,0 +1,160 @@ +From 2c81f47508fa6bce9df84e3b43dfb16dffb742a0 Mon Sep 17 00:00:00 2001 +From: Raphael Geissert +Date: Thu, 12 Sep 2024 15:51:05 +0300 +Subject: [PATCH] Avoid directory traversal when extracting archives + +Description of the vulnerability from the NIST CVE tracker [1]: + + Multiple directory traversal vulnerabilities in the (1) + tar_extract_glob and (2) tar_extract_all functions in libtar 1.2.20 + and earlier allow remote attackers to overwrite arbitrary files via + a .. (dot dot) in a crafted tar file. + +Imported from the Debian libtar package 1.2.20-8 [2]. Original Debian +description: + + Author: Raphael Geissert + Bug-Debian: https://bugs.debian.org/731860 + Description: Avoid directory traversal when extracting archives + by skipping over leading slashes and any prefix containing ".." components. + Forwarded: yes + +meta-openembedded uses Debian's release tarball [3]. Debian uses +repo.or.cz/libtar.git as their upstream [4]. repo.or.cz/libtar.git has +been inactive since 2013 [5]. + +CVE: CVE-2013-4420 + +Upstream-Status: Inactive-Upstream [lastrelease: 2013 lastcommit: 2013] + +Comments: Added the commit message + +[1] https://nvd.nist.gov/vuln/detail/CVE-2013-4420 +[2] https://sources.debian.org/patches/libtar/1.2.20-8/CVE-2013-4420.patch/ +[3] https://git.openembedded.org/meta-openembedded/tree/meta-oe/recipes-support/libtar/libtar_1.2.20.bb?h=master#n8 +[4] http://svn.kibibyte.se/libtar/trunk/debian/control (rev 51; not tagged) +[5] https://repo.or.cz/libtar.git/shortlog/refs/heads/master + +Signed-off-by: Katariina Lounento +--- + lib/decode.c | 33 +++++++++++++++++++++++++++++++-- + lib/extract.c | 8 ++++---- + lib/internal.h | 1 + + lib/output.c | 4 ++-- + 4 files changed, 38 insertions(+), 8 deletions(-) + +diff --git a/lib/decode.c b/lib/decode.c +index 35312be..edd5f2e 100644 +--- a/lib/decode.c ++++ b/lib/decode.c +@@ -22,13 +22,42 @@ + # include + #endif + ++char * ++safer_name_suffix (char const *file_name) ++{ ++ char const *p, *t; ++ p = t = file_name; ++ while (*p == '/') t = ++p; ++ while (*p) ++ { ++ while (p[0] == '.' && p[0] == p[1] && p[2] == '/') ++ { ++ p += 3; ++ t = p; ++ } ++ /* advance pointer past the next slash */ ++ while (*p && (p++)[0] != '/'); ++ } ++ ++ if (!*t) ++ { ++ t = "."; ++ } ++ ++ if (t != file_name) ++ { ++ /* TODO: warn somehow that the path was modified */ ++ } ++ return (char*)t; ++} ++ + + /* determine full path name */ + char * + th_get_pathname(TAR *t) + { + if (t->th_buf.gnu_longname) +- return t->th_buf.gnu_longname; ++ return safer_name_suffix(t->th_buf.gnu_longname); + + /* allocate the th_pathname buffer if not already */ + if (t->th_pathname == NULL) +@@ -50,7 +79,7 @@ th_get_pathname(TAR *t) + } + + /* will be deallocated in tar_close() */ +- return t->th_pathname; ++ return safer_name_suffix(t->th_pathname); + } + + +diff --git a/lib/extract.c b/lib/extract.c +index 9fc6ad5..4ff1a95 100644 +--- a/lib/extract.c ++++ b/lib/extract.c +@@ -302,14 +302,14 @@ tar_extract_hardlink(TAR * t, char *realname) + if (mkdirhier(dirname(filename)) == -1) + return -1; + libtar_hashptr_reset(&hp); +- if (libtar_hash_getkey(t->h, &hp, th_get_linkname(t), ++ if (libtar_hash_getkey(t->h, &hp, safer_name_suffix(th_get_linkname(t)), + (libtar_matchfunc_t)libtar_str_match) != 0) + { + lnp = (char *)libtar_hashptr_data(&hp); + linktgt = &lnp[strlen(lnp) + 1]; + } + else +- linktgt = th_get_linkname(t); ++ linktgt = safer_name_suffix(th_get_linkname(t)); + + #ifdef DEBUG + printf(" ==> extracting: %s (link to %s)\n", filename, linktgt); +@@ -347,9 +347,9 @@ tar_extract_symlink(TAR *t, char *realname) + + #ifdef DEBUG + printf(" ==> extracting: %s (symlink to %s)\n", +- filename, th_get_linkname(t)); ++ filename, safer_name_suffix(th_get_linkname(t))); + #endif +- if (symlink(th_get_linkname(t), filename) == -1) ++ if (symlink(safer_name_suffix(th_get_linkname(t)), filename) == -1) + { + #ifdef DEBUG + perror("symlink()"); +diff --git a/lib/internal.h b/lib/internal.h +index da7be7f..f05ca4f 100644 +--- a/lib/internal.h ++++ b/lib/internal.h +@@ -21,3 +21,4 @@ + #define TLS_THREAD + #endif + ++char* safer_name_suffix(char const*); +diff --git a/lib/output.c b/lib/output.c +index a5262ee..af754f1 100644 +--- a/lib/output.c ++++ b/lib/output.c +@@ -124,9 +124,9 @@ th_print_long_ls(TAR *t) + else + printf(" link to "); + if ((t->options & TAR_GNU) && t->th_buf.gnu_longlink != NULL) +- printf("%s", t->th_buf.gnu_longlink); ++ printf("%s", safer_name_suffix(t->th_buf.gnu_longlink)); + else +- printf("%.100s", t->th_buf.linkname); ++ printf("%.100s", safer_name_suffix(t->th_buf.linkname)); + } + + putchar('\n'); diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libtar/files/CVE-2021-33640-CVE-2021-33645-CVE-2021-33646.patch b/sources/meta-openembedded/meta-oe/recipes-support/libtar/files/CVE-2021-33640-CVE-2021-33645-CVE-2021-33646.patch new file mode 100644 index 00000000..0a2773fa --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/libtar/files/CVE-2021-33640-CVE-2021-33645-CVE-2021-33646.patch @@ -0,0 +1,42 @@ +From e590423f62cf5bc922ff4a1f7eab9bf7d65ee472 Mon Sep 17 00:00:00 2001 +From: Kamil Dudka +Date: Tue, 4 Oct 2022 10:39:35 +0200 +Subject: [PATCH] free memory allocated by gnu_long* fields + +Authored by Kamil Dudka . + +meta-openembedded uses Debian's release tarball [1]. Debian uses +repo.or.cz/libtar.git as their upstream [2]. repo.or.cz/libtar.git has +been inactive since 2013 [3]. + +CVE: CVE-2021-33640 CVE-2021-33645 CVE-2021-33646 + +Upstream-Status: Inactive-Upstream [lastrelease: 2013 lastcommit: 2013] + +[1] https://git.openembedded.org/meta-openembedded/tree/meta-oe/recipes-support/libtar/libtar_1.2.20.bb?h=master#n8 +[2] http://svn.kibibyte.se/libtar/trunk/debian/control (rev 51; not tagged) +[3] https://repo.or.cz/libtar.git/shortlog/refs/heads/master + +Signed-off-by: Katariina Lounento +--- + lib/handle.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/lib/handle.c b/lib/handle.c +index 28a7dc2..18bd8dc 100644 +--- a/lib/handle.c ++++ b/lib/handle.c +@@ -122,8 +122,11 @@ tar_close(TAR *t) + libtar_hash_free(t->h, ((t->oflags & O_ACCMODE) == O_RDONLY + ? free + : (libtar_freefunc_t)tar_dev_free)); +- if (t->th_pathname != NULL) +- free(t->th_pathname); ++ ++ free(t->th_pathname); ++ free(t->th_buf.gnu_longname); ++ free(t->th_buf.gnu_longlink); ++ + free(t); + + return i; diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libtar/files/CVE-2021-33643-CVE-2021-33644.patch b/sources/meta-openembedded/meta-oe/recipes-support/libtar/files/CVE-2021-33643-CVE-2021-33644.patch new file mode 100644 index 00000000..a61cc3b6 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/libtar/files/CVE-2021-33643-CVE-2021-33644.patch @@ -0,0 +1,52 @@ +From c778d234c396e78bacef7c9bff0dd2bb9fb6aac8 Mon Sep 17 00:00:00 2001 +From: shixuantong <1726671442@qq.com> +Date: Wed, 6 Apr 2022 17:40:57 +0800 +Subject: [PATCH] Ensure that sz is greater than 0. + +Authored by shixuantong <1726671442@qq.com>. + +meta-openembedded uses Debian's release tarball [1]. Debian uses +repo.or.cz/libtar.git as their upstream [2]. repo.or.cz/libtar.git has +been inactive since 2013 [3]. + +CVE: CVE-2021-33643 CVE-2021-33644 + +Upstream-Status: Inactive-Upstream [lastrelease: 2013 lastcommit: 2013] + +[1] https://git.openembedded.org/meta-openembedded/tree/meta-oe/recipes-support/libtar/libtar_1.2.20.bb?h=master#n8 +[2] http://svn.kibibyte.se/libtar/trunk/debian/control (rev 51; not tagged) +[3] https://repo.or.cz/libtar.git/shortlog/refs/heads/master + +Signed-off-by: Katariina Lounento +--- + lib/block.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/lib/block.c b/lib/block.c +index 092bc28..f12c4bc 100644 +--- a/lib/block.c ++++ b/lib/block.c +@@ -118,6 +118,11 @@ th_read(TAR *t) + if (TH_ISLONGLINK(t)) + { + sz = th_get_size(t); ++ if ((int)sz <= 0) ++ { ++ errno = EINVAL; ++ return -1; ++ } + blocks = (sz / T_BLOCKSIZE) + (sz % T_BLOCKSIZE ? 1 : 0); + if (blocks > ((size_t)-1 / T_BLOCKSIZE)) + { +@@ -168,6 +173,11 @@ th_read(TAR *t) + if (TH_ISLONGNAME(t)) + { + sz = th_get_size(t); ++ if ((int)sz <= 0) ++ { ++ errno = EINVAL; ++ return -1; ++ } + blocks = (sz / T_BLOCKSIZE) + (sz % T_BLOCKSIZE ? 1 : 0); + if (blocks > ((size_t)-1 / T_BLOCKSIZE)) + { diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libtar/libtar_1.2.20.bb b/sources/meta-openembedded/meta-oe/recipes-support/libtar/libtar_1.2.20.bb index f93d9c09..c7501ac6 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/libtar/libtar_1.2.20.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/libtar/libtar_1.2.20.bb @@ -8,6 +8,18 @@ LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=61cbac6719ae682ce6cd45b5c11e21af" SRC_URI = "${DEBIAN_MIRROR}/main/libt/${BPN}/${BPN}_${PV}.orig.tar.gz \ file://fix_libtool_sysroot.patch \ file://0002-Do-not-strip-libtar.patch \ + file://0003-Fix-missing-prototype-compiler-warnings.patch \ + file://0004-Fix-invalid-memory-de-reference-issue.patch \ + file://0005-fix-file-descriptor-leaks-reported-by-cppcheck.patch \ + file://0006-fix-memleak-on-tar_open-failure.patch \ + file://0007-fix-memleaks-in-libtar-sample-program.patch \ + file://0008-decode-avoid-using-a-static-buffer-in-th_get_pathnam.patch \ + file://0009-Check-for-NULL-before-freeing-th_pathname.patch \ + file://0010-Added-stdlib.h-for-malloc-in-lib-decode.c.patch \ + file://0011-libtar-fix-programming-mistakes-detected-by-static-a.patch \ + file://CVE-2021-33643-CVE-2021-33644.patch \ + file://CVE-2021-33640-CVE-2021-33645-CVE-2021-33646.patch \ + file://CVE-2013-4420.patch \ " S = "${WORKDIR}/${BPN}" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libteam/libteam/0001-include-sys-select.h-for-fd_set-definition.patch b/sources/meta-openembedded/meta-oe/recipes-support/libteam/libteam/0001-include-sys-select.h-for-fd_set-definition.patch deleted file mode 100644 index f0bd53ee..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/libteam/libteam/0001-include-sys-select.h-for-fd_set-definition.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 0ab69dc18a2057ff5bf41abcdf2b983b72d5a903 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Wed, 12 Jul 2017 15:34:49 -0700 -Subject: [PATCH 1/2] include sys/select.h for fd_set definition - -Fixes -teamnl.c:160:2: error: unknown type name 'fd_set'; did you mean 'fpos_t'? - -Signed-off-by: Khem Raj ---- -Upstream-Status: Pending - - utils/teamnl.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/utils/teamnl.c b/utils/teamnl.c -index e8de7e2..25129e8 100644 ---- a/utils/teamnl.c -+++ b/utils/teamnl.c -@@ -24,6 +24,7 @@ - #include - #include - #include -+#include - #include - #include - #include --- -2.13.2 - diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libteam/libteam/0001-teamd-Include-missing-headers-for-strrchr-and-memcmp.patch b/sources/meta-openembedded/meta-oe/recipes-support/libteam/libteam/0001-teamd-Include-missing-headers-for-strrchr-and-memcmp.patch deleted file mode 100644 index 5f8e5617..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/libteam/libteam/0001-teamd-Include-missing-headers-for-strrchr-and-memcmp.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 49693cac37ee35ff673240c8060201efe0d999c2 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Wed, 24 Aug 2022 22:27:03 -0700 -Subject: [PATCH] teamd: Include missing headers for strrchr and memcmp - -Compiler does not see the prototype for these functions otherwise and -build fails e.g. - -| ../../git/teamd/teamd_phys_port_check.c:52:10: error: call to undeclared library function 'strrchr' with type 'char *(const char *, int)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] -| start = strrchr(link, '/'); -| ^ - -Upstream-Status: Submitted [https://github.com/jpirko/libteam/pull/68] -Signed-off-by: Khem Raj ---- - teamd/teamd_phys_port_check.c | 1 + - teamd/teamd_runner_loadbalance.c | 1 + - 2 files changed, 2 insertions(+) - -diff --git a/teamd/teamd_phys_port_check.c b/teamd/teamd_phys_port_check.c -index 1eec129..c2454ab 100644 ---- a/teamd/teamd_phys_port_check.c -+++ b/teamd/teamd_phys_port_check.c -@@ -19,6 +19,7 @@ - - #include - #include -+#include - #include - #include - #include -diff --git a/teamd/teamd_runner_loadbalance.c b/teamd/teamd_runner_loadbalance.c -index a581472..421a7c6 100644 ---- a/teamd/teamd_runner_loadbalance.c -+++ b/teamd/teamd_runner_loadbalance.c -@@ -17,6 +17,7 @@ - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -+#include - #include - #include - #include --- -2.37.2 - diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libteam/libteam/0001-teamd-Pass-correct-parameter-type-to-accept-API.patch b/sources/meta-openembedded/meta-oe/recipes-support/libteam/libteam/0001-teamd-Pass-correct-parameter-type-to-accept-API.patch new file mode 100644 index 00000000..07406011 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/libteam/libteam/0001-teamd-Pass-correct-parameter-type-to-accept-API.patch @@ -0,0 +1,39 @@ +From e6ba4c16da808e47891241452a927b7f558a6420 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 11 May 2024 23:11:22 -0700 +Subject: [patch libteam] teamd: Pass correct parameter type to accept API + +accept() expects sockaddr as second parameter + +int accept (int, struct sockaddr *__restrict, socklen_t *__restrict); + +Fixes build with gcc-16 on musl systems +| ../../git/teamd/teamd_usock.c: In function 'callback_usock': +| ../../git/teamd/teamd_usock.c:280:40: error: passing argument 2 of 'accept' from incompatible pointer type [-Wincompatible-pointer-types] +| 280 | sock = accept(ctx->usock.sock, &addr, &alen); +| | ^~~~~ +| | | +| | struct sockaddr_un * + +Upstream-Status: Submitted [https://lists.fedorahosted.org/archives/list/libteam@lists.fedorahosted.org/2024/5/] +Signed-off-by: Khem Raj +--- + teamd/teamd_usock.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/teamd/teamd_usock.c b/teamd/teamd_usock.c +index 1adfdf8..5895124 100644 +--- a/teamd/teamd_usock.c ++++ b/teamd/teamd_usock.c +@@ -277,7 +277,7 @@ static int callback_usock(struct teamd_context *ctx, int events, void *priv) + int err; + + alen = sizeof(addr); +- sock = accept(ctx->usock.sock, &addr, &alen); ++ sock = accept(ctx->usock.sock, (struct sockaddr *)&addr, &alen); + if (sock == -1) { + teamd_log_err("usock: Failed to accept connection."); + return -errno; +-- +2.45.0 + diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libteam/libteam/0002-teamd-Re-adjust-include-header-order.patch b/sources/meta-openembedded/meta-oe/recipes-support/libteam/libteam/0002-teamd-Re-adjust-include-header-order.patch index ed877a72..030140ad 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/libteam/libteam/0002-teamd-Re-adjust-include-header-order.patch +++ b/sources/meta-openembedded/meta-oe/recipes-support/libteam/libteam/0002-teamd-Re-adjust-include-header-order.patch @@ -17,19 +17,15 @@ Upstream-Status: Pending teamd/teamd_runner_lacp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/teamd/teamd_runner_lacp.c b/teamd/teamd_runner_lacp.c -index 9c77fae..8800854 100644 --- a/teamd/teamd_runner_lacp.c +++ b/teamd/teamd_runner_lacp.c -@@ -23,6 +23,7 @@ +@@ -23,12 +23,12 @@ #include #include #include +#include - #include #include - #include -@@ -30,7 +31,6 @@ + #include #include #include #include @@ -37,6 +33,3 @@ index 9c77fae..8800854 100644 #include "teamd.h" #include "teamd_config.h" --- -2.13.2 - diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libteam/libteam_1.31.bb b/sources/meta-openembedded/meta-oe/recipes-support/libteam/libteam_1.31.bb deleted file mode 100644 index 6fe10abe..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/libteam/libteam_1.31.bb +++ /dev/null @@ -1,48 +0,0 @@ -SUMMARY = "Library for controlling team network device" -HOMEPAGE = "http://www.libteam.org/" -SECTION = "libs/network" - -LICENSE = "LGPL-2.1-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" - -DEPENDS = "libnl libdaemon jansson" - -SRC_URI = "git://github.com/jpirko/libteam;branch=master;protocol=https \ - file://0001-include-sys-select.h-for-fd_set-definition.patch \ - file://0002-teamd-Re-adjust-include-header-order.patch \ - file://0001-team_basic_test.py-disable-RedHat-specific-test.patch \ - file://0001-team_basic_test.py-switch-to-python3.patch \ - file://0001-team_basic_test.py-check-the-return-value.patch \ - file://0001-teamd-Include-missing-headers-for-strrchr-and-memcmp.patch \ - file://run-ptest \ - " -SRCREV = "3ee12c6d569977cf1cd30d0da77807a07aa77158" - -S = "${WORKDIR}/git" - -inherit autotools pkgconfig ptest - -FILES:${PN} = "${libdir}/libteam${SOLIBS} \ -" - -PACKAGES += "${PN}-dctl ${PN}-utils" -FILES:${PN}-dctl = "${libdir}/libteamdctl${SOLIBS} \ -" -FILES:${PN}-utils = "${bindir}/bond2team \ - ${bindir}/teamd \ - ${bindir}/teamdctl \ - ${bindir}/teamnl \ -" - -RDEPENDS:${PN}-utils = "bash" -RDEPENDS:${PN}-ptest = "python3-core libteam-utils" -# Ensure kernel has these mods enabled features/net/team/team.scc -RRECOMMENDS:${PN} += "kernel-module-team kernel-module-team-mode-activebackup \ - kernel-module-team-mode-broadcast \ - kernel-module-team-mode-loadbalance \ - kernel-module-team-mode-random \ - kernel-module-team-mode-roundrobin" - -do_install_ptest() { - install ${S}/scripts/team_basic_test.py ${D}${PTEST_PATH}/ -} diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libteam/libteam_1.32.bb b/sources/meta-openembedded/meta-oe/recipes-support/libteam/libteam_1.32.bb new file mode 100644 index 00000000..508cbb13 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/libteam/libteam_1.32.bb @@ -0,0 +1,47 @@ +SUMMARY = "Library for controlling team network device" +HOMEPAGE = "http://www.libteam.org/" +SECTION = "libs/network" + +LICENSE = "LGPL-2.1-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" + +DEPENDS = "libnl libdaemon jansson" + +SRC_URI = "git://github.com/jpirko/libteam;branch=master;protocol=https \ + file://0002-teamd-Re-adjust-include-header-order.patch \ + file://0001-team_basic_test.py-disable-RedHat-specific-test.patch \ + file://0001-team_basic_test.py-switch-to-python3.patch \ + file://0001-team_basic_test.py-check-the-return-value.patch \ + file://0001-teamd-Pass-correct-parameter-type-to-accept-API.patch \ + file://run-ptest \ + " +SRCREV = "8b843e93cee1dab61fb79b01791201cdad45e1d1" + +S = "${WORKDIR}/git" + +inherit autotools pkgconfig ptest + +FILES:${PN} = "${libdir}/libteam${SOLIBS} \ +" + +PACKAGES += "${PN}-dctl ${PN}-utils" +FILES:${PN}-dctl = "${libdir}/libteamdctl${SOLIBS} \ +" +FILES:${PN}-utils = "${bindir}/bond2team \ + ${bindir}/teamd \ + ${bindir}/teamdctl \ + ${bindir}/teamnl \ +" + +RDEPENDS:${PN}-utils = "bash" +RDEPENDS:${PN}-ptest = "python3-core libteam-utils" +# Ensure kernel has these mods enabled features/net/team/team.scc +RRECOMMENDS:${PN} += "kernel-module-team kernel-module-team-mode-activebackup \ + kernel-module-team-mode-broadcast \ + kernel-module-team-mode-loadbalance \ + kernel-module-team-mode-random \ + kernel-module-team-mode-roundrobin" + +do_install_ptest() { + install ${S}/scripts/team_basic_test.py ${D}${PTEST_PATH}/ +} diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libtinyxml/libtinyxml/CVE-2021-42260.patch b/sources/meta-openembedded/meta-oe/recipes-support/libtinyxml/libtinyxml/CVE-2021-42260.patch new file mode 100644 index 00000000..8fc62374 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/libtinyxml/libtinyxml/CVE-2021-42260.patch @@ -0,0 +1,27 @@ +Description: In stamp always advance the pointer if *p= 0xef + . + The current implementation only advanced if 0xef is followed + by two non-zero bytes. In case of malformed input (0xef should be + the start byte of a three byte character) this leads to an infinite + loop. (CVE-2021-42260) +Origin: https://sourceforge.net/p/tinyxml/git/merge-requests/1/ + +CVE: CVE-2021-42260 +Upstream-Status: Inactive-Upstream [lastrelease: 2011] +Signed-off-by: Peter Marko + +--- a/tinyxmlparser.cpp ++++ b/tinyxmlparser.cpp +@@ -274,6 +274,12 @@ void TiXmlParsingData::Stamp( const char* now, TiXmlEncoding encoding ) + else + { p +=3; ++col; } // A normal character. + } ++ else ++ { ++ // TIXML_UTF_LEAD_0 (239) is the start character of a 3 byte sequence, so ++ // there is something wrong here. Just advance the pointer to evade infinite loops ++ ++p; ++ } + } + else + { diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libtinyxml/libtinyxml/CVE-2023-34194.patch b/sources/meta-openembedded/meta-oe/recipes-support/libtinyxml/libtinyxml/CVE-2023-34194.patch new file mode 100644 index 00000000..a94806da --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/libtinyxml/libtinyxml/CVE-2023-34194.patch @@ -0,0 +1,31 @@ +From: Guilhem Moulin +Date: Sat, 30 Dec 2023 14:15:54 +0100 +Subject: Avoid reachable assertion via crafted XML document with a '\0' + located after whitespace + +Bug: https://www.forescout.com/resources/sierra21-vulnerabilities +Bug-Debian: https://bugs.debian.org/1059315 +Bug-Debian: https://security-tracker.debian.org/tracker/CVE-2023-34194 + +CVE: CVE-2023-34194 +Upstream-Status: Inactive-Upstream [lastrelease: 2011] +Signed-off-by: Peter Marko +--- + tinyxmlparser.cpp | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/tinyxmlparser.cpp b/tinyxmlparser.cpp +index 8aa0dfa..1601962 100644 +--- a/tinyxmlparser.cpp ++++ b/tinyxmlparser.cpp +@@ -1606,6 +1606,10 @@ const char* TiXmlDeclaration::Parse( const char* p, TiXmlParsingData* data, TiXm + } + + p = SkipWhiteSpace( p, _encoding ); ++ if ( !p || !*p ) ++ { ++ break; ++ } + if ( StringEqual( p, "version", true, _encoding ) ) + { + TiXmlAttribute attrib; diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libtinyxml/libtinyxml_2.6.2.bb b/sources/meta-openembedded/meta-oe/recipes-support/libtinyxml/libtinyxml_2.6.2.bb index 6fbdd071..11bc2dde 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/libtinyxml/libtinyxml_2.6.2.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/libtinyxml/libtinyxml_2.6.2.bb @@ -5,11 +5,15 @@ HOMEPAGE = "http://www.sourceforge.net/projects/tinyxml" LICENSE = "Zlib" LIC_FILES_CHKSUM = "file://readme.txt;md5=f8f366f3370dda889f60faa7db162cf4" SECTION = "libs" +CVE_PRODUCT = "tinyxml" SRC_URI = "${SOURCEFORGE_MIRROR}/tinyxml/tinyxml_${@'${PV}'.replace('.', '_')}.tar.gz \ file://enforce-use-stl.patch \ - file://entity-encoding.patch" + file://entity-encoding.patch \ + file://CVE-2021-42260.patch \ + file://CVE-2023-34194.patch \ +" SRC_URI[md5sum] = "c1b864c96804a10526540c664ade67f0" SRC_URI[sha256sum] = "15bdfdcec58a7da30adc87ac2b078e4417dbe5392f3afb719f9ba6d062645593" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libtinyxml2/libtinyxml2_10.0.0.bb b/sources/meta-openembedded/meta-oe/recipes-support/libtinyxml2/libtinyxml2_10.0.0.bb index bcd30928..2ee43ebc 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/libtinyxml2/libtinyxml2_10.0.0.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/libtinyxml2/libtinyxml2_10.0.0.bb @@ -3,6 +3,7 @@ HOMEPAGE = "https://leethomason.github.io/tinyxml2" SECTION = "libs" LICENSE = "Zlib" LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=135624eef03e1f1101b9ba9ac9b5fffd" +CVE_PRODUCT = "tinyxml2" SRCREV = "321ea883b7190d4e85cae5512a12e5eaa8f8731f" SRC_URI = "git://github.com/leethomason/tinyxml2.git;branch=master;protocol=https \ diff --git a/sources/meta-openembedded/meta-oe/recipes-support/liburing/liburing/0001-test-Compile-nolibc.c-only-when-CONFIG_NOLIBC-is-set.patch b/sources/meta-openembedded/meta-oe/recipes-support/liburing/liburing/0001-test-Compile-nolibc.c-only-when-CONFIG_NOLIBC-is-set.patch new file mode 100644 index 00000000..90f028b8 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/liburing/liburing/0001-test-Compile-nolibc.c-only-when-CONFIG_NOLIBC-is-set.patch @@ -0,0 +1,43 @@ +From 7ea4e55a91e6d5564c6de762c2d1afc78ff9cfd3 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 16 Sep 2024 22:58:38 +0000 +Subject: [PATCH] test: Compile nolibc.c only when CONFIG_NOLIBC is set + +building nolibc.c fails for non nolibc targets + +Fixes +In file included from nolibc.c:33: +./../src/lib.h:20:2: error: "This arch doesn't support building liburing without libc" + 20 | #error "This arch doesn't support building liburing without libc" + | ^ +1 error generated. + +Upstream-Status: Backport [https://github.com/axboe/liburing/commit/a182f62c01f981cd9dd508ec952fbc975b263e3d] +Signed-off-by: Khem Raj +--- + test/Makefile | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/test/Makefile b/test/Makefile +index 0538a75..0dfecb8 100644 +--- a/test/Makefile ++++ b/test/Makefile +@@ -126,7 +126,6 @@ test_srcs := \ + msg-ring-overflow.c \ + multicqes_drain.c \ + no-mmap-inval.c \ +- nolibc.c \ + nop-all-sizes.c \ + nop.c \ + ooo-file-unreg.c \ +@@ -221,6 +220,10 @@ test_srcs := \ + all_targets := + include ../Makefile.quiet + ++ifeq ($(CONFIG_NOLIBC),y) ++ test_srcs += nolibc.c ++endif ++ + ifdef CONFIG_HAVE_STATX + test_srcs += statx.c + else ifdef CONFIG_HAVE_GLIBC_STATX diff --git a/sources/meta-openembedded/meta-oe/recipes-support/liburing/liburing/0001-test-Drop-including-error.h-header.patch b/sources/meta-openembedded/meta-oe/recipes-support/liburing/liburing/0001-test-Drop-including-error.h-header.patch new file mode 100644 index 00000000..62ca78a1 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/liburing/liburing/0001-test-Drop-including-error.h-header.patch @@ -0,0 +1,27 @@ +From 684bcb2a8795fd399d6c164e51459a2785057b1c Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 17 Sep 2024 09:56:42 -0700 +Subject: [PATCH 1/2] test: Drop including error.h header + +There is no error APIs being used in this test, therefore +drop including it, this also makes it portable to musl +systems which do not have error.h + +Upstream-Status: Submitted [https://github.com/axboe/liburing/pull/1233] +Signed-off-by: Khem Raj +--- + test/init-mem.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/test/init-mem.c b/test/init-mem.c +index 6f9a02a..f512190 100644 +--- a/test/init-mem.c ++++ b/test/init-mem.c +@@ -13,7 +13,6 @@ + #include + #include + #include +-#include + + #include "liburing.h" + #include "helpers.h" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/liburing/liburing/0002-ooo-file-unreg.c-Include-poll.h-instead-of-sys-poll..patch b/sources/meta-openembedded/meta-oe/recipes-support/liburing/liburing/0002-ooo-file-unreg.c-Include-poll.h-instead-of-sys-poll..patch new file mode 100644 index 00000000..8a1d5425 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/liburing/liburing/0002-ooo-file-unreg.c-Include-poll.h-instead-of-sys-poll..patch @@ -0,0 +1,32 @@ +From d06433ff1a1905436cfcde80e22ee51bd9591536 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 17 Sep 2024 09:59:31 -0700 +Subject: [PATCH 2/2] ooo-file-unreg.c: Include poll.h instead of sys/poll.h + +This fixes a warning e.g. + +In file included from ooo-file-unreg.c:12: +/mnt/b/yoe/master/build/tmp/work/riscv32-yoe-linux-musl/liburing/2.7/recipe-sysroot/usr/include/sys/poll.h:1:2: warning: redirecting incorrect #include to [-W#warnings] + 1 | #warning redirecting incorrect #include to + | ^ +1 warning generated. + +Upstream-Status: Submitted [https://github.com/axboe/liburing/pull/1233] +Signed-off-by: Khem Raj +--- + test/ooo-file-unreg.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test/ooo-file-unreg.c b/test/ooo-file-unreg.c +index d76e0fb..dd6ea55 100644 +--- a/test/ooo-file-unreg.c ++++ b/test/ooo-file-unreg.c +@@ -9,7 +9,7 @@ + #include + #include + #include +-#include ++#include + + #include "liburing.h" + #include "helpers.h" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/liburing/liburing_2.5.bb b/sources/meta-openembedded/meta-oe/recipes-support/liburing/liburing_2.5.bb deleted file mode 100644 index 440259ff..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/liburing/liburing_2.5.bb +++ /dev/null @@ -1,29 +0,0 @@ -SUMMARY = "This is the io_uring library, liburing." -DESCRIPTION = "liburing provides helpers to setup and teardown io_uring \ -instances, and also a simplified interface for applications that don't need \ -(or want) to deal with the full kernel side implementation." -HOMEPAGE = "https://github.com/axboe/liburing" -BUGTRACKER = "https://github.com/axboe/liburing/issues" -SECTION = "libs" - -LICENSE = "LGPL-2.1-only | MIT" -LIC_FILES_CHKSUM = "file://README;beginline=41;endline=44;md5=2b0e9926530c269f5ae95560370195af" - -SRC_URI = "git://github.com/axboe/liburing.git;branch=master;protocol=https" -SRCREV = "f4e42a515cd78c8c9cac2be14222834be5f8df2b" - -S = "${WORKDIR}/git" - -DEPENDS:append:libc-musl = " libucontext" -XCFLAGS = "-pthread" -XCFLAGS:append:libc-musl = " -lucontext" - -EXTRA_OEMAKE = "'CC=${CC}' 'RANLIB=${RANLIB}' 'AR=${AR}' 'CFLAGS=${CFLAGS} -I${S}/include -DWITHOUT_XATTR' 'LDFLAGS=${LDFLAGS}' 'XCFLAGS=${XCFLAGS}' 'BUILDDIR=${S}'" -do_configure() { - ${S}/configure --prefix=${prefix} --libdir=${libdir} --libdevdir=${libdir} --mandir=${mandir} --datadir=${datadir} --includedir=${includedir} -} -do_install () { - oe_runmake install DESTDIR=${D} -} - -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/liburing/liburing_2.7.bb b/sources/meta-openembedded/meta-oe/recipes-support/liburing/liburing_2.7.bb new file mode 100644 index 00000000..b10fe40c --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/liburing/liburing_2.7.bb @@ -0,0 +1,38 @@ +SUMMARY = "This is the io_uring library, liburing." +DESCRIPTION = "liburing provides helpers to setup and teardown io_uring \ +instances, and also a simplified interface for applications that don't need \ +(or want) to deal with the full kernel side implementation." +HOMEPAGE = "https://github.com/axboe/liburing" +BUGTRACKER = "https://github.com/axboe/liburing/issues" +SECTION = "libs" + +LICENSE = "LGPL-2.1-only | MIT" +LIC_FILES_CHKSUM = "file://README;beginline=41;endline=44;md5=2b0e9926530c269f5ae95560370195af" + +SRC_URI = "git://github.com/axboe/liburing.git;branch=master;protocol=https \ + file://0001-test-Compile-nolibc.c-only-when-CONFIG_NOLIBC-is-set.patch \ + file://0001-test-Drop-including-error.h-header.patch \ + file://0002-ooo-file-unreg.c-Include-poll.h-instead-of-sys-poll..patch" +SRCREV = "5227d48b28ad8671e61d444b72678da584d2e6c3" + +S = "${WORKDIR}/git" + +DEPENDS:append:libc-musl = " libucontext" +XCFLAGS = "-pthread" +XCFLAGS:append:libc-musl = " -lucontext" + +USELIBC = "" +# clang-18+ on RV64 emits memset for arch/riscv64/syscall.h provided __do_syscall4 macro +# this does not happen for gcc or older clang, so link with libc since we need memset API +# -fno-builtin-memset does not help +USELIBC:riscv64:toolchain-clang = "--use-libc" +USELIBC:riscv32 = "--use-libc" +EXTRA_OEMAKE = "'CC=${CC}' 'RANLIB=${RANLIB}' 'AR=${AR}' 'CFLAGS=${CFLAGS} -I${S}/include -DWITHOUT_XATTR' 'LDFLAGS=${LDFLAGS}' 'XCFLAGS=${XCFLAGS}' 'BUILDDIR=${S}'" +do_configure() { + ${S}/configure --prefix=${prefix} --libdir=${libdir} --libdevdir=${libdir} --mandir=${mandir} --datadir=${datadir} --includedir=${includedir} ${USELIBC} +} +do_install () { + oe_runmake install DESTDIR=${D} +} + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libusbgx/libusbgx-config.bb b/sources/meta-openembedded/meta-oe/recipes-support/libusbgx/libusbgx-config.bb index b269e33c..c79dd092 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/libusbgx/libusbgx-config.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/libusbgx/libusbgx-config.bb @@ -4,9 +4,12 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384 SRC_URI = "file://usbgx.default" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" + do_configure[noexec] = "1" do_compile[noexec] = "1" do_install() { - install -Dm 0644 ${WORKDIR}/usbgx.default ${D}${sysconfdir}/default/usbgx + install -Dm 0644 ${UNPACKDIR}/usbgx.default ${D}${sysconfdir}/default/usbgx } diff --git a/sources/meta-openembedded/meta-oe/recipes-support/libusbgx/libusbgx_git.bb b/sources/meta-openembedded/meta-oe/recipes-support/libusbgx/libusbgx_git.bb index a20ff4ee..bc40f029 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/libusbgx/libusbgx_git.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/libusbgx/libusbgx_git.bb @@ -38,17 +38,17 @@ INITSCRIPT_PARAMS = "defaults" INHIBIT_UPDATERCD_BBCLASS = "${@bb.utils.contains('PACKAGECONFIG', 'examples', '1', '0', d)}" do_install:append() { - install -Dm 0755 ${WORKDIR}/gadget-start ${D}${bindir}/gadget-start + install -Dm 0755 ${UNPACKDIR}/gadget-start ${D}${bindir}/gadget-start sed -i -e 's,/usr/bin,${bindir},g' -e 's,/etc,${sysconfdir},g' ${D}${bindir}/gadget-start - install -m 0755 ${WORKDIR}/gadget-start ${D}${bindir}/gadget-stop + install -m 0755 ${UNPACKDIR}/gadget-start ${D}${bindir}/gadget-stop sed -i -e 's,/usr/bin,${bindir},g' -e 's,/etc,${sysconfdir},g' ${D}${bindir}/gadget-stop if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then - install -Dm 0644 ${WORKDIR}/usbgx.service ${D}${systemd_system_unitdir}/usbgx.service + install -Dm 0644 ${UNPACKDIR}/usbgx.service ${D}${systemd_system_unitdir}/usbgx.service fi if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then - install -Dm 0755 ${WORKDIR}/usbgx.initd ${D}${sysconfdir}/init.d/usbgx + install -Dm 0755 ${UNPACKDIR}/usbgx.initd ${D}${sysconfdir}/init.d/usbgx fi } diff --git a/sources/meta-openembedded/meta-oe/recipes-support/links/links-x11_2.26.bb b/sources/meta-openembedded/meta-oe/recipes-support/links/links-x11_2.26.bb index 4c8d935c..713919bc 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/links/links-x11_2.26.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/links/links-x11_2.26.bb @@ -23,7 +23,7 @@ EXTRA_OECONF = "--enable-graphics \ do_install:append() { install -d ${D}/${datadir}/applications - install -m 0644 ${WORKDIR}/links2.desktop ${D}/${datadir}/applications + install -m 0644 ${UNPACKDIR}/links2.desktop ${D}/${datadir}/applications install -d ${D}/${datadir}/pixmaps - install -m 0644 ${WORKDIR}/links2.png ${D}/${datadir}/pixmaps + install -m 0644 ${UNPACKDIR}/links2.png ${D}/${datadir}/pixmaps } diff --git a/sources/meta-openembedded/meta-oe/recipes-support/links/links_2.29.bb b/sources/meta-openembedded/meta-oe/recipes-support/links/links_2.29.bb index e3a15d18..311d84e4 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/links/links_2.29.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/links/links_2.29.bb @@ -9,3 +9,5 @@ EXTRA_OECONF = "--enable-graphics \ --without-directfb --without-pmshell --without-atheos \ --without-x" SRC_URI[sha256sum] = "22aa96c0b38e1a6f8f7ed9d7a4167a47fc37246097759ef6059ecf8f9ead7998" + +CVE_STATUS[CVE-2008-3319] = "cpe-incorrect: The recipe used in the `meta-openembedded` is a different links package compared to the one which has the CVE issue." diff --git a/sources/meta-openembedded/meta-oe/recipes-support/logwarn/logwarn_1.0.14.bb b/sources/meta-openembedded/meta-oe/recipes-support/logwarn/logwarn_1.0.14.bb deleted file mode 100644 index 3549cb21..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/logwarn/logwarn_1.0.14.bb +++ /dev/null @@ -1,52 +0,0 @@ -SUMMARY = "A utility for finding interesting messages in log files" -DESCRIPTION = "Logwarn searches for interesting messages in log files, \ - where 'interesting' is defined by a user-supplied list of positive and \ - negative extended regular expressions. \ -" -HOMEPAGE = "https://github.com/archiecobbs/logwarn/wiki" -SECTION = "console/utils" - -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://COPYING;md5=3b83ef96387f14655fc854ddc3c6bd57" - -SRC_URI = "https://s3.amazonaws.com/archie-public/${BPN}/${BP}.tar.gz" - -SRC_URI[md5sum] = "e544a6230673ea54f7430bf817bb39d8" -SRC_URI[sha256sum] = "8dbfcf9b28c782ab3bddd6a620d4fb95d1b0ffcbe93276996cdc4800aa9aebd1" - -inherit autotools-brokensep - -# This directory is NOT volatile. -# -lcl_default_state_dir = "${localstatedir}/lib/logwarn" - -CFLAGS += '-DDEFAULT_STATE_DIR=\""${lcl_default_state_dir}\""' - -CACHED_CONFIGUREVARS += " \ - ac_cv_path_BASH_SHELL=${base_bindir}/bash \ - ac_cv_path_CAT=${base_bindir}/cat \ - ac_cv_path_RM=${base_bindir}/rm \ - ac_cv_path_SED=${base_bindir}/sed \ -" - -# Make sure some files exist for autoreconf. -# -do_configure:prepend () { - touch ${S}/NEWS - touch ${S}/ChangeLog - touch ${S}/README -} - -# Create a directory for logfile state info, usually under /var/lib. -# -do_install:append () { - install -d ${D}${lcl_default_state_dir} -} - -# Make a package for the nagios plug-in (script). -# -PACKAGES += "${PN}-nagios" - -FILES:${PN}-nagios = "${nonarch_libdir}/nagios" - -RDEPENDS:${PN}-nagios += "bash coreutils sed" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/logwarn/logwarn_1.0.17.bb b/sources/meta-openembedded/meta-oe/recipes-support/logwarn/logwarn_1.0.17.bb new file mode 100644 index 00000000..6be82979 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/logwarn/logwarn_1.0.17.bb @@ -0,0 +1,54 @@ +SUMMARY = "A utility for finding interesting messages in log files" +DESCRIPTION = "Logwarn searches for interesting messages in log files, \ + where 'interesting' is defined by a user-supplied list of positive and \ + negative extended regular expressions. \ +" +HOMEPAGE = "https://github.com/archiecobbs/logwarn/wiki" +SECTION = "console/utils" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://COPYING;md5=3b83ef96387f14655fc854ddc3c6bd57" + +SRC_URI = "https://s3.amazonaws.com/archie-public/${BPN}/${BP}.tar.gz" + +SRC_URI[sha256sum] = "062d197349f4a43d8f69887fc642cb58b59a8e2cc54cc951d5c1c6abc4809a9a" + +UPSTREAM_CHECK_URI = "https://github.com/archiecobbs/logwarn/tags" +UPSTREAM_CHECK_REGEX = "releases/tag/(?P\d+(\.\d+)+)" + +inherit autotools-brokensep + +# This directory is NOT volatile. +# +lcl_default_state_dir = "${localstatedir}/lib/logwarn" + +CFLAGS += '-DDEFAULT_STATE_DIR=\""${lcl_default_state_dir}\""' + +CACHED_CONFIGUREVARS += " \ + ac_cv_path_BASH_SHELL=${base_bindir}/bash \ + ac_cv_path_CAT=${base_bindir}/cat \ + ac_cv_path_RM=${base_bindir}/rm \ + ac_cv_path_SED=${base_bindir}/sed \ +" + +# Make sure some files exist for autoreconf. +# +do_configure:prepend () { + touch ${S}/NEWS + touch ${S}/ChangeLog + touch ${S}/README +} + +# Create a directory for logfile state info, usually under /var/lib. +# +do_install:append () { + install -d ${D}${lcl_default_state_dir} +} + +# Make a package for the nagios plug-in (script). +# +PACKAGES += "${PN}-nagios" + +FILES:${PN}-nagios = "${nonarch_libdir}/nagios" + +RDEPENDS:${PN}-nagios += "bash coreutils sed" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/lvm2/files/0001-Avoid-bashisms-in-init-scripts.patch b/sources/meta-openembedded/meta-oe/recipes-support/lvm2/files/0001-Avoid-bashisms-in-init-scripts.patch index 3c4a3a15..fb58793a 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/lvm2/files/0001-Avoid-bashisms-in-init-scripts.patch +++ b/sources/meta-openembedded/meta-oe/recipes-support/lvm2/files/0001-Avoid-bashisms-in-init-scripts.patch @@ -1,7 +1,7 @@ -From ea66faf68c93735edb1f2691cd7364b8cab83fef Mon Sep 17 00:00:00 2001 +From 44695f332e206e1db43d50163e1bce0bedf75fb7 Mon Sep 17 00:00:00 2001 From: Peter Kjellerstedt Date: Mon, 26 Nov 2018 14:53:09 +0800 -Subject: [PATCH 1/3] Avoid bashisms in init scripts +Subject: [PATCH] Avoid bashisms in init scripts Upstream-Status: Inappropriate @@ -19,7 +19,7 @@ Signed-off-by: Hongxu Jia 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/scripts/blk_availability_init_red_hat.in b/scripts/blk_availability_init_red_hat.in -index 347c395..b2e9cf9 100644 +index 347c39574..b2e9cf932 100644 --- a/scripts/blk_availability_init_red_hat.in +++ b/scripts/blk_availability_init_red_hat.in @@ -1,4 +1,4 @@ @@ -37,7 +37,7 @@ index 347c395..b2e9cf9 100644 ;; esac diff --git a/scripts/cmirrord_init_red_hat.in b/scripts/cmirrord_init_red_hat.in -index c82f8f5..a3a321d 100755 +index c82f8f547..a3a321d9c 100755 --- a/scripts/cmirrord_init_red_hat.in +++ b/scripts/cmirrord_init_red_hat.in @@ -1,4 +1,4 @@ @@ -56,7 +56,7 @@ index c82f8f5..a3a321d 100755 esac diff --git a/scripts/lvm2_lvmpolld_init_red_hat.in b/scripts/lvm2_lvmpolld_init_red_hat.in -index 176ff5d..825f6ad 100644 +index 176ff5dcb..825f6ad84 100644 --- a/scripts/lvm2_lvmpolld_init_red_hat.in +++ b/scripts/lvm2_lvmpolld_init_red_hat.in @@ -1,4 +1,4 @@ @@ -75,7 +75,7 @@ index 176ff5d..825f6ad 100644 esac diff --git a/scripts/lvm2_monitoring_init_red_hat.in b/scripts/lvm2_monitoring_init_red_hat.in -index 95e4125..dff89cd 100644 +index 95e4125a0..dff89cd38 100644 --- a/scripts/lvm2_monitoring_init_red_hat.in +++ b/scripts/lvm2_monitoring_init_red_hat.in @@ -1,4 +1,4 @@ @@ -94,7 +94,7 @@ index 95e4125..dff89cd 100644 esac diff --git a/scripts/lvm2_monitoring_init_rhel4 b/scripts/lvm2_monitoring_init_rhel4 -index 8eb06c5..2e8d0f7 100644 +index 8eb06c509..2e8d0f71e 100644 --- a/scripts/lvm2_monitoring_init_rhel4 +++ b/scripts/lvm2_monitoring_init_rhel4 @@ -1,4 +1,4 @@ @@ -112,6 +112,3 @@ index 8eb06c5..2e8d0f7 100644 ;; esac --- -2.7.4 - diff --git a/sources/meta-openembedded/meta-oe/recipes-support/lvm2/files/0001-configure.ac-check-egrep.patch b/sources/meta-openembedded/meta-oe/recipes-support/lvm2/files/0001-configure.ac-check-egrep.patch deleted file mode 100644 index 474c2f8a..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/lvm2/files/0001-configure.ac-check-egrep.patch +++ /dev/null @@ -1,33 +0,0 @@ -configure.ac: check egrep - -The macro AC_HEADER_STDC which requires AC_PROG_EGREP has been removed -from configure.ac, then it fails to substitute '@EGREP@': - -| [GEN] command-lines-input.h -| /bin/bash: line 2: @EGREP@: command not found -| [GEN] command-count.h - -Call AC_PROG_EGREP to fix the error. - -Upstream-Status: Submitted [https://gitlab.com/lvmteam/lvm2/-/merge_requests/4] - -Signed-off-by: Kai Kang ---- - configure.ac | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/configure.ac b/configure.ac -index 2e52498f9..d9462e22c 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -78,6 +78,7 @@ AC_PROG_LN_S - AC_PROG_MAKE_SET - AC_PROG_MKDIR_P - AC_PROG_RANLIB -+AC_PROG_EGREP - AC_CHECK_TOOL([READELF], [readelf]) - AC_CHECK_TOOL(AR, ar) - AC_PATH_TOOL(CFLOW_CMD, cflow) --- -2.34.1 - diff --git a/sources/meta-openembedded/meta-oe/recipes-support/lvm2/files/0001-implement-libc-specific-reopen_stream.patch b/sources/meta-openembedded/meta-oe/recipes-support/lvm2/files/0001-implement-libc-specific-reopen_stream.patch index f46d7f70..196de644 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/lvm2/files/0001-implement-libc-specific-reopen_stream.patch +++ b/sources/meta-openembedded/meta-oe/recipes-support/lvm2/files/0001-implement-libc-specific-reopen_stream.patch @@ -1,4 +1,4 @@ -From e3103459416616d3b8508e7176e897b0ae6c90f2 Mon Sep 17 00:00:00 2001 +From e2f24ea066e6dfb9f13f623009034acbf4ae8818 Mon Sep 17 00:00:00 2001 From: Dengke Du Date: Tue, 25 Oct 2016 11:49:40 +0000 Subject: [PATCH] implement libc specific reopen_stream @@ -14,18 +14,17 @@ http://git.alpinelinux.org/cgit/aports/tree/main/lvm2/fix-stdio-usage.patch Signed-off-by: Khem Raj Signed-off-by: Dengke Du ---- Upstream-Status: Pending - +--- lib/log/log.c | 6 ++++++ tools/lvmcmdline.c | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) -Index: LVM2.2.02.177/lib/log/log.c -=================================================================== ---- LVM2.2.02.177.orig/lib/log/log.c -+++ LVM2.2.02.177/lib/log/log.c -@@ -161,6 +161,7 @@ static void _check_and_replace_standard_ +diff --git a/lib/log/log.c b/lib/log/log.c +index eafb3ef1c..ff3d751bf 100644 +--- a/lib/log/log.c ++++ b/lib/log/log.c +@@ -165,6 +165,7 @@ static void _check_and_replace_standard_log_streams(FILE *old_stream, FILE *new_ * Close and reopen standard stream on file descriptor fd. */ int reopen_standard_stream(FILE **stream, const char *mode) @@ -33,7 +32,7 @@ Index: LVM2.2.02.177/lib/log/log.c { int fd, fd_copy, new_fd; const char *name; -@@ -207,6 +208,11 @@ int reopen_standard_stream(FILE **stream +@@ -211,6 +212,11 @@ int reopen_standard_stream(FILE **stream, const char *mode) *stream = new_stream; return 1; } @@ -45,11 +44,11 @@ Index: LVM2.2.02.177/lib/log/log.c void init_log_fn(lvm2_log_fn_t log_fn) { -Index: LVM2.2.02.177/tools/lvmcmdline.c -=================================================================== ---- LVM2.2.02.177.orig/tools/lvmcmdline.c -+++ LVM2.2.02.177/tools/lvmcmdline.c -@@ -3095,7 +3095,7 @@ static int _check_standard_fds(void) +diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c +index 1b2f7f47c..e0674d42d 100644 +--- a/tools/lvmcmdline.c ++++ b/tools/lvmcmdline.c +@@ -3378,7 +3378,7 @@ static int _check_standard_fds(void) int err = is_valid_fd(STDERR_FILENO); if (!is_valid_fd(STDIN_FILENO) && @@ -58,7 +57,7 @@ Index: LVM2.2.02.177/tools/lvmcmdline.c if (err) perror("stdin stream open"); else -@@ -3105,7 +3105,7 @@ static int _check_standard_fds(void) +@@ -3388,7 +3388,7 @@ static int _check_standard_fds(void) } if (!is_valid_fd(STDOUT_FILENO) && @@ -67,7 +66,7 @@ Index: LVM2.2.02.177/tools/lvmcmdline.c if (err) perror("stdout stream open"); /* else no stdout */ -@@ -3113,7 +3113,7 @@ static int _check_standard_fds(void) +@@ -3396,7 +3396,7 @@ static int _check_standard_fds(void) } if (!is_valid_fd(STDERR_FILENO) && diff --git a/sources/meta-openembedded/meta-oe/recipes-support/lvm2/files/0001-include-libgen.h-for-basename.patch b/sources/meta-openembedded/meta-oe/recipes-support/lvm2/files/0001-include-libgen.h-for-basename.patch index 7add3a7b..c57bff86 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/lvm2/files/0001-include-libgen.h-for-basename.patch +++ b/sources/meta-openembedded/meta-oe/recipes-support/lvm2/files/0001-include-libgen.h-for-basename.patch @@ -1,4 +1,4 @@ -From 1b9677f40ac547ba19d1cdbfd700901eab0a0d0b Mon Sep 17 00:00:00 2001 +From 4e2dc175e99792d84873a4785ff1524845267c3e Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 25 Mar 2024 13:07:28 -0700 Subject: [PATCH] include libgen.h for basename @@ -16,17 +16,14 @@ Signed-off-by: Khem Raj 1 file changed, 1 insertion(+) diff --git a/lib/device/device_id.c b/lib/device/device_id.c -index 1422f5d05..8215811bd 100644 +index b3330f2ba..291bd5c73 100644 --- a/lib/device/device_id.c +++ b/lib/device/device_id.c -@@ -25,6 +25,7 @@ - #include "lib/datastruct/str_list.h" - #include "lib/metadata/metadata-exported.h" +@@ -28,6 +28,7 @@ + #include "lib/activate/activate.h" + #include "device_mapper/misc/dm-ioctl.h" +#include #include #include #include --- -2.44.0 - diff --git a/sources/meta-openembedded/meta-oe/recipes-support/lvm2/files/0004-tweak-MODPROBE_CMD-for-cross-compile.patch b/sources/meta-openembedded/meta-oe/recipes-support/lvm2/files/0004-tweak-MODPROBE_CMD-for-cross-compile.patch index ed9972a5..6435c3fd 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/lvm2/files/0004-tweak-MODPROBE_CMD-for-cross-compile.patch +++ b/sources/meta-openembedded/meta-oe/recipes-support/lvm2/files/0004-tweak-MODPROBE_CMD-for-cross-compile.patch @@ -1,7 +1,7 @@ -From 3bba45890985b877b823836e78a1c8ac3c878856 Mon Sep 17 00:00:00 2001 +From b30f842d5d200a8217a47465d6cdd99d3805ba76 Mon Sep 17 00:00:00 2001 From: Hongxu Jia Date: Tue, 31 Jul 2018 15:04:29 +0800 -Subject: [PATCH 4/4] tweak MODPROBE_CMD for cross compile +Subject: [PATCH] tweak MODPROBE_CMD for cross compile Lvm uses variable MODPROBE_CMD at runtime, so build time detection of modprobe is incorrect. @@ -21,10 +21,10 @@ Signed-off-by: Hongxu Jia 1 file changed, 2 deletions(-) diff --git a/configure.ac b/configure.ac -index b43d8b9be..efe3062c1 100644 +index c8d81e16c..7c1c04627 100644 --- a/configure.ac +++ b/configure.ac -@@ -1646,8 +1646,6 @@ AS_IF([test "$BUILD_DMFILEMAPD" = "yes"], [ +@@ -1689,8 +1689,6 @@ AS_IF([test "$BUILD_DMFILEMAPD" = "yes"], [ ]) ################################################################################ @@ -33,6 +33,3 @@ index b43d8b9be..efe3062c1 100644 AS_IF([test -n "$MODPROBE_CMD"], [ AC_DEFINE_UNQUOTED([MODPROBE_CMD], ["$MODPROBE_CMD"], [The path to 'modprobe', if available.]) ]) --- -2.7.4 - diff --git a/sources/meta-openembedded/meta-oe/recipes-support/lvm2/files/0005-do-not-build-manual.patch b/sources/meta-openembedded/meta-oe/recipes-support/lvm2/files/0005-do-not-build-manual.patch index 7979efbe..e7aaad4d 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/lvm2/files/0005-do-not-build-manual.patch +++ b/sources/meta-openembedded/meta-oe/recipes-support/lvm2/files/0005-do-not-build-manual.patch @@ -1,7 +1,7 @@ -From 103ac1c1200df8190372d973e004776cffe8e659 Mon Sep 17 00:00:00 2001 +From e0e06b77e067da6a01dd9b0d5582a0a1709c655d Mon Sep 17 00:00:00 2001 From: Hongxu Jia Date: Mon, 26 Nov 2018 14:59:55 +0800 -Subject: [PATCH 2/3] do not build manual +Subject: [PATCH] do not build manual On some host (ubuntu 1404), build manual failed. ... @@ -26,7 +26,7 @@ Signed-off-by: Wang Mingyu 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Makefile.in b/Makefile.in -index 3b7e0ec..37f14eb 100644 +index 06c4b1823..90df7b09c 100644 --- a/Makefile.in +++ b/Makefile.in @@ -18,7 +18,7 @@ top_builddir = @top_builddir@ @@ -47,7 +47,7 @@ index 3b7e0ec..37f14eb 100644 libdaemon lib tools daemons libdm \ udev po tools.distclean: test.distclean -@@ -59,7 +59,7 @@ unit-test run-unit-test: test +@@ -59,7 +59,7 @@ unit-test run-unit-test: test libdm daemons.device-mapper: libdm.device-mapper tools.device-mapper: libdm.device-mapper @@ -57,10 +57,10 @@ index 3b7e0ec..37f14eb 100644 ifeq ("@INTL@", "yes") diff --git a/configure.ac b/configure.ac -index 6def519..18a5c97 100644 +index 7c1c04627..5364dd68e 100644 --- a/configure.ac +++ b/configure.ac -@@ -2018,7 +2018,6 @@ libdaemon/server/Makefile +@@ -2022,7 +2022,6 @@ libdaemon/server/Makefile libdm/Makefile libdm/dm-tools/Makefile libdm/libdevmapper.pc @@ -68,6 +68,3 @@ index 6def519..18a5c97 100644 po/Makefile scripts/lvm2-pvscan.service scripts/blkdeactivate.sh --- -2.25.1 - diff --git a/sources/meta-openembedded/meta-oe/recipes-support/lvm2/files/0006-start-lvm2-monitor.service-after-tmp.mount.patch b/sources/meta-openembedded/meta-oe/recipes-support/lvm2/files/0006-start-lvm2-monitor.service-after-tmp.mount.patch index 5b9b2d57..2d498200 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/lvm2/files/0006-start-lvm2-monitor.service-after-tmp.mount.patch +++ b/sources/meta-openembedded/meta-oe/recipes-support/lvm2/files/0006-start-lvm2-monitor.service-after-tmp.mount.patch @@ -1,4 +1,4 @@ -From e213ed33a28704f6f538df41a91b7ce95594a4f8 Mon Sep 17 00:00:00 2001 +From 20a110ade91c73f4cb3883a3a9676708a93ca786 Mon Sep 17 00:00:00 2001 From: Hongxu Jia Date: Tue, 15 Oct 2019 18:12:54 +0800 Subject: [PATCH] start lvm2-monitor.service after tmp.mount @@ -19,7 +19,7 @@ Signed-off-by: Wang Mingyu 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/lvm2_monitoring_systemd_red_hat.service.in b/scripts/lvm2_monitoring_systemd_red_hat.service.in -index c0c96e3..2a99a37 100644 +index c0c96e316..2a99a379d 100644 --- a/scripts/lvm2_monitoring_systemd_red_hat.service.in +++ b/scripts/lvm2_monitoring_systemd_red_hat.service.in @@ -2,7 +2,7 @@ @@ -31,6 +31,3 @@ index c0c96e3..2a99a37 100644 Before=local-fs-pre.target shutdown.target DefaultDependencies=no Conflicts=shutdown.target --- -2.25.1 - diff --git a/sources/meta-openembedded/meta-oe/recipes-support/lvm2/files/reproducible-build.patch b/sources/meta-openembedded/meta-oe/recipes-support/lvm2/files/reproducible-build.patch index 3f53db9e..ca632d21 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/lvm2/files/reproducible-build.patch +++ b/sources/meta-openembedded/meta-oe/recipes-support/lvm2/files/reproducible-build.patch @@ -1,14 +1,21 @@ -configure.ac: override CONFIGURE_LINE +From f5c6fabbdf2e7bfa105658b9dfe45d2ab86f34bb Mon Sep 17 00:00:00 2001 +From: Joe Slater +Date: Fri, 17 Jul 2020 13:59:56 -0700 +Subject: [PATCH] configure.ac: override CONFIGURE_LINE For reproducible binaries, we need to report a constant CONFIGURE_LINE. Upstream-Status: Pending Signed-off-by: Joe Slater +--- + configure.ac | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) - ---- git.orig/configure.ac -+++ git/configure.ac +diff --git a/configure.ac b/configure.ac +index 5364dd68e..c2dbf3c9f 100644 +--- a/configure.ac ++++ b/configure.ac @@ -15,7 +15,15 @@ AC_PREREQ(2.69) ################################################################################ dnl -- Process this file with autoconf to produce a configure script. diff --git a/sources/meta-openembedded/meta-oe/recipes-support/lvm2/libdevmapper_2.03.22.bb b/sources/meta-openembedded/meta-oe/recipes-support/lvm2/libdevmapper.bb similarity index 100% rename from sources/meta-openembedded/meta-oe/recipes-support/lvm2/libdevmapper_2.03.22.bb rename to sources/meta-openembedded/meta-oe/recipes-support/lvm2/libdevmapper.bb diff --git a/sources/meta-openembedded/meta-oe/recipes-support/lvm2/lvm2.bb b/sources/meta-openembedded/meta-oe/recipes-support/lvm2/lvm2.bb new file mode 100644 index 00000000..ccf9c380 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/lvm2/lvm2.bb @@ -0,0 +1,115 @@ +require lvm2.inc + +SRC_URI += " \ + file://0001-fix-command-bin-findmnt-bin-lsblk-bin-sort-not-found.patch \ + file://tweak-for-lvmdbusd.patch \ + " + +DEPENDS += "autoconf-archive-native" + +inherit multilib_script python3native + +MULTILIB_SCRIPTS = "${PN}:${sysconfdir}/lvm/lvm.conf" + +CACHED_CONFIGUREVARS += "MODPROBE_CMD=${base_sbindir}/modprobe" + +do_install:append() { + # Install machine specific configuration file + install -d ${D}${sysconfdir}/lvm + install -m 0644 ${UNPACKDIR}/lvm.conf ${D}${sysconfdir}/lvm/lvm.conf + sed -i -e 's:@libdir@:${libdir}:g' ${D}${sysconfdir}/lvm/lvm.conf + # We don't want init scripts/systemd units for native SDK utilities + if [ "${PN}" != "nativesdk-lvm2" ]; then + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then + oe_runmake 'DESTDIR=${D}' install install_systemd_units + sed -i -e 's:/usr/bin/true:${base_bindir}/true:g' ${D}${systemd_system_unitdir}/blk-availability.service + else + oe_runmake 'DESTDIR=${D}' install install_initscripts + mv ${D}${sysconfdir}/rc.d/init.d ${D}${sysconfdir}/init.d + rm -rf ${D}${sysconfdir}/rc.d + fi + fi + + # following files only exist when package config `dbus` enabled + sed -i -e '1s,#!.*python.*,#!${USRBINPATH}/env python3,' \ + ${D}${sbindir}/lvmdbusd \ + ${D}${PYTHON_SITEPACKAGES_DIR}/lvmdbusd/lvmdb.py \ + ${D}${PYTHON_SITEPACKAGES_DIR}/lvmdbusd/lvm_shell_proxy.py \ + || true +} + +PACKAGE_BEFORE_PN = "${PN}-scripts" + +SYSTEMD_PACKAGES = "${PN}" +SYSTEMD_SERVICE:${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'dmeventd', 'lvm2-monitor.service dm-event.socket dm-event.service', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'dbus', 'lvm2-lvmdbusd.service', '', d)} \ + blk-availability.service \ + " +SYSTEMD_AUTO_ENABLE = "disable" + +TARGET_CC_ARCH += "${LDFLAGS}" + +EXTRA_OECONF:append:class-nativesdk = " --with-confdir=${sysconfdir}" + +DEPENDS += "util-linux" +LVM2_PACKAGECONFIG:append:class-target = " \ + udev \ +" + +PACKAGECONFIG[dbus] = "--enable-dbus-service,--disable-dbus-service,,python3-dbus python3-pyudev" +PACKAGECONFIG[udev] = "--enable-udev_sync --enable-udev_rules --with-udevdir=${nonarch_base_libdir}/udev/rules.d,--disable-udev_sync --disable-udev_rules,udev," + +PACKAGES =+ "libdevmapper" +FILES:libdevmapper = " \ + ${libdir}/libdevmapper.so.* \ + ${sbindir}/dmsetup \ + ${sbindir}/dmstats \ + ${nonarch_base_libdir}/udev/rules.d/10-dm.rules \ + ${nonarch_base_libdir}/udev/rules.d/13-dm-disk.rules \ + ${nonarch_base_libdir}/udev/rules.d/95-dm-notify.rules \ +" + +FILES:${PN} += " \ + ${libdir}/device-mapper/*.so \ + ${systemd_system_unitdir} \ + ${PYTHON_SITEPACKAGES_DIR}/lvmdbusd \ + ${datadir}/dbus-1/system-services/com.redhat.lvmdbus1.service \ + ${nonarch_base_libdir}/udev/rules.d/11-dm-lvm.rules \ + ${nonarch_base_libdir}/udev/rules.d/69-dm-lvm.rules \ +" +# Remove /lib/udev from FILES:${PN} so that any new rules files that are added +# upstream will have to be explicitly added to either FILES:${PN} or +# FILES:libdevmapper. +FILES:${PN}:remove = "${nonarch_base_libdir}/udev" + +FILES:${PN}-scripts = " \ + ${sbindir}/blkdeactivate \ + ${sbindir}/fsadm \ + ${sbindir}/lvmconf \ + ${sbindir}/lvmdump \ +" + +RDEPENDS:${PN} = "bash" +RDEPENDS:${PN}:append:class-target = " libdevmapper" +RDEPENDS:${PN}:append:class-nativesdk = " libdevmapper" + +RDEPENDS:${PN}-scripts = "${PN} (= ${EXTENDPKGV}) \ + bash \ + util-linux-lsblk \ + util-linux-findmnt \ + coreutils \ +" +RRECOMMENDS:${PN}:class-target = "${PN}-scripts (= ${EXTENDPKGV})" + +CONFFILES:${PN} += "${sysconfdir}/lvm/lvm.conf" + +SYSROOT_PREPROCESS_FUNCS:append = " remove_libdevmapper_sysroot_preprocess" +remove_libdevmapper_sysroot_preprocess() { + rm -f ${SYSROOT_DESTDIR}${libdir}/libdevmapper.so* \ + ${SYSROOT_DESTDIR}${sbindir}/dmsetup \ + ${SYSROOT_DESTDIR}${sbindir}/dmstats \ + ${SYSROOT_DESTDIR}${includedir}/libdevmapper.h \ + ${SYSROOT_DESTDIR}${libdir}/pkgconfig/devmapper.pc +} + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/lvm2/lvm2.inc b/sources/meta-openembedded/meta-oe/recipes-support/lvm2/lvm2.inc index d95366f9..059ab699 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/lvm2/lvm2.inc +++ b/sources/meta-openembedded/meta-oe/recipes-support/lvm2/lvm2.inc @@ -15,12 +15,12 @@ SRC_URI = "git://sourceware.org/git/lvm2.git;branch=main \ file://0005-do-not-build-manual.patch \ file://0006-start-lvm2-monitor.service-after-tmp.mount.patch \ file://reproducible-build.patch \ - file://0001-configure.ac-check-egrep.patch \ file://0001-include-libgen.h-for-basename.patch \ " -SRCREV = "016e469caf856f1eb8dde39df0d1aa2e74225aed" +SRCREV = "6de3937ac517a3ecfd6d8d90f3f055dab631157e" S = "${WORKDIR}/git" +PV = "2.03.26" UPSTREAM_CHECK_GITTAGREGEX = "v(?P\d+(\_\d+)+)" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/lvm2/lvm2/0001-fix-command-bin-findmnt-bin-lsblk-bin-sort-not-found.patch b/sources/meta-openembedded/meta-oe/recipes-support/lvm2/lvm2/0001-fix-command-bin-findmnt-bin-lsblk-bin-sort-not-found.patch index c0cf836c..96a3d64f 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/lvm2/lvm2/0001-fix-command-bin-findmnt-bin-lsblk-bin-sort-not-found.patch +++ b/sources/meta-openembedded/meta-oe/recipes-support/lvm2/lvm2/0001-fix-command-bin-findmnt-bin-lsblk-bin-sort-not-found.patch @@ -1,4 +1,4 @@ -From ddf36613f3408ce42f15b03b4e9c6ad8478b97f8 Mon Sep 17 00:00:00 2001 +From 2ff2a867db8d3e1c660d191a1805f9e355169c80 Mon Sep 17 00:00:00 2001 From: Hongxu Jia Date: Tue, 2 Mar 2021 01:33:05 -0800 Subject: [PATCH] fix command /bin/findmnt, /bin/lsblk, /bin/sort not found @@ -15,10 +15,10 @@ Signed-off-by: Hongxu Jia 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac -index 991a0cf85..e59c82472 100644 +index d9e7964c3..9dfdcfe01 100644 --- a/configure.ac +++ b/configure.ac -@@ -1660,6 +1660,8 @@ AS_IF([test -n "$MODPROBE_CMD"], [ +@@ -1704,6 +1704,8 @@ AS_IF([test -n "$MODPROBE_CMD"], [ SYSCONFDIR="$(eval echo $(eval echo $sysconfdir))" @@ -27,7 +27,7 @@ index 991a0cf85..e59c82472 100644 SBINDIR="$(eval echo $(eval echo $sbindir))" LVM_PATH="$SBINDIR/lvm" AC_DEFINE_UNQUOTED(LVM_PATH, ["$LVM_PATH"], [Path to lvm binary.]) -@@ -1886,6 +1888,7 @@ AC_SUBST(PYTHON2DIR) +@@ -1944,6 +1946,7 @@ AC_SUBST(PYTHON2DIR) AC_SUBST(PYTHON3) AC_SUBST(PYTHON3DIR) AC_SUBST(RT_LIBS) @@ -68,6 +68,3 @@ index 7c517b87b..7ef1bb766 100644 # Do not show tool errors by default (only done/skipping summary # message provided by this script) and no verbose mode by default. --- -2.29.2 - diff --git a/sources/meta-openembedded/meta-oe/recipes-support/lvm2/lvm2/0001-lvmdbusd-create-dirs-for-lock-file.patch b/sources/meta-openembedded/meta-oe/recipes-support/lvm2/lvm2/0001-lvmdbusd-create-dirs-for-lock-file.patch deleted file mode 100644 index f6b29355..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/lvm2/lvm2/0001-lvmdbusd-create-dirs-for-lock-file.patch +++ /dev/null @@ -1,29 +0,0 @@ -lvmdbusd: create dirs for lock file - -Create leading dirs for lvmdbusd lock file, otherwise it fails to start: - -| systemd[1]: Starting LVM2 D-Bus service... -| lvmdbusd[1602]: [1602]: Error during creation of lock file(/var/lock/lvm/lvmdbusd): errno(2), exiting! - -Upstream-Status: Submitted [https://gitlab.com/lvmteam/lvm2/-/merge_requests/7] - -Signed-off-by: Kai Kang ---- - daemons/lvmdbusd/utils.py | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/daemons/lvmdbusd/utils.py b/daemons/lvmdbusd/utils.py -index d479175f6..830648659 100644 ---- a/daemons/lvmdbusd/utils.py -+++ b/daemons/lvmdbusd/utils.py -@@ -778,6 +778,7 @@ class LockFile(object): - - def __enter__(self): - try: -+ os.makedirs(os.path.dirname(self.lock_file)) - self.fd = os.open(self.lock_file, os.O_CREAT | os.O_RDWR, stat.S_IRUSR | stat.S_IWUSR) - - # Get and set the close on exec and lock the file --- -2.34.1 - diff --git a/sources/meta-openembedded/meta-oe/recipes-support/lvm2/lvm2/tweak-for-lvmdbusd.patch b/sources/meta-openembedded/meta-oe/recipes-support/lvm2/lvm2/tweak-for-lvmdbusd.patch index 3b85a17b..200f2f04 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/lvm2/lvm2/tweak-for-lvmdbusd.patch +++ b/sources/meta-openembedded/meta-oe/recipes-support/lvm2/lvm2/tweak-for-lvmdbusd.patch @@ -1,3 +1,8 @@ +From 34f5a21afae759d48fa11e77b622ca35a4feabaa Mon Sep 17 00:00:00 2001 +From: Kai Kang +Date: Wed, 6 Dec 2023 10:24:46 +0800 +Subject: [PATCH] lvm2: 2.03.16 -> 2.03.22 + Not check python modules pyudev and dbus during configure that they are runtime dependencies. Deal with them in the package config setting in the recipe. @@ -13,10 +18,10 @@ Signed-off-by: Kai Kang 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac -index ee088b3f5..b94ef4e56 100644 +index 9dfdcfe01..fcf5c8b78 100644 --- a/configure.ac +++ b/configure.ac -@@ -1262,8 +1262,8 @@ AS_IF([test "$BUILD_LVMDBUSD" = "yes"], [ +@@ -1282,8 +1282,8 @@ AS_IF([test "$BUILD_LVMDBUSD" = "yes"], [ AS_IF([test "$PYTHON3_BINDINGS" = "yes"], [PYTHON_BINDINGS="yes"]) # To get this macro, install autoconf-archive package then run autoreconf @@ -28,7 +33,7 @@ index ee088b3f5..b94ef4e56 100644 ################################################################################ diff --git a/daemons/lvmdbusd/Makefile.in b/daemons/lvmdbusd/Makefile.in -index 9c2629279..a79daabf7 100644 +index 08b061fb2..e2b1c3209 100644 --- a/daemons/lvmdbusd/Makefile.in +++ b/daemons/lvmdbusd/Makefile.in @@ -16,7 +16,7 @@ top_srcdir = @top_srcdir@ @@ -41,7 +46,7 @@ index 9c2629279..a79daabf7 100644 LVMDBUS_SRCDIR_FILES = \ automatedproperties.py \ @@ -55,11 +55,9 @@ install_lvmdbusd: $(LVMDBUSD) - @echo " [INSTALL] $<" + $(SHOW) " [INSTALL] $<" $(Q) $(INSTALL_DIR) $(sbindir) $(Q) $(INSTALL_SCRIPT) $(LVMDBUSD) $(sbindir) - $(Q) $(INSTALL_DIR) $(lvmdbusdir) $(lvmdbusdir)/__pycache__ diff --git a/sources/meta-openembedded/meta-oe/recipes-support/lvm2/lvm2_2.03.22.bb b/sources/meta-openembedded/meta-oe/recipes-support/lvm2/lvm2_2.03.22.bb deleted file mode 100644 index c675d3de..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/lvm2/lvm2_2.03.22.bb +++ /dev/null @@ -1,110 +0,0 @@ -require lvm2.inc - -SRC_URI += " \ - file://0001-fix-command-bin-findmnt-bin-lsblk-bin-sort-not-found.patch \ - file://tweak-for-lvmdbusd.patch \ - file://0001-lvmdbusd-create-dirs-for-lock-file.patch \ - " - -DEPENDS += "autoconf-archive-native" - -inherit multilib_script python3native - -MULTILIB_SCRIPTS = "${PN}:${sysconfdir}/lvm/lvm.conf" - -CACHED_CONFIGUREVARS += "MODPROBE_CMD=${base_sbindir}/modprobe" - -do_install:append() { - # Install machine specific configuration file - install -d ${D}${sysconfdir}/lvm - install -m 0644 ${WORKDIR}/lvm.conf ${D}${sysconfdir}/lvm/lvm.conf - sed -i -e 's:@libdir@:${libdir}:g' ${D}${sysconfdir}/lvm/lvm.conf - # We don't want init scripts/systemd units for native SDK utilities - if [ "${PN}" != "nativesdk-lvm2" ]; then - if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then - oe_runmake 'DESTDIR=${D}' install install_systemd_units - sed -i -e 's:/usr/bin/true:${base_bindir}/true:g' ${D}${systemd_system_unitdir}/blk-availability.service - else - oe_runmake 'DESTDIR=${D}' install install_initscripts - mv ${D}${sysconfdir}/rc.d/init.d ${D}${sysconfdir}/init.d - rm -rf ${D}${sysconfdir}/rc.d - fi - fi - - # following files only exist when package config `dbus` enabled - sed -i -e '1s,#!.*python.*,#!${USRBINPATH}/env python3,' \ - ${D}${sbindir}/lvmdbusd \ - ${D}${PYTHON_SITEPACKAGES_DIR}/lvmdbusd/lvmdb.py \ - ${D}${PYTHON_SITEPACKAGES_DIR}/lvmdbusd/lvm_shell_proxy.py \ - || true -} - -PACKAGE_BEFORE_PN = "${PN}-scripts ${PN}-udevrules" - -SYSTEMD_PACKAGES = "${PN}" -SYSTEMD_SERVICE:${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'dmeventd', 'lvm2-monitor.service dm-event.socket dm-event.service', '', d)} \ - ${@bb.utils.contains('PACKAGECONFIG', 'dbus', 'lvm2-lvmdbusd.service', '', d)} \ - blk-availability.service \ - " -SYSTEMD_AUTO_ENABLE = "disable" - -TARGET_CC_ARCH += "${LDFLAGS}" - -EXTRA_OECONF:append:class-nativesdk = " --with-confdir=${sysconfdir}" - -DEPENDS += "util-linux" -LVM2_PACKAGECONFIG:append:class-target = " \ - udev \ -" - -PACKAGECONFIG[dbus] = "--enable-dbus-service,--disable-dbus-service,,python3-dbus python3-pyudev" -PACKAGECONFIG[udev] = "--enable-udev_sync --enable-udev_rules --with-udevdir=${nonarch_base_libdir}/udev/rules.d,--disable-udev_sync --disable-udev_rules,udev,${PN}-udevrules" - -PACKAGES =+ "libdevmapper" -FILES:libdevmapper = " \ - ${libdir}/libdevmapper.so.* \ - ${sbindir}/dmsetup \ - ${sbindir}/dmstats \ -" - -FILES:${PN} += " \ - ${libdir}/device-mapper/*.so \ - ${systemd_system_unitdir}/lvm2-pvscan@.service \ - ${PYTHON_SITEPACKAGES_DIR}/lvmdbusd \ - ${datadir}/dbus-1/system-services/com.redhat.lvmdbus1.service \ -" - -FILES:${PN}-scripts = " \ - ${sbindir}/blkdeactivate \ - ${sbindir}/fsadm \ - ${sbindir}/lvmconf \ - ${sbindir}/lvmdump \ -" -# Specified explicitly for the udev rules, just in case that it does not get picked -# up automatically: -FILES:${PN}-udevrules = "${nonarch_base_libdir}/udev/rules.d" -RDEPENDS:${PN} = "bash" -RDEPENDS:${PN}-udevrules = "libdevmapper" -RDEPENDS:${PN}:append:class-target = " libdevmapper" -RDEPENDS:${PN}:append:class-nativesdk = " libdevmapper" - -RDEPENDS:${PN}-scripts = "${PN} (= ${EXTENDPKGV}) \ - bash \ - util-linux-lsblk \ - util-linux-findmnt \ - coreutils \ -" -RRECOMMENDS:${PN}:class-target = "${PN}-scripts (= ${EXTENDPKGV})" - -CONFFILES:${PN} += "${sysconfdir}/lvm/lvm.conf" - -SYSROOT_PREPROCESS_FUNCS:append = " remove_libdevmapper_sysroot_preprocess" -remove_libdevmapper_sysroot_preprocess() { - rm -f ${SYSROOT_DESTDIR}${libdir}/libdevmapper.so* \ - ${SYSROOT_DESTDIR}${sbindir}/dmsetup \ - ${SYSROOT_DESTDIR}${sbindir}/dmstats \ - ${SYSROOT_DESTDIR}${includedir}/libdevmapper.h \ - ${SYSROOT_DESTDIR}${libdir}/pkgconfig/devmapper.pc -} - -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/mbuffer/mbuffer_20140310.bb b/sources/meta-openembedded/meta-oe/recipes-support/mbuffer/mbuffer_20140310.bb index ccc21f41..d0e7e392 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/mbuffer/mbuffer_20140310.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/mbuffer/mbuffer_20140310.bb @@ -8,6 +8,8 @@ SRC_URI = " \ http://www.maier-komor.de/software/mbuffer/mbuffer-20140310.tgz \ " +UPSTREAM_CHECK_URI = "http://www.maier-komor.de/mbuffer.html" + SRC_URI[md5sum] = "9937d7f666c19a2e6b2499b04dbecc44" SRC_URI[sha256sum] = "ab90b6fdce16db2bf08bcda0bc5d2bfb053a9a163d2a24f95fbf246460549b99" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/mcelog/mce-inject_git.bb b/sources/meta-openembedded/meta-oe/recipes-support/mcelog/mce-inject_git.bb index a228c3cc..08ec8c57 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/mcelog/mce-inject_git.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/mcelog/mce-inject_git.bb @@ -6,7 +6,7 @@ SECTION = "System Environment/Base" SRC_URI = "git://git.kernel.org/pub/scm/utils/cpu/mce/mce-inject.git;branch=master" -SRCREV = "4cbe46321b4a81365ff3aafafe63967264dbfec5" +SRCREV = "7668d820cadce2da9d90b72aab14c3e637ca47d6" UPSTREAM_CHECK_COMMITS = "1" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/mcelog/mce-test_git.bb b/sources/meta-openembedded/meta-oe/recipes-support/mcelog/mce-test_git.bb index 05e98e86..0a6fd684 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/mcelog/mce-test_git.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/mcelog/mce-test_git.bb @@ -14,8 +14,8 @@ SRC_URI = "git://git.kernel.org/pub/scm/utils/cpu/mce/mce-test.git;protocol=git; file://makefile-remove-ldflags.patch \ file://0001-gcov_merge.py-scov_merge.py-switch-to-python3.patch \ " -SRCREV = "025014dedca39d2b8a57a82e52286e72e157d73a" -PV = "20222810+git" +SRCREV = "9d11fc3e05eae7b454efeb5941beded56f80445b" +PV = "20230601+git" RDEPENDS:${PN} = "mcelog mce-inject dialog bash" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/mcelog/mcelog_198.bb b/sources/meta-openembedded/meta-oe/recipes-support/mcelog/mcelog_198.bb deleted file mode 100644 index e302f417..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/mcelog/mcelog_198.bb +++ /dev/null @@ -1,44 +0,0 @@ -SUMMARY = "mcelog daemon accounts memory and some other errors in various ways." -DESCRIPTION = "mcelog is required by both 32bit x86 Linux kernels (since 2.6.30) \ -and 64bit Linux kernels (since early 2.6 kernel releases) to log machine checks \ -and should run on all Linux systems that need error handling." -HOMEPAGE = "https://mcelog.org/" -SECTION = "System Environment/Base" - -SRC_URI = "\ - git://git.kernel.org/pub/scm/utils/cpu/mce/mcelog.git;protocol=http;;branch=master \ - file://0001-client-Include-string.h-form-mem-function-prototypes.patch \ - file://run-ptest \ -" - -SRCREV = "ab58f07b9b1a4456fca0f5f41639d5cbecc80e36" - -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263" - -S = "${WORKDIR}/git" - -inherit ptest - -COMPATIBLE_HOST = '(x86_64.*|i.86.*)-linux' - -EXTRA_OEMAKE += "CFLAGS='${CFLAGS}'" - -do_compile() { - oe_runmake -} - -do_install() { - oe_runmake install DESTDIR=${D} - install -d ${D}${sysconfdir}/cron.hourly - install -m 0755 ${S}/mcelog.cron ${D}${sysconfdir}/cron.hourly/ - sed -i 's/bash/sh/' ${D}${sysconfdir}/cron.hourly/mcelog.cron -} - -do_install_ptest() { - install -d ${D}${PTEST_PATH} - cp -r ${S}/tests ${S}/input ${D}${PTEST_PATH} - sed -i 's#../../mcelog#mcelog#' ${D}${PTEST_PATH}/tests/test -} - -RDEPENDS:${PN}-ptest += "make bash mce-inject" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/mcelog/mcelog_200.bb b/sources/meta-openembedded/meta-oe/recipes-support/mcelog/mcelog_200.bb new file mode 100644 index 00000000..9d72e785 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/mcelog/mcelog_200.bb @@ -0,0 +1,43 @@ +SUMMARY = "mcelog daemon accounts memory and some other errors in various ways." +DESCRIPTION = "mcelog is required by both 32bit x86 Linux kernels (since 2.6.30) \ +and 64bit Linux kernels (since early 2.6 kernel releases) to log machine checks \ +and should run on all Linux systems that need error handling." +HOMEPAGE = "https://mcelog.org/" +SECTION = "System Environment/Base" + +SRC_URI = "git://git.kernel.org/pub/scm/utils/cpu/mce/mcelog.git;protocol=http;;branch=master \ + file://0001-client-Include-string.h-form-mem-function-prototypes.patch \ + file://run-ptest \ + " + +SRCREV = "955fd0917ab1b9f159443e5cbba1d0fa73486fac" + +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +S = "${WORKDIR}/git" + +inherit ptest + +COMPATIBLE_HOST = '(x86_64.*|i.86.*)-linux' + +EXTRA_OEMAKE += "CFLAGS='${CFLAGS}'" + +do_compile() { + oe_runmake +} + +do_install() { + oe_runmake install DESTDIR=${D} + install -d ${D}${sysconfdir}/cron.hourly + install -m 0755 ${S}/mcelog.cron ${D}${sysconfdir}/cron.hourly/ + sed -i 's/bash/sh/' ${D}${sysconfdir}/cron.hourly/mcelog.cron +} + +do_install_ptest() { + install -d ${D}${PTEST_PATH} + cp -r ${S}/tests ${S}/input ${D}${PTEST_PATH} + sed -i 's#../../mcelog#mcelog#' ${D}${PTEST_PATH}/tests/test +} + +RDEPENDS:${PN}-ptest += "make bash mce-inject" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/monit/monit_5.33.0.bb b/sources/meta-openembedded/meta-oe/recipes-support/monit/monit_5.33.0.bb deleted file mode 100644 index 66d4079a..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/monit/monit_5.33.0.bb +++ /dev/null @@ -1,56 +0,0 @@ -DESCRIPTION = "Monit is a free open source utility for managing and monitoring, \ -processes, programs, files, directories and filesystems on a UNIX system. \ -Monit conducts automatic maintenance and repair and can execute meaningful \ -causal actions in error situations." - -HOMEPAGE = "http://mmonit.com/monit/" - -LICENSE = "AGPL-3.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=ea116a7defaf0e93b3bb73b2a34a3f51 \ - file://libmonit/COPYING;md5=2405f1c59ed1bf3714cebdb40162ce92" - -SRC_URI = " \ - https://mmonit.com/monit/dist/monit-${PV}.tar.gz \ - file://monit \ - file://monitrc \ -" - -SRC_URI[sha256sum] = "1ace889c0183473a9d70160df6533bb6e1338dc1354f5928507803e1e2a863b5" - -DEPENDS = "zlib bison-native libnsl2 flex-native openssl virtual/crypt" - -inherit autotools-brokensep systemd update-rc.d - -PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" -PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam" - -EXTRA_OECONF = "\ - libmonit_cv_setjmp_available=no \ - libmonit_cv_vsnprintf_c99_conformant=no \ - --with-ssl-lib-dir=${STAGING_LIBDIR} \ - --with-ssl-incl-dir=${STAGING_INCDIR} \ -" - -SYSTEMD_SERVICE:${PN} = "monit.service" -SYSTEMD_AUTO_ENABLE = "enable" - -INITSCRIPT_PACKAGES = "${PN}" -INITSCRIPT_NAME:${PN} = "monit" -INITSCRIPT_PARAMS:${PN} = "defaults 89" - -do_configure:prepend() { - rm -rf ${S}/m4/* -} - -do_install:append() { - - # Configuration file - install -Dm 0600 ${WORKDIR}/monitrc ${D}${sysconfdir}/monitrc - - # SystemD - install -Dm 0644 ${S}/system/startup/monit.service.in ${D}${systemd_system_unitdir}/monit.service - sed -i -e 's,@prefix@,${exec_prefix},g' ${D}${systemd_unitdir}/system/monit.service - - # SysV - install -Dm 0755 ${WORKDIR}/monit ${D}${sysconfdir}/init.d/monit -} diff --git a/sources/meta-openembedded/meta-oe/recipes-support/monit/monit_5.34.0.bb b/sources/meta-openembedded/meta-oe/recipes-support/monit/monit_5.34.0.bb new file mode 100644 index 00000000..7c386978 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/monit/monit_5.34.0.bb @@ -0,0 +1,56 @@ +DESCRIPTION = "Monit is a free open source utility for managing and monitoring, \ +processes, programs, files, directories and filesystems on a UNIX system. \ +Monit conducts automatic maintenance and repair and can execute meaningful \ +causal actions in error situations." + +HOMEPAGE = "http://mmonit.com/monit/" + +LICENSE = "AGPL-3.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=ea116a7defaf0e93b3bb73b2a34a3f51 \ + file://libmonit/COPYING;md5=2405f1c59ed1bf3714cebdb40162ce92" + +SRC_URI = " \ + https://mmonit.com/monit/dist/monit-${PV}.tar.gz \ + file://monit \ + file://monitrc \ +" + +SRC_URI[sha256sum] = "37f514cd8973bbce104cb8517ff3fc504052a083703eee0d0e873db26b919820" + +DEPENDS = "zlib bison-native libnsl2 flex-native openssl virtual/crypt" + +inherit autotools-brokensep systemd update-rc.d + +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" +PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam" + +EXTRA_OECONF = "\ + libmonit_cv_setjmp_available=no \ + libmonit_cv_vsnprintf_c99_conformant=no \ + --with-ssl-lib-dir=${STAGING_LIBDIR} \ + --with-ssl-incl-dir=${STAGING_INCDIR} \ +" + +SYSTEMD_SERVICE:${PN} = "monit.service" +SYSTEMD_AUTO_ENABLE = "enable" + +INITSCRIPT_PACKAGES = "${PN}" +INITSCRIPT_NAME:${PN} = "monit" +INITSCRIPT_PARAMS:${PN} = "defaults 89" + +do_configure:prepend() { + rm -rf ${S}/m4/* +} + +do_install:append() { + + # Configuration file + install -Dm 0600 ${UNPACKDIR}/monitrc ${D}${sysconfdir}/monitrc + + # SystemD + install -Dm 0644 ${S}/system/startup/monit.service.in ${D}${systemd_system_unitdir}/monit.service + sed -i -e 's,@prefix@,${exec_prefix},g' ${D}${systemd_unitdir}/system/monit.service + + # SysV + install -Dm 0755 ${UNPACKDIR}/monit ${D}${sysconfdir}/init.d/monit +} diff --git a/sources/meta-openembedded/meta-oe/recipes-support/mscgen/mscgen_0.20.bb b/sources/meta-openembedded/meta-oe/recipes-support/mscgen/mscgen_0.20.bb index 371281d6..b503506a 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/mscgen/mscgen_0.20.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/mscgen/mscgen_0.20.bb @@ -9,6 +9,8 @@ SRC_URI = "http://www.mcternan.me.uk/mscgen/software/${BPN}-src-${PV}.tar.gz" SRC_URI[md5sum] = "65c90fb5150d7176b65b793f0faa7377" SRC_URI[sha256sum] = "3c3481ae0599e1c2d30b7ed54ab45249127533ab2f20e768a0ae58d8551ddc23" +UPSTREAM_CHECK_URI = "https://www.mcternan.me.uk//mscgen/" + DEPENDS = "gd " inherit autotools gettext pkgconfig diff --git a/sources/meta-openembedded/meta-oe/recipes-support/msktutil/msktutil_1.2.1.bb b/sources/meta-openembedded/meta-oe/recipes-support/msktutil/msktutil_1.2.1.bb index b4f4651e..4c68e7ad 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/msktutil/msktutil_1.2.1.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/msktutil/msktutil_1.2.1.bb @@ -11,6 +11,9 @@ SRC_URI = "https://github.com/msktutil/msktutil/releases/download/${PV}/${BP}.ta file://0001-configure.ac-Remove-native-include-path.patch" SRC_URI[sha256sum] = "f9686237c4e24414802415f4c8627c7343da365c5a3bcdef7a853fa3cd27b45d" +UPSTREAM_CHECK_URI = "https://github.com/msktutil/msktutil/releases/" +UPSTREAM_CHECK_REGEX = "(?P\d+(\.\d+)+)" + DEPENDS += "krb5 cyrus-sasl openldap" inherit autotools diff --git a/sources/meta-openembedded/meta-oe/recipes-support/multipath-tools/multipath-tools_0.9.8.bb b/sources/meta-openembedded/meta-oe/recipes-support/multipath-tools/multipath-tools_0.9.8.bb index e9f01bd1..374cda3b 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/multipath-tools/multipath-tools_0.9.8.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/multipath-tools/multipath-tools_0.9.8.bb @@ -91,14 +91,14 @@ do_install() { # if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)};then install -d ${D}${sysconfdir}/init.d - cp ${WORKDIR}/multipathd.oe ${D}${sysconfdir}/init.d/multipathd + cp ${UNPACKDIR}/multipathd.oe ${D}${sysconfdir}/init.d/multipathd fi sed -i "s:/usr/lib/udev/kpartx_id:${nonarch_base_libdir}/udev/kpartx_id:g" \ ${D}${nonarch_base_libdir}/udev/rules.d/11-dm-mpath.rules install -d ${D}${sysconfdir} - install -m 0644 ${WORKDIR}/multipath.conf.example \ + install -m 0644 ${UNPACKDIR}/multipath.conf.example \ ${D}${sysconfdir}/multipath.conf.example } diff --git a/sources/meta-openembedded/meta-oe/recipes-support/nano/files/CVE-2024-5742.patch b/sources/meta-openembedded/meta-oe/recipes-support/nano/files/CVE-2024-5742.patch deleted file mode 100644 index f29b73c5..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/nano/files/CVE-2024-5742.patch +++ /dev/null @@ -1,101 +0,0 @@ -From aad1439553de8ce0ef8815a65ac0732dc804507b Mon Sep 17 00:00:00 2001 -From: Benno Schulenberg -Date: Sun, 28 Apr 2024 10:51:52 +0200 -Subject: [PATCH] files: run `chmod` and `chown` on the descriptor, not on the - filename - -This closes a window of opportunity where the emergency file could be -replaced by a malicious symlink. - -The issue was reported by `MartinJM` and `InvisibleMeerkat`. - -Problem existed since version 2.2.0, commit 123110c5, when chmodding -and chowning of the emergency .save file was added. - -Upstream-Status: Backport from [https://git.savannah.gnu.org/cgit/nano.git/commit/?id=5e7a3c2e7e118c7f12d5dfda9f9140f638976aa2] -CVE: CVE-2024-5742 -Signed-off-by: Siddharth Doshi ---- - src/definitions.h | 2 +- - src/files.c | 13 ++++++++++++- - src/nano.c | 12 +----------- - 3 files changed, 14 insertions(+), 13 deletions(-) - -diff --git a/src/definitions.h b/src/definitions.h -index 288f1ff..04614a3 100644 ---- a/src/definitions.h -+++ b/src/definitions.h -@@ -283,7 +283,7 @@ typedef enum { - } message_type; - - typedef enum { -- OVERWRITE, APPEND, PREPEND -+ OVERWRITE, APPEND, PREPEND, EMERGENCY - } kind_of_writing_type; - - typedef enum { -diff --git a/src/files.c b/src/files.c -index c6eadc1..88397d3 100644 ---- a/src/files.c -+++ b/src/files.c -@@ -1760,6 +1760,8 @@ bool write_file(const char *name, FILE *thefile, bool normal, - #endif - char *realname = real_dir_from_tilde(name); - /* The filename after tilde expansion. */ -+ int fd = 0; -+ /* The descriptor that is assigned when opening the file. */ - char *tempname = NULL; - /* The name of the temporary file we use when prepending. */ - linestruct *line = openfile->filetop; -@@ -1843,7 +1845,6 @@ bool write_file(const char *name, FILE *thefile, bool normal, - * For an emergency file, access is restricted to just the owner. */ - if (thefile == NULL) { - mode_t permissions = (normal ? RW_FOR_ALL : S_IRUSR|S_IWUSR); -- int fd; - - #ifndef NANO_TINY - block_sigwinch(TRUE); -@@ -1969,6 +1970,16 @@ bool write_file(const char *name, FILE *thefile, bool normal, - } - #endif - -+#if !defined(NANO_TINY) && defined(HAVE_CHMOD) && defined(HAVE_CHOWN) -+ /* Change permissions and owner of an emergency save file to the values -+ * of the original file, but ignore any failure as we are in a hurry. */ -+ if (method == EMERGENCY && fd && openfile->statinfo) { -+ IGNORE_CALL_RESULT(fchmod(fd, openfile->statinfo->st_mode)); -+ IGNORE_CALL_RESULT(fchown(fd, openfile->statinfo->st_uid, -+ openfile->statinfo->st_gid)); -+ } -+#endif -+ - if (fclose(thefile) != 0) { - statusline(ALERT, _("Error writing %s: %s"), realname, strerror(errno)); - -diff --git a/src/nano.c b/src/nano.c -index c6db6dd..c8e5265 100644 ---- a/src/nano.c -+++ b/src/nano.c -@@ -337,18 +337,8 @@ void emergency_save(const char *filename) - - if (*targetname == '\0') - fprintf(stderr, _("\nToo many .save files\n")); -- else if (write_file(targetname, NULL, SPECIAL, OVERWRITE, NONOTES)) { -+ else if (write_file(targetname, NULL, SPECIAL, EMERGENCY, NONOTES)) - fprintf(stderr, _("\nBuffer written to %s\n"), targetname); --#if !defined(NANO_TINY) && defined(HAVE_CHMOD) && defined(HAVE_CHOWN) -- /* Try to chmod/chown the saved file to the values of the original file, -- * but ignore any failure as we are in a hurry to get out. */ -- if (openfile->statinfo) { -- IGNORE_CALL_RESULT(chmod(targetname, openfile->statinfo->st_mode)); -- IGNORE_CALL_RESULT(chown(targetname, openfile->statinfo->st_uid, -- openfile->statinfo->st_gid)); -- } --#endif -- } - - free(targetname); - free(plainname); --- -2.44.0 - diff --git a/sources/meta-openembedded/meta-oe/recipes-support/nano/nano_7.2.bb b/sources/meta-openembedded/meta-oe/recipes-support/nano/nano_7.2.bb deleted file mode 100644 index 73d46949..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/nano/nano_7.2.bb +++ /dev/null @@ -1,24 +0,0 @@ -SUMMARY = "Small and friendly console text editor" -DESCRIPTION = "GNU nano (Nano's ANOther editor, or \ -Not ANOther editor) is an enhanced clone of the \ -Pico text editor." -HOMEPAGE = "http://www.nano-editor.org/" -SECTION = "console/utils" -LICENSE = "GPL-3.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949" - -DEPENDS = "ncurses file" -RDEPENDS:${PN} = "ncurses-terminfo-base" - -PV_MAJOR = "${@d.getVar('PV').split('.')[0]}" - -SRC_URI = "https://nano-editor.org/dist/v${PV_MAJOR}/nano-${PV}.tar.xz \ - file://CVE-2024-5742.patch \ - " -SRC_URI[sha256sum] = "86f3442768bd2873cec693f83cdf80b4b444ad3cc14760b74361474fc87a4526" - -UPSTREAM_CHECK_URI = "https://ftp.gnu.org/gnu/nano" - -inherit autotools gettext pkgconfig - -PACKAGECONFIG[tiny] = "--enable-tiny," diff --git a/sources/meta-openembedded/meta-oe/recipes-support/nano/nano_8.2.bb b/sources/meta-openembedded/meta-oe/recipes-support/nano/nano_8.2.bb new file mode 100644 index 00000000..46e5a15c --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/nano/nano_8.2.bb @@ -0,0 +1,22 @@ +SUMMARY = "Small and friendly console text editor" +DESCRIPTION = "GNU nano (Nano's ANOther editor, or \ +Not ANOther editor) is an enhanced clone of the \ +Pico text editor." +HOMEPAGE = "http://www.nano-editor.org/" +SECTION = "console/utils" +LICENSE = "GPL-3.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949" + +DEPENDS = "ncurses file" +RDEPENDS:${PN} = "ncurses-terminfo-base" + +PV_MAJOR = "${@d.getVar('PV').split('.')[0]}" + +SRC_URI = "https://nano-editor.org/dist/v${PV_MAJOR}/nano-${PV}.tar.xz" +SRC_URI[sha256sum] = "d5ad07dd862facae03051c54c6535e54c7ed7407318783fcad1ad2d7076fffeb" + +UPSTREAM_CHECK_URI = "https://ftp.gnu.org/gnu/nano" + +inherit autotools gettext pkgconfig + +PACKAGECONFIG[tiny] = "--enable-tiny," diff --git a/sources/meta-openembedded/meta-oe/recipes-support/nmon/nmon_16m.bb b/sources/meta-openembedded/meta-oe/recipes-support/nmon/nmon_16m.bb index d4a357ce..495afd16 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/nmon/nmon_16m.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/nmon/nmon_16m.bb @@ -14,11 +14,15 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/nmon/lmon${PV}.c;name=lmon \ SRC_URI[lmon.sha256sum] = "2bed4d45fdfdf1d1387ec91e139c04975d5f838e3e0d53c0fe2d803a707e5fc1" SRC_URI[doc.sha256sum] = "1f7f83afe62a7210be5e83cd24157adb854c14599efe0b377a7ecca933869278" +UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/nmon/files/" +UPSTREAM_CHECK_REGEX = "lmon(?P.*).c" + CFLAGS += "-D JFS -D GETUSER -Wall -D LARGEMEM" LDFLAGS += "-ltinfo -lncursesw -lm" ASNEEDED:pn-nmon = "" -S = "${WORKDIR}" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" do_compile() { ${CC} ${CFLAGS} ${LDFLAGS} lmon${PV}.c -o nmon diff --git a/sources/meta-openembedded/meta-oe/recipes-support/nspr/nspr_4.35.bb b/sources/meta-openembedded/meta-oe/recipes-support/nspr/nspr_4.35.bb index f8d32939..abd750b1 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/nspr/nspr_4.35.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/nspr/nspr_4.35.bb @@ -171,7 +171,7 @@ do_compile:append() { } do_install:append() { - install -D ${WORKDIR}/nspr.pc.in ${D}${libdir}/pkgconfig/nspr.pc + install -D ${UNPACKDIR}/nspr.pc.in ${D}${libdir}/pkgconfig/nspr.pc sed -i \ -e 's:NSPRVERSION:${PV}:g' \ -e 's:OEPREFIX:${prefix}:g' \ diff --git a/sources/meta-openembedded/meta-oe/recipes-support/nss/nss/CVE-2024-6602.patch b/sources/meta-openembedded/meta-oe/recipes-support/nss/nss/CVE-2024-6602.patch deleted file mode 100644 index f75d822d..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/nss/nss/CVE-2024-6602.patch +++ /dev/null @@ -1,65 +0,0 @@ -From 7804e99346339bb31f801a2fcba63b6fbd8bca4a Mon Sep 17 00:00:00 2001 -From: John Schanck -Date: Mon, 20 May 2024 18:46:14 +0000 -Subject: [PATCH] Bug 1895032 - remove redundant AllocItem implementation. - r=nss-reviewers,rrelyea - -Differential Revision: https://phabricator.services.mozilla.com/D209476 - ---HG-- -extra : moz-landing-system : lando - -CVE: CVE-2024-6602 -Upstream-Status: Backport [https://hg.mozilla.org/projects/nss/rev/f9b22115dc97be76e388dc9d0dca946dde955e64] -Signed-off-by: Peter Marko ---- - nss/lib/util/secitem.c | 23 ++++------------------- - 1 file changed, 4 insertions(+), 19 deletions(-) - -diff --git a/nss/lib/util/secitem.c b/nss/lib/util/secitem.c -index cd6996178..6ba11a551 100644 ---- a/nss/lib/util/secitem.c -+++ b/nss/lib/util/secitem.c -@@ -238,35 +238,20 @@ SECITEM_ArenaDupItem(PLArenaPool *arena, const SECItem *from) - SECItem *to; - - if (from == NULL) { -- return (NULL); -+ return NULL; - } - -- if (arena != NULL) { -- to = (SECItem *)PORT_ArenaAlloc(arena, sizeof(SECItem)); -- } else { -- to = (SECItem *)PORT_Alloc(sizeof(SECItem)); -- } -+ to = SECITEM_AllocItem(arena, NULL, from->len); - if (to == NULL) { -- return (NULL); -+ return NULL; - } - -- if (arena != NULL) { -- to->data = (unsigned char *)PORT_ArenaAlloc(arena, from->len); -- } else { -- to->data = (unsigned char *)PORT_Alloc(from->len); -- } -- if (to->data == NULL) { -- PORT_Free(to); -- return (NULL); -- } -- -- to->len = from->len; - to->type = from->type; - if (to->len) { - PORT_Memcpy(to->data, from->data, to->len); - } - -- return (to); -+ return to; - } - - SECStatus --- -2.30.2 - diff --git a/sources/meta-openembedded/meta-oe/recipes-support/nss/nss/CVE-2024-6609.patch b/sources/meta-openembedded/meta-oe/recipes-support/nss/nss/CVE-2024-6609.patch deleted file mode 100644 index 38932cc2..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/nss/nss/CVE-2024-6609.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 41550b24b92c4a5971da9842e5e9f2b452aceca8 Tue Oct 29 22:44:57 2024 -From: Peter Marko -Date: Tue, 29 Oct 2024 22:44:57 +0100 -Subject: [PATCH] fix CVE-2024-6609 - -CVE: CVE-2024-6609 -Upstream-Status: Inappropriate [upstream ticket: https://groups.google.com/a/mozilla.org/g/dev-tech-crypto/c/t9JmsYkujWM/m/HjKuk-ngBAAJ] -Signed-off-by: Peter Marko ---- - nss/lib/freebl/ec.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/nss/lib/freebl/ec.c b/nss/lib/freebl/ec.c -index 73a625a..c9490da 100644 ---- a/nss/lib/freebl/ec.c -+++ b/nss/lib/freebl/ec.c -@@ -302,6 +302,10 @@ done: - - cleanup: - mp_clear(&k); -+ if (err < MP_OKAY) { -+ MP_TO_SEC_ERROR(err); -+ rv = SECFailure; -+ } - if (rv) { - PORT_FreeArena(arena, PR_TRUE); - } --- -2.30.2 - diff --git a/sources/meta-openembedded/meta-oe/recipes-support/nss/nss_3.103.bb b/sources/meta-openembedded/meta-oe/recipes-support/nss/nss_3.103.bb new file mode 100644 index 00000000..64141e93 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/nss/nss_3.103.bb @@ -0,0 +1,289 @@ +SUMMARY = "Mozilla's SSL and TLS implementation" +DESCRIPTION = "Network Security Services (NSS) is a set of libraries \ +designed to support cross-platform development of \ +security-enabled client and server applications. \ +Applications built with NSS can support SSL v2 and v3, \ +TLS, PKCS 5, PKCS 7, PKCS 11, PKCS 12, S/MIME, X.509 \ +v3 certificates, and other security standards." +HOMEPAGE = "http://www.mozilla.org/projects/security/pki/nss/" +SECTION = "libs" + +DEPENDS = "sqlite3 nspr zlib nss-native" +DEPENDS:class-native = "sqlite3-native nspr-native zlib-native" + +LICENSE = "(MPL-2.0 & MIT) | (MPL-2.0 & GPL-2.0-or-later & MIT) | (MPL-2.0 & LGPL-2.1-or-later & MIT)" + +LIC_FILES_CHKSUM = "file://nss/COPYING;md5=3b1e88e1b9c0b5a4b2881d46cce06a18 \ + file://nss/lib/freebl/mpi/doc/LICENSE;md5=491f158d09d948466afce85d6f1fe18f \ + file://nss/lib/freebl/mpi/doc/LICENSE-MPL;md5=5d425c8f3157dbf212db2ec53d9e5132 \ + file://nss/lib/freebl/verified/Hacl_Poly1305_256.c;beginline=1;endline=22;md5=cc22f07b95d28d56baeb757df46ee7c8" + +VERSION_DIR = "${@d.getVar('BP').upper().replace('-', '_').replace('.', '_') + '_RTM'}" + +SRC_URI = "http://ftp.mozilla.org/pub/security/nss/releases/${VERSION_DIR}/src/${BP}.tar.gz \ + file://nss.pc.in \ + file://0001-nss-fix-support-cross-compiling.patch \ + file://nss-no-rpath-for-cross-compiling.patch \ + file://nss-fix-incorrect-shebang-of-perl.patch \ + file://disable-Wvarargs-with-clang.patch \ + file://pqg.c-ULL_addend.patch \ + file://blank-cert9.db \ + file://blank-key4.db \ + file://system-pkcs11.txt \ + file://nss-fix-nsinstall-build.patch \ + file://0001-freebl-add-a-configure-option-to-disable-ARM-HW-cryp.patch \ + " +SRC_URI[sha256sum] = "7b4ab657f772dc7520c46e8d481940b292dcfc6a4c90150a7c26672384cee962" + +UPSTREAM_CHECK_URI = "https://ftp.mozilla.org/pub/security/nss/releases/" +UPSTREAM_CHECK_REGEX = "NSS_(?P\d+(\_\d+)+)" + +inherit siteinfo + +TD = "${S}/tentative-dist" +TDS = "${S}/tentative-dist-staging" + +TARGET_CC_ARCH += "${LDFLAGS}" + +CFLAGS:append:class-native = " -D_XOPEN_SOURCE " + +do_configure:prepend:libc-musl () { + sed -i -e '/-DHAVE_SYS_CDEFS_H/d' ${S}/nss/lib/dbm/config/config.mk +} + +do_configure:prepend:powerpc64le:toolchain-clang () { + sed -i -e 's/\-std=c99/\-std=gnu99/g' ${S}/nss/coreconf/command.mk +} + +do_configure:prepend:powerpc64:toolchain-clang () { + sed -i -e 's/\-std=c99/\-std=gnu99/g' ${S}/nss/coreconf/command.mk +} + +do_compile:prepend:class-native() { + export NSPR_INCLUDE_DIR=${STAGING_INCDIR_NATIVE}/nspr + export NSPR_LIB_DIR=${STAGING_LIBDIR_NATIVE} +} + +do_compile:prepend:class-nativesdk() { + export LDFLAGS="" +} + +do_compile:prepend:class-native() { + # Need to set RPATH so that chrpath will do its job correctly + RPATH="-Wl,-rpath-link,${STAGING_LIBDIR_NATIVE} -Wl,-rpath-link,${STAGING_BASE_LIBDIR_NATIVE} -Wl,-rpath,${STAGING_LIBDIR_NATIVE} -Wl,-rpath,${STAGING_BASE_LIBDIR_NATIVE}" +} + +do_compile() { + export NSPR_INCLUDE_DIR=${STAGING_INCDIR}/nspr + + export CROSS_COMPILE=1 + export NATIVE_CC="${BUILD_CC}" + # Additional defines needed on Centos 7 + export NATIVE_FLAGS="${BUILD_CFLAGS} -DLINUX -Dlinux" + export BUILD_OPT=1 + + # POSIX.1-2001 states that the behaviour of getcwd() when passing a null + # pointer as the buf argument, is unspecified. + export NATIVE_FLAGS="${NATIVE_FLAGS} -DGETCWD_CANT_MALLOC" + + export FREEBL_NO_DEPEND=1 + export FREEBL_LOWHASH=1 + + export LIBDIR=${libdir} + export MOZILLA_CLIENT=1 + export NS_USE_GCC=1 + export NSS_USE_SYSTEM_SQLITE=1 + export NSS_ENABLE_ECC=1 + export NSS_ENABLE_WERROR=0 + + ${@bb.utils.contains("TUNE_FEATURES", "crypto", "export NSS_USE_ARM_HW_CRYPTO=1", "", d)} + + export OS_RELEASE=3.4 + export OS_TARGET=Linux + export OS_ARCH=Linux + + if [ "${TARGET_ARCH}" = "powerpc" ]; then + OS_TEST=ppc + elif [ "${TARGET_ARCH}" = "powerpc64" -o "${TARGET_ARCH}" = "powerpc64le" ]; then + OS_TEST=ppc64 + elif [ "${TARGET_ARCH}" = "mips" -o "${TARGET_ARCH}" = "mipsel" -o "${TARGET_ARCH}" = "mips64" -o "${TARGET_ARCH}" = "mips64el" ]; then + OS_TEST=mips + elif [ "${TARGET_ARCH}" = "aarch64_be" ]; then + OS_TEST="aarch64" + else + OS_TEST="${TARGET_ARCH}" + fi + + if [ "${SITEINFO_BITS}" = "64" ]; then + export USE_64=1 + elif [ "${TARGET_ARCH}" = "x86_64" -a "${SITEINFO_BITS}" = "32" ]; then + export USE_X32=1 + fi + + export NSS_DISABLE_GTESTS=1 + # We can modify CC in the environment, but if we set it via an + # argument to make, nsinstall, a host program, will also build with it! + # + # nss pretty much does its own thing with CFLAGS, so we put them into CC. + # Optimization will get clobbered, but most of the stuff will survive. + # The motivation for this is to point to the correct place for debug + # source files and CFLAGS does that. Nothing uses CCC. + # + export CC="${CC} ${CFLAGS}" + make -C ./nss CCC="${CXX} -g" \ + OS_TEST=${OS_TEST} \ + RPATH="${RPATH}" \ + autobuild +} + +do_compile[vardepsexclude] += "SITEINFO_BITS" + +do_install:prepend:class-nativesdk() { + export LDFLAGS="" +} + +do_install() { + export CROSS_COMPILE=1 + export NATIVE_CC="${BUILD_CC}" + export BUILD_OPT=1 + + export FREEBL_NO_DEPEND=1 + + export LIBDIR=${libdir} + export MOZILLA_CLIENT=1 + export NS_USE_GCC=1 + export NSS_USE_SYSTEM_SQLITE=1 + export NSS_ENABLE_ECC=1 + + export OS_RELEASE=3.4 + export OS_TARGET=Linux + export OS_ARCH=Linux + + if [ "${TARGET_ARCH}" = "powerpc" ]; then + OS_TEST=ppc + elif [ "${TARGET_ARCH}" = "powerpc64" -o "${TARGET_ARCH}" = "powerpc64le" ]; then + OS_TEST=ppc64 + elif [ "${TARGET_ARCH}" = "mips" -o "${TARGET_ARCH}" = "mipsel" -o "${TARGET_ARCH}" = "mips64" -o "${TARGET_ARCH}" = "mips64el" ]; then + OS_TEST=mips + elif [ "${TARGET_ARCH}" = "aarch64_be" ]; then + CPU_ARCH=aarch64 + OS_TEST="aarch64" + else + OS_TEST="${TARGET_ARCH}" + fi + if [ "${SITEINFO_BITS}" = "64" ]; then + export USE_64=1 + elif [ "${TARGET_ARCH}" = "x86_64" -a "${SITEINFO_BITS}" = "32" ]; then + export USE_X32=1 + fi + + export NSS_DISABLE_GTESTS=1 + + make -C ./nss \ + CCC="${CXX}" \ + OS_TEST=${OS_TEST} \ + SOURCE_LIB_DIR="${TD}/${libdir}" \ + SOURCE_BIN_DIR="${TD}/${bindir}" \ + install + + install -d ${D}/${libdir}/ + for file in ${S}/dist/*.OBJ/lib/*.so; do + echo "Installing `basename $file`..." + cp $file ${D}/${libdir}/ + done + + for shared_lib in ${TD}/${libdir}/*.so.*; do + if [ -f $shared_lib ]; then + cp $shared_lib ${D}/${libdir} + ln -sf $(basename $shared_lib) ${D}/${libdir}/$(basename $shared_lib .1oe) + fi + done + for shared_lib in ${TD}/${libdir}/*.so; do + if [ -f $shared_lib -a ! -e ${D}/${libdir}/$shared_lib ]; then + cp $shared_lib ${D}/${libdir} + fi + done + + install -d ${D}/${includedir}/nss3 + install -m 644 -t ${D}/${includedir}/nss3 dist/public/nss/* + + install -d ${D}/${bindir} + for binary in ${TD}/${bindir}/*; do + install -m 755 -t ${D}/${bindir} $binary + done +} + +do_install[vardepsexclude] += "SITEINFO_BITS" + +do_install:append() { + # Create empty .chk files for the NSS libraries at build time. They could + # be regenerated at target's boot time. + for file in libsoftokn3.chk libfreebl3.chk libnssdbm3.chk; do + touch ${D}/${libdir}/$file + chmod 755 ${D}/${libdir}/$file + done + + install -d ${D}${libdir}/pkgconfig/ + sed 's/%NSS_VERSION%/${PV}/' ${UNPACKDIR}/nss.pc.in | sed 's/%NSPR_VERSION%/4.9.2/' > ${D}${libdir}/pkgconfig/nss.pc + sed -i s:OEPREFIX:${prefix}:g ${D}${libdir}/pkgconfig/nss.pc + sed -i s:OEEXECPREFIX:${exec_prefix}:g ${D}${libdir}/pkgconfig/nss.pc + sed -i s:OELIBDIR:${libdir}:g ${D}${libdir}/pkgconfig/nss.pc + sed -i s:OEINCDIR:${includedir}/nss3:g ${D}${libdir}/pkgconfig/nss.pc +} + +do_install:append:class-target() { + # It used to call certutil to create a blank certificate with empty password at + # build time, but the checksum of key4.db changes every time when certutil is called. + # It causes non-determinism issue, so provide databases with a blank certificate + # which are originally from output of nss in qemux86-64 build. You can get these + # databases by: + # certutil -N -d sql:/database/path/ --empty-password + install -d ${D}${sysconfdir}/pki/nssdb/ + install -m 0644 ${UNPACKDIR}/blank-cert9.db ${D}${sysconfdir}/pki/nssdb/cert9.db + install -m 0644 ${UNPACKDIR}/blank-key4.db ${D}${sysconfdir}/pki/nssdb/key4.db + install -m 0644 ${UNPACKDIR}/system-pkcs11.txt ${D}${sysconfdir}/pki/nssdb/pkcs11.txt +} + +PACKAGE_WRITE_DEPS += "nss-native" + +pkg_postinst:${PN} () { + for I in $D${libdir}/lib*.chk; do + DN=`dirname $I` + BN=`basename $I .chk` + FN=$DN/$BN.so + shlibsign -i $FN + if [ $? -ne 0 ]; then + echo "shlibsign -i $FN failed" + fi + done +} + +PACKAGES =+ "${PN}-smime" +FILES:${PN}-smime = "\ + ${bindir}/smime \ +" + +FILES:${PN} = "\ + ${sysconfdir} \ + ${bindir} \ + ${libdir}/lib*.chk \ + ${libdir}/lib*.so \ + " + +FILES:${PN}-dev = "\ + ${libdir}/nss \ + ${libdir}/pkgconfig/* \ + ${includedir}/* \ + " + +RDEPENDS:${PN}-smime = "perl" + +BBCLASSEXTEND = "native nativesdk" + +CVE_PRODUCT += "network_security_services" + +CVE_STATUS_GROUPS += "CVE_STATUS_NSS" +CVE_STATUS_NSS[status] = "not-applicable-config: This only affect the legacy db (libnssdbm), only compiled with --enable-legacy-db" +CVE_STATUS_NSS = "CVE-2017-11695 CVE-2017-11696 CVE-2017-11697 CVE-2017-11698" + +CVE_STATUS[CVE-2022-3479] = "not-applicable-config: vulnerability was introduced in 3.77 and fixed in 3.87" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/nss/nss_3.98.bb b/sources/meta-openembedded/meta-oe/recipes-support/nss/nss_3.98.bb deleted file mode 100644 index 9218b4d3..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/nss/nss_3.98.bb +++ /dev/null @@ -1,291 +0,0 @@ -SUMMARY = "Mozilla's SSL and TLS implementation" -DESCRIPTION = "Network Security Services (NSS) is a set of libraries \ -designed to support cross-platform development of \ -security-enabled client and server applications. \ -Applications built with NSS can support SSL v2 and v3, \ -TLS, PKCS 5, PKCS 7, PKCS 11, PKCS 12, S/MIME, X.509 \ -v3 certificates, and other security standards." -HOMEPAGE = "http://www.mozilla.org/projects/security/pki/nss/" -SECTION = "libs" - -DEPENDS = "sqlite3 nspr zlib nss-native" -DEPENDS:class-native = "sqlite3-native nspr-native zlib-native" - -LICENSE = "(MPL-2.0 & MIT) | (MPL-2.0 & GPL-2.0-or-later & MIT) | (MPL-2.0 & LGPL-2.1-or-later & MIT)" - -LIC_FILES_CHKSUM = "file://nss/COPYING;md5=3b1e88e1b9c0b5a4b2881d46cce06a18 \ - file://nss/lib/freebl/mpi/doc/LICENSE;md5=491f158d09d948466afce85d6f1fe18f \ - file://nss/lib/freebl/mpi/doc/LICENSE-MPL;md5=5d425c8f3157dbf212db2ec53d9e5132 \ - file://nss/lib/freebl/verified/Hacl_Poly1305_256.c;beginline=1;endline=22;md5=cc22f07b95d28d56baeb757df46ee7c8" - -VERSION_DIR = "${@d.getVar('BP').upper().replace('-', '_').replace('.', '_') + '_RTM'}" - -SRC_URI = "http://ftp.mozilla.org/pub/security/nss/releases/${VERSION_DIR}/src/${BP}.tar.gz \ - file://nss.pc.in \ - file://0001-nss-fix-support-cross-compiling.patch \ - file://nss-no-rpath-for-cross-compiling.patch \ - file://nss-fix-incorrect-shebang-of-perl.patch \ - file://disable-Wvarargs-with-clang.patch \ - file://pqg.c-ULL_addend.patch \ - file://blank-cert9.db \ - file://blank-key4.db \ - file://system-pkcs11.txt \ - file://nss-fix-nsinstall-build.patch \ - file://0001-freebl-add-a-configure-option-to-disable-ARM-HW-cryp.patch \ - file://CVE-2024-6602.patch \ - file://CVE-2024-6609.patch \ - " -SRC_URI[sha256sum] = "f549cc33d35c0601674bfacf7c6ad683c187595eb4125b423238d3e9aa4209ce" - -UPSTREAM_CHECK_URI = "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/NSS_Releases" -UPSTREAM_CHECK_REGEX = "NSS_(?P.+)_release_notes" - -inherit siteinfo - -TD = "${S}/tentative-dist" -TDS = "${S}/tentative-dist-staging" - -TARGET_CC_ARCH += "${LDFLAGS}" - -CFLAGS:append:class-native = " -D_XOPEN_SOURCE " - -do_configure:prepend:libc-musl () { - sed -i -e '/-DHAVE_SYS_CDEFS_H/d' ${S}/nss/lib/dbm/config/config.mk -} - -do_configure:prepend:powerpc64le:toolchain-clang () { - sed -i -e 's/\-std=c99/\-std=gnu99/g' ${S}/nss/coreconf/command.mk -} - -do_configure:prepend:powerpc64:toolchain-clang () { - sed -i -e 's/\-std=c99/\-std=gnu99/g' ${S}/nss/coreconf/command.mk -} - -do_compile:prepend:class-native() { - export NSPR_INCLUDE_DIR=${STAGING_INCDIR_NATIVE}/nspr - export NSPR_LIB_DIR=${STAGING_LIBDIR_NATIVE} -} - -do_compile:prepend:class-nativesdk() { - export LDFLAGS="" -} - -do_compile:prepend:class-native() { - # Need to set RPATH so that chrpath will do its job correctly - RPATH="-Wl,-rpath-link,${STAGING_LIBDIR_NATIVE} -Wl,-rpath-link,${STAGING_BASE_LIBDIR_NATIVE} -Wl,-rpath,${STAGING_LIBDIR_NATIVE} -Wl,-rpath,${STAGING_BASE_LIBDIR_NATIVE}" -} - -do_compile() { - export NSPR_INCLUDE_DIR=${STAGING_INCDIR}/nspr - - export CROSS_COMPILE=1 - export NATIVE_CC="${BUILD_CC}" - # Additional defines needed on Centos 7 - export NATIVE_FLAGS="${BUILD_CFLAGS} -DLINUX -Dlinux" - export BUILD_OPT=1 - - # POSIX.1-2001 states that the behaviour of getcwd() when passing a null - # pointer as the buf argument, is unspecified. - export NATIVE_FLAGS="${NATIVE_FLAGS} -DGETCWD_CANT_MALLOC" - - export FREEBL_NO_DEPEND=1 - export FREEBL_LOWHASH=1 - - export LIBDIR=${libdir} - export MOZILLA_CLIENT=1 - export NS_USE_GCC=1 - export NSS_USE_SYSTEM_SQLITE=1 - export NSS_ENABLE_ECC=1 - export NSS_ENABLE_WERROR=0 - - ${@bb.utils.contains("TUNE_FEATURES", "crypto", "export NSS_USE_ARM_HW_CRYPTO=1", "", d)} - - export OS_RELEASE=3.4 - export OS_TARGET=Linux - export OS_ARCH=Linux - - if [ "${TARGET_ARCH}" = "powerpc" ]; then - OS_TEST=ppc - elif [ "${TARGET_ARCH}" = "powerpc64" -o "${TARGET_ARCH}" = "powerpc64le" ]; then - OS_TEST=ppc64 - elif [ "${TARGET_ARCH}" = "mips" -o "${TARGET_ARCH}" = "mipsel" -o "${TARGET_ARCH}" = "mips64" -o "${TARGET_ARCH}" = "mips64el" ]; then - OS_TEST=mips - elif [ "${TARGET_ARCH}" = "aarch64_be" ]; then - OS_TEST="aarch64" - else - OS_TEST="${TARGET_ARCH}" - fi - - if [ "${SITEINFO_BITS}" = "64" ]; then - export USE_64=1 - elif [ "${TARGET_ARCH}" = "x86_64" -a "${SITEINFO_BITS}" = "32" ]; then - export USE_X32=1 - fi - - export NSS_DISABLE_GTESTS=1 - # We can modify CC in the environment, but if we set it via an - # argument to make, nsinstall, a host program, will also build with it! - # - # nss pretty much does its own thing with CFLAGS, so we put them into CC. - # Optimization will get clobbered, but most of the stuff will survive. - # The motivation for this is to point to the correct place for debug - # source files and CFLAGS does that. Nothing uses CCC. - # - export CC="${CC} ${CFLAGS}" - make -C ./nss CCC="${CXX} -g" \ - OS_TEST=${OS_TEST} \ - RPATH="${RPATH}" \ - autobuild -} - -do_compile[vardepsexclude] += "SITEINFO_BITS" - -do_install:prepend:class-nativesdk() { - export LDFLAGS="" -} - -do_install() { - export CROSS_COMPILE=1 - export NATIVE_CC="${BUILD_CC}" - export BUILD_OPT=1 - - export FREEBL_NO_DEPEND=1 - - export LIBDIR=${libdir} - export MOZILLA_CLIENT=1 - export NS_USE_GCC=1 - export NSS_USE_SYSTEM_SQLITE=1 - export NSS_ENABLE_ECC=1 - - export OS_RELEASE=3.4 - export OS_TARGET=Linux - export OS_ARCH=Linux - - if [ "${TARGET_ARCH}" = "powerpc" ]; then - OS_TEST=ppc - elif [ "${TARGET_ARCH}" = "powerpc64" -o "${TARGET_ARCH}" = "powerpc64le" ]; then - OS_TEST=ppc64 - elif [ "${TARGET_ARCH}" = "mips" -o "${TARGET_ARCH}" = "mipsel" -o "${TARGET_ARCH}" = "mips64" -o "${TARGET_ARCH}" = "mips64el" ]; then - OS_TEST=mips - elif [ "${TARGET_ARCH}" = "aarch64_be" ]; then - CPU_ARCH=aarch64 - OS_TEST="aarch64" - else - OS_TEST="${TARGET_ARCH}" - fi - if [ "${SITEINFO_BITS}" = "64" ]; then - export USE_64=1 - elif [ "${TARGET_ARCH}" = "x86_64" -a "${SITEINFO_BITS}" = "32" ]; then - export USE_X32=1 - fi - - export NSS_DISABLE_GTESTS=1 - - make -C ./nss \ - CCC="${CXX}" \ - OS_TEST=${OS_TEST} \ - SOURCE_LIB_DIR="${TD}/${libdir}" \ - SOURCE_BIN_DIR="${TD}/${bindir}" \ - install - - install -d ${D}/${libdir}/ - for file in ${S}/dist/*.OBJ/lib/*.so; do - echo "Installing `basename $file`..." - cp $file ${D}/${libdir}/ - done - - for shared_lib in ${TD}/${libdir}/*.so.*; do - if [ -f $shared_lib ]; then - cp $shared_lib ${D}/${libdir} - ln -sf $(basename $shared_lib) ${D}/${libdir}/$(basename $shared_lib .1oe) - fi - done - for shared_lib in ${TD}/${libdir}/*.so; do - if [ -f $shared_lib -a ! -e ${D}/${libdir}/$shared_lib ]; then - cp $shared_lib ${D}/${libdir} - fi - done - - install -d ${D}/${includedir}/nss3 - install -m 644 -t ${D}/${includedir}/nss3 dist/public/nss/* - - install -d ${D}/${bindir} - for binary in ${TD}/${bindir}/*; do - install -m 755 -t ${D}/${bindir} $binary - done -} - -do_install[vardepsexclude] += "SITEINFO_BITS" - -do_install:append() { - # Create empty .chk files for the NSS libraries at build time. They could - # be regenerated at target's boot time. - for file in libsoftokn3.chk libfreebl3.chk libnssdbm3.chk; do - touch ${D}/${libdir}/$file - chmod 755 ${D}/${libdir}/$file - done - - install -d ${D}${libdir}/pkgconfig/ - sed 's/%NSS_VERSION%/${PV}/' ${WORKDIR}/nss.pc.in | sed 's/%NSPR_VERSION%/4.9.2/' > ${D}${libdir}/pkgconfig/nss.pc - sed -i s:OEPREFIX:${prefix}:g ${D}${libdir}/pkgconfig/nss.pc - sed -i s:OEEXECPREFIX:${exec_prefix}:g ${D}${libdir}/pkgconfig/nss.pc - sed -i s:OELIBDIR:${libdir}:g ${D}${libdir}/pkgconfig/nss.pc - sed -i s:OEINCDIR:${includedir}/nss3:g ${D}${libdir}/pkgconfig/nss.pc -} - -do_install:append:class-target() { - # It used to call certutil to create a blank certificate with empty password at - # build time, but the checksum of key4.db changes every time when certutil is called. - # It causes non-determinism issue, so provide databases with a blank certificate - # which are originally from output of nss in qemux86-64 build. You can get these - # databases by: - # certutil -N -d sql:/database/path/ --empty-password - install -d ${D}${sysconfdir}/pki/nssdb/ - install -m 0644 ${WORKDIR}/blank-cert9.db ${D}${sysconfdir}/pki/nssdb/cert9.db - install -m 0644 ${WORKDIR}/blank-key4.db ${D}${sysconfdir}/pki/nssdb/key4.db - install -m 0644 ${WORKDIR}/system-pkcs11.txt ${D}${sysconfdir}/pki/nssdb/pkcs11.txt -} - -PACKAGE_WRITE_DEPS += "nss-native" - -pkg_postinst:${PN} () { - for I in $D${libdir}/lib*.chk; do - DN=`dirname $I` - BN=`basename $I .chk` - FN=$DN/$BN.so - shlibsign -i $FN - if [ $? -ne 0 ]; then - echo "shlibsign -i $FN failed" - fi - done -} - -PACKAGES =+ "${PN}-smime" -FILES:${PN}-smime = "\ - ${bindir}/smime \ -" - -FILES:${PN} = "\ - ${sysconfdir} \ - ${bindir} \ - ${libdir}/lib*.chk \ - ${libdir}/lib*.so \ - " - -FILES:${PN}-dev = "\ - ${libdir}/nss \ - ${libdir}/pkgconfig/* \ - ${includedir}/* \ - " - -RDEPENDS:${PN}-smime = "perl" - -BBCLASSEXTEND = "native nativesdk" - -CVE_PRODUCT += "network_security_services" - -CVE_STATUS_GROUPS += "CVE_STATUS_NSS" -CVE_STATUS_NSS[status] = "not-applicable-config: This only affect the legacy db (libnssdbm), only compiled with --enable-legacy-db" -CVE_STATUS_NSS = "CVE-2017-11695 CVE-2017-11696 CVE-2017-11697 CVE-2017-11698" - -CVE_STATUS[CVE-2022-3479] = "not-applicable-config: vulnerability was introduced in 3.77 and fixed in 3.87" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/onig/onig_6.9.9.bb b/sources/meta-openembedded/meta-oe/recipes-support/onig/onig_6.9.9.bb index b29437db..414d9bfc 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/onig/onig_6.9.9.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/onig/onig_6.9.9.bb @@ -16,6 +16,9 @@ SRC_URI = "\ SRC_URI[sha256sum] = "60162bd3b9fc6f4886d4c7a07925ffd374167732f55dce8c491bfd9cd818a6cf" +UPSTREAM_CHECK_URI = "https://github.com/kkos/oniguruma/releases/" +UPSTREAM_CHECK_REGEX = "(?P\d+(\.\d+)+)" + BINCONFIG = "${bindir}/onig-config" inherit autotools binconfig-disabled ptest diff --git a/sources/meta-openembedded/meta-oe/recipes-support/openct/openct/0001-Fix-incompatible-pointer-type-error-with-gcc-option.patch b/sources/meta-openembedded/meta-oe/recipes-support/openct/openct/0001-Fix-incompatible-pointer-type-error-with-gcc-option.patch new file mode 100644 index 00000000..73c9d066 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/openct/openct/0001-Fix-incompatible-pointer-type-error-with-gcc-option.patch @@ -0,0 +1,65 @@ +From c4351058da555e1e6a2b4b15d913baee80f55865 Mon Sep 17 00:00:00 2001 +From: Wang Mingyu +Date: Thu, 27 Jun 2024 06:27:18 +0000 +Subject: Fix incompatible pointer type error with gcc option + -Wincompatible-pointer-types + +| ../../../openct-0.6.20/src/ifd/ifdhandler.c: In function 'ifdhandler_run': +| ../../../openct-0.6.20/src/ifd/ifdhandler.c:239:52: error: passing argument 2 of 'ifd_get_eventfd' from incompatible pointer type [-Wincompatible-pointer-types] +| 239 | sock->fd = ifd_get_eventfd(reader, &sock->events); +| | ^~~~~~~~~~~~~ +| | | +| | int * +| In file included from ../../../openct-0.6.20/src/ifd/internal.h:17, +| from ../../../openct-0.6.20/src/ifd/ifdhandler.c:7: +| ../../../openct-0.6.20/src/include/openct/ifd.h:182:65: note: expected 'short int *' but argument is of type 'int *' +| 182 | extern int ifd_get_eventfd(ifd_reader_t *, short *); +| | ^~~~~~~ + +| ../../../openct-0.6.20/src/ifd/process.c: In function 'do_memory_write': +| ../../../openct-0.6.20/src/ifd/process.c:461:61: error: passing argument 4 of 'ct_tlv_get_opaque' from incompatible pointer type [-Wincompatible-pointer-types] +| 461 | || !ct_tlv_get_opaque(args, CT_TAG_DATA, &data, &data_len)) +| | ^~~~~~~~~ +| | | +| | unsigned int * +| In file included from ../../../openct-0.6.20/src/ifd/process.c:20: +| ../../../openct-0.6.20/src/include/openct/tlv.h:40:62: note: expected 'size_t *' {aka 'long unsigned int *'} but argument is of type 'unsigned int *' +| 40 | ifd_tag_t, unsigned char **, size_t *); + +Upstream-Status: Submitted + +Signed-off-by: Wang Mingyu +--- + src/ifd/ifdhandler.c | 2 +- + src/ifd/process.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/ifd/ifdhandler.c b/src/ifd/ifdhandler.c +index 12686c9..ebd1b53 100644 +--- a/src/ifd/ifdhandler.c ++++ b/src/ifd/ifdhandler.c +@@ -236,7 +236,7 @@ static void ifdhandler_run(ifd_reader_t * reader) + sock->fd = -1; + } + else { +- sock->fd = ifd_get_eventfd(reader, &sock->events); ++ sock->fd = ifd_get_eventfd(reader, (short int *)&sock->events); + } + if (sock->fd == -1) { + ifd_debug(1, "events inactive for reader %s", reader->name); +diff --git a/src/ifd/process.c b/src/ifd/process.c +index 4563bdf..7088a76 100644 +--- a/src/ifd/process.c ++++ b/src/ifd/process.c +@@ -458,7 +458,7 @@ static int do_memory_write(ifd_reader_t * reader, int unit, + return IFD_ERROR_INVALID_SLOT; + + if (ct_tlv_get_int(args, CT_TAG_ADDRESS, &address) == 0 +- || !ct_tlv_get_opaque(args, CT_TAG_DATA, &data, &data_len)) ++ || !ct_tlv_get_opaque(args, CT_TAG_DATA, &data, (size_t *)&data_len)) + return IFD_ERROR_MISSING_ARG; + + rc = ifd_card_write_memory(reader, unit, address, data, data_len); +-- +2.34.1 + diff --git a/sources/meta-openembedded/meta-oe/recipes-support/openct/openct_0.6.20.bb b/sources/meta-openembedded/meta-oe/recipes-support/openct/openct_0.6.20.bb index 4a1a0f56..bcff90c8 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/openct/openct_0.6.20.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/openct/openct_0.6.20.bb @@ -18,11 +18,14 @@ SRC_URI = " \ file://openct.init \ file://openct.sysconfig \ file://openct.service \ + file://0001-Fix-incompatible-pointer-type-error-with-gcc-option.patch \ " SRC_URI[md5sum] = "a1da3358ab798f1cb9232f1dbababc21" SRC_URI[sha256sum] = "6cd3e2933d29eb1f875c838ee58b8071fd61f0ec8ed5922a86c01c805d181a68" +UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/opensc/files/openct/" + LICENSE = "LGPL-2.0-or-later" LIC_FILES_CHKSUM = "file://LGPL-2.1;md5=2d5025d4aa3495befef8f17206a5b0a1" @@ -62,7 +65,7 @@ do_install () { install -d ${D}${sysconfdir} # fix up hardcoded paths sed -i -e 's,/etc/,${sysconfdir}/,' -e 's,/usr/sbin/,${sbindir}/,' \ - ${WORKDIR}/openct.service ${WORKDIR}/openct.init + ${UNPACKDIR}/openct.service ${UNPACKDIR}/openct.init oe_runmake install DESTDIR=${D} install -dm 755 ${D}${libdir}/ctapi/ @@ -70,11 +73,11 @@ do_install () { install -Dpm 644 etc/openct.udev ${D}${nonarch_libdir}/udev/rules.d/60-openct.rules install -pm 644 etc/openct.conf ${D}${sysconfdir}/openct.conf - install -Dpm 755 ${WORKDIR}/openct.init ${D}${sysconfdir}/init.d/openct - install -Dpm 644 ${WORKDIR}/openct.sysconfig ${D}${sysconfdir}/sysconfig/openct + install -Dpm 755 ${UNPACKDIR}/openct.init ${D}${sysconfdir}/init.d/openct + install -Dpm 644 ${UNPACKDIR}/openct.sysconfig ${D}${sysconfdir}/sysconfig/openct install -d ${D}${systemd_unitdir}/system - install -m 644 ${WORKDIR}/openct.service ${D}${systemd_unitdir}/system + install -m 644 ${UNPACKDIR}/openct.service ${D}${systemd_unitdir}/system so=$(find ${D} -name \*.so | sed "s|^${D}||") sed -i -e 's|\\(LIBPATH\\s*\\).*|\\1$so|' etc/reader.conf @@ -82,3 +85,8 @@ do_install () { } BBCLASSEXTEND = "native" + +# http://errors.yoctoproject.org/Errors/Details/766890/ +# openct-0.6.20/src/ifd/ifdhandler.c:239:52: error: passing argument 2 of 'ifd_get_eventfd' from incompatible pointer type [-Wincompatible-pointer-types] +# openct-0.6.20/src/ifd/process.c:461:61: error: passing argument 4 of 'ct_tlv_get_opaque' from incompatible pointer type [-Wincompatible-pointer-types] +CFLAGS += "-Wno-error=incompatible-pointer-types" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/opencv/opencv_4.10.0.bb b/sources/meta-openembedded/meta-oe/recipes-support/opencv/opencv_4.10.0.bb new file mode 100644 index 00000000..07bdb37b --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/opencv/opencv_4.10.0.bb @@ -0,0 +1,210 @@ +SUMMARY = "Opencv : The Open Computer Vision Library" +HOMEPAGE = "http://opencv.org/" +SECTION = "libs" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" + +ARM_INSTRUCTION_SET:armv4 = "arm" +ARM_INSTRUCTION_SET:armv5 = "arm" + +DEPENDS = "libtool swig-native bzip2 zlib glib-2.0 libwebp" + +SRCREV_opencv = "a7d942b681c5edd0cc27407d8e4d3dbf36c7a40e" +SRCREV_contrib = "1aab1f34815a58a5a63aee6d510fe234129754a2" +SRCREV_boostdesc = "34e4206aef44d50e6bbcd0ab06354b52e7466d26" +SRCREV_vgg = "fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d" +SRCREV_face = "8afa57abc8229d611c4937165d20e2a2d9fc5a12" +SRCREV_wechat-qrcode = "a8b69ccc738421293254aec5ddb38bd523503252" + + +SRCREV_FORMAT = "opencv_contrib_ipp_boostdesc_vgg" +SRC_URI = "git://github.com/opencv/opencv.git;name=opencv;branch=4.x;protocol=https \ + git://github.com/opencv/opencv_contrib.git;destsuffix=git/contrib;name=contrib;branch=4.x;protocol=https \ + git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_boostdesc_20161012;destsuffix=git/boostdesc;name=boostdesc;protocol=https \ + git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_vgg_20160317;destsuffix=git/vgg;name=vgg;protocol=https \ + git://github.com/opencv/opencv_3rdparty.git;branch=contrib_face_alignment_20170818;destsuffix=git/face;name=face;protocol=https \ + git://github.com/WeChatCV/opencv_3rdparty.git;branch=wechat_qrcode;destsuffix=git/wechat_qrcode;name=wechat-qrcode;protocol=https \ + file://0003-To-fix-errors-as-following.patch \ + file://0001-Temporarliy-work-around-deprecated-ffmpeg-RAW-functi.patch \ + file://0001-Dont-use-isystem.patch \ + file://download.patch \ + file://0001-Make-ts-module-external.patch \ + file://0008-Do-not-embed-build-directory-in-binaries.patch \ + " +SRC_URI:append:riscv64 = " file://0001-Use-Os-to-compile-tinyxml2.cpp.patch;patchdir=contrib" + +S = "${WORKDIR}/git" + +# OpenCV wants to download more files during configure. We download these in +# do_fetch and construct a source cache in the format it expects +OPENCV_DLDIR = "${WORKDIR}/downloads" + +do_unpack_extra() { + + md5() { + # Return the MD5 of $1 + echo $(md5sum $1 | cut -d' ' -f1) + } + cache() { + TAG=$1 + shift + mkdir --parents ${OPENCV_DLDIR}/$TAG + for F in $*; do + DEST=${OPENCV_DLDIR}/$TAG/$(md5 $F)-$(basename $F) + test -e $DEST || ln -s $F $DEST + done + } + cache xfeatures2d/boostdesc ${S}/boostdesc/*.i + cache xfeatures2d/vgg ${S}/vgg/*.i + cache data ${S}/face/*.dat + cache wechat_qrcode ${S}/wechat_qrcode/*.caffemodel + cache wechat_qrcode ${S}/wechat_qrcode/*.prototxt +} +addtask unpack_extra after do_unpack before do_patch + +CMAKE_VERBOSE = "VERBOSE=1" + +EXTRA_OECMAKE = "-DOPENCV_EXTRA_MODULES_PATH=${S}/contrib/modules \ + -DWITH_1394=OFF \ + -DENABLE_PRECOMPILED_HEADERS=OFF \ + -DCMAKE_SKIP_RPATH=ON \ + -DWITH_IPP=OFF \ + -DOPENCV_GENERATE_PKGCONFIG=ON \ + -DOPENCV_DOWNLOAD_PATH=${OPENCV_DLDIR} \ + -DOPENCV_ALLOW_DOWNLOADS=OFF \ + ${@bb.utils.contains("TARGET_CC_ARCH", "-msse3", "-DENABLE_SSE=1 -DENABLE_SSE2=1 -DENABLE_SSE3=1 -DENABLE_SSSE3=1", "", d)} \ + ${@bb.utils.contains("TARGET_CC_ARCH", "-msse4.1", "-DENABLE_SSE=1 -DENABLE_SSE2=1 -DENABLE_SSE3=1 -DENABLE_SSSE3=1 -DENABLE_SSE41=1", "", d)} \ + ${@bb.utils.contains("TARGET_CC_ARCH", "-msse4.2", "-DENABLE_SSE=1 -DENABLE_SSE2=1 -DENABLE_SSE3=1 -DENABLE_SSSE3=1 -DENABLE_SSE41=1 -DENABLE_SSE42=1", "", d)} \ +" +LDFLAGS:append:mips = " -Wl,--no-as-needed -latomic -Wl,--as-needed" +LDFLAGS:append:riscv32 = " -Wl,--no-as-needed -latomic -Wl,--as-needed" + +EXTRA_OECMAKE:append:x86 = " -DX86=ON" +# disable sse4.1 and sse4.2 to fix 32bit build failure +# https://github.com/opencv/opencv/issues/21597 +EXTRA_OECMAKE:remove:x86 = " -DENABLE_SSE41=1 -DENABLE_SSE42=1" + +PACKAGECONFIG ??= "gapi python3 eigen jpeg png tiff v4l libv4l gstreamer samples tbb gphoto2 \ + ${@bb.utils.contains_any('DISTRO_FEATURES', '${GTK3DISTROFEATURES}', 'gtk', '', d)} \ + ${@bb.utils.contains_any("LICENSE_FLAGS_ACCEPTED", "commercial_ffmpeg commercial", "libav", "", d)}" + +# TBB does not build for powerpc so disable that package config +PACKAGECONFIG:remove:powerpc = "tbb" +# tbb now needs getcontect/setcontext which is not there for all arches on musl +PACKAGECONFIG:remove:libc-musl:riscv64 = "tbb" +PACKAGECONFIG:remove:libc-musl:riscv32 = "tbb" + +PACKAGECONFIG[gapi] = "-DWITH_ADE=ON -Dade_DIR=${STAGING_LIBDIR},-DWITH_ADE=OFF,ade" +PACKAGECONFIG[amdblas] = "-DWITH_OPENCLAMDBLAS=ON,-DWITH_OPENCLAMDBLAS=OFF,libclamdblas," +PACKAGECONFIG[amdfft] = "-DWITH_OPENCLAMDFFT=ON,-DWITH_OPENCLAMDFFT=OFF,libclamdfft," +PACKAGECONFIG[dnn] = "-DBUILD_opencv_dnn=ON -DPROTOBUF_UPDATE_FILES=ON -DBUILD_PROTOBUF=OFF -DCMAKE_CXX_STANDARD=17,-DBUILD_opencv_dnn=OFF,protobuf protobuf-native," +PACKAGECONFIG[eigen] = "-DWITH_EIGEN=ON,-DWITH_EIGEN=OFF,libeigen gflags glog," +PACKAGECONFIG[freetype] = "-DBUILD_opencv_freetype=ON,-DBUILD_opencv_freetype=OFF,freetype," +PACKAGECONFIG[gphoto2] = "-DWITH_GPHOTO2=ON,-DWITH_GPHOTO2=OFF,libgphoto2," +PACKAGECONFIG[gstreamer] = "-DWITH_GSTREAMER=ON,-DWITH_GSTREAMER=OFF,gstreamer1.0 gstreamer1.0-plugins-base," +PACKAGECONFIG[gtk] = "-DWITH_GTK=ON,-DWITH_GTK=OFF,gtk+3," +PACKAGECONFIG[jasper] = "-DWITH_JASPER=ON,-DWITH_JASPER=OFF,jasper," +PACKAGECONFIG[java] = "-DJAVA_INCLUDE_PATH=${JAVA_HOME}/include -DJAVA_INCLUDE_PATH2=${JAVA_HOME}/include/linux -DJAVA_AWT_INCLUDE_PATH=${JAVA_HOME}/include -DJAVA_AWT_LIBRARY=${JAVA_HOME}/lib/amd64/libjawt.so -DJAVA_JVM_LIBRARY=${JAVA_HOME}/lib/amd64/server/libjvm.so,,ant-native fastjar-native openjdk-8-native," +PACKAGECONFIG[jpeg] = "-DWITH_JPEG=ON,-DWITH_JPEG=OFF,jpeg," +PACKAGECONFIG[libav] = "-DWITH_FFMPEG=ON,-DWITH_FFMPEG=OFF,libav," +PACKAGECONFIG[libv4l] = "-DWITH_LIBV4L=ON,-DWITH_LIBV4L=OFF,v4l-utils," +PACKAGECONFIG[opencl] = "-DWITH_OPENCL=ON,-DWITH_OPENCL=OFF,opencl-headers virtual/opencl-icd," +PACKAGECONFIG[openvino] = "-DWITH_OPENVINO=ON,-DWITH_OPENVINO=OFF,openvino-inference-engine,openvino-inference-engine" +PACKAGECONFIG[oracle-java] = "-DJAVA_INCLUDE_PATH=${ORACLE_JAVA_HOME}/include -DJAVA_INCLUDE_PATH2=${ORACLE_JAVA_HOME}/include/linux -DJAVA_AWT_INCLUDE_PATH=${ORACLE_JAVA_HOME}/include -DJAVA_AWT_LIBRARY=${ORACLE_JAVA_HOME}/lib/amd64/libjawt.so -DJAVA_JVM_LIBRARY=${ORACLE_JAVA_HOME}/lib/amd64/server/libjvm.so,,ant-native oracle-jse-jdk oracle-jse-jdk-native," +PACKAGECONFIG[png] = "-DWITH_PNG=ON,-DWITH_PNG=OFF,libpng," +PACKAGECONFIG[python3] = "-DPYTHON3_INCLUDE_PATH=${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI} -DPYTHON3_NUMPY_INCLUDE_DIRS:PATH=${STAGING_LIBDIR}/${PYTHON_DIR}/site-packages/numpy/core/include,,python3-numpy," +PACKAGECONFIG[samples] = "-DBUILD_EXAMPLES=ON -DINSTALL_PYTHON_EXAMPLES=ON,-DBUILD_EXAMPLES=OFF,," +PACKAGECONFIG[tbb] = "-DWITH_TBB=ON,-DWITH_TBB=OFF,tbb," +PACKAGECONFIG[tests] = "-DBUILD_TESTS=ON,-DBUILD_TESTS=OFF,," +PACKAGECONFIG[text] = "-DBUILD_opencv_text=ON,-DBUILD_opencv_text=OFF,tesseract," +PACKAGECONFIG[tiff] = "-DWITH_TIFF=ON,-DWITH_TIFF=OFF,tiff," +PACKAGECONFIG[v4l] = "-DWITH_V4L=ON,-DWITH_V4L=OFF,v4l-utils," + +inherit pkgconfig cmake setuptools3-base python3native + +export PYTHON_CSPEC="-I${STAGING_INCDIR}/${PYTHON_DIR}" +export ORACLE_JAVA_HOME="${STAGING_DIR_NATIVE}/usr/bin/java" +export JAVA_HOME="${STAGING_DIR_NATIVE}/usr/lib/jvm/openjdk-8-native" +export ANT_DIR="${STAGING_DIR_NATIVE}/usr/share/ant/" + +TARGET_CC_ARCH += "-I${S}/include " + +PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'samples', '${PN}-samples', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'oracle-java', '${PN}-java', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'java', '${PN}-java', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3-${BPN}', '', d)} \ + ${PN}-apps" + +python populate_packages:prepend () { + cv_libdir = d.expand('${libdir}') + do_split_packages(d, cv_libdir, r'^lib(.*)\.so$', 'lib%s-dev', 'OpenCV %s development package', extra_depends='${PN}-dev', allow_links=True) + do_split_packages(d, cv_libdir, r'^lib(.*)\.la$', 'lib%s-dev', 'OpenCV %s development package', extra_depends='${PN}-dev') + do_split_packages(d, cv_libdir, r'^lib(.*)\.a$', 'lib%s-dev', 'OpenCV %s development package', extra_depends='${PN}-dev') + do_split_packages(d, cv_libdir, r'^lib(.*)\.so\.*', 'lib%s', 'OpenCV %s library', extra_depends='', allow_links=True) + + pn = d.getVar('PN') + metapkg = pn + '-dev' + d.setVar('ALLOW_EMPTY:' + metapkg, "1") + blacklist = [ metapkg ] + metapkg_rdepends = [ ] + packages = d.getVar('PACKAGES').split() + for pkg in packages[1:]: + if not pkg in blacklist and not pkg in metapkg_rdepends and pkg.endswith('-dev'): + metapkg_rdepends.append(pkg) + d.setVar('RRECOMMENDS:' + metapkg, ' '.join(metapkg_rdepends)) + + metapkg = pn + d.setVar('ALLOW_EMPTY:' + metapkg, "1") + blacklist = [ metapkg ] + metapkg_rdepends = [ ] + for pkg in packages[1:]: + if not pkg in blacklist and not pkg in metapkg_rdepends and not pkg.endswith('-dev') and not pkg.endswith('-dbg') and not pkg.endswith('-doc') and not pkg.endswith('-locale') and not pkg.endswith('-staticdev'): + metapkg_rdepends.append(pkg) + d.setVar('RDEPENDS:' + metapkg, ' '.join(metapkg_rdepends)) +} + +PACKAGES_DYNAMIC += "^libopencv-.*" + +FILES:${PN} = "" +FILES:${PN}-dbg += "${datadir}/OpenCV/java/.debug/* ${datadir}/OpenCV/samples/bin/.debug/*" +FILES:${PN}-dev = "${includedir} ${libdir}/pkgconfig ${libdir}/cmake/opencv4/*.cmake" +FILES:${PN}-staticdev += "${libdir}/opencv4/3rdparty/*.a" +FILES:${PN}-apps = "${bindir}/* ${datadir}/opencv4 ${datadir}/licenses" +FILES:${PN}-java = "${datadir}/OpenCV/java" +FILES:${PN}-samples = "${datadir}/opencv4/samples/" + +INSANE_SKIP:${PN}-java = "libdir" +INSANE_SKIP:${PN}-dbg = "libdir" + +ALLOW_EMPTY:${PN} = "1" + +SUMMARY:python3-opencv = "Python bindings to opencv" +FILES:python3-opencv = "${PYTHON_SITEPACKAGES_DIR}/*" +RDEPENDS:python3-opencv = "python3-core python3-numpy" + +RDEPENDS:${PN}-apps = "bash" + +do_compile:prepend() { + # remove the build host info to improve reproducibility + if [ -f ${WORKDIR}/build/modules/core/version_string.inc ]; then + sed -i "s#${WORKDIR}#/workdir#g" ${WORKDIR}/build/modules/core/version_string.inc + fi +} + +do_install:append() { + # Move Python files into correct library folder (for multilib build) + if [ "$libdir" != "/usr/lib" -a -d ${D}/usr/lib ]; then + mv ${D}/usr/lib/* ${D}/${libdir}/ + rm -rf ${D}/usr/lib + fi + # remove build host path to improve reproducibility + if [ -f ${D}${libdir}/cmake/opencv4/OpenCVModules.cmake ]; then + sed -e 's@${STAGING_DIR_HOST}@@g' \ + -i ${D}${libdir}/cmake/opencv4/OpenCVModules.cmake + fi + # remove setup_vars_opencv4.sh as its content is confusing and useless + if [ -f ${D}${bindir}/setup_vars_opencv4.sh ]; then + rm -rf ${D}${bindir}/setup_vars_opencv4.sh + fi +} diff --git a/sources/meta-openembedded/meta-oe/recipes-support/opencv/opencv_4.9.0.bb b/sources/meta-openembedded/meta-oe/recipes-support/opencv/opencv_4.9.0.bb deleted file mode 100644 index cf836d3e..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/opencv/opencv_4.9.0.bb +++ /dev/null @@ -1,210 +0,0 @@ -SUMMARY = "Opencv : The Open Computer Vision Library" -HOMEPAGE = "http://opencv.org/" -SECTION = "libs" - -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" - -ARM_INSTRUCTION_SET:armv4 = "arm" -ARM_INSTRUCTION_SET:armv5 = "arm" - -DEPENDS = "libtool swig-native bzip2 zlib glib-2.0 libwebp" - -SRCREV_opencv = "dad8af6b17f8e60d7b95a1203a1b4d22f56574cf" -SRCREV_contrib = "c7602a8f74205e44389bd6a4e8d727d32e7e27b4" -SRCREV_boostdesc = "34e4206aef44d50e6bbcd0ab06354b52e7466d26" -SRCREV_vgg = "fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d" -SRCREV_face = "8afa57abc8229d611c4937165d20e2a2d9fc5a12" -SRCREV_wechat-qrcode = "a8b69ccc738421293254aec5ddb38bd523503252" - - -SRCREV_FORMAT = "opencv_contrib_ipp_boostdesc_vgg" -SRC_URI = "git://github.com/opencv/opencv.git;name=opencv;branch=4.x;protocol=https \ - git://github.com/opencv/opencv_contrib.git;destsuffix=git/contrib;name=contrib;branch=4.x;protocol=https \ - git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_boostdesc_20161012;destsuffix=git/boostdesc;name=boostdesc;protocol=https \ - git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_vgg_20160317;destsuffix=git/vgg;name=vgg;protocol=https \ - git://github.com/opencv/opencv_3rdparty.git;branch=contrib_face_alignment_20170818;destsuffix=git/face;name=face;protocol=https \ - git://github.com/WeChatCV/opencv_3rdparty.git;branch=wechat_qrcode;destsuffix=git/wechat_qrcode;name=wechat-qrcode;protocol=https \ - file://0003-To-fix-errors-as-following.patch \ - file://0001-Temporarliy-work-around-deprecated-ffmpeg-RAW-functi.patch \ - file://0001-Dont-use-isystem.patch \ - file://download.patch \ - file://0001-Make-ts-module-external.patch \ - file://0008-Do-not-embed-build-directory-in-binaries.patch \ - " -SRC_URI:append:riscv64 = " file://0001-Use-Os-to-compile-tinyxml2.cpp.patch;patchdir=contrib" - -S = "${WORKDIR}/git" - -# OpenCV wants to download more files during configure. We download these in -# do_fetch and construct a source cache in the format it expects -OPENCV_DLDIR = "${WORKDIR}/downloads" - -do_unpack_extra() { - - md5() { - # Return the MD5 of $1 - echo $(md5sum $1 | cut -d' ' -f1) - } - cache() { - TAG=$1 - shift - mkdir --parents ${OPENCV_DLDIR}/$TAG - for F in $*; do - DEST=${OPENCV_DLDIR}/$TAG/$(md5 $F)-$(basename $F) - test -e $DEST || ln -s $F $DEST - done - } - cache xfeatures2d/boostdesc ${S}/boostdesc/*.i - cache xfeatures2d/vgg ${S}/vgg/*.i - cache data ${S}/face/*.dat - cache wechat_qrcode ${S}/wechat_qrcode/*.caffemodel - cache wechat_qrcode ${S}/wechat_qrcode/*.prototxt -} -addtask unpack_extra after do_unpack before do_patch - -CMAKE_VERBOSE = "VERBOSE=1" - -EXTRA_OECMAKE = "-DOPENCV_EXTRA_MODULES_PATH=${S}/contrib/modules \ - -DWITH_1394=OFF \ - -DENABLE_PRECOMPILED_HEADERS=OFF \ - -DCMAKE_SKIP_RPATH=ON \ - -DWITH_IPP=OFF \ - -DOPENCV_GENERATE_PKGCONFIG=ON \ - -DOPENCV_DOWNLOAD_PATH=${OPENCV_DLDIR} \ - -DOPENCV_ALLOW_DOWNLOADS=OFF \ - ${@bb.utils.contains("TARGET_CC_ARCH", "-msse3", "-DENABLE_SSE=1 -DENABLE_SSE2=1 -DENABLE_SSE3=1 -DENABLE_SSSE3=1", "", d)} \ - ${@bb.utils.contains("TARGET_CC_ARCH", "-msse4.1", "-DENABLE_SSE=1 -DENABLE_SSE2=1 -DENABLE_SSE3=1 -DENABLE_SSSE3=1 -DENABLE_SSE41=1", "", d)} \ - ${@bb.utils.contains("TARGET_CC_ARCH", "-msse4.2", "-DENABLE_SSE=1 -DENABLE_SSE2=1 -DENABLE_SSE3=1 -DENABLE_SSSE3=1 -DENABLE_SSE41=1 -DENABLE_SSE42=1", "", d)} \ -" -LDFLAGS:append:mips = " -Wl,--no-as-needed -latomic -Wl,--as-needed" -LDFLAGS:append:riscv32 = " -Wl,--no-as-needed -latomic -Wl,--as-needed" - -EXTRA_OECMAKE:append:x86 = " -DX86=ON" -# disable sse4.1 and sse4.2 to fix 32bit build failure -# https://github.com/opencv/opencv/issues/21597 -EXTRA_OECMAKE:remove:x86 = " -DENABLE_SSE41=1 -DENABLE_SSE42=1" - -PACKAGECONFIG ??= "gapi python3 eigen jpeg png tiff v4l libv4l gstreamer samples tbb gphoto2 \ - ${@bb.utils.contains("DISTRO_FEATURES", "x11", "gtk", "", d)} \ - ${@bb.utils.contains_any("LICENSE_FLAGS_ACCEPTED", "commercial_ffmpeg commercial", "libav", "", d)}" - -# TBB does not build for powerpc so disable that package config -PACKAGECONFIG:remove:powerpc = "tbb" -# tbb now needs getcontect/setcontext which is not there for all arches on musl -PACKAGECONFIG:remove:libc-musl:riscv64 = "tbb" -PACKAGECONFIG:remove:libc-musl:riscv32 = "tbb" - -PACKAGECONFIG[gapi] = "-DWITH_ADE=ON -Dade_DIR=${STAGING_LIBDIR},-DWITH_ADE=OFF,ade" -PACKAGECONFIG[amdblas] = "-DWITH_OPENCLAMDBLAS=ON,-DWITH_OPENCLAMDBLAS=OFF,libclamdblas," -PACKAGECONFIG[amdfft] = "-DWITH_OPENCLAMDFFT=ON,-DWITH_OPENCLAMDFFT=OFF,libclamdfft," -PACKAGECONFIG[dnn] = "-DBUILD_opencv_dnn=ON -DPROTOBUF_UPDATE_FILES=ON -DBUILD_PROTOBUF=OFF -DCMAKE_CXX_STANDARD=17,-DBUILD_opencv_dnn=OFF,protobuf protobuf-native," -PACKAGECONFIG[eigen] = "-DWITH_EIGEN=ON,-DWITH_EIGEN=OFF,libeigen gflags glog," -PACKAGECONFIG[freetype] = "-DBUILD_opencv_freetype=ON,-DBUILD_opencv_freetype=OFF,freetype," -PACKAGECONFIG[gphoto2] = "-DWITH_GPHOTO2=ON,-DWITH_GPHOTO2=OFF,libgphoto2," -PACKAGECONFIG[gstreamer] = "-DWITH_GSTREAMER=ON,-DWITH_GSTREAMER=OFF,gstreamer1.0 gstreamer1.0-plugins-base," -PACKAGECONFIG[gtk] = "-DWITH_GTK=ON,-DWITH_GTK=OFF,gtk+3," -PACKAGECONFIG[jasper] = "-DWITH_JASPER=ON,-DWITH_JASPER=OFF,jasper," -PACKAGECONFIG[java] = "-DJAVA_INCLUDE_PATH=${JAVA_HOME}/include -DJAVA_INCLUDE_PATH2=${JAVA_HOME}/include/linux -DJAVA_AWT_INCLUDE_PATH=${JAVA_HOME}/include -DJAVA_AWT_LIBRARY=${JAVA_HOME}/lib/amd64/libjawt.so -DJAVA_JVM_LIBRARY=${JAVA_HOME}/lib/amd64/server/libjvm.so,,ant-native fastjar-native openjdk-8-native," -PACKAGECONFIG[jpeg] = "-DWITH_JPEG=ON,-DWITH_JPEG=OFF,jpeg," -PACKAGECONFIG[libav] = "-DWITH_FFMPEG=ON,-DWITH_FFMPEG=OFF,libav," -PACKAGECONFIG[libv4l] = "-DWITH_LIBV4L=ON,-DWITH_LIBV4L=OFF,v4l-utils," -PACKAGECONFIG[opencl] = "-DWITH_OPENCL=ON,-DWITH_OPENCL=OFF,opencl-headers virtual/opencl-icd," -PACKAGECONFIG[openvino] = "-DWITH_OPENVINO=ON,-DWITH_OPENVINO=OFF,openvino-inference-engine,openvino-inference-engine" -PACKAGECONFIG[oracle-java] = "-DJAVA_INCLUDE_PATH=${ORACLE_JAVA_HOME}/include -DJAVA_INCLUDE_PATH2=${ORACLE_JAVA_HOME}/include/linux -DJAVA_AWT_INCLUDE_PATH=${ORACLE_JAVA_HOME}/include -DJAVA_AWT_LIBRARY=${ORACLE_JAVA_HOME}/lib/amd64/libjawt.so -DJAVA_JVM_LIBRARY=${ORACLE_JAVA_HOME}/lib/amd64/server/libjvm.so,,ant-native oracle-jse-jdk oracle-jse-jdk-native," -PACKAGECONFIG[png] = "-DWITH_PNG=ON,-DWITH_PNG=OFF,libpng," -PACKAGECONFIG[python3] = "-DPYTHON3_INCLUDE_PATH=${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI} -DPYTHON3_NUMPY_INCLUDE_DIRS:PATH=${STAGING_LIBDIR}/${PYTHON_DIR}/site-packages/numpy/core/include,,python3-numpy," -PACKAGECONFIG[samples] = "-DBUILD_EXAMPLES=ON -DINSTALL_PYTHON_EXAMPLES=ON,-DBUILD_EXAMPLES=OFF,," -PACKAGECONFIG[tbb] = "-DWITH_TBB=ON,-DWITH_TBB=OFF,tbb," -PACKAGECONFIG[tests] = "-DBUILD_TESTS=ON,-DBUILD_TESTS=OFF,," -PACKAGECONFIG[text] = "-DBUILD_opencv_text=ON,-DBUILD_opencv_text=OFF,tesseract," -PACKAGECONFIG[tiff] = "-DWITH_TIFF=ON,-DWITH_TIFF=OFF,tiff," -PACKAGECONFIG[v4l] = "-DWITH_V4L=ON,-DWITH_V4L=OFF,v4l-utils," - -inherit pkgconfig cmake setuptools3-base python3native - -export PYTHON_CSPEC="-I${STAGING_INCDIR}/${PYTHON_DIR}" -export ORACLE_JAVA_HOME="${STAGING_DIR_NATIVE}/usr/bin/java" -export JAVA_HOME="${STAGING_DIR_NATIVE}/usr/lib/jvm/openjdk-8-native" -export ANT_DIR="${STAGING_DIR_NATIVE}/usr/share/ant/" - -TARGET_CC_ARCH += "-I${S}/include " - -PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'samples', '${PN}-samples', '', d)} \ - ${@bb.utils.contains('PACKAGECONFIG', 'oracle-java', '${PN}-java', '', d)} \ - ${@bb.utils.contains('PACKAGECONFIG', 'java', '${PN}-java', '', d)} \ - ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3-${BPN}', '', d)} \ - ${PN}-apps" - -python populate_packages:prepend () { - cv_libdir = d.expand('${libdir}') - do_split_packages(d, cv_libdir, r'^lib(.*)\.so$', 'lib%s-dev', 'OpenCV %s development package', extra_depends='${PN}-dev', allow_links=True) - do_split_packages(d, cv_libdir, r'^lib(.*)\.la$', 'lib%s-dev', 'OpenCV %s development package', extra_depends='${PN}-dev') - do_split_packages(d, cv_libdir, r'^lib(.*)\.a$', 'lib%s-dev', 'OpenCV %s development package', extra_depends='${PN}-dev') - do_split_packages(d, cv_libdir, r'^lib(.*)\.so\.*', 'lib%s', 'OpenCV %s library', extra_depends='', allow_links=True) - - pn = d.getVar('PN') - metapkg = pn + '-dev' - d.setVar('ALLOW_EMPTY:' + metapkg, "1") - blacklist = [ metapkg ] - metapkg_rdepends = [ ] - packages = d.getVar('PACKAGES').split() - for pkg in packages[1:]: - if not pkg in blacklist and not pkg in metapkg_rdepends and pkg.endswith('-dev'): - metapkg_rdepends.append(pkg) - d.setVar('RRECOMMENDS:' + metapkg, ' '.join(metapkg_rdepends)) - - metapkg = pn - d.setVar('ALLOW_EMPTY:' + metapkg, "1") - blacklist = [ metapkg ] - metapkg_rdepends = [ ] - for pkg in packages[1:]: - if not pkg in blacklist and not pkg in metapkg_rdepends and not pkg.endswith('-dev') and not pkg.endswith('-dbg') and not pkg.endswith('-doc') and not pkg.endswith('-locale') and not pkg.endswith('-staticdev'): - metapkg_rdepends.append(pkg) - d.setVar('RDEPENDS:' + metapkg, ' '.join(metapkg_rdepends)) -} - -PACKAGES_DYNAMIC += "^libopencv-.*" - -FILES:${PN} = "" -FILES:${PN}-dbg += "${datadir}/OpenCV/java/.debug/* ${datadir}/OpenCV/samples/bin/.debug/*" -FILES:${PN}-dev = "${includedir} ${libdir}/pkgconfig ${libdir}/cmake/opencv4/*.cmake" -FILES:${PN}-staticdev += "${libdir}/opencv4/3rdparty/*.a" -FILES:${PN}-apps = "${bindir}/* ${datadir}/opencv4 ${datadir}/licenses" -FILES:${PN}-java = "${datadir}/OpenCV/java" -FILES:${PN}-samples = "${datadir}/opencv4/samples/" - -INSANE_SKIP:${PN}-java = "libdir" -INSANE_SKIP:${PN}-dbg = "libdir" - -ALLOW_EMPTY:${PN} = "1" - -SUMMARY:python3-opencv = "Python bindings to opencv" -FILES:python3-opencv = "${PYTHON_SITEPACKAGES_DIR}/*" -RDEPENDS:python3-opencv = "python3-core python3-numpy" - -RDEPENDS:${PN}-apps = "bash" - -do_compile:prepend() { - # remove the build host info to improve reproducibility - if [ -f ${WORKDIR}/build/modules/core/version_string.inc ]; then - sed -i "s#${WORKDIR}#/workdir#g" ${WORKDIR}/build/modules/core/version_string.inc - fi -} - -do_install:append() { - # Move Python files into correct library folder (for multilib build) - if [ "$libdir" != "/usr/lib" -a -d ${D}/usr/lib ]; then - mv ${D}/usr/lib/* ${D}/${libdir}/ - rm -rf ${D}/usr/lib - fi - # remove build host path to improve reproducibility - if [ -f ${D}${libdir}/cmake/opencv4/OpenCVModules.cmake ]; then - sed -e 's@${STAGING_DIR_HOST}@@g' \ - -i ${D}${libdir}/cmake/opencv4/OpenCVModules.cmake - fi - # remove setup_vars_opencv4.sh as its content is confusing and useless - if [ -f ${D}${bindir}/setup_vars_opencv4.sh ]; then - rm -rf ${D}${bindir}/setup_vars_opencv4.sh - fi -} diff --git a/sources/meta-openembedded/meta-oe/recipes-support/openldap/openldap/0001-fix-incompatible-pointer-type-error.patch b/sources/meta-openembedded/meta-oe/recipes-support/openldap/openldap/0001-fix-incompatible-pointer-type-error.patch new file mode 100644 index 00000000..e6ab4e5a --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/openldap/openldap/0001-fix-incompatible-pointer-type-error.patch @@ -0,0 +1,40 @@ +From 634017950c1c920d0de63fffa5c52e621de1d603 Mon Sep 17 00:00:00 2001 +From: Wang Mingyu +Date: Wed, 26 Jun 2024 07:41:01 +0000 +Subject: Fix incompatible pointer type error with gcc option + -Wincompatible-pointer-types + +lib32-openldap do_compile failure with gcc-14: +| tls_g.c:971:57: error: passing argument 4 of 'gnutls_fingerprint' from incompatible pointer type [-Wincompatible-pointer-types] +| 971 | keyhash.bv_val, &keyhash.bv_len ) < 0 ) { +| | ^~~~~~~~~~~~~~~ +| | | +| | ber_len_t * {aka long unsigned int *} +| In file included from tls_g.c:44: +| /usr/include/gnutls/gnutls.h:2406:32: note: expected 'size_t *' {aka 'unsigned int *'} but argument is of type 'ber_len_t *' {aka 'long unsigned int *'} +| 2406 | size_t *result_size); +| | ^~~ + +Upstream-Status: Submitted + +Signed-off-by: Wang Mingyu +--- + libraries/libldap/tls_g.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libraries/libldap/tls_g.c b/libraries/libldap/tls_g.c +index 7c23875..b4b487d 100644 +--- a/libraries/libldap/tls_g.c ++++ b/libraries/libldap/tls_g.c +@@ -968,7 +968,7 @@ tlsg_session_pinning( LDAP *ld, tls_session *sess, char *hashalg, struct berval + keyhash.bv_len = gnutls_hash_get_len( alg ); + keyhash.bv_val = LDAP_MALLOC( keyhash.bv_len ); + if ( !keyhash.bv_val || gnutls_fingerprint( alg, &key, +- keyhash.bv_val, &keyhash.bv_len ) < 0 ) { ++ keyhash.bv_val, (size_t *)&keyhash.bv_len ) < 0 ) { + goto done; + } + } else { +-- +2.34.1 + diff --git a/sources/meta-openembedded/meta-oe/recipes-support/openldap/openldap_2.6.7.bb b/sources/meta-openembedded/meta-oe/recipes-support/openldap/openldap_2.6.7.bb deleted file mode 100644 index e807fdef..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/openldap/openldap_2.6.7.bb +++ /dev/null @@ -1,231 +0,0 @@ -SUMMARY = "OpenLDAP Directory Service" -DESCRIPTION = "OpenLDAP Software is an open source implementation of the Lightweight Directory Access Protocol." -HOMEPAGE = "http://www.OpenLDAP.org/license.html" -# The OpenLDAP Public License - see the HOMEPAGE - defines -# the license. www.openldap.org claims this is Open Source -# (see http://www.openldap.org), the license appears to be -# basically BSD. opensource.org does not record this license -# at present (so it is apparently not OSI certified). -LICENSE = "OpenLDAP" -LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=beceb5ac7100b6430640c61655b25c1f \ - file://LICENSE;md5=153d07ef052c4a37a8fac23bc6031972 \ - " -SECTION = "libs" - -LDAP_VER = "${@'.'.join(d.getVar('PV').split('.')[0:2])}" - -SRC_URI = "http://www.openldap.org/software/download/OpenLDAP/openldap-release/${BP}.tgz \ - file://initscript \ - file://slapd.service \ - file://remove-user-host-pwd-from-version.patch \ - file://0001-build-top.mk-unset-STRIP_OPTS.patch \ -" - -SRC_URI[sha256sum] = "cd775f625c944ed78a3da18a03b03b08eea73c8aabc97b41bb336e9a10954930" - -DEPENDS = "util-linux groff-native" - -inherit autotools-brokensep update-rc.d systemd pkgconfig - -# CV SETTINGS -# Required to work round AC_FUNC_MEMCMP which gets the wrong answer -# when cross compiling (should be in site?) -EXTRA_OECONF += "ac_cv_func_memcmp_working=yes" - -# CONFIG DEFINITIONS -# The following is necessary because it cannot be determined for a -# cross compile automagically. Select should yield fine on all OE -# systems... -EXTRA_OECONF += "--with-yielding-select=yes" -# Shared libraries are nice... -EXTRA_OECONF += "--enable-dynamic" - -PACKAGECONFIG ??= "asyncmeta gnutls modules \ - mdb ldap meta null passwd proxycache dnssrv \ - ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \ -" -#--with-tls with TLS/SSL support auto|openssl|gnutls [auto] -PACKAGECONFIG[gnutls] = "--with-tls=gnutls,,gnutls" -PACKAGECONFIG[openssl] = "--with-tls=openssl,,openssl" - -PACKAGECONFIG[sasl] = "--with-cyrus-sasl,--without-cyrus-sasl,cyrus-sasl" -PACKAGECONFIG[modules] = "lt_cv_dlopen_self=yes --enable-modules,--disable-modules,libtool" -PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6" - -# SLAPD options -# -# UNIX crypt(3) passwd support: -EXTRA_OECONF += "--enable-crypt" - -# SLAPD BACKEND -# -# The backend must be set by the configuration. This controls the -# required database. -# -# Backends="asyncmeta dnssrv ldap mdb meta null passwd perl relay sock sql wt" -# -# Note that multiple backends can be built. The ldbm backend requires a -# build-time choice of database API. To use the gdbm (or other) API the -# Berkely database module must be removed from the build. -md = "${libexecdir}/openldap" -# - -#--enable-asyncmeta enable asyncmeta backend no|yes|mod no -PACKAGECONFIG[asyncmeta] = "--enable-asyncmeta=mod,--enable-asyncmeta=no" - -#--enable-dnssrv enable dnssrv backend no|yes|mod no -PACKAGECONFIG[dnssrv] = "--enable-dnssrv=mod,--enable-dnssrv=no" - -#--enable-ldap enable ldap backend no|yes|mod no -PACKAGECONFIG[ldap] = "--enable-ldap=mod,--enable-ldap=no," - -#--enable-mdb enable mdb database backend no|yes|mod [yes] -PACKAGECONFIG[mdb] = "--enable-mdb=yes,--enable-mdb=no," - -#--enable-meta enable metadirectory backend no|yes|mod no -PACKAGECONFIG[meta] = "--enable-meta=mod,--enable-meta=no," - -#--enable-null enable null backend no|yes|mod no -PACKAGECONFIG[null] = "--enable-null=mod,--enable-null=no," - -#--enable-passwd enable passwd backend no|yes|mod no -PACKAGECONFIG[passwd] = "--enable-passwd=mod,--enable-passwd=no," - -#--enable-perl enable perl backend no|yes|mod no -# This requires a loadable perl dynamic library, if enabled without -# doing something appropriate (building perl?) the build will pick -# up the build machine perl - not good (inherit perlnative?) -PACKAGECONFIG[perl] = "--enable-perl=mod,--enable-perl=no,perl" - -#--enable-relay enable relay backend no|yes|mod [yes] -PACKAGECONFIG[relay] = "--enable-relay=mod,--enable-relay=no," - -#--enable-sock enable sock backend no|yes|mod [no] -PACKAGECONFIG[sock] = "--enable-sock=mod,--enable-sock=no," - -#--enable-sql enable sql backend no|yes|mod no -# sql requires some sql backend which provides sql.h, sqlite* provides -# sqlite.h (which may be compatible but hasn't been tried.) -PACKAGECONFIG[sql] = "--enable-sql=mod,--enable-sql=no,sqlite3" - -#--enable-wt enable wt backend no|yes|mod no -# back-wt is marked currently as experimental -PACKAGECONFIG[wt] = "--enable-wt=mod,--enable-wt=no" - -#--enable-dyngroup Dynamic Group overlay no|yes|mod no -# This is a demo, Proxy Cache defines init_module which conflicts with the -# same symbol in dyngroup -PACKAGECONFIG[dyngroup] = "--enable-dyngroup=mod,--enable-dyngroup=no," - -#--enable-proxycache Proxy Cache overlay no|yes|mod no -PACKAGECONFIG[proxycache] = "--enable-proxycache=mod,--enable-proxycache=no," -FILES:${PN}-overlay-proxycache = "${md}/pcache.so.*" -PACKAGES += "${PN}-overlay-proxycache" - -# Append URANDOM_DEVICE='/dev/urandom' to CPPFLAGS: -# This allows tls to obtain random bits from /dev/urandom, by default -# it was disabled for cross-compiling. -CPPFLAGS:append = " -D_GNU_SOURCE -DURANDOM_DEVICE=\\"/dev/urandom\\" -fPIC" - -LDFLAGS:append = " -pthread" - -do_configure() { - rm -f ${S}/libtool - aclocal - libtoolize --force --copy - gnu-configize - cp ${STAGING_DATADIR_NATIVE}/libtool/build-aux/ltmain.sh ${S}/build - cp ${STAGING_DATADIR_NATIVE}/libtool/build-aux/missing ${S}/build - cp ${STAGING_DATADIR_NATIVE}/libtool/build-aux/compile ${S}/build - autoconf - oe_runconf -} - -LEAD_SONAME = "libldap-${LDAP_VER}.so.*" - -# The executables go in a separate package. This allows the -# installation of the libraries with no daemon support. -# Each module also has its own package - see above. -PACKAGES += "${PN}-slapd ${PN}-slurpd ${PN}-bin" - -# Package contents - shift most standard contents to -bin -FILES:${PN} = "${libdir}/lib*.so.* ${sysconfdir}/openldap/ldap.* ${localstatedir}/${BPN}/data" -FILES:${PN}-slapd = "${sysconfdir}/init.d ${libexecdir}/slapd ${sbindir} ${localstatedir}/run ${localstatedir}/volatile/run \ - ${sysconfdir}/openldap/slapd.* ${sysconfdir}/openldap/schema \ - ${sysconfdir}/openldap/DB_CONFIG.example ${systemd_unitdir}/system/*" -FILES:${PN}-slurpd = "${libexecdir}/slurpd ${localstatedir}/openldap-slurp" -FILES:${PN}-bin = "${bindir}" -FILES:${PN}-dev = "${includedir} ${libdir}/lib*.so ${libdir}/*.la ${libexecdir}/openldap/*.a ${libexecdir}/openldap/*.la ${libexecdir}/openldap/*.so ${libdir}/pkgconfig/*.pc" -FILES:${PN}-dbg += "${libexecdir}/openldap/.debug" - -do_install:append() { - install -d ${D}${sysconfdir}/init.d - cat ${WORKDIR}/initscript > ${D}${sysconfdir}/init.d/openldap - chmod 755 ${D}${sysconfdir}/init.d/openldap - # This is duplicated in /etc/openldap and is for slapd - rm -f ${D}${localstatedir}/openldap-data/DB_CONFIG.example - - # Installing slapd under ${sbin} is more FHS and LSB compliance - mv ${D}${libexecdir}/slapd ${D}/${sbindir}/slapd - rmdir --ignore-fail-on-non-empty ${D}${libexecdir} - SLAPTOOLS="slapadd slapcat slapdn slapindex slappasswd slaptest slapauth slapacl slapschema slapmodify" - cd ${D}/${sbindir}/ - rm -f ${SLAPTOOLS} - for i in ${SLAPTOOLS}; do ln -sf slapd $i; done - - rmdir "${D}${localstatedir}/run" - rmdir --ignore-fail-on-non-empty "${D}${localstatedir}" - - install -d ${D}${systemd_unitdir}/system/ - install -m 0644 ${WORKDIR}/slapd.service ${D}${systemd_unitdir}/system/ - sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/*.service - - # Uses mdm as the database - # and localstatedir as data directory ... - sed -e 's/# modulepath/modulepath/' \ - -e 's/# moduleload\s*back_bdb.*/moduleload back_mdb/' \ - -e 's/database\s*bdb/database mdb/' \ - -e 's%^directory\s*.*%directory ${localstatedir}/${BPN}/data/%' \ - -i ${D}${sysconfdir}/openldap/slapd.conf - - mkdir -p ${D}${localstatedir}/${BPN}/data -} - -INITSCRIPT_PACKAGES = "${PN}-slapd" -INITSCRIPT_NAME:${PN}-slapd = "openldap" -INITSCRIPT_PARAMS:${PN}-slapd = "defaults" -SYSTEMD_PACKAGES = "${PN}-slapd" -SYSTEMD_SERVICE:${PN}-slapd = "slapd.service" -SYSTEMD_AUTO_ENABLE:${PN}-slapd ?= "disable" - -PACKAGES_DYNAMIC += "^${PN}-backends.* ^${PN}-backend-.*" - -# The modules require their .so to be dynamicaly loaded -INSANE_SKIP:${PN}-backend-asyncmeta += "dev-so" -INSANE_SKIP:${PN}-backend-dnssrv += "dev-so" -INSANE_SKIP:${PN}-backend-ldap += "dev-so" -INSANE_SKIP:${PN}-backend-meta += "dev-so" -INSANE_SKIP:${PN}-backend-mdb += "dev-so" -INSANE_SKIP:${PN}-backend-null += "dev-so" -INSANE_SKIP:${PN}-backend-passwd += "dev-so" - -python populate_packages:prepend () { - backend_dir = d.expand('${libexecdir}/openldap') - do_split_packages(d, backend_dir, r'back_([a-z]*)\.so$', 'openldap-backend-%s', 'OpenLDAP %s backend', prepend=True, extra_depends='', allow_links=True) - do_split_packages(d, backend_dir, r'back_([a-z]*)\.so\..*$', 'openldap-backend-%s', 'OpenLDAP %s backend', extra_depends='', allow_links=True) - - metapkg = "${PN}-backends" - d.setVar('ALLOW_EMPTY:' + metapkg, "1") - d.setVar('FILES:' + metapkg, "") - metapkg_rdepends = [] - packages = d.getVar('PACKAGES').split() - for pkg in packages[1:]: - if pkg.count("openldap-backend-") and not pkg in metapkg_rdepends and not pkg.count("-dev") and not pkg.count("-dbg") and not pkg.count("static") and not pkg.count("locale"): - metapkg_rdepends.append(pkg) - d.setVar('RDEPENDS:' + metapkg, ' '.join(metapkg_rdepends)) - d.setVar('DESCRIPTION:' + metapkg, 'OpenLDAP backends meta package') - packages.append(metapkg) - d.setVar('PACKAGES', ' '.join(packages)) -} - -BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/openldap/openldap_2.6.8.bb b/sources/meta-openembedded/meta-oe/recipes-support/openldap/openldap_2.6.8.bb new file mode 100644 index 00000000..ca27ab23 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/openldap/openldap_2.6.8.bb @@ -0,0 +1,237 @@ +SUMMARY = "OpenLDAP Directory Service" +DESCRIPTION = "OpenLDAP Software is an open source implementation of the Lightweight Directory Access Protocol." +HOMEPAGE = "http://www.OpenLDAP.org/license.html" +# The OpenLDAP Public License - see the HOMEPAGE - defines +# the license. www.openldap.org claims this is Open Source +# (see http://www.openldap.org), the license appears to be +# basically BSD. opensource.org does not record this license +# at present (so it is apparently not OSI certified). +LICENSE = "OpenLDAP" +LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=3a41b4ed95ab4a20f366a8d82536afe4 \ + file://LICENSE;md5=153d07ef052c4a37a8fac23bc6031972 \ + " +SECTION = "libs" + +LDAP_VER = "${@'.'.join(d.getVar('PV').split('.')[0:2])}" + +SRC_URI = "http://www.openldap.org/software/download/OpenLDAP/openldap-release/${BP}.tgz \ + file://initscript \ + file://slapd.service \ + file://remove-user-host-pwd-from-version.patch \ + file://0001-build-top.mk-unset-STRIP_OPTS.patch \ + file://0001-fix-incompatible-pointer-type-error.patch \ +" + +SRC_URI[sha256sum] = "48969323e94e3be3b03c6a132942dcba7ef8d545f2ad35401709019f696c3c4e" + +DEPENDS = "util-linux groff-native" + +inherit autotools-brokensep update-rc.d systemd pkgconfig + +# CV SETTINGS +# Required to work round AC_FUNC_MEMCMP which gets the wrong answer +# when cross compiling (should be in site?) +EXTRA_OECONF += "ac_cv_func_memcmp_working=yes" + +# CONFIG DEFINITIONS +# The following is necessary because it cannot be determined for a +# cross compile automagically. Select should yield fine on all OE +# systems... +EXTRA_OECONF += "--with-yielding-select=yes" +# Shared libraries are nice... +EXTRA_OECONF += "--enable-dynamic" + +PACKAGECONFIG ??= "asyncmeta gnutls modules \ + mdb ldap meta null passwd proxycache dnssrv \ + ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \ +" +#--with-tls with TLS/SSL support auto|openssl|gnutls [auto] +PACKAGECONFIG[gnutls] = "--with-tls=gnutls,,gnutls" +PACKAGECONFIG[openssl] = "--with-tls=openssl,,openssl" + +PACKAGECONFIG[sasl] = "--with-cyrus-sasl,--without-cyrus-sasl,cyrus-sasl" +PACKAGECONFIG[modules] = "lt_cv_dlopen_self=yes --enable-modules,--disable-modules,libtool" +PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6" + +# SLAPD options +# +# UNIX crypt(3) passwd support: +EXTRA_OECONF += "--enable-crypt" + +# SLAPD BACKEND +# +# The backend must be set by the configuration. This controls the +# required database. +# +# Backends="asyncmeta dnssrv ldap mdb meta null passwd perl relay sock sql wt" +# +# Note that multiple backends can be built. The ldbm backend requires a +# build-time choice of database API. To use the gdbm (or other) API the +# Berkely database module must be removed from the build. +md = "${libexecdir}/openldap" +# + +#--enable-asyncmeta enable asyncmeta backend no|yes|mod no +PACKAGECONFIG[asyncmeta] = "--enable-asyncmeta=mod,--enable-asyncmeta=no" + +#--enable-dnssrv enable dnssrv backend no|yes|mod no +PACKAGECONFIG[dnssrv] = "--enable-dnssrv=mod,--enable-dnssrv=no" + +#--enable-ldap enable ldap backend no|yes|mod no +PACKAGECONFIG[ldap] = "--enable-ldap=mod,--enable-ldap=no," + +#--enable-mdb enable mdb database backend no|yes|mod [yes] +PACKAGECONFIG[mdb] = "--enable-mdb=yes,--enable-mdb=no," + +#--enable-meta enable metadirectory backend no|yes|mod no +PACKAGECONFIG[meta] = "--enable-meta=mod,--enable-meta=no," + +#--enable-null enable null backend no|yes|mod no +PACKAGECONFIG[null] = "--enable-null=mod,--enable-null=no," + +#--enable-passwd enable passwd backend no|yes|mod no +PACKAGECONFIG[passwd] = "--enable-passwd=mod,--enable-passwd=no," + +#--enable-perl enable perl backend no|yes|mod no +# This requires a loadable perl dynamic library, if enabled without +# doing something appropriate (building perl?) the build will pick +# up the build machine perl - not good (inherit perlnative?) +PACKAGECONFIG[perl] = "--enable-perl=mod,--enable-perl=no,perl" + +#--enable-relay enable relay backend no|yes|mod [yes] +PACKAGECONFIG[relay] = "--enable-relay=mod,--enable-relay=no," + +#--enable-sock enable sock backend no|yes|mod [no] +PACKAGECONFIG[sock] = "--enable-sock=mod,--enable-sock=no," + +#--enable-sql enable sql backend no|yes|mod no +# sql requires some sql backend which provides sql.h, sqlite* provides +# sqlite.h (which may be compatible but hasn't been tried.) +PACKAGECONFIG[sql] = "--enable-sql=mod,--enable-sql=no,sqlite3" + +#--enable-wt enable wt backend no|yes|mod no +# back-wt is marked currently as experimental +PACKAGECONFIG[wt] = "--enable-wt=mod,--enable-wt=no" + +#--enable-dyngroup Dynamic Group overlay no|yes|mod no +# This is a demo, Proxy Cache defines init_module which conflicts with the +# same symbol in dyngroup +PACKAGECONFIG[dyngroup] = "--enable-dyngroup=mod,--enable-dyngroup=no," + +#--enable-proxycache Proxy Cache overlay no|yes|mod no +PACKAGECONFIG[proxycache] = "--enable-proxycache=mod,--enable-proxycache=no," +FILES:${PN}-overlay-proxycache = "${md}/pcache.so.*" +PACKAGES += "${PN}-overlay-proxycache" + +# Append URANDOM_DEVICE='/dev/urandom' to CPPFLAGS: +# This allows tls to obtain random bits from /dev/urandom, by default +# it was disabled for cross-compiling. +CPPFLAGS:append = " -D_GNU_SOURCE -DURANDOM_DEVICE=\\"/dev/urandom\\" -fPIC" + +LDFLAGS:append = " -pthread" + +do_configure() { + rm -f ${S}/libtool + aclocal + libtoolize --force --copy + gnu-configize + cp ${STAGING_DATADIR_NATIVE}/libtool/build-aux/ltmain.sh ${S}/build + cp ${STAGING_DATADIR_NATIVE}/libtool/build-aux/missing ${S}/build + cp ${STAGING_DATADIR_NATIVE}/libtool/build-aux/compile ${S}/build + autoconf + oe_runconf +} + +LEAD_SONAME = "libldap-${LDAP_VER}.so.*" + +# The executables go in a separate package. This allows the +# installation of the libraries with no daemon support. +# Each module also has its own package - see above. +PACKAGES += "${PN}-slapd ${PN}-slurpd ${PN}-bin" + +# Package contents - shift most standard contents to -bin +FILES:${PN} = "${libdir}/lib*.so.* ${sysconfdir}/openldap/ldap.* ${localstatedir}/${BPN}/data" +FILES:${PN}-slapd = "${sysconfdir}/init.d ${libexecdir}/slapd ${sbindir} ${localstatedir}/run ${localstatedir}/volatile/run \ + ${sysconfdir}/openldap/slapd.* ${sysconfdir}/openldap/schema \ + ${sysconfdir}/openldap/DB_CONFIG.example ${systemd_unitdir}/system/*" +FILES:${PN}-slurpd = "${libexecdir}/slurpd ${localstatedir}/openldap-slurp" +FILES:${PN}-bin = "${bindir}" +FILES:${PN}-dev = "${includedir} ${libdir}/lib*.so ${libdir}/*.la ${libexecdir}/openldap/*.a ${libexecdir}/openldap/*.la ${libexecdir}/openldap/*.so ${libdir}/pkgconfig/*.pc" +FILES:${PN}-dbg += "${libexecdir}/openldap/.debug" + +do_install:append() { + install -d ${D}${sysconfdir}/init.d + cat ${UNPACKDIR}/initscript > ${D}${sysconfdir}/init.d/openldap + chmod 755 ${D}${sysconfdir}/init.d/openldap + # This is duplicated in /etc/openldap and is for slapd + rm -f ${D}${localstatedir}/openldap-data/DB_CONFIG.example + + # Installing slapd under ${sbin} is more FHS and LSB compliance + mv ${D}${libexecdir}/slapd ${D}/${sbindir}/slapd + rmdir --ignore-fail-on-non-empty ${D}${libexecdir} + SLAPTOOLS="slapadd slapcat slapdn slapindex slappasswd slaptest slapauth slapacl slapschema slapmodify" + cd ${D}/${sbindir}/ + rm -f ${SLAPTOOLS} + for i in ${SLAPTOOLS}; do ln -sf slapd $i; done + + rmdir "${D}${localstatedir}/run" + rmdir --ignore-fail-on-non-empty "${D}${localstatedir}" + + install -d ${D}${systemd_unitdir}/system/ + install -m 0644 ${UNPACKDIR}/slapd.service ${D}${systemd_unitdir}/system/ + sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/*.service + + # Uses mdm as the database + # and localstatedir as data directory ... + sed -e 's/# modulepath/modulepath/' \ + -e 's/# moduleload\s*back_bdb.*/moduleload back_mdb/' \ + -e 's/database\s*bdb/database mdb/' \ + -e 's%^directory\s*.*%directory ${localstatedir}/${BPN}/data/%' \ + -i ${D}${sysconfdir}/openldap/slapd.conf + + mkdir -p ${D}${localstatedir}/${BPN}/data +} + +INITSCRIPT_PACKAGES = "${PN}-slapd" +INITSCRIPT_NAME:${PN}-slapd = "openldap" +INITSCRIPT_PARAMS:${PN}-slapd = "defaults" +SYSTEMD_PACKAGES = "${PN}-slapd" +SYSTEMD_SERVICE:${PN}-slapd = "slapd.service" +SYSTEMD_AUTO_ENABLE:${PN}-slapd ?= "disable" + +PACKAGES_DYNAMIC += "^${PN}-backends.* ^${PN}-backend-.*" + +# The modules require their .so to be dynamicaly loaded +INSANE_SKIP:${PN}-backend-asyncmeta += "dev-so" +INSANE_SKIP:${PN}-backend-dnssrv += "dev-so" +INSANE_SKIP:${PN}-backend-ldap += "dev-so" +INSANE_SKIP:${PN}-backend-meta += "dev-so" +INSANE_SKIP:${PN}-backend-mdb += "dev-so" +INSANE_SKIP:${PN}-backend-null += "dev-so" +INSANE_SKIP:${PN}-backend-passwd += "dev-so" + +python populate_packages:prepend () { + backend_dir = d.expand('${libexecdir}/openldap') + do_split_packages(d, backend_dir, r'back_([a-z]*)\.so$', 'openldap-backend-%s', 'OpenLDAP %s backend', prepend=True, extra_depends='', allow_links=True) + do_split_packages(d, backend_dir, r'back_([a-z]*)\.so\..*$', 'openldap-backend-%s', 'OpenLDAP %s backend', extra_depends='', allow_links=True) + + metapkg = "${PN}-backends" + d.setVar('ALLOW_EMPTY:' + metapkg, "1") + d.setVar('FILES:' + metapkg, "") + metapkg_rdepends = [] + packages = d.getVar('PACKAGES').split() + for pkg in packages[1:]: + if pkg.count("openldap-backend-") and not pkg in metapkg_rdepends and not pkg.count("-dev") and not pkg.count("-dbg") and not pkg.count("static") and not pkg.count("locale"): + metapkg_rdepends.append(pkg) + d.setVar('RDEPENDS:' + metapkg, ' '.join(metapkg_rdepends)) + d.setVar('DESCRIPTION:' + metapkg, 'OpenLDAP backends meta package') + packages.append(metapkg) + d.setVar('PACKAGES', ' '.join(packages)) +} + +BBCLASSEXTEND = "native" + +# This one is reproducible only on 32bit MACHINEs +# http://errors.yoctoproject.org/Errors/Details/766968/ +# tls_g.c:971:57: error: passing argument 4 of 'gnutls_fingerprint' from incompatible pointer type [-Wincompatible-pointer-types] +CFLAGS += "-Wno-error=incompatible-pointer-types" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/opensc/files/0001-PR-Fixes-for-uninitialized-memory-issues.patch b/sources/meta-openembedded/meta-oe/recipes-support/opensc/files/0001-PR-Fixes-for-uninitialized-memory-issues.patch deleted file mode 100644 index 1c45067e..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/opensc/files/0001-PR-Fixes-for-uninitialized-memory-issues.patch +++ /dev/null @@ -1,1268 +0,0 @@ -From: Virendra Thakur -Date: Tue, 15 Oct 2024 17:29:19 +0000 (-0600) -Subject: Avoid using uninitialized memory - -Avoid using uninitialized memory - -37 new use-of-uninitialized-memory bugs were found while testing fuzzing harnesses. The bugs were found in these functions: - -cac_read_file() -cardos_match_card() -sc_bin_to_hex() -strcmp(), from gids_get_identifiers() -do_select() -bcmp(), from cac_list_compare_path() -insert_cert() -cardos_lifecycle_get() -gids_read_masterfile() -sc_pkcs15init_parse_info() -piv_get_challenge() -asn1_decode() -malloc(), from cac_read_file() -sc_asn1_decode_object_id() -sc_pkcs15emu_sc_hsm_decode_cvc() -gemsafe_get_cert_len() -process_fcp() -dnie_process_fci() -iso7816_process_fci() -sc_pkcs15_read_file() -strlen(), from set_string() -asn1_encode_path() -msc_extract_rsa_public_key() -sc_build_pin() -DES_set_key_unchecked(), from openssl_enc() -starcos_write_pukey() -iasecc_sdo_parse() -setcos_generate_key() -iasecc_parse_size() -iasecc_se_parse() -sc_hsm_determine_free_id() -asn1_encode_entry() -coolkey_rsa_op() -sc_asn1_read_tag() -do_init_app() -sc_pkcs15init_create_pin() -sc_asn1_clear_algorithm_id() -Reported by Matteo Marini (@Heinzeen) - -Upstream-Status: Backport [https://github.com/OpenSC/OpenSC/pull/3225/files/ab476044a009003262991c065b792baa053c7be5] - -CVE: CVE-2024-45615 CVE-2024-45616 CVE-2024-45617 CVE-2024-45618 CVE-2024-45619 CVE-2024-45620 -Hunk present in card-entersafe.c and card-gids.c are refresehed base on codebase. - -From f25c61dae98ebfc7eb81b48f002621663cfcf9cb Mon Sep 17 00:00:00 2001 -From: Jakub Jelen -Date: Mon, 20 May 2024 21:19:15 +0200 -Subject: [PATCH 01/30] gids: Avoid using uninitialized memory - -Thanks Matteo Marini for report - -https://github.com/OpenSC/OpenSC/security/advisories/GHSA-h5f7-rjr5-vx54 - -Signed-off-by: Jakub Jelen ---- - src/libopensc/card-gids.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/libopensc/card-gids.c b/src/libopensc/card-gids.c -index aa63035097..90c98b557d 100644 ---- a/src/libopensc/card-gids.c -+++ b/src/libopensc/card-gids.c -@@ -251,7 +251,7 @@ static int gids_get_DO(sc_card_t* card, - LOG_TEST_RET(card->ctx, r, "gids get data failed"); - LOG_TEST_RET(card->ctx, sc_check_sw(card, apdu.sw1, apdu.sw2), "invalid return"); - -- p = sc_asn1_find_tag(card->ctx, buffer, sizeof(buffer), dataObjectIdentifier, &datasize); -+ p = sc_asn1_find_tag(card->ctx, buffer, apdu.resplen, dataObjectIdentifier, &datasize); - if (!p) { - LOG_FUNC_RETURN(card->ctx, SC_ERROR_FILE_NOT_FOUND); - } - -From a905ad4600ab13f36ec1d0c909b18ca016d91a5a Mon Sep 17 00:00:00 2001 -From: Jakub Jelen -Date: Mon, 20 May 2024 21:31:38 +0200 -Subject: [PATCH 02/30] pkcs15init: Avoid using uninitialized memory - -Thanks Matteo Marini for report - -https://github.com/OpenSC/OpenSC/security/advisories/GHSA-h5f7-rjr5-vx54 - -Signed-off-by: Jakub Jelen ---- - src/pkcs15init/profile.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/pkcs15init/profile.c b/src/pkcs15init/profile.c -index 5113af6ef6..72963e2f9c 100644 ---- a/src/pkcs15init/profile.c -+++ b/src/pkcs15init/profile.c -@@ -1809,7 +1809,7 @@ do_pin_storedlength(struct state *cur, int argc, char **argv) - static int - do_pin_flags(struct state *cur, int argc, char **argv) - { -- unsigned int flags; -+ unsigned int flags = 0; - int i, r; - - if (cur->pin->pin.auth_type != SC_PKCS15_PIN_AUTH_TYPE_PIN) - -From 4ca050b83c8f265280059697c3764460ad8aac9b Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Veronika=20Hanul=C3=ADkov=C3=A1?= -Date: Tue, 3 Sep 2024 09:15:22 +0200 -Subject: [PATCH 03/30] pkcs15init: Remove tab indentation - ---- - src/pkcs15init/profile.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/pkcs15init/profile.c b/src/pkcs15init/profile.c -index 72963e2f9c..4fbc3e7e1f 100644 ---- a/src/pkcs15init/profile.c -+++ b/src/pkcs15init/profile.c -@@ -1809,7 +1809,7 @@ do_pin_storedlength(struct state *cur, int argc, char **argv) - static int - do_pin_flags(struct state *cur, int argc, char **argv) - { -- unsigned int flags = 0; -+ unsigned int flags = 0; - int i, r; - - if (cur->pin->pin.auth_type != SC_PKCS15_PIN_AUTH_TYPE_PIN) - -From 5580be58f2dc88f8b75a60d213a57014333c6b17 Mon Sep 17 00:00:00 2001 -From: Jakub Jelen -Date: Mon, 20 May 2024 22:14:48 +0200 -Subject: [PATCH 04/30] cac: Correctly calculate certificate length based on - the resplen - -Thanks Matteo Marini for report - -https://github.com/OpenSC/OpenSC/security/advisories/GHSA-h5f7-rjr5-vx54 - -Signed-off-by: Jakub Jelen ---- - src/libopensc/card-cac1.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/src/libopensc/card-cac1.c b/src/libopensc/card-cac1.c -index 5ddacc4565..06b2671f43 100644 ---- a/src/libopensc/card-cac1.c -+++ b/src/libopensc/card-cac1.c -@@ -92,12 +92,12 @@ static int cac_cac1_get_certificate(sc_card_t *card, u8 **out_buf, size_t *out_l - if (apdu.sw1 != 0x63 || apdu.sw2 < 1) { - /* we've either finished reading, or hit an error, break */ - r = sc_check_sw(card, apdu.sw1, apdu.sw2); -- left -= len; -+ left -= apdu.resplen; - break; - } - /* Adjust the lengths */ -- left -= len; -- out_ptr += len; -+ left -= apdu.resplen; -+ out_ptr += apdu.resplen; - len = MIN(left, apdu.sw2); - } - if (r < 0) { - -From 9da37a80ed3b3ceaf472e1a43a4672f4e30637d1 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Veronika=20Hanul=C3=ADkov=C3=A1?= -Date: Thu, 11 Jul 2024 14:58:25 +0200 -Subject: [PATCH 05/30] cac: Fix uninitialized values - -Thanks Matteo Marini for report -https://github.com/OpenSC/OpenSC/security/advisories/GHSA-p3mx-7472-h3j8 - -fuzz_card/1,fuzz_pkcs11/6 ---- - src/libopensc/card-cac.c | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -diff --git a/src/libopensc/card-cac.c b/src/libopensc/card-cac.c -index 898fce8aa5..412f22644d 100644 ---- a/src/libopensc/card-cac.c -+++ b/src/libopensc/card-cac.c -@@ -252,7 +252,7 @@ static int cac_apdu_io(sc_card_t *card, int ins, int p1, int p2, - size_t * recvbuflen) - { - int r; -- sc_apdu_t apdu; -+ sc_apdu_t apdu = {0}; - u8 rbufinitbuf[CAC_MAX_SIZE]; - u8 *rbuf; - size_t rbuflen; -@@ -389,13 +389,13 @@ cac_get_acr(sc_card_t *card, int acr_type, u8 **out_buf, size_t *out_len) - static int cac_read_file(sc_card_t *card, int file_type, u8 **out_buf, size_t *out_len) - { - u8 params[2]; -- u8 count[2]; -+ u8 count[2] = {0}; - u8 *out = NULL; -- u8 *out_ptr; -+ u8 *out_ptr = NULL; - size_t offset = 0; - size_t size = 0; - size_t left = 0; -- size_t len; -+ size_t len = 0; - int r; - - params[0] = file_type; -@@ -458,7 +458,7 @@ static int cac_read_binary(sc_card_t *card, unsigned int idx, - const u8 *tl_ptr, *val_ptr, *tl_start; - u8 *tlv_ptr; - const u8 *cert_ptr; -- size_t tl_len, val_len, tlv_len; -+ size_t tl_len = 0, val_len = 0, tlv_len; - size_t len, tl_head_len, cert_len; - u8 cert_type, tag; - -@@ -1519,7 +1519,7 @@ static int cac_parse_CCC(sc_card_t *card, cac_private_data_t *priv, const u8 *tl - static int cac_process_CCC(sc_card_t *card, cac_private_data_t *priv, int depth) - { - u8 *tl = NULL, *val = NULL; -- size_t tl_len, val_len; -+ size_t tl_len = 0, val_len = 0; - int r; - - if (depth > CAC_MAX_CCC_DEPTH) { - -From 39a55ef0a44cb34b22e585281b1e1eee30eb79a5 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Veronika=20Hanul=C3=ADkov=C3=A1?= -Date: Thu, 11 Jul 2024 15:27:19 +0200 -Subject: [PATCH 06/30] cardos: Fix uninitialized values - -Thanks Matteo Marini for report -https://github.com/OpenSC/OpenSC/security/advisories/GHSA-p3mx-7472-h3j8 - -fuzz_card/2 ---- - src/libopensc/card-cardos.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/src/libopensc/card-cardos.c b/src/libopensc/card-cardos.c -index 2e2d524333..a0e2322478 100644 ---- a/src/libopensc/card-cardos.c -+++ b/src/libopensc/card-cardos.c -@@ -94,14 +94,14 @@ static void fixup_transceive_length(const struct sc_card *card, - - static int cardos_match_card(sc_card_t *card) - { -- unsigned char atr[SC_MAX_ATR_SIZE]; -+ unsigned char atr[SC_MAX_ATR_SIZE] = { 0 }; - int i; - - i = _sc_match_atr(card, cardos_atrs, &card->type); - if (i < 0) - return 0; - -- memcpy(atr, card->atr.value, sizeof(atr)); -+ memcpy(atr, card->atr.value, card->atr.len); - - /* Do not change card type for CIE! */ - if (card->type == SC_CARD_TYPE_CARDOS_CIE_V1) -@@ -114,8 +114,8 @@ static int cardos_match_card(sc_card_t *card) - return 1; - if (card->type == SC_CARD_TYPE_CARDOS_M4_2) { - int rv; -- sc_apdu_t apdu; -- u8 rbuf[SC_MAX_APDU_BUFFER_SIZE]; -+ sc_apdu_t apdu = { 0 }; -+ u8 rbuf[SC_MAX_APDU_BUFFER_SIZE] = { 0 }; - /* first check some additional ATR bytes */ - if ((atr[4] != 0xff && atr[4] != 0x02) || - (atr[6] != 0x10 && atr[6] != 0x0a) || - -From e66619fadb3fd666e3359886fe18e387de068799 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Veronika=20Hanul=C3=ADkov=C3=A1?= -Date: Fri, 12 Jul 2024 13:16:56 +0200 -Subject: [PATCH 07/30] card-dnie: Check APDU response length and ASN1 lengths - -Thanks Matteo Marini for report -https://github.com/OpenSC/OpenSC/security/advisories/GHSA-p3mx-7472-h3j8 - -fuzz_pkcs15_decode/10, fuzz_pkcs15_encode/12 ---- - src/libopensc/asn1.c | 4 +++- - src/libopensc/card-dnie.c | 8 ++++++-- - 2 files changed, 9 insertions(+), 3 deletions(-) - -diff --git a/src/libopensc/asn1.c b/src/libopensc/asn1.c -index 08ef56149c..548263a2da 100644 ---- a/src/libopensc/asn1.c -+++ b/src/libopensc/asn1.c -@@ -68,7 +68,7 @@ int sc_asn1_read_tag(const u8 ** buf, size_t buflen, unsigned int *cla_out, - - *buf = NULL; - -- if (left == 0 || !p) -+ if (left == 0 || !p || buflen == 0) - return SC_ERROR_INVALID_ASN1_OBJECT; - if (*p == 0xff || *p == 0) { - /* end of data reached */ -@@ -83,6 +83,8 @@ int sc_asn1_read_tag(const u8 ** buf, size_t buflen, unsigned int *cla_out, - */ - cla = (*p & SC_ASN1_TAG_CLASS) | (*p & SC_ASN1_TAG_CONSTRUCTED); - tag = *p & SC_ASN1_TAG_PRIMITIVE; -+ if (left < 1) -+ return SC_ERROR_INVALID_ASN1_OBJECT; - p++; - left--; - if (tag == SC_ASN1_TAG_PRIMITIVE) { -diff --git a/src/libopensc/card-dnie.c b/src/libopensc/card-dnie.c -index 464670f096..d8b90e8439 100644 ---- a/src/libopensc/card-dnie.c -+++ b/src/libopensc/card-dnie.c -@@ -1172,12 +1172,16 @@ static int dnie_compose_and_send_apdu(sc_card_t *card, const u8 *path, size_t pa - - if (file_out) { - /* finally process FCI response */ -+ size_t len = apdu.resp[1]; - sc_file_free(*file_out); - *file_out = sc_file_new(); - if (*file_out == NULL) { - LOG_FUNC_RETURN(ctx, SC_ERROR_OUT_OF_MEMORY); - } -- res = card->ops->process_fci(card, *file_out, apdu.resp + 2, apdu.resp[1]); -+ if (apdu.resplen - 2 < len || len < 1) { -+ LOG_FUNC_RETURN(ctx, SC_ERROR_UNKNOWN_DATA_RECEIVED); -+ } -+ res = card->ops->process_fci(card, *file_out, apdu.resp + 2, len); - } - LOG_FUNC_RETURN(ctx, res); - } -@@ -1935,7 +1939,7 @@ static int dnie_process_fci(struct sc_card *card, - int *op = df_acl; - int n = 0; - sc_context_t *ctx = NULL; -- if ((card == NULL) || (card->ctx == NULL) || (file == NULL)) -+ if ((card == NULL) || (card->ctx == NULL) || (file == NULL) || buflen == 0) - return SC_ERROR_INVALID_ARGUMENTS; - ctx = card->ctx; - LOG_FUNC_CALLED(ctx); - -From 737931e6edaaa2142e1e71a2b76159f6ce458bb8 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Veronika=20Hanul=C3=ADkov=C3=A1?= -Date: Fri, 12 Jul 2024 14:03:59 +0200 -Subject: [PATCH 08/30] muscle: Report invalid SW when reading object - -Thanks Matteo Marini for report -https://github.com/OpenSC/OpenSC/security/advisories/GHSA-p3mx-7472-h3j8 - -fuzz_pkcs11/20, fuzz_pkcs15init/10 ---- - src/libopensc/muscle.c | 19 ++++++++++--------- - 1 file changed, 10 insertions(+), 9 deletions(-) - -diff --git a/src/libopensc/muscle.c b/src/libopensc/muscle.c -index 46a9f66b88..89dfcbbcba 100644 ---- a/src/libopensc/muscle.c -+++ b/src/libopensc/muscle.c -@@ -92,33 +92,34 @@ int msc_partial_read_object(sc_card_t *card, msc_id objectId, int offset, u8 *da - apdu.resp = data; - r = sc_transmit_apdu(card, &apdu); - LOG_TEST_RET(card->ctx, r, "APDU transmit failed"); -- if(apdu.sw1 == 0x90 && apdu.sw2 == 0x00) -+ if (apdu.sw1 == 0x90 && apdu.sw2 == 0x00 && dataLength <= apdu.resplen) - return (int)dataLength; -- if(apdu.sw1 == 0x9C) { -- if(apdu.sw2 == 0x07) { -+ if (apdu.sw1 == 0x9C) { -+ if (apdu.sw2 == 0x07) { - SC_FUNC_RETURN(card->ctx, SC_LOG_DEBUG_VERBOSE, SC_ERROR_FILE_NOT_FOUND); -- } else if(apdu.sw2 == 0x06) { -+ } else if (apdu.sw2 == 0x06) { - SC_FUNC_RETURN(card->ctx, SC_LOG_DEBUG_VERBOSE, SC_ERROR_NOT_ALLOWED); -- } else if(apdu.sw2 == 0x0F) { -+ } else if (apdu.sw2 == 0x0F) { - /* GUESSED */ - SC_FUNC_RETURN(card->ctx, SC_LOG_DEBUG_VERBOSE, SC_ERROR_INVALID_ARGUMENTS); - } - } - sc_log(card->ctx, - "got strange SWs: 0x%02X 0x%02X\n", apdu.sw1, apdu.sw2); -- return (int)dataLength; -- -+ SC_FUNC_RETURN(card->ctx, SC_LOG_DEBUG_VERBOSE, SC_ERROR_UNKNOWN_DATA_RECEIVED); - } - - int msc_read_object(sc_card_t *card, msc_id objectId, int offset, u8 *data, size_t dataLength) - { -- int r; -+ int r = 0; - unsigned int i; - size_t max_read_unit = MSC_MAX_READ; - -- for(i = 0; i < dataLength; i += max_read_unit) { -+ for (i = 0; i < dataLength; i += r) { - r = msc_partial_read_object(card, objectId, offset + i, data + i, MIN(dataLength - i, max_read_unit)); - LOG_TEST_RET(card->ctx, r, "Error in partial object read"); -+ if (r == 0) -+ break; - } - return (int)dataLength; - } - -From e7f6a24b7e9ac849d0242ce9e183c8160e5e9e8c Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Veronika=20Hanul=C3=ADkov=C3=A1?= -Date: Fri, 12 Jul 2024 14:16:24 +0200 -Subject: [PATCH 09/30] card-mcrd: Check length of response buffer in select - -Thanks Matteo Marini for report -https://github.com/OpenSC/OpenSC/security/advisories/GHSA-p3mx-7472-h3j8 - -fuzz_pkcs11/5,12 fuzz_pkcs15_crypt/9 ---- - src/libopensc/card-mcrd.c | 11 +++++++---- - 1 file changed, 7 insertions(+), 4 deletions(-) - -diff --git a/src/libopensc/card-mcrd.c b/src/libopensc/card-mcrd.c -index 3a549999eb..911e9f0a07 100644 ---- a/src/libopensc/card-mcrd.c -+++ b/src/libopensc/card-mcrd.c -@@ -587,20 +587,23 @@ do_select(sc_card_t * card, u8 kind, - } - } - -- if (p2 == 0x04 && apdu.resp[0] == 0x62) { -+ if (p2 == 0x04 && apdu.resplen > 2 && apdu.resp[0] == 0x62) { - *file = sc_file_new(); - if (!*file) - LOG_FUNC_RETURN(card->ctx, SC_ERROR_OUT_OF_MEMORY); -+ if (apdu.resp[1] > apdu.resplen - 2) -+ LOG_FUNC_RETURN(card->ctx, SC_ERROR_INVALID_DATA); - process_fcp(card, *file, apdu.resp + 2, apdu.resp[1]); - return SC_SUCCESS; - } - -- if (p2 != 0x0C && apdu.resp[0] == 0x6F) { -+ if (p2 != 0x0C && apdu.resplen > 2 && apdu.resp[0] == 0x6F) { - *file = sc_file_new(); - if (!*file) - LOG_FUNC_RETURN(card->ctx, SC_ERROR_OUT_OF_MEMORY); -- if (apdu.resp[1] <= apdu.resplen) -- process_fcp(card, *file, apdu.resp + 2, apdu.resp[1]); -+ if (apdu.resp[1] > apdu.resplen - 2) -+ LOG_FUNC_RETURN(card->ctx, SC_ERROR_INVALID_DATA); -+ process_fcp(card, *file, apdu.resp + 2, apdu.resp[1]); - return SC_SUCCESS; - } - return SC_SUCCESS; - -From d18a07ea891c7bd7dff0d187fbb4df5169fd9698 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Veronika=20Hanul=C3=ADkov=C3=A1?= -Date: Fri, 12 Jul 2024 14:35:47 +0200 -Subject: [PATCH 10/30] pkcs15-cert.c: Initialize OID length - -In case it is not set later. - -Thanks Matteo Marini for report -https://github.com/OpenSC/OpenSC/security/advisories/GHSA-p3mx-7472-h3j8 - -fuzz_pkcs11/7 ---- - src/libopensc/pkcs15-cert.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/libopensc/pkcs15-cert.c b/src/libopensc/pkcs15-cert.c -index 1777a85835..5e2dbb89d0 100644 ---- a/src/libopensc/pkcs15-cert.c -+++ b/src/libopensc/pkcs15-cert.c -@@ -169,7 +169,7 @@ sc_pkcs15_get_name_from_dn(struct sc_context *ctx, const u8 *dn, size_t dn_len, - for (next_ava = rdn, next_ava_len = rdn_len; next_ava_len; ) { - const u8 *ava, *dummy, *oidp; - struct sc_object_id oid; -- size_t ava_len, dummy_len, oid_len; -+ size_t ava_len = 0, dummy_len, oid_len = 0; - - /* unwrap the set and point to the next ava */ - ava = sc_asn1_skip_tag(ctx, &next_ava, &next_ava_len, SC_ASN1_TAG_SET | SC_ASN1_CONS, &ava_len); - -From c65e6f004d99187d63d68e4a9a9d5ada770b7b8d Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Veronika=20Hanul=C3=ADkov=C3=A1?= -Date: Fri, 12 Jul 2024 15:04:19 +0200 -Subject: [PATCH 11/30] card-gids: Use actual length of reponse buffer - -Thanks Matteo Marini for report -https://github.com/OpenSC/OpenSC/security/advisories/GHSA-p3mx-7472-h3j8 - -fuzz_pkcs11/11 ---- - src/libopensc/card-gids.c | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/src/libopensc/card-gids.c b/src/libopensc/card-gids.c -index 90c98b557d..5fb0d4acb4 100644 ---- a/src/libopensc/card-gids.c -+++ b/src/libopensc/card-gids.c -@@ -231,6 +231,7 @@ static int gids_get_DO(sc_card_t* card, - size_t datasize = 0; - const u8* p; - u8 buffer[MAX_GIDS_FILE_SIZE]; -+ size_t buffer_len = sizeof(buffer); - - SC_FUNC_CALLED(card->ctx, SC_LOG_DEBUG_VERBOSE); - sc_log(card->ctx, -@@ -244,14 +245,15 @@ static int gids_get_DO(sc_card_t* card, - apdu.data = data; - apdu.datalen = 04; - apdu.resp = buffer; -- apdu.resplen = sizeof(buffer); -+ apdu.resplen = buffer_len; - apdu.le = 256; - - r = sc_transmit_apdu(card, &apdu); - LOG_TEST_RET(card->ctx, r, "gids get data failed"); - LOG_TEST_RET(card->ctx, sc_check_sw(card, apdu.sw1, apdu.sw2), "invalid return"); -+ buffer_len = apdu.resplen; - -- p = sc_asn1_find_tag(card->ctx, buffer, apdu.resplen, dataObjectIdentifier, &datasize); -+ p = sc_asn1_find_tag(card->ctx, buffer, buffer_len, dataObjectIdentifier, &datasize); - if (!p) { - LOG_FUNC_RETURN(card->ctx, SC_ERROR_FILE_NOT_FOUND); - } - -From 3b242c5d7160a66fb94efabef9318ebf03ebc63f Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Veronika=20Hanul=C3=ADkov=C3=A1?= -Date: Tue, 16 Jul 2024 14:05:36 +0200 -Subject: [PATCH 12/30] cac: Check return value when selecting AID - -Thanks Matteo Marini for report -https://github.com/OpenSC/OpenSC/security/advisories/GHSA-p3mx-7472-h3j8 - -fuzz_pkcs11/14 ---- - src/libopensc/card-cac.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/src/libopensc/card-cac.c b/src/libopensc/card-cac.c -index 412f22644d..71ab7e482f 100644 ---- a/src/libopensc/card-cac.c -+++ b/src/libopensc/card-cac.c -@@ -1293,10 +1293,10 @@ static int cac_parse_aid(sc_card_t *card, cac_private_data_t *priv, const u8 *ai - /* Call without OID set will just select the AID without subsequent - * OID selection, which we need to figure out just now - */ -- cac_select_file_by_type(card, &new_object.path, NULL); -+ r = cac_select_file_by_type(card, &new_object.path, NULL); -+ LOG_TEST_RET(card->ctx, r, "Cannot select AID"); - r = cac_get_properties(card, &prop); -- if (r < 0) -- return SC_ERROR_INTERNAL; -+ LOG_TEST_RET(card->ctx, r, "Cannot get CAC properties"); - - for (i = 0; i < prop.num_objects; i++) { - /* don't fail just because we have more certs than we can support */ - -From 19d55573fcb638d02acc378cf638da9b4e481cd7 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Veronika=20Hanul=C3=ADkov=C3=A1?= -Date: Tue, 16 Jul 2024 14:22:02 +0200 -Subject: [PATCH 13/30] pkcs15-tcos: Check number of read bytes for cert - -Thanks Matteo Marini for report -https://github.com/OpenSC/OpenSC/security/advisories/GHSA-p3mx-7472-h3j8 - -fuzz_pkcs11/15 ---- - src/libopensc/pkcs15-tcos.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/libopensc/pkcs15-tcos.c b/src/libopensc/pkcs15-tcos.c -index a84001e122..4d02a98ee1 100644 ---- a/src/libopensc/pkcs15-tcos.c -+++ b/src/libopensc/pkcs15-tcos.c -@@ -62,7 +62,8 @@ static int insert_cert( - "Select(%s) failed\n", path); - return 1; - } -- if(sc_read_binary(card, 0, cert, sizeof(cert), 0)<0){ -+ r = sc_read_binary(card, 0, cert, sizeof(cert), 0); -+ if (r <= 0){ - sc_log(ctx, - "ReadBinary(%s) failed\n", path); - return 2; - -From 74d42f32fd6f96f190ee7dd188f873115dcb5af2 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Veronika=20Hanul=C3=ADkov=C3=A1?= -Date: Tue, 16 Jul 2024 14:29:01 +0200 -Subject: [PATCH 14/30] cardos: Return error when response length is 0 - -Thanks Matteo Marini for report -https://github.com/OpenSC/OpenSC/security/advisories/GHSA-p3mx-7472-h3j8 - -fuzz_pkcs11/18 ---- - src/libopensc/card-cardos.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/libopensc/card-cardos.c b/src/libopensc/card-cardos.c -index a0e2322478..124752d78b 100644 ---- a/src/libopensc/card-cardos.c -+++ b/src/libopensc/card-cardos.c -@@ -1281,7 +1281,7 @@ cardos_lifecycle_get(sc_card_t *card, int *mode) - LOG_TEST_RET(card->ctx, r, "Card returned error"); - - if (apdu.resplen < 1) { -- LOG_TEST_RET(card->ctx, r, "Lifecycle byte not in response"); -+ LOG_TEST_RET(card->ctx, SC_ERROR_UNKNOWN_DATA_RECEIVED, "Lifecycle byte not in response"); - } - - r = SC_SUCCESS; - -From 2e6333f2024765bbd0e384cadce6d6c6496339a2 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Veronika=20Hanul=C3=ADkov=C3=A1?= -Date: Tue, 16 Jul 2024 15:51:51 +0200 -Subject: [PATCH 15/30] card-piv: Initialize variables for tag and CLA - -In case they are not later initialize later by -sc_asn1_read_tag() function. - -Thanks Matteo Marini for report -https://github.com/OpenSC/OpenSC/security/advisories/GHSA-p3mx-7472-h3j8 - -fuzz_pkcs11/21 ---- - src/libopensc/card-piv.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/libopensc/card-piv.c b/src/libopensc/card-piv.c -index f4eafe47a4..034635d898 100644 ---- a/src/libopensc/card-piv.c -+++ b/src/libopensc/card-piv.c -@@ -4428,7 +4428,7 @@ static int piv_get_challenge(sc_card_t *card, u8 *rnd, size_t len) - const u8 *p; - size_t out_len = 0; - int r; -- unsigned int tag_out, cla_out; -+ unsigned int tag_out = 0, cla_out = 0; - piv_private_data_t * priv = PIV_DATA(card); - - LOG_FUNC_CALLED(card->ctx); - -From 95815e45fb9f764d6e820a287ebc242e5a3155ec Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Veronika=20Hanul=C3=ADkov=C3=A1?= -Date: Tue, 16 Jul 2024 16:32:45 +0200 -Subject: [PATCH 16/30] pkcs15-sc-hsm: Initialize variables for tag and CLA - -In case they are not later initialize later by -sc_asn1_read_tag() function. - -Thanks Matteo Marini for report -https://github.com/OpenSC/OpenSC/security/advisories/GHSA-p3mx-7472-h3j8 - -fuzz_pkcs15_crypt/12 ---- - src/libopensc/pkcs15-sc-hsm.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/libopensc/pkcs15-sc-hsm.c b/src/libopensc/pkcs15-sc-hsm.c -index 315cd74482..acdbee7054 100644 ---- a/src/libopensc/pkcs15-sc-hsm.c -+++ b/src/libopensc/pkcs15-sc-hsm.c -@@ -386,7 +386,7 @@ int sc_pkcs15emu_sc_hsm_decode_cvc(sc_pkcs15_card_t * p15card, - struct sc_asn1_entry asn1_cvcert[C_ASN1_CVCERT_SIZE]; - struct sc_asn1_entry asn1_cvc_body[C_ASN1_CVC_BODY_SIZE]; - struct sc_asn1_entry asn1_cvc_pubkey[C_ASN1_CVC_PUBKEY_SIZE]; -- unsigned int cla,tag; -+ unsigned int cla = 0, tag = 0; - size_t taglen; - const u8 *tbuf; - int r; - -From 16e0af0a310e4f611b88ea29ec53e02928d5ba35 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Veronika=20Hanul=C3=ADkov=C3=A1?= -Date: Wed, 17 Jul 2024 09:15:43 +0200 -Subject: [PATCH 17/30] pkcs15-gemsafeV1: Check length of buffer for object - -Number of actually read bytes may differ from -the stated object length. - -Thanks Matteo Marini for report -https://github.com/OpenSC/OpenSC/security/advisories/GHSA-p3mx-7472-h3j8 - -fuzz_pkcs15_crypt/15 ---- - src/libopensc/pkcs15-gemsafeV1.c | 20 +++++++++++++++----- - 1 file changed, 15 insertions(+), 5 deletions(-) - -diff --git a/src/libopensc/pkcs15-gemsafeV1.c b/src/libopensc/pkcs15-gemsafeV1.c -index 25140503fa..9fb8956fe9 100644 ---- a/src/libopensc/pkcs15-gemsafeV1.c -+++ b/src/libopensc/pkcs15-gemsafeV1.c -@@ -169,6 +169,7 @@ static int gemsafe_get_cert_len(sc_card_t *card) - size_t objlen; - int certlen; - unsigned int ind, i=0; -+ int read_len; - - sc_format_path(GEMSAFE_PATH, &path); - r = sc_select_file(card, &path, &file); -@@ -177,9 +178,11 @@ static int gemsafe_get_cert_len(sc_card_t *card) - sc_file_free(file); - - /* Initial read */ -- r = sc_read_binary(card, 0, ibuf, GEMSAFE_READ_QUANTUM, 0); -- if (r < 0) -+ read_len = sc_read_binary(card, 0, ibuf, GEMSAFE_READ_QUANTUM, 0); -+ if (read_len <= 2) { -+ sc_log(card->ctx, "Invalid size of object data: %d", read_len); - return SC_ERROR_INTERNAL; -+ } - - /* Actual stored object size is encoded in first 2 bytes - * (allocated EF space is much greater!) -@@ -208,7 +211,7 @@ static int gemsafe_get_cert_len(sc_card_t *card) - * the private key. - */ - ind = 2; /* skip length */ -- while (ibuf[ind] == 0x01 && i < gemsafe_cert_max) { -+ while (ind + 1 < (size_t)read_len && ibuf[ind] == 0x01 && i < gemsafe_cert_max) { - if (ibuf[ind+1] == 0xFE) { - gemsafe_prkeys[i].ref = ibuf[ind+4]; - sc_log(card->ctx, "Key container %d is allocated and uses key_ref %d", -@@ -235,7 +238,7 @@ static int gemsafe_get_cert_len(sc_card_t *card) - /* Read entire file, then dissect in memory. - * Gemalto ClassicClient seems to do it the same way. - */ -- iptr = ibuf + GEMSAFE_READ_QUANTUM; -+ iptr = ibuf + read_len; - while ((size_t)(iptr - ibuf) < objlen) { - r = sc_read_binary(card, (unsigned)(iptr - ibuf), iptr, - MIN(GEMSAFE_READ_QUANTUM, objlen - (iptr - ibuf)), 0); -@@ -243,7 +246,14 @@ static int gemsafe_get_cert_len(sc_card_t *card) - sc_log(card->ctx, "Could not read cert object"); - return SC_ERROR_INTERNAL; - } -- iptr += GEMSAFE_READ_QUANTUM; -+ if (r == 0) -+ break; -+ read_len += r; -+ iptr += r; -+ } -+ if ((size_t)read_len < objlen) { -+ sc_log(card->ctx, "Could not read cert object"); -+ return SC_ERROR_INTERNAL; - } - - /* Search buffer for certificates, they start with 0x3082. */ - -From 5aad7762d144a39ef11bd6f0881fc7e992161bb5 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Veronika=20Hanul=C3=ADkov=C3=A1?= -Date: Wed, 17 Jul 2024 10:39:52 +0200 -Subject: [PATCH 18/30] card-jpki: Check number of read bytes - -Thanks Matteo Marini for report -https://github.com/OpenSC/OpenSC/security/advisories/GHSA-p3mx-7472-h3j8 - -fuzz_pkcs15_encode/18 ---- - src/libopensc/card-jpki.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/src/libopensc/card-jpki.c b/src/libopensc/card-jpki.c -index 6e4d0f3165..71339491d1 100644 ---- a/src/libopensc/card-jpki.c -+++ b/src/libopensc/card-jpki.c -@@ -195,6 +195,8 @@ jpki_select_file(struct sc_card *card, - u8 buf[4]; - rc = sc_read_binary(card, 0, buf, 4, 0); - LOG_TEST_RET(card->ctx, rc, "SW Check failed"); -+ if (rc < 4) -+ LOG_TEST_RET(card->ctx, SC_ERROR_UNKNOWN_DATA_RECEIVED, "Received data too short"); - file = sc_file_new(); - if (!file) { - LOG_FUNC_RETURN(card->ctx, SC_ERROR_OUT_OF_MEMORY); - -From 535e9d62f94b496bb5214edf0ee6f431ae6d94cb Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Veronika=20Hanul=C3=ADkov=C3=A1?= -Date: Wed, 17 Jul 2024 11:18:52 +0200 -Subject: [PATCH 19/30] pkcs15-tcos: Check return value of serial num - conversion - -Thanks Matteo Marini for report -https://github.com/OpenSC/OpenSC/security/advisories/GHSA-p3mx-7472-h3j8 - -fuzz_pkcs15_encode/21 ---- - src/libopensc/pkcs15-tcos.c | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -diff --git a/src/libopensc/pkcs15-tcos.c b/src/libopensc/pkcs15-tcos.c -index 4d02a98ee1..2bd275c4f4 100644 ---- a/src/libopensc/pkcs15-tcos.c -+++ b/src/libopensc/pkcs15-tcos.c -@@ -531,10 +531,15 @@ int sc_pkcs15emu_tcos_init_ex( - /* get the card serial number */ - r = sc_card_ctl(card, SC_CARDCTL_GET_SERIALNR, &serialnr); - if (r < 0) { -- sc_log(ctx, "unable to get ICCSN\n"); -+ sc_log(ctx, "unable to get ICCSN"); - return SC_ERROR_WRONG_CARD; - } -- sc_bin_to_hex(serialnr.value, serialnr.len , serial, sizeof(serial), 0); -+ r = sc_bin_to_hex(serialnr.value, serialnr.len, serial, sizeof(serial), 0); -+ if (r != SC_SUCCESS) { -+ sc_log(ctx, "serial number invalid"); -+ return SC_ERROR_INTERNAL; -+ } -+ - serial[19] = '\0'; - set_string(&p15card->tokeninfo->serial_number, serial); - - -From 230a783a0476ef1b387818ba5dd9c1c73978744f Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Veronika=20Hanul=C3=ADkov=C3=A1?= -Date: Wed, 17 Jul 2024 12:53:52 +0200 -Subject: [PATCH 20/30] pkcs15-tcos: Check certificate length before accessing - -Thanks Matteo Marini for report -https://github.com/OpenSC/OpenSC/security/advisories/GHSA-p3mx-7472-h3j8 - -fuzz_pkcs15_encode/8 ---- - src/libopensc/pkcs15-tcos.c | 35 +++++++++++++++++++++-------------- - 1 file changed, 21 insertions(+), 14 deletions(-) - -diff --git a/src/libopensc/pkcs15-tcos.c b/src/libopensc/pkcs15-tcos.c -index 2bd275c4f4..ecaa66edf2 100644 ---- a/src/libopensc/pkcs15-tcos.c -+++ b/src/libopensc/pkcs15-tcos.c -@@ -45,6 +45,7 @@ static int insert_cert( - struct sc_pkcs15_cert_info cert_info; - struct sc_pkcs15_object cert_obj; - unsigned char cert[20]; -+ size_t cert_len = 0; - int r; - - memset(&cert_info, 0, sizeof(cert_info)); -@@ -57,25 +58,31 @@ static int insert_cert( - strlcpy(cert_obj.label, label, sizeof(cert_obj.label)); - cert_obj.flags = writable ? SC_PKCS15_CO_FLAG_MODIFIABLE : 0; - -- if(sc_select_file(card, &cert_info.path, NULL)!=SC_SUCCESS){ -- sc_log(ctx, -- "Select(%s) failed\n", path); -+ if (sc_select_file(card, &cert_info.path, NULL) != SC_SUCCESS) { -+ sc_log(ctx, "Select(%s) failed", path); - return 1; - } - r = sc_read_binary(card, 0, cert, sizeof(cert), 0); -- if (r <= 0){ -- sc_log(ctx, -- "ReadBinary(%s) failed\n", path); -+ if (r <= 0) { -+ sc_log(ctx, "ReadBinary(%s) failed\n", path); - return 2; - } -- if(cert[0]!=0x30 || cert[1]!=0x82){ -- sc_log(ctx, -- "Invalid Cert: %02X:%02X:...\n", cert[0], cert[1]); -+ cert_len = r; /* actual number of read bytes */ -+ if (cert_len < 7 || (size_t)(7 + cert[5]) > cert_len) { -+ sc_log(ctx, "Invalid certificate length"); -+ return 3; -+ } -+ if (cert[0] != 0x30 || cert[1] != 0x82) { -+ sc_log(ctx, "Invalid Cert: %02X:%02X:...\n", cert[0], cert[1]); - return 3; - } - - /* some certificates are prefixed by an OID */ -- if(cert[4]==0x06 && cert[5]<10 && cert[6+cert[5]]==0x30 && cert[7+cert[5]]==0x82){ -+ if (cert[4] == 0x06 && cert[5] < 10 && cert[6 + cert[5]] == 0x30 && cert[7 + cert[5]] == 0x82) { -+ if ((size_t)(9 + cert[5]) > cert_len) { -+ sc_log(ctx, "Invalid certificate length"); -+ return 3; -+ } - cert_info.path.index=6+cert[5]; - cert_info.path.count=(cert[8+cert[5]]<<8) + cert[9+cert[5]] + 4; - } else { -@@ -83,12 +90,12 @@ static int insert_cert( - cert_info.path.count=(cert[2]<<8) + cert[3] + 4; - } - -- r=sc_pkcs15emu_add_x509_cert(p15card, &cert_obj, &cert_info); -- if(r!=SC_SUCCESS){ -- sc_log(ctx, "sc_pkcs15emu_add_x509_cert(%s) failed\n", path); -+ r = sc_pkcs15emu_add_x509_cert(p15card, &cert_obj, &cert_info); -+ if (r != SC_SUCCESS) { -+ sc_log(ctx, "sc_pkcs15emu_add_x509_cert(%s) failed", path); - return 4; - } -- sc_log(ctx, "%s: OK, Index=%d, Count=%d\n", path, cert_info.path.index, cert_info.path.count); -+ sc_log(ctx, "%s: OK, Index=%d, Count=%d", path, cert_info.path.index, cert_info.path.count); - return 0; - } - - -From afb1bba4f1966a5b78fdba44b6e7c4dd115cfb29 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Veronika=20Hanul=C3=ADkov=C3=A1?= -Date: Wed, 17 Jul 2024 14:56:22 +0200 -Subject: [PATCH 21/30] pkcs15-lib: Report transport key error - -Thanks Matteo Marini for report -https://github.com/OpenSC/OpenSC/security/advisories/GHSA-p3mx-7472-h3j8 - -fuzz_pkcs15init/17, fuzz_pkcs15init/18 ---- - src/pkcs15init/pkcs15-lib.c | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/src/pkcs15init/pkcs15-lib.c b/src/pkcs15init/pkcs15-lib.c -index 6574e8025d..943d53e987 100644 ---- a/src/pkcs15init/pkcs15-lib.c -+++ b/src/pkcs15init/pkcs15-lib.c -@@ -3831,13 +3831,15 @@ sc_pkcs15init_get_transport_key(struct sc_profile *profile, struct sc_pkcs15_car - if (callbacks.get_key) { - rv = callbacks.get_key(profile, type, reference, defbuf, defsize, pinbuf, pinsize); - LOG_TEST_RET(ctx, rv, "Cannot get key"); -- } -- else if (rv >= 0) { -+ } else if (rv >= 0) { - if (*pinsize < defsize) - LOG_TEST_RET(ctx, SC_ERROR_BUFFER_TOO_SMALL, "Get transport key error"); - - memcpy(pinbuf, data.key_data, data.len); - *pinsize = data.len; -+ } else { -+ /* pinbuf and pinsize were not filled */ -+ LOG_TEST_RET(ctx, SC_ERROR_INTERNAL, "Get transport key error"); - } - - memset(&auth_info, 0, sizeof(auth_info)); - -From 60f08c6fca2f87f30480589d00922599c8189555 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Veronika=20Hanul=C3=ADkov=C3=A1?= -Date: Thu, 18 Jul 2024 09:23:20 +0200 -Subject: [PATCH 22/30] pkcs15-starcos: Check length of file to be non-zero - -Thanks Matteo Marini for report -https://github.com/OpenSC/OpenSC/security/advisories/GHSA-p3mx-7472-h3j8 - -fuzz_pkcs15init/20 ---- - src/pkcs15init/pkcs15-starcos.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/src/pkcs15init/pkcs15-starcos.c b/src/pkcs15init/pkcs15-starcos.c -index bde7413a46..267ad2b04a 100644 ---- a/src/pkcs15init/pkcs15-starcos.c -+++ b/src/pkcs15init/pkcs15-starcos.c -@@ -670,6 +670,8 @@ static int starcos_write_pukey(sc_profile_t *profile, sc_card_t *card, - return r; - len = tfile->size; - sc_file_free(tfile); -+ if (len == 0) -+ return SC_ERROR_INTERNAL; - buf = malloc(len); - if (!buf) - return SC_ERROR_OUT_OF_MEMORY; -@@ -684,7 +686,7 @@ static int starcos_write_pukey(sc_profile_t *profile, sc_card_t *card, - if (num_keys == 0xff) - num_keys = 0; - /* encode public key */ -- keylen = starcos_encode_pukey(rsa, NULL, kinfo); -+ keylen = starcos_encode_pukey(rsa, NULL, kinfo); - if (!keylen) { - free(buf); - return SC_ERROR_INTERNAL; - -From 513d3fdeed6b07f05c8d3bf9532d0b54dcbc3488 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Veronika=20Hanul=C3=ADkov=C3=A1?= -Date: Thu, 18 Jul 2024 09:35:23 +0200 -Subject: [PATCH 23/30] iasecc-sdo: Check length of data before dereferencing - -Thanks Matteo Marini for report -https://github.com/OpenSC/OpenSC/security/advisories/GHSA-p3mx-7472-h3j8 - -fuzz_pkcs15init/21 ---- - src/libopensc/iasecc-sdo.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/src/libopensc/iasecc-sdo.c b/src/libopensc/iasecc-sdo.c -index 417b6dd57d..98402a4e3f 100644 ---- a/src/libopensc/iasecc-sdo.c -+++ b/src/libopensc/iasecc-sdo.c -@@ -760,6 +760,9 @@ iasecc_sdo_parse(struct sc_card *card, unsigned char *data, size_t data_len, str - - LOG_FUNC_CALLED(ctx); - -+ if (data == NULL || data_len < 2) -+ LOG_FUNC_RETURN(ctx, SC_ERROR_INVALID_DATA); -+ - if (*data == IASECC_SDO_TEMPLATE_TAG) { - size_size = iasecc_parse_size(data + 1, data_len - 1, &size); - LOG_TEST_RET(ctx, size_size, "parse error: invalid size data of IASECC_SDO_TEMPLATE"); - -From b1cdaf4b820d6ba6e3f42acd289ef3e6540bb9f3 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Veronika=20Hanul=C3=ADkov=C3=A1?= -Date: Thu, 18 Jul 2024 15:39:15 +0200 -Subject: [PATCH 24/30] card-oberthur: Check length of serial number - -Thanks Matteo Marini for report -https://github.com/OpenSC/OpenSC/security/advisories/GHSA-p3mx-7472-h3j8 - -fuzz_pkcs11/1, fuzz_pkcs15init/2 ---- - src/libopensc/card-oberthur.c | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/src/libopensc/card-oberthur.c b/src/libopensc/card-oberthur.c -index f344d5901f..5920c2c417 100644 ---- a/src/libopensc/card-oberthur.c -+++ b/src/libopensc/card-oberthur.c -@@ -145,7 +145,7 @@ auth_select_aid(struct sc_card *card) - { - struct sc_apdu apdu; - unsigned char apdu_resp[SC_MAX_APDU_BUFFER_SIZE]; -- struct auth_private_data *data = (struct auth_private_data *) card->drv_data; -+ struct auth_private_data *data = (struct auth_private_data *)card->drv_data; - int rv, ii; - struct sc_path tmp_path; - -@@ -162,6 +162,9 @@ auth_select_aid(struct sc_card *card) - - rv = sc_transmit_apdu(card, &apdu); - LOG_TEST_RET(card->ctx, rv, "APDU transmit failed"); -+ if (apdu.resplen < 20) { -+ LOG_TEST_RET(card->ctx, SC_ERROR_UNKNOWN_DATA_RECEIVED, "Serial number has incorrect length"); -+ } - card->serialnr.len = 4; - memcpy(card->serialnr.value, apdu.resp+15, 4); - - -From 67064f41b5dd0947a7fcbc78b7c46d35439c6458 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Veronika=20Hanul=C3=ADkov=C3=A1?= -Date: Thu, 18 Jul 2024 10:16:39 +0200 -Subject: [PATCH 25/30] pkcs15-setcos: Check length of generated key - -Thanks Matteo Marini for report -https://github.com/OpenSC/OpenSC/security/advisories/GHSA-p3mx-7472-h3j8 - -fuzz_pkcs15init/26 ---- - src/pkcs15init/pkcs15-setcos.c | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/src/pkcs15init/pkcs15-setcos.c b/src/pkcs15init/pkcs15-setcos.c -index a445513901..6525541f5a 100644 ---- a/src/pkcs15init/pkcs15-setcos.c -+++ b/src/pkcs15init/pkcs15-setcos.c -@@ -507,6 +507,9 @@ setcos_generate_key(struct sc_profile *profile, struct sc_pkcs15_card *p15card, - r = sc_card_ctl(p15card->card, SC_CARDCTL_SETCOS_GETDATA, &data_obj); - LOG_TEST_RET(ctx, r, "Cannot get key modulus: 'SETCOS_GETDATA' failed"); - -+ if (data_obj.DataLen < 3 || data_obj.DataLen < pubkey->u.rsa.modulus.len) -+ LOG_TEST_RET(ctx, SC_ERROR_UNKNOWN_DATA_RECEIVED, "Cannot get key modulus: wrong length of raw key"); -+ - keybits = ((raw_pubkey[0] * 256) + raw_pubkey[1]); /* modulus bit length */ - if (keybits != key_info->modulus_length) { - sc_log(ctx, -@@ -514,7 +517,7 @@ setcos_generate_key(struct sc_profile *profile, struct sc_pkcs15_card *p15card, - keybits, key_info->modulus_length); - LOG_TEST_RET(ctx, SC_ERROR_PKCS15INIT, "Failed to generate key"); - } -- memcpy (pubkey->u.rsa.modulus.data, &raw_pubkey[2], pubkey->u.rsa.modulus.len); -+ memcpy(pubkey->u.rsa.modulus.data, &raw_pubkey[2], pubkey->u.rsa.modulus.len); - } else { - sc_file_free(file); - } - -From c911e5fca9184b16f94669ca0fa5227aaf0b590e Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Veronika=20Hanul=C3=ADkov=C3=A1?= -Date: Thu, 18 Jul 2024 11:03:46 +0200 -Subject: [PATCH 26/30] iasecc-sdo: Check length of data when parsing - -Thanks Matteo Marini for report -https://github.com/OpenSC/OpenSC/security/advisories/GHSA-p3mx-7472-h3j8 - -fuzz_pkcs15init/27,29 ---- - src/libopensc/iasecc-sdo.c | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git a/src/libopensc/iasecc-sdo.c b/src/libopensc/iasecc-sdo.c -index 98402a4e3f..dbd5b9f08c 100644 ---- a/src/libopensc/iasecc-sdo.c -+++ b/src/libopensc/iasecc-sdo.c -@@ -318,16 +318,25 @@ iasecc_se_parse(struct sc_card *card, unsigned char *data, size_t data_len, stru - - LOG_FUNC_CALLED(ctx); - -+ if (data_len < 1) -+ LOG_FUNC_RETURN(ctx, SC_ERROR_INVALID_DATA); -+ - if (*data == IASECC_SDO_TEMPLATE_TAG) { - size_size = iasecc_parse_size(data + 1, data_len - 1, &size); - LOG_TEST_RET(ctx, size_size, "parse error: invalid size data of IASECC_SDO_TEMPLATE"); - -+ if (data_len - 1 < size) -+ LOG_FUNC_RETURN(ctx, SC_ERROR_INVALID_DATA); -+ - data += size_size + 1; - data_len = size; - sc_log(ctx, - "IASECC_SDO_TEMPLATE: size %"SC_FORMAT_LEN_SIZE_T"u, size_size %d", - size, size_size); - -+ if (data_len < 3) -+ LOG_FUNC_RETURN(ctx, SC_ERROR_INVALID_DATA); -+ - if (*data != IASECC_SDO_TAG_HEADER) - LOG_FUNC_RETURN(ctx, SC_ERROR_INVALID_DATA); - - -From 755448b802a3631724eaf9a3cdece327afd127b7 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Veronika=20Hanul=C3=ADkov=C3=A1?= -Date: Thu, 18 Jul 2024 11:38:25 +0200 -Subject: [PATCH 27/30] pkcs15-sc-hsm: Properly check length of file list - -Thanks Matteo Marini for report -https://github.com/OpenSC/OpenSC/security/advisories/GHSA-p3mx-7472-h3j8 - -fuzz_pkcs15init/8 ---- - src/pkcs15init/pkcs15-sc-hsm.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/pkcs15init/pkcs15-sc-hsm.c b/src/pkcs15init/pkcs15-sc-hsm.c -index 71f96cfc56..db1a2b518f 100644 ---- a/src/pkcs15init/pkcs15-sc-hsm.c -+++ b/src/pkcs15init/pkcs15-sc-hsm.c -@@ -140,7 +140,7 @@ static int sc_hsm_determine_free_id(struct sc_pkcs15_card *p15card, u8 range) - LOG_TEST_RET(card->ctx, filelistlength, "Could not enumerate file and key identifier"); - - for (j = 0; j < 256; j++) { -- for (i = 0; i < filelistlength; i += 2) { -+ for (i = 0; i + 1 < filelistlength; i += 2) { - if ((filelist[i] == range) && (filelist[i + 1] == j)) { - break; - } - -From 9c8c25a82e1ef4b26a1828e430f6efe07f002b8c Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Veronika=20Hanul=C3=ADkov=C3=A1?= -Date: Thu, 18 Jul 2024 12:33:31 +0200 -Subject: [PATCH 28/30] card-coolkey: Check length of buffer before conversion - -Thanks Matteo Marini for report -https://github.com/OpenSC/OpenSC/security/advisories/GHSA-p3mx-7472-h3j8 - -fuzz_pkcs15_reader/3 ---- - src/libopensc/card-coolkey.c | 11 ++++++++--- - 1 file changed, 8 insertions(+), 3 deletions(-) - -diff --git a/src/libopensc/card-coolkey.c b/src/libopensc/card-coolkey.c -index 9192aac092..5d547bc960 100644 ---- a/src/libopensc/card-coolkey.c -+++ b/src/libopensc/card-coolkey.c -@@ -1688,6 +1688,7 @@ static int coolkey_rsa_op(sc_card_t *card, const u8 * data, size_t datalen, - u8 key_number; - size_t params_len; - u8 buf[MAX_COMPUTE_BUF + 2]; -+ size_t buf_len; - u8 *buf_out; - - SC_FUNC_CALLED(card->ctx, SC_LOG_DEBUG_VERBOSE); -@@ -1728,8 +1729,6 @@ static int coolkey_rsa_op(sc_card_t *card, const u8 * data, size_t datalen, - ushort2bebytes(params.init.buf_len, 0); - } else { - /* The data fits in APDU. Copy it to the params object */ -- size_t buf_len; -- - params.init.location = COOLKEY_CRYPT_LOCATION_APDU; - - params_len = sizeof(params.init) + datalen; -@@ -1749,6 +1748,7 @@ static int coolkey_rsa_op(sc_card_t *card, const u8 * data, size_t datalen, - if (r < 0) { - goto done; - } -+ buf_len = crypt_out_len_p; - - if (datalen > MAX_COMPUTE_BUF) { - u8 len_buf[2]; -@@ -1767,7 +1767,12 @@ static int coolkey_rsa_op(sc_card_t *card, const u8 * data, size_t datalen, - priv->nonce, sizeof(priv->nonce)); - - } else { -- size_t out_length = bebytes2ushort(buf); -+ size_t out_length; -+ if (buf_len < 2) { -+ r = SC_ERROR_WRONG_LENGTH; -+ goto done; -+ } -+ out_length = bebytes2ushort(buf); - if (out_length > sizeof buf - 2) { - r = SC_ERROR_WRONG_LENGTH; - goto done; - -From b6754eb3b279505c6d4f09cfa1c77dcad9420468 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Veronika=20Hanul=C3=ADkov=C3=A1?= -Date: Tue, 23 Jul 2024 10:48:32 +0200 -Subject: [PATCH 29/30] card-entersafe: Check length of serial number - -Thanks Matteo Marini for report -https://github.com/OpenSC/OpenSC/security/advisories/GHSA-p3mx-7472-h3j8 - -fuzz_pkcs15_reader/5 ---- - src/libopensc/card-entersafe.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/src/libopensc/card-entersafe.c b/src/libopensc/card-entersafe.c -index 5f6d8a424d..025ebedc91 100644 ---- a/src/libopensc/card-entersafe.c -+++ b/src/libopensc/card-entersafe.c -@@ -1479,6 +1479,8 @@ static int entersafe_get_serialnr(sc_car - r=entersafe_transmit_apdu(card, &apdu,0,0,0,0); - LOG_TEST_RET(card->ctx, r, "APDU transmit failed"); - LOG_TEST_RET(card->ctx, sc_check_sw(card,apdu.sw1,apdu.sw2),"EnterSafe get SN failed"); -+ if (apdu.resplen != 8) -+ LOG_TEST_RET(card->ctx, SC_ERROR_UNKNOWN_DATA_RECEIVED, "Invalid length of SN"); - - card->serialnr.len=serial->len=8; - memcpy(card->serialnr.value,rbuf,8); - -From ab476044a009003262991c065b792baa053c7be5 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Veronika=20Hanul=C3=ADkov=C3=A1?= -Date: Thu, 1 Aug 2024 10:32:40 +0200 -Subject: [PATCH 30/30] card-cardos: Check length of APDU response - ---- - src/libopensc/card-cardos.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/src/libopensc/card-cardos.c b/src/libopensc/card-cardos.c -index 124752d78b..595ec099e3 100644 ---- a/src/libopensc/card-cardos.c -+++ b/src/libopensc/card-cardos.c -@@ -94,7 +94,7 @@ static void fixup_transceive_length(const struct sc_card *card, - - static int cardos_match_card(sc_card_t *card) - { -- unsigned char atr[SC_MAX_ATR_SIZE] = { 0 }; -+ unsigned char atr[SC_MAX_ATR_SIZE] = {0}; - int i; - - i = _sc_match_atr(card, cardos_atrs, &card->type); -@@ -114,8 +114,8 @@ static int cardos_match_card(sc_card_t *card) - return 1; - if (card->type == SC_CARD_TYPE_CARDOS_M4_2) { - int rv; -- sc_apdu_t apdu = { 0 }; -- u8 rbuf[SC_MAX_APDU_BUFFER_SIZE] = { 0 }; -+ sc_apdu_t apdu = {0}; -+ u8 rbuf[SC_MAX_APDU_BUFFER_SIZE] = {0}; - /* first check some additional ATR bytes */ - if ((atr[4] != 0xff && atr[4] != 0x02) || - (atr[6] != 0x10 && atr[6] != 0x0a) || -@@ -131,7 +131,7 @@ static int cardos_match_card(sc_card_t *card) - apdu.lc = 0; - rv = sc_transmit_apdu(card, &apdu); - LOG_TEST_RET(card->ctx, rv, "APDU transmit failed"); -- if (apdu.sw1 != 0x90 || apdu.sw2 != 0x00) -+ if (apdu.sw1 != 0x90 || apdu.sw2 != 0x00 || apdu.resplen < 2) - return 0; - if (apdu.resp[0] != atr[10] || - apdu.resp[1] != atr[11]) diff --git a/sources/meta-openembedded/meta-oe/recipes-support/opensc/files/CVE-2024-8443-0001.patch b/sources/meta-openembedded/meta-oe/recipes-support/opensc/files/CVE-2024-8443-0001.patch deleted file mode 100644 index 7d80aba7..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/opensc/files/CVE-2024-8443-0001.patch +++ /dev/null @@ -1,60 +0,0 @@ -From b28a3cef416fcfb92fbb9ea7fd3c71df52c6c9fc Mon Sep 17 00:00:00 2001 -From: Jakub Jelen -Date: Mon, 12 Aug 2024 19:02:14 +0200 -Subject: [PATCH] openpgp: Do not accept non-matching key responses - -When generating RSA key pair using PKCS#15 init, the driver could accept -responses relevant to ECC keys, which made further processing in the -pkcs15-init failing/accessing invalid parts of structures. - -Thanks oss-fuzz! - -https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=71010 - -Signed-off-by: Jakub Jelen - -CVE: CVE-2024-8443 -Upstream-Status: Backport [https://github.com/OpenSC/OpenSC/commit/b28a3cef416fcfb92fbb9ea7fd3c71df52c6c9fc] - -Signed-off-by: Zhang Peng ---- - src/libopensc/card-openpgp.c | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/src/libopensc/card-openpgp.c b/src/libopensc/card-openpgp.c -index fad32f0ce..f99ec0db9 100644 ---- a/src/libopensc/card-openpgp.c -+++ b/src/libopensc/card-openpgp.c -@@ -2877,6 +2877,9 @@ pgp_parse_and_set_pubkey_output(sc_card_t *card, u8* data, size_t data_len, - - /* RSA modulus */ - if (tag == 0x0081) { -+ if (key_info->algorithm != SC_OPENPGP_KEYALGO_RSA) { -+ LOG_FUNC_RETURN(card->ctx, SC_ERROR_UNKNOWN_DATA_RECEIVED); -+ } - if ((BYTES4BITS(key_info->u.rsa.modulus_len) < len) /* modulus_len is in bits */ - || key_info->u.rsa.modulus == NULL) { - -@@ -2892,6 +2895,9 @@ pgp_parse_and_set_pubkey_output(sc_card_t *card, u8* data, size_t data_len, - } - /* RSA public exponent */ - else if (tag == 0x0082) { -+ if (key_info->algorithm != SC_OPENPGP_KEYALGO_RSA) { -+ LOG_FUNC_RETURN(card->ctx, SC_ERROR_UNKNOWN_DATA_RECEIVED); -+ } - if ((BYTES4BITS(key_info->u.rsa.exponent_len) < len) /* exponent_len is in bits */ - || key_info->u.rsa.exponent == NULL) { - -@@ -2907,6 +2913,10 @@ pgp_parse_and_set_pubkey_output(sc_card_t *card, u8* data, size_t data_len, - } - /* ECC public key */ - else if (tag == 0x0086) { -+ if (key_info->algorithm != SC_OPENPGP_KEYALGO_ECDSA && -+ key_info->algorithm != SC_OPENPGP_KEYALGO_ECDH) { -+ LOG_FUNC_RETURN(card->ctx, SC_ERROR_UNKNOWN_DATA_RECEIVED); -+ } - /* set the output data */ - /* len is ecpoint length + format byte - * see section 7.2.14 of 3.3.1 specs */ --- -2.34.1 diff --git a/sources/meta-openembedded/meta-oe/recipes-support/opensc/files/CVE-2024-8443-0002.patch b/sources/meta-openembedded/meta-oe/recipes-support/opensc/files/CVE-2024-8443-0002.patch deleted file mode 100644 index 30a7e63a..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/opensc/files/CVE-2024-8443-0002.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 02e847458369c08421fd2d5e9a16a5f272c2de9e Mon Sep 17 00:00:00 2001 -From: Jakub Jelen -Date: Thu, 15 Aug 2024 11:13:47 +0200 -Subject: [PATCH] openpgp: Avoid buffer overflow when writing fingerprint - -Fix also surrounding code to return error (not just log it) -when some step fails. - -Thanks oss-fuzz - -https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=70933 - -Signed-off-by: Jakub Jelen - -CVE: CVE-2024-8443 -Upstream-Status: Backport [https://github.com/OpenSC/OpenSC/commit/02e847458369c08421fd2d5e9a16a5f272c2de9e] - -Signed-off-by: Zhang Peng ---- - src/libopensc/card-openpgp.c | 17 ++++++++++++----- - 1 file changed, 12 insertions(+), 5 deletions(-) - -diff --git a/src/libopensc/card-openpgp.c b/src/libopensc/card-openpgp.c -index f99ec0db9..3957440de 100644 ---- a/src/libopensc/card-openpgp.c -+++ b/src/libopensc/card-openpgp.c -@@ -2756,14 +2756,21 @@ pgp_calculate_and_store_fingerprint(sc_card_t *card, time_t ctime, - /* update the blob containing fingerprints (00C5) */ - sc_log(card->ctx, "Updating fingerprint blob 00C5."); - fpseq_blob = pgp_find_blob(card, 0x00C5); -- if (fpseq_blob == NULL) -- LOG_TEST_GOTO_ERR(card->ctx, SC_ERROR_OUT_OF_MEMORY, "Cannot find blob 00C5"); -+ if (fpseq_blob == NULL) { -+ r = SC_ERROR_OUT_OF_MEMORY; -+ LOG_TEST_GOTO_ERR(card->ctx, r, "Cannot find blob 00C5"); -+ } -+ if (20 * key_info->key_id > fpseq_blob->len) { -+ r = SC_ERROR_OBJECT_NOT_VALID; -+ LOG_TEST_GOTO_ERR(card->ctx, r, "The 00C5 blob is not large enough"); -+ } - - /* save the fingerprints sequence */ - newdata = malloc(fpseq_blob->len); -- if (newdata == NULL) -- LOG_TEST_GOTO_ERR(card->ctx, SC_ERROR_OUT_OF_MEMORY, -- "Not enough memory to update fingerprint blob 00C5"); -+ if (newdata == NULL) { -+ r = SC_ERROR_OUT_OF_MEMORY; -+ LOG_TEST_GOTO_ERR(card->ctx, r, "Not enough memory to update fingerprint blob 00C5"); -+ } - - memcpy(newdata, fpseq_blob->data, fpseq_blob->len); - /* move p to the portion holding the fingerprint of the current key */ --- -2.34.1 diff --git a/sources/meta-openembedded/meta-oe/recipes-support/opensc/opensc_0.25.1.bb b/sources/meta-openembedded/meta-oe/recipes-support/opensc/opensc_0.25.1.bb index e41c457f..636bfa03 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/opensc/opensc_0.25.1.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/opensc/opensc_0.25.1.bb @@ -5,28 +5,23 @@ functionality (e.g. SELECT FILE, READ BINARY) should work on any ISO\ keys on the smart card is possible with PKCS\ such as the FINEID (Finnish Electronic IDentity) card. Swedish Posten\ eID cards have also been confirmed to work." - HOMEPAGE = "https://github.com/OpenSC/OpenSC/wiki" SECTION = "System Environment/Libraries" -LICENSE = "LGPL-2.0-or-later" +LICENSE = "LGPL-2.1-or-later" LIC_FILES_CHKSUM = "file://COPYING;md5=cb8aedd3bced19bd8026d96a8b6876d7" +DEPENDS = "openssl" -#v0.21.0 SRCREV = "0a4b772d6fdab9bfaaa3123775a48a7cb6c5e7c6" -SRC_URI = "git://github.com/OpenSC/OpenSC;branch=stable-0.25;protocol=https \ - file://0001-PR-Fixes-for-uninitialized-memory-issues.patch \ - file://CVE-2024-8443-0001.patch \ - file://CVE-2024-8443-0002.patch \ - " -DEPENDS = "virtual/libiconv openssl" +SRC_URI = "git://github.com/OpenSC/OpenSC;branch=stable-0.25;protocol=https" S = "${WORKDIR}/git" + inherit autotools pkgconfig bash-completion EXTRA_OECONF = " \ - --disable-static \ --disable-ctapi \ --disable-doc \ + --disable-static \ --disable-strict \ " EXTRA_OEMAKE = "DESTDIR=${D}" @@ -35,12 +30,10 @@ PACKAGECONFIG ??= "pcsc" PACKAGECONFIG[openct] = "--enable-openct,--disable-openct,openct" PACKAGECONFIG[pcsc] = "--enable-pcsc,--disable-pcsc,pcsc-lite,pcsc-lite pcsc-lite-lib" - -RDEPENDS:${PN} = "readline" +PACKAGECONFIG[readline] = "--enable-readline,--disable-readline,readline" FILES:${PN} += "\ ${libdir}/opensc-pkcs11.so \ - ${libdir}/onepin-opensc-pkcs11.so \ ${libdir}/pkcs11-spy.so \ " FILES:${PN}-dev += "\ diff --git a/sources/meta-openembedded/meta-oe/recipes-support/opentelemetry/opentelemetry-cpp/0001-Fix-build-with-clang-19.patch b/sources/meta-openembedded/meta-oe/recipes-support/opentelemetry/opentelemetry-cpp/0001-Fix-build-with-clang-19.patch new file mode 100644 index 00000000..2651eb6a --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/opentelemetry/opentelemetry-cpp/0001-Fix-build-with-clang-19.patch @@ -0,0 +1,56 @@ +From 1a5b4035e4cb75b87c716b4ebd5ffe32cd604c6e Mon Sep 17 00:00:00 2001 +From: "Sergey A. Osokin" +Date: Sun, 8 Sep 2024 17:14:25 -0400 +Subject: [PATCH] Fix build with clang 19 + +Please see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=281359 +for details. + +Upstream-Status: Submitted [https://github.com/open-telemetry/opentelemetry-cpp/pull/3055] +Credit: Dimitry Andric +Signed-off-by: Khem Raj +--- + api/include/opentelemetry/logs/event_logger.h | 2 +- + api/include/opentelemetry/logs/logger.h | 2 +- + api/include/opentelemetry/logs/logger_type_traits.h | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/api/include/opentelemetry/logs/event_logger.h b/api/include/opentelemetry/logs/event_logger.h +index b5c94a70..5892e041 100644 +--- a/api/include/opentelemetry/logs/event_logger.h ++++ b/api/include/opentelemetry/logs/event_logger.h +@@ -66,7 +66,7 @@ class EventLogger + nostd::unique_ptr log_record = delegate_logger->CreateLogRecord(); + + IgnoreTraitResult( +- detail::LogRecordSetterTrait::type>::template Set( ++ detail::LogRecordSetterTrait::type>::template Set<>( + log_record.get(), std::forward(args))...); + + EmitEvent(event_name, std::move(log_record)); +diff --git a/api/include/opentelemetry/logs/logger.h b/api/include/opentelemetry/logs/logger.h +index dc09a0c2..19da3942 100644 +--- a/api/include/opentelemetry/logs/logger.h ++++ b/api/include/opentelemetry/logs/logger.h +@@ -73,7 +73,7 @@ class Logger + } + + IgnoreTraitResult( +- detail::LogRecordSetterTrait::type>::template Set( ++ detail::LogRecordSetterTrait::type>::template Set<>( + log_record.get(), std::forward(args))...); + + EmitLogRecord(std::move(log_record)); +diff --git a/api/include/opentelemetry/logs/logger_type_traits.h b/api/include/opentelemetry/logs/logger_type_traits.h +index 48613513..f140a545 100644 +--- a/api/include/opentelemetry/logs/logger_type_traits.h ++++ b/api/include/opentelemetry/logs/logger_type_traits.h +@@ -166,7 +166,7 @@ struct LogRecordSetterTrait + * = nullptr> + inline static LogRecord *Set(LogRecord *log_record, ArgumentType &&arg) noexcept + { +- return LogRecordSetterTrait::template Set( ++ return LogRecordSetterTrait::template Set<>( + log_record, std::forward(arg)); + } + diff --git a/sources/meta-openembedded/meta-oe/recipes-support/opentelemetry/opentelemetry-cpp_1.16.1.bb b/sources/meta-openembedded/meta-oe/recipes-support/opentelemetry/opentelemetry-cpp_1.16.1.bb new file mode 100644 index 00000000..1d86f1ab --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/opentelemetry/opentelemetry-cpp_1.16.1.bb @@ -0,0 +1,29 @@ +SUMMARY = "Open Telemetry Library" +DESCRIPTION = "An Observability framework to create and manage telemetry data \ +such as traces, metrics, and logs." +HOMEPAGE = "https://github.com/open-telemetry/opentelemetry-cpp" +SECTION = "libs" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" + +DEPENDS = "nlohmann-json" + +SRC_URI = "git://github.com/open-telemetry/opentelemetry-cpp.git;protocol=https;branch=main \ + file://0001-Fix-build-with-clang-19.patch" +SRCREV = "baecbb95bd63df53e0af16e87bc683967962c5f8" + +S = "${WORKDIR}/git" +inherit cmake pkgconfig lib_package + +LDFLAGS:append:riscv32 = " -latomic" + +PACKAGECONFIG ?= "opentelemety_install otlp_api" + +PACKAGECONFIG[opentelemety_install]="-DOPENTELEMETRY_INSTALL=ON,-DOPENTELEMETRY_INSTALL=OFF" +PACKAGECONFIG[build_package]="-DBUILD_PACKAGE=ON,-DBUILD_PACKAGE=OFF" +PACKAGECONFIG[otlp_api]="-DWITH_OTLP_API=ON,-DWITH_OTLP_API=OFF" +PACKAGECONFIG[otlp_grpc]="-DWITH_OTLP_GRPC=ON,-DWITH_OTLP_GRPC=OFF" +PACKAGECONFIG[otlp_http]="-DWITH_OTLP_HTTP=ON,-DWITH_OTLP_HTTP=OFF" +PACKAGECONFIG[otlp_prometheus]="-DWITH_PROMETHEUS=ON,-DWITH_PROMETHEUS=OFF" +PACKAGECONFIG[benchmark]="-DWITH_BENCHMARK=ON,-DWITH_BENCHMARK=OFF" +PACKAGECONFIG[testing]="-DBUILD_TESTING=ON,-DBUILD_TESTING=OFF" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/pcp/pcp_6.0.5.bb b/sources/meta-openembedded/meta-oe/recipes-support/pcp/pcp_6.0.5.bb index 6a93b2ec..f6f2a657 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/pcp/pcp_6.0.5.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/pcp/pcp_6.0.5.bb @@ -52,7 +52,7 @@ RDEPENDS:${PN}-testsuite += "${PN} bash perl" RDEPENDS:python3-${PN} += "${PN} python3" do_configure:prepend () { - cp ${WORKDIR}/config.linux ${B} + cp ${UNPACKDIR}/config.linux ${B} rm -rf ${S}/include/pcp/configsz.h rm -rf ${S}/include/pcp/platformsz.h export SED=${TMPDIR}/hosttools/sed @@ -93,6 +93,10 @@ do_install () { sed -i "s#PCP_SORT_PROG=.*#PCP_SORT_PROG=sort#" ${D}/${sysconfdir}/pcp.conf sed -i "s#PCP_ECHO_PROG=.*#PCP_ECHO_PROG=echo#" ${D}/${sysconfdir}/pcp.conf sed -i "s#PCP_WHICH_PROG=.*#PCP_WHICH_PROG=which#" ${D}/${sysconfdir}/pcp.conf + sed -i -e 's#${RECIPE_SYSROOT}##g' ${D}/${sysconfdir}/pcp.conf + sed -i -e 's#${RECIPE_SYSROOT}##g' \ + -e 's#${RECIPE_SYSROOT_NATIVE}##g' \ + -e 's#${TMPDIR}##g' ${D}${includedir}/pcp/builddefs } PACKAGES += " ${PN}-export-zabbix-agent ${PN}-testsuite \ diff --git a/sources/meta-openembedded/meta-oe/recipes-support/pcsc-tools/pcsc-tools_1.7.1.bb b/sources/meta-openembedded/meta-oe/recipes-support/pcsc-tools/pcsc-tools_1.7.1.bb deleted file mode 100644 index 97a94ec9..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/pcsc-tools/pcsc-tools_1.7.1.bb +++ /dev/null @@ -1,25 +0,0 @@ -SUMMARY = "Some tools to be used with smart cards and PC/SC" -HOMEPAGE = "http://ludovic.rousseau.free.fr/softwares/pcsc-tools" -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://LICENCE;md5=94d55d512a9ba36caa9b7df079bae19f" - -SRC_URI = "git://github.com/LudovicRousseau/pcsc-tools;protocol=https;branch=master" - -SRCREV = "53834cd33155ae1f0332102b1baca6ce63660fc5" - -inherit autotools pkgconfig - -S = "${WORKDIR}/git" - -DEPENDS = "pcsc-lite autoconf-archive-native" - -RDEPENDS:${PN} += " \ - ${@bb.utils.contains('DISTRO_FEATURES','systemd','pcsc-lite-systemd', 'pcsc-lite', d)} \ - perl \ - perl-module-getopt-std \ - perl-module-file-stat \ - libpcsc-perl \ -" - -FILES:${PN} += "${datadir}/pcsc/smartcard_list.txt \ - ${datadir}/pcsc/gscriptor.png" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/pcsc-tools/pcsc-tools_1.7.2.bb b/sources/meta-openembedded/meta-oe/recipes-support/pcsc-tools/pcsc-tools_1.7.2.bb new file mode 100644 index 00000000..1dfba7c7 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/pcsc-tools/pcsc-tools_1.7.2.bb @@ -0,0 +1,25 @@ +SUMMARY = "Some tools to be used with smart cards and PC/SC" +HOMEPAGE = "http://ludovic.rousseau.free.fr/softwares/pcsc-tools" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://LICENCE;md5=94d55d512a9ba36caa9b7df079bae19f" + +SRC_URI = "git://github.com/LudovicRousseau/pcsc-tools;protocol=https;branch=master" + +SRCREV = "778da3d86a59f5166443118c158e11ba4da9a5f1" + +inherit autotools pkgconfig + +S = "${WORKDIR}/git" + +DEPENDS = "pcsc-lite autoconf-archive-native" + +RDEPENDS:${PN} += " \ + ${@bb.utils.contains('DISTRO_FEATURES','systemd','pcsc-lite-systemd', 'pcsc-lite', d)} \ + perl \ + perl-module-getopt-std \ + perl-module-file-stat \ + libpcsc-perl \ +" + +FILES:${PN} += "${datadir}/pcsc/smartcard_list.txt \ + ${datadir}/pcsc/gscriptor.png" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/picocom/picocom_2024.bb b/sources/meta-openembedded/meta-oe/recipes-support/picocom/picocom_2024.bb new file mode 100644 index 00000000..c0c3e25d --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/picocom/picocom_2024.bb @@ -0,0 +1,21 @@ +SUMMARY = "Lightweight and minimal dumb-terminal emulation program" +SECTION = "console/utils" +LICENSE = "GPL-2.0-or-later" +HOMEPAGE = "https://gitlab.com/wsakernel/picocom" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3000e4830620e310fe65c0eb69df9e8a" + +SRCREV = "7b6acbd421a2d4ca99376b7b427828dc1bcba4d8" + +SRC_URI = "git://gitlab.com/wsakernel/picocom;branch=master;protocol=https \ + " + +S = "${WORKDIR}/git" + +EXTRA_OEMAKE = "'CC=${CC}' 'LD=${CC}' 'VERSION=${PV}' \ + 'CFLAGS=${CFLAGS}' 'LDFLAGS=${LDFLAGS}' " + +do_install () { + install -d ${D}${bindir} + install -m 0755 ${BPN} pcasc pcxm pcym pczm ${D}${bindir}/ +} + diff --git a/sources/meta-openembedded/meta-oe/recipes-support/picocom/picocom_git.bb b/sources/meta-openembedded/meta-oe/recipes-support/picocom/picocom_git.bb deleted file mode 100644 index cc0d88fa..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/picocom/picocom_git.bb +++ /dev/null @@ -1,24 +0,0 @@ -SUMMARY = "Lightweight and minimal dumb-terminal emulation program" -SECTION = "console/utils" -LICENSE = "GPL-2.0-or-later" -HOMEPAGE = "https://gitlab.com/wsakernel/picocom" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3000e4830620e310fe65c0eb69df9e8a" - -BASEPV = "2023-04" -PV = "${BASEPV}+git" - -SRCREV = "12537df0314767d5af35bddddbbca3694e6a0342" - -SRC_URI = "git://gitlab.com/wsakernel/picocom;branch=master;protocol=https \ - " - -S = "${WORKDIR}/git" - -EXTRA_OEMAKE = "'CC=${CC}' 'LD=${CC}' 'VERSION=${BASEPV}' \ - 'CFLAGS=${CFLAGS}' 'LDFLAGS=${LDFLAGS}' " - -do_install () { - install -d ${D}${bindir} - install -m 0755 ${BPN} pcasc pcxm pcym pczm ${D}${bindir}/ -} - diff --git a/sources/meta-openembedded/meta-oe/recipes-support/pidgin/funyahoo-plusplus_git.bb b/sources/meta-openembedded/meta-oe/recipes-support/pidgin/funyahoo-plusplus_git.bb index ad6a7501..9337ae59 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/pidgin/funyahoo-plusplus_git.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/pidgin/funyahoo-plusplus_git.bb @@ -10,6 +10,9 @@ inherit pkgconfig SRC_URI = "git://github.com/EionRobb/funyahoo-plusplus;branch=master;protocol=https" SRCREV = "fbbd9c591100aa00a0487738ec7b6acd3d924b3f" +# Upstream repo does not tag +UPSTREAM_CHECK_COMMITS = "1" + S = "${WORKDIR}/git" do_compile() { diff --git a/sources/meta-openembedded/meta-oe/recipes-support/pidgin/icyque_git.bb b/sources/meta-openembedded/meta-oe/recipes-support/pidgin/icyque_git.bb index ed58c4a7..b2f9944c 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/pidgin/icyque_git.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/pidgin/icyque_git.bb @@ -12,6 +12,9 @@ inherit pkgconfig SRC_URI = "git://github.com/EionRobb/icyque;branch=master;protocol=https" SRCREV = "513fc162d5d1a201c2b044e2b42941436d1069d5" +# Upstream repo does not tag +UPSTREAM_CHECK_COMMITS = "1" + S = "${WORKDIR}/git" do_compile() { diff --git a/sources/meta-openembedded/meta-oe/recipes-support/pidgin/libgnt_2.14.1.bb b/sources/meta-openembedded/meta-oe/recipes-support/pidgin/libgnt_2.14.1.bb index d17a6230..f2fe4a7a 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/pidgin/libgnt_2.14.1.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/pidgin/libgnt_2.14.1.bb @@ -15,6 +15,9 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/project/pidgin/${BPN}/${PV}/${BP}.tar.xz \ " SRC_URI[sha256sum] = "5ec3e68e18f956e9998d79088b299fa3bca689bcc95c86001bc5da17c1eb4bd8" +UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/pidgin/files/libgnt/" +UPSTREAM_CHECK_REGEX = "${BPN}/(?P\d+(\.\d+)+)" + EXTRA_OEMESON = "-Dintrospection=false -Ddoc=false" FILES:${PN} += "${libdir}/gnt/s.so ${libdir}/gnt/irssi.so" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/pidgin/pidgin-sipe_1.25.0.bb b/sources/meta-openembedded/meta-oe/recipes-support/pidgin/pidgin-sipe_1.25.0.bb index 6ce42ec1..e96e1186 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/pidgin/pidgin-sipe_1.25.0.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/pidgin/pidgin-sipe_1.25.0.bb @@ -37,3 +37,7 @@ FILES:${PN} += " \ ${datadir}/appdata \ ${datadir}/metainfo \ " + +# http://errors.yoctoproject.org/Errors/Details/766947/ +# pidgin-sipe-1.25.0/src/core/sipe-xml.c:210:9: error: initialization of 'void (*)(void *, const xmlError *)' {aka 'void (*)(void *, const struct _xmlError *)'} from incompatible pointer type 'void (*)(void *, xmlError *)' {aka 'void (*)(void *, struct _xmlError *)'} [-Wincompatible-pointer-types] +CFLAGS += "-Wno-error=incompatible-pointer-types" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/pidgin/pidgin/fix_incompatible_pointer_types_for_gtkitemfactorycallbacks_on_gcc-14.patch b/sources/meta-openembedded/meta-oe/recipes-support/pidgin/pidgin/fix_incompatible_pointer_types_for_gtkitemfactorycallbacks_on_gcc-14.patch new file mode 100644 index 00000000..4e088ffc --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/pidgin/pidgin/fix_incompatible_pointer_types_for_gtkitemfactorycallbacks_on_gcc-14.patch @@ -0,0 +1,177 @@ +# HG changeset patch +# User Yoann Congal +# Date 1720270125 -7200 +# Sat Jul 06 14:48:45 2024 +0200 +# Branch gcc-14-incompatible-pointer-types +# Node ID 06721b86a5a8e6fb8163d9411a7778d2a0274b26 +# Parent 21a56db5f9987efb88d76ab26ee1eadf316f3d7d +Fix incompatible pointer types for GtkItemFactoryCallbacks on gcc-14 + +The GtkItemFactoryEntry struct callback is of type GtkItemFactoryCallbacks +(aka void (*)(void)) but is initialised with GtkItemFactoryCallback1 types +(aka void (*)(void *, guint, GtkWidget *)). + +This is coherent with the gtk-2 documentation: +> gtk_item_factory_create_items(..., GtkItemFactoryEntry *entries,...) +> entries : an array of GtkItemFactoryEntrys whose callback members must by of +> type GtkItemFactoryCallback1 + +But, under gcc-14, the implicit cast from GtkItemFactoryCallback1 to +GtkItemFactoryCallback triggers an incompatible-pointer-types error (See [0]). + +An exemple of this error: +pidgin/gtkconv.c:3096:66: error: initialization of 'void (*)(void)' from incompatible pointer type 'void (*)(void *, guint, GtkWidget *)' {aka 'void (*)(void *, unsigned int, struct _GtkWidget *)'} [-Wincompatible-pointer-types] + 3096 | { N_("/Conversation/New Instant _Message..."), "M", menu_new_conv_cb, + | ^~~~~~~~~~~~~~~~ +pidgin/gtkconv.c:3096:66: note: (near initialization for 'menu_items[1].callback') + +To fix this, explicitely cast to GtkItemFactoryCallback where needed. + +Testing Done: +Built with gcc-14, started and clicked on some affected menus + +[0]: https://gcc.gnu.org/gcc-14/porting_to.html#incompatible-pointer-types + +Upstream-Status: Backport [https://keep.imfreedom.org/pidgin/pidgin/rev/210f318db492] +Signed-off-by: Yoann Congal + +diff --git a/pidgin/gtkblist.c b/pidgin/gtkblist.c +--- a/pidgin/gtkblist.c ++++ b/pidgin/gtkblist.c +@@ -3624,11 +3624,11 @@ static GtkItemFactoryEntry blist_menu[] + { N_("/Buddies/View User _Log..."), "L", pidgin_dialogs_log, 0, "", NULL }, + { "/Buddies/sep1", NULL, NULL, 0, "", NULL }, + { N_("/Buddies/Sh_ow"), NULL, NULL, 0, "", NULL}, +- { N_("/Buddies/Show/_Offline Buddies"), NULL, pidgin_blist_edit_mode_cb, 1, "", NULL }, +- { N_("/Buddies/Show/_Empty Groups"), NULL, pidgin_blist_show_empty_groups_cb, 1, "", NULL }, +- { N_("/Buddies/Show/Buddy _Details"), NULL, pidgin_blist_buddy_details_cb, 1, "", NULL }, +- { N_("/Buddies/Show/Idle _Times"), NULL, pidgin_blist_show_idle_time_cb, 1, "", NULL }, +- { N_("/Buddies/Show/_Protocol Icons"), NULL, pidgin_blist_show_protocol_icons_cb, 1, "", NULL }, ++ { N_("/Buddies/Show/_Offline Buddies"), NULL, (GtkItemFactoryCallback)pidgin_blist_edit_mode_cb, 1, "", NULL }, ++ { N_("/Buddies/Show/_Empty Groups"), NULL, (GtkItemFactoryCallback)pidgin_blist_show_empty_groups_cb, 1, "", NULL }, ++ { N_("/Buddies/Show/Buddy _Details"), NULL, (GtkItemFactoryCallback)pidgin_blist_buddy_details_cb, 1, "", NULL }, ++ { N_("/Buddies/Show/Idle _Times"), NULL, (GtkItemFactoryCallback)pidgin_blist_show_idle_time_cb, 1, "", NULL }, ++ { N_("/Buddies/Show/_Protocol Icons"), NULL, (GtkItemFactoryCallback)pidgin_blist_show_protocol_icons_cb, 1, "", NULL }, + { N_("/Buddies/_Sort Buddies"), NULL, NULL, 0, "", NULL }, + { "/Buddies/sep2", NULL, NULL, 0, "", NULL }, + { N_("/Buddies/_Add Buddy..."), "B", pidgin_blist_add_buddy_cb, 0, "", GTK_STOCK_ADD }, +@@ -3651,11 +3651,11 @@ static GtkItemFactoryEntry blist_menu[] + { N_("/Tools/Pr_ivacy"), NULL, pidgin_privacy_dialog_show, 0, "", NULL }, + { N_("/Tools/Set _Mood"), "D", set_mood_show, 0, "", NULL }, + { "/Tools/sep2", NULL, NULL, 0, "", NULL }, +- { N_("/Tools/_File Transfers"), "T", pidgin_xfer_dialog_show, 0, "", PIDGIN_STOCK_TOOLBAR_TRANSFER }, ++ { N_("/Tools/_File Transfers"), "T", (GtkItemFactoryCallback)pidgin_xfer_dialog_show, 0, "", PIDGIN_STOCK_TOOLBAR_TRANSFER }, + { N_("/Tools/R_oom List"), NULL, pidgin_roomlist_dialog_show, 0, "", NULL }, + { N_("/Tools/System _Log"), NULL, gtk_blist_show_systemlog_cb, 3, "", NULL }, + { "/Tools/sep3", NULL, NULL, 0, "", NULL }, +- { N_("/Tools/Mute _Sounds"), NULL, pidgin_blist_mute_sounds_cb, 0, "", NULL }, ++ { N_("/Tools/Mute _Sounds"), NULL, (GtkItemFactoryCallback)pidgin_blist_mute_sounds_cb, 0, "", NULL }, + /* Help */ + { N_("/_Help"), NULL, NULL, 0, "", NULL }, + { N_("/Help/Online _Help"), "F1", gtk_blist_show_onlinehelp_cb, 0, "", GTK_STOCK_HELP }, +diff --git a/pidgin/gtkconv.c b/pidgin/gtkconv.c +--- a/pidgin/gtkconv.c ++++ b/pidgin/gtkconv.c +@@ -3093,76 +3093,76 @@ static GtkItemFactoryEntry menu_items[] + /* Conversation menu */ + { N_("/_Conversation"), NULL, NULL, 0, "", NULL }, + +- { N_("/Conversation/New Instant _Message..."), "M", menu_new_conv_cb, ++ { N_("/Conversation/New Instant _Message..."), "M", (GtkItemFactoryCallback)menu_new_conv_cb, + 0, "", PIDGIN_STOCK_TOOLBAR_MESSAGE_NEW }, +- { N_("/Conversation/Join a _Chat..."), NULL, menu_join_chat_cb, ++ { N_("/Conversation/Join a _Chat..."), NULL, (GtkItemFactoryCallback)menu_join_chat_cb, + 0, "", PIDGIN_STOCK_CHAT }, + + { "/Conversation/sep0", NULL, NULL, 0, "", NULL }, + +- { N_("/Conversation/_Find..."), NULL, menu_find_cb, 0, ++ { N_("/Conversation/_Find..."), NULL, (GtkItemFactoryCallback)menu_find_cb, 0, + "", GTK_STOCK_FIND }, +- { N_("/Conversation/View _Log"), NULL, menu_view_log_cb, 0, "", NULL }, +- { N_("/Conversation/_Save As..."), NULL, menu_save_as_cb, 0, ++ { N_("/Conversation/View _Log"), NULL, (GtkItemFactoryCallback)menu_view_log_cb, 0, "", NULL }, ++ { N_("/Conversation/_Save As..."), NULL, (GtkItemFactoryCallback)menu_save_as_cb, 0, + "", GTK_STOCK_SAVE_AS }, +- { N_("/Conversation/Clea_r Scrollback"), "L", menu_clear_cb, 0, "", GTK_STOCK_CLEAR }, ++ { N_("/Conversation/Clea_r Scrollback"), "L", (GtkItemFactoryCallback)menu_clear_cb, 0, "", GTK_STOCK_CLEAR }, + + { "/Conversation/sep1", NULL, NULL, 0, "", NULL }, + + #ifdef USE_VV + { N_("/Conversation/M_edia"), NULL, NULL, 0, "", NULL }, + +- { N_("/Conversation/Media/_Audio Call"), NULL, menu_initiate_media_call_cb, 0, ++ { N_("/Conversation/Media/_Audio Call"), NULL, (GtkItemFactoryCallback)menu_initiate_media_call_cb, 0, + "", PIDGIN_STOCK_TOOLBAR_AUDIO_CALL }, +- { N_("/Conversation/Media/_Video Call"), NULL, menu_initiate_media_call_cb, 1, ++ { N_("/Conversation/Media/_Video Call"), NULL, (GtkItemFactoryCallback)menu_initiate_media_call_cb, 1, + "", PIDGIN_STOCK_TOOLBAR_VIDEO_CALL }, +- { N_("/Conversation/Media/Audio\\/Video _Call"), NULL, menu_initiate_media_call_cb, 2, ++ { N_("/Conversation/Media/Audio\\/Video _Call"), NULL, (GtkItemFactoryCallback)menu_initiate_media_call_cb, 2, + "", PIDGIN_STOCK_TOOLBAR_VIDEO_CALL }, + #endif + +- { N_("/Conversation/Se_nd File..."), NULL, menu_send_file_cb, 0, "", PIDGIN_STOCK_TOOLBAR_SEND_FILE }, +- { N_("/Conversation/Get _Attention"), NULL, menu_get_attention_cb, 0, "", PIDGIN_STOCK_TOOLBAR_SEND_ATTENTION }, +- { N_("/Conversation/Add Buddy _Pounce..."), NULL, menu_add_pounce_cb, ++ { N_("/Conversation/Se_nd File..."), NULL, (GtkItemFactoryCallback)menu_send_file_cb, 0, "", PIDGIN_STOCK_TOOLBAR_SEND_FILE }, ++ { N_("/Conversation/Get _Attention"), NULL, (GtkItemFactoryCallback)menu_get_attention_cb, 0, "", PIDGIN_STOCK_TOOLBAR_SEND_ATTENTION }, ++ { N_("/Conversation/Add Buddy _Pounce..."), NULL, (GtkItemFactoryCallback)menu_add_pounce_cb, + 0, "", NULL }, +- { N_("/Conversation/_Get Info"), "O", menu_get_info_cb, 0, ++ { N_("/Conversation/_Get Info"), "O", (GtkItemFactoryCallback)menu_get_info_cb, 0, + "", PIDGIN_STOCK_TOOLBAR_USER_INFO }, +- { N_("/Conversation/In_vite..."), NULL, menu_invite_cb, 0, ++ { N_("/Conversation/In_vite..."), NULL, (GtkItemFactoryCallback)menu_invite_cb, 0, + "", NULL }, + { N_("/Conversation/M_ore"), NULL, NULL, 0, "", NULL }, + + { "/Conversation/sep2", NULL, NULL, 0, "", NULL }, + +- { N_("/Conversation/Al_ias..."), NULL, menu_alias_cb, 0, ++ { N_("/Conversation/Al_ias..."), NULL, (GtkItemFactoryCallback)menu_alias_cb, 0, + "", NULL }, +- { N_("/Conversation/_Block..."), NULL, menu_block_cb, 0, ++ { N_("/Conversation/_Block..."), NULL, (GtkItemFactoryCallback)menu_block_cb, 0, + "", PIDGIN_STOCK_TOOLBAR_BLOCK }, +- { N_("/Conversation/_Unblock..."), NULL, menu_unblock_cb, 0, ++ { N_("/Conversation/_Unblock..."), NULL, (GtkItemFactoryCallback)menu_unblock_cb, 0, + "", PIDGIN_STOCK_TOOLBAR_UNBLOCK }, +- { N_("/Conversation/_Add..."), NULL, menu_add_remove_cb, 0, ++ { N_("/Conversation/_Add..."), NULL, (GtkItemFactoryCallback)menu_add_remove_cb, 0, + "", GTK_STOCK_ADD }, +- { N_("/Conversation/_Remove..."), NULL, menu_add_remove_cb, 0, ++ { N_("/Conversation/_Remove..."), NULL, (GtkItemFactoryCallback)menu_add_remove_cb, 0, + "", GTK_STOCK_REMOVE }, + + { "/Conversation/sep3", NULL, NULL, 0, "", NULL }, + +- { N_("/Conversation/Insert Lin_k..."), NULL, menu_insert_link_cb, 0, ++ { N_("/Conversation/Insert Lin_k..."), NULL, (GtkItemFactoryCallback)menu_insert_link_cb, 0, + "", PIDGIN_STOCK_TOOLBAR_INSERT_LINK }, +- { N_("/Conversation/Insert Imag_e..."), NULL, menu_insert_image_cb, 0, ++ { N_("/Conversation/Insert Imag_e..."), NULL, (GtkItemFactoryCallback)menu_insert_image_cb, 0, + "", PIDGIN_STOCK_TOOLBAR_INSERT_IMAGE }, + + { "/Conversation/sep4", NULL, NULL, 0, "", NULL }, + + +- { N_("/Conversation/_Close"), NULL, menu_close_conv_cb, 0, ++ { N_("/Conversation/_Close"), NULL, (GtkItemFactoryCallback)menu_close_conv_cb, 0, + "", GTK_STOCK_CLOSE }, + + /* Options */ + { N_("/_Options"), NULL, NULL, 0, "", NULL }, +- { N_("/Options/Enable _Logging"), NULL, menu_logging_cb, 0, "", NULL }, +- { N_("/Options/Enable _Sounds"), NULL, menu_sounds_cb, 0, "", NULL }, ++ { N_("/Options/Enable _Logging"), NULL, (GtkItemFactoryCallback)menu_logging_cb, 0, "", NULL }, ++ { N_("/Options/Enable _Sounds"), NULL, (GtkItemFactoryCallback)menu_sounds_cb, 0, "", NULL }, + { "/Options/sep0", NULL, NULL, 0, "", NULL }, +- { N_("/Options/Show Formatting _Toolbars"), NULL, menu_toolbar_cb, 0, "", NULL }, +- { N_("/Options/Show Ti_mestamps"), NULL, menu_timestamps_cb, 0, "", NULL }, ++ { N_("/Options/Show Formatting _Toolbars"), NULL, (GtkItemFactoryCallback)menu_toolbar_cb, 0, "", NULL }, ++ { N_("/Options/Show Ti_mestamps"), NULL, (GtkItemFactoryCallback)menu_timestamps_cb, 0, "", NULL }, + }; + + static const int menu_item_count = diff --git a/sources/meta-openembedded/meta-oe/recipes-support/pidgin/pidgin/purple-OE-branding-25.patch b/sources/meta-openembedded/meta-oe/recipes-support/pidgin/pidgin/purple-OE-branding-25.patch deleted file mode 100644 index 1c4daa9f..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/pidgin/pidgin/purple-OE-branding-25.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 43e9db656431ffb22b429d5fca4ce3b4af21bc9e Mon Sep 17 00:00:00 2001 -From: Herrie -Date: Mon, 24 Jul 2017 21:30:16 +0200 - ---- -Upstream-Status: Pending - - libpurple/protocols/irc/irc.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/libpurple/protocols/irc/irc.h b/libpurple/protocols/irc/irc.h -index 596ddaf..b70f3a9 100644 ---- a/libpurple/protocols/irc/irc.h -+++ b/libpurple/protocols/irc/irc.h -@@ -40,9 +40,9 @@ - - #define IRC_DEFAULT_CHARSET "UTF-8" - #define IRC_DEFAULT_AUTODETECT FALSE --#define IRC_DEFAULT_ALIAS "purple" -+#define IRC_DEFAULT_ALIAS "OE-user" - --#define IRC_DEFAULT_QUIT "Leaving." -+#define IRC_DEFAULT_QUIT "Powered by OE: www.openembedded.org" - - #define IRC_BUFSIZE_INCREMENT 1024 - #define IRC_MAX_BUFSIZE 16384 diff --git a/sources/meta-openembedded/meta-oe/recipes-support/pidgin/pidgin_2.14.13.bb b/sources/meta-openembedded/meta-oe/recipes-support/pidgin/pidgin_2.14.13.bb new file mode 100644 index 00000000..ac62863f --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/pidgin/pidgin_2.14.13.bb @@ -0,0 +1,120 @@ +SUMMARY = "multi-protocol instant messaging client" + +SECTION = "x11/network" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" +DEPENDS = "python3 virtual/libintl intltool-native libxml2 gconf glib-2.0-native" + +inherit autotools gettext pkgconfig gconf perlnative python3native + +SRC_URI = "\ + ${SOURCEFORGE_MIRROR}/pidgin/pidgin-${PV}.tar.bz2 \ + file://sanitize-configure.ac.patch \ + file://fix_incompatible_pointer_types_for_gtkitemfactorycallbacks_on_gcc-14.patch \ +" + +SRC_URI[sha256sum] = "120049dc8e17e09a2a7d256aff2191ff8491abb840c8c7eb319a161e2df16ba8" + +CVE_STATUS[CVE-2010-1624] = "fixed-version: The CPE in the NVD database doesn't reflect correctly the vulnerable versions." +CVE_STATUS[CVE-2011-3594] = "fixed-version: The CPE in the NVD database doesn't reflect correctly the vulnerable versions." + +PACKAGECONFIG ??= "gnutls consoleui avahi dbus idn nss \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 gtk startup-notification', '', d)} \ +" +# --disable-gstreamer compile without GStreamer audio support +# --disable-gstreamer-video +# compile without GStreamer 1.0 Video Overlay support +# --disable-gstreamer-interfaces +# compile without GStreamer 0.10 interface support +# --with-gstreamer= +# compile with GStreamer 0.10 or 1.0 interface +PACKAGECONFIG[gstreamer] = "--enable-gstreamer,--disable-gstreamer,gstreamer1.0" +PACKAGECONFIG[idn] = "--enable-idn,--disable-idn,libidn" +PACKAGECONFIG[gtk] = "--enable-gtkui,--disable-gtkui,gtk+" +PACKAGECONFIG[x11] = "--with-x=yes --x-includes=${STAGING_INCDIR} --x-libraries=${STAGING_LIBDIR},--with-x=no,virtual/libx11" +PACKAGECONFIG[startup-notification] = "--enable-startup-notification,--disable-startup-notification,startup-notification" +PACKAGECONFIG[consoleui] = "--enable-consoleui --with-ncurses-headers=${STAGING_INCDIR},--disable-consoleui,libgnt" +PACKAGECONFIG[gnutls] = "--enable-gnutls --with-gnutls-includes=${STAGING_INCDIR} --with-gnutls-libs=${STAGING_LIBDIR},--disable-gnutls,gnutls,libpurple-plugin-ssl-gnutls" +PACKAGECONFIG[dbus] = "--enable-dbus,--disable-dbus,dbus dbus-glib" +PACKAGECONFIG[avahi] = "--enable-avahi,--disable-avahi,avahi" +PACKAGECONFIG[nss] = "--enable-nss,--disable-nss,nss nspr,libpurple-plugin-ssl-nss" +PACKAGECONFIG[cyrus-sasl] = "--enable-cyrus-sasl,--disable-cyrus-sasl,cyrus-sasl" + +EXTRA_OECONF = " \ + --disable-perl \ + --disable-tcl \ + --disable-gevolution \ + --disable-schemas-install \ + --disable-gtkspell \ + --disable-meanwhile \ + --disable-nm \ + --disable-screensaver \ + --disable-farstream \ + --disable-vv \ +" + +# CONFIG_ARGS is used to display build info. Replace full paths by reproducible +# variables ($S, $WORKDIR) +do_configure:append() { + sed -i -e "/CONFIG_ARGS/s|${S}|\$S|g" ${B}/config.h + sed -i -e "/CONFIG_ARGS/s|${WORKDIR}|\$WORKDIR|g" ${B}/config.h +} + +OE_LT_RPATH_ALLOW=":${libdir}/purple-2:" +OE_LT_RPATH_ALLOW[export]="1" + +PACKAGES =+ "libpurple-dev libpurple finch finch-dev ${PN}-data" + +RPROVIDES:${PN}-dbg += "libpurple-dbg finch-dbg" + +LEAD_SONAME = "libpurple.so.0" +FILES:libpurple = "${libdir}/libpurple*.so.* ${libdir}/purple-2 ${bindir}/purple-* ${sysconfdir}/gconf/schemas/purple* ${datadir}/purple/ca-certs" +FILES:libpurple-dev = "${libdir}/libpurple*.la \ + ${libdir}/libpurple*.so \ + ${libdir}/purple-2/*.la \ + ${libdir}/purple-2/libjabber.so \ + ${libdir}/purple-2/liboscar.so \ + ${libdir}/purple-2/libymsg.so \ + ${datadir}/aclocal" +FILES:finch = "${bindir}/finch" +FILES:finch-dev = "${libdir}/finch/*.la" + +FILES:${PN} = "${bindir} ${datadir}/${PN} ${libdir}/${PN}/*.so \ + ${datadir}/applications ${datadir}/metainfo" +RRECOMMENDS:${PN} = "${PN}-data libpurple-protocol-irc libpurple-protocol-xmpp" + +FILES:${PN}-data = "${datadir}/pixmaps ${datadir}/sounds ${datadir}/icons ${datadir}/appdata" +FILES:${PN}-dev += "${libdir}/${PN}/*.la" + +PACKAGES_DYNAMIC += "^libpurple-protocol-.* ^libpurple-plugin-.* ^pidgin-plugin-.* ^finch-plugin-.*" + +python populate_packages:prepend () { + pidgroot = d.expand('${libdir}/pidgin') + purple = d.expand('${libdir}/purple-2') + finch = d.expand('${libdir}/finch') + + do_split_packages(d, pidgroot, r'^([^l][^i][^b].*)\.so$', + output_pattern='pidgin-plugin-%s', + description='Pidgin plugin %s', + prepend=True, extra_depends='') + + do_split_packages(d, purple, r'^lib(.*)\.so$', + output_pattern='libpurple-protocol-%s', + description='Libpurple protocol plugin for %s', + prepend=True, extra_depends='') + + do_split_packages(d, purple, r'^(ssl-.*)\.so$', + output_pattern='libpurple-plugin-%s', + description='libpurple plugin %s', + prepend=True, extra_depends='libpurple-plugin-ssl') + + do_split_packages(d, purple, r'^([^l][^i][^b].*)\.so$', + output_pattern='libpurple-plugin-%s', + description='libpurple plugin %s', + prepend=True, extra_depends='') + + do_split_packages(d, finch, r'^([^l][^i][^b].*)\.so$', + output_pattern='finch-plugin-%s', + description='Finch plugin %s', + prepend=True, extra_depends='') +} diff --git a/sources/meta-openembedded/meta-oe/recipes-support/pidgin/pidgin_2.14.2.bb b/sources/meta-openembedded/meta-oe/recipes-support/pidgin/pidgin_2.14.2.bb deleted file mode 100644 index ae251b5a..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/pidgin/pidgin_2.14.2.bb +++ /dev/null @@ -1,113 +0,0 @@ -SUMMARY = "multi-protocol instant messaging client" - -SECTION = "x11/network" -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" -DEPENDS = "python3 virtual/libintl intltool-native libxml2 gconf glib-2.0-native" - -inherit autotools gettext pkgconfig gconf perlnative python3native - -SRC_URI = "\ - ${SOURCEFORGE_MIRROR}/pidgin/pidgin-${PV}.tar.bz2 \ - file://sanitize-configure.ac.patch \ - file://purple-OE-branding-25.patch \ -" - -SRC_URI[sha256sum] = "19654ad276b149646371fbdac21bc7620742f2975f7399fed0ffc1a18fbaf603" - -CVE_STATUS[CVE-2010-1624] = "fixed-version: The CPE in the NVD database doesn't reflect correctly the vulnerable versions." -CVE_STATUS[CVE-2011-3594] = "fixed-version: The CPE in the NVD database doesn't reflect correctly the vulnerable versions." - -PACKAGECONFIG ??= "gnutls consoleui avahi dbus idn nss \ - ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 gtk startup-notification', '', d)} \ -" -PACKAGECONFIG[farsight2] = "--enable-farstream,--disable-farstream,farsight2" -# --disable-gstreamer compile without GStreamer audio support -# --disable-gstreamer-video -# compile without GStreamer 1.0 Video Overlay support -# --disable-gstreamer-interfaces -# compile without GStreamer 0.10 interface support -# --with-gstreamer= -# compile with GStreamer 0.10 or 1.0 interface -PACKAGECONFIG[gstreamer] = "--enable-gstreamer,--disable-gstreamer,gstreamer" -PACKAGECONFIG[vv] = "--enable-vv,--disable-vv,gstreamer" -PACKAGECONFIG[idn] = "--enable-idn,--disable-idn,libidn" -PACKAGECONFIG[gtk] = "--enable-gtkui,--disable-gtkui,gtk+" -PACKAGECONFIG[x11] = "--with-x=yes --x-includes=${STAGING_INCDIR} --x-libraries=${STAGING_LIBDIR},--with-x=no,virtual/libx11" -PACKAGECONFIG[startup-notification] = "--enable-startup-notification,--disable-startup-notification,startup-notification" -PACKAGECONFIG[consoleui] = "--enable-consoleui --with-ncurses-headers=${STAGING_INCDIR},--disable-consoleui,libgnt" -PACKAGECONFIG[gnutls] = "--enable-gnutls --with-gnutls-includes=${STAGING_INCDIR} --with-gnutls-libs=${STAGING_LIBDIR},--disable-gnutls,gnutls,libpurple-plugin-ssl-gnutls" -PACKAGECONFIG[dbus] = "--enable-dbus,--disable-dbus,dbus dbus-glib" -PACKAGECONFIG[avahi] = "--enable-avahi,--disable-avahi,avahi" -PACKAGECONFIG[nss] = "--enable-nss,--disable-nss,nss nspr,libpurple-plugin-ssl-nss" -PACKAGECONFIG[cyrus-sasl] = "--enable-cyrus-sasl,--disable-cyrus-sasl,cyrus-sasl" - -EXTRA_OECONF = " \ - --disable-perl \ - --disable-tcl \ - --disable-gevolution \ - --disable-schemas-install \ - --disable-gtkspell \ - --disable-meanwhile \ - --disable-nm \ - --disable-screensaver \ -" - -OE_LT_RPATH_ALLOW=":${libdir}/purple-2:" -OE_LT_RPATH_ALLOW[export]="1" - -PACKAGES =+ "libpurple-dev libpurple finch finch-dev ${PN}-data" - -RPROVIDES:${PN}-dbg += "libpurple-dbg finch-dbg" - -LEAD_SONAME = "libpurple.so.0" -FILES:libpurple = "${libdir}/libpurple*.so.* ${libdir}/purple-2 ${bindir}/purple-* ${sysconfdir}/gconf/schemas/purple* ${datadir}/purple/ca-certs" -FILES:libpurple-dev = "${libdir}/libpurple*.la \ - ${libdir}/libpurple*.so \ - ${libdir}/purple-2/*.la \ - ${libdir}/purple-2/libjabber.so \ - ${libdir}/purple-2/liboscar.so \ - ${libdir}/purple-2/libymsg.so \ - ${datadir}/aclocal" -FILES:finch = "${bindir}/finch" -FILES:finch-dev = "${libdir}/finch/*.la" - -FILES:${PN} = "${bindir} ${datadir}/${PN} ${libdir}/${PN}/*.so \ - ${datadir}/applications" -RRECOMMENDS:${PN} = "${PN}-data libpurple-protocol-irc libpurple-protocol-xmpp" - -FILES:${PN}-data = "${datadir}/pixmaps ${datadir}/sounds ${datadir}/icons ${datadir}/appdata" -FILES:${PN}-dev += "${libdir}/${PN}/*.la" - -PACKAGES_DYNAMIC += "^libpurple-protocol-.* ^libpurple-plugin-.* ^pidgin-plugin-.* ^finch-plugin-.*" - -python populate_packages:prepend () { - pidgroot = d.expand('${libdir}/pidgin') - purple = d.expand('${libdir}/purple-2') - finch = d.expand('${libdir}/finch') - - do_split_packages(d, pidgroot, r'^([^l][^i][^b].*)\.so$', - output_pattern='pidgin-plugin-%s', - description='Pidgin plugin %s', - prepend=True, extra_depends='') - - do_split_packages(d, purple, r'^lib(.*)\.so$', - output_pattern='libpurple-protocol-%s', - description='Libpurple protocol plugin for %s', - prepend=True, extra_depends='') - - do_split_packages(d, purple, r'^(ssl-.*)\.so$', - output_pattern='libpurple-plugin-%s', - description='libpurple plugin %s', - prepend=True, extra_depends='libpurple-plugin-ssl') - - do_split_packages(d, purple, r'^([^l][^i][^b].*)\.so$', - output_pattern='libpurple-plugin-%s', - description='libpurple plugin %s', - prepend=True, extra_depends='') - - do_split_packages(d, finch, r'^([^l][^i][^b].*)\.so$', - output_pattern='finch-plugin-%s', - description='Finch plugin %s', - prepend=True, extra_depends='') -} diff --git a/sources/meta-openembedded/meta-oe/recipes-support/pkcs11-provider/pkcs11-provider/0001-Fix-types-for-old-32-bit-systems.patch b/sources/meta-openembedded/meta-oe/recipes-support/pkcs11-provider/pkcs11-provider/0001-Fix-types-for-old-32-bit-systems.patch new file mode 100644 index 00000000..189a0e21 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/pkcs11-provider/pkcs11-provider/0001-Fix-types-for-old-32-bit-systems.patch @@ -0,0 +1,49 @@ +From 088f038de633b5de777fb0f95cd9598f320151f6 Mon Sep 17 00:00:00 2001 +From: Simo Sorce +Date: Wed, 5 Jun 2024 11:22:35 -0400 +Subject: [PATCH] Fix types for old 32 bit systems + +On x86 CK_ULONG and size_t have different sizes, ensure we use +compatible types on our helper functions. + +Signed-off-by: Simo Sorce +Signed-off-by: Martin Jansa +--- +Upstream-Status: Backport [https://github.com/latchset/pkcs11-provider/commit/9fa16b7fd398b62f06cb10892fe93dc574d67399] + + src/asymmetric_cipher.c | 4 ++-- + src/util.h | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/asymmetric_cipher.c b/src/asymmetric_cipher.c +index 4d87b1c..3256fd2 100644 +--- a/src/asymmetric_cipher.c ++++ b/src/asymmetric_cipher.c +@@ -251,12 +251,12 @@ static int p11prov_rsaenc_decrypt_init(void *ctx, void *provkey, + static int + p11prov_tls_constant_time_depadding(struct p11prov_rsaenc_ctx *encctx, + unsigned char *out, unsigned char *buf, +- size_t *out_size, CK_ULONG *ret_cond) ++ CK_ULONG *out_size, CK_ULONG *ret_cond) + { + unsigned char randbuf[SSL_MAX_MASTER_KEY_LENGTH]; + CK_ULONG ver_cond = 0; + CK_ULONG cond = 0; +- size_t length = SSL_MAX_MASTER_KEY_LENGTH; ++ CK_ULONG length = SSL_MAX_MASTER_KEY_LENGTH; + int err; + + /* always generate a random buffer, to constant_time swap in +diff --git a/src/util.h b/src/util.h +index bcbc2db..1b24666 100644 +--- a/src/util.h ++++ b/src/util.h +@@ -120,7 +120,7 @@ static inline int constant_select_int(CK_ULONG cond, int a, int b) + return (int)((A & mask) | (B & ~mask)); + } + +-static inline void constant_select_buf(CK_ULONG cond, size_t size, ++static inline void constant_select_buf(CK_ULONG cond, CK_ULONG size, + unsigned char *dst, unsigned char *a, + unsigned char *b) + { diff --git a/sources/meta-openembedded/meta-oe/recipes-support/pkcs11-provider/pkcs11-provider_0.3.bb b/sources/meta-openembedded/meta-oe/recipes-support/pkcs11-provider/pkcs11-provider_0.3.bb deleted file mode 100644 index 816ee967..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/pkcs11-provider/pkcs11-provider_0.3.bb +++ /dev/null @@ -1,27 +0,0 @@ -SUMMARY = "An OpenSSL provider that allows direct interfacing with pkcs11 drivers" -DESCRIPTION = "\ -This is an Openssl 3.x provider to access Hardware or Software Tokens using \ -the PKCS#11 Cryptographic Token Interface\ -\ -This code targets version 3.1 of the interface but should be backwards \ -compatible to previous versions as well.\ -" -HOMEPAGE = "https://github.com/latchset/pkcs11-provider" -SECTION = "libs" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://COPYING;md5=b53b787444a60266932bd270d1cf2d45" -DEPENDS = "\ - autoconf-archive \ - openssl \ - p11-kit \ -" - -SRCREV = "58040b4e32975cc1d7f39e424ee7b0097cd11311" - -SRC_URI = "git://github.com/latchset/${BPN}.git;branch=main;protocol=https" - -S = "${WORKDIR}/git" - -inherit autotools pkgconfig - -FILES:${PN} += "${libdir}/ossl-modules/pkcs11.so" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/pkcs11-provider/pkcs11-provider_0.5.bb b/sources/meta-openembedded/meta-oe/recipes-support/pkcs11-provider/pkcs11-provider_0.5.bb new file mode 100644 index 00000000..fcd8fe63 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/pkcs11-provider/pkcs11-provider_0.5.bb @@ -0,0 +1,25 @@ +SUMMARY = "An OpenSSL provider that allows direct interfacing with pkcs11 drivers" +DESCRIPTION = "\ +This is an Openssl 3.x provider to access Hardware or Software Tokens using \ +the PKCS#11 Cryptographic Token Interface\ +\ +This code targets version 3.1 of the interface but should be backwards \ +compatible to previous versions as well.\ +" +HOMEPAGE = "https://github.com/latchset/pkcs11-provider" +SECTION = "libs" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://COPYING;md5=b53b787444a60266932bd270d1cf2d45" +DEPENDS = "openssl" + +SRCREV = "3a4fdd2a2e5643af2a0f857b66a19b9fa109d40f" + +SRC_URI = "git://github.com/latchset/${BPN}.git;branch=main;protocol=https \ + file://0001-Fix-types-for-old-32-bit-systems.patch \ +" + +S = "${WORKDIR}/git" + +inherit meson pkgconfig + +FILES:${PN} += "${libdir}/ossl-modules/pkcs11.so" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/pngcheck/pngcheck_2.3.0.bb b/sources/meta-openembedded/meta-oe/recipes-support/pngcheck/pngcheck_2.3.0.bb index 19da947d..9cd27a2e 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/pngcheck/pngcheck_2.3.0.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/pngcheck/pngcheck_2.3.0.bb @@ -13,6 +13,9 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/project/png-mng/${BPN}/${PV}/${BPN}-${PV}.tar.g SRC_URI[md5sum] = "980bd6d9a3830fdce746d7fe3c9166ee" SRC_URI[sha256sum] = "77f0a039ac64df55fbd06af6f872fdbad4f639d009bbb5cd5cbe4db25690f35f" +UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/png-mng/files/pngcheck/" +UPSTREAM_CHECK_REGEX = "${BPN}-(?P\d+(\.\d+)+)" + CFLAGS += "-DUSE_ZLIB" EXTRA_OEMAKE = "-f ${S}/Makefile.unx" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/poco/poco/0001-Use-std-atomic-int-instead-of-std-atomic-bool.patch b/sources/meta-openembedded/meta-oe/recipes-support/poco/poco/0001-Use-std-atomic-int-instead-of-std-atomic-bool.patch deleted file mode 100644 index b0613522..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/poco/poco/0001-Use-std-atomic-int-instead-of-std-atomic-bool.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 4cbb225811205b51b65371d0d8abc2d2af8233b6 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Thu, 26 Jan 2023 14:56:36 -0800 -Subject: [PATCH] Use std::atomic instead of std::atomic - -GCC on RISCV does not yet support inline subword atomics [1] -Therefore avoid them until fixed - -Upstream-Status: Pending - -[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104338 - -Signed-off-by: Khem Raj ---- - Foundation/include/Poco/AsyncChannel.h | 2 +- - Foundation/src/AsyncChannel.cpp | 5 ++--- - 2 files changed, 3 insertions(+), 4 deletions(-) - -diff --git a/Foundation/include/Poco/AsyncChannel.h b/Foundation/include/Poco/AsyncChannel.h -index 190bae7dd..d73ea6c72 100644 ---- a/Foundation/include/Poco/AsyncChannel.h -+++ b/Foundation/include/Poco/AsyncChannel.h -@@ -111,7 +111,7 @@ private: - NotificationQueue _queue; - std::size_t _queueSize = 0; - std::size_t _dropCount = 0; -- std::atomic _closed; -+ std::atomic _closed; - }; - - -diff --git a/Foundation/src/AsyncChannel.cpp b/Foundation/src/AsyncChannel.cpp -index 37cdec477..e829b180c 100644 ---- a/Foundation/src/AsyncChannel.cpp -+++ b/Foundation/src/AsyncChannel.cpp -@@ -48,11 +48,10 @@ private: - Message _msg; - }; - -- - AsyncChannel::AsyncChannel(Channel::Ptr pChannel, Thread::Priority prio): - _pChannel(pChannel), - _thread("AsyncChannel"), -- _closed(false) -+ _closed(0) - { - _thread.setPriority(prio); - } -@@ -95,7 +94,7 @@ void AsyncChannel::open() - - void AsyncChannel::close() - { -- if (!_closed.exchange(true)) -+ if (!_closed.exchange(1)) - { - if (_thread.isRunning()) - { --- -2.39.1 - diff --git a/sources/meta-openembedded/meta-oe/recipes-support/poco/poco/0001-cppignore.lnx-Ignore-PKCS12-and-testLaunch-test.patch b/sources/meta-openembedded/meta-oe/recipes-support/poco/poco/0001-cppignore.lnx-Ignore-PKCS12-and-testLaunch-test.patch index f70e8bcc..d172c8db 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/poco/poco/0001-cppignore.lnx-Ignore-PKCS12-and-testLaunch-test.patch +++ b/sources/meta-openembedded/meta-oe/recipes-support/poco/poco/0001-cppignore.lnx-Ignore-PKCS12-and-testLaunch-test.patch @@ -1,4 +1,4 @@ -From 879ddb725823c78c9510cfd39786adb16f3726c8 Mon Sep 17 00:00:00 2001 +From 6b1123b313e439d8bfae3570a3e541b3aa26f3ad Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 16 Sep 2023 19:52:56 -0700 Subject: [PATCH] cppignore.lnx: Ignore PKCS12 and testLaunch test @@ -48,10 +48,10 @@ Signed-off-by: Patrick Wicki 1 file changed, 9 insertions(+) diff --git a/cppignore.lnx b/cppignore.lnx -index 2c2376526..65df4af08 100644 +index b3288d474..9aad48ca5 100644 --- a/cppignore.lnx +++ b/cppignore.lnx -@@ -28,3 +28,12 @@ CppUnit::TestCaller.testProxy +@@ -30,3 +30,12 @@ CppUnit::TestCaller.testProxy CppUnit::TestCaller.testProxy CppUnit::TestCaller.testHostByAddress CppUnit::TestCaller.testHostByName diff --git a/sources/meta-openembedded/meta-oe/recipes-support/poco/poco/0002-fix-build-Install-cmake-files-with-resolved-ENABLE_J.patch b/sources/meta-openembedded/meta-oe/recipes-support/poco/poco/0002-fix-build-Install-cmake-files-with-resolved-ENABLE_J.patch deleted file mode 100644 index 427cb972..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/poco/poco/0002-fix-build-Install-cmake-files-with-resolved-ENABLE_J.patch +++ /dev/null @@ -1,32 +0,0 @@ -From e54478c936493c0ed87e875f04127bd13642de44 Mon Sep 17 00:00:00 2001 -From: tyler92 -Date: Tue, 21 Nov 2023 05:07:24 +0300 -Subject: [PATCH] fix(build): Install cmake files with resolved ENABLE_JSON and - ENABLE_XML (#4227) - -Upstream-Status: Backport [https://github.com/pocoproject/poco/pull/4227] -Signed-off-by: Adrian Freihofer - ---- - Util/cmake/PocoUtilConfig.cmake | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/Util/cmake/PocoUtilConfig.cmake b/Util/cmake/PocoUtilConfig.cmake -index 90c1eab1c..8186435e1 100644 ---- a/Util/cmake/PocoUtilConfig.cmake -+++ b/Util/cmake/PocoUtilConfig.cmake -@@ -1,9 +1,9 @@ - include(CMakeFindDependencyMacro) - find_dependency(PocoFoundation) --if(ENABLE_XML) -+if(@ENABLE_XML@) - find_dependency(PocoXML) - endif() --if(ENABLE_JSON) -+if(@ENABLE_JSON@) - find_dependency(PocoJSON) - endif() - include("${CMAKE_CURRENT_LIST_DIR}/PocoUtilTargets.cmake") --- -2.43.0 - diff --git a/sources/meta-openembedded/meta-oe/recipes-support/poco/poco_1.12.5p2.bb b/sources/meta-openembedded/meta-oe/recipes-support/poco/poco_1.12.5p2.bb deleted file mode 100644 index dc6e65b9..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/poco/poco_1.12.5p2.bb +++ /dev/null @@ -1,119 +0,0 @@ -SUMMARY = "Modern, powerful open source cross-platform C++ class libraries" -DESCRIPTION = "Modern, powerful open source C++ class libraries and frameworks for building network- and internet-based applications that run on desktop, server, mobile and embedded systems." -HOMEPAGE = "http://pocoproject.org/" -SECTION = "libs" -LICENSE = "BSL-1.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=4267f48fc738f50380cbeeb76f95cebc" - -# These dependencies are required by Foundation -DEPENDS = "libpcre2 zlib" - -SRC_URI = "git://github.com/pocoproject/poco.git;branch=poco-1.12.5;protocol=https \ - file://0001-Use-std-atomic-int-instead-of-std-atomic-bool.patch \ - file://0001-cppignore.lnx-Ignore-PKCS12-and-testLaunch-test.patch \ - file://run-ptest \ - file://0002-fix-build-Install-cmake-files-with-resolved-ENABLE_J.patch \ - " -SRCREV = "1d6fb3e1383e559cacbada5e3f861c0dafaf5d30" - -UPSTREAM_CHECK_GITTAGREGEX = "poco-(?P\d+(\.\d+)+)" - -S = "${WORKDIR}/git" - -inherit cmake ptest - -# By default the most commonly used poco components are built -# Foundation is built anyway and doesn't need to be listed explicitly -# these don't have dependencies outside oe-core -PACKAGECONFIG ??= "XML JSON PDF Util Net NetSSL Crypto JWT Data DataSQLite Zip Encodings Redis Prometheus" -# MongoDB does not build for all architectures yet keep in sync with COMPATIBLE_HOST list in mongodb recipe -# and mongodb needs meta-python enabled as well -PACKAGECONFIG:remove:riscv32 = "MongoDB" -PACKAGECONFIG:remove:riscv64 = "MongoDB" -PACKAGECONFIG:remove:mipsarch = "MongoDB" -PACKAGECONFIG:remove:powerpc = "MongoDB" - -PACKAGECONFIG[XML] = "-DENABLE_XML=ON,-DENABLE_XML=OFF,expat" -PACKAGECONFIG[JSON] = "-DENABLE_JSON=ON,-DENABLE_JSON=OFF" -PACKAGECONFIG[MongoDB] = "-DENABLE_MONGODB=ON,-DENABLE_MONGODB=OFF" -PACKAGECONFIG[PDF] = "-DENABLE_PDF=ON,-DENABLE_PDF=OFF,zlib" -PACKAGECONFIG[Util] = "-DENABLE_UTIL=ON,-DENABLE_UTIL=OFF" -PACKAGECONFIG[Net] = "-DENABLE_NET=ON,-DENABLE_NET=OFF" -PACKAGECONFIG[NetSSL] = "-DENABLE_NETSSL=ON,-DENABLE_NETSSL=OFF,openssl" -PACKAGECONFIG[Crypto] = "-DENABLE_CRYPTO=ON,-DENABLE_CRYPTO=OFF,openssl" -PACKAGECONFIG[JWT] = "-DENABLE_JWT=ON,-DENABLE_JWT=OFF,openssl" -PACKAGECONFIG[Data] = "-DENABLE_DATA=ON,-DENABLE_DATA=OFF" -PACKAGECONFIG[DataSQLite] = "-DENABLE_DATA_SQLITE=ON -DSQLITE3_LIBRARY:STRING=sqlite3,-DENABLE_DATA_SQLITE=OFF,sqlite3" -PACKAGECONFIG[Zip] = "-DENABLE_ZIP=ON,-DENABLE_ZIP=OFF" -PACKAGECONFIG[Encodings] = "-DENABLE_ENCODINGS=ON,-DENABLE_ENCODINGS=OFF" -PACKAGECONFIG[Redis] = "-DENABLE_REDIS=ON,-DENABLE_REDIS=OFF" -PACKAGECONFIG[Prometheus] = "-DENABLE_PROMETHEUS=ON,-DENABLE_PROMETHEUS=OFF" - -# Additional components not build by default, -# they might have dependencies not included in oe-core -# or they don't work on all architectures -PACKAGECONFIG[mod_poco] = "-DENABLE_APACHECONNECTOR=ON,-DENABLE_APACHECONNECTOR=OFF,apr apache2" -PACKAGECONFIG[CppParser] = "-DENABLE_CPPPARSER=ON,-DENABLE_CPPPARSER=OFF" -PACKAGECONFIG[DataMySQL] = "-DENABLE_DATA_MYSQL=ON -DMYSQL_LIB:STRING=mysqlclient_r,-DENABLE_DATA_MYSQL=OFF,mariadb" -PACKAGECONFIG[DataODBC] = "-DENABLE_DATA_ODBC=ON,-DENABLE_DATA_ODBC=OFF,libiodbc" -PACKAGECONFIG[ActiveRecord] = "-DENABLE_ACTIVERECORD=ON,-DENABLE_ACTIVERECORD=OFF" -PACKAGECONFIG[ActiveRecordCompiler] = "-DENABLE_ACTIVERECORD_COMPILER=ON,-DENABLE_ACTIVERECORD_COMPILER=OFF" -PACKAGECONFIG[PageCompiler] = "-DENABLE_PAGECOMPILER=ON,-DENABLE_PAGECOMPILER=OFF" -PACKAGECONFIG[PageCompilerFile2Page] = "-DENABLE_PAGECOMPILER_FILE2PAGE=ON,-DENABLE_PAGECOMPILER_FILE2PAGE=OFF" -PACKAGECONFIG[SevenZip] = "-DENABLE_SEVENZIP=ON,-DENABLE_SEVENZIP=OFF" - -EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=RelWithDebInfo -DPOCO_UNBUNDLED=ON \ - -DLIB_SUFFIX=${@d.getVar('baselib').replace('lib', '')} \ - ${@bb.utils.contains('PTEST_ENABLED', '1', '-DENABLE_TESTS=ON ', '', d)}" - -# For the native build we want to use the bundled version -EXTRA_OECMAKE:append:class-native = " -DPOCO_UNBUNDLED=OFF" - -# do not use rpath -EXTRA_OECMAKE:append = " -DCMAKE_SKIP_RPATH=ON" - -LDFLAGS:append:riscv32 = "${@bb.utils.contains('PACKAGECONFIG', 'Prometheus', ' -Wl,--no-as-needed -latomic -Wl,--as-needed', '', d)}" -LDFLAGS:append:mips = "${@bb.utils.contains('PACKAGECONFIG', 'Prometheus', ' -Wl,--no-as-needed -latomic -Wl,--as-needed', '', d)}" -LDFLAGS:append:powerpc = "${@bb.utils.contains('PACKAGECONFIG', 'Prometheus', ' -Wl,--no-as-needed -latomic -Wl,--as-needed', '', d)}" - -python populate_packages:prepend () { - poco_libdir = d.expand('${libdir}') - pn = d.getVar("PN") - packages = [] - - def hook(f, pkg, file_regex, output_pattern, modulename): - packages.append(pkg) - - do_split_packages(d, poco_libdir, r'^libPoco(.*)\.so\..*$', - 'poco-%s', 'Poco %s component', extra_depends='', prepend=True, hook=hook) - - d.setVar("RRECOMMENDS:%s" % pn, " ".join(packages)) -} - -do_install_ptest () { - cp -rf ${B}/bin/ ${D}${PTEST_PATH} - cp -f ${B}/lib/libCppUnit.so* ${D}${libdir} - cp -rf ${B}/*/testsuite/data ${D}${PTEST_PATH}/bin/ - find "${D}${PTEST_PATH}" -executable -exec chrpath -d {} \; - rm -f ${D}${PTEST_PATH}/testrunners - for f in ${D}${PTEST_PATH}/bin/*-testrunner; do - echo `basename $f` >> ${D}${PTEST_PATH}/testrunners - done - install -Dm 0644 ${S}/cppignore.lnx ${D}${PTEST_PATH}/cppignore.lnx -} - -PACKAGES_DYNAMIC = "poco-.*" - -# "poco" is a metapackage which pulls in all Poco components -ALLOW_EMPTY:${PN} = "1" - -# cppunit is only built if tests are enabled -PACKAGES =+ "${PN}-cppunit" -FILES:${PN}-cppunit += "${libdir}/libCppUnit.so*" -ALLOW_EMPTY:${PN}-cppunit = "1" - -RDEPENDS:${PN}-ptest += "${PN}-cppunit" -RDEPENDS:${PN}-ptest += "${@bb.utils.contains('PACKAGECONFIG', 'MongoDB', 'mongodb', '', d)}" -RDEPENDS:${PN}-ptest += "${@bb.utils.contains('PACKAGECONFIG', 'Redis', 'redis', '', d)}" - -BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/poco/poco_1.13.3.bb b/sources/meta-openembedded/meta-oe/recipes-support/poco/poco_1.13.3.bb new file mode 100644 index 00000000..0beffab9 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/poco/poco_1.13.3.bb @@ -0,0 +1,117 @@ +SUMMARY = "Modern, powerful open source cross-platform C++ class libraries" +DESCRIPTION = "Modern, powerful open source C++ class libraries and frameworks for building network- and internet-based applications that run on desktop, server, mobile and embedded systems." +HOMEPAGE = "http://pocoproject.org/" +SECTION = "libs" +LICENSE = "BSL-1.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=4267f48fc738f50380cbeeb76f95cebc" + +# These dependencies are required by Foundation +DEPENDS = "libpcre2 zlib" + +SRC_URI = "git://github.com/pocoproject/poco.git;branch=poco-1.13.3;protocol=https \ + file://0001-cppignore.lnx-Ignore-PKCS12-and-testLaunch-test.patch \ + file://run-ptest \ + " +SRCREV = "7f848d25aa0461d3beeff1189dc61b48ffe8e2f4" + +UPSTREAM_CHECK_GITTAGREGEX = "poco-(?P\d+(\.\d+)+)" + +S = "${WORKDIR}/git" + +inherit cmake ptest + +# By default the most commonly used poco components are built +# Foundation is built anyway and doesn't need to be listed explicitly +# these don't have dependencies outside oe-core +PACKAGECONFIG ??= "XML JSON PDF Util Net NetSSL Crypto JWT Data DataSQLite Zip Encodings Redis Prometheus" +# MongoDB does not build for all architectures yet keep in sync with COMPATIBLE_HOST list in mongodb recipe +# and mongodb needs meta-python enabled as well +PACKAGECONFIG:remove:riscv32 = "MongoDB" +PACKAGECONFIG:remove:riscv64 = "MongoDB" +PACKAGECONFIG:remove:mipsarch = "MongoDB" +PACKAGECONFIG:remove:powerpc = "MongoDB" + +PACKAGECONFIG[XML] = "-DENABLE_XML=ON,-DENABLE_XML=OFF,expat" +PACKAGECONFIG[JSON] = "-DENABLE_JSON=ON,-DENABLE_JSON=OFF" +PACKAGECONFIG[MongoDB] = "-DENABLE_MONGODB=ON,-DENABLE_MONGODB=OFF" +PACKAGECONFIG[PDF] = "-DENABLE_PDF=ON,-DENABLE_PDF=OFF,zlib" +PACKAGECONFIG[Util] = "-DENABLE_UTIL=ON,-DENABLE_UTIL=OFF" +PACKAGECONFIG[Net] = "-DENABLE_NET=ON,-DENABLE_NET=OFF" +PACKAGECONFIG[NetSSL] = "-DENABLE_NETSSL=ON,-DENABLE_NETSSL=OFF,openssl" +PACKAGECONFIG[Crypto] = "-DENABLE_CRYPTO=ON,-DENABLE_CRYPTO=OFF,openssl" +PACKAGECONFIG[JWT] = "-DENABLE_JWT=ON,-DENABLE_JWT=OFF,openssl" +PACKAGECONFIG[Data] = "-DENABLE_DATA=ON,-DENABLE_DATA=OFF" +PACKAGECONFIG[DataSQLite] = "-DENABLE_DATA_SQLITE=ON -DSQLITE3_LIBRARY:STRING=sqlite3,-DENABLE_DATA_SQLITE=OFF,sqlite3" +PACKAGECONFIG[Zip] = "-DENABLE_ZIP=ON,-DENABLE_ZIP=OFF" +PACKAGECONFIG[Encodings] = "-DENABLE_ENCODINGS=ON,-DENABLE_ENCODINGS=OFF" +PACKAGECONFIG[Redis] = "-DENABLE_REDIS=ON,-DENABLE_REDIS=OFF" +PACKAGECONFIG[Prometheus] = "-DENABLE_PROMETHEUS=ON,-DENABLE_PROMETHEUS=OFF" + +# Additional components not build by default, +# they might have dependencies not included in oe-core +# or they don't work on all architectures +PACKAGECONFIG[mod_poco] = "-DENABLE_APACHECONNECTOR=ON,-DENABLE_APACHECONNECTOR=OFF,apr apache2" +PACKAGECONFIG[CppParser] = "-DENABLE_CPPPARSER=ON,-DENABLE_CPPPARSER=OFF" +PACKAGECONFIG[DataMySQL] = "-DENABLE_DATA_MYSQL=ON -DMYSQL_LIB:STRING=mysqlclient_r,-DENABLE_DATA_MYSQL=OFF,mariadb" +PACKAGECONFIG[DataODBC] = "-DENABLE_DATA_ODBC=ON,-DENABLE_DATA_ODBC=OFF,libiodbc" +PACKAGECONFIG[ActiveRecord] = "-DENABLE_ACTIVERECORD=ON,-DENABLE_ACTIVERECORD=OFF" +PACKAGECONFIG[ActiveRecordCompiler] = "-DENABLE_ACTIVERECORD_COMPILER=ON,-DENABLE_ACTIVERECORD_COMPILER=OFF" +PACKAGECONFIG[PageCompiler] = "-DENABLE_PAGECOMPILER=ON,-DENABLE_PAGECOMPILER=OFF" +PACKAGECONFIG[PageCompilerFile2Page] = "-DENABLE_PAGECOMPILER_FILE2PAGE=ON,-DENABLE_PAGECOMPILER_FILE2PAGE=OFF" +PACKAGECONFIG[SevenZip] = "-DENABLE_SEVENZIP=ON,-DENABLE_SEVENZIP=OFF" + +EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=RelWithDebInfo -DPOCO_UNBUNDLED=ON \ + -DLIB_SUFFIX=${@d.getVar('baselib').replace('lib', '')} \ + ${@bb.utils.contains('PTEST_ENABLED', '1', '-DENABLE_TESTS=ON ', '', d)}" + +# For the native build we want to use the bundled version +EXTRA_OECMAKE:append:class-native = " -DPOCO_UNBUNDLED=OFF" + +# do not use rpath +EXTRA_OECMAKE:append = " -DCMAKE_SKIP_RPATH=ON" + +LDFLAGS:append:riscv32 = "${@bb.utils.contains('PACKAGECONFIG', 'Prometheus', ' -Wl,--no-as-needed -latomic -Wl,--as-needed', '', d)}" +LDFLAGS:append:mips = "${@bb.utils.contains('PACKAGECONFIG', 'Prometheus', ' -Wl,--no-as-needed -latomic -Wl,--as-needed', '', d)}" +LDFLAGS:append:powerpc = "${@bb.utils.contains('PACKAGECONFIG', 'Prometheus', ' -Wl,--no-as-needed -latomic -Wl,--as-needed', '', d)}" + +python populate_packages:prepend () { + poco_libdir = d.expand('${libdir}') + pn = d.getVar("PN") + packages = [] + + def hook(f, pkg, file_regex, output_pattern, modulename): + packages.append(pkg) + + do_split_packages(d, poco_libdir, r'^libPoco(.*)\.so\..*$', + 'poco-%s', 'Poco %s component', extra_depends='', prepend=True, hook=hook) + + d.setVar("RRECOMMENDS:%s" % pn, " ".join(packages)) +} + +do_install_ptest () { + cp -rf ${B}/bin/ ${D}${PTEST_PATH} + cp -f ${B}/lib/libCppUnit.so* ${D}${libdir} + cp -rf ${B}/*/testsuite/data ${D}${PTEST_PATH}/bin/ + find "${D}${PTEST_PATH}" -executable -exec chrpath -d {} \; + rm -f ${D}${PTEST_PATH}/testrunners + for f in ${D}${PTEST_PATH}/bin/*-testrunner; do + echo `basename $f` >> ${D}${PTEST_PATH}/testrunners + done + install -Dm 0644 ${S}/cppignore.lnx ${D}${PTEST_PATH}/cppignore.lnx +} + +PACKAGES_DYNAMIC = "poco-.*" + +# "poco" is a metapackage which pulls in all Poco components +ALLOW_EMPTY:${PN} = "1" + +# cppunit is only built if tests are enabled +PACKAGES =+ "${PN}-cppunit" +FILES:${PN}-cppunit += "${libdir}/libCppUnit.so*" +ALLOW_EMPTY:${PN}-cppunit = "1" + +RDEPENDS:${PN}-ptest += "${PN}-cppunit" +RDEPENDS:${PN}-ptest += "${@bb.utils.contains('PACKAGECONFIG', 'MongoDB', 'mongodb', '', d)}" +RDEPENDS:${PN}-ptest += "${@bb.utils.contains('PACKAGECONFIG', 'Redis', 'redis', '', d)}" + +BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/poppler/poppler-data_0.4.12.bb b/sources/meta-openembedded/meta-oe/recipes-support/poppler/poppler-data_0.4.12.bb index eed21ad5..5433659a 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/poppler/poppler-data_0.4.12.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/poppler/poppler-data_0.4.12.bb @@ -30,7 +30,7 @@ do_compile() { do_install() { oe_runmake install DESTDIR=${D} prefix=${prefix} datadir=${datadir} install -d ${D}${datadir}/poppler/cMap - install -m644 ${WORKDIR}/Identity-* ${D}${datadir}/poppler/cMap/ + install -m644 ${UNPACKDIR}/Identity-* ${D}${datadir}/poppler/cMap/ } FILES:${PN} += "${datadir}" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/poppler/poppler/0001-cmake-Do-not-use-isystem.patch b/sources/meta-openembedded/meta-oe/recipes-support/poppler/poppler/0001-cmake-Do-not-use-isystem.patch index adbe8226..ab2fbf7d 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/poppler/poppler/0001-cmake-Do-not-use-isystem.patch +++ b/sources/meta-openembedded/meta-oe/recipes-support/poppler/poppler/0001-cmake-Do-not-use-isystem.patch @@ -40,11 +40,9 @@ Upstream-Status: Pending utils/CMakeLists.txt | 10 +++++----- 6 files changed, 16 insertions(+), 16 deletions(-) -diff --git a/CMakeLists.txt b/CMakeLists.txt -index c6c757c..5f1c540 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -603,10 +603,10 @@ add_library(poppler ${poppler_SRCS}) +@@ -628,10 +628,10 @@ add_library(poppler ${poppler_SRCS} ${LI if (OpenJPEG_FOUND) # check if we can remove this when we depend on newer openjpeg versions, 2.5 seems fixed # target openjp2 may lack interface include directories @@ -56,9 +54,7 @@ index c6c757c..5f1c540 100644 + target_include_directories(poppler PRIVATE ${LCMS2_INCLUDE_DIR}) endif() generate_export_header(poppler BASE_NAME poppler-private EXPORT_FILE_NAME "${CMAKE_CURRENT_BINARY_DIR}/poppler_private_export.h") - set_target_properties(poppler PROPERTIES VERSION 127.0.0 SOVERSION 127) -diff --git a/glib/CMakeLists.txt b/glib/CMakeLists.txt -index 52e8687..08ab39a 100644 + set_target_properties(poppler PROPERTIES --- a/glib/CMakeLists.txt +++ b/glib/CMakeLists.txt @@ -4,7 +4,7 @@ include_directories( @@ -66,7 +62,7 @@ index 52e8687..08ab39a 100644 include_directories( - SYSTEM -+ ++ ${GLIB2_INCLUDE_DIRS} ${CAIRO_INCLUDE_DIRS} ) @@ -78,9 +74,7 @@ index 52e8687..08ab39a 100644 +target_include_directories(poppler-glib PRIVATE ${CAIRO_INCLUDE_DIRS}) install(TARGETS poppler-glib RUNTIME DESTINATION bin LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) - install(FILES -diff --git a/qt5/src/CMakeLists.txt b/qt5/src/CMakeLists.txt -index 5db3a6c..f242d29 100644 + if (ENABLE_NSS3) --- a/qt5/src/CMakeLists.txt +++ b/qt5/src/CMakeLists.txt @@ -45,11 +45,11 @@ if(MINGW AND BUILD_SHARED_LIBS) @@ -97,8 +91,6 @@ index 5db3a6c..f242d29 100644 endif() install(TARGETS poppler-qt5 RUNTIME DESTINATION bin LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) -diff --git a/qt6/src/CMakeLists.txt b/qt6/src/CMakeLists.txt -index cd91975..6c42e12 100644 --- a/qt6/src/CMakeLists.txt +++ b/qt6/src/CMakeLists.txt @@ -45,11 +45,11 @@ if(MINGW AND BUILD_SHARED_LIBS) @@ -115,8 +107,6 @@ index cd91975..6c42e12 100644 endif() install(TARGETS poppler-qt6 RUNTIME DESTINATION bin LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) -diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt -index afa1352..9bd3b9a 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -23,7 +23,7 @@ if (GTK_FOUND) @@ -146,11 +136,9 @@ index afa1352..9bd3b9a 100644 endif () endif () -diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt -index 1c3ebcb..bc1840a 100644 --- a/utils/CMakeLists.txt +++ b/utils/CMakeLists.txt -@@ -16,7 +16,7 @@ add_executable(pdftoppm ${pdftoppm_SOURCES}) +@@ -18,7 +18,7 @@ add_executable(pdftoppm ${pdftoppm_SOURC target_link_libraries(pdftoppm ${common_libs}) if(LCMS2_FOUND) target_link_libraries(pdftoppm ${LCMS2_LIBRARIES}) @@ -159,7 +147,7 @@ index 1c3ebcb..bc1840a 100644 endif() install(TARGETS pdftoppm DESTINATION bin) install(FILES pdftoppm.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1) -@@ -37,10 +37,10 @@ if (HAVE_CAIRO) +@@ -39,10 +39,10 @@ if (HAVE_CAIRO) add_definitions(${CAIRO_CFLAGS}) add_executable(pdftocairo ${pdftocairo_SOURCES}) target_link_libraries(pdftocairo ${CAIRO_LIBRARIES} Freetype::Freetype ${common_libs}) @@ -172,16 +160,16 @@ index 1c3ebcb..bc1840a 100644 endif() install(TARGETS pdftocairo DESTINATION bin) install(FILES pdftocairo.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1) -@@ -99,7 +99,7 @@ if (ENABLE_NSS3) - pdfsig.cc - ) +@@ -109,7 +109,7 @@ if (ENABLE_SIGNATURES) add_executable(pdfsig ${pdfsig_SOURCES}) -- target_include_directories(pdfsig SYSTEM PRIVATE ${NSS3_INCLUDE_DIRS}) -+ target_include_directories(pdfsig PRIVATE ${NSS3_INCLUDE_DIRS}) target_link_libraries(pdfsig ${common_libs}) - install(TARGETS pdfsig DESTINATION bin) - install(FILES pdfsig.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1) -@@ -114,7 +114,7 @@ add_executable(pdftops ${pdftops_SOURCES}) + if (ENABLE_NSS3) +- target_include_directories(pdfsig SYSTEM PRIVATE ${NSS3_INCLUDE_DIRS}) ++ target_include_directories(pdfsig PRIVATE ${NSS3_INCLUDE_DIRS}) + endif() + if (Intl_FOUND) + target_link_libraries(pdfsig Intl::Intl) +@@ -127,7 +127,7 @@ add_executable(pdftops ${pdftops_SOURCES target_link_libraries(pdftops ${common_libs}) if(LCMS2_FOUND) target_link_libraries(pdftops ${LCMS2_LIBRARIES}) diff --git a/sources/meta-openembedded/meta-oe/recipes-support/poppler/poppler/CVE-2023-34872.patch b/sources/meta-openembedded/meta-oe/recipes-support/poppler/poppler/CVE-2023-34872.patch deleted file mode 100644 index cc942fad..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/poppler/poppler/CVE-2023-34872.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 591235c8b6c65a2eee88991b9ae73490fd9afdfe Mon Sep 17 00:00:00 2001 -From: Albert Astals Cid -Date: Fri, 18 Aug 2023 11:36:06 +0000 -Subject: [PATCH] OutlineItem::open: Fix crash on malformed files - -Fixes #1399 - -CVE: CVE-2023-34872 - -Upstream-Status: Backport [https://gitlab.freedesktop.org/poppler/poppler/-/commit/591235c8b6c65a2eee88991b9ae73490fd9afdfe] - -Signed-off-by: Yogita Urade ---- - poppler/Outline.cc | 10 +++++++--- - 1 file changed, 7 insertions(+), 3 deletions(-) - -diff --git a/poppler/Outline.cc b/poppler/Outline.cc -index cbb6cb4..4c68be9 100644 ---- a/poppler/Outline.cc -+++ b/poppler/Outline.cc -@@ -14,7 +14,7 @@ - // under GPL version 2 or later - // - // Copyright (C) 2005 Marco Pesenti Gritti --// Copyright (C) 2008, 2016-2019, 2021 Albert Astals Cid -+// Copyright (C) 2008, 2016-2019, 2021, 2023 Albert Astals Cid - // Copyright (C) 2009 Nick Jones - // Copyright (C) 2016 Jason Crain - // Copyright (C) 2017 Adrian Johnson -@@ -483,8 +483,12 @@ void OutlineItem::open() - { - if (!kids) { - Object itemDict = xref->fetch(ref); -- const Object &firstRef = itemDict.dictLookupNF("First"); -- kids = readItemList(this, &firstRef, xref, doc); -+ if (itemDict.isDict()) { -+ const Object &firstRef = itemDict.dictLookupNF("First"); -+ kids = readItemList(this, &firstRef, xref, doc); -+ } else { -+ kids = new std::vector(); -+ } - } - } - --- -2.35.5 diff --git a/sources/meta-openembedded/meta-oe/recipes-support/poppler/poppler/CVE-2024-56378.patch b/sources/meta-openembedded/meta-oe/recipes-support/poppler/poppler/CVE-2024-56378.patch deleted file mode 100644 index f94b8fed..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/poppler/poppler/CVE-2024-56378.patch +++ /dev/null @@ -1,77 +0,0 @@ -From ade9b5ebed44b0c15522c27669ef6cdf93eff84e Mon Sep 17 00:00:00 2001 -From: Albert Astals Cid -Date: Tue, 17 Dec 2024 18:59:01 +0100 -Subject: [PATCH] JBIG2Bitmap::combine: Fix crash on malformed files - -Fixes #1553 - -CVE: CVE-2024-56378 -Upstream-Status: Backport [https://gitlab.freedesktop.org/poppler/poppler/-/commit/ade9b5ebed44b0c15522c27669ef6cdf93eff84e] - -Signed-off-by: Yogita Urade ---- - poppler/JBIG2Stream.cc | 15 +++++++++------ - 1 file changed, 9 insertions(+), 6 deletions(-) - -diff --git a/poppler/JBIG2Stream.cc b/poppler/JBIG2Stream.cc -index 77ffeb2..bdc51d0 100644 ---- a/poppler/JBIG2Stream.cc -+++ b/poppler/JBIG2Stream.cc -@@ -765,7 +765,7 @@ void JBIG2Bitmap::duplicateRow(int yDest, int ySrc) - - void JBIG2Bitmap::combine(JBIG2Bitmap *bitmap, int x, int y, unsigned int combOp) - { -- int x0, x1, y0, y1, xx, yy; -+ int x0, x1, y0, y1, xx, yy, yyy; - unsigned char *srcPtr, *destPtr; - unsigned int src0, src1, src, dest, s1, s2, m1, m2, m3; - bool oneByte; -@@ -812,14 +812,17 @@ void JBIG2Bitmap::combine(JBIG2Bitmap *bitmap, int x, int y, unsigned int combOp - oneByte = x0 == ((x1 - 1) & ~7); - - for (yy = y0; yy < y1; ++yy) { -- if (unlikely((y + yy >= h) || (y + yy < 0))) { -+ if (unlikely(checkedAdd(y, yy, &yyy))) { -+ continue; -+ } -+ if (unlikely((yyy >= h) || (yyy < 0))) { - continue; - } - - // one byte per line -- need to mask both left and right side - if (oneByte) { - if (x >= 0) { -- destPtr = data + (y + yy) * line + (x >> 3); -+ destPtr = data + yyy * line + (x >> 3); - srcPtr = bitmap->data + yy * bitmap->line; - dest = *destPtr; - src1 = *srcPtr; -@@ -842,7 +845,7 @@ void JBIG2Bitmap::combine(JBIG2Bitmap *bitmap, int x, int y, unsigned int combOp - } - *destPtr = dest; - } else { -- destPtr = data + (y + yy) * line; -+ destPtr = data + yyy * line; - srcPtr = bitmap->data + yy * bitmap->line + (-x >> 3); - dest = *destPtr; - src1 = *srcPtr; -@@ -872,7 +875,7 @@ void JBIG2Bitmap::combine(JBIG2Bitmap *bitmap, int x, int y, unsigned int combOp - - // left-most byte - if (x >= 0) { -- destPtr = data + (y + yy) * line + (x >> 3); -+ destPtr = data + yyy * line + (x >> 3); - srcPtr = bitmap->data + yy * bitmap->line; - src1 = *srcPtr++; - dest = *destPtr; -@@ -896,7 +899,7 @@ void JBIG2Bitmap::combine(JBIG2Bitmap *bitmap, int x, int y, unsigned int combOp - *destPtr++ = dest; - xx = x0 + 8; - } else { -- destPtr = data + (y + yy) * line; -+ destPtr = data + yyy * line; - srcPtr = bitmap->data + yy * bitmap->line + (-x >> 3); - src1 = *srcPtr++; - xx = x0; --- -2.40.0 diff --git a/sources/meta-openembedded/meta-oe/recipes-support/poppler/poppler/CVE-2024-6239-0001.patch b/sources/meta-openembedded/meta-oe/recipes-support/poppler/poppler/CVE-2024-6239-0001.patch deleted file mode 100644 index 9994ce78..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/poppler/poppler/CVE-2024-6239-0001.patch +++ /dev/null @@ -1,1275 +0,0 @@ -From fc1c711cb5f769546c6b31cc688bf0ee7f0c1dbc Mon Sep 17 00:00:00 2001 -From: Sune Vuorela -Date: Thu, 1 Feb 2024 19:11:03 +0000 -Subject: [PATCH] More unicode vectors; fewer raw pointers - -CVE: CVE-2024-6239 -Upstream-Status: Backport [https://gitlab.freedesktop.org/poppler/poppler/-/commit/fc1c711cb5f769546c6b31cc688bf0ee7f0c1dbc] - -Signed-off-by: Yogita Urade ---- - cpp/poppler-toc.cpp | 5 +- - glib/poppler-document.cc | 3 +- - poppler/CharCodeToUnicode.cc | 113 +++++++++------------------ - poppler/CharCodeToUnicode.h | 12 ++- - poppler/DateInfo.cc | 10 +-- - poppler/JSInfo.cc | 9 +-- - poppler/Outline.cc | 12 +-- - poppler/Outline.h | 7 +- - poppler/TextOutputDev.cc | 8 +- - poppler/UTF.cc | 78 ++++++++---------- - poppler/UTF.h | 11 ++- - qt5/src/poppler-outline.cc | 2 +- - qt5/src/poppler-private.cc | 13 ++- - qt5/src/poppler-private.h | 1 + - qt5/tests/check_internal_outline.cpp | 6 +- - qt5/tests/check_utf_conversion.cpp | 24 +++--- - qt6/src/poppler-outline.cc | 2 +- - qt6/src/poppler-private.cc | 5 ++ - qt6/src/poppler-private.h | 1 + - qt6/tests/check_internal_outline.cpp | 6 +- - qt6/tests/check_utf_conversion.cpp | 24 +++--- - utils/HtmlFonts.cc | 4 +- - utils/HtmlFonts.h | 2 +- - utils/HtmlOutputDev.cc | 38 ++++----- - utils/HtmlOutputDev.h | 2 +- - utils/pdfinfo.cc | 8 +- - utils/pdfsig.cc | 8 +- - utils/pdftohtml.cc | 25 +++--- - 28 files changed, 183 insertions(+), 256 deletions(-) - -diff --git a/cpp/poppler-toc.cpp b/cpp/poppler-toc.cpp -index c79abde..ed3a983 100644 ---- a/cpp/poppler-toc.cpp -+++ b/cpp/poppler-toc.cpp -@@ -61,9 +61,8 @@ toc_item_private::~toc_item_private() - - void toc_item_private::load(const OutlineItem *item) - { -- const Unicode *title_unicode = item->getTitle(); -- const int title_length = item->getTitleLength(); -- title = detail::unicode_to_ustring(title_unicode, title_length); -+ const std::vector &title_unicode = item->getTitle(); -+ title = detail::unicode_to_ustring(title_unicode.data(), title_unicode.size()); - is_open = item->isOpen(); - } - -diff --git a/glib/poppler-document.cc b/glib/poppler-document.cc -index 7505a6f..fdfefdc 100644 ---- a/glib/poppler-document.cc -+++ b/glib/poppler-document.cc -@@ -2772,7 +2772,8 @@ PopplerAction *poppler_index_iter_get_action(PopplerIndexIter *iter) - item = (*iter->items)[iter->index]; - link_action = item->getAction(); - -- title = unicode_to_char(item->getTitle(), item->getTitleLength()); -+ const std::vector &itemTitle = item->getTitle(); -+ title = unicode_to_char(itemTitle.data(), itemTitle.size()); - - action = _poppler_action_new(iter->document, link_action, title); - g_free(title); -diff --git a/poppler/CharCodeToUnicode.cc b/poppler/CharCodeToUnicode.cc -index cd00937..d9ef019 100644 ---- a/poppler/CharCodeToUnicode.cc -+++ b/poppler/CharCodeToUnicode.cc -@@ -38,6 +38,7 @@ - - #include - #include -+#include - #include "goo/glibc.h" - #include "goo/gmem.h" - #include "goo/gfile.h" -@@ -51,13 +52,6 @@ - - //------------------------------------------------------------------------ - --struct CharCodeToUnicodeString --{ -- CharCode c; -- Unicode *u; -- int len; --}; -- - //------------------------------------------------------------------------ - - static int getCharFromString(void *data) -@@ -162,7 +156,7 @@ CharCodeToUnicode *CharCodeToUnicode::parseCIDToUnicode(const char *fileName, co - } - fclose(f); - -- ctu = new CharCodeToUnicode(collection->toStr(), mapA, mapLenA, true, nullptr, 0, 0); -+ ctu = new CharCodeToUnicode(collection->toStr(), mapA, mapLenA, true, {}); - gfree(mapA); - return ctu; - } -@@ -171,8 +165,7 @@ CharCodeToUnicode *CharCodeToUnicode::parseUnicodeToUnicode(const GooString *fil - { - FILE *f; - Unicode *mapA; -- CharCodeToUnicodeString *sMapA; -- CharCode size, oldSize, len, sMapSizeA, sMapLenA; -+ CharCode size, oldSize, len; - char buf[256]; - char *tok; - Unicode u0; -@@ -192,8 +185,7 @@ CharCodeToUnicode *CharCodeToUnicode::parseUnicodeToUnicode(const GooString *fil - mapA = (Unicode *)gmallocn(size, sizeof(Unicode)); - memset(mapA, 0, size * sizeof(Unicode)); - len = 0; -- sMapA = nullptr; -- sMapSizeA = sMapLenA = 0; -+ std::vector sMapA; - - line = 0; - while (getLine(buf, sizeof(buf), f)) { -@@ -230,17 +222,12 @@ CharCodeToUnicode *CharCodeToUnicode::parseUnicodeToUnicode(const GooString *fil - mapA[u0] = uBuf[0]; - } else { - mapA[u0] = 0; -- if (sMapLenA == sMapSizeA) { -- sMapSizeA += 16; -- sMapA = (CharCodeToUnicodeString *)greallocn(sMapA, sMapSizeA, sizeof(CharCodeToUnicodeString)); -- } -- sMapA[sMapLenA].c = u0; -- sMapA[sMapLenA].u = (Unicode *)gmallocn(n, sizeof(Unicode)); -+ std::vector u; -+ u.reserve(n); - for (i = 0; i < n; ++i) { -- sMapA[sMapLenA].u[i] = uBuf[i]; -+ u.push_back(uBuf[i]); - } -- sMapA[sMapLenA].len = n; -- ++sMapLenA; -+ sMapA.push_back({ u0, std::move(u) }); - } - if (u0 >= len) { - len = u0 + 1; -@@ -248,7 +235,7 @@ CharCodeToUnicode *CharCodeToUnicode::parseUnicodeToUnicode(const GooString *fil - } - fclose(f); - -- ctu = new CharCodeToUnicode(fileName->toStr(), mapA, len, true, sMapA, sMapLenA, sMapSizeA); -+ ctu = new CharCodeToUnicode(fileName->toStr(), mapA, len, true, std::move(sMapA)); - gfree(mapA); - gfree(uBuf); - return ctu; -@@ -256,7 +243,7 @@ CharCodeToUnicode *CharCodeToUnicode::parseUnicodeToUnicode(const GooString *fil - - CharCodeToUnicode *CharCodeToUnicode::make8BitToUnicode(Unicode *toUnicode) - { -- return new CharCodeToUnicode({}, toUnicode, 256, true, nullptr, 0, 0); -+ return new CharCodeToUnicode({}, toUnicode, 256, true, {}); - } - - CharCodeToUnicode *CharCodeToUnicode::parseCMap(const GooString *buf, int nBits) -@@ -512,25 +499,18 @@ void CharCodeToUnicode::addMapping(CharCode code, char *uStr, int n, int offset) - map[code] = 0xfffd; - } - } else { -- if (sMapLen >= sMapSize) { -- sMapSize = sMapSize + 16; -- sMap = (CharCodeToUnicodeString *)greallocn(sMap, sMapSize, sizeof(CharCodeToUnicodeString)); -- } - map[code] = 0; -- sMap[sMapLen].c = code; - int utf16Len = n / 4; -- Unicode *utf16 = (Unicode *)gmallocn(utf16Len, sizeof(Unicode)); -+ std::vector utf16(utf16Len); -+ utf16.resize(utf16Len); - for (j = 0; j < utf16Len; ++j) { - if (!parseHex(uStr + j * 4, 4, &utf16[j])) { -- gfree(utf16); - error(errSyntaxWarning, -1, "Illegal entry in ToUnicode CMap"); - return; - } - } - utf16[utf16Len - 1] += offset; -- sMap[sMapLen].len = UTF16toUCS4(utf16, utf16Len, &sMap[sMapLen].u); -- gfree(utf16); -- ++sMapLen; -+ sMap.push_back({ code, UTF16toUCS4(utf16.data(), utf16.size()) }); - } - } - -@@ -561,8 +541,6 @@ CharCodeToUnicode::CharCodeToUnicode() - { - map = nullptr; - mapLen = 0; -- sMap = nullptr; -- sMapLen = sMapSize = 0; - refCnt = 1; - isIdentity = false; - } -@@ -576,13 +554,11 @@ CharCodeToUnicode::CharCodeToUnicode(const std::optional &tagA) : t - for (i = 0; i < mapLen; ++i) { - map[i] = 0; - } -- sMap = nullptr; -- sMapLen = sMapSize = 0; - refCnt = 1; - isIdentity = false; - } - --CharCodeToUnicode::CharCodeToUnicode(const std::optional &tagA, Unicode *mapA, CharCode mapLenA, bool copyMap, CharCodeToUnicodeString *sMapA, int sMapLenA, int sMapSizeA) : tag(tagA) -+CharCodeToUnicode::CharCodeToUnicode(const std::optional &tagA, Unicode *mapA, CharCode mapLenA, bool copyMap, std::vector &&sMapA) : tag(tagA) - { - mapLen = mapLenA; - if (copyMap) { -@@ -591,9 +567,7 @@ CharCodeToUnicode::CharCodeToUnicode(const std::optional &tagA, Uni - } else { - map = mapA; - } -- sMap = sMapA; -- sMapLen = sMapLenA; -- sMapSize = sMapSizeA; -+ sMap = std::move(sMapA); - refCnt = 1; - isIdentity = false; - } -@@ -601,12 +575,6 @@ CharCodeToUnicode::CharCodeToUnicode(const std::optional &tagA, Uni - CharCodeToUnicode::~CharCodeToUnicode() - { - gfree(map); -- if (sMap) { -- for (int i = 0; i < sMapLen; ++i) { -- gfree(sMap[i].u); -- } -- gfree(sMap); -- } - } - - void CharCodeToUnicode::incRefCnt() -@@ -628,7 +596,8 @@ bool CharCodeToUnicode::match(const GooString *tagA) - - void CharCodeToUnicode::setMapping(CharCode c, Unicode *u, int len) - { -- int i, j; -+ size_t i; -+ int j; - - if (!map || isIdentity) { - return; -@@ -636,28 +605,26 @@ void CharCodeToUnicode::setMapping(CharCode c, Unicode *u, int len) - if (len == 1) { - map[c] = u[0]; - } else { -- for (i = 0; i < sMapLen; ++i) { -+ std::optional> element; -+ for (i = 0; i < sMap.size(); ++i) { - if (sMap[i].c == c) { -- gfree(sMap[i].u); -+ sMap[i].u.clear(); -+ element = std::ref(sMap[i]); - break; - } - } -- if (i == sMapLen) { -- if (sMapLen == sMapSize) { -- sMapSize += 8; -- sMap = (CharCodeToUnicodeString *)greallocn(sMap, sMapSize, sizeof(CharCodeToUnicodeString)); -- } -- ++sMapLen; -+ if (!element) { -+ sMap.emplace_back(CharCodeToUnicodeString { c, {} }); -+ element = std::ref(sMap.back()); - } - map[c] = 0; -- sMap[i].c = c; -- sMap[i].len = len; -- sMap[i].u = (Unicode *)gmallocn(len, sizeof(Unicode)); -+ element->get().c = c; -+ element->get().u.reserve(len); - for (j = 0; j < len; ++j) { - if (UnicodeIsValid(u[j])) { -- sMap[i].u[j] = u[j]; -+ element->get().u.push_back(u[j]); - } else { -- sMap[i].u[j] = 0xfffd; -+ element->get().u.push_back(0xfffd); - } - } - } -@@ -665,8 +632,6 @@ void CharCodeToUnicode::setMapping(CharCode c, Unicode *u, int len) - - int CharCodeToUnicode::mapToUnicode(CharCode c, Unicode const **u) const - { -- int i; -- - if (isIdentity) { - map[0] = (Unicode)c; - *u = map; -@@ -679,10 +644,10 @@ int CharCodeToUnicode::mapToUnicode(CharCode c, Unicode const **u) const - *u = &map[c]; - return 1; - } -- for (i = sMapLen - 1; i >= 0; --i) { // in reverse so CMap takes precedence -- if (sMap[i].c == c) { -- *u = sMap[i].u; -- return sMap[i].len; -+ for (auto i = sMap.size(); i > 0; --i) { // in reverse so CMap takes precedence -+ if (sMap[i - 1].c == c) { -+ *u = sMap[i - 1].u.data(); -+ return sMap[i - 1].u.size(); - } - } - return 0; -@@ -704,24 +669,24 @@ int CharCodeToUnicode::mapToCharCode(const Unicode *u, CharCode *c, int usize) c - } - *c = 'x'; - } else { -- int i, j; -+ size_t j; - // for each entry in the sMap -- for (i = 0; i < sMapLen; i++) { -+ for (const auto &element : sMap) { - // if the entry's unicode length isn't the same are usize, the strings - // are obviously different -- if (sMap[i].len != usize) { -+ if (element.u.size() != size_t(usize)) { - continue; - } - // compare the string char by char -- for (j = 0; j < sMap[i].len; j++) { -- if (sMap[i].u[j] != u[j]) { -+ for (j = 0; j < element.u.size(); j++) { -+ if (element.u[j] != u[j]) { - break; - } - } - - // we have the same strings -- if (j == sMap[i].len) { -- *c = sMap[i].c; -+ if (j == element.u.size()) { -+ *c = element.c; - return 1; - } - } -diff --git a/poppler/CharCodeToUnicode.h b/poppler/CharCodeToUnicode.h -index 596d44d..9aa2571 100644 ---- a/poppler/CharCodeToUnicode.h -+++ b/poppler/CharCodeToUnicode.h -@@ -33,11 +33,11 @@ - - #include - #include -+#include - - #include "poppler-config.h" - #include "CharTypes.h" - --struct CharCodeToUnicodeString; - class GooString; - - //------------------------------------------------------------------------ -@@ -100,18 +100,22 @@ public: - CharCode getLength() const { return mapLen; } - - private: -+ struct CharCodeToUnicodeString -+ { -+ CharCode c; -+ std::vector u; -+ }; - bool parseCMap1(int (*getCharFunc)(void *), void *data, int nBits); - void addMapping(CharCode code, char *uStr, int n, int offset); - void addMappingInt(CharCode code, Unicode u); - CharCodeToUnicode(); - explicit CharCodeToUnicode(const std::optional &tagA); -- CharCodeToUnicode(const std::optional &tagA, Unicode *mapA, CharCode mapLenA, bool copyMap, CharCodeToUnicodeString *sMapA, int sMapLenA, int sMapSizeA); -+ CharCodeToUnicode(const std::optional &tagA, Unicode *mapA, CharCode mapLenA, bool copyMap, std::vector &&sMapA); - - const std::optional tag; - Unicode *map; - CharCode mapLen; -- CharCodeToUnicodeString *sMap; -- int sMapLen, sMapSize; -+ std::vector sMap; - std::atomic_int refCnt; - bool isIdentity; - }; -diff --git a/poppler/DateInfo.cc b/poppler/DateInfo.cc -index cdba4ab..28474de 100644 ---- a/poppler/DateInfo.cc -+++ b/poppler/DateInfo.cc -@@ -36,16 +36,14 @@ - /* See PDF Reference 1.3, Section 3.8.2 for PDF Date representation */ - bool parseDateString(const GooString *date, int *year, int *month, int *day, int *hour, int *minute, int *second, char *tz, int *tzHour, int *tzMinute) - { -- Unicode *u; -- int len = TextStringToUCS4(date->toStr(), &u); -+ std::vector u = TextStringToUCS4(date->toStr()); - GooString s; -- for (int i = 0; i < len; i++) { -+ for (auto &c : u) { - // Ignore any non ASCII characters -- if (u[i] < 128) { -- s.append(u[i]); -+ if (c < 128) { -+ s.append(c); - } - } -- gfree(u); - const char *dateString = s.c_str(); - - if (strlen(dateString) < 2) { -diff --git a/poppler/JSInfo.cc b/poppler/JSInfo.cc -index 29fa707..eaef33e 100644 ---- a/poppler/JSInfo.cc -+++ b/poppler/JSInfo.cc -@@ -38,20 +38,17 @@ JSInfo::~JSInfo() { } - - void JSInfo::printJS(const GooString *js) - { -- Unicode *u = nullptr; - char buf[8]; -- int i, n, len; - - if (!js || !js->c_str()) { - return; - } - -- len = TextStringToUCS4(js->toStr(), &u); -- for (i = 0; i < len; i++) { -- n = uniMap->mapUnicode(u[i], buf, sizeof(buf)); -+ std::vector u = TextStringToUCS4(js->toStr()); -+ for (auto &c : u) { -+ int n = uniMap->mapUnicode(c, buf, sizeof(buf)); - fwrite(buf, 1, n, file); - } -- gfree(u); - } - - void JSInfo::scanLinkAction(LinkAction *link, const char *action) -diff --git a/poppler/Outline.cc b/poppler/Outline.cc -index 4c68be9..086c104 100644 ---- a/poppler/Outline.cc -+++ b/poppler/Outline.cc -@@ -407,15 +407,12 @@ OutlineItem::OutlineItem(const Dict *dict, Ref refA, OutlineItem *parentA, XRef - parent = parentA; - xref = xrefA; - doc = docA; -- title = nullptr; - kids = nullptr; - - obj1 = dict->lookup("Title"); - if (obj1.isString()) { - const GooString *s = obj1.getString(); -- titleLen = TextStringToUCS4(s->toStr(), &title); -- } else { -- titleLen = 0; -+ title = TextStringToUCS4(s->toStr()); - } - - obj1 = dict->lookup("Dest"); -@@ -446,9 +443,6 @@ OutlineItem::~OutlineItem() - delete kids; - kids = nullptr; - } -- if (title) { -- gfree(title); -- } - } - - std::vector *OutlineItem::readItemList(OutlineItem *parent, const Object *firstItemRef, XRef *xrefA, PDFDoc *docA) -@@ -494,11 +488,9 @@ void OutlineItem::open() - - void OutlineItem::setTitle(const std::string &titleA) - { -- gfree(title); -- - Object dict = xref->fetch(ref); - GooString *g = new GooString(titleA); -- titleLen = TextStringToUCS4(g->toStr(), &title); -+ title = TextStringToUCS4(g->toStr()); - dict.dictSet("Title", Object(g)); - xref->setModifiedObject(&dict, ref); - } -diff --git a/poppler/Outline.h b/poppler/Outline.h -index a301604..af431f6 100644 ---- a/poppler/Outline.h -+++ b/poppler/Outline.h -@@ -27,6 +27,7 @@ - #define OUTLINE_H - - #include -+#include - #include "Object.h" - #include "CharTypes.h" - #include "poppler_private_export.h" -@@ -91,9 +92,8 @@ public: - OutlineItem(const OutlineItem &) = delete; - OutlineItem &operator=(const OutlineItem &) = delete; - static std::vector *readItemList(OutlineItem *parent, const Object *firstItemRef, XRef *xrefA, PDFDoc *docA); -- const Unicode *getTitle() const { return title; } -+ const std::vector &getTitle() const { return title; } - void setTitle(const std::string &titleA); -- int getTitleLength() const { return titleLen; } - bool setPageDest(int i); - // OutlineItem keeps the ownership of the action - const LinkAction *getAction() const { return action.get(); } -@@ -112,8 +112,7 @@ private: - OutlineItem *parent; - PDFDoc *doc; - XRef *xref; -- Unicode *title; -- int titleLen; -+ std::vector title; - std::unique_ptr action; - bool startsOpen; - std::vector *kids; // nullptr if this item is closed or has no kids -diff --git a/poppler/TextOutputDev.cc b/poppler/TextOutputDev.cc -index 06fc307..ee11fcb 100644 ---- a/poppler/TextOutputDev.cc -+++ b/poppler/TextOutputDev.cc -@@ -5668,15 +5668,11 @@ void ActualText::end(const GfxState *state) - // extents of all the glyphs inside the span - - if (actualTextNBytes) { -- Unicode *uni = nullptr; -- int length; -- - // now that we have the position info for all of the text inside - // the marked content span, we feed the "ActualText" back through - // text->addChar() -- length = TextStringToUCS4(actualText->toStr(), &uni); -- text->addChar(state, actualTextX0, actualTextY0, actualTextX1 - actualTextX0, actualTextY1 - actualTextY0, 0, actualTextNBytes, uni, length); -- gfree(uni); -+ std::vector uni = TextStringToUCS4(actualText->toStr()); -+ text->addChar(state, actualTextX0, actualTextY0, actualTextX1 - actualTextX0, actualTextY1 - actualTextY0, 0, actualTextNBytes, uni.data(), uni.size()); - } - - delete actualText; -diff --git a/poppler/UTF.cc b/poppler/UTF.cc -index 9b1bf95..eb542eb 100644 ---- a/poppler/UTF.cc -+++ b/poppler/UTF.cc -@@ -42,65 +42,52 @@ bool UnicodeIsValid(Unicode ucs4) - return (ucs4 < 0x110000) && ((ucs4 & 0xfffff800) != 0xd800) && (ucs4 < 0xfdd0 || ucs4 > 0xfdef) && ((ucs4 & 0xfffe) != 0xfffe); - } - --int UTF16toUCS4(const Unicode *utf16, int utf16Len, Unicode **ucs4_out) -+std::vector UTF16toUCS4(const Unicode *utf16, int utf16Len) - { -- int i, n, len; -- Unicode *u; -- - // count characters -- len = 0; -- for (i = 0; i < utf16Len; i++) { -+ int len = 0; -+ for (int i = 0; i < utf16Len; i++) { - if (utf16[i] >= 0xd800 && utf16[i] < 0xdc00 && i + 1 < utf16Len && utf16[i + 1] >= 0xdc00 && utf16[i + 1] < 0xe000) { - i++; /* surrogate pair */ - } - len++; - } -- if (ucs4_out == nullptr) { -- return len; -- } -- -- u = (Unicode *)gmallocn(len, sizeof(Unicode)); -- n = 0; -+ std::vector u; -+ u.reserve(len); - // convert string -- for (i = 0; i < utf16Len; i++) { -+ for (int i = 0; i < utf16Len; i++) { - if (utf16[i] >= 0xd800 && utf16[i] < 0xdc00) { /* surrogate pair */ - if (i + 1 < utf16Len && utf16[i + 1] >= 0xdc00 && utf16[i + 1] < 0xe000) { - /* next code is a low surrogate */ -- u[n] = (((utf16[i] & 0x3ff) << 10) | (utf16[i + 1] & 0x3ff)) + 0x10000; -+ u.push_back((((utf16[i] & 0x3ff) << 10) | (utf16[i + 1] & 0x3ff)) + 0x10000); - ++i; - } else { - /* missing low surrogate - replace it with REPLACEMENT CHARACTER (U+FFFD) */ -- u[n] = 0xfffd; -+ u.push_back(0xfffd); - } - } else if (utf16[i] >= 0xdc00 && utf16[i] < 0xe000) { - /* invalid low surrogate - replace it with REPLACEMENT CHARACTER (U+FFFD) */ -- u[n] = 0xfffd; -+ u.push_back(0xfffd); - } else { -- u[n] = utf16[i]; -+ u.push_back(utf16[i]); - } -- if (!UnicodeIsValid(u[n])) { -- u[n] = 0xfffd; -+ if (!UnicodeIsValid(u.back())) { -+ u.back() = 0xfffd; - } -- n++; - } -- *ucs4_out = u; -- return len; -+ return u; - } - --int TextStringToUCS4(const std::string &textStr, Unicode **ucs4) -+std::vector TextStringToUCS4(const std::string &textStr) - { -- int i, len; -- const char *s; -- Unicode *u; - bool isUnicode, isUnicodeLE; - -- len = textStr.size(); -- s = textStr.c_str(); -+ int len = textStr.size(); -+ const std::string &s = textStr; - if (len == 0) { -- *ucs4 = nullptr; -- return 0; -+ return {}; - } - - if (GooString::hasUnicodeMarker(textStr)) { -@@ -115,30 +102,30 @@ int TextStringToUCS4(const std::string &textStr, Unicode **ucs4) - } - - if (isUnicode || isUnicodeLE) { -- Unicode *utf16; - len = len / 2 - 1; - if (len > 0) { -- utf16 = new Unicode[len]; -- for (i = 0; i < len; i++) { -+ std::vector utf16; -+ utf16.reserve(len); -+ for (int i = 0; i < len; i++) { - if (isUnicode) { -- utf16[i] = (s[2 + i * 2] & 0xff) << 8 | (s[3 + i * 2] & 0xff); -+ utf16.push_back((s[2 + i * 2] & 0xff) << 8 | (s[3 + i * 2] & 0xff)); - } else { // UnicodeLE -- utf16[i] = (s[3 + i * 2] & 0xff) << 8 | (s[2 + i * 2] & 0xff); -+ utf16.push_back((s[3 + i * 2] & 0xff) << 8 | (s[2 + i * 2] & 0xff)); - } - } -- len = UTF16toUCS4(utf16, len, &u); -- delete[] utf16; -+ return UTF16toUCS4(utf16.data(), utf16.size()); -+ - } else { -- u = nullptr; -+ return {}; - } - } else { -- u = (Unicode *)gmallocn(len, sizeof(Unicode)); -- for (i = 0; i < len; i++) { -- u[i] = pdfDocEncoding[s[i] & 0xff]; -+ std::vector u; -+ u.reserve(len); -+ for (int i = 0; i < len; i++) { -+ u.push_back(pdfDocEncoding[s[i] & 0xff]); - } -+ return u; - } -- *ucs4 = u; -- return len; - } - - bool UnicodeIsWhitespace(Unicode ucs4) -@@ -549,7 +536,10 @@ void unicodeToAscii7(const Unicode *in, int len, Unicode **ucs4_out, int *out_le - } - } - -- *out_len = TextStringToUCS4(str, ucs4_out); -+ std::vector ucs4 = TextStringToUCS4(str); -+ *out_len = ucs4.size(); -+ *ucs4_out = (Unicode *)gmallocn(ucs4.size(), sizeof(Unicode)); -+ memcpy(*ucs4_out, ucs4.data(), ucs4.size() * sizeof(Unicode)); - - if (indices) { - idx[k] = in_idx[len]; -diff --git a/poppler/UTF.h b/poppler/UTF.h -index 626c686..bfc5f65 100644 ---- a/poppler/UTF.h -+++ b/poppler/UTF.h -@@ -19,6 +19,7 @@ - #include - #include - #include -+#include - - #include "goo/GooString.h" - #include "CharTypes.h" -@@ -27,16 +28,14 @@ - // Convert a UTF-16 string to a UCS-4 - // utf16 - utf16 bytes - // utf16_len - number of UTF-16 characters --// ucs4_out - if not NULL, allocates and returns UCS-4 string. Free with gfree. - // returns number of UCS-4 characters --int UTF16toUCS4(const Unicode *utf16, int utf16Len, Unicode **ucs4_out); -+std::vector UTF16toUCS4(const Unicode *utf16, int utf16Len); - - // Convert a PDF Text String to UCS-4 - // s - PDF text string --// ucs4 - if the number of UCS-4 characters is > 0, allocates and --// returns UCS-4 string. Free with gfree. --// returns number of UCS-4 characters --int POPPLER_PRIVATE_EXPORT TextStringToUCS4(const std::string &textStr, Unicode **ucs4); -+// returns UCS-4 characters -+// Convert a PDF text string to UCS-4 -+std::vector POPPLER_PRIVATE_EXPORT TextStringToUCS4(const std::string &textStr); - - // check if UCS-4 character is valid - bool UnicodeIsValid(Unicode ucs4); -diff --git a/qt5/src/poppler-outline.cc b/qt5/src/poppler-outline.cc -index 5ff7e37..2f6ef2d 100644 ---- a/qt5/src/poppler-outline.cc -+++ b/qt5/src/poppler-outline.cc -@@ -78,7 +78,7 @@ QString OutlineItem::name() const - - if (name.isEmpty()) { - if (const ::OutlineItem *data = m_data->data) { -- name = unicodeToQString(data->getTitle(), data->getTitleLength()); -+ name = unicodeToQString(data->getTitle()); - } - } - -diff --git a/qt5/src/poppler-private.cc b/qt5/src/poppler-private.cc -index 228d8e8..54df79f 100644 ---- a/qt5/src/poppler-private.cc -+++ b/qt5/src/poppler-private.cc -@@ -94,6 +94,11 @@ QString unicodeToQString(const Unicode *u, int len) - return QString::fromUtf8(convertedStr.c_str(), convertedStr.getLength()); - } - -+QString unicodeToQString(const std::vector &u) -+{ -+ return unicodeToQString(u.data(), u.size()); -+} -+ - QString UnicodeParsedString(const GooString *s1) - { - return (s1) ? UnicodeParsedString(s1->toStr()) : QString(); -@@ -266,13 +271,7 @@ void DocumentData::addTocChildren(QDomDocument *docSyn, QDomNode *parent, const - // iterate over every object in 'items' - - // 1. create element using outlineItem's title as tagName -- QString name; -- const Unicode *uniChar = outlineItem->getTitle(); -- int titleLength = outlineItem->getTitleLength(); -- name = unicodeToQString(uniChar, titleLength); -- if (name.isEmpty()) { -- continue; -- } -+ QString name = unicodeToQString(outlineItem->getTitle()); - - QDomElement item = docSyn->createElement(name); - parent->appendChild(item); -diff --git a/qt5/src/poppler-private.h b/qt5/src/poppler-private.h -index 39dfb6b..bba5bd7 100644 ---- a/qt5/src/poppler-private.h -+++ b/qt5/src/poppler-private.h -@@ -73,6 +73,7 @@ namespace Poppler { - - /* borrowed from kpdf */ - POPPLER_QT5_EXPORT QString unicodeToQString(const Unicode *u, int len); -+POPPLER_QT5_EXPORT QString unicodeToQString(const std::vector &u); - - POPPLER_QT5_EXPORT QString UnicodeParsedString(const GooString *s1); - -diff --git a/qt5/tests/check_internal_outline.cpp b/qt5/tests/check_internal_outline.cpp -index c12b604..5db6bf4 100644 ---- a/qt5/tests/check_internal_outline.cpp -+++ b/qt5/tests/check_internal_outline.cpp -@@ -56,10 +56,10 @@ void TestInternalOutline::testCreateOutline() - - static std::string getTitle(const OutlineItem *item) - { -- const Unicode *u = item->getTitle(); -+ std::vector u = item->getTitle(); - std::string s; -- for (int i = 0; i < item->getTitleLength(); i++) { -- s.append(1, (char)u[i]); -+ for (auto &c : u) { -+ s.append(1, (char)(c)); - } - return s; - } -diff --git a/qt5/tests/check_utf_conversion.cpp b/qt5/tests/check_utf_conversion.cpp -index 73c684e..b00f080 100644 ---- a/qt5/tests/check_utf_conversion.cpp -+++ b/qt5/tests/check_utf_conversion.cpp -@@ -133,16 +133,13 @@ void TestUTFConversion::testUnicodeToAscii7() - // malloc() always returns 8-byte aligned memory addresses. - GooString *goo = Poppler::QStringToUnicodeGooString(QString::fromUtf8("®©©©©©©©©©©©©©©©©©©©©")); // clazy:exclude=qstring-allocations - -- Unicode *in; -- const int in_len = TextStringToUCS4(goo->toStr(), &in); -+ const std::vector in = TextStringToUCS4(goo->toStr()); - - delete goo; - - int in_norm_len; - int *in_norm_idx; -- Unicode *in_norm = unicodeNormalizeNFKC(in, in_len, &in_norm_len, &in_norm_idx, true); -- -- free(in); -+ Unicode *in_norm = unicodeNormalizeNFKC(in.data(), in.size(), &in_norm_len, &in_norm_idx, true); - - Unicode *out; - int out_len; -@@ -174,25 +171,24 @@ void TestUTFConversion::testUnicodeLittleEndian() - // Let's assert both GooString's are different - QVERIFY(GooUTF16LE != GooUTF16BE); - -- Unicode *UCS4fromLE, *UCS4fromBE; -- const int len1 = TextStringToUCS4(GooUTF16LE, &UCS4fromLE); -- const int len2 = TextStringToUCS4(GooUTF16BE, &UCS4fromBE); -+ const std::vector UCS4fromLE = TextStringToUCS4(GooUTF16LE); -+ const std::vector UCS4fromBE = TextStringToUCS4(GooUTF16BE); - - // len is 4 because TextStringToUCS4() removes the two leading Byte Order Mark (BOM) code points -- QCOMPARE(len1, len2); -- QCOMPARE(len1, 4); -+ QCOMPARE(UCS4fromLE.size(), UCS4fromBE.size()); -+ QCOMPARE(UCS4fromLE.size(), 4); - - // Check that now after conversion, UCS4fromLE and UCS4fromBE are now the same -- for (int i = 0; i < len1; i++) { -+ for (size_t i = 0; i < UCS4fromLE.size(); i++) { - QCOMPARE(UCS4fromLE[i], UCS4fromBE[i]); - } - - const QString expected = QString::fromUtf8("HI!☑"); // clazy:exclude=qstring-allocations - - // Do some final verifications, checking the strings to be "HI!" -- QVERIFY(*UCS4fromLE == *UCS4fromBE); -- QVERIFY(compare(UCS4fromLE, expected.utf16(), len1)); -- QVERIFY(compare(UCS4fromBE, expected.utf16(), len1)); -+ QVERIFY(UCS4fromLE == UCS4fromBE); -+ QVERIFY(compare(UCS4fromLE.data(), expected.utf16(), UCS4fromLE.size())); -+ QVERIFY(compare(UCS4fromBE.data(), expected.utf16(), UCS4fromLE.size())); - } - - QTEST_GUILESS_MAIN(TestUTFConversion) -diff --git a/qt6/src/poppler-outline.cc b/qt6/src/poppler-outline.cc -index f5ba2a9..2bc0d30 100644 ---- a/qt6/src/poppler-outline.cc -+++ b/qt6/src/poppler-outline.cc -@@ -78,7 +78,7 @@ QString OutlineItem::name() const - - if (name.isEmpty()) { - if (const ::OutlineItem *data = m_data->data) { -- name = unicodeToQString(data->getTitle(), data->getTitleLength()); -+ name = unicodeToQString(data->getTitle()); - } - } - -diff --git a/qt6/src/poppler-private.cc b/qt6/src/poppler-private.cc -index 91d1725..2cb2396 100644 ---- a/qt6/src/poppler-private.cc -+++ b/qt6/src/poppler-private.cc -@@ -94,6 +94,11 @@ QString unicodeToQString(const Unicode *u, int len) - return QString::fromUtf8(convertedStr.c_str(), convertedStr.getLength()); - } - -+QString unicodeToQString(const std::vector &u) -+{ -+ return unicodeToQString(u.data(), u.size()); -+} -+ - QString UnicodeParsedString(const GooString *s1) - { - return (s1) ? UnicodeParsedString(s1->toStr()) : QString(); -diff --git a/qt6/src/poppler-private.h b/qt6/src/poppler-private.h -index d1f7335..a3117a6 100644 ---- a/qt6/src/poppler-private.h -+++ b/qt6/src/poppler-private.h -@@ -72,6 +72,7 @@ namespace Poppler { - - /* borrowed from kpdf */ - POPPLER_QT6_EXPORT QString unicodeToQString(const Unicode *u, int len); -+POPPLER_QT6_EXPORT QString unicodeToQString(const std::vector &u); - - POPPLER_QT6_EXPORT QString UnicodeParsedString(const GooString *s1); - -diff --git a/qt6/tests/check_internal_outline.cpp b/qt6/tests/check_internal_outline.cpp -index c12b604..d23e773 100644 ---- a/qt6/tests/check_internal_outline.cpp -+++ b/qt6/tests/check_internal_outline.cpp -@@ -56,10 +56,10 @@ void TestInternalOutline::testCreateOutline() - - static std::string getTitle(const OutlineItem *item) - { -- const Unicode *u = item->getTitle(); -+ const std::vector &u = item->getTitle(); - std::string s; -- for (int i = 0; i < item->getTitleLength(); i++) { -- s.append(1, (char)u[i]); -+ for (const auto &c : u) { -+ s.append(1, (char)(c)); - } - return s; - } -diff --git a/qt6/tests/check_utf_conversion.cpp b/qt6/tests/check_utf_conversion.cpp -index 2cac758..e7f35ea 100644 ---- a/qt6/tests/check_utf_conversion.cpp -+++ b/qt6/tests/check_utf_conversion.cpp -@@ -131,16 +131,13 @@ void TestUTFConversion::testUnicodeToAscii7() - // malloc() always returns 8-byte aligned memory addresses. - GooString *goo = Poppler::QStringToUnicodeGooString(QString::fromUtf8("®©©©©©©©©©©©©©©©©©©©©")); // clazy:exclude=qstring-allocations - -- Unicode *in; -- const int in_len = TextStringToUCS4(goo->toStr(), &in); -+ const std::vector in = TextStringToUCS4(goo->toStr()); - - delete goo; - - int in_norm_len; - int *in_norm_idx; -- Unicode *in_norm = unicodeNormalizeNFKC(in, in_len, &in_norm_len, &in_norm_idx, true); -- -- free(in); -+ Unicode *in_norm = unicodeNormalizeNFKC(in.data(), in.size(), &in_norm_len, &in_norm_idx, true); - - Unicode *out; - int out_len; -@@ -172,25 +169,24 @@ void TestUTFConversion::testUnicodeLittleEndian() - // Let's assert both GooString's are different - QVERIFY(GooUTF16LE != GooUTF16BE); - -- Unicode *UCS4fromLE, *UCS4fromBE; -- const int len1 = TextStringToUCS4(GooUTF16LE, &UCS4fromLE); -- const int len2 = TextStringToUCS4(GooUTF16BE, &UCS4fromBE); -+ const std::vector UCS4fromLE = TextStringToUCS4(GooUTF16LE); -+ const std::vector UCS4fromBE = TextStringToUCS4(GooUTF16BE); - - // len is 4 because TextStringToUCS4() removes the two leading Byte Order Mark (BOM) code points -- QCOMPARE(len1, len2); -- QCOMPARE(len1, 4); -+ QCOMPARE(UCS4fromLE.size(), UCS4fromBE.size()); -+ QCOMPARE(UCS4fromLE.size(), 4); - - // Check that now after conversion, UCS4fromLE and UCS4fromBE are now the same -- for (int i = 0; i < len1; i++) { -+ for (size_t i = 0; i < UCS4fromLE.size(); i++) { - QCOMPARE(UCS4fromLE[i], UCS4fromBE[i]); - } - - const QString expected = QStringLiteral("HI!☑"); - - // Do some final verifications, checking the strings to be "HI!" -- QVERIFY(*UCS4fromLE == *UCS4fromBE); -- QVERIFY(compare(UCS4fromLE, expected.utf16(), len1)); -- QVERIFY(compare(UCS4fromBE, expected.utf16(), len1)); -+ QVERIFY(UCS4fromLE == UCS4fromBE); -+ QVERIFY(compare(UCS4fromLE.data(), expected.utf16(), UCS4fromLE.size())); -+ QVERIFY(compare(UCS4fromBE.data(), expected.utf16(), UCS4fromBE.size())); - } - - QTEST_GUILESS_MAIN(TestUTFConversion) -diff --git a/utils/HtmlFonts.cc b/utils/HtmlFonts.cc -index ca7d4a4..9f25621 100644 ---- a/utils/HtmlFonts.cc -+++ b/utils/HtmlFonts.cc -@@ -230,9 +230,9 @@ GooString *HtmlFont::getFullName() - } - - // this method if plain wrong todo --GooString *HtmlFont::HtmlFilter(const Unicode *u, int uLen) -+std::unique_ptr HtmlFont::HtmlFilter(const Unicode *u, int uLen) - { -- GooString *tmp = new GooString(); -+ auto tmp = std::make_unique(); - const UnicodeMap *uMap; - char buf[8]; - int n; -diff --git a/utils/HtmlFonts.h b/utils/HtmlFonts.h -index ca4ae54..74cdca0 100644 ---- a/utils/HtmlFonts.h -+++ b/utils/HtmlFonts.h -@@ -104,7 +104,7 @@ public: - } - const double *getRotMat() const { return rotSkewMat; } - GooString *getFontName(); -- static GooString *HtmlFilter(const Unicode *u, int uLen); // char* s); -+ static std::unique_ptr HtmlFilter(const Unicode *u, int uLen); // char* s); - bool isEqual(const HtmlFont &x) const; - bool isEqualIgnoreBold(const HtmlFont &x) const; - void print() const { printf("font: %s (%s) %d %s%s\n", FontName->c_str(), familyName.c_str(), size, bold ? "bold " : "", italic ? "italic " : ""); }; -diff --git a/utils/HtmlOutputDev.cc b/utils/HtmlOutputDev.cc -index 2611e06..b45a5ff 100644 ---- a/utils/HtmlOutputDev.cc -+++ b/utils/HtmlOutputDev.cc -@@ -124,11 +124,11 @@ static bool debug = false; - - #if 0 - static GooString* Dirname(GooString* str){ -- -+ - char *p=str->c_str(); - int len=str->getLength(); - for (int i=len-1;i>=0;i--) -- if (*(p+i)==SLASH) -+ if (*(p+i)==SLASH) - return new GooString(p,i+1); - return new GooString(); - } -@@ -219,14 +219,13 @@ HtmlString::HtmlString(GfxState *state, double fontSize, HtmlFontAccu *_fonts) : - len = size = 0; - yxNext = nullptr; - xyNext = nullptr; -- htext = new GooString(); -+ htext = std::make_unique(); - dir = textDirUnknown; - } - - HtmlString::~HtmlString() - { - gfree(text); -- delete htext; - gfree(xRight); - } - -@@ -345,7 +344,6 @@ void HtmlPage::beginString(GfxState *state, const GooString *s) - void HtmlPage::conv() - { - for (HtmlString *tmp = yxStrings; tmp; tmp = tmp->yxNext) { -- delete tmp->htext; - tmp->htext = HtmlFont::HtmlFilter(tmp->text, tmp->len); - - size_t linkIndex = 0; -@@ -641,7 +639,7 @@ void HtmlPage::coalesce() - bool finish_a = switch_links && hlink1 != nullptr; - bool finish_italic = hfont1->isItalic() && (!hfont2->isItalic() || finish_a); - bool finish_bold = hfont1->isBold() && (!hfont2->isBold() || finish_a || finish_italic); -- CloseTags(str1->htext, finish_a, finish_italic, finish_bold); -+ CloseTags(str1->htext.get(), finish_a, finish_italic, finish_bold); - if (switch_links && hlink2 != nullptr) { - GooString *ls = hlink2->getLinkStart(); - str1->htext->append(ls); -@@ -654,7 +652,7 @@ void HtmlPage::coalesce() - str1->htext->append("", 3); - } - -- str1->htext->append(str2->htext); -+ str1->htext->append(str2->htext.get()); - // str1 now contains href for link of str2 (if it is defined) - str1->link = str2->link; - hfont1 = hfont2; -@@ -671,7 +669,7 @@ void HtmlPage::coalesce() - bool finish_a = str1->getLink() != nullptr; - bool finish_bold = hfont1->isBold(); - bool finish_italic = hfont1->isItalic(); -- CloseTags(str1->htext, finish_a, finish_italic, finish_bold); -+ CloseTags(str1->htext.get(), finish_a, finish_italic, finish_bold); - - str1->xMin = curX; - str1->yMin = curY; -@@ -698,14 +696,14 @@ void HtmlPage::coalesce() - bool finish_bold = hfont1->isBold(); - bool finish_italic = hfont1->isItalic(); - bool finish_a = str1->getLink() != nullptr; -- CloseTags(str1->htext, finish_a, finish_italic, finish_bold); -+ CloseTags(str1->htext.get(), finish_a, finish_italic, finish_bold); - - #if 0 //~ for debugging - for (str1 = yxStrings; str1; str1 = str1->yxNext) { - printf("x=%3d..%3d y=%3d..%3d size=%2d ", - (int)str1->xMin, (int)str1->xMax, (int)str1->yMin, (int)str1->yMax, - (int)(str1->yMax - str1->yMin)); -- printf("'%s'\n", str1->htext->c_str()); -+ printf("'%s'\n", str1->htext->c_str()); - } - printf("\n------------------------------------------------------------\n\n"); - #endif -@@ -1225,10 +1223,10 @@ void HtmlOutputDev::startPage(int pageNumA, GfxState *state, XRef *xref) - exit(1); - } - delete fname; -- // if(state->getRotation()!=0) -+ // if(state->getRotation()!=0) - // fprintf(tin,"ROTATE=%d rotate %d neg %d neg translate\n",state->getRotation(),state->getX1(),-state->getY1()); -- // else -- fprintf(tin,"ROTATE=%d neg %d neg translate\n",state->getX1(),state->getY1()); -+ // else -+ fprintf(tin,"ROTATE=%d neg %d neg translate\n",state->getX1(),state->getY1()); - } - } - #endif -@@ -1723,10 +1721,11 @@ bool HtmlOutputDev::newHtmlOutlineLevel(FILE *output, const std::vector\n", output); - - for (OutlineItem *item : *outlines) { -- GooString *titleStr = HtmlFont::HtmlFilter(item->getTitle(), item->getTitleLength()); -+ const auto &title = item->getTitle(); -+ std::unique_ptr titleStr = HtmlFont::HtmlFilter(title.data(), title.size()); - - GooString *linkName = nullptr; -- ; -+ - const int itemPage = getOutlinePageNum(item); - if (itemPage > 0) { - /* complex simple -@@ -1753,12 +1752,13 @@ bool HtmlOutputDev::newHtmlOutlineLevel(FILE *output, const std::vector", linkName->c_str()); - } -- fputs(titleStr->c_str(), output); -+ if (titleStr) { -+ fputs(titleStr->c_str(), output); -+ } - if (linkName) { - fputs("", output); - delete linkName; - } -- delete titleStr; - atLeastOne = true; - - item->open(); -@@ -1778,14 +1778,14 @@ void HtmlOutputDev::newXmlOutlineLevel(FILE *output, const std::vector\n", output); - - for (OutlineItem *item : *outlines) { -- GooString *titleStr = HtmlFont::HtmlFilter(item->getTitle(), item->getTitleLength()); -+ const std::vector &title = item->getTitle(); -+ auto titleStr = HtmlFont::HtmlFilter(title.data(), title.size()); - const int itemPage = getOutlinePageNum(item); - if (itemPage > 0) { - fprintf(output, "%s\n", itemPage, titleStr->c_str()); - } else { - fprintf(output, "%s\n", titleStr->c_str()); - } -- delete titleStr; - - item->open(); - if (item->hasKids() && item->getKids()) { -diff --git a/utils/HtmlOutputDev.h b/utils/HtmlOutputDev.h -index c7b08d1..e490eff 100644 ---- a/utils/HtmlOutputDev.h -+++ b/utils/HtmlOutputDev.h -@@ -95,7 +95,7 @@ private: - HtmlString *yxNext; // next string in y-major order - HtmlString *xyNext; // next string in x-major order - int fontpos; -- GooString *htext; -+ std::unique_ptr htext; - int len; // length of text and xRight - int size; // size of text and xRight arrays - UnicodeTextDirection dir; // direction (left to right/right to left) -diff --git a/utils/pdfinfo.cc b/utils/pdfinfo.cc -index 1f4ca79..2057d22 100644 ---- a/utils/pdfinfo.cc -+++ b/utils/pdfinfo.cc -@@ -114,14 +114,12 @@ static const ArgDesc argDesc[] = { { "-f", argInt, &firstPage, 0, "first page to - - static void printTextString(const GooString *s, const UnicodeMap *uMap) - { -- Unicode *u; - char buf[8]; -- int len = TextStringToUCS4(s->toStr(), &u); -- for (int i = 0; i < len; i++) { -- int n = uMap->mapUnicode(u[i], buf, sizeof(buf)); -+ std::vector u = TextStringToUCS4(s->toStr()); -+ for (const auto &c : u) { -+ int n = uMap->mapUnicode(c, buf, sizeof(buf)); - fwrite(buf, 1, n, stdout); - } -- gfree(u); - } - - static void printUCS4String(const Unicode *u, int len, const UnicodeMap *uMap) -diff --git a/utils/pdfsig.cc b/utils/pdfsig.cc -index 490795f..e15a360 100644 ---- a/utils/pdfsig.cc -+++ b/utils/pdfsig.cc -@@ -224,16 +224,14 @@ static std::string TextStringToUTF8(const std::string &str) - { - const UnicodeMap *utf8Map = globalParams->getUtf8Map(); - -- Unicode *u; -- const int len = TextStringToUCS4(str, &u); -+ std::vector u = TextStringToUCS4(str); - - std::string convertedStr; -- for (int i = 0; i < len; ++i) { -+ for (auto &c : u) { - char buf[8]; -- const int n = utf8Map->mapUnicode(u[i], buf, sizeof(buf)); -+ const int n = utf8Map->mapUnicode(c, buf, sizeof(buf)); - convertedStr.append(buf, n); - } -- gfree(u); - - return convertedStr; - } -diff --git a/utils/pdftohtml.cc b/utils/pdftohtml.cc -index 97b141a..d7c0889 100644 ---- a/utils/pdftohtml.cc -+++ b/utils/pdftohtml.cc -@@ -99,7 +99,7 @@ static char ownerPassword[33] = ""; - static char userPassword[33] = ""; - static bool printVersion = false; - --static GooString *getInfoString(Dict *infoDict, const char *key); -+static std::unique_ptr getInfoString(Dict *infoDict, const char *key); - static GooString *getInfoDate(Dict *infoDict, const char *key); - - static char textEncName[128] = ""; -@@ -158,8 +158,11 @@ int main(int argc, char *argv[]) - { - std::unique_ptr doc; - GooString *fileName = nullptr; -- GooString *docTitle = nullptr; -- GooString *author = nullptr, *keywords = nullptr, *subject = nullptr, *date = nullptr; -+ std::unique_ptr docTitle; -+ std::unique_ptr author; -+ std::unique_ptr keywords; -+ std::unique_ptr subject; -+ GooString *date = nullptr; - GooString *htmlFileName = nullptr; - HtmlOutputDev *htmlOut = nullptr; - SplashOutputDev *splashOut = nullptr; -@@ -317,7 +320,7 @@ int main(int argc, char *argv[]) - } - } - if (!docTitle) { -- docTitle = new GooString(htmlFileName); -+ docTitle = std::make_unique(htmlFileName); - } - - if (!singleHtml) { -@@ -330,16 +333,6 @@ int main(int argc, char *argv[]) - // write text file - htmlOut = new HtmlOutputDev(doc->getCatalog(), htmlFileName->c_str(), docTitle->c_str(), author ? author->c_str() : nullptr, keywords ? keywords->c_str() : nullptr, subject ? subject->c_str() : nullptr, date ? date->c_str() : nullptr, - rawOrder, firstPage, doOutline); -- delete docTitle; -- if (author) { -- delete author; -- } -- if (keywords) { -- delete keywords; -- } -- if (subject) { -- delete subject; -- } - if (date) { - delete date; - } -@@ -397,7 +390,7 @@ error: - return exit_status; - } - --static GooString *getInfoString(Dict *infoDict, const char *key) -+static std::unique_ptr getInfoString(Dict *infoDict, const char *key) - { - Object obj; - // Raw value as read from PDF (may be in pdfDocEncoding or UCS2) -@@ -406,7 +399,7 @@ static GooString *getInfoString(Dict *infoDict, const char *key) - Unicode *unicodeString; - int unicodeLength; - // Value HTML escaped and converted to desired encoding -- GooString *encodedString = nullptr; -+ std::unique_ptr encodedString; - // Is rawString UCS2 (as opposed to pdfDocEncoding) - bool isUnicode; - --- -2.40.0 - diff --git a/sources/meta-openembedded/meta-oe/recipes-support/poppler/poppler/CVE-2024-6239-0002.patch b/sources/meta-openembedded/meta-oe/recipes-support/poppler/poppler/CVE-2024-6239-0002.patch deleted file mode 100644 index cb9ef423..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/poppler/poppler/CVE-2024-6239-0002.patch +++ /dev/null @@ -1,111 +0,0 @@ -From 0554731052d1a97745cb179ab0d45620589dd9c4 Mon Sep 17 00:00:00 2001 -From: Albert Astals Cid -Date: Fri, 17 Jun 2024 00:54:55 +0200 -Subject: [PATCH] pdfinfo: Fix crash in broken documents when using -dests - -CVE: CVE-2024-6239 -Upstream-Status: Backport [https://gitlab.freedesktop.org/poppler/poppler/-/commit/0554731052d1a97745cb179ab0d45620589dd9c4] - -Signed-off-by: Yogita Urade ---- - utils/pdfinfo.cc | 35 +++++++++++++++-------------------- - 1 file changed, 15 insertions(+), 20 deletions(-) - -diff --git a/utils/pdfinfo.cc b/utils/pdfinfo.cc -index 2057d22..5f96b41 100644 ---- a/utils/pdfinfo.cc -+++ b/utils/pdfinfo.cc -@@ -15,7 +15,7 @@ - // under GPL version 2 or later - // - // Copyright (C) 2006 Dom Lachowicz --// Copyright (C) 2007-2010, 2012, 2016-2022 Albert Astals Cid -+// Copyright (C) 2007-2010, 2012, 2016-2022, 2024 Albert Astals Cid - // Copyright (C) 2010 Hib Eris - // Copyright (C) 2011 Vittal Aithal - // Copyright (C) 2012, 2013, 2016-2018, 2021 Adrian Johnson -@@ -112,16 +112,21 @@ static const ArgDesc argDesc[] = { { "-f", argInt, &firstPage, 0, "first page to - { "-?", argFlag, &printHelp, 0, "print usage information" }, - {} }; - --static void printTextString(const GooString *s, const UnicodeMap *uMap) -+static void printStdTextString(const std::string &s, const UnicodeMap *uMap) - { - char buf[8]; -- std::vector u = TextStringToUCS4(s->toStr()); -+ const std::vector u = TextStringToUCS4(s); - for (const auto &c : u) { - int n = uMap->mapUnicode(c, buf, sizeof(buf)); - fwrite(buf, 1, n, stdout); - } - } - -+static void printTextString(const GooString *s, const UnicodeMap *uMap) -+{ -+ printStdTextString(s->toStr(), uMap); -+} -+ - static void printUCS4String(const Unicode *u, int len, const UnicodeMap *uMap) - { - char buf[8]; -@@ -293,11 +298,6 @@ static void printStruct(const StructElement *element, unsigned indent) - } - } - --struct GooStringCompare --{ -- bool operator()(GooString *lhs, GooString *rhs) const { return lhs->cmp(const_cast(rhs)) < 0; } --}; -- - static void printLinkDest(const std::unique_ptr &dest) - { - GooString s; -@@ -368,29 +368,25 @@ static void printLinkDest(const std::unique_ptr &dest) - - static void printDestinations(PDFDoc *doc, const UnicodeMap *uMap) - { -- std::map, GooStringCompare>> map; -+ std::map>> map; - - int numDests = doc->getCatalog()->numDestNameTree(); - for (int i = 0; i < numDests; i++) { -- GooString *name = new GooString(doc->getCatalog()->getDestNameTreeName(i)); -+ const GooString *name = doc->getCatalog()->getDestNameTreeName(i); - std::unique_ptr dest = doc->getCatalog()->getDestNameTreeDest(i); -- if (dest && dest->isPageRef()) { -+ if (name && dest && dest->isPageRef()) { - Ref pageRef = dest->getPageRef(); -- map[pageRef].insert(std::make_pair(name, std::move(dest))); -- } else { -- delete name; -+ map[pageRef].insert(std::make_pair(name->toStr(), std::move(dest))); - } - } - - numDests = doc->getCatalog()->numDests(); - for (int i = 0; i < numDests; i++) { -- GooString *name = new GooString(doc->getCatalog()->getDestsName(i)); -+ const char *name = doc->getCatalog()->getDestsName(i); - std::unique_ptr dest = doc->getCatalog()->getDestsDest(i); -- if (dest && dest->isPageRef()) { -+ if (name && dest && dest->isPageRef()) { - Ref pageRef = dest->getPageRef(); - map[pageRef].insert(std::make_pair(name, std::move(dest))); -- } else { -- delete name; - } - } - -@@ -404,9 +400,8 @@ static void printDestinations(PDFDoc *doc, const UnicodeMap *uMap) - printf("%4d ", i); - printLinkDest(it.second); - printf(" \""); -- printTextString(it.first, uMap); -+ printStdTextString(it.first, uMap); - printf("\"\n"); -- delete it.first; - } - } - } --- -2.40.0 diff --git a/sources/meta-openembedded/meta-oe/recipes-support/poppler/poppler/CVE-2025-32364.patch b/sources/meta-openembedded/meta-oe/recipes-support/poppler/poppler/CVE-2025-32364.patch deleted file mode 100644 index 04af0278..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/poppler/poppler/CVE-2025-32364.patch +++ /dev/null @@ -1,28 +0,0 @@ -From d87bc726c7cc98f8c26b60ece5f20236e9de1bc3 Mon Sep 17 00:00:00 2001 -From: Albert Astals Cid -Date: Mon, 24 Mar 2025 00:44:54 +0100 -Subject: [PATCH] PSStack::roll: Protect against doing int = -INT_MIN - -CVE: CVE-2025-32364 -Upstream-Status: Backport [https://gitlab.freedesktop.org/poppler/poppler/-/commit/d87bc726c7cc98f8c26b60ece5f20236e9de1bc3] - -Signed-off-by: Yogita Urade ---- - poppler/Function.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/poppler/Function.cc b/poppler/Function.cc -index 043ae8e..65888a0 100644 ---- a/poppler/Function.cc -+++ b/poppler/Function.cc -@@ -1066,7 +1066,7 @@ void PSStack::roll(int n, int j) - PSObject obj; - int i, k; - -- if (unlikely(n == 0)) { -+ if (unlikely(n == 0 || j == INT_MIN)) { - return; - } - if (j >= 0) { --- -2.40.0 diff --git a/sources/meta-openembedded/meta-oe/recipes-support/poppler/poppler/CVE-2025-32365.patch b/sources/meta-openembedded/meta-oe/recipes-support/poppler/poppler/CVE-2025-32365.patch deleted file mode 100644 index 703a69fc..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/poppler/poppler/CVE-2025-32365.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 1f151565bbca5be7449ba8eea6833051cc1baa41 Mon Sep 17 00:00:00 2001 -From: Albert Astals Cid -Date: Mon, 31 Mar 2025 14:35:49 +0200 -Subject: [PATCH] Move isOk check to inside JBIG2Bitmap::combine - -CVE: CVE-2025-32365 -Upstream-Status: Backport [https://gitlab.freedesktop.org/poppler/poppler/-/commit/1f151565bbca5be7449ba8eea6833051cc1baa41] - -Signed-off-by: Yogita Urade ---- - poppler/JBIG2Stream.cc | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) - -diff --git a/poppler/JBIG2Stream.cc b/poppler/JBIG2Stream.cc -index bdc51d0..2974493 100644 ---- a/poppler/JBIG2Stream.cc -+++ b/poppler/JBIG2Stream.cc -@@ -770,6 +770,10 @@ void JBIG2Bitmap::combine(JBIG2Bitmap *bitmap, int x, int y, unsigned int combOp - unsigned int src0, src1, src, dest, s1, s2, m1, m2, m3; - bool oneByte; - -+ if (unlikely(!isOk())) { -+ return; -+ } -+ - // check for the pathological case where y = -2^31 - if (y < -0x7fffffff) { - return; -@@ -2200,9 +2204,7 @@ void JBIG2Stream::readTextRegionSeg(unsigned int segNum, bool imm, bool lossless - if (pageH == 0xffffffff && y + h > curPageH) { - pageBitmap->expand(y + h, pageDefPixel); - } -- if (pageBitmap->isOk()) { -- pageBitmap->combine(bitmap.get(), x, y, extCombOp); -- } -+ pageBitmap->combine(bitmap.get(), x, y, extCombOp); - - // store the region bitmap - } else { --- -2.40.0 diff --git a/sources/meta-openembedded/meta-oe/recipes-support/poppler/poppler/CVE-2025-43903-0001.patch b/sources/meta-openembedded/meta-oe/recipes-support/poppler/poppler/CVE-2025-43903-0001.patch deleted file mode 100644 index d18ff08e..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/poppler/poppler/CVE-2025-43903-0001.patch +++ /dev/null @@ -1,75 +0,0 @@ -From 33672ca1b6670f7378e24f6d475438f7f5d86b05 Mon Sep 17 00:00:00 2001 -From: Sune Vuorela -Date: Mon, 22 May 2023 19:53:08 +0000 -Subject: [PATCH] Fix crash with weird hashing used for signatures - -CVE: CVE-2025-43903 -Upstream-Status: Backport [https://gitlab.freedesktop.org/poppler/poppler/-/commit/33672ca1b6670f7378e24f6d475438f7f5d86b05] - -Signed-off-by: Yogita Urade ---- - poppler/SignatureHandler.cc | 15 ++++++++++++--- - poppler/SignatureHandler.h | 7 ++++++- - 2 files changed, 18 insertions(+), 4 deletions(-) - -diff --git a/poppler/SignatureHandler.cc b/poppler/SignatureHandler.cc -index 9916300..f0b7006 100644 ---- a/poppler/SignatureHandler.cc -+++ b/poppler/SignatureHandler.cc -@@ -768,11 +768,11 @@ SignatureVerificationHandler::SignatureVerificationHandler(std::vectoralgorithm; - auto hashAlgorithm = SECOID_FindOIDTag(&usedAlgorithm); - HASH_HashType hashType = HASH_GetHashTypeByOidTag(hashAlgorithm); -- hashContext = std::make_unique(ConvertHashTypeFromNss(hashType)); -+ hashContext = HashContext::create(ConvertHashTypeFromNss(hashType)); - } - } - --SignatureSignHandler::SignatureSignHandler(const std::string &certNickname, HashAlgorithm digestAlgTag) : hashContext(std::make_unique(digestAlgTag)), signing_cert(nullptr) -+SignatureSignHandler::SignatureSignHandler(const std::string &certNickname, HashAlgorithm digestAlgTag) : hashContext(HashContext::create(digestAlgTag)), signing_cert(nullptr) - { - SignatureHandler::setNSSDir({}); - signing_cert = CERT_FindCertByNickname(CERT_GetDefaultCertDB(), certNickname.c_str()); -@@ -1232,7 +1232,16 @@ std::vector HashContext::endHash() - return digestBuffer; - } - --HashContext::HashContext(HashAlgorithm algorithm) : hash_context { HASH_Create(HASH_GetHashTypeByOidTag(ConvertHashAlgorithmToNss(algorithm))) }, digest_alg_tag(algorithm) { } -+HashContext::HashContext(HashAlgorithm algorithm, private_tag) : hash_context { HASH_Create(HASH_GetHashTypeByOidTag(ConvertHashAlgorithmToNss(algorithm))) }, digest_alg_tag(algorithm) { } -+ -+std::unique_ptr HashContext::create(HashAlgorithm algorithm) -+{ -+ auto ctx = std::make_unique(algorithm, private_tag {}); -+ if (ctx->hash_context) { -+ return ctx; -+ } -+ return {}; -+} - - HashAlgorithm HashContext::getHashAlgorithm() const - { -diff --git a/poppler/SignatureHandler.h b/poppler/SignatureHandler.h -index c9fb575..f1b319f 100644 ---- a/poppler/SignatureHandler.h -+++ b/poppler/SignatureHandler.h -@@ -51,12 +51,17 @@ static const int maxSupportedSignatureSize = 10000; - - class HashContext - { -+ class private_tag -+ { -+ }; -+ - public: -- explicit HashContext(HashAlgorithm algorithm); -+ HashContext(HashAlgorithm algorithm, private_tag); - void updateHash(unsigned char *data_block, int data_len); - std::vector endHash(); - HashAlgorithm getHashAlgorithm() const; - ~HashContext() = default; -+ static std::unique_ptr create(HashAlgorithm algorithm); - - private: - struct HashDestroyer --- -2.40.0 diff --git a/sources/meta-openembedded/meta-oe/recipes-support/poppler/poppler/CVE-2025-43903-0002.patch b/sources/meta-openembedded/meta-oe/recipes-support/poppler/poppler/CVE-2025-43903-0002.patch deleted file mode 100644 index dc2d1e7e..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/poppler/poppler/CVE-2025-43903-0002.patch +++ /dev/null @@ -1,49 +0,0 @@ -From f1b9c830f145a0042e853d6462b2f9ca4016c669 Mon Sep 17 00:00:00 2001 -From: Juraj sarinay -Date: Thu, 6 Mar 2025 02:02:56 +0100 -Subject: [PATCH] Properly verify adbe.pkcs7.sha1 signatures. - -For signatures with non-empty encapsulated content -(typically adbe.pkcs7.sha1), we only compared hash values and -never actually checked SignatureValue within SignerInfo. -The bug introduced by c7c0207b1cfe49a4353d6cda93dbebef4508138f -made trivial signature forgeries possible. Fix this by calling -NSS_CMSSignerInfo_Verify() after the hash values compare equal. - -CVE: CVE-2025-43903 -Upstream-Status: Backport [https://gitlab.freedesktop.org/poppler/poppler/-/commit/f1b9c830f145a0042e853d6462b2f9ca4016c669] - -Signed-off-by: Yogita Urade ---- - poppler/SignatureHandler.cc | 11 +++++++++-- - 1 file changed, 9 insertions(+), 2 deletions(-) - -diff --git a/poppler/SignatureHandler.cc b/poppler/SignatureHandler.cc -index 9916300..5c478bc 100644 ---- a/poppler/SignatureHandler.cc -+++ b/poppler/SignatureHandler.cc -@@ -934,13 +934,20 @@ SignatureValidationStatus SignatureVerificationHandler::validateSignature() - This means it's not a detached type signature - so the digest is contained in SignedData->contentInfo - */ -- if (digest.len == content_info_data->len && memcmp(digest.data, content_info_data->data, digest.len) == 0) { -+ if (digest.len != content_info_data->len || memcmp(digest.data, content_info_data->data, digest.len) != 0) { - return SIGNATURE_VALID; - } else { - return SIGNATURE_DIGEST_MISMATCH; - } - -- } else if (NSS_CMSSignerInfo_Verify(CMSSignerInfo, &digest, nullptr) != SECSuccess) { -+ auto innerHashContext = HashContext::create(hashContext->getHashAlgorithm()); -+ innerHashContext->updateHash(content_info_data->data, content_info_data->len); -+ digest_buffer = innerHashContext->endHash(); -+ digest.data = digest_buffer.data(); -+ digest.len = digest_buffer.size(); -+ } -+ -+ if (NSS_CMSSignerInfo_Verify(CMSSignerInfo, &digest, nullptr) != SECSuccess) { - return NSS_SigTranslate(CMSSignerInfo->verificationStatus); - } else { - return SIGNATURE_VALID; --- -2.40.0 diff --git a/sources/meta-openembedded/meta-oe/recipes-support/poppler/poppler/jpeg-stdio.patch b/sources/meta-openembedded/meta-oe/recipes-support/poppler/poppler/jpeg-stdio.patch deleted file mode 100644 index 70ba1cf1..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/poppler/poppler/jpeg-stdio.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 2986f06c7cc9d64a506ebe861b8bf38f73386e86 Mon Sep 17 00:00:00 2001 -From: Jordan Abrahams-Whitehead -Date: Tue, 16 May 2023 18:52:19 +0000 -Subject: [PATCH] Add missing #include prior to jpeglib.h - -Fixes #1398 - -Upstream-Status: Backport -Signed-off-by: Ross Burton ---- - goo/JpegWriter.cc | 2 +- - poppler/ImageEmbeddingUtils.cc | 1 + - 2 files changed, 2 insertions(+), 1 deletion(-) - -diff --git a/goo/JpegWriter.cc b/goo/JpegWriter.cc -index ca69fd055..566ee38f8 100644 ---- a/goo/JpegWriter.cc -+++ b/goo/JpegWriter.cc -@@ -23,7 +23,7 @@ - #ifdef ENABLE_LIBJPEG - - # include "poppler/Error.h" -- -+# include - extern "C" { - # include - } -diff --git a/poppler/ImageEmbeddingUtils.cc b/poppler/ImageEmbeddingUtils.cc -index 0c13fe968..07b9dfb62 100644 ---- a/poppler/ImageEmbeddingUtils.cc -+++ b/poppler/ImageEmbeddingUtils.cc -@@ -14,6 +14,7 @@ - - #include - #ifdef ENABLE_LIBJPEG -+# include - extern "C" { - # include - } --- -GitLab diff --git a/sources/meta-openembedded/meta-oe/recipes-support/poppler/poppler_23.04.0.bb b/sources/meta-openembedded/meta-oe/recipes-support/poppler/poppler_23.04.0.bb deleted file mode 100644 index a8ab1906..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/poppler/poppler_23.04.0.bb +++ /dev/null @@ -1,65 +0,0 @@ -SUMMARY = "Poppler is a PDF rendering library based on the xpdf-3.0 code base" -HOMEPAGE = "https://poppler.freedesktop.org/" -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" - -SRC_URI = "http://poppler.freedesktop.org/${BP}.tar.xz \ - file://0001-Do-not-overwrite-all-our-build-flags.patch \ - file://basename-include.patch \ - file://0001-cmake-Do-not-use-isystem.patch \ - file://jpeg-stdio.patch \ - file://CVE-2023-34872.patch \ - file://CVE-2024-6239-0001.patch \ - file://CVE-2024-6239-0002.patch \ - file://CVE-2024-56378.patch \ - file://CVE-2025-32364.patch \ - file://CVE-2025-32365.patch \ - file://CVE-2025-43903-0001.patch \ - file://CVE-2025-43903-0002.patch \ - " -SRC_URI[sha256sum] = "b6d893dc7dcd4138b9e9df59a13c59695e50e80dc5c2cacee0674670693951a1" - -DEPENDS = "fontconfig zlib cairo lcms glib-2.0 glib-2.0-native" - -inherit cmake pkgconfig gobject-introspection - -PACKAGECONFIG ??= "jpeg openjpeg png tiff nss splash" -PACKAGECONFIG[jpeg] = "-DWITH_JPEG=ON -DENABLE_DCTDECODER=libjpeg,-DWITH_JPEG=OFF -DENABLE_DCTDECODER=none,jpeg" -PACKAGECONFIG[png] = "-DWITH_PNG=ON,-DWITH_PNG=OFF,libpng" -PACKAGECONFIG[tiff] = "-DWITH_TIFF=ON,-DWITH_TIFF=OFF,tiff" -PACKAGECONFIG[curl] = "-DENABLE_LIBCURL=ON,-DENABLE_LIBCURL=OFF,curl" -PACKAGECONFIG[openjpeg] = "-DENABLE_LIBOPENJPEG=openjpeg2,-DENABLE_LIBOPENJPEG=none,openjpeg" -PACKAGECONFIG[qt5] = "-DENABLE_QT5=ON,-DENABLE_QT5=OFF,qtbase qttools-native" -PACKAGECONFIG[nss] = "-DWITH_NSS3=ON,-DWITH_NSS3=OFF,nss" -PACKAGECONFIG[splash] = "-DENABLE_SPLASH=ON -DENABLE_BOOST=ON,-DENABLE_SPLASH=OFF -DENABLE_BOOST=OFF,boost" - -# surprise - did not expect this to work :) -inherit ${@bb.utils.contains('PACKAGECONFIG', 'qt5', 'cmake_qt5', '', d)} - -SECURITY_CFLAGS = "${SECURITY_NO_PIE_CFLAGS}" - -EXTRA_OECMAKE += " \ - -DENABLE_CMS=lcms2 \ - -DENABLE_UNSTABLE_API_ABI_HEADERS=ON \ - -DBUILD_GTK_TESTS=OFF \ - -DENABLE_ZLIB=ON \ - -DRUN_GPERF_IF_PRESENT=OFF \ - -DCMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES:PATH='${STAGING_INCDIR}' \ - ${@bb.utils.contains('GI_DATA_ENABLED', 'True', '-DENABLE_GOBJECT_INTROSPECTION=ON', '-DENABLE_GOBJECT_INTROSPECTION=OFF', d)} \ -" -EXTRA_OECMAKE:append:class-native = " -DENABLE_CPP=OFF" - -do_configure:append() { - # poppler macro uses pkg-config to check for g-ir runtimes. Something - # makes them point to /usr/bin. Align them to sysroot - that's where the - # gir-wrappers are: - sed -i 's: ${bindir}/g-ir: ${STAGING_BINDIR}/g-ir:' ${B}/build.ninja -} - -PACKAGES =+ "libpoppler libpoppler-glib" -FILES:libpoppler = "${libdir}/libpoppler.so.*" -FILES:libpoppler-glib = "${libdir}/libpoppler-glib.so.*" - -RDEPENDS:libpoppler = "poppler-data" - -BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/poppler/poppler_24.09.0.bb b/sources/meta-openembedded/meta-oe/recipes-support/poppler/poppler_24.09.0.bb new file mode 100644 index 00000000..fb6b534c --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/poppler/poppler_24.09.0.bb @@ -0,0 +1,57 @@ +SUMMARY = "Poppler is a PDF rendering library based on the xpdf-3.0 code base" +HOMEPAGE = "https://poppler.freedesktop.org/" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" + +SRC_URI = "http://poppler.freedesktop.org/${BP}.tar.xz \ + file://0001-Do-not-overwrite-all-our-build-flags.patch \ + file://basename-include.patch \ + file://0001-cmake-Do-not-use-isystem.patch \ + " +SRC_URI[sha256sum] = "ebd857987e2395608c69fdc44009692d5906f13b612c5280beff65a0b75dc255" + +DEPENDS = "fontconfig zlib cairo lcms glib-2.0 glib-2.0-native" + +inherit cmake pkgconfig gobject-introspection + +PACKAGECONFIG ??= "boost jpeg nss openjpeg png tiff" +PACKAGECONFIG[boost] = "-DENABLE_BOOST=ON,-DENABLE_BOOST=OFF,boost" +PACKAGECONFIG[jpeg] = "-DWITH_JPEG=ON -DENABLE_DCTDECODER=libjpeg,-DWITH_JPEG=OFF -DENABLE_DCTDECODER=none,jpeg" +PACKAGECONFIG[png] = "-DWITH_PNG=ON,-DWITH_PNG=OFF,libpng" +PACKAGECONFIG[tiff] = "-DENABLE_LIBTIFF=ON,-DENABLE_LIBTIFF=OFF,tiff" +PACKAGECONFIG[curl] = "-DENABLE_LIBCURL=ON,-DENABLE_LIBCURL=OFF,curl" +PACKAGECONFIG[openjpeg] = "-DENABLE_LIBOPENJPEG=openjpeg2,-DENABLE_LIBOPENJPEG=none,openjpeg" +PACKAGECONFIG[qt5] = "-DENABLE_QT5=ON,-DENABLE_QT5=OFF,qtbase qttools-native" +PACKAGECONFIG[nss] = "-DENABLE_NSS3=ON,-DENABLE_NSS3=OFF,nss" +PACKAGECONFIG[gpgme] = "-DENABLE_GPGME=ON,-DENABLE_GPGME=OFF,gpgme" +PACKAGECONFIG[qt6] = "-DENABLE_QT6=ON,-DENABLE_QT6=OFF,qtbase" + +# surprise - did not expect this to work :) +inherit ${@bb.utils.contains('PACKAGECONFIG', 'qt5', 'cmake_qt5', '', d)} + +SECURITY_CFLAGS = "${SECURITY_NO_PIE_CFLAGS}" + +EXTRA_OECMAKE += " \ + -DENABLE_LCMS=ON \ + -DENABLE_UNSTABLE_API_ABI_HEADERS=ON \ + -DBUILD_GTK_TESTS=OFF \ + -DRUN_GPERF_IF_PRESENT=OFF \ + -DCMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES:PATH='${STAGING_INCDIR}' \ + ${@bb.utils.contains('GI_DATA_ENABLED', 'True', '-DENABLE_GOBJECT_INTROSPECTION=ON', '-DENABLE_GOBJECT_INTROSPECTION=OFF', d)} \ +" +EXTRA_OECMAKE:append:class-native = " -DENABLE_CPP=OFF" + +do_configure:append() { + # poppler macro uses pkg-config to check for g-ir runtimes. Something + # makes them point to /usr/bin. Align them to sysroot - that's where the + # gir-wrappers are: + sed -i 's: ${bindir}/g-ir: ${STAGING_BINDIR}/g-ir:' ${B}/build.ninja +} + +PACKAGES =+ "libpoppler libpoppler-glib" +FILES:libpoppler = "${libdir}/libpoppler.so.*" +FILES:libpoppler-glib = "${libdir}/libpoppler-glib.so.*" + +RDEPENDS:libpoppler = "poppler-data" + +BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/procmail/procmail/CVE-2014-3618.patch b/sources/meta-openembedded/meta-oe/recipes-support/procmail/procmail/CVE-2014-3618.patch new file mode 100644 index 00000000..b0419243 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/procmail/procmail/CVE-2014-3618.patch @@ -0,0 +1,29 @@ +Description: Fix heap-overflow in formail + CVE-2014-3618: Heap-overflow in formail when processing + specially-crafted email headers. +Origin: http://www.openwall.com/lists/oss-security/2014/09/03/8 +Bug-Debian: https://bugs.debian.org/704675 +Bug-Debian: https://bugs.debian.org/760443 +Forwarded: not-needed +Last-Update: 2014-09-04 + +CVE: CVE-2014-3618 +Upstream-Status: Inactive-Upstream [lastrelease: 2001] +Signed-off-by: Peter Marko + +--- a/src/formisc.c ++++ b/src/formisc.c +@@ -84,12 +84,11 @@ normal: *target++= *start++; + case '"':*target++=delim='"';start++; + } + ;{ int i; +- do ++ while(*start) + if((i= *target++= *start++)==delim) /* corresponding delimiter? */ + break; + else if(i=='\\'&&*start) /* skip quoted character */ + *target++= *start++; +- while(*start); /* anything? */ + } + hitspc=2; + } diff --git a/sources/meta-openembedded/meta-oe/recipes-support/procmail/procmail/CVE-2017-16844.patch b/sources/meta-openembedded/meta-oe/recipes-support/procmail/procmail/CVE-2017-16844.patch new file mode 100644 index 00000000..6e04989c --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/procmail/procmail/CVE-2017-16844.patch @@ -0,0 +1,20 @@ +From: Santiago Vila +Subject: Fix heap-based buffer overflow in loadbuf() +Bug-Debian: http://bugs.debian.org/876511 +X-Debian-version: 3.22-26 + +CVE: CVE-2017-16844 +Upstream-Status: Inactive-Upstream [lastrelease: 2001] +Signed-off-by: Peter Marko + +--- a/src/formisc.c ++++ b/src/formisc.c +@@ -103,7 +103,7 @@ + } + /* append to buf */ + void loadbuf(text,len)const char*const text;const size_t len; +-{ if(buffilled+len>buflen) /* buf can't hold the text */ ++{ while(buffilled+len>buflen) /* buf can't hold the text */ + buf=realloc(buf,buflen+=Bsize); + tmemmove(buf+buffilled,text,len);buffilled+=len; + } diff --git a/sources/meta-openembedded/meta-oe/recipes-support/procmail/procmail_3.22.bb b/sources/meta-openembedded/meta-oe/recipes-support/procmail/procmail_3.22.bb index 16917666..16fcf84d 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/procmail/procmail_3.22.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/procmail/procmail_3.22.bb @@ -12,7 +12,10 @@ SRC_URI = "http://www.ring.gr.jp/archives/net/mail/${BPN}/${BP}.tar.gz \ file://from-debian-to-fix-compile-errors.patch \ file://from-debian-to-modify-parameters.patch \ file://from-debian-to-fix-man-file.patch \ - file://man-file-mailstat.1-from-debian.patch" + file://man-file-mailstat.1-from-debian.patch \ + file://CVE-2014-3618.patch \ + file://CVE-2017-16844.patch \ +" SRC_URI[md5sum] = "1678ea99b973eb77eda4ecf6acae53f1" SRC_URI[sha256sum] = "087c75b34dd33d8b9df5afe9e42801c9395f4bf373a784d9bc97153b0062e117" @@ -33,7 +36,7 @@ do_configure() { } do_compile() { - oe_runmake -i TARGET_CFLAGS="$TARGET_CFLAGS -Wno-comments -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" LDFLAGS0="${LDFLAGS}" + oe_runmake -i CFLAGS="$TARGET_CFLAGS -Wno-comments -Wno-implicit-int -Wno-implicit-function-declaration -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" LDFLAGS0="${LDFLAGS}" } do_install() { diff --git a/sources/meta-openembedded/meta-oe/recipes-support/pv/pv_1.6.20.bb b/sources/meta-openembedded/meta-oe/recipes-support/pv/pv_1.6.20.bb index 6a739af9..ac26ef93 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/pv/pv_1.6.20.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/pv/pv_1.6.20.bb @@ -11,7 +11,7 @@ SRC_URI = "https://www.ivarch.com/programs/sources/${BP}.tar.bz2 \ SRC_URI[sha256sum] = "e831951eff0718fba9b1ef286128773b9d0e723e1fbfae88d5a3188814fdc603" UPSTREAM_CHECK_URI = "http://www.ivarch.com/programs/pv.shtml" -UPSTREAM_CHECK_REGEX = "pv-(?P\d+(\.\d+)+).tar.bz2" +UPSTREAM_CHECK_REGEX = "pv-(?P\d+(\.\d+)+).tar" inherit autotools ptest diff --git a/sources/meta-openembedded/meta-oe/recipes-support/pxaregs/pxaregs_1.14.bb b/sources/meta-openembedded/meta-oe/recipes-support/pxaregs/pxaregs_1.14.bb index b61fb026..09534c44 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/pxaregs/pxaregs_1.14.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/pxaregs/pxaregs_1.14.bb @@ -9,7 +9,8 @@ SRC_URI = "file://pxaregs.c \ file://serial.patch \ file://usb.patch " -S = "${WORKDIR}" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" do_compile() { ${CC} pxaregs.c -o pxaregs ${CFLAGS} ${LDFLAGS} diff --git a/sources/meta-openembedded/meta-filesystems/recipes-support/python3-looseversion/python3-looseversion_1.3.0.bb b/sources/meta-openembedded/meta-oe/recipes-support/python3-looseversion/python3-looseversion_1.3.0.bb similarity index 100% rename from sources/meta-openembedded/meta-filesystems/recipes-support/python3-looseversion/python3-looseversion_1.3.0.bb rename to sources/meta-openembedded/meta-oe/recipes-support/python3-looseversion/python3-looseversion_1.3.0.bb diff --git a/sources/meta-openembedded/meta-oe/recipes-support/raptor2/raptor2/raptor-2.0.16-dont_use_curl-config.patch b/sources/meta-openembedded/meta-oe/recipes-support/raptor2/raptor2/raptor-2.0.16-dont_use_curl-config.patch new file mode 100644 index 00000000..b12beff6 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/raptor2/raptor2/raptor-2.0.16-dont_use_curl-config.patch @@ -0,0 +1,73 @@ +Do not use curl-config + +Sourced from +https://bugs.gentoo.org/552474 + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- a/configure.ac ++++ b/configure.ac +@@ -596,49 +596,12 @@ else + PKG_CHECK_MODULES([XSLT], [libxslt > $libxslt_min_version], [have_libxslt=1], [have_libxslt=0]) + fi + +-dnl curl +-AC_ARG_WITH(curl-config, [ --with-curl-config=PATH Location of libcurl curl-config []], curl_config="$withval", curl_config="") +- +-if test "X$curl_config" != "Xno" ; then +- if test "X$curl_config" != "X" ; then +- AC_MSG_CHECKING(for $curl_config) +- +- if test -f $curl_config ; then +- CURL_CONFIG=$curl_config +- AC_MSG_RESULT(yes) +- else +- AC_MSG_RESULT(no - searching PATH) +- fi +- fi +- if test "X$CURL_CONFIG" = "X" ; then +- AC_CHECK_PROGS(CURL_CONFIG, curl-config) +- fi +-fi +- + libcurl_source=no +-if test "X$CURL_CONFIG" != "X"; then +- LIBCURL_CFLAGS=`$CURL_CONFIG --cflags` +- LIBCURL_LIBS=`$CURL_CONFIG --libs` +- +- CPPFLAGS="$LIBCURL_CFLAGS $CPPFLAGS" +- LIBS="$LIBS $LIBCURL_LIBS" +- AC_CHECK_HEADER(curl/curl.h) +- AC_CHECK_FUNC(curl_easy_init, have_curl_easy_init=yes, have_curl_easy_init=no) +- +- AC_MSG_CHECKING(for libcurl via curl-config) +- if test $have_curl_easy_init = yes; then +- libcurl_source="curl-config" +- LIBCURL_VERSION=`$CURL_CONFIG --version | sed -e 's/^libcurl *//'` +- fi +- CPPFLAGS="$oCPPFLAGS" +- LIBS="$oLIBS" +-else +- PKG_CHECK_MODULES([LIBCURL],[libcurl],[ +- LIBCURL_VERSION=`$PKG_CONFIG libcurl --modversion` +- libcurl_source="pkg-config" +- ], [:]) +- AC_MSG_CHECKING(for libcurl via pkg-config) +-fi ++PKG_CHECK_MODULES([LIBCURL],[libcurl],[ ++ LIBCURL_VERSION=`$PKG_CONFIG libcurl --modversion` ++ libcurl_source="pkg-config" ++], [:]) ++AC_MSG_CHECKING(for libcurl via pkg-config) + + if test "$libcurl_source" = "no"; then + AC_MSG_RESULT(no - not found) +@@ -1033,7 +996,7 @@ need_libcurl=0 + need_libxml_www=0 + need_libfetch=0 + +-if test "X$CURL_CONFIG" != X; then ++if test "$libcurl_source" != "no"; then + CPPFLAGS="$CPPFLAGS $LIBCURL_CFLAGS" + LIBS="$LIBS $LIBCURL_LIBS" + AC_CHECK_HEADER(curl/curl.h) diff --git a/sources/meta-openembedded/meta-oe/recipes-support/raptor2/raptor2_2.0.16.bb b/sources/meta-openembedded/meta-oe/recipes-support/raptor2/raptor2_2.0.16.bb index 85012bcf..7014a28c 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/raptor2/raptor2_2.0.16.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/raptor2/raptor2_2.0.16.bb @@ -7,18 +7,18 @@ LIC_FILES_CHKSUM = " \ file://LICENSE-2.0.txt;md5=3b83ef96387f14655fc854ddc3c6bd57 \ " -DEPENDS = "libxml2 libxslt curl yajl" +DEPENDS = "bison-native flex-native libxml2 libxslt curl yajl" SRC_URI = " \ http://download.librdf.org/source/${BPN}-${PV}.tar.gz \ file://0001-Remove-the-access-to-entities-checked-private-symbol.patch \ + file://raptor-2.0.16-dont_use_curl-config.patch \ " SRC_URI[sha256sum] = "089db78d7ac982354bdbf39d973baf09581e6904ac4c92a98c5caadb3de44680" -inherit autotools pkgconfig gtk-doc +inherit autotools pkgconfig gtk-doc perlnative EXTRA_OECONF = " \ --without-xml2-config \ - --without-curl-config \ --without-xslt-config \ " diff --git a/sources/meta-openembedded/meta-oe/recipes-support/reboot-mode/reboot-mode_git.bb b/sources/meta-openembedded/meta-oe/recipes-support/reboot-mode/reboot-mode_git.bb index c038966b..5e0c6cd2 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/reboot-mode/reboot-mode_git.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/reboot-mode/reboot-mode_git.bb @@ -8,6 +8,9 @@ SRCREV = "84831b20512abd9033414ca5f5a023f333525335" S = "${WORKDIR}/git" +# Upstream repo has not made releases/tags after 1.0.0 +UPSTREAM_CHECK_COMMITS = "1" + do_compile() { ${CC} ${CFLAGS} ${LDFLAGS} ${S}/reboot-mode.c -o ${B}/reboot-mode } diff --git a/sources/meta-openembedded/meta-oe/recipes-support/remmina/remmina_1.4.34.bb b/sources/meta-openembedded/meta-oe/recipes-support/remmina/remmina_1.4.34.bb deleted file mode 100644 index 921d34d9..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/remmina/remmina_1.4.34.bb +++ /dev/null @@ -1,50 +0,0 @@ -DESCRIPTION = "A feature rich Remote Desktop Application written in GTK+" -HOMEPAGE = "https://remmina.org" -SECTION = "Support" -LICENSE = "GPL-2.0-only & OpenSSL" -LIC_FILES_CHKSUM = "file://LICENSE;md5=dab7215512044d49037272ce1ac4ea8f file://LICENSE.OpenSSL;md5=c1eb3cee0a4dea27503c531267a69769" - -DEPENDS = " \ - glib-2.0-native \ - openssl \ - freerdp \ - gtk+3 \ - gdk-pixbuf \ - atk \ - libgcrypt \ - libsodium \ - libssh \ - vte \ - json-glib \ - libsoup-3.0 \ - libvncserver \ - libsecret \ - libxkbfile \ -" - -DEPENDS:append:libc-musl = " libexecinfo" -LDFLAGS:append:libc-musl = " -lexecinfo" - -SRCREV = "75a0bdb795d99e052690178ae0d81ebdbd2cbdd3" -SRC_URI = "git://gitlab.com/Remmina/Remmina;protocol=https;branch=master" -S = "${WORKDIR}/git" - -inherit cmake features_check mime mime-xdg gtk-icon-cache pkgconfig -REQUIRED_DISTRO_FEATURES = "x11" - -EXTRA_OECMAKE += "-DWITH_APPINDICATOR=OFF -DWITH_GETTEXT=OFF -DWITH_TRANSLATIONS=OFF -DHAVE_LIBAPPINDICATOR=OFF -DWITH_WEBKIT2GTK=OFF" - -PACKAGECONFIG[spice] = "-DWITH_SPICE=ON, -DWITH_SPICE=OFF, spice spice-protocol" -# Switch on gtk support in avahi recipe if you want to enable avahi support -PACKAGECONFIG[avahi] = "-DWITH_AVAHI=ON, -DWITH_AVAHI=OFF, avahi" - -do_configure:append() { - sed -i -e 's|${WORKDIR}||g' ${B}/generated/buildflags.h -} - -RDEPENDS:${PN} = "bash" - -FILES:${PN}+= " \ - ${datadir}/metainfo \ - ${datadir}/mime \ -" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/remmina/remmina_1.4.35.bb b/sources/meta-openembedded/meta-oe/recipes-support/remmina/remmina_1.4.35.bb new file mode 100644 index 00000000..0cad52df --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/remmina/remmina_1.4.35.bb @@ -0,0 +1,50 @@ +DESCRIPTION = "A feature rich Remote Desktop Application written in GTK+" +HOMEPAGE = "https://remmina.org" +SECTION = "Support" +LICENSE = "GPL-2.0-only & OpenSSL" +LIC_FILES_CHKSUM = "file://LICENSE;md5=dab7215512044d49037272ce1ac4ea8f file://LICENSE.OpenSSL;md5=c1eb3cee0a4dea27503c531267a69769" + +DEPENDS = " \ + glib-2.0-native \ + openssl \ + freerdp \ + gtk+3 \ + gdk-pixbuf \ + atk \ + libgcrypt \ + libsodium \ + libssh \ + vte \ + json-glib \ + libsoup-3.0 \ + libvncserver \ + libsecret \ + libxkbfile \ +" + +DEPENDS:append:libc-musl = " libexecinfo" +LDFLAGS:append:libc-musl = " -lexecinfo" + +SRCREV = "2a455eadd6462457d08c2d066c5c245e0dee3bf9" +SRC_URI = "git://gitlab.com/Remmina/Remmina;protocol=https;branch=master" +S = "${WORKDIR}/git" + +inherit cmake features_check mime mime-xdg gtk-icon-cache pkgconfig +REQUIRED_DISTRO_FEATURES = "x11" + +EXTRA_OECMAKE += "-DWITH_APPINDICATOR=OFF -DWITH_GETTEXT=OFF -DWITH_TRANSLATIONS=OFF -DHAVE_LIBAPPINDICATOR=OFF -DWITH_WEBKIT2GTK=OFF" + +PACKAGECONFIG[spice] = "-DWITH_SPICE=ON, -DWITH_SPICE=OFF, spice spice-protocol" +# Switch on gtk support in avahi recipe if you want to enable avahi support +PACKAGECONFIG[avahi] = "-DWITH_AVAHI=ON, -DWITH_AVAHI=OFF, avahi" + +do_configure:append() { + sed -i -e 's|${WORKDIR}||g' ${B}/generated/buildflags.h +} + +RDEPENDS:${PN} = "bash" + +FILES:${PN}+= " \ + ${datadir}/metainfo \ + ${datadir}/mime \ +" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/reptyr/reptyr_0.10.0.bb b/sources/meta-openembedded/meta-oe/recipes-support/reptyr/reptyr_0.10.0.bb index 57b31a78..68897582 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/reptyr/reptyr_0.10.0.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/reptyr/reptyr_0.10.0.bb @@ -27,3 +27,5 @@ do_compile () { do_install () { oe_runmake install 'DESTDIR=${D}' } + +COMPATIBLE_HOST:riscv32 = "null" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/sdmon/sdmon_git.bb b/sources/meta-openembedded/meta-oe/recipes-support/sdmon/sdmon_git.bb index 522539a6..81c8033c 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/sdmon/sdmon_git.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/sdmon/sdmon_git.bb @@ -6,8 +6,8 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263" SRC_URI = "git://github.com/Ognian/sdmon;protocol=https;branch=master" -PV = "0.8.1+git" -SRCREV = "ef1aec457f04a50721f0259651cca9c946f11390" +PV = "0.9.0" +SRCREV = "4dff9b690e8d4454fada6abfbb6b32fcb794968c" S = "${WORKDIR}/git" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/serial/serial/0001-Add-SOVERSION-for-shared-lib-and-comment-example.patch b/sources/meta-openembedded/meta-oe/recipes-support/serial/serial/0001-Add-SOVERSION-for-shared-lib-and-comment-example.patch new file mode 100644 index 00000000..5f4a81a7 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/serial/serial/0001-Add-SOVERSION-for-shared-lib-and-comment-example.patch @@ -0,0 +1,46 @@ +From 23ae981ba46f6d5af03b12083ad32de9c1f148b2 Mon Sep 17 00:00:00 2001 +From: magicWenli <48174882+magicwenli@users.noreply.github.com> +Date: Fri, 12 Apr 2024 07:52:53 +0000 +Subject: [PATCH] Add SOVERSION for shared lib, and comment example by default + +Upstream-Status: Pending +--- + CMakeLists.txt | 14 ++++++++++---- + 1 file changed, 10 insertions(+), 4 deletions(-) + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,5 +1,8 @@ + cmake_minimum_required(VERSION 2.8.3) + project(serial) ++set (SERIAL_VERSION_MAJOR 1) ++set (SERIAL_VERSION_MINOR 2) ++set (SERIAL_VERSION_PATCH 1) + + # Find catkin + find_package(catkin REQUIRED) +@@ -45,7 +48,7 @@ else() + endif() + + ## Add serial library +-add_library(${PROJECT_NAME} ${serial_SRCS}) ++add_library(${PROJECT_NAME} SHARED ${serial_SRCS}) + if(APPLE) + target_link_libraries(${PROJECT_NAME} ${FOUNDATION_LIBRARY} ${IOKIT_LIBRARY}) + elseif(UNIX) +@@ -55,9 +58,12 @@ else() + endif() + + ## Uncomment for example +-add_executable(serial_example examples/serial_example.cc) +-add_dependencies(serial_example ${PROJECT_NAME}) +-target_link_libraries(serial_example ${PROJECT_NAME}) ++# add_executable(serial_example examples/serial_example.cc) ++# add_dependencies(serial_example ${PROJECT_NAME}) ++# target_link_libraries(serial_example ${PROJECT_NAME}) ++ ++set (SERIAL_VERSION_STRING ${SERIAL_VERSION_MAJOR}.${SERIAL_VERSION_MINOR}.${SERIAL_VERSION_PATCH}) ++set_target_properties (${PROJECT_NAME} PROPERTIES VERSION ${SERIAL_VERSION_STRING} SOVERSION ${SERIAL_VERSION_MAJOR}) + + ## Include headers + include_directories(include) diff --git a/sources/meta-openembedded/meta-oe/recipes-support/serial/serial_1.2.1.bb b/sources/meta-openembedded/meta-oe/recipes-support/serial/serial_1.2.1.bb index 8c1fb063..c3f13d1a 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/serial/serial_1.2.1.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/serial/serial_1.2.1.bb @@ -6,6 +6,7 @@ LIC_FILES_CHKSUM = "file://README.md;beginline=53;endline=62;md5=049c68d559533f9 SRC_URI = " \ git://github.com/wjwwood/${BPN}.git;protocol=https;branch=main \ file://Findcatkin.cmake \ + file://0001-Add-SOVERSION-for-shared-lib-and-comment-example.patch \ " SRCREV = "10ac4e1c25c2cda1dc0a32a8e12b87fd89f3bb4f" SRC_URI[sha256sum] = "c8cd235dda2ef7d977ba06dfcb35c35e42f45cfd9149ba3ad257756123d8ff96" @@ -16,7 +17,7 @@ inherit cmake # Work-around for https://github.com/wjwwood/serial/issues/135 EXTRA_OECMAKE = " \ - -DCMAKE_MODULE_PATH=${WORKDIR} \ + -DCMAKE_MODULE_PATH=${UNPACKDIR} \ -DCATKIN_PACKAGE_LIB_DESTINATION=${libdir} \ -DCATKIN_PACKAGE_BIN_DESTINATION=${bindir} \ -DCATKIN_GLOBAL_INCLUDE_DESTINATION=${includedir} \ diff --git a/sources/meta-openembedded/meta-oe/recipes-support/smarty/smarty_4.4.1.bb b/sources/meta-openembedded/meta-oe/recipes-support/smarty/smarty_4.4.1.bb index 1caa4cd1..e0979bb5 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/smarty/smarty_4.4.1.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/smarty/smarty_4.4.1.bb @@ -24,3 +24,5 @@ do_install() { install -m 0644 ${S}/libs/sysplugins/*.php ${D}${datadir}/php/smarty3/libs/sysplugins/ } FILES:${PN} = "${datadir}/php/smarty3/" + +CVE_STATUS[CVE-2020-10375] = "cpe-incorrect: The recipe used in the meta-openembedded is a different smarty package compared to the one which has the CVE issue." diff --git a/sources/meta-openembedded/meta-oe/recipes-support/spdlog/spdlog_1.13.0.bb b/sources/meta-openembedded/meta-oe/recipes-support/spdlog/spdlog_1.13.0.bb deleted file mode 100644 index c6a0881d..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/spdlog/spdlog_1.13.0.bb +++ /dev/null @@ -1,18 +0,0 @@ -DESCRIPTION = "Very fast, header only, C++ logging library." -HOMEPAGE = "https://github.com/gabime/spdlog/wiki" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=9573510928429ad0cbe5ba4de77546e9" - -SRCREV = "7c02e204c92545f869e2f04edaab1f19fe8b19fd" -SRC_URI = "git://github.com/gabime/spdlog.git;protocol=https;branch=v1.x" - -DEPENDS = "fmt" - -S = "${WORKDIR}/git" - -inherit cmake - -# no need to build example & tests & benchmarks on pure yocto -EXTRA_OECMAKE += "-DSPDLOG_INSTALL=on -DSPDLOG_BUILD_SHARED=on -DSPDLOG_BUILD_EXAMPLE=off -DSPDLOG_FMT_EXTERNAL=on" - -BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/spdlog/spdlog_1.14.1.bb b/sources/meta-openembedded/meta-oe/recipes-support/spdlog/spdlog_1.14.1.bb new file mode 100644 index 00000000..19bac0be --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/spdlog/spdlog_1.14.1.bb @@ -0,0 +1,18 @@ +DESCRIPTION = "Very fast, header only, C++ logging library." +HOMEPAGE = "https://github.com/gabime/spdlog/wiki" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=9573510928429ad0cbe5ba4de77546e9" + +SRCREV = "27cb4c76708608465c413f6d0e6b8d99a4d84302" +SRC_URI = "git://github.com/gabime/spdlog.git;protocol=https;branch=v1.x" + +DEPENDS = "fmt" + +S = "${WORKDIR}/git" + +inherit cmake + +# no need to build example & tests & benchmarks on pure yocto +EXTRA_OECMAKE += "-DSPDLOG_INSTALL=on -DSPDLOG_BUILD_SHARED=on -DSPDLOG_BUILD_EXAMPLE=off -DSPDLOG_FMT_EXTERNAL=on" + +BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/0001-macros-guard-ipv6-code-with-SYSLOG_NG_ENABLE_IPV6.patch b/sources/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/0001-macros-guard-ipv6-code-with-SYSLOG_NG_ENABLE_IPV6.patch deleted file mode 100644 index f21ad5d7..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/0001-macros-guard-ipv6-code-with-SYSLOG_NG_ENABLE_IPV6.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 896d77dd949b52d6ea5798e5a038ba97d6b802be Mon Sep 17 00:00:00 2001 -From: Peter Marko -Date: Thu, 4 Apr 2024 15:44:18 +0200 -Subject: [PATCH] macros: guard ipv6 code with SYSLOG_NG_ENABLE_IPV6 - -With ipv6 disabled, there are linking errors currently. -This fixes it by not using the symbols when IPv6 is disabled. - -Solves #4810 with my config options -https://github.com/openembedded/meta-openembedded/blob/2487e65ee3842b6ae0c7a2628985be6189ed9ebf/meta-oe/recipes-support/syslog-ng/syslog-ng_4.6.0.bb - -Upstream-Status: Submitted [https://github.com/syslog-ng/syslog-ng/pull/4880] - -Signed-off-by: Peter Marko ---- - lib/template/macros.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/lib/template/macros.c b/lib/template/macros.c -index 54142706c..fcb83637f 100644 ---- a/lib/template/macros.c -+++ b/lib/template/macros.c -@@ -277,12 +277,14 @@ _get_originating_ip_protocol(const LogMessage *msg) - return 0; - if (g_sockaddr_inet_check(msg->saddr)) - return 4; -+#if SYSLOG_NG_ENABLE_IPV6 - if (g_sockaddr_inet6_check(msg->saddr)) - { - if (g_sockaddr_inet6_is_v4_mapped(msg->saddr)) - return 4; - return 6; - } -+#endif - return 0; - } - --- -2.30.2 - diff --git a/sources/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/CVE-2024-47619.patch b/sources/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/CVE-2024-47619.patch deleted file mode 100644 index 725f471b..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/CVE-2024-47619.patch +++ /dev/null @@ -1,292 +0,0 @@ -From 12a0624e4c275f14cee9a6b4f36e714d2ced8544 Mon Sep 17 00:00:00 2001 -From: therandomstring -Date: Wed, 07 May 2025 09:30:36 +0530 -Subject: [PATCH] Merge commit from fork - -Fix transport accepting incorrect wildcards - -CVE: CVE-2024-47619 -Upstream-Status: Backport [https://github.com/syslog-ng/syslog-ng/commit/12a0624e4c275f14cee9a6b4f36e714d2ced8544] - -Signed-off-by: Yogita Urade ---- - lib/transport/tests/CMakeLists.txt | 1 + - lib/transport/tests/Makefile.am | 9 +- - lib/transport/tests/test_tls_wildcard_match.c | 104 ++++++++++++++++++ - lib/transport/tls-verifier.c | 86 +++++++++++++-- - lib/transport/tls-verifier.h | 2 + - 5 files changed, 190 insertions(+), 12 deletions(-) - create mode 100644 lib/transport/tests/test_tls_wildcard_match.c - -diff --git a/lib/transport/tests/CMakeLists.txt b/lib/transport/tests/CMakeLists.txt -index 834f456..ce1d033 100644 ---- a/lib/transport/tests/CMakeLists.txt -+++ b/lib/transport/tests/CMakeLists.txt -@@ -3,3 +3,4 @@ add_unit_test(CRITERION TARGET test_transport_factory_id) - add_unit_test(CRITERION TARGET test_transport_factory) - add_unit_test(CRITERION TARGET test_transport_factory_registry) - add_unit_test(CRITERION TARGET test_multitransport) -+add_unit_test(CRITERION TARGET test_tls_wildcard_match) -diff --git a/lib/transport/tests/Makefile.am b/lib/transport/tests/Makefile.am -index 7eac994..ae2426c 100644 ---- a/lib/transport/tests/Makefile.am -+++ b/lib/transport/tests/Makefile.am -@@ -3,7 +3,8 @@ lib_transport_tests_TESTS = \ - lib/transport/tests/test_transport_factory_id \ - lib/transport/tests/test_transport_factory \ - lib/transport/tests/test_transport_factory_registry \ -- lib/transport/tests/test_multitransport -+ lib/transport/tests/test_multitransport \ -+ lib/transport/tests/test_tls_wildcard_match - - EXTRA_DIST += lib/transport/tests/CMakeLists.txt - -@@ -38,3 +39,9 @@ lib_transport_tests_test_multitransport_CFLAGS = $(TEST_CFLAGS) \ - lib_transport_tests_test_multitransport_LDADD = $(TEST_LDADD) - lib_transport_tests_test_multitransport_SOURCES = \ - lib/transport/tests/test_multitransport.c -+ -+lib_transport_tests_test_tls_wildcard_match_CFLAGS = $(TEST_CFLAGS) \ -+ -I${top_srcdir}/lib/transport/tests -+lib_transport_tests_test_tls_wildcard_match_LDADD = $(TEST_LDADD) -+lib_transport_tests_test_tls_wildcard_match_SOURCES = \ -+ lib/transport/tests/test_tls_wildcard_match.c -diff --git a/lib/transport/tests/test_tls_wildcard_match.c b/lib/transport/tests/test_tls_wildcard_match.c -new file mode 100644 -index 0000000..90cecb0 ---- /dev/null -+++ b/lib/transport/tests/test_tls_wildcard_match.c -@@ -0,0 +1,104 @@ -+/* -+ * Copyright (c) 2024 One Identity LLC. -+ * Copyright (c) 2024 Franco Fichtner -+ * -+ * This library is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with this library; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ * As an additional exemption you are allowed to compile & link against the -+ * OpenSSL libraries as published by the OpenSSL project. See the file -+ * COPYING for details. -+ * -+ */ -+ -+ -+#include -+ -+#include "transport/tls-verifier.h" -+ -+TestSuite(tls_wildcard, .init = NULL, .fini = NULL); -+ -+Test(tls_wildcard, test_wildcard_match_pattern_acceptance) -+{ -+ cr_assert_eq(tls_wildcard_match("test", "test"), TRUE); -+ cr_assert_eq(tls_wildcard_match("test", "*"), TRUE); -+ cr_assert_eq(tls_wildcard_match("test", "t*t"), TRUE); -+ cr_assert_eq(tls_wildcard_match("test", "t*"), TRUE); -+ cr_assert_eq(tls_wildcard_match("", ""), TRUE); -+ cr_assert_eq(tls_wildcard_match("test.one", "test.one"), TRUE); -+ cr_assert_eq(tls_wildcard_match("test.one.two", "test.one.two"), TRUE); -+ cr_assert_eq(tls_wildcard_match("192.0.2.0", "192.0.2.0"), TRUE); -+ cr_assert_eq(tls_wildcard_match("2001:0000:130F:0000:0000:09C0:876A:130B", "2001:0000:130F:0000:0000:09C0:876A:130B"), -+ TRUE); -+ cr_assert_eq(tls_wildcard_match("2001:0000:130F:0000:0000:09C0:876A:130B", "2001:0:130F:0:0:9C0:876A:130B"), TRUE); -+ cr_assert_eq(tls_wildcard_match("2001:0:130F:0:0:9C0:876A:130B", "2001:0000:130F:0000:0000:09C0:876A:130B"), TRUE); -+ cr_assert_eq(tls_wildcard_match("2001:0000:130F::09C0:876A:130B", "2001:0000:130F:0000:0000:09C0:876A:130B"), TRUE); -+ cr_assert_eq(tls_wildcard_match("2001:0000:130F:0000:0000:09C0:876A:130B", "2001:0000:130F::09C0:876A:130B"), TRUE); -+ cr_assert_eq(tls_wildcard_match("2001:0000:130F:0000:0000:09C0:876A:130B", "2001:0:130F::9C0:876A:130B"), TRUE); -+ cr_assert_eq(tls_wildcard_match("2001:0:130F::9C0:876A:130B", "2001:0000:130F:0000:0000:09C0:876A:130B"), TRUE); -+} -+ -+Test(tls_wildcard, test_wildcard_match_wildcard_rejection) -+{ -+ cr_assert_eq(tls_wildcard_match("test", "**"), FALSE); -+ cr_assert_eq(tls_wildcard_match("test", "*es*"), FALSE); -+ cr_assert_eq(tls_wildcard_match("test", "t*?"), FALSE); -+} -+ -+Test(tls_wildcard, test_wildcard_match_pattern_rejection) -+{ -+ cr_assert_eq(tls_wildcard_match("test", "tset"), FALSE); -+ cr_assert_eq(tls_wildcard_match("test", "set"), FALSE); -+ cr_assert_eq(tls_wildcard_match("", "*"), FALSE); -+ cr_assert_eq(tls_wildcard_match("test", ""), FALSE); -+ cr_assert_eq(tls_wildcard_match("test.two", "test.one"), FALSE); -+} -+ -+Test(tls_wildcard, test_wildcard_match_format_rejection) -+{ -+ cr_assert_eq(tls_wildcard_match("test.two", "test.*"), FALSE); -+ cr_assert_eq(tls_wildcard_match("test.two", "test.t*o"), FALSE); -+ cr_assert_eq(tls_wildcard_match("test", "test.two"), FALSE); -+ cr_assert_eq(tls_wildcard_match("test.two", "test"), FALSE); -+ cr_assert_eq(tls_wildcard_match("test.one.two", "test.one"), FALSE); -+ cr_assert_eq(tls_wildcard_match("test.one", "test.one.two"), FALSE); -+ cr_assert_eq(tls_wildcard_match("test.three", "three.test"), FALSE); -+ cr_assert_eq(tls_wildcard_match("test.one.two", "test.one.*"), FALSE); -+} -+ -+Test(tls_wildcard, test_wildcard_match_complex_rejection) -+{ -+ cr_assert_eq(tls_wildcard_match("test.two", "test.???"), FALSE); -+ cr_assert_eq(tls_wildcard_match("test.one.two", "test.one.?wo"), FALSE); -+} -+ -+Test(tls_wildcard, test_ip_wildcard_rejection) -+{ -+ cr_assert_eq(tls_wildcard_match("192.0.2.0", "*.0.2.0"), FALSE); -+ cr_assert_eq(tls_wildcard_match("2001:0000:130F:0000:0000:09C0:876A:130B", "*:0000:130F:0000:0000:09C0:876A:130B"), -+ FALSE); -+ cr_assert_eq(tls_wildcard_match("2001:0:130F::9C0:876A:130B", "*:0000:130F:0000:0000:09C0:876A:130B"), FALSE); -+} -+ -+Test(tls_wildcard, test_case_insensivity) -+{ -+ cr_assert_eq(tls_wildcard_match("test", "TEST"), TRUE); -+ cr_assert_eq(tls_wildcard_match("TEST", "test"), TRUE); -+ cr_assert_eq(tls_wildcard_match("TeST", "TEst"), TRUE); -+ cr_assert_eq(tls_wildcard_match("test.one", "test.ONE"), TRUE); -+ cr_assert_eq(tls_wildcard_match("test.TWO", "test.two"), TRUE); -+ cr_assert_eq(tls_wildcard_match("test.three", "*T.three"), TRUE); -+ cr_assert_eq(tls_wildcard_match("2001:0000:130F:0000:0000:09C0:876A:130B", "2001:0000:130f:0000:0000:09c0:876a:130b"), -+ TRUE); -+} -diff --git a/lib/transport/tls-verifier.c b/lib/transport/tls-verifier.c -index 606ad02..dde00d9 100644 ---- a/lib/transport/tls-verifier.c -+++ b/lib/transport/tls-verifier.c -@@ -1,4 +1,6 @@ - /* -+ * Copyright (c) 2024 One Identity LLC. -+ * Copyright (c) 2024 Franco Fichtner - * Copyright (c) 2002-2011 Balabit - * Copyright (c) 1998-2011 Balázs Scheidler - * -@@ -75,7 +77,7 @@ tls_verifier_unref(TLSVerifier *self) - - /* helper functions */ - --static gboolean -+gboolean - tls_wildcard_match(const gchar *host_name, const gchar *pattern) - { - gchar **pattern_parts, **hostname_parts; -@@ -86,22 +88,84 @@ tls_wildcard_match(const gchar *host_name, const gchar *pattern) - - pattern_parts = g_strsplit(pattern, ".", 0); - hostname_parts = g_strsplit(host_name, ".", 0); -- for (i = 0; pattern_parts[i]; i++) -+ -+ if(g_strrstr(pattern, "\?")) -+ { -+ /* Glib would treat any question marks as jokers */ -+ success = FALSE; -+ } -+ else if (g_hostname_is_ip_address(host_name)) -+ { -+ /* no wildcards in IP */ -+ if (g_strrstr(pattern, "*")) -+ { -+ success = FALSE; -+ } -+ else -+ { -+ struct in6_addr host_buffer, pattern_buffer; -+ gint INET_TYPE, INET_ADDRLEN; -+ if(strstr(host_name, ":")) -+ { -+ INET_TYPE = AF_INET6; -+ INET_ADDRLEN = INET6_ADDRSTRLEN; -+ } -+ else -+ { -+ INET_TYPE = AF_INET; -+ INET_ADDRLEN = INET_ADDRSTRLEN; -+ } -+ char host_ip[INET_ADDRLEN], pattern_ip[INET_ADDRLEN]; -+ gint host_ip_ok = inet_pton(INET_TYPE, host_name, &host_buffer); -+ gint pattern_ip_ok = inet_pton(INET_TYPE, pattern, &pattern_buffer); -+ inet_ntop(INET_TYPE, &host_buffer, host_ip, INET_ADDRLEN); -+ inet_ntop(INET_TYPE, &pattern_buffer, pattern_ip, INET_ADDRLEN); -+ success = (host_ip_ok && pattern_ip_ok && strcmp(host_ip, pattern_ip) == 0); -+ } -+ } -+ else - { -- if (!hostname_parts[i]) -+ if (pattern_parts[0] == NULL) - { -- /* number of dot separated entries is not the same in the hostname and the pattern spec */ -- goto exit; -+ if (hostname_parts[0] == NULL) -+ success = TRUE; -+ else -+ success = FALSE; - } -+ else -+ { -+ success = TRUE; -+ for (i = 0; pattern_parts[i]; i++) -+ { -+ if (hostname_parts[i] == NULL) -+ { -+ /* number of dot separated entries is not the same in the hostname and the pattern spec */ -+ success = FALSE; -+ break; -+ } -+ char *wildcard_matched = g_strrstr(pattern_parts[i], "*"); -+ if (wildcard_matched && (i != 0 || wildcard_matched != strstr(pattern_parts[i], "*"))) -+ { -+ /* wildcard only on leftmost part and never as multiple wildcards as per both RFC 6125 and 9525 */ -+ success = FALSE; -+ break; -+ } - -- lower_pattern = g_ascii_strdown(pattern_parts[i], -1); -- lower_hostname = g_ascii_strdown(hostname_parts[i], -1); -+ lower_pattern = g_ascii_strdown(pattern_parts[i], -1); -+ lower_hostname = g_ascii_strdown(hostname_parts[i], -1); - -- if (!g_pattern_match_simple(lower_pattern, lower_hostname)) -- goto exit; -+ if (!g_pattern_match_simple(lower_pattern, lower_hostname)) -+ { -+ success = FALSE; -+ break; -+ } -+ } -+ if (hostname_parts[i]) -+ /* hostname has more parts than the pattern */ -+ success = FALSE; -+ } - } -- success = TRUE; --exit: -+ - g_free(lower_pattern); - g_free(lower_hostname); - g_strfreev(pattern_parts); -diff --git a/lib/transport/tls-verifier.h b/lib/transport/tls-verifier.h -index 5642afa..98ab858 100644 ---- a/lib/transport/tls-verifier.h -+++ b/lib/transport/tls-verifier.h -@@ -44,5 +44,7 @@ void tls_verifier_unref(TLSVerifier *self); - - gboolean tls_verify_certificate_name(X509 *cert, const gchar *hostname); - -+gboolean tls_wildcard_match(const gchar *host_name, const gchar *pattern); -+ - - #endif --- -2.40.0 diff --git a/sources/meta-openembedded/meta-oe/recipes-support/syslog-ng/syslog-ng_4.6.0.bb b/sources/meta-openembedded/meta-oe/recipes-support/syslog-ng/syslog-ng_4.6.0.bb deleted file mode 100644 index e2ae40fd..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/syslog-ng/syslog-ng_4.6.0.bb +++ /dev/null @@ -1,150 +0,0 @@ -SUMMARY = "Alternative system logger daemon" -DESCRIPTION = "syslog-ng, as the name shows, is a syslogd replacement, \ -but with new functionality for the new generation. The original syslogd \ -allows messages only to be sorted based on priority/facility pairs; \ -syslog-ng adds the possibility to filter based on message contents using \ -regular expressions. The new configuration scheme is intuitive and powerful. \ -Forwarding logs over TCP and remembering all forwarding hops makes it \ -ideal for firewalled environments. \ -" -HOMEPAGE = "http://www.balabit.com/network-security/syslog-ng/opensource-logging-system" - -LICENSE = "GPL-2.0-only & LGPL-2.1-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=924958cefc9f7de3e0b818832b8a1cec" - -# util-linux added to get libuuid -DEPENDS = "libpcre flex glib-2.0 openssl util-linux bison-native curl" - -SRC_URI = "https://github.com/balabit/syslog-ng/releases/download/${BP}/${BP}.tar.gz \ - file://syslog-ng.conf.systemd \ - file://syslog-ng.conf.sysvinit \ - file://initscript \ - file://volatiles.03_syslog-ng \ - file://syslog-ng-tmp.conf \ - file://syslog-ng.service-the-syslog-ng-service.patch \ - file://0001-Fix-buildpaths-warning.patch \ - file://0001-macros-guard-ipv6-code-with-SYSLOG_NG_ENABLE_IPV6.patch \ - file://CVE-2024-47619.patch \ -" -SRC_URI:append:powerpc64le = " file://0001-plugin.c-workaround-powerpc64le-segfaults-error.patch" - -SRC_URI[sha256sum] = "b69e3360dfb96a754a4e1cbead4daef37128b1152a23572356db4ab64a475d4f" - -UPSTREAM_CHECK_URI = "https://github.com/balabit/syslog-ng/releases" - -CVE_STATUS[CVE-2022-38725] = "cpe-incorrect: cve-check wrongly matches cpe:2.3:a:oneidentity:syslog-ng:*:*:*:*:premium:*:*:* < 7.0.32" - -inherit autotools gettext systemd pkgconfig update-rc.d multilib_header - -EXTRA_OECONF = " \ - --enable-dynamic-linking \ - --disable-sub-streams \ - --disable-pacct \ - --localstatedir=${localstatedir}/lib/${BPN} \ - --sysconfdir=${sysconfdir}/${BPN} \ - --with-module-dir=${libdir}/${BPN} \ - --with-sysroot=${STAGING_DIR_HOST} \ - --without-mongoc --disable-mongodb \ - --with-librabbitmq-client=no \ - --disable-python \ - --disable-java --disable-java-modules \ - --with-pidfile-dir=${localstatedir}/run/${BPN} \ -" - -PACKAGECONFIG ??= " \ - ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6 systemd', d)} \ -" -PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,," -PACKAGECONFIG[systemd] = "--enable-systemd --with-systemdsystemunitdir=${systemd_unitdir}/system/,--disable-systemd --without-systemdsystemunitdir,systemd," -PACKAGECONFIG[linux-caps] = "--enable-linux-caps,--disable-linux-caps,libcap," -PACKAGECONFIG[dbi] = "--enable-sql,--disable-sql,libdbi," -PACKAGECONFIG[spoof-source] = "--enable-spoof-source --with-libnet=${STAGING_BINDIR_CROSS},--disable-spoof-source,libnet," -PACKAGECONFIG[http] = "--enable-http,--disable-http,curl," -PACKAGECONFIG[smtp] = "--enable-smtp --with-libesmtp=${STAGING_LIBDIR},--disable-smtp,libesmtp," -PACKAGECONFIG[json] = "--enable-json,--disable-json,json-c," -PACKAGECONFIG[tcp-wrapper] = "--enable-tcp-wrapper,--disable-tcp-wrapper,tcp-wrappers," -PACKAGECONFIG[geoip] = "--enable-geoip,--disable-geoip,geoip," -PACKAGECONFIG[native] = "--enable-native,--disable-native,," - -do_configure:prepend() { - olddir=$(pwd) - cd ${AUTOTOOLS_SCRIPT_PATH} - - ACLOCAL="$ACLOCAL" autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} -I ${S}/m4 ${ACLOCALEXTRAPATH} || die "extra autoreconf execution failed." - - cd $olddir -} - -do_install:append() { - install -d ${D}${sysconfdir}/${BPN} - install -d ${D}${sysconfdir}/init.d - install -m 755 ${WORKDIR}/initscript ${D}${sysconfdir}/init.d/syslog - - install -d ${D}${sysconfdir}/default/volatiles/ - install -m 644 ${WORKDIR}/volatiles.03_syslog-ng ${D}${sysconfdir}/default/volatiles/03_syslog-ng - install -d ${D}${sysconfdir}/tmpfiles.d/ - install -m 644 ${WORKDIR}/syslog-ng-tmp.conf ${D}${sysconfdir}/tmpfiles.d/syslog-ng.conf - - install -d ${D}${localstatedir}/lib/${BPN} - # Remove /var/run as it is created on startup - rm -rf ${D}${localstatedir}/run - - # it causes install conflict when multilib enabled - # since python support is disabled, not deliver it - rm -f ${D}${bindir}/syslog-ng-update-virtualenv - - # support for systemd - if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then - install -m 644 ${WORKDIR}/syslog-ng.conf.systemd ${D}${sysconfdir}/${BPN}/${BPN}.conf - - install -d ${D}${systemd_unitdir}/system/ - install -m 644 ${S}/contrib/systemd/${BPN}@.service ${D}${systemd_unitdir}/system/${BPN}@.service - install -m 644 ${S}/contrib/systemd/${BPN}@default ${D}${sysconfdir}/default/${BPN}@default - - sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/${BPN}@.service ${D}${sysconfdir}/default/${BPN}@default - sed -i -e 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${systemd_unitdir}/system/${BPN}@.service ${D}${sysconfdir}/default/${BPN}@default - sed -i -e 's,@BASEBINDIR@,${base_bindir},g' ${D}${systemd_unitdir}/system/${BPN}@.service ${D}${sysconfdir}/default/${BPN}@default - - install -d ${D}${systemd_unitdir}/system/multi-user.target.wants - ln -sf ../${BPN}@.service ${D}${systemd_unitdir}/system/multi-user.target.wants/${BPN}@default.service - else - install -m 644 ${WORKDIR}/syslog-ng.conf.sysvinit ${D}${sysconfdir}/${BPN}/${BPN}.conf - fi - - oe_multilib_header syslog-ng/syslog-ng-config.h -} - -FILES:${PN} += "${datadir}/include/scl/ ${datadir}/xsd ${datadir}/tools ${systemd_unitdir}/system/multi-user.target.wants/*" -RDEPENDS:${PN} += "gawk ${@bb.utils.contains('PACKAGECONFIG','json','${PN}-jconf','',d)}" - -FILES:${PN}-jconf += " \ -${datadir}/${BPN}/include/scl/cim \ -${datadir}/${BPN}/include/scl/elasticsearch \ -${datadir}/${BPN}/include/scl/ewmm \ -${datadir}/${BPN}/include/scl/graylog2 \ -${datadir}/${BPN}/include/scl/loggly \ -${datadir}/${BPN}/include/scl/logmatic \ -" - -# This overcomes the syslog-ng rdepends on syslog-ng-dev QA Error -PACKAGES =+ "${PN}-jconf ${PN}-libs ${PN}-libs-dev" -RPROVIDES:${PN}-dbg += "${PN}-libs-dbg" -FILES:${PN}-libs = "${libdir}/${BPN}/*.so ${libdir}/libsyslog-ng-*.so*" -FILES:${PN}-libs-dev = "${libdir}/${BPN}/lib*.la" -FILES:${PN}-staticdev += "${libdir}/${BPN}/libtest/*.a" -FILES:${PN} += "${systemd_unitdir}/system/*.service" -INSANE_SKIP:${PN}-libs = "dev-so" -RDEPENDS:${PN} += "${PN}-libs" - -CONFFILES:${PN} = "${sysconfdir}/${BPN}.conf ${sysconfdir}/scl.conf" - -RCONFLICTS:${PN} = "busybox-syslog sysklogd rsyslog" -RCONFLICTS:${PN}-libs = "busybox-syslog sysklogd rsyslog" - -RPROVIDES:${PN} += "${PN}-systemd" -RREPLACES:${PN} += "${PN}-systemd" -RCONFLICTS:${PN} += "${PN}-systemd" -SYSTEMD_SERVICE:${PN} = "${BPN}@.service" - -INITSCRIPT_NAME = "syslog" -INITSCRIPT_PARAMS = "start 20 2 3 4 5 . stop 90 0 1 6 ." diff --git a/sources/meta-openembedded/meta-oe/recipes-support/syslog-ng/syslog-ng_4.7.0.bb b/sources/meta-openembedded/meta-oe/recipes-support/syslog-ng/syslog-ng_4.7.0.bb new file mode 100644 index 00000000..588a3812 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/syslog-ng/syslog-ng_4.7.0.bb @@ -0,0 +1,156 @@ +SUMMARY = "Alternative system logger daemon" +DESCRIPTION = "syslog-ng, as the name shows, is a syslogd replacement, \ +but with new functionality for the new generation. The original syslogd \ +allows messages only to be sorted based on priority/facility pairs; \ +syslog-ng adds the possibility to filter based on message contents using \ +regular expressions. The new configuration scheme is intuitive and powerful. \ +Forwarding logs over TCP and remembering all forwarding hops makes it \ +ideal for firewalled environments. \ +" +HOMEPAGE = "http://www.balabit.com/network-security/syslog-ng/opensource-logging-system" + +LICENSE = "GPL-2.0-only & LGPL-2.1-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=924958cefc9f7de3e0b818832b8a1cec" + +# util-linux added to get libuuid +DEPENDS = "libpcre flex glib-2.0 openssl util-linux bison-native curl json-c" + +SRC_URI = "https://github.com/balabit/syslog-ng/releases/download/${BP}/${BP}.tar.gz \ + file://syslog-ng.conf.systemd \ + file://syslog-ng.conf.sysvinit \ + file://initscript \ + file://volatiles.03_syslog-ng \ + file://syslog-ng-tmp.conf \ + file://syslog-ng.service-the-syslog-ng-service.patch \ + file://0001-Fix-buildpaths-warning.patch \ +" +SRC_URI:append:powerpc64le = " file://0001-plugin.c-workaround-powerpc64le-segfaults-error.patch" + +SRC_URI[sha256sum] = "b601265362c633a25f26c497a7e57592739d5a583b7963b722ff58f01b853506" + +UPSTREAM_CHECK_URI = "https://github.com/balabit/syslog-ng/releases" + +CVE_STATUS[CVE-2022-38725] = "cpe-incorrect: cve-check wrongly matches cpe:2.3:a:oneidentity:syslog-ng:*:*:*:*:premium:*:*:* < 7.0.32" + +inherit autotools gettext systemd pkgconfig update-rc.d multilib_header + +EXTRA_OECONF = " \ + --enable-dynamic-linking \ + --disable-sub-streams \ + --disable-pacct \ + --localstatedir=${localstatedir}/lib/${BPN} \ + --sysconfdir=${sysconfdir}/${BPN} \ + --with-module-dir=${libdir}/${BPN} \ + --with-sysroot=${STAGING_DIR_HOST} \ + --without-mongoc --disable-mongodb \ + --with-librabbitmq-client=no \ + --disable-python \ + --disable-java --disable-java-modules \ + --with-pidfile-dir=${localstatedir}/run/${BPN} \ +" + +PACKAGECONFIG ??= " \ + ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6 systemd', d)} \ +" +PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,," +PACKAGECONFIG[systemd] = "--enable-systemd --with-systemdsystemunitdir=${systemd_unitdir}/system/,--disable-systemd --without-systemdsystemunitdir,systemd," +PACKAGECONFIG[linux-caps] = "--enable-linux-caps,--disable-linux-caps,libcap," +PACKAGECONFIG[dbi] = "--enable-sql,--disable-sql,libdbi," +PACKAGECONFIG[spoof-source] = "--enable-spoof-source --with-libnet=${STAGING_BINDIR_CROSS},--disable-spoof-source,libnet," +PACKAGECONFIG[http] = "--enable-http,--disable-http,curl," +PACKAGECONFIG[smtp] = "--enable-smtp --with-libesmtp=${STAGING_LIBDIR},--disable-smtp,libesmtp," +PACKAGECONFIG[json] = "--enable-json,--disable-json,json-c," +PACKAGECONFIG[tcp-wrapper] = "--enable-tcp-wrapper,--disable-tcp-wrapper,tcp-wrappers," +PACKAGECONFIG[geoip] = "--enable-geoip,--disable-geoip,geoip," +PACKAGECONFIG[native] = "--enable-native,--disable-native,," + +do_configure:prepend() { + olddir=$(pwd) + cd ${AUTOTOOLS_SCRIPT_PATH} + + ACLOCAL="$ACLOCAL" autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} -I ${S}/m4 ${ACLOCALEXTRAPATH} || die "extra autoreconf execution failed." + + cd $olddir +} + +do_install:append() { + install -d ${D}${sysconfdir}/${BPN} + install -d ${D}${sysconfdir}/init.d + install -m 755 ${UNPACKDIR}/initscript ${D}${sysconfdir}/init.d/syslog + + install -d ${D}${sysconfdir}/default/volatiles/ + install -m 644 ${UNPACKDIR}/volatiles.03_syslog-ng ${D}${sysconfdir}/default/volatiles/03_syslog-ng + install -d ${D}${sysconfdir}/tmpfiles.d/ + install -m 644 ${UNPACKDIR}/syslog-ng-tmp.conf ${D}${sysconfdir}/tmpfiles.d/syslog-ng.conf + + install -d ${D}${localstatedir}/lib/${BPN} + # Remove /var/run as it is created on startup + rm -rf ${D}${localstatedir}/run + + # it causes install conflict when multilib enabled + # since python support is disabled, not deliver it + rm -f ${D}${bindir}/syslog-ng-update-virtualenv + + # support for systemd + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then + install -m 644 ${UNPACKDIR}/syslog-ng.conf.systemd ${D}${sysconfdir}/${BPN}/${BPN}.conf + + install -d ${D}${systemd_unitdir}/system/ + install -m 644 ${S}/contrib/systemd/${BPN}@.service ${D}${systemd_unitdir}/system/${BPN}@.service + install -m 644 ${S}/contrib/systemd/${BPN}@default ${D}${sysconfdir}/default/${BPN}@default + + sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/${BPN}@.service ${D}${sysconfdir}/default/${BPN}@default + sed -i -e 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${systemd_unitdir}/system/${BPN}@.service ${D}${sysconfdir}/default/${BPN}@default + sed -i -e 's,@BASEBINDIR@,${base_bindir},g' ${D}${systemd_unitdir}/system/${BPN}@.service ${D}${sysconfdir}/default/${BPN}@default + + install -d ${D}${systemd_unitdir}/system/multi-user.target.wants + ln -sf ../${BPN}@.service ${D}${systemd_unitdir}/system/multi-user.target.wants/${BPN}@default.service + else + install -m 644 ${UNPACKDIR}/syslog-ng.conf.sysvinit ${D}${sysconfdir}/${BPN}/${BPN}.conf + fi + + oe_multilib_header syslog-ng/syslog-ng-config.h +} + +FILES:${PN} += "${datadir}/include/scl/ ${datadir}/xsd ${datadir}/tools ${systemd_unitdir}/system/multi-user.target.wants/*" +RDEPENDS:${PN} += "gawk ${@bb.utils.contains('PACKAGECONFIG','json','${PN}-jconf','',d)}" + +FILES:${PN}-jconf += " \ +${datadir}/${BPN}/include/scl/cim \ +${datadir}/${BPN}/include/scl/elasticsearch \ +${datadir}/${BPN}/include/scl/ewmm \ +${datadir}/${BPN}/include/scl/graylog2 \ +${datadir}/${BPN}/include/scl/loggly \ +${datadir}/${BPN}/include/scl/logmatic \ +" + +# This overcomes the syslog-ng rdepends on syslog-ng-dev QA Error +PACKAGES =+ "${PN}-jconf ${PN}-libs ${PN}-libs-dev" +RPROVIDES:${PN}-dbg += "${PN}-libs-dbg" +FILES:${PN}-libs = "${libdir}/${BPN}/*.so ${libdir}/libsyslog-ng-*.so*" +FILES:${PN}-libs-dev = "${libdir}/${BPN}/lib*.la" +FILES:${PN}-staticdev += "${libdir}/${BPN}/libtest/*.a" +FILES:${PN} += "${systemd_unitdir}/system/*.service" +INSANE_SKIP:${PN}-libs = "dev-so" +RDEPENDS:${PN} += "${PN}-libs" + +CONFFILES:${PN} = "${sysconfdir}/${BPN}.conf ${sysconfdir}/scl.conf" + +RCONFLICTS:${PN} = "busybox-syslog sysklogd rsyslog" +RCONFLICTS:${PN}-libs = "busybox-syslog sysklogd rsyslog" + +RPROVIDES:${PN} += "${PN}-systemd" +RREPLACES:${PN} += "${PN}-systemd" +RCONFLICTS:${PN} += "${PN}-systemd" +SYSTEMD_SERVICE:${PN} = "${BPN}@.service" + +INITSCRIPT_NAME = "syslog" +INITSCRIPT_PARAMS = "start 20 2 3 4 5 . stop 90 0 1 6 ." + +# Fails only with 32bit MACHINEs +# http://errors.yoctoproject.org/Errors/Details/766956/ +# syslog-ng-4.6.0/modules/secure-logging/slog.c:937:63: error: passing argument 4 of 'g_io_channel_write_chars' from incompatible pointer type [-Wincompatible-pointer-types] +# syslog-ng-4.6.0/modules/secure-logging/slog.c:955:99: error: passing argument 5 of 'cmac' from incompatible pointer type [-Wincompatible-pointer-types] +# syslog-ng-4.6.0/modules/secure-logging/slog.c:959:74: error: passing argument 4 of 'g_io_channel_write_chars' from incompatible pointer type [-Wincompatible-pointer-types] +# syslog-ng-4.6.0/modules/secure-logging/slog.c:975:107: error: passing argument 4 of 'g_io_channel_write_chars' from incompatible pointer type [-Wincompatible-pointer-types] +CFLAGS += "-Wno-error=incompatible-pointer-types" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/tbb/tbb/0001-Fix-suppress-new-GCC-12-13-warnings-1192.patch b/sources/meta-openembedded/meta-oe/recipes-support/tbb/tbb/0001-Fix-suppress-new-GCC-12-13-warnings-1192.patch deleted file mode 100644 index 489f011b..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/tbb/tbb/0001-Fix-suppress-new-GCC-12-13-warnings-1192.patch +++ /dev/null @@ -1,57 +0,0 @@ -From e131071769ee3df51b56b053ba6bfa06ae9eff25 Mon Sep 17 00:00:00 2001 -From: Dmitri Mokhov -Date: Mon, 11 Sep 2023 10:35:07 -0500 -Subject: [PATCH] Fix/suppress new GCC 12/13 warnings (#1192) - -Upstream-Status: Backport [https://github.com/oneapi-src/oneTBB/commit/e131071769ee3df51b56b053ba6bfa06ae9eff25] -Signed-off-by: Dmitri Mokhov ---- - .../oneapi/tbb/detail/_concurrent_unordered_base.h | 2 +- - src/tbb/concurrent_monitor.h | 12 +++++++++++- - 2 files changed, 12 insertions(+), 2 deletions(-) - -diff --git a/include/oneapi/tbb/detail/_concurrent_unordered_base.h b/include/oneapi/tbb/detail/_concurrent_unordered_base.h -index ade91c33..40829208 100644 ---- a/include/oneapi/tbb/detail/_concurrent_unordered_base.h -+++ b/include/oneapi/tbb/detail/_concurrent_unordered_base.h -@@ -921,7 +921,7 @@ private: - node_allocator_traits::deallocate(dummy_node_allocator, node, 1); - } else { - // GCC 11.1 issues a warning here that incorrect destructor might be called for dummy_nodes -- #if (__TBB_GCC_VERSION >= 110100 && __TBB_GCC_VERSION < 130000 ) && !__clang__ && !__INTEL_COMPILER -+ #if (__TBB_GCC_VERSION >= 110100 && __TBB_GCC_VERSION < 140000 ) && !__clang__ && !__INTEL_COMPILER - volatile - #endif - value_node_ptr val_node = static_cast(node); -diff --git a/src/tbb/concurrent_monitor.h b/src/tbb/concurrent_monitor.h -index 3d20ef5b..3e5c4beb 100644 ---- a/src/tbb/concurrent_monitor.h -+++ b/src/tbb/concurrent_monitor.h -@@ -1,5 +1,5 @@ - /* -- Copyright (c) 2005-2021 Intel Corporation -+ Copyright (c) 2005-2023 Intel Corporation - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. -@@ -290,7 +290,17 @@ public: - n = my_waitset.front(); - if (n != end) { - my_waitset.remove(*n); -+ -+// GCC 12.x-13.x issues a warning here that to_wait_node(n)->my_is_in_list might have size 0, since n is -+// a base_node pointer. (This cannot happen, because only wait_node pointers are added to my_waitset.) -+#if (__TBB_GCC_VERSION >= 120100 && __TBB_GCC_VERSION < 140000 ) && !__clang__ && !__INTEL_COMPILER -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wstringop-overflow" -+#endif - to_wait_node(n)->my_is_in_list.store(false, std::memory_order_relaxed); -+#if (__TBB_GCC_VERSION >= 120100 && __TBB_GCC_VERSION < 140000 ) && !__clang__ && !__INTEL_COMPILER -+#pragma GCC diagnostic pop -+#endif - } - } - --- -2.43.0 - diff --git a/sources/meta-openembedded/meta-oe/recipes-support/tbb/tbb/0001-hwloc_detection.cmake-remove-cross-compiation-check.patch b/sources/meta-openembedded/meta-oe/recipes-support/tbb/tbb/0001-hwloc_detection.cmake-remove-cross-compiation-check.patch deleted file mode 100644 index 640b1317..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/tbb/tbb/0001-hwloc_detection.cmake-remove-cross-compiation-check.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 7ffc1eba8596544d6e3af0fd5f4004fff6d56f84 Mon Sep 17 00:00:00 2001 -From: Naveen Saini -Date: Wed, 29 Nov 2023 15:48:57 +0800 -Subject: [PATCH] hwloc_detection.cmake: remove cross-compiation check - -This check is preventing pkgconfig to -search for hwloc under cross-compilation. - -pkgconfig able to find hwloc pkg from sysroot. - -Upstream-Status: Inappropriate - -Signed-off-by: Naveen Saini ---- - cmake/hwloc_detection.cmake | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/cmake/hwloc_detection.cmake b/cmake/hwloc_detection.cmake -index 47233b17..5a7e84c3 100644 ---- a/cmake/hwloc_detection.cmake -+++ b/cmake/hwloc_detection.cmake -@@ -46,8 +46,6 @@ endforeach() - unset(HWLOC_TARGET_NAME) - - if (NOT HWLOC_TARGET_EXPLICITLY_DEFINED AND -- # No hwloc auto detection for cross compilation -- NOT CMAKE_CROSSCOMPILING AND - NOT TBB_DISABLE_HWLOC_AUTOMATIC_SEARCH - ) - find_package(PkgConfig QUIET) --- -2.37.3 - diff --git a/sources/meta-openembedded/meta-oe/recipes-support/tbb/tbb_2021.11.0.bb b/sources/meta-openembedded/meta-oe/recipes-support/tbb/tbb_2021.11.0.bb deleted file mode 100644 index 318cd876..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/tbb/tbb_2021.11.0.bb +++ /dev/null @@ -1,63 +0,0 @@ -DESCRIPTION = "Parallelism library for C++ - runtime files \ - TBB is a library that helps you leverage multi-core processor \ - performance without having to be a threading expert. It represents a \ - higher-level, task-based parallelism that abstracts platform details \ - and threading mechanism for performance and scalability." -HOMEPAGE = "https://software.intel.com/en-us/tbb" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=86d3f3a95c324c9479bd8986968f4327" - -DEPENDS:append:libc-musl = " libucontext" -DEPENDS:append:class-target = " hwloc" - -PE = "1" - -BRANCH = "onetbb_2021" -SRCREV = "8b829acc65569019edb896c5150d427f288e8aba" -SRC_URI = "git://github.com/oneapi-src/oneTBB.git;protocol=https;branch=${BRANCH} \ - file://0001-hwloc_detection.cmake-remove-cross-compiation-check.patch \ - file://0001-Fix-suppress-new-GCC-12-13-warnings-1192.patch \ -" -S = "${WORKDIR}/git" - -inherit cmake pkgconfig - -# test build fails, error: 'mallinfo mallinfo()' is deprecated -EXTRA_OECMAKE += " \ - -DTBB_TEST=OFF \ - -DCMAKE_BUILD_TYPE=Release \ - " - -# Hard-float 'd' ABI can't be used for a target that doesn't support the D instruction set extension (ignoring target-abi) -# tmp-glibc/work/riscv64-oe-linux/tbb/1_2021.7.0-r0/recipe-sysroot-native/usr/bin/riscv64-oe-linux/riscv64-oe-linux-ld: /tmp/lto-llvm-264bc2.o: can't link soft-float modules with double-float modules -# tmp-glibc/work/riscv64-oe-linux/tbb/1_2021.7.0-r0/recipe-sysroot-native/usr/bin/riscv64-oe-linux/riscv64-oe-linux-ld: failed to merge target specific data of file /tmp/lto-llvm-264bc2.o -EXTRA_OECMAKE:append:riscv32:toolchain-clang = " -DTBB_ENABLE_IPO=OFF " -EXTRA_OECMAKE:append:riscv64:toolchain-clang = " -DTBB_ENABLE_IPO=OFF " - -# fails with thumb enabled: -# | arm-oe-linux-gnueabi-g++ -march=armv7-a -mthumb -mthumb-interwork -mfloat-abi=softfp -mfpu=neon -mtune=cortex-a9 -mcpu=cortex-a9 -D__ARM__ -D__LINUX_ARM_ARCH__=7 -funwind-tables -mvectorize-with-neon-quad -rdynamic --sysroot=/OE/sysroots/m14tv -c -MMD -DTBB_USE_DEBUG -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -O2 -pipe -g -feliminate-unused-debug-types -fpermissive -fvisibility-inlines-hidden -I../../src -I../../src/rml/include -I../../include ../../src/tbb/concurrent_queue.cpp -# | {standard input}: Assembler messages: -# | {standard input}:250: Error: thumb conditional instruction should be in IT block -- `strexeq r2,r3,[r4]' -# ... -# | make[1]: *** [concurrent_queue.o] Error 1 -ARM_INSTRUCTION_SET = "arm" - -ASNEEDED = "" - -LDFLAGS:append:mips = " -latomic" -LDFLAGS:append:mipsel = " -latomic" -LDFLAGS:append:riscv32:toolchain-clang = " -latomic" - -LDFLAGS:append:libc-musl = " -lucontext" - -# The latest version of oneTBB does not support PPC -COMPATIBLE_MACHINE:powerpc = "(!.*ppc).*" - - -do_install:append:class-target() { - # fix for qa check buildpaths - sed -i "s#${RECIPE_SYSROOT}##g" ${D}${libdir}/cmake/TBB/TBBTargets.cmake -} - - -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/tbb/tbb_2021.13.0.bb b/sources/meta-openembedded/meta-oe/recipes-support/tbb/tbb_2021.13.0.bb new file mode 100644 index 00000000..4d0f80ca --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/tbb/tbb_2021.13.0.bb @@ -0,0 +1,64 @@ +DESCRIPTION = "Parallelism library for C++ - runtime files \ + TBB is a library that helps you leverage multi-core processor \ + performance without having to be a threading expert. It represents a \ + higher-level, task-based parallelism that abstracts platform details \ + and threading mechanism for performance and scalability." +HOMEPAGE = "https://software.intel.com/en-us/tbb" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=86d3f3a95c324c9479bd8986968f4327" + +DEPENDS:append:libc-musl = " libucontext" +DEPENDS:append:class-target = " hwloc" + +PE = "1" + +BRANCH = "onetbb_2021" +SRCREV = "1c4c93fc5398c4a1acb3492c02db4699f3048dea" +SRC_URI = "git://github.com/oneapi-src/oneTBB.git;protocol=https;branch=${BRANCH} \ + " + +S = "${WORKDIR}/git" + +inherit cmake pkgconfig + +# test build fails, error: 'mallinfo mallinfo()' is deprecated +EXTRA_OECMAKE += " \ + -DTBB_TEST=OFF \ + -DCMAKE_BUILD_TYPE=Release \ + -DTBB_STRICT=OFF \ + -DTBB_DISABLE_HWLOC_AUTOMATIC_SEARCH=OFF \ + " + +# Hard-float 'd' ABI can't be used for a target that doesn't support the D instruction set extension (ignoring target-abi) +# tmp-glibc/work/riscv64-oe-linux/tbb/1_2021.7.0-r0/recipe-sysroot-native/usr/bin/riscv64-oe-linux/riscv64-oe-linux-ld: /tmp/lto-llvm-264bc2.o: can't link soft-float modules with double-float modules +# tmp-glibc/work/riscv64-oe-linux/tbb/1_2021.7.0-r0/recipe-sysroot-native/usr/bin/riscv64-oe-linux/riscv64-oe-linux-ld: failed to merge target specific data of file /tmp/lto-llvm-264bc2.o +EXTRA_OECMAKE:append:riscv32:toolchain-clang = " -DTBB_ENABLE_IPO=OFF " +EXTRA_OECMAKE:append:riscv64:toolchain-clang = " -DTBB_ENABLE_IPO=OFF " + +# fails with thumb enabled: +# | arm-oe-linux-gnueabi-g++ -march=armv7-a -mthumb -mthumb-interwork -mfloat-abi=softfp -mfpu=neon -mtune=cortex-a9 -mcpu=cortex-a9 -D__ARM__ -D__LINUX_ARM_ARCH__=7 -funwind-tables -mvectorize-with-neon-quad -rdynamic --sysroot=/OE/sysroots/m14tv -c -MMD -DTBB_USE_DEBUG -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -O2 -pipe -g -feliminate-unused-debug-types -fpermissive -fvisibility-inlines-hidden -I../../src -I../../src/rml/include -I../../include ../../src/tbb/concurrent_queue.cpp +# | {standard input}: Assembler messages: +# | {standard input}:250: Error: thumb conditional instruction should be in IT block -- `strexeq r2,r3,[r4]' +# ... +# | make[1]: *** [concurrent_queue.o] Error 1 +ARM_INSTRUCTION_SET = "arm" + +ASNEEDED = "" + +LDFLAGS:append:mips = " -latomic" +LDFLAGS:append:mipsel = " -latomic" +LDFLAGS:append:riscv32:toolchain-clang = " -latomic" + +LDFLAGS:append:libc-musl = " -lucontext" + +# The latest version of oneTBB does not support PPC +COMPATIBLE_MACHINE:powerpc = "(!.*ppc).*" + + +do_install:append:class-target() { + # fix for qa check buildpaths + sed -i "s#${RECIPE_SYSROOT}##g" ${D}${libdir}/cmake/TBB/TBBTargets.cmake +} + + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/thin-provisioning-tools/thin-provisioning-tools-crates.inc b/sources/meta-openembedded/meta-oe/recipes-support/thin-provisioning-tools/thin-provisioning-tools-crates.inc index d71aa442..c5c059dd 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/thin-provisioning-tools/thin-provisioning-tools-crates.inc +++ b/sources/meta-openembedded/meta-oe/recipes-support/thin-provisioning-tools/thin-provisioning-tools-crates.inc @@ -3,212 +3,214 @@ # from Cargo.lock SRC_URI += " \ crate://crates.io/adler/1.0.2 \ - crate://crates.io/aho-corasick/1.1.2 \ - crate://crates.io/anstyle/1.0.6 \ - crate://crates.io/anyhow/1.0.80 \ + crate://crates.io/aho-corasick/1.1.3 \ + crate://crates.io/anstyle/1.0.7 \ + crate://crates.io/anyhow/1.0.86 \ crate://crates.io/atty/0.2.14 \ - crate://crates.io/autocfg/1.1.0 \ - crate://crates.io/base64/0.21.7 \ + crate://crates.io/autocfg/1.3.0 \ + crate://crates.io/base64/0.22.1 \ crate://crates.io/bitflags/1.3.2 \ - crate://crates.io/bitflags/2.4.2 \ - crate://crates.io/bytemuck/1.14.3 \ + crate://crates.io/bitflags/2.6.0 \ + crate://crates.io/bytemuck/1.16.1 \ crate://crates.io/byteorder/1.5.0 \ crate://crates.io/cassowary/0.3.0 \ crate://crates.io/cfg-if/1.0.0 \ - crate://crates.io/clap/4.5.1 \ - crate://crates.io/clap_builder/4.5.1 \ - crate://crates.io/clap_lex/0.7.0 \ + crate://crates.io/clap/4.5.9 \ + crate://crates.io/clap_builder/4.5.9 \ + crate://crates.io/clap_lex/0.7.1 \ crate://crates.io/console/0.15.8 \ - crate://crates.io/crc32c/0.6.5 \ - crate://crates.io/crc32fast/1.4.0 \ - crate://crates.io/data-encoding/2.5.0 \ + crate://crates.io/crc32c/0.6.8 \ + crate://crates.io/crc32fast/1.4.2 \ + crate://crates.io/data-encoding/2.6.0 \ crate://crates.io/downcast/0.11.0 \ crate://crates.io/duct/0.13.7 \ crate://crates.io/encode_unicode/0.3.6 \ crate://crates.io/env_logger/0.8.4 \ - crate://crates.io/errno/0.3.8 \ + crate://crates.io/errno/0.3.9 \ crate://crates.io/exitcode/1.1.2 \ - crate://crates.io/fastrand/2.0.1 \ + crate://crates.io/fastrand/2.1.0 \ crate://crates.io/fixedbitset/0.4.2 \ - crate://crates.io/flate2/1.0.28 \ + crate://crates.io/flate2/1.0.30 \ crate://crates.io/fragile/2.0.0 \ - crate://crates.io/getrandom/0.2.12 \ + crate://crates.io/getrandom/0.2.15 \ crate://crates.io/hermit-abi/0.1.19 \ - crate://crates.io/hermit-abi/0.3.6 \ + crate://crates.io/hermit-abi/0.3.9 \ crate://crates.io/indicatif/0.17.8 \ - crate://crates.io/instant/0.1.12 \ + crate://crates.io/instant/0.1.13 \ crate://crates.io/iovec/0.1.4 \ - crate://crates.io/lazy_static/1.4.0 \ - crate://crates.io/libc/0.2.153 \ - crate://crates.io/linux-raw-sys/0.4.13 \ - crate://crates.io/log/0.4.20 \ - crate://crates.io/memchr/2.7.1 \ + crate://crates.io/lazy_static/1.5.0 \ + crate://crates.io/libc/0.2.155 \ + crate://crates.io/linux-raw-sys/0.4.14 \ + crate://crates.io/log/0.4.22 \ + crate://crates.io/memchr/2.7.4 \ crate://crates.io/minimal-lexical/0.2.1 \ - crate://crates.io/miniz_oxide/0.7.2 \ + crate://crates.io/miniz_oxide/0.7.4 \ crate://crates.io/mockall/0.12.1 \ crate://crates.io/mockall_derive/0.12.1 \ crate://crates.io/nom/7.1.3 \ crate://crates.io/num-derive/0.4.2 \ - crate://crates.io/num-traits/0.2.18 \ + crate://crates.io/num-traits/0.2.19 \ crate://crates.io/num_cpus/1.16.0 \ crate://crates.io/number_prefix/0.4.0 \ crate://crates.io/numtoa/0.1.0 \ crate://crates.io/once_cell/1.19.0 \ - crate://crates.io/os_pipe/1.1.5 \ + crate://crates.io/os_pipe/1.2.0 \ crate://crates.io/portable-atomic/1.6.0 \ crate://crates.io/ppv-lite86/0.2.17 \ crate://crates.io/predicates/3.1.0 \ crate://crates.io/predicates-core/1.0.6 \ crate://crates.io/predicates-tree/1.0.9 \ - crate://crates.io/proc-macro2/1.0.78 \ - crate://crates.io/quick-xml/0.31.0 \ + crate://crates.io/proc-macro2/1.0.86 \ + crate://crates.io/quick-xml/0.36.0 \ crate://crates.io/quickcheck/1.0.3 \ crate://crates.io/quickcheck_macros/1.0.0 \ - crate://crates.io/quote/1.0.35 \ + crate://crates.io/quote/1.0.36 \ crate://crates.io/rand/0.8.5 \ crate://crates.io/rand_chacha/0.3.1 \ crate://crates.io/rand_core/0.6.4 \ - crate://crates.io/rangemap/1.5.0 \ + crate://crates.io/rangemap/1.5.1 \ crate://crates.io/redox_syscall/0.2.16 \ crate://crates.io/redox_termios/0.1.3 \ - crate://crates.io/regex/1.10.3 \ - crate://crates.io/regex-automata/0.4.5 \ - crate://crates.io/regex-syntax/0.8.2 \ - crate://crates.io/roaring/0.10.3 \ + crate://crates.io/regex/1.10.5 \ + crate://crates.io/regex-automata/0.4.7 \ + crate://crates.io/regex-syntax/0.8.4 \ + crate://crates.io/roaring/0.10.6 \ crate://crates.io/rustc_version/0.4.0 \ - crate://crates.io/rustix/0.38.31 \ + crate://crates.io/rustix/0.38.34 \ crate://crates.io/safemem/0.3.3 \ - crate://crates.io/semver/1.0.22 \ + crate://crates.io/semver/1.0.23 \ crate://crates.io/shared_child/1.0.0 \ - crate://crates.io/strsim/0.11.0 \ + crate://crates.io/strsim/0.11.1 \ crate://crates.io/syn/1.0.109 \ - crate://crates.io/syn/2.0.50 \ - crate://crates.io/tempfile/3.10.0 \ + crate://crates.io/syn/2.0.70 \ + crate://crates.io/tempfile/3.10.1 \ crate://crates.io/termion/1.5.6 \ crate://crates.io/termtree/0.4.1 \ - crate://crates.io/thiserror/1.0.57 \ - crate://crates.io/thiserror-impl/1.0.57 \ + crate://crates.io/thiserror/1.0.61 \ + crate://crates.io/thiserror-impl/1.0.61 \ crate://crates.io/threadpool/1.8.1 \ crate://crates.io/tui/0.19.0 \ crate://crates.io/unicode-ident/1.0.12 \ crate://crates.io/unicode-segmentation/1.11.0 \ - crate://crates.io/unicode-width/0.1.11 \ + crate://crates.io/unicode-width/0.1.13 \ crate://crates.io/wasi/0.11.0+wasi-snapshot-preview1 \ crate://crates.io/winapi/0.3.9 \ crate://crates.io/winapi-i686-pc-windows-gnu/0.4.0 \ crate://crates.io/winapi-x86_64-pc-windows-gnu/0.4.0 \ crate://crates.io/windows-sys/0.52.0 \ - crate://crates.io/windows-targets/0.52.3 \ - crate://crates.io/windows_aarch64_gnullvm/0.52.3 \ - crate://crates.io/windows_aarch64_msvc/0.52.3 \ - crate://crates.io/windows_i686_gnu/0.52.3 \ - crate://crates.io/windows_i686_msvc/0.52.3 \ - crate://crates.io/windows_x86_64_gnu/0.52.3 \ - crate://crates.io/windows_x86_64_gnullvm/0.52.3 \ - crate://crates.io/windows_x86_64_msvc/0.52.3 \ + crate://crates.io/windows-targets/0.52.6 \ + crate://crates.io/windows_aarch64_gnullvm/0.52.6 \ + crate://crates.io/windows_aarch64_msvc/0.52.6 \ + crate://crates.io/windows_i686_gnu/0.52.6 \ + crate://crates.io/windows_i686_gnullvm/0.52.6 \ + crate://crates.io/windows_i686_msvc/0.52.6 \ + crate://crates.io/windows_x86_64_gnu/0.52.6 \ + crate://crates.io/windows_x86_64_gnullvm/0.52.6 \ + crate://crates.io/windows_x86_64_msvc/0.52.6 \ " SRC_URI[adler-1.0.2.sha256sum] = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" -SRC_URI[aho-corasick-1.1.2.sha256sum] = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" -SRC_URI[anstyle-1.0.6.sha256sum] = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" -SRC_URI[anyhow-1.0.80.sha256sum] = "5ad32ce52e4161730f7098c077cd2ed6229b5804ccf99e5366be1ab72a98b4e1" +SRC_URI[aho-corasick-1.1.3.sha256sum] = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +SRC_URI[anstyle-1.0.7.sha256sum] = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" +SRC_URI[anyhow-1.0.86.sha256sum] = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" SRC_URI[atty-0.2.14.sha256sum] = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -SRC_URI[autocfg-1.1.0.sha256sum] = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" -SRC_URI[base64-0.21.7.sha256sum] = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" +SRC_URI[autocfg-1.3.0.sha256sum] = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +SRC_URI[base64-0.22.1.sha256sum] = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" SRC_URI[bitflags-1.3.2.sha256sum] = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" -SRC_URI[bitflags-2.4.2.sha256sum] = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" -SRC_URI[bytemuck-1.14.3.sha256sum] = "a2ef034f05691a48569bd920a96c81b9d91bbad1ab5ac7c4616c1f6ef36cb79f" +SRC_URI[bitflags-2.6.0.sha256sum] = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +SRC_URI[bytemuck-1.16.1.sha256sum] = "b236fc92302c97ed75b38da1f4917b5cdda4984745740f153a5d3059e48d725e" SRC_URI[byteorder-1.5.0.sha256sum] = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" SRC_URI[cassowary-0.3.0.sha256sum] = "df8670b8c7b9dae1793364eafadf7239c40d669904660c5960d74cfd80b46a53" SRC_URI[cfg-if-1.0.0.sha256sum] = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" -SRC_URI[clap-4.5.1.sha256sum] = "c918d541ef2913577a0f9566e9ce27cb35b6df072075769e0b26cb5a554520da" -SRC_URI[clap_builder-4.5.1.sha256sum] = "9f3e7391dad68afb0c2ede1bf619f579a3dc9c2ec67f089baa397123a2f3d1eb" -SRC_URI[clap_lex-0.7.0.sha256sum] = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" +SRC_URI[clap-4.5.9.sha256sum] = "64acc1846d54c1fe936a78dc189c34e28d3f5afc348403f28ecf53660b9b8462" +SRC_URI[clap_builder-4.5.9.sha256sum] = "6fb8393d67ba2e7bfaf28a23458e4e2b543cc73a99595511eb207fdb8aede942" +SRC_URI[clap_lex-0.7.1.sha256sum] = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70" SRC_URI[console-0.15.8.sha256sum] = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" -SRC_URI[crc32c-0.6.5.sha256sum] = "89254598aa9b9fa608de44b3ae54c810f0f06d755e24c50177f1f8f31ff50ce2" -SRC_URI[crc32fast-1.4.0.sha256sum] = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" -SRC_URI[data-encoding-2.5.0.sha256sum] = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" +SRC_URI[crc32c-0.6.8.sha256sum] = "3a47af21622d091a8f0fb295b88bc886ac74efcc613efc19f5d0b21de5c89e47" +SRC_URI[crc32fast-1.4.2.sha256sum] = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" +SRC_URI[data-encoding-2.6.0.sha256sum] = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" SRC_URI[downcast-0.11.0.sha256sum] = "1435fa1053d8b2fbbe9be7e97eca7f33d37b28409959813daefc1446a14247f1" SRC_URI[duct-0.13.7.sha256sum] = "e4ab5718d1224b63252cd0c6f74f6480f9ffeb117438a2e0f5cf6d9a4798929c" SRC_URI[encode_unicode-0.3.6.sha256sum] = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" SRC_URI[env_logger-0.8.4.sha256sum] = "a19187fea3ac7e84da7dacf48de0c45d63c6a76f9490dae389aead16c243fce3" -SRC_URI[errno-0.3.8.sha256sum] = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +SRC_URI[errno-0.3.9.sha256sum] = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" SRC_URI[exitcode-1.1.2.sha256sum] = "de853764b47027c2e862a995c34978ffa63c1501f2e15f987ba11bd4f9bba193" -SRC_URI[fastrand-2.0.1.sha256sum] = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" +SRC_URI[fastrand-2.1.0.sha256sum] = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" SRC_URI[fixedbitset-0.4.2.sha256sum] = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" -SRC_URI[flate2-1.0.28.sha256sum] = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" +SRC_URI[flate2-1.0.30.sha256sum] = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" SRC_URI[fragile-2.0.0.sha256sum] = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" -SRC_URI[getrandom-0.2.12.sha256sum] = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" +SRC_URI[getrandom-0.2.15.sha256sum] = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" SRC_URI[hermit-abi-0.1.19.sha256sum] = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -SRC_URI[hermit-abi-0.3.6.sha256sum] = "bd5256b483761cd23699d0da46cc6fd2ee3be420bbe6d020ae4a091e70b7e9fd" +SRC_URI[hermit-abi-0.3.9.sha256sum] = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" SRC_URI[indicatif-0.17.8.sha256sum] = "763a5a8f45087d6bcea4222e7b72c291a054edf80e4ef6efd2a4979878c7bea3" -SRC_URI[instant-0.1.12.sha256sum] = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +SRC_URI[instant-0.1.13.sha256sum] = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" SRC_URI[iovec-0.1.4.sha256sum] = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" -SRC_URI[lazy_static-1.4.0.sha256sum] = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -SRC_URI[libc-0.2.153.sha256sum] = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" -SRC_URI[linux-raw-sys-0.4.13.sha256sum] = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" -SRC_URI[log-0.4.20.sha256sum] = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" -SRC_URI[memchr-2.7.1.sha256sum] = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" +SRC_URI[lazy_static-1.5.0.sha256sum] = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +SRC_URI[libc-0.2.155.sha256sum] = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" +SRC_URI[linux-raw-sys-0.4.14.sha256sum] = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +SRC_URI[log-0.4.22.sha256sum] = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" +SRC_URI[memchr-2.7.4.sha256sum] = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" SRC_URI[minimal-lexical-0.2.1.sha256sum] = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" -SRC_URI[miniz_oxide-0.7.2.sha256sum] = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" +SRC_URI[miniz_oxide-0.7.4.sha256sum] = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" SRC_URI[mockall-0.12.1.sha256sum] = "43766c2b5203b10de348ffe19f7e54564b64f3d6018ff7648d1e2d6d3a0f0a48" SRC_URI[mockall_derive-0.12.1.sha256sum] = "af7cbce79ec385a1d4f54baa90a76401eb15d9cab93685f62e7e9f942aa00ae2" SRC_URI[nom-7.1.3.sha256sum] = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" SRC_URI[num-derive-0.4.2.sha256sum] = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" -SRC_URI[num-traits-0.2.18.sha256sum] = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" +SRC_URI[num-traits-0.2.19.sha256sum] = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" SRC_URI[num_cpus-1.16.0.sha256sum] = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" SRC_URI[number_prefix-0.4.0.sha256sum] = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" SRC_URI[numtoa-0.1.0.sha256sum] = "b8f8bdf33df195859076e54ab11ee78a1b208382d3a26ec40d142ffc1ecc49ef" SRC_URI[once_cell-1.19.0.sha256sum] = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" -SRC_URI[os_pipe-1.1.5.sha256sum] = "57119c3b893986491ec9aa85056780d3a0f3cf4da7cc09dd3650dbd6c6738fb9" +SRC_URI[os_pipe-1.2.0.sha256sum] = "29d73ba8daf8fac13b0501d1abeddcfe21ba7401ada61a819144b6c2a4f32209" SRC_URI[portable-atomic-1.6.0.sha256sum] = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" SRC_URI[ppv-lite86-0.2.17.sha256sum] = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" SRC_URI[predicates-3.1.0.sha256sum] = "68b87bfd4605926cdfefc1c3b5f8fe560e3feca9d5552cf68c466d3d8236c7e8" SRC_URI[predicates-core-1.0.6.sha256sum] = "b794032607612e7abeb4db69adb4e33590fa6cf1149e95fd7cb00e634b92f174" SRC_URI[predicates-tree-1.0.9.sha256sum] = "368ba315fb8c5052ab692e68a0eefec6ec57b23a36959c14496f0b0df2c0cecf" -SRC_URI[proc-macro2-1.0.78.sha256sum] = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" -SRC_URI[quick-xml-0.31.0.sha256sum] = "1004a344b30a54e2ee58d66a71b32d2db2feb0a31f9a2d302bf0536f15de2a33" +SRC_URI[proc-macro2-1.0.86.sha256sum] = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +SRC_URI[quick-xml-0.36.0.sha256sum] = "4091e032efecb09d7b1f711f487b85ab925632a842627e3200fb088382cde32c" SRC_URI[quickcheck-1.0.3.sha256sum] = "588f6378e4dd99458b60ec275b4477add41ce4fa9f64dcba6f15adccb19b50d6" SRC_URI[quickcheck_macros-1.0.0.sha256sum] = "b22a693222d716a9587786f37ac3f6b4faedb5b80c23914e7303ff5a1d8016e9" -SRC_URI[quote-1.0.35.sha256sum] = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +SRC_URI[quote-1.0.36.sha256sum] = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" SRC_URI[rand-0.8.5.sha256sum] = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" SRC_URI[rand_chacha-0.3.1.sha256sum] = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" SRC_URI[rand_core-0.6.4.sha256sum] = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -SRC_URI[rangemap-1.5.0.sha256sum] = "795915a3930a5d6bafd9053d37602fea3e61be2e5d4d788983a8ba9654c1c6f2" +SRC_URI[rangemap-1.5.1.sha256sum] = "f60fcc7d6849342eff22c4350c8b9a989ee8ceabc4b481253e8946b9fe83d684" SRC_URI[redox_syscall-0.2.16.sha256sum] = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" SRC_URI[redox_termios-0.1.3.sha256sum] = "20145670ba436b55d91fc92d25e71160fbfbdd57831631c8d7d36377a476f1cb" -SRC_URI[regex-1.10.3.sha256sum] = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" -SRC_URI[regex-automata-0.4.5.sha256sum] = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd" -SRC_URI[regex-syntax-0.8.2.sha256sum] = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" -SRC_URI[roaring-0.10.3.sha256sum] = "a1c77081a55300e016cb86f2864415b7518741879db925b8d488a0ee0d2da6bf" +SRC_URI[regex-1.10.5.sha256sum] = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" +SRC_URI[regex-automata-0.4.7.sha256sum] = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +SRC_URI[regex-syntax-0.8.4.sha256sum] = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" +SRC_URI[roaring-0.10.6.sha256sum] = "8f4b84ba6e838ceb47b41de5194a60244fac43d9fe03b71dbe8c5a201081d6d1" SRC_URI[rustc_version-0.4.0.sha256sum] = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" -SRC_URI[rustix-0.38.31.sha256sum] = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" +SRC_URI[rustix-0.38.34.sha256sum] = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" SRC_URI[safemem-0.3.3.sha256sum] = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072" -SRC_URI[semver-1.0.22.sha256sum] = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" +SRC_URI[semver-1.0.23.sha256sum] = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" SRC_URI[shared_child-1.0.0.sha256sum] = "b0d94659ad3c2137fef23ae75b03d5241d633f8acded53d672decfa0e6e0caef" -SRC_URI[strsim-0.11.0.sha256sum] = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01" +SRC_URI[strsim-0.11.1.sha256sum] = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" SRC_URI[syn-1.0.109.sha256sum] = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -SRC_URI[syn-2.0.50.sha256sum] = "74f1bdc9872430ce9b75da68329d1c1746faf50ffac5f19e02b71e37ff881ffb" -SRC_URI[tempfile-3.10.0.sha256sum] = "a365e8cd18e44762ef95d87f284f4b5cd04107fec2ff3052bd6a3e6069669e67" +SRC_URI[syn-2.0.70.sha256sum] = "2f0209b68b3613b093e0ec905354eccaedcfe83b8cb37cbdeae64026c3064c16" +SRC_URI[tempfile-3.10.1.sha256sum] = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" SRC_URI[termion-1.5.6.sha256sum] = "077185e2eac69c3f8379a4298e1e07cd36beb962290d4a51199acf0fdc10607e" SRC_URI[termtree-0.4.1.sha256sum] = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" -SRC_URI[thiserror-1.0.57.sha256sum] = "1e45bcbe8ed29775f228095caf2cd67af7a4ccf756ebff23a306bf3e8b47b24b" -SRC_URI[thiserror-impl-1.0.57.sha256sum] = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" +SRC_URI[thiserror-1.0.61.sha256sum] = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" +SRC_URI[thiserror-impl-1.0.61.sha256sum] = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" SRC_URI[threadpool-1.8.1.sha256sum] = "d050e60b33d41c19108b32cea32164033a9013fe3b46cbd4457559bfbf77afaa" SRC_URI[tui-0.19.0.sha256sum] = "ccdd26cbd674007e649a272da4475fb666d3aa0ad0531da7136db6fab0e5bad1" SRC_URI[unicode-ident-1.0.12.sha256sum] = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" SRC_URI[unicode-segmentation-1.11.0.sha256sum] = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" -SRC_URI[unicode-width-0.1.11.sha256sum] = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" +SRC_URI[unicode-width-0.1.13.sha256sum] = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" SRC_URI[wasi-0.11.0+wasi-snapshot-preview1.sha256sum] = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" SRC_URI[winapi-0.3.9.sha256sum] = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" SRC_URI[winapi-i686-pc-windows-gnu-0.4.0.sha256sum] = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" SRC_URI[winapi-x86_64-pc-windows-gnu-0.4.0.sha256sum] = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" SRC_URI[windows-sys-0.52.0.sha256sum] = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -SRC_URI[windows-targets-0.52.3.sha256sum] = "d380ba1dc7187569a8a9e91ed34b8ccfc33123bbacb8c0aed2d1ad7f3ef2dc5f" -SRC_URI[windows_aarch64_gnullvm-0.52.3.sha256sum] = "68e5dcfb9413f53afd9c8f86e56a7b4d86d9a2fa26090ea2dc9e40fba56c6ec6" -SRC_URI[windows_aarch64_msvc-0.52.3.sha256sum] = "8dab469ebbc45798319e69eebf92308e541ce46760b49b18c6b3fe5e8965b30f" -SRC_URI[windows_i686_gnu-0.52.3.sha256sum] = "2a4e9b6a7cac734a8b4138a4e1044eac3404d8326b6c0f939276560687a033fb" -SRC_URI[windows_i686_msvc-0.52.3.sha256sum] = "28b0ec9c422ca95ff34a78755cfa6ad4a51371da2a5ace67500cf7ca5f232c58" -SRC_URI[windows_x86_64_gnu-0.52.3.sha256sum] = "704131571ba93e89d7cd43482277d6632589b18ecf4468f591fbae0a8b101614" -SRC_URI[windows_x86_64_gnullvm-0.52.3.sha256sum] = "42079295511643151e98d61c38c0acc444e52dd42ab456f7ccfd5152e8ecf21c" -SRC_URI[windows_x86_64_msvc-0.52.3.sha256sum] = "0770833d60a970638e989b3fa9fd2bb1aaadcf88963d1659fd7d9990196ed2d6" +SRC_URI[windows-targets-0.52.6.sha256sum] = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +SRC_URI[windows_aarch64_gnullvm-0.52.6.sha256sum] = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" +SRC_URI[windows_aarch64_msvc-0.52.6.sha256sum] = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" +SRC_URI[windows_i686_gnu-0.52.6.sha256sum] = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" +SRC_URI[windows_i686_gnullvm-0.52.6.sha256sum] = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" +SRC_URI[windows_i686_msvc-0.52.6.sha256sum] = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" +SRC_URI[windows_x86_64_gnu-0.52.6.sha256sum] = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" +SRC_URI[windows_x86_64_gnullvm-0.52.6.sha256sum] = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" +SRC_URI[windows_x86_64_msvc-0.52.6.sha256sum] = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/thin-provisioning-tools/thin-provisioning-tools_1.0.12.bb b/sources/meta-openembedded/meta-oe/recipes-support/thin-provisioning-tools/thin-provisioning-tools_1.0.12.bb deleted file mode 100644 index 51b4b3dc..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/thin-provisioning-tools/thin-provisioning-tools_1.0.12.bb +++ /dev/null @@ -1,52 +0,0 @@ -SUMMARY = "Tools of dm-thin device-mapper" -DESCRIPTION = "A suite of tools for manipulating the metadata of the dm-thin device-mapper target." -HOMEPAGE = "https://github.com/jthornber/thin-provisioning-tools" -LICENSE = "GPL-3.0-only" -SECTION = "devel" - -LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" -S = "${WORKDIR}/git" - -SRC_URI = " \ - git://github.com/jthornber/thin-provisioning-tools;branch=main;protocol=https \ - " - -SRCREV = "b2d57dad4c3378544d7b36f3fc61e60989c5c092" -UPSTREAM_CHECK_GITTAGREGEX = "v(?P\d+(\.\d+)+)" - -inherit cargo cargo-update-recipe-crates - -require ${BPN}-crates.inc -require ${BPN}-git-crates.inc - -do_install:append() { - install -d ${D}${sbindir} - mv ${D}${bindir}/pdata_tools ${D}${sbindir}/pdata_tools - rmdir --ignore-fail-on-non-empty ${D}${bindir} - - for tool in cache_check \ - cache_dump \ - cache_metadata_size \ - cache_repair \ - cache_restore \ - cache_writeback \ - thin_check \ - thin_delta \ - thin_dump \ - thin_ls \ - thin_metadata_size \ - thin_metadata_pack \ - thin_metadata_unpack \ - thin_repair \ - thin_restore \ - thin_rmap \ - thin_shrink \ - thin_trim \ - era_check \ - era_dump \ - era_invalidate \ - era_repair \ - era_restore; do - ln -sf pdata_tools ${D}${sbindir}/$tool - done -} diff --git a/sources/meta-openembedded/meta-oe/recipes-support/thin-provisioning-tools/thin-provisioning-tools_1.0.13.bb b/sources/meta-openembedded/meta-oe/recipes-support/thin-provisioning-tools/thin-provisioning-tools_1.0.13.bb new file mode 100644 index 00000000..1d3c7972 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/thin-provisioning-tools/thin-provisioning-tools_1.0.13.bb @@ -0,0 +1,52 @@ +SUMMARY = "Tools of dm-thin device-mapper" +DESCRIPTION = "A suite of tools for manipulating the metadata of the dm-thin device-mapper target." +HOMEPAGE = "https://github.com/jthornber/thin-provisioning-tools" +LICENSE = "GPL-3.0-only" +SECTION = "devel" + +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" +S = "${WORKDIR}/git" + +SRC_URI = " \ + git://github.com/jthornber/thin-provisioning-tools;branch=main;protocol=https \ + " + +SRCREV = "116c05345bed5fe727992c3458311606d5443ff6" +UPSTREAM_CHECK_GITTAGREGEX = "v(?P\d+(\.\d+)+)" + +inherit cargo cargo-update-recipe-crates + +require ${BPN}-crates.inc +require ${BPN}-git-crates.inc + +do_install:append() { + install -d ${D}${sbindir} + mv ${D}${bindir}/pdata_tools ${D}${sbindir}/pdata_tools + rmdir --ignore-fail-on-non-empty ${D}${bindir} + + for tool in cache_check \ + cache_dump \ + cache_metadata_size \ + cache_repair \ + cache_restore \ + cache_writeback \ + thin_check \ + thin_delta \ + thin_dump \ + thin_ls \ + thin_metadata_size \ + thin_metadata_pack \ + thin_metadata_unpack \ + thin_repair \ + thin_restore \ + thin_rmap \ + thin_shrink \ + thin_trim \ + era_check \ + era_dump \ + era_invalidate \ + era_repair \ + era_restore; do + ln -sf pdata_tools ${D}${sbindir}/$tool + done +} diff --git a/sources/meta-openembedded/meta-oe/recipes-support/tree/tree_2.1.1.bb b/sources/meta-openembedded/meta-oe/recipes-support/tree/tree_2.1.1.bb deleted file mode 100644 index 1eaea6a2..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/tree/tree_2.1.1.bb +++ /dev/null @@ -1,20 +0,0 @@ -SUMMARY = "A recursive directory listing command" -HOMEPAGE = "https://oldmanprogrammer.net/source.php?dir=projects/tree" -SECTION = "console/utils" -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://LICENSE;md5=393a5ca445f6965873eca0259a17f833" - -SRC_URI = "https://oldmanprogrammer.net/tar/tree/${BP}.tgz" -SRC_URI[sha256sum] = "d3c3d55f403af7c76556546325aa1eca90b918cbaaf6d3ab60a49d8367ab90d5" - -# tree's default CFLAGS for Linux -CFLAGS += "-Wall -DLINUX -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" - -EXTRA_OEMAKE = "CC='${CC}' CFLAGS='${CFLAGS}' LDFLAGS='${LDFLAGS}'" - -do_configure[noexec] = "1" - -do_install() { - install -d ${D}${bindir} - install -m 0755 ${S}/${BPN} ${D}${bindir}/ -} diff --git a/sources/meta-openembedded/meta-oe/recipes-support/tree/tree_2.1.3.bb b/sources/meta-openembedded/meta-oe/recipes-support/tree/tree_2.1.3.bb new file mode 100644 index 00000000..79e0d5e1 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/tree/tree_2.1.3.bb @@ -0,0 +1,20 @@ +SUMMARY = "A recursive directory listing command" +HOMEPAGE = "https://oldmanprogrammer.net/source.php?dir=projects/tree" +SECTION = "console/utils" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://LICENSE;md5=393a5ca445f6965873eca0259a17f833" + +SRC_URI = "https://oldmanprogrammer.net/tar/tree/${BP}.tgz" +SRC_URI[sha256sum] = "c24c9bfbbb3bd31a43b16898f74fd338cfcf348e914de81438ddfcf052076ff4" + +# tree's default CFLAGS for Linux +CFLAGS += "-Wall -DLINUX -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" + +EXTRA_OEMAKE = "CC='${CC}' CFLAGS='${CFLAGS}' LDFLAGS='${LDFLAGS}'" + +do_configure[noexec] = "1" + +do_install() { + install -d ${D}${bindir} + install -m 0755 ${S}/${BPN} ${D}${bindir}/ +} diff --git a/sources/meta-openembedded/meta-oe/recipes-support/udisks/udisks2/CVE-2025-6019.patch b/sources/meta-openembedded/meta-oe/recipes-support/udisks/udisks2/CVE-2025-6019.patch deleted file mode 100644 index 2e94c849..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/udisks/udisks2/CVE-2025-6019.patch +++ /dev/null @@ -1,51 +0,0 @@ -From d0d04a381036b79df91616552706d515639bb762 Mon Sep 17 00:00:00 2001 -From: Tomas Bzatek -Date: Wed, 4 Jun 2025 15:26:46 +0200 -Subject: [PATCH] udiskslinuxfilesystemhelpers: Mount private mounts with - 'nodev,nosuid' - -The private mount done in take_filesystem_ownership() should always -default to 'nodev,nosuid' for security and 'errors=remount-ro' for -selected filesystem types to handle an corrupted filesystem. This is -consistent with mount options calculation for regular mounts. - -CVE: CVE-2025-6019 -Upstream-Status: Backport [ https://github.com/storaged-project/udisks/commit/5e7277debea926370e587408517560afe87d28c9 ] - -Signed-off-by: Changqing Li ---- - src/udiskslinuxfilesystemhelpers.c | 10 +++++++++- - 1 file changed, 9 insertions(+), 1 deletion(-) - -diff --git a/src/udiskslinuxfilesystemhelpers.c b/src/udiskslinuxfilesystemhelpers.c -index 7c5fc037..9eb7742c 100644 ---- a/src/udiskslinuxfilesystemhelpers.c -+++ b/src/udiskslinuxfilesystemhelpers.c -@@ -123,6 +123,7 @@ take_filesystem_ownership (const gchar *device, - - { - gchar *mountpoint = NULL; -+ const gchar *mount_opts; - GError *local_error = NULL; - gboolean unmount = FALSE; - gboolean success = TRUE; -@@ -151,8 +152,15 @@ take_filesystem_ownership (const gchar *device, - goto out; - } - -+ mount_opts = "nodev,nosuid"; -+ if (g_strcmp0 (fstype, "ext2") == 0 || -+ g_strcmp0 (fstype, "ext3") == 0 || -+ g_strcmp0 (fstype, "ext4") == 0 || -+ g_strcmp0 (fstype, "jfs") == 0) -+ mount_opts = "nodev,nosuid,errors=remount-ro"; -+ - /* TODO: mount to a private mount namespace */ -- if (!bd_fs_mount (device, mountpoint, fstype, NULL, NULL, &local_error)) -+ if (!bd_fs_mount (device, mountpoint, fstype, mount_opts, NULL, &local_error)) - { - g_set_error (error, UDISKS_ERROR, UDISKS_ERROR_FAILED, - "Cannot mount %s at %s: %s", --- -2.34.1 - diff --git a/sources/meta-openembedded/meta-oe/recipes-support/udisks/udisks2_2.10.1.bb b/sources/meta-openembedded/meta-oe/recipes-support/udisks/udisks2_2.10.1.bb index 206de3c0..cb1cbe67 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/udisks/udisks2_2.10.1.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/udisks/udisks2_2.10.1.bb @@ -20,7 +20,6 @@ RDEPENDS:${PN} = "acl" SRC_URI = " \ git://github.com/storaged-project/udisks.git;branch=2.10.x-branch;protocol=https \ file://0001-Makefile.am-Dont-include-buildpath.patch \ - file://CVE-2025-6019.patch \ " SRCREV = "18c9faf089e306ad6f3f51f5cb887a6b9aa08350" S = "${WORKDIR}/git" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/uhubctl/uhubctl_2.5.0.bb b/sources/meta-openembedded/meta-oe/recipes-support/uhubctl/uhubctl_2.5.0.bb deleted file mode 100644 index 8b334dbd..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/uhubctl/uhubctl_2.5.0.bb +++ /dev/null @@ -1,21 +0,0 @@ -SUMMARY = "USB hub per-port power control" -HOMEPAGE = "https://github.com/mvp/uhubctl" -BUGTRACKER = "https://github.com/mvp/uhubctl/issues" -DEPENDS = "libusb1" - -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" - -SRCREV = "20276ad5ced147d018e2b3fccedabd94597aa25e" -SRC_URI = "git://github.com/mvp/${BPN};branch=master;protocol=https" -S = "${WORKDIR}/git" - -# uhubctl gets its program version from "git describe". As we use the source -# archive do reduce download size replace the call with our hardcoded version. -do_configure:append() { - sed -i "s/^\(GIT_VERSION :=\).*$/\1 ${PV}/g" ${S}/Makefile -} - -do_install () { - oe_runmake install DESTDIR=${D} -} diff --git a/sources/meta-openembedded/meta-oe/recipes-support/uhubctl/uhubctl_2.6.0.bb b/sources/meta-openembedded/meta-oe/recipes-support/uhubctl/uhubctl_2.6.0.bb new file mode 100644 index 00000000..1a1d4ec3 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/uhubctl/uhubctl_2.6.0.bb @@ -0,0 +1,21 @@ +SUMMARY = "USB hub per-port power control" +HOMEPAGE = "https://github.com/mvp/uhubctl" +BUGTRACKER = "https://github.com/mvp/uhubctl/issues" +DEPENDS = "libusb1" + +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +SRCREV = "352f5878e999c0a9d5a453b34110479b2056d7e7" +SRC_URI = "git://github.com/mvp/${BPN};branch=master;protocol=https" +S = "${WORKDIR}/git" + +# uhubctl gets its program version from "git describe". As we use the source +# archive do reduce download size replace the call with our hardcoded version. +do_configure:append() { + sed -i "s/^\(GIT_VERSION :=\).*$/\1 ${PV}/g" ${S}/Makefile +} + +do_install () { + oe_runmake install DESTDIR=${D} +} diff --git a/sources/meta-openembedded/meta-oe/recipes-support/uim/uim/0001-Fix-to-set-libedit-path-from-configure-option-proper.patch b/sources/meta-openembedded/meta-oe/recipes-support/uim/uim/0001-Fix-to-set-libedit-path-from-configure-option-proper.patch deleted file mode 100644 index 34a1ea0f..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/uim/uim/0001-Fix-to-set-libedit-path-from-configure-option-proper.patch +++ /dev/null @@ -1,29 +0,0 @@ -From f828a89cc1e956d56498422ec158d284fc97de3f Mon Sep 17 00:00:00 2001 -From: OBATA Akio -Date: Fri, 10 Aug 2018 18:38:18 +0900 -Subject: [PATCH] Fix to set libedit path from configure option properly - -Upstream-Status: Backport [https://github.com/uim/uim/pull/134] -Signed-off-by: Khem Raj - ---- - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index 00d1b02..9c0a5ec 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -1311,8 +1311,8 @@ if test "x$with_libedit" != xno; then - if test "x$with_libedit" = xyes; then - libedit_path=/usr - else -- with_libedit=yes - libedit_path="$with_libedit" -+ with_libedit=yes - fi - - saved_CPPFLAGS=$CPPFLAGS --- -2.23.0 - diff --git a/sources/meta-openembedded/meta-oe/recipes-support/uim/uim/JMP_BUF_GC_jmp_buf.patch b/sources/meta-openembedded/meta-oe/recipes-support/uim/uim/JMP_BUF_GC_jmp_buf.patch deleted file mode 100644 index adb9c4b0..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/uim/uim/JMP_BUF_GC_jmp_buf.patch +++ /dev/null @@ -1,15 +0,0 @@ -Fix error pointed out by gcc10 - -Upstream-Status: Pending -Signed-off-by: Khem Raj ---- a/sigscheme/libgcroots/include/private/gc_priv.h -+++ b/sigscheme/libgcroots/include/private/gc_priv.h -@@ -2026,7 +2026,7 @@ void GC_err_puts(const char *s); - - # if defined(NEED_FIND_LIMIT) || \ - defined(USE_PROC_FOR_LIBRARIES) && defined(THREADS) --JMP_BUF GC_jmp_buf; -+extern JMP_BUF GC_jmp_buf; - - /* Set up a handler for address faults which will longjmp to */ - /* GC_jmp_buf; */ diff --git a/sources/meta-openembedded/meta-oe/recipes-support/uim/uim_1.8.8.bb b/sources/meta-openembedded/meta-oe/recipes-support/uim/uim_1.8.8.bb deleted file mode 100644 index e0d9d05d..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/uim/uim_1.8.8.bb +++ /dev/null @@ -1,157 +0,0 @@ -DESCRIPTION = "A multilingual user input method library" -HOMEPAGE = "http://uim.freedesktop.org/" -LICENSE = "BSD-3-Clause & LGPL-2.0-or-later" -LIC_FILES_CHKSUM = "file://COPYING;md5=ab2826b41ca0ff4030d38cc39791d1c8" -SECTION = "inputmethods" - -SRC_URI = "https://github.com/uim/uim/releases/download/${PV}/uim-${PV}.tar.bz2 \ - file://0001-Fix-to-set-libedit-path-from-configure-option-proper.patch \ - file://JMP_BUF_GC_jmp_buf.patch \ -" -SRC_URI:append:class-target = "\ - file://uim-module-manager.patch \ -" -SRC_URI[md5sum] = "01c7bd5d0d4f3a9f6f5befe6f57a470b" -SRC_URI[sha256sum] = "34599bbcc4e5ab87832370763e38be5100984a64237555e9234a1ea225a0fadc" - -UPSTREAM_CHECK_URI = "https://github.com/${BPN}/${BPN}/releases" - -DEPENDS = "anthy fontconfig libxft libxt glib-2.0 ncurses intltool libedit" -DEPENDS:append:class-target = " intltool-native gtk+ gtk+3 uim-native" - -RDEPENDS:uim = "libuim0 libedit" -RDEPENDS:uim-anthy = "anthy libanthy0" -RDEPENDS:uim-anthy:append:libc-glibc = " glibc-utils glibc-gconv-euc-jp" - -LEAD_SONAME = "libuim.so.1" - -COMPATIBLE_HOST:riscv64 = "null" -COMPATIBLE_HOST:riscv32 = "null" - -inherit features_check autotools pkgconfig gettext qemu gtk-immodules-cache - -REQUIRED_DISTRO_FEATURES = "x11" - -GTKIMMODULES_PACKAGES = "uim-gtk2.0 uim-gtk3" - -EXTRA_OECONF += "--disable-emacs \ - --with-libedit=${STAGING_EXECPREFIXDIR} \ - --without-scim \ - --without-m17nlib \ - --without-prime \ - --without-canna \ - --without-mana \ - --without-eb \ -" - -CONFIGUREOPTS:remove:class-target = "--disable-silent-rules" - -# https://github.com/uim/uim/issues/44 -PARALLEL_MAKE = "" - -#Because m4 file's find maxdepth=2, so copy the m4 files of the deep depth. -do_configure:prepend () { - rm -rf ${S}/m4.generated/lt*.m4 ${S}/m4.generated/libtool.m4 - rm -rf ${S}/sigscheme/libgcroots/m4/lt*.m4 ${S}/sigscheme/libgcroots/m4/libtool.m4 - rm -rf ${S}/sigscheme/m4/lt*.m4 ${S}/sigscheme/m4/libtool.m4 - cp ${S}/sigscheme/m4/* ${S}/m4/ -} - -do_install:append() { - rm -rf ${D}/${datadir}/applications -} - -PACKAGES =+ "uim-xim uim-utils uim-skk uim-gtk2.0 uim-gtk3 uim-fep uim-anthy uim-common libuim0 libuim-dev" - -FILES:${PN} = "${bindir}/uim-help \ - ${libdir}/uim/plugin/libuim-* \ - ${libdir}/libuim-scm* \ - ${libdir}/libgcroots* \ - ${libdir}/uim/plugin/libuim-* \ -" - -FILES:libuim0 = "${libdir}/uim/plugin/libuim-custom-enabler.* \ - ${libdir}/libuim-custom.so.* \ - ${datadir}/locale/ja/LC_MESSAGES/uim.mo \ - ${datadir}/locale/fr/LC_MESSAGES/uim.mo \ - ${datadir}/locale/ko/LC_MESSAGES/uim.mo \ - ${libdir}/libuim.so.* \ -" -FILES:libuim-dev = "${libdir}/libuim*.a \ - ${libdir}/libuim*.la \ - ${libdir}/libuim*.so \ - ${includedir}/uim \ - ${libdir}/pkgconfig/uim.pc \ -" -FILES:uim-anthy = "${libdir}/uim/plugin/libuim-anthy.* \ - ${datadir}/uim/anthy*.scm \ -" -FILES:${PN}-dbg += "${libdir}/*/*/*/.debug ${libdir}/*/*/.debug" -FILES:${PN}-dev += "${libdir}/uim/plugin/*.la" - -FILES:uim-utils = "${bindir}/uim-sh \ - ${bindir}/uim-module-manager \ - ${libexecdir}/uim-helper-server \ -" -FILES:uim-xim = "${bindir}/uim-xim \ - ${libexecdir}/uim-candwin-*gtk \ - ${libexecdir}/uim-candwin-*gtk3 \ - ${datadir}/man/man1/uim-xim.1 \ - ${sysconfdir}/X11/xinit/xinput.d/uim* \ -" -FILES:uim-common = "${datadir}/uim/pixmaps/*.png \ - ${datadir}/uim \ -" -FILES:uim-fep = "${bindir}/uim-fep*" - -FILES:uim-gtk2.0 = "${libdir}/gtk-2.0 \ - ${bindir}/uim-toolbar-gtk \ - ${bindir}/uim-toolbar-gtk-systray \ - ${bindir}/uim-*-gtk \ - ${bindir}/uim-input-pad-ja \ - ${libdir}/uim/uim-*-gtk \ -" -FILES:uim-gtk3 = "${libdir}/gtk-3.0 \ - ${bindir}/uim-toolbar-gtk3 \ - ${bindir}/uim-toolbar-gtk3-systray \ - ${bindir}/uim-*-gtk3 \ - ${libdir}/uim/uim-*-gtk3 \ -" -FILES:uim-skk = "${libdir}/uim/plugin/libuim-skk.* \ - ${datadir}/uim/skk*.scm \ -" - -PACKAGE_WRITE_DEPS += "qemu-native" -pkg_postinst:uim-anthy() { - if test -n "$D"; then - ${@qemu_run_binary(d, '$D', '${bindir}/uim-module-manager')} --register anthy --path $D${datadir}/uim - else - uim-module-manager --register anthy --path ${datadir}/uim - fi -} - -pkg_prerm:uim-anthy() { - if test -n "$D"; then - ${@qemu_run_binary(d, '$D', '${bindir}/uim-module-manager')} --path $D${datadir}/uim --unregister anthy - else - uim-module-manager --path ${datadir}/uim --unregister anthy - fi -} - -pkg_postinst:uim-skk() { - if test -n "$D"; then - ${@qemu_run_binary(d, '$D', '${bindir}/uim-module-manager')} --register skk --path $D${datadir}/uim - else - uim-module-manager --register skk --path ${datadir}/uim - fi -} - -pkg_postrm:uim-skk() { - if test -n "$D"; then - ${@qemu_run_binary(d, '$D', '${bindir}/uim-module-manager')} --path $D${datadir}/uim --unregister skk - else - uim-module-manager --path ${datadir}/uim --unregister skk - fi -} - -BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/uim/uim_1.8.9.bb b/sources/meta-openembedded/meta-oe/recipes-support/uim/uim_1.8.9.bb new file mode 100644 index 00000000..9d2068c6 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/uim/uim_1.8.9.bb @@ -0,0 +1,154 @@ +DESCRIPTION = "A multilingual user input method library" +HOMEPAGE = "http://uim.freedesktop.org/" +LICENSE = "BSD-3-Clause & LGPL-2.0-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=ab2826b41ca0ff4030d38cc39791d1c8" +SECTION = "inputmethods" + +SRC_URI = "https://github.com/uim/uim/releases/download/${PV}/uim-${PV}.tar.bz2" +SRC_URI:append:class-target = "\ + file://uim-module-manager.patch \ +" +SRC_URI[sha256sum] = "dbbd983768bf748449551644f330dbebe859bfeb6f024fea6697ac75131c7aa4" + +UPSTREAM_CHECK_URI = "https://github.com/${BPN}/${BPN}/releases" +UPSTREAM_CHECK_REGEX = "(?P\d+(\.\d+)+)" + +DEPENDS = "anthy fontconfig libxft libxt glib-2.0 ncurses intltool libedit" +DEPENDS:append:class-target = " intltool-native gtk+ gtk+3 uim-native" + +RDEPENDS:uim = "libuim0 libedit" +RDEPENDS:uim-anthy = "anthy libanthy0" +RDEPENDS:uim-anthy:append:libc-glibc = " glibc-utils glibc-gconv-euc-jp" + +LEAD_SONAME = "libuim.so.1" + +COMPATIBLE_HOST:riscv64 = "null" +COMPATIBLE_HOST:riscv32 = "null" + +inherit features_check autotools pkgconfig gettext qemu gtk-immodules-cache + +REQUIRED_DISTRO_FEATURES = "x11" + +GTKIMMODULES_PACKAGES = "uim-gtk2.0 uim-gtk3" + +EXTRA_OECONF += "--disable-emacs \ + --with-libedit=${STAGING_EXECPREFIXDIR} \ + --without-scim \ + --without-m17nlib \ + --without-prime \ + --without-canna \ + --without-mana \ + --without-eb \ +" + +CONFIGUREOPTS:remove:class-target = "--disable-silent-rules" + +# https://github.com/uim/uim/issues/44 +PARALLEL_MAKE = "" + +#Because m4 file's find maxdepth=2, so copy the m4 files of the deep depth. +do_configure:prepend () { + rm -rf ${S}/m4.generated/lt*.m4 ${S}/m4.generated/libtool.m4 + rm -rf ${S}/sigscheme/libgcroots/m4/lt*.m4 ${S}/sigscheme/libgcroots/m4/libtool.m4 + rm -rf ${S}/sigscheme/m4/lt*.m4 ${S}/sigscheme/m4/libtool.m4 + cp ${S}/sigscheme/m4/* ${S}/m4/ +} + +do_install:append() { + rm -rf ${D}/${datadir}/applications +} + +PACKAGES =+ "uim-xim uim-utils uim-skk uim-gtk2.0 uim-gtk3 uim-fep uim-anthy uim-common libuim0 libuim-dev" + +FILES:${PN} = "${bindir}/uim-help \ + ${libdir}/uim/plugin/libuim-* \ + ${libdir}/libuim-scm* \ + ${libdir}/libgcroots* \ + ${libdir}/uim/plugin/libuim-* \ +" + +FILES:libuim0 = "${libdir}/uim/plugin/libuim-custom-enabler.* \ + ${libdir}/libuim-custom.so.* \ + ${datadir}/locale/ja/LC_MESSAGES/uim.mo \ + ${datadir}/locale/fr/LC_MESSAGES/uim.mo \ + ${datadir}/locale/ko/LC_MESSAGES/uim.mo \ + ${libdir}/libuim.so.* \ +" +FILES:libuim-dev = "${libdir}/libuim*.a \ + ${libdir}/libuim*.la \ + ${libdir}/libuim*.so \ + ${includedir}/uim \ + ${libdir}/pkgconfig/uim.pc \ +" +FILES:uim-anthy = "${libdir}/uim/plugin/libuim-anthy.* \ + ${datadir}/uim/anthy*.scm \ +" +FILES:${PN}-dbg += "${libdir}/*/*/*/.debug ${libdir}/*/*/.debug" +FILES:${PN}-dev += "${libdir}/uim/plugin/*.la" + +FILES:uim-utils = "${bindir}/uim-sh \ + ${bindir}/uim-module-manager \ + ${libexecdir}/uim-helper-server \ +" +FILES:uim-xim = "${bindir}/uim-xim \ + ${libexecdir}/uim-candwin-*gtk \ + ${libexecdir}/uim-candwin-*gtk3 \ + ${datadir}/man/man1/uim-xim.1 \ + ${sysconfdir}/X11/xinit/xinput.d/uim* \ +" +FILES:uim-common = "${datadir}/uim/pixmaps/*.png \ + ${datadir}/uim \ +" +FILES:uim-fep = "${bindir}/uim-fep*" + +FILES:uim-gtk2.0 = "${libdir}/gtk-2.0 \ + ${bindir}/uim-toolbar-gtk \ + ${bindir}/uim-toolbar-gtk-systray \ + ${bindir}/uim-*-gtk \ + ${bindir}/uim-input-pad-ja \ + ${libdir}/uim/uim-*-gtk \ +" +FILES:uim-gtk3 = "${libdir}/gtk-3.0 \ + ${bindir}/uim-toolbar-gtk3 \ + ${bindir}/uim-toolbar-gtk3-systray \ + ${bindir}/uim-*-gtk3 \ + ${libdir}/uim/uim-*-gtk3 \ +" +FILES:uim-skk = "${libdir}/uim/plugin/libuim-skk.* \ + ${datadir}/uim/skk*.scm \ +" + +PACKAGE_WRITE_DEPS += "qemu-native" +pkg_postinst:uim-anthy() { + if test -n "$D"; then + ${@qemu_run_binary(d, '$D', '${bindir}/uim-module-manager')} --register anthy --path $D${datadir}/uim + else + uim-module-manager --register anthy --path ${datadir}/uim + fi +} + +pkg_prerm:uim-anthy() { + if test -n "$D"; then + ${@qemu_run_binary(d, '$D', '${bindir}/uim-module-manager')} --path $D${datadir}/uim --unregister anthy + else + uim-module-manager --path ${datadir}/uim --unregister anthy + fi +} + +pkg_postinst:uim-skk() { + if test -n "$D"; then + ${@qemu_run_binary(d, '$D', '${bindir}/uim-module-manager')} --register skk --path $D${datadir}/uim + else + uim-module-manager --register skk --path ${datadir}/uim + fi +} + +pkg_postrm:uim-skk() { + if test -n "$D"; then + ${@qemu_run_binary(d, '$D', '${bindir}/uim-module-manager')} --path $D${datadir}/uim --unregister skk + else + uim-module-manager --path ${datadir}/uim --unregister skk + fi +} + +BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/unicode-ucd/unicode-ucd_14.0.0.bb b/sources/meta-openembedded/meta-oe/recipes-support/unicode-ucd/unicode-ucd_14.0.0.bb index 7970cd95..026d4ffe 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/unicode-ucd/unicode-ucd_14.0.0.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/unicode-ucd/unicode-ucd_14.0.0.bb @@ -1,7 +1,7 @@ SUMMARY = "Unicode Character Database" HOMEPAGE = "https://unicode.org/ucd/" LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${WORKDIR}/license.txt;md5=4b11b5cbb0a24df9f4e7db63db98f22f" +LIC_FILES_CHKSUM = "file://${UNPACKDIR}/license.txt;md5=4b11b5cbb0a24df9f4e7db63db98f22f" SRC_URI = " \ https://www.unicode.org/Public/zipped/${PV}/UCD.zip;name=ucd;subdir=ucd;downloadfilename=unicode-ucd-${PV}.zip \ @@ -12,11 +12,14 @@ SRC_URI[ucd-license.sha256sum] = "f7830d126f59d83842565d3dddedc79db4ca978ed52aee inherit allarch +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" + do_configure[noexec] = "1" do_install() { install -d ${D}${datadir}/unicode - cp -rf ${WORKDIR}/ucd ${D}${datadir}/unicode + cp -rf ${UNPACKDIR}/ucd ${D}${datadir}/unicode } FILES:${PN} = "${datadir}/unicode/ucd" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/unixodbc/unixodbc_2.3.12.bb b/sources/meta-openembedded/meta-oe/recipes-support/unixodbc/unixodbc_2.3.12.bb index dfad833e..0927f5c9 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/unixodbc/unixodbc_2.3.12.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/unixodbc/unixodbc_2.3.12.bb @@ -15,6 +15,7 @@ SRC_URI = "https://www.unixodbc.org/unixODBC-${PV}.tar.gz \ " SRC_URI[sha256sum] = "f210501445ce21bf607ba51ef8c125e10e22dffdffec377646462df5f01915ec" +UPSTREAM_CHECK_URI = "https://www.unixodbc.org/download.html" UPSTREAM_CHECK_REGEX = "unixODBC-(?P\d+(\.\d+)+)\.tar" inherit autotools-brokensep multilib_header qemu diff --git a/sources/meta-openembedded/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_7.0.14.bb b/sources/meta-openembedded/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_7.0.14.bb deleted file mode 100644 index 208b1bb6..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_7.0.14.bb +++ /dev/null @@ -1,91 +0,0 @@ -SUMMARY = "VirtualBox Linux Guest Drivers" -SECTION = "core" -LICENSE = "GPL-3.0-only" -LIC_FILES_CHKSUM = "file://${WORKDIR}/${VBOX_NAME}/COPYING;md5=fff5fe1c81dd6dc3d522e7862e44881e" - -DEPENDS = "virtual/kernel" - -inherit module kernel-module-split - -COMPATIBLE_MACHINE = "(qemux86|qemux86-64)" - -VBOX_NAME = "VirtualBox-${PV}" - -SRC_URI = "http://download.virtualbox.org/virtualbox/${PV}/${VBOX_NAME}.tar.bz2 \ - file://Makefile.utils \ -" - -SRC_URI[sha256sum] = "45860d834804a24a163c1bb264a6b1cb802a5bc7ce7e01128072f8d6a4617ca9" - -S ?= "${WORKDIR}/vbox_module" -S:task-patch = "${WORKDIR}/${VBOX_NAME}" - -export VBOX_KBUILD_TARGET_ARCH="${ARCH}" -export VBOX_KBUILD_TARGET_ARCH:x86-64="amd64" - -EXTRA_OEMAKE += "KERN_DIR='${WORKDIR}/${KERNEL_VERSION}/build' KBUILD_VERBOSE=1 CC='${CC} ${DEBUG_PREFIX_MAP} -fdebug-prefix-map=${STAGING_KERNEL_DIR}=${KERNEL_SRC_PATH} -fdebug-prefix-map=${STAGING_KERNEL_BUILDDIR}=${KERNEL_SRC_PATH}'" - -# otherwise 5.2.22 builds just vboxguest -MAKE_TARGETS = "all" - -addtask export_sources after do_patch before do_configure -do_export_sources[depends] += "virtual/kernel:do_shared_workdir" - -do_export_sources() { - mkdir -p "${S}" - ${WORKDIR}/${VBOX_NAME}/src/VBox/Additions/linux/export_modules.sh ${T}/vbox_modules.tar.gz - tar -C "${S}" -xzf ${T}/vbox_modules.tar.gz - - # add a mount utility to use shared folder from VBox Addition Source Code - mkdir -p "${S}/utils" - install ${WORKDIR}/${VBOX_NAME}/src/VBox/Additions/linux/sharedfolders/mount.vboxsf.c ${S}/utils - install ${WORKDIR}/${VBOX_NAME}/src/VBox/Additions/linux/sharedfolders/vbsfmount.c ${S}/utils - install ${S}/../Makefile.utils ${S}/utils/Makefile - - # some kernel versions have issues with stdarg.h and compatibility with - # the sysroot and libc-headers/uapi. If we include the file directly from - # the kernel source (STAGING_KERNEL_DIR) we get conflicting types on many - # structures, due to kernel .h files being found before libc .h files. - # if we grab just this one file from the source, and put it into our - # file structure, everything holds together - mkdir -p ${S}/vboxsf/include/linux - install ${STAGING_KERNEL_DIR}/include/linux/stdarg.h ${S}/vboxsf/include/linux -} - -do_configure:prepend() { - # vboxguestdrivers/5.2.6-r0/vbox_module/vboxguest/Makefile.include.header:99: *** The variable KERN_DIR must be a kernel build folder and end with /build without a trailing slash, or KERN_VER must be set. Stop. - # vboxguestdrivers/5.2.6-r0/vbox_module/vboxguest/Makefile.include.header:108: *** The kernel build folder path must end in /build, or the variable KERN_VER must be set. Stop. - mkdir -p ${WORKDIR}/${KERNEL_VERSION} - ln -snf ${STAGING_KERNEL_DIR} ${WORKDIR}/${KERNEL_VERSION}/build -} - -# compile and install mount utility -do_compile() { - oe_runmake all - oe_runmake 'LD=${CC}' 'EXTRA_CFLAGS=-I${STAGING_KERNEL_BUILDDIR}/include/' 'LDFLAGS=${LDFLAGS}' -C ${S}/utils - if ! [ -e vboxguest.ko -a -e vboxsf.ko -a -e vboxvideo.ko ] ; then - echo "ERROR: One of vbox*.ko modules wasn't built" - exit 1 - fi -} - -module_do_install() { - MODULE_DIR=${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/kernel/misc - install -d $MODULE_DIR - install -m 644 vboxguest.ko $MODULE_DIR - install -m 644 vboxsf.ko $MODULE_DIR - install -m 644 vboxvideo.ko $MODULE_DIR -} - -do_install:append() { - install -d ${D}${base_sbindir} - install -m 755 ${S}/utils/mount.vboxsf ${D}${base_sbindir} -} - -PACKAGES += "kernel-module-vboxguest kernel-module-vboxsf kernel-module-vboxvideo" -RRECOMMENDS:${PN} += "kernel-module-vboxguest kernel-module-vboxsf kernel-module-vboxvideo" - -FILES:${PN} = "${base_sbindir}" - -# autoload if installed -KERNEL_MODULE_AUTOLOAD += "vboxguest vboxsf vboxvideo" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_7.0.20.bb b/sources/meta-openembedded/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_7.0.20.bb new file mode 100644 index 00000000..444b86a1 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_7.0.20.bb @@ -0,0 +1,91 @@ +SUMMARY = "VirtualBox Linux Guest Drivers" +SECTION = "core" +LICENSE = "GPL-3.0-only" +LIC_FILES_CHKSUM = "file://${UNPACKDIR}/${VBOX_NAME}/COPYING;md5=217590d3a513571b94632edf5fa1169a" + +DEPENDS = "virtual/kernel" + +inherit module kernel-module-split + +COMPATIBLE_MACHINE = "(qemux86|qemux86-64)" + +VBOX_NAME = "VirtualBox-${PV}" + +SRC_URI = "http://download.virtualbox.org/virtualbox/${PV}/${VBOX_NAME}.tar.bz2 \ + file://Makefile.utils \ +" + +SRC_URI[sha256sum] = "5cf5979bef66ebab3fcd495796b215a940e8a07c469d4bc56d064de44222dd02" + +S ?= "${WORKDIR}/vbox_module" +S:task-patch = "${WORKDIR}/${VBOX_NAME}" + +export VBOX_KBUILD_TARGET_ARCH="${ARCH}" +export VBOX_KBUILD_TARGET_ARCH:x86-64="amd64" + +EXTRA_OEMAKE += "KERN_DIR='${WORKDIR}/${KERNEL_VERSION}/build' KBUILD_VERBOSE=1 CC='${CC} ${DEBUG_PREFIX_MAP} -fdebug-prefix-map=${STAGING_KERNEL_DIR}=${KERNEL_SRC_PATH} -fdebug-prefix-map=${STAGING_KERNEL_BUILDDIR}=${KERNEL_SRC_PATH}'" + +# otherwise 5.2.22 builds just vboxguest +MAKE_TARGETS = "all" + +addtask export_sources after do_patch before do_configure +do_export_sources[depends] += "virtual/kernel:do_shared_workdir" + +do_export_sources() { + mkdir -p "${S}" + ${UNPACKDIR}/${VBOX_NAME}/src/VBox/Additions/linux/export_modules.sh ${T}/vbox_modules.tar.gz + tar -C "${S}" -xzf ${T}/vbox_modules.tar.gz + + # add a mount utility to use shared folder from VBox Addition Source Code + mkdir -p "${S}/utils" + install ${UNPACKDIR}/${VBOX_NAME}/src/VBox/Additions/linux/sharedfolders/mount.vboxsf.c ${S}/utils + install ${UNPACKDIR}/${VBOX_NAME}/src/VBox/Additions/linux/sharedfolders/vbsfmount.c ${S}/utils + install ${UNPACKDIR}/Makefile.utils ${S}/utils/Makefile + + # some kernel versions have issues with stdarg.h and compatibility with + # the sysroot and libc-headers/uapi. If we include the file directly from + # the kernel source (STAGING_KERNEL_DIR) we get conflicting types on many + # structures, due to kernel .h files being found before libc .h files. + # if we grab just this one file from the source, and put it into our + # file structure, everything holds together + mkdir -p ${S}/vboxsf/include/linux + install ${STAGING_KERNEL_DIR}/include/linux/stdarg.h ${S}/vboxsf/include/linux +} + +do_configure:prepend() { + # vboxguestdrivers/5.2.6-r0/vbox_module/vboxguest/Makefile.include.header:99: *** The variable KERN_DIR must be a kernel build folder and end with /build without a trailing slash, or KERN_VER must be set. Stop. + # vboxguestdrivers/5.2.6-r0/vbox_module/vboxguest/Makefile.include.header:108: *** The kernel build folder path must end in /build, or the variable KERN_VER must be set. Stop. + mkdir -p ${WORKDIR}/${KERNEL_VERSION} + ln -snf ${STAGING_KERNEL_DIR} ${WORKDIR}/${KERNEL_VERSION}/build +} + +# compile and install mount utility +do_compile() { + oe_runmake all + oe_runmake 'LD=${CC}' 'EXTRA_CFLAGS=-I${STAGING_KERNEL_BUILDDIR}/include/' 'LDFLAGS=${LDFLAGS}' -C ${S}/utils + if ! [ -e vboxguest.ko -a -e vboxsf.ko -a -e vboxvideo.ko ] ; then + echo "ERROR: One of vbox*.ko modules wasn't built" + exit 1 + fi +} + +module_do_install() { + MODULE_DIR=${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/kernel/misc + install -d $MODULE_DIR + install -m 644 vboxguest.ko $MODULE_DIR + install -m 644 vboxsf.ko $MODULE_DIR + install -m 644 vboxvideo.ko $MODULE_DIR +} + +do_install:append() { + install -d ${D}${base_sbindir} + install -m 755 ${S}/utils/mount.vboxsf ${D}${base_sbindir} +} + +PACKAGES += "kernel-module-vboxguest kernel-module-vboxsf kernel-module-vboxvideo" +RRECOMMENDS:${PN} += "kernel-module-vboxguest kernel-module-vboxsf kernel-module-vboxvideo" + +FILES:${PN} = "${base_sbindir}" + +# autoload if installed +KERNEL_MODULE_AUTOLOAD += "vboxguest vboxsf vboxvideo" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/webkitgtk/webkitgtk3/0001-Fix-build-issues-with-latest-Clang.patch b/sources/meta-openembedded/meta-oe/recipes-support/webkitgtk/webkitgtk3/0001-Fix-build-issues-with-latest-Clang.patch new file mode 100644 index 00000000..6ef9835c --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/webkitgtk/webkitgtk3/0001-Fix-build-issues-with-latest-Clang.patch @@ -0,0 +1,237 @@ +From 257ed304fb3e71d412568dcbed7129c145812fdf Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 2 Sep 2024 21:38:12 -0700 +Subject: [PATCH] Fix build issues with latest Clang + https://bugs.webkit.org/show_bug.cgi?id=276198 rdar://130933637 + +Reviewed by Yusuke Suzuki. + +The use of the template keyword to reference template members without a template argument list was deprecated in the C++ standard. +e.g. `foo.template bar()` nows needs to be `foo.template bar<>()`. I ran into a different issue with `std::reference_wrapper` that +blocked me from going any further, which AFAICT is a bug on the Clang side. + +This also fixes a few other warnings that popped up while building with the new Clang denoted inline + +* Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp: +(JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq): Clang didn't like the implicit static_cast(UINT32_MAX) so make it explicit with a static_assert no data was lost. +* Source/JavaScriptCore/jit/AssemblyHelpers.cpp: +(JSC::AssemblyHelpers::emitNonNullDecodeZeroExtendedStructureID): Clang didn't like the implicit static_cast(UINT32_MAX) so make it explicit with a static_assert no data was lost. +* Source/JavaScriptCore/llint/InPlaceInterpreter.cpp: +* Source/JavaScriptCore/llint/LLIntData.h: +(JSC::LLInt::getCodeFunctionPtr): +(JSC::LLInt::getWide16CodeFunctionPtr): +(JSC::LLInt::getWide32CodeFunctionPtr): +* Source/JavaScriptCore/parser/Nodes.h: Missing definition of ModuleScopeData added include. +* Source/JavaScriptCore/runtime/JSCast.h: +(JSC::JSCastingHelpers::inherits): +(JSC::jsDynamicCast): +* Source/ThirdParty/libwebrtc/Source/third_party/boringssl/src/crypto/bio/connect.c: +(conn_callback_ctrl): Had a warning about an incompatible function type. Seems like this is intentional suppressed the warning. +* Source/WTF/wtf/cf/TypeCastsCF.h: Had a warning about extra namespace qualification. I just moved it out of the namespace. That said, it feels like this warning shouldn't apply to macro expansions... +* Source/WebCore/PAL/ThirdParty/libavif/ThirdParty/dav1d/src/decode.c: +(decode_b): Had a warning about different types on the middle/right of a ternary expression. I just pushed the comparison inside the ternary. + +Canonical link: https://commits.webkit.org/280700@main + +Upstream-Status: Backport [https://github.com/WebKit/WebKit/commit/62b6e2db547e#diff-136d848d7c1b400da9b486916b67592b54e5abf7c66ac247697a93ae2fb743a9] +Signed-off-by: Khem Raj +--- + Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp | 6 ++++-- + Source/JavaScriptCore/jit/AssemblyHelpers.cpp | 6 ++++-- + .../JavaScriptCore/llint/InPlaceInterpreter.cpp | 16 ++++++++-------- + Source/JavaScriptCore/llint/LLIntData.h | 12 ++++++------ + Source/JavaScriptCore/llint/LLIntThunks.cpp | 2 +- + Source/JavaScriptCore/parser/Nodes.h | 4 ++-- + Source/JavaScriptCore/runtime/JSCast.h | 4 ++-- + 7 files changed, 27 insertions(+), 23 deletions(-) + +--- a/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp ++++ b/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp +@@ -22930,8 +22930,10 @@ IGNORE_CLANG_WARNINGS_END + return m_out.shl(m_out.zeroExtPtr(structureID), m_out.constIntPtr(StructureID::encodeShiftAmount)); + #else + LValue maskedStructureID = structureID; +- if constexpr (structureHeapAddressSize < 4 * GB) +- maskedStructureID = m_out.bitAnd(structureID, m_out.constInt32(StructureID::structureIDMask)); ++ if constexpr (structureHeapAddressSize < 4 * GB) { ++ static_assert(static_cast(StructureID::structureIDMask) == StructureID::structureIDMask); ++ maskedStructureID = m_out.bitAnd(structureID, m_out.constInt32(static_cast(StructureID::structureIDMask))); ++ } + return m_out.bitOr(m_out.constIntPtr(startOfStructureHeap()), m_out.zeroExtPtr(maskedStructureID)); + #endif + } +--- a/Source/JavaScriptCore/jit/AssemblyHelpers.cpp ++++ b/Source/JavaScriptCore/jit/AssemblyHelpers.cpp +@@ -677,8 +677,10 @@ void AssemblyHelpers::emitNonNullDecodeZ + if constexpr (structureHeapAddressSize >= 4 * GB) { + ASSERT(structureHeapAddressSize == 4 * GB); + move(source, dest); +- } else +- and32(TrustedImm32(StructureID::structureIDMask), source, dest); ++ } else { ++ static_assert(static_cast(StructureID::structureIDMask) == StructureID::structureIDMask); ++ and32(TrustedImm32(static_cast(StructureID::structureIDMask)), source, dest); ++ } + or64(TrustedImm64(startOfStructureHeap()), dest); + #else // not CPU(ADDRESS64) + move(source, dest); +--- a/Source/JavaScriptCore/llint/InPlaceInterpreter.cpp ++++ b/Source/JavaScriptCore/llint/InPlaceInterpreter.cpp +@@ -43,8 +43,8 @@ namespace JSC { namespace IPInt { + do { \ + void* base = reinterpret_cast(ipint_unreachable_validate); \ + void* ptr = reinterpret_cast(ipint_ ## name ## _validate); \ +- void* untaggedBase = CodePtr::fromTaggedPtr(base).template untaggedPtr(); \ +- void* untaggedPtr = CodePtr::fromTaggedPtr(ptr).template untaggedPtr(); \ ++ void* untaggedBase = CodePtr::fromTaggedPtr(base).template untaggedPtr<>(); \ ++ void* untaggedPtr = CodePtr::fromTaggedPtr(ptr).template untaggedPtr<>(); \ + RELEASE_ASSERT_WITH_MESSAGE((char*)(untaggedPtr) - (char*)(untaggedBase) == opcode * 256, #name); \ + } while (false); + +@@ -52,8 +52,8 @@ do { \ + do { \ + void* base = reinterpret_cast(ipint_i32_trunc_sat_f32_s_validate); \ + void* ptr = reinterpret_cast(ipint_ ## name ## _validate); \ +- void* untaggedBase = CodePtr::fromTaggedPtr(base).template untaggedPtr(); \ +- void* untaggedPtr = CodePtr::fromTaggedPtr(ptr).template untaggedPtr(); \ ++ void* untaggedBase = CodePtr::fromTaggedPtr(base).template untaggedPtr<>(); \ ++ void* untaggedPtr = CodePtr::fromTaggedPtr(ptr).template untaggedPtr<>(); \ + RELEASE_ASSERT_WITH_MESSAGE((char*)(untaggedPtr) - (char*)(untaggedBase) == opcode * 256, #name); \ + } while (false); + +@@ -61,8 +61,8 @@ do { \ + do { \ + void* base = reinterpret_cast(ipint_simd_v128_load_mem_validate); \ + void* ptr = reinterpret_cast(ipint_ ## name ## _validate); \ +- void* untaggedBase = CodePtr::fromTaggedPtr(base).template untaggedPtr(); \ +- void* untaggedPtr = CodePtr::fromTaggedPtr(ptr).template untaggedPtr(); \ ++ void* untaggedBase = CodePtr::fromTaggedPtr(base).template untaggedPtr<>(); \ ++ void* untaggedPtr = CodePtr::fromTaggedPtr(ptr).template untaggedPtr<>(); \ + RELEASE_ASSERT_WITH_MESSAGE((char*)(untaggedPtr) - (char*)(untaggedBase) == opcode * 256, #name); \ + } while (false); + +@@ -70,8 +70,8 @@ do { \ + do { \ + void* base = reinterpret_cast(ipint_memory_atomic_notify_validate); \ + void* ptr = reinterpret_cast(ipint_ ## name ## _validate); \ +- void* untaggedBase = CodePtr::fromTaggedPtr(base).template untaggedPtr(); \ +- void* untaggedPtr = CodePtr::fromTaggedPtr(ptr).template untaggedPtr(); \ ++ void* untaggedBase = CodePtr::fromTaggedPtr(base).template untaggedPtr<>(); \ ++ void* untaggedPtr = CodePtr::fromTaggedPtr(ptr).template untaggedPtr<>(); \ + RELEASE_ASSERT_WITH_MESSAGE((char*)(untaggedPtr) - (char*)(untaggedBase) == opcode * 256, #name); \ + } while (false); + +--- a/Source/JavaScriptCore/llint/LLIntData.h ++++ b/Source/JavaScriptCore/llint/LLIntData.h +@@ -217,7 +217,7 @@ ALWAYS_INLINE LLIntCode getCodeFunctionP + #if COMPILER(MSVC) + return reinterpret_cast(getCodePtr(opcodeID).taggedPtr()); + #else +- return reinterpret_cast(getCodePtr(opcodeID).template taggedPtr()); ++ return reinterpret_cast(getCodePtr(opcodeID).template taggedPtr<>()); + #endif + } + +@@ -227,7 +227,7 @@ ALWAYS_INLINE LLIntCode getWide16CodeFun + #if COMPILER(MSVC) + return reinterpret_cast(getWide16CodePtr(opcodeID).taggedPtr()); + #else +- return reinterpret_cast(getWide16CodePtr(opcodeID).template taggedPtr()); ++ return reinterpret_cast(getWide16CodePtr(opcodeID).template taggedPtr<>()); + #endif + } + +@@ -237,7 +237,7 @@ ALWAYS_INLINE LLIntCode getWide32CodeFun + #if COMPILER(MSVC) + return reinterpret_cast(getWide32CodePtr(opcodeID).taggedPtr()); + #else +- return reinterpret_cast(getWide32CodePtr(opcodeID).template taggedPtr()); ++ return reinterpret_cast(getWide32CodePtr(opcodeID).template taggedPtr<>()); + #endif + } + #else // not ENABLE(JIT) +@@ -361,7 +361,7 @@ ALWAYS_INLINE LLIntCode getCodeFunctionP + #if COMPILER(MSVC) + return reinterpret_cast(getCodePtr(opcodeID).taggedPtr()); + #else +- return reinterpret_cast(getCodePtr(opcodeID).template taggedPtr()); ++ return reinterpret_cast(getCodePtr(opcodeID).template taggedPtr<>()); + #endif + } + +@@ -371,7 +371,7 @@ ALWAYS_INLINE LLIntCode getWide16CodeFun + #if COMPILER(MSVC) + return reinterpret_cast(getWide16CodePtr(opcodeID).taggedPtr()); + #else +- return reinterpret_cast(getWide16CodePtr(opcodeID).template taggedPtr()); ++ return reinterpret_cast(getWide16CodePtr(opcodeID).template taggedPtr<>()); + #endif + } + +@@ -381,7 +381,7 @@ ALWAYS_INLINE LLIntCode getWide32CodeFun + #if COMPILER(MSVC) + return reinterpret_cast(getWide32CodePtr(opcodeID).taggedPtr()); + #else +- return reinterpret_cast(getWide32CodePtr(opcodeID).template taggedPtr()); ++ return reinterpret_cast(getWide32CodePtr(opcodeID).template taggedPtr<>()); + #endif + } + #else // not ENABLE(JIT) +--- a/Source/JavaScriptCore/llint/LLIntThunks.cpp ++++ b/Source/JavaScriptCore/llint/LLIntThunks.cpp +@@ -227,7 +227,7 @@ ALWAYS_INLINE void* untaggedPtr(void* pt + #if COMPILER(MSVC) + return CodePtr::fromTaggedPtr(ptr).untaggedPtr(); + #else +- return CodePtr::fromTaggedPtr(ptr).template untaggedPtr(); ++ return CodePtr::fromTaggedPtr(ptr).template untaggedPtr<>(); + #endif + } + +--- a/Source/JavaScriptCore/parser/Nodes.h ++++ b/Source/JavaScriptCore/parser/Nodes.h +@@ -1,7 +1,7 @@ + /* + * Copyright (C) 1999-2000 Harri Porten (porten@kde.org) + * Copyright (C) 2001 Peter Kelly (pmk@post.com) +- * Copyright (C) 2003-2019 Apple Inc. All rights reserved. ++ * Copyright (C) 2003-2024 Apple Inc. All rights reserved. + * Copyright (C) 2007 Cameron Zwarich (cwzwarich@uwaterloo.ca) + * Copyright (C) 2007 Maks Orlovich + * Copyright (C) 2007 Eric Seidel +@@ -29,6 +29,7 @@ + #include "ImplementationVisibility.h" + #include "JITCode.h" + #include "Label.h" ++#include "ModuleScopeData.h" + #include "ParserArena.h" + #include "ParserModes.h" + #include "ParserTokens.h" +@@ -49,7 +50,6 @@ namespace JSC { + class FunctionMetadataNode; + class FunctionParameters; + class ModuleAnalyzer; +- class ModuleScopeData; + class PropertyListNode; + class ReadModifyResolveNode; + class RegisterID; +--- a/Source/JavaScriptCore/runtime/JSCast.h ++++ b/Source/JavaScriptCore/runtime/JSCast.h +@@ -236,7 +236,7 @@ template + bool inherits(From* from) + { + using Dispatcher = InheritsTraits; +- return Dispatcher::template inherits(from); ++ return Dispatcher::template inherits<>(from); + } + + } // namespace JSCastingHelpers +@@ -245,7 +245,7 @@ template + To jsDynamicCast(From* from) + { + using Dispatcher = JSCastingHelpers::InheritsTraits::type>::type>; +- if (LIKELY(Dispatcher::template inherits(from))) ++ if (LIKELY(Dispatcher::template inherits<>(from))) + return static_cast(from); + return nullptr; + } diff --git a/sources/meta-openembedded/meta-oe/recipes-support/webkitgtk/webkitgtk3/fff1b1773bff2ef7c3b867ab019d69faa36c010d.patch b/sources/meta-openembedded/meta-oe/recipes-support/webkitgtk/webkitgtk3/fff1b1773bff2ef7c3b867ab019d69faa36c010d.patch new file mode 100644 index 00000000..3d76aa4e --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/webkitgtk/webkitgtk3/fff1b1773bff2ef7c3b867ab019d69faa36c010d.patch @@ -0,0 +1,33 @@ +From fff1b1773bff2ef7c3b867ab019d69faa36c010d Mon Sep 17 00:00:00 2001 +From: Michael Catanzaro +Date: Wed, 3 Jul 2024 13:36:54 -0700 +Subject: [PATCH] WebKitDOMEventTarget.h:95: Warning: WebKit2WebExtension: + invalid "scope" annotation: only valid on callback parameters + https://bugs.webkit.org/show_bug.cgi?id=276180 + +Unreviewed build fix. + +Emmanuele recommends using (type gpointer) for the GCallback parameter +of webkit_dom_event_target_remove_event_listener, since it won't be +called and is therefore not functioning as a callback. + +* Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMEventTarget.h: + +Canonical link: https://commits.webkit.org/280639@main +Upstream-Status: Backport [https://github.com/WebKit/WebKit/commit/fff1b1773bff2ef7c3b867ab019d69faa36c010d] +Signed-off-by: Khem Raj +--- + .../InjectedBundle/API/gtk/DOM/WebKitDOMEventTarget.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMEventTarget.h ++++ b/Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMEventTarget.h +@@ -92,7 +92,7 @@ WEBKIT_DEPRECATED gboolean webkit_dom_e + * webkit_dom_event_target_remove_event_listener: + * @target: A #WebKitDOMEventTarget + * @event_name: A #gchar +- * @handler: (scope call): A #GCallback ++ * @handler: (type gpointer): A #GCallback + * @use_capture: A #gboolean + * + * Returns: a #gboolean diff --git a/sources/meta-openembedded/meta-oe/recipes-support/webkitgtk/webkitgtk3_2.44.1.bb b/sources/meta-openembedded/meta-oe/recipes-support/webkitgtk/webkitgtk3_2.44.1.bb deleted file mode 100644 index fc96d5dc..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/webkitgtk/webkitgtk3_2.44.1.bb +++ /dev/null @@ -1,188 +0,0 @@ -SUMMARY = "WebKit web rendering engine for the GTK+ platform" -HOMEPAGE = "https://www.webkitgtk.org/" -BUGTRACKER = "https://bugs.webkit.org/" - -LICENSE = "BSD-2-Clause & LGPL-2.0-or-later" -LIC_FILES_CHKSUM = "file://Source/JavaScriptCore/COPYING.LIB;md5=d0c6d6397a5d84286dda758da57bd691 \ - file://Source/WebCore/LICENSE-APPLE;md5=4646f90082c40bcf298c285f8bab0b12 \ - file://Source/WebCore/LICENSE-LGPL-2;md5=36357ffde2b64ae177b2494445b79d21 \ - file://Source/WebCore/LICENSE-LGPL-2.1;md5=a778a33ef338abbaf8b8a7c36b6eec80 \ - " - -SRC_URI = "https://www.webkitgtk.org/releases/webkitgtk-${PV}.tar.xz \ - file://0001-FindGObjectIntrospection.cmake-prefix-variables-obta.patch \ - file://reproducibility.patch \ - file://no-musttail-arm.patch \ - file://0001-LowLevelInterpreter.cpp-339-21-error-t6-was-not-decl.patch \ - file://30e1d5e22213fdaca2a29ec3400c927d710a37a8.patch \ - " -SRC_URI[sha256sum] = "425b1459b0f04d0600c78d1abb5e7edfa3c060a420f8b231e9a6a2d5d29c5561" - -inherit cmake pkgconfig gobject-introspection perlnative features_check upstream-version-is-even gi-docgen - -S = "${WORKDIR}/webkitgtk-${PV}" - -ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" -REQUIRED_DISTRO_FEATURES = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'opengl', '', d)}" - -CVE_PRODUCT = "webkitgtk webkitgtk\+" - -DEPENDS += " \ - ruby-native \ - gperf-native \ - unifdef-native \ - cairo \ - harfbuzz \ - jpeg \ - atk \ - libwebp \ - gtk+3 \ - libxslt \ - libtasn1 \ - libnotify \ - gstreamer1.0 \ - gstreamer1.0-plugins-base \ - glib-2.0-native \ - gettext-native \ - " - -PACKAGECONFIG_SOUP ?= "soup3" -PACKAGECONFIG ??= " \ - ${@bb.utils.filter('DISTRO_FEATURES', 'systemd wayland x11', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'webgl opengl', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', 'webgl gles2', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl-or-es', '', d)} \ - enchant \ - libsecret \ - ${PACKAGECONFIG_SOUP} \ - " - -PACKAGECONFIG[wayland] = "-DENABLE_WAYLAND_TARGET=ON,-DENABLE_WAYLAND_TARGET=OFF,wayland libwpe wpebackend-fdo wayland-native" -PACKAGECONFIG[angle] = "-DUSE_ANGLE_WEBGL=ON,-DUSE_ANGLE_WEBGL=OFF" -PACKAGECONFIG[x11] = "-DENABLE_X11_TARGET=ON,-DENABLE_X11_TARGET=OFF,virtual/libx11 libxcomposite libxdamage libxrender libxt" -PACKAGECONFIG[geoclue] = "-DENABLE_GEOLOCATION=ON,-DENABLE_GEOLOCATION=OFF,geoclue" -PACKAGECONFIG[enchant] = "-DENABLE_SPELLCHECK=ON,-DENABLE_SPELLCHECK=OFF,enchant2" -PACKAGECONFIG[gles2] = "-DENABLE_GLES2=ON,-DENABLE_GLES2=OFF,virtual/libgles2" -PACKAGECONFIG[jpegxl] = " -DUSE_JPEGXL=ON,-DUSE_JPEGXL=OFF,libjxl" -PACKAGECONFIG[webgl] = "-DENABLE_WEBGL=ON,-DENABLE_WEBGL=OFF,virtual/egl" -PACKAGECONFIG[opengl] = "-DENABLE_GRAPHICS_CONTEXT_GL=ON,-DENABLE_GRAPHICS_CONTEXT_GL=OFF,virtual/egl" -PACKAGECONFIG[opengl-or-es] = "-DUSE_OPENGL_OR_ES=ON,-DUSE_OPENGL_OR_ES=OFF" -PACKAGECONFIG[libsecret] = "-DUSE_LIBSECRET=ON,-DUSE_LIBSECRET=OFF,libsecret" -PACKAGECONFIG[libhyphen] = "-DUSE_LIBHYPHEN=ON,-DUSE_LIBHYPHEN=OFF,libhyphen" -PACKAGECONFIG[woff2] = "-DUSE_WOFF2=ON,-DUSE_WOFF2=OFF,woff2" -PACKAGECONFIG[openjpeg] = "-DUSE_OPENJPEG=ON,-DUSE_OPENJPEG=OFF,openjpeg" -PACKAGECONFIG[systemd] = "-DUSE_SYSTEMD=ON,-DUSE_SYSTEMD=off,systemd" -PACKAGECONFIG[reduce-size] = "-DCMAKE_BUILD_TYPE=MinSizeRel,-DCMAKE_BUILD_TYPE=Release,," -PACKAGECONFIG[lcms] = "-DUSE_LCMS=ON,-DUSE_LCMS=OFF,lcms" -PACKAGECONFIG[soup2] = "-DUSE_SOUP2=ON,-DUSE_SOUP2=OFF,libsoup-2.4,,,soup3" -PACKAGECONFIG[soup3] = ",,libsoup,,,soup2" -PACKAGECONFIG[journald] = "-DENABLE_JOURNALD_LOG=ON,-DENABLE_JOURNALD_LOG=OFF,systemd" -PACKAGECONFIG[avif] = "-DUSE_AVIF_LOG=ON,-DUSE_AVIF=OFF,libavif" -PACKAGECONFIG[media-recorder] = "-DENABLE_MEDIA_RECORDER=ON,-DENABLE_MEDIA_RECORDER=OFF,gstreamer1.0-plugins-bad" -PACKAGECONFIG[gamepad] = "-DENABLE_GAMEPAD=ON,-DENABLE_GAMEPAD=OFF,libmanette" -PACKAGECONFIG[webrtc] = "-DENABLE_WEB_RTC=ON,-DENABLE_WEB_RTC=OFF" -PACKAGECONFIG[bubblewrap] = "-DENABLE_BUBBLEWRAP_SANDBOX=ON -DBWRAP_EXECUTABLE=${bindir}/bwrap -DDBUS_PROXY_EXECUTABLE=${bindir}/xdg-dbus-proxy,-DENABLE_BUBBLEWRAP_SANDBOX=OFF,,bubblewrap xdg-dbus-proxy" -PACKAGECONFIG[backtrace] = "-DUSE_LIBBACKTRACE=ON,-DUSE_LIBBACKTRACE=OFF,libbacktrace" - -EXTRA_OECMAKE = " \ - -DPORT=GTK \ - -DUSE_GTK4=OFF \ - ${@bb.utils.contains('GI_DATA_ENABLED', 'True', '-DENABLE_INTROSPECTION=ON', '-DENABLE_INTROSPECTION=OFF', d)} \ - ${@bb.utils.contains('GIDOCGEN_ENABLED', 'True', '-DENABLE_DOCUMENTATION=ON', '-DENABLE_DOCUMENTATION=OFF', d)} \ - -DENABLE_MINIBROWSER=ON \ - -DCMAKE_EXPORT_COMPILE_COMMANDS=OFF \ - " -# Unless DEBUG_BUILD is enabled, pass -g1 to massively reduce the size of the -# debug symbols (4.3GB to 700M at time of writing) -DEBUG_FLAGS:append = "${@oe.utils.vartrue('DEBUG_BUILD', '', ' -g1', d)}" - -# Javascript JIT is not supported on ARC -EXTRA_OECMAKE:append:arc = " -DENABLE_JIT=OFF " -# By default 25-bit "medium" calls are used on ARC -# which is not enough for binaries larger than 32 MiB -CFLAGS:append:arc = " -mlong-calls" -CXXFLAGS:append:arc = " -mlong-calls" - -# Needed for non-mesa graphics stacks when x11 is disabled -CXXFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', '-DEGL_NO_X11=1', d)}" - -# Javascript JIT is not supported on powerpc -EXTRA_OECMAKE:append:powerpc = " -DENABLE_JIT=OFF " -EXTRA_OECMAKE:append:powerpc64 = " -DENABLE_JIT=OFF " - -# ARM JIT code does not build on ARMv4/5/6 anymore -EXTRA_OECMAKE:append:armv4 = " -DENABLE_JIT=OFF " -EXTRA_OECMAKE:append:armv5 = " -DENABLE_JIT=OFF " -EXTRA_OECMAKE:append:armv6 = " -DENABLE_JIT=OFF " - -# And for armv7* don't enable it for softfp, because after: -# https://github.com/WebKit/WebKit/commit/a2ec4ef1997d6fafa6ffc607bffb54e76168a918 -# https://bugs.webkit.org/show_bug.cgi?id=242172 -# softfp armv7* fails because WEBASSEMBLY is left enabled by default and JIT gets -# explicitly disabled causing: -# http://errors.yoctoproject.org/Errors/Details/734587/ -# PR was sent upstream, but the end result is the same both JIT and WEBASSEMBLY disabled -# https://github.com/WebKit/WebKit/pull/17447 -EXTRA_OECMAKE:append:armv7a = " -DENABLE_JIT=${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', 'ON', 'OFF', d)}" -EXTRA_OECMAKE:append:armv7r = " -DENABLE_JIT=${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', 'ON', 'OFF', d)}" -EXTRA_OECMAKE:append:armv7ve = " -DENABLE_JIT=${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', 'ON', 'OFF', d)}" - -EXTRA_OECMAKE:append:mipsarch = " -DUSE_LD_GOLD=OFF " -EXTRA_OECMAKE:append:powerpc = " -DUSE_LD_GOLD=OFF " - -# JIT and gold linker does not work on RISCV -EXTRA_OECMAKE:append:riscv32 = " -DUSE_LD_GOLD=OFF -DENABLE_JIT=OFF" -EXTRA_OECMAKE:append:riscv64 = " -DUSE_LD_GOLD=OFF" - -# JIT not supported on MIPS either -EXTRA_OECMAKE:append:mipsarch = " -DENABLE_JIT=OFF -DENABLE_C_LOOP=ON " - -# JIT not supported on X32 -# An attempt was made to upstream JIT support for x32 in -# https://bugs.webkit.org/show_bug.cgi?id=100450, but this was closed as -# unresolved due to limited X32 adoption. -EXTRA_OECMAKE:append:x86-x32 = " -DENABLE_JIT=OFF " - -SECURITY_CFLAGS:remove:aarch64 = "-fpie" -SECURITY_CFLAGS:append:aarch64 = " -fPIE" - -FILES:${PN} += "${libdir}/webkit2gtk-4.*/injected-bundle/libwebkit2gtkinjectedbundle.so" - -RRECOMMENDS:${PN} += "ca-certificates shared-mime-info" - -# http://errors.yoctoproject.org/Errors/Details/20370/ -ARM_INSTRUCTION_SET:armv4 = "arm" -ARM_INSTRUCTION_SET:armv5 = "arm" -ARM_INSTRUCTION_SET:armv6 = "arm" - -# https://bugzilla.yoctoproject.org/show_bug.cgi?id=9474 -# https://bugs.webkit.org/show_bug.cgi?id=159880 -# JSC JIT can build on ARMv7 with -marm, but doesn't work on runtime. -# Upstream only tests regularly the JSC JIT on ARMv7 with Thumb2 (-mthumb). -ARM_INSTRUCTION_SET:armv7a = "thumb" -ARM_INSTRUCTION_SET:armv7r = "thumb" -ARM_INSTRUCTION_SET:armv7ve = "thumb" - -# ANGLE requires SSE support as of webkit 2.40.x on 32 bit x86 -COMPATIBLE_HOST:x86 = "${@bb.utils.contains_any('TUNE_FEATURES', 'core2 corei7', '.*', 'null', d)}" - -# introspection inside qemu-arm hangs forever on musl/arm builds -# therefore disable GI_DATA -GI_DATA_ENABLED:libc-musl:armv7a = "False" -GI_DATA_ENABLED:libc-musl:armv7ve = "False" - -do_install:append() { - mv ${D}${bindir}/WebKitWebDriver ${D}${bindir}/WebKitWebDriver3 -} - -PACKAGE_PREPROCESS_FUNCS += "src_package_preprocess" -src_package_preprocess () { - # Trim build paths from comments in generated sources to ensure reproducibility - sed -i -e "s,${WORKDIR},,g" \ - ${B}/JavaScriptCore/DerivedSources/*.h \ - ${B}/JavaScriptCore/DerivedSources/yarr/*.h \ - ${B}/JavaScriptCore/PrivateHeaders/JavaScriptCore/*.h \ - ${B}/WebCore/DerivedSources/*.cpp \ - ${B}/WebKitGTK/DerivedSources/webkit/*.cpp -} - diff --git a/sources/meta-openembedded/meta-oe/recipes-support/webkitgtk/webkitgtk3_2.44.3.bb b/sources/meta-openembedded/meta-oe/recipes-support/webkitgtk/webkitgtk3_2.44.3.bb new file mode 100644 index 00000000..01eefe13 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/webkitgtk/webkitgtk3_2.44.3.bb @@ -0,0 +1,189 @@ +SUMMARY = "WebKit web rendering engine for the GTK+ platform" +HOMEPAGE = "https://www.webkitgtk.org/" +BUGTRACKER = "https://bugs.webkit.org/" + +LICENSE = "BSD-2-Clause & LGPL-2.0-or-later" +LIC_FILES_CHKSUM = "file://Source/JavaScriptCore/COPYING.LIB;md5=d0c6d6397a5d84286dda758da57bd691 \ + file://Source/WebCore/LICENSE-APPLE;md5=4646f90082c40bcf298c285f8bab0b12 \ + file://Source/WebCore/LICENSE-LGPL-2;md5=36357ffde2b64ae177b2494445b79d21 \ + file://Source/WebCore/LICENSE-LGPL-2.1;md5=a778a33ef338abbaf8b8a7c36b6eec80 \ + " + +SRC_URI = "https://www.webkitgtk.org/releases/webkitgtk-${PV}.tar.xz \ + file://0001-FindGObjectIntrospection.cmake-prefix-variables-obta.patch \ + file://reproducibility.patch \ + file://no-musttail-arm.patch \ + file://0001-LowLevelInterpreter.cpp-339-21-error-t6-was-not-decl.patch \ + file://30e1d5e22213fdaca2a29ec3400c927d710a37a8.patch \ + file://0001-Fix-build-issues-with-latest-Clang.patch \ + file://fff1b1773bff2ef7c3b867ab019d69faa36c010d.patch \ + " +SRC_URI[sha256sum] = "dc82d042ecaca981a4852357c06e5235743319cf10a94cd36ad41b97883a0b54" + +inherit cmake pkgconfig gobject-introspection perlnative features_check upstream-version-is-even gi-docgen + +S = "${WORKDIR}/webkitgtk-${PV}" + +ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" +REQUIRED_DISTRO_FEATURES = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'opengl', '', d)}" + +CVE_PRODUCT = "webkitgtk webkitgtk\+" + +DEPENDS += " \ + ruby-native \ + gperf-native \ + unifdef-native \ + cairo \ + harfbuzz \ + jpeg \ + atk \ + libwebp \ + gtk+3 \ + libxslt \ + libtasn1 \ + libnotify \ + gstreamer1.0 \ + gstreamer1.0-plugins-base \ + glib-2.0-native \ + gettext-native \ + " + +PACKAGECONFIG_SOUP ?= "soup3" +PACKAGECONFIG ??= " \ + ${@bb.utils.filter('DISTRO_FEATURES', 'systemd wayland x11', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'webgl opengl', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', 'webgl gles2', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl-or-es', '', d)} \ + enchant \ + libsecret \ + ${PACKAGECONFIG_SOUP} \ + " + +PACKAGECONFIG[wayland] = "-DENABLE_WAYLAND_TARGET=ON,-DENABLE_WAYLAND_TARGET=OFF,wayland libwpe wpebackend-fdo wayland-native" +PACKAGECONFIG[angle] = "-DUSE_ANGLE_WEBGL=ON,-DUSE_ANGLE_WEBGL=OFF" +PACKAGECONFIG[x11] = "-DENABLE_X11_TARGET=ON,-DENABLE_X11_TARGET=OFF,virtual/libx11 libxcomposite libxdamage libxrender libxt" +PACKAGECONFIG[geoclue] = "-DENABLE_GEOLOCATION=ON,-DENABLE_GEOLOCATION=OFF,geoclue" +PACKAGECONFIG[enchant] = "-DENABLE_SPELLCHECK=ON,-DENABLE_SPELLCHECK=OFF,enchant2" +PACKAGECONFIG[gles2] = "-DENABLE_GLES2=ON,-DENABLE_GLES2=OFF,virtual/libgles2" +PACKAGECONFIG[jpegxl] = " -DUSE_JPEGXL=ON,-DUSE_JPEGXL=OFF,libjxl" +PACKAGECONFIG[webgl] = "-DENABLE_WEBGL=ON,-DENABLE_WEBGL=OFF,virtual/egl" +PACKAGECONFIG[opengl] = "-DENABLE_GRAPHICS_CONTEXT_GL=ON,-DENABLE_GRAPHICS_CONTEXT_GL=OFF,virtual/egl" +PACKAGECONFIG[opengl-or-es] = "-DUSE_OPENGL_OR_ES=ON,-DUSE_OPENGL_OR_ES=OFF" +PACKAGECONFIG[libsecret] = "-DUSE_LIBSECRET=ON,-DUSE_LIBSECRET=OFF,libsecret" +PACKAGECONFIG[libhyphen] = "-DUSE_LIBHYPHEN=ON,-DUSE_LIBHYPHEN=OFF,libhyphen" +PACKAGECONFIG[woff2] = "-DUSE_WOFF2=ON,-DUSE_WOFF2=OFF,woff2" +PACKAGECONFIG[openjpeg] = "-DUSE_OPENJPEG=ON,-DUSE_OPENJPEG=OFF,openjpeg" +PACKAGECONFIG[systemd] = "-DUSE_SYSTEMD=ON,-DUSE_SYSTEMD=off,systemd" +PACKAGECONFIG[reduce-size] = "-DCMAKE_BUILD_TYPE=MinSizeRel,-DCMAKE_BUILD_TYPE=Release,," +PACKAGECONFIG[lcms] = "-DUSE_LCMS=ON,-DUSE_LCMS=OFF,lcms" +PACKAGECONFIG[soup2] = "-DUSE_SOUP2=ON,-DUSE_SOUP2=OFF,libsoup-2.4,,,soup3" +PACKAGECONFIG[soup3] = ",,libsoup,,,soup2" +PACKAGECONFIG[journald] = "-DENABLE_JOURNALD_LOG=ON,-DENABLE_JOURNALD_LOG=OFF,systemd" +PACKAGECONFIG[avif] = "-DUSE_AVIF_LOG=ON,-DUSE_AVIF=OFF,libavif" +PACKAGECONFIG[media-recorder] = "-DENABLE_MEDIA_RECORDER=ON,-DENABLE_MEDIA_RECORDER=OFF,gstreamer1.0-plugins-bad" +PACKAGECONFIG[gamepad] = "-DENABLE_GAMEPAD=ON,-DENABLE_GAMEPAD=OFF,libmanette" +PACKAGECONFIG[webrtc] = "-DENABLE_WEB_RTC=ON,-DENABLE_WEB_RTC=OFF" +PACKAGECONFIG[bubblewrap] = "-DENABLE_BUBBLEWRAP_SANDBOX=ON -DBWRAP_EXECUTABLE=${bindir}/bwrap -DDBUS_PROXY_EXECUTABLE=${bindir}/xdg-dbus-proxy,-DENABLE_BUBBLEWRAP_SANDBOX=OFF,,bubblewrap xdg-dbus-proxy" +PACKAGECONFIG[backtrace] = "-DUSE_LIBBACKTRACE=ON,-DUSE_LIBBACKTRACE=OFF,libbacktrace" + +EXTRA_OECMAKE = " \ + -DPORT=GTK \ + -DUSE_GTK4=OFF \ + ${@bb.utils.contains('GI_DATA_ENABLED', 'True', '-DENABLE_INTROSPECTION=ON', '-DENABLE_INTROSPECTION=OFF', d)} \ + ${@bb.utils.contains('GIDOCGEN_ENABLED', 'True', '-DENABLE_DOCUMENTATION=ON', '-DENABLE_DOCUMENTATION=OFF', d)} \ + -DENABLE_MINIBROWSER=ON \ + -DCMAKE_EXPORT_COMPILE_COMMANDS=OFF \ + " +# pass -g1 to massively reduce the size of the debug symbols (4.3GB to 700M at time of writing) +DEBUG_LEVELFLAG = "-g1" + +# Javascript JIT is not supported on ARC +EXTRA_OECMAKE:append:arc = " -DENABLE_JIT=OFF " +# By default 25-bit "medium" calls are used on ARC +# which is not enough for binaries larger than 32 MiB +CFLAGS:append:arc = " -mlong-calls" +CXXFLAGS:append:arc = " -mlong-calls" + +# Needed for non-mesa graphics stacks when x11 is disabled +CXXFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', '-DEGL_NO_X11=1', d)}" + +# Javascript JIT is not supported on powerpc +EXTRA_OECMAKE:append:powerpc = " -DENABLE_JIT=OFF " +EXTRA_OECMAKE:append:powerpc64 = " -DENABLE_JIT=OFF " + +# ARM JIT code does not build on ARMv4/5/6 anymore +EXTRA_OECMAKE:append:armv4 = " -DENABLE_JIT=OFF " +EXTRA_OECMAKE:append:armv5 = " -DENABLE_JIT=OFF " +EXTRA_OECMAKE:append:armv6 = " -DENABLE_JIT=OFF " + +# And for armv7* don't enable it for softfp, because after: +# https://github.com/WebKit/WebKit/commit/a2ec4ef1997d6fafa6ffc607bffb54e76168a918 +# https://bugs.webkit.org/show_bug.cgi?id=242172 +# softfp armv7* fails because WEBASSEMBLY is left enabled by default and JIT gets +# explicitly disabled causing: +# http://errors.yoctoproject.org/Errors/Details/734587/ +# PR was sent upstream, but the end result is the same both JIT and WEBASSEMBLY disabled +# https://github.com/WebKit/WebKit/pull/17447 +EXTRA_OECMAKE:append:armv7a = " -DENABLE_JIT=${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', 'ON', 'OFF', d)}" +EXTRA_OECMAKE:append:armv7r = " -DENABLE_JIT=${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', 'ON', 'OFF', d)}" +EXTRA_OECMAKE:append:armv7ve = " -DENABLE_JIT=${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', 'ON', 'OFF', d)}" + +EXTRA_OECMAKE:append:mipsarch = " -DUSE_LD_GOLD=OFF " +EXTRA_OECMAKE:append:powerpc = " -DUSE_LD_GOLD=OFF " + +# JIT and gold linker does not work on RISCV +EXTRA_OECMAKE:append:riscv32 = " -DUSE_LD_GOLD=OFF -DENABLE_JIT=OFF" +EXTRA_OECMAKE:append:riscv64 = " -DUSE_LD_GOLD=OFF" + +# JIT not supported on MIPS either +EXTRA_OECMAKE:append:mipsarch = " -DENABLE_JIT=OFF -DENABLE_C_LOOP=ON " + +# JIT not supported on X32 +# An attempt was made to upstream JIT support for x32 in +# https://bugs.webkit.org/show_bug.cgi?id=100450, but this was closed as +# unresolved due to limited X32 adoption. +EXTRA_OECMAKE:append:x86-x32 = " -DENABLE_JIT=OFF " + +SECURITY_CFLAGS:remove:aarch64 = "-fpie" +SECURITY_CFLAGS:append:aarch64 = " -fPIE" + +FILES:${PN} += "${libdir}/webkit2gtk-4.*/injected-bundle/libwebkit2gtkinjectedbundle.so" + +RRECOMMENDS:${PN} += "ca-certificates shared-mime-info" + +# http://errors.yoctoproject.org/Errors/Details/20370/ +ARM_INSTRUCTION_SET:armv4 = "arm" +ARM_INSTRUCTION_SET:armv5 = "arm" +ARM_INSTRUCTION_SET:armv6 = "arm" + +# https://bugzilla.yoctoproject.org/show_bug.cgi?id=9474 +# https://bugs.webkit.org/show_bug.cgi?id=159880 +# JSC JIT can build on ARMv7 with -marm, but doesn't work on runtime. +# Upstream only tests regularly the JSC JIT on ARMv7 with Thumb2 (-mthumb). +ARM_INSTRUCTION_SET:armv7a = "thumb" +ARM_INSTRUCTION_SET:armv7r = "thumb" +ARM_INSTRUCTION_SET:armv7ve = "thumb" + +# ANGLE requires SSE support as of webkit 2.40.x on 32 bit x86 +COMPATIBLE_HOST:x86 = "${@bb.utils.contains_any('TUNE_FEATURES', 'core2 corei7', '.*', 'null', d)}" + +# introspection inside qemu-arm hangs forever on musl/arm builds +# therefore disable GI_DATA +GI_DATA_ENABLED:libc-musl:armv7a = "False" +GI_DATA_ENABLED:libc-musl:armv7ve = "False" + +do_install:append() { + mv ${D}${bindir}/WebKitWebDriver ${D}${bindir}/WebKitWebDriver3 +} + +PACKAGE_PREPROCESS_FUNCS += "src_package_preprocess" +src_package_preprocess () { + # Trim build paths from comments in generated sources to ensure reproducibility + sed -i -e "s,${WORKDIR},,g" \ + ${B}/JavaScriptCore/DerivedSources/*.h \ + ${B}/JavaScriptCore/DerivedSources/yarr/*.h \ + ${B}/JavaScriptCore/PrivateHeaders/JavaScriptCore/*.h \ + ${B}/WebCore/DerivedSources/*.cpp \ + ${B}/WebKitGTK/DerivedSources/webkit/*.cpp +} + diff --git a/sources/meta-openembedded/meta-oe/recipes-support/xdg-dbus-proxy/xdg-dbus-proxy_0.1.5.bb b/sources/meta-openembedded/meta-oe/recipes-support/xdg-dbus-proxy/xdg-dbus-proxy_0.1.5.bb deleted file mode 100644 index e10ccd04..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/xdg-dbus-proxy/xdg-dbus-proxy_0.1.5.bb +++ /dev/null @@ -1,19 +0,0 @@ -SUMMARY = "xdg-dbus-proxy is a filtering proxy for D-Bus connections" -HOMEPAGE = "https://github.com/flatpak/xdg-dbus-proxy" -LICENSE = "LGPL-2.1-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" - -DEPENDS = " \ - glib-2.0 \ - libxslt-native \ - docbook-xsl-stylesheets-native \ -" - -inherit meson pkgconfig - -SRC_URI = "git://github.com/flatpak/xdg-dbus-proxy.git;protocol=https;branch=main" - -S = "${WORKDIR}/git" -SRCREV = "7466c8137fc06f863fde8486521984e43a26cd10" - -BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/xdg-dbus-proxy/xdg-dbus-proxy_0.1.6.bb b/sources/meta-openembedded/meta-oe/recipes-support/xdg-dbus-proxy/xdg-dbus-proxy_0.1.6.bb new file mode 100644 index 00000000..fa63196d --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/xdg-dbus-proxy/xdg-dbus-proxy_0.1.6.bb @@ -0,0 +1,19 @@ +SUMMARY = "xdg-dbus-proxy is a filtering proxy for D-Bus connections" +HOMEPAGE = "https://github.com/flatpak/xdg-dbus-proxy" +LICENSE = "LGPL-2.1-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" + +DEPENDS = " \ + glib-2.0 \ + libxslt-native \ + docbook-xsl-stylesheets-native \ +" + +inherit meson pkgconfig + +SRC_URI = "git://github.com/flatpak/xdg-dbus-proxy.git;protocol=https;branch=main" + +S = "${WORKDIR}/git" +SRCREV = "1c1989e56f94b9eb3b7567f8a6e8a0aa16cba496" + +BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/xdg-desktop-portal/xdg-desktop-portal_1.18.1.bb b/sources/meta-openembedded/meta-oe/recipes-support/xdg-desktop-portal/xdg-desktop-portal_1.18.1.bb deleted file mode 100644 index 0aa87242..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/xdg-desktop-portal/xdg-desktop-portal_1.18.1.bb +++ /dev/null @@ -1,49 +0,0 @@ -SUMMARY = "A portal frontend service for Flatpak and possibly other desktop containment frameworks." -HOMEPAGE = "https://github.com/flatpak/xdg-desktop-portal" -LICENSE = "LGPL-2.1-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" - -REQUIRED_DISTRO_FEATURES = "polkit" - -DEPENDS = " \ - json-glib \ - glib-2.0 \ - glib-2.0-native \ - flatpak \ - libportal \ - geoclue \ - pipewire \ - fuse3 \ - xmlto-native \ -" - -PORTAL_BACKENDS ?= " \ - ${@bb.utils.contains('DISTRO_FEATURES', 'gtk+3', 'xdg-desktop-portal-gtk', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'gtk4', 'xdg-desktop-portal-gtk', '', d)} \ -" - -RDEPENDS:${PN} = "bubblewrap rtkit ${PORTAL_BACKENDS}" - -inherit meson pkgconfig python3native features_check - -SRC_URI = " \ - git://github.com/flatpak/xdg-desktop-portal.git;protocol=https;branch=main \ - file://0001-meson.build-add-a-hack-for-crosscompile.patch \ -" - -S = "${WORKDIR}/git" -SRCREV = "37a6f7c8b8e08b9861f05e172cd4e0d07a832c4d" - -FILES:${PN} += "${libdir}/systemd ${datadir}/dbus-1" - -EXTRA_OEMESON += " \ - --cross-file=${WORKDIR}/meson-${PN}.cross \ - -Ddbus-service-dir=${datadir}/dbus-1/services \ -" - -do_write_config:append() { - cat >${WORKDIR}/meson-${PN}.cross <${WORKDIR}/meson-${PN}.cross < Date: Tue, 4 Feb 2020 23:39:49 -0800 Subject: [PATCH] nss/nspr: fix for multilib @@ -6,16 +6,15 @@ Subject: [PATCH] nss/nspr: fix for multilib Upstream-Status: Pending Signed-off-by: Chen Qi - --- configure.ac | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/configure.ac b/configure.ac -index 51621d6..3d23683 100644 +index 7f137c0..e15f5bc 100644 --- a/configure.ac +++ b/configure.ac -@@ -960,24 +960,24 @@ fi +@@ -958,24 +958,24 @@ fi dnl Priority 1: User specifies the path to installation if test "z$NSPR_FOUND" = "zno" -a "z$with_nspr" != "z" -a "z$with_nspr" != "zyes" ; then AC_MSG_CHECKING(for nspr library installation in "$with_nspr" folder) diff --git a/sources/meta-openembedded/meta-oe/recipes-support/xmlsec1/xmlsec1/change-finding-path-of-nss.patch b/sources/meta-openembedded/meta-oe/recipes-support/xmlsec1/xmlsec1/change-finding-path-of-nss.patch index 3a1531de..61c56ffc 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/xmlsec1/xmlsec1/change-finding-path-of-nss.patch +++ b/sources/meta-openembedded/meta-oe/recipes-support/xmlsec1/xmlsec1/change-finding-path-of-nss.patch @@ -1,4 +1,4 @@ -From 9c861646e034b1c80fafd389279b0a7da90a8ba7 Mon Sep 17 00:00:00 2001 +From b43fa6bf612ee59db57573b39e357b6ca96d48b6 Mon Sep 17 00:00:00 2001 From: Yulong Pei Date: Wed, 21 Jul 2010 22:33:43 +0800 Subject: [PATCH] change finding path of nss and nspr @@ -8,16 +8,15 @@ Upstream-Status: Pending Signed-off-by: Yulong Pei Signed-off-by: Mingli Yu Signed-off-by: Yi Zhao - --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac -index ce8a278..51621d6 100644 +index 8add879..7f137c0 100644 --- a/configure.ac +++ b/configure.ac -@@ -935,7 +935,7 @@ NSS_PACKAGE=mozilla-nss +@@ -933,7 +933,7 @@ NSS_PACKAGE=mozilla-nss NSPR_INCLUDE_MARKER="nspr/nspr.h" NSPR_LIB_MARKER="libnspr4$shrext" NSPR_LIBS_LIST="-lnspr4 -lplds4 -lplc4" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/xmlsec1/xmlsec1_1.3.4.bb b/sources/meta-openembedded/meta-oe/recipes-support/xmlsec1/xmlsec1_1.3.4.bb deleted file mode 100644 index 64912c3b..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-support/xmlsec1/xmlsec1_1.3.4.bb +++ /dev/null @@ -1,67 +0,0 @@ -SUMMARY = "XML Security Library is a C library based on LibXML2" -DESCRIPTION = "\ - XML Security Library is a C library based on \ - LibXML2 and OpenSSL. The library was created with a goal to support major \ - XML security standards "XML Digital Signature" and "XML Encryption". \ - " -HOMEPAGE = "http://www.aleksey.com/xmlsec/" -DEPENDS = "libtool libxml2 libxslt zlib" - -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://COPYING;md5=352791d62092ea8104f085042de7f4d0" - -SECTION = "libs" - -SRC_URI = "https://github.com/lsh123/xmlsec/releases/download/${PR}/${BP}.tar.gz \ - file://fix-ltmain.sh.patch \ - file://change-finding-path-of-nss.patch \ - file://makefile-ptest.patch \ - file://xmlsec1-examples-allow-build-in-separate-dir.patch \ - file://0001-nss-nspr-fix-for-multilib.patch \ - file://run-ptest \ - file://ensure-search-path-non-host.patch \ - " - -SRC_URI[sha256sum] = "45ad9078d41ae76844ad2f8651600ffeec0fdd128ead988a8d69e907c57aee75" - -inherit autotools-brokensep ptest pkgconfig - -#CFLAGS += "-I${STAGING_INCDIR}/nss3" -#CPPFLAGS += "-I${STAGING_INCDIR}/nss3" - -PACKAGECONFIG ??= "gnutls libgcrypt nss openssl des" -PACKAGECONFIG[gnutls] = ",,gnutls" -PACKAGECONFIG[libgcrypt] = ",,libgcrypt" -PACKAGECONFIG[nss] = "--with-nss=${STAGING_DIR_HOST} --with-nspr=${STAGING_DIR_HOST},--with-nss=no --with-nspr=no,nss nspr" -PACKAGECONFIG[openssl] = ",,openssl" -PACKAGECONFIG[des] = ",--disable-des,," - -# these can be dynamically loaded with xmlSecCryptoDLLoadLibrary() -FILES_SOLIBSDEV = "${libdir}/libxmlsec1.so" -FILES:${PN} += "${libdir}/libxmlsec1-*.so" -INSANE_SKIP:${PN} = "dev-so" - -FILES:${PN}-dev += "${libdir}/xmlsec1Conf.sh" -FILES:${PN}-dbg += "${PTEST_PATH}/.debug/*" - -RDEPENDS:${PN}-ptest += "${PN}-dev" -INSANE_SKIP:${PN}-ptest += "dev-deps" - -PTEST_EXTRA_ARGS = "top_srcdir=${S} top_builddir=${B}" - -do_compile_ptest () { - oe_runmake -C ${S}/examples ${PTEST_EXTRA_ARGS} all -} - -do_install:append() { - for i in ${bindir}/xmlsec1-config ${libdir}/xmlsec1Conf.sh \ - ${libdir}/pkgconfig/xmlsec1-openssl.pc; do - sed -i -e "s@${RECIPE_SYSROOT}@@g" ${D}$i - done -} - -do_install_ptest () { - oe_runmake -C ${S}/examples DESTDIR=${D}${PTEST_PATH} ${PTEST_EXTRA_ARGS} install-ptest -} - -BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/xmlsec1/xmlsec1_1.3.5.bb b/sources/meta-openembedded/meta-oe/recipes-support/xmlsec1/xmlsec1_1.3.5.bb new file mode 100644 index 00000000..50c387d2 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-support/xmlsec1/xmlsec1_1.3.5.bb @@ -0,0 +1,67 @@ +SUMMARY = "XML Security Library is a C library based on LibXML2" +DESCRIPTION = "\ + XML Security Library is a C library based on \ + LibXML2 and OpenSSL. The library was created with a goal to support major \ + XML security standards "XML Digital Signature" and "XML Encryption". \ + " +HOMEPAGE = "http://www.aleksey.com/xmlsec/" +DEPENDS = "libtool libxml2 libxslt zlib" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=352791d62092ea8104f085042de7f4d0" + +SECTION = "libs" + +SRC_URI = "https://github.com/lsh123/xmlsec/releases/download/${PR}/${BP}.tar.gz \ + file://fix-ltmain.sh.patch \ + file://change-finding-path-of-nss.patch \ + file://makefile-ptest.patch \ + file://xmlsec1-examples-allow-build-in-separate-dir.patch \ + file://0001-nss-nspr-fix-for-multilib.patch \ + file://run-ptest \ + file://ensure-search-path-non-host.patch \ + " + +SRC_URI[sha256sum] = "2ffd4ad1f860ec93e47a680310ab2bc94968bd07566e71976bd96133d9504917" + +inherit autotools-brokensep ptest pkgconfig + +#CFLAGS += "-I${STAGING_INCDIR}/nss3" +#CPPFLAGS += "-I${STAGING_INCDIR}/nss3" + +PACKAGECONFIG ??= "gnutls libgcrypt nss openssl des" +PACKAGECONFIG[gnutls] = ",,gnutls" +PACKAGECONFIG[libgcrypt] = ",,libgcrypt" +PACKAGECONFIG[nss] = "--with-nss=${STAGING_DIR_HOST} --with-nspr=${STAGING_DIR_HOST},--with-nss=no --with-nspr=no,nss nspr" +PACKAGECONFIG[openssl] = ",,openssl" +PACKAGECONFIG[des] = ",--disable-des,," + +# these can be dynamically loaded with xmlSecCryptoDLLoadLibrary() +FILES_SOLIBSDEV = "${libdir}/libxmlsec1.so" +FILES:${PN} += "${libdir}/libxmlsec1-*.so" +INSANE_SKIP:${PN} = "dev-so" + +FILES:${PN}-dev += "${libdir}/xmlsec1Conf.sh" +FILES:${PN}-dbg += "${PTEST_PATH}/.debug/*" + +RDEPENDS:${PN}-ptest += "${PN}-dev" +INSANE_SKIP:${PN}-ptest += "dev-deps" + +PTEST_EXTRA_ARGS = "top_srcdir=${S} top_builddir=${B}" + +do_compile_ptest () { + oe_runmake -C ${S}/examples ${PTEST_EXTRA_ARGS} all +} + +do_install:append() { + for i in ${bindir}/xmlsec1-config ${libdir}/xmlsec1Conf.sh \ + ${libdir}/pkgconfig/xmlsec1-openssl.pc; do + sed -i -e "s@${RECIPE_SYSROOT}@@g" ${D}$i + done +} + +do_install_ptest () { + oe_runmake -C ${S}/examples DESTDIR=${D}${PTEST_PATH} ${PTEST_EXTRA_ARGS} install-ptest +} + +BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-oe/recipes-support/xrdp/xrdp_0.9.19.bb b/sources/meta-openembedded/meta-oe/recipes-support/xrdp/xrdp_0.9.19.bb index b839a682..7c85697d 100644 --- a/sources/meta-openembedded/meta-oe/recipes-support/xrdp/xrdp_0.9.19.bb +++ b/sources/meta-openembedded/meta-oe/recipes-support/xrdp/xrdp_0.9.19.bb @@ -20,6 +20,9 @@ SRC_URI = "https://github.com/neutrinolabs/${BPN}/releases/download/v${PV}/${BPN SRC_URI[sha256sum] = "94017d30e475c6d7a24f651e16791551862ae46f82d8de62385e63393f5f93d0" +UPSTREAM_CHECK_URI = "https://github.com/neutrinolabs/xrdp/releases" +UPSTREAM_CHECK_REGEX = "releases/tag/v(?P\d+(\.\d+)+)" + CFLAGS += " -Wno-deprecated-declarations" PACKAGECONFIG ??= "" @@ -66,7 +69,7 @@ do_install:append() { install -d ${D}${sysconfdir}/sysconfig/xrdp install -m 0644 ${S}/instfiles/*.ini ${D}${sysconfdir}/xrdp/ install -m 0644 ${S}/keygen/openssl.conf ${D}${sysconfdir}/xrdp/ - install -m 0644 ${WORKDIR}/xrdp.sysconfig ${D}${sysconfdir}/sysconfig/xrdp/ + install -m 0644 ${UNPACKDIR}/xrdp.sysconfig ${D}${sysconfdir}/sysconfig/xrdp/ chown xrdp:xrdp ${D}${sysconfdir}/xrdp } diff --git a/sources/meta-openembedded/meta-oe/recipes-test/catch2/catch2_2.13.10.bb b/sources/meta-openembedded/meta-oe/recipes-test/catch2/catch2_2.13.10.bb deleted file mode 100644 index 8512a0f3..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-test/catch2/catch2_2.13.10.bb +++ /dev/null @@ -1,21 +0,0 @@ -DESCRIPTION = "A modern, C++-native, header-only, test framework for unit-tests, \ -TDD and BDD - using C++11, C++14, C++17 and later." -HOMEPAGE = "https://github.com/catchorg/Catch2" -LICENSE = "BSL-1.0" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=e4224ccaecb14d942c71d31bef20d78c" - -SRC_URI = "git://github.com/catchorg/Catch2.git;branch=v2.x;protocol=https" -SRCREV = "182c910b4b63ff587a3440e08f84f70497e49a81" - -S = "${WORKDIR}/git" - -inherit cmake python3native - -do_install:append() { - rm ${D}${datadir}/Catch2/lldbinit - rm ${D}${datadir}/Catch2/gdbinit - rmdir ${D}${datadir}/Catch2/ -} -# Header-only library -RDEPENDS:${PN}-dev = "" -RRECOMMENDS:${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})" diff --git a/sources/meta-openembedded/meta-oe/recipes-test/catch2/catch2_3.7.0.bb b/sources/meta-openembedded/meta-oe/recipes-test/catch2/catch2_3.7.0.bb new file mode 100644 index 00000000..2d571a9c --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-test/catch2/catch2_3.7.0.bb @@ -0,0 +1,21 @@ +DESCRIPTION = "A modern, C++-native, header-only, test framework for unit-tests, \ +TDD and BDD - using C++11, C++14, C++17 and later." +HOMEPAGE = "https://github.com/catchorg/Catch2" +LICENSE = "BSL-1.0" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=e4224ccaecb14d942c71d31bef20d78c" + +SRC_URI = "git://github.com/catchorg/Catch2.git;branch=devel;protocol=https" +SRCREV = "31588bb4f56b638dd5afc28d3ebff9b9dcefb88d" + +S = "${WORKDIR}/git" + +inherit cmake python3native + +do_install:append() { + rm ${D}${datadir}/Catch2/lldbinit + rm ${D}${datadir}/Catch2/gdbinit + rmdir ${D}${datadir}/Catch2/ +} +# Header-only library +RDEPENDS:${PN}-dev = "" +RRECOMMENDS:${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})" diff --git a/sources/meta-openembedded/meta-oe/recipes-test/cukinia/cukinia_0.6.2.bb b/sources/meta-openembedded/meta-oe/recipes-test/cukinia/cukinia_0.6.2.bb deleted file mode 100644 index 1bcfb0a9..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-test/cukinia/cukinia_0.6.2.bb +++ /dev/null @@ -1,21 +0,0 @@ -SUMMARY = "Linux firmware validation framework" -DESCRIPTION = "Cukinia is designed to help Linux-based embedded firmware \ -developers run simple system-level validation tests on their firmware." -HOMEPAGE = "https://github.com/savoirfairelinux/cukinia" -LICENSE = "GPL-3.0-only | Apache-2.0" - -LIC_FILES_CHKSUM = "file://LICENSE.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \ - file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" - -SRC_URI = "git://github.com/savoirfairelinux/cukinia.git;protocol=https;branch=master" - -SRCREV = "a290f2dbb813ce12ba407962655a5d8b57322221" - -S = "${WORKDIR}/git" - -RRECOMMENDS:${PN} = "libgpiod-tools" - -do_install () { - install -d ${D}${sbindir} - install -m 0755 ${S}/cukinia ${D}${sbindir} -} diff --git a/sources/meta-openembedded/meta-oe/recipes-test/cukinia/cukinia_0.7.0.bb b/sources/meta-openembedded/meta-oe/recipes-test/cukinia/cukinia_0.7.0.bb new file mode 100644 index 00000000..e3424d01 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-test/cukinia/cukinia_0.7.0.bb @@ -0,0 +1,20 @@ +SUMMARY = "Linux firmware validation framework" +DESCRIPTION = "Cukinia is designed to help Linux-based embedded firmware \ +developers run simple system-level validation tests on their firmware." +HOMEPAGE = "https://github.com/savoirfairelinux/cukinia" +LICENSE = "Apache-2.0" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" + +SRC_URI = "git://github.com/savoirfairelinux/cukinia.git;protocol=https;branch=master" + +SRCREV = "be56f653743cc0e68bef81ef35df7c50ff8919c4" + +S = "${WORKDIR}/git" + +RRECOMMENDS:${PN} = "libgpiod-tools" + +do_install () { + install -d ${D}${sbindir} + install -m 0755 ${S}/cukinia ${D}${sbindir} +} diff --git a/sources/meta-openembedded/meta-oe/recipes-test/cxxtest/cxxtest_4.4.bb b/sources/meta-openembedded/meta-oe/recipes-test/cxxtest/cxxtest_4.4.bb index c5dfff22..8c8fb609 100644 --- a/sources/meta-openembedded/meta-oe/recipes-test/cxxtest/cxxtest_4.4.bb +++ b/sources/meta-openembedded/meta-oe/recipes-test/cxxtest/cxxtest_4.4.bb @@ -8,6 +8,8 @@ SRC_URI = "http://downloads.sourceforge.net/project/cxxtest/cxxtest/${PV}/${BP}. SRC_URI[md5sum] = "c3cc3355e2ac64e34c215f28e44cfcec" SRC_URI[sha256sum] = "1c154fef91c65dbf1cd4519af7ade70a61d85a923b6e0c0b007dc7f4895cf7d8" +UPSTREAM_CHECK_URI = "https://sourceforge.net/p/cxxtest/activity/" + inherit setuptools3 SETUPTOOLS_SETUP_PATH = "${S}/python" diff --git a/sources/meta-openembedded/meta-oe/recipes-test/fbtest/fb-test_1.1.0.bb b/sources/meta-openembedded/meta-oe/recipes-test/fbtest/fb-test_1.1.0.bb index 6082ea25..b19bba01 100644 --- a/sources/meta-openembedded/meta-oe/recipes-test/fbtest/fb-test_1.1.0.bb +++ b/sources/meta-openembedded/meta-oe/recipes-test/fbtest/fb-test_1.1.0.bb @@ -6,6 +6,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a" SRCREV = "063ec650960c2d79ac51f5c5f026cb05343a33e2" SRC_URI = "git://github.com//ponty/fb-test-app.git;branch=master;protocol=https" +# Upstream repo does not tag +UPSTREAM_CHECK_COMMITS = "1" + S = "${WORKDIR}/git" do_install() { diff --git a/sources/meta-openembedded/meta-oe/recipes-test/googletest/googletest_1.14.0.bb b/sources/meta-openembedded/meta-oe/recipes-test/googletest/googletest_1.14.0.bb deleted file mode 100644 index 65468457..00000000 --- a/sources/meta-openembedded/meta-oe/recipes-test/googletest/googletest_1.14.0.bb +++ /dev/null @@ -1,37 +0,0 @@ -DESCRIPTION = "Google's framework for writing C++ tests" -HOMEPAGE = "https://github.com/google/googletest" -SECTION = "libs" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=cbbd27594afd089daa160d3a16dd515a" - -PROVIDES += "gmock gtest" - -S = "${WORKDIR}/git" -SRCREV = "f8d7d77c06936315286eb55f8de22cd23c188571" -SRC_URI = "git://github.com/google/googletest.git;branch=main;protocol=https" - -inherit cmake pkgconfig - -# allow for shared libraries, but do not default to them -# -PACKAGECONFIG[shared] = "-DBUILD_SHARED_LIBS=ON,-DBUILD_SHARED_LIBS=OFF,," - -CXXFLAGS:append = " -fPIC" - -ALLOW_EMPTY:${PN} = "1" -ALLOW_EMPTY:${PN}-dbg = "1" - -# -staticdev will not be implicitly put into an SDK, so we add an rdepend -# if we are not building shared libraries -# -RDEPENDS:${PN}-dev += "${@bb.utils.contains("PACKAGECONFIG","shared","","${PN}-staticdev",d)}" - -BBCLASSEXTEND = "native nativesdk" - -do_configure:prepend() { - # explicitly use python3 - # the scripts are already python3 compatible since https://github.com/google/googletest/commit/d404af0d987a9c38cafce82a7e26ec8468c88361 and other fixes like this - # but since this oe-core change http://git.openembedded.org/openembedded-core/commit/?id=5f8f16b17f66966ae91aeabc23e97de5ecd17447 - # there isn't python in HOSTTOOLS so "env python" fails - sed -i 's@^#!/usr/bin/env python$@#!/usr/bin/env python3@g' ${S}/googlemock/test/*py ${S}/googletest/test/*py -} diff --git a/sources/meta-openembedded/meta-oe/recipes-test/googletest/googletest_1.15.2.bb b/sources/meta-openembedded/meta-oe/recipes-test/googletest/googletest_1.15.2.bb new file mode 100644 index 00000000..bc479268 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-test/googletest/googletest_1.15.2.bb @@ -0,0 +1,37 @@ +DESCRIPTION = "Google's framework for writing C++ tests" +HOMEPAGE = "https://github.com/google/googletest" +SECTION = "libs" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=cbbd27594afd089daa160d3a16dd515a" + +PROVIDES += "gmock gtest" + +S = "${WORKDIR}/git" +SRCREV = "b514bdc898e2951020cbdca1304b75f5950d1f59" +SRC_URI = "git://github.com/google/googletest.git;branch=v1.15.x;protocol=https" + +inherit cmake pkgconfig + +# allow for shared libraries, but do not default to them +# +PACKAGECONFIG[shared] = "-DBUILD_SHARED_LIBS=ON,-DBUILD_SHARED_LIBS=OFF,," + +CXXFLAGS:append = " -fPIC" + +ALLOW_EMPTY:${PN} = "1" +ALLOW_EMPTY:${PN}-dbg = "1" + +# -staticdev will not be implicitly put into an SDK, so we add an rdepend +# if we are not building shared libraries +# +RDEPENDS:${PN}-dev += "${@bb.utils.contains("PACKAGECONFIG","shared","","${PN}-staticdev",d)}" + +BBCLASSEXTEND = "native nativesdk" + +do_configure:prepend() { + # explicitly use python3 + # the scripts are already python3 compatible since https://github.com/google/googletest/commit/d404af0d987a9c38cafce82a7e26ec8468c88361 and other fixes like this + # but since this oe-core change http://git.openembedded.org/openembedded-core/commit/?id=5f8f16b17f66966ae91aeabc23e97de5ecd17447 + # there isn't python in HOSTTOOLS so "env python" fails + sed -i 's@^#!/usr/bin/env python$@#!/usr/bin/env python3@g' ${S}/googlemock/test/*py ${S}/googletest/test/*py +} diff --git a/sources/meta-openembedded/meta-oe/recipes-test/linux-serial-test/linux-serial-test_git.bb b/sources/meta-openembedded/meta-oe/recipes-test/linux-serial-test/linux-serial-test_git.bb index e909676a..73460111 100644 --- a/sources/meta-openembedded/meta-oe/recipes-test/linux-serial-test/linux-serial-test_git.bb +++ b/sources/meta-openembedded/meta-oe/recipes-test/linux-serial-test/linux-serial-test_git.bb @@ -8,6 +8,9 @@ SRC_URI = "git://github.com/cbrake/linux-serial-test.git;protocol=https;branch=m PV = "0+git" SRCREV = "2ee61484167eab846f7b7c565284d7c350d738d3" +# Upstream repo does not tag +UPSTREAM_CHECK_COMMITS = "1" + S = "${WORKDIR}/git" inherit cmake diff --git a/sources/meta-openembedded/meta-oe/recipes-test/syzkaller/syzkaller/0001-executor-Remove-including-error.h-in-test_linux.h.patch b/sources/meta-openembedded/meta-oe/recipes-test/syzkaller/syzkaller/0001-executor-Remove-including-error.h-in-test_linux.h.patch new file mode 100644 index 00000000..8bb19fb7 --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-test/syzkaller/syzkaller/0001-executor-Remove-including-error.h-in-test_linux.h.patch @@ -0,0 +1,29 @@ +From 648868595cf290e77aab1f271db2a57e1f791301 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 20 May 2024 20:37:07 -0700 +Subject: [PATCH] executor: Remove including in test_linux.h + +it seems to be redundant and moreover it lets us compile on musl which +does not provide this system header + +Upstream-Status: Submitted [https://github.com/google/syzkaller/pull/4822] +Signed-off-by: Khem Raj +--- + executor/test_linux.h | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/executor/test_linux.h b/executor/test_linux.h +index 7cf459569..8c9493539 100644 +--- a/executor/test_linux.h ++++ b/executor/test_linux.h +@@ -1,7 +1,6 @@ + // Copyright 2017 syzkaller project authors. All rights reserved. + // Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. + +-#include + #include + #include + +-- +2.45.1 + diff --git a/sources/meta-openembedded/meta-oe/recipes-test/syzkaller/syzkaller_git.bb b/sources/meta-openembedded/meta-oe/recipes-test/syzkaller/syzkaller_git.bb index b43207f2..4043ab7e 100644 --- a/sources/meta-openembedded/meta-oe/recipes-test/syzkaller/syzkaller_git.bb +++ b/sources/meta-openembedded/meta-oe/recipes-test/syzkaller/syzkaller_git.bb @@ -9,9 +9,13 @@ GO_IMPORT = "github.com/google/syzkaller" SRC_URI = "git://${GO_IMPORT};protocol=https;destsuffix=${BPN}-${PV}/src/${GO_IMPORT};branch=master \ file://0001-sys-targets-targets.go-allow-users-to-override-hardc.patch;patchdir=src/${GO_IMPORT} \ file://0001-executor-Include-missing-linux-falloc.h.patch;patchdir=src/${GO_IMPORT} \ + file://0001-executor-Remove-including-error.h-in-test_linux.h.patch;patchdir=src/${GO_IMPORT} \ " SRCREV = "25905f5d0a2a7883bd33491997556193582c6059" +# Upstream repo does not tag +UPSTREAM_CHECK_COMMITS = "1" + export GOPROXY = "https://proxy.golang.org,direct" # Workaround for network access issue during compile step. # This needs to be fixed in the recipes buildsystem so that diff --git a/sources/meta-openembedded/meta-oe/recipes-test/testfloat/testfloat_3e.bb b/sources/meta-openembedded/meta-oe/recipes-test/testfloat/testfloat_3e.bb index 48f50d82..f5aace4d 100644 --- a/sources/meta-openembedded/meta-oe/recipes-test/testfloat/testfloat_3e.bb +++ b/sources/meta-openembedded/meta-oe/recipes-test/testfloat/testfloat_3e.bb @@ -19,7 +19,10 @@ SRC_URI[TestFloat.sha256sum] = "6d4bdf0096b48a653aa59fc203a9e5fe18b5a58d7a1b7151 SRC_URI[SoftFloat.md5sum] = "7dac954ea4aed0697cbfee800ba4f492" SRC_URI[SoftFloat.sha256sum] = "21130ce885d35c1fe73fc1e1bf2244178167e05c6747cad5f450cc991714c746" -S = "${WORKDIR}" +UPSTREAM_CHECK_URI = "http://www.jhauser.us/arithmetic/TestFloat.html" + +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" do_compile(){ oe_runmake -C SoftFloat-${PV}/build/Linux-Cross-Compile/ diff --git a/sources/meta-openembedded/meta-oe/recipes-test/trompeloeil/trompeloeil_v47.bb b/sources/meta-openembedded/meta-oe/recipes-test/trompeloeil/trompeloeil_v47.bb new file mode 100644 index 00000000..788a15db --- /dev/null +++ b/sources/meta-openembedded/meta-oe/recipes-test/trompeloeil/trompeloeil_v47.bb @@ -0,0 +1,15 @@ +DESCRIPTION = "A popular statically typed mocking framework for C++14 and later" +HOMEPAGE = "https://trompeloeil.github.io" +LICENSE = "BSL-1.0" +LIC_FILES_CHKSUM = "file://LICENSE_1_0.txt;md5=e4224ccaecb14d942c71d31bef20d78c" + +SRC_URI = "git://github.com/rollbear/trompeloeil.git;branch=main;protocol=https" +SRCREV = "ad9bc41b1e01ae92802de59a12d19cf7c8683d6d" + +S = "${WORKDIR}/git" + +inherit cmake + +# Header-only library +RDEPENDS:${PN}-dev = "" +RRECOMMENDS:${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})" diff --git a/sources/meta-openembedded/meta-perl/README.md b/sources/meta-openembedded/meta-perl/README.md index 4ad99151..f60f3732 100644 --- a/sources/meta-openembedded/meta-perl/README.md +++ b/sources/meta-openembedded/meta-perl/README.md @@ -52,7 +52,7 @@ Dependencies This layer depends on: URI: git://git.openembedded.org/openembedded-core - branch: scarthgap + branch: styhead Adding the meta-perl layer to your build --------------------------------------- @@ -73,10 +73,10 @@ Maintenance ----------- Send patches / pull requests to openembedded-devel@lists.openembedded.org with -'[meta-perl][scarthgap]' in the subject. +'[meta-perl][styhead]' in the subject. When sending single patches, please using something like: -git send-email -M -1 --to openembedded-devel@lists.openembedded.org --subject-prefix='meta-perl][scarthgap][PATCH' +git send-email -M -1 --to openembedded-devel@lists.openembedded.org --subject-prefix='meta-perl][styhead][PATCH' Layer maintainers: Armin Kuster diff --git a/sources/meta-openembedded/meta-perl/conf/layer.conf b/sources/meta-openembedded/meta-perl/conf/layer.conf index 20a6a423..fb1fe884 100644 --- a/sources/meta-openembedded/meta-perl/conf/layer.conf +++ b/sources/meta-openembedded/meta-perl/conf/layer.conf @@ -15,4 +15,4 @@ LAYERVERSION_perl-layer = "1" LAYERDEPENDS_perl-layer = "core openembedded-layer" -LAYERSERIES_COMPAT_perl-layer = "scarthgap" +LAYERSERIES_COMPAT_perl-layer = "styhead" diff --git a/sources/meta-openembedded/meta-perl/recipes-extended/logcheck/logcheck_1.4.3.bb b/sources/meta-openembedded/meta-perl/recipes-extended/logcheck/logcheck_1.4.3.bb index 3d17de63..03785239 100644 --- a/sources/meta-openembedded/meta-perl/recipes-extended/logcheck/logcheck_1.4.3.bb +++ b/sources/meta-openembedded/meta-perl/recipes-extended/logcheck/logcheck_1.4.3.bb @@ -11,7 +11,7 @@ HOMEPAGE = "http://logcheck.org/" LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://LICENSE;md5=c93c0550bd3173f4504b2cbd8991e50b" -SRC_URI = "https://snapshot.debian.org/archive/debian/20230718T155737Z/pool/main/l/${BPN}/${BPN}_${PV}.tar.xz \ +SRC_URI = "${DEBIAN_MIRROR}/main/l/${BPN}/${BPN}_${PV}.tar.xz \ file://99_logcheck \ " SRC_URI[sha256sum] = "ad83ae80bd780bdae5eefd40ad59a3e97b85ad3a4962aa7c00d98ed3bdffcdd0" @@ -49,7 +49,7 @@ do_install() { # Don't install /var/lock when populating rootfs. Do it through volatile if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then install -d ${D}${sysconfdir}/default/volatiles - install -m 0644 ${WORKDIR}/99_logcheck ${D}${sysconfdir}/default/volatiles + install -m 0644 ${UNPACKDIR}/99_logcheck ${D}${sysconfdir}/default/volatiles fi if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then install -d ${D}${sysconfdir}/tmpfiles.d diff --git a/sources/meta-openembedded/meta-perl/recipes-perl/libcgi/libcgi-perl_4.60.bb b/sources/meta-openembedded/meta-perl/recipes-perl/libcgi/libcgi-perl_4.60.bb deleted file mode 100644 index 7e330c37..00000000 --- a/sources/meta-openembedded/meta-perl/recipes-perl/libcgi/libcgi-perl_4.60.bb +++ /dev/null @@ -1,50 +0,0 @@ -DESCRIPTION = "CGI.pm is a stable, complete and mature solution for processing and preparing \ -HTTP requests and responses. Major features including processing form \ -submissions, file uploads, reading and writing cookies, query string generation \ -and manipulation, and processing and preparing HTTP headers." -HOMEPAGE = "http://search.cpan.org/~leejo/CGI-4.28/lib/CGI.pod" -SECTION = "libs" -LICENSE = "Artistic-2.0 | GPL-2.0-only" - -LIC_FILES_CHKSUM = "file://LICENSE;md5=415fc49abed2728f9480cd32c8d67beb" - -SRC_URI = "http://search.cpan.org/CPAN/authors/id/L/LE/LEEJO/CGI-${PV}.tar.gz" - -SRC_URI[sha256sum] = "c2f6330bcc7cacda0c905f57ca0d31da1b19a2e4e5babede648c49b13803ee11" - -S = "${WORKDIR}/CGI-${PV}" - -inherit cpan ptest-perl - -RDEPENDS:${PN} += "\ - libhtml-parser-perl \ - perl-module-base \ - perl-module-deprecate \ - perl-module-if \ -" - -do_install:prepend() { - # requires "-T" (taint) command line option - rm -rf ${B}/t/push.t - rm -rf ${B}/t/utf8.t - # tests building of docs - rm -rf ${B}/t/compiles_pod.t -} - -RDEPENDS:${PN}-ptest += " \ - libtest-deep-perl \ - libtest-warn-perl \ - perl-module-bytes \ - perl-module-file-find \ - perl-module-filehandle \ - perl-module-findbin \ - perl-module-lib \ - perl-module-perlio \ - perl-module-perlio-scalar \ - perl-module-test-more \ - perl-module-utf8 \ -" - -RPROVIDES:${PN} += "perl-module-cgi" - -BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-perl/recipes-perl/libcgi/libcgi-perl_4.66.bb b/sources/meta-openembedded/meta-perl/recipes-perl/libcgi/libcgi-perl_4.66.bb new file mode 100644 index 00000000..94fb4393 --- /dev/null +++ b/sources/meta-openembedded/meta-perl/recipes-perl/libcgi/libcgi-perl_4.66.bb @@ -0,0 +1,50 @@ +DESCRIPTION = "CGI.pm is a stable, complete and mature solution for processing and preparing \ +HTTP requests and responses. Major features including processing form \ +submissions, file uploads, reading and writing cookies, query string generation \ +and manipulation, and processing and preparing HTTP headers." +HOMEPAGE = "http://search.cpan.org/~leejo/CGI-4.28/lib/CGI.pod" +SECTION = "libs" +LICENSE = "Artistic-2.0 | GPL-2.0-only" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=415fc49abed2728f9480cd32c8d67beb" + +SRC_URI = "http://search.cpan.org/CPAN/authors/id/L/LE/LEEJO/CGI-${PV}.tar.gz" + +SRC_URI[sha256sum] = "4697437688a193e3f02556e1d223015590c1f2800b40becf83dc12d5cc5ed8e1" + +S = "${WORKDIR}/CGI-${PV}" + +inherit cpan ptest-perl + +RDEPENDS:${PN} += "\ + libhtml-parser-perl \ + perl-module-base \ + perl-module-deprecate \ + perl-module-if \ +" + +do_install:prepend() { + # requires "-T" (taint) command line option + rm -rf ${B}/t/push.t + rm -rf ${B}/t/utf8.t + # tests building of docs + rm -rf ${B}/t/compiles_pod.t +} + +RDEPENDS:${PN}-ptest += " \ + libtest-deep-perl \ + libtest-warn-perl \ + perl-module-bytes \ + perl-module-file-find \ + perl-module-filehandle \ + perl-module-findbin \ + perl-module-lib \ + perl-module-perlio \ + perl-module-perlio-scalar \ + perl-module-test-more \ + perl-module-utf8 \ +" + +RPROVIDES:${PN} += "perl-module-cgi" + +BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-perl/recipes-perl/libcompress/libcompress-raw-bzip2-perl_2.206.bb b/sources/meta-openembedded/meta-perl/recipes-perl/libcompress/libcompress-raw-bzip2-perl_2.206.bb deleted file mode 100644 index 2bd98e73..00000000 --- a/sources/meta-openembedded/meta-perl/recipes-perl/libcompress/libcompress-raw-bzip2-perl_2.206.bb +++ /dev/null @@ -1,28 +0,0 @@ -SUMMARY = "Low-Level Interface to bzip2 compression library" -DESCRIPTION = ""Compress::Raw::Bzip2" provides an interface to the in-memory \ -compression/uncompression functions from the bzip2 compression library." -HOMEPAGE = "https://metacpan.org/release/Compress-Raw-Bzip2" -SECTION = "libs" -LICENSE = "Artistic-1.0 | GPL-1.0-or-later" - -LIC_FILES_CHKSUM = "file://README;beginline=8;endline=10;md5=85ab0f65a47c4c0f72dd6d033ff74ece" - -SRC_URI = "${CPAN_MIRROR}/authors/id/P/PM/PMQS/Compress-Raw-Bzip2-${PV}.tar.gz" - -SRC_URI[sha256sum] = "212b81db1c0ae822d19928619a603bd108cb5d5c4700fc67dc7cb169e0cc6525" - -DEPENDS += "bzip2" - -S = "${WORKDIR}/Compress-Raw-Bzip2-${PV}" - -inherit cpan - -export BUILD_BZIP2="0" -export BZIP2_INCLUDE="-I${STAGING_DIR_HOST}${includedir}" - -do_compile() { - export LIBC="$(find ${STAGING_DIR_TARGET}/${base_libdir}/ -name 'libc-*.so')" - cpan_do_compile -} - -BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-perl/recipes-perl/libcompress/libcompress-raw-bzip2-perl_2.213.bb b/sources/meta-openembedded/meta-perl/recipes-perl/libcompress/libcompress-raw-bzip2-perl_2.213.bb new file mode 100644 index 00000000..63706d8f --- /dev/null +++ b/sources/meta-openembedded/meta-perl/recipes-perl/libcompress/libcompress-raw-bzip2-perl_2.213.bb @@ -0,0 +1,28 @@ +SUMMARY = "Low-Level Interface to bzip2 compression library" +DESCRIPTION = ""Compress::Raw::Bzip2" provides an interface to the in-memory \ +compression/uncompression functions from the bzip2 compression library." +HOMEPAGE = "https://metacpan.org/release/Compress-Raw-Bzip2" +SECTION = "libs" +LICENSE = "Artistic-1.0 | GPL-1.0-or-later" + +LIC_FILES_CHKSUM = "file://README;beginline=8;endline=10;md5=cd551ef796cc7fa34351ced771a3a7f9" + +SRC_URI = "${CPAN_MIRROR}/authors/id/P/PM/PMQS/Compress-Raw-Bzip2-${PV}.tar.gz" + +SRC_URI[sha256sum] = "8d75d3d366c9101ca18061b00d438d3da39478c06159147dea3c666770577c7b" + +DEPENDS += "bzip2" + +S = "${WORKDIR}/Compress-Raw-Bzip2-${PV}" + +inherit cpan + +export BUILD_BZIP2="0" +export BZIP2_INCLUDE="-I${STAGING_DIR_HOST}${includedir}" + +do_compile() { + export LIBC="$(find ${STAGING_DIR_TARGET}/${base_libdir}/ -name 'libc-*.so')" + cpan_do_compile +} + +BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-perl/recipes-perl/libcompress/libcompress-raw-lzma-perl_2.206.bb b/sources/meta-openembedded/meta-perl/recipes-perl/libcompress/libcompress-raw-lzma-perl_2.206.bb deleted file mode 100644 index cdabdb13..00000000 --- a/sources/meta-openembedded/meta-perl/recipes-perl/libcompress/libcompress-raw-lzma-perl_2.206.bb +++ /dev/null @@ -1,32 +0,0 @@ -SUMMARY = "Low-Level Interface to lzma compresion library." -DESCRIPTION = "This module provides a Perl interface to allow reading and \ -wrting of lzma, lzip and xz files/buffers." -HOMEPAGE = "https://metacpan.org/release/Compress-Raw-Lzma" -SECTION = "libs" -LICENSE = "Artistic-1.0 | GPL-1.0-or-later" - -LIC_FILES_CHKSUM = "file://README;beginline=8;endline=10;md5=b95311d4a7dbf3d0d3663edc094aced6" - -SRC_URI = "${CPAN_MIRROR}/authors/id/P/PM/PMQS/Compress-Raw-Lzma-${PV}.tar.gz" - -SRC_URI[sha256sum] = "e01a7040b84bdc67592d13eec0c788590e1f696d1d4f07c7097bd72a4f886eb4" - -DEPENDS += "xz" - -S = "${WORKDIR}/Compress-Raw-Lzma-${PV}" - -inherit cpan - -RDEPENDS:${PN} += "\ - perl-module-universal \ -" - -export LIBLZMA_INCLUDE="-I${STAGING_DIR_HOST}${includedir}" -export LIBLZMA_LIB="-I${STAGING_DIR_HOST}${libdir}" - -do_compile() { - export LIBC="$(find ${STAGING_DIR_TARGET}/${base_libdir}/ -name 'libc-*.so')" - cpan_do_compile -} - -BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-perl/recipes-perl/libcompress/libcompress-raw-lzma-perl_2.213.bb b/sources/meta-openembedded/meta-perl/recipes-perl/libcompress/libcompress-raw-lzma-perl_2.213.bb new file mode 100644 index 00000000..62521dfe --- /dev/null +++ b/sources/meta-openembedded/meta-perl/recipes-perl/libcompress/libcompress-raw-lzma-perl_2.213.bb @@ -0,0 +1,32 @@ +SUMMARY = "Low-Level Interface to lzma compresion library." +DESCRIPTION = "This module provides a Perl interface to allow reading and \ +wrting of lzma, lzip and xz files/buffers." +HOMEPAGE = "https://metacpan.org/release/Compress-Raw-Lzma" +SECTION = "libs" +LICENSE = "Artistic-1.0 | GPL-1.0-or-later" + +LIC_FILES_CHKSUM = "file://README;beginline=8;endline=10;md5=2a0fd6d30eaf88289587b776f74c2886" + +SRC_URI = "${CPAN_MIRROR}/authors/id/P/PM/PMQS/Compress-Raw-Lzma-${PV}.tar.gz" + +SRC_URI[sha256sum] = "6b979a8347701ced3ac26123d428c1f202b7999850444da19c4aedbb7c862cb7" + +DEPENDS += "xz" + +S = "${WORKDIR}/Compress-Raw-Lzma-${PV}" + +inherit cpan + +RDEPENDS:${PN} += "\ + perl-module-universal \ +" + +export LIBLZMA_INCLUDE="-I${STAGING_DIR_HOST}${includedir}" +export LIBLZMA_LIB="-I${STAGING_DIR_HOST}${libdir}" + +do_compile() { + export LIBC="$(find ${STAGING_DIR_TARGET}/${base_libdir}/ -name 'libc-*.so')" + cpan_do_compile +} + +BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-perl/recipes-perl/libcompress/libcompress-raw-zlib-perl_2.206.bb b/sources/meta-openembedded/meta-perl/recipes-perl/libcompress/libcompress-raw-zlib-perl_2.206.bb deleted file mode 100644 index 47fe8e00..00000000 --- a/sources/meta-openembedded/meta-perl/recipes-perl/libcompress/libcompress-raw-zlib-perl_2.206.bb +++ /dev/null @@ -1,28 +0,0 @@ -SUMMARY = "Perl interface to the zlib compression library." -DESCRIPTION = "The Compress::Raw::Zlib module provides a Perl interface \ -to the zlib compression library (see 'AUTHOR' for details about where to \ -get zlib)." -HOMEPAGE = "https://metacpan.org/release/Compress-Raw-Zlib" -SECTION = "libs" -LICENSE = "Artistic-1.0 | GPL-1.0-or-later" - -LIC_FILES_CHKSUM = "file://README;beginline=8;endline=17;md5=45bba5fa4937353fd4f505fa2108a6bf" - -SRC_URI = "${CPAN_MIRROR}/authors/id/P/PM/PMQS/Compress-Raw-Zlib-${PV}.tar.gz" - -SRC_URI[sha256sum] = "46785a6a383a1c843895b7f9f25d5d759e7c305159f9d1e04a3604eb74c77374" - -DEPENDS += "zlib" - -S = "${WORKDIR}/Compress-Raw-Zlib-${PV}" - -inherit cpan - -export BUILD_ZLIB="0" - -do_compile() { - export LIBC="$(find ${STAGING_DIR_TARGET}/${base_libdir}/ -name 'libc-*.so')" - cpan_do_compile -} - -BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-perl/recipes-perl/libcompress/libcompress-raw-zlib-perl_2.213.bb b/sources/meta-openembedded/meta-perl/recipes-perl/libcompress/libcompress-raw-zlib-perl_2.213.bb new file mode 100644 index 00000000..b8afcc20 --- /dev/null +++ b/sources/meta-openembedded/meta-perl/recipes-perl/libcompress/libcompress-raw-zlib-perl_2.213.bb @@ -0,0 +1,28 @@ +SUMMARY = "Perl interface to the zlib compression library." +DESCRIPTION = "The Compress::Raw::Zlib module provides a Perl interface \ +to the zlib compression library (see 'AUTHOR' for details about where to \ +get zlib)." +HOMEPAGE = "https://metacpan.org/release/Compress-Raw-Zlib" +SECTION = "libs" +LICENSE = "Artistic-1.0 | GPL-1.0-or-later" + +LIC_FILES_CHKSUM = "file://README;beginline=8;endline=17;md5=1bb3479faca6bb2086c05a33a934f62a" + +SRC_URI = "${CPAN_MIRROR}/authors/id/P/PM/PMQS/Compress-Raw-Zlib-${PV}.tar.gz" + +SRC_URI[sha256sum] = "56b21c99cb3a3a7f7876a74dd05daa3f41fc9143ddd4dc98f8e46710a106af45" + +DEPENDS += "zlib" + +S = "${WORKDIR}/Compress-Raw-Zlib-${PV}" + +inherit cpan + +export BUILD_ZLIB="0" + +do_compile() { + export LIBC="$(find ${STAGING_DIR_TARGET}/${base_libdir}/ -name 'libc-*.so')" + cpan_do_compile +} + +BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-perl/recipes-perl/libcrypt/libcrypt-openssl-random-perl_0.16.bb b/sources/meta-openembedded/meta-perl/recipes-perl/libcrypt/libcrypt-openssl-random-perl_0.16.bb deleted file mode 100644 index dc2075d1..00000000 --- a/sources/meta-openembedded/meta-perl/recipes-perl/libcrypt/libcrypt-openssl-random-perl_0.16.bb +++ /dev/null @@ -1,33 +0,0 @@ -SUMMARY = "Crypt::OpenSSL::Random - OpenSSL/LibreSSL pseudo-random number generator access" -SECTION = "libs" -LICENSE = "Artistic-1.0 | GPL-1.0-or-later" - -LIC_FILES_CHKSUM = "file://LICENSE;md5=089c18d635ae273e1727ec385e64063b" - -SRC_URI = "http://www.cpan.org/modules/by-module/Crypt/Crypt-OpenSSL-Random-${PV}.tar.gz " -SRC_URI[sha256sum] = "fcf58cb2af4c3eda2fe1405527d9373efe9576268fce8adb34df9ce9b6b44d1e" - -S = "${WORKDIR}/Crypt-OpenSSL-Random-${PV}" - -DEPENDS += " \ - openssl \ - libcrypt-openssl-guess-perl-native \ -" - -EXTRA_CPANFLAGS = "INC='-I${STAGING_INCDIR}' LIBS='-L${STAGING_LIBDIR} -L${STAGING_BASELIBDIR} -lcrypto'" - -inherit cpan ptest-perl - -RDEPENDS:${PN} += "\ - perl-module-exporter \ - perl-module-strict \ - perl-module-vars \ - perl-module-xsloader \ -" - -RDEPENDS:${PN}-ptest += "\ - perl-module-file-copy \ - perl-module-test-more \ -" - -BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-perl/recipes-perl/libcrypt/libcrypt-openssl-random-perl_0.17.bb b/sources/meta-openembedded/meta-perl/recipes-perl/libcrypt/libcrypt-openssl-random-perl_0.17.bb new file mode 100644 index 00000000..c15d4171 --- /dev/null +++ b/sources/meta-openembedded/meta-perl/recipes-perl/libcrypt/libcrypt-openssl-random-perl_0.17.bb @@ -0,0 +1,33 @@ +SUMMARY = "Crypt::OpenSSL::Random - OpenSSL/LibreSSL pseudo-random number generator access" +SECTION = "libs" +LICENSE = "Artistic-1.0 | GPL-1.0-or-later" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=9e876d4149406d88b4ff1b37645363ad" + +SRC_URI = "http://www.cpan.org/modules/by-module/Crypt/Crypt-OpenSSL-Random-${PV}.tar.gz " +SRC_URI[sha256sum] = "a571b24181baaa76c96704e92acffc6934ff593e380dade274db4e43c140ad51" + +S = "${WORKDIR}/Crypt-OpenSSL-Random-${PV}" + +DEPENDS += " \ + openssl \ + libcrypt-openssl-guess-perl-native \ +" + +EXTRA_CPANFLAGS = "INC='-I${STAGING_INCDIR}' LIBS='-L${STAGING_LIBDIR} -L${STAGING_BASELIBDIR} -lcrypto'" + +inherit cpan ptest-perl + +RDEPENDS:${PN} += "\ + perl-module-exporter \ + perl-module-strict \ + perl-module-vars \ + perl-module-xsloader \ +" + +RDEPENDS:${PN}-ptest += "\ + perl-module-file-copy \ + perl-module-test-more \ +" + +BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-perl/recipes-perl/libcurses/libcurses-perl/0001-testtyp.c-Use-proper-prototype-for-main-function.patch b/sources/meta-openembedded/meta-perl/recipes-perl/libcurses/libcurses-perl/0001-testtyp.c-Use-proper-prototype-for-main-function.patch index ab5af3fa..37c81d9b 100644 --- a/sources/meta-openembedded/meta-perl/recipes-perl/libcurses/libcurses-perl/0001-testtyp.c-Use-proper-prototype-for-main-function.patch +++ b/sources/meta-openembedded/meta-perl/recipes-perl/libcurses/libcurses-perl/0001-testtyp.c-Use-proper-prototype-for-main-function.patch @@ -17,24 +17,22 @@ int Upstream-Status: Pending Signed-off-by: Khem Raj --- - testtyp.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) + testtyp.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/testtyp.c b/testtyp.c -index 949c3d4..4042f73 100644 +index 469cc48..6a48a77 100644 --- a/testtyp.c +++ b/testtyp.c -@@ -7,7 +7,8 @@ - #define _XOPEN_SOURCE_EXTENDED 1 /* We expect wide character functions */ - +@@ -10,6 +10,7 @@ #include "c-config.h" -- + + int -main() { -+int +main(int argc, char *argv[]) { typedef SYM c_sym_t; + return 0; } -- -2.37.3 +2.34.1 diff --git a/sources/meta-openembedded/meta-perl/recipes-perl/libcurses/libcurses-perl_1.41.bb b/sources/meta-openembedded/meta-perl/recipes-perl/libcurses/libcurses-perl_1.41.bb deleted file mode 100644 index 421823d9..00000000 --- a/sources/meta-openembedded/meta-perl/recipes-perl/libcurses/libcurses-perl_1.41.bb +++ /dev/null @@ -1,31 +0,0 @@ -DESCRIPTION = "lib-curses provides an interface between Perl programs and \ -the curses library." - -SECTION = "libs" -LICENSE = "Artistic-1.0 | GPL-1.0-or-later" - -LIC_FILES_CHKSUM = "file://README;beginline=26;endline=30;md5=0b37356c5e9e28080a3422d82af8af09" - -DEPENDS += "perl ncurses " - -SRC_URI = "http://www.cpan.org/authors/id/G/GI/GIRAFFED/Curses-${PV}.tar.gz \ - file://0001-testtyp.c-Use-proper-prototype-for-main-function.patch \ - " - -SRC_URI[sha256sum] = "fb9efea8c7b5ed5f8ea5dee49d35252accfc05ee6e75cb9a37ab7c847cd261d7" - -S = "${WORKDIR}/Curses-${PV}" - -EXTRA_CPANFLAGS = "INC=-I${STAGING_INCDIR} LIBS=-L${STAGING_LIBDIR} TEST_SYMS_OPTS=-v" - -# enable NCURSES_WIDECHAR=1 only if ENABLE_WIDEC has not been explicitly disabled (e.g. by the distro config). -# When compiling against the ncurses library, NCURSES_WIDECHAR needs to explicitly set to 0 in this case. -CFLAGS:append:libc-musl = "${@' -DNCURSES_WIDECHAR=1' if bb.utils.to_boolean((d.getVar('ENABLE_WIDEC') or 'True')) else ' -DNCURSES_WIDECHAR=0'} -DNCURSES_INTERNALS" - -inherit cpan - -do_compile() { - export LIBC="$(find ${STAGING_DIR_TARGET}/${base_libdir}/ -name 'libc-*.so')" - cpan_do_compile -} - diff --git a/sources/meta-openembedded/meta-perl/recipes-perl/libcurses/libcurses-perl_1.45.bb b/sources/meta-openembedded/meta-perl/recipes-perl/libcurses/libcurses-perl_1.45.bb new file mode 100644 index 00000000..7951e0dd --- /dev/null +++ b/sources/meta-openembedded/meta-perl/recipes-perl/libcurses/libcurses-perl_1.45.bb @@ -0,0 +1,31 @@ +DESCRIPTION = "lib-curses provides an interface between Perl programs and \ +the curses library." + +SECTION = "libs" +LICENSE = "Artistic-1.0 | GPL-1.0-or-later" + +LIC_FILES_CHKSUM = "file://README;beginline=26;endline=30;md5=0b37356c5e9e28080a3422d82af8af09" + +DEPENDS += "perl ncurses " + +SRC_URI = "http://www.cpan.org/authors/id/G/GI/GIRAFFED/Curses-${PV}.tar.gz \ + file://0001-testtyp.c-Use-proper-prototype-for-main-function.patch \ + " + +SRC_URI[sha256sum] = "84221e0013a2d64a0bae6a32bb44b1ae5734d2cb0465fb89af3e3abd6e05aeb2" + +S = "${WORKDIR}/Curses-${PV}" + +EXTRA_CPANFLAGS = "INC=-I${STAGING_INCDIR} LIBS=-L${STAGING_LIBDIR} TEST_SYMS_OPTS=-v" + +# enable NCURSES_WIDECHAR=1 only if ENABLE_WIDEC has not been explicitly disabled (e.g. by the distro config). +# When compiling against the ncurses library, NCURSES_WIDECHAR needs to explicitly set to 0 in this case. +CFLAGS:append:libc-musl = "${@' -DNCURSES_WIDECHAR=1' if bb.utils.to_boolean((d.getVar('ENABLE_WIDEC') or 'True')) else ' -DNCURSES_WIDECHAR=0'} -DNCURSES_INTERNALS" + +inherit cpan + +do_compile() { + export LIBC="$(find ${STAGING_DIR_TARGET}/${base_libdir}/ -name 'libc-*.so')" + cpan_do_compile +} + diff --git a/sources/meta-openembedded/meta-perl/recipes-perl/libdb/libdbd-sqlite-perl_1.74.bb b/sources/meta-openembedded/meta-perl/recipes-perl/libdb/libdbd-sqlite-perl_1.74.bb index 7e38da88..e5483e8c 100644 --- a/sources/meta-openembedded/meta-perl/recipes-perl/libdb/libdbd-sqlite-perl_1.74.bb +++ b/sources/meta-openembedded/meta-perl/recipes-perl/libdb/libdbd-sqlite-perl_1.74.bb @@ -33,7 +33,7 @@ RDEPENDS:${PN} += "libdbi-perl \ do_install:append() { if [ ${PERL_DBM_TEST} = "1" ]; then - install -m 755 -D ${WORKDIR}/sqlite-perl-test.pl ${D}/${bindir}/sqlite-perl-test.pl + install -m 755 -D ${UNPACKDIR}/sqlite-perl-test.pl ${D}/${bindir}/sqlite-perl-test.pl fi } diff --git a/sources/meta-openembedded/meta-perl/recipes-perl/libextutils/libextutils-helpers-perl_0.026.bb b/sources/meta-openembedded/meta-perl/recipes-perl/libextutils/libextutils-helpers-perl_0.026.bb deleted file mode 100644 index 8534822e..00000000 --- a/sources/meta-openembedded/meta-perl/recipes-perl/libextutils/libextutils-helpers-perl_0.026.bb +++ /dev/null @@ -1,29 +0,0 @@ -SUMMARY = "ExtUtils::Helpers - Various portability utilities for module builders" -DESCRIPTION = "This module provides various portable helper function for module building modules." -SECTION = "libs" - -HOMEPAGE = "http://search.cpan.org/~leont/ExtUtils-Helpers/" - -LICENSE = "Artistic-1.0 | GPL-1.0-or-later" -LIC_FILES_CHKSUM = "file://LICENSE;md5=223c04045664f72c3a6556462612bddd" - -SRC_URI = "${CPAN_MIRROR}/authors/id/L/LE/LEONT/ExtUtils-Helpers-${PV}.tar.gz" -SRC_URI[md5sum] = "83b00c1e401321c425ae5db6b2b2fd12" -SRC_URI[sha256sum] = "de901b6790a4557cf4ec908149e035783b125bf115eb9640feb1bc1c24c33416" - -S = "${WORKDIR}/ExtUtils-Helpers-${PV}" - -inherit cpan - -RDEPENDS:${PN} = " perl-module-file-copy \ - perl-module-extutils-makemaker \ - perl-module-exporter \ - perl-module-carp \ - perl-module-test-more \ - perl-module-text-parsewords \ - perl-module-load \ - perl-module-file-temp \ - perl-module-file-spec-functions \ -" - -BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-perl/recipes-perl/libextutils/libextutils-helpers-perl_0.028.bb b/sources/meta-openembedded/meta-perl/recipes-perl/libextutils/libextutils-helpers-perl_0.028.bb new file mode 100644 index 00000000..3ee9df73 --- /dev/null +++ b/sources/meta-openembedded/meta-perl/recipes-perl/libextutils/libextutils-helpers-perl_0.028.bb @@ -0,0 +1,28 @@ +SUMMARY = "ExtUtils::Helpers - Various portability utilities for module builders" +DESCRIPTION = "This module provides various portable helper function for module building modules." +SECTION = "libs" + +HOMEPAGE = "http://search.cpan.org/~leont/ExtUtils-Helpers/" + +LICENSE = "Artistic-1.0 | GPL-1.0-or-later" +LIC_FILES_CHKSUM = "file://LICENSE;md5=c0280160e4f26faafef507664884bf63" + +SRC_URI = "${CPAN_MIRROR}/authors/id/L/LE/LEONT/ExtUtils-Helpers-${PV}.tar.gz" +SRC_URI[sha256sum] = "c8574875cce073e7dc5345a7b06d502e52044d68894f9160203fcaab379514fe" + +S = "${WORKDIR}/ExtUtils-Helpers-${PV}" + +inherit cpan + +RDEPENDS:${PN} = " perl-module-file-copy \ + perl-module-extutils-makemaker \ + perl-module-exporter \ + perl-module-carp \ + perl-module-test-more \ + perl-module-text-parsewords \ + perl-module-load \ + perl-module-file-temp \ + perl-module-file-spec-functions \ +" + +BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-perl/recipes-perl/libhtml/libhtml-tree-perl_5.03.bb b/sources/meta-openembedded/meta-perl/recipes-perl/libhtml/libhtml-tree-perl_5.03.bb index d2c151bf..7bdebcd3 100644 --- a/sources/meta-openembedded/meta-perl/recipes-perl/libhtml/libhtml-tree-perl_5.03.bb +++ b/sources/meta-openembedded/meta-perl/recipes-perl/libhtml/libhtml-tree-perl_5.03.bb @@ -6,7 +6,7 @@ libwww-perl distribution, but are now unbundled in order to facilitate \ a separate development track." SECTION = "libs" -HOMEPAGE = "http://www.cpan.org/authors/id/C/CJ/CJM/HTML-Tree-${PV}.readme" +HOMEPAGE = "https://metacpan.org/release/CJM/HTML-Tree-5.03/source/README" LICENSE = "Artistic-1.0 | GPL-1.0-or-later" LIC_FILES_CHKSUM = "file://LICENSE;md5=3eb57a8958cae73cb65e7d0c26339242" @@ -14,7 +14,6 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=3eb57a8958cae73cb65e7d0c26339242" SRC_URI = "${CPAN_MIRROR}/authors/id/C/CJ/CJM/HTML-Tree-${PV}.tar.gz \ file://bin-htmltree-fix-shebang.patch \ " -SRC_URI[md5sum] = "d9271d60b872ed6fbe68b2d0fe8c450e" SRC_URI[sha256sum] = "7d6d73fca622aa74855a8b088faa39454a0f91b7af83c9ec0387f01eefc2148f" S = "${WORKDIR}/HTML-Tree-${PV}" @@ -26,6 +25,13 @@ export PERL_USE_UNSAFE_INC = "1" DEPENDS += "libmodule-build-perl-native \ " +do_install:append() { + sed -i \ + -e 's|${TMPDIR}||g' \ + `find ${D}/usr/share/doc/perl/html/site/lib/HTML/ -type f` \ + `find ${D}/usr/lib/perl5 -type f -name .packlist` +} + RPROVIDES:${PN} = " libhtml-element-perl \ libhtml-tree-assubs-perl \ libhtml-tree-perl \ diff --git a/sources/meta-openembedded/meta-perl/recipes-perl/libio/libio-compress-lzma-perl_2.206.bb b/sources/meta-openembedded/meta-perl/recipes-perl/libio/libio-compress-lzma-perl_2.206.bb deleted file mode 100644 index 1959df5e..00000000 --- a/sources/meta-openembedded/meta-perl/recipes-perl/libio/libio-compress-lzma-perl_2.206.bb +++ /dev/null @@ -1,24 +0,0 @@ -SUMMARY = "Perl interface to allow reading and writing of lzma files/buffers." -DESCRIPTION = "This module provides a Perl interface to allow reading and \ -writing of lzma files/buffers." -HOMEPAGE = "https://metacpan.org/release/IO-Compress-Lzma" -SECTION = "libs" -LICENSE = "Artistic-1.0 | GPL-1.0-or-later" - -LIC_FILES_CHKSUM = "file://README;beginline=8;endline=10;md5=b95311d4a7dbf3d0d3663edc094aced6" - -SRC_URI = "${CPAN_MIRROR}/authors/id/P/PM/PMQS/IO-Compress-Lzma-${PV}.tar.gz" - -SRC_URI[sha256sum] = "6c600f9bbb1a2d834b1decd0bd5863dcea52e0ac17de101b5085e0e3cb27285c" - -S = "${WORKDIR}/IO-Compress-Lzma-${PV}" - -inherit cpan - -RDEPENDS:${PN} += "\ - perl-module-autoloader \ - libcompress-raw-lzma-perl \ - libio-compress-perl \ -" - -BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-perl/recipes-perl/libio/libio-compress-lzma-perl_2.213.bb b/sources/meta-openembedded/meta-perl/recipes-perl/libio/libio-compress-lzma-perl_2.213.bb new file mode 100644 index 00000000..f6733ad0 --- /dev/null +++ b/sources/meta-openembedded/meta-perl/recipes-perl/libio/libio-compress-lzma-perl_2.213.bb @@ -0,0 +1,24 @@ +SUMMARY = "Perl interface to allow reading and writing of lzma files/buffers." +DESCRIPTION = "This module provides a Perl interface to allow reading and \ +writing of lzma files/buffers." +HOMEPAGE = "https://metacpan.org/release/IO-Compress-Lzma" +SECTION = "libs" +LICENSE = "Artistic-1.0 | GPL-1.0-or-later" + +LIC_FILES_CHKSUM = "file://README;beginline=8;endline=10;md5=2a0fd6d30eaf88289587b776f74c2886" + +SRC_URI = "${CPAN_MIRROR}/authors/id/P/PM/PMQS/IO-Compress-Lzma-${PV}.tar.gz" + +SRC_URI[sha256sum] = "daa63c3fa1f7708aa55b97a4d189820f5e849f8e4583dc24b5cceebd06a493eb" + +S = "${WORKDIR}/IO-Compress-Lzma-${PV}" + +inherit cpan + +RDEPENDS:${PN} += "\ + perl-module-autoloader \ + libcompress-raw-lzma-perl \ + libio-compress-perl \ +" + +BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-perl/recipes-perl/libio/libio-compress-perl_2.206.bb b/sources/meta-openembedded/meta-perl/recipes-perl/libio/libio-compress-perl_2.206.bb deleted file mode 100644 index c58e3fa3..00000000 --- a/sources/meta-openembedded/meta-perl/recipes-perl/libio/libio-compress-perl_2.206.bb +++ /dev/null @@ -1,41 +0,0 @@ -SUMMARY = "Perl interface to allow reading and writing of compressed data." -DESCRIPTION = "This distribution provides a Perl interface to allow reading \ -and writing of compressed data created with the zlib and bzip2. \ -\ -IO-Compress supports reading and writing of the following compressed data \ -formats \ - * bzip2 \ - * RFC 1950 \ - * RFC 1951 \ - * RFC 1952 (i.e. gzip) \ - * zip \ -" -HOMEPAGE = "https://metacpan.org/release/IO-Compress" -SECTION = "libs" -LICENSE = "Artistic-1.0 | GPL-1.0-or-later" - -LIC_FILES_CHKSUM = "file://README;beginline=8;endline=10;md5=8e78b88f9c8ac08ae03e8ea81195ca45" - -SRC_URI = "${CPAN_MIRROR}/authors/id/P/PM/PMQS/IO-Compress-${PV}.tar.gz" - -SRC_URI[sha256sum] = "7d3062b9a494f757e8d0614f220d83f22731bbda1aeb5f7cff0e72a83f433d35" - -S = "${WORKDIR}/IO-Compress-${PV}" - -inherit cpan - -RDEPENDS:${PN} += "\ - perl-module-bytes \ - perl-module-cwd \ - perl-module-encode \ - perl-module-file-glob \ - perl-module-file-spec \ - perl-module-posix \ - perl-module-scalar-util \ - perl-module-time-local \ - perl-module-utf8 \ - libcompress-raw-bzip2-perl \ - libcompress-raw-zlib-perl \ -" - -BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-perl/recipes-perl/libio/libio-compress-perl_2.213.bb b/sources/meta-openembedded/meta-perl/recipes-perl/libio/libio-compress-perl_2.213.bb new file mode 100644 index 00000000..4e0a0be4 --- /dev/null +++ b/sources/meta-openembedded/meta-perl/recipes-perl/libio/libio-compress-perl_2.213.bb @@ -0,0 +1,49 @@ +SUMMARY = "Perl interface to allow reading and writing of compressed data." +DESCRIPTION = "This distribution provides a Perl interface to allow reading \ +and writing of compressed data created with the zlib and bzip2. \ +\ +IO-Compress supports reading and writing of the following compressed data \ +formats \ + * bzip2 \ + * RFC 1950 \ + * RFC 1951 \ + * RFC 1952 (i.e. gzip) \ + * zip \ +" +HOMEPAGE = "https://metacpan.org/release/IO-Compress" +SECTION = "libs" +LICENSE = "Artistic-1.0 | GPL-1.0-or-later" + +LIC_FILES_CHKSUM = "file://README;beginline=8;endline=10;md5=254a3b5756814db98ee483c8974736c6" + +SRC_URI = "${CPAN_MIRROR}/authors/id/P/PM/PMQS/IO-Compress-${PV}.tar.gz" + +SRC_URI[sha256sum] = "ae4d01ae574e4568c5f2fb0573e74631e2720b71ad3bc5a3ffe9480f1cb9a851" + +S = "${WORKDIR}/IO-Compress-${PV}" + +inherit cpan + +RDEPENDS:${PN} += "\ + perl-module-bytes \ + perl-module-cwd \ + perl-module-encode \ + perl-module-file-glob \ + perl-module-file-spec \ + perl-module-posix \ + perl-module-scalar-util \ + perl-module-time-local \ + perl-module-utf8 \ + libcompress-raw-bzip2-perl \ + libcompress-raw-zlib-perl \ +" + +inherit update-alternatives + +ALTERNATIVE_PRIORITY = "39" + +ALTERNATIVE:${PN} = "streamzip zipdetails" +ALTERNATIVE_LINK_NAME[streamzip] = "${bindir}/streamzip" +ALTERNATIVE_LINK_NAME[zipdetails] = "${bindir}/zipdetails" + +BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-perl/recipes-perl/libio/libio-socket-ssl-perl_2.085.bb b/sources/meta-openembedded/meta-perl/recipes-perl/libio/libio-socket-ssl-perl_2.085.bb deleted file mode 100644 index f7b3d416..00000000 --- a/sources/meta-openembedded/meta-perl/recipes-perl/libio/libio-socket-ssl-perl_2.085.bb +++ /dev/null @@ -1,54 +0,0 @@ -SUMMARY = "Perl library for transparent SSL" -DESCRIPTION = "This module is a true drop-in replacement for IO::Socket::INET that \ -uses SSL to encrypt data before it is transferred to a remote server \ -or client. IO::Socket::SSL supports all the extra features that one \ -needs to write a full-featured SSL client or server application: \ -multiple SSL contexts, cipher selection, certificate verification, and \ -SSL version selection. As an extra bonus, it works perfectly with \ -mod_perl." -HOMEPAGE = "http://search.cpan.org/dist/IO-Socket-SSL/" -SECTION = "libs" - -LICENSE = "Artistic-1.0 | GPL-1.0-or-later" -LIC_FILES_CHKSUM = "file://META.yml;beginline=12;endline=12;md5=963ce28228347875ace682de56eef8e8" - -RDEPENDS:${PN} += "\ - libmozilla-ca-perl \ - libnet-ssleay-perl \ - perl-module-autoloader \ - perl-module-io-socket \ - perl-module-scalar-util \ -" - -SRC_URI = "${CPAN_MIRROR}/authors/id/S/SU/SULLR/IO-Socket-SSL-${PV}.tar.gz" -SRC_URI[sha256sum] = "95b2f7c0628a7e246a159665fbf0620d0d7835e3a940f22d3fdd47c3aa799c2e" - -S = "${WORKDIR}/IO-Socket-SSL-${PV}" - -inherit cpan ptest-perl - -do_install:append () { - mkdir -p ${D}${docdir}/${PN}/ - cp ${S}/BUGS ${D}${docdir}/${PN}/ - cp ${S}/Changes ${D}${docdir}/${PN}/ - cp ${S}/README ${D}${docdir}/${PN}/ - cp -pRP ${S}/docs ${D}${docdir}/${PN}/ - cp -pRP ${S}/t/certs ${D}${docdir}/${PN}/ - cp -pRP ${S}/example ${D}${docdir}/${PN}/ -} - -RDEPENDS:${PN}-ptest += "\ - libnet-idn-encode \ - liburi-perl \ - perl-module-file-glob \ - perl-module-findbin \ - perl-module-io-socket-inet \ - perl-module-io-socket-ip \ - perl-module-perlio \ - perl-module-perlio-scalar \ - perl-module-test-more \ -" - -do_install_ptest:append () { - cp -r ${B}/t/certs ${D}${PTEST_PATH} -} diff --git a/sources/meta-openembedded/meta-perl/recipes-perl/libio/libio-socket-ssl-perl_2.089.bb b/sources/meta-openembedded/meta-perl/recipes-perl/libio/libio-socket-ssl-perl_2.089.bb new file mode 100644 index 00000000..e745ceca --- /dev/null +++ b/sources/meta-openembedded/meta-perl/recipes-perl/libio/libio-socket-ssl-perl_2.089.bb @@ -0,0 +1,54 @@ +SUMMARY = "Perl library for transparent SSL" +DESCRIPTION = "This module is a true drop-in replacement for IO::Socket::INET that \ +uses SSL to encrypt data before it is transferred to a remote server \ +or client. IO::Socket::SSL supports all the extra features that one \ +needs to write a full-featured SSL client or server application: \ +multiple SSL contexts, cipher selection, certificate verification, and \ +SSL version selection. As an extra bonus, it works perfectly with \ +mod_perl." +HOMEPAGE = "http://search.cpan.org/dist/IO-Socket-SSL/" +SECTION = "libs" + +LICENSE = "Artistic-1.0 | GPL-1.0-or-later" +LIC_FILES_CHKSUM = "file://META.yml;beginline=12;endline=12;md5=963ce28228347875ace682de56eef8e8" + +RDEPENDS:${PN} += "\ + libmozilla-ca-perl \ + libnet-ssleay-perl \ + perl-module-autoloader \ + perl-module-io-socket \ + perl-module-scalar-util \ +" + +SRC_URI = "${CPAN_MIRROR}/authors/id/S/SU/SULLR/IO-Socket-SSL-${PV}.tar.gz" +SRC_URI[sha256sum] = "f683112c1642967e9149f51ad553eccd017833b2f22eb23a9055609d2e3a14d1" + +S = "${WORKDIR}/IO-Socket-SSL-${PV}" + +inherit cpan ptest-perl + +do_install:append () { + mkdir -p ${D}${docdir}/${PN}/ + cp ${S}/BUGS ${D}${docdir}/${PN}/ + cp ${S}/Changes ${D}${docdir}/${PN}/ + cp ${S}/README ${D}${docdir}/${PN}/ + cp -pRP ${S}/docs ${D}${docdir}/${PN}/ + cp -pRP ${S}/t/certs ${D}${docdir}/${PN}/ + cp -pRP ${S}/example ${D}${docdir}/${PN}/ +} + +RDEPENDS:${PN}-ptest += "\ + libnet-idn-encode \ + liburi-perl \ + perl-module-file-glob \ + perl-module-findbin \ + perl-module-io-socket-inet \ + perl-module-io-socket-ip \ + perl-module-perlio \ + perl-module-perlio-scalar \ + perl-module-test-more \ +" + +do_install_ptest:append () { + cp -r ${B}/t/certs ${D}${PTEST_PATH} +} diff --git a/sources/meta-openembedded/meta-perl/recipes-perl/libmodule/libmodule-build-tiny-perl_0.047.bb b/sources/meta-openembedded/meta-perl/recipes-perl/libmodule/libmodule-build-tiny-perl_0.047.bb deleted file mode 100644 index db765b88..00000000 --- a/sources/meta-openembedded/meta-perl/recipes-perl/libmodule/libmodule-build-tiny-perl_0.047.bb +++ /dev/null @@ -1,65 +0,0 @@ -SUMMARY = "Module::Build::Tiny - A tiny replacement for Module::Build" -DESCRIPTION = "Many Perl distributions use a Build.PL file instead of a \ -Makefile.PL file to drive distribution configuration, build, test and \ -installation. Traditionally, Build.PL uses Module::Build as the underlying \ -build system. This module provides a simple, lightweight, drop-in replacement. \ -Whereas Module::Build has over 6,700 lines of code; this module has less than \ -120, yet supports the features needed by most distributions." -SECTION = "libs" - -HOMEPAGE = "http://search.cpan.org/~leont/Module-Build-Tiny/" - -LICENSE = "Artistic-1.0 | GPL-1.0-or-later" -LIC_FILES_CHKSUM = "file://LICENSE;md5=2b9e8b5e2bd19fcc97ac84b78a271a64" - -DEPENDS = "libextutils-config-perl-native libextutils-helpers-perl-native libextutils-installpaths-perl-native" - -SRC_URI = "${CPAN_MIRROR}/authors/id/L/LE/LEONT/Module-Build-Tiny-${PV}.tar.gz" -SRC_URI[sha256sum] = "71260e9421b93c33dd1b3e7d0cf15f759c0ca7c753fa840279ec3be70f8f8c9d" - -S = "${WORKDIR}/Module-Build-Tiny-${PV}" - -inherit cpan_build ptest-perl - -RDEPENDS:${PN} += " \ - libextutils-config-perl \ - libextutils-helpers-perl \ - libextutils-installpaths-perl \ - perl-module-carp \ - perl-module-cpan \ - perl-module-data-dumper \ - perl-module-encode-encoding \ - perl-module-exporter \ - perl-module-extutils-cbuilder \ - perl-module-extutils-cbuilder-base \ - perl-module-extutils-install \ - perl-module-extutils-makemaker \ - perl-module-extutils-parsexs \ - perl-module-file-path \ - perl-module-file-spec \ - perl-module-file-temp \ - perl-module-getopt-long \ - perl-module-io-handle \ - perl-module-ipc-cmd \ - perl-module-json-pp \ - perl-module-load \ - perl-module-metadata \ - perl-module-parse-cpan-meta \ - perl-module-perl-ostype \ - perl-module-pod-man \ - perl-module-tap-harness-env \ - perl-module-test-more \ - perl-module-text-parsewords \ - perl-module-xsloader \ -" - -RDEPENDS:${PN}-ptest += " \ - packagegroup-core-buildessential \ - perl-dev \ - perl-module-blib \ - perl-module-ipc-open2 \ -" - -INSANE_SKIP:${PN}-ptest += "dev-deps" - -BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-perl/recipes-perl/libmodule/libmodule-build-tiny-perl_0.048.bb b/sources/meta-openembedded/meta-perl/recipes-perl/libmodule/libmodule-build-tiny-perl_0.048.bb new file mode 100644 index 00000000..d41b4ff2 --- /dev/null +++ b/sources/meta-openembedded/meta-perl/recipes-perl/libmodule/libmodule-build-tiny-perl_0.048.bb @@ -0,0 +1,72 @@ +SUMMARY = "Module::Build::Tiny - A tiny replacement for Module::Build" +DESCRIPTION = "Many Perl distributions use a Build.PL file instead of a \ +Makefile.PL file to drive distribution configuration, build, test and \ +installation. Traditionally, Build.PL uses Module::Build as the underlying \ +build system. This module provides a simple, lightweight, drop-in replacement. \ +Whereas Module::Build has over 6,700 lines of code; this module has less than \ +120, yet supports the features needed by most distributions." +SECTION = "libs" + +HOMEPAGE = "http://search.cpan.org/~leont/Module-Build-Tiny/" + +LICENSE = "Artistic-1.0 | GPL-1.0-or-later" +LIC_FILES_CHKSUM = "file://LICENSE;md5=2b9e8b5e2bd19fcc97ac84b78a271a64" + +DEPENDS = "libextutils-config-perl-native libextutils-helpers-perl-native libextutils-installpaths-perl-native" + +SRC_URI = "${CPAN_MIRROR}/authors/id/L/LE/LEONT/Module-Build-Tiny-${PV}.tar.gz" +SRC_URI[sha256sum] = "79a73e506fb7badabdf79137a45c6c5027daaf6f9ac3dcfb9d4ffcce92eb36bd" + +S = "${WORKDIR}/Module-Build-Tiny-${PV}" + +inherit cpan_build ptest-perl + +do_install:append() { + sed -i \ + -e 's|${TMPDIR}||g' \ + `find ${D}/usr/lib/perl5 -type f -name .packlist` +} + + +RDEPENDS:${PN} += " \ + libextutils-config-perl \ + libextutils-helpers-perl \ + libextutils-installpaths-perl \ + perl-module-carp \ + perl-module-cpan \ + perl-module-data-dumper \ + perl-module-encode-encoding \ + perl-module-exporter \ + perl-module-extutils-cbuilder \ + perl-module-extutils-cbuilder-base \ + perl-module-extutils-install \ + perl-module-extutils-makemaker \ + perl-module-extutils-parsexs \ + perl-module-file-path \ + perl-module-file-spec \ + perl-module-file-temp \ + perl-module-getopt-long \ + perl-module-io-handle \ + perl-module-ipc-cmd \ + perl-module-json-pp \ + perl-module-load \ + perl-module-metadata \ + perl-module-parse-cpan-meta \ + perl-module-perl-ostype \ + perl-module-pod-man \ + perl-module-tap-harness-env \ + perl-module-test-more \ + perl-module-text-parsewords \ + perl-module-xsloader \ +" + +RDEPENDS:${PN}-ptest += " \ + packagegroup-core-buildessential \ + perl-dev \ + perl-module-blib \ + perl-module-ipc-open2 \ +" + +INSANE_SKIP:${PN}-ptest += "dev-deps" + +BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-perl/recipes-perl/libnet/libnet-dns-perl_1.40.bb b/sources/meta-openembedded/meta-perl/recipes-perl/libnet/libnet-dns-perl_1.40.bb deleted file mode 100644 index e30125ab..00000000 --- a/sources/meta-openembedded/meta-perl/recipes-perl/libnet/libnet-dns-perl_1.40.bb +++ /dev/null @@ -1,64 +0,0 @@ -DESCRIPTION = "This package contains the DNS.pm module with friends." -HOMEPAGE = "http://www.net-dns.org/" -SECTION = "libs" -LICENSE = "MIT" - -LIC_FILES_CHKSUM = "file://README;beginline=252;endline=269;md5=de95b6a896d5f861d724ea854d316a0b" - -DEPENDS += "perl" - -SRC_URI = "http://search.cpan.org/CPAN/authors/id/N/NL/NLNETLABS/Net-DNS-${PV}.tar.gz" - -SRC_URI[sha256sum] = "209bbd40de8d48c1bd7aade48da237fe0a499f89d279baa2e1a99bd5ec922ddc" - -UPSTREAM_CHECK_REGEX = "Net\-DNS\-(?P(\d+\.\d+))(?!_\d+).tar" - -S = "${WORKDIR}/Net-DNS-${PV}" - -EXTRA_CPANFLAGS = "EXPATLIBPATH=${STAGING_LIBDIR} EXPATINCPATH=${STAGING_INCDIR}" - -inherit cpan ptest-perl - -RDEPENDS:${PN} = " \ - libdigest-hmac-perl \ - perl-module-base \ - perl-module-constant \ - perl-module-digest-md5 \ - perl-module-digest-sha \ - perl-module-file-spec \ - perl-module-integer \ - perl-module-io-file \ - perl-module-io-select \ - perl-module-io-socket \ - perl-module-io-socket-ip \ - perl-module-mime-base64 \ - perl-module-scalar-util \ - perl-module-test-more \ - perl-module-time-local \ -" - -RRECOMMENDS:${PN} += " \ - libnet-dns-sec-perl \ -" - -RDEPENDS:${PN}-ptest += " \ - perl-module-encode \ - perl-module-encode-byte \ - perl-module-extutils-mm \ - perl-module-extutils-mm-unix \ - perl-module-overload \ -" - -python __anonymous () { - # rather than use "find" to determine libc-*.so, - # statically export the known paths for glibc and musl - import os - if d.getVar('TCLIBC') == "glibc": - os.environ["LIBC"] = "${STAGING_BASELIBDIR}/libc.so.6" - elif d.getVar('TCLIBC') == "musl": - os.environ["LIBC"] = "${STAGING_LIBDIR}/libc.so" - else: - raise bb.parse.SkipRecipe("incompatible with %s C library" % - d.getVar('TCLIBC')) -} - diff --git a/sources/meta-openembedded/meta-perl/recipes-perl/libnet/libnet-dns-perl_1.46.bb b/sources/meta-openembedded/meta-perl/recipes-perl/libnet/libnet-dns-perl_1.46.bb new file mode 100644 index 00000000..18ba6336 --- /dev/null +++ b/sources/meta-openembedded/meta-perl/recipes-perl/libnet/libnet-dns-perl_1.46.bb @@ -0,0 +1,64 @@ +DESCRIPTION = "This package contains the DNS.pm module with friends." +HOMEPAGE = "http://www.net-dns.org/" +SECTION = "libs" +LICENSE = "MIT" + +LIC_FILES_CHKSUM = "file://README;beginline=252;endline=269;md5=de95b6a896d5f861d724ea854d316a0b" + +DEPENDS += "perl" + +SRC_URI = "http://search.cpan.org/CPAN/authors/id/N/NL/NLNETLABS/Net-DNS-${PV}.tar.gz" + +SRC_URI[sha256sum] = "91b65cd0f12461802c61ca5474f87b3e29f5182d2e1b3a2ea70702a3efb4a743" + +UPSTREAM_CHECK_REGEX = "Net\-DNS\-(?P(\d+\.\d+))(?!_\d+).tar" + +S = "${WORKDIR}/Net-DNS-${PV}" + +EXTRA_CPANFLAGS = "EXPATLIBPATH=${STAGING_LIBDIR} EXPATINCPATH=${STAGING_INCDIR}" + +inherit cpan ptest-perl + +RDEPENDS:${PN} = " \ + libdigest-hmac-perl \ + perl-module-base \ + perl-module-constant \ + perl-module-digest-md5 \ + perl-module-digest-sha \ + perl-module-file-spec \ + perl-module-integer \ + perl-module-io-file \ + perl-module-io-select \ + perl-module-io-socket \ + perl-module-io-socket-ip \ + perl-module-mime-base64 \ + perl-module-scalar-util \ + perl-module-test-more \ + perl-module-time-local \ +" + +RRECOMMENDS:${PN} += " \ + libnet-dns-sec-perl \ +" + +RDEPENDS:${PN}-ptest += " \ + perl-module-encode \ + perl-module-encode-byte \ + perl-module-extutils-mm \ + perl-module-extutils-mm-unix \ + perl-module-overload \ +" + +python __anonymous () { + # rather than use "find" to determine libc-*.so, + # statically export the known paths for glibc and musl + import os + if d.getVar('TCLIBC') == "glibc": + os.environ["LIBC"] = "${STAGING_BASELIBDIR}/libc.so.6" + elif d.getVar('TCLIBC') == "musl": + os.environ["LIBC"] = "${STAGING_LIBDIR}/libc.so" + else: + raise bb.parse.SkipRecipe("incompatible with %s C library" % + d.getVar('TCLIBC')) +} + diff --git a/sources/meta-openembedded/meta-perl/recipes-perl/libtest/libtest-harness-perl_3.48.bb b/sources/meta-openembedded/meta-perl/recipes-perl/libtest/libtest-harness-perl_3.48.bb deleted file mode 100644 index b14fc95f..00000000 --- a/sources/meta-openembedded/meta-perl/recipes-perl/libtest/libtest-harness-perl_3.48.bb +++ /dev/null @@ -1,119 +0,0 @@ -# NOTE: -# You should use perl-module-test-harness instead of this package, -# unless you specifically need a newer version than what is provided -# by perl in oe-core. - -SUMMARY = "Test::Harness - Run Perl standard test scripts with statistics" -DESCRIPTION = "Although, for historical reasons, the Test::Harness \ -distribution takes its name from this module it now exists only to provide \ -TAP::Harness with an interface that is somewhat backwards compatible \ -with Test::Harness 2.xx. If you're writing new code consider using \ -TAP::Harness directly instead. \ -\ -Emulation is provided for runtests and execute_tests but the \ -pluggable 'Straps' interface that previous versions of Test::Harness \ -supported is not reproduced here. Straps is now available as a stand \ -alone module: Test::Harness::Straps. \ -\ -See TAP::Parser, TAP::Harness for the main documentation for this \ -distribution." - -SECTION = "libs" - -HOMEPAGE = "http://testanything.org" - -LICENSE = "Artistic-1.0 | GPL-1.0-or-later" -LIC_FILES_CHKSUM = "file://README;beginline=29;endline=30;md5=d41d8cd98f00b204e9800998ecf8427e" - -SRC_URI = "${CPAN_MIRROR}/authors/id/L/LE/LEONT/Test-Harness-${PV}.tar.gz" -SRC_URI[sha256sum] = "e73ff89c81c1a53f6baeef6816841b89d3384403ad97422a7da9d1eeb20ef9c5" - -UPSTREAM_CHECK_REGEX = "Test\-Harness\-(?P(\d+\.\d+))(?!_\d+).tar" - -S = "${WORKDIR}/Test-Harness-${PV}" - -inherit cpan ptest-perl - -RDEPENDS:${PN} += "\ - perl-module-benchmark \ -" - -RPROVIDES:${PN} += "libapp-prove-perl \ - libapp-prove-state-perl \ - libapp-prove-state-result-perl \ - libapp-prove-state-result-test-perl \ - libtap-base-perl \ - libtap-formatter-base-perl \ - libtap-formatter-color-perl \ - libtap-formatter-console-perl \ - libtap-formatter-console-parallelsession-perl \ - libtap-formatter-console-session-perl \ - libtap-formatter-file-perl \ - libtap-formatter-file-session-perl \ - libtap-formatter-session-perl \ - libtap-harness-perl \ - libtap-harness-env-perl \ - libtap-object-perl \ - libtap-parser-perl \ - libtap-parser-aggregator-perl \ - libtap-parser-grammar-perl \ - libtap-parser-iterator-perl \ - libtap-parser-iterator-array-perl \ - libtap-parser-iterator-process-perl \ - libtap-parser-iterator-stream-perl \ - libtap-parser-iteratorfactory-perl \ - libtap-parser-multiplexer-perl \ - libtap-parser-result-perl \ - libtap-parsser-result-bailout-perl \ - libtap-parser-result-comment-perl \ - libtap-parser-result-plan-perl \ - libtap-parser-result-pragma-perl \ - libtap-parser-result-test-perl \ - libtap-parser-result-unknown-perl \ - libtap-parser-result-version-perl \ - libtap-parser-result-yaml-perl \ - libtap-parser-resultfactory-perl \ - libtap-parser-scheduler-perl \ - libtap-parser-scheduler-job-perl \ - libtap-parser-scheduler-spinner-perl \ - libtap-parser-source-perl \ - libtap-parser-sourcehandler-perl \ - libtap-parser-sourcehandler-executable-perl \ - libtap-parser-sourcehandler-file-perl \ - libtap-parser-sourcehandler-handle-perl \ - libtap-parser-sourcehandler-perl-perl \ - libtap-parser-sourcehandler-rawtap-perl \ - libtap-parser-yamlish-reader-perl \ - libtap-parser-yamlish-writer-perl \ - " - -do_install:prepend() { - # these tests are inappropriate on target - rm -rf ${B}/t/000-load.t - rm -rf ${B}/t/state.t - # these tests require "-T" (taint) option on command line - rm -rf ${B}/t/aggregator.t - rm -rf ${B}/t/bailout.t - rm -rf ${B}/t/base.t - rm -rf ${B}/t/callbacks.t - rm -rf ${B}/t/errors.t - rm -rf ${B}/t/nested.t - rm -rf ${B}/t/object.t - rm -rf ${B}/t/premature-bailout.t - rm -rf ${B}/t/results.t - rm -rf ${B}/t/streams.t - rm -rf ${B}/t/yamlish-output.t - rm -rf ${B}/t/compat/version.t -} - -do_install:append() { - install -d ${D}/usr/local/bin - # do not clobber perl-misc /usr/bin/prove - install -m 0755 ${B}/bin/prove ${D}/usr/local/bin/ - rm -rf ${D}${bindir}/prove - rm -rf ${D}${bindir} -} - -FILES:${PN} += "/usr/local/bin/prove" - -BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-perl/recipes-perl/libtest/libtest-harness-perl_3.50.bb b/sources/meta-openembedded/meta-perl/recipes-perl/libtest/libtest-harness-perl_3.50.bb new file mode 100644 index 00000000..24b6806b --- /dev/null +++ b/sources/meta-openembedded/meta-perl/recipes-perl/libtest/libtest-harness-perl_3.50.bb @@ -0,0 +1,119 @@ +# NOTE: +# You should use perl-module-test-harness instead of this package, +# unless you specifically need a newer version than what is provided +# by perl in oe-core. + +SUMMARY = "Test::Harness - Run Perl standard test scripts with statistics" +DESCRIPTION = "Although, for historical reasons, the Test::Harness \ +distribution takes its name from this module it now exists only to provide \ +TAP::Harness with an interface that is somewhat backwards compatible \ +with Test::Harness 2.xx. If you're writing new code consider using \ +TAP::Harness directly instead. \ +\ +Emulation is provided for runtests and execute_tests but the \ +pluggable 'Straps' interface that previous versions of Test::Harness \ +supported is not reproduced here. Straps is now available as a stand \ +alone module: Test::Harness::Straps. \ +\ +See TAP::Parser, TAP::Harness for the main documentation for this \ +distribution." + +SECTION = "libs" + +HOMEPAGE = "http://testanything.org" + +LICENSE = "Artistic-1.0 | GPL-1.0-or-later" +LIC_FILES_CHKSUM = "file://README;beginline=29;endline=30;md5=d41d8cd98f00b204e9800998ecf8427e" + +SRC_URI = "${CPAN_MIRROR}/authors/id/L/LE/LEONT/Test-Harness-${PV}.tar.gz" +SRC_URI[sha256sum] = "79b6acdc444f1924cd4c2e9ed868bdc6e09580021aca8ff078ede2ffef8a6f54" + +UPSTREAM_CHECK_REGEX = "Test\-Harness\-(?P(\d+\.\d+))(?!_\d+).tar" + +S = "${WORKDIR}/Test-Harness-${PV}" + +inherit cpan ptest-perl + +RDEPENDS:${PN} += "\ + perl-module-benchmark \ +" + +RPROVIDES:${PN} += "libapp-prove-perl \ + libapp-prove-state-perl \ + libapp-prove-state-result-perl \ + libapp-prove-state-result-test-perl \ + libtap-base-perl \ + libtap-formatter-base-perl \ + libtap-formatter-color-perl \ + libtap-formatter-console-perl \ + libtap-formatter-console-parallelsession-perl \ + libtap-formatter-console-session-perl \ + libtap-formatter-file-perl \ + libtap-formatter-file-session-perl \ + libtap-formatter-session-perl \ + libtap-harness-perl \ + libtap-harness-env-perl \ + libtap-object-perl \ + libtap-parser-perl \ + libtap-parser-aggregator-perl \ + libtap-parser-grammar-perl \ + libtap-parser-iterator-perl \ + libtap-parser-iterator-array-perl \ + libtap-parser-iterator-process-perl \ + libtap-parser-iterator-stream-perl \ + libtap-parser-iteratorfactory-perl \ + libtap-parser-multiplexer-perl \ + libtap-parser-result-perl \ + libtap-parsser-result-bailout-perl \ + libtap-parser-result-comment-perl \ + libtap-parser-result-plan-perl \ + libtap-parser-result-pragma-perl \ + libtap-parser-result-test-perl \ + libtap-parser-result-unknown-perl \ + libtap-parser-result-version-perl \ + libtap-parser-result-yaml-perl \ + libtap-parser-resultfactory-perl \ + libtap-parser-scheduler-perl \ + libtap-parser-scheduler-job-perl \ + libtap-parser-scheduler-spinner-perl \ + libtap-parser-source-perl \ + libtap-parser-sourcehandler-perl \ + libtap-parser-sourcehandler-executable-perl \ + libtap-parser-sourcehandler-file-perl \ + libtap-parser-sourcehandler-handle-perl \ + libtap-parser-sourcehandler-perl-perl \ + libtap-parser-sourcehandler-rawtap-perl \ + libtap-parser-yamlish-reader-perl \ + libtap-parser-yamlish-writer-perl \ + " + +do_install:prepend() { + # these tests are inappropriate on target + rm -rf ${B}/t/000-load.t + rm -rf ${B}/t/state.t + # these tests require "-T" (taint) option on command line + rm -rf ${B}/t/aggregator.t + rm -rf ${B}/t/bailout.t + rm -rf ${B}/t/base.t + rm -rf ${B}/t/callbacks.t + rm -rf ${B}/t/errors.t + rm -rf ${B}/t/nested.t + rm -rf ${B}/t/object.t + rm -rf ${B}/t/premature-bailout.t + rm -rf ${B}/t/results.t + rm -rf ${B}/t/streams.t + rm -rf ${B}/t/yamlish-output.t + rm -rf ${B}/t/compat/version.t +} + +do_install:append() { + install -d ${D}/usr/local/bin + # do not clobber perl-misc /usr/bin/prove + install -m 0755 ${B}/bin/prove ${D}/usr/local/bin/ + rm -rf ${D}${bindir}/prove + rm -rf ${D}${bindir} +} + +FILES:${PN} += "/usr/local/bin/prove" + +BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-python/README.md b/sources/meta-openembedded/meta-python/README.md index b29ccf34..18efb17b 100644 --- a/sources/meta-openembedded/meta-python/README.md +++ b/sources/meta-openembedded/meta-python/README.md @@ -13,11 +13,11 @@ The meta-python layer depends on: URI: git://git.openembedded.org/openembedded-core layers: meta - branch: scarthgap + branch: styhead URI: git://git.openembedded.org/meta-openembedded layers: meta-oe - branch: scarthgap + branch: styhead Contributing ------------------------- @@ -28,10 +28,10 @@ comments and patch review. It is subscriber only, so please register before posting. Send pull requests to openembedded-devel@lists.openembedded.org with -'[meta-python][scarthgap]' in the subject. +'[meta-python][styhead]' in the subject. When sending single patches, please use something like: -git send-email -M -1 --to=openembedded-devel@lists.openembedded.org --subject-prefix='meta-python][scarthgap][PATCH' +git send-email -M -1 --to=openembedded-devel@lists.openembedded.org --subject-prefix='meta-python][styhead][PATCH' Maintenance ------------------------- diff --git a/sources/meta-openembedded/meta-python/conf/include/non-repro-meta-python.inc b/sources/meta-openembedded/meta-python/conf/include/non-repro-meta-python.inc index 629dc4aa..64dc69ed 100755 --- a/sources/meta-openembedded/meta-python/conf/include/non-repro-meta-python.inc +++ b/sources/meta-openembedded/meta-python/conf/include/non-repro-meta-python.inc @@ -1,6 +1,8 @@ # List of known non-reproducible package of the meta-python layer # Please keep this list sorted KNOWN_NON_REPRO_META_PYTHON = " \ + python3-evdev \ + python3-evdev-dbg \ python3-evdev-src \ python3-frozenlist \ python3-frozenlist-dbg \ @@ -8,6 +10,7 @@ KNOWN_NON_REPRO_META_PYTHON = " \ python3-pandas \ python3-pandas-dbg \ python3-pandas-src \ + python3-pybind11-json-dev \ python3-pycocotools-src \ python3-pydantic-core \ python3-pynacl \ diff --git a/sources/meta-openembedded/meta-python/conf/include/ptest-packagelists-meta-python.inc b/sources/meta-openembedded/meta-python/conf/include/ptest-packagelists-meta-python.inc index e07aaf3c..92e64908 100644 --- a/sources/meta-openembedded/meta-python/conf/include/ptest-packagelists-meta-python.inc +++ b/sources/meta-openembedded/meta-python/conf/include/ptest-packagelists-meta-python.inc @@ -17,11 +17,14 @@ PTESTS_FAST_META_PYTHON = "\ python3-cachetools \ python3-cbor2 \ python3-click \ + python3-dasbus \ python3-dominate \ python3-execnet \ + python3-flask \ python3-flexcache \ python3-flexparser \ python3-freezegun \ + python3-fsspec \ python3-geojson \ python3-google-auth-oauthlib \ python3-gpiod \ @@ -72,6 +75,7 @@ PTESTS_FAST_META_PYTHON = "\ python3-tomlkit \ python3-trustme \ python3-typeguard \ + python3-tzdata \ python3-ujson \ python3-u-msgpack-python \ python3-unidiff \ @@ -95,6 +99,7 @@ PTESTS_SLOW_META_PYTHON = "\ python3-pytest-localserver \ python3-scrypt \ python3-traitlets \ + python3-typer \ python3-yappi \ " diff --git a/sources/meta-openembedded/meta-python/conf/layer.conf b/sources/meta-openembedded/meta-python/conf/layer.conf index f48b28b9..aaf620a4 100644 --- a/sources/meta-openembedded/meta-python/conf/layer.conf +++ b/sources/meta-openembedded/meta-python/conf/layer.conf @@ -14,6 +14,6 @@ LAYERVERSION_meta-python = "1" LAYERDEPENDS_meta-python = "core (>= 12) openembedded-layer" -LAYERSERIES_COMPAT_meta-python = "scarthgap" +LAYERSERIES_COMPAT_meta-python = "styhead" LICENSE_PATH += "${LAYERDIR}/licenses" diff --git a/sources/meta-openembedded/meta-python/recipes-core/images/meta-python-image-ptest.bb b/sources/meta-openembedded/meta-python/recipes-core/images/meta-python-image-ptest.bb index 002bd7a3..794b9d1e 100644 --- a/sources/meta-openembedded/meta-python/recipes-core/images/meta-python-image-ptest.bb +++ b/sources/meta-openembedded/meta-python/recipes-core/images/meta-python-image-ptest.bb @@ -29,7 +29,8 @@ QB_MEM = "-m 1024" #QB_MEM:virtclass-mcextend- = "-m 4096" # python3-scrypt ptests run into OOMs on RISCV64 qemu QB_MEM:virtclass-mcextend-python3-scrypt = "-m 2048" -QB_MEM:virtclass-mcextend-python3-fastjsonschema = "-m 2048" +# Needs atleast 5G to avoid OOMs +QB_MEM:virtclass-mcextend-python3-fastjsonschema = "-m 5120" QB_MEM:virtclass-mcextend-python3-pillow = "-m 2048" TEST_SUITES = "ping ssh parselogs ptest" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/pamela_1.1.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/pamela_1.1.0.bb deleted file mode 100644 index 3573de55..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/pamela_1.1.0.bb +++ /dev/null @@ -1,14 +0,0 @@ -DESCRIPTION = "Pamela: yet another Python wrapper for PAM" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://PKG-INFO;md5=6b706db92112b8384848de3e5c6adaa3" - -SRC_URI[sha256sum] = "d4b139fe600e192e176a2a368059207a6bffa0e7879879b13f4fcba0163481be" - -PYPI_PACKAGE = "pamela" - -inherit pypi setuptools3 - -RDEPENDS:${PN} = "libpam" - -inherit features_check -REQUIRED_DISTRO_FEATURES = "pam" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/pamela_1.2.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/pamela_1.2.0.bb new file mode 100644 index 00000000..ff87e187 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/pamela_1.2.0.bb @@ -0,0 +1,14 @@ +DESCRIPTION = "Pamela: yet another Python wrapper for PAM" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://PKG-INFO;md5=b5fa9af58a8076d81145be56b6801a2b" + +SRC_URI[sha256sum] = "0ea6e2a99dded8c7783a4a06f2d31f5bdcad894d79101e8f09322e387a34aacf" + +PYPI_PACKAGE = "pamela" + +inherit pypi setuptools3 + +RDEPENDS:${PN} = "libpam" + +inherit features_check +REQUIRED_DISTRO_FEATURES = "pam" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python-libusb1_3.1.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python-libusb1_3.1.0.bb index a045dfa8..3d776560 100644 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python-libusb1_3.1.0.bb +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python-libusb1_3.1.0.bb @@ -1,6 +1,5 @@ SUMMARY = "Pure-python wrapper for libusb-1.0" HOMEPAGE = "http://github.com/vpelletier/python-libusb1" -AUTHOR = "Vincent Pelletier " LICENSE = "GPL-2.0-only & LGPL-2.1-only" LIC_FILES_CHKSUM = " \ file://COPYING;md5=751419260aa954499f7abaabaa882bbe \ diff --git a/sources/poky/meta/recipes-devtools/python/python-rfc3986-validator/0001-setup.py-move-pytest-runner-to-test_requirements.patch b/sources/meta-openembedded/meta-python/recipes-devtools/python/python-rfc3986-validator/0001-setup.py-move-pytest-runner-to-test_requirements.patch similarity index 100% rename from sources/poky/meta/recipes-devtools/python/python-rfc3986-validator/0001-setup.py-move-pytest-runner-to-test_requirements.patch rename to sources/meta-openembedded/meta-python/recipes-devtools/python/python-rfc3986-validator/0001-setup.py-move-pytest-runner-to-test_requirements.patch diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-a2wsgi_1.10.4.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-a2wsgi_1.10.4.bb deleted file mode 100644 index e6b98026..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-a2wsgi_1.10.4.bb +++ /dev/null @@ -1,33 +0,0 @@ -SUMMARY = "Convert WSGI app to ASGI app or ASGI app to WSGI app." -HOMEPAGE = "https://github.com/abersheeran/a2wsgi" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=e10d05d29ec6d8be8bfc503683f1bc9a" - -inherit pypi python_setuptools_build_meta ptest - -SRC_URI[sha256sum] = "50e81ac55aa609fa2c666e42bacc25c424c8884ce6072f1a7e902114b7ee5d63" - -DEPENDS += " \ - python3-pdm-native \ - python3-pdm-backend-native \ -" - -SRC_URI += " \ - file://run-ptest \ -" - -RDEPENDS:${PN}-ptest += " \ - python3-httpx \ - python3-pytest \ - python3-pytest-asyncio \ - python3-unittest-automake-output \ -" - -do_install_ptest() { - install -d ${D}${PTEST_PATH}/tests - cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ -} - -RDEPENDS:${PN} += " \ - python3-asyncio \ -" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-a2wsgi_1.10.7.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-a2wsgi_1.10.7.bb new file mode 100644 index 00000000..e65519ec --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-a2wsgi_1.10.7.bb @@ -0,0 +1,33 @@ +SUMMARY = "Convert WSGI app to ASGI app or ASGI app to WSGI app." +HOMEPAGE = "https://github.com/abersheeran/a2wsgi" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=e10d05d29ec6d8be8bfc503683f1bc9a" + +inherit pypi python_setuptools_build_meta ptest + +SRC_URI[sha256sum] = "ce462ff7e1daac0bc57183c6f800f09a71c2a7a98ddd5cdeca149e3eabf3338e" + +DEPENDS += " \ + python3-pdm-native \ + python3-pdm-backend-native \ +" + +SRC_URI += " \ + file://run-ptest \ +" + +RDEPENDS:${PN}-ptest += " \ + python3-httpx \ + python3-pytest \ + python3-pytest-asyncio \ + python3-unittest-automake-output \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ +} + +RDEPENDS:${PN} += " \ + python3-asyncio \ +" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-aiofiles_23.2.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-aiofiles_23.2.1.bb deleted file mode 100644 index 73dc1742..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-aiofiles_23.2.1.bb +++ /dev/null @@ -1,15 +0,0 @@ -SUMMARY = "File support for asyncio" -DESCRIPTION = "Asynchronous local file IO library for asyncio and Python" -HOMEPAGE = "https://github.com/aio-libs/aiohttp" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=d2794c0df5b907fdace235a619d80314" - -SRC_URI[sha256sum] = "84ec2218d8419404abcb9f0c02df3f34c6e0a68ed41072acfb1cef5cbc29051a" - -PYPI_PACKAGE = "aiofiles" - -inherit pypi python_hatchling - -RDEPENDS:${PN} = "\ - python3-asyncio \ -" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-aiofiles_24.1.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-aiofiles_24.1.0.bb new file mode 100644 index 00000000..1e9ebdf9 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-aiofiles_24.1.0.bb @@ -0,0 +1,15 @@ +SUMMARY = "File support for asyncio" +DESCRIPTION = "Asynchronous local file IO library for asyncio and Python" +HOMEPAGE = "https://github.com/aio-libs/aiohttp" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=d2794c0df5b907fdace235a619d80314" + +SRC_URI[sha256sum] = "22a075c9e5a3810f0c2e48f3008c94d68c65d763b9b03857924c99e57355166c" + +PYPI_PACKAGE = "aiofiles" + +inherit pypi python_hatchling + +RDEPENDS:${PN} = "\ + python3-asyncio \ +" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-aiohappyeyeballs_2.3.2.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-aiohappyeyeballs_2.3.2.bb deleted file mode 100644 index edad28e7..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-aiohappyeyeballs_2.3.2.bb +++ /dev/null @@ -1,12 +0,0 @@ -SUMMARY = "Happy Eyeballs" -DESCRIPTION = "This library exists to allow connecting with Happy Eyeballs when you already have a list of addrinfo and not a DNS name." -HOMEPAGE = "https://github.com/aio-libs/aiohappyeyeballs" -LICENSE = "PSF-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=fcf6b249c2641540219a727f35d8d2c2" - -SRC_URI[sha256sum] = "77e15a733090547a1f5369a1287ddfc944bd30df0eb8993f585259c34b405f4e" - -inherit pypi python_poetry_core - -BBCLASSEXTEND = "native nativesdk" - diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-aiohappyeyeballs_2.4.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-aiohappyeyeballs_2.4.0.bb new file mode 100644 index 00000000..94049228 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-aiohappyeyeballs_2.4.0.bb @@ -0,0 +1,12 @@ +SUMMARY = "Happy Eyeballs" +DESCRIPTION = "This library exists to allow connecting with Happy Eyeballs when you already have a list of addrinfo and not a DNS name." +HOMEPAGE = "https://github.com/aio-libs/aiohappyeyeballs" +LICENSE = "PSF-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=fcf6b249c2641540219a727f35d8d2c2" + +SRC_URI[sha256sum] = "55a1714f084e63d49639800f95716da97a1f173d46a16dfcfda0016abb93b6b2" + +inherit pypi python_poetry_core + +BBCLASSEXTEND = "native nativesdk" + diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-aiohttp_3.10.5.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-aiohttp_3.10.5.bb new file mode 100644 index 00000000..f167b9d6 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-aiohttp_3.10.5.bb @@ -0,0 +1,22 @@ +SUMMARY = "Async http client/server framework" +DESCRIPTION = "Asynchronous HTTP client/server framework for asyncio and Python" +HOMEPAGE = "https://github.com/aio-libs/aiohttp" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=748073912af33aa59430d3702aa32d41" + +SRC_URI[sha256sum] = "f071854b47d39591ce9a17981c46790acb30518e2f83dfca8db2dfa091178691" + +PYPI_PACKAGE = "aiohttp" +inherit python_setuptools_build_meta pypi + +RDEPENDS:${PN} = "\ + python3-aiohappyeyeballs \ + python3-aiosignal \ + python3-async-timeout \ + python3-attrs \ + python3-frozenlist \ + python3-misc \ + python3-multidict \ + python3-yarl \ + python3-aiodns \ +" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-aiohttp_3.9.4.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-aiohttp_3.9.4.bb deleted file mode 100644 index 1cfed0d7..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-aiohttp_3.9.4.bb +++ /dev/null @@ -1,22 +0,0 @@ -SUMMARY = "Async http client/server framework" -DESCRIPTION = "Asynchronous HTTP client/server framework for asyncio and Python" -HOMEPAGE = "https://github.com/aio-libs/aiohttp" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=748073912af33aa59430d3702aa32d41" - -SRC_URI[sha256sum] = "6ff71ede6d9a5a58cfb7b6fffc83ab5d4a63138276c771ac91ceaaddf5459644" - -PYPI_PACKAGE = "aiohttp" -inherit python_setuptools_build_meta pypi - -RDEPENDS:${PN} = "\ - python3-aiohappyeyeballs \ - python3-aiosignal \ - python3-async-timeout \ - python3-attrs \ - python3-frozenlist \ - python3-misc \ - python3-multidict \ - python3-yarl \ - python3-aiodns \ -" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-aiohue_4.7.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-aiohue_4.7.1.bb deleted file mode 100644 index 438c771d..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-aiohue_4.7.1.bb +++ /dev/null @@ -1,16 +0,0 @@ -DESCRIPTION = "Asynchronous library to control Philips Hue" -HOMEPAGE = "https://pypi.org/project/aiohue/" -SECTION = "devel/python" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=dab31a1d28183826937f4b152143a33f" - -SRC_URI[sha256sum] = "29b5e5ae05938cac195b1969e70bd6ad4e4e2e105d0e565849803d2a99ff47d1" - -inherit pypi python_setuptools_build_meta - -RDEPENDS:${PN} += " \ - python3-aiohttp \ - python3-asyncio-throttle \ - python3-profile \ - python3-awesomeversion \ -" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-aiohue_4.7.3.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-aiohue_4.7.3.bb new file mode 100644 index 00000000..bc4e4016 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-aiohue_4.7.3.bb @@ -0,0 +1,15 @@ +DESCRIPTION = "Asynchronous library to control Philips Hue" +HOMEPAGE = "https://pypi.org/project/aiohue/" +SECTION = "devel/python" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=dab31a1d28183826937f4b152143a33f" + +SRC_URI[sha256sum] = "9a50dfed1174dfc901ebbd29f1d0da5ce02c9704282ece004de40fce20774783" + +inherit pypi python_setuptools_build_meta + +RDEPENDS:${PN} += "\ + python3-aiohttp \ + python3-asyncio-throttle \ + python3-awesomeversion \ +" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-aioserial/0001-use-poetry-core-for-pyproject-base-build.patch b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-aioserial/0001-use-poetry-core-for-pyproject-base-build.patch new file mode 100644 index 00000000..139bdb4f --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-aioserial/0001-use-poetry-core-for-pyproject-base-build.patch @@ -0,0 +1,29 @@ +From 5798a250b465572d84a024389b173dc996690b03 Mon Sep 17 00:00:00 2001 +From: alperak +Date: Thu, 8 Aug 2024 12:56:31 +0300 +Subject: [PATCH] Use poetry-core for pyproject base build + +https://github.com/python-poetry/poetry-core#why-is-this-required + +Upstream-Status: Pending + +Signed-off-by: alperak +--- + pyproject.toml | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/pyproject.toml b/pyproject.toml +index 6243bff..06bc409 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -15,5 +15,5 @@ python = "^3.6" + pyserial = "*" + + [build-system] +-requires = ["poetry>=0.12"] +-build-backend = "poetry.masonry.api" ++requires = ["poetry-core>=0.12"] ++build-backend = "poetry.core.masonry.api" +-- +2.25.1 + diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-aioserial_1.3.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-aioserial_1.3.1.bb index 8279f270..5acbcbf9 100755 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-aioserial_1.3.1.bb +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-aioserial_1.3.1.bb @@ -5,11 +5,10 @@ SECTION = "devel/python" LICENSE = "MPL-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=650b9179efef1ea560df5c08bc32b494" -PYPI_PACKAGE = "aioserial" - +SRC_URI += "file://0001-use-poetry-core-for-pyproject-base-build.patch" SRC_URI[sha256sum] = "702bf03b0eb84b8ef2d8dac5cb925e1e685dce98f77b125569bc6fd2b3b58228" -inherit pypi setuptools3 +inherit pypi python_poetry_core RDEPENDS:${PN} += " \ python3-asyncio \ diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-aiosignal_1.3.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-aiosignal_1.3.1.bb index fd4ec767..029f13cd 100644 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-aiosignal_1.3.1.bb +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-aiosignal_1.3.1.bb @@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=cf056e8e7a0a5477451af18b7b5aa98c" SRC_URI[sha256sum] = "54cd96e15e1649b75d6c87526a6ff0b6c1b0dd3459f43d9ca11d48c339b68cfc" -inherit pypi setuptools3 +inherit pypi python_setuptools_build_meta BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-alembic_1.13.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-alembic_1.13.1.bb deleted file mode 100644 index c4853c44..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-alembic_1.13.1.bb +++ /dev/null @@ -1,19 +0,0 @@ -DESCRIPTION = "A database migration tool for SQLAlchemy" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=e3023b042cb6002cb398344b51c67093" - -inherit pypi setuptools3 - -SRC_URI[sha256sum] = "4932c8558bf68f2ee92b9bbcb8218671c627064d5b08939437af6d77dc05e595" - -PYPI_PACKAGE = "alembic" - -RDEPENDS:${PN} += "\ - python3-dateutil \ - python3-editor \ - python3-mako \ - python3-sqlalchemy \ - python3-misc \ -" - -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-alembic_1.13.3.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-alembic_1.13.3.bb new file mode 100644 index 00000000..f046c3eb --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-alembic_1.13.3.bb @@ -0,0 +1,17 @@ +DESCRIPTION = "A database migration tool for SQLAlchemy" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=00f8f5c8aab58c3e1cd61525a6675174" + +inherit pypi python_setuptools_build_meta + +SRC_URI[sha256sum] = "203503117415561e203aa14541740643a611f641517f0209fcae63e9fa09f1a2" + +RDEPENDS:${PN} += "\ + python3-dateutil \ + python3-editor \ + python3-mako \ + python3-sqlalchemy \ + python3-misc \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-annotated-types_0.6.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-annotated-types_0.6.0.bb deleted file mode 100644 index 79cbb66b..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-annotated-types_0.6.0.bb +++ /dev/null @@ -1,14 +0,0 @@ -SUMMARY = "Reusable constraint types to use with typing.Annotated" -DESCRIPTION = "" -HOMEPAGE = "" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=c6afb13fdc220497ee5cded1e717ed67" - -SRC_URI[sha256sum] = "563339e807e53ffd9c267e99fc6d9ea23eb8443c08f112651963e24e22f84a5d" - -S = "${WORKDIR}/annotated_types-${PV}" -PYPI_PACKAGE = "annotated_types" - -inherit pypi python_hatchling - -RDEPENDS:${PN} = "python3-typing-extensions" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-annotated-types_0.7.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-annotated-types_0.7.0.bb new file mode 100644 index 00000000..53552d0b --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-annotated-types_0.7.0.bb @@ -0,0 +1,14 @@ +SUMMARY = "Reusable constraint types to use with typing.Annotated" +DESCRIPTION = "" +HOMEPAGE = "" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=c6afb13fdc220497ee5cded1e717ed67" + +SRC_URI[sha256sum] = "aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89" + +S = "${WORKDIR}/annotated_types-${PV}" +PYPI_PACKAGE = "annotated_types" + +inherit pypi python_hatchling + +RDEPENDS:${PN} = "python3-typing-extensions" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-ansi2html_1.9.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-ansi2html_1.9.1.bb deleted file mode 100644 index 6af89891..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-ansi2html_1.9.1.bb +++ /dev/null @@ -1,19 +0,0 @@ -DESCRPTION = "ansi2html - Convert text with ANSI color codes to HTML or to LaTeX" -HOMEPAGE = "https://github.com/ralphbean/ansi2html" -LIC_FILES_CHKSUM = "file://LICENSE;md5=3000208d539ec061b899bce1d9ce9404" -LICENSE = "GPL-3.0-only" - -PYPI_PACKAGE = "ansi2html" - -SRC_URI[sha256sum] = "5c6837a13ecc1903aab7a545353312049dfedfe5105362ad3a8d9d207871ec71" - -inherit pypi python_setuptools_build_meta - -DEPENDS += " \ - python3-setuptools-scm-native \ -" - -RDEPENDS:${PN} = " \ - python3-six \ - python3-compression \ -" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-ansi2html_1.9.2.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-ansi2html_1.9.2.bb new file mode 100644 index 00000000..d817d8ee --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-ansi2html_1.9.2.bb @@ -0,0 +1,19 @@ +DESCRPTION = "ansi2html - Convert text with ANSI color codes to HTML or to LaTeX" +HOMEPAGE = "https://github.com/pycontribs/ansi2html" +LIC_FILES_CHKSUM = "file://LICENSE;md5=3000208d539ec061b899bce1d9ce9404" +LICENSE = "LGPL-3.0-or-later" + +PYPI_PACKAGE = "ansi2html" + +SRC_URI[sha256sum] = "3453bf87535d37b827b05245faaa756dbab4ec3d69925e352b6319c3c955c0a5" + +inherit pypi python_setuptools_build_meta + +DEPENDS += " \ + python3-setuptools-scm-native \ +" + +RDEPENDS:${PN} = " \ + python3-six \ + python3-compression \ +" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-anyio_4.3.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-anyio_4.3.0.bb deleted file mode 100644 index 2c7a9f8c..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-anyio_4.3.0.bb +++ /dev/null @@ -1,27 +0,0 @@ -SUMMARY = "High level compatibility layer for multiple asynchronous event loop implementations" -SECTION = "devel/python" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=c0a769411d2af7894099e8ff75058c9f" - -inherit pypi python_setuptools_build_meta - -SRC_URI[sha256sum] = "f75253795a87df48568485fd18cdd2a3fa5c4f7c5be8e5e36637733fce06fed6" - -DEPENDS += " \ - python3-setuptools-scm-native \ -" - -# Don't provide "trio" PACKAGECONFIG as nothing provides "python3-trio" currently. -# If somebody needs this please feel free to add python3-trio and enable the -# packageconfig below: -#PACKAGECONFIG ??= "" -#PACKAGECONFIG[trio] = ",,,python3-trio" - -RDEPENDS:${PN} += "\ - python3-idna \ - python3-sniffio \ - python3-core \ - python3-numbers \ - python3-io \ - python3-asyncio \ -" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-anyio_4.4.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-anyio_4.4.0.bb new file mode 100644 index 00000000..28c76cbf --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-anyio_4.4.0.bb @@ -0,0 +1,27 @@ +SUMMARY = "High level compatibility layer for multiple asynchronous event loop implementations" +SECTION = "devel/python" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=c0a769411d2af7894099e8ff75058c9f" + +inherit pypi python_setuptools_build_meta + +SRC_URI[sha256sum] = "5aadc6a1bbb7cdb0bede386cac5e2940f5e2ff3aa20277e991cf028e0585ce94" + +DEPENDS += " \ + python3-setuptools-scm-native \ +" + +# Don't provide "trio" PACKAGECONFIG as nothing provides "python3-trio" currently. +# If somebody needs this please feel free to add python3-trio and enable the +# packageconfig below: +#PACKAGECONFIG ??= "" +#PACKAGECONFIG[trio] = ",,,python3-trio" + +RDEPENDS:${PN} += "\ + python3-idna \ + python3-sniffio \ + python3-core \ + python3-numbers \ + python3-io \ + python3-asyncio \ +" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-apispec_6.4.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-apispec_6.4.0.bb deleted file mode 100644 index a48e1cfa..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-apispec_6.4.0.bb +++ /dev/null @@ -1,10 +0,0 @@ -SUMMARY = "A pluggable API specification generator. Currently supports the OpenAPI Specification (f.k.a. the Swagger specification)." -HOMEPAGE = "https://github.com/marshmallow-code/apispec" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=3d9c303644a2e62578f0347748a80358" - -inherit pypi setuptools3 - -SRC_URI[sha256sum] = "42b8a6833cf154c9dbd22d006b56bf9c49c972d32d24fe716fd734e0f6b739b8" - -RDEPENDS:${PN} += "python3-packaging" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-apispec_6.6.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-apispec_6.6.1.bb new file mode 100644 index 00000000..90d7ee27 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-apispec_6.6.1.bb @@ -0,0 +1,10 @@ +SUMMARY = "A pluggable API specification generator. Currently supports the OpenAPI Specification (f.k.a. the Swagger specification)." +HOMEPAGE = "https://github.com/marshmallow-code/apispec" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=a75956865b40c80a37c1e864716592b4" + +inherit pypi python_setuptools_build_meta + +SRC_URI[sha256sum] = "f5caa47cee75fe03b9c50b5594048b4c052eeca2c212e0dac12dbb6175d9a659" + +RDEPENDS:${PN} += "python3-packaging" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-argcomplete_3.3.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-argcomplete_3.3.0.bb deleted file mode 100644 index d9686101..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-argcomplete_3.3.0.bb +++ /dev/null @@ -1,18 +0,0 @@ -SUMMARY = "Argcomplete provides easy, extensible command line tab completion of arguments for your Python script." -HOMEPAGE = "https://github.com/kislyuk/argcomplete" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=2ee41112a44fe7014dce33e26468ba93" - -SRC_URI[sha256sum] = "fd03ff4a5b9e6580569d34b273f741e85cd9e072f3feeeee3eba4891c70eda62" - -PYPI_PACKAGE = "argcomplete" - -inherit pypi setuptools3 - -RDEPENDS:${PN} += "\ - python3-core \ - python3-io \ -" - -BBCLASSEXTEND = "native nativesdk" - diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-argcomplete_3.5.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-argcomplete_3.5.0.bb new file mode 100644 index 00000000..a5cf6298 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-argcomplete_3.5.0.bb @@ -0,0 +1,22 @@ +SUMMARY = "Argcomplete provides easy, extensible command line tab completion of arguments for your Python script." +HOMEPAGE = "https://github.com/kislyuk/argcomplete" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=2ee41112a44fe7014dce33e26468ba93" + +SRC_URI[sha256sum] = "4349400469dccfb7950bb60334a680c58d88699bff6159df61251878dc6bf74b" + +PYPI_PACKAGE = "argcomplete" + +inherit pypi python_setuptools_build_meta + +DEPENDS += " \ + python3-setuptools-scm-native \ +" + +RDEPENDS:${PN} += "\ + python3-core \ + python3-io \ +" + +BBCLASSEXTEND = "native nativesdk" + diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-argh_0.31.2.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-argh_0.31.2.bb deleted file mode 100644 index afcd7d96..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-argh_0.31.2.bb +++ /dev/null @@ -1,26 +0,0 @@ -SUMMARY = "An unobtrusive argparse wrapper with natural syntax" -DESCRIPTION = "Building a command-line interface? Found yourself uttering \ -'argh!' while struggling with the API of argparse? Don't like the complexity \ -but need the power? \ -\ -Everything should be made as simple as possible, but no simpler. \ -\ -—Albert Einstein (probably) \ -\ -Argh is a smart wrapper for argparse. Argparse is a very powerful \ -tool; Argh just makes it easy to use." - -LICENSE = "LGPL-3.0-or-later" -LIC_FILES_CHKSUM = "file://COPYING.LESSER;md5=3000208d539ec061b899bce1d9ce9404 \ - " - -SRC_URI[sha256sum] = "db1c34885804f7d4646c385dc2fb19b45298561322f4c15eae1b133993f9e323" - -inherit pypi python_flit_core - -RDEPENDS:${PN} += " \ - python3-argcomplete \ - python3-logging \ -" - -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-argh_0.31.3.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-argh_0.31.3.bb new file mode 100644 index 00000000..82b45d5a --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-argh_0.31.3.bb @@ -0,0 +1,26 @@ +SUMMARY = "An unobtrusive argparse wrapper with natural syntax" +DESCRIPTION = "Building a command-line interface? Found yourself uttering \ +'argh!' while struggling with the API of argparse? Don't like the complexity \ +but need the power? \ +\ +Everything should be made as simple as possible, but no simpler. \ +\ +—Albert Einstein (probably) \ +\ +Argh is a smart wrapper for argparse. Argparse is a very powerful \ +tool; Argh just makes it easy to use." + +LICENSE = "LGPL-3.0-or-later" +LIC_FILES_CHKSUM = "file://COPYING.LESSER;md5=3000208d539ec061b899bce1d9ce9404 \ + " + +SRC_URI[sha256sum] = "f30023d8be14ca5ee6b1b3eeab829151d7bbda464ae07dc4dd5347919c5892f9" + +inherit pypi python_flit_core + +RDEPENDS:${PN} += " \ + python3-argcomplete \ + python3-logging \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-astroid_3.1.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-astroid_3.1.0.bb deleted file mode 100644 index 3c68f1e5..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-astroid_3.1.0.bb +++ /dev/null @@ -1,37 +0,0 @@ -SUMMARY = "An abstract syntax tree for Python with inference support." -HOMEPAGE = "https://pypi.python.org/pypi/astroid" -SECTION = "devel/python" -LICENSE = "LGPL-2.1-only" -LIC_FILES_CHKSUM = "file://LICENSE;md5=a70cf540abf41acb644ac3b621b2fad1" - -SRC_URI[sha256sum] = "ac248253bfa4bd924a0de213707e7ebeeb3138abeb48d798784ead1e56d419d4" - -inherit pypi python_setuptools_build_meta - -DEPENDS += "\ - python3-pytest-runner-native \ - python3-wheel-native \ -" - -PACKAGES =+ "${PN}-tests" - -FILES:${PN}-tests += " \ - ${PYTHON_SITEPACKAGES_DIR}/astroid/test* \ - ${PYTHON_SITEPACKAGES_DIR}/astroid/__pycache__/test* \ -" - -RDEPENDS:${PN}:class-target += "\ - python3-lazy-object-proxy \ - python3-logging \ - python3-six \ - python3-wrapt \ - python3-setuptools \ - python3-typing-extensions \ -" - -RDEPENDS:${PN}-tests:class-target += "\ - python3-unittest \ - python3-xml \ -" - -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-astroid_3.3.2.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-astroid_3.3.2.bb new file mode 100644 index 00000000..e5f05bd0 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-astroid_3.3.2.bb @@ -0,0 +1,37 @@ +SUMMARY = "An abstract syntax tree for Python with inference support." +HOMEPAGE = "https://pypi.python.org/pypi/astroid" +SECTION = "devel/python" +LICENSE = "LGPL-2.1-only" +LIC_FILES_CHKSUM = "file://LICENSE;md5=a70cf540abf41acb644ac3b621b2fad1" + +SRC_URI[sha256sum] = "99e9b5b602cbb005434084309213d6af32bf7a9b743c836749168b8e2b330cbd" + +inherit pypi python_setuptools_build_meta + +DEPENDS += "\ + python3-pytest-runner-native \ + python3-wheel-native \ +" + +PACKAGES =+ "${PN}-tests" + +FILES:${PN}-tests += " \ + ${PYTHON_SITEPACKAGES_DIR}/astroid/test* \ + ${PYTHON_SITEPACKAGES_DIR}/astroid/__pycache__/test* \ +" + +RDEPENDS:${PN}:class-target += "\ + python3-lazy-object-proxy \ + python3-logging \ + python3-six \ + python3-wrapt \ + python3-setuptools \ + python3-typing-extensions \ +" + +RDEPENDS:${PN}-tests:class-target += "\ + python3-unittest \ + python3-xml \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-asyncinotify_4.0.6.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-asyncinotify_4.0.6.bb deleted file mode 100644 index 34f7187d..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-asyncinotify_4.0.6.bb +++ /dev/null @@ -1,15 +0,0 @@ -SUMMARY = "A simple optionally-async python inotify library, focused on simplicity of use and operation, and leveraging modern Python features" -HOMEPAGE = "https://gitlab.com/Taywee/asyncinotify" -LICENSE = "MPL-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=f75d2927d3c1ed2414ef72048f5ad640" - -SRC_URI[sha256sum] = "c03fdb1a7dbb6bed8ede763e4e0ac224a2a3157bdc51e4ba3832588a3c29904d" - -inherit pypi python_setuptools_build_meta - -RDEPENDS:${PN} += " \ - python3-asyncio \ - python3-core \ - python3-ctypes \ - python3-io \ -" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-asyncinotify_4.0.9.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-asyncinotify_4.0.9.bb new file mode 100644 index 00000000..0946dd2a --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-asyncinotify_4.0.9.bb @@ -0,0 +1,15 @@ +SUMMARY = "A simple optionally-async python inotify library, focused on simplicity of use and operation, and leveraging modern Python features" +HOMEPAGE = "https://gitlab.com/Taywee/asyncinotify" +LICENSE = "MPL-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=f75d2927d3c1ed2414ef72048f5ad640" + +SRC_URI[sha256sum] = "d0fc2c9af487b6ac2a3bd7db7b5139de54afcc3660720f80d7324b122a27c1c7" + +inherit pypi python_setuptools_build_meta + +RDEPENDS:${PN} += " \ + python3-asyncio \ + python3-core \ + python3-ctypes \ + python3-io \ +" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-autobahn_23.6.2.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-autobahn_23.6.2.bb deleted file mode 100644 index d9cc40b1..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-autobahn_23.6.2.bb +++ /dev/null @@ -1,21 +0,0 @@ -DESCRIPTION = "WebSocket client & server library, WAMP real-time framework" -HOMEPAGE = "http://crossbar.io/autobahn" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=3e2c2c2cc2915edc5321b0e6b1d3f5f8" - -SRC_URI[sha256sum] = "ec9421c52a2103364d1ef0468036e6019ee84f71721e86b36fe19ad6966c1181" - -inherit pypi setuptools3 - -RDEPENDS:${PN} += " \ - python3-twisted \ - python3-zopeinterface \ - python3-py-ubjson \ - python3-cbor2 \ - python3-u-msgpack-python \ - python3-lz4 \ - python3-snappy \ - python3-pyopenssl \ - python3-txaio \ - python3-six \ -" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-autobahn_24.4.2.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-autobahn_24.4.2.bb new file mode 100644 index 00000000..d785a76c --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-autobahn_24.4.2.bb @@ -0,0 +1,21 @@ +DESCRIPTION = "WebSocket client & server library, WAMP real-time framework" +HOMEPAGE = "http://crossbar.io/autobahn" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=588502cb4ffc65da2b26780d6baa5a40" + +SRC_URI[sha256sum] = "a2d71ef1b0cf780b6d11f8b205fd2c7749765e65795f2ea7d823796642ee92c9" + +inherit pypi setuptools3 + +RDEPENDS:${PN} += " \ + python3-twisted \ + python3-zopeinterface \ + python3-py-ubjson \ + python3-cbor2 \ + python3-u-msgpack-python \ + python3-lz4 \ + python3-snappy \ + python3-pyopenssl \ + python3-txaio \ + python3-six \ +" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-autoflake_2.2.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-autoflake_2.2.1.bb deleted file mode 100644 index 7b743086..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-autoflake_2.2.1.bb +++ /dev/null @@ -1,12 +0,0 @@ -SUMMARY = "Removes unused imports and unused variables" -SECTION = "devel/python" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=88246be6a34c1496c253f58599f3db85" - -SRC_URI[sha256sum] = "62b7b6449a692c3c9b0c916919bbc21648da7281e8506bcf8d3f8280e431ebc1" - -inherit pypi python_hatchling - -RDEPENDS:${PN} += "python3-pyflakes" - -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-autoflake_2.3.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-autoflake_2.3.1.bb new file mode 100644 index 00000000..0a44d751 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-autoflake_2.3.1.bb @@ -0,0 +1,12 @@ +SUMMARY = "Removes unused imports and unused variables" +SECTION = "devel/python" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=88246be6a34c1496c253f58599f3db85" + +SRC_URI[sha256sum] = "c98b75dc5b0a86459c4f01a1d32ac7eb4338ec4317a4469515ff1e687ecd909e" + +inherit pypi python_hatchling + +RDEPENDS:${PN} += "python3-pyflakes" + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-automat_22.10.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-automat_22.10.0.bb deleted file mode 100644 index 9e33fe78..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-automat_22.10.0.bb +++ /dev/null @@ -1,16 +0,0 @@ -DESCRIPTION = "Self-service finite-state machines for the programmer on the go" -HOMEPAGE = "https://github.com/glyph/Automat" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=4ad213bcca81688e94593e5f60c87477" - -SRC_URI[sha256sum] = "e56beb84edad19dcc11d30e8d9b895f75deeb5ef5e96b84a467066b3b84bb04e" - -DEPENDS += "python3-setuptools-scm-native" - -PYPI_PACKAGE = "Automat" -inherit pypi setuptools3 - -RDEPENDS:${PN} += "\ - python3-attrs \ - python3-six \ -" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-automat_24.8.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-automat_24.8.1.bb new file mode 100644 index 00000000..e2a31bea --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-automat_24.8.1.bb @@ -0,0 +1,11 @@ +DESCRIPTION = "Self-service finite-state machines for the programmer on the go" +HOMEPAGE = "https://github.com/glyph/Automat" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=4ad213bcca81688e94593e5f60c87477" + +SRC_URI[sha256sum] = "b34227cf63f6325b8ad2399ede780675083e439b20c323d376373d8ee6306d88" + +DEPENDS += "python3-setuptools-scm-native" + +inherit pypi python_setuptools_build_meta + diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-awesomeversion_24.2.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-awesomeversion_24.2.0.bb deleted file mode 100644 index 8b19605b..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-awesomeversion_24.2.0.bb +++ /dev/null @@ -1,11 +0,0 @@ -DESCRIPTION = "One version package to rule them all, One version package to find them, One version package to bring them all, and in the darkness bind them." -HOMEPAGE = "https://pypi.org/project/awesomeversion/" -SECTION = "devel/python" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENCE.md;md5=92622b5a8e216099be741d78328bae5d" - -SRC_URI[sha256sum] = "47a6dcbbe2921b725f75106a66ab30f26f1f33dbc5e07bc8e1e39d8eb921f53c" - -RDEPENDS:${PN} += "python3-profile python3-logging" - -inherit pypi python_poetry_core diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-awesomeversion_24.6.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-awesomeversion_24.6.0.bb new file mode 100644 index 00000000..8bb5ddd5 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-awesomeversion_24.6.0.bb @@ -0,0 +1,11 @@ +DESCRIPTION = "One version package to rule them all, One version package to find them, One version package to bring them all, and in the darkness bind them." +HOMEPAGE = "https://pypi.org/project/awesomeversion/" +SECTION = "devel/python" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENCE.md;md5=92622b5a8e216099be741d78328bae5d" + +SRC_URI[sha256sum] = "aee7ccbaed6f8d84e0f0364080c7734a0166d77ea6ccfcc4900b38917f1efc71" + +RDEPENDS:${PN} += "python3-profile python3-logging" + +inherit pypi python_poetry_core diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-bandit_1.7.8.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-bandit_1.7.8.bb deleted file mode 100644 index 8b096885..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-bandit_1.7.8.bb +++ /dev/null @@ -1,19 +0,0 @@ -SUMMARY = "Security oriented static analyser for python code." -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=34400b68072d710fecd0a2940a0d1658" - -SRC_URI[sha256sum] = "36de50f720856ab24a24dbaa5fee2c66050ed97c1477e0a1159deab1775eab6b" - -DEPENDS = "python3-pbr-native python3-git python3-pbr python3-pyyaml python3-six python3-stevedore" - -inherit setuptools3 pypi - -RDEPENDS:${PN} += "\ - python3-git \ - python3-modules \ - python3-pbr \ - python3-pyyaml \ - python3-rich \ - python3-six \ - python3-stevedore \ - " diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-bandit_1.7.9.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-bandit_1.7.9.bb new file mode 100644 index 00000000..730bf116 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-bandit_1.7.9.bb @@ -0,0 +1,19 @@ +SUMMARY = "Security oriented static analyser for python code." +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=34400b68072d710fecd0a2940a0d1658" + +SRC_URI[sha256sum] = "7c395a436743018f7be0a4cbb0a4ea9b902b6d87264ddecf8cfdc73b4f78ff61" + +DEPENDS = "python3-pbr-native python3-git python3-pbr python3-pyyaml python3-six python3-stevedore" + +inherit setuptools3 pypi + +RDEPENDS:${PN} += "\ + python3-git \ + python3-modules \ + python3-pbr \ + python3-pyyaml \ + python3-rich \ + python3-six \ + python3-stevedore \ + " diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-bidict_0.23.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-bidict_0.23.0.bb deleted file mode 100644 index 5667e492..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-bidict_0.23.0.bb +++ /dev/null @@ -1,11 +0,0 @@ -SUMMARY = "The bidirectional mapping library for Python." -DESCRIPTION = "The bidirectional mapping library for Python." -HOMEPAGE = "https://bidict.readthedocs.io/" -LICENSE = "MPL-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=e907308cc9356afa99ac0eec6b20211b" - -SRC_URI[sha256sum] = "3959ca59d4d6997702d642bf1e5fd93cba299863723fc289545198f70c468578" - -inherit pypi python_setuptools_build_meta - -DEPENDS += "python3-setuptools-scm-native" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-bidict_0.23.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-bidict_0.23.1.bb new file mode 100644 index 00000000..cd9e365f --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-bidict_0.23.1.bb @@ -0,0 +1,11 @@ +SUMMARY = "The bidirectional mapping library for Python." +DESCRIPTION = "The bidirectional mapping library for Python." +HOMEPAGE = "https://bidict.readthedocs.io/" +LICENSE = "MPL-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=e907308cc9356afa99ac0eec6b20211b" + +SRC_URI[sha256sum] = "03069d763bc387bbd20e7d49914e75fc4132a41937fa3405417e1a5a2d006d71" + +inherit pypi python_setuptools_build_meta + +DEPENDS += "python3-setuptools-scm-native" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-bitstring_4.1.4.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-bitstring_4.1.4.bb deleted file mode 100644 index 0777b6cf..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-bitstring_4.1.4.bb +++ /dev/null @@ -1,19 +0,0 @@ -SUMMARY = "Simple construction, analysis and modification of binary data." -HOMEPAGE = "https://github.com/scott-griffiths/bitstring" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=661f450e2c0aef39b4b15597333444a7" - -SRC_URI[sha256sum] = "94f3f1c45383ebe8fd4a359424ffeb75c2f290760ae8fcac421b44f89ac85213" - -PYPI_PACKAGE = "bitstring" - -inherit pypi python_poetry_core - -RDEPENDS:${PN} = "\ - python3-core \ - python3-io \ - python3-mmap \ - python3-numbers \ -" - -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-bitstring_4.2.3.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-bitstring_4.2.3.bb new file mode 100644 index 00000000..4d86ce7d --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-bitstring_4.2.3.bb @@ -0,0 +1,19 @@ +SUMMARY = "Simple construction, analysis and modification of binary data." +HOMEPAGE = "https://github.com/scott-griffiths/bitstring" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=661f450e2c0aef39b4b15597333444a7" + +SRC_URI[sha256sum] = "e0c447af3fda0d114f77b88c2d199f02f97ee7e957e6d719f40f41cf15fbb897" + +PYPI_PACKAGE = "bitstring" + +inherit pypi python_poetry_core + +RDEPENDS:${PN} = "\ + python3-core \ + python3-io \ + python3-mmap \ + python3-numbers \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-bitstruct_8.19.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-bitstruct_8.19.0.bb index 6401322e..bdf77c7d 100644 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-bitstruct_8.19.0.bb +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-bitstruct_8.19.0.bb @@ -5,9 +5,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=d9aa4ec07de78abae21c490c9ffe61bd" SRC_URI[sha256sum] = "d75ba9dded85c17e885a209a00eb8e248ee40762149f2f2a79360ca857467dac" -PYPI_PACKAGE = "bitstruct" - -inherit pypi setuptools3 +inherit pypi python_setuptools_build_meta CLEANBROKEN = "1" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-bleak_0.21.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-bleak_0.21.1.bb deleted file mode 100644 index 96f3fcbc..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-bleak_0.21.1.bb +++ /dev/null @@ -1,33 +0,0 @@ -SUMMARY = "Bleak is a GATT client software, capable of connecting to BLE devices acting as GATT servers." -HOMEPAGE = "https://github.com/hbldh/bleak" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=bcbc2069a86cba1b5e47253679f66ed7" - -SRCREV = "054b092e19c7a45d5ea07d8948022f54117fe5e8" -PYPI_SRC_URI = "git://github.com/hbldh/bleak.git;protocol=https;branch=develop" - -inherit pypi python_poetry_core ptest - -S = "${WORKDIR}/git" - -SRC_URI += " \ - file://run-ptest \ -" - -RDEPENDS:${PN}-ptest += " \ - python3-pytest \ - python3-pytest-asyncio \ - python3-unittest-automake-output \ -" - -do_install_ptest() { - install -d ${D}${PTEST_PATH}/tests - cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ -} - -RDEPENDS:${PN} += " \ - python3-core (>3.7) \ - python3-async-timeout \ - python3-dbus-fast \ - python3-xml \ -" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-bleak_0.22.2.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-bleak_0.22.2.bb new file mode 100644 index 00000000..bb1d7c2b --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-bleak_0.22.2.bb @@ -0,0 +1,32 @@ +SUMMARY = "Bleak is a GATT client software, capable of connecting to BLE devices acting as GATT servers." +HOMEPAGE = "https://github.com/hbldh/bleak" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=bcbc2069a86cba1b5e47253679f66ed7" + +SRCREV = "c746071a3fcc3b5e69db6d6b23445ec3505d7730" +PYPI_SRC_URI = "git://github.com/hbldh/bleak.git;protocol=https;branch=develop" + +inherit pypi python_poetry_core ptest + +S = "${WORKDIR}/git" + +SRC_URI += " \ + file://run-ptest \ +" + +RDEPENDS:${PN}-ptest += " \ + python3-pytest \ + python3-pytest-asyncio \ + python3-unittest-automake-output \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ +} + +RDEPENDS:${PN} += " \ + python3-core (>3.8) \ + python3-dbus-fast \ + python3-xml \ +" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-brotli_1.1.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-brotli_1.1.0.bb index 678f12b7..542c8640 100644 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-brotli_1.1.0.bb +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-brotli_1.1.0.bb @@ -8,10 +8,10 @@ PYPI_PACKAGE = "Brotli" SRC_URI[sha256sum] = "81de08ac11bcb85841e440c13611c00b67d3bf82698314928d0b676362546724" -inherit pypi setuptools3 +inherit pypi python_setuptools_build_meta -RDEPENDS:${PN} = "\ - python3-cffi \ +RDEPENDS:${PN} += " \ + python3-cffi \ " BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-cachetools_5.3.3.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-cachetools_5.3.3.bb deleted file mode 100644 index 3ef75d47..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-cachetools_5.3.3.bb +++ /dev/null @@ -1,33 +0,0 @@ -SUMMARY = "Extensible memoizing collections and decorators" -HOMEPAGE = "https://github.com/tkem/cachetools" -DESCRIPTION = "This module provides various memoizing \ -collections and decorators, including variants of the \ -Python 3 Standard Library @lru_cache function decorator." -SECTION = "devel/python" - -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=539275e657c6b7af026bb908356f7541" - -inherit pypi python_setuptools_build_meta ptest - -SRC_URI += " \ - file://run-ptest \ -" - -RDEPENDS:${PN} += " \ - python3-math \ -" - -RDEPENDS:${PN}-ptest += " \ - python3-pytest \ - python3-unittest-automake-output \ -" - -do_install_ptest() { - install -d ${D}${PTEST_PATH}/tests - cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ -} - -SRC_URI[sha256sum] = "ba29e2dfa0b8b556606f097407ed1aa62080ee108ab0dc5ec9d6a723a007d105" - -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-cachetools_5.5.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-cachetools_5.5.0.bb new file mode 100644 index 00000000..00e208f9 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-cachetools_5.5.0.bb @@ -0,0 +1,33 @@ +SUMMARY = "Extensible memoizing collections and decorators" +HOMEPAGE = "https://github.com/tkem/cachetools" +DESCRIPTION = "This module provides various memoizing \ +collections and decorators, including variants of the \ +Python 3 Standard Library @lru_cache function decorator." +SECTION = "devel/python" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=539275e657c6b7af026bb908356f7541" + +inherit pypi python_setuptools_build_meta ptest + +SRC_URI += " \ + file://run-ptest \ +" + +RDEPENDS:${PN} += " \ + python3-math \ +" + +RDEPENDS:${PN}-ptest += " \ + python3-pytest \ + python3-unittest-automake-output \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ +} + +SRC_URI[sha256sum] = "2cc24fb4cbe39633fb7badd9db9ca6295d766d9c2995f245725a46715d050f2a" + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-can_4.2.2.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-can_4.2.2.bb index 9ca926d6..b0d87f4e 100644 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-can_4.2.2.bb +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-can_4.2.2.bb @@ -5,9 +5,9 @@ LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=e6a600fd5e1d9cbde2d983680233ad02" SRC_URI[sha256sum] = "6ad50f4613289f3c4d276b6d2ac8901d776dcb929994cce93f55a69e858c595f" -PYPI_PACKAGE="python-can" +PYPI_PACKAGE = "python-can" -inherit pypi setuptools3 +inherit pypi python_setuptools_build_meta RDEPENDS:${PN} += " \ python3-aenum \ diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-cantools_39.4.4.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-cantools_39.4.4.bb deleted file mode 100644 index ebae6b63..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-cantools_39.4.4.bb +++ /dev/null @@ -1,24 +0,0 @@ -DESCRIPTION = "CAN BUS tools in Python 3." -HOMEPAGE = "https://github.com/eerimoq/cantools" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=d9aa4ec07de78abae21c490c9ffe61bd" - -SRC_URI[sha256sum] = "6e8e918b6671a62a9f3990546ece5623e1deb71defb1cef85a9955ac301da99e" - -PYPI_PACKAGE = "cantools" - -inherit pypi python_poetry_core - -DEPENDS += "python3-setuptools-scm-native" - -RDEPENDS:${PN} += "\ - python3-can \ - python3-bitstruct \ - python3-core \ - python3-textparser \ - python3-typing-extensions \ - python3-diskcache \ - python3-asyncio \ -" - -CLEANBROKEN = "1" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-cantools_39.4.5.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-cantools_39.4.5.bb new file mode 100644 index 00000000..f4f16c15 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-cantools_39.4.5.bb @@ -0,0 +1,24 @@ +DESCRIPTION = "CAN BUS tools in Python 3." +HOMEPAGE = "https://github.com/eerimoq/cantools" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=d9aa4ec07de78abae21c490c9ffe61bd" + +SRC_URI[sha256sum] = "594f2ae80deadb8c6b08e8e1322d42e258f40d42c80d6886d84e0143f90b5a23" + +PYPI_PACKAGE = "cantools" + +inherit pypi python_poetry_core + +DEPENDS += "python3-setuptools-scm-native" + +RDEPENDS:${PN} += "\ + python3-can \ + python3-bitstruct \ + python3-core \ + python3-textparser \ + python3-typing-extensions \ + python3-diskcache \ + python3-asyncio \ +" + +CLEANBROKEN = "1" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-cbor2_5.6.3.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-cbor2_5.6.3.bb deleted file mode 100644 index 69573064..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-cbor2_5.6.3.bb +++ /dev/null @@ -1,33 +0,0 @@ -DESCRIPTION = "An implementation of RFC 7049 - Concise Binary Object Representation (CBOR)." -DEPENDS +="python3-setuptools-scm-native" - -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=a79e64179819c7ce293372c059f1dbd8" - -SRC_URI[sha256sum] = "e6f0ae2751c2d333a960e0807c0611494eb1245631a167965acbc100509455d3" - -inherit pypi python_setuptools_build_meta ptest - -DEPENDS += "python3-setuptools-scm-native" - -SRC_URI += " \ - file://run-ptest \ -" - -RDEPENDS:${PN}-ptest += " \ - python3-hypothesis \ - python3-pytest \ - python3-unittest-automake-output \ - python3-unixadmin \ -" - -do_install_ptest() { - install -d ${D}${PTEST_PATH}/tests - cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ -} - -RDEPENDS:${PN} += " \ - python3-datetime \ -" - -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-cbor2_5.6.4.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-cbor2_5.6.4.bb new file mode 100644 index 00000000..37c3ab64 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-cbor2_5.6.4.bb @@ -0,0 +1,28 @@ +DESCRIPTION = "An implementation of RFC 7049 - Concise Binary Object Representation (CBOR)." +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=a79e64179819c7ce293372c059f1dbd8" +DEPENDS += "python3-setuptools-scm-native" + +SRC_URI[sha256sum] = "1c533c50dde86bef1c6950602054a0ffa3c376e8b0e20c7b8f5b108793f6983e" +SRC_URI += " \ + file://run-ptest \ +" + +inherit pypi python_setuptools_build_meta ptest + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ +} + +RDEPENDS:${PN}-ptest += " \ + python3-hypothesis \ + python3-pytest \ + python3-unittest-automake-output \ + python3-unixadmin \ +" +RDEPENDS:${PN} += " \ + python3-datetime \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-classes_0.4.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-classes_0.4.1.bb index d9240e13..8daf8248 100644 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-classes_0.4.1.bb +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-classes_0.4.1.bb @@ -5,6 +5,6 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=155fbcc756c8ae5265d252d23e20908f" SRC_URI[sha256sum] = "4de4fdd6c5c38607bbd8ad76703d7cc4dbe007cfa78e8ef1f62fc6ac55303e23" -inherit pypi setuptools3 +inherit pypi python_poetry_core RDEPENDS:${PN} += "python3-typing-extensions" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-click-repl_0.3.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-click-repl_0.3.0.bb index b773ed6b..46cf1b37 100644 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-click-repl_0.3.0.bb +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-click-repl_0.3.0.bb @@ -5,6 +5,9 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=580facc4832cac548fad94845542da44" SRC_URI[sha256sum] = "17849c23dba3d667247dc4defe1757fff98694e90fe37474f3feebb69ced26a9" -inherit pypi setuptools3 +inherit pypi python_setuptools_build_meta -RDEPENDS:${PN} = "python3-click python3-prompt-toolkit" +RDEPENDS:${PN} += " \ + python3-click \ + python3-prompt-toolkit \ + " diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-cloudpickle_3.0.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-cloudpickle_3.0.0.bb index 25c37959..fce5a5b4 100644 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-cloudpickle_3.0.0.bb +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-cloudpickle_3.0.0.bb @@ -8,7 +8,7 @@ data." HOMEPAGE = "https://github.com/cloudpipe/cloudpickle" LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE.cloudpickle;md5=b4d59aa5e2cc777722aac17841237931" +LIC_FILES_CHKSUM = "file://${UNPACKDIR}/LICENSE.cloudpickle;md5=b4d59aa5e2cc777722aac17841237931" inherit pypi python_flit_core diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-cmake_3.28.3.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-cmake_3.28.3.bb index 6b31d0b4..a6c3e139 100644 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-cmake_3.28.3.bb +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-cmake_3.28.3.bb @@ -22,7 +22,7 @@ addtask do_patchbuild after do_patch before do_configure do_patchbuild () { rm -f ${S}/CMakeLists.txt - cp ${WORKDIR}/CMakeLists.txt ${S}/ + cp ${UNPACKDIR}/CMakeLists.txt ${S}/ } do_install:append () { diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-configobj_5.0.8.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-configobj_5.0.8.bb index 8dc706fd..96e579c7 100644 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-configobj_5.0.8.bb +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-configobj_5.0.8.bb @@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=3d6f99b84d9a94610c62e48fa2e59e72" PYPI_PACKAGE = "configobj" SRC_URI[sha256sum] = "6f704434a07dc4f4dc7c9a745172c1cad449feb548febd9f7fe362629c627a97" -inherit pypi setuptools3 +inherit pypi python_setuptools_build_meta RDEPENDS:${PN} += " \ python3-pprint \ diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-coverage_7.4.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-coverage_7.4.1.bb deleted file mode 100644 index b3da5d57..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-coverage_7.4.1.bb +++ /dev/null @@ -1,22 +0,0 @@ -SUMMARY = "Code coverage measurement for Python" -HOMEPAGE = "https://coverage.readthedocs.io" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=2ee41112a44fe7014dce33e26468ba93" - -SRC_URI[sha256sum] = "1ed4b95480952b1a26d863e546fa5094564aa0065e1e5f0d4d0041f293251d04" - -inherit pypi setuptools3 - -RDEPENDS:${PN} += " \ - python3-crypt \ - python3-io \ - python3-json \ - python3-multiprocessing \ - python3-pprint \ - python3-shell \ - python3-sqlite3 \ - python3-tomllib \ - python3-xml \ -" - -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-coverage_7.6.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-coverage_7.6.1.bb new file mode 100644 index 00000000..7749158f --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-coverage_7.6.1.bb @@ -0,0 +1,22 @@ +SUMMARY = "Code coverage measurement for Python" +HOMEPAGE = "https://coverage.readthedocs.io" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=2ee41112a44fe7014dce33e26468ba93" + +SRC_URI[sha256sum] = "953510dfb7b12ab69d20135a0662397f077c59b1e6379a768e97c59d852ee51d" + +inherit pypi python_setuptools_build_meta + +RDEPENDS:${PN} += " \ + python3-crypt \ + python3-io \ + python3-json \ + python3-multiprocessing \ + python3-pprint \ + python3-shell \ + python3-sqlite3 \ + python3-tomllib \ + python3-xml \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-croniter_2.0.5.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-croniter_2.0.5.bb deleted file mode 100644 index 01ee0484..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-croniter_2.0.5.bb +++ /dev/null @@ -1,16 +0,0 @@ -DESCRIPTION = "croniter provides iteration for datetime object with cron like format" -SECTION = "devel/python" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=b8ee59850b882cbf623188489ea748e2" - -PYPI_PACKAGE = "croniter" - -SRC_URI[sha256sum] = "f1f8ca0af64212fbe99b1bee125ee5a1b53a9c1b433968d8bca8817b79d237f3" - -inherit pypi setuptools3 - -RDEPENDS:${PN} += " \ - python3-dateutil \ - python3-natsort \ - python3-pytz \ -" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-croniter_3.0.3.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-croniter_3.0.3.bb new file mode 100644 index 00000000..b0cda74f --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-croniter_3.0.3.bb @@ -0,0 +1,16 @@ +DESCRIPTION = "croniter provides iteration for datetime object with cron like format" +SECTION = "devel/python" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=b8ee59850b882cbf623188489ea748e2" + +PYPI_PACKAGE = "croniter" + +SRC_URI[sha256sum] = "34117ec1741f10a7bd0ec3ad7d8f0eb8fa457a2feb9be32e6a2250e158957668" + +inherit pypi setuptools3 + +RDEPENDS:${PN} += " \ + python3-dateutil \ + python3-natsort \ + python3-pytz \ +" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-daemon/0001-Use-version-from-packaging-module-instead-of-setupto.patch b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-daemon/0001-Use-version-from-packaging-module-instead-of-setupto.patch new file mode 100644 index 00000000..316f7d96 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-daemon/0001-Use-version-from-packaging-module-instead-of-setupto.patch @@ -0,0 +1,44 @@ +From b7418ab4a3232431373bf0680c6b74fef06910de Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 10 Aug 2024 22:44:08 -0700 +Subject: [PATCH] Use version from packaging module instead of setuptools extern + +Fixes build problems when using PEP-575 build backend + + +Drop the patch on upgrading to >= 3.0.2 + +Upstream-Status: Backport [https://pagure.io/fork/khemraj/python-daemon/c/3bbc46967d35cd7e05677018bdc9d552efaeea3e?branch=main] + +Signed-off-by: Khem Raj +--- + test_version.py | 2 +- + version.py | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/test_version.py b/test_version.py +index c43cd36..d0a124d 100644 +--- a/test_version.py ++++ b/test_version.py +@@ -23,7 +23,7 @@ import docutils.writers + import setuptools + import setuptools.command + import setuptools.dist +-from setuptools.extern.packaging.version import InvalidVersion ++from packaging.version import InvalidVersion + import testscenarios + import testtools + +diff --git a/version.py b/version.py +index 20d3ef3..fbdc462 100644 +--- a/version.py ++++ b/version.py +@@ -36,7 +36,7 @@ import setuptools.command.build + import setuptools.command.build_py + import setuptools.command.egg_info + import setuptools.dist +-import setuptools.extern.packaging.version ++import packaging.version + + + def ensure_class_bases_begin_with(namespace, class_name, base_class): diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-daemon_3.0.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-daemon_3.0.1.bb index 715d3bf1..cb85262b 100644 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-daemon_3.0.1.bb +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-daemon_3.0.1.bb @@ -11,8 +11,9 @@ RDEPENDS:${PN} = "python3-docutils \ LICENSE = "Apache-2.0 & GPL-3.0-only" LIC_FILES_CHKSUM = "file://README;md5=a3a94c615dc969a70525f1eebbacf235" -inherit pypi setuptools3 +inherit pypi python_setuptools_build_meta +SRC_URI += "file://0001-Use-version-from-packaging-module-instead-of-setupto.patch" SRC_URI[sha256sum] = "6c57452372f7eaff40934a1c03ad1826bf5e793558e87fef49131e6464b4dae5" PYPI_PACKAGE = "python-daemon" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-dasbus/run-ptest b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-dasbus/run-ptest new file mode 100755 index 00000000..8d2017d3 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-dasbus/run-ptest @@ -0,0 +1,3 @@ +#!/bin/sh + +pytest --automake diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-dasbus_1.7.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-dasbus_1.7.bb new file mode 100644 index 00000000..d1d294a2 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-dasbus_1.7.bb @@ -0,0 +1,32 @@ +SUMMARY = "Dasbus is a DBus library written in Python 3, based on GLib and inspired by pydbus." +HOMEPAGE = "https://dasbus.readthedocs.io" +SECTION = "devel" +LICENSE = "LGPL-2.1-or-later" +LIC_FILES_CHKSUM = "file://LICENSE;md5=1803fa9c2c3ce8cb06b4861d75310742" + +SRC_URI = "git://github.com/dasbus-project/dasbus.git;protocol=https;branch=master \ + file://run-ptest \ +" +SRCREV = "413cf9a0b7c231468f1d28d9a29dd8dd8bda15c5" + +S = "${WORKDIR}/git" + +inherit setuptools3 ptest + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ + + # Remove the problematic cases + # https://github.com/dasbus-project/dasbus/issues/128 + rm -rf ${D}${PTEST_PATH}/tests/lib_dbus.py + rm -rf ${D}${PTEST_PATH}/tests/test_dbus.py + rm -rf ${D}${PTEST_PATH}/tests/test_unix.py +} + +RDEPENDS:${PN} = "python3-pygobject" + +RDEPENDS:${PN}-ptest += " \ + python3-pytest \ + python3-unittest-automake-output \ +" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-dbus-fast_2.21.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-dbus-fast_2.21.1.bb deleted file mode 100644 index 9e256617..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-dbus-fast_2.21.1.bb +++ /dev/null @@ -1,15 +0,0 @@ -SUMMARY = "A faster version of dbus-next originally from the great DBus next library." -HOMEPAGE = "https://github.com/bluetooth-devices/dbus-fast" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=729e372b5ea0168438e4fd4a00a04947" - -SRC_URI[sha256sum] = "87b852d2005f1d59399ca51c5f3538f28a4742d739d7abe82b7ae8d01d8a5d02" - -PYPI_PACKAGE = "dbus_fast" - -inherit pypi setuptools3 - -RDEPENDS:${PN} += " \ - python3-core (>=3.7) \ - python3-async-timeout \ -" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-dbus-fast_2.24.2.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-dbus-fast_2.24.2.bb new file mode 100644 index 00000000..ccac6992 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-dbus-fast_2.24.2.bb @@ -0,0 +1,21 @@ +SUMMARY = "A faster version of dbus-next originally from the great DBus next library." +HOMEPAGE = "https://github.com/bluetooth-devices/dbus-fast" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=729e372b5ea0168438e4fd4a00a04947" + +SRC_URI[sha256sum] = "20c517dc70dbc940b8bf2e0f079abf3dfe821fdda3013641a17e3d8f18e131ae" + +PYPI_PACKAGE = "dbus_fast" + +inherit pypi python_poetry_core + +DEPENDS += " \ + python3-setuptools-native \ + python3-wheel-native \ + python3-cython-native \ + " + +RDEPENDS:${PN} += " \ + python3-core (>=3.7) \ + python3-async-timeout \ +" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-dill_0.3.8.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-dill_0.3.8.bb index 04e7f4bf..3481ec06 100644 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-dill_0.3.8.bb +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-dill_0.3.8.bb @@ -5,9 +5,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=a41509b57cc475ed93f8cb1dbbfaeec1" SRC_URI[sha256sum] = "3ebe3c479ad625c4553aca177444d89b486b1d84982eeacded644afc0cf797ca" -inherit pypi setuptools3 - -PYPI_PACKAGE_EXT = "tar.gz" +inherit pypi python_setuptools_build_meta RDEPENDS:${PN} += "\ python3-multiprocessing \ diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-dirty-equals_0.7.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-dirty-equals_0.7.1.bb deleted file mode 100644 index ea9303b1..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-dirty-equals_0.7.1.bb +++ /dev/null @@ -1,21 +0,0 @@ -SUMMARY = "Doing dirty (but extremely useful) things with equals." -DESCRIPTION = "dirty-equals is a python library that (mis)uses the \ -__eq__ method to make python code (generally unit tests) more \ -declarative and therefore easier to read and write.\ -\ -dirty-equals can be used in whatever context you like, but it comes \ -into its own when writing unit tests for applications where you're \ -commonly checking the response to API calls and the contents of a database." -HOMEPAGE = "https://github.com/samuelcolvin/dirty-equals" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=ab599c188b4a314d2856b3a55030c75c" - -SRC_URI[sha256sum] = "a580513f3285e93656a770a04e428f8bfc513848877bf278282dbfbb907fdbb4" - -S = "${WORKDIR}/dirty_equals-${PV}" - -inherit pypi python_hatchling - -PYPI_PACKAGE = "dirty_equals" - -RDEPENDS:${PN} += "python3-pytz" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-dirty-equals_0.8.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-dirty-equals_0.8.0.bb new file mode 100644 index 00000000..584d787a --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-dirty-equals_0.8.0.bb @@ -0,0 +1,26 @@ +SUMMARY = "Doing dirty (but extremely useful) things with equals." +DESCRIPTION = "dirty-equals is a python library that (mis)uses the \ +__eq__ method to make python code (generally unit tests) more \ +declarative and therefore easier to read and write.\ +\ +dirty-equals can be used in whatever context you like, but it comes \ +into its own when writing unit tests for applications where you're \ +commonly checking the response to API calls and the contents of a database." +HOMEPAGE = "https://github.com/samuelcolvin/dirty-equals" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ab599c188b4a314d2856b3a55030c75c" + +SRC_URI[sha256sum] = "798db3b9481b9a5024c0e520946507676ed2f0c65317d3e95bdce1a01657cf60" + +S = "${WORKDIR}/dirty_equals-${PV}" + +inherit pypi python_hatchling + +PYPI_PACKAGE = "dirty_equals" + +RDEPENDS:${PN} += " \ + python3-pytz \ + python3-core \ + python3-json \ + python3-netclient \ +" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-django_4.2.16.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-django_4.2.16.bb new file mode 100644 index 00000000..9254e8b0 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-django_4.2.16.bb @@ -0,0 +1,14 @@ +require python-django.inc +inherit setuptools3 + +SRC_URI[sha256sum] = "6f1616c2786c408ce86ab7e10f792b8f15742f7b7b7460243929cb371e7f1dad" + +RDEPENDS:${PN} += "\ + python3-sqlparse \ + python3-asgiref \ +" + +# Set DEFAULT_PREFERENCE so that the LTS version of django is built by +# default. To build the 4.x branch, +# PREFERRED_VERSION_python3-django = "4.2.16" can be added to local.conf +DEFAULT_PREFERENCE = "-1" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-django_4.2.18.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-django_4.2.18.bb deleted file mode 100644 index c9be3c04..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-django_4.2.18.bb +++ /dev/null @@ -1,14 +0,0 @@ -require python-django.inc -inherit setuptools3 - -SRC_URI[sha256sum] = "52ae8eacf635617c0f13b44f749e5ea13dc34262819b2cc8c8636abb08d82c4b" - -RDEPENDS:${PN} += "\ - python3-sqlparse \ - python3-asgiref \ -" - -# Set DEFAULT_PREFERENCE so that the LTS version of django is built by -# default. To build the 4.x branch, -# PREFERRED_VERSION_python3-django = "4.2.18" can be added to local.conf -DEFAULT_PREFERENCE = "-1" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-django_5.0.11.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-django_5.0.11.bb deleted file mode 100644 index 5060f3c9..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-django_5.0.11.bb +++ /dev/null @@ -1,9 +0,0 @@ -require python-django.inc -inherit setuptools3 - -SRC_URI[sha256sum] = "e7d98fa05ce09cb3e8d5ad6472fb602322acd1740bfdadc29c8404182d664f65" - -RDEPENDS:${PN} += "\ - python3-sqlparse \ - python3-asgiref \ -" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-django_5.0.9.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-django_5.0.9.bb new file mode 100644 index 00000000..b3fb301e --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-django_5.0.9.bb @@ -0,0 +1,9 @@ +require python-django.inc +inherit python_setuptools_build_meta + +SRC_URI[sha256sum] = "6333870d342329b60174da3a60dbd302e533f3b0bb0971516750e974a99b5a39" + +RDEPENDS:${PN} += "\ + python3-sqlparse \ + python3-asgiref \ +" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-djangorestframework_3.15.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-djangorestframework_3.15.1.bb deleted file mode 100644 index 9515aa22..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-djangorestframework_3.15.1.bb +++ /dev/null @@ -1,16 +0,0 @@ -SUMMARY = "djangorestframework" -DESCRIPTION = "pip3 install djangorestframework" -HOMEPAGE = "https://pypi.python.org/pypi/djangorestframework" - -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE.md;md5=7879a5a716147a784f7e524c9cf103c1" - -SRC_URI[sha256sum] = "f88fad74183dfc7144b2756d0d2ac716ea5b4c7c9840995ac3bfd8ec034333c1" - -PYPI_PACKAGE = "djangorestframework" - -inherit pypi setuptools3 - -RDEPENDS:${PN} += "\ - python3-django \ -" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-djangorestframework_3.15.2.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-djangorestframework_3.15.2.bb new file mode 100644 index 00000000..047aba13 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-djangorestframework_3.15.2.bb @@ -0,0 +1,16 @@ +SUMMARY = "djangorestframework" +DESCRIPTION = "pip3 install djangorestframework" +HOMEPAGE = "https://pypi.python.org/pypi/djangorestframework" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE.md;md5=7879a5a716147a784f7e524c9cf103c1" + +SRC_URI[sha256sum] = "36fe88cd2d6c6bec23dca9804bab2ba5517a8bb9d8f47ebc68981b56840107ad" + +PYPI_PACKAGE = "djangorestframework" + +inherit pypi setuptools3 + +RDEPENDS:${PN} += "\ + python3-django \ +" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-elementpath_4.4.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-elementpath_4.4.0.bb deleted file mode 100644 index e095cb8a..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-elementpath_4.4.0.bb +++ /dev/null @@ -1,19 +0,0 @@ -DESCRIPTION = "Provide XPath 1.0 and 2.0 selectors for Python's ElementTree XML data structures, both for the standard ElementTree library and for the lxml.etree library." -HOMEPAGE = "https://github.com/sissaschool/elementpath" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=5dbb7fb7d72da3921202dd7b995d3ecf" - -SRC_URI[sha256sum] = "dfc4b8ca3d87966dcb0df40b5b6d04a98f053683271930fad9e7fa000924dfb2" - -PYPI_PACKAGE = "elementpath" -inherit pypi setuptools3 - -RDEPENDS:${PN} += " \ - python3-xml \ - python3-core \ - python3-numbers \ - python3-datetime \ - python3-stringold \ -" - -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-elementpath_4.5.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-elementpath_4.5.0.bb new file mode 100644 index 00000000..937d9686 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-elementpath_4.5.0.bb @@ -0,0 +1,19 @@ +DESCRIPTION = "Provide XPath 1.0 and 2.0 selectors for Python's ElementTree XML data structures, both for the standard ElementTree library and for the lxml.etree library." +HOMEPAGE = "https://github.com/sissaschool/elementpath" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=5dbb7fb7d72da3921202dd7b995d3ecf" + +SRC_URI[sha256sum] = "affdc8de95af1a4c10d1d2ed79c6fa56b59c26c7fce64b73497569e9dea46998" + +PYPI_PACKAGE = "elementpath" +inherit pypi setuptools3 + +RDEPENDS:${PN} += " \ + python3-xml \ + python3-core \ + python3-numbers \ + python3-datetime \ + python3-stringold \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-email-validator_2.1.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-email-validator_2.1.1.bb deleted file mode 100644 index 746d56d1..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-email-validator_2.1.1.bb +++ /dev/null @@ -1,12 +0,0 @@ -SUMMARY = "A robust email address syntax and deliverability validation library." -SECTION = "devel/python" -LICENSE = "Unlicense" -LIC_FILES_CHKSUM = "file://LICENSE;md5=2890aee62bd2a4c3197e2059016a397e" - -SRC_URI[sha256sum] = "200a70680ba08904be6d1eef729205cc0d687634399a5924d842533efb824b84" - -PYPI_PACKAGE = "email_validator" - -inherit pypi setuptools3 - -RDEPENDS:${PN} += "python3-dnspython python3-idna" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-email-validator_2.2.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-email-validator_2.2.0.bb new file mode 100644 index 00000000..c17cce72 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-email-validator_2.2.0.bb @@ -0,0 +1,12 @@ +SUMMARY = "A robust email address syntax and deliverability validation library." +SECTION = "devel/python" +LICENSE = "Unlicense" +LIC_FILES_CHKSUM = "file://LICENSE;md5=2890aee62bd2a4c3197e2059016a397e" + +SRC_URI[sha256sum] = "cb690f344c617a714f22e66ae771445a1ceb46821152df8e165c5f9a364582b7" + +PYPI_PACKAGE = "email_validator" + +inherit pypi setuptools3 + +RDEPENDS:${PN} += "python3-dnspython python3-idna" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-eth-hash_0.6.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-eth-hash_0.6.0.bb deleted file mode 100644 index 8464dbe4..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-eth-hash_0.6.0.bb +++ /dev/null @@ -1,14 +0,0 @@ -SUMMARY = "The Ethereum hashing function, keccak256, sometimes (erroneously) called sha3." -HOMEPAGE = "https://github.com/ethereum/eth-hash" -SECTION = "devel/python" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=3d7bdfe69b1ffbde073ca6e96f5c53f7" - -SRC_URI[sha256sum] = "ae72889e60db6acbb3872c288cfa02ed157f4c27630fcd7f9c8442302c31e478" - -inherit pypi setuptools3 - -RDEPENDS:${PN} = "\ - python3-logging \ - python3-pycryptodome \ -" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-eth-hash_0.7.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-eth-hash_0.7.0.bb new file mode 100644 index 00000000..1137e744 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-eth-hash_0.7.0.bb @@ -0,0 +1,20 @@ +SUMMARY = "eth-hash: The Ethereum hashing function, keccak256, sometimes (erroneously) called sha3" +HOMEPAGE = "https://github.com/ethereum/eth-hash" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=3d7bdfe69b1ffbde073ca6e96f5c53f7" + +SRC_URI[sha256sum] = "bacdc705bfd85dadd055ecd35fd1b4f846b671add101427e089a4ca2e8db310a" + +inherit pypi python_setuptools_build_meta + +PACKAGECONFIG ?= "" +PACKAGECONFIG[dev] = ",,,python3-build python3-bumpversion python3-ipython python3-pre-commit python3-pytest python3-pytest-xdist python3-sphinx python3-sphinx_rtd_theme python3-towncrier python3-tox python3-twine python3-wheel" +PACKAGECONFIG[docs] = ",,,python3-sphinx python3-sphinx_rtd_theme python3-towncrier" +PACKAGECONFIG[pycryptodome] = ",,,python3-pycryptodome" +PACKAGECONFIG[pysha3python-version-smaller-3-dot-9] = ",,,python3-pysha3" +PACKAGECONFIG[pysha3python-version-bigger--equals-3-dot-9] = ",,,python3-safe-pysha3" +PACKAGECONFIG[test] = ",,,python3-pytest python3-pytest-xdist" + +RDEPENDS:${PN} += "python3-core python3-logging python3-pycryptodome" + +PYPI_PACKAGE = "eth-hash" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-eth-utils_3.0.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-eth-utils_3.0.0.bb deleted file mode 100644 index faca0386..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-eth-utils_3.0.0.bb +++ /dev/null @@ -1,16 +0,0 @@ -SUMMARY = "Common utility functions for codebases which interact with ethereum." -HOMEPAGE = "https://github.com/ethereum/eth-utils" -SECTION = "devel/python" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=6749008d847c14b9718949c2e24d5c0a" - -SRC_URI[sha256sum] = "8721869568448349bceae63c277b75758d11e0dc190e7ef31e161b89619458f1" - -inherit pypi setuptools3 - -RDEPENDS:${PN} += " \ - python3-eth-hash \ - python3-eth-typing \ - python3-setuptools \ - python3-toolz \ -" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-eth-utils_5.0.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-eth-utils_5.0.0.bb new file mode 100644 index 00000000..f0a5e244 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-eth-utils_5.0.0.bb @@ -0,0 +1,18 @@ +SUMMARY = "Common utility functions for codebases which interact with ethereum." +HOMEPAGE = "https://github.com/ethereum/eth-utils" +SECTION = "devel/python" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=6749008d847c14b9718949c2e24d5c0a" + +SRC_URI[sha256sum] = "a5eb9555f43f4579eb83cb84f9dda9f3d6663bbd4a5a6b693f8d35045f305a1f" + +PYPI_PACKAGE = "eth_utils" + +inherit pypi setuptools3 + +RDEPENDS:${PN} += " \ + python3-eth-hash \ + python3-eth-typing \ + python3-setuptools \ + python3-toolz \ +" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-evdev_1.6.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-evdev_1.6.1.bb deleted file mode 100644 index be6f9611..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-evdev_1.6.1.bb +++ /dev/null @@ -1,22 +0,0 @@ -SUMMARY = "Python evdev lib" -HOMEPAGE = "https://github.com/gvalkov/python-evdev" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=0ff275b442f45fc06287544cf713016f" - -SRC_URI[sha256sum] = "299db8628cc73b237fc1cc57d3c2948faa0756e2a58b6194b5bf81dc2081f1e3" - -inherit pypi setuptools3 - -do_compile:prepend() { - rm -rf ${S}/evdev/ecodes.c -} - -SETUPTOOLS_BUILD_ARGS = "build_ecodes --evdev-headers ${STAGING_DIR_TARGET}/usr/include/linux/input.h:${STAGING_DIR_TARGET}/usr/include/linux/input-event-codes.h" - -RDEPENDS:${PN} += "\ - python3-ctypes \ - python3-fcntl \ - python3-io \ - python3-shell \ - python3-stringold \ - " diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-evdev_1.7.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-evdev_1.7.1.bb new file mode 100644 index 00000000..f098ce4a --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-evdev_1.7.1.bb @@ -0,0 +1,22 @@ +SUMMARY = "Python evdev lib" +HOMEPAGE = "https://github.com/gvalkov/python-evdev" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=0ff275b442f45fc06287544cf713016f" + +SRC_URI[sha256sum] = "0c72c370bda29d857e188d931019c32651a9c1ea977c08c8d939b1ced1637fde" + +inherit pypi python_setuptools_build_meta + +do_compile:prepend() { + rm -rf ${S}/evdev/ecodes.c +} + +SETUPTOOLS_BUILD_ARGS = "build_ecodes --evdev-headers ${STAGING_DIR_TARGET}/usr/include/linux/input.h:${STAGING_DIR_TARGET}/usr/include/linux/input-event-codes.h" + +RDEPENDS:${PN} += "\ + python3-ctypes \ + python3-fcntl \ + python3-io \ + python3-shell \ + python3-stringold \ + " diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-eventlet_0.36.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-eventlet_0.36.1.bb deleted file mode 100644 index f70099ab..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-eventlet_0.36.1.bb +++ /dev/null @@ -1,15 +0,0 @@ -DESCRIPTION = "Highly concurrent networking library" -HOMEPAGE = "http://pypi.python.org/pypi/eventlet" -SECTION = "devel/python" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=56472ad6de4caf50e05332a34b66e778" - -SRC_URI[sha256sum] = "d227fe76a63d9e6a6cef53beb8ad0b2dc40a5e7737c801f4b474cfae1db07bc5" - -inherit pypi setuptools3 - -RDEPENDS:${PN} += " \ - python3-dnspython \ - python3-six \ - python3-greenlet \ -" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-eventlet_0.37.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-eventlet_0.37.0.bb new file mode 100644 index 00000000..84de0d8e --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-eventlet_0.37.0.bb @@ -0,0 +1,17 @@ +DESCRIPTION = "Highly concurrent networking library" +HOMEPAGE = "http://pypi.python.org/pypi/eventlet" +SECTION = "devel/python" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=56472ad6de4caf50e05332a34b66e778" + +SRC_URI[sha256sum] = "fa49bf5a549cdbaa06919679979ea022ac8f8f3cf0499f26849a1cd8e64c30b1" + +inherit pypi python_hatchling + +DEPENDS += "python3-hatch-vcs-native" + +RDEPENDS:${PN} += " \ + python3-dnspython \ + python3-six \ + python3-greenlet \ +" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-executing_2.0.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-executing_2.0.1.bb deleted file mode 100644 index 3ee1e66f..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-executing_2.0.1.bb +++ /dev/null @@ -1,9 +0,0 @@ -SUMMARY = "Get the currently executing AST node of a frame, and other information" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=a3d6c15f7859ae235a78f2758e5a48cf" - -DEPENDS = "python3-setuptools-scm-native" - -inherit pypi python_setuptools_build_meta - -SRC_URI[sha256sum] = "35afe2ce3affba8ee97f2d69927fa823b08b472b7b994e36a52a964b93d16147" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-executing_2.1.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-executing_2.1.0.bb new file mode 100644 index 00000000..4df84e63 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-executing_2.1.0.bb @@ -0,0 +1,9 @@ +SUMMARY = "Get the currently executing AST node of a frame, and other information" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=a3d6c15f7859ae235a78f2758e5a48cf" + +DEPENDS = "python3-setuptools-scm-native" + +inherit pypi python_setuptools_build_meta + +SRC_URI[sha256sum] = "8ea27ddd260da8150fa5a708269c4a10e76161e2496ec3e587da9e3c0fe4b9ab" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-fastjsonschema_2.18.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-fastjsonschema_2.18.0.bb deleted file mode 100644 index b2e969c5..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-fastjsonschema_2.18.0.bb +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (C) 2021 Khem Raj -# Released under the MIT license (see COPYING.MIT for the terms) - -SUMMARY = "Fastest Python implementation of JSON schema" -HOMEPAGE = "https://github.com/seznam/python-fastjsonschema" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=18950e8362b69c0c617b42b8bd8e7532" - -SRCREV = "756540088687cda351390f687b92e602feaa7dc6" -PYPI_SRC_URI = "git://github.com/horejsek/python-fastjsonschema;protocol=https;branch=master" - -SRC_URI += "file://run-ptest" - -inherit ptest pypi setuptools3 - -S = "${WORKDIR}/git" - -do_install_ptest() { - install -d ${D}${PTEST_PATH}/tests - cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ -} - -RDEPENDS:${PN}-ptest += "\ - python3-colorama \ - python3-jsonschema \ - python3-pylint \ - python3-pytest \ - python3-pytest-benchmark \ - python3-pytest-cache \ - python3-statistics \ - python3-unittest-automake-output \ -" -RDEPENDS:${PN} += "\ - python3-core \ - python3-urllib3 \ - python3-numbers \ - python3-pickle \ - python3-json \ - " - -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-fastjsonschema_2.20.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-fastjsonschema_2.20.0.bb new file mode 100644 index 00000000..4dd9444a --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-fastjsonschema_2.20.0.bb @@ -0,0 +1,40 @@ +# Copyright (C) 2021 Khem Raj +# Released under the MIT license (see COPYING.MIT for the terms) + +SUMMARY = "Fastest Python implementation of JSON schema" +HOMEPAGE = "https://github.com/seznam/python-fastjsonschema" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=18950e8362b69c0c617b42b8bd8e7532" + +SRC_URI[sha256sum] = "3d48fc5300ee96f5d116f10fe6f28d938e6008f59a6a025c2649475b87f76a23" + +SRC_URI += "file://run-ptest" + +inherit ptest pypi setuptools3 + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ +} + +# python3-misc for timeit.py +RDEPENDS:${PN}-ptest += "\ + python3-colorama \ + python3-jsonschema \ + python3-misc \ + python3-pylint \ + python3-pytest \ + python3-pytest-benchmark \ + python3-pytest-cache \ + python3-statistics \ + python3-unittest-automake-output \ +" +RDEPENDS:${PN} += "\ + python3-core \ + python3-urllib3 \ + python3-numbers \ + python3-pickle \ + python3-json \ + " + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-file-magic_0.4.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-file-magic_0.4.1.bb index 5289ad37..0491d02b 100644 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-file-magic_0.4.1.bb +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-file-magic_0.4.1.bb @@ -7,9 +7,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=0e949c0b3fb4fd86232f00c6ee0bdef3" SRC_URI[sha256sum] = "a91d1483117f7ed48cd0238ad9be36b04824d57e9c38ea7523113989e81b9c53" -PYPI_PACKAGE="file-magic" - -inherit pypi setuptools3 +inherit pypi python_setuptools_build_meta RDEPENDS:${PN} += " \ file \ diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-filelock_3.13.4.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-filelock_3.13.4.bb deleted file mode 100644 index 4d6d1955..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-filelock_3.13.4.bb +++ /dev/null @@ -1,16 +0,0 @@ -# SPDX-License-Identifier: MIT -# Copyright (C) 2023 iris-GmbH infrared & intelligent sensors - -SUMMARY = "A single module, which implements a platform independent file lock in Python, which provides a simple way of inter-process communication" -HOMEPAGE = "https://py-filelock.readthedocs.io/" -LICENSE = "Unlicense" -LIC_FILES_CHKSUM = "file://LICENSE;md5=911690f51af322440237a253d695d19f" - -SRC_URI[sha256sum] = "d13f466618bfde72bd2c18255e269f72542c6e70e7bac83a0232d6b1cc5c8cf4" - -BBCLASSEXTEND = "native nativesdk" -inherit pypi python_hatchling - -DEPENDS += "\ - python3-hatch-vcs-native \ -" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-filelock_3.16.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-filelock_3.16.1.bb new file mode 100644 index 00000000..abafa124 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-filelock_3.16.1.bb @@ -0,0 +1,22 @@ +# SPDX-License-Identifier: MIT +# Copyright (C) 2023 iris-GmbH infrared & intelligent sensors + +SUMMARY = "A single module, which implements a platform independent file lock in Python, which provides a simple way of inter-process communication" +HOMEPAGE = "https://py-filelock.readthedocs.io/" +LICENSE = "Unlicense" +LIC_FILES_CHKSUM = "file://LICENSE;md5=911690f51af322440237a253d695d19f" + +SRC_URI[sha256sum] = "c249fbfcd5db47e5e2d6d62198e565475ee65e4831e2561c8e313fa7eb961435" + +BBCLASSEXTEND = "native nativesdk" +inherit pypi python_hatchling + +DEPENDS += "\ + python3-hatch-vcs-native \ +" + +RDEPENDS:${PN} += " \ + python3-core \ + python3-logging \ + python3-asyncio \ +" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-flask/run-ptest b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-flask/run-ptest new file mode 100644 index 00000000..8d2017d3 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-flask/run-ptest @@ -0,0 +1,3 @@ +#!/bin/sh + +pytest --automake diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-flask_3.0.2.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-flask_3.0.2.bb deleted file mode 100644 index 300ca99d..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-flask_3.0.2.bb +++ /dev/null @@ -1,25 +0,0 @@ -SUMMARY = "A microframework based on Werkzeug, Jinja2 and good intentions" -DESCRIPTION = "\ -Flask is a microframework for Python based on Werkzeug, Jinja 2 and good \ -intentions. And before you ask: It’s BSD licensed!" -HOMEPAGE = "https://github.com/mitsuhiko/flask/" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=ffeffa59c90c9c4a033c7574f8f3fb75" - -SRC_URI[sha256sum] = "822c03f4b799204250a7ee84b1eddc40665395333973dfb9deebfe425fefcb7d" - -UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/Flask" -UPSTREAM_CHECK_REGEX = "/Flask/(?P(\d+[\.\-_]*)+)" - -inherit pypi python_setuptools_build_meta - -CLEANBROKEN = "1" - -RDEPENDS:${PN} = " \ - python3-blinker \ - python3-click \ - python3-itsdangerous \ - python3-jinja2 \ - python3-profile \ - python3-werkzeug \ -" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-flask_3.0.3.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-flask_3.0.3.bb new file mode 100644 index 00000000..de755dc2 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-flask_3.0.3.bb @@ -0,0 +1,38 @@ +SUMMARY = "A microframework based on Werkzeug, Jinja2 and good intentions" +DESCRIPTION = "\ +Flask is a microframework for Python based on Werkzeug, Jinja 2 and good \ +intentions. And before you ask: It’s BSD licensed!" +HOMEPAGE = "https://github.com/mitsuhiko/flask/" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=ffeffa59c90c9c4a033c7574f8f3fb75" + +SRC_URI[sha256sum] = "ceb27b0af3823ea2737928a4d99d125a06175b8512c445cbd9a9ce200ef76842" + +SRC_URI += " \ + file://run-ptest \ +" + +UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/Flask" +UPSTREAM_CHECK_REGEX = "/Flask/(?P(\d+[\.\-_]*)+)" + +inherit pypi python_setuptools_build_meta ptest + +CLEANBROKEN = "1" + +RDEPENDS:${PN} = " \ + python3-blinker \ + python3-click \ + python3-itsdangerous \ + python3-jinja2 \ + python3-profile \ + python3-werkzeug \ +" + +RDEPENDS:${PN}-ptest += "\ + python3-pytest \ + python3-unittest-automake-output \ +" +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ +} diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-flexparser_0.3.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-flexparser_0.3.1.bb new file mode 100644 index 00000000..7867dc50 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-flexparser_0.3.1.bb @@ -0,0 +1,31 @@ +SUMMARY = "Parsing made fun ... using typing." +HOMEPAGE = "https://github.com/hgrecco/flexparser" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=32f547dac365c355d2cdbcd7ebea9144" + +DEPENDS += "python3-setuptools-scm-native" +SRC_URI[sha256sum] = "36f795d82e50f5c9ae2fde1c33f21f88922fdd67b7629550a3cc4d0b40a66856" + +inherit pypi python_setuptools_build_meta ptest + +PYPI_PACKAGE = "flexparser" + +SRC_URI += " \ + file://run-ptest \ +" + +RDEPENDS:${PN}-ptest += " \ + python3-pytest \ + python3-unittest-automake-output \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/testsuite + cp -rf ${S}/flexparser/testsuite/* ${D}${PTEST_PATH}/testsuite/ +} + +RDEPENDS:${PN} += " \ + python3-compression \ + python3-email \ + python3-logging \ +" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-flexparser_0.3.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-flexparser_0.3.bb deleted file mode 100644 index e45175f5..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-flexparser_0.3.bb +++ /dev/null @@ -1,31 +0,0 @@ -SUMMARY = "Parsing made fun ... using typing." -HOMEPAGE = "https://github.com/hgrecco/flexparser" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=32f547dac365c355d2cdbcd7ebea9144" - -DEPENDS += "python3-setuptools-scm-native" -SRC_URI[sha256sum] = "692e7524d9e14b2b1231b772b091d7d6296951deb383f5a67bfbd0ecb0b9fa9a" - -inherit pypi python_setuptools_build_meta ptest - -PYPI_PACKAGE = "flexparser" - -SRC_URI += " \ - file://run-ptest \ -" - -RDEPENDS:${PN}-ptest += " \ - python3-pytest \ - python3-unittest-automake-output \ -" - -do_install_ptest() { - install -d ${D}${PTEST_PATH}/testsuite - cp -rf ${S}/flexparser/testsuite/* ${D}${PTEST_PATH}/testsuite/ -} - -RDEPENDS:${PN} += " \ - python3-compression \ - python3-email \ - python3-logging \ -" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-freezegun_1.4.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-freezegun_1.4.0.bb deleted file mode 100644 index 15c0bf06..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-freezegun_1.4.0.bb +++ /dev/null @@ -1,29 +0,0 @@ -SUMMARY = "FreezeGun is a library that allows your Python tests to travel through time by mocking the datetime module." -HOMEPAGE = "https://github.com/spulec/freezegun" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=acf1d209bb6eddae4cbe6ffd6a0144fe" - -SRC_URI[sha256sum] = "10939b0ba0ff5adaecf3b06a5c2f73071d9678e507c5eaedb23c761d56ac774b" - -inherit pypi python_setuptools_build_meta ptest - -SRC_URI += " \ - file://run-ptest \ -" - -RDEPENDS:${PN}-ptest += " \ - python3-pytest \ - python3-sqlite3 \ - python3-unittest-automake-output \ -" - -do_install_ptest() { - install -d ${D}${PTEST_PATH}/tests - cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ -} - -RDEPENDS:${PN} = "\ - python3-asyncio \ - python3-dateutil \ - python3-unittest \ -" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-freezegun_1.5.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-freezegun_1.5.1.bb new file mode 100644 index 00000000..8b5750df --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-freezegun_1.5.1.bb @@ -0,0 +1,29 @@ +SUMMARY = "FreezeGun is a library that allows your Python tests to travel through time by mocking the datetime module." +HOMEPAGE = "https://github.com/spulec/freezegun" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=acf1d209bb6eddae4cbe6ffd6a0144fe" + +SRC_URI[sha256sum] = "b29dedfcda6d5e8e083ce71b2b542753ad48cfec44037b3fc79702e2980a89e9" + +inherit pypi python_setuptools_build_meta ptest + +SRC_URI += " \ + file://run-ptest \ +" + +RDEPENDS:${PN}-ptest += " \ + python3-pytest \ + python3-sqlite3 \ + python3-unittest-automake-output \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ +} + +RDEPENDS:${PN} = "\ + python3-asyncio \ + python3-dateutil \ + python3-unittest \ +" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-fsspec_2024.9.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-fsspec_2024.9.0.bb new file mode 100644 index 00000000..49ca4b3e --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-fsspec_2024.9.0.bb @@ -0,0 +1,22 @@ +SUMMARY = "A specification that python filesystems should adhere to." +HOMEPAGE = "https://github.com/fsspec/filesystem_spec" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=b38a11bf4dcdfc66307f8515ce1fbaa6" + +DEPENDS = "python3-hatch-vcs-native python3-hatchling-native" +SRC_URI[sha256sum] = "4b0afb90c2f21832df142f292649035d80b421f60a9e1c027802e5a0da2b04e8" + +inherit pypi python_hatchling ptest + +PYPI_PACKAGE = "fsspec" + +RDEPENDS:${PN}-ptest += "\ + python3-pytest \ + python3-pytest-mock \ + python3-pytest-asyncio \ + python3-pytest-cov \ + python3-pytest-benchmark \ + python3-aiohttp \ + python3-numpy \ + python3-requests \ +" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-future_0.18.3.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-future_0.18.3.bb deleted file mode 100644 index e4a4b5c1..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-future_0.18.3.bb +++ /dev/null @@ -1,12 +0,0 @@ -DESCRIPTION = "Clean single-source support for Python 3 and 2" -HOMEPAGE = "https://python-future.org" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=a253924061f8ecc41ad7a2ba1560e8e7" - -SRC_URI[sha256sum] = "34a17436ed1e96697a86f9de3d15a3b0be01d8bc8de9c1dffd59fb8234ed5307" - -PYPI_PACKAGE_HASH = "99abde815842bc6e97d5a7806ad51236630da14ca2f3b1fce94c0bb94d3d" - -inherit pypi setuptools3 - -BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-future_1.0.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-future_1.0.0.bb new file mode 100644 index 00000000..eb66a7d3 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-future_1.0.0.bb @@ -0,0 +1,12 @@ +DESCRIPTION = "Clean single-source support for Python 3 and 2" +HOMEPAGE = "https://python-future.org" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=ce268d4c2f911490f47ac5473a24bb89" + +SRC_URI[sha256sum] = "bd2968309307861edae1458a4f8a4f3598c03be43b97521076aebf5d94c07b05" + +PYPI_PACKAGE_HASH = "99abde815842bc6e97d5a7806ad51236630da14ca2f3b1fce94c0bb94d3d" + +inherit pypi setuptools3 + +BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-gast_0.5.4.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-gast_0.5.4.bb deleted file mode 100644 index 9c750ea3..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-gast_0.5.4.bb +++ /dev/null @@ -1,11 +0,0 @@ -SUMMARY = "A generic AST to represent Python2 and Python3's Abstract Syntax Tree(AST)." -HOMEPAGE = "https://github.com/serge-sans-paille/gast" -SECTION = "devel/python" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=a3ad9b6802e713fc5e307e1230f1ea90" - -SRC_URI[sha256sum] = "9c270fe5f4b130969b54174de7db4e764b09b4f7f67ccfc32480e29f78348d97" - -inherit pypi setuptools3 - -BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-gast_0.6.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-gast_0.6.0.bb new file mode 100644 index 00000000..af46c3fe --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-gast_0.6.0.bb @@ -0,0 +1,11 @@ +SUMMARY = "A generic AST to represent Python2 and Python3's Abstract Syntax Tree(AST)." +HOMEPAGE = "https://github.com/serge-sans-paille/gast" +SECTION = "devel/python" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=a3ad9b6802e713fc5e307e1230f1ea90" + +SRC_URI[sha256sum] = "88fc5300d32c7ac6ca7b515310862f71e6fdf2c029bbec7c66c0f5dd47b6b1fb" + +inherit pypi setuptools3 + +BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-geomet_1.1.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-geomet_1.1.0.bb index ceba10b6..73394843 100644 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-geomet_1.1.0.bb +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-geomet_1.1.0.bb @@ -6,13 +6,9 @@ LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=d2794c0df5b907fdace235a619d80314" SRCNAME = "geomet" -SRC_URI[sha256sum] = "cb52411978ee01ff104ab48f108d7333b14423ae7a15a65fee25b7d29bda2e1b" +SRC_URI[sha256sum] = "51e92231a0ef6aaa63ac20c443377ba78a303fd2ecd179dc3567de79f3c11605" -S = "${WORKDIR}/git" -SRC_URI = "git://github.com/geomet/geomet.git;protocol=https;branch=master" -SRCREV = "6ac73c312b52aca328db2e61d90c5e363b62639f" - -inherit setuptools3 +inherit pypi python_setuptools_build_meta RDEPENDS:${PN} += "\ python3-click \ diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-gevent/not-final.patch b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-gevent/not-final.patch new file mode 100644 index 00000000..444a195d --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-gevent/not-final.patch @@ -0,0 +1,16 @@ +gevent fails to build with Cython 3.0.10. As per +https://github.com/gevent/gevent/issues/2031, removing the +cython.final decorator works around this. + +Upstream-Status: Pending +Signed-off-by: Ross Burton + +--- a/src/gevent/_gevent_cqueue.pxd ++++ b/src/gevent/_gevent_cqueue.pxd +@@ -75,7 +75,6 @@ cdef class ItemWaiter(Waiter): + cdef readonly Queue queue + + +-@cython.final + cdef class UnboundQueue(Queue): + pass diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-gevent_24.2.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-gevent_24.2.1.bb index fbdbf8cc..e4497217 100644 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-gevent_24.2.1.bb +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-gevent_24.2.1.bb @@ -4,7 +4,7 @@ a high-level synchronous API on top of the libevent event loop." HOMEPAGE = "http://www.gevent.org" LICENSE = "MIT & Python-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=4de99aac27b470c29c6c309e0c279b65" -DEPENDS += "python3-greenlet libev libuv c-ares python3-cython-native" +DEPENDS += "python3-greenlet-native python3-greenlet libev libuv python3-cython-native python3-cffi-native" RDEPENDS:${PN} = "python3-greenlet \ python3-mime \ @@ -13,11 +13,12 @@ RDEPENDS:${PN} = "python3-greenlet \ python3-zopeinterface \ " -SRC_URI += "file://0001-_setuputils.py-Do-not-add-sys_inc_dir.patch" +SRC_URI += "file://0001-_setuputils.py-Do-not-add-sys_inc_dir.patch \ + file://not-final.patch" SRC_URI[sha256sum] = "432fc76f680acf7cf188c2ee0f5d3ab73b63c1f03114c7cd8a34cebbe5aa2056" -inherit pypi setuptools3 +inherit pypi python_setuptools_build_meta # Don't embed libraries, link to the system provided libs instead export GEVENTSETUP_EMBED_CARES = "0" @@ -35,3 +36,8 @@ do_configure:append() { do_compile:append() { sed -i -e 's#${WORKDIR}##g' ${S}/src/gevent/*.c ${S}/src/gevent/libev/*.c ${S}/src/gevent/resolver/*.c } + +# http://errors.yoctoproject.org/Errors/Details/766918/ +# src/gevent/queue.c:11894:83: error: passing argument 1 of '__pyx_vtabptr_6gevent_14_gevent_cqueue_UnboundQueue->__pyx_base.put' from incompatible pointer type [-Wincompatible-pointer-types] +# src/gevent/queue.c:11894:114: error: passing argument 4 of '__pyx_vtabptr_6gevent_14_gevent_cqueue_UnboundQueue->__pyx_base.put' from incompatible pointer type [-Wincompatible-pointer-types] +CFLAGS += "-Wno-error=incompatible-pointer-types" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-gmqtt_0.6.14.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-gmqtt_0.6.14.bb deleted file mode 100644 index 5d8a3ba5..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-gmqtt_0.6.14.bb +++ /dev/null @@ -1,19 +0,0 @@ -SUMMARY = "Client for MQTT protocol" -HOMEPAGE = "https://github.com/wialon/gmqtt" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=903f1792621a3b35ee546da75d139177" - -SRC_URI[sha256sum] = "45b0f7794247455b9163155eeedf41c86e303c72b79056bf65d33038b17443a3" - -inherit pypi setuptools3 - -RDEPENDS:${PN} += "\ - python3-asyncio \ - python3-core \ - python3-datetime \ - python3-json \ - python3-logging \ - python3-netclient \ -" - -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-gmqtt_0.6.16.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-gmqtt_0.6.16.bb new file mode 100644 index 00000000..20cdee80 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-gmqtt_0.6.16.bb @@ -0,0 +1,19 @@ +SUMMARY = "Client for MQTT protocol" +HOMEPAGE = "https://github.com/wialon/gmqtt" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=903f1792621a3b35ee546da75d139177" + +SRC_URI[sha256sum] = "ddd1fdc1c6ae604e74377cf70e99f067e579c03c1c71a6acd494e199e93b7fa4" + +inherit pypi setuptools3 + +RDEPENDS:${PN} += "\ + python3-asyncio \ + python3-core \ + python3-datetime \ + python3-json \ + python3-logging \ + python3-netclient \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-google-api-core_2.18.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-google-api-core_2.18.0.bb deleted file mode 100644 index b4cbafa8..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-google-api-core_2.18.0.bb +++ /dev/null @@ -1,25 +0,0 @@ -DESCRIPTION = "Google API client core library" -HOMEPAGE = "https://github.com/googleapis/python-api-core" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" - -inherit pypi setuptools3 - -SRC_URI[sha256sum] = "62d97417bfc674d6cef251e5c4d639a9655e00c45528c4364fbfebb478ce72a9" - -RDEPENDS:${PN} += "\ - python3-asyncio \ - python3-datetime \ - python3-logging \ - python3-math \ -" - -RDEPENDS:${PN} += "\ - python3-googleapis-common-protos \ - python3-google-auth \ - python3-grpcio \ - python3-protobuf \ - python3-pytz \ - python3-requests \ - python3-six \ -" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-google-api-core_2.19.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-google-api-core_2.19.1.bb new file mode 100644 index 00000000..f21b41aa --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-google-api-core_2.19.1.bb @@ -0,0 +1,25 @@ +DESCRIPTION = "Google API client core library" +HOMEPAGE = "https://github.com/googleapis/python-api-core" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" + +inherit pypi setuptools3 + +SRC_URI[sha256sum] = "f4695f1e3650b316a795108a76a1c416e6afb036199d1c1f1f110916df479ffd" + +RDEPENDS:${PN} += "\ + python3-asyncio \ + python3-datetime \ + python3-logging \ + python3-math \ +" + +RDEPENDS:${PN} += "\ + python3-googleapis-common-protos \ + python3-google-auth \ + python3-grpcio \ + python3-protobuf \ + python3-pytz \ + python3-requests \ + python3-six \ +" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-google-api-python-client_2.125.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-google-api-python-client_2.125.0.bb deleted file mode 100644 index 8abe4699..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-google-api-python-client_2.125.0.bb +++ /dev/null @@ -1,20 +0,0 @@ -SUMMARY = "The Google API Client for Python is a client library for accessing the Plus, \ -Moderator, and many other Google APIs." -HOMEPAGE = "https://github.com/googleapis/google-api-python-client" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" - -SRC_URI[sha256sum] = "51a0385cff65ec135106e8be60ee7112557396dde5f44113ae23912baddda143" - -inherit pypi setuptools3 - -RDEPENDS:${PN} += "\ - python3-logging \ - python3-six \ - python3-json \ - python3-core \ - python3-netclient \ - python3-httplib2 \ - python3-uritemplate \ - python3-google-api-core \ -" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-google-api-python-client_2.135.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-google-api-python-client_2.135.0.bb new file mode 100644 index 00000000..2b484560 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-google-api-python-client_2.135.0.bb @@ -0,0 +1,20 @@ +SUMMARY = "The Google API Client for Python is a client library for accessing the Plus, \ +Moderator, and many other Google APIs." +HOMEPAGE = "https://github.com/googleapis/google-api-python-client" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" + +SRC_URI[sha256sum] = "b552a28123ed95493035698db80e8ed78c9106a8b422e63a175150b9b55b704e" + +inherit pypi setuptools3 + +RDEPENDS:${PN} += "\ + python3-logging \ + python3-six \ + python3-json \ + python3-core \ + python3-netclient \ + python3-httplib2 \ + python3-uritemplate \ + python3-google-api-core \ +" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-google-auth_2.29.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-google-auth_2.29.0.bb deleted file mode 100644 index e8d438df..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-google-auth_2.29.0.bb +++ /dev/null @@ -1,41 +0,0 @@ -DESCRIPTION = "Google Authentication Library" -HOMEPAGE = "https://github.com/googleapis/google-auth-library-python" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" - -inherit pypi setuptools3 ptest - -SRC_URI[sha256sum] = "672dff332d073227550ffc7457868ac4218d6c500b155fe6cc17d2b13602c360" - -SRC_URI += " \ - file://run-ptest \ -" - -RDEPENDS:${PN}-ptest += " \ - python3-cryptography \ - python3-flask \ - python3-freezegun \ - python3-grpcio \ - python3-mock \ - python3-oauth2client \ - python3-pyopenssl \ - python3-pytest \ - python3-pytest-localserver \ - python3-pyu2f \ - python3-requests \ - python3-responses \ - python3-unittest-automake-output \ - python3-unixadmin \ -" - -do_install_ptest() { - install -d ${D}${PTEST_PATH}/tests - cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ -} - -RDEPENDS:${PN} += "\ - python3-cachetools \ - python3-json \ - python3-pyasn1-modules \ - python3-rsa \ -" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-google-auth_2.30.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-google-auth_2.30.0.bb new file mode 100644 index 00000000..c51be165 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-google-auth_2.30.0.bb @@ -0,0 +1,41 @@ +DESCRIPTION = "Google Authentication Library" +HOMEPAGE = "https://github.com/googleapis/google-auth-library-python" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" + +inherit pypi setuptools3 ptest + +SRC_URI[sha256sum] = "ab630a1320f6720909ad76a7dbdb6841cdf5c66b328d690027e4867bdfb16688" + +SRC_URI += " \ + file://run-ptest \ +" + +RDEPENDS:${PN}-ptest += " \ + python3-cryptography \ + python3-flask \ + python3-freezegun \ + python3-grpcio \ + python3-mock \ + python3-oauth2client \ + python3-pyopenssl \ + python3-pytest \ + python3-pytest-localserver \ + python3-pyu2f \ + python3-requests \ + python3-responses \ + python3-unittest-automake-output \ + python3-unixadmin \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ +} + +RDEPENDS:${PN} += "\ + python3-cachetools \ + python3-json \ + python3-pyasn1-modules \ + python3-rsa \ +" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-googleapis-common-protos_1.63.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-googleapis-common-protos_1.63.0.bb deleted file mode 100644 index 3c552944..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-googleapis-common-protos_1.63.0.bb +++ /dev/null @@ -1,13 +0,0 @@ -DESCRIPTION = "Common protobufs used in Google APIs" -HOMEPAGE = "https://github.com/googleapis/python-api-common-protos" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" - -inherit pypi setuptools3 - -SRC_URI[sha256sum] = "17ad01b11d5f1d0171c06d3ba5c04c54474e883b66b949722b4938ee2694ef4e" - -RDEPENDS:${PN} += "\ - python3-grpcio \ - python3-protobuf \ -" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-googleapis-common-protos_1.63.2.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-googleapis-common-protos_1.63.2.bb new file mode 100644 index 00000000..5539d19f --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-googleapis-common-protos_1.63.2.bb @@ -0,0 +1,13 @@ +DESCRIPTION = "Common protobufs used in Google APIs" +HOMEPAGE = "https://github.com/googleapis/python-api-common-protos" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" + +inherit pypi setuptools3 + +SRC_URI[sha256sum] = "27c5abdffc4911f28101e635de1533fb4cfd2c37fbaa9174587c799fac90aa87" + +RDEPENDS:${PN} += "\ + python3-grpcio \ + python3-protobuf \ +" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-gpiod_2.1.3.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-gpiod_2.1.3.bb deleted file mode 100644 index d8c8628d..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-gpiod_2.1.3.bb +++ /dev/null @@ -1,46 +0,0 @@ -SUMMARY = "Python bindings for libgpiod." - -LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later & CC-BY-SA-4.0" -# The actual license files live in the upstream libgpiod from which the pypi -# package is spun out. -LIC_FILES_CHKSUM = "file://setup.py;beginline=237;endline=237;md5=f5ddb56912b7f20bf94aa4d1bdcd3533" - -SRC_URI += "file://run-ptest" - -SRC_URI[sha256sum] = "a33193d6cab79d252329f71666a35a3668e04f1f82bf9b93ee2c9ae852398b20" - -inherit setuptools3-base python_pep517 ptest pypi - -DEPENDS += " \ - libgpiod \ - python3-setuptools-native \ -" -RDEPENDS:${PN} += " \ - libgpiod (>= 2.1) \ - python3-datetime \ - python3-profile \ -" -RDEPENDS:${PN}-ptest += " \ - libgpiod-ptest \ - python3-setuptools \ -" -RRECOMMENDS:${PN}-ptest += "kernel-module-configfs" - -export LINK_SYSTEM_LIBGPIOD = "1" - -do_compile_ptest() { - setup_target_config - nativepython3 build_tests.py -} - -do_install_ptest() { - install -d ${D}${PTEST_PATH}/gpiod-test/gpiosim - install -d ${D}${PTEST_PATH}/gpiod-test/procname - install -m 0644 ${S}/tests/*.py ${D}${PTEST_PATH}/gpiod-test/ - install -m 0644 ${B}/tests/gpiosim/_ext* ${D}${PTEST_PATH}/gpiod-test/gpiosim - install -m 0644 ${S}/tests/gpiosim/*.py ${D}${PTEST_PATH}/gpiod-test/gpiosim - install -m 0644 ${B}/tests/procname/_ext* ${D}${PTEST_PATH}/gpiod-test/procname - install -m 0644 ${S}/tests/procname/*.py ${D}${PTEST_PATH}/gpiod-test/procname -} - -INSANE_SKIP:${PN}-ptest += "buildpaths" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-gpiod_2.2.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-gpiod_2.2.1.bb new file mode 100644 index 00000000..8e1cbf84 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-gpiod_2.2.1.bb @@ -0,0 +1,46 @@ +SUMMARY = "Python bindings for libgpiod." + +LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later & CC-BY-SA-4.0" +# The actual license files live in the upstream libgpiod from which the pypi +# package is spun out. +LIC_FILES_CHKSUM = "file://setup.py;beginline=237;endline=237;md5=f5ddb56912b7f20bf94aa4d1bdcd3533" + +SRC_URI += "file://run-ptest" + +SRC_URI[sha256sum] = "802dad3a89016339a231c462c6da2d56c820f5fb11519728ff86cdff0a16da96" + +inherit setuptools3-base python_pep517 ptest pypi + +DEPENDS += " \ + libgpiod \ + python3-setuptools-native \ +" +RDEPENDS:${PN} += " \ + libgpiod (>= 2.1) \ + python3-datetime \ + python3-profile \ +" +RDEPENDS:${PN}-ptest += " \ + libgpiod-ptest \ + python3-setuptools \ +" +RRECOMMENDS:${PN}-ptest += "kernel-module-configfs" + +export LINK_SYSTEM_LIBGPIOD = "1" + +do_compile_ptest() { + setup_target_config + nativepython3 build_tests.py +} + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/gpiod-test/gpiosim + install -d ${D}${PTEST_PATH}/gpiod-test/procname + install -m 0644 ${S}/tests/*.py ${D}${PTEST_PATH}/gpiod-test/ + install -m 0644 ${B}/tests/gpiosim/_ext* ${D}${PTEST_PATH}/gpiod-test/gpiosim + install -m 0644 ${S}/tests/gpiosim/*.py ${D}${PTEST_PATH}/gpiod-test/gpiosim + install -m 0644 ${B}/tests/procname/_ext* ${D}${PTEST_PATH}/gpiod-test/procname + install -m 0644 ${S}/tests/procname/*.py ${D}${PTEST_PATH}/gpiod-test/procname +} + +INSANE_SKIP:${PN}-ptest += "buildpaths" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-greenlet_3.0.3.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-greenlet_3.0.3.bb deleted file mode 100644 index abd6c49c..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-greenlet_3.0.3.bb +++ /dev/null @@ -1,9 +0,0 @@ -SUMMARY = "Python lightweight in-process concurrent programming" -HOMEPAGE = "https://greenlet.readthedocs.io/en/latest/" -LICENSE = "MIT & PSF-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=e95668d68e4329085c7ab3535e6a7aee \ - file://LICENSE.PSF;md5=c106931d9429eda0492617f037b8f69a" - -SRC_URI[sha256sum] = "43374442353259554ce33599da8b692d5aa96f8976d567d4badf263371fbe491" - -inherit pypi setuptools3 diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-greenlet_3.1.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-greenlet_3.1.0.bb new file mode 100644 index 00000000..11e8a76c --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-greenlet_3.1.0.bb @@ -0,0 +1,11 @@ +SUMMARY = "Python lightweight in-process concurrent programming" +HOMEPAGE = "https://greenlet.readthedocs.io/en/latest/" +LICENSE = "MIT & PSF-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=e95668d68e4329085c7ab3535e6a7aee \ + file://LICENSE.PSF;md5=c106931d9429eda0492617f037b8f69a" + +SRC_URI[sha256sum] = "b395121e9bbe8d02a750886f108d540abe66075e61e22f7353d9acb0b81be0f0" + +inherit pypi python_setuptools_build_meta + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio-channelz_1.62.2.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio-channelz_1.62.2.bb new file mode 100644 index 00000000..ed5ede42 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio-channelz_1.62.2.bb @@ -0,0 +1,16 @@ +DESCRIPTION = "Google gRPC channelz" +HOMEPAGE = "http://www.grpc.io/" +SECTION = "devel/python" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=7145f7cdd263359b62d342a02f005515" + +inherit pypi setuptools3 + +DEPENDS += "python3-grpcio" + +SRC_URI[sha256sum] = "6e4ac2c43d76b245c5f66d98f523db08786b186128a655ee6f20a30a7e68e4f9" + +RDEPENDS:${PN} = "python3-grpcio" + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio-reflection_1.62.2.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio-reflection_1.62.2.bb new file mode 100644 index 00000000..478c5b33 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio-reflection_1.62.2.bb @@ -0,0 +1,16 @@ +DESCRIPTION = "Google gRPC reflection" +HOMEPAGE = "http://www.grpc.io/" +SECTION = "devel/python" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=7145f7cdd263359b62d342a02f005515" + +inherit pypi setuptools3 + +DEPENDS += "python3-grpcio" + +SRC_URI[sha256sum] = "2dd44806d68d0006636529bda573012b19a42281478c2d051cdaaebb91e2516c" + +RDEPENDS:${PN} = "python3-grpcio" + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio-tools_1.62.2.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio-tools_1.62.2.bb index 5b8bbe68..e05b8734 100644 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio-tools_1.62.2.bb +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio-tools_1.62.2.bb @@ -16,8 +16,4 @@ SRC_URI[sha256sum] = "5fd5e1582b678e6b941ee5f5809340be5e0724691df5299aae8226640f RDEPENDS:${PN} = "python3-grpcio" -do_compile:prepend() { - export GRPC_PYTHON_BUILD_EXT_COMPILER_JOBS="${@oe.utils.parallel_make(d, False)}" -} - BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/CVE-2024-11407.patch b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/CVE-2024-11407.patch deleted file mode 100644 index eef5e723..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/CVE-2024-11407.patch +++ /dev/null @@ -1,32 +0,0 @@ -From e9046b2bbebc0cb7f5dc42008f807f6c7e98e791 Mon Sep 17 00:00:00 2001 -From: Vignesh Babu -Date: Thu, 12 Sep 2024 11:13:45 -0700 -Subject: [PATCH] [EventEngine] Fix bug in Tx0cp code path in posix endpoint. - -This fix ensures that the iov_base pointers point to the right address. - -PiperOrigin-RevId: 673923651 - -CVE: CVE-2024-11407 -Upstream-Status: Backport [https://github.com/grpc/grpc/commit/e9046b2bbebc0cb7f5dc42008f807f6c7e98e791] -Signed-off-by: Peter Marko ---- - src/core/lib/event_engine/posix_engine/posix_endpoint.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/core/lib/event_engine/posix_engine/posix_endpoint.cc b/src/core/lib/event_engine/posix_engine/posix_endpoint.cc -index 7634bb1334b..c5708db02c5 100644 ---- a/src/core/lib/event_engine/posix_engine/posix_endpoint.cc -+++ b/src/core/lib/event_engine/posix_engine/posix_endpoint.cc -@@ -240,7 +240,7 @@ msg_iovlen_type TcpZerocopySendRecord::PopulateIovs(size_t* unwind_slice_idx, - iov_size++) { - MutableSlice& slice = internal::SliceCast( - buf_.MutableSliceAt(out_offset_.slice_idx)); -- iov[iov_size].iov_base = slice.begin(); -+ iov[iov_size].iov_base = slice.begin() + out_offset_.byte_idx; - iov[iov_size].iov_len = slice.length() - out_offset_.byte_idx; - *sending_length += iov[iov_size].iov_len; - ++(out_offset_.slice_idx); --- -2.30.2 - diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio_1.62.2.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio_1.62.2.bb deleted file mode 100644 index 3581991a..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio_1.62.2.bb +++ /dev/null @@ -1,53 +0,0 @@ -DESCRIPTION = "Google gRPC" -HOMEPAGE = "http://www.grpc.io/" -SECTION = "devel/python" -LICENSE = "Apache-2.0 & BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=731e401b36f8077ae0c134b59be5c906" - -DEPENDS += "python3-protobuf" - -SRC_URI += "file://0001-Include-missing-cstdint-header.patch \ - file://abseil-ppc-fixes.patch \ - file://0001-zlib-Include-unistd.h-for-open-close-C-APIs.patch \ - file://0001-crypto-use-_Generic-only-if-defined-__cplusplus.patch;patchdir=third_party/boringssl-with-bazel/src/ \ - file://0001-target.h-define-proper-macro-for-ppc-ppc64.patch \ - file://0001-PR-1644-unscaledcycleclock-remove-RISC-V-support.patch \ - file://CVE-2024-11407.patch \ - " -SRC_URI[sha256sum] = "c77618071d96b7a8be2c10701a98537823b9c65ba256c0b9067e0594cdbd954d" - -RDEPENDS:${PN} = "python3-protobuf" - -inherit setuptools3 -inherit pypi - -CFLAGS:append:libc-musl = " -D_LARGEFILE64_SOURCE" - -export GRPC_PYTHON_DISABLE_LIBC_COMPATIBILITY = "1" - -BORING_SSL_PLATFORM:arm = "linux-arm" -BORING_SSL_PLATFORM:x86-64 = "linux-x86_64" -BORING_SSL_PLATFORM:aarch64 = "linux-aarch64" -BORING_SSL_PLATFORM ?= "unsupported" -export GRPC_BORING_SSL_PLATFORM = "${BORING_SSL_PLATFORM}" -export GRPC_BUILD_OVERRIDE_BORING_SSL_ASM_PLATFORM = "${BORING_SSL_PLATFORM}" - -BORING_SSL:arm = "1" -BORING_SSL:x86-64 = "1" -BORING_SSL:aarch64 = "1" -BORING_SSL ?= "0" -export GRPC_BUILD_WITH_BORING_SSL_ASM = "${BORING_SSL}" - -do_compile:prepend() { - export GRPC_PYTHON_BUILD_EXT_COMPILER_JOBS="${@oe.utils.parallel_make(d, False)}" -} - -GRPC_CFLAGS ?= "" -GRPC_CFLAGS:append:toolchain-clang = " -fvisibility=hidden -fno-wrapv -fno-exceptions" -export GRPC_PYTHON_CFLAGS = "${GRPC_CFLAGS}" - -CLEANBROKEN = "1" - -BBCLASSEXTEND = "native nativesdk" - -CCACHE_DISABLE = "1" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio_1.66.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio_1.66.1.bb new file mode 100644 index 00000000..fb91f345 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio_1.66.1.bb @@ -0,0 +1,48 @@ +DESCRIPTION = "Google gRPC" +HOMEPAGE = "http://www.grpc.io/" +SECTION = "devel/python" +LICENSE = "Apache-2.0 & BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=731e401b36f8077ae0c134b59be5c906" + +DEPENDS += "python3-protobuf" + +SRC_URI += "file://0001-Include-missing-cstdint-header.patch \ + file://abseil-ppc-fixes.patch \ + file://0001-zlib-Include-unistd.h-for-open-close-C-APIs.patch \ + file://0001-crypto-use-_Generic-only-if-defined-__cplusplus.patch;patchdir=third_party/boringssl-with-bazel/src/ \ + file://0001-target.h-define-proper-macro-for-ppc-ppc64.patch \ + file://0001-PR-1644-unscaledcycleclock-remove-RISC-V-support.patch \ + " +SRC_URI[sha256sum] = "35334f9c9745add3e357e3372756fd32d925bd52c41da97f4dfdafbde0bf0ee2" + +RDEPENDS:${PN} = "python3-protobuf" + +inherit setuptools3 +inherit pypi + +CFLAGS:append:libc-musl = " -D_LARGEFILE64_SOURCE" + +export GRPC_PYTHON_DISABLE_LIBC_COMPATIBILITY = "1" + +BORING_SSL_PLATFORM:arm = "linux-arm" +BORING_SSL_PLATFORM:x86-64 = "linux-x86_64" +BORING_SSL_PLATFORM:aarch64 = "linux-aarch64" +BORING_SSL_PLATFORM ?= "unsupported" +export GRPC_BORING_SSL_PLATFORM = "${BORING_SSL_PLATFORM}" +export GRPC_BUILD_OVERRIDE_BORING_SSL_ASM_PLATFORM = "${BORING_SSL_PLATFORM}" + +BORING_SSL:arm = "1" +BORING_SSL:x86-64 = "1" +BORING_SSL:aarch64 = "1" +BORING_SSL ?= "0" +export GRPC_BUILD_WITH_BORING_SSL_ASM = "${BORING_SSL}" + +GRPC_CFLAGS ?= "" +GRPC_CFLAGS:append:toolchain-clang = " -fvisibility=hidden -fno-wrapv -fno-exceptions" +export GRPC_PYTHON_CFLAGS = "${GRPC_CFLAGS}" + +CLEANBROKEN = "1" + +BBCLASSEXTEND = "native nativesdk" + +CCACHE_DISABLE = "1" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-gunicorn_21.2.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-gunicorn_21.2.0.bb deleted file mode 100644 index 9fd601c9..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-gunicorn_21.2.0.bb +++ /dev/null @@ -1,26 +0,0 @@ -SUMMARY = "WSGI HTTP Server for UNIX" - -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=302423eeae97079c633da81b6a5fe35e" - -SRC_URI[sha256sum] = "88ec8bff1d634f98e61b9f65bc4bf3cd918a90806c6f5c48bc5603849ec81033" - -inherit pypi setuptools3 ptest - -SRC_URI += " \ - file://run-ptest \ -" - -RDEPENDS:${PN}-ptest += " \ - python3-eventlet \ - python3-gevent \ - python3-pytest \ - python3-unittest-automake-output \ -" - -do_install_ptest() { - install -d ${D}${PTEST_PATH}/tests - cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ -} - -RDEPENDS:${PN} += "python3-setuptools python3-fcntl" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-gunicorn_23.0.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-gunicorn_23.0.0.bb new file mode 100644 index 00000000..3c819a93 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-gunicorn_23.0.0.bb @@ -0,0 +1,28 @@ +SUMMARY = "WSGI HTTP Server for UNIX" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=5b70a8b30792a916f50dc96123e61ddf" + +SRC_URI[sha256sum] = "f014447a0101dc57e294f6c18ca6b40227a4c90e9bdb586042628030cba004ec" + +inherit pypi python_setuptools_build_meta ptest + +SRC_URI += " \ + file://run-ptest \ +" + +# python-misc for wsgiref +RDEPENDS:${PN}-ptest += " \ + python3-eventlet \ + python3-gevent \ + python3-misc \ + python3-pytest \ + python3-unittest-automake-output \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ +} + +RDEPENDS:${PN} += "python3-setuptools python3-fcntl" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-h5py/0001-Fix-Cython-3-compatibility.patch b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-h5py/0001-Fix-Cython-3-compatibility.patch deleted file mode 100644 index aba62ddf..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-h5py/0001-Fix-Cython-3-compatibility.patch +++ /dev/null @@ -1,796 +0,0 @@ -From 1e02dbe5533d679b9ef064078a303607a7d0542a Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Fri, 29 Dec 2023 14:33:38 +0100 -Subject: [PATCH] Fix Cython 3 compatibility - -Upstream-Status: Backport [https://github.com/h5py/h5py/pull/2345/commits] -Signed-off-by: Alexander Kanavin ---- - benchmarks/benchmark_slicing.py | 12 ++++---- - docs/conf.py | 2 +- - docs/high/dataset.rst | 4 +-- - docs/high/file.rst | 6 ++-- - docs/requirements-rtd.txt | 5 ++-- - docs/vds.rst | 2 +- - docs/whatsnew/3.0.rst | 2 +- - docs/whatsnew/3.7.rst | 4 +-- - h5py/_errors.pxd | 10 +++---- - h5py/_errors.pyx | 4 +-- - h5py/_hl/base.py | 4 +-- - h5py/_hl/dataset.py | 8 ++--- - h5py/_hl/dims.py | 3 +- - h5py/_hl/files.py | 2 +- - h5py/_locks.pxi | 6 ++-- - h5py/_proxy.pyx | 4 +-- - h5py/_selector.pyx | 2 +- - h5py/api_compat.h | 13 ++++---- - h5py/api_types_hdf5.pxd | 48 +++++++++++++++--------------- - h5py/h5fd.pyx | 38 ++++++++++++++++------- - h5py/h5p.pyx | 4 +-- - h5py/h5t.pyx | 2 +- - h5py/tests/test_attrs_data.py | 2 +- - h5py/tests/test_big_endian_file.py | 4 +-- - h5py/tests/test_dataset.py | 4 +-- - h5py/tests/test_file.py | 6 ++-- - h5py/tests/test_file_alignment.py | 4 +-- - h5py/tests/test_group.py | 4 +-- - h5py/tests/test_selections.py | 2 +- - pylintrc | 2 +- - pyproject.toml | 2 +- - setup_configure.py | 2 +- - tox.ini | 2 +- - 33 files changed, 116 insertions(+), 103 deletions(-) - -diff --git a/benchmarks/benchmark_slicing.py b/benchmarks/benchmark_slicing.py -index e9a34dad..b833f012 100644 ---- a/benchmarks/benchmark_slicing.py -+++ b/benchmarks/benchmark_slicing.py -@@ -7,7 +7,7 @@ import logging - logger = logging.getLogger(__name__) - import h5py - --#Needed for mutithreading: -+#Needed for multithreading: - from queue import Queue - from threading import Thread, Event - import multiprocessing -@@ -173,8 +173,8 @@ class SlicingBenchmark: - - if __name__ == "__main__": - logging.basicConfig(level=logging.INFO) -- benckmark = SlicingBenchmark() -- benckmark.setup() -- benckmark.time_sequential_reads() -- benckmark.time_threaded_reads() -- benckmark.teardown() -+ benchmark = SlicingBenchmark() -+ benchmark.setup() -+ benchmark.time_sequential_reads() -+ benchmark.time_threaded_reads() -+ benchmark.teardown() -diff --git a/docs/conf.py b/docs/conf.py -index 93b23939..a0f6c1ac 100644 ---- a/docs/conf.py -+++ b/docs/conf.py -@@ -109,7 +109,7 @@ pygments_style = 'sphinx' - - # The theme to use for HTML and HTML Help pages. See the documentation for - # a list of builtin themes. --html_theme = 'default' -+html_theme = 'sphinx_rtd_theme' - - # Theme options are theme-specific and customize the look and feel of a theme - # further. For a list of options available for each theme, see the -diff --git a/docs/high/dataset.rst b/docs/high/dataset.rst -index 0f27284f..cb75fffe 100644 ---- a/docs/high/dataset.rst -+++ b/docs/high/dataset.rst -@@ -58,7 +58,7 @@ the requested ``dtype``. - Reading & writing data - ---------------------- - --HDF5 datasets re-use the NumPy slicing syntax to read and write to the file. -+HDF5 datasets reuse the NumPy slicing syntax to read and write to the file. - Slice specifications are translated directly to HDF5 "hyperslab" - selections, and are a fast and efficient way to access data in the file. The - following slicing arguments are recognized: -@@ -464,7 +464,7 @@ Reference - >>> dset = f["MyDS"] - >>> f.close() - >>> if dset: -- ... print("datset accessible") -+ ... print("dataset accessible") - ... else: - ... print("dataset inaccessible") - dataset inaccessible -diff --git a/docs/high/file.rst b/docs/high/file.rst -index 484498ce..e757fe1a 100644 ---- a/docs/high/file.rst -+++ b/docs/high/file.rst -@@ -392,7 +392,7 @@ Data alignment - When creating datasets within files, it may be advantageous to align the offset - within the file itself. This can help optimize read and write times if the data - become aligned with the underlying hardware, or may help with parallelism with --MPI. Unfortunately, aligning small variables to large blocks can leave alot of -+MPI. Unfortunately, aligning small variables to large blocks can leave a lot of - empty space in a file. To this effect, application developers are left with two - options to tune the alignment of data within their file. The two variables - ``alignment_threshold`` and ``alignment_interval`` in the :class:`File` -@@ -415,7 +415,7 @@ number of regions. Setting a small value can reduce the overall file size, - especially in combination with the ``libver`` option. This controls how the - overall data and metadata are laid out within the file. - --For more information, see the offical HDF5 documentation `H5P_SET_META_BLOCK_SIZE -+For more information, see the official HDF5 documentation `H5P_SET_META_BLOCK_SIZE - `_. - - Reference -@@ -497,7 +497,7 @@ Reference - Only available with HDF5 >= 1.12.1 or 1.10.x >= 1.10.7. - :param alignment_threshold: Together with ``alignment_interval``, this - property ensures that any file object greater than or equal -- in size to the alignement threshold (in bytes) will be -+ in size to the alignment threshold (in bytes) will be - aligned on an address which is a multiple of alignment interval. - :param alignment_interval: This property should be used in conjunction with - ``alignment_threshold``. See the description above. For more -diff --git a/docs/requirements-rtd.txt b/docs/requirements-rtd.txt -index e67a3eee..52096927 100644 ---- a/docs/requirements-rtd.txt -+++ b/docs/requirements-rtd.txt -@@ -1,3 +1,2 @@ --sphinx==4.3.0 --sphinx_rtd_theme==1.0.0 --readthedocs-sphinx-search==0.1.1 -+sphinx==7.2.6 -+sphinx_rtd_theme==1.3.0 -diff --git a/docs/vds.rst b/docs/vds.rst -index a9a7c7f6..bd47ad1c 100644 ---- a/docs/vds.rst -+++ b/docs/vds.rst -@@ -124,7 +124,7 @@ Reference - slice it to indicate which regions should be used in the virtual dataset. - - When `creating a virtual dataset `_, paths to sources present -- in the same file are changed to a ".", refering to the current file (see -+ in the same file are changed to a ".", referring to the current file (see - `H5Pset_virtual `_). - This will keep such sources valid in case the file is renamed. - -diff --git a/docs/whatsnew/3.0.rst b/docs/whatsnew/3.0.rst -index db30ad66..ff3c2bef 100644 ---- a/docs/whatsnew/3.0.rst -+++ b/docs/whatsnew/3.0.rst -@@ -44,7 +44,7 @@ New features - See also the deprecation related to the ``external`` argument. - * Support for setting file space strategy at file creation. Includes option to - persist empty space tracking between sessions. See :class:`.File` for details. --* More efficient writing when assiging a scalar to a chunked dataset, when the -+* More efficient writing when assigning a scalar to a chunked dataset, when the - number of elements to write is no more than the size of one chunk. - * Introduced support for the split :ref:`file driver ` - (:pr:`1468`). -diff --git a/docs/whatsnew/3.7.rst b/docs/whatsnew/3.7.rst -index 27790254..2e822d68 100644 ---- a/docs/whatsnew/3.7.rst -+++ b/docs/whatsnew/3.7.rst -@@ -19,7 +19,7 @@ New features - include it. Alternatively, you can :ref:`build h5py from source ` - against an HDF5 build with the direct driver enabled. - * The :class:`.File` constructor contains two new parameters ``alignment_threshold``, -- and ``alignment_interval`` controling the data alignment within the HDF5 -+ and ``alignment_interval`` controlling the data alignment within the HDF5 - file (:pr:`2040`). - * :meth:`~.Group.create_dataset` and :meth:`~.Group.require_dataset` now accept - parameters ``efile_prefix`` and ``virtual_prefix`` to set a filesystem path -@@ -40,7 +40,7 @@ Bug fixes - attributes with ``track_order=True``. - * Fix for building with mpi4py on Python 3.10 (:pr:`2101`). - * Fixed fancy indexing with a boolean array for a single dimension (:pr:`2079`). --* Avoid returning unitialised memory when reading from a chunked dataset with -+* Avoid returning uninitialised memory when reading from a chunked dataset with - missing chunks and no fill value (:pr:`2076`). - * Enable setting of fillvalue for datasets with variable length string dtype - (:pr:`2044`). -diff --git a/h5py/_errors.pxd b/h5py/_errors.pxd -index df9c1bbe..3cba6307 100644 ---- a/h5py/_errors.pxd -+++ b/h5py/_errors.pxd -@@ -23,7 +23,7 @@ cdef extern from "hdf5.h": - H5E_ARGS, # invalid arguments to routine - H5E_RESOURCE, # resource unavailable - H5E_INTERNAL, # Internal error (too specific to document) -- H5E_FILE, # file Accessability -+ H5E_FILE, # file Accessibility - H5E_IO, # Low-level I/O - H5E_FUNC, # function Entry/Exit - H5E_ATOM, # object Atom -@@ -121,7 +121,7 @@ cdef extern from "hdf5.h": - # No error - H5E_NONE_MINOR # No error - -- # File accessability errors -+ # File accessibility errors - H5E_FILEEXISTS # File already exists - H5E_FILEOPEN # File already open - H5E_CANTCREATE # Unable to create file -@@ -207,7 +207,7 @@ cdef extern from "hdf5.h": - H5E_ARGS, # invalid arguments to routine - H5E_RESOURCE, # resource unavailable - H5E_INTERNAL, # Internal error (too specific to document) -- H5E_FILE, # file Accessability -+ H5E_FILE, # file Accessibility - H5E_IO, # Low-level I/O - H5E_FUNC, # function Entry/Exit - H5E_ID, # object ID -@@ -305,7 +305,7 @@ cdef extern from "hdf5.h": - # No error - H5E_NONE_MINOR # No error - -- # File accessability errors -+ # File accessibility errors - H5E_FILEEXISTS # File already exists - H5E_FILEOPEN # File already open - H5E_CANTCREATE # Unable to create file -@@ -425,4 +425,4 @@ ctypedef struct err_cookie: - cdef err_cookie set_error_handler(err_cookie handler) - - # Set the default error handler set by silence_errors/unsilence_errors --cdef void set_default_error_handler() nogil -+cdef void set_default_error_handler() noexcept nogil -diff --git a/h5py/_errors.pyx b/h5py/_errors.pyx -index c3bd184e..2a7524b2 100644 ---- a/h5py/_errors.pyx -+++ b/h5py/_errors.pyx -@@ -94,7 +94,7 @@ cdef struct err_data_t: - H5E_error_t err - int n - --cdef herr_t walk_cb(unsigned int n, const H5E_error_t *desc, void *e) nogil noexcept: -+cdef herr_t walk_cb(unsigned int n, const H5E_error_t *desc, void *e) noexcept nogil: - - cdef err_data_t *ee = e - -@@ -168,7 +168,7 @@ cdef err_cookie _error_handler # Store error handler used by h5py - _error_handler.func = NULL - _error_handler.data = NULL - --cdef void set_default_error_handler() nogil: -+cdef void set_default_error_handler() noexcept nogil: - """Set h5py's current default error handler""" - H5Eset_auto(H5E_DEFAULT, _error_handler.func, _error_handler.data) - -diff --git a/h5py/_hl/base.py b/h5py/_hl/base.py -index cad37053..9d261c90 100644 ---- a/h5py/_hl/base.py -+++ b/h5py/_hl/base.py -@@ -20,7 +20,7 @@ import posixpath - import numpy as np - - # The high-level interface is serialized; every public API function & method --# is wrapped in a lock. We re-use the low-level lock because (1) it's fast, -+# is wrapped in a lock. We reuse the low-level lock because (1) it's fast, - # and (2) it eliminates the possibility of deadlocks due to out-of-order - # lock acquisition. - from .._objects import phil, with_phil -@@ -524,7 +524,7 @@ def product(nums): - # Daniel Greenfeld, BSD license), where it is attributed to bottle (Copyright - # (c) 2009-2022, Marcel Hellkamp, MIT license). - --class cached_property(object): -+class cached_property: - def __init__(self, func): - self.__doc__ = getattr(func, "__doc__") - self.func = func -diff --git a/h5py/_hl/dataset.py b/h5py/_hl/dataset.py -index b69aba48..77b202d2 100644 ---- a/h5py/_hl/dataset.py -+++ b/h5py/_hl/dataset.py -@@ -334,10 +334,10 @@ class ChunkIterator: - self._layout = dset.chunks - if source_sel is None: - # select over entire dataset -- slices = [] -- for dim in range(rank): -- slices.append(slice(0, self._shape[dim])) -- self._sel = tuple(slices) -+ self._sel = tuple( -+ slice(0, self._shape[dim]) -+ for dim in range(rank) -+ ) - else: - if isinstance(source_sel, slice): - self._sel = (source_sel,) -diff --git a/h5py/_hl/dims.py b/h5py/_hl/dims.py -index d3c9206b..0cf4c9f3 100644 ---- a/h5py/_hl/dims.py -+++ b/h5py/_hl/dims.py -@@ -53,8 +53,7 @@ class DimensionProxy(base.CommonStateObject): - - @with_phil - def __iter__(self): -- for k in self.keys(): -- yield k -+ yield from self.keys() - - @with_phil - def __len__(self): -diff --git a/h5py/_hl/files.py b/h5py/_hl/files.py -index aa4fb78d..bfcf3098 100644 ---- a/h5py/_hl/files.py -+++ b/h5py/_hl/files.py -@@ -480,7 +480,7 @@ class File(Group): - - alignment_threshold - Together with ``alignment_interval``, this property ensures that -- any file object greater than or equal in size to the alignement -+ any file object greater than or equal in size to the alignment - threshold (in bytes) will be aligned on an address which is a - multiple of alignment interval. - -diff --git a/h5py/_locks.pxi b/h5py/_locks.pxi -index bc8b2dd9..1ec4e2fc 100644 ---- a/h5py/_locks.pxi -+++ b/h5py/_locks.pxi -@@ -63,7 +63,7 @@ cdef class FastRLock: - return self._owner == pythread.PyThread_get_thread_ident() - - --cdef inline bint lock_lock(FastRLock lock, long current_thread, bint blocking) nogil: -+cdef inline bint lock_lock(FastRLock lock, long current_thread, bint blocking) noexcept nogil: - # Note that this function *must* hold the GIL when being called. - # We just use 'nogil' in the signature to make sure that no Python - # code execution slips in that might free the GIL -@@ -83,7 +83,7 @@ cdef inline bint lock_lock(FastRLock lock, long current_thread, bint blocking) n - lock, current_thread, - pythread.WAIT_LOCK if blocking else pythread.NOWAIT_LOCK) - --cdef bint _acquire_lock(FastRLock lock, long current_thread, int wait) nogil: -+cdef bint _acquire_lock(FastRLock lock, long current_thread, int wait) noexcept nogil: - # Note that this function *must* hold the GIL when being called. - # We just use 'nogil' in the signature to make sure that no Python - # code execution slips in that might free the GIL -@@ -111,7 +111,7 @@ cdef bint _acquire_lock(FastRLock lock, long current_thread, int wait) nogil: - lock._count = 1 - return 1 - --cdef inline void unlock_lock(FastRLock lock) nogil: -+cdef inline void unlock_lock(FastRLock lock) noexcept nogil: - # Note that this function *must* hold the GIL when being called. - # We just use 'nogil' in the signature to make sure that no Python - # code execution slips in that might free the GIL -diff --git a/h5py/_proxy.pyx b/h5py/_proxy.pyx -index 46b4fe0d..e40504f5 100644 ---- a/h5py/_proxy.pyx -+++ b/h5py/_proxy.pyx -@@ -241,7 +241,7 @@ ctypedef struct h5py_scatter_t: - void* buf - - cdef herr_t h5py_scatter_cb(void* elem, hid_t type_id, unsigned ndim, -- const hsize_t *point, void *operator_data) nogil except -1: -+ const hsize_t *point, void *operator_data) except -1 nogil: - cdef h5py_scatter_t* info = operator_data - - memcpy(elem, (info[0].buf)+((info[0].i)*(info[0].elsize)), -@@ -252,7 +252,7 @@ cdef herr_t h5py_scatter_cb(void* elem, hid_t type_id, unsigned ndim, - return 0 - - cdef herr_t h5py_gather_cb(void* elem, hid_t type_id, unsigned ndim, -- const hsize_t *point, void *operator_data) nogil except -1: -+ const hsize_t *point, void *operator_data) except -1 nogil: - cdef h5py_scatter_t* info = operator_data - - memcpy((info[0].buf)+((info[0].i)*(info[0].elsize)), elem, -diff --git a/h5py/_selector.pyx b/h5py/_selector.pyx -index 8b858c82..69970176 100644 ---- a/h5py/_selector.pyx -+++ b/h5py/_selector.pyx -@@ -341,7 +341,7 @@ cdef class Reader: - - arr = PyArray_ZEROS(arr_rank, arr_shape, self.np_typenum, 0) - if not self.native_byteorder: -- arr = arr.newbyteorder() -+ arr = arr.view(arr.dtype.newbyteorder()) - finally: - efree(arr_shape) - -diff --git a/h5py/api_compat.h b/h5py/api_compat.h -index 52917f4d..a359e827 100644 ---- a/h5py/api_compat.h -+++ b/h5py/api_compat.h -@@ -24,7 +24,6 @@ typedef void *PyMPI_MPI_Message; - #include - #include "Python.h" - #include "numpy/arrayobject.h" --#include "hdf5.h" - - /* The HOFFSET macro can't be used from Cython. */ - -@@ -35,14 +34,14 @@ typedef void *PyMPI_MPI_Message; - #define h5py_size_n256 (sizeof(npy_complex256)) - #endif - --#define h5py_offset_n64_real (HOFFSET(npy_complex64, real)) --#define h5py_offset_n64_imag (HOFFSET(npy_complex64, imag)) --#define h5py_offset_n128_real (HOFFSET(npy_complex128, real)) --#define h5py_offset_n128_imag (HOFFSET(npy_complex128, imag)) -+#define h5py_offset_n64_real (0) -+#define h5py_offset_n64_imag (sizeof(float)) -+#define h5py_offset_n128_real (0) -+#define h5py_offset_n128_imag (sizeof(double)) - - #ifdef NPY_COMPLEX256 --#define h5py_offset_n256_real (HOFFSET(npy_complex256, real)) --#define h5py_offset_n256_imag (HOFFSET(npy_complex256, imag)) -+#define h5py_offset_n256_real (0) -+#define h5py_offset_n256_imag (sizeof(long double)) - #endif - - #endif -diff --git a/h5py/api_types_hdf5.pxd b/h5py/api_types_hdf5.pxd -index a198f105..099e0f58 100644 ---- a/h5py/api_types_hdf5.pxd -+++ b/h5py/api_types_hdf5.pxd -@@ -257,27 +257,27 @@ cdef extern from "hdf5.h": - herr_t (*sb_encode)(H5FD_t *file, char *name, unsigned char *p) - herr_t (*sb_decode)(H5FD_t *f, const char *name, const unsigned char *p) - size_t fapl_size -- void * (*fapl_get)(H5FD_t *file) -- void * (*fapl_copy)(const void *fapl) -- herr_t (*fapl_free)(void *fapl) -+ void * (*fapl_get)(H5FD_t *file) except * -+ void * (*fapl_copy)(const void *fapl) except * -+ herr_t (*fapl_free)(void *fapl) except -1 - size_t dxpl_size - void * (*dxpl_copy)(const void *dxpl) - herr_t (*dxpl_free)(void *dxpl) -- H5FD_t *(*open)(const char *name, unsigned flags, hid_t fapl, haddr_t maxaddr) -- herr_t (*close)(H5FD_t *file) -+ H5FD_t *(*open)(const char *name, unsigned flags, hid_t fapl, haddr_t maxaddr) except * -+ herr_t (*close)(H5FD_t *file) except -1 - int (*cmp)(const H5FD_t *f1, const H5FD_t *f2) - herr_t (*query)(const H5FD_t *f1, unsigned long *flags) - herr_t (*get_type_map)(const H5FD_t *file, H5FD_mem_t *type_map) - haddr_t (*alloc)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size) - herr_t (*free)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, hsize_t size) -- haddr_t (*get_eoa)(const H5FD_t *file, H5FD_mem_t type) -- herr_t (*set_eoa)(H5FD_t *file, H5FD_mem_t type, haddr_t addr) -- haddr_t (*get_eof)(const H5FD_t *file, H5FD_mem_t type) -+ haddr_t (*get_eoa)(const H5FD_t *file, H5FD_mem_t type) noexcept -+ herr_t (*set_eoa)(H5FD_t *file, H5FD_mem_t type, haddr_t addr) noexcept -+ haddr_t (*get_eof)(const H5FD_t *file, H5FD_mem_t type) except -1 - herr_t (*get_handle)(H5FD_t *file, hid_t fapl, void**file_handle) -- herr_t (*read)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl, haddr_t addr, size_t size, void *buffer) -- herr_t (*write)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl, haddr_t addr, size_t size, const void *buffer) -- herr_t (*flush)(H5FD_t *file, hid_t dxpl_id, hbool_t closing) -- herr_t (*truncate)(H5FD_t *file, hid_t dxpl_id, hbool_t closing) -+ herr_t (*read)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl, haddr_t addr, size_t size, void *buffer) except * -+ herr_t (*write)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl, haddr_t addr, size_t size, const void *buffer) except * -+ herr_t (*flush)(H5FD_t *file, hid_t dxpl_id, hbool_t closing) except -1 -+ herr_t (*truncate)(H5FD_t *file, hid_t dxpl_id, hbool_t closing) except -1 - herr_t (*lock)(H5FD_t *file, hbool_t rw) - herr_t (*unlock)(H5FD_t *file) - H5FD_mem_t fl_map[H5FD_MEM_NTYPES] -@@ -295,27 +295,27 @@ cdef extern from "hdf5.h": - herr_t (*sb_encode)(H5FD_t *file, char *name, unsigned char *p) - herr_t (*sb_decode)(H5FD_t *f, const char *name, const unsigned char *p) - size_t fapl_size -- void * (*fapl_get)(H5FD_t *file) -- void * (*fapl_copy)(const void *fapl) -- herr_t (*fapl_free)(void *fapl) -+ void * (*fapl_get)(H5FD_t *file) except * -+ void * (*fapl_copy)(const void *fapl) except * -+ herr_t (*fapl_free)(void *fapl) except -1 - size_t dxpl_size - void * (*dxpl_copy)(const void *dxpl) - herr_t (*dxpl_free)(void *dxpl) -- H5FD_t *(*open)(const char *name, unsigned flags, hid_t fapl, haddr_t maxaddr) -- herr_t (*close)(H5FD_t *file) -+ H5FD_t *(*open)(const char *name, unsigned flags, hid_t fapl, haddr_t maxaddr) except * -+ herr_t (*close)(H5FD_t *file) except -1 - int (*cmp)(const H5FD_t *f1, const H5FD_t *f2) - herr_t (*query)(const H5FD_t *f1, unsigned long *flags) - herr_t (*get_type_map)(const H5FD_t *file, H5FD_mem_t *type_map) - haddr_t (*alloc)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size) - herr_t (*free)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, hsize_t size) -- haddr_t (*get_eoa)(const H5FD_t *file, H5FD_mem_t type) -- herr_t (*set_eoa)(H5FD_t *file, H5FD_mem_t type, haddr_t addr) -- haddr_t (*get_eof)(const H5FD_t *file, H5FD_mem_t type) -+ haddr_t (*get_eoa)(const H5FD_t *file, H5FD_mem_t type) noexcept -+ herr_t (*set_eoa)(H5FD_t *file, H5FD_mem_t type, haddr_t addr) noexcept -+ haddr_t (*get_eof)(const H5FD_t *file, H5FD_mem_t type) except -1 - herr_t (*get_handle)(H5FD_t *file, hid_t fapl, void**file_handle) -- herr_t (*read)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl, haddr_t addr, size_t size, void *buffer) -- herr_t (*write)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl, haddr_t addr, size_t size, const void *buffer) -- herr_t (*flush)(H5FD_t *file, hid_t dxpl_id, hbool_t closing) -- herr_t (*truncate)(H5FD_t *file, hid_t dxpl_id, hbool_t closing) -+ herr_t (*read)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl, haddr_t addr, size_t size, void *buffer) except * -+ herr_t (*write)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl, haddr_t addr, size_t size, const void *buffer) except * -+ herr_t (*flush)(H5FD_t *file, hid_t dxpl_id, hbool_t closing) except -1 -+ herr_t (*truncate)(H5FD_t *file, hid_t dxpl_id, hbool_t closing) except -1 - herr_t (*lock)(H5FD_t *file, hbool_t rw) - herr_t (*unlock)(H5FD_t *file) - H5FD_mem_t fl_map[H5FD_MEM_NTYPES] -diff --git a/h5py/h5fd.pyx b/h5py/h5fd.pyx -index e9746057..d39cf68f 100644 ---- a/h5py/h5fd.pyx -+++ b/h5py/h5fd.pyx -@@ -144,10 +144,10 @@ cdef herr_t H5FD_fileobj_close(H5FD_fileobj_t *f) except -1 with gil: - stdlib_free(f) - return 0 - --cdef haddr_t H5FD_fileobj_get_eoa(const H5FD_fileobj_t *f, H5FD_mem_t type): -+cdef haddr_t H5FD_fileobj_get_eoa(const H5FD_fileobj_t *f, H5FD_mem_t type) noexcept nogil: - return f.eoa - --cdef herr_t H5FD_fileobj_set_eoa(H5FD_fileobj_t *f, H5FD_mem_t type, haddr_t addr): -+cdef herr_t H5FD_fileobj_set_eoa(H5FD_fileobj_t *f, H5FD_mem_t type, haddr_t addr) noexcept nogil: - f.eoa = addr - return 0 - -@@ -191,22 +191,38 @@ cdef herr_t H5FD_fileobj_flush(H5FD_fileobj_t *f, hid_t dxpl, hbool_t closing) e - cdef H5FD_class_t info - memset(&info, 0, sizeof(info)) - -+# Cython doesn't support "except X" in casting definition currently -+ctypedef herr_t (*file_free_func_ptr)(void *) except -1 -+ -+ctypedef herr_t (*file_close_func_ptr)(H5FD_t *) except -1 -+ctypedef haddr_t (*file_get_eoa_func_ptr)(const H5FD_t *, H5FD_mem_t) noexcept -+ctypedef herr_t (*file_set_eof_func_ptr)(H5FD_t *, H5FD_mem_t, haddr_t) noexcept -+ctypedef haddr_t (*file_get_eof_func_ptr)(const H5FD_t *, H5FD_mem_t) except -1 -+ctypedef herr_t (*file_read_func_ptr)(H5FD_t *, H5FD_mem_t, hid_t, haddr_t, size_t, void*) except -1 -+ctypedef herr_t (*file_write_func_ptr)(H5FD_t *, H5FD_mem_t, hid_t, haddr_t, size_t, const void*) except -1 -+ctypedef herr_t (*file_truncate_func_ptr)(H5FD_t *, hid_t, hbool_t) except -1 -+ctypedef herr_t (*file_flush_func_ptr)(H5FD_t *, hid_t, hbool_t) except -1 -+ -+ - info.name = 'fileobj' - info.maxaddr = libc.stdint.SIZE_MAX - 1 - info.fc_degree = H5F_CLOSE_WEAK - info.fapl_size = sizeof(PyObject *) - info.fapl_get = H5FD_fileobj_fapl_get - info.fapl_copy = H5FD_fileobj_fapl_copy --info.fapl_free = H5FD_fileobj_fapl_free -+ -+info.fapl_free = H5FD_fileobj_fapl_free -+ - info.open = H5FD_fileobj_open --info.close = H5FD_fileobj_close --info.get_eoa = H5FD_fileobj_get_eoa --info.set_eoa = H5FD_fileobj_set_eoa --info.get_eof = H5FD_fileobj_get_eof --info.read = H5FD_fileobj_read --info.write = H5FD_fileobj_write --info.truncate = H5FD_fileobj_truncate --info.flush = H5FD_fileobj_flush -+ -+info.close = H5FD_fileobj_close -+info.get_eoa = H5FD_fileobj_get_eoa -+info.set_eoa = H5FD_fileobj_set_eoa -+info.get_eof = H5FD_fileobj_get_eof -+info.read = H5FD_fileobj_read -+info.write = H5FD_fileobj_write -+info.truncate = H5FD_fileobj_truncate -+info.flush = H5FD_fileobj_flush - # H5FD_FLMAP_DICHOTOMY - info.fl_map = [H5FD_MEM_SUPER, # default - H5FD_MEM_SUPER, # super -diff --git a/h5py/h5p.pyx b/h5py/h5p.pyx -index 779ea1b5..dc8bf65a 100644 ---- a/h5py/h5p.pyx -+++ b/h5py/h5p.pyx -@@ -1177,7 +1177,7 @@ cdef class PropFAID(PropInstanceID): - size_t block_size IN: File system block size - size_t cbuf_size IN: Copy buffer size - -- Properites with value of 0 indicate that the HDF5 library should -+ Properties with value of 0 indicate that the HDF5 library should - choose the value. - """ - H5Pset_fapl_direct(self.id, alignment, block_size, cbuf_size) -@@ -1761,7 +1761,7 @@ cdef class PropOCID(PropCreateID): - - max_compact -- maximum number of attributes to be stored in compact storage(default:8) - must be greater than or equal to min_dense -- min_dense -- minmum number of attributes to be stored in dense storage(default:6) -+ min_dense -- minimum number of attributes to be stored in dense storage(default:6) - - """ - H5Pset_attr_phase_change(self.id, max_compact, min_dense) -diff --git a/h5py/h5t.pyx b/h5py/h5t.pyx -index e7aae14f..b9d7e74d 100644 ---- a/h5py/h5t.pyx -+++ b/h5py/h5t.pyx -@@ -1938,7 +1938,7 @@ def check_dtype(**kwds): - - vlen = dtype - If the dtype represents an HDF5 vlen, returns the Python base class. -- Currently only builting string vlens (str) are supported. Returns -+ Currently only built-in string vlens (str) are supported. Returns - None if the dtype does not represent an HDF5 vlen. - - enum = dtype -diff --git a/h5py/tests/test_attrs_data.py b/h5py/tests/test_attrs_data.py -index 56481ca0..5083a1aa 100644 ---- a/h5py/tests/test_attrs_data.py -+++ b/h5py/tests/test_attrs_data.py -@@ -262,7 +262,7 @@ class TestEmpty(BaseAttrs): - self.assertTrue(is_empty_dataspace(h5a.open(self.f.id, b'y'))) - - def test_modify(self): -- with self.assertRaises(IOError): -+ with self.assertRaises(OSError): - self.f.attrs.modify('x', 1) - - def test_values(self): -diff --git a/h5py/tests/test_big_endian_file.py b/h5py/tests/test_big_endian_file.py -index 4d81de01..170b5bcc 100644 ---- a/h5py/tests/test_big_endian_file.py -+++ b/h5py/tests/test_big_endian_file.py -@@ -24,14 +24,14 @@ def test_vlen_big_endian(): - assert dset[4] == 1.2 - assert dset.dtype == "f8" - - assert f["DSLEint"][0] == 1 - assert f["DSLEint"].dtype == "i8" - -diff --git a/h5py/tests/test_dataset.py b/h5py/tests/test_dataset.py -index e104dd53..0ffa5c80 100644 ---- a/h5py/tests/test_dataset.py -+++ b/h5py/tests/test_dataset.py -@@ -1939,9 +1939,9 @@ class TestCommutative(BaseDataset): - dset = self.f.create_dataset("test", shape, dtype=float, - data=np.random.rand(*shape)) - -- # grab a value from the elements, ie dset[0] -+ # grab a value from the elements, ie dset[0, 0] - # check that mask arrays are commutative wrt ==, != -- val = np.float64(dset[0]) -+ val = np.float64(dset[0, 0]) - - assert np.all((val == dset) == (dset == val)) - assert np.all((val != dset) == (dset != val)) -diff --git a/h5py/tests/test_file.py b/h5py/tests/test_file.py -index b47d408e..1aa38731 100644 ---- a/h5py/tests/test_file.py -+++ b/h5py/tests/test_file.py -@@ -326,7 +326,7 @@ class TestDrivers(TestCase): - # could be an integer multiple of 512 - # - # To allow HDF5 to do the heavy lifting for different platform, -- # We didn't provide any argumnets to the first call -+ # We didn't provide any arguments to the first call - # and obtained HDF5's default values there. - - # Testing creation with a few different property lists -@@ -639,9 +639,9 @@ class TestUnicode(TestCase): - Modes 'r' and 'r+' do not create files even when given unicode names - """ - fname = self.mktemp(prefix=chr(0x201a)) -- with self.assertRaises(IOError): -+ with self.assertRaises(OSError): - File(fname, 'r') -- with self.assertRaises(IOError): -+ with self.assertRaises(OSError): - File(fname, 'r+') - - -diff --git a/h5py/tests/test_file_alignment.py b/h5py/tests/test_file_alignment.py -index c280bb76..da13ee04 100644 ---- a/h5py/tests/test_file_alignment.py -+++ b/h5py/tests/test_file_alignment.py -@@ -50,7 +50,7 @@ class TestFileAlignment(TestCase): - alignment_interval = 4096 - - for shape in [ -- (1033,), # A prime number above the thresold -+ (1033,), # A prime number above the threshold - (1000,), # Exactly equal to the threshold - (1001,), # one above the threshold - ]: -@@ -75,7 +75,7 @@ class TestFileAlignment(TestCase): - alignment_interval = 1024 - - for shape in [ -- (881,), # A prime number below the thresold -+ (881,), # A prime number below the threshold - (999,), # Exactly one below the threshold - ]: - fname = self.mktemp() -diff --git a/h5py/tests/test_group.py b/h5py/tests/test_group.py -index 328c352a..4af1fb1f 100644 ---- a/h5py/tests/test_group.py -+++ b/h5py/tests/test_group.py -@@ -771,7 +771,7 @@ class TestExternalLinks(TestCase): - with self.assertRaises(KeyError): - self.f['ext'] - -- # I would prefer IOError but there's no way to fix this as the exception -+ # I would prefer OSError but there's no way to fix this as the exception - # class is determined by HDF5. - def test_exc_missingfile(self): - """ KeyError raised when attempting to open missing file """ -@@ -844,7 +844,7 @@ class TestExtLinkBugs(TestCase): - try: - if x: - x.close() -- except IOError: -+ except OSError: - pass - return w - orig_name = self.mktemp() -diff --git a/h5py/tests/test_selections.py b/h5py/tests/test_selections.py -index 0b1722d7..01f6dcb7 100644 ---- a/h5py/tests/test_selections.py -+++ b/h5py/tests/test_selections.py -@@ -65,7 +65,7 @@ class TestTypeGeneration(BaseSelection): - self.assertEqual(out, np.dtype('i')) - self.assertEqual(format, np.dtype( [('a','i')] )) - -- # Field does not apear in named typed -+ # Field does not appear in named typed - with self.assertRaises(ValueError): - out, format = sel2.read_dtypes(dt, ('j', 'k')) - -diff --git a/pylintrc b/pylintrc -index 045df2f7..2401d3b0 100644 ---- a/pylintrc -+++ b/pylintrc -@@ -44,7 +44,7 @@ confidence= - # can either give multiple identifiers separated by comma (,) or put this - # option multiple times (only on the command line, not in the configuration - # file where it should appear only once).You can also use "--disable=all" to --# disable everything first and then reenable specific checks. For example, if -+# disable everything first and then re-enable specific checks. For example, if - # you want to run only the similarities checker, you can use "--disable=all - # --enable=similarities". If you want to run only the classes checker, but have - # no Warning level messages displayed, use"--disable=all --enable=classes -diff --git a/pyproject.toml b/pyproject.toml -index ee573d2f..717200ef 100644 ---- a/pyproject.toml -+++ b/pyproject.toml -@@ -1,6 +1,6 @@ - [build-system] - requires = [ -- "Cython >=0.29.31,<1", -+ "Cython >=0.29.31,<4", - "oldest-supported-numpy", - "pkgconfig", - "setuptools >=61", -diff --git a/setup_configure.py b/setup_configure.py -index 0fba53ba..c3b86a64 100644 ---- a/setup_configure.py -+++ b/setup_configure.py -@@ -165,7 +165,7 @@ class BuildConfig: - try: - if pkgconfig.exists(pc_name): - pc = pkgconfig.parse(pc_name) -- except EnvironmentError: -+ except OSError: - if os.name != 'nt': - print( - "Building h5py requires pkg-config unless the HDF5 path " -diff --git a/tox.ini b/tox.ini -index 0efb88a6..86a176dd 100644 ---- a/tox.ini -+++ b/tox.ini -@@ -65,7 +65,7 @@ skip_install=True - package_env = DUMMY NON-EXISTENT ENV NAME - changedir=docs - deps= -- sphinx -+ -r docs/requirements-rtd.txt - commands= - sphinx-build -W -b html -d {envtmpdir}/doctrees . {envtmpdir}/html - diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-h5py/0001-Properly-cast-arguments-to-H5Lunpack_elink_val.patch b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-h5py/0001-Properly-cast-arguments-to-H5Lunpack_elink_val.patch deleted file mode 100644 index c39d9b19..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-h5py/0001-Properly-cast-arguments-to-H5Lunpack_elink_val.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 30a59c233fbe149109f378837642dc02b2caf3f5 Mon Sep 17 00:00:00 2001 -From: Orion Poplawski -Date: Thu, 15 Feb 2024 20:47:50 -0700 -Subject: [PATCH] Properly cast arguments to H5Lunpack_elink_val - -Upstream-Status: Backport [https://github.com/h5py/h5py/pull/2380/commits/704e13ac83b42898514610c4df9f32f367e767e4] - -Signed-off-by: Martin Jansa ---- - h5py/h5l.pyx | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/h5py/h5l.pyx b/h5py/h5l.pyx -index 60b252f..af725bd 100644 ---- a/h5py/h5l.pyx -+++ b/h5py/h5l.pyx -@@ -184,7 +184,7 @@ cdef class LinkProxy: - if info.type == H5L_TYPE_SOFT: - py_retval = buf - else: -- H5Lunpack_elink_val(buf, buf_size, &wtf, &ext_file_name, &ext_obj_name) -+ H5Lunpack_elink_val(buf, buf_size, &wtf, &ext_file_name, &ext_obj_name) - py_retval = (bytes(ext_file_name), bytes(ext_obj_name)) - finally: - efree(buf) diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-h5py/0002-Use-libc.stdint-instead-of-numpy.patch b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-h5py/0002-Use-libc.stdint-instead-of-numpy.patch deleted file mode 100644 index 35263d83..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-h5py/0002-Use-libc.stdint-instead-of-numpy.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 8b4de2f6946b1c1f68279ecadc05c2817ae82189 Mon Sep 17 00:00:00 2001 -From: Orion Poplawski -Date: Thu, 22 Feb 2024 08:41:17 -0700 -Subject: [PATCH] Use libc.stdint instead of numpy - -Upstream-Status: Backport [https://github.com/h5py/h5py/pull/2382/commits/387a22b8c1513800c0401f496b4ed512c1639798] - -Signed-off-by: Martin Jansa ---- - h5py/api_types_ext.pxd | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/h5py/api_types_ext.pxd b/h5py/api_types_ext.pxd -index 91acb12..55a239f 100644 ---- a/h5py/api_types_ext.pxd -+++ b/h5py/api_types_ext.pxd -@@ -20,7 +20,7 @@ from libc.string cimport strlen, strchr, strcpy, strncpy, strcmp,\ - ctypedef long size_t - from libc.time cimport time_t - --from numpy cimport int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t, uint64_t -+from libc.stdint cimport int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t, uint64_t - - IF UNAME_SYSNAME != "Windows": - cdef extern from "unistd.h": diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-h5py_3.10.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-h5py_3.10.0.bb deleted file mode 100644 index 3ba5ea73..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-h5py_3.10.0.bb +++ /dev/null @@ -1,44 +0,0 @@ -SUMMARY = "Provides both a high- and low-level interface to the HDF5 library from Python." -HOMEPAGE = "https://www.h5py.org/" -SECTION = "devel/python" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=113251d71fb0384712c719b567261c5c" - -SRC_URI[sha256sum] = "d93adc48ceeb33347eb24a634fb787efc7ae4644e6ea4ba733d099605045c049" - -SRC_URI += " \ - file://0001-setup_build.py-avoid-absolute-path.patch \ - file://0001-Fix-Cython-3-compatibility.patch \ - file://0001-Properly-cast-arguments-to-H5Lunpack_elink_val.patch \ - file://0002-Use-libc.stdint-instead-of-numpy.patch \ -" - -inherit pkgconfig pypi setuptools3 - -BBCLASSEXTEND = "native" - -DEPENDS = "python3-pkgconfig-native \ - python3-cython-native \ - python3-numpy-native \ - python3-six-native \ - hdf5-native \ - python3 \ - hdf5 \ - " - -PACKAGESPLITFUNCS =+ "fix_cythonized_sources" - -fix_cythonized_sources() { - for f in `grep -l -r -e '\/* Generated by Cython.*/$' ${PKGD}${TARGET_DBGSRC_DIR}`; do - if [ -e $f ]; then - sed -i -e 's#${RECIPE_SYSROOT_NATIVE}##g' $f - fi - done -} - -RDEPENDS:${PN} = "python3-numpy \ - python3-six \ - python3-json \ - " - -export HDF5_VERSION="1.14.0" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-h5py_3.11.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-h5py_3.11.0.bb new file mode 100644 index 00000000..1cf5f563 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-h5py_3.11.0.bb @@ -0,0 +1,39 @@ +SUMMARY = "Provides both a high- and low-level interface to the HDF5 library from Python." +HOMEPAGE = "https://www.h5py.org/" +SECTION = "devel/python" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=113251d71fb0384712c719b567261c5c" + +SRC_URI[sha256sum] = "7b7e8f78072a2edec87c9836f25f34203fd492a4475709a18b417a33cfb21fa9" + +SRC_URI += "file://0001-setup_build.py-avoid-absolute-path.patch" + +inherit pkgconfig pypi setuptools3 + +BBCLASSEXTEND = "native" + +DEPENDS = "python3-pkgconfig-native \ + python3-cython-native \ + python3-numpy-native \ + python3-six-native \ + hdf5-native \ + python3 \ + hdf5 \ + " + +PACKAGESPLITFUNCS =+ "fix_cythonized_sources" + +fix_cythonized_sources() { + for f in `grep -l -r -e '\/* Generated by Cython.*/$' ${PKGD}${TARGET_DBGSRC_DIR}`; do + if [ -e $f ]; then + sed -i -e 's#${RECIPE_SYSROOT_NATIVE}##g' $f + fi + done +} + +RDEPENDS:${PN} = "python3-numpy \ + python3-six \ + python3-json \ + " + +export HDF5_VERSION="1.14.0" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-hatch-requirements-txt_0.4.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-hatch-requirements-txt_0.4.1.bb new file mode 100644 index 00000000..8b321879 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-hatch-requirements-txt_0.4.1.bb @@ -0,0 +1,12 @@ +SUMMARY = "Hatchling plugin to read project dependencies from requirements.txt" +HOMEPAGE = "https://github.com/repo-helper/hatch-requirements-txt" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=58206c261591d2c13b00ab61cec32abe" + +SRC_URI[sha256sum] = "2c686e5758fd05bb55fa7d0c198fdd481f8d3aaa3c693260f5c0d74ce3547d20" + +PYPI_PACKAGE = "hatch_requirements_txt" + +inherit pypi python_hatchling + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-hexbytes_1.0.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-hexbytes_1.0.0.bb deleted file mode 100644 index 951998b5..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-hexbytes_1.0.0.bb +++ /dev/null @@ -1,9 +0,0 @@ -SUMMARY = "Python bytes subclass that decodes hex, with a readable console output." -HOMEPAGE = "https://github.com/ethereum/hexbytes" -SECTION = "devel/python" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=16ffc86adf4293d4cfb204e77d62cfe6" - -SRC_URI[sha256sum] = "18e6e3279a13878b93fb85da77822dc506b7048065a588e74141c2468a65ad8c" - -inherit pypi setuptools3 diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-hexbytes_1.2.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-hexbytes_1.2.1.bb new file mode 100644 index 00000000..c8e34fc4 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-hexbytes_1.2.1.bb @@ -0,0 +1,15 @@ +SUMMARY = "Python bytes subclass that decodes hex, with a readable console output." +HOMEPAGE = "https://github.com/ethereum/hexbytes" +SECTION = "devel/python" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=16ffc86adf4293d4cfb204e77d62cfe6" + +SRC_URI[sha256sum] = "515f00dddf31053db4d0d7636dd16061c1d896c3109b8e751005db4ca46bcca7" + +inherit pypi setuptools3 + +RDEPENDS:${PN} += " \ + python3-core \ + python3-email \ + python3-compression \ +" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-html2text_2020.1.16.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-html2text_2020.1.16.bb deleted file mode 100644 index d96f61bd..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-html2text_2020.1.16.bb +++ /dev/null @@ -1,28 +0,0 @@ -SUMMARY = "Convert HTML to Markdown-formatted text" -HOMEPAGE = "https://github.com/Alir3z4/html2text" - -LICENSE = "GPL-3.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" - -SRC_URI[md5sum] = "c77b580c94d1a9e0145f23cc4472993d" -SRC_URI[sha256sum] = "e296318e16b059ddb97f7a8a1d6a5c1d7af4544049a01e261731d2d5cc277bbb" - -inherit pypi setuptools3 ptest - -SRC_URI += " \ - file://run-ptest \ -" - -RDEPENDS:${PN}-ptest += " \ - python3-pytest \ - python3-unittest-automake-output \ -" - -RDEPENDS:${PN} += "python3-cgitb" - -do_install_ptest() { - install -d ${D}${PTEST_PATH}/test - cp -rf ${S}/test/* ${D}${PTEST_PATH}/test/ -} - -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-html2text_2024.2.26.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-html2text_2024.2.26.bb new file mode 100644 index 00000000..4a7ce1e5 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-html2text_2024.2.26.bb @@ -0,0 +1,27 @@ +SUMMARY = "Convert HTML to Markdown-formatted text" +HOMEPAGE = "https://github.com/Alir3z4/html2text" + +LICENSE = "GPL-3.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" + +SRC_URI[sha256sum] = "05f8e367d15aaabc96415376776cdd11afd5127a77fce6e36afc60c563ca2c32" + +inherit pypi setuptools3 ptest + +SRC_URI += " \ + file://run-ptest \ +" + +RDEPENDS:${PN}-ptest += " \ + python3-pytest \ + python3-unittest-automake-output \ +" + +RDEPENDS:${PN} += "python3-cgitb" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/test + cp -rf ${S}/test/* ${D}${PTEST_PATH}/test/ +} + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-httpcore_1.0.3.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-httpcore_1.0.3.bb deleted file mode 100644 index 203bfd48..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-httpcore_1.0.3.bb +++ /dev/null @@ -1,26 +0,0 @@ -SUMMARY = "A minimal low-level HTTP client." -SECTION = "devel/python" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE.md;md5=1c1f23b073da202e1f4f9e426490210c" - -inherit pypi python_hatchling - -SRC_URI[sha256sum] = "5c0f9546ad17dac4d0772b0808856eb616eb8b48ce94f49ed819fd6982a8a544" - -DEPENDS += "\ - python3-hatch-fancy-pypi-readme-native \ -" - -PACKAGECONFIG ??= "" -PACKAGECONFIG[http2] = ",,,python3-h2" -PACKAGECONFIG[socks] = ",,,python3-socksio" -PACKAGECONFIG[asyncio] = ",,,python3-anyio" -# Don't provide "trio" PACKAGECONFIG as nothing provides "python3-trio" currently. -# If somebody needs this please feel free to add python3-trio and enable the -# packageconfig below: -#PACKAGECONFIG[trio] = ",,,python3-trio" - -RDEPENDS:${PN} += "\ - python3-certifi \ - python3-h11 \ -" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-httpcore_1.0.5.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-httpcore_1.0.5.bb new file mode 100644 index 00000000..6b0f8af4 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-httpcore_1.0.5.bb @@ -0,0 +1,26 @@ +SUMMARY = "A minimal low-level HTTP client." +SECTION = "devel/python" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE.md;md5=1c1f23b073da202e1f4f9e426490210c" + +inherit pypi python_hatchling + +SRC_URI[sha256sum] = "34a38e2f9291467ee3b44e89dd52615370e152954ba21721378a87b2960f7a61" + +DEPENDS += "\ + python3-hatch-fancy-pypi-readme-native \ +" + +PACKAGECONFIG ??= "" +PACKAGECONFIG[http2] = ",,,python3-h2" +PACKAGECONFIG[socks] = ",,,python3-socksio" +PACKAGECONFIG[asyncio] = ",,,python3-anyio" +# Don't provide "trio" PACKAGECONFIG as nothing provides "python3-trio" currently. +# If somebody needs this please feel free to add python3-trio and enable the +# packageconfig below: +#PACKAGECONFIG[trio] = ",,,python3-trio" + +RDEPENDS:${PN} += "\ + python3-certifi \ + python3-h11 \ +" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-httpx_0.27.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-httpx_0.27.0.bb deleted file mode 100644 index e4d3cbee..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-httpx_0.27.0.bb +++ /dev/null @@ -1,48 +0,0 @@ -SUMMARY = "A next generation HTTP client for Python." -SECTION = "devel/python" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE.md;md5=c624803bdf6fc1c4ce39f5ae11d7bd05" - -inherit pypi python_hatchling - -SRC_URI[sha256sum] = "a0cb88a46f32dc874e04ee956e4c2764aba2aa228f650b06788ba6bda2962ab5" - -DEPENDS += "\ - python3-hatch-fancy-pypi-readme-native \ -" - -PACKAGECONFIG ??= "" -PACKAGECONFIG[brotli] = ",,,python3-brotli" -PACKAGECONFIG[http2] = ",,,python3-h2" -PACKAGECONFIG[socks] = ",,,python3-socksio" - -RDEPENDS:${PN} += "\ - python3-anyio \ - python3-certifi \ - python3-httpcore \ - python3-idna \ - python3-sniffio \ - python3-json \ - python3-core \ - python3-netclient \ - python3-compression \ -" - -PACKAGES += "\ - ${PN}-cli \ -" - -RDEPENDS:${PN}-cli += "\ - ${PN} \ - python3-click \ - python3-pygments \ - python3-rich \ -" - -FILES:${PN} = "\ - ${libdir}/${PYTHON_DIR} \ -" - -FILES:${PN}-cli = "\ - ${bindir}/httpx \ -" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-httpx_0.27.2.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-httpx_0.27.2.bb new file mode 100644 index 00000000..e4e1eeea --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-httpx_0.27.2.bb @@ -0,0 +1,48 @@ +SUMMARY = "A next generation HTTP client for Python." +SECTION = "devel/python" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE.md;md5=c624803bdf6fc1c4ce39f5ae11d7bd05" + +inherit pypi python_hatchling + +SRC_URI[sha256sum] = "f7c2be1d2f3c3c3160d441802406b206c2b76f5947b11115e6df10c6c65e66c2" + +DEPENDS += "\ + python3-hatch-fancy-pypi-readme-native \ +" + +PACKAGECONFIG ??= "" +PACKAGECONFIG[brotli] = ",,,python3-brotli" +PACKAGECONFIG[http2] = ",,,python3-h2" +PACKAGECONFIG[socks] = ",,,python3-socksio" + +RDEPENDS:${PN} += "\ + python3-anyio \ + python3-certifi \ + python3-httpcore \ + python3-idna \ + python3-sniffio \ + python3-json \ + python3-core \ + python3-netclient \ + python3-compression \ +" + +PACKAGES += "\ + ${PN}-cli \ +" + +RDEPENDS:${PN}-cli += "\ + ${PN} \ + python3-click \ + python3-pygments \ + python3-rich \ +" + +FILES:${PN} = "\ + ${libdir}/${PYTHON_DIR} \ +" + +FILES:${PN}-cli = "\ + ${bindir}/httpx \ +" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-huey_2.5.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-huey_2.5.0.bb deleted file mode 100644 index c6e56060..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-huey_2.5.0.bb +++ /dev/null @@ -1,18 +0,0 @@ -SUMMARY = "a little task queue for python" -SECTION = "devel/python" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=5cac039fcc82f01141cc170b48f315d4" - -PYPI_PACKAGE = "huey" - -SRC_URI[sha256sum] = "2ffb52fb5c46a1b0d53c79d59df3622312b27e2ab68d81a580985a8ea4ca3480" - -RDEPENDS:${PN} += " \ - python3-datetime \ - python3-logging \ - python3-multiprocessing \ - python3-json \ -" - -inherit pypi setuptools3 - diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-huey_2.5.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-huey_2.5.1.bb new file mode 100644 index 00000000..471fd6cc --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-huey_2.5.1.bb @@ -0,0 +1,18 @@ +SUMMARY = "a little task queue for python" +SECTION = "devel/python" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=5cac039fcc82f01141cc170b48f315d4" + +PYPI_PACKAGE = "huey" + +SRC_URI[sha256sum] = "8a323783ab434a095a4e72b8c48c5b8f957f9031fa860474a390a0927e957112" + +RDEPENDS:${PN} += " \ + python3-datetime \ + python3-logging \ + python3-multiprocessing \ + python3-json \ +" + +inherit pypi setuptools3 + diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-humanize_4.10.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-humanize_4.10.0.bb new file mode 100644 index 00000000..a8668e14 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-humanize_4.10.0.bb @@ -0,0 +1,22 @@ +SUMMARY = "Python humanize utilities" +HOMEPAGE = "http://github.com/jmoiron/humanize" +SECTION = "devel/python" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENCE;md5=4ecc42519e84f6f3e23529464df7bd1d" + +SRC_URI[sha256sum] = "06b6eb0293e4b85e8d385397c5868926820db32b9b654b932f57fa41c23c9978" + +inherit pypi python_hatchling + +DEPENDS += "\ + python3-setuptools-scm-native \ + python3-hatch-vcs-native \ +" + +RDEPENDS:${PN} += "\ + python3-datetime \ + python3-setuptools \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-humanize_4.9.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-humanize_4.9.0.bb deleted file mode 100644 index da1eea4c..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-humanize_4.9.0.bb +++ /dev/null @@ -1,22 +0,0 @@ -SUMMARY = "Python humanize utilities" -HOMEPAGE = "http://github.com/jmoiron/humanize" -SECTION = "devel/python" - -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENCE;md5=4ecc42519e84f6f3e23529464df7bd1d" - -SRC_URI[sha256sum] = "582a265c931c683a7e9b8ed9559089dea7edcf6cc95be39a3cbc2c5d5ac2bcfa" - -inherit pypi python_hatchling - -DEPENDS += "\ - python3-setuptools-scm-native \ - python3-hatch-vcs-native \ -" - -RDEPENDS:${PN} += "\ - python3-datetime \ - python3-setuptools \ -" - -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-icu_2.12.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-icu_2.12.bb deleted file mode 100644 index 6394db4e..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-icu_2.12.bb +++ /dev/null @@ -1,15 +0,0 @@ -SUMMARY = "Python extension wrapping the ICU C++ API" -HOMEPAGE = "https://gitlab.pyicu.org/main/pyicu" -BUGTRACKER = "https://gitlab.pyicu.org/main/pyicu/-/issues" -SECTION = "devel/python" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=0724597863f1581ab01429e0423e779f" - -DEPENDS += "icu" - -PYPI_PACKAGE = "PyICU" -SRC_URI[sha256sum] = "bd7ab5efa93ad692e6daa29cd249364e521218329221726a113ca3cb281c8611" - -SRC_URI += "file://0001-Fix-host-contamination-of-include-files.patch" - -inherit pkgconfig pypi python_setuptools_build_meta diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-icu_2.13.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-icu_2.13.1.bb new file mode 100644 index 00000000..6a590de5 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-icu_2.13.1.bb @@ -0,0 +1,19 @@ +SUMMARY = "Python extension wrapping the ICU C++ API" +HOMEPAGE = "https://gitlab.pyicu.org/main/pyicu" +BUGTRACKER = "https://gitlab.pyicu.org/main/pyicu/-/issues" +SECTION = "devel/python" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=0724597863f1581ab01429e0423e779f" + +DEPENDS += "icu" + +PYPI_PACKAGE = "PyICU" + +SRC_URI[sha256sum] = "d4919085eaa07da12bade8ee721e7bbf7ade0151ca0f82946a26c8f4b98cdceb" + +SRC_URI += "file://0001-Fix-host-contamination-of-include-files.patch" + +inherit pkgconfig pypi python_setuptools_build_meta + +# it's lowercase pyicu instead of ${PYPI_PACKAGE} in this version +S = "${WORKDIR}/pyicu-${PV}" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-imageio_2.34.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-imageio_2.34.0.bb deleted file mode 100644 index e38d6944..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-imageio_2.34.0.bb +++ /dev/null @@ -1,12 +0,0 @@ -SUMMARY = "Python library that provides an easy interface to read and \ -write a wide range of image data, including animated images, video, \ -volumetric data, and scientific formats." -SECTION = "devel/python" -LICENSE = "BSD-2-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=24cb9a367a9e641b459a01c4d15256ba" - -SRC_URI[sha256sum] = "ae9732e10acf807a22c389aef193f42215718e16bd06eed0c5bb57e1034a4d53" - -inherit pypi setuptools3 - -RDEPENDS:${PN} = "python3-numpy python3-pillow" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-imageio_2.35.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-imageio_2.35.1.bb new file mode 100644 index 00000000..6142884e --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-imageio_2.35.1.bb @@ -0,0 +1,12 @@ +SUMMARY = "Python library that provides an easy interface to read and \ +write a wide range of image data, including animated images, video, \ +volumetric data, and scientific formats." +SECTION = "devel/python" +LICENSE = "BSD-2-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=24cb9a367a9e641b459a01c4d15256ba" + +SRC_URI[sha256sum] = "4952dfeef3c3947957f6d5dedb1f4ca31c6e509a476891062396834048aeed2a" + +inherit pypi setuptools3 + +RDEPENDS:${PN} = "python3-numpy python3-pillow" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-imgtool_2.0.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-imgtool_2.0.0.bb deleted file mode 100644 index a25e6a61..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-imgtool_2.0.0.bb +++ /dev/null @@ -1,12 +0,0 @@ -SUMMARY = "MCUboot's image signing and key management tool" - -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://imgtool/main.py;beginline=3;endline=18;md5=0645fb61e2f961a110302fbfdb227446" - -SRC_URI[sha256sum] = "7a541255e69eec1f12aa38dce1f1d4fe20d8212677c68a9b6ec634ca91a06612" - -inherit pypi setuptools3 - -RDEPENDS:${PN} = "python3-cbor2 python3-click python3-cryptography python3-intelhex" - -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-imgtool_2.1.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-imgtool_2.1.0.bb new file mode 100644 index 00000000..aafcf382 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-imgtool_2.1.0.bb @@ -0,0 +1,12 @@ +SUMMARY = "MCUboot's image signing and key management tool" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://imgtool/main.py;beginline=3;endline=18;md5=0645fb61e2f961a110302fbfdb227446" + +SRC_URI[sha256sum] = "4f7fbcdf53c44eaaa6226504510ccb52f7ef00c997503cf94934b330c9607b60" + +inherit pypi setuptools3 + +RDEPENDS:${PN} = "python3-cbor2 python3-click python3-cryptography python3-intelhex" + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-importlib-metadata_8.4.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-importlib-metadata_8.4.0.bb new file mode 100644 index 00000000..b81d1738 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-importlib-metadata_8.4.0.bb @@ -0,0 +1,20 @@ +SUMMARY = "Read metadata from Python packages" +HOMEPAGE = "https://pypi.org/project/importlib-metadata/" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" + +inherit pypi python_setuptools_build_meta + +PYPI_PACKAGE = "importlib_metadata" +UPSTREAM_CHECK_REGEX = "/importlib-metadata/(?P(\d+[\.\-_]*)+)/" + +SRC_URI[sha256sum] = "9a547d3bc3608b025f93d403fdd1aae741c24fbb8314df4b155675742ce303c5" + +S = "${WORKDIR}/importlib_metadata-${PV}" + +DEPENDS += "python3-setuptools-scm-native" +RDEPENDS:${PN} += "python3-zipp" +RDEPENDS:${PN}:append:class-target = " python3-misc" +RDEPENDS:${PN}:append:class-nativesdk = " python3-misc" + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-incremental_22.10.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-incremental_22.10.0.bb deleted file mode 100644 index 503ef35a..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-incremental_22.10.0.bb +++ /dev/null @@ -1,19 +0,0 @@ -DESCRIPTION = "Incremental is a small library that versions your Python projects" -HOMEPAGE = "https://github.com/twisted/incremental" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=6ca9b07f08e2c72d48c74d363d1e0e15" - -SRC_URI[sha256sum] = "912feeb5e0f7e0188e6f42241d2f450002e11bbc0937c65865045854c24c0bd0" - -inherit pypi python_setuptools_build_meta - -RDEPENDS:${PN} += " \ - python3-twisted-core \ - python3-click \ -" - -# -native is needed to build python[3]-twisted, however, we need to take steps to -# prevent a circular dependency. The build apparently does not use the part of -# python-incremental which uses python-twisted, so this hack is OK. -RDEPENDS:python3-incremental-native:remove = "python3-twisted-core-native" -BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-incremental_24.7.2.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-incremental_24.7.2.bb new file mode 100644 index 00000000..dc8ecb33 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-incremental_24.7.2.bb @@ -0,0 +1,33 @@ +DESCRIPTION = "Incremental is a small library that versions your Python projects" +HOMEPAGE = "https://github.com/twisted/incremental" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=6ca9b07f08e2c72d48c74d363d1e0e15" + +SRC_URI[sha256sum] = "fb4f1d47ee60efe87d4f6f0ebb5f70b9760db2b2574c59c8e8912be4ebd464c9" + +inherit pypi python_setuptools_build_meta + +PACKAGE_BEFORE_PN = "\ + ${PN}-scripts \ + ${PN}-tests \ +" + +FILES:${PN}-scripts = "\ + ${PYTHON_SITEPACKAGES_DIR}/incremental/update.py \ + ${PYTHON_SITEPACKAGES_DIR}/incremental/__pycache__/update*.pyc \ +" + +RDEPENDS:${PN}-scripts = "\ + python3-click \ +" + +FILES:${PN}-tests = "${PYTHON_SITEPACKAGES_DIR}/incremental/tests" + +# The tests require unit testing tool 'trial' from the twisted package +RDEPENDS:${PN}-tests = "\ + ${PN}-scripts \ + python3-twisted \ +" + +BBCLASSEXTEND = "native" + diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-inflate64/0001-Do-not-override-const-qualifier.patch b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-inflate64/0001-Do-not-override-const-qualifier.patch new file mode 100644 index 00000000..5391a11d --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-inflate64/0001-Do-not-override-const-qualifier.patch @@ -0,0 +1,83 @@ +From 7e3a795cbeea94b3324aa926f2b11904cb169acc Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 2 Jul 2024 22:02:38 -0700 +Subject: [PATCH] Do not override 'const' qualifier + +This has worked so far but with fortified system headers from +Glibc 2.40+ and clang compiler it ends up in compile errors + +| In file included from /mnt/b/yoe/master/build/tmp/work/riscv64-yoe-linux/python3-inflate64/1.0.0/recipe-sysroot/usr/include/string.h:548: +| /mnt/b/yoe/master/build/tmp/work/riscv64-yoe-linux/python3-inflate64/1.0.0/recipe-sysroot/usr/include/bits/string_fortified.h:77:66: error: pass_object_size attribute only applies to constant pointer arguments +| 77 | __NTH (strcpy (__fortify_clang_overload_arg (char *, __restrict, __dest), +| | ^ +| /mnt/b/yoe/master/build/tmp/work/riscv64-yoe-linux/python3-inflate64/1.0.0/recipe-sysroot/usr/include/bits/string_fortified.h:86:66: error: pass_object_size attribute only applies to constant pointer arguments +| 86 | __NTH (stpcpy (__fortify_clang_overload_arg (char *, __restrict, __dest), +| | ^ +| /mnt/b/yoe/master/build/tmp/work/riscv64-yoe-linux/python3-inflate64/1.0.0/recipe-sysroot/usr/include/bits/string_fortified.h:96:67: error: pass_object_size attribute only applies to constant pointer arguments +| 96 | __NTH (strncpy (__fortify_clang_overload_arg (char *, __restrict, __dest), +| | ^ +| /mnt/b/yoe/master/build/tmp/work/riscv64-yoe-linux/python3-inflate64/1.0.0/recipe-sysroot/usr/include/bits/string_fortified.h:107:56: error: pass_object_size attribute only applies to constant pointer arguments +| 107 | __NTH (stpncpy (__fortify_clang_overload_arg (char *, ,__dest), +| | ^ +| /mnt/b/yoe/master/build/tmp/work/riscv64-yoe-linux/python3-inflate64/1.0.0/recipe-sysroot/usr/include/bits/string_fortified.h:136:66: error: pass_object_size attribute only applies to constant pointer arguments +| 136 | __NTH (strcat (__fortify_clang_overload_arg (char *, __restrict, __dest), +| | ^ +| /mnt/b/yoe/master/build/tmp/work/riscv64-yoe-linux/python3-inflate64/1.0.0/recipe-sysroot/usr/include/bits/string_fortified.h:145:67: error: pass_object_size attribute only applies to constant pointer arguments +| 145 | __NTH (strncat (__fortify_clang_overload_arg (char *, __restrict, __dest), +| | ^ +| /mnt/b/yoe/master/build/tmp/work/riscv64-yoe-linux/python3-inflate64/1.0.0/recipe-sysroot/usr/include/bits/string_fortified.h:161:67: error: pass_object_size attribute only applies to constant pointer arguments +| 161 | __NTH (strlcpy (__fortify_clang_overload_arg (char *, __restrict, __dest), + +Therefore adjust needed places to use const qualifier + +Upstream-Status: Submitted [https://codeberg.org/miurahr/inflate64/pulls/13] +Signed-off-by: Khem Raj +--- + src/lib/deflate.h | 2 +- + src/lib/deflate_tree.c | 4 ++-- + src/lib/inflate64_config.h | 3 --- + 3 files changed, 3 insertions(+), 6 deletions(-) + +diff --git a/src/lib/deflate.h b/src/lib/deflate.h +index 72a324f..c780be9 100644 +--- a/src/lib/deflate.h ++++ b/src/lib/deflate.h +@@ -288,6 +288,6 @@ void ZLIB_INTERNAL _tr_stored_block OF((deflate_state *s, char FAR *buf, + extern const unsigned char ZLIB_INTERNAL _dist_code[]; + #endif + #endif +-extern uch ZLIB_INTERNAL length_code[]; ++extern const uch ZLIB_INTERNAL length_code[]; + + #endif /* DEFLATE_H */ +diff --git a/src/lib/deflate_tree.c b/src/lib/deflate_tree.c +index 5a66139..cdee934 100644 +--- a/src/lib/deflate_tree.c ++++ b/src/lib/deflate_tree.c +@@ -78,10 +78,10 @@ local const uch bl_order[BL_CODES] + + #define DIST_CODE_LEN 768 /* see definition of array dist_code below */ + +-local int base_length[LENGTH_CODES]; ++local const int base_length[LENGTH_CODES]; + /* First normalized length for each code (0 = MIN_MATCH) */ + +-uch length_code[BASE_MATCH-MIN_MATCH+1]; ++const uch length_code[BASE_MATCH-MIN_MATCH+1]; + /* length code for each normalized match length (0 == MIN_MATCH) */ + + #if defined(GEN_TREES_H) || !defined(STDC) +diff --git a/src/lib/inflate64_config.h b/src/lib/inflate64_config.h +index 16cfd12..ade7300 100644 +--- a/src/lib/inflate64_config.h ++++ b/src/lib/inflate64_config.h +@@ -53,9 +53,6 @@ + # define FAR + #endif + +-#ifndef const +-# define const +-#endif + #define z_const const + + typedef unsigned char uch; diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-inflate64_1.0.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-inflate64_1.0.0.bb index 2ccc98e3..7804152d 100644 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-inflate64_1.0.0.bb +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-inflate64_1.0.0.bb @@ -4,11 +4,12 @@ LICENSE = "LGPL-2.1-or-later" SECTION = "devel/python" LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" -inherit setuptools3 pypi +inherit python_setuptools_build_meta pypi +SRC_URI += "file://0001-Do-not-override-const-qualifier.patch" SRC_URI[sha256sum] = "3278827b803cf006a1df251f3e13374c7d26db779e5a33329cc11789b804bc2d" -PYPI_PACKAGE = "inflate64" +DEPENDS += "python3-setuptools-scm-native" RDEPENDS:${PN} += "\ python3-core \ diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-ipython_8.23.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-ipython_8.23.0.bb deleted file mode 100644 index ebfd1472..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-ipython_8.23.0.bb +++ /dev/null @@ -1,28 +0,0 @@ -SUMMARY = "IPython: Productive Interactive Computing" -HOMEPAGE = "https://ipython.org" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://COPYING.rst;md5=59b20262b8663cdd094005bddf47af5f" - -PYPI_PACKAGE = "ipython" - -SRC_URI[sha256sum] = "7468edaf4f6de3e1b912e57f66c241e6fd3c7099f2ec2136e239e142e800274d" - -RDEPENDS:${PN} = "\ - python3-setuptools \ - python3-jedi \ - python3-decorator \ - python3-pickleshare \ - python3-traitlets \ - python3-prompt-toolkit \ - python3-pygments \ - python3-backcall \ - python3-pydoc \ - python3-debugger \ - python3-pexpect \ - python3-unixadmin \ - python3-misc \ - python3-sqlite3 \ - python3-stack-data \ -" - -inherit setuptools3 pypi diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-ipython_8.27.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-ipython_8.27.0.bb new file mode 100644 index 00000000..94e731b8 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-ipython_8.27.0.bb @@ -0,0 +1,26 @@ +SUMMARY = "IPython: Productive Interactive Computing" +HOMEPAGE = "https://ipython.org" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://COPYING.rst;md5=59b20262b8663cdd094005bddf47af5f" + +SRC_URI[sha256sum] = "0b99a2dc9f15fd68692e898e5568725c6d49c527d36a9fb5960ffbdeaa82ff7e" + +RDEPENDS:${PN} = "\ + python3-setuptools \ + python3-jedi \ + python3-decorator \ + python3-pickleshare \ + python3-traitlets \ + python3-prompt-toolkit \ + python3-pygments \ + python3-backcall \ + python3-pydoc \ + python3-debugger \ + python3-pexpect \ + python3-unixadmin \ + python3-misc \ + python3-sqlite3 \ + python3-stack-data \ +" + +inherit python_setuptools_build_meta pypi diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-itsdangerous_2.1.2.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-itsdangerous_2.1.2.bb deleted file mode 100644 index 5af1d594..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-itsdangerous_2.1.2.bb +++ /dev/null @@ -1,17 +0,0 @@ -SUMMARY = "Various helpers to pass trusted data to untrusted environments and back." -HOMEPAGE = "http://github.com/mitsuhiko/itsdangerous" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=4cda9a0ebd516714f360b0e9418cfb37" - -SRC_URI[sha256sum] = "5dbbc68b317e5e42f327f9021763545dc3fc3bfe22e6deb96aaf1fc38874156a" - -inherit pypi setuptools3 - -CLEANBROKEN = "1" - -RDEPENDS:${PN} += " \ - python3-simplejson \ - python3-netclient \ - python3-compression \ - python3-json \ -" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-itsdangerous_2.2.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-itsdangerous_2.2.0.bb new file mode 100644 index 00000000..f4d8d529 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-itsdangerous_2.2.0.bb @@ -0,0 +1,17 @@ +SUMMARY = "Various helpers to pass trusted data to untrusted environments and back." +HOMEPAGE = "http://github.com/mitsuhiko/itsdangerous" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=4cda9a0ebd516714f360b0e9418cfb37" + +SRC_URI[sha256sum] = "e0050c0b7da1eea53ffaf149c0cfbb5c6e2e2b69c4bef22c81fa6eb73e5f6173" + +inherit pypi python_setuptools_build_meta + +CLEANBROKEN = "1" + +RDEPENDS:${PN} += " \ + python3-simplejson \ + python3-netclient \ + python3-compression \ + python3-json \ +" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-joblib_1.4.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-joblib_1.4.0.bb deleted file mode 100644 index 868e3f21..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-joblib_1.4.0.bb +++ /dev/null @@ -1,15 +0,0 @@ -SUMMARY = "Joblib is a set of tools to provide lightweight pipelining in Python." -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=2e481820abf0a70a18011a30153df066" - -inherit setuptools3 pypi - -SRC_URI[sha256sum] = "1eb0dc091919cd384490de890cb5dfd538410a6d4b3b54eef09fb8c50b409b1c" - -RDEPENDS:${PN} += " \ - python3-asyncio \ - python3-json \ - python3-multiprocessing \ - python3-pprint \ - python3-pydoc \ -" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-joblib_1.4.2.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-joblib_1.4.2.bb new file mode 100644 index 00000000..399ccd22 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-joblib_1.4.2.bb @@ -0,0 +1,15 @@ +SUMMARY = "Joblib is a set of tools to provide lightweight pipelining in Python." +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=2e481820abf0a70a18011a30153df066" + +inherit python_setuptools_build_meta pypi + +SRC_URI[sha256sum] = "2382c5816b2636fbd20a09e0f4e9dad4736765fdfb7dca582943b9c1366b3f0e" + +RDEPENDS:${PN} += " \ + python3-asyncio \ + python3-json \ + python3-multiprocessing \ + python3-pprint \ + python3-pydoc \ +" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-jstyleson_0.0.2.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-jstyleson_0.0.2.bb index 237713bf..ff9d7dd5 100644 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-jstyleson_0.0.2.bb +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-jstyleson_0.0.2.bb @@ -4,7 +4,7 @@ HOMEPAGE = "https://github.com/linjackson78/jstyleson" SRC_URI += " file://LICENSE " LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=d97b96c7337934ee448ffd4392f32079" +LIC_FILES_CHKSUM = "file://${UNPACKDIR}/LICENSE;md5=d97b96c7337934ee448ffd4392f32079" PYPI_PACKAGE_EXT = "tar.gz" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-kivy_2.3.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-kivy_2.3.0.bb index 2c66db18..045ac231 100644 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-kivy_2.3.0.bb +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-kivy_2.3.0.bb @@ -71,6 +71,11 @@ RDEPENDS:${PN} = " \ python3-pygments \ " +# http://errors.yoctoproject.org/Errors/Details/766917/ +# python3-kivy/2.3.0/git/kivy/graphics/cgl_backend/cgl_gl.c:4568:52: error: assignment to 'void (*)(GLuint, GLsizei, const GLchar **, const GLint *)' {aka 'void (*)(unsigned int, int, const char **, const int *)'} from incompatible pointer type 'void (*)(GLuint, GLsizei, const GLchar * const*, const GLint *)' {aka 'void (*)(unsigned int, int, const char * const*, const int *)'} [-Wincompatible-pointer-types] +# python3-kivy/2.3.0/git/kivy/core/window/_window_sdl2.c:8781:23: error: passing argument 1 of 'SDL_SetEventFilter' from incompatible pointer type [-Wincompatible-pointer-types] +CFLAGS += "-Wno-error=incompatible-pointer-types" + do_compile:append() { for f in `find ${B} -name *.c` do diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-kiwisolver_1.4.5.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-kiwisolver_1.4.5.bb deleted file mode 100644 index a1949b11..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-kiwisolver_1.4.5.bb +++ /dev/null @@ -1,19 +0,0 @@ -SUMMARY = "A fast implementation of the Cassowary constraint solver" -HOMEPAGE = "https://github.com/nucleic/kiwi" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=f137eeae9cf8004d06830f6ab25b2d52" - -SRC_URI[sha256sum] = "e57e563a57fb22a142da34f38acc2fc1a5c864bc29ca1517a88abc963e60d6ec" - -inherit pypi python_setuptools_build_meta - -DEPENDS += "\ - python3-cppy-native \ -" - -RDEPENDS:${PN} += "\ - python3-core \ - python3-setuptools \ -" - -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-kiwisolver_1.4.7.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-kiwisolver_1.4.7.bb new file mode 100644 index 00000000..9c422490 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-kiwisolver_1.4.7.bb @@ -0,0 +1,19 @@ +SUMMARY = "A fast implementation of the Cassowary constraint solver" +HOMEPAGE = "https://github.com/nucleic/kiwi" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=5f7ce5ba663b186ce35b78df96a2eb0a" + +SRC_URI[sha256sum] = "9893ff81bd7107f7b685d3017cc6583daadb4fc26e4a888350df530e41980a60" + +inherit pypi python_setuptools_build_meta + +DEPENDS += "\ + python3-cppy-native \ +" + +RDEPENDS:${PN} += "\ + python3-core \ + python3-setuptools \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-langtable_0.0.65.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-langtable_0.0.65.bb deleted file mode 100644 index fa9edc67..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-langtable_0.0.65.bb +++ /dev/null @@ -1,23 +0,0 @@ -DESCRIPTION = "langtable is used to guess reasonable defaults for locale,\ -keyboard, territory" -HOMEPAGE = "https://github.com/mike-fabian/langtable/" -LICENSE = "GPL-3.0-or-later" -SECTION = "devel/python" - -LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" - -SRC_URI[sha256sum] = "791ec5403859704e1dee4d2a056a30ec21d1e7bc040658ce62c40e0427ba4333" - -inherit pypi setuptools3 python3native - -DISTUTILS_INSTALL_ARGS += " \ - --install-data=${datadir}/langtable" - -FILES:${PN} += "${datadir}/*" - -RDEPENDS:${PN} += " \ - python3-compression \ - python3-doctest \ - python3-logging \ - python3-xml \ -" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-langtable_0.0.68.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-langtable_0.0.68.bb new file mode 100644 index 00000000..64eb57dd --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-langtable_0.0.68.bb @@ -0,0 +1,23 @@ +DESCRIPTION = "langtable is used to guess reasonable defaults for locale,\ +keyboard, territory" +HOMEPAGE = "https://github.com/mike-fabian/langtable/" +LICENSE = "GPL-3.0-or-later" +SECTION = "devel/python" + +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" + +SRC_URI[sha256sum] = "3965a4d57a066a595ea8a87f6a5295412e65a7f39dbaad95c7327d48b11799fe" + +inherit pypi setuptools3 python3native + +DISTUTILS_INSTALL_ARGS += " \ + --install-data=${datadir}/langtable" + +FILES:${PN} += "${datadir}/*" + +RDEPENDS:${PN} += " \ + python3-compression \ + python3-doctest \ + python3-logging \ + python3-xml \ +" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-lazy-object-proxy_1.10.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-lazy-object-proxy_1.10.0.bb index 263c4686..195f9470 100644 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-lazy-object-proxy_1.10.0.bb +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-lazy-object-proxy_1.10.0.bb @@ -4,8 +4,8 @@ LICENSE = "BSD-2-Clause" SECTION = "devel/python" LIC_FILES_CHKSUM = "file://LICENSE;md5=d606e94f56c21c8e0cdde0b622dcdf57" -DEPENDS += "python3-setuptools-scm-native python3-pip-native" +DEPENDS += "python3-setuptools-scm-native" SRC_URI[sha256sum] = "78247b6d45f43a52ef35c25b5581459e85117225408a4128a3daf8bf9648ac69" -inherit pypi setuptools3 +inherit pypi python_setuptools_build_meta diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-lazy_1.6.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-lazy_1.6.bb index 97517f89..22248930 100644 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-lazy_1.6.bb +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-lazy_1.6.bb @@ -5,4 +5,4 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=7df3865e8640604acfa474235d2db76b" SRC_URI[sha256sum] = "7127324ec709e8324f08cb4611c1abe01776bda53bb9ce68dc5dfa46ca0ed3e9" -inherit pypi setuptools3 +inherit pypi python_setuptools_build_meta diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-lru-dict_1.3.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-lru-dict_1.3.0.bb index 51f3860b..236daca4 100644 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-lru-dict_1.3.0.bb +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-lru-dict_1.3.0.bb @@ -6,6 +6,4 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=9d10a486ee04034fdef5162fd791f153" SRC_URI[sha256sum] = "54fd1966d6bd1fcde781596cb86068214edeebff1db13a2cea11079e3fd07b6b" -inherit pypi setuptools3 - -SRC_URI += "${PYPI_SRC_URI}" +inherit pypi python_setuptools_build_meta diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-luma-oled_3.13.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-luma-oled_3.13.0.bb index 95f066af..74b9be50 100644 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-luma-oled_3.13.0.bb +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-luma-oled_3.13.0.bb @@ -6,7 +6,7 @@ HOMEPAGE = "https://github.com/rm-hull/luma.oled" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=5ec447eb69733e20a55838de7e8cb991" -inherit pypi setuptools3 +inherit pypi python_setuptools_build_meta SRC_URI[sha256sum] = "7e2a0d6a4c968c64980255d681ec27914d9abd5a66a9019b289bf3ad050c2125" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-marshmallow_3.21.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-marshmallow_3.21.1.bb deleted file mode 100644 index bf1d8dd2..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-marshmallow_3.21.1.bb +++ /dev/null @@ -1,38 +0,0 @@ -SUMMARY = "Simplified object serialization in python" -DESCRIPTION = "Marshmallow is an ORM/ODM/framework-agnostic library for converting complex datatypes, such as objects, to and from native Python datatypes." -HOMEPAGE = "https://github.com/marshmallow-code/marshmallow" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "\ - file://LICENSE;md5=27586b20700d7544c06933afe56f7df4 \ - file://docs/license.rst;md5=13da439ad060419fb7cf364523017cfb" - -SRC_URI[sha256sum] = "4e65e9e0d80fc9e609574b9983cf32579f305c718afb30d7233ab818571768c3" - -inherit python_flit_core pypi ptest - -SRC_URI += " \ - file://run-ptest \ -" - -RDEPENDS:${PN}-ptest += " \ - python3-pytest \ - python3-pytz \ - python3-simplejson \ - python3-unittest-automake-output \ -" - -do_install_ptest() { - install -d ${D}${PTEST_PATH}/tests - rm -rf ${S}/tests/mypy_test_cases - cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ -} - -RDEPENDS:${PN} += " \ - python3-compression \ - python3-datetime \ - python3-email \ - python3-json \ - python3-numbers \ - python3-pprint \ - python3-packaging \ -" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-marshmallow_3.22.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-marshmallow_3.22.0.bb new file mode 100644 index 00000000..269522dc --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-marshmallow_3.22.0.bb @@ -0,0 +1,38 @@ +SUMMARY = "Simplified object serialization in python" +DESCRIPTION = "Marshmallow is an ORM/ODM/framework-agnostic library for converting complex datatypes, such as objects, to and from native Python datatypes." +HOMEPAGE = "https://github.com/marshmallow-code/marshmallow" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "\ + file://LICENSE;md5=27586b20700d7544c06933afe56f7df4 \ + file://docs/license.rst;md5=13da439ad060419fb7cf364523017cfb" + +SRC_URI[sha256sum] = "4972f529104a220bb8637d595aa4c9762afbe7f7a77d82dc58c1615d70c5823e" + +inherit python_flit_core pypi ptest + +SRC_URI += " \ + file://run-ptest \ +" + +RDEPENDS:${PN}-ptest += " \ + python3-pytest \ + python3-pytz \ + python3-simplejson \ + python3-unittest-automake-output \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + rm -rf ${S}/tests/mypy_test_cases + cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ +} + +RDEPENDS:${PN} += " \ + python3-compression \ + python3-datetime \ + python3-email \ + python3-json \ + python3-numbers \ + python3-pprint \ + python3-packaging \ +" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-matplotlib-inline_0.1.6.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-matplotlib-inline_0.1.6.bb deleted file mode 100644 index 13210b90..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-matplotlib-inline_0.1.6.bb +++ /dev/null @@ -1,8 +0,0 @@ -SUMMARY = "Inline Matplotlib backend for Jupyter" -HOMEPAGE = "https://pypi.org/project/matplotlib-inline/" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=d4692a0eb42ca54892399db2cb35e61e" - -SRC_URI[sha256sum] = "f887e5f10ba98e8d2b150ddcf4702c1e5f8b3a20005eb0f74bfdbd360ee6f304" - -inherit pypi diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-matplotlib-inline_0.1.7.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-matplotlib-inline_0.1.7.bb new file mode 100644 index 00000000..33556564 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-matplotlib-inline_0.1.7.bb @@ -0,0 +1,11 @@ +SUMMARY = "Inline Matplotlib backend for Jupyter" +HOMEPAGE = "https://pypi.org/project/matplotlib-inline/" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=d4692a0eb42ca54892399db2cb35e61e" + +SRC_URI[sha256sum] = "8423b23ec666be3d16e16b60bdd8ac4e86e840ebd1dd11a30b9f117f2fa0ab90" + +PYPI_PACKAGE = "matplotlib_inline" +inherit pypi python_setuptools_build_meta + +RDEPENDS:${PN} = "python3-traitlets" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-moteus/0001-lib-python-remove-self-import-from-setup.py.patch b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-moteus/0001-lib-python-remove-self-import-from-setup.py.patch deleted file mode 100644 index 10acd7b8..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-moteus/0001-lib-python-remove-self-import-from-setup.py.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 7490ac4629c7fe0dc329647e6e000d4bc13c610d Mon Sep 17 00:00:00 2001 -From: Richard Leitner -Date: Wed, 24 Jan 2024 00:49:45 +0100 -Subject: [PATCH] lib: python: remove self-import from setup.py - -Importing moteus itself within the setup.py creates some kind of a -chicken-and-egg problem. Furthermore it isn't used anywhere within -setup.py. Therefore remove the corresponding import. - -Signed-off-by: Richard Leitner - -Upstream-Status: Backport [https://github.com/mjbots/moteus/commit/7490ac4629c7fe0dc329647e6e000d4bc13c610d] ---- - setup.py | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/setup.py b/setup.py -index 2731685..6c6064d 100644 ---- a/setup.py -+++ b/setup.py -@@ -17,8 +17,6 @@ - import setuptools - import pathlib - --import moteus -- - here = pathlib.Path(__file__).parent.resolve() - - # Get the long description from the README file --- -2.40.1 - diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-moteus_0.3.67.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-moteus_0.3.67.bb deleted file mode 100644 index 3c93ee44..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-moteus_0.3.67.bb +++ /dev/null @@ -1,19 +0,0 @@ -SUMMARY = "moteus brushless controller library and tools" -HOMEPAGE = "https://github.com/mjbots/moteus" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://setup.py;beginline=3;endline=9;md5=24025d3c660abfc62a83f0e709a45e76" - -inherit pypi setuptools3 - -SRC_URI += "file://0001-lib-python-remove-self-import-from-setup.py.patch" - -SRC_URI[sha256sum] = "a2122f20f59b8962057cf8d3fb583e0aa19006eaf2cde49e30027a4d1b8bf925" - -S = "${WORKDIR}/moteus-${PV}" - -RDEPENDS:${PN} += "\ - python3-can \ - python3-importlib-metadata \ - python3-pyelftools \ - python3-pyserial \ -" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-moteus_0.3.72.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-moteus_0.3.72.bb new file mode 100644 index 00000000..be560c71 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-moteus_0.3.72.bb @@ -0,0 +1,17 @@ +SUMMARY = "moteus brushless controller library and tools" +HOMEPAGE = "https://github.com/mjbots/moteus" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://setup.py;beginline=3;endline=9;md5=24025d3c660abfc62a83f0e709a45e76" + +inherit pypi setuptools3 + +SRC_URI[sha256sum] = "3aa30eea9ab9bc7209ab7c6f382650265ab648663edead5c54d69d9f0a3fd36e" + +S = "${WORKDIR}/moteus-${PV}" + +RDEPENDS:${PN} += "\ + python3-can \ + python3-importlib-metadata \ + python3-pyelftools \ + python3-pyserial \ +" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-msgpack_1.0.7.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-msgpack_1.0.7.bb deleted file mode 100644 index 5180301f..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-msgpack_1.0.7.bb +++ /dev/null @@ -1,27 +0,0 @@ -SUMMARY = "MessagePack (de)serializer" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://COPYING;md5=cd9523181d9d4fbf7ffca52eaa2a5751" - -inherit pypi setuptools3 ptest - -SRC_URI[sha256sum] = "572efc93db7a4d27e404501975ca6d2d9775705c2d922390d878fcf768d92c87" - -RDEPENDS:${PN}:class-target += "\ - python3-io \ -" - -BBCLASSEXTEND = "native nativesdk" - -SRC_URI += " \ - file://run-ptest \ -" - -RDEPENDS:${PN}-ptest += " \ - python3-pytest \ - python3-unittest-automake-output \ -" - -do_install_ptest() { - install -d ${D}${PTEST_PATH}/test - cp -rf ${S}/test/* ${D}${PTEST_PATH}/test/ -} diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-msgpack_1.1.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-msgpack_1.1.0.bb new file mode 100644 index 00000000..eb04dc2e --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-msgpack_1.1.0.bb @@ -0,0 +1,27 @@ +SUMMARY = "MessagePack (de)serializer" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://COPYING;md5=cd9523181d9d4fbf7ffca52eaa2a5751" + +inherit pypi python_setuptools_build_meta ptest + +SRC_URI[sha256sum] = "dd432ccc2c72b914e4cb77afce64aab761c1137cc698be3984eee260bcb2896e" + +RDEPENDS:${PN}:class-target += "\ + python3-io \ +" + +BBCLASSEXTEND = "native nativesdk" + +SRC_URI += " \ + file://run-ptest \ +" + +RDEPENDS:${PN}-ptest += " \ + python3-pytest \ + python3-unittest-automake-output \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/test + cp -rf ${S}/test/* ${D}${PTEST_PATH}/test/ +} diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-multidict_6.0.5.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-multidict_6.0.5.bb index b12e180d..6346152a 100644 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-multidict_6.0.5.bb +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-multidict_6.0.5.bb @@ -4,7 +4,7 @@ HOMEPAGE = "https://github.com/aio-libs/multidict/" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=b4fef6e4b0828c2401fb983363985b39" -inherit pypi setuptools3 ptest +inherit pypi python_setuptools_build_meta ptest PV .= "+git" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-mypy_1.10.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-mypy_1.10.0.bb new file mode 100644 index 00000000..534ff906 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-mypy_1.10.0.bb @@ -0,0 +1,23 @@ +SUMMARY = "Optional static typing for Python 3 and 2 (PEP 484)" +HOMEPAGE = "https://github.com/python/mypy" +LICENSE = "MIT & Python-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=8d62fd8f8648cb018e52857347e340b9" + +inherit pypi python_setuptools_build_meta + +SRC_URI[sha256sum] = "3d087fcbec056c4ee34974da493a826ce316947485cef3901f511848e687c131" + +BBCLASSEXTEND = "native" + +DEPENDS += " \ + python3-mypy-extensions-native \ + python3-types-psutil-native \ + python3-types-setuptools-native \ + python3-typing-extensions-native \ +" + +RDEPENDS:${PN} += " \ + python3-modules \ + python3-mypy-extensions \ + python3-typing-extensions \ +" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-mypy_1.9.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-mypy_1.9.0.bb deleted file mode 100644 index e51264f8..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-mypy_1.9.0.bb +++ /dev/null @@ -1,23 +0,0 @@ -SUMMARY = "Optional static typing for Python 3 and 2 (PEP 484)" -HOMEPAGE = "https://github.com/python/mypy" -LICENSE = "MIT & Python-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=8d62fd8f8648cb018e52857347e340b9" - -inherit pypi python_setuptools_build_meta - -SRC_URI[sha256sum] = "3cc5da0127e6a478cddd906068496a97a7618a21ce9b54bde5bf7e539c7af974" - -BBCLASSEXTEND = "native" - -DEPENDS += " \ - python3-mypy-extensions-native \ - python3-types-psutil-native \ - python3-types-setuptools-native \ - python3-typing-extensions-native \ -" - -RDEPENDS:${PN} += " \ - python3-modules \ - python3-mypy-extensions \ - python3-typing-extensions \ -" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-netaddr_1.2.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-netaddr_1.2.1.bb deleted file mode 100644 index bedf0dab..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-netaddr_1.2.1.bb +++ /dev/null @@ -1,25 +0,0 @@ -SUMMARY = "A network address manipulation library for Python." -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=8afa43eca873b71d5d85dd0be1f707fa" - -SRC_URI[sha256sum] = "6eb8fedf0412c6d294d06885c110de945cf4d22d2b510d0404f4e06950857987" - -inherit pypi python_setuptools_build_meta ptest - -SRC_URI += " \ - file://run-ptest \ -" - -RDEPENDS:${PN}-ptest += " \ - python3-pytest \ - python3-unittest-automake-output \ -" - -do_install_ptest() { - install -d ${D}${PTEST_PATH}/tests - cp -rf ${S}/netaddr/tests/* ${D}${PTEST_PATH}/tests/ -} - -do_install_ptest:append:libc-musl () { - sed -i -e "/--automake/ s/$/ -k 'not test_strategy_ipv6'/" ${D}${PTEST_PATH}/run-ptest -} diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-netaddr_1.3.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-netaddr_1.3.0.bb new file mode 100644 index 00000000..b8a77256 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-netaddr_1.3.0.bb @@ -0,0 +1,25 @@ +SUMMARY = "A network address manipulation library for Python." +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=8afa43eca873b71d5d85dd0be1f707fa" + +SRC_URI[sha256sum] = "5c3c3d9895b551b763779ba7db7a03487dc1f8e3b385af819af341ae9ef6e48a" + +inherit pypi python_setuptools_build_meta ptest + +SRC_URI += " \ + file://run-ptest \ +" + +RDEPENDS:${PN}-ptest += " \ + python3-pytest \ + python3-unittest-automake-output \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/netaddr/tests/* ${D}${PTEST_PATH}/tests/ +} + +do_install_ptest:append:libc-musl () { + sed -i -e "/--automake/ s/$/ -k 'not test_strategy_ipv6'/" ${D}${PTEST_PATH}/run-ptest +} diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-nmap_1.6.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-nmap_1.6.0.bb deleted file mode 100644 index 2293e3dd..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-nmap_1.6.0.bb +++ /dev/null @@ -1,18 +0,0 @@ -DESCRIPTION = "python-nmap is a python library which helps in using nmap port scanner" -HOMEPAGE = "https://www.nmmapper.com/" -SECTION = "devel/python" -LICENSE = "GPL-3.0-only" -LIC_FILES_CHKSUM = "file://LICENSE;md5=1ebbd3e34237af26da5dc08a4e440464" - -DEPENDS += "python3-wheel-native" - -PYPI_PACKAGE = "python3-nmap" - -SRC_URI[sha256sum] = "892b5091cde429fabfb8ba63382b2db8fd795193ba147558d0a7d5534c956255" - -inherit pypi setuptools3 - -RDEPENDS:${PN} += "nmap \ - python3-requests \ - python3-simplejson \ -" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-nmap_1.9.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-nmap_1.9.1.bb new file mode 100644 index 00000000..25e38208 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-nmap_1.9.1.bb @@ -0,0 +1,18 @@ +DESCRIPTION = "python-nmap is a python library which helps in using nmap port scanner" +HOMEPAGE = "https://www.nmmapper.com/" +SECTION = "devel/python" +LICENSE = "GPL-3.0-only" +LIC_FILES_CHKSUM = "file://LICENSE;md5=1ebbd3e34237af26da5dc08a4e440464" + +DEPENDS += "python3-wheel-native" + +PYPI_PACKAGE = "python3-nmap" + +SRC_URI[sha256sum] = "8465cfb013f5cdfa8a1050c40cdae600b581ee32f1864ec404927aee49b4262c" + +inherit pypi setuptools3 + +RDEPENDS:${PN} += "nmap \ + python3-requests \ + python3-simplejson \ +" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-nocasedict_2.0.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-nocasedict_2.0.1.bb deleted file mode 100644 index 5a298581..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-nocasedict_2.0.1.bb +++ /dev/null @@ -1,12 +0,0 @@ -SUMMARY = "A case-insensitive ordered dictionary for Python" -HOMEPAGE = "https://github.com/pywbem/nocasedict" -LICENSE = "LGPL-2.1-only" -LIC_FILES_CHKSUM = "file://LICENSE;md5=1803fa9c2c3ce8cb06b4861d75310742" - -SRC_URI[sha256sum] = "960cb699f1209da80ac39e3ab50aa7342fe8ca9f70606c23447a510550435e50" - -inherit pypi setuptools3 - -RDEPENDS:${PN} += " \ - python3-six \ -" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-nocasedict_2.0.4.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-nocasedict_2.0.4.bb new file mode 100644 index 00000000..31bd15f8 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-nocasedict_2.0.4.bb @@ -0,0 +1,12 @@ +SUMMARY = "A case-insensitive ordered dictionary for Python" +HOMEPAGE = "https://github.com/pywbem/nocasedict" +LICENSE = "LGPL-2.1-only" +LIC_FILES_CHKSUM = "file://LICENSE;md5=1803fa9c2c3ce8cb06b4861d75310742" + +SRC_URI[sha256sum] = "4ca934f65df57b10d0fcab5f0c39e9dccb93577ff9f22bef98265ddbf12f8af1" + +inherit pypi setuptools3 + +RDEPENDS:${PN} += " \ + python3-six \ +" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-nocaselist_2.0.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-nocaselist_2.0.0.bb deleted file mode 100644 index 2ad42247..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-nocaselist_2.0.0.bb +++ /dev/null @@ -1,12 +0,0 @@ -SUMMARY = "A case-insensitive list for Python" -HOMEPAGE = "https://nocaselist.readthedocs.io/en/latest/" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" - -SRC_URI[sha256sum] = "456aa000c6777c5d21b029c52e532f94328d4fb4f15ad2a4dd3dd62db30b3892" - -inherit pypi setuptools3 - -RDEPENDS:${PN} += " \ - python3-six \ -" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-nocaselist_2.0.3.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-nocaselist_2.0.3.bb new file mode 100644 index 00000000..a8694538 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-nocaselist_2.0.3.bb @@ -0,0 +1,12 @@ +SUMMARY = "A case-insensitive list for Python" +HOMEPAGE = "https://nocaselist.readthedocs.io/en/latest/" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" + +SRC_URI[sha256sum] = "55714da8433fb4843ce797404977e4385d5e3df9e4aa00f7dde983fd87410fef" + +inherit pypi setuptools3 + +RDEPENDS:${PN} += " \ + python3-six \ +" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-oletools_0.60.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-oletools_0.60.1.bb deleted file mode 100644 index fbb7955d..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-oletools_0.60.1.bb +++ /dev/null @@ -1,11 +0,0 @@ -SUMMARY = "Python tools to analyze security characteristics of MS Office and OLE files" -HOMEPAGE = "https://github.com/decalage2/olefile" -LICENSE = "BSD-2-Clause" -LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=d7dd4b0d1f7153322a546e89b5a0a632" - -SRC_URI[sha256sum] = "67a796da4c4b8e2feb9a6b2495bef8798a3323a75512de4e5669d9dc9d1fae31" - -inherit pypi setuptools3 - -PYPI_PACKAGE = "oletools" -PYPI_PACKAGE_EXT = "zip" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-oletools_0.60.2.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-oletools_0.60.2.bb new file mode 100644 index 00000000..162ebcab --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-oletools_0.60.2.bb @@ -0,0 +1,11 @@ +SUMMARY = "Python tools to analyze security characteristics of MS Office and OLE files" +HOMEPAGE = "https://github.com/decalage2/olefile" +LICENSE = "BSD-2-Clause" +LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=181754d317256f1b037529d3e994e1b4" + +SRC_URI[sha256sum] = "ad452099f4695ffd8855113f453348200d195ee9fa341a09e197d66ee7e0b2c3" + +inherit pypi setuptools3 + +PYPI_PACKAGE = "oletools" +PYPI_PACKAGE_EXT = "zip" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-openpyxl_3.1.2.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-openpyxl_3.1.2.bb deleted file mode 100644 index 4a3254cc..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-openpyxl_3.1.2.bb +++ /dev/null @@ -1,23 +0,0 @@ -SUMMARY = "openpyxl is a Python library to read/write Excel 2010 xlsx/xlsm/xltx/xltm files" -DESCRIPTION = "It was born from lack of existing library to read/write natively \ -from Python the Office Open XML format. All kudos to the PHPExcel team as openpyxl \ -was initially based on PHPExcel." - -HOMEPAGE = "http://www.python-excel.org/" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=8227180126797a0148f94f483f3e1489" - -inherit pypi setuptools3 - -SRC_URI[sha256sum] = "a6f5977418eff3b2d5500d54d9db50c8277a368436f4e4f8ddb1be3422870184" - -RDEPENDS:${PN} += "\ - python3-compression \ - python3-io \ - python3-pprint \ - python3-shell \ - python3-jdcal \ - python3-et-xmlfile \ - python3-numbers \ - python3-xml \ -" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-openpyxl_3.1.5.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-openpyxl_3.1.5.bb new file mode 100644 index 00000000..990d3cf3 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-openpyxl_3.1.5.bb @@ -0,0 +1,23 @@ +SUMMARY = "openpyxl is a Python library to read/write Excel 2010 xlsx/xlsm/xltx/xltm files" +DESCRIPTION = "It was born from lack of existing library to read/write natively \ +from Python the Office Open XML format. All kudos to the PHPExcel team as openpyxl \ +was initially based on PHPExcel." + +HOMEPAGE = "http://www.python-excel.org/" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=8227180126797a0148f94f483f3e1489" + +inherit pypi setuptools3 + +SRC_URI[sha256sum] = "cf0e3cf56142039133628b5acffe8ef0c12bc902d2aadd3e0fe5878dc08d1050" + +RDEPENDS:${PN} += "\ + python3-compression \ + python3-io \ + python3-pprint \ + python3-shell \ + python3-jdcal \ + python3-et-xmlfile \ + python3-numbers \ + python3-xml \ +" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-paho-mqtt_2.0.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-paho-mqtt_2.0.0.bb deleted file mode 100644 index e4cf77a1..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-paho-mqtt_2.0.0.bb +++ /dev/null @@ -1,37 +0,0 @@ -SUMMARY = "MQTT version 3.1/3.1.1 client library" -LICENSE = "EPL-1.0 | EDL-1.0" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=8e5f264c6988aec56808a3a11e77b913 \ - file://edl-v10;md5=c09f121939f063aeb5235972be8c722c \ -" -SRCNAME = "paho-mqtt" - -inherit pypi python_hatchling python_setuptools_build_meta - -SRC_URI[sha256sum] = "13b205f29251e4f2c66a6c923c31fc4fd780561e03b2d775cff8e4f2915cf947" - -PYPI_SRC_URI = "https://files.pythonhosted.org/packages/73/b7/a4df0f93bbdae237e16ba402752151eceee576cbe80c235a2475fbf81eea/paho_mqtt-${PV}.tar.gz" - -S = "${WORKDIR}/paho_mqtt-${PV}" - -DEPENDS += "python3-pytest-runner-native" - -do_install:append() { - install -d -m0755 ${D}${datadir}/${BPN}/examples - cp --preserve=mode,timestamps -R ${S}/examples/* ${D}${datadir}/${BPN}/examples -} - -PACKAGES =+ "${PN}-examples" - -RDEPENDS:${PN}-examples += "${PN} python3-core" - -FILES:${PN}-examples = "${datadir}/${BPN}/examples" - -RDEPENDS:${PN} = "\ - python3-io \ - python3-logging \ - python3-math \ - python3-netclient \ - python3-threading \ -" - -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-paho-mqtt_2.1.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-paho-mqtt_2.1.0.bb new file mode 100644 index 00000000..0c3e6e92 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-paho-mqtt_2.1.0.bb @@ -0,0 +1,37 @@ +SUMMARY = "MQTT version 3.1/3.1.1 client library" +LICENSE = "EPL-1.0 | EDL-1.0" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=8e5f264c6988aec56808a3a11e77b913 \ + file://edl-v10;md5=c09f121939f063aeb5235972be8c722c \ +" +SRCNAME = "paho-mqtt" + +inherit pypi python_hatchling python_setuptools_build_meta + +SRC_URI[sha256sum] = "12d6e7511d4137555a3f6ea167ae846af2c7357b10bc6fa4f7c3968fc1723834" + +PYPI_SRC_URI = "https://files.pythonhosted.org/packages/39/15/0a6214e76d4d32e7f663b109cf71fb22561c2be0f701d67f93950cd40542/paho_mqtt-${PV}.tar.gz" + +S = "${WORKDIR}/paho_mqtt-${PV}" + +DEPENDS += "python3-pytest-runner-native" + +do_install:append() { + install -d -m0755 ${D}${datadir}/${BPN}/examples + cp --preserve=mode,timestamps -R ${S}/examples/* ${D}${datadir}/${BPN}/examples +} + +PACKAGES =+ "${PN}-examples" + +RDEPENDS:${PN}-examples += "${PN} python3-core" + +FILES:${PN}-examples = "${datadir}/${BPN}/examples" + +RDEPENDS:${PN} = "\ + python3-io \ + python3-logging \ + python3-math \ + python3-netclient \ + python3-threading \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pandas/0001-pyproject.toml-Downgrade-numpy-version-needs-to-1.x.patch b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pandas/0001-pyproject.toml-Downgrade-numpy-version-needs-to-1.x.patch new file mode 100644 index 00000000..b0ef8ce0 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pandas/0001-pyproject.toml-Downgrade-numpy-version-needs-to-1.x.patch @@ -0,0 +1,27 @@ +From d81d95274d84ac51fc02e0fa91affc7f3cbefccb Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 24 Aug 2024 10:21:43 -0700 +Subject: [PATCH] pyproject.toml: Downgrade numpy version needs to 1.x + +Drop it when numpy is upgraded to 2.x or newer in core + +Upstream-Status: Inappropriate [OE workaround] + +Signed-off-by: Khem Raj +--- + pyproject.toml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/pyproject.toml b/pyproject.toml +index 5158d60..d3daa78 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -8,7 +8,7 @@ requires = [ + "Cython>=3.0.5", # Note: sync with setup.py, environment.yml and asv.conf.json + # Force numpy higher than 2.0rc1, so that built wheels are compatible + # with both numpy 1 and 2 +- "numpy>=2.0.0rc1", ++ "numpy>=1.24.0", + "versioneer[toml]" + ] + diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pandas/0001-pyproject.toml-don-t-pin-dependency-versions.patch b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pandas/0001-pyproject.toml-don-t-pin-dependency-versions.patch new file mode 100644 index 00000000..f60f43a5 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pandas/0001-pyproject.toml-don-t-pin-dependency-versions.patch @@ -0,0 +1,37 @@ +From d46b8720a6bccb345f6bdd7ee2f5c357e7eb227b Mon Sep 17 00:00:00 2001 +From: Trevor Gamblin +Date: Mon, 12 Aug 2024 11:27:36 -0400 +Subject: [PATCH] pyproject.toml: don't pin dependency versions + +Pandas will fail to build if the exact versions aren't found, but newer +ones actually work. Since newer versions of pandas are adjusting the +requires section of pyproject toml further, just patch it for us. + +Upstream-Status: Inappropriate [OE-Specific] + +Signed-off-by: Trevor Gamblin +--- + pyproject.toml | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/pyproject.toml b/pyproject.toml +index db9f055799..5158d60f59 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -2,10 +2,10 @@ + # Minimum requirements for the build system to execute. + # See https://github.com/scipy/scipy/pull/12940 for the AIX issue. + requires = [ +- "meson-python==0.13.1", +- "meson==1.2.1", ++ "meson-python>=0.13.1", ++ "meson>=1.2.1", + "wheel", +- "Cython==3.0.5", # Note: sync with setup.py, environment.yml and asv.conf.json ++ "Cython>=3.0.5", # Note: sync with setup.py, environment.yml and asv.conf.json + # Force numpy higher than 2.0rc1, so that built wheels are compatible + # with both numpy 1 and 2 + "numpy>=2.0.0rc1", +-- +2.39.2 + diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pandas_2.0.3.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pandas_2.0.3.bb deleted file mode 100644 index 91e76d99..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pandas_2.0.3.bb +++ /dev/null @@ -1,38 +0,0 @@ -SUMMARY = "pandas library for high-performance data analysis tools" -DESCRIPTION = "pandas is an open source, BSD-licensed library providing \ -high-performance, easy-to-use data structures and data analysis tools for \ -the Python programming language." -HOMEPAGE = "http://pandas.pydata.org/" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=cb819092901ddb13a7d0a4f5e05f098a" - -SRC_URI[sha256sum] = "c02f372a88e0d17f36d3093a644c73cfc1788e876a7c4bcb4020a77512e2043c" - -inherit pypi setuptools3 - -DEPENDS += " \ - python3-cython-native \ - python3-numpy-native \ - python3-versioneer-native \ -" - -PACKAGESPLITFUNCS =+ "fix_cythonized_sources" - -fix_cythonized_sources() { - for f in `grep -l -r -e '\/* Generated by Cython.*/$' ${PKGD}${TARGET_DBGSRC_DIR}`; do - if [ -e $f ]; then - sed -i -e 's#${RECIPE_SYSROOT_NATIVE}##g' $f - fi - done -} - -CFLAGS:append:toolchain-clang = " -Wno-error=deprecated-declarations" - -RDEPENDS:${PN} += " \ - python3-json \ - python3-numpy \ - python3-dateutil \ - python3-dateutil-zoneinfo \ - python3-pytz \ - python3-profile \ -" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pandas_2.2.2.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pandas_2.2.2.bb new file mode 100644 index 00000000..25b03c8e --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pandas_2.2.2.bb @@ -0,0 +1,43 @@ +SUMMARY = "pandas library for high-performance data analysis tools" +DESCRIPTION = "pandas is an open source, BSD-licensed library providing \ +high-performance, easy-to-use data structures and data analysis tools for \ +the Python programming language." +HOMEPAGE = "http://pandas.pydata.org/" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=cb819092901ddb13a7d0a4f5e05f098a" + +SRC_URI += " \ + file://0001-pyproject.toml-don-t-pin-dependency-versions.patch \ + file://0001-pyproject.toml-Downgrade-numpy-version-needs-to-1.x.patch \ + " + +SRC_URI[sha256sum] = "9e79019aba43cb4fda9e4d983f8e88ca0373adbb697ae9c6c43093218de28b54" + +inherit pypi python_mesonpy + +DEPENDS += " \ + python3-cython-native \ + python3-numpy-native \ + python3-versioneer-native \ +" + +PACKAGESPLITFUNCS =+ "fix_cythonized_sources" + +fix_cythonized_sources() { + for f in `grep -l -r -e '\/* Generated by Cython.*/$' ${PKGD}${TARGET_DBGSRC_DIR}`; do + if [ -e $f ]; then + sed -i -e 's#${RECIPE_SYSROOT_NATIVE}##g' $f + fi + done +} + +CFLAGS:append:toolchain-clang = " -Wno-error=deprecated-declarations" + +RDEPENDS:${PN} += " \ + python3-json \ + python3-numpy \ + python3-dateutil \ + python3-dateutil-zoneinfo \ + python3-pytz \ + python3-profile \ +" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-paramiko_3.4.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-paramiko_3.4.0.bb deleted file mode 100644 index 0d32d361..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-paramiko_3.4.0.bb +++ /dev/null @@ -1,20 +0,0 @@ -DESCRIPTION = "The leading native Python SSHv2 protocol library." -HOMEPAGE = "https://github.com/paramiko/paramiko/" -LICENSE = "LGPL-2.1-only" -LIC_FILES_CHKSUM = "file://LICENSE;md5=fd0120fc2e9f841c73ac707a30389af5" - -SRC_URI[sha256sum] = "aac08f26a31dc4dffd92821527d1682d99d52f9ef6851968114a8728f3c274d3" - -PYPI_PACKAGE = "paramiko" - -inherit pypi setuptools3 - -CLEANBROKEN = "1" - -RDEPENDS:${PN} += " \ - python3-bcrypt \ - python3-cryptography \ - python3-logging \ - python3-pynacl \ - python3-unixadmin \ -" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-paramiko_3.5.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-paramiko_3.5.0.bb new file mode 100644 index 00000000..8ccf939f --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-paramiko_3.5.0.bb @@ -0,0 +1,20 @@ +DESCRIPTION = "The leading native Python SSHv2 protocol library." +HOMEPAGE = "https://github.com/paramiko/paramiko/" +LICENSE = "LGPL-2.1-only" +LIC_FILES_CHKSUM = "file://LICENSE;md5=fd0120fc2e9f841c73ac707a30389af5" + +SRC_URI[sha256sum] = "ad11e540da4f55cedda52931f1a3f812a8238a7af7f62a60de538cd80bb28124" + +PYPI_PACKAGE = "paramiko" + +inherit pypi setuptools3 + +CLEANBROKEN = "1" + +RDEPENDS:${PN} += " \ + python3-bcrypt \ + python3-cryptography \ + python3-logging \ + python3-pynacl \ + python3-unixadmin \ +" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-parse-type_0.6.2.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-parse-type_0.6.2.bb deleted file mode 100644 index 57dfc5a5..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-parse-type_0.6.2.bb +++ /dev/null @@ -1,25 +0,0 @@ -SUMMARY = "Simplifies building parse types based on the parse module" -HOMEPAGE = "https://github.com/jenisys/parse_type" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=2e469278ace89c246d52505acc39c3da" - -SRC_URI[sha256sum] = "79b1f2497060d0928bc46016793f1fca1057c4aacdf15ef876aa48d75a73a355" - -PYPI_PACKAGE = "parse_type" -inherit pypi ptest setuptools3 - -RDEPENDS:${PN} += "python3-parse" - -SRC_URI += " \ - file://run-ptest \ -" - -RDEPENDS:${PN}-ptest += " \ - python3-pytest \ - python3-unittest-automake-output \ -" - -do_install_ptest() { - install -d ${D}${PTEST_PATH}/tests - cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ -} diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-parse-type_0.6.3.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-parse-type_0.6.3.bb new file mode 100644 index 00000000..06843c03 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-parse-type_0.6.3.bb @@ -0,0 +1,25 @@ +SUMMARY = "Simplifies building parse types based on the parse module" +HOMEPAGE = "https://github.com/jenisys/parse_type" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=2e469278ace89c246d52505acc39c3da" + +SRC_URI[sha256sum] = "8e99d2f52fab2f0f1f3d68ba9d026060140bf0e53680aada0111fb27b2f0e93a" +SRC_URI += " \ + file://run-ptest \ +" + +PYPI_PACKAGE = "parse_type" + +inherit pypi ptest python_setuptools_build_meta + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ +} + +RDEPENDS:${PN} += "python3-parse" +RDEPENDS:${PN}-ptest += " \ + python3-pytest \ + python3-six \ + python3-unittest-automake-output \ +" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-parse_1.20.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-parse_1.20.1.bb deleted file mode 100644 index d2b91b3f..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-parse_1.20.1.bb +++ /dev/null @@ -1,27 +0,0 @@ -SUMMARY = "Parse strings using a specification based on the Python format() syntax" -HOMEPAGE = "https://github.com/r1chardj0n3s/parse" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=8ab458ad281b60e6f1b39b3feafbfc05" - -SRC_URI[sha256sum] = "09002ca350ad42e76629995f71f7b518670bcf93548bdde3684fd55d2be51975" - -SRC_URI += " \ - file://run-ptest \ -" - -inherit pypi python_setuptools_build_meta ptest - -RDEPENDS:${PN} += "\ - python3-datetime \ - python3-logging \ - python3-numbers \ -" - -RDEPENDS:${PN}-ptest += " \ - python3-pytest \ - python3-unittest-automake-output \ -" - -do_install_ptest() { - cp -f ${S}/tests/test*.py ${D}${PTEST_PATH}/ -} diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-parse_1.20.2.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-parse_1.20.2.bb new file mode 100644 index 00000000..6e7139bf --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-parse_1.20.2.bb @@ -0,0 +1,27 @@ +SUMMARY = "Parse strings using a specification based on the Python format() syntax" +HOMEPAGE = "https://github.com/r1chardj0n3s/parse" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=8ab458ad281b60e6f1b39b3feafbfc05" + +SRC_URI[sha256sum] = "b41d604d16503c79d81af5165155c0b20f6c8d6c559efa66b4b695c3e5a0a0ce" + +SRC_URI += " \ + file://run-ptest \ +" + +inherit pypi python_setuptools_build_meta ptest + +RDEPENDS:${PN} += "\ + python3-datetime \ + python3-logging \ + python3-numbers \ +" + +RDEPENDS:${PN}-ptest += " \ + python3-pytest \ + python3-unittest-automake-output \ +" + +do_install_ptest() { + cp -f ${S}/tests/test*.py ${D}${PTEST_PATH}/ +} diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pastedeploy_3.1.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pastedeploy_3.1.0.bb index 27f32bf1..e3405939 100644 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pastedeploy_3.1.0.bb +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pastedeploy_3.1.0.bb @@ -3,19 +3,22 @@ HOMEPAGE = "https://pylonsproject.org/" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://license.txt;md5=1798f29d55080c60365e6283cb49779c" -inherit pypi +inherit pypi python_setuptools_build_meta + PYPI_PACKAGE = "PasteDeploy" SRC_URI[sha256sum] = "9ddbaf152f8095438a9fe81f82c78a6714b92ae8e066bed418b6a7ff6a095a95" -S = "${WORKDIR}/PasteDeploy-${PV}" - -inherit setuptools3 - # Uncomment this line to enable all the optional features. #PACKAGECONFIG ?= "paste docs" PACKAGECONFIG[paste] = ",,,python3-paste" PACKAGECONFIG[docs] = ",,,python3-sphinx python3-pylons-sphinx-themes" -DEPENDS= "python3 python3-setuptools-scm-native python3-pytest-runner-native" -RDEPENDS:${PN} += "python3-core python3-misc python3-netclient python3-pkgutil python3-setuptools python3-threading python3-core" +RDEPENDS:${PN} += " \ + python3-core \ + python3-misc \ + python3-netclient \ + python3-pkgutil \ + python3-setuptools \ + python3-threading \ +" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-path_16.14.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-path_16.14.0.bb deleted file mode 100644 index b4d290a2..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-path_16.14.0.bb +++ /dev/null @@ -1,34 +0,0 @@ -SUMMARY = "A module wrapper for os.path" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=141643e11c48898150daa83802dbc65f" - -SRC_URI[sha256sum] = "dbaaa7efd4602fd6ba8d82890dc7823d69e5de740a6e842d9919b0faaf2b6a8e" - -SRC_URI += "\ - file://run-ptest \ -" - -inherit pypi python_setuptools_build_meta ptest - -DEPENDS += "python3-setuptools-scm-native" - -RDEPENDS:${PN} += " \ - python3-appdirs \ - python3-crypt \ - python3-io \ - python3-numbers \ - python3-shell \ -" -RDEPENDS:${PN}-ptest += " \ - python3-pytest \ - python3-unittest-automake-output \ -" - -BBCLASSEXTEND = "nativesdk native" - -do_install_ptest() { - install -d ${D}${PTEST_PATH}/test - cp -rf ${S}/test_* ${D}${PTEST_PATH}/test/ - install -d ${D}${PTEST_PATH}/path - cp -rf ${S}/path/* ${D}${PTEST_PATH}/path/ -} diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-path_17.0.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-path_17.0.0.bb new file mode 100644 index 00000000..e8099520 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-path_17.0.0.bb @@ -0,0 +1,34 @@ +SUMMARY = "A module wrapper for os.path" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=141643e11c48898150daa83802dbc65f" + +SRC_URI[sha256sum] = "e1540261d22df1416fb1b498b3b1ed5353a371a48fe197d66611bb01e7fab2d5" + +SRC_URI += "\ + file://run-ptest \ +" + +inherit pypi python_setuptools_build_meta ptest + +DEPENDS += "python3-setuptools-scm-native" + +RDEPENDS:${PN} += " \ + python3-appdirs \ + python3-crypt \ + python3-io \ + python3-numbers \ + python3-shell \ +" +RDEPENDS:${PN}-ptest += " \ + python3-pytest \ + python3-unittest-automake-output \ +" + +BBCLASSEXTEND = "nativesdk native" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/test + cp -rf ${S}/tests/test_* ${D}${PTEST_PATH}/test/ + install -d ${D}${PTEST_PATH}/path + cp -rf ${S}/path/* ${D}${PTEST_PATH}/path/ +} diff --git a/sources/poky/meta/recipes-devtools/python/python3-pathlib2_2.3.7.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pathlib2_2.3.7.bb similarity index 100% rename from sources/poky/meta/recipes-devtools/python/python3-pathlib2_2.3.7.bb rename to sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pathlib2_2.3.7.bb diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pdm-backend_2.1.8.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pdm-backend_2.1.8.bb deleted file mode 100644 index f1f50724..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pdm-backend_2.1.8.bb +++ /dev/null @@ -1,13 +0,0 @@ -SUMMARY = "The build backend used by PDM that supports latest packaging standards" -HOMEPAGE = "https://github.com/pdm-project/pdm-backend" -LICENSE = "MIT" -SECTION = "devel/python" -LIC_FILES_CHKSUM = "file://LICENSE;md5=4a564297b3c5b629a528b92fd8ff61ea" - -SRC_URI[sha256sum] = "2487dfbd13f69d80fb4e6a08006a3ee68272833970813047dc5fcfacdfdc0151" - -inherit pypi python_setuptools_build_meta - -PYPI_PACKAGE= "pdm_backend" - -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pdm-backend_2.4.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pdm-backend_2.4.1.bb new file mode 100644 index 00000000..f2175150 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pdm-backend_2.4.1.bb @@ -0,0 +1,13 @@ +SUMMARY = "The build backend used by PDM that supports latest packaging standards" +HOMEPAGE = "https://github.com/pdm-project/pdm-backend" +LICENSE = "MIT" +SECTION = "devel/python" +LIC_FILES_CHKSUM = "file://LICENSE;md5=4a564297b3c5b629a528b92fd8ff61ea" + +SRC_URI[sha256sum] = "d6404e94a612459c5213cc63df035711244173c57441b8312a2a6f4a8c110934" + +inherit pypi python_setuptools_build_meta + +PYPI_PACKAGE= "pdm_backend" + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pdm-build-locked_0.3.3.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pdm-build-locked_0.3.3.bb new file mode 100644 index 00000000..f20f11ff --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pdm-build-locked_0.3.3.bb @@ -0,0 +1,13 @@ +SUMMARY = "pdm plugin to publish locked dependencies as optional-dependencies" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=19382cdf9c143df4f00b9caa0b60c75a" + +SRC_URI[sha256sum] = "b784135abf62b93ce0a11332ee24723a2699b7f266fddb7950a5b70c93df6214" + +inherit pypi python_setuptools_build_meta + +DEPENDS += " python3-pdm-backend-native" + +PYPI_PACKAGE = "pdm_build_locked" + +BBCLASSEXTEND += "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pdm_2.14.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pdm_2.14.0.bb deleted file mode 100644 index 011ba5b3..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pdm_2.14.0.bb +++ /dev/null @@ -1,15 +0,0 @@ -SUMMARY = "A modern Python package and dependency manager supporting the latest PEP standards" -HOMEPAGE = "https://pdm-project.org/latest/" -LICENSE = "MIT" -SECTION = "devel/python" -LIC_FILES_CHKSUM = "file://LICENSE;md5=2eb31a2cc1a758c34b499f287dd04ef2" - -SRC_URI[sha256sum] = "7ae6c4b5518085a703e0824ab10cbc3b7246b599ef07b8c4dcb2af1e42859190" - -inherit pypi python_setuptools_build_meta - -DEPENDS += " \ - python3-pdm-backend-native \ -" - -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pdm_2.19.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pdm_2.19.1.bb new file mode 100644 index 00000000..245e7601 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pdm_2.19.1.bb @@ -0,0 +1,16 @@ +SUMMARY = "A modern Python package and dependency manager supporting the latest PEP standards" +HOMEPAGE = "https://pdm-project.org/latest/" +LICENSE = "MIT" +SECTION = "devel/python" +LIC_FILES_CHKSUM = "file://LICENSE;md5=2eb31a2cc1a758c34b499f287dd04ef2" + +SRC_URI[sha256sum] = "7fe235a9cb27b7ec17b762dc85bc9ae71e0776e4b7a8b6f64203f24bb915aa2c" + +inherit pypi python_setuptools_build_meta + +DEPENDS += " \ + python3-pdm-backend-native \ + python3-pdm-build-locked-native \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pefile_2023.2.7.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pefile_2023.2.7.bb deleted file mode 100644 index 50dae7b4..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pefile_2023.2.7.bb +++ /dev/null @@ -1,16 +0,0 @@ -SUMMARY = "Python PE parsing module" -DESCRIPTION = "A multi-platform Python module to parse and work with Portable Executable (PE) files." -HOMEPAGE = "https://github.com/erocarrera/pefile" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=38066667888b01d8118ff9cc23da1873" - -inherit setuptools3 pypi ptest -SRC_URI[sha256sum] = "82e6114004b3d6911c77c3953e3838654b04511b8b66e8583db70c65998017dc" - -BBCLASSEXTEND = "native nativesdk" - -RDEPENDS:${PN} += " \ - python3-mmap \ - python3-netclient \ - python3-stringold \ -" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pillow/0001-support-cross-compiling.patch b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pillow/0001-support-cross-compiling.patch index e4ba35b8..220c4edc 100644 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pillow/0001-support-cross-compiling.patch +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pillow/0001-support-cross-compiling.patch @@ -1,4 +1,4 @@ -From cd09b6f68aa49c72e9a9bb0765e8c666238a7b7e Mon Sep 17 00:00:00 2001 +From 5b28d19d6513cc3eb3105d3f917df352283f3c5e Mon Sep 17 00:00:00 2001 From: Leon Anavi Date: Mon, 11 Jan 2021 13:25:12 +0000 Subject: [PATCH] support cross compiling @@ -12,10 +12,10 @@ Signed-off-by: Leon Anavi 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py -index cbc2641c..302bc6e7 100755 +index 0abfaaddc..557420a6b 100644 --- a/setup.py +++ b/setup.py -@@ -123,7 +123,7 @@ _LIB_IMAGING = ( +@@ -129,7 +129,7 @@ _LIB_IMAGING = ( "codec_fd", ) @@ -24,7 +24,7 @@ index cbc2641c..302bc6e7 100755 class DependencyException(Exception): -@@ -408,12 +408,12 @@ class pil_build_ext(build_ext): +@@ -508,12 +508,12 @@ class pil_build_ext(build_ext): _add_directory(library_dirs, match.group(1)) # include, rpath, if set as environment variables: @@ -39,6 +39,3 @@ index cbc2641c..302bc6e7 100755 if k in os.environ: for d in os.environ[k].split(os.path.pathsep): _add_directory(library_dirs, d) --- -2.17.1 - diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pillow_10.3.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pillow_10.3.0.bb deleted file mode 100644 index 8b0bcf55..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pillow_10.3.0.bb +++ /dev/null @@ -1,72 +0,0 @@ -DESCRIPTION = "Python Imaging Library (Fork). Pillow is the friendly PIL fork by Alex \ -Clark and Contributors. PIL is the Python Imaging Library by Fredrik Lundh and \ -Contributors." -HOMEPAGE = "https://pillow.readthedocs.io" -LICENSE = "HPND" -LIC_FILES_CHKSUM = "file://LICENSE;md5=c349a4b4b9ec2377a8fd6a7df87dbffe" - -SRC_URI = "git://github.com/python-pillow/Pillow.git;branch=main;protocol=https \ - file://0001-support-cross-compiling.patch \ - file://run-ptest \ - " -SRCREV = "5c89d88eee199ba53f64581ea39b6a1bc52feb1a" - -inherit python_setuptools_build_meta ptest - -PEP517_BUILD_OPTS += " \ - -C platform-guessing=disable \ - -C zlib=enable \ - -C jpeg=enable \ - -C tiff=enable \ - -C freetype=enable \ - -C lcms=enable \ - -C jpeg2000=enable \ - -C webp=disable \ - -C webpmux=disable \ - -C imagequant=disable \ -" - -DEPENDS += " \ - zlib \ - jpeg \ - tiff \ - freetype \ - lcms \ - openjpeg \ -" - -RDEPENDS:${PN} += " \ - python3-misc \ - python3-logging \ - python3-numbers \ - ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'libxcb', '', d)} \ -" - -RDEPENDS:${PN}-ptest += " \ - bash \ - ghostscript \ - jpeg-tools \ - libwebp \ - python3-core \ - python3-image \ - python3-mmap \ - python3-pytest \ - python3-pytest-timeout \ - python3-resource \ - python3-unittest-automake-output \ - python3-unixadmin\ - ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'tk', '', d)} \ -" - -CVE_PRODUCT = "pillow" - -S = "${WORKDIR}/git" - -RPROVIDES:${PN} += "python3-imaging" - -do_install_ptest() { - install -d ${D}${PTEST_PATH}/Tests - cp -rf ${S}/Tests ${D}${PTEST_PATH}/ -} - -BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pillow_10.4.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pillow_10.4.0.bb new file mode 100644 index 00000000..a9cb903a --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pillow_10.4.0.bb @@ -0,0 +1,73 @@ +DESCRIPTION = "Python Imaging Library (Fork). Pillow is the friendly PIL fork by Alex \ +Clark and Contributors. PIL is the Python Imaging Library by Fredrik Lundh and \ +Contributors." +HOMEPAGE = "https://pillow.readthedocs.io" +LICENSE = "HPND" +LIC_FILES_CHKSUM = "file://LICENSE;md5=c349a4b4b9ec2377a8fd6a7df87dbffe" + +SRC_URI = "git://github.com/python-pillow/Pillow.git;branch=main;protocol=https \ + file://0001-support-cross-compiling.patch \ + file://run-ptest \ + " +SRCREV = "9b4fae77178e827ab17118fbc89c739ffd6a0fab" + +inherit python_setuptools_build_meta ptest + +PEP517_BUILD_OPTS += " \ + -C platform-guessing=disable \ + -C zlib=enable \ + -C jpeg=enable \ + -C tiff=enable \ + -C freetype=enable \ + -C lcms=enable \ + -C jpeg2000=enable \ + -C webp=disable \ + -C webpmux=disable \ + -C imagequant=disable \ +" + +DEPENDS += " \ + zlib \ + jpeg \ + tiff \ + freetype \ + lcms \ + openjpeg \ +" + +RDEPENDS:${PN} += " \ + python3-misc \ + python3-logging \ + python3-numbers \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'libxcb', '', d)} \ +" +# python3-compile for filecmp module +RDEPENDS:${PN}-ptest += " \ + bash \ + ghostscript \ + jpeg-tools \ + libwebp \ + python3-compile \ + python3-core \ + python3-image \ + python3-mmap \ + python3-pytest \ + python3-pytest-timeout \ + python3-resource \ + python3-unittest-automake-output \ + python3-unixadmin\ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'tk', '', d)} \ +" + +CVE_PRODUCT = "pillow" + +S = "${WORKDIR}/git" + +RPROVIDES:${PN} += "python3-imaging" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/Tests + cp -rf ${S}/Tests ${D}${PTEST_PATH}/ +} + +BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pint/run-ptest b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pint/run-ptest index 5cec7116..8d2017d3 100644 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pint/run-ptest +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pint/run-ptest @@ -1,3 +1,3 @@ #!/bin/sh -pytest +pytest --automake diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pint_0.23.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pint_0.23.bb deleted file mode 100644 index 370cd701..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pint_0.23.bb +++ /dev/null @@ -1,41 +0,0 @@ -SUMMARY = "Physical quantities module" -DESCRIPTION = "Physical quantities Python module" -HOMEPAGE = "https://github.com/hgrecco/pint" -SECTION = "devel/python" - -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=bccf824202692270a1e0829a62e3f47b" - -PYPI_PACKAGE := "Pint" - -inherit ptest python_setuptools_build_meta - -SRCREV = "f2e4081aee38f850938048beac7fb69c4908bc5e" -SRC_URI = "git://github.com/hgrecco/pint;protocol=https;branch=master" -S = "${WORKDIR}/git" -#SRC_URI[sha256sum] = "e1509b91606dbc52527c600a4ef74ffac12fff70688aff20e9072409346ec9b4" - -DEPENDS += "python3-setuptools-scm-native" - -BBCLASSEXTEND = "native nativesdk" - -SRC_URI += " \ - file://run-ptest \ -" - -RDEPENDS:${PN} += " \ - python3-setuptools \ - python3-packaging \ -" - -RDEPENDS:${PN}-ptest += " \ - python3-appdirs \ - python3-flexcache \ - python3-flexparser \ - python3-pytest \ -" - -do_install_ptest() { - install -d ${D}${PTEST_PATH}/testsuite - cp -rf ${S}/pint/* ${D}${PTEST_PATH}/ -} diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pint_0.24.3.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pint_0.24.3.bb new file mode 100644 index 00000000..23e9fdb0 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pint_0.24.3.bb @@ -0,0 +1,44 @@ +SUMMARY = "Physical quantities module" +DESCRIPTION = "Physical quantities Python module" +HOMEPAGE = "https://github.com/hgrecco/pint" +SECTION = "devel/python" + +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=bccf824202692270a1e0829a62e3f47b" + +PYPI_PACKAGE = "pint" + +inherit pypi ptest python_setuptools_build_meta + +SRC_URI[sha256sum] = "d54771093e8b94c4e0a35ac638c2444ddf3ef685652bab7675ffecfa0c5c5cdf" + +DEPENDS += "python3-setuptools-scm-native" + +BBCLASSEXTEND = "native nativesdk" + +SRC_URI += " \ + file://run-ptest \ +" + +RDEPENDS:${PN} += " \ + python3-setuptools \ + python3-packaging \ +" +# python3-misc for timeit.py +RDEPENDS:${PN}-ptest += " \ + python3-appdirs \ + python3-attrs \ + python3-flexcache \ + python3-flexparser \ + python3-misc \ + python3-pytest \ + python3-pytest-benchmark \ + python3-pytest-subtests \ + python3-statistics \ + python3-unittest-automake-output \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/testsuite + cp -rf ${S}/pint/* ${D}${PTEST_PATH}/ +} diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-platformdirs_4.2.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-platformdirs_4.2.0.bb deleted file mode 100644 index c69c390b..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-platformdirs_4.2.0.bb +++ /dev/null @@ -1,32 +0,0 @@ -SUMMARY = "A small Python module for determining appropriate platform-specific dirs" -HOMEPAGE = "https://github.com/platformdirs/platformdirs" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=ea4f5a41454746a9ed111e3d8723d17a" - -SRC_URI += " \ - file://run-ptest \ -" - -SRC_URI[sha256sum] = "ef0cc731df711022c174543cb70a9b5bd22e5a9337c8624ef2c2ceb8ddad8768" - -inherit pypi python_hatchling ptest - -DEPENDS += " \ - python3-hatch-vcs-native \ -" - -RDEPENDS:${PN}-ptest += " \ - python3-appdirs \ - python3-covdefaults \ - python3-pytest \ - python3-pytest-cov \ - python3-pytest-mock \ - python3-unittest-automake-output \ -" - -do_install_ptest() { - install -d ${D}${PTEST_PATH} - cp -rf ${S}/tests ${D}${PTEST_PATH}/ -} - -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-platformdirs_4.3.6.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-platformdirs_4.3.6.bb new file mode 100644 index 00000000..02d8c3ce --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-platformdirs_4.3.6.bb @@ -0,0 +1,32 @@ +SUMMARY = "A small Python module for determining appropriate platform-specific dirs" +HOMEPAGE = "https://github.com/platformdirs/platformdirs" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ea4f5a41454746a9ed111e3d8723d17a" + +SRC_URI += " \ + file://run-ptest \ +" + +SRC_URI[sha256sum] = "357fb2acbc885b0419afd3ce3ed34564c13c9b95c89360cd9563f73aa5e2b907" + +inherit pypi python_hatchling ptest + +DEPENDS += " \ + python3-hatch-vcs-native \ +" + +RDEPENDS:${PN}-ptest += " \ + python3-appdirs \ + python3-covdefaults \ + python3-pytest \ + python3-pytest-cov \ + python3-pytest-mock \ + python3-unittest-automake-output \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH} + cp -rf ${S}/tests ${D}${PTEST_PATH}/ +} + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-portion_2.4.2.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-portion_2.4.2.bb index 3af94b48..a5e26f30 100644 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-portion_2.4.2.bb +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-portion_2.4.2.bb @@ -5,7 +5,7 @@ SECTION = "devel/python" LICENSE = "LGPL-3.0-only" LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=05f1e16a8e59ce3e9a979e881816c2ab" -inherit pypi setuptools3 +inherit pypi python_setuptools_build_meta SRC_URI[sha256sum] = "5289b40d98959b16b3f6927781678935d3df1b7c14947f5d7778e5e04dd9a065" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-posix-ipc/0001-build_support-use-source-filename-instead-of-foo-for.patch b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-posix-ipc/0001-build_support-use-source-filename-instead-of-foo-for.patch deleted file mode 100644 index 8bb72670..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-posix-ipc/0001-build_support-use-source-filename-instead-of-foo-for.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 09cfcf7de2aab873a13949d5a128ccfb9e54732d Mon Sep 17 00:00:00 2001 -From: Martin Jansa -Date: Mon, 5 May 2025 08:15:37 +0200 -Subject: [PATCH] build_support: use source filename instead of 'foo' for - discover tests - -* helps when debugging the issues -* use the same order of CC arguments in compile_and_run and - does_build_succeed just for consistency -* use pthread in both compile_and_run and does_build_succeed functions - it was added only to does_build_succeed in 5ec39f7af8cfd8525d225b1302fa93f7133b3849 - not sure if it was intentional - -Signed-off-by: Martin Jansa -Upstream-Status: Submitted [https://github.com/osvenskan/posix_ipc/pull/77] ---- - build_support/discover_system_info.py | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/build_support/discover_system_info.py b/build_support/discover_system_info.py -index bc4d174..6d059d9 100644 ---- a/build_support/discover_system_info.py -+++ b/build_support/discover_system_info.py -@@ -60,7 +60,7 @@ def does_build_succeed(filename, linker_options=""): - # Rather than testing whether or not it's needed, I just specify it - # everywhere since it's harmless to specify it when it's not needed. - cc = os.getenv("CC", "cc") -- cmd = "%s -Wall -o ./build_support/src/foo ./build_support/src/%s %s -lpthread" % (cc, filename, linker_options) -+ cmd = "%s -Wall -o ./build_support/src/%s ./build_support/src/%s %s -lpthread" % (cc, filename[:-2], filename, linker_options) - - p = subprocess.Popen(cmd, shell=True, stdout=STDOUT, stderr=STDERR) - -@@ -73,7 +73,7 @@ def compile_and_run(filename, linker_options=""): - # Utility function that returns the stdout output from running the - # compiled source file; None if the compile fails. - cc = os.getenv("CC", "cc") -- cmd = "%s -Wall -o ./build_support/src/foo %s ./build_support/src/%s" % (cc, linker_options, filename) -+ cmd = "%s -Wall -o ./build_support/src/%s ./build_support/src/%s %s -lpthread" % (cc, filename[:-2], filename, linker_options) - - p = subprocess.Popen(cmd, shell=True, stdout=STDOUT, stderr=STDERR) - -@@ -82,7 +82,7 @@ def compile_and_run(filename, linker_options=""): - return None - - try: -- s = subprocess.Popen(["./build_support/src/foo"], -+ s = subprocess.Popen(["./build_support/src/%s" % filename[:-2]], - stdout=subprocess.PIPE).communicate()[0] - return s.strip().decode() - except Exception: diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-posix-ipc/0002-build_support-handle-empty-max_priority-value-as-Non.patch b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-posix-ipc/0002-build_support-handle-empty-max_priority-value-as-Non.patch deleted file mode 100644 index 54c8ddab..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-posix-ipc/0002-build_support-handle-empty-max_priority-value-as-Non.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 8fc46d871639dbe799f6ff0a61b046412ef5dcc6 Mon Sep 17 00:00:00 2001 -From: Martin Jansa -Date: Mon, 5 May 2025 08:16:30 +0200 -Subject: [PATCH] build_support: handle empty max_priority value as None -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -When cross-compiling these tests they fail when the host cannot execute -the binaries built for target. - -On my local ubuntu-22.04 docker container running -build_support/src/sniff_mq_prio_max results in: -posix_ipc-1.2.0 $ ./build_support/src/foo -bash: ./build_support/src/foo: cannot execute binary file: Exec format error -which triggers the Exception in compile_and_run and returns None - -While on some other ubuntu-22.04 containers I see: -posix_ipc-1.2.0$ ./build_support/src/sniff_mq_prio_max -/usr/lib/ld-linux-aarch64.so.1: No such file or directory - -and the compile_and_run returns -b'' -which then causes -posix_ipc-1.2.0/build_support/discover_system_info.py", line 244, in sniff_mq_prio_max -    if max_priority < 0: -       ^^^^^^^^^^^^^^^^ - -Handle the empty value the same as None to avoid this. - -Signed-off-by: Martin Jansa -Upstream-Status: Submitted [https://github.com/osvenskan/posix_ipc/pull/77] ---- - build_support/discover_system_info.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/build_support/discover_system_info.py b/build_support/discover_system_info.py -index 6d059d9..f8a3c83 100644 ---- a/build_support/discover_system_info.py -+++ b/build_support/discover_system_info.py -@@ -223,7 +223,7 @@ def sniff_mq_prio_max(): - except ValueError: - max_priority = None - -- if max_priority is None: -+ if not max_priority: - # Looking for a #define didn't work; ask sysconf() instead. - # Note that sys.sysconf_names doesn't exist under Cygwin. - if hasattr(os, "sysconf_names") and \ diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-posix-ipc/0003-build_support-use-does_build_succeed-in-compile_and_.patch b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-posix-ipc/0003-build_support-use-does_build_succeed-in-compile_and_.patch deleted file mode 100644 index b36d1cdb..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-posix-ipc/0003-build_support-use-does_build_succeed-in-compile_and_.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 760374e778fc28193cfea1416a739e206f9201c6 Mon Sep 17 00:00:00 2001 -From: Martin Jansa -Date: Mon, 5 May 2025 08:28:56 +0200 -Subject: [PATCH] build_support: use does_build_succeed in compile_and_run - -* avoid the duplication and building the sniff_mq_prio_max.c twice - -Signed-off-by: Martin Jansa -Upstream-Status: Submitted [https://github.com/osvenskan/posix_ipc/pull/77] ---- - build_support/discover_system_info.py | 27 ++++++++++----------------- - 1 file changed, 10 insertions(+), 17 deletions(-) - -diff --git a/build_support/discover_system_info.py b/build_support/discover_system_info.py -index f8a3c83..f6e6c8c 100644 ---- a/build_support/discover_system_info.py -+++ b/build_support/discover_system_info.py -@@ -72,22 +72,17 @@ def does_build_succeed(filename, linker_options=""): - def compile_and_run(filename, linker_options=""): - # Utility function that returns the stdout output from running the - # compiled source file; None if the compile fails. -- cc = os.getenv("CC", "cc") -- cmd = "%s -Wall -o ./build_support/src/%s ./build_support/src/%s %s -lpthread" % (cc, filename[:-2], filename, linker_options) -- -- p = subprocess.Popen(cmd, shell=True, stdout=STDOUT, stderr=STDERR) -- -- if p.wait(): -+ if does_build_succeed(filename, linker_options=""): -+ try: -+ s = subprocess.Popen(["./build_support/src/%s" % filename[:-2]], -+ stdout=subprocess.PIPE).communicate()[0] -+ return s.strip().decode() -+ except Exception: -+ # execution resulted in an error -+ return None -+ else: - # uh-oh, compile failed - return None -- -- try: -- s = subprocess.Popen(["./build_support/src/%s" % filename[:-2]], -- stdout=subprocess.PIPE).communicate()[0] -- return s.strip().decode() -- except Exception: -- # execution resulted in an error -- return None - - - def get_sysctl_value(name): -@@ -211,11 +206,9 @@ def sniff_mq_prio_max(): - # ref: http://www.opengroup.org/onlinepubs/009695399/basedefs/limits.h.html - DEFAULT_PRIORITY_MAX = 32 - -- max_priority = None - # OS X up to and including 10.8 doesn't support POSIX messages queues and - # doesn't define MQ_PRIO_MAX. Maybe this aggravation will cease in 10.9? -- if does_build_succeed("sniff_mq_prio_max.c"): -- max_priority = compile_and_run("sniff_mq_prio_max.c") -+ max_priority = compile_and_run("sniff_mq_prio_max.c") - - if max_priority: - try: diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-posix-ipc_1.1.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-posix-ipc_1.1.1.bb new file mode 100644 index 00000000..a7118739 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-posix-ipc_1.1.1.bb @@ -0,0 +1,11 @@ +DESCRIPTION = "POSIX IPC primitives (semaphores, shared memory and message queues) for Python" +HOMEPAGE = "http://semanchuk.com/philip/posix_ipc/" +SECTION = "devel/python" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=513d94a7390d4d72f3475e2d45c739b5" + +PYPI_PACKAGE = "posix_ipc" + +SRC_URI[sha256sum] = "e2456ba0cfb2ee5ba14121450e8d825b3c4a1461fca0761220aab66d4111cbb7" + +inherit setuptools3 pypi diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-posix-ipc_1.2.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-posix-ipc_1.2.0.bb deleted file mode 100644 index 8147e410..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-posix-ipc_1.2.0.bb +++ /dev/null @@ -1,16 +0,0 @@ -DESCRIPTION = "POSIX IPC primitives (semaphores, shared memory and message queues) for Python" -HOMEPAGE = "http://semanchuk.com/philip/posix_ipc/" -SECTION = "devel/python" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=1a4f3bd729df04bf68f66ef877e9c7c9" - -PYPI_PACKAGE = "posix_ipc" - -SRC_URI[sha256sum] = "b7444e2703c156b3cb9fcb568e85d716232f3e78f04529ebc881cfb2aedb3838" - -SRC_URI += " \ - file://0001-build_support-use-source-filename-instead-of-foo-for.patch \ - file://0002-build_support-handle-empty-max_priority-value-as-Non.patch \ - file://0003-build_support-use-does_build_succeed-in-compile_and_.patch \ -" -inherit pypi python_setuptools_build_meta diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-prettytable_3.10.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-prettytable_3.10.0.bb deleted file mode 100644 index 35e9ab17..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-prettytable_3.10.0.bb +++ /dev/null @@ -1,45 +0,0 @@ -SUMMARY = "Python library for displaying tabular data in a ASCII table format" -HOMEPAGE = "http://code.google.com/p/prettytable" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=c9a6829fcd174d9535b46211917c7671" - - -SRC_URI[sha256sum] = "9665594d137fb08a1117518c25551e0ede1687197cf353a4fdc78d27e1073568" -SRC_URI += " \ - file://run-ptest \ -" -inherit pypi ptest python_hatchling - -do_install:append() { - perm_files=`find "${D}${PYTHON_SITEPACKAGES_DIR}/" -name "*.txt" -o -name "PKG-INFO"` - for f in $perm_files; do - chmod 644 "${f}" - done -} - -DEPENDS += "\ - python3-hatch-vcs-native \ -" - -RDEPENDS:${PN} += " \ - python3-compression \ - python3-html \ - python3-importlib-metadata \ - python3-json \ - python3-math \ - python3-wcwidth \ -" - -RDEPENDS:${PN}-ptest += " \ - python3-pytest \ - python3-pytest-lazy-fixtures \ - python3-sqlite3 \ - python3-unittest-automake-output \ -" - -do_install_ptest() { - install -d ${D}${PTEST_PATH}/tests - cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ -} - -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-prettytable_3.11.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-prettytable_3.11.0.bb new file mode 100644 index 00000000..df11141a --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-prettytable_3.11.0.bb @@ -0,0 +1,45 @@ +SUMMARY = "Python library for displaying tabular data in a ASCII table format" +HOMEPAGE = "http://code.google.com/p/prettytable" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=c9a6829fcd174d9535b46211917c7671" + + +SRC_URI[sha256sum] = "7e23ca1e68bbfd06ba8de98bf553bf3493264c96d5e8a615c0471025deeba722" +SRC_URI += " \ + file://run-ptest \ +" +inherit pypi ptest python_hatchling + +do_install:append() { + perm_files=`find "${D}${PYTHON_SITEPACKAGES_DIR}/" -name "*.txt" -o -name "PKG-INFO"` + for f in $perm_files; do + chmod 644 "${f}" + done +} + +DEPENDS += "\ + python3-hatch-vcs-native \ +" + +RDEPENDS:${PN} += " \ + python3-compression \ + python3-html \ + python3-importlib-metadata \ + python3-json \ + python3-math \ + python3-wcwidth \ +" + +RDEPENDS:${PN}-ptest += " \ + python3-pytest \ + python3-pytest-lazy-fixtures \ + python3-sqlite3 \ + python3-unittest-automake-output \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ +} + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-prompt-toolkit_3.0.43.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-prompt-toolkit_3.0.43.bb deleted file mode 100644 index 8b3b7097..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-prompt-toolkit_3.0.43.bb +++ /dev/null @@ -1,25 +0,0 @@ -SUMMARY = "Library for building powerful interactive command lines in Python" -HOMEPAGE = "https://python-prompt-toolkit.readthedocs.io/" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=b2cde7da89f0c1f3e49bf968d00d554f" - -SRC_URI[sha256sum] = "3527b7af26106cbc65a040bcc84839a3566ec1b051bb0bfe953631e704b0ff7d" - -inherit pypi setuptools3 - -PYPI_PACKAGE = "prompt_toolkit" - -RDEPENDS:${PN} += " \ - python3-core \ - python3-six \ - python3-terminal \ - python3-threading \ - python3-wcwidth \ - python3-datetime \ - python3-shell \ - python3-image \ - python3-asyncio \ - python3-xml \ -" - -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-prompt-toolkit_3.0.47.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-prompt-toolkit_3.0.47.bb new file mode 100644 index 00000000..9997785d --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-prompt-toolkit_3.0.47.bb @@ -0,0 +1,25 @@ +SUMMARY = "Library for building powerful interactive command lines in Python" +HOMEPAGE = "https://python-prompt-toolkit.readthedocs.io/" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=b2cde7da89f0c1f3e49bf968d00d554f" + +SRC_URI[sha256sum] = "1e1b29cb58080b1e69f207c893a1a7bf16d127a5c30c9d17a25a5d77792e5360" + +inherit pypi setuptools3 + +PYPI_PACKAGE = "prompt_toolkit" + +RDEPENDS:${PN} += " \ + python3-core \ + python3-six \ + python3-terminal \ + python3-threading \ + python3-wcwidth \ + python3-datetime \ + python3-shell \ + python3-image \ + python3-asyncio \ + python3-xml \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-protobuf_4.25.3.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-protobuf_4.25.3.bb new file mode 100644 index 00000000..c7e1f3c3 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-protobuf_4.25.3.bb @@ -0,0 +1,46 @@ +DESCRIPTION = "Protocol Buffers" +HOMEPAGE = "https://developers.google.com/protocol-buffers/" +SECTION = "devel/python" + +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=53dbfa56f61b90215a9f8f0d527c043d" + +inherit pypi setuptools3 +SRC_URI[sha256sum] = "25b5d0b42fd000320bd7830b349e3b696435f3b329810427a6bcce6a5492cc5c" + +# http://errors.yoctoproject.org/Errors/Details/184715/ +# Can't find required file: ../src/google/protobuf/descriptor.proto +CLEANBROKEN = "1" + +UPSTREAM_CHECK_REGEX = "protobuf/(?P\d+(\.\d+)+)/" + +DEPENDS += "protobuf" + +RDEPENDS:${PN} += " \ + python3-ctypes \ + python3-datetime \ + python3-json \ + python3-logging \ + python3-netclient \ + python3-numbers \ + python3-pkgutil \ + python3-unittest \ +" + +# For usage in other recipies when compiling protobuf files (e.g. by grpcio-tools) +BBCLASSEXTEND = "native nativesdk" + +DISTUTILS_BUILD_ARGS += "--cpp_implementation" +DISTUTILS_INSTALL_ARGS += "--cpp_implementation" + +do_compile:prepend:class-native () { + export KOKORO_BUILD_NUMBER="1" +} + +do_install:append () { + # Remove useless and problematic .pth file. python3-protobuf is installed in the standard + # location of site packages. No need for such .pth file. + # NOTE: do not drop this removal until the following issue in upstream cpython is resolved: + # https://github.com/python/cpython/issues/122220 + rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/protobuf-*-nspkg.pth +} diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-protobuf_4.25.8.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-protobuf_4.25.8.bb deleted file mode 100644 index aca30efd..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-protobuf_4.25.8.bb +++ /dev/null @@ -1,45 +0,0 @@ -DESCRIPTION = "Protocol Buffers" -HOMEPAGE = "https://developers.google.com/protocol-buffers/" -SECTION = "devel/python" - -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=53dbfa56f61b90215a9f8f0d527c043d" - -inherit pypi setuptools3 -SRC_URI[sha256sum] = "6135cf8affe1fc6f76cced2641e4ea8d3e59518d1f24ae41ba97bcad82d397cd" - -# http://errors.yoctoproject.org/Errors/Details/184715/ -# Can't find required file: ../src/google/protobuf/descriptor.proto -CLEANBROKEN = "1" - -UPSTREAM_CHECK_REGEX = "protobuf/(?P\d+(\.\d+)+)/" - -DEPENDS += "protobuf" - -RDEPENDS:${PN} += " \ - python3-datetime \ - python3-json \ - python3-logging \ - python3-netclient \ - python3-numbers \ - python3-pkgutil \ - python3-unittest \ -" - -# For usage in other recipies when compiling protobuf files (e.g. by grpcio-tools) -BBCLASSEXTEND = "native nativesdk" - -DISTUTILS_BUILD_ARGS += "--cpp_implementation" -DISTUTILS_INSTALL_ARGS += "--cpp_implementation" - -do_compile:prepend:class-native () { - export KOKORO_BUILD_NUMBER="1" -} - -do_install:append () { - # Remove useless and problematic .pth file. python3-protobuf is installed in the standard - # location of site packages. No need for such .pth file. - # NOTE: do not drop this removal until the following issue in upstream cpython is resolved: - # https://github.com/python/cpython/issues/122220 - rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/protobuf-*-nspkg.pth -} diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pulsectl_24.4.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pulsectl_24.4.0.bb deleted file mode 100644 index 3bc15bb0..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pulsectl_24.4.0.bb +++ /dev/null @@ -1,13 +0,0 @@ -SUMMARY = "Python (3.x and 2.x) high-level interface and ctypes-based bindings for PulseAudio (libpulse), mostly focused on mixer-like controls and introspection-related operations (as opposed to e.g. submitting sound samples to play, player-like client)." -HOMEPAGE = "https://github.com/mk-fg/python-pulse-control" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://COPYING;md5=f1d10048469ff90123263eb5e214061d" - -SRC_URI[sha256sum] = "697ed50e7d452e78678ae38e2ab935843008bec448955283cd0fb362867e3165" - -RDEPENDS:${PN} += " \ - libpulse \ - python3-ctypes \ -" - -inherit pypi setuptools3 diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pulsectl_24.8.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pulsectl_24.8.0.bb new file mode 100644 index 00000000..580d41d0 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pulsectl_24.8.0.bb @@ -0,0 +1,13 @@ +SUMMARY = "Python (3.x and 2.x) high-level interface and ctypes-based bindings for PulseAudio (libpulse), mostly focused on mixer-like controls and introspection-related operations (as opposed to e.g. submitting sound samples to play, player-like client)." +HOMEPAGE = "https://github.com/mk-fg/python-pulse-control" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=f1d10048469ff90123263eb5e214061d" + +SRC_URI[sha256sum] = "b051506d0d73d3cc4357cefd3de17bb859d7ecf004e994b0f7cfa87851bc7156" + +RDEPENDS:${PN} += " \ + libpulse \ + python3-ctypes \ +" + +inherit pypi setuptools3 diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pure-eval_0.2.2.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pure-eval_0.2.2.bb deleted file mode 100644 index 66e4673a..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pure-eval_0.2.2.bb +++ /dev/null @@ -1,16 +0,0 @@ -SUMMARY = "Safely evaluate AST nodes without side effects" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=a3d6c15f7859ae235a78f2758e5a48cf" - -DEPENDS = "python3-setuptools-scm-native" - -PYPI_PACKAGE = "pure_eval" - -inherit pypi python_setuptools_build_meta - -SRC_URI[sha256sum] = "2b45320af6dfaa1750f543d714b6d1c520a1688dec6fd24d339063ce0aaa9ac3" - -RDEPENDS:${PN} += " \ - python3-datetime \ - python3-numbers \ -" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pure-eval_0.2.3.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pure-eval_0.2.3.bb new file mode 100644 index 00000000..f52b235e --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pure-eval_0.2.3.bb @@ -0,0 +1,16 @@ +SUMMARY = "Safely evaluate AST nodes without side effects" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=a3d6c15f7859ae235a78f2758e5a48cf" + +DEPENDS = "python3-setuptools-scm-native" + +PYPI_PACKAGE = "pure_eval" + +inherit pypi python_setuptools_build_meta + +SRC_URI[sha256sum] = "5f4e983f40564c576c7c8635ae88db5956bb2229d7e9237d03b3c0b0190eaf42" + +RDEPENDS:${PN} += " \ + python3-datetime \ + python3-numbers \ +" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-py-cpuinfo_9.0.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-py-cpuinfo_9.0.0.bb index 857afd1d..2d59a99b 100644 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-py-cpuinfo_9.0.0.bb +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-py-cpuinfo_9.0.0.bb @@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=d2379ecb0d7a8299101b1e4c160cd1f7" SRC_URI[sha256sum] = "3cdbbf3fac90dc6f118bfd64384f309edeadd902d7c8fb17f02ffa1fc3f49690" -inherit ptest pypi setuptools3 +inherit ptest pypi python_setuptools_build_meta SRC_URI += "file://run-ptest \ file://0001-test_cli.py-disable.patch \ @@ -27,6 +27,7 @@ do_install_ptest() { } RDEPENDS:${PN}-ptest += "\ + python3-compile \ python3-pytest \ python3-unittest-automake-output \ " diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-py7zr_0.20.8.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-py7zr_0.20.8.bb deleted file mode 100644 index 3d48b511..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-py7zr_0.20.8.bb +++ /dev/null @@ -1,29 +0,0 @@ -SUMMARY = "Pure Python 7-zip library" -HOMEPAGE = "https://py7zr.readthedocs.io/en/latest/" -LICENSE = "LGPL-2.1-or-later" -SECTION = "devel/python" -LIC_FILES_CHKSUM = "file://LICENSE;md5=4fbd65380cdd255951079008b364516c" - -SRC_URI[sha256sum] = "2a6b0db0441e63a2dd74cbd18f5d9ae7e08dc0e54685aa486361d0db6a0b4f78" - -inherit pypi python_setuptools_build_meta - -DEPENDS += " \ - python3-setuptools-scm-native \ - python3-toml-native \ - python3-wheel-native \ -" - -RDEPENDS:${PN} += "\ - python3-pycryptodomex \ - python3-multivolumefile \ - python3-pybcj \ - python3-inflate64 \ - python3-pyppmd \ - python3-pyzstd \ - python3-brotli \ - python3-multiprocessing \ - python3-datetime \ - python3-core \ - python3-threading \ -" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-py7zr_0.22.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-py7zr_0.22.0.bb new file mode 100644 index 00000000..c5cf1e83 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-py7zr_0.22.0.bb @@ -0,0 +1,29 @@ +SUMMARY = "Pure Python 7-zip library" +HOMEPAGE = "https://py7zr.readthedocs.io/en/latest/" +LICENSE = "LGPL-2.1-or-later" +SECTION = "devel/python" +LIC_FILES_CHKSUM = "file://LICENSE;md5=4fbd65380cdd255951079008b364516c" + +SRC_URI[sha256sum] = "c6c7aea5913535184003b73938490f9a4d8418598e533f9ca991d3b8e45a139e" + +inherit pypi python_setuptools_build_meta + +DEPENDS += " \ + python3-setuptools-scm-native \ + python3-toml-native \ + python3-wheel-native \ +" + +RDEPENDS:${PN} += "\ + python3-pycryptodomex \ + python3-multivolumefile \ + python3-pybcj \ + python3-inflate64 \ + python3-pyppmd \ + python3-pyzstd \ + python3-brotli \ + python3-multiprocessing \ + python3-datetime \ + python3-core \ + python3-threading \ +" diff --git a/sources/poky/meta/recipes-devtools/python/python3-py_1.11.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-py_1.11.0.bb similarity index 100% rename from sources/poky/meta/recipes-devtools/python/python3-py_1.11.0.bb rename to sources/meta-openembedded/meta-python/recipes-devtools/python/python3-py_1.11.0.bb diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyalsaaudio_0.10.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyalsaaudio_0.10.0.bb deleted file mode 100644 index 8b22faad..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyalsaaudio_0.10.0.bb +++ /dev/null @@ -1,12 +0,0 @@ -SUMMARY = "ALSA bindings" -SECTION = "devel/python" -LICENSE = "PSF-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=1a3b161aa0fcec32a0c8907a2219ad9d" - -inherit pypi setuptools3 - -SRC_URI[sha256sum] = "e21175500a2bd310ae3867e7991639defc1e2a5c92cf1b9f7083296b346738ab" - -DEPENDS += "alsa-lib" - -RDEPENDS:${PN} += "libasound" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyalsaaudio_0.11.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyalsaaudio_0.11.0.bb new file mode 100644 index 00000000..8917c886 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyalsaaudio_0.11.0.bb @@ -0,0 +1,12 @@ +SUMMARY = "ALSA bindings" +SECTION = "devel/python" +LICENSE = "PSF-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=1a3b161aa0fcec32a0c8907a2219ad9d" + +inherit pypi setuptools3 + +SRC_URI[sha256sum] = "a78a9dca33524b2c9064b34e21f5ab874272313cf324a9a77592f396a5e0fddc" + +DEPENDS += "alsa-lib" + +RDEPENDS:${PN} += "libasound" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyasn1-modules_0.4.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyasn1-modules_0.4.0.bb deleted file mode 100644 index 34f3639e..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyasn1-modules_0.4.0.bb +++ /dev/null @@ -1,31 +0,0 @@ -SUMMARY = "A collection of ASN.1-based protocols modules." -DESCRIPTION = "A collection of ASN.1 modules expressed in form of pyasn1\ - classes. Includes protocols PDUs definition (SNMP, LDAP etc.) and various\ - data structures (X.509, PKCS etc.)." -HOMEPAGE = "https://github.com/etingof/pyasn1-modules" -LICENSE = "BSD-2-Clause" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=190f79253908c986e6cacf380c3a5f6d" - -SRC_URI[sha256sum] = "831dbcea1b177b28c9baddf4c6d1013c24c3accd14a1873fffaa6a2e905f17b6" - -PYPI_PACKAGE = "pyasn1_modules" - -inherit pypi ptest setuptools3 - -RDEPENDS:${PN} = "python3-pyasn1" - -BBCLASSEXTEND = "native nativesdk" - -SRC_URI += " \ - file://run-ptest \ -" - -RDEPENDS:${PN}-ptest += " \ - python3-pytest \ - python3-unittest-automake-output \ -" - -do_install_ptest() { - install -d ${D}${PTEST_PATH}/tests - cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ -} diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyasn1-modules_0.4.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyasn1-modules_0.4.1.bb new file mode 100644 index 00000000..e8c0f960 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyasn1-modules_0.4.1.bb @@ -0,0 +1,31 @@ +SUMMARY = "A collection of ASN.1-based protocols modules." +DESCRIPTION = "A collection of ASN.1 modules expressed in form of pyasn1\ + classes. Includes protocols PDUs definition (SNMP, LDAP etc.) and various\ + data structures (X.509, PKCS etc.)." +HOMEPAGE = "https://github.com/etingof/pyasn1-modules" +LICENSE = "BSD-2-Clause" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=190f79253908c986e6cacf380c3a5f6d" + +SRC_URI[sha256sum] = "c28e2dbf9c06ad61c71a075c7e0f9fd0f1b0bb2d2ad4377f240d33ac2ab60a7c" + +PYPI_PACKAGE = "pyasn1_modules" + +inherit pypi ptest python_setuptools_build_meta + +RDEPENDS:${PN} = "python3-pyasn1" + +BBCLASSEXTEND = "native nativesdk" + +SRC_URI += " \ + file://run-ptest \ +" + +RDEPENDS:${PN}-ptest += " \ + python3-pytest \ + python3-unittest-automake-output \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ +} diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyaudio_0.2.14.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyaudio_0.2.14.bb index 1599ea83..6a325dbe 100644 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyaudio_0.2.14.bb +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyaudio_0.2.14.bb @@ -7,7 +7,7 @@ PYPI_PACKAGE = "PyAudio" SRC_URI[sha256sum] = "78dfff3879b4994d1f4fc6485646a57755c6ee3c19647a491f790a0895bd2f87" -inherit pypi setuptools3 +inherit pypi python_setuptools_build_meta SRC_URI += "file://0001-Remove-absolute-paths-into-build-machine-system-dirs.patch" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pybind11-json_0.2.13.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pybind11-json_0.2.13.bb deleted file mode 100644 index 67bd2a33..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pybind11-json_0.2.13.bb +++ /dev/null @@ -1,12 +0,0 @@ -SUMMARY = "Using nlohmann::json with pybind11" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=0e25ff0ec476d06d366439e1120cce98" - -SRCREV = "b02a2ad597d224c3faee1f05a56d81d4c4453092" -SRC_URI = "git://github.com/pybind/pybind11_json;branch=master;protocol=https" - -DEPENDS += "nlohmann-json python3-pybind11" - -S = "${WORKDIR}/git" - -inherit cmake diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pybind11-json_0.2.14.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pybind11-json_0.2.14.bb new file mode 100644 index 00000000..8211e06d --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pybind11-json_0.2.14.bb @@ -0,0 +1,12 @@ +SUMMARY = "Using nlohmann::json with pybind11" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=0e25ff0ec476d06d366439e1120cce98" + +SRCREV = "1399451fde59f4d931c72213f209b3e83a07290b" +SRC_URI = "git://github.com/pybind/pybind11_json;branch=master;protocol=https" + +DEPENDS += "nlohmann-json python3-pybind11" + +S = "${WORKDIR}/git" + +inherit cmake diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pybind11/0001-Do-not-strip-binaries.patch b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pybind11/0001-Do-not-strip-binaries.patch deleted file mode 100644 index 91575d27..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pybind11/0001-Do-not-strip-binaries.patch +++ /dev/null @@ -1,54 +0,0 @@ -From debd676cd94f92a30b3be45f1245aa13d8c398c0 Mon Sep 17 00:00:00 2001 -From: Philip Balister -Date: Wed, 8 Jul 2020 09:41:43 -0400 -Subject: [PATCH] Do not strip binaries. - - * OpenEmbedded strips them after creating debug packages. - -Signed-off-by: Philip Balister -Signed-off-by: Leon Anavi - -Upstream-Status: Pending ---- - tools/pybind11NewTools.cmake | 7 ------- - tools/pybind11Tools.cmake | 6 ------ - 2 files changed, 13 deletions(-) - -diff --git a/tools/pybind11NewTools.cmake b/tools/pybind11NewTools.cmake -index 7d7424a7..accd90c4 100644 ---- a/tools/pybind11NewTools.cmake -+++ b/tools/pybind11NewTools.cmake -@@ -233,13 +233,6 @@ function(pybind11_add_module target_name) - endif() - endif() - -- # Use case-insensitive comparison to match the result of $ -- string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE) -- if(NOT MSVC AND NOT "${uppercase_CMAKE_BUILD_TYPE}" MATCHES DEBUG|RELWITHDEBINFO) -- # Strip unnecessary sections of the binary on Linux/macOS -- pybind11_strip(${target_name}) -- endif() -- - if(MSVC) - target_link_libraries(${target_name} PRIVATE pybind11::windows_extras) - endif() -diff --git a/tools/pybind11Tools.cmake b/tools/pybind11Tools.cmake -index 66ad00a4..855ede41 100644 ---- a/tools/pybind11Tools.cmake -+++ b/tools/pybind11Tools.cmake -@@ -212,12 +212,6 @@ function(pybind11_add_module target_name) - endif() - endif() - -- # Use case-insensitive comparison to match the result of $ -- string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE) -- if(NOT MSVC AND NOT "${uppercase_CMAKE_BUILD_TYPE}" MATCHES DEBUG|RELWITHDEBINFO) -- pybind11_strip(${target_name}) -- endif() -- - if(MSVC) - target_link_libraries(${target_name} PRIVATE pybind11::windows_extras) - endif() --- -2.39.2 - diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pybind11_2.11.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pybind11_2.11.1.bb deleted file mode 100644 index 78662fe3..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pybind11_2.11.1.bb +++ /dev/null @@ -1,34 +0,0 @@ -SUMMARY = "Seamless operability between C++11 and Python" -HOMEPAGE = "https://github.com/pybind/pybind11" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=774f65abd8a7fe3124be2cdf766cd06f" -DEPENDS = "\ - python3-cmake-native \ - python3-ninja-native \ -" - -SRCREV = "8a099e44b3d5f85b20f05828d919d2332a8de841" -SRC_URI = "\ - git://github.com/pybind/pybind11.git;branch=stable;protocol=https \ - file://0001-Do-not-strip-binaries.patch \ -" - -S = "${WORKDIR}/git" - -inherit cmake python_setuptools_build_meta - -EXTRA_OECMAKE = "-DPYBIND11_TEST=OFF" - -do_configure:append() { - cmake_do_configure -} - -do_compile:append() { - cmake_do_compile -} - -do_install:append() { - cmake_do_install -} - -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pybind11_2.12.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pybind11_2.12.0.bb new file mode 100644 index 00000000..0403e406 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pybind11_2.12.0.bb @@ -0,0 +1,33 @@ +SUMMARY = "Seamless operability between C++11 and Python" +HOMEPAGE = "https://github.com/pybind/pybind11" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=774f65abd8a7fe3124be2cdf766cd06f" +DEPENDS = "\ + python3-cmake-native \ + python3-ninja-native \ +" + +SRCREV = "3e9dfa2866941655c56877882565e7577de6fc7b" +SRC_URI = "\ + git://github.com/pybind/pybind11.git;branch=stable;protocol=https \ +" + +S = "${WORKDIR}/git" + +inherit cmake python_setuptools_build_meta + +EXTRA_OECMAKE = "-DPYBIND11_TEST=OFF" + +do_configure:append() { + cmake_do_configure +} + +do_compile:append() { + cmake_do_compile +} + +do_install:append() { + cmake_do_install +} + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pycares_4.4.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pycares_4.4.0.bb index b6b0de88..13ccaf99 100644 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pycares_4.4.0.bb +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pycares_4.4.0.bb @@ -10,7 +10,7 @@ SRC_URI[sha256sum] = "f47579d508f2f56eddd16ce72045782ad3b1b3b678098699e2b6a1b307 PYPI_PACKAGE = "pycares" -inherit pypi setuptools3 +inherit pypi python_setuptools_build_meta DEPENDS += "python3-cffi-native" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pycocotools/0001-downgrade-numpy-version-to-1.26.4.patch b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pycocotools/0001-downgrade-numpy-version-to-1.26.4.patch new file mode 100644 index 00000000..cd3e462d --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pycocotools/0001-downgrade-numpy-version-to-1.26.4.patch @@ -0,0 +1,26 @@ +From 7222a8b9b6e05b89116ca14644aa8db79eecd3c6 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 24 Aug 2024 00:19:23 -0700 +Subject: [PATCH] downgrade numpy version to 1.26.4+ + +We can drop it when OE-core upgrades numpy to 2.x + +Upstream-Status: Inappropriate [OE workaround] +Signed-off-by: Khem Raj +--- + pyproject.toml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/pyproject.toml b/pyproject.toml +index 1bfbd91..cbee520 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -1,7 +1,7 @@ + [build-system] + requires = [ + "cython>=0.27.3", +- "numpy>=2.0.0rc1", ++ "numpy>=1.26.4", + "setuptools>=43.0.0", + "wheel", + ] diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pycocotools_2.0.7.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pycocotools_2.0.7.bb deleted file mode 100644 index 15fdbcf8..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pycocotools_2.0.7.bb +++ /dev/null @@ -1,15 +0,0 @@ -SUMMARY = "COCO is a large image dataset designed for object detection, segmentation, \ - person keypoints detection, stuff segmentation, and caption generation." -LICENSE = "BSD-2-Clause" -LIC_FILES_CHKSUM = "file://pycocotools/coco.py;beginline=45;endline=45;md5=12cb539683cf245df8b6ce782d78f647" - -inherit setuptools3 pypi - -SRC_URI[sha256sum] = "da8b7815196eebf0adabf67fcc459126cbc6498bbc6ab1fd144c371465d86879" - -DEPENDS = "python3-cython-native python3-numpy-native virtual/crypt" -RDEPENDS:${PN} = "python3-matplotlib python3-pillow python3-profile" - -do_compile:append() { - sed -i -e "/BEGIN: Cython Metadata/,/END: Cython Metadata/d" ${B}/pycocotools/_mask.c -} diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pycocotools_2.0.8.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pycocotools_2.0.8.bb new file mode 100644 index 00000000..4d425131 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pycocotools_2.0.8.bb @@ -0,0 +1,17 @@ +SUMMARY = "COCO is a large image dataset designed for object detection, segmentation, \ + person keypoints detection, stuff segmentation, and caption generation." +LICENSE = "BSD-2-Clause" +LIC_FILES_CHKSUM = "file://pycocotools/coco.py;beginline=45;endline=45;md5=12cb539683cf245df8b6ce782d78f647" + +inherit pypi python_setuptools_build_meta + +SRC_URI += "file://0001-downgrade-numpy-version-to-1.26.4.patch" + +SRC_URI[sha256sum] = "8f2bcedb786ba26c367a3680f9c4eb5b2ad9dccb2b34eaeb205e0a021e1dfb8d" + +DEPENDS = "python3-cython-native python3-numpy-native virtual/crypt" +RDEPENDS:${PN} = "python3-matplotlib python3-pillow python3-profile" + +do_compile:append() { + sed -i -e "/BEGIN: Cython Metadata/,/END: Cython Metadata/d" ${B}/pycocotools/_mask.c +} diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pycodestyle_2.11.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pycodestyle_2.11.1.bb deleted file mode 100644 index a282afb4..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pycodestyle_2.11.1.bb +++ /dev/null @@ -1,11 +0,0 @@ -SUMMARY = "Python style guide checker (formly called pep8)" -HOMEPAGE = "https://pypi.org/project/pycodestyle" -LICENSE = "MIT" -SECTION = "devel/python" -LIC_FILES_CHKSUM = "file://LICENSE;md5=a8546d0e77f416fb05a26acd89c8b3bd" - -SRC_URI[sha256sum] = "41ba0e7afc9752dfb53ced5489e89f8186be00e599e712660695b7a75ff2663f" - -inherit pypi setuptools3 - -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pycodestyle_2.12.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pycodestyle_2.12.1.bb new file mode 100644 index 00000000..9572d21f --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pycodestyle_2.12.1.bb @@ -0,0 +1,11 @@ +SUMMARY = "Python style guide checker (formly called pep8)" +HOMEPAGE = "https://pypi.org/project/pycodestyle" +LICENSE = "MIT" +SECTION = "devel/python" +LIC_FILES_CHKSUM = "file://LICENSE;md5=a8546d0e77f416fb05a26acd89c8b3bd" + +SRC_URI[sha256sum] = "6838eae08bbce4f6accd5d5572075c63626a15ee3e6f842df996bf62f6d73521" + +inherit pypi setuptools3 + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pycurl_7.45.2.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pycurl_7.45.2.bb deleted file mode 100644 index 10d3cd10..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pycurl_7.45.2.bb +++ /dev/null @@ -1,21 +0,0 @@ -SUMMARY = "A Python Interface To The cURL library" -DESCRIPTION = "\ -PycURL is a Python interface to libcurl, the multiprotocol file \ -transfer library. Similarly to the urllib Python module, PycURL can \ -be used to fetch objects identified by a URL from a Python program \ -" -SECTION = "devel/python" -HOMEPAGE = "http://pycurl.io/" - -LICENSE = "LGPL-2.1-only | MIT" -LIC_FILES_CHKSUM = "file://COPYING-LGPL;md5=4fbd65380cdd255951079008b364516c \ - file://COPYING-MIT;md5=be42e1b1e58c8d59c2901fd747bfc55d \ - " - -SRC_URI[sha256sum] = "5730590be0271364a5bddd9e245c9cc0fb710c4cbacbdd95264a3122d23224ca" - -DEPENDS = "curl" - -inherit pypi setuptools3 - -BBCLASSEXTEND += "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pycurl_7.45.3.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pycurl_7.45.3.bb new file mode 100644 index 00000000..8dcc2dff --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pycurl_7.45.3.bb @@ -0,0 +1,21 @@ +SUMMARY = "A Python Interface To The cURL library" +DESCRIPTION = "\ +PycURL is a Python interface to libcurl, the multiprotocol file \ +transfer library. Similarly to the urllib Python module, PycURL can \ +be used to fetch objects identified by a URL from a Python program \ +" +SECTION = "devel/python" +HOMEPAGE = "http://pycurl.io/" + +LICENSE = "LGPL-2.1-only | MIT" +LIC_FILES_CHKSUM = "file://COPYING-LGPL;md5=4fbd65380cdd255951079008b364516c \ + file://COPYING-MIT;md5=be42e1b1e58c8d59c2901fd747bfc55d \ + " + +SRC_URI[sha256sum] = "8c2471af9079ad798e1645ec0b0d3d4223db687379d17dd36a70637449f81d6b" + +DEPENDS = "curl" + +inherit pypi setuptools3 + +BBCLASSEXTEND += "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic-core-crates.inc b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic-core-crates.inc index c6b30bc6..531632f3 100644 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic-core-crates.inc +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic-core-crates.inc @@ -2,173 +2,197 @@ # from Cargo.lock SRC_URI += " \ - crate://crates.io/ahash/0.8.10 \ - crate://crates.io/aho-corasick/1.0.2 \ - crate://crates.io/autocfg/1.1.0 \ - crate://crates.io/base64/0.21.7 \ - crate://crates.io/bitflags/1.3.2 \ + crate://crates.io/ahash/0.8.11 \ + crate://crates.io/aho-corasick/1.1.3 \ + crate://crates.io/autocfg/1.3.0 \ + crate://crates.io/base64/0.22.1 \ crate://crates.io/bitvec/1.0.1 \ - crate://crates.io/cc/1.0.79 \ + crate://crates.io/cc/1.0.101 \ crate://crates.io/cfg-if/1.0.0 \ + crate://crates.io/displaydoc/0.2.5 \ crate://crates.io/enum_dispatch/0.3.13 \ crate://crates.io/equivalent/1.0.1 \ crate://crates.io/form_urlencoded/1.2.1 \ crate://crates.io/funty/2.0.0 \ - crate://crates.io/getrandom/0.2.10 \ - crate://crates.io/hashbrown/0.14.3 \ - crate://crates.io/heck/0.4.1 \ + crate://crates.io/getrandom/0.2.15 \ + crate://crates.io/hashbrown/0.14.5 \ + crate://crates.io/heck/0.5.0 \ + crate://crates.io/hex/0.4.3 \ + crate://crates.io/icu_collections/1.5.0 \ + crate://crates.io/icu_locid/1.5.0 \ + crate://crates.io/icu_locid_transform/1.5.0 \ + crate://crates.io/icu_locid_transform_data/1.5.0 \ + crate://crates.io/icu_normalizer/1.5.0 \ + crate://crates.io/icu_normalizer_data/1.5.0 \ + crate://crates.io/icu_properties/1.5.1 \ + crate://crates.io/icu_properties_data/1.5.0 \ + crate://crates.io/icu_provider/1.5.0 \ + crate://crates.io/icu_provider_macros/1.5.0 \ crate://crates.io/idna/0.5.0 \ - crate://crates.io/indexmap/2.2.2 \ - crate://crates.io/indoc/2.0.4 \ - crate://crates.io/itoa/1.0.8 \ - crate://crates.io/jiter/0.4.1 \ + crate://crates.io/idna/1.0.1 \ + crate://crates.io/indexmap/2.2.6 \ + crate://crates.io/indoc/2.0.5 \ + crate://crates.io/itoa/1.0.11 \ + crate://crates.io/jiter/0.5.0 \ crate://crates.io/lexical-parse-float/0.8.5 \ crate://crates.io/lexical-parse-integer/0.8.6 \ crate://crates.io/lexical-util/0.8.5 \ - crate://crates.io/libc/0.2.147 \ - crate://crates.io/lock_api/0.4.10 \ - crate://crates.io/memchr/2.6.3 \ - crate://crates.io/memoffset/0.9.0 \ - crate://crates.io/num-bigint/0.4.4 \ - crate://crates.io/num-integer/0.1.45 \ - crate://crates.io/num-traits/0.2.16 \ - crate://crates.io/once_cell/1.18.0 \ - crate://crates.io/parking_lot/0.12.1 \ - crate://crates.io/parking_lot_core/0.9.8 \ + crate://crates.io/libc/0.2.155 \ + crate://crates.io/litemap/0.7.3 \ + crate://crates.io/memchr/2.7.4 \ + crate://crates.io/memoffset/0.9.1 \ + crate://crates.io/num-bigint/0.4.6 \ + crate://crates.io/num-integer/0.1.46 \ + crate://crates.io/num-traits/0.2.19 \ + crate://crates.io/once_cell/1.19.0 \ crate://crates.io/percent-encoding/2.3.1 \ crate://crates.io/portable-atomic/1.6.0 \ - crate://crates.io/proc-macro2/1.0.76 \ - crate://crates.io/pyo3/0.21.2 \ - crate://crates.io/pyo3-build-config/0.21.2 \ - crate://crates.io/pyo3-ffi/0.21.2 \ - crate://crates.io/pyo3-macros/0.21.2 \ - crate://crates.io/pyo3-macros-backend/0.21.2 \ - crate://crates.io/python3-dll-a/0.2.9 \ - crate://crates.io/quote/1.0.35 \ + crate://crates.io/proc-macro2/1.0.86 \ + crate://crates.io/pyo3/0.22.2 \ + crate://crates.io/pyo3-build-config/0.22.2 \ + crate://crates.io/pyo3-ffi/0.22.2 \ + crate://crates.io/pyo3-macros/0.22.2 \ + crate://crates.io/pyo3-macros-backend/0.22.2 \ + crate://crates.io/python3-dll-a/0.2.10 \ + crate://crates.io/quote/1.0.36 \ crate://crates.io/radium/0.7.0 \ - crate://crates.io/redox_syscall/0.3.5 \ - crate://crates.io/regex/1.10.4 \ - crate://crates.io/regex-automata/0.4.5 \ - crate://crates.io/regex-syntax/0.8.2 \ - crate://crates.io/rustversion/1.0.13 \ - crate://crates.io/ryu/1.0.14 \ - crate://crates.io/scopeguard/1.1.0 \ - crate://crates.io/serde/1.0.203 \ - crate://crates.io/serde_derive/1.0.203 \ - crate://crates.io/serde_json/1.0.116 \ + crate://crates.io/regex/1.10.5 \ + crate://crates.io/regex-automata/0.4.7 \ + crate://crates.io/regex-syntax/0.8.4 \ + crate://crates.io/rustversion/1.0.17 \ + crate://crates.io/ryu/1.0.18 \ + crate://crates.io/serde/1.0.204 \ + crate://crates.io/serde_derive/1.0.204 \ + crate://crates.io/serde_json/1.0.121 \ crate://crates.io/smallvec/1.13.2 \ - crate://crates.io/speedate/0.14.0 \ + crate://crates.io/speedate/0.14.4 \ + crate://crates.io/stable_deref_trait/1.2.0 \ crate://crates.io/static_assertions/1.1.0 \ - crate://crates.io/strum/0.25.0 \ - crate://crates.io/strum_macros/0.25.3 \ - crate://crates.io/strum_macros/0.26.1 \ - crate://crates.io/syn/2.0.48 \ + crate://crates.io/strum/0.26.3 \ + crate://crates.io/strum_macros/0.26.4 \ + crate://crates.io/syn/2.0.68 \ + crate://crates.io/synstructure/0.13.1 \ crate://crates.io/tap/1.0.1 \ - crate://crates.io/target-lexicon/0.12.9 \ - crate://crates.io/tinyvec/1.6.0 \ + crate://crates.io/target-lexicon/0.12.14 \ + crate://crates.io/tinystr/0.7.6 \ + crate://crates.io/tinyvec/1.6.1 \ crate://crates.io/tinyvec_macros/0.1.1 \ - crate://crates.io/unicode-bidi/0.3.13 \ - crate://crates.io/unicode-ident/1.0.10 \ - crate://crates.io/unicode-normalization/0.1.22 \ + crate://crates.io/unicode-bidi/0.3.15 \ + crate://crates.io/unicode-ident/1.0.12 \ + crate://crates.io/unicode-normalization/0.1.23 \ crate://crates.io/unindent/0.2.3 \ - crate://crates.io/url/2.5.0 \ - crate://crates.io/uuid/1.8.0 \ - crate://crates.io/version_check/0.9.4 \ + crate://crates.io/url/2.5.2 \ + crate://crates.io/utf16_iter/1.0.5 \ + crate://crates.io/utf8_iter/1.0.4 \ + crate://crates.io/uuid/1.9.1 \ + crate://crates.io/version_check/0.9.5 \ crate://crates.io/wasi/0.11.0+wasi-snapshot-preview1 \ - crate://crates.io/windows-targets/0.48.1 \ - crate://crates.io/windows_aarch64_gnullvm/0.48.0 \ - crate://crates.io/windows_aarch64_msvc/0.48.0 \ - crate://crates.io/windows_i686_gnu/0.48.0 \ - crate://crates.io/windows_i686_msvc/0.48.0 \ - crate://crates.io/windows_x86_64_gnu/0.48.0 \ - crate://crates.io/windows_x86_64_gnullvm/0.48.0 \ - crate://crates.io/windows_x86_64_msvc/0.48.0 \ + crate://crates.io/write16/1.0.0 \ + crate://crates.io/writeable/0.5.5 \ crate://crates.io/wyz/0.5.1 \ - crate://crates.io/zerocopy/0.7.32 \ - crate://crates.io/zerocopy-derive/0.7.32 \ + crate://crates.io/yoke/0.7.4 \ + crate://crates.io/yoke-derive/0.7.4 \ + crate://crates.io/zerocopy/0.7.34 \ + crate://crates.io/zerocopy-derive/0.7.34 \ + crate://crates.io/zerofrom/0.1.4 \ + crate://crates.io/zerofrom-derive/0.1.4 \ + crate://crates.io/zerovec/0.10.4 \ + crate://crates.io/zerovec-derive/0.10.3 \ " -SRC_URI[ahash-0.8.10.sha256sum] = "8b79b82693f705137f8fb9b37871d99e4f9a7df12b917eed79c3d3954830a60b" -SRC_URI[aho-corasick-1.0.2.sha256sum] = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" -SRC_URI[autocfg-1.1.0.sha256sum] = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" -SRC_URI[base64-0.21.7.sha256sum] = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" -SRC_URI[bitflags-1.3.2.sha256sum] = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +SRC_URI[ahash-0.8.11.sha256sum] = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +SRC_URI[aho-corasick-1.1.3.sha256sum] = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +SRC_URI[autocfg-1.3.0.sha256sum] = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +SRC_URI[base64-0.22.1.sha256sum] = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" SRC_URI[bitvec-1.0.1.sha256sum] = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" -SRC_URI[cc-1.0.79.sha256sum] = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +SRC_URI[cc-1.0.101.sha256sum] = "ac367972e516d45567c7eafc73d24e1c193dcf200a8d94e9db7b3d38b349572d" SRC_URI[cfg-if-1.0.0.sha256sum] = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +SRC_URI[displaydoc-0.2.5.sha256sum] = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" SRC_URI[enum_dispatch-0.3.13.sha256sum] = "aa18ce2bc66555b3218614519ac839ddb759a7d6720732f979ef8d13be147ecd" SRC_URI[equivalent-1.0.1.sha256sum] = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" SRC_URI[form_urlencoded-1.2.1.sha256sum] = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" SRC_URI[funty-2.0.0.sha256sum] = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" -SRC_URI[getrandom-0.2.10.sha256sum] = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" -SRC_URI[hashbrown-0.14.3.sha256sum] = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" -SRC_URI[heck-0.4.1.sha256sum] = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +SRC_URI[getrandom-0.2.15.sha256sum] = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +SRC_URI[hashbrown-0.14.5.sha256sum] = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +SRC_URI[heck-0.5.0.sha256sum] = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" +SRC_URI[hex-0.4.3.sha256sum] = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +SRC_URI[icu_collections-1.5.0.sha256sum] = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +SRC_URI[icu_locid-1.5.0.sha256sum] = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +SRC_URI[icu_locid_transform-1.5.0.sha256sum] = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +SRC_URI[icu_locid_transform_data-1.5.0.sha256sum] = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" +SRC_URI[icu_normalizer-1.5.0.sha256sum] = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +SRC_URI[icu_normalizer_data-1.5.0.sha256sum] = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" +SRC_URI[icu_properties-1.5.1.sha256sum] = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +SRC_URI[icu_properties_data-1.5.0.sha256sum] = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" +SRC_URI[icu_provider-1.5.0.sha256sum] = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +SRC_URI[icu_provider_macros-1.5.0.sha256sum] = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" SRC_URI[idna-0.5.0.sha256sum] = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" -SRC_URI[indexmap-2.2.2.sha256sum] = "824b2ae422412366ba479e8111fd301f7b5faece8149317bb81925979a53f520" -SRC_URI[indoc-2.0.4.sha256sum] = "1e186cfbae8084e513daff4240b4797e342f988cecda4fb6c939150f96315fd8" -SRC_URI[itoa-1.0.8.sha256sum] = "62b02a5381cc465bd3041d84623d0fa3b66738b52b8e2fc3bab8ad63ab032f4a" -SRC_URI[jiter-0.4.1.sha256sum] = "abbbbe1bad457e3cd5503af716aedc735e849505a0d2172c55a753ae1b127458" +SRC_URI[idna-1.0.1.sha256sum] = "44a986806a1cc899952ba462bc1f28afbfd5850ab6cb030ccb20dd02cc527a24" +SRC_URI[indexmap-2.2.6.sha256sum] = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +SRC_URI[indoc-2.0.5.sha256sum] = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" +SRC_URI[itoa-1.0.11.sha256sum] = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +SRC_URI[jiter-0.5.0.sha256sum] = "02e23549143ef50eddffd46ba8cd0229b0a4500aef7518cf2eb0f41c9a09d22b" SRC_URI[lexical-parse-float-0.8.5.sha256sum] = "683b3a5ebd0130b8fb52ba0bdc718cc56815b6a097e28ae5a6997d0ad17dc05f" SRC_URI[lexical-parse-integer-0.8.6.sha256sum] = "6d0994485ed0c312f6d965766754ea177d07f9c00c9b82a5ee62ed5b47945ee9" SRC_URI[lexical-util-0.8.5.sha256sum] = "5255b9ff16ff898710eb9eb63cb39248ea8a5bb036bea8085b1a767ff6c4e3fc" -SRC_URI[libc-0.2.147.sha256sum] = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" -SRC_URI[lock_api-0.4.10.sha256sum] = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" -SRC_URI[memchr-2.6.3.sha256sum] = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c" -SRC_URI[memoffset-0.9.0.sha256sum] = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" -SRC_URI[num-bigint-0.4.4.sha256sum] = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" -SRC_URI[num-integer-0.1.45.sha256sum] = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" -SRC_URI[num-traits-0.2.16.sha256sum] = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" -SRC_URI[once_cell-1.18.0.sha256sum] = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" -SRC_URI[parking_lot-0.12.1.sha256sum] = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" -SRC_URI[parking_lot_core-0.9.8.sha256sum] = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" +SRC_URI[libc-0.2.155.sha256sum] = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" +SRC_URI[litemap-0.7.3.sha256sum] = "643cb0b8d4fcc284004d5fd0d67ccf61dfffadb7f75e1e71bc420f4688a3a704" +SRC_URI[memchr-2.7.4.sha256sum] = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" +SRC_URI[memoffset-0.9.1.sha256sum] = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" +SRC_URI[num-bigint-0.4.6.sha256sum] = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" +SRC_URI[num-integer-0.1.46.sha256sum] = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +SRC_URI[num-traits-0.2.19.sha256sum] = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +SRC_URI[once_cell-1.19.0.sha256sum] = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" SRC_URI[percent-encoding-2.3.1.sha256sum] = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" SRC_URI[portable-atomic-1.6.0.sha256sum] = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" -SRC_URI[proc-macro2-1.0.76.sha256sum] = "95fc56cda0b5c3325f5fbbd7ff9fda9e02bb00bb3dac51252d2f1bfa1cb8cc8c" -SRC_URI[pyo3-0.21.2.sha256sum] = "a5e00b96a521718e08e03b1a622f01c8a8deb50719335de3f60b3b3950f069d8" -SRC_URI[pyo3-build-config-0.21.2.sha256sum] = "7883df5835fafdad87c0d888b266c8ec0f4c9ca48a5bed6bbb592e8dedee1b50" -SRC_URI[pyo3-ffi-0.21.2.sha256sum] = "01be5843dc60b916ab4dad1dca6d20b9b4e6ddc8e15f50c47fe6d85f1fb97403" -SRC_URI[pyo3-macros-0.21.2.sha256sum] = "77b34069fc0682e11b31dbd10321cbf94808394c56fd996796ce45217dfac53c" -SRC_URI[pyo3-macros-backend-0.21.2.sha256sum] = "08260721f32db5e1a5beae69a55553f56b99bd0e1c3e6e0a5e8851a9d0f5a85c" -SRC_URI[python3-dll-a-0.2.9.sha256sum] = "d5f07cd4412be8fa09a721d40007c483981bbe072cd6a21f2e83e04ec8f8343f" -SRC_URI[quote-1.0.35.sha256sum] = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +SRC_URI[proc-macro2-1.0.86.sha256sum] = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +SRC_URI[pyo3-0.22.2.sha256sum] = "831e8e819a138c36e212f3af3fd9eeffed6bf1510a805af35b0edee5ffa59433" +SRC_URI[pyo3-build-config-0.22.2.sha256sum] = "1e8730e591b14492a8945cdff32f089250b05f5accecf74aeddf9e8272ce1fa8" +SRC_URI[pyo3-ffi-0.22.2.sha256sum] = "5e97e919d2df92eb88ca80a037969f44e5e70356559654962cbb3316d00300c6" +SRC_URI[pyo3-macros-0.22.2.sha256sum] = "eb57983022ad41f9e683a599f2fd13c3664d7063a3ac5714cae4b7bee7d3f206" +SRC_URI[pyo3-macros-backend-0.22.2.sha256sum] = "ec480c0c51ddec81019531705acac51bcdbeae563557c982aa8263bb96880372" +SRC_URI[python3-dll-a-0.2.10.sha256sum] = "bd0b78171a90d808b319acfad166c4790d9e9759bbc14ac8273fe133673dd41b" +SRC_URI[quote-1.0.36.sha256sum] = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" SRC_URI[radium-0.7.0.sha256sum] = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" -SRC_URI[redox_syscall-0.3.5.sha256sum] = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" -SRC_URI[regex-1.10.4.sha256sum] = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" -SRC_URI[regex-automata-0.4.5.sha256sum] = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd" -SRC_URI[regex-syntax-0.8.2.sha256sum] = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" -SRC_URI[rustversion-1.0.13.sha256sum] = "dc31bd9b61a32c31f9650d18add92aa83a49ba979c143eefd27fe7177b05bd5f" -SRC_URI[ryu-1.0.14.sha256sum] = "fe232bdf6be8c8de797b22184ee71118d63780ea42ac85b61d1baa6d3b782ae9" -SRC_URI[scopeguard-1.1.0.sha256sum] = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" -SRC_URI[serde-1.0.203.sha256sum] = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" -SRC_URI[serde_derive-1.0.203.sha256sum] = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" -SRC_URI[serde_json-1.0.116.sha256sum] = "3e17db7126d17feb94eb3fad46bf1a96b034e8aacbc2e775fe81505f8b0b2813" +SRC_URI[regex-1.10.5.sha256sum] = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" +SRC_URI[regex-automata-0.4.7.sha256sum] = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +SRC_URI[regex-syntax-0.8.4.sha256sum] = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" +SRC_URI[rustversion-1.0.17.sha256sum] = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" +SRC_URI[ryu-1.0.18.sha256sum] = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" +SRC_URI[serde-1.0.204.sha256sum] = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" +SRC_URI[serde_derive-1.0.204.sha256sum] = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" +SRC_URI[serde_json-1.0.121.sha256sum] = "4ab380d7d9f22ef3f21ad3e6c1ebe8e4fc7a2000ccba2e4d71fc96f15b2cb609" SRC_URI[smallvec-1.13.2.sha256sum] = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" -SRC_URI[speedate-0.14.0.sha256sum] = "c323c4e6fece5a5a1a2a7f726d243144cce9fbcfe3ce4d9f3c6ede726a2bc780" +SRC_URI[speedate-0.14.4.sha256sum] = "08a20480dbd4c693f0b0f3210f2cee5bfa21a176c1fa4df0e65cc0474e7fa557" +SRC_URI[stable_deref_trait-1.2.0.sha256sum] = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" SRC_URI[static_assertions-1.1.0.sha256sum] = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" -SRC_URI[strum-0.25.0.sha256sum] = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" -SRC_URI[strum_macros-0.25.3.sha256sum] = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" -SRC_URI[strum_macros-0.26.1.sha256sum] = "7a3417fc93d76740d974a01654a09777cb500428cc874ca9f45edfe0c4d4cd18" -SRC_URI[syn-2.0.48.sha256sum] = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +SRC_URI[strum-0.26.3.sha256sum] = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" +SRC_URI[strum_macros-0.26.4.sha256sum] = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" +SRC_URI[syn-2.0.68.sha256sum] = "901fa70d88b9d6c98022e23b4136f9f3e54e4662c3bc1bd1d84a42a9a0f0c1e9" +SRC_URI[synstructure-0.13.1.sha256sum] = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" SRC_URI[tap-1.0.1.sha256sum] = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" -SRC_URI[target-lexicon-0.12.9.sha256sum] = "df8e77cb757a61f51b947ec4a7e3646efd825b73561db1c232a8ccb639e611a0" -SRC_URI[tinyvec-1.6.0.sha256sum] = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +SRC_URI[target-lexicon-0.12.14.sha256sum] = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f" +SRC_URI[tinystr-0.7.6.sha256sum] = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +SRC_URI[tinyvec-1.6.1.sha256sum] = "c55115c6fbe2d2bef26eb09ad74bde02d8255476fc0c7b515ef09fbb35742d82" SRC_URI[tinyvec_macros-0.1.1.sha256sum] = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" -SRC_URI[unicode-bidi-0.3.13.sha256sum] = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" -SRC_URI[unicode-ident-1.0.10.sha256sum] = "22049a19f4a68748a168c0fc439f9516686aa045927ff767eca0a85101fb6e73" -SRC_URI[unicode-normalization-0.1.22.sha256sum] = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +SRC_URI[unicode-bidi-0.3.15.sha256sum] = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" +SRC_URI[unicode-ident-1.0.12.sha256sum] = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +SRC_URI[unicode-normalization-0.1.23.sha256sum] = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" SRC_URI[unindent-0.2.3.sha256sum] = "c7de7d73e1754487cb58364ee906a499937a0dfabd86bcb980fa99ec8c8fa2ce" -SRC_URI[url-2.5.0.sha256sum] = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" -SRC_URI[uuid-1.8.0.sha256sum] = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0" -SRC_URI[version_check-0.9.4.sha256sum] = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +SRC_URI[url-2.5.2.sha256sum] = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" +SRC_URI[utf16_iter-1.0.5.sha256sum] = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" +SRC_URI[utf8_iter-1.0.4.sha256sum] = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" +SRC_URI[uuid-1.9.1.sha256sum] = "5de17fd2f7da591098415cff336e12965a28061ddace43b59cb3c430179c9439" +SRC_URI[version_check-0.9.5.sha256sum] = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" SRC_URI[wasi-0.11.0+wasi-snapshot-preview1.sha256sum] = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" -SRC_URI[windows-targets-0.48.1.sha256sum] = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" -SRC_URI[windows_aarch64_gnullvm-0.48.0.sha256sum] = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" -SRC_URI[windows_aarch64_msvc-0.48.0.sha256sum] = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" -SRC_URI[windows_i686_gnu-0.48.0.sha256sum] = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" -SRC_URI[windows_i686_msvc-0.48.0.sha256sum] = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" -SRC_URI[windows_x86_64_gnu-0.48.0.sha256sum] = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" -SRC_URI[windows_x86_64_gnullvm-0.48.0.sha256sum] = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" -SRC_URI[windows_x86_64_msvc-0.48.0.sha256sum] = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +SRC_URI[write16-1.0.0.sha256sum] = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" +SRC_URI[writeable-0.5.5.sha256sum] = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" SRC_URI[wyz-0.5.1.sha256sum] = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" -SRC_URI[zerocopy-0.7.32.sha256sum] = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" -SRC_URI[zerocopy-derive-0.7.32.sha256sum] = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" +SRC_URI[yoke-0.7.4.sha256sum] = "6c5b1314b079b0930c31e3af543d8ee1757b1951ae1e1565ec704403a7240ca5" +SRC_URI[yoke-derive-0.7.4.sha256sum] = "28cc31741b18cb6f1d5ff12f5b7523e3d6eb0852bbbad19d73905511d9849b95" +SRC_URI[zerocopy-0.7.34.sha256sum] = "ae87e3fcd617500e5d106f0380cf7b77f3c6092aae37191433159dda23cfb087" +SRC_URI[zerocopy-derive-0.7.34.sha256sum] = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b" +SRC_URI[zerofrom-0.1.4.sha256sum] = "91ec111ce797d0e0784a1116d0ddcdbea84322cd79e5d5ad173daeba4f93ab55" +SRC_URI[zerofrom-derive-0.1.4.sha256sum] = "0ea7b4a3637ea8669cedf0f1fd5c286a17f3de97b8dd5a70a6c167a1730e63a5" +SRC_URI[zerovec-0.10.4.sha256sum] = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +SRC_URI[zerovec-derive-0.10.3.sha256sum] = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic-core/0001-Set-rust-version-from-1.76-to-1.75-in-Cargo.toml.patch b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic-core/0001-Set-rust-version-from-1.76-to-1.75-in-Cargo.toml.patch deleted file mode 100644 index c4e6f2f6..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic-core/0001-Set-rust-version-from-1.76-to-1.75-in-Cargo.toml.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 6e1852228a2aa38cc76b9a968bba6b603efa5b28 Mon Sep 17 00:00:00 2001 -From: Frank de Brabander -Date: Thu, 25 Jul 2024 13:50:44 +0200 -Subject: [PATCH] Set rust version from 1.76 to 1.75 in Cargo.toml - -Current openembedded-core uses 1.75 and this packages doesn't actually -require a newer version. - -Upstream-Status: Inappropriate ---- - Cargo.toml | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Cargo.toml b/Cargo.toml -index 8f0ea44..10b277c 100644 ---- a/Cargo.toml -+++ b/Cargo.toml -@@ -24,7 +24,7 @@ include = [ - "!tests/.pytest_cache", - "!*.so", - ] --rust-version = "1.76" -+rust-version = "1.75" - - [dependencies] - pyo3 = { version = "0.21.2", features = ["generate-import-lib", "num-bigint"] } --- -2.39.2 - diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic-core/0001-dont-embed-RUSTFLAGS-in-final-binary-1396.patch b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic-core/0001-dont-embed-RUSTFLAGS-in-final-binary-1396.patch new file mode 100644 index 00000000..5d732d5b --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic-core/0001-dont-embed-RUSTFLAGS-in-final-binary-1396.patch @@ -0,0 +1,58 @@ +From e07c41b3bad75948201a2201387225694c2fb501 Mon Sep 17 00:00:00 2001 +From: Boxy +Date: Wed, 7 Aug 2024 17:11:02 +0100 +Subject: [PATCH] dont embed `RUSTFLAGS` in final binary (#1396) + +Upstream-Status: Backport [https://github.com/pydantic/pydantic-core/pull/1396] + +See discussion upstream in: +https://github.com/pydantic/pydantic-core/issues/1365 + +Backport fix from: +https://github.com/pydantic/pydantic-core/commit/e07c41b3bad75948201a2201387225694c2fb501 + +Signed-off-by: Tim Orling +--- + build.rs | 9 +++++++++ + src/lib.rs | 5 ++++- + 2 files changed, 13 insertions(+), 1 deletion(-) + +diff --git a/build.rs b/build.rs +index d1093c74..f8f66901 100644 +--- a/build.rs ++++ b/build.rs +@@ -36,6 +36,15 @@ fn main() { + println!("cargo:rustc-cfg=has_coverage_attribute"); + } + println!("cargo:rustc-check-cfg=cfg(has_coverage_attribute)"); ++ ++ if std::env::var("RUSTFLAGS") ++ .unwrap_or_default() ++ .contains("-Cprofile-use=") ++ { ++ println!("cargo:rustc-cfg=specified_profile_use"); ++ } ++ println!("cargo:rustc-check-cfg=cfg(specified_profile_use)"); ++ + generate_self_schema(); + println!("cargo:rustc-env=PROFILE={}", std::env::var("PROFILE").unwrap()); + } +diff --git a/src/lib.rs b/src/lib.rs +index eb598424..eb486da6 100644 +--- a/src/lib.rs ++++ b/src/lib.rs +@@ -98,7 +98,10 @@ pub fn build_info() -> String { + format!( + "profile={} pgo={}", + env!("PROFILE"), +- option_env!("RUSTFLAGS").unwrap_or("").contains("-Cprofile-use="), ++ // We use a `cfg!` here not `env!`/`option_env!` as those would ++ // embed `RUSTFLAGS` into the generated binary which causes problems ++ // with reproducable builds. ++ cfg!(specified_profile_use), + ) + } + +-- +2.46.0 + diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic-core/0002-Dont-embed-RUSTFLAGS-in-final-binary.patch b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic-core/0002-Dont-embed-RUSTFLAGS-in-final-binary.patch deleted file mode 100644 index 1c195e29..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic-core/0002-Dont-embed-RUSTFLAGS-in-final-binary.patch +++ /dev/null @@ -1,47 +0,0 @@ -From b3282b301096253a11b1f887f915d0a2a2183597 Mon Sep 17 00:00:00 2001 -From: Frank de Brabander -Date: Thu, 8 Aug 2024 08:04:48 +0200 -Subject: [PATCH] Dont embed RUSTFLAGS in final binary - -Upstream-Status: Backport [https://github.com/pydantic/pydantic-core/commit/e07c41b3bad75948201a2201387225694c2fb501] ---- - build.rs | 9 +++++++++ - src/lib.rs | 5 ++++- - 2 files changed, 13 insertions(+), 1 deletion(-) - -diff --git a/build.rs b/build.rs -index 7f59e1f..7fe6490 100644 ---- a/build.rs -+++ b/build.rs -@@ -35,6 +35,15 @@ fn main() { - if let Some(true) = version_check::supports_feature("coverage_attribute") { - println!("cargo:rustc-cfg=has_coverage_attribute"); - } -+ -+ if std::env::var("RUSTFLAGS") -+ .unwrap_or_default() -+ .contains("-Cprofile-use=") -+ { -+ println!("cargo:rustc-cfg=specified_profile_use"); -+ } -+ println!("cargo:rustc-check-cfg=cfg(specified_profile_use)"); -+ - generate_self_schema(); - println!("cargo:rustc-env=PROFILE={}", std::env::var("PROFILE").unwrap()); - } -diff --git a/src/lib.rs b/src/lib.rs -index d55e836..206a7a1 100644 ---- a/src/lib.rs -+++ b/src/lib.rs -@@ -111,7 +111,10 @@ pub fn build_info() -> String { - format!( - "profile={} pgo={}", - env!("PROFILE"), -- option_env!("RUSTFLAGS").unwrap_or("").contains("-Cprofile-use="), -+ // We use a `cfg!` here not `env!`/`option_env!` as those would -+ // embed `RUSTFLAGS` into the generated binary which causes problems -+ // with reproducable builds. -+ cfg!(specified_profile_use), - ) - } - diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic-core_2.18.4.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic-core_2.18.4.bb deleted file mode 100644 index adaf4a62..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic-core_2.18.4.bb +++ /dev/null @@ -1,58 +0,0 @@ -SUMMARY = "Provides the core functionality for pydantic validation and serialization." -DESCRIPTION = "This package provides the core functionality for \ -pydantic validation and serialization.\ -\ -Pydantic-core is currently around 17x faster than pydantic V1." -HOMEPAGE = "https://github.com/pydantic/pydantic-core" - -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=ab599c188b4a314d2856b3a55030c75c" - -SRC_URI += "file://0001-Set-rust-version-from-1.76-to-1.75-in-Cargo.toml.patch \ - file://0002-Dont-embed-RUSTFLAGS-in-final-binary.patch" -SRC_URI[sha256sum] = "ec3beeada09ff865c344ff3bc2f427f5e6c26401cc6113d77e372c3fdac73864" - -DEPENDS = "python3-maturin-native python3-typing-extensions" - -require ${BPN}-crates.inc - -inherit pypi cargo-update-recipe-crates python_maturin - -PYPI_PACKAGE = "pydantic_core" - -RDEPENDS:${PN} += " \ - python3-compression \ - python3-typing-extensions \ -" - -INSANE_SKIP:${PN} = "already-stripped" - -inherit ptest -SRC_URI += "file://run-ptest" -RDEPENDS:${PN}-ptest += "\ - python3-dirty-equals \ - python3-hypothesis \ - python3-pytest \ - python3-pytest-mock \ - python3-pytest-timeout \ - python3-pytest-benchmark \ - python3-unittest-automake-output \ - python3-zoneinfo \ - tzdata \ -" - -do_install:append() { - for f in ${D}/${PYTHON_SITEPACKAGES_DIR}/pydantic_core/_pydantic_core.*.so - do - fname=`basename $f` - lname=`echo $fname | sed 's/musl/gnu/'` - if [ "$fname" != "$lname" ]; then - mv $f ${D}/${PYTHON_SITEPACKAGES_DIR}/pydantic_core/$lname - fi - done -} - -do_install_ptest() { - cp -rf ${S}/tests/ ${D}${PTEST_PATH}/ - sed -i -e "/--automake/ s/$/ -k 'not test_model_class_root_validator_wrap and not test_model_class_root_validator_before and not test_model_class_root_validator_after'/" ${D}${PTEST_PATH}/run-ptest -} diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic-core_2.21.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic-core_2.21.0.bb new file mode 100644 index 00000000..b24e141f --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic-core_2.21.0.bb @@ -0,0 +1,51 @@ +SUMMARY = "Provides the core functionality for pydantic validation and serialization." +DESCRIPTION = "This package provides the core functionality for \ +pydantic validation and serialization.\ +\ +Pydantic-core is currently around 17x faster than pydantic V1." +HOMEPAGE = "https://github.com/pydantic/pydantic-core" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ab599c188b4a314d2856b3a55030c75c" + +require ${BPN}-crates.inc + +SRC_URI += "file://run-ptest" +SRC_URI += "file://0001-dont-embed-RUSTFLAGS-in-final-binary-1396.patch" + +SRC_URI[sha256sum] = "79c747f9916e5b6cb588dfd994d9ac15a93e43eb07467d9e6f24d892c176bbf5" + +DEPENDS = "python3-maturin-native python3-typing-extensions" + +inherit pypi cargo-update-recipe-crates python_maturin + +PYPI_PACKAGE = "pydantic_core" + +RDEPENDS:${PN} += " \ + python3-compression \ + python3-typing-extensions \ +" + +INSANE_SKIP:${PN} = "already-stripped" +INSANE_SKIP:${PN} += "buildpaths" + +# python3-misc is for Lib/timeit.py which is not split out elsewhere +inherit ptest +RDEPENDS:${PN}-ptest += "\ + python3-dateutil \ + python3-dirty-equals \ + python3-hypothesis \ + python3-misc \ + python3-pytest \ + python3-pytest-mock \ + python3-pytest-timeout \ + python3-pytest-benchmark \ + python3-tzdata \ + python3-unittest-automake-output \ + python3-zoneinfo \ +" + +do_install_ptest() { + cp -rf ${S}/tests/ ${D}${PTEST_PATH}/ + sed -i -e "/--automake/ s/$/ -k 'not test_model_class_root_validator_wrap and not test_model_class_root_validator_before and not test_model_class_root_validator_after'/" ${D}${PTEST_PATH}/run-ptest +} diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic_2.7.4.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic_2.7.4.bb deleted file mode 100644 index 04c9c91c..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic_2.7.4.bb +++ /dev/null @@ -1,53 +0,0 @@ -SUMMARY = "Data validation using Python type hinting" -DESCRIPTION = "Data validation and settings management using Python \ -type hints.\ -\ -Fast and extensible, Pydantic plays nicely with your linters/IDE/brain. \ -Define how data should be in pure, canonical Python 3.7+; validate it with \ -Pydantic." -HOMEPAGE = "https://github.com/samuelcolvin/pydantic" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=09280955509d1c4ca14bae02f21d49a6" - -inherit pypi python_hatchling - -SRC_URI[sha256sum] = "0c84efd9548d545f63ac0060c1e4d39bb9b14db8b3c0652338aecc07b5adec52" - -DEPENDS += "python3-hatch-fancy-pypi-readme-native" - -RDEPENDS:${PN} += "\ - python3-annotated-types \ - python3-core \ - python3-datetime \ - python3-image \ - python3-io \ - python3-json \ - python3-logging \ - python3-netclient \ - python3-numbers \ - python3-profile \ - python3-pydantic-core \ - python3-typing-extensions \ -" - -inherit ptest -SRC_URI += "file://run-ptest" -RDEPENDS:${PN}-ptest += "\ - python3-cloudpickle \ - python3-dirty-equals \ - python3-pytest \ - python3-pytest-mock \ - python3-unittest-automake-output \ -" - -do_install_ptest() { - cp -rf ${S}/tests/ ${D}${PTEST_PATH}/ - # Requires 'ruff' (python3-ruff) which we cannot build - # until we have Rust 1.71+ in oe-core - rm -f ${D}${PTEST_PATH}/tests/test_docs.py - # We are not trying to support mypy - rm -f ${D}${PTEST_PATH}/tests/test_mypy.py - # We are not trying to run benchmarks - rm -rf ${D}${PTEST_PATH}/tests/benchmarks - sed -i -e "/--automake/ s/$/ -k 'not test_config_validation_error_cause and not test_dataclass_config_validate_default and not test_annotated_validator_nested and not test_use_bare and not test_use_no_fields and not test_validator_bad_fields_throws_configerror and not test_assert_raises_validation_error and not test_model_config_validate_default'/" ${D}${PTEST_PATH}/run-ptest -} diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic_2.8.2.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic_2.8.2.bb new file mode 100644 index 00000000..de610d78 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic_2.8.2.bb @@ -0,0 +1,59 @@ +SUMMARY = "Data validation using Python type hinting" +DESCRIPTION = "Data validation and settings management using Python \ +type hints.\ +\ +Fast and extensible, Pydantic plays nicely with your linters/IDE/brain. \ +Define how data should be in pure, canonical Python 3.7+; validate it with \ +Pydantic." +HOMEPAGE = "https://github.com/samuelcolvin/pydantic" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=09280955509d1c4ca14bae02f21d49a6" + +inherit pypi python_hatchling + +SRC_URI[sha256sum] = "6f62c13d067b0755ad1c21a34bdd06c0c12625a22b0fc09c6b149816604f7c2a" + +DEPENDS += "python3-hatch-fancy-pypi-readme-native" + +RECIPE_NO_UPDATE_REASON = "Must be updated in sync with python3-pydantic-core." + +RDEPENDS:${PN} += "\ + python3-annotated-types \ + python3-core \ + python3-datetime \ + python3-image \ + python3-io \ + python3-json \ + python3-logging \ + python3-netclient \ + python3-numbers \ + python3-profile \ + python3-pydantic-core \ + python3-typing-extensions \ +" + +inherit ptest +SRC_URI += "file://run-ptest" +RDEPENDS:${PN}-ptest += "\ + python3-cloudpickle \ + python3-dirty-equals \ + python3-email-validator \ + python3-pydoc \ + python3-pytest \ + python3-pytest-mock \ + python3-rich \ + python3-unittest-automake-output \ + python3-unixadmin \ +" + +do_install_ptest() { + cp -rf ${S}/tests/ ${D}${PTEST_PATH}/ + # Requires 'ruff' (python3-ruff) which we cannot build + # until we have Rust 1.71+ in oe-core + rm -f ${D}${PTEST_PATH}/tests/test_docs.py + # We are not trying to support mypy + rm -f ${D}${PTEST_PATH}/tests/test_mypy.py + # We are not trying to run benchmarks + rm -rf ${D}${PTEST_PATH}/tests/benchmarks + sed -i -e "/--automake/ s/$/ -k 'not test_config_validation_error_cause and not test_dataclass_config_validate_default and not test_annotated_validator_nested and not test_use_bare and not test_use_no_fields and not test_validator_bad_fields_throws_configerror and not test_assert_raises_validation_error and not test_model_config_validate_default'/" ${D}${PTEST_PATH}/run-ptest +} diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pydbus_0.6.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pydbus_0.6.0.bb index 5754fd2a..cfdacf53 100644 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pydbus_0.6.0.bb +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pydbus_0.6.0.bb @@ -20,7 +20,7 @@ RDEPENDS:${PN} = "python3-pygobject \ python3-io \ python3-logging" -RDEPENDS:${PN}-ptest += "bash" +RDEPENDS:${PN}-ptest += "bash python3-xml" do_install_ptest() { install -d ${D}${PTEST_PATH}/tests diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyfanotify_0.2.2.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyfanotify_0.2.2.bb deleted file mode 100644 index 292ceab2..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyfanotify_0.2.2.bb +++ /dev/null @@ -1,17 +0,0 @@ -SUMMARY = "Python wrapper for Linux fanotify." -HOMEPAGE = "https://github.com/baskiton/pyfanotify" -SECTION = "devel/python" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=636a36c9df04efcfacf839b8866d9a37" - -SRC_URI += "file://0001-ext-define-FNM_EXTMATCH-if-not-already-defined.patch" -SRC_URI[sha256sum] = "90219aa9f8b78fa732f24aa7b21c7bb6ac97a6eb47f1763c899b8194e23af1df" - -inherit pypi setuptools3 - -RDEPENDS:${PN} += " \ - python3-crypt \ - python3-datetime \ - python3-logging \ - python3-multiprocessing \ -" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyfanotify_0.3.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyfanotify_0.3.0.bb new file mode 100644 index 00000000..214e8063 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyfanotify_0.3.0.bb @@ -0,0 +1,17 @@ +SUMMARY = "Python wrapper for Linux fanotify." +HOMEPAGE = "https://github.com/baskiton/pyfanotify" +SECTION = "devel/python" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=636a36c9df04efcfacf839b8866d9a37" + +SRC_URI += "file://0001-ext-define-FNM_EXTMATCH-if-not-already-defined.patch" +SRC_URI[sha256sum] = "95ee17caec25436e10d59d5d45e28d2dc659819cc6de55f29fcbdcd5ee2fa8d3" + +inherit pypi setuptools3 + +RDEPENDS:${PN} += " \ + python3-crypt \ + python3-datetime \ + python3-logging \ + python3-multiprocessing \ +" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyjwt_2.8.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyjwt_2.8.0.bb deleted file mode 100644 index 92a8f44c..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyjwt_2.8.0.bb +++ /dev/null @@ -1,18 +0,0 @@ -SUMMARY = "JSON Web Token implementation in Python" -DESCRIPTION = "A Python implementation of JSON Web Token draft 32.\ - Original implementation was written by https://github.com/progrium" -HOMEPAGE = "http://github.com/jpadilla/pyjwt" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=e4b56d2c9973d8cf54655555be06e551" - -SRC_URI[sha256sum] = "57e28d156e3d5c10088e0c68abb90bfac3df82b40a71bd0daa20c65ccd5c23de" - -PYPI_PACKAGE = "PyJWT" -inherit pypi setuptools3 - -RDEPENDS:${PN} = " \ - python3-json \ - python3-cryptography \ -" - -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyjwt_2.9.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyjwt_2.9.0.bb new file mode 100644 index 00000000..7bc3cffd --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyjwt_2.9.0.bb @@ -0,0 +1,18 @@ +SUMMARY = "JSON Web Token implementation in Python" +DESCRIPTION = "A Python implementation of JSON Web Token draft 32.\ + Original implementation was written by https://github.com/progrium" +HOMEPAGE = "http://github.com/jpadilla/pyjwt" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=e4b56d2c9973d8cf54655555be06e551" + +SRC_URI[sha256sum] = "7e1e5b56cc735432a7369cbfa0efe50fa113ebecdc04ae6922deba8b84582d0c" + +PYPI_PACKAGE = "pyjwt" +inherit pypi python_setuptools_build_meta + +RDEPENDS:${PN} = "\ + python3-cryptography \ + python3-json \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pylint_3.1.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pylint_3.1.0.bb deleted file mode 100644 index 4c49acaf..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pylint_3.1.0.bb +++ /dev/null @@ -1,57 +0,0 @@ -SUMMARY="Pylint is a Python source code analyzer" -HOMEPAGE= "http://www.pylint.org/" -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://LICENSE;md5=c107cf754550e65755c42985a5d4e9c9" - -SRC_URI += "git://github.com/pylint-dev/pylint;branch=main;protocol=https \ - file://0001-Adjust-test-expectations-for-ptest.patch \ - file://run-ptest \ - " -SRCREV = "053c2c3a25f97f043e10cdd41d2609e495a68f57" - -inherit python_setuptools_build_meta ptest - -RDEPENDS:${PN} += "\ - python3-astroid \ - python3-difflib \ - python3-dill \ - python3-isort \ - python3-json \ - python3-mccabe \ - python3-netserver \ - python3-numbers \ - python3-pkgutil \ - python3-platformdirs \ - python3-shell \ - python3-tomlkit \ - " - -RDEPENDS:${PN}-ptest += " \ - python3-core \ - python3-git \ - python3-py \ - python3-pytest \ - python3-pytest-benchmark \ - python3-pytest-runner \ - python3-pytest-timeout \ - python3-pytest-xdist \ - python3-requests \ - python3-statistics \ - python3-tomllib \ - python3-typing-extensions \ - python3-unittest-automake-output \ - " - -S = "${WORKDIR}/git" - -do_install_ptest() { - install -d ${D}${PTEST_PATH}/tests - cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ - install -Dm 0644 ${S}/tests/.pylint_primer_tests/.gitkeep ${D}${PTEST_PATH}/tests/.pylint_primer_tests/.gitkeep - sed -i 's#/usr/bin/python$#/usr/bin/python3#g' ${D}${PTEST_PATH}/tests/data/ascript - # regression_distutil_import_error_73.py fails to run see - # https://lists.openembedded.org/g/openembedded-devel/topic/103181847 - rm ${D}${PTEST_PATH}/tests/functional/r/regression_02/regression_distutil_import_error_73.py -} - -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pylint_3.2.2.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pylint_3.2.2.bb new file mode 100644 index 00000000..eae30dfb --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pylint_3.2.2.bb @@ -0,0 +1,58 @@ +SUMMARY="Pylint is a Python source code analyzer" +HOMEPAGE= "http://www.pylint.org/" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://LICENSE;md5=c107cf754550e65755c42985a5d4e9c9" + +SRC_URI += "git://github.com/pylint-dev/pylint;branch=main;protocol=https \ + file://0001-Adjust-test-expectations-for-ptest.patch \ + file://run-ptest \ + " +SRCREV = "769ffd20bbf321a6cf23f5e7221a0b8221f51482" + +inherit python_setuptools_build_meta ptest + +RDEPENDS:${PN} += "\ + python3-astroid \ + python3-difflib \ + python3-dill \ + python3-isort \ + python3-json \ + python3-mccabe \ + python3-netserver \ + python3-numbers \ + python3-pkgutil \ + python3-platformdirs \ + python3-shell \ + python3-tomlkit \ + " +# python3-misc for timeit.py +RDEPENDS:${PN}-ptest += " \ + python3-core \ + python3-git \ + python3-misc \ + python3-py \ + python3-pytest \ + python3-pytest-benchmark \ + python3-pytest-runner \ + python3-pytest-timeout \ + python3-pytest-xdist \ + python3-requests \ + python3-statistics \ + python3-tomllib \ + python3-typing-extensions \ + python3-unittest-automake-output \ + " + +S = "${WORKDIR}/git" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ + install -Dm 0644 ${S}/tests/.pylint_primer_tests/.gitkeep ${D}${PTEST_PATH}/tests/.pylint_primer_tests/.gitkeep + sed -i 's#/usr/bin/python$#/usr/bin/python3#g' ${D}${PTEST_PATH}/tests/data/ascript + # regression_distutil_import_error_73.py fails to run see + # https://lists.openembedded.org/g/openembedded-devel/topic/103181847 + rm ${D}${PTEST_PATH}/tests/functional/r/regression_02/regression_distutil_import_error_73.py +} + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pymetno_0.12.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pymetno_0.12.0.bb deleted file mode 100644 index 5be6e631..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pymetno_0.12.0.bb +++ /dev/null @@ -1,16 +0,0 @@ -SUMMARY = "Python library to talk to the met.no api" -HOMEPAGE = "https://github.com/Danielhiversen/pyMetno" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=5d503272f52c35147ec960cb56a03bf4" - -SRC_URI = "git://github.com/Danielhiversen/pyMetno.git;protocol=https;branch=master" -SRCREV = "50f427aad264a4793abb94a3c8cbf987fadcd4ae" -S = "${WORKDIR}/git" - -inherit setuptools3 - -RDEPENDS:${PN} = "\ - python3-aiohttp (>=3.6.1) \ - python3-async-timeout (>=3.0.1) \ - python3-pytz (>=2019.3) \ -" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pymetno_0.13.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pymetno_0.13.0.bb new file mode 100644 index 00000000..19376066 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pymetno_0.13.0.bb @@ -0,0 +1,16 @@ +SUMMARY = "Python library to talk to the met.no api" +HOMEPAGE = "https://github.com/Danielhiversen/pyMetno" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=5d503272f52c35147ec960cb56a03bf4" + +SRC_URI = "git://github.com/Danielhiversen/pyMetno.git;protocol=https;branch=master" +SRCREV = "921812ddad3f147489916c3c7ab7fb7a80d8c646" +S = "${WORKDIR}/git" + +inherit setuptools3 + +RDEPENDS:${PN} = "\ + python3-aiohttp (>=3.6.1) \ + python3-async-timeout (>=3.0.1) \ + python3-pytz (>=2019.3) \ +" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pymisp_2.4.190.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pymisp_2.4.190.bb deleted file mode 100644 index c1389982..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pymisp_2.4.190.bb +++ /dev/null @@ -1,22 +0,0 @@ -DESCRIPTION = "Python API for MISP" -HOMEPAGE = "https://github.com/MISP/PyMISP" -LICENSE = "BSD-2-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=a3639cf5780f71b125d3e9d1dc127c20" - -SRC_URI[sha256sum] = "e7374295bfd8c7d25f56867e4395a029433360d95420e39b7f78eb1d4f8b48b4" - -inherit python_poetry_core pypi - -RDEPENDS:${PN} += " \ - python3-dateutil \ - python3-json \ - python3-jsonschema \ - python3-requests \ - python3-six \ - python3-deprecated \ - python3-wrapt \ -" - -# Fixes: python3-pymisp requires /bin/bash, but no -# providers found in RDEPENDS:python3-pymisp? [file-rdep] -RDEPENDS:${PN} += "bash" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pymisp_2.4.198.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pymisp_2.4.198.bb new file mode 100644 index 00000000..b902061c --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pymisp_2.4.198.bb @@ -0,0 +1,22 @@ +DESCRIPTION = "Python API for MISP" +HOMEPAGE = "https://github.com/MISP/PyMISP" +LICENSE = "BSD-2-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=a3639cf5780f71b125d3e9d1dc127c20" + +SRC_URI[sha256sum] = "f5583263c2fcd380570c084b21c4e4812a01c32daa7baafcdc3f87153edc9303" + +inherit python_poetry_core pypi + +RDEPENDS:${PN} += " \ + python3-dateutil \ + python3-json \ + python3-jsonschema \ + python3-requests \ + python3-six \ + python3-deprecated \ + python3-wrapt \ +" + +# Fixes: python3-pymisp requires /bin/bash, but no +# providers found in RDEPENDS:python3-pymisp? [file-rdep] +RDEPENDS:${PN} += "bash" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pymodbus_3.6.7.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pymodbus_3.6.7.bb deleted file mode 100644 index 32337725..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pymodbus_3.6.7.bb +++ /dev/null @@ -1,31 +0,0 @@ -SUMMARY = "A fully featured modbus protocol stack in python" -HOMEPAGE = "https://github.com/riptideio/pymodbus/" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=eba8057aa82c058d2042b4b0a0e9cc63" - -SRC_URI[sha256sum] = "e6cefac57f8d0e887ef49a705743787d8f1f005df94bd148e3da43c2599c77f3" - -inherit pypi python_setuptools_build_meta - -PACKAGECONFIG ??= "" -PACKAGECONFIG[repl] = ",,,python3-aiohttp python3-click python3-prompt-toolkit python3-pygments python3-pyserial-asyncio" -PACKAGECONFIG[asyncio] = ",,,python3-pyserial-asyncio" -PACKAGECONFIG[tornado] = ",,,python3-tornado" -PACKAGECONFIG[twisted] = ",,,python3-twisted-conch" -PACKAGECONFIG[redis] = ",,,python3-redis" -PACKAGECONFIG[sql] = ",,,python3-sqlalchemy" - -RDEPENDS:${PN} += " \ - python3-asyncio \ - python3-core \ - python3-io \ - python3-json \ - python3-logging \ - python3-math \ - python3-netserver \ -" - -RDEPENDS:${PN} += " \ - python3-pyserial \ - python3-six \ -" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pymodbus_3.7.2.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pymodbus_3.7.2.bb new file mode 100644 index 00000000..b240837d --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pymodbus_3.7.2.bb @@ -0,0 +1,31 @@ +SUMMARY = "A fully featured modbus protocol stack in python" +HOMEPAGE = "https://github.com/riptideio/pymodbus/" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=eba8057aa82c058d2042b4b0a0e9cc63" + +SRC_URI[sha256sum] = "6cc63a14c8cca83f5b6d9dae3319565061bd49503ee7282df681201c16357eef" + +inherit pypi python_setuptools_build_meta + +PACKAGECONFIG ??= "" +PACKAGECONFIG[repl] = ",,,python3-aiohttp python3-click python3-prompt-toolkit python3-pygments python3-pyserial-asyncio" +PACKAGECONFIG[asyncio] = ",,,python3-pyserial-asyncio" +PACKAGECONFIG[tornado] = ",,,python3-tornado" +PACKAGECONFIG[twisted] = ",,,python3-twisted-conch" +PACKAGECONFIG[redis] = ",,,python3-redis" +PACKAGECONFIG[sql] = ",,,python3-sqlalchemy" + +RDEPENDS:${PN} += " \ + python3-asyncio \ + python3-core \ + python3-io \ + python3-json \ + python3-logging \ + python3-math \ + python3-netserver \ +" + +RDEPENDS:${PN} += " \ + python3-pyserial \ + python3-six \ +" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pymongo_4.6.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pymongo_4.6.1.bb deleted file mode 100644 index 260e134c..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pymongo_4.6.1.bb +++ /dev/null @@ -1,30 +0,0 @@ -SUMMARY = "Python driver for MongoDB " -DESCRIPTION = "\ -The PyMongo distribution contains tools for interacting with MongoDB \ -database from Python. The bson package is an implementation of the BSON \ -format for Python. The pymongo package is a native Python driver for \ -MongoDB. The gridfs package is a gridfs implementation on top of pymongo." -HOMEPAGE = "http://github.com/mongodb/mongo-python-driver" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" - -SRC_URI[sha256sum] = "31dab1f3e1d0cdd57e8df01b645f52d43cc1b653ed3afd535d2891f4fc4f9712" - -inherit pypi setuptools3 - -PACKAGES =+ "python3-bson" - -FILES:python3-bson = "${PYTHON_SITEPACKAGES_DIR}/bson/*" - -RDEPENDS:python3-bson += " \ - python3-datetime \ - python3-json \ - python3-netclient \ - python3-numbers \ - python3-threading \ -" - -RDEPENDS:${PN} += " \ - python3-bson \ - python3-pprint \ -" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pymongo_4.8.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pymongo_4.8.0.bb new file mode 100644 index 00000000..fcce456d --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pymongo_4.8.0.bb @@ -0,0 +1,36 @@ +SUMMARY = "Python driver for MongoDB " +DESCRIPTION = "\ +The PyMongo distribution contains tools for interacting with MongoDB \ +database from Python. The bson package is an implementation of the BSON \ +format for Python. The pymongo package is a native Python driver for \ +MongoDB. The gridfs package is a gridfs implementation on top of pymongo." +HOMEPAGE = "http://github.com/mongodb/mongo-python-driver" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" + +SRC_URI[sha256sum] = "454f2295875744dc70f1881e4b2eb99cdad008a33574bc8aaf120530f66c0cde" + +inherit pypi python_setuptools_build_meta python_hatchling + +PACKAGES =+ "python3-bson" + +FILES:python3-bson = "${PYTHON_SITEPACKAGES_DIR}/bson/*" + +DEPENDS += " \ + python3-hatch-requirements-txt-native \ +" + +RDEPENDS:python3-bson += " \ + python3-datetime \ + python3-json \ + python3-netclient \ + python3-numbers \ + python3-threading \ +" + +RDEPENDS:${PN} += " \ + python3-bson \ + python3-pprint \ + python3-difflib \ + python3-logging \ +" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyperclip_1.8.2.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyperclip_1.8.2.bb deleted file mode 100644 index dcf0015c..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyperclip_1.8.2.bb +++ /dev/null @@ -1,14 +0,0 @@ -DESCRIPTION = "A cross-platform clipboard module for Python. (only handles plain text for now)" -HOMEPAGE = "https://github.com/asweigart/pyperclip" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=d7dd4b0d1f7153322a546e89b5a0a632" - -SRC_URI[sha256sum] = "105254a8b04934f0bc84e9c24eb360a591aaf6535c9def5f29d92af107a9bf57" - -inherit pypi setuptools3 - -RDEPENDS:${PN} += " \ - python3-ctypes \ -" - -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyperclip_1.9.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyperclip_1.9.0.bb new file mode 100644 index 00000000..80af514f --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyperclip_1.9.0.bb @@ -0,0 +1,14 @@ +DESCRIPTION = "A cross-platform clipboard module for Python. (only handles plain text for now)" +HOMEPAGE = "https://github.com/asweigart/pyperclip" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=d7dd4b0d1f7153322a546e89b5a0a632" + +SRC_URI[sha256sum] = "b7de0142ddc81bfc5c7507eea19da920b92252b548b96186caf94a5e2527d310" + +inherit pypi setuptools3 + +RDEPENDS:${PN} += " \ + python3-ctypes \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyperf_2.6.3.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyperf_2.6.3.bb deleted file mode 100644 index 6b37e186..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyperf_2.6.3.bb +++ /dev/null @@ -1,23 +0,0 @@ -SUMMARY = "A toolkit to write, run and analyze benchmarks" -DESCRIPTION = " \ -The Python pyperf module is a toolkit to write, run and analyze benchmarks. \ -Features: \ - * Simple API to run reliable benchmarks \ - * Automatically calibrate a benchmark for a time budget. \ - * Spawn multiple worker processes. \ - * Compute the mean and standard deviation. \ - * Detect if a benchmark result seems unstable. \ - * JSON format to store benchmark results. \ - * Support multiple units: seconds, bytes and integer. \ -" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://COPYING;md5=78bc2e6e87c8c61272937b879e6dc2f8" - -SRC_URI[sha256sum] = "9752fe749c21e460a564bb3f52fc319b892c62ee61c5138b4a9bbf94ad2755e6" - -DEPENDS += "python3-six-native" - -PYPI_PACKAGE = "pyperf" -inherit pypi python_setuptools_build_meta - -RDEPENDS:${PN} += "python3-misc python3-statistics" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyperf_2.7.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyperf_2.7.0.bb new file mode 100644 index 00000000..f3ebfe2d --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyperf_2.7.0.bb @@ -0,0 +1,23 @@ +SUMMARY = "A toolkit to write, run and analyze benchmarks" +DESCRIPTION = " \ +The Python pyperf module is a toolkit to write, run and analyze benchmarks. \ +Features: \ + * Simple API to run reliable benchmarks \ + * Automatically calibrate a benchmark for a time budget. \ + * Spawn multiple worker processes. \ + * Compute the mean and standard deviation. \ + * Detect if a benchmark result seems unstable. \ + * JSON format to store benchmark results. \ + * Support multiple units: seconds, bytes and integer. \ +" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=78bc2e6e87c8c61272937b879e6dc2f8" + +SRC_URI[sha256sum] = "4201c6601032f374e9c900c6d2544a2f5891abedc1a96eec0e7b2338a6247589" + +DEPENDS += "python3-six-native" + +PYPI_PACKAGE = "pyperf" +inherit pypi python_setuptools_build_meta + +RDEPENDS:${PN} += "python3-misc python3-statistics" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyproj_3.6.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyproj_3.6.1.bb index f6b6ee8a..cad9464c 100644 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyproj_3.6.1.bb +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyproj_3.6.1.bb @@ -4,9 +4,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=873757af01d2d221eedb422c4c1dd163" DEPENDS = "python3-cython proj" DEPENDS:append:class-target = " python3-cython-native proj-native" -PYPI_PACKAGE = "pyproj" - -inherit pypi setuptools3 +inherit pypi python_setuptools_build_meta SRC_URI += "file://rpath.patch" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyproject-api_1.6.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyproject-api_1.6.1.bb deleted file mode 100644 index aec19949..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyproject-api_1.6.1.bb +++ /dev/null @@ -1,23 +0,0 @@ -# SPDX-License-Identifier: MIT -# Copyright (C) 2023 iris-GmbH infrared & intelligent sensors - -SUMMARY = "pyproject-api aims to abstract away interaction with pyproject.toml style projects in a flexible way." -HOMEPAGE = "https://pyproject-api.readthedocs.io" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=11610a9d8fd95649cf8159be12b98cb7" - -SRC_URI[sha256sum] = "1817dc018adc0d1ff9ca1ed8c60e1623d5aaca40814b953af14a9cf9a5cae538" - -PYPI_PACKAGE = "pyproject_api" - -BBCLASSEXTEND = "native nativesdk" -inherit pypi python_hatchling - -DEPENDS += "\ - python3-hatch-vcs-native \ -" - -RDEPENDS:${PN} += "\ - python3-packaging \ - python3-tomli \ -" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyproject-api_1.7.2.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyproject-api_1.7.2.bb new file mode 100644 index 00000000..ee8949ad --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyproject-api_1.7.2.bb @@ -0,0 +1,23 @@ +# SPDX-License-Identifier: MIT +# Copyright (C) 2023 iris-GmbH infrared & intelligent sensors + +SUMMARY = "pyproject-api aims to abstract away interaction with pyproject.toml style projects in a flexible way." +HOMEPAGE = "https://pyproject-api.readthedocs.io" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=11610a9d8fd95649cf8159be12b98cb7" + +SRC_URI[sha256sum] = "dc5b0e0f6e291a4f22b46e182c9c6d4915c62b1f089b8de1b73f2d06ae453593" + +PYPI_PACKAGE = "pyproject_api" + +BBCLASSEXTEND = "native nativesdk" +inherit pypi python_hatchling + +DEPENDS += "\ + python3-hatch-vcs-native \ +" + +RDEPENDS:${PN} += "\ + python3-packaging \ + python3-tomli \ +" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyroute2_0.7.10.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyroute2_0.7.10.bb deleted file mode 100644 index 740a6d7f..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyroute2_0.7.10.bb +++ /dev/null @@ -1,41 +0,0 @@ -SUMMARY = "A pure Python netlink and Linux network configuration library" -LICENSE = "GPL-2.0-or-later | Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=dccbff78d7d79ae7e53953d43445c6e6 \ - file://LICENSE.GPL-2.0-or-later;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://LICENSE.Apache-2.0;md5=34281e312165f843a2b7d1f114fe65ce" - -SRC_URI[sha256sum] = "cc2f90aad1517cb0b301041f678cc8d3c3427c26e53f15c78c93c67928d89a02" - -inherit setuptools3 pypi ptest - -RDEPENDS:${PN} += " \ - python3-ctypes \ - python3-io \ - python3-json \ - python3-fcntl \ - python3-logging \ - python3-multiprocessing \ - python3-pickle \ - python3-pkgutil \ - python3-pprint \ - python3-shell \ - python3-unixadmin \ -" - -SRC_URI += " \ - file://run-ptest \ -" - -RDEPENDS:${PN}-ptest += " \ - python3-fcntl \ - python3-pytest \ - python3-sqlite3 \ - python3-unittest-automake-output \ -" - -do_install_ptest() { - install -d ${D}${PTEST_PATH}/tests - cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ - sed -e "s|'test_unit|'tests/test_unit|g" -i ${D}${PTEST_PATH}/tests/test_unit/test_nlmsg/test_marshal.py \ - ${D}${PTEST_PATH}/tests/test_unit/test_iproute_match/test_match.py -} diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyroute2_0.7.12.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyroute2_0.7.12.bb new file mode 100644 index 00000000..cf9885df --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyroute2_0.7.12.bb @@ -0,0 +1,41 @@ +SUMMARY = "A pure Python netlink and Linux network configuration library" +LICENSE = "GPL-2.0-or-later | Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=dccbff78d7d79ae7e53953d43445c6e6 \ + file://LICENSE.GPL-2.0-or-later;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://LICENSE.Apache-2.0;md5=34281e312165f843a2b7d1f114fe65ce" + +SRC_URI[sha256sum] = "54d226fc3ff2732f49bac9b26853c50c9d05be05a4d9daf09c7cf6d77301eff3" + +inherit python_setuptools_build_meta pypi ptest + +RDEPENDS:${PN} += " \ + python3-ctypes \ + python3-io \ + python3-json \ + python3-fcntl \ + python3-logging \ + python3-multiprocessing \ + python3-pickle \ + python3-pkgutil \ + python3-pprint \ + python3-shell \ + python3-unixadmin \ +" + +SRC_URI += " \ + file://run-ptest \ +" + +RDEPENDS:${PN}-ptest += " \ + python3-fcntl \ + python3-pytest \ + python3-sqlite3 \ + python3-unittest-automake-output \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ + sed -e "s|'test_unit|'tests/test_unit|g" -i ${D}${PTEST_PATH}/tests/test_unit/test_nlmsg/test_marshal.py \ + ${D}${PTEST_PATH}/tests/test_unit/test_iproute_match/test_match.py +} diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyruvate_1.2.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyruvate_1.2.1.bb index 2807c054..297eecad 100644 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyruvate_1.2.1.bb +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyruvate_1.2.1.bb @@ -9,16 +9,16 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263" SRC_URI += "\ git://gitlab.com/tschorr/pyruvate.git;protocol=https;branch=main \ - file://0001-linux.rs-Define-consts-for-rv32-architecture.patch;patchdir=../cargo_home/bitbake/nix-0.23.2/ \ - file://0001-musl-Define-SOCK_NONBLOCK-with-O_NONBLOCK.patch;patchdir=../cargo_home/bitbake/libc-0.2.138/ \ - file://0001-musl-riscv32-Define-F_SETLK-F_SETLKW-and-fix-F_GETLK.patch;patchdir=../cargo_home/bitbake/libc-0.2.138/ \ - file://0001-musl-Move-F_OFD_GETLK-F_OFD_SETLK-and-F_OFD_SETLKW-t.patch;patchdir=../cargo_home/bitbake/libc-0.2.138/ \ - file://0001-musl-Define-O_LARGEFILE-for-riscv32.patch;patchdir=../cargo_home/bitbake/libc-0.2.138/ \ - file://0001-musl-Define-SOCK_SEQPACKET-in-common-place.patch;patchdir=../cargo_home/bitbake/libc-0.2.138/ \ + file://0001-linux.rs-Define-consts-for-rv32-architecture.patch;patchdir=${UNPACKDIR}/cargo_home/bitbake/nix-0.23.2/ \ + file://0001-musl-Define-SOCK_NONBLOCK-with-O_NONBLOCK.patch;patchdir=${UNPACKDIR}/cargo_home/bitbake/libc-0.2.138/ \ + file://0001-musl-riscv32-Define-F_SETLK-F_SETLKW-and-fix-F_GETLK.patch;patchdir=${UNPACKDIR}/cargo_home/bitbake/libc-0.2.138/ \ + file://0001-musl-Move-F_OFD_GETLK-F_OFD_SETLK-and-F_OFD_SETLKW-t.patch;patchdir=${UNPACKDIR}/cargo_home/bitbake/libc-0.2.138/ \ + file://0001-musl-Define-O_LARGEFILE-for-riscv32.patch;patchdir=${UNPACKDIR}/cargo_home/bitbake/libc-0.2.138/ \ + file://0001-musl-Define-SOCK_SEQPACKET-in-common-place.patch;patchdir=${UNPACKDIR}/cargo_home/bitbake/libc-0.2.138/ \ " SRCREV = "57db64c9f65ced05c71b8d786c1cedfaa2991597" -SRC_URI:append:mips = " file://0001-check-for-mips-targets-for-stat.st_dev-definitions.patch;patchdir=../cargo_home/bitbake/libsystemd-0.5.0/" +SRC_URI:append:mips = " file://0001-check-for-mips-targets-for-stat.st_dev-definitions.patch;patchdir=${UNPACKDIR}/cargo_home/bitbake/libsystemd-0.5.0/" S = "${WORKDIR}/git" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-freezer_0.4.8.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-freezer_0.4.8.bb new file mode 100644 index 00000000..6ff69a39 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-freezer_0.4.8.bb @@ -0,0 +1,15 @@ +SUMMARY = "Pytest plugin providing a fixture interface for spulec/freezegun" +HOMEPAGE = "https://github.com/pytest-dev/pytest-freezer" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=1661a0f2b9b83ed73b8e05b5683b10d0" + +SRC_URI[sha256sum] = "8ee2f724b3ff3540523fa355958a22e6f4c1c819928b78a7a183ae4248ce6ee6" + +inherit pypi python_flit_core + +RDEPENDS:${PN} = "\ + python3-freezegun (>=1.0) \ + python3-pytest (>=3.6) \ +" + +PYPI_PACKAGE = "pytest_freezer" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-lazy-fixtures_1.0.7.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-lazy-fixtures_1.0.7.bb deleted file mode 100644 index f5e6dbfc..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-lazy-fixtures_1.0.7.bb +++ /dev/null @@ -1,21 +0,0 @@ -SUMMARY = "Allows you to use fixtures in @pytest.mark.parametrize." -DESCRIPTION = "Use your fixtures in @pytest.mark.parametrize. \ -\ -This project was inspired by pytest-lazy-fixture.\ -\ -Improvements that have been made in this project:\ -\ -* You can use fixtures in any data structures\ -* You can access the attributes of fixtures\ -* You can use functions in fixtures" -HOMEPAGE = "https://github.com/dev-petrov/pytest-lazy-fixtures" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=4475e66fcfabe27395e6764c8f69c876" - -SRC_URI[sha256sum] = "87ef7424dc0229ff9cb72d482f49b7806535c3500641f612c13ddf243c9adacb" - -inherit pypi python_poetry_core - -PYPI_PACKAGE = "pytest_lazy_fixtures" - -RDEPENDS:${PN} = "python3-pytest" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-lazy-fixtures_1.1.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-lazy-fixtures_1.1.1.bb new file mode 100644 index 00000000..bd6d81ae --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-lazy-fixtures_1.1.1.bb @@ -0,0 +1,21 @@ +SUMMARY = "Allows you to use fixtures in @pytest.mark.parametrize." +DESCRIPTION = "Use your fixtures in @pytest.mark.parametrize. \ +\ +This project was inspired by pytest-lazy-fixture.\ +\ +Improvements that have been made in this project:\ +\ +* You can use fixtures in any data structures\ +* You can access the attributes of fixtures\ +* You can use functions in fixtures" +HOMEPAGE = "https://github.com/dev-petrov/pytest-lazy-fixtures" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=4475e66fcfabe27395e6764c8f69c876" + +SRC_URI[sha256sum] = "0c561f0d29eea5b55cf29b9264a3241999ffdb74c6b6e8c4ccc0bd2c934d01ed" + +inherit pypi python_poetry_core + +PYPI_PACKAGE = "pytest_lazy_fixtures" + +RDEPENDS:${PN} = "python3-pytest" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-metadata_2.0.2.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-metadata_2.0.2.bb index 163a363f..9243f664 100644 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-metadata_2.0.2.bb +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-metadata_2.0.2.bb @@ -6,9 +6,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=5d425c8f3157dbf212db2ec53d9e5132" SRC_URI[sha256sum] = "fcd2f416f15be295943527b3c8ba16a44ae5a7141939c90c3dc5ce9d167cf2a5" -PYPI_PACKAGE = "pytest-metadata" - -inherit pypi setuptools3 +inherit pypi python_poetry_core RDEPENDS:${PN} = " \ python3-pytest \ diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-mock/0001-test_pytest_mock-skip-args-introspection-tests.patch b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-mock/0001-test_pytest_mock-skip-args-introspection-tests.patch deleted file mode 100644 index f024e79d..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-mock/0001-test_pytest_mock-skip-args-introspection-tests.patch +++ /dev/null @@ -1,38 +0,0 @@ -From e184fb950ad3b52c5c16438d39fe4d516c784e30 Mon Sep 17 00:00:00 2001 -From: Trevor Gamblin -Date: Thu, 12 Oct 2023 17:32:40 -0400 -Subject: [PATCH] test_pytest_mock: skip args introspection tests - -Disable these two tests for now so that python3-pytest-mock can have -successful ptest runs. - -Upstream-Status: Inappropriate [OE-Specific] - -Signed-off-by: Trevor Gamblin ---- - tests/test_pytest_mock.py | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/tests/test_pytest_mock.py b/tests/test_pytest_mock.py -index 3d53241..157b6c3 100644 ---- a/tests/test_pytest_mock.py -+++ b/tests/test_pytest_mock.py -@@ -581,6 +581,7 @@ def test_assert_called_wrapper(mocker: MockerFixture) -> None: - stub.assert_called() - - -+@pytest.mark.skip("Async not correctly detected, skip for now") - @pytest.mark.usefixtures("needs_assert_rewrite") - def test_assert_called_args_with_introspection(mocker: MockerFixture) -> None: - stub = mocker.stub() -@@ -597,6 +598,7 @@ def test_assert_called_args_with_introspection(mocker: MockerFixture) -> None: - stub.assert_called_once_with(*wrong_args) - - -+@pytest.mark.skip("Async not correctly detected, skip for now") - @pytest.mark.usefixtures("needs_assert_rewrite") - def test_assert_called_kwargs_with_introspection(mocker: MockerFixture) -> None: - stub = mocker.stub() --- -2.41.0 - diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-mock/403.patch b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-mock/403.patch deleted file mode 100644 index 6787c2a3..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-mock/403.patch +++ /dev/null @@ -1,92 +0,0 @@ -From 8480bb6d0500f933be039cfec65e04157e6ecffe Mon Sep 17 00:00:00 2001 -From: Bruno Oliveira -Date: Tue, 19 Dec 2023 08:24:23 -0300 -Subject: [PATCH 1/3] Fix tests for Python 3.11 and 3.12 - -Fixes #401. -Upstream-Status: Backport [https://github.com/pytest-dev/pytest-mock/pull/403] -Signed-off-by: Khem Raj ---- - tests/test_pytest_mock.py | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/tests/test_pytest_mock.py b/tests/test_pytest_mock.py -index 3ee00da..7acb361 100644 ---- a/tests/test_pytest_mock.py -+++ b/tests/test_pytest_mock.py -@@ -246,9 +246,8 @@ def __test_failure_message(self, mocker: MockerFixture, **kwargs: Any) -> None: - msg = "Expected call: {0}()\nNot called" - expected_message = msg.format(expected_name) - stub = mocker.stub(**kwargs) -- with pytest.raises(AssertionError) as exc_info: -+ with pytest.raises(AssertionError, match=re.escape(expected_message)) as exc_info: - stub.assert_called_with() -- assert str(exc_info.value) == expected_message - - def test_failure_message_with_no_name(self, mocker: MagicMock) -> None: - self.__test_failure_message(mocker) - -From c596504e062be06475b03122c9c0cc732ae87840 Mon Sep 17 00:00:00 2001 -From: "pre-commit-ci[bot]" - <66853113+pre-commit-ci[bot]@users.noreply.github.com> -Date: Tue, 19 Dec 2023 11:24:38 +0000 -Subject: [PATCH 2/3] [pre-commit.ci] auto fixes from pre-commit.com hooks - -for more information, see https://pre-commit.ci ---- - tests/test_pytest_mock.py | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/tests/test_pytest_mock.py b/tests/test_pytest_mock.py -index 7acb361..c185f2a 100644 ---- a/tests/test_pytest_mock.py -+++ b/tests/test_pytest_mock.py -@@ -246,7 +246,9 @@ def __test_failure_message(self, mocker: MockerFixture, **kwargs: Any) -> None: - msg = "Expected call: {0}()\nNot called" - expected_message = msg.format(expected_name) - stub = mocker.stub(**kwargs) -- with pytest.raises(AssertionError, match=re.escape(expected_message)) as exc_info: -+ with pytest.raises( -+ AssertionError, match=re.escape(expected_message) -+ ) as exc_info: - stub.assert_called_with() - - def test_failure_message_with_no_name(self, mocker: MagicMock) -> None: - -From 6da5b0506d6378a8dbe5ae314d5134e6868aeabd Mon Sep 17 00:00:00 2001 -From: danigm -Date: Wed, 20 Dec 2023 16:02:13 +0100 -Subject: [PATCH 3/3] Update expected message to match python 3.11.7 (#404) - -https://github.com/python/cpython/issues/111019 - -Fixes #401. -Closes #403. ---- - tests/test_pytest_mock.py | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/tests/test_pytest_mock.py b/tests/test_pytest_mock.py -index c185f2a..01534a4 100644 ---- a/tests/test_pytest_mock.py -+++ b/tests/test_pytest_mock.py -@@ -25,6 +25,8 @@ - - # Python 3.8 changed the output formatting (bpo-35500), which has been ported to mock 3.0 - NEW_FORMATTING = sys.version_info >= (3, 8) -+# Python 3.11.7 changed the output formatting, https://github.com/python/cpython/issues/111019 -+NEWEST_FORMATTING = sys.version_info >= (3, 11, 7) - - if sys.version_info[:2] >= (3, 8): - from unittest.mock import AsyncMock -@@ -240,7 +242,9 @@ def test_repr_with_name(self, mocker: MockerFixture) -> None: - - def __test_failure_message(self, mocker: MockerFixture, **kwargs: Any) -> None: - expected_name = kwargs.get("name") or "mock" -- if NEW_FORMATTING: -+ if NEWEST_FORMATTING: -+ msg = "expected call not found.\nExpected: {0}()\n Actual: not called." -+ elif NEW_FORMATTING: - msg = "expected call not found.\nExpected: {0}()\nActual: not called." - else: - msg = "Expected call: {0}()\nNot called" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-mock/run-ptest b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-mock/run-ptest index 8d2017d3..51ae892b 100644 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-mock/run-ptest +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-mock/run-ptest @@ -1,3 +1,3 @@ #!/bin/sh - -pytest --automake +# see https://github.com/pytest-dev/pytest-mock/issues/102 for reasons to use plain asserts +pytest --automake --assert=plain diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-mock_3.12.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-mock_3.12.0.bb deleted file mode 100644 index e9a9a4fb..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-mock_3.12.0.bb +++ /dev/null @@ -1,33 +0,0 @@ -SUMMARY = "Thin-wrapper around the mock package for easier use with pytest" -HOMEPAGE = "https://github.com/pytest-dev/pytest-mock/" -LICENSE = "MIT" -LIC_FILES_CHKSUM = " \ - file://LICENSE;md5=b2ddb1e69238461b7e4ef2a84d874109 \ -" - -SRC_URI = " \ - git://github.com/pytest-dev/pytest-mock;branch=main;protocol=https \ - file://run-ptest \ - file://0001-test_pytest_mock-skip-args-introspection-tests.patch \ - file://403.patch \ -" -SRCREV = "69adc6f76c1a7baf4e7a728da9eec38741d5783e" - -inherit setuptools3 ptest - -DEPENDS += "python3-setuptools-scm-native" - -RDEPENDS:${PN} += " \ - python3-asyncio \ - python3-pytest \ - python3-pytest-asyncio \ - python3-unittest \ - python3-unittest-automake-output \ -" - -S = "${WORKDIR}/git" - -do_install_ptest() { - install -d ${D}${PTEST_PATH}/tests - cp -rf ${S}/tests ${D}${PTEST_PATH}/ -} diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-mock_3.14.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-mock_3.14.0.bb new file mode 100644 index 00000000..b968cf1c --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-mock_3.14.0.bb @@ -0,0 +1,32 @@ +SUMMARY = "Thin-wrapper around the mock package for easier use with pytest" +HOMEPAGE = "https://github.com/pytest-dev/pytest-mock/" +LICENSE = "MIT" +LIC_FILES_CHKSUM = " \ + file://LICENSE;md5=b2ddb1e69238461b7e4ef2a84d874109 \ +" + +SRC_URI += " \ + file://run-ptest \ +" +SRC_URI[sha256sum] = "2719255a1efeceadbc056d6bf3df3d1c5015530fb40cf347c0f9afac88410bd0" + +inherit pypi python_setuptools_build_meta ptest + +PYPI_PACKAGE = "pytest-mock" + +DEPENDS += "python3-setuptools-scm-native" + +RDEPENDS:${PN}-ptest += " \ + python3-misc \ + python3-mock \ + python3-pytest \ + python3-pytest-asyncio \ + python3-threading \ + python3-tox \ + python3-unittest-automake-output \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests ${D}${PTEST_PATH}/ +} diff --git a/sources/poky/meta/recipes-devtools/python/python3-pytest-runner_6.0.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-runner_6.0.1.bb similarity index 79% rename from sources/poky/meta/recipes-devtools/python/python3-pytest-runner_6.0.1.bb rename to sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-runner_6.0.1.bb index cce9ce33..e5e5e048 100644 --- a/sources/poky/meta/recipes-devtools/python/python3-pytest-runner_6.0.1.bb +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-runner_6.0.1.bb @@ -10,7 +10,6 @@ inherit pypi python_setuptools_build_meta DEPENDS += " \ python3-setuptools-scm-native" -RDEPENDS:${PN} = "python3-py python3-setuptools python3-debugger python3-json \ - python3-io" +RDEPENDS:${PN} = "python3-setuptools python3-debugger python3-json python3-io" BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-socket_0.7.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-socket_0.7.0.bb new file mode 100644 index 00000000..86b03724 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-socket_0.7.0.bb @@ -0,0 +1,14 @@ +SUMMARY = "Pytest Plugin to disable socket calls during tests" +HOMEPAGE = "https://github.com/miketheman/pytest-socket" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=1752f63a3a8a02fed42e580e9b94a081" + +SRC_URI[sha256sum] = "71ab048cbbcb085c15a4423b73b619a8b35d6a307f46f78ea46be51b1b7e11b3" + +inherit pypi python_poetry_core + +RDEPENDS:${PN} = "python3-pytest" + +BBCLASSEXTEND = "native nativesdk" + +PYPI_PACKAGE = "pytest_socket" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-timeout_2.3.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-timeout_2.3.1.bb index b56c26aa..fe9d814c 100644 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-timeout_2.3.1.bb +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-timeout_2.3.1.bb @@ -3,10 +3,8 @@ HOMEPAGE = "https://github.com/pytest-dev/pytest-timeout/" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENSE;md5=d8048cd156eda3df2e7f111b0ae9ceff" -PYPI_PACKAGE = "pytest-timeout" - SRC_URI[sha256sum] = "12397729125c6ecbdaca01035b9e5239d4db97352320af155b3f5de1ba5165d9" -inherit pypi setuptools3 +inherit pypi python_setuptools_build_meta RDEPENDS:${PN} = "python3-pytest" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-unordered_0.6.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-unordered_0.6.0.bb new file mode 100644 index 00000000..bf1420cf --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-unordered_0.6.0.bb @@ -0,0 +1,12 @@ +SUMMARY = "Test equality of unordered collections in pytest" +HOMEPAGE = "https://github.com/utapyngo/pytest-unordered" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=fcd3af2d38a4d4dfd5138c6f163dbe2e" + +SRC_URI[sha256sum] = "f61b4f6e06a60a92db50968954efac93e2f584290a49f53ad135e3f32f57e02a" + +inherit pypi setuptools3 + +RDEPENDS:${PN} += "python3-pytest" + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyudev_0.24.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyudev_0.24.1.bb deleted file mode 100644 index ed5175fc..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyudev_0.24.1.bb +++ /dev/null @@ -1,22 +0,0 @@ -SUMMARY = "A libudev binding" - -LICENSE = "LGPL-2.1-or-later" -LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343" - -SRC_URI[sha256sum] = "75e54d37218f5ac45b0da1f0fd9cc5e526a3cac3ef1cfad410cf7ab338b01471" - -inherit pypi setuptools3 - -do_configure:prepend() { - sed -i "/import pyudev/d" ${S}/setup.py - sed -i "s/str(pyudev.__version__)/'${PV}'/g" ${S}/setup.py -} - -RDEPENDS:${PN} = "\ - python3-ctypes \ - python3-misc \ - python3-six \ - python3-threading \ - python3-fcntl \ - libudev \ -" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyudev_0.24.3.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyudev_0.24.3.bb new file mode 100644 index 00000000..a44fdad3 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyudev_0.24.3.bb @@ -0,0 +1,22 @@ +SUMMARY = "A libudev binding" + +LICENSE = "LGPL-2.1-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343" + +SRC_URI[sha256sum] = "2e945427a21674893bb97632401db62139d91cea1ee96137cc7b07ad22198fc7" + +inherit pypi python_setuptools_build_meta + +do_configure:prepend() { + sed -i "/import pyudev/d" ${S}/setup.py + sed -i "s/str(pyudev.__version__)/'${PV}'/g" ${S}/setup.py +} + +RDEPENDS:${PN} = "\ + python3-ctypes \ + python3-misc \ + python3-six \ + python3-threading \ + python3-fcntl \ + libudev \ +" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyunormalize_15.1.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyunormalize_15.1.0.bb deleted file mode 100644 index 6992ca24..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyunormalize_15.1.0.bb +++ /dev/null @@ -1,8 +0,0 @@ -SUMMARY = "Unicode normalization forms (NFC, NFKC, NFD, NFKD). A library independent from the Python core Unicode database." -HOMEPAGE = "https://github.com/mlodewijck/pyunormalize" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=dc15b678c3bac1f5b2c873591a330eae" - -SRC_URI[sha256sum] = "cf4a87451a0f1cb76911aa97f432f4579e1f564a2f0c84ce488c73a73901b6c1" - -inherit pypi setuptools3 diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyunormalize_16.0.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyunormalize_16.0.0.bb new file mode 100644 index 00000000..19463bc2 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyunormalize_16.0.0.bb @@ -0,0 +1,8 @@ +SUMMARY = "Unicode normalization forms (NFC, NFKC, NFD, NFKD). A library independent from the Python core Unicode database." +HOMEPAGE = "https://github.com/mlodewijck/pyunormalize" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=e2c2ee871081d4e4c24f32e37c413c73" + +SRC_URI[sha256sum] = "2e1dfbb4a118154ae26f70710426a52a364b926c9191f764601f5a8cb12761f7" + +inherit pypi setuptools3 diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyyaml-include_1.3.2.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyyaml-include_1.3.2.bb deleted file mode 100644 index 309d0ac5..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyyaml-include_1.3.2.bb +++ /dev/null @@ -1,29 +0,0 @@ -SUMMARY = "Extending PyYAML with a custom constructor for including YAML files within YAML files" -HOMEPAGE = "https://github.com/tanbro/pyyaml-include" -LICENSE = "GPL-3.0-only" -LIC_FILES_CHKSUM = "file://LICENSE;md5=d32239bcb673463ab874e80d47fae504" -DEPENDS += "python3-setuptools-scm-native" -SRCREV = "36b6975aa8fc7a6cbf37de40aa2ed6d996b2f7be" - -SRC_URI = " \ - git://github.com/tanbro/pyyaml-include;protocol=https;branch=main \ - file://run-ptest \ - " - -S = "${WORKDIR}/git" - -inherit python_setuptools_build_meta ptest - -do_install_ptest() { - install -d ${D}${PTEST_PATH}/tests - cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ -} - -RDEPENDS:${PN} += " \ - python3-pyyaml \ -" -RDEPENDS:${PN}-ptest += " \ - python3-pytest \ - python3-unittest-automake-output \ -" -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyyaml-include_2.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyyaml-include_2.1.bb new file mode 100644 index 00000000..058699fd --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyyaml-include_2.1.bb @@ -0,0 +1,32 @@ +SUMMARY = "Extending PyYAML with a custom constructor for including YAML files within YAML files" +HOMEPAGE = "https://github.com/tanbro/pyyaml-include" +LICENSE = "GPL-3.0-only" +LIC_FILES_CHKSUM = "file://LICENSE;md5=d32239bcb673463ab874e80d47fae504" +DEPENDS += "python3-setuptools-scm-native" +SRCREV = "dc16153b28f5cab997814c0ce9b43dc4c58507e7" + +SRC_URI = " \ + git://github.com/tanbro/pyyaml-include;protocol=https;branch=main \ + file://run-ptest \ + " + +S = "${WORKDIR}/git" + +inherit python_setuptools_build_meta ptest + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ +} + +RDEPENDS:${PN} += " \ + python3-pyyaml \ +" +RDEPENDS:${PN}-ptest += " \ + python3-fsspec \ + python3-aiohttp \ + python3-requests \ + python3-pytest \ + python3-unittest-automake-output \ +" +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyzstd_0.15.10.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyzstd_0.15.10.bb deleted file mode 100644 index c094a8d6..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyzstd_0.15.10.bb +++ /dev/null @@ -1,18 +0,0 @@ -DESCRIPTION = "Pyzstd module provides classes and functions for compressing and \ -decompressing data, using Facebook’s Zstandard (or zstd as short name) algorithm." -HOMEPAGE = "https://github.com/animalize/pyzstd" -SECTION = "devel/python" - -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=aedb5a2679cd1552fb61c181ef974b9e" - -PYPI_PACKAGE = "pyzstd" - -SRC_URI[sha256sum] = "83603a97fdbcf2139f475c940789f09e32703f931f29f4a8ddf3551e6700108b" - -inherit pypi setuptools3 - -# clang-16 with -flto segfaults on arm, therefore ignore flto for now -do_configure:append:arm:toolchain-clang() { - sed -i -e "s|'-flto'|''|" ${S}/setup.py -} diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyzstd_0.16.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyzstd_0.16.1.bb new file mode 100644 index 00000000..a4aae4ac --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pyzstd_0.16.1.bb @@ -0,0 +1,18 @@ +DESCRIPTION = "Pyzstd module provides classes and functions for compressing and \ +decompressing data, using Facebook’s Zstandard (or zstd as short name) algorithm." +HOMEPAGE = "https://github.com/animalize/pyzstd" +SECTION = "devel/python" + +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=aedb5a2679cd1552fb61c181ef974b9e" + +PYPI_PACKAGE = "pyzstd" + +SRC_URI[sha256sum] = "ed50c08233878c155c73ab2622e115cd9e46c0f1c2e2ddd76f2e7ca24933f195" + +inherit pypi setuptools3 + +# clang-16 with -flto segfaults on arm, therefore ignore flto for now +do_configure:append:arm:toolchain-clang() { + sed -i -e "s|'-flto'|''|" ${S}/setup.py +} diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-qface_2.0.11.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-qface_2.0.11.bb new file mode 100644 index 00000000..9ecaf569 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-qface_2.0.11.bb @@ -0,0 +1,24 @@ +SUMMARY = "A generator framework based on a common modern IDL" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=eee61e10a40b0e3045ee5965bcd9a8b5" + +SRC_URI[sha256sum] = "b55c239f3ae7e23c5c8434f38901c5bcacb6afd17e88e37934b46e44558df295" + +inherit pypi setuptools3 + +DEPS = "\ + python3-jinja2 \ + python3-click \ + python3-pyyaml \ + python3-pytest \ + python3-six \ + python3-path \ + python3-antlr4-runtime \ + python3-watchdog \ + python3-markupsafe \ + python3-setuptools \ +" +DEPENDS += "${DEPS}" +RDEPENDS:${PN} += "${DEPS}" + +BBCLASSEXTEND = "nativesdk native" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-qface_2.0.8.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-qface_2.0.8.bb deleted file mode 100644 index 8ad61ab1..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-qface_2.0.8.bb +++ /dev/null @@ -1,24 +0,0 @@ -SUMMARY = "A generator framework based on a common modern IDL" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=eee61e10a40b0e3045ee5965bcd9a8b5" - -SRC_URI[sha256sum] = "eccee7dbc4290c5a4e394df8d527f39148e0de0ff22c6b260f48c48f12b3beb4" - -inherit pypi setuptools3 - -DEPS = "\ - python3-jinja2 \ - python3-click \ - python3-pyyaml \ - python3-pytest \ - python3-six \ - python3-path \ - python3-antlr4-runtime \ - python3-watchdog \ - python3-markupsafe \ - python3-setuptools \ -" -DEPENDS += "${DEPS}" -RDEPENDS:${PN} += "${DEPS}" - -BBCLASSEXTEND = "nativesdk native" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-qrcode_7.4.2.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-qrcode_7.4.2.bb index 204f4ece..49cf6286 100644 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-qrcode_7.4.2.bb +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-qrcode_7.4.2.bb @@ -3,10 +3,9 @@ SECTION = "devel/python" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENSE;md5=4b802d2a65df4626623c79757f486af9" -PYPI_PACKAGE = "qrcode" SRC_URI[sha256sum] = "9dd969454827e127dbd93696b20747239e6d540e082937c90f14ac95b30f5845" -inherit pypi setuptools3 +inherit pypi python_setuptools_build_meta RDEPENDS:${PN} = " \ python3-six \ diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-rapidjson_1.14.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-rapidjson_1.14.bb deleted file mode 100644 index 22868d8d..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-rapidjson_1.14.bb +++ /dev/null @@ -1,40 +0,0 @@ -SUMMARY = "Python wrapper around rapidjson" -HOMEPAGE = "https://github.com/python-rapidjson/python-rapidjson" - -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=4daf3929156304df67003c33274a98bd" - -SRC_URI[sha256sum] = "26806f0a658c34b48d2951d8d3f846ca9deb93a34e664ef436db632a188b6779" - -# Inheriting ptest provides functionality for packaging and installing runtime tests for this recipe -inherit setuptools3 pypi ptest - -PYPI_PACKAGE = "python-rapidjson" - -SETUPTOOLS_BUILD_ARGS += " --rj-include-dir=${RECIPE_SYSROOT}${includedir}" - -# run-ptest is a shell script that starts the test suite -SRC_URI += " \ - file://run-ptest \ -" - -DEPENDS += " \ - rapidjson \ -" - -# Adding required python package for the ptest (pytest and pytest->automake report translation) -RDEPENDS:${PN}-ptest += " \ - python3-pytest \ - python3-unittest-automake-output \ - python3-pytz \ -" - -RDEPENDS:${PN} += " \ - python3-core \ -" - -# Installing the test suite on the target -do_install_ptest() { - install -d ${D}${PTEST_PATH}/tests - cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ -} diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-rapidjson_1.19.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-rapidjson_1.19.bb new file mode 100644 index 00000000..bfc05a73 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-rapidjson_1.19.bb @@ -0,0 +1,40 @@ +SUMMARY = "Python wrapper around rapidjson" +HOMEPAGE = "https://github.com/python-rapidjson/python-rapidjson" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=6fe0b2465366662d7cfa6793ccbab563" + +SRC_URI[sha256sum] = "81e7260f6297cad564389b700783c0a33de71310b9eb01fd013faec5e7ed4eff" + +# Inheriting ptest provides functionality for packaging and installing runtime tests for this recipe +inherit setuptools3 pypi ptest + +PYPI_PACKAGE = "python-rapidjson" + +SETUPTOOLS_BUILD_ARGS += " --rj-include-dir=${RECIPE_SYSROOT}${includedir}" + +# run-ptest is a shell script that starts the test suite +SRC_URI += " \ + file://run-ptest \ +" + +DEPENDS += " \ + rapidjson \ +" + +# Adding required python package for the ptest (pytest and pytest->automake report translation) +RDEPENDS:${PN}-ptest += " \ + python3-pytest \ + python3-unittest-automake-output \ + python3-pytz \ +" + +RDEPENDS:${PN} += " \ + python3-core \ +" + +# Installing the test suite on the target +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ +} diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-redis_5.0.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-redis_5.0.1.bb deleted file mode 100644 index 2c473c03..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-redis_5.0.1.bb +++ /dev/null @@ -1,18 +0,0 @@ -SUMMARY = "Python client for Redis key-value store" -DESCRIPTION = "The Python interface to the Redis key-value store." -HOMEPAGE = "http://github.com/andymccurdy/redis-py" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=609ded3add9111c4c6e102f1d421d3f8" - -SRC_URI[sha256sum] = "0dab495cd5753069d3bc650a0dde8a8f9edde16fc5691b689a566eda58100d0f" - -inherit pypi setuptools3 - -RDEPENDS:${PN} += " \ - python3-asyncio \ - python3-compression \ - python3-cryptography \ - python3-datetime \ - python3-json \ - python3-packaging \ -" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-redis_5.0.8.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-redis_5.0.8.bb new file mode 100644 index 00000000..1dddd04b --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-redis_5.0.8.bb @@ -0,0 +1,21 @@ +SUMMARY = "Python client for Redis key-value store" +DESCRIPTION = "The Python interface to the Redis key-value store." +HOMEPAGE = "http://github.com/andymccurdy/redis-py" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=609ded3add9111c4c6e102f1d421d3f8" + +# Prefix archive to avoid clashing with the main redis archives +PYPI_ARCHIVE_NAME_PREFIX="pypi-" + +SRC_URI[sha256sum] = "0c5b10d387568dfe0698c6fad6615750c24170e548ca2deac10c649d463e9870" + +inherit pypi setuptools3 + +RDEPENDS:${PN} += " \ + python3-asyncio \ + python3-compression \ + python3-cryptography \ + python3-datetime \ + python3-json \ + python3-packaging \ +" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-regex_2024.4.16.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-regex_2024.4.16.bb deleted file mode 100644 index 18a6f3d6..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-regex_2024.4.16.bb +++ /dev/null @@ -1,14 +0,0 @@ -SUMMARY = "Alternative regular expression module, to replace re." -HOMEPAGE = "https://bitbucket.org/mrabarnett/mrab-regex/src" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=7b5751ddd6b643203c31ff873051d069" - -inherit pypi setuptools3 - -SRC_URI[sha256sum] = "fa454d26f2e87ad661c4f0c5a5fe4cf6aab1e307d1b94f16ffdfcb089ba685c0" - -RDEPENDS:${PN} += " \ - python3-stringold \ -" - -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-regex_2024.9.11.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-regex_2024.9.11.bb new file mode 100644 index 00000000..8fbae0cd --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-regex_2024.9.11.bb @@ -0,0 +1,14 @@ +SUMMARY = "Alternative regular expression module, to replace re." +HOMEPAGE = "https://bitbucket.org/mrabarnett/mrab-regex/src" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=7b5751ddd6b643203c31ff873051d069" + +inherit pypi python_setuptools_build_meta + +SRC_URI[sha256sum] = "6c188c307e8433bcb63dc1915022deb553b4203a70722fc542c363bf120a01fd" + +RDEPENDS:${PN} += " \ + python3-stringold \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-requests-file_1.5.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-requests-file_1.5.1.bb deleted file mode 100644 index 7ff984a9..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-requests-file_1.5.1.bb +++ /dev/null @@ -1,28 +0,0 @@ -SUMMARY = "File transport adapter for Requests" -HOMEPAGE = "http://github.com/dashea/requests-file" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=9cc728d6087e43796227b0a31422de6b" - -SRC_URI[md5sum] = "c96daf6b0c56687556e8a52748fd896c" -SRC_URI[sha256sum] = "07d74208d3389d01c38ab89ef403af0cfec63957d53a0081d8eca738d0247d8e" - -inherit pypi setuptools3 ptest - -SRC_URI += " \ - file://run-ptest \ -" - -RDEPENDS:${PN}-ptest += " \ - python3-pytest \ - python3-unittest-automake-output \ -" - -do_install_ptest() { - install -d ${D}${PTEST_PATH}/tests - cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ -} - -RDEPENDS:${PN} += " \ - python3-requests \ -" - diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-requests-file_2.1.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-requests-file_2.1.0.bb new file mode 100644 index 00000000..4e0adc39 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-requests-file_2.1.0.bb @@ -0,0 +1,31 @@ +SUMMARY = "File transport adapter for Requests" +HOMEPAGE = "http://github.com/dashea/requests-file" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=9cc728d6087e43796227b0a31422de6b" + +SRC_URI[sha256sum] = "0f549a3f3b0699415ac04d167e9cb39bccfb730cb832b4d20be3d9867356e658" + +PYPI_PACKAGE = "requests_file" + +inherit pypi python_setuptools_build_meta ptest + +SRC_URI += " \ + file://run-ptest \ +" + +DEPENDS += "python3-setuptools-scm-native" + +RDEPENDS:${PN}-ptest += " \ + python3-pytest \ + python3-unittest-automake-output \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ +} + +RDEPENDS:${PN} += " \ + python3-requests \ +" + diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-requests-mock_1.12.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-requests-mock_1.12.1.bb new file mode 100644 index 00000000..248526b0 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-requests-mock_1.12.1.bb @@ -0,0 +1,9 @@ +SUMMARY = "Mocked responses for the requests library" +HOMEPAGE = "https://github.com/jamielennox/requests-mock" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=3b2eea41aec0f2973a45e1e45f28aa32" + +DEPENDS = "python3-setuptools-scm-native" +SRC_URI[sha256sum] = "e9e12e333b525156e82a3c852f22016b9158220d2f47454de9cae8a77d371401" + +inherit pypi python_setuptools_build_meta diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-responses_0.25.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-responses_0.25.0.bb deleted file mode 100644 index f4b59c75..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-responses_0.25.0.bb +++ /dev/null @@ -1,15 +0,0 @@ -DESCRIPTION = "A utility library for mocking out the requests Python library." -HOMEPAGE = "https://github.com/getsentry/responses" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=0e601511a8517f4daf688a8eb95be7a2" - -inherit pypi setuptools3 - -SRC_URI[sha256sum] = "01ae6a02b4f34e39bffceb0fc6786b67a25eae919c6368d05eabc8d9576c2a66" - -RDEPENDS:${PN} += " \ - python3-mock \ - python3-pyyaml \ - python3-requests \ - python3-urllib3 \ -" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-responses_0.25.3.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-responses_0.25.3.bb new file mode 100644 index 00000000..50835883 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-responses_0.25.3.bb @@ -0,0 +1,15 @@ +DESCRIPTION = "A utility library for mocking out the requests Python library." +HOMEPAGE = "https://github.com/getsentry/responses" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=0e601511a8517f4daf688a8eb95be7a2" + +inherit pypi setuptools3 + +SRC_URI[sha256sum] = "617b9247abd9ae28313d57a75880422d55ec63c29d33d629697590a034358dba" + +RDEPENDS:${PN} += " \ + python3-mock \ + python3-pyyaml \ + python3-requests \ + python3-urllib3 \ +" diff --git a/sources/poky/meta/recipes-devtools/python/python3-rfc3986-validator_0.1.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-rfc3986-validator_0.1.1.bb similarity index 100% rename from sources/poky/meta/recipes-devtools/python/python3-rfc3986-validator_0.1.1.bb rename to sources/meta-openembedded/meta-python/recipes-devtools/python/python3-rfc3986-validator_0.1.1.bb diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-rlp_4.0.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-rlp_4.0.0.bb deleted file mode 100644 index 7df8ac07..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-rlp_4.0.0.bb +++ /dev/null @@ -1,16 +0,0 @@ -SUMMARY = "A Python implementation of Recursive Length Prefix encoding (RLP)." -HOMEPAGE = "https://github.com/ethereum/pyrlp" -SECTION = "devel/python" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=00854fa80a84236706b11f47f23e61e7" - -SRC_URI[sha256sum] = "61a5541f86e4684ab145cb849a5929d2ced8222930a570b3941cf4af16b72a78" - -inherit pypi setuptools3 - -DEPENDS += "python3-pip-native" - -RDEPENDS:${PN} += " \ - python3-eth-utils \ - python3-typing-extensions \ -" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-rlp_4.0.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-rlp_4.0.1.bb new file mode 100644 index 00000000..46ca600e --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-rlp_4.0.1.bb @@ -0,0 +1,16 @@ +SUMMARY = "A Python implementation of Recursive Length Prefix encoding (RLP)." +HOMEPAGE = "https://github.com/ethereum/pyrlp" +SECTION = "devel/python" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=00854fa80a84236706b11f47f23e61e7" + +SRC_URI[sha256sum] = "bcefb11013dfadf8902642337923bd0c786dc8a27cb4c21da6e154e52869ecb1" + +inherit pypi setuptools3 + +DEPENDS += "python3-pip-native" + +RDEPENDS:${PN} += " \ + python3-eth-utils \ + python3-typing-extensions \ +" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-robotframework_7.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-robotframework_7.0.bb deleted file mode 100644 index beb71e6a..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-robotframework_7.0.bb +++ /dev/null @@ -1,30 +0,0 @@ -SUMMARY = "A Python generic test automation framework" -DESCRIPTION = "Generic open source test atomation framework for acceptance\ -testing and acceptance test-driven development (ATDD). It has easy-to-use\ -tabular test data syntax and it utilizes the keyword-driven testing approach.\ -Its testing capabilities can be extended by test libraries implemented either\ -with Python or Java, and users can create new higher-level keywords from\ -existing ones using the same syntax that is used for creating test cases." -HOMEPAGE = "http://robotframework.org" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57" - -inherit pypi setuptools3 - -PYPI_PACKAGE_EXT = "zip" - -SRC_URI[sha256sum] = "04623f758346c917db182e17591ffa474090560c02ed5a64343902e72b7b4bd5" - -RDEPENDS:${PN} += " \ - python3-shell \ - python3-pprint \ - python3-xml \ - python3-difflib \ - python3-threading \ - python3-html \ - python3-docutils \ - python3-ctypes \ - python3-logging \ - python3-numbers \ - python3-profile \ -" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-robotframework_7.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-robotframework_7.1.bb new file mode 100644 index 00000000..979aba68 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-robotframework_7.1.bb @@ -0,0 +1,30 @@ +SUMMARY = "A Python generic test automation framework" +DESCRIPTION = "Generic open source test atomation framework for acceptance\ +testing and acceptance test-driven development (ATDD). It has easy-to-use\ +tabular test data syntax and it utilizes the keyword-driven testing approach.\ +Its testing capabilities can be extended by test libraries implemented either\ +with Python or Java, and users can create new higher-level keywords from\ +existing ones using the same syntax that is used for creating test cases." +HOMEPAGE = "http://robotframework.org" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57" + +inherit pypi setuptools3 + +PYPI_PACKAGE_EXT = "zip" + +SRC_URI[sha256sum] = "34796d387e182b36f05d82f3bbc802bd6a30192ebf1e03c76d2086d0d04faaff" + +RDEPENDS:${PN} += " \ + python3-shell \ + python3-pprint \ + python3-xml \ + python3-difflib \ + python3-threading \ + python3-html \ + python3-docutils \ + python3-ctypes \ + python3-logging \ + python3-numbers \ + python3-profile \ +" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-scikit-build_0.17.6.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-scikit-build_0.17.6.bb deleted file mode 100644 index dde0941e..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-scikit-build_0.17.6.bb +++ /dev/null @@ -1,22 +0,0 @@ -SUMMARY = "Improved build system generator for Python C/C++/Fortran/Cython extensions" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=7c96d2b08b3cec6d3c67fb864d1fd8cc" - -DEPENDS = "python3-hatch-vcs-native python3-hatch-fancy-pypi-readme-native" - -PYPI_PACKAGE = "scikit_build" - -inherit pypi python_hatchling - -SRC_URI[sha256sum] = "b51a51a36b37c42650994b5047912f59b22e3210b23e321f287611f9ef6e5c9d" - -RDEPENDS:${PN} = " \ - python3-distro \ - python3-packaging \ - python3-setuptools \ - python3-typing-extensions \ - python3-wheel \ - cmake \ -" - -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-scikit-build_0.18.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-scikit-build_0.18.1.bb new file mode 100644 index 00000000..eacd67a0 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-scikit-build_0.18.1.bb @@ -0,0 +1,22 @@ +SUMMARY = "Improved build system generator for Python C/C++/Fortran/Cython extensions" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=7c96d2b08b3cec6d3c67fb864d1fd8cc" + +DEPENDS = "python3-hatch-vcs-native python3-hatch-fancy-pypi-readme-native" + +PYPI_PACKAGE = "scikit_build" + +inherit pypi python_hatchling + +SRC_URI[sha256sum] = "a4152ac5a084d499c28a7797be0628d8366c336e2fb0e1a063eb32e55efcb8e7" + +RDEPENDS:${PN} = " \ + python3-distro \ + python3-packaging \ + python3-setuptools \ + python3-typing-extensions \ + python3-wheel \ + cmake \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-screeninfo_0.8.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-screeninfo_0.8.1.bb index 19ac3f67..a7a20707 100644 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-screeninfo_0.8.1.bb +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-screeninfo_0.8.1.bb @@ -4,11 +4,9 @@ SECTION = "devel/python" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENSE.md;md5=a23813181e06852d377bc25ae5563a97" -PYPI_PACKAGE = "screeninfo" - SRC_URI[sha256sum] = "9983076bcc7e34402a1a9e4d7dabf3729411fd2abb3f3b4be7eba73519cd2ed1" -inherit pypi setuptools3 +inherit pypi python_poetry_core RDEPENDS:${PN} += "\ python3-core \ diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-sdbus_0.11.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-sdbus_0.11.1.bb deleted file mode 100644 index 26bc7176..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-sdbus_0.11.1.bb +++ /dev/null @@ -1,17 +0,0 @@ -SUMMARY = "Modern Python library for the systemd D-Bus" -HOMEPAGE = "https://python-sdbus.readthedocs.io/en/latest/" -LICENSE = "LGPL-2.1-or-later" -LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=e77986dc8e2ee22d44a7c863e96852ae" - -SRC_URI[sha256sum] = "adb97718ce996bb308520682c50b1a13e606d65a6edb1c1967a15d2e570cb3b7" - -REQUIRED_DISTRO_FEATURES = "systemd" -DEPENDS += "systemd" - -RDEPENDS:${PN} += " \ - python3-asyncio \ - python3-numbers \ - python3-core \ -" - -inherit pypi setuptools3 features_check pkgconfig diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-sdbus_0.12.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-sdbus_0.12.0.bb new file mode 100644 index 00000000..054e9411 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-sdbus_0.12.0.bb @@ -0,0 +1,17 @@ +SUMMARY = "Modern Python library for the systemd D-Bus" +HOMEPAGE = "https://python-sdbus.readthedocs.io/en/latest/" +LICENSE = "LGPL-2.1-or-later" +LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=e77986dc8e2ee22d44a7c863e96852ae" + +SRC_URI[sha256sum] = "c3692d75704438a78adc1439350bc32f30d6b38ad344cfc94773db89c6ce4a89" + +REQUIRED_DISTRO_FEATURES = "systemd" +DEPENDS += "systemd" + +RDEPENDS:${PN} += " \ + python3-asyncio \ + python3-numbers \ + python3-core \ +" + +inherit pypi setuptools3 features_check pkgconfig diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-serpent_1.41.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-serpent_1.41.bb index 941b5ee0..9265081f 100644 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-serpent_1.41.bb +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-serpent_1.41.bb @@ -9,8 +9,10 @@ inherit pypi ptest setuptools3 SRC_URI += " \ file://run-ptest \ " - +# python3-misc for timeit.py RDEPENDS:${PN}-ptest += " \ + python3-attrs \ + python3-misc \ python3-pytest \ python3-pytz \ python3-unittest-automake-output \ diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-service-identity_21.1.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-service-identity_21.1.0.bb index 006fae29..a1d6a3c0 100644 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-service-identity_21.1.0.bb +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-service-identity_21.1.0.bb @@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=8a0f079f4e6a215d6bd6f9d97cab4d5f" SRC_URI[md5sum] = "5e5c195d8fcedc72f9068be2ad9b5a13" SRC_URI[sha256sum] = "6e6c6086ca271dc11b033d17c3a8bea9f24ebff920c587da090afc9519419d34" -inherit pypi setuptools3 ptest +inherit pypi python_setuptools_build_meta ptest SRC_URI += " \ file://run-ptest \ @@ -20,7 +20,9 @@ RDEPENDS:${PN} += " \ " RDEPENDS:${PN}-ptest += " \ + python3-attrs \ python3-pytest \ + python3-six \ python3-unittest-automake-output \ python3-pyopenssl \ " diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-sh_2.0.6.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-sh_2.0.6.bb deleted file mode 100644 index cbe000e3..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-sh_2.0.6.bb +++ /dev/null @@ -1,25 +0,0 @@ -SUMMARY = "Python subprocess replacement" -HOMEPAGE = "https://github.com/amoffat/sh" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=5317094292296f03405f59ae5f6544b6" - -SRC_URI[sha256sum] = "9b2998f313f201c777e2c0061f0b1367497097ef13388595be147e2a00bf7ba1" - -PYPI_PACKAGE = "sh" - -inherit pypi python_poetry_core - -RDEPENDS:${PN} += " \ - python3-asyncio \ - python3-codecs \ - python3-compression \ - python3-core \ - python3-io \ - python3-logging \ - python3-resource \ - python3-shell \ - python3-terminal \ - python3-threading \ - python3-unixadmin \ - python3-fcntl \ -" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-sh_2.0.7.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-sh_2.0.7.bb new file mode 100644 index 00000000..8f8d970a --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-sh_2.0.7.bb @@ -0,0 +1,25 @@ +SUMMARY = "Python subprocess replacement" +HOMEPAGE = "https://github.com/amoffat/sh" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=5317094292296f03405f59ae5f6544b6" + +SRC_URI[sha256sum] = "029d45198902bfb967391eccfd13a88d92f7cebd200411e93f99ebacc6afbb35" + +PYPI_PACKAGE = "sh" + +inherit pypi python_poetry_core + +RDEPENDS:${PN} += " \ + python3-asyncio \ + python3-codecs \ + python3-compression \ + python3-core \ + python3-io \ + python3-logging \ + python3-resource \ + python3-shell \ + python3-terminal \ + python3-threading \ + python3-unixadmin \ + python3-fcntl \ +" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-simplejson_3.19.2.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-simplejson_3.19.2.bb deleted file mode 100644 index cc5b1bc9..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-simplejson_3.19.2.bb +++ /dev/null @@ -1,24 +0,0 @@ -SUMMARY = "Simple, fast, extensible JSON encoder/decoder for Python" -HOMEPAGE = "http://cheeseshop.python.org/pypi/simplejson" - -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=c6338d7abd321c0b50a2a547e441c52e" - -SRC_URI[sha256sum] = "9eb442a2442ce417801c912df68e1f6ccfcd41577ae7274953ab3ad24ef7d82c" - -inherit pypi setuptools3 - -RDEPENDS:${PN} += "\ - python3-io \ - python3-netserver \ - python3-numbers \ -" - -PACKAGES =+ "${PN}-tests" -RDEPENDS:${PN}-tests = "${PN} python3-unittest" -FILES:${PN}-tests+= " \ - ${PYTHON_SITEPACKAGES_DIR}/simplejson/tests \ - ${PYTHON_SITEPACKAGES_DIR}/simplejson/tool.py* \ -" - -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-simplejson_3.19.3.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-simplejson_3.19.3.bb new file mode 100644 index 00000000..094efcd8 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-simplejson_3.19.3.bb @@ -0,0 +1,24 @@ +SUMMARY = "Simple, fast, extensible JSON encoder/decoder for Python" +HOMEPAGE = "http://cheeseshop.python.org/pypi/simplejson" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=c6338d7abd321c0b50a2a547e441c52e" + +SRC_URI[sha256sum] = "8e086896c36210ab6050f2f9f095a5f1e03c83fa0e7f296d6cba425411364680" + +inherit pypi setuptools3 + +RDEPENDS:${PN} += "\ + python3-io \ + python3-netserver \ + python3-numbers \ +" + +PACKAGES =+ "${PN}-tests" +RDEPENDS:${PN}-tests = "${PN} python3-unittest" +FILES:${PN}-tests+= " \ + ${PYTHON_SITEPACKAGES_DIR}/simplejson/tests \ + ${PYTHON_SITEPACKAGES_DIR}/simplejson/tool.py* \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-smbus2_0.4.3.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-smbus2_0.4.3.bb index b54cdb00..779562d0 100644 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-smbus2_0.4.3.bb +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-smbus2_0.4.3.bb @@ -2,7 +2,7 @@ SUMMARY = "Drop-in replacement for smbus-cffi/smbus-python in pure Python" DESCRIPTION = "smbus2 is a drop-in replacement for smbus-cffi/smbus-python in pure Python" HOMEPAGE = "https://github.com/kplindegaard/smbus2" LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" +LIC_FILES_CHKSUM = "file://LICENSE;md5=2a3eca2de44816126b3c6f33811a9fba" inherit pypi setuptools3 diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-snagboot_1.2.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-snagboot_1.2.bb deleted file mode 100644 index 57a3280d..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-snagboot_1.2.bb +++ /dev/null @@ -1,21 +0,0 @@ -SUMMARY = "Snagboot intends to be an open-source replacement vendor-specific tools used to recover and/or reflash embedded platforms." - -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263" - -SRC_URI[sha256sum] = "3d5cdd5ffe7355deba27657e6f45d45538a398f92215d219a8cfd6e716f67c34" - -inherit pypi python_setuptools_build_meta - -RDEPENDS:${PN} += " \ - bash \ - python3-fcntl \ - python3-pyusb \ - python3-pyyaml \ - python3-setuptools \ - python3-six \ -" - -do_install:append() { - install -D -m 0644 ${S}/src/snagrecover/50-snagboot.rules ${D}${sysconfdir}/udev/rules.d/50-snagboot.rules -} diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-snagboot_1.3.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-snagboot_1.3.bb new file mode 100644 index 00000000..5ed5169a --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-snagboot_1.3.bb @@ -0,0 +1,21 @@ +SUMMARY = "Snagboot intends to be an open-source replacement vendor-specific tools used to recover and/or reflash embedded platforms." + +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +SRC_URI[sha256sum] = "b9d781bdc79d92d940e27d89d3025eab6dc459087dad126766e2bf76dc9dddee" + +inherit pypi python_setuptools_build_meta + +RDEPENDS:${PN} += " \ + bash \ + python3-fcntl \ + python3-pyusb \ + python3-pyyaml \ + python3-setuptools \ + python3-six \ +" + +do_install:append() { + install -D -m 0644 ${S}/src/snagrecover/50-snagboot.rules ${D}${sysconfdir}/udev/rules.d/50-snagboot.rules +} diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-sniffio_1.3.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-sniffio_1.3.0.bb deleted file mode 100644 index 448ac34f..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-sniffio_1.3.0.bb +++ /dev/null @@ -1,12 +0,0 @@ -SUMMARY = "Sniff out which async library your code is running under" -SECTION = "devel/python" -LICENSE = "MIT | Apache-2.0" -LIC_FILES_CHKSUM = "\ - file://LICENSE;md5=fa7b86389e58dd4087a8d2b833e5fe96 \ - file://LICENSE.MIT;md5=e62ba5042d5983462ad229f5aec1576c \ - file://LICENSE.APACHE2;md5=3b83ef96387f14655fc854ddc3c6bd57 \ -" - -inherit pypi setuptools3 - -SRC_URI[sha256sum] = "e60305c5e5d314f5389259b7f22aaa33d8f7dee49763119234af3755c55b9101" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-sniffio_1.3.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-sniffio_1.3.1.bb new file mode 100644 index 00000000..82c457c3 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-sniffio_1.3.1.bb @@ -0,0 +1,21 @@ +SUMMARY = "Sniff out which async library your code is running under" +SECTION = "devel/python" +LICENSE = "MIT | Apache-2.0" +LIC_FILES_CHKSUM = "\ + file://LICENSE;md5=fa7b86389e58dd4087a8d2b833e5fe96 \ + file://LICENSE.MIT;md5=e62ba5042d5983462ad229f5aec1576c \ + file://LICENSE.APACHE2;md5=3b83ef96387f14655fc854ddc3c6bd57 \ +" + +inherit pypi python_setuptools_build_meta + +SRC_URI[sha256sum] = "f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc" + +DEPENDS += "\ + python3-setuptools-scm-native \ +" + +RDEPENDS:${PN} += " \ + python3-numbers \ + python3-core \ +" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-soupsieve_2.5.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-soupsieve_2.5.bb deleted file mode 100644 index d26a13df..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-soupsieve_2.5.bb +++ /dev/null @@ -1,26 +0,0 @@ -SUMMARY = "CSS selector library for python-beautifulsoup4" -HOMEPAGE = "https://github.com/facelessuser/soupsieve" - -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE.md;md5=520586fa71ed2cbda50b4a8c89621e09" - -SRC_URI[sha256sum] = "5663d5a7b3bfaeee0bc4372e7fc48f9cff4940b3eec54a6451cc5299f1097690" - -inherit pypi python_hatchling python_setuptools_build_meta ptest - -SRC_URI += " \ - file://run-ptest \ -" - -RDEPENDS:${PN}-ptest += " \ - python3-beautifulsoup4 \ - python3-pytest \ - python3-unittest-automake-output \ -" - -do_install_ptest() { - install -d ${D}${PTEST_PATH}/tests - cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ -} - -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-soupsieve_2.6.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-soupsieve_2.6.bb new file mode 100644 index 00000000..6572a684 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-soupsieve_2.6.bb @@ -0,0 +1,31 @@ +SUMMARY = "CSS selector library for python-beautifulsoup4" +HOMEPAGE = "https://github.com/facelessuser/soupsieve" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE.md;md5=1bdfa4c8e8b6830bcf8e78cba1669e4d" + +SRC_URI[sha256sum] = "e2e68417777af359ec65daac1057404a3c8a5455bb8abc36f1a9866ab1a51abb" + +inherit pypi python_hatchling python_setuptools_build_meta ptest + +SRC_URI += " \ + file://run-ptest \ +" +RDEPENDS:${PN} += " \ + python3-core \ + python3-datetime \ + python3-beautifulsoup4 \ +" + +RDEPENDS:${PN}-ptest += " \ + python3-beautifulsoup4 \ + python3-pytest \ + python3-unittest-automake-output \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ +} + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-spidev_3.6.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-spidev_3.6.bb index e3fdc435..807ee5b7 100644 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-spidev_3.6.bb +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-spidev_3.6.bb @@ -12,4 +12,4 @@ SRCNAME = "spidev" SRC_URI[sha256sum] = "14dbc37594a4aaef85403ab617985d3c3ef464d62bc9b769ef552db53701115b" -inherit pypi setuptools3 +inherit pypi python_setuptools_build_meta diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-sqlalchemy_2.0.29.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-sqlalchemy_2.0.29.bb deleted file mode 100644 index e646bd0d..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-sqlalchemy_2.0.29.bb +++ /dev/null @@ -1,25 +0,0 @@ -DESCRIPTION = "Python SQL toolkit and Object Relational Mapper that gives \ -application developers the full power and flexibility of SQL" -HOMEPAGE = "http://www.sqlalchemy.org/" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=c78b979ae6c20775a28a287d32092cbb" - -SRC_URI[sha256sum] = "bd9566b8e58cabd700bc367b60e90d9349cd16f0984973f98a9a09f9c64e86f0" - -PYPI_PACKAGE = "SQLAlchemy" -inherit pypi setuptools3 - -RDEPENDS:${PN} += " \ - python3-asyncio \ - python3-compression \ - python3-json \ - python3-logging \ - python3-netclient \ - python3-numbers \ - python3-pickle \ - python3-profile \ - python3-threading \ - python3-typing-extensions \ -" - -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-sqlalchemy_2.0.35.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-sqlalchemy_2.0.35.bb new file mode 100644 index 00000000..202350dc --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-sqlalchemy_2.0.35.bb @@ -0,0 +1,26 @@ +DESCRIPTION = "Python SQL toolkit and Object Relational Mapper that gives \ +application developers the full power and flexibility of SQL" +HOMEPAGE = "http://www.sqlalchemy.org/" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=c78b979ae6c20775a28a287d32092cbb" + +SRC_URI[sha256sum] = "e11d7ea4d24f0a262bccf9a7cd6284c976c5369dac21db237cff59586045ab9f" + +inherit pypi python_setuptools_build_meta + +DEPENDS += "python3-cython-native" + +RDEPENDS:${PN} += " \ + python3-asyncio \ + python3-compression \ + python3-json \ + python3-logging \ + python3-netclient \ + python3-numbers \ + python3-pickle \ + python3-profile \ + python3-threading \ + python3-typing-extensions \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-sqlparse/0001-sqlparse-change-shebang-to-python3.patch b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-sqlparse/0001-sqlparse-change-shebang-to-python3.patch deleted file mode 100644 index 0c9f29a6..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-sqlparse/0001-sqlparse-change-shebang-to-python3.patch +++ /dev/null @@ -1,41 +0,0 @@ -From f236a30dc8528b6f114201580f1efdcc1c447d43 Mon Sep 17 00:00:00 2001 -From: Changqing Li -Date: Mon, 9 Mar 2020 13:10:37 +0800 -Subject: [PATCH] sqlparse: change shebang to python3 - -Upstream-Status: Pending - -Don't send upstream since upstream still support python2, -we can only make this change after python2 is offcially -dropped. - -Signed-off-by: Changqing Li -Signed-off-by: Leon Anavi ---- - sqlparse/__main__.py | 2 +- - sqlparse/cli.py | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/sqlparse/__main__.py b/sqlparse/__main__.py -index 2bf2513..6a3a115 100644 ---- a/sqlparse/__main__.py -+++ b/sqlparse/__main__.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python3 - # - # Copyright (C) 2009-2020 the sqlparse authors and contributors - # -diff --git a/sqlparse/cli.py b/sqlparse/cli.py -index 7a8aacb..9c727e8 100755 ---- a/sqlparse/cli.py -+++ b/sqlparse/cli.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python3 - # - # Copyright (C) 2009-2020 the sqlparse authors and contributors - # --- -2.41.0 - diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-sqlparse/CVE-2024-4340.patch b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-sqlparse/CVE-2024-4340.patch deleted file mode 100644 index 67090407..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-sqlparse/CVE-2024-4340.patch +++ /dev/null @@ -1,48 +0,0 @@ -From b4a39d9850969b4e1d6940d32094ee0b42a2cf03 Mon Sep 17 00:00:00 2001 -From: Andi Albrecht -Date: Sat, 13 Apr 2024 13:59:00 +0200 -Subject: [PATCH] Raise SQLParseError instead of RecursionError. - -CVE: CVE-2024-4340 - -Upstream-Status: Backport [https://github.com/andialbrecht/sqlparse/commit/b4a39d9850969b4e1d6940d32094ee0b42a2cf03] - -Signed-off-by: Soumya Sambu ---- - sqlparse/sql.py | 14 +++++++++----- - 1 file changed, 9 insertions(+), 5 deletions(-) - -diff --git a/sqlparse/sql.py b/sqlparse/sql.py -index 1ccfbdb..2090621 100644 ---- a/sqlparse/sql.py -+++ b/sqlparse/sql.py -@@ -10,6 +10,7 @@ - import re - - from sqlparse import tokens as T -+from sqlparse.exceptions import SQLParseError - from sqlparse.utils import imt, remove_quotes - - -@@ -209,11 +210,14 @@ class TokenList(Token): - - This method is recursively called for all child tokens. - """ -- for token in self.tokens: -- if token.is_group: -- yield from token.flatten() -- else: -- yield token -+ try: -+ for token in self.tokens: -+ if token.is_group: -+ yield from token.flatten() -+ else: -+ yield token -+ except RecursionError as err: -+ raise SQLParseError('Maximum recursion depth exceeded') from err - - def get_sublists(self): - for token in self.tokens: --- -2.25.1 diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-sqlparse_0.4.4.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-sqlparse_0.4.4.bb deleted file mode 100644 index fa633026..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-sqlparse_0.4.4.bb +++ /dev/null @@ -1,30 +0,0 @@ -DESCRIPTION = "Non-validating SQL parser module" -HOMEPAGE = "http://pypi.python.org/pypi/sqlparse" -SECTION = "devel/python" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=2b136f573f5386001ea3b7b9016222fc" - -SRC_URI += "file://0001-sqlparse-change-shebang-to-python3.patch \ - file://CVE-2024-4340.patch \ - file://run-ptest \ - " - -SRC_URI[sha256sum] = "d446183e84b8349fa3061f0fe7f06ca94ba65b426946ffebe6e3e8295332420c" - -export BUILD_SYS -export HOST_SYS - -inherit pypi ptest python_flit_core - -RDEPENDS:${PN}-ptest += " \ - python3-pytest \ - python3-unittest-automake-output \ - python3-unixadmin \ -" - -do_install_ptest() { - install -d ${D}${PTEST_PATH}/tests - cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ -} - -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-sqlparse_0.5.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-sqlparse_0.5.1.bb new file mode 100644 index 00000000..daf67607 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-sqlparse_0.5.1.bb @@ -0,0 +1,30 @@ +DESCRIPTION = "Non-validating SQL parser module" +HOMEPAGE = "http://pypi.python.org/pypi/sqlparse" +SECTION = "devel/python" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=2b136f573f5386001ea3b7b9016222fc" + +SRC_URI:append = " \ + file://run-ptest \ +" + +SRC_URI[sha256sum] = "bb6b4df465655ef332548e24f08e205afc81b9ab86cb1c45657a7ff173a3a00e" + +export BUILD_SYS +export HOST_SYS + +inherit pypi ptest python_hatchling + +RDEPENDS:${PN}-ptest += "\ + python3-mypy \ + python3-pytest \ + python3-unittest-automake-output \ + python3-unixadmin \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ +} + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-stevedore_5.1.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-stevedore_5.1.0.bb deleted file mode 100644 index ce717963..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-stevedore_5.1.0.bb +++ /dev/null @@ -1,14 +0,0 @@ -DESCRIPTION = "Manage dynamic plugins for Python applications" -HOMEPAGE = "https://docs.openstack.org/stevedore/latest/" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" - -SRC_URI[sha256sum] = "a54534acf9b89bc7ed264807013b505bf07f74dbe4bcfa37d32bd063870b087c" - -DEPENDS += "python3-pbr-native" - -inherit pypi setuptools3 - -RDEPENDS:${PN} += "python3-pbr python3-six" - -BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-stevedore_5.2.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-stevedore_5.2.0.bb new file mode 100644 index 00000000..7cc0a2e5 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-stevedore_5.2.0.bb @@ -0,0 +1,14 @@ +DESCRIPTION = "Manage dynamic plugins for Python applications" +HOMEPAGE = "https://docs.openstack.org/stevedore/latest/" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" + +SRC_URI[sha256sum] = "46b93ca40e1114cea93d738a6c1e365396981bb6bb78c27045b7587c9473544d" + +DEPENDS += "python3-pbr-native" + +inherit pypi setuptools3 + +RDEPENDS:${PN} += "python3-pbr python3-six" + +BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-stopit_1.1.2.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-stopit_1.1.2.bb index e119a0f1..a9527226 100644 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-stopit_1.1.2.bb +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-stopit_1.1.2.bb @@ -4,7 +4,7 @@ SECTION = "devel/python" SRC_URI += " file://LICENSE " LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=497c556f42b1355b64190da2f3d88f93" +LIC_FILES_CHKSUM = "file://${UNPACKDIR}/LICENSE;md5=497c556f42b1355b64190da2f3d88f93" SRC_URI[sha256sum] = "f7f39c583fd92027bd9d06127b259aee7a5b7945c1f1fa56263811e1e766996d" @@ -14,4 +14,4 @@ RDEPENDS:${PN} += "\ python3-setuptools \ " -BBCLASSEXTEND = "native nativesdk" \ No newline at end of file +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-supervisor_4.2.5.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-supervisor_4.2.5.bb index 06b08e78..e104e1c0 100644 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-supervisor_4.2.5.bb +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-supervisor_4.2.5.bb @@ -28,6 +28,6 @@ do_install:append() { install -d ${D}${sysconfdir}/supervisor install -d ${D}${systemd_system_unitdir} - install -m 0644 ${WORKDIR}/supervisord.conf ${D}${sysconfdir}/supervisor - install -m 0644 ${WORKDIR}/supervisor.service ${D}${systemd_system_unitdir} + install -m 0644 ${UNPACKDIR}/supervisord.conf ${D}${sysconfdir}/supervisor + install -m 0644 ${UNPACKDIR}/supervisor.service ${D}${systemd_system_unitdir} } diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-sympy_1.12.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-sympy_1.12.bb deleted file mode 100644 index 088dda3a..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-sympy_1.12.bb +++ /dev/null @@ -1,15 +0,0 @@ -SUMMARY = "Computer algebra system (CAS) in Python" -HOMEPAGE = "https://pypi.org/project/sympy/" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=ea48085d7dff75b49271b25447e8cdca" - -SRC_URI[sha256sum] = "ebf595c8dac3e0fdc4152c51878b498396ec7f30e7a914d6071e674d49420fb8" - -inherit pypi setuptools3 - -RDEPENDS:${PN} += " \ - python3-misc \ - python3-mpmath \ -" - -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-sympy_1.13.2.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-sympy_1.13.2.bb new file mode 100644 index 00000000..02577964 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-sympy_1.13.2.bb @@ -0,0 +1,15 @@ +SUMMARY = "Computer algebra system (CAS) in Python" +HOMEPAGE = "https://pypi.org/project/sympy/" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ea48085d7dff75b49271b25447e8cdca" + +SRC_URI[sha256sum] = "401449d84d07be9d0c7a46a64bd54fe097667d5e7181bfe67ec777be9e01cb13" + +inherit pypi setuptools3 + +RDEPENDS:${PN} += " \ + python3-misc \ + python3-mpmath \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-term_2.5.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-term_2.5.bb index 7d508ad8..fe0aabf0 100644 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-term_2.5.bb +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-term_2.5.bb @@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=d90e2d280a4836c607520383d1639be1" SRC_URI[sha256sum] = "846fda941dbb8a7c9f246e99bf5ee731910fc4a4cc54b7e36457c133c9f6b78b" -inherit pypi setuptools3 +inherit pypi python_setuptools_build_meta RDEPENDS:${PN} = "\ python3-io \ diff --git a/sources/poky/meta/recipes-devtools/python/python3-toml_0.10.2.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-toml_0.10.2.bb similarity index 100% rename from sources/poky/meta/recipes-devtools/python/python3-toml_0.10.2.bb rename to sources/meta-openembedded/meta-python/recipes-devtools/python/python3-toml_0.10.2.bb diff --git a/sources/poky/meta/recipes-devtools/python/python3-tomli_2.0.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-tomli_2.0.1.bb similarity index 100% rename from sources/poky/meta/recipes-devtools/python/python3-tomli_2.0.1.bb rename to sources/meta-openembedded/meta-python/recipes-devtools/python/python3-tomli_2.0.1.bb diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-tomlkit_0.12.3.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-tomlkit_0.12.3.bb deleted file mode 100644 index d4162a11..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-tomlkit_0.12.3.bb +++ /dev/null @@ -1,32 +0,0 @@ -SUMMARY = "Style preserving TOML library" -HOMEPAGE = "https://pypi.org/project/tomlkit/" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=31aac0dbc1babd278d5386dadb7f8e82" - -SRC_URI[sha256sum] = "75baf5012d06501f07bee5bf8e801b9f343e7aac5a92581f20f80ce632e6b5a4" - -inherit pypi python_poetry_core ptest - -SRC_URI += " \ - file://run-ptest \ -" - -RDEPENDS:${PN} += " \ - python3-datetime \ - python3-profile \ - python3-stringold \ -" - -RDEPENDS:${PN}-ptest += " \ - python3-poetry-core \ - python3-pytest \ - python3-pyyaml \ - python3-unittest-automake-output \ -" - -do_install_ptest() { - install -d ${D}${PTEST_PATH}/tests - cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ -} - -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-tomlkit_0.13.2.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-tomlkit_0.13.2.bb new file mode 100644 index 00000000..9fca1454 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-tomlkit_0.13.2.bb @@ -0,0 +1,32 @@ +SUMMARY = "Style preserving TOML library" +HOMEPAGE = "https://pypi.org/project/tomlkit/" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=31aac0dbc1babd278d5386dadb7f8e82" + +SRC_URI[sha256sum] = "fff5fe59a87295b278abd31bec92c15d9bc4a06885ab12bcea52c71119392e79" + +inherit pypi python_poetry_core ptest + +SRC_URI += " \ + file://run-ptest \ +" + +RDEPENDS:${PN} += " \ + python3-datetime \ + python3-profile \ + python3-stringold \ +" + +RDEPENDS:${PN}-ptest += " \ + python3-poetry-core \ + python3-pytest \ + python3-pyyaml \ + python3-unittest-automake-output \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ +} + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-tornado_6.4.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-tornado_6.4.1.bb new file mode 100644 index 00000000..b8f6752f --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-tornado_6.4.1.bb @@ -0,0 +1,41 @@ +SUMMARY = "Tornado is an open source version of the scalable, non-blocking web server and tools that power FriendFeed." +DESCRIPTION = "Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed. \ +By using non-blocking network I/O, Tornado can scale to tens of thousands of open connections, making it ideal for long \ +polling, WebSockets, and other applications that require a long-lived connection to each user." +HOMEPAGE = "http://www.tornadoweb.org/en/stable/" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" + +SRC_URI[sha256sum] = "92d3ab53183d8c50f8204a51e6f91d18a15d5ef261e84d452800d4ff6fc504e9" + +inherit pypi python_setuptools_build_meta + +# Requires _compression which is currently located in misc +RDEPENDS:${PN} += " \ + python3-asyncio \ + python3-certifi \ + python3-compression \ + python3-ctypes \ + python3-email \ + python3-html \ + python3-json \ + python3-misc \ + python3-multiprocessing \ + python3-numbers \ + python3-pkgutil \ + python3-pycurl \ + python3-threading \ + python3-unittest \ +" + +RDEPENDS:${PN}-test += "python3-unittest" + +PACKAGES =+ "\ + ${PN}-test \ +" + +FILES:${PN}-test = " \ + ${PYTHON_SITEPACKAGES_DIR}/*/test \ +" + +BBCLASSEXTEND += "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-tornado_6.4.2.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-tornado_6.4.2.bb deleted file mode 100644 index 751f3291..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-tornado_6.4.2.bb +++ /dev/null @@ -1,41 +0,0 @@ -SUMMARY = "Tornado is an open source version of the scalable, non-blocking web server and tools that power FriendFeed." -DESCRIPTION = "Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed. \ -By using non-blocking network I/O, Tornado can scale to tens of thousands of open connections, making it ideal for long \ -polling, WebSockets, and other applications that require a long-lived connection to each user." -HOMEPAGE = "http://www.tornadoweb.org/en/stable/" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" - -SRC_URI[sha256sum] = "92bad5b4746e9879fd7bf1eb21dce4e3fc5128d71601f80005afa39237ad620b" - -inherit pypi python_setuptools_build_meta - -# Requires _compression which is currently located in misc -RDEPENDS:${PN} += " \ - python3-asyncio \ - python3-certifi \ - python3-compression \ - python3-ctypes \ - python3-email \ - python3-html \ - python3-json \ - python3-misc \ - python3-multiprocessing \ - python3-numbers \ - python3-pkgutil \ - python3-pycurl \ - python3-threading \ - python3-unittest \ -" - -RDEPENDS:${PN}-test += "python3-unittest" - -PACKAGES =+ "\ - ${PN}-test \ -" - -FILES:${PN}-test = " \ - ${PYTHON_SITEPACKAGES_DIR}/*/test \ -" - -BBCLASSEXTEND += "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-tox_4.14.2.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-tox_4.14.2.bb deleted file mode 100644 index f451de32..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-tox_4.14.2.bb +++ /dev/null @@ -1,34 +0,0 @@ -# SPDX-License-Identifier: MIT -# Copyright (C) 2023 iris-GmbH infrared & intelligent sensors - -SUMMARY = "Automate and standardize testing in Python. It is part of a larger vision of easing the packaging, testing and release process of Python software (alongside pytest and devpi)." -HOMEPAGE = "http://tox.readthedocs.org/" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=11610a9d8fd95649cf8159be12b98cb7" - -SRC_URI[sha256sum] = "0defb44f6dafd911b61788325741cc6b2e12ea71f987ac025ad4d649f1f1a104" - -BBCLASSEXTEND = "native nativesdk" -inherit pypi python_hatchling - -DEPENDS += "\ - python3-hatch-vcs-native \ -" - -RDEPENDS:${PN} += "\ - python3-cachetools \ - python3-chardet \ - python3-colorama \ - python3-filelock \ - python3-packaging \ - python3-platformdirs \ - python3-pluggy \ - python3-pyproject-api \ - python3-tomli \ - python3-virtualenv \ -" - -# Install all built-in python3 modules, as the software tested with tox might -# depend on it. Tox will attempt to install all required dependencies -# in a virtualenv using pip, but this obviously does not include the built-in modules. -RDEPENDS:${PN} += "python3-modules" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-tox_4.15.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-tox_4.15.1.bb new file mode 100644 index 00000000..367fafab --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-tox_4.15.1.bb @@ -0,0 +1,34 @@ +# SPDX-License-Identifier: MIT +# Copyright (C) 2023 iris-GmbH infrared & intelligent sensors + +SUMMARY = "Automate and standardize testing in Python. It is part of a larger vision of easing the packaging, testing and release process of Python software (alongside pytest and devpi)." +HOMEPAGE = "http://tox.readthedocs.org/" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=11610a9d8fd95649cf8159be12b98cb7" + +SRC_URI[sha256sum] = "53a092527d65e873e39213ebd4bd027a64623320b6b0326136384213f95b7076" + +BBCLASSEXTEND = "native nativesdk" +inherit pypi python_hatchling + +DEPENDS += "\ + python3-hatch-vcs-native \ +" + +RDEPENDS:${PN} += "\ + python3-cachetools \ + python3-chardet \ + python3-colorama \ + python3-filelock \ + python3-packaging \ + python3-platformdirs \ + python3-pluggy \ + python3-pyproject-api \ + python3-tomli \ + python3-virtualenv \ +" + +# Install all built-in python3 modules, as the software tested with tox might +# depend on it. Tox will attempt to install all required dependencies +# in a virtualenv using pip, but this obviously does not include the built-in modules. +RDEPENDS:${PN} += "python3-modules" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-tqdm_4.66.2.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-tqdm_4.66.2.bb deleted file mode 100644 index 77d26f54..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-tqdm_4.66.2.bb +++ /dev/null @@ -1,19 +0,0 @@ -SUMMARY = "Fast, Extensible Progress Meter" -HOMEPAGE = "http://tqdm.github.io/" -SECTION = "devel/python" - -LICENSE = "MIT & MPL-2.0" -LIC_FILES_CHKSUM = "file://LICENCE;md5=42dfa9e8c616dbc295df3f58d756b2a1" - -SRC_URI[sha256sum] = "6cd52cdf0fef0e0f543299cfc96fec90d7b8a7e88745f411ec33eb44d5ed3531" - -inherit pypi python_setuptools_build_meta - -DEPENDS += "python3-setuptools-scm-native" - -RDEPENDS:${PN} += " \ - python3-logging \ - python3-numbers \ -" - -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-tqdm_4.66.5.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-tqdm_4.66.5.bb new file mode 100644 index 00000000..409936d5 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-tqdm_4.66.5.bb @@ -0,0 +1,19 @@ +SUMMARY = "Fast, Extensible Progress Meter" +HOMEPAGE = "http://tqdm.github.io/" +SECTION = "devel/python" + +LICENSE = "MIT & MPL-2.0" +LIC_FILES_CHKSUM = "file://LICENCE;md5=42dfa9e8c616dbc295df3f58d756b2a1" + +SRC_URI[sha256sum] = "e1020aef2e5096702d8a025ac7d16b1577279c9d63f8375b63083e9a5f0fcbad" + +inherit pypi python_setuptools_build_meta + +DEPENDS += "python3-setuptools-scm-native" + +RDEPENDS:${PN} += " \ + python3-logging \ + python3-numbers \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-transitions_0.9.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-transitions_0.9.0.bb deleted file mode 100644 index 980351bf..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-transitions_0.9.0.bb +++ /dev/null @@ -1,9 +0,0 @@ -SUMMARY = "A lightweight, object-oriented Python state machine implementation with many extensions." -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=de0a0876a688a4483bfafa764773ab39" - -inherit pypi setuptools3 - -SRC_URI[sha256sum] = "2f54d11bdb225779d7e729011e93a9fb717668ce3dc65f8d4f5a5d7ba2f48e10" - -RDEPENDS:${PN} += "python3-six python3-logging" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-transitions_0.9.2.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-transitions_0.9.2.bb new file mode 100644 index 00000000..3a27b666 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-transitions_0.9.2.bb @@ -0,0 +1,9 @@ +SUMMARY = "A lightweight, object-oriented Python state machine implementation with many extensions." +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=de0a0876a688a4483bfafa764773ab39" + +inherit pypi setuptools3 + +SRC_URI[sha256sum] = "2f8490dbdbd419366cef1516032ab06d07ccb5839ef54905e842a472692d4204" + +RDEPENDS:${PN} += "python3-six python3-logging" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-trustme_1.1.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-trustme_1.1.0.bb index 21161a0e..dab18f28 100644 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-trustme_1.1.0.bb +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-trustme_1.1.0.bb @@ -20,10 +20,12 @@ RDEPENDS:${PN} += " \ " RDEPENDS:${PN}-ptest += " \ + python3-attrs \ python3-pyopenssl \ python3-pyasn1-modules \ python3-pytest \ python3-service-identity \ + python3-six \ python3-unittest-automake-output \ " diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-twine_5.0.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-twine_5.0.0.bb deleted file mode 100644 index cb450748..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-twine_5.0.0.bb +++ /dev/null @@ -1,18 +0,0 @@ -DESCRIPTION = "Utilities for interacting with PyPI" -HOMEPAGE = "https://twine.readthedocs.io/" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=a3d1106b253a8d50dd82a4202a045b4c" - -SRC_URI[sha256sum] = "89b0cc7d370a4b66421cc6102f269aa910fe0f1861c124f573cf2ddedbc10cf4" - -inherit pypi python_setuptools_build_meta - -DEPENDS += "\ - python3-setuptools-scm-native \ -" - -RDEPENDS:${PN} += " \ - python3-importlib-metadata \ -" - -BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-twine_5.1.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-twine_5.1.1.bb new file mode 100644 index 00000000..13ddc08c --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-twine_5.1.1.bb @@ -0,0 +1,18 @@ +DESCRIPTION = "Utilities for interacting with PyPI" +HOMEPAGE = "https://twine.readthedocs.io/" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=a3d1106b253a8d50dd82a4202a045b4c" + +SRC_URI[sha256sum] = "9aa0825139c02b3434d913545c7b847a21c835e11597f5255842d457da2322db" + +inherit pypi python_setuptools_build_meta + +DEPENDS += "\ + python3-setuptools-scm-native \ +" + +RDEPENDS:${PN} += " \ + python3-importlib-metadata \ +" + +BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-twisted/CVE-2024-41671-0001.patch b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-twisted/CVE-2024-41671-0001.patch deleted file mode 100644 index 1f6bf6bb..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-twisted/CVE-2024-41671-0001.patch +++ /dev/null @@ -1,89 +0,0 @@ -From 046a164f89a0f08d3239ecebd750360f8914df33 Mon Sep 17 00:00:00 2001 -From: Adi Roiban -Date: Mon Jul 29 14:28:03 2024 +0100 -Subject: [PATCH] Merge commit from fork - -Added HTML output encoding the "URL" parameter of the "redirectTo" function - -CVE: CVE-2024-41671 - -Upstream-Status: Backport [https://github.com/twisted/twisted/commit/046a164f89a0f08d3239ecebd750360f8914df33] - -Signed-off-by: Soumya Sambu ---- - src/twisted/web/_template_util.py | 2 +- - src/twisted/web/test/test_util.py | 39 ++++++++++++++++++++++++++++++- - 2 files changed, 39 insertions(+), 2 deletions(-) - -diff --git a/src/twisted/web/_template_util.py b/src/twisted/web/_template_util.py -index 230c33f..7266079 100644 ---- a/src/twisted/web/_template_util.py -+++ b/src/twisted/web/_template_util.py -@@ -92,7 +92,7 @@ def redirectTo(URL: bytes, request: IRequest) -> bytes: - - - """ % { -- b"url": URL -+ b"url": escape(URL.decode("utf-8")).encode("utf-8") - } - return content - -diff --git a/src/twisted/web/test/test_util.py b/src/twisted/web/test/test_util.py -index 1e76300..9847dcb 100644 ---- a/src/twisted/web/test/test_util.py -+++ b/src/twisted/web/test/test_util.py -@@ -5,7 +5,6 @@ - Tests for L{twisted.web.util}. - """ - -- - import gc - - from twisted.internet import defer -@@ -64,6 +63,44 @@ class RedirectToTests(TestCase): - targetURL = "http://target.example.com/4321" - self.assertRaises(TypeError, redirectTo, targetURL, request) - -+ def test_legitimateRedirect(self): -+ """ -+ Legitimate URLs are fully interpolated in the `redirectTo` response body without transformation -+ """ -+ request = DummyRequest([b""]) -+ html = redirectTo(b"https://twisted.org/", request) -+ expected = b""" -+ -+ -+ -+ -+ -+ click here -+ -+ -+""" -+ self.assertEqual(html, expected) -+ -+ def test_maliciousRedirect(self): -+ """ -+ Malicious URLs are HTML-escaped before interpolating them in the `redirectTo` response body -+ """ -+ request = DummyRequest([b""]) -+ html = redirectTo( -+ b'https://twisted.org/">', request -+ ) -+ expected = b""" -+ -+ -+ -+ -+ -+ click here -+ -+ -+""" -+ self.assertEqual(html, expected) -+ - - class ParentRedirectTests(SynchronousTestCase): - """ --- -2.40.0 diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-twisted/CVE-2024-41671-0002.patch b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-twisted/CVE-2024-41671-0002.patch deleted file mode 100644 index 147c21d7..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-twisted/CVE-2024-41671-0002.patch +++ /dev/null @@ -1,251 +0,0 @@ -From 4a930de12fb67e88fefcb8822104152f42b27abc Mon Sep 17 00:00:00 2001 -From: Adi Roiban -Date: Mon Jul 29 14:27:23 2024 +0100 -Subject: [PATCH] Merge commit from fork - -Address GHSA-c8m8-j448-xjx7 - -CVE: CVE-2024-41671 - -Upstream-Status: Backport [https://github.com/twisted/twisted/commit/4a930de12fb67e88fefcb8822104152f42b27abc] - -Signed-off-by: Soumya Sambu ---- - src/twisted/web/http.py | 21 +++-- - src/twisted/web/test/test_http.py | 122 ++++++++++++++++++++++++++---- - 2 files changed, 122 insertions(+), 21 deletions(-) - -diff --git a/src/twisted/web/http.py b/src/twisted/web/http.py -index 1c59838..3b784f5 100644 ---- a/src/twisted/web/http.py -+++ b/src/twisted/web/http.py -@@ -2000,16 +2000,21 @@ class _ChunkedTransferDecoder: - @returns: C{False}, as there is either insufficient data to continue, - or no data remains. - """ -- if ( -- self._receivedTrailerHeadersSize + len(self._buffer) -- > self._maxTrailerHeadersSize -- ): -- raise _MalformedChunkedDataError("Trailer headers data is too long.") -- - eolIndex = self._buffer.find(b"\r\n", self._start) - - if eolIndex == -1: - # Still no end of network line marker found. -+ # -+ # Check if we've run up against the trailer size limit: if the next -+ # read contains the terminating CRLF then we'll have this many bytes -+ # of trailers (including the CRLFs). -+ minTrailerSize = ( -+ self._receivedTrailerHeadersSize -+ + len(self._buffer) -+ + (1 if self._buffer.endswith(b"\r") else 2) -+ ) -+ if minTrailerSize > self._maxTrailerHeadersSize: -+ raise _MalformedChunkedDataError("Trailer headers data is too long.") - # Continue processing more data. - return False - -@@ -2019,6 +2024,8 @@ class _ChunkedTransferDecoder: - del self._buffer[0 : eolIndex + 2] - self._start = 0 - self._receivedTrailerHeadersSize += eolIndex + 2 -+ if self._receivedTrailerHeadersSize > self._maxTrailerHeadersSize: -+ raise _MalformedChunkedDataError("Trailer headers data is too long.") - return True - - # eolIndex in this part of code is equal to 0 -@@ -2342,8 +2349,8 @@ class HTTPChannel(basic.LineReceiver, policies.TimeoutMixin): - self.__header = line - - def _finishRequestBody(self, data): -- self.allContentReceived() - self._dataBuffer.append(data) -+ self.allContentReceived() - - def _maybeChooseTransferDecoder(self, header, data): - """ -diff --git a/src/twisted/web/test/test_http.py b/src/twisted/web/test/test_http.py -index 33d0a49..1130d31 100644 ---- a/src/twisted/web/test/test_http.py -+++ b/src/twisted/web/test/test_http.py -@@ -135,7 +135,7 @@ class DummyHTTPHandler(http.Request): - data = self.content.read() - length = self.getHeader(b"content-length") - if length is None: -- length = networkString(str(length)) -+ length = str(length).encode() - request = b"'''\n" + length + b"\n" + data + b"'''\n" - self.setResponseCode(200) - self.setHeader(b"Request", self.uri) -@@ -563,17 +563,23 @@ class HTTP0_9Tests(HTTP1_0Tests): - - class PipeliningBodyTests(unittest.TestCase, ResponseTestMixin): - """ -- Tests that multiple pipelined requests with bodies are correctly buffered. -+ Pipelined requests get buffered and executed in the order received, -+ not processed in parallel. - """ - - requests = ( - b"POST / HTTP/1.1\r\n" - b"Content-Length: 10\r\n" - b"\r\n" -- b"0123456789POST / HTTP/1.1\r\n" -- b"Content-Length: 10\r\n" -- b"\r\n" - b"0123456789" -+ # Chunk encoded request. -+ b"POST / HTTP/1.1\r\n" -+ b"Transfer-Encoding: chunked\r\n" -+ b"\r\n" -+ b"a\r\n" -+ b"0123456789\r\n" -+ b"0\r\n" -+ b"\r\n" - ) - - expectedResponses = [ -@@ -590,14 +596,16 @@ class PipeliningBodyTests(unittest.TestCase, ResponseTestMixin): - b"Request: /", - b"Command: POST", - b"Version: HTTP/1.1", -- b"Content-Length: 21", -- b"'''\n10\n0123456789'''\n", -+ b"Content-Length: 23", -+ b"'''\nNone\n0123456789'''\n", - ), - ] - -- def test_noPipelining(self): -+ def test_stepwiseTinyTube(self): - """ -- Test that pipelined requests get buffered, not processed in parallel. -+ Imitate a slow connection that delivers one byte at a time. -+ The request handler (L{DelayedHTTPHandler}) is puppeted to -+ step through the handling of each request. - """ - b = StringTransport() - a = http.HTTPChannel() -@@ -606,10 +614,9 @@ class PipeliningBodyTests(unittest.TestCase, ResponseTestMixin): - # one byte at a time, to stress it. - for byte in iterbytes(self.requests): - a.dataReceived(byte) -- value = b.value() - - # So far only one request should have been dispatched. -- self.assertEqual(value, b"") -+ self.assertEqual(b.value(), b"") - self.assertEqual(1, len(a.requests)) - - # Now, process each request one at a time. -@@ -618,8 +625,91 @@ class PipeliningBodyTests(unittest.TestCase, ResponseTestMixin): - request = a.requests[0].original - request.delayedProcess() - -- value = b.value() -- self.assertResponseEquals(value, self.expectedResponses) -+ self.assertResponseEquals(b.value(), self.expectedResponses) -+ -+ def test_stepwiseDumpTruck(self): -+ """ -+ Imitate a fast connection where several pipelined -+ requests arrive in a single read. The request handler -+ (L{DelayedHTTPHandler}) is puppeted to step through the -+ handling of each request. -+ """ -+ b = StringTransport() -+ a = http.HTTPChannel() -+ a.requestFactory = DelayedHTTPHandlerProxy -+ a.makeConnection(b) -+ -+ a.dataReceived(self.requests) -+ -+ # So far only one request should have been dispatched. -+ self.assertEqual(b.value(), b"") -+ self.assertEqual(1, len(a.requests)) -+ -+ # Now, process each request one at a time. -+ while a.requests: -+ self.assertEqual(1, len(a.requests)) -+ request = a.requests[0].original -+ request.delayedProcess() -+ -+ self.assertResponseEquals(b.value(), self.expectedResponses) -+ -+ def test_immediateTinyTube(self): -+ """ -+ Imitate a slow connection that delivers one byte at a time. -+ (L{DummyHTTPHandler}) immediately responds, but no more -+ than one -+ """ -+ b = StringTransport() -+ a = http.HTTPChannel() -+ a.requestFactory = DummyHTTPHandlerProxy # "sync" -+ a.makeConnection(b) -+ -+ # one byte at a time, to stress it. -+ for byte in iterbytes(self.requests): -+ a.dataReceived(byte) -+ # There is never more than one request dispatched at a time: -+ self.assertLessEqual(len(a.requests), 1) -+ -+ self.assertResponseEquals(b.value(), self.expectedResponses) -+ -+ def test_immediateDumpTruck(self): -+ """ -+ Imitate a fast connection where several pipelined -+ requests arrive in a single read. The request handler -+ (L{DummyHTTPHandler}) immediately responds. -+ This doesn't check the at-most-one pending request -+ invariant but exercises otherwise uncovered code paths. -+ See GHSA-c8m8-j448-xjx7. -+ """ -+ b = StringTransport() -+ a = http.HTTPChannel() -+ a.requestFactory = DummyHTTPHandlerProxy -+ a.makeConnection(b) -+ -+ # All bytes at once to ensure there's stuff to buffer. -+ a.dataReceived(self.requests) -+ -+ self.assertResponseEquals(b.value(), self.expectedResponses) -+ -+ def test_immediateABiggerTruck(self): -+ """ -+ Imitate a fast connection where a so many pipelined -+ requests arrive in a single read that backpressure is indicated. -+ The request handler (L{DummyHTTPHandler}) immediately responds. -+ This doesn't check the at-most-one pending request -+ invariant but exercises otherwise uncovered code paths. -+ See GHSA-c8m8-j448-xjx7. -+ @see: L{http.HTTPChannel._optimisticEagerReadSize} -+ """ -+ b = StringTransport() -+ a = http.HTTPChannel() -+ a.requestFactory = DummyHTTPHandlerProxy -+ a.makeConnection(b) -+ -+ overLimitCount = a._optimisticEagerReadSize // len(self.requests) * 10 -+ a.dataReceived(self.requests * overLimitCount) -+ -+ self.assertResponseEquals(b.value(), self.expectedResponses * overLimitCount) - - def test_pipeliningReadLimit(self): - """ -@@ -1522,7 +1612,11 @@ class ChunkedTransferEncodingTests(unittest.TestCase): - lambda b: None, # pragma: nocov - ) - p._maxTrailerHeadersSize = 10 -- p.dataReceived(b"3\r\nabc\r\n0\r\n0123456789") -+ # 9 bytes are received so far, in 2 packets. -+ # For now, all is ok. -+ p.dataReceived(b"3\r\nabc\r\n0\r\n01234567") -+ p.dataReceived(b"\r") -+ # Once the 10th byte is received, the processing fails. - self.assertRaises( - http._MalformedChunkedDataError, - p.dataReceived, --- -2.40.0 diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-twisted_24.3.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-twisted_24.3.0.bb deleted file mode 100644 index 272aecb8..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-twisted_24.3.0.bb +++ /dev/null @@ -1,181 +0,0 @@ -DESCRIPTION = "Twisted is an event-driven networking framework written in Python and licensed under the LGPL. \ -Twisted supports TCP, UDP, SSL/TLS, multicast, Unix sockets, a large number of protocols \ -(including HTTP, NNTP, IMAP, SSH, IRC, FTP, and others), and much more." -HOMEPAGE = "https://twisted.org" - -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=c1c5d2c2493b848f83864bdedd67bbf5" - -SRC_URI += " \ - file://CVE-2024-41671-0001.patch \ - file://CVE-2024-41671-0002.patch \ -" - -SRC_URI[sha256sum] = "6b38b6ece7296b5e122c9eb17da2eeab3d98a198f50ca9efd00fb03e5b4fd4ae" - -inherit pypi python_hatchling - -do_install:append() { - # remove some useless files before packaging - find ${D} \( -name "*.bat" -o -name "*.c" -o -name "*.h" \) -exec rm -f {} \; -} - -PACKAGES =+ "\ - ${PN}-zsh \ - ${PN}-test \ - ${PN}-protocols \ - ${PN}-conch \ - ${PN}-mail \ - ${PN}-names \ - ${PN}-runner \ - ${PN}-web \ - ${PN}-words \ - ${PN}-pair \ - ${PN}-core \ -" - -DEPENDS += " \ - python3-hatch-fancy-pypi-readme-native \ - python3-incremental-native \ -" - -RDEPENDS:${PN} = "\ - ${PN}-core \ - ${PN}-conch \ - ${PN}-mail \ - ${PN}-names \ - ${PN}-pair \ - ${PN}-protocols \ - ${PN}-runner \ - ${PN}-web \ - ${PN}-words \ - ${PN}-zsh \ -" - -RDEPENDS:${PN}-core = "python3-appdirs \ - python3-asyncio \ - python3-automat \ - python3-constantly \ - python3-core \ - python3-debugger \ - python3-hyperlink \ - python3-incremental \ - python3-pyserial \ - python3-typing-extensions \ - python3-unixadmin \ - python3-zopeinterface \ -" -RDEPENDS:${PN}-test = "${PN} python3-pyhamcrest" -RDEPENDS:${PN}-conch = "${PN}-core ${PN}-protocols python3-bcrypt python3-cryptography python3-pickle" -RDEPENDS:${PN}-mail = "${PN}-core ${PN}-protocols" -RDEPENDS:${PN}-names = "${PN}-core" -RDEPENDS:${PN}-runner = "${PN}-core ${PN}-protocols" -RDEPENDS:${PN}-web += "${PN}-core ${PN}-protocols" -RDEPENDS:${PN}-words += "${PN}-core" -RDEPENDS:${PN}-pair += "${PN}-core" - -FILES:${PN}-test = " \ - ${PYTHON_SITEPACKAGES_DIR}/twisted/test \ - ${PYTHON_SITEPACKAGES_DIR}/twisted/*/test \ - ${PYTHON_SITEPACKAGES_DIR}/twisted/protocols/haproxy/test/ \ -" - -FILES:${PN}-protocols = " \ - ${PYTHON_SITEPACKAGES_DIR}/twisted/protocols/*.py* \ - ${PYTHON_SITEPACKAGES_DIR}/twisted/protocols/haproxy \ - ${PYTHON_SITEPACKAGES_DIR}/twisted/protocols/__pycache__/*pyc \ -" - -FILES:${PN}-zsh = " \ - ${PYTHON_SITEPACKAGES_DIR}/twisted/python/twisted-completion.zsh \ -" - -FILES:${PN}-conch = " \ - ${bindir}/ckeygen \ - ${bindir}/tkconch \ - ${bindir}/conch \ - ${bindir}/cftp \ - ${PYTHON_SITEPACKAGES_DIR}/twisted/plugins/twisted_conch.py* \ - ${PYTHON_SITEPACKAGES_DIR}/twisted/plugins/__pycache__/twisted_conch*.pyc \ - ${PYTHON_SITEPACKAGES_DIR}/twisted/conch \ -" - -FILES:${PN}-core = " \ - ${bindir}/twist \ - ${bindir}/twistd \ - ${bindir}/trial \ - ${bindir}/pyhtmlizer \ - ${PYTHON_SITEPACKAGES_DIR}/twisted/*.py* \ - ${PYTHON_SITEPACKAGES_DIR}/twisted/application \ - ${PYTHON_SITEPACKAGES_DIR}/twisted/cred \ - ${PYTHON_SITEPACKAGES_DIR}/twisted/enterprise \ - ${PYTHON_SITEPACKAGES_DIR}/twisted/internet \ - ${PYTHON_SITEPACKAGES_DIR}/twisted/persisted \ - ${PYTHON_SITEPACKAGES_DIR}/twisted/protocols \ - ${PYTHON_SITEPACKAGES_DIR}/twisted/scripts \ - ${PYTHON_SITEPACKAGES_DIR}/twisted/spread \ - ${PYTHON_SITEPACKAGES_DIR}/twisted/tap \ - ${PYTHON_SITEPACKAGES_DIR}/twisted/trial \ - ${PYTHON_SITEPACKAGES_DIR}/twisted/*.py* \ - ${PYTHON_SITEPACKAGES_DIR}/twisted/python/*.py* \ - ${PYTHON_SITEPACKAGES_DIR}/twisted/plugins/*.py* \ - ${PYTHON_SITEPACKAGES_DIR}/twisted/logger \ - ${PYTHON_SITEPACKAGES_DIR}/twisted/_threads \ - ${PYTHON_SITEPACKAGES_DIR}/twisted/positioning \ - ${PYTHON_SITEPACKAGES_DIR}/twisted/py.typed \ - ${PYTHON_SITEPACKAGES_DIR}/twisted/__pycache__/*pyc \ - ${PYTHON_SITEPACKAGES_DIR}/twisted/python/__pycache__/*pyc \ - ${PYTHON_SITEPACKAGES_DIR}/twisted/plugins/__pycache__/__init__*.pyc \ - ${PYTHON_SITEPACKAGES_DIR}/twisted/plugins/__pycache__/cred_anonymous*.pyc \ - ${PYTHON_SITEPACKAGES_DIR}/twisted/plugins/__pycache__/cred_file*.pyc \ - ${PYTHON_SITEPACKAGES_DIR}/twisted/plugins/__pycache__/cred_memory*.pyc \ - ${PYTHON_SITEPACKAGES_DIR}/twisted/plugins/__pycache__/cred_sshkeys*.pyc \ - ${PYTHON_SITEPACKAGES_DIR}/twisted/plugins/__pycache__/cred_unix*.pyc \ - ${PYTHON_SITEPACKAGES_DIR}/twisted/plugins/__pycache__/twisted_core*.pyc \ - ${PYTHON_SITEPACKAGES_DIR}/twisted/plugins/__pycache__/twisted_ftp*.pyc \ - ${PYTHON_SITEPACKAGES_DIR}/twisted/plugins/__pycache__/twisted_inet*.pyc \ - ${PYTHON_SITEPACKAGES_DIR}/twisted/plugins/__pycache__/twisted_portforward*.pyc \ - ${PYTHON_SITEPACKAGES_DIR}/twisted/plugins/__pycache__/twisted_reactors*.pyc \ - ${PYTHON_SITEPACKAGES_DIR}/twisted/plugins/__pycache__/twisted_socks*.pyc \ - ${PYTHON_SITEPACKAGES_DIR}/twisted/plugins/__pycache__/twisted_trial*.pyc \ -" - -FILES:${PN}-mail = " \ - ${bindir}/mailmail \ - ${PYTHON_SITEPACKAGES_DIR}/twisted/plugins/twisted_mail.py* \ - ${PYTHON_SITEPACKAGES_DIR}/twisted/plugins/__pycache__/twisted_mail*.pyc \ - ${PYTHON_SITEPACKAGES_DIR}/twisted/mail \ -" - -FILES:${PN}-names = " \ - ${PYTHON_SITEPACKAGES_DIR}/twisted/plugins/twisted_names.py* \ - ${PYTHON_SITEPACKAGES_DIR}/twisted/plugins/__pycache__/twisted_names*.pyc \ - ${PYTHON_SITEPACKAGES_DIR}/twisted/names \ -" - -FILES:${PN}-runner = " \ - ${PYTHON_SITEPACKAGES_DIR}/twisted/plugins/twisted_runner.py* \ - ${PYTHON_SITEPACKAGES_DIR}/twisted/plugins/__pycache__/twisted_runner*.pyc \ - ${PYTHON_SITEPACKAGES_DIR}/twisted/runner \ -" - -FILES:${PN}-web = " \ - ${PYTHON_SITEPACKAGES_DIR}/twisted/plugins/twisted_web.py* \ - ${PYTHON_SITEPACKAGES_DIR}/twisted/plugins/__pycache__/twisted_web*.pyc \ - ${PYTHON_SITEPACKAGES_DIR}/twisted/web \ -" - -FILES:${PN}-words = " \ - ${PYTHON_SITEPACKAGES_DIR}/twisted/plugins/twisted_words.py* \ - ${PYTHON_SITEPACKAGES_DIR}/twisted/plugins/__pycache__/twisted_words*.pyc \ - ${PYTHON_SITEPACKAGES_DIR}/twisted/words \ -" - -FILES:${PN}-pair = " \ - ${PYTHON_SITEPACKAGES_DIR}/twisted/pair \ -" - -FILES:${PN}-doc += " \ - ${PYTHON_SITEPACKAGES_DIR}/twisted/python/_pydoctortemplates \ -" - diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-twisted_24.7.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-twisted_24.7.0.bb new file mode 100644 index 00000000..e0472d1d --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-twisted_24.7.0.bb @@ -0,0 +1,177 @@ +DESCRIPTION = "Twisted is an event-driven networking framework written in Python and licensed under the LGPL. \ +Twisted supports TCP, UDP, SSL/TLS, multicast, Unix sockets, a large number of protocols \ +(including HTTP, NNTP, IMAP, SSH, IRC, FTP, and others), and much more." +HOMEPAGE = "https://twisted.org" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=c1c5d2c2493b848f83864bdedd67bbf5" + +SRC_URI[sha256sum] = "5a60147f044187a127ec7da96d170d49bcce50c6fd36f594e60f4587eff4d394" + +inherit pypi python_hatchling + +do_install:append() { + # remove some useless files before packaging + find ${D} \( -name "*.bat" -o -name "*.c" -o -name "*.h" \) -exec rm -f {} \; +} + +PACKAGES =+ "\ + ${PN}-zsh \ + ${PN}-test \ + ${PN}-protocols \ + ${PN}-conch \ + ${PN}-mail \ + ${PN}-names \ + ${PN}-runner \ + ${PN}-web \ + ${PN}-words \ + ${PN}-pair \ + ${PN}-core \ +" + +DEPENDS += " \ + python3-hatch-fancy-pypi-readme-native \ + python3-incremental-native \ +" + +RDEPENDS:${PN} = "\ + ${PN}-core \ + ${PN}-conch \ + ${PN}-mail \ + ${PN}-names \ + ${PN}-pair \ + ${PN}-protocols \ + ${PN}-runner \ + ${PN}-web \ + ${PN}-words \ + ${PN}-zsh \ +" + +RDEPENDS:${PN}-core = "python3-appdirs \ + python3-asyncio \ + python3-attrs \ + python3-automat \ + python3-constantly \ + python3-core \ + python3-debugger \ + python3-hyperlink \ + python3-incremental \ + python3-pyserial \ + python3-typing-extensions \ + python3-unixadmin \ + python3-zopeinterface \ +" +RDEPENDS:${PN}-test = "${PN} python3-pyhamcrest" +RDEPENDS:${PN}-conch = "${PN}-core ${PN}-protocols python3-bcrypt python3-cryptography python3-pickle" +RDEPENDS:${PN}-mail = "${PN}-core ${PN}-protocols" +RDEPENDS:${PN}-names = "${PN}-core" +RDEPENDS:${PN}-runner = "${PN}-core ${PN}-protocols" +RDEPENDS:${PN}-web += "${PN}-core ${PN}-protocols" +RDEPENDS:${PN}-words += "${PN}-core" +RDEPENDS:${PN}-pair += "${PN}-core" + +FILES:${PN}-test = " \ + ${PYTHON_SITEPACKAGES_DIR}/twisted/test \ + ${PYTHON_SITEPACKAGES_DIR}/twisted/*/test \ + ${PYTHON_SITEPACKAGES_DIR}/twisted/protocols/haproxy/test/ \ +" + +FILES:${PN}-protocols = " \ + ${PYTHON_SITEPACKAGES_DIR}/twisted/protocols/*.py* \ + ${PYTHON_SITEPACKAGES_DIR}/twisted/protocols/haproxy \ + ${PYTHON_SITEPACKAGES_DIR}/twisted/protocols/__pycache__/*pyc \ +" + +FILES:${PN}-zsh = " \ + ${PYTHON_SITEPACKAGES_DIR}/twisted/python/twisted-completion.zsh \ +" + +FILES:${PN}-conch = " \ + ${bindir}/ckeygen \ + ${bindir}/tkconch \ + ${bindir}/conch \ + ${bindir}/cftp \ + ${PYTHON_SITEPACKAGES_DIR}/twisted/plugins/twisted_conch.py* \ + ${PYTHON_SITEPACKAGES_DIR}/twisted/plugins/__pycache__/twisted_conch*.pyc \ + ${PYTHON_SITEPACKAGES_DIR}/twisted/conch \ +" + +FILES:${PN}-core = " \ + ${bindir}/twist \ + ${bindir}/twistd \ + ${bindir}/trial \ + ${bindir}/pyhtmlizer \ + ${PYTHON_SITEPACKAGES_DIR}/twisted/*.py* \ + ${PYTHON_SITEPACKAGES_DIR}/twisted/application \ + ${PYTHON_SITEPACKAGES_DIR}/twisted/cred \ + ${PYTHON_SITEPACKAGES_DIR}/twisted/enterprise \ + ${PYTHON_SITEPACKAGES_DIR}/twisted/internet \ + ${PYTHON_SITEPACKAGES_DIR}/twisted/persisted \ + ${PYTHON_SITEPACKAGES_DIR}/twisted/protocols \ + ${PYTHON_SITEPACKAGES_DIR}/twisted/scripts \ + ${PYTHON_SITEPACKAGES_DIR}/twisted/spread \ + ${PYTHON_SITEPACKAGES_DIR}/twisted/tap \ + ${PYTHON_SITEPACKAGES_DIR}/twisted/trial \ + ${PYTHON_SITEPACKAGES_DIR}/twisted/*.py* \ + ${PYTHON_SITEPACKAGES_DIR}/twisted/python/*.py* \ + ${PYTHON_SITEPACKAGES_DIR}/twisted/plugins/*.py* \ + ${PYTHON_SITEPACKAGES_DIR}/twisted/logger \ + ${PYTHON_SITEPACKAGES_DIR}/twisted/_threads \ + ${PYTHON_SITEPACKAGES_DIR}/twisted/positioning \ + ${PYTHON_SITEPACKAGES_DIR}/twisted/py.typed \ + ${PYTHON_SITEPACKAGES_DIR}/twisted/__pycache__/*pyc \ + ${PYTHON_SITEPACKAGES_DIR}/twisted/python/__pycache__/*pyc \ + ${PYTHON_SITEPACKAGES_DIR}/twisted/plugins/__pycache__/__init__*.pyc \ + ${PYTHON_SITEPACKAGES_DIR}/twisted/plugins/__pycache__/cred_anonymous*.pyc \ + ${PYTHON_SITEPACKAGES_DIR}/twisted/plugins/__pycache__/cred_file*.pyc \ + ${PYTHON_SITEPACKAGES_DIR}/twisted/plugins/__pycache__/cred_memory*.pyc \ + ${PYTHON_SITEPACKAGES_DIR}/twisted/plugins/__pycache__/cred_sshkeys*.pyc \ + ${PYTHON_SITEPACKAGES_DIR}/twisted/plugins/__pycache__/cred_unix*.pyc \ + ${PYTHON_SITEPACKAGES_DIR}/twisted/plugins/__pycache__/twisted_core*.pyc \ + ${PYTHON_SITEPACKAGES_DIR}/twisted/plugins/__pycache__/twisted_ftp*.pyc \ + ${PYTHON_SITEPACKAGES_DIR}/twisted/plugins/__pycache__/twisted_inet*.pyc \ + ${PYTHON_SITEPACKAGES_DIR}/twisted/plugins/__pycache__/twisted_portforward*.pyc \ + ${PYTHON_SITEPACKAGES_DIR}/twisted/plugins/__pycache__/twisted_reactors*.pyc \ + ${PYTHON_SITEPACKAGES_DIR}/twisted/plugins/__pycache__/twisted_socks*.pyc \ + ${PYTHON_SITEPACKAGES_DIR}/twisted/plugins/__pycache__/twisted_trial*.pyc \ +" + +FILES:${PN}-mail = " \ + ${bindir}/mailmail \ + ${PYTHON_SITEPACKAGES_DIR}/twisted/plugins/twisted_mail.py* \ + ${PYTHON_SITEPACKAGES_DIR}/twisted/plugins/__pycache__/twisted_mail*.pyc \ + ${PYTHON_SITEPACKAGES_DIR}/twisted/mail \ +" + +FILES:${PN}-names = " \ + ${PYTHON_SITEPACKAGES_DIR}/twisted/plugins/twisted_names.py* \ + ${PYTHON_SITEPACKAGES_DIR}/twisted/plugins/__pycache__/twisted_names*.pyc \ + ${PYTHON_SITEPACKAGES_DIR}/twisted/names \ +" + +FILES:${PN}-runner = " \ + ${PYTHON_SITEPACKAGES_DIR}/twisted/plugins/twisted_runner.py* \ + ${PYTHON_SITEPACKAGES_DIR}/twisted/plugins/__pycache__/twisted_runner*.pyc \ + ${PYTHON_SITEPACKAGES_DIR}/twisted/runner \ +" + +FILES:${PN}-web = " \ + ${PYTHON_SITEPACKAGES_DIR}/twisted/plugins/twisted_web.py* \ + ${PYTHON_SITEPACKAGES_DIR}/twisted/plugins/__pycache__/twisted_web*.pyc \ + ${PYTHON_SITEPACKAGES_DIR}/twisted/web \ +" + +FILES:${PN}-words = " \ + ${PYTHON_SITEPACKAGES_DIR}/twisted/plugins/twisted_words.py* \ + ${PYTHON_SITEPACKAGES_DIR}/twisted/plugins/__pycache__/twisted_words*.pyc \ + ${PYTHON_SITEPACKAGES_DIR}/twisted/words \ +" + +FILES:${PN}-pair = " \ + ${PYTHON_SITEPACKAGES_DIR}/twisted/pair \ +" + +FILES:${PN}-doc += " \ + ${PYTHON_SITEPACKAGES_DIR}/twisted/python/_pydoctortemplates \ +" + diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-typeguard_4.2.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-typeguard_4.2.1.bb deleted file mode 100644 index e0e84df2..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-typeguard_4.2.1.bb +++ /dev/null @@ -1,39 +0,0 @@ -SUMMARY = "Run-time type checker for Python" -HOMEPAGE = "https://pypi.org/project/typeguard/" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=f0e423eea5c91e7aa21bdb70184b3e53" - -SRC_URI[sha256sum] = "c556a1b95948230510070ca53fa0341fb0964611bd05d598d87fb52115d65fee" - -inherit pypi python_setuptools_build_meta ptest - -SRC_URI += " \ - file://run-ptest \ -" - -RDEPENDS:${PN} += " \ - python3-core \ - python3-compression \ - python3-unittest \ - python3-typing-extensions \ -" - -RDEPENDS:${PN}-ptest += " \ - python3-pytest \ - python3-typing-extensions \ - python3-unittest-automake-output \ - python3-unixadmin \ - python3-mypy \ -" - -do_install_ptest() { - install -d ${D}${PTEST_PATH}/tests - cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ -} - -DEPENDS += "\ - python3-distutils-extra-native \ - python3-setuptools-scm-native \ -" - -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-typeguard_4.3.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-typeguard_4.3.0.bb new file mode 100644 index 00000000..3f6acdd8 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-typeguard_4.3.0.bb @@ -0,0 +1,39 @@ +SUMMARY = "Run-time type checker for Python" +HOMEPAGE = "https://pypi.org/project/typeguard/" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=f0e423eea5c91e7aa21bdb70184b3e53" + +SRC_URI[sha256sum] = "92ee6a0aec9135181eae6067ebd617fd9de8d75d714fb548728a4933b1dea651" + +inherit pypi python_setuptools_build_meta ptest + +SRC_URI += " \ + file://run-ptest \ +" + +RDEPENDS:${PN} += " \ + python3-core \ + python3-compression \ + python3-unittest \ + python3-typing-extensions \ +" + +RDEPENDS:${PN}-ptest += " \ + python3-pytest \ + python3-typing-extensions \ + python3-unittest-automake-output \ + python3-unixadmin \ + python3-mypy \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ +} + +DEPENDS += "\ + python3-distutils-extra-native \ + python3-setuptools-scm-native \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-typer/run-ptest b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-typer/run-ptest new file mode 100644 index 00000000..94b6c0fc --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-typer/run-ptest @@ -0,0 +1,7 @@ +#!/bin/sh + +# Ignore the test_tutorial and test_completion. +# Because it needs the docs_src package what is not in Yocto. +# And the tests are not that useful for Yocto. +# for test_rich_markup_mode.py see https://github.com/fastapi/typer/pull/859/files/2cfd641d86a591a0d8582dec9292c03e6322a21a +pytest --automake --ignore tests/test_tutorial --ignore tests/test_completion --deselect tests/test_rich_markup_mode.py::test_rich_markup_mode_rich diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-typer_0.12.5.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-typer_0.12.5.bb new file mode 100644 index 00000000..e175b542 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-typer_0.12.5.bb @@ -0,0 +1,41 @@ +SUMMARY = "Typer, build great CLIs. Easy to code. Based on Python type hints." +DESCRIPTION = "\ + Typer is a library for building CLI applications that users will love using and developers will love creating. Based on Python type hints. \ + It's also a command line tool to run scripts, automatically converting them to CLI applications. \ +" +HOMEPAGE = "https://github.com/tiangolo/typer" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=173d405eb704b1499218013178722617" + +SRC_URI[sha256sum] = "f592f089bedcc8ec1b974125d64851029c3b1af145f04aca64d69410f0c9b722" + +inherit pypi python_setuptools_build_meta ptest + +DEPENDS += "\ + python3-pdm-backend-native \ + python3-pdm-native \ +" + +SRC_URI:append = " \ + file://run-ptest \ +" + +PYPI_PACKAGE = "typer" + +RDEPENDS:${PN} += "\ + python3-click \ + python3-shellingham \ +" + +RDEPENDS:${PN}-ptest += "\ + python3-coverage \ + python3-pytest \ + python3-typing-extensions \ + python3-unittest-automake-output \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ +} + diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-types-psutil_5.9.5.20240316.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-types-psutil_5.9.5.20240316.bb deleted file mode 100644 index c6f15696..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-types-psutil_5.9.5.20240316.bb +++ /dev/null @@ -1,10 +0,0 @@ -SUMMARY = "Typing stubs for psutil" -HOMEPAGE = "https://github.com/python/typeshed" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=6;endline=6;md5=ef4dc1e740f5c928f1608a4a9c7b578e" - -inherit pypi setuptools3 - -SRC_URI[sha256sum] = "5636f5714bb930c64bb34c4d47a59dc92f9d610b778b5364a31daa5584944848" - -BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-types-psutil_6.0.0.20240901.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-types-psutil_6.0.0.20240901.bb new file mode 100644 index 00000000..331756e4 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-types-psutil_6.0.0.20240901.bb @@ -0,0 +1,10 @@ +SUMMARY = "Typing stubs for psutil" +HOMEPAGE = "https://github.com/python/typeshed" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=6;endline=6;md5=c2d9643b4523fdf462545aeb1356ad23" + +inherit pypi setuptools3 + +SRC_URI[sha256sum] = "437affa76670363db9ffecfa4f153cc6900bf8a7072b3420f3bc07a593f92226" + +BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-types-python-dateutil_2.9.0.20240316.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-types-python-dateutil_2.9.0.20240316.bb deleted file mode 100644 index 4b786066..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-types-python-dateutil_2.9.0.20240316.bb +++ /dev/null @@ -1,8 +0,0 @@ -SUMMARY = "Typing stubs for python-dateutil" -HOMEPAGE = "https://github.com/python/typeshed" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=6;endline=6;md5=ef4dc1e740f5c928f1608a4a9c7b578e" - -SRC_URI[sha256sum] = "5d2f2e240b86905e40944dd787db6da9263f0deabef1076ddaed797351ec0202" - -inherit pypi setuptools3 diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-types-python-dateutil_2.9.0.20240906.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-types-python-dateutil_2.9.0.20240906.bb new file mode 100644 index 00000000..5c3a4774 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-types-python-dateutil_2.9.0.20240906.bb @@ -0,0 +1,8 @@ +SUMMARY = "Typing stubs for python-dateutil" +HOMEPAGE = "https://github.com/python/typeshed" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=6;endline=6;md5=c2d9643b4523fdf462545aeb1356ad23" + +SRC_URI[sha256sum] = "9706c3b68284c25adffc47319ecc7947e5bb86b3773f843c73906fd598bc176e" + +inherit pypi setuptools3 diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-types-setuptools_69.0.0.20240125.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-types-setuptools_69.0.0.20240125.bb deleted file mode 100644 index 7e15dcb1..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-types-setuptools_69.0.0.20240125.bb +++ /dev/null @@ -1,10 +0,0 @@ -SUMMARY = "Typing stubs for setuptools" -HOMEPAGE = "https://github.com/python/typeshed" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=6;endline=6;md5=ef4dc1e740f5c928f1608a4a9c7b578e" - -inherit pypi setuptools3 - -SRC_URI[sha256sum] = "22ad498cb585b22ce8c97ada1fccdf294a2e0dd7dc984a28535a84ea82f45b3f" - -BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-types-setuptools_73.0.0.20240822.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-types-setuptools_73.0.0.20240822.bb new file mode 100644 index 00000000..2eaa2d13 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-types-setuptools_73.0.0.20240822.bb @@ -0,0 +1,10 @@ +SUMMARY = "Typing stubs for setuptools" +HOMEPAGE = "https://github.com/python/typeshed" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=6;endline=6;md5=c2d9643b4523fdf462545aeb1356ad23" + +inherit pypi setuptools3 + +SRC_URI[sha256sum] = "3a060681098eb3fbc2fea0a86f7f6af6aa1ca71906039d88d891ea2cecdd4dbf" + +BBCLASSEXTEND = "native" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-tzdata/run-ptest b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-tzdata/run-ptest new file mode 100644 index 00000000..8d2017d3 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-tzdata/run-ptest @@ -0,0 +1,3 @@ +#!/bin/sh + +pytest --automake diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-tzdata_2024.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-tzdata_2024.1.bb new file mode 100644 index 00000000..d81ded43 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-tzdata_2024.1.bb @@ -0,0 +1,25 @@ +SUMMARY = "Provider of IANA time zone data" +HOMEPAGE = "https://github.com/python/tzdata" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=fca9fd5c15a28eb874ba38577a585d48 \ + file://licenses/LICENSE_APACHE;md5=86d3f3a95c324c9479bd8986968f4327" + +SRC_URI[sha256sum] = "2674120f8d891909751c38abcdfd386ac0a5a1127954fbc332af6b5ceae07efd" + +inherit pypi python_setuptools_build_meta + +inherit ptest + +SRC_URI += "file://run-ptest" + +RDEPENDS:${PN}-ptest += "\ + python3-attrs \ + python3-pytest \ + python3-pytest-subtests \ + python3-unittest-automake-output \ +" + +do_install_ptest() { + cp -rf ${S}/tests/ ${D}${PTEST_PATH}/ + install ${S}/VERSION ${D}${PTEST_PATH}/ +} diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-ujson/0001-setup.py-Do-not-strip-debugging-symbols.patch b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-ujson/0001-setup.py-Do-not-strip-debugging-symbols.patch deleted file mode 100644 index 8ba8ada5..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-ujson/0001-setup.py-Do-not-strip-debugging-symbols.patch +++ /dev/null @@ -1,37 +0,0 @@ -From aec3b64b0aaea0178b44ea65a204d76696e6a45e Mon Sep 17 00:00:00 2001 -From: Leon Anavi -Date: Mon, 10 Jan 2022 14:04:28 +0200 -Subject: [PATCH] setup.py: Do not strip debugging symbols - -Do not strip debugging symbols from Linux binaries to avoid -bitbake build errors related to already-stripped. - -Signed-off-by: Leon Anavi ---- -Upstream-Status: Pending - - setup.py | 8 +------- - 1 file changed, 1 insertion(+), 7 deletions(-) - -diff --git a/setup.py b/setup.py -index b98963b..d42f07a 100644 ---- a/setup.py -+++ b/setup.py -@@ -19,13 +19,7 @@ if not dconv_libs: - dconv_source_files.extend(glob("./deps/double-conversion/double-conversion/*.cc")) - dconv_source_files.append("./lib/dconv_wrapper.cc") - --if platform.system() == "Linux" and environ.get("UJSON_BUILD_NO_STRIP", "0") not in ( -- "1", -- "True", --): -- strip_flags = ["-Wl,--strip-all"] --else: -- strip_flags = [] -+strip_flags = [] - - module1 = Extension( - "ujson", --- -2.25.1 - diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-ujson/run-ptest b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-ujson/run-ptest index 8d2017d3..4863c5e5 100644 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-ujson/run-ptest +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-ujson/run-ptest @@ -1,3 +1,3 @@ #!/bin/sh -pytest --automake +FORCE_COLOR=1 pytest --automake --capture=no diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-ujson_5.10.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-ujson_5.10.0.bb new file mode 100644 index 00000000..5f4439c4 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-ujson_5.10.0.bb @@ -0,0 +1,38 @@ +SUMMARY = "Ultra fast JSON encoder and decoder for Python" +DESCRIPTION = "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with bindings for Python 2.5+ and 3." + +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=e0039a83d8a99726b5418f0b03302d0a" + +SRC_URI[sha256sum] = "b3cd8f3c5d8c7738257f1018880444f7b7d9b66232c64649f562d7ba86ad4bc1" + +inherit pypi ptest python_setuptools_build_meta + +# let OE do the strip operation +export UJSON_BUILD_NO_STRIP = "1" + +DEPENDS += "python3-setuptools-scm-native" + +SRC_URI += " \ + file://run-ptest \ +" + +RDEPENDS:${PN} += "\ + python3-datetime \ + python3-numbers \ +" + +RDEPENDS:${PN}-ptest += " \ + python3-json \ + python3-misc \ + python3-pytest \ + python3-pytz \ + python3-unittest-automake-output \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ +} + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-ujson_5.9.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-ujson_5.9.0.bb deleted file mode 100644 index b5f6be9f..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-ujson_5.9.0.bb +++ /dev/null @@ -1,35 +0,0 @@ -SUMMARY = "Ultra fast JSON encoder and decoder for Python" -DESCRIPTION = "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with bindings for Python 2.5+ and 3." - -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=e0039a83d8a99726b5418f0b03302d0a" - -SRC_URI[sha256sum] = "89cc92e73d5501b8a7f48575eeb14ad27156ad092c2e9fc7e3cf949f07e75532" - -inherit pypi ptest setuptools3 - -SRC_URI += " \ - file://run-ptest \ - file://0001-setup.py-Do-not-strip-debugging-symbols.patch \ -" - -DEPENDS += "python3-setuptools-scm-native" - -RDEPENDS:${PN} += "\ - python3-datetime \ - python3-numbers \ -" - -RDEPENDS:${PN}-ptest += " \ - python3-json \ - python3-pytest \ - python3-pytz \ - python3-unittest-automake-output \ -" - -do_install_ptest() { - install -d ${D}${PTEST_PATH}/tests - cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ -} - -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-uswid_0.4.7.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-uswid_0.4.7.bb deleted file mode 100644 index 4499edb2..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-uswid_0.4.7.bb +++ /dev/null @@ -1,19 +0,0 @@ -SUMMARY = "A pure-python library for embedding CoSWID data" -HOMEPAGE = "https://github.com/hughsie/python-uswid" -SECTION = "devel/python" -LICENSE = "LGPL-2.1-or-later" -LIC_FILES_CHKSUM = "file://LICENSE;md5=40d2542b8c43a3ec2b7f5da31a697b88" - -SRC_URI[sha256sum] = "de15c2421bedaa5f54606558700c1f628f07d73da49ec69d1888214ac52c49e6" - -inherit setuptools3 python3native pypi - -DEPENDS += " python3-cbor2 python3-lxml python3-pefile" -RDEPENDS:${PN} += " \ - python3-cbor2 \ - python3-json \ - python3-lxml \ - python3-netclient \ -" - -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-uswid_0.5.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-uswid_0.5.0.bb new file mode 100644 index 00000000..1381d7e8 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-uswid_0.5.0.bb @@ -0,0 +1,19 @@ +SUMMARY = "A pure-python library for embedding CoSWID data" +HOMEPAGE = "https://github.com/hughsie/python-uswid" +SECTION = "devel/python" +LICENSE = "BSD-2-Clause-Patent" +LIC_FILES_CHKSUM = "file://LICENSE;md5=f3636dfe71e94cc72918423cec0d1971" + +SRC_URI[sha256sum] = "bdcd7ee5afac1da60ee688c357aa12f5f8d74bc28012446b10e2b4a9cf52fc6d" + +inherit setuptools3 python3native pypi + +DEPENDS += " python3-cbor2 python3-lxml python3-pefile" +RDEPENDS:${PN} += " \ + python3-cbor2 \ + python3-json \ + python3-lxml \ + python3-netclient \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-validators_0.28.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-validators_0.28.0.bb deleted file mode 100644 index 36444c0b..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-validators_0.28.0.bb +++ /dev/null @@ -1,30 +0,0 @@ -SUMMARY = "Python Data Validation for Humans" -HOMEPAGE = "https://python-validators.github.io/validators" -LICENSE = "MIT" - -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=b3fb4b9e6db86c69a33d5e3ee013ab59" -SRC_URI[sha256sum] = "85bc82511f6ccd0800f4c15d8c0dc546c15e369640c5ea1f24349ba0b3b17815" - -inherit pypi python_setuptools_build_meta ptest - -SRC_URI += " \ - file://run-ptest \ -" - -RDEPENDS:${PN}-ptest += " \ - python3-pytest \ - python3-unittest-automake-output \ -" - -do_install_ptest() { - install -d ${D}${PTEST_PATH}/tests - cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ -} - -RDEPENDS:${PN} += " \ - python3-crypt \ - python3-datetime \ - python3-netclient \ -" - -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-validators_0.34.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-validators_0.34.0.bb new file mode 100644 index 00000000..41ead5c0 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-validators_0.34.0.bb @@ -0,0 +1,34 @@ +SUMMARY = "Python Data Validation for Humans" +HOMEPAGE = "https://python-validators.github.io/validators" +LICENSE = "MIT" + +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=b3fb4b9e6db86c69a33d5e3ee013ab59" +SRC_URI[sha256sum] = "647fe407b45af9a74d245b943b18e6a816acf4926974278f6dd617778e1e781f" + +inherit pypi python_setuptools_build_meta ptest + +SRC_URI += " \ + file://run-ptest \ +" + +RDEPENDS:${PN}-ptest += " \ + python3-decorator \ + python3-eth-hash \ + python3-isort \ + python3-pycryptodome \ + python3-pytest \ + python3-unittest-automake-output \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ +} + +RDEPENDS:${PN} += " \ + python3-crypt \ + python3-datetime \ + python3-netclient \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-virtualenv_20.25.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-virtualenv_20.25.0.bb deleted file mode 100644 index 1858fee2..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-virtualenv_20.25.0.bb +++ /dev/null @@ -1,22 +0,0 @@ -# SPDX-License-Identifier: MIT -# Copyright (C) 2023 iris-GmbH infrared & intelligent sensors - -SUMMARY = "A tool for creating isolated virtual python environments." -HOMEPAGE = "https://github.com/pypa/virtualenv" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=0ce089158cf60a8ab6abb452b6405538" - -SRC_URI[sha256sum] = "bf51c0d9c7dd63ea8e44086fa1e4fb1093a31e963b86959257378aef020e1f1b" - -BBCLASSEXTEND = "native nativesdk" -inherit pypi python_hatchling - -DEPENDS += "\ - python3-hatch-vcs-native \ -" - -RDEPENDS:${PN} += " \ - python3-distlib \ - python3-filelock \ - python3-platformdirs \ -" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-virtualenv_20.26.5.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-virtualenv_20.26.5.bb new file mode 100644 index 00000000..82d60aea --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-virtualenv_20.26.5.bb @@ -0,0 +1,26 @@ +# SPDX-License-Identifier: MIT +# Copyright (C) 2023 iris-GmbH infrared & intelligent sensors + +SUMMARY = "A tool for creating isolated virtual python environments." +HOMEPAGE = "https://github.com/pypa/virtualenv" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=0ce089158cf60a8ab6abb452b6405538" + +SRC_URI[sha256sum] = "ce489cac131aa58f4b25e321d6d186171f78e6cb13fafbf32a840cee67733ff4" + +BBCLASSEXTEND = "native nativesdk" +inherit pypi python_hatchling + +DEPENDS += "\ + python3-hatch-vcs-native \ +" + +RDEPENDS:${PN} += " \ + python3-compression \ + python3-distlib \ + python3-filelock \ + python3-json \ + python3-misc \ + python3-modules \ + python3-platformdirs \ +" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-watchdog_4.0.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-watchdog_4.0.0.bb deleted file mode 100644 index 9e36264d..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-watchdog_4.0.0.bb +++ /dev/null @@ -1,18 +0,0 @@ -SUMMARY = "Filesystem events monitoring" -DEPENDS = "python3-argh" - -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" - -SRC_URI[sha256sum] = "e3e7065cbdabe6183ab82199d7a4f6b3ba0a438c5a512a68559846ccb76a78ec" - -inherit pypi setuptools3 - -RDEPENDS:${PN} = " \ - python3-argh \ - python3-pathtools3 \ - python3-pyyaml \ - python3-requests \ -" - -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-watchdog_5.0.2.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-watchdog_5.0.2.bb new file mode 100644 index 00000000..ad66523d --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-watchdog_5.0.2.bb @@ -0,0 +1,18 @@ +SUMMARY = "Filesystem events monitoring" +DEPENDS = "python3-argh" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" + +SRC_URI[sha256sum] = "dcebf7e475001d2cdeb020be630dc5b687e9acdd60d16fea6bb4508e7b94cf76" + +inherit pypi setuptools3 + +RDEPENDS:${PN} = " \ + python3-argh \ + python3-pathtools3 \ + python3-pyyaml \ + python3-requests \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-web3_6.17.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-web3_6.17.0.bb deleted file mode 100644 index f1be4dcf..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-web3_6.17.0.bb +++ /dev/null @@ -1,26 +0,0 @@ -SUMMARY = "A Python library for interacting with Ethereum." -HOMEPAGE = "https://github.com/ethereum/web3.py" -SECTION = "devel/python" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=373fede350846fdffd23648fba504635" - -SRC_URI[sha256sum] = "1b535272a40da3d8d2b120856edb53b84b0c08bcc8fe1a5bbd5f816fd72f4ec6" - -inherit pypi setuptools3 - -RDEPENDS:${PN} += " \ - python3-aiohttp \ - python3-eth-abi \ - python3-eth-account \ - python3-eth-hash \ - python3-eth-typing \ - python3-eth-utils \ - python3-hexbytes \ - python3-jsonschema \ - python3-protobuf \ - python3-pydantic \ - python3-requests \ - python3-typing-extensions \ - python3-websockets \ - python3-pyunormalize \ -" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-web3_6.20.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-web3_6.20.1.bb new file mode 100644 index 00000000..b3487b6d --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-web3_6.20.1.bb @@ -0,0 +1,26 @@ +SUMMARY = "A Python library for interacting with Ethereum." +HOMEPAGE = "https://github.com/ethereum/web3.py" +SECTION = "devel/python" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=373fede350846fdffd23648fba504635" + +SRC_URI[sha256sum] = "a29bc1863734e1c05f128ddbc56878f299ea71776806e667b581a83b5d5be0ed" + +inherit pypi setuptools3 + +RDEPENDS:${PN} += " \ + python3-aiohttp \ + python3-eth-abi \ + python3-eth-account \ + python3-eth-hash \ + python3-eth-typing \ + python3-eth-utils \ + python3-hexbytes \ + python3-jsonschema \ + python3-protobuf \ + python3-pydantic \ + python3-requests \ + python3-typing-extensions \ + python3-websockets \ + python3-pyunormalize \ +" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-werkzeug_3.0.3.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-werkzeug_3.0.3.bb new file mode 100644 index 00000000..a5e343bf --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-werkzeug_3.0.3.bb @@ -0,0 +1,24 @@ +SUMMARY = "The comprehensive WSGI web application library" +DESCRIPTION = "\ +Werkzeug started as simple collection of various utilities for WSGI \ +applications and has become one of the most advanced WSGI utility modules. \ +It includes a powerful debugger, full featured request and response objects, \ +HTTP utilities to handle entity tags, cache control headers, HTTP dates, \ +cookie handling, file uploads, a powerful URL routing system and a bunch \ +of community contributed addon modules." +HOMEPAGE = "https://werkzeug.palletsprojects.com" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=5dc88300786f1c214c1e9827a5229462" + +SRC_URI[sha256sum] = "097e5bfda9f0aba8da6b8545146def481d06aa7d3266e7448e2cccf67dd8bd18" + +inherit pypi python_flit_core + +RDEPENDS:${PN} += " \ + python3-markupsafe \ + python3-logging \ + python3-profile \ + python3-compression \ + python3-json \ + python3-difflib \ +" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-werkzeug_3.0.6.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-werkzeug_3.0.6.bb deleted file mode 100644 index 7a56350e..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-werkzeug_3.0.6.bb +++ /dev/null @@ -1,23 +0,0 @@ -SUMMARY = "The comprehensive WSGI web application library" -DESCRIPTION = "\ -Werkzeug started as simple collection of various utilities for WSGI \ -applications and has become one of the most advanced WSGI utility modules. \ -It includes a powerful debugger, full featured request and response objects, \ -HTTP utilities to handle entity tags, cache control headers, HTTP dates, \ -cookie handling, file uploads, a powerful URL routing system and a bunch \ -of community contributed addon modules." -HOMEPAGE = "https://werkzeug.palletsprojects.com" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=5dc88300786f1c214c1e9827a5229462" - -SRC_URI[sha256sum] = "a8dd59d4de28ca70471a34cba79bed5f7ef2e036a76b3ab0835474246eb41f8d" - -inherit pypi python_flit_core - -RDEPENDS:${PN} += " \ - python3-markupsafe \ - python3-logging \ - python3-profile \ - python3-compression \ - python3-json \ -" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-whitenoise_6.6.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-whitenoise_6.6.0.bb deleted file mode 100644 index 352a5376..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-whitenoise_6.6.0.bb +++ /dev/null @@ -1,19 +0,0 @@ -SUMMARY = "Radically simplified static file serving for WSGI applications" -AUTHOR = "David Evans " -HOMEPAGE = "https://whitenoise.evans.io" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=aba4901cc64e401cea5a267eac2a2e1e" - -PYPI_PACKAGE = "whitenoise" - -SRC_URI[sha256sum] = "8998f7370973447fac1e8ef6e8ded2c5209a7b1f67c1012866dbcd09681c3251" - -inherit pypi python_setuptools_build_meta - -RDEPENDS:${PN}:append = " \ - python3-brotli \ - python3-coverage \ - python3-django \ - python3-pytest \ - python3-requests \ -" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-whitenoise_6.7.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-whitenoise_6.7.0.bb new file mode 100644 index 00000000..48d5a925 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-whitenoise_6.7.0.bb @@ -0,0 +1,18 @@ +SUMMARY = "Radically simplified static file serving for WSGI applications" +HOMEPAGE = "https://whitenoise.evans.io" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=aba4901cc64e401cea5a267eac2a2e1e" + +PYPI_PACKAGE = "whitenoise" + +SRC_URI[sha256sum] = "58c7a6cd811e275a6c91af22e96e87da0b1109e9a53bb7464116ef4c963bf636" + +inherit pypi python_setuptools_build_meta + +RDEPENDS:${PN}:append = " \ + python3-brotli \ + python3-coverage \ + python3-django \ + python3-pytest \ + python3-requests \ +" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-wrapt_1.16.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-wrapt_1.16.0.bb index 056323cd..398d2fa6 100644 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-wrapt_1.16.0.bb +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-wrapt_1.16.0.bb @@ -12,7 +12,9 @@ SRC_URI += " \ file://run-ptest \ " +# python3-misc for 'this' module RDEPENDS:${PN}-ptest += " \ + python3-misc \ python3-pytest \ python3-unittest-automake-output \ " diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-xlsxwriter_3.1.9.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-xlsxwriter_3.1.9.bb deleted file mode 100644 index 4e23feeb..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-xlsxwriter_3.1.9.bb +++ /dev/null @@ -1,21 +0,0 @@ -SUMMARY = "Python 2 and 3 compatibility library" -HOMEPAGE = "https://xlsxwriter.readthedocs.io" -SECTION = "devel/python" -LICENSE = "BSD-2-Clause" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=12d9fac1f0049be71ab5aa4a78da02b0" - -inherit pypi setuptools3 - -PYPI_PACKAGE = "XlsxWriter" - -RDEPENDS:${PN} += " \ - python3-crypt \ - python3-datetime \ - python3-compression \ - python3-numbers \ - python3-io \ -" - -SRC_URI[sha256sum] = "de810bf328c6a4550f4ffd6b0b34972aeb7ffcf40f3d285a0413734f9b63a929" - -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-xlsxwriter_3.2.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-xlsxwriter_3.2.0.bb new file mode 100644 index 00000000..6e8f1b24 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-xlsxwriter_3.2.0.bb @@ -0,0 +1,21 @@ +SUMMARY = "Python 2 and 3 compatibility library" +HOMEPAGE = "https://xlsxwriter.readthedocs.io" +SECTION = "devel/python" +LICENSE = "BSD-2-Clause" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=a4bab8df34a9a138b4e0ca56b8559a05" + +inherit pypi setuptools3 + +PYPI_PACKAGE = "XlsxWriter" + +RDEPENDS:${PN} += " \ + python3-crypt \ + python3-datetime \ + python3-compression \ + python3-numbers \ + python3-io \ +" + +SRC_URI[sha256sum] = "9977d0c661a72866a61f9f7a809e25ebbb0fb7036baa3b9fe74afcfca6b3cb8c" + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-xmlschema_3.0.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-xmlschema_3.0.1.bb deleted file mode 100644 index 97dc6837..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-xmlschema_3.0.1.bb +++ /dev/null @@ -1,20 +0,0 @@ -SUMMARY = "The xmlschema library is an implementation of XML Schema for Python (supports Python 3.6+)." -HOMEPAGE = "https://github.com/sissaschool/xmlschema" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=26aa26eda991a3a2b61c11b62d3fda65" - -SRC_URI[sha256sum] = "bb24a5f4738e49d85d9eb03a2b5af26bbbbfdb055517ad953d98925094b8c026" - -PYPI_PACKAGE = "xmlschema" -inherit pypi setuptools3 - -DEPENDS += "\ - python3-elementpath-native \ -" - -RDEPENDS:${PN} += "\ - python3-elementpath \ - python3-modules \ -" - -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-xmlschema_3.4.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-xmlschema_3.4.1.bb new file mode 100644 index 00000000..845735c9 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-xmlschema_3.4.1.bb @@ -0,0 +1,15 @@ +SUMMARY = "The xmlschema library is an implementation of XML Schema for Python (supports Python 3.6+)." +HOMEPAGE = "https://github.com/sissaschool/xmlschema" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=26aa26eda991a3a2b61c11b62d3fda65" + +SRC_URI[sha256sum] = "4f69eca6f2c446b06c74acd958e7d6613487c253d959a3b75078dfcc880b80ff" + +inherit pypi python_setuptools_build_meta + +RDEPENDS:${PN} += "\ + python3-elementpath \ + python3-modules \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-xmodem_0.4.7.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-xmodem_0.4.7.bb index a5942e3d..e41afb56 100644 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-xmodem_0.4.7.bb +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-xmodem_0.4.7.bb @@ -1,7 +1,7 @@ DESCRIPTION = "XMODEM protocol implementation" LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" +LIC_FILES_CHKSUM = "file://LICENSE;md5=90bc9522130d68de0dcbf33707bbf124" SRC_URI[sha256sum] = "2f1068aa8676f0d1d112498b5786c4f8ea4f89d8f25d07d3a0f293cd21db1c35" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-xxhash_3.4.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-xxhash_3.4.1.bb deleted file mode 100644 index be9ce005..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-xxhash_3.4.1.bb +++ /dev/null @@ -1,24 +0,0 @@ -SUMMARY = "xxhash is a Python binding for the xxHash library by Yann Collet." -SECTION = "devel/python" -LICENSE = "BSD-2-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=3a9dab7f159514231249aa3e108ab26b" - -DEPENDS += "python3-setuptools-scm-native" - -SRC_URI[sha256sum] = "0379d6cf1ff987cd421609a264ce025e74f346e3e145dd106c0cc2e3ec3f99a9" - -SRC_URI += " \ - file://run-ptest \ -" - -inherit pypi python_setuptools_build_meta ptest - -RDEPENDS:${PN}-ptest += " \ - python3-pytest \ - python3-unittest-automake-output \ -" - -do_install_ptest() { - install -d ${D}${PTEST_PATH}/tests - cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ -} diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-xxhash_3.5.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-xxhash_3.5.0.bb new file mode 100644 index 00000000..bfa14012 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-xxhash_3.5.0.bb @@ -0,0 +1,24 @@ +SUMMARY = "xxhash is a Python binding for the xxHash library by Yann Collet." +SECTION = "devel/python" +LICENSE = "BSD-2-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=3a9dab7f159514231249aa3e108ab26b" + +DEPENDS += "python3-setuptools-scm-native" + +SRC_URI[sha256sum] = "84f2caddf951c9cbf8dc2e22a89d4ccf5d86391ac6418fe81e3c67d0cf60b45f" + +SRC_URI += " \ + file://run-ptest \ +" + +inherit pypi python_setuptools_build_meta ptest + +RDEPENDS:${PN}-ptest += " \ + python3-pytest \ + python3-unittest-automake-output \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ +} diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-yarl_1.11.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-yarl_1.11.1.bb new file mode 100644 index 00000000..37d77b71 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-yarl_1.11.1.bb @@ -0,0 +1,33 @@ +SUMMARY = "The module provides handy URL class for url parsing and changing" +HOMEPAGE = "https://github.com/aio-libs/yarl/" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" + +SRC_URI[sha256sum] = "1bb2d9e212fb7449b8fb73bc461b51eaa17cc8430b4a87d87be7b25052d92f53" + +SRC_URI += "file://run-ptest" + +PYPI_PACKAGE = "yarl" + +inherit pypi ptest python_setuptools_build_meta + +DEPENDS += " \ + python3-expandvars-native \ + python3-cython-native \ +" + +RDEPENDS:${PN} = "\ + python3-multidict \ + python3-idna \ + python3-io \ +" + +RDEPENDS:${PN}-ptest += " \ + python3-pytest \ + python3-unittest-automake-output \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ +} diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-yarl_1.9.4.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-yarl_1.9.4.bb deleted file mode 100644 index 29897b7f..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-yarl_1.9.4.bb +++ /dev/null @@ -1,33 +0,0 @@ -SUMMARY = "The module provides handy URL class for url parsing and changing" -HOMEPAGE = "https://github.com/aio-libs/yarl/" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" - -SRC_URI[sha256sum] = "566db86717cf8080b99b58b083b773a908ae40f06681e87e589a976faf8246bf" - -SRC_URI += "file://run-ptest" - -PYPI_PACKAGE = "yarl" - -inherit pypi ptest python_setuptools_build_meta - -DEPENDS += " \ - python3-expandvars-native \ - python3-cython-native \ -" - -RDEPENDS:${PN} = "\ - python3-multidict \ - python3-idna \ - python3-io \ -" - -RDEPENDS:${PN}-ptest += " \ - python3-pytest \ - python3-unittest-automake-output \ -" - -do_install_ptest() { - install -d ${D}${PTEST_PATH}/tests - cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ -} diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-zeroconf_0.132.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-zeroconf_0.132.0.bb deleted file mode 100644 index ea8ef1cb..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-zeroconf_0.132.0.bb +++ /dev/null @@ -1,15 +0,0 @@ -SUMMARY = "Pure Python Multicast DNS Service Discovery Library (Bonjour/Avahi compatible)" -HOMEPAGE = "https://github.com/jstasiak/python-zeroconf" -LICENSE = "LGPL-2.1-only" -LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=6;endline=6;md5=6517bdc8f2416f27ab725d4702f7aac3" - -SRC_URI[sha256sum] = "e2dddb9b8e6a9de3c43f943d8547300e6bd49b2043fd719ae830cfe0f2908a5c" - -DEPENDS += "python3-cython-native" - -inherit pypi python_poetry_core - -RDEPENDS:${PN} += " \ - python3-ifaddr (>=0.1.7) \ - python3-async-timeout \ -" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-zeroconf_0.134.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-zeroconf_0.134.0.bb new file mode 100644 index 00000000..b1b1a2e4 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-zeroconf_0.134.0.bb @@ -0,0 +1,15 @@ +SUMMARY = "Pure Python Multicast DNS Service Discovery Library (Bonjour/Avahi compatible)" +HOMEPAGE = "https://github.com/jstasiak/python-zeroconf" +LICENSE = "LGPL-2.1-only" +LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=6;endline=6;md5=6517bdc8f2416f27ab725d4702f7aac3" + +SRC_URI[sha256sum] = "5be2c3a61cc81eb1bd4684bbdee19d708522d94bc8ac60dfe001a0fde4421092" + +DEPENDS += "python3-cython-native" + +inherit pypi python_poetry_core + +RDEPENDS:${PN} += " \ + python3-ifaddr (>=0.1.7) \ + python3-async-timeout \ +" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/tftpy/CVE-2023-46566.patch b/sources/meta-openembedded/meta-python/recipes-devtools/python/tftpy/CVE-2023-46566.patch deleted file mode 100644 index 0131dedb..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/tftpy/CVE-2023-46566.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 5b4dcbe1c8fb178e4d31b9a9e63e603b73e8fb2f Mon Sep 17 00:00:00 2001 -From: Dave Wapstra -Date: Wed, 3 Jul 2024 14:32:58 +1200 -Subject: [PATCH] Add packet size check - -CVE: CVE-2023-46566 - -Upstream-Status: Backport [https://github.com/msoulier/tftpy/commit/5b4dcbe1c8fb178e4d31b9a9e63e603b73e8fb2f] ---- - tftpy/TftpPacketFactory.py | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/tftpy/TftpPacketFactory.py b/tftpy/TftpPacketFactory.py -index 41f39a9..a8c9cd0 100644 ---- a/tftpy/TftpPacketFactory.py -+++ b/tftpy/TftpPacketFactory.py -@@ -29,6 +29,7 @@ class TftpPacketFactory(object): - """This method is used to parse an existing datagram into its - corresponding TftpPacket object. The buffer is the raw bytes off of - the network.""" -+ tftpassert(len(buffer) > 2, 'Invalid packet size') - log.debug("parsing a %d byte packet" % len(buffer)) - (opcode,) = struct.unpack(str("!H"), buffer[:2]) - log.debug("opcode is %d" % opcode) --- -2.40.0 diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python/tftpy_0.8.2.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python/tftpy_0.8.2.bb index c1699168..c1b3234f 100644 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python/tftpy_0.8.2.bb +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python/tftpy_0.8.2.bb @@ -11,5 +11,3 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=22770e72ae03c61f5bcc4e333b61368d" SRC_URI[sha256sum] = "e1d1a680efd88eba176b351175844253067392a9b0f8b81588e3ff2b9e7bbb5b" inherit pypi setuptools3 - -SRC_URI += "file://CVE-2023-46566.patch" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python3-gspread/python3-gspread_6.1.0.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python3-gspread/python3-gspread_6.1.0.bb deleted file mode 100644 index 48215585..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python3-gspread/python3-gspread_6.1.0.bb +++ /dev/null @@ -1,14 +0,0 @@ -SUMMARY = "Google Spreadsheets Python API" -HOMEPAGE = "https://github.com/burnash/gspread" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=9488e21983675fa56dc05af558b83e2f" - -SRC_URI[sha256sum] = "576b72b628b251d2ee41e02b982d3c714d511d2a5aa3a88e587ed9efc4d6e752" - -RDEPENDS:${PN} = " \ - python3-google-auth \ - python3-google-auth-oauthlib \ - python3-strenum \ - " - -inherit pypi python_flit_core diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python3-gspread/python3-gspread_6.1.2.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python3-gspread/python3-gspread_6.1.2.bb new file mode 100644 index 00000000..0aae1d0c --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python3-gspread/python3-gspread_6.1.2.bb @@ -0,0 +1,14 @@ +SUMMARY = "Google Spreadsheets Python API" +HOMEPAGE = "https://github.com/burnash/gspread" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=9488e21983675fa56dc05af558b83e2f" + +SRC_URI[sha256sum] = "b147688b8c7a18c9835d5f998997ec17c97c0470babcab17f65ac2b3a32402b7" + +RDEPENDS:${PN} = " \ + python3-google-auth \ + python3-google-auth-oauthlib \ + python3-strenum \ + " + +inherit pypi python_flit_core diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python3-reedsolo/python3-reedsolo_2.0.13.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python3-reedsolo/python3-reedsolo_2.0.13.bb deleted file mode 100644 index bb5b973d..00000000 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python3-reedsolo/python3-reedsolo_2.0.13.bb +++ /dev/null @@ -1,10 +0,0 @@ -SUMMARY = "Pure-Python Reed Solomon encoder/decoder" -HOMEPAGE = "https://github.com/tomerfiliba/reedsolomon" -LICENSE = "MIT-0 | Unlicense" -LIC_FILES_CHKSUM = "file://LICENSE;md5=ffde61aeb8917e70e0257e0a4b6d103c" - -SRC_URI[sha256sum] = "71b4121c6860a55899435c552051a19d5f023c50358be4b1c0fa0c6e2f4ac717" - -inherit pypi setuptools3 - -RDEPENDS:${PN} += "python3-core" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python3-reedsolo/python3-reedsolo_2.1.0b1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python3-reedsolo/python3-reedsolo_2.1.0b1.bb new file mode 100644 index 00000000..6884e908 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python3-reedsolo/python3-reedsolo_2.1.0b1.bb @@ -0,0 +1,11 @@ +SUMMARY = "Pure-Python Reed Solomon encoder/decoder" +HOMEPAGE = "https://github.com/tomerfiliba/reedsolomon" +LICENSE = "MIT-0 | Unlicense" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ffde61aeb8917e70e0257e0a4b6d103c" + +SRC_URI[sha256sum] = "e11528d63e75461d45b86c23f9db8260303d6ab6cae075fa9eddb44527ad8ece" + +inherit pypi python_setuptools_build_meta + +DEPENDS += "python3-cython-native" +RDEPENDS:${PN} += "python3-core" diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python3-wxgtk4/python3-wxgtk4/0001-sip-Fix-build-with-gcc-14.patch b/sources/meta-openembedded/meta-python/recipes-devtools/python3-wxgtk4/python3-wxgtk4/0001-sip-Fix-build-with-gcc-14.patch new file mode 100644 index 00000000..4782e74e --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python3-wxgtk4/python3-wxgtk4/0001-sip-Fix-build-with-gcc-14.patch @@ -0,0 +1,31 @@ +From 5234a454a1b9f11f83e59909fb2972176497e02c Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 9 May 2024 17:35:11 -0700 +Subject: [PATCH] sip: Fix build with gcc-14 + +Fixes -Wincompatible-pointer-types +sip/siplib/siplib.c:3900:20: error: assignment to 'sipSimpleWrapper *' {aka 'struct _sipSimpleWrapper *'} from incompatible pointer type 'PyObject *' {aka 'struct _object *'} [-Wincompatible-pointer-types] +| 3900 | *selfp = va_arg(va, PyObject *); + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- + sip/siplib/siplib.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sip/siplib/siplib.c b/sip/siplib/siplib.c +index 95563e5c..ae3fac60 100644 +--- a/sip/siplib/siplib.c ++++ b/sip/siplib/siplib.c +@@ -3897,7 +3897,7 @@ static int parsePass1(PyObject **parseErrp, sipSimpleWrapper **selfp, + { + case '#': + /* A ctor has an argument with the /Transfer/ annotation. */ +- *selfp = va_arg(va, PyObject *); ++ *selfp = (sipSimpleWrapper *)va_arg(va, PyObject *); + break; + + case 'B': +-- +2.45.0 + diff --git a/sources/meta-openembedded/meta-python/recipes-devtools/python3-wxgtk4/python3-wxgtk4_4.2.1.bb b/sources/meta-openembedded/meta-python/recipes-devtools/python3-wxgtk4/python3-wxgtk4_4.2.1.bb index fb011cb7..cc6b6cef 100644 --- a/sources/meta-openembedded/meta-python/recipes-devtools/python3-wxgtk4/python3-wxgtk4_4.2.1.bb +++ b/sources/meta-openembedded/meta-python/recipes-devtools/python3-wxgtk4/python3-wxgtk4_4.2.1.bb @@ -14,6 +14,7 @@ SRC_URI += "file://add-back-option-build-base.patch \ file://wxgtk-fixup-build-scripts.patch \ file://not-overwrite-cflags-cxxflags.patch \ file://0001-sip-Conditionally-use-GetAssertStackTrace-under-USE_.patch \ + file://0001-sip-Fix-build-with-gcc-14.patch \ " SRC_URI[sha256sum] = "e48de211a6606bf072ec3fa778771d6b746c00b7f4b970eb58728ddf56d13d5c" diff --git a/sources/meta-openembedded/meta-python/recipes-extended/python-meh/python3-meh_0.51.bb b/sources/meta-openembedded/meta-python/recipes-extended/python-meh/python3-meh_0.51.bb deleted file mode 100644 index e83514af..00000000 --- a/sources/meta-openembedded/meta-python/recipes-extended/python-meh/python3-meh_0.51.bb +++ /dev/null @@ -1,16 +0,0 @@ -SUMMARY = "A python library for handling exceptions" -DESCRIPTION = "The python-meh package is a python library for handling, saving, and reporting \ -exceptions." -HOMEPAGE = "https://github.com/rhinstaller/python-meh" -LICENSE = "GPL-2.0-or-later" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" - -inherit setuptools3_legacy - -S = "${WORKDIR}/git" - -SRC_URI = "git://github.com/rhinstaller/python-meh.git;protocol=https;branch=master" - -SRCREV = "eb5d4adc3b838704b6a68f0f77ada2063a11ab1b" - -FILES:${PN} += "${datadir}/python-meh" diff --git a/sources/meta-openembedded/meta-python/recipes-extended/python-meh/python3-meh_0.52.bb b/sources/meta-openembedded/meta-python/recipes-extended/python-meh/python3-meh_0.52.bb new file mode 100644 index 00000000..266b94c9 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-extended/python-meh/python3-meh_0.52.bb @@ -0,0 +1,16 @@ +SUMMARY = "A python library for handling exceptions" +DESCRIPTION = "The python-meh package is a python library for handling, saving, and reporting \ +exceptions." +HOMEPAGE = "https://github.com/rhinstaller/python-meh" +LICENSE = "GPL-2.0-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +inherit setuptools3_legacy + +S = "${WORKDIR}/git" + +SRC_URI = "git://github.com/rhinstaller/python-meh.git;protocol=https;branch=master" + +SRCREV = "f0fcc3ce1943dce9cf958f4a2f7398daff619c9f" + +FILES:${PN} += "${datadir}/python-meh" diff --git a/sources/meta-openembedded/meta-python/recipes-extended/python-pykickstart/python3-pykickstart_3.48.bb b/sources/meta-openembedded/meta-python/recipes-extended/python-pykickstart/python3-pykickstart_3.48.bb index 953068f7..a7bd8ae4 100644 --- a/sources/meta-openembedded/meta-python/recipes-extended/python-pykickstart/python3-pykickstart_3.48.bb +++ b/sources/meta-openembedded/meta-python/recipes-extended/python-pykickstart/python3-pykickstart_3.48.bb @@ -5,13 +5,13 @@ LICENSE = "GPL-2.0-or-later" LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b" FILESEXTRAPATHS:prepend := "${THISDIR}/files:" -DEPENDS = "python3" +inherit python_setuptools_build_meta + RDEPENDS:${PN} = "python3 \ python3-requests \ python3-six \ " -S = "${WORKDIR}/git" SRC_URI = "git://github.com/rhinstaller/pykickstart.git;protocol=https;branch=master \ file://0001-support-authentication-for-kickstart.patch \ file://0002-pykickstart-parser.py-add-lock-for-readKickstart-and.patch \ @@ -22,4 +22,4 @@ SRCREV = "fa6c80c0e5c6bee29d089899a10d26e6f7f8afd8" UPSTREAM_CHECK_GITTAGREGEX = "r(?P\d+(\.\d+)+(-\d+)*)" -inherit setuptools3 +S = "${WORKDIR}/git" diff --git a/sources/meta-openembedded/meta-python/recipes-extended/python-rich/python3-rich_13.7.0.bb b/sources/meta-openembedded/meta-python/recipes-extended/python-rich/python3-rich_13.7.0.bb deleted file mode 100644 index 959f0d51..00000000 --- a/sources/meta-openembedded/meta-python/recipes-extended/python-rich/python3-rich_13.7.0.bb +++ /dev/null @@ -1,15 +0,0 @@ -SUMMARY = "Rich is a Python library for rich text and beautiful formatting in the terminal" -DESCRIPTION = "The Rich API makes it easy to add color and style to terminal output. \ -Rich can also render pretty tables, progress bars, markdown, syntax highlighted source code, \ -tracebacks, and more." -HOMEPAGE="https://github.com/Textualize/rich" -SECTION = "devel/python" -LICENSE = "MIT" - -LIC_FILES_CHKSUM = "file://LICENSE;md5=b5f0b94fbc94f5ad9ae4efcf8a778303" - -SRC_URI[sha256sum] = "5cb5123b5cf9ee70584244246816e9114227e0b98ad9176eede6ad54bf5403fa" - -inherit pypi python_poetry_core - -RDEPENDS:${PN} = "python3-pygments" diff --git a/sources/meta-openembedded/meta-python/recipes-extended/python-rich/python3-rich_13.8.1.bb b/sources/meta-openembedded/meta-python/recipes-extended/python-rich/python3-rich_13.8.1.bb new file mode 100644 index 00000000..10ce1987 --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-extended/python-rich/python3-rich_13.8.1.bb @@ -0,0 +1,15 @@ +SUMMARY = "Rich is a Python library for rich text and beautiful formatting in the terminal" +DESCRIPTION = "The Rich API makes it easy to add color and style to terminal output. \ +Rich can also render pretty tables, progress bars, markdown, syntax highlighted source code, \ +tracebacks, and more." +HOMEPAGE="https://github.com/Textualize/rich" +SECTION = "devel/python" +LICENSE = "MIT" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=b5f0b94fbc94f5ad9ae4efcf8a778303" + +SRC_URI[sha256sum] = "8260cda28e3db6bf04d2d1ef4dbc03ba80a824c88b0e7668a0f23126a424844a" + +inherit pypi python_poetry_core + +RDEPENDS:${PN} = "python3-pygments" diff --git a/sources/meta-openembedded/meta-python/recipes-extended/python3-portalocker/python3-portalocker_2.10.1.bb b/sources/meta-openembedded/meta-python/recipes-extended/python3-portalocker/python3-portalocker_2.10.1.bb new file mode 100644 index 00000000..8c03398e --- /dev/null +++ b/sources/meta-openembedded/meta-python/recipes-extended/python3-portalocker/python3-portalocker_2.10.1.bb @@ -0,0 +1,36 @@ +SUMMARY = "Cross-platform locking library" +DESCRIPTION = "Portalocker is a library to provide an easy API to file locking" +LICENSE = "BSD-3-Clause" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=152634da660a374ca18c0734ed07c63c" + +SRC_URI[sha256sum] = "ef1bf844e878ab08aee7e40184156e1151f228f103aa5c6bd0724cc330960f8f" + +DEPENDS += "python3-setuptools-scm-native" + +inherit pypi python_setuptools_build_meta ptest + +SRC_URI += " \ + file://run-ptest \ +" + +RDEPENDS:${PN}-ptest += " \ + python3-multiprocessing \ + python3-pytest \ + python3-redis \ + python3-unittest-automake-output \ + redis \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/portalocker_tests/* ${D}${PTEST_PATH}/tests/ + rm -rf ${D}${PTEST_PATH}/tests/test_combined.py +} + +RDEPENDS:${PN} += " \ + python3-fcntl \ + python3-logging \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-python/recipes-extended/python3-portalocker/python3-portalocker_2.8.2.bb b/sources/meta-openembedded/meta-python/recipes-extended/python3-portalocker/python3-portalocker_2.8.2.bb deleted file mode 100644 index c45a3fcd..00000000 --- a/sources/meta-openembedded/meta-python/recipes-extended/python3-portalocker/python3-portalocker_2.8.2.bb +++ /dev/null @@ -1,36 +0,0 @@ -SUMMARY = "Cross-platform locking library" -DESCRIPTION = "Portalocker is a library to provide an easy API to file locking" -LICENSE = "BSD-3-Clause" - -LIC_FILES_CHKSUM = "file://LICENSE;md5=152634da660a374ca18c0734ed07c63c" - -SRC_URI[sha256sum] = "2b035aa7828e46c58e9b31390ee1f169b98e1066ab10b9a6a861fe7e25ee4f33" - -DEPENDS += "python3-setuptools-scm-native" - -inherit pypi python_setuptools_build_meta ptest - -SRC_URI += " \ - file://run-ptest \ -" - -RDEPENDS:${PN}-ptest += " \ - python3-multiprocessing \ - python3-pytest \ - python3-redis \ - python3-unittest-automake-output \ - redis \ -" - -do_install_ptest() { - install -d ${D}${PTEST_PATH}/tests - cp -rf ${S}/portalocker_tests/* ${D}${PTEST_PATH}/tests/ - rm -rf ${D}${PTEST_PATH}/tests/test_combined.py -} - -RDEPENDS:${PN} += " \ - python3-fcntl \ - python3-logging \ -" - -BBCLASSEXTEND = "native nativesdk" diff --git a/sources/meta-openembedded/meta-webserver/README.md b/sources/meta-openembedded/meta-webserver/README.md index caa70acd..8b45a73b 100644 --- a/sources/meta-openembedded/meta-webserver/README.md +++ b/sources/meta-openembedded/meta-webserver/README.md @@ -13,13 +13,13 @@ This layer depends on: URI: git://git.openembedded.org/openembedded-core subdirectory: meta -branch: scarthgap +branch: styhead For some recipes, the meta-oe layer is required: URI: git://git.openembedded.org/meta-openembedded subdirectory: meta-oe -branch: scarthgap +branch: styhead @@ -50,10 +50,10 @@ Maintenance ----------- Send patches / pull requests to openembedded-devel@lists.openembedded.org -with '[meta-webserver][scarthgap]' in the subject. +with '[meta-webserver][styhead]' in the subject. When sending single patches, please using something like: -git send-email -M -1 --to openembedded-devel@lists.openembedded.org --subject-prefix='meta-webserver][scarthgap][PATCH' +git send-email -M -1 --to openembedded-devel@lists.openembedded.org --subject-prefix='meta-webserver][styhead][PATCH' Layer maintainer: Armin Kuster diff --git a/sources/meta-openembedded/meta-webserver/conf/layer.conf b/sources/meta-openembedded/meta-webserver/conf/layer.conf index c0896f1a..08e9df50 100644 --- a/sources/meta-openembedded/meta-webserver/conf/layer.conf +++ b/sources/meta-openembedded/meta-webserver/conf/layer.conf @@ -17,7 +17,7 @@ LAYERVERSION_webserver = "1" LAYERDEPENDS_webserver = "core openembedded-layer" -LAYERSERIES_COMPAT_webserver = "scarthgap" +LAYERSERIES_COMPAT_webserver = "styhead" LICENSE_PATH += "${LAYERDIR}/licenses" diff --git a/sources/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2/0002-apache2-bump-up-the-core-size-limit-if-CoreDumpDirec.patch b/sources/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2/0002-apache2-bump-up-the-core-size-limit-if-CoreDumpDirec.patch index bbe8b325..64edeb59 100644 --- a/sources/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2/0002-apache2-bump-up-the-core-size-limit-if-CoreDumpDirec.patch +++ b/sources/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2/0002-apache2-bump-up-the-core-size-limit-if-CoreDumpDirec.patch @@ -1,4 +1,4 @@ -From 5074ab3425e5f1e01fd9cfa2d9b7300ea1b3f38f Mon Sep 17 00:00:00 2001 +From d1f0389e699e64f3e329c0ce509f79d969a76114 Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Tue, 17 Jul 2012 11:27:39 +0100 Subject: [PATCH] apache2: bump up the core size limit if CoreDumpDirectory is @@ -16,10 +16,10 @@ Note: upstreaming was discussed but there are competing desires; 1 file changed, 19 insertions(+) diff --git a/server/core.c b/server/core.c -index 090e397..3020090 100644 +index 843b973..3b50100 100644 --- a/server/core.c +++ b/server/core.c -@@ -5107,6 +5107,25 @@ static int core_post_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *pte +@@ -5143,6 +5143,25 @@ static int core_post_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *pte } apr_pool_cleanup_register(pconf, NULL, ap_mpm_end_gen_helper, apr_pool_cleanup_null); @@ -45,6 +45,3 @@ index 090e397..3020090 100644 return OK; } --- -2.25.1 - diff --git a/sources/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2/0004-apache2-log-the-SELinux-context-at-startup.patch b/sources/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2/0004-apache2-log-the-SELinux-context-at-startup.patch index 1abbe0c4..f8fbc4f3 100644 --- a/sources/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2/0004-apache2-log-the-SELinux-context-at-startup.patch +++ b/sources/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2/0004-apache2-log-the-SELinux-context-at-startup.patch @@ -1,4 +1,4 @@ -From e47cc405eadcbe37a579c375e824e20a5c53bfad Mon Sep 17 00:00:00 2001 +From b31cf12566e806e9e9c3aa01029f6bae3ada0729 Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Tue, 17 Jul 2012 11:27:39 +0100 Subject: [PATCH] Log the SELinux context at startup. @@ -14,7 +14,7 @@ Note: unlikely to be any interest in this upstream 2 files changed, 31 insertions(+) diff --git a/configure.in b/configure.in -index 352711a..f58620f 100644 +index 6319903..bffd8a1 100644 --- a/configure.in +++ b/configure.in @@ -514,6 +514,11 @@ gettid @@ -30,7 +30,7 @@ index 352711a..f58620f 100644 # On Linux before glibc 2.30, gettid() is only usable via syscall() AC_CACHE_CHECK([for gettid() via syscall], ap_cv_gettid, diff --git a/server/core.c b/server/core.c -index 30b317e..81f145f 100644 +index 3b50100..e0c7c7f 100644 --- a/server/core.c +++ b/server/core.c @@ -65,6 +65,10 @@ @@ -44,7 +44,7 @@ index 30b317e..81f145f 100644 /* LimitRequestBody handling */ #define AP_LIMIT_REQ_BODY_UNSET ((apr_off_t) -1) #define AP_DEFAULT_LIMIT_REQ_BODY ((apr_off_t) 1<<30) /* 1GB */ -@@ -5139,6 +5143,28 @@ static int core_post_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *pte +@@ -5162,6 +5166,28 @@ static int core_post_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *pte } #endif @@ -73,5 +73,3 @@ index 30b317e..81f145f 100644 return OK; } --- -2.40.0 diff --git a/sources/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2/0008-Fix-perl-install-directory-to-usr-bin.patch b/sources/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2/0008-Fix-perl-install-directory-to-usr-bin.patch index dc5b5c88..4bc2ad6d 100644 --- a/sources/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2/0008-Fix-perl-install-directory-to-usr-bin.patch +++ b/sources/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2/0008-Fix-perl-install-directory-to-usr-bin.patch @@ -1,4 +1,4 @@ -From 443d15b91d4e4979d92405610303797663f31102 Mon Sep 17 00:00:00 2001 +From 980eadecc128bbbe1233e5d89268be24d14e1873 Mon Sep 17 00:00:00 2001 From: echo Date: Tue, 28 Apr 2009 03:11:06 +0000 Subject: [PATCH] Fix perl install directory to /usr/bin @@ -16,10 +16,10 @@ Signed-off-by: Changqing Li 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/configure.in b/configure.in -index 4df3ff3..4eeb609 100644 +index 4ce0fee..0362f52 100644 --- a/configure.in +++ b/configure.in -@@ -903,10 +903,7 @@ AC_DEFINE_UNQUOTED(SERVER_CONFIG_FILE, "${rel_sysconfdir}/${progname}.conf", +@@ -936,10 +936,7 @@ AC_DEFINE_UNQUOTED(SERVER_CONFIG_FILE, "${rel_sysconfdir}/${progname}.conf", AC_DEFINE_UNQUOTED(AP_TYPES_CONFIG_FILE, "${rel_sysconfdir}/mime.types", [Location of the MIME types config file, relative to the Apache root directory]) @@ -31,6 +31,3 @@ index 4df3ff3..4eeb609 100644 AC_SUBST(perlbin) dnl If we are running on BSD/OS, we need to use the BSD .include syntax. --- -2.25.1 - diff --git a/sources/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2_2.4.62.bb b/sources/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2_2.4.62.bb index 66a017a8..bba00fb9 100644 --- a/sources/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2_2.4.62.bb +++ b/sources/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2_2.4.62.bb @@ -31,18 +31,29 @@ SRC_URI[sha256sum] = "674188e7bf44ced82da8db522da946849e22080d73d16c93f7f4df89e2 S = "${WORKDIR}/httpd-${PV}" -inherit autotools update-rc.d pkgconfig systemd update-alternatives +inherit autotools update-rc.d pkgconfig systemd multilib_script multilib_header DEPENDS = "openssl expat pcre apr apr-util apache2-native " CVE_PRODUCT = "apache:http_server" +CVE_STATUS[CVE-1999-0289] = "not-applicable-platform: The current version is not affected. It only applies for Windows" +CVE_STATUS[CVE-1999-0678] = "not-applicable-platform: this CVE is for Debian packaging configuration" +CVE_STATUS[CVE-1999-1412] = "not-applicable-platform: this CVE is for MAC OS X specific problem" +CVE_STATUS[CVE-2007-0086] = "disputed: this CVE is officially disputed by Redhat" +CVE_STATUS[CVE-2007-0450] = "not-applicable-platform: The current version is not affected. It only applies for Windows." +CVE_STATUS[CVE-2007-6421] = "cpe-incorrect: The current version is not affected by the CVE which affects versions from 2.2 (incl.) to 2.2.8 (excl.)" +CVE_STATUS[CVE-2007-6422] = "cpe-incorrect: The current version is not affected by the CVE which affects versions from 2.2 (incl.) to 2.2.8 (excl.)" +CVE_STATUS[CVE-2007-6423] = "cpe-incorrect: The current version is not affected by the CVE which affects versions from 2.2.x to 2.2.7-dev" +CVE_STATUS[CVE-2008-2168] = "cpe-incorrect: The current version is not affected by the CVE which affects versions up to 2.2.6 (excl.)" +CVE_STATUS[CVE-2010-0425] = "not-applicable-platform: The current version is not affected. It only applies for Windows." + SSTATE_SCAN_FILES += "apxs config_vars.mk config.nice" PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'selinux', d)}" PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux,libselinux" PACKAGECONFIG[openldap] = "--enable-ldap --enable-authnz-ldap,--disable-ldap --disable-authnz-ldap,openldap" -PACKAGECONFIG[zlib] = "--enable-deflate,,zlib,zlib" +PACKAGECONFIG[zlib] = "--enable-deflate --with-zlib=${STAGING_LIBDIR}/../,,zlib,zlib" CFLAGS:append = " -DPATH_MAX=4096" @@ -80,13 +91,15 @@ EXTRA_OECONF:class-native = "\ " do_configure:prepend() { - sed -i -e 's:$''{prefix}/usr/lib/cgi-bin:$''{libexecdir}/cgi-bin:g' ${S}/config.layout + sed -i -e 's:$''{prefix}/usr/lib/cgi-bin:$''{libexecdir}/cgi-bin:g' \ + -e 's#\(installbuilddir:\s*\).*#\1${libexecdir}/${PN}/build#' \ + ${S}/config.layout } do_install:append:class-target() { install -d ${D}/${sysconfdir}/init.d - cat ${WORKDIR}/init | \ + cat ${UNPACKDIR}/init | \ sed -e 's,/usr/sbin/,${sbindir}/,g' \ -e 's,/usr/bin/,${bindir}/,g' \ -e 's,/usr/lib/,${libdir}/,g' \ @@ -119,30 +132,33 @@ do_install:append:class-target() { -e 's,-fdebug-prefix-map[^ ]*,,g; s,-fmacro-prefix-map[^ ]*,,g; s,-ffile-prefix-map[^ ]*,,g' \ -e 's,${HOSTTOOLS_DIR}/,,g' \ -e 's,APU_INCLUDEDIR = .*,APU_INCLUDEDIR = ,g' \ - -e 's,APU_CONFIG = .*,APU_CONFIG = ,g' ${D}${datadir}/apache2/build/config_vars.mk + -e 's,APU_CONFIG = .*,APU_CONFIG = ,g' ${D}${libexecdir}/${PN}/build/config_vars.mk sed -i -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \ -e 's,${DEBUG_PREFIX_MAP},,g' \ -e 's,${RECIPE_SYSROOT},,g' \ -e 's,-fdebug-prefix-map[^ ]*,,g; s,-fmacro-prefix-map[^ ]*,,g; s,-fmacro-prefix-map[^ ]*,,g' \ -e 's,APU_INCLUDEDIR = .*,APU_INCLUDEDIR = ,g' \ - -e 's,".*/configure","configure",g' ${D}${datadir}/apache2/build/config.nice + -e 's,${WORKDIR}/recipe-sysroot/,,g' \ + -e 's,".*/configure","configure",g' ${D}${libexecdir}/${PN}/build/config.nice if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then install -d ${D}${sysconfdir}/tmpfiles.d/ - install -m 0644 ${WORKDIR}/apache2-volatile.conf ${D}${sysconfdir}/tmpfiles.d/ + install -m 0644 ${UNPACKDIR}/apache2-volatile.conf ${D}${sysconfdir}/tmpfiles.d/ install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/apache2.service ${D}${systemd_unitdir}/system + install -m 0644 ${UNPACKDIR}/apache2.service ${D}${systemd_unitdir}/system sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/apache2.service sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' ${D}${systemd_unitdir}/system/apache2.service elif ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then install -d ${D}${sysconfdir}/default/volatiles - install -m 0644 ${WORKDIR}/volatiles.04_apache2 ${D}${sysconfdir}/default/volatiles/04_apache2 + install -m 0644 ${UNPACKDIR}/volatiles.04_apache2 ${D}${sysconfdir}/default/volatiles/04_apache2 fi rm -rf ${D}${localstatedir} ${D}${sbindir}/envvars* chown -R root:root ${D} + + oe_multilib_header apache2/ap_config_layout.h } do_install:append:class-native() { @@ -152,20 +168,22 @@ do_install:append:class-native() { SYSROOT_PREPROCESS_FUNCS:append:class-target = " apache_sysroot_preprocess" +SYSROOT_DIRS += "${libexecdir}/${PN}/build" + apache_sysroot_preprocess() { install -d ${SYSROOT_DESTDIR}${bindir_crossscripts} install -m 755 ${D}${bindir}/apxs ${SYSROOT_DESTDIR}${bindir_crossscripts} install -d ${SYSROOT_DESTDIR}${sbindir} install -m 755 ${D}${sbindir}/apachectl ${SYSROOT_DESTDIR}${sbindir} - sed -i 's!my $installbuilddir = .*!my $installbuilddir = "${STAGING_DIR_HOST}/${datadir}/${BPN}/build";!' ${SYSROOT_DESTDIR}${bindir_crossscripts}/apxs - - sed -i 's!^APR_CONFIG = .*!APR_CONFIG = ${STAGING_BINDIR_CROSS}/apr-1-config!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk - sed -i 's!^APU_CONFIG = .*!APU_CONFIG = ${STAGING_BINDIR_CROSS}/apu-1-config!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk - sed -i 's!^includedir = .*!includedir = ${STAGING_INCDIR}/apache2!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk - sed -i 's!^CFLAGS = -I[^ ]*!CFLAGS = -I${STAGING_INCDIR}/openssl!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk - sed -i 's!^EXTRA_LDFLAGS = .*!EXTRA_LDFLAGS = -L${STAGING_LIBDIR}!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk - sed -i 's!^EXTRA_INCLUDES = .*!EXTRA_INCLUDES = -I$(includedir) -I. -I${STAGING_INCDIR}!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk - sed -i 's!--sysroot=[^ ]*!--sysroot=${STAGING_DIR_HOST}!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk + sed -i 's!\(my $installbuilddir = \)"\(.*\)"!\1"${STAGING_DIR_HOST}\2"!' ${SYSROOT_DESTDIR}${bindir_crossscripts}/apxs + + sed -i 's!^APR_CONFIG = .*!APR_CONFIG = ${STAGING_BINDIR_CROSS}/apr-1-config!' ${SYSROOT_DESTDIR}${libexecdir}/${PN}/build/config_vars.mk + sed -i 's!^APU_CONFIG = .*!APU_CONFIG = ${STAGING_BINDIR_CROSS}/apu-1-config!' ${SYSROOT_DESTDIR}${libexecdir}/${PN}/build/config_vars.mk + sed -i 's!^includedir = .*!includedir = ${STAGING_INCDIR}/apache2!' ${SYSROOT_DESTDIR}${libexecdir}/${PN}/build/config_vars.mk + sed -i 's!^CFLAGS = -I[^ ]*!CFLAGS = -I${STAGING_INCDIR}/openssl!' ${SYSROOT_DESTDIR}${libexecdir}/${PN}/build/config_vars.mk + sed -i 's!^EXTRA_LDFLAGS = .*!EXTRA_LDFLAGS = -L${STAGING_LIBDIR}!' ${SYSROOT_DESTDIR}${libexecdir}/${PN}/build/config_vars.mk + sed -i 's!^EXTRA_INCLUDES = .*!EXTRA_INCLUDES = -I$(includedir) -I. -I${STAGING_INCDIR}!' ${SYSROOT_DESTDIR}${libexecdir}/${PN}/build/config_vars.mk + sed -i 's!--sysroot=[^ ]*!--sysroot=${STAGING_DIR_HOST}!' ${SYSROOT_DESTDIR}${libexecdir}/${PN}/build/config_vars.mk } # Implications - used by update-rc.d scripts @@ -178,9 +196,12 @@ SYSTEMD_AUTO_ENABLE:${PN} = "enable" ALTERNATIVE:${PN} = "httpd" ALTERNATIVE_LINK_NAME[httpd] = "${sbindir}/httpd" ALTERNATIVE_PRIORITY[httpd] = "60" + ALTERNATIVE:${PN}-doc = "htpasswd.1" ALTERNATIVE_LINK_NAME[htpasswd.1] = "${mandir}/man1/htpasswd.1" +MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/apxs" + PACKAGES = "${PN}-utils ${PN}-scripts ${PN}-doc ${PN}-dev ${PN}-dbg ${PN}" CONFFILES:${PN} = "${sysconfdir}/${BPN}/httpd.conf \ @@ -203,7 +224,7 @@ FILES:${PN}-utils = "${bindir}/ab \ # We override here rather than append so that .so links are # included in the runtime package rather than here (-dev) # and to get build, icons, error into the -dev package -FILES:${PN}-dev = "${datadir}/${BPN}/build \ +FILES:${PN}-dev = "${libexecdir}/${PN}/build \ ${datadir}/${BPN}/icons \ ${datadir}/${BPN}/error \ ${includedir}/${BPN} \ diff --git a/sources/meta-openembedded/meta-webserver/recipes-httpd/cherokee/cherokee_git.bb b/sources/meta-openembedded/meta-webserver/recipes-httpd/cherokee/cherokee_git.bb index 7763a318..53d6a85a 100644 --- a/sources/meta-openembedded/meta-webserver/recipes-httpd/cherokee/cherokee_git.bb +++ b/sources/meta-openembedded/meta-webserver/recipes-httpd/cherokee/cherokee_git.bb @@ -36,13 +36,13 @@ EXTRA_OECONF = "--disable-static \ do_install:append () { install -m 0755 -d ${D}${sysconfdir}/init.d - install -m 755 ${WORKDIR}/cherokee.init ${D}${sysconfdir}/init.d/cherokee + install -m 755 ${UNPACKDIR}/cherokee.init ${D}${sysconfdir}/init.d/cherokee # clean up .la files for plugins rm -f ${D}${libdir}/cherokee/*.la install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/cherokee.service ${D}${systemd_unitdir}/system + install -m 0644 ${UNPACKDIR}/cherokee.service ${D}${systemd_unitdir}/system rmdir "${D}${localstatedir}/run" rmdir --ignore-fail-on-non-empty "${D}${localstatedir}" } diff --git a/sources/meta-openembedded/meta-webserver/recipes-httpd/hiawatha/hiawatha_10.12.bb b/sources/meta-openembedded/meta-webserver/recipes-httpd/hiawatha/hiawatha_10.12.bb index 2e848eaf..1111ef6f 100644 --- a/sources/meta-openembedded/meta-webserver/recipes-httpd/hiawatha/hiawatha_10.12.bb +++ b/sources/meta-openembedded/meta-webserver/recipes-httpd/hiawatha/hiawatha_10.12.bb @@ -37,9 +37,9 @@ EXTRA_OECMAKE = " -DENABLE_IPV6=OFF \ do_install:append() { # Copy over init script and sed in the correct sbin path - sed -i 's,sed_sbin_path,${sbindir},' ${WORKDIR}/hiawatha-init + sed -i 's,sed_sbin_path,${sbindir},' ${UNPACKDIR}/hiawatha-init mkdir -p ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/hiawatha-init ${D}${sysconfdir}/init.d/hiawatha + install -m 0755 ${UNPACKDIR}/hiawatha-init ${D}${sysconfdir}/init.d/hiawatha # configure php-fcgi to have a working configuration # by default if php is installed @@ -47,7 +47,7 @@ do_install:append() { if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then install -d ${D}/${systemd_unitdir}/system - install -m 644 ${WORKDIR}/hiawatha.service ${D}/${systemd_unitdir}/system + install -m 644 ${UNPACKDIR}/hiawatha.service ${D}/${systemd_unitdir}/system fi # /var/log/hiawatha and /var/lib/hiawatha needs to be created in runtime. diff --git a/sources/meta-openembedded/meta-webserver/recipes-httpd/monkey/monkey_1.6.9.bb b/sources/meta-openembedded/meta-webserver/recipes-httpd/monkey/monkey_1.6.9.bb index ee5dc161..a11af812 100644 --- a/sources/meta-openembedded/meta-webserver/recipes-httpd/monkey/monkey_1.6.9.bb +++ b/sources/meta-openembedded/meta-webserver/recipes-httpd/monkey/monkey_1.6.9.bb @@ -46,7 +46,7 @@ do_configure:append() { do_install:append() { rmdir ${D}${localstatedir}/log/${BPN} ${D}${localstatedir}/run ${D}${localstatedir}/log rmdir --ignore-fail-on-non-empty ${D}${localstatedir} - install -Dm 0755 ${WORKDIR}/monkey.init ${D}${sysconfdir}/init.d/monkey + install -Dm 0755 ${UNPACKDIR}/monkey.init ${D}${sysconfdir}/init.d/monkey # Create /var/log/monkey in runtime. if [ "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" ]; then install -d ${D}${nonarch_libdir}/tmpfiles.d @@ -57,7 +57,7 @@ do_install:append() { echo "d ${BPN} ${BPN} 0755 ${localstatedir}/log/${BPN} none" > ${D}${sysconfdir}/default/volatiles/99_${BPN} fi if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then - install -Dm 644 ${WORKDIR}/monkey.service ${D}/${systemd_unitdir}/system/monkey.service + install -Dm 644 ${UNPACKDIR}/monkey.service ${D}/${systemd_unitdir}/system/monkey.service fi } @@ -90,3 +90,5 @@ CONFFILES:${PN} = "${sysconfdir}/monkey/monkey.conf \ ${sysconfdir}/monkey/plugins/auth/monkey.users \ " +CVE_STATUS[CVE-2013-2183] = "cpe-incorrect: Current version (1.6.9) is not affected. Issue was addressed in version 1.3.0" +CVE_STATUS[CVE-2013-1771] = "not-applicable-platform: this is gentoo specific CVE" diff --git a/sources/meta-openembedded/meta-webserver/recipes-httpd/nginx/files/CVE-2023-44487.patch b/sources/meta-openembedded/meta-webserver/recipes-httpd/nginx/files/CVE-2023-44487.patch deleted file mode 100644 index 2fc6a60f..00000000 --- a/sources/meta-openembedded/meta-webserver/recipes-httpd/nginx/files/CVE-2023-44487.patch +++ /dev/null @@ -1,78 +0,0 @@ -From 6ceef192e7af1c507826ac38a2d43f08bf265fb9 Mon Sep 17 00:00:00 2001 -From: Maxim Dounin -Date: Wed, 10 Jan 2024 18:52:11 +0000 -Subject: [PATCH] HTTP/2: per-iteration stream handling limit. - -To ensure that attempts to flood servers with many streams are detected -early, a limit of no more than 2 * max_concurrent_streams new streams per one -event loop iteration was introduced. This limit is applied even if -max_concurrent_streams is not yet reached - for example, if corresponding -streams are handled synchronously or reset. - -Further, refused streams are now limited to maximum of max_concurrent_streams -and 100, similarly to priority_limit initial value, providing some tolerance -to clients trying to open several streams at the connection start, yet -low tolerance to flooding attempts. - -Upstream-Status: Backport [https://github.com/nginx/nginx/commit/6ceef192e7af1c507826ac38a2d43f08bf265fb9] -CVE: CVE-2023-44487 - -Signed-off-by: alperak ---- - src/http/v2/ngx_http_v2.c | 15 +++++++++++++++ - src/http/v2/ngx_http_v2.h | 2 ++ - 2 files changed, 17 insertions(+) - -diff --git a/src/http/v2/ngx_http_v2.c b/src/http/v2/ngx_http_v2.c -index ea3f27c..1116e56 100644 ---- a/src/http/v2/ngx_http_v2.c -+++ b/src/http/v2/ngx_http_v2.c -@@ -361,6 +361,7 @@ ngx_http_v2_read_handler(ngx_event_t *rev) - ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0, "http2 read handler"); - - h2c->blocked = 1; -+ h2c->new_streams = 0; - - if (c->close) { - c->close = 0; -@@ -1321,6 +1322,14 @@ ngx_http_v2_state_headers(ngx_http_v2_connection_t *h2c, u_char *pos, - goto rst_stream; - } - -+ if (h2c->new_streams++ >= 2 * h2scf->concurrent_streams) { -+ ngx_log_error(NGX_LOG_INFO, h2c->connection->log, 0, -+ "client sent too many streams at once"); -+ -+ status = NGX_HTTP_V2_REFUSED_STREAM; -+ goto rst_stream; -+ } -+ - if (!h2c->settings_ack - && !(h2c->state.flags & NGX_HTTP_V2_END_STREAM_FLAG) - && h2scf->preread_size < NGX_HTTP_V2_DEFAULT_WINDOW) -@@ -1386,6 +1395,12 @@ ngx_http_v2_state_headers(ngx_http_v2_connection_t *h2c, u_char *pos, - - rst_stream: - -+ if (h2c->refused_streams++ > ngx_max(h2scf->concurrent_streams, 100)) { -+ ngx_log_error(NGX_LOG_INFO, h2c->connection->log, 0, -+ "client sent too many refused streams"); -+ return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_NO_ERROR); -+ } -+ - if (ngx_http_v2_send_rst_stream(h2c, h2c->state.sid, status) != NGX_OK) { - return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_INTERNAL_ERROR); - } -diff --git a/src/http/v2/ngx_http_v2.h b/src/http/v2/ngx_http_v2.h -index 4e25293..b9daf92 100644 ---- a/src/http/v2/ngx_http_v2.h -+++ b/src/http/v2/ngx_http_v2.h -@@ -124,6 +124,8 @@ struct ngx_http_v2_connection_s { - ngx_uint_t processing; - ngx_uint_t frames; - ngx_uint_t idle; -+ ngx_uint_t new_streams; -+ ngx_uint_t refused_streams; - ngx_uint_t priority_limit; - - ngx_uint_t pushing; diff --git a/sources/meta-openembedded/meta-webserver/recipes-httpd/nginx/files/CVE-2024-7347-1.patch b/sources/meta-openembedded/meta-webserver/recipes-httpd/nginx/files/CVE-2024-7347-1.patch deleted file mode 100644 index 23723d63..00000000 --- a/sources/meta-openembedded/meta-webserver/recipes-httpd/nginx/files/CVE-2024-7347-1.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 88955b1044ef38315b77ad1a509d63631a790a0f Mon Sep 17 00:00:00 2001 -From: Roman Arutyunyan -Date: Mon, 12 Aug 2024 18:20:45 +0400 -Subject: [PATCH] Mp4: rejecting unordered chunks in stsc atom. - -Unordered chunks could result in trak->end_chunk smaller than trak->start_chunk -in ngx_http_mp4_crop_stsc_data(). Later in ngx_http_mp4_update_stco_atom() -this caused buffer overread while trying to calculate trak->end_offset. - -CVE: CVE-2024-7347 -Upstream-Status: Backport [https://github.com/nginx/nginx/commit/88955b1044ef38315b77ad1a509d63631a790a0f] -Signed-off-by: Ashish Sharma - - src/http/modules/ngx_http_mp4_module.c | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/src/http/modules/ngx_http_mp4_module.c b/src/http/modules/ngx_http_mp4_module.c -index 1cd017c274..041ad263b5 100644 ---- a/src/http/modules/ngx_http_mp4_module.c -+++ b/src/http/modules/ngx_http_mp4_module.c -@@ -3156,6 +3156,13 @@ ngx_http_mp4_crop_stsc_data(ngx_http_mp4_file_t *mp4, - - next_chunk = ngx_mp4_get_32value(entry->chunk); - -+ if (next_chunk < chunk) { -+ ngx_log_error(NGX_LOG_ERR, mp4->file.log, 0, -+ "unordered mp4 stsc chunks in \"%s\"", -+ mp4->file.name.data); -+ return NGX_ERROR; -+ } -+ - ngx_log_debug5(NGX_LOG_DEBUG_HTTP, mp4->file.log, 0, - "sample:%uD, chunk:%uD, chunks:%uD, " - "samples:%uD, id:%uD", diff --git a/sources/meta-openembedded/meta-webserver/recipes-httpd/nginx/files/CVE-2024-7347-2.patch b/sources/meta-openembedded/meta-webserver/recipes-httpd/nginx/files/CVE-2024-7347-2.patch deleted file mode 100644 index 5b8d08a1..00000000 --- a/sources/meta-openembedded/meta-webserver/recipes-httpd/nginx/files/CVE-2024-7347-2.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 7362d01658b61184108c21278443910da68f93b4 Mon Sep 17 00:00:00 2001 -From: Roman Arutyunyan -Date: Mon, 12 Aug 2024 18:20:43 +0400 -Subject: [PATCH] Mp4: fixed buffer underread while updating stsz atom. - -While cropping an stsc atom in ngx_http_mp4_crop_stsc_data(), a 32-bit integer -overflow could happen, which could result in incorrect seeking and a very large -value stored in "samples". This resulted in a large invalid value of -trak->end_chunk_samples. This value is further used to calculate the value of -trak->end_chunk_samples_size in ngx_http_mp4_update_stsz_atom(). While doing -this, a large invalid value of trak->end_chunk_samples could result in reading -memory before stsz atom start. This could potentially result in a segfault. - -CVE: CVE-2024-7347 -Upstream-Status: Backport [https://github.com/nginx/nginx/commit/7362d01658b61184108c21278443910da68f93b4] -Signed-off-by: Ashish Sharma - - src/http/modules/ngx_http_mp4_module.c | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -diff --git a/src/http/modules/ngx_http_mp4_module.c b/src/http/modules/ngx_http_mp4_module.c -index 03175dea21..1cd017c274 100644 ---- a/src/http/modules/ngx_http_mp4_module.c -+++ b/src/http/modules/ngx_http_mp4_module.c -@@ -3099,7 +3099,8 @@ static ngx_int_t - ngx_http_mp4_crop_stsc_data(ngx_http_mp4_file_t *mp4, - ngx_http_mp4_trak_t *trak, ngx_uint_t start) - { -- uint32_t start_sample, chunk, samples, id, next_chunk, n, -+ uint64_t n; -+ uint32_t start_sample, chunk, samples, id, next_chunk, - prev_samples; - ngx_buf_t *data, *buf; - ngx_uint_t entries, target_chunk, chunk_samples; -@@ -3160,7 +3161,7 @@ ngx_http_mp4_crop_stsc_data(ngx_http_mp4_file_t *mp4, - "samples:%uD, id:%uD", - start_sample, chunk, next_chunk - chunk, samples, id); - -- n = (next_chunk - chunk) * samples; -+ n = (uint64_t) (next_chunk - chunk) * samples; - - if (start_sample < n) { - goto found; -@@ -3182,7 +3183,7 @@ ngx_http_mp4_crop_stsc_data(ngx_http_mp4_file_t *mp4, - "sample:%uD, chunk:%uD, chunks:%uD, samples:%uD", - start_sample, chunk, next_chunk - chunk, samples); - -- n = (next_chunk - chunk) * samples; -+ n = (uint64_t) (next_chunk - chunk) * samples; - - if (start_sample > n) { - ngx_log_error(NGX_LOG_ERR, mp4->file.log, 0, diff --git a/sources/meta-openembedded/meta-webserver/recipes-httpd/nginx/files/CVE-2025-23419.patch b/sources/meta-openembedded/meta-webserver/recipes-httpd/nginx/files/CVE-2025-23419.patch deleted file mode 100644 index e42664f1..00000000 --- a/sources/meta-openembedded/meta-webserver/recipes-httpd/nginx/files/CVE-2025-23419.patch +++ /dev/null @@ -1,87 +0,0 @@ -From bc23d3cdf98e855a5409d3584a241d4d773ab306 Mon Sep 17 00:00:00 2001 -From: Sergey Kandaurov -Date: Wed, 22 Jan 2025 18:55:44 +0400 -Subject: [PATCH] SNI: added restriction for TLSv1.3 cross-SNI session - resumption. - -In OpenSSL, session resumption always happens in the default SSL context, -prior to invoking the SNI callback. Further, unlike in TLSv1.2 and older -protocols, SSL_get_servername() returns values received in the resumption -handshake, which may be different from the value in the initial handshake. -Notably, this makes the restriction added in b720f650b insufficient for -sessions resumed with different SNI server name. - -Considering the example from b720f650b, previously, a client was able to -request example.org by presenting a certificate for example.org, then to -resume and request example.com. - -The fix is to reject handshakes resumed with a different server name, if -verification of client certificates is enabled in a corresponding server -configuration. - -CVE: CVE-2025-23419 -Upstream-Status: Backport [https://github.com/nginx/nginx/commit/13935cf9fdc3c8d8278c70716417d3b71c36140e] - -This patch is partially cherry picked from commit -13935cf9fdc3c8d8278c70716417d3b71c36140e, the original patch had 2 -parts. One fixed problem in `http/ngx_http_request` module and the -second fixed problem in `stream/ngx_stream_ssl_module` module. The fix -for `stream/ngx_stream_ssl_module can't be aplied because, the 'stream -virtual servers' funcionality was added later in this commit: -https://github.com/nginx/nginx/commit/d21675228a0ba8d4331e05c60660228a5d3326de. -Therefore only `http/ngx_http_request` part was backported. - -Signed-off-by: Changqing Li - ---- - src/http/ngx_http_request.c | 27 +++++++++++++++++++++++++-- - 1 file changed, 25 insertions(+), 2 deletions(-) - -diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c -index 5e0340b..514c021 100644 ---- a/src/http/ngx_http_request.c -+++ b/src/http/ngx_http_request.c -@@ -907,6 +907,31 @@ ngx_http_ssl_servername(ngx_ssl_conn_t *ssl_conn, int *ad, void *arg) - goto done; - } - -+ sscf = ngx_http_get_module_srv_conf(cscf->ctx, ngx_http_ssl_module); -+ -+#if (defined TLS1_3_VERSION \ -+ && !defined LIBRESSL_VERSION_NUMBER && !defined OPENSSL_IS_BORINGSSL) -+ -+ /* -+ * SSL_SESSION_get0_hostname() is only available in OpenSSL 1.1.1+, -+ * but servername being negotiated in every TLSv1.3 handshake -+ * is only returned in OpenSSL 1.1.1+ as well -+ */ -+ -+ if (sscf->verify) { -+ const char *hostname; -+ -+ hostname = SSL_SESSION_get0_hostname(SSL_get0_session(ssl_conn)); -+ -+ if (hostname != NULL && ngx_strcmp(hostname, servername) != 0) { -+ c->ssl->handshake_rejected = 1; -+ *ad = SSL_AD_ACCESS_DENIED; -+ return SSL_TLSEXT_ERR_ALERT_FATAL; -+ } -+ } -+ -+#endif -+ - hc->ssl_servername = ngx_palloc(c->pool, sizeof(ngx_str_t)); - if (hc->ssl_servername == NULL) { - goto error; -@@ -920,8 +945,6 @@ ngx_http_ssl_servername(ngx_ssl_conn_t *ssl_conn, int *ad, void *arg) - - ngx_set_connection_log(c, clcf->error_log); - -- sscf = ngx_http_get_module_srv_conf(hc->conf_ctx, ngx_http_ssl_module); -- - c->ssl->buffer_size = sscf->buffer_size; - - if (sscf->ssl.ctx) { --- -2.34.1 - diff --git a/sources/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx.inc b/sources/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx.inc index 926db194..bcc384bd 100644 --- a/sources/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx.inc +++ b/sources/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx.inc @@ -23,8 +23,6 @@ SRC_URI = " \ file://nginx.service \ file://nginx-fix-pidfile.patch \ file://0001-configure-libxslt-conf.patch \ - file://CVE-2024-7347-1.patch \ - file://CVE-2024-7347-2.patch \ " inherit siteinfo update-rc.d useradd systemd @@ -40,7 +38,7 @@ NGINX_USER ?= "www" EXTRA_OECONF = "" DISABLE_STATIC = "" -PACKAGECONFIG ??= "ssl ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" +PACKAGECONFIG ??= "ssl fastcgi scgi uwsgi ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" PACKAGECONFIG[gunzip] = "--with-http_gunzip_module,," PACKAGECONFIG[http2] = "--with-http_v2_module,," @@ -50,7 +48,9 @@ PACKAGECONFIG[ipv6] = "--with-ipv6,," PACKAGECONFIG[webdav] = "--with-http_dav_module,," PACKAGECONFIG[stream] = "--with-stream,," PACKAGECONFIG[http-sub-module] = "--with-http_sub_module,," - +PACKAGECONFIG[fastcgi] = ",--without-http_fastcgi_module," +PACKAGECONFIG[scgi] = ",--without-http_scgi_module," +PACKAGECONFIG[uwsgi] = ",--without-http_uwsgi_module," PACKAGECONFIG[xslt] = "--with-http_xslt_module,,libxslt" do_configure () { @@ -83,9 +83,9 @@ do_configure () { --error-log-path=${localstatedir}/log/nginx/error.log \ --http-client-body-temp-path=/run/nginx/client_body_temp \ --http-proxy-temp-path=/run/nginx/proxy_temp \ - --http-fastcgi-temp-path=/run/nginx/fastcgi_temp \ - --http-uwsgi-temp-path=/run/nginx/uwsgi_temp \ - --http-scgi-temp-path=/run/nginx/scgi_temp \ + ${@bb.utils.contains('PACKAGECONFIG', 'fastcgi', '--http-fastcgi-temp-path=/run/nginx/fastcgi_temp', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'scgi', '--http-scgi-temp-path=/run/nginx/scgi_temp', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'uwsgi', '--http-uwsgi-temp-path=/run/nginx/uwsgi_temp', '', d)} \ --pid-path=/run/nginx/nginx.pid \ --prefix=${prefix} \ --with-threads \ @@ -110,30 +110,42 @@ do_install () { chown ${NGINX_USER}:www-data -R ${D}${NGINX_WWWDIR} install -d ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/nginx.init ${D}${sysconfdir}/init.d/nginx + install -m 0755 ${UNPACKDIR}/nginx.init ${D}${sysconfdir}/init.d/nginx sed -i 's,/usr/sbin/,${sbindir}/,g' ${D}${sysconfdir}/init.d/nginx sed -i 's,/etc/,${sysconfdir}/,g' ${D}${sysconfdir}/init.d/nginx install -d ${D}${sysconfdir}/nginx - install -m 0644 ${WORKDIR}/nginx.conf ${D}${sysconfdir}/nginx/nginx.conf + install -m 0644 ${UNPACKDIR}/nginx.conf ${D}${sysconfdir}/nginx/nginx.conf sed -i 's,/etc/,${sysconfdir}/,g' ${D}${sysconfdir}/nginx/nginx.conf sed -i 's,/var/,${localstatedir}/,g' ${D}${sysconfdir}/nginx/nginx.conf sed -i 's/^user.*/user ${NGINX_USER};/g' ${D}${sysconfdir}/nginx/nginx.conf - install -Dm 0644 ${WORKDIR}/default_server.site ${D}${sysconfdir}/nginx/sites-available/default_server + install -Dm 0644 ${UNPACKDIR}/default_server.site ${D}${sysconfdir}/nginx/sites-available/default_server sed -i 's,/var/,${localstatedir}/,g' ${D}${sysconfdir}/nginx/sites-available/default_server install -d ${D}${sysconfdir}/nginx/sites-enabled ln -s ../sites-available/default_server ${D}${sysconfdir}/nginx/sites-enabled/ - install -m 0644 ${WORKDIR}/proxy_params ${D}${sysconfdir}/nginx/proxy_params + install -m 0644 ${UNPACKDIR}/proxy_params ${D}${sysconfdir}/nginx/proxy_params install -d ${D}${sysconfdir}/default/volatiles - install -m 0644 ${WORKDIR}/nginx-volatile.conf ${D}${sysconfdir}/default/volatiles/99_nginx + install -m 0644 ${UNPACKDIR}/nginx-volatile.conf ${D}${sysconfdir}/default/volatiles/99_nginx sed -i 's,/var/,${localstatedir}/,g' ${D}${sysconfdir}/default/volatiles/99_nginx sed -i 's,@NGINX_USER@,${NGINX_USER},g' ${D}${sysconfdir}/default/volatiles/99_nginx # cleanup configuration folder rm ${D}${sysconfdir}/nginx/*.default + # remove config files based on packageconfig + if ! [ "${@bb.utils.filter('PACKAGECONFIG', 'fastcgi', d)}" ]; then + rm -f ${D}${sysconfdir}/nginx/fastcgi.conf + rm -f ${D}${sysconfdir}/nginx/fastcgi_params + fi + if ! [ "${@bb.utils.filter('PACKAGECONFIG', 'scgi', d)}" ]; then + rm -f ${D}${sysconfdir}/nginx/scgi_params + fi + if ! [ "${@bb.utils.filter('PACKAGECONFIG', 'uwsgi', d)}" ]; then + rm -f ${D}${sysconfdir}/nginx/uwsgi_params + fi + # add additional configuration folders install -d ${D}${sysconfdir}/nginx/modules-available install -d ${D}${sysconfdir}/nginx/modules-enabled @@ -142,7 +154,7 @@ do_install () { if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)};then install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/nginx.service ${D}${systemd_unitdir}/system/ + install -m 0644 ${UNPACKDIR}/nginx.service ${D}${systemd_unitdir}/system/ sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' \ -e 's,@LOCALSTATEDIR@,${localstatedir},g' \ -e 's,@SBINDIR@,${sbindir},g' \ diff --git a/sources/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx_1.24.0.bb b/sources/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx_1.24.0.bb deleted file mode 100644 index ed18b647..00000000 --- a/sources/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx_1.24.0.bb +++ /dev/null @@ -1,9 +0,0 @@ -require nginx.inc - -LIC_FILES_CHKSUM = "file://LICENSE;md5=175abb631c799f54573dc481454c8632" - -SRC_URI:append = " file://CVE-2023-44487.patch \ - file://CVE-2025-23419.patch" - -SRC_URI[sha256sum] = "77a2541637b92a621e3ee76776c8b7b40cf6d707e69ba53a940283e30ff2f55d" - diff --git a/sources/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx_1.25.4.bb b/sources/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx_1.25.4.bb deleted file mode 100644 index 5ea2f572..00000000 --- a/sources/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx_1.25.4.bb +++ /dev/null @@ -1,10 +0,0 @@ -require nginx.inc - -# 1.24.x branch is the current stable branch, the recommended default -# 1.25.x is the current mainline branches containing all new features -DEFAULT_PREFERENCE = "-1" - -LIC_FILES_CHKSUM = "file://LICENSE;md5=a6547d7e5628787ee2a9c5a3480eb628" - -SRC_URI[sha256sum] = "760729901acbaa517996e681ee6ea259032985e37c2768beef80df3a877deed9" - diff --git a/sources/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx_1.26.2.bb b/sources/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx_1.26.2.bb new file mode 100644 index 00000000..a279a3cf --- /dev/null +++ b/sources/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx_1.26.2.bb @@ -0,0 +1,6 @@ +require nginx.inc + +LIC_FILES_CHKSUM = "file://LICENSE;md5=a6547d7e5628787ee2a9c5a3480eb628" + +SRC_URI[sha256sum] = "627fe086209bba80a2853a0add9d958d7ebbdffa1a8467a5784c9a6b4f03d738" + diff --git a/sources/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx_1.27.3.bb b/sources/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx_1.27.3.bb new file mode 100644 index 00000000..2f1bfa3b --- /dev/null +++ b/sources/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx_1.27.3.bb @@ -0,0 +1,10 @@ +require nginx.inc + +# 1.26.x branch is the current stable branch, the recommended default +# 1.27.x is the current mainline branches containing all new features +DEFAULT_PREFERENCE = "-1" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=8323c46a4f3aac555a90caca346bb3d2" + +SRC_URI[sha256sum] = "ba23a9568f442036b61cd0e29bd66a47b90634efa91e0b2cf2d719057a9b7903" + diff --git a/sources/meta-openembedded/meta-webserver/recipes-httpd/sthttpd/sthttpd_2.27.1.bb b/sources/meta-openembedded/meta-webserver/recipes-httpd/sthttpd/sthttpd_2.27.1.bb index 601ec7bc..ec188cc4 100644 --- a/sources/meta-openembedded/meta-webserver/recipes-httpd/sthttpd/sthttpd_2.27.1.bb +++ b/sources/meta-openembedded/meta-webserver/recipes-httpd/sthttpd/sthttpd_2.27.1.bb @@ -37,14 +37,14 @@ do_configure:prepend () { do_install:append () { install -d ${D}${sysconfdir}/init.d - install -c -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/thttpd - install -c -m 755 ${WORKDIR}/thttpd.conf ${D}${sysconfdir} + install -c -m 755 ${UNPACKDIR}/init ${D}${sysconfdir}/init.d/thttpd + install -c -m 755 ${UNPACKDIR}/thttpd.conf ${D}${sysconfdir} sed -i -e 's,@@CONFFILE,${sysconfdir}/thttpd.conf,g' ${D}${sysconfdir}/init.d/thttpd sed -i -e 's,@@SRVDIR,${SRV_DIR},g' ${D}${sysconfdir}/thttpd.conf sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/thttpd install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/thttpd.service ${D}${systemd_unitdir}/system + install -m 0644 ${UNPACKDIR}/thttpd.service ${D}${systemd_unitdir}/system sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${systemd_unitdir}/system/thttpd.service sed -i 's!/var/!${localstatedir}/!g' ${D}${systemd_unitdir}/system/thttpd.service sed -i -e 's,@@CONFFILE,${sysconfdir}/thttpd.conf,g' ${D}${systemd_unitdir}/system/thttpd.service diff --git a/sources/meta-openembedded/meta-webserver/recipes-php/phpmyadmin/phpmyadmin_5.2.1.bb b/sources/meta-openembedded/meta-webserver/recipes-php/phpmyadmin/phpmyadmin_5.2.1.bb new file mode 100644 index 00000000..7c381015 --- /dev/null +++ b/sources/meta-openembedded/meta-webserver/recipes-php/phpmyadmin/phpmyadmin_5.2.1.bb @@ -0,0 +1,40 @@ +SUMMARY = "Web-based MySQL administration interface" +HOMEPAGE = "http://www.phpmyadmin.net" +# Main code is GPLv2, vendor/tecnickcom/tcpdf is under LGPLv3, js/jquery is under MIT +LICENSE = "GPL-2.0-only & LGPL-3.0-only & MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://vendor/tecnickcom/tcpdf/LICENSE.TXT;md5=d0ff7e060074497f34481cf574e8a581 \ + file://js/vendor/jquery/MIT-LICENSE.txt;md5=de877aa6d744cc160ff41c26a8e4811f \ +" + +SRC_URI = "https://files.phpmyadmin.net/phpMyAdmin/${PV}/phpMyAdmin-${PV}-all-languages.tar.xz \ + file://apache.conf \ +" + +SRC_URI[sha256sum] = "373f9599dfbd96d6fe75316d5dad189e68c305f297edf42377db9dd6b41b2557" + +UPSTREAM_CHECK_URI = "https://www.phpmyadmin.net/downloads/" +UPSTREAM_CHECK_REGEX = "phpMyAdmin-(?P\d+(\.\d+)+)-all-languages.tar.xz" + +S = "${WORKDIR}/phpMyAdmin-${PV}-all-languages" + +inherit allarch + +do_install() { + install -d ${D}${datadir}/${BPN} + cp -R --no-dereference --preserve=mode,links -v * ${D}${datadir}/${BPN} + chown -R root:root ${D}${datadir}/${BPN} + # Don't install patches to target + rm -rf ${D}${datadir}/${BPN}/patches + + install -d ${D}${sysconfdir}/apache2/conf.d + install -m 0644 ${UNPACKDIR}/apache.conf ${D}${sysconfdir}/apache2/conf.d/phpmyadmin.conf + + # Remove a few scripts that explicitly require bash (!) + rm -f ${D}${datadir}/phpmyadmin/libraries/transformations/*.sh +} + +FILES:${PN} = "${datadir}/${BPN} \ + ${sysconfdir}/apache2/conf.d" + +RDEPENDS:${PN} += "bash php-cli" diff --git a/sources/meta-openembedded/meta-webserver/recipes-php/phpmyadmin/phpmyadmin_5.2.2.bb b/sources/meta-openembedded/meta-webserver/recipes-php/phpmyadmin/phpmyadmin_5.2.2.bb deleted file mode 100644 index c98ce458..00000000 --- a/sources/meta-openembedded/meta-webserver/recipes-php/phpmyadmin/phpmyadmin_5.2.2.bb +++ /dev/null @@ -1,40 +0,0 @@ -SUMMARY = "Web-based MySQL administration interface" -HOMEPAGE = "http://www.phpmyadmin.net" -# Main code is GPLv2, vendor/tecnickcom/tcpdf is under LGPLv3, js/jquery is under MIT -LICENSE = "GPL-2.0-only & LGPL-3.0-only & MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://vendor/tecnickcom/tcpdf/LICENSE.TXT;md5=72bda492a00ee8c4121987c6afdefc07 \ - file://js/vendor/jquery/MIT-LICENSE.txt;md5=de877aa6d744cc160ff41c26a8e4811f \ -" - -SRC_URI = "https://files.phpmyadmin.net/phpMyAdmin/${PV}/phpMyAdmin-${PV}-all-languages.tar.xz \ - file://apache.conf \ -" - -SRC_URI[sha256sum] = "f881819a3b11e653b0212afaf0cc105db85c767715cb3f5852670f7fc36c9669" - -UPSTREAM_CHECK_URI = "https://www.phpmyadmin.net/downloads/" -UPSTREAM_CHECK_REGEX = "phpMyAdmin-(?P\d+(\.\d+)+)-all-languages.tar.xz" - -S = "${WORKDIR}/phpMyAdmin-${PV}-all-languages" - -inherit allarch - -do_install() { - install -d ${D}${datadir}/${BPN} - cp -R --no-dereference --preserve=mode,links -v * ${D}${datadir}/${BPN} - chown -R root:root ${D}${datadir}/${BPN} - # Don't install patches to target - rm -rf ${D}${datadir}/${BPN}/patches - - install -d ${D}${sysconfdir}/apache2/conf.d - install -m 0644 ${WORKDIR}/apache.conf ${D}${sysconfdir}/apache2/conf.d/phpmyadmin.conf - - # Remove a few scripts that explicitly require bash (!) - rm -f ${D}${datadir}/phpmyadmin/libraries/transformations/*.sh -} - -FILES:${PN} = "${datadir}/${BPN} \ - ${sysconfdir}/apache2/conf.d" - -RDEPENDS:${PN} += "bash php-cli" diff --git a/sources/meta-openembedded/meta-webserver/recipes-webadmin/cockpit/cockpit_304.bb b/sources/meta-openembedded/meta-webserver/recipes-webadmin/cockpit/cockpit_304.bb index df7f47a1..6a5eb4e6 100644 --- a/sources/meta-openembedded/meta-webserver/recipes-webadmin/cockpit/cockpit_304.bb +++ b/sources/meta-openembedded/meta-webserver/recipes-webadmin/cockpit/cockpit_304.bb @@ -193,7 +193,7 @@ do_install:append() { chmod 4750 ${D}${libexecdir}/cockpit-session install -d "${D}${sysconfdir}/pam.d" - install -p -m 0644 ${WORKDIR}/cockpit.pam ${D}${sysconfdir}/pam.d/cockpit + install -p -m 0644 ${UNPACKDIR}/cockpit.pam ${D}${sysconfdir}/pam.d/cockpit # provided by firewalld rm -rf ${D}${libdir}/firewalld diff --git a/sources/meta-openembedded/meta-webserver/recipes-webadmin/netdata/netdata/0001-cmake-Add-check-for-64bit-builtin-atomics.patch b/sources/meta-openembedded/meta-webserver/recipes-webadmin/netdata/netdata/0001-cmake-Add-check-for-64bit-builtin-atomics.patch new file mode 100644 index 00000000..d8ad69ce --- /dev/null +++ b/sources/meta-openembedded/meta-webserver/recipes-webadmin/netdata/netdata/0001-cmake-Add-check-for-64bit-builtin-atomics.patch @@ -0,0 +1,51 @@ +From 1e8fbb6da4e5ee44fe24c078aae1930d759f0ba3 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 17 Sep 2024 05:29:13 +0000 +Subject: [PATCH] cmake: Add check for 64bit builtin atomics + +Compilers for some architectures e.g. RISCV32 do not have 64bit atomics +therefore, its important to deduce that and use it to pass right flags to +compiler to use them, e.g. h2o module + +Fixes +nection.c.o): in function `h2o_create_connection': +| /usr/src/debug/netdata/1.47.1/src/web/server/h2o/libh2o/include/h2o.h:1917:(.text.create_conn+0x5e): undefined reference to `__sync_add_and_fetch_8' +| collect2: error: ld returned 1 exit status + +Upstream-Status: Submitted [https://github.com/netdata/netdata/pull/18565] +Signed-off-by: Khem Raj +--- + CMakeLists.txt | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +Index: netdata-v1.47.1/CMakeLists.txt +=================================================================== +--- netdata-v1.47.1.orig/CMakeLists.txt ++++ netdata-v1.47.1/CMakeLists.txt +@@ -448,6 +448,15 @@ int main() { + } + " HAVE_BUILTIN_ATOMICS) + ++check_cxx_source_compiles(" ++#include ++int main(void) { ++ uint64_t a; ++ __sync_add_and_fetch(&a, 1); ++ return 0; ++} ++" ARCH_SUPPORTS_64BIT_ATOMICS) ++ + check_c_source_compiles(" + void my_printf(char const *s, ...) __attribute__((format(gnu_printf, 1, 2))); + int main() { return 0; } +@@ -523,6 +532,10 @@ if(OS_FREEBSD OR OS_MACOS) + set(HAVE_BUILTIN_ATOMICS True) + endif() + ++if (ENABLE_H2O AND NOT ARCH_SUPPORTS_64BIT_ATOMICS) ++ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DH2O_NO_64BIT_ATOMICS") ++endif (NOT ARCH_SUPPORTS_64BIT_ATOMICS) ++ + # openssl/crypto + set(ENABLE_OPENSSL True) + pkg_check_modules(TLS IMPORTED_TARGET openssl) diff --git a/sources/meta-openembedded/meta-webserver/recipes-webadmin/netdata/netdata/netdata-volatiles.conf b/sources/meta-openembedded/meta-webserver/recipes-webadmin/netdata/netdata/netdata-volatiles.conf new file mode 100644 index 00000000..f3425420 --- /dev/null +++ b/sources/meta-openembedded/meta-webserver/recipes-webadmin/netdata/netdata/netdata-volatiles.conf @@ -0,0 +1,5 @@ +d /run/netdata 0755 netdata netdata - +d /var/cache/netdata 0755 netdata netdata - +d /var/lib/netdata/cloud.d 0755 netdata netdata - +d /var/lib/netdata/registry 0755 netdata netdata - +d /var/log/netdata 0755 netdata netdata - diff --git a/sources/meta-openembedded/meta-webserver/recipes-webadmin/netdata/netdata_1.44.3.bb b/sources/meta-openembedded/meta-webserver/recipes-webadmin/netdata/netdata_1.44.3.bb deleted file mode 100644 index 700c6b23..00000000 --- a/sources/meta-openembedded/meta-webserver/recipes-webadmin/netdata/netdata_1.44.3.bb +++ /dev/null @@ -1,81 +0,0 @@ -SUMMARY = "Real-time performance monitoring" -DESCRIPTION = "Netdata is high-fidelity infrastructure monitoring and troubleshooting. \ - Open-source, free, preconfigured, opinionated, and always real-time." -HOMEPAGE = "https://github.com/netdata/netdata/" -LICENSE = "GPL-3.0-only" -LIC_FILES_CHKSUM = "file://LICENSE;md5=fc9b848046ef54b5eaee6071947abd24" - -DEPENDS += "json-c libuv libyaml util-linux zlib " - -SRC_URI = "\ - https://github.com/${BPN}/${BPN}/releases/download/v${PV}/${BPN}-v${PV}.tar.gz \ - file://netdata.conf \ - file://netdata.service \ -" - -SRC_URI[sha256sum] = "50df30a9aaf60d550eb8e607230d982827e04194f7df3eba0e83ff7919270ad2" - -UPSTREAM_CHECK_URI = "https://github.com/${BPN}/${BPN}/tags" -UPSTREAM_CHECK_REGEX = "${BPN}/releases/tag/v(?P\d+(?:\.\d+)*)" - -S = "${WORKDIR}/${BPN}-v${PV}" - -# Stop sending anonymous statistics to Google Analytics -NETDATA_ANONYMOUS ??= "enabled" - -inherit pkgconfig autotools-brokensep useradd systemd - -LIBS:toolchain-clang:x86 = "-latomic" -LIBS:riscv64 = "-latomic" -LIBS:riscv32 = "-latomic" -LIBS:mips = "-latomic" -export LIBS - -#systemd -SYSTEMD_PACKAGES = "${PN}" -SYSTEMD_SERVICE:${PN} = "netdata.service" -SYSTEMD_AUTO_ENABLE:${PN} = "enable" - -#User specific -USERADD_PACKAGES = "${PN}" -USERADD_PARAM:${PN} = "--system --no-create-home --home-dir ${localstatedir}/run/netdata --user-group netdata" - -PACKAGECONFIG ??= "openssl" -PACKAGECONFIG[cloud] = "--enable-cloud, --disable-cloud," -PACKAGECONFIG[lz4] = "--enable-lz4, --disable-lz4, lz4" -PACKAGECONFIG[openssl] = "--enable-openssl, --disable-openssl, openssl" - -# ebpf doesn't compile (or detect) the cross compilation well -EXTRA_OECONF += "--disable-ebpf" - -do_install:append() { - #set S UID for plugins - chmod 4755 ${D}${libexecdir}/netdata/plugins.d/apps.plugin - - if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then - # Install systemd unit files - install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/netdata.service ${D}${systemd_unitdir}/system - sed -i -e 's,@@datadir,${datadir_native},g' ${D}${systemd_unitdir}/system/netdata.service - fi - - # Install default netdata.conf - install -d ${D}${sysconfdir}/netdata - install -m 0644 ${WORKDIR}/netdata.conf ${D}${sysconfdir}/netdata/ - sed -i -e 's,@@sysconfdir,${sysconfdir},g' ${D}${sysconfdir}/netdata/netdata.conf - sed -i -e 's,@@libdir,${libexecdir},g' ${D}${sysconfdir}/netdata/netdata.conf - sed -i -e 's,@@datadir,${datadir},g' ${D}${sysconfdir}/netdata/netdata.conf - - if [ "${NETDATA_ANONYMOUS}" = "enabled" ]; then - touch ${D}${sysconfdir}/netdata/.opt-out-from-anonymous-statistics - fi - - install --group netdata --owner netdata --directory ${D}${localstatedir}/cache/netdata - install --group netdata --owner netdata --directory ${D}${localstatedir}/lib/netdata - - chown -R netdata:netdata ${D}${datadir}/netdata/web -} - -FILES:${PN} += "${localstatedir}/cache/netdata/ ${localstatedir}/lib/netdata/" - -RDEPENDS:${PN} = "bash python3-core zlib" diff --git a/sources/meta-openembedded/meta-webserver/recipes-webadmin/netdata/netdata_1.47.1.bb b/sources/meta-openembedded/meta-webserver/recipes-webadmin/netdata/netdata_1.47.1.bb new file mode 100644 index 00000000..5b38d401 --- /dev/null +++ b/sources/meta-openembedded/meta-webserver/recipes-webadmin/netdata/netdata_1.47.1.bb @@ -0,0 +1,93 @@ +SUMMARY = "Real-time performance monitoring" +DESCRIPTION = "Netdata is high-fidelity infrastructure monitoring and troubleshooting. \ + Open-source, free, preconfigured, opinionated, and always real-time." +HOMEPAGE = "https://github.com/netdata/netdata/" +LICENSE = "GPL-3.0-only" +LIC_FILES_CHKSUM = "file://LICENSE;md5=fc9b848046ef54b5eaee6071947abd24" + +DEPENDS += "json-c libuv libyaml util-linux zlib lz4" + +SRC_URI = "\ + https://github.com/${BPN}/${BPN}/releases/download/v${PV}/${BPN}-v${PV}.tar.gz \ + file://0001-cmake-Add-check-for-64bit-builtin-atomics.patch \ + file://netdata.conf \ + file://netdata.service \ + file://netdata-volatiles.conf \ +" +SRC_URI[sha256sum] = "fb970a4b571ffd542b7d24220ef806a4c1b56c535e0f549a9978860a9f1dcc9c" + +UPSTREAM_CHECK_URI = "https://github.com/${BPN}/${BPN}/tags" +UPSTREAM_CHECK_REGEX = "${BPN}/releases/tag/v(?P\d+(?:\.\d+)*)" + +S = "${WORKDIR}/${BPN}-v${PV}" + +# Stop sending anonymous statistics to Google Analytics +NETDATA_ANONYMOUS ??= "enabled" + +inherit pkgconfig cmake useradd systemd + +TARGET_CC_ARCH:append:libc-musl = " -D_LARGEFILE64_SOURCE" + +LIBS:toolchain-clang:x86 = "-latomic" +LIBS:riscv64 = "-latomic" +LIBS:riscv32 = "-latomic" +LIBS:mips = "-latomic" +export LIBS + +#systemd +SYSTEMD_PACKAGES = "${PN}" +SYSTEMD_SERVICE:${PN} = "netdata.service" +SYSTEMD_AUTO_ENABLE:${PN} = "enable" + +#User specific +USERADD_PACKAGES = "${PN}" +USERADD_PARAM:${PN} = "--system --no-create-home --home-dir ${localstatedir}/run/netdata --user-group netdata" + +PACKAGECONFIG ??= "openssl freeipmi ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" +PACKAGECONFIG[brotli] = ",,brotli" +PACKAGECONFIG[cloud] = "-DENABLE_CLOUD=ON,-DENABLE_CLOUD=OFF," +PACKAGECONFIG[openssl] = "-DENABLE_OPENSSL=ON,-DENABLE_OPENSSL=OFF,openssl" +PACKAGECONFIG[freeipmi] = "-DENABLE_PLUGIN_FREEIPMI=ON,-DENABLE_PLUGIN_FREEIPMI=OFF,freeipmi" +PACKAGECONFIG[nfacct] = "-DENABLE_PLUGIN_NFACCT=ON,-DENABLE_PLUGIN_NFACCT=OFF,libmnl" +# needs meta-virtualization +PACKAGECONFIG[xenstat] = "-DENABLE_PLUGIN_XENSTAT=ON,-DENABLE_PLUGIN_XENSTAT=OFF,xen-tools" +PACKAGECONFIG[cups] = "-DENABLE_PLUGIN_CUPS=ON,-DENABLE_PLUGIN_CUPS=OFF,cups" +PACKAGECONFIG[systemd] = "-DENABLE_PLUGIN_SYSTEMD_JOURNAL=ON,-DENABLE_PLUGIN_SYSTEMD_JOURNAL=OFF,systemd" + +# ebpf doesn't compile (or detect) the cross compilation well +EXTRA_OECMAKE += "-DENABLE_PLUGIN_EBPF=OFF -DENABLE_PLUGIN_GO=OFF \ + -DENABLE_ACLK=OFF -DENABLE_EXPORTER_PROMETHEUS_REMOTE_WRITE=OFF -DCMAKE_INSTALL_PREFIX='${base_prefix}'" + +do_install:append() { + #set S UID for plugins + chmod 4755 ${D}${libexecdir}/netdata/plugins.d/apps.plugin + rm -rf ${D}/${localstatedir}/ + + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then + # Install systemd unit files + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${UNPACKDIR}/netdata.service ${D}${systemd_unitdir}/system + sed -i -e 's,@@datadir,${datadir_native},g' ${D}${systemd_unitdir}/system/netdata.service + install -Dm 0644 ${UNPACKDIR}/netdata-volatiles.conf ${D}${sysconfdir}/tmpfiles.d/netdata.conf + fi + + # Install default netdata.conf + install -d ${D}${sysconfdir}/netdata + install -m 0644 ${UNPACKDIR}/netdata.conf ${D}${sysconfdir}/netdata/ + sed -i -e 's,@@sysconfdir,${sysconfdir},g' ${D}${sysconfdir}/netdata/netdata.conf + sed -i -e 's,@@libdir,${libexecdir},g' ${D}${sysconfdir}/netdata/netdata.conf + sed -i -e 's,@@datadir,${datadir},g' ${D}${sysconfdir}/netdata/netdata.conf + + if [ "${NETDATA_ANONYMOUS}" = "enabled" ]; then + touch ${D}${sysconfdir}/netdata/.opt-out-from-anonymous-statistics + fi + + install --group netdata --owner netdata --directory ${D}${localstatedir}/cache/netdata + install --group netdata --owner netdata --directory ${D}${localstatedir}/lib/netdata + + chown -R netdata:netdata ${D}${datadir}/netdata/web +} + +FILES:${PN} += "${localstatedir}/cache/netdata/ ${localstatedir}/lib/netdata/" + +RDEPENDS:${PN} = "bash python3-core zlib" diff --git a/sources/meta-openembedded/meta-webserver/recipes-webadmin/webmin/files/disable-version-check.patch b/sources/meta-openembedded/meta-webserver/recipes-webadmin/webmin/files/disable-version-check.patch index 1ca26ca0..46b1f7c7 100644 --- a/sources/meta-openembedded/meta-webserver/recipes-webadmin/webmin/files/disable-version-check.patch +++ b/sources/meta-openembedded/meta-webserver/recipes-webadmin/webmin/files/disable-version-check.patch @@ -7,58 +7,44 @@ Upstream-Status: Inappropriate Signed-off-by: Paul Eggleton -Index: webmin-1.850/webmin/webmin-lib.pl -=================================================================== ---- webmin-1.850.orig/webmin/webmin-lib.pl -+++ webmin-1.850/webmin/webmin-lib.pl -@@ -1112,28 +1112,28 @@ my %miniserv; +--- a/webmin/webmin-lib.pl ++++ b/webmin/webmin-lib.pl +@@ -1170,38 +1170,6 @@ my %miniserv; + &get_miniserv_config(\%miniserv); &load_theme_library(); # So that UI functions work - # Need OS upgrade --my %realos = &detect_operating_system(undef, 1); --if (($realos{'os_version'} ne $gconfig{'os_version'} || -- $realos{'os_type'} ne $gconfig{'os_type'}) && -- $realos{'os_version'} && $realos{'os_type'} && -- &foreign_available("webmin")) { -- my ($realminor) = split(/\./, $realos{'os_version'}); -- my ($minor) = split(/\./, $gconfig{'os_version'}); -- if ($realos{'os_type'} eq $gconfig{'os_type'} && -- $realminor == $minor) { -- # Only the minor version number changed - no need to apply -- &apply_new_os_version(\%realos); +-# Need OS upgrade, but only once per day or if the system was rebooted +-my $now = time(); +-my $uptime = &get_system_uptime(); +-if (&foreign_available("webmin")) { +- my %realos; +- my @st = stat($realos_cache_file); +- if (!@st || $now - $st[9] > 24*60*60 || +- $uptime && $now - $st[9] > $uptime) { +- %realos = &detect_operating_system(undef, 1); +- &write_file($realos_cache_file, \%realos); - } - else { -- # Large enough change to tell the user -- push(@notifs, -- &ui_form_start("$gconfig{'webprefix'}/webmin/fix_os.cgi"). -- &text('os_incorrect', $realos{'real_os_type'}, -- $realos{'real_os_version'})."

\n". +- &read_file($realos_cache_file, \%realos); +- } +- if (($realos{'os_version'} ne $gconfig{'os_version'} || +- $realos{'real_os_version'} ne $gconfig{'real_os_version'} || +- $realos{'os_type'} ne $gconfig{'os_type'}) && +- $realos{'os_version'} && $realos{'os_type'} && +- &foreign_available("webmin")) { +- # Tell the user that OS version was updated +- push(@notifs, +- &ui_form_start("@{[&get_webprefix()]}/webmin/fix_os.cgi"). +- &text('os_incorrect', +- $realos{'real_os_type'}, +- $realos{'real_os_version'}). +- &show_os_release_notes($realos{'real_os_version'}). +- "

\n". - &ui_form_end([ [ undef, $text{'os_fix'} ] ]) - ); - } - } -+#my %realos = &detect_operating_system(undef, 1); -+#if (($realos{'os_version'} ne $gconfig{'os_version'} || -+# $realos{'os_type'} ne $gconfig{'os_type'}) && -+# $realos{'os_version'} && $realos{'os_type'} && -+# &foreign_available("webmin")) { -+# my ($realminor) = split(/\./, $realos{'os_version'}); -+# my ($minor) = split(/\./, $gconfig{'os_version'}); -+# if ($realos{'os_type'} eq $gconfig{'os_type'} && -+# $realminor == $minor) { -+# # Only the minor version number changed - no need to apply -+# &apply_new_os_version(\%realos); -+# } -+# else { -+# # Large enough change to tell the user -+# push(@notifs, -+# &ui_form_start("$gconfig{'webprefix'}/webmin/fix_os.cgi"). -+# &text('os_incorrect', $realos{'real_os_type'}, -+# $realos{'real_os_version'})."

\n". -+# &ui_form_end([ [ undef, $text{'os_fix'} ] ]) -+# ); -+# } -+# } - +- # Password close to expiry my $warn_days = $config{'warn_days'}; + if (&foreign_check("acl")) { diff --git a/sources/meta-openembedded/meta-webserver/recipes-webadmin/webmin/files/mount-excludefs.patch b/sources/meta-openembedded/meta-webserver/recipes-webadmin/webmin/files/mount-excludefs.patch index 787bd8c6..7d6a2275 100644 --- a/sources/meta-openembedded/meta-webserver/recipes-webadmin/webmin/files/mount-excludefs.patch +++ b/sources/meta-openembedded/meta-webserver/recipes-webadmin/webmin/files/mount-excludefs.patch @@ -8,9 +8,9 @@ Signed-off-by: Paul Eggleton Upstream-Status: Pending ---- webmin-1.570.orig/mount/index.cgi -+++ webmin-1.570/mount/index.cgi -@@ -33,10 +33,12 @@ elsif ($config{'sort_mode'} == 1) { +--- a/mount/index.cgi ++++ b/mount/index.cgi +@@ -34,9 +34,11 @@ elsif ($config{'sort_mode'} == 1) { } # Build visible filesystems list @@ -18,7 +18,6 @@ Upstream-Status: Pending foreach $m (@all) { @minfo = @$m; $p = &simplify_mount_path($minfo[0], $minfo[2]); - next if ($ignore{$minfo[2]}); + next if (grep {$_ eq $minfo[2]} @excludefs); @mmodes = &mount_modes($minfo[2], $minfo[0], $minfo[1]); $canedit = $can_edit{$minfo[2]} && !$mmodes[4] && diff --git a/sources/meta-openembedded/meta-webserver/recipes-webadmin/webmin/files/mysql-config-fix.patch b/sources/meta-openembedded/meta-webserver/recipes-webadmin/webmin/files/mysql-config-fix.patch index c6c1f0df..d6235359 100644 --- a/sources/meta-openembedded/meta-webserver/recipes-webadmin/webmin/files/mysql-config-fix.patch +++ b/sources/meta-openembedded/meta-webserver/recipes-webadmin/webmin/files/mysql-config-fix.patch @@ -10,8 +10,6 @@ Signed-off-by: Diego Rondini mysql/config | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) -diff --git a/mysql/config b/mysql/config -index e5b6fb3..77bfe69 100644 --- a/mysql/config +++ b/mysql/config @@ -1,13 +1,13 @@ @@ -33,7 +31,7 @@ index e5b6fb3..77bfe69 100644 -mysqladmin=/usr/local/mysql/bin/mysqladmin +mysql_libs=/usr/lib +mysqladmin=/usr/bin/mysqladmin - style=0 + style=1 add_mode=1 nodbi=0 @@ -15,7 +15,7 @@ access=*: * @@ -45,6 +43,3 @@ index e5b6fb3..77bfe69 100644 max_dbs=50 my_cnf=/etc/my.cnf max_text=1000 --- -2.5.0 - diff --git a/sources/meta-openembedded/meta-webserver/recipes-webadmin/webmin/files/net-generic.patch b/sources/meta-openembedded/meta-webserver/recipes-webadmin/webmin/files/net-generic.patch index 6ae3dced..f1965a78 100644 --- a/sources/meta-openembedded/meta-webserver/recipes-webadmin/webmin/files/net-generic.patch +++ b/sources/meta-openembedded/meta-webserver/recipes-webadmin/webmin/files/net-generic.patch @@ -3,23 +3,19 @@ Add support for configuring network interfaces on a generic linux system Upstream-Status: Inappropriate [config] Signed-off-by: Paul Eggleton -Index: webmin-1.850/net/module.info -=================================================================== ---- webmin-1.850.orig/net/module.info -+++ webmin-1.850/net/module.info -@@ -14,7 +14,7 @@ desc_ko_KR.UTF-8=ë„¤íŠ¸ì›Œí¬ êµ¬ì„± +--- a/net/module.info ++++ b/net/module.info +@@ -1,7 +1,7 @@ + version=2.202 + longdesc=Configure boot time and active interfaces, DNS, routing and /etc/hosts. name=Networking - desc_tr=Að Yapýlandýrmasý - desc_de=Netzwerkkonfiguration -os_support=solaris coherent-linux redhat-linux/5.0-* mandrake-linux united-linux suse-linux/6.0-* open-linux unixware turbo-linux/4.0 freebsd/3.2-* openbsd debian-linux/2.2-* cobalt-linux/2.2-* msc-linux gentoo-linux macos/1.5-* trustix-linux slackware-linux/8.0-* openmamba-linux cygwin windows pardus-linux +os_support=generic-linux solaris coherent-linux redhat-linux/5.0-* mandrake-linux united-linux suse-linux/6.0-* open-linux unixware turbo-linux/4.0 freebsd/3.2-* openbsd debian-linux/2.2-* cobalt-linux/2.2-* msc-linux gentoo-linux macos/1.5-* trustix-linux slackware-linux/8.0-* openmamba-linux cygwin windows pardus-linux - desc_sk=Konfigurácia siete - desc_zh_CN=ÍøÂçÅäÖà - risk=low medium high -Index: webmin-1.850/net/generic-linux-lib.pl -=================================================================== + readonly=1 + desc=Network Configuration + category=net --- /dev/null -+++ webmin-1.850/net/generic-linux-lib.pl ++++ b/net/generic-linux-lib.pl @@ -0,0 +1,2 @@ +do 'linux-lib.pl'; + diff --git a/sources/meta-openembedded/meta-webserver/recipes-webadmin/webmin/files/net-lib.pl.patch b/sources/meta-openembedded/meta-webserver/recipes-webadmin/webmin/files/net-lib.pl.patch index bdba5e73..949525df 100644 --- a/sources/meta-openembedded/meta-webserver/recipes-webadmin/webmin/files/net-lib.pl.patch +++ b/sources/meta-openembedded/meta-webserver/recipes-webadmin/webmin/files/net-lib.pl.patch @@ -4,16 +4,14 @@ XXX: need to work out a better fix. Signed-off-by: Dexuan Cui -diff -Nru webmin-1.570.orig//net/net-lib.pl webmin-1.570/net/net-lib.pl ---- webmin-1.570.orig//net/net-lib.pl 2011-10-03 09:01:48.000000000 +0800 -+++ webmin-1.570/net/net-lib.pl 2011-10-28 13:52:56.138873664 +0800 -@@ -21,7 +21,8 @@ - do "$gconfig{'os_type'}-9.1-ALL-lib.pl"; +--- a/net/net-lib.pl ++++ b/net/net-lib.pl +@@ -38,7 +38,7 @@ elsif ($gconfig{'os_type'} eq 'debian-li + $net_mode = "netplan"; } else { - do "$gconfig{'os_type'}-lib.pl"; -+ #do "$gconfig{'os_type'}-lib.pl"; + do "debian-linux-lib.pl"; + $net_mode = $gconfig{'os_type'}; } - # list_hosts() diff --git a/sources/meta-openembedded/meta-webserver/recipes-webadmin/webmin/files/remove-python2.3.patch b/sources/meta-openembedded/meta-webserver/recipes-webadmin/webmin/files/remove-python2.3.patch deleted file mode 100644 index 75e5bd1e..00000000 --- a/sources/meta-openembedded/meta-webserver/recipes-webadmin/webmin/files/remove-python2.3.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 6f04699d5d417122b67e8118fd1955c769f17e76 Mon Sep 17 00:00:00 2001 -From: Robert Yang -Date: Tue, 2 Sep 2014 00:11:05 -0700 -Subject: [PATCH] ajaxterm/ajaxterm/qweb.py: fix hardcode of python2.3 - -Upstream-Status: Pending - -Signed-off-by: Robert Yang ---- - ajaxterm/ajaxterm/qweb.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/ajaxterm/ajaxterm/qweb.py b/ajaxterm/ajaxterm/qweb.py -index 20c5092..c658a6b 100644 ---- a/ajaxterm/ajaxterm/qweb.py -+++ b/ajaxterm/ajaxterm/qweb.py -@@ -1,4 +1,4 @@ --#!/usr/bin/python2.3 -+#!/usr/bin/env python - # - # vim:set et ts=4 fdc=0 fdn=2 fdl=0: - # --- -1.7.9.5 - diff --git a/sources/meta-openembedded/meta-webserver/recipes-webadmin/webmin/webmin_1.850.bb b/sources/meta-openembedded/meta-webserver/recipes-webadmin/webmin/webmin_1.850.bb deleted file mode 100644 index 35ec09da..00000000 --- a/sources/meta-openembedded/meta-webserver/recipes-webadmin/webmin/webmin_1.850.bb +++ /dev/null @@ -1,170 +0,0 @@ -SUMMARY = "Web-based administration interface" -HOMEPAGE = "http://www.webmin.com" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENCE;md5=0373ac9f611e542ddebe1ec6394afc3c" - -SRC_URI = "${SOURCEFORGE_MIRROR}/webadmin/webmin-${PV}.tar.gz \ - file://setup.sh \ - file://init-exclude.patch \ - file://net-generic.patch \ - file://remove-startup-option.patch \ - file://disable-version-check.patch \ - file://nfs-export.patch \ - file://exports-lib.pl.patch \ - file://mount-excludefs.patch \ - file://samba-config-fix.patch \ - file://proftpd-config-fix.patch \ - file://net-lib.pl.patch \ - file://media-tomb.patch \ - file://remove-python2.3.patch \ - file://mysql-config-fix.patch \ - file://webmin.service \ - " - -SRC_URI[md5sum] = "cd6ee98f73f9418562197675b952d81b" -SRC_URI[sha256sum] = "c66caa9e4cb50d5447bc8aceb7989d2284dde060278f404b13e171c7ce1690e1" - -UPSTREAM_CHECK_URI = "http://www.webmin.com/download.html" -UPSTREAM_CHECK_REGEX = "webmin-(?P\d+(\.\d+)+).tar.gz" - -inherit perlnative update-rc.d systemd - -do_configure() { - # Remove binaries and plugins for other platforms - rm -rf acl/Authen-SolarisRBAC-0.1* - rm -rf format bsdexports hpuxexports sgiexports - rm -rf zones rbac smf ipfw ipfilter dfsadmin - rm -f mount/freebsd-mounts* mount/netbsd-mounts* - rm -f mount/openbsd-mounts* mount/macos-mounts* - - # Remove some plugins for the moment - rm -rf lilo frox wuftpd telnet pserver cpan shorewall webalizer cfengine fsdump pap - rm -rf majordomo fetchmail sendmail mailboxes procmail filter mailcap dovecot exim spam qmailadmin postfix - rm -rf stunnel squid sarg pptp-client pptp-server jabber openslp sentry cluster-* vgetty burner heartbeat - - # Adjust configs - [ -f init/config-debian-linux ] && mv init/config-debian-linux init/config-generic-linux - sed -i "s/shutdown_command=.*/shutdown_command=poweroff/" init/config-generic-linux - echo "exclude=bootmisc.sh,single,halt,reboot,hostname.sh,modutils.sh,mountall.sh,mountnfs.sh,networking,populate-volatile.sh,rmnologin.sh,save-rtc.sh,umountfs,umountnfs.sh,hwclock.sh,checkroot.sh,banner.sh,udev,udev-cache,devpts.sh,psplash.sh,sendsigs,fbsetup,bootlogd,stop-bootlogd,sysfs.sh,syslog,syslog.busybox,urandom,webmin,functions.initscripts,read-only-rootfs-hook.sh" >> init/config-generic-linux - echo "excludefs=devpts,devtmpfs,usbdevfs,proc,tmpfs,sysfs,debugfs" >> mount/config-generic-linux - - [ -f exports/config-debian-linux ] && mv exports/config-debian-linux exports/config-generic-linux - sed -i "s/killall -HUP rpc.nfsd && //" exports/config-generic-linux - sed -i "s/netstd_nfs/nfsserver/g" exports/config-generic-linux - - # Fix insane naming that causes problems at packaging time (must be done before deleting below) - find . -name "*\**" | while read from - do - to=`echo "$from" | sed "s/*/ALL/"` - mv "$from" "$to" - done - - # Remove some other files we don't need - find . -name "config-*" -a \! -name "config-generic-linux" -a \! -name "config-ALL-linux" -a \! -name "*.pl" -delete - find . -regextype posix-extended -regex ".*/(openserver|aix|osf1|osf|openbsd|netbsd|freebsd|unixware|solaris|macos|irix|hpux|cygwin|windows)-lib\.pl" -delete - rm -f webmin-gentoo-init webmin-caldera-init webmin-debian-pam webmin-pam - - # Don't need these at runtime (and we have our own setup script) - rm -f setup.sh - rm -f setup.pl - - # Use pidof for finding PIDs - sed -i "s/find_pid_command=.*/find_pid_command=pidof NAME/" config-generic-linux -} - -WEBMIN_LOGIN ?= "admin" -WEBMIN_PASSWORD ?= "password" - -do_install() { - install -d ${D}${sysconfdir} - install -d ${D}${sysconfdir}/webmin - install -d ${D}${sysconfdir}/init.d - install -m 0755 webmin-init ${D}${sysconfdir}/init.d/webmin - - install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/webmin.service ${D}${systemd_unitdir}/system - sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' \ - ${D}${systemd_unitdir}/system/webmin.service - - install -d ${D}${localstatedir} - install -d ${D}${localstatedir}/webmin - - install -d ${D}${libexecdir}/webmin - cd ${S} || exit 1 - tar --no-same-owner --exclude='./patches' --exclude='./.pc' -cpf - . \ - | tar --no-same-owner -xpf - -C ${D}${libexecdir}/webmin - - rm -f ${D}${libexecdir}/webmin/webmin-init - rm -f ${D}${libexecdir}/webmin/ajaxterm/ajaxterm/configure.initd.gentoo - rm -rf ${D}${libexecdir}/webmin/patches - - # Run setup script - export perl=perl - export perl_runtime=${bindir}/perl - export prefix=${D} - export tempdir=${S}/install_tmp - export wadir=${libexecdir}/webmin - export config_dir=${sysconfdir}/webmin - export var_dir=${localstatedir}/webmin - export os_type=generic-linux - export os_version=0 - export real_os_type="${DISTRO_NAME}" - export real_os_version="${DISTRO_VERSION}" - export port=10000 - export login=${WEBMIN_LOGIN} - export password=${WEBMIN_PASSWORD} - export ssl=0 - export atboot=1 - export no_pam=1 - mkdir -p $tempdir - ${S}/../setup.sh - - # Ensure correct PERLLIB path - sed -i -e 's#${D}##g' ${D}${sysconfdir}/webmin/start -} - -INITSCRIPT_NAME = "webmin" -INITSCRIPT_PARAMS = "start 99 5 3 2 . stop 10 0 1 6 ." - -SYSTEMD_SERVICE:${PN} = "webmin.service" -SYSTEMD_AUTO_ENABLE:${PN} = "disable" - -# FIXME: some of this should be figured out automatically -RDEPENDS:${PN} += "perl perl-module-socket perl-module-exporter perl-module-exporter-heavy perl-module-carp perl-module-strict" -RDEPENDS:${PN} += "perl-module-warnings perl-module-xsloader perl-module-posix perl-module-autoloader" -RDEPENDS:${PN} += "perl-module-fcntl perl-module-tie-hash perl-module-vars perl-module-time-local perl-module-config perl-module-constant" -RDEPENDS:${PN} += "perl-module-file-glob perl-module-file-copy perl-module-sdbm-file perl-module-feature" - -PACKAGES_DYNAMIC += "webmin-module-* webmin-theme-*" -RRECOMMENDS:${PN} += "webmin-module-system-status" - -PACKAGES += "${PN}-module-proc ${PN}-module-raid ${PN}-module-exports ${PN}-module-fdisk ${PN}-module-lvm" -RDEPENDS:${PN}-module-proc = "procps" -RDEPENDS:${PN}-module-raid = "mdadm" -RDEPENDS:${PN}-module-exports = "perl-module-file-basename perl-module-file-path perl-module-cwd perl-module-file-spec perl-module-file-spec-unix" -RRECOMMENDS:${PN}-module-fdisk = "parted" -RRECOMMENDS:${PN}-module-lvm = "lvm2" - -python populate_packages:prepend() { - import os, os.path - - wadir = bb.data.expand('${libexecdir}/webmin', d) - wadir_image = bb.data.expand('${D}', d) + wadir - modules = [] - themes = [] - for mod in os.listdir(wadir_image): - modinfo = os.path.join(wadir_image, mod, "module.info") - themeinfo = os.path.join(wadir_image, mod, "theme.info") - if os.path.exists(modinfo): - modules.append(mod) - elif os.path.exists(themeinfo): - themes.append(mod) - - do_split_packages(d, wadir, '^(%s)$' % "|".join(modules), 'webmin-module-%s', 'Webmin module for %s', extra_depends='perl', allow_dirs=True, prepend=True) - do_split_packages(d, wadir, '^(%s)$' % "|".join(themes), 'webmin-theme-%s', 'Webmin theme for %s', extra_depends='perl', allow_dirs=True, prepend=True) -} - -# Time-savers -package_do_pkgconfig() { - : -} diff --git a/sources/meta-openembedded/meta-webserver/recipes-webadmin/webmin/webmin_2.202.bb b/sources/meta-openembedded/meta-webserver/recipes-webadmin/webmin/webmin_2.202.bb new file mode 100644 index 00000000..18082149 --- /dev/null +++ b/sources/meta-openembedded/meta-webserver/recipes-webadmin/webmin/webmin_2.202.bb @@ -0,0 +1,166 @@ +SUMMARY = "Web-based administration interface" +HOMEPAGE = "http://www.webmin.com" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENCE;md5=0a6446108c96d0819d21e40b48109507" + +SRC_URI = "${SOURCEFORGE_MIRROR}/webadmin/webmin-${PV}.tar.gz \ + file://setup.sh \ + file://init-exclude.patch \ + file://net-generic.patch \ + file://remove-startup-option.patch \ + file://disable-version-check.patch \ + file://nfs-export.patch \ + file://exports-lib.pl.patch \ + file://mount-excludefs.patch \ + file://samba-config-fix.patch \ + file://proftpd-config-fix.patch \ + file://net-lib.pl.patch \ + file://media-tomb.patch \ + file://mysql-config-fix.patch \ + file://webmin.service \ + " +SRC_URI[sha256sum] = "4f1c467aeda0ded546e69f332c768665b6a0537d6a69e609221f9465121f775e" +UPSTREAM_CHECK_URI = "http://www.webmin.com/download.html" +UPSTREAM_CHECK_REGEX = "webmin-(?P\d+(\.\d+)+).tar.gz" + +inherit perlnative update-rc.d systemd + +do_configure() { + # Remove binaries and plugins for other platforms + rm -rf acl/Authen-SolarisRBAC-0.1* + rm -rf format bsdexports hpuxexports sgiexports + rm -rf zones rbac smf ipfw ipfilter dfsadmin + rm -f mount/freebsd-mounts* mount/netbsd-mounts* + rm -f mount/openbsd-mounts* mount/macos-mounts* + + # Remove some plugins for the moment + rm -rf lilo frox wuftpd telnet pserver cpan shorewall webalizer cfengine fsdump pap + rm -rf majordomo fetchmail sendmail mailboxes procmail filter mailcap dovecot exim spam qmailadmin postfix + rm -rf stunnel squid sarg pptp-client pptp-server jabber openslp sentry cluster-* vgetty burner heartbeat + + # Adjust configs + [ -f init/config-debian-linux ] && mv init/config-debian-linux init/config-generic-linux + sed -i "s/shutdown_command=.*/shutdown_command=poweroff/" init/config-generic-linux + echo "exclude=bootmisc.sh,single,halt,reboot,hostname.sh,modutils.sh,mountall.sh,mountnfs.sh,networking,populate-volatile.sh,rmnologin.sh,save-rtc.sh,umountfs,umountnfs.sh,hwclock.sh,checkroot.sh,banner.sh,udev,udev-cache,devpts.sh,psplash.sh,sendsigs,fbsetup,bootlogd,stop-bootlogd,sysfs.sh,syslog,syslog.busybox,urandom,webmin,functions.initscripts,read-only-rootfs-hook.sh" >> init/config-generic-linux + echo "excludefs=devpts,devtmpfs,usbdevfs,proc,tmpfs,sysfs,debugfs" >> mount/config-generic-linux + + [ -f exports/config-debian-linux ] && mv exports/config-debian-linux exports/config-generic-linux + sed -i "s/killall -HUP rpc.nfsd && //" exports/config-generic-linux + sed -i "s/netstd_nfs/nfsserver/g" exports/config-generic-linux + + # Fix insane naming that causes problems at packaging time (must be done before deleting below) + find . -name "*\**" | while read from + do + to=`echo "$from" | sed "s/*/ALL/"` + mv "$from" "$to" + done + + # Remove some other files we don't need + find . -name "config-*" -a \! -name "config-generic-linux" -a \! -name "config-ALL-linux" -a \! -name "*.pl" -delete + find . -regextype posix-extended -regex ".*/(openserver|aix|osf1|osf|openbsd|netbsd|freebsd|unixware|solaris|macos|irix|hpux|cygwin|windows)-lib\.pl" -delete + rm -f webmin-gentoo-init webmin-caldera-init webmin-debian-pam webmin-pam + + # Don't need these at runtime (and we have our own setup script) + rm -f setup.sh + rm -f setup.pl + + # Use pidof for finding PIDs + sed -i "s/find_pid_command=.*/find_pid_command=pidof NAME/" config-generic-linux +} + +WEBMIN_LOGIN ?= "admin" +WEBMIN_PASSWORD ?= "password" + +do_install() { + install -d ${D}${sysconfdir} + install -d ${D}${sysconfdir}/webmin + install -d ${D}${sysconfdir}/init.d + install -m 0755 webmin-init ${D}${sysconfdir}/init.d/webmin + + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${UNPACKDIR}/webmin.service ${D}${systemd_unitdir}/system + sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' \ + ${D}${systemd_unitdir}/system/webmin.service + + install -d ${D}${localstatedir} + install -d ${D}${localstatedir}/webmin + + install -d ${D}${libexecdir}/webmin + cd ${S} || exit 1 + tar --no-same-owner --exclude='./patches' --exclude='./.pc' -cpf - . \ + | tar --no-same-owner -xpf - -C ${D}${libexecdir}/webmin + + rm -f ${D}${libexecdir}/webmin/webmin-init + rm -f ${D}${libexecdir}/webmin/ajaxterm/ajaxterm/configure.initd.gentoo + rm -rf ${D}${libexecdir}/webmin/patches + + # Run setup script + export perl=perl + export perl_runtime=${bindir}/perl + export prefix=${D} + export tempdir=${S}/install_tmp + export wadir=${libexecdir}/webmin + export config_dir=${sysconfdir}/webmin + export var_dir=${localstatedir}/webmin + export os_type=generic-linux + export os_version=0 + export real_os_type="${DISTRO_NAME}" + export real_os_version="${DISTRO_VERSION}" + export port=10000 + export login=${WEBMIN_LOGIN} + export password=${WEBMIN_PASSWORD} + export ssl=0 + export atboot=1 + export no_pam=1 + mkdir -p $tempdir + ${UNPACKDIR}/setup.sh + + # Ensure correct PERLLIB path + sed -i -e 's#${D}##g' ${D}${sysconfdir}/webmin/start +} + +INITSCRIPT_NAME = "webmin" +INITSCRIPT_PARAMS = "start 99 5 3 2 . stop 10 0 1 6 ." + +SYSTEMD_SERVICE:${PN} = "webmin.service" +SYSTEMD_AUTO_ENABLE:${PN} = "disable" + +# FIXME: some of this should be figured out automatically +RDEPENDS:${PN} += "perl perl-module-socket perl-module-exporter perl-module-exporter-heavy perl-module-carp perl-module-strict" +RDEPENDS:${PN} += "perl-module-warnings perl-module-xsloader perl-module-posix perl-module-autoloader" +RDEPENDS:${PN} += "perl-module-fcntl perl-module-tie-hash perl-module-vars perl-module-time-local perl-module-config perl-module-constant" +RDEPENDS:${PN} += "perl-module-file-glob perl-module-file-copy perl-module-sdbm-file perl-module-feature" + +PACKAGES_DYNAMIC += "webmin-module-* webmin-theme-*" +RRECOMMENDS:${PN} += "webmin-module-system-status" + +PACKAGES += "${PN}-module-proc ${PN}-module-raid ${PN}-module-exports ${PN}-module-fdisk ${PN}-module-lvm" +RDEPENDS:${PN}-module-proc = "procps" +RDEPENDS:${PN}-module-raid = "mdadm" +RDEPENDS:${PN}-module-exports = "perl-module-file-basename perl-module-file-path perl-module-cwd perl-module-file-spec perl-module-file-spec-unix" +RRECOMMENDS:${PN}-module-fdisk = "parted" +RRECOMMENDS:${PN}-module-lvm = "lvm2" + +python populate_packages:prepend() { + import os, os.path + + wadir = bb.data.expand('${libexecdir}/webmin', d) + wadir_image = bb.data.expand('${D}', d) + wadir + modules = [] + themes = [] + for mod in os.listdir(wadir_image): + modinfo = os.path.join(wadir_image, mod, "module.info") + themeinfo = os.path.join(wadir_image, mod, "theme.info") + if os.path.exists(modinfo): + modules.append(mod) + elif os.path.exists(themeinfo): + themes.append(mod) + + do_split_packages(d, wadir, '^(%s)$' % "|".join(modules), 'webmin-module-%s', 'Webmin module for %s', extra_depends='perl', allow_dirs=True, prepend=True) + do_split_packages(d, wadir, '^(%s)$' % "|".join(themes), 'webmin-theme-%s', 'Webmin theme for %s', extra_depends='perl', allow_dirs=True, prepend=True) +} + +# Time-savers +package_do_pkgconfig() { + : +} diff --git a/sources/meta-openembedded/meta-xfce/README.md b/sources/meta-openembedded/meta-xfce/README.md index 92c2e655..862cf541 100644 --- a/sources/meta-openembedded/meta-xfce/README.md +++ b/sources/meta-openembedded/meta-xfce/README.md @@ -1,10 +1,10 @@ This layer depends on: URI: git://git.openembedded.org/openembedded-core -branch: scarthgap +branch: styhead URI: git://git.openembedded.org/meta-openembedded -branch: scarthgap +branch: styhead meta-xfce depends on meta-oe, meta-gnome and meta-multimedia in this repository. @@ -13,9 +13,9 @@ this to local.conf: BBMASK = "meta-xfce/recipes-multimedia" -Send pull requests to openembedded-devel@lists.openembedded.org with '[meta-xfce][scarthgap]' in the subject' +Send pull requests to openembedded-devel@lists.openembedded.org with '[meta-xfce][styhead]' in the subject' When sending single patches, please using something like: -git send-email -M -1 --to openembedded-devel@lists.openembedded.org --subject-prefix='meta-xfce][scarthgap][PATCH' +git send-email -M -1 --to openembedded-devel@lists.openembedded.org --subject-prefix='meta-xfce][styhead][PATCH' Layer maintainer: Armin Kuster diff --git a/sources/meta-openembedded/meta-xfce/conf/layer.conf b/sources/meta-openembedded/meta-xfce/conf/layer.conf index 944bd57d..f131eb27 100644 --- a/sources/meta-openembedded/meta-xfce/conf/layer.conf +++ b/sources/meta-openembedded/meta-xfce/conf/layer.conf @@ -19,7 +19,7 @@ LAYERDEPENDS_xfce-layer += "multimedia-layer" LAYERDEPENDS_xfce-layer += "meta-python" LAYERDEPENDS_xfce-layer += "networking-layer" -LAYERSERIES_COMPAT_xfce-layer = "scarthgap" +LAYERSERIES_COMPAT_xfce-layer = "styhead" SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += "\ openzone->gdk-pixbuf \ diff --git a/sources/meta-openembedded/meta-xfce/recipes-apps/menulibre/menulibre_2.3.2.bb b/sources/meta-openembedded/meta-xfce/recipes-apps/menulibre/menulibre_2.3.2.bb deleted file mode 100644 index 7491b509..00000000 --- a/sources/meta-openembedded/meta-xfce/recipes-apps/menulibre/menulibre_2.3.2.bb +++ /dev/null @@ -1,39 +0,0 @@ -DESCRIPTION = "An advanced menu editor" -HOMEPAGE = "https://bluesabre.org/menulibre/" -SECTION = "x11/graphics" -LICENSE = "GPL-3.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" - -DEPENDS = " \ - python3-distutils-extra-native \ - intltool-native \ -" - -inherit setuptools3_legacy gtk-icon-cache features_check -REQUIRED_DISTRO_FEATURES = "x11 gobject-introspection-data" - -SRC_URI = "git://github.com/bluesabre/menulibre.git;protocol=https;branch=master" -SRCREV = "94bef4060714fa65c7246c25b87410b52a149f94" -S = "${WORKDIR}/git" - -do_compile[noexec] = "1" - -do_install:append() { - sed -i 's:${D}::g' ${D}${datadir}/applications/menulibre.desktop - sed -i 's:share/share:share:g' ${D}${PYTHON_SITEPACKAGES_DIR}/menulibre_lib/menulibreconfig.py -} - -FILES:${PN} += " \ - ${datadir}/applications \ - ${datadir}/metainfo \ - ${datadir}/icons \ -" - -RDEPENDS:${PN} += " \ - gtk+3 \ - gtksourceview3 \ - python3-pygobject \ - gnome-menus \ - python3-unixadmin \ - python3-psutil \ -" diff --git a/sources/meta-openembedded/meta-xfce/recipes-apps/menulibre/menulibre_2.4.0.bb b/sources/meta-openembedded/meta-xfce/recipes-apps/menulibre/menulibre_2.4.0.bb new file mode 100644 index 00000000..71d3ab4d --- /dev/null +++ b/sources/meta-openembedded/meta-xfce/recipes-apps/menulibre/menulibre_2.4.0.bb @@ -0,0 +1,38 @@ +DESCRIPTION = "An advanced menu editor" +HOMEPAGE = "https://bluesabre.org/menulibre/" +SECTION = "x11/graphics" +LICENSE = "GPL-3.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" + +DEPENDS = " \ + python3-distutils-extra-native \ + intltool-native \ +" + +inherit setuptools3_legacy gtk-icon-cache features_check +REQUIRED_DISTRO_FEATURES = "x11 gobject-introspection-data" + +SRC_URI = "https://github.com/bluesabre/${BPN}/releases/download/${BP}/${BP}.tar.gz" +SRC_URI[sha256sum] = "d906acf9cc13b0e15b8e342ae9aab8b0680db336a382d0c42f5d5f465f593c9f" + +do_compile[noexec] = "1" + +do_install:append() { + sed -i 's:${D}::g' ${D}${datadir}/applications/menulibre.desktop + sed -i 's:share/share:share:g' ${D}${PYTHON_SITEPACKAGES_DIR}/menulibre_lib/menulibreconfig.py +} + +FILES:${PN} += " \ + ${datadir}/applications \ + ${datadir}/metainfo \ + ${datadir}/icons \ +" + +RDEPENDS:${PN} += " \ + gtk+3 \ + gtksourceview3 \ + python3-pygobject \ + gnome-menus \ + python3-unixadmin \ + python3-psutil \ +" diff --git a/sources/meta-openembedded/meta-xfce/recipes-art/xfce-dusk-gtk3/xfce-dusk-gtk3_1.3.bb b/sources/meta-openembedded/meta-xfce/recipes-art/xfce-dusk-gtk3/xfce-dusk-gtk3_1.3.bb index a6a1790c..4cbdb4e0 100644 --- a/sources/meta-openembedded/meta-xfce/recipes-art/xfce-dusk-gtk3/xfce-dusk-gtk3_1.3.bb +++ b/sources/meta-openembedded/meta-xfce/recipes-art/xfce-dusk-gtk3/xfce-dusk-gtk3_1.3.bb @@ -4,7 +4,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=8f0e2cd40e05189ec81232da84bd6e1a" inherit allarch -SRC_URI = "https://downloads.yoctoproject.org/mirror/sources/141404-xfce_dusk_gtk3-1_3.tar.gz;subdir=${BPN}-${PV}" +SRC_URI = "http://sources.openembedded.org/141404-xfce_dusk_gtk3-1_3.tar.gz;subdir=${BPN}-${PV}" SRC_URI[md5sum] = "b3ad37ad8173b14ec090e60a80e65d8f" SRC_URI[sha256sum] = "bfa8a88607d1a1da5bd0b9e4e075767c54400a3c5a0fae88b619ed71532f30b4" diff --git a/sources/meta-openembedded/meta-xfce/recipes-multimedia/xfce4-mpc-plugin/xfce4-mpc-plugin_0.5.3.bb b/sources/meta-openembedded/meta-xfce/recipes-multimedia/xfce4-mpc-plugin/xfce4-mpc-plugin_0.5.3.bb index 2d4cdfa4..cd868c24 100644 --- a/sources/meta-openembedded/meta-xfce/recipes-multimedia/xfce4-mpc-plugin/xfce4-mpc-plugin_0.5.3.bb +++ b/sources/meta-openembedded/meta-xfce/recipes-multimedia/xfce4-mpc-plugin/xfce4-mpc-plugin_0.5.3.bb @@ -1,5 +1,5 @@ SUMMARY = "Simple client plugin for Music Player Daemon" -HOMEPAGE = "https://docs.xfce.org/panel-plugins/xfce4-mpc-plugin/start" +HOMEPAGE = "https://goodies.xfce.org/projects/panel-plugins/xfce4-mpc-plugin" SECTION = "x11/application" LICENSE = "0BSD" LIC_FILES_CHKSUM = "file://COPYING;md5=3604d987e6dfdfc672c754d08953b0e0" diff --git a/sources/meta-openembedded/meta-xfce/recipes-multimedia/xfmpc/xfmpc_0.3.1.bb b/sources/meta-openembedded/meta-xfce/recipes-multimedia/xfmpc/xfmpc_0.3.1.bb index 1e02bbe5..73eafeeb 100644 --- a/sources/meta-openembedded/meta-xfce/recipes-multimedia/xfmpc/xfmpc_0.3.1.bb +++ b/sources/meta-openembedded/meta-xfce/recipes-multimedia/xfmpc/xfmpc_0.3.1.bb @@ -13,3 +13,6 @@ RRECOMMENDS:${PN} = "mpd" inherit xfce-app SRC_URI[sha256sum] = "4867d5dd100fa42ab39ebde6c784ec21ee31717f1adb3f4da070dafb3848d96d" + +# Fixes build with GCC-14 which enables incompatible-pointer-types as error +CFLAGS += "-Wno-error=incompatible-pointer-types" diff --git a/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/battery/xfce4-battery-plugin_1.1.5.bb b/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/battery/xfce4-battery-plugin_1.1.5.bb index 16ebebf2..ce119bb6 100644 --- a/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/battery/xfce4-battery-plugin_1.1.5.bb +++ b/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/battery/xfce4-battery-plugin_1.1.5.bb @@ -1,5 +1,5 @@ SUMMARY = "A battery monitor panel plugin for Xfce4, compatible with APM and ACP" -HOMEPAGE = "https://docs.xfce.org/panel-plugins/xfce4-battery-plugin/start" +HOMEPAGE = "https://goodies.xfce.org/projects/panel-plugins/xfce4-battery-plugin" LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" diff --git a/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/calculator/xfce4-calculator-plugin_0.7.2.bb b/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/calculator/xfce4-calculator-plugin_0.7.2.bb index d5ce9ad3..0c464930 100644 --- a/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/calculator/xfce4-calculator-plugin_0.7.2.bb +++ b/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/calculator/xfce4-calculator-plugin_0.7.2.bb @@ -1,5 +1,5 @@ SUMMARY = "A calculator plugin for the Xfce panel" -HOMEPAGE = "https://docs.xfce.org/panel-plugins/xfce4-calculator-plugin/start" +HOMEPAGE = "http://goodies.xfce.org/projects/panel-plugins/xfce4-calculator-plugin" LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=909430f63fddd63f120ba29e8979f65c" diff --git a/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/clipman/xfce4-clipman-plugin_1.6.2.bb b/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/clipman/xfce4-clipman-plugin_1.6.2.bb index 59fb8578..39a8f2ed 100644 --- a/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/clipman/xfce4-clipman-plugin_1.6.2.bb +++ b/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/clipman/xfce4-clipman-plugin_1.6.2.bb @@ -1,5 +1,5 @@ SUMMARY = "Clipman is a clipboard manager for Xfce" -HOMEPAGE = "https://docs.xfce.org/panel-plugins/xfce4-clipman-plugin/start" +HOMEPAGE = "http://goodies.xfce.org/projects/panel-plugins/xfce4-clipman-plugin" SECTION = "x11/application" LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" diff --git a/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/cpufreq/xfce4-cpufreq-plugin_1.2.8.bb b/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/cpufreq/xfce4-cpufreq-plugin_1.2.8.bb index 1a19f488..8ddf48d6 100644 --- a/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/cpufreq/xfce4-cpufreq-plugin_1.2.8.bb +++ b/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/cpufreq/xfce4-cpufreq-plugin_1.2.8.bb @@ -1,5 +1,5 @@ SUMMARY = "Panel plugin to display frequency of all cpus" -HOMEPAGE = "https://docs.xfce.org/panel-plugins/xfce4-cpufreq-plugin/start" +HOMEPAGE = "http://goodies.xfce.org/projects/panel-plugins/xfce4-cpufreq-plugin" LICENSE = "GPL-2.0-or-later" LIC_FILES_CHKSUM = "file://COPYING;md5=1f6f1c0be32491a0c8d2915607a28f36" diff --git a/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/cpugraph/xfce4-cpugraph-plugin_1.2.8.bb b/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/cpugraph/xfce4-cpugraph-plugin_1.2.8.bb index b240eaad..8e581756 100644 --- a/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/cpugraph/xfce4-cpugraph-plugin_1.2.8.bb +++ b/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/cpugraph/xfce4-cpugraph-plugin_1.2.8.bb @@ -1,5 +1,5 @@ SUMMARY = "Panel plugin with graphical representation of the cpu frequency" -HOMEPAGE = "https://docs.xfce.org/panel-plugins/xfce4-cpugraph-plugin/start" +HOMEPAGE = "https://goodies.xfce.org/projects/panel-plugins/xfce4-cpugraph-plugin" LICENSE = "GPL-2.0-or-later" LIC_FILES_CHKSUM = "file://COPYING;md5=415654f59d8fa70fe4eac2c3f86c8f5e" diff --git a/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/datetime/xfce4-datetime-plugin_0.8.3.bb b/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/datetime/xfce4-datetime-plugin_0.8.3.bb index f025edd4..f292a6de 100644 --- a/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/datetime/xfce4-datetime-plugin_0.8.3.bb +++ b/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/datetime/xfce4-datetime-plugin_0.8.3.bb @@ -1,5 +1,5 @@ SUMMARY = "Panel plugin displaying date and time and a calendar when left-clicked" -HOMEPAGE = "https://docs.xfce.org/panel-plugins/xfce4-datetime-plugin/start" +HOMEPAGE = "https://goodies.xfce.org/projects/panel-plugins/xfce4-datetime-plugin" LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" diff --git a/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/diskperf/xfce4-diskperf-plugin_2.7.0.bb b/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/diskperf/xfce4-diskperf-plugin_2.7.0.bb index 583aa9a0..25a57f32 100644 --- a/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/diskperf/xfce4-diskperf-plugin_2.7.0.bb +++ b/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/diskperf/xfce4-diskperf-plugin_2.7.0.bb @@ -1,5 +1,5 @@ SUMMARY = "Panel plugin displaying instant disk/partition performance" -HOMEPAGE = "https://docs.xfce.org/panel-plugins/xfce4-diskperf-plugin/start" +HOMEPAGE = "https://goodies.xfce.org/projects/panel-plugins/xfce4-diskperf-plugin" LICENSE = "BSD-2-Clause" LIC_FILES_CHKSUM = "file://COPYING;md5=d3e627798d6a60bece47aa8b3532e1f1" diff --git a/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/eyes/xfce4-eyes-plugin_4.6.0.bb b/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/eyes/xfce4-eyes-plugin_4.6.0.bb index 6eaac70a..0c796534 100644 --- a/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/eyes/xfce4-eyes-plugin_4.6.0.bb +++ b/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/eyes/xfce4-eyes-plugin_4.6.0.bb @@ -1,5 +1,5 @@ SUMMARY = "Panel plugin with graphical representation of the cpu frequency" -HOMEPAGE = "https://docs.xfce.org/panel-plugins/xfce4-eyes-plugin/start" +HOMEPAGE = "http://goodies.xfce.org/projects/panel-plugins/xfce4-eyes-plugin" LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" diff --git a/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/fsguard/xfce4-fsguard-plugin_1.1.3.bb b/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/fsguard/xfce4-fsguard-plugin_1.1.3.bb index de8d6786..380d2e19 100644 --- a/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/fsguard/xfce4-fsguard-plugin_1.1.3.bb +++ b/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/fsguard/xfce4-fsguard-plugin_1.1.3.bb @@ -1,5 +1,5 @@ DESCRIPTION = "The FSGuard panel plugin checks free space on a chosen mount point frequently and displays a message when a limit is reached" -HOMEPAGE = "https://docs.xfce.org/panel-plugins/xfce4-fsguard-plugin/start" +HOMEPAGE = "https://goodies.xfce.org/projects/panel-plugins/xfce4-fsguard-plugin" LICENSE = "BSD-2-Clause" LIC_FILES_CHKSUM = "file://COPYING;md5=3434d79d62df09abf5f78bb76d6cd21b" diff --git a/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/genmon/xfce4-genmon-plugin_4.2.0.bb b/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/genmon/xfce4-genmon-plugin_4.2.0.bb index 6558a149..31ad5e7c 100644 --- a/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/genmon/xfce4-genmon-plugin_4.2.0.bb +++ b/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/genmon/xfce4-genmon-plugin_4.2.0.bb @@ -1,5 +1,5 @@ DESCRIPTION = "This plugin cyclically spawns the indicated script/program, captures its output (stdout) and displays the resulting string into the panel." -HOMEPAGE = "https://docs.xfce.org/panel-plugins/xfce4-genmon-plugin/start" +HOMEPAGE = "http://goodies.xfce.org/projects/panel-plugins/xfce4-genmon-plugin" LICENSE = "LGPL-2.1-only" LIC_FILES_CHKSUM = "file://COPYING;md5=4b54a1fd55a448865a0b32d41598759d" diff --git a/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/mailwatch/xfce4-mailwatch-plugin_1.3.1.bb b/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/mailwatch/xfce4-mailwatch-plugin_1.3.1.bb index d6b367c0..6ea26076 100644 --- a/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/mailwatch/xfce4-mailwatch-plugin_1.3.1.bb +++ b/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/mailwatch/xfce4-mailwatch-plugin_1.3.1.bb @@ -1,5 +1,5 @@ SUMMARY = "Multi-protocol, multi-mailbox mail watcher for the Xfce4 panel" -HOMEPAGE = "https://docs.xfce.org/panel-plugins/xfce4-mailwatch-plugin/start" +HOMEPAGE = "http://goodies.xfce.org/projects/panel-plugins/xfce4-mailwatch-plugin" LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" diff --git a/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/mount/xfce4-mount-plugin_1.1.5.bb b/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/mount/xfce4-mount-plugin_1.1.5.bb index f11e41f9..3a6baf21 100644 --- a/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/mount/xfce4-mount-plugin_1.1.5.bb +++ b/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/mount/xfce4-mount-plugin_1.1.5.bb @@ -1,5 +1,5 @@ SUMMARY = "Mount/umount utility for the xfce panel" -HOMEPAGE = "https://docs.xfce.org/panel-plugins/xfce4-mount-plugin/start" +HOMEPAGE = "http://goodies.xfce.org/projects/panel-plugins/xfce4-mount-plugin" SECTION = "x11/application" LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" diff --git a/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/netload/xfce4-netload-plugin_1.4.1.bb b/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/netload/xfce4-netload-plugin_1.4.1.bb index 6ed47475..c30f17a7 100644 --- a/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/netload/xfce4-netload-plugin_1.4.1.bb +++ b/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/netload/xfce4-netload-plugin_1.4.1.bb @@ -1,5 +1,5 @@ SUMMARY = "Panel plugin displaying current load of the network interfaces" -HOMEPAGE = "https://docs.xfce.org/panel-plugins/xfce4-netload-plugin/start" +HOMEPAGE = "https://goodies.xfce.org/projects/panel-plugins/xfce4-netload-plugin" LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=2b6065ae7d3696cdad6869dd8627a9fe" diff --git a/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/notes/xfce4-notes-plugin_1.10.0.bb b/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/notes/xfce4-notes-plugin_1.10.0.bb deleted file mode 100644 index 3895cb9b..00000000 --- a/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/notes/xfce4-notes-plugin_1.10.0.bb +++ /dev/null @@ -1,10 +0,0 @@ -SUMMARY = "Notes plugin for the Xfce Panel" -HOMEPAGE = "https://docs.xfce.org/panel-plugins/xfce4-notes-plugin/start" -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" - -inherit xfce-panel-plugin - -DEPENDS += "gtk+3 libxfce4ui xfce4-panel xfconf" - -SRC_URI[sha256sum] = "2ee4406042edd352a91e166c83b60d13220ef04dce3fa6b9e0eb13636d636929" diff --git a/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/notes/xfce4-notes-plugin_1.11.0.bb b/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/notes/xfce4-notes-plugin_1.11.0.bb new file mode 100644 index 00000000..0262620e --- /dev/null +++ b/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/notes/xfce4-notes-plugin_1.11.0.bb @@ -0,0 +1,14 @@ +SUMMARY = "Notes plugin for the Xfce Panel" +HOMEPAGE = "http://goodies.xfce.org/projects/panel-plugins/xfce4-notes-plugin" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +inherit xfce-panel-plugin + +DEPENDS += "gtk+3 libxfce4ui xfce4-panel xfconf" + +CFLAGS += "-Wno-error=incompatible-pointer-types" +SRC_URI[sha256sum] = "eb38246deb0fc89535fa9ff9b953c762cece232b5585d8210fab9abbf282aae3" + +# Add /usr/share/xfce4/notes/gtk-3.0/gtk.css +FILES:${PN} += "${datadir}/xfce4/notes" diff --git a/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/places/xfce4-places-plugin_1.8.3.bb b/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/places/xfce4-places-plugin_1.8.3.bb index 753dcae9..6400e0d3 100644 --- a/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/places/xfce4-places-plugin_1.8.3.bb +++ b/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/places/xfce4-places-plugin_1.8.3.bb @@ -1,6 +1,6 @@ SUMMARY = "Menu for quick access to folders, documents and removable media" DESCRIPTION = "Panel plugin displaying menu with quick access to folders, documents and removable media" -HOMEPAGE = "https://docs.xfce.org/panel-plugins/xfce4-places-plugin/start" +HOMEPAGE = "https://goodies.xfce.org/projects/panel-plugins/xfce4-places-plugin" LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=b6952d9a47fc2ad0f315510e1290455f" diff --git a/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/sensors/xfce4-sensors-plugin_1.4.4.bb b/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/sensors/xfce4-sensors-plugin_1.4.4.bb index ba3c83a1..eb1165c5 100644 --- a/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/sensors/xfce4-sensors-plugin_1.4.4.bb +++ b/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/sensors/xfce4-sensors-plugin_1.4.4.bb @@ -1,5 +1,5 @@ SUMMARY = "Sensors plugin for the Xfce Panel" -HOMEPAGE = "https://docs.xfce.org/panel-plugins/xfce4-sensors-plugin/start" +HOMEPAGE = "http://goodies.xfce.org/projects/panel-plugins/xfce4-sensors-plugin" LICENSE = "GPL-2.0-or-later" LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" diff --git a/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/smartbookmark/xfce4-smartbookmark-plugin_0.5.2.bb b/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/smartbookmark/xfce4-smartbookmark-plugin_0.5.2.bb index 68e9cbd3..fdec5981 100644 --- a/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/smartbookmark/xfce4-smartbookmark-plugin_0.5.2.bb +++ b/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/smartbookmark/xfce4-smartbookmark-plugin_0.5.2.bb @@ -1,5 +1,5 @@ SUMMARY = "Panel plugin allowing to send requests directly to browser" -HOMEPAGE = "https://docs.xfce.org/panel-plugins/xfce4-smartbookmark-plugin/start" +HOMEPAGE = "https://goodies.xfce.org/projects/panel-plugins/xfce4-smartbookmark-plugin" LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" diff --git a/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/systemload/xfce4-systemload-plugin_1.3.2.bb b/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/systemload/xfce4-systemload-plugin_1.3.2.bb index 0b07bda3..e7a3e993 100644 --- a/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/systemload/xfce4-systemload-plugin_1.3.2.bb +++ b/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/systemload/xfce4-systemload-plugin_1.3.2.bb @@ -1,5 +1,5 @@ DESCRIPTION = "Panel plugin displaying current CPU load, the memory in use, the swap space and the system uptime" -HOMEPAGE = "https://docs.xfce.org/panel-plugins/xfce4-systemload-plugin/start" +HOMEPAGE = "https://goodies.xfce.org/projects/panel-plugins/xfce4-systemload-plugin" LICENSE = "BSD-2-Clause" LIC_FILES_CHKSUM = "file://COPYING;md5=9acb172a93ff6c43cce2aff790a8aef8" diff --git a/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/time-out/xfce4-time-out-plugin_1.1.3.bb b/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/time-out/xfce4-time-out-plugin_1.1.3.bb index 1622cd4d..9fa287a1 100644 --- a/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/time-out/xfce4-time-out-plugin_1.1.3.bb +++ b/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/time-out/xfce4-time-out-plugin_1.1.3.bb @@ -1,5 +1,5 @@ SUMMARY = "This plugin makes it possible to take periodical breaks" -HOMEPAGE = "https://docs.xfce.org/panel-plugins/xfce4-time-out-plugin/start" +HOMEPAGE = "https://goodies.xfce.org/projects/panel-plugins/xfce4-time-out-plugin" SECTION = "x11/application" LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" diff --git a/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/timer/xfce4-timer-plugin_1.7.2.bb b/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/timer/xfce4-timer-plugin_1.7.2.bb index 0f164b79..33b60438 100644 --- a/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/timer/xfce4-timer-plugin_1.7.2.bb +++ b/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/timer/xfce4-timer-plugin_1.7.2.bb @@ -1,6 +1,6 @@ SUMMARY = "XFCE panel plugin to generate alarm messages" DESCRIPTION = "This is a simple plugin that lets the user run an alarm at a specified time or at the end of a specified countdown period" -HOMEPAGE = "https://docs.xfce.org/panel-plugins/xfce4-timer-plugin/start" +HOMEPAGE = "http://goodies.xfce.org/projects/panel-plugins/xfce4-timer-plugin" LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=f1c52159bdaebd029cb11927cbe709e4" diff --git a/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/verve/xfce4-verve-plugin_2.0.3.bb b/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/verve/xfce4-verve-plugin_2.0.3.bb index 844d8caf..9dcaae8c 100644 --- a/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/verve/xfce4-verve-plugin_2.0.3.bb +++ b/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/verve/xfce4-verve-plugin_2.0.3.bb @@ -1,5 +1,5 @@ SUMMARY = "Verve panel plugin is a comfortable command line plugin for the Xfce panel" -HOMEPAGE = "https://docs.xfce.org/panel-plugins/xfce4-verve-plugin/start" +HOMEPAGE = "http://goodies.xfce.org/projects/panel-plugins/xfce4-verve-plugin" LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" diff --git a/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/wavelan/xfce4-wavelan-plugin_0.6.3.bb b/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/wavelan/xfce4-wavelan-plugin_0.6.3.bb index 64e7ea6a..530f5242 100644 --- a/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/wavelan/xfce4-wavelan-plugin_0.6.3.bb +++ b/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/wavelan/xfce4-wavelan-plugin_0.6.3.bb @@ -1,5 +1,5 @@ SUMMARY = "Panel plugin displaying stats from a wireless lan interface" -HOMEPAGE = "https://docs.xfce.org/panel-plugins/xfce4-wavelan-plugin/start" +HOMEPAGE = "https://goodies.xfce.org/projects/panel-plugins/xfce4-wavelan-plugin" LICENSE = "BSD-2-Clause" LIC_FILES_CHKSUM = "file://COPYING;md5=e1e5872df9c5cf1a23f16493d9104920" diff --git a/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/weather/xfce4-weather-plugin_0.11.1.bb b/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/weather/xfce4-weather-plugin_0.11.1.bb index 87b82695..858bd545 100644 --- a/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/weather/xfce4-weather-plugin_0.11.1.bb +++ b/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/weather/xfce4-weather-plugin_0.11.1.bb @@ -1,5 +1,5 @@ SUMMARY = "Panel plugin to display current temperature and weather condition" -HOMEPAGE = "https://docs.xfce.org/panel-plugins/xfce4-weather-plugin/start" +HOMEPAGE = "http://goodies.xfce.org/projects/panel-plugins/xfce4-weather-plugin" LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" diff --git a/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/xkb/xfce4-xkb-plugin_0.8.2.bb b/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/xkb/xfce4-xkb-plugin_0.8.2.bb index 0e482af3..3d935a3d 100644 --- a/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/xkb/xfce4-xkb-plugin_0.8.2.bb +++ b/sources/meta-openembedded/meta-xfce/recipes-panel-plugins/xkb/xfce4-xkb-plugin_0.8.2.bb @@ -1,5 +1,5 @@ SUMMARY = "XKB layout switching panel plug-in for the Xfce desktop environment" -HOMEPAGE = "https://docs.xfce.org/panel-plugins/xfce4-xkb-plugin/start" +HOMEPAGE = "http://goodies.xfce.org/projects/panel-plugins/xfce4-xkb-plugin" SECTION = "x11/application" LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=496f09f084b0f7e6f02f769a84490c6b" diff --git a/sources/meta-openembedded/meta-xfce/recipes-thunar-plugins/archive/thunar-archive-plugin_0.5.2.bb b/sources/meta-openembedded/meta-xfce/recipes-thunar-plugins/archive/thunar-archive-plugin_0.5.2.bb index 0ba997b5..91b3efa8 100644 --- a/sources/meta-openembedded/meta-xfce/recipes-thunar-plugins/archive/thunar-archive-plugin_0.5.2.bb +++ b/sources/meta-openembedded/meta-xfce/recipes-thunar-plugins/archive/thunar-archive-plugin_0.5.2.bb @@ -1,5 +1,5 @@ DESCRIPTION = "Thunar Archive Plugin allows you to create and extract archive files using file context menus in Thunar" -HOMEPAGE = "https://docs.xfce.org/xfce/thunar/archive" +HOMEPAGE = "http://goodies.xfce.org/projects/thunar-plugins/thunar-archive-plugin" LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=4cf66a4984120007c9881cc871cf49db" diff --git a/sources/meta-openembedded/meta-xfce/recipes-xfce/packagegroups/packagegroup-xfce-extended.bb b/sources/meta-openembedded/meta-xfce/recipes-xfce/packagegroups/packagegroup-xfce-extended.bb index f2e04f79..500719a8 100644 --- a/sources/meta-openembedded/meta-xfce/recipes-xfce/packagegroups/packagegroup-xfce-extended.bb +++ b/sources/meta-openembedded/meta-xfce/recipes-xfce/packagegroups/packagegroup-xfce-extended.bb @@ -49,7 +49,7 @@ RRECOMMENDS:${PN} = " \ xfce4-verve-plugin \ \ ${@bb.utils.contains('DISTRO_FEATURES','polkit','xfce-polkit','',d)} \ - ${@bb.utils.contains("DISTRO_FEATURES", "bluetooth gobject-introspection", "blueman", "", d)} \ + ${@bb.utils.contains("DISTRO_FEATURES", "bluetooth gobject-introspection-data", "blueman", "", d)} \ \ thunar-media-tags-plugin \ thunar-archive-plugin \ diff --git a/sources/meta-openembedded/meta-xfce/recipes-xfce/xfce4-panel/xfce4-panel_4.18.3.bb b/sources/meta-openembedded/meta-xfce/recipes-xfce/xfce4-panel/xfce4-panel_4.18.3.bb deleted file mode 100644 index 7e707544..00000000 --- a/sources/meta-openembedded/meta-xfce/recipes-xfce/xfce4-panel/xfce4-panel_4.18.3.bb +++ /dev/null @@ -1,44 +0,0 @@ -SUMMARY = "Xfce4 Panel" -SECTION = "x11" -LICENSE = "GPL-2.0-or-later" -LIC_FILES_CHKSUM = "file://COPYING;md5=26a8bd75d8f8498bdbbe64a27791d4ee" -DEPENDS = "garcon exo gtk+3 cairo virtual/libx11 libxml2 libwnck3 vala-native" - -inherit xfce gtk-doc gobject-introspection features_check mime-xdg - -# xfce4 depends on libwnck3, gtk+3 and libepoxy need to be built with x11 PACKAGECONFIG. -# cairo would at least needed to be built with xlib. -ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" - -SRC_URI += " \ - file://0001-windowmenu-do-not-display-desktop-icon-when-no-windo.patch \ - file://0002-use-lxdm-to-replace-dm-tool.patch \ -" -SRC_URI[sha256sum] = "4ae0b8615c9811194bbda0172a63567ed7fdb5519ea48f7a4637f4e6e5365e1b" - -EXTRA_OECONF += "--disable-vala" - -python populate_packages:prepend() { - plugin_dir = d.expand('${libdir}/xfce4/panel/plugins/') - plugin_name = d.expand('${PN}-plugin-%s') - do_split_packages(d, plugin_dir, r'^lib(.*)\.so$', plugin_name, - '${PN} plugin for %s', extra_depends='', prepend=True, - aux_files_pattern=['${datadir}/xfce4/panel/plugins/%s.desktop', - '${sysconfdir}/xdg/xfce/panel/%s-*', - '${datadir}/icons/hicolor/48x48/apps/*-%s.png', - '${bindir}/*%s*']) -} - -PACKAGES_DYNAMIC += "^${PN}-plugin-.*" - -PACKAGES =+ "${PN}-gtk3" - -FILES:${PN} += "${libdir}/xfce4/panel/migrate \ - ${libdir}/xfce4/panel/wrapper-1.0" - -FILES:${PN}-dev += "${libdir}/xfce4/panel/plugins/*.la" - -FILES:${PN}-gtk3 = " \ - ${libdir}/libxfce4panel-2.0${SOLIBS} \ - ${libdir}/xfce4/panel/wrapper-2.0 \ -" diff --git a/sources/meta-openembedded/meta-xfce/recipes-xfce/xfce4-panel/xfce4-panel_4.18.5.bb b/sources/meta-openembedded/meta-xfce/recipes-xfce/xfce4-panel/xfce4-panel_4.18.5.bb new file mode 100644 index 00000000..8e4e4966 --- /dev/null +++ b/sources/meta-openembedded/meta-xfce/recipes-xfce/xfce4-panel/xfce4-panel_4.18.5.bb @@ -0,0 +1,44 @@ +SUMMARY = "Xfce4 Panel" +SECTION = "x11" +LICENSE = "GPL-2.0-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=26a8bd75d8f8498bdbbe64a27791d4ee" +DEPENDS = "garcon exo gtk+3 cairo virtual/libx11 libxml2 libwnck3 vala-native" + +inherit xfce gtk-doc gobject-introspection features_check mime-xdg + +# xfce4 depends on libwnck3, gtk+3 and libepoxy need to be built with x11 PACKAGECONFIG. +# cairo would at least needed to be built with xlib. +ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" + +SRC_URI += " \ + file://0001-windowmenu-do-not-display-desktop-icon-when-no-windo.patch \ + file://0002-use-lxdm-to-replace-dm-tool.patch \ +" +SRC_URI[sha256sum] = "b20e0d10cc5149a601d8eee07373efb446ea3e179dd032ed8ddb5782e3f9e7cb" + +EXTRA_OECONF += "--disable-vala" + +python populate_packages:prepend() { + plugin_dir = d.expand('${libdir}/xfce4/panel/plugins/') + plugin_name = d.expand('${PN}-plugin-%s') + do_split_packages(d, plugin_dir, r'^lib(.*)\.so$', plugin_name, + '${PN} plugin for %s', extra_depends='', prepend=True, + aux_files_pattern=['${datadir}/xfce4/panel/plugins/%s.desktop', + '${sysconfdir}/xdg/xfce/panel/%s-*', + '${datadir}/icons/hicolor/48x48/apps/*-%s.png', + '${bindir}/*%s*']) +} + +PACKAGES_DYNAMIC += "^${PN}-plugin-.*" + +PACKAGES =+ "${PN}-gtk3" + +FILES:${PN} += "${libdir}/xfce4/panel/migrate \ + ${libdir}/xfce4/panel/wrapper-1.0" + +FILES:${PN}-dev += "${libdir}/xfce4/panel/plugins/*.la" + +FILES:${PN}-gtk3 = " \ + ${libdir}/libxfce4panel-2.0${SOLIBS} \ + ${libdir}/xfce4/panel/wrapper-2.0 \ +" diff --git a/sources/meta-openembedded/meta-xfce/recipes-xfce/xfce4-power-manager/xfce4-power-manager_4.18.1.bb b/sources/meta-openembedded/meta-xfce/recipes-xfce/xfce4-power-manager/xfce4-power-manager_4.18.1.bb index cfb7a26a..f7f72356 100644 --- a/sources/meta-openembedded/meta-xfce/recipes-xfce/xfce4-power-manager/xfce4-power-manager_4.18.1.bb +++ b/sources/meta-openembedded/meta-xfce/recipes-xfce/xfce4-power-manager/xfce4-power-manager_4.18.1.bb @@ -1,5 +1,5 @@ SUMMARY = "Power manager for the Xfce desktop environment" -HOMEPAGE = "https://docs.xfce.org/xfce/xfce4-power-manager/start" +HOMEPAGE = "http://goodies.xfce.org/projects/applications/xfce4-power-manager" SECTION = "x11" LICENSE = "GPL-2.0-or-later" diff --git a/sources/meta-openembedded/meta-xfce/recipes-xfce/xfwm4/xfwm4/xfwm4-fix-incompatible-pointer-type-error.patch b/sources/meta-openembedded/meta-xfce/recipes-xfce/xfwm4/xfwm4/xfwm4-fix-incompatible-pointer-type-error.patch new file mode 100644 index 00000000..3e2ffe23 --- /dev/null +++ b/sources/meta-openembedded/meta-xfce/recipes-xfce/xfwm4/xfwm4/xfwm4-fix-incompatible-pointer-type-error.patch @@ -0,0 +1,38 @@ +Fix xfwm4 incompatible pointer type error: + +| ../../xfwm4-4.18.0/src/startup_notification.c:139:57: error: passing argument 2 of 'sn_startup_sequence_get_last_active_time' from incompatible pointer type [-Wincompatible-pointer-types] +| 139 | sn_startup_sequence_get_last_active_time (sequence, &l_sec, &l_usec); +| | ^~~~~~ +| | | +| | long int * +| In file included from .../usr/include/startup-notification-1.0/libsn/sn.h:32, +| from ../../xfwm4-4.18.0/src/startup_notification.c:33: +| .../usr/include/startup-notification-1.0/libsn/sn-monitor.h:84:79: note: expected 'time_t *' {aka 'long long int *'} but argument is of type 'long int *' +| 84 | time_t *tv_sec, +| | ~~~~~~~~~~~~~~~~~~~^~~~~~ + +It is caused by a patch of startup-notification in oe-core which is +backported from upstream mailllist and changes the signature of function +sn_startup_sequence_get_last_active_time(). + +Upstream-Status: Inappropriate [oe-specific] + +Signed-off-by: Kai Kang + +--- + src/startup_notification.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/startup_notification.c b/src/startup_notification.c +index 2a08cad..05434ca 100644 +--- a/src/startup_notification.c ++++ b/src/startup_notification.c +@@ -136,7 +136,7 @@ sn_collect_timed_out_foreach (void *element, void *data) + + sequence = element; + ctod = (CollectTimedOutData *) data; +- sn_startup_sequence_get_last_active_time (sequence, &l_sec, &l_usec); ++ sn_startup_sequence_get_last_active_time (sequence, (time_t *)&l_sec, &l_usec); + tv_sec = l_sec; tv_usec = l_usec; + + elapsed = ((double) ctod->now - (tv_sec * G_USEC_PER_SEC) - tv_usec) diff --git a/sources/meta-openembedded/meta-xfce/recipes-xfce/xfwm4/xfwm4_4.18.0.bb b/sources/meta-openembedded/meta-xfce/recipes-xfce/xfwm4/xfwm4_4.18.0.bb index 839f1c87..2770829e 100644 --- a/sources/meta-openembedded/meta-xfce/recipes-xfce/xfwm4/xfwm4_4.18.0.bb +++ b/sources/meta-openembedded/meta-xfce/recipes-xfce/xfwm4/xfwm4_4.18.0.bb @@ -8,6 +8,8 @@ inherit xfce update-alternatives features_check REQUIRED_DISTRO_FEATURES = "x11" +SRC_URI += "file://xfwm4-fix-incompatible-pointer-type-error.patch" + SRC_URI[sha256sum] = "92cd1b889bb25cb4bc06c1c6736c238d96e79c1e706b9f77fad0a89d6e5fc13f" PACKAGECONFIG ?= " \ diff --git a/sources/meta-raspberrypi/.github/workflows/docker-images/yocto-builder/Dockerfile b/sources/meta-raspberrypi/.github/workflows/docker-images/yocto-builder/Dockerfile index 728b473d..e06e02a6 100644 --- a/sources/meta-raspberrypi/.github/workflows/docker-images/yocto-builder/Dockerfile +++ b/sources/meta-raspberrypi/.github/workflows/docker-images/yocto-builder/Dockerfile @@ -5,7 +5,7 @@ FROM ubuntu:22.04 ARG DEBIAN_FRONTEND="noninteractive" -RUN apt-get update -q -y +RUN apt-get update -qq RUN apt-get install -y eatmydata # Yocto/OE build host dependencies diff --git a/sources/meta-raspberrypi/.subproject b/sources/meta-raspberrypi/.subproject index 4d5672cc..065b0ff9 100644 --- a/sources/meta-raspberrypi/.subproject +++ b/sources/meta-raspberrypi/.subproject @@ -1,4 +1,4 @@ [upstream] - object-id = 3afc9728b1f4ba0f5be1af34883d6582966133a1 - revision = refs/heads/scarthgap + object-id = 3c464de8c69f697cd8dfa068f363e9a9dc965603 + revision = styhead url = https://git.yoctoproject.org/meta-raspberrypi diff --git a/sources/meta-raspberrypi/README.md b/sources/meta-raspberrypi/README.md index f00d1514..6b160819 100644 --- a/sources/meta-raspberrypi/README.md +++ b/sources/meta-raspberrypi/README.md @@ -48,7 +48,7 @@ OpenEmbedded/Yocto distributions and layer stacks, such as: This layer is officially approved as part of the `Yocto Project Compatible Layers Program`. You can find details of that on the official Yocto Project -[website](https://www.yoctoproject.org/software-overview/layers/?searchTerm=meta-raspberrypi). +[website](https://www.yoctoproject.org/development/yocto-project-compatible-layers/). ## Dependencies @@ -81,7 +81,7 @@ a section as follows: local_conf_header: rpi-specific: | ENABLE_I2C = "1" - RPI_EXTRA_CONFIG = "dtoverlay=pi3-disable-bt" + RPI_EXTRA_CONFIG = "dtoverlay=disable-bt" ``` To configure the machine, you have to update the `machine` variable. diff --git a/sources/meta-raspberrypi/SECURITY.md b/sources/meta-raspberrypi/SECURITY.md new file mode 100644 index 00000000..ca3ad0a8 --- /dev/null +++ b/sources/meta-raspberrypi/SECURITY.md @@ -0,0 +1,20 @@ +How to Report a Potential Vulnerability? +======================================== + +If you would like to report a public issue (for example, one with a released +CVE number), please report it via GitHub issues: + + https://github.com/agherzan/meta-raspberrypi/issues/new/choose + +If you are dealing with a not-yet released or urgent issue, please send a +message to one of the maintainers listed in the [README.md](https://github.com/agherzan/meta-raspberrypi/blob/master/README.md). Include as many +details as possible: + - the layer or software module affected + - the recipe and its version + - any example code, if available + +Branches maintained with security fixes +--------------------------------------- + +See https://wiki.yoctoproject.org/wiki/Releases for the list of current +releases. We only accept patches for the LTS releases and the master branch. diff --git a/sources/meta-raspberrypi/conf/layer.conf b/sources/meta-raspberrypi/conf/layer.conf index deea4a1a..cdf81125 100644 --- a/sources/meta-raspberrypi/conf/layer.conf +++ b/sources/meta-raspberrypi/conf/layer.conf @@ -9,11 +9,8 @@ BBFILE_COLLECTIONS += "raspberrypi" BBFILE_PATTERN_raspberrypi := "^${LAYERDIR}/" BBFILE_PRIORITY_raspberrypi = "9" -LAYERSERIES_COMPAT_raspberrypi = "nanbield scarthgap" +LAYERSERIES_COMPAT_raspberrypi = "styhead walnascar" LAYERDEPENDS_raspberrypi = "core" -# Recommended for u-boot support for raspberrypi5 -# https://git.yoctoproject.org/meta-lts-mixins 'scarthgap/u-boot' branch -LAYERRECOMMENDS_raspberrypi = "lts-u-boot-mixin" # Additional license directories. LICENSE_PATH += "${LAYERDIR}/files/custom-licenses" @@ -23,11 +20,6 @@ LICENSE_PATH += "${LAYERDIR}/files/custom-licenses" # # The .bbappend and .bb files are included if the respective layer # collection is available. -BBFILES += "${@' '.join('${LAYERDIR}/dynamic-layers/%s/recipes*/*/*.bbappend' % layer \ - for layer in BBFILE_COLLECTIONS.split())}" -BBFILES += "${@' '.join('${LAYERDIR}/dynamic-layers/%s/recipes*/*/*.bb' % layer \ - for layer in BBFILE_COLLECTIONS.split())}" - BBFILES_DYNAMIC += " \ openembedded-layer:${LAYERDIR}/dynamic-layers/openembedded-layer/*/*/*.bb \ openembedded-layer:${LAYERDIR}/dynamic-layers/openembedded-layer/*/*/*.bbappend \ @@ -37,6 +29,8 @@ BBFILES_DYNAMIC += " \ qt5-layer:${LAYERDIR}/dynamic-layers/qt5-layer/*/*/*.bbappend \ multimedia-layer:${LAYERDIR}/dynamic-layers/multimedia-layer/*/*/*.bb \ multimedia-layer:${LAYERDIR}/dynamic-layers/multimedia-layer/*/*/*.bbappend \ + meta-python:${LAYERDIR}/dynamic-layers/meta-python/*/*/*.bb \ + meta-python:${LAYERDIR}/dynamic-layers/meta-python/*/*/*.bbappend \ " DEFAULT_TEST_SUITES:remove:rpi = "parselogs" diff --git a/sources/meta-raspberrypi/conf/machine/include/rpi-base.inc b/sources/meta-raspberrypi/conf/machine/include/rpi-base.inc index ddebacc3..aa0ec986 100644 --- a/sources/meta-raspberrypi/conf/machine/include/rpi-base.inc +++ b/sources/meta-raspberrypi/conf/machine/include/rpi-base.inc @@ -18,7 +18,9 @@ RPI_KERNEL_DEVICETREE_OVERLAYS ?= " \ overlays/overlay_map.dtb \ overlays/at86rf233.dtbo \ overlays/disable-bt.dtbo \ + overlays/disable-bt-pi5.dtbo \ overlays/disable-wifi.dtbo \ + overlays/disable-wifi-pi5.dtbo \ overlays/dwc2.dtbo \ overlays/gpio-ir.dtbo \ overlays/gpio-ir-tx.dtbo \ diff --git a/sources/meta-raspberrypi/conf/machine/include/rpi-default-providers.inc b/sources/meta-raspberrypi/conf/machine/include/rpi-default-providers.inc index 3f810264..c02d2487 100644 --- a/sources/meta-raspberrypi/conf/machine/include/rpi-default-providers.inc +++ b/sources/meta-raspberrypi/conf/machine/include/rpi-default-providers.inc @@ -7,10 +7,6 @@ PREFERRED_PROVIDER_virtual/libgles2 ?= "${@bb.utils.contains("MACHINE_FEATURES", PREFERRED_PROVIDER_virtual/libgl ?= "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "mesa", "mesa-gl", d)}" PREFERRED_PROVIDER_virtual/mesa ?= "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "mesa", "mesa-gl", d)}" PREFERRED_PROVIDER_virtual/libgbm ?= "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "mesa", "mesa-gl", d)}" -PREFERRED_PROVIDER_vlc ?= "rpidistro-vlc" -PREFERRED_PROVIDER_ffmpeg ?= "rpidistro-ffmpeg" -PREFERRED_PROVIDER_libav ?= "rpidistro-ffmpeg" -PREFERRED_PROVIDER_libpostproc ?= "rpidistro-ffmpeg" PREFERRED_PROVIDER_jpeg ?= "jpeg" PREFERRED_PROVIDER_virtual/libomxil ?= "userland" diff --git a/sources/meta-raspberrypi/docs/extra-build-config.md b/sources/meta-raspberrypi/docs/extra-build-config.md index dfb86f16..fa971574 100644 --- a/sources/meta-raspberrypi/docs/extra-build-config.md +++ b/sources/meta-raspberrypi/docs/extra-build-config.md @@ -178,6 +178,7 @@ the following boards: * Raspberry Pi 3 64-bit * Raspberry Pi 4 32-bit * Raspberry Pi 4 64-bit + It means that, for those boards, `RPI_USE_U_BOOT = "1"` is not compatible with `ENABLE_UART = "0"`. @@ -487,14 +488,15 @@ MMAL is not enabled by default. To enable it add DISABLE_VC4GRAPHICS = "1" -to `local.conf`. Adding `vlc` to `IMAGE_INSTALL` will then default to building the Raspberry -Pi's Distro implementation of VLC with HW accelerated video decode through MMAL into the system -image. It also defaults to building VLC with Raspberry PI's Distro implementation of ffmpeg. The -oe-core implementation of ffmpeg and the meta-openembedded/meta-multimedia implementation of VLC -can however be selected via: +to `local.conf`. Adding `vlc` to `IMAGE_INSTALL` will then default to building the oe-core +implementation of ffmpeg and the meta-openembedded/meta-multimedia implementation of VLC. +The Raspberry Pi's Distro implementation of VLC with HW accelerated video decode through +MMAL and the Raspberry PI's Distro implementation of ffmpeg. Can however be selected via: - PREFERRED_PROVIDER_ffmpeg = "ffmpeg" - PREFERRED_PROVIDER_vlc = "vlc" + PREFERRED_PROVIDER_vlc = "rpidistro-vlc" + PREFERRED_PROVIDER_ffmpeg = "rpidistro-ffmpeg" + PREFERRED_PROVIDER_libav = "rpidistro-ffmpeg" + PREFERRED_PROVIDER_libpostproc = "rpidistro-ffmpeg" Usage example: Start VLC with mmal_vout plugin and without an active display server. diff --git a/sources/meta-raspberrypi/docs/layer-contents.md b/sources/meta-raspberrypi/docs/layer-contents.md index 3882339d..78d66e3d 100644 --- a/sources/meta-raspberrypi/docs/layer-contents.md +++ b/sources/meta-raspberrypi/docs/layer-contents.md @@ -11,6 +11,7 @@ * raspberrypi3-64 (64 bit kernel & userspace) * raspberrypi4 * raspberrypi4-64 (64 bit kernel & userspace) +* raspberrypi5 * raspberrypi-cm (dummy alias for raspberrypi) * raspberrypi-cm3 diff --git a/sources/meta-raspberrypi/dynamic-layers/multimedia-layer/recipes-multimedia/libcamera/libcamera_%.bbappend b/sources/meta-raspberrypi/dynamic-layers/multimedia-layer/recipes-multimedia/libcamera/libcamera_%.bbappend index 541c49cd..c152b780 100644 --- a/sources/meta-raspberrypi/dynamic-layers/multimedia-layer/recipes-multimedia/libcamera/libcamera_%.bbappend +++ b/sources/meta-raspberrypi/dynamic-layers/multimedia-layer/recipes-multimedia/libcamera/libcamera_%.bbappend @@ -1,2 +1,3 @@ -PACKAGECONFIG[raspberrypi] = "-Dpipelines=rpi/vc4 -Dipas=rpi/vc4 -Dcpp_args=-Wno-unaligned-access" +PACKAGECONFIG[raspberrypi] = "-Dpipelines=rpi/vc4 -Dipas=rpi/vc4" PACKAGECONFIG:append:rpi = " raspberrypi" +CXXFLAGS:append:rpi = " -Wno-unaligned-access " diff --git a/sources/meta-raspberrypi/kas-poky-rpi.yml b/sources/meta-raspberrypi/kas-poky-rpi.yml index ce59eca6..12e47b79 100644 --- a/sources/meta-raspberrypi/kas-poky-rpi.yml +++ b/sources/meta-raspberrypi/kas-poky-rpi.yml @@ -12,7 +12,7 @@ repos: poky: url: https://git.yoctoproject.org/git/poky path: layers/poky - refspec: master + branch: master layers: meta: meta-poky: @@ -21,7 +21,7 @@ repos: meta-openembedded: url: http://git.openembedded.org/meta-openembedded path: layers/meta-openembedded - refspec: master + branch: master layers: meta-oe: meta-python: @@ -31,7 +31,7 @@ repos: meta-qt5: url: https://github.com/meta-qt5/meta-qt5/ path: layers/meta-qt5 - refspec: master + branch: master bblayers_conf_header: standard: | @@ -48,7 +48,7 @@ local_conf_header: USER_CLASSES = "buildstats" PATCHRESOLVE = "noop" debug-tweaks: | - EXTRA_IMAGE_FEATURES = "debug-tweaks" + IMAGE_FEATURES += "empty-root-password allow-empty-password allow-root-login post-install-logging" diskmon: | BB_DISKMON_DIRS = "\ STOPTASKS,${TMPDIR},1G,100K \ @@ -59,3 +59,7 @@ local_conf_header: HALT,${DL_DIR},100M,1K \ HALT,${SSTATE_DIR},100M,1K \ HALT,/tmp,10M,1K" + license: | + # Uncomment next line to allow the license + # See: linux-firmware-rpidistro in docs/ipcompliance.md + #LICENSE_FLAGS_ACCEPTED = "synaptics-killswitch" diff --git a/sources/meta-raspberrypi/recipes-bsp/armstubs/armstubs.bb b/sources/meta-raspberrypi/recipes-bsp/armstubs/armstubs.bb index 7e389dff..361aa963 100644 --- a/sources/meta-raspberrypi/recipes-bsp/armstubs/armstubs.bb +++ b/sources/meta-raspberrypi/recipes-bsp/armstubs/armstubs.bb @@ -11,14 +11,14 @@ COMPATIBLE_MACHINE = "^rpi$" S = "${RPITOOLS_S}/armstubs" -export CC7="${CC}" -export LD7="${LD}" -export OBJCOPY7="${OBJCOPY}" -export OBJDUMP7="${OBJDUMP}" -export CC8="${CC}" -export LD8="${LD}" -export OBJCOPY8="${OBJCOPY}" -export OBJDUMP8="${OBJDUMP} -maarch64" +export CC7 = "${CC}" +export LD7 = "${LD}" +export OBJCOPY7 = "${OBJCOPY}" +export OBJDUMP7 = "${OBJDUMP}" +export CC8 = "${CC}" +export LD8 = "${LD}" +export OBJCOPY8 = "${OBJCOPY}" +export OBJDUMP8 = "${OBJDUMP} -maarch64" do_compile() { [ -z "${ARMSTUB}" ] && bbfatal "No ARMSTUB defined for your machine." diff --git a/sources/meta-raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bb b/sources/meta-raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bb index b91668fc..0140f30f 100644 --- a/sources/meta-raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bb +++ b/sources/meta-raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bb @@ -18,13 +18,13 @@ PR = "r5" INHIBIT_DEFAULT_DEPS = "1" -PITFT="${@bb.utils.contains("MACHINE_FEATURES", "pitft", "1", "0", d)}" -PITFT22="${@bb.utils.contains("MACHINE_FEATURES", "pitft22", "1", "0", d)}" -PITFT28r="${@bb.utils.contains("MACHINE_FEATURES", "pitft28r", "1", "0", d)}" -PITFT28c="${@bb.utils.contains("MACHINE_FEATURES", "pitft28c", "1", "0", d)}" -PITFT35r="${@bb.utils.contains("MACHINE_FEATURES", "pitft35r", "1", "0", d)}" +PITFT = "${@bb.utils.contains("MACHINE_FEATURES", "pitft", "1", "0", d)}" +PITFT22 = "${@bb.utils.contains("MACHINE_FEATURES", "pitft22", "1", "0", d)}" +PITFT28r = "${@bb.utils.contains("MACHINE_FEATURES", "pitft28r", "1", "0", d)}" +PITFT28c = "${@bb.utils.contains("MACHINE_FEATURES", "pitft28c", "1", "0", d)}" +PITFT35r = "${@bb.utils.contains("MACHINE_FEATURES", "pitft35r", "1", "0", d)}" -VC4GRAPHICS="${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "1", "0", d)}" +VC4GRAPHICS = "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "1", "0", d)}" VC4DTBO ?= "vc4-kms-v3d" GPIO_IR ?= "18" GPIO_IR_TX ?= "17" @@ -35,7 +35,7 @@ CAN1_INTERRUPT_PIN ?= "24" ENABLE_UART ??= "" -WM8960="${@bb.utils.contains("MACHINE_FEATURES", "wm8960", "1", "0", d)}" +WM8960 = "${@bb.utils.contains("MACHINE_FEATURES", "wm8960", "1", "0", d)}" GPIO_SHUTDOWN_PIN ??= "" diff --git a/sources/meta-raspberrypi/recipes-bsp/gpio-shutdown/gpio-shutdown.bb b/sources/meta-raspberrypi/recipes-bsp/gpio-shutdown/gpio-shutdown.bb index d6908400..77d9856f 100644 --- a/sources/meta-raspberrypi/recipes-bsp/gpio-shutdown/gpio-shutdown.bb +++ b/sources/meta-raspberrypi/recipes-bsp/gpio-shutdown/gpio-shutdown.bb @@ -19,8 +19,8 @@ do_install() { ${D}${sysconfdir}/inittab.d \ ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/gpio-shutdown-keymap.sh ${D}${sysconfdir}/init.d/ - install -m 0755 ${WORKDIR}/bind_gpio_shutdown.tab ${D}${sysconfdir}/inittab.d/ + install -m 0755 ${UNPACKDIR}/gpio-shutdown-keymap.sh ${D}${sysconfdir}/init.d/ + install -m 0755 ${UNPACKDIR}/bind_gpio_shutdown.tab ${D}${sysconfdir}/inittab.d/ elif ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then # Systemd init does not require any configuration. # Note: cannot have an empty branch, hence the redundant dir install. diff --git a/sources/meta-raspberrypi/recipes-bsp/rpi-u-boot-scr/rpi-u-boot-scr.bb b/sources/meta-raspberrypi/recipes-bsp/rpi-u-boot-scr/rpi-u-boot-scr.bb index 1dff808b..d035d6e4 100644 --- a/sources/meta-raspberrypi/recipes-bsp/rpi-u-boot-scr/rpi-u-boot-scr.bb +++ b/sources/meta-raspberrypi/recipes-bsp/rpi-u-boot-scr/rpi-u-boot-scr.bb @@ -15,12 +15,15 @@ do_compile() { sed -e 's/@@KERNEL_IMAGETYPE@@/${KERNEL_IMAGETYPE}/' \ -e 's/@@KERNEL_BOOTCMD@@/${KERNEL_BOOTCMD}/' \ -e 's/@@BOOT_MEDIA@@/${BOOT_MEDIA}/' \ - "${WORKDIR}/boot.cmd.in" > "${WORKDIR}/boot.cmd" + "${UNPACKDIR}/boot.cmd.in" > "${WORKDIR}/boot.cmd" mkimage -A ${UBOOT_ARCH} -T script -C none -n "Boot script" -d "${WORKDIR}/boot.cmd" boot.scr } inherit kernel-arch deploy nopackages +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" + do_deploy() { install -d ${DEPLOYDIR} install -m 0644 boot.scr ${DEPLOYDIR} diff --git a/sources/meta-raspberrypi/recipes-bsp/u-boot/u-boot_%.bbappend b/sources/meta-raspberrypi/recipes-bsp/u-boot/u-boot_%.bbappend index e575569a..5dcd9404 100644 --- a/sources/meta-raspberrypi/recipes-bsp/u-boot/u-boot_%.bbappend +++ b/sources/meta-raspberrypi/recipes-bsp/u-boot/u-boot_%.bbappend @@ -11,5 +11,5 @@ DEPENDS:append:rpi = " u-boot-default-script" do_install:append:rpi () { install -d ${D}${sysconfdir} - install -m 0644 ${WORKDIR}/fw_env.config ${D}${sysconfdir}/fw_env.config + install -m 0644 ${UNPACKDIR}/fw_env.config ${D}${sysconfdir}/fw_env.config } diff --git a/sources/meta-raspberrypi/recipes-core/psplash/psplash_%.bbappend b/sources/meta-raspberrypi/recipes-core/psplash/psplash_%.bbappend index 57cade8f..22e80614 100644 --- a/sources/meta-raspberrypi/recipes-core/psplash/psplash_%.bbappend +++ b/sources/meta-raspberrypi/recipes-core/psplash/psplash_%.bbappend @@ -5,7 +5,7 @@ SRC_URI:append:rpi = " file://framebuf.conf" do_install:append:rpi() { if [ "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" ]; then - install -Dm 0644 ${WORKDIR}/framebuf.conf ${D}${systemd_system_unitdir}/psplash-start.service.d/framebuf.conf + install -Dm 0644 ${UNPACKDIR}/framebuf.conf ${D}${systemd_system_unitdir}/psplash-start.service.d/framebuf.conf fi } diff --git a/sources/meta-raspberrypi/recipes-core/udev/udev-rules-rpi.bb b/sources/meta-raspberrypi/recipes-core/udev/udev-rules-rpi.bb index 3ae43856..3ca34f44 100644 --- a/sources/meta-raspberrypi/recipes-core/udev/udev-rules-rpi.bb +++ b/sources/meta-raspberrypi/recipes-core/udev/udev-rules-rpi.bb @@ -15,5 +15,5 @@ INHIBIT_DEFAULT_DEPS = "1" do_install () { install -d ${D}${sysconfdir}/udev/rules.d install -m 0644 ${S}/etc.armhf/udev/rules.d/99-com.rules ${D}${sysconfdir}/udev/rules.d/ - install -m 0644 ${WORKDIR}/can.rules ${D}${sysconfdir}/udev/rules.d/ + install -m 0644 ${UNPACKDIR}/can.rules ${D}${sysconfdir}/udev/rules.d/ } diff --git a/sources/meta-raspberrypi/recipes-core/udev/udev-rules-udisks-rpi_1.0.bb b/sources/meta-raspberrypi/recipes-core/udev/udev-rules-udisks-rpi_1.0.bb index d5d4589d..2ebbc2c7 100644 --- a/sources/meta-raspberrypi/recipes-core/udev/udev-rules-udisks-rpi_1.0.bb +++ b/sources/meta-raspberrypi/recipes-core/udev/udev-rules-udisks-rpi_1.0.bb @@ -7,7 +7,7 @@ INHIBIT_DEFAULT_DEPS = "1" do_install () { install -d ${D}${base_libdir}/udev/rules.d - install -m 644 ${WORKDIR}/80-udisks-rpi.rules ${D}${base_libdir}/udev/rules.d + install -m 644 ${UNPACKDIR}/80-udisks-rpi.rules ${D}${base_libdir}/udev/rules.d } FILES:${PN} = "${base_libdir}/udev/rules.d" diff --git a/sources/meta-raspberrypi/recipes-devtools/raspi-utils/raspi-utils_git.bb b/sources/meta-raspberrypi/recipes-devtools/raspi-utils/raspi-utils_git.bb index 7c316204..8b979a49 100644 --- a/sources/meta-raspberrypi/recipes-devtools/raspi-utils/raspi-utils_git.bb +++ b/sources/meta-raspberrypi/recipes-devtools/raspi-utils/raspi-utils_git.bb @@ -2,12 +2,7 @@ SUMMARY = "A collection of scripts and simple applications" LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://LICENCE;md5=4c01239e5c3a3d133858dedacdbca63c" -RCONFLICTS:${PN} = "userland" DEPENDS:append = " dtc" -PACKAGES =+ " ${PN}-raspinfo" -PACKAGES =+ " ${PN}-ovmerge" -RDEPENDS:${PN}-raspinfo += " bash" -RDEPENDS:${PN}-ovmerge += " perl" PV = "1.0+git" @@ -15,39 +10,13 @@ SRC_URI = "git://github.com/raspberrypi/utils;protocol=https;branch=master" SRCREV = "b9c63214c535d7df2b0fa6743b7b3e508363c25a" -FILES:${PN}:append = " \ - ${datadir}/bash-completion/completions/pinctrl \ - ${datadir}/bash-completion/completions/vcgencmd \ -" -FILES:${PN}-raspinfo += "${bindir}/raspinfo" -FILES:${PN}-ovmerge += "${bindir}/ovmerge" - S = "${WORKDIR}/git" -OECMAKE_TARGET_COMPILE = "\ - dtmerge/all \ - eeptools/all \ - otpset/all \ - overlaycheck/all \ - ovmerge/all \ - pinctrl/all \ - raspinfo/all \ - vcgencmd/all \ - vclog/all \ - vcmailbox/all \ +FILES:${PN}:append = " \ + ${datadir}/bash-completion/completions/pinctrl \ " -OECMAKE_TARGET_INSTALL = "\ - dtmerge/install \ - eeptools/install \ - otpset/install \ - overlaycheck/install \ - ovmerge/install \ - pinctrl/install \ - raspinfo/install \ - vcgencmd/install \ - vclog/install \ - vcmailbox/install \ -" +OECMAKE_TARGET_COMPILE = "pinctrl/all dtmerge/all" +OECMAKE_TARGET_INSTALL = "pinctrl/install dtmerge/install" -inherit cmake \ No newline at end of file +inherit cmake diff --git a/sources/meta-raspberrypi/recipes-graphics/mesa/mesa-gl_%.bbappend b/sources/meta-raspberrypi/recipes-graphics/mesa/mesa-gl.bbappend similarity index 100% rename from sources/meta-raspberrypi/recipes-graphics/mesa/mesa-gl_%.bbappend rename to sources/meta-raspberrypi/recipes-graphics/mesa/mesa-gl.bbappend diff --git a/sources/meta-raspberrypi/recipes-graphics/mesa/mesa_%.bbappend b/sources/meta-raspberrypi/recipes-graphics/mesa/mesa.bbappend similarity index 100% rename from sources/meta-raspberrypi/recipes-graphics/mesa/mesa_%.bbappend rename to sources/meta-raspberrypi/recipes-graphics/mesa/mesa.bbappend diff --git a/sources/meta-raspberrypi/recipes-graphics/mesa/mesa/0001-dont-build-clover-frontend.patch b/sources/meta-raspberrypi/recipes-graphics/mesa/mesa/0001-dont-build-clover-frontend.patch deleted file mode 100644 index 5f45f94f..00000000 --- a/sources/meta-raspberrypi/recipes-graphics/mesa/mesa/0001-dont-build-clover-frontend.patch +++ /dev/null @@ -1,29 +0,0 @@ -From: Markus Volk -Date: Sun, 19 Mai 2025 15:34:46 +0100 -Subject: [PATCH] dont build clover frontend - -The clover frontend is deprecated and is always built with opencl, even if -using rusticl. Additionally it adds a reproducibility issue. - -Upstream-Status: Inappropriate [oe-specific] -Signed-off-by: Markus Volk - ---- a/src/gallium/meson.build 2025-05-07 18:35:10.000000000 +0200 -+++ b/src/gallium/meson.build 2025-05-18 17:05:23.677694272 +0200 -@@ -195,15 +195,11 @@ - else - driver_d3d12 = declare_dependency() - endif --if with_gallium_clover or with_tests -+if with_tests - # At the moment, clover and gallium/tests are the only two consumers - # for pipe-loader - subdir('targets/pipe-loader') - endif --if with_gallium_clover -- subdir('frontends/clover') -- subdir('targets/opencl') --endif - if with_gallium_rusticl - subdir('frontends/rusticl') - subdir('targets/rusticl') diff --git a/sources/meta-raspberrypi/recipes-graphics/mesa/mesa/0001-fix-FTBFS-clc-switch-to-new-non-owned-TargetOptions-.patch b/sources/meta-raspberrypi/recipes-graphics/mesa/mesa/0001-fix-FTBFS-clc-switch-to-new-non-owned-TargetOptions-.patch deleted file mode 100644 index 26338696..00000000 --- a/sources/meta-raspberrypi/recipes-graphics/mesa/mesa/0001-fix-FTBFS-clc-switch-to-new-non-owned-TargetOptions-.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 531c6696d42953cd642dea7bf70153285c7949ae Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Kai=20Wasserb=C3=A4ch?= -Date: Tue, 6 May 2025 14:36:57 +0200 -Subject: [PATCH] fix(FTBFS): clc: switch to new non-owned `TargetOptions` for - LLVM 21 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Upstream hid the `TargetOptions` in commit 985410f87f2d19910a8d327527fd30062b042b63 - -Use the new `getTargetOpts()` to obtain the `TargetOptions` for -`setTarget()`. - -Upstream-Status: Backport [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34835] - -Signed-off-by: Kai Wasserbäch -Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13079 -Reference: https://github.com/llvm/llvm-project/commit/985410f87f2d19910a8d327527fd30062b042b63 -Reviewed-by: Karol Herbst -Part-of: ---- - src/compiler/clc/clc_helpers.cpp | 4 ++++ - 1 file changed, 4 insertions(+) - ---- a/src/compiler/clc/clc_helpers.cpp -+++ b/src/compiler/clc/clc_helpers.cpp -@@ -874,7 +874,11 @@ clc_compile_to_llvm_module(LLVMContext & - diag_opts)); - - c->setTarget(clang::TargetInfo::CreateTargetInfo( -+#if LLVM_VERSION_MAJOR >= 21 -+ c->getDiagnostics(), c->getInvocation().getTargetOpts())); -+#else - c->getDiagnostics(), c->getInvocation().TargetOpts)); -+#endif - - c->getFrontendOpts().ProgramAction = clang::frontend::EmitLLVMOnly; - diff --git a/sources/meta-raspberrypi/recipes-graphics/mesa/mesa/0001-freedreno-don-t-encode-build-path-into-binaries.patch b/sources/meta-raspberrypi/recipes-graphics/mesa/mesa/0001-freedreno-don-t-encode-build-path-into-binaries.patch deleted file mode 100644 index 953a724d..00000000 --- a/sources/meta-raspberrypi/recipes-graphics/mesa/mesa/0001-freedreno-don-t-encode-build-path-into-binaries.patch +++ /dev/null @@ -1,110 +0,0 @@ -From 027ac36756cc75eea9ed4fee135a351af30b35fd Mon Sep 17 00:00:00 2001 -From: Dmitry Baryshkov -Date: Tue, 16 Jul 2024 12:32:47 +0300 -Subject: [PATCH] freedreno: don't encode build path into binaries - -Encoding build-specific path into installed binaries is generally -frowned upon. It harms the reproducibility of the build and e.g. -OpenEmbedded now considers that to be an error. - -Instead of hardcoding rnn_src_path into the RNN_DEF_PATH define specify -it manually when running the tests. - -Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30206] -Signed-off-by: Dmitry Baryshkov ---- - src/freedreno/afuc/meson.build | 4 ++++ - src/freedreno/decode/meson.build | 4 +++- - src/freedreno/meson.build | 2 +- - 3 files changed, 8 insertions(+), 2 deletions(-) - -diff --git a/src/freedreno/afuc/meson.build b/src/freedreno/afuc/meson.build -index bb7cebf5a748..351cc31ef2de 100644 ---- a/src/freedreno/afuc/meson.build -+++ b/src/freedreno/afuc/meson.build -@@ -56,10 +56,12 @@ if with_tests - asm_fw = custom_target('afuc_test.fw', - output: 'afuc_test.fw', - command: [asm, files('../.gitlab-ci/traces/afuc_test.asm'), '@OUTPUT@'], -+ env: {'RNN_PATH': rnn_src_path}, - ) - asm_fw_a7xx = custom_target('afuc_test_a7xx.fw', - output: 'afuc_test_a7xx.fw', - command: [asm, files('../.gitlab-ci/traces/afuc_test_a7xx.asm'), '@OUTPUT@'], -+ env: {'RNN_PATH': rnn_src_path}, - ) - test('afuc-asm', - diff, -@@ -120,11 +122,13 @@ if cc.sizeof('size_t') > 4 - disasm_fw = custom_target('afuc_test.asm', - output: 'afuc_test.asm', - command: [disasm, '-u', files('../.gitlab-ci/reference/afuc_test.fw')], -+ env: {'RNN_PATH': rnn_src_path}, - capture: true - ) - disasm_fw_a7xx = custom_target('afuc_test_a7xx.asm', - output: 'afuc_test_a7xx.asm', - command: [disasm, '-u', files('../.gitlab-ci/reference/afuc_test_a7xx.fw')], -+ env: {'RNN_PATH': rnn_src_path}, - capture: true - ) - test('afuc-disasm', -diff --git a/src/freedreno/decode/meson.build b/src/freedreno/decode/meson.build -index 469eeb4eb597..dfa1c12d0d9f 100644 ---- a/src/freedreno/decode/meson.build -+++ b/src/freedreno/decode/meson.build -@@ -194,6 +194,7 @@ if dep_lua.found() and dep_libarchive.found() - log = custom_target(name + '.log', - output: name + '.log', - command: [cffdump, '--unit-test', args, files('../.gitlab-ci/traces/' + name + '.rd.gz')], -+ env: {'RNN_PATH': rnn_src_path}, - capture: true, - ) - test('cffdump-' + name, -@@ -247,7 +248,8 @@ if with_tests - output: name + '.log', - command: [crashdec, args, files('../.gitlab-ci/traces/' + name + '.devcore')], - capture: true, -- env: {'GALLIUM_DUMP_CPU': 'false'}, -+ env: {'GALLIUM_DUMP_CPU': 'false', -+ 'RNN_PATH': rnn_src_path}, - ) - - test('crashdec-' + name, -diff --git a/src/freedreno/meson.build b/src/freedreno/meson.build -index 98e49b8fcf0e..145e72597eb9 100644 ---- a/src/freedreno/meson.build -+++ b/src/freedreno/meson.build -@@ -6,7 +6,7 @@ inc_freedreno_rnn = include_directories('rnn') - - rnn_src_path = dir_source_root + '/src/freedreno/registers' - rnn_install_path = get_option('datadir') + '/freedreno/registers' --rnn_path = rnn_src_path + ':' + get_option('prefix') + '/' + rnn_install_path -+rnn_path = get_option('prefix') + '/' + rnn_install_path - - dep_libarchive = dependency('libarchive', allow_fallback: true, required: false) - dep_libxml2 = dependency('libxml-2.0', allow_fallback: true, required: false) -diff --git a/src/freedreno/registers/gen_header.py b/src/freedreno/registers/gen_header.py ---- a/src/freedreno/registers/gen_header.py -+++ b/src/freedreno/registers/gen_header.py -@@ -885,13 +885,14 @@ The rules-ng-ng source files this header - """) - maxlen = 0 - for filepath in p.xml_files: -- maxlen = max(maxlen, len(filepath)) -+ maxlen = max(maxlen, len(os.path.basename(filepath))) - for filepath in p.xml_files: -- pad = " " * (maxlen - len(filepath)) -+ filename = os.path.basename(filepath) -+ pad = " " * (maxlen - len(filename)) - filesize = str(os.path.getsize(filepath)) - filesize = " " * (7 - len(filesize)) + filesize - filetime = time.ctime(os.path.getmtime(filepath)) -- print("- " + filepath + pad + " (" + filesize + " bytes, from " + filetime + ")") -+ print("- " + filename + pad + " (" + filesize + " bytes, from " + filetime + ")") - if p.copyright_year: - current_year = str(datetime.date.today().year) - print() ---- -2.39.2 - diff --git a/sources/meta-raspberrypi/recipes-graphics/mesa/mesa/0001-meson-misdetects-64bit-atomics-on-mips-clang.patch b/sources/meta-raspberrypi/recipes-graphics/mesa/mesa/0001-meson-misdetects-64bit-atomics-on-mips-clang.patch deleted file mode 100644 index baa98a0d..00000000 --- a/sources/meta-raspberrypi/recipes-graphics/mesa/mesa/0001-meson-misdetects-64bit-atomics-on-mips-clang.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 02cc21800fe29f566add525e63f619c0536d6e7b Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Mon, 13 Jan 2020 15:23:47 -0800 -Subject: [PATCH] meson misdetects 64bit atomics on mips/clang - -Upstream-Status: Pending -Signed-off-by: Khem Raj ---- - src/util/u_atomic.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/util/u_atomic.c b/src/util/u_atomic.c -index 5a5eab4..e499516 100644 ---- a/src/util/u_atomic.c -+++ b/src/util/u_atomic.c -@@ -21,7 +21,7 @@ - * IN THE SOFTWARE. - */ - --#if defined(MISSING_64BIT_ATOMICS) && defined(HAVE_PTHREAD) -+#if !defined(__clang__) && defined(MISSING_64BIT_ATOMICS) && defined(HAVE_PTHREAD) - - #include - #include diff --git a/sources/meta-raspberrypi/recipes-graphics/mesa/mesa_25.1.6.bb b/sources/meta-raspberrypi/recipes-graphics/mesa/mesa_25.1.6.bb deleted file mode 100644 index b09a5e17..00000000 --- a/sources/meta-raspberrypi/recipes-graphics/mesa/mesa_25.1.6.bb +++ /dev/null @@ -1,383 +0,0 @@ -SUMMARY = "A free implementation of the OpenGL API" -DESCRIPTION = "Mesa is an open-source implementation of the OpenGL specification - \ -a system for rendering interactive 3D graphics. \ -A variety of device drivers allows Mesa to be used in many different environments \ -ranging from software emulation to complete hardware acceleration for modern GPUs. \ -Mesa is used as part of the overall Direct Rendering Infrastructure and X.org \ -environment." - -HOMEPAGE = "http://mesa3d.org" -BUGTRACKER = "https://bugs.freedesktop.org" -SECTION = "x11" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://docs/license.rst;md5=ffe678546d4337b732cfd12262e6af11" - -PE = "2" - -SRC_URI = "https://archive.mesa3d.org/mesa-${PV}.tar.xz \ - file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \ - file://0001-freedreno-don-t-encode-build-path-into-binaries.patch \ - file://0001-dont-build-clover-frontend.patch \ - file://0001-fix-FTBFS-clc-switch-to-new-non-owned-TargetOptions-.patch \ -" - -SRC_URI[sha256sum] = "9f2b69eb39d2d8717d30a9868fdda3e0c0d3708ba32778bbac8ddb044538ce84" -PV = "25.1.6" - -UPSTREAM_CHECK_GITTAGREGEX = "mesa-(?P\d+(\.\d+)+)" - -#because we cannot rely on the fact that all apps will use pkgconfig, -#make eglplatform.h independent of MESA_EGL_NO_X11_HEADER -do_install:append() { - # sed can't find EGL/eglplatform.h as it doesn't get installed when glvnd enabled. - # So, check if EGL/eglplatform.h exists before running sed. - if ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'true', 'false', d)} && [ -f ${D}${includedir}/EGL/eglplatform.h ]; then - sed -i -e 's/^#elif defined(__unix__) && defined(EGL_NO_X11)$/#elif defined(__unix__) \&\& defined(EGL_NO_X11) || ${@bb.utils.contains('PACKAGECONFIG', 'x11', '0', '1', d)}/' ${D}${includedir}/EGL/eglplatform.h - fi - # These are ICDs, apps are not supposed to link against them - if ${@bb.utils.contains('PACKAGECONFIG', 'glvnd', 'true', 'false', d)} ; then - rm -f ${D}${libdir}/libEGL_mesa.so ${D}${libdir}/libGLX_mesa.so - fi -} - -DEPENDS = "expat makedepend-native flex-native bison-native libxml2-native zlib chrpath-replacement-native python3-mako-native gettext-native python3-pyyaml-native" -EXTRANATIVEPATH += "chrpath-native" -GLPROVIDES = " \ - ${@bb.utils.contains('PACKAGECONFIG', 'opengl', 'virtual/libgl', '', d)} \ - ${@bb.utils.contains('PACKAGECONFIG', 'gles', 'virtual/libgles1 virtual/libgles2 virtual/libgles3', '', d)} \ - ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'virtual/egl', '', d)} \ -" -PROVIDES = " \ - ${@bb.utils.contains('PACKAGECONFIG', 'glvnd', '', d.getVar('GLPROVIDES'), d)} \ - ${@bb.utils.contains('PACKAGECONFIG', 'gbm', 'virtual/libgbm', '', d)} \ - virtual/mesa \ - " - -inherit meson pkgconfig python3native gettext features_check rust - -BBCLASSEXTEND = "native nativesdk" - -ANY_OF_DISTRO_FEATURES = "opengl vulkan" - -PLATFORMS ??= "${@bb.utils.filter('PACKAGECONFIG', 'x11 wayland', d)}" - -# set the MESA_BUILD_TYPE to either 'release' (default) or 'debug' -# by default the upstream mesa sources build a debug release -# here we assume the user will want a release build by default -MESA_BUILD_TYPE ?= "release" -def check_buildtype(d): - _buildtype = d.getVar('MESA_BUILD_TYPE') - if _buildtype not in ['release', 'debug']: - bb.fatal("unknown build type (%s), please set MESA_BUILD_TYPE to either 'release' or 'debug'" % _buildtype) - if _buildtype == 'debug': - return 'debugoptimized' - return 'plain' -MESON_BUILDTYPE = "${@check_buildtype(d)}" - -EXTRA_OEMESON = " \ - -Dglx-read-only-text=true \ - -Dplatforms='${@",".join("${PLATFORMS}".split())}' \ -" - -def strip_comma(s): - return s.strip(',') - -PACKAGECONFIG = " \ - gallium \ - video-codecs \ - ${@bb.utils.filter('DISTRO_FEATURES', 'x11 vulkan wayland glvnd', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl egl gles gbm virgl', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'vulkan', 'zink', '', d)} \ -" - -# skip all Rust dependencies if we are not building OpenCL" -INHIBIT_DEFAULT_RUST_DEPS = "${@bb.utils.contains('PACKAGECONFIG', 'opencl', '', '1', d)}" - -PACKAGECONFIG:append:x86 = " libclc gallium-llvm intel amd nouveau svga" -PACKAGECONFIG:append:x86-64 = " libclc gallium-llvm intel amd nouveau svga" -PACKAGECONFIG:append:i686 = " libclc gallium-llvm intel amd nouveau svga" -PACKAGECONFIG:append:class-native = " libclc gallium-llvm amd nouveau svga" - -# "gbm" requires "opengl" -PACKAGECONFIG[gbm] = "-Dgbm=enabled,-Dgbm=disabled" - -X11_DEPS = "xorgproto virtual/libx11 libxext libxxf86vm libxdamage libxfixes xrandr xorgproto libxshmfence" -# "x11" requires "opengl" -PACKAGECONFIG[x11] = ",-Dglx=disabled,${X11_DEPS}" -PACKAGECONFIG[wayland] = ",,wayland-native wayland libdrm wayland-protocols" - -VULKAN_DRIVERS_AMD = "${@bb.utils.contains('PACKAGECONFIG', 'amd', ',amd', '', d)}" -VULKAN_DRIVERS_ASAHI = "${@bb.utils.contains('PACKAGECONFIG', 'asahi libclc opencl', ',asahi', '', d)}" -VULKAN_DRIVERS_INTEL = "${@bb.utils.contains('PACKAGECONFIG', 'intel libclc', ',intel', '', d)}" -VULKAN_DRIVERS_SWRAST = ",swrast" -# Crashes on x32 -VULKAN_DRIVERS_SWRAST:x86-x32 = "" -VULKAN_DRIVERS_LLVM = "${VULKAN_DRIVERS_SWRAST}${VULKAN_DRIVERS_AMD}${VULKAN_DRIVERS_ASAHI}${VULKAN_DRIVERS_INTEL}" - -VULKAN_DRIVERS = "" -VULKAN_DRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ',freedreno', '', d)}" -VULKAN_DRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'broadcom', ',broadcom', '', d)}" -VULKAN_DRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'gallium-llvm', '${VULKAN_DRIVERS_LLVM}', '', d)}" -VULKAN_DRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'imagination', ',imagination-experimental', '', d)}" -VULKAN_DRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'panfrost', ',panfrost', '', d)}" -PACKAGECONFIG[vulkan] = "-Dvulkan-drivers=${@strip_comma('${VULKAN_DRIVERS}')}, -Dvulkan-drivers='',glslang-native vulkan-loader vulkan-headers" - -# mesa development and testing tools support, per driver -TOOLS = "" -TOOLS_DEPS = "" -TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'etnaviv', ',etnaviv', '', d)}" -TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ',freedreno', '', d)}" -TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'lima', ',lima', '', d)}" -TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'panfrost', ',panfrost', '', d)}" -TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'imagination', ',imagination', '', d)}" - -# dependencies for tools. -TOOLS_DEPS:append = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ' ncurses libxml2 ', '', d)}" - -# the fdperf tool requires libconfig (a part of meta-oe) so it needs special -# treatment in addition to the usual 'freedreno tools'. -PACKAGECONFIG[freedreno-fdperf] = ",,libconfig" - -PACKAGECONFIG[tools] = "-Dtools=${@strip_comma('${TOOLS}')}, -Dtools='', ${TOOLS_DEPS}" - -PACKAGECONFIG[opengl] = "-Dopengl=true, -Dopengl=false" -PACKAGECONFIG[glvnd] = "-Dglvnd=enabled, -Dglvnd=disabled, libglvnd" - -# "gles" requires "opengl" -PACKAGECONFIG[gles] = "-Dgles1=enabled -Dgles2=enabled, -Dgles1=disabled -Dgles2=disabled" - -# "egl" requires "opengl" -PACKAGECONFIG[egl] = "-Degl=enabled, -Degl=disabled" - -# "opencl" also requires libclc and gallium-llvm to be present in PKGCONFIG! -# Be sure to enable them both for the target and for the native build. -PACKAGECONFIG[opencl] = "-Dgallium-rusticl=true, -Dgallium-rusticl=false, bindgen-cli-native" - -PACKAGECONFIG[broadcom] = "" -PACKAGECONFIG[etnaviv] = ",,python3-pycparser-native" -PACKAGECONFIG[freedreno] = "" -PACKAGECONFIG[vc4] = "" -PACKAGECONFIG[v3d] = "" -PACKAGECONFIG[zink] = "" - -GALLIUMDRIVERS = "softpipe" -# gallium swrast was found to crash Xorg on startup in x32 qemu -GALLIUMDRIVERS:x86-x32 = "" - -GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'etnaviv', ',etnaviv', '', d)}" -GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ',freedreno', '', d)}" -GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'vc4', ',vc4', '', d)}" -GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'v3d', ',v3d', '', d)}" -GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'zink', ',zink', '', d)}" - -GALLIUMDRIVERS_ASAHI = "${@bb.utils.contains('PACKAGECONFIG', 'asahi libclc opencl', ',asahi', '', d)}" -GALLIUMDRIVERS_AMD = "${@bb.utils.contains('PACKAGECONFIG', 'amd', ',r300', '', d)}" -GALLIUMDRIVERS_IRIS = "${@bb.utils.contains('PACKAGECONFIG', 'intel libclc', ',iris', '', d)}" -GALLIUMDRIVERS_NOUVEAU = "${@bb.utils.contains('PACKAGECONFIG', 'nouveau', ',nouveau', '', d)}" -GALLIUMDRIVERS_RADEONSI = "${@bb.utils.contains('PACKAGECONFIG', 'amd', ',radeonsi', '', d)}" -GALLIUMDRIVERS_LLVMPIPE = ",llvmpipe" -# llvmpipe crashes on x32 -GALLIUMDRIVERS_LLVMPIPE:x86-x32 = "" -GALLIUMDRIVERS_SVGA = "${@bb.utils.contains('PACKAGECONFIG', 'svga', ',svga', '', d)}" -GALLIUMDRIVERS_LLVM = "${GALLIUMDRIVERS_LLVMPIPE}${GALLIUMDRIVERS_AMD}${GALLIUMDRIVERS_ASAHI}${GALLIUMDRIVERS_IRIS}${GALLIUMDRIVERS_NOUVEAU}${GALLIUMDRIVERS_RADEONSI}${GALLIUMDRIVERS_SVGA}" - -PACKAGECONFIG[amd] = "" -PACKAGECONFIG[nouveau] = "" -PACKAGECONFIG[svga] = "" -PACKAGECONFIG[virgl] = "" - -GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'gallium-llvm', '${GALLIUMDRIVERS_LLVM}', '', d)}" -GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'amd', ',r600', '', d)}" -GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'virgl', ',virgl', '', d)}" - -MESA_CLC = "system" -MESA_CLC:class-native = "enabled" -INSTALL_MESA_CLC = "false" -INSTALL_MESA_CLC:class-native = "true" -MESA_NATIVE = "mesa-native" -MESA_NATIVE:class-native = "" - -PACKAGECONFIG[gallium] = "-Dgallium-drivers=${@strip_comma('${GALLIUMDRIVERS}')}, -Dgallium-drivers='', libdrm" -PACKAGECONFIG[gallium-llvm] = "-Dllvm=enabled -Dshared-llvm=enabled, -Dllvm=disabled, llvm llvm-native elfutils" -PACKAGECONFIG[libclc] = "-Dmesa-clc=${MESA_CLC} -Dinstall-mesa-clc=${INSTALL_MESA_CLC} -Dmesa-clc-bundle-headers=enabled,,libclc spirv-tools spirv-llvm-translator ${MESA_NATIVE}" -PACKAGECONFIG[va] = "-Dgallium-va=enabled,-Dgallium-va=disabled,libva-initial" -PACKAGECONFIG[vdpau] = "-Dgallium-vdpau=enabled,-Dgallium-vdpau=disabled,libvdpau" - -PACKAGECONFIG[imagination] = "-Dimagination-srv=true,-Dimagination-srv=false" - -PACKAGECONFIG[asahi] = "" - -PACKAGECONFIG[intel] = "" -GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'intel', ',i915,crocus', '', d)}" - -PACKAGECONFIG[lima] = "" -GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'lima', ',lima', '', d)}" - -PACKAGECONFIG[panfrost] = "" -GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'panfrost', ',panfrost', '', d)}" - -PACKAGECONFIG[tegra] = "" -GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'tegra', ',tegra,nouveau', '', d)}" - -PACKAGECONFIG[vulkan-beta] = "-Dvulkan-beta=true,-Dvulkan-beta=false" - -PACKAGECONFIG[perfetto] = "-Dperfetto=true,-Dperfetto=false,libperfetto" - -PACKAGECONFIG[unwind] = "-Dlibunwind=enabled,-Dlibunwind=disabled,libunwind" - -PACKAGECONFIG[lmsensors] = "-Dlmsensors=enabled,-Dlmsensors=disabled,lmsensors" - -VIDEO_CODECS ?= "${@bb.utils.contains('LICENSE_FLAGS_ACCEPTED', 'commercial', 'all', 'all_free', d)}" -PACKAGECONFIG[video-codecs] = "-Dvideo-codecs=${VIDEO_CODECS}, -Dvideo-codecs=''" - -PACKAGECONFIG[teflon] = "-Dteflon=true, -Dteflon=false" - -# llvmpipe is slow if compiled with -fomit-frame-pointer (e.g. -O2) -FULL_OPTIMIZATION:append = " -fno-omit-frame-pointer" - -CFLAGS:append:armv5 = " -DMISSING_64BIT_ATOMICS" -CFLAGS:append:armv6 = " -DMISSING_64BIT_ATOMICS" - -# Remove the mesa dependency on mesa-dev, as mesa is empty -DEV_PKG_DEPENDENCY = "" - -# GLES2 and GLES3 implementations are packaged in a single library in libgles2-mesa. -# Add a dependency so the GLES3 dev package is associated with its implementation. -RPROVIDES:libgles2-mesa += "libgles3-mesa" -RPROVIDES:libgles2-mesa-dev += "libgles3-mesa-dev" - -RDEPENDS:libopencl-mesa += "${@bb.utils.contains('PACKAGECONFIG', 'opencl', 'libclc spirv-tools spirv-llvm-translator', '', d)}" - -PACKAGES =+ "libegl-mesa libegl-mesa-dev \ - libgallium \ - libgl-mesa libgl-mesa-dev \ - libglx-mesa libglx-mesa-dev \ - libglapi libglapi-dev \ - libgbm libgbm-dev \ - libgles1-mesa libgles1-mesa-dev \ - libgles2-mesa libgles2-mesa-dev \ - libopencl-mesa \ - libteflon \ - mesa-megadriver mesa-vulkan-drivers \ - mesa-vdpau-drivers mesa-tools \ - " - -do_install:append () { - # libwayland-egl has been moved to wayland 1.15+ - rm -f ${D}${libdir}/libwayland-egl* - rm -f ${D}${libdir}/pkgconfig/wayland-egl.pc -} - -# For the packages that make up the OpenGL interfaces, inject variables so that -# they don't get Debian-renamed (which would remove the -mesa suffix), and -# RPROVIDEs/RCONFLICTs on the generic libgl name. -python __anonymous() { - pkgconfig = (d.getVar('PACKAGECONFIG') or "").split() - mlprefix = d.getVar("MLPREFIX") - suffix = "" - if "-native" in d.getVar("PN"): - suffix = "-native" - - for p in ("libegl", "libgl", "libglx", "libgles1", "libgles2", "libgles3", "libopencl"): - fullp = mlprefix + p + "-mesa" + suffix - d.appendVar("RRECOMMENDS:" + fullp, " ${MLPREFIX}mesa-megadriver" + suffix) - - d.setVar("DEBIAN_NOAUTONAME:%slibopencl-mesa%s" % (mlprefix, suffix), "1") - - if 'glvnd' in pkgconfig: - for p in ("libegl", "libglx"): - fullp = mlprefix + p + "-mesa" + suffix - d.appendVar("RPROVIDES:" + fullp, ' virtual-%s-icd' % p) - else: - for p in (("egl", "libegl", "libegl1"), - ("opengl", "libgl", "libgl1"), - ("gles", "libgles1", "libglesv1-cm1"), - ("gles", "libgles2", "libglesv2-2", "libgles3")): - if not p[0] in pkgconfig: - continue - fullp = mlprefix + p[1] + "-mesa" + suffix - pkgs = " " + " ".join(mlprefix + x + suffix for x in p[1:]) - d.setVar("DEBIAN_NOAUTONAME:" + fullp, "1") - d.appendVar("RREPLACES:" + fullp, pkgs) - d.appendVar("RPROVIDES:" + fullp, pkgs) - d.appendVar("RCONFLICTS:" + fullp, pkgs) - - # For -dev, the first element is both the Debian and original name - fullp = mlprefix + p[1] + "-mesa-dev" + suffix - pkgs = " " + mlprefix + p[1] + "-dev" + suffix - d.setVar("DEBIAN_NOAUTONAME:" + fullp, "1") - d.appendVar("RREPLACES:" + fullp, pkgs) - d.appendVar("RPROVIDES:" + fullp, pkgs) - d.appendVar("RCONFLICTS:" + fullp, pkgs) -} - -python mesa_populate_packages() { - pkgs = ['mesa', 'mesa-dev', 'mesa-dbg'] - for pkg in pkgs: - d.setVar("RPROVIDES:%s" % pkg, pkg.replace("mesa", "mesa-dri", 1)) - d.setVar("RCONFLICTS:%s" % pkg, pkg.replace("mesa", "mesa-dri", 1)) - d.setVar("RREPLACES:%s" % pkg, pkg.replace("mesa", "mesa-dri", 1)) - - import re - dri_drivers_root = oe.path.join(d.getVar('PKGD'), d.getVar('libdir'), "dri") - if os.path.isdir(dri_drivers_root): - dri_pkgs = sorted(os.listdir(dri_drivers_root)) - lib_name = d.expand("${MLPREFIX}mesa-megadriver") - for p in dri_pkgs: - m = re.match(r'^(.*)_dri\.so$', p) - if m: - pkg_name = " ${MLPREFIX}mesa-driver-%s" % legitimize_package_name(m.group(1)) - d.appendVar("RPROVIDES:%s" % lib_name, pkg_name) - d.appendVar("RCONFLICTS:%s" % lib_name, pkg_name) - d.appendVar("RREPLACES:%s" % lib_name, pkg_name) -} - -PACKAGESPLITFUNCS =+ "mesa_populate_packages" - -PACKAGES_DYNAMIC += "^mesa-driver-.*" -PACKAGES_DYNAMIC:class-native = "^mesa-driver-.*-native" - -FILES:mesa-megadriver = "${libdir}/dri/* ${datadir}/drirc.d" -FILES:mesa-vulkan-drivers = "${libdir}/libvulkan_*.so ${libdir}/libpowervr_rogue.so ${datadir}/vulkan" -FILES:${PN}-vdpau-drivers = "${libdir}/vdpau/*.so.*" -FILES:libegl-mesa = "${libdir}/libEGL*.so.* ${datadir}/glvnd/egl_vendor.d" -FILES:libgbm = "${libdir}/libgbm.so.* ${libdir}/gbm/*_gbm.so" -FILES:libgallium = "${libdir}/libgallium-*.so" -FILES:libgles1-mesa = "${libdir}/libGLESv1*.so.*" -FILES:libgles2-mesa = "${libdir}/libGLESv2.so.*" -FILES:libgl-mesa = "${libdir}/libGL.so.*" -FILES:libglx-mesa = "${libdir}/libGLX*.so.*" -FILES:libopencl-mesa = "${libdir}/lib*OpenCL.so* ${sysconfdir}/OpenCL/vendors/*.icd" -FILES:libglapi = "${libdir}/libglapi.so.*" - -FILES:${PN}-dev = "${libdir}/pkgconfig/dri.pc ${includedir}/GL/internal/dri_interface.h ${includedir}/vulkan ${libdir}/vdpau/*.so" -FILES:libegl-mesa-dev = "${libdir}/libEGL*.* ${includedir}/EGL ${includedir}/KHR ${libdir}/pkgconfig/egl.pc" -FILES:libgbm-dev = "${libdir}/libgbm.* ${libdir}/pkgconfig/gbm.pc ${includedir}/gbm.h ${includedir}/gbm_backend_abi.h" -FILES:libgl-mesa-dev = "${libdir}/libGL.* ${includedir}/GL/*.h ${libdir}/pkgconfig/gl.pc" -FILES:libglapi-dev = "${libdir}/libglapi.*" -FILES:libgles1-mesa-dev = "${libdir}/libGLESv1*.* ${includedir}/GLES ${libdir}/pkgconfig/glesv1*.pc" -FILES:libgles2-mesa-dev = "${libdir}/libGLESv2.* ${includedir}/GLES2 ${includedir}/GLES3 ${libdir}/pkgconfig/glesv2.pc" -FILES:libteflon = "${libdir}/libteflon.so" -# catch all to get all the tools and data -FILES:${PN}-tools = "${bindir} ${datadir}" -ALLOW_EMPTY:${PN}-tools = "1" - -# All DRI drivers are symlinks to libdril_dri.so -INSANE_SKIP:${PN}-megadriver += "dev-so" - -# OpenCL ICDs package also ship correspondig .so files, there is no -dev package -INSANE_SKIP:libopencl-mesa += "dev-so" - -# Fix upgrade path from mesa to mesa-megadriver -RREPLACES:mesa-megadriver = "mesa" -RCONFLICTS:mesa-megadriver = "mesa" -RPROVIDES:mesa-megadriver = "mesa" - -# Use this newer version only for rpi MACHINEs -COMPATIBLE_MACHINE = "^rpi$" -# This version doesn't have kmsro and dri3 added by -# recipes-graphics/mesa/mesa_%.bbappend -# already removed in master branch with: -# https://github.com/agherzan/meta-raspberrypi/pull/1456 -# https://github.com/agherzan/meta-raspberrypi/pull/1472 -PACKAGECONFIG:remove:rpi = "kmsro dri3" diff --git a/sources/meta-raspberrypi/recipes-graphics/vc-graphics/vc-graphics.inc b/sources/meta-raspberrypi/recipes-graphics/vc-graphics/vc-graphics.inc index e5e8f535..fd370804 100644 --- a/sources/meta-raspberrypi/recipes-graphics/vc-graphics/vc-graphics.inc +++ b/sources/meta-raspberrypi/recipes-graphics/vc-graphics/vc-graphics.inc @@ -33,10 +33,10 @@ do_install () { cp -R include/* ${D}${includedir} install -d ${D}${libdir}/pkgconfig - install -m 0644 ${WORKDIR}/egl.pc ${D}${libdir}/pkgconfig/ + install -m 0644 ${UNPACKDIR}/egl.pc ${D}${libdir}/pkgconfig/ install -d ${D}/${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/vchiq.sh ${D}${sysconfdir}/init.d/ + install -m 0755 ${UNPACKDIR}/vchiq.sh ${D}${sysconfdir}/init.d/ } # These are proprietary binaries generated elsewhere so don't check ldflags diff --git a/sources/meta-raspberrypi/recipes-graphics/wayland/wayland-protocols_1.45.bb b/sources/meta-raspberrypi/recipes-graphics/wayland/wayland-protocols_1.45.bb deleted file mode 100644 index 7ef86e11..00000000 --- a/sources/meta-raspberrypi/recipes-graphics/wayland/wayland-protocols_1.45.bb +++ /dev/null @@ -1,27 +0,0 @@ -SUMMARY = "Collection of additional Wayland protocols" -DESCRIPTION = "Wayland protocols that add functionality not \ -available in the Wayland core protocol. Such protocols either add \ -completely new functionality, or extend the functionality of some other \ -protocol either in Wayland core, or some other protocol in \ -wayland-protocols." -HOMEPAGE = "http://wayland.freedesktop.org" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://COPYING;md5=c7b12b6702da38ca028ace54aae3d484 \ - file://stable/presentation-time/presentation-time.xml;endline=26;md5=4646cd7d9edc9fa55db941f2d3a7dc53" - -SRC_URI = "https://gitlab.freedesktop.org/wayland/wayland-protocols/-/releases/${PV}/downloads/wayland-protocols-${PV}.tar.xz" -SRC_URI[sha256sum] = "4d2b2a9e3e099d017dc8107bf1c334d27bb87d9e4aff19a0c8d856d17cd41ef0" - -UPSTREAM_CHECK_URI = "https://gitlab.freedesktop.org/wayland/wayland-protocols/-/tags" -UPSTREAM_CHECK_REGEX = "releases/(?P.+)" - -DEPENDS += "wayland-native" - -inherit meson pkgconfig allarch - -EXTRA_OEMESON += "-Dtests=false" - -BBCLASSEXTEND = "native nativesdk" - -# Use this newer version only for rpi MACHINEs -COMPATIBLE_MACHINE = "^rpi$" diff --git a/sources/meta-raspberrypi/recipes-graphics/wayland/weston-init.bbappend b/sources/meta-raspberrypi/recipes-graphics/wayland/weston-init.bbappend deleted file mode 100644 index b6d6f2e8..00000000 --- a/sources/meta-raspberrypi/recipes-graphics/wayland/weston-init.bbappend +++ /dev/null @@ -1,10 +0,0 @@ -FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" - -do_install:append:rpi() { - if [ -e ${D}/${sysconfdir}/init.d/weston ]; then - sed -i 's#weston-start --#weston-start -- --continue-without-input#' ${D}/${sysconfdir}/init.d/weston - fi - if [ -e ${D}${systemd_system_unitdir}/weston.service ]; then - sed -i 's#ExecStart=/usr/bin/weston#ExecStart=/usr/bin/weston --continue-without-input#' ${D}${systemd_system_unitdir}/weston.service - fi -} diff --git a/sources/meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xf86-config_%.bbappend b/sources/meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xf86-config_%.bbappend index dfcd0724..aebe1f9a 100644 --- a/sources/meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xf86-config_%.bbappend +++ b/sources/meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xf86-config_%.bbappend @@ -8,8 +8,8 @@ do_install:append:rpi () { PITFT="${@bb.utils.contains("MACHINE_FEATURES", "pitft", "1", "0", d)}" if [ "${PITFT}" = "1" ]; then install -d ${D}/${sysconfdir}/X11/xorg.conf.d/ - install -m 0644 ${WORKDIR}/xorg.conf.d/98-pitft.conf ${D}/${sysconfdir}/X11/xorg.conf.d/ - install -m 0644 ${WORKDIR}/xorg.conf.d/99-calibration.conf ${D}/${sysconfdir}/X11/xorg.conf.d/ + install -m 0644 ${UNPACKDIR}/xorg.conf.d/98-pitft.conf ${D}/${sysconfdir}/X11/xorg.conf.d/ + install -m 0644 ${UNPACKDIR}/xorg.conf.d/99-calibration.conf ${D}/${sysconfdir}/X11/xorg.conf.d/ fi } diff --git a/sources/meta-raspberrypi/recipes-kernel/linux-firmware-rpidistro/linux-firmware-rpidistro_git.bb b/sources/meta-raspberrypi/recipes-kernel/linux-firmware-rpidistro/linux-firmware-rpidistro_git.bb index 0409ba3f..f22ec548 100644 --- a/sources/meta-raspberrypi/recipes-kernel/linux-firmware-rpidistro/linux-firmware-rpidistro_git.bb +++ b/sources/meta-raspberrypi/recipes-kernel/linux-firmware-rpidistro/linux-firmware-rpidistro_git.bb @@ -27,6 +27,11 @@ inherit allarch do_configure[noexec] = "1" do_compile[noexec] = "1" +# The minimal firmware doesn't work with Raspberry Pi 5, so default to the +# standard firmware +CYFMAC43455_SDIO_FIRMWARE ??= "minimal" +CYFMAC43455_SDIO_FIRMWARE:raspberrypi5 ??= "standard" + do_install() { install -d ${D}${nonarch_base_libdir}/firmware/brcm ${D}${nonarch_base_libdir}/firmware/cypress @@ -43,6 +48,7 @@ do_install() { done cp -R --no-dereference --preserve=mode,links -v debian/config/brcm80211/cypress/* ${D}${nonarch_base_libdir}/firmware/cypress/ + ln -s cyfmac43455-sdio-${CYFMAC43455_SDIO_FIRMWARE}.bin ${D}${nonarch_base_libdir}/firmware/cypress/cyfmac43455-sdio.bin rm ${D}${nonarch_base_libdir}/firmware/cypress/README.txt } diff --git a/sources/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch b/sources/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch deleted file mode 100644 index 5e206e58..00000000 --- a/sources/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 160181edf5fc73288abfe99fa04de4a550cd9c65 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Thu, 11 Feb 2016 12:53:20 -0800 -Subject: [PATCH] Don't try to acquire buffer when src pad isn't active - -From: =?UTF-8?q?Enrique=20Oca=C3=B1a=20Gonz=C3=A1lez?= - -This solves a race condition when setting the pipeline from PAUSE to -NULL while the decoder loop is still running. Without this patch, the -thread which interacts with the decode sink pad gets blocked here: - - gst_element_change_state() - gst_element_change_state_func() - gst_element_pads_activate() --> Deactivating pads - activate_pads() - gst_pad_set_active() - gst_pad_activate_mode() - post_activate() - GST_PAD_STREAM_LOCK() - -while gst_omx_port_acquire_buffer() gets stalled forever in -gst_omx_component_wait_message() waiting for a message that will never -arrive: - - gst_omx_video_dec_loop() - gst_omx_port_acquire_buffer() - gst_omx_component_wait_message() - ---- -Upstream-Status: Pending - - omx/gstomxvideodec.c | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c -index abe6e30..c4dc33f 100644 ---- a/omx/gstomxvideodec.c -+++ b/omx/gstomxvideodec.c -@@ -1598,6 +1598,11 @@ gst_omx_video_dec_loop (GstOMXVideoDec * self) - GstOMXAcquireBufferReturn acq_return; - OMX_ERRORTYPE err; - -+ if (!gst_pad_is_active(GST_VIDEO_DECODER_SRC_PAD (self))) { -+ GST_DEBUG_OBJECT (self, "Src pad not active, not acquiring buffer and flushing instead"); -+ goto flushing; -+ } -+ - #if defined (USE_OMX_TARGET_RPI) && defined (HAVE_GST_GL) - port = self->eglimage ? self->egl_out_port : self->dec_out_port; - #else diff --git a/sources/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0003-no-timeout-on-get-state.patch b/sources/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0003-no-timeout-on-get-state.patch deleted file mode 100644 index db443e6c..00000000 --- a/sources/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0003-no-timeout-on-get-state.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 21f776bff596bc0bd09708efa6497f8bdcd065c0 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sat, 13 Feb 2016 11:42:29 -0800 - ---- -Upstream-Status: Pending - - omx/gstomxvideodec.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c -index c4dc33f..ba5304f 100644 ---- a/omx/gstomxvideodec.c -+++ b/omx/gstomxvideodec.c -@@ -2021,9 +2021,9 @@ gst_omx_video_dec_stop (GstVideoDecoder * decoder) - g_cond_broadcast (&self->drain_cond); - g_mutex_unlock (&self->drain_lock); - -- gst_omx_component_get_state (self->dec, 5 * GST_SECOND); -+ gst_omx_component_get_state (self->dec, 0); - #if defined (USE_OMX_TARGET_RPI) && defined (HAVE_GST_GL) -- gst_omx_component_get_state (self->egl_render, 1 * GST_SECOND); -+ gst_omx_component_get_state (self->egl_render, 0); - #endif - - gst_buffer_replace (&self->codec_data, NULL); diff --git a/sources/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0004-Properly-handle-drain-requests-while-flushing.patch b/sources/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0004-Properly-handle-drain-requests-while-flushing.patch deleted file mode 100644 index c0ef99d5..00000000 --- a/sources/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0004-Properly-handle-drain-requests-while-flushing.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 140bf8548843a98b0af2ddc1765ab59c16c8994c Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Enrique=20Oca=C3=B1a=20Gonz=C3=A1lez?= -Date: Tue, 17 Nov 2015 16:51:27 +0000 -Subject: [PATCH] Properly handle drain requests while flushing - -Without this commit the decoder streaming thread stops without ever attending -the drain request, leaving the decoder input thread waiting forever. - ---- -Upstream-Status: Pending - - omx/gstomx.c | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/omx/gstomx.c b/omx/gstomx.c -index 038ce32..5202d33 100644 ---- a/omx/gstomx.c -+++ b/omx/gstomx.c -@@ -1011,6 +1011,13 @@ gst_omx_component_new (GstObject * parent, const gchar * core_name, - - g_mutex_lock (&comp->lock); - gst_omx_component_handle_messages (comp); -+ -+ if (err != OMX_ErrorNone && comp->last_error == OMX_ErrorNone) { -+ GST_ERROR_OBJECT (comp->parent, -+ "Last operation returned an error. Setting last_error manually."); -+ comp->last_error = err; -+ } -+ - g_mutex_unlock (&comp->lock); - - return comp; diff --git a/sources/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0005-Don-t-abort-gst_omx_video_dec_set_format-if-there-s-.patch b/sources/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0005-Don-t-abort-gst_omx_video_dec_set_format-if-there-s-.patch deleted file mode 100644 index 9914bb89..00000000 --- a/sources/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0005-Don-t-abort-gst_omx_video_dec_set_format-if-there-s-.patch +++ /dev/null @@ -1,36 +0,0 @@ -From cf6cf2060c5a7a7ddc0396a0c20c234fc56c79b6 Mon Sep 17 00:00:00 2001 -From: Andrei Gherzan -Date: Tue, 28 May 2019 18:02:24 +0100 -Subject: [PATCH] Don't abort gst_omx_video_dec_set_format() if there's a - timeout releasing the buffers taken by the egl_render out port - -From 0d2ad639e6158c8023c157e206ef3ff7abdc089c Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Enrique=20Oca=C3=B1a=20Gonz=C3=A1lez?= - -Date: Fri, 4 Dec 2015 18:39:59 +0100 -Subject: [PATCH] Don't abort gst_omx_video_dec_set_format() if there's a -timeout releasing the buffers taken by the egl_render out port - -Upstream-Status: Pending -Signed-off-by: Andrei Gherzan ---- - omx/gstomxvideodec.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c -index ba5304f..8bd5d3d 100644 ---- a/omx/gstomxvideodec.c -+++ b/omx/gstomxvideodec.c -@@ -2229,7 +2229,9 @@ gst_omx_video_dec_disable (GstOMXVideoDec * self) - return FALSE; - if (gst_omx_port_wait_buffers_released (out_port, - 1 * GST_SECOND) != OMX_ErrorNone) -+#if !(defined (USE_OMX_TARGET_RPI) && defined (HAVE_GST_GL)) - return FALSE; -+#endif - if (!gst_omx_video_dec_deallocate_output_buffers (self)) - return FALSE; - if (gst_omx_port_wait_enabled (out_port, 1 * GST_SECOND) != OMX_ErrorNone) --- -2.17.1 - diff --git a/sources/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx_%.bbappend b/sources/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx_%.bbappend deleted file mode 100644 index 5e0b4578..00000000 --- a/sources/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx_%.bbappend +++ /dev/null @@ -1,12 +0,0 @@ -FILESEXTRAPATHS:prepend:rpi := "${THISDIR}/${PN}:" - -SRC_URI:append:rpi = " \ - file://0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch \ - file://0003-no-timeout-on-get-state.patch \ - file://0004-Properly-handle-drain-requests-while-flushing.patch \ - file://0005-Don-t-abort-gst_omx_video_dec_set_format-if-there-s-.patch \ -" - -GSTREAMER_1_0_OMX_TARGET:rpi = "rpi" -GSTREAMER_1_0_OMX_CORE_NAME:rpi = "${libdir}/libopenmaxil.so" -EXTRA_OEMESON:append:rpi = " -Dheader_path=${STAGING_DIR_TARGET}/usr/include/IL" diff --git a/sources/meta-raspberrypi/recipes-multimedia/picamera-libs/picamera-libs.bb b/sources/meta-raspberrypi/recipes-multimedia/picamera-libs/picamera-libs.bb index f873a199..28604428 100644 --- a/sources/meta-raspberrypi/recipes-multimedia/picamera-libs/picamera-libs.bb +++ b/sources/meta-raspberrypi/recipes-multimedia/picamera-libs/picamera-libs.bb @@ -11,6 +11,7 @@ S = "${RPIFW_S}" do_install(){ install -m 0755 -d ${D}${libdir} install -m 0755 ${S}/opt/vc/lib/*.so ${D}${libdir} + rm -f ${D}${libdir}/libGLES* ${D}${libdir}/libEGL* ${D}${libdir}/libWFC.so ${D}${libdir}/libOpenVG.so } FILES:${PN} = "${libdir}" diff --git a/sources/meta-raspberrypi/recipes-multimedia/rpidistro-ffmpeg/files/0001-avcodec-arm-sbcenc-avoid-callee-preserved-vfp-regist.patch b/sources/meta-raspberrypi/recipes-multimedia/rpidistro-ffmpeg/files/0001-avcodec-arm-sbcenc-avoid-callee-preserved-vfp-regist.patch deleted file mode 100644 index d9c07dd7..00000000 --- a/sources/meta-raspberrypi/recipes-multimedia/rpidistro-ffmpeg/files/0001-avcodec-arm-sbcenc-avoid-callee-preserved-vfp-regist.patch +++ /dev/null @@ -1,292 +0,0 @@ -From: James Cowgill -Date: Sun, 11 Aug 2019 16:50:56 +0100 -Subject: avcodec/arm/sbcenc: avoid callee preserved vfp registers - -Upstream-Status: Inappropriate - -RPI-Distro repo clones original ffmpeg and applies patches to enable -raspiberry pi support. - -When compiling FFmpeg with GCC-9, some very random segfaults were -observed in code which had previously called down into the SBC encoder -NEON assembly routines. This was caused by these functions clobbering -some of the vfp callee saved registers (d8 - d15 aka q4 - q7). GCC was -using these registers to save local variables, but after these -functions returned, they would contain garbage. - -Fix by reallocating the registers in the two affected functions in -the following way: - ff_sbc_analyze_4_neon: q2-q5 => q8-q11, then q1-q4 => q8-q11 - ff_sbc_analyze_8_neon: q2-q9 => q8-q15 - -The reason for using these replacements is to keep closely related -sets of registers consecutively numbered which hopefully makes the -code more easy to follow. Since this commit only reallocates -registers, it should have no performance impact. - -Signed-off-by: James Cowgill ---- - libavcodec/arm/sbcdsp_neon.S | 220 +++++++++++++++++++++---------------------- - 1 file changed, 110 insertions(+), 110 deletions(-) - -diff --git a/libavcodec/arm/sbcdsp_neon.S b/libavcodec/arm/sbcdsp_neon.S -index d83d21d..914abfb 100644 ---- a/libavcodec/arm/sbcdsp_neon.S -+++ b/libavcodec/arm/sbcdsp_neon.S -@@ -38,49 +38,49 @@ function ff_sbc_analyze_4_neon, export=1 - /* TODO: merge even and odd cases (or even merge all four calls to this - * function) in order to have only aligned reads from 'in' array - * and reduce number of load instructions */ -- vld1.16 {d4, d5}, [r0, :64]! -- vld1.16 {d8, d9}, [r2, :128]! -+ vld1.16 {d16, d17}, [r0, :64]! -+ vld1.16 {d20, d21}, [r2, :128]! - -- vmull.s16 q0, d4, d8 -- vld1.16 {d6, d7}, [r0, :64]! -- vmull.s16 q1, d5, d9 -- vld1.16 {d10, d11}, [r2, :128]! -+ vmull.s16 q0, d16, d20 -+ vld1.16 {d18, d19}, [r0, :64]! -+ vmull.s16 q1, d17, d21 -+ vld1.16 {d22, d23}, [r2, :128]! - -- vmlal.s16 q0, d6, d10 -- vld1.16 {d4, d5}, [r0, :64]! -- vmlal.s16 q1, d7, d11 -- vld1.16 {d8, d9}, [r2, :128]! -+ vmlal.s16 q0, d18, d22 -+ vld1.16 {d16, d17}, [r0, :64]! -+ vmlal.s16 q1, d19, d23 -+ vld1.16 {d20, d21}, [r2, :128]! - -- vmlal.s16 q0, d4, d8 -- vld1.16 {d6, d7}, [r0, :64]! -- vmlal.s16 q1, d5, d9 -- vld1.16 {d10, d11}, [r2, :128]! -+ vmlal.s16 q0, d16, d20 -+ vld1.16 {d18, d19}, [r0, :64]! -+ vmlal.s16 q1, d17, d21 -+ vld1.16 {d22, d23}, [r2, :128]! - -- vmlal.s16 q0, d6, d10 -- vld1.16 {d4, d5}, [r0, :64]! -- vmlal.s16 q1, d7, d11 -- vld1.16 {d8, d9}, [r2, :128]! -+ vmlal.s16 q0, d18, d22 -+ vld1.16 {d16, d17}, [r0, :64]! -+ vmlal.s16 q1, d19, d23 -+ vld1.16 {d20, d21}, [r2, :128]! - -- vmlal.s16 q0, d4, d8 -- vmlal.s16 q1, d5, d9 -+ vmlal.s16 q0, d16, d20 -+ vmlal.s16 q1, d17, d21 - - vpadd.s32 d0, d0, d1 - vpadd.s32 d1, d2, d3 - - vrshrn.s32 d0, q0, SBC_PROTO_FIXED_SCALE - -- vld1.16 {d2, d3, d4, d5}, [r2, :128]! -+ vld1.16 {d16, d17, d18, d19}, [r2, :128]! - - vdup.i32 d1, d0[1] /* TODO: can be eliminated */ - vdup.i32 d0, d0[0] /* TODO: can be eliminated */ - -- vmull.s16 q3, d2, d0 -- vmull.s16 q4, d3, d0 -- vmlal.s16 q3, d4, d1 -- vmlal.s16 q4, d5, d1 -+ vmull.s16 q10, d16, d0 -+ vmull.s16 q11, d17, d0 -+ vmlal.s16 q10, d18, d1 -+ vmlal.s16 q11, d19, d1 - -- vpadd.s32 d0, d6, d7 /* TODO: can be eliminated */ -- vpadd.s32 d1, d8, d9 /* TODO: can be eliminated */ -+ vpadd.s32 d0, d20, d21 /* TODO: can be eliminated */ -+ vpadd.s32 d1, d22, d23 /* TODO: can be eliminated */ - - vst1.32 {d0, d1}, [r1, :128] - -@@ -91,57 +91,57 @@ function ff_sbc_analyze_8_neon, export=1 - /* TODO: merge even and odd cases (or even merge all four calls to this - * function) in order to have only aligned reads from 'in' array - * and reduce number of load instructions */ -- vld1.16 {d4, d5}, [r0, :64]! -- vld1.16 {d8, d9}, [r2, :128]! -- -- vmull.s16 q6, d4, d8 -- vld1.16 {d6, d7}, [r0, :64]! -- vmull.s16 q7, d5, d9 -- vld1.16 {d10, d11}, [r2, :128]! -- vmull.s16 q8, d6, d10 -- vld1.16 {d4, d5}, [r0, :64]! -- vmull.s16 q9, d7, d11 -- vld1.16 {d8, d9}, [r2, :128]! -- -- vmlal.s16 q6, d4, d8 -- vld1.16 {d6, d7}, [r0, :64]! -- vmlal.s16 q7, d5, d9 -- vld1.16 {d10, d11}, [r2, :128]! -- vmlal.s16 q8, d6, d10 -- vld1.16 {d4, d5}, [r0, :64]! -- vmlal.s16 q9, d7, d11 -- vld1.16 {d8, d9}, [r2, :128]! -- -- vmlal.s16 q6, d4, d8 -- vld1.16 {d6, d7}, [r0, :64]! -- vmlal.s16 q7, d5, d9 -- vld1.16 {d10, d11}, [r2, :128]! -- vmlal.s16 q8, d6, d10 -- vld1.16 {d4, d5}, [r0, :64]! -- vmlal.s16 q9, d7, d11 -- vld1.16 {d8, d9}, [r2, :128]! -- -- vmlal.s16 q6, d4, d8 -- vld1.16 {d6, d7}, [r0, :64]! -- vmlal.s16 q7, d5, d9 -- vld1.16 {d10, d11}, [r2, :128]! -- vmlal.s16 q8, d6, d10 -- vld1.16 {d4, d5}, [r0, :64]! -- vmlal.s16 q9, d7, d11 -- vld1.16 {d8, d9}, [r2, :128]! -- -- vmlal.s16 q6, d4, d8 -- vld1.16 {d6, d7}, [r0, :64]! -- vmlal.s16 q7, d5, d9 -- vld1.16 {d10, d11}, [r2, :128]! -- -- vmlal.s16 q8, d6, d10 -- vmlal.s16 q9, d7, d11 -- -- vpadd.s32 d0, d12, d13 -- vpadd.s32 d1, d14, d15 -- vpadd.s32 d2, d16, d17 -- vpadd.s32 d3, d18, d19 -+ vld1.16 {d16, d17}, [r0, :64]! -+ vld1.16 {d20, d21}, [r2, :128]! -+ -+ vmull.s16 q12, d16, d20 -+ vld1.16 {d18, d19}, [r0, :64]! -+ vmull.s16 q13, d17, d21 -+ vld1.16 {d22, d23}, [r2, :128]! -+ vmull.s16 q14, d18, d22 -+ vld1.16 {d16, d17}, [r0, :64]! -+ vmull.s16 q15, d19, d23 -+ vld1.16 {d20, d21}, [r2, :128]! -+ -+ vmlal.s16 q12, d16, d20 -+ vld1.16 {d18, d19}, [r0, :64]! -+ vmlal.s16 q13, d17, d21 -+ vld1.16 {d22, d23}, [r2, :128]! -+ vmlal.s16 q14, d18, d22 -+ vld1.16 {d16, d17}, [r0, :64]! -+ vmlal.s16 q15, d19, d23 -+ vld1.16 {d20, d21}, [r2, :128]! -+ -+ vmlal.s16 q12, d16, d20 -+ vld1.16 {d18, d19}, [r0, :64]! -+ vmlal.s16 q13, d17, d21 -+ vld1.16 {d22, d23}, [r2, :128]! -+ vmlal.s16 q14, d18, d22 -+ vld1.16 {d16, d17}, [r0, :64]! -+ vmlal.s16 q15, d19, d23 -+ vld1.16 {d20, d21}, [r2, :128]! -+ -+ vmlal.s16 q12, d16, d20 -+ vld1.16 {d18, d19}, [r0, :64]! -+ vmlal.s16 q13, d17, d21 -+ vld1.16 {d22, d23}, [r2, :128]! -+ vmlal.s16 q14, d18, d22 -+ vld1.16 {d16, d17}, [r0, :64]! -+ vmlal.s16 q15, d19, d23 -+ vld1.16 {d20, d21}, [r2, :128]! -+ -+ vmlal.s16 q12, d16, d20 -+ vld1.16 {d18, d19}, [r0, :64]! -+ vmlal.s16 q13, d17, d21 -+ vld1.16 {d22, d23}, [r2, :128]! -+ -+ vmlal.s16 q14, d18, d22 -+ vmlal.s16 q15, d19, d23 -+ -+ vpadd.s32 d0, d24, d25 -+ vpadd.s32 d1, d26, d27 -+ vpadd.s32 d2, d28, d29 -+ vpadd.s32 d3, d30, d31 - - vrshr.s32 q0, q0, SBC_PROTO_FIXED_SCALE - vrshr.s32 q1, q1, SBC_PROTO_FIXED_SCALE -@@ -153,38 +153,38 @@ function ff_sbc_analyze_8_neon, export=1 - vdup.i32 d1, d0[1] /* TODO: can be eliminated */ - vdup.i32 d0, d0[0] /* TODO: can be eliminated */ - -- vld1.16 {d4, d5}, [r2, :128]! -- vmull.s16 q6, d4, d0 -- vld1.16 {d6, d7}, [r2, :128]! -- vmull.s16 q7, d5, d0 -- vmull.s16 q8, d6, d0 -- vmull.s16 q9, d7, d0 -- -- vld1.16 {d4, d5}, [r2, :128]! -- vmlal.s16 q6, d4, d1 -- vld1.16 {d6, d7}, [r2, :128]! -- vmlal.s16 q7, d5, d1 -- vmlal.s16 q8, d6, d1 -- vmlal.s16 q9, d7, d1 -- -- vld1.16 {d4, d5}, [r2, :128]! -- vmlal.s16 q6, d4, d2 -- vld1.16 {d6, d7}, [r2, :128]! -- vmlal.s16 q7, d5, d2 -- vmlal.s16 q8, d6, d2 -- vmlal.s16 q9, d7, d2 -- -- vld1.16 {d4, d5}, [r2, :128]! -- vmlal.s16 q6, d4, d3 -- vld1.16 {d6, d7}, [r2, :128]! -- vmlal.s16 q7, d5, d3 -- vmlal.s16 q8, d6, d3 -- vmlal.s16 q9, d7, d3 -- -- vpadd.s32 d0, d12, d13 /* TODO: can be eliminated */ -- vpadd.s32 d1, d14, d15 /* TODO: can be eliminated */ -- vpadd.s32 d2, d16, d17 /* TODO: can be eliminated */ -- vpadd.s32 d3, d18, d19 /* TODO: can be eliminated */ -+ vld1.16 {d16, d17}, [r2, :128]! -+ vmull.s16 q12, d16, d0 -+ vld1.16 {d18, d19}, [r2, :128]! -+ vmull.s16 q13, d17, d0 -+ vmull.s16 q14, d18, d0 -+ vmull.s16 q15, d19, d0 -+ -+ vld1.16 {d16, d17}, [r2, :128]! -+ vmlal.s16 q12, d16, d1 -+ vld1.16 {d18, d19}, [r2, :128]! -+ vmlal.s16 q13, d17, d1 -+ vmlal.s16 q14, d18, d1 -+ vmlal.s16 q15, d19, d1 -+ -+ vld1.16 {d16, d17}, [r2, :128]! -+ vmlal.s16 q12, d16, d2 -+ vld1.16 {d18, d19}, [r2, :128]! -+ vmlal.s16 q13, d17, d2 -+ vmlal.s16 q14, d18, d2 -+ vmlal.s16 q15, d19, d2 -+ -+ vld1.16 {d16, d17}, [r2, :128]! -+ vmlal.s16 q12, d16, d3 -+ vld1.16 {d18, d19}, [r2, :128]! -+ vmlal.s16 q13, d17, d3 -+ vmlal.s16 q14, d18, d3 -+ vmlal.s16 q15, d19, d3 -+ -+ vpadd.s32 d0, d24, d25 /* TODO: can be eliminated */ -+ vpadd.s32 d1, d26, d27 /* TODO: can be eliminated */ -+ vpadd.s32 d2, d28, d29 /* TODO: can be eliminated */ -+ vpadd.s32 d3, d30, d31 /* TODO: can be eliminated */ - - vst1.32 {d0, d1, d2, d3}, [r1, :128] - diff --git a/sources/meta-raspberrypi/recipes-multimedia/rpidistro-ffmpeg/files/0001-ffmpeg-5.1.4-rpi_24.patch b/sources/meta-raspberrypi/recipes-multimedia/rpidistro-ffmpeg/files/0001-ffmpeg-5.1.4-rpi_24.patch new file mode 100644 index 00000000..016cf404 --- /dev/null +++ b/sources/meta-raspberrypi/recipes-multimedia/rpidistro-ffmpeg/files/0001-ffmpeg-5.1.4-rpi_24.patch @@ -0,0 +1,24074 @@ + +Upstream-Status: Inappropriate + +RPI-Distro repo clones original ffmpeg and applies patches to enable +raspiberry pi support. + +--- a/configure ++++ b/configure +@@ -205,6 +205,7 @@ External library support: + --disable-bzlib disable bzlib [autodetect] + --disable-coreimage disable Apple CoreImage framework [autodetect] + --enable-chromaprint enable audio fingerprinting with chromaprint [no] ++ --disable-epoxy disable epoxy [autodetect] + --enable-frei0r enable frei0r video filtering [no] + --enable-gcrypt enable gcrypt, needed for rtmp(t)e support + if openssl, librtmp or gmp is not used [no] +@@ -281,6 +282,7 @@ External library support: + if openssl, gnutls or mbedtls is not used [no] + --enable-libtwolame enable MP2 encoding via libtwolame [no] + --enable-libuavs3d enable AVS3 decoding via libuavs3d [no] ++ --disable-libudev disable libudev [autodetect] + --enable-libv4l2 enable libv4l2/v4l-utils [no] + --enable-libvidstab enable video stabilization using vid.stab [no] + --enable-libvmaf enable vmaf filter via libvmaf [no] +@@ -343,12 +345,16 @@ External library support: + --enable-libmfx enable Intel MediaSDK (AKA Quick Sync Video) code via libmfx [no] + --enable-libnpp enable Nvidia Performance Primitives-based code [no] + --enable-mmal enable Broadcom Multi-Media Abstraction Layer (Raspberry Pi) via MMAL [no] ++ --enable-sand enable sand video formats [rpi] ++ --enable-vout-drm enable the vout_drm module - for internal testing only [no] ++ --enable-vout-egl enable the vout_egl module - for internal testing only [no] + --disable-nvdec disable Nvidia video decoding acceleration (via hwaccel) [autodetect] + --disable-nvenc disable Nvidia video encoding code [autodetect] + --enable-omx enable OpenMAX IL code [no] + --enable-omx-rpi enable OpenMAX IL code for Raspberry Pi [no] + --enable-rkmpp enable Rockchip Media Process Platform code [no] + --disable-v4l2-m2m disable V4L2 mem2mem code [autodetect] ++ --enable-v4l2-request enable V4L2 request API code [no] + --disable-vaapi disable Video Acceleration API (mainly Unix/Intel) code [autodetect] + --disable-vdpau disable Nvidia Video Decode and Presentation API for Unix code [autodetect] + --disable-videotoolbox disable VideoToolbox code [autodetect] +@@ -1754,7 +1760,9 @@ EXTERNAL_AUTODETECT_LIBRARY_LIST=" + avfoundation + bzlib + coreimage ++ epoxy + iconv ++ libudev + libxcb + libxcb_shm + libxcb_shape +@@ -1924,6 +1932,7 @@ HWACCEL_LIBRARY_LIST=" + mmal + omx + opencl ++ v4l2_request + " + + DOCUMENT_LIST=" +@@ -1941,10 +1950,14 @@ FEATURE_LIST=" + omx_rpi + runtime_cpudetect + safe_bitstream_reader ++ sand + shared + small + static + swscale_alpha ++ vout_drm ++ vout_egl ++ v4l2_req_hevc_vx + " + + # this list should be kept in linking order +@@ -2501,6 +2514,7 @@ CONFIG_EXTRA=" + rtpdec + rtpenc_chain + rv34dsp ++ sand + scene_sad + sinewin + snappy +@@ -3011,6 +3025,7 @@ d3d11va_deps="dxva_h ID3D11VideoDecoder + dxva2_deps="dxva2api_h DXVA2_ConfigPictureDecode ole32 user32" + ffnvcodec_deps_any="libdl LoadLibrary" + nvdec_deps="ffnvcodec" ++v4l2_request_deps="linux_videodev2_h linux_media_h v4l2_timeval_to_ns libdrm libudev" + vaapi_x11_deps="xlib_x11" + videotoolbox_hwaccel_deps="videotoolbox pthreads" + videotoolbox_hwaccel_extralibs="-framework QuartzCore" +@@ -3054,6 +3069,8 @@ hevc_dxva2_hwaccel_deps="dxva2 DXVA_PicP + hevc_dxva2_hwaccel_select="hevc_decoder" + hevc_nvdec_hwaccel_deps="nvdec" + hevc_nvdec_hwaccel_select="hevc_decoder" ++hevc_v4l2request_hwaccel_deps="v4l2_request" ++hevc_v4l2request_hwaccel_select="hevc_decoder" + hevc_vaapi_hwaccel_deps="vaapi VAPictureParameterBufferHEVC" + hevc_vaapi_hwaccel_select="hevc_decoder" + hevc_vdpau_hwaccel_deps="vdpau VdpPictureInfoHEVC" +@@ -3539,8 +3556,11 @@ sndio_indev_deps="sndio" + sndio_outdev_deps="sndio" + v4l2_indev_deps_any="linux_videodev2_h sys_videoio_h" + v4l2_indev_suggest="libv4l2" ++v4l2_outdev_deps="libdrm" + v4l2_outdev_deps_any="linux_videodev2_h sys_videoio_h" + v4l2_outdev_suggest="libv4l2" ++vout_drm_outdev_deps="libdrm" ++vout_egl_outdev_deps="xlib epoxy" + vfwcap_indev_deps="vfw32 vfwcap_defines" + xcbgrab_indev_deps="libxcb" + xcbgrab_indev_suggest="libxcb_shm libxcb_shape libxcb_xfixes" +@@ -3745,6 +3765,7 @@ tonemap_opencl_filter_deps="opencl const + transpose_opencl_filter_deps="opencl" + transpose_vaapi_filter_deps="vaapi VAProcPipelineCaps_rotation_flags" + transpose_vulkan_filter_deps="vulkan spirv_compiler" ++unsand_filter_select="sand" + unsharp_opencl_filter_deps="opencl" + uspp_filter_deps="gpl avcodec" + vaguedenoiser_filter_deps="gpl" +@@ -6296,6 +6317,12 @@ if enabled xlib; then + disable xlib + fi + ++enabled libudev && ++ check_pkg_config libudev libudev libudev.h udev_new ++ ++enabled epoxy && ++ check_pkg_config epoxy epoxy epoxy/egl.h epoxy_egl_version ++ + check_headers direct.h + check_headers dirent.h + check_headers dxgidebug.h +@@ -6735,8 +6762,16 @@ enabled rkmpp && { require_p + { enabled libdrm || + die "ERROR: rkmpp requires --enable-libdrm"; } + } ++enabled v4l2_request && { enabled libdrm || ++ die "ERROR: v4l2-request requires --enable-libdrm"; } && ++ { enabled libudev || ++ die "ERROR: v4l2-request requires libudev"; } + enabled vapoursynth && require_pkg_config vapoursynth "vapoursynth-script >= 42" VSScript.h vsscript_init + ++enabled vout_drm && { enabled libdrm || die "ERROR: vout_drm requires --enable-libdrm"; } ++ ++enabled vout_egl && { enabled epoxy || die "ERROR: vout_egl requires epoxy"; } && ++ { enabled xlib || die "ERROR: vout_egl requires xlib"; } + + if enabled gcrypt; then + GCRYPT_CONFIG="${cross_prefix}libgcrypt-config" +@@ -6817,6 +6852,10 @@ if enabled v4l2_m2m; then + check_cc vp9_v4l2_m2m linux/videodev2.h "int i = V4L2_PIX_FMT_VP9;" + fi + ++check_func_headers "linux/media.h linux/videodev2.h" v4l2_timeval_to_ns ++check_cc hevc_v4l2_request linux/videodev2.h "int i = V4L2_PIX_FMT_HEVC_SLICE;" ++disable v4l2_req_hevc_vx ++ + check_headers sys/videoio.h + test_code cc sys/videoio.h "struct v4l2_frmsizeenum vfse; vfse.discrete.width = 0;" && enable_sanitized struct_v4l2_frmivalenum_discrete + +@@ -7305,6 +7344,9 @@ check_deps $CONFIG_LIST \ + + enabled threads && ! enabled pthreads && ! enabled atomics_native && die "non pthread threading without atomics not supported, try adding --enable-pthreads or --cpu=i486 or higher if you are on x86" + ++# Sub-feature of hevc_v4l2request_hwaccel - can only be set once deps are done ++enabled hevc_v4l2request_hwaccel && disabled hevc_v4l2_request && enable v4l2_req_hevc_vx ++ + case $target_os in + haiku) + disable memalign +--- a/fftools/ffmpeg.c ++++ b/fftools/ffmpeg.c +@@ -1953,8 +1953,8 @@ static int ifilter_send_frame(InputFilte + av_channel_layout_compare(&ifilter->ch_layout, &frame->ch_layout); + break; + case AVMEDIA_TYPE_VIDEO: +- need_reinit |= ifilter->width != frame->width || +- ifilter->height != frame->height; ++ need_reinit |= ifilter->width != av_frame_cropped_width(frame) || ++ ifilter->height != av_frame_cropped_height(frame); + break; + } + +@@ -1965,6 +1965,9 @@ static int ifilter_send_frame(InputFilte + (ifilter->hw_frames_ctx && ifilter->hw_frames_ctx->data != frame->hw_frames_ctx->data)) + need_reinit = 1; + ++ if (no_cvt_hw && fg->graph) ++ need_reinit = 0; ++ + if (sd = av_frame_get_side_data(frame, AV_FRAME_DATA_DISPLAYMATRIX)) { + if (!ifilter->displaymatrix || memcmp(sd->data, ifilter->displaymatrix, sizeof(int32_t) * 9)) + need_reinit = 1; +@@ -2220,8 +2223,7 @@ static int decode_video(InputStream *ist + decoded_frame->top_field_first = ist->top_field_first; + + ist->frames_decoded++; +- +- if (ist->hwaccel_retrieve_data && decoded_frame->format == ist->hwaccel_pix_fmt) { ++ if (!no_cvt_hw && ist->hwaccel_retrieve_data && decoded_frame->format == ist->hwaccel_pix_fmt) { + err = ist->hwaccel_retrieve_data(ist->dec_ctx, decoded_frame); + if (err < 0) + goto fail; +@@ -2418,7 +2420,12 @@ static int process_input_packet(InputStr + case AVMEDIA_TYPE_VIDEO: + ret = decode_video (ist, repeating ? NULL : avpkt, &got_output, &duration_pts, !pkt, + &decode_failed); +- if (!repeating || !pkt || got_output) { ++ // Pi: Do not inc dts if no_cvt_hw set ++ // V4L2 H264 decode has long latency and sometimes spits out a long ++ // stream of output without input. In this case incrementing DTS is wrong. ++ // There may be cases where the condition as written is correct so only ++ // "fix" in the cases which cause problems ++ if (!repeating || !pkt || (got_output && !no_cvt_hw)) { + if (pkt && pkt->duration) { + duration_dts = av_rescale_q(pkt->duration, ist->st->time_base, AV_TIME_BASE_Q); + } else if(ist->dec_ctx->framerate.num != 0 && ist->dec_ctx->framerate.den != 0) { +@@ -2564,12 +2571,15 @@ static enum AVPixelFormat get_format(AVC + break; + + if (ist->hwaccel_id == HWACCEL_GENERIC || +- ist->hwaccel_id == HWACCEL_AUTO) { ++ ist->hwaccel_id == HWACCEL_AUTO || ++ no_cvt_hw) { + for (i = 0;; i++) { + config = avcodec_get_hw_config(s->codec, i); + if (!config) + break; +- if (!(config->methods & ++ if (no_cvt_hw && (config->methods & AV_CODEC_HW_CONFIG_METHOD_INTERNAL)) ++ av_log(s, AV_LOG_DEBUG, "no_cvt_hw so trying pix_fmt %d with codec internal hwaccel\n", *p); ++ else if (!(config->methods & + AV_CODEC_HW_CONFIG_METHOD_HW_DEVICE_CTX)) + continue; + if (config->pix_fmt == *p) +--- a/fftools/ffmpeg.h ++++ b/fftools/ffmpeg.h +@@ -626,6 +626,7 @@ extern enum VideoSyncMethod video_sync_m + extern float frame_drop_threshold; + extern int do_benchmark; + extern int do_benchmark_all; ++extern int no_cvt_hw; + extern int do_deinterlace; + extern int do_hex_dump; + extern int do_pkt_dump; +--- a/fftools/ffmpeg_filter.c ++++ b/fftools/ffmpeg_filter.c +@@ -1175,8 +1175,8 @@ int ifilter_parameters_from_frame(InputF + + ifilter->format = frame->format; + +- ifilter->width = frame->width; +- ifilter->height = frame->height; ++ ifilter->width = av_frame_cropped_width(frame); ++ ifilter->height = av_frame_cropped_height(frame); + ifilter->sample_aspect_ratio = frame->sample_aspect_ratio; + + ifilter->sample_rate = frame->sample_rate; +--- a/fftools/ffmpeg_hw.c ++++ b/fftools/ffmpeg_hw.c +@@ -75,6 +75,8 @@ static char *hw_device_default_name(enum + char *name; + size_t index_pos; + int index, index_limit = 1000; ++ if (!type_name) ++ return NULL; + index_pos = strlen(type_name); + name = av_malloc(index_pos + 4); + if (!name) +--- a/fftools/ffmpeg_opt.c ++++ b/fftools/ffmpeg_opt.c +@@ -162,6 +162,7 @@ enum VideoSyncMethod video_sync_method = + float frame_drop_threshold = 0; + int do_benchmark = 0; + int do_benchmark_all = 0; ++int no_cvt_hw = 0; + int do_hex_dump = 0; + int do_pkt_dump = 0; + int copy_ts = 0; +@@ -3724,6 +3725,8 @@ const OptionDef options[] = { + "add timings for benchmarking" }, + { "benchmark_all", OPT_BOOL | OPT_EXPERT, { &do_benchmark_all }, + "add timings for each task" }, ++ { "no_cvt_hw", OPT_BOOL | OPT_EXPERT, { &no_cvt_hw }, ++ "do not auto-convert hw frames to sw" }, + { "progress", HAS_ARG | OPT_EXPERT, { .func_arg = opt_progress }, + "write program-readable progress information", "url" }, + { "stdin", OPT_BOOL | OPT_EXPERT, { &stdin_interaction }, +--- a/libavcodec/Makefile ++++ b/libavcodec/Makefile +@@ -161,7 +161,10 @@ OBJS-$(CONFIG_VIDEODSP) + + OBJS-$(CONFIG_VP3DSP) += vp3dsp.o + OBJS-$(CONFIG_VP56DSP) += vp56dsp.o + OBJS-$(CONFIG_VP8DSP) += vp8dsp.o +-OBJS-$(CONFIG_V4L2_M2M) += v4l2_m2m.o v4l2_context.o v4l2_buffers.o v4l2_fmt.o ++OBJS-$(CONFIG_V4L2_M2M) += v4l2_m2m.o v4l2_context.o v4l2_buffers.o v4l2_fmt.o\ ++ weak_link.o v4l2_req_dmabufs.o ++OBJS-$(CONFIG_V4L2_REQUEST) += v4l2_req_media.o v4l2_req_pollqueue.o v4l2_req_dmabufs.o\ ++ v4l2_req_devscan.o weak_link.o + OBJS-$(CONFIG_WMA_FREQS) += wma_freqs.o + OBJS-$(CONFIG_WMV2DSP) += wmv2dsp.o + +@@ -972,6 +975,8 @@ OBJS-$(CONFIG_HEVC_D3D11VA_HWACCEL) + OBJS-$(CONFIG_HEVC_DXVA2_HWACCEL) += dxva2_hevc.o + OBJS-$(CONFIG_HEVC_NVDEC_HWACCEL) += nvdec_hevc.o + OBJS-$(CONFIG_HEVC_QSV_HWACCEL) += qsvdec.o ++OBJS-$(CONFIG_HEVC_V4L2REQUEST_HWACCEL) += v4l2_request_hevc.o v4l2_req_decode_q.o v4l2_req_hevc_v4.o ++OBJS-$(CONFIG_V4L2_REQ_HEVC_VX) += v4l2_req_hevc_v1.o v4l2_req_hevc_v2.o v4l2_req_hevc_v3.o + OBJS-$(CONFIG_HEVC_VAAPI_HWACCEL) += vaapi_hevc.o h265_profile_level.o + OBJS-$(CONFIG_HEVC_VDPAU_HWACCEL) += vdpau_hevc.o h265_profile_level.o + OBJS-$(CONFIG_MJPEG_NVDEC_HWACCEL) += nvdec_mjpeg.o +--- a/libavcodec/avcodec.h ++++ b/libavcodec/avcodec.h +@@ -2212,6 +2212,17 @@ typedef struct AVHWAccel { + * that avctx->hwaccel_priv_data is invalid. + */ + int (*frame_params)(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx); ++ ++ /** ++ * Called if parsing fails ++ * ++ * An error has occured, end_frame will not be called ++ * start_frame & decode_slice may or may not have been called ++ * Optional ++ * ++ * @param avctx the codec context ++ */ ++ void (*abort_frame)(AVCodecContext *avctx); + } AVHWAccel; + + /** +--- /dev/null ++++ b/libavcodec/hevc-ctrls-v1.h +@@ -0,0 +1,229 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ ++/* ++ * These are the HEVC state controls for use with stateless HEVC ++ * codec drivers. ++ * ++ * It turns out that these structs are not stable yet and will undergo ++ * more changes. So keep them private until they are stable and ready to ++ * become part of the official public API. ++ */ ++ ++#ifndef _HEVC_CTRLS_H_ ++#define _HEVC_CTRLS_H_ ++ ++#include ++ ++/* The pixel format isn't stable at the moment and will likely be renamed. */ ++#define V4L2_PIX_FMT_HEVC_SLICE v4l2_fourcc('S', '2', '6', '5') /* HEVC parsed slices */ ++ ++#define V4L2_CID_MPEG_VIDEO_HEVC_SPS (V4L2_CID_MPEG_BASE + 1008) ++#define V4L2_CID_MPEG_VIDEO_HEVC_PPS (V4L2_CID_MPEG_BASE + 1009) ++#define V4L2_CID_MPEG_VIDEO_HEVC_SLICE_PARAMS (V4L2_CID_MPEG_BASE + 1010) ++#define V4L2_CID_MPEG_VIDEO_HEVC_SCALING_MATRIX (V4L2_CID_MPEG_BASE + 1011) ++#define V4L2_CID_MPEG_VIDEO_HEVC_DECODE_MODE (V4L2_CID_MPEG_BASE + 1015) ++#define V4L2_CID_MPEG_VIDEO_HEVC_START_CODE (V4L2_CID_MPEG_BASE + 1016) ++ ++/* enum v4l2_ctrl_type type values */ ++#define V4L2_CTRL_TYPE_HEVC_SPS 0x0120 ++#define V4L2_CTRL_TYPE_HEVC_PPS 0x0121 ++#define V4L2_CTRL_TYPE_HEVC_SLICE_PARAMS 0x0122 ++#define V4L2_CTRL_TYPE_HEVC_SCALING_MATRIX 0x0123 ++ ++enum v4l2_mpeg_video_hevc_decode_mode { ++ V4L2_MPEG_VIDEO_HEVC_DECODE_MODE_SLICE_BASED, ++ V4L2_MPEG_VIDEO_HEVC_DECODE_MODE_FRAME_BASED, ++}; ++ ++enum v4l2_mpeg_video_hevc_start_code { ++ V4L2_MPEG_VIDEO_HEVC_START_CODE_NONE, ++ V4L2_MPEG_VIDEO_HEVC_START_CODE_ANNEX_B, ++}; ++ ++#define V4L2_HEVC_SLICE_TYPE_B 0 ++#define V4L2_HEVC_SLICE_TYPE_P 1 ++#define V4L2_HEVC_SLICE_TYPE_I 2 ++ ++#define V4L2_HEVC_SPS_FLAG_SEPARATE_COLOUR_PLANE (1ULL << 0) ++#define V4L2_HEVC_SPS_FLAG_SCALING_LIST_ENABLED (1ULL << 1) ++#define V4L2_HEVC_SPS_FLAG_AMP_ENABLED (1ULL << 2) ++#define V4L2_HEVC_SPS_FLAG_SAMPLE_ADAPTIVE_OFFSET (1ULL << 3) ++#define V4L2_HEVC_SPS_FLAG_PCM_ENABLED (1ULL << 4) ++#define V4L2_HEVC_SPS_FLAG_PCM_LOOP_FILTER_DISABLED (1ULL << 5) ++#define V4L2_HEVC_SPS_FLAG_LONG_TERM_REF_PICS_PRESENT (1ULL << 6) ++#define V4L2_HEVC_SPS_FLAG_SPS_TEMPORAL_MVP_ENABLED (1ULL << 7) ++#define V4L2_HEVC_SPS_FLAG_STRONG_INTRA_SMOOTHING_ENABLED (1ULL << 8) ++ ++/* The controls are not stable at the moment and will likely be reworked. */ ++struct v4l2_ctrl_hevc_sps { ++ /* ISO/IEC 23008-2, ITU-T Rec. H.265: Sequence parameter set */ ++ __u16 pic_width_in_luma_samples; ++ __u16 pic_height_in_luma_samples; ++ __u8 bit_depth_luma_minus8; ++ __u8 bit_depth_chroma_minus8; ++ __u8 log2_max_pic_order_cnt_lsb_minus4; ++ __u8 sps_max_dec_pic_buffering_minus1; ++ __u8 sps_max_num_reorder_pics; ++ __u8 sps_max_latency_increase_plus1; ++ __u8 log2_min_luma_coding_block_size_minus3; ++ __u8 log2_diff_max_min_luma_coding_block_size; ++ __u8 log2_min_luma_transform_block_size_minus2; ++ __u8 log2_diff_max_min_luma_transform_block_size; ++ __u8 max_transform_hierarchy_depth_inter; ++ __u8 max_transform_hierarchy_depth_intra; ++ __u8 pcm_sample_bit_depth_luma_minus1; ++ __u8 pcm_sample_bit_depth_chroma_minus1; ++ __u8 log2_min_pcm_luma_coding_block_size_minus3; ++ __u8 log2_diff_max_min_pcm_luma_coding_block_size; ++ __u8 num_short_term_ref_pic_sets; ++ __u8 num_long_term_ref_pics_sps; ++ __u8 chroma_format_idc; ++ __u8 sps_max_sub_layers_minus1; ++ ++ __u64 flags; ++}; ++ ++#define V4L2_HEVC_PPS_FLAG_DEPENDENT_SLICE_SEGMENT (1ULL << 0) ++#define V4L2_HEVC_PPS_FLAG_OUTPUT_FLAG_PRESENT (1ULL << 1) ++#define V4L2_HEVC_PPS_FLAG_SIGN_DATA_HIDING_ENABLED (1ULL << 2) ++#define V4L2_HEVC_PPS_FLAG_CABAC_INIT_PRESENT (1ULL << 3) ++#define V4L2_HEVC_PPS_FLAG_CONSTRAINED_INTRA_PRED (1ULL << 4) ++#define V4L2_HEVC_PPS_FLAG_TRANSFORM_SKIP_ENABLED (1ULL << 5) ++#define V4L2_HEVC_PPS_FLAG_CU_QP_DELTA_ENABLED (1ULL << 6) ++#define V4L2_HEVC_PPS_FLAG_PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT (1ULL << 7) ++#define V4L2_HEVC_PPS_FLAG_WEIGHTED_PRED (1ULL << 8) ++#define V4L2_HEVC_PPS_FLAG_WEIGHTED_BIPRED (1ULL << 9) ++#define V4L2_HEVC_PPS_FLAG_TRANSQUANT_BYPASS_ENABLED (1ULL << 10) ++#define V4L2_HEVC_PPS_FLAG_TILES_ENABLED (1ULL << 11) ++#define V4L2_HEVC_PPS_FLAG_ENTROPY_CODING_SYNC_ENABLED (1ULL << 12) ++#define V4L2_HEVC_PPS_FLAG_LOOP_FILTER_ACROSS_TILES_ENABLED (1ULL << 13) ++#define V4L2_HEVC_PPS_FLAG_PPS_LOOP_FILTER_ACROSS_SLICES_ENABLED (1ULL << 14) ++#define V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_OVERRIDE_ENABLED (1ULL << 15) ++#define V4L2_HEVC_PPS_FLAG_PPS_DISABLE_DEBLOCKING_FILTER (1ULL << 16) ++#define V4L2_HEVC_PPS_FLAG_LISTS_MODIFICATION_PRESENT (1ULL << 17) ++#define V4L2_HEVC_PPS_FLAG_SLICE_SEGMENT_HEADER_EXTENSION_PRESENT (1ULL << 18) ++ ++struct v4l2_ctrl_hevc_pps { ++ /* ISO/IEC 23008-2, ITU-T Rec. H.265: Picture parameter set */ ++ __u8 num_extra_slice_header_bits; ++ __s8 init_qp_minus26; ++ __u8 diff_cu_qp_delta_depth; ++ __s8 pps_cb_qp_offset; ++ __s8 pps_cr_qp_offset; ++ __u8 num_tile_columns_minus1; ++ __u8 num_tile_rows_minus1; ++ __u8 column_width_minus1[20]; ++ __u8 row_height_minus1[22]; ++ __s8 pps_beta_offset_div2; ++ __s8 pps_tc_offset_div2; ++ __u8 log2_parallel_merge_level_minus2; ++ ++ __u8 padding[4]; ++ __u64 flags; ++}; ++ ++#define V4L2_HEVC_DPB_ENTRY_RPS_ST_CURR_BEFORE 0x01 ++#define V4L2_HEVC_DPB_ENTRY_RPS_ST_CURR_AFTER 0x02 ++#define V4L2_HEVC_DPB_ENTRY_RPS_LT_CURR 0x03 ++ ++#define V4L2_HEVC_DPB_ENTRIES_NUM_MAX 16 ++ ++struct v4l2_hevc_dpb_entry { ++ __u64 timestamp; ++ __u8 rps; ++ __u8 field_pic; ++ __u16 pic_order_cnt[2]; ++ __u8 padding[2]; ++}; ++ ++struct v4l2_hevc_pred_weight_table { ++ __s8 delta_luma_weight_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; ++ __s8 luma_offset_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; ++ __s8 delta_chroma_weight_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]; ++ __s8 chroma_offset_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]; ++ ++ __s8 delta_luma_weight_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; ++ __s8 luma_offset_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; ++ __s8 delta_chroma_weight_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]; ++ __s8 chroma_offset_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]; ++ ++ __u8 padding[6]; ++ ++ __u8 luma_log2_weight_denom; ++ __s8 delta_chroma_log2_weight_denom; ++}; ++ ++#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_LUMA (1ULL << 0) ++#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_CHROMA (1ULL << 1) ++#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_TEMPORAL_MVP_ENABLED (1ULL << 2) ++#define V4L2_HEVC_SLICE_PARAMS_FLAG_MVD_L1_ZERO (1ULL << 3) ++#define V4L2_HEVC_SLICE_PARAMS_FLAG_CABAC_INIT (1ULL << 4) ++#define V4L2_HEVC_SLICE_PARAMS_FLAG_COLLOCATED_FROM_L0 (1ULL << 5) ++#define V4L2_HEVC_SLICE_PARAMS_FLAG_USE_INTEGER_MV (1ULL << 6) ++#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_DEBLOCKING_FILTER_DISABLED (1ULL << 7) ++#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_LOOP_FILTER_ACROSS_SLICES_ENABLED (1ULL << 8) ++#define V4L2_HEVC_SLICE_PARAMS_FLAG_DEPENDENT_SLICE_SEGMENT (1ULL << 9) ++ ++struct v4l2_ctrl_hevc_slice_params { ++ __u32 bit_size; ++ __u32 data_bit_offset; ++ ++ /* ISO/IEC 23008-2, ITU-T Rec. H.265: General slice segment header */ ++ __u32 slice_segment_addr; ++ __u32 num_entry_point_offsets; ++ ++ /* ISO/IEC 23008-2, ITU-T Rec. H.265: NAL unit header */ ++ __u8 nal_unit_type; ++ __u8 nuh_temporal_id_plus1; ++ ++ /* ISO/IEC 23008-2, ITU-T Rec. H.265: General slice segment header */ ++ __u8 slice_type; ++ __u8 colour_plane_id; ++ __u16 slice_pic_order_cnt; ++ __u8 num_ref_idx_l0_active_minus1; ++ __u8 num_ref_idx_l1_active_minus1; ++ __u8 collocated_ref_idx; ++ __u8 five_minus_max_num_merge_cand; ++ __s8 slice_qp_delta; ++ __s8 slice_cb_qp_offset; ++ __s8 slice_cr_qp_offset; ++ __s8 slice_act_y_qp_offset; ++ __s8 slice_act_cb_qp_offset; ++ __s8 slice_act_cr_qp_offset; ++ __s8 slice_beta_offset_div2; ++ __s8 slice_tc_offset_div2; ++ ++ /* ISO/IEC 23008-2, ITU-T Rec. H.265: Picture timing SEI message */ ++ __u8 pic_struct; ++ ++ /* ISO/IEC 23008-2, ITU-T Rec. H.265: General slice segment header */ ++ __u8 num_active_dpb_entries; ++ __u8 ref_idx_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; ++ __u8 ref_idx_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; ++ ++ __u8 num_rps_poc_st_curr_before; ++ __u8 num_rps_poc_st_curr_after; ++ __u8 num_rps_poc_lt_curr; ++ ++ __u8 padding; ++ ++ __u32 entry_point_offset_minus1[256]; ++ ++ /* ISO/IEC 23008-2, ITU-T Rec. H.265: General slice segment header */ ++ struct v4l2_hevc_dpb_entry dpb[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; ++ ++ /* ISO/IEC 23008-2, ITU-T Rec. H.265: Weighted prediction parameter */ ++ struct v4l2_hevc_pred_weight_table pred_weight_table; ++ ++ __u64 flags; ++}; ++ ++struct v4l2_ctrl_hevc_scaling_matrix { ++ __u8 scaling_list_4x4[6][16]; ++ __u8 scaling_list_8x8[6][64]; ++ __u8 scaling_list_16x16[6][64]; ++ __u8 scaling_list_32x32[2][64]; ++ __u8 scaling_list_dc_coef_16x16[6]; ++ __u8 scaling_list_dc_coef_32x32[2]; ++}; ++ ++#endif +--- /dev/null ++++ b/libavcodec/hevc-ctrls-v2.h +@@ -0,0 +1,257 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ ++/* ++ * These are the HEVC state controls for use with stateless HEVC ++ * codec drivers. ++ * ++ * It turns out that these structs are not stable yet and will undergo ++ * more changes. So keep them private until they are stable and ready to ++ * become part of the official public API. ++ */ ++ ++#ifndef _HEVC_CTRLS_H_ ++#define _HEVC_CTRLS_H_ ++ ++#include ++ ++/* The pixel format isn't stable at the moment and will likely be renamed. */ ++#define V4L2_PIX_FMT_HEVC_SLICE v4l2_fourcc('S', '2', '6', '5') /* HEVC parsed slices */ ++ ++#define V4L2_CID_MPEG_VIDEO_HEVC_SPS (V4L2_CID_CODEC_BASE + 1008) ++#define V4L2_CID_MPEG_VIDEO_HEVC_PPS (V4L2_CID_CODEC_BASE + 1009) ++#define V4L2_CID_MPEG_VIDEO_HEVC_SLICE_PARAMS (V4L2_CID_CODEC_BASE + 1010) ++#define V4L2_CID_MPEG_VIDEO_HEVC_SCALING_MATRIX (V4L2_CID_CODEC_BASE + 1011) ++#define V4L2_CID_MPEG_VIDEO_HEVC_DECODE_PARAMS (V4L2_CID_CODEC_BASE + 1012) ++#define V4L2_CID_MPEG_VIDEO_HEVC_DECODE_MODE (V4L2_CID_CODEC_BASE + 1015) ++#define V4L2_CID_MPEG_VIDEO_HEVC_START_CODE (V4L2_CID_CODEC_BASE + 1016) ++ ++/* enum v4l2_ctrl_type type values */ ++#define V4L2_CTRL_TYPE_HEVC_SPS 0x0120 ++#define V4L2_CTRL_TYPE_HEVC_PPS 0x0121 ++#define V4L2_CTRL_TYPE_HEVC_SLICE_PARAMS 0x0122 ++#define V4L2_CTRL_TYPE_HEVC_SCALING_MATRIX 0x0123 ++#define V4L2_CTRL_TYPE_HEVC_DECODE_PARAMS 0x0124 ++ ++enum v4l2_mpeg_video_hevc_decode_mode { ++ V4L2_MPEG_VIDEO_HEVC_DECODE_MODE_SLICE_BASED, ++ V4L2_MPEG_VIDEO_HEVC_DECODE_MODE_FRAME_BASED, ++}; ++ ++enum v4l2_mpeg_video_hevc_start_code { ++ V4L2_MPEG_VIDEO_HEVC_START_CODE_NONE, ++ V4L2_MPEG_VIDEO_HEVC_START_CODE_ANNEX_B, ++}; ++ ++#define V4L2_HEVC_SLICE_TYPE_B 0 ++#define V4L2_HEVC_SLICE_TYPE_P 1 ++#define V4L2_HEVC_SLICE_TYPE_I 2 ++ ++#define V4L2_HEVC_SPS_FLAG_SEPARATE_COLOUR_PLANE (1ULL << 0) ++#define V4L2_HEVC_SPS_FLAG_SCALING_LIST_ENABLED (1ULL << 1) ++#define V4L2_HEVC_SPS_FLAG_AMP_ENABLED (1ULL << 2) ++#define V4L2_HEVC_SPS_FLAG_SAMPLE_ADAPTIVE_OFFSET (1ULL << 3) ++#define V4L2_HEVC_SPS_FLAG_PCM_ENABLED (1ULL << 4) ++#define V4L2_HEVC_SPS_FLAG_PCM_LOOP_FILTER_DISABLED (1ULL << 5) ++#define V4L2_HEVC_SPS_FLAG_LONG_TERM_REF_PICS_PRESENT (1ULL << 6) ++#define V4L2_HEVC_SPS_FLAG_SPS_TEMPORAL_MVP_ENABLED (1ULL << 7) ++#define V4L2_HEVC_SPS_FLAG_STRONG_INTRA_SMOOTHING_ENABLED (1ULL << 8) ++ ++/* The controls are not stable at the moment and will likely be reworked. */ ++struct v4l2_ctrl_hevc_sps { ++ /* ISO/IEC 23008-2, ITU-T Rec. H.265: Sequence parameter set */ ++ __u16 pic_width_in_luma_samples; ++ __u16 pic_height_in_luma_samples; ++ __u8 bit_depth_luma_minus8; ++ __u8 bit_depth_chroma_minus8; ++ __u8 log2_max_pic_order_cnt_lsb_minus4; ++ __u8 sps_max_dec_pic_buffering_minus1; ++ __u8 sps_max_num_reorder_pics; ++ __u8 sps_max_latency_increase_plus1; ++ __u8 log2_min_luma_coding_block_size_minus3; ++ __u8 log2_diff_max_min_luma_coding_block_size; ++ __u8 log2_min_luma_transform_block_size_minus2; ++ __u8 log2_diff_max_min_luma_transform_block_size; ++ __u8 max_transform_hierarchy_depth_inter; ++ __u8 max_transform_hierarchy_depth_intra; ++ __u8 pcm_sample_bit_depth_luma_minus1; ++ __u8 pcm_sample_bit_depth_chroma_minus1; ++ __u8 log2_min_pcm_luma_coding_block_size_minus3; ++ __u8 log2_diff_max_min_pcm_luma_coding_block_size; ++ __u8 num_short_term_ref_pic_sets; ++ __u8 num_long_term_ref_pics_sps; ++ __u8 chroma_format_idc; ++ __u8 sps_max_sub_layers_minus1; ++ ++ __u64 flags; ++}; ++ ++#define V4L2_HEVC_PPS_FLAG_DEPENDENT_SLICE_SEGMENT_ENABLED (1ULL << 0) ++#define V4L2_HEVC_PPS_FLAG_OUTPUT_FLAG_PRESENT (1ULL << 1) ++#define V4L2_HEVC_PPS_FLAG_SIGN_DATA_HIDING_ENABLED (1ULL << 2) ++#define V4L2_HEVC_PPS_FLAG_CABAC_INIT_PRESENT (1ULL << 3) ++#define V4L2_HEVC_PPS_FLAG_CONSTRAINED_INTRA_PRED (1ULL << 4) ++#define V4L2_HEVC_PPS_FLAG_TRANSFORM_SKIP_ENABLED (1ULL << 5) ++#define V4L2_HEVC_PPS_FLAG_CU_QP_DELTA_ENABLED (1ULL << 6) ++#define V4L2_HEVC_PPS_FLAG_PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT (1ULL << 7) ++#define V4L2_HEVC_PPS_FLAG_WEIGHTED_PRED (1ULL << 8) ++#define V4L2_HEVC_PPS_FLAG_WEIGHTED_BIPRED (1ULL << 9) ++#define V4L2_HEVC_PPS_FLAG_TRANSQUANT_BYPASS_ENABLED (1ULL << 10) ++#define V4L2_HEVC_PPS_FLAG_TILES_ENABLED (1ULL << 11) ++#define V4L2_HEVC_PPS_FLAG_ENTROPY_CODING_SYNC_ENABLED (1ULL << 12) ++#define V4L2_HEVC_PPS_FLAG_LOOP_FILTER_ACROSS_TILES_ENABLED (1ULL << 13) ++#define V4L2_HEVC_PPS_FLAG_PPS_LOOP_FILTER_ACROSS_SLICES_ENABLED (1ULL << 14) ++#define V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_OVERRIDE_ENABLED (1ULL << 15) ++#define V4L2_HEVC_PPS_FLAG_PPS_DISABLE_DEBLOCKING_FILTER (1ULL << 16) ++#define V4L2_HEVC_PPS_FLAG_LISTS_MODIFICATION_PRESENT (1ULL << 17) ++#define V4L2_HEVC_PPS_FLAG_SLICE_SEGMENT_HEADER_EXTENSION_PRESENT (1ULL << 18) ++#define V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_CONTROL_PRESENT (1ULL << 19) ++#define V4L2_HEVC_PPS_FLAG_UNIFORM_SPACING (1ULL << 20) ++ ++struct v4l2_ctrl_hevc_pps { ++ /* ISO/IEC 23008-2, ITU-T Rec. H.265: Picture parameter set */ ++ __u8 num_extra_slice_header_bits; ++ __u8 num_ref_idx_l0_default_active_minus1; ++ __u8 num_ref_idx_l1_default_active_minus1; ++ __s8 init_qp_minus26; ++ __u8 diff_cu_qp_delta_depth; ++ __s8 pps_cb_qp_offset; ++ __s8 pps_cr_qp_offset; ++ __u8 num_tile_columns_minus1; ++ __u8 num_tile_rows_minus1; ++ __u8 column_width_minus1[20]; ++ __u8 row_height_minus1[22]; ++ __s8 pps_beta_offset_div2; ++ __s8 pps_tc_offset_div2; ++ __u8 log2_parallel_merge_level_minus2; ++ ++ __u8 padding[4]; ++ __u64 flags; ++}; ++ ++#define V4L2_HEVC_DPB_ENTRY_RPS_ST_CURR_BEFORE 0x01 ++#define V4L2_HEVC_DPB_ENTRY_RPS_ST_CURR_AFTER 0x02 ++#define V4L2_HEVC_DPB_ENTRY_RPS_LT_CURR 0x03 ++ ++#define V4L2_HEVC_DPB_ENTRIES_NUM_MAX 16 ++ ++struct v4l2_hevc_dpb_entry { ++ __u64 timestamp; ++ __u8 rps; ++ __u8 field_pic; ++ __u16 pic_order_cnt[2]; ++ __u8 padding[2]; ++}; ++ ++struct v4l2_hevc_pred_weight_table { ++ __s8 delta_luma_weight_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; ++ __s8 luma_offset_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; ++ __s8 delta_chroma_weight_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]; ++ __s8 chroma_offset_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]; ++ ++ __s8 delta_luma_weight_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; ++ __s8 luma_offset_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; ++ __s8 delta_chroma_weight_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]; ++ __s8 chroma_offset_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]; ++ ++ __u8 padding[6]; ++ ++ __u8 luma_log2_weight_denom; ++ __s8 delta_chroma_log2_weight_denom; ++}; ++ ++#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_LUMA (1ULL << 0) ++#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_CHROMA (1ULL << 1) ++#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_TEMPORAL_MVP_ENABLED (1ULL << 2) ++#define V4L2_HEVC_SLICE_PARAMS_FLAG_MVD_L1_ZERO (1ULL << 3) ++#define V4L2_HEVC_SLICE_PARAMS_FLAG_CABAC_INIT (1ULL << 4) ++#define V4L2_HEVC_SLICE_PARAMS_FLAG_COLLOCATED_FROM_L0 (1ULL << 5) ++#define V4L2_HEVC_SLICE_PARAMS_FLAG_USE_INTEGER_MV (1ULL << 6) ++#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_DEBLOCKING_FILTER_DISABLED (1ULL << 7) ++#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_LOOP_FILTER_ACROSS_SLICES_ENABLED (1ULL << 8) ++#define V4L2_HEVC_SLICE_PARAMS_FLAG_DEPENDENT_SLICE_SEGMENT (1ULL << 9) ++ ++struct v4l2_ctrl_hevc_slice_params { ++ __u32 bit_size; ++ __u32 data_bit_offset; ++ ++ /* ISO/IEC 23008-2, ITU-T Rec. H.265: General slice segment header */ ++ __u32 slice_segment_addr; ++ __u32 num_entry_point_offsets; ++ ++ /* ISO/IEC 23008-2, ITU-T Rec. H.265: NAL unit header */ ++ __u8 nal_unit_type; ++ __u8 nuh_temporal_id_plus1; ++ ++ /* ISO/IEC 23008-2, ITU-T Rec. H.265: General slice segment header */ ++ __u8 slice_type; ++ __u8 colour_plane_id; ++ __u16 slice_pic_order_cnt; ++ __u8 num_ref_idx_l0_active_minus1; ++ __u8 num_ref_idx_l1_active_minus1; ++ __u8 collocated_ref_idx; ++ __u8 five_minus_max_num_merge_cand; ++ __s8 slice_qp_delta; ++ __s8 slice_cb_qp_offset; ++ __s8 slice_cr_qp_offset; ++ __s8 slice_act_y_qp_offset; ++ __s8 slice_act_cb_qp_offset; ++ __s8 slice_act_cr_qp_offset; ++ __s8 slice_beta_offset_div2; ++ __s8 slice_tc_offset_div2; ++ ++ /* ISO/IEC 23008-2, ITU-T Rec. H.265: Picture timing SEI message */ ++ __u8 pic_struct; ++ ++ /* ISO/IEC 23008-2, ITU-T Rec. H.265: General slice segment header */ ++ __u8 ref_idx_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; ++ __u8 ref_idx_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; ++ ++ __u8 padding[5]; ++ ++ __u32 entry_point_offset_minus1[256]; ++ ++ /* ISO/IEC 23008-2, ITU-T Rec. H.265: Weighted prediction parameter */ ++ struct v4l2_hevc_pred_weight_table pred_weight_table; ++ ++ __u64 flags; ++}; ++ ++#define V4L2_HEVC_DECODE_PARAM_FLAG_IRAP_PIC 0x1 ++#define V4L2_HEVC_DECODE_PARAM_FLAG_IDR_PIC 0x2 ++#define V4L2_HEVC_DECODE_PARAM_FLAG_NO_OUTPUT_OF_PRIOR 0x4 ++ ++struct v4l2_ctrl_hevc_decode_params { ++ __s32 pic_order_cnt_val; ++ __u8 num_active_dpb_entries; ++ struct v4l2_hevc_dpb_entry dpb[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; ++ __u8 num_poc_st_curr_before; ++ __u8 num_poc_st_curr_after; ++ __u8 num_poc_lt_curr; ++ __u8 poc_st_curr_before[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; ++ __u8 poc_st_curr_after[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; ++ __u8 poc_lt_curr[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; ++ __u64 flags; ++}; ++ ++/* MPEG-class control IDs specific to the Hantro driver as defined by V4L2 */ ++#define V4L2_CID_CODEC_HANTRO_BASE (V4L2_CTRL_CLASS_CODEC | 0x1200) ++/* ++ * V4L2_CID_HANTRO_HEVC_SLICE_HEADER_SKIP - ++ * the number of data (in bits) to skip in the ++ * slice segment header. ++ * If non-IDR, the bits to be skipped go from syntax element "pic_output_flag" ++ * to before syntax element "slice_temporal_mvp_enabled_flag". ++ * If IDR, the skipped bits are just "pic_output_flag" ++ * (separate_colour_plane_flag is not supported). ++ */ ++#define V4L2_CID_HANTRO_HEVC_SLICE_HEADER_SKIP (V4L2_CID_CODEC_HANTRO_BASE + 0) ++ ++struct v4l2_ctrl_hevc_scaling_matrix { ++ __u8 scaling_list_4x4[6][16]; ++ __u8 scaling_list_8x8[6][64]; ++ __u8 scaling_list_16x16[6][64]; ++ __u8 scaling_list_32x32[2][64]; ++ __u8 scaling_list_dc_coef_16x16[6]; ++ __u8 scaling_list_dc_coef_32x32[2]; ++}; ++ ++#endif +--- /dev/null ++++ b/libavcodec/hevc-ctrls-v3.h +@@ -0,0 +1,255 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ ++/* ++ * These are the HEVC state controls for use with stateless HEVC ++ * codec drivers. ++ * ++ * It turns out that these structs are not stable yet and will undergo ++ * more changes. So keep them private until they are stable and ready to ++ * become part of the official public API. ++ */ ++ ++#ifndef _HEVC_CTRLS_H_ ++#define _HEVC_CTRLS_H_ ++ ++#include ++ ++/* The pixel format isn't stable at the moment and will likely be renamed. */ ++#define V4L2_PIX_FMT_HEVC_SLICE v4l2_fourcc('S', '2', '6', '5') /* HEVC parsed slices */ ++ ++#define V4L2_CID_MPEG_VIDEO_HEVC_SPS (V4L2_CID_CODEC_BASE + 1008) ++#define V4L2_CID_MPEG_VIDEO_HEVC_PPS (V4L2_CID_CODEC_BASE + 1009) ++#define V4L2_CID_MPEG_VIDEO_HEVC_SLICE_PARAMS (V4L2_CID_CODEC_BASE + 1010) ++#define V4L2_CID_MPEG_VIDEO_HEVC_SCALING_MATRIX (V4L2_CID_CODEC_BASE + 1011) ++#define V4L2_CID_MPEG_VIDEO_HEVC_DECODE_PARAMS (V4L2_CID_CODEC_BASE + 1012) ++#define V4L2_CID_MPEG_VIDEO_HEVC_DECODE_MODE (V4L2_CID_CODEC_BASE + 1015) ++#define V4L2_CID_MPEG_VIDEO_HEVC_START_CODE (V4L2_CID_CODEC_BASE + 1016) ++ ++/* enum v4l2_ctrl_type type values */ ++#define V4L2_CTRL_TYPE_HEVC_SPS 0x0120 ++#define V4L2_CTRL_TYPE_HEVC_PPS 0x0121 ++#define V4L2_CTRL_TYPE_HEVC_SLICE_PARAMS 0x0122 ++#define V4L2_CTRL_TYPE_HEVC_SCALING_MATRIX 0x0123 ++#define V4L2_CTRL_TYPE_HEVC_DECODE_PARAMS 0x0124 ++ ++enum v4l2_mpeg_video_hevc_decode_mode { ++ V4L2_MPEG_VIDEO_HEVC_DECODE_MODE_SLICE_BASED, ++ V4L2_MPEG_VIDEO_HEVC_DECODE_MODE_FRAME_BASED, ++}; ++ ++enum v4l2_mpeg_video_hevc_start_code { ++ V4L2_MPEG_VIDEO_HEVC_START_CODE_NONE, ++ V4L2_MPEG_VIDEO_HEVC_START_CODE_ANNEX_B, ++}; ++ ++#define V4L2_HEVC_SLICE_TYPE_B 0 ++#define V4L2_HEVC_SLICE_TYPE_P 1 ++#define V4L2_HEVC_SLICE_TYPE_I 2 ++ ++#define V4L2_HEVC_SPS_FLAG_SEPARATE_COLOUR_PLANE (1ULL << 0) ++#define V4L2_HEVC_SPS_FLAG_SCALING_LIST_ENABLED (1ULL << 1) ++#define V4L2_HEVC_SPS_FLAG_AMP_ENABLED (1ULL << 2) ++#define V4L2_HEVC_SPS_FLAG_SAMPLE_ADAPTIVE_OFFSET (1ULL << 3) ++#define V4L2_HEVC_SPS_FLAG_PCM_ENABLED (1ULL << 4) ++#define V4L2_HEVC_SPS_FLAG_PCM_LOOP_FILTER_DISABLED (1ULL << 5) ++#define V4L2_HEVC_SPS_FLAG_LONG_TERM_REF_PICS_PRESENT (1ULL << 6) ++#define V4L2_HEVC_SPS_FLAG_SPS_TEMPORAL_MVP_ENABLED (1ULL << 7) ++#define V4L2_HEVC_SPS_FLAG_STRONG_INTRA_SMOOTHING_ENABLED (1ULL << 8) ++ ++/* The controls are not stable at the moment and will likely be reworked. */ ++struct v4l2_ctrl_hevc_sps { ++ /* ISO/IEC 23008-2, ITU-T Rec. H.265: Sequence parameter set */ ++ __u16 pic_width_in_luma_samples; ++ __u16 pic_height_in_luma_samples; ++ __u8 bit_depth_luma_minus8; ++ __u8 bit_depth_chroma_minus8; ++ __u8 log2_max_pic_order_cnt_lsb_minus4; ++ __u8 sps_max_dec_pic_buffering_minus1; ++ __u8 sps_max_num_reorder_pics; ++ __u8 sps_max_latency_increase_plus1; ++ __u8 log2_min_luma_coding_block_size_minus3; ++ __u8 log2_diff_max_min_luma_coding_block_size; ++ __u8 log2_min_luma_transform_block_size_minus2; ++ __u8 log2_diff_max_min_luma_transform_block_size; ++ __u8 max_transform_hierarchy_depth_inter; ++ __u8 max_transform_hierarchy_depth_intra; ++ __u8 pcm_sample_bit_depth_luma_minus1; ++ __u8 pcm_sample_bit_depth_chroma_minus1; ++ __u8 log2_min_pcm_luma_coding_block_size_minus3; ++ __u8 log2_diff_max_min_pcm_luma_coding_block_size; ++ __u8 num_short_term_ref_pic_sets; ++ __u8 num_long_term_ref_pics_sps; ++ __u8 chroma_format_idc; ++ __u8 sps_max_sub_layers_minus1; ++ ++ __u64 flags; ++}; ++ ++#define V4L2_HEVC_PPS_FLAG_DEPENDENT_SLICE_SEGMENT_ENABLED (1ULL << 0) ++#define V4L2_HEVC_PPS_FLAG_OUTPUT_FLAG_PRESENT (1ULL << 1) ++#define V4L2_HEVC_PPS_FLAG_SIGN_DATA_HIDING_ENABLED (1ULL << 2) ++#define V4L2_HEVC_PPS_FLAG_CABAC_INIT_PRESENT (1ULL << 3) ++#define V4L2_HEVC_PPS_FLAG_CONSTRAINED_INTRA_PRED (1ULL << 4) ++#define V4L2_HEVC_PPS_FLAG_TRANSFORM_SKIP_ENABLED (1ULL << 5) ++#define V4L2_HEVC_PPS_FLAG_CU_QP_DELTA_ENABLED (1ULL << 6) ++#define V4L2_HEVC_PPS_FLAG_PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT (1ULL << 7) ++#define V4L2_HEVC_PPS_FLAG_WEIGHTED_PRED (1ULL << 8) ++#define V4L2_HEVC_PPS_FLAG_WEIGHTED_BIPRED (1ULL << 9) ++#define V4L2_HEVC_PPS_FLAG_TRANSQUANT_BYPASS_ENABLED (1ULL << 10) ++#define V4L2_HEVC_PPS_FLAG_TILES_ENABLED (1ULL << 11) ++#define V4L2_HEVC_PPS_FLAG_ENTROPY_CODING_SYNC_ENABLED (1ULL << 12) ++#define V4L2_HEVC_PPS_FLAG_LOOP_FILTER_ACROSS_TILES_ENABLED (1ULL << 13) ++#define V4L2_HEVC_PPS_FLAG_PPS_LOOP_FILTER_ACROSS_SLICES_ENABLED (1ULL << 14) ++#define V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_OVERRIDE_ENABLED (1ULL << 15) ++#define V4L2_HEVC_PPS_FLAG_PPS_DISABLE_DEBLOCKING_FILTER (1ULL << 16) ++#define V4L2_HEVC_PPS_FLAG_LISTS_MODIFICATION_PRESENT (1ULL << 17) ++#define V4L2_HEVC_PPS_FLAG_SLICE_SEGMENT_HEADER_EXTENSION_PRESENT (1ULL << 18) ++#define V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_CONTROL_PRESENT (1ULL << 19) ++#define V4L2_HEVC_PPS_FLAG_UNIFORM_SPACING (1ULL << 20) ++ ++struct v4l2_ctrl_hevc_pps { ++ /* ISO/IEC 23008-2, ITU-T Rec. H.265: Picture parameter set */ ++ __u8 num_extra_slice_header_bits; ++ __u8 num_ref_idx_l0_default_active_minus1; ++ __u8 num_ref_idx_l1_default_active_minus1; ++ __s8 init_qp_minus26; ++ __u8 diff_cu_qp_delta_depth; ++ __s8 pps_cb_qp_offset; ++ __s8 pps_cr_qp_offset; ++ __u8 num_tile_columns_minus1; ++ __u8 num_tile_rows_minus1; ++ __u8 column_width_minus1[20]; ++ __u8 row_height_minus1[22]; ++ __s8 pps_beta_offset_div2; ++ __s8 pps_tc_offset_div2; ++ __u8 log2_parallel_merge_level_minus2; ++ ++ __u8 padding[4]; ++ __u64 flags; ++}; ++ ++#define V4L2_HEVC_DPB_ENTRY_LONG_TERM_REFERENCE 0x01 ++ ++#define V4L2_HEVC_DPB_ENTRIES_NUM_MAX 16 ++ ++struct v4l2_hevc_dpb_entry { ++ __u64 timestamp; ++ __u8 flags; ++ __u8 field_pic; ++ __u16 pic_order_cnt[2]; ++ __u8 padding[2]; ++}; ++ ++struct v4l2_hevc_pred_weight_table { ++ __s8 delta_luma_weight_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; ++ __s8 luma_offset_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; ++ __s8 delta_chroma_weight_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]; ++ __s8 chroma_offset_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]; ++ ++ __s8 delta_luma_weight_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; ++ __s8 luma_offset_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; ++ __s8 delta_chroma_weight_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]; ++ __s8 chroma_offset_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]; ++ ++ __u8 padding[6]; ++ ++ __u8 luma_log2_weight_denom; ++ __s8 delta_chroma_log2_weight_denom; ++}; ++ ++#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_LUMA (1ULL << 0) ++#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_CHROMA (1ULL << 1) ++#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_TEMPORAL_MVP_ENABLED (1ULL << 2) ++#define V4L2_HEVC_SLICE_PARAMS_FLAG_MVD_L1_ZERO (1ULL << 3) ++#define V4L2_HEVC_SLICE_PARAMS_FLAG_CABAC_INIT (1ULL << 4) ++#define V4L2_HEVC_SLICE_PARAMS_FLAG_COLLOCATED_FROM_L0 (1ULL << 5) ++#define V4L2_HEVC_SLICE_PARAMS_FLAG_USE_INTEGER_MV (1ULL << 6) ++#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_DEBLOCKING_FILTER_DISABLED (1ULL << 7) ++#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_LOOP_FILTER_ACROSS_SLICES_ENABLED (1ULL << 8) ++#define V4L2_HEVC_SLICE_PARAMS_FLAG_DEPENDENT_SLICE_SEGMENT (1ULL << 9) ++ ++struct v4l2_ctrl_hevc_slice_params { ++ __u32 bit_size; ++ __u32 data_bit_offset; ++ ++ /* ISO/IEC 23008-2, ITU-T Rec. H.265: General slice segment header */ ++ __u32 slice_segment_addr; ++ __u32 num_entry_point_offsets; ++ ++ /* ISO/IEC 23008-2, ITU-T Rec. H.265: NAL unit header */ ++ __u8 nal_unit_type; ++ __u8 nuh_temporal_id_plus1; ++ ++ /* ISO/IEC 23008-2, ITU-T Rec. H.265: General slice segment header */ ++ __u8 slice_type; ++ __u8 colour_plane_id; ++ __u16 slice_pic_order_cnt; ++ __u8 num_ref_idx_l0_active_minus1; ++ __u8 num_ref_idx_l1_active_minus1; ++ __u8 collocated_ref_idx; ++ __u8 five_minus_max_num_merge_cand; ++ __s8 slice_qp_delta; ++ __s8 slice_cb_qp_offset; ++ __s8 slice_cr_qp_offset; ++ __s8 slice_act_y_qp_offset; ++ __s8 slice_act_cb_qp_offset; ++ __s8 slice_act_cr_qp_offset; ++ __s8 slice_beta_offset_div2; ++ __s8 slice_tc_offset_div2; ++ ++ /* ISO/IEC 23008-2, ITU-T Rec. H.265: Picture timing SEI message */ ++ __u8 pic_struct; ++ ++ /* ISO/IEC 23008-2, ITU-T Rec. H.265: General slice segment header */ ++ __u8 ref_idx_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; ++ __u8 ref_idx_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; ++ ++ __u8 padding[5]; ++ ++ __u32 entry_point_offset_minus1[256]; ++ ++ /* ISO/IEC 23008-2, ITU-T Rec. H.265: Weighted prediction parameter */ ++ struct v4l2_hevc_pred_weight_table pred_weight_table; ++ ++ __u64 flags; ++}; ++ ++#define V4L2_HEVC_DECODE_PARAM_FLAG_IRAP_PIC 0x1 ++#define V4L2_HEVC_DECODE_PARAM_FLAG_IDR_PIC 0x2 ++#define V4L2_HEVC_DECODE_PARAM_FLAG_NO_OUTPUT_OF_PRIOR 0x4 ++ ++struct v4l2_ctrl_hevc_decode_params { ++ __s32 pic_order_cnt_val; ++ __u8 num_active_dpb_entries; ++ struct v4l2_hevc_dpb_entry dpb[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; ++ __u8 num_poc_st_curr_before; ++ __u8 num_poc_st_curr_after; ++ __u8 num_poc_lt_curr; ++ __u8 poc_st_curr_before[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; ++ __u8 poc_st_curr_after[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; ++ __u8 poc_lt_curr[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; ++ __u64 flags; ++}; ++ ++struct v4l2_ctrl_hevc_scaling_matrix { ++ __u8 scaling_list_4x4[6][16]; ++ __u8 scaling_list_8x8[6][64]; ++ __u8 scaling_list_16x16[6][64]; ++ __u8 scaling_list_32x32[2][64]; ++ __u8 scaling_list_dc_coef_16x16[6]; ++ __u8 scaling_list_dc_coef_32x32[2]; ++}; ++ ++/* MPEG-class control IDs specific to the Hantro driver as defined by V4L2 */ ++#define V4L2_CID_CODEC_HANTRO_BASE (V4L2_CTRL_CLASS_CODEC | 0x1200) ++/* ++ * V4L2_CID_HANTRO_HEVC_SLICE_HEADER_SKIP - ++ * the number of data (in bits) to skip in the ++ * slice segment header. ++ * If non-IDR, the bits to be skipped go from syntax element "pic_output_flag" ++ * to before syntax element "slice_temporal_mvp_enabled_flag". ++ * If IDR, the skipped bits are just "pic_output_flag" ++ * (separate_colour_plane_flag is not supported). ++ */ ++#define V4L2_CID_HANTRO_HEVC_SLICE_HEADER_SKIP (V4L2_CID_CODEC_HANTRO_BASE + 0) ++ ++#endif +--- /dev/null ++++ b/libavcodec/hevc-ctrls-v4.h +@@ -0,0 +1,524 @@ ++/* SPDX-License-Identifier: ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) */ ++/* ++ * Video for Linux Two controls header file ++ * ++ * Copyright (C) 1999-2012 the contributors ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * Alternatively you can redistribute this file under the terms of the ++ * BSD license as stated below: ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions ++ * are met: ++ * 1. Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * 2. Redistributions in binary form must reproduce the above copyright ++ * notice, this list of conditions and the following disclaimer in ++ * the documentation and/or other materials provided with the ++ * distribution. ++ * 3. The names of its contributors may not be used to endorse or promote ++ * products derived from this software without specific prior written ++ * permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ++ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ++ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ++ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ++ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ++ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED ++ * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR ++ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ++ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING ++ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ++ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ * ++ * The contents of this header was split off from videodev2.h. All control ++ * definitions should be added to this header, which is included by ++ * videodev2.h. ++ */ ++ ++#ifndef AVCODEC_HEVC_CTRLS_V4_H ++#define AVCODEC_HEVC_CTRLS_V4_H ++ ++#include ++#include ++ ++#ifndef V4L2_CTRL_CLASS_CODEC_STATELESS ++#define V4L2_CTRL_CLASS_CODEC_STATELESS 0x00a40000 /* Stateless codecs controls */ ++#endif ++#ifndef V4L2_CID_CODEC_STATELESS_BASE ++#define V4L2_CID_CODEC_STATELESS_BASE (V4L2_CTRL_CLASS_CODEC_STATELESS | 0x900) ++#endif ++ ++#define V4L2_PIX_FMT_HEVC_SLICE v4l2_fourcc('S', '2', '6', '5') /* HEVC parsed slices */ ++ ++#define V4L2_CID_STATELESS_HEVC_SPS (V4L2_CID_CODEC_STATELESS_BASE + 400) ++#define V4L2_CID_STATELESS_HEVC_PPS (V4L2_CID_CODEC_STATELESS_BASE + 401) ++#define V4L2_CID_STATELESS_HEVC_SLICE_PARAMS (V4L2_CID_CODEC_STATELESS_BASE + 402) ++#define V4L2_CID_STATELESS_HEVC_SCALING_MATRIX (V4L2_CID_CODEC_STATELESS_BASE + 403) ++#define V4L2_CID_STATELESS_HEVC_DECODE_PARAMS (V4L2_CID_CODEC_STATELESS_BASE + 404) ++#define V4L2_CID_STATELESS_HEVC_DECODE_MODE (V4L2_CID_CODEC_STATELESS_BASE + 405) ++#define V4L2_CID_STATELESS_HEVC_START_CODE (V4L2_CID_CODEC_STATELESS_BASE + 406) ++#define V4L2_CID_STATELESS_HEVC_ENTRY_POINT_OFFSETS (V4L2_CID_CODEC_STATELESS_BASE + 407) ++ ++enum v4l2_stateless_hevc_decode_mode { ++ V4L2_STATELESS_HEVC_DECODE_MODE_SLICE_BASED, ++ V4L2_STATELESS_HEVC_DECODE_MODE_FRAME_BASED, ++}; ++ ++enum v4l2_stateless_hevc_start_code { ++ V4L2_STATELESS_HEVC_START_CODE_NONE, ++ V4L2_STATELESS_HEVC_START_CODE_ANNEX_B, ++}; ++ ++#define V4L2_HEVC_SLICE_TYPE_B 0 ++#define V4L2_HEVC_SLICE_TYPE_P 1 ++#define V4L2_HEVC_SLICE_TYPE_I 2 ++ ++#define V4L2_HEVC_SPS_FLAG_SEPARATE_COLOUR_PLANE (1ULL << 0) ++#define V4L2_HEVC_SPS_FLAG_SCALING_LIST_ENABLED (1ULL << 1) ++#define V4L2_HEVC_SPS_FLAG_AMP_ENABLED (1ULL << 2) ++#define V4L2_HEVC_SPS_FLAG_SAMPLE_ADAPTIVE_OFFSET (1ULL << 3) ++#define V4L2_HEVC_SPS_FLAG_PCM_ENABLED (1ULL << 4) ++#define V4L2_HEVC_SPS_FLAG_PCM_LOOP_FILTER_DISABLED (1ULL << 5) ++#define V4L2_HEVC_SPS_FLAG_LONG_TERM_REF_PICS_PRESENT (1ULL << 6) ++#define V4L2_HEVC_SPS_FLAG_SPS_TEMPORAL_MVP_ENABLED (1ULL << 7) ++#define V4L2_HEVC_SPS_FLAG_STRONG_INTRA_SMOOTHING_ENABLED (1ULL << 8) ++ ++/** ++ * struct v4l2_ctrl_hevc_sps - ITU-T Rec. H.265: Sequence parameter set ++ * ++ * @video_parameter_set_id: specifies the value of the ++ * vps_video_parameter_set_id of the active VPS ++ * @seq_parameter_set_id: provides an identifier for the SPS for ++ * reference by other syntax elements ++ * @pic_width_in_luma_samples: specifies the width of each decoded picture ++ * in units of luma samples ++ * @pic_height_in_luma_samples: specifies the height of each decoded picture ++ * in units of luma samples ++ * @bit_depth_luma_minus8: this value plus 8specifies the bit depth of the ++ * samples of the luma array ++ * @bit_depth_chroma_minus8: this value plus 8 specifies the bit depth of the ++ * samples of the chroma arrays ++ * @log2_max_pic_order_cnt_lsb_minus4: this value plus 4 specifies the value of ++ * the variable MaxPicOrderCntLsb ++ * @sps_max_dec_pic_buffering_minus1: this value plus 1 specifies the maximum ++ * required size of the decoded picture ++ * buffer for the codec video sequence ++ * @sps_max_num_reorder_pics: indicates the maximum allowed number of pictures ++ * @sps_max_latency_increase_plus1: not equal to 0 is used to compute the ++ * value of SpsMaxLatencyPictures array ++ * @log2_min_luma_coding_block_size_minus3: plus 3 specifies the minimum ++ * luma coding block size ++ * @log2_diff_max_min_luma_coding_block_size: specifies the difference between ++ * the maximum and minimum luma ++ * coding block size ++ * @log2_min_luma_transform_block_size_minus2: plus 2 specifies the minimum luma ++ * transform block size ++ * @log2_diff_max_min_luma_transform_block_size: specifies the difference between ++ * the maximum and minimum luma ++ * transform block size ++ * @max_transform_hierarchy_depth_inter: specifies the maximum hierarchy ++ * depth for transform units of ++ * coding units coded in inter ++ * prediction mode ++ * @max_transform_hierarchy_depth_intra: specifies the maximum hierarchy ++ * depth for transform units of ++ * coding units coded in intra ++ * prediction mode ++ * @pcm_sample_bit_depth_luma_minus1: this value plus 1 specifies the number of ++ * bits used to represent each of PCM sample ++ * values of the luma component ++ * @pcm_sample_bit_depth_chroma_minus1: this value plus 1 specifies the number ++ * of bits used to represent each of PCM ++ * sample values of the chroma components ++ * @log2_min_pcm_luma_coding_block_size_minus3: this value plus 3 specifies the ++ * minimum size of coding blocks ++ * @log2_diff_max_min_pcm_luma_coding_block_size: specifies the difference between ++ * the maximum and minimum size of ++ * coding blocks ++ * @num_short_term_ref_pic_sets: specifies the number of st_ref_pic_set() ++ * syntax structures included in the SPS ++ * @num_long_term_ref_pics_sps: specifies the number of candidate long-term ++ * reference pictures that are specified in the SPS ++ * @chroma_format_idc: specifies the chroma sampling ++ * @sps_max_sub_layers_minus1: this value plus 1 specifies the maximum number ++ * of temporal sub-layers ++ * @reserved: padding field. Should be zeroed by applications. ++ * @flags: see V4L2_HEVC_SPS_FLAG_{} ++ */ ++struct v4l2_ctrl_hevc_sps { ++ __u8 video_parameter_set_id; ++ __u8 seq_parameter_set_id; ++ __u16 pic_width_in_luma_samples; ++ __u16 pic_height_in_luma_samples; ++ __u8 bit_depth_luma_minus8; ++ __u8 bit_depth_chroma_minus8; ++ __u8 log2_max_pic_order_cnt_lsb_minus4; ++ __u8 sps_max_dec_pic_buffering_minus1; ++ __u8 sps_max_num_reorder_pics; ++ __u8 sps_max_latency_increase_plus1; ++ __u8 log2_min_luma_coding_block_size_minus3; ++ __u8 log2_diff_max_min_luma_coding_block_size; ++ __u8 log2_min_luma_transform_block_size_minus2; ++ __u8 log2_diff_max_min_luma_transform_block_size; ++ __u8 max_transform_hierarchy_depth_inter; ++ __u8 max_transform_hierarchy_depth_intra; ++ __u8 pcm_sample_bit_depth_luma_minus1; ++ __u8 pcm_sample_bit_depth_chroma_minus1; ++ __u8 log2_min_pcm_luma_coding_block_size_minus3; ++ __u8 log2_diff_max_min_pcm_luma_coding_block_size; ++ __u8 num_short_term_ref_pic_sets; ++ __u8 num_long_term_ref_pics_sps; ++ __u8 chroma_format_idc; ++ __u8 sps_max_sub_layers_minus1; ++ ++ __u8 reserved[6]; ++ __u64 flags; ++}; ++ ++#define V4L2_HEVC_PPS_FLAG_DEPENDENT_SLICE_SEGMENT_ENABLED (1ULL << 0) ++#define V4L2_HEVC_PPS_FLAG_OUTPUT_FLAG_PRESENT (1ULL << 1) ++#define V4L2_HEVC_PPS_FLAG_SIGN_DATA_HIDING_ENABLED (1ULL << 2) ++#define V4L2_HEVC_PPS_FLAG_CABAC_INIT_PRESENT (1ULL << 3) ++#define V4L2_HEVC_PPS_FLAG_CONSTRAINED_INTRA_PRED (1ULL << 4) ++#define V4L2_HEVC_PPS_FLAG_TRANSFORM_SKIP_ENABLED (1ULL << 5) ++#define V4L2_HEVC_PPS_FLAG_CU_QP_DELTA_ENABLED (1ULL << 6) ++#define V4L2_HEVC_PPS_FLAG_PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT (1ULL << 7) ++#define V4L2_HEVC_PPS_FLAG_WEIGHTED_PRED (1ULL << 8) ++#define V4L2_HEVC_PPS_FLAG_WEIGHTED_BIPRED (1ULL << 9) ++#define V4L2_HEVC_PPS_FLAG_TRANSQUANT_BYPASS_ENABLED (1ULL << 10) ++#define V4L2_HEVC_PPS_FLAG_TILES_ENABLED (1ULL << 11) ++#define V4L2_HEVC_PPS_FLAG_ENTROPY_CODING_SYNC_ENABLED (1ULL << 12) ++#define V4L2_HEVC_PPS_FLAG_LOOP_FILTER_ACROSS_TILES_ENABLED (1ULL << 13) ++#define V4L2_HEVC_PPS_FLAG_PPS_LOOP_FILTER_ACROSS_SLICES_ENABLED (1ULL << 14) ++#define V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_OVERRIDE_ENABLED (1ULL << 15) ++#define V4L2_HEVC_PPS_FLAG_PPS_DISABLE_DEBLOCKING_FILTER (1ULL << 16) ++#define V4L2_HEVC_PPS_FLAG_LISTS_MODIFICATION_PRESENT (1ULL << 17) ++#define V4L2_HEVC_PPS_FLAG_SLICE_SEGMENT_HEADER_EXTENSION_PRESENT (1ULL << 18) ++#define V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_CONTROL_PRESENT (1ULL << 19) ++#define V4L2_HEVC_PPS_FLAG_UNIFORM_SPACING (1ULL << 20) ++ ++/** ++ * struct v4l2_ctrl_hevc_pps - ITU-T Rec. H.265: Picture parameter set ++ * ++ * @pic_parameter_set_id: identifies the PPS for reference by other ++ * syntax elements ++ * @num_extra_slice_header_bits: specifies the number of extra slice header ++ * bits that are present in the slice header RBSP ++ * for coded pictures referring to the PPS. ++ * @num_ref_idx_l0_default_active_minus1: this value plus 1 specifies the ++ * inferred value of num_ref_idx_l0_active_minus1 ++ * @num_ref_idx_l1_default_active_minus1: this value plus 1 specifies the ++ * inferred value of num_ref_idx_l1_active_minus1 ++ * @init_qp_minus26: this value plus 26 specifies the initial value of SliceQp Y for ++ * each slice referring to the PPS ++ * @diff_cu_qp_delta_depth: specifies the difference between the luma coding ++ * tree block size and the minimum luma coding block ++ * size of coding units that convey cu_qp_delta_abs ++ * and cu_qp_delta_sign_flag ++ * @pps_cb_qp_offset: specify the offsets to the luma quantization parameter Cb ++ * @pps_cr_qp_offset: specify the offsets to the luma quantization parameter Cr ++ * @num_tile_columns_minus1: this value plus 1 specifies the number of tile columns ++ * partitioning the picture ++ * @num_tile_rows_minus1: this value plus 1 specifies the number of tile rows partitioning ++ * the picture ++ * @column_width_minus1: this value plus 1 specifies the width of the each tile column in ++ * units of coding tree blocks ++ * @row_height_minus1: this value plus 1 specifies the height of the each tile row in ++ * units of coding tree blocks ++ * @pps_beta_offset_div2: specify the default deblocking parameter offsets for ++ * beta divided by 2 ++ * @pps_tc_offset_div2: specify the default deblocking parameter offsets for tC ++ * divided by 2 ++ * @log2_parallel_merge_level_minus2: this value plus 2 specifies the value of ++ * the variable Log2ParMrgLevel ++ * @reserved: padding field. Should be zeroed by applications. ++ * @flags: see V4L2_HEVC_PPS_FLAG_{} ++ */ ++struct v4l2_ctrl_hevc_pps { ++ __u8 pic_parameter_set_id; ++ __u8 num_extra_slice_header_bits; ++ __u8 num_ref_idx_l0_default_active_minus1; ++ __u8 num_ref_idx_l1_default_active_minus1; ++ __s8 init_qp_minus26; ++ __u8 diff_cu_qp_delta_depth; ++ __s8 pps_cb_qp_offset; ++ __s8 pps_cr_qp_offset; ++ __u8 num_tile_columns_minus1; ++ __u8 num_tile_rows_minus1; ++ __u8 column_width_minus1[20]; ++ __u8 row_height_minus1[22]; ++ __s8 pps_beta_offset_div2; ++ __s8 pps_tc_offset_div2; ++ __u8 log2_parallel_merge_level_minus2; ++ __u8 reserved; ++ __u64 flags; ++}; ++ ++#define V4L2_HEVC_DPB_ENTRY_LONG_TERM_REFERENCE 0x01 ++ ++#define V4L2_HEVC_SEI_PIC_STRUCT_FRAME 0 ++#define V4L2_HEVC_SEI_PIC_STRUCT_TOP_FIELD 1 ++#define V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_FIELD 2 ++#define V4L2_HEVC_SEI_PIC_STRUCT_TOP_BOTTOM 3 ++#define V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_TOP 4 ++#define V4L2_HEVC_SEI_PIC_STRUCT_TOP_BOTTOM_TOP 5 ++#define V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_TOP_BOTTOM 6 ++#define V4L2_HEVC_SEI_PIC_STRUCT_FRAME_DOUBLING 7 ++#define V4L2_HEVC_SEI_PIC_STRUCT_FRAME_TRIPLING 8 ++#define V4L2_HEVC_SEI_PIC_STRUCT_TOP_PAIRED_PREVIOUS_BOTTOM 9 ++#define V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_PAIRED_PREVIOUS_TOP 10 ++#define V4L2_HEVC_SEI_PIC_STRUCT_TOP_PAIRED_NEXT_BOTTOM 11 ++#define V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_PAIRED_NEXT_TOP 12 ++ ++#define V4L2_HEVC_DPB_ENTRIES_NUM_MAX 16 ++ ++/** ++ * struct v4l2_hevc_dpb_entry - HEVC decoded picture buffer entry ++ * ++ * @timestamp: timestamp of the V4L2 capture buffer to use as reference. ++ * @flags: long term flag for the reference frame ++ * @field_pic: whether the reference is a field picture or a frame. ++ * @reserved: padding field. Should be zeroed by applications. ++ * @pic_order_cnt_val: the picture order count of the current picture. ++ */ ++struct v4l2_hevc_dpb_entry { ++ __u64 timestamp; ++ __u8 flags; ++ __u8 field_pic; ++ __u16 reserved; ++ __s32 pic_order_cnt_val; ++}; ++ ++/** ++ * struct v4l2_hevc_pred_weight_table - HEVC weighted prediction parameters ++ * ++ * @delta_luma_weight_l0: the difference of the weighting factor applied ++ * to the luma prediction value for list 0 ++ * @luma_offset_l0: the additive offset applied to the luma prediction value ++ * for list 0 ++ * @delta_chroma_weight_l0: the difference of the weighting factor applied ++ * to the chroma prediction values for list 0 ++ * @chroma_offset_l0: the difference of the additive offset applied to ++ * the chroma prediction values for list 0 ++ * @delta_luma_weight_l1: the difference of the weighting factor applied ++ * to the luma prediction value for list 1 ++ * @luma_offset_l1: the additive offset applied to the luma prediction value ++ * for list 1 ++ * @delta_chroma_weight_l1: the difference of the weighting factor applied ++ * to the chroma prediction values for list 1 ++ * @chroma_offset_l1: the difference of the additive offset applied to ++ * the chroma prediction values for list 1 ++ * @luma_log2_weight_denom: the base 2 logarithm of the denominator for ++ * all luma weighting factors ++ * @delta_chroma_log2_weight_denom: the difference of the base 2 logarithm ++ * of the denominator for all chroma ++ * weighting factors ++ */ ++struct v4l2_hevc_pred_weight_table { ++ __s8 delta_luma_weight_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; ++ __s8 luma_offset_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; ++ __s8 delta_chroma_weight_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]; ++ __s8 chroma_offset_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]; ++ ++ __s8 delta_luma_weight_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; ++ __s8 luma_offset_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; ++ __s8 delta_chroma_weight_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]; ++ __s8 chroma_offset_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]; ++ ++ __u8 luma_log2_weight_denom; ++ __s8 delta_chroma_log2_weight_denom; ++}; ++ ++#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_LUMA (1ULL << 0) ++#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_CHROMA (1ULL << 1) ++#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_TEMPORAL_MVP_ENABLED (1ULL << 2) ++#define V4L2_HEVC_SLICE_PARAMS_FLAG_MVD_L1_ZERO (1ULL << 3) ++#define V4L2_HEVC_SLICE_PARAMS_FLAG_CABAC_INIT (1ULL << 4) ++#define V4L2_HEVC_SLICE_PARAMS_FLAG_COLLOCATED_FROM_L0 (1ULL << 5) ++#define V4L2_HEVC_SLICE_PARAMS_FLAG_USE_INTEGER_MV (1ULL << 6) ++#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_DEBLOCKING_FILTER_DISABLED (1ULL << 7) ++#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_LOOP_FILTER_ACROSS_SLICES_ENABLED (1ULL << 8) ++#define V4L2_HEVC_SLICE_PARAMS_FLAG_DEPENDENT_SLICE_SEGMENT (1ULL << 9) ++ ++/** ++ * struct v4l2_ctrl_hevc_slice_params - HEVC slice parameters ++ * ++ * This control is a dynamically sized 1-dimensional array, ++ * V4L2_CTRL_FLAG_DYNAMIC_ARRAY flag must be set when using it. ++ * ++ * @bit_size: size (in bits) of the current slice data ++ * @data_byte_offset: offset (in bytes) to the video data in the current slice data ++ * @num_entry_point_offsets: specifies the number of entry point offset syntax ++ * elements in the slice header. ++ * @nal_unit_type: specifies the coding type of the slice (B, P or I) ++ * @nuh_temporal_id_plus1: minus 1 specifies a temporal identifier for the NAL unit ++ * @slice_type: see V4L2_HEVC_SLICE_TYPE_{} ++ * @colour_plane_id: specifies the colour plane associated with the current slice ++ * @slice_pic_order_cnt: specifies the picture order count ++ * @num_ref_idx_l0_active_minus1: this value plus 1 specifies the maximum ++ * reference index for reference picture list 0 ++ * that may be used to decode the slice ++ * @num_ref_idx_l1_active_minus1: this value plus 1 specifies the maximum ++ * reference index for reference picture list 1 ++ * that may be used to decode the slice ++ * @collocated_ref_idx: specifies the reference index of the collocated picture used ++ * for temporal motion vector prediction ++ * @five_minus_max_num_merge_cand: specifies the maximum number of merging ++ * motion vector prediction candidates supported in ++ * the slice subtracted from 5 ++ * @slice_qp_delta: specifies the initial value of QpY to be used for the coding ++ * blocks in the slice ++ * @slice_cb_qp_offset: specifies a difference to be added to the value of pps_cb_qp_offset ++ * @slice_cr_qp_offset: specifies a difference to be added to the value of pps_cr_qp_offset ++ * @slice_act_y_qp_offset: screen content extension parameters ++ * @slice_act_cb_qp_offset: screen content extension parameters ++ * @slice_act_cr_qp_offset: screen content extension parameters ++ * @slice_beta_offset_div2: specify the deblocking parameter offsets for beta divided by 2 ++ * @slice_tc_offset_div2: specify the deblocking parameter offsets for tC divided by 2 ++ * @pic_struct: indicates whether a picture should be displayed as a frame or as one or ++ * more fields ++ * @reserved0: padding field. Should be zeroed by applications. ++ * @slice_segment_addr: specifies the address of the first coding tree block in ++ * the slice segment ++ * @ref_idx_l0: the list of L0 reference elements as indices in the DPB ++ * @ref_idx_l1: the list of L1 reference elements as indices in the DPB ++ * @short_term_ref_pic_set_size: specifies the size of short-term reference ++ * pictures set included in the SPS ++ * @long_term_ref_pic_set_size: specifies the size of long-term reference ++ * pictures set include in the SPS ++ * @pred_weight_table: the prediction weight coefficients for inter-picture ++ * prediction ++ * @reserved1: padding field. Should be zeroed by applications. ++ * @flags: see V4L2_HEVC_SLICE_PARAMS_FLAG_{} ++ */ ++struct v4l2_ctrl_hevc_slice_params { ++ __u32 bit_size; ++ __u32 data_byte_offset; ++ __u32 num_entry_point_offsets; ++ ++ /* ISO/IEC 23008-2, ITU-T Rec. H.265: NAL unit header */ ++ __u8 nal_unit_type; ++ __u8 nuh_temporal_id_plus1; ++ ++ /* ISO/IEC 23008-2, ITU-T Rec. H.265: General slice segment header */ ++ __u8 slice_type; ++ __u8 colour_plane_id; ++ __s32 slice_pic_order_cnt; ++ __u8 num_ref_idx_l0_active_minus1; ++ __u8 num_ref_idx_l1_active_minus1; ++ __u8 collocated_ref_idx; ++ __u8 five_minus_max_num_merge_cand; ++ __s8 slice_qp_delta; ++ __s8 slice_cb_qp_offset; ++ __s8 slice_cr_qp_offset; ++ __s8 slice_act_y_qp_offset; ++ __s8 slice_act_cb_qp_offset; ++ __s8 slice_act_cr_qp_offset; ++ __s8 slice_beta_offset_div2; ++ __s8 slice_tc_offset_div2; ++ ++ /* ISO/IEC 23008-2, ITU-T Rec. H.265: Picture timing SEI message */ ++ __u8 pic_struct; ++ ++ __u8 reserved0[3]; ++ /* ISO/IEC 23008-2, ITU-T Rec. H.265: General slice segment header */ ++ __u32 slice_segment_addr; ++ __u8 ref_idx_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; ++ __u8 ref_idx_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; ++ __u16 short_term_ref_pic_set_size; ++ __u16 long_term_ref_pic_set_size; ++ ++ /* ISO/IEC 23008-2, ITU-T Rec. H.265: Weighted prediction parameter */ ++ struct v4l2_hevc_pred_weight_table pred_weight_table; ++ ++ __u8 reserved1[2]; ++ __u64 flags; ++}; ++ ++#define V4L2_HEVC_DECODE_PARAM_FLAG_IRAP_PIC 0x1 ++#define V4L2_HEVC_DECODE_PARAM_FLAG_IDR_PIC 0x2 ++#define V4L2_HEVC_DECODE_PARAM_FLAG_NO_OUTPUT_OF_PRIOR 0x4 ++ ++/** ++ * struct v4l2_ctrl_hevc_decode_params - HEVC decode parameters ++ * ++ * @pic_order_cnt_val: picture order count ++ * @short_term_ref_pic_set_size: specifies the size of short-term reference ++ * pictures set included in the SPS of the first slice ++ * @long_term_ref_pic_set_size: specifies the size of long-term reference ++ * pictures set include in the SPS of the first slice ++ * @num_active_dpb_entries: the number of entries in dpb ++ * @num_poc_st_curr_before: the number of reference pictures in the short-term ++ * set that come before the current frame ++ * @num_poc_st_curr_after: the number of reference pictures in the short-term ++ * set that come after the current frame ++ * @num_poc_lt_curr: the number of reference pictures in the long-term set ++ * @poc_st_curr_before: provides the index of the short term before references ++ * in DPB array ++ * @poc_st_curr_after: provides the index of the short term after references ++ * in DPB array ++ * @poc_lt_curr: provides the index of the long term references in DPB array ++ * @reserved: padding field. Should be zeroed by applications. ++ * @dpb: the decoded picture buffer, for meta-data about reference frames ++ * @flags: see V4L2_HEVC_DECODE_PARAM_FLAG_{} ++ */ ++struct v4l2_ctrl_hevc_decode_params { ++ __s32 pic_order_cnt_val; ++ __u16 short_term_ref_pic_set_size; ++ __u16 long_term_ref_pic_set_size; ++ __u8 num_active_dpb_entries; ++ __u8 num_poc_st_curr_before; ++ __u8 num_poc_st_curr_after; ++ __u8 num_poc_lt_curr; ++ __u8 poc_st_curr_before[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; ++ __u8 poc_st_curr_after[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; ++ __u8 poc_lt_curr[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; ++ __u8 reserved[4]; ++ struct v4l2_hevc_dpb_entry dpb[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; ++ __u64 flags; ++}; ++ ++/** ++ * struct v4l2_ctrl_hevc_scaling_matrix - HEVC scaling lists parameters ++ * ++ * @scaling_list_4x4: scaling list is used for the scaling process for ++ * transform coefficients. The values on each scaling ++ * list are expected in raster scan order ++ * @scaling_list_8x8: scaling list is used for the scaling process for ++ * transform coefficients. The values on each scaling ++ * list are expected in raster scan order ++ * @scaling_list_16x16: scaling list is used for the scaling process for ++ * transform coefficients. The values on each scaling ++ * list are expected in raster scan order ++ * @scaling_list_32x32: scaling list is used for the scaling process for ++ * transform coefficients. The values on each scaling ++ * list are expected in raster scan order ++ * @scaling_list_dc_coef_16x16: scaling list is used for the scaling process ++ * for transform coefficients. The values on each ++ * scaling list are expected in raster scan order. ++ * @scaling_list_dc_coef_32x32: scaling list is used for the scaling process ++ * for transform coefficients. The values on each ++ * scaling list are expected in raster scan order. ++ */ ++struct v4l2_ctrl_hevc_scaling_matrix { ++ __u8 scaling_list_4x4[6][16]; ++ __u8 scaling_list_8x8[6][64]; ++ __u8 scaling_list_16x16[6][64]; ++ __u8 scaling_list_32x32[2][64]; ++ __u8 scaling_list_dc_coef_16x16[6]; ++ __u8 scaling_list_dc_coef_32x32[2]; ++}; ++ ++#endif +--- a/libavcodec/hevc_parser.c ++++ b/libavcodec/hevc_parser.c +@@ -97,6 +97,19 @@ static int hevc_parse_slice_header(AVCod + avctx->profile = ps->sps->ptl.general_ptl.profile_idc; + avctx->level = ps->sps->ptl.general_ptl.level_idc; + ++ if (ps->sps->chroma_format_idc == 1) { ++ avctx->chroma_sample_location = ps->sps->vui.chroma_loc_info_present_flag ? ++ ps->sps->vui.chroma_sample_loc_type_top_field + 1 : ++ AVCHROMA_LOC_LEFT; ++ } ++ else if (ps->sps->chroma_format_idc == 2 || ++ ps->sps->chroma_format_idc == 3) { ++ avctx->chroma_sample_location = AVCHROMA_LOC_TOPLEFT;; ++ } ++ else { ++ avctx->chroma_sample_location = AVCHROMA_LOC_UNSPECIFIED; ++ } ++ + if (ps->vps->vps_timing_info_present_flag) { + num = ps->vps->vps_num_units_in_tick; + den = ps->vps->vps_time_scale; +--- a/libavcodec/hevc_refs.c ++++ b/libavcodec/hevc_refs.c +@@ -98,18 +98,22 @@ static HEVCFrame *alloc_frame(HEVCContex + if (!frame->rpl_buf) + goto fail; + +- frame->tab_mvf_buf = av_buffer_pool_get(s->tab_mvf_pool); +- if (!frame->tab_mvf_buf) +- goto fail; +- frame->tab_mvf = (MvField *)frame->tab_mvf_buf->data; ++ if (s->tab_mvf_pool) { ++ frame->tab_mvf_buf = av_buffer_pool_get(s->tab_mvf_pool); ++ if (!frame->tab_mvf_buf) ++ goto fail; ++ frame->tab_mvf = (MvField *)frame->tab_mvf_buf->data; ++ } + +- frame->rpl_tab_buf = av_buffer_pool_get(s->rpl_tab_pool); +- if (!frame->rpl_tab_buf) +- goto fail; +- frame->rpl_tab = (RefPicListTab **)frame->rpl_tab_buf->data; +- frame->ctb_count = s->ps.sps->ctb_width * s->ps.sps->ctb_height; +- for (j = 0; j < frame->ctb_count; j++) +- frame->rpl_tab[j] = (RefPicListTab *)frame->rpl_buf->data; ++ if (s->rpl_tab_pool) { ++ frame->rpl_tab_buf = av_buffer_pool_get(s->rpl_tab_pool); ++ if (!frame->rpl_tab_buf) ++ goto fail; ++ frame->rpl_tab = (RefPicListTab **)frame->rpl_tab_buf->data; ++ frame->ctb_count = s->ps.sps->ctb_width * s->ps.sps->ctb_height; ++ for (j = 0; j < frame->ctb_count; j++) ++ frame->rpl_tab[j] = (RefPicListTab *)frame->rpl_buf->data; ++ } + + frame->frame->top_field_first = s->sei.picture_timing.picture_struct == AV_PICTURE_STRUCTURE_TOP_FIELD; + frame->frame->interlaced_frame = (s->sei.picture_timing.picture_struct == AV_PICTURE_STRUCTURE_TOP_FIELD) || (s->sei.picture_timing.picture_struct == AV_PICTURE_STRUCTURE_BOTTOM_FIELD); +@@ -284,14 +288,17 @@ static int init_slice_rpl(HEVCContext *s + int ctb_count = frame->ctb_count; + int ctb_addr_ts = s->ps.pps->ctb_addr_rs_to_ts[s->sh.slice_segment_addr]; + int i; ++ RefPicListTab * const tab = (RefPicListTab *)frame->rpl_buf->data + s->slice_idx; + + if (s->slice_idx >= frame->rpl_buf->size / sizeof(RefPicListTab)) + return AVERROR_INVALIDDATA; + +- for (i = ctb_addr_ts; i < ctb_count; i++) +- frame->rpl_tab[i] = (RefPicListTab *)frame->rpl_buf->data + s->slice_idx; ++ if (frame->rpl_tab) { ++ for (i = ctb_addr_ts; i < ctb_count; i++) ++ frame->rpl_tab[i] = tab; ++ } + +- frame->refPicList = (RefPicList *)frame->rpl_tab[ctb_addr_ts]; ++ frame->refPicList = tab->refPicList; + + return 0; + } +--- a/libavcodec/hevcdec.c ++++ b/libavcodec/hevcdec.c +@@ -340,6 +340,19 @@ static void export_stream_params(HEVCCon + + ff_set_sar(avctx, sps->vui.sar); + ++ if (sps->chroma_format_idc == 1) { ++ avctx->chroma_sample_location = sps->vui.chroma_loc_info_present_flag ? ++ sps->vui.chroma_sample_loc_type_top_field + 1 : ++ AVCHROMA_LOC_LEFT; ++ } ++ else if (sps->chroma_format_idc == 2 || ++ sps->chroma_format_idc == 3) { ++ avctx->chroma_sample_location = AVCHROMA_LOC_TOPLEFT;; ++ } ++ else { ++ avctx->chroma_sample_location = AVCHROMA_LOC_UNSPECIFIED; ++ } ++ + if (sps->vui.video_signal_type_present_flag) + avctx->color_range = sps->vui.video_full_range_flag ? AVCOL_RANGE_JPEG + : AVCOL_RANGE_MPEG; +@@ -402,6 +415,7 @@ static enum AVPixelFormat get_format(HEV + #define HWACCEL_MAX (CONFIG_HEVC_DXVA2_HWACCEL + \ + CONFIG_HEVC_D3D11VA_HWACCEL * 2 + \ + CONFIG_HEVC_NVDEC_HWACCEL + \ ++ CONFIG_HEVC_V4L2REQUEST_HWACCEL + \ + CONFIG_HEVC_VAAPI_HWACCEL + \ + CONFIG_HEVC_VIDEOTOOLBOX_HWACCEL + \ + CONFIG_HEVC_VDPAU_HWACCEL) +@@ -429,6 +443,9 @@ static enum AVPixelFormat get_format(HEV + #if CONFIG_HEVC_VIDEOTOOLBOX_HWACCEL + *fmt++ = AV_PIX_FMT_VIDEOTOOLBOX; + #endif ++#if CONFIG_HEVC_V4L2REQUEST_HWACCEL ++ *fmt++ = AV_PIX_FMT_DRM_PRIME; ++#endif + break; + case AV_PIX_FMT_YUV420P10: + #if CONFIG_HEVC_DXVA2_HWACCEL +@@ -450,6 +467,9 @@ static enum AVPixelFormat get_format(HEV + #if CONFIG_HEVC_NVDEC_HWACCEL + *fmt++ = AV_PIX_FMT_CUDA; + #endif ++#if CONFIG_HEVC_V4L2REQUEST_HWACCEL ++ *fmt++ = AV_PIX_FMT_DRM_PRIME; ++#endif + break; + case AV_PIX_FMT_YUV444P: + #if CONFIG_HEVC_VDPAU_HWACCEL +@@ -504,6 +524,16 @@ static int set_sps(HEVCContext *s, const + if (!sps) + return 0; + ++ // If hwaccel then we don't need all the s/w decode helper arrays ++ if (s->avctx->hwaccel) { ++ export_stream_params(s, sps); ++ ++ s->avctx->pix_fmt = pix_fmt; ++ s->ps.sps = sps; ++ s->ps.vps = (HEVCVPS*) s->ps.vps_list[s->ps.sps->vps_id]->data; ++ return 0; ++ } ++ + ret = pic_arrays_init(s, sps); + if (ret < 0) + goto fail; +@@ -3011,11 +3041,13 @@ static int hevc_frame_start(HEVCContext + ((s->ps.sps->height >> s->ps.sps->log2_min_cb_size) + 1); + int ret; + +- memset(s->horizontal_bs, 0, s->bs_width * s->bs_height); +- memset(s->vertical_bs, 0, s->bs_width * s->bs_height); +- memset(s->cbf_luma, 0, s->ps.sps->min_tb_width * s->ps.sps->min_tb_height); +- memset(s->is_pcm, 0, (s->ps.sps->min_pu_width + 1) * (s->ps.sps->min_pu_height + 1)); +- memset(s->tab_slice_address, -1, pic_size_in_ctb * sizeof(*s->tab_slice_address)); ++ if (s->horizontal_bs) { ++ memset(s->horizontal_bs, 0, s->bs_width * s->bs_height); ++ memset(s->vertical_bs, 0, s->bs_width * s->bs_height); ++ memset(s->cbf_luma, 0, s->ps.sps->min_tb_width * s->ps.sps->min_tb_height); ++ memset(s->is_pcm, 0, (s->ps.sps->min_pu_width + 1) * (s->ps.sps->min_pu_height + 1)); ++ memset(s->tab_slice_address, -1, pic_size_in_ctb * sizeof(*s->tab_slice_address)); ++ } + + s->is_decoded = 0; + s->first_nal_type = s->nal_unit_type; +@@ -3507,8 +3539,13 @@ static int hevc_decode_frame(AVCodecCont + + s->ref = NULL; + ret = decode_nal_units(s, avpkt->data, avpkt->size); +- if (ret < 0) ++ if (ret < 0) { ++ // Ensure that hwaccel knows this frame is over ++ if (s->avctx->hwaccel && s->avctx->hwaccel->abort_frame) ++ s->avctx->hwaccel->abort_frame(s->avctx); ++ + return ret; ++ } + + if (avctx->hwaccel) { + if (s->ref && (ret = avctx->hwaccel->end_frame(avctx)) < 0) { +@@ -3558,15 +3595,19 @@ static int hevc_ref_frame(HEVCContext *s + dst->needs_fg = 1; + } + +- dst->tab_mvf_buf = av_buffer_ref(src->tab_mvf_buf); +- if (!dst->tab_mvf_buf) +- goto fail; +- dst->tab_mvf = src->tab_mvf; ++ if (src->tab_mvf_buf) { ++ dst->tab_mvf_buf = av_buffer_ref(src->tab_mvf_buf); ++ if (!dst->tab_mvf_buf) ++ goto fail; ++ dst->tab_mvf = src->tab_mvf; ++ } + +- dst->rpl_tab_buf = av_buffer_ref(src->rpl_tab_buf); +- if (!dst->rpl_tab_buf) +- goto fail; +- dst->rpl_tab = src->rpl_tab; ++ if (src->rpl_tab_buf) { ++ dst->rpl_tab_buf = av_buffer_ref(src->rpl_tab_buf); ++ if (!dst->rpl_tab_buf) ++ goto fail; ++ dst->rpl_tab = src->rpl_tab; ++ } + + dst->rpl_buf = av_buffer_ref(src->rpl_buf); + if (!dst->rpl_buf) +@@ -3900,6 +3941,9 @@ const FFCodec ff_hevc_decoder = { + #if CONFIG_HEVC_NVDEC_HWACCEL + HWACCEL_NVDEC(hevc), + #endif ++#if CONFIG_HEVC_V4L2REQUEST_HWACCEL ++ HWACCEL_V4L2REQUEST(hevc), ++#endif + #if CONFIG_HEVC_VAAPI_HWACCEL + HWACCEL_VAAPI(hevc), + #endif +--- a/libavcodec/hwaccels.h ++++ b/libavcodec/hwaccels.h +@@ -40,6 +40,7 @@ extern const AVHWAccel ff_hevc_d3d11va_h + extern const AVHWAccel ff_hevc_d3d11va2_hwaccel; + extern const AVHWAccel ff_hevc_dxva2_hwaccel; + extern const AVHWAccel ff_hevc_nvdec_hwaccel; ++extern const AVHWAccel ff_hevc_v4l2request_hwaccel; + extern const AVHWAccel ff_hevc_vaapi_hwaccel; + extern const AVHWAccel ff_hevc_vdpau_hwaccel; + extern const AVHWAccel ff_hevc_videotoolbox_hwaccel; +--- a/libavcodec/hwconfig.h ++++ b/libavcodec/hwconfig.h +@@ -24,6 +24,7 @@ + + + #define HWACCEL_CAP_ASYNC_SAFE (1 << 0) ++#define HWACCEL_CAP_MT_SAFE (1 << 1) + + + typedef struct AVCodecHWConfigInternal { +@@ -70,6 +71,8 @@ typedef struct AVCodecHWConfigInternal { + HW_CONFIG_HWACCEL(1, 1, 0, D3D11, D3D11VA, ff_ ## codec ## _d3d11va2_hwaccel) + #define HWACCEL_NVDEC(codec) \ + HW_CONFIG_HWACCEL(1, 1, 0, CUDA, CUDA, ff_ ## codec ## _nvdec_hwaccel) ++#define HWACCEL_V4L2REQUEST(codec) \ ++ HW_CONFIG_HWACCEL(1, 0, 0, DRM_PRIME, DRM, ff_ ## codec ## _v4l2request_hwaccel) + #define HWACCEL_VAAPI(codec) \ + HW_CONFIG_HWACCEL(1, 1, 1, VAAPI, VAAPI, ff_ ## codec ## _vaapi_hwaccel) + #define HWACCEL_VDPAU(codec) \ +--- a/libavcodec/mmaldec.c ++++ b/libavcodec/mmaldec.c +@@ -24,6 +24,9 @@ + * MMAL Video Decoder + */ + ++#pragma GCC diagnostic push ++// Many many redundant decls in the header files ++#pragma GCC diagnostic ignored "-Wredundant-decls" + #include + #include + #include +@@ -31,6 +34,7 @@ + #include + #include + #include ++#pragma GCC diagnostic pop + #include + + #include "avcodec.h" +--- a/libavcodec/pthread_frame.c ++++ b/libavcodec/pthread_frame.c +@@ -217,7 +217,8 @@ FF_ENABLE_DEPRECATION_WARNINGS + + /* if the previous thread uses hwaccel then we take the lock to ensure + * the threads don't run concurrently */ +- if (avctx->hwaccel) { ++ if (avctx->hwaccel && ++ !(avctx->hwaccel->caps_internal & HWACCEL_CAP_MT_SAFE)) { + pthread_mutex_lock(&p->parent->hwaccel_mutex); + p->hwaccel_serializing = 1; + } +@@ -243,7 +244,7 @@ FF_ENABLE_DEPRECATION_WARNINGS + p->hwaccel_serializing = 0; + pthread_mutex_unlock(&p->parent->hwaccel_mutex); + } +- av_assert0(!avctx->hwaccel); ++ av_assert0(!avctx->hwaccel || (avctx->hwaccel->caps_internal & HWACCEL_CAP_MT_SAFE)); + + if (p->async_serializing) { + p->async_serializing = 0; +@@ -331,6 +332,12 @@ FF_ENABLE_DEPRECATION_WARNINGS + } + + dst->hwaccel_flags = src->hwaccel_flags; ++ if (src->hwaccel && ++ (src->hwaccel->caps_internal & HWACCEL_CAP_MT_SAFE)) { ++ dst->hwaccel = src->hwaccel; ++ dst->hwaccel_context = src->hwaccel_context; ++ dst->internal->hwaccel_priv_data = src->internal->hwaccel_priv_data; ++ } + + err = av_buffer_replace(&dst->internal->pool, src->internal->pool); + if (err < 0) +@@ -461,10 +468,13 @@ static int submit_packet(PerThreadContex + } + + /* transfer the stashed hwaccel state, if any */ +- av_assert0(!p->avctx->hwaccel); +- FFSWAP(const AVHWAccel*, p->avctx->hwaccel, fctx->stash_hwaccel); +- FFSWAP(void*, p->avctx->hwaccel_context, fctx->stash_hwaccel_context); +- FFSWAP(void*, p->avctx->internal->hwaccel_priv_data, fctx->stash_hwaccel_priv); ++ av_assert0(!p->avctx->hwaccel || (p->avctx->hwaccel->caps_internal & HWACCEL_CAP_MT_SAFE)); ++ if (p->avctx->hwaccel && ++ !(p->avctx->hwaccel->caps_internal & HWACCEL_CAP_MT_SAFE)) { ++ FFSWAP(const AVHWAccel*, p->avctx->hwaccel, fctx->stash_hwaccel); ++ FFSWAP(void*, p->avctx->hwaccel_context, fctx->stash_hwaccel_context); ++ FFSWAP(void*, p->avctx->internal->hwaccel_priv_data, fctx->stash_hwaccel_priv); ++ } + + av_packet_unref(p->avpkt); + ret = av_packet_ref(p->avpkt, avpkt); +@@ -656,7 +666,9 @@ void ff_thread_finish_setup(AVCodecConte + + if (!(avctx->active_thread_type&FF_THREAD_FRAME)) return; + +- if (avctx->hwaccel && !p->hwaccel_serializing) { ++ if (avctx->hwaccel && ++ !(avctx->hwaccel->caps_internal & HWACCEL_CAP_MT_SAFE) && ++ !p->hwaccel_serializing) { + pthread_mutex_lock(&p->parent->hwaccel_mutex); + p->hwaccel_serializing = 1; + } +@@ -673,9 +685,12 @@ void ff_thread_finish_setup(AVCodecConte + * this is done here so that this worker thread can wipe its own hwaccel + * state after decoding, without requiring synchronization */ + av_assert0(!p->parent->stash_hwaccel); +- p->parent->stash_hwaccel = avctx->hwaccel; +- p->parent->stash_hwaccel_context = avctx->hwaccel_context; +- p->parent->stash_hwaccel_priv = avctx->internal->hwaccel_priv_data; ++ if (avctx->hwaccel && ++ !(avctx->hwaccel->caps_internal & HWACCEL_CAP_MT_SAFE)) { ++ p->parent->stash_hwaccel = avctx->hwaccel; ++ p->parent->stash_hwaccel_context = avctx->hwaccel_context; ++ p->parent->stash_hwaccel_priv = avctx->internal->hwaccel_priv_data; ++ } + + pthread_mutex_lock(&p->progress_mutex); + if(atomic_load(&p->state) == STATE_SETUP_FINISHED){ +@@ -730,6 +745,15 @@ void ff_frame_thread_free(AVCodecContext + + park_frame_worker_threads(fctx, thread_count); + ++ if (fctx->prev_thread && ++ avctx->hwaccel && (avctx->hwaccel->caps_internal & HWACCEL_CAP_MT_SAFE) && ++ avctx->internal->hwaccel_priv_data != ++ fctx->prev_thread->avctx->internal->hwaccel_priv_data) { ++ if (update_context_from_thread(avctx, fctx->prev_thread->avctx, 1) < 0) { ++ av_log(avctx, AV_LOG_ERROR, "Failed to update user thread.\n"); ++ } ++ } ++ + for (i = 0; i < thread_count; i++) { + PerThreadContext *p = &fctx->threads[i]; + AVCodecContext *ctx = p->avctx; +@@ -778,10 +802,13 @@ void ff_frame_thread_free(AVCodecContext + + /* if we have stashed hwaccel state, move it to the user-facing context, + * so it will be freed in avcodec_close() */ +- av_assert0(!avctx->hwaccel); +- FFSWAP(const AVHWAccel*, avctx->hwaccel, fctx->stash_hwaccel); +- FFSWAP(void*, avctx->hwaccel_context, fctx->stash_hwaccel_context); +- FFSWAP(void*, avctx->internal->hwaccel_priv_data, fctx->stash_hwaccel_priv); ++ av_assert0(!avctx->hwaccel || (avctx->hwaccel->caps_internal & HWACCEL_CAP_MT_SAFE)); ++ if (avctx->hwaccel && ++ !(avctx->hwaccel->caps_internal & HWACCEL_CAP_MT_SAFE)) { ++ FFSWAP(const AVHWAccel*, avctx->hwaccel, fctx->stash_hwaccel); ++ FFSWAP(void*, avctx->hwaccel_context, fctx->stash_hwaccel_context); ++ FFSWAP(void*, avctx->internal->hwaccel_priv_data, fctx->stash_hwaccel_priv); ++ } + + av_freep(&avctx->internal->thread_ctx); + } +--- a/libavcodec/raw.c ++++ b/libavcodec/raw.c +@@ -294,6 +294,12 @@ static const PixelFormatTag raw_pix_fmt_ + { AV_PIX_FMT_RGB565LE,MKTAG( 3 , 0 , 0 , 0 ) }, /* flipped RGB565LE */ + { AV_PIX_FMT_YUV444P, MKTAG('Y', 'V', '2', '4') }, /* YUV444P, swapped UV */ + ++ /* RPI (Might as well define for everything) */ ++ { AV_PIX_FMT_SAND128, MKTAG('S', 'A', 'N', 'D') }, ++ { AV_PIX_FMT_RPI4_8, MKTAG('S', 'A', 'N', 'D') }, ++ { AV_PIX_FMT_SAND64_10, MKTAG('S', 'N', 'D', 'A') }, ++ { AV_PIX_FMT_RPI4_10, MKTAG('S', 'N', 'D', 'B') }, ++ + { AV_PIX_FMT_NONE, 0 }, + }; + +--- a/libavcodec/rawenc.c ++++ b/libavcodec/rawenc.c +@@ -24,6 +24,7 @@ + * Raw Video Encoder + */ + ++#include "config.h" + #include "avcodec.h" + #include "codec_internal.h" + #include "encode.h" +@@ -33,6 +34,10 @@ + #include "libavutil/intreadwrite.h" + #include "libavutil/imgutils.h" + #include "libavutil/internal.h" ++#include "libavutil/avassert.h" ++#if CONFIG_SAND ++#include "libavutil/rpi_sand_fns.h" ++#endif + + static av_cold int raw_encode_init(AVCodecContext *avctx) + { +@@ -46,22 +51,114 @@ static av_cold int raw_encode_init(AVCod + return 0; + } + ++#if CONFIG_SAND ++static int raw_sand8_as_yuv420(AVCodecContext *avctx, AVPacket *pkt, ++ const AVFrame *frame) ++{ ++ const int width = av_frame_cropped_width(frame); ++ const int height = av_frame_cropped_height(frame); ++ const int x0 = frame->crop_left; ++ const int y0 = frame->crop_top; ++ const int size = width * height * 3 / 2; ++ uint8_t * dst; ++ int ret; ++ ++ if ((ret = ff_get_encode_buffer(avctx, pkt, size, 0)) < 0) ++ return ret; ++ ++ dst = pkt->data; ++ ++ av_rpi_sand_to_planar_y8(dst, width, frame->data[0], frame->linesize[0], frame->linesize[3], x0, y0, width, height); ++ dst += width * height; ++ av_rpi_sand_to_planar_c8(dst, width / 2, dst + width * height / 4, width / 2, ++ frame->data[1], frame->linesize[1], av_rpi_sand_frame_stride2(frame), x0 / 2, y0 / 2, width / 2, height / 2); ++ return 0; ++} ++ ++static int raw_sand16_as_yuv420(AVCodecContext *avctx, AVPacket *pkt, ++ const AVFrame *frame) ++{ ++ const int width = av_frame_cropped_width(frame); ++ const int height = av_frame_cropped_height(frame); ++ const int x0 = frame->crop_left; ++ const int y0 = frame->crop_top; ++ const int size = width * height * 3; ++ uint8_t * dst; ++ int ret; ++ ++ if ((ret = ff_get_encode_buffer(avctx, pkt, size, 0)) < 0) ++ return ret; ++ ++ dst = pkt->data; ++ ++ av_rpi_sand_to_planar_y16(dst, width * 2, frame->data[0], frame->linesize[0], frame->linesize[3], x0 * 2, y0, width * 2, height); ++ dst += width * height * 2; ++ av_rpi_sand_to_planar_c16(dst, width, dst + width * height / 2, width, ++ frame->data[1], frame->linesize[1], av_rpi_sand_frame_stride2(frame), x0, y0 / 2, width, height / 2); ++ return 0; ++} ++ ++static int raw_sand30_as_yuv420(AVCodecContext *avctx, AVPacket *pkt, ++ const AVFrame *frame) ++{ ++ const int width = av_frame_cropped_width(frame); ++ const int height = av_frame_cropped_height(frame); ++ const int x0 = frame->crop_left; ++ const int y0 = frame->crop_top; ++ const int size = width * height * 3; ++ uint8_t * dst; ++ int ret; ++ ++ if ((ret = ff_get_encode_buffer(avctx, pkt, size, 0)) < 0) ++ return ret; ++ ++ dst = pkt->data; ++ ++ av_rpi_sand30_to_planar_y16(dst, width * 2, frame->data[0], frame->linesize[0], frame->linesize[3], x0, y0, width, height); ++ dst += width * height * 2; ++ av_rpi_sand30_to_planar_c16(dst, width, dst + width * height / 2, width, ++ frame->data[1], frame->linesize[1], av_rpi_sand_frame_stride2(frame), x0/2, y0 / 2, width/2, height / 2); ++ return 0; ++} ++#endif ++ ++ + static int raw_encode(AVCodecContext *avctx, AVPacket *pkt, +- const AVFrame *frame, int *got_packet) ++ const AVFrame *src_frame, int *got_packet) + { +- int ret = av_image_get_buffer_size(frame->format, +- frame->width, frame->height, 1); ++ int ret; ++ AVFrame * frame = NULL; + +- if (ret < 0) ++#if CONFIG_SAND ++ if (av_rpi_is_sand_frame(src_frame)) { ++ ret = av_rpi_is_sand8_frame(src_frame) ? raw_sand8_as_yuv420(avctx, pkt, src_frame) : ++ av_rpi_is_sand16_frame(src_frame) ? raw_sand16_as_yuv420(avctx, pkt, src_frame) : ++ av_rpi_is_sand30_frame(src_frame) ? raw_sand30_as_yuv420(avctx, pkt, src_frame) : -1; ++ *got_packet = (ret == 0); + return ret; ++ } ++#endif ++ ++ if ((frame = av_frame_clone(src_frame)) == NULL) { ++ ret = AVERROR(ENOMEM); ++ goto fail; ++ } ++ ++ if ((ret = av_frame_apply_cropping(frame, AV_FRAME_CROP_UNALIGNED)) < 0) ++ goto fail; ++ ++ ret = av_image_get_buffer_size(frame->format, ++ frame->width, frame->height, 1); ++ if (ret < 0) ++ goto fail; + + if ((ret = ff_get_encode_buffer(avctx, pkt, ret, 0)) < 0) +- return ret; ++ goto fail; + if ((ret = av_image_copy_to_buffer(pkt->data, pkt->size, + (const uint8_t **)frame->data, frame->linesize, + frame->format, + frame->width, frame->height, 1)) < 0) +- return ret; ++ goto fail; + + if(avctx->codec_tag == AV_RL32("yuv2") && ret > 0 && + frame->format == AV_PIX_FMT_YUYV422) { +@@ -77,8 +174,15 @@ static int raw_encode(AVCodecContext *av + AV_WB64(&pkt->data[8 * x], v << 48 | v >> 16); + } + } ++ pkt->flags |= AV_PKT_FLAG_KEY; ++ av_frame_free(&frame); + *got_packet = 1; + return 0; ++ ++fail: ++ av_frame_free(&frame); ++ *got_packet = 0; ++ return ret; + } + + const FFCodec ff_rawvideo_encoder = { +--- a/libavcodec/v4l2_buffers.c ++++ b/libavcodec/v4l2_buffers.c +@@ -21,6 +21,7 @@ + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + ++#include + #include + #include + #include +@@ -28,57 +29,89 @@ + #include + #include + #include "libavcodec/avcodec.h" ++#include "libavcodec/internal.h" ++#include "libavutil/avassert.h" + #include "libavutil/pixdesc.h" ++#include "libavutil/hwcontext.h" + #include "v4l2_context.h" + #include "v4l2_buffers.h" + #include "v4l2_m2m.h" ++#include "v4l2_req_dmabufs.h" ++#include "weak_link.h" + + #define USEC_PER_SEC 1000000 +-static AVRational v4l2_timebase = { 1, USEC_PER_SEC }; ++static const AVRational v4l2_timebase = { 1, USEC_PER_SEC }; + +-static inline V4L2m2mContext *buf_to_m2mctx(V4L2Buffer *buf) ++static inline V4L2m2mContext *ctx_to_m2mctx(const V4L2Context *ctx) + { +- return V4L2_TYPE_IS_OUTPUT(buf->context->type) ? +- container_of(buf->context, V4L2m2mContext, output) : +- container_of(buf->context, V4L2m2mContext, capture); ++ return V4L2_TYPE_IS_OUTPUT(ctx->type) ? ++ container_of(ctx, V4L2m2mContext, output) : ++ container_of(ctx, V4L2m2mContext, capture); + } + +-static inline AVCodecContext *logger(V4L2Buffer *buf) ++static inline V4L2m2mContext *buf_to_m2mctx(const V4L2Buffer * const buf) + { +- return buf_to_m2mctx(buf)->avctx; ++ return ctx_to_m2mctx(buf->context); + } + +-static inline AVRational v4l2_get_timebase(V4L2Buffer *avbuf) ++static inline AVCodecContext *logger(const V4L2Buffer * const buf) + { +- V4L2m2mContext *s = buf_to_m2mctx(avbuf); ++ return buf_to_m2mctx(buf)->avctx; ++} + +- if (s->avctx->pkt_timebase.num) +- return s->avctx->pkt_timebase; +- return s->avctx->time_base; ++static inline AVRational v4l2_get_timebase(const V4L2Buffer * const avbuf) ++{ ++ const V4L2m2mContext *s = buf_to_m2mctx(avbuf); ++ const AVRational tb = s->avctx->pkt_timebase.num ? ++ s->avctx->pkt_timebase : ++ s->avctx->time_base; ++ return tb.num && tb.den ? tb : v4l2_timebase; + } + +-static inline void v4l2_set_pts(V4L2Buffer *out, int64_t pts) ++static inline struct timeval tv_from_int(const int64_t t) + { +- int64_t v4l2_pts; ++ return (struct timeval){ ++ .tv_usec = t % USEC_PER_SEC, ++ .tv_sec = t / USEC_PER_SEC ++ }; ++} + +- if (pts == AV_NOPTS_VALUE) +- pts = 0; ++static inline int64_t int_from_tv(const struct timeval t) ++{ ++ return (int64_t)t.tv_sec * USEC_PER_SEC + t.tv_usec; ++} + ++static inline void v4l2_set_pts(V4L2Buffer * const out, const int64_t pts) ++{ + /* convert pts to v4l2 timebase */ +- v4l2_pts = av_rescale_q(pts, v4l2_get_timebase(out), v4l2_timebase); +- out->buf.timestamp.tv_usec = v4l2_pts % USEC_PER_SEC; +- out->buf.timestamp.tv_sec = v4l2_pts / USEC_PER_SEC; ++ const int64_t v4l2_pts = ++ pts == AV_NOPTS_VALUE ? 0 : ++ av_rescale_q(pts, v4l2_get_timebase(out), v4l2_timebase); ++ out->buf.timestamp = tv_from_int(v4l2_pts); + } + +-static inline int64_t v4l2_get_pts(V4L2Buffer *avbuf) ++static inline int64_t v4l2_get_pts(const V4L2Buffer * const avbuf) + { +- int64_t v4l2_pts; +- ++ const int64_t v4l2_pts = int_from_tv(avbuf->buf.timestamp); ++ return v4l2_pts != 0 ? v4l2_pts : AV_NOPTS_VALUE; ++#if 0 + /* convert pts back to encoder timebase */ +- v4l2_pts = (int64_t)avbuf->buf.timestamp.tv_sec * USEC_PER_SEC + +- avbuf->buf.timestamp.tv_usec; ++ return ++ avbuf->context->no_pts_rescale ? v4l2_pts : ++ v4l2_pts == 0 ? AV_NOPTS_VALUE : ++ av_rescale_q(v4l2_pts, v4l2_timebase, v4l2_get_timebase(avbuf)); ++#endif ++} + +- return av_rescale_q(v4l2_pts, v4l2_timebase, v4l2_get_timebase(avbuf)); ++static void set_buf_length(V4L2Buffer *out, unsigned int plane, uint32_t bytesused, uint32_t length) ++{ ++ if (V4L2_TYPE_IS_MULTIPLANAR(out->buf.type)) { ++ out->planes[plane].bytesused = bytesused; ++ out->planes[plane].length = length; ++ } else { ++ out->buf.bytesused = bytesused; ++ out->buf.length = length; ++ } + } + + static enum AVColorPrimaries v4l2_get_color_primaries(V4L2Buffer *buf) +@@ -115,6 +148,105 @@ static enum AVColorPrimaries v4l2_get_co + return AVCOL_PRI_UNSPECIFIED; + } + ++static void v4l2_set_color(V4L2Buffer *buf, ++ const enum AVColorPrimaries avcp, ++ const enum AVColorSpace avcs, ++ const enum AVColorTransferCharacteristic avxc) ++{ ++ enum v4l2_ycbcr_encoding ycbcr = V4L2_YCBCR_ENC_DEFAULT; ++ enum v4l2_colorspace cs = V4L2_COLORSPACE_DEFAULT; ++ enum v4l2_xfer_func xfer = V4L2_XFER_FUNC_DEFAULT; ++ ++ switch (avcp) { ++ case AVCOL_PRI_BT709: ++ cs = V4L2_COLORSPACE_REC709; ++ ycbcr = V4L2_YCBCR_ENC_709; ++ break; ++ case AVCOL_PRI_BT470M: ++ cs = V4L2_COLORSPACE_470_SYSTEM_M; ++ ycbcr = V4L2_YCBCR_ENC_601; ++ break; ++ case AVCOL_PRI_BT470BG: ++ cs = V4L2_COLORSPACE_470_SYSTEM_BG; ++ break; ++ case AVCOL_PRI_SMPTE170M: ++ cs = V4L2_COLORSPACE_SMPTE170M; ++ break; ++ case AVCOL_PRI_SMPTE240M: ++ cs = V4L2_COLORSPACE_SMPTE240M; ++ break; ++ case AVCOL_PRI_BT2020: ++ cs = V4L2_COLORSPACE_BT2020; ++ break; ++ case AVCOL_PRI_SMPTE428: ++ case AVCOL_PRI_SMPTE431: ++ case AVCOL_PRI_SMPTE432: ++ case AVCOL_PRI_EBU3213: ++ case AVCOL_PRI_RESERVED: ++ case AVCOL_PRI_FILM: ++ case AVCOL_PRI_UNSPECIFIED: ++ default: ++ break; ++ } ++ ++ switch (avcs) { ++ case AVCOL_SPC_RGB: ++ cs = V4L2_COLORSPACE_SRGB; ++ break; ++ case AVCOL_SPC_BT709: ++ cs = V4L2_COLORSPACE_REC709; ++ break; ++ case AVCOL_SPC_FCC: ++ cs = V4L2_COLORSPACE_470_SYSTEM_M; ++ break; ++ case AVCOL_SPC_BT470BG: ++ cs = V4L2_COLORSPACE_470_SYSTEM_BG; ++ break; ++ case AVCOL_SPC_SMPTE170M: ++ cs = V4L2_COLORSPACE_SMPTE170M; ++ break; ++ case AVCOL_SPC_SMPTE240M: ++ cs = V4L2_COLORSPACE_SMPTE240M; ++ break; ++ case AVCOL_SPC_BT2020_CL: ++ cs = V4L2_COLORSPACE_BT2020; ++ ycbcr = V4L2_YCBCR_ENC_BT2020_CONST_LUM; ++ break; ++ case AVCOL_SPC_BT2020_NCL: ++ cs = V4L2_COLORSPACE_BT2020; ++ break; ++ default: ++ break; ++ } ++ ++ switch (xfer) { ++ case AVCOL_TRC_BT709: ++ xfer = V4L2_XFER_FUNC_709; ++ break; ++ case AVCOL_TRC_IEC61966_2_1: ++ xfer = V4L2_XFER_FUNC_SRGB; ++ break; ++ case AVCOL_TRC_SMPTE240M: ++ xfer = V4L2_XFER_FUNC_SMPTE240M; ++ break; ++ case AVCOL_TRC_SMPTE2084: ++ xfer = V4L2_XFER_FUNC_SMPTE2084; ++ break; ++ default: ++ break; ++ } ++ ++ if (V4L2_TYPE_IS_MULTIPLANAR(buf->buf.type)) { ++ buf->context->format.fmt.pix_mp.colorspace = cs; ++ buf->context->format.fmt.pix_mp.ycbcr_enc = ycbcr; ++ buf->context->format.fmt.pix_mp.xfer_func = xfer; ++ } else { ++ buf->context->format.fmt.pix.colorspace = cs; ++ buf->context->format.fmt.pix.ycbcr_enc = ycbcr; ++ buf->context->format.fmt.pix.xfer_func = xfer; ++ } ++} ++ + static enum AVColorRange v4l2_get_color_range(V4L2Buffer *buf) + { + enum v4l2_quantization qt; +@@ -133,6 +265,20 @@ static enum AVColorRange v4l2_get_color_ + return AVCOL_RANGE_UNSPECIFIED; + } + ++static void v4l2_set_color_range(V4L2Buffer *buf, const enum AVColorRange avcr) ++{ ++ const enum v4l2_quantization q = ++ avcr == AVCOL_RANGE_MPEG ? V4L2_QUANTIZATION_LIM_RANGE : ++ avcr == AVCOL_RANGE_JPEG ? V4L2_QUANTIZATION_FULL_RANGE : ++ V4L2_QUANTIZATION_DEFAULT; ++ ++ if (V4L2_TYPE_IS_MULTIPLANAR(buf->buf.type)) { ++ buf->context->format.fmt.pix_mp.quantization = q; ++ } else { ++ buf->context->format.fmt.pix.quantization = q; ++ } ++} ++ + static enum AVColorSpace v4l2_get_color_space(V4L2Buffer *buf) + { + enum v4l2_ycbcr_encoding ycbcr; +@@ -209,73 +355,218 @@ static enum AVColorTransferCharacteristi + return AVCOL_TRC_UNSPECIFIED; + } + +-static void v4l2_free_buffer(void *opaque, uint8_t *unused) ++static int v4l2_buf_is_interlaced(const V4L2Buffer * const buf) + { +- V4L2Buffer* avbuf = opaque; +- V4L2m2mContext *s = buf_to_m2mctx(avbuf); ++ return V4L2_FIELD_IS_INTERLACED(buf->buf.field); ++} + +- if (atomic_fetch_sub(&avbuf->context_refcount, 1) == 1) { +- atomic_fetch_sub_explicit(&s->refcount, 1, memory_order_acq_rel); ++static int v4l2_buf_is_top_first(const V4L2Buffer * const buf) ++{ ++ return buf->buf.field == V4L2_FIELD_INTERLACED_TB; ++} + +- if (s->reinit) { +- if (!atomic_load(&s->refcount)) +- sem_post(&s->refsync); +- } else { +- if (s->draining && V4L2_TYPE_IS_OUTPUT(avbuf->context->type)) { +- /* no need to queue more buffers to the driver */ +- avbuf->status = V4L2BUF_AVAILABLE; +- } +- else if (avbuf->context->streamon) +- ff_v4l2_buffer_enqueue(avbuf); +- } ++static void v4l2_set_interlace(V4L2Buffer * const buf, const int is_interlaced, const int is_tff) ++{ ++ buf->buf.field = !is_interlaced ? V4L2_FIELD_NONE : ++ is_tff ? V4L2_FIELD_INTERLACED_TB : V4L2_FIELD_INTERLACED_BT; ++} + +- av_buffer_unref(&avbuf->context_ref); ++static uint8_t * v4l2_get_drm_frame(V4L2Buffer *avbuf) ++{ ++ AVDRMFrameDescriptor *drm_desc = &avbuf->drm_frame; ++ AVDRMLayerDescriptor *layer; ++ ++ /* fill the DRM frame descriptor */ ++ drm_desc->nb_objects = avbuf->num_planes; ++ drm_desc->nb_layers = 1; ++ ++ layer = &drm_desc->layers[0]; ++ layer->nb_planes = avbuf->num_planes; ++ ++ for (int i = 0; i < avbuf->num_planes; i++) { ++ layer->planes[i].object_index = i; ++ layer->planes[i].offset = avbuf->plane_info[i].offset; ++ layer->planes[i].pitch = avbuf->plane_info[i].bytesperline; ++ } ++ ++ switch (avbuf->context->av_pix_fmt) { ++ case AV_PIX_FMT_0BGR: ++ layer->format = DRM_FORMAT_RGBX8888; ++ break; ++ case AV_PIX_FMT_RGB0: ++ layer->format = DRM_FORMAT_XBGR8888; ++ break; ++ case AV_PIX_FMT_0RGB: ++ layer->format = DRM_FORMAT_BGRX8888; ++ break; ++ case AV_PIX_FMT_BGR0: ++ layer->format = DRM_FORMAT_XRGB8888; ++ break; ++ ++ case AV_PIX_FMT_ABGR: ++ layer->format = DRM_FORMAT_RGBA8888; ++ break; ++ case AV_PIX_FMT_RGBA: ++ layer->format = DRM_FORMAT_ABGR8888; ++ break; ++ case AV_PIX_FMT_ARGB: ++ layer->format = DRM_FORMAT_BGRA8888; ++ break; ++ case AV_PIX_FMT_BGRA: ++ layer->format = DRM_FORMAT_ARGB8888; ++ break; ++ ++ case AV_PIX_FMT_BGR24: ++ layer->format = DRM_FORMAT_BGR888; ++ break; ++ case AV_PIX_FMT_RGB24: ++ layer->format = DRM_FORMAT_RGB888; ++ break; ++ ++ case AV_PIX_FMT_YUYV422: ++ ++ layer->format = DRM_FORMAT_YUYV; ++ layer->nb_planes = 1; ++ ++ break; ++ ++ case AV_PIX_FMT_NV12: ++ case AV_PIX_FMT_NV21: ++ ++ layer->format = avbuf->context->av_pix_fmt == AV_PIX_FMT_NV12 ? ++ DRM_FORMAT_NV12 : DRM_FORMAT_NV21; ++ ++ if (avbuf->num_planes > 1) ++ break; ++ ++ layer->nb_planes = 2; ++ ++ layer->planes[1].object_index = 0; ++ layer->planes[1].offset = avbuf->plane_info[0].bytesperline * ++ avbuf->context->format.fmt.pix.height; ++ layer->planes[1].pitch = avbuf->plane_info[0].bytesperline; ++ break; ++ ++ case AV_PIX_FMT_YUV420P: ++ ++ layer->format = DRM_FORMAT_YUV420; ++ ++ if (avbuf->num_planes > 1) ++ break; ++ ++ layer->nb_planes = 3; ++ ++ layer->planes[1].object_index = 0; ++ layer->planes[1].offset = avbuf->plane_info[0].bytesperline * ++ avbuf->context->format.fmt.pix.height; ++ layer->planes[1].pitch = avbuf->plane_info[0].bytesperline >> 1; ++ ++ layer->planes[2].object_index = 0; ++ layer->planes[2].offset = layer->planes[1].offset + ++ ((avbuf->plane_info[0].bytesperline * ++ avbuf->context->format.fmt.pix.height) >> 2); ++ layer->planes[2].pitch = avbuf->plane_info[0].bytesperline >> 1; ++ break; ++ ++ default: ++ drm_desc->nb_layers = 0; ++ break; + } ++ ++ return (uint8_t *) drm_desc; + } + +-static int v4l2_buf_increase_ref(V4L2Buffer *in) ++static void v4l2_free_bufref(void *opaque, uint8_t *data) + { +- V4L2m2mContext *s = buf_to_m2mctx(in); ++ AVBufferRef * bufref = (AVBufferRef *)data; ++ V4L2Buffer *avbuf = (V4L2Buffer *)bufref->data; ++ struct V4L2Context *ctx = ff_weak_link_lock(&avbuf->context_wl); + +- if (in->context_ref) +- atomic_fetch_add(&in->context_refcount, 1); +- else { +- in->context_ref = av_buffer_ref(s->self_ref); +- if (!in->context_ref) +- return AVERROR(ENOMEM); ++ if (ctx != NULL) { ++ // Buffer still attached to context ++ V4L2m2mContext * const s = ctx_to_m2mctx(ctx); ++ ++ if (!s->output_drm && avbuf->dmabuf[0] != NULL) { ++ for (unsigned int i = 0; i != avbuf->num_planes; ++i) ++ dmabuf_read_end(avbuf->dmabuf[i]); ++ } ++ ++ ff_mutex_lock(&ctx->lock); ++ ++ ff_v4l2_buffer_set_avail(avbuf); ++ avbuf->buf.timestamp.tv_sec = 0; ++ avbuf->buf.timestamp.tv_usec = 0; ++ ++ if (V4L2_TYPE_IS_OUTPUT(ctx->type)) { ++ av_log(logger(avbuf), AV_LOG_DEBUG, "%s: Buffer avail\n", ctx->name); ++ } ++ else if (ctx->streamon) { ++ av_log(logger(avbuf), AV_LOG_DEBUG, "%s: Buffer requeue\n", ctx->name); ++ ff_v4l2_buffer_enqueue(avbuf); // will set to IN_DRIVER ++ } ++ else { ++ av_log(logger(avbuf), AV_LOG_DEBUG, "%s: Buffer freed but streamoff\n", ctx->name); ++ } + +- in->context_refcount = 1; ++ ff_mutex_unlock(&ctx->lock); + } + +- in->status = V4L2BUF_RET_USER; +- atomic_fetch_add_explicit(&s->refcount, 1, memory_order_relaxed); ++ ff_weak_link_unlock(avbuf->context_wl); ++ av_buffer_unref(&bufref); ++} + +- return 0; ++static inline uint32_t ff_v4l2_buf_len(const struct v4l2_buffer * b, unsigned int i) ++{ ++ return V4L2_TYPE_IS_MULTIPLANAR(b->type) ? b->m.planes[i].length : b->length; + } + +-static int v4l2_buf_to_bufref(V4L2Buffer *in, int plane, AVBufferRef **buf) ++static int v4l2_buffer_export_drm(V4L2Buffer* avbuf) + { +- int ret; ++ int i, ret; ++ const V4L2m2mContext * const s = buf_to_m2mctx(avbuf); + +- if (plane >= in->num_planes) +- return AVERROR(EINVAL); ++ for (i = 0; i < avbuf->num_planes; i++) { ++ int dma_fd = -1; ++ const uint32_t blen = ff_v4l2_buf_len(&avbuf->buf, i); + +- /* even though most encoders return 0 in data_offset encoding vp8 does require this value */ +- *buf = av_buffer_create((char *)in->plane_info[plane].mm_addr + in->planes[plane].data_offset, +- in->plane_info[plane].length, v4l2_free_buffer, in, 0); +- if (!*buf) +- return AVERROR(ENOMEM); ++ if (s->db_ctl != NULL) { ++ if ((avbuf->dmabuf[i] = dmabuf_alloc(s->db_ctl, blen)) == NULL) ++ return AVERROR(ENOMEM); ++ dma_fd = dmabuf_fd(avbuf->dmabuf[i]); ++ if (V4L2_TYPE_IS_MULTIPLANAR(avbuf->buf.type)) ++ avbuf->buf.m.planes[i].m.fd = dma_fd; ++ else ++ avbuf->buf.m.fd = dma_fd; + +- ret = v4l2_buf_increase_ref(in); +- if (ret) +- av_buffer_unref(buf); ++ if (!s->output_drm) ++ avbuf->plane_info[i].mm_addr = dmabuf_map(avbuf->dmabuf[i]); ++ } ++ else { ++ struct v4l2_exportbuffer expbuf; ++ memset(&expbuf, 0, sizeof(expbuf)); ++ ++ expbuf.index = avbuf->buf.index; ++ expbuf.type = avbuf->buf.type; ++ expbuf.plane = i; ++ ++ ret = ioctl(s->fd, VIDIOC_EXPBUF, &expbuf); ++ if (ret < 0) ++ return AVERROR(errno); ++ dma_fd = expbuf.fd; ++ } + +- return ret; ++ avbuf->drm_frame.objects[i].size = blen; ++ avbuf->drm_frame.objects[i].fd = dma_fd; ++ avbuf->drm_frame.objects[i].format_modifier = DRM_FORMAT_MOD_LINEAR; ++ } ++ ++ return 0; + } + + static int v4l2_bufref_to_buf(V4L2Buffer *out, int plane, const uint8_t* data, int size, int offset) + { + unsigned int bytesused, length; ++ int rv = 0; + + if (plane >= out->num_planes) + return AVERROR(EINVAL); +@@ -283,32 +574,61 @@ static int v4l2_bufref_to_buf(V4L2Buffer + length = out->plane_info[plane].length; + bytesused = FFMIN(size+offset, length); + +- memcpy((uint8_t*)out->plane_info[plane].mm_addr+offset, data, FFMIN(size, length-offset)); +- +- if (V4L2_TYPE_IS_MULTIPLANAR(out->buf.type)) { +- out->planes[plane].bytesused = bytesused; +- out->planes[plane].length = length; +- } else { +- out->buf.bytesused = bytesused; +- out->buf.length = length; ++ if (size > length - offset) { ++ size = length - offset; ++ rv = AVERROR(ENOMEM); + } + +- return 0; ++ memcpy((uint8_t*)out->plane_info[plane].mm_addr+offset, data, size); ++ ++ set_buf_length(out, plane, bytesused, length); ++ ++ return rv; ++} ++ ++static AVBufferRef * wrap_avbuf(V4L2Buffer * const avbuf) ++{ ++ AVBufferRef * bufref = av_buffer_ref(avbuf->context->bufrefs[avbuf->buf.index]); ++ AVBufferRef * newbuf; ++ ++ if (!bufref) ++ return NULL; ++ ++ newbuf = av_buffer_create((uint8_t *)bufref, sizeof(*bufref), v4l2_free_bufref, NULL, 0); ++ if (newbuf == NULL) ++ av_buffer_unref(&bufref); ++ ++ avbuf->status = V4L2BUF_RET_USER; ++ return newbuf; + } + + static int v4l2_buffer_buf_to_swframe(AVFrame *frame, V4L2Buffer *avbuf) + { +- int i, ret; ++ int i; + + frame->format = avbuf->context->av_pix_fmt; + +- for (i = 0; i < avbuf->num_planes; i++) { +- ret = v4l2_buf_to_bufref(avbuf, i, &frame->buf[i]); +- if (ret) +- return ret; ++ frame->buf[0] = wrap_avbuf(avbuf); ++ if (frame->buf[0] == NULL) ++ return AVERROR(ENOMEM); ++ ++ if (buf_to_m2mctx(avbuf)->output_drm) { ++ /* 1. get references to the actual data */ ++ const int rv = ff_v4l2_context_frames_set(avbuf->context); ++ if (rv != 0) ++ return rv; ++ ++ frame->data[0] = (uint8_t *) v4l2_get_drm_frame(avbuf); ++ frame->format = AV_PIX_FMT_DRM_PRIME; ++ frame->hw_frames_ctx = av_buffer_ref(avbuf->context->frames_ref); ++ return 0; ++ } ++ + ++ /* 1. get references to the actual data */ ++ for (i = 0; i < avbuf->num_planes; i++) { ++ frame->data[i] = (uint8_t *)avbuf->plane_info[i].mm_addr + avbuf->planes[i].data_offset; + frame->linesize[i] = avbuf->plane_info[i].bytesperline; +- frame->data[i] = frame->buf[i]->data; + } + + /* fixup special cases */ +@@ -317,88 +637,152 @@ static int v4l2_buffer_buf_to_swframe(AV + case AV_PIX_FMT_NV21: + if (avbuf->num_planes > 1) + break; +- frame->linesize[1] = avbuf->plane_info[0].bytesperline; +- frame->data[1] = frame->buf[0]->data + avbuf->plane_info[0].bytesperline * avbuf->context->format.fmt.pix_mp.height; ++ frame->linesize[1] = frame->linesize[0]; ++ frame->data[1] = frame->data[0] + frame->linesize[0] * ff_v4l2_get_format_height(&avbuf->context->format); + break; + + case AV_PIX_FMT_YUV420P: + if (avbuf->num_planes > 1) + break; +- frame->linesize[1] = avbuf->plane_info[0].bytesperline >> 1; +- frame->linesize[2] = avbuf->plane_info[0].bytesperline >> 1; +- frame->data[1] = frame->buf[0]->data + avbuf->plane_info[0].bytesperline * avbuf->context->format.fmt.pix_mp.height; +- frame->data[2] = frame->data[1] + ((avbuf->plane_info[0].bytesperline * avbuf->context->format.fmt.pix_mp.height) >> 2); ++ frame->linesize[1] = frame->linesize[0] / 2; ++ frame->linesize[2] = frame->linesize[1]; ++ frame->data[1] = frame->data[0] + frame->linesize[0] * ff_v4l2_get_format_height(&avbuf->context->format); ++ frame->data[2] = frame->data[1] + frame->linesize[1] * ff_v4l2_get_format_height(&avbuf->context->format) / 2; + break; + + default: + break; + } + ++ if (avbuf->dmabuf[0] != NULL) { ++ for (unsigned int i = 0; i != avbuf->num_planes; ++i) ++ dmabuf_read_start(avbuf->dmabuf[i]); ++ } ++ ++ return 0; ++} ++ ++static void cpy_2d(uint8_t * dst, int dst_stride, const uint8_t * src, int src_stride, int w, int h) ++{ ++ if (dst_stride == src_stride && w + 32 >= dst_stride) { ++ memcpy(dst, src, dst_stride * h); ++ } ++ else { ++ while (--h >= 0) { ++ memcpy(dst, src, w); ++ dst += dst_stride; ++ src += src_stride; ++ } ++ } ++} ++ ++static int is_chroma(const AVPixFmtDescriptor *desc, int i, int num_planes) ++{ ++ return i != 0 && !(i == num_planes - 1 && (desc->flags & AV_PIX_FMT_FLAG_ALPHA)); ++} ++ ++static int v4l2_buffer_primeframe_to_buf(const AVFrame *frame, V4L2Buffer *out) ++{ ++ const AVDRMFrameDescriptor *const src = (const AVDRMFrameDescriptor *)frame->data[0]; ++ ++ if (frame->format != AV_PIX_FMT_DRM_PRIME || !src) ++ return AVERROR(EINVAL); ++ ++ av_assert0(out->buf.memory == V4L2_MEMORY_DMABUF); ++ ++ if (V4L2_TYPE_IS_MULTIPLANAR(out->buf.type)) { ++ // Only currently cope with single buffer types ++ if (out->buf.length != 1) ++ return AVERROR_PATCHWELCOME; ++ if (src->nb_objects != 1) ++ return AVERROR(EINVAL); ++ ++ out->planes[0].m.fd = src->objects[0].fd; ++ } ++ else { ++ if (src->nb_objects != 1) ++ return AVERROR(EINVAL); ++ ++ out->buf.m.fd = src->objects[0].fd; ++ } ++ ++ // No need to copy src AVDescriptor and if we did then we may confuse ++ // fd close on free ++ out->ref_buf = av_buffer_ref(frame->buf[0]); ++ + return 0; + } + + static int v4l2_buffer_swframe_to_buf(const AVFrame *frame, V4L2Buffer *out) + { +- int i, ret; +- struct v4l2_format fmt = out->context->format; +- int pixel_format = V4L2_TYPE_IS_MULTIPLANAR(fmt.type) ? +- fmt.fmt.pix_mp.pixelformat : fmt.fmt.pix.pixelformat; +- int height = V4L2_TYPE_IS_MULTIPLANAR(fmt.type) ? +- fmt.fmt.pix_mp.height : fmt.fmt.pix.height; +- int is_planar_format = 0; +- +- switch (pixel_format) { +- case V4L2_PIX_FMT_YUV420M: +- case V4L2_PIX_FMT_YVU420M: +-#ifdef V4L2_PIX_FMT_YUV422M +- case V4L2_PIX_FMT_YUV422M: +-#endif +-#ifdef V4L2_PIX_FMT_YVU422M +- case V4L2_PIX_FMT_YVU422M: +-#endif +-#ifdef V4L2_PIX_FMT_YUV444M +- case V4L2_PIX_FMT_YUV444M: +-#endif +-#ifdef V4L2_PIX_FMT_YVU444M +- case V4L2_PIX_FMT_YVU444M: +-#endif +- case V4L2_PIX_FMT_NV12M: +- case V4L2_PIX_FMT_NV21M: +- case V4L2_PIX_FMT_NV12MT_16X16: +- case V4L2_PIX_FMT_NV12MT: +- case V4L2_PIX_FMT_NV16M: +- case V4L2_PIX_FMT_NV61M: +- is_planar_format = 1; +- } +- +- if (!is_planar_format) { +- const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(frame->format); +- int planes_nb = 0; +- int offset = 0; +- +- for (i = 0; i < desc->nb_components; i++) +- planes_nb = FFMAX(planes_nb, desc->comp[i].plane + 1); +- +- for (i = 0; i < planes_nb; i++) { +- int size, h = height; +- if (i == 1 || i == 2) { ++ int i; ++ int num_planes = 0; ++ int pel_strides[4] = {0}; ++ ++ const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(frame->format); ++ ++ if ((desc->flags & AV_PIX_FMT_FLAG_HWACCEL) != 0) { ++ av_log(NULL, AV_LOG_ERROR, "%s: HWACCEL cannot be copied\n", __func__); ++ return -1; ++ } ++ ++ for (i = 0; i != desc->nb_components; ++i) { ++ if (desc->comp[i].plane >= num_planes) ++ num_planes = desc->comp[i].plane + 1; ++ pel_strides[desc->comp[i].plane] = desc->comp[i].step; ++ } ++ ++ if (out->num_planes > 1) { ++ if (num_planes != out->num_planes) { ++ av_log(NULL, AV_LOG_ERROR, "%s: Num planes mismatch: %d != %d\n", __func__, num_planes, out->num_planes); ++ return -1; ++ } ++ for (i = 0; i != num_planes; ++i) { ++ int w = frame->width; ++ int h = frame->height; ++ if (is_chroma(desc, i, num_planes)) { ++ w = AV_CEIL_RSHIFT(w, desc->log2_chroma_w); + h = AV_CEIL_RSHIFT(h, desc->log2_chroma_h); + } +- size = frame->linesize[i] * h; +- ret = v4l2_bufref_to_buf(out, 0, frame->data[i], size, offset); +- if (ret) +- return ret; +- offset += size; ++ ++ cpy_2d(out->plane_info[i].mm_addr, out->plane_info[i].bytesperline, ++ frame->data[i], frame->linesize[i], ++ w * pel_strides[i], h); ++ set_buf_length(out, i, out->plane_info[i].bytesperline * h, out->plane_info[i].length); + } +- return 0; + } ++ else ++ { ++ unsigned int offset = 0; ++ ++ for (i = 0; i != num_planes; ++i) { ++ int w = frame->width; ++ int h = frame->height; ++ int dst_stride = out->plane_info[0].bytesperline; ++ uint8_t * const dst = (uint8_t *)out->plane_info[0].mm_addr + offset; ++ ++ if (is_chroma(desc, i, num_planes)) { ++ // Is chroma ++ dst_stride >>= desc->log2_chroma_w; ++ offset += dst_stride * (out->context->height >> desc->log2_chroma_h); ++ w = AV_CEIL_RSHIFT(w, desc->log2_chroma_w); ++ h = AV_CEIL_RSHIFT(h, desc->log2_chroma_h); ++ } ++ else { ++ // Is luma or alpha ++ offset += dst_stride * out->context->height; ++ } ++ if (offset > out->plane_info[0].length) { ++ av_log(NULL, AV_LOG_ERROR, "%s: Plane total %u > buffer size %zu\n", __func__, offset, out->plane_info[0].length); ++ return -1; ++ } + +- for (i = 0; i < out->num_planes; i++) { +- ret = v4l2_bufref_to_buf(out, i, frame->buf[i]->data, frame->buf[i]->size, 0); +- if (ret) +- return ret; ++ cpy_2d(dst, dst_stride, ++ frame->data[i], frame->linesize[i], ++ w * pel_strides[i], h); ++ } ++ set_buf_length(out, 0, offset, out->plane_info[0].length); + } +- + return 0; + } + +@@ -408,16 +792,31 @@ static int v4l2_buffer_swframe_to_buf(co + * + ******************************************************************************/ + +-int ff_v4l2_buffer_avframe_to_buf(const AVFrame *frame, V4L2Buffer *out) ++int ff_v4l2_buffer_avframe_to_buf(const AVFrame *frame, V4L2Buffer *out, const int64_t track_ts) + { +- v4l2_set_pts(out, frame->pts); +- +- return v4l2_buffer_swframe_to_buf(frame, out); ++ out->buf.flags = frame->key_frame ? ++ (out->buf.flags | V4L2_BUF_FLAG_KEYFRAME) : ++ (out->buf.flags & ~V4L2_BUF_FLAG_KEYFRAME); ++ // Beware that colour info is held in format rather than the actual ++ // v4l2 buffer struct so this may not be as useful as you might hope ++ v4l2_set_color(out, frame->color_primaries, frame->colorspace, frame->color_trc); ++ v4l2_set_color_range(out, frame->color_range); ++ // PTS & interlace are buffer vars ++ if (track_ts) ++ out->buf.timestamp = tv_from_int(track_ts); ++ else ++ v4l2_set_pts(out, frame->pts); ++ v4l2_set_interlace(out, frame->interlaced_frame, frame->top_field_first); ++ ++ return frame->format == AV_PIX_FMT_DRM_PRIME ? ++ v4l2_buffer_primeframe_to_buf(frame, out) : ++ v4l2_buffer_swframe_to_buf(frame, out); + } + + int ff_v4l2_buffer_buf_to_avframe(AVFrame *frame, V4L2Buffer *avbuf) + { + int ret; ++ V4L2Context * const ctx = avbuf->context; + + av_frame_unref(frame); + +@@ -428,17 +827,32 @@ int ff_v4l2_buffer_buf_to_avframe(AVFram + + /* 2. get frame information */ + frame->key_frame = !!(avbuf->buf.flags & V4L2_BUF_FLAG_KEYFRAME); ++ frame->pict_type = frame->key_frame ? AV_PICTURE_TYPE_I : ++ (avbuf->buf.flags & V4L2_BUF_FLAG_PFRAME) != 0 ? AV_PICTURE_TYPE_P : ++ (avbuf->buf.flags & V4L2_BUF_FLAG_BFRAME) != 0 ? AV_PICTURE_TYPE_B : ++ AV_PICTURE_TYPE_NONE; + frame->color_primaries = v4l2_get_color_primaries(avbuf); + frame->colorspace = v4l2_get_color_space(avbuf); + frame->color_range = v4l2_get_color_range(avbuf); + frame->color_trc = v4l2_get_color_trc(avbuf); + frame->pts = v4l2_get_pts(avbuf); + frame->pkt_dts = AV_NOPTS_VALUE; ++ frame->interlaced_frame = v4l2_buf_is_interlaced(avbuf); ++ frame->top_field_first = v4l2_buf_is_top_first(avbuf); + + /* these values are updated also during re-init in v4l2_process_driver_event */ +- frame->height = avbuf->context->height; +- frame->width = avbuf->context->width; +- frame->sample_aspect_ratio = avbuf->context->sample_aspect_ratio; ++ frame->height = ctx->height; ++ frame->width = ctx->width; ++ frame->sample_aspect_ratio = ctx->sample_aspect_ratio; ++ ++ if (ctx->selection.height && ctx->selection.width) { ++ frame->crop_left = ctx->selection.left < frame->width ? ctx->selection.left : 0; ++ frame->crop_top = ctx->selection.top < frame->height ? ctx->selection.top : 0; ++ frame->crop_right = ctx->selection.left + ctx->selection.width < frame->width ? ++ frame->width - (ctx->selection.left + ctx->selection.width) : 0; ++ frame->crop_bottom = ctx->selection.top + ctx->selection.height < frame->height ? ++ frame->height - (ctx->selection.top + ctx->selection.height) : 0; ++ } + + /* 3. report errors upstream */ + if (avbuf->buf.flags & V4L2_BUF_FLAG_ERROR) { +@@ -451,15 +865,15 @@ int ff_v4l2_buffer_buf_to_avframe(AVFram + + int ff_v4l2_buffer_buf_to_avpkt(AVPacket *pkt, V4L2Buffer *avbuf) + { +- int ret; +- + av_packet_unref(pkt); +- ret = v4l2_buf_to_bufref(avbuf, 0, &pkt->buf); +- if (ret) +- return ret; ++ ++ pkt->buf = wrap_avbuf(avbuf); ++ if (pkt->buf == NULL) ++ return AVERROR(ENOMEM); + + pkt->size = V4L2_TYPE_IS_MULTIPLANAR(avbuf->buf.type) ? avbuf->buf.m.planes[0].bytesused : avbuf->buf.bytesused; +- pkt->data = pkt->buf->data; ++ pkt->data = (uint8_t*)avbuf->plane_info[0].mm_addr + avbuf->planes[0].data_offset; ++ pkt->flags = 0; + + if (avbuf->buf.flags & V4L2_BUF_FLAG_KEYFRAME) + pkt->flags |= AV_PKT_FLAG_KEY; +@@ -474,39 +888,108 @@ int ff_v4l2_buffer_buf_to_avpkt(AVPacket + return 0; + } + +-int ff_v4l2_buffer_avpkt_to_buf(const AVPacket *pkt, V4L2Buffer *out) ++int ff_v4l2_buffer_avpkt_to_buf_ext(const AVPacket * const pkt, V4L2Buffer * const out, ++ const void *extdata, size_t extlen, ++ const int64_t timestamp) + { + int ret; + +- ret = v4l2_bufref_to_buf(out, 0, pkt->data, pkt->size, 0); +- if (ret) ++ if (extlen) { ++ ret = v4l2_bufref_to_buf(out, 0, extdata, extlen, 0); ++ if (ret) ++ return ret; ++ } ++ ++ ret = v4l2_bufref_to_buf(out, 0, pkt->data, pkt->size, extlen); ++ if (ret && ret != AVERROR(ENOMEM)) + return ret; + +- v4l2_set_pts(out, pkt->pts); ++ if (timestamp) ++ out->buf.timestamp = tv_from_int(timestamp); ++ else ++ v4l2_set_pts(out, pkt->pts); ++ ++ out->buf.flags = (pkt->flags & AV_PKT_FLAG_KEY) != 0 ? ++ (out->buf.flags | V4L2_BUF_FLAG_KEYFRAME) : ++ (out->buf.flags & ~V4L2_BUF_FLAG_KEYFRAME); + +- if (pkt->flags & AV_PKT_FLAG_KEY) +- out->flags = V4L2_BUF_FLAG_KEYFRAME; ++ return ret; ++} + +- return 0; ++int ff_v4l2_buffer_avpkt_to_buf(const AVPacket *pkt, V4L2Buffer *out) ++{ ++ return ff_v4l2_buffer_avpkt_to_buf_ext(pkt, out, NULL, 0, 0); ++} ++ ++ ++static void v4l2_buffer_buffer_free(void *opaque, uint8_t *data) ++{ ++ V4L2Buffer * const avbuf = (V4L2Buffer *)data; ++ int i; ++ ++ for (i = 0; i != FF_ARRAY_ELEMS(avbuf->plane_info); ++i) { ++ struct V4L2Plane_info *p = avbuf->plane_info + i; ++ if (p->mm_addr != NULL) ++ munmap(p->mm_addr, p->length); ++ } ++ ++ if (avbuf->dmabuf[0] == NULL) { ++ for (i = 0; i != FF_ARRAY_ELEMS(avbuf->drm_frame.objects); ++i) { ++ if (avbuf->drm_frame.objects[i].fd != -1) ++ close(avbuf->drm_frame.objects[i].fd); ++ } ++ } ++ else { ++ for (i = 0; i != FF_ARRAY_ELEMS(avbuf->dmabuf); ++i) { ++ dmabuf_free(avbuf->dmabuf[i]); ++ } ++ } ++ ++ av_buffer_unref(&avbuf->ref_buf); ++ ++ ff_weak_link_unref(&avbuf->context_wl); ++ ++ av_free(avbuf); + } + +-int ff_v4l2_buffer_initialize(V4L2Buffer* avbuf, int index) ++ ++int ff_v4l2_buffer_initialize(AVBufferRef ** pbufref, int index, V4L2Context *ctx, enum v4l2_memory mem) + { +- V4L2Context *ctx = avbuf->context; + int ret, i; ++ V4L2Buffer * const avbuf = av_mallocz(sizeof(*avbuf)); ++ AVBufferRef * bufref; ++ V4L2m2mContext * const s = ctx_to_m2mctx(ctx); ++ int want_mmap; + +- avbuf->buf.memory = V4L2_MEMORY_MMAP; ++ *pbufref = NULL; ++ if (avbuf == NULL) ++ return AVERROR(ENOMEM); ++ ++ bufref = av_buffer_create((uint8_t*)avbuf, sizeof(*avbuf), v4l2_buffer_buffer_free, NULL, 0); ++ if (bufref == NULL) { ++ av_free(avbuf); ++ return AVERROR(ENOMEM); ++ } ++ ++ avbuf->context = ctx; ++ avbuf->buf.memory = mem; + avbuf->buf.type = ctx->type; + avbuf->buf.index = index; + ++ for (i = 0; i != FF_ARRAY_ELEMS(avbuf->drm_frame.objects); ++i) { ++ avbuf->drm_frame.objects[i].fd = -1; ++ } ++ ++ avbuf->context_wl = ff_weak_link_ref(ctx->wl_master); ++ + if (V4L2_TYPE_IS_MULTIPLANAR(ctx->type)) { + avbuf->buf.length = VIDEO_MAX_PLANES; + avbuf->buf.m.planes = avbuf->planes; + } + +- ret = ioctl(buf_to_m2mctx(avbuf)->fd, VIDIOC_QUERYBUF, &avbuf->buf); ++ ret = ioctl(s->fd, VIDIOC_QUERYBUF, &avbuf->buf); + if (ret < 0) +- return AVERROR(errno); ++ goto fail; + + if (V4L2_TYPE_IS_MULTIPLANAR(ctx->type)) { + avbuf->num_planes = 0; +@@ -518,33 +1001,41 @@ int ff_v4l2_buffer_initialize(V4L2Buffer + } else + avbuf->num_planes = 1; + +- for (i = 0; i < avbuf->num_planes; i++) { ++ want_mmap = avbuf->buf.memory == V4L2_MEMORY_MMAP && ++ (V4L2_TYPE_IS_OUTPUT(ctx->type) || !buf_to_m2mctx(avbuf)->output_drm); + ++ for (i = 0; i < avbuf->num_planes; i++) { + avbuf->plane_info[i].bytesperline = V4L2_TYPE_IS_MULTIPLANAR(ctx->type) ? + ctx->format.fmt.pix_mp.plane_fmt[i].bytesperline : + ctx->format.fmt.pix.bytesperline; + + if (V4L2_TYPE_IS_MULTIPLANAR(ctx->type)) { + avbuf->plane_info[i].length = avbuf->buf.m.planes[i].length; +- avbuf->plane_info[i].mm_addr = mmap(NULL, avbuf->buf.m.planes[i].length, +- PROT_READ | PROT_WRITE, MAP_SHARED, +- buf_to_m2mctx(avbuf)->fd, avbuf->buf.m.planes[i].m.mem_offset); ++ avbuf->plane_info[i].offset = avbuf->buf.m.planes[i].data_offset; ++ ++ if (want_mmap) ++ avbuf->plane_info[i].mm_addr = mmap(NULL, avbuf->buf.m.planes[i].length, ++ PROT_READ | PROT_WRITE, MAP_SHARED, ++ buf_to_m2mctx(avbuf)->fd, avbuf->buf.m.planes[i].m.mem_offset); + } else { + avbuf->plane_info[i].length = avbuf->buf.length; +- avbuf->plane_info[i].mm_addr = mmap(NULL, avbuf->buf.length, +- PROT_READ | PROT_WRITE, MAP_SHARED, +- buf_to_m2mctx(avbuf)->fd, avbuf->buf.m.offset); ++ avbuf->plane_info[i].offset = 0; ++ ++ if (want_mmap) ++ avbuf->plane_info[i].mm_addr = mmap(NULL, avbuf->buf.length, ++ PROT_READ | PROT_WRITE, MAP_SHARED, ++ buf_to_m2mctx(avbuf)->fd, avbuf->buf.m.offset); + } + +- if (avbuf->plane_info[i].mm_addr == MAP_FAILED) +- return AVERROR(ENOMEM); ++ if (avbuf->plane_info[i].mm_addr == MAP_FAILED) { ++ avbuf->plane_info[i].mm_addr = NULL; ++ ret = AVERROR(ENOMEM); ++ goto fail; ++ } + } + + avbuf->status = V4L2BUF_AVAILABLE; + +- if (V4L2_TYPE_IS_OUTPUT(ctx->type)) +- return 0; +- + if (V4L2_TYPE_IS_MULTIPLANAR(ctx->type)) { + avbuf->buf.m.planes = avbuf->planes; + avbuf->buf.length = avbuf->num_planes; +@@ -554,20 +1045,52 @@ int ff_v4l2_buffer_initialize(V4L2Buffer + avbuf->buf.length = avbuf->planes[0].length; + } + +- return ff_v4l2_buffer_enqueue(avbuf); ++ if (V4L2_TYPE_IS_CAPTURE(ctx->type) && !want_mmap) { ++ // export_drm does dmabuf alloc if we aren't using v4l2 alloc ++ ret = v4l2_buffer_export_drm(avbuf); ++ if (ret) { ++ av_log(logger(avbuf), AV_LOG_ERROR, "Failed to get exported drm handles\n"); ++ goto fail; ++ } ++ } ++ ++ *pbufref = bufref; ++ return 0; ++ ++fail: ++ av_buffer_unref(&bufref); ++ return ret; + } + + int ff_v4l2_buffer_enqueue(V4L2Buffer* avbuf) + { + int ret; ++ int qc; + +- avbuf->buf.flags = avbuf->flags; ++ if (avbuf->buf.timestamp.tv_sec || avbuf->buf.timestamp.tv_usec) { ++ av_log(logger(avbuf), AV_LOG_DEBUG, "--- %s pre VIDIOC_QBUF: index %d, ts=%ld.%06ld count=%d\n", ++ avbuf->context->name, avbuf->buf.index, ++ avbuf->buf.timestamp.tv_sec, avbuf->buf.timestamp.tv_usec, ++ avbuf->context->q_count); ++ } + + ret = ioctl(buf_to_m2mctx(avbuf)->fd, VIDIOC_QBUF, &avbuf->buf); +- if (ret < 0) +- return AVERROR(errno); ++ if (ret < 0) { ++ int err = errno; ++ av_log(logger(avbuf), AV_LOG_ERROR, "--- %s VIDIOC_QBUF: index %d FAIL err %d (%s)\n", ++ avbuf->context->name, avbuf->buf.index, ++ err, strerror(err)); ++ return AVERROR(err); ++ } + ++ // Lock not wanted - if called from buffer free then lock already obtained ++ qc = atomic_fetch_add(&avbuf->context->q_count, 1) + 1; + avbuf->status = V4L2BUF_IN_DRIVER; ++ pthread_cond_broadcast(&avbuf->context->cond); ++ ++ av_log(logger(avbuf), AV_LOG_DEBUG, "--- %s VIDIOC_QBUF: index %d, ts=%ld.%06ld count=%d\n", ++ avbuf->context->name, avbuf->buf.index, ++ avbuf->buf.timestamp.tv_sec, avbuf->buf.timestamp.tv_usec, qc); + + return 0; + } +--- a/libavcodec/v4l2_buffers.h ++++ b/libavcodec/v4l2_buffers.h +@@ -28,31 +28,47 @@ + #include + #include + ++#include "avcodec.h" + #include "libavutil/buffer.h" + #include "libavutil/frame.h" ++#include "libavutil/hwcontext_drm.h" + #include "packet.h" + + enum V4L2Buffer_status { + V4L2BUF_AVAILABLE, + V4L2BUF_IN_DRIVER, ++ V4L2BUF_IN_USE, + V4L2BUF_RET_USER, + }; + + /** + * V4L2Buffer (wrapper for v4l2_buffer management) + */ ++struct V4L2Context; ++struct ff_weak_link_client; ++struct dmabuf_h; ++ + typedef struct V4L2Buffer { +- /* each buffer needs to have a reference to its context */ ++ /* each buffer needs to have a reference to its context ++ * The pointer is good enough for most operation but once the buffer has ++ * been passed to the user the buffer may become orphaned so for free ops ++ * the weak link must be used to ensure that the context is actually ++ * there ++ */ + struct V4L2Context *context; ++ struct ff_weak_link_client *context_wl; + +- /* This object is refcounted per-plane, so we need to keep track +- * of how many context-refs we are holding. */ +- AVBufferRef *context_ref; +- atomic_uint context_refcount; ++ /* DRM descriptor */ ++ AVDRMFrameDescriptor drm_frame; ++ /* For DRM_PRIME encode - need to keep a ref to the source buffer till we ++ * are done ++ */ ++ AVBufferRef * ref_buf; + + /* keep track of the mmap address and mmap length */ + struct V4L2Plane_info { +- int bytesperline; ++ size_t bytesperline; ++ size_t offset; + void * mm_addr; + size_t length; + } plane_info[VIDEO_MAX_PLANES]; +@@ -63,9 +79,9 @@ typedef struct V4L2Buffer { + struct v4l2_buffer buf; + struct v4l2_plane planes[VIDEO_MAX_PLANES]; + +- int flags; + enum V4L2Buffer_status status; + ++ struct dmabuf_h * dmabuf[VIDEO_MAX_PLANES]; // If externally alloced dmabufs - stash other info here + } V4L2Buffer; + + /** +@@ -101,6 +117,10 @@ int ff_v4l2_buffer_buf_to_avpkt(AVPacket + */ + int ff_v4l2_buffer_avpkt_to_buf(const AVPacket *pkt, V4L2Buffer *out); + ++int ff_v4l2_buffer_avpkt_to_buf_ext(const AVPacket * const pkt, V4L2Buffer * const out, ++ const void *extdata, size_t extlen, ++ const int64_t timestamp); ++ + /** + * Extracts the data from an AVFrame to a V4L2Buffer + * +@@ -109,7 +129,7 @@ int ff_v4l2_buffer_avpkt_to_buf(const AV + * + * @returns 0 in case of success, a negative AVERROR code otherwise + */ +-int ff_v4l2_buffer_avframe_to_buf(const AVFrame *frame, V4L2Buffer *out); ++int ff_v4l2_buffer_avframe_to_buf(const AVFrame *frame, V4L2Buffer *out, const int64_t track_ts); + + /** + * Initializes a V4L2Buffer +@@ -119,7 +139,7 @@ int ff_v4l2_buffer_avframe_to_buf(const + * + * @returns 0 in case of success, a negative AVERROR code otherwise + */ +-int ff_v4l2_buffer_initialize(V4L2Buffer* avbuf, int index); ++int ff_v4l2_buffer_initialize(AVBufferRef **avbuf, int index, struct V4L2Context *ctx, enum v4l2_memory mem); + + /** + * Enqueues a V4L2Buffer +@@ -130,5 +150,12 @@ int ff_v4l2_buffer_initialize(V4L2Buffer + */ + int ff_v4l2_buffer_enqueue(V4L2Buffer* avbuf); + ++static inline void ++ff_v4l2_buffer_set_avail(V4L2Buffer* const avbuf) ++{ ++ avbuf->status = V4L2BUF_AVAILABLE; ++ av_buffer_unref(&avbuf->ref_buf); ++} ++ + + #endif // AVCODEC_V4L2_BUFFERS_H +--- a/libavcodec/v4l2_context.c ++++ b/libavcodec/v4l2_context.c +@@ -27,11 +27,14 @@ + #include + #include + #include ++#include "libavutil/avassert.h" ++#include "libavutil/pixdesc.h" + #include "libavcodec/avcodec.h" + #include "libavcodec/internal.h" + #include "v4l2_buffers.h" + #include "v4l2_fmt.h" + #include "v4l2_m2m.h" ++#include "weak_link.h" + + struct v4l2_format_update { + uint32_t v4l2_fmt; +@@ -41,26 +44,168 @@ struct v4l2_format_update { + int update_avfmt; + }; + +-static inline V4L2m2mContext *ctx_to_m2mctx(V4L2Context *ctx) ++ ++static inline int64_t track_to_pts(AVCodecContext *avctx, unsigned int n) + { +- return V4L2_TYPE_IS_OUTPUT(ctx->type) ? +- container_of(ctx, V4L2m2mContext, output) : +- container_of(ctx, V4L2m2mContext, capture); ++ return (int64_t)n; + } + +-static inline AVCodecContext *logger(V4L2Context *ctx) ++static inline unsigned int pts_to_track(AVCodecContext *avctx, const int64_t pts) + { +- return ctx_to_m2mctx(ctx)->avctx; ++ return (unsigned int)pts; ++} ++ ++// FFmpeg requires us to propagate a number of vars from the coded pkt into ++// the decoded frame. The only thing that tracks like that in V4L2 stateful ++// is timestamp. PTS maps to timestamp for this decode. FFmpeg makes no ++// guarantees about PTS being unique or specified for every frame so replace ++// the supplied PTS with a simple incrementing number and keep a circular ++// buffer of all the things we want preserved (including the original PTS) ++// indexed by the tracking no. ++static int64_t ++xlat_pts_pkt_in(AVCodecContext *const avctx, xlat_track_t *const x, const AVPacket *const avpkt) ++{ ++ int64_t track_pts; ++ ++ // Avoid 0 ++ if (++x->track_no == 0) ++ x->track_no = 1; ++ ++ track_pts = track_to_pts(avctx, x->track_no); ++ ++ av_log(avctx, AV_LOG_TRACE, "In pkt PTS=%" PRId64 ", DTS=%" PRId64 ", track=%" PRId64 ", n=%u\n", avpkt->pts, avpkt->dts, track_pts, x->track_no); ++ x->track_els[x->track_no % FF_V4L2_M2M_TRACK_SIZE] = (V4L2m2mTrackEl){ ++ .discard = 0, ++ .pending = 1, ++ .pkt_size = avpkt->size, ++ .pts = avpkt->pts, ++ .dts = avpkt->dts, ++ .reordered_opaque = avctx->reordered_opaque, ++ .pkt_pos = avpkt->pos, ++ .pkt_duration = avpkt->duration, ++ .track_pts = track_pts ++ }; ++ return track_pts; ++} ++ ++static int64_t ++xlat_pts_frame_in(AVCodecContext *const avctx, xlat_track_t *const x, const AVFrame *const frame) ++{ ++ int64_t track_pts; ++ ++ // Avoid 0 ++ if (++x->track_no == 0) ++ x->track_no = 1; ++ ++ track_pts = track_to_pts(avctx, x->track_no); ++ ++ av_log(avctx, AV_LOG_TRACE, "In frame PTS=%" PRId64 ", track=%" PRId64 ", n=%u\n", frame->pts, track_pts, x->track_no); ++ x->track_els[x->track_no % FF_V4L2_M2M_TRACK_SIZE] = (V4L2m2mTrackEl){ ++ .discard = 0, ++ .pending = 1, ++ .pkt_size = 0, ++ .pts = frame->pts, ++ .dts = AV_NOPTS_VALUE, ++ .reordered_opaque = frame->reordered_opaque, ++ .pkt_pos = frame->pkt_pos, ++ .pkt_duration = frame->pkt_duration, ++ .track_pts = track_pts ++ }; ++ return track_pts; ++} ++ ++ ++// Returns -1 if we should discard the frame ++static int ++xlat_pts_frame_out(AVCodecContext *const avctx, ++ xlat_track_t * const x, ++ AVFrame *const frame) ++{ ++ unsigned int n = pts_to_track(avctx, frame->pts) % FF_V4L2_M2M_TRACK_SIZE; ++ V4L2m2mTrackEl *const t = x->track_els + n; ++ if (frame->pts == AV_NOPTS_VALUE || frame->pts != t->track_pts) ++ { ++ av_log(avctx, frame->pts == AV_NOPTS_VALUE ? AV_LOG_DEBUG : AV_LOG_WARNING, ++ "Frame tracking failure: pts=%" PRId64 ", track[%d]=%" PRId64 "\n", frame->pts, n, t->track_pts); ++ frame->pts = AV_NOPTS_VALUE; ++ frame->pkt_dts = AV_NOPTS_VALUE; ++ frame->reordered_opaque = x->last_opaque; ++ frame->pkt_pos = -1; ++ frame->pkt_duration = 0; ++ frame->pkt_size = -1; ++ } ++ else if (!t->discard) ++ { ++ frame->pts = t->pending ? t->pts : AV_NOPTS_VALUE; ++ frame->pkt_dts = t->dts; ++ frame->reordered_opaque = t->reordered_opaque; ++ frame->pkt_pos = t->pkt_pos; ++ frame->pkt_duration = t->pkt_duration; ++ frame->pkt_size = t->pkt_size; ++ ++ x->last_opaque = x->track_els[n].reordered_opaque; ++ if (frame->pts != AV_NOPTS_VALUE) ++ x->last_pts = frame->pts; ++ t->pending = 0; ++ } ++ else ++ { ++ av_log(avctx, AV_LOG_DEBUG, "Discard frame (flushed): pts=%" PRId64 ", track[%d]=%" PRId64 "\n", frame->pts, n, t->track_pts); ++ return -1; ++ } ++ ++ av_log(avctx, AV_LOG_TRACE, "Out frame PTS=%" PRId64 "/%"PRId64", DTS=%" PRId64 ", track=%"PRId64", n=%d\n", ++ frame->pts, frame->best_effort_timestamp, frame->pkt_dts, t->track_pts, n); ++ return 0; ++} ++ ++// Returns -1 if we should discard the frame ++static int ++xlat_pts_pkt_out(AVCodecContext *const avctx, ++ xlat_track_t * const x, ++ AVPacket *const pkt) ++{ ++ unsigned int n = pts_to_track(avctx, pkt->pts) % FF_V4L2_M2M_TRACK_SIZE; ++ V4L2m2mTrackEl *const t = x->track_els + n; ++ if (pkt->pts == AV_NOPTS_VALUE || pkt->pts != t->track_pts) ++ { ++ av_log(avctx, pkt->pts == AV_NOPTS_VALUE ? AV_LOG_DEBUG : AV_LOG_WARNING, ++ "Pkt tracking failure: pts=%" PRId64 ", track[%d]=%" PRId64 "\n", pkt->pts, n, t->track_pts); ++ pkt->pts = AV_NOPTS_VALUE; ++ } ++ else if (!t->discard) ++ { ++ pkt->pts = t->pending ? t->pts : AV_NOPTS_VALUE; ++ ++ x->last_opaque = x->track_els[n].reordered_opaque; ++ if (pkt->pts != AV_NOPTS_VALUE) ++ x->last_pts = pkt->pts; ++ t->pending = 0; ++ } ++ else ++ { ++ av_log(avctx, AV_LOG_DEBUG, "Discard packet (flushed): pts=%" PRId64 ", track[%d]=%" PRId64 "\n", pkt->pts, n, t->track_pts); ++ return -1; ++ } ++ ++ // * Would like something much better than this...xlat(offset + out_count)? ++ pkt->dts = pkt->pts; ++ av_log(avctx, AV_LOG_TRACE, "Out pkt PTS=%" PRId64 ", track=%"PRId64", n=%d\n", ++ pkt->pts, t->track_pts, n); ++ return 0; + } + +-static inline unsigned int v4l2_get_width(struct v4l2_format *fmt) ++ ++static inline V4L2m2mContext *ctx_to_m2mctx(const V4L2Context *ctx) + { +- return V4L2_TYPE_IS_MULTIPLANAR(fmt->type) ? fmt->fmt.pix_mp.width : fmt->fmt.pix.width; ++ return V4L2_TYPE_IS_OUTPUT(ctx->type) ? ++ container_of(ctx, V4L2m2mContext, output) : ++ container_of(ctx, V4L2m2mContext, capture); + } + +-static inline unsigned int v4l2_get_height(struct v4l2_format *fmt) ++static inline AVCodecContext *logger(const V4L2Context *ctx) + { +- return V4L2_TYPE_IS_MULTIPLANAR(fmt->type) ? fmt->fmt.pix_mp.height : fmt->fmt.pix.height; ++ return ctx_to_m2mctx(ctx)->avctx; + } + + static AVRational v4l2_get_sar(V4L2Context *ctx) +@@ -81,21 +226,29 @@ static AVRational v4l2_get_sar(V4L2Conte + return sar; + } + +-static inline unsigned int v4l2_resolution_changed(V4L2Context *ctx, struct v4l2_format *fmt2) ++static inline int ctx_buffers_alloced(const V4L2Context * const ctx) ++{ ++ return ctx->bufrefs != NULL; ++} ++ ++// Width/Height changed or we don't have an alloc in the first place? ++static int ctx_resolution_changed(const V4L2Context *ctx, const struct v4l2_format *fmt2) + { +- struct v4l2_format *fmt1 = &ctx->format; +- int ret = V4L2_TYPE_IS_MULTIPLANAR(ctx->type) ? +- fmt1->fmt.pix_mp.width != fmt2->fmt.pix_mp.width || +- fmt1->fmt.pix_mp.height != fmt2->fmt.pix_mp.height +- : +- fmt1->fmt.pix.width != fmt2->fmt.pix.width || +- fmt1->fmt.pix.height != fmt2->fmt.pix.height; ++ const struct v4l2_format *fmt1 = &ctx->format; ++ int ret = !ctx_buffers_alloced(ctx) || ++ (V4L2_TYPE_IS_MULTIPLANAR(ctx->type) ? ++ fmt1->fmt.pix_mp.width != fmt2->fmt.pix_mp.width || ++ fmt1->fmt.pix_mp.height != fmt2->fmt.pix_mp.height ++ : ++ fmt1->fmt.pix.width != fmt2->fmt.pix.width || ++ fmt1->fmt.pix.height != fmt2->fmt.pix.height); + + if (ret) +- av_log(logger(ctx), AV_LOG_DEBUG, "%s changed (%dx%d) -> (%dx%d)\n", ++ av_log(logger(ctx), AV_LOG_DEBUG, "V4L2 %s changed: alloc=%d (%dx%d) -> (%dx%d)\n", + ctx->name, +- v4l2_get_width(fmt1), v4l2_get_height(fmt1), +- v4l2_get_width(fmt2), v4l2_get_height(fmt2)); ++ ctx_buffers_alloced(ctx), ++ ff_v4l2_get_format_width(fmt1), ff_v4l2_get_format_height(fmt1), ++ ff_v4l2_get_format_width(fmt2), ff_v4l2_get_format_height(fmt2)); + + return ret; + } +@@ -153,76 +306,100 @@ static inline void v4l2_save_to_context( + } + } + +-static int v4l2_start_decode(V4L2Context *ctx) ++static int get_default_selection(V4L2Context * const ctx, struct v4l2_rect *r) + { +- struct v4l2_decoder_cmd cmd = { +- .cmd = V4L2_DEC_CMD_START, +- .flags = 0, ++ V4L2m2mContext * const s = ctx_to_m2mctx(ctx); ++ struct v4l2_selection selection = { ++ .type = V4L2_BUF_TYPE_VIDEO_CAPTURE, ++ .target = V4L2_SEL_TGT_COMPOSE + }; +- int ret; + +- ret = ioctl(ctx_to_m2mctx(ctx)->fd, VIDIOC_DECODER_CMD, &cmd); +- if (ret) ++ memset(r, 0, sizeof(*r)); ++ if (ioctl(s->fd, VIDIOC_G_SELECTION, &selection)) + return AVERROR(errno); + ++ *r = selection.r; + return 0; + } + +-/** +- * handle resolution change event and end of stream event +- * returns 1 if reinit was successful, negative if it failed +- * returns 0 if reinit was not executed +- */ +-static int v4l2_handle_event(V4L2Context *ctx) ++static int do_source_change(V4L2m2mContext * const s) + { +- V4L2m2mContext *s = ctx_to_m2mctx(ctx); +- struct v4l2_format cap_fmt = s->capture.format; +- struct v4l2_event evt = { 0 }; ++ AVCodecContext *const avctx = s->avctx; ++ + int ret; ++ int reinit; ++ struct v4l2_format cap_fmt = s->capture.format; + +- ret = ioctl(s->fd, VIDIOC_DQEVENT, &evt); +- if (ret < 0) { +- av_log(logger(ctx), AV_LOG_ERROR, "%s VIDIOC_DQEVENT\n", ctx->name); +- return 0; +- } ++ s->capture.done = 0; + +- if (evt.type == V4L2_EVENT_EOS) { +- ctx->done = 1; ++ ret = ioctl(s->fd, VIDIOC_G_FMT, &cap_fmt); ++ if (ret) { ++ av_log(avctx, AV_LOG_ERROR, "%s VIDIOC_G_FMT failed\n", s->capture.name); + return 0; + } + +- if (evt.type != V4L2_EVENT_SOURCE_CHANGE) +- return 0; ++ get_default_selection(&s->capture, &s->capture.selection); + +- ret = ioctl(s->fd, VIDIOC_G_FMT, &cap_fmt); +- if (ret) { +- av_log(logger(ctx), AV_LOG_ERROR, "%s VIDIOC_G_FMT\n", s->capture.name); +- return 0; ++ reinit = ctx_resolution_changed(&s->capture, &cap_fmt); ++ if ((s->quirks & FF_V4L2_QUIRK_REINIT_ALWAYS) != 0) ++ reinit = 1; ++ ++ s->capture.format = cap_fmt; ++ if (reinit) { ++ s->capture.height = ff_v4l2_get_format_height(&cap_fmt); ++ s->capture.width = ff_v4l2_get_format_width(&cap_fmt); + } + +- if (v4l2_resolution_changed(&s->capture, &cap_fmt)) { +- s->capture.height = v4l2_get_height(&cap_fmt); +- s->capture.width = v4l2_get_width(&cap_fmt); +- s->capture.sample_aspect_ratio = v4l2_get_sar(&s->capture); +- } else { +- v4l2_start_decode(ctx); +- return 0; ++ // If we don't support selection (or it is bust) and we obviously have HD then kludge ++ if ((s->capture.selection.width == 0 || s->capture.selection.height == 0) && ++ (s->capture.height == 1088 && s->capture.width == 1920)) { ++ s->capture.selection = (struct v4l2_rect){.width = 1920, .height = 1080}; + } + +- s->reinit = 1; ++ s->capture.sample_aspect_ratio = v4l2_get_sar(&s->capture); + +- if (s->avctx) +- ret = ff_set_dimensions(s->avctx, s->capture.width, s->capture.height); +- if (ret < 0) +- av_log(logger(ctx), AV_LOG_WARNING, "update avcodec height and width\n"); ++ av_log(avctx, AV_LOG_DEBUG, "Source change: Fmt: %s, SAR: %d/%d, wxh %dx%d crop %dx%d @ %d,%d, reinit=%d\n", ++ av_fourcc2str(ff_v4l2_get_format_pixelformat(&cap_fmt)), ++ s->capture.sample_aspect_ratio.num, s->capture.sample_aspect_ratio.den, ++ s->capture.width, s->capture.height, ++ s->capture.selection.width, s->capture.selection.height, ++ s->capture.selection.left, s->capture.selection.top, reinit); + +- ret = ff_v4l2_m2m_codec_reinit(s); +- if (ret) { +- av_log(logger(ctx), AV_LOG_ERROR, "v4l2_m2m_codec_reinit\n"); +- return AVERROR(EINVAL); ++ ret = ff_v4l2_context_set_status(&s->capture, VIDIOC_STREAMOFF); ++ if (ret) ++ av_log(avctx, AV_LOG_ERROR, "capture VIDIOC_STREAMOFF failed\n"); ++ s->draining = 0; ++ ++ if (!reinit) { ++ /* Buffers are OK so just stream off to ack */ ++ av_log(avctx, AV_LOG_DEBUG, "%s: Parameters only - restart decode\n", __func__); ++ } ++ else { ++ if (avctx) ++ ret = ff_set_dimensions(s->avctx, ++ s->capture.selection.width != 0 ? s->capture.selection.width : s->capture.width, ++ s->capture.selection.height != 0 ? s->capture.selection.height : s->capture.height); ++ if (ret < 0) ++ av_log(avctx, AV_LOG_WARNING, "update avcodec height and width failed\n"); ++ ++ ff_v4l2_context_release(&s->capture); ++ ++ if (s->capture.width > ff_v4l2_get_format_width(&s->capture.format) || ++ s->capture.height > ff_v4l2_get_format_height(&s->capture.format)) { ++ av_log(avctx, AV_LOG_ERROR, "Format post reinit too small: wanted %dx%d > got %dx%d\n", ++ s->capture.width, s->capture.height, ++ ff_v4l2_get_format_width(&s->capture.format), ff_v4l2_get_format_height(&s->capture.format)); ++ return AVERROR(EINVAL); ++ } ++ ++ // Update pixel format - should only actually do something on initial change ++ s->capture.av_pix_fmt = ++ ff_v4l2_format_v4l2_to_avfmt(ff_v4l2_get_format_pixelformat(&s->capture.format), AV_CODEC_ID_RAWVIDEO); ++ avctx->pix_fmt = s->output_drm ? AV_PIX_FMT_DRM_PRIME : s->capture.av_pix_fmt; ++ avctx->sw_pix_fmt = s->capture.av_pix_fmt; + } + +- /* reinit executed */ ++ ret = ff_v4l2_context_set_status(&s->capture, VIDIOC_STREAMON); + return 1; + } + +@@ -266,171 +443,293 @@ static int v4l2_stop_encode(V4L2Context + return 0; + } + +-static V4L2Buffer* v4l2_dequeue_v4l2buf(V4L2Context *ctx, int timeout) +-{ +- struct v4l2_plane planes[VIDEO_MAX_PLANES]; +- struct v4l2_buffer buf = { 0 }; +- V4L2Buffer *avbuf; +- struct pollfd pfd = { +- .events = POLLIN | POLLRDNORM | POLLPRI | POLLOUT | POLLWRNORM, /* default blocking capture */ +- .fd = ctx_to_m2mctx(ctx)->fd, ++// DQ a buffer ++// Amalgamates all the various ways there are of signalling EOS/Event to ++// generate a consistant EPIPE. ++// ++// Sets ctx->flag_last if next dq would produce EPIPE (i.e. stream has stopped) ++// ++// Returns: ++// 0 Success ++// AVERROR(EPIPE) Nothing more to read ++// AVERROR(ENOSPC) No buffers in Q to put result in ++// * AVERROR(..) ++ ++ static int ++dq_buf(V4L2Context * const ctx, V4L2Buffer ** const ppavbuf) ++{ ++ V4L2m2mContext * const m = ctx_to_m2mctx(ctx); ++ AVCodecContext * const avctx = m->avctx; ++ V4L2Buffer * avbuf; ++ const int is_mp = V4L2_TYPE_IS_MULTIPLANAR(ctx->type); ++ ++ struct v4l2_plane planes[VIDEO_MAX_PLANES] = {{0}}; ++ ++ struct v4l2_buffer buf = { ++ .type = ctx->type, ++ .memory = V4L2_MEMORY_MMAP, + }; +- int i, ret; + +- if (!V4L2_TYPE_IS_OUTPUT(ctx->type) && ctx->buffers) { +- for (i = 0; i < ctx->num_buffers; i++) { +- if (ctx->buffers[i].status == V4L2BUF_IN_DRIVER) +- break; +- } +- if (i == ctx->num_buffers) +- av_log(logger(ctx), AV_LOG_WARNING, "All capture buffers returned to " +- "userspace. Increase num_capture_buffers " +- "to prevent device deadlock or dropped " +- "packets/frames.\n"); ++ *ppavbuf = NULL; ++ ++ if (ctx->flag_last) ++ return AVERROR(EPIPE); ++ ++ if (is_mp) { ++ buf.length = VIDEO_MAX_PLANES; ++ buf.m.planes = planes; + } + +- /* if we are draining and there are no more capture buffers queued in the driver we are done */ +- if (!V4L2_TYPE_IS_OUTPUT(ctx->type) && ctx_to_m2mctx(ctx)->draining) { +- for (i = 0; i < ctx->num_buffers; i++) { +- /* capture buffer initialization happens during decode hence +- * detection happens at runtime +- */ +- if (!ctx->buffers) +- break; ++ while (ioctl(m->fd, VIDIOC_DQBUF, &buf) != 0) { ++ const int err = errno; ++ av_assert0(AVERROR(err) < 0); ++ if (err != EINTR) { ++ av_log(avctx, AV_LOG_DEBUG, "%s VIDIOC_DQBUF, errno (%s)\n", ++ ctx->name, av_err2str(AVERROR(err))); ++ ++ if (err == EPIPE) ++ ctx->flag_last = 1; + +- if (ctx->buffers[i].status == V4L2BUF_IN_DRIVER) +- goto start; ++ return AVERROR(err); + } +- ctx->done = 1; +- return NULL; + } ++ atomic_fetch_sub(&ctx->q_count, 1); + +-start: +- if (V4L2_TYPE_IS_OUTPUT(ctx->type)) +- pfd.events = POLLOUT | POLLWRNORM; +- else { +- /* no need to listen to requests for more input while draining */ +- if (ctx_to_m2mctx(ctx)->draining) +- pfd.events = POLLIN | POLLRDNORM | POLLPRI; ++ avbuf = (V4L2Buffer *)ctx->bufrefs[buf.index]->data; ++ ff_v4l2_buffer_set_avail(avbuf); ++ avbuf->buf = buf; ++ if (is_mp) { ++ memcpy(avbuf->planes, planes, sizeof(planes)); ++ avbuf->buf.m.planes = avbuf->planes; ++ } ++ // Done with any attached buffer ++ av_buffer_unref(&avbuf->ref_buf); ++ ++ if (V4L2_TYPE_IS_CAPTURE(ctx->type)) { ++ // Zero length cap buffer return == EOS ++ if ((is_mp ? buf.m.planes[0].bytesused : buf.bytesused) == 0) { ++ av_log(avctx, AV_LOG_DEBUG, "Buffer empty - reQ\n"); ++ ++ // Must reQ so we don't leak ++ // May not matter if the next thing we do is release all the ++ // buffers but better to be tidy. ++ ff_v4l2_buffer_enqueue(avbuf); ++ ++ ctx->flag_last = 1; ++ return AVERROR(EPIPE); ++ } ++ ++#ifdef V4L2_BUF_FLAG_LAST ++ // If flag_last set then this contains data but is the last frame ++ // so remember that but return OK ++ if ((buf.flags & V4L2_BUF_FLAG_LAST) != 0) ++ ctx->flag_last = 1; ++#endif + } + +- for (;;) { +- ret = poll(&pfd, 1, timeout); +- if (ret > 0) +- break; +- if (errno == EINTR) ++ *ppavbuf = avbuf; ++ return 0; ++} ++ ++/** ++ * handle resolution change event and end of stream event ++ * Expects to be called after the stream has stopped ++ * ++ * returns 1 if reinit was successful, negative if it failed ++ * returns 0 if reinit was not executed ++ */ ++static int ++get_event(V4L2m2mContext * const m) ++{ ++ AVCodecContext * const avctx = m->avctx; ++ struct v4l2_event evt = { 0 }; ++ ++ while (ioctl(m->fd, VIDIOC_DQEVENT, &evt) != 0) { ++ const int rv = AVERROR(errno); ++ if (rv == AVERROR(EINTR)) + continue; +- return NULL; ++ if (rv == AVERROR(EAGAIN)) { ++ av_log(avctx, AV_LOG_WARNING, "V4L2 failed to get expected event - assume EOS\n"); ++ return AVERROR_EOF; ++ } ++ av_log(avctx, AV_LOG_ERROR, "V4L2 VIDIOC_DQEVENT: %s\n", av_err2str(rv)); ++ return rv; + } + +- /* 0. handle errors */ +- if (pfd.revents & POLLERR) { +- /* if we are trying to get free buffers but none have been queued yet +- no need to raise a warning */ +- if (timeout == 0) { +- for (i = 0; i < ctx->num_buffers; i++) { +- if (ctx->buffers[i].status != V4L2BUF_AVAILABLE) +- av_log(logger(ctx), AV_LOG_WARNING, "%s POLLERR\n", ctx->name); +- } +- } +- else +- av_log(logger(ctx), AV_LOG_WARNING, "%s POLLERR\n", ctx->name); ++ av_log(avctx, AV_LOG_DEBUG, "Dq event %d\n", evt.type); + +- return NULL; ++ if (evt.type == V4L2_EVENT_EOS) { ++ av_log(avctx, AV_LOG_TRACE, "V4L2 VIDIOC_EVENT_EOS\n"); ++ return AVERROR_EOF; + } + +- /* 1. handle resolution changes */ +- if (pfd.revents & POLLPRI) { +- ret = v4l2_handle_event(ctx); +- if (ret < 0) { +- /* if re-init failed, abort */ +- ctx->done = 1; +- return NULL; ++ if (evt.type == V4L2_EVENT_SOURCE_CHANGE) ++ return do_source_change(m); ++ ++ return 0; ++} ++ ++static inline int ++dq_ok(const V4L2Context * const c) ++{ ++ return c->streamon && atomic_load(&c->q_count) != 0; ++} ++ ++// Get a buffer ++// If output then just gets the buffer in the expected way ++// If capture then runs the capture state m/c to deal with res change etc. ++// If return value == 0 then *ppavbuf != NULL ++ ++static int ++get_qbuf(V4L2Context * const ctx, V4L2Buffer ** const ppavbuf, const int timeout) ++{ ++ V4L2m2mContext * const m = ctx_to_m2mctx(ctx); ++ AVCodecContext * const avctx = m->avctx; ++ const int is_cap = V4L2_TYPE_IS_CAPTURE(ctx->type); ++ ++ const unsigned int poll_cap = (POLLIN | POLLRDNORM); ++ const unsigned int poll_out = (POLLOUT | POLLWRNORM); ++ const unsigned int poll_event = POLLPRI; ++ ++ *ppavbuf = NULL; ++ ++ for (;;) { ++ struct pollfd pfd = { ++ .fd = m->fd, ++ // If capture && stream not started then assume we are waiting for the initial event ++ .events = !is_cap ? poll_out : ++ !ff_v4l2_ctx_eos(ctx) && ctx->streamon ? poll_cap : ++ poll_event, ++ }; ++ int ret; ++ ++ if (ctx->done) { ++ av_log(avctx, AV_LOG_TRACE, "V4L2 %s already done\n", ctx->name); ++ return AVERROR_EOF; + } +- if (ret) { +- /* if re-init was successful drop the buffer (if there was one) +- * since we had to reconfigure capture (unmap all buffers) +- */ +- return NULL; ++ ++ // If capture && timeout == -1 then also wait for rx buffer free ++ if (is_cap && timeout == -1 && dq_ok(&m->output) && !m->draining) ++ pfd.events |= poll_out; ++ ++ // If nothing Qed all we will get is POLLERR - avoid that ++ if ((pfd.events == poll_out && !dq_ok(&m->output)) || ++ (pfd.events == poll_cap && !dq_ok(&m->capture)) || ++ (pfd.events == (poll_cap | poll_out) && !dq_ok(&m->capture) && !dq_ok(&m->output))) { ++ av_log(avctx, AV_LOG_TRACE, "V4L2 poll %s empty\n", ctx->name); ++ return AVERROR(ENOSPC); + } +- } + +- /* 2. dequeue the buffer */ +- if (pfd.revents & (POLLIN | POLLRDNORM | POLLOUT | POLLWRNORM)) { ++ // Timeout kludged s.t. "forever" eventually gives up & produces logging ++ // If waiting for an event when we have seen a last_frame then we expect ++ // it to be ready already so force a short timeout ++ ret = poll(&pfd, 1, ++ ff_v4l2_ctx_eos(ctx) ? 10 : ++ timeout == -1 ? 3000 : timeout); ++ if (ret < 0) { ++ ret = AVERROR(errno); // Remember errno before logging etc. ++ av_assert0(ret < 0); ++ } ++ ++ av_log(avctx, AV_LOG_TRACE, "V4L2 poll %s ret=%d, timeout=%d, events=%#x, revents=%#x\n", ++ ctx->name, ret, timeout, pfd.events, pfd.revents); + +- if (!V4L2_TYPE_IS_OUTPUT(ctx->type)) { +- /* there is a capture buffer ready */ +- if (pfd.revents & (POLLIN | POLLRDNORM)) +- goto dequeue; ++ if (ret < 0) { ++ if (ret == AVERROR(EINTR)) ++ continue; ++ av_log(avctx, AV_LOG_ERROR, "V4L2 %s poll error %d (%s)\n", ctx->name, AVUNERROR(ret), av_err2str(ret)); ++ return ret; ++ } + +- /* the driver is ready to accept more input; instead of waiting for the capture +- * buffer to complete we return NULL so input can proceed (we are single threaded) +- */ +- if (pfd.revents & (POLLOUT | POLLWRNORM)) +- return NULL; ++ if (ret == 0) { ++ if (timeout == -1) ++ av_log(avctx, AV_LOG_ERROR, "V4L2 %s poll unexpected timeout: events=%#x\n", ctx->name, pfd.events); ++ if (ff_v4l2_ctx_eos(ctx)) { ++ av_log(avctx, AV_LOG_WARNING, "V4L2 %s poll event timeout\n", ctx->name); ++ ret = get_event(m); ++ if (ret < 0) { ++ ctx->done = 1; ++ return ret; ++ } ++ } ++ return AVERROR(EAGAIN); + } + +-dequeue: +- memset(&buf, 0, sizeof(buf)); +- buf.memory = V4L2_MEMORY_MMAP; +- buf.type = ctx->type; +- if (V4L2_TYPE_IS_MULTIPLANAR(ctx->type)) { +- memset(planes, 0, sizeof(planes)); +- buf.length = VIDEO_MAX_PLANES; +- buf.m.planes = planes; ++ if ((pfd.revents & POLLERR) != 0) { ++ av_log(avctx, AV_LOG_WARNING, "V4L2 %s POLLERR\n", ctx->name); ++ return AVERROR_UNKNOWN; + } + +- ret = ioctl(ctx_to_m2mctx(ctx)->fd, VIDIOC_DQBUF, &buf); +- if (ret) { +- if (errno != EAGAIN) { ++ if ((pfd.revents & poll_event) != 0) { ++ ret = get_event(m); ++ if (ret < 0) { + ctx->done = 1; +- if (errno != EPIPE) +- av_log(logger(ctx), AV_LOG_DEBUG, "%s VIDIOC_DQBUF, errno (%s)\n", +- ctx->name, av_err2str(AVERROR(errno))); ++ return ret; + } +- return NULL; ++ continue; + } + +- if (ctx_to_m2mctx(ctx)->draining && !V4L2_TYPE_IS_OUTPUT(ctx->type)) { +- int bytesused = V4L2_TYPE_IS_MULTIPLANAR(buf.type) ? +- buf.m.planes[0].bytesused : buf.bytesused; +- if (bytesused == 0) { +- ctx->done = 1; +- return NULL; +- } +-#ifdef V4L2_BUF_FLAG_LAST +- if (buf.flags & V4L2_BUF_FLAG_LAST) +- ctx->done = 1; +-#endif ++ if ((pfd.revents & poll_cap) != 0) { ++ ret = dq_buf(ctx, ppavbuf); ++ if (ret == AVERROR(EPIPE)) ++ continue; ++ return ret; + } + +- avbuf = &ctx->buffers[buf.index]; +- avbuf->status = V4L2BUF_AVAILABLE; +- avbuf->buf = buf; +- if (V4L2_TYPE_IS_MULTIPLANAR(ctx->type)) { +- memcpy(avbuf->planes, planes, sizeof(planes)); +- avbuf->buf.m.planes = avbuf->planes; ++ if ((pfd.revents & poll_out) != 0) { ++ if (is_cap) ++ return AVERROR(EAGAIN); ++ return dq_buf(ctx, ppavbuf); + } +- return avbuf; ++ ++ av_log(avctx, AV_LOG_ERROR, "V4L2 poll unexpected events=%#x, revents=%#x\n", pfd.events, pfd.revents); ++ return AVERROR_UNKNOWN; + } ++} + +- return NULL; ++// Clear out flags and timestamps that should should be set by the user ++// Returns the passed avbuf ++static V4L2Buffer * ++clean_v4l2_buffer(V4L2Buffer * const avbuf) ++{ ++ struct v4l2_buffer *const buf = &avbuf->buf; ++ ++ buf->flags = 0; ++ buf->field = V4L2_FIELD_ANY; ++ buf->timestamp = (struct timeval){0}; ++ buf->timecode = (struct v4l2_timecode){0}; ++ buf->sequence = 0; ++ ++ return avbuf; ++} ++ ++int ++ff_v4l2_dq_all(V4L2Context *const ctx, int timeout1) ++{ ++ V4L2Buffer * avbuf; ++ if (timeout1 != 0) { ++ int rv = get_qbuf(ctx, &avbuf, timeout1); ++ if (rv != 0) ++ return rv; ++ } ++ do { ++ get_qbuf(ctx, &avbuf, 0); ++ } while (avbuf); ++ return 0; + } + + static V4L2Buffer* v4l2_getfree_v4l2buf(V4L2Context *ctx) + { +- int timeout = 0; /* return when no more buffers to dequeue */ + int i; + + /* get back as many output buffers as possible */ +- if (V4L2_TYPE_IS_OUTPUT(ctx->type)) { +- do { +- } while (v4l2_dequeue_v4l2buf(ctx, timeout)); +- } ++ if (V4L2_TYPE_IS_OUTPUT(ctx->type)) ++ ff_v4l2_dq_all(ctx, 0); + + for (i = 0; i < ctx->num_buffers; i++) { +- if (ctx->buffers[i].status == V4L2BUF_AVAILABLE) +- return &ctx->buffers[i]; ++ V4L2Buffer * const avbuf = (V4L2Buffer *)ctx->bufrefs[i]->data; ++ if (avbuf->status == V4L2BUF_AVAILABLE) ++ return clean_v4l2_buffer(avbuf); + } + + return NULL; +@@ -438,25 +737,45 @@ static V4L2Buffer* v4l2_getfree_v4l2buf( + + static int v4l2_release_buffers(V4L2Context* ctx) + { +- struct v4l2_requestbuffers req = { +- .memory = V4L2_MEMORY_MMAP, +- .type = ctx->type, +- .count = 0, /* 0 -> unmaps buffers from the driver */ +- }; +- int i, j; ++ int i; ++ int ret = 0; ++ const int fd = ctx_to_m2mctx(ctx)->fd; + +- for (i = 0; i < ctx->num_buffers; i++) { +- V4L2Buffer *buffer = &ctx->buffers[i]; ++ // Orphan any buffers in the wild ++ ff_weak_link_break(&ctx->wl_master); + +- for (j = 0; j < buffer->num_planes; j++) { +- struct V4L2Plane_info *p = &buffer->plane_info[j]; +- if (p->mm_addr && p->length) +- if (munmap(p->mm_addr, p->length) < 0) +- av_log(logger(ctx), AV_LOG_ERROR, "%s unmap plane (%s))\n", ctx->name, av_err2str(AVERROR(errno))); ++ if (ctx->bufrefs) { ++ for (i = 0; i < ctx->num_buffers; i++) ++ av_buffer_unref(ctx->bufrefs + i); ++ } ++ ++ if (fd != -1) { ++ struct v4l2_requestbuffers req = { ++ .memory = V4L2_MEMORY_MMAP, ++ .type = ctx->type, ++ .count = 0, /* 0 -> unmap all buffers from the driver */ ++ }; ++ ++ while ((ret = ioctl(fd, VIDIOC_REQBUFS, &req)) == -1) { ++ if (errno == EINTR) ++ continue; ++ ++ ret = AVERROR(errno); ++ ++ av_log(logger(ctx), AV_LOG_ERROR, "release all %s buffers (%s)\n", ++ ctx->name, av_err2str(AVERROR(errno))); ++ ++ if (ctx_to_m2mctx(ctx)->output_drm) ++ av_log(logger(ctx), AV_LOG_ERROR, ++ "Make sure the DRM client releases all FB/GEM objects before closing the codec (ie):\n" ++ "for all buffers: \n" ++ " 1. drmModeRmFB(..)\n" ++ " 2. drmIoctl(.., DRM_IOCTL_GEM_CLOSE,... )\n"); + } + } ++ atomic_store(&ctx->q_count, 0); + +- return ioctl(ctx_to_m2mctx(ctx)->fd, VIDIOC_REQBUFS, &req); ++ return ret; + } + + static inline int v4l2_try_raw_format(V4L2Context* ctx, enum AVPixelFormat pixfmt) +@@ -485,6 +804,8 @@ static inline int v4l2_try_raw_format(V4 + + static int v4l2_get_raw_format(V4L2Context* ctx, enum AVPixelFormat *p) + { ++ V4L2m2mContext* s = ctx_to_m2mctx(ctx); ++ V4L2m2mPriv *priv = s->avctx->priv_data; + enum AVPixelFormat pixfmt = ctx->av_pix_fmt; + struct v4l2_fmtdesc fdesc; + int ret; +@@ -498,21 +819,22 @@ static int v4l2_get_raw_format(V4L2Conte + return 0; + } + +- for (;;) { ++ for (;; ++fdesc.index) { + ret = ioctl(ctx_to_m2mctx(ctx)->fd, VIDIOC_ENUM_FMT, &fdesc); + if (ret) + return AVERROR(EINVAL); + ++ if (priv->pix_fmt != AV_PIX_FMT_NONE) { ++ if (fdesc.pixelformat != ff_v4l2_format_avfmt_to_v4l2(priv->pix_fmt)) ++ continue; ++ } ++ + pixfmt = ff_v4l2_format_v4l2_to_avfmt(fdesc.pixelformat, AV_CODEC_ID_RAWVIDEO); + ret = v4l2_try_raw_format(ctx, pixfmt); +- if (ret){ +- fdesc.index++; +- continue; ++ if (ret == 0) { ++ *p = pixfmt; ++ return 0; + } +- +- *p = pixfmt; +- +- return 0; + } + + return AVERROR(EINVAL); +@@ -555,30 +877,131 @@ static int v4l2_get_coded_format(V4L2Con + * + *****************************************************************************/ + +-int ff_v4l2_context_set_status(V4L2Context* ctx, uint32_t cmd) ++ ++static void flush_all_buffers_status(V4L2Context* const ctx) ++{ ++ int i; ++ ++ if (!ctx->bufrefs) ++ return; ++ ++ for (i = 0; i < ctx->num_buffers; ++i) { ++ struct V4L2Buffer * const buf = (struct V4L2Buffer *)ctx->bufrefs[i]->data; ++ if (buf->status == V4L2BUF_IN_DRIVER) ++ ff_v4l2_buffer_set_avail(buf); ++ } ++ atomic_store(&ctx->q_count, 0); ++} ++ ++static int stuff_all_buffers(AVCodecContext * avctx, V4L2Context* ctx) ++{ ++ int i; ++ int rv; ++ ++ if (!ctx->bufrefs) { ++ rv = ff_v4l2_context_init(ctx); ++ if (rv) { ++ av_log(avctx, AV_LOG_ERROR, "can't request capture buffers\n"); ++ return rv; ++ } ++ } ++ ++ ff_mutex_lock(&ctx->lock); ++ for (i = 0; i < ctx->num_buffers; ++i) { ++ struct V4L2Buffer * const buf = (struct V4L2Buffer *)ctx->bufrefs[i]->data; ++ if (buf->status == V4L2BUF_AVAILABLE) { ++ rv = ff_v4l2_buffer_enqueue(buf); ++ if (rv < 0) ++ break; ++ } ++ } ++ ff_mutex_unlock(&ctx->lock); ++ return rv; ++} ++ ++static int set_streamon(AVCodecContext * const avctx, V4L2Context*const ctx) + { + int type = ctx->type; +- int ret; ++ int ret = 0; + +- ret = ioctl(ctx_to_m2mctx(ctx)->fd, cmd, &type); +- if (ret < 0) +- return AVERROR(errno); ++ if (!V4L2_TYPE_IS_OUTPUT(ctx->type)) ++ stuff_all_buffers(avctx, ctx); + +- ctx->streamon = (cmd == VIDIOC_STREAMON); ++ if (ioctl(ctx_to_m2mctx(ctx)->fd, VIDIOC_STREAMON, &type) < 0) { ++ ret = AVERROR(errno); ++ av_log(avctx, AV_LOG_ERROR, "%s set status ON failed: err=%s\n", ctx->name, ++ av_err2str(ret)); ++ return ret; ++ } + +- return 0; ++ ctx->first_buf = 1; ++ ctx->streamon = 1; ++ ctx->flag_last = 0; ++ av_log(avctx, AV_LOG_DEBUG, "%s set status ON OK\n", ctx->name); ++ return ret; ++} ++ ++static int set_streamoff(AVCodecContext * const avctx, V4L2Context*const ctx) ++{ ++ int type = ctx->type; ++ int ret = 0; ++ const int has_bufs = ctx_buffers_alloced(ctx); ++ ++ // Avoid doing anything if there is nothing we can do ++ if (!has_bufs && !ctx->streamon) ++ return 0; ++ ++ if (has_bufs) ++ ff_mutex_lock(&ctx->lock); ++ ++ if (ioctl(ctx_to_m2mctx(ctx)->fd, VIDIOC_STREAMOFF, &type) < 0) { ++ ret = AVERROR(errno); ++ av_log(avctx, AV_LOG_ERROR, "%s set status ON failed: err=%s\n", ctx->name, ++ av_err2str(ret)); ++ } ++ else { ++ flush_all_buffers_status(ctx); ++ ++ ctx->streamon = 0; ++ ctx->flag_last = 0; ++ ++ av_log(avctx, AV_LOG_DEBUG, "%s set status OFF OK\n", ctx->name); ++ } ++ ++ if (has_bufs) ++ ff_mutex_unlock(&ctx->lock); ++ return ret; ++} ++ ++ ++int ff_v4l2_context_set_status(V4L2Context* ctx, uint32_t cmd) ++{ ++ AVCodecContext * const avctx = logger(ctx); ++ ++ switch (cmd) { ++ case VIDIOC_STREAMOFF: ++ return set_streamoff(avctx, ctx); ++ case VIDIOC_STREAMON: ++ return set_streamon(avctx, ctx); ++ default: ++ av_log(avctx, AV_LOG_ERROR, "%s: Unexpected cmd: %d\n", __func__, cmd); ++ break; ++ } ++ return AVERROR_BUG; + } + + int ff_v4l2_context_enqueue_frame(V4L2Context* ctx, const AVFrame* frame) + { +- V4L2m2mContext *s = ctx_to_m2mctx(ctx); ++ V4L2m2mContext *const s = ctx_to_m2mctx(ctx); ++ AVCodecContext *const avctx = s->avctx; ++ int64_t track_ts; + V4L2Buffer* avbuf; + int ret; + + if (!frame) { + ret = v4l2_stop_encode(ctx); + if (ret) +- av_log(logger(ctx), AV_LOG_ERROR, "%s stop_encode\n", ctx->name); ++ av_log(avctx, AV_LOG_ERROR, "%s stop_encode\n", ctx->name); + s->draining= 1; + return 0; + } +@@ -587,23 +1010,29 @@ int ff_v4l2_context_enqueue_frame(V4L2Co + if (!avbuf) + return AVERROR(EAGAIN); + +- ret = ff_v4l2_buffer_avframe_to_buf(frame, avbuf); ++ track_ts = xlat_pts_frame_in(avctx, &s->xlat, frame); ++ ++ ret = ff_v4l2_buffer_avframe_to_buf(frame, avbuf, track_ts); + if (ret) + return ret; + + return ff_v4l2_buffer_enqueue(avbuf); + } + +-int ff_v4l2_context_enqueue_packet(V4L2Context* ctx, const AVPacket* pkt) ++int ff_v4l2_context_enqueue_packet(V4L2Context* ctx, const AVPacket* pkt, ++ const void * extdata, size_t extlen) + { + V4L2m2mContext *s = ctx_to_m2mctx(ctx); ++ AVCodecContext *const avctx = s->avctx; + V4L2Buffer* avbuf; + int ret; ++ int64_t track_ts; + + if (!pkt->size) { + ret = v4l2_stop_decode(ctx); ++ // Log but otherwise ignore stop failure + if (ret) +- av_log(logger(ctx), AV_LOG_ERROR, "%s stop_decode\n", ctx->name); ++ av_log(avctx, AV_LOG_ERROR, "%s stop_decode failed: err=%d\n", ctx->name, ret); + s->draining = 1; + return 0; + } +@@ -612,8 +1041,13 @@ int ff_v4l2_context_enqueue_packet(V4L2C + if (!avbuf) + return AVERROR(EAGAIN); + +- ret = ff_v4l2_buffer_avpkt_to_buf(pkt, avbuf); +- if (ret) ++ track_ts = xlat_pts_pkt_in(avctx, &s->xlat, pkt); ++ ++ ret = ff_v4l2_buffer_avpkt_to_buf_ext(pkt, avbuf, extdata, extlen, track_ts); ++ if (ret == AVERROR(ENOMEM)) ++ av_log(logger(ctx), AV_LOG_ERROR, "Buffer overflow in %s: pkt->size=%d > buf->length=%d\n", ++ __func__, pkt->size, avbuf->planes[0].length); ++ else if (ret) + return ret; + + return ff_v4l2_buffer_enqueue(avbuf); +@@ -621,42 +1055,77 @@ int ff_v4l2_context_enqueue_packet(V4L2C + + int ff_v4l2_context_dequeue_frame(V4L2Context* ctx, AVFrame* frame, int timeout) + { ++ V4L2m2mContext *s = ctx_to_m2mctx(ctx); ++ AVCodecContext *const avctx = s->avctx; + V4L2Buffer *avbuf; ++ int rv; + +- /* +- * timeout=-1 blocks until: +- * 1. decoded frame available +- * 2. an input buffer is ready to be dequeued +- */ +- avbuf = v4l2_dequeue_v4l2buf(ctx, timeout); +- if (!avbuf) { +- if (ctx->done) +- return AVERROR_EOF; +- +- return AVERROR(EAGAIN); +- } ++ do { ++ if ((rv = get_qbuf(ctx, &avbuf, timeout)) != 0) ++ return rv; ++ if ((rv = ff_v4l2_buffer_buf_to_avframe(frame, avbuf)) != 0) ++ return rv; ++ } while (xlat_pts_frame_out(avctx, &s->xlat, frame) != 0); + +- return ff_v4l2_buffer_buf_to_avframe(frame, avbuf); ++ return 0; + } + +-int ff_v4l2_context_dequeue_packet(V4L2Context* ctx, AVPacket* pkt) ++int ff_v4l2_context_dequeue_packet(V4L2Context* ctx, AVPacket* pkt, int timeout) + { ++ V4L2m2mContext *s = ctx_to_m2mctx(ctx); ++ AVCodecContext *const avctx = s->avctx; + V4L2Buffer *avbuf; ++ int rv; + +- /* +- * blocks until: +- * 1. encoded packet available +- * 2. an input buffer ready to be dequeued +- */ +- avbuf = v4l2_dequeue_v4l2buf(ctx, -1); +- if (!avbuf) { +- if (ctx->done) +- return AVERROR_EOF; ++ do { ++ if ((rv = get_qbuf(ctx, &avbuf, timeout)) != 0) ++ return rv == AVERROR(ENOSPC) ? AVERROR(EAGAIN) : rv; // Caller not currently expecting ENOSPC ++ if ((rv = ff_v4l2_buffer_buf_to_avpkt(pkt, avbuf)) != 0) ++ return rv; ++ } while (xlat_pts_pkt_out(avctx, &s->xlat, pkt) != 0); + +- return AVERROR(EAGAIN); ++ return 0; ++} ++ ++// Return 0 terminated list of drm fourcc video formats for this context ++// NULL if none found or error ++// Returned list is malloced so must be freed ++uint32_t * ff_v4l2_context_enum_drm_formats(V4L2Context *ctx, unsigned int *pN) ++{ ++ unsigned int i; ++ unsigned int n = 0; ++ unsigned int size = 0; ++ uint32_t * e = NULL; ++ *pN = 0; ++ ++ for (i = 0; i < 1024; ++i) { ++ struct v4l2_fmtdesc fdesc = { ++ .index = i, ++ .type = ctx->type ++ }; ++ ++ if (ioctl(ctx_to_m2mctx(ctx)->fd, VIDIOC_ENUM_FMT, &fdesc)) ++ return e; ++ ++ if (n + 1 >= size) { ++ unsigned int newsize = (size == 0) ? 16 : size * 2; ++ uint32_t * t = av_realloc(e, newsize * sizeof(*t)); ++ if (!t) ++ return e; ++ e = t; ++ size = newsize; ++ } ++ ++ e[n] = fdesc.pixelformat; ++ e[++n] = 0; ++ if (pN) ++ *pN = n; + } + +- return ff_v4l2_buffer_buf_to_avpkt(pkt, avbuf); ++ // If we've looped 1024 times we are clearly confused ++ *pN = 0; ++ av_free(e); ++ return NULL; + } + + int ff_v4l2_context_get_format(V4L2Context* ctx, int probe) +@@ -688,78 +1157,194 @@ int ff_v4l2_context_get_format(V4L2Conte + + int ff_v4l2_context_set_format(V4L2Context* ctx) + { +- return ioctl(ctx_to_m2mctx(ctx)->fd, VIDIOC_S_FMT, &ctx->format); ++ int ret; ++ ++ ret = ioctl(ctx_to_m2mctx(ctx)->fd, VIDIOC_S_FMT, &ctx->format); ++ if (ret != 0) ++ return ret; ++ ++ // Check returned size against min size and if smaller have another go ++ // Only worry about plane[0] as this is meant to enforce limits for ++ // encoded streams where we might know a bit more about the shape ++ // than the driver ++ if (V4L2_TYPE_IS_MULTIPLANAR(ctx->format.type)) { ++ if (ctx->min_buf_size <= ctx->format.fmt.pix_mp.plane_fmt[0].sizeimage) ++ return 0; ++ ctx->format.fmt.pix_mp.plane_fmt[0].sizeimage = ctx->min_buf_size; ++ } ++ else { ++ if (ctx->min_buf_size <= ctx->format.fmt.pix.sizeimage) ++ return 0; ++ ctx->format.fmt.pix.sizeimage = ctx->min_buf_size; ++ } ++ ++ ret = ioctl(ctx_to_m2mctx(ctx)->fd, VIDIOC_S_FMT, &ctx->format); ++ return ret; + } + + void ff_v4l2_context_release(V4L2Context* ctx) + { + int ret; + +- if (!ctx->buffers) ++ if (!ctx->bufrefs) + return; + + ret = v4l2_release_buffers(ctx); + if (ret) + av_log(logger(ctx), AV_LOG_WARNING, "V4L2 failed to unmap the %s buffers\n", ctx->name); + +- av_freep(&ctx->buffers); ++ av_freep(&ctx->bufrefs); ++ av_buffer_unref(&ctx->frames_ref); ++ ++ ff_mutex_destroy(&ctx->lock); ++ pthread_cond_destroy(&ctx->cond); + } + +-int ff_v4l2_context_init(V4L2Context* ctx) ++ ++static int create_buffers(V4L2Context* const ctx, const unsigned int req_buffers, const enum v4l2_memory mem) + { +- V4L2m2mContext *s = ctx_to_m2mctx(ctx); ++ V4L2m2mContext * const s = ctx_to_m2mctx(ctx); + struct v4l2_requestbuffers req; +- int ret, i; +- +- if (!v4l2_type_supported(ctx)) { +- av_log(logger(ctx), AV_LOG_ERROR, "type %i not supported\n", ctx->type); +- return AVERROR_PATCHWELCOME; +- } ++ int ret; ++ int i; + +- ret = ioctl(s->fd, VIDIOC_G_FMT, &ctx->format); +- if (ret) +- av_log(logger(ctx), AV_LOG_ERROR, "%s VIDIOC_G_FMT failed\n", ctx->name); ++ av_assert0(ctx->bufrefs == NULL); + + memset(&req, 0, sizeof(req)); +- req.count = ctx->num_buffers; +- req.memory = V4L2_MEMORY_MMAP; ++ req.count = req_buffers; ++ req.memory = mem; + req.type = ctx->type; +- ret = ioctl(s->fd, VIDIOC_REQBUFS, &req); +- if (ret < 0) { +- av_log(logger(ctx), AV_LOG_ERROR, "%s VIDIOC_REQBUFS failed: %s\n", ctx->name, strerror(errno)); +- return AVERROR(errno); ++ while ((ret = ioctl(s->fd, VIDIOC_REQBUFS, &req)) == -1) { ++ if (errno != EINTR) { ++ ret = AVERROR(errno); ++ av_log(logger(ctx), AV_LOG_ERROR, "%s VIDIOC_REQBUFS failed: %s\n", ctx->name, av_err2str(ret)); ++ return ret; ++ } + } + + ctx->num_buffers = req.count; +- ctx->buffers = av_mallocz(ctx->num_buffers * sizeof(V4L2Buffer)); +- if (!ctx->buffers) { ++ ctx->bufrefs = av_mallocz(ctx->num_buffers * sizeof(*ctx->bufrefs)); ++ if (!ctx->bufrefs) { + av_log(logger(ctx), AV_LOG_ERROR, "%s malloc enomem\n", ctx->name); +- return AVERROR(ENOMEM); ++ goto fail_release; + } + +- for (i = 0; i < req.count; i++) { +- ctx->buffers[i].context = ctx; +- ret = ff_v4l2_buffer_initialize(&ctx->buffers[i], i); +- if (ret < 0) { ++ ctx->wl_master = ff_weak_link_new(ctx); ++ if (!ctx->wl_master) { ++ ret = AVERROR(ENOMEM); ++ goto fail_release; ++ } ++ ++ for (i = 0; i < ctx->num_buffers; i++) { ++ ret = ff_v4l2_buffer_initialize(&ctx->bufrefs[i], i, ctx, mem); ++ if (ret) { + av_log(logger(ctx), AV_LOG_ERROR, "%s buffer[%d] initialization (%s)\n", ctx->name, i, av_err2str(ret)); +- goto error; ++ goto fail_release; + } + } + + av_log(logger(ctx), AV_LOG_DEBUG, "%s: %s %02d buffers initialized: %04ux%04u, sizeimage %08u, bytesperline %08u\n", ctx->name, + V4L2_TYPE_IS_MULTIPLANAR(ctx->type) ? av_fourcc2str(ctx->format.fmt.pix_mp.pixelformat) : av_fourcc2str(ctx->format.fmt.pix.pixelformat), + req.count, +- v4l2_get_width(&ctx->format), +- v4l2_get_height(&ctx->format), ++ ff_v4l2_get_format_width(&ctx->format), ++ ff_v4l2_get_format_height(&ctx->format), + V4L2_TYPE_IS_MULTIPLANAR(ctx->type) ? ctx->format.fmt.pix_mp.plane_fmt[0].sizeimage : ctx->format.fmt.pix.sizeimage, + V4L2_TYPE_IS_MULTIPLANAR(ctx->type) ? ctx->format.fmt.pix_mp.plane_fmt[0].bytesperline : ctx->format.fmt.pix.bytesperline); + + return 0; + +-error: ++fail_release: + v4l2_release_buffers(ctx); ++ av_freep(&ctx->bufrefs); ++ return ret; ++} ++ ++int ff_v4l2_context_frames_set(V4L2Context *const ctx) ++{ ++ AVHWFramesContext *hwframes; ++ V4L2m2mContext * const s = ctx_to_m2mctx(ctx); ++ const int w = ctx->width != 0 ? ctx->width : s->avctx->width; ++ const int h = ctx->height != 0 ? ctx->height : s->avctx->height; ++ int ret; ++ ++ if (ctx->frames_ref != NULL) { ++ const AVHWFramesContext * const hwf = (AVHWFramesContext*)ctx->frames_ref->data; ++ if (hwf->sw_format == ctx->av_pix_fmt && hwf->width == w && hwf->height == h) ++ return 0; ++ av_buffer_unref(&ctx->frames_ref); ++ } ++ ++ ctx->frames_ref = av_hwframe_ctx_alloc(s->device_ref); ++ if (!ctx->frames_ref) ++ return AVERROR(ENOMEM); ++ ++ hwframes = (AVHWFramesContext*)ctx->frames_ref->data; ++ hwframes->format = AV_PIX_FMT_DRM_PRIME; ++ hwframes->sw_format = ctx->av_pix_fmt; ++ hwframes->width = w; ++ hwframes->height = h; ++ ret = av_hwframe_ctx_init(ctx->frames_ref); ++ if (ret < 0) { ++ av_log(s->avctx, AV_LOG_ERROR, "Failed to create hwframes context: %s\n", av_err2str(ret)); ++ av_buffer_unref(&ctx->frames_ref); ++ return ret; ++ } ++ ++ av_log(s->avctx, AV_LOG_DEBUG, "%s: HWFramesContext set to %s, %dx%d\n", __func__, ++ av_get_pix_fmt_name(ctx->av_pix_fmt), w, h); ++ return 0; ++} ++ ++int ff_v4l2_context_init(V4L2Context* ctx) ++{ ++ struct v4l2_queryctrl qctrl; ++ V4L2m2mContext * const s = ctx_to_m2mctx(ctx); ++ int ret; ++ ++ // It is not valid to reinit a context without a previous release ++ av_assert0(ctx->bufrefs == NULL); ++ ++ if (!v4l2_type_supported(ctx)) { ++ av_log(logger(ctx), AV_LOG_ERROR, "type %i not supported\n", ctx->type); ++ return AVERROR_PATCHWELCOME; ++ } ++ ++ ff_mutex_init(&ctx->lock, NULL); ++ pthread_cond_init(&ctx->cond, NULL); ++ atomic_init(&ctx->q_count, 0); ++ ++ ret = ioctl(s->fd, VIDIOC_G_FMT, &ctx->format); ++ if (ret) { ++ ret = AVERROR(errno); ++ av_log(logger(ctx), AV_LOG_ERROR, "%s VIDIOC_G_FMT failed: %s\n", ctx->name, av_err2str(ret)); ++ goto fail_unlock; ++ } ++ ++ memset(&qctrl, 0, sizeof(qctrl)); ++ qctrl.id = V4L2_CID_MIN_BUFFERS_FOR_OUTPUT; ++ if (ioctl(s->fd, VIDIOC_QUERYCTRL, &qctrl) != 0) { ++ ret = AVERROR(errno); ++ if (ret != AVERROR(EINVAL)) { ++ av_log(logger(ctx), AV_LOG_ERROR, "%s VIDIOC_QUERCTRL failed: %s\n", ctx->name, av_err2str(ret)); ++ goto fail_unlock; ++ } ++ // Control unsupported - set default if wanted ++ if (ctx->num_buffers < 2) ++ ctx->num_buffers = 4; ++ } ++ else { ++ if (ctx->num_buffers < 2) ++ ctx->num_buffers = qctrl.minimum + 2; ++ ctx->num_buffers = av_clip(ctx->num_buffers, qctrl.minimum, qctrl.maximum); ++ } + +- av_freep(&ctx->buffers); ++ ret = create_buffers(ctx, ctx->num_buffers, ctx->buf_mem); ++ if (ret < 0) ++ goto fail_unlock; ++ ++ return 0; + ++fail_unlock: ++ ff_mutex_destroy(&ctx->lock); + return ret; + } +--- a/libavcodec/v4l2_context.h ++++ b/libavcodec/v4l2_context.h +@@ -32,6 +32,8 @@ + #include "libavutil/rational.h" + #include "codec_id.h" + #include "packet.h" ++#include "libavutil/buffer.h" ++#include "libavutil/thread.h" + #include "v4l2_buffers.h" + + typedef struct V4L2Context { +@@ -71,11 +73,18 @@ typedef struct V4L2Context { + */ + int width, height; + AVRational sample_aspect_ratio; ++ struct v4l2_rect selection; + + /** +- * Indexed array of V4L2Buffers ++ * If the default size of buffer is less than this then try to ++ * set to this. + */ +- V4L2Buffer *buffers; ++ uint32_t min_buf_size; ++ ++ /** ++ * Indexed array of pointers to V4L2Buffers ++ */ ++ AVBufferRef **bufrefs; + + /** + * Readonly after init. +@@ -83,16 +92,38 @@ typedef struct V4L2Context { + int num_buffers; + + /** ++ * Buffer memory type V4L2_MEMORY_MMAP or V4L2_MEMORY_DMABUF ++ */ ++ enum v4l2_memory buf_mem; ++ ++ /** + * Whether the stream has been started (VIDIOC_STREAMON has been sent). + */ + int streamon; + ++ /* 1st buffer after stream on */ ++ int first_buf; ++ + /** + * Either no more buffers available or an unrecoverable error was notified + * by the V4L2 kernel driver: once set the context has to be exited. + */ + int done; + ++ int flag_last; ++ ++ /** ++ * If NZ then when Qing frame/pkt use this rather than the ++ * "real" PTS ++ */ ++ uint64_t track_ts; ++ ++ AVBufferRef *frames_ref; ++ atomic_int q_count; ++ struct ff_weak_link_master *wl_master; ++ ++ AVMutex lock; ++ pthread_cond_t cond; + } V4L2Context; + + /** +@@ -104,6 +135,14 @@ typedef struct V4L2Context { + int ff_v4l2_context_init(V4L2Context* ctx); + + /** ++ * (re)set the hwframecontext from the current v4l2 context ++ * ++ * @param[in] ctx A pointer to a V4L2Context. See V4L2Context description for required variables. ++ * @return 0 in case of success, a negative value representing the error otherwise. ++ */ ++int ff_v4l2_context_frames_set(V4L2Context *const ctx); ++ ++/** + * Sets the V4L2Context format in the v4l2 driver. + * + * @param[in] ctx A pointer to a V4L2Context. See V4L2Context description for required variables. +@@ -121,6 +160,19 @@ int ff_v4l2_context_set_format(V4L2Conte + int ff_v4l2_context_get_format(V4L2Context* ctx, int probe); + + /** ++ * Get the list of drm fourcc pixel formats for this context ++ * ++ * @param[in] ctx A pointer to a V4L2Context. See V4L2Context ++ * description for required variables. ++ * @param[in] pN A pointer to receive the number of formats ++ * found. May be NULL if not wanted. ++ * @return Pointer to malloced list of zero terminated formats, ++ * NULL if none or error. As list is malloced it must be ++ * freed. ++ */ ++uint32_t * ff_v4l2_context_enum_drm_formats(V4L2Context *ctx, unsigned int *pN); ++ ++/** + * Releases a V4L2Context. + * + * @param[in] ctx A pointer to a V4L2Context. +@@ -148,7 +200,7 @@ int ff_v4l2_context_set_status(V4L2Conte + * @param[inout] pkt The AVPacket to dequeue to. + * @return 0 in case of success, AVERROR(EAGAIN) if no buffer was ready, another negative error in case of error. + */ +-int ff_v4l2_context_dequeue_packet(V4L2Context* ctx, AVPacket* pkt); ++int ff_v4l2_context_dequeue_packet(V4L2Context* ctx, AVPacket* pkt, int timeout); + + /** + * Dequeues a buffer from a V4L2Context to an AVFrame. +@@ -157,7 +209,10 @@ int ff_v4l2_context_dequeue_packet(V4L2C + * @param[in] ctx The V4L2Context to dequeue from. + * @param[inout] f The AVFrame to dequeue to. + * @param[in] timeout The timeout for dequeue (-1 to block, 0 to return immediately, or milliseconds) ++ * + * @return 0 in case of success, AVERROR(EAGAIN) if no buffer was ready, another negative error in case of error. ++ * AVERROR(ENOSPC) if no buffer availible to put ++ * the frame in + */ + int ff_v4l2_context_dequeue_frame(V4L2Context* ctx, AVFrame* f, int timeout); + +@@ -171,7 +226,7 @@ int ff_v4l2_context_dequeue_frame(V4L2Co + * @param[in] pkt A pointer to an AVPacket. + * @return 0 in case of success, a negative error otherwise. + */ +-int ff_v4l2_context_enqueue_packet(V4L2Context* ctx, const AVPacket* pkt); ++int ff_v4l2_context_enqueue_packet(V4L2Context* ctx, const AVPacket* pkt, const void * ext_data, size_t ext_size); + + /** + * Enqueues a buffer to a V4L2Context from an AVFrame +@@ -184,4 +239,28 @@ int ff_v4l2_context_enqueue_packet(V4L2C + */ + int ff_v4l2_context_enqueue_frame(V4L2Context* ctx, const AVFrame* f); + ++/** ++ * Dequeue all buffers on this queue ++ * ++ * Used to recycle output buffers ++ * ++ * @param[in] ctx The V4L2Context to dequeue from. ++ * @param[in] timeout1 A timeout on dequeuing the 1st buffer, ++ * all others have a timeout of zero ++ * @return AVERROR(EAGAIN) if timeout1 non-zero then the return ++ * of the first dequeue operation, 0 otherwise. ++ */ ++int ff_v4l2_dq_all(V4L2Context *const ctx, int timeout1); ++ ++/** ++ * Returns the number of buffers currently queued ++ * ++ * @param[in] ctx The V4L2Context to evaluate ++ */ ++static inline int ++ff_v4l2_context_q_count(const V4L2Context* const ctx) ++{ ++ return atomic_load(&ctx->q_count); ++} ++ + #endif // AVCODEC_V4L2_CONTEXT_H +--- a/libavcodec/v4l2_fmt.c ++++ b/libavcodec/v4l2_fmt.c +@@ -42,6 +42,14 @@ static const struct fmt_conversion { + { AV_FMT(RGB24), AV_CODEC(RAWVIDEO), V4L2_FMT(RGB24) }, + { AV_FMT(BGR0), AV_CODEC(RAWVIDEO), V4L2_FMT(BGR32) }, + { AV_FMT(0RGB), AV_CODEC(RAWVIDEO), V4L2_FMT(RGB32) }, ++ { AV_FMT(BGR0), AV_CODEC(RAWVIDEO), V4L2_FMT(BGRX32) }, ++ { AV_FMT(RGB0), AV_CODEC(RAWVIDEO), V4L2_FMT(RGBX32) }, ++ { AV_FMT(0BGR), AV_CODEC(RAWVIDEO), V4L2_FMT(XBGR32) }, ++ { AV_FMT(0RGB), AV_CODEC(RAWVIDEO), V4L2_FMT(XRGB32) }, ++ { AV_FMT(BGRA), AV_CODEC(RAWVIDEO), V4L2_FMT(BGRA32) }, ++ { AV_FMT(RGBA), AV_CODEC(RAWVIDEO), V4L2_FMT(RGBA32) }, ++ { AV_FMT(ABGR), AV_CODEC(RAWVIDEO), V4L2_FMT(ABGR32) }, ++ { AV_FMT(ARGB), AV_CODEC(RAWVIDEO), V4L2_FMT(ARGB32) }, + { AV_FMT(GRAY8), AV_CODEC(RAWVIDEO), V4L2_FMT(GREY) }, + { AV_FMT(YUV420P), AV_CODEC(RAWVIDEO), V4L2_FMT(YUV420) }, + { AV_FMT(YUYV422), AV_CODEC(RAWVIDEO), V4L2_FMT(YUYV) }, +--- a/libavcodec/v4l2_m2m.c ++++ b/libavcodec/v4l2_m2m.c +@@ -34,6 +34,15 @@ + #include "v4l2_context.h" + #include "v4l2_fmt.h" + #include "v4l2_m2m.h" ++#include "v4l2_req_dmabufs.h" ++ ++static void ++xlat_init(xlat_track_t * const x) ++{ ++ memset(x, 0, sizeof(*x)); ++ x->last_pts = AV_NOPTS_VALUE; ++} ++ + + static inline int v4l2_splane_video(struct v4l2_capability *cap) + { +@@ -67,7 +76,9 @@ static int v4l2_prepare_contexts(V4L2m2m + + s->capture.done = s->output.done = 0; + s->capture.name = "capture"; ++ s->capture.buf_mem = s->db_ctl != NULL ? V4L2_MEMORY_DMABUF : V4L2_MEMORY_MMAP; + s->output.name = "output"; ++ s->output.buf_mem = s->input_drm ? V4L2_MEMORY_DMABUF : V4L2_MEMORY_MMAP; + atomic_init(&s->refcount, 0); + sem_init(&s->refsync, 0, 0); + +@@ -84,18 +95,58 @@ static int v4l2_prepare_contexts(V4L2m2m + if (v4l2_mplane_video(&cap)) { + s->capture.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; + s->output.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE; ++ s->output.format.type = s->output.type; + return 0; + } + + if (v4l2_splane_video(&cap)) { + s->capture.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; + s->output.type = V4L2_BUF_TYPE_VIDEO_OUTPUT; ++ s->output.format.type = s->output.type; + return 0; + } + + return AVERROR(EINVAL); + } + ++static int check_size(AVCodecContext * const avctx, V4L2m2mContext * const s) ++{ ++ struct v4l2_format fmt = {.type = s->output.type}; ++ int rv; ++ uint32_t pixfmt = ff_v4l2_format_avfmt_to_v4l2(avctx->pix_fmt); ++ unsigned int w; ++ unsigned int h; ++ ++ if (V4L2_TYPE_IS_MULTIPLANAR(fmt.type)) { ++ fmt.fmt.pix_mp.pixelformat = pixfmt; ++ fmt.fmt.pix_mp.width = avctx->width; ++ fmt.fmt.pix_mp.height = avctx->height; ++ } ++ else { ++ fmt.fmt.pix.pixelformat = pixfmt; ++ fmt.fmt.pix.width = avctx->width; ++ fmt.fmt.pix.height = avctx->height; ++ } ++ ++ rv = ioctl(s->fd, VIDIOC_TRY_FMT, &fmt); ++ ++ if (rv != 0) { ++ rv = AVERROR(errno); ++ av_log(avctx, AV_LOG_ERROR, "%s: Tryfmt failed: %s\n", __func__, av_err2str(rv)); ++ return rv; ++ } ++ ++ w = ff_v4l2_get_format_width(&fmt); ++ h = ff_v4l2_get_format_height(&fmt); ++ ++ if (w < avctx->width || h < avctx->height) { ++ av_log(avctx, AV_LOG_WARNING, "%s: Size check failed: asked for %dx%d, got: %dx%d\n", __func__, avctx->width, avctx->height, w, h); ++ return AVERROR(EINVAL); ++ } ++ ++ return 0; ++} ++ + static int v4l2_probe_driver(V4L2m2mContext *s) + { + void *log_ctx = s->avctx; +@@ -115,6 +166,11 @@ static int v4l2_probe_driver(V4L2m2mCont + goto done; + } + ++ // If being given frames (encode) check that V4L2 can cope with the size ++ if (s->output.av_codec_id == AV_CODEC_ID_RAWVIDEO && ++ (ret = check_size(s->avctx, s)) != 0) ++ goto done; ++ + ret = ff_v4l2_context_get_format(&s->capture, 1); + if (ret) { + av_log(log_ctx, AV_LOG_DEBUG, "v4l2 capture format not supported\n"); +@@ -214,13 +270,7 @@ int ff_v4l2_m2m_codec_reinit(V4L2m2mCont + av_log(log_ctx, AV_LOG_ERROR, "capture VIDIOC_STREAMOFF\n"); + + /* 2. unmap the capture buffers (v4l2 and ffmpeg): +- * we must wait for all references to be released before being allowed +- * to queue new buffers. + */ +- av_log(log_ctx, AV_LOG_DEBUG, "waiting for user to release AVBufferRefs\n"); +- if (atomic_load(&s->refcount)) +- while(sem_wait(&s->refsync) == -1 && errno == EINTR); +- + ff_v4l2_context_release(&s->capture); + + /* 3. get the new capture format */ +@@ -239,7 +289,6 @@ int ff_v4l2_m2m_codec_reinit(V4L2m2mCont + + /* 5. complete reinit */ + s->draining = 0; +- s->reinit = 0; + + return 0; + } +@@ -256,6 +305,9 @@ static void v4l2_m2m_destroy_context(voi + av_frame_unref(s->frame); + av_frame_free(&s->frame); + av_packet_unref(&s->buf_pkt); ++ av_freep(&s->extdata_data); ++ ++ av_log(s->avctx, AV_LOG_DEBUG, "V4L2 Context destroyed\n"); + + av_free(s); + } +@@ -268,6 +320,11 @@ int ff_v4l2_m2m_codec_end(V4L2m2mPriv *p + if (!s) + return 0; + ++ av_log(s->avctx, AV_LOG_DEBUG, "V4L2 Codec end\n"); ++ ++ if (s->avctx && av_codec_is_decoder(s->avctx->codec)) ++ av_packet_unref(&s->buf_pkt); ++ + if (s->fd >= 0) { + ret = ff_v4l2_context_set_status(&s->output, VIDIOC_STREAMOFF); + if (ret) +@@ -279,8 +336,20 @@ int ff_v4l2_m2m_codec_end(V4L2m2mPriv *p + } + + ff_v4l2_context_release(&s->output); ++ av_buffer_unref(&s->device_ref); ++ ++ dmabufs_ctl_unref(&s->db_ctl); ++ ++ if (s->fd != -1) { ++ close(s->fd); ++ s->fd = -1; ++ } + + s->self_ref = NULL; ++ // This is only called on avctx close so after this point we don't have that ++ // Crash sooner if we find we are using it (can still log with avctx = NULL) ++ s->avctx = NULL; ++ priv->context = NULL; + av_buffer_unref(&priv->context_ref); + + return 0; +@@ -324,35 +393,38 @@ int ff_v4l2_m2m_codec_init(V4L2m2mPriv * + return v4l2_configure_contexts(s); + } + +-int ff_v4l2_m2m_create_context(V4L2m2mPriv *priv, V4L2m2mContext **s) ++int ff_v4l2_m2m_create_context(V4L2m2mPriv *priv, V4L2m2mContext **pps) + { +- *s = av_mallocz(sizeof(V4L2m2mContext)); +- if (!*s) ++ V4L2m2mContext * const s = av_mallocz(sizeof(V4L2m2mContext)); ++ ++ *pps = NULL; ++ if (!s) + return AVERROR(ENOMEM); + +- priv->context_ref = av_buffer_create((uint8_t *) *s, sizeof(V4L2m2mContext), ++ priv->context_ref = av_buffer_create((uint8_t *)s, sizeof(*s), + &v4l2_m2m_destroy_context, NULL, 0); + if (!priv->context_ref) { +- av_freep(s); ++ av_free(s); + return AVERROR(ENOMEM); + } + + /* assign the context */ +- priv->context = *s; +- (*s)->priv = priv; ++ priv->context = s; ++ s->priv = priv; + + /* populate it */ +- priv->context->capture.num_buffers = priv->num_capture_buffers; +- priv->context->output.num_buffers = priv->num_output_buffers; +- priv->context->self_ref = priv->context_ref; +- priv->context->fd = -1; ++ s->capture.num_buffers = priv->num_capture_buffers; ++ s->output.num_buffers = priv->num_output_buffers; ++ s->self_ref = priv->context_ref; ++ s->fd = -1; ++ xlat_init(&s->xlat); + + priv->context->frame = av_frame_alloc(); + if (!priv->context->frame) { + av_buffer_unref(&priv->context_ref); +- *s = NULL; /* freed when unreferencing context_ref */ + return AVERROR(ENOMEM); + } + ++ *pps = s; + return 0; + } +--- a/libavcodec/v4l2_m2m.h ++++ b/libavcodec/v4l2_m2m.h +@@ -30,6 +30,7 @@ + #include + + #include "libavcodec/avcodec.h" ++#include "libavutil/pixfmt.h" + #include "v4l2_context.h" + + #define container_of(ptr, type, member) ({ \ +@@ -38,7 +39,39 @@ + + #define V4L_M2M_DEFAULT_OPTS \ + { "num_output_buffers", "Number of buffers in the output context",\ +- OFFSET(num_output_buffers), AV_OPT_TYPE_INT, { .i64 = 16 }, 6, INT_MAX, FLAGS } ++ OFFSET(num_output_buffers), AV_OPT_TYPE_INT, { .i64 = 16 }, 2, INT_MAX, FLAGS } ++ ++#define FF_V4L2_M2M_TRACK_SIZE 128 ++typedef struct V4L2m2mTrackEl { ++ int discard; // If we see this buffer its been flushed, so discard ++ int pending; ++ int pkt_size; ++ int64_t pts; ++ int64_t dts; ++ int64_t reordered_opaque; ++ int64_t pkt_pos; ++ int64_t pkt_duration; ++ int64_t track_pts; ++} V4L2m2mTrackEl; ++ ++typedef struct pts_stats_s ++{ ++ void * logctx; ++ const char * name; // For debug ++ unsigned int last_count; ++ unsigned int last_interval; ++ int64_t last_pts; ++ int64_t guess; ++} pts_stats_t; ++ ++typedef struct xlat_track_s { ++ unsigned int track_no; ++ int64_t last_pts; // Last valid PTS decoded ++ int64_t last_opaque; ++ V4L2m2mTrackEl track_els[FF_V4L2_M2M_TRACK_SIZE]; ++} xlat_track_t; ++ ++struct dmabufs_ctl; + + typedef struct V4L2m2mContext { + char devname[PATH_MAX]; +@@ -52,10 +85,10 @@ typedef struct V4L2m2mContext { + AVCodecContext *avctx; + sem_t refsync; + atomic_uint refcount; +- int reinit; + + /* null frame/packet received */ + int draining; ++ int running; + AVPacket buf_pkt; + + /* Reference to a frame. Only used during encoding */ +@@ -66,6 +99,36 @@ typedef struct V4L2m2mContext { + + /* reference back to V4L2m2mPriv */ + void *priv; ++ ++ AVBufferRef *device_ref; ++ ++ /* generate DRM frames */ ++ int output_drm; ++ ++ /* input frames are drmprime */ ++ int input_drm; ++ ++ /* Frame tracking */ ++ xlat_track_t xlat; ++ ++ pts_stats_t pts_stat; ++ ++ /* req pkt */ ++ int req_pkt; ++ int reorder_size; ++ ++ /* Ext data sent */ ++ int extdata_sent; ++ /* Ext data sent in packet - overrides ctx */ ++ void * extdata_data; ++ size_t extdata_size; ++ ++#define FF_V4L2_QUIRK_REINIT_ALWAYS 1 ++#define FF_V4L2_QUIRK_ENUM_FRAMESIZES_BROKEN 2 ++ /* Quirks */ ++ unsigned int quirks; ++ ++ struct dmabufs_ctl * db_ctl; + } V4L2m2mContext; + + typedef struct V4L2m2mPriv { +@@ -76,6 +139,8 @@ typedef struct V4L2m2mPriv { + + int num_output_buffers; + int num_capture_buffers; ++ const char * dmabuf_alloc; ++ enum AVPixelFormat pix_fmt; + } V4L2m2mPriv; + + /** +@@ -129,4 +194,26 @@ int ff_v4l2_m2m_codec_reinit(V4L2m2mCont + */ + int ff_v4l2_m2m_codec_full_reinit(V4L2m2mContext *ctx); + ++ ++static inline unsigned int ff_v4l2_get_format_width(const struct v4l2_format * const fmt) ++{ ++ return V4L2_TYPE_IS_MULTIPLANAR(fmt->type) ? fmt->fmt.pix_mp.width : fmt->fmt.pix.width; ++} ++ ++static inline unsigned int ff_v4l2_get_format_height(const struct v4l2_format * const fmt) ++{ ++ return V4L2_TYPE_IS_MULTIPLANAR(fmt->type) ? fmt->fmt.pix_mp.height : fmt->fmt.pix.height; ++} ++ ++static inline uint32_t ff_v4l2_get_format_pixelformat(const struct v4l2_format * const fmt) ++{ ++ return V4L2_TYPE_IS_MULTIPLANAR(fmt->type) ? fmt->fmt.pix_mp.pixelformat : fmt->fmt.pix.pixelformat; ++} ++ ++static inline int ff_v4l2_ctx_eos(const V4L2Context * const ctx) ++{ ++ return ctx->flag_last; ++} ++ ++ + #endif /* AVCODEC_V4L2_M2M_H */ +--- a/libavcodec/v4l2_m2m_dec.c ++++ b/libavcodec/v4l2_m2m_dec.c +@@ -21,8 +21,14 @@ + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + ++#include "config_components.h" ++ + #include + #include ++ ++#include "libavutil/avassert.h" ++#include "libavutil/hwcontext.h" ++#include "libavutil/hwcontext_drm.h" + #include "libavutil/pixfmt.h" + #include "libavutil/pixdesc.h" + #include "libavutil/opt.h" +@@ -30,75 +36,279 @@ + #include "codec_internal.h" + #include "libavcodec/decode.h" + ++#include "libavcodec/hwaccels.h" ++#include "libavcodec/internal.h" ++#include "libavcodec/hwconfig.h" ++ + #include "v4l2_context.h" + #include "v4l2_m2m.h" + #include "v4l2_fmt.h" ++#include "v4l2_req_dmabufs.h" + +-static int v4l2_try_start(AVCodecContext *avctx) ++#if CONFIG_H264_DECODER ++#include "h264_parse.h" ++#endif ++#if CONFIG_HEVC_DECODER ++#include "hevc_parse.h" ++#endif ++ ++// Pick 64 for max last count - that is >1sec at 60fps ++#define STATS_LAST_COUNT_MAX 64 ++#define STATS_INTERVAL_MAX (1 << 30) ++ ++#ifndef FF_API_BUFFER_SIZE_T ++#define FF_API_BUFFER_SIZE_T 1 ++#endif ++ ++#define DUMP_FAILED_EXTRADATA 0 ++ ++#if DUMP_FAILED_EXTRADATA ++static inline char hex1(unsigned int x) + { +- V4L2m2mContext *s = ((V4L2m2mPriv*)avctx->priv_data)->context; +- V4L2Context *const capture = &s->capture; +- V4L2Context *const output = &s->output; +- struct v4l2_selection selection = { 0 }; +- int ret; ++ x &= 0xf; ++ return x <= 9 ? '0' + x : 'a' + x - 10; ++} + +- /* 1. start the output process */ +- if (!output->streamon) { +- ret = ff_v4l2_context_set_status(output, VIDIOC_STREAMON); +- if (ret < 0) { +- av_log(avctx, AV_LOG_DEBUG, "VIDIOC_STREAMON on output context\n"); +- return ret; +- } ++static inline char * hex2(char * s, unsigned int x) ++{ ++ *s++ = hex1(x >> 4); ++ *s++ = hex1(x); ++ return s; ++} ++ ++static inline char * hex4(char * s, unsigned int x) ++{ ++ s = hex2(s, x >> 8); ++ s = hex2(s, x); ++ return s; ++} ++ ++static inline char * dash2(char * s) ++{ ++ *s++ = '-'; ++ *s++ = '-'; ++ return s; ++} ++ ++static void ++data16(char * s, const unsigned int offset, const uint8_t * m, const size_t len) ++{ ++ size_t i; ++ s = hex4(s, offset); ++ m += offset; ++ for (i = 0; i != 8; ++i) { ++ *s++ = ' '; ++ s = len > i + offset ? hex2(s, *m++) : dash2(s); + } ++ *s++ = ' '; ++ *s++ = ':'; ++ for (; i != 16; ++i) { ++ *s++ = ' '; ++ s = len > i + offset ? hex2(s, *m++) : dash2(s); ++ } ++ *s++ = 0; ++} + +- if (capture->streamon) +- return 0; ++static void ++log_dump(void * logctx, int lvl, const void * const data, const size_t len) ++{ ++ size_t i; ++ for (i = 0; i < len; i += 16) { ++ char buf[80]; ++ data16(buf, i, data, len); ++ av_log(logctx, lvl, "%s\n", buf); ++ } ++} ++#endif + +- /* 2. get the capture format */ +- capture->format.type = capture->type; +- ret = ioctl(s->fd, VIDIOC_G_FMT, &capture->format); +- if (ret) { +- av_log(avctx, AV_LOG_WARNING, "VIDIOC_G_FMT ioctl\n"); +- return ret; ++static unsigned int pts_stats_interval(const pts_stats_t * const stats) ++{ ++ return stats->last_interval; ++} ++ ++static int64_t pts_stats_guess(const pts_stats_t * const stats, const int fail_bad_guess) ++{ ++ if (stats->last_count <= 1) ++ return stats->last_pts; ++ if (stats->last_pts == AV_NOPTS_VALUE || ++ fail_bad_guess && (stats->last_interval == 0 || ++ stats->last_count >= STATS_LAST_COUNT_MAX)) ++ return AV_NOPTS_VALUE; ++ return stats->last_pts + (int64_t)(stats->last_count - 1) * (int64_t)stats->last_interval; ++} ++ ++static void pts_stats_add(pts_stats_t * const stats, int64_t pts) ++{ ++ if (pts == AV_NOPTS_VALUE || pts == stats->last_pts) { ++ if (stats->last_count < STATS_LAST_COUNT_MAX) ++ ++stats->last_count; ++ return; + } + +- /* 2.1 update the AVCodecContext */ +- avctx->pix_fmt = ff_v4l2_format_v4l2_to_avfmt(capture->format.fmt.pix_mp.pixelformat, AV_CODEC_ID_RAWVIDEO); +- capture->av_pix_fmt = avctx->pix_fmt; ++ if (stats->last_pts != AV_NOPTS_VALUE) { ++ const int64_t interval = pts - stats->last_pts; + +- /* 3. set the crop parameters */ +- selection.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; +- selection.r.height = avctx->coded_height; +- selection.r.width = avctx->coded_width; +- ret = ioctl(s->fd, VIDIOC_S_SELECTION, &selection); +- if (!ret) { +- ret = ioctl(s->fd, VIDIOC_G_SELECTION, &selection); +- if (ret) { +- av_log(avctx, AV_LOG_WARNING, "VIDIOC_G_SELECTION ioctl\n"); +- } else { +- av_log(avctx, AV_LOG_DEBUG, "crop output %dx%d\n", selection.r.width, selection.r.height); +- /* update the size of the resulting frame */ +- capture->height = selection.r.height; +- capture->width = selection.r.width; ++ if (interval < 0 || interval >= STATS_INTERVAL_MAX || ++ stats->last_count >= STATS_LAST_COUNT_MAX) { ++ if (stats->last_interval != 0) ++ av_log(stats->logctx, AV_LOG_DEBUG, "%s: %s: Bad interval: %" PRId64 "/%d\n", ++ __func__, stats->name, interval, stats->last_count); ++ stats->last_interval = 0; ++ } ++ else { ++ const int64_t frame_time = interval / (int64_t)stats->last_count; ++ ++ if (frame_time != stats->last_interval) ++ av_log(stats->logctx, AV_LOG_DEBUG, "%s: %s: New interval: %u->%" PRId64 "/%d=%" PRId64 "\n", ++ __func__, stats->name, stats->last_interval, interval, stats->last_count, frame_time); ++ stats->last_interval = frame_time; + } + } + +- /* 4. init the capture context now that we have the capture format */ +- if (!capture->buffers) { +- ret = ff_v4l2_context_init(capture); +- if (ret) { +- av_log(avctx, AV_LOG_ERROR, "can't request capture buffers\n"); +- return AVERROR(ENOMEM); ++ stats->last_pts = pts; ++ stats->last_count = 1; ++} ++ ++static void pts_stats_init(pts_stats_t * const stats, void * logctx, const char * name) ++{ ++ *stats = (pts_stats_t){ ++ .logctx = logctx, ++ .name = name, ++ .last_count = 1, ++ .last_interval = 0, ++ .last_pts = AV_NOPTS_VALUE ++ }; ++} ++ ++// If abdata == NULL then this just counts space required ++// Unpacks avcC if detected ++static int ++h264_xd_copy(const uint8_t * const extradata, const int extrasize, uint8_t * abdata) ++{ ++ const uint8_t * const xdend = extradata + extrasize; ++ const uint8_t * p = extradata; ++ uint8_t * d = abdata; ++ unsigned int n; ++ unsigned int len; ++ const unsigned int hdrlen = 4; ++ unsigned int need_pps = 1; ++ ++ if (extrasize < 8) ++ return AVERROR(EINVAL); ++ ++ if (p[0] == 0 && p[1] == 0) { ++ // Assume a couple of leading zeros are good enough to indicate NAL ++ if (abdata) ++ memcpy(d, p, extrasize); ++ return extrasize; ++ } ++ ++ // avcC starts with a 1 ++ if (p[0] != 1) ++ return AVERROR(EINVAL); ++ ++ p += 5; ++ n = *p++ & 0x1f; ++ ++doxps: ++ while (n--) { ++ if (xdend - p < 2) ++ return AVERROR(EINVAL); ++ len = (p[0] << 8) | p[1]; ++ p += 2; ++ if (xdend - p < (ptrdiff_t)len) ++ return AVERROR(EINVAL); ++ if (abdata) { ++ d[0] = 0; ++ d[1] = 0; ++ d[2] = 0; ++ d[3] = 1; ++ memcpy(d + 4, p, len); + } ++ d += len + hdrlen; ++ p += len; ++ } ++ if (need_pps) { ++ need_pps = 0; ++ if (p >= xdend) ++ return AVERROR(EINVAL); ++ n = *p++; ++ goto doxps; + } + +- /* 5. start the capture process */ +- ret = ff_v4l2_context_set_status(capture, VIDIOC_STREAMON); +- if (ret) { +- av_log(avctx, AV_LOG_DEBUG, "VIDIOC_STREAMON, on capture context\n"); ++ return d - abdata; ++} ++ ++static int ++copy_extradata(AVCodecContext * const avctx, ++ const void * const src_data, const int src_len, ++ void ** const pdst_data, size_t * const pdst_len) ++{ ++ int len; ++ ++ *pdst_len = 0; ++ av_freep(pdst_data); ++ ++ if (avctx->codec_id == AV_CODEC_ID_H264) ++ len = h264_xd_copy(src_data, src_len, NULL); ++ else ++ len = src_len < 0 ? AVERROR(EINVAL) : src_len; ++ ++ // Zero length is OK but we want to stop - -ve is error val ++ if (len <= 0) ++ return len; ++ ++ if ((*pdst_data = av_malloc(len + AV_INPUT_BUFFER_PADDING_SIZE)) == NULL) ++ return AVERROR(ENOMEM); ++ ++ if (avctx->codec_id == AV_CODEC_ID_H264) ++ h264_xd_copy(src_data, src_len, *pdst_data); ++ else ++ memcpy(*pdst_data, src_data, len); ++ *pdst_len = len; ++ ++ return 0; ++} ++ ++ ++ ++static int check_output_streamon(AVCodecContext *const avctx, V4L2m2mContext *const s) ++{ ++ int ret; ++ struct v4l2_decoder_cmd cmd = { ++ .cmd = V4L2_DEC_CMD_START, ++ .flags = 0, ++ }; ++ ++ if (s->output.streamon) ++ return 0; ++ ++ ret = ff_v4l2_context_set_status(&s->output, VIDIOC_STREAMON); ++ if (ret != 0) { ++ av_log(avctx, AV_LOG_ERROR, "VIDIOC_STREAMON on output context: %s\n", av_err2str(ret)); + return ret; + } + ++ // STREAMON should do implicit START so this just for those that don't. ++ // It is optional so don't worry if it fails ++ if (ioctl(s->fd, VIDIOC_DECODER_CMD, &cmd) < 0) { ++ ret = AVERROR(errno); ++ av_log(avctx, AV_LOG_WARNING, "VIDIOC_DECODER_CMD start error: %s\n", av_err2str(ret)); ++ } ++ else { ++ av_log(avctx, AV_LOG_TRACE, "VIDIOC_DECODER_CMD start OK\n"); ++ } ++ return 0; ++} ++ ++static int v4l2_try_start(AVCodecContext *avctx) ++{ ++ V4L2m2mContext * const s = ((V4L2m2mPriv*)avctx->priv_data)->context; ++ int ret; ++ ++ /* 1. start the output process */ ++ if ((ret = check_output_streamon(avctx, s)) != 0) ++ return ret; + return 0; + } + +@@ -133,51 +343,823 @@ static int v4l2_prepare_decoder(V4L2m2mC + return 0; + } + +-static int v4l2_receive_frame(AVCodecContext *avctx, AVFrame *frame) ++static void ++set_best_effort_pts(AVCodecContext *const avctx, ++ pts_stats_t * const ps, ++ AVFrame *const frame) ++{ ++ pts_stats_add(ps, frame->pts); ++ ++ frame->best_effort_timestamp = pts_stats_guess(ps, 1); ++ // If we can't guess from just PTS - try DTS ++ if (frame->best_effort_timestamp == AV_NOPTS_VALUE) ++ frame->best_effort_timestamp = frame->pkt_dts; ++ ++ // We can't emulate what s/w does in a useful manner and using the ++ // "correct" answer seems to just confuse things. ++ frame->pkt_dts = frame->pts; ++ av_log(avctx, AV_LOG_TRACE, "Out PTS=%" PRId64 "/%"PRId64", DTS=%" PRId64 "\n", ++ frame->pts, frame->best_effort_timestamp, frame->pkt_dts); ++} ++ ++static void ++xlat_flush(xlat_track_t * const x) ++{ ++ unsigned int i; ++ // Do not reset track_no - this ensures that any frames left in the decoder ++ // that turn up later get discarded. ++ ++ x->last_pts = AV_NOPTS_VALUE; ++ x->last_opaque = 0; ++ for (i = 0; i != FF_V4L2_M2M_TRACK_SIZE; ++i) { ++ x->track_els[i].pending = 0; ++ x->track_els[i].discard = 1; ++ } ++} ++ ++static void ++xlat_init(xlat_track_t * const x) ++{ ++ memset(x, 0, sizeof(*x)); ++ xlat_flush(x); ++} ++ ++static int ++xlat_pending(const V4L2m2mContext * const s) ++{ ++ const xlat_track_t *const x = &s->xlat; ++ unsigned int n = x->track_no % FF_V4L2_M2M_TRACK_SIZE; ++ int i; ++ const int64_t now = pts_stats_guess(&s->pts_stat, 0); ++ int64_t first_dts = AV_NOPTS_VALUE; ++ int no_dts_count = 0; ++ unsigned int interval = pts_stats_interval(&s->pts_stat); ++ ++ for (i = 0; i < FF_V4L2_M2M_TRACK_SIZE; ++i, n = (n - 1) & (FF_V4L2_M2M_TRACK_SIZE - 1)) { ++ const V4L2m2mTrackEl * const t = x->track_els + n; ++ ++ if (first_dts == AV_NOPTS_VALUE) ++ if (t->dts == AV_NOPTS_VALUE) ++ ++no_dts_count; ++ else ++ first_dts = t->dts; ++ ++ // Discard only set on never-set or flushed entries ++ // So if we get here we've never successfully decoded a frame so allow ++ // more frames into the buffer before stalling ++ if (t->discard) ++ return i - 16; ++ ++ // If we've got this frame out then everything before this point ++ // must have entered the decoder ++ if (!t->pending) ++ break; ++ ++ // If we've never seen a pts all we can do is count frames ++ if (now == AV_NOPTS_VALUE) ++ continue; ++ ++ if (t->dts != AV_NOPTS_VALUE && now >= t->dts) ++ break; ++ } ++ ++ if (first_dts != AV_NOPTS_VALUE && now != AV_NOPTS_VALUE && interval != 0 && s->reorder_size != 0) { ++ const int iframes = (first_dts - now) / (int)interval; ++ const int t = iframes - s->reorder_size + no_dts_count; ++ ++// av_log(s->avctx, AV_LOG_DEBUG, "Last:%"PRId64", Now:%"PRId64", First:%"PRId64", delta=%"PRId64", frames=%d, nodts=%d\n", ++// x->last_dts, now, first_dts, first_dts - now, iframes, no_dts_count); ++ ++ if (iframes > 0 && iframes < 64 && t < i) { ++ return t; ++ } ++ } ++ ++ return i; ++} ++ ++static inline int stream_started(const V4L2m2mContext * const s) { ++ return s->output.streamon; ++} ++ ++#define NQ_OK 0 ++#define NQ_Q_FULL 1 ++#define NQ_SRC_EMPTY 2 ++#define NQ_NONE 3 ++#define NQ_DRAINING 4 ++#define NQ_DEAD 5 ++ ++#define TRY_DQ(nq_status) ((nq_status) >= NQ_OK && (nq_status) <= NQ_DRAINING) ++#define RETRY_NQ(nq_status) ((nq_status) == NQ_Q_FULL || (nq_status) == NQ_NONE) ++ ++// do_not_get If true then no new packet will be got but status will ++// be set appropriately ++ ++// AVERROR_EOF Flushing an already flushed stream ++// -ve Error (all errors except EOF are unexpected) ++// NQ_OK (0) OK ++// NQ_Q_FULL Dst full (retry if we think V4L2 Q has space now) ++// NQ_SRC_EMPTY Src empty (do not retry) ++// NQ_NONE Enqueue not attempted ++// NQ_DRAINING At EOS, dQ dest until EOS there too ++// NQ_DEAD Not running (do not retry, do not attempt capture dQ) ++ ++static int try_enqueue_src(AVCodecContext * const avctx, V4L2m2mContext * const s, const int do_not_get) + { +- V4L2m2mContext *s = ((V4L2m2mPriv*)avctx->priv_data)->context; +- V4L2Context *const capture = &s->capture; +- V4L2Context *const output = &s->output; + int ret; + +- if (!s->buf_pkt.size) { +- ret = ff_decode_get_packet(avctx, &s->buf_pkt); ++ // If we don't already have a coded packet - get a new one ++ // We will already have a coded pkt if the output Q was full last time we ++ // tried to Q it ++ if (!s->buf_pkt.size && !do_not_get) { ++ unsigned int i; ++ ++ for (i = 0; i < 256; ++i) { ++ uint8_t * side_data; ++ size_t side_size; ++ ++ ret = ff_decode_get_packet(avctx, &s->buf_pkt); ++ if (ret != 0) ++ break; ++ ++ // New extradata is the only side-data we undertand ++ side_data = av_packet_get_side_data(&s->buf_pkt, AV_PKT_DATA_NEW_EXTRADATA, &side_size); ++ if (side_data) { ++ av_log(avctx, AV_LOG_DEBUG, "New extradata\n"); ++ if ((ret = copy_extradata(avctx, side_data, (int)side_size, &s->extdata_data, &s->extdata_size)) < 0) ++ av_log(avctx, AV_LOG_WARNING, "Failed to copy new extra data: %s\n", av_err2str(ret)); ++ s->extdata_sent = 0; ++ } ++ ++ if (s->buf_pkt.size != 0) ++ break; ++ ++ if (s->buf_pkt.side_data_elems == 0) { ++ av_log(avctx, AV_LOG_WARNING, "Empty pkt from ff_decode_get_packet - treating as EOF\n"); ++ ret = AVERROR_EOF; ++ break; ++ } ++ ++ // Retry a side-data only pkt ++ } ++ // If i >= 256 something has gone wrong ++ if (i >= 256) { ++ av_log(avctx, AV_LOG_ERROR, "Too many side-data only packets\n"); ++ return AVERROR(EIO); ++ } ++ ++ if (ret == AVERROR(EAGAIN)) { ++ if (!stream_started(s)) { ++ av_log(avctx, AV_LOG_TRACE, "%s: receive_frame before 1st coded packet\n", __func__); ++ return NQ_DEAD; ++ } ++ return NQ_SRC_EMPTY; ++ } ++ ++ if (ret == AVERROR_EOF) { ++ // EOF - enter drain mode ++ av_log(avctx, AV_LOG_TRACE, "--- EOS req: ret=%d, size=%d, started=%d, drain=%d\n", ++ ret, s->buf_pkt.size, stream_started(s), s->draining); ++ if (!stream_started(s)) { ++ av_log(avctx, AV_LOG_DEBUG, "EOS on flushed stream\n"); ++ s->draining = 1; ++ s->capture.done = 1; ++ return AVERROR_EOF; ++ } ++ ++ if (!s->draining) { ++ // Calling enqueue with an empty pkt starts drain ++ av_assert0(s->buf_pkt.size == 0); ++ ret = ff_v4l2_context_enqueue_packet(&s->output, &s->buf_pkt, NULL, 0); ++ if (ret) { ++ av_log(avctx, AV_LOG_ERROR, "Failed to start drain: ret=%d\n", ret); ++ return ret; ++ } ++ } ++ return NQ_DRAINING; ++ } ++ + if (ret < 0) { +- if (ret == AVERROR(EAGAIN)) +- return ff_v4l2_context_dequeue_frame(capture, frame, 0); +- else if (ret != AVERROR_EOF) +- return ret; ++ av_log(avctx, AV_LOG_ERROR, "Failed to get coded packet: err=%d\n", ret); ++ return ret; + } + } + +- if (s->draining) +- goto dequeue; ++ if (s->draining) { ++ if (s->buf_pkt.size) { ++ av_log(avctx, AV_LOG_WARNING, "Unexpected input whilst draining\n"); ++ av_packet_unref(&s->buf_pkt); ++ } ++ return NQ_DRAINING; ++ } ++ ++ if (!s->buf_pkt.size) ++ return NQ_NONE; + +- ret = ff_v4l2_context_enqueue_packet(output, &s->buf_pkt); +- if (ret < 0 && ret != AVERROR(EAGAIN)) +- goto fail; ++ if ((ret = check_output_streamon(avctx, s)) != 0) ++ return ret; + +- /* if EAGAIN don't unref packet and try to enqueue in the next iteration */ +- if (ret != AVERROR(EAGAIN)) ++ if (s->extdata_sent) ++ ret = ff_v4l2_context_enqueue_packet(&s->output, &s->buf_pkt, NULL, 0); ++ else ++ ret = ff_v4l2_context_enqueue_packet(&s->output, &s->buf_pkt, s->extdata_data, s->extdata_size); ++ ++ if (ret == AVERROR(EAGAIN)) { ++ // Out of input buffers - keep packet ++ ret = NQ_Q_FULL; ++ } ++ else { ++ // In all other cases we are done with this packet + av_packet_unref(&s->buf_pkt); ++ s->extdata_sent = 1; + +- if (!s->draining) { +- ret = v4l2_try_start(avctx); + if (ret) { +- /* cant recover */ +- if (ret != AVERROR(ENOMEM)) +- ret = 0; +- goto fail; ++ av_log(avctx, AV_LOG_ERROR, "Packet enqueue failure: err=%d\n", ret); ++ return ret; ++ } ++ } ++ ++ // Start if we haven't ++ { ++ const int ret2 = v4l2_try_start(avctx); ++ if (ret2) { ++ av_log(avctx, AV_LOG_DEBUG, "Start failure: err=%d\n", ret2); ++ ret = (ret2 == AVERROR(ENOMEM)) ? ret2 : NQ_DEAD; + } + } + +-dequeue: +- return ff_v4l2_context_dequeue_frame(capture, frame, -1); +-fail: +- av_packet_unref(&s->buf_pkt); + return ret; + } + ++static int qbuf_wait(AVCodecContext * const avctx, V4L2Context * const ctx) ++{ ++ int rv = 0; ++ ++ ff_mutex_lock(&ctx->lock); ++ ++ while (atomic_load(&ctx->q_count) == 0 && ctx->streamon) { ++ if (pthread_cond_wait(&ctx->cond, &ctx->lock) != 0) { ++ rv = AVERROR(errno); ++ av_log(avctx, AV_LOG_ERROR, "Cond wait failure: %s\n", av_err2str(rv)); ++ break; ++ } ++ } ++ ++ ff_mutex_unlock(&ctx->lock); ++ return rv; ++} ++ ++static int v4l2_receive_frame(AVCodecContext *avctx, AVFrame *frame) ++{ ++ V4L2m2mContext *const s = ((V4L2m2mPriv*)avctx->priv_data)->context; ++ int src_rv = -1; ++ int dst_rv = 1; // Non-zero (done), non-negative (error) number ++ unsigned int i = 0; ++ ++ do { ++ const int pending = xlat_pending(s); ++ const int prefer_dq = (pending > 4); ++ const int last_src_rv = src_rv; ++ ++ av_log(avctx, AV_LOG_TRACE, "Pending=%d, src_rv=%d, req_pkt=%d\n", pending, src_rv, s->req_pkt); ++ ++ // Enqueue another pkt for decode if ++ // (a) We don't have a lot of stuff in the buffer already OR ++ // (b) ... we (think we) do but we've failed to get a frame already OR ++ // (c) We've dequeued a lot of frames without asking for input ++ src_rv = try_enqueue_src(avctx, s, !(!prefer_dq || i != 0 || s->req_pkt > 2)); ++ ++ // If we got a frame last time or we've already tried to get a frame and ++ // we have nothing to enqueue then return now. rv will be AVERROR(EAGAIN) ++ // indicating that we want more input. ++ // This should mean that once decode starts we enter a stable state where ++ // we alternately ask for input and produce output ++ if ((i != 0 || s->req_pkt) && src_rv == NQ_SRC_EMPTY) ++ break; ++ ++ if (src_rv == NQ_Q_FULL && last_src_rv == NQ_Q_FULL) { ++ av_log(avctx, AV_LOG_WARNING, "Poll thinks src Q has space; none found\n"); ++ break; ++ } ++ ++ // Try to get a new frame if ++ // (a) we haven't already got one AND ++ // (b) enqueue returned a status indicating that decode should be attempted ++ if (dst_rv != 0 && TRY_DQ(src_rv)) { ++ // Pick a timeout depending on state ++ // The pending count isn't completely reliable so it is good enough ++ // hint that we want a frame but not good enough to require it in ++ // all cases; however if it has got > 31 that exceeds its margin of ++ // error so require a frame to prevent ridiculous levels of latency ++ const int t = ++ src_rv == NQ_Q_FULL ? -1 : ++ src_rv == NQ_DRAINING ? 300 : ++ prefer_dq ? (s->running && pending > 31 ? 100 : 5) : 0; ++ ++ // Dequeue frame will unref any previous contents of frame ++ // if it returns success so we don't need an explicit unref ++ // when discarding ++ // This returns AVERROR(EAGAIN) on timeout or if ++ // there is room in the input Q and timeout == -1 ++ dst_rv = ff_v4l2_context_dequeue_frame(&s->capture, frame, t); ++ ++ // Failure due to no buffer in Q? ++ if (dst_rv == AVERROR(ENOSPC)) { ++ // Wait & retry ++ if ((dst_rv = qbuf_wait(avctx, &s->capture)) == 0) { ++ dst_rv = ff_v4l2_context_dequeue_frame(&s->capture, frame, t); ++ } ++ } ++ ++ if (dst_rv == 0) { ++ set_best_effort_pts(avctx, &s->pts_stat, frame); ++ if (!s->running) { ++ s->running = 1; ++ av_log(avctx, AV_LOG_VERBOSE, "Decode running\n"); ++ } ++ } ++ ++ if (dst_rv == AVERROR(EAGAIN) && src_rv == NQ_DRAINING) { ++ av_log(avctx, AV_LOG_WARNING, "Timeout in drain - assume EOF"); ++ dst_rv = AVERROR_EOF; ++ s->capture.done = 1; ++ } ++ else if (dst_rv == AVERROR_EOF && (s->draining || s->capture.done)) ++ av_log(avctx, AV_LOG_DEBUG, "Dequeue EOF: draining=%d, cap.done=%d\n", ++ s->draining, s->capture.done); ++ else if (dst_rv && dst_rv != AVERROR(EAGAIN)) ++ av_log(avctx, AV_LOG_ERROR, "Packet dequeue failure: draining=%d, cap.done=%d, err=%d\n", ++ s->draining, s->capture.done, dst_rv); ++ } ++ ++ ++i; ++ if (i >= 256) { ++ av_log(avctx, AV_LOG_ERROR, "Unexpectedly large retry count: %d\n", i); ++ src_rv = AVERROR(EIO); ++ } ++ ++ // Continue trying to enqueue packets if either ++ // (a) we succeeded last time OR ++ // (b) we didn't ret a frame and we can retry the input ++ } while (src_rv == NQ_OK || (dst_rv == AVERROR(EAGAIN) && RETRY_NQ(src_rv))); ++ ++ // Ensure that the frame contains nothing if we aren't returning a frame ++ // (might happen when discarding) ++ if (dst_rv) ++ av_frame_unref(frame); ++ ++ // If we got a frame this time ask for a pkt next time ++ s->req_pkt = (dst_rv == 0) ? s->req_pkt + 1 : 0; ++ ++#if 0 ++ if (dst_rv == 0) ++ { ++ static int z = 0; ++ if (++z > 50) { ++ av_log(avctx, AV_LOG_ERROR, "Streamoff and die?\n"); ++ ff_v4l2_context_set_status(&s->capture, VIDIOC_STREAMOFF); ++ return -1; ++ } ++ } ++#endif ++ ++ return dst_rv == 0 ? 0 : ++ src_rv < 0 ? src_rv : ++ dst_rv < 0 ? dst_rv : ++ AVERROR(EAGAIN); ++} ++ ++#if 0 ++#include ++static int64_t us_time(void) ++{ ++ struct timespec ts; ++ clock_gettime(CLOCK_MONOTONIC, &ts); ++ return (int64_t)ts.tv_sec * 1000000 + ts.tv_nsec / 1000; ++} ++ ++static int v4l2_receive_frame(AVCodecContext *avctx, AVFrame *frame) ++{ ++ int ret; ++ const int64_t now = us_time(); ++ int64_t done; ++ av_log(avctx, AV_LOG_TRACE, "<<< %s\n", __func__); ++ ret = v4l2_receive_frame2(avctx, frame); ++ done = us_time(); ++ av_log(avctx, AV_LOG_TRACE, ">>> %s: rx time=%" PRId64 ", rv=%d\n", __func__, done - now, ret); ++ return ret; ++} ++#endif ++ ++static uint32_t ++avprofile_to_v4l2(const enum AVCodecID codec_id, const int avprofile) ++{ ++ switch (codec_id) { ++ case AV_CODEC_ID_H264: ++ switch (avprofile) { ++ case FF_PROFILE_H264_BASELINE: ++ return V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE; ++ case FF_PROFILE_H264_CONSTRAINED_BASELINE: ++ return V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_BASELINE; ++ case FF_PROFILE_H264_MAIN: ++ return V4L2_MPEG_VIDEO_H264_PROFILE_MAIN; ++ case FF_PROFILE_H264_EXTENDED: ++ return V4L2_MPEG_VIDEO_H264_PROFILE_EXTENDED; ++ case FF_PROFILE_H264_HIGH: ++ return V4L2_MPEG_VIDEO_H264_PROFILE_HIGH; ++ case FF_PROFILE_H264_HIGH_10: ++ return V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10; ++ case FF_PROFILE_H264_HIGH_10_INTRA: ++ return V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10_INTRA; ++ case FF_PROFILE_H264_MULTIVIEW_HIGH: ++ case FF_PROFILE_H264_HIGH_422: ++ return V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422; ++ case FF_PROFILE_H264_HIGH_422_INTRA: ++ return V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422_INTRA; ++ case FF_PROFILE_H264_STEREO_HIGH: ++ return V4L2_MPEG_VIDEO_H264_PROFILE_STEREO_HIGH; ++ case FF_PROFILE_H264_HIGH_444_PREDICTIVE: ++ return V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_PREDICTIVE; ++ case FF_PROFILE_H264_HIGH_444_INTRA: ++ return V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_INTRA; ++ case FF_PROFILE_H264_CAVLC_444: ++ return V4L2_MPEG_VIDEO_H264_PROFILE_CAVLC_444_INTRA; ++ case FF_PROFILE_H264_HIGH_444: ++ default: ++ break; ++// V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_BASELINE = 12, ++// V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH = 13, ++// V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH_INTRA = 14, ++// V4L2_MPEG_VIDEO_H264_PROFILE_MULTIVIEW_HIGH = 16, ++// V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_HIGH = 17, ++ } ++ break; ++ case AV_CODEC_ID_MPEG2VIDEO: ++ case AV_CODEC_ID_MPEG4: ++ case AV_CODEC_ID_VC1: ++ case AV_CODEC_ID_VP8: ++ case AV_CODEC_ID_VP9: ++ case AV_CODEC_ID_AV1: ++ // Most profiles are a simple number that matches the V4L2 enum ++ return avprofile; ++ default: ++ break; ++ } ++ return ~(uint32_t)0; ++} ++ ++// This check mirrors Chrome's profile check by testing to see if the profile ++// exists as a possible value for the V4L2 profile control ++static int ++check_profile(AVCodecContext *const avctx, V4L2m2mContext *const s) ++{ ++ struct v4l2_queryctrl query_ctrl; ++ struct v4l2_querymenu query_menu; ++ uint32_t profile_id; ++ ++ // An unset profile is almost certainly zero or -99 - do not reject ++ if (avctx->profile <= 0) { ++ av_log(avctx, AV_LOG_VERBOSE, "Profile %d <= 0 - check skipped\n", avctx->profile); ++ return 0; ++ } ++ ++ memset(&query_ctrl, 0, sizeof(query_ctrl)); ++ switch (avctx->codec_id) { ++ case AV_CODEC_ID_MPEG2VIDEO: ++ profile_id = V4L2_CID_MPEG_VIDEO_MPEG2_PROFILE; ++ break; ++ case AV_CODEC_ID_MPEG4: ++ profile_id = V4L2_CID_MPEG_VIDEO_MPEG4_PROFILE; ++ break; ++ case AV_CODEC_ID_H264: ++ profile_id = V4L2_CID_MPEG_VIDEO_H264_PROFILE; ++ break; ++ case AV_CODEC_ID_VP8: ++ profile_id = V4L2_CID_MPEG_VIDEO_VP8_PROFILE; ++ break; ++ case AV_CODEC_ID_VP9: ++ profile_id = V4L2_CID_MPEG_VIDEO_VP9_PROFILE; ++ break; ++#ifdef V4L2_CID_MPEG_VIDEO_AV1_PROFILE ++ case AV_CODEC_ID_AV1: ++ profile_id = V4L2_CID_MPEG_VIDEO_AV1_PROFILE; ++ break; ++#endif ++ default: ++ av_log(avctx, AV_LOG_VERBOSE, "Can't map profile for codec id %d; profile check skipped\n", avctx->codec_id); ++ return 0; ++ } ++ ++ query_ctrl = (struct v4l2_queryctrl){.id = profile_id}; ++ if (ioctl(s->fd, VIDIOC_QUERYCTRL, &query_ctrl) != 0) { ++ av_log(avctx, AV_LOG_VERBOSE, "Query profile ctrl (%#x) not supported: assume OK\n", query_ctrl.id); ++ } ++ else { ++ av_log(avctx, AV_LOG_DEBUG, "%s: Control supported: %#x\n", __func__, query_ctrl.id); ++ ++ query_menu = (struct v4l2_querymenu){ ++ .id = query_ctrl.id, ++ .index = avprofile_to_v4l2(avctx->codec_id, avctx->profile), ++ }; ++ ++ if (query_menu.index > query_ctrl.maximum || ++ query_menu.index < query_ctrl.minimum || ++ ioctl(s->fd, VIDIOC_QUERYMENU, &query_menu) != 0) { ++ return AVERROR(ENOENT); ++ } ++ } ++ ++ return 0; ++}; ++ ++static int ++check_size(AVCodecContext * const avctx, V4L2m2mContext * const s, const uint32_t fcc) ++{ ++ unsigned int i; ++ const uint32_t w = avctx->coded_width; ++ const uint32_t h = avctx->coded_height; ++ ++ if (w == 0 || h == 0 || fcc == 0) { ++ av_log(avctx, AV_LOG_TRACE, "%s: Size %dx%d or fcc %s empty\n", __func__, w, h, av_fourcc2str(fcc)); ++ return 0; ++ } ++ if ((s->quirks & FF_V4L2_QUIRK_ENUM_FRAMESIZES_BROKEN) != 0) { ++ av_log(avctx, AV_LOG_TRACE, "%s: Skipped (quirk): Size %dx%d, fcc %s\n", __func__, w, h, av_fourcc2str(fcc)); ++ return 0; ++ } ++ ++ for (i = 0;; ++i) { ++ struct v4l2_frmsizeenum fs = { ++ .index = i, ++ .pixel_format = fcc, ++ }; ++ ++ while (ioctl(s->fd, VIDIOC_ENUM_FRAMESIZES, &fs) != 0) { ++ const int err = AVERROR(errno); ++ if (err == AVERROR(EINTR)) ++ continue; ++ if (i == 0 && err == AVERROR(ENOTTY)) { ++ av_log(avctx, AV_LOG_DEBUG, "Framesize enum not supported\n"); ++ return 0; ++ } ++ if (err != AVERROR(EINVAL)) { ++ av_log(avctx, AV_LOG_ERROR, "Failed to enum framesizes: %s", av_err2str(err)); ++ return err; ++ } ++ av_log(avctx, AV_LOG_WARNING, "Failed to find Size=%dx%d, fmt=%s in %u frame size enums\n", ++ w, h, av_fourcc2str(fcc), i); ++ return err; ++ } ++ ++ switch (fs.type) { ++ case V4L2_FRMSIZE_TYPE_DISCRETE: ++ av_log(avctx, AV_LOG_TRACE, "%s[%d]: Discrete: %dx%d\n", __func__, i, ++ fs.discrete.width,fs.discrete.height); ++ if (w == fs.discrete.width && h == fs.discrete.height) ++ return 0; ++ break; ++ case V4L2_FRMSIZE_TYPE_STEPWISE: ++ av_log(avctx, AV_LOG_TRACE, "%s[%d]: Stepwise: Min: %dx%d Max: %dx%d, Step: %dx%d\n", __func__, i, ++ fs.stepwise.min_width, fs.stepwise.min_height, ++ fs.stepwise.max_width, fs.stepwise.max_height, ++ fs.stepwise.step_width,fs.stepwise.step_height); ++ if (w >= fs.stepwise.min_width && w <= fs.stepwise.max_width && ++ h >= fs.stepwise.min_height && h <= fs.stepwise.max_height && ++ (w - fs.stepwise.min_width) % fs.stepwise.step_width == 0 && ++ (h - fs.stepwise.min_height) % fs.stepwise.step_height == 0) ++ return 0; ++ break; ++ case V4L2_FRMSIZE_TYPE_CONTINUOUS: ++ av_log(avctx, AV_LOG_TRACE, "%s[%d]: Continuous: Min: %dx%d Max: %dx%d, Step: %dx%d\n", __func__, i, ++ fs.stepwise.min_width, fs.stepwise.min_height, ++ fs.stepwise.max_width, fs.stepwise.max_height, ++ fs.stepwise.step_width,fs.stepwise.step_height); ++ if (w >= fs.stepwise.min_width && w <= fs.stepwise.max_width && ++ h >= fs.stepwise.min_height && h <= fs.stepwise.max_height) ++ return 0; ++ break; ++ default: ++ av_log(avctx, AV_LOG_ERROR, "Unexpected framesize enum: %d", fs.type); ++ return AVERROR(EINVAL); ++ } ++ } ++} ++ ++static int ++get_quirks(AVCodecContext * const avctx, V4L2m2mContext * const s) ++{ ++ struct v4l2_capability cap; ++ ++ memset(&cap, 0, sizeof(cap)); ++ while (ioctl(s->fd, VIDIOC_QUERYCAP, &cap) != 0) { ++ int err = errno; ++ if (err == EINTR) ++ continue; ++ av_log(avctx, AV_LOG_ERROR, "V4L2: Failed to get capabilities: %s\n", strerror(err)); ++ return AVERROR(err); ++ } ++ ++ // Could be made table driven if we have a few more but right now there ++ // seems no point ++ ++ // Meson (amlogic) always gives a resolution changed event after output ++ // streamon and userspace must (re)allocate capture buffers and streamon ++ // capture to clear the event even if the capture buffers were the right ++ // size in the first place. ++ if (strcmp(cap.driver, "meson-vdec") == 0) ++ s->quirks |= FF_V4L2_QUIRK_REINIT_ALWAYS | FF_V4L2_QUIRK_ENUM_FRAMESIZES_BROKEN; ++ ++ av_log(avctx, AV_LOG_DEBUG, "Driver '%s': Quirks=%#x\n", cap.driver, s->quirks); ++ return 0; ++} ++ ++// This heuristic is for H264 but use for everything ++static uint32_t max_coded_size(const AVCodecContext * const avctx) ++{ ++ uint32_t wxh = avctx->coded_width * avctx->coded_height; ++ uint32_t size; ++ ++ size = wxh * 3 / 2; ++ // H.264 Annex A table A-1 gives minCR which is either 2 or 4 ++ // unfortunately that doesn't yield an actually useful limit ++ // and it should be noted that frame 0 is special cased to allow ++ // a bigger number which really isn't helpful for us. So just pick ++ // frame_size / 2 ++ size /= 2; ++ // Add 64k to allow for any overheads and/or encoder hopefulness ++ // with small WxH ++ return size + (1 << 16); ++} ++ ++static void ++parse_extradata(AVCodecContext * const avctx, V4L2m2mContext * const s) ++{ ++ s->reorder_size = 0; ++ ++ if (!avctx->extradata || !avctx->extradata_size) ++ return; ++ ++ switch (avctx->codec_id) { ++#if CONFIG_H264_DECODER ++ case AV_CODEC_ID_H264: ++ { ++ H264ParamSets ps; ++ int is_avc = 0; ++ int nal_length_size = 0; ++ int ret; ++ ++ memset(&ps, 0, sizeof(ps)); ++ ++ ret = ff_h264_decode_extradata(avctx->extradata, avctx->extradata_size, ++ &ps, &is_avc, &nal_length_size, ++ avctx->err_recognition, avctx); ++ if (ret > 0) { ++ const SPS * sps = NULL; ++ unsigned int i; ++ for (i = 0; i != MAX_SPS_COUNT; ++i) { ++ if (ps.sps_list[i]) { ++ sps = (const SPS *)ps.sps_list[i]->data; ++ break; ++ } ++ } ++ if (sps) { ++ avctx->profile = ff_h264_get_profile(sps); ++ avctx->level = sps->level_idc; ++ s->reorder_size = sps->num_reorder_frames; ++ } ++ } ++ ff_h264_ps_uninit(&ps); ++ break; ++ } ++#endif ++#if CONFIG_HEVC_DECODER ++ case AV_CODEC_ID_HEVC: ++ { ++ HEVCParamSets ps; ++ HEVCSEI sei; ++ int is_nalff = 0; ++ int nal_length_size = 0; ++ int ret; ++ ++ memset(&ps, 0, sizeof(ps)); ++ memset(&sei, 0, sizeof(sei)); ++ ++ ret = ff_hevc_decode_extradata(avctx->extradata, avctx->extradata_size, ++ &ps, &sei, &is_nalff, &nal_length_size, ++ avctx->err_recognition, 0, avctx); ++ if (ret > 0) { ++ const HEVCSPS * sps = NULL; ++ unsigned int i; ++ for (i = 0; i != HEVC_MAX_SPS_COUNT; ++i) { ++ if (ps.sps_list[i]) { ++ sps = (const HEVCSPS *)ps.sps_list[i]->data; ++ break; ++ } ++ } ++ if (sps) { ++ avctx->profile = sps->ptl.general_ptl.profile_idc; ++ avctx->level = sps->ptl.general_ptl.level_idc; ++ s->reorder_size = sps->temporal_layer[sps->max_sub_layers - 1].max_dec_pic_buffering; ++ } ++ } ++ ff_hevc_ps_uninit(&ps); ++ ff_hevc_reset_sei(&sei); ++ break; ++ } ++#endif ++ default: ++ break; ++ } ++} ++ ++static int ++choose_capture_format(AVCodecContext * const avctx, V4L2m2mContext * const s) ++{ ++ const V4L2m2mPriv * const priv = avctx->priv_data; ++ unsigned int fmts_n; ++ uint32_t *fmts = ff_v4l2_context_enum_drm_formats(&s->capture, &fmts_n); ++ enum AVPixelFormat *fmts2 = NULL; ++ enum AVPixelFormat gf_pix_fmt; ++ unsigned int i; ++ unsigned int n = 0; ++ unsigned int pref_n = 1; ++ int rv = AVERROR(ENOENT); ++ ++ if (!fmts) ++ return AVERROR(ENOENT); ++ ++ if ((fmts2 = av_malloc(sizeof(*fmts2) * (fmts_n + 3))) == NULL) { ++ rv = AVERROR(ENOMEM); ++ goto error; ++ } ++ ++ // Filter for formats that are supported by ffmpeg and ++ // can accomodate the stream size ++ fmts2[n++] = AV_PIX_FMT_DRM_PRIME; ++ for (i = 0; i != fmts_n; ++i) { ++ const enum AVPixelFormat f = ff_v4l2_format_v4l2_to_avfmt(fmts[i], AV_CODEC_ID_RAWVIDEO); ++ av_log(avctx, AV_LOG_TRACE, "VLC pix %s -> %s\n", av_fourcc2str(fmts[i]), av_get_pix_fmt_name(f)); ++ if (f == AV_PIX_FMT_NONE) ++ continue; ++ ++ if (check_size(avctx, s, fmts[i]) != 0) ++ continue; ++ ++ if (f == priv->pix_fmt) ++ pref_n = n; ++ fmts2[n++] = f; ++ } ++ ++ if (n < 2) { ++ av_log(avctx, AV_LOG_DEBUG, "%s: No usable formats found\n", __func__); ++ goto error; ++ } ++ ++ if (n != 2) { ++ // ffmpeg.c really only expects one s/w format. It thinks that the ++ // last format in the list is the s/w format of the h/w format but ++ // also chooses the first non-h/w format as the preferred s/w format. ++ // The only way of reconciling this is to dup our preferred format into ++ // both last & first place :-( ++ const enum AVPixelFormat t = fmts2[pref_n]; ++ fmts2[pref_n] = fmts2[1]; ++ fmts2[1] = t; ++ fmts2[n++] = t; ++ } ++ ++ fmts2[n] = AV_PIX_FMT_NONE; ++ ++ gf_pix_fmt = ff_get_format(avctx, fmts2); ++ av_log(avctx, AV_LOG_DEBUG, "avctx requested=%d (%s) %dx%d; get_format requested=%d (%s)\n", ++ avctx->pix_fmt, av_get_pix_fmt_name(avctx->pix_fmt), ++ avctx->coded_width, avctx->coded_height, ++ gf_pix_fmt, av_get_pix_fmt_name(gf_pix_fmt)); ++ ++ if (gf_pix_fmt == AV_PIX_FMT_NONE) ++ goto error; ++ ++ if (gf_pix_fmt == AV_PIX_FMT_DRM_PRIME || avctx->pix_fmt == AV_PIX_FMT_DRM_PRIME) { ++ avctx->pix_fmt = AV_PIX_FMT_DRM_PRIME; ++ s->capture.av_pix_fmt = avctx->sw_pix_fmt; ++ s->output_drm = 1; ++ } ++ else { ++ avctx->pix_fmt = gf_pix_fmt; ++ s->capture.av_pix_fmt = gf_pix_fmt; ++ s->output_drm = 0; ++ } ++ ++ // Get format converts capture.av_pix_fmt back into a V4L2 format in the context ++ if ((rv = ff_v4l2_context_get_format(&s->capture, 0)) != 0) ++ goto error; ++ rv = ff_v4l2_context_set_format(&s->capture); ++ ++error: ++ av_free(fmts2); ++ av_free(fmts); ++ return rv; ++} ++ + static av_cold int v4l2_decode_init(AVCodecContext *avctx) + { + V4L2Context *capture, *output; +@@ -185,10 +1167,27 @@ static av_cold int v4l2_decode_init(AVCo + V4L2m2mPriv *priv = avctx->priv_data; + int ret; + ++ av_log(avctx, AV_LOG_TRACE, "<<< %s\n", __func__); ++ ++ if (avctx->codec_id == AV_CODEC_ID_H264) { ++ if (avctx->ticks_per_frame == 1) { ++ if(avctx->time_base.den < INT_MAX/2) { ++ avctx->time_base.den *= 2; ++ } else ++ avctx->time_base.num /= 2; ++ } ++ avctx->ticks_per_frame = 2; ++ } ++ + ret = ff_v4l2_m2m_create_context(priv, &s); + if (ret < 0) + return ret; + ++ parse_extradata(avctx, s); ++ ++ xlat_init(&s->xlat); ++ pts_stats_init(&s->pts_stat, avctx, "decoder"); ++ + capture = &s->capture; + output = &s->output; + +@@ -196,14 +1195,45 @@ static av_cold int v4l2_decode_init(AVCo + * by the v4l2 driver; this event will trigger a full pipeline reconfig and + * the proper values will be retrieved from the kernel driver. + */ +- output->height = capture->height = avctx->coded_height; +- output->width = capture->width = avctx->coded_width; ++// output->height = capture->height = avctx->coded_height; ++// output->width = capture->width = avctx->coded_width; ++ output->height = capture->height = 0; ++ output->width = capture->width = 0; + + output->av_codec_id = avctx->codec_id; + output->av_pix_fmt = AV_PIX_FMT_NONE; ++ output->min_buf_size = max_coded_size(avctx); + + capture->av_codec_id = AV_CODEC_ID_RAWVIDEO; + capture->av_pix_fmt = avctx->pix_fmt; ++ capture->min_buf_size = 0; ++ ++ capture->av_pix_fmt = AV_PIX_FMT_NONE; ++ s->output_drm = 0; ++ ++ s->db_ctl = NULL; ++ if (priv->dmabuf_alloc != NULL && strcmp(priv->dmabuf_alloc, "v4l2") != 0) { ++ if (strcmp(priv->dmabuf_alloc, "cma") == 0) ++ s->db_ctl = dmabufs_ctl_new(); ++ else { ++ av_log(avctx, AV_LOG_ERROR, "Unknown dmabuf alloc method: '%s'\n", priv->dmabuf_alloc); ++ return AVERROR(EINVAL); ++ } ++ if (!s->db_ctl) { ++ av_log(avctx, AV_LOG_ERROR, "Can't open dmabuf provider '%s'\n", priv->dmabuf_alloc); ++ return AVERROR(ENOMEM); ++ } ++ } ++ ++ s->device_ref = av_hwdevice_ctx_alloc(AV_HWDEVICE_TYPE_DRM); ++ if (!s->device_ref) { ++ ret = AVERROR(ENOMEM); ++ return ret; ++ } ++ ++ ret = av_hwdevice_ctx_init(s->device_ref); ++ if (ret < 0) ++ return ret; + + s->avctx = avctx; + ret = ff_v4l2_m2m_codec_init(priv); +@@ -212,12 +1242,90 @@ static av_cold int v4l2_decode_init(AVCo + return ret; + } + +- return v4l2_prepare_decoder(s); ++ if (avctx->extradata && ++ (ret = copy_extradata(avctx, avctx->extradata, avctx->extradata_size, &s->extdata_data, &s->extdata_size)) != 0) { ++ av_log(avctx, AV_LOG_ERROR, "Failed to copy extradata from context: %s\n", av_err2str(ret)); ++#if DUMP_FAILED_EXTRADATA ++ log_dump(avctx, AV_LOG_INFO, avctx->extradata, avctx->extradata_size); ++#endif ++ return ret; ++ } ++ ++ if ((ret = get_quirks(avctx, s)) != 0) ++ return ret; ++ ++ if ((ret = check_profile(avctx, s)) != 0) { ++ av_log(avctx, AV_LOG_WARNING, "Profile %d not supported by decode\n", avctx->profile); ++ return ret; ++ } ++ ++ // Size check done as part of format filtering ++ if ((ret = choose_capture_format(avctx, s)) != 0) ++ return ret; ++ ++ if ((ret = v4l2_prepare_decoder(s)) < 0) ++ return ret; ++ ++ return 0; + } + + static av_cold int v4l2_decode_close(AVCodecContext *avctx) + { +- return ff_v4l2_m2m_codec_end(avctx->priv_data); ++ int rv; ++ av_log(avctx, AV_LOG_TRACE, "<<< %s\n", __func__); ++ rv = ff_v4l2_m2m_codec_end(avctx->priv_data); ++ av_log(avctx, AV_LOG_TRACE, ">>> %s: rv=%d\n", __func__, rv); ++ return rv; ++} ++ ++static void v4l2_decode_flush(AVCodecContext *avctx) ++{ ++ // An alternatve and more drastic form of flush is to simply do this: ++ // v4l2_decode_close(avctx); ++ // v4l2_decode_init(avctx); ++ // The downside is that this keeps a decoder open until all the frames ++ // associated with it have been returned. This is a bit wasteful on ++ // possibly limited h/w resources and fails on a Pi for this reason unless ++ // more GPU mem is allocated than is the default. ++ ++ V4L2m2mPriv * const priv = avctx->priv_data; ++ V4L2m2mContext * const s = priv->context; ++ V4L2Context * const output = &s->output; ++ V4L2Context * const capture = &s->capture; ++ ++ av_log(avctx, AV_LOG_TRACE, "<<< %s: streamon=%d\n", __func__, output->streamon); ++ ++ // Reflushing everything is benign, quick and avoids having to worry about ++ // states like EOS processing so don't try to optimize out (having got it ++ // wrong once) ++ ++ ff_v4l2_context_set_status(output, VIDIOC_STREAMOFF); ++ ++ // Clear any buffered input packet ++ av_packet_unref(&s->buf_pkt); ++ ++ // Clear a pending EOS ++ if (ff_v4l2_ctx_eos(capture)) { ++ // Arguably we could delay this but this is easy and doesn't require ++ // thought or extra vars ++ ff_v4l2_context_set_status(capture, VIDIOC_STREAMOFF); ++ ff_v4l2_context_set_status(capture, VIDIOC_STREAMON); ++ } ++ ++ // V4L2 makes no guarantees about whether decoded frames are flushed or not ++ // so mark all frames we are tracking to be discarded if they appear ++ xlat_flush(&s->xlat); ++ ++ // resend extradata ++ s->extdata_sent = 0; ++ // clear status vars ++ s->running = 0; ++ s->draining = 0; ++ output->done = 0; ++ capture->done = 0; ++ ++ // Stream on will occur when we actually submit a new frame ++ av_log(avctx, AV_LOG_TRACE, ">>> %s\n", __func__); + } + + #define OFFSET(x) offsetof(V4L2m2mPriv, x) +@@ -226,10 +1334,17 @@ static av_cold int v4l2_decode_close(AVC + static const AVOption options[] = { + V4L_M2M_DEFAULT_OPTS, + { "num_capture_buffers", "Number of buffers in the capture context", +- OFFSET(num_capture_buffers), AV_OPT_TYPE_INT, {.i64 = 20}, 20, INT_MAX, FLAGS }, ++ OFFSET(num_capture_buffers), AV_OPT_TYPE_INT, {.i64 = 20}, 2, INT_MAX, FLAGS }, ++ { "pixel_format", "Pixel format to be used by the decoder", OFFSET(pix_fmt), AV_OPT_TYPE_PIXEL_FMT, {.i64 = AV_PIX_FMT_NONE}, AV_PIX_FMT_NONE, AV_PIX_FMT_NB, FLAGS }, ++ { "dmabuf_alloc", "Dmabuf alloc method", OFFSET(dmabuf_alloc), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, FLAGS }, + { NULL}, + }; + ++static const AVCodecHWConfigInternal *v4l2_m2m_hw_configs[] = { ++ HW_CONFIG_INTERNAL(DRM_PRIME), ++ NULL ++}; ++ + #define M2MDEC_CLASS(NAME) \ + static const AVClass v4l2_m2m_ ## NAME ## _dec_class = { \ + .class_name = #NAME "_v4l2m2m_decoder", \ +@@ -250,10 +1365,16 @@ static const AVOption options[] = { + .init = v4l2_decode_init, \ + FF_CODEC_RECEIVE_FRAME_CB(v4l2_receive_frame), \ + .close = v4l2_decode_close, \ ++ .flush = v4l2_decode_flush, \ + .bsfs = bsf_name, \ + .p.capabilities = AV_CODEC_CAP_HARDWARE | AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AVOID_PROBING, \ + .caps_internal = FF_CODEC_CAP_SETS_PKT_DTS | FF_CODEC_CAP_INIT_CLEANUP, \ + .p.wrapper_name = "v4l2m2m", \ ++ .p.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_DRM_PRIME, \ ++ AV_PIX_FMT_NV12, \ ++ AV_PIX_FMT_YUV420P, \ ++ AV_PIX_FMT_NONE}, \ ++ .hw_configs = v4l2_m2m_hw_configs, \ + } + + M2MDEC(h264, "H.264", AV_CODEC_ID_H264, "h264_mp4toannexb"); +--- a/libavcodec/v4l2_m2m_enc.c ++++ b/libavcodec/v4l2_m2m_enc.c +@@ -24,6 +24,8 @@ + #include + #include + #include ++#include ++ + #include "encode.h" + #include "libavcodec/avcodec.h" + #include "libavutil/pixdesc.h" +@@ -38,6 +40,34 @@ + #define MPEG_CID(x) V4L2_CID_MPEG_VIDEO_##x + #define MPEG_VIDEO(x) V4L2_MPEG_VIDEO_##x + ++// P030 should be defined in drm_fourcc.h and hopefully will be sometime ++// in the future but until then... ++#ifndef DRM_FORMAT_P030 ++#define DRM_FORMAT_P030 fourcc_code('P', '0', '3', '0') ++#endif ++ ++#ifndef DRM_FORMAT_NV15 ++#define DRM_FORMAT_NV15 fourcc_code('N', 'V', '1', '5') ++#endif ++ ++#ifndef DRM_FORMAT_NV20 ++#define DRM_FORMAT_NV20 fourcc_code('N', 'V', '2', '0') ++#endif ++ ++#ifndef V4L2_CID_CODEC_BASE ++#define V4L2_CID_CODEC_BASE V4L2_CID_MPEG_BASE ++#endif ++ ++// V4L2_PIX_FMT_NV12_10_COL128 and V4L2_PIX_FMT_NV12_COL128 should be defined ++// in videodev2.h hopefully will be sometime in the future but until then... ++#ifndef V4L2_PIX_FMT_NV12_10_COL128 ++#define V4L2_PIX_FMT_NV12_10_COL128 v4l2_fourcc('N', 'C', '3', '0') ++#endif ++ ++#ifndef V4L2_PIX_FMT_NV12_COL128 ++#define V4L2_PIX_FMT_NV12_COL128 v4l2_fourcc('N', 'C', '1', '2') /* 12 Y/CbCr 4:2:0 128 pixel wide column */ ++#endif ++ + static inline void v4l2_set_timeperframe(V4L2m2mContext *s, unsigned int num, unsigned int den) + { + struct v4l2_streamparm parm = { 0 }; +@@ -148,15 +178,14 @@ static inline int v4l2_mpeg4_profile_fro + static int v4l2_check_b_frame_support(V4L2m2mContext *s) + { + if (s->avctx->max_b_frames) +- av_log(s->avctx, AV_LOG_WARNING, "Encoder does not support b-frames yet\n"); ++ av_log(s->avctx, AV_LOG_WARNING, "Encoder does not support %d b-frames yet\n", s->avctx->max_b_frames); + +- v4l2_set_ext_ctrl(s, MPEG_CID(B_FRAMES), 0, "number of B-frames", 0); ++ v4l2_set_ext_ctrl(s, MPEG_CID(B_FRAMES), s->avctx->max_b_frames, "number of B-frames", 1); + v4l2_get_ext_ctrl(s, MPEG_CID(B_FRAMES), &s->avctx->max_b_frames, "number of B-frames", 0); + if (s->avctx->max_b_frames == 0) + return 0; + + avpriv_report_missing_feature(s->avctx, "DTS/PTS calculation for V4L2 encoding"); +- + return AVERROR_PATCHWELCOME; + } + +@@ -271,17 +300,208 @@ static int v4l2_prepare_encoder(V4L2m2mC + return 0; + } + ++static int avdrm_to_v4l2(struct v4l2_format * const format, const AVFrame * const frame) ++{ ++ const AVDRMFrameDescriptor *const src = (const AVDRMFrameDescriptor *)frame->data[0]; ++ ++ const uint32_t drm_fmt = src->layers[0].format; ++ // Treat INVALID as LINEAR ++ const uint64_t mod = src->objects[0].format_modifier == DRM_FORMAT_MOD_INVALID ? ++ DRM_FORMAT_MOD_LINEAR : src->objects[0].format_modifier; ++ uint32_t pix_fmt = 0; ++ uint32_t w = 0; ++ uint32_t h = 0; ++ uint32_t bpl = src->layers[0].planes[0].pitch; ++ ++ // We really don't expect multiple layers ++ // All formats that we currently cope with are single object ++ ++ if (src->nb_layers != 1 || src->nb_objects != 1) ++ return AVERROR(EINVAL); ++ ++ switch (drm_fmt) { ++ case DRM_FORMAT_YUV420: ++ if (mod == DRM_FORMAT_MOD_LINEAR) { ++ if (src->layers[0].nb_planes != 3) ++ break; ++ pix_fmt = V4L2_PIX_FMT_YUV420; ++ h = src->layers[0].planes[1].offset / bpl; ++ w = bpl; ++ } ++ break; ++ ++ case DRM_FORMAT_NV12: ++ if (mod == DRM_FORMAT_MOD_LINEAR) { ++ if (src->layers[0].nb_planes != 2) ++ break; ++ pix_fmt = V4L2_PIX_FMT_NV12; ++ h = src->layers[0].planes[1].offset / bpl; ++ w = bpl; ++ } ++ else if (fourcc_mod_broadcom_mod(mod) == DRM_FORMAT_MOD_BROADCOM_SAND128) { ++ if (src->layers[0].nb_planes != 2) ++ break; ++ pix_fmt = V4L2_PIX_FMT_NV12_COL128; ++ w = bpl; ++ h = src->layers[0].planes[1].offset / 128; ++ bpl = fourcc_mod_broadcom_param(mod); ++ } ++ break; ++ ++ case DRM_FORMAT_P030: ++ if (fourcc_mod_broadcom_mod(mod) == DRM_FORMAT_MOD_BROADCOM_SAND128) { ++ if (src->layers[0].nb_planes != 2) ++ break; ++ pix_fmt = V4L2_PIX_FMT_NV12_10_COL128; ++ w = bpl / 2; // Matching lie to how we construct this ++ h = src->layers[0].planes[1].offset / 128; ++ bpl = fourcc_mod_broadcom_param(mod); ++ } ++ break; ++ ++ default: ++ break; ++ } ++ ++ if (!pix_fmt) ++ return AVERROR(EINVAL); ++ ++ if (V4L2_TYPE_IS_MULTIPLANAR(format->type)) { ++ struct v4l2_pix_format_mplane *const pix = &format->fmt.pix_mp; ++ ++ pix->width = w; ++ pix->height = h; ++ pix->pixelformat = pix_fmt; ++ pix->plane_fmt[0].bytesperline = bpl; ++ pix->num_planes = 1; ++ } ++ else { ++ struct v4l2_pix_format *const pix = &format->fmt.pix; ++ ++ pix->width = w; ++ pix->height = h; ++ pix->pixelformat = pix_fmt; ++ pix->bytesperline = bpl; ++ } ++ ++ return 0; ++} ++ ++// Do we have similar enough formats to be usable? ++static int fmt_eq(const struct v4l2_format * const a, const struct v4l2_format * const b) ++{ ++ if (a->type != b->type) ++ return 0; ++ ++ if (V4L2_TYPE_IS_MULTIPLANAR(a->type)) { ++ const struct v4l2_pix_format_mplane *const pa = &a->fmt.pix_mp; ++ const struct v4l2_pix_format_mplane *const pb = &b->fmt.pix_mp; ++ unsigned int i; ++ if (pa->pixelformat != pb->pixelformat || ++ pa->num_planes != pb->num_planes) ++ return 0; ++ for (i = 0; i != pa->num_planes; ++i) { ++ if (pa->plane_fmt[i].bytesperline != pb->plane_fmt[i].bytesperline) ++ return 0; ++ } ++ } ++ else { ++ const struct v4l2_pix_format *const pa = &a->fmt.pix; ++ const struct v4l2_pix_format *const pb = &b->fmt.pix; ++ if (pa->pixelformat != pb->pixelformat || ++ pa->bytesperline != pb->bytesperline) ++ return 0; ++ } ++ return 1; ++} ++ ++static inline int q_full(const V4L2Context *const output) ++{ ++ return ff_v4l2_context_q_count(output) == output->num_buffers; ++} ++ + static int v4l2_send_frame(AVCodecContext *avctx, const AVFrame *frame) + { + V4L2m2mContext *s = ((V4L2m2mPriv*)avctx->priv_data)->context; + V4L2Context *const output = &s->output; ++ int rv; ++ const int needs_slot = q_full(output); ++ ++ av_log(avctx, AV_LOG_TRACE, "<<< %s; needs_slot=%d\n", __func__, needs_slot); ++ ++ // Signal EOF if needed (doesn't need q slot) ++ if (!frame) { ++ av_log(avctx, AV_LOG_TRACE, "--- %s: EOS\n", __func__); ++ return ff_v4l2_context_enqueue_frame(output, frame); ++ } ++ ++ if ((rv = ff_v4l2_dq_all(output, needs_slot? 500 : 0)) != 0) { ++ // We should be able to return AVERROR(EAGAIN) to indicate buffer ++ // exhaustion, but ffmpeg currently treats that as fatal. ++ av_log(avctx, AV_LOG_WARNING, "Failed to get buffer for src frame: %s\n", av_err2str(rv)); ++ return rv; ++ } ++ ++ if (s->input_drm && !output->streamon) { ++ struct v4l2_format req_format = {.type = output->format.type}; ++ ++ // Set format when we first get a buffer ++ if ((rv = avdrm_to_v4l2(&req_format, frame)) != 0) { ++ av_log(avctx, AV_LOG_ERROR, "Failed to get V4L2 format from DRM_PRIME frame\n"); ++ return rv; ++ } ++ ++ ff_v4l2_context_release(output); ++ ++ output->format = req_format; ++ ++ if ((rv = ff_v4l2_context_set_format(output)) != 0) { ++ av_log(avctx, AV_LOG_ERROR, "Failed to set V4L2 format\n"); ++ return rv; ++ } ++ ++ if (!fmt_eq(&req_format, &output->format)) { ++ av_log(avctx, AV_LOG_ERROR, "Format mismatch after setup\n"); ++ return AVERROR(EINVAL); ++ } ++ ++ output->selection.top = frame->crop_top; ++ output->selection.left = frame->crop_left; ++ output->selection.width = av_frame_cropped_width(frame); ++ output->selection.height = av_frame_cropped_height(frame); ++ ++ if ((rv = ff_v4l2_context_init(output)) != 0) { ++ av_log(avctx, AV_LOG_ERROR, "Failed to (re)init context\n"); ++ return rv; ++ } ++ ++ { ++ struct v4l2_selection selection = { ++ .type = V4L2_BUF_TYPE_VIDEO_OUTPUT, ++ .target = V4L2_SEL_TGT_CROP, ++ .r = output->selection ++ }; ++ if (ioctl(s->fd, VIDIOC_S_SELECTION, &selection) != 0) { ++ av_log(avctx, AV_LOG_WARNING, "S_SELECTION (CROP) %dx%d @ %d,%d failed: %s\n", ++ selection.r.width, selection.r.height, selection.r.left, selection.r.top, ++ av_err2str(AVERROR(errno))); ++ } ++ av_log(avctx, AV_LOG_TRACE, "S_SELECTION (CROP) %dx%d @ %d,%d OK\n", ++ selection.r.width, selection.r.height, selection.r.left, selection.r.top); ++ } ++ } + + #ifdef V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME +- if (frame && frame->pict_type == AV_PICTURE_TYPE_I) ++ if (frame->pict_type == AV_PICTURE_TYPE_I) + v4l2_set_ext_ctrl(s, MPEG_CID(FORCE_KEY_FRAME), 0, "force key frame", 1); + #endif + +- return ff_v4l2_context_enqueue_frame(output, frame); ++ rv = ff_v4l2_context_enqueue_frame(output, frame); ++ if (rv) { ++ av_log(avctx, AV_LOG_ERROR, "Enqueue frame failed: %s\n", av_err2str(rv)); ++ } ++ ++ return rv; + } + + static int v4l2_receive_packet(AVCodecContext *avctx, AVPacket *avpkt) +@@ -292,6 +512,11 @@ static int v4l2_receive_packet(AVCodecCo + AVFrame *frame = s->frame; + int ret; + ++ av_log(avctx, AV_LOG_TRACE, "<<< %s: qlen out %d cap %d\n", __func__, ++ ff_v4l2_context_q_count(output), ff_v4l2_context_q_count(capture)); ++ ++ ff_v4l2_dq_all(output, 0); ++ + if (s->draining) + goto dequeue; + +@@ -328,7 +553,115 @@ static int v4l2_receive_packet(AVCodecCo + } + + dequeue: +- return ff_v4l2_context_dequeue_packet(capture, avpkt); ++ // Dequeue a frame ++ for (;;) { ++ int t = q_full(output) ? -1 : s->draining ? 300 : 0; ++ int rv2; ++ ++ // If output is full wait for either a packet or output to become not full ++ ret = ff_v4l2_context_dequeue_packet(capture, avpkt, t); ++ ++ // If output was full retry packet dequeue ++ t = (ret != AVERROR(EAGAIN) || t != -1) ? 0 : 300; ++ rv2 = ff_v4l2_dq_all(output, t); ++ if (t == 0 || rv2 != 0) ++ break; ++ } ++ if (ret) ++ return (s->draining && ret == AVERROR(EAGAIN)) ? AVERROR_EOF : ret; ++ ++ if (capture->first_buf == 1) { ++ uint8_t * data; ++ const int len = avpkt->size; ++ ++ // 1st buffer after streamon should be SPS/PPS ++ capture->first_buf = 2; ++ ++ // Clear both possible stores so there is no chance of confusion ++ av_freep(&s->extdata_data); ++ s->extdata_size = 0; ++ av_freep(&avctx->extradata); ++ avctx->extradata_size = 0; ++ ++ if ((data = av_malloc(len + AV_INPUT_BUFFER_PADDING_SIZE)) == NULL) ++ goto fail_no_mem; ++ ++ memcpy(data, avpkt->data, len); ++ av_packet_unref(avpkt); ++ ++ // We need to copy the header, but keep local if not global ++ if ((avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER) != 0) { ++ avctx->extradata = data; ++ avctx->extradata_size = len; ++ } ++ else { ++ s->extdata_data = data; ++ s->extdata_size = len; ++ } ++ ++ ret = ff_v4l2_context_dequeue_packet(capture, avpkt, 0); ++ ff_v4l2_dq_all(output, 0); ++ if (ret) ++ return ret; ++ } ++ ++ // First frame must be key so mark as such even if encoder forgot ++ if (capture->first_buf == 2) { ++ avpkt->flags |= AV_PKT_FLAG_KEY; ++ ++ // Add any extradata to the 1st packet we emit as we cannot create it at init ++ if (avctx->extradata_size > 0 && avctx->extradata) { ++ void * const side = av_packet_new_side_data(avpkt, ++ AV_PKT_DATA_NEW_EXTRADATA, ++ avctx->extradata_size); ++ if (!side) ++ goto fail_no_mem; ++ ++ memcpy(side, avctx->extradata, avctx->extradata_size); ++ } ++ } ++ ++ // Add SPS/PPS to the start of every key frame if non-global headers ++ if ((avpkt->flags & AV_PKT_FLAG_KEY) != 0 && s->extdata_size != 0) { ++ const size_t newlen = s->extdata_size + avpkt->size; ++ AVBufferRef * const buf = av_buffer_alloc(newlen + AV_INPUT_BUFFER_PADDING_SIZE); ++ ++ if (buf == NULL) ++ goto fail_no_mem; ++ ++ memcpy(buf->data, s->extdata_data, s->extdata_size); ++ memcpy(buf->data + s->extdata_size, avpkt->data, avpkt->size); ++ ++ av_buffer_unref(&avpkt->buf); ++ avpkt->buf = buf; ++ avpkt->data = buf->data; ++ avpkt->size = newlen; ++ } ++ else if (ff_v4l2_context_q_count(capture) < 2) { ++ // Avoid running out of capture buffers ++ // In most cases the buffers will be returned quickly in which case ++ // we don't copy and can use the v4l2 buffers directly but sometimes ++ // ffmpeg seems to hold onto all of them for a long time (.mkv ++ // creation?) so avoid deadlock in those cases. ++ AVBufferRef * const buf = av_buffer_alloc(avpkt->size + AV_INPUT_BUFFER_PADDING_SIZE); ++ if (buf == NULL) ++ goto fail_no_mem; ++ ++ memcpy(buf->data, avpkt->data, avpkt->size); ++ av_buffer_unref(&avpkt->buf); // Will recycle the V4L2 buffer ++ ++ avpkt->buf = buf; ++ avpkt->data = buf->data; ++ } ++ ++ capture->first_buf = 0; ++ return 0; ++ ++fail_no_mem: ++ av_log(avctx, AV_LOG_ERROR, "Rx pkt failed: No memory\n"); ++ ret = AVERROR(ENOMEM); ++ av_packet_unref(avpkt); ++ return ret; + } + + static av_cold int v4l2_encode_init(AVCodecContext *avctx) +@@ -340,6 +673,8 @@ static av_cold int v4l2_encode_init(AVCo + uint32_t v4l2_fmt_output; + int ret; + ++ av_log(avctx, AV_LOG_INFO, " <<< %s: fmt=%d/%d\n", __func__, avctx->pix_fmt, avctx->sw_pix_fmt); ++ + ret = ff_v4l2_m2m_create_context(priv, &s); + if (ret < 0) + return ret; +@@ -347,13 +682,17 @@ static av_cold int v4l2_encode_init(AVCo + capture = &s->capture; + output = &s->output; + ++ s->input_drm = (avctx->pix_fmt == AV_PIX_FMT_DRM_PRIME); ++ + /* common settings output/capture */ + output->height = capture->height = avctx->height; + output->width = capture->width = avctx->width; + + /* output context */ + output->av_codec_id = AV_CODEC_ID_RAWVIDEO; +- output->av_pix_fmt = avctx->pix_fmt; ++ output->av_pix_fmt = !s->input_drm ? avctx->pix_fmt : ++ avctx->sw_pix_fmt != AV_PIX_FMT_NONE ? avctx->sw_pix_fmt : ++ AV_PIX_FMT_YUV420P; + + /* capture context */ + capture->av_codec_id = avctx->codec_id; +@@ -372,7 +711,7 @@ static av_cold int v4l2_encode_init(AVCo + v4l2_fmt_output = output->format.fmt.pix.pixelformat; + + pix_fmt_output = ff_v4l2_format_v4l2_to_avfmt(v4l2_fmt_output, AV_CODEC_ID_RAWVIDEO); +- if (pix_fmt_output != avctx->pix_fmt) { ++ if (!s->input_drm && pix_fmt_output != avctx->pix_fmt) { + const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt_output); + av_log(avctx, AV_LOG_ERROR, "Encoder requires %s pixel format.\n", desc->name); + return AVERROR(EINVAL); +@@ -390,9 +729,10 @@ static av_cold int v4l2_encode_close(AVC + #define FLAGS AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM + + #define V4L_M2M_CAPTURE_OPTS \ +- V4L_M2M_DEFAULT_OPTS,\ ++ { "num_output_buffers", "Number of buffers in the output context",\ ++ OFFSET(num_output_buffers), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, FLAGS },\ + { "num_capture_buffers", "Number of buffers in the capture context", \ +- OFFSET(num_capture_buffers), AV_OPT_TYPE_INT, {.i64 = 4 }, 4, INT_MAX, FLAGS } ++ OFFSET(num_capture_buffers), AV_OPT_TYPE_INT, {.i64 = 8 }, 8, INT_MAX, FLAGS } + + static const AVOption mpeg4_options[] = { + V4L_M2M_CAPTURE_OPTS, +--- /dev/null ++++ b/libavcodec/v4l2_req_decode_q.c +@@ -0,0 +1,84 @@ ++#include ++#include ++#include ++ ++#include "v4l2_req_decode_q.h" ++ ++int decode_q_in_q(const req_decode_ent * const d) ++{ ++ return d->in_q; ++} ++ ++void decode_q_add(req_decode_q * const q, req_decode_ent * const d) ++{ ++ pthread_mutex_lock(&q->q_lock); ++ if (!q->head) { ++ q->head = d; ++ q->tail = d; ++ d->prev = NULL; ++ } ++ else { ++ q->tail->next = d; ++ d->prev = q->tail; ++ q->tail = d; ++ } ++ d->next = NULL; ++ d->in_q = 1; ++ pthread_mutex_unlock(&q->q_lock); ++} ++ ++// Remove entry from Q - if head wake-up anything that was waiting ++void decode_q_remove(req_decode_q * const q, req_decode_ent * const d) ++{ ++ int try_signal = 0; ++ ++ if (!d->in_q) ++ return; ++ ++ pthread_mutex_lock(&q->q_lock); ++ if (d->prev) ++ d->prev->next = d->next; ++ else { ++ try_signal = 1; // Only need to signal if we were head ++ q->head = d->next; ++ } ++ ++ if (d->next) ++ d->next->prev = d->prev; ++ else ++ q->tail = d->prev; ++ ++ // Not strictly needed but makes debug easier ++ d->next = NULL; ++ d->prev = NULL; ++ d->in_q = 0; ++ pthread_mutex_unlock(&q->q_lock); ++ ++ if (try_signal) ++ pthread_cond_broadcast(&q->q_cond); ++} ++ ++void decode_q_wait(req_decode_q * const q, req_decode_ent * const d) ++{ ++ pthread_mutex_lock(&q->q_lock); ++ ++ while (q->head != d) ++ pthread_cond_wait(&q->q_cond, &q->q_lock); ++ ++ pthread_mutex_unlock(&q->q_lock); ++} ++ ++void decode_q_uninit(req_decode_q * const q) ++{ ++ pthread_mutex_destroy(&q->q_lock); ++ pthread_cond_destroy(&q->q_cond); ++} ++ ++void decode_q_init(req_decode_q * const q) ++{ ++ memset(q, 0, sizeof(*q)); ++ pthread_mutex_init(&q->q_lock, NULL); ++ pthread_cond_init(&q->q_cond, NULL); ++} ++ ++ +--- /dev/null ++++ b/libavcodec/v4l2_req_decode_q.h +@@ -0,0 +1,27 @@ ++#ifndef AVCODEC_V4L2_REQ_DECODE_Q_H ++#define AVCODEC_V4L2_REQ_DECODE_Q_H ++ ++#include ++ ++typedef struct req_decode_ent { ++ struct req_decode_ent * next; ++ struct req_decode_ent * prev; ++ int in_q; ++} req_decode_ent; ++ ++typedef struct req_decode_q { ++ pthread_mutex_t q_lock; ++ pthread_cond_t q_cond; ++ req_decode_ent * head; ++ req_decode_ent * tail; ++} req_decode_q; ++ ++int decode_q_in_q(const req_decode_ent * const d); ++void decode_q_add(req_decode_q * const q, req_decode_ent * const d); ++void decode_q_remove(req_decode_q * const q, req_decode_ent * const d); ++void decode_q_wait(req_decode_q * const q, req_decode_ent * const d); ++void decode_q_uninit(req_decode_q * const q); ++void decode_q_init(req_decode_q * const q); ++ ++#endif ++ +--- /dev/null ++++ b/libavcodec/v4l2_req_devscan.c +@@ -0,0 +1,451 @@ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++#include ++#include ++ ++#include "v4l2_req_devscan.h" ++#include "v4l2_req_utils.h" ++ ++struct decdev { ++ enum v4l2_buf_type src_type; ++ uint32_t src_fmt_v4l2; ++ const char * vname; ++ const char * mname; ++}; ++ ++struct devscan { ++ struct decdev env; ++ unsigned int dev_size; ++ unsigned int dev_count; ++ struct decdev *devs; ++}; ++ ++static int video_src_pixfmt_supported(uint32_t fmt) ++{ ++ return 1; ++} ++ ++static void v4l2_setup_format(struct v4l2_format *format, unsigned int type, ++ unsigned int width, unsigned int height, ++ unsigned int pixelformat) ++{ ++ unsigned int sizeimage; ++ ++ memset(format, 0, sizeof(*format)); ++ format->type = type; ++ ++ sizeimage = V4L2_TYPE_IS_OUTPUT(type) ? 4 * 1024 * 1024 : 0; ++ ++ if (V4L2_TYPE_IS_MULTIPLANAR(type)) { ++ format->fmt.pix_mp.width = width; ++ format->fmt.pix_mp.height = height; ++ format->fmt.pix_mp.plane_fmt[0].sizeimage = sizeimage; ++ format->fmt.pix_mp.pixelformat = pixelformat; ++ } else { ++ format->fmt.pix.width = width; ++ format->fmt.pix.height = height; ++ format->fmt.pix.sizeimage = sizeimage; ++ format->fmt.pix.pixelformat = pixelformat; ++ } ++} ++ ++static int v4l2_set_format(int video_fd, unsigned int type, unsigned int pixelformat, ++ unsigned int width, unsigned int height) ++{ ++ struct v4l2_format format; ++ ++ v4l2_setup_format(&format, type, width, height, pixelformat); ++ ++ return ioctl(video_fd, VIDIOC_S_FMT, &format) ? -errno : 0; ++} ++ ++static int v4l2_query_capabilities(int video_fd, unsigned int *capabilities) ++{ ++ struct v4l2_capability capability = { 0 }; ++ int rc; ++ ++ rc = ioctl(video_fd, VIDIOC_QUERYCAP, &capability); ++ if (rc < 0) ++ return -errno; ++ ++ if (capabilities != NULL) { ++ if ((capability.capabilities & V4L2_CAP_DEVICE_CAPS) != 0) ++ *capabilities = capability.device_caps; ++ else ++ *capabilities = capability.capabilities; ++ } ++ ++ return 0; ++} ++ ++static int devscan_add(struct devscan *const scan, ++ enum v4l2_buf_type src_type, ++ uint32_t src_fmt_v4l2, ++ const char * vname, ++ const char * mname) ++{ ++ struct decdev *d; ++ ++ if (scan->dev_size <= scan->dev_count) { ++ unsigned int n = !scan->dev_size ? 4 : scan->dev_size * 2; ++ d = realloc(scan->devs, n * sizeof(*d)); ++ if (!d) ++ return -ENOMEM; ++ scan->devs = d; ++ scan->dev_size = n; ++ } ++ ++ d = scan->devs + scan->dev_count; ++ d->src_type = src_type; ++ d->src_fmt_v4l2 = src_fmt_v4l2; ++ d->vname = strdup(vname); ++ if (!d->vname) ++ return -ENOMEM; ++ d->mname = strdup(mname); ++ if (!d->mname) { ++ free((char *)d->vname); ++ return -ENOMEM; ++ } ++ ++scan->dev_count; ++ return 0; ++} ++ ++void devscan_delete(struct devscan **const pScan) ++{ ++ unsigned int i; ++ struct devscan * const scan = *pScan; ++ ++ if (!scan) ++ return; ++ *pScan = NULL; ++ ++ for (i = 0; i < scan->dev_count; ++i) { ++ free((char*)scan->devs[i].mname); ++ free((char*)scan->devs[i].vname); ++ } ++ free(scan->devs); ++ free(scan); ++} ++ ++#define REQ_BUF_CAPS (\ ++ V4L2_BUF_CAP_SUPPORTS_DMABUF |\ ++ V4L2_BUF_CAP_SUPPORTS_REQUESTS |\ ++ V4L2_BUF_CAP_SUPPORTS_M2M_HOLD_CAPTURE_BUF) ++ ++static void probe_formats(void * const dc, ++ struct devscan *const scan, ++ const int fd, ++ const unsigned int type_v4l2, ++ const char *const mpath, ++ const char *const vpath) ++{ ++ unsigned int i; ++ for (i = 0;; ++i) { ++ struct v4l2_fmtdesc fmtdesc = { ++ .index = i, ++ .type = type_v4l2 ++ }; ++ struct v4l2_requestbuffers rbufs = { ++ .count = 0, ++ .type = type_v4l2, ++ .memory = V4L2_MEMORY_MMAP ++ }; ++ while (ioctl(fd, VIDIOC_ENUM_FMT, &fmtdesc)) { ++ if (errno == EINTR) ++ continue; ++ if (errno != EINVAL) ++ request_err(dc, "Enum[%d] failed for type=%d\n", i, type_v4l2); ++ return; ++ } ++ if (!video_src_pixfmt_supported(fmtdesc.pixelformat)) ++ continue; ++ ++ if (v4l2_set_format(fd, type_v4l2, fmtdesc.pixelformat, 720, 480)) { ++ request_debug(dc, "Set failed for type=%d, pf=%.4s\n", type_v4l2, (char*)&fmtdesc.pixelformat); ++ continue; ++ } ++ ++ while (ioctl(fd, VIDIOC_REQBUFS, &rbufs)) { ++ if (errno != EINTR) { ++ request_debug(dc, "%s: Reqbufs failed\n", vpath); ++ continue; ++ } ++ } ++ ++ if ((rbufs.capabilities & REQ_BUF_CAPS) != REQ_BUF_CAPS) { ++ request_debug(dc, "%s: Buf caps %#x insufficient\n", vpath, rbufs.capabilities); ++ continue; ++ } ++ ++ request_debug(dc, "Adding: %s,%s pix=%#x, type=%d\n", ++ mpath, vpath, fmtdesc.pixelformat, type_v4l2); ++ devscan_add(scan, type_v4l2, fmtdesc.pixelformat, vpath, mpath); ++ } ++} ++ ++ ++static int probe_video_device(void * const dc, ++ struct udev_device *const device, ++ struct devscan *const scan, ++ const char *const mpath) ++{ ++ int ret; ++ unsigned int capabilities = 0; ++ int video_fd = -1; ++ ++ const char *path = udev_device_get_devnode(device); ++ if (!path) { ++ request_err(dc, "%s: get video device devnode failed\n", __func__); ++ ret = -EINVAL; ++ goto fail; ++ } ++ ++ video_fd = open(path, O_RDWR, 0); ++ if (video_fd == -1) { ++ ret = -errno; ++ request_err(dc, "%s: opening %s failed, %s (%d)\n", __func__, path, strerror(errno), errno); ++ goto fail; ++ } ++ ++ ret = v4l2_query_capabilities(video_fd, &capabilities); ++ if (ret < 0) { ++ request_err(dc, "%s: get video capability failed, %s (%d)\n", __func__, strerror(-ret), -ret); ++ goto fail; ++ } ++ ++ request_debug(dc, "%s: path=%s capabilities=%#x\n", __func__, path, capabilities); ++ ++ if (!(capabilities & V4L2_CAP_STREAMING)) { ++ request_debug(dc, "%s: missing required streaming capability\n", __func__); ++ ret = -EINVAL; ++ goto fail; ++ } ++ ++ if (!(capabilities & (V4L2_CAP_VIDEO_M2M_MPLANE | V4L2_CAP_VIDEO_M2M))) { ++ request_debug(dc, "%s: missing required mem2mem capability\n", __func__); ++ ret = -EINVAL; ++ goto fail; ++ } ++ ++ /* Should check capture formats too... */ ++ if ((capabilities & V4L2_CAP_VIDEO_M2M) != 0) ++ probe_formats(dc, scan, video_fd, V4L2_BUF_TYPE_VIDEO_OUTPUT, mpath, path); ++ if ((capabilities & V4L2_CAP_VIDEO_M2M_MPLANE) != 0) ++ probe_formats(dc, scan, video_fd, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, mpath, path); ++ ++ close(video_fd); ++ return 0; ++ ++fail: ++ if (video_fd >= 0) ++ close(video_fd); ++ return ret; ++} ++ ++static int probe_media_device(void * const dc, ++ struct udev_device *const device, ++ struct devscan *const scan) ++{ ++ int ret; ++ int rv; ++ struct media_device_info device_info = { 0 }; ++ struct media_v2_topology topology = { 0 }; ++ struct media_v2_interface *interfaces = NULL; ++ struct udev *udev = udev_device_get_udev(device); ++ struct udev_device *video_device; ++ dev_t devnum; ++ int media_fd = -1; ++ ++ const char *path = udev_device_get_devnode(device); ++ if (!path) { ++ request_err(dc, "%s: get media device devnode failed\n", __func__); ++ ret = -EINVAL; ++ goto fail; ++ } ++ ++ media_fd = open(path, O_RDWR, 0); ++ if (media_fd < 0) { ++ ret = -errno; ++ request_err(dc, "%s: opening %s failed, %s (%d)\n", __func__, path, strerror(-ret), -ret); ++ goto fail; ++ } ++ ++ rv = ioctl(media_fd, MEDIA_IOC_DEVICE_INFO, &device_info); ++ if (rv < 0) { ++ ret = -errno; ++ request_err(dc, "%s: get media device info failed, %s (%d)\n", __func__, strerror(-ret), -ret); ++ goto fail; ++ } ++ ++ rv = ioctl(media_fd, MEDIA_IOC_G_TOPOLOGY, &topology); ++ if (rv < 0) { ++ ret = -errno; ++ request_err(dc, "%s: get media topology failed, %s (%d)\n", __func__, strerror(-ret), -ret); ++ goto fail; ++ } ++ ++ if (topology.num_interfaces <= 0) { ++ request_err(dc, "%s: media device has no interfaces\n", __func__); ++ ret = -EINVAL; ++ goto fail; ++ } ++ ++ interfaces = calloc(topology.num_interfaces, sizeof(*interfaces)); ++ if (!interfaces) { ++ request_err(dc, "%s: allocating media interface struct failed\n", __func__); ++ ret = -ENOMEM; ++ goto fail; ++ } ++ ++ topology.ptr_interfaces = (__u64)(uintptr_t)interfaces; ++ rv = ioctl(media_fd, MEDIA_IOC_G_TOPOLOGY, &topology); ++ if (rv < 0) { ++ ret = -errno; ++ request_err(dc, "%s: get media topology failed, %s (%d)\n", __func__, strerror(-ret), -ret); ++ goto fail; ++ } ++ ++ for (int i = 0; i < topology.num_interfaces; i++) { ++ if (interfaces[i].intf_type != MEDIA_INTF_T_V4L_VIDEO) ++ continue; ++ ++ devnum = makedev(interfaces[i].devnode.major, interfaces[i].devnode.minor); ++ video_device = udev_device_new_from_devnum(udev, 'c', devnum); ++ if (!video_device) { ++ ret = -errno; ++ request_err(dc, "%s: video_device[%d]=%p\n", __func__, i, video_device); ++ continue; ++ } ++ ++ ret = probe_video_device(dc, video_device, scan, path); ++ udev_device_unref(video_device); ++ ++ if (ret != 0) ++ goto fail; ++ } ++ ++fail: ++ free(interfaces); ++ if (media_fd != -1) ++ close(media_fd); ++ return ret; ++} ++ ++const char *decdev_media_path(const struct decdev *const dev) ++{ ++ return !dev ? NULL : dev->mname; ++} ++ ++const char *decdev_video_path(const struct decdev *const dev) ++{ ++ return !dev ? NULL : dev->vname; ++} ++ ++enum v4l2_buf_type decdev_src_type(const struct decdev *const dev) ++{ ++ return !dev ? 0 : dev->src_type; ++} ++ ++uint32_t decdev_src_pixelformat(const struct decdev *const dev) ++{ ++ return !dev ? 0 : dev->src_fmt_v4l2; ++} ++ ++ ++const struct decdev *devscan_find(struct devscan *const scan, ++ const uint32_t src_fmt_v4l2) ++{ ++ unsigned int i; ++ ++ if (scan->env.mname && scan->env.vname) ++ return &scan->env; ++ ++ if (!src_fmt_v4l2) ++ return scan->dev_count ? scan->devs + 0 : NULL; ++ ++ for (i = 0; i != scan->dev_count; ++i) { ++ if (scan->devs[i].src_fmt_v4l2 == src_fmt_v4l2) ++ return scan->devs + i; ++ } ++ return NULL; ++} ++ ++int devscan_build(void * const dc, struct devscan **pscan) ++{ ++ int ret; ++ struct udev *udev; ++ struct udev_enumerate *enumerate; ++ struct udev_list_entry *devices; ++ struct udev_list_entry *entry; ++ struct udev_device *device; ++ struct devscan * scan; ++ ++ *pscan = NULL; ++ ++ scan = calloc(1, sizeof(*scan)); ++ if (!scan) { ++ ret = -ENOMEM; ++ goto fail; ++ } ++ ++ scan->env.mname = getenv("LIBVA_V4L2_REQUEST_MEDIA_PATH"); ++ scan->env.vname = getenv("LIBVA_V4L2_REQUEST_VIDEO_PATH"); ++ if (scan->env.mname && scan->env.vname) { ++ request_info(dc, "Media/video device env overrides found: %s,%s\n", ++ scan->env.mname, scan->env.vname); ++ *pscan = scan; ++ return 0; ++ } ++ ++ udev = udev_new(); ++ if (!udev) { ++ request_err(dc, "%s: allocating udev context failed\n", __func__); ++ ret = -ENOMEM; ++ goto fail; ++ } ++ ++ enumerate = udev_enumerate_new(udev); ++ if (!enumerate) { ++ request_err(dc, "%s: allocating udev enumerator failed\n", __func__); ++ ret = -ENOMEM; ++ goto fail; ++ } ++ ++ udev_enumerate_add_match_subsystem(enumerate, "media"); ++ udev_enumerate_scan_devices(enumerate); ++ ++ devices = udev_enumerate_get_list_entry(enumerate); ++ udev_list_entry_foreach(entry, devices) { ++ const char *path = udev_list_entry_get_name(entry); ++ if (!path) ++ continue; ++ ++ device = udev_device_new_from_syspath(udev, path); ++ if (!device) ++ continue; ++ ++ probe_media_device(dc, device, scan); ++ udev_device_unref(device); ++ } ++ ++ udev_enumerate_unref(enumerate); ++ udev_unref(udev); ++ ++ *pscan = scan; ++ return 0; ++ ++fail: ++ if (udev) ++ udev_unref(udev); ++ devscan_delete(&scan); ++ return ret; ++} ++ +--- /dev/null ++++ b/libavcodec/v4l2_req_devscan.h +@@ -0,0 +1,23 @@ ++#ifndef _DEVSCAN_H_ ++#define _DEVSCAN_H_ ++ ++#include ++ ++struct devscan; ++struct decdev; ++enum v4l2_buf_type; ++ ++/* These return pointers to data in the devscan structure and so are vaild ++ * for the lifetime of that ++ */ ++const char *decdev_media_path(const struct decdev *const dev); ++const char *decdev_video_path(const struct decdev *const dev); ++enum v4l2_buf_type decdev_src_type(const struct decdev *const dev); ++uint32_t decdev_src_pixelformat(const struct decdev *const dev); ++ ++const struct decdev *devscan_find(struct devscan *const scan, const uint32_t src_fmt_v4l2); ++ ++int devscan_build(void * const dc, struct devscan **pscan); ++void devscan_delete(struct devscan **const pScan); ++ ++#endif +--- /dev/null ++++ b/libavcodec/v4l2_req_dmabufs.c +@@ -0,0 +1,409 @@ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "v4l2_req_dmabufs.h" ++#include "v4l2_req_utils.h" ++ ++#define TRACE_ALLOC 0 ++ ++#ifndef __O_CLOEXEC ++#define __O_CLOEXEC 0 ++#endif ++ ++struct dmabufs_ctl; ++struct dmabuf_h; ++ ++struct dmabuf_fns { ++ int (*buf_alloc)(struct dmabufs_ctl * dbsc, struct dmabuf_h * dh, size_t size); ++ void (*buf_free)(struct dmabuf_h * dh); ++ int (*ctl_new)(struct dmabufs_ctl * dbsc); ++ void (*ctl_free)(struct dmabufs_ctl * dbsc); ++}; ++ ++struct dmabufs_ctl { ++ atomic_int ref_count; ++ int fd; ++ size_t page_size; ++ void * v; ++ const struct dmabuf_fns * fns; ++}; ++ ++struct dmabuf_h { ++ int fd; ++ size_t size; ++ size_t len; ++ void * mapptr; ++ void * v; ++ const struct dmabuf_fns * fns; ++}; ++ ++#if TRACE_ALLOC ++static unsigned int total_bufs = 0; ++static size_t total_size = 0; ++#endif ++ ++struct dmabuf_h * dmabuf_import_mmap(void * mapptr, size_t size) ++{ ++ struct dmabuf_h *dh; ++ ++ if (mapptr == MAP_FAILED) ++ return NULL; ++ ++ dh = malloc(sizeof(*dh)); ++ if (!dh) ++ return NULL; ++ ++ *dh = (struct dmabuf_h) { ++ .fd = -1, ++ .size = size, ++ .mapptr = mapptr ++ }; ++ ++ return dh; ++} ++ ++struct dmabuf_h * dmabuf_import(int fd, size_t size) ++{ ++ struct dmabuf_h *dh; ++ ++ fd = dup(fd); ++ if (fd < 0 || size == 0) ++ return NULL; ++ ++ dh = malloc(sizeof(*dh)); ++ if (!dh) { ++ close(fd); ++ return NULL; ++ } ++ ++ *dh = (struct dmabuf_h) { ++ .fd = fd, ++ .size = size, ++ .mapptr = MAP_FAILED ++ }; ++ ++#if TRACE_ALLOC ++ ++total_bufs; ++ total_size += dh->size; ++ request_log("%s: Import: %zd, total=%zd, bufs=%d\n", __func__, dh->size, total_size, total_bufs); ++#endif ++ ++ return dh; ++} ++ ++struct dmabuf_h * dmabuf_realloc(struct dmabufs_ctl * dbsc, struct dmabuf_h * old, size_t size) ++{ ++ struct dmabuf_h * dh; ++ if (old != NULL) { ++ if (old->size >= size) { ++ return old; ++ } ++ dmabuf_free(old); ++ } ++ ++ if (size == 0 || ++ (dh = malloc(sizeof(*dh))) == NULL) ++ return NULL; ++ ++ *dh = (struct dmabuf_h){ ++ .fd = -1, ++ .mapptr = MAP_FAILED, ++ .fns = dbsc->fns ++ }; ++ ++ if (dh->fns->buf_alloc(dbsc, dh, size) != 0) ++ goto fail; ++ ++ ++#if TRACE_ALLOC ++ ++total_bufs; ++ total_size += dh->size; ++ request_log("%s: Alloc: %zd, total=%zd, bufs=%d\n", __func__, dh->size, total_size, total_bufs); ++#endif ++ ++ return dh; ++ ++fail: ++ free(dh); ++ return NULL; ++} ++ ++int dmabuf_sync(struct dmabuf_h * const dh, unsigned int flags) ++{ ++ struct dma_buf_sync sync = { ++ .flags = flags ++ }; ++ if (dh->fd == -1) ++ return 0; ++ while (ioctl(dh->fd, DMA_BUF_IOCTL_SYNC, &sync) == -1) { ++ const int err = errno; ++ if (errno == EINTR) ++ continue; ++ request_log("%s: ioctl failed: flags=%#x\n", __func__, flags); ++ return -err; ++ } ++ return 0; ++} ++ ++int dmabuf_write_start(struct dmabuf_h * const dh) ++{ ++ return dmabuf_sync(dh, DMA_BUF_SYNC_START | DMA_BUF_SYNC_WRITE); ++} ++ ++int dmabuf_write_end(struct dmabuf_h * const dh) ++{ ++ return dmabuf_sync(dh, DMA_BUF_SYNC_END | DMA_BUF_SYNC_WRITE); ++} ++ ++int dmabuf_read_start(struct dmabuf_h * const dh) ++{ ++ if (!dmabuf_map(dh)) ++ return -1; ++ return dmabuf_sync(dh, DMA_BUF_SYNC_START | DMA_BUF_SYNC_READ); ++} ++ ++int dmabuf_read_end(struct dmabuf_h * const dh) ++{ ++ return dmabuf_sync(dh, DMA_BUF_SYNC_END | DMA_BUF_SYNC_READ); ++} ++ ++ ++void * dmabuf_map(struct dmabuf_h * const dh) ++{ ++ if (!dh) ++ return NULL; ++ if (dh->mapptr != MAP_FAILED) ++ return dh->mapptr; ++ dh->mapptr = mmap(NULL, dh->size, ++ PROT_READ | PROT_WRITE, ++ MAP_SHARED | MAP_POPULATE, ++ dh->fd, 0); ++ if (dh->mapptr == MAP_FAILED) { ++ request_log("%s: Map failed\n", __func__); ++ return NULL; ++ } ++ return dh->mapptr; ++} ++ ++int dmabuf_fd(const struct dmabuf_h * const dh) ++{ ++ if (!dh) ++ return -1; ++ return dh->fd; ++} ++ ++size_t dmabuf_size(const struct dmabuf_h * const dh) ++{ ++ if (!dh) ++ return 0; ++ return dh->size; ++} ++ ++size_t dmabuf_len(const struct dmabuf_h * const dh) ++{ ++ if (!dh) ++ return 0; ++ return dh->len; ++} ++ ++void dmabuf_len_set(struct dmabuf_h * const dh, const size_t len) ++{ ++ dh->len = len; ++} ++ ++void dmabuf_free(struct dmabuf_h * dh) ++{ ++ if (!dh) ++ return; ++ ++#if TRACE_ALLOC ++ --total_bufs; ++ total_size -= dh->size; ++ request_log("%s: Free: %zd, total=%zd, bufs=%d\n", __func__, dh->size, total_size, total_bufs); ++#endif ++ ++ if (dh->fns != NULL && dh->fns->buf_free) ++ dh->fns->buf_free(dh); ++ ++ if (dh->mapptr != MAP_FAILED && dh->mapptr != NULL) ++ munmap(dh->mapptr, dh->size); ++ if (dh->fd != -1) ++ while (close(dh->fd) == -1 && errno == EINTR) ++ /* loop */; ++ free(dh); ++} ++ ++static struct dmabufs_ctl * dmabufs_ctl_new2(const struct dmabuf_fns * const fns) ++{ ++ struct dmabufs_ctl * dbsc = calloc(1, sizeof(*dbsc)); ++ ++ if (!dbsc) ++ return NULL; ++ ++ dbsc->fd = -1; ++ dbsc->fns = fns; ++ dbsc->page_size = (size_t)sysconf(_SC_PAGE_SIZE); ++ ++ if (fns->ctl_new(dbsc) != 0) ++ goto fail; ++ ++ return dbsc; ++ ++fail: ++ free(dbsc); ++ return NULL; ++} ++ ++static void dmabufs_ctl_free(struct dmabufs_ctl * const dbsc) ++{ ++ request_debug(NULL, "Free dmabuf ctl\n"); ++ ++ dbsc->fns->ctl_free(dbsc); ++ ++ free(dbsc); ++} ++ ++void dmabufs_ctl_unref(struct dmabufs_ctl ** const pDbsc) ++{ ++ struct dmabufs_ctl * const dbsc = *pDbsc; ++ ++ if (!dbsc) ++ return; ++ *pDbsc = NULL; ++ ++ if (atomic_fetch_sub(&dbsc->ref_count, 1) != 0) ++ return; ++ ++ dmabufs_ctl_free(dbsc); ++} ++ ++struct dmabufs_ctl * dmabufs_ctl_ref(struct dmabufs_ctl * const dbsc) ++{ ++ atomic_fetch_add(&dbsc->ref_count, 1); ++ return dbsc; ++} ++ ++//----------------------------------------------------------------------------- ++// ++// Alloc dmabuf via CMA ++ ++static int ctl_cma_new2(struct dmabufs_ctl * dbsc, const char * const * names) ++{ ++ for (; *names != NULL; ++names) ++ { ++ while ((dbsc->fd = open(*names, O_RDWR | __O_CLOEXEC)) == -1 && ++ errno == EINTR) ++ /* Loop */; ++ if (dbsc->fd != -1) ++ { ++ request_debug(NULL, "%s: Using dma_heap device %s\n", __func__, *names); ++ return 0; ++ } ++ request_debug(NULL, "%s: Not using dma_heap device %s: %s\n", __func__, *names, strerror(errno)); ++ } ++ request_log("Unable to open any dma_heap device\n"); ++ return -1; ++} ++ ++static int ctl_cma_new(struct dmabufs_ctl * dbsc) ++{ ++ static const char * const names[] = { ++ "/dev/dma_heap/linux,cma", ++ "/dev/dma_heap/reserved", ++ NULL ++ }; ++ ++ return ctl_cma_new2(dbsc, names); ++} ++ ++static void ctl_cma_free(struct dmabufs_ctl * dbsc) ++{ ++ if (dbsc->fd != -1) ++ while (close(dbsc->fd) == -1 && errno == EINTR) ++ /* loop */; ++} ++ ++static int buf_cma_alloc(struct dmabufs_ctl * const dbsc, struct dmabuf_h * dh, size_t size) ++{ ++ struct dma_heap_allocation_data data = { ++ .len = (size + dbsc->page_size - 1) & ~(dbsc->page_size - 1), ++ .fd = 0, ++ .fd_flags = O_RDWR, ++ .heap_flags = 0 ++ }; ++ ++ while (ioctl(dbsc->fd, DMA_HEAP_IOCTL_ALLOC, &data)) { ++ int err = errno; ++ request_log("Failed to alloc %" PRIu64 " from dma-heap(fd=%d): %d (%s)\n", ++ (uint64_t)data.len, ++ dbsc->fd, ++ err, ++ strerror(err)); ++ if (err == EINTR) ++ continue; ++ return -err; ++ } ++ ++ dh->fd = data.fd; ++ dh->size = (size_t)data.len; ++ ++// fprintf(stderr, "%s: size=%#zx, ftell=%#zx\n", __func__, ++// dh->size, (size_t)lseek(dh->fd, 0, SEEK_END)); ++ ++ return 0; ++} ++ ++static void buf_cma_free(struct dmabuf_h * dh) ++{ ++ // Nothing needed ++} ++ ++static const struct dmabuf_fns dmabuf_cma_fns = { ++ .buf_alloc = buf_cma_alloc, ++ .buf_free = buf_cma_free, ++ .ctl_new = ctl_cma_new, ++ .ctl_free = ctl_cma_free, ++}; ++ ++struct dmabufs_ctl * dmabufs_ctl_new(void) ++{ ++ request_debug(NULL, "Dmabufs using CMA\n"); ++ return dmabufs_ctl_new2(&dmabuf_cma_fns); ++} ++ ++static int ctl_cma_new_vidbuf_cached(struct dmabufs_ctl * dbsc) ++{ ++ static const char * const names[] = { ++ "/dev/dma_heap/vidbuf_cached", ++ "/dev/dma_heap/linux,cma", ++ "/dev/dma_heap/reserved", ++ NULL ++ }; ++ ++ return ctl_cma_new2(dbsc, names); ++} ++ ++static const struct dmabuf_fns dmabuf_vidbuf_cached_fns = { ++ .buf_alloc = buf_cma_alloc, ++ .buf_free = buf_cma_free, ++ .ctl_new = ctl_cma_new_vidbuf_cached, ++ .ctl_free = ctl_cma_free, ++}; ++ ++struct dmabufs_ctl * dmabufs_ctl_new_vidbuf_cached(void) ++{ ++ request_debug(NULL, "Dmabufs using Vidbuf\n"); ++ return dmabufs_ctl_new2(&dmabuf_vidbuf_cached_fns); ++} ++ +--- /dev/null ++++ b/libavcodec/v4l2_req_dmabufs.h +@@ -0,0 +1,45 @@ ++#ifndef DMABUFS_H ++#define DMABUFS_H ++ ++#include ++ ++struct dmabufs_ctl; ++struct dmabuf_h; ++ ++struct dmabufs_ctl * dmabufs_ctl_new(void); ++struct dmabufs_ctl * dmabufs_ctl_new_vidbuf_cached(void); ++void dmabufs_ctl_unref(struct dmabufs_ctl ** const pdbsc); ++struct dmabufs_ctl * dmabufs_ctl_ref(struct dmabufs_ctl * const dbsc); ++ ++// Need not preserve old contents ++// On NULL return old buffer is freed ++struct dmabuf_h * dmabuf_realloc(struct dmabufs_ctl * dbsc, struct dmabuf_h *, size_t size); ++ ++static inline struct dmabuf_h * dmabuf_alloc(struct dmabufs_ctl * dbsc, size_t size) { ++ return dmabuf_realloc(dbsc, NULL, size); ++} ++/* Create from existing fd - dups(fd) */ ++struct dmabuf_h * dmabuf_import(int fd, size_t size); ++/* Import an MMAP - return NULL if mapptr = MAP_FAIL */ ++struct dmabuf_h * dmabuf_import_mmap(void * mapptr, size_t size); ++ ++void * dmabuf_map(struct dmabuf_h * const dh); ++ ++/* flags from linux/dmabuf.h DMA_BUF_SYNC_xxx */ ++int dmabuf_sync(struct dmabuf_h * const dh, unsigned int flags); ++ ++int dmabuf_write_start(struct dmabuf_h * const dh); ++int dmabuf_write_end(struct dmabuf_h * const dh); ++int dmabuf_read_start(struct dmabuf_h * const dh); ++int dmabuf_read_end(struct dmabuf_h * const dh); ++ ++int dmabuf_fd(const struct dmabuf_h * const dh); ++/* Allocated size */ ++size_t dmabuf_size(const struct dmabuf_h * const dh); ++/* Bytes in use */ ++size_t dmabuf_len(const struct dmabuf_h * const dh); ++/* Set bytes in use */ ++void dmabuf_len_set(struct dmabuf_h * const dh, const size_t len); ++void dmabuf_free(struct dmabuf_h * dh); ++ ++#endif +--- /dev/null ++++ b/libavcodec/v4l2_req_hevc_v1.c +@@ -0,0 +1,3 @@ ++#define HEVC_CTRLS_VERSION 1 ++#include "v4l2_req_hevc_vx.c" ++ +--- /dev/null ++++ b/libavcodec/v4l2_req_hevc_v2.c +@@ -0,0 +1,3 @@ ++#define HEVC_CTRLS_VERSION 2 ++#include "v4l2_req_hevc_vx.c" ++ +--- /dev/null ++++ b/libavcodec/v4l2_req_hevc_v3.c +@@ -0,0 +1,3 @@ ++#define HEVC_CTRLS_VERSION 3 ++#include "v4l2_req_hevc_vx.c" ++ +--- /dev/null ++++ b/libavcodec/v4l2_req_hevc_v4.c +@@ -0,0 +1,3 @@ ++#define HEVC_CTRLS_VERSION 4 ++#include "v4l2_req_hevc_vx.c" ++ +--- /dev/null ++++ b/libavcodec/v4l2_req_hevc_vx.c +@@ -0,0 +1,1362 @@ ++// File included by v4l2_req_hevc_v* - not compiled on its own ++ ++#include "decode.h" ++#include "hevcdec.h" ++#include "hwconfig.h" ++#include "internal.h" ++#include "thread.h" ++ ++#if HEVC_CTRLS_VERSION == 1 ++#include "hevc-ctrls-v1.h" ++ ++// Fixup renamed entries ++#define V4L2_HEVC_PPS_FLAG_DEPENDENT_SLICE_SEGMENT_ENABLED V4L2_HEVC_PPS_FLAG_DEPENDENT_SLICE_SEGMENT ++ ++#elif HEVC_CTRLS_VERSION == 2 ++#include "hevc-ctrls-v2.h" ++#elif HEVC_CTRLS_VERSION == 3 ++#include "hevc-ctrls-v3.h" ++#elif HEVC_CTRLS_VERSION == 4 ++#include ++#if !defined(V4L2_CID_STATELESS_HEVC_SPS) ++#include "hevc-ctrls-v4.h" ++#endif ++#else ++#error Unknown HEVC_CTRLS_VERSION ++#endif ++ ++#ifndef V4L2_CID_STATELESS_HEVC_SPS ++#define V4L2_CID_STATELESS_HEVC_SPS V4L2_CID_MPEG_VIDEO_HEVC_SPS ++#define V4L2_CID_STATELESS_HEVC_PPS V4L2_CID_MPEG_VIDEO_HEVC_PPS ++#define V4L2_CID_STATELESS_HEVC_SLICE_PARAMS V4L2_CID_MPEG_VIDEO_HEVC_SLICE_PARAMS ++#define V4L2_CID_STATELESS_HEVC_SCALING_MATRIX V4L2_CID_MPEG_VIDEO_HEVC_SCALING_MATRIX ++#define V4L2_CID_STATELESS_HEVC_DECODE_PARAMS V4L2_CID_MPEG_VIDEO_HEVC_DECODE_PARAMS ++#define V4L2_CID_STATELESS_HEVC_DECODE_MODE V4L2_CID_MPEG_VIDEO_HEVC_DECODE_MODE ++#define V4L2_CID_STATELESS_HEVC_START_CODE V4L2_CID_MPEG_VIDEO_HEVC_START_CODE ++ ++#define V4L2_STATELESS_HEVC_DECODE_MODE_SLICE_BASED V4L2_MPEG_VIDEO_HEVC_DECODE_MODE_SLICE_BASED ++#define V4L2_STATELESS_HEVC_DECODE_MODE_FRAME_BASED V4L2_MPEG_VIDEO_HEVC_DECODE_MODE_FRAME_BASED ++#define V4L2_STATELESS_HEVC_START_CODE_NONE V4L2_MPEG_VIDEO_HEVC_START_CODE_NONE ++#define V4L2_STATELESS_HEVC_START_CODE_ANNEX_B V4L2_MPEG_VIDEO_HEVC_START_CODE_ANNEX_B ++#endif ++ ++#include "v4l2_request_hevc.h" ++ ++#include "libavutil/hwcontext_drm.h" ++ ++#include ++#include ++ ++#include "v4l2_req_devscan.h" ++#include "v4l2_req_dmabufs.h" ++#include "v4l2_req_pollqueue.h" ++#include "v4l2_req_media.h" ++#include "v4l2_req_utils.h" ++ ++// Attached to buf[0] in frame ++// Pooled in hwcontext so generally create once - 1/frame ++typedef struct V4L2MediaReqDescriptor { ++ AVDRMFrameDescriptor drm; ++ ++ // Media ++ uint64_t timestamp; ++ struct qent_dst * qe_dst; ++ ++ // Decode only - should be NULL by the time we emit the frame ++ struct req_decode_ent decode_ent; ++ ++ struct media_request *req; ++ struct qent_src *qe_src; ++ ++#if HEVC_CTRLS_VERSION >= 2 ++ struct v4l2_ctrl_hevc_decode_params dec; ++#endif ++ ++ size_t num_slices; ++ size_t alloced_slices; ++ struct v4l2_ctrl_hevc_slice_params * slice_params; ++ struct slice_info * slices; ++ ++ size_t num_offsets; ++ size_t alloced_offsets; ++ uint32_t *offsets; ++ ++} V4L2MediaReqDescriptor; ++ ++struct slice_info { ++ const uint8_t * ptr; ++ size_t len; // bytes ++ size_t n_offsets; ++}; ++ ++// Handy container for accumulating controls before setting ++struct req_controls { ++ int has_scaling; ++ struct timeval tv; ++ struct v4l2_ctrl_hevc_sps sps; ++ struct v4l2_ctrl_hevc_pps pps; ++ struct v4l2_ctrl_hevc_scaling_matrix scaling_matrix; ++}; ++ ++//static uint8_t nalu_slice_start_code[] = { 0x00, 0x00, 0x01 }; ++ ++ ++// Get an FFmpeg format from the v4l2 format ++static enum AVPixelFormat pixel_format_from_format(const struct v4l2_format *const format) ++{ ++ switch (V4L2_TYPE_IS_MULTIPLANAR(format->type) ? ++ format->fmt.pix_mp.pixelformat : format->fmt.pix.pixelformat) { ++ case V4L2_PIX_FMT_YUV420: ++ return AV_PIX_FMT_YUV420P; ++ case V4L2_PIX_FMT_NV12: ++ return AV_PIX_FMT_NV12; ++#if CONFIG_SAND ++ case V4L2_PIX_FMT_NV12_COL128: ++ return AV_PIX_FMT_RPI4_8; ++ case V4L2_PIX_FMT_NV12_10_COL128: ++ return AV_PIX_FMT_RPI4_10; ++#endif ++ default: ++ break; ++ } ++ return AV_PIX_FMT_NONE; ++} ++ ++static inline uint64_t frame_capture_dpb(const AVFrame * const frame) ++{ ++ const V4L2MediaReqDescriptor *const rd = (V4L2MediaReqDescriptor *)frame->data[0]; ++ return rd->timestamp; ++} ++ ++static inline void frame_set_capture_dpb(AVFrame * const frame, const uint64_t dpb_stamp) ++{ ++ V4L2MediaReqDescriptor *const rd = (V4L2MediaReqDescriptor *)frame->data[0]; ++ rd->timestamp = dpb_stamp; ++} ++ ++static void fill_pred_table(const HEVCContext *h, struct v4l2_hevc_pred_weight_table *table) ++{ ++ int32_t luma_weight_denom, chroma_weight_denom; ++ const SliceHeader *sh = &h->sh; ++ ++ if (sh->slice_type == HEVC_SLICE_I || ++ (sh->slice_type == HEVC_SLICE_P && !h->ps.pps->weighted_pred_flag) || ++ (sh->slice_type == HEVC_SLICE_B && !h->ps.pps->weighted_bipred_flag)) ++ return; ++ ++ table->luma_log2_weight_denom = sh->luma_log2_weight_denom; ++ ++ if (h->ps.sps->chroma_format_idc) ++ table->delta_chroma_log2_weight_denom = sh->chroma_log2_weight_denom - sh->luma_log2_weight_denom; ++ ++ luma_weight_denom = (1 << sh->luma_log2_weight_denom); ++ chroma_weight_denom = (1 << sh->chroma_log2_weight_denom); ++ ++ for (int i = 0; i < 15 && i < sh->nb_refs[L0]; i++) { ++ table->delta_luma_weight_l0[i] = sh->luma_weight_l0[i] - luma_weight_denom; ++ table->luma_offset_l0[i] = sh->luma_offset_l0[i]; ++ table->delta_chroma_weight_l0[i][0] = sh->chroma_weight_l0[i][0] - chroma_weight_denom; ++ table->delta_chroma_weight_l0[i][1] = sh->chroma_weight_l0[i][1] - chroma_weight_denom; ++ table->chroma_offset_l0[i][0] = sh->chroma_offset_l0[i][0]; ++ table->chroma_offset_l0[i][1] = sh->chroma_offset_l0[i][1]; ++ } ++ ++ if (sh->slice_type != HEVC_SLICE_B) ++ return; ++ ++ for (int i = 0; i < 15 && i < sh->nb_refs[L1]; i++) { ++ table->delta_luma_weight_l1[i] = sh->luma_weight_l1[i] - luma_weight_denom; ++ table->luma_offset_l1[i] = sh->luma_offset_l1[i]; ++ table->delta_chroma_weight_l1[i][0] = sh->chroma_weight_l1[i][0] - chroma_weight_denom; ++ table->delta_chroma_weight_l1[i][1] = sh->chroma_weight_l1[i][1] - chroma_weight_denom; ++ table->chroma_offset_l1[i][0] = sh->chroma_offset_l1[i][0]; ++ table->chroma_offset_l1[i][1] = sh->chroma_offset_l1[i][1]; ++ } ++} ++ ++#if HEVC_CTRLS_VERSION <= 2 ++static int find_frame_rps_type(const HEVCContext *h, uint64_t timestamp) ++{ ++ const HEVCFrame *frame; ++ int i; ++ ++ for (i = 0; i < h->rps[ST_CURR_BEF].nb_refs; i++) { ++ frame = h->rps[ST_CURR_BEF].ref[i]; ++ if (frame && timestamp == frame_capture_dpb(frame->frame)) ++ return V4L2_HEVC_DPB_ENTRY_RPS_ST_CURR_BEFORE; ++ } ++ ++ for (i = 0; i < h->rps[ST_CURR_AFT].nb_refs; i++) { ++ frame = h->rps[ST_CURR_AFT].ref[i]; ++ if (frame && timestamp == frame_capture_dpb(frame->frame)) ++ return V4L2_HEVC_DPB_ENTRY_RPS_ST_CURR_AFTER; ++ } ++ ++ for (i = 0; i < h->rps[LT_CURR].nb_refs; i++) { ++ frame = h->rps[LT_CURR].ref[i]; ++ if (frame && timestamp == frame_capture_dpb(frame->frame)) ++ return V4L2_HEVC_DPB_ENTRY_RPS_LT_CURR; ++ } ++ ++ return 0; ++} ++#endif ++ ++static unsigned int ++get_ref_pic_index(const HEVCContext *h, const HEVCFrame *frame, ++ const struct v4l2_hevc_dpb_entry * const entries, ++ const unsigned int num_entries) ++{ ++ uint64_t timestamp; ++ ++ if (!frame) ++ return 0; ++ ++ timestamp = frame_capture_dpb(frame->frame); ++ ++ for (unsigned int i = 0; i < num_entries; i++) { ++ if (entries[i].timestamp == timestamp) ++ return i; ++ } ++ ++ return 0; ++} ++ ++static const uint8_t * ptr_from_index(const uint8_t * b, unsigned int idx) ++{ ++ unsigned int z = 0; ++ while (idx--) { ++ if (*b++ == 0) { ++ ++z; ++ if (z >= 2 && *b == 3) { ++ ++b; ++ z = 0; ++ } ++ } ++ else { ++ z = 0; ++ } ++ } ++ return b; ++} ++ ++static int slice_add(V4L2MediaReqDescriptor * const rd) ++{ ++ if (rd->num_slices >= rd->alloced_slices) { ++ struct v4l2_ctrl_hevc_slice_params * p2; ++ struct slice_info * s2; ++ size_t n2 = rd->alloced_slices == 0 ? 8 : rd->alloced_slices * 2; ++ ++ p2 = av_realloc_array(rd->slice_params, n2, sizeof(*p2)); ++ if (p2 == NULL) ++ return AVERROR(ENOMEM); ++ rd->slice_params = p2; ++ ++ s2 = av_realloc_array(rd->slices, n2, sizeof(*s2)); ++ if (s2 == NULL) ++ return AVERROR(ENOMEM); ++ rd->slices = s2; ++ ++ rd->alloced_slices = n2; ++ } ++ ++rd->num_slices; ++ return 0; ++} ++ ++static int offsets_add(V4L2MediaReqDescriptor *const rd, const size_t n, const unsigned * const offsets) ++{ ++ if (rd->num_offsets + n > rd->alloced_offsets) { ++ size_t n2 = rd->alloced_slices == 0 ? 128 : rd->alloced_slices * 2; ++ void * p2; ++ while (rd->num_offsets + n > n2) ++ n2 *= 2; ++ if ((p2 = av_realloc_array(rd->offsets, n2, sizeof(*rd->offsets))) == NULL) ++ return AVERROR(ENOMEM); ++ rd->offsets = p2; ++ rd->alloced_offsets = n2; ++ } ++ for (size_t i = 0; i != n; ++i) ++ rd->offsets[rd->num_offsets++] = offsets[i] - 1; ++ return 0; ++} ++ ++static unsigned int ++fill_dpb_entries(const HEVCContext * const h, struct v4l2_hevc_dpb_entry * const entries) ++{ ++ unsigned int i; ++ unsigned int n = 0; ++ const HEVCFrame * const pic = h->ref; ++ ++ for (i = 0; i < FF_ARRAY_ELEMS(h->DPB); i++) { ++ const HEVCFrame * const frame = &h->DPB[i]; ++ if (frame != pic && (frame->flags & (HEVC_FRAME_FLAG_LONG_REF | HEVC_FRAME_FLAG_SHORT_REF))) { ++ struct v4l2_hevc_dpb_entry * const entry = entries + n++; ++ ++ entry->timestamp = frame_capture_dpb(frame->frame); ++#if HEVC_CTRLS_VERSION <= 2 ++ entry->rps = find_frame_rps_type(h, entry->timestamp); ++#else ++ entry->flags = (frame->flags & HEVC_FRAME_FLAG_LONG_REF) == 0 ? 0 : ++ V4L2_HEVC_DPB_ENTRY_LONG_TERM_REFERENCE; ++#endif ++ entry->field_pic = frame->frame->interlaced_frame; ++ ++#if HEVC_CTRLS_VERSION <= 3 ++ /* TODO: Interleaved: Get the POC for each field. */ ++ entry->pic_order_cnt[0] = frame->poc; ++ entry->pic_order_cnt[1] = frame->poc; ++#else ++ entry->pic_order_cnt_val = frame->poc; ++#endif ++ } ++ } ++ return n; ++} ++ ++static void fill_slice_params(const HEVCContext * const h, ++#if HEVC_CTRLS_VERSION >= 2 ++ const struct v4l2_ctrl_hevc_decode_params * const dec, ++#endif ++ struct v4l2_ctrl_hevc_slice_params *slice_params, ++ uint32_t bit_size, uint32_t bit_offset) ++{ ++ const SliceHeader * const sh = &h->sh; ++#if HEVC_CTRLS_VERSION >= 2 ++ const struct v4l2_hevc_dpb_entry *const dpb = dec->dpb; ++ const unsigned int dpb_n = dec->num_active_dpb_entries; ++#else ++ struct v4l2_hevc_dpb_entry *const dpb = slice_params->dpb; ++ unsigned int dpb_n; ++#endif ++ unsigned int i; ++ RefPicList *rpl; ++ ++ *slice_params = (struct v4l2_ctrl_hevc_slice_params) { ++ .bit_size = bit_size, ++#if HEVC_CTRLS_VERSION <= 3 ++ .data_bit_offset = bit_offset, ++#else ++ .data_byte_offset = bit_offset / 8 + 1, ++#endif ++ /* ISO/IEC 23008-2, ITU-T Rec. H.265: General slice segment header */ ++ .slice_segment_addr = sh->slice_segment_addr, ++ ++ /* ISO/IEC 23008-2, ITU-T Rec. H.265: NAL unit header */ ++ .nal_unit_type = h->nal_unit_type, ++ .nuh_temporal_id_plus1 = h->temporal_id + 1, ++ ++ /* ISO/IEC 23008-2, ITU-T Rec. H.265: General slice segment header */ ++ .slice_type = sh->slice_type, ++ .colour_plane_id = sh->colour_plane_id, ++ .slice_pic_order_cnt = h->ref->poc, ++ .num_ref_idx_l0_active_minus1 = sh->nb_refs[L0] ? sh->nb_refs[L0] - 1 : 0, ++ .num_ref_idx_l1_active_minus1 = sh->nb_refs[L1] ? sh->nb_refs[L1] - 1 : 0, ++ .collocated_ref_idx = sh->slice_temporal_mvp_enabled_flag ? sh->collocated_ref_idx : 0, ++ .five_minus_max_num_merge_cand = sh->slice_type == HEVC_SLICE_I ? 0 : 5 - sh->max_num_merge_cand, ++ .slice_qp_delta = sh->slice_qp_delta, ++ .slice_cb_qp_offset = sh->slice_cb_qp_offset, ++ .slice_cr_qp_offset = sh->slice_cr_qp_offset, ++ .slice_act_y_qp_offset = 0, ++ .slice_act_cb_qp_offset = 0, ++ .slice_act_cr_qp_offset = 0, ++ .slice_beta_offset_div2 = sh->beta_offset / 2, ++ .slice_tc_offset_div2 = sh->tc_offset / 2, ++ ++ /* ISO/IEC 23008-2, ITU-T Rec. H.265: Picture timing SEI message */ ++ .pic_struct = h->sei.picture_timing.picture_struct, ++ ++#if HEVC_CTRLS_VERSION < 2 ++ /* ISO/IEC 23008-2, ITU-T Rec. H.265: General slice segment header */ ++ .num_rps_poc_st_curr_before = h->rps[ST_CURR_BEF].nb_refs, ++ .num_rps_poc_st_curr_after = h->rps[ST_CURR_AFT].nb_refs, ++ .num_rps_poc_lt_curr = h->rps[LT_CURR].nb_refs, ++#endif ++ }; ++ ++ if (sh->slice_sample_adaptive_offset_flag[0]) ++ slice_params->flags |= V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_LUMA; ++ ++ if (sh->slice_sample_adaptive_offset_flag[1]) ++ slice_params->flags |= V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_CHROMA; ++ ++ if (sh->slice_temporal_mvp_enabled_flag) ++ slice_params->flags |= V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_TEMPORAL_MVP_ENABLED; ++ ++ if (sh->mvd_l1_zero_flag) ++ slice_params->flags |= V4L2_HEVC_SLICE_PARAMS_FLAG_MVD_L1_ZERO; ++ ++ if (sh->cabac_init_flag) ++ slice_params->flags |= V4L2_HEVC_SLICE_PARAMS_FLAG_CABAC_INIT; ++ ++ if (sh->collocated_list == L0) ++ slice_params->flags |= V4L2_HEVC_SLICE_PARAMS_FLAG_COLLOCATED_FROM_L0; ++ ++ if (sh->disable_deblocking_filter_flag) ++ slice_params->flags |= V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_DEBLOCKING_FILTER_DISABLED; ++ ++ if (sh->slice_loop_filter_across_slices_enabled_flag) ++ slice_params->flags |= V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_LOOP_FILTER_ACROSS_SLICES_ENABLED; ++ ++ if (sh->dependent_slice_segment_flag) ++ slice_params->flags |= V4L2_HEVC_SLICE_PARAMS_FLAG_DEPENDENT_SLICE_SEGMENT; ++ ++#if HEVC_CTRLS_VERSION < 2 ++ dpb_n = fill_dpb_entries(h, dpb); ++ slice_params->num_active_dpb_entries = dpb_n; ++#endif ++ ++ if (sh->slice_type != HEVC_SLICE_I) { ++ rpl = &h->ref->refPicList[0]; ++ for (i = 0; i < rpl->nb_refs; i++) ++ slice_params->ref_idx_l0[i] = get_ref_pic_index(h, rpl->ref[i], dpb, dpb_n); ++ } ++ ++ if (sh->slice_type == HEVC_SLICE_B) { ++ rpl = &h->ref->refPicList[1]; ++ for (i = 0; i < rpl->nb_refs; i++) ++ slice_params->ref_idx_l1[i] = get_ref_pic_index(h, rpl->ref[i], dpb, dpb_n); ++ } ++ ++ fill_pred_table(h, &slice_params->pred_weight_table); ++ ++ slice_params->num_entry_point_offsets = sh->num_entry_point_offsets; ++#if HEVC_CTRLS_VERSION <= 3 ++ if (slice_params->num_entry_point_offsets > 256) { ++ slice_params->num_entry_point_offsets = 256; ++ av_log(NULL, AV_LOG_ERROR, "%s: Currently only 256 entry points are supported, but slice has %d entry points.\n", __func__, sh->num_entry_point_offsets); ++ } ++ ++ for (i = 0; i < slice_params->num_entry_point_offsets; i++) ++ slice_params->entry_point_offset_minus1[i] = sh->entry_point_offset[i] - 1; ++#endif ++} ++ ++#if HEVC_CTRLS_VERSION >= 2 ++static void ++fill_decode_params(const HEVCContext * const h, ++ struct v4l2_ctrl_hevc_decode_params * const dec) ++{ ++ unsigned int i; ++ ++ *dec = (struct v4l2_ctrl_hevc_decode_params){ ++ .pic_order_cnt_val = h->poc, ++ .num_poc_st_curr_before = h->rps[ST_CURR_BEF].nb_refs, ++ .num_poc_st_curr_after = h->rps[ST_CURR_AFT].nb_refs, ++ .num_poc_lt_curr = h->rps[LT_CURR].nb_refs, ++ }; ++ ++ dec->num_active_dpb_entries = fill_dpb_entries(h, dec->dpb); ++ ++ // The docn does seem to ask that we fit our 32 bit signed POC into ++ // a U8 so... (To be fair 16 bits would be enough) ++ // Luckily we (Pi) don't use these fields ++ for (i = 0; i != h->rps[ST_CURR_BEF].nb_refs; ++i) ++ dec->poc_st_curr_before[i] = h->rps[ST_CURR_BEF].ref[i]->poc; ++ for (i = 0; i != h->rps[ST_CURR_AFT].nb_refs; ++i) ++ dec->poc_st_curr_after[i] = h->rps[ST_CURR_AFT].ref[i]->poc; ++ for (i = 0; i != h->rps[LT_CURR].nb_refs; ++i) ++ dec->poc_lt_curr[i] = h->rps[LT_CURR].ref[i]->poc; ++ ++ if (IS_IRAP(h)) ++ dec->flags |= V4L2_HEVC_DECODE_PARAM_FLAG_IRAP_PIC; ++ if (IS_IDR(h)) ++ dec->flags |= V4L2_HEVC_DECODE_PARAM_FLAG_IDR_PIC; ++ if (h->sh.no_output_of_prior_pics_flag) ++ dec->flags |= V4L2_HEVC_DECODE_PARAM_FLAG_NO_OUTPUT_OF_PRIOR; ++ ++} ++#endif ++ ++static void fill_sps(struct v4l2_ctrl_hevc_sps *ctrl, const HEVCSPS *sps) ++{ ++ /* ISO/IEC 23008-2, ITU-T Rec. H.265: Sequence parameter set */ ++ *ctrl = (struct v4l2_ctrl_hevc_sps) { ++ .chroma_format_idc = sps->chroma_format_idc, ++ .pic_width_in_luma_samples = sps->width, ++ .pic_height_in_luma_samples = sps->height, ++ .bit_depth_luma_minus8 = sps->bit_depth - 8, ++ .bit_depth_chroma_minus8 = sps->bit_depth - 8, ++ .log2_max_pic_order_cnt_lsb_minus4 = sps->log2_max_poc_lsb - 4, ++ .sps_max_dec_pic_buffering_minus1 = sps->temporal_layer[sps->max_sub_layers - 1].max_dec_pic_buffering - 1, ++ .sps_max_num_reorder_pics = sps->temporal_layer[sps->max_sub_layers - 1].num_reorder_pics, ++ .sps_max_latency_increase_plus1 = sps->temporal_layer[sps->max_sub_layers - 1].max_latency_increase + 1, ++ .log2_min_luma_coding_block_size_minus3 = sps->log2_min_cb_size - 3, ++ .log2_diff_max_min_luma_coding_block_size = sps->log2_diff_max_min_coding_block_size, ++ .log2_min_luma_transform_block_size_minus2 = sps->log2_min_tb_size - 2, ++ .log2_diff_max_min_luma_transform_block_size = sps->log2_max_trafo_size - sps->log2_min_tb_size, ++ .max_transform_hierarchy_depth_inter = sps->max_transform_hierarchy_depth_inter, ++ .max_transform_hierarchy_depth_intra = sps->max_transform_hierarchy_depth_intra, ++ .pcm_sample_bit_depth_luma_minus1 = sps->pcm.bit_depth - 1, ++ .pcm_sample_bit_depth_chroma_minus1 = sps->pcm.bit_depth_chroma - 1, ++ .log2_min_pcm_luma_coding_block_size_minus3 = sps->pcm.log2_min_pcm_cb_size - 3, ++ .log2_diff_max_min_pcm_luma_coding_block_size = sps->pcm.log2_max_pcm_cb_size - sps->pcm.log2_min_pcm_cb_size, ++ .num_short_term_ref_pic_sets = sps->nb_st_rps, ++ .num_long_term_ref_pics_sps = sps->num_long_term_ref_pics_sps, ++ .chroma_format_idc = sps->chroma_format_idc, ++ .sps_max_sub_layers_minus1 = sps->max_sub_layers - 1, ++ }; ++ ++ if (sps->separate_colour_plane_flag) ++ ctrl->flags |= V4L2_HEVC_SPS_FLAG_SEPARATE_COLOUR_PLANE; ++ ++ if (sps->scaling_list_enable_flag) ++ ctrl->flags |= V4L2_HEVC_SPS_FLAG_SCALING_LIST_ENABLED; ++ ++ if (sps->amp_enabled_flag) ++ ctrl->flags |= V4L2_HEVC_SPS_FLAG_AMP_ENABLED; ++ ++ if (sps->sao_enabled) ++ ctrl->flags |= V4L2_HEVC_SPS_FLAG_SAMPLE_ADAPTIVE_OFFSET; ++ ++ if (sps->pcm_enabled_flag) ++ ctrl->flags |= V4L2_HEVC_SPS_FLAG_PCM_ENABLED; ++ ++ if (sps->pcm.loop_filter_disable_flag) ++ ctrl->flags |= V4L2_HEVC_SPS_FLAG_PCM_LOOP_FILTER_DISABLED; ++ ++ if (sps->long_term_ref_pics_present_flag) ++ ctrl->flags |= V4L2_HEVC_SPS_FLAG_LONG_TERM_REF_PICS_PRESENT; ++ ++ if (sps->sps_temporal_mvp_enabled_flag) ++ ctrl->flags |= V4L2_HEVC_SPS_FLAG_SPS_TEMPORAL_MVP_ENABLED; ++ ++ if (sps->sps_strong_intra_smoothing_enable_flag) ++ ctrl->flags |= V4L2_HEVC_SPS_FLAG_STRONG_INTRA_SMOOTHING_ENABLED; ++} ++ ++static void fill_scaling_matrix(const ScalingList * const sl, ++ struct v4l2_ctrl_hevc_scaling_matrix * const sm) ++{ ++ unsigned int i; ++ ++ for (i = 0; i < 6; i++) { ++ unsigned int j; ++ ++ for (j = 0; j < 16; j++) ++ sm->scaling_list_4x4[i][j] = sl->sl[0][i][j]; ++ for (j = 0; j < 64; j++) { ++ sm->scaling_list_8x8[i][j] = sl->sl[1][i][j]; ++ sm->scaling_list_16x16[i][j] = sl->sl[2][i][j]; ++ if (i < 2) ++ sm->scaling_list_32x32[i][j] = sl->sl[3][i * 3][j]; ++ } ++ sm->scaling_list_dc_coef_16x16[i] = sl->sl_dc[0][i]; ++ if (i < 2) ++ sm->scaling_list_dc_coef_32x32[i] = sl->sl_dc[1][i * 3]; ++ } ++} ++ ++static void fill_pps(struct v4l2_ctrl_hevc_pps * const ctrl, const HEVCPPS * const pps) ++{ ++ uint64_t flags = 0; ++ ++ if (pps->dependent_slice_segments_enabled_flag) ++ flags |= V4L2_HEVC_PPS_FLAG_DEPENDENT_SLICE_SEGMENT_ENABLED; ++ ++ if (pps->output_flag_present_flag) ++ flags |= V4L2_HEVC_PPS_FLAG_OUTPUT_FLAG_PRESENT; ++ ++ if (pps->sign_data_hiding_flag) ++ flags |= V4L2_HEVC_PPS_FLAG_SIGN_DATA_HIDING_ENABLED; ++ ++ if (pps->cabac_init_present_flag) ++ flags |= V4L2_HEVC_PPS_FLAG_CABAC_INIT_PRESENT; ++ ++ if (pps->constrained_intra_pred_flag) ++ flags |= V4L2_HEVC_PPS_FLAG_CONSTRAINED_INTRA_PRED; ++ ++ if (pps->transform_skip_enabled_flag) ++ flags |= V4L2_HEVC_PPS_FLAG_TRANSFORM_SKIP_ENABLED; ++ ++ if (pps->cu_qp_delta_enabled_flag) ++ flags |= V4L2_HEVC_PPS_FLAG_CU_QP_DELTA_ENABLED; ++ ++ if (pps->pic_slice_level_chroma_qp_offsets_present_flag) ++ flags |= V4L2_HEVC_PPS_FLAG_PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT; ++ ++ if (pps->weighted_pred_flag) ++ flags |= V4L2_HEVC_PPS_FLAG_WEIGHTED_PRED; ++ ++ if (pps->weighted_bipred_flag) ++ flags |= V4L2_HEVC_PPS_FLAG_WEIGHTED_BIPRED; ++ ++ if (pps->transquant_bypass_enable_flag) ++ flags |= V4L2_HEVC_PPS_FLAG_TRANSQUANT_BYPASS_ENABLED; ++ ++ if (pps->tiles_enabled_flag) ++ flags |= V4L2_HEVC_PPS_FLAG_TILES_ENABLED; ++ ++ if (pps->entropy_coding_sync_enabled_flag) ++ flags |= V4L2_HEVC_PPS_FLAG_ENTROPY_CODING_SYNC_ENABLED; ++ ++ if (pps->loop_filter_across_tiles_enabled_flag) ++ flags |= V4L2_HEVC_PPS_FLAG_LOOP_FILTER_ACROSS_TILES_ENABLED; ++ ++ if (pps->seq_loop_filter_across_slices_enabled_flag) ++ flags |= V4L2_HEVC_PPS_FLAG_PPS_LOOP_FILTER_ACROSS_SLICES_ENABLED; ++ ++ if (pps->deblocking_filter_override_enabled_flag) ++ flags |= V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_OVERRIDE_ENABLED; ++ ++ if (pps->disable_dbf) ++ flags |= V4L2_HEVC_PPS_FLAG_PPS_DISABLE_DEBLOCKING_FILTER; ++ ++ if (pps->lists_modification_present_flag) ++ flags |= V4L2_HEVC_PPS_FLAG_LISTS_MODIFICATION_PRESENT; ++ ++ if (pps->slice_header_extension_present_flag) ++ flags |= V4L2_HEVC_PPS_FLAG_SLICE_SEGMENT_HEADER_EXTENSION_PRESENT; ++ ++ /* ISO/IEC 23008-2, ITU-T Rec. H.265: Picture parameter set */ ++ *ctrl = (struct v4l2_ctrl_hevc_pps) { ++ .num_extra_slice_header_bits = pps->num_extra_slice_header_bits, ++ .init_qp_minus26 = pps->pic_init_qp_minus26, ++ .diff_cu_qp_delta_depth = pps->diff_cu_qp_delta_depth, ++ .pps_cb_qp_offset = pps->cb_qp_offset, ++ .pps_cr_qp_offset = pps->cr_qp_offset, ++ .pps_beta_offset_div2 = pps->beta_offset / 2, ++ .pps_tc_offset_div2 = pps->tc_offset / 2, ++ .log2_parallel_merge_level_minus2 = pps->log2_parallel_merge_level - 2, ++ .flags = flags ++ }; ++ ++ ++ if (pps->tiles_enabled_flag) { ++ ctrl->num_tile_columns_minus1 = pps->num_tile_columns - 1; ++ ctrl->num_tile_rows_minus1 = pps->num_tile_rows - 1; ++ ++ for (int i = 0; i < pps->num_tile_columns; i++) ++ ctrl->column_width_minus1[i] = pps->column_width[i] - 1; ++ ++ for (int i = 0; i < pps->num_tile_rows; i++) ++ ctrl->row_height_minus1[i] = pps->row_height[i] - 1; ++ } ++} ++ ++// Called before finally returning the frame to the user ++// Set corrupt flag here as this is actually the frame structure that ++// is going to the user (in MT land each thread has its own pool) ++static int frame_post_process(void *logctx, AVFrame *frame) ++{ ++ V4L2MediaReqDescriptor *rd = (V4L2MediaReqDescriptor*)frame->data[0]; ++ ++// av_log(NULL, AV_LOG_INFO, "%s\n", __func__); ++ frame->flags &= ~AV_FRAME_FLAG_CORRUPT; ++ if (rd->qe_dst) { ++ MediaBufsStatus stat = qent_dst_wait(rd->qe_dst); ++ if (stat != MEDIABUFS_STATUS_SUCCESS) { ++ av_log(logctx, AV_LOG_ERROR, "%s: Decode fail\n", __func__); ++ frame->flags |= AV_FRAME_FLAG_CORRUPT; ++ } ++ } ++ ++ return 0; ++} ++ ++static inline struct timeval cvt_dpb_to_tv(uint64_t t) ++{ ++ t /= 1000; ++ return (struct timeval){ ++ .tv_usec = t % 1000000, ++ .tv_sec = t / 1000000 ++ }; ++} ++ ++static inline uint64_t cvt_timestamp_to_dpb(const unsigned int t) ++{ ++ return (uint64_t)t * 1000; ++} ++ ++static int v4l2_request_hevc_start_frame(AVCodecContext *avctx, ++ av_unused const uint8_t *buffer, ++ av_unused uint32_t size) ++{ ++ const HEVCContext *h = avctx->priv_data; ++ V4L2MediaReqDescriptor *const rd = (V4L2MediaReqDescriptor *)h->ref->frame->data[0]; ++ V4L2RequestContextHEVC * const ctx = avctx->internal->hwaccel_priv_data; ++ ++// av_log(NULL, AV_LOG_INFO, "%s\n", __func__); ++ decode_q_add(&ctx->decode_q, &rd->decode_ent); ++ ++ rd->num_slices = 0; ++ ctx->timestamp++; ++ rd->timestamp = cvt_timestamp_to_dpb(ctx->timestamp); ++ ++ { ++ FrameDecodeData * const fdd = (FrameDecodeData*)h->ref->frame->private_ref->data; ++ fdd->post_process = frame_post_process; ++ } ++ ++ // qe_dst needs to be bound to the data buffer and only returned when that is ++ if (!rd->qe_dst) ++ { ++ if ((rd->qe_dst = mediabufs_dst_qent_alloc(ctx->mbufs, ctx->dbufs)) == NULL) { ++ av_log(avctx, AV_LOG_ERROR, "%s: Failed to get dst buffer\n", __func__); ++ return AVERROR(ENOMEM); ++ } ++ } ++ ++ ff_thread_finish_setup(avctx); // Allow next thread to enter rpi_hevc_start_frame ++ ++ return 0; ++} ++ ++// Object fd & size will be zapped by this & need setting later ++static int drm_from_format(AVDRMFrameDescriptor * const desc, const struct v4l2_format * const format) ++{ ++ AVDRMLayerDescriptor *layer = &desc->layers[0]; ++ unsigned int width; ++ unsigned int height; ++ unsigned int bpl; ++ uint32_t pixelformat; ++ ++ if (V4L2_TYPE_IS_MULTIPLANAR(format->type)) { ++ width = format->fmt.pix_mp.width; ++ height = format->fmt.pix_mp.height; ++ pixelformat = format->fmt.pix_mp.pixelformat; ++ bpl = format->fmt.pix_mp.plane_fmt[0].bytesperline; ++ } ++ else { ++ width = format->fmt.pix.width; ++ height = format->fmt.pix.height; ++ pixelformat = format->fmt.pix.pixelformat; ++ bpl = format->fmt.pix.bytesperline; ++ } ++ ++ switch (pixelformat) { ++ case V4L2_PIX_FMT_NV12: ++ layer->format = DRM_FORMAT_NV12; ++ desc->objects[0].format_modifier = DRM_FORMAT_MOD_LINEAR; ++ break; ++#if CONFIG_SAND ++ case V4L2_PIX_FMT_NV12_COL128: ++ layer->format = DRM_FORMAT_NV12; ++ desc->objects[0].format_modifier = DRM_FORMAT_MOD_BROADCOM_SAND128_COL_HEIGHT(bpl); ++ break; ++ case V4L2_PIX_FMT_NV12_10_COL128: ++ layer->format = DRM_FORMAT_P030; ++ desc->objects[0].format_modifier = DRM_FORMAT_MOD_BROADCOM_SAND128_COL_HEIGHT(bpl); ++ break; ++#endif ++#ifdef DRM_FORMAT_MOD_ALLWINNER_TILED ++ case V4L2_PIX_FMT_SUNXI_TILED_NV12: ++ layer->format = DRM_FORMAT_NV12; ++ desc->objects[0].format_modifier = DRM_FORMAT_MOD_ALLWINNER_TILED; ++ break; ++#endif ++#if defined(V4L2_PIX_FMT_NV15) && defined(DRM_FORMAT_NV15) ++ case V4L2_PIX_FMT_NV15: ++ layer->format = DRM_FORMAT_NV15; ++ desc->objects[0].format_modifier = DRM_FORMAT_MOD_LINEAR; ++ break; ++#endif ++ case V4L2_PIX_FMT_NV16: ++ layer->format = DRM_FORMAT_NV16; ++ desc->objects[0].format_modifier = DRM_FORMAT_MOD_LINEAR; ++ break; ++#if defined(V4L2_PIX_FMT_NV20) && defined(DRM_FORMAT_NV20) ++ case V4L2_PIX_FMT_NV20: ++ layer->format = DRM_FORMAT_NV20; ++ desc->objects[0].format_modifier = DRM_FORMAT_MOD_LINEAR; ++ break; ++#endif ++ default: ++ return -1; ++ } ++ ++ desc->nb_objects = 1; ++ desc->objects[0].fd = -1; ++ desc->objects[0].size = 0; ++ ++ desc->nb_layers = 1; ++ layer->nb_planes = 2; ++ ++ layer->planes[0].object_index = 0; ++ layer->planes[0].offset = 0; ++ layer->planes[0].pitch = bpl; ++#if CONFIG_SAND ++ if (pixelformat == V4L2_PIX_FMT_NV12_COL128) { ++ layer->planes[1].object_index = 0; ++ layer->planes[1].offset = height * 128; ++ layer->planes[0].pitch = width; ++ layer->planes[1].pitch = width; ++ } ++ else if (pixelformat == V4L2_PIX_FMT_NV12_10_COL128) { ++ layer->planes[1].object_index = 0; ++ layer->planes[1].offset = height * 128; ++ layer->planes[0].pitch = width * 2; // Lies but it keeps DRM import happy ++ layer->planes[1].pitch = width * 2; ++ } ++ else ++#endif ++ { ++ layer->planes[1].object_index = 0; ++ layer->planes[1].offset = layer->planes[0].pitch * height; ++ layer->planes[1].pitch = layer->planes[0].pitch; ++ } ++ ++ return 0; ++} ++ ++static int ++set_req_ctls(V4L2RequestContextHEVC *ctx, struct media_request * const mreq, ++ struct req_controls *const controls, ++#if HEVC_CTRLS_VERSION >= 2 ++ struct v4l2_ctrl_hevc_decode_params * const dec, ++#endif ++ struct v4l2_ctrl_hevc_slice_params * const slices, const unsigned int slice_count, ++ void * const offsets, const size_t offset_count) ++{ ++ int rv; ++#if HEVC_CTRLS_VERSION >= 2 ++ unsigned int n = 3; ++#else ++ unsigned int n = 2; ++#endif ++ ++ struct v4l2_ext_control control[6] = { ++ { ++ .id = V4L2_CID_STATELESS_HEVC_SPS, ++ .ptr = &controls->sps, ++ .size = sizeof(controls->sps), ++ }, ++ { ++ .id = V4L2_CID_STATELESS_HEVC_PPS, ++ .ptr = &controls->pps, ++ .size = sizeof(controls->pps), ++ }, ++#if HEVC_CTRLS_VERSION >= 2 ++ { ++ .id = V4L2_CID_STATELESS_HEVC_DECODE_PARAMS, ++ .ptr = dec, ++ .size = sizeof(*dec), ++ }, ++#endif ++ }; ++ ++ if (slices) ++ control[n++] = (struct v4l2_ext_control) { ++ .id = V4L2_CID_STATELESS_HEVC_SLICE_PARAMS, ++ .ptr = slices, ++ .size = sizeof(*slices) * slice_count, ++ }; ++ ++ if (controls->has_scaling) ++ control[n++] = (struct v4l2_ext_control) { ++ .id = V4L2_CID_STATELESS_HEVC_SCALING_MATRIX, ++ .ptr = &controls->scaling_matrix, ++ .size = sizeof(controls->scaling_matrix), ++ }; ++ ++#if HEVC_CTRLS_VERSION >= 4 ++ if (offsets) ++ control[n++] = (struct v4l2_ext_control) { ++ .id = V4L2_CID_STATELESS_HEVC_ENTRY_POINT_OFFSETS, ++ .ptr = offsets, ++ .size = sizeof(((struct V4L2MediaReqDescriptor *)0)->offsets[0]) * offset_count, ++ }; ++#endif ++ ++ rv = mediabufs_ctl_set_ext_ctrls(ctx->mbufs, mreq, control, n); ++ ++ return rv; ++} ++ ++// This only works because we started out from a single coded frame buffer ++// that will remain intact until after end_frame ++static int v4l2_request_hevc_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size) ++{ ++ const HEVCContext * const h = avctx->priv_data; ++ V4L2RequestContextHEVC * const ctx = avctx->internal->hwaccel_priv_data; ++ V4L2MediaReqDescriptor * const rd = (V4L2MediaReqDescriptor*)h->ref->frame->data[0]; ++ int bcount = get_bits_count(&h->HEVClc->gb); ++ uint32_t boff = (ptr_from_index(buffer, bcount/8 + 1) - (buffer + bcount/8 + 1)) * 8 + bcount; ++ ++ const unsigned int n = rd->num_slices; ++ const unsigned int block_start = (n / ctx->max_slices) * ctx->max_slices; ++ ++ int rv; ++ struct slice_info * si; ++ ++ // This looks dodgy but we know that FFmpeg has parsed this from a buffer ++ // that contains the entire frame including the start code ++ if (ctx->start_code == V4L2_STATELESS_HEVC_START_CODE_ANNEX_B) { ++ buffer -= 3; ++ size += 3; ++ boff += 24; ++ if (buffer[0] != 0 || buffer[1] != 0 || buffer[2] != 1) { ++ av_log(avctx, AV_LOG_ERROR, "Start code requested but missing %02x:%02x:%02x\n", ++ buffer[0], buffer[1], buffer[2]); ++ } ++ } ++ ++ if (ctx->decode_mode == V4L2_STATELESS_HEVC_DECODE_MODE_FRAME_BASED) { ++ if (rd->slices == NULL) { ++ if ((rd->slices = av_mallocz(sizeof(*rd->slices))) == NULL) ++ return AVERROR(ENOMEM); ++ rd->slices->ptr = buffer; ++ rd->num_slices = 1; ++ } ++ rd->slices->len = buffer - rd->slices->ptr + size; ++ return 0; ++ } ++ ++ if ((rv = slice_add(rd)) != 0) ++ return rv; ++ ++ si = rd->slices + n; ++ si->ptr = buffer; ++ si->len = size; ++ si->n_offsets = rd->num_offsets; ++ ++ if (n != block_start) { ++ struct slice_info *const si0 = rd->slices + block_start; ++ const size_t offset = (buffer - si0->ptr); ++ boff += offset * 8; ++ size += offset; ++ si0->len = si->len + offset; ++ } ++ ++#if HEVC_CTRLS_VERSION >= 2 ++ if (n == 0) ++ fill_decode_params(h, &rd->dec); ++ fill_slice_params(h, &rd->dec, rd->slice_params + n, size * 8, boff); ++#else ++ fill_slice_params(h, rd->slice_params + n, size * 8, boff); ++#endif ++ if (ctx->max_offsets != 0 && ++ (rv = offsets_add(rd, h->sh.num_entry_point_offsets, h->sh.entry_point_offset)) != 0) ++ return rv; ++ ++ return 0; ++} ++ ++static void v4l2_request_hevc_abort_frame(AVCodecContext * const avctx) ++{ ++ const HEVCContext * const h = avctx->priv_data; ++ if (h->ref != NULL) { ++ V4L2MediaReqDescriptor *const rd = (V4L2MediaReqDescriptor *)h->ref->frame->data[0]; ++ V4L2RequestContextHEVC * const ctx = avctx->internal->hwaccel_priv_data; ++ ++ media_request_abort(&rd->req); ++ mediabufs_src_qent_abort(ctx->mbufs, &rd->qe_src); ++ ++ decode_q_remove(&ctx->decode_q, &rd->decode_ent); ++ } ++} ++ ++static int send_slice(AVCodecContext * const avctx, ++ V4L2MediaReqDescriptor * const rd, ++ struct req_controls *const controls, ++ const unsigned int i, const unsigned int j) ++{ ++ V4L2RequestContextHEVC * const ctx = avctx->internal->hwaccel_priv_data; ++ ++ const int is_last = (j == rd->num_slices); ++ struct slice_info *const si = rd->slices + i; ++ struct media_request * req = NULL; ++ struct qent_src * src = NULL; ++ MediaBufsStatus stat; ++ void * offsets = rd->offsets + rd->slices[i].n_offsets; ++ size_t n_offsets = (is_last ? rd->num_offsets : rd->slices[j].n_offsets) - rd->slices[i].n_offsets; ++ ++ if ((req = media_request_get(ctx->mpool)) == NULL) { ++ av_log(avctx, AV_LOG_ERROR, "%s: Failed to alloc media request\n", __func__); ++ return AVERROR(ENOMEM); ++ } ++ ++ if (set_req_ctls(ctx, req, ++ controls, ++#if HEVC_CTRLS_VERSION >= 2 ++ &rd->dec, ++#endif ++ rd->slice_params + i, j - i, ++ offsets, n_offsets)) { ++ av_log(avctx, AV_LOG_ERROR, "%s: Failed to set req ctls\n", __func__); ++ goto fail1; ++ } ++ ++ if ((src = mediabufs_src_qent_get(ctx->mbufs)) == NULL) { ++ av_log(avctx, AV_LOG_ERROR, "%s: Failed to get src buffer\n", __func__); ++ goto fail1; ++ } ++ ++ if (qent_src_data_copy(src, 0, si->ptr, si->len, ctx->dbufs) != 0) { ++ av_log(avctx, AV_LOG_ERROR, "%s: Failed data copy\n", __func__); ++ goto fail2; ++ } ++ ++ if (qent_src_params_set(src, &controls->tv)) { ++ av_log(avctx, AV_LOG_ERROR, "%s: Failed src param set\n", __func__); ++ goto fail2; ++ } ++ ++ stat = mediabufs_start_request(ctx->mbufs, &req, &src, ++ i == 0 ? rd->qe_dst : NULL, ++ is_last); ++ ++ if (stat != MEDIABUFS_STATUS_SUCCESS) { ++ av_log(avctx, AV_LOG_ERROR, "%s: Failed to start request\n", __func__); ++ return AVERROR_UNKNOWN; ++ } ++ return 0; ++ ++fail2: ++ mediabufs_src_qent_abort(ctx->mbufs, &src); ++fail1: ++ media_request_abort(&req); ++ return AVERROR_UNKNOWN; ++} ++ ++static int v4l2_request_hevc_end_frame(AVCodecContext *avctx) ++{ ++ const HEVCContext * const h = avctx->priv_data; ++ V4L2MediaReqDescriptor *rd = (V4L2MediaReqDescriptor*)h->ref->frame->data[0]; ++ V4L2RequestContextHEVC *ctx = avctx->internal->hwaccel_priv_data; ++ struct req_controls rc; ++ unsigned int i; ++ int rv; ++ ++ // It is possible, though maybe a bug, to get an end_frame without ++ // a previous start_frame. If we do then give up. ++ if (!decode_q_in_q(&rd->decode_ent)) { ++ av_log(avctx, AV_LOG_DEBUG, "%s: Frame not in decode Q\n", __func__); ++ return AVERROR_INVALIDDATA; ++ } ++ ++ { ++ const ScalingList *sl = h->ps.pps->scaling_list_data_present_flag ? ++ &h->ps.pps->scaling_list : ++ h->ps.sps->scaling_list_enable_flag ? ++ &h->ps.sps->scaling_list : NULL; ++ ++ ++ memset(&rc, 0, sizeof(rc)); ++ rc.tv = cvt_dpb_to_tv(rd->timestamp); ++ fill_sps(&rc.sps, h->ps.sps); ++ fill_pps(&rc.pps, h->ps.pps); ++ if (sl) { ++ rc.has_scaling = 1; ++ fill_scaling_matrix(sl, &rc.scaling_matrix); ++ } ++ } ++ ++ decode_q_wait(&ctx->decode_q, &rd->decode_ent); ++ ++ // qe_dst needs to be bound to the data buffer and only returned when that is ++ // Alloc almost certainly wants to be serialised if there is any chance of blocking ++ // so we get the next frame to be free in the thread that needs it for decode first. ++ // ++ // In our current world this probably isn't a concern but put it here anyway ++ if (!rd->qe_dst) ++ { ++ if ((rd->qe_dst = mediabufs_dst_qent_alloc(ctx->mbufs, ctx->dbufs)) == NULL) { ++ av_log(avctx, AV_LOG_ERROR, "%s: Failed to get dst buffer\n", __func__); ++ rv = AVERROR(ENOMEM); ++ goto fail; ++ } ++ } ++ ++ // Send as slices ++ for (i = 0; i < rd->num_slices; i += ctx->max_slices) { ++ const unsigned int e = FFMIN(rd->num_slices, i + ctx->max_slices); ++ if ((rv = send_slice(avctx, rd, &rc, i, e)) != 0) ++ goto fail; ++ } ++ ++ // Set the drm_prime desriptor ++ drm_from_format(&rd->drm, mediabufs_dst_fmt(ctx->mbufs)); ++ rd->drm.objects[0].fd = dmabuf_fd(qent_dst_dmabuf(rd->qe_dst, 0)); ++ rd->drm.objects[0].size = dmabuf_size(qent_dst_dmabuf(rd->qe_dst, 0)); ++ ++ decode_q_remove(&ctx->decode_q, &rd->decode_ent); ++ return 0; ++ ++fail: ++ decode_q_remove(&ctx->decode_q, &rd->decode_ent); ++ return rv; ++} ++ ++static inline int ++ctrl_valid(const struct v4l2_query_ext_ctrl * const c, const int64_t v) ++{ ++ return v >= c->minimum && v <= c->maximum; ++} ++ ++// Initial check & init ++static int ++probe(AVCodecContext * const avctx, V4L2RequestContextHEVC * const ctx) ++{ ++ const HEVCContext *h = avctx->priv_data; ++ const HEVCSPS * const sps = h->ps.sps; ++ struct v4l2_ctrl_hevc_sps ctrl_sps; ++ unsigned int i; ++ ++ // Check for var slice array ++ struct v4l2_query_ext_ctrl qc[] = { ++ { .id = V4L2_CID_STATELESS_HEVC_SLICE_PARAMS }, ++ { .id = V4L2_CID_STATELESS_HEVC_DECODE_MODE, }, ++ { .id = V4L2_CID_STATELESS_HEVC_SPS }, ++ { .id = V4L2_CID_STATELESS_HEVC_PPS }, ++ { .id = V4L2_CID_STATELESS_HEVC_SCALING_MATRIX }, ++#if HEVC_CTRLS_VERSION >= 2 ++ { .id = V4L2_CID_STATELESS_HEVC_DECODE_PARAMS }, ++#endif ++ }; ++ // Order & size must match! ++ static const size_t ctrl_sizes[] = { ++ sizeof(struct v4l2_ctrl_hevc_slice_params), ++ sizeof(int32_t), ++ sizeof(struct v4l2_ctrl_hevc_sps), ++ sizeof(struct v4l2_ctrl_hevc_pps), ++ sizeof(struct v4l2_ctrl_hevc_scaling_matrix), ++#if HEVC_CTRLS_VERSION >= 2 ++ sizeof(struct v4l2_ctrl_hevc_decode_params), ++#endif ++ }; ++ const unsigned int noof_ctrls = FF_ARRAY_ELEMS(qc); ++ ++#if HEVC_CTRLS_VERSION == 2 ++ if (mediabufs_ctl_driver_version(ctx->mbufs) >= MEDIABUFS_DRIVER_VERSION(5, 18, 0)) ++ return AVERROR(EINVAL); ++#elif HEVC_CTRLS_VERSION == 3 ++ if (mediabufs_ctl_driver_version(ctx->mbufs) < MEDIABUFS_DRIVER_VERSION(5, 18, 0)) ++ return AVERROR(EINVAL); ++#endif ++ ++ mediabufs_ctl_query_ext_ctrls(ctx->mbufs, qc, noof_ctrls); ++ i = 0; ++#if HEVC_CTRLS_VERSION >= 4 ++ // Skip slice check if no slice mode ++ if (qc[1].type != 0 && !ctrl_valid(qc + 1, V4L2_STATELESS_HEVC_DECODE_MODE_SLICE_BASED)) ++ i = 1; ++#else ++ // Fail frame mode silently for anything prior to V4 ++ if (qc[1].type == 0 || !ctrl_valid(qc + 1, V4L2_STATELESS_HEVC_DECODE_MODE_SLICE_BASED)) ++ return AVERROR(EINVAL); ++#endif ++ for (; i != noof_ctrls; ++i) { ++ if (qc[i].type == 0) { ++ av_log(avctx, AV_LOG_DEBUG, "Probed V%d control %#x missing\n", HEVC_CTRLS_VERSION, qc[i].id); ++ return AVERROR(EINVAL); ++ } ++ if (ctrl_sizes[i] != (size_t)qc[i].elem_size) { ++ av_log(avctx, AV_LOG_DEBUG, "Probed V%d control %d size mismatch %zu != %zu\n", ++ HEVC_CTRLS_VERSION, i, ctrl_sizes[i], (size_t)qc[i].elem_size); ++ return AVERROR(EINVAL); ++ } ++ } ++ ++ fill_sps(&ctrl_sps, sps); ++ ++ if (mediabufs_set_ext_ctrl(ctx->mbufs, NULL, V4L2_CID_STATELESS_HEVC_SPS, &ctrl_sps, sizeof(ctrl_sps))) { ++ av_log(avctx, AV_LOG_ERROR, "Failed to set initial SPS\n"); ++ return AVERROR(EINVAL); ++ } ++ ++ return 0; ++} ++ ++// Final init ++static int ++set_controls(AVCodecContext * const avctx, V4L2RequestContextHEVC * const ctx) ++{ ++ int ret; ++ ++ struct v4l2_query_ext_ctrl querys[] = { ++ { .id = V4L2_CID_STATELESS_HEVC_DECODE_MODE, }, ++ { .id = V4L2_CID_STATELESS_HEVC_START_CODE, }, ++ { .id = V4L2_CID_STATELESS_HEVC_SLICE_PARAMS, }, ++#if HEVC_CTRLS_VERSION >= 4 ++ { .id = V4L2_CID_STATELESS_HEVC_ENTRY_POINT_OFFSETS, }, ++#endif ++ }; ++ ++ struct v4l2_ext_control ctrls[] = { ++ { .id = V4L2_CID_STATELESS_HEVC_DECODE_MODE, }, ++ { .id = V4L2_CID_STATELESS_HEVC_START_CODE, }, ++ }; ++ ++ mediabufs_ctl_query_ext_ctrls(ctx->mbufs, querys, FF_ARRAY_ELEMS(querys)); ++ ++ ctx->max_slices = (!(querys[2].flags & V4L2_CTRL_FLAG_DYNAMIC_ARRAY) || ++ querys[2].nr_of_dims != 1 || querys[2].dims[0] == 0) ? ++ 1 : querys[2].dims[0]; ++ av_log(avctx, AV_LOG_DEBUG, "%s: Max slices %d\n", __func__, ctx->max_slices); ++ ++#if HEVC_CTRLS_VERSION >= 4 ++ ctx->max_offsets = (querys[3].type == 0 || querys[3].nr_of_dims != 1) ? ++ 0 : querys[3].dims[0]; ++ av_log(avctx, AV_LOG_DEBUG, "%s: Entry point offsets %d\n", __func__, ctx->max_offsets); ++#else ++ ctx->max_offsets = 0; ++#endif ++ ++ if (querys[0].default_value == V4L2_STATELESS_HEVC_DECODE_MODE_SLICE_BASED || ++ querys[0].default_value == V4L2_STATELESS_HEVC_DECODE_MODE_FRAME_BASED) ++ ctx->decode_mode = querys[0].default_value; ++ else if (ctrl_valid(querys + 0, V4L2_STATELESS_HEVC_DECODE_MODE_FRAME_BASED)) ++ ctx->decode_mode = V4L2_STATELESS_HEVC_DECODE_MODE_FRAME_BASED; ++ else if (ctrl_valid(querys + 0, V4L2_STATELESS_HEVC_DECODE_MODE_SLICE_BASED)) ++ ctx->decode_mode = V4L2_STATELESS_HEVC_DECODE_MODE_SLICE_BASED; ++ else { ++ av_log(avctx, AV_LOG_ERROR, "%s: unsupported decode mode\n", __func__); ++ return AVERROR(EINVAL); ++ } ++ ++ if (querys[1].default_value == V4L2_STATELESS_HEVC_START_CODE_NONE || ++ querys[1].default_value == V4L2_STATELESS_HEVC_START_CODE_ANNEX_B) ++ ctx->start_code = querys[1].default_value; ++ else if (ctrl_valid(querys + 1, V4L2_STATELESS_HEVC_START_CODE_ANNEX_B)) ++ ctx->start_code = V4L2_STATELESS_HEVC_START_CODE_ANNEX_B; ++ else if (ctrl_valid(querys + 1, V4L2_STATELESS_HEVC_START_CODE_NONE)) ++ ctx->start_code = V4L2_STATELESS_HEVC_START_CODE_NONE; ++ else { ++ av_log(avctx, AV_LOG_ERROR, "%s: unsupported start code\n", __func__); ++ return AVERROR(EINVAL); ++ } ++ ++ // If we are in slice mode & START_CODE_NONE supported then pick that ++ // as it doesn't require the slightly dodgy look backwards in our raw buffer ++ if (ctx->decode_mode == V4L2_STATELESS_HEVC_DECODE_MODE_SLICE_BASED && ++ ctrl_valid(querys + 1, V4L2_STATELESS_HEVC_START_CODE_NONE)) ++ ctx->start_code = V4L2_STATELESS_HEVC_START_CODE_NONE; ++ ++ ctrls[0].value = ctx->decode_mode; ++ ctrls[1].value = ctx->start_code; ++ ++ ret = mediabufs_ctl_set_ext_ctrls(ctx->mbufs, NULL, ctrls, FF_ARRAY_ELEMS(ctrls)); ++ return !ret ? 0 : AVERROR(-ret); ++} ++ ++static void v4l2_req_frame_free(void *opaque, uint8_t *data) ++{ ++ AVCodecContext *avctx = opaque; ++ V4L2MediaReqDescriptor * const rd = (V4L2MediaReqDescriptor*)data; ++ ++ av_log(NULL, AV_LOG_DEBUG, "%s: avctx=%p data=%p\n", __func__, avctx, data); ++ ++ qent_dst_unref(&rd->qe_dst); ++ ++ // We don't expect req or qe_src to be set ++ if (rd->req || rd->qe_src) ++ av_log(NULL, AV_LOG_ERROR, "%s: qe_src %p or req %p not NULL\n", __func__, rd->req, rd->qe_src); ++ ++ av_freep(&rd->slices); ++ av_freep(&rd->slice_params); ++ av_freep(&rd->offsets); ++ ++ av_free(rd); ++} ++ ++static AVBufferRef *v4l2_req_frame_alloc(void *opaque, int size) ++{ ++ AVCodecContext *avctx = opaque; ++// V4L2RequestContextHEVC *ctx = avctx->internal->hwaccel_priv_data; ++// V4L2MediaReqDescriptor *req; ++ AVBufferRef *ref; ++ uint8_t *data; ++// int ret; ++ ++ data = av_mallocz(size); ++ if (!data) ++ return NULL; ++ ++ av_log(avctx, AV_LOG_DEBUG, "%s: avctx=%p size=%d data=%p\n", __func__, avctx, size, data); ++ ref = av_buffer_create(data, size, v4l2_req_frame_free, avctx, 0); ++ if (!ref) { ++ av_freep(&data); ++ return NULL; ++ } ++ return ref; ++} ++ ++#if 0 ++static void v4l2_req_pool_free(void *opaque) ++{ ++ av_log(NULL, AV_LOG_DEBUG, "%s: opaque=%p\n", __func__, opaque); ++} ++ ++static void v4l2_req_hwframe_ctx_free(AVHWFramesContext *hwfc) ++{ ++ av_log(NULL, AV_LOG_DEBUG, "%s: hwfc=%p pool=%p\n", __func__, hwfc, hwfc->pool); ++ ++ av_buffer_pool_uninit(&hwfc->pool); ++} ++#endif ++ ++static int frame_params(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx) ++{ ++ V4L2RequestContextHEVC *ctx = avctx->internal->hwaccel_priv_data; ++ AVHWFramesContext *hwfc = (AVHWFramesContext*)hw_frames_ctx->data; ++ const struct v4l2_format *vfmt = mediabufs_dst_fmt(ctx->mbufs); ++ ++ hwfc->format = AV_PIX_FMT_DRM_PRIME; ++ hwfc->sw_format = pixel_format_from_format(vfmt); ++ if (V4L2_TYPE_IS_MULTIPLANAR(vfmt->type)) { ++ hwfc->width = vfmt->fmt.pix_mp.width; ++ hwfc->height = vfmt->fmt.pix_mp.height; ++ } else { ++ hwfc->width = vfmt->fmt.pix.width; ++ hwfc->height = vfmt->fmt.pix.height; ++ } ++#if 0 ++ hwfc->pool = av_buffer_pool_init2(sizeof(V4L2MediaReqDescriptor), avctx, v4l2_req_frame_alloc, v4l2_req_pool_free); ++ if (!hwfc->pool) ++ return AVERROR(ENOMEM); ++ ++ hwfc->free = v4l2_req_hwframe_ctx_free; ++ ++ hwfc->initial_pool_size = 1; ++ ++ switch (avctx->codec_id) { ++ case AV_CODEC_ID_VP9: ++ hwfc->initial_pool_size += 8; ++ break; ++ case AV_CODEC_ID_VP8: ++ hwfc->initial_pool_size += 3; ++ break; ++ default: ++ hwfc->initial_pool_size += 2; ++ } ++#endif ++ av_log(avctx, AV_LOG_DEBUG, "%s: avctx=%p ctx=%p hw_frames_ctx=%p hwfc=%p pool=%p width=%d height=%d initial_pool_size=%d\n", __func__, avctx, ctx, hw_frames_ctx, hwfc, hwfc->pool, hwfc->width, hwfc->height, hwfc->initial_pool_size); ++ ++ return 0; ++} ++ ++static int alloc_frame(AVCodecContext * avctx, AVFrame *frame) ++{ ++ int rv; ++ ++ frame->buf[0] = v4l2_req_frame_alloc(avctx, sizeof(V4L2MediaReqDescriptor)); ++ if (!frame->buf[0]) ++ return AVERROR(ENOMEM); ++ ++ frame->data[0] = frame->buf[0]->data; ++ ++ frame->hw_frames_ctx = av_buffer_ref(avctx->hw_frames_ctx); ++ ++ if ((rv = ff_attach_decode_data(frame)) != 0) { ++ av_log(avctx, AV_LOG_ERROR, "Failed to attach decode data to frame\n"); ++ av_frame_unref(frame); ++ return rv; ++ } ++ ++ return 0; ++} ++ ++const v4l2_req_decode_fns V(ff_v4l2_req_hevc) = { ++ .src_pix_fmt_v4l2 = V4L2_PIX_FMT_HEVC_SLICE, ++ .name = "V4L2 HEVC stateless V" STR(HEVC_CTRLS_VERSION), ++ .probe = probe, ++ .set_controls = set_controls, ++ ++ .start_frame = v4l2_request_hevc_start_frame, ++ .decode_slice = v4l2_request_hevc_decode_slice, ++ .end_frame = v4l2_request_hevc_end_frame, ++ .abort_frame = v4l2_request_hevc_abort_frame, ++ .frame_params = frame_params, ++ .alloc_frame = alloc_frame, ++}; ++ +--- /dev/null ++++ b/libavcodec/v4l2_req_media.c +@@ -0,0 +1,1808 @@ ++/* ++ * Copyright (C) 2018 Paul Kocialkowski ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining a ++ * copy of this software and associated documentation files (the ++ * "Software"), to deal in the Software without restriction, including ++ * without limitation the rights to use, copy, modify, merge, publish, ++ * distribute, sub license, and/or sell copies of the Software, and to ++ * permit persons to whom the Software is furnished to do so, subject to ++ * the following conditions: ++ * ++ * The above copyright notice and this permission notice (including the ++ * next paragraph) shall be included in all copies or substantial portions ++ * of the Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ++ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. ++ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ++ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, ++ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE ++ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++ ++#include "v4l2_req_dmabufs.h" ++#include "v4l2_req_media.h" ++#include "v4l2_req_pollqueue.h" ++#include "v4l2_req_utils.h" ++#include "weak_link.h" ++ ++ ++/* floor(log2(x)) */ ++static unsigned int log2_size(size_t x) ++{ ++ unsigned int n = 0; ++ ++ if (x & ~0xffff) { ++ n += 16; ++ x >>= 16; ++ } ++ if (x & ~0xff) { ++ n += 8; ++ x >>= 8; ++ } ++ if (x & ~0xf) { ++ n += 4; ++ x >>= 4; ++ } ++ if (x & ~3) { ++ n += 2; ++ x >>= 2; ++ } ++ return (x & ~1) ? n + 1 : n; ++} ++ ++static size_t round_up_size(const size_t x) ++{ ++ /* Admit no size < 256 */ ++ const unsigned int n = x < 256 ? 8 : log2_size(x) - 1; ++ ++ return x >= (3 << n) ? 4 << n : (3 << n); ++} ++ ++struct media_request; ++ ++struct media_pool { ++ int fd; ++ sem_t sem; ++ pthread_mutex_t lock; ++ unsigned int pool_n; ++ struct media_request * pool_reqs; ++ struct media_request * free_reqs; ++ struct pollqueue * pq; ++}; ++ ++struct media_request { ++ struct media_request * next; ++ struct media_pool * mp; ++ int fd; ++ struct polltask * pt; ++}; ++ ++static inline enum v4l2_memory ++mediabufs_memory_to_v4l2(const enum mediabufs_memory m) ++{ ++ return (enum v4l2_memory)m; ++} ++ ++const char * ++mediabufs_memory_name(const enum mediabufs_memory m) ++{ ++ switch (m) { ++ case MEDIABUFS_MEMORY_UNSET: ++ return "Unset"; ++ case MEDIABUFS_MEMORY_MMAP: ++ return "MMap"; ++ case MEDIABUFS_MEMORY_USERPTR: ++ return "UserPtr"; ++ case MEDIABUFS_MEMORY_OVERLAY: ++ return "Overlay"; ++ case MEDIABUFS_MEMORY_DMABUF: ++ return "DMABuf"; ++ default: ++ break; ++ } ++ return "Unknown"; ++} ++ ++ ++static inline int do_trywait(sem_t *const sem) ++{ ++ while (sem_trywait(sem)) { ++ if (errno != EINTR) ++ return -errno; ++ } ++ return 0; ++} ++ ++static inline int do_wait(sem_t *const sem) ++{ ++ while (sem_wait(sem)) { ++ if (errno != EINTR) ++ return -errno; ++ } ++ return 0; ++} ++ ++static int request_buffers(int video_fd, unsigned int type, ++ enum mediabufs_memory memory, unsigned int buffers_count) ++{ ++ struct v4l2_requestbuffers buffers; ++ int rc; ++ ++ memset(&buffers, 0, sizeof(buffers)); ++ buffers.type = type; ++ buffers.memory = mediabufs_memory_to_v4l2(memory); ++ buffers.count = buffers_count; ++ ++ rc = ioctl(video_fd, VIDIOC_REQBUFS, &buffers); ++ if (rc < 0) { ++ rc = -errno; ++ request_log("Unable to request %d type %d buffers: %s\n", buffers_count, type, strerror(-rc)); ++ return rc; ++ } ++ ++ return 0; ++} ++ ++ ++static int set_stream(int video_fd, unsigned int type, bool enable) ++{ ++ enum v4l2_buf_type buf_type = type; ++ int rc; ++ ++ rc = ioctl(video_fd, enable ? VIDIOC_STREAMON : VIDIOC_STREAMOFF, ++ &buf_type); ++ if (rc < 0) { ++ rc = -errno; ++ request_log("Unable to %sable stream: %s\n", ++ enable ? "en" : "dis", strerror(-rc)); ++ return rc; ++ } ++ ++ return 0; ++} ++ ++ ++ ++struct media_request * media_request_get(struct media_pool * const mp) ++{ ++ struct media_request *req = NULL; ++ ++ /* Timeout handled by poll code */ ++ if (do_wait(&mp->sem)) ++ return NULL; ++ ++ pthread_mutex_lock(&mp->lock); ++ req = mp->free_reqs; ++ if (req) { ++ mp->free_reqs = req->next; ++ req->next = NULL; ++ } ++ pthread_mutex_unlock(&mp->lock); ++ return req; ++} ++ ++int media_request_fd(const struct media_request * const req) ++{ ++ return req->fd; ++} ++ ++int media_request_start(struct media_request * const req) ++{ ++ while (ioctl(req->fd, MEDIA_REQUEST_IOC_QUEUE, NULL) == -1) ++ { ++ const int err = errno; ++ if (err == EINTR) ++ continue; ++ request_log("%s: Failed to Q media: (%d) %s\n", __func__, err, strerror(err)); ++ return -err; ++ } ++ ++ pollqueue_add_task(req->pt, 2000); ++ return 0; ++} ++ ++static void media_request_done(void *v, short revents) ++{ ++ struct media_request *const req = v; ++ struct media_pool *const mp = req->mp; ++ ++ /* ** Not sure what to do about timeout */ ++ ++ if (ioctl(req->fd, MEDIA_REQUEST_IOC_REINIT, NULL) < 0) ++ request_log("Unable to reinit media request: %s\n", ++ strerror(errno)); ++ ++ pthread_mutex_lock(&mp->lock); ++ req->next = mp->free_reqs; ++ mp->free_reqs = req; ++ pthread_mutex_unlock(&mp->lock); ++ sem_post(&mp->sem); ++} ++ ++int media_request_abort(struct media_request ** const preq) ++{ ++ struct media_request * const req = *preq; ++ ++ if (req == NULL) ++ return 0; ++ *preq = NULL; ++ ++ media_request_done(req, 0); ++ return 0; ++} ++ ++static void free_req_pool(struct media_request * const pool, const unsigned int n) ++{ ++ unsigned int i; ++ for (i = 0; i != n; ++i) { ++ struct media_request * const req = pool + i; ++ if (req->pt) ++ polltask_delete(&req->pt); ++ if (req->fd != -1) ++ close(req->fd); ++ } ++ free(pool); ++} ++ ++struct media_pool * media_pool_new(const char * const media_path, ++ struct pollqueue * const pq, ++ const unsigned int n) ++{ ++ struct media_pool * const mp = calloc(1, sizeof(*mp)); ++ unsigned int i; ++ ++ if (!mp) ++ goto fail0; ++ ++ mp->pq = pq; ++ pthread_mutex_init(&mp->lock, NULL); ++ mp->fd = open(media_path, O_RDWR | O_NONBLOCK); ++ if (mp->fd == -1) { ++ request_log("Failed to open '%s': %s\n", media_path, strerror(errno)); ++ goto fail1; ++ } ++ ++ if ((mp->pool_reqs = calloc(n, sizeof(*mp->pool_reqs))) == NULL) ++ goto fail3; ++ mp->pool_n = n; ++ for (i = 0; i != n; ++i) { ++ mp->pool_reqs[i].mp = mp; ++ mp->pool_reqs[i].fd = -1; ++ } ++ ++ for (i = 0; i != n; ++i) { ++ struct media_request * const req = mp->pool_reqs + i; ++ ++ if (ioctl(mp->fd, MEDIA_IOC_REQUEST_ALLOC, &req->fd) == -1) { ++ request_log("Failed to alloc request %d: %s\n", i, strerror(errno)); ++ goto fail4; ++ } ++ ++ req->pt = polltask_new(pq, req->fd, POLLPRI, media_request_done, req); ++ if (!req->pt) ++ goto fail4; ++ ++ req->next = mp->free_reqs, ++ mp->free_reqs = req; ++ } ++ ++ sem_init(&mp->sem, 0, n); ++ ++ return mp; ++ ++fail4: ++ free_req_pool(mp->pool_reqs, mp->pool_n); ++fail3: ++ close(mp->fd); ++ pthread_mutex_destroy(&mp->lock); ++fail1: ++ free(mp); ++fail0: ++ return NULL; ++} ++ ++void media_pool_delete(struct media_pool ** pMp) ++{ ++ struct media_pool * const mp = *pMp; ++ ++ if (!mp) ++ return; ++ *pMp = NULL; ++ ++ free_req_pool(mp->pool_reqs, mp->pool_n); ++ close(mp->fd); ++ sem_destroy(&mp->sem); ++ pthread_mutex_destroy(&mp->lock); ++ free(mp); ++} ++ ++ ++#define INDEX_UNSET (~(uint32_t)0) ++ ++enum qent_status { ++ QENT_NEW = 0, // Initial state - shouldn't last ++ QENT_FREE, // On free chain ++ QENT_PENDING, // User has ent ++ QENT_WAITING, // On inuse ++ QENT_DONE, // Frame rx ++ QENT_ERROR, // Error ++ QENT_IMPORT ++}; ++ ++struct qent_base { ++ atomic_int ref_count; ++ struct qent_base *next; ++ struct qent_base *prev; ++ enum qent_status status; ++ enum mediabufs_memory memtype; ++ uint32_t index; ++ struct dmabuf_h *dh[VIDEO_MAX_PLANES]; ++ struct timeval timestamp; ++}; ++ ++struct qent_src { ++ struct qent_base base; ++ int fixed_size; ++}; ++ ++struct qent_dst { ++ struct qent_base base; ++ bool waiting; ++ pthread_mutex_t lock; ++ pthread_cond_t cond; ++ struct ff_weak_link_client * mbc_wl; ++}; ++ ++struct qe_list_head { ++ struct qent_base *head; ++ struct qent_base *tail; ++}; ++ ++struct buf_pool { ++ enum mediabufs_memory memtype; ++ pthread_mutex_t lock; ++ sem_t free_sem; ++ struct qe_list_head free; ++ struct qe_list_head inuse; ++}; ++ ++ ++static inline struct qent_dst *base_to_dst(struct qent_base *be) ++{ ++ return (struct qent_dst *)be; ++} ++ ++static inline struct qent_src *base_to_src(struct qent_base *be) ++{ ++ return (struct qent_src *)be; ++} ++ ++ ++#define QENT_BASE_INITIALIZER(mtype) {\ ++ .ref_count = ATOMIC_VAR_INIT(0),\ ++ .status = QENT_NEW,\ ++ .memtype = (mtype),\ ++ .index = INDEX_UNSET\ ++} ++ ++static void qe_base_uninit(struct qent_base *const be) ++{ ++ unsigned int i; ++ for (i = 0; i != VIDEO_MAX_PLANES; ++i) { ++ dmabuf_free(be->dh[i]); ++ be->dh[i] = NULL; ++ } ++} ++ ++static void qe_src_free(struct qent_src *const be_src) ++{ ++ if (!be_src) ++ return; ++ qe_base_uninit(&be_src->base); ++ free(be_src); ++} ++ ++static struct qent_src * qe_src_new(enum mediabufs_memory mtype) ++{ ++ struct qent_src *const be_src = malloc(sizeof(*be_src)); ++ if (!be_src) ++ return NULL; ++ *be_src = (struct qent_src){ ++ .base = QENT_BASE_INITIALIZER(mtype) ++ }; ++ return be_src; ++} ++ ++static void qe_dst_free(struct qent_dst *const be_dst) ++{ ++ if (!be_dst) ++ return; ++ ++ ff_weak_link_unref(&be_dst->mbc_wl); ++ pthread_cond_destroy(&be_dst->cond); ++ pthread_mutex_destroy(&be_dst->lock); ++ qe_base_uninit(&be_dst->base); ++ free(be_dst); ++} ++ ++static struct qent_dst* qe_dst_new(struct ff_weak_link_master * const wl, const enum mediabufs_memory memtype) ++{ ++ struct qent_dst *const be_dst = malloc(sizeof(*be_dst)); ++ if (!be_dst) ++ return NULL; ++ *be_dst = (struct qent_dst){ ++ .base = QENT_BASE_INITIALIZER(memtype), ++ .lock = PTHREAD_MUTEX_INITIALIZER, ++ .cond = PTHREAD_COND_INITIALIZER, ++ .mbc_wl = ff_weak_link_ref(wl) ++ }; ++ return be_dst; ++} ++ ++static void ql_add_tail(struct qe_list_head * const ql, struct qent_base * be) ++{ ++ if (ql->tail) ++ ql->tail->next = be; ++ else ++ ql->head = be; ++ be->prev = ql->tail; ++ be->next = NULL; ++ ql->tail = be; ++} ++ ++static struct qent_base * ql_extract(struct qe_list_head * const ql, struct qent_base * be) ++{ ++ if (!be) ++ return NULL; ++ ++ if (be->next) ++ be->next->prev = be->prev; ++ else ++ ql->tail = be->prev; ++ if (be->prev) ++ be->prev->next = be->next; ++ else ++ ql->head = be->next; ++ be->next = NULL; ++ be->prev = NULL; ++ return be; ++} ++ ++ ++static void bq_put_free(struct buf_pool *const bp, struct qent_base * be) ++{ ++ ql_add_tail(&bp->free, be); ++} ++ ++static struct qent_base * bq_get_free(struct buf_pool *const bp) ++{ ++ return ql_extract(&bp->free, bp->free.head); ++} ++ ++static struct qent_base * bq_extract_inuse(struct buf_pool *const bp, struct qent_base *const be) ++{ ++ return ql_extract(&bp->inuse, be); ++} ++ ++static struct qent_base * bq_get_inuse(struct buf_pool *const bp) ++{ ++ return ql_extract(&bp->inuse, bp->inuse.head); ++} ++ ++static void bq_free_all_free_src(struct buf_pool *const bp) ++{ ++ struct qent_base *be; ++ while ((be = bq_get_free(bp)) != NULL) ++ qe_src_free(base_to_src(be)); ++} ++ ++static void bq_free_all_inuse_src(struct buf_pool *const bp) ++{ ++ struct qent_base *be; ++ while ((be = bq_get_inuse(bp)) != NULL) ++ qe_src_free(base_to_src(be)); ++} ++ ++static void bq_free_all_free_dst(struct buf_pool *const bp) ++{ ++ struct qent_base *be; ++ while ((be = bq_get_free(bp)) != NULL) ++ qe_dst_free(base_to_dst(be)); ++} ++ ++static void queue_put_free(struct buf_pool *const bp, struct qent_base *be) ++{ ++ unsigned int i; ++ ++ pthread_mutex_lock(&bp->lock); ++ /* Clear out state vars */ ++ be->timestamp.tv_sec = 0; ++ be->timestamp.tv_usec = 0; ++ be->status = QENT_FREE; ++ for (i = 0; i < VIDEO_MAX_PLANES && be->dh[i]; ++i) ++ dmabuf_len_set(be->dh[i], 0); ++ bq_put_free(bp, be); ++ pthread_mutex_unlock(&bp->lock); ++ sem_post(&bp->free_sem); ++} ++ ++static bool queue_is_inuse(const struct buf_pool *const bp) ++{ ++ return bp->inuse.tail != NULL; ++} ++ ++static void queue_put_inuse(struct buf_pool *const bp, struct qent_base *be) ++{ ++ if (!be) ++ return; ++ pthread_mutex_lock(&bp->lock); ++ ql_add_tail(&bp->inuse, be); ++ be->status = QENT_WAITING; ++ pthread_mutex_unlock(&bp->lock); ++} ++ ++static struct qent_base *queue_get_free(struct buf_pool *const bp) ++{ ++ struct qent_base *buf; ++ ++ if (do_wait(&bp->free_sem)) ++ return NULL; ++ pthread_mutex_lock(&bp->lock); ++ buf = bq_get_free(bp); ++ pthread_mutex_unlock(&bp->lock); ++ return buf; ++} ++ ++static struct qent_base *queue_tryget_free(struct buf_pool *const bp) ++{ ++ struct qent_base *buf; ++ ++ if (do_trywait(&bp->free_sem)) ++ return NULL; ++ pthread_mutex_lock(&bp->lock); ++ buf = bq_get_free(bp); ++ pthread_mutex_unlock(&bp->lock); ++ return buf; ++} ++ ++static struct qent_base * queue_find_extract_index(struct buf_pool *const bp, const unsigned int index) ++{ ++ struct qent_base *be; ++ ++ pthread_mutex_lock(&bp->lock); ++ /* Expect 1st in Q, but allow anywhere */ ++ for (be = bp->inuse.head; be; be = be->next) { ++ if (be->index == index) { ++ bq_extract_inuse(bp, be); ++ break; ++ } ++ } ++ pthread_mutex_unlock(&bp->lock); ++ ++ return be; ++} ++ ++static void queue_delete(struct buf_pool *const bp) ++{ ++ sem_destroy(&bp->free_sem); ++ pthread_mutex_destroy(&bp->lock); ++ free(bp); ++} ++ ++static struct buf_pool* queue_new(const int vfd) ++{ ++ struct buf_pool *bp = calloc(1, sizeof(*bp)); ++ if (!bp) ++ return NULL; ++ pthread_mutex_init(&bp->lock, NULL); ++ sem_init(&bp->free_sem, 0, 0); ++ return bp; ++} ++ ++ ++struct mediabufs_ctl { ++ atomic_int ref_count; /* 0 is single ref for easier atomics */ ++ void * dc; ++ int vfd; ++ bool stream_on; ++ bool polling; ++ bool dst_fixed; // Dst Q is fixed size ++ pthread_mutex_t lock; ++ struct buf_pool * src; ++ struct buf_pool * dst; ++ struct polltask * pt; ++ struct pollqueue * pq; ++ struct ff_weak_link_master * this_wlm; ++ ++ enum mediabufs_memory src_memtype; ++ enum mediabufs_memory dst_memtype; ++ struct v4l2_format src_fmt; ++ struct v4l2_format dst_fmt; ++ struct v4l2_capability capability; ++}; ++ ++static int qe_v4l2_queue(struct qent_base *const be, ++ const int vfd, struct media_request *const mreq, ++ const struct v4l2_format *const fmt, ++ const bool is_dst, const bool hold_flag) ++{ ++ struct v4l2_buffer buffer = { ++ .type = fmt->type, ++ .memory = mediabufs_memory_to_v4l2(be->memtype), ++ .index = be->index ++ }; ++ struct v4l2_plane planes[VIDEO_MAX_PLANES] = {{0}}; ++ ++ if (V4L2_TYPE_IS_MULTIPLANAR(fmt->type)) { ++ unsigned int i; ++ for (i = 0; i < VIDEO_MAX_PLANES && be->dh[i]; ++i) { ++ if (is_dst) ++ dmabuf_len_set(be->dh[i], 0); ++ ++ /* *** Really need a pixdesc rather than a format so we can fill in data_offset */ ++ planes[i].length = dmabuf_size(be->dh[i]); ++ planes[i].bytesused = dmabuf_len(be->dh[i]); ++ if (be->memtype == MEDIABUFS_MEMORY_DMABUF) ++ planes[i].m.fd = dmabuf_fd(be->dh[i]); ++ else ++ planes[i].m.mem_offset = 0; ++ } ++ buffer.m.planes = planes; ++ buffer.length = i; ++ } ++ else { ++ if (is_dst) ++ dmabuf_len_set(be->dh[0], 0); ++ ++ buffer.bytesused = dmabuf_len(be->dh[0]); ++ buffer.length = dmabuf_size(be->dh[0]); ++ if (be->memtype == MEDIABUFS_MEMORY_DMABUF) ++ buffer.m.fd = dmabuf_fd(be->dh[0]); ++ else ++ buffer.m.offset = 0; ++ } ++ ++ if (!is_dst && mreq) { ++ buffer.flags |= V4L2_BUF_FLAG_REQUEST_FD; ++ buffer.request_fd = media_request_fd(mreq); ++ if (hold_flag) ++ buffer.flags |= V4L2_BUF_FLAG_M2M_HOLD_CAPTURE_BUF; ++ } ++ ++ if (is_dst) ++ be->timestamp = (struct timeval){0,0}; ++ ++ buffer.timestamp = be->timestamp; ++ ++ while (ioctl(vfd, VIDIOC_QBUF, &buffer)) { ++ const int err = errno; ++ if (err != EINTR) { ++ request_log("%s: Failed to Q buffer: err=%d (%s)\n", __func__, err, strerror(err)); ++ return -err; ++ } ++ } ++ return 0; ++} ++ ++static struct qent_base * qe_dequeue(struct buf_pool *const bp, ++ const int vfd, ++ const struct v4l2_format * const f) ++{ ++ struct qent_base *be; ++ int rc; ++ const bool mp = V4L2_TYPE_IS_MULTIPLANAR(f->type); ++ struct v4l2_plane planes[VIDEO_MAX_PLANES] = {{0}}; ++ struct v4l2_buffer buffer = { ++ .type = f->type, ++ .memory = mediabufs_memory_to_v4l2(bp->memtype) ++ }; ++ if (mp) { ++ buffer.length = f->fmt.pix_mp.num_planes; ++ buffer.m.planes = planes; ++ } ++ ++ while ((rc = ioctl(vfd, VIDIOC_DQBUF, &buffer)) != 0 && ++ errno == EINTR) ++ /* Loop */; ++ if (rc) { ++ request_log("Error DQing buffer type %d: %s\n", f->type, strerror(errno)); ++ return NULL; ++ } ++ ++ be = queue_find_extract_index(bp, buffer.index); ++ if (!be) { ++ request_log("Failed to find index %d in Q\n", buffer.index); ++ return NULL; ++ } ++ ++ if (mp) { ++ unsigned int i; ++ for (i = 0; i != buffer.length; ++i) ++ dmabuf_len_set(be->dh[i], V4L2_TYPE_IS_CAPTURE(f->type) ? planes[i].bytesused : 0); ++ } ++ else ++ dmabuf_len_set(be->dh[0], V4L2_TYPE_IS_CAPTURE(f->type) ? buffer.length : 0); ++ ++ be->timestamp = buffer.timestamp; ++ be->status = (buffer.flags & V4L2_BUF_FLAG_ERROR) ? QENT_ERROR : QENT_DONE; ++ return be; ++} ++ ++static void qe_dst_done(struct qent_dst * dst_be) ++{ ++ pthread_mutex_lock(&dst_be->lock); ++ dst_be->waiting = false; ++ pthread_cond_broadcast(&dst_be->cond); ++ pthread_mutex_unlock(&dst_be->lock); ++ ++ qent_dst_unref(&dst_be); ++} ++ ++static bool qe_dst_waiting(struct qent_dst *const dst_be) ++{ ++ bool waiting; ++ pthread_mutex_lock(&dst_be->lock); ++ waiting = dst_be->waiting; ++ dst_be->waiting = true; ++ pthread_mutex_unlock(&dst_be->lock); ++ return waiting; ++} ++ ++ ++static bool mediabufs_wants_poll(const struct mediabufs_ctl *const mbc) ++{ ++ return queue_is_inuse(mbc->src) || queue_is_inuse(mbc->dst); ++} ++ ++static void mediabufs_poll_cb(void * v, short revents) ++{ ++ struct mediabufs_ctl *mbc = v; ++ struct qent_src *src_be = NULL; ++ struct qent_dst *dst_be = NULL; ++ ++ if (!revents) ++ request_err(mbc->dc, "%s: Timeout\n", __func__); ++ ++ pthread_mutex_lock(&mbc->lock); ++ mbc->polling = false; ++ ++ if ((revents & POLLOUT) != 0) ++ src_be = base_to_src(qe_dequeue(mbc->src, mbc->vfd, &mbc->src_fmt)); ++ if ((revents & POLLIN) != 0) ++ dst_be = base_to_dst(qe_dequeue(mbc->dst, mbc->vfd, &mbc->dst_fmt)); ++ ++ /* Reschedule */ ++ if (mediabufs_wants_poll(mbc)) { ++ mbc->polling = true; ++ pollqueue_add_task(mbc->pt, 2000); ++ } ++ pthread_mutex_unlock(&mbc->lock); ++ ++ if (src_be) ++ queue_put_free(mbc->src, &src_be->base); ++ if (dst_be) ++ qe_dst_done(dst_be); ++} ++ ++int qent_src_params_set(struct qent_src *const be_src, const struct timeval * timestamp) ++{ ++ struct qent_base *const be = &be_src->base; ++ ++ be->timestamp = *timestamp; ++ return 0; ++} ++ ++struct timeval qent_dst_timestamp_get(const struct qent_dst *const be_dst) ++{ ++ return be_dst->base.timestamp; ++} ++ ++static int qent_base_realloc(struct qent_base *const be, const size_t len, struct dmabufs_ctl * dbsc) ++{ ++ if (!be->dh[0] || len > dmabuf_size(be->dh[0])) { ++ size_t newsize = round_up_size(len); ++ request_log("%s: Overrun %zd > %zd; trying %zd\n", __func__, len, dmabuf_size(be->dh[0]), newsize); ++ if (!dbsc) { ++ request_log("%s: No dmbabuf_ctrl for realloc\n", __func__); ++ return -ENOMEM; ++ } ++ if ((be->dh[0] = dmabuf_realloc(dbsc, be->dh[0], newsize)) == NULL) { ++ request_log("%s: Realloc %zd failed\n", __func__, newsize); ++ return -ENOMEM; ++ } ++ } ++ return 0; ++} ++ ++int qent_src_alloc(struct qent_src *const be_src, const size_t len, struct dmabufs_ctl * dbsc) ++{ ++ struct qent_base *const be = &be_src->base; ++ return qent_base_realloc(be, len, dbsc); ++} ++ ++ ++int qent_src_data_copy(struct qent_src *const be_src, const size_t offset, const void *const src, const size_t len, struct dmabufs_ctl * dbsc) ++{ ++ void * dst; ++ struct qent_base *const be = &be_src->base; ++ int rv; ++ ++ // Realloc doesn't copy so don't alloc if offset != 0 ++ if ((rv = qent_base_realloc(be, offset + len, ++ be_src->fixed_size || offset ? NULL : dbsc)) != 0) ++ return rv; ++ ++ dmabuf_write_start(be->dh[0]); ++ dst = dmabuf_map(be->dh[0]); ++ if (!dst) ++ return -1; ++ memcpy((char*)dst + offset, src, len); ++ dmabuf_len_set(be->dh[0], len); ++ dmabuf_write_end(be->dh[0]); ++ return 0; ++} ++ ++const struct dmabuf_h * qent_dst_dmabuf(const struct qent_dst *const be_dst, unsigned int plane) ++{ ++ const struct qent_base *const be = &be_dst->base; ++ ++ return (plane >= sizeof(be->dh)/sizeof(be->dh[0])) ? NULL : be->dh[plane]; ++} ++ ++int qent_dst_dup_fd(const struct qent_dst *const be_dst, unsigned int plane) ++{ ++ return dup(dmabuf_fd(qent_dst_dmabuf(be_dst, plane))); ++} ++ ++MediaBufsStatus mediabufs_start_request(struct mediabufs_ctl *const mbc, ++ struct media_request **const pmreq, ++ struct qent_src **const psrc_be, ++ struct qent_dst *const dst_be, ++ const bool is_final) ++{ ++ struct media_request * mreq = *pmreq; ++ struct qent_src *const src_be = *psrc_be; ++ ++ // Req & src are always both "consumed" ++ *pmreq = NULL; ++ *psrc_be = NULL; ++ ++ pthread_mutex_lock(&mbc->lock); ++ ++ if (!src_be) ++ goto fail1; ++ ++ if (dst_be) { ++ if (qe_dst_waiting(dst_be)) { ++ request_info(mbc->dc, "Request buffer already waiting on start\n"); ++ goto fail1; ++ } ++ dst_be->base.timestamp = (struct timeval){0,0}; ++ if (qe_v4l2_queue(&dst_be->base, mbc->vfd, NULL, &mbc->dst_fmt, true, false)) ++ goto fail1; ++ ++ qent_dst_ref(dst_be); ++ queue_put_inuse(mbc->dst, &dst_be->base); ++ } ++ ++ if (qe_v4l2_queue(&src_be->base, mbc->vfd, mreq, &mbc->src_fmt, false, !is_final)) ++ goto fail1; ++ queue_put_inuse(mbc->src, &src_be->base); ++ ++ if (!mbc->polling && mediabufs_wants_poll(mbc)) { ++ mbc->polling = true; ++ pollqueue_add_task(mbc->pt, 2000); ++ } ++ pthread_mutex_unlock(&mbc->lock); ++ ++ if (media_request_start(mreq)) ++ return MEDIABUFS_ERROR_OPERATION_FAILED; ++ ++ return MEDIABUFS_STATUS_SUCCESS; ++ ++fail1: ++ media_request_abort(&mreq); ++ if (src_be) ++ queue_put_free(mbc->src, &src_be->base); ++ ++// *** TODO: If src Q fails this doesnt unwind properly - separate dst Q from src Q ++ if (dst_be) { ++ dst_be->base.status = QENT_ERROR; ++ qe_dst_done(dst_be); ++ } ++ pthread_mutex_unlock(&mbc->lock); ++ return MEDIABUFS_ERROR_OPERATION_FAILED; ++} ++ ++ ++static int qe_alloc_from_fmt(struct qent_base *const be, ++ struct dmabufs_ctl *const dbsc, ++ const struct v4l2_format *const fmt) ++{ ++ if (V4L2_TYPE_IS_MULTIPLANAR(fmt->type)) { ++ unsigned int i; ++ for (i = 0; i != fmt->fmt.pix_mp.num_planes; ++i) { ++ be->dh[i] = dmabuf_realloc(dbsc, be->dh[i], ++ fmt->fmt.pix_mp.plane_fmt[i].sizeimage); ++ /* On failure tidy up and die */ ++ if (!be->dh[i]) { ++ while (i--) { ++ dmabuf_free(be->dh[i]); ++ be->dh[i] = NULL; ++ } ++ return -1; ++ } ++ } ++ } ++ else { ++// be->dh[0] = dmabuf_alloc(dbsc, fmt->fmt.pix.sizeimage); ++ size_t size = fmt->fmt.pix.sizeimage; ++ be->dh[0] = dmabuf_realloc(dbsc, be->dh[0], size); ++ if (!be->dh[0]) ++ return -1; ++ } ++ return 0; ++} ++ ++static MediaBufsStatus fmt_set(struct v4l2_format *const fmt, const int fd, ++ const enum v4l2_buf_type buftype, ++ uint32_t pixfmt, ++ const unsigned int width, const unsigned int height, ++ const size_t bufsize) ++{ ++ *fmt = (struct v4l2_format){.type = buftype}; ++ ++ if (V4L2_TYPE_IS_MULTIPLANAR(buftype)) { ++ fmt->fmt.pix_mp.width = width; ++ fmt->fmt.pix_mp.height = height; ++ fmt->fmt.pix_mp.pixelformat = pixfmt; ++ if (bufsize) { ++ fmt->fmt.pix_mp.num_planes = 1; ++ fmt->fmt.pix_mp.plane_fmt[0].sizeimage = bufsize; ++ } ++ } ++ else { ++ fmt->fmt.pix.width = width; ++ fmt->fmt.pix.height = height; ++ fmt->fmt.pix.pixelformat = pixfmt; ++ fmt->fmt.pix.sizeimage = bufsize; ++ } ++ ++ while (ioctl(fd, VIDIOC_S_FMT, fmt)) ++ if (errno != EINTR) ++ return MEDIABUFS_ERROR_OPERATION_FAILED; ++ ++ // Treat anything where we don't get at least what we asked for as a fail ++ if (V4L2_TYPE_IS_MULTIPLANAR(buftype)) { ++ if (fmt->fmt.pix_mp.width < width || ++ fmt->fmt.pix_mp.height < height || ++ fmt->fmt.pix_mp.pixelformat != pixfmt) { ++ return MEDIABUFS_ERROR_UNSUPPORTED_BUFFERTYPE; ++ } ++ } ++ else { ++ if (fmt->fmt.pix.width < width || ++ fmt->fmt.pix.height < height || ++ fmt->fmt.pix.pixelformat != pixfmt) { ++ return MEDIABUFS_ERROR_UNSUPPORTED_BUFFERTYPE; ++ } ++ } ++ ++ return MEDIABUFS_STATUS_SUCCESS; ++} ++ ++static MediaBufsStatus find_fmt_flags(struct v4l2_format *const fmt, ++ const int fd, ++ const unsigned int type_v4l2, ++ const uint32_t flags_must, ++ const uint32_t flags_not, ++ const unsigned int width, ++ const unsigned int height, ++ mediabufs_dst_fmt_accept_fn *const accept_fn, ++ void *const accept_v) ++{ ++ unsigned int i; ++ ++ for (i = 0;; ++i) { ++ struct v4l2_fmtdesc fmtdesc = { ++ .index = i, ++ .type = type_v4l2 ++ }; ++ while (ioctl(fd, VIDIOC_ENUM_FMT, &fmtdesc)) { ++ if (errno != EINTR) ++ return MEDIABUFS_ERROR_UNSUPPORTED_BUFFERTYPE; ++ } ++ if ((fmtdesc.flags & flags_must) != flags_must || ++ (fmtdesc.flags & flags_not)) ++ continue; ++ if (!accept_fn(accept_v, &fmtdesc)) ++ continue; ++ ++ if (fmt_set(fmt, fd, fmtdesc.type, fmtdesc.pixelformat, ++ width, height, 0) == MEDIABUFS_STATUS_SUCCESS) ++ return MEDIABUFS_STATUS_SUCCESS; ++ } ++ return 0; ++} ++ ++ ++/* Wait for qent done */ ++ ++MediaBufsStatus qent_dst_wait(struct qent_dst *const be_dst) ++{ ++ struct qent_base *const be = &be_dst->base; ++ enum qent_status estat; ++ ++ pthread_mutex_lock(&be_dst->lock); ++ while (be_dst->waiting && ++ !pthread_cond_wait(&be_dst->cond, &be_dst->lock)) ++ /* Loop */; ++ estat = be->status; ++ pthread_mutex_unlock(&be_dst->lock); ++ ++ return estat == QENT_DONE ? MEDIABUFS_STATUS_SUCCESS : ++ estat == QENT_ERROR ? MEDIABUFS_ERROR_DECODING_ERROR : ++ MEDIABUFS_ERROR_OPERATION_FAILED; ++} ++ ++const uint8_t * qent_dst_data(struct qent_dst *const be_dst, unsigned int buf_no) ++{ ++ struct qent_base *const be = &be_dst->base; ++ return dmabuf_map(be->dh[buf_no]); ++} ++ ++MediaBufsStatus qent_dst_read_start(struct qent_dst *const be_dst) ++{ ++ struct qent_base *const be = &be_dst->base; ++ unsigned int i; ++ for (i = 0; i != VIDEO_MAX_PLANES && be->dh[i]; ++i) { ++ if (dmabuf_read_start(be->dh[i])) { ++ while (i--) ++ dmabuf_read_end(be->dh[i]); ++ return MEDIABUFS_ERROR_ALLOCATION_FAILED; ++ } ++ } ++ return MEDIABUFS_STATUS_SUCCESS; ++} ++ ++MediaBufsStatus qent_dst_read_stop(struct qent_dst *const be_dst) ++{ ++ struct qent_base *const be = &be_dst->base; ++ unsigned int i; ++ MediaBufsStatus status = MEDIABUFS_STATUS_SUCCESS; ++ ++ for (i = 0; i != VIDEO_MAX_PLANES && be->dh[i]; ++i) { ++ if (dmabuf_read_end(be->dh[i])) ++ status = MEDIABUFS_ERROR_OPERATION_FAILED; ++ } ++ return status; ++} ++ ++struct qent_dst * qent_dst_ref(struct qent_dst * const be_dst) ++{ ++ if (be_dst) ++ atomic_fetch_add(&be_dst->base.ref_count, 1); ++ return be_dst; ++} ++ ++void qent_dst_unref(struct qent_dst ** const pbe_dst) ++{ ++ struct qent_dst * const be_dst = *pbe_dst; ++ struct mediabufs_ctl * mbc; ++ if (!be_dst) ++ return; ++ *pbe_dst = NULL; ++ ++ if (atomic_fetch_sub(&be_dst->base.ref_count, 1) != 0) ++ return; ++ ++ if ((mbc = ff_weak_link_lock(&be_dst->mbc_wl)) != NULL) { ++ queue_put_free(mbc->dst, &be_dst->base); ++ ff_weak_link_unlock(be_dst->mbc_wl); ++ } ++ else { ++ qe_dst_free(be_dst); ++ } ++} ++ ++MediaBufsStatus qent_dst_import_fd(struct qent_dst *const be_dst, ++ unsigned int plane, ++ int fd, size_t size) ++{ ++ struct qent_base *const be = &be_dst->base; ++ struct dmabuf_h * dh; ++ ++ if (be->status != QENT_IMPORT || be->dh[plane]) ++ return MEDIABUFS_ERROR_OPERATION_FAILED; ++ ++ dh = dmabuf_import(fd, size); ++ if (!dh) ++ return MEDIABUFS_ERROR_ALLOCATION_FAILED; ++ ++ be->dh[plane] = dh; ++ return MEDIABUFS_STATUS_SUCCESS; ++} ++ ++// Returns noof buffers created, -ve for error ++static int create_dst_bufs(struct mediabufs_ctl *const mbc, unsigned int n, struct qent_dst * const qes[]) ++{ ++ unsigned int i; ++ ++ struct v4l2_create_buffers cbuf = { ++ .count = n, ++ .memory = mediabufs_memory_to_v4l2(mbc->dst->memtype), ++ .format = mbc->dst_fmt, ++ }; ++ ++ while (ioctl(mbc->vfd, VIDIOC_CREATE_BUFS, &cbuf)) { ++ const int err = -errno; ++ if (err != EINTR) { ++ request_err(mbc->dc, "%s: Failed to create V4L2 buffer\n", __func__); ++ return -err; ++ } ++ } ++ ++ if (cbuf.count != n) ++ request_warn(mbc->dc, "%s: Created %d of %d V4L2 buffers requested\n", __func__, cbuf.count, n); ++ ++ for (i = 0; i != cbuf.count; ++i) ++ qes[i]->base.index = cbuf.index + i; ++ ++ return cbuf.count; ++} ++ ++static MediaBufsStatus ++qe_import_from_buf(struct mediabufs_ctl *const mbc, struct qent_base * const be, const struct v4l2_format *const fmt, ++ const unsigned int n, const bool x_dmabuf) ++{ ++ struct v4l2_buffer buf = { ++ .index = n, ++ .type = fmt->type, ++ }; ++ struct v4l2_plane planes[VIDEO_MAX_PLANES]; ++ int ret; ++ ++ if (be->dh[0]) ++ return 0; ++ ++ if (V4L2_TYPE_IS_MULTIPLANAR(fmt->type)) { ++ memset(planes, 0, sizeof(planes)); ++ buf.m.planes = planes; ++ buf.length = VIDEO_MAX_PLANES; ++ } ++ ++ if ((ret = ioctl(mbc->vfd, VIDIOC_QUERYBUF, &buf)) != 0) { ++ request_err(mbc->dc, "VIDIOC_QUERYBUF failed"); ++ return MEDIABUFS_ERROR_OPERATION_FAILED; ++ } ++ ++ if (V4L2_TYPE_IS_MULTIPLANAR(fmt->type)) ++ { ++ unsigned int i; ++ for (i = 0; i != buf.length; ++i) { ++ if (x_dmabuf) { ++ struct v4l2_exportbuffer xbuf = { ++ .type = buf.type, ++ .index = buf.index, ++ .plane = i, ++ .flags = O_RDWR, // *** Arguably O_RDONLY would be fine ++ }; ++ if (ioctl(mbc->vfd, VIDIOC_EXPBUF, &xbuf) == 0) { ++ be->dh[i] = dmabuf_import(xbuf.fd, planes[i].length); ++ close(xbuf.fd); // dmabuf_import dups the fd so close this one ++ } ++ } ++ else { ++ be->dh[i] = dmabuf_import_mmap( ++ mmap(NULL, planes[i].length, ++ PROT_READ | PROT_WRITE, ++ MAP_SHARED | MAP_POPULATE, ++ mbc->vfd, planes[i].m.mem_offset), ++ planes[i].length); ++ } ++ /* On failure tidy up and die */ ++ if (!be->dh[i]) { ++ while (i--) { ++ dmabuf_free(be->dh[i]); ++ be->dh[i] = NULL; ++ } ++ return MEDIABUFS_ERROR_OPERATION_FAILED; ++ } ++ } ++ } ++ else ++ { ++ if (x_dmabuf) { ++ struct v4l2_exportbuffer xbuf = { ++ .type = buf.type, ++ .index = buf.index, ++ .flags = O_RDWR, // *** Arguably O_RDONLY would be fine ++ }; ++ if (ioctl(mbc->vfd, VIDIOC_EXPBUF, &xbuf) == 0) ++ be->dh[0] = dmabuf_import(xbuf.fd, buf.length); ++ } ++ else { ++ be->dh[0] = dmabuf_import_mmap( ++ mmap(NULL, buf.length, ++ PROT_READ | PROT_WRITE, ++ MAP_SHARED | MAP_POPULATE, ++ mbc->vfd, buf.m.offset), ++ buf.length); ++ } ++ /* On failure tidy up and die */ ++ if (!be->dh[0]) { ++ return MEDIABUFS_ERROR_OPERATION_FAILED; ++ } ++ } ++ ++ return 0; ++} ++ ++struct qent_dst* mediabufs_dst_qent_alloc(struct mediabufs_ctl *const mbc, struct dmabufs_ctl *const dbsc) ++{ ++ struct qent_dst * be_dst; ++ ++ if (mbc == NULL) { ++ be_dst = qe_dst_new(NULL, MEDIABUFS_MEMORY_DMABUF); ++ if (be_dst) ++ be_dst->base.status = QENT_IMPORT; ++ return be_dst; ++ } ++ ++ if (mbc->dst_fixed) { ++ be_dst = base_to_dst(queue_get_free(mbc->dst)); ++ if (!be_dst) ++ return NULL; ++ } ++ else { ++ be_dst = base_to_dst(queue_tryget_free(mbc->dst)); ++ if (!be_dst) { ++ be_dst = qe_dst_new(mbc->this_wlm, mbc->dst->memtype); ++ if (!be_dst) ++ return NULL; ++ ++ if (create_dst_bufs(mbc, 1, &be_dst) != 1) { ++ qe_dst_free(be_dst); ++ return NULL; ++ } ++ } ++ } ++ ++ if (mbc->dst->memtype == MEDIABUFS_MEMORY_MMAP) { ++ if (qe_import_from_buf(mbc, &be_dst->base, &mbc->dst_fmt, be_dst->base.index, true)) { ++ request_err(mbc->dc, "Failed to export as dmabuf\n"); ++ queue_put_free(mbc->dst, &be_dst->base); ++ return NULL; ++ } ++ } ++ else { ++ if (qe_alloc_from_fmt(&be_dst->base, dbsc, &mbc->dst_fmt)) { ++ /* Given how create buf works we can't uncreate it on alloc failure ++ * all we can do is put it on the free Q ++ */ ++ queue_put_free(mbc->dst, &be_dst->base); ++ return NULL; ++ } ++ } ++ ++ be_dst->base.status = QENT_PENDING; ++ atomic_store(&be_dst->base.ref_count, 0); ++ return be_dst; ++} ++ ++const struct v4l2_format *mediabufs_dst_fmt(struct mediabufs_ctl *const mbc) ++{ ++ return &mbc->dst_fmt; ++} ++ ++MediaBufsStatus mediabufs_dst_fmt_set(struct mediabufs_ctl *const mbc, ++ const unsigned int width, ++ const unsigned int height, ++ mediabufs_dst_fmt_accept_fn *const accept_fn, ++ void *const accept_v) ++{ ++ MediaBufsStatus status; ++ unsigned int i; ++ const enum v4l2_buf_type buf_type = mbc->dst_fmt.type; ++ static const struct { ++ unsigned int flags_must; ++ unsigned int flags_not; ++ } trys[] = { ++ {0, V4L2_FMT_FLAG_EMULATED}, ++ {V4L2_FMT_FLAG_EMULATED, 0}, ++ }; ++ for (i = 0; i != sizeof(trys)/sizeof(trys[0]); ++i) { ++ status = find_fmt_flags(&mbc->dst_fmt, mbc->vfd, ++ buf_type, ++ trys[i].flags_must, ++ trys[i].flags_not, ++ width, height, accept_fn, accept_v); ++ if (status != MEDIABUFS_ERROR_UNSUPPORTED_BUFFERTYPE) ++ return status; ++ } ++ ++ if (status != MEDIABUFS_STATUS_SUCCESS) ++ return status; ++ ++ /* Try to create a buffer - don't alloc */ ++ return status; ++} ++ ++// ** This is a mess if we get partial alloc but without any way to remove ++// individual V4L2 Q members we are somewhat stuffed ++MediaBufsStatus mediabufs_dst_slots_create(struct mediabufs_ctl *const mbc, const unsigned int n, const bool fixed, const enum mediabufs_memory memtype) ++{ ++ unsigned int i; ++ int a = 0; ++ unsigned int qc; ++ struct qent_dst * qes[32]; ++ ++ if (n > 32) ++ return MEDIABUFS_ERROR_ALLOCATION_FAILED; ++ ++ mbc->dst->memtype = memtype; ++ ++ // Create qents first as it is hard to get rid of the V4L2 buffers on error ++ for (qc = 0; qc != n; ++qc) ++ { ++ if ((qes[qc] = qe_dst_new(mbc->this_wlm, mbc->dst->memtype)) == NULL) ++ goto fail; ++ } ++ ++ if ((a = create_dst_bufs(mbc, n, qes)) < 0) ++ goto fail; ++ ++ for (i = 0; i != a; ++i) ++ queue_put_free(mbc->dst, &qes[i]->base); ++ ++ if (a != n) ++ goto fail; ++ ++ mbc->dst_fixed = fixed; ++ return MEDIABUFS_STATUS_SUCCESS; ++ ++fail: ++ for (i = (a < 0 ? 0 : a); i != qc; ++i) ++ qe_dst_free(qes[i]); ++ ++ return MEDIABUFS_ERROR_ALLOCATION_FAILED; ++} ++ ++struct qent_src *mediabufs_src_qent_get(struct mediabufs_ctl *const mbc) ++{ ++ struct qent_base * buf = queue_get_free(mbc->src); ++ buf->status = QENT_PENDING; ++ return base_to_src(buf); ++} ++ ++void mediabufs_src_qent_abort(struct mediabufs_ctl *const mbc, struct qent_src **const pqe_src) ++{ ++ struct qent_src *const qe_src = *pqe_src; ++ if (!qe_src) ++ return; ++ *pqe_src = NULL; ++ queue_put_free(mbc->src, &qe_src->base); ++} ++ ++static MediaBufsStatus ++chk_memory_type(struct mediabufs_ctl *const mbc, ++ const struct v4l2_format * const f, ++ const enum mediabufs_memory m) ++{ ++ struct v4l2_create_buffers cbuf = { ++ .count = 0, ++ .memory = V4L2_MEMORY_MMAP, ++ .format = *f ++ }; ++ ++ if (ioctl(mbc->vfd, VIDIOC_CREATE_BUFS, &cbuf) != 0) ++ return MEDIABUFS_ERROR_OPERATION_FAILED; ++ ++ switch (m) { ++ case MEDIABUFS_MEMORY_DMABUF: ++ // 0 = Unknown but assume not in that case ++ if ((cbuf.capabilities & V4L2_BUF_CAP_SUPPORTS_DMABUF) == 0) ++ return MEDIABUFS_ERROR_UNSUPPORTED_MEMORY; ++ break; ++ case MEDIABUFS_MEMORY_MMAP: ++ break; ++ default: ++ return MEDIABUFS_ERROR_UNSUPPORTED_MEMORY; ++ } ++ ++ return MEDIABUFS_STATUS_SUCCESS; ++} ++ ++MediaBufsStatus ++mediabufs_src_chk_memtype(struct mediabufs_ctl *const mbc, const enum mediabufs_memory memtype) ++{ ++ return chk_memory_type(mbc, &mbc->src_fmt, memtype); ++} ++ ++MediaBufsStatus ++mediabufs_dst_chk_memtype(struct mediabufs_ctl *const mbc, const enum mediabufs_memory memtype) ++{ ++ return chk_memory_type(mbc, &mbc->dst_fmt, memtype); ++} ++ ++/* src format must have been set up before this */ ++MediaBufsStatus mediabufs_src_pool_create(struct mediabufs_ctl *const mbc, ++ struct dmabufs_ctl * const dbsc, ++ unsigned int n, const enum mediabufs_memory memtype) ++{ ++ unsigned int i; ++ struct v4l2_requestbuffers req = { ++ .count = n, ++ .type = mbc->src_fmt.type, ++ .memory = mediabufs_memory_to_v4l2(memtype) ++ }; ++ ++ bq_free_all_free_src(mbc->src); ++ ++ while (ioctl(mbc->vfd, VIDIOC_REQBUFS, &req) == -1) { ++ if (errno != EINTR) { ++ request_err(mbc->dc, "%s: Failed to request src bufs\n", __func__); ++ return MEDIABUFS_ERROR_OPERATION_FAILED; ++ } ++ } ++ ++ if (n > req.count) { ++ request_info(mbc->dc, "Only allocated %d of %d src buffers requested\n", req.count, n); ++ n = req.count; ++ } ++ ++ for (i = 0; i != n; ++i) { ++ struct qent_src *const be_src = qe_src_new(memtype); ++ if (!be_src) { ++ request_err(mbc->dc, "Failed to create src be %d\n", i); ++ goto fail; ++ } ++ switch (memtype) { ++ case MEDIABUFS_MEMORY_MMAP: ++ if (qe_import_from_buf(mbc, &be_src->base, &mbc->src_fmt, i, false)) { ++ qe_src_free(be_src); ++ goto fail; ++ } ++ be_src->fixed_size = 1; ++ break; ++ case MEDIABUFS_MEMORY_DMABUF: ++ if (qe_alloc_from_fmt(&be_src->base, dbsc, &mbc->src_fmt)) { ++ qe_src_free(be_src); ++ goto fail; ++ } ++ be_src->fixed_size = !mediabufs_src_resizable(mbc); ++ break; ++ default: ++ request_err(mbc->dc, "Unexpected memorty type\n"); ++ goto fail; ++ } ++ be_src->base.index = i; ++ ++ queue_put_free(mbc->src, &be_src->base); ++ } ++ ++ mbc->src->memtype = memtype; ++ return MEDIABUFS_STATUS_SUCCESS; ++ ++fail: ++ bq_free_all_free_src(mbc->src); ++ req.count = 0; ++ while (ioctl(mbc->vfd, VIDIOC_REQBUFS, &req) == -1 && ++ errno == EINTR) ++ /* Loop */; ++ ++ return MEDIABUFS_ERROR_OPERATION_FAILED; ++} ++ ++ ++ ++/* ++ * Set stuff order: ++ * Set src fmt ++ * Set parameters (sps) on vfd ++ * Negotiate dst format (dst_fmt_set) ++ * Create src buffers ++ * Alloc a dst buffer or Create dst slots ++*/ ++MediaBufsStatus mediabufs_stream_on(struct mediabufs_ctl *const mbc) ++{ ++ if (mbc->stream_on) ++ return MEDIABUFS_STATUS_SUCCESS; ++ ++ if (set_stream(mbc->vfd, mbc->src_fmt.type, true) < 0) { ++ request_log("Failed to set stream on src type %d\n", mbc->src_fmt.type); ++ return MEDIABUFS_ERROR_OPERATION_FAILED; ++ } ++ ++ if (set_stream(mbc->vfd, mbc->dst_fmt.type, true) < 0) { ++ request_log("Failed to set stream on dst type %d\n", mbc->dst_fmt.type); ++ set_stream(mbc->vfd, mbc->src_fmt.type, false); ++ return MEDIABUFS_ERROR_OPERATION_FAILED; ++ } ++ ++ mbc->stream_on = true; ++ return MEDIABUFS_STATUS_SUCCESS; ++} ++ ++MediaBufsStatus mediabufs_stream_off(struct mediabufs_ctl *const mbc) ++{ ++ MediaBufsStatus status = MEDIABUFS_STATUS_SUCCESS; ++ ++ if (!mbc->stream_on) ++ return MEDIABUFS_STATUS_SUCCESS; ++ ++ if (set_stream(mbc->vfd, mbc->dst_fmt.type, false) < 0) { ++ request_log("Failed to set stream off dst type %d\n", mbc->dst_fmt.type); ++ status = MEDIABUFS_ERROR_OPERATION_FAILED; ++ } ++ ++ if (set_stream(mbc->vfd, mbc->src_fmt.type, false) < 0) { ++ request_log("Failed to set stream off src type %d\n", mbc->src_fmt.type); ++ status = MEDIABUFS_ERROR_OPERATION_FAILED; ++ } ++ ++ mbc->stream_on = false; ++ return status; ++} ++ ++int mediabufs_ctl_set_ext_ctrls(struct mediabufs_ctl * mbc, struct media_request * const mreq, struct v4l2_ext_control control_array[], unsigned int n) ++{ ++ struct v4l2_ext_controls controls = { ++ .controls = control_array, ++ .count = n ++ }; ++ ++ if (mreq) { ++ controls.which = V4L2_CTRL_WHICH_REQUEST_VAL; ++ controls.request_fd = media_request_fd(mreq); ++ } ++ ++ while (ioctl(mbc->vfd, VIDIOC_S_EXT_CTRLS, &controls)) ++ { ++ const int err = errno; ++ if (err != EINTR) { ++ request_err(mbc->dc, "Unable to set controls: %s\n", strerror(err)); ++ return -err; ++ } ++ } ++ ++ return 0; ++} ++ ++MediaBufsStatus mediabufs_set_ext_ctrl(struct mediabufs_ctl *const mbc, ++ struct media_request * const mreq, ++ unsigned int id, void *data, ++ unsigned int size) ++{ ++ struct v4l2_ext_control control = { ++ .id = id, ++ .ptr = data, ++ .size = size ++ }; ++ ++ int rv = mediabufs_ctl_set_ext_ctrls(mbc, mreq, &control, 1); ++ return !rv ? MEDIABUFS_STATUS_SUCCESS : MEDIABUFS_ERROR_OPERATION_FAILED; ++} ++ ++MediaBufsStatus mediabufs_src_fmt_set(struct mediabufs_ctl *const mbc, ++ enum v4l2_buf_type buf_type, ++ const uint32_t pixfmt, ++ const uint32_t width, const uint32_t height, ++ const size_t bufsize) ++{ ++ MediaBufsStatus rv = fmt_set(&mbc->src_fmt, mbc->vfd, buf_type, pixfmt, width, height, bufsize); ++ if (rv != MEDIABUFS_STATUS_SUCCESS) ++ request_err(mbc->dc, "Failed to set src buftype %d, format %#x %dx%d\n", buf_type, pixfmt, width, height); ++ ++ return rv; ++} ++ ++int mediabufs_ctl_query_ext_ctrls(struct mediabufs_ctl * mbc, struct v4l2_query_ext_ctrl ctrls[], unsigned int n) ++{ ++ int rv = 0; ++ while (n--) { ++ while (ioctl(mbc->vfd, VIDIOC_QUERY_EXT_CTRL, ctrls)) { ++ const int err = errno; ++ if (err != EINTR) { ++ // Often used for probing - errors are to be expected ++ request_debug(mbc->dc, "Failed to query ext id=%#x, err=%d\n", ctrls->id, err); ++ ctrls->type = 0; // 0 is invalid ++ rv = -err; ++ break; ++ } ++ } ++ ++ctrls; ++ } ++ return rv; ++} ++ ++int mediabufs_src_resizable(const struct mediabufs_ctl *const mbc) ++{ ++#if 1 ++ return 0; ++#else ++ // Single planar OUTPUT can only take exact size buffers ++ // Multiplanar will take larger than negotiated ++ return V4L2_TYPE_IS_MULTIPLANAR(mbc->src_fmt.type); ++#endif ++} ++ ++static void mediabufs_ctl_delete(struct mediabufs_ctl *const mbc) ++{ ++ if (!mbc) ++ return; ++ ++ // Break the weak link first ++ ff_weak_link_break(&mbc->this_wlm); ++ ++ polltask_delete(&mbc->pt); ++ ++ mediabufs_stream_off(mbc); ++ ++ // Empty v4l2 buffer stash ++ request_buffers(mbc->vfd, mbc->src_fmt.type, V4L2_MEMORY_MMAP, 0); ++ request_buffers(mbc->vfd, mbc->dst_fmt.type, V4L2_MEMORY_MMAP, 0); ++ ++ bq_free_all_free_src(mbc->src); ++ bq_free_all_inuse_src(mbc->src); ++ bq_free_all_free_dst(mbc->dst); ++ ++ { ++ struct qent_dst *dst_be; ++ while ((dst_be = base_to_dst(bq_get_inuse(mbc->dst))) != NULL) { ++ dst_be->base.timestamp = (struct timeval){0}; ++ dst_be->base.status = QENT_ERROR; ++ qe_dst_done(dst_be); ++ } ++ } ++ ++ queue_delete(mbc->dst); ++ queue_delete(mbc->src); ++ close(mbc->vfd); ++ pthread_mutex_destroy(&mbc->lock); ++ ++ free(mbc); ++} ++ ++struct mediabufs_ctl * mediabufs_ctl_ref(struct mediabufs_ctl *const mbc) ++{ ++ atomic_fetch_add(&mbc->ref_count, 1); ++ return mbc; ++} ++ ++void mediabufs_ctl_unref(struct mediabufs_ctl **const pmbc) ++{ ++ struct mediabufs_ctl *const mbc = *pmbc; ++ int n; ++ ++ if (!mbc) ++ return; ++ *pmbc = NULL; ++ n = atomic_fetch_sub(&mbc->ref_count, 1); ++ if (n) ++ return; ++ mediabufs_ctl_delete(mbc); ++} ++ ++unsigned int mediabufs_ctl_driver_version(struct mediabufs_ctl *const mbc) ++{ ++ return mbc->capability.version; ++} ++ ++static int set_capabilities(struct mediabufs_ctl *const mbc) ++{ ++ uint32_t caps; ++ ++ if (ioctl(mbc->vfd, VIDIOC_QUERYCAP, &mbc->capability)) { ++ int err = errno; ++ request_err(mbc->dc, "Failed to get capabilities: %s\n", strerror(err)); ++ return -err; ++ } ++ ++ caps = (mbc->capability.capabilities & V4L2_CAP_DEVICE_CAPS) != 0 ? ++ mbc->capability.device_caps : ++ mbc->capability.capabilities; ++ ++ if ((caps & V4L2_CAP_VIDEO_M2M_MPLANE) != 0) { ++ mbc->src_fmt.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE; ++ mbc->dst_fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; ++ } ++ else if ((caps & V4L2_CAP_VIDEO_M2M) != 0) { ++ mbc->src_fmt.type = V4L2_BUF_TYPE_VIDEO_OUTPUT; ++ mbc->dst_fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; ++ } ++ else { ++ request_err(mbc->dc, "No M2M capabilities (%#x)\n", caps); ++ return -EINVAL; ++ } ++ ++ return 0; ++} ++ ++/* One of these per context */ ++struct mediabufs_ctl * mediabufs_ctl_new(void * const dc, const char * vpath, struct pollqueue *const pq) ++{ ++ struct mediabufs_ctl *const mbc = calloc(1, sizeof(*mbc)); ++ ++ if (!mbc) ++ return NULL; ++ ++ mbc->dc = dc; ++ // Default mono planar ++ mbc->pq = pq; ++ pthread_mutex_init(&mbc->lock, NULL); ++ ++ /* Pick a default - could we scan for this? */ ++ if (vpath == NULL) ++ vpath = "/dev/media0"; ++ ++ while ((mbc->vfd = open(vpath, O_RDWR)) == -1) ++ { ++ const int err = errno; ++ if (err != EINTR) { ++ request_err(dc, "Failed to open video dev '%s': %s\n", vpath, strerror(err)); ++ goto fail0; ++ } ++ } ++ ++ if (set_capabilities(mbc)) { ++ request_err(dc, "Bad capabilities for video dev '%s'\n", vpath); ++ goto fail1; ++ } ++ ++ mbc->src = queue_new(mbc->vfd); ++ if (!mbc->src) ++ goto fail1; ++ mbc->dst = queue_new(mbc->vfd); ++ if (!mbc->dst) ++ goto fail2; ++ mbc->pt = polltask_new(pq, mbc->vfd, POLLIN | POLLOUT, mediabufs_poll_cb, mbc); ++ if (!mbc->pt) ++ goto fail3; ++ mbc->this_wlm = ff_weak_link_new(mbc); ++ if (!mbc->this_wlm) ++ goto fail4; ++ ++ /* Cannot add polltask now - polling with nothing pending ++ * generates infinite error polls ++ */ ++ return mbc; ++ ++fail4: ++ polltask_delete(&mbc->pt); ++fail3: ++ queue_delete(mbc->dst); ++fail2: ++ queue_delete(mbc->src); ++fail1: ++ close(mbc->vfd); ++fail0: ++ free(mbc); ++ request_info(dc, "%s: FAILED\n", __func__); ++ return NULL; ++} ++ ++ ++ +--- /dev/null ++++ b/libavcodec/v4l2_req_media.h +@@ -0,0 +1,171 @@ ++/* ++e.h ++* ++ * Permission is hereby granted, free of charge, to any person obtaining a ++ * copy of this software and associated documentation files (the ++ * "Software"), to deal in the Software without restriction, including ++ * without limitation the rights to use, copy, modify, merge, publish, ++ * distribute, sub license, and/or sell copies of the Software, and to ++ * permit persons to whom the Software is furnished to do so, subject to ++ * the following conditions: ++ * ++ * The above copyright notice and this permission notice (including the ++ * next paragraph) shall be included in all copies or substantial portions ++ * of the Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ++ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. ++ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ++ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, ++ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE ++ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ++ */ ++ ++#ifndef _MEDIA_H_ ++#define _MEDIA_H_ ++ ++#include ++#include ++ ++struct v4l2_format; ++struct v4l2_fmtdesc; ++struct v4l2_query_ext_ctrl; ++ ++struct pollqueue; ++struct media_request; ++struct media_pool; ++ ++typedef enum media_buf_status { ++ MEDIABUFS_STATUS_SUCCESS = 0, ++ MEDIABUFS_ERROR_OPERATION_FAILED, ++ MEDIABUFS_ERROR_DECODING_ERROR, ++ MEDIABUFS_ERROR_UNSUPPORTED_BUFFERTYPE, ++ MEDIABUFS_ERROR_UNSUPPORTED_RT_FORMAT, ++ MEDIABUFS_ERROR_ALLOCATION_FAILED, ++ MEDIABUFS_ERROR_UNSUPPORTED_MEMORY, ++} MediaBufsStatus; ++ ++struct media_pool * media_pool_new(const char * const media_path, ++ struct pollqueue * const pq, ++ const unsigned int n); ++void media_pool_delete(struct media_pool ** pmp); ++ ++// Obtain a media request ++// Will block if none availible - has a 2sec timeout ++struct media_request * media_request_get(struct media_pool * const mp); ++int media_request_fd(const struct media_request * const req); ++ ++// Start this request ++// Request structure is returned to pool once done ++int media_request_start(struct media_request * const req); ++ ++// Return an *unstarted* media_request to the pool ++// May later be upgraded to allow for aborting a started req ++int media_request_abort(struct media_request ** const preq); ++ ++ ++struct mediabufs_ctl; ++struct qent_src; ++struct qent_dst; ++struct dmabuf_h; ++struct dmabufs_ctl; ++ ++// 1-1 mammping to V4L2 type - just defined separetely to avoid some include versioning difficulties ++enum mediabufs_memory { ++ MEDIABUFS_MEMORY_UNSET = 0, ++ MEDIABUFS_MEMORY_MMAP = 1, ++ MEDIABUFS_MEMORY_USERPTR = 2, ++ MEDIABUFS_MEMORY_OVERLAY = 3, ++ MEDIABUFS_MEMORY_DMABUF = 4, ++}; ++ ++int qent_src_params_set(struct qent_src *const be, const struct timeval * timestamp); ++struct timeval qent_dst_timestamp_get(const struct qent_dst *const be_dst); ++ ++// prealloc ++int qent_src_alloc(struct qent_src *const be_src, const size_t len, struct dmabufs_ctl * dbsc); ++// dbsc may be NULL if realloc not required ++int qent_src_data_copy(struct qent_src *const be_src, const size_t offset, const void *const src, const size_t len, struct dmabufs_ctl * dbsc); ++const struct dmabuf_h * qent_dst_dmabuf(const struct qent_dst *const be, unsigned int plane); ++int qent_dst_dup_fd(const struct qent_dst *const be, unsigned int plane); ++MediaBufsStatus qent_dst_wait(struct qent_dst *const be); ++void qent_dst_delete(struct qent_dst *const be); ++// Returns a qent_dst to its mbc free Q or deletes it if the mbc is dead ++void qent_dst_unref(struct qent_dst ** const pbe_dst); ++struct qent_dst * qent_dst_ref(struct qent_dst * const be_dst); ++ ++const uint8_t * qent_dst_data(struct qent_dst *const be, unsigned int buf_no); ++MediaBufsStatus qent_dst_read_start(struct qent_dst *const be); ++MediaBufsStatus qent_dst_read_stop(struct qent_dst *const be); ++/* Import an fd unattached to any mediabuf */ ++MediaBufsStatus qent_dst_import_fd(struct qent_dst *const be_dst, ++ unsigned int plane, ++ int fd, size_t size); ++ ++const char * mediabufs_memory_name(const enum mediabufs_memory m); ++ ++MediaBufsStatus mediabufs_start_request(struct mediabufs_ctl *const mbc, ++ struct media_request **const pmreq, ++ struct qent_src **const psrc_be, ++ struct qent_dst *const dst_be, ++ const bool is_final); ++// Get / alloc a dst buffer & associate with a slot ++// If the dst pool is empty then behaviour depends on the fixed flag passed to ++// dst_slots_create. Default is !fixed = unlimited alloc ++struct qent_dst* mediabufs_dst_qent_alloc(struct mediabufs_ctl *const mbc, ++ struct dmabufs_ctl *const dbsc); ++// Create dst slots without alloc ++// If fixed true then qent_alloc will only get slots from this pool and will ++// block until a qent has been unrefed ++MediaBufsStatus mediabufs_dst_slots_create(struct mediabufs_ctl *const mbc, const unsigned int n, const bool fixed, const enum mediabufs_memory memtype); ++ ++MediaBufsStatus mediabufs_stream_on(struct mediabufs_ctl *const mbc); ++MediaBufsStatus mediabufs_stream_off(struct mediabufs_ctl *const mbc); ++const struct v4l2_format *mediabufs_dst_fmt(struct mediabufs_ctl *const mbc); ++ ++typedef int mediabufs_dst_fmt_accept_fn(void * v, const struct v4l2_fmtdesc *fmtdesc); ++ ++MediaBufsStatus mediabufs_dst_fmt_set(struct mediabufs_ctl *const mbc, ++ const unsigned int width, ++ const unsigned int height, ++ mediabufs_dst_fmt_accept_fn *const accept_fn, ++ void *const accept_v); ++struct qent_src *mediabufs_src_qent_get(struct mediabufs_ctl *const mbc); ++void mediabufs_src_qent_abort(struct mediabufs_ctl *const mbc, struct qent_src **const pqe_src); ++ ++int mediabufs_ctl_set_ext_ctrls(struct mediabufs_ctl * mbc, struct media_request * const mreq, ++ struct v4l2_ext_control control_array[], unsigned int n); ++MediaBufsStatus mediabufs_set_ext_ctrl(struct mediabufs_ctl *const mbc, ++ struct media_request * const mreq, ++ unsigned int id, void *data, ++ unsigned int size); ++int mediabufs_ctl_query_ext_ctrls(struct mediabufs_ctl * mbc, struct v4l2_query_ext_ctrl ctrls[], unsigned int n); ++ ++int mediabufs_src_resizable(const struct mediabufs_ctl *const mbc); ++ ++MediaBufsStatus mediabufs_src_fmt_set(struct mediabufs_ctl *const mbc, ++ enum v4l2_buf_type buf_type, ++ const uint32_t pixfmt, ++ const uint32_t width, const uint32_t height, ++ const size_t bufsize); ++ ++MediaBufsStatus mediabufs_src_pool_create(struct mediabufs_ctl *const rw, ++ struct dmabufs_ctl * const dbsc, ++ unsigned int n, ++ const enum mediabufs_memory memtype); ++ ++// Want to have appropriate formats set first ++MediaBufsStatus mediabufs_src_chk_memtype(struct mediabufs_ctl *const mbc, const enum mediabufs_memory memtype); ++MediaBufsStatus mediabufs_dst_chk_memtype(struct mediabufs_ctl *const mbc, const enum mediabufs_memory memtype); ++ ++#define MEDIABUFS_DRIVER_VERSION(a, b, c) (((a) << 16) | ((b) << 8) | (c)) ++unsigned int mediabufs_ctl_driver_version(struct mediabufs_ctl *const mbc); ++ ++struct mediabufs_ctl * mediabufs_ctl_new(void * const dc, ++ const char *vpath, struct pollqueue *const pq); ++void mediabufs_ctl_unref(struct mediabufs_ctl **const pmbc); ++struct mediabufs_ctl * mediabufs_ctl_ref(struct mediabufs_ctl *const mbc); ++ ++ ++#endif +--- /dev/null ++++ b/libavcodec/v4l2_req_pollqueue.c +@@ -0,0 +1,361 @@ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "v4l2_req_pollqueue.h" ++#include "v4l2_req_utils.h" ++ ++ ++struct pollqueue; ++ ++enum polltask_state { ++ POLLTASK_UNQUEUED = 0, ++ POLLTASK_QUEUED, ++ POLLTASK_RUNNING, ++ POLLTASK_Q_KILL, ++ POLLTASK_RUN_KILL, ++}; ++ ++struct polltask { ++ struct polltask *next; ++ struct polltask *prev; ++ struct pollqueue *q; ++ enum polltask_state state; ++ ++ int fd; ++ short events; ++ ++ void (*fn)(void *v, short revents); ++ void * v; ++ ++ uint64_t timeout; /* CLOCK_MONOTONIC time, 0 => never */ ++ sem_t kill_sem; ++}; ++ ++struct pollqueue { ++ atomic_int ref_count; ++ pthread_mutex_t lock; ++ ++ struct polltask *head; ++ struct polltask *tail; ++ ++ bool kill; ++ bool no_prod; ++ int prod_fd; ++ struct polltask *prod_pt; ++ pthread_t worker; ++}; ++ ++struct polltask *polltask_new(struct pollqueue *const pq, ++ const int fd, const short events, ++ void (*const fn)(void *v, short revents), ++ void *const v) ++{ ++ struct polltask *pt; ++ ++ if (!events) ++ return NULL; ++ ++ pt = malloc(sizeof(*pt)); ++ if (!pt) ++ return NULL; ++ ++ *pt = (struct polltask){ ++ .next = NULL, ++ .prev = NULL, ++ .q = pollqueue_ref(pq), ++ .fd = fd, ++ .events = events, ++ .fn = fn, ++ .v = v ++ }; ++ ++ sem_init(&pt->kill_sem, 0, 0); ++ ++ return pt; ++} ++ ++static void pollqueue_rem_task(struct pollqueue *const pq, struct polltask *const pt) ++{ ++ if (pt->prev) ++ pt->prev->next = pt->next; ++ else ++ pq->head = pt->next; ++ if (pt->next) ++ pt->next->prev = pt->prev; ++ else ++ pq->tail = pt->prev; ++ pt->next = NULL; ++ pt->prev = NULL; ++} ++ ++static void polltask_free(struct polltask * const pt) ++{ ++ sem_destroy(&pt->kill_sem); ++ free(pt); ++} ++ ++static int pollqueue_prod(const struct pollqueue *const pq) ++{ ++ static const uint64_t one = 1; ++ return write(pq->prod_fd, &one, sizeof(one)); ++} ++ ++void polltask_delete(struct polltask **const ppt) ++{ ++ struct polltask *const pt = *ppt; ++ struct pollqueue * pq; ++ enum polltask_state state; ++ bool prodme; ++ ++ if (!pt) ++ return; ++ ++ pq = pt->q; ++ pthread_mutex_lock(&pq->lock); ++ state = pt->state; ++ pt->state = (state == POLLTASK_RUNNING) ? POLLTASK_RUN_KILL : POLLTASK_Q_KILL; ++ prodme = !pq->no_prod; ++ pthread_mutex_unlock(&pq->lock); ++ ++ if (state != POLLTASK_UNQUEUED) { ++ if (prodme) ++ pollqueue_prod(pq); ++ while (sem_wait(&pt->kill_sem) && errno == EINTR) ++ /* loop */; ++ } ++ ++ // Leave zapping the ref until we have DQed the PT as might well be ++ // legitimately used in it ++ *ppt = NULL; ++ polltask_free(pt); ++ pollqueue_unref(&pq); ++} ++ ++static uint64_t pollqueue_now(int timeout) ++{ ++ struct timespec now; ++ uint64_t now_ms; ++ ++ if (clock_gettime(CLOCK_MONOTONIC, &now)) ++ return 0; ++ now_ms = (now.tv_nsec / 1000000) + (uint64_t)now.tv_sec * 1000 + timeout; ++ return now_ms ? now_ms : (uint64_t)1; ++} ++ ++void pollqueue_add_task(struct polltask *const pt, const int timeout) ++{ ++ bool prodme = false; ++ struct pollqueue * const pq = pt->q; ++ ++ pthread_mutex_lock(&pq->lock); ++ if (pt->state != POLLTASK_Q_KILL && pt->state != POLLTASK_RUN_KILL) { ++ if (pq->tail) ++ pq->tail->next = pt; ++ else ++ pq->head = pt; ++ pt->prev = pq->tail; ++ pt->next = NULL; ++ pt->state = POLLTASK_QUEUED; ++ pt->timeout = timeout < 0 ? 0 : pollqueue_now(timeout); ++ pq->tail = pt; ++ prodme = !pq->no_prod; ++ } ++ pthread_mutex_unlock(&pq->lock); ++ if (prodme) ++ pollqueue_prod(pq); ++} ++ ++static void *poll_thread(void *v) ++{ ++ struct pollqueue *const pq = v; ++ struct pollfd *a = NULL; ++ size_t asize = 0; ++ ++ pthread_mutex_lock(&pq->lock); ++ do { ++ unsigned int i; ++ unsigned int n = 0; ++ struct polltask *pt; ++ struct polltask *pt_next; ++ uint64_t now = pollqueue_now(0); ++ int timeout = -1; ++ int rv; ++ ++ for (pt = pq->head; pt; pt = pt_next) { ++ int64_t t; ++ ++ pt_next = pt->next; ++ ++ if (pt->state == POLLTASK_Q_KILL) { ++ pollqueue_rem_task(pq, pt); ++ sem_post(&pt->kill_sem); ++ continue; ++ } ++ ++ if (n >= asize) { ++ asize = asize ? asize * 2 : 4; ++ a = realloc(a, asize * sizeof(*a)); ++ if (!a) { ++ request_log("Failed to realloc poll array to %zd\n", asize); ++ goto fail_locked; ++ } ++ } ++ ++ a[n++] = (struct pollfd){ ++ .fd = pt->fd, ++ .events = pt->events ++ }; ++ ++ t = (int64_t)(pt->timeout - now); ++ if (pt->timeout && t < INT_MAX && ++ (timeout < 0 || (int)t < timeout)) ++ timeout = (t < 0) ? 0 : (int)t; ++ } ++ pthread_mutex_unlock(&pq->lock); ++ ++ if ((rv = poll(a, n, timeout)) == -1) { ++ if (errno != EINTR) { ++ request_log("Poll error: %s\n", strerror(errno)); ++ goto fail_unlocked; ++ } ++ } ++ ++ pthread_mutex_lock(&pq->lock); ++ now = pollqueue_now(0); ++ ++ /* Prodding in this loop is pointless and might lead to ++ * infinite looping ++ */ ++ pq->no_prod = true; ++ for (i = 0, pt = pq->head; i < n; ++i, pt = pt_next) { ++ pt_next = pt->next; ++ ++ /* Pending? */ ++ if (a[i].revents || ++ (pt->timeout && (int64_t)(now - pt->timeout) >= 0)) { ++ pollqueue_rem_task(pq, pt); ++ if (pt->state == POLLTASK_QUEUED) ++ pt->state = POLLTASK_RUNNING; ++ if (pt->state == POLLTASK_Q_KILL) ++ pt->state = POLLTASK_RUN_KILL; ++ pthread_mutex_unlock(&pq->lock); ++ ++ /* This can add new entries to the Q but as ++ * those are added to the tail our existing ++ * chain remains intact ++ */ ++ pt->fn(pt->v, a[i].revents); ++ ++ pthread_mutex_lock(&pq->lock); ++ if (pt->state == POLLTASK_RUNNING) ++ pt->state = POLLTASK_UNQUEUED; ++ if (pt->state == POLLTASK_RUN_KILL) ++ sem_post(&pt->kill_sem); ++ } ++ } ++ pq->no_prod = false; ++ ++ } while (!pq->kill); ++ ++fail_locked: ++ pthread_mutex_unlock(&pq->lock); ++fail_unlocked: ++ free(a); ++ return NULL; ++} ++ ++static void prod_fn(void *v, short revents) ++{ ++ struct pollqueue *const pq = v; ++ char buf[8]; ++ if (revents) ++ read(pq->prod_fd, buf, 8); ++ if (!pq->kill) ++ pollqueue_add_task(pq->prod_pt, -1); ++} ++ ++struct pollqueue * pollqueue_new(void) ++{ ++ struct pollqueue *pq = malloc(sizeof(*pq)); ++ if (!pq) ++ return NULL; ++ *pq = (struct pollqueue){ ++ .ref_count = ATOMIC_VAR_INIT(0), ++ .lock = PTHREAD_MUTEX_INITIALIZER, ++ .head = NULL, ++ .tail = NULL, ++ .kill = false, ++ .prod_fd = -1 ++ }; ++ ++ pq->prod_fd = eventfd(0, EFD_NONBLOCK); ++ if (pq->prod_fd == 1) ++ goto fail1; ++ pq->prod_pt = polltask_new(pq, pq->prod_fd, POLLIN, prod_fn, pq); ++ if (!pq->prod_pt) ++ goto fail2; ++ pollqueue_add_task(pq->prod_pt, -1); ++ if (pthread_create(&pq->worker, NULL, poll_thread, pq)) ++ goto fail3; ++ // Reset ref count which will have been inced by the add_task ++ atomic_store(&pq->ref_count, 0); ++ return pq; ++ ++fail3: ++ polltask_free(pq->prod_pt); ++fail2: ++ close(pq->prod_fd); ++fail1: ++ free(pq); ++ return NULL; ++} ++ ++static void pollqueue_free(struct pollqueue *const pq) ++{ ++ void *rv; ++ ++ pthread_mutex_lock(&pq->lock); ++ pq->kill = true; ++ pollqueue_prod(pq); ++ pthread_mutex_unlock(&pq->lock); ++ ++ pthread_join(pq->worker, &rv); ++ polltask_free(pq->prod_pt); ++ pthread_mutex_destroy(&pq->lock); ++ close(pq->prod_fd); ++ free(pq); ++} ++ ++struct pollqueue * pollqueue_ref(struct pollqueue *const pq) ++{ ++ atomic_fetch_add(&pq->ref_count, 1); ++ return pq; ++} ++ ++void pollqueue_unref(struct pollqueue **const ppq) ++{ ++ struct pollqueue * const pq = *ppq; ++ ++ if (!pq) ++ return; ++ *ppq = NULL; ++ ++ if (atomic_fetch_sub(&pq->ref_count, 1) != 0) ++ return; ++ ++ pollqueue_free(pq); ++} ++ ++ ++ +--- /dev/null ++++ b/libavcodec/v4l2_req_pollqueue.h +@@ -0,0 +1,18 @@ ++#ifndef POLLQUEUE_H_ ++#define POLLQUEUE_H_ ++ ++struct polltask; ++struct pollqueue; ++ ++struct polltask *polltask_new(struct pollqueue *const pq, ++ const int fd, const short events, ++ void (*const fn)(void *v, short revents), ++ void *const v); ++void polltask_delete(struct polltask **const ppt); ++ ++void pollqueue_add_task(struct polltask *const pt, const int timeout); ++struct pollqueue * pollqueue_new(void); ++void pollqueue_unref(struct pollqueue **const ppq); ++struct pollqueue * pollqueue_ref(struct pollqueue *const pq); ++ ++#endif /* POLLQUEUE_H_ */ +--- /dev/null ++++ b/libavcodec/v4l2_req_utils.h +@@ -0,0 +1,27 @@ ++#ifndef AVCODEC_V4L2_REQ_UTILS_H ++#define AVCODEC_V4L2_REQ_UTILS_H ++ ++#include ++#include "libavutil/log.h" ++ ++#define request_log(...) av_log(NULL, AV_LOG_INFO, __VA_ARGS__) ++ ++#define request_err(_ctx, ...) av_log(_ctx, AV_LOG_ERROR, __VA_ARGS__) ++#define request_warn(_ctx, ...) av_log(_ctx, AV_LOG_WARNING, __VA_ARGS__) ++#define request_info(_ctx, ...) av_log(_ctx, AV_LOG_INFO, __VA_ARGS__) ++#define request_debug(_ctx, ...) av_log(_ctx, AV_LOG_DEBUG, __VA_ARGS__) ++ ++static inline char safechar(char c) { ++ return c > 0x20 && c < 0x7f ? c : '.'; ++} ++ ++static inline const char * strfourcc(char tbuf[5], uint32_t fcc) { ++ tbuf[0] = safechar((fcc >> 0) & 0xff); ++ tbuf[1] = safechar((fcc >> 8) & 0xff); ++ tbuf[2] = safechar((fcc >> 16) & 0xff); ++ tbuf[3] = safechar((fcc >> 24) & 0xff); ++ tbuf[4] = '\0'; ++ return tbuf; ++} ++ ++#endif +--- /dev/null ++++ b/libavcodec/v4l2_request_hevc.c +@@ -0,0 +1,351 @@ ++/* ++ * This file is part of FFmpeg. ++ * ++ * FFmpeg is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation; either ++ * version 2.1 of the License, or (at your option) any later version. ++ * ++ * FFmpeg is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with FFmpeg; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ++ */ ++ ++ ++#include "config.h" ++#include "decode.h" ++#include "hevcdec.h" ++#include "hwconfig.h" ++#include "internal.h" ++ ++#include "v4l2_request_hevc.h" ++ ++#include "libavutil/hwcontext_drm.h" ++#include "libavutil/pixdesc.h" ++ ++#include "v4l2_req_devscan.h" ++#include "v4l2_req_dmabufs.h" ++#include "v4l2_req_pollqueue.h" ++#include "v4l2_req_media.h" ++#include "v4l2_req_utils.h" ++ ++static size_t bit_buf_size(unsigned int w, unsigned int h, unsigned int bits_minus8) ++{ ++ const size_t wxh = w * h; ++ size_t bits_alloc; ++ ++ /* Annex A gives a min compression of 2 @ lvl 3.1 ++ * (wxh <= 983040) and min 4 thereafter but avoid ++ * the odity of 983041 having a lower limit than ++ * 983040. ++ * Multiply by 3/2 for 4:2:0 ++ */ ++ bits_alloc = wxh < 983040 ? wxh * 3 / 4 : ++ wxh < 983040 * 2 ? 983040 * 3 / 4 : ++ wxh * 3 / 8; ++ /* Allow for bit depth */ ++ bits_alloc += (bits_alloc * bits_minus8) / 8; ++ /* Add a few bytes (16k) for overhead */ ++ bits_alloc += 0x4000; ++ return bits_alloc; ++} ++ ++static int v4l2_req_hevc_start_frame(AVCodecContext *avctx, ++ av_unused const uint8_t *buffer, ++ av_unused uint32_t size) ++{ ++ const V4L2RequestContextHEVC * const ctx = avctx->internal->hwaccel_priv_data; ++ return ctx->fns->start_frame(avctx, buffer, size); ++} ++ ++static int v4l2_req_hevc_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size) ++{ ++ V4L2RequestContextHEVC * const ctx = avctx->internal->hwaccel_priv_data; ++ return ctx->fns->decode_slice(avctx, buffer, size); ++} ++ ++static int v4l2_req_hevc_end_frame(AVCodecContext *avctx) ++{ ++ V4L2RequestContextHEVC *ctx = avctx->internal->hwaccel_priv_data; ++ return ctx->fns->end_frame(avctx); ++} ++ ++static void v4l2_req_hevc_abort_frame(AVCodecContext * const avctx) ++{ ++ V4L2RequestContextHEVC * const ctx = avctx->internal->hwaccel_priv_data; ++ ctx->fns->abort_frame(avctx); ++} ++ ++static int v4l2_req_hevc_frame_params(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx) ++{ ++ V4L2RequestContextHEVC * const ctx = avctx->internal->hwaccel_priv_data; ++ return ctx->fns->frame_params(avctx, hw_frames_ctx); ++} ++ ++static int v4l2_req_hevc_alloc_frame(AVCodecContext * avctx, AVFrame *frame) ++{ ++ V4L2RequestContextHEVC * const ctx = avctx->internal->hwaccel_priv_data; ++ return ctx->fns->alloc_frame(avctx, frame); ++} ++ ++ ++static int v4l2_request_hevc_uninit(AVCodecContext *avctx) ++{ ++ V4L2RequestContextHEVC * const ctx = avctx->internal->hwaccel_priv_data; ++ ++ av_log(avctx, AV_LOG_DEBUG, "<<< %s\n", __func__); ++ ++ decode_q_wait(&ctx->decode_q, NULL); // Wait for all other threads to be out of decode ++ ++ mediabufs_ctl_unref(&ctx->mbufs); ++ media_pool_delete(&ctx->mpool); ++ pollqueue_unref(&ctx->pq); ++ dmabufs_ctl_unref(&ctx->dbufs); ++ devscan_delete(&ctx->devscan); ++ ++ decode_q_uninit(&ctx->decode_q); ++ ++// if (avctx->hw_frames_ctx) { ++// AVHWFramesContext *hwfc = (AVHWFramesContext*)avctx->hw_frames_ctx->data; ++// av_buffer_pool_flush(hwfc->pool); ++// } ++ return 0; ++} ++ ++static int dst_fmt_accept_cb(void * v, const struct v4l2_fmtdesc *fmtdesc) ++{ ++ AVCodecContext *const avctx = v; ++ const HEVCContext *const h = avctx->priv_data; ++ ++ if (h->ps.sps->bit_depth == 8) { ++ if (fmtdesc->pixelformat == V4L2_PIX_FMT_NV12_COL128 || ++ fmtdesc->pixelformat == V4L2_PIX_FMT_NV12) { ++ return 1; ++ } ++ } ++ else if (h->ps.sps->bit_depth == 10) { ++ if (fmtdesc->pixelformat == V4L2_PIX_FMT_NV12_10_COL128) { ++ return 1; ++ } ++ } ++ return 0; ++} ++ ++static int v4l2_request_hevc_init(AVCodecContext *avctx) ++{ ++ const HEVCContext *h = avctx->priv_data; ++ V4L2RequestContextHEVC * const ctx = avctx->internal->hwaccel_priv_data; ++ const HEVCSPS * const sps = h->ps.sps; ++ int ret; ++ const struct decdev * decdev; ++ const uint32_t src_pix_fmt = V2(ff_v4l2_req_hevc, 4).src_pix_fmt_v4l2; // Assuming constant for all APIs but avoiding V4L2 includes ++ size_t src_size; ++ enum mediabufs_memory src_memtype; ++ enum mediabufs_memory dst_memtype; ++ ++ av_log(avctx, AV_LOG_DEBUG, "<<< %s\n", __func__); ++ ++ // Give up immediately if this is something that we have no code to deal with ++ if (h->ps.sps->chroma_format_idc != 1) { ++ av_log(avctx, AV_LOG_WARNING, "chroma_format_idc(%d) != 1: Not implemented\n", h->ps.sps->chroma_format_idc); ++ return AVERROR_PATCHWELCOME; ++ } ++ if (!(h->ps.sps->bit_depth == 10 || h->ps.sps->bit_depth == 8) || ++ h->ps.sps->bit_depth != h->ps.sps->bit_depth_chroma) { ++ av_log(avctx, AV_LOG_WARNING, "Bit depth Y:%d C:%d: Not implemented\n", h->ps.sps->bit_depth, h->ps.sps->bit_depth_chroma); ++ return AVERROR_PATCHWELCOME; ++ } ++ ++ if ((ret = devscan_build(avctx, &ctx->devscan)) != 0) { ++ av_log(avctx, AV_LOG_WARNING, "Failed to find any V4L2 devices\n"); ++ return (AVERROR(-ret)); ++ } ++ ret = AVERROR(ENOMEM); // Assume mem fail by default for these ++ ++ if ((decdev = devscan_find(ctx->devscan, src_pix_fmt)) == NULL) ++ { ++ av_log(avctx, AV_LOG_WARNING, "Failed to find a V4L2 device for H265\n"); ++ ret = AVERROR(ENODEV); ++ goto fail0; ++ } ++ av_log(avctx, AV_LOG_DEBUG, "Trying V4L2 devices: %s,%s\n", ++ decdev_media_path(decdev), decdev_video_path(decdev)); ++ ++ if ((ctx->pq = pollqueue_new()) == NULL) { ++ av_log(avctx, AV_LOG_ERROR, "Unable to create pollqueue\n"); ++ goto fail1; ++ } ++ ++ if ((ctx->mpool = media_pool_new(decdev_media_path(decdev), ctx->pq, 4)) == NULL) { ++ av_log(avctx, AV_LOG_ERROR, "Unable to create media pool\n"); ++ goto fail2; ++ } ++ ++ if ((ctx->mbufs = mediabufs_ctl_new(avctx, decdev_video_path(decdev), ctx->pq)) == NULL) { ++ av_log(avctx, AV_LOG_ERROR, "Unable to create media controls\n"); ++ goto fail3; ++ } ++ ++ // Version test for functional Pi5 HEVC iommu. ++ // rpivid kernel patch was merged in 6.1.57 ++ // *** Remove when it is unlikely that there are any broken kernels left ++ if (mediabufs_ctl_driver_version(ctx->mbufs) >= MEDIABUFS_DRIVER_VERSION(6,1,57)) ++ ctx->dbufs = dmabufs_ctl_new_vidbuf_cached(); ++ else ++ ctx->dbufs = dmabufs_ctl_new(); ++ ++ if (ctx->dbufs == NULL) { ++ av_log(avctx, AV_LOG_DEBUG, "Unable to open dmabufs - try mmap buffers\n"); ++ src_memtype = MEDIABUFS_MEMORY_MMAP; ++ dst_memtype = MEDIABUFS_MEMORY_MMAP; ++ } ++ else { ++ av_log(avctx, AV_LOG_DEBUG, "Dmabufs opened - try dmabuf buffers\n"); ++ src_memtype = MEDIABUFS_MEMORY_DMABUF; ++ dst_memtype = MEDIABUFS_MEMORY_DMABUF; ++ } ++ ++ // Ask for an initial bitbuf size of max size / 4 ++ // We will realloc if we need more ++ // Must use sps->h/w as avctx contains cropped size ++retry_src_memtype: ++ src_size = bit_buf_size(sps->width, sps->height, sps->bit_depth - 8); ++ if (src_memtype == MEDIABUFS_MEMORY_DMABUF && mediabufs_src_resizable(ctx->mbufs)) ++ src_size /= 4; ++ // Kludge for conformance tests which break Annex A limits ++ else if (src_size < 0x40000) ++ src_size = 0x40000; ++ ++ if (mediabufs_src_fmt_set(ctx->mbufs, decdev_src_type(decdev), src_pix_fmt, ++ sps->width, sps->height, src_size)) { ++ char tbuf1[5]; ++ av_log(avctx, AV_LOG_ERROR, "Failed to set source format: %s %dx%d\n", strfourcc(tbuf1, src_pix_fmt), sps->width, sps->height); ++ goto fail4; ++ } ++ ++ if (mediabufs_src_chk_memtype(ctx->mbufs, src_memtype)) { ++ if (src_memtype == MEDIABUFS_MEMORY_DMABUF) { ++ src_memtype = MEDIABUFS_MEMORY_MMAP; ++ goto retry_src_memtype; ++ } ++ av_log(avctx, AV_LOG_ERROR, "Failed to get src memory type\n"); ++ goto fail4; ++ } ++ ++ if (V2(ff_v4l2_req_hevc, 4).probe(avctx, ctx) == 0) ++ ctx->fns = &V2(ff_v4l2_req_hevc, 4); ++#if CONFIG_V4L2_REQ_HEVC_VX ++ else if (V2(ff_v4l2_req_hevc, 3).probe(avctx, ctx) == 0) ++ ctx->fns = &V2(ff_v4l2_req_hevc, 3); ++ else if (V2(ff_v4l2_req_hevc, 2).probe(avctx, ctx) == 0) ++ ctx->fns = &V2(ff_v4l2_req_hevc, 2); ++ else if (V2(ff_v4l2_req_hevc, 1).probe(avctx, ctx) == 0) ++ ctx->fns = &V2(ff_v4l2_req_hevc, 1); ++#endif ++ else { ++ av_log(avctx, AV_LOG_ERROR, "No HEVC version probed successfully\n"); ++ ret = AVERROR(EINVAL); ++ goto fail4; ++ } ++ ++ av_log(avctx, AV_LOG_DEBUG, "%s probed successfully: driver v %#x\n", ++ ctx->fns->name, mediabufs_ctl_driver_version(ctx->mbufs)); ++ ++ if (mediabufs_dst_fmt_set(ctx->mbufs, sps->width, sps->height, dst_fmt_accept_cb, avctx)) { ++ char tbuf1[5]; ++ av_log(avctx, AV_LOG_ERROR, "Failed to set destination format: %s %dx%d\n", strfourcc(tbuf1, src_pix_fmt), sps->width, sps->height); ++ goto fail4; ++ } ++ ++ if (mediabufs_src_pool_create(ctx->mbufs, ctx->dbufs, 6, src_memtype)) { ++ av_log(avctx, AV_LOG_ERROR, "Failed to create source pool\n"); ++ goto fail4; ++ } ++ ++ { ++ unsigned int dst_slots = sps->temporal_layer[sps->max_sub_layers - 1].max_dec_pic_buffering + ++ avctx->thread_count + (avctx->extra_hw_frames > 0 ? avctx->extra_hw_frames : 6); ++ av_log(avctx, AV_LOG_DEBUG, "Slots=%d: Reordering=%d, threads=%d, hw+=%d\n", dst_slots, ++ sps->temporal_layer[sps->max_sub_layers - 1].max_dec_pic_buffering, ++ avctx->thread_count, avctx->extra_hw_frames); ++ ++ if (mediabufs_dst_chk_memtype(ctx->mbufs, dst_memtype)) { ++ if (dst_memtype != MEDIABUFS_MEMORY_DMABUF) { ++ av_log(avctx, AV_LOG_ERROR, "Failed to get dst memory type\n"); ++ goto fail4; ++ } ++ av_log(avctx, AV_LOG_DEBUG, "Dst DMABUF not supported - trying mmap\n"); ++ dst_memtype = MEDIABUFS_MEMORY_MMAP; ++ } ++ ++ // extra_hw_frames is -1 if unset ++ if (mediabufs_dst_slots_create(ctx->mbufs, dst_slots, (avctx->extra_hw_frames > 0), dst_memtype)) { ++ av_log(avctx, AV_LOG_ERROR, "Failed to create destination slots\n"); ++ goto fail4; ++ } ++ } ++ ++ if (mediabufs_stream_on(ctx->mbufs)) { ++ av_log(avctx, AV_LOG_ERROR, "Failed stream on\n"); ++ goto fail4; ++ } ++ ++ if ((ret = ff_decode_get_hw_frames_ctx(avctx, AV_HWDEVICE_TYPE_DRM)) != 0) { ++ av_log(avctx, AV_LOG_ERROR, "Failed to create frame ctx\n"); ++ goto fail4; ++ } ++ ++ if ((ret = ctx->fns->set_controls(avctx, ctx)) != 0) { ++ av_log(avctx, AV_LOG_ERROR, "Failed set controls\n"); ++ goto fail5; ++ } ++ ++ decode_q_init(&ctx->decode_q); ++ ++ // Set our s/w format ++ avctx->sw_pix_fmt = ((AVHWFramesContext *)avctx->hw_frames_ctx->data)->sw_format; ++ ++ av_log(avctx, AV_LOG_INFO, "Hwaccel %s; devices: %s,%s; buffers: src %s, dst %s; swfmt=%s\n", ++ ctx->fns->name, ++ decdev_media_path(decdev), decdev_video_path(decdev), ++ mediabufs_memory_name(src_memtype), mediabufs_memory_name(dst_memtype), ++ av_get_pix_fmt_name(avctx->sw_pix_fmt)); ++ ++ return 0; ++ ++fail5: ++ av_buffer_unref(&avctx->hw_frames_ctx); ++fail4: ++ mediabufs_ctl_unref(&ctx->mbufs); ++fail3: ++ media_pool_delete(&ctx->mpool); ++fail2: ++ pollqueue_unref(&ctx->pq); ++fail1: ++ dmabufs_ctl_unref(&ctx->dbufs); ++fail0: ++ devscan_delete(&ctx->devscan); ++ return ret; ++} ++ ++const AVHWAccel ff_hevc_v4l2request_hwaccel = { ++ .name = "hevc_v4l2request", ++ .type = AVMEDIA_TYPE_VIDEO, ++ .id = AV_CODEC_ID_HEVC, ++ .pix_fmt = AV_PIX_FMT_DRM_PRIME, ++ .alloc_frame = v4l2_req_hevc_alloc_frame, ++ .start_frame = v4l2_req_hevc_start_frame, ++ .decode_slice = v4l2_req_hevc_decode_slice, ++ .end_frame = v4l2_req_hevc_end_frame, ++ .abort_frame = v4l2_req_hevc_abort_frame, ++ .init = v4l2_request_hevc_init, ++ .uninit = v4l2_request_hevc_uninit, ++ .priv_data_size = sizeof(V4L2RequestContextHEVC), ++ .frame_params = v4l2_req_hevc_frame_params, ++ .caps_internal = HWACCEL_CAP_ASYNC_SAFE | HWACCEL_CAP_MT_SAFE, ++}; +--- /dev/null ++++ b/libavcodec/v4l2_request_hevc.h +@@ -0,0 +1,102 @@ ++#ifndef AVCODEC_V4L2_REQUEST_HEVC_H ++#define AVCODEC_V4L2_REQUEST_HEVC_H ++ ++#include ++#include ++#include "v4l2_req_decode_q.h" ++ ++#ifndef DRM_FORMAT_NV15 ++#define DRM_FORMAT_NV15 fourcc_code('N', 'V', '1', '5') ++#endif ++ ++#ifndef DRM_FORMAT_NV20 ++#define DRM_FORMAT_NV20 fourcc_code('N', 'V', '2', '0') ++#endif ++ ++// P030 should be defined in drm_fourcc.h and hopefully will be sometime ++// in the future but until then... ++#ifndef DRM_FORMAT_P030 ++#define DRM_FORMAT_P030 fourcc_code('P', '0', '3', '0') ++#endif ++ ++#ifndef DRM_FORMAT_NV15 ++#define DRM_FORMAT_NV15 fourcc_code('N', 'V', '1', '5') ++#endif ++ ++#ifndef DRM_FORMAT_NV20 ++#define DRM_FORMAT_NV20 fourcc_code('N', 'V', '2', '0') ++#endif ++ ++#include ++#ifndef V4L2_CID_CODEC_BASE ++#define V4L2_CID_CODEC_BASE V4L2_CID_MPEG_BASE ++#endif ++ ++// V4L2_PIX_FMT_NV12_10_COL128 and V4L2_PIX_FMT_NV12_COL128 should be defined ++// in drm_fourcc.h hopefully will be sometime in the future but until then... ++#ifndef V4L2_PIX_FMT_NV12_10_COL128 ++#define V4L2_PIX_FMT_NV12_10_COL128 v4l2_fourcc('N', 'C', '3', '0') ++#endif ++ ++#ifndef V4L2_PIX_FMT_NV12_COL128 ++#define V4L2_PIX_FMT_NV12_COL128 v4l2_fourcc('N', 'C', '1', '2') /* 12 Y/CbCr 4:2:0 128 pixel wide column */ ++#endif ++ ++#ifndef V4L2_CTRL_FLAG_DYNAMIC_ARRAY ++#define V4L2_CTRL_FLAG_DYNAMIC_ARRAY 0x0800 ++#endif ++ ++#define VCAT(name, version) name##_v##version ++#define V2(n,v) VCAT(n, v) ++#define V(n) V2(n, HEVC_CTRLS_VERSION) ++ ++#define S2(x) #x ++#define STR(x) S2(x) ++ ++// 1 per decoder ++struct v4l2_req_decode_fns; ++ ++typedef struct V4L2RequestContextHEVC { ++// V4L2RequestContext base; ++ const struct v4l2_req_decode_fns * fns; ++ ++ unsigned int timestamp; // ?? maybe uint64_t ++ ++ int decode_mode; ++ int start_code; ++ unsigned int max_slices; // 0 => not wanted (frame mode) ++ unsigned int max_offsets; // 0 => not wanted ++ ++ req_decode_q decode_q; ++ ++ struct devscan *devscan; ++ struct dmabufs_ctl *dbufs; ++ struct pollqueue *pq; ++ struct media_pool * mpool; ++ struct mediabufs_ctl *mbufs; ++} V4L2RequestContextHEVC; ++ ++typedef struct v4l2_req_decode_fns { ++ int src_pix_fmt_v4l2; ++ const char * name; ++ ++ // Init setup ++ int (*probe)(AVCodecContext * const avctx, V4L2RequestContextHEVC * const ctx); ++ int (*set_controls)(AVCodecContext * const avctx, V4L2RequestContextHEVC * const ctx); ++ ++ // Passthrough of hwaccel fns ++ int (*start_frame)(AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size); ++ int (*decode_slice)(AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size); ++ int (*end_frame)(AVCodecContext *avctx); ++ void (*abort_frame)(AVCodecContext *avctx); ++ int (*frame_params)(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx); ++ int (*alloc_frame)(AVCodecContext * avctx, AVFrame *frame); ++} v4l2_req_decode_fns; ++ ++ ++extern const v4l2_req_decode_fns V2(ff_v4l2_req_hevc, 1); ++extern const v4l2_req_decode_fns V2(ff_v4l2_req_hevc, 2); ++extern const v4l2_req_decode_fns V2(ff_v4l2_req_hevc, 3); ++extern const v4l2_req_decode_fns V2(ff_v4l2_req_hevc, 4); ++ ++#endif +--- /dev/null ++++ b/libavcodec/weak_link.c +@@ -0,0 +1,103 @@ ++#include ++#include ++#include ++#include "weak_link.h" ++ ++struct ff_weak_link_master { ++ atomic_int ref_count; /* 0 is single ref for easier atomics */ ++ pthread_rwlock_t lock; ++ void * ptr; ++}; ++ ++static inline struct ff_weak_link_master * weak_link_x(struct ff_weak_link_client * c) ++{ ++ return (struct ff_weak_link_master *)c; ++} ++ ++struct ff_weak_link_master * ff_weak_link_new(void * p) ++{ ++ struct ff_weak_link_master * w = malloc(sizeof(*w)); ++ if (!w) ++ return NULL; ++ atomic_init(&w->ref_count, 0); ++ w->ptr = p; ++ if (pthread_rwlock_init(&w->lock, NULL)) { ++ free(w); ++ return NULL; ++ } ++ return w; ++} ++ ++static void weak_link_do_unref(struct ff_weak_link_master * const w) ++{ ++ int n = atomic_fetch_sub(&w->ref_count, 1); ++ if (n) ++ return; ++ ++ pthread_rwlock_destroy(&w->lock); ++ free(w); ++} ++ ++// Unref & break link ++void ff_weak_link_break(struct ff_weak_link_master ** ppLink) ++{ ++ struct ff_weak_link_master * const w = *ppLink; ++ if (!w) ++ return; ++ ++ *ppLink = NULL; ++ pthread_rwlock_wrlock(&w->lock); ++ w->ptr = NULL; ++ pthread_rwlock_unlock(&w->lock); ++ ++ weak_link_do_unref(w); ++} ++ ++struct ff_weak_link_client* ff_weak_link_ref(struct ff_weak_link_master * w) ++{ ++ if (!w) ++ return NULL; ++ atomic_fetch_add(&w->ref_count, 1); ++ return (struct ff_weak_link_client*)w; ++} ++ ++void ff_weak_link_unref(struct ff_weak_link_client ** ppLink) ++{ ++ struct ff_weak_link_master * const w = weak_link_x(*ppLink); ++ if (!w) ++ return; ++ ++ *ppLink = NULL; ++ weak_link_do_unref(w); ++} ++ ++void * ff_weak_link_lock(struct ff_weak_link_client ** ppLink) ++{ ++ struct ff_weak_link_master * const w = weak_link_x(*ppLink); ++ ++ if (!w) ++ return NULL; ++ ++ if (pthread_rwlock_rdlock(&w->lock)) ++ goto broken; ++ ++ if (w->ptr) ++ return w->ptr; ++ ++ pthread_rwlock_unlock(&w->lock); ++ ++broken: ++ *ppLink = NULL; ++ weak_link_do_unref(w); ++ return NULL; ++} ++ ++// Ignores a NULL c (so can be on the return path of both broken & live links) ++void ff_weak_link_unlock(struct ff_weak_link_client * c) ++{ ++ struct ff_weak_link_master * const w = weak_link_x(c); ++ if (w) ++ pthread_rwlock_unlock(&w->lock); ++} ++ ++ +--- /dev/null ++++ b/libavcodec/weak_link.h +@@ -0,0 +1,23 @@ ++struct ff_weak_link_master; ++struct ff_weak_link_client; ++ ++struct ff_weak_link_master * ff_weak_link_new(void * p); ++void ff_weak_link_break(struct ff_weak_link_master ** ppLink); ++ ++struct ff_weak_link_client* ff_weak_link_ref(struct ff_weak_link_master * w); ++void ff_weak_link_unref(struct ff_weak_link_client ** ppLink); ++ ++// Returns NULL if link broken - in this case it will also zap ++// *ppLink and unref the weak_link. ++// Returns NULL if *ppLink is NULL (so a link once broken stays broken) ++// ++// The above does mean that there is a race if this is called simultainiously ++// by two threads using the same weak_link_client (so don't do that) ++void * ff_weak_link_lock(struct ff_weak_link_client ** ppLink); ++void ff_weak_link_unlock(struct ff_weak_link_client * c); ++ ++ ++ ++ ++ ++ +--- a/libavdevice/Makefile ++++ b/libavdevice/Makefile +@@ -48,6 +48,8 @@ OBJS-$(CONFIG_SNDIO_OUTDEV) + OBJS-$(CONFIG_V4L2_INDEV) += v4l2.o v4l2-common.o timefilter.o + OBJS-$(CONFIG_V4L2_OUTDEV) += v4l2enc.o v4l2-common.o + OBJS-$(CONFIG_VFWCAP_INDEV) += vfwcap.o ++OBJS-$(CONFIG_VOUT_DRM_OUTDEV) += drm_vout.o ++OBJS-$(CONFIG_VOUT_EGL_OUTDEV) += egl_vout.o + OBJS-$(CONFIG_XCBGRAB_INDEV) += xcbgrab.o + OBJS-$(CONFIG_XV_OUTDEV) += xv.o + +--- a/libavdevice/alldevices.c ++++ b/libavdevice/alldevices.c +@@ -51,6 +51,8 @@ extern const AVOutputFormat ff_sndio_mux + extern const AVInputFormat ff_v4l2_demuxer; + extern const AVOutputFormat ff_v4l2_muxer; + extern const AVInputFormat ff_vfwcap_demuxer; ++extern const AVOutputFormat ff_vout_drm_muxer; ++extern const AVOutputFormat ff_vout_egl_muxer; + extern const AVInputFormat ff_xcbgrab_demuxer; + extern const AVOutputFormat ff_xv_muxer; + +--- /dev/null ++++ b/libavdevice/drm_vout.c +@@ -0,0 +1,680 @@ ++/* ++ * Copyright (c) 2020 John Cox for Raspberry Pi Trading ++ * ++ * This file is part of FFmpeg. ++ * ++ * FFmpeg is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation; either ++ * version 2.1 of the License, or (at your option) any later version. ++ * ++ * FFmpeg is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with FFmpeg; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ++ */ ++ ++ ++// *** This module is a work in progress and its utility is strictly ++// limited to testing. ++ ++#include "libavutil/opt.h" ++#include "libavutil/pixdesc.h" ++#include "libavutil/hwcontext_drm.h" ++#include "libavformat/internal.h" ++#include "avdevice.h" ++ ++#include "pthread.h" ++#include ++#include ++ ++#include ++#include ++#include ++ ++#define TRACE_ALL 0 ++ ++#define DRM_MODULE "vc4" ++ ++#define ERRSTR strerror(errno) ++ ++struct drm_setup { ++ int conId; ++ uint32_t crtcId; ++ int crtcIdx; ++ uint32_t planeId; ++ unsigned int out_fourcc; ++ struct { ++ int x, y, width, height; ++ } compose; ++}; ++ ++typedef struct drm_aux_s { ++ unsigned int fb_handle; ++ uint32_t bo_handles[AV_DRM_MAX_PLANES]; ++ AVFrame * frame; ++} drm_aux_t; ++ ++// Aux size should only need to be 2, but on a few streams (Hobbit) under FKMS ++// we get initial flicker probably due to dodgy drm timing ++#define AUX_SIZE 3 ++typedef struct drm_display_env_s ++{ ++ AVClass *class; ++ ++ int drm_fd; ++ uint32_t con_id; ++ struct drm_setup setup; ++ enum AVPixelFormat avfmt; ++ ++ int show_all; ++ const char * drm_module; ++ ++ unsigned int ano; ++ drm_aux_t aux[AUX_SIZE]; ++ ++ pthread_t q_thread; ++ sem_t q_sem_in; ++ sem_t q_sem_out; ++ int q_terminate; ++ AVFrame * q_next; ++ ++} drm_display_env_t; ++ ++ ++static int drm_vout_write_trailer(AVFormatContext *s) ++{ ++#if TRACE_ALL ++ av_log(s, AV_LOG_DEBUG, "%s\n", __func__); ++#endif ++ ++ return 0; ++} ++ ++static int drm_vout_write_header(AVFormatContext *s) ++{ ++ const AVCodecParameters * const par = s->streams[0]->codecpar; ++ ++#if TRACE_ALL ++ av_log(s, AV_LOG_DEBUG, "%s\n", __func__); ++#endif ++ if ( s->nb_streams > 1 ++ || par->codec_type != AVMEDIA_TYPE_VIDEO ++ || par->codec_id != AV_CODEC_ID_WRAPPED_AVFRAME) { ++ av_log(s, AV_LOG_ERROR, "Only supports one wrapped avframe stream\n"); ++ return AVERROR(EINVAL); ++ } ++ ++ return 0; ++} ++ ++static int find_plane(struct AVFormatContext * const avctx, ++ const int drmfd, const int crtcidx, const uint32_t format, ++ uint32_t * const pplane_id) ++{ ++ drmModePlaneResPtr planes; ++ drmModePlanePtr plane; ++ drmModeObjectPropertiesPtr props = NULL; ++ drmModePropertyPtr prop = NULL; ++ unsigned int i; ++ unsigned int j; ++ int ret = -1; ++ ++ planes = drmModeGetPlaneResources(drmfd); ++ if (!planes) ++ { ++ av_log(avctx, AV_LOG_WARNING, "drmModeGetPlaneResources failed: %s\n", ERRSTR); ++ return -1; ++ } ++ ++ for (i = 0; i < planes->count_planes; ++i) { ++ plane = drmModeGetPlane(drmfd, planes->planes[i]); ++ if (!planes) ++ { ++ av_log(avctx, AV_LOG_WARNING, "drmModeGetPlane failed: %s\n", ERRSTR); ++ break; ++ } ++ ++ if (!(plane->possible_crtcs & (1 << crtcidx))) { ++ drmModeFreePlane(plane); ++ continue; ++ } ++ ++ for (j = 0; j < plane->count_formats; ++j) { ++ if (plane->formats[j] == format) ++ break; ++ } ++ ++ if (j == plane->count_formats) { ++ drmModeFreePlane(plane); ++ continue; ++ } ++ ++ *pplane_id = plane->plane_id; ++ drmModeFreePlane(plane); ++ break; ++ } ++ ++ if (i == planes->count_planes) { ++ ret = -1; ++ goto fail; ++ } ++ ++ props = drmModeObjectGetProperties(drmfd, *pplane_id, DRM_MODE_OBJECT_PLANE); ++ if (!props) ++ goto fail; ++ for (i = 0; i != props->count_props; ++i) { ++ if (prop) ++ drmModeFreeProperty(prop); ++ prop = drmModeGetProperty(drmfd, props->props[i]); ++ if (!prop) ++ goto fail; ++ if (strcmp("zpos", prop->name) == 0) { ++ if (drmModeObjectSetProperty(drmfd, *pplane_id, DRM_MODE_OBJECT_PLANE, props->props[i], prop->values[1]) == 0) ++ av_log(avctx, AV_LOG_DEBUG, "ZPOS set to %d\n", (int)prop->values[1]); ++ else ++ av_log(avctx, AV_LOG_WARNING, "Failed to set ZPOS on DRM plane\n"); ++ break; ++ } ++ } ++ ++ ret = 0; ++fail: ++ if (props) ++ drmModeFreeObjectProperties(props); ++ if (prop) ++ drmModeFreeProperty(prop); ++ drmModeFreePlaneResources(planes); ++ return ret; ++} ++ ++static void da_uninit(drm_display_env_t * const de, drm_aux_t * da) ++{ ++ if (da->fb_handle != 0) { ++ drmModeRmFB(de->drm_fd, da->fb_handle); ++ da->fb_handle = 0; ++ } ++ ++ for (unsigned int i = 0; i != AV_DRM_MAX_PLANES; ++i) { ++ if (da->bo_handles[i]) { ++ struct drm_gem_close gem_close = {.handle = da->bo_handles[i]}; ++ drmIoctl(de->drm_fd, DRM_IOCTL_GEM_CLOSE, &gem_close); ++ da->bo_handles[i] = 0; ++ } ++ } ++ av_frame_free(&da->frame); ++} ++ ++static int do_display(AVFormatContext * const s, drm_display_env_t * const de, AVFrame * frame) ++{ ++ const AVDRMFrameDescriptor *desc = (AVDRMFrameDescriptor*)frame->data[0]; ++ drm_aux_t * da = de->aux + de->ano; ++ const uint32_t format = desc->layers[0].format; ++ int ret = 0; ++ ++#if TRACE_ALL ++ av_log(s, AV_LOG_DEBUG, "<<< %s: fd=%d\n", __func__, desc->objects[0].fd); ++#endif ++ ++ if (de->setup.out_fourcc != format) { ++ if (find_plane(s, de->drm_fd, de->setup.crtcIdx, format, &de->setup.planeId)) { ++ av_frame_free(&frame); ++ av_log(s, AV_LOG_WARNING, "No plane for format: %#x\n", format); ++ return -1; ++ } ++ de->setup.out_fourcc = format; ++ } ++ ++ { ++ drmVBlank vbl = { ++ .request = { ++ .type = DRM_VBLANK_RELATIVE, ++ .sequence = 0 ++ } ++ }; ++ ++ while (drmWaitVBlank(de->drm_fd, &vbl)) { ++ if (errno != EINTR) { ++// av_log(s, AV_LOG_WARNING, "drmWaitVBlank failed: %s\n", ERRSTR); ++ break; ++ } ++ } ++ } ++ ++ da_uninit(de, da); ++ ++ { ++ uint32_t pitches[4] = {0}; ++ uint32_t offsets[4] = {0}; ++ uint64_t modifiers[4] = {0}; ++ uint32_t bo_handles[4] = {0}; ++ int has_mods = 0; ++ int i, j, n; ++ ++ da->frame = frame; ++ ++ for (i = 0; i < desc->nb_objects; ++i) { ++ if (drmPrimeFDToHandle(de->drm_fd, desc->objects[i].fd, da->bo_handles + i) != 0) { ++ av_log(s, AV_LOG_WARNING, "drmPrimeFDToHandle[%d](%d) failed: %s\n", i, desc->objects[i].fd, ERRSTR); ++ return -1; ++ } ++ if (desc->objects[i].format_modifier != DRM_FORMAT_MOD_LINEAR && ++ desc->objects[i].format_modifier != DRM_FORMAT_MOD_INVALID) ++ has_mods = 1; ++ } ++ ++ n = 0; ++ for (i = 0; i < desc->nb_layers; ++i) { ++ for (j = 0; j < desc->layers[i].nb_planes; ++j) { ++ const AVDRMPlaneDescriptor * const p = desc->layers[i].planes + j; ++ const AVDRMObjectDescriptor * const obj = desc->objects + p->object_index; ++ pitches[n] = p->pitch; ++ offsets[n] = p->offset; ++ modifiers[n] = obj->format_modifier; ++ bo_handles[n] = da->bo_handles[p->object_index]; ++ ++n; ++ } ++ } ++ ++#if 1 && TRACE_ALL ++ av_log(s, AV_LOG_DEBUG, "%dx%d, fmt: %x, boh=%d,%d,%d,%d, pitch=%d,%d,%d,%d," ++ " offset=%d,%d,%d,%d, mod=%llx,%llx,%llx,%llx\n", ++ av_frame_cropped_width(frame), ++ av_frame_cropped_height(frame), ++ desc->layers[0].format, ++ bo_handles[0], ++ bo_handles[1], ++ bo_handles[2], ++ bo_handles[3], ++ pitches[0], ++ pitches[1], ++ pitches[2], ++ pitches[3], ++ offsets[0], ++ offsets[1], ++ offsets[2], ++ offsets[3], ++ (long long)modifiers[0], ++ (long long)modifiers[1], ++ (long long)modifiers[2], ++ (long long)modifiers[3] ++ ); ++#endif ++ ++ if (drmModeAddFB2WithModifiers(de->drm_fd, ++ av_frame_cropped_width(frame), ++ av_frame_cropped_height(frame), ++ desc->layers[0].format, bo_handles, ++ pitches, offsets, ++ has_mods ? modifiers : NULL, ++ &da->fb_handle, ++ has_mods ? DRM_MODE_FB_MODIFIERS : 0) != 0) { ++ av_log(s, AV_LOG_WARNING, "drmModeAddFB2WithModifiers failed: %s\n", ERRSTR); ++ return -1; ++ } ++ } ++ ++ ret = drmModeSetPlane(de->drm_fd, de->setup.planeId, de->setup.crtcId, ++ da->fb_handle, 0, ++ de->setup.compose.x, de->setup.compose.y, ++ de->setup.compose.width, ++ de->setup.compose.height, ++ 0, 0, ++ av_frame_cropped_width(frame) << 16, ++ av_frame_cropped_height(frame) << 16); ++ ++ if (ret != 0) { ++ av_log(s, AV_LOG_WARNING, "drmModeSetPlane failed: %s\n", ERRSTR); ++ } ++ ++ de->ano = de->ano + 1 >= AUX_SIZE ? 0 : de->ano + 1; ++ ++ return ret; ++} ++ ++static int do_sem_wait(sem_t * const sem, const int nowait) ++{ ++ while (nowait ? sem_trywait(sem) : sem_wait(sem)) { ++ if (errno != EINTR) ++ return -errno; ++ } ++ return 0; ++} ++ ++static void * display_thread(void * v) ++{ ++ AVFormatContext * const s = v; ++ drm_display_env_t * const de = s->priv_data; ++ int i; ++ ++#if TRACE_ALL ++ av_log(s, AV_LOG_DEBUG, "<<< %s\n", __func__); ++#endif ++ ++ sem_post(&de->q_sem_out); ++ ++ for (;;) { ++ AVFrame * frame; ++ ++ do_sem_wait(&de->q_sem_in, 0); ++ ++ if (de->q_terminate) ++ break; ++ ++ frame = de->q_next; ++ de->q_next = NULL; ++ sem_post(&de->q_sem_out); ++ ++ do_display(s, de, frame); ++ } ++ ++#if TRACE_ALL ++ av_log(s, AV_LOG_DEBUG, ">>> %s\n", __func__); ++#endif ++ ++ for (i = 0; i != AUX_SIZE; ++i) ++ da_uninit(de, de->aux + i); ++ ++ av_frame_free(&de->q_next); ++ ++ return NULL; ++} ++ ++static int drm_vout_write_packet(AVFormatContext *s, AVPacket *pkt) ++{ ++ const AVFrame * const src_frame = (AVFrame *)pkt->data; ++ AVFrame * frame; ++ drm_display_env_t * const de = s->priv_data; ++ int ret; ++ ++#if TRACE_ALL ++ av_log(s, AV_LOG_DEBUG, "%s\n", __func__); ++#endif ++ ++ if ((src_frame->flags & AV_FRAME_FLAG_CORRUPT) != 0) { ++ av_log(s, AV_LOG_WARNING, "Discard corrupt frame: fmt=%d, ts=%" PRId64 "\n", src_frame->format, src_frame->pts); ++ return 0; ++ } ++ ++ if (src_frame->format == AV_PIX_FMT_DRM_PRIME) { ++ frame = av_frame_alloc(); ++ av_frame_ref(frame, src_frame); ++ } ++ else if (src_frame->format == AV_PIX_FMT_VAAPI) { ++ frame = av_frame_alloc(); ++ frame->format = AV_PIX_FMT_DRM_PRIME; ++ if (av_hwframe_map(frame, src_frame, 0) != 0) ++ { ++ av_log(s, AV_LOG_WARNING, "Failed to map frame (format=%d) to DRM_PRiME\n", src_frame->format); ++ av_frame_free(&frame); ++ return AVERROR(EINVAL); ++ } ++ } ++ else { ++ av_log(s, AV_LOG_WARNING, "Frame (format=%d) not DRM_PRiME\n", src_frame->format); ++ return AVERROR(EINVAL); ++ } ++ ++ ret = do_sem_wait(&de->q_sem_out, !de->show_all); ++ if (ret) { ++ av_frame_free(&frame); ++ } ++ else { ++ de->q_next = frame; ++ sem_post(&de->q_sem_in); ++ } ++ ++ return 0; ++} ++ ++static int drm_vout_write_frame(AVFormatContext *s, int stream_index, AVFrame **ppframe, ++ unsigned flags) ++{ ++ av_log(s, AV_LOG_ERROR, "%s: NIF: idx=%d, flags=%#x\n", __func__, stream_index, flags); ++ return AVERROR_PATCHWELCOME; ++} ++ ++static int drm_vout_control_message(AVFormatContext *s, int type, void *data, size_t data_size) ++{ ++#if TRACE_ALL ++ av_log(s, AV_LOG_DEBUG, "%s: %d\n", __func__, type); ++#endif ++ switch(type) { ++ case AV_APP_TO_DEV_WINDOW_REPAINT: ++ return 0; ++ default: ++ break; ++ } ++ return AVERROR(ENOSYS); ++} ++ ++static int find_crtc(struct AVFormatContext * const avctx, int drmfd, struct drm_setup *s, uint32_t * const pConId) ++{ ++ int ret = -1; ++ int i; ++ drmModeRes *res = drmModeGetResources(drmfd); ++ drmModeConnector *c; ++ ++ if(!res) ++ { ++ printf( "drmModeGetResources failed: %s\n", ERRSTR); ++ return -1; ++ } ++ ++ if (res->count_crtcs <= 0) ++ { ++ printf( "drm: no crts\n"); ++ goto fail_res; ++ } ++ ++ if (!s->conId) { ++ fprintf(stderr, ++ "No connector ID specified. Choosing default from list:\n"); ++ ++ for (i = 0; i < res->count_connectors; i++) { ++ drmModeConnector *con = ++ drmModeGetConnector(drmfd, res->connectors[i]); ++ drmModeEncoder *enc = NULL; ++ drmModeCrtc *crtc = NULL; ++ ++ if (con->encoder_id) { ++ enc = drmModeGetEncoder(drmfd, con->encoder_id); ++ if (enc->crtc_id) { ++ crtc = drmModeGetCrtc(drmfd, enc->crtc_id); ++ } ++ } ++ ++ if (!s->conId && crtc) { ++ s->conId = con->connector_id; ++ s->crtcId = crtc->crtc_id; ++ } ++ ++ av_log(avctx, AV_LOG_DEBUG, "Connector %d (crtc %d): type %d, %dx%d%s\n", ++ con->connector_id, ++ crtc ? crtc->crtc_id : 0, ++ con->connector_type, ++ crtc ? crtc->width : 0, ++ crtc ? crtc->height : 0, ++ (s->conId == (int)con->connector_id ? ++ " (chosen)" : "")); ++ ++ if (crtc) ++ drmModeFreeCrtc(crtc); ++ if (enc) ++ drmModeFreeEncoder(enc); ++ if (con) ++ drmModeFreeConnector(con); ++ } ++ ++ if (!s->conId) { ++ av_log(avctx, AV_LOG_ERROR, ++ "No suitable enabled connector found.\n"); ++ return -1;; ++ } ++ } ++ ++ s->crtcIdx = -1; ++ ++ for (i = 0; i < res->count_crtcs; ++i) { ++ if (s->crtcId == res->crtcs[i]) { ++ s->crtcIdx = i; ++ break; ++ } ++ } ++ ++ if (s->crtcIdx == -1) ++ { ++ av_log(avctx, AV_LOG_WARNING, "drm: CRTC %u not found\n", s->crtcId); ++ goto fail_res; ++ } ++ ++ if (res->count_connectors <= 0) ++ { ++ av_log(avctx, AV_LOG_WARNING, "drm: no connectors\n"); ++ goto fail_res; ++ } ++ ++ c = drmModeGetConnector(drmfd, s->conId); ++ if (!c) ++ { ++ av_log(avctx, AV_LOG_WARNING, "drmModeGetConnector failed: %s\n", ERRSTR); ++ goto fail_res; ++ } ++ ++ if (!c->count_modes) ++ { ++ av_log(avctx, AV_LOG_WARNING, "connector supports no mode\n"); ++ goto fail_conn; ++ } ++ ++ { ++ drmModeCrtc *crtc = drmModeGetCrtc(drmfd, s->crtcId); ++ s->compose.x = crtc->x; ++ s->compose.y = crtc->y; ++ s->compose.width = crtc->width; ++ s->compose.height = crtc->height; ++ drmModeFreeCrtc(crtc); ++ } ++ ++ if (pConId) ++ *pConId = c->connector_id; ++ ret = 0; ++ ++fail_conn: ++ drmModeFreeConnector(c); ++ ++fail_res: ++ drmModeFreeResources(res); ++ ++ return ret; ++} ++ ++// deinit is called if init fails so no need to clean up explicity here ++static int drm_vout_init(struct AVFormatContext * s) ++{ ++ drm_display_env_t * const de = s->priv_data; ++ int rv; ++ ++ av_log(s, AV_LOG_DEBUG, "<<< %s\n", __func__); ++ ++ de->drm_fd = -1; ++ de->con_id = 0; ++ de->setup = (struct drm_setup){0}; ++ de->q_terminate = 0; ++ ++ if ((de->drm_fd = drmOpen(de->drm_module, NULL)) < 0) ++ { ++ rv = AVERROR(errno); ++ av_log(s, AV_LOG_ERROR, "Failed to drmOpen %s: %s\n", de->drm_module, av_err2str(rv)); ++ return rv; ++ } ++ ++ if (find_crtc(s, de->drm_fd, &de->setup, &de->con_id) != 0) ++ { ++ av_log(s, AV_LOG_ERROR, "failed to find valid mode\n"); ++ rv = AVERROR(EINVAL); ++ goto fail_close; ++ } ++ ++ sem_init(&de->q_sem_in, 0, 0); ++ sem_init(&de->q_sem_out, 0, 0); ++ if (pthread_create(&de->q_thread, NULL, display_thread, s)) { ++ rv = AVERROR(errno); ++ av_log(s, AV_LOG_ERROR, "Failed to create display thread: %s\n", av_err2str(rv)); ++ goto fail_close; ++ } ++ ++ av_log(s, AV_LOG_DEBUG, ">>> %s\n", __func__); ++ ++ return 0; ++ ++fail_close: ++ close(de->drm_fd); ++ de->drm_fd = -1; ++ av_log(s, AV_LOG_DEBUG, ">>> %s: FAIL\n", __func__); ++ ++ return rv; ++} ++ ++static void drm_vout_deinit(struct AVFormatContext * s) ++{ ++ drm_display_env_t * const de = s->priv_data; ++ ++ av_log(s, AV_LOG_DEBUG, "<<< %s\n", __func__); ++ ++ de->q_terminate = 1; ++ sem_post(&de->q_sem_in); ++ pthread_join(de->q_thread, NULL); ++ sem_destroy(&de->q_sem_in); ++ sem_destroy(&de->q_sem_out); ++ ++ for (unsigned int i = 0; i != AUX_SIZE; ++i) ++ da_uninit(de, de->aux + i); ++ ++ av_frame_free(&de->q_next); ++ ++ if (de->drm_fd >= 0) { ++ close(de->drm_fd); ++ de->drm_fd = -1; ++ } ++ ++ av_log(s, AV_LOG_DEBUG, ">>> %s\n", __func__); ++} ++ ++ ++#define OFFSET(x) offsetof(drm_display_env_t, x) ++static const AVOption options[] = { ++ { "show_all", "show all frames", OFFSET(show_all), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, AV_OPT_FLAG_ENCODING_PARAM }, ++ { "drm_module", "drm_module name to use, default=" DRM_MODULE, OFFSET(drm_module), AV_OPT_TYPE_STRING, { .str = DRM_MODULE }, 0, 0, AV_OPT_FLAG_ENCODING_PARAM }, ++ { NULL } ++}; ++ ++static const AVClass drm_vout_class = { ++ .class_name = "drm vid outdev", ++ .item_name = av_default_item_name, ++ .option = options, ++ .version = LIBAVUTIL_VERSION_INT, ++ .category = AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT, ++}; ++ ++AVOutputFormat ff_vout_drm_muxer = { ++ .name = "vout_drm", ++ .long_name = NULL_IF_CONFIG_SMALL("Drm video output device"), ++ .priv_data_size = sizeof(drm_display_env_t), ++ .audio_codec = AV_CODEC_ID_NONE, ++ .video_codec = AV_CODEC_ID_WRAPPED_AVFRAME, ++ .write_header = drm_vout_write_header, ++ .write_packet = drm_vout_write_packet, ++ .write_uncoded_frame = drm_vout_write_frame, ++ .write_trailer = drm_vout_write_trailer, ++ .control_message = drm_vout_control_message, ++ .flags = AVFMT_NOFILE | AVFMT_VARIABLE_FPS | AVFMT_NOTIMESTAMPS, ++ .priv_class = &drm_vout_class, ++ .init = drm_vout_init, ++ .deinit = drm_vout_deinit, ++}; ++ +--- /dev/null ++++ b/libavdevice/egl_vout.c +@@ -0,0 +1,781 @@ ++/* ++ * Copyright (c) 2020 John Cox for Raspberry Pi Trading ++ * ++ * This file is part of FFmpeg. ++ * ++ * FFmpeg is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation; either ++ * version 2.1 of the License, or (at your option) any later version. ++ * ++ * FFmpeg is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with FFmpeg; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ++ */ ++ ++ ++// *** This module is a work in progress and its utility is strictly ++// limited to testing. ++// Amongst other issues it doesn't wait for the pic to be displayed before ++// returning the buffer so flikering does occur. ++ ++#include ++#include ++ ++#include "libavutil/opt.h" ++#include "libavutil/avassert.h" ++#include "libavutil/pixdesc.h" ++#include "libavutil/imgutils.h" ++#include "libavutil/hwcontext_drm.h" ++#include "libavformat/internal.h" ++#include "avdevice.h" ++ ++#include "pthread.h" ++#include ++#include ++#include ++ ++#include ++#include ++ ++#include "libavutil/rpi_sand_fns.h" ++ ++#define TRACE_ALL 0 ++ ++struct egl_setup { ++ int conId; ++ ++ Display *dpy; ++ EGLDisplay egl_dpy; ++ EGLContext ctx; ++ EGLSurface surf; ++ Window win; ++ ++ uint32_t crtcId; ++ int crtcIdx; ++ uint32_t planeId; ++ struct { ++ int x, y, width, height; ++ } compose; ++}; ++ ++typedef struct egl_aux_s { ++ int fd; ++ GLuint texture; ++ ++} egl_aux_t; ++ ++typedef struct egl_display_env_s { ++ AVClass *class; ++ ++ struct egl_setup setup; ++ enum AVPixelFormat avfmt; ++ ++ int show_all; ++ int window_width, window_height; ++ int window_x, window_y; ++ int fullscreen; ++ ++ egl_aux_t aux[32]; ++ ++ pthread_t q_thread; ++ pthread_mutex_t q_lock; ++ sem_t display_start_sem; ++ sem_t q_sem; ++ int q_terminate; ++ AVFrame *q_this; ++ AVFrame *q_next; ++ ++} egl_display_env_t; ++ ++ ++/** ++ * Remove window border/decorations. ++ */ ++static void ++no_border(Display *dpy, Window w) ++{ ++ static const unsigned MWM_HINTS_DECORATIONS = (1 << 1); ++ static const int PROP_MOTIF_WM_HINTS_ELEMENTS = 5; ++ ++ typedef struct { ++ unsigned long flags; ++ unsigned long functions; ++ unsigned long decorations; ++ long inputMode; ++ unsigned long status; ++ } PropMotifWmHints; ++ ++ PropMotifWmHints motif_hints; ++ Atom prop, proptype; ++ unsigned long flags = 0; ++ ++ /* setup the property */ ++ motif_hints.flags = MWM_HINTS_DECORATIONS; ++ motif_hints.decorations = flags; ++ ++ /* get the atom for the property */ ++ prop = XInternAtom(dpy, "_MOTIF_WM_HINTS", True); ++ if (!prop) { ++ /* something went wrong! */ ++ return; ++ } ++ ++ /* not sure this is correct, seems to work, XA_WM_HINTS didn't work */ ++ proptype = prop; ++ ++ XChangeProperty(dpy, w, /* display, window */ ++ prop, proptype, /* property, type */ ++ 32, /* format: 32-bit datums */ ++ PropModeReplace, /* mode */ ++ (unsigned char *)&motif_hints, /* data */ ++ PROP_MOTIF_WM_HINTS_ELEMENTS /* nelements */ ++ ); ++} ++ ++ ++/* ++ * Create an RGB, double-buffered window. ++ * Return the window and context handles. ++ */ ++static int ++make_window(struct AVFormatContext *const s, ++ egl_display_env_t *const de, ++ Display *dpy, EGLDisplay egl_dpy, const char *name, ++ Window *winRet, EGLContext *ctxRet, EGLSurface *surfRet) ++{ ++ int scrnum = DefaultScreen(dpy); ++ XSetWindowAttributes attr; ++ unsigned long mask; ++ Window root = RootWindow(dpy, scrnum); ++ Window win; ++ EGLContext ctx; ++ const int fullscreen = de->fullscreen; ++ EGLConfig config; ++ int x = de->window_x; ++ int y = de->window_y; ++ int width = de->window_width ? de->window_width : 1280; ++ int height = de->window_height ? de->window_height : 720; ++ ++ ++ if (fullscreen) { ++ int scrnum = DefaultScreen(dpy); ++ ++ x = 0; y = 0; ++ width = DisplayWidth(dpy, scrnum); ++ height = DisplayHeight(dpy, scrnum); ++ } ++ ++ { ++ EGLint num_configs; ++ static const EGLint attribs[] = { ++ EGL_RED_SIZE, 1, ++ EGL_GREEN_SIZE, 1, ++ EGL_BLUE_SIZE, 1, ++ EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, ++ EGL_NONE ++ }; ++ ++ if (!eglChooseConfig(egl_dpy, attribs, &config, 1, &num_configs)) { ++ av_log(s, AV_LOG_ERROR, "Error: couldn't get an EGL visual config\n"); ++ return -1; ++ } ++ } ++ ++ { ++ EGLint vid; ++ if (!eglGetConfigAttrib(egl_dpy, config, EGL_NATIVE_VISUAL_ID, &vid)) { ++ av_log(s, AV_LOG_ERROR, "Error: eglGetConfigAttrib() failed\n"); ++ return -1; ++ } ++ ++ { ++ XVisualInfo visTemplate = { ++ .visualid = vid, ++ }; ++ int num_visuals; ++ XVisualInfo *visinfo = XGetVisualInfo(dpy, VisualIDMask, ++ &visTemplate, &num_visuals); ++ ++ /* window attributes */ ++ attr.background_pixel = 0; ++ attr.border_pixel = 0; ++ attr.colormap = XCreateColormap(dpy, root, visinfo->visual, AllocNone); ++ attr.event_mask = StructureNotifyMask | ExposureMask | KeyPressMask; ++ /* XXX this is a bad way to get a borderless window! */ ++ mask = CWBackPixel | CWBorderPixel | CWColormap | CWEventMask; ++ ++ win = XCreateWindow(dpy, root, x, y, width, height, ++ 0, visinfo->depth, InputOutput, ++ visinfo->visual, mask, &attr); ++ XFree(visinfo); ++ } ++ } ++ ++ if (fullscreen) ++ no_border(dpy, win); ++ ++ /* set hints and properties */ ++ { ++ XSizeHints sizehints; ++ sizehints.x = x; ++ sizehints.y = y; ++ sizehints.width = width; ++ sizehints.height = height; ++ sizehints.flags = USSize | USPosition; ++ XSetNormalHints(dpy, win, &sizehints); ++ XSetStandardProperties(dpy, win, name, name, ++ None, (char **)NULL, 0, &sizehints); ++ } ++ ++ eglBindAPI(EGL_OPENGL_ES_API); ++ ++ { ++ static const EGLint ctx_attribs[] = { ++ EGL_CONTEXT_CLIENT_VERSION, 2, ++ EGL_NONE ++ }; ++ ctx = eglCreateContext(egl_dpy, config, EGL_NO_CONTEXT, ctx_attribs); ++ if (!ctx) { ++ av_log(s, AV_LOG_ERROR, "Error: eglCreateContext failed\n"); ++ return -1; ++ } ++ } ++ ++ ++ XMapWindow(dpy, win); ++ ++ { ++ EGLSurface surf = eglCreateWindowSurface(egl_dpy, config, (EGLNativeWindowType)win, NULL); ++ if (!surf) { ++ av_log(s, AV_LOG_ERROR, "Error: eglCreateWindowSurface failed\n"); ++ return -1; ++ } ++ ++ if (!eglMakeCurrent(egl_dpy, surf, surf, ctx)) { ++ av_log(s, AV_LOG_ERROR, "Error: eglCreateContext failed\n"); ++ return -1; ++ } ++ ++ *winRet = win; ++ *ctxRet = ctx; ++ *surfRet = surf; ++ } ++ ++ return 0; ++} ++ ++static GLint ++compile_shader(struct AVFormatContext *const avctx, GLenum target, const char *source) ++{ ++ GLuint s = glCreateShader(target); ++ ++ if (s == 0) { ++ av_log(avctx, AV_LOG_ERROR, "Failed to create shader\n"); ++ return 0; ++ } ++ ++ glShaderSource(s, 1, (const GLchar **)&source, NULL); ++ glCompileShader(s); ++ ++ { ++ GLint ok; ++ glGetShaderiv(s, GL_COMPILE_STATUS, &ok); ++ ++ if (!ok) { ++ GLchar *info; ++ GLint size; ++ ++ glGetShaderiv(s, GL_INFO_LOG_LENGTH, &size); ++ info = malloc(size); ++ ++ glGetShaderInfoLog(s, size, NULL, info); ++ av_log(avctx, AV_LOG_ERROR, "Failed to compile shader: %ssource:\n%s\n", info, source); ++ ++ return 0; ++ } ++ } ++ ++ return s; ++} ++ ++static GLuint link_program(struct AVFormatContext *const s, GLint vs, GLint fs) ++{ ++ GLuint prog = glCreateProgram(); ++ ++ if (prog == 0) { ++ av_log(s, AV_LOG_ERROR, "Failed to create program\n"); ++ return 0; ++ } ++ ++ glAttachShader(prog, vs); ++ glAttachShader(prog, fs); ++ glLinkProgram(prog); ++ ++ { ++ GLint ok; ++ glGetProgramiv(prog, GL_LINK_STATUS, &ok); ++ if (!ok) { ++ /* Some drivers return a size of 1 for an empty log. This is the size ++ * of a log that contains only a terminating NUL character. ++ */ ++ GLint size; ++ GLchar *info = NULL; ++ glGetProgramiv(prog, GL_INFO_LOG_LENGTH, &size); ++ if (size > 1) { ++ info = malloc(size); ++ glGetProgramInfoLog(prog, size, NULL, info); ++ } ++ ++ av_log(s, AV_LOG_ERROR, "Failed to link: %s\n", ++ (info != NULL) ? info : ""); ++ return 0; ++ } ++ } ++ ++ return prog; ++} ++ ++static int ++gl_setup(struct AVFormatContext *const s) ++{ ++ const char *vs = ++ "attribute vec4 pos;\n" ++ "varying vec2 texcoord;\n" ++ "\n" ++ "void main() {\n" ++ " gl_Position = pos;\n" ++ " texcoord.x = (pos.x + 1.0) / 2.0;\n" ++ " texcoord.y = (-pos.y + 1.0) / 2.0;\n" ++ "}\n"; ++ const char *fs = ++ "#extension GL_OES_EGL_image_external : enable\n" ++ "precision mediump float;\n" ++ "uniform samplerExternalOES s;\n" ++ "varying vec2 texcoord;\n" ++ "void main() {\n" ++ " gl_FragColor = texture2D(s, texcoord);\n" ++ "}\n"; ++ ++ GLuint vs_s; ++ GLuint fs_s; ++ GLuint prog; ++ ++ if (!(vs_s = compile_shader(s, GL_VERTEX_SHADER, vs)) || ++ !(fs_s = compile_shader(s, GL_FRAGMENT_SHADER, fs)) || ++ !(prog = link_program(s, vs_s, fs_s))) ++ return -1; ++ ++ glUseProgram(prog); ++ ++ { ++ static const float verts[] = { ++ -1, -1, ++ 1, -1, ++ 1, 1, ++ -1, 1, ++ }; ++ glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, 0, verts); ++ } ++ ++ glEnableVertexAttribArray(0); ++ return 0; ++} ++ ++static int egl_vout_write_trailer(AVFormatContext *s) ++{ ++#if TRACE_ALL ++ av_log(s, AV_LOG_INFO, "%s\n", __func__); ++#endif ++ ++ return 0; ++} ++ ++static int egl_vout_write_header(AVFormatContext *s) ++{ ++ const AVCodecParameters *const par = s->streams[0]->codecpar; ++ ++#if TRACE_ALL ++ av_log(s, AV_LOG_INFO, "%s\n", __func__); ++#endif ++ if (s->nb_streams > 1 ++ || par->codec_type != AVMEDIA_TYPE_VIDEO ++ || par->codec_id != AV_CODEC_ID_WRAPPED_AVFRAME) { ++ av_log(s, AV_LOG_ERROR, "Only supports one wrapped avframe stream\n"); ++ return AVERROR(EINVAL); ++ } ++ ++ return 0; ++} ++ ++ ++static int do_display(AVFormatContext *const s, egl_display_env_t *const de, AVFrame *const frame) ++{ ++ const AVDRMFrameDescriptor *desc = (AVDRMFrameDescriptor *)frame->data[0]; ++ egl_aux_t *da = NULL; ++ unsigned int i; ++ ++#if TRACE_ALL ++ av_log(s, AV_LOG_INFO, "<<< %s\n", __func__); ++#endif ++ ++ for (i = 0; i != 32; ++i) { ++ if (de->aux[i].fd == -1 || de->aux[i].fd == desc->objects[0].fd) { ++ da = de->aux + i; ++ break; ++ } ++ } ++ ++ if (da == NULL) { ++ av_log(s, AV_LOG_INFO, "%s: Out of handles\n", __func__); ++ return AVERROR(EINVAL); ++ } ++ ++ if (da->texture == 0) { ++ EGLint attribs[50]; ++ EGLint *a = attribs; ++ int i, j; ++ static const EGLint anames[] = { ++ EGL_DMA_BUF_PLANE0_FD_EXT, ++ EGL_DMA_BUF_PLANE0_OFFSET_EXT, ++ EGL_DMA_BUF_PLANE0_PITCH_EXT, ++ EGL_DMA_BUF_PLANE0_MODIFIER_LO_EXT, ++ EGL_DMA_BUF_PLANE0_MODIFIER_HI_EXT, ++ EGL_DMA_BUF_PLANE1_FD_EXT, ++ EGL_DMA_BUF_PLANE1_OFFSET_EXT, ++ EGL_DMA_BUF_PLANE1_PITCH_EXT, ++ EGL_DMA_BUF_PLANE1_MODIFIER_LO_EXT, ++ EGL_DMA_BUF_PLANE1_MODIFIER_HI_EXT, ++ EGL_DMA_BUF_PLANE2_FD_EXT, ++ EGL_DMA_BUF_PLANE2_OFFSET_EXT, ++ EGL_DMA_BUF_PLANE2_PITCH_EXT, ++ EGL_DMA_BUF_PLANE2_MODIFIER_LO_EXT, ++ EGL_DMA_BUF_PLANE2_MODIFIER_HI_EXT, ++ }; ++ const EGLint *b = anames; ++ ++ *a++ = EGL_WIDTH; ++ *a++ = av_frame_cropped_width(frame); ++ *a++ = EGL_HEIGHT; ++ *a++ = av_frame_cropped_height(frame); ++ *a++ = EGL_LINUX_DRM_FOURCC_EXT; ++ *a++ = desc->layers[0].format; ++ ++ for (i = 0; i < desc->nb_layers; ++i) { ++ for (j = 0; j < desc->layers[i].nb_planes; ++j) { ++ const AVDRMPlaneDescriptor *const p = desc->layers[i].planes + j; ++ const AVDRMObjectDescriptor *const obj = desc->objects + p->object_index; ++ *a++ = *b++; ++ *a++ = obj->fd; ++ *a++ = *b++; ++ *a++ = p->offset; ++ *a++ = *b++; ++ *a++ = p->pitch; ++ if (obj->format_modifier == 0) { ++ b += 2; ++ } ++ else { ++ *a++ = *b++; ++ *a++ = (EGLint)(obj->format_modifier & 0xFFFFFFFF); ++ *a++ = *b++; ++ *a++ = (EGLint)(obj->format_modifier >> 32); ++ } ++ } ++ } ++ ++ *a = EGL_NONE; ++ ++#if TRACE_ALL ++ for (a = attribs, i = 0; *a != EGL_NONE; a += 2, ++i) { ++ av_log(s, AV_LOG_INFO, "[%2d] %4x: %d\n", i, a[0], a[1]); ++ } ++#endif ++ { ++ const EGLImage image = eglCreateImageKHR(de->setup.egl_dpy, ++ EGL_NO_CONTEXT, ++ EGL_LINUX_DMA_BUF_EXT, ++ NULL, attribs); ++ if (!image) { ++ av_log(s, AV_LOG_ERROR, "Failed to import fd %d\n", desc->objects[0].fd); ++ return -1; ++ } ++ ++ glGenTextures(1, &da->texture); ++ glBindTexture(GL_TEXTURE_EXTERNAL_OES, da->texture); ++ glTexParameteri(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_MIN_FILTER, GL_LINEAR); ++ glTexParameteri(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_MAG_FILTER, GL_LINEAR); ++ glEGLImageTargetTexture2DOES(GL_TEXTURE_EXTERNAL_OES, image); ++ ++ eglDestroyImageKHR(de->setup.egl_dpy, image); ++ } ++ ++ da->fd = desc->objects[0].fd; ++ } ++ ++ glClearColor(0.5, 0.5, 0.5, 0.5); ++ glClear(GL_COLOR_BUFFER_BIT); ++ ++ glBindTexture(GL_TEXTURE_EXTERNAL_OES, da->texture); ++ glDrawArrays(GL_TRIANGLE_FAN, 0, 4); ++ eglSwapBuffers(de->setup.egl_dpy, de->setup.surf); ++ ++ glDeleteTextures(1, &da->texture); ++ da->texture = 0; ++ da->fd = -1; ++ ++ return 0; ++} ++ ++static void* display_thread(void *v) ++{ ++ AVFormatContext *const s = v; ++ egl_display_env_t *const de = s->priv_data; ++ ++#if TRACE_ALL ++ av_log(s, AV_LOG_INFO, "<<< %s\n", __func__); ++#endif ++ { ++ EGLint egl_major, egl_minor; ++ ++ de->setup.dpy = XOpenDisplay(NULL); ++ if (!de->setup.dpy) { ++ av_log(s, AV_LOG_ERROR, "Couldn't open X display\n"); ++ goto fail; ++ } ++ ++ de->setup.egl_dpy = eglGetDisplay(de->setup.dpy); ++ if (!de->setup.egl_dpy) { ++ av_log(s, AV_LOG_ERROR, "eglGetDisplay() failed\n"); ++ goto fail; ++ } ++ ++ if (!eglInitialize(de->setup.egl_dpy, &egl_major, &egl_minor)) { ++ av_log(s, AV_LOG_ERROR, "Error: eglInitialize() failed\n"); ++ goto fail; ++ } ++ ++ av_log(s, AV_LOG_INFO, "EGL version %d.%d\n", egl_major, egl_minor); ++ ++ if (!epoxy_has_egl_extension(de->setup.egl_dpy, "EGL_KHR_image_base")) { ++ av_log(s, AV_LOG_ERROR, "Missing EGL KHR image extension\n"); ++ goto fail; ++ } ++ } ++ ++ if (!de->window_width || !de->window_height) { ++ de->window_width = 1280; ++ de->window_height = 720; ++ } ++ if (make_window(s, de, de->setup.dpy, de->setup.egl_dpy, "ffmpeg-vout", ++ &de->setup.win, &de->setup.ctx, &de->setup.surf)) { ++ av_log(s, AV_LOG_ERROR, "%s: make_window failed\n", __func__); ++ goto fail; ++ } ++ ++ if (gl_setup(s)) { ++ av_log(s, AV_LOG_ERROR, "%s: gl_setup failed\n", __func__); ++ goto fail; ++ } ++ ++#if TRACE_ALL ++ av_log(s, AV_LOG_INFO, "--- %s: Start done\n", __func__); ++#endif ++ sem_post(&de->display_start_sem); ++ ++ for (;;) { ++ AVFrame *frame; ++ ++ while (sem_wait(&de->q_sem) != 0) { ++ av_assert0(errno == EINTR); ++ } ++ ++ if (de->q_terminate) ++ break; ++ ++ pthread_mutex_lock(&de->q_lock); ++ frame = de->q_next; ++ de->q_next = NULL; ++ pthread_mutex_unlock(&de->q_lock); ++ ++ do_display(s, de, frame); ++ ++ av_frame_free(&de->q_this); ++ de->q_this = frame; ++ } ++ ++#if TRACE_ALL ++ av_log(s, AV_LOG_INFO, ">>> %s\n", __func__); ++#endif ++ ++ return NULL; ++ ++fail: ++#if TRACE_ALL ++ av_log(s, AV_LOG_INFO, ">>> %s: FAIL\n", __func__); ++#endif ++ de->q_terminate = 1; ++ sem_post(&de->display_start_sem); ++ ++ return NULL; ++} ++ ++static int egl_vout_write_packet(AVFormatContext *s, AVPacket *pkt) ++{ ++ const AVFrame *const src_frame = (AVFrame *)pkt->data; ++ AVFrame *frame; ++ egl_display_env_t *const de = s->priv_data; ++ ++#if TRACE_ALL ++ av_log(s, AV_LOG_INFO, "%s\n", __func__); ++#endif ++ ++ if (src_frame->format == AV_PIX_FMT_DRM_PRIME) { ++ frame = av_frame_alloc(); ++ av_frame_ref(frame, src_frame); ++ } ++ else if (src_frame->format == AV_PIX_FMT_VAAPI) { ++ frame = av_frame_alloc(); ++ frame->format = AV_PIX_FMT_DRM_PRIME; ++ if (av_hwframe_map(frame, src_frame, 0) != 0) { ++ av_log(s, AV_LOG_WARNING, "Failed to map frame (format=%d) to DRM_PRiME\n", src_frame->format); ++ av_frame_free(&frame); ++ return AVERROR(EINVAL); ++ } ++ } ++ else { ++ av_log(s, AV_LOG_WARNING, "Frame (format=%d) not DRM_PRiME\n", src_frame->format); ++ return AVERROR(EINVAL); ++ } ++ ++ // Really hacky sync ++ while (de->show_all && de->q_next) { ++ usleep(3000); ++ } ++ ++ pthread_mutex_lock(&de->q_lock); ++ { ++ AVFrame *const t = de->q_next; ++ de->q_next = frame; ++ frame = t; ++ } ++ pthread_mutex_unlock(&de->q_lock); ++ ++ if (frame == NULL) ++ sem_post(&de->q_sem); ++ else ++ av_frame_free(&frame); ++ ++ return 0; ++} ++ ++static int egl_vout_write_frame(AVFormatContext *s, int stream_index, AVFrame **ppframe, ++ unsigned flags) ++{ ++ av_log(s, AV_LOG_ERROR, "%s: NIF: idx=%d, flags=%#x\n", __func__, stream_index, flags); ++ return AVERROR_PATCHWELCOME; ++} ++ ++static int egl_vout_control_message(AVFormatContext *s, int type, void *data, size_t data_size) ++{ ++#if TRACE_ALL ++ av_log(s, AV_LOG_INFO, "%s: %d\n", __func__, type); ++#endif ++ switch (type) { ++ case AV_APP_TO_DEV_WINDOW_REPAINT: ++ return 0; ++ default: ++ break; ++ } ++ return AVERROR(ENOSYS); ++} ++ ++// deinit is called if init fails so no need to clean up explicity here ++static int egl_vout_init(struct AVFormatContext *s) ++{ ++ egl_display_env_t *const de = s->priv_data; ++ unsigned int i; ++ ++ av_log(s, AV_LOG_DEBUG, "<<< %s\n", __func__); ++ ++ de->setup = (struct egl_setup) { 0 }; ++ ++ for (i = 0; i != 32; ++i) { ++ de->aux[i].fd = -1; ++ } ++ ++ de->q_terminate = 0; ++ pthread_mutex_init(&de->q_lock, NULL); ++ sem_init(&de->q_sem, 0, 0); ++ sem_init(&de->display_start_sem, 0, 0); ++ av_assert0(pthread_create(&de->q_thread, NULL, display_thread, s) == 0); ++ ++ sem_wait(&de->display_start_sem); ++ if (de->q_terminate) { ++ av_log(s, AV_LOG_ERROR, "%s: Display startup failure\n", __func__); ++ return -1; ++ } ++ ++ av_log(s, AV_LOG_DEBUG, ">>> %s\n", __func__); ++ ++ return 0; ++} ++ ++static void egl_vout_deinit(struct AVFormatContext *s) ++{ ++ egl_display_env_t *const de = s->priv_data; ++ ++ av_log(s, AV_LOG_DEBUG, "<<< %s\n", __func__); ++ ++ de->q_terminate = 1; ++ sem_post(&de->q_sem); ++ pthread_join(de->q_thread, NULL); ++ sem_destroy(&de->q_sem); ++ pthread_mutex_destroy(&de->q_lock); ++ ++ av_frame_free(&de->q_next); ++ av_frame_free(&de->q_this); ++ ++ av_log(s, AV_LOG_DEBUG, ">>> %s\n", __func__); ++} ++ ++#define OFFSET(x) offsetof(egl_display_env_t, x) ++static const AVOption options[] = { ++ { "show_all", "show all frames", OFFSET(show_all), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, AV_OPT_FLAG_ENCODING_PARAM }, ++ { "window_size", "set window forced size", OFFSET(window_width), AV_OPT_TYPE_IMAGE_SIZE, { .str = NULL }, 0, 0, AV_OPT_FLAG_ENCODING_PARAM }, ++ { "window_x", "set window x offset", OFFSET(window_x), AV_OPT_TYPE_INT, { .i64 = 0 }, -INT_MAX, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM }, ++ { "window_y", "set window y offset", OFFSET(window_y), AV_OPT_TYPE_INT, { .i64 = 0 }, -INT_MAX, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM }, ++ { "fullscreen", "set fullscreen display", OFFSET(fullscreen), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, AV_OPT_FLAG_ENCODING_PARAM }, ++ { NULL } ++ ++}; ++ ++static const AVClass egl_vout_class = { ++ .class_name = "egl vid outdev", ++ .item_name = av_default_item_name, ++ .option = options, ++ .version = LIBAVUTIL_VERSION_INT, ++ .category = AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT, ++}; ++ ++AVOutputFormat ff_vout_egl_muxer = { ++ .name = "vout_egl", ++ .long_name = NULL_IF_CONFIG_SMALL("Egl video output device"), ++ .priv_data_size = sizeof(egl_display_env_t), ++ .audio_codec = AV_CODEC_ID_NONE, ++ .video_codec = AV_CODEC_ID_WRAPPED_AVFRAME, ++ .write_header = egl_vout_write_header, ++ .write_packet = egl_vout_write_packet, ++ .write_uncoded_frame = egl_vout_write_frame, ++ .write_trailer = egl_vout_write_trailer, ++ .control_message = egl_vout_control_message, ++ .flags = AVFMT_NOFILE | AVFMT_VARIABLE_FPS | AVFMT_NOTIMESTAMPS, ++ .priv_class = &egl_vout_class, ++ .init = egl_vout_init, ++ .deinit = egl_vout_deinit, ++}; ++ +--- a/libavfilter/Makefile ++++ b/libavfilter/Makefile +@@ -254,6 +254,7 @@ OBJS-$(CONFIG_DEFLATE_FILTER) + OBJS-$(CONFIG_DEFLICKER_FILTER) += vf_deflicker.o + OBJS-$(CONFIG_DEINTERLACE_QSV_FILTER) += vf_deinterlace_qsv.o + OBJS-$(CONFIG_DEINTERLACE_VAAPI_FILTER) += vf_deinterlace_vaapi.o vaapi_vpp.o ++OBJS-$(CONFIG_DEINTERLACE_V4L2M2M_FILTER) += vf_deinterlace_v4l2m2m.o + OBJS-$(CONFIG_DEJUDDER_FILTER) += vf_dejudder.o + OBJS-$(CONFIG_DELOGO_FILTER) += vf_delogo.o + OBJS-$(CONFIG_DENOISE_VAAPI_FILTER) += vf_misc_vaapi.o vaapi_vpp.o +@@ -509,6 +510,7 @@ OBJS-$(CONFIG_TRANSPOSE_VAAPI_FILTER) + OBJS-$(CONFIG_TRANSPOSE_VULKAN_FILTER) += vf_transpose_vulkan.o vulkan.o vulkan_filter.o + OBJS-$(CONFIG_TRIM_FILTER) += trim.o + OBJS-$(CONFIG_UNPREMULTIPLY_FILTER) += vf_premultiply.o framesync.o ++OBJS-$(CONFIG_UNSAND_FILTER) += vf_unsand.o + OBJS-$(CONFIG_UNSHARP_FILTER) += vf_unsharp.o + OBJS-$(CONFIG_UNSHARP_OPENCL_FILTER) += vf_unsharp_opencl.o opencl.o \ + opencl/unsharp.o +--- a/libavfilter/aarch64/Makefile ++++ b/libavfilter/aarch64/Makefile +@@ -1,3 +1,5 @@ ++OBJS-$(CONFIG_BWDIF_FILTER) += aarch64/vf_bwdif_init_aarch64.o + OBJS-$(CONFIG_NLMEANS_FILTER) += aarch64/vf_nlmeans_init.o + ++NEON-OBJS-$(CONFIG_BWDIF_FILTER) += aarch64/vf_bwdif_neon.o + NEON-OBJS-$(CONFIG_NLMEANS_FILTER) += aarch64/vf_nlmeans_neon.o +--- /dev/null ++++ b/libavfilter/aarch64/vf_bwdif_init_aarch64.c +@@ -0,0 +1,125 @@ ++/* ++ * bwdif aarch64 NEON optimisations ++ * ++ * Copyright (c) 2023 John Cox ++ * ++ * This file is part of FFmpeg. ++ * ++ * FFmpeg is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation; either ++ * version 2.1 of the License, or (at your option) any later version. ++ * ++ * FFmpeg is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with FFmpeg; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ++ */ ++ ++#include "libavutil/common.h" ++#include "libavfilter/bwdif.h" ++#include "libavutil/aarch64/cpu.h" ++ ++void ff_bwdif_filter_edge_neon(void *dst1, void *prev1, void *cur1, void *next1, ++ int w, int prefs, int mrefs, int prefs2, int mrefs2, ++ int parity, int clip_max, int spat); ++ ++void ff_bwdif_filter_intra_neon(void *dst1, void *cur1, int w, int prefs, int mrefs, ++ int prefs3, int mrefs3, int parity, int clip_max); ++ ++void ff_bwdif_filter_line_neon(void *dst1, void *prev1, void *cur1, void *next1, ++ int w, int prefs, int mrefs, int prefs2, int mrefs2, ++ int prefs3, int mrefs3, int prefs4, int mrefs4, ++ int parity, int clip_max); ++ ++void ff_bwdif_filter_line3_neon(void * dst1, int d_stride, ++ const void * prev1, const void * cur1, const void * next1, int s_stride, ++ int w, int parity, int clip_max); ++ ++ ++static void filter_line3_helper(void * dst1, int d_stride, ++ const void * prev1, const void * cur1, const void * next1, int s_stride, ++ int w, int parity, int clip_max) ++{ ++ // Asm works on 16 byte chunks ++ // If w is a multiple of 16 then all is good - if not then if width rounded ++ // up to nearest 16 will fit in both src & dst strides then allow the asm ++ // to write over the padding bytes as that is almost certainly faster than ++ // having to invoke the C version to clean up the tail. ++ const int w1 = FFALIGN(w, 16); ++ const int w0 = clip_max != 255 ? 0 : ++ d_stride <= w1 && s_stride <= w1 ? w : w & ~15; ++ ++ ff_bwdif_filter_line3_neon(dst1, d_stride, ++ prev1, cur1, next1, s_stride, ++ w0, parity, clip_max); ++ ++ if (w0 < w) ++ ff_bwdif_filter_line3_c((char *)dst1 + w0, d_stride, ++ (const char *)prev1 + w0, (const char *)cur1 + w0, (const char *)next1 + w0, s_stride, ++ w - w0, parity, clip_max); ++} ++ ++static void filter_line_helper(void *dst1, void *prev1, void *cur1, void *next1, ++ int w, int prefs, int mrefs, int prefs2, int mrefs2, ++ int prefs3, int mrefs3, int prefs4, int mrefs4, ++ int parity, int clip_max) ++{ ++ const int w0 = clip_max != 255 ? 0 : w & ~15; ++ ++ ff_bwdif_filter_line_neon(dst1, prev1, cur1, next1, ++ w0, prefs, mrefs, prefs2, mrefs2, prefs3, mrefs3, prefs4, mrefs4, parity, clip_max); ++ ++ if (w0 < w) ++ ff_bwdif_filter_line_c((char *)dst1 + w0, (char *)prev1 + w0, (char *)cur1 + w0, (char *)next1 + w0, ++ w - w0, prefs, mrefs, prefs2, mrefs2, prefs3, mrefs3, prefs4, mrefs4, parity, clip_max); ++} ++ ++static void filter_edge_helper(void *dst1, void *prev1, void *cur1, void *next1, ++ int w, int prefs, int mrefs, int prefs2, int mrefs2, ++ int parity, int clip_max, int spat) ++{ ++ const int w0 = clip_max != 255 ? 0 : w & ~15; ++ ++ ff_bwdif_filter_edge_neon(dst1, prev1, cur1, next1, w0, prefs, mrefs, prefs2, mrefs2, ++ parity, clip_max, spat); ++ ++ if (w0 < w) ++ ff_bwdif_filter_edge_c((char *)dst1 + w0, (char *)prev1 + w0, (char *)cur1 + w0, (char *)next1 + w0, ++ w - w0, prefs, mrefs, prefs2, mrefs2, ++ parity, clip_max, spat); ++} ++ ++static void filter_intra_helper(void *dst1, void *cur1, int w, int prefs, int mrefs, ++ int prefs3, int mrefs3, int parity, int clip_max) ++{ ++ const int w0 = clip_max != 255 ? 0 : w & ~15; ++ ++ ff_bwdif_filter_intra_neon(dst1, cur1, w0, prefs, mrefs, prefs3, mrefs3, parity, clip_max); ++ ++ if (w0 < w) ++ ff_bwdif_filter_intra_c((char *)dst1 + w0, (char *)cur1 + w0, ++ w - w0, prefs, mrefs, prefs3, mrefs3, parity, clip_max); ++} ++ ++void ++ff_bwdif_init_aarch64(BWDIFContext *s, int bit_depth) ++{ ++ const int cpu_flags = av_get_cpu_flags(); ++ ++ if (bit_depth != 8) ++ return; ++ ++ if (!have_neon(cpu_flags)) ++ return; ++ ++ s->filter_intra = filter_intra_helper; ++ s->filter_line = filter_line_helper; ++ s->filter_edge = filter_edge_helper; ++ s->filter_line3 = filter_line3_helper; ++} ++ +--- /dev/null ++++ b/libavfilter/aarch64/vf_bwdif_neon.S +@@ -0,0 +1,788 @@ ++/* ++ * bwdif aarch64 NEON optimisations ++ * ++ * Copyright (c) 2023 John Cox ++ * ++ * This file is part of FFmpeg. ++ * ++ * FFmpeg is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation; either ++ * version 2.1 of the License, or (at your option) any later version. ++ * ++ * FFmpeg is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with FFmpeg; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ++ */ ++ ++ ++#include "libavutil/aarch64/asm.S" ++ ++// Space taken on the stack by an int (32-bit) ++#ifdef __APPLE__ ++.set SP_INT, 4 ++#else ++.set SP_INT, 8 ++#endif ++ ++.macro SQSHRUNN b, s0, s1, s2, s3, n ++ sqshrun \s0\().4h, \s0\().4s, #\n - 8 ++ sqshrun2 \s0\().8h, \s1\().4s, #\n - 8 ++ sqshrun \s1\().4h, \s2\().4s, #\n - 8 ++ sqshrun2 \s1\().8h, \s3\().4s, #\n - 8 ++ uzp2 \b\().16b, \s0\().16b, \s1\().16b ++.endm ++ ++.macro SMULL4K a0, a1, a2, a3, s0, s1, k ++ smull \a0\().4s, \s0\().4h, \k ++ smull2 \a1\().4s, \s0\().8h, \k ++ smull \a2\().4s, \s1\().4h, \k ++ smull2 \a3\().4s, \s1\().8h, \k ++.endm ++ ++.macro UMULL4K a0, a1, a2, a3, s0, s1, k ++ umull \a0\().4s, \s0\().4h, \k ++ umull2 \a1\().4s, \s0\().8h, \k ++ umull \a2\().4s, \s1\().4h, \k ++ umull2 \a3\().4s, \s1\().8h, \k ++.endm ++ ++.macro UMLAL4K a0, a1, a2, a3, s0, s1, k ++ umlal \a0\().4s, \s0\().4h, \k ++ umlal2 \a1\().4s, \s0\().8h, \k ++ umlal \a2\().4s, \s1\().4h, \k ++ umlal2 \a3\().4s, \s1\().8h, \k ++.endm ++ ++.macro UMLSL4K a0, a1, a2, a3, s0, s1, k ++ umlsl \a0\().4s, \s0\().4h, \k ++ umlsl2 \a1\().4s, \s0\().8h, \k ++ umlsl \a2\().4s, \s1\().4h, \k ++ umlsl2 \a3\().4s, \s1\().8h, \k ++.endm ++ ++// int b = m2s1 - m1; ++// int f = p2s1 - p1; ++// int dc = c0s1 - m1; ++// int de = c0s1 - p1; ++// int sp_max = FFMIN(p1 - c0s1, m1 - c0s1); ++// sp_max = FFMIN(sp_max, FFMAX(-b,-f)); ++// int sp_min = FFMIN(c0s1 - p1, c0s1 - m1); ++// sp_min = FFMIN(sp_min, FFMAX(b,f)); ++// diff = diff == 0 ? 0 : FFMAX3(diff, sp_min, sp_max); ++.macro SPAT_CHECK diff, m2s1, m1, c0s1, p1, p2s1, t0, t1, t2, t3 ++ uqsub \t0\().16b, \p1\().16b, \c0s1\().16b ++ uqsub \t2\().16b, \m1\().16b, \c0s1\().16b ++ umin \t2\().16b, \t0\().16b, \t2\().16b ++ ++ uqsub \t1\().16b, \m1\().16b, \m2s1\().16b ++ uqsub \t3\().16b, \p1\().16b, \p2s1\().16b ++ umax \t3\().16b, \t3\().16b, \t1\().16b ++ umin \t3\().16b, \t3\().16b, \t2\().16b ++ ++ uqsub \t0\().16b, \c0s1\().16b, \p1\().16b ++ uqsub \t2\().16b, \c0s1\().16b, \m1\().16b ++ umin \t2\().16b, \t0\().16b, \t2\().16b ++ ++ uqsub \t1\().16b, \m2s1\().16b, \m1\().16b ++ uqsub \t0\().16b, \p2s1\().16b, \p1\().16b ++ umax \t0\().16b, \t0\().16b, \t1\().16b ++ umin \t2\().16b, \t2\().16b, \t0\().16b ++ ++ cmeq \t1\().16b, \diff\().16b, #0 ++ umax \diff\().16b, \diff\().16b, \t3\().16b ++ umax \diff\().16b, \diff\().16b, \t2\().16b ++ bic \diff\().16b, \diff\().16b, \t1\().16b ++.endm ++ ++// i0 = s0; ++// if (i0 > d0 + diff0) ++// i0 = d0 + diff0; ++// else if (i0 < d0 - diff0) ++// i0 = d0 - diff0; ++// ++// i0 = s0 is safe ++.macro DIFF_CLIP i0, s0, d0, diff, t0, t1 ++ uqadd \t0\().16b, \d0\().16b, \diff\().16b ++ uqsub \t1\().16b, \d0\().16b, \diff\().16b ++ umin \i0\().16b, \s0\().16b, \t0\().16b ++ umax \i0\().16b, \i0\().16b, \t1\().16b ++.endm ++ ++// i0 = FFABS(m1 - p1) > td0 ? i1 : i2; ++// DIFF_CLIP ++// ++// i0 = i1 is safe ++.macro INTERPOL i0, i1, i2, m1, d0, p1, td0, diff, t0, t1, t2 ++ uabd \t0\().16b, \m1\().16b, \p1\().16b ++ cmhi \t0\().16b, \t0\().16b, \td0\().16b ++ bsl \t0\().16b, \i1\().16b, \i2\().16b ++ DIFF_CLIP \i0, \t0, \d0, \diff, \t1, \t2 ++.endm ++ ++.macro PUSH_VREGS ++ stp d8, d9, [sp, #-64]! ++ stp d10, d11, [sp, #16] ++ stp d12, d13, [sp, #32] ++ stp d14, d15, [sp, #48] ++.endm ++ ++.macro POP_VREGS ++ ldp d14, d15, [sp, #48] ++ ldp d12, d13, [sp, #32] ++ ldp d10, d11, [sp, #16] ++ ldp d8, d9, [sp], #64 ++.endm ++ ++.macro LDR_COEFFS d, t0 ++ movrel \t0, coeffs, 0 ++ ld1 {\d\().8h}, [\t0] ++.endm ++ ++// static const uint16_t coef_lf[2] = { 4309, 213 }; ++// static const uint16_t coef_hf[3] = { 5570, 3801, 1016 }; ++// static const uint16_t coef_sp[2] = { 5077, 981 }; ++ ++const coeffs, align=4 // align 4 means align on 2^4 boundry ++ .hword 4309 * 4, 213 * 4 // lf[0]*4 = v0.h[0] ++ .hword 5570, 3801, 1016, -3801 // hf[0] = v0.h[2], -hf[1] = v0.h[5] ++ .hword 5077, 981 // sp[0] = v0.h[6] ++endconst ++ ++// =========================================================================== ++// ++// void ff_bwdif_filter_line3_neon( ++// void * dst1, // x0 ++// int d_stride, // w1 ++// const void * prev1, // x2 ++// const void * cur1, // x3 ++// const void * next1, // x4 ++// int s_stride, // w5 ++// int w, // w6 ++// int parity, // w7 ++// int clip_max); // [sp, #0] (Ignored) ++ ++function ff_bwdif_filter_line3_neon, export=1 ++ // Sanity check w ++ cmp w6, #0 ++ ble 99f ++ ++ LDR_COEFFS v0, x17 ++ ++// #define prev2 cur ++// const uint8_t * restrict next2 = parity ? prev : next; ++ cmp w7, #0 ++ csel x17, x2, x4, ne ++ ++ // We want all the V registers - save all the ones we must ++ PUSH_VREGS ++ ++ // Some rearrangement of initial values for nice layout of refs in regs ++ mov w10, w6 // w10 = loop count ++ neg w9, w5 // w9 = mref ++ lsl w8, w9, #1 // w8 = mref2 ++ add w7, w9, w9, LSL #1 // w7 = mref3 ++ lsl w6, w9, #2 // w6 = mref4 ++ mov w11, w5 // w11 = pref ++ lsl w12, w5, #1 // w12 = pref2 ++ add w13, w5, w5, LSL #1 // w13 = pref3 ++ lsl w14, w5, #2 // w14 = pref4 ++ add w15, w5, w5, LSL #2 // w15 = pref5 ++ add w16, w14, w12 // w16 = pref6 ++ ++ lsl w5, w1, #1 // w5 = d_stride * 2 ++ ++// for (x = 0; x < w; x++) { ++// int diff0, diff2; ++// int d0, d2; ++// int temporal_diff0, temporal_diff2; ++// ++// int i1, i2; ++// int j1, j2; ++// int p6, p5, p4, p3, p2, p1, c0, m1, m2, m3, m4; ++ ++10: ++// c0 = prev2[0] + next2[0]; // c0 = v20, v21 ++// d0 = c0 >> 1; // d0 = v10 ++// temporal_diff0 = FFABS(prev2[0] - next2[0]); // td0 = v11 ++ ldr q31, [x3] ++ ldr q21, [x17] ++ uhadd v10.16b, v31.16b, v21.16b ++ uabd v11.16b, v31.16b, v21.16b ++ uaddl v20.8h, v21.8b, v31.8b ++ uaddl2 v21.8h, v21.16b, v31.16b ++ ++ ldr q31, [x3, w6, sxtw] ++ ldr q23, [x17, w6, sxtw] ++ ++// i1 = coef_hf[0] * c0; // i1 = v2-v5 ++ UMULL4K v2, v3, v4, v5, v20, v21, v0.h[2] ++ ++ ldr q30, [x3, w14, sxtw] ++ ldr q25, [x17, w14, sxtw] ++ ++// m4 = prev2[mrefs4] + next2[mrefs4]; // m4 = v22,v23 ++ uaddl v22.8h, v23.8b, v31.8b ++ uaddl2 v23.8h, v23.16b, v31.16b ++ ++// p4 = prev2[prefs4] + next2[prefs4]; // p4 = v24,v25, (p4 >> 1) = v12 ++ uhadd v12.16b, v25.16b, v30.16b ++ uaddl v24.8h, v25.8b, v30.8b ++ uaddl2 v25.8h, v25.16b, v30.16b ++ ++// j1 = -coef_hf[1] * (c0 + p4); // j1 = v6-v9 (-c0:v20,v21) ++ add v20.8h, v20.8h, v24.8h ++ add v21.8h, v21.8h, v25.8h ++ SMULL4K v6, v7, v8, v9, v20, v21, v0.h[5] ++ ++// m3 = cur[mrefs3]; // m3 = v20 ++ ldr q20, [x3, w7, sxtw] ++ ++// p3 = cur[prefs3]; // p3 = v21 ++ ldr q21, [x3, w13, sxtw] ++ ++// i1 += coef_hf[2] * (m4 + p4); // (-m4:v22,v23) (-p4:v24,v25) ++ add v22.8h, v22.8h, v24.8h ++ add v23.8h, v23.8h, v25.8h ++ UMLAL4K v2, v3, v4, v5, v22, v23, v0.h[4] ++ ++ ldr q29, [x3, w8, sxtw] ++ ldr q23, [x17, w8, sxtw] ++ ++// i1 -= coef_lf[1] * 4 * (m3 + p3); // - ++ uaddl v30.8h, v20.8b, v21.8b ++ uaddl2 v31.8h, v20.16b, v21.16b ++ ++ ldr q28, [x3, w16, sxtw] ++ ldr q25, [x17, w16, sxtw] ++ ++ UMLSL4K v2, v3, v4, v5, v30, v31, v0.h[1] ++ ++// m2 = prev2[mrefs2] + next2[mrefs2]; // m2 = v22,v23, (m2 >> 1) = v13 ++ uhadd v13.16b, v23.16b, v29.16b ++ uaddl v22.8h, v23.8b, v29.8b ++ uaddl2 v23.8h, v23.16b, v29.16b ++ ++ ldr q31, [x3, w12, sxtw] ++ ldr q27, [x17, w12, sxtw] ++ ++// p6 = prev2[prefs6] + next2[prefs6]; // p6 = v24,v25 ++ uaddl v24.8h, v25.8b, v28.8b ++ uaddl2 v25.8h, v25.16b, v28.16b ++ ++// j1 += coef_hf[2] * (m2 + p6); // (-p6:v24,v25) ++ add v24.8h, v24.8h, v22.8h ++ add v25.8h, v25.8h, v23.8h ++ UMLAL4K v6, v7, v8, v9, v24, v25, v0.h[4] ++ ++// m1 = cur[mrefs]; // m1 = v24 ++ ldr q24, [x3, w9, sxtw] ++ ++// p5 = cur[prefs5]; // p5 = v25 ++ ldr q25, [x3, w15, sxtw] ++ ++// p2 = prev2[prefs2] + next2[prefs2]; // p2 = v26, v27 ++// temporal_diff2 = FFABS(prev2[prefs2] - next2[prefs2]); // td2 = v14 ++// d2 = p2 >> 1; // d2 = v15 ++ uabd v14.16b, v31.16b, v27.16b ++ uhadd v15.16b, v31.16b, v27.16b ++ uaddl v26.8h, v27.8b, v31.8b ++ uaddl2 v27.8h, v27.16b, v31.16b ++ ++// j1 += coef_hf[0] * p2; // - ++ UMLAL4K v6, v7, v8, v9, v26, v27, v0.h[2] ++ ++// i1 -= coef_hf[1] * (m2 + p2); // (-m2:v22,v23*) (-p2:v26*,v27*) ++ add v22.8h, v22.8h, v26.8h ++ add v23.8h, v23.8h, v27.8h ++ UMLSL4K v2, v3, v4, v5, v22, v23, v0.h[3] ++ ++// p1 = cur[prefs]; // p1 = v22 ++ ldr q22, [x3, w11, sxtw] ++ ++// j1 -= coef_lf[1] * 4 * (m1 + p5); // - ++ uaddl v26.8h, v24.8b, v25.8b ++ uaddl2 v27.8h, v24.16b, v25.16b ++ UMLSL4K v6, v7, v8, v9, v26, v27, v0.h[1] ++ ++// j2 = (coef_sp[0] * (p1 + p3) - coef_sp[1] * (m1 + p5)) >> 13; // (-p5:v25*) j2=v16 ++ uaddl v18.8h, v22.8b, v21.8b ++ uaddl2 v19.8h, v22.16b, v21.16b ++ UMULL4K v28, v29, v30, v31, v18, v19, v0.h[6] ++ ++ uaddl v18.8h, v24.8b, v25.8b ++ uaddl2 v19.8h, v24.16b, v25.16b ++ UMLSL4K v28, v29, v30, v31, v18, v19, v0.h[7] ++ ++ SQSHRUNN v16, v28, v29, v30, v31, 13 ++ ++// i2 = (coef_sp[0] * (m1 + p1) - coef_sp[1] * (m3 + p3)) >> 13; // (-m3:v20*) i2=v17 ++ uaddl v18.8h, v22.8b, v24.8b ++ uaddl2 v19.8h, v22.16b, v24.16b ++ UMULL4K v28, v29, v30, v31, v18, v19, v0.h[6] ++ ++ uaddl v18.8h, v20.8b, v21.8b ++ uaddl2 v19.8h, v20.16b, v21.16b ++ UMLSL4K v28, v29, v30, v31, v18, v19, v0.h[7] ++ ++ SQSHRUNN v17, v28, v29, v30, v31, 13 ++ ++// i1 += coef_lf[0] * 4 * (m1 + p1); // p1 = v22, m1 = v24 ++ uaddl v26.8h, v24.8b, v22.8b ++ uaddl2 v27.8h, v24.16b, v22.16b ++ UMLAL4K v2, v3, v4, v5, v26, v27, v0.h[0] ++ ++ ldr q31, [x2, w9, sxtw] ++ ldr q29, [x4, w9, sxtw] ++ ++// j1 += coef_lf[0] * 4 * (p1 + p3); // p1 = v22, p3 = v21 ++ uaddl v26.8h, v21.8b, v22.8b ++ uaddl2 v27.8h, v21.16b, v22.16b ++ UMLAL4K v6, v7, v8, v9, v26, v27, v0.h[0] ++ ++ ldr q30, [x2, w11, sxtw] ++ ldr q28, [x4, w11, sxtw] ++ ++// i1 >>= 15; // i1 = v2, -v3, -v4*, -v5* ++ SQSHRUNN v2, v2, v3, v4, v5, 15 ++ ++// j1 >>= 15; // j1 = v3, -v6*, -v7*, -v8*, -v9* ++ SQSHRUNN v3, v6, v7, v8, v9, 15 ++ ++// { ++// int t1 =(FFABS(prev[mrefs] - m1) + FFABS(prev[prefs] - p1)) >> 1; ++// int t2 =(FFABS(next[mrefs] - m1) + FFABS(next[prefs] - p1)) >> 1; ++ uabd v30.16b, v22.16b, v30.16b ++ uabd v31.16b, v24.16b, v31.16b ++ uabd v28.16b, v22.16b, v28.16b ++ uabd v29.16b, v24.16b, v29.16b ++ uhadd v31.16b, v31.16b, v30.16b ++ uhadd v29.16b, v29.16b, v28.16b ++ ++ ldr q27, [x2, w13, sxtw] ++ ldr q26, [x4, w13, sxtw] ++ ++// diff0 = FFMAX3(temporal_diff0 >> 1, t1, t2); // diff0=v18 ++ ushr v18.16b, v11.16b, #1 ++ umax v18.16b, v18.16b, v31.16b ++ umax v18.16b, v18.16b, v29.16b ++// } // v28, v30 preserved for next block ++// { // tdiff2 = v14 ++// int t1 =(FFABS(prev[prefs] - p1) + FFABS(prev[prefs3] - p3)) >> 1; ++// int t2 =(FFABS(next[prefs] - p1) + FFABS(next[prefs3] - p3)) >> 1; ++ uabd v31.16b, v21.16b, v27.16b ++ uabd v29.16b, v21.16b, v26.16b ++ uhadd v31.16b, v31.16b, v30.16b ++ uhadd v29.16b, v29.16b, v28.16b ++ ++// diff2 = FFMAX3(temporal_diff2 >> 1, t1, t2); // diff2=v19 ++ ushr v19.16b, v14.16b, #1 ++ umax v19.16b, v19.16b, v31.16b ++ umax v19.16b, v19.16b, v29.16b ++// } ++ ++ // diff0 = v18, (m2 >> 1) = v13, m1 = v24, d0 = v10, p1 = v22, d2 = v15 ++ SPAT_CHECK v18, v13, v24, v10, v22, v15, v31, v30, v29, v28 ++ ++ // diff2 = v19, d0 = v10, p1 = v22, d2 = v15, p3 = v21, (p4 >> 1) = v12 ++ SPAT_CHECK v19, v10, v22, v15, v21, v12, v31, v30, v29, v28 ++ ++ // j1 = v3, j2 = v16, p1 = v22, d2 = v15, p3 = v21, td2 = v14, diff2 = v19 ++ INTERPOL v3, v3, v16, v22, v15, v21, v14, v19, v31, v30, v29 ++ ++// dst[d_stride * 2] = av_clip_uint8(interpol); ++ str q3, [x0, w5, sxtw] ++ ++// dst[d_stride] = p1; ++ str q22, [x0, w1, sxtw] ++ ++ // i1 = v2, i2 = v17, m1 = v24, d0 = v10, p1 = v22, td2 = v11, diff2 = v18 ++ INTERPOL v2, v2, v17, v24, v10, v22, v11, v18, v31, v30, v29 ++ ++// dst[0] = av_clip_uint8(interpol); ++ str q2, [x0], #16 ++// } ++// ++// dst++; ++// cur++; ++// prev++; ++// prev2++; ++// next++; ++// } ++ subs w10, w10, #16 ++ add x2, x2, #16 ++ add x3, x3, #16 ++ add x4, x4, #16 ++ add x17, x17, #16 ++ bgt 10b ++ ++ POP_VREGS ++99: ++ ret ++endfunc ++ ++// =========================================================================== ++// ++// void filter_line( ++// void *dst1, // x0 ++// void *prev1, // x1 ++// void *cur1, // x2 ++// void *next1, // x3 ++// int w, // w4 ++// int prefs, // w5 ++// int mrefs, // w6 ++// int prefs2, // w7 ++// int mrefs2, // [sp, #0] ++// int prefs3, // [sp, #SP_INT] ++// int mrefs3, // [sp, #SP_INT*2] ++// int prefs4, // [sp, #SP_INT*3] ++// int mrefs4, // [sp, #SP_INT*4] ++// int parity, // [sp, #SP_INT*5] ++// int clip_max) // [sp, #SP_INT*6] ++ ++function ff_bwdif_filter_line_neon, export=1 ++ // Sanity check w ++ cmp w4, #0 ++ ble 99f ++ ++ // Rearrange regs to be the same as line3 for ease of debug! ++ mov w10, w4 // w10 = loop count ++ mov w9, w6 // w9 = mref ++ mov w12, w7 // w12 = pref2 ++ mov w11, w5 // w11 = pref ++ ldr w8, [sp, #0] // w8 = mref2 ++ ldr w7, [sp, #SP_INT*2] // w7 = mref3 ++ ldr w6, [sp, #SP_INT*4] // w6 = mref4 ++ ldr w13, [sp, #SP_INT] // w13 = pref3 ++ ldr w14, [sp, #SP_INT*3] // w14 = pref4 ++ ++ mov x4, x3 ++ mov x3, x2 ++ mov x2, x1 ++ ++ LDR_COEFFS v0, x17 ++ ++// #define prev2 cur ++// const uint8_t * restrict next2 = parity ? prev : next; ++ ldr w17, [sp, #SP_INT*5] // parity ++ cmp w17, #0 ++ csel x17, x2, x4, ne ++ ++ PUSH_VREGS ++ ++// for (x = 0; x < w; x++) { ++// int diff0, diff2; ++// int d0, d2; ++// int temporal_diff0, temporal_diff2; ++// ++// int i1, i2; ++// int j1, j2; ++// int p6, p5, p4, p3, p2, p1, c0, m1, m2, m3, m4; ++ ++10: ++// c0 = prev2[0] + next2[0]; // c0 = v20, v21 ++// d0 = c0 >> 1; // d0 = v10 ++// temporal_diff0 = FFABS(prev2[0] - next2[0]); // td0 = v11 ++ ldr q31, [x3] ++ ldr q21, [x17] ++ uhadd v10.16b, v31.16b, v21.16b ++ uabd v11.16b, v31.16b, v21.16b ++ uaddl v20.8h, v21.8b, v31.8b ++ uaddl2 v21.8h, v21.16b, v31.16b ++ ++ ldr q31, [x3, w6, sxtw] ++ ldr q23, [x17, w6, sxtw] ++ ++// i1 = coef_hf[0] * c0; // i1 = v2-v5 ++ UMULL4K v2, v3, v4, v5, v20, v21, v0.h[2] ++ ++ ldr q30, [x3, w14, sxtw] ++ ldr q25, [x17, w14, sxtw] ++ ++// m4 = prev2[mrefs4] + next2[mrefs4]; // m4 = v22,v23 ++ uaddl v22.8h, v23.8b, v31.8b ++ uaddl2 v23.8h, v23.16b, v31.16b ++ ++// p4 = prev2[prefs4] + next2[prefs4]; // p4 = v24,v25, (p4 >> 1) = v12 ++ uhadd v12.16b, v25.16b, v30.16b ++ uaddl v24.8h, v25.8b, v30.8b ++ uaddl2 v25.8h, v25.16b, v30.16b ++ ++// m3 = cur[mrefs3]; // m3 = v20 ++ ldr q20, [x3, w7, sxtw] ++ ++// p3 = cur[prefs3]; // p3 = v21 ++ ldr q21, [x3, w13, sxtw] ++ ++// i1 += coef_hf[2] * (m4 + p4); // (-m4:v22,v23) (-p4:v24,v25) ++ add v22.8h, v22.8h, v24.8h ++ add v23.8h, v23.8h, v25.8h ++ UMLAL4K v2, v3, v4, v5, v22, v23, v0.h[4] ++ ++ ldr q29, [x3, w8, sxtw] ++ ldr q23, [x17, w8, sxtw] ++ ++// i1 -= coef_lf[1] * 4 * (m3 + p3); // - ++ uaddl v30.8h, v20.8b, v21.8b ++ uaddl2 v31.8h, v20.16b, v21.16b ++ ++ UMLSL4K v2, v3, v4, v5, v30, v31, v0.h[1] ++ ++ ldr q31, [x3, w12, sxtw] ++ ldr q27, [x17, w12, sxtw] ++ ++// m2 = prev2[mrefs2] + next2[mrefs2]; // m2 = v22,v23, (m2 >> 1) = v13 ++ uhadd v13.16b, v23.16b, v29.16b ++ uaddl v22.8h, v23.8b, v29.8b ++ uaddl2 v23.8h, v23.16b, v29.16b ++ ++// m1 = cur[mrefs]; // m1 = v24 ++ ldr q24, [x3, w9, sxtw] ++ ++// p2 = prev2[prefs2] + next2[prefs2]; // p2 = v26, v27 ++// temporal_diff2 = FFABS(prev2[prefs2] - next2[prefs2]); // td2 = v14 ++// d2 = p2 >> 1; // d2 = v15 ++ uabd v14.16b, v31.16b, v27.16b ++ uhadd v15.16b, v31.16b, v27.16b ++ uaddl v26.8h, v27.8b, v31.8b ++ uaddl2 v27.8h, v27.16b, v31.16b ++ ++// i1 -= coef_hf[1] * (m2 + p2); // (-m2:v22,v23*) (-p2:v26*,v27*) ++ add v22.8h, v22.8h, v26.8h ++ add v23.8h, v23.8h, v27.8h ++ UMLSL4K v2, v3, v4, v5, v22, v23, v0.h[3] ++ ++// p1 = cur[prefs]; // p1 = v22 ++ ldr q22, [x3, w11, sxtw] ++ ++// i2 = (coef_sp[0] * (m1 + p1) - coef_sp[1] * (m3 + p3)) >> 13; // (-m3:v20*) i2=v17 ++ uaddl v18.8h, v22.8b, v24.8b ++ uaddl2 v19.8h, v22.16b, v24.16b ++ UMULL4K v28, v29, v30, v31, v18, v19, v0.h[6] ++ ++ uaddl v18.8h, v20.8b, v21.8b ++ uaddl2 v19.8h, v20.16b, v21.16b ++ UMLSL4K v28, v29, v30, v31, v18, v19, v0.h[7] ++ ++ SQSHRUNN v17, v28, v29, v30, v31, 13 ++ ++// i1 += coef_lf[0] * 4 * (m1 + p1); // p1 = v22, m1 = v24 ++ uaddl v26.8h, v24.8b, v22.8b ++ uaddl2 v27.8h, v24.16b, v22.16b ++ UMLAL4K v2, v3, v4, v5, v26, v27, v0.h[0] ++ ++ ldr q31, [x2, w9, sxtw] ++ ldr q29, [x4, w9, sxtw] ++ ++ ldr q30, [x2, w11, sxtw] ++ ldr q28, [x4, w11, sxtw] ++ ++// i1 >>= 15; // i1 = v2, -v3, -v4*, -v5* ++ SQSHRUNN v2, v2, v3, v4, v5, 15 ++ ++// { ++// int t1 =(FFABS(prev[mrefs] - m1) + FFABS(prev[prefs] - p1)) >> 1; ++// int t2 =(FFABS(next[mrefs] - m1) + FFABS(next[prefs] - p1)) >> 1; ++ uabd v30.16b, v22.16b, v30.16b ++ uabd v31.16b, v24.16b, v31.16b ++ uabd v28.16b, v22.16b, v28.16b ++ uabd v29.16b, v24.16b, v29.16b ++ uhadd v31.16b, v31.16b, v30.16b ++ uhadd v29.16b, v29.16b, v28.16b ++ ++// diff0 = FFMAX3(temporal_diff0 >> 1, t1, t2); // diff0=v18 ++ ushr v18.16b, v11.16b, #1 ++ umax v18.16b, v18.16b, v31.16b ++ umax v18.16b, v18.16b, v29.16b ++ ++ // diff0 = v18, (m2 >> 1) = v13, m1 = v24, d0 = v10, p1 = v22, d2 = v15 ++ SPAT_CHECK v18, v13, v24, v10, v22, v15, v31, v30, v29, v28 ++ ++ // i1 = v2, i2 = v17, m1 = v24, d0 = v10, p1 = v22, td2 = v11, diff2 = v18 ++ INTERPOL v2, v2, v17, v24, v10, v22, v11, v18, v31, v30, v29 ++ ++// dst[0] = av_clip_uint8(interpol); ++ str q2, [x0], #16 ++// } ++// ++// dst++; ++// cur++; ++// prev++; ++// prev2++; ++// next++; ++// } ++ ++ subs w10, w10, #16 ++ add x2, x2, #16 ++ add x3, x3, #16 ++ add x4, x4, #16 ++ add x17, x17, #16 ++ bgt 10b ++ ++ POP_VREGS ++99: ++ ret ++endfunc ++ ++// ============================================================================ ++// ++// void ff_bwdif_filter_edge_neon( ++// void *dst1, // x0 ++// void *prev1, // x1 ++// void *cur1, // x2 ++// void *next1, // x3 ++// int w, // w4 ++// int prefs, // w5 ++// int mrefs, // w6 ++// int prefs2, // w7 ++// int mrefs2, // [sp, #0] ++// int parity, // [sp, #SP_INT] ++// int clip_max, // [sp, #SP_INT*2] unused ++// int spat); // [sp, #SP_INT*3] ++ ++function ff_bwdif_filter_edge_neon, export=1 ++ // Sanity check w ++ cmp w4, #0 ++ ble 99f ++ ++// #define prev2 cur ++// const uint8_t * restrict next2 = parity ? prev : next; ++ ++ ldr w8, [sp, #0] // mrefs2 ++ ++ ldr w17, [sp, #SP_INT] // parity ++ ldr w16, [sp, #SP_INT*3] // spat ++ cmp w17, #0 ++ csel x17, x1, x3, ne ++ ++// for (x = 0; x < w; x++) { ++ ++10: ++// int m1 = cur[mrefs]; ++// int d = (prev2[0] + next2[0]) >> 1; ++// int p1 = cur[prefs]; ++// int temporal_diff0 = FFABS(prev2[0] - next2[0]); ++// int temporal_diff1 =(FFABS(prev[mrefs] - m1) + FFABS(prev[prefs] - p1)) >> 1; ++// int temporal_diff2 =(FFABS(next[mrefs] - m1) + FFABS(next[prefs] - p1)) >> 1; ++// int diff = FFMAX3(temporal_diff0 >> 1, temporal_diff1, temporal_diff2); ++ ldr q31, [x2] ++ ldr q21, [x17] ++ uhadd v16.16b, v31.16b, v21.16b // d0 = v16 ++ uabd v17.16b, v31.16b, v21.16b // td0 = v17 ++ ldr q24, [x2, w6, sxtw] // m1 = v24 ++ ldr q22, [x2, w5, sxtw] // p1 = v22 ++ ++ ldr q0, [x1, w6, sxtw] // prev[mrefs] ++ ldr q2, [x1, w5, sxtw] // prev[prefs] ++ ldr q1, [x3, w6, sxtw] // next[mrefs] ++ ldr q3, [x3, w5, sxtw] // next[prefs] ++ ++ ushr v29.16b, v17.16b, #1 ++ ++ uabd v31.16b, v0.16b, v24.16b ++ uabd v30.16b, v2.16b, v22.16b ++ uhadd v0.16b, v31.16b, v30.16b // td1 = q0 ++ ++ uabd v31.16b, v1.16b, v24.16b ++ uabd v30.16b, v3.16b, v22.16b ++ uhadd v1.16b, v31.16b, v30.16b // td2 = q1 ++ ++ umax v0.16b, v0.16b, v29.16b ++ umax v0.16b, v0.16b, v1.16b // diff = v0 ++ ++// if (spat) { ++// SPAT_CHECK() ++// } ++// i0 = (m1 + p1) >> 1; ++ cbz w16, 1f ++ ++ ldr q31, [x2, w8, sxtw] ++ ldr q18, [x17, w8, sxtw] ++ ldr q30, [x2, w7, sxtw] ++ ldr q19, [x17, w7, sxtw] ++ uhadd v18.16b, v18.16b, v31.16b ++ uhadd v19.16b, v19.16b, v30.16b ++ ++ SPAT_CHECK v0, v18, v24, v16, v22, v19, v31, v30, v29, v28 ++ ++1: ++ uhadd v2.16b, v22.16b, v24.16b ++ ++ // i0 = v2, s0 = v2, d0 = v16, diff = v0, t0 = v31, t1 = v30 ++ DIFF_CLIP v2, v2, v16, v0, v31, v30 ++ ++// dst[0] = av_clip(interpol, 0, clip_max); ++ str q2, [x0], #16 ++ ++// dst++; ++// cur++; ++// } ++ subs w4, w4, #16 ++ add x1, x1, #16 ++ add x2, x2, #16 ++ add x3, x3, #16 ++ add x17, x17, #16 ++ bgt 10b ++ ++99: ++ ret ++endfunc ++ ++// ============================================================================ ++// ++// void ff_bwdif_filter_intra_neon( ++// void *dst1, // x0 ++// void *cur1, // x1 ++// int w, // w2 ++// int prefs, // w3 ++// int mrefs, // w4 ++// int prefs3, // w5 ++// int mrefs3, // w6 ++// int parity, // w7 unused ++// int clip_max) // [sp, #0] unused ++ ++function ff_bwdif_filter_intra_neon, export=1 ++ cmp w2, #0 ++ ble 99f ++ ++ LDR_COEFFS v0, x17 ++ ++// for (x = 0; x < w; x++) { ++10: ++ ++// interpol = (coef_sp[0] * (cur[mrefs] + cur[prefs]) - coef_sp[1] * (cur[mrefs3] + cur[prefs3])) >> 13; ++ ldr q31, [x1, w4, sxtw] ++ ldr q30, [x1, w3, sxtw] ++ ldr q29, [x1, w6, sxtw] ++ ldr q28, [x1, w5, sxtw] ++ ++ uaddl v20.8h, v31.8b, v30.8b ++ uaddl2 v21.8h, v31.16b, v30.16b ++ ++ UMULL4K v2, v3, v4, v5, v20, v21, v0.h[6] ++ ++ uaddl v20.8h, v29.8b, v28.8b ++ uaddl2 v21.8h, v29.16b, v28.16b ++ ++ UMLSL4K v2, v3, v4, v5, v20, v21, v0.h[7] ++ ++// dst[0] = av_clip(interpol, 0, clip_max); ++ SQSHRUNN v2, v2, v3, v4, v5, 13 ++ str q2, [x0], #16 ++ ++// dst++; ++// cur++; ++// } ++ ++ subs w2, w2, #16 ++ add x1, x1, #16 ++ bgt 10b ++ ++99: ++ ret ++endfunc +--- a/libavfilter/allfilters.c ++++ b/libavfilter/allfilters.c +@@ -242,6 +242,7 @@ extern const AVFilter ff_vf_derain; + extern const AVFilter ff_vf_deshake; + extern const AVFilter ff_vf_deshake_opencl; + extern const AVFilter ff_vf_despill; ++extern const AVFilter ff_vf_deinterlace_v4l2m2m; + extern const AVFilter ff_vf_detelecine; + extern const AVFilter ff_vf_dilation; + extern const AVFilter ff_vf_dilation_opencl; +@@ -414,6 +415,7 @@ extern const AVFilter ff_vf_scale; + extern const AVFilter ff_vf_scale_cuda; + extern const AVFilter ff_vf_scale_npp; + extern const AVFilter ff_vf_scale_qsv; ++extern const AVFilter ff_vf_scale_v4l2m2m; + extern const AVFilter ff_vf_scale_vaapi; + extern const AVFilter ff_vf_scale_vulkan; + extern const AVFilter ff_vf_scale2ref; +@@ -483,6 +485,7 @@ extern const AVFilter ff_vf_trim; + extern const AVFilter ff_vf_unpremultiply; + extern const AVFilter ff_vf_unsharp; + extern const AVFilter ff_vf_unsharp_opencl; ++extern const AVFilter ff_vf_unsand; + extern const AVFilter ff_vf_untile; + extern const AVFilter ff_vf_uspp; + extern const AVFilter ff_vf_v360; +--- a/libavfilter/buffersink.c ++++ b/libavfilter/buffersink.c +@@ -62,6 +62,11 @@ typedef struct BufferSinkContext { + int sample_rates_size; + + AVFrame *peeked_frame; ++ ++ union { ++ av_buffersink_alloc_video_frame * video; ++ } alloc_cb; ++ void * alloc_v; + } BufferSinkContext; + + #define NB_ITEMS(list) (list ## _size / sizeof(*list)) +@@ -154,6 +159,22 @@ int attribute_align_arg av_buffersink_ge + return get_frame_internal(ctx, frame, 0, nb_samples); + } + ++static AVFrame * alloc_video_buffer(AVFilterLink *link, int w, int h) ++{ ++ AVFilterContext * const ctx = link->dst; ++ BufferSinkContext * const bs = ctx->priv; ++ return bs->alloc_cb.video ? bs->alloc_cb.video(ctx, bs->alloc_v, w, h) : ++ ff_default_get_video_buffer(link, w, h); ++} ++ ++int av_buffersink_set_alloc_video_frame(AVFilterContext *ctx, av_buffersink_alloc_video_frame * cb, void * v) ++{ ++ BufferSinkContext * const bs = ctx->priv; ++ bs->alloc_cb.video = cb; ++ bs->alloc_v = v; ++ return 0; ++} ++ + #if FF_API_BUFFERSINK_ALLOC + AVBufferSinkParams *av_buffersink_params_alloc(void) + { +@@ -403,6 +424,7 @@ static const AVFilterPad avfilter_vsink_ + { + .name = "default", + .type = AVMEDIA_TYPE_VIDEO, ++ .get_buffer = {.video = alloc_video_buffer}, + }, + }; + +--- a/libavfilter/buffersink.h ++++ b/libavfilter/buffersink.h +@@ -202,6 +202,9 @@ int av_buffersink_get_frame(AVFilterCont + */ + int av_buffersink_get_samples(AVFilterContext *ctx, AVFrame *frame, int nb_samples); + ++typedef AVFrame * av_buffersink_alloc_video_frame(AVFilterContext * ctx, void * v, int w, int h); ++int av_buffersink_set_alloc_video_frame(AVFilterContext *ctx, av_buffersink_alloc_video_frame * cb, void * v); ++ + /** + * @} + */ +--- a/libavfilter/buffersrc.c ++++ b/libavfilter/buffersrc.c +@@ -204,7 +204,7 @@ FF_ENABLE_DEPRECATION_WARNINGS + + switch (ctx->outputs[0]->type) { + case AVMEDIA_TYPE_VIDEO: +- CHECK_VIDEO_PARAM_CHANGE(ctx, s, frame->width, frame->height, ++ CHECK_VIDEO_PARAM_CHANGE(ctx, s, av_frame_cropped_width(frame), av_frame_cropped_height(frame), + frame->format, frame->pts); + break; + case AVMEDIA_TYPE_AUDIO: +--- a/libavfilter/bwdif.h ++++ b/libavfilter/bwdif.h +@@ -35,8 +35,29 @@ typedef struct BWDIFContext { + void (*filter_edge)(void *dst, void *prev, void *cur, void *next, + int w, int prefs, int mrefs, int prefs2, int mrefs2, + int parity, int clip_max, int spat); ++ void (*filter_line3)(void *dst, int dstride, ++ const void *prev, const void *cur, const void *next, int prefs, ++ int w, int parity, int clip_max); + } BWDIFContext; + +-void ff_bwdif_init_x86(BWDIFContext *bwdif); ++void ff_bwdif_init_filter_line(BWDIFContext *bwdif, int bit_depth); ++void ff_bwdif_init_x86(BWDIFContext *bwdif, int bit_depth); ++void ff_bwdif_init_aarch64(BWDIFContext *bwdif, int bit_depth); ++ ++void ff_bwdif_filter_edge_c(void *dst1, void *prev1, void *cur1, void *next1, ++ int w, int prefs, int mrefs, int prefs2, int mrefs2, ++ int parity, int clip_max, int spat); ++ ++void ff_bwdif_filter_intra_c(void *dst1, void *cur1, int w, int prefs, int mrefs, ++ int prefs3, int mrefs3, int parity, int clip_max); ++ ++void ff_bwdif_filter_line_c(void *dst1, void *prev1, void *cur1, void *next1, ++ int w, int prefs, int mrefs, int prefs2, int mrefs2, ++ int prefs3, int mrefs3, int prefs4, int mrefs4, ++ int parity, int clip_max); ++ ++void ff_bwdif_filter_line3_c(void * dst1, int d_stride, ++ const void * prev1, const void * cur1, const void * next1, int s_stride, ++ int w, int parity, int clip_max); + + #endif /* AVFILTER_BWDIF_H */ +--- a/libavfilter/vf_bwdif.c ++++ b/libavfilter/vf_bwdif.c +@@ -122,8 +122,8 @@ typedef struct ThreadData { + next2++; \ + } + +-static void filter_intra(void *dst1, void *cur1, int w, int prefs, int mrefs, +- int prefs3, int mrefs3, int parity, int clip_max) ++void ff_bwdif_filter_intra_c(void *dst1, void *cur1, int w, int prefs, int mrefs, ++ int prefs3, int mrefs3, int parity, int clip_max) + { + uint8_t *dst = dst1; + uint8_t *cur = cur1; +@@ -132,10 +132,10 @@ static void filter_intra(void *dst1, voi + FILTER_INTRA() + } + +-static void filter_line_c(void *dst1, void *prev1, void *cur1, void *next1, +- int w, int prefs, int mrefs, int prefs2, int mrefs2, +- int prefs3, int mrefs3, int prefs4, int mrefs4, +- int parity, int clip_max) ++void ff_bwdif_filter_line_c(void *dst1, void *prev1, void *cur1, void *next1, ++ int w, int prefs, int mrefs, int prefs2, int mrefs2, ++ int prefs3, int mrefs3, int prefs4, int mrefs4, ++ int parity, int clip_max) + { + uint8_t *dst = dst1; + uint8_t *prev = prev1; +@@ -150,9 +150,34 @@ static void filter_line_c(void *dst1, vo + FILTER2() + } + +-static void filter_edge(void *dst1, void *prev1, void *cur1, void *next1, +- int w, int prefs, int mrefs, int prefs2, int mrefs2, +- int parity, int clip_max, int spat) ++#define NEXT_LINE()\ ++ dst += d_stride; \ ++ prev += prefs; \ ++ cur += prefs; \ ++ next += prefs; ++ ++void ff_bwdif_filter_line3_c(void * dst1, int d_stride, ++ const void * prev1, const void * cur1, const void * next1, int s_stride, ++ int w, int parity, int clip_max) ++{ ++ const int prefs = s_stride; ++ uint8_t * dst = dst1; ++ const uint8_t * prev = prev1; ++ const uint8_t * cur = cur1; ++ const uint8_t * next = next1; ++ ++ ff_bwdif_filter_line_c(dst, (void*)prev, (void*)cur, (void*)next, w, ++ prefs, -prefs, prefs * 2, - prefs * 2, prefs * 3, -prefs * 3, prefs * 4, -prefs * 4, parity, clip_max); ++ NEXT_LINE(); ++ memcpy(dst, cur, w); ++ NEXT_LINE(); ++ ff_bwdif_filter_line_c(dst, (void*)prev, (void*)cur, (void*)next, w, ++ prefs, -prefs, prefs * 2, - prefs * 2, prefs * 3, -prefs * 3, prefs * 4, -prefs * 4, parity, clip_max); ++} ++ ++void ff_bwdif_filter_edge_c(void *dst1, void *prev1, void *cur1, void *next1, ++ int w, int prefs, int mrefs, int prefs2, int mrefs2, ++ int parity, int clip_max, int spat) + { + uint8_t *dst = dst1; + uint8_t *prev = prev1; +@@ -212,6 +237,13 @@ static void filter_edge_16bit(void *dst1 + FILTER2() + } + ++// Round job start line down to multiple of 4 so that if filter_line3 exists ++// and the frame is a multiple of 4 high then filter_line will never be called ++static inline int job_start(const int jobnr, const int nb_jobs, const int h) ++{ ++ return jobnr >= nb_jobs ? h : ((h * jobnr) / nb_jobs) & ~3; ++} ++ + static int filter_slice(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs) + { + BWDIFContext *s = ctx->priv; +@@ -221,8 +253,8 @@ static int filter_slice(AVFilterContext + int clip_max = (1 << (yadif->csp->comp[td->plane].depth)) - 1; + int df = (yadif->csp->comp[td->plane].depth + 7) / 8; + int refs = linesize / df; +- int slice_start = (td->h * jobnr ) / nb_jobs; +- int slice_end = (td->h * (jobnr+1)) / nb_jobs; ++ int slice_start = job_start(jobnr, nb_jobs, td->h); ++ int slice_end = job_start(jobnr + 1, nb_jobs, td->h); + int y; + + for (y = slice_start; y < slice_end; y++) { +@@ -244,6 +276,11 @@ static int filter_slice(AVFilterContext + refs << 1, -(refs << 1), + td->parity ^ td->tff, clip_max, + (y < 2) || ((y + 3) > td->h) ? 0 : 1); ++ } else if (s->filter_line3 && y + 2 < slice_end && y + 6 < td->h) { ++ s->filter_line3(dst, td->frame->linesize[td->plane], ++ prev, cur, next, linesize, td->w, ++ td->parity ^ td->tff, clip_max); ++ y += 2; + } else { + s->filter_line(dst, prev, cur, next, td->w, + refs, -refs, refs << 1, -(refs << 1), +@@ -265,22 +302,31 @@ static void filter(AVFilterContext *ctx, + YADIFContext *yadif = &bwdif->yadif; + ThreadData td = { .frame = dstpic, .parity = parity, .tff = tff }; + int i; ++ int last_plane = -1; + + for (i = 0; i < yadif->csp->nb_components; i++) { + int w = dstpic->width; + int h = dstpic->height; ++ const AVComponentDescriptor * const comp = yadif->csp->comp + i; ++ ++ // If the last plane was the same as this plane assume we've dealt ++ // with all the pels already ++ if (last_plane == comp->plane) ++ continue; ++ last_plane = comp->plane; + + if (i == 1 || i == 2) { + w = AV_CEIL_RSHIFT(w, yadif->csp->log2_chroma_w); + h = AV_CEIL_RSHIFT(h, yadif->csp->log2_chroma_h); + } + +- td.w = w; +- td.h = h; +- td.plane = i; ++ // comp step is in bytes but td.w is in pels ++ td.w = w * comp->step / ((comp->depth + 7) / 8); ++ td.h = h; ++ td.plane = comp->plane; + + ff_filter_execute(ctx, filter_slice, &td, NULL, +- FFMIN(h, ff_filter_get_nb_threads(ctx))); ++ FFMIN((h+3)/4, ff_filter_get_nb_threads(ctx))); + } + if (yadif->current_field == YADIF_FIELD_END) { + yadif->current_field = YADIF_FIELD_NORMAL; +@@ -313,6 +359,7 @@ static const enum AVPixelFormat pix_fmts + AV_PIX_FMT_YUVA420P9, AV_PIX_FMT_YUVA422P9, AV_PIX_FMT_YUVA444P9, + AV_PIX_FMT_YUVA420P10, AV_PIX_FMT_YUVA422P10, AV_PIX_FMT_YUVA444P10, + AV_PIX_FMT_YUVA420P16, AV_PIX_FMT_YUVA422P16, AV_PIX_FMT_YUVA444P16, ++ AV_PIX_FMT_NV12, + AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRP9, AV_PIX_FMT_GBRP10, + AV_PIX_FMT_GBRP12, AV_PIX_FMT_GBRP14, AV_PIX_FMT_GBRP16, + AV_PIX_FMT_GBRAP, AV_PIX_FMT_GBRAP16, +@@ -340,21 +387,29 @@ static int config_props(AVFilterLink *li + + yadif->csp = av_pix_fmt_desc_get(link->format); + yadif->filter = filter; +- if (yadif->csp->comp[0].depth > 8) { ++ ff_bwdif_init_filter_line(s, yadif->csp->comp[0].depth); ++ ++ return 0; ++} ++ ++av_cold void ff_bwdif_init_filter_line(BWDIFContext *s, int bit_depth) ++{ ++ s->filter_line3 = 0; ++ if (bit_depth > 8) { + s->filter_intra = filter_intra_16bit; + s->filter_line = filter_line_c_16bit; + s->filter_edge = filter_edge_16bit; + } else { +- s->filter_intra = filter_intra; +- s->filter_line = filter_line_c; +- s->filter_edge = filter_edge; ++ s->filter_intra = ff_bwdif_filter_intra_c; ++ s->filter_line = ff_bwdif_filter_line_c; ++ s->filter_edge = ff_bwdif_filter_edge_c; + } + + #if ARCH_X86 +- ff_bwdif_init_x86(s); ++ ff_bwdif_init_x86(s, bit_depth); ++#elif ARCH_AARCH64 ++ ff_bwdif_init_aarch64(s, bit_depth); + #endif +- +- return 0; + } + + +--- /dev/null ++++ b/libavfilter/vf_deinterlace_v4l2m2m.c +@@ -0,0 +1,2102 @@ ++/* ++ * This file is part of FFmpeg. ++ * ++ * FFmpeg is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation; either ++ * version 2.1 of the License, or (at your option) any later version. ++ * ++ * FFmpeg is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with FFmpeg; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ++ */ ++ ++/** ++ * @file ++ * deinterlace video filter - V4L2 M2M ++ */ ++ ++#include ++ ++#include ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "config.h" ++ ++#include "libavutil/avassert.h" ++#include "libavutil/avstring.h" ++#include "libavutil/common.h" ++#include "libavutil/hwcontext.h" ++#include "libavutil/hwcontext_drm.h" ++#include "libavutil/internal.h" ++#include "libavutil/mathematics.h" ++#include "libavutil/opt.h" ++#include "libavutil/pixdesc.h" ++#include "libavutil/time.h" ++ ++#define FF_INTERNAL_FIELDS 1 ++#include "framequeue.h" ++#include "filters.h" ++#include "avfilter.h" ++#include "formats.h" ++#include "internal.h" ++#include "scale_eval.h" ++#include "video.h" ++ ++#ifndef DRM_FORMAT_P030 ++#define DRM_FORMAT_P030 fourcc_code('P', '0', '3', '0') /* 2x2 subsampled Cr:Cb plane 10 bits per channel packed */ ++#endif ++ ++// V4L2_PIX_FMT_NV12_10_COL128 and V4L2_PIX_FMT_NV12_COL128 should be defined ++// in drm_fourcc.h hopefully will be sometime in the future but until then... ++#ifndef V4L2_PIX_FMT_NV12_10_COL128 ++#define V4L2_PIX_FMT_NV12_10_COL128 v4l2_fourcc('N', 'C', '3', '0') ++#endif ++ ++#ifndef V4L2_PIX_FMT_NV12_COL128 ++#define V4L2_PIX_FMT_NV12_COL128 v4l2_fourcc('N', 'C', '1', '2') /* 12 Y/CbCr 4:2:0 128 pixel wide column */ ++#endif ++ ++typedef struct V4L2Queue V4L2Queue; ++typedef struct DeintV4L2M2MContextShared DeintV4L2M2MContextShared; ++ ++typedef enum filter_type_v4l2_e ++{ ++ FILTER_V4L2_DEINTERLACE = 1, ++ FILTER_V4L2_SCALE, ++} filter_type_v4l2_t; ++ ++typedef struct V4L2Buffer { ++ int enqueued; ++ int reenqueue; ++ struct v4l2_buffer buffer; ++ AVFrame frame; ++ struct v4l2_plane planes[VIDEO_MAX_PLANES]; ++ int num_planes; ++ AVDRMFrameDescriptor drm_frame; ++ V4L2Queue *q; ++} V4L2Buffer; ++ ++typedef struct V4L2Queue { ++ struct v4l2_format format; ++ struct v4l2_selection sel; ++ int eos; ++ int num_buffers; ++ V4L2Buffer *buffers; ++ const char * name; ++ DeintV4L2M2MContextShared *ctx; ++} V4L2Queue; ++ ++typedef struct pts_stats_s ++{ ++ void * logctx; ++ const char * name; // For debug ++ unsigned int last_count; ++ unsigned int last_interval; ++ int64_t last_pts; ++} pts_stats_t; ++ ++#define PTS_TRACK_SIZE 32 ++typedef struct pts_track_el_s ++{ ++ uint32_t n; ++ unsigned int interval; ++ AVFrame * props; ++} pts_track_el_t; ++ ++typedef struct pts_track_s ++{ ++ uint32_t n; ++ uint32_t last_n; ++ int got_2; ++ void * logctx; ++ pts_stats_t stats; ++ pts_track_el_t a[PTS_TRACK_SIZE]; ++} pts_track_t; ++ ++typedef enum drain_state_e ++{ ++ DRAIN_NONE = 0, // Not draining ++ DRAIN_TIMEOUT, // Drain until normal timeout setup yields no frame ++ DRAIN_LAST, // Drain with long timeout last_frame in received on output expected ++ DRAIN_EOS, // Drain with long timeout EOS expected ++ DRAIN_DONE // Drained ++} drain_state_t; ++ ++typedef struct DeintV4L2M2MContextShared { ++ void * logctx; // For logging - will be NULL when done ++ filter_type_v4l2_t filter_type; ++ ++ int fd; ++ int done; // fd closed - awating all refs dropped ++ int width; ++ int height; ++ ++ int drain; // EOS received (inlink status) ++ drain_state_t drain_state; ++ int64_t drain_pts; // PTS associated with inline status ++ ++ unsigned int frames_rx; ++ unsigned int frames_tx; ++ ++ // from options ++ int output_width; ++ int output_height; ++ enum AVPixelFormat output_format; ++ ++ int has_enc_stop; ++ // We expect to get exactly the same number of frames out as we put in ++ // We can drain by matching input to output ++ int one_to_one; ++ ++ int orig_width; ++ int orig_height; ++ atomic_uint refcount; ++ ++ AVBufferRef *hw_frames_ctx; ++ ++ unsigned int field_order; ++ ++ pts_track_t track; ++ ++ V4L2Queue output; ++ V4L2Queue capture; ++} DeintV4L2M2MContextShared; ++ ++typedef struct DeintV4L2M2MContext { ++ const AVClass *class; ++ ++ DeintV4L2M2MContextShared *shared; ++ ++ char * w_expr; ++ char * h_expr; ++ char * output_format_string;; ++ ++ int force_original_aspect_ratio; ++ int force_divisible_by; ++ ++ char *colour_primaries_string; ++ char *colour_transfer_string; ++ char *colour_matrix_string; ++ int colour_range; ++ char *chroma_location_string; ++ ++ enum AVColorPrimaries colour_primaries; ++ enum AVColorTransferCharacteristic colour_transfer; ++ enum AVColorSpace colour_matrix; ++ enum AVChromaLocation chroma_location; ++} DeintV4L2M2MContext; ++ ++ ++static inline int drain_frame_expected(const drain_state_t d) ++{ ++ return d == DRAIN_EOS || d == DRAIN_LAST; ++} ++ ++// These just list the ones we know we can cope with ++static uint32_t ++fmt_av_to_v4l2(const enum AVPixelFormat avfmt) ++{ ++ switch (avfmt) { ++ case AV_PIX_FMT_YUV420P: ++ return V4L2_PIX_FMT_YUV420; ++ case AV_PIX_FMT_NV12: ++ return V4L2_PIX_FMT_NV12; ++#if CONFIG_SAND ++ case AV_PIX_FMT_RPI4_8: ++ case AV_PIX_FMT_SAND128: ++ return V4L2_PIX_FMT_NV12_COL128; ++#endif ++ default: ++ break; ++ } ++ return 0; ++} ++ ++static enum AVPixelFormat ++fmt_v4l2_to_av(const uint32_t pixfmt) ++{ ++ switch (pixfmt) { ++ case V4L2_PIX_FMT_YUV420: ++ return AV_PIX_FMT_YUV420P; ++ case V4L2_PIX_FMT_NV12: ++ return AV_PIX_FMT_NV12; ++#if CONFIG_SAND ++ case V4L2_PIX_FMT_NV12_COL128: ++ return AV_PIX_FMT_RPI4_8; ++#endif ++ default: ++ break; ++ } ++ return AV_PIX_FMT_NONE; ++} ++ ++static unsigned int pts_stats_interval(const pts_stats_t * const stats) ++{ ++ return stats->last_interval; ++} ++ ++// Pick 64 for max last count - that is >1sec at 60fps ++#define STATS_LAST_COUNT_MAX 64 ++#define STATS_INTERVAL_MAX (1 << 30) ++static void pts_stats_add(pts_stats_t * const stats, int64_t pts) ++{ ++ if (pts == AV_NOPTS_VALUE || pts == stats->last_pts) { ++ if (stats->last_count < STATS_LAST_COUNT_MAX) ++ ++stats->last_count; ++ return; ++ } ++ ++ if (stats->last_pts != AV_NOPTS_VALUE) { ++ const int64_t interval = pts - stats->last_pts; ++ ++ if (interval < 0 || interval >= STATS_INTERVAL_MAX || ++ stats->last_count >= STATS_LAST_COUNT_MAX) { ++ if (stats->last_interval != 0) ++ av_log(stats->logctx, AV_LOG_DEBUG, "%s: %s: Bad interval: %" PRId64 "/%d\n", ++ __func__, stats->name, interval, stats->last_count); ++ stats->last_interval = 0; ++ } ++ else { ++ const int64_t frame_time = interval / (int64_t)stats->last_count; ++ ++ if (frame_time != stats->last_interval) ++ av_log(stats->logctx, AV_LOG_DEBUG, "%s: %s: New interval: %u->%" PRId64 "/%d=%" PRId64 "\n", ++ __func__, stats->name, stats->last_interval, interval, stats->last_count, frame_time); ++ stats->last_interval = frame_time; ++ } ++ } ++ ++ stats->last_pts = pts; ++ stats->last_count = 1; ++} ++ ++static void pts_stats_init(pts_stats_t * const stats, void * logctx, const char * name) ++{ ++ *stats = (pts_stats_t){ ++ .logctx = logctx, ++ .name = name, ++ .last_count = 1, ++ .last_interval = 0, ++ .last_pts = AV_NOPTS_VALUE ++ }; ++} ++ ++static inline uint32_t pts_track_next_n(pts_track_t * const trk) ++{ ++ if (++trk->n == 0) ++ trk->n = 1; ++ return trk->n; ++} ++ ++static int pts_track_get_frame(pts_track_t * const trk, const struct timeval tv, AVFrame * const dst) ++{ ++ uint32_t n = (uint32_t)(tv.tv_usec / 2 + tv.tv_sec * 500000); ++ pts_track_el_t * t; ++ ++ // As a first guess assume that n==0 means last frame ++ if (n == 0) { ++ n = trk->last_n; ++ if (n == 0) ++ goto fail; ++ } ++ ++ t = trk->a + (n & (PTS_TRACK_SIZE - 1)); ++ ++ if (t->n != n) { ++ av_log(trk->logctx, AV_LOG_ERROR, "%s: track failure: got %u, expected %u\n", __func__, n, trk->n); ++ goto fail; ++ } ++ ++ // 1st frame is simple - just believe it ++ if (n != trk->last_n) { ++ trk->last_n = n; ++ trk->got_2 = 0; ++ return av_frame_copy_props(dst, t->props); ++ } ++ ++ // Only believe in a single interpolated frame ++ if (trk->got_2) ++ goto fail; ++ trk->got_2 = 1; ++ ++ av_frame_copy_props(dst, t->props); ++ ++ ++ // If we can't guess - don't ++ if (t->interval == 0) { ++ dst->best_effort_timestamp = AV_NOPTS_VALUE; ++ dst->pts = AV_NOPTS_VALUE; ++ dst->pkt_dts = AV_NOPTS_VALUE; ++ } ++ else { ++ if (dst->best_effort_timestamp != AV_NOPTS_VALUE) ++ dst->best_effort_timestamp += t->interval / 2; ++ if (dst->pts != AV_NOPTS_VALUE) ++ dst->pts += t->interval / 2; ++ if (dst->pkt_dts != AV_NOPTS_VALUE) ++ dst->pkt_dts += t->interval / 2; ++ } ++ ++ return 0; ++ ++fail: ++ trk->last_n = 0; ++ trk->got_2 = 0; ++ dst->pts = AV_NOPTS_VALUE; ++ dst->pkt_dts = AV_NOPTS_VALUE; ++ return 0; ++} ++ ++// We are only ever expecting in-order frames so nothing more clever is required ++static unsigned int ++pts_track_count(const pts_track_t * const trk) ++{ ++ return (trk->n - trk->last_n) & (PTS_TRACK_SIZE - 1); ++} ++ ++static struct timeval pts_track_add_frame(pts_track_t * const trk, const AVFrame * const src) ++{ ++ const uint32_t n = pts_track_next_n(trk); ++ pts_track_el_t * const t = trk->a + (n & (PTS_TRACK_SIZE - 1)); ++ ++ pts_stats_add(&trk->stats, src->pts); ++ ++ t->n = n; ++ t->interval = pts_stats_interval(&trk->stats); // guess that next interval is the same as the last ++ av_frame_unref(t->props); ++ av_frame_copy_props(t->props, src); ++ ++ // We now know what the previous interval was, rather than having to guess, ++ // so set it. There is a better than decent chance that this is before ++ // we use it. ++ if (t->interval != 0) { ++ pts_track_el_t * const prev_t = trk->a + ((n - 1) & (PTS_TRACK_SIZE - 1)); ++ prev_t->interval = t->interval; ++ } ++ ++ // In case deinterlace interpolates frames use every other usec ++ return (struct timeval){.tv_sec = n / 500000, .tv_usec = (n % 500000) * 2}; ++} ++ ++static void pts_track_uninit(pts_track_t * const trk) ++{ ++ unsigned int i; ++ for (i = 0; i != PTS_TRACK_SIZE; ++i) { ++ trk->a[i].n = 0; ++ av_frame_free(&trk->a[i].props); ++ } ++} ++ ++static int pts_track_init(pts_track_t * const trk, void *logctx) ++{ ++ unsigned int i; ++ trk->n = 1; ++ pts_stats_init(&trk->stats, logctx, "track"); ++ for (i = 0; i != PTS_TRACK_SIZE; ++i) { ++ trk->a[i].n = 0; ++ if ((trk->a[i].props = av_frame_alloc()) == NULL) { ++ pts_track_uninit(trk); ++ return AVERROR(ENOMEM); ++ } ++ } ++ return 0; ++} ++ ++static inline uint32_t ++fmt_bpl(const struct v4l2_format * const fmt, const unsigned int plane_n) ++{ ++ return V4L2_TYPE_IS_MULTIPLANAR(fmt->type) ? fmt->fmt.pix_mp.plane_fmt[plane_n].bytesperline : fmt->fmt.pix.bytesperline; ++} ++ ++static inline uint32_t ++fmt_height(const struct v4l2_format * const fmt) ++{ ++ return V4L2_TYPE_IS_MULTIPLANAR(fmt->type) ? fmt->fmt.pix_mp.height : fmt->fmt.pix.height; ++} ++ ++static inline uint32_t ++fmt_width(const struct v4l2_format * const fmt) ++{ ++ return V4L2_TYPE_IS_MULTIPLANAR(fmt->type) ? fmt->fmt.pix_mp.width : fmt->fmt.pix.width; ++} ++ ++static inline uint32_t ++fmt_pixelformat(const struct v4l2_format * const fmt) ++{ ++ return V4L2_TYPE_IS_MULTIPLANAR(fmt->type) ? fmt->fmt.pix_mp.pixelformat : fmt->fmt.pix.pixelformat; ++} ++ ++static inline uint32_t ++buf_bytesused0(const struct v4l2_buffer * const buf) ++{ ++ return V4L2_TYPE_IS_MULTIPLANAR(buf->type) ? buf->m.planes[0].bytesused : buf->bytesused; ++} ++ ++static void ++init_format(V4L2Queue * const q, const uint32_t format_type) ++{ ++ memset(&q->format, 0, sizeof(q->format)); ++ memset(&q->sel, 0, sizeof(q->sel)); ++ q->format.type = format_type; ++ q->sel.type = format_type; ++} ++ ++static int deint_v4l2m2m_prepare_context(DeintV4L2M2MContextShared *ctx) ++{ ++ struct v4l2_capability cap; ++ int ret; ++ ++ memset(&cap, 0, sizeof(cap)); ++ ret = ioctl(ctx->fd, VIDIOC_QUERYCAP, &cap); ++ if (ret < 0) ++ return ret; ++ ++ if (ctx->filter_type == FILTER_V4L2_SCALE && ++ strcmp("bcm2835-codec-isp", cap.card) != 0) ++ { ++ av_log(ctx->logctx, AV_LOG_DEBUG, "Not ISP\n"); ++ return AVERROR(EINVAL); ++ } ++ ++ if (!(cap.capabilities & V4L2_CAP_STREAMING)) { ++ av_log(ctx->logctx, AV_LOG_DEBUG, "No streaming\n"); ++ return AVERROR(EINVAL); ++ } ++ ++ if (cap.capabilities & V4L2_CAP_VIDEO_M2M_MPLANE) { ++ init_format(&ctx->capture, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE); ++ init_format(&ctx->output, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE); ++ } ++ else if (cap.capabilities & V4L2_CAP_VIDEO_M2M) { ++ init_format(&ctx->capture, V4L2_BUF_TYPE_VIDEO_CAPTURE); ++ init_format(&ctx->output, V4L2_BUF_TYPE_VIDEO_OUTPUT); ++ } ++ else { ++ av_log(ctx->logctx, AV_LOG_DEBUG, "Not M2M\n"); ++ return AVERROR(EINVAL); ++ } ++ ++ return 0; ++} ++ ++// Just use for probe - doesn't modify q format ++static int deint_v4l2m2m_try_format(V4L2Queue *queue, const uint32_t width, const uint32_t height, const enum AVPixelFormat avfmt) ++{ ++ struct v4l2_format fmt = {.type = queue->format.type}; ++ DeintV4L2M2MContextShared *ctx = queue->ctx; ++ int ret, field; ++ // Pick YUV to test with if not otherwise specified ++ uint32_t pixelformat = avfmt == AV_PIX_FMT_NONE ? V4L2_PIX_FMT_YUV420 : fmt_av_to_v4l2(avfmt); ++ enum AVPixelFormat r_avfmt; ++ ++ ++ ret = ioctl(ctx->fd, VIDIOC_G_FMT, &fmt); ++ if (ret) ++ av_log(ctx->logctx, AV_LOG_ERROR, "VIDIOC_G_FMT failed: %d\n", ret); ++ ++ if (ctx->filter_type == FILTER_V4L2_DEINTERLACE && V4L2_TYPE_IS_OUTPUT(fmt.type)) ++ field = V4L2_FIELD_INTERLACED_TB; ++ else ++ field = V4L2_FIELD_NONE; ++ ++ if (V4L2_TYPE_IS_MULTIPLANAR(fmt.type)) { ++ fmt.fmt.pix_mp.pixelformat = pixelformat; ++ fmt.fmt.pix_mp.field = field; ++ fmt.fmt.pix_mp.width = width; ++ fmt.fmt.pix_mp.height = height; ++ } else { ++ fmt.fmt.pix.pixelformat = pixelformat; ++ fmt.fmt.pix.field = field; ++ fmt.fmt.pix.width = width; ++ fmt.fmt.pix.height = height; ++ } ++ ++ av_log(ctx->logctx, AV_LOG_TRACE, "%s: Trying format for type %d, wxh: %dx%d, fmt: %08x, size %u bpl %u pre\n", __func__, ++ fmt.type, fmt.fmt.pix_mp.width, fmt.fmt.pix_mp.height, ++ fmt.fmt.pix_mp.pixelformat, ++ fmt.fmt.pix_mp.plane_fmt[0].sizeimage, fmt.fmt.pix_mp.plane_fmt[0].bytesperline); ++ ++ ret = ioctl(ctx->fd, VIDIOC_TRY_FMT, &fmt); ++ if (ret) ++ return AVERROR(EINVAL); ++ ++ av_log(ctx->logctx, AV_LOG_TRACE, "%s: Trying format for type %d, wxh: %dx%d, fmt: %08x, size %u bpl %u post\n", __func__, ++ fmt.type, fmt.fmt.pix_mp.width, fmt.fmt.pix_mp.height, ++ fmt.fmt.pix_mp.pixelformat, ++ fmt.fmt.pix_mp.plane_fmt[0].sizeimage, fmt.fmt.pix_mp.plane_fmt[0].bytesperline); ++ ++ r_avfmt = fmt_v4l2_to_av(fmt_pixelformat(&fmt)); ++ if (r_avfmt != avfmt && avfmt != AV_PIX_FMT_NONE) { ++ av_log(ctx->logctx, AV_LOG_DEBUG, "Unable to set format %s on %s port\n", av_get_pix_fmt_name(avfmt), V4L2_TYPE_IS_CAPTURE(fmt.type) ? "dest" : "src"); ++ return AVERROR(EINVAL); ++ } ++ if (r_avfmt == AV_PIX_FMT_NONE) { ++ av_log(ctx->logctx, AV_LOG_DEBUG, "No supported format on %s port\n", V4L2_TYPE_IS_CAPTURE(fmt.type) ? "dest" : "src"); ++ return AVERROR(EINVAL); ++ } ++ ++ if (V4L2_TYPE_IS_MULTIPLANAR(fmt.type)) { ++ if (fmt.fmt.pix_mp.field != field) { ++ av_log(ctx->logctx, AV_LOG_DEBUG, "format not supported for type %d\n", fmt.type); ++ ++ return AVERROR(EINVAL); ++ } ++ } else { ++ if (fmt.fmt.pix.field != field) { ++ av_log(ctx->logctx, AV_LOG_DEBUG, "format not supported for type %d\n", fmt.type); ++ ++ return AVERROR(EINVAL); ++ } ++ } ++ ++ return 0; ++} ++ ++static int ++do_s_fmt(V4L2Queue * const q) ++{ ++ DeintV4L2M2MContextShared * const ctx = q->ctx; ++ const uint32_t pixelformat = fmt_pixelformat(&q->format); ++ int ret; ++ ++ ret = ioctl(ctx->fd, VIDIOC_S_FMT, &q->format); ++ if (ret) { ++ ret = AVERROR(errno); ++ av_log(ctx->logctx, AV_LOG_ERROR, "VIDIOC_S_FMT failed: %s\n", av_err2str(ret)); ++ return ret; ++ } ++ ++ if (pixelformat != fmt_pixelformat(&q->format)) { ++ av_log(ctx->logctx, AV_LOG_ERROR, "Format not supported: %s; S_FMT returned %s\n", av_fourcc2str(pixelformat), av_fourcc2str(fmt_pixelformat(&q->format))); ++ return AVERROR(EINVAL); ++ } ++ ++ q->sel.target = V4L2_TYPE_IS_OUTPUT(q->sel.type) ? V4L2_SEL_TGT_CROP : V4L2_SEL_TGT_COMPOSE, ++ q->sel.flags = V4L2_TYPE_IS_OUTPUT(q->sel.type) ? V4L2_SEL_FLAG_LE : V4L2_SEL_FLAG_GE; ++ ++ ret = ioctl(ctx->fd, VIDIOC_S_SELECTION, &q->sel); ++ if (ret) { ++ ret = AVERROR(errno); ++ av_log(ctx->logctx, AV_LOG_WARNING, "VIDIOC_S_SELECTION failed: %s\n", av_err2str(ret)); ++ } ++ ++ return 0; ++} ++ ++static void ++set_fmt_color(struct v4l2_format *const fmt, ++ const enum AVColorPrimaries avcp, ++ const enum AVColorSpace avcs, ++ const enum AVColorTransferCharacteristic avxc) ++{ ++ enum v4l2_ycbcr_encoding ycbcr = V4L2_YCBCR_ENC_DEFAULT; ++ enum v4l2_colorspace cs = V4L2_COLORSPACE_DEFAULT; ++ enum v4l2_xfer_func xfer = V4L2_XFER_FUNC_DEFAULT; ++ ++ switch (avcp) { ++ case AVCOL_PRI_BT709: ++ cs = V4L2_COLORSPACE_REC709; ++ ycbcr = V4L2_YCBCR_ENC_709; ++ break; ++ case AVCOL_PRI_BT470M: ++ cs = V4L2_COLORSPACE_470_SYSTEM_M; ++ ycbcr = V4L2_YCBCR_ENC_601; ++ break; ++ case AVCOL_PRI_BT470BG: ++ cs = V4L2_COLORSPACE_470_SYSTEM_BG; ++ break; ++ case AVCOL_PRI_SMPTE170M: ++ cs = V4L2_COLORSPACE_SMPTE170M; ++ break; ++ case AVCOL_PRI_SMPTE240M: ++ cs = V4L2_COLORSPACE_SMPTE240M; ++ break; ++ case AVCOL_PRI_BT2020: ++ cs = V4L2_COLORSPACE_BT2020; ++ break; ++ case AVCOL_PRI_SMPTE428: ++ case AVCOL_PRI_SMPTE431: ++ case AVCOL_PRI_SMPTE432: ++ case AVCOL_PRI_EBU3213: ++ case AVCOL_PRI_RESERVED: ++ case AVCOL_PRI_FILM: ++ case AVCOL_PRI_UNSPECIFIED: ++ default: ++ break; ++ } ++ ++ switch (avcs) { ++ case AVCOL_SPC_RGB: ++ cs = V4L2_COLORSPACE_SRGB; ++ break; ++ case AVCOL_SPC_BT709: ++ cs = V4L2_COLORSPACE_REC709; ++ break; ++ case AVCOL_SPC_FCC: ++ cs = V4L2_COLORSPACE_470_SYSTEM_M; ++ break; ++ case AVCOL_SPC_BT470BG: ++ cs = V4L2_COLORSPACE_470_SYSTEM_BG; ++ break; ++ case AVCOL_SPC_SMPTE170M: ++ cs = V4L2_COLORSPACE_SMPTE170M; ++ break; ++ case AVCOL_SPC_SMPTE240M: ++ cs = V4L2_COLORSPACE_SMPTE240M; ++ break; ++ case AVCOL_SPC_BT2020_CL: ++ cs = V4L2_COLORSPACE_BT2020; ++ ycbcr = V4L2_YCBCR_ENC_BT2020_CONST_LUM; ++ break; ++ case AVCOL_SPC_BT2020_NCL: ++ cs = V4L2_COLORSPACE_BT2020; ++ break; ++ default: ++ break; ++ } ++ ++ switch (xfer) { ++ case AVCOL_TRC_BT709: ++ xfer = V4L2_XFER_FUNC_709; ++ break; ++ case AVCOL_TRC_IEC61966_2_1: ++ xfer = V4L2_XFER_FUNC_SRGB; ++ break; ++ case AVCOL_TRC_SMPTE240M: ++ xfer = V4L2_XFER_FUNC_SMPTE240M; ++ break; ++ case AVCOL_TRC_SMPTE2084: ++ xfer = V4L2_XFER_FUNC_SMPTE2084; ++ break; ++ default: ++ break; ++ } ++ ++ if (V4L2_TYPE_IS_MULTIPLANAR(fmt->type)) { ++ fmt->fmt.pix_mp.colorspace = cs; ++ fmt->fmt.pix_mp.ycbcr_enc = ycbcr; ++ fmt->fmt.pix_mp.xfer_func = xfer; ++ } else { ++ fmt->fmt.pix.colorspace = cs; ++ fmt->fmt.pix.ycbcr_enc = ycbcr; ++ fmt->fmt.pix.xfer_func = xfer; ++ } ++} ++ ++static void ++set_fmt_color_range(struct v4l2_format *const fmt, const enum AVColorRange avcr) ++{ ++ const enum v4l2_quantization q = ++ avcr == AVCOL_RANGE_MPEG ? V4L2_QUANTIZATION_LIM_RANGE : ++ avcr == AVCOL_RANGE_JPEG ? V4L2_QUANTIZATION_FULL_RANGE : ++ V4L2_QUANTIZATION_DEFAULT; ++ ++ if (V4L2_TYPE_IS_MULTIPLANAR(fmt->type)) { ++ fmt->fmt.pix_mp.quantization = q; ++ } else { ++ fmt->fmt.pix.quantization = q; ++ } ++} ++ ++static enum AVColorPrimaries get_color_primaries(const struct v4l2_format *const fmt) ++{ ++ enum v4l2_ycbcr_encoding ycbcr; ++ enum v4l2_colorspace cs; ++ ++ cs = V4L2_TYPE_IS_MULTIPLANAR(fmt->type) ? ++ fmt->fmt.pix_mp.colorspace : ++ fmt->fmt.pix.colorspace; ++ ++ ycbcr = V4L2_TYPE_IS_MULTIPLANAR(fmt->type) ? ++ fmt->fmt.pix_mp.ycbcr_enc: ++ fmt->fmt.pix.ycbcr_enc; ++ ++ switch(ycbcr) { ++ case V4L2_YCBCR_ENC_XV709: ++ case V4L2_YCBCR_ENC_709: return AVCOL_PRI_BT709; ++ case V4L2_YCBCR_ENC_XV601: ++ case V4L2_YCBCR_ENC_601:return AVCOL_PRI_BT470M; ++ default: ++ break; ++ } ++ ++ switch(cs) { ++ case V4L2_COLORSPACE_470_SYSTEM_BG: return AVCOL_PRI_BT470BG; ++ case V4L2_COLORSPACE_SMPTE170M: return AVCOL_PRI_SMPTE170M; ++ case V4L2_COLORSPACE_SMPTE240M: return AVCOL_PRI_SMPTE240M; ++ case V4L2_COLORSPACE_BT2020: return AVCOL_PRI_BT2020; ++ default: ++ break; ++ } ++ ++ return AVCOL_PRI_UNSPECIFIED; ++} ++ ++static enum AVColorSpace get_color_space(const struct v4l2_format *const fmt) ++{ ++ enum v4l2_ycbcr_encoding ycbcr; ++ enum v4l2_colorspace cs; ++ ++ cs = V4L2_TYPE_IS_MULTIPLANAR(fmt->type) ? ++ fmt->fmt.pix_mp.colorspace : ++ fmt->fmt.pix.colorspace; ++ ++ ycbcr = V4L2_TYPE_IS_MULTIPLANAR(fmt->type) ? ++ fmt->fmt.pix_mp.ycbcr_enc: ++ fmt->fmt.pix.ycbcr_enc; ++ ++ switch(cs) { ++ case V4L2_COLORSPACE_SRGB: return AVCOL_SPC_RGB; ++ case V4L2_COLORSPACE_REC709: return AVCOL_SPC_BT709; ++ case V4L2_COLORSPACE_470_SYSTEM_M: return AVCOL_SPC_FCC; ++ case V4L2_COLORSPACE_470_SYSTEM_BG: return AVCOL_SPC_BT470BG; ++ case V4L2_COLORSPACE_SMPTE170M: return AVCOL_SPC_SMPTE170M; ++ case V4L2_COLORSPACE_SMPTE240M: return AVCOL_SPC_SMPTE240M; ++ case V4L2_COLORSPACE_BT2020: ++ if (ycbcr == V4L2_YCBCR_ENC_BT2020_CONST_LUM) ++ return AVCOL_SPC_BT2020_CL; ++ else ++ return AVCOL_SPC_BT2020_NCL; ++ default: ++ break; ++ } ++ ++ return AVCOL_SPC_UNSPECIFIED; ++} ++ ++static enum AVColorTransferCharacteristic get_color_trc(const struct v4l2_format *const fmt) ++{ ++ enum v4l2_ycbcr_encoding ycbcr; ++ enum v4l2_xfer_func xfer; ++ enum v4l2_colorspace cs; ++ ++ cs = V4L2_TYPE_IS_MULTIPLANAR(fmt->type) ? ++ fmt->fmt.pix_mp.colorspace : ++ fmt->fmt.pix.colorspace; ++ ++ ycbcr = V4L2_TYPE_IS_MULTIPLANAR(fmt->type) ? ++ fmt->fmt.pix_mp.ycbcr_enc: ++ fmt->fmt.pix.ycbcr_enc; ++ ++ xfer = V4L2_TYPE_IS_MULTIPLANAR(fmt->type) ? ++ fmt->fmt.pix_mp.xfer_func: ++ fmt->fmt.pix.xfer_func; ++ ++ switch (xfer) { ++ case V4L2_XFER_FUNC_709: return AVCOL_TRC_BT709; ++ case V4L2_XFER_FUNC_SRGB: return AVCOL_TRC_IEC61966_2_1; ++ default: ++ break; ++ } ++ ++ switch (cs) { ++ case V4L2_COLORSPACE_470_SYSTEM_M: return AVCOL_TRC_GAMMA22; ++ case V4L2_COLORSPACE_470_SYSTEM_BG: return AVCOL_TRC_GAMMA28; ++ case V4L2_COLORSPACE_SMPTE170M: return AVCOL_TRC_SMPTE170M; ++ case V4L2_COLORSPACE_SMPTE240M: return AVCOL_TRC_SMPTE240M; ++ default: ++ break; ++ } ++ ++ switch (ycbcr) { ++ case V4L2_YCBCR_ENC_XV709: ++ case V4L2_YCBCR_ENC_XV601: return AVCOL_TRC_BT1361_ECG; ++ default: ++ break; ++ } ++ ++ return AVCOL_TRC_UNSPECIFIED; ++} ++ ++static enum AVColorRange get_color_range(const struct v4l2_format *const fmt) ++{ ++ enum v4l2_quantization qt; ++ ++ qt = V4L2_TYPE_IS_MULTIPLANAR(fmt->type) ? ++ fmt->fmt.pix_mp.quantization : ++ fmt->fmt.pix.quantization; ++ ++ switch (qt) { ++ case V4L2_QUANTIZATION_LIM_RANGE: return AVCOL_RANGE_MPEG; ++ case V4L2_QUANTIZATION_FULL_RANGE: return AVCOL_RANGE_JPEG; ++ default: ++ break; ++ } ++ ++ return AVCOL_RANGE_UNSPECIFIED; ++} ++ ++static int set_src_fmt(V4L2Queue * const q, const AVFrame * const frame) ++{ ++ struct v4l2_format *const format = &q->format; ++ const AVDRMFrameDescriptor *const src = (const AVDRMFrameDescriptor *)frame->data[0]; ++ ++ const uint32_t drm_fmt = src->layers[0].format; ++ // Treat INVALID as LINEAR ++ const uint64_t mod = src->objects[0].format_modifier == DRM_FORMAT_MOD_INVALID ? ++ DRM_FORMAT_MOD_LINEAR : src->objects[0].format_modifier; ++ uint32_t pix_fmt = 0; ++ uint32_t w = 0; ++ uint32_t h = 0; ++ uint32_t bpl = src->layers[0].planes[0].pitch; ++ ++ // We really don't expect multiple layers ++ // All formats that we currently cope with are single object ++ ++ if (src->nb_layers != 1 || src->nb_objects != 1) ++ return AVERROR(EINVAL); ++ ++ switch (drm_fmt) { ++ case DRM_FORMAT_YUV420: ++ if (mod == DRM_FORMAT_MOD_LINEAR) { ++ if (src->layers[0].nb_planes != 3) ++ break; ++ pix_fmt = V4L2_PIX_FMT_YUV420; ++ h = src->layers[0].planes[1].offset / bpl; ++ w = bpl; ++ } ++ break; ++ ++ case DRM_FORMAT_NV12: ++ if (mod == DRM_FORMAT_MOD_LINEAR) { ++ if (src->layers[0].nb_planes != 2) ++ break; ++ pix_fmt = V4L2_PIX_FMT_NV12; ++ h = src->layers[0].planes[1].offset / bpl; ++ w = bpl; ++ } ++#if CONFIG_SAND ++ else if (fourcc_mod_broadcom_mod(mod) == DRM_FORMAT_MOD_BROADCOM_SAND128) { ++ if (src->layers[0].nb_planes != 2) ++ break; ++ pix_fmt = V4L2_PIX_FMT_NV12_COL128; ++ w = bpl; ++ h = src->layers[0].planes[1].offset / 128; ++ bpl = fourcc_mod_broadcom_param(mod); ++ } ++#endif ++ break; ++ ++ case DRM_FORMAT_P030: ++#if CONFIG_SAND ++ if (fourcc_mod_broadcom_mod(mod) == DRM_FORMAT_MOD_BROADCOM_SAND128) { ++ if (src->layers[0].nb_planes != 2) ++ break; ++ pix_fmt = V4L2_PIX_FMT_NV12_10_COL128; ++ w = bpl / 2; // Matching lie to how we construct this ++ h = src->layers[0].planes[1].offset / 128; ++ bpl = fourcc_mod_broadcom_param(mod); ++ } ++#endif ++ break; ++ ++ default: ++ break; ++ } ++ ++ if (!pix_fmt) ++ return AVERROR(EINVAL); ++ ++ if (V4L2_TYPE_IS_MULTIPLANAR(format->type)) { ++ struct v4l2_pix_format_mplane *const pix = &format->fmt.pix_mp; ++ ++ pix->width = w; ++ pix->height = h; ++ pix->pixelformat = pix_fmt; ++ pix->plane_fmt[0].bytesperline = bpl; ++ pix->num_planes = 1; ++ } ++ else { ++ struct v4l2_pix_format *const pix = &format->fmt.pix; ++ ++ pix->width = w; ++ pix->height = h; ++ pix->pixelformat = pix_fmt; ++ pix->bytesperline = bpl; ++ } ++ ++ set_fmt_color(format, frame->color_primaries, frame->colorspace, frame->color_trc); ++ set_fmt_color_range(format, frame->color_range); ++ ++ q->sel.r.width = frame->width - (frame->crop_left + frame->crop_right); ++ q->sel.r.height = frame->height - (frame->crop_top + frame->crop_bottom); ++ q->sel.r.left = frame->crop_left; ++ q->sel.r.top = frame->crop_top; ++ ++ return 0; ++} ++ ++ ++static int set_dst_format(DeintV4L2M2MContext * const priv, V4L2Queue *queue, uint32_t pixelformat, uint32_t field, int width, int height) ++{ ++ struct v4l2_format * const fmt = &queue->format; ++ struct v4l2_selection *const sel = &queue->sel; ++ ++ memset(&fmt->fmt, 0, sizeof(fmt->fmt)); ++ ++ // Align w/h to 16 here in case there are alignment requirements at the next ++ // stage of the filter chain (also RPi deinterlace setup is bust and this ++ // fixes it) ++ if (V4L2_TYPE_IS_MULTIPLANAR(fmt->type)) { ++ fmt->fmt.pix_mp.pixelformat = pixelformat; ++ fmt->fmt.pix_mp.field = field; ++ fmt->fmt.pix_mp.width = FFALIGN(width, 16); ++ fmt->fmt.pix_mp.height = FFALIGN(height, 16); ++ } else { ++ fmt->fmt.pix.pixelformat = pixelformat; ++ fmt->fmt.pix.field = field; ++ fmt->fmt.pix.width = FFALIGN(width, 16); ++ fmt->fmt.pix.height = FFALIGN(height, 16); ++ } ++ ++ set_fmt_color(fmt, priv->colour_primaries, priv->colour_matrix, priv->colour_transfer); ++ set_fmt_color_range(fmt, priv->colour_range); ++ ++ sel->r.width = width; ++ sel->r.height = height; ++ sel->r.left = 0; ++ sel->r.top = 0; ++ ++ return do_s_fmt(queue); ++} ++ ++static int deint_v4l2m2m_probe_device(DeintV4L2M2MContextShared *ctx, char *node) ++{ ++ int ret; ++ ++ ctx->fd = open(node, O_RDWR | O_NONBLOCK, 0); ++ if (ctx->fd < 0) ++ return AVERROR(errno); ++ ++ ret = deint_v4l2m2m_prepare_context(ctx); ++ if (ret) { ++ av_log(ctx->logctx, AV_LOG_DEBUG, "Failed to prepare context\n"); ++ goto fail; ++ } ++ ++ ret = deint_v4l2m2m_try_format(&ctx->capture, ctx->output_width, ctx->output_height, ctx->output_format); ++ if (ret) { ++ av_log(ctx->logctx, AV_LOG_DEBUG, "Failed to try dst format\n"); ++ goto fail; ++ } ++ ++ ret = deint_v4l2m2m_try_format(&ctx->output, ctx->width, ctx->height, AV_PIX_FMT_NONE); ++ if (ret) { ++ av_log(ctx->logctx, AV_LOG_DEBUG, "Failed to try src format\n"); ++ goto fail; ++ } ++ ++ return 0; ++ ++fail: ++ close(ctx->fd); ++ ctx->fd = -1; ++ ++ return ret; ++} ++ ++static int deint_v4l2m2m_find_device(DeintV4L2M2MContextShared *ctx) ++{ ++ int ret = AVERROR(EINVAL); ++ struct dirent *entry; ++ char node[PATH_MAX]; ++ DIR *dirp; ++ ++ dirp = opendir("/dev"); ++ if (!dirp) ++ return AVERROR(errno); ++ ++ for (entry = readdir(dirp); entry; entry = readdir(dirp)) { ++ ++ if (strncmp(entry->d_name, "video", 5)) ++ continue; ++ ++ snprintf(node, sizeof(node), "/dev/%s", entry->d_name); ++ av_log(ctx->logctx, AV_LOG_DEBUG, "probing device %s\n", node); ++ ret = deint_v4l2m2m_probe_device(ctx, node); ++ if (!ret) ++ break; ++ } ++ ++ closedir(dirp); ++ ++ if (ret) { ++ av_log(ctx->logctx, AV_LOG_ERROR, "Could not find a valid device\n"); ++ ctx->fd = -1; ++ ++ return ret; ++ } ++ ++ av_log(ctx->logctx, AV_LOG_INFO, "Using device %s\n", node); ++ ++ return 0; ++} ++ ++static int deint_v4l2m2m_enqueue_buffer(V4L2Buffer *buf) ++{ ++ int ret; ++ ++ ret = ioctl(buf->q->ctx->fd, VIDIOC_QBUF, &buf->buffer); ++ if (ret < 0) ++ return AVERROR(errno); ++ ++ buf->enqueued = 1; ++ ++ return 0; ++} ++ ++static void ++drm_frame_init(AVDRMFrameDescriptor * const d) ++{ ++ unsigned int i; ++ for (i = 0; i != AV_DRM_MAX_PLANES; ++i) { ++ d->objects[i].fd = -1; ++ } ++} ++ ++static void ++drm_frame_uninit(AVDRMFrameDescriptor * const d) ++{ ++ unsigned int i; ++ for (i = 0; i != d->nb_objects; ++i) { ++ if (d->objects[i].fd != -1) { ++ close(d->objects[i].fd); ++ d->objects[i].fd = -1; ++ } ++ } ++} ++ ++static void ++avbufs_delete(V4L2Buffer** ppavbufs, const unsigned int n) ++{ ++ unsigned int i; ++ V4L2Buffer* const avbufs = *ppavbufs; ++ ++ if (avbufs == NULL) ++ return; ++ *ppavbufs = NULL; ++ ++ for (i = 0; i != n; ++i) { ++ V4L2Buffer* const avbuf = avbufs + i; ++ drm_frame_uninit(&avbuf->drm_frame); ++ } ++ ++ av_free(avbufs); ++} ++ ++static int v4l2_buffer_export_drm(V4L2Queue * const q, V4L2Buffer * const avbuf) ++{ ++ struct v4l2_exportbuffer expbuf; ++ int i, ret; ++ uint64_t mod = DRM_FORMAT_MOD_LINEAR; ++ ++ AVDRMFrameDescriptor * const drm_desc = &avbuf->drm_frame; ++ AVDRMLayerDescriptor * const layer = &drm_desc->layers[0]; ++ const struct v4l2_format *const fmt = &q->format; ++ const uint32_t height = fmt_height(fmt); ++ ptrdiff_t bpl0; ++ ++ /* fill the DRM frame descriptor */ ++ drm_desc->nb_layers = 1; ++ layer->nb_planes = avbuf->num_planes; ++ ++ for (int i = 0; i < avbuf->num_planes; i++) { ++ layer->planes[i].object_index = i; ++ layer->planes[i].offset = 0; ++ layer->planes[i].pitch = fmt_bpl(fmt, i); ++ } ++ bpl0 = layer->planes[0].pitch; ++ ++ switch (fmt_pixelformat(fmt)) { ++#if CONFIG_SAND ++ case V4L2_PIX_FMT_NV12_COL128: ++ mod = DRM_FORMAT_MOD_BROADCOM_SAND128_COL_HEIGHT(bpl0); ++ layer->format = V4L2_PIX_FMT_NV12; ++ ++ if (avbuf->num_planes > 1) ++ break; ++ ++ layer->nb_planes = 2; ++ layer->planes[1].object_index = 0; ++ layer->planes[1].offset = height * 128; ++ layer->planes[0].pitch = fmt_width(fmt); ++ layer->planes[1].pitch = layer->planes[0].pitch; ++ break; ++#endif ++ ++ case DRM_FORMAT_NV12: ++ layer->format = V4L2_PIX_FMT_NV12; ++ ++ if (avbuf->num_planes > 1) ++ break; ++ ++ layer->nb_planes = 2; ++ layer->planes[1].object_index = 0; ++ layer->planes[1].offset = bpl0 * height; ++ layer->planes[1].pitch = bpl0; ++ break; ++ ++ case V4L2_PIX_FMT_YUV420: ++ layer->format = DRM_FORMAT_YUV420; ++ ++ if (avbuf->num_planes > 1) ++ break; ++ ++ layer->nb_planes = 3; ++ layer->planes[1].object_index = 0; ++ layer->planes[1].offset = bpl0 * height; ++ layer->planes[1].pitch = bpl0 / 2; ++ layer->planes[2].object_index = 0; ++ layer->planes[2].offset = layer->planes[1].offset + ((bpl0 * height) / 4); ++ layer->planes[2].pitch = bpl0 / 2; ++ break; ++ ++ default: ++ drm_desc->nb_layers = 0; ++ return AVERROR(EINVAL); ++ } ++ ++ drm_desc->nb_objects = 0; ++ for (i = 0; i < avbuf->num_planes; i++) { ++ memset(&expbuf, 0, sizeof(expbuf)); ++ ++ expbuf.index = avbuf->buffer.index; ++ expbuf.type = avbuf->buffer.type; ++ expbuf.plane = i; ++ ++ ret = ioctl(avbuf->q->ctx->fd, VIDIOC_EXPBUF, &expbuf); ++ if (ret < 0) ++ return AVERROR(errno); ++ ++ drm_desc->objects[i].size = V4L2_TYPE_IS_MULTIPLANAR(avbuf->buffer.type) ? ++ avbuf->buffer.m.planes[i].length : avbuf->buffer.length; ++ drm_desc->objects[i].fd = expbuf.fd; ++ drm_desc->objects[i].format_modifier = mod; ++ drm_desc->nb_objects = i + 1; ++ } ++ ++ return 0; ++} ++ ++static int deint_v4l2m2m_allocate_buffers(V4L2Queue *queue) ++{ ++ struct v4l2_format *fmt = &queue->format; ++ DeintV4L2M2MContextShared *ctx = queue->ctx; ++ struct v4l2_requestbuffers req; ++ int ret, i, multiplanar; ++ uint32_t memory; ++ ++ memory = V4L2_TYPE_IS_OUTPUT(fmt->type) ? ++ V4L2_MEMORY_DMABUF : V4L2_MEMORY_MMAP; ++ ++ multiplanar = V4L2_TYPE_IS_MULTIPLANAR(fmt->type); ++ ++ memset(&req, 0, sizeof(req)); ++ req.count = queue->num_buffers; ++ req.memory = memory; ++ req.type = fmt->type; ++ ++ ret = ioctl(ctx->fd, VIDIOC_REQBUFS, &req); ++ if (ret < 0) { ++ av_log(ctx->logctx, AV_LOG_ERROR, "VIDIOC_REQBUFS failed: %s\n", strerror(errno)); ++ ++ return AVERROR(errno); ++ } ++ ++ queue->num_buffers = req.count; ++ queue->buffers = av_mallocz(queue->num_buffers * sizeof(V4L2Buffer)); ++ if (!queue->buffers) { ++ av_log(ctx->logctx, AV_LOG_ERROR, "malloc enomem\n"); ++ ++ return AVERROR(ENOMEM); ++ } ++ ++ for (i = 0; i < queue->num_buffers; i++) { ++ V4L2Buffer * const buf = &queue->buffers[i]; ++ ++ buf->enqueued = 0; ++ buf->q = queue; ++ ++ buf->buffer.type = fmt->type; ++ buf->buffer.memory = memory; ++ buf->buffer.index = i; ++ ++ if (multiplanar) { ++ buf->buffer.length = VIDEO_MAX_PLANES; ++ buf->buffer.m.planes = buf->planes; ++ } ++ ++ drm_frame_init(&buf->drm_frame); ++ } ++ ++ for (i = 0; i < queue->num_buffers; i++) { ++ V4L2Buffer * const buf = &queue->buffers[i]; ++ ++ ret = ioctl(ctx->fd, VIDIOC_QUERYBUF, &buf->buffer); ++ if (ret < 0) { ++ ret = AVERROR(errno); ++ ++ goto fail; ++ } ++ ++ buf->num_planes = multiplanar ? buf->buffer.length : 1; ++ ++ if (!V4L2_TYPE_IS_OUTPUT(fmt->type)) { ++ ret = deint_v4l2m2m_enqueue_buffer(buf); ++ if (ret) ++ goto fail; ++ ++ ret = v4l2_buffer_export_drm(queue, buf); ++ if (ret) ++ goto fail; ++ } ++ } ++ ++ return 0; ++ ++fail: ++ avbufs_delete(&queue->buffers, queue->num_buffers); ++ queue->num_buffers = 0; ++ return ret; ++} ++ ++static int deint_v4l2m2m_streamon(V4L2Queue *queue) ++{ ++ DeintV4L2M2MContextShared * const ctx = queue->ctx; ++ int type = queue->format.type; ++ int ret; ++ ++ ret = ioctl(ctx->fd, VIDIOC_STREAMON, &type); ++ av_log(ctx->logctx, AV_LOG_DEBUG, "%s: type:%d ret:%d errno:%d\n", __func__, type, ret, AVERROR(errno)); ++ if (ret < 0) ++ return AVERROR(errno); ++ ++ return 0; ++} ++ ++static int deint_v4l2m2m_streamoff(V4L2Queue *queue) ++{ ++ DeintV4L2M2MContextShared * const ctx = queue->ctx; ++ int type = queue->format.type; ++ int ret; ++ ++ ret = ioctl(ctx->fd, VIDIOC_STREAMOFF, &type); ++ av_log(ctx->logctx, AV_LOG_DEBUG, "%s: type:%d ret:%d errno:%d\n", __func__, type, ret, AVERROR(errno)); ++ if (ret < 0) ++ return AVERROR(errno); ++ ++ return 0; ++} ++ ++// timeout in ms ++static V4L2Buffer* deint_v4l2m2m_dequeue_buffer(V4L2Queue *queue, int timeout) ++{ ++ struct v4l2_plane planes[VIDEO_MAX_PLANES]; ++ DeintV4L2M2MContextShared *ctx = queue->ctx; ++ struct v4l2_buffer buf = { 0 }; ++ V4L2Buffer* avbuf = NULL; ++ struct pollfd pfd; ++ short events; ++ int ret; ++ ++ if (V4L2_TYPE_IS_OUTPUT(queue->format.type)) ++ events = POLLOUT | POLLWRNORM; ++ else ++ events = POLLIN | POLLRDNORM; ++ ++ pfd.events = events; ++ pfd.fd = ctx->fd; ++ ++ for (;;) { ++ ret = poll(&pfd, 1, timeout); ++ if (ret > 0) ++ break; ++ if (errno == EINTR) ++ continue; ++ return NULL; ++ } ++ ++ if (pfd.revents & POLLERR) ++ return NULL; ++ ++ if (pfd.revents & events) { ++ memset(&buf, 0, sizeof(buf)); ++ buf.memory = V4L2_MEMORY_MMAP; ++ buf.type = queue->format.type; ++ if (V4L2_TYPE_IS_MULTIPLANAR(queue->format.type)) { ++ memset(planes, 0, sizeof(planes)); ++ buf.length = VIDEO_MAX_PLANES; ++ buf.m.planes = planes; ++ } ++ ++ ret = ioctl(ctx->fd, VIDIOC_DQBUF, &buf); ++ if (ret) { ++ if (errno != EAGAIN) ++ av_log(ctx->logctx, AV_LOG_DEBUG, "VIDIOC_DQBUF, errno (%s)\n", ++ av_err2str(AVERROR(errno))); ++ return NULL; ++ } ++ ++ avbuf = &queue->buffers[buf.index]; ++ avbuf->enqueued = 0; ++ avbuf->buffer = buf; ++ if (V4L2_TYPE_IS_MULTIPLANAR(queue->format.type)) { ++ memcpy(avbuf->planes, planes, sizeof(planes)); ++ avbuf->buffer.m.planes = avbuf->planes; ++ } ++ return avbuf; ++ } ++ ++ return NULL; ++} ++ ++static V4L2Buffer *deint_v4l2m2m_find_free_buf(V4L2Queue *queue) ++{ ++ int i; ++ V4L2Buffer *buf = NULL; ++ ++ for (i = 0; i < queue->num_buffers; i++) ++ if (!queue->buffers[i].enqueued) { ++ buf = &queue->buffers[i]; ++ break; ++ } ++ return buf; ++} ++ ++static void deint_v4l2m2m_unref_queued(V4L2Queue *queue) ++{ ++ int i; ++ V4L2Buffer *buf = NULL; ++ ++ if (!queue || !queue->buffers) ++ return; ++ for (i = 0; i < queue->num_buffers; i++) { ++ buf = &queue->buffers[i]; ++ if (queue->buffers[i].enqueued) ++ av_frame_unref(&buf->frame); ++ } ++} ++ ++static void recycle_q(V4L2Queue * const queue) ++{ ++ V4L2Buffer* avbuf; ++ while (avbuf = deint_v4l2m2m_dequeue_buffer(queue, 0), avbuf) { ++ av_frame_unref(&avbuf->frame); ++ } ++} ++ ++static int count_enqueued(V4L2Queue *queue) ++{ ++ int i; ++ int n = 0; ++ ++ if (queue->buffers == NULL) ++ return 0; ++ ++ for (i = 0; i < queue->num_buffers; i++) ++ if (queue->buffers[i].enqueued) ++ ++n; ++ return n; ++} ++ ++static int deint_v4l2m2m_enqueue_frame(V4L2Queue * const queue, AVFrame * const frame) ++{ ++ DeintV4L2M2MContextShared *const ctx = queue->ctx; ++ AVDRMFrameDescriptor *drm_desc = (AVDRMFrameDescriptor *)frame->data[0]; ++ V4L2Buffer *buf; ++ int i; ++ ++ if (V4L2_TYPE_IS_OUTPUT(queue->format.type)) ++ recycle_q(queue); ++ ++ buf = deint_v4l2m2m_find_free_buf(queue); ++ if (!buf) { ++ av_log(ctx->logctx, AV_LOG_ERROR, "%s: error %d finding free buf\n", __func__, 0); ++ return AVERROR(EAGAIN); ++ } ++ if (V4L2_TYPE_IS_MULTIPLANAR(buf->buffer.type)) ++ for (i = 0; i < drm_desc->nb_objects; i++) ++ buf->buffer.m.planes[i].m.fd = drm_desc->objects[i].fd; ++ else ++ buf->buffer.m.fd = drm_desc->objects[0].fd; ++ ++ buf->buffer.field = !frame->interlaced_frame ? V4L2_FIELD_NONE : ++ frame->top_field_first ? V4L2_FIELD_INTERLACED_TB : ++ V4L2_FIELD_INTERLACED_BT; ++ ++ if (ctx->field_order != buf->buffer.field) { ++ av_log(ctx->logctx, AV_LOG_DEBUG, "%s: Field changed: %d->%d\n", __func__, ctx->field_order, buf->buffer.field); ++ ctx->field_order = buf->buffer.field; ++ } ++ ++ buf->buffer.timestamp = pts_track_add_frame(&ctx->track, frame); ++ ++ buf->drm_frame.objects[0].fd = drm_desc->objects[0].fd; ++ ++ av_frame_move_ref(&buf->frame, frame); ++ ++ return deint_v4l2m2m_enqueue_buffer(buf); ++} ++ ++static void deint_v4l2m2m_destroy_context(DeintV4L2M2MContextShared *ctx) ++{ ++ if (atomic_fetch_sub(&ctx->refcount, 1) == 1) { ++ V4L2Queue *capture = &ctx->capture; ++ V4L2Queue *output = &ctx->output; ++ ++ av_log(NULL, AV_LOG_DEBUG, "%s - destroying context\n", __func__); ++ ++ if (ctx->fd >= 0) { ++ deint_v4l2m2m_streamoff(capture); ++ deint_v4l2m2m_streamoff(output); ++ } ++ ++ avbufs_delete(&capture->buffers, capture->num_buffers); ++ ++ deint_v4l2m2m_unref_queued(output); ++ ++ av_buffer_unref(&ctx->hw_frames_ctx); ++ ++ if (capture->buffers) ++ av_free(capture->buffers); ++ ++ if (output->buffers) ++ av_free(output->buffers); ++ ++ if (ctx->fd >= 0) { ++ close(ctx->fd); ++ ctx->fd = -1; ++ } ++ ++ av_free(ctx); ++ } ++} ++ ++static void v4l2_free_buffer(void *opaque, uint8_t *unused) ++{ ++ V4L2Buffer *buf = opaque; ++ DeintV4L2M2MContextShared *ctx = buf->q->ctx; ++ ++ if (!ctx->done) ++ deint_v4l2m2m_enqueue_buffer(buf); ++ ++ deint_v4l2m2m_destroy_context(ctx); ++} ++ ++// timeout in ms ++static int deint_v4l2m2m_dequeue_frame(V4L2Queue *queue, AVFrame* frame, int timeout) ++{ ++ DeintV4L2M2MContextShared *ctx = queue->ctx; ++ V4L2Buffer* avbuf; ++ enum AVColorPrimaries color_primaries; ++ enum AVColorSpace colorspace; ++ enum AVColorTransferCharacteristic color_trc; ++ enum AVColorRange color_range; ++ ++ av_log(ctx->logctx, AV_LOG_TRACE, "<<< %s\n", __func__); ++ ++ if (queue->eos) { ++ av_log(ctx->logctx, AV_LOG_TRACE, ">>> %s: EOS\n", __func__); ++ return AVERROR_EOF; ++ } ++ ++ avbuf = deint_v4l2m2m_dequeue_buffer(queue, timeout); ++ if (!avbuf) { ++ av_log(ctx->logctx, AV_LOG_DEBUG, "%s: No buffer to dequeue (timeout=%d)\n", __func__, timeout); ++ return AVERROR(EAGAIN); ++ } ++ ++ if (V4L2_TYPE_IS_CAPTURE(avbuf->buffer.type)) { ++ if ((avbuf->buffer.flags & V4L2_BUF_FLAG_LAST) != 0) ++ queue->eos = 1; ++ if (buf_bytesused0(&avbuf->buffer) == 0) ++ return queue->eos ? AVERROR_EOF : AVERROR(EINVAL); ++ } ++ ++ // Fill in PTS and anciliary info from src frame ++ pts_track_get_frame(&ctx->track, avbuf->buffer.timestamp, frame); ++ ++ frame->buf[0] = av_buffer_create((uint8_t *) &avbuf->drm_frame, ++ sizeof(avbuf->drm_frame), v4l2_free_buffer, ++ avbuf, AV_BUFFER_FLAG_READONLY); ++ if (!frame->buf[0]) { ++ av_log(ctx->logctx, AV_LOG_ERROR, "%s: error %d creating buffer\n", __func__, 0); ++ return AVERROR(ENOMEM); ++ } ++ ++ atomic_fetch_add(&ctx->refcount, 1); ++ ++ frame->data[0] = (uint8_t *)&avbuf->drm_frame; ++ frame->format = AV_PIX_FMT_DRM_PRIME; ++ if (ctx->hw_frames_ctx) ++ frame->hw_frames_ctx = av_buffer_ref(ctx->hw_frames_ctx); ++ frame->height = ctx->output_height; ++ frame->width = ctx->output_width; ++ ++ color_primaries = get_color_primaries(&ctx->capture.format); ++ colorspace = get_color_space(&ctx->capture.format); ++ color_trc = get_color_trc(&ctx->capture.format); ++ color_range = get_color_range(&ctx->capture.format); ++ ++ // If the color parameters are unspecified by V4L2 then leave alone as they ++ // will have been copied from src ++ if (color_primaries != AVCOL_PRI_UNSPECIFIED) ++ frame->color_primaries = color_primaries; ++ if (colorspace != AVCOL_SPC_UNSPECIFIED) ++ frame->colorspace = colorspace; ++ if (color_trc != AVCOL_TRC_UNSPECIFIED) ++ frame->color_trc = color_trc; ++ if (color_range != AVCOL_RANGE_UNSPECIFIED) ++ frame->color_range = color_range; ++ ++ if (ctx->filter_type == FILTER_V4L2_DEINTERLACE) { ++ // Not interlaced now ++ frame->interlaced_frame = 0; // *** Fill in from dst buffer? ++ frame->top_field_first = 0; ++ // Pkt duration halved ++ frame->pkt_duration /= 2; ++ } ++ ++ if (avbuf->buffer.flags & V4L2_BUF_FLAG_ERROR) { ++ av_log(ctx->logctx, AV_LOG_ERROR, "driver decode error\n"); ++ frame->decode_error_flags |= FF_DECODE_ERROR_INVALID_BITSTREAM; ++ } ++ ++ av_log(ctx->logctx, AV_LOG_TRACE, ">>> %s: PTS=%"PRId64"\n", __func__, frame->pts); ++ return 0; ++} ++ ++static int deint_v4l2m2m_config_props(AVFilterLink *outlink) ++{ ++ AVFilterLink *inlink = outlink->src->inputs[0]; ++ AVFilterContext *avctx = outlink->src; ++ DeintV4L2M2MContext *priv = avctx->priv; ++ DeintV4L2M2MContextShared *ctx = priv->shared; ++ int ret; ++ ++ ctx->height = avctx->inputs[0]->h; ++ ctx->width = avctx->inputs[0]->w; ++ ++ if (ctx->filter_type == FILTER_V4L2_SCALE) { ++ if ((ret = ff_scale_eval_dimensions(priv, ++ priv->w_expr, priv->h_expr, ++ inlink, outlink, ++ &ctx->output_width, &ctx->output_height)) < 0) ++ return ret; ++ ++ ff_scale_adjust_dimensions(inlink, &ctx->output_width, &ctx->output_height, ++ priv->force_original_aspect_ratio, priv->force_divisible_by); ++ } ++ else { ++ ctx->output_width = ctx->width; ++ ctx->output_height = ctx->height; ++ } ++ ++ av_log(priv, AV_LOG_DEBUG, "%s: %dx%d->%dx%d FR: %d/%d->%d/%d\n", __func__, ++ ctx->width, ctx->height, ctx->output_width, ctx->output_height, ++ inlink->frame_rate.num, inlink->frame_rate.den, outlink->frame_rate.num, outlink->frame_rate.den); ++ ++ outlink->time_base = inlink->time_base; ++ outlink->w = ctx->output_width; ++ outlink->h = ctx->output_height; ++ outlink->format = inlink->format; ++ if (ctx->filter_type == FILTER_V4L2_DEINTERLACE && inlink->frame_rate.den != 0) ++ outlink->frame_rate = (AVRational){inlink->frame_rate.num * 2, inlink->frame_rate.den}; ++ ++ if (inlink->sample_aspect_ratio.num) ++ outlink->sample_aspect_ratio = av_mul_q((AVRational){outlink->h * inlink->w, outlink->w * inlink->h}, inlink->sample_aspect_ratio); ++ else ++ outlink->sample_aspect_ratio = inlink->sample_aspect_ratio; ++ ++ ret = deint_v4l2m2m_find_device(ctx); ++ if (ret) ++ return ret; ++ ++ if (inlink->hw_frames_ctx) { ++ ctx->hw_frames_ctx = av_buffer_ref(inlink->hw_frames_ctx); ++ if (!ctx->hw_frames_ctx) ++ return AVERROR(ENOMEM); ++ } ++ return 0; ++} ++ ++static uint32_t desc_pixelformat(const AVDRMFrameDescriptor * const drm_desc) ++{ ++ const uint64_t mod = drm_desc->objects[0].format_modifier; ++ const int is_linear = (mod == DRM_FORMAT_MOD_LINEAR || mod == DRM_FORMAT_MOD_INVALID); ++ ++ // Only currently support single object things ++ if (drm_desc->nb_objects != 1) ++ return 0; ++ ++ switch (drm_desc->layers[0].format) { ++ case DRM_FORMAT_YUV420: ++ return is_linear ? V4L2_PIX_FMT_YUV420 : 0; ++ case DRM_FORMAT_NV12: ++ return is_linear ? V4L2_PIX_FMT_NV12 : ++#if CONFIG_SAND ++ fourcc_mod_broadcom_mod(mod) == DRM_FORMAT_MOD_BROADCOM_SAND128 ? V4L2_PIX_FMT_NV12_COL128 : ++#endif ++ 0; ++ default: ++ break; ++ } ++ return 0; ++} ++ ++static int deint_v4l2m2m_filter_frame(AVFilterLink *link, AVFrame *in) ++{ ++ AVFilterContext *avctx = link->dst; ++ DeintV4L2M2MContext *priv = avctx->priv; ++ DeintV4L2M2MContextShared *ctx = priv->shared; ++ V4L2Queue *capture = &ctx->capture; ++ V4L2Queue *output = &ctx->output; ++ int ret; ++ ++ av_log(priv, AV_LOG_DEBUG, "<<< %s: input pts: %"PRId64" dts: %"PRId64" field :%d interlaced: %d aspect:%d/%d\n", ++ __func__, in->pts, in->pkt_dts, in->top_field_first, in->interlaced_frame, in->sample_aspect_ratio.num, in->sample_aspect_ratio.den); ++ av_log(priv, AV_LOG_DEBUG, "--- %s: in status in %d/ot %d; out status in %d/out %d\n", __func__, ++ avctx->inputs[0]->status_in, avctx->inputs[0]->status_out, avctx->outputs[0]->status_in, avctx->outputs[0]->status_out); ++ ++ if (ctx->field_order == V4L2_FIELD_ANY) { ++ const AVDRMFrameDescriptor * const drm_desc = (AVDRMFrameDescriptor *)in->data[0]; ++ uint32_t pixelformat = desc_pixelformat(drm_desc); ++ ++ if (pixelformat == 0) { ++ av_log(avctx, AV_LOG_ERROR, "Unsupported DRM format %s in %d objects, modifier %#" PRIx64 "\n", ++ av_fourcc2str(drm_desc->layers[0].format), ++ drm_desc->nb_objects, drm_desc->objects[0].format_modifier); ++ return AVERROR(EINVAL); ++ } ++ ++ ctx->orig_width = drm_desc->layers[0].planes[0].pitch; ++ ctx->orig_height = drm_desc->layers[0].planes[1].offset / ctx->orig_width; ++ ++ av_log(priv, AV_LOG_DEBUG, "%s: %dx%d (%td,%td)\n", __func__, ctx->width, ctx->height, ++ drm_desc->layers[0].planes[0].pitch, drm_desc->layers[0].planes[1].offset); ++ ++ if ((ret = set_src_fmt(output, in)) != 0) { ++ av_log(avctx, AV_LOG_WARNING, "Unknown input DRM format: %s mod: %#" PRIx64 "\n", ++ av_fourcc2str(drm_desc->layers[0].format), drm_desc->objects[0].format_modifier); ++ return ret; ++ } ++ ++ ret = do_s_fmt(output); ++ if (ret) { ++ av_log(avctx, AV_LOG_WARNING, "Failed to set source format\n"); ++ return ret; ++ } ++ ++ if (ctx->output_format != AV_PIX_FMT_NONE) ++ pixelformat = fmt_av_to_v4l2(ctx->output_format); ++ ret = set_dst_format(priv, capture, pixelformat, V4L2_FIELD_NONE, ctx->output_width, ctx->output_height); ++ if (ret) { ++ av_log(avctx, AV_LOG_WARNING, "Failed to set destination format\n"); ++ return ret; ++ } ++ ++ ret = deint_v4l2m2m_allocate_buffers(capture); ++ if (ret) { ++ av_log(avctx, AV_LOG_WARNING, "Failed to allocate destination buffers\n"); ++ return ret; ++ } ++ ++ ret = deint_v4l2m2m_streamon(capture); ++ if (ret) { ++ av_log(avctx, AV_LOG_WARNING, "Failed set destination streamon: %s\n", av_err2str(ret)); ++ return ret; ++ } ++ ++ ret = deint_v4l2m2m_allocate_buffers(output); ++ if (ret) { ++ av_log(avctx, AV_LOG_WARNING, "Failed to allocate src buffers\n"); ++ return ret; ++ } ++ ++ ret = deint_v4l2m2m_streamon(output); ++ if (ret) { ++ av_log(avctx, AV_LOG_WARNING, "Failed set src streamon: %s\n", av_err2str(ret)); ++ return ret; ++ } ++ ++ if (in->top_field_first) ++ ctx->field_order = V4L2_FIELD_INTERLACED_TB; ++ else ++ ctx->field_order = V4L2_FIELD_INTERLACED_BT; ++ ++ { ++ struct v4l2_encoder_cmd ecmd = { ++ .cmd = V4L2_ENC_CMD_STOP ++ }; ++ ctx->has_enc_stop = 0; ++ if (ioctl(ctx->fd, VIDIOC_TRY_ENCODER_CMD, &ecmd) == 0) { ++ av_log(ctx->logctx, AV_LOG_DEBUG, "Test encode stop succeeded\n"); ++ ctx->has_enc_stop = 1; ++ } ++ else { ++ av_log(ctx->logctx, AV_LOG_DEBUG, "Test encode stop fail: %s\n", av_err2str(AVERROR(errno))); ++ } ++ ++ } ++ } ++ ++ ret = deint_v4l2m2m_enqueue_frame(output, in); ++ ++ av_log(priv, AV_LOG_TRACE, ">>> %s: %s\n", __func__, av_err2str(ret)); ++ return ret; ++} ++ ++static int ++ack_inlink(AVFilterContext * const avctx, DeintV4L2M2MContextShared *const s, ++ AVFilterLink * const inlink) ++{ ++ int instatus; ++ int64_t inpts; ++ ++ if (ff_inlink_acknowledge_status(inlink, &instatus, &inpts) <= 0) ++ return 0; ++ ++ s->drain = instatus; ++ s->drain_pts = inpts; ++ s->drain_state = DRAIN_TIMEOUT; ++ ++ if (s->field_order == V4L2_FIELD_ANY) { // Not yet started ++ s->drain_state = DRAIN_DONE; ++ } ++ else if (s->one_to_one) { ++ s->drain_state = DRAIN_LAST; ++ } ++ else if (s->has_enc_stop) { ++ struct v4l2_encoder_cmd ecmd = { ++ .cmd = V4L2_ENC_CMD_STOP ++ }; ++ if (ioctl(s->fd, VIDIOC_ENCODER_CMD, &ecmd) == 0) { ++ av_log(avctx->priv, AV_LOG_DEBUG, "Do Encode stop\n"); ++ s->drain_state = DRAIN_EOS; ++ } ++ else { ++ av_log(avctx->priv, AV_LOG_WARNING, "Encode stop fail: %s\n", av_err2str(AVERROR(errno))); ++ } ++ } ++ return 1; ++} ++ ++static int deint_v4l2m2m_activate(AVFilterContext *avctx) ++{ ++ DeintV4L2M2MContext * const priv = avctx->priv; ++ DeintV4L2M2MContextShared *const s = priv->shared; ++ AVFilterLink * const outlink = avctx->outputs[0]; ++ AVFilterLink * const inlink = avctx->inputs[0]; ++ int n = 0; ++ int cn = 99; ++ int did_something = 0; ++ ++ av_log(priv, AV_LOG_TRACE, "<<< %s\n", __func__); ++ ++ FF_FILTER_FORWARD_STATUS_BACK_ALL(outlink, avctx); ++ ++ ack_inlink(avctx, s, inlink); ++ ++ if (s->field_order != V4L2_FIELD_ANY) // Can't DQ if no setup! ++ { ++ AVFrame * frame = av_frame_alloc(); ++ int rv; ++ ++ recycle_q(&s->output); ++ n = count_enqueued(&s->output); ++ ++ if (frame == NULL) { ++ av_log(priv, AV_LOG_ERROR, "%s: error allocating frame\n", __func__); ++ return AVERROR(ENOMEM); ++ } ++ ++ rv = deint_v4l2m2m_dequeue_frame(&s->capture, frame, ++ drain_frame_expected(s->drain_state) || n > 4 ? 300 : 0); ++ if (rv != 0) { ++ av_frame_free(&frame); ++ if (rv == AVERROR_EOF) { ++ av_log(priv, AV_LOG_DEBUG, "%s: --- DQ EOF\n", __func__); ++ s->drain_state = DRAIN_DONE; ++ } ++ else if (rv == AVERROR(EAGAIN)) { ++ if (s->drain_state != DRAIN_NONE) { ++ av_log(priv, AV_LOG_DEBUG, "%s: --- DQ empty - drain done\n", __func__); ++ s->drain_state = DRAIN_DONE; ++ } ++ } ++ else { ++ av_log(priv, AV_LOG_ERROR, ">>> %s: DQ fail: %s\n", __func__, av_err2str(rv)); ++ return rv; ++ } ++ } ++ else { ++ frame->interlaced_frame = 0; ++ // frame is always consumed by filter_frame - even on error despite ++ // a somewhat confusing comment in the header ++ rv = ff_filter_frame(outlink, frame); ++ ++s->frames_tx; ++ ++ av_log(priv, AV_LOG_TRACE, "%s: Filtered: %s\n", __func__, av_err2str(rv)); ++ did_something = 1; ++ ++ if (s->drain_state != DRAIN_NONE && pts_track_count(&s->track) == 0) { ++ av_log(priv, AV_LOG_DEBUG, "%s: --- DQ last - drain done\n", __func__); ++ s->drain_state = DRAIN_DONE; ++ } ++ } ++ ++ cn = count_enqueued(&s->capture); ++ } ++ ++ if (s->drain_state == DRAIN_DONE) { ++ ff_outlink_set_status(outlink, s->drain, s->drain_pts); ++ av_log(priv, AV_LOG_TRACE, ">>> %s: Status done: %s\n", __func__, av_err2str(s->drain)); ++ return 0; ++ } ++ ++ recycle_q(&s->output); ++ n = count_enqueued(&s->output); ++ ++ while (n < 6 && !s->drain) { ++ AVFrame * frame; ++ int rv; ++ ++ if ((rv = ff_inlink_consume_frame(inlink, &frame)) < 0) { ++ av_log(priv, AV_LOG_ERROR, "%s: consume in failed: %s\n", __func__, av_err2str(rv)); ++ return rv; ++ } ++ ++ if (frame == NULL) { ++ av_log(priv, AV_LOG_TRACE, "%s: No frame\n", __func__); ++ if (!ack_inlink(avctx, s, inlink)) { ++ ff_inlink_request_frame(inlink); ++ av_log(priv, AV_LOG_TRACE, "%s: req frame\n", __func__); ++ } ++ break; ++ } ++ ++s->frames_rx; ++ ++ rv = deint_v4l2m2m_filter_frame(inlink, frame); ++ av_frame_free(&frame); ++ ++ if (rv != 0) ++ return rv; ++ ++ av_log(priv, AV_LOG_TRACE, "%s: Q frame\n", __func__); ++ did_something = 1; ++ ++n; ++ } ++ ++ if ((n > 4 || s->drain) && ff_outlink_frame_wanted(outlink)) { ++ ff_filter_set_ready(avctx, 1); ++ did_something = 1; ++ av_log(priv, AV_LOG_TRACE, "%s: ready\n", __func__); ++ } ++ ++ av_log(priv, AV_LOG_TRACE, ">>> %s: OK (n=%d, cn=%d)\n", __func__, n, cn); ++ return did_something ? 0 : FFERROR_NOT_READY; ++} ++ ++static av_cold int common_v4l2m2m_init(AVFilterContext * const avctx, const filter_type_v4l2_t filter_type) ++{ ++ DeintV4L2M2MContext * const priv = avctx->priv; ++ DeintV4L2M2MContextShared * const ctx = av_mallocz(sizeof(DeintV4L2M2MContextShared)); ++ ++ if (!ctx) { ++ av_log(priv, AV_LOG_ERROR, "%s: error %d allocating context\n", __func__, 0); ++ return AVERROR(ENOMEM); ++ } ++ priv->shared = ctx; ++ ctx->logctx = priv; ++ ctx->filter_type = filter_type; ++ ctx->fd = -1; ++ ctx->output.ctx = ctx; ++ ctx->output.num_buffers = 8; ++ ctx->output.name = "OUTPUT"; ++ ctx->capture.ctx = ctx; ++ ctx->capture.num_buffers = 12; ++ ctx->capture.name = "CAPTURE"; ++ ctx->done = 0; ++ ctx->field_order = V4L2_FIELD_ANY; ++ ++ pts_track_init(&ctx->track, priv); ++ ++ atomic_init(&ctx->refcount, 1); ++ ++ if (priv->output_format_string) { ++ ctx->output_format = av_get_pix_fmt(priv->output_format_string); ++ if (ctx->output_format == AV_PIX_FMT_NONE) { ++ av_log(avctx, AV_LOG_ERROR, "Invalid ffmpeg output format '%s'.\n", priv->output_format_string); ++ return AVERROR(EINVAL); ++ } ++ if (fmt_av_to_v4l2(ctx->output_format) == 0) { ++ av_log(avctx, AV_LOG_ERROR, "Unsupported output format for V4L2: %s.\n", av_get_pix_fmt_name(ctx->output_format)); ++ return AVERROR(EINVAL); ++ } ++ } else { ++ // Use the input format once that is configured. ++ ctx->output_format = AV_PIX_FMT_NONE; ++ } ++ ++#define STRING_OPTION(var_name, func_name, default_value) do { \ ++ if (priv->var_name ## _string) { \ ++ int var = av_ ## func_name ## _from_name(priv->var_name ## _string); \ ++ if (var < 0) { \ ++ av_log(avctx, AV_LOG_ERROR, "Invalid %s.\n", #var_name); \ ++ return AVERROR(EINVAL); \ ++ } \ ++ priv->var_name = var; \ ++ } else { \ ++ priv->var_name = default_value; \ ++ } \ ++ } while (0) ++ ++ STRING_OPTION(colour_primaries, color_primaries, AVCOL_PRI_UNSPECIFIED); ++ STRING_OPTION(colour_transfer, color_transfer, AVCOL_TRC_UNSPECIFIED); ++ STRING_OPTION(colour_matrix, color_space, AVCOL_SPC_UNSPECIFIED); ++ STRING_OPTION(chroma_location, chroma_location, AVCHROMA_LOC_UNSPECIFIED); ++ ++ return 0; ++} ++ ++static av_cold int deint_v4l2m2m_init(AVFilterContext *avctx) ++{ ++ return common_v4l2m2m_init(avctx, FILTER_V4L2_DEINTERLACE); ++} ++ ++static av_cold int scale_v4l2m2m_init(AVFilterContext *avctx) ++{ ++ int rv; ++ DeintV4L2M2MContext * priv; ++ DeintV4L2M2MContextShared * ctx; ++ ++ if ((rv = common_v4l2m2m_init(avctx, FILTER_V4L2_SCALE)) != 0) ++ return rv; ++ ++ priv = avctx->priv; ++ ctx = priv->shared; ++ ++ ctx->one_to_one = 1; ++ return 0; ++} ++ ++static void deint_v4l2m2m_uninit(AVFilterContext *avctx) ++{ ++ DeintV4L2M2MContext *priv = avctx->priv; ++ DeintV4L2M2MContextShared *ctx = priv->shared; ++ ++ av_log(priv, AV_LOG_VERBOSE, "Frames Rx: %u, Frames Tx: %u\n", ++ ctx->frames_rx, ctx->frames_tx); ++ ctx->done = 1; ++ ctx->logctx = NULL; // Log to NULL works, log to missing crashes ++ pts_track_uninit(&ctx->track); ++ deint_v4l2m2m_destroy_context(ctx); ++} ++ ++static const AVOption deinterlace_v4l2m2m_options[] = { ++ { NULL }, ++}; ++ ++AVFILTER_DEFINE_CLASS(deinterlace_v4l2m2m); ++ ++#define OFFSET(x) offsetof(DeintV4L2M2MContext, x) ++#define FLAGS (AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM) ++ ++static const AVOption scale_v4l2m2m_options[] = { ++ { "w", "Output video width", ++ OFFSET(w_expr), AV_OPT_TYPE_STRING, {.str = "iw"}, .flags = FLAGS }, ++ { "h", "Output video height", ++ OFFSET(h_expr), AV_OPT_TYPE_STRING, {.str = "ih"}, .flags = FLAGS }, ++ { "format", "Output video format (software format of hardware frames)", ++ OFFSET(output_format_string), AV_OPT_TYPE_STRING, .flags = FLAGS }, ++ // These colour properties match the ones of the same name in vf_scale. ++ { "out_color_matrix", "Output colour matrix coefficient set", ++ OFFSET(colour_matrix_string), AV_OPT_TYPE_STRING, { .str = NULL }, .flags = FLAGS }, ++ { "out_range", "Output colour range", ++ OFFSET(colour_range), AV_OPT_TYPE_INT, { .i64 = AVCOL_RANGE_UNSPECIFIED }, ++ AVCOL_RANGE_UNSPECIFIED, AVCOL_RANGE_JPEG, FLAGS, "range" }, ++ { "full", "Full range", ++ 0, AV_OPT_TYPE_CONST, { .i64 = AVCOL_RANGE_JPEG }, 0, 0, FLAGS, "range" }, ++ { "limited", "Limited range", ++ 0, AV_OPT_TYPE_CONST, { .i64 = AVCOL_RANGE_MPEG }, 0, 0, FLAGS, "range" }, ++ { "jpeg", "Full range", ++ 0, AV_OPT_TYPE_CONST, { .i64 = AVCOL_RANGE_JPEG }, 0, 0, FLAGS, "range" }, ++ { "mpeg", "Limited range", ++ 0, AV_OPT_TYPE_CONST, { .i64 = AVCOL_RANGE_MPEG }, 0, 0, FLAGS, "range" }, ++ { "tv", "Limited range", ++ 0, AV_OPT_TYPE_CONST, { .i64 = AVCOL_RANGE_MPEG }, 0, 0, FLAGS, "range" }, ++ { "pc", "Full range", ++ 0, AV_OPT_TYPE_CONST, { .i64 = AVCOL_RANGE_JPEG }, 0, 0, FLAGS, "range" }, ++ // These colour properties match the ones in the VAAPI scaler ++ { "out_color_primaries", "Output colour primaries", ++ OFFSET(colour_primaries_string), AV_OPT_TYPE_STRING, ++ { .str = NULL }, .flags = FLAGS }, ++ { "out_color_transfer", "Output colour transfer characteristics", ++ OFFSET(colour_transfer_string), AV_OPT_TYPE_STRING, ++ { .str = NULL }, .flags = FLAGS }, ++ { "out_chroma_location", "Output chroma sample location", ++ OFFSET(chroma_location_string), AV_OPT_TYPE_STRING, ++ { .str = NULL }, .flags = FLAGS }, ++ { "force_original_aspect_ratio", "decrease or increase w/h if necessary to keep the original AR", OFFSET(force_original_aspect_ratio), AV_OPT_TYPE_INT, { .i64 = 0}, 0, 2, FLAGS, "force_oar" }, ++ { "force_divisible_by", "enforce that the output resolution is divisible by a defined integer when force_original_aspect_ratio is used", OFFSET(force_divisible_by), AV_OPT_TYPE_INT, { .i64 = 1}, 1, 256, FLAGS }, ++ { NULL }, ++}; ++ ++AVFILTER_DEFINE_CLASS(scale_v4l2m2m); ++ ++static const AVFilterPad deint_v4l2m2m_inputs[] = { ++ { ++ .name = "default", ++ .type = AVMEDIA_TYPE_VIDEO, ++ }, ++}; ++ ++static const AVFilterPad deint_v4l2m2m_outputs[] = { ++ { ++ .name = "default", ++ .type = AVMEDIA_TYPE_VIDEO, ++ .config_props = deint_v4l2m2m_config_props, ++ }, ++}; ++ ++AVFilter ff_vf_deinterlace_v4l2m2m = { ++ .name = "deinterlace_v4l2m2m", ++ .description = NULL_IF_CONFIG_SMALL("V4L2 M2M deinterlacer"), ++ .priv_size = sizeof(DeintV4L2M2MContext), ++ .init = &deint_v4l2m2m_init, ++ .uninit = &deint_v4l2m2m_uninit, ++ FILTER_INPUTS(deint_v4l2m2m_inputs), ++ FILTER_OUTPUTS(deint_v4l2m2m_outputs), ++ FILTER_SINGLE_SAMPLEFMT(AV_PIX_FMT_DRM_PRIME), ++ .priv_class = &deinterlace_v4l2m2m_class, ++ .activate = deint_v4l2m2m_activate, ++}; ++ ++AVFilter ff_vf_scale_v4l2m2m = { ++ .name = "scale_v4l2m2m", ++ .description = NULL_IF_CONFIG_SMALL("V4L2 M2M scaler"), ++ .priv_size = sizeof(DeintV4L2M2MContext), ++ .init = &scale_v4l2m2m_init, ++ .uninit = &deint_v4l2m2m_uninit, ++ FILTER_INPUTS(deint_v4l2m2m_inputs), ++ FILTER_OUTPUTS(deint_v4l2m2m_outputs), ++ FILTER_SINGLE_SAMPLEFMT(AV_PIX_FMT_DRM_PRIME), ++ .priv_class = &scale_v4l2m2m_class, ++ .activate = deint_v4l2m2m_activate, ++}; ++ +--- /dev/null ++++ b/libavfilter/vf_unsand.c +@@ -0,0 +1,228 @@ ++/* ++ * Copyright (c) 2007 Bobby Bingham ++ * ++ * This file is part of FFmpeg. ++ * ++ * FFmpeg is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation; either ++ * version 2.1 of the License, or (at your option) any later version. ++ * ++ * FFmpeg is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with FFmpeg; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ++ */ ++ ++/** ++ * @file ++ * format and noformat video filters ++ */ ++ ++#include ++ ++#include "libavutil/internal.h" ++#include "libavutil/mem.h" ++#include "libavutil/pixdesc.h" ++#include "libavutil/opt.h" ++#include "libavutil/rpi_sand_fns.h" ++ ++#include "avfilter.h" ++#include "formats.h" ++#include "internal.h" ++#include "video.h" ++ ++typedef struct UnsandContext { ++ const AVClass *class; ++} UnsandContext; ++ ++static av_cold void uninit(AVFilterContext *ctx) ++{ ++// UnsandContext *s = ctx->priv; ++} ++ ++static av_cold int init(AVFilterContext *ctx) ++{ ++// UnsandContext *s = ctx->priv; ++ ++ return 0; ++} ++ ++ ++static int filter_frame(AVFilterLink *link, AVFrame *in) ++{ ++ AVFilterLink * const outlink = link->dst->outputs[0]; ++ AVFrame *out = NULL; ++ int rv = 0; ++ ++ if (outlink->format == in->format) { ++ // If nothing to do then do nothing ++ out = in; ++ } ++ else ++ { ++ if ((out = ff_get_video_buffer(outlink, av_frame_cropped_width(in), av_frame_cropped_height(in))) == NULL) ++ { ++ rv = AVERROR(ENOMEM); ++ goto fail; ++ } ++ if (av_rpi_sand_to_planar_frame(out, in) != 0) ++ { ++ rv = -1; ++ goto fail; ++ } ++ ++ av_frame_free(&in); ++ } ++ ++ return ff_filter_frame(outlink, out); ++ ++fail: ++ av_frame_free(&out); ++ av_frame_free(&in); ++ return rv; ++} ++ ++#if 0 ++static void dump_fmts(const AVFilterFormats * fmts) ++{ ++ int i; ++ if (fmts== NULL) { ++ printf("NULL\n"); ++ return; ++ } ++ for (i = 0; i < fmts->nb_formats; ++i) { ++ printf(" %d", fmts->formats[i]); ++ } ++ printf("\n"); ++} ++#endif ++ ++static int query_formats(AVFilterContext *ctx) ++{ ++// UnsandContext *s = ctx->priv; ++ int ret; ++ ++ // If we aren't connected at both ends then just do nothing ++ if (ctx->inputs[0] == NULL || ctx->outputs[0] == NULL) ++ return 0; ++ ++ // Our output formats depend on our input formats and we can't/don't ++ // want to convert between bit depths so we need to wait for the source ++ // to have an opinion before we do ++ if (ctx->inputs[0]->incfg.formats == NULL) ++ return AVERROR(EAGAIN); ++ ++ // Accept anything ++ if (ctx->inputs[0]->outcfg.formats == NULL && ++ (ret = ff_formats_ref(ctx->inputs[0]->incfg.formats, &ctx->inputs[0]->outcfg.formats)) < 0) ++ return ret; ++ ++ // Filter out sand formats ++ ++ // Generate a container if we don't already have one ++ if (ctx->outputs[0]->incfg.formats == NULL) ++ { ++ // Somewhat rubbish way of ensuring we have a good structure ++ const static enum AVPixelFormat out_fmts[] = {AV_PIX_FMT_YUV420P10, AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE}; ++ AVFilterFormats *formats = ff_make_format_list(out_fmts); ++ ++ if (formats == NULL) ++ return AVERROR(ENOMEM); ++ if ((ret = ff_formats_ref(formats, &ctx->outputs[0]->incfg.formats)) < 0) ++ return ret; ++ } ++ ++ // Replace old format list with new filtered list derived from what our ++ // input says it can do ++ { ++ const AVFilterFormats * const src_ff = ctx->inputs[0]->outcfg.formats; ++ AVFilterFormats * const dst_ff = ctx->outputs[0]->incfg.formats; ++ enum AVPixelFormat *dst_fmts = av_malloc(sizeof(enum AVPixelFormat) * src_ff->nb_formats); ++ int i; ++ int n = 0; ++ int seen_420p = 0; ++ int seen_420p10 = 0; ++ ++ for (i = 0; i < src_ff->nb_formats; ++i) { ++ const enum AVPixelFormat f = src_ff->formats[i]; ++ ++ switch (f){ ++ case AV_PIX_FMT_YUV420P: ++ case AV_PIX_FMT_SAND128: ++ case AV_PIX_FMT_RPI4_8: ++ if (!seen_420p) { ++ seen_420p = 1; ++ dst_fmts[n++] = AV_PIX_FMT_YUV420P; ++ } ++ break; ++ case AV_PIX_FMT_SAND64_10: ++ case AV_PIX_FMT_YUV420P10: ++ case AV_PIX_FMT_RPI4_10: ++ if (!seen_420p10) { ++ seen_420p10 = 1; ++ dst_fmts[n++] = AV_PIX_FMT_YUV420P10; ++ } ++ break; ++ default: ++ dst_fmts[n++] = f; ++ break; ++ } ++ } ++ ++ av_freep(&dst_ff->formats); ++ dst_ff->formats = dst_fmts; ++ dst_ff->nb_formats = n; ++ } ++ ++// printf("Unsand: %s calc: ", __func__); ++// dump_fmts(ctx->outputs[0]->incfg.formats); ++ ++ return 0; ++} ++ ++ ++#define OFFSET(x) offsetof(UnsandContext, x) ++static const AVOption unsand_options[] = { ++ { NULL } ++}; ++ ++ ++AVFILTER_DEFINE_CLASS(unsand); ++ ++static const AVFilterPad avfilter_vf_unsand_inputs[] = { ++ { ++ .name = "default", ++ .type = AVMEDIA_TYPE_VIDEO, ++ .filter_frame = filter_frame, ++ }, ++ { NULL } ++}; ++ ++static const AVFilterPad avfilter_vf_unsand_outputs[] = { ++ { ++ .name = "default", ++ .type = AVMEDIA_TYPE_VIDEO ++ }, ++}; ++ ++AVFilter ff_vf_unsand = { ++ .name = "unsand", ++ .description = NULL_IF_CONFIG_SMALL("Convert sand pix fmt to yuv"), ++ ++ .init = init, ++ .uninit = uninit, ++ ++ FILTER_QUERY_FUNC(query_formats), ++ ++ .priv_size = sizeof(UnsandContext), ++ .priv_class = &unsand_class, ++ ++ FILTER_INPUTS(avfilter_vf_unsand_inputs), ++ FILTER_OUTPUTS(avfilter_vf_unsand_outputs), ++}; ++ +--- a/libavfilter/x86/vf_bwdif_init.c ++++ b/libavfilter/x86/vf_bwdif_init.c +@@ -42,11 +42,9 @@ void ff_bwdif_filter_line_12bit_ssse3(vo + int mrefs2, int prefs3, int mrefs3, int prefs4, + int mrefs4, int parity, int clip_max); + +-av_cold void ff_bwdif_init_x86(BWDIFContext *bwdif) ++av_cold void ff_bwdif_init_x86(BWDIFContext *bwdif, int bit_depth) + { +- YADIFContext *yadif = &bwdif->yadif; + int cpu_flags = av_get_cpu_flags(); +- int bit_depth = (!yadif->csp) ? 8 : yadif->csp->comp[0].depth; + + if (bit_depth <= 8) { + if (EXTERNAL_SSE2(cpu_flags)) +--- a/libavformat/matroskaenc.c ++++ b/libavformat/matroskaenc.c +@@ -75,6 +75,10 @@ + + #define IS_WEBM(mkv) (CONFIG_WEBM_MUXER && CONFIG_MATROSKA_MUXER ? \ + ((mkv)->mode == MODE_WEBM) : CONFIG_WEBM_MUXER) ++ ++/* Reserved size for H264 headers if not extant at init time */ ++#define MAX_H264_HEADER_SIZE 1024 ++ + #define IS_SEEKABLE(pb, mkv) (((pb)->seekable & AVIO_SEEKABLE_NORMAL) && \ + !(mkv)->is_live) + +@@ -1119,8 +1123,12 @@ static int mkv_assemble_native_codecpriv + case AV_CODEC_ID_WAVPACK: + return put_wv_codecpriv(dyn_cp, extradata, extradata_size); + case AV_CODEC_ID_H264: +- return ff_isom_write_avcc(dyn_cp, extradata, +- extradata_size); ++ if (extradata_size) ++ return ff_isom_write_avcc(dyn_cp, extradata, ++ extradata_size); ++ else ++ *size_to_reserve = MAX_H264_HEADER_SIZE; ++ break; + case AV_CODEC_ID_HEVC: + return ff_isom_write_hvcc(dyn_cp, extradata, + extradata_size, 0); +@@ -2726,8 +2734,8 @@ static int mkv_check_new_extra_data(AVFo + } + break; + #endif +- // FIXME: Remove the following once libaom starts propagating proper extradata during init() +- // See https://bugs.chromium.org/p/aomedia/issues/detail?id=2208 ++ // FIXME: Remove the following once libaom starts propagating extradata during init() ++ // See https://bugs.chromium.org/p/aomedia/issues/detail?id=2012 + case AV_CODEC_ID_AV1: + if (side_data_size && mkv->track.bc && !par->extradata_size) { + // If the reserved space doesn't suffice, only write +@@ -2739,6 +2747,16 @@ static int mkv_check_new_extra_data(AVFo + } else if (!par->extradata_size) + return AVERROR_INVALIDDATA; + break; ++ // H264 V4L2 has a similar issue ++ case AV_CODEC_ID_H264: ++ if (side_data_size && mkv->track.bc && !par->extradata_size) { ++ ret = mkv_update_codecprivate(s, mkv, side_data, side_data_size, ++ par, mkv->track.bc, track, 0); ++ if (ret < 0) ++ return ret; ++ } else if (!par->extradata_size) ++ return AVERROR_INVALIDDATA; ++ break; + default: + if (side_data_size) + av_log(s, AV_LOG_DEBUG, "Ignoring new extradata in a packet for stream %d.\n", pkt->stream_index); +@@ -3171,9 +3189,15 @@ static int mkv_init(struct AVFormatConte + track->reformat = mkv_reformat_wavpack; + break; + case AV_CODEC_ID_H264: ++ // Default to reformat if no extradata as the only current ++ // encoder which does this is v4l2m2m which needs reformat ++ if (par->extradata_size == 0 || ++ (par->extradata_size > 3 && ++ (AV_RB24(par->extradata) == 1 || AV_RB32(par->extradata) == 1))) ++ track->reformat = mkv_reformat_h2645; ++ break; + case AV_CODEC_ID_HEVC: +- if ((par->codec_id == AV_CODEC_ID_H264 && par->extradata_size > 0 || +- par->codec_id == AV_CODEC_ID_HEVC && par->extradata_size > 6) && ++ if (par->extradata_size > 6 && + (AV_RB24(par->extradata) == 1 || AV_RB32(par->extradata) == 1)) + track->reformat = mkv_reformat_h2645; + break; +--- a/libavformat/movenc.c ++++ b/libavformat/movenc.c +@@ -6318,6 +6318,7 @@ static int mov_write_single_packet(AVFor + if (trk->par->codec_id == AV_CODEC_ID_MP4ALS || + trk->par->codec_id == AV_CODEC_ID_AAC || + trk->par->codec_id == AV_CODEC_ID_AV1 || ++ trk->par->codec_id == AV_CODEC_ID_H264 || + trk->par->codec_id == AV_CODEC_ID_FLAC) { + size_t side_size; + uint8_t *side = av_packet_get_side_data(pkt, AV_PKT_DATA_NEW_EXTRADATA, &side_size); +--- a/libavformat/rtpenc.c ++++ b/libavformat/rtpenc.c +@@ -19,6 +19,7 @@ + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + ++#include "avc.h" + #include "avformat.h" + #include "mpegts.h" + #include "internal.h" +@@ -584,8 +585,25 @@ static int rtp_write_packet(AVFormatCont + ff_rtp_send_vc2hq(s1, pkt->data, size, st->codecpar->field_order != AV_FIELD_PROGRESSIVE ? 1 : 0); + break; + case AV_CODEC_ID_H264: ++ { ++ uint8_t *side_data; ++ size_t side_data_size = 0; ++ ++ side_data = av_packet_get_side_data(pkt, AV_PKT_DATA_NEW_EXTRADATA, ++ &side_data_size); ++ ++ if (side_data_size != 0) { ++ int ps_size = side_data_size; ++ uint8_t * ps_buf = NULL; ++ ++ ff_avc_write_annexb_extradata(side_data, &ps_buf, &ps_size); ++ av_log(s1, AV_LOG_TRACE, "H264: write side data=%d\n", ps_size); ++ ff_rtp_send_h264_hevc(s1, ps_buf ? ps_buf : side_data, ps_size); ++ av_free(ps_buf); ++ } + ff_rtp_send_h264_hevc(s1, pkt->data, size); + break; ++ } + case AV_CODEC_ID_H261: + ff_rtp_send_h261(s1, pkt->data, size); + break; +--- a/libavutil/Makefile ++++ b/libavutil/Makefile +@@ -72,6 +72,7 @@ HEADERS = adler32.h + rational.h \ + replaygain.h \ + ripemd.h \ ++ rpi_sand_fns.h \ + samplefmt.h \ + sha.h \ + sha512.h \ +@@ -191,6 +192,7 @@ OBJS-$(CONFIG_MACOS_KPERF) + OBJS-$(CONFIG_MEDIACODEC) += hwcontext_mediacodec.o + OBJS-$(CONFIG_OPENCL) += hwcontext_opencl.o + OBJS-$(CONFIG_QSV) += hwcontext_qsv.o ++OBJS-$(CONFIG_SAND) += rpi_sand_fns.o + OBJS-$(CONFIG_VAAPI) += hwcontext_vaapi.o + OBJS-$(CONFIG_VIDEOTOOLBOX) += hwcontext_videotoolbox.o + OBJS-$(CONFIG_VDPAU) += hwcontext_vdpau.o +@@ -211,6 +213,7 @@ SKIPHEADERS-$(CONFIG_D3D11VA) + + SKIPHEADERS-$(CONFIG_DXVA2) += hwcontext_dxva2.h + SKIPHEADERS-$(CONFIG_QSV) += hwcontext_qsv.h + SKIPHEADERS-$(CONFIG_OPENCL) += hwcontext_opencl.h ++SKIPHEADERS-$(CONFIG-RPI) += rpi_sand_fn_pw.h + SKIPHEADERS-$(CONFIG_VAAPI) += hwcontext_vaapi.h + SKIPHEADERS-$(CONFIG_VIDEOTOOLBOX) += hwcontext_videotoolbox.h + SKIPHEADERS-$(CONFIG_VDPAU) += hwcontext_vdpau.h +--- a/libavutil/aarch64/Makefile ++++ b/libavutil/aarch64/Makefile +@@ -1,4 +1,6 @@ + OBJS += aarch64/cpu.o \ + aarch64/float_dsp_init.o \ + +-NEON-OBJS += aarch64/float_dsp_neon.o ++NEON-OBJS += aarch64/float_dsp_neon.o \ ++ aarch64/rpi_sand_neon.o \ ++ +--- /dev/null ++++ b/libavutil/aarch64/rpi_sand_neon.S +@@ -0,0 +1,672 @@ ++/* ++Copyright (c) 2021 Michael Eiler ++ ++Redistribution and use in source and binary forms, with or without ++modification, are permitted provided that the following conditions are met: ++ * Redistributions of source code must retain the above copyright ++ notice, this list of conditions and the following disclaimer. ++ * Redistributions in binary form must reproduce the above copyright ++ notice, this list of conditions and the following disclaimer in the ++ documentation and/or other materials provided with the distribution. ++ * Neither the name of the copyright holder nor the ++ names of its contributors may be used to endorse or promote products ++ derived from this software without specific prior written permission. ++ ++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ++ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED ++WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE ++DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY ++DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES ++(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ++LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ++ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ++SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ ++Authors: Michael Eiler ++*/ ++ ++#include "asm.S" ++ ++// void ff_rpi_sand8_lines_to_planar_y8( ++// uint8_t * dest, : x0 ++// unsigned int dst_stride, : w1 ++// const uint8_t * src, : x2 ++// unsigned int src_stride1, : w3, always 128 ++// unsigned int src_stride2, : w4 ++// unsigned int _x, : w5 ++// unsigned int y, : w6 ++// unsigned int _w, : w7 ++// unsigned int h); : [sp, #0] ++ ++function ff_rpi_sand8_lines_to_planar_y8, export=1 ++ // w15 contains the number of rows we need to process ++ ldr w15, [sp, #0] ++ ++ // w8 will contain the number of blocks per row ++ // w8 = floor(_w/stride1) ++ // stride1 is assumed to always be 128 ++ mov w8, w1 ++ lsr w8, w8, #7 ++ ++ // in case the width of the image is not a multiple of 128, there will ++ // be an incomplete block at the end of every row ++ // w9 contains the number of pixels stored within this block ++ // w9 = _w - w8 * 128 ++ lsl w9, w8, #7 ++ sub w9, w7, w9 ++ ++ // this is the value we have to add to the src pointer after reading a complete block ++ // it will move the address to the start of the next block ++ // w10 = stride2 * stride1 - stride1 ++ mov w10, w4 ++ lsl w10, w10, #7 ++ sub w10, w10, #128 ++ ++ // w11 is the row offset, meaning the start offset of the first block of every collumn ++ // this will be increased with stride1 within every iteration of the row_loop ++ eor w11, w11, w11 ++ ++ // w12 = 0, processed row count ++ eor w12, w12, w12 ++row_loop: ++ // start of the first block within the current row ++ // x13 = row offset + src ++ mov x13, x2 ++ add x13, x13, x11 ++ ++ // w14 = 0, processed block count ++ eor w14, w14, w14 ++ ++ cmp w8, #0 ++ beq no_main_y8 ++ ++block_loop: ++ // copy 128 bytes (a full block) into the vector registers v0-v7 and increase the src address by 128 ++ // fortunately these aren't callee saved ones, meaning we don't need to backup them ++ ld1 { v0.16b, v1.16b, v2.16b, v3.16b}, [x13], #64 ++ ld1 { v4.16b, v5.16b, v6.16b, v7.16b}, [x13], #64 ++ ++ // write these registers back to the destination vector and increase the dst address by 128 ++ st1 { v0.16b, v1.16b, v2.16b, v3.16b }, [x0], #64 ++ st1 { v4.16b, v5.16b, v6.16b, v7.16b }, [x0], #64 ++ ++ // move the source register to the beginning of the next block (x13 = src + block offset) ++ add x13, x13, x10 ++ // increase the block counter ++ add w14, w14, #1 ++ ++ // continue with the block_loop if we haven't copied all full blocks yet ++ cmp w8, w14 ++ bgt block_loop ++ ++ // handle the last block at the end of each row ++ // at most 127 byte values copied from src to dst ++no_main_y8: ++ eor w5, w5, w5 // i = 0 ++incomplete_block_loop_y8: ++ cmp w5, w9 ++ bge incomplete_block_loop_end_y8 ++ ++ ldrb w6, [x13] ++ strb w6, [x0] ++ add x13, x13, #1 ++ add x0, x0, #1 ++ ++ add w5, w5, #1 ++ b incomplete_block_loop_y8 ++incomplete_block_loop_end_y8: ++ ++ ++ // increase the row offset by 128 (stride1) ++ add w11, w11, #128 ++ // increment the row counter ++ add w12, w12, #1 ++ ++ // process the next row if we haven't finished yet ++ cmp w15, w12 ++ bgt row_loop ++ ++ ret ++endfunc ++ ++ ++ ++// void ff_rpi_sand8_lines_to_planar_c8( ++// uint8_t * dst_u, : x0 ++// unsigned int dst_stride_u, : w1 == width ++// uint8_t * dst_v, : x2 ++// unsigned int dst_stride_v, : w3 == width ++// const uint8_t * src, : x4 ++// unsigned int stride1, : w5 == 128 ++// unsigned int stride2, : w6 ++// unsigned int _x, : w7 ++// unsigned int y, : [sp, #0] ++// unsigned int _w, : [sp, #8] ++// unsigned int h); : [sp, #16] ++ ++function ff_rpi_sand8_lines_to_planar_c8, export=1 ++ // w7 = width ++ ldr w7, [sp, #8] ++ ++ // w15 contains the number of rows we need to process ++ // counts down ++ ldr w15, [sp, #16] ++ ++ // number of full blocks, w8 = _w / (stride1 >> 1) == _w / 64 == _w >> 6 ++ mov w8, w7 ++ lsr w8, w8, #6 ++ ++ // number of pixels in block at the end of every row ++ // w9 = _w - (w8 * 64) ++ lsl w9, w8, #6 ++ sub w9, w7, w9 ++ ++ // Skip at the end of the line to account for stride ++ sub w12, w1, w7 ++ ++ // address delta to the beginning of the next block ++ // w10 = (stride2 * stride1 - stride1) = stride2 * 128 - 128 ++ lsl w10, w6, #7 ++ sub w10, w10, #128 ++ ++ // w11 = row address start offset = 0 ++ eor w11, w11, w11 ++ ++row_loop_c8: ++ // start of the first block within the current row ++ // x13 = row offset + src ++ mov x13, x4 ++ add x13, x13, x11 ++ ++ // w14 = 0, processed block count ++ eor w14, w14, w14 ++ ++ cmp w8, #0 ++ beq no_main_c8 ++ ++block_loop_c8: ++ // load the full block -> 128 bytes, the block contains 64 interleaved U and V values ++ ld2 { v0.16b, v1.16b }, [x13], #32 ++ ld2 { v2.16b, v3.16b }, [x13], #32 ++ ld2 { v4.16b, v5.16b }, [x13], #32 ++ ld2 { v6.16b, v7.16b }, [x13], #32 ++ ++ // swap register so that we can write them out with a single instruction ++ mov v16.16b, v1.16b ++ mov v17.16b, v3.16b ++ mov v18.16b, v5.16b ++ mov v1.16b, v2.16b ++ mov v2.16b, v4.16b ++ mov v3.16b, v6.16b ++ mov v4.16b, v16.16b ++ mov v5.16b, v17.16b ++ mov v6.16b, v18.16b ++ ++ st1 { v0.16b, v1.16b, v2.16b, v3.16b }, [x0], #64 ++ st1 { v4.16b, v5.16b, v6.16b, v7.16b }, [x2], #64 ++ ++ // increment row counter and move src to the beginning of the next block ++ add w14, w14, #1 ++ add x13, x13, x10 ++ ++ // jump to block_loop_c8 iff the block count is smaller than the number of full blocks ++ cmp w8, w14 ++ bgt block_loop_c8 ++ ++no_main_c8: ++ // handle incomplete block at the end of every row ++ eor w5, w5, w5 // point counter, this might be ++incomplete_block_loop_c8: ++ cmp w5, w9 ++ bge incomplete_block_loop_end_c8 ++ ++ ldrb w1, [x13] ++ strb w1, [x0] ++ add x13, x13, #1 ++ ++ ldrb w1, [x13] ++ strb w1, [x2] ++ add x13, x13, #1 ++ ++ add x0, x0, #1 ++ add x2, x2, #1 ++ ++ add w5, w5, #1 ++ b incomplete_block_loop_c8 ++incomplete_block_loop_end_c8: ++ ++ // increase row_offset by stride1 ++ add w11, w11, #128 ++ add x0, x0, w12, sxtw ++ add x2, x2, w12, sxtw ++ ++ // jump to row_Loop_c8 iff the row count is small than the height ++ subs w15, w15, #1 ++ bgt row_loop_c8 ++ ++ ret ++endfunc ++ ++// Unzip chroma ++// ++// On entry: ++// a0 = V0, U2, ... ++// a1 = U0, V1, ... ++// a2 = U1, V2, ... ++// b0 = V8, U10, ... ++// b1 = U8, V9, ... ++// b2 = U9, V10, ... ++// ++// On exit: ++// d0 = U0, U3, ... ++// ... ++// a0 = V0, V3, .. ++// ... ++// ++// Reg order for USAND is a1, a0, a2 (i.e. swap natural order of 1st 2 dest regs) ++ ++.macro UZPH_C d0, d1, d2, a0, a1, a2, b0, b1, b2 ++ uzp1 \d0\().8h, \a1\().8h, \b1\().8h ++ uzp1 \d1\().8h, \a2\().8h, \b2\().8h ++ uzp2 \d2\().8h, \a0\().8h, \b0\().8h ++ ++ uzp1 \a0\().8h, \a0\().8h, \b0\().8h ++ uzp2 \a1\().8h, \a1\().8h, \b1\().8h ++ uzp2 \a2\().8h, \a2\().8h, \b2\().8h ++.endm ++ ++// SAND30 -> 10bit ++.macro USAND10 d0, d1, d2, a0, a1 ++ shrn \d2\().4h, \a0\().4s, #14 ++ shrn \d1\().4h, \a0\().4s, #10 ++ ++ shrn2 \d2\().8h, \a1\().4s, #14 ++ shrn2 \d1\().8h, \a1\().4s, #10 ++ uzp1 \d0\().8h, \a0\().8h, \a1\().8h ++ ++ ushr \d2\().8h, \d2\().8h, #6 ++ bic \d0\().8h, #0xfc, lsl #8 ++ bic \d1\().8h, #0xfc, lsl #8 ++.endm ++ ++// SAND30 -> 8bit ++.macro USAND8 d0, d1, d2, a0, a1, a2, a3, t0, t1, t2 ++ shrn \d1\().4h, \a0\().4s, #12 ++ shrn2 \d1\().8h, \a1\().4s, #12 ++ uzp1 \d0\().8h, \a0\().8h, \a1\().8h ++ uzp2 \d2\().8h, \a0\().8h, \a1\().8h ++ ++ shrn \t1\().4h, \a2\().4s, #12 ++ shrn2 \t1\().8h, \a3\().4s, #12 ++ uzp1 \t0\().8h, \a2\().8h, \a3\().8h ++ uzp2 \t2\().8h, \a2\().8h, \a3\().8h ++ ++ shrn \d0\().8b, \d0\().8h, #2 ++ shrn2 \d0\().16b, \t0\().8h, #2 ++ shrn \d2\().8b, \d2\().8h, #6 ++ shrn2 \d2\().16b, \t2\().8h, #6 ++ uzp1 \d1\().16b, \d1\().16b, \t1\().16b ++.endm ++ ++ ++// void ff_rpi_sand30_lines_to_planar_c16( ++// uint8_t * dst_u, // [x0] ++// unsigned int dst_stride_u, // [w1] ++// uint8_t * dst_v, // [x2] ++// unsigned int dst_stride_v, // [w3] ++// const uint8_t * src, // [x4] ++// unsigned int stride1, // [w5] 128 ++// unsigned int stride2, // [w6] ++// unsigned int _x, // [w7] 0 ++// unsigned int y, // [sp, #0] ++// unsigned int _w, // [sp, #8] w9 ++// unsigned int h); // [sp, #16] w10 ++ ++function ff_rpi_sand30_lines_to_planar_c16, export=1 ++ ldr w7, [sp, #0] // y ++ ldr w8, [sp, #8] // _w ++ ldr w10, [sp, #16] // h ++ lsl w6, w6, #7 // Fixup stride2 ++ sub w6, w6, #64 ++ uxtw x6, w6 ++ sub w1, w1, w8, LSL #1 // Fixup chroma strides ++ sub w3, w3, w8, LSL #1 ++ lsl w7, w7, #7 // Add y to src ++ add x4, x4, w7, UXTW ++10: ++ mov w13, #0 ++ mov x5, x4 ++ mov w9, w8 ++1: ++ ld1 {v0.4s-v3.4s}, [x5], #64 ++ ld1 {v4.4s-v7.4s}, [x5], x6 ++ subs w9, w9, #48 ++ ++ USAND10 v17, v16, v18, v0, v1 ++ USAND10 v20, v19, v21, v2, v3 ++ UZPH_C v0, v1, v2, v16, v17, v18, v19, v20, v21 ++ USAND10 v23, v22, v24, v4, v5 ++ USAND10 v26, v25, v27, v6, v7 ++ UZPH_C v4, v5, v6, v22, v23, v24, v25, v26, v27 ++ ++ blt 2f ++ ++ st3 {v0.8h-v2.8h}, [x0], #48 ++ st3 {v4.8h-v6.8h}, [x0], #48 ++ st3 {v16.8h-v18.8h}, [x2], #48 ++ st3 {v22.8h-v24.8h}, [x2], #48 ++ ++ bne 1b ++11: ++ subs w10, w10, #1 ++ add x4, x4, #128 ++ add x0, x0, w1, UXTW ++ add x2, x2, w3, UXTW ++ bne 10b ++99: ++ ret ++ ++// Partial final write ++2: ++ cmp w9, #24-48 ++ blt 1f ++ st3 {v0.8h - v2.8h}, [x0], #48 ++ st3 {v16.8h - v18.8h}, [x2], #48 ++ beq 11b ++ mov v0.16b, v4.16b ++ mov v1.16b, v5.16b ++ sub w9, w9, #24 ++ mov v2.16b, v6.16b ++ mov v16.16b, v22.16b ++ mov v17.16b, v23.16b ++ mov v18.16b, v24.16b ++1: ++ cmp w9, #12-48 ++ blt 1f ++ st3 {v0.4h - v2.4h}, [x0], #24 ++ st3 {v16.4h - v18.4h}, [x2], #24 ++ beq 11b ++ mov v0.d[0], v0.d[1] ++ sub w9, w9, #12 ++ mov v1.d[0], v1.d[1] ++ mov v2.d[0], v2.d[1] ++ mov v16.d[0], v16.d[1] ++ mov v17.d[0], v17.d[1] ++ mov v18.d[0], v18.d[1] ++1: ++ cmp w9, #6-48 ++ blt 1f ++ st3 {v0.h - v2.h}[0], [x0], #6 ++ st3 {v0.h - v2.h}[1], [x0], #6 ++ st3 {v16.h - v18.h}[0], [x2], #6 ++ st3 {v16.h - v18.h}[1], [x2], #6 ++ beq 11b ++ mov v0.s[0], v0.s[1] ++ sub w9, w9, #6 ++ mov v1.s[0], v1.s[1] ++ mov v2.s[0], v2.s[1] ++ mov v16.s[0], v16.s[1] ++ mov v17.s[0], v17.s[1] ++ mov v18.s[0], v18.s[1] ++1: ++ cmp w9, #3-48 ++ blt 1f ++ st3 {v0.h - v2.h}[0], [x0], #6 ++ st3 {v16.h - v18.h}[0], [x2], #6 ++ beq 11b ++ mov v0.h[0], v0.h[1] ++ sub w9, w9, #3 ++ mov v1.h[0], v1.h[1] ++ mov v16.h[0], v16.h[1] ++ mov v17.h[0], v17.h[1] ++1: ++ cmp w9, #2-48 ++ blt 1f ++ st2 {v0.h - v1.h}[0], [x0], #4 ++ st2 {v16.h - v17.h}[0], [x2], #4 ++ b 11b ++1: ++ st1 {v0.h}[0], [x0], #2 ++ st1 {v16.h}[0], [x2], #2 ++ b 11b ++endfunc ++ ++ ++//void ff_rpi_sand30_lines_to_planar_p010( ++// uint8_t * dest, ++// unsigned int dst_stride, ++// const uint8_t * src, ++// unsigned int src_stride1, ++// unsigned int src_stride2, ++// unsigned int _x, ++// unsigned int y, ++// unsigned int _w, ++// unsigned int h); ++ ++// void ff_rpi_sand30_lines_to_planar_y8( ++// uint8_t * dest, : x0 ++// unsigned int dst_stride, : w1 ++// const uint8_t * src, : x2 ++// unsigned int src_stride1, : w3, always 128 ++// unsigned int src_stride2, : w4 ++// unsigned int _x, : w5 ++// unsigned int y, : w6 ++// unsigned int _w, : w7 ++// unsigned int h); : [sp, #0] ++// ++// Assumes that we are starting on a stripe boundary and that overreading ++// within the stripe is OK. However it does respect the dest size for wri ++ ++function ff_rpi_sand30_lines_to_planar_y16, export=1 ++ lsl w4, w4, #7 ++ sub w4, w4, #64 ++ uxtw x4, w4 ++ sub w1, w1, w7, lsl #1 ++ uxtw x6, w6 ++ add x8, x2, x6, lsl #7 ++ ldr w6, [sp, #0] ++ ++10: ++ mov x2, x8 ++ mov w5, w7 ++1: ++ ld1 {v0.4s, v1.4s, v2.4s, v3.4s}, [x2], #64 ++ ld1 {v4.4s, v5.4s, v6.4s, v7.4s}, [x2], x4 ++ ++ subs w5, w5, #96 ++ ++ USAND10 v16, v17, v18, v0, v1 ++ USAND10 v19, v20, v21, v2, v3 ++ USAND10 v22, v23, v24, v4, v5 ++ USAND10 v25, v26, v27, v6, v7 ++ ++ blt 2f ++ ++ st3 {v16.8h, v17.8h, v18.8h}, [x0], #48 ++ st3 {v19.8h, v20.8h, v21.8h}, [x0], #48 ++ st3 {v22.8h, v23.8h, v24.8h}, [x0], #48 ++ st3 {v25.8h, v26.8h, v27.8h}, [x0], #48 ++ ++ bne 1b ++ ++11: ++ subs w6, w6, #1 ++ add x0, x0, w1, uxtw ++ add x8, x8, #128 ++ bne 10b ++ ++ ret ++ ++// Partial final write ++2: ++ cmp w5, #48-96 ++ blt 1f ++ st3 {v16.8h, v17.8h, v18.8h}, [x0], #48 ++ st3 {v19.8h, v20.8h, v21.8h}, [x0], #48 ++ beq 11b ++ mov v16.16b, v22.16b ++ mov v17.16b, v23.16b ++ sub w5, w5, #48 ++ mov v18.16b, v24.16b ++ mov v19.16b, v25.16b ++ mov v20.16b, v26.16b ++ mov v21.16b, v27.16b ++1: ++ cmp w5, #24-96 ++ blt 1f ++ st3 {v16.8h, v17.8h, v18.8h}, [x0], #48 ++ beq 11b ++ mov v16.16b, v19.16b ++ mov v17.16b, v20.16b ++ sub w5, w5, #24 ++ mov v18.16b, v21.16b ++1: ++ cmp w5, #12-96 ++ blt 1f ++ st3 {v16.4h, v17.4h, v18.4h}, [x0], #24 ++ beq 11b ++ mov v16.d[0], v16.d[1] ++ sub w5, w5, #12 ++ mov v17.d[0], v17.d[1] ++ mov v18.d[0], v18.d[1] ++1: ++ cmp w5, #6-96 ++ blt 1f ++ st3 {v16.h, v17.h, v18.h}[0], [x0], #6 ++ st3 {v16.h, v17.h, v18.h}[1], [x0], #6 ++ beq 11b ++ mov v16.s[0], v16.s[1] ++ sub w5, w5, #6 ++ mov v17.s[0], v17.s[1] ++ mov v18.s[0], v18.s[1] ++1: ++ cmp w5, #3-96 ++ blt 1f ++ st3 {v16.h, v17.h, v18.h}[0], [x0], #6 ++ beq 11b ++ mov v16.h[0], v16.h[1] ++ sub w5, w5, #3 ++ mov v17.h[0], v17.h[1] ++1: ++ cmp w5, #2-96 ++ blt 1f ++ st2 {v16.h, v17.h}[0], [x0], #4 ++ b 11b ++1: ++ st1 {v16.h}[0], [x0], #2 ++ b 11b ++ ++endfunc ++ ++// void ff_rpi_sand30_lines_to_planar_y8( ++// uint8_t * dest, : x0 ++// unsigned int dst_stride, : w1 ++// const uint8_t * src, : x2 ++// unsigned int src_stride1, : w3, always 128 ++// unsigned int src_stride2, : w4 ++// unsigned int _x, : w5 ++// unsigned int y, : w6 ++// unsigned int _w, : w7 ++// unsigned int h); : [sp, #0] ++// ++// Assumes that we are starting on a stripe boundary and that overreading ++// within the stripe is OK. However it does respect the dest size for wri ++ ++function ff_rpi_sand30_lines_to_planar_y8, export=1 ++ lsl w4, w4, #7 ++ sub w4, w4, #64 ++ uxtw x4, w4 ++ sub w1, w1, w7 ++ uxtw x6, w6 ++ add x8, x2, x6, lsl #7 ++ ldr w6, [sp, #0] ++ ++10: ++ mov x2, x8 ++ mov w5, w7 ++1: ++ ld1 {v0.4s, v1.4s, v2.4s, v3.4s}, [x2], #64 ++ ld1 {v4.4s, v5.4s, v6.4s, v7.4s}, [x2], x4 ++ ++ subs w5, w5, #96 ++ ++ // v0, v1 ++ USAND8 v16, v17, v18, v0, v1, v2, v3, v22, v23, v24 ++ USAND8 v19, v20, v21, v4, v5, v6, v7, v22, v23, v24 ++ ++ blt 2f ++ ++ st3 {v16.16b, v17.16b, v18.16b}, [x0], #48 ++ st3 {v19.16b, v20.16b, v21.16b}, [x0], #48 ++ ++ bne 1b ++ ++11: ++ subs w6, w6, #1 ++ add x0, x0, w1, uxtw ++ add x8, x8, #128 ++ bne 10b ++ ++ ret ++ ++// Partial final write ++2: ++ cmp w5, #48-96 ++ blt 1f ++ st3 {v16.16b, v17.16b, v18.16b}, [x0], #48 ++ beq 11b ++ mov v16.16b, v22.16b ++ mov v17.16b, v23.16b ++ sub w5, w5, #48 ++ mov v18.16b, v24.16b ++1: ++ cmp w5, #24-96 ++ blt 1f ++ st3 {v16.8b, v17.8b, v18.8b}, [x0], #24 ++ beq 11b ++ mov v16.d[0], v16.d[1] ++ sub w5, w5, #24 ++ mov v17.d[0], v17.d[1] ++ mov v18.d[0], v18.d[1] ++1: ++ cmp w5, #12-96 ++ blt 1f ++ st3 {v16.b, v17.b, v18.b}[0], [x0], #3 ++ st3 {v16.b, v17.b, v18.b}[1], [x0], #3 ++ st3 {v16.b, v17.b, v18.b}[2], [x0], #3 ++ st3 {v16.b, v17.b, v18.b}[3], [x0], #3 ++ beq 11b ++ mov v16.s[0], v16.s[1] ++ sub w5, w5, #12 ++ mov v17.s[0], v17.s[1] ++ mov v18.s[0], v18.s[1] ++1: ++ cmp w5, #6-96 ++ blt 1f ++ st3 {v16.b, v17.b, v18.b}[0], [x0], #3 ++ st3 {v16.b, v17.b, v18.b}[1], [x0], #3 ++ beq 11b ++ mov v16.h[0], v16.h[1] ++ sub w5, w5, #6 ++ mov v17.h[0], v17.h[1] ++ mov v18.h[0], v18.h[1] ++1: ++ cmp w5, #3-96 ++ blt 1f ++ st3 {v16.b, v17.b, v18.b}[0], [x0], #3 ++ beq 11b ++ mov v16.b[0], v16.b[1] ++ sub w5, w5, #3 ++ mov v17.b[0], v17.b[1] ++1: ++ cmp w5, #2-96 ++ blt 1f ++ st2 {v16.b, v17.b}[0], [x0], #2 ++ b 11b ++1: ++ st1 {v16.b}[0], [x0], #1 ++ b 11b ++ ++endfunc ++ +--- /dev/null ++++ b/libavutil/aarch64/rpi_sand_neon.h +@@ -0,0 +1,59 @@ ++/* ++Copyright (c) 2021 Michael Eiler ++ ++Redistribution and use in source and binary forms, with or without ++modification, are permitted provided that the following conditions are met: ++ * Redistributions of source code must retain the above copyright ++ notice, this list of conditions and the following disclaimer. ++ * Redistributions in binary form must reproduce the above copyright ++ notice, this list of conditions and the following disclaimer in the ++ documentation and/or other materials provided with the distribution. ++ * Neither the name of the copyright holder nor the ++ names of its contributors may be used to endorse or promote products ++ derived from this software without specific prior written permission. ++ ++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ++ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED ++WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE ++DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY ++DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES ++(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ++LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ++ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ++SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ ++Authors: Michael Eiler ++*/ ++ ++#pragma once ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++void ff_rpi_sand8_lines_to_planar_y8(uint8_t * dest, unsigned int dst_stride, ++ const uint8_t * src, unsigned int src_stride1, unsigned int src_stride2, ++ unsigned int _x, unsigned int y, unsigned int _w, unsigned int h); ++ ++void ff_rpi_sand8_lines_to_planar_c8(uint8_t * dst_u, unsigned int dst_stride_u, ++ uint8_t * dst_v, unsigned int dst_stride_v, const uint8_t * src, ++ unsigned int stride1, unsigned int stride2, unsigned int _x, unsigned int y, ++ unsigned int _w, unsigned int h); ++ ++void ff_rpi_sand30_lines_to_planar_y16(uint8_t * dest, unsigned int dst_stride, ++ const uint8_t * src, unsigned int src_stride1, unsigned int src_stride2, ++ unsigned int _x, unsigned int y, unsigned int _w, unsigned int h); ++ ++void ff_rpi_sand30_lines_to_planar_c16(uint8_t * dst_u, unsigned int dst_stride_u, ++ uint8_t * dst_v, unsigned int dst_stride_v, const uint8_t * src, unsigned int stride1, ++ unsigned int stride2, unsigned int _x, unsigned int y, unsigned int _w, unsigned int h); ++ ++void ff_rpi_sand30_lines_to_planar_y8(uint8_t * dest, unsigned int dst_stride, ++ const uint8_t * src, unsigned int src_stride1, unsigned int src_stride2, ++ unsigned int _x, unsigned int y, unsigned int _w, unsigned int h); ++ ++#ifdef __cplusplus ++} ++#endif ++ +--- a/libavutil/arm/Makefile ++++ b/libavutil/arm/Makefile +@@ -6,3 +6,4 @@ VFP-OBJS += arm/float_dsp_init_vfp.o + + NEON-OBJS += arm/float_dsp_init_neon.o \ + arm/float_dsp_neon.o \ ++ arm/rpi_sand_neon.o \ +--- /dev/null ++++ b/libavutil/arm/rpi_sand_neon.S +@@ -0,0 +1,925 @@ ++/* ++Copyright (c) 2018 Raspberry Pi (Trading) Ltd. ++All rights reserved. ++ ++Redistribution and use in source and binary forms, with or without ++modification, are permitted provided that the following conditions are met: ++ * Redistributions of source code must retain the above copyright ++ notice, this list of conditions and the following disclaimer. ++ * Redistributions in binary form must reproduce the above copyright ++ notice, this list of conditions and the following disclaimer in the ++ documentation and/or other materials provided with the distribution. ++ * Neither the name of the copyright holder nor the ++ names of its contributors may be used to endorse or promote products ++ derived from this software without specific prior written permission. ++ ++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ++ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED ++WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE ++DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY ++DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES ++(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ++LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ++ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ++SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ ++Authors: John Cox ++*/ ++ ++#include "libavutil/arm/asm.S" ++ ++ ++@ General notes: ++@ Having done some timing on this in sand8->y8 (Pi4) ++@ vst1 (680fps) is a bit faster than vstm (660fps) ++@ vldm (680fps) is noticably faster than vld1 (480fps) ++@ (or it might be that a mix is what is required) ++@ ++@ At least on a Pi4 it is no more expensive to have a single auto-inc register ++@ for dest address than it is to have 2 used alternately (On Pi3 Ben asserted ++@ the latter was better) ++@ ++@ vstm will bus error on unaligned access (so will vldm), vst1 is safe unless ++@ the memory is uncached. ++@ As these are Sand -> planar we can assume that src is going to be aligned but ++@ it is possible that dest isn't (converting to .yuv or other packed format). ++@ Luckily vst1 is faster than vstm :-) so all is well ++@ vst1 has alignment requirements of el size so maybe splitting vst1.32 into 4 ++@ .8 stores would let us do non-word aligned stores into uncached but it ++@ probably isn't worth it. ++ ++ ++ ++ ++@ void ff_rpi_sand128b_stripe_to_8_10( ++@ uint8_t * dest, // [r0] ++@ const uint8_t * src1, // [r1] ++@ const uint8_t * src2, // [r2] ++@ unsigned int lines); // [r3] ++ ++.macro stripe2_to_8, bit_depth ++ vpush {q4-q7} ++1: ++ vldm r1!, {q0-q7} ++ subs r3, #1 ++ vldm r2!, {q8-q15} ++ vqrshrn.u16 d0, q0, #\bit_depth - 8 ++ vqrshrn.u16 d1, q1, #\bit_depth - 8 ++ vqrshrn.u16 d2, q2, #\bit_depth - 8 ++ vqrshrn.u16 d3, q3, #\bit_depth - 8 ++ vqrshrn.u16 d4, q4, #\bit_depth - 8 ++ vqrshrn.u16 d5, q5, #\bit_depth - 8 ++ vqrshrn.u16 d6, q6, #\bit_depth - 8 ++ vqrshrn.u16 d7, q7, #\bit_depth - 8 ++ vqrshrn.u16 d8, q8, #\bit_depth - 8 ++ vqrshrn.u16 d9, q9, #\bit_depth - 8 ++ vqrshrn.u16 d10, q10, #\bit_depth - 8 ++ vqrshrn.u16 d11, q11, #\bit_depth - 8 ++ vqrshrn.u16 d12, q12, #\bit_depth - 8 ++ vqrshrn.u16 d13, q13, #\bit_depth - 8 ++ vqrshrn.u16 d14, q14, #\bit_depth - 8 ++ vqrshrn.u16 d15, q15, #\bit_depth - 8 ++ vstm r0!, {q0-q7} ++ bne 1b ++ vpop {q4-q7} ++ bx lr ++.endm ++ ++function ff_rpi_sand128b_stripe_to_8_10, export=1 ++ stripe2_to_8 10 ++endfunc ++ ++@ void ff_rpi_sand8_lines_to_planar_y8( ++@ uint8_t * dest, // [r0] ++@ unsigned int dst_stride, // [r1] ++@ const uint8_t * src, // [r2] ++@ unsigned int src_stride1, // [r3] Ignored - assumed 128 ++@ unsigned int src_stride2, // [sp, #0] -> r3 ++@ unsigned int _x, // [sp, #4] Ignored - 0 ++@ unsigned int y, // [sp, #8] (r7 in prefix) ++@ unsigned int _w, // [sp, #12] -> r6 (cur r5) ++@ unsigned int h); // [sp, #16] -> r7 ++@ ++@ Assumes that we are starting on a stripe boundary and that overreading ++@ within the stripe is OK. However it does respect the dest size for writing ++ ++function ff_rpi_sand8_lines_to_planar_y8, export=1 ++ push {r4-r8, lr} @ +24 L ++ ldr r3, [sp, #24] ++ ldr r6, [sp, #36] ++ ldr r7, [sp, #32] @ y ++ lsl r3, #7 ++ sub r1, r6 ++ add r8, r2, r7, lsl #7 ++ ldr r7, [sp, #40] ++ ++10: ++ mov r2, r8 ++ add r4, r0, #24 ++ mov r5, r6 ++ mov lr, #0 ++1: ++ vldm r2, {q8-q15} ++ add r2, r3 ++ subs r5, #128 ++ blt 2f ++ vst1.8 {d16, d17, d18, d19}, [r0]! ++ vst1.8 {d20, d21, d22, d23}, [r0]! ++ vst1.8 {d24, d25, d26, d27}, [r0]! ++ vst1.8 {d28, d29, d30, d31}, [r0]! ++ bne 1b ++11: ++ subs r7, #1 ++ add r0, r1 ++ add r8, #128 ++ bne 10b ++ ++ pop {r4-r8, pc} ++ ++@ Partial final write ++2: ++ cmp r5, #64-128 ++ blt 1f ++ vst1.8 {d16, d17, d18, d19}, [r0]! ++ vst1.8 {d20, d21, d22, d23}, [r0]! ++ beq 11b ++ vmov q8, q12 ++ vmov q9, q13 ++ sub r5, #64 ++ vmov q10, q14 ++ vmov q11, q15 ++1: ++ cmp r5, #32-128 ++ blt 1f ++ vst1.8 {d16, d17, d18, d19}, [r0]! ++ beq 11b ++ vmov q8, q10 ++ sub r5, #32 ++ vmov q9, q11 ++1: ++ cmp r5, #16-128 ++ blt 1f ++ vst1.8 {d16, d17}, [r0]! ++ beq 11b ++ sub r5, #16 ++ vmov q8, q9 ++1: ++ cmp r5, #8-128 ++ blt 1f ++ vst1.8 {d16}, [r0]! ++ beq 11b ++ sub r5, #8 ++ vmov d16, d17 ++1: ++ cmp r5, #4-128 ++ blt 1f ++ vst1.32 {d16[0]}, [r0]! ++ beq 11b ++ sub r5, #4 ++ vshr.u64 d16, #32 ++1: ++ cmp r5, #2-128 ++ blt 1f ++ vst1.16 {d16[0]}, [r0]! ++ beq 11b ++ vst1.8 {d16[2]}, [r0]! ++ b 11b ++1: ++ vst1.8 {d16[0]}, [r0]! ++ b 11b ++endfunc ++ ++@ void ff_rpi_sand8_lines_to_planar_c8( ++@ uint8_t * dst_u, // [r0] ++@ unsigned int dst_stride_u, // [r1] ++@ uint8_t * dst_v, // [r2] ++@ unsigned int dst_stride_v, // [r3] ++@ const uint8_t * src, // [sp, #0] -> r4, r5 ++@ unsigned int stride1, // [sp, #4] 128 ++@ unsigned int stride2, // [sp, #8] -> r8 ++@ unsigned int _x, // [sp, #12] 0 ++@ unsigned int y, // [sp, #16] (r7 in prefix) ++@ unsigned int _w, // [sp, #20] -> r12, r6 ++@ unsigned int h); // [sp, #24] -> r7 ++@ ++@ Assumes that we are starting on a stripe boundary and that overreading ++@ within the stripe is OK. However it does respect the dest size for writing ++ ++function ff_rpi_sand8_lines_to_planar_c8, export=1 ++ push {r4-r8, lr} @ +24 ++ ++ ldr r5, [sp, #24] ++ ldr r8, [sp, #32] ++ ldr r7, [sp, #40] ++ ldr r6, [sp, #44] ++ lsl r8, #7 ++ add r5, r5, r7, lsl #7 ++ sub r1, r1, r6 ++ sub r3, r3, r6 ++ ldr r7, [sp, #48] ++ vpush {q4-q7} ++ ++10: ++ mov r4, r5 ++ mov r12, r6 ++1: ++ subs r12, #64 ++ vldm r4, {q0-q7} ++ add r4, r8 ++ it gt ++ vldmgt r4, {q8-q15} ++ add r4, r8 ++ ++ vuzp.8 q0, q1 ++ vuzp.8 q2, q3 ++ vuzp.8 q4, q5 ++ vuzp.8 q6, q7 ++ ++ vuzp.8 q8, q9 ++ vuzp.8 q10, q11 ++ vuzp.8 q12, q13 ++ vuzp.8 q14, q15 ++ subs r12, #64 ++ ++ @ Rearrange regs so we can use vst1 with 4 regs ++ vswp q1, q2 ++ vswp q5, q6 ++ vswp q9, q10 ++ vswp q13, q14 ++ blt 2f ++ ++ vst1.8 {d0, d1, d2, d3 }, [r0]! ++ vst1.8 {d8, d9, d10, d11}, [r0]! ++ vst1.8 {d16, d17, d18, d19}, [r0]! ++ vst1.8 {d24, d25, d26, d27}, [r0]! ++ ++ vst1.8 {d4, d5, d6, d7 }, [r2]! ++ vst1.8 {d12, d13, d14, d15}, [r2]! ++ vst1.8 {d20, d21, d22, d23}, [r2]! ++ vst1.8 {d28, d29, d30, d31}, [r2]! ++ bne 1b ++11: ++ subs r7, #1 ++ add r5, #128 ++ add r0, r1 ++ add r2, r3 ++ bne 10b ++ vpop {q4-q7} ++ pop {r4-r8,pc} ++ ++2: ++ cmp r12, #64-128 ++ blt 1f ++ vst1.8 {d0, d1, d2, d3 }, [r0]! ++ vst1.8 {d8, d9, d10, d11}, [r0]! ++ vst1.8 {d4, d5, d6, d7 }, [r2]! ++ vst1.8 {d12, d13, d14, d15}, [r2]! ++ beq 11b ++ sub r12, #64 ++ vmov q0, q8 ++ vmov q1, q9 ++ vmov q2, q10 ++ vmov q3, q11 ++ vmov q4, q12 ++ vmov q5, q13 ++ vmov q6, q14 ++ vmov q7, q15 ++1: ++ cmp r12, #32-128 ++ blt 1f ++ vst1.8 {d0, d1, d2, d3 }, [r0]! ++ vst1.8 {d4, d5, d6, d7 }, [r2]! ++ beq 11b ++ sub r12, #32 ++ vmov q0, q4 ++ vmov q1, q5 ++ vmov q2, q6 ++ vmov q3, q7 ++1: ++ cmp r12, #16-128 ++ blt 1f ++ vst1.8 {d0, d1 }, [r0]! ++ vst1.8 {d4, d5 }, [r2]! ++ beq 11b ++ sub r12, #16 ++ vmov q0, q1 ++ vmov q2, q3 ++1: ++ cmp r12, #8-128 ++ blt 1f ++ vst1.8 {d0}, [r0]! ++ vst1.8 {d4}, [r2]! ++ beq 11b ++ sub r12, #8 ++ vmov d0, d1 ++ vmov d4, d5 ++1: ++ cmp r12, #4-128 ++ blt 1f ++ vst1.32 {d0[0]}, [r0]! ++ vst1.32 {d4[0]}, [r2]! ++ beq 11b ++ sub r12, #4 ++ vmov s0, s1 ++ vmov s8, s9 ++1: ++ cmp r12, #2-128 ++ blt 1f ++ vst1.16 {d0[0]}, [r0]! ++ vst1.16 {d4[0]}, [r2]! ++ beq 11b ++ vst1.8 {d0[2]}, [r0]! ++ vst1.8 {d4[2]}, [r2]! ++ b 11b ++1: ++ vst1.8 {d0[0]}, [r0]! ++ vst1.8 {d4[0]}, [r2]! ++ b 11b ++endfunc ++ ++ ++ ++@ void ff_rpi_sand30_lines_to_planar_y16( ++@ uint8_t * dest, // [r0] ++@ unsigned int dst_stride, // [r1] ++@ const uint8_t * src, // [r2] ++@ unsigned int src_stride1, // [r3] Ignored - assumed 128 ++@ unsigned int src_stride2, // [sp, #0] -> r3 ++@ unsigned int _x, // [sp, #4] Ignored - 0 ++@ unsigned int y, // [sp, #8] (r7 in prefix) ++@ unsigned int _w, // [sp, #12] -> r6 (cur r5) ++@ unsigned int h); // [sp, #16] -> r7 ++@ ++@ Assumes that we are starting on a stripe boundary and that overreading ++@ within the stripe is OK. However it does respect the dest size for writing ++ ++function ff_rpi_sand30_lines_to_planar_y16, export=1 ++ push {r4-r8, lr} @ +24 ++ ldr r3, [sp, #24] ++ ldr r6, [sp, #36] ++ ldr r7, [sp, #32] @ y ++ mov r12, #48 ++ sub r3, #1 ++ lsl r3, #7 ++ sub r1, r1, r6, lsl #1 ++ add r8, r2, r7, lsl #7 ++ ldr r7, [sp, #40] ++ ++10: ++ mov r2, r8 ++ add r4, r0, #24 ++ mov r5, r6 ++ mov lr, #0 ++1: ++ vldm r2!, {q10-q13} ++ add lr, #64 ++ ++ vshrn.u32 d4 , q10, #14 @ Cannot vshrn.u32 #20! ++ ands lr, #127 ++ vshrn.u32 d2, q10, #10 ++ vmovn.u32 d0, q10 ++ ++ vshrn.u32 d5, q11, #14 ++ it eq ++ addeq r2, r3 ++ vshrn.u32 d3, q11, #10 ++ vmovn.u32 d1, q11 ++ ++ subs r5, #48 ++ vshr.u16 q2, #6 ++ vbic.u16 q0, #0xfc00 ++ vbic.u16 q1, #0xfc00 ++ ++ vshrn.u32 d20, q12, #14 ++ vshrn.u32 d18, q12, #10 ++ vmovn.u32 d16, q12 ++ ++ vshrn.u32 d21, q13, #14 ++ vshrn.u32 d19, q13, #10 ++ vmovn.u32 d17, q13 ++ ++ vshr.u16 q10, #6 ++ vbic.u16 q8, #0xfc00 ++ vbic.u16 q9 , #0xfc00 ++ blt 2f ++ ++ vst3.16 {d0, d2, d4}, [r0], r12 ++ vst3.16 {d1, d3, d5}, [r4], r12 ++ vst3.16 {d16, d18, d20}, [r0], r12 ++ vst3.16 {d17, d19, d21}, [r4], r12 ++ ++ bne 1b ++ ++11: ++ subs r7, #1 ++ add r0, r1 ++ add r8, #128 ++ bne 10b ++ ++ pop {r4-r8, pc} ++ ++@ Partial final write ++2: ++ cmp r5, #24-48 ++ blt 1f ++ vst3.16 {d0, d2, d4}, [r0], r12 ++ vst3.16 {d1, d3, d5}, [r4] ++ beq 11b ++ vmov q0, q8 ++ sub r5, #24 ++ vmov q1, q9 ++ vmov q2, q10 ++1: ++ cmp r5, #12-48 ++ blt 1f ++ vst3.16 {d0, d2, d4}, [r0]! ++ beq 11b ++ vmov d0, d1 ++ sub r5, #12 ++ vmov d2, d3 ++ vmov d4, d5 ++1: ++ cmp r5, #6-48 ++ add r4, r0, #6 @ avoid [r0]! on sequential instructions ++ blt 1f ++ vst3.16 {d0[0], d2[0], d4[0]}, [r0] ++ vst3.16 {d0[1], d2[1], d4[1]}, [r4] ++ add r0, #12 ++ beq 11b ++ vmov s0, s1 ++ sub r5, #6 ++ vmov s4, s5 ++ vmov s8, s9 ++1: ++ cmp r5, #3-48 ++ blt 1f ++ vst3.16 {d0[0], d2[0], d4[0]}, [r0]! ++ beq 11b ++ sub r5, #3 ++ vshr.u32 d0, #16 ++ vshr.u32 d2, #16 ++1: ++ cmp r5, #2-48 ++ blt 1f ++ vst2.16 {d0[0], d2[0]}, [r0]! ++ b 11b ++1: ++ vst1.16 {d0[0]}, [r0]! ++ b 11b ++ ++endfunc ++ ++ ++@ void ff_rpi_sand30_lines_to_planar_c16( ++@ uint8_t * dst_u, // [r0] ++@ unsigned int dst_stride_u, // [r1] ++@ uint8_t * dst_v, // [r2] ++@ unsigned int dst_stride_v, // [r3] ++@ const uint8_t * src, // [sp, #0] -> r4, r5 ++@ unsigned int stride1, // [sp, #4] 128 ++@ unsigned int stride2, // [sp, #8] -> r8 ++@ unsigned int _x, // [sp, #12] 0 ++@ unsigned int y, // [sp, #16] (r7 in prefix) ++@ unsigned int _w, // [sp, #20] -> r6, r9 ++@ unsigned int h); // [sp, #24] -> r7 ++@ ++@ Assumes that we are starting on a stripe boundary and that overreading ++@ within the stripe is OK. However it does respect the dest size for writing ++ ++function ff_rpi_sand30_lines_to_planar_c16, export=1 ++ push {r4-r10, lr} @ +32 ++ ldr r5, [sp, #32] ++ ldr r8, [sp, #40] ++ ldr r7, [sp, #48] ++ ldr r9, [sp, #52] ++ mov r12, #48 ++ sub r8, #1 ++ lsl r8, #7 ++ add r5, r5, r7, lsl #7 ++ sub r1, r1, r9, lsl #1 ++ sub r3, r3, r9, lsl #1 ++ ldr r7, [sp, #56] ++10: ++ mov lr, #0 ++ mov r4, r5 ++ mov r6, r9 ++1: ++ vldm r4!, {q0-q3} ++ add lr, #64 ++ ++ @ N.B. unpack [0,1,2] -> (reg order) 1, 0, 2 ++ vshrn.u32 d20, q0, #14 ++ vmovn.u32 d18, q0 ++ vshrn.u32 d0, q0, #10 ++ ands lr, #127 ++ ++ vshrn.u32 d21, q1, #14 ++ vmovn.u32 d19, q1 ++ vshrn.u32 d1, q1, #10 ++ ++ vshrn.u32 d22, q2, #10 ++ vmovn.u32 d2, q2 ++ vshrn.u32 d4, q2, #14 ++ ++ add r10, r0, #24 ++ vshrn.u32 d23, q3, #10 ++ vmovn.u32 d3, q3 ++ vshrn.u32 d5, q3, #14 ++ ++ it eq ++ addeq r4, r8 ++ vuzp.16 q0, q11 ++ vuzp.16 q9, q1 ++ vuzp.16 q10, q2 ++ ++ @ q0 V0, V3,.. ++ @ q9 U0, U3... ++ @ q10 U1, U4... ++ @ q11 U2, U5,.. ++ @ q1 V1, V4, ++ @ q2 V2, V5,.. ++ ++ subs r6, #24 ++ vbic.u16 q11, #0xfc00 ++ vbic.u16 q9, #0xfc00 ++ vshr.u16 q10, #6 ++ vshr.u16 q2, #6 ++ vbic.u16 q0, #0xfc00 ++ vbic.u16 q1, #0xfc00 ++ ++ blt 2f ++ ++ vst3.16 {d18, d20, d22}, [r0], r12 ++ vst3.16 {d19, d21, d23}, [r10] ++ add r10, r2, #24 ++ vst3.16 {d0, d2, d4}, [r2], r12 ++ vst3.16 {d1, d3, d5}, [r10] ++ ++ bne 1b ++ ++11: ++ subs r7, #1 ++ add r5, #128 ++ add r0, r1 ++ add r2, r3 ++ bne 10b ++ ++ pop {r4-r10, pc} ++ ++@ Partial final write ++2: ++ cmp r6, #-12 ++ blt 1f ++ vst3.16 {d18, d20, d22}, [r0]! ++ vst3.16 {d0, d2, d4}, [r2]! ++ beq 11b ++ vmov d18, d19 ++ vmov d20, d21 ++ vmov d22, d23 ++ sub r6, #12 ++ vmov d0, d1 ++ vmov d2, d3 ++ vmov d4, d5 ++1: ++ cmp r6, #-18 ++ @ Rezip here as it makes the remaining tail handling easier ++ vzip.16 d0, d18 ++ vzip.16 d2, d20 ++ vzip.16 d4, d22 ++ blt 1f ++ vst3.16 {d0[1], d2[1], d4[1]}, [r0]! ++ vst3.16 {d0[0], d2[0], d4[0]}, [r2]! ++ vst3.16 {d0[3], d2[3], d4[3]}, [r0]! ++ vst3.16 {d0[2], d2[2], d4[2]}, [r2]! ++ beq 11b ++ vmov d0, d18 ++ vmov d2, d20 ++ sub r6, #6 ++ vmov d4, d22 ++1: ++ cmp r6, #-21 ++ blt 1f ++ vst3.16 {d0[1], d2[1], d4[1]}, [r0]! ++ vst3.16 {d0[0], d2[0], d4[0]}, [r2]! ++ beq 11b ++ vmov s4, s5 ++ sub r6, #3 ++ vmov s0, s1 ++1: ++ cmp r6, #-22 ++ blt 1f ++ vst2.16 {d0[1], d2[1]}, [r0]! ++ vst2.16 {d0[0], d2[0]}, [r2]! ++ b 11b ++1: ++ vst1.16 {d0[1]}, [r0]! ++ vst1.16 {d0[0]}, [r2]! ++ b 11b ++ ++endfunc ++ ++@ void ff_rpi_sand30_lines_to_planar_p010( ++@ uint8_t * dest, // [r0] ++@ unsigned int dst_stride, // [r1] ++@ const uint8_t * src, // [r2] ++@ unsigned int src_stride1, // [r3] Ignored - assumed 128 ++@ unsigned int src_stride2, // [sp, #0] -> r3 ++@ unsigned int _x, // [sp, #4] Ignored - 0 ++@ unsigned int y, // [sp, #8] (r7 in prefix) ++@ unsigned int _w, // [sp, #12] -> r6 (cur r5) ++@ unsigned int h); // [sp, #16] -> r7 ++@ ++@ Assumes that we are starting on a stripe boundary and that overreading ++@ within the stripe is OK. However it does respect the dest size for writing ++ ++function ff_rpi_sand30_lines_to_planar_p010, export=1 ++ push {r4-r8, lr} @ +24 ++ ldr r3, [sp, #24] ++ ldr r6, [sp, #36] ++ ldr r7, [sp, #32] @ y ++ mov r12, #48 ++ vmov.u16 q15, #0xffc0 ++ sub r3, #1 ++ lsl r3, #7 ++ sub r1, r1, r6, lsl #1 ++ add r8, r2, r7, lsl #7 ++ ldr r7, [sp, #40] ++ ++10: ++ mov r2, r8 ++ add r4, r0, #24 ++ mov r5, r6 ++ mov lr, #0 ++1: ++ vldm r2!, {q10-q13} ++ add lr, #64 ++ ++ vshl.u32 q14, q10, #6 ++ ands lr, #127 ++ vshrn.u32 d4, q10, #14 ++ vshrn.u32 d2, q10, #4 ++ vmovn.u32 d0, q14 ++ ++ vshl.u32 q14, q11, #6 ++ it eq ++ addeq r2, r3 ++ vshrn.u32 d5, q11, #14 ++ vshrn.u32 d3, q11, #4 ++ vmovn.u32 d1, q14 ++ ++ subs r5, #48 ++ vand q2, q15 ++ vand q1, q15 ++ vand q0, q15 ++ ++ vshl.u32 q14, q12, #6 ++ vshrn.u32 d20, q12, #14 ++ vshrn.u32 d18, q12, #4 ++ vmovn.u32 d16, q14 ++ ++ vshl.u32 q14, q13, #6 ++ vshrn.u32 d21, q13, #14 ++ vshrn.u32 d19, q13, #4 ++ vmovn.u32 d17, q14 ++ ++ vand q10, q15 ++ vand q9, q15 ++ vand q8, q15 ++ blt 2f ++ ++ vst3.16 {d0, d2, d4}, [r0], r12 ++ vst3.16 {d1, d3, d5}, [r4], r12 ++ vst3.16 {d16, d18, d20}, [r0], r12 ++ vst3.16 {d17, d19, d21}, [r4], r12 ++ ++ bne 1b ++ ++11: ++ subs r7, #1 ++ add r0, r1 ++ add r8, #128 ++ bne 10b ++ ++ pop {r4-r8, pc} ++ ++@ Partial final write ++2: ++ cmp r5, #24-48 ++ blt 1f ++ vst3.16 {d0, d2, d4}, [r0], r12 ++ vst3.16 {d1, d3, d5}, [r4] ++ beq 11b ++ vmov q0, q8 ++ sub r5, #24 ++ vmov q1, q9 ++ vmov q2, q10 ++1: ++ cmp r5, #12-48 ++ blt 1f ++ vst3.16 {d0, d2, d4}, [r0]! ++ beq 11b ++ vmov d0, d1 ++ sub r5, #12 ++ vmov d2, d3 ++ vmov d4, d5 ++1: ++ cmp r5, #6-48 ++ add r4, r0, #6 @ avoid [r0]! on sequential instructions ++ blt 1f ++ vst3.16 {d0[0], d2[0], d4[0]}, [r0] ++ vst3.16 {d0[1], d2[1], d4[1]}, [r4] ++ add r0, #12 ++ beq 11b ++ vmov s0, s1 ++ sub r5, #6 ++ vmov s4, s5 ++ vmov s8, s9 ++1: ++ cmp r5, #3-48 ++ blt 1f ++ vst3.16 {d0[0], d2[0], d4[0]}, [r0]! ++ beq 11b ++ sub r5, #3 ++ vshr.u32 d0, #16 ++ vshr.u32 d2, #16 ++1: ++ cmp r5, #2-48 ++ blt 1f ++ vst2.16 {d0[0], d2[0]}, [r0]! ++ b 11b ++1: ++ vst1.16 {d0[0]}, [r0]! ++ b 11b ++ ++endfunc ++ ++ ++@ void ff_rpi_sand30_lines_to_planar_y8( ++@ uint8_t * dest, // [r0] ++@ unsigned int dst_stride, // [r1] ++@ const uint8_t * src, // [r2] ++@ unsigned int src_stride1, // [r3] Ignored - assumed 128 ++@ unsigned int src_stride2, // [sp, #0] -> r3 ++@ unsigned int _x, // [sp, #4] Ignored - 0 ++@ unsigned int y, // [sp, #8] (r7 in prefix) ++@ unsigned int _w, // [sp, #12] -> r6 (cur r5) ++@ unsigned int h); // [sp, #16] -> r7 ++@ ++@ Assumes that we are starting on a stripe boundary and that overreading ++@ within the stripe is OK. However it does respect the dest size for wri ++ ++function ff_rpi_sand30_lines_to_planar_y8, export=1 ++ push {r4-r8, lr} @ +24 ++ ldr r3, [sp, #24] ++ ldr r6, [sp, #36] ++ ldr r7, [sp, #32] @ y ++ mov r12, #48 ++ lsl r3, #7 ++ sub r1, r1, r6 ++ add r8, r2, r7, lsl #7 ++ ldr r7, [sp, #40] ++ ++10: ++ mov r2, r8 ++ add r4, r0, #24 ++ mov r5, r6 ++1: ++ vldm r2, {q8-q15} ++ ++ subs r5, #96 ++ ++ vmovn.u32 d0, q8 ++ vshrn.u32 d2, q8, #12 ++ vshrn.u32 d4, q8, #16 @ Cannot vshrn.u32 #20! ++ ++ add r2, r3 ++ ++ vmovn.u32 d1, q9 ++ vshrn.u32 d3, q9, #12 ++ vshrn.u32 d5, q9, #16 ++ ++ pld [r2, #0] ++ ++ vshrn.u16 d0, q0, #2 ++ vmovn.u16 d1, q1 ++ vshrn.u16 d2, q2, #6 ++ ++ vmovn.u32 d16, q10 ++ vshrn.u32 d18, q10, #12 ++ vshrn.u32 d20, q10, #16 ++ ++ vmovn.u32 d17, q11 ++ vshrn.u32 d19, q11, #12 ++ vshrn.u32 d21, q11, #16 ++ ++ pld [r2, #64] ++ ++ vshrn.u16 d4, q8, #2 ++ vmovn.u16 d5, q9 ++ vshrn.u16 d6, q10, #6 ++ ++ vmovn.u32 d16, q12 ++ vshrn.u32 d18, q12, #12 ++ vshrn.u32 d20, q12, #16 ++ ++ vmovn.u32 d17, q13 ++ vshrn.u32 d19, q13, #12 ++ vshrn.u32 d21, q13, #16 ++ ++ vshrn.u16 d16, q8, #2 ++ vmovn.u16 d17, q9 ++ vshrn.u16 d18, q10, #6 ++ ++ vmovn.u32 d20, q14 ++ vshrn.u32 d22, q14, #12 ++ vshrn.u32 d24, q14, #16 ++ ++ vmovn.u32 d21, q15 ++ vshrn.u32 d23, q15, #12 ++ vshrn.u32 d25, q15, #16 ++ ++ vshrn.u16 d20, q10, #2 ++ vmovn.u16 d21, q11 ++ vshrn.u16 d22, q12, #6 ++ ++ blt 2f ++ ++ vst3.8 {d0, d1, d2}, [r0], r12 ++ vst3.8 {d4, d5, d6}, [r4], r12 ++ vst3.8 {d16, d17, d18}, [r0], r12 ++ vst3.8 {d20, d21, d22}, [r4], r12 ++ ++ bne 1b ++ ++11: ++ subs r7, #1 ++ add r0, r1 ++ add r8, #128 ++ bne 10b ++ ++ pop {r4-r8, pc} ++ ++@ Partial final write ++2: ++ cmp r5, #48-96 ++ blt 1f ++ vst3.8 {d0, d1, d2}, [r0], r12 ++ vst3.8 {d4, d5, d6}, [r4], r12 ++ beq 11b ++ vmov q0, q8 ++ vmov q2, q10 ++ sub r5, #48 ++ vmov d2, d18 ++ vmov d6, d22 ++1: ++ cmp r5, #24-96 ++ blt 1f ++ vst3.8 {d0, d1, d2}, [r0]! ++ beq 11b ++ vmov q0, q2 ++ sub r5, #24 ++ vmov d2, d6 ++1: ++ cmp r5, #12-96 ++ blt 1f ++ vst3.8 {d0[0], d1[0], d2[0]}, [r0]! ++ vst3.8 {d0[1], d1[1], d2[1]}, [r0]! ++ vst3.8 {d0[2], d1[2], d2[2]}, [r0]! ++ vst3.8 {d0[3], d1[3], d2[3]}, [r0]! ++ beq 11b ++ vmov s0, s1 ++ sub r5, #12 ++ vmov s2, s3 ++ vmov s4, s5 ++1: ++ cmp r5, #6-96 ++ blt 1f ++ vst3.8 {d0[0], d1[0], d2[0]}, [r0]! ++ vst3.8 {d0[1], d1[1], d2[1]}, [r0]! ++ add r0, #12 ++ beq 11b ++ vshr.u32 d0, #16 ++ sub r5, #6 ++ vshr.u32 d1, #16 ++ vshr.u32 d2, #16 ++1: ++ cmp r5, #3-96 ++ blt 1f ++ vst3.8 {d0[0], d1[0], d2[0]}, [r0]! ++ beq 11b ++ sub r5, #3 ++ vshr.u32 d0, #8 ++ vshr.u32 d1, #8 ++1: ++ cmp r5, #2-96 ++ blt 1f ++ vst2.8 {d0[0], d1[0]}, [r0]! ++ b 11b ++1: ++ vst1.8 {d0[0]}, [r0]! ++ b 11b ++ ++endfunc ++ ++ +--- /dev/null ++++ b/libavutil/arm/rpi_sand_neon.h +@@ -0,0 +1,110 @@ ++/* ++Copyright (c) 2020 Raspberry Pi (Trading) Ltd. ++All rights reserved. ++ ++Redistribution and use in source and binary forms, with or without ++modification, are permitted provided that the following conditions are met: ++ * Redistributions of source code must retain the above copyright ++ notice, this list of conditions and the following disclaimer. ++ * Redistributions in binary form must reproduce the above copyright ++ notice, this list of conditions and the following disclaimer in the ++ documentation and/or other materials provided with the distribution. ++ * Neither the name of the copyright holder nor the ++ names of its contributors may be used to endorse or promote products ++ derived from this software without specific prior written permission. ++ ++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ++ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED ++WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE ++DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY ++DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES ++(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ++LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ++ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ++SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ ++Authors: John Cox ++*/ ++ ++#ifndef AVUTIL_ARM_SAND_NEON_H ++#define AVUTIL_ARM_SAND_NEON_H ++ ++void ff_rpi_sand128b_stripe_to_8_10( ++ uint8_t * dest, // [r0] ++ const uint8_t * src1, // [r1] ++ const uint8_t * src2, // [r2] ++ unsigned int lines); // [r3] ++ ++void ff_rpi_sand8_lines_to_planar_y8( ++ uint8_t * dest, // [r0] ++ unsigned int dst_stride, // [r1] ++ const uint8_t * src, // [r2] ++ unsigned int src_stride1, // [r3] Ignored - assumed 128 ++ unsigned int src_stride2, // [sp, #0] -> r3 ++ unsigned int _x, // [sp, #4] Ignored - 0 ++ unsigned int y, // [sp, #8] (r7 in prefix) ++ unsigned int _w, // [sp, #12] -> r6 (cur r5) ++ unsigned int h); // [sp, #16] -> r7 ++ ++void ff_rpi_sand8_lines_to_planar_c8( ++ uint8_t * dst_u, // [r0] ++ unsigned int dst_stride_u, // [r1] ++ uint8_t * dst_v, // [r2] ++ unsigned int dst_stride_v, // [r3] ++ const uint8_t * src, // [sp, #0] -> r4, r5 ++ unsigned int stride1, // [sp, #4] 128 ++ unsigned int stride2, // [sp, #8] -> r8 ++ unsigned int _x, // [sp, #12] 0 ++ unsigned int y, // [sp, #16] (r7 in prefix) ++ unsigned int _w, // [sp, #20] -> r12, r6 ++ unsigned int h); // [sp, #24] -> r7 ++ ++void ff_rpi_sand30_lines_to_planar_y16( ++ uint8_t * dest, // [r0] ++ unsigned int dst_stride, // [r1] ++ const uint8_t * src, // [r2] ++ unsigned int src_stride1, // [r3] Ignored - assumed 128 ++ unsigned int src_stride2, // [sp, #0] -> r3 ++ unsigned int _x, // [sp, #4] Ignored - 0 ++ unsigned int y, // [sp, #8] (r7 in prefix) ++ unsigned int _w, // [sp, #12] -> r6 (cur r5) ++ unsigned int h); // [sp, #16] -> r7 ++ ++void ff_rpi_sand30_lines_to_planar_c16( ++ uint8_t * dst_u, // [r0] ++ unsigned int dst_stride_u, // [r1] ++ uint8_t * dst_v, // [r2] ++ unsigned int dst_stride_v, // [r3] ++ const uint8_t * src, // [sp, #0] -> r4, r5 ++ unsigned int stride1, // [sp, #4] 128 ++ unsigned int stride2, // [sp, #8] -> r8 ++ unsigned int _x, // [sp, #12] 0 ++ unsigned int y, // [sp, #16] (r7 in prefix) ++ unsigned int _w, // [sp, #20] -> r6, r9 ++ unsigned int h); // [sp, #24] -> r7 ++ ++void ff_rpi_sand30_lines_to_planar_p010( ++ uint8_t * dest, // [r0] ++ unsigned int dst_stride, // [r1] ++ const uint8_t * src, // [r2] ++ unsigned int src_stride1, // [r3] Ignored - assumed 128 ++ unsigned int src_stride2, // [sp, #0] -> r3 ++ unsigned int _x, // [sp, #4] Ignored - 0 ++ unsigned int y, // [sp, #8] (r7 in prefix) ++ unsigned int _w, // [sp, #12] -> r6 (cur r5) ++ unsigned int h); // [sp, #16] -> r7 ++ ++void ff_rpi_sand30_lines_to_planar_y8( ++ uint8_t * dest, // [r0] ++ unsigned int dst_stride, // [r1] ++ const uint8_t * src, // [r2] ++ unsigned int src_stride1, // [r3] Ignored - assumed 128 ++ unsigned int src_stride2, // [sp, #0] -> r3 ++ unsigned int _x, // [sp, #4] Ignored - 0 ++ unsigned int y, // [sp, #8] (r7 in prefix) ++ unsigned int _w, // [sp, #12] -> r6 (cur r5) ++ unsigned int h); // [sp, #16] -> r7 ++ ++#endif // AVUTIL_ARM_SAND_NEON_H ++ +--- a/libavutil/frame.c ++++ b/libavutil/frame.c +@@ -16,6 +16,8 @@ + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + ++#include "config.h" ++ + #include "channel_layout.h" + #include "avassert.h" + #include "buffer.h" +@@ -27,6 +29,9 @@ + #include "mem.h" + #include "samplefmt.h" + #include "hwcontext.h" ++#if CONFIG_SAND ++#include "rpi_sand_fns.h" ++#endif + + #if FF_API_OLD_CHANNEL_LAYOUT + #define CHECK_CHANNELS_CONSISTENCY(frame) \ +@@ -875,6 +880,12 @@ int av_frame_apply_cropping(AVFrame *fra + (frame->crop_top + frame->crop_bottom) >= frame->height) + return AVERROR(ERANGE); + ++#if CONFIG_SAND ++ // Sand cannot be cropped - do not try ++ if (av_rpi_is_sand_format(frame->format)) ++ return 0; ++#endif ++ + desc = av_pix_fmt_desc_get(frame->format); + if (!desc) + return AVERROR_BUG; +--- a/libavutil/frame.h ++++ b/libavutil/frame.h +@@ -940,6 +940,16 @@ int av_frame_apply_cropping(AVFrame *fra + */ + const char *av_frame_side_data_name(enum AVFrameSideDataType type); + ++ ++static inline int av_frame_cropped_width(const AVFrame * const frame) ++{ ++ return frame->width - (frame->crop_left + frame->crop_right); ++} ++static inline int av_frame_cropped_height(const AVFrame * const frame) ++{ ++ return frame->height - (frame->crop_top + frame->crop_bottom); ++} ++ + /** + * @} + */ +--- a/libavutil/hwcontext_drm.c ++++ b/libavutil/hwcontext_drm.c +@@ -21,6 +21,7 @@ + #include + #include + #include ++#include + + /* This was introduced in version 4.6. And may not exist all without an + * optional package. So to prevent a hard dependency on needing the Linux +@@ -31,6 +32,7 @@ + #endif + + #include ++#include + #include + + #include "avassert.h" +@@ -38,7 +40,9 @@ + #include "hwcontext_drm.h" + #include "hwcontext_internal.h" + #include "imgutils.h" +- ++#if CONFIG_SAND ++#include "libavutil/rpi_sand_fns.h" ++#endif + + static void drm_device_free(AVHWDeviceContext *hwdev) + { +@@ -53,6 +57,11 @@ static int drm_device_create(AVHWDeviceC + AVDRMDeviceContext *hwctx = hwdev->hwctx; + drmVersionPtr version; + ++ if (device == NULL) { ++ hwctx->fd = -1; ++ return 0; ++ } ++ + hwctx->fd = open(device, O_RDWR); + if (hwctx->fd < 0) + return AVERROR(errno); +@@ -139,6 +148,8 @@ static int drm_map_frame(AVHWFramesConte + if (flags & AV_HWFRAME_MAP_WRITE) + mmap_prot |= PROT_WRITE; + ++ if (dst->format == AV_PIX_FMT_NONE) ++ dst->format = hwfc->sw_format; + #if HAVE_LINUX_DMA_BUF_H + if (flags & AV_HWFRAME_MAP_READ) + map->sync_flags |= DMA_BUF_SYNC_READ; +@@ -185,6 +196,23 @@ static int drm_map_frame(AVHWFramesConte + + dst->width = src->width; + dst->height = src->height; ++ dst->crop_top = src->crop_top; ++ dst->crop_bottom = src->crop_bottom; ++ dst->crop_left = src->crop_left; ++ dst->crop_right = src->crop_right; ++ ++#if CONFIG_SAND ++ // Rework for sand frames ++ if (av_rpi_is_sand_frame(dst)) { ++ // As it stands the sand formats hold stride2 in linesize[3] ++ // linesize[0] & [1] contain stride1 which is always 128 for everything we do ++ // * Arguably this should be reworked s.t. stride2 is in linesize[0] & [1] ++ dst->linesize[3] = fourcc_mod_broadcom_param(desc->objects[0].format_modifier); ++ dst->linesize[0] = 128; ++ dst->linesize[1] = 128; ++ // *** Are we sure src->height is actually what we want ??? ++ } ++#endif + + err = ff_hwframe_map_create(src->hw_frames_ctx, dst, src, + &drm_unmap_frame, map); +@@ -206,16 +234,29 @@ static int drm_transfer_get_formats(AVHW + enum AVHWFrameTransferDirection dir, + enum AVPixelFormat **formats) + { +- enum AVPixelFormat *pix_fmts; ++ enum AVPixelFormat *p; + +- pix_fmts = av_malloc_array(2, sizeof(*pix_fmts)); +- if (!pix_fmts) ++ p = *formats = av_malloc_array(3, sizeof(*p)); ++ if (!p) + return AVERROR(ENOMEM); + +- pix_fmts[0] = ctx->sw_format; +- pix_fmts[1] = AV_PIX_FMT_NONE; ++ // **** Offer native sand too ???? ++ *p++ = ++#if CONFIG_SAND ++ ctx->sw_format == AV_PIX_FMT_RPI4_8 || ctx->sw_format == AV_PIX_FMT_SAND128 ? ++ AV_PIX_FMT_YUV420P : ++ ctx->sw_format == AV_PIX_FMT_RPI4_10 ? ++ AV_PIX_FMT_YUV420P10LE : ++#endif ++ ctx->sw_format; ++ ++#if CONFIG_SAND ++ if (ctx->sw_format == AV_PIX_FMT_RPI4_10 || ++ ctx->sw_format == AV_PIX_FMT_RPI4_8 || ctx->sw_format == AV_PIX_FMT_SAND128) ++ *p++ = AV_PIX_FMT_NV12; ++#endif + +- *formats = pix_fmts; ++ *p = AV_PIX_FMT_NONE; + return 0; + } + +@@ -231,18 +272,62 @@ static int drm_transfer_data_from(AVHWFr + map = av_frame_alloc(); + if (!map) + return AVERROR(ENOMEM); +- map->format = dst->format; + ++ // Map to default ++ map->format = AV_PIX_FMT_NONE; + err = drm_map_frame(hwfc, map, src, AV_HWFRAME_MAP_READ); + if (err) + goto fail; + +- map->width = dst->width; +- map->height = dst->height; ++#if 0 ++ av_log(hwfc, AV_LOG_INFO, "%s: src fmt=%d (%d), dst fmt=%d (%d) s=%dx%d l=%d/%d/%d/%d, d=%dx%d l=%d/%d/%d\n", __func__, ++ hwfc->sw_format, AV_PIX_FMT_RPI4_8, dst->format, AV_PIX_FMT_YUV420P10LE, ++ map->width, map->height, ++ map->linesize[0], ++ map->linesize[1], ++ map->linesize[2], ++ map->linesize[3], ++ dst->width, dst->height, ++ dst->linesize[0], ++ dst->linesize[1], ++ dst->linesize[2]); ++#endif ++#if CONFIG_SAND ++ if (av_rpi_is_sand_frame(map)) { ++ // Preserve crop - later ffmpeg code assumes that we have in that it ++ // overwrites any crop that we create with the old values ++ const unsigned int w = FFMIN(dst->width, map->width); ++ const unsigned int h = FFMIN(dst->height, map->height); ++ ++ map->crop_top = 0; ++ map->crop_bottom = 0; ++ map->crop_left = 0; ++ map->crop_right = 0; ++ ++ if (av_rpi_sand_to_planar_frame(dst, map) != 0) ++ { ++ av_log(hwfc, AV_LOG_ERROR, "%s: Incompatible output pixfmt for sand\n", __func__); ++ err = AVERROR(EINVAL); ++ goto fail; ++ } ++ ++ dst->width = w; ++ dst->height = h; ++ } ++ else ++#endif ++ { ++ // Kludge mapped h/w s.t. frame_copy works ++ map->width = dst->width; ++ map->height = dst->height; ++ err = av_frame_copy(dst, map); ++ } + +- err = av_frame_copy(dst, map); + if (err) ++ { ++ av_log(hwfc, AV_LOG_ERROR, "%s: Copy fail\n", __func__); + goto fail; ++ } + + err = 0; + fail: +@@ -257,7 +342,10 @@ static int drm_transfer_data_to(AVHWFram + int err; + + if (src->width > hwfc->width || src->height > hwfc->height) ++ { ++ av_log(hwfc, AV_LOG_ERROR, "%s: H/w mismatch: %d/%d, %d/%d\n", __func__, dst->width, hwfc->width, dst->height, hwfc->height); + return AVERROR(EINVAL); ++ } + + map = av_frame_alloc(); + if (!map) +--- a/libavutil/hwcontext_vulkan.c ++++ b/libavutil/hwcontext_vulkan.c +@@ -57,6 +57,14 @@ + #define CHECK_CU(x) FF_CUDA_CHECK_DL(cuda_cu, cu, x) + #endif + ++// Sometimes missing definitions ++#ifndef VK_EXT_VIDEO_DECODE_H264_EXTENSION_NAME ++#define VK_EXT_VIDEO_DECODE_H264_EXTENSION_NAME "VK_EXT_video_decode_h264" ++#endif ++#ifndef VK_EXT_VIDEO_DECODE_H265_EXTENSION_NAME ++#define VK_EXT_VIDEO_DECODE_H265_EXTENSION_NAME "VK_EXT_video_decode_h265" ++#endif ++ + typedef struct VulkanQueueCtx { + VkFence fence; + VkQueue queue; +--- a/libavutil/pixdesc.c ++++ b/libavutil/pixdesc.c +@@ -2491,6 +2491,50 @@ static const AVPixFmtDescriptor av_pix_f + }, + .flags = AV_PIX_FMT_FLAG_PLANAR, + }, ++ [AV_PIX_FMT_SAND128] = { ++ .name = "sand128", ++ .nb_components = 3, ++ .log2_chroma_w = 1, ++ .log2_chroma_h = 1, ++ .comp = { ++ { 0, 1, 0, 0, 8 }, /* Y */ ++ { 1, 2, 0, 0, 8 }, /* U */ ++ { 1, 2, 1, 0, 8 }, /* V */ ++ }, ++ .flags = 0, ++ }, ++ [AV_PIX_FMT_SAND64_10] = { ++ .name = "sand64_10", ++ .nb_components = 3, ++ .log2_chroma_w = 1, ++ .log2_chroma_h = 1, ++ .comp = { ++ { 0, 2, 0, 0, 10 }, /* Y */ ++ { 1, 4, 0, 0, 10 }, /* U */ ++ { 1, 4, 2, 0, 10 }, /* V */ ++ }, ++ .flags = 0, ++ }, ++ [AV_PIX_FMT_SAND64_16] = { ++ .name = "sand64_16", ++ .nb_components = 3, ++ .log2_chroma_w = 1, ++ .log2_chroma_h = 1, ++ .comp = { ++ { 0, 2, 0, 0, 16 }, /* Y */ ++ { 1, 4, 0, 0, 16 }, /* U */ ++ { 1, 4, 2, 0, 16 }, /* V */ ++ }, ++ .flags = 0, ++ }, ++ [AV_PIX_FMT_RPI4_8] = { ++ .name = "rpi4_8", ++ .flags = AV_PIX_FMT_FLAG_HWACCEL, ++ }, ++ [AV_PIX_FMT_RPI4_10] = { ++ .name = "rpi4_10", ++ .flags = AV_PIX_FMT_FLAG_HWACCEL, ++ }, + }; + + static const char * const color_range_names[] = { +--- a/libavutil/pixfmt.h ++++ b/libavutil/pixfmt.h +@@ -349,6 +349,14 @@ enum AVPixelFormat { + + AV_PIX_FMT_Y210BE, ///< packed YUV 4:2:2 like YUYV422, 20bpp, data in the high bits, big-endian + AV_PIX_FMT_Y210LE, ///< packed YUV 4:2:2 like YUYV422, 20bpp, data in the high bits, little-endian ++// RPI - not on ifdef so can be got at by calling progs ++// #define so code that uses this can know it is there ++#define AVUTIL_HAVE_PIX_FMT_SAND 1 ++ AV_PIX_FMT_SAND128, ///< 4:2:0 8-bit 128x*Y stripe, 64x*UV stripe, then next x stripe, mysterious padding ++ AV_PIX_FMT_SAND64_10, ///< 4:2:0 10-bit 64x*Y stripe, 32x*UV stripe, then next x stripe, mysterious padding ++ AV_PIX_FMT_SAND64_16, ///< 4:2:0 16-bit 64x*Y stripe, 32x*UV stripe, then next x stripe, mysterious padding ++ AV_PIX_FMT_RPI4_8, ++ AV_PIX_FMT_RPI4_10, + + AV_PIX_FMT_X2RGB10LE, ///< packed RGB 10:10:10, 30bpp, (msb)2X 10R 10G 10B(lsb), little-endian, X=unused/undefined + AV_PIX_FMT_X2RGB10BE, ///< packed RGB 10:10:10, 30bpp, (msb)2X 10R 10G 10B(lsb), big-endian, X=unused/undefined +--- /dev/null ++++ b/libavutil/rpi_sand_fn_pw.h +@@ -0,0 +1,227 @@ ++/* ++Copyright (c) 2018 Raspberry Pi (Trading) Ltd. ++All rights reserved. ++ ++Redistribution and use in source and binary forms, with or without ++modification, are permitted provided that the following conditions are met: ++ * Redistributions of source code must retain the above copyright ++ notice, this list of conditions and the following disclaimer. ++ * Redistributions in binary form must reproduce the above copyright ++ notice, this list of conditions and the following disclaimer in the ++ documentation and/or other materials provided with the distribution. ++ * Neither the name of the copyright holder nor the ++ names of its contributors may be used to endorse or promote products ++ derived from this software without specific prior written permission. ++ ++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ++ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED ++WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE ++DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY ++DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES ++(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ++LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ++ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ++SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ ++Authors: John Cox ++*/ ++ ++// * Included twice from rpi_sand_fn with different PW ++ ++#define STRCAT(x,y) x##y ++ ++#if PW == 1 ++#define pixel uint8_t ++#define FUNC(f) STRCAT(f, 8) ++#elif PW == 2 ++#define pixel uint16_t ++#define FUNC(f) STRCAT(f, 16) ++#else ++#error Unexpected PW ++#endif ++ ++// Fetches a single patch - offscreen fixup not done here ++// w <= stride1 ++// unclipped ++void FUNC(av_rpi_sand_to_planar_y)(uint8_t * dst, const unsigned int dst_stride, ++ const uint8_t * src, ++ unsigned int stride1, unsigned int stride2, ++ unsigned int _x, unsigned int y, ++ unsigned int _w, unsigned int h) ++{ ++ const unsigned int x = _x; ++ const unsigned int w = _w; ++ const unsigned int mask = stride1 - 1; ++ ++#if PW == 1 && HAVE_SAND_ASM ++ if (_x == 0) { ++ ff_rpi_sand8_lines_to_planar_y8(dst, dst_stride, ++ src, stride1, stride2, _x, y, _w, h); ++ return; ++ } ++#endif ++ ++ if ((x & ~mask) == ((x + w) & ~mask)) { ++ // All in one sand stripe ++ const uint8_t * p = src + (x & mask) + y * stride1 + (x & ~mask) * stride2; ++ for (unsigned int i = 0; i != h; ++i, dst += dst_stride, p += stride1) { ++ memcpy(dst, p, w); ++ } ++ } ++ else ++ { ++ // Two+ stripe ++ const unsigned int sstride = stride1 * stride2; ++ const uint8_t * p1 = src + (x & mask) + y * stride1 + (x & ~mask) * stride2; ++ const uint8_t * p2 = p1 + sstride - (x & mask); ++ const unsigned int w1 = stride1 - (x & mask); ++ const unsigned int w3 = (x + w) & mask; ++ const unsigned int w2 = w - (w1 + w3); ++ ++ for (unsigned int i = 0; i != h; ++i, dst += dst_stride, p1 += stride1, p2 += stride1) { ++ unsigned int j; ++ const uint8_t * p = p2; ++ uint8_t * d = dst; ++ memcpy(d, p1, w1); ++ d += w1; ++ for (j = 0; j < w2; j += stride1, d += stride1, p += sstride) { ++ memcpy(d, p, stride1); ++ } ++ memcpy(d, p, w3); ++ } ++ } ++} ++ ++// x & w in bytes but not of interleave (i.e. offset = x*2 for U&V) ++ ++void FUNC(av_rpi_sand_to_planar_c)(uint8_t * dst_u, const unsigned int dst_stride_u, ++ uint8_t * dst_v, const unsigned int dst_stride_v, ++ const uint8_t * src, ++ unsigned int stride1, unsigned int stride2, ++ unsigned int _x, unsigned int y, ++ unsigned int _w, unsigned int h) ++{ ++ const unsigned int x = _x * 2; ++ const unsigned int w = _w * 2; ++ const unsigned int mask = stride1 - 1; ++ ++#if PW == 1 && HAVE_SAND_ASM ++ if (_x == 0) { ++ ff_rpi_sand8_lines_to_planar_c8(dst_u, dst_stride_u, dst_v, dst_stride_v, ++ src, stride1, stride2, _x, y, _w, h); ++ return; ++ } ++#endif ++ ++ if ((x & ~mask) == ((x + w) & ~mask)) { ++ // All in one sand stripe ++ const uint8_t * p1 = src + (x & mask) + y * stride1 + (x & ~mask) * stride2; ++ for (unsigned int i = 0; i != h; ++i, dst_u += dst_stride_u, dst_v += dst_stride_v, p1 += stride1) { ++ pixel * du = (pixel *)dst_u; ++ pixel * dv = (pixel *)dst_v; ++ const pixel * p = (const pixel *)p1; ++ for (unsigned int k = 0; k < w; k += 2 * PW) { ++ *du++ = *p++; ++ *dv++ = *p++; ++ } ++ } ++ } ++ else ++ { ++ // Two+ stripe ++ const unsigned int sstride = stride1 * stride2; ++ const unsigned int sstride_p = (sstride - stride1) / PW; ++ ++ const uint8_t * p1 = src + (x & mask) + y * stride1 + (x & ~mask) * stride2; ++ const uint8_t * p2 = p1 + sstride - (x & mask); ++ const unsigned int w1 = stride1 - (x & mask); ++ const unsigned int w3 = (x + w) & mask; ++ const unsigned int w2 = w - (w1 + w3); ++ ++ for (unsigned int i = 0; i != h; ++i, dst_u += dst_stride_u, dst_v += dst_stride_v, p1 += stride1, p2 += stride1) { ++ unsigned int j; ++ const pixel * p = (const pixel *)p1; ++ pixel * du = (pixel *)dst_u; ++ pixel * dv = (pixel *)dst_v; ++ for (unsigned int k = 0; k < w1; k += 2 * PW) { ++ *du++ = *p++; ++ *dv++ = *p++; ++ } ++ for (j = 0, p = (const pixel *)p2; j < w2; j += stride1, p += sstride_p) { ++ for (unsigned int k = 0; k < stride1; k += 2 * PW) { ++ *du++ = *p++; ++ *dv++ = *p++; ++ } ++ } ++ for (unsigned int k = 0; k < w3; k += 2 * PW) { ++ *du++ = *p++; ++ *dv++ = *p++; ++ } ++ } ++ } ++} ++ ++void FUNC(av_rpi_planar_to_sand_c)(uint8_t * dst_c, ++ unsigned int stride1, unsigned int stride2, ++ const uint8_t * src_u, const unsigned int src_stride_u, ++ const uint8_t * src_v, const unsigned int src_stride_v, ++ unsigned int _x, unsigned int y, ++ unsigned int _w, unsigned int h) ++{ ++ const unsigned int x = _x * 2; ++ const unsigned int w = _w * 2; ++ const unsigned int mask = stride1 - 1; ++ if ((x & ~mask) == ((x + w) & ~mask)) { ++ // All in one sand stripe ++ uint8_t * p1 = dst_c + (x & mask) + y * stride1 + (x & ~mask) * stride2; ++ for (unsigned int i = 0; i != h; ++i, src_u += src_stride_u, src_v += src_stride_v, p1 += stride1) { ++ const pixel * su = (const pixel *)src_u; ++ const pixel * sv = (const pixel *)src_v; ++ pixel * p = (pixel *)p1; ++ for (unsigned int k = 0; k < w; k += 2 * PW) { ++ *p++ = *su++; ++ *p++ = *sv++; ++ } ++ } ++ } ++ else ++ { ++ // Two+ stripe ++ const unsigned int sstride = stride1 * stride2; ++ const unsigned int sstride_p = (sstride - stride1) / PW; ++ ++ const uint8_t * p1 = dst_c + (x & mask) + y * stride1 + (x & ~mask) * stride2; ++ const uint8_t * p2 = p1 + sstride - (x & mask); ++ const unsigned int w1 = stride1 - (x & mask); ++ const unsigned int w3 = (x + w) & mask; ++ const unsigned int w2 = w - (w1 + w3); ++ ++ for (unsigned int i = 0; i != h; ++i, src_u += src_stride_u, src_v += src_stride_v, p1 += stride1, p2 += stride1) { ++ unsigned int j; ++ const pixel * su = (const pixel *)src_u; ++ const pixel * sv = (const pixel *)src_v; ++ pixel * p = (pixel *)p1; ++ for (unsigned int k = 0; k < w1; k += 2 * PW) { ++ *p++ = *su++; ++ *p++ = *sv++; ++ } ++ for (j = 0, p = (pixel *)p2; j < w2; j += stride1, p += sstride_p) { ++ for (unsigned int k = 0; k < stride1; k += 2 * PW) { ++ *p++ = *su++; ++ *p++ = *sv++; ++ } ++ } ++ for (unsigned int k = 0; k < w3; k += 2 * PW) { ++ *p++ = *su++; ++ *p++ = *sv++; ++ } ++ } ++ } ++} ++ ++ ++#undef pixel ++#undef STRCAT ++#undef FUNC ++ +--- /dev/null ++++ b/libavutil/rpi_sand_fns.c +@@ -0,0 +1,447 @@ ++/* ++Copyright (c) 2018 Raspberry Pi (Trading) Ltd. ++All rights reserved. ++ ++Redistribution and use in source and binary forms, with or without ++modification, are permitted provided that the following conditions are met: ++ * Redistributions of source code must retain the above copyright ++ notice, this list of conditions and the following disclaimer. ++ * Redistributions in binary form must reproduce the above copyright ++ notice, this list of conditions and the following disclaimer in the ++ documentation and/or other materials provided with the distribution. ++ * Neither the name of the copyright holder nor the ++ names of its contributors may be used to endorse or promote products ++ derived from this software without specific prior written permission. ++ ++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ++ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED ++WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE ++DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY ++DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES ++(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ++LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ++ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ++SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ ++Authors: John Cox ++*/ ++ ++#include "config.h" ++#include ++#include ++#include "rpi_sand_fns.h" ++#include "avassert.h" ++#include "frame.h" ++ ++#if ARCH_ARM && HAVE_NEON ++#include "libavutil/arm/cpu.h" ++#include "libavutil/arm/rpi_sand_neon.h" ++#define HAVE_SAND_ASM 1 ++#elif ARCH_AARCH64 && HAVE_NEON ++#include "libavutil/aarch64/cpu.h" ++#include "libavutil/aarch64/rpi_sand_neon.h" ++#define HAVE_SAND_ASM 1 ++#else ++#define HAVE_SAND_ASM 0 ++#endif ++ ++#define PW 1 ++#include "rpi_sand_fn_pw.h" ++#undef PW ++ ++#define PW 2 ++#include "rpi_sand_fn_pw.h" ++#undef PW ++ ++#if 1 ++// Simple round ++static void cpy16_to_8(uint8_t * dst, const uint8_t * _src, unsigned int n, const unsigned int shr) ++{ ++ const unsigned int rnd = (1 << shr) >> 1; ++ const uint16_t * src = (const uint16_t *)_src; ++ ++ for (; n != 0; --n) { ++ *dst++ = (*src++ + rnd) >> shr; ++ } ++} ++#else ++// Dithered variation ++static void cpy16_to_8(uint8_t * dst, const uint8_t * _src, unsigned int n, const unsigned int shr) ++{ ++ unsigned int rnd = (1 << shr) >> 1; ++ const unsigned int mask = ((1 << shr) - 1); ++ const uint16_t * src = (const uint16_t *)_src; ++ ++ for (; n != 0; --n) { ++ rnd = *src++ + (rnd & mask); ++ *dst++ = rnd >> shr; ++ } ++} ++#endif ++ ++// Fetches a single patch - offscreen fixup not done here ++// w <= stride1 ++// unclipped ++// _x & _w in pixels, strides in bytes ++void av_rpi_sand30_to_planar_y16(uint8_t * dst, const unsigned int dst_stride, ++ const uint8_t * src, ++ unsigned int stride1, unsigned int stride2, ++ unsigned int _x, unsigned int y, ++ unsigned int _w, unsigned int h) ++{ ++ const unsigned int x0 = (_x / 3) * 4; // Byte offset of the word ++ const unsigned int xskip0 = _x - (x0 >> 2) * 3; ++ const unsigned int x1 = ((_x + _w) / 3) * 4; ++ const unsigned int xrem1 = _x + _w - (x1 >> 2) * 3; ++ const unsigned int mask = stride1 - 1; ++ const uint8_t * p0 = src + (x0 & mask) + y * stride1 + (x0 & ~mask) * stride2; ++ const unsigned int slice_inc = ((stride2 - 1) * stride1) >> 2; // RHS of a stripe to LHS of next in words ++ ++#if HAVE_SAND_ASM ++ if (_x == 0 && have_neon(av_get_cpu_flags())) { ++ ff_rpi_sand30_lines_to_planar_y16(dst, dst_stride, src, stride1, stride2, _x, y, _w, h); ++ return; ++ } ++#endif ++ ++ if (x0 == x1) { ++ // ******************* ++ // Partial single word xfer ++ return; ++ } ++ ++ for (unsigned int i = 0; i != h; ++i, dst += dst_stride, p0 += stride1) ++ { ++ unsigned int x = x0; ++ const uint32_t * p = (const uint32_t *)p0; ++ uint16_t * d = (uint16_t *)dst; ++ ++ if (xskip0 != 0) { ++ const uint32_t p3 = *p++; ++ ++ if (xskip0 == 1) ++ *d++ = (p3 >> 10) & 0x3ff; ++ *d++ = (p3 >> 20) & 0x3ff; ++ ++ if (((x += 4) & mask) == 0) ++ p += slice_inc; ++ } ++ ++ while (x != x1) { ++ const uint32_t p3 = *p++; ++ *d++ = p3 & 0x3ff; ++ *d++ = (p3 >> 10) & 0x3ff; ++ *d++ = (p3 >> 20) & 0x3ff; ++ ++ if (((x += 4) & mask) == 0) ++ p += slice_inc; ++ } ++ ++ if (xrem1 != 0) { ++ const uint32_t p3 = *p; ++ ++ *d++ = p3 & 0x3ff; ++ if (xrem1 == 2) ++ *d++ = (p3 >> 10) & 0x3ff; ++ } ++ } ++} ++ ++ ++void av_rpi_sand30_to_planar_c16(uint8_t * dst_u, const unsigned int dst_stride_u, ++ uint8_t * dst_v, const unsigned int dst_stride_v, ++ const uint8_t * src, ++ unsigned int stride1, unsigned int stride2, ++ unsigned int _x, unsigned int y, ++ unsigned int _w, unsigned int h) ++{ ++ const unsigned int x0 = (_x / 3) * 8; // Byte offset of the word ++ const unsigned int xskip0 = _x - (x0 >> 3) * 3; ++ const unsigned int x1 = ((_x + _w) / 3) * 8; ++ const unsigned int xrem1 = _x + _w - (x1 >> 3) * 3; ++ const unsigned int mask = stride1 - 1; ++ const uint8_t * p0 = src + (x0 & mask) + y * stride1 + (x0 & ~mask) * stride2; ++ const unsigned int slice_inc = ((stride2 - 1) * stride1) >> 2; // RHS of a stripe to LHS of next in words ++ ++#if HAVE_SAND_ASM ++ if (_x == 0 && have_neon(av_get_cpu_flags())) { ++ ff_rpi_sand30_lines_to_planar_c16(dst_u, dst_stride_u, dst_v, dst_stride_v, ++ src, stride1, stride2, _x, y, _w, h); ++ return; ++ } ++#endif ++ ++ if (x0 == x1) { ++ // ******************* ++ // Partial single word xfer ++ return; ++ } ++ ++ for (unsigned int i = 0; i != h; ++i, dst_u += dst_stride_u, dst_v += dst_stride_v, p0 += stride1) ++ { ++ unsigned int x = x0; ++ const uint32_t * p = (const uint32_t *)p0; ++ uint16_t * du = (uint16_t *)dst_u; ++ uint16_t * dv = (uint16_t *)dst_v; ++ ++ if (xskip0 != 0) { ++ const uint32_t p3a = *p++; ++ const uint32_t p3b = *p++; ++ ++ if (xskip0 == 1) ++ { ++ *du++ = (p3a >> 20) & 0x3ff; ++ *dv++ = (p3b >> 0) & 0x3ff; ++ } ++ *du++ = (p3b >> 10) & 0x3ff; ++ *dv++ = (p3b >> 20) & 0x3ff; ++ ++ if (((x += 8) & mask) == 0) ++ p += slice_inc; ++ } ++ ++ while (x != x1) { ++ const uint32_t p3a = *p++; ++ const uint32_t p3b = *p++; ++ ++ *du++ = p3a & 0x3ff; ++ *dv++ = (p3a >> 10) & 0x3ff; ++ *du++ = (p3a >> 20) & 0x3ff; ++ *dv++ = p3b & 0x3ff; ++ *du++ = (p3b >> 10) & 0x3ff; ++ *dv++ = (p3b >> 20) & 0x3ff; ++ ++ if (((x += 8) & mask) == 0) ++ p += slice_inc; ++ } ++ ++ if (xrem1 != 0) { ++ const uint32_t p3a = *p++; ++ const uint32_t p3b = *p++; ++ ++ *du++ = p3a & 0x3ff; ++ *dv++ = (p3a >> 10) & 0x3ff; ++ if (xrem1 == 2) ++ { ++ *du++ = (p3a >> 20) & 0x3ff; ++ *dv++ = p3b & 0x3ff; ++ } ++ } ++ } ++} ++ ++// Fetches a single patch - offscreen fixup not done here ++// w <= stride1 ++// single lose bottom 2 bits truncation ++// _x & _w in pixels, strides in bytes ++void av_rpi_sand30_to_planar_y8(uint8_t * dst, const unsigned int dst_stride, ++ const uint8_t * src, ++ unsigned int stride1, unsigned int stride2, ++ unsigned int _x, unsigned int y, ++ unsigned int _w, unsigned int h) ++{ ++ const unsigned int x0 = (_x / 3) * 4; // Byte offset of the word ++ const unsigned int xskip0 = _x - (x0 >> 2) * 3; ++ const unsigned int x1 = ((_x + _w) / 3) * 4; ++ const unsigned int xrem1 = _x + _w - (x1 >> 2) * 3; ++ const unsigned int mask = stride1 - 1; ++ const uint8_t * p0 = src + (x0 & mask) + y * stride1 + (x0 & ~mask) * stride2; ++ const unsigned int slice_inc = ((stride2 - 1) * stride1) >> 2; // RHS of a stripe to LHS of next in words ++ ++#if HAVE_SAND_ASM ++ if (_x == 0) { ++ ff_rpi_sand30_lines_to_planar_y8(dst, dst_stride, src, stride1, stride2, _x, y, _w, h); ++ return; ++ } ++#endif ++ ++ if (x0 == x1) { ++ // ******************* ++ // Partial single word xfer ++ return; ++ } ++ ++ for (unsigned int i = 0; i != h; ++i, dst += dst_stride, p0 += stride1) ++ { ++ unsigned int x = x0; ++ const uint32_t * p = (const uint32_t *)p0; ++ uint8_t * d = dst; ++ ++ if (xskip0 != 0) { ++ const uint32_t p3 = *p++; ++ ++ if (xskip0 == 1) ++ *d++ = (p3 >> 12) & 0xff; ++ *d++ = (p3 >> 22) & 0xff; ++ ++ if (((x += 4) & mask) == 0) ++ p += slice_inc; ++ } ++ ++ while (x != x1) { ++ const uint32_t p3 = *p++; ++ *d++ = (p3 >> 2) & 0xff; ++ *d++ = (p3 >> 12) & 0xff; ++ *d++ = (p3 >> 22) & 0xff; ++ ++ if (((x += 4) & mask) == 0) ++ p += slice_inc; ++ } ++ ++ if (xrem1 != 0) { ++ const uint32_t p3 = *p; ++ ++ *d++ = (p3 >> 2) & 0xff; ++ if (xrem1 == 2) ++ *d++ = (p3 >> 12) & 0xff; ++ } ++ } ++} ++ ++ ++ ++// w/h in pixels ++void av_rpi_sand16_to_sand8(uint8_t * dst, const unsigned int dst_stride1, const unsigned int dst_stride2, ++ const uint8_t * src, const unsigned int src_stride1, const unsigned int src_stride2, ++ unsigned int w, unsigned int h, const unsigned int shr) ++{ ++ const unsigned int n = dst_stride1 / 2; ++ unsigned int j; ++ ++ // This is true for our current layouts ++ av_assert0(dst_stride1 == src_stride1); ++ ++ // As we have the same stride1 for src & dest and src is wider than dest ++ // then if we loop on src we can always write contiguously to dest ++ // We make no effort to copy an exact width - round up to nearest src stripe ++ // as we will always have storage in dest for that ++ ++#if ARCH_ARM && HAVE_NEON ++ if (shr == 3 && src_stride1 == 128) { ++ for (j = 0; j + n < w; j += dst_stride1) { ++ uint8_t * d = dst + j * dst_stride2; ++ const uint8_t * s1 = src + j * 2 * src_stride2; ++ const uint8_t * s2 = s1 + src_stride1 * src_stride2; ++ ++ ff_rpi_sand128b_stripe_to_8_10(d, s1, s2, h); ++ } ++ } ++ else ++#endif ++ { ++ for (j = 0; j + n < w; j += dst_stride1) { ++ uint8_t * d = dst + j * dst_stride2; ++ const uint8_t * s1 = src + j * 2 * src_stride2; ++ const uint8_t * s2 = s1 + src_stride1 * src_stride2; ++ ++ for (unsigned int i = 0; i != h; ++i, s1 += src_stride1, s2 += src_stride1, d += dst_stride1) { ++ cpy16_to_8(d, s1, n, shr); ++ cpy16_to_8(d + n, s2, n, shr); ++ } ++ } ++ } ++ ++ // Fix up a trailing dest half stripe ++ if (j < w) { ++ uint8_t * d = dst + j * dst_stride2; ++ const uint8_t * s1 = src + j * 2 * src_stride2; ++ ++ for (unsigned int i = 0; i != h; ++i, s1 += src_stride1, d += dst_stride1) { ++ cpy16_to_8(d, s1, n, shr); ++ } ++ } ++} ++ ++int av_rpi_sand_to_planar_frame(AVFrame * const dst, const AVFrame * const src) ++{ ++ const int w = av_frame_cropped_width(src); ++ const int h = av_frame_cropped_height(src); ++ const int x = src->crop_left; ++ const int y = src->crop_top; ++ ++ // We will crop as part of the conversion ++ dst->crop_top = 0; ++ dst->crop_left = 0; ++ dst->crop_bottom = 0; ++ dst->crop_right = 0; ++ ++ switch (src->format){ ++ case AV_PIX_FMT_SAND128: ++ case AV_PIX_FMT_RPI4_8: ++ switch (dst->format){ ++ case AV_PIX_FMT_YUV420P: ++ av_rpi_sand_to_planar_y8(dst->data[0], dst->linesize[0], ++ src->data[0], ++ av_rpi_sand_frame_stride1(src), av_rpi_sand_frame_stride2(src), ++ x, y, w, h); ++ av_rpi_sand_to_planar_c8(dst->data[1], dst->linesize[1], ++ dst->data[2], dst->linesize[2], ++ src->data[1], ++ av_rpi_sand_frame_stride1(src), av_rpi_sand_frame_stride2(src), ++ x/2, y/2, w/2, h/2); ++ break; ++ case AV_PIX_FMT_NV12: ++ av_rpi_sand_to_planar_y8(dst->data[0], dst->linesize[0], ++ src->data[0], ++ av_rpi_sand_frame_stride1(src), av_rpi_sand_frame_stride2(src), ++ x, y, w, h); ++ av_rpi_sand_to_planar_y8(dst->data[1], dst->linesize[1], ++ src->data[1], ++ av_rpi_sand_frame_stride1(src), av_rpi_sand_frame_stride2(src), ++ x/2, y/2, w, h/2); ++ break; ++ default: ++ return -1; ++ } ++ break; ++ case AV_PIX_FMT_SAND64_10: ++ switch (dst->format){ ++ case AV_PIX_FMT_YUV420P10: ++ av_rpi_sand_to_planar_y16(dst->data[0], dst->linesize[0], ++ src->data[0], ++ av_rpi_sand_frame_stride1(src), av_rpi_sand_frame_stride2(src), ++ x*2, y, w*2, h); ++ av_rpi_sand_to_planar_c16(dst->data[1], dst->linesize[1], ++ dst->data[2], dst->linesize[2], ++ src->data[1], ++ av_rpi_sand_frame_stride1(src), av_rpi_sand_frame_stride2(src), ++ x, y/2, w, h/2); ++ break; ++ default: ++ return -1; ++ } ++ break; ++ case AV_PIX_FMT_RPI4_10: ++ switch (dst->format){ ++ case AV_PIX_FMT_YUV420P10: ++ av_rpi_sand30_to_planar_y16(dst->data[0], dst->linesize[0], ++ src->data[0], ++ av_rpi_sand_frame_stride1(src), av_rpi_sand_frame_stride2(src), ++ x, y, w, h); ++ av_rpi_sand30_to_planar_c16(dst->data[1], dst->linesize[1], ++ dst->data[2], dst->linesize[2], ++ src->data[1], ++ av_rpi_sand_frame_stride1(src), av_rpi_sand_frame_stride2(src), ++ x/2, y/2, w/2, h/2); ++ break; ++ case AV_PIX_FMT_NV12: ++ av_rpi_sand30_to_planar_y8(dst->data[0], dst->linesize[0], ++ src->data[0], ++ av_rpi_sand_frame_stride1(src), av_rpi_sand_frame_stride2(src), ++ x, y, w, h); ++ av_rpi_sand30_to_planar_y8(dst->data[1], dst->linesize[1], ++ src->data[1], ++ av_rpi_sand_frame_stride1(src), av_rpi_sand_frame_stride2(src), ++ x/2, y/2, w, h/2); ++ break; ++ default: ++ return -1; ++ } ++ break; ++ default: ++ return -1; ++ } ++ ++ return av_frame_copy_props(dst, src); ++} +--- /dev/null ++++ b/libavutil/rpi_sand_fns.h +@@ -0,0 +1,188 @@ ++/* ++Copyright (c) 2018 Raspberry Pi (Trading) Ltd. ++All rights reserved. ++ ++Redistribution and use in source and binary forms, with or without ++modification, are permitted provided that the following conditions are met: ++ * Redistributions of source code must retain the above copyright ++ notice, this list of conditions and the following disclaimer. ++ * Redistributions in binary form must reproduce the above copyright ++ notice, this list of conditions and the following disclaimer in the ++ documentation and/or other materials provided with the distribution. ++ * Neither the name of the copyright holder nor the ++ names of its contributors may be used to endorse or promote products ++ derived from this software without specific prior written permission. ++ ++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ++ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED ++WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE ++DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY ++DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES ++(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ++LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ++ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ++SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ ++Authors: John Cox ++*/ ++ ++#ifndef AVUTIL_RPI_SAND_FNS ++#define AVUTIL_RPI_SAND_FNS ++ ++#include "libavutil/frame.h" ++ ++// For all these fns _x & _w are measured as coord * PW ++// For the C fns coords are in chroma pels (so luma / 2) ++// Strides are in bytes ++ ++void av_rpi_sand_to_planar_y8(uint8_t * dst, const unsigned int dst_stride, ++ const uint8_t * src, ++ unsigned int stride1, unsigned int stride2, ++ unsigned int _x, unsigned int y, ++ unsigned int _w, unsigned int h); ++void av_rpi_sand_to_planar_y16(uint8_t * dst, const unsigned int dst_stride, ++ const uint8_t * src, ++ unsigned int stride1, unsigned int stride2, ++ unsigned int _x, unsigned int y, ++ unsigned int _w, unsigned int h); ++ ++void av_rpi_sand_to_planar_c8(uint8_t * dst_u, const unsigned int dst_stride_u, ++ uint8_t * dst_v, const unsigned int dst_stride_v, ++ const uint8_t * src, ++ unsigned int stride1, unsigned int stride2, ++ unsigned int _x, unsigned int y, ++ unsigned int _w, unsigned int h); ++void av_rpi_sand_to_planar_c16(uint8_t * dst_u, const unsigned int dst_stride_u, ++ uint8_t * dst_v, const unsigned int dst_stride_v, ++ const uint8_t * src, ++ unsigned int stride1, unsigned int stride2, ++ unsigned int _x, unsigned int y, ++ unsigned int _w, unsigned int h); ++ ++void av_rpi_planar_to_sand_c8(uint8_t * dst_c, ++ unsigned int stride1, unsigned int stride2, ++ const uint8_t * src_u, const unsigned int src_stride_u, ++ const uint8_t * src_v, const unsigned int src_stride_v, ++ unsigned int _x, unsigned int y, ++ unsigned int _w, unsigned int h); ++void av_rpi_planar_to_sand_c16(uint8_t * dst_c, ++ unsigned int stride1, unsigned int stride2, ++ const uint8_t * src_u, const unsigned int src_stride_u, ++ const uint8_t * src_v, const unsigned int src_stride_v, ++ unsigned int _x, unsigned int y, ++ unsigned int _w, unsigned int h); ++ ++void av_rpi_sand30_to_planar_y16(uint8_t * dst, const unsigned int dst_stride, ++ const uint8_t * src, ++ unsigned int stride1, unsigned int stride2, ++ unsigned int _x, unsigned int y, ++ unsigned int _w, unsigned int h); ++void av_rpi_sand30_to_planar_c16(uint8_t * dst_u, const unsigned int dst_stride_u, ++ uint8_t * dst_v, const unsigned int dst_stride_v, ++ const uint8_t * src, ++ unsigned int stride1, unsigned int stride2, ++ unsigned int _x, unsigned int y, ++ unsigned int _w, unsigned int h); ++ ++void av_rpi_sand30_to_planar_y8(uint8_t * dst, const unsigned int dst_stride, ++ const uint8_t * src, ++ unsigned int stride1, unsigned int stride2, ++ unsigned int _x, unsigned int y, ++ unsigned int _w, unsigned int h); ++ ++// w/h in pixels ++void av_rpi_sand16_to_sand8(uint8_t * dst, const unsigned int dst_stride1, const unsigned int dst_stride2, ++ const uint8_t * src, const unsigned int src_stride1, const unsigned int src_stride2, ++ unsigned int w, unsigned int h, const unsigned int shr); ++ ++ ++// dst must contain required pixel format & allocated data buffers ++// Cropping on the src buffer will be honoured and dst crop will be set to zero ++int av_rpi_sand_to_planar_frame(AVFrame * const dst, const AVFrame * const src); ++ ++ ++static inline unsigned int av_rpi_sand_frame_stride1(const AVFrame * const frame) ++{ ++#ifdef RPI_ZC_SAND128_ONLY ++ // If we are sure we only only support 128 byte sand formats replace the ++ // var with a constant which should allow for better optimisation ++ return 128; ++#else ++ return frame->linesize[0]; ++#endif ++} ++ ++static inline unsigned int av_rpi_sand_frame_stride2(const AVFrame * const frame) ++{ ++ return frame->linesize[3]; ++} ++ ++ ++static inline int av_rpi_is_sand_format(const int format) ++{ ++ return (format >= AV_PIX_FMT_SAND128 && format <= AV_PIX_FMT_RPI4_10); ++} ++ ++static inline int av_rpi_is_sand_frame(const AVFrame * const frame) ++{ ++ return av_rpi_is_sand_format(frame->format); ++} ++ ++static inline int av_rpi_is_sand8_frame(const AVFrame * const frame) ++{ ++ return (frame->format == AV_PIX_FMT_SAND128 || frame->format == AV_PIX_FMT_RPI4_8); ++} ++ ++static inline int av_rpi_is_sand16_frame(const AVFrame * const frame) ++{ ++ return (frame->format >= AV_PIX_FMT_SAND64_10 && frame->format <= AV_PIX_FMT_SAND64_16); ++} ++ ++static inline int av_rpi_is_sand30_frame(const AVFrame * const frame) ++{ ++ return (frame->format == AV_PIX_FMT_RPI4_10); ++} ++ ++static inline int av_rpi_sand_frame_xshl(const AVFrame * const frame) ++{ ++ return av_rpi_is_sand8_frame(frame) ? 0 : 1; ++} ++ ++// If x is measured in bytes (not pixels) then this works for sand64_16 as ++// well as sand128 - but in the general case we work that out ++ ++static inline unsigned int av_rpi_sand_frame_off_y(const AVFrame * const frame, const unsigned int x_y, const unsigned int y) ++{ ++ const unsigned int stride1 = av_rpi_sand_frame_stride1(frame); ++ const unsigned int stride2 = av_rpi_sand_frame_stride2(frame); ++ const unsigned int x = x_y << av_rpi_sand_frame_xshl(frame); ++ const unsigned int x1 = x & (stride1 - 1); ++ const unsigned int x2 = x ^ x1; ++ ++ return x1 + stride1 * y + stride2 * x2; ++} ++ ++static inline unsigned int av_rpi_sand_frame_off_c(const AVFrame * const frame, const unsigned int x_c, const unsigned int y_c) ++{ ++ const unsigned int stride1 = av_rpi_sand_frame_stride1(frame); ++ const unsigned int stride2 = av_rpi_sand_frame_stride2(frame); ++ const unsigned int x = x_c << (av_rpi_sand_frame_xshl(frame) + 1); ++ const unsigned int x1 = x & (stride1 - 1); ++ const unsigned int x2 = x ^ x1; ++ ++ return x1 + stride1 * y_c + stride2 * x2; ++} ++ ++static inline uint8_t * av_rpi_sand_frame_pos_y(const AVFrame * const frame, const unsigned int x, const unsigned int y) ++{ ++ return frame->data[0] + av_rpi_sand_frame_off_y(frame, x, y); ++} ++ ++static inline uint8_t * av_rpi_sand_frame_pos_c(const AVFrame * const frame, const unsigned int x, const unsigned int y) ++{ ++ return frame->data[1] + av_rpi_sand_frame_off_c(frame, x, y); ++} ++ ++#endif ++ +--- a/libswscale/aarch64/rgb2rgb.c ++++ b/libswscale/aarch64/rgb2rgb.c +@@ -30,6 +30,12 @@ + void ff_interleave_bytes_neon(const uint8_t *src1, const uint8_t *src2, + uint8_t *dest, int width, int height, + int src1Stride, int src2Stride, int dstStride); ++void ff_bgr24toyv12_aarch64(const uint8_t *src, uint8_t *ydst, uint8_t *udst, ++ uint8_t *vdst, int width, int height, int lumStride, ++ int chromStride, int srcStride, int32_t *rgb2yuv); ++void ff_rgb24toyv12_aarch64(const uint8_t *src, uint8_t *ydst, uint8_t *udst, ++ uint8_t *vdst, int width, int height, int lumStride, ++ int chromStride, int srcStride, int32_t *rgb2yuv); + + av_cold void rgb2rgb_init_aarch64(void) + { +@@ -37,5 +43,7 @@ av_cold void rgb2rgb_init_aarch64(void) + + if (have_neon(cpu_flags)) { + interleaveBytes = ff_interleave_bytes_neon; ++ ff_rgb24toyv12 = ff_rgb24toyv12_aarch64; ++ ff_bgr24toyv12 = ff_bgr24toyv12_aarch64; + } + } +--- a/libswscale/aarch64/rgb2rgb_neon.S ++++ b/libswscale/aarch64/rgb2rgb_neon.S +@@ -77,3 +77,359 @@ function ff_interleave_bytes_neon, expor + 0: + ret + endfunc ++ ++// Expand rgb2 into r0+r1/g0+g1/b0+b1 ++.macro XRGB3Y r0, g0, b0, r1, g1, b1, r2, g2, b2 ++ uxtl \r0\().8h, \r2\().8b ++ uxtl \g0\().8h, \g2\().8b ++ uxtl \b0\().8h, \b2\().8b ++ ++ uxtl2 \r1\().8h, \r2\().16b ++ uxtl2 \g1\().8h, \g2\().16b ++ uxtl2 \b1\().8h, \b2\().16b ++.endm ++ ++// Expand rgb2 into r0+r1/g0+g1/b0+b1 ++// and pick every other el to put back into rgb2 for chroma ++.macro XRGB3YC r0, g0, b0, r1, g1, b1, r2, g2, b2 ++ XRGB3Y \r0, \g0, \b0, \r1, \g1, \b1, \r2, \g2, \b2 ++ ++ bic \r2\().8h, #0xff, LSL #8 ++ bic \g2\().8h, #0xff, LSL #8 ++ bic \b2\().8h, #0xff, LSL #8 ++.endm ++ ++.macro SMLAL3 d0, d1, s0, s1, s2, c0, c1, c2 ++ smull \d0\().4s, \s0\().4h, \c0 ++ smlal \d0\().4s, \s1\().4h, \c1 ++ smlal \d0\().4s, \s2\().4h, \c2 ++ smull2 \d1\().4s, \s0\().8h, \c0 ++ smlal2 \d1\().4s, \s1\().8h, \c1 ++ smlal2 \d1\().4s, \s2\().8h, \c2 ++.endm ++ ++// d0 may be s0 ++// s0, s2 corrupted ++.macro SHRN_Y d0, s0, s1, s2, s3, k128h ++ shrn \s0\().4h, \s0\().4s, #12 ++ shrn2 \s0\().8h, \s1\().4s, #12 ++ add \s0\().8h, \s0\().8h, \k128h\().8h // +128 (>> 3 = 16) ++ sqrshrun \d0\().8b, \s0\().8h, #3 ++ shrn \s2\().4h, \s2\().4s, #12 ++ shrn2 \s2\().8h, \s3\().4s, #12 ++ add \s2\().8h, \s2\().8h, \k128h\().8h ++ sqrshrun2 \d0\().16b, v28.8h, #3 ++.endm ++ ++.macro SHRN_C d0, s0, s1, k128b ++ shrn \s0\().4h, \s0\().4s, #14 ++ shrn2 \s0\().8h, \s1\().4s, #14 ++ sqrshrn \s0\().8b, \s0\().8h, #1 ++ add \d0\().8b, \s0\().8b, \k128b\().8b // +128 ++.endm ++ ++.macro STB2V s0, n, a ++ st1 {\s0\().b}[(\n+0)], [\a], #1 ++ st1 {\s0\().b}[(\n+1)], [\a], #1 ++.endm ++ ++.macro STB4V s0, n, a ++ STB2V \s0, (\n+0), \a ++ STB2V \s0, (\n+2), \a ++.endm ++ ++ ++// void ff_rgb24toyv12_aarch64( ++// const uint8_t *src, // x0 ++// uint8_t *ydst, // x1 ++// uint8_t *udst, // x2 ++// uint8_t *vdst, // x3 ++// int width, // w4 ++// int height, // w5 ++// int lumStride, // w6 ++// int chromStride, // w7 ++// int srcStr, // [sp, #0] ++// int32_t *rgb2yuv); // [sp, #8] ++ ++function ff_rgb24toyv12_aarch64, export=1 ++ ldr x15, [sp, #8] ++ ld3 {v3.s, v4.s, v5.s}[0], [x15], #12 ++ ld3 {v3.s, v4.s, v5.s}[1], [x15], #12 ++ ld3 {v3.s, v4.s, v5.s}[2], [x15] ++ mov v6.16b, v3.16b ++ mov v3.16b, v5.16b ++ mov v5.16b, v6.16b ++ b 99f ++endfunc ++ ++// void ff_bgr24toyv12_aarch64( ++// const uint8_t *src, // x0 ++// uint8_t *ydst, // x1 ++// uint8_t *udst, // x2 ++// uint8_t *vdst, // x3 ++// int width, // w4 ++// int height, // w5 ++// int lumStride, // w6 ++// int chromStride, // w7 ++// int srcStr, // [sp, #0] ++// int32_t *rgb2yuv); // [sp, #8] (including Mac) ++ ++// regs ++// v0-2 Src bytes - reused as chroma src ++// v3-5 Coeffs (packed very inefficiently - could be squashed) ++// v6 128b ++// v7 128h ++// v8-15 Reserved ++// v16-18 Lo Src expanded as H ++// v19 - ++// v20-22 Hi Src expanded as H ++// v23 - ++// v24 U out ++// v25 U tmp ++// v26 Y out ++// v27-29 Y tmp ++// v30 V out ++// v31 V tmp ++ ++function ff_bgr24toyv12_aarch64, export=1 ++ ldr x15, [sp, #8] ++ ld3 {v3.s, v4.s, v5.s}[0], [x15], #12 ++ ld3 {v3.s, v4.s, v5.s}[1], [x15], #12 ++ ld3 {v3.s, v4.s, v5.s}[2], [x15] ++ ++99: ++ ldr w14, [sp, #0] ++ movi v7.8b, #128 ++ uxtl v6.8h, v7.8b ++ // Ensure if nothing to do then we do nothing ++ cmp w4, #0 ++ b.le 90f ++ cmp w5, #0 ++ b.le 90f ++ // If w % 16 != 0 then -16 so we do main loop 1 fewer times with ++ // the remainder done in the tail ++ tst w4, #15 ++ b.eq 1f ++ sub w4, w4, #16 ++1: ++ ++// -------------------- Even line body - YUV ++11: ++ subs w9, w4, #0 ++ mov x10, x0 ++ mov x11, x1 ++ mov x12, x2 ++ mov x13, x3 ++ b.lt 12f ++ ++ ld3 {v0.16b, v1.16b, v2.16b}, [x10], #48 ++ subs w9, w9, #16 ++ b.le 13f ++ ++10: ++ XRGB3YC v16, v17, v18, v20, v21, v22, v0, v1, v2 ++ ++ // Testing shows it is faster to stack the smull/smlal ops together ++ // rather than interleave them between channels and indeed even the ++ // shift/add sections seem happier not interleaved ++ ++ // Y0 ++ SMLAL3 v26, v27, v16, v17, v18, v3.h[0], v4.h[0], v5.h[0] ++ // Y1 ++ SMLAL3 v28, v29, v20, v21, v22, v3.h[0], v4.h[0], v5.h[0] ++ SHRN_Y v26, v26, v27, v28, v29, v6 ++ ++ // U ++ // Vector subscript *2 as we loaded into S but are only using H ++ SMLAL3 v24, v25, v0, v1, v2, v3.h[2], v4.h[2], v5.h[2] ++ ++ // V ++ SMLAL3 v30, v31, v0, v1, v2, v3.h[4], v4.h[4], v5.h[4] ++ ++ ld3 {v0.16b, v1.16b, v2.16b}, [x10], #48 ++ ++ SHRN_C v24, v24, v25, v7 ++ SHRN_C v30, v30, v31, v7 ++ ++ subs w9, w9, #16 ++ ++ st1 {v26.16b}, [x11], #16 ++ st1 {v24.8b}, [x12], #8 ++ st1 {v30.8b}, [x13], #8 ++ ++ b.gt 10b ++ ++// -------------------- Even line tail - YUV ++// If width % 16 == 0 then simply runs once with preloaded RGB ++// If other then deals with preload & then does remaining tail ++ ++13: ++ // Body is simple copy of main loop body minus preload ++ ++ XRGB3YC v16, v17, v18, v20, v21, v22, v0, v1, v2 ++ // Y0 ++ SMLAL3 v26, v27, v16, v17, v18, v3.h[0], v4.h[0], v5.h[0] ++ // Y1 ++ SMLAL3 v28, v29, v20, v21, v22, v3.h[0], v4.h[0], v5.h[0] ++ SHRN_Y v26, v26, v27, v28, v29, v6 ++ // U ++ SMLAL3 v24, v25, v0, v1, v2, v3.h[2], v4.h[2], v5.h[2] ++ // V ++ SMLAL3 v30, v31, v0, v1, v2, v3.h[4], v4.h[4], v5.h[4] ++ ++ cmp w9, #-16 ++ ++ SHRN_C v24, v24, v25, v7 ++ SHRN_C v30, v30, v31, v7 ++ ++ // Here: ++ // w9 == 0 width % 16 == 0, tail done ++ // w9 > -16 1st tail done (16 pels), remainder still to go ++ // w9 == -16 shouldn't happen ++ // w9 > -32 2nd tail done ++ // w9 <= -32 shouldn't happen ++ ++ b.lt 2f ++ st1 {v26.16b}, [x11], #16 ++ st1 {v24.8b}, [x12], #8 ++ st1 {v30.8b}, [x13], #8 ++ cbz w9, 3f ++ ++12: ++ sub w9, w9, #16 ++ ++ tbz w9, #3, 1f ++ ld3 {v0.8b, v1.8b, v2.8b}, [x10], #24 ++1: tbz w9, #2, 1f ++ ld3 {v0.b, v1.b, v2.b}[8], [x10], #3 ++ ld3 {v0.b, v1.b, v2.b}[9], [x10], #3 ++ ld3 {v0.b, v1.b, v2.b}[10], [x10], #3 ++ ld3 {v0.b, v1.b, v2.b}[11], [x10], #3 ++1: tbz w9, #1, 1f ++ ld3 {v0.b, v1.b, v2.b}[12], [x10], #3 ++ ld3 {v0.b, v1.b, v2.b}[13], [x10], #3 ++1: tbz w9, #0, 13b ++ ld3 {v0.b, v1.b, v2.b}[14], [x10], #3 ++ b 13b ++ ++2: ++ tbz w9, #3, 1f ++ st1 {v26.8b}, [x11], #8 ++ STB4V v24, 0, x12 ++ STB4V v30, 0, x13 ++1: tbz w9, #2, 1f ++ STB4V v26 8, x11 ++ STB2V v24, 4, x12 ++ STB2V v30, 4, x13 ++1: tbz w9, #1, 1f ++ STB2V v26, 12, x11 ++ st1 {v24.b}[6], [x12], #1 ++ st1 {v30.b}[6], [x13], #1 ++1: tbz w9, #0, 1f ++ st1 {v26.b}[14], [x11] ++ st1 {v24.b}[7], [x12] ++ st1 {v30.b}[7], [x13] ++1: ++3: ++ ++// -------------------- Odd line body - Y only ++ ++ subs w5, w5, #1 ++ b.eq 90f ++ ++ subs w9, w4, #0 ++ add x0, x0, w14, sxtw ++ add x1, x1, w6, sxtw ++ mov x10, x0 ++ mov x11, x1 ++ b.lt 12f ++ ++ ld3 {v0.16b, v1.16b, v2.16b}, [x10], #48 ++ subs w9, w9, #16 ++ b.le 13f ++ ++10: ++ XRGB3Y v16, v17, v18, v20, v21, v22, v0, v1, v2 ++ // Y0 ++ SMLAL3 v26, v27, v16, v17, v18, v3.h[0], v4.h[0], v5.h[0] ++ // Y1 ++ SMLAL3 v28, v29, v20, v21, v22, v3.h[0], v4.h[0], v5.h[0] ++ ++ ld3 {v0.16b, v1.16b, v2.16b}, [x10], #48 ++ ++ SHRN_Y v26, v26, v27, v28, v29, v6 ++ ++ subs w9, w9, #16 ++ ++ st1 {v26.16b}, [x11], #16 ++ ++ b.gt 10b ++ ++// -------------------- Odd line tail - Y ++// If width % 16 == 0 then simply runs once with preloaded RGB ++// If other then deals with preload & then does remaining tail ++ ++13: ++ // Body is simple copy of main loop body minus preload ++ ++ XRGB3Y v16, v17, v18, v20, v21, v22, v0, v1, v2 ++ // Y0 ++ SMLAL3 v26, v27, v16, v17, v18, v3.h[0], v4.h[0], v5.h[0] ++ // Y1 ++ SMLAL3 v28, v29, v20, v21, v22, v3.h[0], v4.h[0], v5.h[0] ++ ++ cmp w9, #-16 ++ ++ SHRN_Y v26, v26, v27, v28, v29, v6 ++ ++ // Here: ++ // w9 == 0 width % 16 == 0, tail done ++ // w9 > -16 1st tail done (16 pels), remainder still to go ++ // w9 == -16 shouldn't happen ++ // w9 > -32 2nd tail done ++ // w9 <= -32 shouldn't happen ++ ++ b.lt 2f ++ st1 {v26.16b}, [x11], #16 ++ cbz w9, 3f ++ ++12: ++ sub w9, w9, #16 ++ ++ tbz w9, #3, 1f ++ ld3 {v0.8b, v1.8b, v2.8b}, [x10], #24 ++1: tbz w9, #2, 1f ++ ld3 {v0.b, v1.b, v2.b}[8], [x10], #3 ++ ld3 {v0.b, v1.b, v2.b}[9], [x10], #3 ++ ld3 {v0.b, v1.b, v2.b}[10], [x10], #3 ++ ld3 {v0.b, v1.b, v2.b}[11], [x10], #3 ++1: tbz w9, #1, 1f ++ ld3 {v0.b, v1.b, v2.b}[12], [x10], #3 ++ ld3 {v0.b, v1.b, v2.b}[13], [x10], #3 ++1: tbz w9, #0, 13b ++ ld3 {v0.b, v1.b, v2.b}[14], [x10], #3 ++ b 13b ++ ++2: ++ tbz w9, #3, 1f ++ st1 {v26.8b}, [x11], #8 ++1: tbz w9, #2, 1f ++ STB4V v26, 8, x11 ++1: tbz w9, #1, 1f ++ STB2V v26, 12, x11 ++1: tbz w9, #0, 1f ++ st1 {v26.b}[14], [x11] ++1: ++3: ++ ++// ------------------- Loop to start ++ ++ add x0, x0, w14, sxtw ++ add x1, x1, w6, sxtw ++ add x2, x2, w7, sxtw ++ add x3, x3, w7, sxtw ++ subs w5, w5, #1 ++ b.gt 11b ++90: ++ ret ++endfunc +--- a/libswscale/rgb2rgb.c ++++ b/libswscale/rgb2rgb.c +@@ -83,6 +83,31 @@ void (*ff_rgb24toyv12)(const uint8_t *sr + int width, int height, + int lumStride, int chromStride, int srcStride, + int32_t *rgb2yuv); ++void (*ff_bgr24toyv12)(const uint8_t *src, uint8_t *ydst, ++ uint8_t *udst, uint8_t *vdst, ++ int width, int height, ++ int lumStride, int chromStride, int srcStride, ++ int32_t *rgb2yuv); ++void (*ff_rgbxtoyv12)(const uint8_t *src, uint8_t *ydst, ++ uint8_t *udst, uint8_t *vdst, ++ int width, int height, ++ int lumStride, int chromStride, int srcStride, ++ int32_t *rgb2yuv); ++void (*ff_bgrxtoyv12)(const uint8_t *src, uint8_t *ydst, ++ uint8_t *udst, uint8_t *vdst, ++ int width, int height, ++ int lumStride, int chromStride, int srcStride, ++ int32_t *rgb2yuv); ++void (*ff_xrgbtoyv12)(const uint8_t *src, uint8_t *ydst, ++ uint8_t *udst, uint8_t *vdst, ++ int width, int height, ++ int lumStride, int chromStride, int srcStride, ++ int32_t *rgb2yuv); ++void (*ff_xbgrtoyv12)(const uint8_t *src, uint8_t *ydst, ++ uint8_t *udst, uint8_t *vdst, ++ int width, int height, ++ int lumStride, int chromStride, int srcStride, ++ int32_t *rgb2yuv); + void (*planar2x)(const uint8_t *src, uint8_t *dst, int width, int height, + int srcStride, int dstStride); + void (*interleaveBytes)(const uint8_t *src1, const uint8_t *src2, uint8_t *dst, +--- a/libswscale/rgb2rgb.h ++++ b/libswscale/rgb2rgb.h +@@ -79,6 +79,9 @@ void rgb12to15(const uint8_t *src, ui + void ff_rgb24toyv12_c(const uint8_t *src, uint8_t *ydst, uint8_t *udst, + uint8_t *vdst, int width, int height, int lumStride, + int chromStride, int srcStride, int32_t *rgb2yuv); ++void ff_bgr24toyv12_c(const uint8_t *src, uint8_t *ydst, uint8_t *udst, ++ uint8_t *vdst, int width, int height, int lumStride, ++ int chromStride, int srcStride, int32_t *rgb2yuv); + + /** + * Height should be a multiple of 2 and width should be a multiple of 16. +@@ -128,6 +131,26 @@ extern void (*ff_rgb24toyv12)(const uint + int width, int height, + int lumStride, int chromStride, int srcStride, + int32_t *rgb2yuv); ++extern void (*ff_bgr24toyv12)(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst, ++ int width, int height, ++ int lumStride, int chromStride, int srcStride, ++ int32_t *rgb2yuv); ++extern void (*ff_rgbxtoyv12)(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst, ++ int width, int height, ++ int lumStride, int chromStride, int srcStride, ++ int32_t *rgb2yuv); ++extern void (*ff_bgrxtoyv12)(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst, ++ int width, int height, ++ int lumStride, int chromStride, int srcStride, ++ int32_t *rgb2yuv); ++extern void (*ff_xrgbtoyv12)(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst, ++ int width, int height, ++ int lumStride, int chromStride, int srcStride, ++ int32_t *rgb2yuv); ++extern void (*ff_xbgrtoyv12)(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst, ++ int width, int height, ++ int lumStride, int chromStride, int srcStride, ++ int32_t *rgb2yuv); + extern void (*planar2x)(const uint8_t *src, uint8_t *dst, int width, int height, + int srcStride, int dstStride); + +--- a/libswscale/rgb2rgb_template.c ++++ b/libswscale/rgb2rgb_template.c +@@ -646,13 +646,14 @@ static inline void uyvytoyv12_c(const ui + * others are ignored in the C version. + * FIXME: Write HQ version. + */ +-void ff_rgb24toyv12_c(const uint8_t *src, uint8_t *ydst, uint8_t *udst, ++static void rgb24toyv12_x(const uint8_t *src, uint8_t *ydst, uint8_t *udst, + uint8_t *vdst, int width, int height, int lumStride, +- int chromStride, int srcStride, int32_t *rgb2yuv) ++ int chromStride, int srcStride, int32_t *rgb2yuv, ++ const uint8_t x[9]) + { +- int32_t ry = rgb2yuv[RY_IDX], gy = rgb2yuv[GY_IDX], by = rgb2yuv[BY_IDX]; +- int32_t ru = rgb2yuv[RU_IDX], gu = rgb2yuv[GU_IDX], bu = rgb2yuv[BU_IDX]; +- int32_t rv = rgb2yuv[RV_IDX], gv = rgb2yuv[GV_IDX], bv = rgb2yuv[BV_IDX]; ++ int32_t ry = rgb2yuv[x[0]], gy = rgb2yuv[x[1]], by = rgb2yuv[x[2]]; ++ int32_t ru = rgb2yuv[x[3]], gu = rgb2yuv[x[4]], bu = rgb2yuv[x[5]]; ++ int32_t rv = rgb2yuv[x[6]], gv = rgb2yuv[x[7]], bv = rgb2yuv[x[8]]; + int y; + const int chromWidth = width >> 1; + +@@ -678,6 +679,19 @@ void ff_rgb24toyv12_c(const uint8_t *src + Y = ((ry * r + gy * g + by * b) >> RGB2YUV_SHIFT) + 16; + ydst[2 * i + 1] = Y; + } ++ if ((width & 1) != 0) { ++ unsigned int b = src[6 * i + 0]; ++ unsigned int g = src[6 * i + 1]; ++ unsigned int r = src[6 * i + 2]; ++ ++ unsigned int Y = ((ry * r + gy * g + by * b) >> RGB2YUV_SHIFT) + 16; ++ unsigned int V = ((rv * r + gv * g + bv * b) >> RGB2YUV_SHIFT) + 128; ++ unsigned int U = ((ru * r + gu * g + bu * b) >> RGB2YUV_SHIFT) + 128; ++ ++ udst[i] = U; ++ vdst[i] = V; ++ ydst[2 * i] = Y; ++ } + ydst += lumStride; + src += srcStride; + +@@ -700,6 +714,15 @@ void ff_rgb24toyv12_c(const uint8_t *src + Y = ((ry * r + gy * g + by * b) >> RGB2YUV_SHIFT) + 16; + ydst[2 * i + 1] = Y; + } ++ if ((width & 1) != 0) { ++ unsigned int b = src[6 * i + 0]; ++ unsigned int g = src[6 * i + 1]; ++ unsigned int r = src[6 * i + 2]; ++ ++ unsigned int Y = ((ry * r + gy * g + by * b) >> RGB2YUV_SHIFT) + 16; ++ ++ ydst[2 * i] = Y; ++ } + udst += chromStride; + vdst += chromStride; + ydst += lumStride; +@@ -707,6 +730,147 @@ void ff_rgb24toyv12_c(const uint8_t *src + } + } + ++static const uint8_t x_rgb[9] = { ++ RY_IDX, GY_IDX, BY_IDX, ++ RU_IDX, GU_IDX, BU_IDX, ++ RV_IDX, GV_IDX, BV_IDX, ++}; ++ ++static const uint8_t x_bgr[9] = { ++ BY_IDX, GY_IDX, RY_IDX, ++ BU_IDX, GU_IDX, RU_IDX, ++ BV_IDX, GV_IDX, RV_IDX, ++}; ++ ++void ff_rgb24toyv12_c(const uint8_t *src, uint8_t *ydst, uint8_t *udst, ++ uint8_t *vdst, int width, int height, int lumStride, ++ int chromStride, int srcStride, int32_t *rgb2yuv) ++{ ++ rgb24toyv12_x(src, ydst, udst, vdst, width, height, lumStride, chromStride, srcStride, rgb2yuv, x_rgb); ++} ++ ++void ff_bgr24toyv12_c(const uint8_t *src, uint8_t *ydst, uint8_t *udst, ++ uint8_t *vdst, int width, int height, int lumStride, ++ int chromStride, int srcStride, int32_t *rgb2yuv) ++{ ++ rgb24toyv12_x(src, ydst, udst, vdst, width, height, lumStride, chromStride, srcStride, rgb2yuv, x_bgr); ++} ++ ++static void rgbxtoyv12_x(const uint8_t *src, uint8_t *ydst, uint8_t *udst, ++ uint8_t *vdst, int width, int height, int lumStride, ++ int chromStride, int srcStride, int32_t *rgb2yuv, ++ const uint8_t x[9]) ++{ ++ int32_t ry = rgb2yuv[x[0]], gy = rgb2yuv[x[1]], by = rgb2yuv[x[2]]; ++ int32_t ru = rgb2yuv[x[3]], gu = rgb2yuv[x[4]], bu = rgb2yuv[x[5]]; ++ int32_t rv = rgb2yuv[x[6]], gv = rgb2yuv[x[7]], bv = rgb2yuv[x[8]]; ++ int y; ++ const int chromWidth = width >> 1; ++ ++ for (y = 0; y < height; y += 2) { ++ int i; ++ for (i = 0; i < chromWidth; i++) { ++ unsigned int b = src[8 * i + 2]; ++ unsigned int g = src[8 * i + 1]; ++ unsigned int r = src[8 * i + 0]; ++ ++ unsigned int Y = ((ry * r + gy * g + by * b) >> RGB2YUV_SHIFT) + 16; ++ unsigned int V = ((rv * r + gv * g + bv * b) >> RGB2YUV_SHIFT) + 128; ++ unsigned int U = ((ru * r + gu * g + bu * b) >> RGB2YUV_SHIFT) + 128; ++ ++ udst[i] = U; ++ vdst[i] = V; ++ ydst[2 * i] = Y; ++ ++ b = src[8 * i + 6]; ++ g = src[8 * i + 5]; ++ r = src[8 * i + 4]; ++ ++ Y = ((ry * r + gy * g + by * b) >> RGB2YUV_SHIFT) + 16; ++ ydst[2 * i + 1] = Y; ++ } ++ if ((width & 1) != 0) { ++ unsigned int b = src[8 * i + 2]; ++ unsigned int g = src[8 * i + 1]; ++ unsigned int r = src[8 * i + 0]; ++ ++ unsigned int Y = ((ry * r + gy * g + by * b) >> RGB2YUV_SHIFT) + 16; ++ unsigned int V = ((rv * r + gv * g + bv * b) >> RGB2YUV_SHIFT) + 128; ++ unsigned int U = ((ru * r + gu * g + bu * b) >> RGB2YUV_SHIFT) + 128; ++ ++ udst[i] = U; ++ vdst[i] = V; ++ ydst[2 * i] = Y; ++ } ++ ydst += lumStride; ++ src += srcStride; ++ ++ if (y+1 == height) ++ break; ++ ++ for (i = 0; i < chromWidth; i++) { ++ unsigned int b = src[8 * i + 2]; ++ unsigned int g = src[8 * i + 1]; ++ unsigned int r = src[8 * i + 0]; ++ ++ unsigned int Y = ((ry * r + gy * g + by * b) >> RGB2YUV_SHIFT) + 16; ++ ++ ydst[2 * i] = Y; ++ ++ b = src[8 * i + 6]; ++ g = src[8 * i + 5]; ++ r = src[8 * i + 4]; ++ ++ Y = ((ry * r + gy * g + by * b) >> RGB2YUV_SHIFT) + 16; ++ ydst[2 * i + 1] = Y; ++ } ++ if ((width & 1) != 0) { ++ unsigned int b = src[8 * i + 2]; ++ unsigned int g = src[8 * i + 1]; ++ unsigned int r = src[8 * i + 0]; ++ ++ unsigned int Y = ((ry * r + gy * g + by * b) >> RGB2YUV_SHIFT) + 16; ++ ++ ydst[2 * i] = Y; ++ } ++ udst += chromStride; ++ vdst += chromStride; ++ ydst += lumStride; ++ src += srcStride; ++ } ++} ++ ++static void ff_rgbxtoyv12_c(const uint8_t *src, uint8_t *ydst, uint8_t *udst, ++ uint8_t *vdst, int width, int height, int lumStride, ++ int chromStride, int srcStride, int32_t *rgb2yuv) ++{ ++ rgbxtoyv12_x(src, ydst, udst, vdst, width, height, lumStride, chromStride, srcStride, rgb2yuv, x_rgb); ++} ++ ++static void ff_bgrxtoyv12_c(const uint8_t *src, uint8_t *ydst, uint8_t *udst, ++ uint8_t *vdst, int width, int height, int lumStride, ++ int chromStride, int srcStride, int32_t *rgb2yuv) ++{ ++ rgbxtoyv12_x(src, ydst, udst, vdst, width, height, lumStride, chromStride, srcStride, rgb2yuv, x_bgr); ++} ++ ++// As the general code does no SIMD-like ops simply adding 1 to the src address ++// will fix the ignored alpha position ++static void ff_xrgbtoyv12_c(const uint8_t *src, uint8_t *ydst, uint8_t *udst, ++ uint8_t *vdst, int width, int height, int lumStride, ++ int chromStride, int srcStride, int32_t *rgb2yuv) ++{ ++ rgbxtoyv12_x(src + 1, ydst, udst, vdst, width, height, lumStride, chromStride, srcStride, rgb2yuv, x_rgb); ++} ++ ++static void ff_xbgrtoyv12_c(const uint8_t *src, uint8_t *ydst, uint8_t *udst, ++ uint8_t *vdst, int width, int height, int lumStride, ++ int chromStride, int srcStride, int32_t *rgb2yuv) ++{ ++ rgbxtoyv12_x(src + 1, ydst, udst, vdst, width, height, lumStride, chromStride, srcStride, rgb2yuv, x_bgr); ++} ++ ++ + static void interleaveBytes_c(const uint8_t *src1, const uint8_t *src2, + uint8_t *dest, int width, int height, + int src1Stride, int src2Stride, int dstStride) +@@ -980,6 +1144,11 @@ static av_cold void rgb2rgb_init_c(void) + yuy2toyv12 = yuy2toyv12_c; + planar2x = planar2x_c; + ff_rgb24toyv12 = ff_rgb24toyv12_c; ++ ff_bgr24toyv12 = ff_bgr24toyv12_c; ++ ff_rgbxtoyv12 = ff_rgbxtoyv12_c; ++ ff_bgrxtoyv12 = ff_bgrxtoyv12_c; ++ ff_xrgbtoyv12 = ff_xrgbtoyv12_c; ++ ff_xbgrtoyv12 = ff_xbgrtoyv12_c; + interleaveBytes = interleaveBytes_c; + deinterleaveBytes = deinterleaveBytes_c; + vu9_to_vu12 = vu9_to_vu12_c; +--- a/libswscale/swscale_unscaled.c ++++ b/libswscale/swscale_unscaled.c +@@ -1654,6 +1654,91 @@ static int bgr24ToYv12Wrapper(SwsContext + return srcSliceH; + } + ++static int rgb24ToYv12Wrapper(SwsContext *c, const uint8_t *src[], ++ int srcStride[], int srcSliceY, int srcSliceH, ++ uint8_t *dst[], int dstStride[]) ++{ ++ ff_bgr24toyv12( ++ src[0], ++ dst[0] + srcSliceY * dstStride[0], ++ dst[1] + (srcSliceY >> 1) * dstStride[1], ++ dst[2] + (srcSliceY >> 1) * dstStride[2], ++ c->srcW, srcSliceH, ++ dstStride[0], dstStride[1], srcStride[0], ++ c->input_rgb2yuv_table); ++ if (dst[3]) ++ fillPlane(dst[3], dstStride[3], c->srcW, srcSliceH, srcSliceY, 255); ++ return srcSliceH; ++} ++ ++static int bgrxToYv12Wrapper(SwsContext *c, const uint8_t *src[], ++ int srcStride[], int srcSliceY, int srcSliceH, ++ uint8_t *dst[], int dstStride[]) ++{ ++ ff_bgrxtoyv12( ++ src[0], ++ dst[0] + srcSliceY * dstStride[0], ++ dst[1] + (srcSliceY >> 1) * dstStride[1], ++ dst[2] + (srcSliceY >> 1) * dstStride[2], ++ c->srcW, srcSliceH, ++ dstStride[0], dstStride[1], srcStride[0], ++ c->input_rgb2yuv_table); ++ if (dst[3]) ++ fillPlane(dst[3], dstStride[3], c->srcW, srcSliceH, srcSliceY, 255); ++ return srcSliceH; ++} ++ ++static int rgbxToYv12Wrapper(SwsContext *c, const uint8_t *src[], ++ int srcStride[], int srcSliceY, int srcSliceH, ++ uint8_t *dst[], int dstStride[]) ++{ ++ ff_rgbxtoyv12( ++ src[0], ++ dst[0] + srcSliceY * dstStride[0], ++ dst[1] + (srcSliceY >> 1) * dstStride[1], ++ dst[2] + (srcSliceY >> 1) * dstStride[2], ++ c->srcW, srcSliceH, ++ dstStride[0], dstStride[1], srcStride[0], ++ c->input_rgb2yuv_table); ++ if (dst[3]) ++ fillPlane(dst[3], dstStride[3], c->srcW, srcSliceH, srcSliceY, 255); ++ return srcSliceH; ++} ++ ++static int xbgrToYv12Wrapper(SwsContext *c, const uint8_t *src[], ++ int srcStride[], int srcSliceY, int srcSliceH, ++ uint8_t *dst[], int dstStride[]) ++{ ++ ff_xbgrtoyv12( ++ src[0], ++ dst[0] + srcSliceY * dstStride[0], ++ dst[1] + (srcSliceY >> 1) * dstStride[1], ++ dst[2] + (srcSliceY >> 1) * dstStride[2], ++ c->srcW, srcSliceH, ++ dstStride[0], dstStride[1], srcStride[0], ++ c->input_rgb2yuv_table); ++ if (dst[3]) ++ fillPlane(dst[3], dstStride[3], c->srcW, srcSliceH, srcSliceY, 255); ++ return srcSliceH; ++} ++ ++static int xrgbToYv12Wrapper(SwsContext *c, const uint8_t *src[], ++ int srcStride[], int srcSliceY, int srcSliceH, ++ uint8_t *dst[], int dstStride[]) ++{ ++ ff_xrgbtoyv12( ++ src[0], ++ dst[0] + srcSliceY * dstStride[0], ++ dst[1] + (srcSliceY >> 1) * dstStride[1], ++ dst[2] + (srcSliceY >> 1) * dstStride[2], ++ c->srcW, srcSliceH, ++ dstStride[0], dstStride[1], srcStride[0], ++ c->input_rgb2yuv_table); ++ if (dst[3]) ++ fillPlane(dst[3], dstStride[3], c->srcW, srcSliceH, srcSliceY, 255); ++ return srcSliceH; ++} ++ + static int yvu9ToYv12Wrapper(SwsContext *c, const uint8_t *src[], + int srcStride[], int srcSliceY, int srcSliceH, + uint8_t *dst[], int dstStride[]) +@@ -1977,7 +2062,6 @@ void ff_get_unscaled_swscale(SwsContext + const enum AVPixelFormat dstFormat = c->dstFormat; + const int flags = c->flags; + const int dstH = c->dstH; +- const int dstW = c->dstW; + int needsDither; + + needsDither = isAnyRGB(dstFormat) && +@@ -2035,8 +2119,34 @@ void ff_get_unscaled_swscale(SwsContext + /* bgr24toYV12 */ + if (srcFormat == AV_PIX_FMT_BGR24 && + (dstFormat == AV_PIX_FMT_YUV420P || dstFormat == AV_PIX_FMT_YUVA420P) && +- !(flags & SWS_ACCURATE_RND) && !(dstW&1)) ++ !(flags & SWS_ACCURATE_RND)) + c->convert_unscaled = bgr24ToYv12Wrapper; ++ /* rgb24toYV12 */ ++ if (srcFormat == AV_PIX_FMT_RGB24 && ++ (dstFormat == AV_PIX_FMT_YUV420P || dstFormat == AV_PIX_FMT_YUVA420P) && ++ !(flags & SWS_ACCURATE_RND)) ++ c->convert_unscaled = rgb24ToYv12Wrapper; ++ ++ /* bgrxtoYV12 */ ++ if (((srcFormat == AV_PIX_FMT_BGRA && dstFormat == AV_PIX_FMT_YUV420P) || ++ (srcFormat == AV_PIX_FMT_BGR0 && (dstFormat == AV_PIX_FMT_YUV420P || dstFormat == AV_PIX_FMT_YUVA420P))) && ++ !(flags & SWS_ACCURATE_RND)) ++ c->convert_unscaled = bgrxToYv12Wrapper; ++ /* rgbx24toYV12 */ ++ if (((srcFormat == AV_PIX_FMT_RGBA && dstFormat == AV_PIX_FMT_YUV420P) || ++ (srcFormat == AV_PIX_FMT_RGB0 && (dstFormat == AV_PIX_FMT_YUV420P || dstFormat == AV_PIX_FMT_YUVA420P))) && ++ !(flags & SWS_ACCURATE_RND)) ++ c->convert_unscaled = rgbxToYv12Wrapper; ++ /* xbgrtoYV12 */ ++ if (((srcFormat == AV_PIX_FMT_ABGR && dstFormat == AV_PIX_FMT_YUV420P) || ++ (srcFormat == AV_PIX_FMT_0BGR && (dstFormat == AV_PIX_FMT_YUV420P || dstFormat == AV_PIX_FMT_YUVA420P))) && ++ !(flags & SWS_ACCURATE_RND)) ++ c->convert_unscaled = xbgrToYv12Wrapper; ++ /* xrgb24toYV12 */ ++ if (((srcFormat == AV_PIX_FMT_ARGB && dstFormat == AV_PIX_FMT_YUV420P) || ++ (srcFormat == AV_PIX_FMT_0RGB && (dstFormat == AV_PIX_FMT_YUV420P || dstFormat == AV_PIX_FMT_YUVA420P))) && ++ !(flags & SWS_ACCURATE_RND)) ++ c->convert_unscaled = xrgbToYv12Wrapper; + + /* RGB/BGR -> RGB/BGR (no dither needed forms) */ + if (isAnyRGB(srcFormat) && isAnyRGB(dstFormat) && findRgbConvFn(c) +--- a/libswscale/tests/swscale.c ++++ b/libswscale/tests/swscale.c +@@ -23,6 +23,7 @@ + #include + #include + #include ++#include + + #undef HAVE_AV_CONFIG_H + #include "libavutil/cpu.h" +@@ -78,6 +79,15 @@ struct Results { + uint32_t crc; + }; + ++static int time_rep = 0; ++ ++static uint64_t utime(void) ++{ ++ struct timespec ts; ++ clock_gettime(CLOCK_MONOTONIC, &ts); ++ return ts.tv_nsec / 1000 + (uint64_t)ts.tv_sec * 1000000; ++} ++ + // test by ref -> src -> dst -> out & compare out against ref + // ref & out are YV12 + static int doTest(const uint8_t * const ref[4], int refStride[4], int w, int h, +@@ -174,7 +184,7 @@ static int doTest(const uint8_t * const + goto end; + } + +- printf(" %s %dx%d -> %s %3dx%3d flags=%2d", ++ printf(" %s %4dx%4d -> %s %4dx%4d flags=%2d", + desc_src->name, srcW, srcH, + desc_dst->name, dstW, dstH, + flags); +@@ -182,6 +192,17 @@ static int doTest(const uint8_t * const + + sws_scale(dstContext, (const uint8_t * const*)src, srcStride, 0, srcH, dst, dstStride); + ++ if (time_rep != 0) ++ { ++ const uint64_t now = utime(); ++ uint64_t done; ++ for (i = 1; i != time_rep; ++i) { ++ sws_scale(dstContext, (const uint8_t * const*)src, srcStride, 0, srcH, dst, dstStride); ++ } ++ done = utime(); ++ printf(" T=%7"PRId64"us ", done-now); ++ } ++ + for (i = 0; i < 4 && dstStride[i]; i++) + crc = av_crc(av_crc_get_table(AV_CRC_32_IEEE), crc, dst[i], + dstStride[i] * dstH); +@@ -355,56 +376,78 @@ static int fileTest(const uint8_t * cons + return 0; + } + +-#define W 96 +-#define H 96 +- + int main(int argc, char **argv) + { ++ unsigned int W = 96; ++ unsigned int H = 96; ++ unsigned int W2; ++ unsigned int H2; ++ unsigned int S; + enum AVPixelFormat srcFormat = AV_PIX_FMT_NONE; + enum AVPixelFormat dstFormat = AV_PIX_FMT_NONE; +- uint8_t *rgb_data = av_malloc(W * H * 4); +- const uint8_t * const rgb_src[4] = { rgb_data, NULL, NULL, NULL }; +- int rgb_stride[4] = { 4 * W, 0, 0, 0 }; +- uint8_t *data = av_malloc(4 * W * H); +- const uint8_t * const src[4] = { data, data + W * H, data + W * H * 2, data + W * H * 3 }; +- int stride[4] = { W, W, W, W }; + int x, y; + struct SwsContext *sws; + AVLFG rand; + int res = -1; + int i; + FILE *fp = NULL; +- +- if (!rgb_data || !data) +- return -1; ++ uint8_t *rgb_data; ++ uint8_t * rgb_src[4] = { NULL }; ++ int rgb_stride[4] = { 0 }; ++ uint8_t *data; ++ uint8_t * src[4] = { NULL }; ++ int stride[4] = { 0 }; + + for (i = 1; i < argc; i += 2) { ++ const char * const arg2 = argv[i+1]; ++ + if (argv[i][0] != '-' || i + 1 == argc) + goto bad_option; + if (!strcmp(argv[i], "-ref")) { +- fp = fopen(argv[i + 1], "r"); ++ fp = fopen(arg2, "r"); + if (!fp) { +- fprintf(stderr, "could not open '%s'\n", argv[i + 1]); ++ fprintf(stderr, "could not open '%s'\n", arg2); + goto error; + } + } else if (!strcmp(argv[i], "-cpuflags")) { + unsigned flags = av_get_cpu_flags(); +- int ret = av_parse_cpu_caps(&flags, argv[i + 1]); ++ int ret = av_parse_cpu_caps(&flags, arg2); + if (ret < 0) { +- fprintf(stderr, "invalid cpu flags %s\n", argv[i + 1]); ++ fprintf(stderr, "invalid cpu flags %s\n", arg2); + return ret; + } + av_force_cpu_flags(flags); + } else if (!strcmp(argv[i], "-src")) { +- srcFormat = av_get_pix_fmt(argv[i + 1]); ++ srcFormat = av_get_pix_fmt(arg2); + if (srcFormat == AV_PIX_FMT_NONE) { +- fprintf(stderr, "invalid pixel format %s\n", argv[i + 1]); ++ fprintf(stderr, "invalid pixel format %s\n", arg2); + return -1; + } + } else if (!strcmp(argv[i], "-dst")) { +- dstFormat = av_get_pix_fmt(argv[i + 1]); ++ dstFormat = av_get_pix_fmt(arg2); + if (dstFormat == AV_PIX_FMT_NONE) { +- fprintf(stderr, "invalid pixel format %s\n", argv[i + 1]); ++ fprintf(stderr, "invalid pixel format %s\n", arg2); ++ return -1; ++ } ++ } else if (!strcmp(argv[i], "-w")) { ++ char * p = NULL; ++ W = strtoul(arg2, &p, 0); ++ if (!W || *p) { ++ fprintf(stderr, "bad width %s\n", arg2); ++ return -1; ++ } ++ } else if (!strcmp(argv[i], "-h")) { ++ char * p = NULL; ++ H = strtoul(arg2, &p, 0); ++ if (!H || *p) { ++ fprintf(stderr, "bad height '%s'\n", arg2); ++ return -1; ++ } ++ } else if (!strcmp(argv[i], "-t")) { ++ char * p = NULL; ++ time_rep = (int)strtol(arg2, &p, 0); ++ if (*p) { ++ fprintf(stderr, "bad time repetitions '%s'\n", arg2); + return -1; + } + } else { +@@ -414,15 +457,34 @@ bad_option: + } + } + +- sws = sws_getContext(W / 12, H / 12, AV_PIX_FMT_RGB32, W, H, ++ S = (W + 15) & ~15; ++ rgb_data = av_mallocz(S * H * 4); ++ rgb_src[0] = rgb_data; ++ rgb_stride[0] = 4 * S; ++ data = av_mallocz(4 * S * H); ++ src[0] = data; ++ src[1] = data + S * H; ++ src[2] = data + S * H * 2; ++ src[3] = data + S * H * 3; ++ stride[0] = S; ++ stride[1] = S; ++ stride[2] = S; ++ stride[3] = S; ++ H2 = H < 96 ? 8 : H / 12; ++ W2 = W < 96 ? 8 : W / 12; ++ ++ if (!rgb_data || !data) ++ return -1; ++ ++ sws = sws_getContext(W2, H2, AV_PIX_FMT_RGB32, W, H, + AV_PIX_FMT_YUVA420P, SWS_BILINEAR, NULL, NULL, NULL); + + av_lfg_init(&rand, 1); + + for (y = 0; y < H; y++) + for (x = 0; x < W * 4; x++) +- rgb_data[ x + y * 4 * W] = av_lfg_get(&rand); +- res = sws_scale(sws, rgb_src, rgb_stride, 0, H / 12, (uint8_t * const *) src, stride); ++ rgb_data[ x + y * 4 * S] = av_lfg_get(&rand); ++ res = sws_scale(sws, (const uint8_t * const *)rgb_src, rgb_stride, 0, H2, (uint8_t * const *) src, stride); + if (res < 0 || res != H) { + res = -1; + goto error; +@@ -431,10 +493,10 @@ bad_option: + av_free(rgb_data); + + if(fp) { +- res = fileTest(src, stride, W, H, fp, srcFormat, dstFormat); ++ res = fileTest((const uint8_t * const *)src, stride, W, H, fp, srcFormat, dstFormat); + fclose(fp); + } else { +- selfTest(src, stride, W, H, srcFormat, dstFormat); ++ selfTest((const uint8_t * const *)src, stride, W, H, srcFormat, dstFormat); + res = 0; + } + error: +--- /dev/null ++++ b/pi-util/BUILD.txt +@@ -0,0 +1,67 @@ ++Building Pi FFmpeg ++================== ++ ++Current only building on a Pi is supported. ++This builds ffmpeg the way I've tested it ++ ++Get all dependencies - the current package dependencies are good enough ++ ++$ sudo apt-get build-dep ffmpeg ++ ++Configure using the pi-util/conf_native.sh script ++------------------------------------------------- ++ ++This sets the normal release options and creates an ouutput dir to build into ++The directory name will depend on system and options but will be under out/ ++ ++There are a few choices here ++ --mmal build including the legacy mmal-based decoders and zero-copy code ++ this requires appropriate libraries which currently will exist for ++ armv7 but not arm64 ++ --noshared ++ Build a static image rather than a shared library one. Static is ++ easier for testing as there is no need to worry about library ++ paths being confused and therefore running the wrong code, Shared ++ is what is needed, in most cases, when building for use by other ++ programs. ++ --usr Set install dir to /usr (i.e. system default) rather than in ++ /install ++ ++So for a static build ++--------------------- ++ ++$ pi-util/conf_native.sh --noshared ++ ++$ make -j8 -C out/ ++ ++You can now run ffmpeg directly from where it was built ++ ++For a shared build ++------------------ ++ ++There are two choices here ++ ++$ pi-util/conf_native.sh ++$ make -j8 -C out/ install ++ ++This sets the install prefix to /install and is probably what you ++want if you don't want to overwrite the system files. ++ ++You can now set LD_LIBRARY_PATH appropriately and run ffmpeg from where it was ++built. You can copy the contents of /install to /usr and that mostly ++works. The only downside is that paths in pkgconfig end up being set to the ++install directory in your build directory which may be less than ideal when ++building other packages. ++ ++The alternative if you just want to replace the system libs is: ++ ++$ pi-util/conf_native.sh --usr ++$ make -j8 -C out/ ++$ sudo pi-util/clean_usr_libs.sh ++$ sudo make -j8 -C out/ install ++ ++The clean_usr_libs.sh step wipes any existing libs & includes (for all ++architectures) from the system which helps avoid confusion when running other ++progs as you can be sure you're not running old code which is unfortunately ++easy to do otherwise. ++ +--- /dev/null ++++ b/pi-util/NOTES.txt +@@ -0,0 +1,69 @@ ++Notes on the hevc_rpi decoder & associated support code ++------------------------------------------------------- ++ ++There are 3 main parts to the existing code: ++ ++1) The decoder - this is all in libavcodec as rpi_hevc*. ++ ++2) A few filters to deal with Sand frames and a small patch to ++automatically select the sand->i420 converter when required. ++ ++3) A kludge in ffmpeg.c to display the decoded video. This could & should ++be converted into a proper ffmpeg display module. ++ ++ ++Decoder ++------- ++ ++The decoder is a modified version of the existing ffmpeg hevc decoder. ++Generally it is ~100% faster than the existing ffmpeg hevc s/w decoder. ++More complex bitstreams can be up to ~200% faster but particularly easy ++streams can cut its advantage down to ~50%. This means that a Pi3+ can ++display nearly all 8-bit 1080p30 streams and with some overclocking it can ++display most lower bitrate 10-bit 1080p30 streams - this latter case is ++not helped by the requirement to downsample to 8-bit before display on a ++Pi. ++ ++It has had co-processor offload added for inter-pred and large block ++residual transform. Various parts have had optimized ARM NEON assembler ++added and the existing ARM asm sections have been profiled and ++re-optimized for A53. The main C code has been substantially reworked at ++its lower levels in an attempt to optimize it and minimize memory ++bandwidth. To some extent code paths that deal with frame types that it ++doesn't support have been pruned. ++ ++It outputs frames in Broadcom Sand format. This is a somewhat annoying ++layout that doesn't fit into ffmpegs standard frame descriptions. It has ++vertical stripes of 128 horizontal pixels (64 in 10 bit forms) with Y for ++the stripe followed by interleaved U & V, that is then followed by the Y ++for the next stripe, etc. The final stripe is always padded to ++stripe-width. This is used in an attempt to help with cache locality and ++cut down on the number of dram bank switches. It is annoying to use for ++inter-pred with conventional processing but the way the Pi QPU (which is ++used for inter-pred) works means that it has negligible downsides here and ++the improved memory performance exceeds the overhead of the increased ++complexity in the rest of the code. ++ ++Frames must be allocated out of GPU memory (as otherwise they can't be ++accessed by the co-processors). Utility functions (in rpi_zc.c) have been ++written to make this easier. As the frames are already in GPU memory they ++can be displayed by the Pi h/w without any further copying. ++ ++ ++Known non-features ++------------------ ++ ++Frame allocation should probably be done in some other way in order to fit ++into the standard framework better. ++ ++Sand frames are currently declared as software frames, there is an ++argument that they should be hardware frames but they aren't really. ++ ++There must be a better way of auto-selecting the hevc_rpi decoder over the ++normal s/w hevc decoder, but I became confused by the existing h/w ++acceleration framework and what I wanted to do didn't seem to fit in ++neatly. ++ ++Display should be a proper device rather than a kludge in ffmpeg.c ++ ++ +--- /dev/null ++++ b/pi-util/TESTMESA.txt +@@ -0,0 +1,82 @@ ++# Setup & Build instructions for testing Argon30 mesa support (on Pi4) ++ ++# These assume that the drm_mmal test for Sand8 has been built on this Pi ++# as build relies on many of the same files ++ ++# 1st get everything required to build ffmpeg ++# If sources aren't already enabled on your Pi then enable them ++sudo su ++sed "s/#deb-src/deb-src/" /etc/apt/sources.list > /tmp/sources.list ++sed "s/#deb-src/deb-src/" /etc/apt/sources.list.d/raspi.list > /tmp/raspi.list ++mv /tmp/sources.list /etc/apt/ ++mv /tmp/raspi.list /etc/apt/sources.list.d/ ++apt update ++ ++# Get dependancies ++sudo apt build-dep ffmpeg ++ ++sudo apt install meson libepoxy-dev libxcb-dri3-dev libxcb1-dev libx11-dev libx11-xcb-dev libdrm-dev ++ ++# Enable H265 V4L2 request decoder ++sudo su ++echo dtoverlay=rpivid-v4l2 >> /boot/config.txt ++# You may also want to add more CMA if you are going to try 4k videos ++# Change the dtoverlay=vc4-fkms-v3d line in config.txt to read ++# dtoverlay=vc4-fkms-v3d,cma-512 ++reboot ++# Check it has turned up ++ls -la /dev/video* ++# This should include video19 ++# crw-rw----+ 1 root video 81, 7 Aug 4 17:25 /dev/video19 ++ ++# Currently on the Pi the linux headers from the debian distro don't match ++# the kernel that we ship and we need to update them - hopefully this step ++# will be unneeded in the future ++sudo apt install git bc bison flex libssl-dev make ++git clone --depth=1 https://github.com/raspberrypi/linux --branch rpi-5.10.y ++cd linux ++KERNEL=kernel7l ++make bcm2711_defconfig ++make headers_install ++sudo cp -r usr/include/linux /usr/include ++cd .. ++ ++# Config - this builds a staticly linked ffmpeg which is easier for testing ++pi-util/conf_native.sh --noshared ++ ++# Build (this is a bit dull) ++# If you want to poke the source the libavdevice/egl_vout.c contains the ++# output code - ++cd out/armv7-static-rel ++ ++# Check that you have actually configured V4L2 request ++grep HEVC_V4L2REQUEST config.h ++# You are hoping for ++# #define CONFIG_HEVC_V4L2REQUEST_HWACCEL 1 ++# if you get 0 then the config has failed ++ ++make -j6 ++ ++# Grab test streams ++wget http://www.jell.yfish.us/media/jellyfish-3-mbps-hd-h264.mkv ++wget http://www.jell.yfish.us/media/jellyfish-3-mbps-hd-hevc.mkv ++wget http://www.jell.yfish.us/media/jellyfish-3-mbps-hd-hevc-10bit.mkv ++ ++# Test i420 output (works currently) ++./ffmpeg -no_cvt_hw -vcodec h264_v4l2m2m -i jellyfish-3-mbps-hd-h264.mkv -f vout_egl - ++ ++# Test Sand8 output - doesn't currently work but should once you have ++# Sand8 working in drm_mmal. I can't guarantee that this will work as ++# I can't test this path with a known working format, but the debug looks ++# good. If this doesn't work & drm_mmal does with sand8 then come back to me ++# The "show_all 1" forces vout to display every frame otherwise it drops any ++# frame that would cause it to block ++./ffmpeg -no_cvt_hw -hwaccel drm -vcodec hevc -i jellyfish-3-mbps-hd-hevc.mkv -show_all 1 -f vout_egl - ++ ++# Test Sand30 - doesn't currently work ++# (Beware that when FFmpeg errors out it often leaves your teminal window ++# in a state where you need to reset it) ++./ffmpeg -no_cvt_hw -hwaccel drm -vcodec hevc -i jellyfish-3-mbps-hd-hevc-10bit.mkv -f vout_egl - ++ ++ ++ +--- /dev/null ++++ b/pi-util/clean_usr_libs.sh +@@ -0,0 +1,42 @@ ++set -e ++U=/usr/include/arm-linux-gnueabihf ++rm -rf $U/libavcodec ++rm -rf $U/libavdevice ++rm -rf $U/libavfilter ++rm -rf $U/libavformat ++rm -rf $U/libavutil ++rm -rf $U/libswresample ++rm -rf $U/libswscale ++U=/usr/include/aarch64-linux-gnu ++rm -rf $U/libavcodec ++rm -rf $U/libavdevice ++rm -rf $U/libavfilter ++rm -rf $U/libavformat ++rm -rf $U/libavutil ++rm -rf $U/libswresample ++rm -rf $U/libswscale ++U=/usr/lib/arm-linux-gnueabihf ++rm -f $U/libavcodec.* ++rm -f $U/libavdevice.* ++rm -f $U/libavfilter.* ++rm -f $U/libavformat.* ++rm -f $U/libavutil.* ++rm -f $U/libswresample.* ++rm -f $U/libswscale.* ++U=/usr/lib/arm-linux-gnueabihf/neon/vfp ++rm -f $U/libavcodec.* ++rm -f $U/libavdevice.* ++rm -f $U/libavfilter.* ++rm -f $U/libavformat.* ++rm -f $U/libavutil.* ++rm -f $U/libswresample.* ++rm -f $U/libswscale.* ++U=/usr/lib/aarch64-linux-gnu ++rm -f $U/libavcodec.* ++rm -f $U/libavdevice.* ++rm -f $U/libavfilter.* ++rm -f $U/libavformat.* ++rm -f $U/libavutil.* ++rm -f $U/libswresample.* ++rm -f $U/libswscale.* ++ +--- /dev/null ++++ b/pi-util/conf_arm64_native.sh +@@ -0,0 +1,45 @@ ++echo "Configure for ARM64 native build" ++ ++#RPI_KEEPS="-save-temps=obj" ++ ++SHARED_LIBS="--enable-shared" ++if [ "$1" == "--noshared" ]; then ++ SHARED_LIBS="--disable-shared" ++ echo Static libs ++ OUT=out/arm64-static-rel ++else ++ echo Shared libs ++ OUT=out/arm64-shared-rel ++fi ++ ++mkdir -p $OUT ++cd $OUT ++ ++A=aarch64-linux-gnu ++USR_PREFIX=`pwd`/install ++LIB_PREFIX=$USR_PREFIX/lib/$A ++INC_PREFIX=$USR_PREFIX/include/$A ++ ++../../configure \ ++ --prefix=$USR_PREFIX\ ++ --libdir=$LIB_PREFIX\ ++ --incdir=$INC_PREFIX\ ++ --disable-stripping\ ++ --disable-thumb\ ++ --disable-mmal\ ++ --enable-sand\ ++ --enable-v4l2-request\ ++ --enable-libdrm\ ++ --enable-epoxy\ ++ --enable-libudev\ ++ --enable-vout-drm\ ++ --enable-vout-egl\ ++ $SHARED_LIBS\ ++ --extra-cflags="-ggdb" ++ ++# --enable-decoder=hevc_rpi\ ++# --enable-extra-warnings\ ++# --arch=armv71\ ++ ++# gcc option for getting asm listing ++# -Wa,-ahls +--- /dev/null ++++ b/pi-util/conf_h265.2016.csv +@@ -0,0 +1,195 @@ ++1,HEVC_v1/AMP_A_Samsung_7,AMP_A_Samsung_7.bin,AMP_A_Samsung_7.md5,8 ++1,HEVC_v1/AMP_B_Samsung_7,AMP_B_Samsung_7.bin,AMP_B_Samsung_7.md5,8 ++1,HEVC_v1/AMP_D_Hisilicon_3,AMP_D_Hisilicon.bit,AMP_D_Hisilicon_3.yuv.md5,8 ++1,HEVC_v1/AMP_E_Hisilicon_3,AMP_E_Hisilicon.bit,AMP_E_Hisilicon_3.yuv.md5,8 ++1,HEVC_v1/AMP_F_Hisilicon_3,AMP_F_Hisilicon_3.bit,AMP_F_Hisilicon_3.yuv.md5,8 ++1,HEVC_v1/AMVP_A_MTK_4,AMVP_A_MTK_4.bit,AMVP_A_MTK_4.md5,8 ++1,HEVC_v1/AMVP_B_MTK_4,AMVP_B_MTK_4.bit,AMVP_B_MTK_4.md5,8 ++1,HEVC_v1/AMVP_C_Samsung_7,AMVP_C_Samsung_7.bin,AMVP_C_Samsung_7.md5,8 ++1,HEVC_v1/BUMPING_A_ericsson_1,BUMPING_A_ericsson_1.bit,BUMPING_A_ericsson_1.md5,8 ++1,HEVC_v1/CAINIT_A_SHARP_4,CAINIT_A_SHARP_4.bit,CAINIT_A_SHARP_4.md5,8 ++1,HEVC_v1/CAINIT_B_SHARP_4,CAINIT_B_SHARP_4.bit,CAINIT_B_SHARP_4.md5,8 ++1,HEVC_v1/CAINIT_C_SHARP_3,CAINIT_C_SHARP_3.bit,CAINIT_C_SHARP_3.md5,8 ++1,HEVC_v1/CAINIT_D_SHARP_3,CAINIT_D_SHARP_3.bit,CAINIT_D_SHARP_3.md5,8 ++1,HEVC_v1/CAINIT_E_SHARP_3,CAINIT_E_SHARP_3.bit,CAINIT_E_SHARP_3.md5,8 ++1,HEVC_v1/CAINIT_F_SHARP_3,CAINIT_F_SHARP_3.bit,CAINIT_F_SHARP_3.md5,8 ++1,HEVC_v1/CAINIT_G_SHARP_3,CAINIT_G_SHARP_3.bit,CAINIT_G_SHARP_3.md5,8 ++1,HEVC_v1/CAINIT_H_SHARP_3,CAINIT_H_SHARP_3.bit,CAINIT_H_SHARP_3.md5,8 ++1,HEVC_v1/CIP_A_Panasonic_3,CIP_A_Panasonic_3.bit,CIP_A_Panasonic_3_yuv.md5,8 ++1,HEVC_v1/cip_B_NEC_3,cip_B_NEC_3.bit,cip_B_NEC_3.md5,8 ++1,HEVC_v1/CIP_C_Panasonic_2,CIP_C_Panasonic_2.bit,CIP_C_Panasonic_2_yuv.md5,8 ++1,HEVC_v1/CONFWIN_A_Sony_1,CONFWIN_A_Sony_1.bit,CONFWIN_A_Sony_1.md5,8 ++1,HEVC_v1/DBLK_A_MAIN10_VIXS_4,DBLK_A_MAIN10_VIXS_4.bit,DBLK_A_MAIN10_VIXS_4.md5,10 ++1,HEVC_v1/DBLK_A_SONY_3,DBLK_A_SONY_3.bit,DBLK_A_SONY_3.bit.yuv.md5,8 ++1,HEVC_v1/DBLK_B_SONY_3,DBLK_B_SONY_3.bit,DBLK_B_SONY_3.bit.yuv.md5,8 ++1,HEVC_v1/DBLK_C_SONY_3,DBLK_C_SONY_3.bit,DBLK_C_SONY_3.bit.yuv.md5,8 ++1,HEVC_v1/DBLK_D_VIXS_2,DBLK_D_VIXS_2.bit,DBLK_D_VIXS_2_yuv.md5,8 ++1,HEVC_v1/DBLK_E_VIXS_2,DBLK_E_VIXS_2.bit,DBLK_E_VIXS_2_yuv.md5,8 ++1,HEVC_v1/DBLK_F_VIXS_2,DBLK_F_VIXS_2.bit,DBLK_F_VIXS_2_yuv.md5,8 ++1,HEVC_v1/DBLK_G_VIXS_2,DBLK_G_VIXS_2.bit,DBLK_G_VIXS_2_yuv.md5,8 ++1,HEVC_v1/DELTAQP_A_BRCM_4,DELTAQP_A_BRCM_4.bit,DELTAQP_A_BRCM_4_yuv.md5,8 ++1,HEVC_v1/DELTAQP_B_SONY_3,DELTAQP_B_SONY_3.bit,DELTAQP_B_SONY_3.bit.yuv.md5,8 ++1,HEVC_v1/DELTAQP_C_SONY_3,DELTAQP_C_SONY_3.bit,DELTAQP_C_SONY_3.bit.yuv.md5,8 ++1,HEVC_v1/DSLICE_A_HHI_5,DSLICE_A_HHI_5.bin,DSLICE_A_HHI_5.md5,8 ++1,HEVC_v1/DSLICE_B_HHI_5,DSLICE_B_HHI_5.bin,DSLICE_B_HHI_5.md5,8 ++1,HEVC_v1/DSLICE_C_HHI_5,DSLICE_C_HHI_5.bin,DSLICE_C_HHI_5.md5,8 ++1,HEVC_v1/ENTP_A_QUALCOMM_1,ENTP_A_Qualcomm_1.bit,ENTP_A_Qualcomm_1.md5,8 ++1,HEVC_v1/ENTP_B_Qualcomm_1,ENTP_B_Qualcomm_1.bit,ENTP_B_Qualcomm_1.md5,8 ++1,HEVC_v1/ENTP_C_Qualcomm_1,ENTP_C_Qualcomm_1.bit,ENTP_C_Qualcomm_1.md5,8 ++1,HEVC_v1/EXT_A_ericsson_4,EXT_A_ericsson_4.bit,EXT_A_ericsson_4.md5,8 ++1,HEVC_v1/FILLER_A_Sony_1,FILLER_A_Sony_1.bit,FILLER_A_Sony_1.md5,8 ++1,HEVC_v1/HRD_A_Fujitsu_3,HRD_A_Fujitsu_3.bin,HRD_A_Fujitsu_3.md5,8 ++1,HEVC_v1/INITQP_A_Sony_1,INITQP_A_Sony_1.bit,INITQP_A_Sony_1.md5,8 ++1,HEVC_v1/INITQP_B_Main10_Sony_1,INITQP_B_Main10_Sony_1.bit,INITQP_B_Main10_Sony_1.md5,10 ++1,HEVC_v1/ipcm_A_NEC_3,ipcm_A_NEC_3.bit,ipcm_A_NEC_3.md5,8 ++1,HEVC_v1/ipcm_B_NEC_3,ipcm_B_NEC_3.bit,ipcm_B_NEC_3.md5,8 ++1,HEVC_v1/ipcm_C_NEC_3,ipcm_C_NEC_3.bit,ipcm_C_NEC_3.md5,8 ++1,HEVC_v1/ipcm_D_NEC_3,ipcm_D_NEC_3.bit,ipcm_D_NEC_3.md5,8 ++1,HEVC_v1/ipcm_E_NEC_2,ipcm_E_NEC_2.bit,ipcm_E_NEC_2.md5,8 ++1,HEVC_v1/IPRED_A_docomo_2,IPRED_A_docomo_2.bit,IPRED_A_docomo_2.md5,8 ++1,HEVC_v1/IPRED_B_Nokia_3,IPRED_B_Nokia_3.bit,IPRED_B_Nokia_3_yuv.md5,8 ++1,HEVC_v1/IPRED_C_Mitsubishi_3,IPRED_C_Mitsubishi_3.bit,IPRED_C_Mitsubishi_3_yuv.md5,8 ++1,HEVC_v1/LS_A_Orange_2,LS_A_Orange_2.bit,LS_A_Orange_2_yuv.md5,8 ++1,HEVC_v1/LS_B_Orange_4,LS_B_Orange_4.bit,LS_B_Orange_4_yuv.md5,8 ++1,HEVC_v1/LTRPSPS_A_Qualcomm_1,LTRPSPS_A_Qualcomm_1.bit,LTRPSPS_A_Qualcomm_1.md5,8 ++1,HEVC_v1/MAXBINS_A_TI_5,MAXBINS_A_TI_5.bit,MAXBINS_A_TI_5_yuv.md5,8 ++1,HEVC_v1/MAXBINS_B_TI_5,MAXBINS_B_TI_5.bit,MAXBINS_B_TI_5_yuv.md5,8 ++1,HEVC_v1/MAXBINS_C_TI_5,MAXBINS_C_TI_5.bit,MAXBINS_C_TI_5_yuv.md5,8 ++1,HEVC_v1/MERGE_A_TI_3,MERGE_A_TI_3.bit,MERGE_A_TI_3.md5,8 ++1,HEVC_v1/MERGE_B_TI_3,MERGE_B_TI_3.bit,MERGE_B_TI_3.md5,8 ++1,HEVC_v1/MERGE_C_TI_3,MERGE_C_TI_3.bit,MERGE_C_TI_3.md5,8 ++1,HEVC_v1/MERGE_D_TI_3,MERGE_D_TI_3.bit,MERGE_D_TI_3.md5,8 ++1,HEVC_v1/MERGE_E_TI_3,MERGE_E_TI_3.bit,MERGE_E_TI_3.md5,8 ++1,HEVC_v1/MERGE_F_MTK_4,MERGE_F_MTK_4.bit,MERGE_F_MTK_4.md5,8 ++1,HEVC_v1/MERGE_G_HHI_4,MERGE_G_HHI_4.bit,MERGE_G_HHI_4.md5,8 ++1,HEVC_v1/MVCLIP_A_qualcomm_3,MVCLIP_A_qualcomm_3.bit,MVCLIP_A_qualcomm_3.yuv.md5,8 ++1,HEVC_v1/MVDL1ZERO_A_docomo_4,MVDL1ZERO_A_docomo_4.bit,MVDL1ZERO_A_docomo_4.md5,8 ++1,HEVC_v1/MVEDGE_A_qualcomm_3,MVEDGE_A_qualcomm_3.bit,MVEDGE_A_qualcomm_3.yuv.md5,8 ++1,HEVC_v1/NoOutPrior_A_Qualcomm_1,NoOutPrior_A_Qualcomm_1.bit,NoOutPrior_A_Qualcomm_1.md5,8 ++1,HEVC_v1/NoOutPrior_B_Qualcomm_1,NoOutPrior_B_Qualcomm_1.bit,NoOutPrior_B_Qualcomm_1.md5,8 ++1,HEVC_v1/NUT_A_ericsson_5,NUT_A_ericsson_5.bit,NUT_A_ericsson_5.md5,8 ++1,HEVC_v1/OPFLAG_A_Qualcomm_1,OPFLAG_A_Qualcomm_1.bit,OPFLAG_A_Qualcomm_1.md5,8 ++1,HEVC_v1/OPFLAG_B_Qualcomm_1,OPFLAG_B_Qualcomm_1.bit,OPFLAG_B_Qualcomm_1.md5,8 ++1,HEVC_v1/OPFLAG_C_Qualcomm_1,OPFLAG_C_Qualcomm_1.bit,OPFLAG_C_Qualcomm_1.md5,8 ++1,HEVC_v1/PICSIZE_A_Bossen_1,PICSIZE_A_Bossen_1.bin,PICSIZE_A_Bossen_1.md5,8 ++1,HEVC_v1/PICSIZE_B_Bossen_1,PICSIZE_B_Bossen_1.bin,PICSIZE_B_Bossen_1.md5,8 ++1,HEVC_v1/PICSIZE_C_Bossen_1,PICSIZE_C_Bossen_1.bin,PICSIZE_C_Bossen_1.md5,8 ++1,HEVC_v1/PICSIZE_D_Bossen_1,PICSIZE_D_Bossen_1.bin,PICSIZE_D_Bossen_1.md5,8 ++1,HEVC_v1/PMERGE_A_TI_3,PMERGE_A_TI_3.bit,PMERGE_A_TI_3.md5,8 ++1,HEVC_v1/PMERGE_B_TI_3,PMERGE_B_TI_3.bit,PMERGE_B_TI_3.md5,8 ++1,HEVC_v1/PMERGE_C_TI_3,PMERGE_C_TI_3.bit,PMERGE_C_TI_3.md5,8 ++1,HEVC_v1/PMERGE_D_TI_3,PMERGE_D_TI_3.bit,PMERGE_D_TI_3.md5,8 ++1,HEVC_v1/PMERGE_E_TI_3,PMERGE_E_TI_3.bit,PMERGE_E_TI_3.md5,8 ++1,HEVC_v1/POC_A_Bossen_3,POC_A_Bossen_3.bin,POC_A_Bossen_3.md5,8 ++1,HEVC_v1/PPS_A_qualcomm_7,PPS_A_qualcomm_7.bit,PPS_A_qualcomm_7.yuv.md5,8 ++1,HEVC_v1/PS_B_VIDYO_3,PS_B_VIDYO_3.bit,PS_B_VIDYO_3_yuv.md5,8 ++1,HEVC_v1/RAP_A_docomo_6,RAP_A_docomo_6.bit,RAP_A_docomo_6.md5,8 ++1,HEVC_v1/RAP_B_Bossen_2,RAP_B_Bossen_2.bit,RAP_B_Bossen_2.md5,8 ++1,HEVC_v1/RPLM_A_qualcomm_4,RPLM_A_qualcomm_4.bit,RPLM_A_qualcomm_4.yuv.md5,8 ++1,HEVC_v1/RPLM_B_qualcomm_4,RPLM_B_qualcomm_4.bit,RPLM_B_qualcomm_4.yuv.md5,8 ++1,HEVC_v1/RPS_A_docomo_5,RPS_A_docomo_5.bit,RPS_A_docomo_5.md5,8 ++1,HEVC_v1/RPS_B_qualcomm_5,RPS_B_qualcomm_5.bit,RPS_B_qualcomm_5.yuv.md5,8 ++1,HEVC_v1/RPS_C_ericsson_5,RPS_C_ericsson_5.bit,RPS_C_ericsson_5.md5,8 ++1,HEVC_v1/RPS_D_ericsson_6,RPS_D_ericsson_6.bit,RPS_D_ericsson_6.md5,8 ++1,HEVC_v1/RPS_E_qualcomm_5,RPS_E_qualcomm_5.bit,RPS_E_qualcomm_5.yuv.md5,8 ++1,HEVC_v1/RPS_F_docomo_2,RPS_F_docomo_2.bit,RPS_F_docomo_2.md5,8 ++1,HEVC_v1/RQT_A_HHI_4,RQT_A_HHI_4.bit,RQT_A_HHI_4.md5,8 ++1,HEVC_v1/RQT_B_HHI_4,RQT_B_HHI_4.bit,RQT_B_HHI_4.md5,8 ++1,HEVC_v1/RQT_C_HHI_4,RQT_C_HHI_4.bit,RQT_C_HHI_4.md5,8 ++1,HEVC_v1/RQT_D_HHI_4,RQT_D_HHI_4.bit,RQT_D_HHI_4.md5,8 ++1,HEVC_v1/RQT_E_HHI_4,RQT_E_HHI_4.bit,RQT_E_HHI_4.md5,8 ++1,HEVC_v1/RQT_F_HHI_4,RQT_F_HHI_4.bit,RQT_F_HHI_4.md5,8 ++1,HEVC_v1/RQT_G_HHI_4,RQT_G_HHI_4.bit,RQT_G_HHI_4.md5,8 ++1,HEVC_v1/SAO_A_MediaTek_4,SAO_A_MediaTek_4.bit,SAO_A_MediaTek_4.md5,8 ++1,HEVC_v1/SAO_B_MediaTek_5,SAO_B_MediaTek_5.bit,SAO_B_MediaTek_5.md5,8 ++1,HEVC_v1/SAO_C_Samsung_5,SAO_C_Samsung_5.bin,SAO_C_Samsung_5.md5,8 ++1,HEVC_v1/SAO_D_Samsung_5,SAO_D_Samsung_5.bin,SAO_D_Samsung_5.md5,8 ++1,HEVC_v1/SAO_E_Canon_4,SAO_E_Canon_4.bit,SAO_E_Canon_4.md5,8 ++1,HEVC_v1/SAO_F_Canon_3,SAO_F_Canon_3.bit,SAO_F_Canon_3.md5,8 ++1,HEVC_v1/SAO_G_Canon_3,SAO_G_Canon_3.bit,SAO_G_Canon_3.md5,8 ++1,HEVC_v1/SAO_H_Parabola_1,SAO_H_Parabola_1.bit,SAO_H_Parabola_1.md5,8 ++1,HEVC_v1/SAODBLK_A_MainConcept_4,SAODBLK_A_MainConcept_4.bin,SAODBLK_A_MainConcept_4_md5.txt,8 ++1,HEVC_v1/SAODBLK_B_MainConcept_4,SAODBLK_B_MainConcept_4.bin,SAODBLK_B_MainConcept_4_md5.txt,8 ++1,HEVC_v1/SDH_A_Orange_4,SDH_A_Orange_4.bit,SDH_A_Orange_4_yuv.md5,8 ++1,HEVC_v1/SLICES_A_Rovi_3,SLICES_A_Rovi_3.bin,SLICES_A_Rovi_3.md5,8 ++1,HEVC_v1/SLIST_A_Sony_5,SLIST_A_Sony_5.bin,SLIST_A_Sony_5_yuv.md5,8 ++1,HEVC_v1/SLIST_B_Sony_9,SLIST_B_Sony_9.bin,SLIST_B_Sony_9_yuv.md5,8 ++1,HEVC_v1/SLIST_C_Sony_4,SLIST_C_Sony_4.bin,SLIST_C_Sony_4_yuv.md5,8 ++1,HEVC_v1/SLIST_D_Sony_9,str.bin,SLIST_D_Sony_9_yuv.md5,8 ++1,HEVC_v1/SLPPLP_A_VIDYO_2,SLPPLP_A_VIDYO_2.bit,SLPPLP_A_VIDYO_2_yuv.md5,8 ++1,HEVC_v1/STRUCT_A_Samsung_7,STRUCT_A_Samsung_7.bin,STRUCT_A_Samsung_7.md5,8 ++1,HEVC_v1/STRUCT_B_Samsung_7,STRUCT_B_Samsung_7.bin,STRUCT_B_Samsung_7.md5,8 ++1,HEVC_v1/TILES_A_Cisco_2,TILES_A_Cisco_2.bin,TILES_A_Cisco_2_yuv.md5,8 ++1,HEVC_v1/TILES_B_Cisco_1,TILES_B_Cisco_1.bin,TILES_B_Cisco_1_yuv.md5,8 ++1,HEVC_v1/TMVP_A_MS_3,TMVP_A_MS_3.bit,TMVP_A_MS_3.yuv.md5,8 ++1,HEVC_v1/TSCL_A_VIDYO_5,TSCL_A_VIDYO_5.bit,TSCL_A_VIDYO_5_yuv.md5,8 ++1,HEVC_v1/TSCL_B_VIDYO_4,TSCL_B_VIDYO_4.bit,TSCL_B_VIDYO_4_yuv.md5,8 ++1,HEVC_v1/TSKIP_A_MS_3,TSKIP_A_MS_3.bit,TSKIP_A_MS_3.yuv.md5,8 ++3,HEVC_v1/TSUNEQBD_A_MAIN10_Technicolor_2,TSUNEQBD_A_MAIN10_Technicolor_2.bit,TSUNEQBD_A_MAIN10_Technicolor_2_yuv.md5, # unequal bit depth,10 ++1,HEVC_v1/TUSIZE_A_Samsung_1,TUSIZE_A_Samsung_1.bin,TUSIZE_A_Samsung_1.md5,8 ++1,HEVC_v1/VPSID_A_VIDYO_2,VPSID_A_VIDYO_2.bit,VPSID_A_VIDYO_2_yuv.md5,8 ++3,HEVC_v1/VPSSPSPPS_A_MainConcept_1,VPSSPSPPS_A_MainConcept_1.bin,VPSSPSPPS_A_MainConcept_1_md5.txt, # ???,8 ++1,HEVC_v1/WP_A_MAIN10_Toshiba_3,WP_A_MAIN10_Toshiba_3.bit,WP_A_MAIN10_Toshiba_3_yuv.md5,10 ++1,HEVC_v1/WP_A_Toshiba_3,WP_A_Toshiba_3.bit,WP_A_Toshiba_3_yuv.md5,8 ++1,HEVC_v1/WP_B_Toshiba_3,WP_B_Toshiba_3.bit,WP_B_Toshiba_3_yuv.md5,8 ++1,HEVC_v1/WP_MAIN10_B_Toshiba_3,WP_MAIN10_B_Toshiba_3.bit,WP_MAIN10_B_Toshiba_3_yuv.md5,10 ++1,HEVC_v1/WPP_A_ericsson_MAIN10_2,WPP_A_ericsson_MAIN10_2.bit,WPP_A_ericsson_MAIN10_yuv.md5,10 ++1,HEVC_v1/WPP_A_ericsson_MAIN_2,WPP_A_ericsson_MAIN_2.bit,WPP_A_ericsson_MAIN_2_yuv.md5,8 ++1,HEVC_v1/WPP_B_ericsson_MAIN10_2,WPP_B_ericsson_MAIN10_2.bit,WPP_B_ericsson_MAIN10_yuv.md5,10 ++1,HEVC_v1/WPP_B_ericsson_MAIN_2,WPP_B_ericsson_MAIN_2.bit,WPP_B_ericsson_MAIN_2_yuv.md5,8 ++1,HEVC_v1/WPP_C_ericsson_MAIN10_2,WPP_C_ericsson_MAIN10_2.bit,WPP_C_ericsson_MAIN10_yuv.md5,10 ++1,HEVC_v1/WPP_C_ericsson_MAIN_2,WPP_C_ericsson_MAIN_2.bit,WPP_C_ericsson_MAIN_2_yuv.md5,8 ++1,HEVC_v1/WPP_D_ericsson_MAIN10_2,WPP_D_ericsson_MAIN10_2.bit,WPP_D_ericsson_MAIN10_yuv.md5,10 ++1,HEVC_v1/WPP_D_ericsson_MAIN_2,WPP_D_ericsson_MAIN_2.bit,WPP_D_ericsson_MAIN_2_yuv.md5,8 ++1,HEVC_v1/WPP_E_ericsson_MAIN10_2,WPP_E_ericsson_MAIN10_2.bit,WPP_E_ericsson_MAIN10_yuv.md5,10 ++1,HEVC_v1/WPP_E_ericsson_MAIN_2,WPP_E_ericsson_MAIN_2.bit,WPP_E_ericsson_MAIN_2_yuv.md5,8 ++1,HEVC_v1/WPP_F_ericsson_MAIN10_2,WPP_F_ericsson_MAIN10_2.bit,WPP_F_ericsson_MAIN10_yuv.md5,10 ++1,HEVC_v1/WPP_F_ericsson_MAIN_2,WPP_F_ericsson_MAIN_2.bit,WPP_F_ericsson_MAIN_2_yuv.md5,8 ++1,RExt/ADJUST_IPRED_ANGLE_A_RExt_Mitsubishi_2,ADJUST_IPRED_ANGLE_A_RExt_Mitsubishi_2.bit,ADJUST_IPRED_ANGLE_A_RExt_Mitsubishi_yuv_2.md5,0 ++0,RExt/Bitdepth_A_RExt_Sony_1,Bitdepth_A_RExt_Sony_1.bin,md5sum.txt,8 ++0,RExt/Bitdepth_B_RExt_Sony_1,Bitdepth_B_RExt_Sony_1.bin,md5sum.txt,8 ++0,RExt/CCP_10bit_RExt_QCOM,CCP_10bit_RExt_QCOM.bin,CCP_10bit_RExt_QCOM_md5sum.txt,10 ++0,RExt/CCP_12bit_RExt_QCOM,CCP_12bit_RExt_QCOM.bin,CCP_12bit_RExt_QCOM_md5sum.txt,8 ++0,RExt/CCP_8bit_RExt_QCOM,CCP_8bit_RExt_QCOM.bin,CCP_8bit_RExt_QCOM_md5sum.txt,8 ++1,RExt/ExplicitRdpcm_A_BBC_1,ExplicitRdpcm_A_BBC_1.bit,md5sum.txt,0 ++0,RExt/ExplicitRdpcm_B_BBC_2,ExplicitRdpcm_B_BBC_1.bit,md5sum.txt,8 ++0,RExt/EXTPREC_HIGHTHROUGHPUT_444_16_INTRA_10BIT_RExt_Sony_1,EXTPREC_HIGHTHROUGHPUT_444_16_INTRA_10BIT_RExt_Sony_1.bit,EXTPREC_HIGHTHROUGHPUT_444_16_INTRA_10BIT_RExt_Sony_1.md5,10 ++0,RExt/EXTPREC_HIGHTHROUGHPUT_444_16_INTRA_12BIT_RExt_Sony_1,EXTPREC_HIGHTHROUGHPUT_444_16_INTRA_12BIT_RExt_Sony_1.bit,EXTPREC_HIGHTHROUGHPUT_444_16_INTRA_12BIT_RExt_Sony_1.md5,8 ++0,RExt/EXTPREC_HIGHTHROUGHPUT_444_16_INTRA_16BIT_RExt_Sony_1,EXTPREC_HIGHTHROUGHPUT_444_16_INTRA_16BIT_RExt_Sony_1.bit,EXTPREC_HIGHTHROUGHPUT_444_16_INTRA_16BIT_RExt_Sony_1.md5,8 ++0,RExt/EXTPREC_HIGHTHROUGHPUT_444_16_INTRA_8BIT_RExt_Sony_1,EXTPREC_HIGHTHROUGHPUT_444_16_INTRA_8BIT_RExt_Sony_1.bit,EXTPREC_HIGHTHROUGHPUT_444_16_INTRA_8BIT_RExt_Sony_1.md5,8 ++0,RExt/EXTPREC_MAIN_444_16_INTRA_10BIT_RExt_Sony_1,EXTPREC_MAIN_444_16_INTRA_10BIT_RExt_Sony_1.bit,EXTPREC_MAIN_444_16_INTRA_10BIT_RExt_Sony_1.md5,10 ++0,RExt/EXTPREC_MAIN_444_16_INTRA_12BIT_RExt_Sony_1,EXTPREC_MAIN_444_16_INTRA_12BIT_RExt_Sony_1.bit,EXTPREC_MAIN_444_16_INTRA_12BIT_RExt_Sony_1.md5,8 ++0,RExt/EXTPREC_MAIN_444_16_INTRA_16BIT_RExt_Sony_1,EXTPREC_MAIN_444_16_INTRA_16BIT_RExt_Sony_1.bit,EXTPREC_MAIN_444_16_INTRA_16BIT_RExt_Sony_1.md5,8 ++0,RExt/EXTPREC_MAIN_444_16_INTRA_8BIT_RExt_Sony_1,EXTPREC_MAIN_444_16_INTRA_8BIT_RExt_Sony_1.bit,EXTPREC_MAIN_444_16_INTRA_8BIT_RExt_Sony_1.md5,8 ++1,RExt/GENERAL_10b_420_RExt_Sony_1,GENERAL_10b_420_RExt_Sony_1.bit,GENERAL_10b_420_RExt_Sony_1.md5,10 ++1,RExt/GENERAL_10b_422_RExt_Sony_1,GENERAL_10b_422_RExt_Sony_1.bit,GENERAL_10b_422_RExt_Sony_1.md5,0 ++1,RExt/GENERAL_10b_444_RExt_Sony_2,GENERAL_10b_444_RExt_Sony_2.bit,GENERAL_10b_444_RExt_Sony_2.md5,0 ++1,RExt/GENERAL_12b_400_RExt_Sony_1,GENERAL_12b_400_RExt_Sony_1.bit,GENERAL_12b_400_RExt_Sony_1.md5,0 ++1,RExt/GENERAL_12b_420_RExt_Sony_1,GENERAL_12b_420_RExt_Sony_1.bit,GENERAL_12b_420_RExt_Sony_1.md5,0 ++1,RExt/GENERAL_12b_422_RExt_Sony_1,GENERAL_12b_422_RExt_Sony_1.bit,GENERAL_12b_422_RExt_Sony_1.md5,0 ++1,RExt/GENERAL_12b_444_RExt_Sony_2,GENERAL_12b_444_RExt_Sony_2.bit,GENERAL_12b_444_RExt_Sony_2.md5,0 ++0,RExt/GENERAL_16b_400_RExt_Sony_1,GENERAL_16b_400_RExt_Sony_1.bit,GENERAL_16b_400_RExt_Sony_1.md5,0 ++0,RExt/GENERAL_16b_444_highThroughput_RExt_Sony_2,GENERAL_16b_444_highThroughput_RExt_Sony_2.bit,GENERAL_16b_444_highThroughput_RExt_Sony_2.md5,8 ++0,RExt/GENERAL_16b_444_RExt_Sony_2,GENERAL_16b_444_RExt_Sony_2.bit,GENERAL_16b_444_RExt_Sony_2.md5,8 ++1,RExt/GENERAL_8b_400_RExt_Sony_1,GENERAL_8b_400_RExt_Sony_1.bit,GENERAL_8b_400_RExt_Sony_1.md5,0 ++1,RExt/GENERAL_8b_420_RExt_Sony_1,GENERAL_8b_420_RExt_Sony_1.bit,GENERAL_8b_420_RExt_Sony_1.md5,8 ++1,RExt/GENERAL_8b_444_RExt_Sony_2,GENERAL_8b_444_RExt_Sony_2.bit,GENERAL_8b_444_RExt_Sony_2.md5,0 ++1,RExt/IPCM_A_RExt_NEC_2,IPCM_A_RExt_NEC_2.bit,IPCM_A_RExt_NEC_2_yuv.md5,0 ++1,RExt/IPCM_B_RExt_NEC,IPCM_B_RExt_NEC.bit,IPCM_B_RExt_NEC_yuv.md5,0 ++1,RExt/Main_422_10_A_RExt_Sony_2,Main_422_10_A_RExt_Sony_2.bin,md5sum.txt,0 ++1,RExt/Main_422_10_B_RExt_Sony_2,Main_422_10_B_RExt_Sony_2.bin,md5sum.txt,0 ++1,RExt/PERSIST_RPARAM_A_RExt_Sony_3,PERSIST_RPARAM_A_RExt_Sony_3.bit,PERSIST_RPARAM_A_RExt_Sony_3.md5,0 ++1,RExt/QMATRIX_A_RExt_Sony_1,QMATRIX_A_RExt_Sony_1.bit,QMATRIX_A_RExt_Sony_1.md5,0 ++0,RExt/SAO_A_RExt_MediaTek_1,SAO_A_RExt_MediaTek_1.bit,SAO_A_RExt_MediaTek_1.md5, # Runs out of memory - could be fixed,8 ++0,RExt/TSCTX_10bit_I_RExt_SHARP_1,TSCTX_10bit_I_RExt_SHARP_1.bin,TSCTX_10bit_I_RExt_SHARP_1.md5,10 ++0,RExt/TSCTX_10bit_RExt_SHARP_1,TSCTX_10bit_RExt_SHARP_1.bin,TSCTX_10bit_RExt_SHARP_1.md5,10 ++0,RExt/TSCTX_12bit_I_RExt_SHARP_1,TSCTX_12bit_I_RExt_SHARP_1.bin,TSCTX_12bit_I_RExt_SHARP_1.md5,8 ++0,RExt/TSCTX_12bit_RExt_SHARP_1,TSCTX_12bit_RExt_SHARP_1.bin,TSCTX_12bit_RExt_SHARP_1.md5,8 ++0,RExt/TSCTX_8bit_I_RExt_SHARP_1,TSCTX_8bit_I_RExt_SHARP_1.bin,TSCTX_8bit_I_RExt_SHARP_1.md5,8 ++0,RExt/TSCTX_8bit_RExt_SHARP_1,TSCTX_8bit_RExt_SHARP_1.bin,TSCTX_8bit_RExt_SHARP_1.md5,8 ++0,RExt/WAVETILES_RExt_Sony_2,WAVETILES_RExt_Sony_2.bit,WAVETILES_RExt_Sony_2.md5,8 ++1,local/sao_cu16_mobile_344x280,sao_cu16_mobile_344x280.265,sao_cu16_mobile_344x280.md5,8 ++1,local/dblk_cu16_mobile_344x280,dblk_cu16_mobile_344x280.265,dblk_cu16_mobile_344x280.md5,8 ++1,local/dblksao_cu16_mobile_344x280,dblksao_cu16_mobile_344x280.265,dblksao_cu16_mobile_344x280.md5,8 ++1,local/dblk_pu32_horses_832x448,dblk_pu32_horses_832x448.265,dblk_pu32_horses_832x448.md5,8 ++1,local/intra_pred_21_laps,intra_pred_21_laps.265,intra_pred_21_laps.md5,8 +--- /dev/null ++++ b/pi-util/conf_h265.2016_HEVC_v1.csv +@@ -0,0 +1,147 @@ ++1,AMP_A_Samsung_7,AMP_A_Samsung_7.bin,AMP_A_Samsung_7.md5 ++1,AMP_B_Samsung_7,AMP_B_Samsung_7.bin,AMP_B_Samsung_7.md5 ++1,AMP_D_Hisilicon_3,AMP_D_Hisilicon.bit,AMP_D_Hisilicon_3.yuv.md5 ++1,AMP_E_Hisilicon_3,AMP_E_Hisilicon.bit,AMP_E_Hisilicon_3.yuv.md5 ++1,AMP_F_Hisilicon_3,AMP_F_Hisilicon_3.bit,AMP_F_Hisilicon_3.yuv.md5 ++1,AMVP_A_MTK_4,AMVP_A_MTK_4.bit,AMVP_A_MTK_4.md5 ++1,AMVP_B_MTK_4,AMVP_B_MTK_4.bit,AMVP_B_MTK_4.md5 ++1,AMVP_C_Samsung_7,AMVP_C_Samsung_7.bin,AMVP_C_Samsung_7.md5 ++1,BUMPING_A_ericsson_1,BUMPING_A_ericsson_1.bit,BUMPING_A_ericsson_1.md5 ++1,CAINIT_A_SHARP_4,CAINIT_A_SHARP_4.bit,CAINIT_A_SHARP_4.md5 ++1,CAINIT_B_SHARP_4,CAINIT_B_SHARP_4.bit,CAINIT_B_SHARP_4.md5 ++1,CAINIT_C_SHARP_3,CAINIT_C_SHARP_3.bit,CAINIT_C_SHARP_3.md5 ++1,CAINIT_D_SHARP_3,CAINIT_D_SHARP_3.bit,CAINIT_D_SHARP_3.md5 ++1,CAINIT_E_SHARP_3,CAINIT_E_SHARP_3.bit,CAINIT_E_SHARP_3.md5 ++1,CAINIT_F_SHARP_3,CAINIT_F_SHARP_3.bit,CAINIT_F_SHARP_3.md5 ++1,CAINIT_G_SHARP_3,CAINIT_G_SHARP_3.bit,CAINIT_G_SHARP_3.md5 ++1,CAINIT_H_SHARP_3,CAINIT_H_SHARP_3.bit,CAINIT_H_SHARP_3.md5 ++1,CIP_A_Panasonic_3,CIP_A_Panasonic_3.bit,CIP_A_Panasonic_3_yuv.md5 ++1,cip_B_NEC_3,cip_B_NEC_3.bit,cip_B_NEC_3.md5 ++1,CIP_C_Panasonic_2,CIP_C_Panasonic_2.bit,CIP_C_Panasonic_2_yuv.md5 ++1,CONFWIN_A_Sony_1,CONFWIN_A_Sony_1.bit,CONFWIN_A_Sony_1.md5 ++1,DBLK_A_MAIN10_VIXS_4,DBLK_A_MAIN10_VIXS_4.bit,DBLK_A_MAIN10_VIXS_4.md5 ++1,DBLK_A_SONY_3,DBLK_A_SONY_3.bit,DBLK_A_SONY_3.bit.yuv.md5 ++1,DBLK_B_SONY_3,DBLK_B_SONY_3.bit,DBLK_B_SONY_3.bit.yuv.md5 ++1,DBLK_C_SONY_3,DBLK_C_SONY_3.bit,DBLK_C_SONY_3.bit.yuv.md5 ++1,DBLK_D_VIXS_2,DBLK_D_VIXS_2.bit,DBLK_D_VIXS_2_yuv.md5 ++1,DBLK_E_VIXS_2,DBLK_E_VIXS_2.bit,DBLK_E_VIXS_2_yuv.md5 ++1,DBLK_F_VIXS_2,DBLK_F_VIXS_2.bit,DBLK_F_VIXS_2_yuv.md5 ++1,DBLK_G_VIXS_2,DBLK_G_VIXS_2.bit,DBLK_G_VIXS_2_yuv.md5 ++1,DELTAQP_A_BRCM_4,DELTAQP_A_BRCM_4.bit,DELTAQP_A_BRCM_4_yuv.md5 ++1,DELTAQP_B_SONY_3,DELTAQP_B_SONY_3.bit,DELTAQP_B_SONY_3.bit.yuv.md5 ++1,DELTAQP_C_SONY_3,DELTAQP_C_SONY_3.bit,DELTAQP_C_SONY_3.bit.yuv.md5 ++1,DSLICE_A_HHI_5,DSLICE_A_HHI_5.bin,DSLICE_A_HHI_5.md5 ++1,DSLICE_B_HHI_5,DSLICE_B_HHI_5.bin,DSLICE_B_HHI_5.md5 ++1,DSLICE_C_HHI_5,DSLICE_C_HHI_5.bin,DSLICE_C_HHI_5.md5 ++1,ENTP_A_QUALCOMM_1,ENTP_A_Qualcomm_1.bit,ENTP_A_Qualcomm_1.md5 ++1,ENTP_B_Qualcomm_1,ENTP_B_Qualcomm_1.bit,ENTP_B_Qualcomm_1.md5 ++1,ENTP_C_Qualcomm_1,ENTP_C_Qualcomm_1.bit,ENTP_C_Qualcomm_1.md5 ++1,EXT_A_ericsson_4,EXT_A_ericsson_4.bit,EXT_A_ericsson_4.md5 ++1,FILLER_A_Sony_1,FILLER_A_Sony_1.bit,FILLER_A_Sony_1.md5 ++1,HRD_A_Fujitsu_3,HRD_A_Fujitsu_3.bin,HRD_A_Fujitsu_3.md5 ++1,INITQP_A_Sony_1,INITQP_A_Sony_1.bit,INITQP_A_Sony_1.md5 ++1,INITQP_B_Main10_Sony_1,INITQP_B_Main10_Sony_1.bit,INITQP_B_Main10_Sony_1.md5 ++1,ipcm_A_NEC_3,ipcm_A_NEC_3.bit,ipcm_A_NEC_3.md5 ++1,ipcm_B_NEC_3,ipcm_B_NEC_3.bit,ipcm_B_NEC_3.md5 ++1,ipcm_C_NEC_3,ipcm_C_NEC_3.bit,ipcm_C_NEC_3.md5 ++1,ipcm_D_NEC_3,ipcm_D_NEC_3.bit,ipcm_D_NEC_3.md5 ++1,ipcm_E_NEC_2,ipcm_E_NEC_2.bit,ipcm_E_NEC_2.md5 ++1,IPRED_A_docomo_2,IPRED_A_docomo_2.bit,IPRED_A_docomo_2.md5 ++1,IPRED_B_Nokia_3,IPRED_B_Nokia_3.bit,IPRED_B_Nokia_3_yuv.md5 ++1,IPRED_C_Mitsubishi_3,IPRED_C_Mitsubishi_3.bit,IPRED_C_Mitsubishi_3_yuv.md5 ++1,LS_A_Orange_2,LS_A_Orange_2.bit,LS_A_Orange_2_yuv.md5 ++1,LS_B_Orange_4,LS_B_Orange_4.bit,LS_B_Orange_4_yuv.md5 ++1,LTRPSPS_A_Qualcomm_1,LTRPSPS_A_Qualcomm_1.bit,LTRPSPS_A_Qualcomm_1.md5 ++1,MAXBINS_A_TI_5,MAXBINS_A_TI_5.bit,MAXBINS_A_TI_5_yuv.md5 ++1,MAXBINS_B_TI_5,MAXBINS_B_TI_5.bit,MAXBINS_B_TI_5_yuv.md5 ++1,MAXBINS_C_TI_5,MAXBINS_C_TI_5.bit,MAXBINS_C_TI_5_yuv.md5 ++1,MERGE_A_TI_3,MERGE_A_TI_3.bit,MERGE_A_TI_3.md5 ++1,MERGE_B_TI_3,MERGE_B_TI_3.bit,MERGE_B_TI_3.md5 ++1,MERGE_C_TI_3,MERGE_C_TI_3.bit,MERGE_C_TI_3.md5 ++1,MERGE_D_TI_3,MERGE_D_TI_3.bit,MERGE_D_TI_3.md5 ++1,MERGE_E_TI_3,MERGE_E_TI_3.bit,MERGE_E_TI_3.md5 ++1,MERGE_F_MTK_4,MERGE_F_MTK_4.bit,MERGE_F_MTK_4.md5 ++1,MERGE_G_HHI_4,MERGE_G_HHI_4.bit,MERGE_G_HHI_4.md5 ++1,MVCLIP_A_qualcomm_3,MVCLIP_A_qualcomm_3.bit,MVCLIP_A_qualcomm_3.yuv.md5 ++1,MVDL1ZERO_A_docomo_4,MVDL1ZERO_A_docomo_4.bit,MVDL1ZERO_A_docomo_4.md5 ++1,MVEDGE_A_qualcomm_3,MVEDGE_A_qualcomm_3.bit,MVEDGE_A_qualcomm_3.yuv.md5 ++1,NoOutPrior_A_Qualcomm_1,NoOutPrior_A_Qualcomm_1.bit,NoOutPrior_A_Qualcomm_1.md5 ++1,NoOutPrior_B_Qualcomm_1,NoOutPrior_B_Qualcomm_1.bit,NoOutPrior_B_Qualcomm_1.md5 ++1,NUT_A_ericsson_5,NUT_A_ericsson_5.bit,NUT_A_ericsson_5.md5 ++1,OPFLAG_A_Qualcomm_1,OPFLAG_A_Qualcomm_1.bit,OPFLAG_A_Qualcomm_1.md5 ++1,OPFLAG_B_Qualcomm_1,OPFLAG_B_Qualcomm_1.bit,OPFLAG_B_Qualcomm_1.md5 ++1,OPFLAG_C_Qualcomm_1,OPFLAG_C_Qualcomm_1.bit,OPFLAG_C_Qualcomm_1.md5 ++1,PICSIZE_A_Bossen_1,PICSIZE_A_Bossen_1.bin,PICSIZE_A_Bossen_1.md5 ++1,PICSIZE_B_Bossen_1,PICSIZE_B_Bossen_1.bin,PICSIZE_B_Bossen_1.md5 ++1,PICSIZE_C_Bossen_1,PICSIZE_C_Bossen_1.bin,PICSIZE_C_Bossen_1.md5 ++1,PICSIZE_D_Bossen_1,PICSIZE_D_Bossen_1.bin,PICSIZE_D_Bossen_1.md5 ++1,PMERGE_A_TI_3,PMERGE_A_TI_3.bit,PMERGE_A_TI_3.md5 ++1,PMERGE_B_TI_3,PMERGE_B_TI_3.bit,PMERGE_B_TI_3.md5 ++1,PMERGE_C_TI_3,PMERGE_C_TI_3.bit,PMERGE_C_TI_3.md5 ++1,PMERGE_D_TI_3,PMERGE_D_TI_3.bit,PMERGE_D_TI_3.md5 ++1,PMERGE_E_TI_3,PMERGE_E_TI_3.bit,PMERGE_E_TI_3.md5 ++1,POC_A_Bossen_3,POC_A_Bossen_3.bin,POC_A_Bossen_3.md5 ++1,PPS_A_qualcomm_7,PPS_A_qualcomm_7.bit,PPS_A_qualcomm_7.yuv.md5 ++1,PS_B_VIDYO_3,PS_B_VIDYO_3.bit,PS_B_VIDYO_3_yuv.md5 ++1,RAP_A_docomo_6,RAP_A_docomo_6.bit,RAP_A_docomo_6.md5 ++1,RAP_B_Bossen_2,RAP_B_Bossen_2.bit,RAP_B_Bossen_2.md5 ++1,RPLM_A_qualcomm_4,RPLM_A_qualcomm_4.bit,RPLM_A_qualcomm_4.yuv.md5 ++1,RPLM_B_qualcomm_4,RPLM_B_qualcomm_4.bit,RPLM_B_qualcomm_4.yuv.md5 ++1,RPS_A_docomo_5,RPS_A_docomo_5.bit,RPS_A_docomo_5.md5 ++1,RPS_B_qualcomm_5,RPS_B_qualcomm_5.bit,RPS_B_qualcomm_5.yuv.md5 ++1,RPS_C_ericsson_5,RPS_C_ericsson_5.bit,RPS_C_ericsson_5.md5 ++1,RPS_D_ericsson_6,RPS_D_ericsson_6.bit,RPS_D_ericsson_6.md5 ++1,RPS_E_qualcomm_5,RPS_E_qualcomm_5.bit,RPS_E_qualcomm_5.yuv.md5 ++1,RPS_F_docomo_2,RPS_F_docomo_2.bit,RPS_F_docomo_2.md5 ++1,RQT_A_HHI_4,RQT_A_HHI_4.bit,RQT_A_HHI_4.md5 ++1,RQT_B_HHI_4,RQT_B_HHI_4.bit,RQT_B_HHI_4.md5 ++1,RQT_C_HHI_4,RQT_C_HHI_4.bit,RQT_C_HHI_4.md5 ++1,RQT_D_HHI_4,RQT_D_HHI_4.bit,RQT_D_HHI_4.md5 ++1,RQT_E_HHI_4,RQT_E_HHI_4.bit,RQT_E_HHI_4.md5 ++1,RQT_F_HHI_4,RQT_F_HHI_4.bit,RQT_F_HHI_4.md5 ++1,RQT_G_HHI_4,RQT_G_HHI_4.bit,RQT_G_HHI_4.md5 ++1,SAO_A_MediaTek_4,SAO_A_MediaTek_4.bit,SAO_A_MediaTek_4.md5 ++1,SAO_B_MediaTek_5,SAO_B_MediaTek_5.bit,SAO_B_MediaTek_5.md5 ++1,SAO_C_Samsung_5,SAO_C_Samsung_5.bin,SAO_C_Samsung_5.md5 ++1,SAO_D_Samsung_5,SAO_D_Samsung_5.bin,SAO_D_Samsung_5.md5 ++1,SAO_E_Canon_4,SAO_E_Canon_4.bit,SAO_E_Canon_4.md5 ++1,SAO_F_Canon_3,SAO_F_Canon_3.bit,SAO_F_Canon_3.md5 ++1,SAO_G_Canon_3,SAO_G_Canon_3.bit,SAO_G_Canon_3.md5 ++1,SAO_H_Parabola_1,SAO_H_Parabola_1.bit,SAO_H_Parabola_1.md5 ++2,SAODBLK_A_MainConcept_4,SAODBLK_A_MainConcept_4.bin,SAODBLK_A_MainConcept_4_md5.txt ++2,SAODBLK_B_MainConcept_4,SAODBLK_B_MainConcept_4.bin,SAODBLK_B_MainConcept_4_md5.txt ++1,SDH_A_Orange_4,SDH_A_Orange_4.bit,SDH_A_Orange_4_yuv.md5 ++1,SLICES_A_Rovi_3,SLICES_A_Rovi_3.bin,SLICES_A_Rovi_3.md5 ++1,SLIST_A_Sony_5,SLIST_A_Sony_5.bin,SLIST_A_Sony_5_yuv.md5 ++1,SLIST_B_Sony_9,SLIST_B_Sony_9.bin,SLIST_B_Sony_9_yuv.md5 ++1,SLIST_C_Sony_4,SLIST_C_Sony_4.bin,SLIST_C_Sony_4_yuv.md5 ++1,SLIST_D_Sony_9,str.bin,SLIST_D_Sony_9_yuv.md5 ++1,SLPPLP_A_VIDYO_2,SLPPLP_A_VIDYO_2.bit,SLPPLP_A_VIDYO_2_yuv.md5 ++1,STRUCT_A_Samsung_7,STRUCT_A_Samsung_7.bin,STRUCT_A_Samsung_7.md5 ++1,STRUCT_B_Samsung_7,STRUCT_B_Samsung_7.bin,STRUCT_B_Samsung_7.md5 ++1,TILES_A_Cisco_2,TILES_A_Cisco_2.bin,TILES_A_Cisco_2_yuv.md5 ++1,TILES_B_Cisco_1,TILES_B_Cisco_1.bin,TILES_B_Cisco_1_yuv.md5 ++1,TMVP_A_MS_3,TMVP_A_MS_3.bit,TMVP_A_MS_3.yuv.md5 ++1,TSCL_A_VIDYO_5,TSCL_A_VIDYO_5.bit,TSCL_A_VIDYO_5_yuv.md5 ++1,TSCL_B_VIDYO_4,TSCL_B_VIDYO_4.bit,TSCL_B_VIDYO_4_yuv.md5 ++1,TSKIP_A_MS_3,TSKIP_A_MS_3.bit,TSKIP_A_MS_3.yuv.md5 ++3,TSUNEQBD_A_MAIN10_Technicolor_2,TSUNEQBD_A_MAIN10_Technicolor_2.bit,TSUNEQBD_A_MAIN10_Technicolor_2_yuv.md5, # unequal bit depth ++1,TUSIZE_A_Samsung_1,TUSIZE_A_Samsung_1.bin,TUSIZE_A_Samsung_1.md5 ++1,VPSID_A_VIDYO_2,VPSID_A_VIDYO_2.bit,VPSID_A_VIDYO_2_yuv.md5 ++3,VPSSPSPPS_A_MainConcept_1,VPSSPSPPS_A_MainConcept_1.bin,VPSSPSPPS_A_MainConcept_1_md5.txt, # ??? ++1,WP_A_MAIN10_Toshiba_3,WP_A_MAIN10_Toshiba_3.bit,WP_A_MAIN10_Toshiba_3_yuv.md5 ++1,WP_A_Toshiba_3,WP_A_Toshiba_3.bit,WP_A_Toshiba_3_yuv.md5 ++1,WP_B_Toshiba_3,WP_B_Toshiba_3.bit,WP_B_Toshiba_3_yuv.md5 ++1,WP_MAIN10_B_Toshiba_3,WP_MAIN10_B_Toshiba_3.bit,WP_MAIN10_B_Toshiba_3_yuv.md5 ++1,WPP_A_ericsson_MAIN10_2,WPP_A_ericsson_MAIN10_2.bit,WPP_A_ericsson_MAIN10_yuv.md5 ++1,WPP_A_ericsson_MAIN_2,WPP_A_ericsson_MAIN_2.bit,WPP_A_ericsson_MAIN_2_yuv.md5 ++1,WPP_B_ericsson_MAIN10_2,WPP_B_ericsson_MAIN10_2.bit,WPP_B_ericsson_MAIN10_yuv.md5 ++1,WPP_B_ericsson_MAIN_2,WPP_B_ericsson_MAIN_2.bit,WPP_B_ericsson_MAIN_2_yuv.md5 ++1,WPP_C_ericsson_MAIN10_2,WPP_C_ericsson_MAIN10_2.bit,WPP_C_ericsson_MAIN10_yuv.md5 ++1,WPP_C_ericsson_MAIN_2,WPP_C_ericsson_MAIN_2.bit,WPP_C_ericsson_MAIN_2_yuv.md5 ++1,WPP_D_ericsson_MAIN10_2,WPP_D_ericsson_MAIN10_2.bit,WPP_D_ericsson_MAIN10_yuv.md5 ++1,WPP_D_ericsson_MAIN_2,WPP_D_ericsson_MAIN_2.bit,WPP_D_ericsson_MAIN_2_yuv.md5 ++1,WPP_E_ericsson_MAIN10_2,WPP_E_ericsson_MAIN10_2.bit,WPP_E_ericsson_MAIN10_yuv.md5 ++1,WPP_E_ericsson_MAIN_2,WPP_E_ericsson_MAIN_2.bit,WPP_E_ericsson_MAIN_2_yuv.md5 ++1,WPP_F_ericsson_MAIN10_2,WPP_F_ericsson_MAIN10_2.bit,WPP_F_ericsson_MAIN10_yuv.md5 ++1,WPP_F_ericsson_MAIN_2,WPP_F_ericsson_MAIN_2.bit,WPP_F_ericsson_MAIN_2_yuv.md5 +--- /dev/null ++++ b/pi-util/conf_h265.csv +@@ -0,0 +1,144 @@ ++1,ADJUST_IPRED_ANGLE_A_RExt_Mitsubishi_1,ADJUST_IPRED_ANGLE_A_RExt_Mitsubishi_1.bit,ADJUST_IPRED_ANGLE_A_RExt_Mitsubishi_1.md5 ++1,AMP_A_Samsung_6,AMP_A_Samsung_6.bin,AMP_A_Samsung_6.md5 ++1,AMP_B_Samsung_6,AMP_B_Samsung_6.bin,AMP_B_Samsung_6.md5 ++1,AMP_D_Hisilicon_3,AMP_D_Hisilicon.bit,AMP_D_Hisilicon_3.yuv.md5 ++1,AMP_E_Hisilicon_3,AMP_E_Hisilicon.bit,AMP_E_Hisilicon_3.yuv.md5 ++1,AMP_F_Hisilicon_3,AMP_F_Hisilicon_3.bit,AMP_F_Hisilicon_3.yuv.md5 ++1,AMVP_A_MTK_4,AMVP_A_MTK_4.bit,AMVP_A_MTK_4.md5 ++1,AMVP_B_MTK_4,AMVP_B_MTK_4.bit,AMVP_B_MTK_4.md5 ++1,AMVP_C_Samsung_6,AMVP_C_Samsung_6.bin,AMVP_C_Samsung_6.md5 ++1,BUMPING_A_ericsson_1,BUMPING_A_ericsson_1.bit,BUMPING_A_ericsson_1.md5 ++1,CAINIT_A_SHARP_4,CAINIT_A_SHARP_4.bit,CAINIT_A_SHARP_4.md5 ++1,CAINIT_B_SHARP_4,CAINIT_B_SHARP_4.bit,CAINIT_B_SHARP_4.md5 ++1,CAINIT_C_SHARP_3,CAINIT_C_SHARP_3.bit,CAINIT_C_SHARP_3.md5 ++1,CAINIT_D_SHARP_3,CAINIT_D_SHARP_3.bit,CAINIT_D_SHARP_3.md5 ++1,CAINIT_E_SHARP_3,CAINIT_E_SHARP_3.bit,CAINIT_E_SHARP_3.md5 ++1,CAINIT_F_SHARP_3,CAINIT_F_SHARP_3.bit,CAINIT_F_SHARP_3.md5 ++1,CAINIT_G_SHARP_3,CAINIT_G_SHARP_3.bit,CAINIT_G_SHARP_3.md5 ++1,CAINIT_H_SHARP_3,CAINIT_H_SHARP_3.bit,CAINIT_H_SHARP_3.md5 ++1,CIP_A_Panasonic_3,CIP_A_Panasonic_3.bit,CIP_A_Panasonic_3_yuv.md5 ++1,cip_B_NEC_3,cip_B_NEC_3.bit,cip_B_NEC_3.md5 ++1,CIP_C_Panasonic_2,CIP_C_Panasonic_2.bit,CIP_C_Panasonic_2_yuv.md5 ++1,CONFWIN_A_Sony_1,CONFWIN_A_Sony_1.bit,CONFWIN_A_Sony_1.md5 ++1,DBLK_A_MAIN10_VIXS_3,DBLK_A_MAIN10_VIXS_3.bit,DBLK_A_MAIN10_VIXS_3.md5 ++1,DBLK_A_SONY_3,DBLK_A_SONY_3.bit,DBLK_A_SONY_3.bit.yuv.md5 ++1,DBLK_B_SONY_3,DBLK_B_SONY_3.bit,DBLK_B_SONY_3.bit.yuv.md5 ++1,DBLK_C_SONY_3,DBLK_C_SONY_3.bit,DBLK_C_SONY_3.bit.yuv.md5 ++1,DBLK_D_VIXS_2,DBLK_D_VIXS_2.bit,DBLK_D_VIXS_2_yuv.md5 ++1,DBLK_E_VIXS_2,DBLK_E_VIXS_2.bit,DBLK_E_VIXS_2_yuv.md5 ++1,DBLK_F_VIXS_2,DBLK_F_VIXS_2.bit,DBLK_F_VIXS_2_yuv.md5 ++1,DBLK_G_VIXS_2,DBLK_G_VIXS_2.bit,DBLK_G_VIXS_2_yuv.md5 ++1,DELTAQP_A_BRCM_4,DELTAQP_A_BRCM_4.bit,DELTAQP_A_BRCM_4_yuv.md5 ++1,DELTAQP_B_SONY_3,DELTAQP_B_SONY_3.bit,DELTAQP_B_SONY_3.bit.yuv.md5 ++1,DELTAQP_C_SONY_3,DELTAQP_C_SONY_3.bit,DELTAQP_C_SONY_3.bit.yuv.md5 ++1,DSLICE_A_HHI_5,DSLICE_A_HHI_5.bin,DSLICE_A_HHI_5.md5 ++1,DSLICE_B_HHI_5,DSLICE_B_HHI_5.bin,DSLICE_B_HHI_5.md5 ++1,DSLICE_C_HHI_5,DSLICE_C_HHI_5.bin,DSLICE_C_HHI_5.md5 ++1,ENTP_A_QUALCOMM_1,ENTP_A_Qualcomm_1.bit,ENTP_A_Qualcomm_1.md5 ++1,ENTP_B_Qualcomm_1,ENTP_B_Qualcomm_1.bit,ENTP_B_Qualcomm_1.md5 ++1,ENTP_C_Qualcomm_1,ENTP_C_Qualcomm_1.bit,ENTP_C_Qualcomm_1.md5 ++1,EXT_A_ericsson_4,EXT_A_ericsson_4.bit,EXT_A_ericsson_4.md5 ++1,FILLER_A_Sony_1,FILLER_A_Sony_1.bit,FILLER_A_Sony_1.md5 ++1,HRD_A_Fujitsu_3,HRD_A_Fujitsu_3.bin,HRD_A_Fujitsu_3.md5 ++1,INITQP_A_Sony_1,INITQP_A_Sony_1.bit,INITQP_A_Sony_1.md5 ++1,INITQP_B_Main10_Sony_1,INITQP_B_Main10_Sony_1.bit,INITQP_B_Main10_Sony_1.md5 ++1,ipcm_A_NEC_3,ipcm_A_NEC_3.bit,ipcm_A_NEC_3.md5 ++1,ipcm_B_NEC_3,ipcm_B_NEC_3.bit,ipcm_B_NEC_3.md5 ++1,ipcm_C_NEC_3,ipcm_C_NEC_3.bit,ipcm_C_NEC_3.md5 ++1,ipcm_D_NEC_3,ipcm_D_NEC_3.bit,ipcm_D_NEC_3.md5 ++1,ipcm_E_NEC_2,ipcm_E_NEC_2.bit,ipcm_E_NEC_2.md5 ++1,IPRED_A_docomo_2,IPRED_A_docomo_2.bit,IPRED_A_docomo_2.md5 ++1,IPRED_B_Nokia_3,IPRED_B_Nokia_3.bit,IPRED_B_Nokia_3_yuv.md5 ++1,IPRED_C_Mitsubishi_3,IPRED_C_Mitsubishi_3.bit,IPRED_C_Mitsubishi_3_yuv.md5 ++1,LS_A_Orange_2,LS_A_Orange_2.bit,LS_A_Orange_2_yuv.md5 ++1,LS_B_Orange_4,LS_B_Orange_4.bit,LS_B_Orange_4_yuv.md5 ++1,LTRPSPS_A_Qualcomm_1,LTRPSPS_A_Qualcomm_1.bit,LTRPSPS_A_Qualcomm_1.md5 ++1,MAXBINS_A_TI_4,MAXBINS_A_TI_4.bit,MAXBINS_A_TI_4.md5 ++1,MAXBINS_B_TI_4,MAXBINS_B_TI_4.bit,MAXBINS_B_TI_4.md5 ++1,MAXBINS_C_TI_4,MAXBINS_C_TI_4.bit,MAXBINS_C_TI_4.md5 ++1,MERGE_A_TI_3,MERGE_A_TI_3.bit,MERGE_A_TI_3.md5 ++1,MERGE_B_TI_3,MERGE_B_TI_3.bit,MERGE_B_TI_3.md5 ++1,MERGE_C_TI_3,MERGE_C_TI_3.bit,MERGE_C_TI_3.md5 ++1,MERGE_D_TI_3,MERGE_D_TI_3.bit,MERGE_D_TI_3.md5 ++1,MERGE_E_TI_3,MERGE_E_TI_3.bit,MERGE_E_TI_3.md5 ++1,MERGE_F_MTK_4,MERGE_F_MTK_4.bit,MERGE_F_MTK_4.md5 ++1,MERGE_G_HHI_4,MERGE_G_HHI_4.bit,MERGE_G_HHI_4.md5 ++1,MVCLIP_A_qualcomm_3,MVCLIP_A_qualcomm_3.bit,MVCLIP_A_qualcomm_3.yuv.md5 ++1,MVDL1ZERO_A_docomo_4,MVDL1ZERO_A_docomo_4.bit,MVDL1ZERO_A_docomo_4.md5 ++1,MVEDGE_A_qualcomm_3,MVEDGE_A_qualcomm_3.bit,MVEDGE_A_qualcomm_3.yuv.md5 ++1,NoOutPrior_A_Qualcomm_1,NoOutPrior_A_Qualcomm_1.bit,NoOutPrior_A_Qualcomm_1.md5 ++1,NoOutPrior_B_Qualcomm_1,NoOutPrior_B_Qualcomm_1.bit,NoOutPrior_B_Qualcomm_1.md5 ++1,NUT_A_ericsson_5,NUT_A_ericsson_5.bit,NUT_A_ericsson_5.md5 ++1,OPFLAG_A_Qualcomm_1,OPFLAG_A_Qualcomm_1.bit,OPFLAG_A_Qualcomm_1.md5 ++1,OPFLAG_B_Qualcomm_1,OPFLAG_B_Qualcomm_1.bit,OPFLAG_B_Qualcomm_1.md5 ++1,OPFLAG_C_Qualcomm_1,OPFLAG_C_Qualcomm_1.bit,OPFLAG_C_Qualcomm_1.md5 ++1,PICSIZE_A_Bossen_1,PICSIZE_A_Bossen_1.bin,PICSIZE_A_Bossen_1.md5 ++1,PICSIZE_B_Bossen_1,PICSIZE_B_Bossen_1.bin,PICSIZE_B_Bossen_1.md5 ++1,PICSIZE_C_Bossen_1,PICSIZE_C_Bossen_1.bin,PICSIZE_C_Bossen_1.md5 ++1,PICSIZE_D_Bossen_1,PICSIZE_D_Bossen_1.bin,PICSIZE_D_Bossen_1.md5 ++1,PMERGE_A_TI_3,PMERGE_A_TI_3.bit,PMERGE_A_TI_3.md5 ++1,PMERGE_B_TI_3,PMERGE_B_TI_3.bit,PMERGE_B_TI_3.md5 ++1,PMERGE_C_TI_3,PMERGE_C_TI_3.bit,PMERGE_C_TI_3.md5 ++1,PMERGE_D_TI_3,PMERGE_D_TI_3.bit,PMERGE_D_TI_3.md5 ++1,PMERGE_E_TI_3,PMERGE_E_TI_3.bit,PMERGE_E_TI_3.md5 ++1,POC_A_Bossen_3,POC_A_Bossen_3.bin,POC_A_Bossen_3.md5 ++1,PPS_A_qualcomm_7,PPS_A_qualcomm_7.bit,PPS_A_qualcomm_7.yuv.md5 ++1,PS_B_VIDYO_3,PS_B_VIDYO_3.bit,PS_B_VIDYO_3_yuv.md5 ++1,RAP_A_docomo_6,RAP_A_docomo_6.bit,RAP_A_docomo_6.md5 ++1,RAP_B_Bossen_2,RAP_B_Bossen_2.bit,RAP_B_Bossen_2.md5 ++1,RPLM_A_qualcomm_4,RPLM_A_qualcomm_4.bit,RPLM_A_qualcomm_4.yuv.md5 ++1,RPLM_B_qualcomm_4,RPLM_B_qualcomm_4.bit,RPLM_B_qualcomm_4.yuv.md5 ++1,RPS_A_docomo_5,RPS_A_docomo_5.bit,RPS_A_docomo_5.md5 ++1,RPS_B_qualcomm_5,RPS_B_qualcomm_5.bit,RPS_B_qualcomm_5.yuv.md5 ++1,RPS_C_ericsson_5,RPS_C_ericsson_5.bit,RPS_C_ericsson_5.md5 ++1,RPS_D_ericsson_6,RPS_D_ericsson_6.bit,RPS_D_ericsson_6.md5 ++1,RPS_E_qualcomm_5,RPS_E_qualcomm_5.bit,RPS_E_qualcomm_5.yuv.md5 ++1,RPS_F_docomo_2,RPS_F_docomo_2.bit,RPS_F_docomo_2.md5 ++1,RQT_A_HHI_4,RQT_A_HHI_4.bit,RQT_A_HHI_4.md5 ++1,RQT_B_HHI_4,RQT_B_HHI_4.bit,RQT_B_HHI_4.md5 ++1,RQT_C_HHI_4,RQT_C_HHI_4.bit,RQT_C_HHI_4.md5 ++1,RQT_D_HHI_4,RQT_D_HHI_4.bit,RQT_D_HHI_4.md5 ++1,RQT_E_HHI_4,RQT_E_HHI_4.bit,RQT_E_HHI_4.md5 ++1,RQT_F_HHI_4,RQT_F_HHI_4.bit,RQT_F_HHI_4.md5 ++1,RQT_G_HHI_4,RQT_G_HHI_4.bit,RQT_G_HHI_4.md5 ++1,SAO_A_MediaTek_4,SAO_A_MediaTek_4.bit,SAO_A_MediaTek_4.md5 ++1,SAO_B_MediaTek_5,SAO_B_MediaTek_5.bit,SAO_B_MediaTek_5.md5 ++1,SAO_C_Samsung_5,SAO_C_Samsung_5.bin,SAO_C_Samsung_5.md5 ++1,SAO_D_Samsung_5,SAO_D_Samsung_5.bin,SAO_D_Samsung_5.md5 ++1,SAO_E_Canon_4,SAO_E_Canon_4.bit,SAO_E_Canon_4.md5 ++1,SAO_F_Canon_3,SAO_F_Canon_3.bit,SAO_F_Canon_3.md5 ++1,SAO_G_Canon_3,SAO_G_Canon_3.bit,SAO_G_Canon_3.md5 ++1,SDH_A_Orange_4,SDH_A_Orange_4.bit,SDH_A_Orange_4_yuv.md5 ++1,SLICES_A_Rovi_3,SLICES_A_Rovi_3.bin,SLICES_A_Rovi_3.md5 ++1,SLIST_A_Sony_4,str.bin,SLIST_A_Sony_4_yuv.md5 ++1,SLIST_B_Sony_8,str.bin,SLIST_B_Sony_8_yuv.md5 ++1,SLIST_C_Sony_3,str.bin,SLIST_C_Sony_3_yuv.md5 ++1,SLIST_D_Sony_9,str.bin,SLIST_D_Sony_9_yuv.md5 ++1,SLPPLP_A_VIDYO_2,SLPPLP_A_VIDYO_2.bit,SLPPLP_A_VIDYO_2_yuv.md5 ++1,STRUCT_A_Samsung_6,STRUCT_A_Samsung_6.bin,STRUCT_A_Samsung_6.md5 ++1,STRUCT_B_Samsung_6,STRUCT_B_Samsung_6.bin,STRUCT_B_Samsung_6.md5 ++1,TILES_A_Cisco_2,TILES_A_Cisco_2.bin,TILES_A_Cisco_2_yuv.md5 ++1,TILES_B_Cisco_1,TILES_B_Cisco_1.bin,TILES_B_Cisco_1_yuv.md5 ++1,TMVP_A_MS_3,TMVP_A_MS_3.bit,TMVP_A_MS_3.yuv.md5 ++1,TSCL_A_VIDYO_5,TSCL_A_VIDYO_5.bit,TSCL_A_VIDYO_5_yuv.md5 ++1,TSCL_B_VIDYO_4,TSCL_B_VIDYO_4.bit,TSCL_B_VIDYO_4_yuv.md5 ++1,TSKIP_A_MS_3,TSKIP_A_MS_3.bit,TSKIP_A_MS_3.yuv.md5 ++0,TSUNEQBD_A_MAIN10_Technicolor_2,TSUNEQBD_A_MAIN10_Technicolor_2.bit,TSUNEQBD_A_MAIN10_Technicolor_2_yuv.md5, # Y/C bit depth unmatched ++1,TUSIZE_A_Samsung_1,TUSIZE_A_Samsung_1.bin,TUSIZE_A_Samsung_1.md5 ++1,VPSID_A_VIDYO_2,VPSID_A_VIDYO_2.bit,VPSID_A_VIDYO_2_yuv.md5 ++1,WP_A_MAIN10_Toshiba_3,WP_A_MAIN10_Toshiba_3.bit,WP_A_MAIN10_Toshiba_3_yuv.md5 ++1,WP_A_Toshiba_3,WP_A_Toshiba_3.bit,WP_A_Toshiba_3_yuv.md5 ++1,WP_B_Toshiba_3,WP_B_Toshiba_3.bit,WP_B_Toshiba_3_yuv.md5 ++1,WP_MAIN10_B_Toshiba_3,WP_MAIN10_B_Toshiba_3.bit,WP_MAIN10_B_Toshiba_3_yuv.md5 ++1,WPP_A_ericsson_MAIN10_2,WPP_A_ericsson_MAIN10_2.bit,WPP_A_ericsson_MAIN10_yuv.md5 ++1,WPP_A_ericsson_MAIN_2,WPP_A_ericsson_MAIN_2.bit,WPP_A_ericsson_MAIN_2_yuv.md5 ++1,WPP_B_ericsson_MAIN10_2,WPP_B_ericsson_MAIN10_2.bit,WPP_B_ericsson_MAIN10_yuv.md5 ++1,WPP_B_ericsson_MAIN_2,WPP_B_ericsson_MAIN_2.bit,WPP_B_ericsson_MAIN_2_yuv.md5 ++1,WPP_C_ericsson_MAIN10_2,WPP_C_ericsson_MAIN10_2.bit,WPP_C_ericsson_MAIN10_yuv.md5 ++1,WPP_C_ericsson_MAIN_2,WPP_C_ericsson_MAIN_2.bit,WPP_C_ericsson_MAIN_2_yuv.md5 ++1,WPP_D_ericsson_MAIN10_2,WPP_D_ericsson_MAIN10_2.bit,WPP_D_ericsson_MAIN10_yuv.md5 ++1,WPP_D_ericsson_MAIN_2,WPP_D_ericsson_MAIN_2.bit,WPP_D_ericsson_MAIN_2_yuv.md5 ++1,WPP_E_ericsson_MAIN10_2,WPP_E_ericsson_MAIN10_2.bit,WPP_E_ericsson_MAIN10_yuv.md5 ++1,WPP_E_ericsson_MAIN_2,WPP_E_ericsson_MAIN_2.bit,WPP_E_ericsson_MAIN_2_yuv.md5 ++1,WPP_F_ericsson_MAIN10_2,WPP_F_ericsson_MAIN10_2.bit,WPP_F_ericsson_MAIN10_yuv.md5 ++1,WPP_F_ericsson_MAIN_2,WPP_F_ericsson_MAIN_2.bit,WPP_F_ericsson_MAIN_2_yuv.md5 +--- /dev/null ++++ b/pi-util/conf_native.sh +@@ -0,0 +1,135 @@ ++echo "Configure for native build" ++ ++FFSRC=`pwd` ++MC=`dpkg --print-architecture` ++BUILDBASE=$FFSRC/out ++ ++#RPI_KEEPS="-save-temps=obj" ++RPI_KEEPS="" ++ ++NOSHARED= ++MMAL= ++USR_PREFIX= ++TOOLCHAIN= ++R=rel ++ ++while [ "$1" != "" ] ; do ++ case $1 in ++ --noshared) ++ NOSHARED=1 ++ ;; ++ --mmal) ++ MMAL=1 ++ ;; ++ --usr) ++ USR_PREFIX=/usr ++ ;; ++ --tsan) ++ TOOLCHAIN="--toolchain=gcc-tsan" ++ R=tsan ++ ;; ++ *) ++ echo "Usage $0: [--noshared] [--mmal] [--usr]" ++ echo " noshared Build static libs and executable - good for testing" ++ echo " mmal Build mmal decoders" ++ echo " usr Set install prefix to /usr [default=/install]" ++ exit 1 ++ ;; ++ esac ++ shift ++done ++ ++ ++MCOPTS= ++RPI_INCLUDES= ++RPI_LIBDIRS= ++RPI_DEFINES= ++RPI_EXTRALIBS= ++ ++# uname -m gives kernel type which may not have the same ++# 32/64bitness as userspace :-( getconf shoudl provide the answer ++# but use uname to check we are on the right processor ++MC=`uname -m` ++LB=`getconf LONG_BIT` ++if [ "$MC" == "armv7l" ] || [ "$MC" == "aarch64" ]; then ++ if [ "$LB" == "32" ]; then ++ echo "M/C armv7" ++ A=arm-linux-gnueabihf ++ B=armv7 ++ MCOPTS="--arch=armv6t2 --cpu=cortex-a7" ++ RPI_DEFINES=-mfpu=neon-vfpv4 ++ elif [ "$LB" == "64" ]; then ++ echo "M/C aarch64" ++ A=aarch64-linux-gnu ++ B=arm64 ++ else ++ echo "Unknown LONG_BIT name: $LB" ++ exit 1 ++ fi ++else ++ echo "Unknown machine name: $MC" ++ exit 1 ++fi ++ ++if [ $MMAL ]; then ++ RPI_OPT_VC=/opt/vc ++ RPI_INCLUDES="-I$RPI_OPT_VC/include -I$RPI_OPT_VC/include/interface/vcos/pthreads -I$RPI_OPT_VC/include/interface/vmcs_host/linux" ++ RPI_LIBDIRS="-L$RPI_OPT_VC/lib" ++ RPI_DEFINES="$RPI_DEFINES -D__VCCOREVER__=0x4000000" ++ RPI_EXTRALIBS="-Wl,--start-group -lbcm_host -lmmal -lmmal_util -lmmal_core -lvcos -lvcsm -lvchostif -lvchiq_arm -Wl,--end-group" ++ RPIOPTS="--enable-mmal" ++else ++ RPIOPTS="--disable-mmal" ++fi ++ ++C=`lsb_release -sc` ++V=`cat RELEASE` ++ ++SHARED_LIBS="--enable-shared" ++if [ $NOSHARED ]; then ++ SHARED_LIBS="--disable-shared" ++ OUT=$BUILDBASE/$B-$C-$V-static-$R ++ echo Static libs ++else ++ echo Shared libs ++ OUT=$BUILDBASE/$B-$C-$V-shared-$R ++fi ++ ++if [ ! $USR_PREFIX ]; then ++ USR_PREFIX=$OUT/install ++fi ++LIB_PREFIX=$USR_PREFIX/lib/$A ++INC_PREFIX=$USR_PREFIX/include/$A ++ ++echo Destination directory: $OUT ++mkdir -p $OUT ++# Nothing under here need worry git - including this .gitignore! ++echo "**" > $BUILDBASE/.gitignore ++cd $OUT ++ ++$FFSRC/configure \ ++ --prefix=$USR_PREFIX\ ++ --libdir=$LIB_PREFIX\ ++ --incdir=$INC_PREFIX\ ++ $MCOPTS\ ++ $TOOLCHAIN\ ++ --disable-stripping\ ++ --disable-thumb\ ++ --enable-sand\ ++ --enable-v4l2-request\ ++ --enable-libdrm\ ++ --enable-vout-egl\ ++ --enable-vout-drm\ ++ --enable-gpl\ ++ $SHARED_LIBS\ ++ $RPIOPTS\ ++ --extra-cflags="-ggdb $RPI_KEEPS $RPI_DEFINES $RPI_INCLUDES"\ ++ --extra-cxxflags="$RPI_DEFINES $RPI_INCLUDES"\ ++ --extra-ldflags="$RPI_LIBDIRS"\ ++ --extra-libs="$RPI_EXTRALIBS"\ ++ --extra-version="rpi" ++ ++echo "Configured into $OUT" ++ ++# gcc option for getting asm listing ++# -Wa,-ahls +--- /dev/null ++++ b/pi-util/ffconf.py +@@ -0,0 +1,215 @@ ++#!/usr/bin/env python3 ++ ++import string ++import os ++import subprocess ++import re ++import argparse ++import sys ++import csv ++from stat import * ++ ++CODEC_HEVC_RPI = 1 ++HWACCEL_RPI = 2 ++HWACCEL_DRM = 3 ++HWACCEL_VAAPI = 4 ++ ++def testone(fileroot, srcname, es_file, md5_file, pix, dectype, vcodec, ffmpeg_exec): ++ hwaccel = "" ++ if dectype == HWACCEL_RPI: ++ hwaccel = "rpi" ++ elif dectype == HWACCEL_DRM: ++ hwaccel = "drm" ++ elif dectype == HWACCEL_VAAPI: ++ hwaccel = "vaapi" ++ ++ pix_fmt = [] ++ if pix == "8": ++ pix_fmt = ["-pix_fmt", "yuv420p"] ++ elif pix == "10": ++ pix_fmt = ["-pix_fmt", "yuv420p10le"] ++ elif pix == "12": ++ pix_fmt = ["-pix_fmt", "yuv420p12le"] ++ ++ tmp_root = "/tmp" ++ ++ names = srcname.split('/') ++ while len(names) > 1: ++ tmp_root = os.path.join(tmp_root, names[0]) ++ del names[0] ++ name = names[0] ++ ++ if not os.path.exists(tmp_root): ++ os.makedirs(tmp_root) ++ ++ dec_file = os.path.join(tmp_root, name + ".dec.md5") ++ try: ++ os.remove(dec_file) ++ except: ++ pass ++ ++ flog = open(os.path.join(tmp_root, name + ".log"), "wt") ++ ++ ffargs = [ffmpeg_exec, "-flags", "unaligned", "-hwaccel", hwaccel, "-vcodec", "hevc", "-i", os.path.join(fileroot, es_file)] + pix_fmt + ["-f", "md5", dec_file] ++ ++ # Unaligned needed for cropping conformance ++ if hwaccel: ++ rstr = subprocess.call(ffargs, stdout=flog, stderr=subprocess.STDOUT) ++ else: ++ rstr = subprocess.call( ++ [ffmpeg_exec, "-flags", "unaligned", "-vcodec", vcodec, "-i", os.path.join(fileroot, es_file), "-f", "md5", dec_file], ++ stdout=flog, stderr=subprocess.STDOUT) ++ ++ try: ++ m1 = None ++ m2 = None ++ with open(os.path.join(fileroot, md5_file)) as f: ++ for line in f: ++ m1 = re.search("[0-9a-f]{32}", line.lower()) ++ if m1: ++ break ++ ++ with open(dec_file) as f: ++ m2 = re.search("[0-9a-f]{32}", f.readline()) ++ except: ++ pass ++ ++ if m1 and m2 and m1.group() == m2.group(): ++ print("Match: " + m1.group(), file=flog) ++ rv = 0 ++ elif not m1: ++ print("****** Cannot find m1", file=flog) ++ rv = 3 ++ elif not m2: ++ print("****** Cannot find m2", file=flog) ++ rv = 2 ++ else: ++ print("****** Mismatch: " + m1.group() + " != " + m2.group(), file=flog) ++ rv = 1 ++ flog.close() ++ return rv ++ ++def scandir(root): ++ aconf = [] ++ ents = os.listdir(root) ++ ents.sort(key=str.lower) ++ for name in ents: ++ test_path = os.path.join(root, name) ++ if S_ISDIR(os.stat(test_path).st_mode): ++ files = os.listdir(test_path) ++ es_file = "?" ++ md5_file = "?" ++ for f in files: ++ (base, ext) = os.path.splitext(f) ++ if base[0] == '.': ++ pass ++ elif ext == ".bit" or ext == ".bin": ++ es_file = f ++ elif ext == ".md5" or (ext == ".txt" and (base[-4:] == "_md5" or base[-6:] == "md5sum")): ++ if md5_file == "?": ++ md5_file = f ++ elif base[-3:] == "yuv": ++ md5_file = f ++ aconf.append((1, name, es_file, md5_file)) ++ return aconf ++ ++def runtest(name, tests): ++ if not tests: ++ return True ++ for t in tests: ++ if name[0:len(t)] == t or name.find("/" + t) != -1: ++ return True ++ return False ++ ++def doconf(csva, tests, test_root, vcodec, dectype, ffmpeg_exec): ++ unx_failures = [] ++ unx_success = [] ++ failures = 0 ++ successes = 0 ++ for a in csva: ++ exp_test = int(a[0]) ++ if (exp_test and runtest(a[1], tests)): ++ name = a[1] ++ print ("==== ", name, end="") ++ sys.stdout.flush() ++ ++ rv = testone(os.path.join(test_root, name), name, a[2], a[3], a[4], dectype=dectype, vcodec=vcodec, ffmpeg_exec=ffmpeg_exec) ++ if (rv == 0): ++ successes += 1 ++ else: ++ failures += 1 ++ ++ if (rv == 0): ++ if exp_test == 2: ++ print(": * OK *") ++ unx_success.append(name) ++ else: ++ print(": ok") ++ elif exp_test == 2 and rv == 1: ++ print(": fail") ++ elif exp_test == 3 and rv == 2: ++ # Call an expected "crash" an abort ++ print(": abort") ++ else: ++ unx_failures.append(name) ++ if rv == 1: ++ print(": * FAIL *") ++ elif (rv == 2) : ++ print(": * CRASH *") ++ elif (rv == 3) : ++ print(": * MD5 MISSING *") ++ else : ++ print(": * BANG *") ++ ++ if unx_failures or unx_success: ++ print("Unexpected Failures:", unx_failures) ++ print("Unexpected Success: ", unx_success) ++ else: ++ print("All tests normal:", successes, "ok,", failures, "failed") ++ ++ ++class ConfCSVDialect(csv.Dialect): ++ delimiter = ',' ++ doublequote = True ++ lineterminator = '\n' ++ quotechar='"' ++ quoting = csv.QUOTE_MINIMAL ++ skipinitialspace = True ++ strict = True ++ ++if __name__ == '__main__': ++ ++ argp = argparse.ArgumentParser(description="FFmpeg h265 conformance tester") ++ argp.add_argument("tests", nargs='*') ++ argp.add_argument("--pi4", action='store_true', help="Force pi4 cmd line") ++ argp.add_argument("--drm", action='store_true', help="Force v4l2 drm cmd line") ++ argp.add_argument("--vaapi", action='store_true', help="Force vaapi cmd line") ++ argp.add_argument("--test_root", default="/opt/conform/h265.2016", help="Root dir for test") ++ argp.add_argument("--csvgen", action='store_true', help="Generate CSV file for dir") ++ argp.add_argument("--csv", default="pi-util/conf_h265.2016.csv", help="CSV filename") ++ argp.add_argument("--vcodec", default="hevc_rpi", help="vcodec name to use") ++ argp.add_argument("--ffmpeg", default="./ffmpeg", help="ffmpeg exec name") ++ args = argp.parse_args() ++ ++ if args.csvgen: ++ csv.writer(sys.stdout).writerows(scandir(args.test_root)) ++ exit(0) ++ ++ with open(args.csv, 'rt') as csvfile: ++ csva = [a for a in csv.reader(csvfile, ConfCSVDialect())] ++ ++ dectype = CODEC_HEVC_RPI ++ if os.path.exists("/dev/rpivid-hevcmem"): ++ dectype = HWACCEL_RPI ++ if args.drm or os.path.exists("/sys/module/rpivid_hevc"): ++ dectype = HWACCEL_DRM ++ ++ if args.pi4: ++ dectype = HWACCEL_RPI ++ elif args.drm: ++ dectype = HWACCEL_DRM ++ elif args.vaapi: ++ dectype = HWACCEL_VAAPI ++ ++ doconf(csva, args.tests, args.test_root, args.vcodec, dectype, args.ffmpeg) ++ +--- /dev/null ++++ b/pi-util/ffperf.py +@@ -0,0 +1,128 @@ ++#!/usr/bin/env python3 ++ ++import time ++import string ++import os ++import tempfile ++import subprocess ++import re ++import argparse ++import sys ++import csv ++from stat import * ++ ++class tstats: ++ close_threshold = 0.01 ++ ++ def __init__(self, stats_dict=None): ++ if stats_dict != None: ++ self.name = stats_dict["name"] ++ self.elapsed = float(stats_dict["elapsed"]) ++ self.user = float(stats_dict["user"]) ++ self.sys = float(stats_dict["sys"]) ++ ++ def times_str(self): ++ ctime = self.sys + self.user ++ return "time=%6.2f, cpu=%6.2f (%4.2f%%)" % (self.elapsed, ctime, (ctime * 100.0) / self.elapsed) ++ ++ def dict(self): ++ return {"name":self.name, "elapsed":self.elapsed, "user":self.user, "sys":self.sys} ++ ++ def is_close(self, other): ++ return abs(self.elapsed - other.elapsed) / self.elapsed < self.close_threshold ++ ++ def __lt__(self, other): ++ return self.elapsed < other.elapsed ++ def __gt__(self, other): ++ return self.elapsed > other.elapsed ++ ++ def time_file(name, prefix, ffmpeg="./ffmpeg"): ++ stats = tstats() ++ stats.name = name ++ start_time = time.clock_gettime(time.CLOCK_MONOTONIC); ++ cproc = subprocess.Popen([ffmpeg, "-no_cvt_hw", ++ "-vcodec", "hevc_rpi", ++ "-t", "30", "-i", prefix + name, ++ "-f", "vout_rpi", os.devnull], bufsize=-1, stdout=flog, stderr=flog); ++ pinfo = os.wait4(cproc.pid, 0) ++ end_time = time.clock_gettime(time.CLOCK_MONOTONIC); ++ stats.elapsed = end_time - start_time ++ stats.user = pinfo[2].ru_utime ++ stats.sys = pinfo[2].ru_stime ++ return stats ++ ++ ++def common_prefix(s1, s2): ++ for i in range(min(len(s1),len(s2))): ++ if s1[i] != s2[i]: ++ return s1[:i] ++ return s1[:i+1] ++ ++def main(): ++ global flog ++ ++ argp = argparse.ArgumentParser(description="FFmpeg performance tester", epilog=""" ++To blank the screen before starting use "xdg-screensaver activate" ++(For some reason this doesn't seem to work from within python). ++""") ++ ++ argp.add_argument("streams", nargs='*') ++ argp.add_argument("--csv_out", default="ffperf_out.csv", help="CSV output filename") ++ argp.add_argument("--csv_in", help="CSV input filename") ++ argp.add_argument("--prefix", help="Filename prefix (include terminal '/' if a directory).") ++ argp.add_argument("--repeat", default=3, type=int, help="Run repeat count") ++ argp.add_argument("--ffmpeg", default="./ffmpeg", help="FFmpeg executable") ++ ++ args = argp.parse_args() ++ ++ csv_out = csv.DictWriter(open(args.csv_out, 'w', newline=''), ["name", "elapsed", "user", "sys"]) ++ csv_out.writeheader() ++ ++ stats_in = {} ++ if args.csv_in != None: ++ with open(args.csv_in, 'r', newline='') as f_in: ++ stats_in = {x["name"]:tstats(x) for x in csv.DictReader(f_in)} ++ ++ flog = open(os.path.join(tempfile.gettempdir(), "ffperf.log"), "wt") ++ ++ streams = args.streams ++ if not streams: ++ if not stats_in: ++ print ("No source streams specified") ++ return 1 ++ prefix = "" if args.prefix == None else args.prefix ++ streams = [k for k in stats_in] ++ elif args.prefix != None: ++ prefix = args.prefix ++ else: ++ prefix = streams[0] ++ for f in streams[1:]: ++ prefix = common_prefix(prefix, f) ++ pp = prefix.rpartition(os.sep) ++ prefix = pp[0] + pp[1] ++ streams = [s[len(prefix):] for s in streams] ++ ++ for f in sorted(streams, key=lambda x : "~" * x.count(os.sep) + x.lower()): ++ print ("====", f) ++ ++ t0 = tstats({"name":f, "elapsed":999, "user":999, "sys":999}) ++ for i in range(args.repeat): ++ t = tstats.time_file(f, prefix, args.ffmpeg) ++ print ("...", t.times_str()) ++ if t0 > t: ++ t0 = t ++ ++ if t0.name in stats_in: ++ pstat = stats_in[t0.name] ++ print("---" if pstat.is_close(t0) else "<<<" if t0 < pstat else ">>>", pstat.times_str()) ++ ++ csv_out.writerow(t0.dict()) ++ ++ print () ++ ++ return 0 ++ ++ ++if __name__ == '__main__': ++ exit(main()) ++ +--- /dev/null ++++ b/pi-util/genpatch.sh +@@ -0,0 +1,35 @@ ++set -e ++ ++NOPATCH= ++if [ "$1" == "--notag" ]; then ++ shift ++ NOPATCH=1 ++fi ++ ++if [ "$1" == "" ]; then ++ echo Usage: $0 [--notag] \ ++ echo e.g.: $0 mmal_4 ++ exit 1 ++fi ++ ++VERSION=`cat RELEASE` ++if [ "$VERSION" == "" ]; then ++ echo Can\'t find version RELEASE ++ exit 1 ++fi ++ ++PATCHFILE=../ffmpeg-$VERSION-$1.patch ++ ++if [ $NOPATCH ]; then ++ echo Not tagged ++else ++ # Only continue if we are all comitted ++ git diff --name-status --exit-code ++ ++ PATCHTAG=pi/$VERSION/$1 ++ echo Tagging: $PATCHTAG ++ ++ git tag $PATCHTAG ++fi ++echo Generating patch: $PATCHFILE ++git diff n$VERSION -- > $PATCHFILE +--- /dev/null ++++ b/pi-util/make_array.py +@@ -0,0 +1,23 @@ ++#!/usr/bin/env python ++ ++# Usage ++# make_array file.bin ++# Produces file.h with array of bytes. ++# ++import sys ++for file in sys.argv[1:]: ++ prefix,suffix = file.split('.') ++ assert suffix=='bin' ++ name=prefix.split('/')[-1] ++ print 'Converting',file ++ with open(prefix+'.h','wb') as out: ++ print >>out, 'static const unsigned char',name,'[] = {' ++ with open(file,'rb') as fd: ++ i = 0 ++ for byte in fd.read(): ++ print >>out, '0x%02x, ' % ord(byte), ++ i = i + 1 ++ if i % 8 == 0: ++ print >>out, ' // %04x' % (i - 8) ++ print >>out,'};' ++ +--- /dev/null ++++ b/pi-util/mkinst.sh +@@ -0,0 +1,5 @@ ++set -e ++ ++make install ++ ++cp -r install/* ../vlc/sysroot/raspian_stretch_pi1-sysroot/usr +--- /dev/null ++++ b/pi-util/patkodi.sh +@@ -0,0 +1,9 @@ ++set -e ++KODIBASE=/home/jc/rpi/kodi/xbmc ++JOBS=-j20 ++make $JOBS ++git diff xbmc/release/4.3-kodi > $KODIBASE/tools/depends/target/ffmpeg/pfcd_hevc_optimisations.patch ++make -C $KODIBASE/tools/depends/target/ffmpeg $JOBS ++make -C $KODIBASE/build install ++ ++ +--- /dev/null ++++ b/pi-util/perfcmp.py +@@ -0,0 +1,101 @@ ++#!/usr/bin/env python3 ++ ++import time ++import string ++import os ++import tempfile ++import subprocess ++import re ++import argparse ++import sys ++import csv ++from stat import * ++ ++class tstats: ++ close_threshold = 0.01 ++ ++ def __init__(self, stats_dict=None): ++ if stats_dict != None: ++ self.name = stats_dict["name"] ++ self.elapsed = float(stats_dict["elapsed"]) ++ self.user = float(stats_dict["user"]) ++ self.sys = float(stats_dict["sys"]) ++ ++ def times_str(self): ++ ctime = self.sys + self.user ++ return "time=%6.2f, cpu=%6.2f (%4.2f%%)" % (self.elapsed, ctime, (ctime * 100.0) / self.elapsed) ++ ++ def dict(self): ++ return {"name":self.name, "elapsed":self.elapsed, "user":self.user, "sys":self.sys} ++ ++ def is_close(self, other): ++ return abs(self.elapsed - other.elapsed) / self.elapsed < self.close_threshold ++ ++ def __lt__(self, other): ++ return self.elapsed < other.elapsed ++ def __gt__(self, other): ++ return self.elapsed > other.elapsed ++ ++ def time_file(name, prefix): ++ stats = tstats() ++ stats.name = name ++ start_time = time.clock_gettime(time.CLOCK_MONOTONIC); ++ cproc = subprocess.Popen(["./ffmpeg", "-t", "30", "-i", prefix + name, ++ "-f", "null", os.devnull], bufsize=-1, stdout=flog, stderr=flog); ++ pinfo = os.wait4(cproc.pid, 0) ++ end_time = time.clock_gettime(time.CLOCK_MONOTONIC); ++ stats.elapsed = end_time - start_time ++ stats.user = pinfo[2].ru_utime ++ stats.sys = pinfo[2].ru_stime ++ return stats ++ ++ ++def common_prefix(s1, s2): ++ for i in range(min(len(s1),len(s2))): ++ if s1[i] != s2[i]: ++ return s1[:i] ++ return s1[:i+1] ++ ++def main(): ++ argp = argparse.ArgumentParser(description="FFmpeg performance compare") ++ ++ argp.add_argument("stream0", help="CSV to compare") ++ argp.add_argument("stream1", nargs='?', default="ffperf_out.csv", help="CSV to compare") ++ ++ args = argp.parse_args() ++ ++ with open(args.stream0, 'r', newline='') as f_in: ++ stats0 = {x["name"]:tstats(x) for x in csv.DictReader(f_in)} ++ with open(args.stream1, 'r', newline='') as f_in: ++ stats1 = {x["name"]:tstats(x) for x in csv.DictReader(f_in)} ++ ++ print (args.stream0, "<<-->>", args.stream1) ++ print () ++ ++ for f in sorted(stats0.keys() | stats1.keys(), key=lambda x : "~" * x.count(os.sep) + x.lower()): ++ if not (f in stats0) : ++ print (" XX :", f) ++ continue ++ if not (f in stats1) : ++ print (" XX :", f) ++ continue ++ ++ s0 = stats0[f] ++ s1 = stats1[f] ++ ++ pcent = ((s0.elapsed - s1.elapsed) / s0.elapsed) * 100.0 ++ thresh = 0.3 ++ tc = 6 ++ ++ nchar = min(tc - 1, int(abs(pcent) / thresh)) ++ cc = " -- " if nchar == 0 else "<" * nchar + " " * (tc - nchar) if pcent < 0 else " " * (tc - nchar) + ">" * nchar ++ ++ print ("%6.2f %s%6.2f (%+5.2f) : %s" % ++ (s0.elapsed, cc, s1.elapsed, pcent, f)) ++ ++ return 0 ++ ++ ++if __name__ == '__main__': ++ exit(main()) ++ +--- /dev/null ++++ b/pi-util/qem.sh +@@ -0,0 +1,9 @@ ++TARGET_DIR=../src/eupton_vc4dev_2012a/software/vc4/DEV/applications/tutorials/user_shader_example_tex ++QASM=python\ ../local/bin/qasm.py ++SRC_FILE=libavcodec/rpi_hevc_shader.qasm ++DST_BASE=shader ++ ++cp libavcodec/rpi_hevc_shader_cmd.h $TARGET_DIR ++$QASM -mc_c:$DST_BASE,$DST_BASE,$DST_BASE $SRC_FILE > $TARGET_DIR/$DST_BASE.c ++$QASM -mc_h:$DST_BASE,$DST_BASE,$DST_BASE $SRC_FILE > $TARGET_DIR/$DST_BASE.h ++ +--- /dev/null ++++ b/pi-util/testfilt.py +@@ -0,0 +1,83 @@ ++#!/usr/bin/env python3 ++ ++import string ++import os ++import subprocess ++import re ++import argparse ++import sys ++import csv ++from stat import * ++ ++class validator: ++ def __init__(self): ++ self.ok = False ++ ++ def isok(self): ++ return self.ok ++ ++ def setok(self): ++ self.ok = True ++ ++class valid_regex(validator): ++ def __init__(self, regex): ++ super().__init__() ++ self.regex = re.compile(regex) ++ ++ def scanline(self, line): ++ if self.isok() or self.regex.search(line): ++ self.setok() ++ ++ ++def validate(validators, flog): ++ for line in flog: ++ for v in validators: ++ v.scanline(line) ++ ++ ok = True ++ for v in validators: ++ if not v.isok(): ++ ok = False ++ # complain ++ print("Test failed") ++ ++ if ok: ++ print("OK") ++ return ok ++ ++def runtest(name, ffmpeg, args, suffix, validators): ++ log_root = os.path.join("/tmp", "testfilt", name) ++ ofilename = os.path.join(log_root, name + suffix) ++ ++ if not os.path.exists(log_root): ++ os.makedirs(log_root) ++ ++ try: ++ os.remove(ofilename) ++ except: ++ pass ++ ++ flog = open(os.path.join(log_root, name + ".log"), "wb") ++ ffargs = [ffmpeg] + args + [ofilename] ++ ++ subprocess.call(ffargs, stdout=flog, stderr=subprocess.STDOUT, text=False) ++ flog.close ++ ++ flog = open(os.path.join(log_root, name + ".log"), "rt") ++ return validate(validators, flog) ++ ++def sayok(log_root, flog): ++ print("Woohoo") ++ return True ++ ++if __name__ == '__main__': ++ ++ argp = argparse.ArgumentParser(description="FFmpeg filter tester") ++ argp.add_argument("--ffmpeg", default="./ffmpeg", help="ffmpeg exec name") ++ args = argp.parse_args() ++ ++ runtest("ATest", args.ffmpeg, ["-v", "verbose", "-no_cvt_hw", "-an", "-c:v", "h264_v4l2m2m", "-i", ++ "/home/johncox/server/TestMedia/Sony/jellyfish-10-mbps-hd-h264.mkv", ++# "/home/jc/rpi/streams/jellyfish-3-mbps-hd-h264.mkv", ++ "-c:v", "h264_v4l2m2m", "-b:v", "2M"], ".mkv", ++ [valid_regex(r'Output stream #0:0 \(video\): 900 frames encoded; 900 packets muxed')]) +--- /dev/null ++++ b/pi-util/v3dusage.py +@@ -0,0 +1,128 @@ ++#!/usr/bin/env python ++ ++import sys ++import argparse ++import re ++ ++def do_logparse(logname): ++ ++ rmatch = re.compile(r'^([0-9]+\.[0-9]{3}): (done )?((vpu0)|(vpu1)|(qpu1)) ([A-Z_]+) cb:([0-9a-f]+) ') ++ rqcycle = re.compile(r'^([0-9]+\.[0-9]{3}): v3d: QPU Total clock cycles for all QPUs doing vertex/coordinate shading +([0-9]+)$') ++ rqtscycle = re.compile(r'^([0-9]+\.[0-9]{3}): v3d: QPU Total clock cycles for all QPUs stalled waiting for TMUs +([0-9]+)$') ++ rl2hits = re.compile(r'^([0-9]+\.[0-9]{3}): v3d: L2C Total Level 2 cache ([a-z]+) +([0-9]+)$') ++ ++ ttotal = {'idle':0.0} ++ tstart = {} ++ qctotal = {} ++ qtstotal = {} ++ l2hits = {} ++ l2total = {} ++ time0 = None ++ idle_start = None ++ qpu_op_no = 0 ++ op_count = 0 ++ ++ with open(logname, "rt") as infile: ++ for line in infile: ++ match = rmatch.match(line) ++ if match: ++# print match.group(1), ":", match.group(2), ":", match.group(3), ":", match.group(7), ":" ++ time = float(match.group(1)) ++ unit = match.group(3) ++ opstart = not match.group(2) ++ optype = match.group(7) ++ hascb = match.group(8) != "0" ++ ++ if unit == 'qpu1': ++ unit = unit + "." + str(qpu_op_no) ++ if not opstart: ++ if hascb or optype == 'EXECUTE_SYNC': ++ qpu_op_no = 0 ++ else: ++ qpu_op_no += 1 ++ ++ # Ignore sync type ++ if optype == 'EXECUTE_SYNC': ++ continue ++ ++ if not time0: ++ time0 = time ++ ++ if opstart: ++ tstart[unit] = time; ++ elif unit in tstart: ++ op_count += 1 ++ if not unit in ttotal: ++ ttotal[unit] = 0.0 ++ ttotal[unit] += time - tstart[unit] ++ del tstart[unit] ++ ++ if not idle_start and not tstart: ++ idle_start = time ++ elif idle_start and tstart: ++ ttotal['idle'] += time - idle_start ++ idle_start = None ++ ++ match = rqcycle.match(line) ++ if match: ++ unit = "qpu1." + str(qpu_op_no) ++ if not unit in qctotal: ++ qctotal[unit] = 0 ++ qctotal[unit] += int(match.group(2)) ++ ++ match = rqtscycle.match(line) ++ if match: ++ unit = "qpu1." + str(qpu_op_no) ++ if not unit in qtstotal: ++ qtstotal[unit] = 0 ++ qtstotal[unit] += int(match.group(2)) ++ ++ match = rl2hits.match(line) ++ if match: ++ unit = "qpu1." + str(qpu_op_no) ++ if not unit in l2total: ++ l2total[unit] = 0 ++ l2hits[unit] = 0 ++ l2total[unit] += int(match.group(3)) ++ if match.group(2) == "hits": ++ l2hits[unit] += int(match.group(3)) ++ ++ ++ if not time0: ++ print "No v3d profile records found" ++ else: ++ tlogged = time - time0 ++ ++ print "Logged time:", tlogged, " Op count:", op_count ++ for unit in sorted(ttotal): ++ print b'%6s: %10.3f %7.3f%%' % (unit, ttotal[unit], ttotal[unit] * 100.0 / tlogged) ++ print ++ for unit in sorted(qctotal): ++ if not unit in qtstotal: ++ qtstotal[unit] = 0; ++ print b'%6s: Qcycles: %10d, TMU stall: %10d (%7.3f%%)' % (unit, qctotal[unit], qtstotal[unit], (qtstotal[unit] * 100.0)/qctotal[unit]) ++ if unit in l2total: ++ print b' L2Total: %10d, hits: %10d (%7.3f%%)' % (l2total[unit], l2hits[unit], (l2hits[unit] * 100.0)/l2total[unit]) ++ ++ ++ ++if __name__ == '__main__': ++ argp = argparse.ArgumentParser( ++ formatter_class=argparse.RawDescriptionHelpFormatter, ++ description="QPU/VPU perf summary from VC logging", ++ epilog = """ ++Will also summarise TMU stalls if logging requests set in qpu noflush param ++in the profiled code. ++ ++Example use: ++ vcgencmd set_logging level=0xc0 ++ ++ sudo vcdbg log msg >& t.log ++ v3dusage.py t.log ++""") ++ ++ argp.add_argument("logfile") ++ args = argp.parse_args() ++ ++ do_logparse(args.logfile) ++ +--- a/tests/checkasm/Makefile ++++ b/tests/checkasm/Makefile +@@ -38,6 +38,7 @@ CHECKASMOBJS-$(CONFIG_AVCODEC) + # libavfilter tests + AVFILTEROBJS-$(CONFIG_AFIR_FILTER) += af_afir.o + AVFILTEROBJS-$(CONFIG_BLEND_FILTER) += vf_blend.o ++AVFILTEROBJS-$(CONFIG_BWDIF_FILTER) += vf_bwdif.o + AVFILTEROBJS-$(CONFIG_COLORSPACE_FILTER) += vf_colorspace.o + AVFILTEROBJS-$(CONFIG_EQ_FILTER) += vf_eq.o + AVFILTEROBJS-$(CONFIG_GBLUR_FILTER) += vf_gblur.o +@@ -56,8 +57,9 @@ CHECKASMOBJS-$(CONFIG_SWSCALE) += $(SWS + AVUTILOBJS += av_tx.o + AVUTILOBJS += fixed_dsp.o + AVUTILOBJS += float_dsp.o ++AVUTILOBJS-$(CONFIG_SAND) += rpi_sand.o + +-CHECKASMOBJS-$(CONFIG_AVUTIL) += $(AVUTILOBJS) ++CHECKASMOBJS-$(CONFIG_AVUTIL) += $(AVUTILOBJS) $(AVUTILOBJS-yes) + + CHECKASMOBJS-$(ARCH_AARCH64) += aarch64/checkasm.o + CHECKASMOBJS-$(HAVE_ARMV5TE_EXTERNAL) += arm/checkasm.o +--- a/tests/checkasm/checkasm.c ++++ b/tests/checkasm/checkasm.c +@@ -173,6 +173,9 @@ static const struct { + #if CONFIG_BLEND_FILTER + { "vf_blend", checkasm_check_blend }, + #endif ++ #if CONFIG_BWDIF_FILTER ++ { "vf_bwdif", checkasm_check_vf_bwdif }, ++ #endif + #if CONFIG_COLORSPACE_FILTER + { "vf_colorspace", checkasm_check_colorspace }, + #endif +@@ -201,6 +204,9 @@ static const struct { + { "fixed_dsp", checkasm_check_fixed_dsp }, + { "float_dsp", checkasm_check_float_dsp }, + { "av_tx", checkasm_check_av_tx }, ++ #if CONFIG_SAND ++ { "rpi_sand", checkasm_check_rpi_sand }, ++ #endif + #endif + { NULL } + }; +--- a/tests/checkasm/checkasm.h ++++ b/tests/checkasm/checkasm.h +@@ -72,6 +72,7 @@ void checkasm_check_motion(void); + void checkasm_check_nlmeans(void); + void checkasm_check_opusdsp(void); + void checkasm_check_pixblockdsp(void); ++void checkasm_check_rpi_sand(void); + void checkasm_check_sbrdsp(void); + void checkasm_check_synth_filter(void); + void checkasm_check_sw_gbrp(void); +@@ -81,6 +82,7 @@ void checkasm_check_utvideodsp(void); + void checkasm_check_v210dec(void); + void checkasm_check_v210enc(void); + void checkasm_check_vc1dsp(void); ++void checkasm_check_vf_bwdif(void); + void checkasm_check_vf_eq(void); + void checkasm_check_vf_gblur(void); + void checkasm_check_vf_hflip(void); +--- /dev/null ++++ b/tests/checkasm/rpi_sand.c +@@ -0,0 +1,118 @@ ++/* ++ * Copyright (c) 2023 John Cox ++ * ++ * This file is part of FFmpeg. ++ * ++ * FFmpeg is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * FFmpeg is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License along ++ * with FFmpeg; if not, write to the Free Software Foundation, Inc., ++ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ++ */ ++ ++#include ++#include "checkasm.h" ++#include "libavutil/common.h" ++#include "libavutil/rpi_sand_fns.h" ++ ++#if ARCH_ARM ++#include "libavutil/arm/cpu.h" ++#include "libavutil/arm/rpi_sand_neon.h" ++#elif ARCH_AARCH64 ++#include "libavutil/aarch64/cpu.h" ++#include "libavutil/aarch64/rpi_sand_neon.h" ++#endif ++ ++static inline uint32_t pack30(unsigned int a, unsigned int b, unsigned int c) ++{ ++ return (a & 0x3ff) | ((b & 0x3ff) << 10) | ((c & 0x3ff) << 20); ++} ++ ++void checkasm_check_rpi_sand(void) ++{ ++ const unsigned int w = 1280; ++ const unsigned int h = 66; ++ const unsigned int stride1 = 128; ++ const unsigned int stride2 = h*3/2; ++ const unsigned int ssize = ((w+95)/96)*128*h*3/2; ++ const unsigned int ysize = ((w + 32) * (h + 32) * 2); ++ ++ uint8_t * sbuf0 = malloc(ssize); ++ uint8_t * sbuf1 = malloc(ssize); ++ uint8_t * ybuf0 = malloc(ysize); ++ uint8_t * ybuf1 = malloc(ysize); ++ uint8_t * vbuf0 = malloc(ysize); ++ uint8_t * vbuf1 = malloc(ysize); ++ uint8_t * yframe0 = (w + 32) * 16 + ybuf0; ++ uint8_t * yframe1 = (w + 32) * 16 + ybuf1; ++ uint8_t * vframe0 = (w + 32) * 16 + vbuf0; ++ uint8_t * vframe1 = (w + 32) * 16 + vbuf1; ++ unsigned int i; ++ ++ for (i = 0; i != ssize; i += 4) ++ *(uint32_t*)(sbuf0 + i) = rnd(); ++ memcpy(sbuf1, sbuf0, ssize); ++ ++ if (check_func(have_neon(av_get_cpu_flags()) ? ff_rpi_sand30_lines_to_planar_y16 : av_rpi_sand30_to_planar_y16, "rpi_sand30_to_planar_y16")) { ++ declare_func(void, uint8_t * dst, const unsigned int dst_stride, ++ const uint8_t * src, ++ unsigned int stride1, unsigned int stride2, ++ unsigned int _x, unsigned int y, ++ unsigned int _w, unsigned int h); ++ ++ memset(ybuf0, 0xbb, ysize); ++ memset(ybuf1, 0xbb, ysize); ++ ++ call_ref(yframe0, (w + 32) * 2, sbuf0, stride1, stride2, 0, 0, w, h); ++ call_new(yframe1, (w + 32) * 2, sbuf1, stride1, stride2, 0, 0, w, h); ++ ++ if (memcmp(sbuf0, sbuf1, ssize) ++ || memcmp(ybuf0, ybuf1, ysize)) ++ fail(); ++ ++ bench_new(ybuf1, (w + 32) * 2, sbuf1, stride1, stride2, 0, 0, w, h); ++ } ++ ++ if (check_func(have_neon(av_get_cpu_flags()) ? ff_rpi_sand30_lines_to_planar_c16 : av_rpi_sand30_to_planar_c16, "rpi_sand30_to_planar_c16")) { ++ declare_func(void, uint8_t * u_dst, const unsigned int u_stride, ++ uint8_t * v_dst, const unsigned int v_stride, ++ const uint8_t * src, ++ unsigned int stride1, unsigned int stride2, ++ unsigned int _x, unsigned int y, ++ unsigned int _w, unsigned int h); ++ ++ memset(ybuf0, 0xbb, ysize); ++ memset(ybuf1, 0xbb, ysize); ++ memset(vbuf0, 0xbb, ysize); ++ memset(vbuf1, 0xbb, ysize); ++ ++ call_ref(yframe0, (w + 32), vframe0, (w + 32), sbuf0, stride1, stride2, 0, 0, w/2, h/2); ++ call_new(yframe1, (w + 32), vframe1, (w + 32), sbuf1, stride1, stride2, 0, 0, w/2, h/2); ++ ++ if (memcmp(sbuf0, sbuf1, ssize) ++ || memcmp(ybuf0, ybuf1, ysize) ++ || memcmp(vbuf0, vbuf1, ysize)) ++ fail(); ++ ++ bench_new(yframe1, (w + 32), vframe1, (w + 32), sbuf1, stride1, stride2, 0, 0, w/2, h/2); ++ } ++ ++ ++ report("sand30"); ++ ++ free(sbuf0); ++ free(sbuf1); ++ free(ybuf0); ++ free(ybuf1); ++ free(vbuf0); ++ free(vbuf1); ++} ++ +--- /dev/null ++++ b/tests/checkasm/vf_bwdif.c +@@ -0,0 +1,256 @@ ++/* ++ * This file is part of FFmpeg. ++ * ++ * FFmpeg is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * FFmpeg is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License along ++ * with FFmpeg; if not, write to the Free Software Foundation, Inc., ++ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ++ */ ++ ++#include ++#include "checkasm.h" ++#include "libavcodec/internal.h" ++#include "libavfilter/bwdif.h" ++#include "libavutil/mem_internal.h" ++ ++#define WIDTH 256 ++ ++#define randomize_buffers(buf0, buf1, mask, count) \ ++ for (size_t i = 0; i < count; i++) \ ++ buf0[i] = buf1[i] = rnd() & mask ++ ++#define randomize_overflow_check(buf0, buf1, mask, count) \ ++ for (size_t i = 0; i < count; i++) \ ++ buf0[i] = buf1[i] = (rnd() & 1) != 0 ? mask : 0; ++ ++#define BODY(type, depth) \ ++ do { \ ++ type prev0[9*WIDTH], prev1[9*WIDTH]; \ ++ type next0[9*WIDTH], next1[9*WIDTH]; \ ++ type cur0[9*WIDTH], cur1[9*WIDTH]; \ ++ type dst0[WIDTH], dst1[WIDTH]; \ ++ const int stride = WIDTH; \ ++ const int mask = (1< -Date: Tue, 19 Jan 2021 20:35:29 +0100 -Subject: Fix build on powerpc and ppc64 - -Upstream-Status: Inappropriate - -RPI-Distro repo clones original ffmpeg and applies patches to enable -raspiberry pi support. - ---- - libswscale/ppc/yuv2rgb_altivec.c | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/libswscale/ppc/yuv2rgb_altivec.c b/libswscale/ppc/yuv2rgb_altivec.c -index 5365452..930ef6b 100644 ---- a/libswscale/ppc/yuv2rgb_altivec.c -+++ b/libswscale/ppc/yuv2rgb_altivec.c -@@ -283,6 +283,16 @@ static inline void cvtyuvtoRGB(SwsContext *c, vector signed short Y, - * ------------------------------------------------------------------------------ - */ - -+#if !HAVE_VSX -+static inline vector unsigned char vec_xl(signed long long offset, const ubyte *addr) -+{ -+ const vector unsigned char *v_addr = (const vector unsigned char *) (addr + offset); -+ vector unsigned char align_perm = vec_lvsl(offset, addr); -+ -+ return (vector unsigned char) vec_perm(v_addr[0], v_addr[1], align_perm); -+} -+#endif /* !HAVE_VSX */ -+ - #define DEFCSP420_CVT(name, out_pixels) \ - static int altivec_ ## name(SwsContext *c, const unsigned char **in, \ - int *instrides, int srcSliceY, int srcSliceH, \ diff --git a/sources/meta-raspberrypi/recipes-multimedia/rpidistro-ffmpeg/files/0003-avcodec-pngenc-remove-monowhite-from-apng-formats.patch b/sources/meta-raspberrypi/recipes-multimedia/rpidistro-ffmpeg/files/0003-avcodec-pngenc-remove-monowhite-from-apng-formats.patch deleted file mode 100644 index 11e3383a..00000000 --- a/sources/meta-raspberrypi/recipes-multimedia/rpidistro-ffmpeg/files/0003-avcodec-pngenc-remove-monowhite-from-apng-formats.patch +++ /dev/null @@ -1,30 +0,0 @@ -From: Paul B Mahol -Date: Sun, 14 Feb 2021 17:20:03 +0100 -Subject: avcodec/pngenc: remove monowhite from apng formats - -Upstream-Status: Inappropriate - -RPI-Distro repo clones original ffmpeg and applies patches to enable -raspiberry pi support. - -Monowhite pixel format is not supported, and it does not make sense -to add support for it. - -Fixes #7989 ---- - libavcodec/pngenc.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libavcodec/pngenc.c b/libavcodec/pngenc.c -index efcae8c..eebb164 100644 ---- a/libavcodec/pngenc.c -+++ b/libavcodec/pngenc.c -@@ -1174,7 +1174,7 @@ AVCodec ff_apng_encoder = { - AV_PIX_FMT_PAL8, - AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY8A, - AV_PIX_FMT_GRAY16BE, AV_PIX_FMT_YA16BE, -- AV_PIX_FMT_MONOBLACK, AV_PIX_FMT_NONE -+ AV_PIX_FMT_NONE - }, - .priv_class = &apngenc_class, - }; diff --git a/sources/meta-raspberrypi/recipes-multimedia/rpidistro-ffmpeg/files/0004-ffmpeg-4.3.4-rpi_14.patch b/sources/meta-raspberrypi/recipes-multimedia/rpidistro-ffmpeg/files/0004-ffmpeg-4.3.4-rpi_14.patch deleted file mode 100644 index 740ac0ea..00000000 --- a/sources/meta-raspberrypi/recipes-multimedia/rpidistro-ffmpeg/files/0004-ffmpeg-4.3.4-rpi_14.patch +++ /dev/null @@ -1,68341 +0,0 @@ -Upstream-Status: Inappropriate - -RPI-Distro repo clones original ffmpeg and applies patches to enable -raspiberry pi support. - ---- a/configure -+++ b/configure -@@ -207,6 +207,7 @@ External library support: - --disable-bzlib disable bzlib [autodetect] - --disable-coreimage disable Apple CoreImage framework [autodetect] - --enable-chromaprint enable audio fingerprinting with chromaprint [no] -+ --disable-epoxy disable epoxy [autodetect] - --enable-frei0r enable frei0r video filtering [no] - --enable-gcrypt enable gcrypt, needed for rtmp(t)e support - if openssl, librtmp or gmp is not used [no] -@@ -274,6 +275,7 @@ External library support: - --enable-libtls enable LibreSSL (via libtls), needed for https support - if openssl, gnutls or mbedtls is not used [no] - --enable-libtwolame enable MP2 encoding via libtwolame [no] -+ --disable-libudev disable libudev [autodetect] - --enable-libv4l2 enable libv4l2/v4l-utils [no] - --enable-libvidstab enable video stabilization using vid.stab [no] - --enable-libvmaf enable vmaf filter via libvmaf [no] -@@ -336,12 +338,17 @@ External library support: - --enable-libmfx enable Intel MediaSDK (AKA Quick Sync Video) code via libmfx [no] - --enable-libnpp enable Nvidia Performance Primitives-based code [no] - --enable-mmal enable Broadcom Multi-Media Abstraction Layer (Raspberry Pi) via MMAL [no] -+ --enable-rpi enable other rpi specific stuff [no] -+ --enable-sand enable sand video formats [rpi] -+ --enable-vout-drm enable the vout_drm module - for internal testing only [no] -+ --enable-vout-egl enable the vout_egl module - for internal testing only [no] - --disable-nvdec disable Nvidia video decoding acceleration (via hwaccel) [autodetect] - --disable-nvenc disable Nvidia video encoding code [autodetect] - --enable-omx enable OpenMAX IL code [no] - --enable-omx-rpi enable OpenMAX IL code for Raspberry Pi [no] - --enable-rkmpp enable Rockchip Media Process Platform code [no] - --disable-v4l2-m2m disable V4L2 mem2mem code [autodetect] -+ --enable-v4l2-request enable V4L2 request API code [no] - --disable-vaapi disable Video Acceleration API (mainly Unix/Intel) code [autodetect] - --disable-vdpau disable Nvidia Video Decode and Presentation API for Unix code [autodetect] - --disable-videotoolbox disable VideoToolbox code [autodetect] -@@ -1699,7 +1706,9 @@ EXTERNAL_AUTODETECT_LIBRARY_LIST=" - avfoundation - bzlib - coreimage -+ epoxy - iconv -+ libudev - libxcb - libxcb_shm - libxcb_shape -@@ -1861,7 +1870,10 @@ HWACCEL_LIBRARY_LIST=" - mmal - omx - opencl -+ v4l2_request - vulkan -+ rpi4_8 -+ rpi4_10 - " - - DOCUMENT_LIST=" -@@ -1877,12 +1889,16 @@ FEATURE_LIST=" - gray - hardcoded_tables - omx_rpi -+ rpi - runtime_cpudetect - safe_bitstream_reader -+ sand - shared - small - static - swscale_alpha -+ vout_drm -+ vout_egl - " - - # this list should be kept in linking order -@@ -1923,6 +1939,7 @@ SUBSYSTEM_LIST=" - pixelutils - network - rdft -+ rpi - " - - # COMPONENT_LIST needs to come last to ensure correct dependency checking -@@ -2405,9 +2422,11 @@ CONFIG_EXTRA=" - rangecoder - riffdec - riffenc -+ rpi - rtpdec - rtpenc_chain - rv34dsp -+ sand - scene_sad - sinewin - snappy -@@ -2737,6 +2756,8 @@ hap_decoder_select="snappy texturedsp" - hap_encoder_deps="libsnappy" - hap_encoder_select="texturedspenc" - hevc_decoder_select="bswapdsp cabac golomb hevcparse videodsp" -+hevc_rpi_decoder_deps="rpi" -+hevc_rpi_decoder_select="hevc_decoder sand" - huffyuv_decoder_select="bswapdsp huffyuvdsp llviddsp" - huffyuv_encoder_select="bswapdsp huffman huffyuvencdsp llvidencdsp" - hymt_decoder_select="huffyuv_decoder" -@@ -2903,6 +2924,7 @@ d3d11va_deps="dxva_h ID3D11VideoDecoder - dxva2_deps="dxva2api_h DXVA2_ConfigPictureDecode ole32 user32" - ffnvcodec_deps_any="libdl LoadLibrary" - nvdec_deps="ffnvcodec" -+v4l2_request_deps="linux_videodev2_h linux_media_h v4l2_timeval_to_ns libdrm libudev" - vaapi_x11_deps="xlib" - videotoolbox_hwaccel_deps="videotoolbox pthreads" - videotoolbox_hwaccel_extralibs="-framework QuartzCore" -@@ -2934,6 +2956,12 @@ hevc_dxva2_hwaccel_deps="dxva2 DXVA_PicP - hevc_dxva2_hwaccel_select="hevc_decoder" - hevc_nvdec_hwaccel_deps="nvdec" - hevc_nvdec_hwaccel_select="hevc_decoder" -+hevc_v4l2request_hwaccel_deps="v4l2_request" -+hevc_v4l2request_hwaccel_select="hevc_decoder" -+hevc_rpi4_10_hwaccel_deps="rpi" -+hevc_rpi4_10_hwaccel_select="hevc_decoder" -+hevc_rpi4_8_hwaccel_deps="rpi" -+hevc_rpi4_8_hwaccel_select="hevc_decoder" - hevc_vaapi_hwaccel_deps="vaapi VAPictureParameterBufferHEVC" - hevc_vaapi_hwaccel_select="hevc_decoder" - hevc_vdpau_hwaccel_deps="vdpau VdpPictureInfoHEVC" -@@ -3401,8 +3429,13 @@ sndio_indev_deps="sndio" - sndio_outdev_deps="sndio" - v4l2_indev_deps_any="linux_videodev2_h sys_videoio_h" - v4l2_indev_suggest="libv4l2" -+v4l2_outdev_deps="libdrm" - v4l2_outdev_deps_any="linux_videodev2_h sys_videoio_h" - v4l2_outdev_suggest="libv4l2" -+vout_drm_outdev_deps="libdrm" -+vout_egl_outdev_deps="xlib epoxy" -+vout_rpi_outdev_deps="rpi" -+vout_rpi_outdev_select="sand" - vfwcap_indev_deps="vfw32 vfwcap_defines" - xcbgrab_indev_deps="libxcb" - xcbgrab_indev_suggest="libxcb_shm libxcb_shape libxcb_xfixes" -@@ -3618,6 +3651,7 @@ tonemap_vaapi_filter_deps="vaapi VAProcF - tonemap_opencl_filter_deps="opencl const_nan" - transpose_opencl_filter_deps="opencl" - transpose_vaapi_filter_deps="vaapi VAProcPipelineCaps_rotation_flags" -+unsand_filter_select="sand" - unsharp_opencl_filter_deps="opencl" - uspp_filter_deps="gpl avcodec" - vaguedenoiser_filter_deps="gpl" -@@ -6102,6 +6136,12 @@ check_func_headers glob.h glob - enabled xlib && - check_lib xlib "X11/Xlib.h X11/extensions/Xvlib.h" XvGetPortAttribute -lXv -lX11 -lXext - -+enabled libudev && -+ check_pkg_config libudev libudev libudev.h udev_new -+ -+enabled epoxy && -+ check_pkg_config epoxy epoxy epoxy/egl.h epoxy_egl_version -+ - check_headers direct.h - check_headers dirent.h - check_headers dxgidebug.h -@@ -6430,11 +6470,12 @@ enabled mbedtls && { check_pkg - check_lib mbedtls mbedtls/ssl.h mbedtls_ssl_init -lmbedtls -lmbedx509 -lmbedcrypto || - die "ERROR: mbedTLS not found"; } - enabled mediacodec && { enabled jni || die "ERROR: mediacodec requires --enable-jni"; } --enabled mmal && { check_lib mmal interface/mmal/mmal.h mmal_port_connect -lmmal_core -lmmal_util -lmmal_vc_client -lbcm_host || -+( enabled rpi || -+ enabled mmal ) && { check_lib mmal interface/mmal/mmal.h mmal_port_connect -lmmal_core -lmmal_util -lmmal_vc_client -lbcm_host || - { ! enabled cross_compile && - add_cflags -isystem/opt/vc/include/ -isystem/opt/vc/include/interface/vmcs_host/linux -isystem/opt/vc/include/interface/vcos/pthreads -fgnu89-inline && - add_ldflags -L/opt/vc/lib/ && -- check_lib mmal interface/mmal/mmal.h mmal_port_connect -lmmal_core -lmmal_util -lmmal_vc_client -lbcm_host; } || -+ check_lib mmal interface/mmal/mmal.h mmal_port_connect -lmmal_core -lmmal_util -lmmal_vc_client -lbcm_host -lvcos -lvcsm -lvchostif -lvchiq_arm; } || - die "ERROR: mmal not found" && - check_func_headers interface/mmal/mmal.h "MMAL_PARAMETER_VIDEO_MAX_NUM_CALLBACKS"; } - enabled openal && { { for al_extralibs in "${OPENAL_LIBS}" "-lopenal" "-lOpenAL32"; do -@@ -6475,8 +6516,16 @@ enabled rkmpp && { require_p - { enabled libdrm || - die "ERROR: rkmpp requires --enable-libdrm"; } - } -+enabled v4l2_request && { enabled libdrm || -+ die "ERROR: v4l2-request requires --enable-libdrm"; } && -+ { enabled libudev || -+ die "ERROR: v4l2-request requires libudev"; } - enabled vapoursynth && require_pkg_config vapoursynth "vapoursynth-script >= 42" VSScript.h vsscript_init - -+enabled vout_drm && { enabled libdrm || die "ERROR: vout_drm requires --enable-libdrm"; } -+ -+enabled vout_egl && { enabled epoxy || die "ERROR: vout_egl requires epoxy"; } && -+ { enabled xlib || die "ERROR: vout_egl requires xlib"; } - - if enabled gcrypt; then - GCRYPT_CONFIG="${cross_prefix}libgcrypt-config" -@@ -6556,6 +6605,8 @@ if enabled v4l2_m2m; then - check_cc vp9_v4l2_m2m linux/videodev2.h "int i = V4L2_PIX_FMT_VP9;" - fi - -+check_func_headers "linux/media.h linux/videodev2.h" v4l2_timeval_to_ns -+check_cc hevc_v4l2_request linux/videodev2.h "int i = V4L2_PIX_FMT_HEVC_SLICE;" - check_headers sys/videoio.h - test_code cc sys/videoio.h "struct v4l2_frmsizeenum vfse; vfse.discrete.width = 0;" && enable_sanitized struct_v4l2_frmivalenum_discrete - ---- a/fftools/ffmpeg.c -+++ b/fftools/ffmpeg.c -@@ -2119,8 +2119,8 @@ static int ifilter_send_frame(InputFilte - ifilter->channel_layout != frame->channel_layout; - break; - case AVMEDIA_TYPE_VIDEO: -- need_reinit |= ifilter->width != frame->width || -- ifilter->height != frame->height; -+ need_reinit |= ifilter->width != av_frame_cropped_width(frame) || -+ ifilter->height != av_frame_cropped_height(frame); - break; - } - -@@ -2131,6 +2131,9 @@ static int ifilter_send_frame(InputFilte - (ifilter->hw_frames_ctx && ifilter->hw_frames_ctx->data != frame->hw_frames_ctx->data)) - need_reinit = 1; - -+ if (no_cvt_hw && fg->graph) -+ need_reinit = 0; -+ - if (need_reinit) { - ret = ifilter_parameters_from_frame(ifilter, frame); - if (ret < 0) -@@ -2401,8 +2404,7 @@ static int decode_video(InputStream *ist - decoded_frame->top_field_first = ist->top_field_first; - - ist->frames_decoded++; -- -- if (ist->hwaccel_retrieve_data && decoded_frame->format == ist->hwaccel_pix_fmt) { -+ if (!no_cvt_hw && ist->hwaccel_retrieve_data && decoded_frame->format == ist->hwaccel_pix_fmt) { - err = ist->hwaccel_retrieve_data(ist->dec_ctx, decoded_frame); - if (err < 0) - goto fail; -@@ -2600,7 +2602,12 @@ static int process_input_packet(InputStr - case AVMEDIA_TYPE_VIDEO: - ret = decode_video (ist, repeating ? NULL : &avpkt, &got_output, &duration_pts, !pkt, - &decode_failed); -- if (!repeating || !pkt || got_output) { -+ // Pi: Do not inc dts if no_cvt_hw set -+ // V4L2 H264 decode has long latency and sometimes spits out a long -+ // stream of output without input. In this case incrementing DTS is wrong. -+ // There may be cases where the condition as written is correct so only -+ // "fix" in the cases which cause problems -+ if (!repeating || !pkt || (got_output && !no_cvt_hw)) { - if (pkt && pkt->duration) { - duration_dts = av_rescale_q(pkt->duration, ist->st->time_base, AV_TIME_BASE_Q); - } else if(ist->dec_ctx->framerate.num != 0 && ist->dec_ctx->framerate.den != 0) { -@@ -2820,6 +2827,16 @@ static enum AVPixelFormat get_format(AVC - } else { - const HWAccel *hwaccel = NULL; - int i; -+ -+ if (no_cvt_hw) { -+ config = avcodec_get_hw_config(s->codec, 0); -+ if (config->methods == AV_CODEC_HW_CONFIG_METHOD_INTERNAL) { -+ av_log(s, AV_LOG_DEBUG, "no_cvt_hw so accepting pix_fmt %d with codec internal hwaccel\n", *p); -+ ist->hwaccel_pix_fmt = *p; -+ break; -+ } -+ } -+ - for (i = 0; hwaccels[i].name; i++) { - if (hwaccels[i].pix_fmt == *p) { - hwaccel = &hwaccels[i]; -@@ -2914,6 +2931,15 @@ static int init_input_stream(int ist_ind - return ret; - } - -+#if CONFIG_HEVC_RPI_DECODER -+ ret = -1; -+ if (strcmp(codec->name, "hevc_rpi") == 0 && -+ (ret = avcodec_open2(ist->dec_ctx, codec, &ist->decoder_opts)) < 0) { -+ ist->dec = codec = avcodec_find_decoder_by_name("hevc"); -+ av_log(NULL, AV_LOG_INFO, "Failed to open hevc_rpi - trying hevc\n"); -+ } -+ if (ret < 0) -+#endif - if ((ret = avcodec_open2(ist->dec_ctx, codec, &ist->decoder_opts)) < 0) { - if (ret == AVERROR_EXPERIMENTAL) - abort_codec_experimental(codec, 0); ---- a/fftools/ffmpeg.h -+++ b/fftools/ffmpeg.h -@@ -61,6 +61,7 @@ enum HWAccelID { - HWACCEL_GENERIC, - HWACCEL_VIDEOTOOLBOX, - HWACCEL_QSV, -+ HWACCEL_RPI, - }; - - typedef struct HWAccel { -@@ -590,6 +591,7 @@ extern int video_sync_method; - extern float frame_drop_threshold; - extern int do_benchmark; - extern int do_benchmark_all; -+extern int no_cvt_hw; - extern int do_deinterlace; - extern int do_hex_dump; - extern int do_pkt_dump; ---- a/fftools/ffmpeg_filter.c -+++ b/fftools/ffmpeg_filter.c -@@ -1186,8 +1186,8 @@ int ifilter_parameters_from_frame(InputF - - ifilter->format = frame->format; - -- ifilter->width = frame->width; -- ifilter->height = frame->height; -+ ifilter->width = av_frame_cropped_width(frame); -+ ifilter->height = av_frame_cropped_height(frame); - ifilter->sample_aspect_ratio = frame->sample_aspect_ratio; - - ifilter->sample_rate = frame->sample_rate; ---- a/fftools/ffmpeg_hw.c -+++ b/fftools/ffmpeg_hw.c -@@ -75,6 +75,8 @@ static char *hw_device_default_name(enum - char *name; - size_t index_pos; - int index, index_limit = 1000; -+ if (!type_name) -+ return NULL; - index_pos = strlen(type_name); - name = av_malloc(index_pos + 4); - if (!name) ---- a/fftools/ffmpeg_opt.c -+++ b/fftools/ffmpeg_opt.c -@@ -130,6 +130,12 @@ static const char *opt_name_enc_time_bas - }\ - } - -+#if CONFIG_RPI -+static int rpi_init(AVCodecContext *avctx) { -+ return 0; -+} -+#endif -+ - const HWAccel hwaccels[] = { - #if CONFIG_VIDEOTOOLBOX - { "videotoolbox", videotoolbox_init, HWACCEL_VIDEOTOOLBOX, AV_PIX_FMT_VIDEOTOOLBOX }, -@@ -137,6 +143,10 @@ const HWAccel hwaccels[] = { - #if CONFIG_LIBMFX - { "qsv", qsv_init, HWACCEL_QSV, AV_PIX_FMT_QSV }, - #endif -+#if CONFIG_RPI -+ { "rpi", rpi_init, HWACCEL_RPI, AV_PIX_FMT_RPI4_8 }, -+ { "rpi", rpi_init, HWACCEL_RPI, AV_PIX_FMT_RPI4_10 }, -+#endif - { 0 }, - }; - HWDevice *filter_hw_device; -@@ -155,6 +165,7 @@ float frame_drop_threshold = 0; - int do_deinterlace = 0; - int do_benchmark = 0; - int do_benchmark_all = 0; -+int no_cvt_hw = 0; - int do_hex_dump = 0; - int do_pkt_dump = 0; - int copy_ts = 0; -@@ -3460,6 +3471,8 @@ const OptionDef options[] = { - "add timings for benchmarking" }, - { "benchmark_all", OPT_BOOL | OPT_EXPERT, { &do_benchmark_all }, - "add timings for each task" }, -+ { "no_cvt_hw", OPT_BOOL | OPT_EXPERT, { &no_cvt_hw }, -+ "do not auto-convert hw frames to sw" }, - { "progress", HAS_ARG | OPT_EXPERT, { .func_arg = opt_progress }, - "write program-readable progress information", "url" }, - { "stdin", OPT_BOOL | OPT_EXPERT, { &stdin_interaction }, ---- a/libavcodec/Makefile -+++ b/libavcodec/Makefile -@@ -19,6 +19,7 @@ HEADERS = ac3_parser.h - mediacodec.h \ - packet.h \ - qsv.h \ -+ rpi_zc.h \ - vaapi.h \ - vdpau.h \ - version.h \ -@@ -138,6 +139,7 @@ OBJS-$(CONFIG_QSVDEC) + - OBJS-$(CONFIG_QSVENC) += qsvenc.o - OBJS-$(CONFIG_RANGECODER) += rangecoder.o - OBJS-$(CONFIG_RDFT) += rdft.o -+OBJS-$(CONFIG_RPI) += rpi_qpu.o rpi_mailbox.o rpi_zc.o - OBJS-$(CONFIG_RV34DSP) += rv34dsp.o - OBJS-$(CONFIG_SHARED) += log2_tab.o reverse.o - OBJS-$(CONFIG_SINEWIN) += sinewin.o sinewin_fixed.o -@@ -152,7 +154,10 @@ OBJS-$(CONFIG_VIDEODSP) + - OBJS-$(CONFIG_VP3DSP) += vp3dsp.o - OBJS-$(CONFIG_VP56DSP) += vp56dsp.o - OBJS-$(CONFIG_VP8DSP) += vp8dsp.o --OBJS-$(CONFIG_V4L2_M2M) += v4l2_m2m.o v4l2_context.o v4l2_buffers.o v4l2_fmt.o -+OBJS-$(CONFIG_V4L2_M2M) += v4l2_m2m.o v4l2_context.o v4l2_buffers.o v4l2_fmt.o\ -+ weak_link.o -+OBJS-$(CONFIG_V4L2_REQUEST) += v4l2_req_media.o v4l2_req_pollqueue.o v4l2_req_dmabufs.o\ -+ v4l2_req_devscan.o weak_link.o - OBJS-$(CONFIG_WMA_FREQS) += wma_freqs.o - OBJS-$(CONFIG_WMV2DSP) += wmv2dsp.o - -@@ -391,6 +396,14 @@ OBJS-$(CONFIG_HEVC_QSV_DECODER) + - OBJS-$(CONFIG_HEVC_QSV_ENCODER) += qsvenc_hevc.o hevc_ps_enc.o \ - hevc_data.o - OBJS-$(CONFIG_HEVC_RKMPP_DECODER) += rkmppdec.o -+OBJS-$(CONFIG_RPI) += rpi_mem.o \ -+ rpi_mailbox.o rpi_zc.o -+OBJS-$(CONFIG_HEVC_RPI_DECODER) += rpi_hevcdec.o rpi_hevc_mvs.o \ -+ rpi_hevc_cabac.o rpi_hevc_refs.o rpi_hevcpred.o \ -+ rpi_hevcdsp.o rpi_hevc_filter.o rpi_hevc_data.o \ -+ rpi_hevc_shader.o rpi_hevc_shader_template.o \ -+ rpi_hevc_parse.o h2645_parse.o rpi_hevc_ps.o \ -+ rpi_hevc_sei.o rpi_hevc_data.o rpi_qpu.o rpi_mem.o - OBJS-$(CONFIG_HEVC_VAAPI_ENCODER) += vaapi_encode_h265.o h265_profile_level.o - OBJS-$(CONFIG_HEVC_V4L2M2M_DECODER) += v4l2_m2m_dec.o - OBJS-$(CONFIG_HEVC_V4L2M2M_ENCODER) += v4l2_m2m_enc.o -@@ -909,6 +922,10 @@ OBJS-$(CONFIG_HEVC_D3D11VA_HWACCEL) - OBJS-$(CONFIG_HEVC_DXVA2_HWACCEL) += dxva2_hevc.o - OBJS-$(CONFIG_HEVC_NVDEC_HWACCEL) += nvdec_hevc.o - OBJS-$(CONFIG_HEVC_QSV_HWACCEL) += qsvdec_h2645.o -+OBJS-$(CONFIG_HEVC_RPI4_8_HWACCEL) += rpivid_hevc.o -+OBJS-$(CONFIG_HEVC_RPI4_10_HWACCEL) += rpivid_hevc.o -+OBJS-$(CONFIG_HEVC_V4L2REQUEST_HWACCEL) += v4l2_request_hevc.o v4l2_req_decode_q.o\ -+ v4l2_req_hevc_v1.o v4l2_req_hevc_v2.o v4l2_req_hevc_v3.o v4l2_req_hevc_v4.o - OBJS-$(CONFIG_HEVC_VAAPI_HWACCEL) += vaapi_hevc.o h265_profile_level.o - OBJS-$(CONFIG_HEVC_VDPAU_HWACCEL) += vdpau_hevc.o - OBJS-$(CONFIG_MJPEG_NVDEC_HWACCEL) += nvdec_mjpeg.o -@@ -1261,3 +1278,31 @@ $(SUBDIR)qdm2.o: $(SUBDIR)qdm2_tables.h - $(SUBDIR)sinewin.o: $(SUBDIR)sinewin_tables.h - $(SUBDIR)sinewin_fixed.o: $(SUBDIR)sinewin_fixed_tables.h - endif -+ -+ifdef CONFIG_HEVC_RPI_DECODER -+QASM_PY := ../local/bin/qasm.py -+VASMVIDCORE := ../local/bin/vasmvidcore_std -+ -+ifneq ("$(wildcard $(QASM_PY))","") -+$(SUBDIR)rpi_hevc_shader.c: $(SUBDIR)rpi_hevc_shader.qasm -+ $(QASM_PY) -mc_c:rpi_hevc_shader,rpi_hevc_shader,ff_hevc_rpi_shader $< > $@ -+ -+$(SUBDIR)rpi_hevc_shader.h: $(SUBDIR)rpi_hevc_shader.qasm -+ $(QASM_PY) -mc_h:rpi_hevc_shader,rpi_hevc_shader,ff_hevc_rpi_shader $< > $@ -+endif -+ -+ifneq ("$(wildcard $(VASMVIDCORE))","") -+$(SUBDIR)rpi_hevc_transform8.bin: $(SUBDIR)rpi_hevc_transform.s -+ $(VASMVIDCORE) -Fbin -DBIT_DEPTH=8 $< -o $@ -+$(SUBDIR)rpi_hevc_transform10.bin: $(SUBDIR)rpi_hevc_transform.s -+ $(VASMVIDCORE) -Fbin -DBIT_DEPTH=10 $< -o $@ -+ -+$(SUBDIR)rpi_hevc_transform8.h: $(SUBDIR)rpi_hevc_transform8.bin -+ python pi-util/make_array.py $< -+$(SUBDIR)rpi_hevc_transform10.h: $(SUBDIR)rpi_hevc_transform10.bin -+ python pi-util/make_array.py $< -+endif -+ -+$(SUBDIR)rpi_qpu.o: $(SUBDIR)rpi_hevc_transform8.h $(SUBDIR)rpi_hevc_transform10.h -+$(SUBDIR)rpi_hevcdec.o $(SUBDIR)rpi_shader_template.o $(SUBDIR)rpi_qpu.o: $(SUBDIR)rpi_hevc_shader.h -+endif ---- a/libavcodec/aarch64/Makefile -+++ b/libavcodec/aarch64/Makefile -@@ -44,10 +44,12 @@ NEON-OBJS-$(CONFIG_H264PRED) - NEON-OBJS-$(CONFIG_H264QPEL) += aarch64/h264qpel_neon.o \ - aarch64/hpeldsp_neon.o - NEON-OBJS-$(CONFIG_HPELDSP) += aarch64/hpeldsp_neon.o --NEON-OBJS-$(CONFIG_IDCTDSP) += aarch64/simple_idct_neon.o -+NEON-OBJS-$(CONFIG_IDCTDSP) += aarch64/idctdsp_neon.o \ -+ aarch64/simple_idct_neon.o - NEON-OBJS-$(CONFIG_MDCT) += aarch64/mdct_neon.o - NEON-OBJS-$(CONFIG_MPEGAUDIODSP) += aarch64/mpegaudiodsp_neon.o - NEON-OBJS-$(CONFIG_PIXBLOCKDSP) += aarch64/pixblockdsp_neon.o -+NEON-OBJS-$(CONFIG_VC1DSP) += aarch64/vc1dsp_neon.o - NEON-OBJS-$(CONFIG_VP8DSP) += aarch64/vp8dsp_neon.o - - # decoders/encoders ---- a/libavcodec/aarch64/idctdsp_init_aarch64.c -+++ b/libavcodec/aarch64/idctdsp_init_aarch64.c -@@ -27,19 +27,29 @@ - #include "libavcodec/idctdsp.h" - #include "idct.h" - -+void ff_put_pixels_clamped_neon(const int16_t *, uint8_t *, ptrdiff_t); -+void ff_put_signed_pixels_clamped_neon(const int16_t *, uint8_t *, ptrdiff_t); -+void ff_add_pixels_clamped_neon(const int16_t *, uint8_t *, ptrdiff_t); -+ - av_cold void ff_idctdsp_init_aarch64(IDCTDSPContext *c, AVCodecContext *avctx, - unsigned high_bit_depth) - { - int cpu_flags = av_get_cpu_flags(); - -- if (have_neon(cpu_flags) && !avctx->lowres && !high_bit_depth) { -- if (avctx->idct_algo == FF_IDCT_AUTO || -- avctx->idct_algo == FF_IDCT_SIMPLEAUTO || -- avctx->idct_algo == FF_IDCT_SIMPLENEON) { -- c->idct_put = ff_simple_idct_put_neon; -- c->idct_add = ff_simple_idct_add_neon; -- c->idct = ff_simple_idct_neon; -- c->perm_type = FF_IDCT_PERM_PARTTRANS; -+ if (have_neon(cpu_flags)) { -+ if (!avctx->lowres && !high_bit_depth) { -+ if (avctx->idct_algo == FF_IDCT_AUTO || -+ avctx->idct_algo == FF_IDCT_SIMPLEAUTO || -+ avctx->idct_algo == FF_IDCT_SIMPLENEON) { -+ c->idct_put = ff_simple_idct_put_neon; -+ c->idct_add = ff_simple_idct_add_neon; -+ c->idct = ff_simple_idct_neon; -+ c->perm_type = FF_IDCT_PERM_PARTTRANS; -+ } - } -+ -+ c->add_pixels_clamped = ff_add_pixels_clamped_neon; -+ c->put_pixels_clamped = ff_put_pixels_clamped_neon; -+ c->put_signed_pixels_clamped = ff_put_signed_pixels_clamped_neon; - } - } ---- /dev/null -+++ b/libavcodec/aarch64/idctdsp_neon.S -@@ -0,0 +1,130 @@ -+/* -+ * IDCT AArch64 NEON optimisations -+ * -+ * Copyright (c) 2022 Ben Avison -+ * -+ * This file is part of FFmpeg. -+ * -+ * FFmpeg is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * FFmpeg is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with FFmpeg; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+ */ -+ -+#include "libavutil/aarch64/asm.S" -+ -+// Clamp 16-bit signed block coefficients to unsigned 8-bit -+// On entry: -+// x0 -> array of 64x 16-bit coefficients -+// x1 -> 8-bit results -+// x2 = row stride for results, bytes -+function ff_put_pixels_clamped_neon, export=1 -+ ld1 {v0.16b, v1.16b, v2.16b, v3.16b}, [x0], #64 -+ ld1 {v4.16b, v5.16b, v6.16b, v7.16b}, [x0] -+ sqxtun v0.8b, v0.8h -+ sqxtun v1.8b, v1.8h -+ sqxtun v2.8b, v2.8h -+ sqxtun v3.8b, v3.8h -+ sqxtun v4.8b, v4.8h -+ st1 {v0.8b}, [x1], x2 -+ sqxtun v0.8b, v5.8h -+ st1 {v1.8b}, [x1], x2 -+ sqxtun v1.8b, v6.8h -+ st1 {v2.8b}, [x1], x2 -+ sqxtun v2.8b, v7.8h -+ st1 {v3.8b}, [x1], x2 -+ st1 {v4.8b}, [x1], x2 -+ st1 {v0.8b}, [x1], x2 -+ st1 {v1.8b}, [x1], x2 -+ st1 {v2.8b}, [x1] -+ ret -+endfunc -+ -+// Clamp 16-bit signed block coefficients to signed 8-bit (biased by 128) -+// On entry: -+// x0 -> array of 64x 16-bit coefficients -+// x1 -> 8-bit results -+// x2 = row stride for results, bytes -+function ff_put_signed_pixels_clamped_neon, export=1 -+ ld1 {v0.16b, v1.16b, v2.16b, v3.16b}, [x0], #64 -+ movi v4.8b, #128 -+ ld1 {v16.16b, v17.16b, v18.16b, v19.16b}, [x0] -+ sqxtn v0.8b, v0.8h -+ sqxtn v1.8b, v1.8h -+ sqxtn v2.8b, v2.8h -+ sqxtn v3.8b, v3.8h -+ sqxtn v5.8b, v16.8h -+ add v0.8b, v0.8b, v4.8b -+ sqxtn v6.8b, v17.8h -+ add v1.8b, v1.8b, v4.8b -+ sqxtn v7.8b, v18.8h -+ add v2.8b, v2.8b, v4.8b -+ sqxtn v16.8b, v19.8h -+ add v3.8b, v3.8b, v4.8b -+ st1 {v0.8b}, [x1], x2 -+ add v0.8b, v5.8b, v4.8b -+ st1 {v1.8b}, [x1], x2 -+ add v1.8b, v6.8b, v4.8b -+ st1 {v2.8b}, [x1], x2 -+ add v2.8b, v7.8b, v4.8b -+ st1 {v3.8b}, [x1], x2 -+ add v3.8b, v16.8b, v4.8b -+ st1 {v0.8b}, [x1], x2 -+ st1 {v1.8b}, [x1], x2 -+ st1 {v2.8b}, [x1], x2 -+ st1 {v3.8b}, [x1] -+ ret -+endfunc -+ -+// Add 16-bit signed block coefficients to unsigned 8-bit -+// On entry: -+// x0 -> array of 64x 16-bit coefficients -+// x1 -> 8-bit input and results -+// x2 = row stride for 8-bit input and results, bytes -+function ff_add_pixels_clamped_neon, export=1 -+ ld1 {v0.16b, v1.16b, v2.16b, v3.16b}, [x0], #64 -+ mov x3, x1 -+ ld1 {v4.8b}, [x1], x2 -+ ld1 {v5.8b}, [x1], x2 -+ ld1 {v6.8b}, [x1], x2 -+ ld1 {v7.8b}, [x1], x2 -+ ld1 {v16.16b, v17.16b, v18.16b, v19.16b}, [x0] -+ uaddw v0.8h, v0.8h, v4.8b -+ uaddw v1.8h, v1.8h, v5.8b -+ uaddw v2.8h, v2.8h, v6.8b -+ ld1 {v4.8b}, [x1], x2 -+ uaddw v3.8h, v3.8h, v7.8b -+ ld1 {v5.8b}, [x1], x2 -+ sqxtun v0.8b, v0.8h -+ ld1 {v6.8b}, [x1], x2 -+ sqxtun v1.8b, v1.8h -+ ld1 {v7.8b}, [x1] -+ sqxtun v2.8b, v2.8h -+ sqxtun v3.8b, v3.8h -+ uaddw v4.8h, v16.8h, v4.8b -+ st1 {v0.8b}, [x3], x2 -+ uaddw v0.8h, v17.8h, v5.8b -+ st1 {v1.8b}, [x3], x2 -+ uaddw v1.8h, v18.8h, v6.8b -+ st1 {v2.8b}, [x3], x2 -+ uaddw v2.8h, v19.8h, v7.8b -+ sqxtun v4.8b, v4.8h -+ sqxtun v0.8b, v0.8h -+ st1 {v3.8b}, [x3], x2 -+ sqxtun v1.8b, v1.8h -+ sqxtun v2.8b, v2.8h -+ st1 {v4.8b}, [x3], x2 -+ st1 {v0.8b}, [x3], x2 -+ st1 {v1.8b}, [x3], x2 -+ st1 {v2.8b}, [x3] -+ ret -+endfunc ---- a/libavcodec/aarch64/vc1dsp_init_aarch64.c -+++ b/libavcodec/aarch64/vc1dsp_init_aarch64.c -@@ -21,10 +21,28 @@ - #include "libavutil/attributes.h" - #include "libavutil/cpu.h" - #include "libavutil/aarch64/cpu.h" -+#include "libavutil/intreadwrite.h" - #include "libavcodec/vc1dsp.h" - - #include "config.h" - -+void ff_vc1_inv_trans_8x8_neon(int16_t *block); -+void ff_vc1_inv_trans_8x4_neon(uint8_t *dest, ptrdiff_t stride, int16_t *block); -+void ff_vc1_inv_trans_4x8_neon(uint8_t *dest, ptrdiff_t stride, int16_t *block); -+void ff_vc1_inv_trans_4x4_neon(uint8_t *dest, ptrdiff_t stride, int16_t *block); -+ -+void ff_vc1_inv_trans_8x8_dc_neon(uint8_t *dest, ptrdiff_t stride, int16_t *block); -+void ff_vc1_inv_trans_8x4_dc_neon(uint8_t *dest, ptrdiff_t stride, int16_t *block); -+void ff_vc1_inv_trans_4x8_dc_neon(uint8_t *dest, ptrdiff_t stride, int16_t *block); -+void ff_vc1_inv_trans_4x4_dc_neon(uint8_t *dest, ptrdiff_t stride, int16_t *block); -+ -+void ff_vc1_v_loop_filter4_neon(uint8_t *src, ptrdiff_t stride, int pq); -+void ff_vc1_h_loop_filter4_neon(uint8_t *src, ptrdiff_t stride, int pq); -+void ff_vc1_v_loop_filter8_neon(uint8_t *src, ptrdiff_t stride, int pq); -+void ff_vc1_h_loop_filter8_neon(uint8_t *src, ptrdiff_t stride, int pq); -+void ff_vc1_v_loop_filter16_neon(uint8_t *src, ptrdiff_t stride, int pq); -+void ff_vc1_h_loop_filter16_neon(uint8_t *src, ptrdiff_t stride, int pq); -+ - void ff_put_vc1_chroma_mc8_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride, - int h, int x, int y); - void ff_avg_vc1_chroma_mc8_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride, -@@ -34,14 +52,90 @@ void ff_put_vc1_chroma_mc4_neon(uint8_t - void ff_avg_vc1_chroma_mc4_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride, - int h, int x, int y); - -+int ff_vc1_unescape_buffer_helper_neon(const uint8_t *src, int size, uint8_t *dst); -+ -+static int vc1_unescape_buffer_neon(const uint8_t *src, int size, uint8_t *dst) -+{ -+ /* Dealing with starting and stopping, and removing escape bytes, are -+ * comparatively less time-sensitive, so are more clearly expressed using -+ * a C wrapper around the assembly inner loop. Note that we assume a -+ * little-endian machine that supports unaligned loads. */ -+ int dsize = 0; -+ while (size >= 4) -+ { -+ int found = 0; -+ while (!found && (((uintptr_t) dst) & 7) && size >= 4) -+ { -+ found = (AV_RL32(src) &~ 0x03000000) == 0x00030000; -+ if (!found) -+ { -+ *dst++ = *src++; -+ --size; -+ ++dsize; -+ } -+ } -+ if (!found) -+ { -+ int skip = size - ff_vc1_unescape_buffer_helper_neon(src, size, dst); -+ dst += skip; -+ src += skip; -+ size -= skip; -+ dsize += skip; -+ while (!found && size >= 4) -+ { -+ found = (AV_RL32(src) &~ 0x03000000) == 0x00030000; -+ if (!found) -+ { -+ *dst++ = *src++; -+ --size; -+ ++dsize; -+ } -+ } -+ } -+ if (found) -+ { -+ *dst++ = *src++; -+ *dst++ = *src++; -+ ++src; -+ size -= 3; -+ dsize += 2; -+ } -+ } -+ while (size > 0) -+ { -+ *dst++ = *src++; -+ --size; -+ ++dsize; -+ } -+ return dsize; -+} -+ - av_cold void ff_vc1dsp_init_aarch64(VC1DSPContext *dsp) - { - int cpu_flags = av_get_cpu_flags(); - - if (have_neon(cpu_flags)) { -+ dsp->vc1_inv_trans_8x8 = ff_vc1_inv_trans_8x8_neon; -+ dsp->vc1_inv_trans_8x4 = ff_vc1_inv_trans_8x4_neon; -+ dsp->vc1_inv_trans_4x8 = ff_vc1_inv_trans_4x8_neon; -+ dsp->vc1_inv_trans_4x4 = ff_vc1_inv_trans_4x4_neon; -+ dsp->vc1_inv_trans_8x8_dc = ff_vc1_inv_trans_8x8_dc_neon; -+ dsp->vc1_inv_trans_8x4_dc = ff_vc1_inv_trans_8x4_dc_neon; -+ dsp->vc1_inv_trans_4x8_dc = ff_vc1_inv_trans_4x8_dc_neon; -+ dsp->vc1_inv_trans_4x4_dc = ff_vc1_inv_trans_4x4_dc_neon; -+ -+ dsp->vc1_v_loop_filter4 = ff_vc1_v_loop_filter4_neon; -+ dsp->vc1_h_loop_filter4 = ff_vc1_h_loop_filter4_neon; -+ dsp->vc1_v_loop_filter8 = ff_vc1_v_loop_filter8_neon; -+ dsp->vc1_h_loop_filter8 = ff_vc1_h_loop_filter8_neon; -+ dsp->vc1_v_loop_filter16 = ff_vc1_v_loop_filter16_neon; -+ dsp->vc1_h_loop_filter16 = ff_vc1_h_loop_filter16_neon; -+ - dsp->put_no_rnd_vc1_chroma_pixels_tab[0] = ff_put_vc1_chroma_mc8_neon; - dsp->avg_no_rnd_vc1_chroma_pixels_tab[0] = ff_avg_vc1_chroma_mc8_neon; - dsp->put_no_rnd_vc1_chroma_pixels_tab[1] = ff_put_vc1_chroma_mc4_neon; - dsp->avg_no_rnd_vc1_chroma_pixels_tab[1] = ff_avg_vc1_chroma_mc4_neon; -+ -+ dsp->vc1_unescape_buffer = vc1_unescape_buffer_neon; - } - } ---- /dev/null -+++ b/libavcodec/aarch64/vc1dsp_neon.S -@@ -0,0 +1,1546 @@ -+/* -+ * VC1 AArch64 NEON optimisations -+ * -+ * Copyright (c) 2022 Ben Avison -+ * -+ * This file is part of FFmpeg. -+ * -+ * FFmpeg is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * FFmpeg is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with FFmpeg; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+ */ -+ -+#include "libavutil/aarch64/asm.S" -+ -+// VC-1 8x8 inverse transform -+// On entry: -+// x0 -> array of 16-bit inverse transform coefficients, in column-major order -+// On exit: -+// array at x0 updated to hold transformed block; also now held in row-major order -+function ff_vc1_inv_trans_8x8_neon, export=1 -+ ld1 {v1.16b, v2.16b}, [x0], #32 -+ ld1 {v3.16b, v4.16b}, [x0], #32 -+ ld1 {v5.16b, v6.16b}, [x0], #32 -+ shl v1.8h, v1.8h, #2 // 8/2 * src[0] -+ sub x1, x0, #3*32 -+ ld1 {v16.16b, v17.16b}, [x0] -+ shl v7.8h, v2.8h, #4 // 16 * src[8] -+ shl v18.8h, v2.8h, #2 // 4 * src[8] -+ shl v19.8h, v4.8h, #4 // 16 * src[24] -+ ldr d0, .Lcoeffs_it8 -+ shl v5.8h, v5.8h, #2 // 8/2 * src[32] -+ shl v20.8h, v6.8h, #4 // 16 * src[40] -+ shl v21.8h, v6.8h, #2 // 4 * src[40] -+ shl v22.8h, v17.8h, #4 // 16 * src[56] -+ ssra v20.8h, v19.8h, #2 // 4 * src[24] + 16 * src[40] -+ mul v23.8h, v3.8h, v0.h[0] // 6/2 * src[16] -+ sub v19.8h, v19.8h, v21.8h // 16 * src[24] - 4 * src[40] -+ ssra v7.8h, v22.8h, #2 // 16 * src[8] + 4 * src[56] -+ sub v18.8h, v22.8h, v18.8h // - 4 * src[8] + 16 * src[56] -+ shl v3.8h, v3.8h, #3 // 16/2 * src[16] -+ mls v20.8h, v2.8h, v0.h[2] // - 15 * src[8] + 4 * src[24] + 16 * src[40] -+ ssra v1.8h, v1.8h, #1 // 12/2 * src[0] -+ ssra v5.8h, v5.8h, #1 // 12/2 * src[32] -+ mla v7.8h, v4.8h, v0.h[2] // 16 * src[8] + 15 * src[24] + 4 * src[56] -+ shl v21.8h, v16.8h, #3 // 16/2 * src[48] -+ mls v19.8h, v2.8h, v0.h[1] // - 9 * src[8] + 16 * src[24] - 4 * src[40] -+ sub v2.8h, v23.8h, v21.8h // t4/2 = 6/2 * src[16] - 16/2 * src[48] -+ mla v18.8h, v4.8h, v0.h[1] // - 4 * src[8] + 9 * src[24] + 16 * src[56] -+ add v4.8h, v1.8h, v5.8h // t1/2 = 12/2 * src[0] + 12/2 * src[32] -+ sub v1.8h, v1.8h, v5.8h // t2/2 = 12/2 * src[0] - 12/2 * src[32] -+ mla v3.8h, v16.8h, v0.h[0] // t3/2 = 16/2 * src[16] + 6/2 * src[48] -+ mla v7.8h, v6.8h, v0.h[1] // t1 = 16 * src[8] + 15 * src[24] + 9 * src[40] + 4 * src[56] -+ add v5.8h, v1.8h, v2.8h // t6/2 = t2/2 + t4/2 -+ sub v16.8h, v1.8h, v2.8h // t7/2 = t2/2 - t4/2 -+ mla v20.8h, v17.8h, v0.h[1] // -t2 = - 15 * src[8] + 4 * src[24] + 16 * src[40] + 9 * src[56] -+ add v21.8h, v1.8h, v2.8h // t6/2 = t2/2 + t4/2 -+ add v22.8h, v4.8h, v3.8h // t5/2 = t1/2 + t3/2 -+ mls v19.8h, v17.8h, v0.h[2] // -t3 = - 9 * src[8] + 16 * src[24] - 4 * src[40] - 15 * src[56] -+ sub v17.8h, v4.8h, v3.8h // t8/2 = t1/2 - t3/2 -+ add v23.8h, v4.8h, v3.8h // t5/2 = t1/2 + t3/2 -+ mls v18.8h, v6.8h, v0.h[2] // -t4 = - 4 * src[8] + 9 * src[24] - 15 * src[40] + 16 * src[56] -+ sub v1.8h, v1.8h, v2.8h // t7/2 = t2/2 - t4/2 -+ sub v2.8h, v4.8h, v3.8h // t8/2 = t1/2 - t3/2 -+ neg v3.8h, v7.8h // -t1 -+ neg v4.8h, v20.8h // +t2 -+ neg v6.8h, v19.8h // +t3 -+ ssra v22.8h, v7.8h, #1 // (t5 + t1) >> 1 -+ ssra v1.8h, v19.8h, #1 // (t7 - t3) >> 1 -+ neg v7.8h, v18.8h // +t4 -+ ssra v5.8h, v4.8h, #1 // (t6 + t2) >> 1 -+ ssra v16.8h, v6.8h, #1 // (t7 + t3) >> 1 -+ ssra v2.8h, v18.8h, #1 // (t8 - t4) >> 1 -+ ssra v17.8h, v7.8h, #1 // (t8 + t4) >> 1 -+ ssra v21.8h, v20.8h, #1 // (t6 - t2) >> 1 -+ ssra v23.8h, v3.8h, #1 // (t5 - t1) >> 1 -+ srshr v3.8h, v22.8h, #2 // (t5 + t1 + 4) >> 3 -+ srshr v4.8h, v5.8h, #2 // (t6 + t2 + 4) >> 3 -+ srshr v5.8h, v16.8h, #2 // (t7 + t3 + 4) >> 3 -+ srshr v6.8h, v17.8h, #2 // (t8 + t4 + 4) >> 3 -+ srshr v2.8h, v2.8h, #2 // (t8 - t4 + 4) >> 3 -+ srshr v1.8h, v1.8h, #2 // (t7 - t3 + 4) >> 3 -+ srshr v7.8h, v21.8h, #2 // (t6 - t2 + 4) >> 3 -+ srshr v16.8h, v23.8h, #2 // (t5 - t1 + 4) >> 3 -+ trn2 v17.8h, v3.8h, v4.8h -+ trn2 v18.8h, v5.8h, v6.8h -+ trn2 v19.8h, v2.8h, v1.8h -+ trn2 v20.8h, v7.8h, v16.8h -+ trn1 v21.4s, v17.4s, v18.4s -+ trn2 v17.4s, v17.4s, v18.4s -+ trn1 v18.4s, v19.4s, v20.4s -+ trn2 v19.4s, v19.4s, v20.4s -+ trn1 v3.8h, v3.8h, v4.8h -+ trn2 v4.2d, v21.2d, v18.2d -+ trn1 v20.2d, v17.2d, v19.2d -+ trn1 v5.8h, v5.8h, v6.8h -+ trn1 v1.8h, v2.8h, v1.8h -+ trn1 v2.8h, v7.8h, v16.8h -+ trn1 v6.2d, v21.2d, v18.2d -+ trn2 v7.2d, v17.2d, v19.2d -+ shl v16.8h, v20.8h, #4 // 16 * src[24] -+ shl v17.8h, v4.8h, #4 // 16 * src[40] -+ trn1 v18.4s, v3.4s, v5.4s -+ trn1 v19.4s, v1.4s, v2.4s -+ shl v21.8h, v7.8h, #4 // 16 * src[56] -+ shl v22.8h, v6.8h, #2 // 4 * src[8] -+ shl v23.8h, v4.8h, #2 // 4 * src[40] -+ trn2 v3.4s, v3.4s, v5.4s -+ trn2 v1.4s, v1.4s, v2.4s -+ shl v2.8h, v6.8h, #4 // 16 * src[8] -+ sub v5.8h, v16.8h, v23.8h // 16 * src[24] - 4 * src[40] -+ ssra v17.8h, v16.8h, #2 // 4 * src[24] + 16 * src[40] -+ sub v16.8h, v21.8h, v22.8h // - 4 * src[8] + 16 * src[56] -+ trn1 v22.2d, v18.2d, v19.2d -+ trn2 v18.2d, v18.2d, v19.2d -+ trn1 v19.2d, v3.2d, v1.2d -+ ssra v2.8h, v21.8h, #2 // 16 * src[8] + 4 * src[56] -+ mls v17.8h, v6.8h, v0.h[2] // - 15 * src[8] + 4 * src[24] + 16 * src[40] -+ shl v21.8h, v22.8h, #2 // 8/2 * src[0] -+ shl v18.8h, v18.8h, #2 // 8/2 * src[32] -+ mls v5.8h, v6.8h, v0.h[1] // - 9 * src[8] + 16 * src[24] - 4 * src[40] -+ shl v6.8h, v19.8h, #3 // 16/2 * src[16] -+ trn2 v1.2d, v3.2d, v1.2d -+ mla v16.8h, v20.8h, v0.h[1] // - 4 * src[8] + 9 * src[24] + 16 * src[56] -+ ssra v21.8h, v21.8h, #1 // 12/2 * src[0] -+ ssra v18.8h, v18.8h, #1 // 12/2 * src[32] -+ mul v3.8h, v19.8h, v0.h[0] // 6/2 * src[16] -+ shl v19.8h, v1.8h, #3 // 16/2 * src[48] -+ mla v2.8h, v20.8h, v0.h[2] // 16 * src[8] + 15 * src[24] + 4 * src[56] -+ add v20.8h, v21.8h, v18.8h // t1/2 = 12/2 * src[0] + 12/2 * src[32] -+ mla v6.8h, v1.8h, v0.h[0] // t3/2 = 16/2 * src[16] + 6/2 * src[48] -+ sub v1.8h, v21.8h, v18.8h // t2/2 = 12/2 * src[0] - 12/2 * src[32] -+ sub v3.8h, v3.8h, v19.8h // t4/2 = 6/2 * src[16] - 16/2 * src[48] -+ mla v17.8h, v7.8h, v0.h[1] // -t2 = - 15 * src[8] + 4 * src[24] + 16 * src[40] + 9 * src[56] -+ mls v5.8h, v7.8h, v0.h[2] // -t3 = - 9 * src[8] + 16 * src[24] - 4 * src[40] - 15 * src[56] -+ add v7.8h, v1.8h, v3.8h // t6/2 = t2/2 + t4/2 -+ add v18.8h, v20.8h, v6.8h // t5/2 = t1/2 + t3/2 -+ mls v16.8h, v4.8h, v0.h[2] // -t4 = - 4 * src[8] + 9 * src[24] - 15 * src[40] + 16 * src[56] -+ sub v19.8h, v1.8h, v3.8h // t7/2 = t2/2 - t4/2 -+ neg v21.8h, v17.8h // +t2 -+ mla v2.8h, v4.8h, v0.h[1] // t1 = 16 * src[8] + 15 * src[24] + 9 * src[40] + 4 * src[56] -+ sub v0.8h, v20.8h, v6.8h // t8/2 = t1/2 - t3/2 -+ neg v4.8h, v5.8h // +t3 -+ sub v22.8h, v1.8h, v3.8h // t7/2 = t2/2 - t4/2 -+ sub v23.8h, v20.8h, v6.8h // t8/2 = t1/2 - t3/2 -+ neg v24.8h, v16.8h // +t4 -+ add v6.8h, v20.8h, v6.8h // t5/2 = t1/2 + t3/2 -+ add v1.8h, v1.8h, v3.8h // t6/2 = t2/2 + t4/2 -+ ssra v7.8h, v21.8h, #1 // (t6 + t2) >> 1 -+ neg v3.8h, v2.8h // -t1 -+ ssra v18.8h, v2.8h, #1 // (t5 + t1) >> 1 -+ ssra v19.8h, v4.8h, #1 // (t7 + t3) >> 1 -+ ssra v0.8h, v24.8h, #1 // (t8 + t4) >> 1 -+ srsra v23.8h, v16.8h, #1 // (t8 - t4 + 1) >> 1 -+ srsra v22.8h, v5.8h, #1 // (t7 - t3 + 1) >> 1 -+ srsra v1.8h, v17.8h, #1 // (t6 - t2 + 1) >> 1 -+ srsra v6.8h, v3.8h, #1 // (t5 - t1 + 1) >> 1 -+ srshr v2.8h, v18.8h, #6 // (t5 + t1 + 64) >> 7 -+ srshr v3.8h, v7.8h, #6 // (t6 + t2 + 64) >> 7 -+ srshr v4.8h, v19.8h, #6 // (t7 + t3 + 64) >> 7 -+ srshr v5.8h, v0.8h, #6 // (t8 + t4 + 64) >> 7 -+ srshr v16.8h, v23.8h, #6 // (t8 - t4 + 65) >> 7 -+ srshr v17.8h, v22.8h, #6 // (t7 - t3 + 65) >> 7 -+ st1 {v2.16b, v3.16b}, [x1], #32 -+ srshr v0.8h, v1.8h, #6 // (t6 - t2 + 65) >> 7 -+ srshr v1.8h, v6.8h, #6 // (t5 - t1 + 65) >> 7 -+ st1 {v4.16b, v5.16b}, [x1], #32 -+ st1 {v16.16b, v17.16b}, [x1], #32 -+ st1 {v0.16b, v1.16b}, [x1] -+ ret -+endfunc -+ -+// VC-1 8x4 inverse transform -+// On entry: -+// x0 -> array of 8-bit samples, in row-major order -+// x1 = row stride for 8-bit sample array -+// x2 -> array of 16-bit inverse transform coefficients, in row-major order -+// On exit: -+// array at x0 updated by saturated addition of (narrowed) transformed block -+function ff_vc1_inv_trans_8x4_neon, export=1 -+ ld1 {v1.8b, v2.8b, v3.8b, v4.8b}, [x2], #32 -+ mov x3, x0 -+ ld1 {v16.8b, v17.8b, v18.8b, v19.8b}, [x2] -+ ldr q0, .Lcoeffs_it8 // includes 4-point coefficients in upper half of vector -+ ld1 {v5.8b}, [x0], x1 -+ trn2 v6.4h, v1.4h, v3.4h -+ trn2 v7.4h, v2.4h, v4.4h -+ trn1 v1.4h, v1.4h, v3.4h -+ trn1 v2.4h, v2.4h, v4.4h -+ trn2 v3.4h, v16.4h, v18.4h -+ trn2 v4.4h, v17.4h, v19.4h -+ trn1 v16.4h, v16.4h, v18.4h -+ trn1 v17.4h, v17.4h, v19.4h -+ ld1 {v18.8b}, [x0], x1 -+ trn1 v19.2s, v6.2s, v3.2s -+ trn2 v3.2s, v6.2s, v3.2s -+ trn1 v6.2s, v7.2s, v4.2s -+ trn2 v4.2s, v7.2s, v4.2s -+ trn1 v7.2s, v1.2s, v16.2s -+ trn1 v20.2s, v2.2s, v17.2s -+ shl v21.4h, v19.4h, #4 // 16 * src[1] -+ trn2 v1.2s, v1.2s, v16.2s -+ shl v16.4h, v3.4h, #4 // 16 * src[3] -+ trn2 v2.2s, v2.2s, v17.2s -+ shl v17.4h, v6.4h, #4 // 16 * src[5] -+ ld1 {v22.8b}, [x0], x1 -+ shl v23.4h, v4.4h, #4 // 16 * src[7] -+ mul v24.4h, v1.4h, v0.h[0] // 6/2 * src[2] -+ ld1 {v25.8b}, [x0] -+ shl v26.4h, v19.4h, #2 // 4 * src[1] -+ shl v27.4h, v6.4h, #2 // 4 * src[5] -+ ssra v21.4h, v23.4h, #2 // 16 * src[1] + 4 * src[7] -+ ssra v17.4h, v16.4h, #2 // 4 * src[3] + 16 * src[5] -+ sub v23.4h, v23.4h, v26.4h // - 4 * src[1] + 16 * src[7] -+ sub v16.4h, v16.4h, v27.4h // 16 * src[3] - 4 * src[5] -+ shl v7.4h, v7.4h, #2 // 8/2 * src[0] -+ shl v20.4h, v20.4h, #2 // 8/2 * src[4] -+ mla v21.4h, v3.4h, v0.h[2] // 16 * src[1] + 15 * src[3] + 4 * src[7] -+ shl v1.4h, v1.4h, #3 // 16/2 * src[2] -+ mls v17.4h, v19.4h, v0.h[2] // - 15 * src[1] + 4 * src[3] + 16 * src[5] -+ ssra v7.4h, v7.4h, #1 // 12/2 * src[0] -+ mls v16.4h, v19.4h, v0.h[1] // - 9 * src[1] + 16 * src[3] - 4 * src[5] -+ ssra v20.4h, v20.4h, #1 // 12/2 * src[4] -+ mla v23.4h, v3.4h, v0.h[1] // - 4 * src[1] + 9 * src[3] + 16 * src[7] -+ shl v3.4h, v2.4h, #3 // 16/2 * src[6] -+ mla v1.4h, v2.4h, v0.h[0] // t3/2 = 16/2 * src[2] + 6/2 * src[6] -+ mla v21.4h, v6.4h, v0.h[1] // t1 = 16 * src[1] + 15 * src[3] + 9 * src[5] + 4 * src[7] -+ mla v17.4h, v4.4h, v0.h[1] // -t2 = - 15 * src[1] + 4 * src[3] + 16 * src[5] + 9 * src[7] -+ sub v2.4h, v24.4h, v3.4h // t4/2 = 6/2 * src[2] - 16/2 * src[6] -+ mls v16.4h, v4.4h, v0.h[2] // -t3 = - 9 * src[1] + 16 * src[3] - 4 * src[5] - 15 * src[7] -+ add v3.4h, v7.4h, v20.4h // t1/2 = 12/2 * src[0] + 12/2 * src[4] -+ mls v23.4h, v6.4h, v0.h[2] // -t4 = - 4 * src[1] + 9 * src[3] - 15 * src[5] + 16 * src[7] -+ sub v4.4h, v7.4h, v20.4h // t2/2 = 12/2 * src[0] - 12/2 * src[4] -+ neg v6.4h, v21.4h // -t1 -+ add v7.4h, v3.4h, v1.4h // t5/2 = t1/2 + t3/2 -+ sub v19.4h, v3.4h, v1.4h // t8/2 = t1/2 - t3/2 -+ add v20.4h, v4.4h, v2.4h // t6/2 = t2/2 + t4/2 -+ sub v24.4h, v4.4h, v2.4h // t7/2 = t2/2 - t4/2 -+ add v26.4h, v3.4h, v1.4h // t5/2 = t1/2 + t3/2 -+ add v27.4h, v4.4h, v2.4h // t6/2 = t2/2 + t4/2 -+ sub v2.4h, v4.4h, v2.4h // t7/2 = t2/2 - t4/2 -+ sub v1.4h, v3.4h, v1.4h // t8/2 = t1/2 - t3/2 -+ neg v3.4h, v17.4h // +t2 -+ neg v4.4h, v16.4h // +t3 -+ neg v28.4h, v23.4h // +t4 -+ ssra v7.4h, v21.4h, #1 // (t5 + t1) >> 1 -+ ssra v1.4h, v23.4h, #1 // (t8 - t4) >> 1 -+ ssra v20.4h, v3.4h, #1 // (t6 + t2) >> 1 -+ ssra v24.4h, v4.4h, #1 // (t7 + t3) >> 1 -+ ssra v19.4h, v28.4h, #1 // (t8 + t4) >> 1 -+ ssra v2.4h, v16.4h, #1 // (t7 - t3) >> 1 -+ ssra v27.4h, v17.4h, #1 // (t6 - t2) >> 1 -+ ssra v26.4h, v6.4h, #1 // (t5 - t1) >> 1 -+ trn1 v1.2d, v7.2d, v1.2d -+ trn1 v2.2d, v20.2d, v2.2d -+ trn1 v3.2d, v24.2d, v27.2d -+ trn1 v4.2d, v19.2d, v26.2d -+ srshr v1.8h, v1.8h, #2 // (t5 + t1 + 4) >> 3, (t8 - t4 + 4) >> 3 -+ srshr v2.8h, v2.8h, #2 // (t6 + t2 + 4) >> 3, (t7 - t3 + 4) >> 3 -+ srshr v3.8h, v3.8h, #2 // (t7 + t3 + 4) >> 3, (t6 - t2 + 4) >> 3 -+ srshr v4.8h, v4.8h, #2 // (t8 + t4 + 4) >> 3, (t5 - t1 + 4) >> 3 -+ trn2 v6.8h, v1.8h, v2.8h -+ trn1 v1.8h, v1.8h, v2.8h -+ trn2 v2.8h, v3.8h, v4.8h -+ trn1 v3.8h, v3.8h, v4.8h -+ trn2 v4.4s, v6.4s, v2.4s -+ trn1 v7.4s, v1.4s, v3.4s -+ trn2 v1.4s, v1.4s, v3.4s -+ mul v3.8h, v4.8h, v0.h[5] // 22/2 * src[24] -+ trn1 v2.4s, v6.4s, v2.4s -+ mul v4.8h, v4.8h, v0.h[4] // 10/2 * src[24] -+ mul v6.8h, v7.8h, v0.h[6] // 17 * src[0] -+ mul v1.8h, v1.8h, v0.h[6] // 17 * src[16] -+ mls v3.8h, v2.8h, v0.h[4] // t4/2 = - 10/2 * src[8] + 22/2 * src[24] -+ mla v4.8h, v2.8h, v0.h[5] // t3/2 = 22/2 * src[8] + 10/2 * src[24] -+ add v0.8h, v6.8h, v1.8h // t1 = 17 * src[0] + 17 * src[16] -+ sub v1.8h, v6.8h, v1.8h // t2 = 17 * src[0] - 17 * src[16] -+ neg v2.8h, v3.8h // -t4/2 -+ neg v6.8h, v4.8h // -t3/2 -+ ssra v4.8h, v0.8h, #1 // (t1 + t3) >> 1 -+ ssra v2.8h, v1.8h, #1 // (t2 - t4) >> 1 -+ ssra v3.8h, v1.8h, #1 // (t2 + t4) >> 1 -+ ssra v6.8h, v0.8h, #1 // (t1 - t3) >> 1 -+ srshr v0.8h, v4.8h, #6 // (t1 + t3 + 64) >> 7 -+ srshr v1.8h, v2.8h, #6 // (t2 - t4 + 64) >> 7 -+ srshr v2.8h, v3.8h, #6 // (t2 + t4 + 64) >> 7 -+ srshr v3.8h, v6.8h, #6 // (t1 - t3 + 64) >> 7 -+ uaddw v0.8h, v0.8h, v5.8b -+ uaddw v1.8h, v1.8h, v18.8b -+ uaddw v2.8h, v2.8h, v22.8b -+ uaddw v3.8h, v3.8h, v25.8b -+ sqxtun v0.8b, v0.8h -+ sqxtun v1.8b, v1.8h -+ sqxtun v2.8b, v2.8h -+ sqxtun v3.8b, v3.8h -+ st1 {v0.8b}, [x3], x1 -+ st1 {v1.8b}, [x3], x1 -+ st1 {v2.8b}, [x3], x1 -+ st1 {v3.8b}, [x3] -+ ret -+endfunc -+ -+// VC-1 4x8 inverse transform -+// On entry: -+// x0 -> array of 8-bit samples, in row-major order -+// x1 = row stride for 8-bit sample array -+// x2 -> array of 16-bit inverse transform coefficients, in row-major order (row stride is 8 coefficients) -+// On exit: -+// array at x0 updated by saturated addition of (narrowed) transformed block -+function ff_vc1_inv_trans_4x8_neon, export=1 -+ mov x3, #16 -+ ldr q0, .Lcoeffs_it8 // includes 4-point coefficients in upper half of vector -+ mov x4, x0 -+ ld1 {v1.d}[0], [x2], x3 // 00 01 02 03 -+ ld1 {v2.d}[0], [x2], x3 // 10 11 12 13 -+ ld1 {v3.d}[0], [x2], x3 // 20 21 22 23 -+ ld1 {v4.d}[0], [x2], x3 // 30 31 32 33 -+ ld1 {v1.d}[1], [x2], x3 // 40 41 42 43 -+ ld1 {v2.d}[1], [x2], x3 // 50 51 52 53 -+ ld1 {v3.d}[1], [x2], x3 // 60 61 62 63 -+ ld1 {v4.d}[1], [x2] // 70 71 72 73 -+ ld1 {v5.s}[0], [x0], x1 -+ ld1 {v6.s}[0], [x0], x1 -+ ld1 {v7.s}[0], [x0], x1 -+ trn2 v16.8h, v1.8h, v2.8h // 01 11 03 13 41 51 43 53 -+ trn1 v1.8h, v1.8h, v2.8h // 00 10 02 12 40 50 42 52 -+ trn2 v2.8h, v3.8h, v4.8h // 21 31 23 33 61 71 63 73 -+ trn1 v3.8h, v3.8h, v4.8h // 20 30 22 32 60 70 62 72 -+ ld1 {v4.s}[0], [x0], x1 -+ trn2 v17.4s, v16.4s, v2.4s // 03 13 23 33 43 53 63 73 -+ trn1 v18.4s, v1.4s, v3.4s // 00 10 20 30 40 50 60 70 -+ trn1 v2.4s, v16.4s, v2.4s // 01 11 21 31 41 51 61 71 -+ mul v16.8h, v17.8h, v0.h[4] // 10/2 * src[3] -+ ld1 {v5.s}[1], [x0], x1 -+ mul v17.8h, v17.8h, v0.h[5] // 22/2 * src[3] -+ ld1 {v6.s}[1], [x0], x1 -+ trn2 v1.4s, v1.4s, v3.4s // 02 12 22 32 42 52 62 72 -+ mul v3.8h, v18.8h, v0.h[6] // 17 * src[0] -+ ld1 {v7.s}[1], [x0], x1 -+ mul v1.8h, v1.8h, v0.h[6] // 17 * src[2] -+ ld1 {v4.s}[1], [x0] -+ mla v16.8h, v2.8h, v0.h[5] // t3/2 = 22/2 * src[1] + 10/2 * src[3] -+ mls v17.8h, v2.8h, v0.h[4] // t4/2 = - 10/2 * src[1] + 22/2 * src[3] -+ add v2.8h, v3.8h, v1.8h // t1 = 17 * src[0] + 17 * src[2] -+ sub v1.8h, v3.8h, v1.8h // t2 = 17 * src[0] - 17 * src[2] -+ neg v3.8h, v16.8h // -t3/2 -+ ssra v16.8h, v2.8h, #1 // (t1 + t3) >> 1 -+ neg v18.8h, v17.8h // -t4/2 -+ ssra v17.8h, v1.8h, #1 // (t2 + t4) >> 1 -+ ssra v3.8h, v2.8h, #1 // (t1 - t3) >> 1 -+ ssra v18.8h, v1.8h, #1 // (t2 - t4) >> 1 -+ srshr v1.8h, v16.8h, #2 // (t1 + t3 + 64) >> 3 -+ srshr v2.8h, v17.8h, #2 // (t2 + t4 + 64) >> 3 -+ srshr v3.8h, v3.8h, #2 // (t1 - t3 + 64) >> 3 -+ srshr v16.8h, v18.8h, #2 // (t2 - t4 + 64) >> 3 -+ trn2 v17.8h, v2.8h, v3.8h // 12 13 32 33 52 53 72 73 -+ trn2 v18.8h, v1.8h, v16.8h // 10 11 30 31 50 51 70 71 -+ trn1 v1.8h, v1.8h, v16.8h // 00 01 20 21 40 41 60 61 -+ trn1 v2.8h, v2.8h, v3.8h // 02 03 22 23 42 43 62 63 -+ trn1 v3.4s, v18.4s, v17.4s // 10 11 12 13 50 51 52 53 -+ trn2 v16.4s, v18.4s, v17.4s // 30 31 32 33 70 71 72 73 -+ trn1 v17.4s, v1.4s, v2.4s // 00 01 02 03 40 41 42 43 -+ mov d18, v3.d[1] // 50 51 52 53 -+ shl v19.4h, v3.4h, #4 // 16 * src[8] -+ mov d20, v16.d[1] // 70 71 72 73 -+ shl v21.4h, v16.4h, #4 // 16 * src[24] -+ mov d22, v17.d[1] // 40 41 42 43 -+ shl v23.4h, v3.4h, #2 // 4 * src[8] -+ shl v24.4h, v18.4h, #4 // 16 * src[40] -+ shl v25.4h, v20.4h, #4 // 16 * src[56] -+ shl v26.4h, v18.4h, #2 // 4 * src[40] -+ trn2 v1.4s, v1.4s, v2.4s // 20 21 22 23 60 61 62 63 -+ ssra v24.4h, v21.4h, #2 // 4 * src[24] + 16 * src[40] -+ sub v2.4h, v25.4h, v23.4h // - 4 * src[8] + 16 * src[56] -+ shl v17.4h, v17.4h, #2 // 8/2 * src[0] -+ sub v21.4h, v21.4h, v26.4h // 16 * src[24] - 4 * src[40] -+ shl v22.4h, v22.4h, #2 // 8/2 * src[32] -+ mov d23, v1.d[1] // 60 61 62 63 -+ ssra v19.4h, v25.4h, #2 // 16 * src[8] + 4 * src[56] -+ mul v25.4h, v1.4h, v0.h[0] // 6/2 * src[16] -+ shl v1.4h, v1.4h, #3 // 16/2 * src[16] -+ mls v24.4h, v3.4h, v0.h[2] // - 15 * src[8] + 4 * src[24] + 16 * src[40] -+ ssra v17.4h, v17.4h, #1 // 12/2 * src[0] -+ mls v21.4h, v3.4h, v0.h[1] // - 9 * src[8] + 16 * src[24] - 4 * src[40] -+ ssra v22.4h, v22.4h, #1 // 12/2 * src[32] -+ mla v2.4h, v16.4h, v0.h[1] // - 4 * src[8] + 9 * src[24] + 16 * src[56] -+ shl v3.4h, v23.4h, #3 // 16/2 * src[48] -+ mla v19.4h, v16.4h, v0.h[2] // 16 * src[8] + 15 * src[24] + 4 * src[56] -+ mla v1.4h, v23.4h, v0.h[0] // t3/2 = 16/2 * src[16] + 6/2 * src[48] -+ mla v24.4h, v20.4h, v0.h[1] // -t2 = - 15 * src[8] + 4 * src[24] + 16 * src[40] + 9 * src[56] -+ add v16.4h, v17.4h, v22.4h // t1/2 = 12/2 * src[0] + 12/2 * src[32] -+ sub v3.4h, v25.4h, v3.4h // t4/2 = 6/2 * src[16] - 16/2 * src[48] -+ sub v17.4h, v17.4h, v22.4h // t2/2 = 12/2 * src[0] - 12/2 * src[32] -+ mls v21.4h, v20.4h, v0.h[2] // -t3 = - 9 * src[8] + 16 * src[24] - 4 * src[40] - 15 * src[56] -+ mla v19.4h, v18.4h, v0.h[1] // t1 = 16 * src[8] + 15 * src[24] + 9 * src[40] + 4 * src[56] -+ add v20.4h, v16.4h, v1.4h // t5/2 = t1/2 + t3/2 -+ mls v2.4h, v18.4h, v0.h[2] // -t4 = - 4 * src[8] + 9 * src[24] - 15 * src[40] + 16 * src[56] -+ sub v0.4h, v16.4h, v1.4h // t8/2 = t1/2 - t3/2 -+ add v18.4h, v17.4h, v3.4h // t6/2 = t2/2 + t4/2 -+ sub v22.4h, v17.4h, v3.4h // t7/2 = t2/2 - t4/2 -+ neg v23.4h, v24.4h // +t2 -+ sub v25.4h, v17.4h, v3.4h // t7/2 = t2/2 - t4/2 -+ add v3.4h, v17.4h, v3.4h // t6/2 = t2/2 + t4/2 -+ neg v17.4h, v21.4h // +t3 -+ sub v26.4h, v16.4h, v1.4h // t8/2 = t1/2 - t3/2 -+ add v1.4h, v16.4h, v1.4h // t5/2 = t1/2 + t3/2 -+ neg v16.4h, v19.4h // -t1 -+ neg v27.4h, v2.4h // +t4 -+ ssra v20.4h, v19.4h, #1 // (t5 + t1) >> 1 -+ srsra v0.4h, v2.4h, #1 // (t8 - t4 + 1) >> 1 -+ ssra v18.4h, v23.4h, #1 // (t6 + t2) >> 1 -+ srsra v22.4h, v21.4h, #1 // (t7 - t3 + 1) >> 1 -+ ssra v25.4h, v17.4h, #1 // (t7 + t3) >> 1 -+ srsra v3.4h, v24.4h, #1 // (t6 - t2 + 1) >> 1 -+ ssra v26.4h, v27.4h, #1 // (t8 + t4) >> 1 -+ srsra v1.4h, v16.4h, #1 // (t5 - t1 + 1) >> 1 -+ trn1 v0.2d, v20.2d, v0.2d -+ trn1 v2.2d, v18.2d, v22.2d -+ trn1 v3.2d, v25.2d, v3.2d -+ trn1 v1.2d, v26.2d, v1.2d -+ srshr v0.8h, v0.8h, #6 // (t5 + t1 + 64) >> 7, (t8 - t4 + 65) >> 7 -+ srshr v2.8h, v2.8h, #6 // (t6 + t2 + 64) >> 7, (t7 - t3 + 65) >> 7 -+ srshr v3.8h, v3.8h, #6 // (t7 + t3 + 64) >> 7, (t6 - t2 + 65) >> 7 -+ srshr v1.8h, v1.8h, #6 // (t8 + t4 + 64) >> 7, (t5 - t1 + 65) >> 7 -+ uaddw v0.8h, v0.8h, v5.8b -+ uaddw v2.8h, v2.8h, v6.8b -+ uaddw v3.8h, v3.8h, v7.8b -+ uaddw v1.8h, v1.8h, v4.8b -+ sqxtun v0.8b, v0.8h -+ sqxtun v2.8b, v2.8h -+ sqxtun v3.8b, v3.8h -+ sqxtun v1.8b, v1.8h -+ st1 {v0.s}[0], [x4], x1 -+ st1 {v2.s}[0], [x4], x1 -+ st1 {v3.s}[0], [x4], x1 -+ st1 {v1.s}[0], [x4], x1 -+ st1 {v0.s}[1], [x4], x1 -+ st1 {v2.s}[1], [x4], x1 -+ st1 {v3.s}[1], [x4], x1 -+ st1 {v1.s}[1], [x4] -+ ret -+endfunc -+ -+// VC-1 4x4 inverse transform -+// On entry: -+// x0 -> array of 8-bit samples, in row-major order -+// x1 = row stride for 8-bit sample array -+// x2 -> array of 16-bit inverse transform coefficients, in row-major order (row stride is 8 coefficients) -+// On exit: -+// array at x0 updated by saturated addition of (narrowed) transformed block -+function ff_vc1_inv_trans_4x4_neon, export=1 -+ mov x3, #16 -+ ldr d0, .Lcoeffs_it4 -+ mov x4, x0 -+ ld1 {v1.d}[0], [x2], x3 // 00 01 02 03 -+ ld1 {v2.d}[0], [x2], x3 // 10 11 12 13 -+ ld1 {v3.d}[0], [x2], x3 // 20 21 22 23 -+ ld1 {v4.d}[0], [x2] // 30 31 32 33 -+ ld1 {v5.s}[0], [x0], x1 -+ ld1 {v5.s}[1], [x0], x1 -+ ld1 {v6.s}[0], [x0], x1 -+ trn2 v7.4h, v1.4h, v2.4h // 01 11 03 13 -+ trn1 v1.4h, v1.4h, v2.4h // 00 10 02 12 -+ ld1 {v6.s}[1], [x0] -+ trn2 v2.4h, v3.4h, v4.4h // 21 31 23 33 -+ trn1 v3.4h, v3.4h, v4.4h // 20 30 22 32 -+ trn2 v4.2s, v7.2s, v2.2s // 03 13 23 33 -+ trn1 v16.2s, v1.2s, v3.2s // 00 10 20 30 -+ trn1 v2.2s, v7.2s, v2.2s // 01 11 21 31 -+ trn2 v1.2s, v1.2s, v3.2s // 02 12 22 32 -+ mul v3.4h, v4.4h, v0.h[0] // 10/2 * src[3] -+ mul v4.4h, v4.4h, v0.h[1] // 22/2 * src[3] -+ mul v7.4h, v16.4h, v0.h[2] // 17 * src[0] -+ mul v1.4h, v1.4h, v0.h[2] // 17 * src[2] -+ mla v3.4h, v2.4h, v0.h[1] // t3/2 = 22/2 * src[1] + 10/2 * src[3] -+ mls v4.4h, v2.4h, v0.h[0] // t4/2 = - 10/2 * src[1] + 22/2 * src[3] -+ add v2.4h, v7.4h, v1.4h // t1 = 17 * src[0] + 17 * src[2] -+ sub v1.4h, v7.4h, v1.4h // t2 = 17 * src[0] - 17 * src[2] -+ neg v7.4h, v3.4h // -t3/2 -+ neg v16.4h, v4.4h // -t4/2 -+ ssra v3.4h, v2.4h, #1 // (t1 + t3) >> 1 -+ ssra v4.4h, v1.4h, #1 // (t2 + t4) >> 1 -+ ssra v16.4h, v1.4h, #1 // (t2 - t4) >> 1 -+ ssra v7.4h, v2.4h, #1 // (t1 - t3) >> 1 -+ srshr v1.4h, v3.4h, #2 // (t1 + t3 + 64) >> 3 -+ srshr v2.4h, v4.4h, #2 // (t2 + t4 + 64) >> 3 -+ srshr v3.4h, v16.4h, #2 // (t2 - t4 + 64) >> 3 -+ srshr v4.4h, v7.4h, #2 // (t1 - t3 + 64) >> 3 -+ trn2 v7.4h, v1.4h, v3.4h // 10 11 30 31 -+ trn1 v1.4h, v1.4h, v3.4h // 00 01 20 21 -+ trn2 v3.4h, v2.4h, v4.4h // 12 13 32 33 -+ trn1 v2.4h, v2.4h, v4.4h // 02 03 22 23 -+ trn2 v4.2s, v7.2s, v3.2s // 30 31 32 33 -+ trn1 v16.2s, v1.2s, v2.2s // 00 01 02 03 -+ trn1 v3.2s, v7.2s, v3.2s // 10 11 12 13 -+ trn2 v1.2s, v1.2s, v2.2s // 20 21 22 23 -+ mul v2.4h, v4.4h, v0.h[1] // 22/2 * src[24] -+ mul v4.4h, v4.4h, v0.h[0] // 10/2 * src[24] -+ mul v7.4h, v16.4h, v0.h[2] // 17 * src[0] -+ mul v1.4h, v1.4h, v0.h[2] // 17 * src[16] -+ mls v2.4h, v3.4h, v0.h[0] // t4/2 = - 10/2 * src[8] + 22/2 * src[24] -+ mla v4.4h, v3.4h, v0.h[1] // t3/2 = 22/2 * src[8] + 10/2 * src[24] -+ add v0.4h, v7.4h, v1.4h // t1 = 17 * src[0] + 17 * src[16] -+ sub v1.4h, v7.4h, v1.4h // t2 = 17 * src[0] - 17 * src[16] -+ neg v3.4h, v2.4h // -t4/2 -+ neg v7.4h, v4.4h // -t3/2 -+ ssra v4.4h, v0.4h, #1 // (t1 + t3) >> 1 -+ ssra v3.4h, v1.4h, #1 // (t2 - t4) >> 1 -+ ssra v2.4h, v1.4h, #1 // (t2 + t4) >> 1 -+ ssra v7.4h, v0.4h, #1 // (t1 - t3) >> 1 -+ trn1 v0.2d, v4.2d, v3.2d -+ trn1 v1.2d, v2.2d, v7.2d -+ srshr v0.8h, v0.8h, #6 // (t1 + t3 + 64) >> 7, (t2 - t4 + 64) >> 7 -+ srshr v1.8h, v1.8h, #6 // (t2 + t4 + 64) >> 7, (t1 - t3 + 64) >> 7 -+ uaddw v0.8h, v0.8h, v5.8b -+ uaddw v1.8h, v1.8h, v6.8b -+ sqxtun v0.8b, v0.8h -+ sqxtun v1.8b, v1.8h -+ st1 {v0.s}[0], [x4], x1 -+ st1 {v0.s}[1], [x4], x1 -+ st1 {v1.s}[0], [x4], x1 -+ st1 {v1.s}[1], [x4] -+ ret -+endfunc -+ -+// VC-1 8x8 inverse transform, DC case -+// On entry: -+// x0 -> array of 8-bit samples, in row-major order -+// x1 = row stride for 8-bit sample array -+// x2 -> 16-bit inverse transform DC coefficient -+// On exit: -+// array at x0 updated by saturated addition of (narrowed) transformed block -+function ff_vc1_inv_trans_8x8_dc_neon, export=1 -+ ldrsh w2, [x2] -+ mov x3, x0 -+ ld1 {v0.8b}, [x0], x1 -+ ld1 {v1.8b}, [x0], x1 -+ ld1 {v2.8b}, [x0], x1 -+ add w2, w2, w2, lsl #1 -+ ld1 {v3.8b}, [x0], x1 -+ ld1 {v4.8b}, [x0], x1 -+ add w2, w2, #1 -+ ld1 {v5.8b}, [x0], x1 -+ asr w2, w2, #1 -+ ld1 {v6.8b}, [x0], x1 -+ add w2, w2, w2, lsl #1 -+ ld1 {v7.8b}, [x0] -+ add w0, w2, #16 -+ asr w0, w0, #5 -+ dup v16.8h, w0 -+ uaddw v0.8h, v16.8h, v0.8b -+ uaddw v1.8h, v16.8h, v1.8b -+ uaddw v2.8h, v16.8h, v2.8b -+ uaddw v3.8h, v16.8h, v3.8b -+ uaddw v4.8h, v16.8h, v4.8b -+ uaddw v5.8h, v16.8h, v5.8b -+ sqxtun v0.8b, v0.8h -+ uaddw v6.8h, v16.8h, v6.8b -+ sqxtun v1.8b, v1.8h -+ uaddw v7.8h, v16.8h, v7.8b -+ sqxtun v2.8b, v2.8h -+ sqxtun v3.8b, v3.8h -+ sqxtun v4.8b, v4.8h -+ st1 {v0.8b}, [x3], x1 -+ sqxtun v0.8b, v5.8h -+ st1 {v1.8b}, [x3], x1 -+ sqxtun v1.8b, v6.8h -+ st1 {v2.8b}, [x3], x1 -+ sqxtun v2.8b, v7.8h -+ st1 {v3.8b}, [x3], x1 -+ st1 {v4.8b}, [x3], x1 -+ st1 {v0.8b}, [x3], x1 -+ st1 {v1.8b}, [x3], x1 -+ st1 {v2.8b}, [x3] -+ ret -+endfunc -+ -+// VC-1 8x4 inverse transform, DC case -+// On entry: -+// x0 -> array of 8-bit samples, in row-major order -+// x1 = row stride for 8-bit sample array -+// x2 -> 16-bit inverse transform DC coefficient -+// On exit: -+// array at x0 updated by saturated addition of (narrowed) transformed block -+function ff_vc1_inv_trans_8x4_dc_neon, export=1 -+ ldrsh w2, [x2] -+ mov x3, x0 -+ ld1 {v0.8b}, [x0], x1 -+ ld1 {v1.8b}, [x0], x1 -+ ld1 {v2.8b}, [x0], x1 -+ add w2, w2, w2, lsl #1 -+ ld1 {v3.8b}, [x0] -+ add w0, w2, #1 -+ asr w0, w0, #1 -+ add w0, w0, w0, lsl #4 -+ add w0, w0, #64 -+ asr w0, w0, #7 -+ dup v4.8h, w0 -+ uaddw v0.8h, v4.8h, v0.8b -+ uaddw v1.8h, v4.8h, v1.8b -+ uaddw v2.8h, v4.8h, v2.8b -+ uaddw v3.8h, v4.8h, v3.8b -+ sqxtun v0.8b, v0.8h -+ sqxtun v1.8b, v1.8h -+ sqxtun v2.8b, v2.8h -+ sqxtun v3.8b, v3.8h -+ st1 {v0.8b}, [x3], x1 -+ st1 {v1.8b}, [x3], x1 -+ st1 {v2.8b}, [x3], x1 -+ st1 {v3.8b}, [x3] -+ ret -+endfunc -+ -+// VC-1 4x8 inverse transform, DC case -+// On entry: -+// x0 -> array of 8-bit samples, in row-major order -+// x1 = row stride for 8-bit sample array -+// x2 -> 16-bit inverse transform DC coefficient -+// On exit: -+// array at x0 updated by saturated addition of (narrowed) transformed block -+function ff_vc1_inv_trans_4x8_dc_neon, export=1 -+ ldrsh w2, [x2] -+ mov x3, x0 -+ ld1 {v0.s}[0], [x0], x1 -+ ld1 {v1.s}[0], [x0], x1 -+ ld1 {v2.s}[0], [x0], x1 -+ add w2, w2, w2, lsl #4 -+ ld1 {v3.s}[0], [x0], x1 -+ add w2, w2, #4 -+ asr w2, w2, #3 -+ add w2, w2, w2, lsl #1 -+ ld1 {v0.s}[1], [x0], x1 -+ add w2, w2, #16 -+ asr w2, w2, #5 -+ dup v4.8h, w2 -+ ld1 {v1.s}[1], [x0], x1 -+ ld1 {v2.s}[1], [x0], x1 -+ ld1 {v3.s}[1], [x0] -+ uaddw v0.8h, v4.8h, v0.8b -+ uaddw v1.8h, v4.8h, v1.8b -+ uaddw v2.8h, v4.8h, v2.8b -+ uaddw v3.8h, v4.8h, v3.8b -+ sqxtun v0.8b, v0.8h -+ sqxtun v1.8b, v1.8h -+ sqxtun v2.8b, v2.8h -+ sqxtun v3.8b, v3.8h -+ st1 {v0.s}[0], [x3], x1 -+ st1 {v1.s}[0], [x3], x1 -+ st1 {v2.s}[0], [x3], x1 -+ st1 {v3.s}[0], [x3], x1 -+ st1 {v0.s}[1], [x3], x1 -+ st1 {v1.s}[1], [x3], x1 -+ st1 {v2.s}[1], [x3], x1 -+ st1 {v3.s}[1], [x3] -+ ret -+endfunc -+ -+// VC-1 4x4 inverse transform, DC case -+// On entry: -+// x0 -> array of 8-bit samples, in row-major order -+// x1 = row stride for 8-bit sample array -+// x2 -> 16-bit inverse transform DC coefficient -+// On exit: -+// array at x0 updated by saturated addition of (narrowed) transformed block -+function ff_vc1_inv_trans_4x4_dc_neon, export=1 -+ ldrsh w2, [x2] -+ mov x3, x0 -+ ld1 {v0.s}[0], [x0], x1 -+ ld1 {v1.s}[0], [x0], x1 -+ ld1 {v0.s}[1], [x0], x1 -+ add w2, w2, w2, lsl #4 -+ ld1 {v1.s}[1], [x0] -+ add w0, w2, #4 -+ asr w0, w0, #3 -+ add w0, w0, w0, lsl #4 -+ add w0, w0, #64 -+ asr w0, w0, #7 -+ dup v2.8h, w0 -+ uaddw v0.8h, v2.8h, v0.8b -+ uaddw v1.8h, v2.8h, v1.8b -+ sqxtun v0.8b, v0.8h -+ sqxtun v1.8b, v1.8h -+ st1 {v0.s}[0], [x3], x1 -+ st1 {v1.s}[0], [x3], x1 -+ st1 {v0.s}[1], [x3], x1 -+ st1 {v1.s}[1], [x3] -+ ret -+endfunc -+ -+.align 5 -+.Lcoeffs_it8: -+.quad 0x000F00090003 -+.Lcoeffs_it4: -+.quad 0x0011000B0005 -+.Lcoeffs: -+.quad 0x00050002 -+ -+// VC-1 in-loop deblocking filter for 4 pixel pairs at boundary of vertically-neighbouring blocks -+// On entry: -+// x0 -> top-left pel of lower block -+// x1 = row stride, bytes -+// w2 = PQUANT bitstream parameter -+function ff_vc1_v_loop_filter4_neon, export=1 -+ sub x3, x0, w1, sxtw #2 -+ ldr d0, .Lcoeffs -+ ld1 {v1.s}[0], [x0], x1 // P5 -+ ld1 {v2.s}[0], [x3], x1 // P1 -+ ld1 {v3.s}[0], [x3], x1 // P2 -+ ld1 {v4.s}[0], [x0], x1 // P6 -+ ld1 {v5.s}[0], [x3], x1 // P3 -+ ld1 {v6.s}[0], [x0], x1 // P7 -+ ld1 {v7.s}[0], [x3] // P4 -+ ld1 {v16.s}[0], [x0] // P8 -+ ushll v17.8h, v1.8b, #1 // 2*P5 -+ dup v18.8h, w2 // pq -+ ushll v2.8h, v2.8b, #1 // 2*P1 -+ uxtl v3.8h, v3.8b // P2 -+ uxtl v4.8h, v4.8b // P6 -+ uxtl v19.8h, v5.8b // P3 -+ mls v2.4h, v3.4h, v0.h[1] // 2*P1-5*P2 -+ uxtl v3.8h, v6.8b // P7 -+ mls v17.4h, v4.4h, v0.h[1] // 2*P5-5*P6 -+ ushll v5.8h, v5.8b, #1 // 2*P3 -+ uxtl v6.8h, v7.8b // P4 -+ mla v17.4h, v3.4h, v0.h[1] // 2*P5-5*P6+5*P7 -+ uxtl v3.8h, v16.8b // P8 -+ mla v2.4h, v19.4h, v0.h[1] // 2*P1-5*P2+5*P3 -+ uxtl v1.8h, v1.8b // P5 -+ mls v5.4h, v6.4h, v0.h[1] // 2*P3-5*P4 -+ mls v17.4h, v3.4h, v0.h[0] // 2*P5-5*P6+5*P7-2*P8 -+ sub v3.4h, v6.4h, v1.4h // P4-P5 -+ mls v2.4h, v6.4h, v0.h[0] // 2*P1-5*P2+5*P3-2*P4 -+ mla v5.4h, v1.4h, v0.h[1] // 2*P3-5*P4+5*P5 -+ mls v5.4h, v4.4h, v0.h[0] // 2*P3-5*P4+5*P5-2*P6 -+ abs v4.4h, v3.4h -+ srshr v7.4h, v17.4h, #3 -+ srshr v2.4h, v2.4h, #3 -+ sshr v4.4h, v4.4h, #1 // clip -+ srshr v5.4h, v5.4h, #3 -+ abs v7.4h, v7.4h // a2 -+ sshr v3.4h, v3.4h, #8 // clip_sign -+ abs v2.4h, v2.4h // a1 -+ cmeq v16.4h, v4.4h, #0 // test clip == 0 -+ abs v17.4h, v5.4h // a0 -+ sshr v5.4h, v5.4h, #8 // a0_sign -+ cmhs v19.4h, v2.4h, v7.4h // test a1 >= a2 -+ cmhs v18.4h, v17.4h, v18.4h // test a0 >= pq -+ sub v3.4h, v3.4h, v5.4h // clip_sign - a0_sign -+ bsl v19.8b, v7.8b, v2.8b // a3 -+ orr v2.8b, v16.8b, v18.8b // test clip == 0 || a0 >= pq -+ uqsub v5.4h, v17.4h, v19.4h // a0 >= a3 ? a0-a3 : 0 (a0 > a3 in all cases where filtering is enabled, so makes more sense to subtract this way round than the opposite and then taking the abs) -+ cmhs v7.4h, v19.4h, v17.4h // test a3 >= a0 -+ mul v0.4h, v5.4h, v0.h[1] // a0 >= a3 ? 5*(a0-a3) : 0 -+ orr v5.8b, v2.8b, v7.8b // test clip == 0 || a0 >= pq || a3 >= a0 -+ mov w0, v5.s[1] // move to gp reg -+ ushr v0.4h, v0.4h, #3 // a0 >= a3 ? (5*(a0-a3))>>3 : 0 -+ cmhs v5.4h, v0.4h, v4.4h -+ tbnz w0, #0, 1f // none of the 4 pixel pairs should be updated if this one is not filtered -+ bsl v5.8b, v4.8b, v0.8b // FFMIN(d, clip) -+ bic v0.8b, v5.8b, v2.8b // set each d to zero if it should not be filtered because clip == 0 || a0 >= pq (a3 > a0 case already zeroed by saturating sub) -+ mls v6.4h, v0.4h, v3.4h // invert d depending on clip_sign & a0_sign, or zero it if they match, and accumulate into P4 -+ mla v1.4h, v0.4h, v3.4h // invert d depending on clip_sign & a0_sign, or zero it if they match, and accumulate into P5 -+ sqxtun v0.8b, v6.8h -+ sqxtun v1.8b, v1.8h -+ st1 {v0.s}[0], [x3], x1 -+ st1 {v1.s}[0], [x3] -+1: ret -+endfunc -+ -+// VC-1 in-loop deblocking filter for 4 pixel pairs at boundary of horizontally-neighbouring blocks -+// On entry: -+// x0 -> top-left pel of right block -+// x1 = row stride, bytes -+// w2 = PQUANT bitstream parameter -+function ff_vc1_h_loop_filter4_neon, export=1 -+ sub x3, x0, #4 // where to start reading -+ ldr d0, .Lcoeffs -+ ld1 {v1.8b}, [x3], x1 -+ sub x0, x0, #1 // where to start writing -+ ld1 {v2.8b}, [x3], x1 -+ ld1 {v3.8b}, [x3], x1 -+ ld1 {v4.8b}, [x3] -+ dup v5.8h, w2 // pq -+ trn1 v6.8b, v1.8b, v2.8b -+ trn2 v1.8b, v1.8b, v2.8b -+ trn1 v2.8b, v3.8b, v4.8b -+ trn2 v3.8b, v3.8b, v4.8b -+ trn1 v4.4h, v6.4h, v2.4h // P1, P5 -+ trn1 v7.4h, v1.4h, v3.4h // P2, P6 -+ trn2 v2.4h, v6.4h, v2.4h // P3, P7 -+ trn2 v1.4h, v1.4h, v3.4h // P4, P8 -+ ushll v3.8h, v4.8b, #1 // 2*P1, 2*P5 -+ uxtl v6.8h, v7.8b // P2, P6 -+ uxtl v7.8h, v2.8b // P3, P7 -+ uxtl v1.8h, v1.8b // P4, P8 -+ mls v3.8h, v6.8h, v0.h[1] // 2*P1-5*P2, 2*P5-5*P6 -+ ushll v2.8h, v2.8b, #1 // 2*P3, 2*P7 -+ uxtl v4.8h, v4.8b // P1, P5 -+ mla v3.8h, v7.8h, v0.h[1] // 2*P1-5*P2+5*P3, 2*P5-5*P6+5*P7 -+ mov d6, v6.d[1] // P6 -+ mls v3.8h, v1.8h, v0.h[0] // 2*P1-5*P2+5*P3-2*P4, 2*P5-5*P6+5*P7-2*P8 -+ mov d4, v4.d[1] // P5 -+ mls v2.4h, v1.4h, v0.h[1] // 2*P3-5*P4 -+ mla v2.4h, v4.4h, v0.h[1] // 2*P3-5*P4+5*P5 -+ sub v7.4h, v1.4h, v4.4h // P4-P5 -+ mls v2.4h, v6.4h, v0.h[0] // 2*P3-5*P4+5*P5-2*P6 -+ srshr v3.8h, v3.8h, #3 -+ abs v6.4h, v7.4h -+ sshr v7.4h, v7.4h, #8 // clip_sign -+ srshr v2.4h, v2.4h, #3 -+ abs v3.8h, v3.8h // a1, a2 -+ sshr v6.4h, v6.4h, #1 // clip -+ mov d16, v3.d[1] // a2 -+ abs v17.4h, v2.4h // a0 -+ cmeq v18.4h, v6.4h, #0 // test clip == 0 -+ sshr v2.4h, v2.4h, #8 // a0_sign -+ cmhs v19.4h, v3.4h, v16.4h // test a1 >= a2 -+ cmhs v5.4h, v17.4h, v5.4h // test a0 >= pq -+ sub v2.4h, v7.4h, v2.4h // clip_sign - a0_sign -+ bsl v19.8b, v16.8b, v3.8b // a3 -+ orr v3.8b, v18.8b, v5.8b // test clip == 0 || a0 >= pq -+ uqsub v5.4h, v17.4h, v19.4h // a0 >= a3 ? a0-a3 : 0 (a0 > a3 in all cases where filtering is enabled, so makes more sense to subtract this way round than the opposite and then taking the abs) -+ cmhs v7.4h, v19.4h, v17.4h // test a3 >= a0 -+ mul v0.4h, v5.4h, v0.h[1] // a0 >= a3 ? 5*(a0-a3) : 0 -+ orr v5.8b, v3.8b, v7.8b // test clip == 0 || a0 >= pq || a3 >= a0 -+ mov w2, v5.s[1] // move to gp reg -+ ushr v0.4h, v0.4h, #3 // a0 >= a3 ? (5*(a0-a3))>>3 : 0 -+ cmhs v5.4h, v0.4h, v6.4h -+ tbnz w2, #0, 1f // none of the 4 pixel pairs should be updated if this one is not filtered -+ bsl v5.8b, v6.8b, v0.8b // FFMIN(d, clip) -+ bic v0.8b, v5.8b, v3.8b // set each d to zero if it should not be filtered because clip == 0 || a0 >= pq (a3 > a0 case already zeroed by saturating sub) -+ mla v4.4h, v0.4h, v2.4h // invert d depending on clip_sign & a0_sign, or zero it if they match, and accumulate into P5 -+ mls v1.4h, v0.4h, v2.4h // invert d depending on clip_sign & a0_sign, or zero it if they match, and accumulate into P4 -+ sqxtun v3.8b, v4.8h -+ sqxtun v2.8b, v1.8h -+ st2 {v2.b, v3.b}[0], [x0], x1 -+ st2 {v2.b, v3.b}[1], [x0], x1 -+ st2 {v2.b, v3.b}[2], [x0], x1 -+ st2 {v2.b, v3.b}[3], [x0] -+1: ret -+endfunc -+ -+// VC-1 in-loop deblocking filter for 8 pixel pairs at boundary of vertically-neighbouring blocks -+// On entry: -+// x0 -> top-left pel of lower block -+// x1 = row stride, bytes -+// w2 = PQUANT bitstream parameter -+function ff_vc1_v_loop_filter8_neon, export=1 -+ sub x3, x0, w1, sxtw #2 -+ ldr d0, .Lcoeffs -+ ld1 {v1.8b}, [x0], x1 // P5 -+ movi v2.2d, #0x0000ffff00000000 -+ ld1 {v3.8b}, [x3], x1 // P1 -+ ld1 {v4.8b}, [x3], x1 // P2 -+ ld1 {v5.8b}, [x0], x1 // P6 -+ ld1 {v6.8b}, [x3], x1 // P3 -+ ld1 {v7.8b}, [x0], x1 // P7 -+ ushll v16.8h, v1.8b, #1 // 2*P5 -+ ushll v3.8h, v3.8b, #1 // 2*P1 -+ ld1 {v17.8b}, [x3] // P4 -+ uxtl v4.8h, v4.8b // P2 -+ ld1 {v18.8b}, [x0] // P8 -+ uxtl v5.8h, v5.8b // P6 -+ dup v19.8h, w2 // pq -+ uxtl v20.8h, v6.8b // P3 -+ mls v3.8h, v4.8h, v0.h[1] // 2*P1-5*P2 -+ uxtl v4.8h, v7.8b // P7 -+ ushll v6.8h, v6.8b, #1 // 2*P3 -+ mls v16.8h, v5.8h, v0.h[1] // 2*P5-5*P6 -+ uxtl v7.8h, v17.8b // P4 -+ uxtl v17.8h, v18.8b // P8 -+ mla v16.8h, v4.8h, v0.h[1] // 2*P5-5*P6+5*P7 -+ uxtl v1.8h, v1.8b // P5 -+ mla v3.8h, v20.8h, v0.h[1] // 2*P1-5*P2+5*P3 -+ sub v4.8h, v7.8h, v1.8h // P4-P5 -+ mls v6.8h, v7.8h, v0.h[1] // 2*P3-5*P4 -+ mls v16.8h, v17.8h, v0.h[0] // 2*P5-5*P6+5*P7-2*P8 -+ abs v17.8h, v4.8h -+ sshr v4.8h, v4.8h, #8 // clip_sign -+ mls v3.8h, v7.8h, v0.h[0] // 2*P1-5*P2+5*P3-2*P4 -+ sshr v17.8h, v17.8h, #1 // clip -+ mla v6.8h, v1.8h, v0.h[1] // 2*P3-5*P4+5*P5 -+ srshr v16.8h, v16.8h, #3 -+ mls v6.8h, v5.8h, v0.h[0] // 2*P3-5*P4+5*P5-2*P6 -+ cmeq v5.8h, v17.8h, #0 // test clip == 0 -+ srshr v3.8h, v3.8h, #3 -+ abs v16.8h, v16.8h // a2 -+ abs v3.8h, v3.8h // a1 -+ srshr v6.8h, v6.8h, #3 -+ cmhs v18.8h, v3.8h, v16.8h // test a1 >= a2 -+ abs v20.8h, v6.8h // a0 -+ sshr v6.8h, v6.8h, #8 // a0_sign -+ bsl v18.16b, v16.16b, v3.16b // a3 -+ cmhs v3.8h, v20.8h, v19.8h // test a0 >= pq -+ sub v4.8h, v4.8h, v6.8h // clip_sign - a0_sign -+ uqsub v6.8h, v20.8h, v18.8h // a0 >= a3 ? a0-a3 : 0 (a0 > a3 in all cases where filtering is enabled, so makes more sense to subtract this way round than the opposite and then taking the abs) -+ cmhs v16.8h, v18.8h, v20.8h // test a3 >= a0 -+ orr v3.16b, v5.16b, v3.16b // test clip == 0 || a0 >= pq -+ mul v0.8h, v6.8h, v0.h[1] // a0 >= a3 ? 5*(a0-a3) : 0 -+ orr v5.16b, v3.16b, v16.16b // test clip == 0 || a0 >= pq || a3 >= a0 -+ cmtst v2.2d, v5.2d, v2.2d // if 2nd of each group of is not filtered, then none of the others in the group should be either -+ mov w0, v5.s[1] // move to gp reg -+ ushr v0.8h, v0.8h, #3 // a0 >= a3 ? (5*(a0-a3))>>3 : 0 -+ mov w2, v5.s[3] -+ orr v2.16b, v3.16b, v2.16b -+ cmhs v3.8h, v0.8h, v17.8h -+ and w0, w0, w2 -+ bsl v3.16b, v17.16b, v0.16b // FFMIN(d, clip) -+ tbnz w0, #0, 1f // none of the 8 pixel pairs should be updated in this case -+ bic v0.16b, v3.16b, v2.16b // set each d to zero if it should not be filtered -+ mls v7.8h, v0.8h, v4.8h // invert d depending on clip_sign & a0_sign, or zero it if they match, and accumulate into P4 -+ mla v1.8h, v0.8h, v4.8h // invert d depending on clip_sign & a0_sign, or zero it if they match, and accumulate into P5 -+ sqxtun v0.8b, v7.8h -+ sqxtun v1.8b, v1.8h -+ st1 {v0.8b}, [x3], x1 -+ st1 {v1.8b}, [x3] -+1: ret -+endfunc -+ -+// VC-1 in-loop deblocking filter for 8 pixel pairs at boundary of horizontally-neighbouring blocks -+// On entry: -+// x0 -> top-left pel of right block -+// x1 = row stride, bytes -+// w2 = PQUANT bitstream parameter -+function ff_vc1_h_loop_filter8_neon, export=1 -+ sub x3, x0, #4 // where to start reading -+ ldr d0, .Lcoeffs -+ ld1 {v1.8b}, [x3], x1 // P1[0], P2[0]... -+ sub x0, x0, #1 // where to start writing -+ ld1 {v2.8b}, [x3], x1 -+ add x4, x0, x1, lsl #2 -+ ld1 {v3.8b}, [x3], x1 -+ ld1 {v4.8b}, [x3], x1 -+ ld1 {v5.8b}, [x3], x1 -+ ld1 {v6.8b}, [x3], x1 -+ ld1 {v7.8b}, [x3], x1 -+ trn1 v16.8b, v1.8b, v2.8b // P1[0], P1[1], P3[0]... -+ ld1 {v17.8b}, [x3] -+ trn2 v1.8b, v1.8b, v2.8b // P2[0], P2[1], P4[0]... -+ trn1 v2.8b, v3.8b, v4.8b // P1[2], P1[3], P3[2]... -+ trn2 v3.8b, v3.8b, v4.8b // P2[2], P2[3], P4[2]... -+ dup v4.8h, w2 // pq -+ trn1 v18.8b, v5.8b, v6.8b // P1[4], P1[5], P3[4]... -+ trn2 v5.8b, v5.8b, v6.8b // P2[4], P2[5], P4[4]... -+ trn1 v6.4h, v16.4h, v2.4h // P1[0], P1[1], P1[2], P1[3], P5[0]... -+ trn1 v19.4h, v1.4h, v3.4h // P2[0], P2[1], P2[2], P2[3], P6[0]... -+ trn1 v20.8b, v7.8b, v17.8b // P1[6], P1[7], P3[6]... -+ trn2 v7.8b, v7.8b, v17.8b // P2[6], P2[7], P4[6]... -+ trn2 v2.4h, v16.4h, v2.4h // P3[0], P3[1], P3[2], P3[3], P7[0]... -+ trn2 v1.4h, v1.4h, v3.4h // P4[0], P4[1], P4[2], P4[3], P8[0]... -+ trn1 v3.4h, v18.4h, v20.4h // P1[4], P1[5], P1[6], P1[7], P5[4]... -+ trn1 v16.4h, v5.4h, v7.4h // P2[4], P2[5], P2[6], P2[7], P6[4]... -+ trn2 v17.4h, v18.4h, v20.4h // P3[4], P3[5], P3[6], P3[7], P7[4]... -+ trn2 v5.4h, v5.4h, v7.4h // P4[4], P4[5], P4[6], P4[7], P8[4]... -+ trn1 v7.2s, v6.2s, v3.2s // P1 -+ trn1 v18.2s, v19.2s, v16.2s // P2 -+ trn2 v3.2s, v6.2s, v3.2s // P5 -+ trn2 v6.2s, v19.2s, v16.2s // P6 -+ trn1 v16.2s, v2.2s, v17.2s // P3 -+ trn2 v2.2s, v2.2s, v17.2s // P7 -+ ushll v7.8h, v7.8b, #1 // 2*P1 -+ trn1 v17.2s, v1.2s, v5.2s // P4 -+ ushll v19.8h, v3.8b, #1 // 2*P5 -+ trn2 v1.2s, v1.2s, v5.2s // P8 -+ uxtl v5.8h, v18.8b // P2 -+ uxtl v6.8h, v6.8b // P6 -+ uxtl v18.8h, v16.8b // P3 -+ mls v7.8h, v5.8h, v0.h[1] // 2*P1-5*P2 -+ uxtl v2.8h, v2.8b // P7 -+ ushll v5.8h, v16.8b, #1 // 2*P3 -+ mls v19.8h, v6.8h, v0.h[1] // 2*P5-5*P6 -+ uxtl v16.8h, v17.8b // P4 -+ uxtl v1.8h, v1.8b // P8 -+ mla v19.8h, v2.8h, v0.h[1] // 2*P5-5*P6+5*P7 -+ uxtl v2.8h, v3.8b // P5 -+ mla v7.8h, v18.8h, v0.h[1] // 2*P1-5*P2+5*P3 -+ sub v3.8h, v16.8h, v2.8h // P4-P5 -+ mls v5.8h, v16.8h, v0.h[1] // 2*P3-5*P4 -+ mls v19.8h, v1.8h, v0.h[0] // 2*P5-5*P6+5*P7-2*P8 -+ abs v1.8h, v3.8h -+ sshr v3.8h, v3.8h, #8 // clip_sign -+ mls v7.8h, v16.8h, v0.h[0] // 2*P1-5*P2+5*P3-2*P4 -+ sshr v1.8h, v1.8h, #1 // clip -+ mla v5.8h, v2.8h, v0.h[1] // 2*P3-5*P4+5*P5 -+ srshr v17.8h, v19.8h, #3 -+ mls v5.8h, v6.8h, v0.h[0] // 2*P3-5*P4+5*P5-2*P6 -+ cmeq v6.8h, v1.8h, #0 // test clip == 0 -+ srshr v7.8h, v7.8h, #3 -+ abs v17.8h, v17.8h // a2 -+ abs v7.8h, v7.8h // a1 -+ srshr v5.8h, v5.8h, #3 -+ cmhs v18.8h, v7.8h, v17.8h // test a1 >= a2 -+ abs v19.8h, v5.8h // a0 -+ sshr v5.8h, v5.8h, #8 // a0_sign -+ bsl v18.16b, v17.16b, v7.16b // a3 -+ cmhs v4.8h, v19.8h, v4.8h // test a0 >= pq -+ sub v3.8h, v3.8h, v5.8h // clip_sign - a0_sign -+ uqsub v5.8h, v19.8h, v18.8h // a0 >= a3 ? a0-a3 : 0 (a0 > a3 in all cases where filtering is enabled, so makes more sense to subtract this way round than the opposite and then taking the abs) -+ cmhs v7.8h, v18.8h, v19.8h // test a3 >= a0 -+ orr v4.16b, v6.16b, v4.16b // test clip == 0 || a0 >= pq -+ mul v0.8h, v5.8h, v0.h[1] // a0 >= a3 ? 5*(a0-a3) : 0 -+ orr v5.16b, v4.16b, v7.16b // test clip == 0 || a0 >= pq || a3 >= a0 -+ mov w2, v5.s[1] // move to gp reg -+ ushr v0.8h, v0.8h, #3 // a0 >= a3 ? (5*(a0-a3))>>3 : 0 -+ mov w3, v5.s[3] -+ cmhs v5.8h, v0.8h, v1.8h -+ and w5, w2, w3 -+ bsl v5.16b, v1.16b, v0.16b // FFMIN(d, clip) -+ tbnz w5, #0, 2f // none of the 8 pixel pairs should be updated in this case -+ bic v0.16b, v5.16b, v4.16b // set each d to zero if it should not be filtered because clip == 0 || a0 >= pq (a3 > a0 case already zeroed by saturating sub) -+ mla v2.8h, v0.8h, v3.8h // invert d depending on clip_sign & a0_sign, or zero it if they match, and accumulate into P5 -+ mls v16.8h, v0.8h, v3.8h // invert d depending on clip_sign & a0_sign, or zero it if they match, and accumulate into P4 -+ sqxtun v1.8b, v2.8h -+ sqxtun v0.8b, v16.8h -+ tbnz w2, #0, 1f // none of the first 4 pixel pairs should be updated if so -+ st2 {v0.b, v1.b}[0], [x0], x1 -+ st2 {v0.b, v1.b}[1], [x0], x1 -+ st2 {v0.b, v1.b}[2], [x0], x1 -+ st2 {v0.b, v1.b}[3], [x0] -+1: tbnz w3, #0, 2f // none of the second 4 pixel pairs should be updated if so -+ st2 {v0.b, v1.b}[4], [x4], x1 -+ st2 {v0.b, v1.b}[5], [x4], x1 -+ st2 {v0.b, v1.b}[6], [x4], x1 -+ st2 {v0.b, v1.b}[7], [x4] -+2: ret -+endfunc -+ -+// VC-1 in-loop deblocking filter for 16 pixel pairs at boundary of vertically-neighbouring blocks -+// On entry: -+// x0 -> top-left pel of lower block -+// x1 = row stride, bytes -+// w2 = PQUANT bitstream parameter -+function ff_vc1_v_loop_filter16_neon, export=1 -+ sub x3, x0, w1, sxtw #2 -+ ldr d0, .Lcoeffs -+ ld1 {v1.16b}, [x0], x1 // P5 -+ movi v2.2d, #0x0000ffff00000000 -+ ld1 {v3.16b}, [x3], x1 // P1 -+ ld1 {v4.16b}, [x3], x1 // P2 -+ ld1 {v5.16b}, [x0], x1 // P6 -+ ld1 {v6.16b}, [x3], x1 // P3 -+ ld1 {v7.16b}, [x0], x1 // P7 -+ ushll v16.8h, v1.8b, #1 // 2*P5[0..7] -+ ushll v17.8h, v3.8b, #1 // 2*P1[0..7] -+ ld1 {v18.16b}, [x3] // P4 -+ uxtl v19.8h, v4.8b // P2[0..7] -+ ld1 {v20.16b}, [x0] // P8 -+ uxtl v21.8h, v5.8b // P6[0..7] -+ dup v22.8h, w2 // pq -+ ushll2 v3.8h, v3.16b, #1 // 2*P1[8..15] -+ mls v17.8h, v19.8h, v0.h[1] // 2*P1[0..7]-5*P2[0..7] -+ ushll2 v19.8h, v1.16b, #1 // 2*P5[8..15] -+ uxtl2 v4.8h, v4.16b // P2[8..15] -+ mls v16.8h, v21.8h, v0.h[1] // 2*P5[0..7]-5*P6[0..7] -+ uxtl2 v5.8h, v5.16b // P6[8..15] -+ uxtl v23.8h, v6.8b // P3[0..7] -+ uxtl v24.8h, v7.8b // P7[0..7] -+ mls v3.8h, v4.8h, v0.h[1] // 2*P1[8..15]-5*P2[8..15] -+ ushll v4.8h, v6.8b, #1 // 2*P3[0..7] -+ uxtl v25.8h, v18.8b // P4[0..7] -+ mls v19.8h, v5.8h, v0.h[1] // 2*P5[8..15]-5*P6[8..15] -+ uxtl2 v26.8h, v6.16b // P3[8..15] -+ mla v17.8h, v23.8h, v0.h[1] // 2*P1[0..7]-5*P2[0..7]+5*P3[0..7] -+ uxtl2 v7.8h, v7.16b // P7[8..15] -+ ushll2 v6.8h, v6.16b, #1 // 2*P3[8..15] -+ mla v16.8h, v24.8h, v0.h[1] // 2*P5[0..7]-5*P6[0..7]+5*P7[0..7] -+ uxtl2 v18.8h, v18.16b // P4[8..15] -+ uxtl v23.8h, v20.8b // P8[0..7] -+ mls v4.8h, v25.8h, v0.h[1] // 2*P3[0..7]-5*P4[0..7] -+ uxtl v24.8h, v1.8b // P5[0..7] -+ uxtl2 v20.8h, v20.16b // P8[8..15] -+ mla v3.8h, v26.8h, v0.h[1] // 2*P1[8..15]-5*P2[8..15]+5*P3[8..15] -+ uxtl2 v1.8h, v1.16b // P5[8..15] -+ sub v26.8h, v25.8h, v24.8h // P4[0..7]-P5[0..7] -+ mla v19.8h, v7.8h, v0.h[1] // 2*P5[8..15]-5*P6[8..15]+5*P7[8..15] -+ sub v7.8h, v18.8h, v1.8h // P4[8..15]-P5[8..15] -+ mls v6.8h, v18.8h, v0.h[1] // 2*P3[8..15]-5*P4[8..15] -+ abs v27.8h, v26.8h -+ sshr v26.8h, v26.8h, #8 // clip_sign[0..7] -+ mls v17.8h, v25.8h, v0.h[0] // 2*P1[0..7]-5*P2[0..7]+5*P3[0..7]-2*P4[0..7] -+ abs v28.8h, v7.8h -+ sshr v27.8h, v27.8h, #1 // clip[0..7] -+ mls v16.8h, v23.8h, v0.h[0] // 2*P5[0..7]-5*P6[0..7]+5*P7[0..7]-2*P8[0..7] -+ sshr v7.8h, v7.8h, #8 // clip_sign[8..15] -+ sshr v23.8h, v28.8h, #1 // clip[8..15] -+ mla v4.8h, v24.8h, v0.h[1] // 2*P3[0..7]-5*P4[0..7]+5*P5[0..7] -+ cmeq v28.8h, v27.8h, #0 // test clip[0..7] == 0 -+ srshr v17.8h, v17.8h, #3 -+ mls v3.8h, v18.8h, v0.h[0] // 2*P1[8..15]-5*P2[8..15]+5*P3[8..15]-2*P4[8..15] -+ cmeq v29.8h, v23.8h, #0 // test clip[8..15] == 0 -+ srshr v16.8h, v16.8h, #3 -+ mls v19.8h, v20.8h, v0.h[0] // 2*P5[8..15]-5*P6[8..15]+5*P7[8..15]-2*P8[8..15] -+ abs v17.8h, v17.8h // a1[0..7] -+ mla v6.8h, v1.8h, v0.h[1] // 2*P3[8..15]-5*P4[8..15]+5*P5[8..15] -+ srshr v3.8h, v3.8h, #3 -+ mls v4.8h, v21.8h, v0.h[0] // 2*P3[0..7]-5*P4[0..7]+5*P5[0..7]-2*P6[0..7] -+ abs v16.8h, v16.8h // a2[0..7] -+ srshr v19.8h, v19.8h, #3 -+ mls v6.8h, v5.8h, v0.h[0] // 2*P3[8..15]-5*P4[8..15]+5*P5[8..15]-2*P6[8..15] -+ cmhs v5.8h, v17.8h, v16.8h // test a1[0..7] >= a2[0..7] -+ abs v3.8h, v3.8h // a1[8..15] -+ srshr v4.8h, v4.8h, #3 -+ abs v19.8h, v19.8h // a2[8..15] -+ bsl v5.16b, v16.16b, v17.16b // a3[0..7] -+ srshr v6.8h, v6.8h, #3 -+ cmhs v16.8h, v3.8h, v19.8h // test a1[8..15] >= a2[8.15] -+ abs v17.8h, v4.8h // a0[0..7] -+ sshr v4.8h, v4.8h, #8 // a0_sign[0..7] -+ bsl v16.16b, v19.16b, v3.16b // a3[8..15] -+ uqsub v3.8h, v17.8h, v5.8h // a0[0..7] >= a3[0..7] ? a0[0..7]-a3[0..7] : 0 (a0 > a3 in all cases where filtering is enabled, so makes more sense to subtract this way round than the opposite and then taking the abs) -+ abs v19.8h, v6.8h // a0[8..15] -+ cmhs v20.8h, v17.8h, v22.8h // test a0[0..7] >= pq -+ cmhs v5.8h, v5.8h, v17.8h // test a3[0..7] >= a0[0..7] -+ sub v4.8h, v26.8h, v4.8h // clip_sign[0..7] - a0_sign[0..7] -+ sshr v6.8h, v6.8h, #8 // a0_sign[8..15] -+ mul v3.8h, v3.8h, v0.h[1] // a0[0..7] >= a3[0..7] ? 5*(a0[0..7]-a3[0..7]) : 0 -+ uqsub v17.8h, v19.8h, v16.8h // a0[8..15] >= a3[8..15] ? a0[8..15]-a3[8..15] : 0 (a0 > a3 in all cases where filtering is enabled, so makes more sense to subtract this way round than the opposite and then taking the abs) -+ orr v20.16b, v28.16b, v20.16b // test clip[0..7] == 0 || a0[0..7] >= pq -+ cmhs v21.8h, v19.8h, v22.8h // test a0[8..15] >= pq -+ cmhs v16.8h, v16.8h, v19.8h // test a3[8..15] >= a0[8..15] -+ mul v0.8h, v17.8h, v0.h[1] // a0[8..15] >= a3[8..15] ? 5*(a0[8..15]-a3[8..15]) : 0 -+ sub v6.8h, v7.8h, v6.8h // clip_sign[8..15] - a0_sign[8..15] -+ orr v5.16b, v20.16b, v5.16b // test clip[0..7] == 0 || a0[0..7] >= pq || a3[0..7] >= a0[0..7] -+ ushr v3.8h, v3.8h, #3 // a0[0..7] >= a3[0..7] ? (5*(a0[0..7]-a3[0..7]))>>3 : 0 -+ orr v7.16b, v29.16b, v21.16b // test clip[8..15] == 0 || a0[8..15] >= pq -+ cmtst v17.2d, v5.2d, v2.2d // if 2nd of each group of is not filtered, then none of the others in the group should be either -+ mov w0, v5.s[1] // move to gp reg -+ cmhs v19.8h, v3.8h, v27.8h -+ ushr v0.8h, v0.8h, #3 // a0[8..15] >= a3[8..15] ? (5*(a0[8..15]-a3[8..15]))>>3 : 0 -+ mov w2, v5.s[3] -+ orr v5.16b, v7.16b, v16.16b // test clip[8..15] == 0 || a0[8..15] >= pq || a3[8..15] >= a0[8..15] -+ orr v16.16b, v20.16b, v17.16b -+ bsl v19.16b, v27.16b, v3.16b // FFMIN(d[0..7], clip[0..7]) -+ cmtst v2.2d, v5.2d, v2.2d -+ cmhs v3.8h, v0.8h, v23.8h -+ mov w4, v5.s[1] -+ mov w5, v5.s[3] -+ and w0, w0, w2 -+ bic v5.16b, v19.16b, v16.16b // set each d[0..7] to zero if it should not be filtered because clip[0..7] == 0 || a0[0..7] >= pq (a3 > a0 case already zeroed by saturating sub) -+ orr v2.16b, v7.16b, v2.16b -+ bsl v3.16b, v23.16b, v0.16b // FFMIN(d[8..15], clip[8..15]) -+ mls v25.8h, v5.8h, v4.8h // invert d[0..7] depending on clip_sign[0..7] & a0_sign[0..7], or zero it if they match, and accumulate into P4[0..7] -+ and w2, w4, w5 -+ bic v0.16b, v3.16b, v2.16b // set each d[8..15] to zero if it should not be filtered because clip[8..15] == 0 || a0[8..15] >= pq (a3 > a0 case already zeroed by saturating sub) -+ mla v24.8h, v5.8h, v4.8h // invert d[0..7] depending on clip_sign[0..7] & a0_sign[0..7], or zero it if they match, and accumulate into P5[0..7] -+ and w0, w0, w2 -+ mls v18.8h, v0.8h, v6.8h // invert d[8..15] depending on clip_sign[8..15] & a0_sign[8..15], or zero it if they match, and accumulate into P4[8..15] -+ sqxtun v2.8b, v25.8h -+ tbnz w0, #0, 1f // none of the 16 pixel pairs should be updated in this case -+ mla v1.8h, v0.8h, v6.8h // invert d[8..15] depending on clip_sign[8..15] & a0_sign[8..15], or zero it if they match, and accumulate into P5[8..15] -+ sqxtun v0.8b, v24.8h -+ sqxtun2 v2.16b, v18.8h -+ sqxtun2 v0.16b, v1.8h -+ st1 {v2.16b}, [x3], x1 -+ st1 {v0.16b}, [x3] -+1: ret -+endfunc -+ -+// VC-1 in-loop deblocking filter for 16 pixel pairs at boundary of horizontally-neighbouring blocks -+// On entry: -+// x0 -> top-left pel of right block -+// x1 = row stride, bytes -+// w2 = PQUANT bitstream parameter -+function ff_vc1_h_loop_filter16_neon, export=1 -+ sub x3, x0, #4 // where to start reading -+ ldr d0, .Lcoeffs -+ ld1 {v1.8b}, [x3], x1 // P1[0], P2[0]... -+ sub x0, x0, #1 // where to start writing -+ ld1 {v2.8b}, [x3], x1 -+ add x4, x0, x1, lsl #3 -+ ld1 {v3.8b}, [x3], x1 -+ add x5, x0, x1, lsl #2 -+ ld1 {v4.8b}, [x3], x1 -+ add x6, x4, x1, lsl #2 -+ ld1 {v5.8b}, [x3], x1 -+ ld1 {v6.8b}, [x3], x1 -+ ld1 {v7.8b}, [x3], x1 -+ trn1 v16.8b, v1.8b, v2.8b // P1[0], P1[1], P3[0]... -+ ld1 {v17.8b}, [x3], x1 -+ trn2 v1.8b, v1.8b, v2.8b // P2[0], P2[1], P4[0]... -+ ld1 {v2.8b}, [x3], x1 -+ trn1 v18.8b, v3.8b, v4.8b // P1[2], P1[3], P3[2]... -+ ld1 {v19.8b}, [x3], x1 -+ trn2 v3.8b, v3.8b, v4.8b // P2[2], P2[3], P4[2]... -+ ld1 {v4.8b}, [x3], x1 -+ trn1 v20.8b, v5.8b, v6.8b // P1[4], P1[5], P3[4]... -+ ld1 {v21.8b}, [x3], x1 -+ trn2 v5.8b, v5.8b, v6.8b // P2[4], P2[5], P4[4]... -+ ld1 {v6.8b}, [x3], x1 -+ trn1 v22.8b, v7.8b, v17.8b // P1[6], P1[7], P3[6]... -+ ld1 {v23.8b}, [x3], x1 -+ trn2 v7.8b, v7.8b, v17.8b // P2[6], P2[7], P4[6]... -+ ld1 {v17.8b}, [x3], x1 -+ trn1 v24.8b, v2.8b, v19.8b // P1[8], P1[9], P3[8]... -+ ld1 {v25.8b}, [x3] -+ trn2 v2.8b, v2.8b, v19.8b // P2[8], P2[9], P4[8]... -+ trn1 v19.4h, v16.4h, v18.4h // P1[0], P1[1], P1[2], P1[3], P5[0]... -+ trn1 v26.8b, v4.8b, v21.8b // P1[10], P1[11], P3[10]... -+ trn2 v4.8b, v4.8b, v21.8b // P2[10], P2[11], P4[10]... -+ trn1 v21.4h, v1.4h, v3.4h // P2[0], P2[1], P2[2], P2[3], P6[0]... -+ trn1 v27.4h, v20.4h, v22.4h // P1[4], P1[5], P1[6], P1[7], P5[4]... -+ trn1 v28.8b, v6.8b, v23.8b // P1[12], P1[13], P3[12]... -+ trn2 v6.8b, v6.8b, v23.8b // P2[12], P2[13], P4[12]... -+ trn1 v23.4h, v5.4h, v7.4h // P2[4], P2[5], P2[6], P2[7], P6[4]... -+ trn1 v29.4h, v24.4h, v26.4h // P1[8], P1[9], P1[10], P1[11], P5[8]... -+ trn1 v30.8b, v17.8b, v25.8b // P1[14], P1[15], P3[14]... -+ trn2 v17.8b, v17.8b, v25.8b // P2[14], P2[15], P4[14]... -+ trn1 v25.4h, v2.4h, v4.4h // P2[8], P2[9], P2[10], P2[11], P6[8]... -+ trn1 v31.2s, v19.2s, v27.2s // P1[0..7] -+ trn2 v19.2s, v19.2s, v27.2s // P5[0..7] -+ trn1 v27.2s, v21.2s, v23.2s // P2[0..7] -+ trn2 v21.2s, v21.2s, v23.2s // P6[0..7] -+ trn1 v23.4h, v28.4h, v30.4h // P1[12], P1[13], P1[14], P1[15], P5[12]... -+ trn2 v16.4h, v16.4h, v18.4h // P3[0], P3[1], P3[2], P3[3], P7[0]... -+ trn1 v18.4h, v6.4h, v17.4h // P2[12], P2[13], P2[14], P2[15], P6[12]... -+ trn2 v20.4h, v20.4h, v22.4h // P3[4], P3[5], P3[6], P3[7], P7[4]... -+ trn2 v22.4h, v24.4h, v26.4h // P3[8], P3[9], P3[10], P3[11], P7[8]... -+ trn1 v24.2s, v29.2s, v23.2s // P1[8..15] -+ trn2 v23.2s, v29.2s, v23.2s // P5[8..15] -+ trn1 v26.2s, v25.2s, v18.2s // P2[8..15] -+ trn2 v18.2s, v25.2s, v18.2s // P6[8..15] -+ trn2 v25.4h, v28.4h, v30.4h // P3[12], P3[13], P3[14], P3[15], P7[12]... -+ trn2 v1.4h, v1.4h, v3.4h // P4[0], P4[1], P4[2], P4[3], P8[0]... -+ trn2 v3.4h, v5.4h, v7.4h // P4[4], P4[5], P4[6], P4[7], P8[4]... -+ trn2 v2.4h, v2.4h, v4.4h // P4[8], P4[9], P4[10], P4[11], P8[8]... -+ trn2 v4.4h, v6.4h, v17.4h // P4[12], P4[13], P4[14], P4[15], P8[12]... -+ ushll v5.8h, v31.8b, #1 // 2*P1[0..7] -+ ushll v6.8h, v19.8b, #1 // 2*P5[0..7] -+ trn1 v7.2s, v16.2s, v20.2s // P3[0..7] -+ uxtl v17.8h, v27.8b // P2[0..7] -+ trn2 v16.2s, v16.2s, v20.2s // P7[0..7] -+ uxtl v20.8h, v21.8b // P6[0..7] -+ trn1 v21.2s, v22.2s, v25.2s // P3[8..15] -+ ushll v24.8h, v24.8b, #1 // 2*P1[8..15] -+ trn2 v22.2s, v22.2s, v25.2s // P7[8..15] -+ ushll v25.8h, v23.8b, #1 // 2*P5[8..15] -+ trn1 v27.2s, v1.2s, v3.2s // P4[0..7] -+ uxtl v26.8h, v26.8b // P2[8..15] -+ mls v5.8h, v17.8h, v0.h[1] // 2*P1[0..7]-5*P2[0..7] -+ uxtl v17.8h, v18.8b // P6[8..15] -+ mls v6.8h, v20.8h, v0.h[1] // 2*P5[0..7]-5*P6[0..7] -+ trn1 v18.2s, v2.2s, v4.2s // P4[8..15] -+ uxtl v28.8h, v7.8b // P3[0..7] -+ mls v24.8h, v26.8h, v0.h[1] // 2*P1[8..15]-5*P2[8..15] -+ uxtl v16.8h, v16.8b // P7[0..7] -+ uxtl v26.8h, v21.8b // P3[8..15] -+ mls v25.8h, v17.8h, v0.h[1] // 2*P5[8..15]-5*P6[8..15] -+ uxtl v22.8h, v22.8b // P7[8..15] -+ ushll v7.8h, v7.8b, #1 // 2*P3[0..7] -+ uxtl v27.8h, v27.8b // P4[0..7] -+ trn2 v1.2s, v1.2s, v3.2s // P8[0..7] -+ ushll v3.8h, v21.8b, #1 // 2*P3[8..15] -+ trn2 v2.2s, v2.2s, v4.2s // P8[8..15] -+ uxtl v4.8h, v18.8b // P4[8..15] -+ mla v5.8h, v28.8h, v0.h[1] // 2*P1[0..7]-5*P2[0..7]+5*P3[0..7] -+ uxtl v1.8h, v1.8b // P8[0..7] -+ mla v6.8h, v16.8h, v0.h[1] // 2*P5[0..7]-5*P6[0..7]+5*P7[0..7] -+ uxtl v2.8h, v2.8b // P8[8..15] -+ uxtl v16.8h, v19.8b // P5[0..7] -+ mla v24.8h, v26.8h, v0.h[1] // 2*P1[8..15]-5*P2[8..15]+5*P3[8..15] -+ uxtl v18.8h, v23.8b // P5[8..15] -+ dup v19.8h, w2 // pq -+ mla v25.8h, v22.8h, v0.h[1] // 2*P5[8..15]-5*P6[8..15]+5*P7[8..15] -+ sub v21.8h, v27.8h, v16.8h // P4[0..7]-P5[0..7] -+ sub v22.8h, v4.8h, v18.8h // P4[8..15]-P5[8..15] -+ mls v7.8h, v27.8h, v0.h[1] // 2*P3[0..7]-5*P4[0..7] -+ abs v23.8h, v21.8h -+ mls v3.8h, v4.8h, v0.h[1] // 2*P3[8..15]-5*P4[8..15] -+ abs v26.8h, v22.8h -+ sshr v21.8h, v21.8h, #8 // clip_sign[0..7] -+ mls v5.8h, v27.8h, v0.h[0] // 2*P1[0..7]-5*P2[0..7]+5*P3[0..7]-2*P4[0..7] -+ sshr v23.8h, v23.8h, #1 // clip[0..7] -+ sshr v26.8h, v26.8h, #1 // clip[8..15] -+ mls v6.8h, v1.8h, v0.h[0] // 2*P5[0..7]-5*P6[0..7]+5*P7[0..7]-2*P8[0..7] -+ sshr v1.8h, v22.8h, #8 // clip_sign[8..15] -+ cmeq v22.8h, v23.8h, #0 // test clip[0..7] == 0 -+ mls v24.8h, v4.8h, v0.h[0] // 2*P1[8..15]-5*P2[8..15]+5*P3[8..15]-2*P4[8..15] -+ cmeq v28.8h, v26.8h, #0 // test clip[8..15] == 0 -+ srshr v5.8h, v5.8h, #3 -+ mls v25.8h, v2.8h, v0.h[0] // 2*P5[8..15]-5*P6[8..15]+5*P7[8..15]-2*P8[8..15] -+ srshr v2.8h, v6.8h, #3 -+ mla v7.8h, v16.8h, v0.h[1] // 2*P3[0..7]-5*P4[0..7]+5*P5[0..7] -+ srshr v6.8h, v24.8h, #3 -+ mla v3.8h, v18.8h, v0.h[1] // 2*P3[8..15]-5*P4[8..15]+5*P5[8..15] -+ abs v5.8h, v5.8h // a1[0..7] -+ srshr v24.8h, v25.8h, #3 -+ mls v3.8h, v17.8h, v0.h[0] // 2*P3[8..15]-5*P4[8..15]+5*P5[8..15]-2*P6[8..15] -+ abs v2.8h, v2.8h // a2[0..7] -+ abs v6.8h, v6.8h // a1[8..15] -+ mls v7.8h, v20.8h, v0.h[0] // 2*P3[0..7]-5*P4[0..7]+5*P5[0..7]-2*P6[0..7] -+ abs v17.8h, v24.8h // a2[8..15] -+ cmhs v20.8h, v5.8h, v2.8h // test a1[0..7] >= a2[0..7] -+ srshr v3.8h, v3.8h, #3 -+ cmhs v24.8h, v6.8h, v17.8h // test a1[8..15] >= a2[8.15] -+ srshr v7.8h, v7.8h, #3 -+ bsl v20.16b, v2.16b, v5.16b // a3[0..7] -+ abs v2.8h, v3.8h // a0[8..15] -+ sshr v3.8h, v3.8h, #8 // a0_sign[8..15] -+ bsl v24.16b, v17.16b, v6.16b // a3[8..15] -+ abs v5.8h, v7.8h // a0[0..7] -+ sshr v6.8h, v7.8h, #8 // a0_sign[0..7] -+ cmhs v7.8h, v2.8h, v19.8h // test a0[8..15] >= pq -+ sub v1.8h, v1.8h, v3.8h // clip_sign[8..15] - a0_sign[8..15] -+ uqsub v3.8h, v2.8h, v24.8h // a0[8..15] >= a3[8..15] ? a0[8..15]-a3[8..15] : 0 (a0 > a3 in all cases where filtering is enabled, so makes more sense to subtract this way round than the opposite and then taking the abs) -+ cmhs v2.8h, v24.8h, v2.8h // test a3[8..15] >= a0[8..15] -+ uqsub v17.8h, v5.8h, v20.8h // a0[0..7] >= a3[0..7] ? a0[0..7]-a3[0..7] : 0 (a0 > a3 in all cases where filtering is enabled, so makes more sense to subtract this way round than the opposite and then taking the abs) -+ cmhs v19.8h, v5.8h, v19.8h // test a0[0..7] >= pq -+ orr v7.16b, v28.16b, v7.16b // test clip[8..15] == 0 || a0[8..15] >= pq -+ sub v6.8h, v21.8h, v6.8h // clip_sign[0..7] - a0_sign[0..7] -+ mul v3.8h, v3.8h, v0.h[1] // a0[8..15] >= a3[8..15] ? 5*(a0[8..15]-a3[8..15]) : 0 -+ cmhs v5.8h, v20.8h, v5.8h // test a3[0..7] >= a0[0..7] -+ orr v19.16b, v22.16b, v19.16b // test clip[0..7] == 0 || a0[0..7] >= pq -+ mul v0.8h, v17.8h, v0.h[1] // a0[0..7] >= a3[0..7] ? 5*(a0[0..7]-a3[0..7]) : 0 -+ orr v2.16b, v7.16b, v2.16b // test clip[8..15] == 0 || a0[8..15] >= pq || a3[8..15] >= a0[8..15] -+ orr v5.16b, v19.16b, v5.16b // test clip[0..7] == 0 || a0[0..7] >= pq || a3[0..7] >= a0[0..7] -+ ushr v3.8h, v3.8h, #3 // a0[8..15] >= a3[8..15] ? (5*(a0[8..15]-a3[8..15]))>>3 : 0 -+ mov w7, v2.s[1] -+ mov w8, v2.s[3] -+ ushr v0.8h, v0.8h, #3 // a0[0..7] >= a3[0..7] ? (5*(a0[0..7]-a3[0..7]))>>3 : 0 -+ mov w2, v5.s[1] // move to gp reg -+ cmhs v2.8h, v3.8h, v26.8h -+ mov w3, v5.s[3] -+ cmhs v5.8h, v0.8h, v23.8h -+ bsl v2.16b, v26.16b, v3.16b // FFMIN(d[8..15], clip[8..15]) -+ and w9, w7, w8 -+ bsl v5.16b, v23.16b, v0.16b // FFMIN(d[0..7], clip[0..7]) -+ and w10, w2, w3 -+ bic v0.16b, v2.16b, v7.16b // set each d[8..15] to zero if it should not be filtered because clip[8..15] == 0 || a0[8..15] >= pq (a3 > a0 case already zeroed by saturating sub) -+ and w9, w10, w9 -+ bic v2.16b, v5.16b, v19.16b // set each d[0..7] to zero if it should not be filtered because clip[0..7] == 0 || a0[0..7] >= pq (a3 > a0 case already zeroed by saturating sub) -+ mls v4.8h, v0.8h, v1.8h // invert d[8..15] depending on clip_sign[8..15] & a0_sign[8..15], or zero it if they match, and accumulate into P4 -+ tbnz w9, #0, 4f // none of the 16 pixel pairs should be updated in this case -+ mls v27.8h, v2.8h, v6.8h // invert d[0..7] depending on clip_sign[0..7] & a0_sign[0..7], or zero it if they match, and accumulate into P4 -+ mla v16.8h, v2.8h, v6.8h // invert d[0..7] depending on clip_sign[0..7] & a0_sign[0..7], or zero it if they match, and accumulate into P5 -+ sqxtun v2.8b, v4.8h -+ mla v18.8h, v0.8h, v1.8h // invert d[8..15] depending on clip_sign[8..15] & a0_sign[8..15], or zero it if they match, and accumulate into P5 -+ sqxtun v0.8b, v27.8h -+ sqxtun v1.8b, v16.8h -+ sqxtun v3.8b, v18.8h -+ tbnz w2, #0, 1f -+ st2 {v0.b, v1.b}[0], [x0], x1 -+ st2 {v0.b, v1.b}[1], [x0], x1 -+ st2 {v0.b, v1.b}[2], [x0], x1 -+ st2 {v0.b, v1.b}[3], [x0] -+1: tbnz w3, #0, 2f -+ st2 {v0.b, v1.b}[4], [x5], x1 -+ st2 {v0.b, v1.b}[5], [x5], x1 -+ st2 {v0.b, v1.b}[6], [x5], x1 -+ st2 {v0.b, v1.b}[7], [x5] -+2: tbnz w7, #0, 3f -+ st2 {v2.b, v3.b}[0], [x4], x1 -+ st2 {v2.b, v3.b}[1], [x4], x1 -+ st2 {v2.b, v3.b}[2], [x4], x1 -+ st2 {v2.b, v3.b}[3], [x4] -+3: tbnz w8, #0, 4f -+ st2 {v2.b, v3.b}[4], [x6], x1 -+ st2 {v2.b, v3.b}[5], [x6], x1 -+ st2 {v2.b, v3.b}[6], [x6], x1 -+ st2 {v2.b, v3.b}[7], [x6] -+4: ret -+endfunc -+ -+// Copy at most the specified number of bytes from source to destination buffer, -+// stopping at a multiple of 32 bytes, none of which are the start of an escape sequence -+// On entry: -+// x0 -> source buffer -+// w1 = max number of bytes to copy -+// x2 -> destination buffer, optimally 8-byte aligned -+// On exit: -+// w0 = number of bytes not copied -+function ff_vc1_unescape_buffer_helper_neon, export=1 -+ // Offset by 80 to screen out cases that are too short for us to handle, -+ // and also make it easy to test for loop termination, or to determine -+ // whether we need an odd number of half-iterations of the loop. -+ subs w1, w1, #80 -+ b.mi 90f -+ -+ // Set up useful constants -+ movi v20.4s, #3, lsl #24 -+ movi v21.4s, #3, lsl #16 -+ -+ tst w1, #32 -+ b.ne 1f -+ -+ ld1 {v0.16b, v1.16b, v2.16b}, [x0], #48 -+ ext v25.16b, v0.16b, v1.16b, #1 -+ ext v26.16b, v0.16b, v1.16b, #2 -+ ext v27.16b, v0.16b, v1.16b, #3 -+ ext v29.16b, v1.16b, v2.16b, #1 -+ ext v30.16b, v1.16b, v2.16b, #2 -+ ext v31.16b, v1.16b, v2.16b, #3 -+ bic v24.16b, v0.16b, v20.16b -+ bic v25.16b, v25.16b, v20.16b -+ bic v26.16b, v26.16b, v20.16b -+ bic v27.16b, v27.16b, v20.16b -+ bic v28.16b, v1.16b, v20.16b -+ bic v29.16b, v29.16b, v20.16b -+ bic v30.16b, v30.16b, v20.16b -+ bic v31.16b, v31.16b, v20.16b -+ eor v24.16b, v24.16b, v21.16b -+ eor v25.16b, v25.16b, v21.16b -+ eor v26.16b, v26.16b, v21.16b -+ eor v27.16b, v27.16b, v21.16b -+ eor v28.16b, v28.16b, v21.16b -+ eor v29.16b, v29.16b, v21.16b -+ eor v30.16b, v30.16b, v21.16b -+ eor v31.16b, v31.16b, v21.16b -+ cmeq v24.4s, v24.4s, #0 -+ cmeq v25.4s, v25.4s, #0 -+ cmeq v26.4s, v26.4s, #0 -+ cmeq v27.4s, v27.4s, #0 -+ add w1, w1, #32 -+ b 3f -+ -+1: ld1 {v3.16b, v4.16b, v5.16b}, [x0], #48 -+ ext v25.16b, v3.16b, v4.16b, #1 -+ ext v26.16b, v3.16b, v4.16b, #2 -+ ext v27.16b, v3.16b, v4.16b, #3 -+ ext v29.16b, v4.16b, v5.16b, #1 -+ ext v30.16b, v4.16b, v5.16b, #2 -+ ext v31.16b, v4.16b, v5.16b, #3 -+ bic v24.16b, v3.16b, v20.16b -+ bic v25.16b, v25.16b, v20.16b -+ bic v26.16b, v26.16b, v20.16b -+ bic v27.16b, v27.16b, v20.16b -+ bic v28.16b, v4.16b, v20.16b -+ bic v29.16b, v29.16b, v20.16b -+ bic v30.16b, v30.16b, v20.16b -+ bic v31.16b, v31.16b, v20.16b -+ eor v24.16b, v24.16b, v21.16b -+ eor v25.16b, v25.16b, v21.16b -+ eor v26.16b, v26.16b, v21.16b -+ eor v27.16b, v27.16b, v21.16b -+ eor v28.16b, v28.16b, v21.16b -+ eor v29.16b, v29.16b, v21.16b -+ eor v30.16b, v30.16b, v21.16b -+ eor v31.16b, v31.16b, v21.16b -+ cmeq v24.4s, v24.4s, #0 -+ cmeq v25.4s, v25.4s, #0 -+ cmeq v26.4s, v26.4s, #0 -+ cmeq v27.4s, v27.4s, #0 -+ // Drop through... -+2: mov v0.16b, v5.16b -+ ld1 {v1.16b, v2.16b}, [x0], #32 -+ cmeq v28.4s, v28.4s, #0 -+ cmeq v29.4s, v29.4s, #0 -+ cmeq v30.4s, v30.4s, #0 -+ cmeq v31.4s, v31.4s, #0 -+ orr v24.16b, v24.16b, v25.16b -+ orr v26.16b, v26.16b, v27.16b -+ orr v28.16b, v28.16b, v29.16b -+ orr v30.16b, v30.16b, v31.16b -+ ext v25.16b, v0.16b, v1.16b, #1 -+ orr v22.16b, v24.16b, v26.16b -+ ext v26.16b, v0.16b, v1.16b, #2 -+ ext v27.16b, v0.16b, v1.16b, #3 -+ ext v29.16b, v1.16b, v2.16b, #1 -+ orr v23.16b, v28.16b, v30.16b -+ ext v30.16b, v1.16b, v2.16b, #2 -+ ext v31.16b, v1.16b, v2.16b, #3 -+ bic v24.16b, v0.16b, v20.16b -+ bic v25.16b, v25.16b, v20.16b -+ bic v26.16b, v26.16b, v20.16b -+ orr v22.16b, v22.16b, v23.16b -+ bic v27.16b, v27.16b, v20.16b -+ bic v28.16b, v1.16b, v20.16b -+ bic v29.16b, v29.16b, v20.16b -+ bic v30.16b, v30.16b, v20.16b -+ bic v31.16b, v31.16b, v20.16b -+ addv s22, v22.4s -+ eor v24.16b, v24.16b, v21.16b -+ eor v25.16b, v25.16b, v21.16b -+ eor v26.16b, v26.16b, v21.16b -+ eor v27.16b, v27.16b, v21.16b -+ eor v28.16b, v28.16b, v21.16b -+ mov w3, v22.s[0] -+ eor v29.16b, v29.16b, v21.16b -+ eor v30.16b, v30.16b, v21.16b -+ eor v31.16b, v31.16b, v21.16b -+ cmeq v24.4s, v24.4s, #0 -+ cmeq v25.4s, v25.4s, #0 -+ cmeq v26.4s, v26.4s, #0 -+ cmeq v27.4s, v27.4s, #0 -+ cbnz w3, 90f -+ st1 {v3.16b, v4.16b}, [x2], #32 -+3: mov v3.16b, v2.16b -+ ld1 {v4.16b, v5.16b}, [x0], #32 -+ cmeq v28.4s, v28.4s, #0 -+ cmeq v29.4s, v29.4s, #0 -+ cmeq v30.4s, v30.4s, #0 -+ cmeq v31.4s, v31.4s, #0 -+ orr v24.16b, v24.16b, v25.16b -+ orr v26.16b, v26.16b, v27.16b -+ orr v28.16b, v28.16b, v29.16b -+ orr v30.16b, v30.16b, v31.16b -+ ext v25.16b, v3.16b, v4.16b, #1 -+ orr v22.16b, v24.16b, v26.16b -+ ext v26.16b, v3.16b, v4.16b, #2 -+ ext v27.16b, v3.16b, v4.16b, #3 -+ ext v29.16b, v4.16b, v5.16b, #1 -+ orr v23.16b, v28.16b, v30.16b -+ ext v30.16b, v4.16b, v5.16b, #2 -+ ext v31.16b, v4.16b, v5.16b, #3 -+ bic v24.16b, v3.16b, v20.16b -+ bic v25.16b, v25.16b, v20.16b -+ bic v26.16b, v26.16b, v20.16b -+ orr v22.16b, v22.16b, v23.16b -+ bic v27.16b, v27.16b, v20.16b -+ bic v28.16b, v4.16b, v20.16b -+ bic v29.16b, v29.16b, v20.16b -+ bic v30.16b, v30.16b, v20.16b -+ bic v31.16b, v31.16b, v20.16b -+ addv s22, v22.4s -+ eor v24.16b, v24.16b, v21.16b -+ eor v25.16b, v25.16b, v21.16b -+ eor v26.16b, v26.16b, v21.16b -+ eor v27.16b, v27.16b, v21.16b -+ eor v28.16b, v28.16b, v21.16b -+ mov w3, v22.s[0] -+ eor v29.16b, v29.16b, v21.16b -+ eor v30.16b, v30.16b, v21.16b -+ eor v31.16b, v31.16b, v21.16b -+ cmeq v24.4s, v24.4s, #0 -+ cmeq v25.4s, v25.4s, #0 -+ cmeq v26.4s, v26.4s, #0 -+ cmeq v27.4s, v27.4s, #0 -+ cbnz w3, 91f -+ st1 {v0.16b, v1.16b}, [x2], #32 -+ subs w1, w1, #64 -+ b.pl 2b -+ -+90: add w0, w1, #80 -+ ret -+ -+91: sub w1, w1, #32 -+ b 90b -+endfunc ---- a/libavcodec/allcodecs.c -+++ b/libavcodec/allcodecs.c -@@ -149,6 +149,7 @@ extern AVCodec ff_hap_decoder; - extern AVCodec ff_hevc_decoder; - extern AVCodec ff_hevc_qsv_decoder; - extern AVCodec ff_hevc_rkmpp_decoder; -+extern AVCodec ff_hevc_rpi_decoder; - extern AVCodec ff_hevc_v4l2m2m_decoder; - extern AVCodec ff_hnm4_video_decoder; - extern AVCodec ff_hq_hqa_decoder; -@@ -890,6 +891,41 @@ static enum AVCodecID remap_deprecated_c - } - } - -+static int codec_supports_format(const AVCodec * const p, const enum AVPixelFormat fmt) -+{ -+ const enum AVPixelFormat *pf = p->pix_fmts; -+ -+ // Assume good if we lack info -+ if (pf == NULL) -+ return 1; -+ if (fmt == AV_PIX_FMT_NONE) -+ return 0; -+ -+ for (; *pf != AV_PIX_FMT_NONE; ++pf) { -+ if (*pf == fmt) -+ return 1; -+ } -+ return 0; -+} -+ -+AVCodec *avcodec_find_decoder_by_id_and_fmt(enum AVCodecID id, enum AVPixelFormat fmt) -+{ -+ const AVCodec *p, *experimental = NULL; -+ void *i = 0; -+ -+ id= remap_deprecated_codec_id(id); -+ while ((p = av_codec_iterate(&i))) { -+ if (av_codec_is_decoder(p) && p->id == id && codec_supports_format(p, fmt)) { -+ if (p->capabilities & AV_CODEC_CAP_EXPERIMENTAL && !experimental) { -+ experimental = p; -+ } else -+ return (AVCodec *)p; -+ } -+ p = p->next; -+ } -+ return (AVCodec *)experimental; -+} -+ - static AVCodec *find_codec(enum AVCodecID id, int (*x)(const AVCodec *)) - { - const AVCodec *p, *experimental = NULL; ---- a/libavcodec/arm/Makefile -+++ b/libavcodec/arm/Makefile -@@ -40,6 +40,8 @@ OBJS-$(CONFIG_AAC_DECODER) + - arm/sbrdsp_init_arm.o - OBJS-$(CONFIG_DCA_DECODER) += arm/synth_filter_init_arm.o - OBJS-$(CONFIG_HEVC_DECODER) += arm/hevcdsp_init_arm.o -+OBJS-$(CONFIG_HEVC_RPI_DECODER) += arm/rpi_hevcdsp_init_arm.o \ -+ arm/rpi_hevcpred_init_arm.o - OBJS-$(CONFIG_MLP_DECODER) += arm/mlpdsp_init_arm.o - OBJS-$(CONFIG_RV40_DECODER) += arm/rv40dsp_init_arm.o - OBJS-$(CONFIG_SBC_ENCODER) += arm/sbcdsp_init_arm.o -@@ -140,10 +142,24 @@ NEON-OBJS-$(CONFIG_AAC_DECODER) + - NEON-OBJS-$(CONFIG_LLAUDDSP) += arm/lossless_audiodsp_neon.o - NEON-OBJS-$(CONFIG_DCA_DECODER) += arm/synth_filter_neon.o - NEON-OBJS-$(CONFIG_HEVC_DECODER) += arm/hevcdsp_init_neon.o \ -+ arm/hevcdsp_idct_neon.o \ - arm/hevcdsp_deblock_neon.o \ - arm/hevcdsp_idct_neon.o \ - arm/hevcdsp_qpel_neon.o \ - arm/hevcdsp_sao_neon.o -+NEON-OBJS-$(CONFIG_HEVC_RPI_DECODER) += arm/rpi_hevcdsp_init_neon.o \ -+ arm/rpi_hevc_misc_neon.o \ -+ arm/rpi_hevcdsp_deblock_neon.o \ -+ arm/rpi_hevcdsp_idct_neon.o \ -+ arm/rpi_hevcdsp_res8_neon.o \ -+ arm/rpi_hevcdsp_res16_neon.o \ -+ arm/rpi_hevcdsp_sao_neon.o \ -+ arm/rpi_hevcpred_init_neon.o \ -+ arm/rpi_hevcpred_intra_angular_neon.o \ -+ arm/rpi_hevcpred_intra_dc_neon.o \ -+ arm/rpi_hevcpred_intra_filter_neon.o \ -+ arm/rpi_hevcpred_intra_hv_neon.o \ -+ arm/rpi_hevcpred_intra_planar_neon.o - NEON-OBJS-$(CONFIG_RV30_DECODER) += arm/rv34dsp_neon.o - NEON-OBJS-$(CONFIG_RV40_DECODER) += arm/rv34dsp_neon.o \ - arm/rv40dsp_neon.o ---- a/libavcodec/arm/cabac.h -+++ b/libavcodec/arm/cabac.h -@@ -26,83 +26,209 @@ - #include "libavutil/internal.h" - #include "libavcodec/cabac.h" - -+ - #define get_cabac_inline get_cabac_inline_arm - static av_always_inline int get_cabac_inline_arm(CABACContext *c, -- uint8_t *const state) -+ uint8_t *state) - { -- int bit; -- void *reg_b, *reg_c, *tmp; -+ const uint8_t *mlps_tables = ff_h264_cabac_tables + H264_MLPS_STATE_OFFSET + 128; -+ int bit, ptr, low, tmp1, tmp2; -+ __asm__ volatile ( -+ "ldr %[bit], [%[c], %[range_off]] \n\t" -+ "ldrb %[ptr], [%[state]] \n\t" -+ "sub %[tmp1], %[mlps_tables], %[lps_off] \n\t" -+ "and %[tmp2], %[bit], #0xc0 \n\t" -+ "add %[tmp1], %[tmp1], %[ptr] \n\t" -+ "ldr %[low], [%[c], %[low_off]] \n\t" -+ "ldrb %[tmp2], [%[tmp1], %[tmp2], lsl #1] \n\t" -+ "sub %[bit], %[bit], %[tmp2] \n\t" -+ "mov %[tmp1], %[bit] \n\t" -+ "cmp %[low], %[bit], lsl #17 \n\t" -+ "itt ge \n\t" -+ "movge %[tmp1], %[tmp2] \n\t" -+ "mvnge %[ptr], %[ptr] \n\t" -+ "clz %[tmp2], %[tmp1] \n\t" -+ "it ge \n\t" -+ "subge %[low], %[low], %[bit], lsl #17 \n\t" -+ "sub %[tmp2], %[tmp2], #23 \n\t" -+ "and %[bit], %[ptr], #1 \n\t" -+ "ldrb %[mlps_tables], [%[mlps_tables], %[ptr]] \n\t" -+ "lsl %[low], %[low], %[tmp2] \n\t" -+ "lsls %[ptr], %[low], #16 \n\t" -+ "bne 1f \n\t" -+ "ldr %[ptr], [%[c], %[ptr_off]] \n\t" -+ "lsl %[tmp2], %[tmp1], %[tmp2] \n\t" -+#if UNCHECKED_BITSTREAM_READER -+ "strb %[mlps_tables], [%[state]] \n\t" -+ "rbit %[state], %[low] \n\t" -+ "ldrh %[tmp1], [%[ptr]], #2 \n\t" -+#else -+ "ldr %[tmp1], [%[c], %[end_off]] \n\t" -+ "strb %[mlps_tables], [%[state]] \n\t" -+ "rbit %[state], %[low] \n\t" -+ "cmp %[tmp1], %[ptr] \n\t" -+#if CONFIG_THUMB -+ "it cs \n\t" -+ "ldrhcs %[tmp1], [%[ptr]], #2 \n\t" -+#else -+ "ldrcsh %[tmp1], [%[ptr]], #2 \n\t" -+#endif -+#endif -+ "clz %[state], %[state] \n\t" -+ "movw %[mlps_tables], #0xffff \n\t" -+ "sub %[state], %[state], #16 \n\t" -+ "str %[tmp2], [%[c], %[range_off]] \n\t" -+ "rev %[tmp1], %[tmp1] \n\t" -+ "str %[ptr], [%[c], %[ptr_off]] \n\t" -+ "lsr %[tmp1], %[tmp1], #15 \n\t" -+ "sub %[tmp1], %[tmp1], %[mlps_tables] \n\t" -+#if CONFIG_THUMB -+ "lsl %[tmp1], %[tmp1], %[state] \n\t" -+ "add %[low], %[low], %[tmp1] \n\t" -+#else -+ "add %[low], %[low], %[tmp1], lsl %[state] \n\t" -+#endif -+ "str %[low], [%[c], %[low_off]] \n\t" -+ "b 2f \n\t" -+ "1: \n\t" -+ "strb %[mlps_tables], [%[state]] \n\t" -+ "lsl %[tmp1], %[tmp1], %[tmp2] \n\t" -+ "str %[low], [%[c], %[low_off]] \n\t" -+ "str %[tmp1], [%[c], %[range_off]] \n\t" -+ "2: \n\t" -+ : // Outputs -+ [state]"+r"(state), -+ [mlps_tables]"+r"(mlps_tables), -+ [bit]"=&r"(bit), -+ [ptr]"=&r"(ptr), -+ [low]"=&r"(low), -+ [tmp1]"=&r"(tmp1), -+ [tmp2]"=&r"(tmp2) -+ : // Inputs -+ [c]"r"(c), -+ [low_off]"J"(offsetof(CABACContext, low)), -+ [range_off]"J"(offsetof(CABACContext, range)), -+ [ptr_off]"J"(offsetof(CABACContext, bytestream)), -+ [end_off]"J"(offsetof(CABACContext, bytestream_end)), -+ [lps_off]"I"((H264_MLPS_STATE_OFFSET + 128) - H264_LPS_RANGE_OFFSET) -+ : // Clobbers -+ "cc", "memory" -+ ); -+ return bit; -+} - -- __asm__ volatile( -- "ldrb %[bit] , [%[state]] \n\t" -- "add %[r_b] , %[tables] , %[lps_off] \n\t" -- "mov %[tmp] , %[range] \n\t" -- "and %[range] , %[range] , #0xC0 \n\t" -- "add %[r_b] , %[r_b] , %[bit] \n\t" -- "ldrb %[range] , [%[r_b], %[range], lsl #1] \n\t" -- "add %[r_b] , %[tables] , %[norm_off] \n\t" -- "sub %[r_c] , %[tmp] , %[range] \n\t" -- "lsl %[tmp] , %[r_c] , #17 \n\t" -- "cmp %[tmp] , %[low] \n\t" -- "it gt \n\t" -- "movgt %[range] , %[r_c] \n\t" -- "itt cc \n\t" -- "mvncc %[bit] , %[bit] \n\t" -- "subcc %[low] , %[low] , %[tmp] \n\t" -- "add %[r_c] , %[tables] , %[mlps_off] \n\t" -- "ldrb %[tmp] , [%[r_b], %[range]] \n\t" -- "ldrb %[r_b] , [%[r_c], %[bit]] \n\t" -- "lsl %[low] , %[low] , %[tmp] \n\t" -- "lsl %[range] , %[range] , %[tmp] \n\t" -- "uxth %[r_c] , %[low] \n\t" -- "strb %[r_b] , [%[state]] \n\t" -- "tst %[r_c] , %[r_c] \n\t" -- "bne 2f \n\t" -- "ldr %[r_c] , [%[c], %[byte]] \n\t" -+#define get_cabac_bypass get_cabac_bypass_arm -+static inline int get_cabac_bypass_arm(CABACContext * const c) -+{ -+ uint32_t low = c->low, range, ptr, tmp; -+ int rv; -+ __asm volatile ( -+ "ldr %[range] , [%[c], %[range_off]] \n\t" -+ "mov %[rv] , #0 \n\t" -+ "ldr %[ptr] , [%[c], %[ptr_off]] \n\t" -+ "lsl %[low] , #1 \n\t" -+#if !UNCHECKED_BITSTREAM_READER -+ "ldr %[tmp] , [%[c], %[end_off]] \n\t" -+#endif -+ "cmp %[low] , %[range], lsl #17 \n\t" -+ "itt cs \n\t" -+ "subcs %[low] , %[low], %[range], lsl #17 \n\t" -+ "movcs %[rv] , #1 \n\t" - #if UNCHECKED_BITSTREAM_READER -- "ldrh %[tmp] , [%[r_c]] \n\t" -- "add %[r_c] , %[r_c] , #2 \n\t" -- "str %[r_c] , [%[c], %[byte]] \n\t" --#else -- "ldr %[r_b] , [%[c], %[end]] \n\t" -- "ldrh %[tmp] , [%[r_c]] \n\t" -- "cmp %[r_c] , %[r_b] \n\t" -- "itt lt \n\t" -- "addlt %[r_c] , %[r_c] , #2 \n\t" -- "strlt %[r_c] , [%[c], %[byte]] \n\t" --#endif -- "sub %[r_c] , %[low] , #1 \n\t" -- "add %[r_b] , %[tables] , %[norm_off] \n\t" -- "eor %[r_c] , %[low] , %[r_c] \n\t" -- "rev %[tmp] , %[tmp] \n\t" -- "lsr %[r_c] , %[r_c] , #15 \n\t" -- "lsr %[tmp] , %[tmp] , #15 \n\t" -- "ldrb %[r_c] , [%[r_b], %[r_c]] \n\t" -- "movw %[r_b] , #0xFFFF \n\t" -- "sub %[tmp] , %[tmp] , %[r_b] \n\t" -- "rsb %[r_c] , %[r_c] , #7 \n\t" -- "lsl %[tmp] , %[tmp] , %[r_c] \n\t" -- "add %[low] , %[low] , %[tmp] \n\t" -- "2: \n\t" -- : [bit]"=&r"(bit), -- [low]"+&r"(c->low), -- [range]"+&r"(c->range), -- [r_b]"=&r"(reg_b), -- [r_c]"=&r"(reg_c), -- [tmp]"=&r"(tmp) -- : [c]"r"(c), -- [state]"r"(state), -- [tables]"r"(ff_h264_cabac_tables), -- [byte]"M"(offsetof(CABACContext, bytestream)), -- [end]"M"(offsetof(CABACContext, bytestream_end)), -- [norm_off]"I"(H264_NORM_SHIFT_OFFSET), -- [lps_off]"I"(H264_LPS_RANGE_OFFSET), -- [mlps_off]"I"(H264_MLPS_STATE_OFFSET + 128) -- : "memory", "cc" -- ); -+ "ldrh %[tmp] , [%[ptr]], #2 \n\t" -+#else -+ "cmp %[tmp] , %[ptr] \n\t" -+#if CONFIG_THUMB -+ "it cs \n\t" -+ "ldrhcs %[tmp] , [%[ptr]], #2 \n\t" -+#else -+ "ldrcsh %[tmp] , [%[ptr]], #2 \n\t" -+#endif -+#endif -+ "lsls %[range] , %[low], #16 \n\t" -+ "bne 1f \n\t" - -- return bit & 1; -+ "str %[ptr] , [%[c], %[ptr_off]] \n\t" -+ "rev %[tmp] , %[tmp] \n\t" -+ "add %[low] , %[low], %[tmp], lsr #15 \n\t" -+ "movw %[tmp] , 0xFFFF \n\t" -+ "sub %[low] , %[tmp] \n\t" -+ "1: \n\t" -+ "str %[low] , [%[c], %[low_off]] \n\t" -+ : // Outputs -+ [rv]"=&r"(rv), -+ [low]"+r"(low), -+ [range]"=&r"(range), -+ [ptr]"=&r"(ptr), -+ [tmp]"=&r"(tmp) -+ : // Inputs -+ [c]"r"(c), -+ [low_off]"J"(offsetof(CABACContext, low)), -+ [range_off]"J"(offsetof(CABACContext, range)), -+ [ptr_off]"J"(offsetof(CABACContext, bytestream)), -+ [end_off]"J"(offsetof(CABACContext, bytestream_end)) -+ : // Clobbers -+ "memory", "cc" -+ ); -+ return rv; - } -+ -+ -+#define get_cabac_bypass_sign get_cabac_bypass_sign_arm -+static inline int get_cabac_bypass_sign_arm(CABACContext * const c, int rv) -+{ -+ uint32_t low = c->low, range, ptr, tmp; -+ __asm volatile ( -+ "ldr %[range] , [%[c], %[range_off]] \n\t" -+ "ldr %[ptr] , [%[c], %[ptr_off]] \n\t" -+ "lsl %[low] , #1 \n\t" -+#if !UNCHECKED_BITSTREAM_READER -+ "ldr %[tmp] , [%[c], %[end_off]] \n\t" -+#endif -+ "cmp %[low] , %[range], lsl #17 \n\t" -+ "it cs \n\t" -+ "subcs %[low] , %[low], %[range], lsl #17 \n\t" -+ "it cc \n\t" -+ "rsbcc %[rv] , %[rv], #0 \n\t" -+#if UNCHECKED_BITSTREAM_READER -+ "ldrh %[tmp] , [%[ptr]], #2 \n\t" -+#else -+ "cmp %[tmp] , %[ptr] \n\t" -+#if CONFIG_THUMB -+ "it cs \n\t" -+ "ldrhcs %[tmp] , [%[ptr]], #2 \n\t" -+#else -+ "ldrcsh %[tmp] , [%[ptr]], #2 \n\t" -+#endif -+#endif -+ "lsls %[range] , %[low], #16 \n\t" -+ "bne 1f \n\t" -+ -+ "str %[ptr] , [%[c], %[ptr_off]] \n\t" -+ "rev %[tmp] , %[tmp] \n\t" -+ "add %[low] , %[low], %[tmp], lsr #15 \n\t" -+ "movw %[tmp] , 0xFFFF \n\t" -+ "sub %[low] , %[tmp] \n\t" -+ "1: \n\t" -+ "str %[low] , [%[c], %[low_off]] \n\t" -+ : // Outputs -+ [rv]"+r"(rv), -+ [low]"+r"(low), -+ [range]"=&r"(range), -+ [ptr]"=&r"(ptr), -+ [tmp]"=&r"(tmp) -+ : // Inputs -+ [c]"r"(c), -+ [low_off]"J"(offsetof(CABACContext, low)), -+ [range_off]"J"(offsetof(CABACContext, range)), -+ [ptr_off]"J"(offsetof(CABACContext, bytestream)), -+ [end_off]"J"(offsetof(CABACContext, bytestream_end)) -+ : // Clobbers -+ "memory", "cc" -+ ); -+ return rv; -+} -+ - #endif /* HAVE_ARMV6T2_INLINE */ - - #endif /* AVCODEC_ARM_CABAC_H */ ---- /dev/null -+++ b/libavcodec/arm/rpi_hevc_cabac.h -@@ -0,0 +1,607 @@ -+/* -+ * This file is part of FFmpeg. -+ * -+ * Copyright (C) 2018 John Cox, Ben Avison for Raspberry Pi (Trading) -+ * -+ * FFmpeg is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * FFmpeg is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with FFmpeg; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+ */ -+ -+#ifndef AVCODEC_ARM_HEVC_CABAC_H -+#define AVCODEC_ARM_HEVC_CABAC_H -+ -+#include "config.h" -+#if HAVE_ARMV6T2_INLINE -+ -+#define hevc_mem_bits32 hevc_mem_bits32_arm -+static inline uint32_t hevc_mem_bits32_arm(const void * p, const unsigned int bits) -+{ -+ unsigned int n; -+ __asm__ ( -+ "rev %[n], %[x] \n\t" -+ : [n]"=r"(n) -+ : [x]"r"(*(const uint32_t *)((const uint8_t *)p + (bits >> 3))) -+ : -+ ); -+ return n << (bits & 7); -+} -+ -+ -+// --------------------------------------------------------------------------- -+// -+// Helper fns - little bits of code where ARM has an instraction that the -+// compiler doesn't know about / use -+ -+#define trans_scale_sat trans_scale_sat_arm -+static inline int trans_scale_sat_arm(const int level, const unsigned int scale, const unsigned int scale_m, const unsigned int shift) -+{ -+ int rv; -+ int t = ((level * (int)(scale * scale_m)) >> shift) + 1; -+ -+ __asm__ ( -+ "ssat %[rv], #16, %[t], ASR #1 \n\t" -+ : [rv]"=r"(rv) -+ : [t]"r"(t) -+ : -+ ); -+ return rv; -+} -+ -+#define update_rice update_rice_arm -+static inline void update_rice_arm(uint8_t * const stat_coeff, -+ const unsigned int last_coeff_abs_level_remaining, -+ const unsigned int c_rice_param) -+{ -+ int t = last_coeff_abs_level_remaining << 1; -+ __asm__ ( -+ "lsrs %[t], %[t], %[shift] \n\t" -+ -+ "it eq \n\t" -+ "subeq %[stat], %[stat], #1 \n\t" -+ "cmp %[t], #6 \n\t" -+ "adc %[stat], %[stat], #0 \n\t" -+ "usat %[stat], #8, %[stat] \n\t" -+ : [stat]"+r"(*stat_coeff), -+ [t]"+r"(t) -+ : [shift]"r"(c_rice_param) -+ : "cc" -+ ); -+} -+ -+// --------------------------------------------------------------------------- -+// -+// CABAC get loops -+// -+// Where the loop is simple enough we can normally do 10-30% better than the -+// compiler -+ -+// Get the residual greater than 1 bits -+ -+#define get_cabac_greater1_bits get_cabac_greater1_bits_arm -+static inline unsigned int get_cabac_greater1_bits_arm(CABACContext * const c, const unsigned int n, -+ uint8_t * const state0) -+{ -+ unsigned int i, reg_b, st, tmp, bit, rv; -+ __asm__ ( -+ "mov %[i] , #0 \n\t" -+ "mov %[rv] , #0 \n\t" -+ "1: \n\t" -+ "add %[i] , %[i] , #1 \n\t" -+ "cmp %[rv] , #0 \n\t" -+ "ite eq \n\t" -+ "usateq %[st] , #2 , %[i] \n\t" -+ "movne %[st] , #0 \n\t" -+ "sub %[r_b] , %[mlps_tables], %[lps_off] \n\t" -+ "and %[tmp] , %[range] , #0xC0 \n\t" -+ -+ "ldrb %[bit] , [%[state0], %[st]] \n\t" -+ "add %[r_b] , %[r_b] , %[bit] \n\t" -+ "ldrb %[tmp] , [%[r_b], %[tmp], lsl #1] \n\t" -+ "sub %[range] , %[range] , %[tmp] \n\t" -+ -+ "cmp %[low] , %[range], lsl #17 \n\t" -+ "ittt ge \n\t" -+ "subge %[low] , %[low] , %[range], lsl #17 \n\t" -+ "movge %[range] , %[tmp] \n\t" -+ "mvnge %[bit] , %[bit] \n\t" -+ -+ "clz %[tmp] , %[range] \n\t" -+ "sub %[tmp] , #23 \n\t" -+ "ldrb %[r_b] , [%[mlps_tables], %[bit]] \n\t" -+ "and %[bit] , %[bit] , #1 \n\t" -+ "strb %[r_b] , [%[state0], %[st]] \n\t" -+ "lsl %[low] , %[low] , %[tmp] \n\t" -+ "orr %[rv] , %[bit] , %[rv], lsl #1 \n\t" -+ "lsl %[range] , %[range] , %[tmp] \n\t" -+ -+// There is a small speed gain from combining both conditions, using a single -+// branch and then working out what that meant later -+ "lsls %[tmp] , %[low] , #16 \n\t" -+ "it ne \n\t" -+ "cmpne %[n] , %[i] \n\t" -+ "bne 1b \n\t" -+ -+// If reload is not required then we must have run out of flags to decode -+ "tst %[tmp] , %[tmp] \n\t" -+ "bne 2f \n\t" -+ -+// Do reload -+ "ldrh %[tmp] , [%[bptr]] , #2 \n\t" -+ "rbit %[bit] , %[low] \n\t" -+ "movw %[r_b] , #0xFFFF \n\t" -+ "clz %[bit] , %[bit] \n\t" -+ "rev %[tmp] , %[tmp] \n\t" -+ "sub %[bit] , %[bit] , #16 \n\t" -+ "cmp %[n] , %[i] \n\t" -+ "rsb %[tmp] , %[r_b] , %[tmp], lsr #15 \n\t" -+ -+#if CONFIG_THUMB -+ "lsl %[tmp] , %[tmp] , %[bit] \n\t" -+ "add %[low] , %[low] , %[tmp] \n\t" -+#else -+ "add %[low] , %[low] , %[tmp], lsl %[bit] \n\t" -+#endif -+ -+ "bne 1b \n\t" -+ "2: \n\t" -+ : [bit]"=&r"(bit), -+ [low]"+r"(c->low), -+ [range]"+r"(c->range), -+ [r_b]"=&r"(reg_b), -+ [bptr]"+r"(c->bytestream), -+ [i]"=&r"(i), -+ [tmp]"=&r"(tmp), -+ [st]"=&r"(st), -+ [rv]"=&r"(rv) -+ : [state0]"r"(state0), -+ [n]"r"(n), -+ [mlps_tables]"r"(ff_h264_cabac_tables + H264_MLPS_STATE_OFFSET + 128), -+ [lps_off]"I"((H264_MLPS_STATE_OFFSET + 128) - H264_LPS_RANGE_OFFSET) -+ : "memory", "cc" -+ ); -+ return rv; -+} -+ -+ -+// n must be > 0 on entry -+#define get_cabac_sig_coeff_flag_idxs get_cabac_sig_coeff_flag_idxs_arm -+static inline uint8_t * get_cabac_sig_coeff_flag_idxs_arm(CABACContext * const c, uint8_t * const state0, -+ unsigned int n, -+ const uint8_t * ctx_map, -+ uint8_t * p) -+{ -+ unsigned int reg_b, tmp, st, bit; -+ __asm__ ( -+// Get bin from map -+#if CONFIG_THUMB -+ "add %[ctx_map] , %[n] \n\t" -+ "ldrb %[st] , [%[ctx_map]] \n\t" -+#else -+ "ldrb %[st] , [%[ctx_map], %[n]]! \n\t" -+#endif -+ "1: \n\t" -+ -+// Load state & ranges -+ "ldrb %[bit] , [%[state0], %[st]] \n\t" -+ "and %[tmp] , %[range] , #0xC0 \n\t" -+ "sub %[r_b] , %[mlps_tables], %[lps_off] \n\t" -+ "add %[r_b] , %[r_b] , %[tmp], lsl #1 \n\t" -+ "ldrb %[tmp] , [%[r_b], %[bit]] \n\t" -+ "sub %[range] , %[range] , %[tmp] \n\t" -+ -+ "cmp %[low] , %[range], lsl #17 \n\t" -+ "ittt ge \n\t" -+ "mvnge %[bit] , %[bit] \n\t" -+ "subge %[low] , %[low] , %[range], lsl #17 \n\t" -+ "movge %[range] , %[tmp] \n\t" -+ -+// Renorm -+ "clz %[tmp] , %[range] \n\t" -+ "ldrb %[r_b] , [%[mlps_tables], %[bit]] \n\t" -+ "sub %[tmp] , #23 \n\t" -+ "strb %[r_b] , [%[state0], %[st]] \n\t" -+ "tst %[bit] , #1 \n\t" -+ "ldrb %[st] , [%[ctx_map], #-1]! \n\t" -+ "lsl %[low] , %[low] , %[tmp] \n\t" -+// GCC asm seems to need strbne written differently for thumb and arm -+#if CONFIG_THUMB -+ "it ne \n\t" -+ "strbne %[n] , [%[idx]] , #1 \n\t" -+#else -+ "strneb %[n] , [%[idx]] , #1 \n\t" -+#endif -+ -+// There is a small speed gain from combining both conditions, using a single -+// branch and then working out what that meant later -+ "subs %[n] , %[n] , #1 \n\t" -+ "lsl %[range] , %[range] , %[tmp] \n\t" -+#if CONFIG_THUMB -+ "itt ne \n\t" -+ "lslsne %[tmp] , %[low] , #16 \n\t" -+#else -+ "lslnes %[tmp] , %[low] , #16 \n\t" -+#endif -+ "bne 1b \n\t" -+ -+// If we have bits left then n must be 0 so give up now -+ "lsls %[tmp] , %[low] , #16 \n\t" -+ "bne 2f \n\t" -+ -+// Do reload -+ "ldrh %[tmp] , [%[bptr]] , #2 \n\t" -+ "rbit %[bit] , %[low] \n\t" -+ "movw %[r_b] , #0xFFFF \n\t" -+ "clz %[bit] , %[bit] \n\t" -+ "cmp %[n] , #0 \n\t" -+ "rev %[tmp] , %[tmp] \n\t" -+ "sub %[bit] , %[bit] , #16 \n\t" -+ "rsb %[tmp] , %[r_b] , %[tmp], lsr #15 \n\t" -+ -+#if CONFIG_THUMB -+ "lsl %[tmp] , %[tmp] , %[bit] \n\t" -+ "add %[low] , %[low] , %[tmp] \n\t" -+#else -+ "add %[low] , %[low] , %[tmp], lsl %[bit] \n\t" -+#endif -+ -+// Check to see if we still have more to do -+ "bne 1b \n\t" -+ "2: \n\t" -+ : [bit]"=&r"(bit), -+ [low]"+r"(c->low), -+ [range]"+r"(c->range), -+ [r_b]"=&r"(reg_b), -+ [bptr]"+r"(c->bytestream), -+ [idx]"+r"(p), -+ [n]"+r"(n), -+ [tmp]"=&r"(tmp), -+ [st]"=&r"(st), -+ [ctx_map]"+r"(ctx_map) -+ : [state0]"r"(state0), -+ [mlps_tables]"r"(ff_h264_cabac_tables + H264_MLPS_STATE_OFFSET + 128), -+ [lps_off]"I"((H264_MLPS_STATE_OFFSET + 128) - H264_LPS_RANGE_OFFSET) -+ : "memory", "cc" -+ ); -+ -+ return p; -+} -+ -+// --------------------------------------------------------------------------- -+// -+// CABAC_BY22 functions -+ -+ -+#define get_cabac_by22_start get_cabac_by22_start_arm -+static inline void get_cabac_by22_start_arm(CABACContext * const c) -+{ -+ const uint8_t *ptr = c->bytestream; -+ register uint32_t low __asm__("r1"), range __asm__("r2"); -+ uint32_t m, range8, bits; -+#if !USE_BY22_DIV -+ uintptr_t inv; -+#endif -+ -+ av_assert2(offsetof (CABACContext, low) == 0); -+ av_assert2(offsetof (CABACContext, range) == 4); -+ av_assert2(offsetof (CABACContext, by22.range) == offsetof (CABACContext, by22.bits) + 2); -+ __asm__ volatile ( -+ "ldmia %[c], {%[low], %[range]} \n\t" -+ : // Outputs -+ [low]"=r"(low), -+ [range]"=r"(range) -+ : // Inputs -+ [c]"r"(c) -+ : // Clobbers -+ ); -+#if !USE_BY22_DIV -+ inv = (uintptr_t)cabac_by22_inv_range; -+#endif -+ __asm__ volatile ( -+ "ldr %[m], [%[ptr]], #-("AV_STRINGIFY(CABAC_BITS)"/8) \n\t" -+#if !USE_BY22_DIV -+ "uxtb %[range8], %[range] \n\t" -+#endif -+ "rbit %[bits], %[low] \n\t" -+ "lsl %[low], %[low], #22 - "AV_STRINGIFY(CABAC_BITS)" \n\t" -+ "clz %[bits], %[bits] \n\t" -+ "str %[ptr], [%[c], %[ptr_off]] \n\t" -+ "rev %[m], %[m] \n\t" -+ "rsb %[ptr], %[bits], #9 + "AV_STRINGIFY(CABAC_BITS)" \n\t" -+ "eor %[m], %[m], #0x80000000 \n\t" -+#if !USE_BY22_DIV -+ "ldr %[inv], [%[inv], %[range8], lsl #2] \n\t" -+ "pkhbt %[range], %[bits], %[range], lsl #16 \n\t" -+ "str %[range], [%[c], %[bits_off]] \n\t" -+#else -+ "strh %[bits], [%[c], %[bits_off]] \n\t" -+#endif -+#if CONFIG_THUMB -+ "lsr %[m], %[ptr] \n\t" -+ "eor %[range], %[low], %[m] \n\t" -+#else -+ "eor %[range], %[low], %[m], lsr %[ptr] \n\t" -+#endif -+ : // Outputs -+ [ptr]"+&r"(ptr), -+ [low]"+&r"(low), -+ [range]"+&r"(range), -+#if !USE_BY22_DIV -+ [inv]"+&r"(inv), -+#endif -+ [m]"=&r"(m), -+ [range8]"=&r"(range8), -+ [bits]"=&r"(bits) -+ : // Inputs -+ [c]"r"(c), -+ [bits_off]"J"(offsetof (CABACContext, by22.bits)), -+ [ptr_off]"J"(offsetof (CABACContext, bytestream)) -+ : // Clobbers -+ "memory" -+ ); -+ c->low = range; -+#if !USE_BY22_DIV -+ c->range = inv; -+#endif -+} -+ -+#define get_cabac_by22_peek get_cabac_by22_peek_arm -+static inline uint32_t get_cabac_by22_peek_arm(const CABACContext *const c) -+{ -+ uint32_t rv = c->low &~ 1, tmp; -+ __asm__ ( -+ "cmp %[inv] , #0 \n\t" -+ "it ne \n\t" -+ "umullne %[tmp] , %[rv] , %[inv], %[rv] \n\t" -+ : // Outputs -+ [rv]"+r"(rv), -+ [tmp]"=r"(tmp) -+ : // Inputs -+ [inv]"r"(c->range) -+ : // Clobbers -+ "cc" -+ ); -+ return rv << 1; -+} -+ -+#define get_cabac_by22_flush get_cabac_by22_flush_arm -+static inline void get_cabac_by22_flush_arm(CABACContext *const c, const unsigned int n, uint32_t val) -+{ -+ uint32_t bits, ptr, tmp1, tmp2; -+ __asm__ volatile ( -+ "ldrh %[bits], [%[cc], %[bits_off]] \n\t" -+ "ldr %[ptr], [%[cc], %[ptr_off]] \n\t" -+ "rsb %[tmp1], %[n], #32 \n\t" -+ "add %[bits], %[bits], %[n] \n\t" -+ "ldrh %[tmp2], [%[cc], %[range_off]] \n\t" -+ "lsr %[tmp1], %[val], %[tmp1] \n\t" -+ "ldr %[val], [%[cc], %[low_off]] \n\t" -+#if CONFIG_THUMB -+ "add %[ptr], %[ptr], %[bits], lsr #3 \n\t" -+ "ldr %[ptr], [%[ptr]] \n\t" -+#else -+ "ldr %[ptr], [%[ptr], %[bits], lsr #3] \n\t" -+#endif -+ "mul %[tmp1], %[tmp2], %[tmp1] \n\t" -+ "and %[tmp2], %[bits], #7 \n\t" -+ "strh %[bits], [%[cc], %[bits_off]] \n\t" -+ "rev %[ptr], %[ptr] \n\t" -+ "lsl %[tmp1], %[tmp1], #23 \n\t" -+#if CONFIG_THUMB -+ "lsl %[val], %[n] \n\t" -+ "sub %[val], %[tmp1] \n\t" -+#else -+ "rsb %[val], %[tmp1], %[val], lsl %[n] \n\t" -+#endif -+ "lsl %[ptr], %[ptr], %[tmp2] \n\t" -+ "orr %[val], %[val], %[ptr], lsr #9 \n\t" -+ "str %[val], [%[cc], %[low_off]] \n\t" -+ : // Outputs -+ [val]"+r"(val), -+ [bits]"=&r"(bits), -+ [ptr]"=&r"(ptr), -+ [tmp1]"=&r"(tmp1), -+ [tmp2]"=&r"(tmp2) -+ : // Inputs -+ [cc]"r"(c), -+ [n]"r"(n), -+ [bits_off]"J"(offsetof(CABACContext, by22.bits)), -+ [ptr_off]"J"(offsetof(CABACContext, bytestream)), -+ [range_off]"J"(offsetof(CABACContext, by22.range)), -+ [low_off]"J"(offsetof(CABACContext, low)) -+ : // Clobbers -+ "memory" -+ ); -+} -+ -+#define coeff_abs_level_remaining_decode_bypass coeff_abs_level_remaining_decode_bypass_arm -+static inline int coeff_abs_level_remaining_decode_bypass_arm(CABACContext *const c, unsigned int rice_param) -+{ -+ uint32_t last_coeff_abs_level_remaining; -+ uint32_t prefix, n1, range, n2, ptr, tmp1, tmp2; -+ __asm__ volatile ( -+ "ldr %[remain], [%[cc], %[low_off]] \n\t" -+ "ldr %[prefix], [%[cc], %[range_off]] \n\t" -+ "bic %[remain], %[remain], #1 \n\t" -+ "ldrh %[tmp2], [%[cc], %[by22_bits_off]] \n\t" -+ "ldr %[ptr], [%[cc], %[ptr_off]] \n\t" -+ "cmp %[prefix], #0 \n\t" -+ "it ne \n\t" -+ "umullne %[prefix], %[remain], %[prefix], %[remain] \n\t" -+ "ldrh %[range], [%[cc], %[by22_range_off]] \n\t" -+ "lsl %[remain], %[remain], #1 \n\t" -+ "mvn %[prefix], %[remain] \n\t" -+ "clz %[prefix], %[prefix] \n\t" -+ "rsbs %[n1], %[prefix], #2 \n\t" -+ "bcc 1f \n\t" -+ "adc %[n1], %[rice], %[prefix] \n\t" -+ "add %[tmp2], %[tmp2], %[n1] \n\t" -+ "rsb %[n2], %[n1], #32 \n\t" -+ "and %[tmp1], %[tmp2], #7 \n\t" -+ "strh %[tmp2], [%[cc], %[by22_bits_off]] \n\t" -+ "lsr %[tmp2], %[tmp2], #3 \n\t" -+ "lsr %[n2], %[remain], %[n2] \n\t" -+ "mul %[n2], %[range], %[n2] \n\t" -+ "ldr %[range], [%[cc], %[low_off]] \n\t" -+ "ldr %[ptr], [%[ptr], %[tmp2]] \n\t" -+ "rsb %[tmp2], %[rice], #31 \n\t" -+ "lsl %[remain], %[remain], %[prefix] \n\t" -+ "lsl %[n2], %[n2], #23 \n\t" -+#if CONFIG_THUMB -+ "lsl %[range], %[n1] \n\t" -+ "sub %[range], %[n2] \n\t" -+#else -+ "rsb %[range], %[n2], %[range], lsl %[n1] \n\t" -+#endif -+ "rev %[ptr], %[ptr] \n\t" -+ "lsl %[n2], %[prefix], %[rice] \n\t" -+#if CONFIG_THUMB -+ "lsr %[remain], %[tmp2] \n\t" -+ "add %[remain], %[n2] \n\t" -+#else -+ "add %[remain], %[n2], %[remain], lsr %[tmp2] \n\t" -+#endif -+ "b 3f \n\t" -+ "1: \n\t" -+ "add %[n2], %[rice], %[prefix], lsl #1 \n\t" -+ "cmp %[n2], %[peek_bits_plus_2] \n\t" -+ "bhi 2f \n\t" -+ "sub %[n1], %[n2], #2 \n\t" -+ "add %[tmp2], %[tmp2], %[n1] \n\t" -+ "rsb %[n2], %[n1], #32 \n\t" -+ "strh %[tmp2], [%[cc], %[by22_bits_off]] \n\t" -+ "lsr %[tmp1], %[tmp2], #3 \n\t" -+ "lsr %[n2], %[remain], %[n2] \n\t" -+ "mul %[n2], %[range], %[n2] \n\t" -+ "rsb %[range], %[rice], #34 \n\t" -+ "ldr %[ptr], [%[ptr], %[tmp1]] \n\t" -+ "and %[tmp1], %[tmp2], #7 \n\t" -+ "lsl %[remain], %[remain], %[prefix] \n\t" -+ "ldr %[tmp2], [%[cc], %[low_off]] \n\t" -+ "rsb %[prefix], %[prefix], %[range] \n\t" -+ "orr %[remain], %[remain], #0x80000000 \n\t" -+ "rev %[ptr], %[ptr] \n\t" -+ "lsl %[n2], %[n2], #23 \n\t" -+ "mov %[range], #2 \n\t" -+#if CONFIG_THUMB -+ "lsl %[tmp2], %[n1] \n\t" -+ "sub %[tmp2], %[n2] \n\t" -+#else -+ "rsb %[tmp2], %[n2], %[tmp2], lsl %[n1] \n\t" -+#endif -+ "lsl %[ptr], %[ptr], %[tmp1] \n\t" -+ "lsl %[rice], %[range], %[rice] \n\t" -+ "orr %[range], %[tmp2], %[ptr], lsr #9 \n\t" -+#if CONFIG_THUMB -+ "lsr %[remain], %[prefix] \n\t" -+ "add %[remain], %[rice] \n\t" -+#else -+ "add %[remain], %[rice], %[remain], lsr %[prefix] \n\t" -+#endif -+ "b 4f \n\t" -+ "2: \n\t" -+ "add %[n1], %[tmp2], %[prefix] \n\t" -+#if CONFIG_THUMB -+ "add %[tmp2], %[ptr], %[n1], lsr #3 \n\t" -+ "ldr %[tmp2], [%[tmp2]] \n\t" -+#else -+ "ldr %[tmp2], [%[ptr], %[n1], lsr #3] \n\t" -+#endif -+ "rsb %[tmp1], %[prefix], #32 \n\t" -+ "push {%[rice]} \n\t" -+ "and %[rice], %[n1], #7 \n\t" -+ "lsr %[tmp1], %[remain], %[tmp1] \n\t" -+ "ldr %[ptr], [%[cc], %[low_off]] \n\t" -+ "mul %[remain], %[range], %[tmp1] \n\t" -+ "rev %[tmp2], %[tmp2] \n\t" -+ "rsb %[n2], %[prefix], %[n2] \n\t" -+ "ldr %[tmp1], [%[cc], %[range_off]] \n\t" -+ "lsl %[rice], %[tmp2], %[rice] \n\t" -+ "sub %[tmp2], %[n2], #2 \n\t" -+ "lsl %[remain], %[remain], #23 \n\t" -+#if CONFIG_THUMB -+ "lsl %[ptr], %[prefix] \n\t" -+ "rsb %[remain], %[ptr] \n\t" -+#else -+ "rsb %[remain], %[remain], %[ptr], lsl %[prefix] \n\t" -+#endif -+ "orr %[remain], %[remain], %[rice], lsr #9 \n\t" -+ "add %[prefix], %[n1], %[tmp2] \n\t" -+ "bic %[n1], %[remain], #1 \n\t" -+ "ldr %[ptr], [%[cc], %[ptr_off]] \n\t" -+ "cmp %[tmp1], #0 \n\t" -+ "rsb %[rice], %[tmp2], #32 \n\t" -+ "it ne \n\t" -+ "umullne %[tmp1], %[n1], %[tmp1], %[n1] \n\t" -+ "and %[tmp1], %[prefix], #7 \n\t" -+#if CONFIG_THUMB -+ "add %[ptr], %[ptr], %[prefix], lsr #3 \n\t" -+ "ldr %[ptr], [%[ptr]] \n\t" -+#else -+ "ldr %[ptr], [%[ptr], %[prefix], lsr #3] \n\t" -+#endif -+ "lsl %[n1], %[n1], #1 \n\t" -+ "lsr %[rice], %[n1], %[rice] \n\t" -+ "rsb %[n2], %[n2], #34 \n\t" -+ "mul %[range], %[range], %[rice] \n\t" -+ "pop {%[rice]} \n\t" -+ "rev %[ptr], %[ptr] \n\t" -+ "orr %[n1], %[n1], #0x80000000 \n\t" -+ "strh %[prefix], [%[cc], %[by22_bits_off]] \n\t" -+ "mov %[prefix], #2 \n\t" -+ "lsl %[range], %[range], #23 \n\t" -+#if CONFIG_THUMB -+ "lsl %[remain], %[tmp2] \n\t" -+ "rsb %[range], %[remain] \n\t" -+#else -+ "rsb %[range], %[range], %[remain], lsl %[tmp2] \n\t" -+#endif -+ "lsl %[remain], %[prefix], %[rice] \n\t" -+#if CONFIG_THUMB -+ "lsr %[n1], %[n2] \n\t" -+ "add %[remain], %[n1] \n\t" -+#else -+ "add %[remain], %[remain], %[n1], lsr %[n2] \n\t" -+#endif -+ "3: \n\t" -+ "lsl %[ptr], %[ptr], %[tmp1] \n\t" -+ "orr %[range], %[range], %[ptr], lsr #9 \n\t" -+ "4: \n\t" -+ "str %[range], [%[cc], %[low_off]] \n\t" -+ : // Outputs -+ [remain]"=&r"(last_coeff_abs_level_remaining), -+ [rice]"+r"(rice_param), -+ [prefix]"=&r"(prefix), -+ [n1]"=&r"(n1), -+ [range]"=&r"(range), -+ [n2]"=&r"(n2), -+ [ptr]"=&r"(ptr), -+ [tmp1]"=&r"(tmp1), -+ [tmp2]"=&r"(tmp2) -+ : // Inputs -+ [cc]"r"(c), -+ [peek_bits_plus_2]"I"(CABAC_BY22_PEEK_BITS + 2), -+ [low_off]"J"(offsetof(CABACContext, low)), -+ [range_off]"J"(offsetof(CABACContext, range)), -+ [by22_bits_off]"J"(offsetof(CABACContext, by22.bits)), -+ [by22_range_off]"J"(offsetof(CABACContext, by22.range)), -+ [ptr_off]"J"(offsetof(CABACContext, bytestream)) -+ : // Clobbers -+ "cc", "memory" -+ ); -+ return last_coeff_abs_level_remaining; -+} -+ -+#endif /* HAVE_ARMV6T2_INLINE */ -+ -+#endif /* AVCODEC_ARM_HEVC_CABAC_H */ ---- /dev/null -+++ b/libavcodec/arm/rpi_hevc_idct_fn_neon.S -@@ -0,0 +1,183 @@ -+/* -+ * ARM NEON optimised IDCT functions for HEVC decoding -+ * Copyright (c) 2014 Seppo Tomperi -+ * Copyright (C) 2018 John Cox, ben Avison for Raspberry Pi (Trading) -+ * -+ * This file is part of FFmpeg. -+ * -+ * FFmpeg is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * FFmpeg is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with FFmpeg; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+ */ -+ -+@ Included multiple times from hevc_idct_neon.S -+@ Macros defined there -+ -+#define DC_SHIFT (15 - BIT_DEPTH) -+#define DC_ADD (1 | (1 << (14 - BIT_DEPTH))) -+#define TRN_SHIFT (20 - BIT_DEPTH) -+ -+function JOIN(ff_hevc_rpi_idct_4x4_dc_neon_, BIT_DEPTH), export=1 -+ ldrsh r1, [r0] -+ add r1, #DC_ADD -+ asr r1, #DC_SHIFT -+ vdup.16 q0, r1 -+ vdup.16 q1, r1 -+ vst1.16 {q0, q1}, [r0] -+ bx lr -+endfunc -+ -+function JOIN(ff_hevc_rpi_idct_8x8_dc_neon_, BIT_DEPTH), export=1 -+ ldrsh r1, [r0] -+ add r2, r0, #32 -+ mov r3, #64 -+ add r1, #DC_ADD -+ asr r1, #DC_SHIFT -+ vdup.16 q8, r1 -+ vdup.16 q9, r1 -+ vst1.16 {q8, q9}, [r0], r3 -+ vst1.16 {q8, q9}, [r2], r3 -+ vst1.16 {q8, q9}, [r0] -+ vst1.16 {q8, q9}, [r2] -+ bx lr -+endfunc -+ -+function JOIN(ff_hevc_rpi_idct_16x16_dc_neon_, BIT_DEPTH), export=1 -+ ldrsh r1, [r0] -+ add r2, r0, #32 -+ mov r3, #64 -+ add r1, #DC_ADD -+ mov ip, #16*16 -+ asr r1, #DC_SHIFT -+ vdup.16 q8, r1 -+ vdup.16 q9, r1 -+1: vst1.16 {q8, q9}, [r0], r3 -+ subs ip, ip, #32 -+ vst1.16 {q8, q9}, [r2], r3 -+ bhi 1b -+ bx lr -+endfunc -+ -+function JOIN(ff_hevc_rpi_idct_32x32_dc_neon_, BIT_DEPTH), export=1 -+ ldrsh r1, [r0] -+ add r2, r0, #32 -+ mov r3, #64 -+ add r1, #DC_ADD -+ mov ip, #32*32 -+ asr r1, #DC_SHIFT -+ vdup.16 q8, r1 -+ vdup.16 q9, r1 -+1: vst1.16 {q8, q9}, [r0], r3 -+ subs ip, ip, #32 -+ vst1.16 {q8, q9}, [r2], r3 -+ bhi 1b -+ bx lr -+endfunc -+ -+ -+function JOIN(ff_hevc_rpi_transform_4x4_neon_, BIT_DEPTH), export=1 -+ vldr.i32 s0, =0x00240053 // 36 and 83 -+ vld1.16 {q14, q15}, [r0 :256] // coeffs -+ -+ tr4_shift #7 -+ -+ vzip.16 d28, d29 -+ vzip.16 d30, d31 -+ vzip.32 q14, q15 -+ -+ tr4_shift #TRN_SHIFT -+ -+ vst4.16 {q14, q15}, [r0 :256] -+ bx lr -+ -+ .ltorg -+endfunc -+ -+ -+ -+function JOIN(ff_hevc_rpi_transform_luma_4x4_neon_, BIT_DEPTH), export=1 -+ vmov.i32 d0, #0x4a // 74 -+ vld1.16 {q14, q15}, [r0 :256] // coeffs -+ vmov.i32 d1, #0x1d // 29 -+ vmov.i32 d2, #0x37 // 55 -+ -+ tr4_luma_shift #7 -+ -+ vzip.16 d28, d29 -+ vzip.16 d30, d31 -+ vzip.32 q14, q15 -+ -+ tr4_luma_shift #TRN_SHIFT -+ -+ vst4.16 {q14, q15}, [r0 :256] -+ bx lr -+endfunc -+ -+function JOIN(ff_hevc_rpi_transform_8x8_neon_, BIT_DEPTH), export=1 -+ add r2, r0, #16 -+ adr r3, tr4f -+ vpush {d8-d15} -+ vld1.16 {d0, d1}, [r3] -+ mov r3, #32 -+ -+ tr8_vert d16, d17, d18, d19, d24, d25, d26, d27, q8, q9, \ -+ "sub r0, r0, #128-8", \ -+ "sub r2, r2, #128-8", \ -+ "cmp r1, #4" -+ ble 2f -+ -+ tr8_vert d20, d21, d22, d23, d28, d29, d30, d31, q10, q11, \ -+ "sub r0, r0, #128+8", \ -+ "sub r2, r2, #128+8+16-32", \ -+ "mov r3, #64" -+ -+ vzip.16 d16, d17 -+ vzip.16 d18, d19 -+ -+ vzip.16 d20, d21 -+ vzip.16 d22, d23 -+ vzip.16 d28, d29 -+ vzip.16 d30, d31 -+ vzip.32 q10, q11 -+ vzip.32 q14, q15 -+1: -+ vzip.16 d24, d25 -+ vzip.16 d26, d27 -+ vzip.32 q8, q9 -+ vzip.32 q12, q13 -+ -+ tr8_horiz d16, d17, d18, d19, d20, d21, d22, d23, q8, q9, TRN_SHIFT -+ tr8_horiz d24, d25, d26, d27, d28, d29, d30, d31, q12, q13, TRN_SHIFT -+ -+ vpop {d8-d15} -+ bx lr -+ -+2: vmov.i64 q10, #0 -+ sub r0, r0, #8 -+ vmov.i64 q11, #0 -+ sub r2, r2, #8+16-32 -+ vmov.i64 q14, #0 -+ mov r3, #64 -+ vmov.i64 q15, #0 -+ -+ vzip.16 d16, d17 -+ vzip.16 d18, d19 -+ -+ b 1b -+ -+endfunc -+ -+#undef DC_SHIFT -+#undef DC_ADD -+#undef TRN_SHIFT -+ ---- /dev/null -+++ b/libavcodec/arm/rpi_hevc_misc_neon.S -@@ -0,0 +1,267 @@ -+/* -+Copyright (c) 2017 Raspberry Pi (Trading) Ltd. -+All rights reserved. -+ -+Redistribution and use in source and binary forms, with or without -+modification, are permitted provided that the following conditions are met: -+ * Redistributions of source code must retain the above copyright -+ notice, this list of conditions and the following disclaimer. -+ * Redistributions in binary form must reproduce the above copyright -+ notice, this list of conditions and the following disclaimer in the -+ documentation and/or other materials provided with the distribution. -+ * Neither the name of the copyright holder nor the -+ names of its contributors may be used to endorse or promote products -+ derived from this software without specific prior written permission. -+ -+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ -+Written by John Cox, Ben Avison -+*/ -+ -+#include "libavutil/arm/asm.S" -+#include "neon.S" -+ -+@ rpi_zap_coeff_vals_neon( -+@ uint16_t * buf, [r0] -+@ unsigned int log_n_m2) [r1] -+ -+function rpi_zap_coeff_vals_neon, export=1 -+ mov ip, #1 -+ vmov.i64 q0, #0 -+ teq r1, #0 -+ vmov.i64 q1, #0 -+ beq 2f -+ -+ lsl ip, r1 @ 2, 4 or 8 -+ add r2, r0, #32 -+ lsl ip, r1 @ 4, 16 or 64 = number of 32-byte blocks to zero -+ mov r3, #64 -+1: vst1.8 {q0,q1}, [r0:256], r3 -+ subs ip, #2 -+ vst1.8 {q0,q1}, [r2:256], r3 -+ bne 1b -+ bx lr -+ -+2: vst1.8 {q0,q1}, [r0:256] -+ bx lr -+endfunc -+ -+@ PIC jump tables are more expensive than absolute for A32 code -+.set jent_pic, CONFIG_PIC || CONFIG_THUMB -+ -+@ Jump table entry - if in neon mode the bottom bit must be set -+@ ? There is probably a real asm instruction to do this but I haven't found it -+.macro jent lab -+.if jent_pic -+T .short ((0 + \lab) - (0 + 98b)) / 2 -+A .short (0 + \lab) - (4 + 98b) -+.else -+T .word 1 + \lab -+A .word \lab -+.endif -+.endm -+ -+.set expected_next, 0 -+ -+.macro cpy_compound val, p1, p2, drop_thru=0 -+.if \p1 + \p2 != \val -+.error "Bad addition! \p1 + \p2 != \val" -+.endif -+.if expected_next != 0 && expected_next != \val -+.error "Drop thru failure" -+.endif -+\val\(): -+ push {r0-r3} -+ bl 100\p1\()b -+ pop {r0-r3} -+ add r0, #\p1 -+ add r2, #\p1 -+.if \drop_thru == 0 -+ b \p2\()b -+.set expected_next, 0 -+.else -+.set expected_next, \p2 -+.endif -+.endm -+ -+@ ff_hevc_cpy_blks8x4_neon( -+@ dst [r0] -+@ dst_stride [r1] -+@ src [r2] -+@ src_stride [r3] -+@ width [sp, #0] (bytes) -+@ height) [sp, #4] -+@ -+@ Power of 2 widths are directly coded, all others are done in stripes -+@ We expect the vast majority of calls to be power of 2 -+@ -+@ Currently has min width of 8, but we could make that 4 without issue -+@ Min height is 4 -+ -+function ff_hevc_rpi_cpy_blks8x4_neon, export=1 -+ ldr r12, [sp, #0] -+ push {r11, lr} -+.if jent_pic -+A adr lr, 98f - 2 -+.else -+A adr lr, 98f - 4 -+.endif -+ lsr r12, #3 -+ ldr r11, [sp, #(8 + 4)] -+.if jent_pic -+A lsl r12, #1 -+A ldrsh lr, [lr, r12] -+A add pc, lr -+T tbh [pc, r12, lsl #1] -+.else -+ @ A32 only, Thumb is always PIC -+ ldr pc, [lr, r12, lsl #2] -+.endif -+ -+98: -+T .short 0 @ unused -+ jent 8f -+ jent 16f -+ jent 24f -+ jent 32f -+ jent 40f -+ jent 48f -+ jent 56f -+ jent 64f -+ jent 72f -+ jent 80f -+ jent 88f -+ jent 96f -+ jent 104f -+ jent 112f -+ jent 120f -+ jent 128f -+ -+1008: -+ push {r11, lr} -+8: -+ add lr, r2, r3 -+ lsl r3, #1 -+ add r12, r0, r1 -+ lsl r1, #1 -+1: -+ vld1.32 {d0 }, [r2], r3 -+ vld1.32 {d1 }, [lr], r3 -+ vld1.32 {d2 }, [r2], r3 -+ vld1.32 {d3 }, [lr], r3 -+ subs r11, #4 -+ vst1.32 {d0 }, [r0], r1 -+ vst1.32 {d1 }, [r12], r1 -+ vst1.32 {d2 }, [r0], r1 -+ vst1.32 {d3 }, [r12], r1 -+ bgt 1b -+ pop {r11, pc} -+ -+10016: -+ push {r11, lr} -+16: -+ add lr, r2, r3 -+ lsl r3, #1 -+ add r12, r0, r1 -+ lsl r1, #1 -+1: -+ vld1.32 {q0 }, [r2], r3 -+ vld1.32 {q1 }, [lr], r3 -+ vld1.32 {q2 }, [r2], r3 -+ vld1.32 {q3 }, [lr], r3 -+ subs r11, #4 -+ vst1.32 {q0 }, [r0], r1 -+ vst1.32 {q1 }, [r12], r1 -+ vst1.32 {q2 }, [r0], r1 -+ vst1.32 {q3 }, [r12], r1 -+ bgt 1b -+ pop {r11, pc} -+ -+10032: -+ push {r11, lr} -+32: -+ add lr, r2, r3 -+ lsl r3, #1 -+ add r12, r0, r1 -+ lsl r1, #1 -+1: -+ vld1.32 {q8, q9 }, [r2], r3 -+ vld1.32 {q10, q11}, [lr], r3 -+ vld1.32 {q12, q13}, [r2], r3 -+ vld1.32 {q14, q15}, [lr], r3 -+ subs r11, #4 -+ vst1.32 {q8, q9 }, [r0], r1 -+ vst1.32 {q10, q11}, [r12], r1 -+ vst1.32 {q12, q13}, [r0], r1 -+ vst1.32 {q14, q15}, [r12], r1 -+ bgt 1b -+ pop {r11, pc} -+ -+10064: -+ push {r11, lr} -+64: -+ add lr, r2, #32 -+ add r12, r0, #32 -+1: -+ vld1.32 {q8, q9 }, [r2], r3 -+ vld1.32 {q10, q11}, [lr], r3 -+ vld1.32 {q12, q13}, [r2], r3 -+ vld1.32 {q14, q15}, [lr], r3 -+ subs r11, #2 -+ vst1.32 {q8, q9 }, [r0], r1 -+ vst1.32 {q10, q11}, [r12], r1 -+ vst1.32 {q12, q13}, [r0], r1 -+ vst1.32 {q14, q15}, [r12], r1 -+ bgt 1b -+ pop {r11, pc} -+ -+128: -+ push {r4, r5} -+ @ We could do this with fewer registers if we jump around but I -+ @ have a primative urge to load sequentially -+ mov r4, #64 -+ add lr, r2, #32 -+ add r12, r0, #32 -+ sub r3, r4 -+ sub r1, r4 -+1: -+ vld1.32 {q8, q9 }, [r2], r4 -+ vld1.32 {q10, q11}, [lr], r4 -+ vld1.32 {q12, q13}, [r2], r3 -+ vld1.32 {q14, q15}, [lr], r3 -+ subs r11, #1 -+ vst1.32 {q8, q9 }, [r0], r4 -+ vst1.32 {q10, q11}, [r12], r4 -+ vst1.32 {q12, q13}, [r0], r1 -+ vst1.32 {q14, q15}, [r12], r1 -+ bgt 1b -+ pop {r4, r5, r11, pc} -+ -+@ Use drop_thru where we can -+cpy_compound 104, 64, 40, 1 -+cpy_compound 40, 32, 8 -+ -+cpy_compound 112, 64, 48, 1 -+cpy_compound 48, 32, 16 -+ -+cpy_compound 120, 64, 56, 1 -+cpy_compound 56, 32, 24, 1 -+cpy_compound 24, 16, 8 -+ -+cpy_compound 72, 64, 8 -+cpy_compound 80, 64, 16 -+cpy_compound 88, 64, 24 -+cpy_compound 96, 64, 32 -+ -+ -+endfunc -+ ---- /dev/null -+++ b/libavcodec/arm/rpi_hevc_misc_neon.h -@@ -0,0 +1,438 @@ -+/* -+ * This file is part of FFmpeg. -+ * -+ * FFmpeg is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * FFmpeg is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with FFmpeg; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+ */ -+ -+#ifndef AVCODEC_ARM_RPI_HEVC_MISC_H -+#define AVCODEC_ARM_RPI_HEVC_MISC_H -+ -+#include "config.h" -+#if HAVE_NEON_INLINE && !CONFIG_THUMB -+ -+static av_noinline void ff_hevc_rpi_copy_vert_v2h_neon(uint8_t *dst, const uint8_t *src, -+ int pixel_shift, int height, -+ ptrdiff_t stride_src) -+{ -+ const uint8_t *src2 = src + stride_src; -+ stride_src <<= 1; -+ switch (pixel_shift) -+ { -+ case 2: -+ __asm__ volatile ( -+ "vld1.32 {d0[0]}, [%[src]], %[stride_src] \n\t" -+ "vld1.32 {d0[1]}, [%[src2]], %[stride_src] \n\t" -+ "vld1.32 {d1[0]}, [%[src]], %[stride_src] \n\t" -+ "subs %[height], #4 \n\t" -+ "vld1.32 {d1[1]}, [%[src2]], %[stride_src] \n\t" -+ "beq 2f \n\t" -+ "1: \n\t" -+ "vld1.32 {d2[0]}, [%[src]], %[stride_src] \n\t" -+ "vld1.32 {d2[1]}, [%[src2]], %[stride_src] \n\t" -+ "vld1.32 {d3[0]}, [%[src]], %[stride_src] \n\t" -+ "vld1.32 {d3[1]}, [%[src2]], %[stride_src] \n\t" -+ "subs %[height], #4 \n\t" -+ "vst1.32 {q0}, [%[dst]]! \n\t" -+ "beq 3f \n\t" -+ "vld1.32 {d0[0]}, [%[src]], %[stride_src] \n\t" -+ "vld1.32 {d0[1]}, [%[src2]], %[stride_src] \n\t" -+ "vld1.32 {d1[0]}, [%[src]], %[stride_src] \n\t" -+ "vld1.32 {d1[1]}, [%[src2]], %[stride_src] \n\t" -+ "subs %[height], #4 \n\t" -+ "vst1.32 {q1}, [%[dst]]! \n\t" -+ "bne 1b \n\t" -+ "2: \n\t" -+ "vst1.32 {q0}, [%[dst]] \n\t" -+ "b 4f \n\t" -+ "3: \n\t" -+ "vst1.32 {q1}, [%[dst]] \n\t" -+ "4: \n\t" -+ : // Outputs -+ [src]"+r"(src), -+ [src2]"+r"(src2), -+ [dst]"+r"(dst), -+ [height]"+r"(height) -+ : // Inputs -+ [stride_src]"r"(stride_src) -+ : // Clobbers -+ "cc", "memory" -+ ); -+ break; -+ case 1: -+ __asm__ volatile ( -+ "vld1.16 {d0[0]}, [%[src]], %[stride_src] \n\t" -+ "vld1.16 {d1[0]}, [%[src2]], %[stride_src] \n\t" -+ "vld1.16 {d0[1]}, [%[src]], %[stride_src] \n\t" -+ "subs %[height], #4 \n\t" -+ "vld1.16 {d1[1]}, [%[src2]], %[stride_src] \n\t" -+ "beq 2f \n\t" -+ "1: \n\t" -+ "vld1.16 {d2[0]}, [%[src]], %[stride_src] \n\t" -+ "vld1.16 {d3[0]}, [%[src2]], %[stride_src] \n\t" -+ "vld1.16 {d2[1]}, [%[src]], %[stride_src] \n\t" -+ "vld1.16 {d3[1]}, [%[src2]], %[stride_src] \n\t" -+ "vzip.16 d0, d1 \n\t" -+ "subs %[height], #4 \n\t" -+ "vst1.16 {d0}, [%[dst]]! \n\t" -+ "beq 3f \n\t" -+ "vld1.16 {d0[0]}, [%[src]], %[stride_src] \n\t" -+ "vld1.16 {d1[0]}, [%[src2]], %[stride_src] \n\t" -+ "vld1.16 {d0[1]}, [%[src]], %[stride_src] \n\t" -+ "vld1.16 {d1[1]}, [%[src2]], %[stride_src] \n\t" -+ "vzip.16 d2, d3 \n\t" -+ "subs %[height], #4 \n\t" -+ "vst1.16 {d2}, [%[dst]]! \n\t" -+ "bne 1b \n\t" -+ "2: \n\t" -+ "vzip.16 d0, d1 \n\t" -+ "vst1.16 {d0}, [%[dst]] \n\t" -+ "b 4f \n\t" -+ "3: \n\t" -+ "vzip.16 d2, d3 \n\t" -+ "vst1.16 {d2}, [%[dst]] \n\t" -+ "4: \n\t" -+ : // Outputs -+ [src]"+r"(src), -+ [src2]"+r"(src2), -+ [dst]"+r"(dst), -+ [height]"+r"(height) -+ : // Inputs -+ [stride_src]"r"(stride_src) -+ : // Clobbers -+ "cc", "memory" -+ ); -+ break; -+ default: -+ __asm__ volatile ( -+ "vld1.8 {d0[0]}, [%[src]], %[stride_src] \n\t" -+ "vld1.8 {d1[0]}, [%[src2]], %[stride_src] \n\t" -+ "vld1.8 {d0[1]}, [%[src]], %[stride_src] \n\t" -+ "vld1.8 {d1[1]}, [%[src2]], %[stride_src] \n\t" -+ "vld1.8 {d0[2]}, [%[src]], %[stride_src] \n\t" -+ "vld1.8 {d1[2]}, [%[src2]], %[stride_src] \n\t" -+ "vld1.8 {d0[3]}, [%[src]], %[stride_src] \n\t" -+ "subs %[height], #8 \n\t" -+ "vld1.8 {d1[3]}, [%[src2]], %[stride_src] \n\t" -+ "beq 2f \n\t" -+ "1: \n\t" -+ "vld1.8 {d2[0]}, [%[src]], %[stride_src] \n\t" -+ "vld1.8 {d3[0]}, [%[src2]], %[stride_src] \n\t" -+ "vld1.8 {d2[1]}, [%[src]], %[stride_src] \n\t" -+ "vld1.8 {d3[1]}, [%[src2]], %[stride_src] \n\t" -+ "vld1.8 {d2[2]}, [%[src]], %[stride_src] \n\t" -+ "vld1.8 {d3[2]}, [%[src2]], %[stride_src] \n\t" -+ "vld1.8 {d2[3]}, [%[src]], %[stride_src] \n\t" -+ "vld1.8 {d3[3]}, [%[src2]], %[stride_src] \n\t" -+ "vzip.8 d0, d1 \n\t" -+ "subs %[height], #8 \n\t" -+ "vst1.8 {d0}, [%[dst]]! \n\t" -+ "beq 3f \n\t" -+ "vld1.8 {d0[0]}, [%[src]], %[stride_src] \n\t" -+ "vld1.8 {d1[0]}, [%[src2]], %[stride_src] \n\t" -+ "vld1.8 {d0[1]}, [%[src]], %[stride_src] \n\t" -+ "vld1.8 {d1[1]}, [%[src2]], %[stride_src] \n\t" -+ "vld1.8 {d0[2]}, [%[src]], %[stride_src] \n\t" -+ "vld1.8 {d1[2]}, [%[src2]], %[stride_src] \n\t" -+ "vld1.8 {d0[3]}, [%[src]], %[stride_src] \n\t" -+ "vld1.8 {d1[3]}, [%[src2]], %[stride_src] \n\t" -+ "vzip.8 d2, d3 \n\t" -+ "subs %[height], #8 \n\t" -+ "vst1.8 {d2}, [%[dst]]! \n\t" -+ "bne 1b \n\t" -+ "2: \n\t" -+ "vzip.8 d0, d1 \n\t" -+ "vst1.8 {d0}, [%[dst]] \n\t" -+ "b 4f \n\t" -+ "3: \n\t" -+ "vzip.8 d2, d3 \n\t" -+ "vst1.8 {d2}, [%[dst]] \n\t" -+ "4: \n\t" -+ : // Outputs -+ [src]"+r"(src), -+ [src2]"+r"(src2), -+ [dst]"+r"(dst), -+ [height]"+r"(height) -+ : // Inputs -+ [stride_src]"r"(stride_src) -+ : // Clobbers -+ "cc", "memory" -+ ); -+ break; -+ } -+} -+ -+static av_noinline void ff_hevc_rpi_copy_vert_h2v_neon(uint8_t *dst, const uint8_t *src, -+ int pixel_shift, int height, -+ ptrdiff_t stride_dst) -+{ -+ uint8_t *dst2 = dst + stride_dst; -+ stride_dst <<= 1; -+ switch (pixel_shift) -+ { -+ case 2: -+ __asm__ volatile ( -+ "subs %[height], #4 \n\t" -+ "vld1.32 {q0}, [%[src]]! \n\t" -+ "beq 2f \n\t" -+ "1: \n\t" -+ "vld1.32 {q1}, [%[src]]! \n\t" -+ "vst1.32 {d0[0]}, [%[dst]], %[stride_dst] \n\t" -+ "vst1.32 {d0[1]}, [%[dst2]], %[stride_dst] \n\t" -+ "vst1.32 {d1[0]}, [%[dst]], %[stride_dst] \n\t" -+ "subs %[height], #4 \n\t" -+ "vst1.32 {d1[1]}, [%[dst2]], %[stride_dst] \n\t" -+ "beq 3f \n\t" -+ "vld1.32 {q0}, [%[src]]! \n\t" -+ "vst1.32 {d2[0]}, [%[dst]], %[stride_dst] \n\t" -+ "vst1.32 {d2[1]}, [%[dst2]], %[stride_dst] \n\t" -+ "vst1.32 {d3[0]}, [%[dst]], %[stride_dst] \n\t" -+ "subs %[height], #4 \n\t" -+ "vst1.32 {d3[1]}, [%[dst2]], %[stride_dst] \n\t" -+ "bne 1b \n\t" -+ "2: \n\t" -+ "vst1.32 {d0[0]}, [%[dst]], %[stride_dst] \n\t" -+ "vst1.32 {d0[1]}, [%[dst2]], %[stride_dst] \n\t" -+ "vst1.32 {d1[0]}, [%[dst]] \n\t" -+ "vst1.32 {d1[1]}, [%[dst2]] \n\t" -+ "b 4f \n\t" -+ "3: \n\t" -+ "vst1.32 {d2[0]}, [%[dst]], %[stride_dst] \n\t" -+ "vst1.32 {d2[1]}, [%[dst2]], %[stride_dst] \n\t" -+ "vst1.32 {d3[0]}, [%[dst]] \n\t" -+ "vst1.32 {d3[1]}, [%[dst2]] \n\t" -+ "4: \n\t" -+ : // Outputs -+ [dst]"+r"(dst), -+ [dst2]"+r"(dst2), -+ [src]"+r"(src), -+ [height]"+r"(height) -+ : // Inputs -+ [stride_dst]"r"(stride_dst) -+ : // Clobbers -+ "cc", "memory" -+ ); -+ break; -+ case 1: -+ __asm__ volatile ( -+ "subs %[height], #4 \n\t" -+ "vld1.16 {d0}, [%[src]]! \n\t" -+ "beq 2f \n\t" -+ "1: \n\t" -+ "vld1.16 {d2}, [%[src]]! \n\t" -+ "vst1.16 {d0[0]}, [%[dst]], %[stride_dst] \n\t" -+ "vst1.16 {d0[1]}, [%[dst2]], %[stride_dst] \n\t" -+ "vst1.16 {d0[2]}, [%[dst]], %[stride_dst] \n\t" -+ "subs %[height], #4 \n\t" -+ "vst1.16 {d0[3]}, [%[dst2]], %[stride_dst] \n\t" -+ "beq 3f \n\t" -+ "vld1.16 {d0}, [%[src]]! \n\t" -+ "vst1.16 {d2[0]}, [%[dst]], %[stride_dst] \n\t" -+ "vst1.16 {d2[1]}, [%[dst2]], %[stride_dst] \n\t" -+ "vst1.16 {d2[2]}, [%[dst]], %[stride_dst] \n\t" -+ "subs %[height], #4 \n\t" -+ "vst1.16 {d2[3]}, [%[dst2]], %[stride_dst] \n\t" -+ "bne 1b \n\t" -+ "2: \n\t" -+ "vst1.16 {d0[0]}, [%[dst]], %[stride_dst] \n\t" -+ "vst1.16 {d0[1]}, [%[dst2]], %[stride_dst] \n\t" -+ "vst1.16 {d0[2]}, [%[dst]] \n\t" -+ "vst1.16 {d0[3]}, [%[dst2]] \n\t" -+ "b 4f \n\t" -+ "3: \n\t" -+ "vst1.16 {d2[0]}, [%[dst]], %[stride_dst] \n\t" -+ "vst1.16 {d2[1]}, [%[dst2]], %[stride_dst] \n\t" -+ "vst1.16 {d2[2]}, [%[dst]] \n\t" -+ "vst1.16 {d2[3]}, [%[dst2]] \n\t" -+ "4: \n\t" -+ : // Outputs -+ [dst]"+r"(dst), -+ [dst2]"+r"(dst2), -+ [src]"+r"(src), -+ [height]"+r"(height) -+ : // Inputs -+ [stride_dst]"r"(stride_dst) -+ : // Clobbers -+ "cc", "memory" -+ ); -+ break; -+ default: -+ __asm__ volatile ( -+ "subs %[height], #8 \n\t" -+ "vld1.8 {d0}, [%[src]]! \n\t" -+ "beq 2f \n\t" -+ "1: \n\t" -+ "vld1.8 {d2}, [%[src]]! \n\t" -+ "vst1.8 {d0[0]}, [%[dst]], %[stride_dst] \n\t" -+ "vst1.8 {d0[1]}, [%[dst2]], %[stride_dst] \n\t" -+ "vst1.8 {d0[2]}, [%[dst]], %[stride_dst] \n\t" -+ "vst1.8 {d0[3]}, [%[dst2]], %[stride_dst] \n\t" -+ "vst1.8 {d0[4]}, [%[dst]], %[stride_dst] \n\t" -+ "vst1.8 {d0[5]}, [%[dst2]], %[stride_dst] \n\t" -+ "vst1.8 {d0[6]}, [%[dst]], %[stride_dst] \n\t" -+ "subs %[height], #8 \n\t" -+ "vst1.8 {d0[7]}, [%[dst2]], %[stride_dst] \n\t" -+ "beq 3f \n\t" -+ "vld1.8 {d0}, [%[src]]! \n\t" -+ "vst1.8 {d2[0]}, [%[dst]], %[stride_dst] \n\t" -+ "vst1.8 {d2[1]}, [%[dst2]], %[stride_dst] \n\t" -+ "vst1.8 {d2[2]}, [%[dst]], %[stride_dst] \n\t" -+ "vst1.8 {d2[3]}, [%[dst2]], %[stride_dst] \n\t" -+ "vst1.8 {d2[4]}, [%[dst]], %[stride_dst] \n\t" -+ "vst1.8 {d2[5]}, [%[dst2]], %[stride_dst] \n\t" -+ "vst1.8 {d2[6]}, [%[dst]], %[stride_dst] \n\t" -+ "subs %[height], #8 \n\t" -+ "vst1.8 {d2[7]}, [%[dst2]], %[stride_dst] \n\t" -+ "bne 1b \n\t" -+ "2: \n\t" -+ "vst1.8 {d0[0]}, [%[dst]], %[stride_dst] \n\t" -+ "vst1.8 {d0[1]}, [%[dst2]], %[stride_dst] \n\t" -+ "vst1.8 {d0[2]}, [%[dst]], %[stride_dst] \n\t" -+ "vst1.8 {d0[3]}, [%[dst2]], %[stride_dst] \n\t" -+ "vst1.8 {d0[4]}, [%[dst]], %[stride_dst] \n\t" -+ "vst1.8 {d0[5]}, [%[dst2]], %[stride_dst] \n\t" -+ "vst1.8 {d0[6]}, [%[dst]] \n\t" -+ "vst1.8 {d0[7]}, [%[dst2]] \n\t" -+ "b 4f \n\t" -+ "3: \n\t" -+ "vst1.8 {d2[0]}, [%[dst]], %[stride_dst] \n\t" -+ "vst1.8 {d2[1]}, [%[dst2]], %[stride_dst] \n\t" -+ "vst1.8 {d2[2]}, [%[dst]], %[stride_dst] \n\t" -+ "vst1.8 {d2[3]}, [%[dst2]], %[stride_dst] \n\t" -+ "vst1.8 {d2[4]}, [%[dst]], %[stride_dst] \n\t" -+ "vst1.8 {d2[5]}, [%[dst2]], %[stride_dst] \n\t" -+ "vst1.8 {d2[6]}, [%[dst]] \n\t" -+ "vst1.8 {d2[7]}, [%[dst2]] \n\t" -+ "4: \n\t" -+ : // Outputs -+ [dst]"+r"(dst), -+ [dst2]"+r"(dst2), -+ [src]"+r"(src), -+ [height]"+r"(height) -+ : // Inputs -+ [stride_dst]"r"(stride_dst) -+ : // Clobbers -+ "cc", "memory" -+ ); -+ break; -+ } -+} -+ -+static av_noinline void ff_hevc_rpi_copy_vert_v2v_neon(uint8_t *dst, const uint8_t *src, -+ int pixel_shift, int height, -+ ptrdiff_t stride_dst, ptrdiff_t stride_src) -+{ -+ int x, y; -+ switch (pixel_shift) -+ { -+ case 2: -+ __asm__ volatile ( -+ "ldr %[x], [%[src]], %[stride_src] \n\t" -+ "ldr %[y], [%[src]], %[stride_src] \n\t" -+ "str %[x], [%[dst]], %[stride_dst] \n\t" -+ "sub %[height], #2 \n\t" -+ "1: \n\t" -+ "ldr %[x], [%[src]], %[stride_src] \n\t" -+ "str %[y], [%[dst]], %[stride_dst] \n\t" -+ "ldr %[y], [%[src]], %[stride_src] \n\t" -+ "subs %[height], #2 \n\t" -+ "str %[x], [%[dst]], %[stride_dst] \n\t" -+ "bne 1b \n\t" -+ "str %[y], [%[dst]] \n\t" -+ : // Outputs -+ [x]"=&r"(x), -+ [y]"=&r"(y), -+ [src]"+r"(src), -+ [dst]"+r"(dst), -+ [height]"+r"(height) -+ : // Inputs -+ [stride_src]"r"(stride_src), -+ [stride_dst]"r"(stride_dst) -+ : // Clobbers -+ "cc", "memory" -+ ); -+ break; -+ case 1: -+ __asm__ volatile ( -+ "ldrh %[x], [%[src]], %[stride_src] \n\t" -+ "ldrh %[y], [%[src]], %[stride_src] \n\t" -+ "strh %[x], [%[dst]], %[stride_dst] \n\t" -+ "sub %[height], #2 \n\t" -+ "1: \n\t" -+ "ldrh %[x], [%[src]], %[stride_src] \n\t" -+ "strh %[y], [%[dst]], %[stride_dst] \n\t" -+ "ldrh %[y], [%[src]], %[stride_src] \n\t" -+ "subs %[height], #2 \n\t" -+ "strh %[x], [%[dst]], %[stride_dst] \n\t" -+ "bne 1b \n\t" -+ "strh %[y], [%[dst]] \n\t" -+ : // Outputs -+ [x]"=&r"(x), -+ [y]"=&r"(y), -+ [src]"+r"(src), -+ [dst]"+r"(dst), -+ [height]"+r"(height) -+ : // Inputs -+ [stride_src]"r"(stride_src), -+ [stride_dst]"r"(stride_dst) -+ : // Clobbers -+ "cc", "memory" -+ ); -+ break; -+ default: -+ __asm__ volatile ( -+ "ldrb %[x], [%[src]], %[stride_src] \n\t" -+ "ldrb %[y], [%[src]], %[stride_src] \n\t" -+ "strb %[x], [%[dst]], %[stride_dst] \n\t" -+ "sub %[height], #2 \n\t" -+ "1: \n\t" -+ "ldrb %[x], [%[src]], %[stride_src] \n\t" -+ "strb %[y], [%[dst]], %[stride_dst] \n\t" -+ "ldrb %[y], [%[src]], %[stride_src] \n\t" -+ "subs %[height], #2 \n\t" -+ "strb %[x], [%[dst]], %[stride_dst] \n\t" -+ "bne 1b \n\t" -+ "strb %[y], [%[dst]] \n\t" -+ : // Outputs -+ [x]"=&r"(x), -+ [y]"=&r"(y), -+ [src]"+r"(src), -+ [dst]"+r"(dst), -+ [height]"+r"(height) -+ : // Inputs -+ [stride_src]"r"(stride_src), -+ [stride_dst]"r"(stride_dst) -+ : // Clobbers -+ "cc", "memory" -+ ); -+ break; -+ } -+} -+ -+#define ff_hevc_rpi_copy_vert ff_hevc_rpi_copy_vert_neon -+static inline void ff_hevc_rpi_copy_vert_neon(uint8_t *dst, const uint8_t *src, -+ int pixel_shift, int height, -+ ptrdiff_t stride_dst, ptrdiff_t stride_src) -+{ -+ if (stride_dst == 1 << pixel_shift) -+ ff_hevc_rpi_copy_vert_v2h_neon(dst, src, pixel_shift, height, stride_src); -+ else if (stride_src == 1 << pixel_shift) -+ ff_hevc_rpi_copy_vert_h2v_neon(dst, src, pixel_shift, height, stride_dst); -+ else -+ ff_hevc_rpi_copy_vert_v2v_neon(dst, src, pixel_shift, height, stride_dst, stride_src); -+} -+ -+#endif /* HAVE_NEON_INLINE */ -+ -+#endif /* AVCODEC_ARM_RPI_HEVC_MISC_H */ ---- /dev/null -+++ b/libavcodec/arm/rpi_hevc_mv_arm.h -@@ -0,0 +1,93 @@ -+/* -+Copyright (c) 2017 Raspberry Pi (Trading) Ltd. -+All rights reserved. -+ -+Redistribution and use in source and binary forms, with or without -+modification, are permitted provided that the following conditions are met: -+ * Redistributions of source code must retain the above copyright -+ notice, this list of conditions and the following disclaimer. -+ * Redistributions in binary form must reproduce the above copyright -+ notice, this list of conditions and the following disclaimer in the -+ documentation and/or other materials provided with the distribution. -+ * Neither the name of the copyright holder nor the -+ names of its contributors may be used to endorse or promote products -+ derived from this software without specific prior written permission. -+ -+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ -+Written by John Cox, Ben Avison -+*/ -+ -+#ifndef AVCODEC_ARM_RPI_HEVC_MV_H -+#define AVCODEC_ARM_RPI_HEVC_MV_H -+ -+#if HAVE_ARMV6T2_INLINE -+static inline MvXY mvxy_add_arm(const MvXY a, const MvXY b) -+{ -+ MvXY r; -+ __asm__ ( -+ "sadd16 %[r], %[a], %[b] \n\t" -+ : [r]"=r"(r) -+ : [a]"r"(a), -+ [b]"r"(b) -+ : -+ ); -+ return r; -+} -+#define mvxy_add mvxy_add_arm -+#endif -+ -+#if HAVE_ARMV6T2_INLINE -+#if (defined(__ARM_ARCH_EXT_IDIV__) || defined (__ARM_FEATURE_IDIV)) -+static inline int32_t mv_scale_xy_arm(int32_t xy, int td, int tb) -+{ -+ int t; -+ __asm__ ( -+ "ssat %[td], #8, %[td] \n\t" -+ "ssat %[tb], #8, %[tb] \n\t" -+ "eor %[t], %[td], %[td], asr #31 \n\t" -+ "adds %[t], %[t], %[td], lsr #31 \n\t" -+ "asr %[t], #1 \n\t" -+ "add %[t], #0x4000 \n\t" -+ "it ne \n\t" -+ "sdivne %[t], %[t], %[td] \n\t" -+ "mov %[td], #32 \n\t" -+ "smlabb %[td], %[t], %[tb], %[td] \n\t" -+ "ssat %[td], #13, %[td], asr #6 \n\t" -+ "mov %[tb], #127 \n\t" -+ "smlatb %[t], %[xy], %[td], %[tb] \n\t" -+ "smlabb %[tb], %[xy], %[td], %[tb] \n\t" -+// This takes the sign of x & y for rounding at the "wrong" point -+// (i.e. after adding 127) but for the range of values (-1,-127) -+// where it does the wrong thing you get the right answer (0) anyway -+ "add %[t], %[t], %[t], lsr #31 \n\t" -+ "add %[xy], %[tb], %[tb], lsr #31 \n\t" -+ "ssat %[t], #16, %[t], asr #8 \n\t" -+ "ssat %[xy], #16, %[xy], asr #8 \n\t" -+ "pkhbt %[xy], %[xy], %[t], lsl #16 \n\t" -+ : -+ [t]"=&r"(t), -+ [xy]"+r"(xy), -+ [td]"+r"(td), -+ [tb]"+r"(tb) -+ : -+ : -+ "cc" -+ ); -+ return xy; -+} -+#define mv_scale_xy mv_scale_xy_arm -+#endif -+#endif -+ -+#endif // AVCODEC_ARM_RPI_HEVC_MV_H -+ ---- /dev/null -+++ b/libavcodec/arm/rpi_hevcdsp_arm.h -@@ -0,0 +1,26 @@ -+/* -+ * This file is part of FFmpeg. -+ * -+ * FFmpeg is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * FFmpeg is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with FFmpeg; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+ */ -+ -+#ifndef AVCODEC_ARM_HEVCDSP_ARM_H -+#define AVCODEC_ARM_HEVCDSP_ARM_H -+ -+#include "libavcodec/rpi_hevcdsp.h" -+ -+void ff_hevcdsp_rpi_init_neon(HEVCDSPContext *c, const int bit_depth); -+ -+#endif /* AVCODEC_ARM_HEVCDSP_ARM_H */ ---- /dev/null -+++ b/libavcodec/arm/rpi_hevcdsp_deblock_neon.S -@@ -0,0 +1,1634 @@ -+/* -+ * Copyright (c) 2014 Seppo Tomperi -+ * Copyright (C) 2018 John Cox, Ben Avison for Raspberry Pi (Trading) -+ * -+ * This file is part of FFmpeg. -+ * -+ * FFmpeg is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * FFmpeg is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with FFmpeg; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1 -+ */ -+ -+ -+#include "libavutil/arm/asm.S" -+#include "neon.S" -+ -+.macro hevc_loop_filter_uv_body1 P1a, P0a, Q0a, Q1a, I1, I2, I3, I4, I5, I6, I7, I8 -+ vsubl.u8 q0, \Q0a, \P0a -+ vsubl.u8 q1, \P1a, \Q1a -+ vdup.16 d4, r2 -+ \I1 -+ vshl.i16 q0, #2 -+ \I2 -+ vadd.i16 q0, q1 -+ \I3 -+ vmovl.u8 q2, d4 -+ \I4 -+ vneg.s16 q1, q2 -+ \I5 -+ vrshr.s16 q0, #3 -+ \I6 -+ \I7 -+ \I8 -+ vmin.s16 q0, q2 -+ vmovl.u8 q2, \Q0a -+ vmax.s16 q0, q1 -+ vaddw.u8 q1, q0, \P0a -+ vsub.i16 q0, q2, q0 -+ vqmovun.s16 \P0a, q1 -+ vqmovun.s16 \Q0a, q0 -+.endm -+ -+ -+.macro hevc_loop_filter_uv_body2 P1a, P1b, P0a, P0b, Q0a, Q0b, Q1a, Q1b, I1, I2, I3, I4, I5, I6, I7 -+ vsubl.u8 q0, \Q0a, \P0a @ q0a - p0a -+ lsr r12, r2, #16 -+ vsubl.u8 q1, \Q0b, \P0b @ q0b - p0b -+ vsubl.u8 q2, \P1a, \Q1a @ p1a - q1a -+ vsubl.u8 q3, \P1b, \Q1b @ p1b - q1b -+ vshl.i16 q0, #2 @ (q0a - p0a) * 4 -+ vshl.i16 q1, #2 @ (q0b - p0b) * 4 -+ vadd.i16 q0, q2 @ ((q0a - p0a) * 4) + p1a - q1a -+ vadd.i16 q1, q3 @ ((q0b - p0b) * 4) + p1b - q1b -+ vdup.16 d4, r2 @ tc0a, tc0b -+ vdup.16 d6, r12 @ tc1a, tc1b -+ vrshr.s16 q0, #3 @ (((q0a - p0a) * 4) + p1a - q1a + 4) >> 3 -+ \I1 -+ vrshr.s16 q1, #3 @ (((q0b - p0b) * 4) + p1b - q1b + 4) >> 3 -+ \I2 -+ vmovl.u8 q2, d4 @ tc0a, tc0b -+ \I3 -+ vmovl.u8 q3, d6 @ tc1a, tc1b -+ \I4 -+ vmin.s16 q0, q2 -+ \I5 -+ vneg.s16 q2, q2 @ -tc0a, -tc0b -+ \I6 -+ vmin.s16 q1, q3 -+ \I7 -+ vneg.s16 q3, q3 @ -tc1a, -tc1b -+ vmax.s16 q0, q2 @ delta0a -+ vmovl.u8 q2, \Q0a -+ vmax.s16 q1, q3 @ delta0b -+ vaddw.u8 q3, q0, \P0a @ p0a + delta0a -+ vsub.i16 q0, q2, q0 @ q0a - delta0a -+ vmovl.u8 q2, \Q0b -+ vsub.i16 q2, q1 @ q0b - delta0b -+ vaddw.u8 q1, \P0b @ p0b + delta0b -+ vqmovun.s16 \Q0a, q0 -+ vqmovun.s16 \P0a, q3 -+ vqmovun.s16 \Q0b, q2 -+ vqmovun.s16 \P0b, q1 -+.endm -+ -+ -+@ Preserves r12 -+@ Clobbers r2 -+@ P0a et al all contain UVUVUVUV -+@ r2 (tc4) contains -+@ [0..7] tc U a -+@ [8..15] tc V a -+ -+.macro hevc_loop_filter_uv_body1_16 P1a, P0a, Q0a, Q1a, bit_depth, I1, I2, I3, I4, I5, I6, I7, I8 -+ vsub.i16 q0, \Q0a, \P0a -+ vsub.i16 q1, \P1a, \Q1a -+ vdup.16 d4, r2 -+ \I1 -+ vshl.i16 q0, #2 -+ \I2 -+ vadd.i16 q0, q1 -+ \I3 -+ vshll.u8 q2, d4, #\bit_depth - 8 -+ \I4 -+ vneg.s16 q1, q2 -+ \I5 -+ vrshr.s16 q0, #3 -+ \I6 -+ \I7 -+ \I8 -+ vmin.s16 q0, q2 -+ vmov.i16 q2, #0 -+ vmax.s16 q0, q1 -+ vadd.i16 \P0a, q0 -+ vsub.i16 \Q0a, q0 -+ vmov.i16 q1, #(1 << \bit_depth) - 1 -+ vmax.s16 \P0a, q2 -+ vmax.s16 \Q0a, q2 -+ vmin.s16 \P0a, q1 -+ vmin.s16 \Q0a, q1 -+.endm -+ -+@ Clobbers r2, r12 -+@ P0a et al all contain UVUVUVUV -+@ r2 (tc4) contains -+@ [0..7] tc U a -+@ [8..15] tc V a -+@ [16..23] tc U b -+@ [24..31] tc V b -+ -+.macro hevc_loop_filter_uv_body2_16 P1a, P1b, P0a, P0b, Q0a, Q0b, Q1a, Q1b, bit_depth, I1, I2, I3, I4, I5, I6, I7 -+ vsub.i16 q0, \Q0a, \P0a @ q0a - p0a -+ lsr r12, r2, #16 -+ vsub.i16 q1, \Q0b, \P0b @ q0b - p0b -+ vsub.i16 q2, \P1a, \Q1a @ p1a - q1a -+ vsub.i16 q3, \P1b, \Q1b @ p1b - q1b -+ vshl.i16 q0, #2 @ (q0a - p0a) * 4 -+ vshl.i16 q1, #2 @ (q0b - p0b) * 4 -+ vadd.i16 q0, q2 @ ((q0a - p0a) * 4) + p1a - q1a -+ vadd.i16 q1, q3 @ ((q0b - p0b) * 4) + p1b - q1b -+ vdup.16 d4, r2 @ tc0a, tc0b -+ vdup.16 d6, r12 @ tc1a, tc1b -+ vrshr.s16 q0, #3 @ (((q0a - p0a) * 4) + p1a - q1a + 4) >> 3 -+ \I1 -+ vrshr.s16 q1, #3 @ (((q0b - p0b) * 4) + p1b - q1b + 4) >> 3 -+ \I2 -+ vshll.u8 q2, d4, #\bit_depth - 8 @ tc0a, tc0b -+ \I3 -+ vshll.u8 q3, d6, #\bit_depth - 8 @ tc1a, tc1b -+ \I4 -+ vmin.s16 q0, q2 -+ \I5 -+ vneg.s16 q2, q2 @ -tc0a, -tc0b -+ \I6 -+ vmin.s16 q1, q3 -+ \I7 -+ vneg.s16 q3, q3 @ -tc1a, -tc1b -+ vmax.s16 q0, q2 @ delta0a -+ vadd.i16 \P0a, q0 @ p0a + delta0a -+ vsub.i16 \Q0a, q0 @ q0a - delta0a -+ vmax.s16 q1, q3 @ delta0b -+ vadd.i16 \P0b, q1 @ p0b + delta0b -+ vsub.i16 \Q0b, q1 @ q0b - delta0b -+ vmov.i16 q2, #0 -+ vmov.i16 q3, #(1 << \bit_depth) - 1 -+ vmax.s16 \P0a, q2 -+ vmax.s16 \Q0a, q2 -+ vmax.s16 \P0b, q2 -+ vmax.s16 \Q0b, q2 -+ vmin.s16 \P0a, q3 -+ vmin.s16 \Q0a, q3 -+ vmin.s16 \P0b, q3 -+ vmin.s16 \Q0b, q3 -+.endm -+ -+ -+ -+@ uint8_t *_no_p, [sp+0] -+@ uint8_t *_no_q) [sp+4] -+ -+.macro hevc_loop_filter_luma_start -+ ldr r12, [r3] -+ ldr r3, [r3, #4] -+ orrs r3, r12, r3, lsl #16 -+ it eq -+ bxeq lr -+ push {r4-r10,lr} @ 32 bytes -+ ldrd r4, r5, [sp, #32] @ &_no_p -+ ldrb r4, [r4] -+ ldrb r5, [r5] -+ movs r10, r4 -+ it ne -+ movne r10, #1 -+ cmp r5, #0 -+ it ne -+ orrne r10, #2 -+.endm -+ -+@ Input: -+@ r2 beta (raw: needs shift for bitdepth > 8) -+@ r3[ 0:15] tc[0] (raw: needs shift for bitdepth > 8) -+@ r3[16:31] tc[1] (raw: needs shift for bitdepth > 8) -+@ -+@ Input & output -+@ 8-bit: d16-d23 (Q3,Q2,Q1,Q0,P0,P1,P2,P3) -+@ 16-bit: q8-q15 -+@ -+@ r1 -r1 -+@ r10 b1->C, b0->N (r10 junk) -+@ -+@ Junks: -+@ r5, r6, r7, r8, r9 -+ -+.macro m_filter_luma bit_depth, Q11, Q15 -+.if \bit_depth == 8 -+ vmovl.u8 q14, d22 @ q2,7 q2,6 ... q2,0 = TQ2' ... Q2' TQ2 ... Q2 -+ vmovl.u8 q13, d21 @ q1,7 q1,6 ... q1,0 = TQ1' ... Q1' TQ1 ... Q1 -+ vmovl.u8 q12, d20 @ q0,7 q0,6 ... q0,0 = TQ0' ... Q0' TQ0 ... Q0 -+ vmovl.u8 \Q11, d19 @ p0,7 p0,6 ... p0,0 = TP0' ... P0' TP0 ... P0 -+ vmovl.u8 q10, d18 @ p1,7 p1,6 ... p1,0 = TP1' ... P1' TP1 ... P1 -+ vmovl.u8 q9, d17 @ p2,7 p2,6 ... p2,0 = TP2' ... P2' TP2 ... P2 -+.endif -+ vadd.i16 q0, q9, \Q11 @ P2 + P0 -+.if \bit_depth > 8 -+ lsl r3, r3, #(\bit_depth - 8) -+.endif -+ vadd.i16 q1, q14, q12 @ Q2 + Q0 -+.if \bit_depth > 8 -+ lsl r2, r2, #(\bit_depth - 8) -+.endif -+ vsub.i16 q0, q10 @ P2 - P1 + P0 -+ lsr r5, r3, #16 -+ vsub.i16 q1, q13 @ Q2 - Q1 + Q0 -+.if \bit_depth == 8 -+ vmovl.u8 q8, d16 @ p3,7 p3,6 ... p3,0 = TP3' ... P3' TP3 ... P3 -+ vmovl.u8 \Q15, d23 @ q3,7 q3,6 ... q3,0 = TQ3' ... Q3' TQ3 ... Q3 -+.endif -+ vabd.s16 q0, q10 @ dp0 = abs(P2 - 2 * P1 + P0) -+ vabd.s16 q1, q13 @ dq0 = abs(Q2 - 2 * Q1 + Q0) -+ vmov.i64 q2, #0xffffffff0000 -+ vbic q0, q2 @ only dp0(') and dp3(') -+ vbic q1, q2 @ only dq0(') and dq3(') -+ vsra.u64 q0, #16 -+ vsra.u64 q1, #16 -+ vdup.16 q3, r2 @ beta -+ vdup.16 d14, r3 @ tC[0] -+ vdup.16 d15, r5 @ tC[1] -+ vabd.s16 q4, q8, \Q11 @ abs(TP3'-TP0' ... P3'-P0' TP3-TP0 ... P3-P0) -+ vmovn.i32 d0, q0 @ dp3' dp0' dp3 dp0 -+ vmovn.i32 d1, q1 @ dq3' dq0' dq3 dq0 -+ vadd.i16 d5, d0, d1 @ d3'=dp3'+dq3' d0'=dp0'+dq0' d3=dp3+dq3 d0=dp0+dq0 -+ vabd.s16 q5, \Q11, q12 @ abs(TP0'-TQ0' ... P0'-Q0' TP0-TQ0 ... P0-Q0) -+ vaba.s16 q4, \Q15, q12 @ +abs(TQ3'-TQ0' ... Q3'-Q0' TQ3-TQ0 ... Q3-Q0) -+ vpadd.i16 d2, d5, d5 @ dontcare dontcare d0'+d3' d0+d3 -+ vshl.s16 q6, q7, #2 @ tC[] * 4 -+ vrhadd.s16 q6, q7 @ tc25 = (tc[] * 5 + 1) >> 1 -+ vcgt.s16 d2, d6, d2 @ if (d0 + d3 < beta) -+ vmov r7, s4 @ (d2) r7 = mask of blocks to apply filtering (16b/block) -+ vshr.s16 q1, q3, #3 @ beta_3 = beta >> 3 -+ cmp r7, #0 -+ beq .Lbypasswrite -+ -+ vcgt.s16 q5, q6, q5 @ if < tc25 -+ vcgt.s16 q4, q1, q4 @ if (abs({T}P[0-3]{'}-{T}P[0-3]{'})+abs({T}Q[0-3]{'}-{T}Q[0-3]{'}) < beta_3) -+ vand q4, q5 -+ vbic d8, d4 -+ vbic d9, d4 -+ vshr.s16 q3, #2 @ beta_2 = beta >> 2 -+ vsra.u64 q4, #16 -+ vshl.s16 d5, #1 @ d3'<<1 d0'<<1 d3<<1 d0<<1 -+ vshl.i16 q7, #1 @ tc2 = tC[] << 1 -+ vcgt.s16 d6, d5 @ if (d3'<<1 < beta_2) etc -+ vmovn.i32 d8, q4 @ beta_3 && tc25 tests, prime block in ms half -+ vand d6, d8 @ && beta_2 tests, prime in ms half -+ vpadd.i16 d0, d1 @ dq0'+dq3' dq0+dq3 dp0'+dp3' dp0+dp3 -+ vneg.s16 q6, q7 @ -tc2 -+ vmovn.i32 d8, q3 -+ vshrn.i32 d6, q3, #16 -+ vand d6, d8 -+ vmov r5, r6, d0 @ r5 = dp0'+dp3' dp0+dp3 r6 = dq0'+dq3' dq0+dq3 -+ vmov r8, s12 @ (d6) r8 = mask of strong filtering blocks (16b/block) -+ vadd.i16 q0, \Q11, q12 @ p0 + q0 -+ ands r9, r7, r8 -+ beq 1f -+ -+ vadd.i16 q2, q0, q10 @ p1 + p0 + q0 -+ vadd.i16 q3, q0, q13 @ p0 + q0 + q1 -+ lsr r3, r9, #16 -+ vadd.i16 q1, q2, q9 @ p2 + p1 + p0 + q0 (new P1 before clipping) -+ vadd.i16 q4, q3, q14 @ p0 + q0 + q1 + q2 (new Q1 before clipping) -+ vadd.i16 q0, q8, q9 @ p3 + p2 -+ vadd.i16 q5, \Q15, q14 @ q2 + q3 -+ vadd.i16 q2, q1 @ p2 + 2 * p1 + 2 * p0 + 2 * q0 -+ vadd.i16 q3, q4 @ 2 * p0 + 2 * q0 + 2 * q1 + q2 -+ vshl.i16 q0, #1 @ 2 * p3 + 2 * p2 -+ vshl.i16 q5, #1 @ 2 * q2 + 2 * q3 -+ vadd.i16 q0, q1 @ 2 * p3 + 3 * p2 + p1 + p0 + q0 (new P2 before clipping) -+ vadd.i16 q5, q4 @ p0 + q0 + q1 + 3 * q2 + 2 * q3 (new Q2 before clipping) -+ vadd.i16 q2, q13 @ p2 + 2 * p1 + 2 * p0 + 2 * q0 + q1 (new P0 before clipping) -+ vadd.i16 q3, q10 @ p1 + 2 * p0 + 2 * q0 + 2 * q1 + q2 (new Q0 before clipping) -+ vrshr.s16 q0, #3 @ scale, with rounding -+ vrshr.s16 q5, #3 -+ vrshr.s16 q1, #2 -+ vrshr.s16 q4, #2 -+ vrshr.s16 q2, #3 -+ vrshr.s16 q3, #3 -+ vsub.i16 q0, q9 @ find difference -+ vsub.i16 q5, q14 -+ vsub.i16 q1, q10 -+ vsub.i16 q4, q13 -+ vsub.i16 q2, \Q11 -+ vsub.i16 q3, q12 -+ vmax.s16 q0, q6 @ clip difference to -tc2 .. tc2 -+ vmax.s16 q5, q6 -+ vmax.s16 q1, q6 -+ vmax.s16 q4, q6 -+ vmax.s16 q2, q6 -+ vmax.s16 q3, q6 -+ vdup.16 d12, r9 @ expand mask, reuse q6 due to register pressure -+ vdup.16 d13, r3 -+ vmin.s16 q0, q7 -+ vmin.s16 q5, q7 -+ vmin.s16 q1, q7 -+ vmin.s16 q4, q7 -+ vmin.s16 q2, q7 -+ vmin.s16 q3, q7 -+ vadd.i16 q0, q9 @ apply difference -+ vadd.i16 q5, q14 -+ vadd.i16 q1, q10 -+ vadd.i16 q4, q13 -+ vadd.i16 q2, \Q11 -+ vadd.i16 q3, q12 -+ vbit q9, q0, q6 @ apply filtered values according to mask -+ vbit q14, q5, q6 -+ vbit q10, q1, q6 -+ vbit q13, q4, q6 -+ vbit \Q11, q2, q6 -+ vbit q12, q3, q6 -+ vneg.s16 q6, q7 @ restore -tc2 -+ -+1: -+ bics r9, r7, r8 -+ beq 2f -+ -+ vsub.i16 q0, q12, \Q11 @ q0 - p0 -+ vsub.i16 q1, q13, q10 @ q1 - p1 -+ lsr r3, r9, #16 -+ vshl.i16 q2, q0, #3 -+ lsr r7, r5, #16 -+ vadd.i16 q3, q0, q2 @ 9 * (q0 - p0) -+ lsr r8, r6, #16 -+ vshl.i16 q2, q1, #1 -+ vadd.i16 q4, q1, q2 @ 3 * (q1 - p1) -+ vshr.s16 q6, #1 @ -tc = -tc2 >> 1 -+ vsub.i16 q5, q3, q4 -+ vrhadd.s16 q1, q9, \Q11 @ (p2 + p0 + 1) >> 1 -+ vrhadd.s16 q3, q14, q12 @ (q2 + q0 + 1) >> 1 -+ vrshr.s16 q5, #4 @ delta0 = (9 * (q0 - p0) - 3 * (q1 - p1) + 8) >> 4 -+ vsub.i16 q1, q10 @ ((p2 + p0 + 1) >> 1) - p1 -+ vsub.i16 q3, q13 @ ((q2 + q0 + 1) >> 1) - q1 -+ vmax.s16 q6, q5 @ -+ vshr.s16 q4, q7, #1 @ tc = tc2 >> 1 -+ vdup.16 q0, r2 @ beta -+ vmin.s16 q6, q4 @ delta0 clamped to [-tc, tc] -+ vshr.s16 q4, #1 @ tc_2 = tc >> 1 -+ vhadd.s16 q1, q6 @ (((p2 + p0 + 1) >> 1) - p1 + delta0) >> 1 -+ vhsub.s16 q3, q6 @ (((q2 + q0 + 1) >> 1) - q1 - delta0) >> 1 -+ vshr.s16 q2, q0, #1 @ beta >> 1 -+ vadd.i16 q2, q0 @ beta + (beta >> 1) -+ vneg.s16 q0, q4 @ -tc_2 -+ vabs.s16 q5, q5 @ abs(original delta0) -+ vshr.s16 q2, #3 @ (beta + (beta >> 1)) >> 3 -+ vmax.s16 q1, q0 -+ vmax.s16 q3, q0 -+ vshl.s16 q0, q7, #2 @ 8 * tc -+ vadd.i16 q7, q0 @ 10 * tc -+ vdup.16 d0, r9 -+ vdup.16 d1, r3 @ q0 = mask of blocks to apply filtering -+ vmin.s16 q1, q4 @ deltap1 = av_clip((((p2 + p0 + 1) >> 1) - p1 + delta0) >> 1, -tc_2, tc_2) -+ vmin.s16 q3, q4 @ deltaq1 = av_clip((((q2 + q0 + 1) >> 1) - q1 + delta0) >> 1, -tc_2, tc_2) -+ vdup.16 d8, r5 @ dp0 + dp3 -+ vdup.16 d9, r7 @ dp0' + dp3' -+ vcgt.s16 q7, q5 @ if ((10 * tc) > abs(delta0)) -+ vdup.16 d10, r6 @ dq0 + dq3 -+ vdup.16 d11, r8 @ dq0' + dq3' -+ vand q7, q0 @ AND block and line masks -+ vcgt.s16 q4, q2, q4 @ if (((beta + (beta >> 1)) >> 3) > dp0 + dp3), i.e. if (nd_p > 1) -+ vadd.i16 q0, q1, q10 @ p1 + deltap1 -+ vcgt.s16 q5, q2, q5 @ if (((beta + (beta >> 1)) >> 3) > dq0 + dq3), i.e. if (nd_q > 1) -+ vadd.i16 q3, q3, q13 @ q1 + deltaq1 -+ vadd.i16 q1, \Q11, q6 @ p0 + delta0 -+ vsub.i16 q2, q12, q6 @ q0 - delta0 -+ vand q4, q7 @ AND nd_p test with block/line masks -+ vand q5, q7 @ AND nd_q test with block/line masks -+ vbit q10, q0, q4 -+ vbit \Q11, q1, q7 -+ vbit q12, q2, q7 -+ vbit q13, q3, q5 -+ -+2: -+.if \bit_depth == 8 -+ vmovn.i16 d16, q8 -+ vmovn.i16 d23, \Q15 -+ neg r1, r1 -+ vqmovun.s16 d17, q9 -+ vqmovun.s16 d18, q10 -+ vqmovun.s16 d19, \Q11 -+ lsls r10, #31 -+ vqmovun.s16 d20, q12 -+ vqmovun.s16 d21, q13 -+ vqmovun.s16 d22, q14 -+.else -+ vmov.i16 q0, #0 -+ vmov.i16 q1, #(1 << \bit_depth - 1) -+ @ q8 & q15 should be unaltered and so don't require clipping -+ neg r1, r1 -+ vmax.s16 q9, q0 -+ vmax.s16 q10, q0 -+ vmax.s16 q11, q0 -+ vmax.s16 q12, q0 -+ vmax.s16 q13, q0 -+ vmax.s16 q14, q0 -+ lsls r10, #31 -+ vmin.s16 q9, q1 -+ vmin.s16 q10, q1 -+ vmin.s16 q11, q1 -+ vmin.s16 q12, q1 -+ vmin.s16 q13, q1 -+ vmin.s16 q14, q1 -+.endif -+ bx lr -+.endm -+ -+function hevc_loop_filter_luma_body -+ m_filter_luma 8, q15, q11 -+endfunc -+ -+@ void ff_hevc_rpi_v_loop_filter_luma_neon_8( -+@ uint8_t *_pix, [r0] -+@ ptrdiff_t _stride, [r1] -+@ int _beta, [r2] -+@ int *_tc, [r3] -+@ uint8_t *_no_p, [sp+0] -+@ uint8_t *_no_q) [sp+4] -+ -+function ff_hevc_rpi_v_loop_filter_luma_neon_8, export=1 -+ hevc_loop_filter_luma_start -+ -+ sub r4, r0, #4 -+ b .Lv_loop_luma_common -+endfunc -+ -+@ void ff_hevc_rpi_v_loop_filter2_luma_neon( -+@ uint8_t * pix_r, [r0] -+@ ptrdiff_t _stride, [r1] -+@ int _beta, [r2] -+@ int tc2, [r3] -+@ int no_f, [sp+0] -+@ uint8_t * pix_l) [sp+4] -+ -+function ff_hevc_rpi_v_loop_filter_luma2_neon_8, export=1 -+ cmp r3, #0 -+ it eq -+ bxeq lr -+ push {r4-r10,lr} @ 32 bytes -+ ldr r4, [sp, #36] -+ ldr r10, [sp, #32] -+ -+.Lv_loop_luma_common: -+ vpush {d8-d15} -+ -+ @ It's slightly faster to do unlaned loads and transpose in the -+ @ 8-bit case, even though it needs more instructions, because -+ @ VLD4.8 is a really slow way to read from memory. -+ vld1.32 {d16[0]}, [r4:32], r1 -+ vld1.32 {d20[0]}, [r0:32], r1 -+ vld1.32 {d16[1]}, [r4:32], r1 -+ vld1.32 {d20[1]}, [r0:32], r1 -+ vld1.32 {d17[0]}, [r4:32], r1 -+ vld1.32 {d21[0]}, [r0:32], r1 -+ vld1.32 {d17[1]}, [r4:32], r1 -+ vld1.32 {d21[1]}, [r0:32], r1 -+ vld1.32 {d18[0]}, [r4:32], r1 -+ vld1.32 {d22[0]}, [r0:32], r1 -+ vld1.32 {d18[1]}, [r4:32], r1 -+ vld1.32 {d22[1]}, [r0:32], r1 -+ vld1.32 {d19[0]}, [r4:32], r1 -+ vld1.32 {d23[0]}, [r0:32], r1 -+ vld1.32 {d19[1]}, [r4:32] -+ vld1.32 {d23[1]}, [r0:32] -+ vuzp.16 q8, q9 -+ vuzp.16 q10, q11 -+ vuzp.8 q8, q9 -+ vuzp.8 q10, q11 -+ vswp d17, d18 -+ vswp d21, d22 -+ -+ bl hevc_loop_filter_luma_body -+ -+ add r6, r4, r1 -+ add r2, r0, r1 -+ lsl r1, #1 -+ -+ vpop {d8-d15} -+ -+ @ no_p[1] -+ bmi 1f -+ vst4.8 {d16[7],d17[7],d18[7],d19[7]}, [r4:32], r1 -+ vst4.8 {d16[6],d17[6],d18[6],d19[6]}, [r6:32], r1 -+ vst4.8 {d16[5],d17[5],d18[5],d19[5]}, [r4:32], r1 -+ vst4.8 {d16[4],d17[4],d18[4],d19[4]}, [r6:32], r1 -+ -+ vst4.8 {d16[3],d17[3],d18[3],d19[3]}, [r4:32], r1 -+ vst4.8 {d16[2],d17[2],d18[2],d19[2]}, [r6:32], r1 -+ vst4.8 {d16[1],d17[1],d18[1],d19[1]}, [r4:32], r1 -+ vst4.8 {d16[0],d17[0],d18[0],d19[0]}, [r6:32] -+1: -+ @ no_q[1] -+ bcs 1f -+ vst4.8 {d20[7],d21[7],d22[7],d23[7]}, [r0:32], r1 -+ vst4.8 {d20[6],d21[6],d22[6],d23[6]}, [r2:32], r1 -+ vst4.8 {d20[5],d21[5],d22[5],d23[5]}, [r0:32], r1 -+ vst4.8 {d20[4],d21[4],d22[4],d23[4]}, [r2:32], r1 -+ -+ vst4.8 {d20[3],d21[3],d22[3],d23[3]}, [r0:32], r1 -+ vst4.8 {d20[2],d21[2],d22[2],d23[2]}, [r2:32], r1 -+ vst4.8 {d20[1],d21[1],d22[1],d23[1]}, [r0:32], r1 -+ vst4.8 {d20[0],d21[0],d22[0],d23[0]}, [r2:32] -+1: -+ pop {r4-r10,pc} -+ -+.Lbypasswrite: -+ vpop {d8-d15} -+ pop {r4-r10,pc} -+endfunc -+ -+.macro m_filter_v_luma_16 bit_depth -+ vpush {d8-d15} -+ -+ @ Uses slightly fewer instructions to do laned loads than unlaned -+ @ and transpose. This also means that we can use the same code for -+ @ both split & unsplit deblock -+ vld4.16 {d16[0], d18[0], d20[0], d22[0]}, [r4], r1 -+ vld4.16 {d24[0], d26[0], d28[0], d30[0]}, [r0], r1 -+ -+ vld4.16 {d16[1], d18[1], d20[1], d22[1]}, [r4], r1 -+ vld4.16 {d24[1], d26[1], d28[1], d30[1]}, [r0], r1 -+ -+ vld4.16 {d16[2], d18[2], d20[2], d22[2]}, [r4], r1 -+ vld4.16 {d24[2], d26[2], d28[2], d30[2]}, [r0], r1 -+ -+ vld4.16 {d16[3], d18[3], d20[3], d22[3]}, [r4], r1 -+ vld4.16 {d24[3], d26[3], d28[3], d30[3]}, [r0], r1 -+ -+ vld4.16 {d17[0], d19[0], d21[0], d23[0]}, [r4], r1 -+ vld4.16 {d25[0], d27[0], d29[0], d31[0]}, [r0], r1 -+ -+ vld4.16 {d17[1], d19[1], d21[1], d23[1]}, [r4], r1 -+ vld4.16 {d25[1], d27[1], d29[1], d31[1]}, [r0], r1 -+ -+ vld4.16 {d17[2], d19[2], d21[2], d23[2]}, [r4], r1 -+ vld4.16 {d25[2], d27[2], d29[2], d31[2]}, [r0], r1 -+ -+ vld4.16 {d17[3], d19[3], d21[3], d23[3]}, [r4] -+ vld4.16 {d25[3], d27[3], d29[3], d31[3]}, [r0] -+ -+ bl hevc_loop_filter_luma_body_\bit_depth -+ -+ add r6, r4, r1 -+ add r2, r0, r1 -+ lsl r1, #1 -+ -+ vpop {d8-d15} -+ -+ @ p[1] -+ bmi 1f -+ vst4.16 {d17[3], d19[3], d21[3], d23[3]}, [r4], r1 -+ vst4.16 {d17[2], d19[2], d21[2], d23[2]}, [r6], r1 -+ vst4.16 {d17[1], d19[1], d21[1], d23[1]}, [r4], r1 -+ vst4.16 {d17[0], d19[0], d21[0], d23[0]}, [r6], r1 -+ vst4.16 {d16[3], d18[3], d20[3], d22[3]}, [r4], r1 -+ vst4.16 {d16[2], d18[2], d20[2], d22[2]}, [r6], r1 -+ vst4.16 {d16[1], d18[1], d20[1], d22[1]}, [r4], r1 -+ vst4.16 {d16[0], d18[0], d20[0], d22[0]}, [r6] -+1: -+ @ q[1] -+ bcs 1f -+ vst4.16 {d25[3], d27[3], d29[3], d31[3]}, [r0], r1 -+ vst4.16 {d25[2], d27[2], d29[2], d31[2]}, [r2], r1 -+ vst4.16 {d25[1], d27[1], d29[1], d31[1]}, [r0], r1 -+ vst4.16 {d25[0], d27[0], d29[0], d31[0]}, [r2], r1 -+ vst4.16 {d24[3], d26[3], d28[3], d30[3]}, [r0], r1 -+ vst4.16 {d24[2], d26[2], d28[2], d30[2]}, [r2], r1 -+ vst4.16 {d24[1], d26[1], d28[1], d30[1]}, [r0], r1 -+ vst4.16 {d24[0], d26[0], d28[0], d30[0]}, [r2] -+1: -+ pop {r4-r10,pc} -+.endm -+ -+ -+ -+ -+@ void (*hevc_h_loop_filter_luma)(uint8_t *pix, [r0] -+@ ptrdiff_t stride, [r1] -+@ int beta, [r2] -+@ int32_t *tc, [r3] -+@ uint8_t *no_p, sp[0] -+@ uint8_t *no_q); sp[4] -+@ -+@ Src should always be on 8 byte boundry & all in the same slice -+ -+function ff_hevc_rpi_h_loop_filter_luma_neon_8, export=1 -+ hevc_loop_filter_luma_start -+ b .Lh_loop_filter_luma_common_8 -+endfunc -+ -+function ff_hevc_rpi_h_loop_filter_luma2_neon_8, export=1 -+ cmp r3, #0 -+ it eq -+ bxeq lr -+ push {r4-r10,lr} @ 32 bytes -+ ldr r10, [sp, #32] -+ -+.Lh_loop_filter_luma_common_8: -+ sub r4, r0, r1, lsl #2 -+ add r0, r4, r1 -+ lsl r1, #1 -+ vpush {d8-d15} -+ -+ vld1.8 {d16}, [r4], r1 -+ vld1.8 {d17}, [r0], r1 -+ vld1.8 {d18}, [r4], r1 -+ vld1.8 {d19}, [r0], r1 -+ vld1.8 {d20}, [r4], r1 -+ vld1.8 {d21}, [r0], r1 -+ vld1.8 {d22}, [r4] -+ vld1.8 {d23}, [r0] -+ -+ bl hevc_loop_filter_luma_body -+ -+ add r0, r0, r1, lsl #1 -+ add r2, r4, r1, lsl #1 -+ add r6, r4, r1, asr #1 -+ vpop {d8-d15} -+ -+ @ P2-P0 -+ bcs 1f -+ vst1.8 {d22}, [r4], r1 -+ vst1.8 {d21}, [r6] -+ vst1.8 {d20}, [r4] -+1: -+ @ Q0-Q2 -+ bmi 1f -+ vst1.8 {d19}, [r0], r1 -+ vst1.8 {d18}, [r2] -+ vst1.8 {d17}, [r0] -+1: -+ pop {r4-r10,pc} -+endfunc -+ -+ -+.macro m_filter_h_luma_16 bit_depth -+ sub r4, r0, r1, lsl #2 -+ add r0, r4, r1 -+ lsl r1, #1 -+ vpush {d8-d15} -+ -+ vld1.16 { q8}, [r4], r1 -+ vld1.16 { q9}, [r0], r1 -+ vld1.16 {q10}, [r4], r1 -+ vld1.16 {q11}, [r0], r1 -+ vld1.16 {q12}, [r4], r1 -+ vld1.16 {q13}, [r0], r1 -+ vld1.16 {q14}, [r4] -+ vld1.16 {q15}, [r0] -+ -+ bl hevc_loop_filter_luma_body_\bit_depth -+ -+ add r0, r0, r1, lsl #1 -+ add r2, r4, r1, lsl #1 -+ add r6, r4, r1, asr #1 -+ vpop {d8-d15} -+ -+ @ P2-P0 -+ bcs 1f -+ vst1.16 {q14}, [r4], r1 -+ vst1.16 {q13}, [r6] -+ vst1.16 {q12}, [r4] -+1: -+ bmi 1f -+ vst1.16 {q11}, [r0], r1 -+ vst1.16 {q10}, [r2] -+ vst1.16 { q9}, [r0] -+1: -+ pop {r4-r10,pc} -+.endm -+ -+ -+@ void ff_hevc_rpi_h_loop_filter_uv_neon(uint8_t * src_r, // r0 -+@ unsigned int stride, // r1 -+@ uint32_t tc4, // r2 -+@ unsigned int no_f); // r3 -+@ -+@ no_f -+@ 0 tl P0 -+@ 1 tr P1 -+@ 2 bl Q0 -+@ 3 br Q1 -+@ -+@ Probably not worth having the P/Qa only special case in this direction -+@ Given layout we won't save any memory reads or avoid any cache dirtying -+@ We would save a bit of computation but I expect the partials to be less -+@ common in the H direction than V due to how we arrange deblock. -+ -+function ff_hevc_rpi_h_loop_filter_uv_neon_8, export=1 -+ sub r12, r0, r1 -+ cmp r2, #0 -+ it eq -+ bxeq lr -+ vld1.8 {d26,d27}, [r0] -+ lsl r1, #1 -+ sub r0, r1 -+ vld1.8 {d18,d19}, [r12], r1 -+ vld1.8 {d16,d17}, [r0], r1 -+ vld1.8 {d28,d29}, [r12] -+ -+ hevc_loop_filter_uv_body2 d16, d17, d18, d19, d26, d27, d28, d29, \ -+ "sub r12, r0, r1, asr #1" -+ -+ lsls r3, #29 @ b2 -> N, b3 -> C -+ it pl -+ vstrpl d26, [r0, #0] -+ it cc -+ vstrcc d27, [r0, #8] -+ lsls r3, #2 @ b0 -> N, b1 -> C -+ it pl -+ vstrpl d18, [r12, #0] -+ it cc -+ vstrcc d19, [r12, #8] -+ bx lr -+ -+endfunc -+ -+ -+@ void ff_hevc_rpi_h_loop_filter_uv_neon_10(uint8_t * src_r, // r0 -+@ unsigned int stride, // r1 -+@ uint32_t tc4, // r2 -+@ unsigned int no_f); // r3 -+@ -+@ no-F = b0:no_p[0], b1:no_p[1], b2:no_q[0], b3:no_q[1] -+@ -+@ Macro here actual function near bottom -+ -+.macro m_filter_h_uv_16 bit_depth -+ sub r12, r0, r1 -+ cmp r2, #0 -+ it eq -+ bxeq lr -+ vld1.16 {q12, q13}, [r0] -+ lsl r1, #1 -+ sub r0, r1 -+ vld1.16 {q10, q11}, [r12], r1 -+ vld1.16 {q8, q9 }, [r0], r1 -+ vld1.16 {q14, q15}, [r12] -+ -+ hevc_loop_filter_uv_body2_16 q8, q9, q10, q11, q12, q13, q14, q15, \bit_depth, \ -+ "sub r12, r0, r1, asr #1", \ -+ "cmp r3, #0" -+ -+ bne 1f -+ vst1.16 {q10, q11}, [r12] -+ vst1.16 {q12, q13}, [r0] -+ bx lr -+ -+ @ At least one no_f bit is set -+ @ Which means we need to break this apart in an ugly fashion -+1: -+ lsls r3, #29 @ b2 -> N, b3 -> C -+ itt pl -+ vstrpl d24, [r0, #0] -+ vstrpl d25, [r0, #8] -+ itt cc -+ vstrcc d26, [r0, #16] -+ vstrcc d27, [r0, #24] -+ lsls r3, #2 @ b0 -> N, b1 -> C -+ itt pl -+ vstrpl d20, [r12, #0] -+ vstrpl d21, [r12, #8] -+ itt cc -+ vstrcc d22, [r12, #16] -+ vstrcc d23, [r12, #24] -+ bx lr -+.endm -+ -+ -+@ void ff_hevc_rpi_v_loop_filter_uv2_neon(uint8_t * src_r, // r0 -+@ unsigned int stride, // r1 -+@ uint32_t tc4, // r2 -+@ uint8_t * src_l, // r3 -+@ unsigned int no_f); // sp[0] -+@ -+@ no_f: -+@ 0 tl P0 -+@ 1 tr Q0 -+@ 2 bl P1 -+@ 3 br Q1 -+ -+function ff_hevc_rpi_v_loop_filter_uv2_neon_8, export=1 -+ cmp r2, #0 -+ it eq -+ bxeq lr -+ push {lr} -+ vld2.16 {d16[0], d18[0]}, [r3], r1 -+ vld2.16 {d20[0], d22[0]}, [r0], r1 -+ -+ cmp r2, #0x10000 -+ vld2.16 {d16[1], d18[1]}, [r3], r1 -+ vld2.16 {d20[1], d22[1]}, [r0], r1 -+ -+ vld2.16 {d16[2], d18[2]}, [r3], r1 -+ vld2.16 {d20[2], d22[2]}, [r0], r1 -+ -+ vld2.16 {d16[3], d18[3]}, [r3], r1 -+ vld2.16 {d20[3], d22[3]}, [r0], r1 -+ blo 10f -+ -+ vld2.16 {d17[0], d19[0]}, [r3], r1 -+ vld2.16 {d21[0], d23[0]}, [r0], r1 -+ -+ sub ip, r0, r3 -+ vld2.16 {d17[1], d19[1]}, [r3], r1 -+ vld2.16 {d21[1], d23[1]}, [r0], r1 -+ -+ cmp ip, #4 -+ vld2.16 {d17[2], d19[2]}, [r3], r1 -+ vld2.16 {d21[2], d23[2]}, [r0], r1 -+ -+ vld2.16 {d17[3], d19[3]}, [r3] -+ vld2.16 {d21[3], d23[3]}, [r0] -+ -+ hevc_loop_filter_uv_body2 d16, d17, d18, d19, d20, d21, d22, d23 \ -+ "ldr lr, [sp, #4]", \ -+ "neg r1, r1", \ -+ "it eq; cmpeq lr, #0", \ -+ "add r3, #2", \ -+ "add ip, r3, r1", \ -+ "add r2, r0, r1", \ -+ "lsl r1, #1" -+ -+ bne 1f -+ -+@ Much/most of the time r0 == r3 + 4 and no_f == 0 -+@ so it is worth having this special case -+ vst2.16 {d19[3], d21[3]}, [r3], r1 @ P0b, Q0b -+ vst2.16 {d19[2], d21[2]}, [ip], r1 -+ vst2.16 {d19[1], d21[1]}, [r3], r1 -+ vst2.16 {d19[0], d21[0]}, [ip], r1 -+ vst2.16 {d18[3], d20[3]}, [r3], r1 @ P0a, Q0a -+ vst2.16 {d18[2], d20[2]}, [ip], r1 -+ vst2.16 {d18[1], d20[1]}, [r3] -+ vst2.16 {d18[0], d20[0]}, [ip] -+ pop {pc} -+ -+@ Either split or partial -+1: -+ lsls lr, #29 @ b3 (Q0b) -> C, b2 (P0b) -> N & b31, b1 (Q0a) -> b30, b0 (P0a) -> b29 -+ ittt cs -+ addcs r0, r0, r1, lsl #1 -+ addcs r2, r2, r1, lsl #1 -+ bcs 1f -+ @ Q0b -+ vst1.16 {d21[3]}, [r0], r1 -+ vst1.16 {d21[2]}, [r2], r1 -+ vst1.16 {d21[1]}, [r0], r1 -+ vst1.16 {d21[0]}, [r2], r1 -+1: -+ ittt mi -+ addmi r3, r3, r1, lsl #1 -+ addmi ip, ip, r1, lsl #1 -+ bmi 1f -+ @ P0b -+ vst1.16 {d19[3]}, [r3], r1 -+ vst1.16 {d19[2]}, [ip], r1 -+ vst1.16 {d19[1]}, [r3], r1 -+ vst1.16 {d19[0]}, [ip], r1 -+1: -+ lsls lr, #2 @ b30 (Q0a) -> C, b29 (P0a) -> N & b31 -+ bcs 1f -+ @ Q0a -+ vst1.16 {d20[3]}, [r0], r1 -+ vst1.16 {d20[2]}, [r2], r1 -+ vst1.16 {d20[1]}, [r0] -+ vst1.16 {d20[0]}, [r2] -+1: -+ it mi -+ popmi {pc} -+ @ P0a -+ vst1.16 {d18[3]}, [r3], r1 -+ vst1.16 {d18[2]}, [ip], r1 -+ vst1.16 {d18[1]}, [r3] -+ vst1.16 {d18[0]}, [ip] -+ pop {pc} -+ -+@ Single lump (rather than double) -+10: -+ @ As we have post inced r0/r3 in the load the easiest thing to do is -+ @ to subtract and write forwards, rather than backwards (as above) -+ @ b0 (P0a) -> N, b1 (Q0a) -> C -+ -+ hevc_loop_filter_uv_body1 d16, d18, d20, d22 \ -+ "ldr lr, [sp, #4]", \ -+ "add r3, #2", \ -+ "sub r0, r0, r1, lsl #2", \ -+ "sub r3, r3, r1, lsl #2", \ -+ "lsls lr, #31", \ -+ "add r2, r0, r1", \ -+ "add ip, r3, r1", \ -+ "lsl r1, #1" -+ -+ bcs 3f -+ @ Q0a -+ vst1.16 {d20[0]}, [r0], r1 -+ vst1.16 {d20[1]}, [r2], r1 -+ vst1.16 {d20[2]}, [r0] -+ vst1.16 {d20[3]}, [r2] -+3: -+ it mi -+ popmi {pc} -+ @ P0a -+ vst1.16 {d18[0]}, [r3], r1 -+ vst1.16 {d18[1]}, [ip], r1 -+ vst1.16 {d18[2]}, [r3] -+ vst1.16 {d18[3]}, [ip] -+ pop {pc} -+ -+endfunc -+ -+ -+@ void ff_hevc_rpi_v_loop_filter_uv2_neon(uint8_t * src_r, // r0 -+@ unsigned int stride, // r1 -+@ uint32_t tc4, // r2 -+@ uint8_t * src_l, // r3 -+@ unsigned int no_f); // sp[0] -+@ -+ -+@ no_f -+@ 0 tl P0a -+@ 1 tr Q0a -+@ 2 bl P0b -+@ 3 br Q0b -+ -+@ P1: q8, q12 -+@ P0: q9, q13 -+@ Q0: q10, q14 -+@ Q1: q11, q15 -+ -+.macro m_filter_v_uv2_16 bit_depth -+ cmp r2, #0 -+ it eq -+ bxeq lr -+ push {lr} -+ vld2.32 {d16[0], d18[0]}, [r3], r1 -+ vld2.32 {d20[0], d22[0]}, [r0], r1 -+ -+ cmp r2, #0x10000 -+ vld2.32 {d16[1], d18[1]}, [r3], r1 -+ vld2.32 {d20[1], d22[1]}, [r0], r1 -+ -+ vld2.32 {d17[0], d19[0]}, [r3], r1 -+ vld2.32 {d21[0], d23[0]}, [r0], r1 -+ -+ vld2.32 {d17[1], d19[1]}, [r3], r1 -+ vld2.32 {d21[1], d23[1]}, [r0], r1 -+ blo 10f -+ -+ vld2.32 {d24[0], d26[0]}, [r3], r1 -+ vld2.32 {d28[0], d30[0]}, [r0], r1 -+ -+ sub ip, r0, r3 -+ vld2.32 {d24[1], d26[1]}, [r3], r1 -+ vld2.32 {d28[1], d30[1]}, [r0], r1 -+ -+ cmp ip, #8 -+ vld2.32 {d25[0], d27[0]}, [r3], r1 -+ vld2.32 {d29[0], d31[0]}, [r0], r1 -+ -+ vld2.32 {d25[1], d27[1]}, [r3] -+ vld2.32 {d29[1], d31[1]}, [r0] -+ -+ hevc_loop_filter_uv_body2_16 q8, q12, q9, q13, q10, q14, q11, q15, \bit_depth, \ -+ "ldr lr, [sp, #4]", \ -+ "neg r1, r1", \ -+ "it eq; cmpeq lr, #0", \ -+ "add r3, #4", \ -+ "add ip, r3, r1", \ -+ "add r2, r0, r1", \ -+ "lsl r1, #1" -+ -+ bne 1f -+ -+@ Much/most of the time r0 == r3 + 8 and no_f == 0 -+@ so it is worth having this special case -+ vst2.32 {d27[1], d29[1]}, [r3], r1 @ P0b, Q0b -+ vst2.32 {d27[0], d29[0]}, [ip], r1 -+ vst2.32 {d26[1], d28[1]}, [r3], r1 -+ vst2.32 {d26[0], d28[0]}, [ip], r1 -+ vst2.32 {d19[1], d21[1]}, [r3], r1 @ P0a, Q0a -+ vst2.32 {d19[0], d21[0]}, [ip], r1 -+ vst2.32 {d18[1], d20[1]}, [r3] -+ vst2.32 {d18[0], d20[0]}, [ip] -+ pop {pc} -+ -+@ Either split or partial -+1: -+ lsls lr, #29 @ b3 (Q0b) -> C, b2 (P0b) -> N & b31, b1 (Q0a) -> b30, b0 (P0a) -> b29 -+ ittt cs -+ addcs r0, r0, r1, lsl #1 -+ addcs r2, r2, r1, lsl #1 -+ bcs 1f -+ @ Q0b -+ vst1.32 {d29[1]}, [r0], r1 -+ vst1.32 {d29[0]}, [r2], r1 -+ vst1.32 {d28[1]}, [r0], r1 -+ vst1.32 {d28[0]}, [r2], r1 -+1: -+ ittt mi -+ addmi r3, r3, r1, lsl #1 -+ addmi ip, ip, r1, lsl #1 -+ bmi 1f -+ @ P0b -+ vst1.32 {d27[1]}, [r3], r1 -+ vst1.32 {d27[0]}, [ip], r1 -+ vst1.32 {d26[1]}, [r3], r1 -+ vst1.32 {d26[0]}, [ip], r1 -+1: -+ lsls lr, #2 @ b30 (Q0a) -> C, b29 (P0a) -> N & b31 -+ bcs 1f -+ @ Q0a -+ vst1.32 {d21[1]}, [r0], r1 -+ vst1.32 {d21[0]}, [r2], r1 -+ vst1.32 {d20[1]}, [r0] -+ vst1.32 {d20[0]}, [r2] -+1: -+ it mi -+ popmi {pc} -+ @ P0a -+ vst1.32 {d19[1]}, [r3], r1 -+ vst1.32 {d19[0]}, [ip], r1 -+ vst1.32 {d18[1]}, [r3] -+ vst1.32 {d18[0]}, [ip] -+ pop {pc} -+ -+@ Single lump (rather than double) -+10: -+ @ As we have post inced r0/r3 in the load the easiest thing to do is -+ @ to subtract and write forwards, rather than backwards (as above) -+ @ b0 (P0a) -> N, b1 (Q0a) -> C -+ -+ hevc_loop_filter_uv_body1_16 q8, q9, q10, q11, \bit_depth, \ -+ "ldr lr, [sp, #4]", \ -+ "add r3, #4", \ -+ "sub r0, r0, r1, lsl #2", \ -+ "sub r3, r3, r1, lsl #2", \ -+ "lsls lr, #31", \ -+ "add r2, r0, r1", \ -+ "add ip, r3, r1", \ -+ "lsl r1, #1" -+ -+ bcs 3f -+ @ Q0a -+ vst1.32 {d20[0]}, [r0], r1 -+ vst1.32 {d20[1]}, [r2], r1 -+ vst1.32 {d21[0]}, [r0] -+ vst1.32 {d21[1]}, [r2] -+3: -+ it mi -+ popmi {pc} -+ @ P0a -+ vst1.32 {d18[0]}, [r3], r1 -+ vst1.32 {d18[1]}, [ip], r1 -+ vst1.32 {d19[0]}, [r3] -+ vst1.32 {d19[1]}, [ip] -+ pop {pc} -+.endm -+ -+ -+@ The NEON version is faster under ideal circumstances (i.e. everything in L1) -+@ But in real world testing it is ~20% slower, presumably due to code size -+ -+#if 0 // NEON version -+ -+/* uint32_t ff_hevc_rpi_deblocking_boundary_strengths_neon(int pus, int dup, const HEVCRpiMvField *curr, const HEVCRpiMvField *neigh, -+ * const int *curr_rpl0, const int *curr_rpl1, const int *neigh_rpl0, const int *neigh_rpl1, -+ * int in_inc0, int in_inc1) -+ */ -+function ff_hevc_rpi_deblocking_boundary_strengths_neon, export=1 -+ mov ip, sp -+ push {a1-a3,v1-v8,lr} -+ ldm ip, {v1-v6} -+ cmp a1, #2 -+ bls 2f -+ vpush {d8-d13} -+ sub v5, v5, #10 -+ sub v6, v6, #10 -+1: -+ vld2.32 {d0[0], d2[0]}, [a3]! -+ vld2.32 {d4[0], d6[0]}, [a4]! -+ vmov.u8 q12, #0 -+ ldrb a2, [a3], #1 -+ ldrb ip, [a4], #1 -+ ldrb v8, [a3], #1 -+ ldrb lr, [a4], #1 -+ add a2, v1, a2, lsl #2 -+ vld1.8 {d24[0]}, [a3], v5 -+ add ip, v3, ip, lsl #2 -+ vld1.8 {d25[0]}, [a4], v6 -+ add v8, v2, v8, lsl #2 -+ vld1.32 {d16[0]}, [a2] -+ add lr, v4, lr, lsl #2 -+ vld1.32 {d20[0]}, [ip] -+ vld1.32 {d18[0]}, [v8] -+ vld1.32 {d22[0]}, [lr] -+ -+ vld2.32 {d0[1], d2[1]}, [a3]! -+ vld2.32 {d4[1], d6[1]}, [a4]! -+ ldrb a2, [a3], #1 -+ vmov.u16 d12, #1 -+ ldrb ip, [a4], #1 -+ vmov.u16 d13, #2 -+ ldrb v8, [a3], #1 -+ vmov.u16 d27, #4 -+ ldrb lr, [a4], #1 -+ add a2, v1, a2, lsl #2 -+ vld1.8 {d24[2]}, [a3], v5 -+ add ip, v3, ip, lsl #2 -+ vld1.8 {d25[2]}, [a4], v6 -+ add v8, v2, v8, lsl #2 -+ vld1.32 {d16[1]}, [a2] -+ add lr, v4, lr, lsl #2 -+ vld1.32 {d20[1]}, [ip] -+ vld1.32 {d18[1]}, [v8] -+ vld1.32 {d22[1]}, [lr] -+ -+ vld2.32 {d1[0], d3[0]}, [a3]! -+ vld2.32 {d5[0], d7[0]}, [a4]! -+ ldrb a2, [a3], #1 -+ ldrb ip, [a4], #1 -+ ldrb lr, [a4], #1 -+ ldrb v8, [a3], #1 -+ add a2, v1, a2, lsl #2 -+ vld1.8 {d24[4]}, [a3], v5 -+ add ip, v3, ip, lsl #2 -+ vld1.8 {d25[4]}, [a4], v6 -+ add v8, v2, v8, lsl #2 -+ vld1.32 {d17[0]}, [a2] -+ add lr, v4, lr, lsl #2 -+ vld1.32 {d21[0]}, [ip] -+ vld1.32 {d19[0]}, [v8] -+ vld1.32 {d23[0]}, [lr] -+ -+ vld2.32 {d1[1], d3[1]}, [a3]! -+ vld2.32 {d5[1], d7[1]}, [a4]! -+ ldrb a2, [a3], #1 -+ ldrb ip, [a4], #1 -+ ldrb v8, [a3], #1 -+ ldrb lr, [a4], #1 -+ add a2, v1, a2, lsl #2 -+ vld1.8 {d24[6]}, [a3], v5 -+ add ip, v3, ip, lsl #2 -+ vld1.8 {d25[6]}, [a4], v6 -+ add v8, v2, v8, lsl #2 -+ vld1.32 {d17[1]}, [a2] -+ add lr, v4, lr, lsl #2 -+ vld1.32 {d21[1]}, [ip] -+ vld1.32 {d19[1]}, [v8] -+ vld1.32 {d23[1]}, [lr] -+ -+ @ So now we have: -+ @ q0.32[i] = curr[i].mv[0] -+ @ q1.32[i] = curr[i].mv[1] -+ @ q2.32[i] = neigh[i].mv[0] -+ @ q3.32[i] = neigh[i].mv[1] -+ @ q8.32[i] = curr_rpl0[curr[i].ref_idx[0]] -+ @ q9.32[i] = curr_rpl1[curr[i].ref_idx[1]] -+ @ q10.32[i] = neigh_rpl0[neigh[i].ref_idx[0]] -+ @ q11.32[i] = neigh_rpl1[neigh[i].ref_idx[1]] -+ @ d24.16[i] = curr[i].pred_flag -+ @ d25.16[i] = neigh[i].pred_flag -+ -+ vtst.16 d28, d24, d12 -+ vtst.16 d29, d24, d13 -+ vadd.i16 d8, d24, d12 -+ vadd.i16 d9, d25, d12 -+ vtst.16 d30, d25, d12 -+ vtst.16 d31, d25, d13 -+ veor d26, d8, d9 -+ ldr lr, [sp, 6*8 + 1*4] -+ vmovl.s16 q4, d28 -+ vmovl.s16 q5, d29 -+ teq lr, #1 -+ vmovl.s16 q14, d30 -+ it ne -+ lslne v1, lr, #1 -+ vmovl.s16 q15, d31 -+ it ne -+ rsbne v2, v1, #32 -+ vbif q0, q1, q4 -+ vbif q2, q3, q14 -+ vbif q1, q0, q5 -+ vbif q3, q2, q15 -+ vabd.s16 q12, q0, q2 -+ vabd.s16 q2, q1 -+ vabd.s16 q0, q3 -+ vabd.s16 q1, q3 -+ vbif q8, q9, q4 -+ vbif q10, q11, q14 -+ vbif q9, q8, q5 -+ vbif q11, q10, q15 -+ vclt.u16 d6, d24, d27 -+ vclt.u16 d8, d2, d27 -+ vclt.u16 d7, d25, d27 -+ vclt.u16 d9, d3, d27 -+ vclt.u16 d2, d0, d27 -+ vclt.u16 d0, d4, d27 -+ vclt.u16 d3, d1, d27 -+ vclt.u16 d1, d5, d27 -+ vceq.i32 q12, q10, q8 -+ vceq.i32 q10, q9 -+ vceq.i32 q8, q11 -+ vceq.i32 q9, q11 -+ vshrn.i32 d6, q3, #8 -+ vshrn.i32 d7, q4, #8 -+ vshrn.i32 d8, q1, #8 -+ vshrn.i32 d9, q0, #8 -+ vmovn.i32 d4, q12 -+ vmovn.i32 d2, q10 -+ vmovn.i32 d3, q8 -+ vmovn.i32 d5, q9 -+ vand q2, q3 -+ vrev16.8 q3, q3 -+ vand q2, q3 -+ vand q1, q4 -+ vrev16.8 q4, q4 -+ vand q1, q4 -+ vand d4, d5 -+ vand d2, d3 -+ vbic d0, d12, d4 -+ vshr.u16 d26, #2 -+ vbic d0, d2 -+ vmov.i16 d1, #0x5555 -+ vorr d0, d26 -+ bne 10f -+ -+ @ Merge results into result word, no duplicates -+ vmov a2, s0 -+ vmov v8, s1 -+ vmov.u16 ip, d0[1] -+ vmov.u16 lr, d0[3] -+ lsl a2, #30 -+ lsl v8, #30 -+ lsl ip, #30 -+ lsl lr, #30 -+ orr a2, ip, a2, lsr #2 -+ orr v8, lr, v8, lsr #2 -+ orr a2, v8, a2, lsr #4 -+ subs a1, #4 -+ orr v7, a2, v7, lsr #8 -+ bhi 1b -+ -+ mov a1, #32 -+ ldr a3, [sp, #6*8] -+ vpop {d8-d13} -+ sub a1, a1, a3, lsl #1 -+ mov a1, v7, lsr a1 -+ pop {a2-a4,v1-v8,pc} -+10: -+ @ Merge results into result word, with duplicates -+ vmul.i16 d0, d1 -+ vmov a2, s0 -+ vmov v8, s1 -+ vmov.u16 ip, d0[1] -+ vmov.u16 lr, d0[3] -+ lsl a2, v2 -+ subs a1, #4 -+ lsl v8, v2 -+ lsl ip, v2 -+ lsl lr, v2 -+ ldr v2, [sp, #6*8 + 12*4 + 1*4] -+T lsr a2, v1 -+T orr a2, ip, a2 -+A orr a2, ip, a2, lsr v1 -+ lsl ip, v1, #1 -+T lsr v8, v1 -+T orr v8, lr, v8 -+A orr v8, lr, v8, lsr v1 -+ lsl lr, v1, #2 -+T lsr a2, ip -+T orr a2, v8, a2 -+A orr a2, v8, a2, lsr ip -+ ldr v1, [sp, #6*8 + 12*4] -+T lsr v7, lr -+T orr v7, a2, v7 -+A orr v7, a2, v7, lsr lr -+ bhi 1b -+ -+ mov a1, #32 -+ ldrd a3, a4, [sp, #6*8] -+ vpop {d8-d13} -+ mls a1, a3, a4, a1 -+ mls a1, a3, a4, a1 -+ mov a1, v7, lsr a1 -+ pop {a2-a4,v1-v8,pc} -+ -+ -+2: -+ sub v5, v5, #10 -+ sub v6, v6, #10 -+ vmov.u8 d16, #0 -+ blo 3f -+ vld2.32 {d0[0], d1[0]}, [a3]! -+ vld2.32 {d2[0], d3[0]}, [a4]! -+ ldrb a2, [a3], #1 -+ ldrb ip, [a4], #1 -+ ldrb lr, [a4], #1 -+ ldrb v8, [a3], #1 -+ add a2, v1, a2, lsl #2 -+ vld1.8 {d16[0]}, [a3], v5 -+ add ip, v3, ip, lsl #2 -+ vld1.8 {d16[4]}, [a4], v6 -+ add v8, v2, v8, lsl #2 -+ vld1.32 {d4[0]}, [a2] -+ add lr, v4, lr, lsl #2 -+ vld1.32 {d5[0]}, [ip] -+ vld1.32 {d6[0]}, [v8] -+ vld1.32 {d7[0]}, [lr] -+ -+3: -+ vld2.32 {d0[1], d1[1]}, [a3]! -+ vld2.32 {d2[1], d3[1]}, [a4]! -+ ldrb a2, [a3], #1 -+ vmov.u16 d17, #1 -+ ldrb ip, [a4], #1 -+ vmov.u16 d18, #2 -+ ldrb v8, [a3], #1 -+ vmov.u16 d19, #4 -+ ldrb lr, [a4], #1 -+ add a2, v1, a2, lsl #2 -+ vld1.8 {d16[2]}, [a3], v5 -+ add ip, v3, ip, lsl #2 -+ vld1.8 {d16[6]}, [a4], v6 -+ add v8, v2, v8, lsl #2 -+ vld1.32 {d4[1]}, [a2] -+ add lr, v4, lr, lsl #2 -+ vld1.32 {d5[1]}, [ip] -+ vld1.32 {d6[1]}, [v8] -+ vld1.32 {d7[1]}, [lr] -+ -+ @ So now we have: -+ @ d0.32[i] = curr[i].mv[0] -+ @ d1.32[i] = curr[i].mv[1] -+ @ d2.32[i] = neigh[i].mv[0] -+ @ d3.32[i] = neigh[i].mv[1] -+ @ d4.32[i] = curr_rpl0[curr[i].ref_idx[0]] -+ @ d5.32[i] = neigh_rpl0[neigh[i].ref_idx[0]] -+ @ d6.32[i] = curr_rpl1[curr[i].ref_idx[1]] -+ @ d7.32[i] = neigh_rpl1[neigh[i].ref_idx[1]] -+ @ d16.16[i] = curr[i].pred_flag -+ @ d16.16[2+i] = neigh[i].pred_flag -+ -+ vtst.16 d20, d16, d17 -+ vtst.16 d22, d16, d18 -+ vadd.i16 d30, d16, d17 -+ vswp d2, d3 -+ ldr lr, [sp, #1*4] -+ vmovl.s16 q10, d20 -+ teq lr, #1 -+ vmovl.s16 q11, d22 -+ it ne -+ lslne v1, lr, #1 -+ vbif d0, d1, d20 -+ vbif d4, d6, d20 -+ vbif d3, d2, d21 -+ vbif d5, d7, d21 -+ vbif d1, d0, d22 -+ vbif d6, d4, d22 -+ vbif d2, d3, d23 -+ vbif d7, d5, d23 -+ vshr.u16 d30, #2 -+ vabd.s16 d24, d0, d3 -+ vabd.s16 d25, d1, d2 -+ vabd.s16 q0, q0, q1 -+ vceq.i32 d2, d4, d5 -+ vceq.i32 d20, d5, d6 -+ vceq.i32 d21, d4, d7 -+ vceq.i32 d3, d6, d7 -+ vclt.u16 d6, d24, d19 -+ vclt.u16 d7, d25, d19 -+ vclt.u16 d22, d1, d19 -+ vclt.u16 d23, d0, d19 -+ vshrn.i32 d6, q3, #8 -+ vmovn.i32 d2, q1 -+ vshrn.i32 d7, q11, #8 -+ vmovn.i32 d3, q10 -+ vand q0, q3, q1 -+ it ne -+ rsbne v2, v1, #32 -+ vrev16.8 q3, q3 -+ vand q0, q3 -+ vsra.u64 d30, #32 -+ vshr.u64 q1, q0, #32 -+ vand q0, q1 -+ vbic d0, d17, d0 -+ vand d30, d30, d17 -+ vbic d0, d1 -+ vmov.i16 d1, #0x5555 -+ vorr d0, d30 -+ bne 10f -+ -+ @ Construct result word, no duplicates -+ cmp a1, #2 -+ vmov.u16 a1, d0[1] -+ vmov.u16 a2, d0[0] -+ it eq -+ orreq a1, a2, a1, lsl #2 -+ pop {a2-a4,v1-v8,pc} -+10: -+ @ Construct result word, with duplicates -+ cmp a1, #2 -+ vmul.i16 d0, d1 -+ vmov a2, s0 -+ vmov.u16 a1, d0[1] -+ lsl a2, #16 -+ pkhbt a1, a1, a1, lsl #16 -+ lsr a2, v2 -+ lsr a1, v2 -+T itt eq -+T lsleq a1, v1 -+T orreq a1, a2, a1 -+A orreq a1, a2, a1, lsl v1 -+ pop {a2-a4,v1-v8,pc} -+endfunc -+ -+ -+ -+#else // non-NEON version -+ -+ -+/* uint32_t ff_hevc_rpi_deblocking_boundary_strengths_neon(int pus, int dup, const HEVCRpiMvField *curr, const HEVCRpiMvField *neigh, -+ * const int *curr_rpl0, const int *curr_rpl1, const int *neigh_rpl0, const int *neigh_rpl1, -+ * int in_inc0, in_inc1) -+ */ -+function ff_hevc_rpi_deblocking_boundary_strengths_neon, export=1 -+ add ip, sp, #4*4 -+ push {a2-a4,v1-v8,lr} -+ mov v6, #32 -+1: ldmdb ip, {v1-v4} -+ ldrsb v5, [a3, #8] @ curr->ref_idx -+ ldrsb v8, [a3, #9] -+ ldrsb ip, [a4, #8] @ neigh->ref_idx -+ ldrsb lr, [a4, #9] -+ ldr v1, [v1, v5, lsl #2] -+ ldrb v5, [a3, #10] @ curr->pred_flag -+ ldr v2, [v2, v8, lsl #2] -+ ldrb v8, [a4, #10] @ neigh->pred_flag -+ ldr v3, [v3, ip, lsl #2] -+ ldr v4, [v4, lr, lsl #2] -+ teq v5, #3 -+ beq 20f -+ teq v8, #3 -+ beq 90f -+ -+ tst v5, #1 -+ itee ne -+ ldrne v5, [a3, #0] @ curr->mv[0] -+ moveq v1, v2 -+ ldreq v5, [a3, #4] @ curr->mv[1] -+ tst v8, #1 -+ itee ne -+ ldrne v8, [a4, #0] @ neigh->mv[0] -+ moveq v3, v4 -+ ldreq v8, [a4, #4] @ neigh->mv[1] -+ teq v1, v3 -+ bne 10f -+ ldr lr, =0xFFFCFFFC -+ ssub16 ip, v8, v5 -+ ssub16 v5, v5, v8 -+ sel v5, v5, ip -+ ands v5, v5, lr -+ @ drop through -+10: it ne -+ movne v5, #1<<30 -+11: -+ sub v6, v6, #2 -+T mov v7, v7, lsr #2 -+ subs a2, a2, #1 -+A orr v7, v5, v7, lsr #2 -+T orr v7, v5, v7 -+ bhi 11b -+ -+ ldrd v3, v4, [sp, #16*4] -+ ldr a2, [sp] -+ add ip, sp, #16*4 -+ subs a1, a1, #1 -+ add a3, a3, v3 -+ add a4, a4, v4 -+ bhi 1b -+ mov a1, v7, lsr v6 -+ pop {a2-a4,v1-v8,pc} -+ -+20: teq v8, #3 -+ bne 10b -+ -+ teq v1, v3 -+ it eq -+ teqeq v2, v4 -+ bne 40f -+ teq v1, v2 -+ bne 30f -+ -+ ldrd v1, v2, [a3] @ curr->mv -+ ldrd v3, v4, [a4] @ neigh->mv -+ ldr lr, =0xFFFCFFFC -+ ssub16 ip, v3, v1 -+ ssub16 v5, v1, v3 -+ sel v5, v5, ip -+ ands v5, v5, lr -+ bne 25f -+ ssub16 ip, v4, v2 -+ ssub16 v5, v2, v4 -+ sel v5, v5, ip -+ ands v5, v5, lr -+ beq 11b -+ @ drop through -+25: ssub16 ip, v4, v1 -+ ssub16 v5, v1, v4 -+ sel v5, v5, ip -+ ands v5, v5, lr -+ bne 10b -+ ssub16 ip, v3, v2 -+ ssub16 v5, v2, v3 -+ sel v5, v5, ip -+ ands v5, v5, lr -+ b 10b -+ -+30: ldrd v1, v2, [a3] @ curr->mv -+ ldrd v3, v4, [a4] @ neigh->mv -+ ldr lr, =0xFFFCFFFC -+ ssub16 ip, v3, v1 -+ ssub16 v5, v1, v3 -+ sel v5, v5, ip -+ ands v5, v5, lr -+ bne 10b -+ ssub16 ip, v4, v2 -+ ssub16 v5, v2, v4 -+ sel v5, v5, ip -+ ands v5, v5, lr -+ b 10b -+ -+40: teq v1, v4 -+ ite eq -+ teqeq v2, v3 -+ bne 10b -+ -+ ldrd v1, v2, [a3] @ curr->mv -+ ldrd v3, v4, [a4] @ neigh->mv -+ ldr lr, =0xFFFCFFFC -+ b 25b -+ -+90: -+ mov v5, #1<<30 -+ b 11b -+endfunc -+ -+ -+#endif -+ -+ -+@ ============================================================================= -+@ -+@ 10 bit -+ -+function hevc_loop_filter_luma_body_10 -+ m_filter_luma 10, q11, q15 -+endfunc -+ -+function ff_hevc_rpi_h_loop_filter_luma_neon_10, export=1 -+ hevc_loop_filter_luma_start -+ b .Lh_loop_luma_common_10 -+endfunc -+ -+function ff_hevc_rpi_h_loop_filter_luma2_neon_10, export=1 -+ cmp r3, #0 -+ it eq -+ bxeq lr -+ push {r4-r10,lr} @ 32 bytes -+ ldr r10, [sp, #32] -+.Lh_loop_luma_common_10: -+ m_filter_h_luma_16 10 -+endfunc -+ -+function ff_hevc_rpi_v_loop_filter_luma_neon_10, export=1 -+ hevc_loop_filter_luma_start -+ sub r4, r0, #8 -+ b .Lv_loop_luma_common_10 -+endfunc -+ -+function ff_hevc_rpi_v_loop_filter_luma2_neon_10, export=1 -+ cmp r3, #0 -+ it eq -+ bxeq lr -+ push {r4-r10,lr} @ 32 bytes -+ ldr r4, [sp, #36] -+ ldr r10, [sp, #32] -+ -+.Lv_loop_luma_common_10: -+ m_filter_v_luma_16 10 -+endfunc -+ -+function ff_hevc_rpi_h_loop_filter_uv_neon_10, export=1 -+ m_filter_h_uv_16 10 -+endfunc -+ -+function ff_hevc_rpi_v_loop_filter_uv2_neon_10, export=1 -+ m_filter_v_uv2_16 10 -+endfunc -+ ---- /dev/null -+++ b/libavcodec/arm/rpi_hevcdsp_idct_neon.S -@@ -0,0 +1,184 @@ -+/* -+ * Copyright (c) 2014 Seppo Tomperi -+ * Copyright (C) 2018 John Cox, Ben Avison for Raspberry Pi (Trading) -+ * -+ * This file is part of FFmpeg. -+ * -+ * FFmpeg is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * FFmpeg is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with FFmpeg; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+ */ -+ -+#include "libavutil/arm/asm.S" -+#include "neon.S" -+ -+/* uses registers q8 - q13 for temp values */ -+.macro tr4_luma_shift shift -+ vaddl.s16 q8, d28, d30 // c0 = src0 + src2 -+ vaddl.s16 q9, d30, d31 // c1 = src2 + src3 -+ vsubl.s16 q10, d28, d31 // c2 = src0 - src3 -+ vaddl.s16 q11, d28, d31 // src0 + src3 -+ -+ vmul.i32 q12, q8, d1[0] // 29 * c0 -+ vmul.i32 q13, q10, d2[0] // 55 * c2 -+ vmul.i32 q8, q8, d2[0] // 55 * c0 -+ vmull.s16 q14, d29, d0[0] // c3 = 74 * src1 -+ -+ vsubw.s16 q11, q11, d30 // src0 - src2 + src3 -+ vmla.i32 q12, q9, d2[0] // 29 * c0 + 55 * c1 -+ vmls.i32 q13, q9, d1[0] // 55 * c2 - 29 * c1 -+ vmla.i32 q8, q10, d1[0] // 55 * c0 + 29 * c2 -+ -+ vmul.i32 q11, q11, d0[0] // dst2 = 74 * (src0 - src2 + src3) -+ vadd.i32 q12, q12, q14 // dst0 = 29 * c0 + 55 * c1 + c3 -+ vadd.i32 q13, q13, q14 // dst1 = 55 * c2 - 29 * c1 + c3 -+ vsub.i32 q8, q8, q14 // dst3 = 55 * c0 + 29 * c2 - c3 -+ -+ vqrshrn.s32 d28, q12, \shift -+ vqrshrn.s32 d29, q13, \shift -+ vqrshrn.s32 d30, q11, \shift -+ vqrshrn.s32 d31, q8, \shift -+.endm -+ -+/* uses registers q8 - q11 for temp values */ -+.macro tr4_shift shift -+ vmull.s16 q9, d29, d0[0] // 83 * src1 -+ vmull.s16 q8, d29, d0[1] // 36 * src1 -+ vshll.s16 q14, d28, #6 // 64 * src0 -+ vshll.s16 q10, d30, #6 // 64 * src2 -+ vmlal.s16 q9, d31, d0[1] // 83 * src1 + 36 * src3 o0 -+ vmlsl.s16 q8, d31, d0[0] // 36 * src1 - 83 * src3 o1 -+ vadd.s32 q11, q14, q10 // 64 * (src0 + src2) e0 -+ vsub.s32 q10, q14, q10 // 64 * (src0 - src2) e1 -+ vadd.s32 q14, q11, q9 // e0 + o0 -+ vadd.s32 q15, q10, q8 // e1 + o1 -+ vsub.s32 q8, q10, q8 // e1 - o1 -+ vsub.s32 q9, q11, q9 // e0 - o0 -+ -+ vqrshrn.s32 d28, q14, \shift -+ vqrshrn.s32 d29, q15, \shift -+ vqrshrn.s32 d30, q8, \shift -+ vqrshrn.s32 d31, q9, \shift -+.endm -+ -+.macro tr8_process d0, d1, d2, d3, d4, d5, d6, d7, \ -+ tmp0, /* Q reg which doesn't alias with d4, d6 or d7 */ \ -+ tmp1, /* Q reg which doesn't alias with d7 or d0 */ \ -+ shift, I1, I2, I3 -+ -+ vmull.s16 q4, \d1, d1[1] // 89 * src1 -+ \I1 -+ vmull.s16 q5, \d1, d1[0] // 75 * src1 -+ \I2 -+ vmull.s16 q6, \d1, d1[3] // 50 * src1 -+ \I3 -+ vmull.s16 q7, \d1, d1[2] // 18 * src1 -+ vmlal.s16 q4, \d3, d1[0] // 75 * src3 -+ vmlsl.s16 q5, \d3, d1[2] //-18 * src3 -+ vmlsl.s16 q6, \d3, d1[1] //-89 * src3 -+ vmlsl.s16 q7, \d3, d1[3] //-50 * src3 -+ -+ // tr4 -+ vmull.s16 q1, \d2, d0[0] // 83 * src(1*2) -+ vmull.s16 q2, \d2, d0[1] // 36 * src(1*2) -+ -+ vmlal.s16 q4, \d5, d1[3] // 50 * src5 -+ vmlsl.s16 q5, \d5, d1[1] //-89 * src5 -+ vmlal.s16 q6, \d5, d1[2] // 18 * src5 -+ vmlal.s16 q7, \d5, d1[0] // 75 * src5 -+ -+ vshll.s16 q3, \d0, #6 // 64 * src(0*2) -+ vshll.s16 \tmp0, \d4, #6 // 64 * src(2*2) -+ vmlal.s16 q1, \d6, d0[1] // 83 * src(1*2) + 36 * src(3*2) o0 -+ vmlsl.s16 q2, \d6, d0[0] // 36 * src(1*2) - 83 * src(3*2) o1 -+ vadd.i32 \tmp1, q3, \tmp0 // 64 * (src(0*2) + src(2*2)) e0 -+ vsub.i32 \tmp0, q3, \tmp0 // 64 * (src(0*2) - src(2*2)) e1 -+ -+ vmlal.s16 q4, \d7, d1[2] // 18 * src7 -+ vmlsl.s16 q5, \d7, d1[3] //-50 * src7 -+ vmlal.s16 q6, \d7, d1[0] // 75 * src7 -+ vmlsl.s16 q7, \d7, d1[1] //-89 * src7 -+ -+ vsub.i32 q3, \tmp1, q1 // e0 - o0 -+ vadd.i32 \tmp1, \tmp1, q1 // e0 + o0 -+ vadd.i32 q1, \tmp0, q2 // e1 + o1 -+ vsub.i32 q2, \tmp0, q2 // e1 - o1 -+ -+ vadd.i32 \tmp0, \tmp1, q4 // e_8[0] + o_8[0], dst[0] -+ vsub.i32 q4, \tmp1, q4 // e_8[0] - o_8[0], dst[7] -+ vsub.i32 \tmp1, q3, q7 // e_8[3] - o_8[3], dst[4] -+ vadd.i32 q7, q3, q7 // e_8[3] + o_8[3], dst[3] -+ vadd.i32 q3, q1, q5 // e_8[1] + o_8[1], dst[1] -+ vsub.i32 q5, q1, q5 // e_8[1] - o_8[1], dst[6] -+ vsub.i32 q1, q2, q6 // e_8[2] - o_8[2], dst[5] -+ vadd.i32 q6, q2, q6 // e_8[2] + o_8[2], dst[2] -+ vqrshrn.s32 \d0, \tmp0, #\shift -+ vqrshrn.s32 \d4, \tmp1, #\shift -+ vqrshrn.s32 \d1, q3, #\shift -+ vqrshrn.s32 \d5, q1, #\shift -+ vqrshrn.s32 \d2, q6, #\shift -+ vqrshrn.s32 \d6, q5, #\shift -+ vqrshrn.s32 \d3, q7, #\shift -+ vqrshrn.s32 \d7, q4, #\shift -+.endm -+ -+.macro tr8_vert d0, d1, d2, d3, d4, d5, d6, d7, q01, q23, I1, I2, I3 -+ vld1.16 {\d0}, [r0 :64], r3 -+ vld1.16 {\d1}, [r2 :64], r3 -+ vld1.16 {\d2}, [r0 :64], r3 -+ vld1.16 {\d3}, [r2 :64], r3 -+ vld1.16 {\d4}, [r0 :64], r3 -+ vld1.16 {\d5}, [r2 :64], r3 -+ vld1.16 {\d6}, [r0 :64], r3 -+ vld1.16 {\d7}, [r2 :64], r3 -+ -+ tr8_process \ -+ \d0, \d1, \d2, \d3, \d4, \d5, \d6, \d7, \ -+ \q01, \q23, 7, "\I1", "\I2", "\I3" -+.endm -+ -+.macro tr8_horiz d0, d1, d2, d3, d4, d5, d6, d7, q01, q23, shift -+ tr8_process \ -+ \d0, \d1, \d2, \d3, \d4, \d5, \d6, \d7, \ -+ \q01, \q23, \shift -+ -+ vzip.16 \d0, \d4 -+ vzip.16 \d1, \d5 -+ vzip.16 \d2, \d6 -+ vzip.16 \d3, \d7 -+ vst4.16 {\d0-\d3}, [r0 :128], r3 -+ vst4.16 {\d4-\d7}, [r2 :128], r3 -+.endm -+ -+#define BIT_DEPTH 8 -+#include "rpi_hevc_idct_fn_neon.S" -+ -+.text -+ -+.align 4 -+tr4f: -+.word 0x00240053 // 36 and d1[0] = 83 -+.word 0x00000000 -+tr8f: -+.word 0x0059004b // 89, d0[0] = 75 -+.word 0x00320012 // 50, d0[2] = 18 -+tr16: -+.word 0x005a0057 // 90, d2[0] = 87 -+.word 0x00500046 // 80, d2[2] = 70 -+.word 0x0039002b // 57, d2[0] = 43 -+.word 0x00190009 // 25, d2[2] = 9 -+ -+#undef BIT_DEPTH -+#define BIT_DEPTH 10 -+#include "rpi_hevc_idct_fn_neon.S" -+ ---- /dev/null -+++ b/libavcodec/arm/rpi_hevcdsp_init_arm.c -@@ -0,0 +1,32 @@ -+/* -+ * Copyright (c) 2014 Seppo Tomperi -+ * -+ * This file is part of FFmpeg. -+ * -+ * FFmpeg is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * FFmpeg is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with FFmpeg; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+ */ -+ -+#include "libavutil/attributes.h" -+#include "libavutil/arm/cpu.h" -+#include "libavcodec/rpi_hevcdsp.h" -+#include "rpi_hevcdsp_arm.h" -+ -+av_cold void ff_hevcdsp_rpi_init_arm(HEVCDSPContext *c, const int bit_depth) -+{ -+ int cpu_flags = av_get_cpu_flags(); -+ -+ if (have_neon(cpu_flags)) -+ ff_hevcdsp_rpi_init_neon(c, bit_depth); -+} ---- /dev/null -+++ b/libavcodec/arm/rpi_hevcdsp_init_neon.c -@@ -0,0 +1,467 @@ -+/* -+ * Copyright (c) 2014 Seppo Tomperi -+ * -+ * This file is part of FFmpeg. -+ * -+ * FFmpeg is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * FFmpeg is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with FFmpeg; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+ */ -+ -+#include "config.h" -+#include "libavutil/attributes.h" -+#include "libavutil/arm/cpu.h" -+#include "libavcodec/rpi_hevcdsp.h" -+#include "rpi_hevcdsp_arm.h" -+#include "libavcodec/avcodec.h" -+#include "libavcodec/bit_depth_template.c" -+ -+// NEON inter pred fns for qpel & epel (non-sand) exist in the git repo but -+// have been removed from head as we never use them. -+ -+void ff_hevc_rpi_v_loop_filter_luma_neon_8(uint8_t *_pix, ptrdiff_t _stride, int _beta, int *_tc, uint8_t *_no_p, uint8_t *_no_q); -+void ff_hevc_rpi_h_loop_filter_luma_neon_8(uint8_t *_pix, ptrdiff_t _stride, int _beta, int *_tc, uint8_t *_no_p, uint8_t *_no_q); -+ -+void ff_hevc_rpi_v_loop_filter_luma_neon_10(uint8_t *_pix, ptrdiff_t _stride, int _beta, int *_tc, uint8_t *_no_p, uint8_t *_no_q); -+void ff_hevc_rpi_h_loop_filter_luma_neon_10(uint8_t *_pix, ptrdiff_t _stride, int _beta, int *_tc, uint8_t *_no_p, uint8_t *_no_q); -+ -+void ff_hevc_rpi_h_loop_filter_luma2_neon_8(uint8_t * _pix_r, -+ unsigned int _stride, unsigned int beta, unsigned int tc2, unsigned int no_f); -+void ff_hevc_rpi_v_loop_filter_luma2_neon_8(uint8_t * _pix_r, -+ unsigned int _stride, unsigned int beta, unsigned int tc2, unsigned int no_f, -+ uint8_t * _pix_l); -+void ff_hevc_rpi_h_loop_filter_uv_neon_8(uint8_t * src, unsigned int stride, uint32_t tc4, -+ unsigned int no_f); -+void ff_hevc_rpi_v_loop_filter_uv2_neon_8(uint8_t * src_r, unsigned int stride, uint32_t tc4, -+ uint8_t * src_l, -+ unsigned int no_f); -+ -+void ff_hevc_rpi_h_loop_filter_luma2_neon_10(uint8_t * _pix_r, -+ unsigned int _stride, unsigned int beta, unsigned int tc2, unsigned int no_f); -+void ff_hevc_rpi_v_loop_filter_luma2_neon_10(uint8_t * _pix_r, -+ unsigned int _stride, unsigned int beta, unsigned int tc2, unsigned int no_f, -+ uint8_t * _pix_l); -+void ff_hevc_rpi_h_loop_filter_uv_neon_10(uint8_t * src, unsigned int stride, uint32_t tc4, -+ unsigned int no_f); -+void ff_hevc_rpi_v_loop_filter_uv2_neon_10(uint8_t * src_r, unsigned int stride, uint32_t tc4, -+ uint8_t * src_l, -+ unsigned int no_f); -+ -+void ff_hevc_rpi_transform_4x4_neon_8(int16_t *coeffs, int col_limit); -+void ff_hevc_rpi_transform_8x8_neon_8(int16_t *coeffs, int col_limit); -+void ff_hevc_rpi_idct_4x4_dc_neon_8(int16_t *coeffs); -+void ff_hevc_rpi_idct_8x8_dc_neon_8(int16_t *coeffs); -+void ff_hevc_rpi_idct_16x16_dc_neon_8(int16_t *coeffs); -+void ff_hevc_rpi_idct_32x32_dc_neon_8(int16_t *coeffs); -+void ff_hevc_rpi_transform_luma_4x4_neon_8(int16_t *coeffs); -+ -+void ff_hevc_rpi_transform_4x4_neon_10(int16_t *coeffs, int col_limit); -+void ff_hevc_rpi_transform_8x8_neon_10(int16_t *coeffs, int col_limit); -+void ff_hevc_rpi_idct_4x4_dc_neon_10(int16_t *coeffs); -+void ff_hevc_rpi_idct_8x8_dc_neon_10(int16_t *coeffs); -+void ff_hevc_rpi_idct_16x16_dc_neon_10(int16_t *coeffs); -+void ff_hevc_rpi_idct_32x32_dc_neon_10(int16_t *coeffs); -+void ff_hevc_rpi_transform_luma_4x4_neon_10(int16_t *coeffs); -+ -+void ff_hevc_rpi_add_residual_4x4_neon_8(uint8_t *_dst, int16_t *coeffs, -+ ptrdiff_t stride); -+void ff_hevc_rpi_add_residual_8x8_neon_8(uint8_t *_dst, int16_t *coeffs, -+ ptrdiff_t stride); -+void ff_hevc_rpi_add_residual_16x16_neon_8(uint8_t *_dst, int16_t *coeffs, -+ ptrdiff_t stride); -+void ff_hevc_rpi_add_residual_32x32_neon_8(uint8_t *_dst, int16_t *coeffs, -+ ptrdiff_t stride); -+ -+void ff_hevc_rpi_add_residual_4x4_dc_neon_8(uint8_t *_dst, ptrdiff_t stride, int dc); -+void ff_hevc_rpi_add_residual_8x8_dc_neon_8(uint8_t *_dst, ptrdiff_t stride, int dc); -+void ff_hevc_rpi_add_residual_16x16_dc_neon_8(uint8_t *_dst, ptrdiff_t stride, int dc); -+void ff_hevc_rpi_add_residual_32x32_dc_neon_8(uint8_t *_dst, ptrdiff_t stride, int dc); -+ -+ -+void ff_hevc_rpi_add_residual_4x4_neon_10(uint8_t *_dst, int16_t *coeffs, -+ ptrdiff_t stride); -+void ff_hevc_rpi_add_residual_8x8_neon_10(uint8_t *_dst, int16_t *coeffs, -+ ptrdiff_t stride); -+void ff_hevc_rpi_add_residual_16x16_neon_10(uint8_t *_dst, int16_t *coeffs, -+ ptrdiff_t stride); -+void ff_hevc_rpi_add_residual_32x32_neon_10(uint8_t *_dst, int16_t *coeffs, -+ ptrdiff_t stride); -+ -+void ff_hevc_rpi_add_residual_4x4_dc_neon_10(uint8_t *_dst, ptrdiff_t stride, int dc); -+void ff_hevc_rpi_add_residual_8x8_dc_neon_10(uint8_t *_dst, ptrdiff_t stride, int dc); -+void ff_hevc_rpi_add_residual_16x16_dc_neon_10(uint8_t *_dst, ptrdiff_t stride, int dc); -+void ff_hevc_rpi_add_residual_32x32_dc_neon_10(uint8_t *_dst, ptrdiff_t stride, int dc); -+ -+ -+void ff_hevc_rpi_add_residual_4x4_u_neon_8(uint8_t *_dst, const int16_t * residual, -+ ptrdiff_t stride, int dc_v); -+void ff_hevc_rpi_add_residual_8x8_u_neon_8(uint8_t *_dst, const int16_t * residual, -+ ptrdiff_t stride, int dc_v); -+void ff_hevc_rpi_add_residual_16x16_u_neon_8(uint8_t *_dst, const int16_t * residual, -+ ptrdiff_t stride, int dc_v); -+void ff_hevc_rpi_add_residual_4x4_v_neon_8(uint8_t *_dst, const int16_t * residual, -+ ptrdiff_t stride, int dc_u); -+void ff_hevc_rpi_add_residual_8x8_v_neon_8(uint8_t *_dst, const int16_t * residual, -+ ptrdiff_t stride, int dc_u); -+void ff_hevc_rpi_add_residual_16x16_v_neon_8(uint8_t *_dst, const int16_t * residual, -+ ptrdiff_t stride, int dc_u); -+void ff_hevc_rpi_add_residual_4x4_c_neon_8(uint8_t *_dst, const int16_t * residual, -+ ptrdiff_t stride); -+void ff_hevc_rpi_add_residual_8x8_c_neon_8(uint8_t *_dst, const int16_t * residual, -+ ptrdiff_t stride); -+void ff_hevc_rpi_add_residual_16x16_c_neon_8(uint8_t *_dst, const int16_t * residual, -+ ptrdiff_t stride); -+void ff_hevc_rpi_add_residual_4x4_dc_c_neon_8(uint8_t *_dst, ptrdiff_t stride, int32_t dc); -+void ff_hevc_rpi_add_residual_8x8_dc_c_neon_8(uint8_t *_dst, ptrdiff_t stride, int32_t dc); -+void ff_hevc_rpi_add_residual_16x16_dc_c_neon_8(uint8_t *_dst, ptrdiff_t stride, int32_t dc); -+ -+ -+void ff_hevc_rpi_add_residual_4x4_u_neon_10(uint8_t *_dst, const int16_t * residual, -+ ptrdiff_t stride, int dc_v); -+void ff_hevc_rpi_add_residual_8x8_u_neon_10(uint8_t *_dst, const int16_t * residual, -+ ptrdiff_t stride, int dc_v); -+void ff_hevc_rpi_add_residual_16x16_u_neon_10(uint8_t *_dst, const int16_t * residual, -+ ptrdiff_t stride, int dc_v); -+void ff_hevc_rpi_add_residual_4x4_v_neon_10(uint8_t *_dst, const int16_t * residual, -+ ptrdiff_t stride, int dc_u); -+void ff_hevc_rpi_add_residual_8x8_v_neon_10(uint8_t *_dst, const int16_t * residual, -+ ptrdiff_t stride, int dc_u); -+void ff_hevc_rpi_add_residual_16x16_v_neon_10(uint8_t *_dst, const int16_t * residual, -+ ptrdiff_t stride, int dc_u); -+void ff_hevc_rpi_add_residual_4x4_c_neon_10(uint8_t *_dst, const int16_t * residual, -+ ptrdiff_t stride); -+void ff_hevc_rpi_add_residual_8x8_c_neon_10(uint8_t *_dst, const int16_t * residual, -+ ptrdiff_t stride); -+void ff_hevc_rpi_add_residual_16x16_c_neon_10(uint8_t *_dst, const int16_t * residual, -+ ptrdiff_t stride); -+void ff_hevc_rpi_add_residual_4x4_dc_c_neon_10(uint8_t *_dst, ptrdiff_t stride, int32_t dc); -+void ff_hevc_rpi_add_residual_8x8_dc_c_neon_10(uint8_t *_dst, ptrdiff_t stride, int32_t dc); -+void ff_hevc_rpi_add_residual_16x16_dc_c_neon_10(uint8_t *_dst, ptrdiff_t stride, int32_t dc); -+ -+void ff_hevc_rpi_sao_edge_8_neon_8(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst, int16_t *_sao_offset_val, int eo, int width, int height); -+void ff_hevc_rpi_sao_edge_16_neon_8(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst, int16_t *_sao_offset_val, int eo, int width, int height); -+void ff_hevc_rpi_sao_edge_32_neon_8(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst, int16_t *_sao_offset_val, int eo, int width, int height); -+void ff_hevc_rpi_sao_edge_64_neon_8(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst, int16_t *_sao_offset_val, int eo, int width, int height); -+ -+void ff_hevc_rpi_sao_edge_8_neon_10(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst, int16_t *_sao_offset_val, int eo, int width, int height); -+void ff_hevc_rpi_sao_edge_16_neon_10(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst, int16_t *_sao_offset_val, int eo, int width, int height); -+void ff_hevc_rpi_sao_edge_32_neon_10(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst, int16_t *_sao_offset_val, int eo, int width, int height); -+void ff_hevc_rpi_sao_edge_64_neon_10(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst, int16_t *_sao_offset_val, int eo, int width, int height); -+ -+void ff_hevc_rpi_sao_edge_c_8_neon_8(uint8_t *_dst, const uint8_t *_src, ptrdiff_t stride_dst, -+ const int16_t *_sao_offset_val_u, const int16_t *_sao_offset_val_v, -+ int eo, int width, int height); -+void ff_hevc_rpi_sao_edge_c_16_neon_8(uint8_t *_dst, const uint8_t *_src, ptrdiff_t stride_dst, -+ const int16_t *_sao_offset_val_u, const int16_t *_sao_offset_val_v, -+ int eo, int width, int height); -+void ff_hevc_rpi_sao_edge_c_32_neon_8(uint8_t *_dst, const uint8_t *_src, ptrdiff_t stride_dst, -+ const int16_t *_sao_offset_val_u, const int16_t *_sao_offset_val_v, -+ int eo, int width, int height); -+ -+void ff_hevc_rpi_sao_edge_c_8_neon_10(uint8_t *_dst, const uint8_t *_src, ptrdiff_t stride_dst, -+ const int16_t *_sao_offset_val_u, const int16_t *_sao_offset_val_v, -+ int eo, int width, int height); -+void ff_hevc_rpi_sao_edge_c_16_neon_10(uint8_t *_dst, const uint8_t *_src, ptrdiff_t stride_dst, -+ const int16_t *_sao_offset_val_u, const int16_t *_sao_offset_val_v, -+ int eo, int width, int height); -+void ff_hevc_rpi_sao_edge_c_32_neon_10(uint8_t *_dst, const uint8_t *_src, ptrdiff_t stride_dst, -+ const int16_t *_sao_offset_val_u, const int16_t *_sao_offset_val_v, -+ int eo, int width, int height); -+ -+void ff_hevc_rpi_sao_band_c_8_neon_8(uint8_t *_dst, const uint8_t *_src, -+ ptrdiff_t stride_dst, ptrdiff_t stride_src, -+ const int16_t *sao_offset_val_u, int sao_left_class_u, -+ const int16_t *sao_offset_val_v, int sao_left_class_v, -+ int width, int height); -+void ff_hevc_rpi_sao_band_c_16_neon_8(uint8_t *_dst, const uint8_t *_src, -+ ptrdiff_t stride_dst, ptrdiff_t stride_src, -+ const int16_t *sao_offset_val_u, int sao_left_class_u, -+ const int16_t *sao_offset_val_v, int sao_left_class_v, -+ int width, int height); -+void ff_hevc_rpi_sao_band_c_32_neon_8(uint8_t *_dst, const uint8_t *_src, -+ ptrdiff_t stride_dst, ptrdiff_t stride_src, -+ const int16_t *sao_offset_val_u, int sao_left_class_u, -+ const int16_t *sao_offset_val_v, int sao_left_class_v, -+ int width, int height); -+ -+void ff_hevc_rpi_sao_band_c_8_neon_10(uint8_t *_dst, const uint8_t *_src, -+ ptrdiff_t stride_dst, ptrdiff_t stride_src, -+ const int16_t *sao_offset_val_u, int sao_left_class_u, -+ const int16_t *sao_offset_val_v, int sao_left_class_v, -+ int width, int height); -+void ff_hevc_rpi_sao_band_c_16_neon_10(uint8_t *_dst, const uint8_t *_src, -+ ptrdiff_t stride_dst, ptrdiff_t stride_src, -+ const int16_t *sao_offset_val_u, int sao_left_class_u, -+ const int16_t *sao_offset_val_v, int sao_left_class_v, -+ int width, int height); -+void ff_hevc_rpi_sao_band_c_32_neon_10(uint8_t *_dst, const uint8_t *_src, -+ ptrdiff_t stride_dst, ptrdiff_t stride_src, -+ const int16_t *sao_offset_val_u, int sao_left_class_u, -+ const int16_t *sao_offset_val_v, int sao_left_class_v, -+ int width, int height); -+ -+void ff_hevc_rpi_sao_band_8_neon_8(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst, ptrdiff_t stride_src, -+ int16_t *sao_offset_val, int sao_left_class, int width, int height); -+void ff_hevc_rpi_sao_band_16_neon_8(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst, ptrdiff_t stride_src, -+ int16_t *sao_offset_val, int sao_left_class, int width, int height); -+void ff_hevc_rpi_sao_band_32_neon_8(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst, ptrdiff_t stride_src, -+ int16_t *sao_offset_val, int sao_left_class, int width, int height); -+void ff_hevc_rpi_sao_band_64_neon_8(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst, ptrdiff_t stride_src, -+ int16_t *sao_offset_val, int sao_left_class, int width, int height); -+ -+void ff_hevc_rpi_sao_band_8_neon_10(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst, ptrdiff_t stride_src, -+ int16_t *sao_offset_val, int sao_left_class, int width, int height); -+void ff_hevc_rpi_sao_band_16_neon_10(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst, ptrdiff_t stride_src, -+ int16_t *sao_offset_val, int sao_left_class, int width, int height); -+void ff_hevc_rpi_sao_band_32_neon_10(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst, ptrdiff_t stride_src, -+ int16_t *sao_offset_val, int sao_left_class, int width, int height); -+void ff_hevc_rpi_sao_band_64_neon_10(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst, ptrdiff_t stride_src, -+ int16_t *sao_offset_val, int sao_left_class, int width, int height); -+ -+ -+uint32_t ff_hevc_rpi_deblocking_boundary_strengths_neon(int pus, int dup, const struct HEVCRpiMvField *curr, const struct HEVCRpiMvField *neigh, -+ const int *curr_rpl0, const int *curr_rpl1, const int *neigh_rpl0, const int *neigh_rpl1, -+ int in_inc0, int in_inc1); -+void ff_hevc_rpi_cpy_blks8x4_neon(uint8_t *dst, unsigned int stride_dst, const uint8_t *src, unsigned stride_src, unsigned int width, unsigned int height); -+ -+ -+static void ff_hevc_rpi_sao_edge_48_neon_8(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst, int16_t *_sao_offset_val, int eo, int width, int height) -+{ -+ ff_hevc_rpi_sao_edge_32_neon_8(_dst, _src, stride_dst, _sao_offset_val, eo, 32, height); -+ ff_hevc_rpi_sao_edge_16_neon_8(_dst + 32, _src + 32, stride_dst, _sao_offset_val, eo, 16, height); -+} -+static void ff_hevc_rpi_sao_edge_48_neon_10(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst, int16_t *_sao_offset_val, int eo, int width, int height) -+{ -+ ff_hevc_rpi_sao_edge_32_neon_10(_dst, _src, stride_dst, _sao_offset_val, eo, 32, height); -+ ff_hevc_rpi_sao_edge_16_neon_10(_dst + 64, _src + 64, stride_dst, _sao_offset_val, eo, 16, height); -+} -+ -+static void ff_hevc_rpi_sao_band_48_neon_8(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst, ptrdiff_t stride_src, -+ int16_t *sao_offset_val, int sao_left_class, int width, int height) -+{ -+ ff_hevc_rpi_sao_band_32_neon_8(_dst, _src, stride_dst, stride_src, sao_offset_val, sao_left_class, 32, height); -+ ff_hevc_rpi_sao_band_16_neon_8(_dst + 32, _src + 32, stride_dst, stride_src, sao_offset_val, sao_left_class, 16, height); -+} -+static void ff_hevc_rpi_sao_band_48_neon_10(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst, ptrdiff_t stride_src, -+ int16_t *sao_offset_val, int sao_left_class, int width, int height) -+{ -+ ff_hevc_rpi_sao_band_32_neon_10(_dst, _src, stride_dst, stride_src, sao_offset_val, sao_left_class, 32, height); -+ ff_hevc_rpi_sao_band_16_neon_10(_dst + 64, _src + 64, stride_dst, stride_src, sao_offset_val, sao_left_class, 16, height); -+} -+ -+#if SAO_FILTER_N == 6 -+static void ff_hevc_rpi_sao_edge_24_neon_8(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst, int16_t *_sao_offset_val, int eo, int width, int height) -+{ -+ ff_hevc_rpi_sao_edge_16_neon_8(_dst, _src, stride_dst, _sao_offset_val, eo, 16, height); -+ ff_hevc_rpi_sao_edge_8_neon_8(_dst + 16, _src + 16, stride_dst, _sao_offset_val, eo, 8, height); -+} -+static void ff_hevc_rpi_sao_edge_24_neon_10(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst, int16_t *_sao_offset_val, int eo, int width, int height) -+{ -+ ff_hevc_rpi_sao_edge_16_neon_10(_dst, _src, stride_dst, _sao_offset_val, eo, 16, height); -+ ff_hevc_rpi_sao_edge_8_neon_10(_dst + 32, _src + 32, stride_dst, _sao_offset_val, eo, 8, height); -+} -+ -+static void ff_hevc_rpi_sao_band_24_neon_8(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst, ptrdiff_t stride_src, -+ int16_t *sao_offset_val, int sao_left_class, int width, int height) -+{ -+ ff_hevc_rpi_sao_band_16_neon_8(_dst, _src, stride_dst, stride_src, sao_offset_val, sao_left_class, 16, height); -+ ff_hevc_rpi_sao_band_8_neon_8(_dst + 16, _src + 16, stride_dst, stride_src, sao_offset_val, sao_left_class, 8, height); -+} -+static void ff_hevc_rpi_sao_band_24_neon_10(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst, ptrdiff_t stride_src, -+ int16_t *sao_offset_val, int sao_left_class, int width, int height) -+{ -+ ff_hevc_rpi_sao_band_16_neon_10(_dst, _src, stride_dst, stride_src, sao_offset_val, sao_left_class, 16, height); -+ ff_hevc_rpi_sao_band_8_neon_10(_dst + 32, _src + 32, stride_dst, stride_src, sao_offset_val, sao_left_class, 8, height); -+} -+ -+static void ff_hevc_rpi_sao_edge_c_24_neon_8(uint8_t *_dst, const uint8_t *_src, ptrdiff_t stride_dst, -+ const int16_t *_sao_offset_val_u, const int16_t *_sao_offset_val_v, -+ int eo, int width, int height) -+{ -+ ff_hevc_rpi_sao_edge_c_16_neon_8(_dst, _src, stride_dst, _sao_offset_val_u, _sao_offset_val_v, eo, 16, height); -+ ff_hevc_rpi_sao_edge_c_8_neon_8(_dst + 32, _src + 32, stride_dst, _sao_offset_val_u, _sao_offset_val_v, eo, 8, height); -+} -+static void ff_hevc_rpi_sao_edge_c_24_neon_10(uint8_t *_dst, const uint8_t *_src, ptrdiff_t stride_dst, -+ const int16_t *_sao_offset_val_u, const int16_t *_sao_offset_val_v, -+ int eo, int width, int height) -+{ -+ ff_hevc_rpi_sao_edge_c_16_neon_10(_dst, _src, stride_dst, _sao_offset_val_u, _sao_offset_val_v, eo, 16, height); -+ ff_hevc_rpi_sao_edge_c_8_neon_10(_dst + 64, _src + 64, stride_dst, _sao_offset_val_u, _sao_offset_val_v, eo, 8, height); -+} -+ -+static void ff_hevc_rpi_sao_band_c_24_neon_8(uint8_t *_dst, const uint8_t *_src, -+ ptrdiff_t stride_dst, ptrdiff_t stride_src, -+ const int16_t *sao_offset_val_u, int sao_left_class_u, -+ const int16_t *sao_offset_val_v, int sao_left_class_v, -+ int width, int height) -+{ -+ ff_hevc_rpi_sao_band_c_16_neon_8(_dst, _src, stride_dst, stride_src, -+ sao_offset_val_u, sao_left_class_u, sao_offset_val_v, sao_left_class_v, 16, height); -+ ff_hevc_rpi_sao_band_c_8_neon_8(_dst + 32, _src + 32, stride_dst, stride_src, -+ sao_offset_val_u, sao_left_class_u, sao_offset_val_v, sao_left_class_v, 8, height); -+} -+static void ff_hevc_rpi_sao_band_c_24_neon_10(uint8_t *_dst, const uint8_t *_src, -+ ptrdiff_t stride_dst, ptrdiff_t stride_src, -+ const int16_t *sao_offset_val_u, int sao_left_class_u, -+ const int16_t *sao_offset_val_v, int sao_left_class_v, -+ int width, int height) -+{ -+ ff_hevc_rpi_sao_band_c_16_neon_10(_dst, _src, stride_dst, stride_src, -+ sao_offset_val_u, sao_left_class_u, sao_offset_val_v, sao_left_class_v, 16, height); -+ ff_hevc_rpi_sao_band_c_8_neon_10(_dst + 64, _src + 64, stride_dst, stride_src, -+ sao_offset_val_u, sao_left_class_u, sao_offset_val_v, sao_left_class_v, 8, height); -+} -+#endif -+ -+ -+ -+#if RPI_HEVC_SAO_BUF_STRIDE != 160 -+#error SAO edge src stride not 160 - value used in .S -+#endif -+ -+av_cold void ff_hevcdsp_rpi_init_neon(HEVCDSPContext *c, const int bit_depth) -+{ -+ if (bit_depth == 8) { -+ c->hevc_v_loop_filter_luma = ff_hevc_rpi_v_loop_filter_luma_neon_8; -+ c->hevc_v_loop_filter_luma_c = ff_hevc_rpi_v_loop_filter_luma_neon_8; -+ c->hevc_h_loop_filter_luma = ff_hevc_rpi_h_loop_filter_luma_neon_8; -+ c->hevc_h_loop_filter_luma_c = ff_hevc_rpi_h_loop_filter_luma_neon_8; -+ c->hevc_h_loop_filter_luma2 = ff_hevc_rpi_h_loop_filter_luma2_neon_8; -+ c->hevc_v_loop_filter_luma2 = ff_hevc_rpi_v_loop_filter_luma2_neon_8; -+ c->hevc_h_loop_filter_uv = ff_hevc_rpi_h_loop_filter_uv_neon_8; -+ c->hevc_v_loop_filter_uv2 = ff_hevc_rpi_v_loop_filter_uv2_neon_8; -+ c->idct[0] = ff_hevc_rpi_transform_4x4_neon_8; -+ c->idct[1] = ff_hevc_rpi_transform_8x8_neon_8; -+ c->idct_dc[0] = ff_hevc_rpi_idct_4x4_dc_neon_8; -+ c->idct_dc[1] = ff_hevc_rpi_idct_8x8_dc_neon_8; -+ c->idct_dc[2] = ff_hevc_rpi_idct_16x16_dc_neon_8; -+ c->idct_dc[3] = ff_hevc_rpi_idct_32x32_dc_neon_8; -+ c->add_residual[0] = ff_hevc_rpi_add_residual_4x4_neon_8; -+ c->add_residual[1] = ff_hevc_rpi_add_residual_8x8_neon_8; -+ c->add_residual[2] = ff_hevc_rpi_add_residual_16x16_neon_8; -+ c->add_residual[3] = ff_hevc_rpi_add_residual_32x32_neon_8; -+ c->add_residual_dc[0] = ff_hevc_rpi_add_residual_4x4_dc_neon_8; -+ c->add_residual_dc[1] = ff_hevc_rpi_add_residual_8x8_dc_neon_8; -+ c->add_residual_dc[2] = ff_hevc_rpi_add_residual_16x16_dc_neon_8; -+ c->add_residual_dc[3] = ff_hevc_rpi_add_residual_32x32_dc_neon_8; -+ c->add_residual_u[0] = ff_hevc_rpi_add_residual_4x4_u_neon_8; -+ c->add_residual_u[1] = ff_hevc_rpi_add_residual_8x8_u_neon_8; -+ c->add_residual_u[2] = ff_hevc_rpi_add_residual_16x16_u_neon_8; -+ c->add_residual_v[0] = ff_hevc_rpi_add_residual_4x4_v_neon_8; -+ c->add_residual_v[1] = ff_hevc_rpi_add_residual_8x8_v_neon_8; -+ c->add_residual_v[2] = ff_hevc_rpi_add_residual_16x16_v_neon_8; -+ c->add_residual_c[0] = ff_hevc_rpi_add_residual_4x4_c_neon_8; -+ c->add_residual_c[1] = ff_hevc_rpi_add_residual_8x8_c_neon_8; -+ c->add_residual_c[2] = ff_hevc_rpi_add_residual_16x16_c_neon_8; -+ c->add_residual_dc_c[0] = ff_hevc_rpi_add_residual_4x4_dc_c_neon_8; -+ c->add_residual_dc_c[1] = ff_hevc_rpi_add_residual_8x8_dc_c_neon_8; -+ c->add_residual_dc_c[2] = ff_hevc_rpi_add_residual_16x16_dc_c_neon_8; -+ c->transform_4x4_luma = ff_hevc_rpi_transform_luma_4x4_neon_8; -+ c->sao_band_filter[0] = ff_hevc_rpi_sao_band_8_neon_8; -+ c->sao_band_filter[1] = ff_hevc_rpi_sao_band_16_neon_8; -+ c->sao_band_filter[2] = ff_hevc_rpi_sao_band_32_neon_8; -+ c->sao_band_filter[3] = ff_hevc_rpi_sao_band_48_neon_8; -+ c->sao_band_filter[4] = ff_hevc_rpi_sao_band_64_neon_8; -+ c->sao_edge_filter[0] = ff_hevc_rpi_sao_edge_8_neon_8; -+ c->sao_edge_filter[1] = ff_hevc_rpi_sao_edge_16_neon_8; -+ c->sao_edge_filter[2] = ff_hevc_rpi_sao_edge_32_neon_8; -+ c->sao_edge_filter[3] = ff_hevc_rpi_sao_edge_48_neon_8; -+ c->sao_edge_filter[4] = ff_hevc_rpi_sao_edge_64_neon_8; -+#if SAO_FILTER_N == 6 -+ c->sao_band_filter[5] = ff_hevc_rpi_sao_band_24_neon_8; -+ c->sao_edge_filter[5] = ff_hevc_rpi_sao_edge_24_neon_8; -+#endif -+ c->sao_band_filter_c[0] = ff_hevc_rpi_sao_band_c_8_neon_8; -+ c->sao_band_filter_c[1] = ff_hevc_rpi_sao_band_c_16_neon_8; -+ c->sao_band_filter_c[2] = ff_hevc_rpi_sao_band_c_32_neon_8; -+ -+ c->sao_edge_filter_c[0] = ff_hevc_rpi_sao_edge_c_8_neon_8; -+ c->sao_edge_filter_c[1] = ff_hevc_rpi_sao_edge_c_16_neon_8; -+ c->sao_edge_filter_c[2] = ff_hevc_rpi_sao_edge_c_32_neon_8; -+ -+#if SAO_FILTER_N == 6 -+ c->sao_band_filter_c[5] = ff_hevc_rpi_sao_band_c_24_neon_8; -+ c->sao_edge_filter_c[5] = ff_hevc_rpi_sao_edge_c_24_neon_8; -+#endif -+ } -+ else if (bit_depth == 10) { -+ c->hevc_v_loop_filter_luma = ff_hevc_rpi_v_loop_filter_luma_neon_10; -+ c->hevc_v_loop_filter_luma_c = ff_hevc_rpi_v_loop_filter_luma_neon_10; -+ c->hevc_h_loop_filter_luma = ff_hevc_rpi_h_loop_filter_luma_neon_10; -+ c->hevc_h_loop_filter_luma_c = ff_hevc_rpi_h_loop_filter_luma_neon_10; -+ c->hevc_h_loop_filter_luma2 = ff_hevc_rpi_h_loop_filter_luma2_neon_10; -+ c->hevc_v_loop_filter_luma2 = ff_hevc_rpi_v_loop_filter_luma2_neon_10; -+ c->hevc_h_loop_filter_uv = ff_hevc_rpi_h_loop_filter_uv_neon_10; -+ c->hevc_v_loop_filter_uv2 = ff_hevc_rpi_v_loop_filter_uv2_neon_10; -+ c->idct[0] = ff_hevc_rpi_transform_4x4_neon_10; -+ c->idct[1] = ff_hevc_rpi_transform_8x8_neon_10; -+ c->idct_dc[0] = ff_hevc_rpi_idct_4x4_dc_neon_10; -+ c->idct_dc[1] = ff_hevc_rpi_idct_8x8_dc_neon_10; -+ c->idct_dc[2] = ff_hevc_rpi_idct_16x16_dc_neon_10; -+ c->idct_dc[3] = ff_hevc_rpi_idct_32x32_dc_neon_10; -+ c->add_residual[0] = ff_hevc_rpi_add_residual_4x4_neon_10; -+ c->add_residual[1] = ff_hevc_rpi_add_residual_8x8_neon_10; -+ c->add_residual[2] = ff_hevc_rpi_add_residual_16x16_neon_10; -+ c->add_residual[3] = ff_hevc_rpi_add_residual_32x32_neon_10; -+ c->add_residual_dc[0] = ff_hevc_rpi_add_residual_4x4_dc_neon_10; -+ c->add_residual_dc[1] = ff_hevc_rpi_add_residual_8x8_dc_neon_10; -+ c->add_residual_dc[2] = ff_hevc_rpi_add_residual_16x16_dc_neon_10; -+ c->add_residual_dc[3] = ff_hevc_rpi_add_residual_32x32_dc_neon_10; -+ c->add_residual_u[0] = ff_hevc_rpi_add_residual_4x4_u_neon_10; -+ c->add_residual_u[1] = ff_hevc_rpi_add_residual_8x8_u_neon_10; -+ c->add_residual_u[2] = ff_hevc_rpi_add_residual_16x16_u_neon_10; -+ c->add_residual_v[0] = ff_hevc_rpi_add_residual_4x4_v_neon_10; -+ c->add_residual_v[1] = ff_hevc_rpi_add_residual_8x8_v_neon_10; -+ c->add_residual_v[2] = ff_hevc_rpi_add_residual_16x16_v_neon_10; -+ c->add_residual_c[0] = ff_hevc_rpi_add_residual_4x4_c_neon_10; -+ c->add_residual_c[1] = ff_hevc_rpi_add_residual_8x8_c_neon_10; -+ c->add_residual_c[2] = ff_hevc_rpi_add_residual_16x16_c_neon_10; -+ c->add_residual_dc_c[0] = ff_hevc_rpi_add_residual_4x4_dc_c_neon_10; -+ c->add_residual_dc_c[1] = ff_hevc_rpi_add_residual_8x8_dc_c_neon_10; -+ c->add_residual_dc_c[2] = ff_hevc_rpi_add_residual_16x16_dc_c_neon_10; -+ c->transform_4x4_luma = ff_hevc_rpi_transform_luma_4x4_neon_10; -+ c->sao_band_filter[0] = ff_hevc_rpi_sao_band_8_neon_10; -+ c->sao_band_filter[1] = ff_hevc_rpi_sao_band_16_neon_10; -+ c->sao_band_filter[2] = ff_hevc_rpi_sao_band_32_neon_10; -+ c->sao_band_filter[3] = ff_hevc_rpi_sao_band_48_neon_10; -+ c->sao_band_filter[4] = ff_hevc_rpi_sao_band_64_neon_10; -+ -+ c->sao_edge_filter[0] = ff_hevc_rpi_sao_edge_8_neon_10; -+ c->sao_edge_filter[1] = ff_hevc_rpi_sao_edge_16_neon_10; -+ c->sao_edge_filter[2] = ff_hevc_rpi_sao_edge_32_neon_10; -+ c->sao_edge_filter[3] = ff_hevc_rpi_sao_edge_48_neon_10; -+ c->sao_edge_filter[4] = ff_hevc_rpi_sao_edge_64_neon_10; -+#if SAO_FILTER_N == 6 -+ c->sao_band_filter[5] = ff_hevc_rpi_sao_band_24_neon_10; -+ c->sao_edge_filter[5] = ff_hevc_rpi_sao_edge_24_neon_10; -+#endif -+ c->sao_band_filter_c[0] = ff_hevc_rpi_sao_band_c_8_neon_10; -+ c->sao_band_filter_c[1] = ff_hevc_rpi_sao_band_c_16_neon_10; -+ c->sao_band_filter_c[2] = ff_hevc_rpi_sao_band_c_32_neon_10; -+ -+ c->sao_edge_filter_c[0] = ff_hevc_rpi_sao_edge_c_8_neon_10; -+ c->sao_edge_filter_c[1] = ff_hevc_rpi_sao_edge_c_16_neon_10; -+ c->sao_edge_filter_c[2] = ff_hevc_rpi_sao_edge_c_32_neon_10; -+ -+#if SAO_FILTER_N == 6 -+ c->sao_band_filter_c[5] = ff_hevc_rpi_sao_band_c_24_neon_10; -+ c->sao_edge_filter_c[5] = ff_hevc_rpi_sao_edge_c_24_neon_10; -+#endif -+ } -+ -+ assert(offsetof(HEVCRpiMvField, mv) == 0); -+ assert(offsetof(HEVCRpiMvField, ref_idx) == 8); -+ assert(offsetof(HEVCRpiMvField, pred_flag) == 10); -+ c->hevc_deblocking_boundary_strengths = ff_hevc_rpi_deblocking_boundary_strengths_neon; -+ c->cpy_blk = ff_hevc_rpi_cpy_blks8x4_neon; -+} ---- /dev/null -+++ b/libavcodec/arm/rpi_hevcdsp_res16_neon.S -@@ -0,0 +1,620 @@ -+/* -+Copyright (c) 2017 Raspberry Pi (Trading) Ltd. -+All rights reserved. -+ -+Redistribution and use in source and binary forms, with or without -+modification, are permitted provided that the following conditions are met: -+ * Redistributions of source code must retain the above copyright -+ notice, this list of conditions and the following disclaimer. -+ * Redistributions in binary form must reproduce the above copyright -+ notice, this list of conditions and the following disclaimer in the -+ documentation and/or other materials provided with the distribution. -+ * Neither the name of the copyright holder nor the -+ names of its contributors may be used to endorse or promote products -+ derived from this software without specific prior written permission. -+ -+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ -+Authors: John Cox, Ben Avison -+*/ -+ -+#include "libavutil/arm/asm.S" -+#include "neon.S" -+ -+ .arch_extension mp @ enable PLDW -+ -+#define BIT_DEPTH 10 -+ -+.macro clip16_4 Q0, Q1, Q2, Q3, Q_MIN, Q_MAX -+ vmax.s16 \Q0, \Q_MIN -+ vmax.s16 \Q1, \Q_MIN -+ vmax.s16 \Q2, \Q_MIN -+ vmax.s16 \Q3, \Q_MIN -+ vmin.s16 \Q0, \Q_MAX -+ vmin.s16 \Q1, \Q_MAX -+ vmin.s16 \Q2, \Q_MAX -+ vmin.s16 \Q3, \Q_MAX -+.endm -+ -+@ add_residual4x4( -+@ uint16_t *_dst, [r0] -+@ int16_t *res, [r1] -+@ ptrdiff_t stride) [r2] -+ -+function JOIN(ff_hevc_rpi_add_residual_4x4_neon_, BIT_DEPTH), export=1 -+ add ip, r0, r2 -+ vld1.16 {q10, q11}, [r1] -+ lsl r2, #1 -+ vld1.16 {d0}, [r0 :64], r2 -+ vld1.16 {d1}, [ip :64], r2 -+ vld1.16 {d2}, [r0 :64] -+ vld1.16 {d3}, [ip :64] -+ sub r0, r2 -+ vqadd.s16 q0, q10 -+ sub ip, r2 -+ vqadd.s16 q1, q11 -+ vmov.i16 q8, #0 -+ vmov.i16 q9, #(1 << BIT_DEPTH) - 1 -+ vmax.s16 q0, q0, q8 -+ vmax.s16 q1, q1, q8 -+ vmin.s16 q0, q0, q9 -+ vmin.s16 q1, q1, q9 -+ vst1.16 {d0}, [r0 :64], r2 -+ vst1.16 {d1}, [ip :64], r2 -+ vst1.16 {d2}, [r0 :64] -+ vst1.16 {d3}, [ip :64] -+ bx lr -+ -+endfunc -+ -+@ add_residual4x4_dc( -+@ uint16_t *_dst, [r0] -+@ ptrdiff_t stride, [r1] -+@ int dc) [r2] -+ -+function JOIN(ff_hevc_rpi_add_residual_4x4_dc_neon_, BIT_DEPTH), export=1 -+ add ip, r0, r1 -+ vdup.16 q15, r2 -+ lsl r1, #1 -+ vld1.16 {d0}, [r0 :64], r1 -+ vld1.16 {d1}, [ip :64], r1 -+ vld1.16 {d2}, [r0 :64] -+ vld1.16 {d3}, [ip :64] -+ sub r0, r1 -+ vqadd.s16 q0, q15 -+ sub ip, r1 -+ vqadd.s16 q1, q15 -+ vmov.i16 q8, #0 -+ vmov.i16 q9, #(1 << BIT_DEPTH) - 1 -+ vmax.s16 q0, q0, q8 -+ vmax.s16 q1, q1, q8 -+ vmin.s16 q0, q0, q9 -+ vmin.s16 q1, q1, q9 -+ vst1.16 {d0}, [r0 :64], r1 -+ vst1.16 {d1}, [ip :64], r1 -+ vst1.16 {d2}, [r0 :64] -+ vst1.16 {d3}, [ip :64] -+ bx lr -+ -+endfunc -+ -+ -+@ add_residual8x8( -+@ uint16_t *_dst, [r0] -+@ int16_t *res, [r1] -+@ ptrdiff_t stride) [r2] -+ -+function JOIN(ff_hevc_rpi_add_residual_8x8_neon_, BIT_DEPTH), export=1 -+ mov r3, #8 -+ vmov.i64 q8, #0 -+ add ip, r0, r2 -+ vmov.i16 q9, #(1 << BIT_DEPTH) - 1 -+ lsl r2, #1 -+1: -+ vldm r1!, {q10-q13} -+ vld1.16 {q0}, [r0 :128], r2 -+ vld1.16 {q1}, [ip :128], r2 -+ vld1.16 {q2}, [r0 :128] -+ vld1.16 {q3}, [ip :128] -+ sub r0, r2 -+ vqadd.s16 q0, q10 -+ sub ip, r2 -+ vqadd.s16 q1, q11 -+ subs r3, #4 -+ vqadd.s16 q2, q12 -+ vqadd.s16 q3, q13 -+ clip16_4 q0, q1, q2, q3, q8, q9 -+ vst1.16 {q0}, [r0 :128], r2 -+ vst1.16 {q1}, [ip :128], r2 -+ vst1.16 {q2}, [r0 :128], r2 -+ vst1.16 {q3}, [ip :128], r2 -+ bne 1b -+ bx lr -+ -+endfunc -+ -+@ add_residual4x4_dc_c( -+@ uint16_t *_dst, [r0] -+@ ptrdiff_t stride, [r1] -+@ int dc_uv) [r2] -+ -+function JOIN(ff_hevc_rpi_add_residual_4x4_dc_c_neon_, BIT_DEPTH), export=1 -+ mov r3, #4 -+ vdup.32 q15, r2 -+ b 9f -+endfunc -+ -+@ add_residual8x8_dc( -+@ uint16_t *_dst, [r0] -+@ ptrdiff_t stride, [r1] -+@ int dc) [r2] -+ -+function JOIN(ff_hevc_rpi_add_residual_8x8_dc_neon_, BIT_DEPTH), export=1 -+ vdup.16 q15, r2 -+ mov r3, #8 -+9: -+ vmov.i16 q8, #0 -+ add ip, r0, r1 -+ vmov.i16 q9, #(1 << BIT_DEPTH) - 1 -+ lsl r1, #1 -+1: -+ vld1.16 {q0}, [r0 :128], r1 -+ vld1.16 {q1}, [ip :128], r1 -+ vld1.16 {q2}, [r0 :128] -+ vld1.16 {q3}, [ip :128] -+ sub r0, r1 -+ vqadd.s16 q0, q15 -+ sub ip, r1 -+ vqadd.s16 q1, q15 -+ subs r3, #4 -+ vqadd.s16 q2, q15 -+ vqadd.s16 q3, q15 -+ clip16_4 q0, q1, q2, q3, q8, q9 -+ vst1.16 {q0}, [r0 :128], r1 -+ vst1.16 {q1}, [ip :128], r1 -+ vst1.16 {q2}, [r0 :128], r1 -+ vst1.16 {q3}, [ip :128], r1 -+ bne 1b -+ bx lr -+ -+endfunc -+ -+@ add_residual16x16( -+@ uint16_t *_dst, [r0] -+@ int16_t *res, [r1] -+@ ptrdiff_t stride) [r2] -+ -+function JOIN(ff_hevc_rpi_add_residual_16x16_neon_, BIT_DEPTH), export=1 -+ add ip, r0, r2 -+ vmov.i16 q8, #0 -+ lsl r2, #1 -+ vmov.i16 q9, #(1 << BIT_DEPTH) - 1 -+ mov r3, #16 -+1: -+ vldm r1!, {q10-q13} -+ @ For RPI Sand we could guarantee :256 but not for general -+ @ non-RPI allocation. :128 is as good as we can claim -+ vld1.16 {q0, q1}, [r0 :128] -+ subs r3, #2 -+ vld1.16 {q2, q3}, [ip :128] -+ vqadd.s16 q0, q10 -+ vqadd.s16 q1, q11 -+ vqadd.s16 q2, q12 -+ vqadd.s16 q3, q13 -+ clip16_4 q0, q1, q2, q3, q8, q9 -+ vst1.16 {q0, q1}, [r0 :128], r2 -+ vst1.16 {q2, q3}, [ip :128], r2 -+ bne 1b -+ bx lr -+endfunc -+ -+@ add_residual8x8_dc_c( -+@ uint16_t *_dst, [r0] -+@ ptrdiff_t stride, [r1] -+@ int dc_uv) [r2] -+ -+function JOIN(ff_hevc_rpi_add_residual_8x8_dc_c_neon_, BIT_DEPTH), export=1 -+ mov r3, #8 -+ vdup.32 q15, r2 -+ b 9f -+endfunc -+ -+@ add_residual16x16_dc( -+@ uint16_t *_dst, [r0] -+@ ptrdiff_t stride, [r1] -+@ int dc) [r2] -+ -+function JOIN(ff_hevc_rpi_add_residual_16x16_dc_neon_, BIT_DEPTH), export=1 -+ vdup.i16 q15, r2 -+ mov r3, #16 -+9: -+ vmov.i16 q8, #0 -+ add ip, r0, r1 -+ vmov.i16 q9, #(1 << BIT_DEPTH) - 1 -+ lsl r1, #1 -+1: -+ @ For RPI Sand we could guarantee :256 but not for general -+ @ non-RPI allocation. :128 is as good as we can claim -+ vld1.16 {q0, q1}, [r0 :128] -+ subs r3, #2 -+ vqadd.s16 q0, q15 -+ vqadd.s16 q1, q15 -+ vld1.16 {q2, q3}, [ip :128] -+ vqadd.s16 q2, q15 -+ vqadd.s16 q3, q15 -+ clip16_4 q0, q1, q2, q3, q8, q9 -+ vst1.16 {q0, q1}, [r0 :128], r1 -+ vst1.16 {q2, q3}, [ip :128], r1 -+ bne 1b -+ bx lr -+ -+endfunc -+ -+ -+@ add_residual32x32( -+@ uint16_t *_dst, [r0] -+@ int16_t *res, [r1] -+@ ptrdiff_t stride) [r2] -+ -+function JOIN(ff_hevc_rpi_add_residual_32x32_neon_, BIT_DEPTH), export=1 -+ push {lr} -+ mov r3, #32 -+ vmov.i16 q8, #0 -+ add lr, r0, r2 -+ vmov.i16 q9, #(1 << BIT_DEPTH) - 1 -+ add ip, r0, #32 -+1: -+ vldm r1!, {q10-q13} -+ vldm r0, {q0-q3} -+ vqadd.s16 q0, q10 -+ pldw [lr] -+ vqadd.s16 q1, q11 -+ add lr, r2 -+ vqadd.s16 q2, q12 -+ subs r3, #1 -+ vqadd.s16 q3, q13 -+ clip16_4 q0, q1, q2, q3, q8, q9 -+ vst1.16 {q0-q1}, [r0], r2 -+ vst1.16 {q2-q3}, [ip], r2 -+ bne 1b -+ pop {pc} -+ -+endfunc -+ -+@ add_residual16x16_dc_c( -+@ uint16_t *_dst, [r0] -+@ ptrdiff_t stride, [r1] -+@ int dc_uv) [r2] -+ -+function JOIN(ff_hevc_rpi_add_residual_16x16_dc_c_neon_, BIT_DEPTH), export=1 -+ mov r3, #16 -+ vdup.32 q15, r2 -+ b 9f -+endfunc -+ -+@ add_residual32x32_dc( -+@ uint16_t *_dst, [r0] -+@ ptrdiff_t stride, [r1] -+@ int dc) [r2] -+ -+function JOIN(ff_hevc_rpi_add_residual_32x32_dc_neon_, BIT_DEPTH), export=1 -+ vdup.16 q15, r2 -+ mov r3, #32 -+9: -+ vmov.i16 q8, #0 -+ vmov.i16 q9, #(1 << BIT_DEPTH) - 1 -+ add ip, r0, #32 -+1: -+ vldm r0, {q0-q3} -+ vqadd.s16 q0, q15 -+ subs r3, #1 -+ vqadd.s16 q1, q15 -+ vqadd.s16 q2, q15 -+ vqadd.s16 q3, q15 -+ clip16_4 q0, q1, q2, q3, q8, q9 -+ vst1.16 {q0-q1}, [r0], r1 -+ vst1.16 {q2-q3}, [ip], r1 -+ bne 1b -+ bx lr -+ -+endfunc -+ -+@ ============================================================================ -+@ U add -+ -+@ add_residual4x4_u( -+@ uint16_t *_dst, [r0] -+@ const int16_t *res, [r1] -+@ ptrdiff_t stride, [r2] -+@ int dc) [r3] -+ -+function JOIN(ff_hevc_rpi_add_residual_4x4_u_neon_, BIT_DEPTH), export=1 -+ vdup.16 q15, r3 -+ add ip, r0, r2 -+ vld1.16 {q10, q11}, [r1 :256] -+ lsl r2, #1 -+ vld2.16 {d0, d2}, [r0 :128], r2 -+ vld2.16 {d1, d3}, [ip :128], r2 -+ vld2.16 {d4, d6}, [r0 :128] -+ vld2.16 {d5, d7}, [ip :128] -+ sub r0, r2 -+ vmov.i16 q8, #0 -+ sub ip, r2 -+ vmov.i16 q9, #(1 << BIT_DEPTH) - 1 -+ -+ vqadd.s16 q0, q10 -+ vqadd.s16 q1, q15 -+ vqadd.s16 q2, q11 -+ vqadd.s16 q3, q15 -+ clip16_4 q0, q1, q2, q3, q8, q9 -+ -+ vst2.16 {d0, d2}, [r0 :128], r2 -+ vst2.16 {d1, d3}, [ip :128], r2 -+ vst2.16 {d4, d6}, [r0 :128] -+ vst2.16 {d5, d7}, [ip :128] -+ bx lr -+endfunc -+ -+@ add_residual8x8_u( -+@ uint16_t *_dst, [r0] -+@ const int16_t *res, [r1] -+@ ptrdiff_t stride, [r2] -+@ int dc) [r3] -+ -+function JOIN(ff_hevc_rpi_add_residual_8x8_u_neon_, BIT_DEPTH), export=1 -+ vdup.16 q15, r3 -+ mov r3, #8 -+ vmov.i16 q8, #0 -+ add ip, r0, r2 -+ vmov.i16 q9, #(1 << BIT_DEPTH) - 1 -+ lsl r2, #1 -+1: -+ vld2.16 {q0, q1}, [r0 :256] -+ subs r3, #2 -+ vld2.16 {q2, q3}, [ip :256] -+ vld1.16 {q10, q11}, [r1 :256]! -+ vqadd.s16 q0, q10 -+ vqadd.s16 q1, q15 -+ vqadd.s16 q2, q11 -+ vqadd.s16 q3, q15 -+ clip16_4 q0, q1, q2, q3, q8, q9 -+ vst2.16 {q0, q1}, [r0 :256], r2 -+ vst2.16 {q2, q3}, [ip :256], r2 -+ bne 1b -+ bx lr -+endfunc -+ -+@ add_residual16x16_u( -+@ uint16_t *_dst, [r0] -+@ const int16_t *res, [r1] -+@ ptrdiff_t stride, [r2] -+@ int dc) [r3] -+ -+function JOIN(ff_hevc_rpi_add_residual_16x16_u_neon_, BIT_DEPTH), export=1 -+ push {lr} -+ vdup.16 q15, r3 -+ mov r3, #16 -+ vmov.i16 q8, #0 -+ add lr, r0, r2 -+ vmov.i16 q9, #(1 << BIT_DEPTH) - 1 -+ add ip, r0, #32 -+1: -+ vld2.16 {q0, q1}, [r0 :256] -+ vld2.16 {q2, q3}, [ip :256] -+ vld1.16 {q10, q11}, [r1 :256]! -+ vqadd.s16 q0, q10 -+ pldw [lr] -+ vqadd.s16 q1, q15 -+ add lr, r2 -+ vqadd.s16 q2, q11 -+ subs r3, #1 -+ vqadd.s16 q3, q15 -+ clip16_4 q0, q1, q2, q3, q8, q9 -+ vst2.16 {q0, q1}, [r0 :256], r2 -+ vst2.16 {q2, q3}, [ip :256], r2 -+ bne 1b -+ pop {pc} -+endfunc -+ -+@ ============================================================================ -+@ V add -+ -+@ add_residual4x4_v( -+@ uint16_t *_dst, [r0] -+@ const int16_t *res, [r1] -+@ ptrdiff_t stride, [r2] -+@ int dc) [r3] -+ -+function JOIN(ff_hevc_rpi_add_residual_4x4_v_neon_, BIT_DEPTH), export=1 -+ vdup.16 q15, r3 -+ add ip, r0, r2 -+ vld1.16 {q10, q11}, [r1 :256] -+ lsl r2, #1 -+ vld2.16 {d0, d2}, [r0 :128], r2 -+ vld2.16 {d1, d3}, [ip :128], r2 -+ vld2.16 {d4, d6}, [r0 :128] -+ vld2.16 {d5, d7}, [ip :128] -+ sub r0, r2 -+ vmov.i16 q8, #0 -+ sub ip, r2 -+ vmov.i16 q9, #(1 << BIT_DEPTH) - 1 -+ -+ vqadd.s16 q0, q15 -+ vqadd.s16 q1, q10 -+ vqadd.s16 q2, q15 -+ vqadd.s16 q3, q11 -+ clip16_4 q0, q1, q2, q3, q8, q9 -+ -+ vst2.16 {d0, d2}, [r0 :128], r2 -+ vst2.16 {d1, d3}, [ip :128], r2 -+ vst2.16 {d4, d6}, [r0 :128] -+ vst2.16 {d5, d7}, [ip :128] -+ bx lr -+endfunc -+ -+@ add_residual8x8_v( -+@ uint16_t *_dst, [r0] -+@ const int16_t *res, [r1] -+@ ptrdiff_t stride, [r2] -+@ int dc) [r3] -+ -+function JOIN(ff_hevc_rpi_add_residual_8x8_v_neon_, BIT_DEPTH), export=1 -+ vdup.16 q15, r3 -+ mov r3, #8 -+ vmov.i16 q8, #0 -+ add ip, r0, r2 -+ vmov.i16 q9, #(1 << BIT_DEPTH) - 1 -+ lsl r2, #1 -+1: -+ vld2.16 {q0, q1}, [r0 :256] -+ subs r3, #2 -+ vld2.16 {q2, q3}, [ip :256] -+ vld1.16 {q10, q11}, [r1 :256]! -+ vqadd.s16 q0, q15 -+ vqadd.s16 q1, q10 -+ vqadd.s16 q2, q15 -+ vqadd.s16 q3, q11 -+ clip16_4 q0, q1, q2, q3, q8, q9 -+ vst2.16 {q0, q1}, [r0 :256], r2 -+ vst2.16 {q2, q3}, [ip :256], r2 -+ bne 1b -+ bx lr -+endfunc -+ -+@ add_residual16x16_v( -+@ uint16_t *_dst, [r0] -+@ const int16_t *res, [r1] -+@ ptrdiff_t stride, [r2] -+@ int dc) [r3] -+ -+function JOIN(ff_hevc_rpi_add_residual_16x16_v_neon_, BIT_DEPTH), export=1 -+ push {lr} -+ vdup.16 q15, r3 -+ mov r3, #16 -+ vmov.i16 q8, #0 -+ add lr, r0, r2 -+ vmov.i16 q9, #(1 << BIT_DEPTH) - 1 -+ add ip, r0, #32 -+1: -+ vld2.16 {q0, q1}, [r0 :256] -+ vld2.16 {q2, q3}, [ip :256] -+ vld1.16 {q10, q11}, [r1 :256]! -+ vqadd.s16 q0, q15 -+ pldw [lr] -+ vqadd.s16 q1, q10 -+ add lr, r2 -+ vqadd.s16 q2, q15 -+ subs r3, #1 -+ vqadd.s16 q3, q11 -+ clip16_4 q0, q1, q2, q3, q8, q9 -+ vst2.16 {q0, q1}, [r0 :256], r2 -+ vst2.16 {q2, q3}, [ip :256], r2 -+ bne 1b -+ pop {pc} -+endfunc -+ -+@ ============================================================================ -+@ U & V add -+ -+@ add_residual4x4_c( -+@ uint16_t *_dst, [r0] -+@ const int16_t *res, [r1] -+@ ptrdiff_t stride) [r2] -+ -+function JOIN(ff_hevc_rpi_add_residual_4x4_c_neon_, BIT_DEPTH), export=1 -+ vmov.i16 q8, #0 -+ add ip, r0, r2 -+ vmov.i16 q9, #(1 << BIT_DEPTH) - 1 -+ lsl r2, #1 -+ vldm r1, {q10-q13} -+ vld2.16 {d0, d2}, [r0 :128], r2 -+ vld2.16 {d1, d3}, [ip :128], r2 -+ vld2.16 {d4, d6}, [r0 :128] -+ vld2.16 {d5, d7}, [ip :128] -+ -+ sub r0, r2 -+ vqadd.s16 q0, q10 -+ sub ip, r2 -+ vqadd.s16 q1, q12 -+ vqadd.s16 q2, q11 -+ vqadd.s16 q3, q13 -+ clip16_4 q0, q1, q2, q3, q8, q9 -+ -+ vst2.16 {d0, d2}, [r0 :128], r2 -+ vst2.16 {d1, d3}, [ip :128], r2 -+ vst2.16 {d4, d6}, [r0 :128] -+ vst2.16 {d5, d7}, [ip :128] -+ bx lr -+endfunc -+ -+@ add_residual8x8_c( -+@ uint16_t *_dst, [r0] -+@ const int16_t *res, [r1] -+@ ptrdiff_t stride) [r2] -+ -+function JOIN(ff_hevc_rpi_add_residual_8x8_c_neon_, BIT_DEPTH), export=1 -+ push {lr} -+ add ip, r0, r2 -+ lsl r2, #1 -+ vmov.i16 q8, #0 -+ add r3, r1, #(8*8*2) @ Offset to V -+ vmov.i16 q9, #(1 << BIT_DEPTH) - 1 -+ mov lr, #8 -+1: -+ vld1.16 {q10, q11}, [r1 :256]! -+ subs lr, #2 -+ vld2.16 {q0, q1}, [r0 :256] -+ vld2.16 {q2, q3}, [ip :256] -+ vld1.16 {q12, q13}, [r3 :256]! -+ vqadd.s16 q0, q10 -+ vqadd.s16 q1, q12 -+ vqadd.s16 q2, q11 -+ vqadd.s16 q3, q13 -+ clip16_4 q0, q1, q2, q3, q8, q9 -+ vst2.16 {q0, q1}, [r0 :256], r2 -+ vst2.16 {q2, q3}, [ip :256], r2 -+ bne 1b -+ pop {pc} -+endfunc -+ -+@ add_residual16x16_c( -+@ uint16_t *_dst, [r0] -+@ const int16_t *res, [r1] -+@ ptrdiff_t stride) [r2] -+ -+function JOIN(ff_hevc_rpi_add_residual_16x16_c_neon_, BIT_DEPTH), export=1 -+ push {r4, lr} -+ vmov.i16 q8, #0 -+ add r3, r1, #(16*16*2) @ Offset to V -+ vmov.i16 q9, #(1 << BIT_DEPTH) - 1 -+ add ip, r0, #32 -+ add r4, r0, r2 -+ mov lr, #16 -+1: -+ vld2.16 {q0, q1}, [r0 :256] -+ vld2.16 {q2, q3}, [ip :256] -+ vld1.16 {q10, q11}, [r1 :256]! -+ vld1.16 {q12, q13}, [r3 :256]! -+ vqadd.s16 q0, q10 -+ pldw [r4] -+ vqadd.s16 q1, q12 -+ add r4, r2 -+ vqadd.s16 q2, q11 -+ subs lr, #1 -+ vqadd.s16 q3, q13 -+ clip16_4 q0, q1, q2, q3, q8, q9 -+ vst2.16 {q0, q1}, [r0 :256], r2 -+ vst2.16 {q2, q3}, [ip :256], r2 -+ bne 1b -+ pop {r4,pc} -+endfunc -+ ---- /dev/null -+++ b/libavcodec/arm/rpi_hevcdsp_res8_neon.S -@@ -0,0 +1,741 @@ -+/* -+Copyright (c) 2017 Raspberry Pi (Trading) Ltd. -+All rights reserved. -+ -+Redistribution and use in source and binary forms, with or without -+modification, are permitted provided that the following conditions are met: -+ * Redistributions of source code must retain the above copyright -+ notice, this list of conditions and the following disclaimer. -+ * Redistributions in binary form must reproduce the above copyright -+ notice, this list of conditions and the following disclaimer in the -+ documentation and/or other materials provided with the distribution. -+ * Neither the name of the copyright holder nor the -+ names of its contributors may be used to endorse or promote products -+ derived from this software without specific prior written permission. -+ -+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ -+Authors: John Cox, Ben Avison -+*/ -+ -+#include "libavutil/arm/asm.S" -+#include "neon.S" -+ -+ .arch_extension mp @ enable PLDW -+ -+@ General notes: -+@ -+@ Residual is generally only guaranteed to be clipped to 16 bits. -+@ This means that we do need to do vmovl, vqadd, vqmovun -+@ rather than vaddw, vqmovun (if we were clipped to 15 then we could get away -+@ with this). -+@ -+@ There is an exception for the DC case because its transform is guaranteed -+@ to be small enough that overflow cannot occur during the first add. -+ -+@ ============================================================================ -+@ Y add -+ -+function ff_hevc_rpi_add_residual_4x4_neon_8, export=1 -+ add ip, r0, r2 -+ vld1.16 {q0, q1}, [r1] -+ lsl r2, #1 -+ vld1.32 d4[0], [r0], r2 -+ rsb r3, r2, #0 -+ vld1.32 d4[1], [ip], r2 -+ vld1.32 d5[0], [r0], r3 -+ vld1.32 d5[1], [ip], r3 -+ vmovl.u8 q8, d4 -+ vmovl.u8 q9, d5 -+ vqadd.s16 q0, q8 -+ vqadd.s16 q1, q9 -+ vqmovun.s16 d0, q0 -+ vqmovun.s16 d1, q1 -+ vst1.32 d0[0], [r0], r2 -+ vst1.32 d0[1], [ip], r2 -+ vst1.32 d1[0], [r0] -+ vst1.32 d1[1], [ip] -+ bx lr -+endfunc -+ -+function ff_hevc_rpi_add_residual_8x8_neon_8, export=1 -+ push {r4, lr} -+ vld1.16 {q0, q1}, [r1]! -+ add ip, r0, r2 -+ vld1.8 {d6}, [r0] -+ add r4, r0, r2, lsl #1 -+ vld1.8 {d7}, [ip] -+ add lr, ip, r2, lsl #1 -+ lsl r2, #1 -+ mov r3, #8-2 -+ vmovl.u8 q2, d6 -+ vmovl.u8 q3, d7 -+ vqadd.s16 q2, q0 -+ vqadd.s16 q3, q1 -+1: -+ vld1.16 {q0, q1}, [r1]! -+ subs r3, #2 -+ vqmovun.s16 d4, q2 -+ vqmovun.s16 d5, q3 -+ vld1.8 {d6}, [r4], r2 -+ vld1.8 {d7}, [lr], r2 -+ vst1.8 {d4}, [r0], r2 -+ vst1.8 {d5}, [ip], r2 -+ vmovl.u8 q2, d6 -+ pldw [r4] -+ vmovl.u8 q3, d7 -+ vqadd.s16 q2, q0 -+ vqadd.s16 q3, q1 -+ bne 1b -+ -+ vqmovun.s16 d4, q2 -+ vqmovun.s16 d5, q3 -+ vst1.8 {d4}, [r0] -+ vst1.8 {d5}, [ip] -+ pop {r4, pc} -+endfunc -+ -+function ff_hevc_rpi_add_residual_16x16_neon_8, export=1 -+ vld1.16 {q0, q1}, [r1]! -+ add ip, r0, r2 -+ vld1.8 {q3}, [r0] -+ mov r3, #16-1 -+ vmovl.u8 q2, d6 -+ vmovl.u8 q3, d7 -+ vqadd.s16 q2, q0 -+ vqadd.s16 q3, q1 -+1: -+ vld1.16 {q0, q1}, [r1]! -+ subs r3, #1 -+ vqmovun.s16 d4, q2 -+ vqmovun.s16 d5, q3 -+ vld1.8 {q3}, [ip], r2 -+ vst1.8 {q2}, [r0], r2 -+ vmovl.u8 q2, d6 -+ pldw [ip] -+ vmovl.u8 q3, d7 -+ vqadd.s16 q2, q0 -+ vqadd.s16 q3, q1 -+ bne 1b -+ -+ vqmovun.s16 d4, q2 -+ vqmovun.s16 d5, q3 -+ vst1.8 {q2}, [r0] -+ bx lr -+endfunc -+ -+function ff_hevc_rpi_add_residual_32x32_neon_8, export=1 -+ vldm r1!, {q0-q3} -+ vld1.8 {q8, q9}, [r0] -+ add ip, r0, r2 -+ vmovl.u8 q10, d16 -+ mov r3, #32-1 -+ vmovl.u8 q11, d17 -+ vmovl.u8 q12, d18 -+ vmovl.u8 q13, d19 -+ vqadd.s16 q10, q0 -+ vqadd.s16 q11, q1 -+ vqadd.s16 q12, q2 -+ vqadd.s16 q13, q3 -+1: -+ vldm r1!, {q0-q3} -+ vqmovun.s16 d20, q10 -+ vqmovun.s16 d21, q11 -+ vqmovun.s16 d22, q12 -+ vqmovun.s16 d23, q13 -+ vld1.8 {q8, q9}, [ip], r2 -+ subs r3, #1 -+ vst1.8 {q10, q11}, [r0], r2 -+ vmovl.u8 q10, d16 -+ pldw [ip] -+ vmovl.u8 q11, d17 -+ vmovl.u8 q12, d18 -+ vmovl.u8 q13, d19 -+ vqadd.s16 q10, q0 -+ vqadd.s16 q11, q1 -+ vqadd.s16 q12, q2 -+ vqadd.s16 q13, q3 -+ bne 1b -+ -+ vqmovun.s16 d20, q10 -+ vqmovun.s16 d21, q11 -+ vqmovun.s16 d22, q12 -+ vqmovun.s16 d23, q13 -+ vst1.8 {q10, q11}, [r0] -+ bx lr -+endfunc -+ -+ -+@ ff_hevc_rpi_add_residual_4x4_dc_neon_8( -+@ uint8_t * dst, // [r0] -+@ unsigned int stride, // [r1] -+@ int dc) // [r2] -+ -+function ff_hevc_rpi_add_residual_4x4_dc_neon_8, export=1 -+ add ip, r0, r1 -+ vdup.16 q15, r2 -+ lsl r1, #1 -+ vld1.32 d4[0], [r0], r1 -+ rsb r3, r1, #0 -+ vld1.32 d4[1], [ip], r1 -+ vld1.32 d5[0], [r0], r3 -+ vld1.32 d5[1], [ip], r3 -+ vaddw.u8 q0, q15, d4 -+ vaddw.u8 q1, q15, d5 -+ vqmovun.s16 d0, q0 -+ vqmovun.s16 d1, q1 -+ vst1.32 d0[0], [r0], r1 -+ vst1.32 d0[1], [ip], r1 -+ vst1.32 d1[0], [r0] -+ vst1.32 d1[1], [ip] -+ bx lr -+endfunc -+ -+@ ============================================================================ -+@ DC Y or C add -+ -+@ ff_hevc_rpi_add_residual_4x4_dc_c_neon_8( -+@ uint8_t * dst, // [r0] -+@ unsigned int stride, // [r1] -+@ int dc) // [r2] -+ -+function ff_hevc_rpi_add_residual_4x4_dc_c_neon_8, export=1 -+ mov r3, #4-2 -+ vdup.32 q15, r2 -+ b 1f -+endfunc -+ -+@ ff_hevc_rpi_add_residual_8x8_dc_neon_8( -+@ uint8_t * dst, // [r0] -+@ unsigned int stride, // [r1] -+@ int dc) // [r2] -+ -+function ff_hevc_rpi_add_residual_8x8_dc_neon_8, export=1 -+ vdup.16 q15, r2 -+ mov r3, #8-2 -+1: vld1.8 d16, [r0] -+ add ip, r0, r1 -+ push {r4, lr} -+ vld1.8 d17, [ip] -+ add r4, r0, r1, lsl #1 -+ vaddw.u8 q0, q15, d16 -+ lsl r1, #1 -+ vaddw.u8 q1, q15, d17 -+ add lr, ip, r1 -+1: -+ vld1.8 {d16}, [r4], r1 -+ vld1.8 {d17}, [lr], r1 -+ subs r3, #2 -+ vqmovun.s16 d4, q0 -+ vqmovun.s16 d5, q1 -+ vaddw.u8 q0, q15, d16 -+ vaddw.u8 q1, q15, d17 -+ vst1.8 {d4}, [r0], r1 -+ vst1.8 {d5}, [ip], r1 -+ bne 1b -+ -+ vqmovun.s16 d4, q0 -+ vqmovun.s16 d5, q1 -+ vst1.8 {d4}, [r0] -+ vst1.8 {d5}, [ip] -+ pop {r4, pc} -+endfunc -+ -+ -+@ ff_hevc_rpi_add_residual_8x8_dc_c_neon_8( -+@ uint8_t * dst, // [r0] -+@ unsigned int stride, // [r1] -+@ int dc) // [r2] -+ -+function ff_hevc_rpi_add_residual_8x8_dc_c_neon_8, export=1 -+ mov r3, #8-1 -+ vdup.32 q15, r2 -+ b 1f -+endfunc -+ -+@ ff_hevc_rpi_add_residual_16x16_dc_neon_8( -+@ uint8_t * dst, // [r0] -+@ unsigned int stride, // [r1] -+@ int dc) // [r2] -+ -+function ff_hevc_rpi_add_residual_16x16_dc_neon_8, export=1 -+ vdup.16 q15, r2 -+ mov r3, #16-1 -+1: vld1.8 {q8}, [r0] -+ add ip, r0, r1 -+ vaddw.u8 q0, q15, d16 -+ vaddw.u8 q1, q15, d17 -+1: -+ vld1.8 {q8}, [ip], r1 -+ subs r3, #1 -+ vqmovun.s16 d4, q0 -+ vqmovun.s16 d5, q1 -+ vaddw.u8 q0, q15, d16 -+ vaddw.u8 q1, q15, d17 -+ vst1.8 {q2}, [r0], r1 -+ bne 1b -+ -+ vqmovun.s16 d4, q0 -+ vqmovun.s16 d5, q1 -+ vst1.8 {q2}, [r0] -+ bx lr -+endfunc -+ -+ -+@ ff_hevc_rpi_add_residual_16x16_dc_c_neon_8( -+@ uint8_t * dst, // [r0] -+@ unsigned int stride, // [r1] -+@ int dc) // [r2] -+ -+function ff_hevc_rpi_add_residual_16x16_dc_c_neon_8, export=1 -+ mov r3, #16-1 -+ vdup.32 q15, r2 -+ b 1f -+endfunc -+ -+@ ff_hevc_rpi_add_residual_32x32_dc_neon_8( -+@ uint8_t * dst, // [r0] -+@ unsigned int stride, // [r1] -+@ int dc) // [r2] -+ -+function ff_hevc_rpi_add_residual_32x32_dc_neon_8, export=1 -+ vdup.16 q15, r2 -+ mov r3, #32-1 -+1: vld1.8 {q8, q9}, [r0] -+ add ip, r0, r1 -+ vaddw.u8 q0, q15, d16 -+ vaddw.u8 q1, q15, d17 -+ vaddw.u8 q2, q15, d18 -+ vaddw.u8 q3, q15, d19 -+1: -+ vqmovun.s16 d20, q0 -+ vqmovun.s16 d21, q1 -+ vqmovun.s16 d22, q2 -+ vqmovun.s16 d23, q3 -+ vld1.8 {q8, q9}, [ip], r1 -+ subs r3, #1 -+ vaddw.u8 q0, q15, d16 -+ vaddw.u8 q1, q15, d17 -+ vaddw.u8 q2, q15, d18 -+ vaddw.u8 q3, q15, d19 -+ vst1.8 {q10, q11}, [r0], r1 -+ bne 1b -+ -+ vqmovun.s16 d20, q0 -+ vqmovun.s16 d21, q1 -+ vqmovun.s16 d22, q2 -+ vqmovun.s16 d23, q3 -+ vst1.8 {q10, q11}, [r0] -+ bx lr -+endfunc -+ -+@ ============================================================================ -+@ U add -+ -+@ add_residual4x4_c( -+@ uint8_t *_dst, [r0] -+@ const int16_t *res, [r1] -+@ ptrdiff_t stride, [r2] -+@ int dc_v) [r3] -+ -+function ff_hevc_rpi_add_residual_4x4_u_neon_8, export=1 -+ add ip, r0, r2 -+ vld1.16 {q0, q1}, [r1] -+ lsl r2, #1 -+ vld1.8 {d16}, [r0 :64], r2 -+ vld1.8 {d17}, [ip :64], r2 -+ vld1.8 {d18}, [r0 :64] -+ sub r0, r2 -+ vld1.8 {d19}, [ip :64] -+ sub ip, r2 -+ vdup.16 q2, r3 -+ vdup.16 q3, r3 -+ vmovl.u8 q10, d16 -+ vmovl.u8 q11, d17 -+ vmovl.u8 q12, d18 -+ vmovl.u8 q13, d19 -+ vzip.16 q0, q2 -+ vzip.16 q1, q3 -+ vqadd.s16 q0, q10 -+ vqadd.s16 q2, q11 -+ vqadd.s16 q1, q12 -+ vqadd.s16 q3, q13 -+ vqmovun.s16 d0, q0 -+ vqmovun.s16 d1, q2 -+ vqmovun.s16 d2, q1 -+ vqmovun.s16 d3, q3 -+ vst1.8 {d0}, [r0 :64], r2 -+ vst1.8 {d1}, [ip :64], r2 -+ vst1.8 {d2}, [r0 :64] -+ vst1.8 {d3}, [ip :64] -+ bx lr -+endfunc -+ -+@ add_residual8x8_c( -+@ uint8_t *_dst, [r0] -+@ const int16_t *res, [r1] -+@ ptrdiff_t stride) [r2] -+@ int dc_v) [r3] -+ -+function ff_hevc_rpi_add_residual_8x8_u_neon_8, export=1 -+ vdup.16 q15, r3 -+ add ip, r0, r2 -+ push {r4, lr} -+ vld2.8 {d16, d17}, [r0 :128] -+ lsl r2, #1 -+ vld2.8 {d18, d19}, [ip :128] -+ mov r3, #8-2 -+ vld1.16 {q0, q1}, [r1 :256]! -+ add r4, r0, r2 -+ vmovl.u8 q10, d16 -+ add lr, ip, r2 -+ vmovl.u8 q11, d18 -+ vqadd.s16 q0, q10 -+ vaddw.u8 q2, q15, d17 -+ vqadd.s16 q1, q11 -+ vaddw.u8 q3, q15, d19 -+1: -+ vqmovun.s16 d20, q0 -+ vqmovun.s16 d21, q2 -+ vld2.8 {d16, d17}, [r4 :128], r2 -+ subs r3, #2 -+ vqmovun.s16 d22, q1 -+ vqmovun.s16 d23, q3 -+ vst2.8 {d20, d21}, [r0 :128], r2 -+ vld2.8 {d18, d19}, [lr :128], r2 -+ vst2.8 {d22, d23}, [ip :128], r2 -+ vld1.16 {q0, q1}, [r1 :256]! -+ vmovl.u8 q10, d16 -+ vmovl.u8 q11, d18 -+ vqadd.s16 q0, q10 -+ vaddw.u8 q2, q15, d17 -+ vqadd.s16 q1, q11 -+ vaddw.u8 q3, q15, d19 -+ bne 1b -+ -+ vqmovun.s16 d20, q0 -+ vqmovun.s16 d21, q2 -+ vqmovun.s16 d22, q1 -+ vqmovun.s16 d23, q3 -+ vst2.8 {d20, d21}, [r0 :128] -+ vst2.8 {d22, d23}, [ip :128] -+ pop {r4, pc} -+endfunc -+ -+@ add_residual16x16_u( -+@ uint8_t *_dst, [r0] -+@ const int16_t *res, [r1] -+@ ptrdiff_t stride) [r2] -+@ int dc_v) [r3] -+ -+function ff_hevc_rpi_add_residual_16x16_u_neon_8, export=1 -+ vdup.16 q15, r3 -+ add ip, r0, r2 -+ vld2.8 {q8, q9}, [r0 :256] -+ mov r3, #16-1 -+ vld1.16 {q0, q1}, [r1 :256]! -+ vmovl.u8 q11, d16 -+ vmovl.u8 q12, d17 -+ vqadd.s16 q0, q11 -+ vaddw.u8 q11, q15, d18 -+ vqadd.s16 q1, q12 -+ vaddw.u8 q12, q15, d19 -+1: -+ vld2.8 {q8, q9}, [ip :256], r2 -+ subs r3, #1 -+ vqmovun.s16 d20, q0 -+ vqmovun.s16 d22, q11 -+ vqmovun.s16 d21, q1 -+ vqmovun.s16 d23, q12 -+ vld1.16 {q0, q1}, [r1 :256]! -+ vst2.8 {q10, q11}, [r0 :256], r2 -+ vmovl.u8 q11, d16 -+ pldw [ip] -+ vmovl.u8 q12, d17 -+ vqadd.s16 q0, q11 -+ vaddw.u8 q11, q15, d18 -+ vqadd.s16 q1, q12 -+ vaddw.u8 q12, q15, d19 -+ bne 1b -+ -+ vqmovun.s16 d20, q0 -+ vqmovun.s16 d22, q11 -+ vqmovun.s16 d21, q1 -+ vqmovun.s16 d23, q12 -+ vst2.8 {q10, q11}, [r0 :256] -+ bx lr -+endfunc -+ -+@ ============================================================================ -+@ V add -+ -+@ add_residual4x4_v( -+@ uint8_t *_dst, [r0] -+@ const int16_t *res, [r1] -+@ ptrdiff_t stride) [r2] -+ -+function ff_hevc_rpi_add_residual_4x4_v_neon_8, export=1 -+ add ip, r0, r2 -+ vld1.16 {q2, q3}, [r1] -+ lsl r2, #1 -+ vld1.8 {d16}, [r0 :64], r2 -+ vld1.8 {d17}, [ip :64], r2 -+ vld1.8 {d18}, [r0 :64] -+ sub r0, r2 -+ vld1.8 {d19}, [ip :64] -+ sub ip, r2 -+ vdup.16 q0, r3 -+ vdup.16 q1, r3 -+ vmovl.u8 q10, d16 -+ vmovl.u8 q11, d17 -+ vmovl.u8 q12, d18 -+ vmovl.u8 q13, d19 -+ vzip.16 q0, q2 -+ vzip.16 q1, q3 -+ vqadd.s16 q0, q10 -+ vqadd.s16 q2, q11 -+ vqadd.s16 q1, q12 -+ vqadd.s16 q3, q13 -+ vqmovun.s16 d0, q0 -+ vqmovun.s16 d1, q2 -+ vqmovun.s16 d2, q1 -+ vqmovun.s16 d3, q3 -+ vst1.8 {d0}, [r0 :64], r2 -+ vst1.8 {d1}, [ip :64], r2 -+ vst1.8 {d2}, [r0 :64] -+ vst1.8 {d3}, [ip :64] -+ bx lr -+endfunc -+ -+@ add_residual8x8_v( -+@ uint8_t *_dst, [r0] -+@ const int16_t *res, [r1] -+@ ptrdiff_t stride) [r2] -+ -+function ff_hevc_rpi_add_residual_8x8_v_neon_8, export=1 -+ vdup.16 q15, r3 -+ add ip, r0, r2 -+ push {r4, lr} -+ vld2.8 {d16, d17}, [r0 :128] -+ lsl r2, #1 -+ vld2.8 {d18, d19}, [ip :128] -+ mov r3, #8-2 -+ vld1.16 {q0, q1}, [r1 :256]! -+ add r4, r0, r2 -+ vmovl.u8 q10, d17 -+ add lr, ip, r2 -+ vmovl.u8 q11, d19 -+ vqadd.s16 q0, q10 -+ vaddw.u8 q2, q15, d16 -+ vqadd.s16 q1, q11 -+ vaddw.u8 q3, q15, d18 -+1: -+ vqmovun.s16 d20, q2 -+ vqmovun.s16 d21, q0 -+ vld2.8 {d16, d17}, [r4 :128], r2 -+ subs r3, #2 -+ vqmovun.s16 d22, q3 -+ vqmovun.s16 d23, q1 -+ vst2.8 {d20, d21}, [r0 :128], r2 -+ vld2.8 {d18, d19}, [lr :128], r2 -+ vst2.8 {d22, d23}, [ip :128], r2 -+ vld1.16 {q0, q1}, [r1 :256]! -+ vmovl.u8 q10, d17 -+ vmovl.u8 q11, d19 -+ vqadd.s16 q0, q10 -+ vaddw.u8 q2, q15, d16 -+ vqadd.s16 q1, q11 -+ vaddw.u8 q3, q15, d18 -+ bne 1b -+ -+ vqmovun.s16 d20, q2 -+ vqmovun.s16 d21, q0 -+ vqmovun.s16 d22, q3 -+ vqmovun.s16 d23, q1 -+ vst2.8 {d20, d21}, [r0 :128] -+ vst2.8 {d22, d23}, [ip :128] -+ pop {r4, pc} -+endfunc -+ -+@ add_residual16x16_v( -+@ uint8_t *_dst, [r0] -+@ const int16_t *res, [r1] -+@ ptrdiff_t stride) [r2] -+ -+function ff_hevc_rpi_add_residual_16x16_v_neon_8, export=1 -+ vdup.16 q15, r3 -+ add ip, r0, r2 -+ vld2.8 {q8, q9}, [r0 :256] -+ mov r3, #16-1 -+ vld1.16 {q0, q1}, [r1 :256]! -+ vmovl.u8 q11, d18 -+ vmovl.u8 q12, d19 -+ vqadd.s16 q0, q11 -+ vaddw.u8 q11, q15, d16 -+ vqadd.s16 q1, q12 -+ vaddw.u8 q12, q15, d17 -+1: -+ vld2.8 {q8, q9}, [ip :256], r2 -+ subs r3, #1 -+ vqmovun.s16 d20, q11 -+ vqmovun.s16 d22, q0 -+ vqmovun.s16 d21, q12 -+ vqmovun.s16 d23, q1 -+ vld1.16 {q0, q1}, [r1 :256]! -+ vst2.8 {q10, q11}, [r0 :256], r2 -+ vmovl.u8 q11, d18 -+ pldw [ip] -+ vmovl.u8 q12, d19 -+ vqadd.s16 q0, q11 -+ vaddw.u8 q11, q15, d16 -+ vqadd.s16 q1, q12 -+ vaddw.u8 q12, q15, d17 -+ bne 1b -+ -+ vqmovun.s16 d20, q11 -+ vqmovun.s16 d22, q0 -+ vqmovun.s16 d21, q12 -+ vqmovun.s16 d23, q1 -+ vst2.8 {q10, q11}, [r0 :256] -+ bx lr -+endfunc -+ -+@ ============================================================================ -+@ U & V add -+ -+@ add_residual4x4_c( -+@ uint8_t *_dst, [r0] -+@ const int16_t *res, [r1] -+@ ptrdiff_t stride) [r2] -+ -+function ff_hevc_rpi_add_residual_4x4_c_neon_8, export=1 -+ add ip, r0, r2 -+ vld1.16 {q0, q1}, [r1]! @ all of U -+ lsl r2, #1 -+ vld1.8 {d16}, [r0 :64], r2 -+ rsb r3, r2, #0 -+ vld1.8 {d17}, [ip :64], r2 -+ vld1.16 {q2, q3}, [r1] @ all of V -+ vld1.8 {d18}, [r0 :64], r3 -+ vld1.8 {d19}, [ip :64], r3 -+ vmovl.u8 q10, d16 -+ vmovl.u8 q11, d17 -+ vmovl.u8 q12, d18 -+ vmovl.u8 q13, d19 -+ vzip.16 q0, q2 -+ vzip.16 q1, q3 -+ vqadd.s16 q0, q10 -+ vqadd.s16 q2, q11 -+ vqadd.s16 q1, q12 -+ vqadd.s16 q3, q13 -+ vqmovun.s16 d0, q0 -+ vqmovun.s16 d1, q2 -+ vqmovun.s16 d2, q1 -+ vqmovun.s16 d3, q3 -+ vst1.8 {d0}, [r0 :64], r2 -+ vst1.8 {d1}, [ip :64], r2 -+ vst1.8 {d2}, [r0 :64] -+ vst1.8 {d3}, [ip :64] -+ bx lr -+endfunc -+ -+@ add_residual8x8_c( -+@ uint8_t *_dst, [r0] -+@ const int16_t *res, [r1] -+@ ptrdiff_t stride) [r2] -+ -+function ff_hevc_rpi_add_residual_8x8_c_neon_8, export=1 -+ vld2.8 {d16, d17}, [r0 :128] -+ add r3, r1, #(8*8*2) @ Offset to V -+ vld1.16 {q0}, [r1 :128]! -+ add ip, r0, r2 -+ vld1.16 {q1}, [r3 :128]! -+ vmovl.u8 q10, d16 -+ push {lr} -+ vmovl.u8 q8, d17 -+ mov lr, #8-1 -+ vqadd.s16 q10, q0 -+ vqadd.s16 q1, q8 -+1: -+ vld2.8 {d16, d17}, [ip :128], r2 -+ subs lr, #1 -+ vld1.16 {q0}, [r1 :128]! -+ vqmovun.s16 d20, q10 -+ vqmovun.s16 d21, q1 -+ vld1.16 {q1}, [r3 :128]! -+ vst2.8 {d20, d21}, [r0 :128], r2 -+ vmovl.u8 q10, d16 -+ pldw [ip] -+ vmovl.u8 q8, d17 -+ vqadd.s16 q10, q0 -+ vqadd.s16 q1, q8 -+ bne 1b -+ -+ vqmovun.s16 d20, q10 -+ vqmovun.s16 d21, q1 -+ vst2.8 {d20, d21}, [r0 :128] -+ pop {pc} -+endfunc -+ -+@ add_residual16x16_c( -+@ uint8_t *_dst, [r0] -+@ const int16_t *res, [r1] -+@ ptrdiff_t stride) [r2] -+ -+function ff_hevc_rpi_add_residual_16x16_c_neon_8, export=1 -+ vld2.8 {q8, q9}, [r0 :256] -+ add r3, r1, #(16*16*2) @ Offset to V -+ vld1.16 {q0, q1}, [r1 :256]! -+ add ip, r0, r2 -+ vld1.16 {q2, q3}, [r3 :256]! -+ vmovl.u8 q10, d16 -+ push {lr} -+ vmovl.u8 q8, d17 -+ mov lr, #16-1 -+ vmovl.u8 q11, d18 -+ vmovl.u8 q9, d19 -+ vqadd.s16 q0, q10 -+ vqadd.s16 q1, q8 -+ vqadd.s16 q2, q11 -+ vqadd.s16 q3, q9 -+1: -+ vld2.8 {q8, q9}, [ip :256], r2 -+ subs lr, #1 -+ vqmovun.s16 d20, q0 -+ vqmovun.s16 d22, q2 -+ vqmovun.s16 d21, q1 -+ vqmovun.s16 d23, q3 -+ vld1.16 {q0, q1}, [r1 :256]! -+ vst2.8 {d20-d23}, [r0 :256], r2 -+ vld1.16 {q2, q3}, [r3 :256]! -+ vmovl.u8 q10, d16 -+ pldw [ip] -+ vmovl.u8 q8, d17 -+ vmovl.u8 q11, d18 -+ vmovl.u8 q9, d19 -+ vqadd.s16 q0, q10 -+ vqadd.s16 q1, q8 -+ vqadd.s16 q2, q11 -+ vqadd.s16 q3, q9 -+ bne 1b -+ -+ vqmovun.s16 d20, q0 -+ vqmovun.s16 d22, q2 -+ vqmovun.s16 d21, q1 -+ vqmovun.s16 d23, q3 -+ vst2.8 {d20-d23}, [r0 :256] -+ pop {pc} -+endfunc -+ -+@ 32x32 chroma never occurs so NIF -+ -+@ ============================================================================ ---- /dev/null -+++ b/libavcodec/arm/rpi_hevcdsp_sao_neon.S -@@ -0,0 +1,2245 @@ -+/* -+ * Copyright (c) 2014 - 2015 Seppo Tomperi -+ * 2017 John Cox (for Raspberry Pi) -+ * -+ * This file is part of FFmpeg. -+ * -+ * FFmpeg is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * FFmpeg is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with FFmpeg; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+ */ -+ -+#include "libavutil/arm/asm.S" -+#include "neon.S" -+ -+.set EDGE_SRC_STRIDE, 160 -+ -+@ PIC jump tables are fractionally more expensive than absolute in our code -+.set jent_pic, CONFIG_PIC -+ -+ -+.macro sao_band_64b_8 XLAT0, XLAT1, Q_K128, I1, I2, I3, I4 -+ vshr.u8 q12, q8, #3 -+ \I1 -+ vadd.i8 q8, \Q_K128 -+ \I2 -+ vshr.u8 q13, q9, #3 -+ \I3 -+ vadd.i8 q9, \Q_K128 -+ \I4 -+ vtbl.8 d24, \XLAT0, d24 -+ vtbl.8 d25, \XLAT0, d25 -+ vtbl.8 d26, \XLAT1, d26 -+ vtbl.8 d27, \XLAT1, d27 -+ -+ vqadd.s8 q8, q12 -+ vshr.u8 q12, q10, #3 -+ vadd.i8 q10, \Q_K128 -+ vqadd.s8 q9, q13 -+ vshr.u8 q13, q11, #3 -+ vadd.i8 q11, \Q_K128 -+ -+ vtbl.8 d24, \XLAT0, d24 -+ vtbl.8 d25, \XLAT0, d25 -+ vtbl.8 d26, \XLAT1, d26 -+ vtbl.8 d27, \XLAT1, d27 -+ vqadd.s8 q10, q12 -+ vsub.i8 q8, \Q_K128 -+ vqadd.s8 q11, q13 -+ vsub.i8 q9, \Q_K128 -+ vsub.i8 q10, \Q_K128 -+ vsub.i8 q11, \Q_K128 -+.endm -+ -+.macro sao_band_16b_8 XLAT0, XLAT1, Q_K128, L1, L2, L3, L4, L5, S1, S2, S3, S4 -+ \L1 -+ \L2 -+ \L3 -+ \L4 -+ \L5 -+ vadd.i8 q12, q8, \Q_K128 -+ vshr.u8 q8, #3 -+ vtbl.8 d16, \XLAT0, d16 -+ vtbl.8 d17, \XLAT1, d17 -+ vqadd.s8 q12, q8 -+ bmi 2f -+1: \L1 -+ \L2 -+ \L3 -+ \L4 -+ \L5 -+ vsub.i8 q13, q12, \Q_K128 -+ vadd.i8 q12, q8, \Q_K128 -+ vshr.u8 q8, #3 -+ \S1 -+ \S2 -+ \S3 -+ \S4 -+ vtbl.8 d16, \XLAT0, d16 -+ vtbl.8 d17, \XLAT1, d17 -+ vqadd.s8 q12, q8 -+ bpl 1b -+2: vsub.i8 q13, q12, \Q_K128 -+ \S1 -+ \S2 -+ \S3 -+ \S4 -+.endm -+ -+ -+.macro clip16_4 Q0, Q1, Q2, Q3, Q_MIN, Q_MAX -+ vmax.s16 \Q0, \Q_MIN -+ vmax.s16 \Q1, \Q_MIN -+ vmax.s16 \Q2, \Q_MIN -+ vmax.s16 \Q3, \Q_MIN -+ vmin.s16 \Q0, \Q_MAX -+ vmin.s16 \Q1, \Q_MAX -+ vmin.s16 \Q2, \Q_MAX -+ vmin.s16 \Q3, \Q_MAX -+.endm -+ -+@ Clobbers q12, q13 -+.macro sao_band_64b_16 Q0, Q1, Q2, Q3, XLAT0, XLAT1, Q_MIN, Q_MAX, bit_depth, I1, I2 -+ vshrn.i16 d24, \Q0, #(\bit_depth - 5) -+ vshrn.i16 d25, \Q1, #(\bit_depth - 5) -+ vshrn.i16 d26, \Q2, #(\bit_depth - 5) -+ \I1 -+ vtbl.8 d24, \XLAT0, d24 -+ vshrn.i16 d27, \Q3, #(\bit_depth - 5) -+ vtbl.8 d25, \XLAT1, d25 -+ \I2 -+ vtbl.8 d26, \XLAT0, d26 -+ vtbl.8 d27, \XLAT1, d27 -+ vaddw.s8 \Q0, d24 -+ vaddw.s8 \Q1, d25 -+ vaddw.s8 \Q2, d26 -+ vaddw.s8 \Q3, d27 -+ clip16_4 \Q0, \Q1, \Q2, \Q3, \Q_MIN, \Q_MAX -+.endm -+ -+@ Clobbers q10, q11, q12 -+.macro sao_band_32b_16 Q0, Q1, XLAT0, XLAT1, Q_MIN, Q_MAX, bit_depth, L1, L2, L3, L4, L5, S1, S2, S3, S4 -+ \L1 -+ \L2 -+ \L3 -+ \L4 -+ \L5 -+ vshrn.i16 d24, \Q0, #\bit_depth - 5 -+ vshrn.i16 d25, \Q1, #\bit_depth - 5 -+ vtbl.8 d24, \XLAT0, d24 -+ vtbl.8 d25, \XLAT1, d25 -+ vaddw.s8 q10, \Q0, d24 -+ vaddw.s8 q11, \Q1, d25 -+ bmi 2f -+1: \L1 -+ \L2 -+ \L3 -+ \L4 -+ \L5 -+ vmax.s16 q10, \Q_MIN -+ vmax.s16 q11, \Q_MIN -+ vshrn.i16 d24, \Q0, #\bit_depth - 5 -+ vshrn.i16 d25, \Q1, #\bit_depth - 5 -+ vmin.s16 q10, \Q_MAX -+ vmin.s16 q11, \Q_MAX -+ \S1 -+ \S2 -+ \S3 -+ \S4 -+ vtbl.8 d24, \XLAT0, d24 -+ vtbl.8 d25, \XLAT1, d25 -+ vaddw.s8 q10, \Q0, d24 -+ vaddw.s8 q11, \Q1, d25 -+ bpl 1b -+2: vmax.s16 q10, \Q_MIN -+ vmax.s16 q11, \Q_MIN -+ vmin.s16 q10, \Q_MAX -+ vmin.s16 q11, \Q_MAX -+ \S1 -+ \S2 -+ \S3 -+ \S4 -+.endm -+ -+ -+@ Standard coding rules for sao_offset_abs limit it to 0-31 (Table 9-38) -+@ so we are quite safe stuffing it into a byte array -+@ There may be a subsequent shl by log2_sao_offset_scale_luma/chroma -+@ (7.4.3.3.2 && 7-70) but we should still be safe to at least 12 bits of -+@ precision -+ -+@ This, somewhat nasty, bit of code builds the {d0-d3} translation -+@ array via the stack -+@ Given that sao_left_class > 28 can cause wrap we can't just poke -+@ all 4 bytes in at once -+@ -+@ It also loads other common regs -+ -+@ Beware that the offset read here overrreads by 6 bytes so source must be sized appropriately -+function band_load_y -+ ldr ip, [sp, #16] @ &sao_offset_val[0] -+ ldr r4, [sp, #20] @ sao_left_class -+ vmov.i64 d4, #0 -+ vmov.i64 q0, #0 -+ pld [r1] -+ vld2.8 {q8}, [ip] -+ sub ip, sp, #8*5 -+ vmov.i64 q1, #0 -+ add r4, ip, r4 -+ vpush {d0-d4} @ Put zero array on stack -+ vshr.u64 d16, d16, #8 @ 1st interesting val is [1] -+ ldr ip, [ip, #8*5 + 28] @ height -+ vst1.32 {d16[0]}, [r4] -+ add r4, r1, r3 -+ vpop {d0-d4} @ Pop modified array -+ sub ip, ip, #1 -+ vorr d0, d0, d4 -+ bx lr -+endfunc -+ -+@ Beware that offset reads here overrread by 6 bytes so source must be sized appropriately -+function band_load_c -+ ldr ip, [sp, #16] @ &sao_offset_val1[0] -+ ldr r4, [sp, #20] @ sao_left_class1 -+ vmov.i64 d24, #0 -+ vmov.i64 q10, #0 -+ pld [r1] -+ vld2.8 {q8}, [ip] -+ sub ip, sp, #8*5 -+ vmov.i64 q11, #0 -+ add r4, ip, r4 -+ ldr ip, [sp, #24] @ &sao_offset_val2[0] -+ vpush {d20-d24} @ Put zero array on stack -+ vld2.8 {q9}, [ip] -+ vshr.u64 d16, d16, #8 @ 1st interesting val is [1] -+ ldr ip, [sp, #8*5 + 28] @ sao_left_class2 -+ vst1.32 {d16[0]}, [r4] -+ add ip, sp, ip -+ vshr.u64 d18, d18, #8 @ 1st interesting val is [1] -+ vldmia sp, {d0-d3} @ Load modified array -+ vldr d16, [sp, #8*4] -+ add r4, r1, r3 -+ vstmia sp, {d20-d24} @ Put zero array on stack (again) -+ vst1.32 {d18[0]}, [ip] -+ vorr d0, d0, d16 -+ vldmia sp, {d4-d7} @ Load modified array -+ vldr d18, [sp, #8*4] -+ ldr ip, [sp, #8*5 + 36] @ height -+ add sp, sp, #8*5 -+ vorr d4, d4, d18 -+ sub ip, ip, #1 -+ bx lr -+endfunc -+ -+ -+@ ff_hevc_rpi_sao_band_64_neon_8 ( -+@ uint8_t *_dst, [r0] -+@ uint8_t *_src, [r1] -+@ ptrdiff_t stride_dst, [r2] -+@ ptrdiff_t stride_src, [r3] -+@ int16_t *sao_offset_val, [sp, #0] -+@ int sao_left_class, [sp, #4] -+@ int width, [sp, #8] -+@ int height) [sp, #12] -+ -+function ff_hevc_rpi_sao_band_64_neon_8, export=1 -+ push {r4-r6, lr} -+ vmov.u8 q15, #128 -+ bl band_load_y -+ -+1: vldmia r1, {q8-q11} -+ sao_band_64b_8 {d0-d3}, {d0-d3}, q15, \ -+ "pld [r4]", \ -+ "subs ip, #1", \ -+ "it ne; addne r4, r3", \ -+ "add r1, r3" -+ vstmia r0, {q8-q11} -+ add r0, r2 -+ bpl 1b -+ -+ pop {r4-r6, pc} -+endfunc -+ -+@ ff_hevc_rpi_sao_band_32_neon_8 ( -+@ uint8_t *_dst, [r0] -+@ uint8_t *_src, [r1] -+@ ptrdiff_t stride_dst, [r2] -+@ ptrdiff_t stride_src, [r3] -+@ int16_t *sao_offset_val, [sp, #0] -+@ int sao_left_class, [sp, #4] -+@ int width, [sp, #8] -+@ int height) [sp, #12] -+ -+function ff_hevc_rpi_sao_band_32_neon_8, export=1 -+ push {r4-r6, lr} -+ add r5, r0, r2 -+ add r6, r1, r3 -+ lsl r2, #1 -+ lsl r3, #1 -+ vmov.u8 q15, #128 -+ bl band_load_y -+ -+1: vld1.8 { q8, q9 }, [r1, :128], r3 -+ subs ip, #2 -+ vld1.8 {q10, q11}, [r6, :128], r3 -+ -+ sao_band_64b_8 {d0-d3}, {d0-d3}, q15 -+ -+ vst1.8 { q8, q9 }, [r0, :128], r2 -+ vst1.8 {q10, q11}, [r5, :128], r2 -+ bpl 1b -+ -+ pop {r4-r6, pc} -+endfunc -+ -+@ ff_hevc_rpi_sao_band_16_neon_8 ( -+@ uint8_t *_dst, [r0] -+@ uint8_t *_src, [r1] -+@ ptrdiff_t stride_dst, [r2] -+@ ptrdiff_t stride_src, [r3] -+@ int16_t *sao_offset_val, [sp, #0] -+@ int sao_left_class, [sp, #4] -+@ int width, [sp, #8] -+@ int height) [sp, #12] -+ -+function ff_hevc_rpi_sao_band_16_neon_8, export=1 -+ push {r4-r6, lr} -+ add r5, r0, r2 -+ add r6, r1, r3 -+ lsl r2, #1 -+ lsl r3, #1 -+ vmov.u8 q15, #128 -+ bl band_load_y -+ -+1: vld1.8 { q8}, [r1, :128], r3 -+ subs ip, #4 -+ vld1.8 { q9}, [r6, :128], r3 -+ vld1.8 {q10}, [r1, :128], r3 -+ vld1.8 {q11}, [r6, :128], r3 -+ -+ sao_band_64b_8 {d0-d3}, {d0-d3}, q15 -+ -+ vst1.8 { q8}, [r0, :128], r2 -+ vst1.8 { q9}, [r5, :128], r2 -+ vst1.8 {q10}, [r0, :128], r2 -+ vst1.8 {q11}, [r5, :128], r2 -+ bpl 1b -+ -+ pop {r4-r6, pc} -+endfunc -+ -+@ ff_hevc_rpi_sao_band_8_neon_8 ( -+@ uint8_t *_dst, [r0] -+@ uint8_t *_src, [r1] -+@ ptrdiff_t stride_dst, [r2] -+@ ptrdiff_t stride_src, [r3] -+@ int16_t *sao_offset_val, [sp, #0] -+@ int sao_left_class, [sp, #4] -+@ int width, [sp, #8] -+@ int height) [sp, #12] -+ -+function ff_hevc_rpi_sao_band_8_neon_8, export=1 -+ ldr ip, [sp, #8] @ width -+ push {r4-r6, lr} -+ vmov.u8 q15, #128 -+ cmp ip, #8 -+ bl band_load_y -+ add r5, r0, r2 -+ add r6, r1, r3 -+ lsl r2, #1 -+ lsl r3, #1 -+ blt 4f -+ -+ sao_band_16b_8 {d0-d3}, {d0-d3}, q15, \ -+ "vld1.8 {d16}, [r1, :64], r3", \ -+ "subs ip, #2", \ -+ "vld1.8 {d17}, [r6, :64], r3", \ -+ "", \ -+ "", \ -+ "vst1.8 {d26}, [r0, :64], r2", \ -+ "vst1.8 {d27}, [r5, :64], r2" -+ pop {r4-r6, pc} -+4: -+ sao_band_16b_8 {d0-d3}, {d0-d3}, q15, \ -+ "vld1.32 {d16[0]}, [r1, :32], r3", \ -+ "subs ip, #4", \ -+ "vld1.32 {d16[1]}, [r6, :32], r3", \ -+ "vld1.32 {d17[0]}, [r1, :32], r3", \ -+ "vld1.32 {d17[1]}, [r6, :32], r3", \ -+ "vst1.32 {d26[0]}, [r0, :32], r2", \ -+ "vst1.32 {d26[1]}, [r5, :32], r2", \ -+ "vst1.32 {d27[0]}, [r0, :32], r2", \ -+ "vst1.32 {d27[1]}, [r5, :32], r2" -+ pop {r4-r6, pc} -+endfunc -+ -+@ ff_hevc_rpi_sao_band_c_32_neon_8( -+@ uint8_t * dst [r0] -+@ uint8_t * src [r1] -+@ uint32_t dst_stride [r2] -+@ uint32_t src_stride [r3] -+@ const int16_t * table1 sp[0] -+@ uint32_t offset1 sp[4] -+@ const int16_t * table2 sp[8] -+@ uint32_t offset2 sp[12] -+@ int width sp[16] -+@ int height sp[20] -+ -+function ff_hevc_rpi_sao_band_c_32_neon_8, export=1 -+ push {r4-r6, lr} -+ add r5, r0, #32 -+ add r6, r1, #32 -+ vmov.u8 q15, #128 -+ bl band_load_c -+ -+1: vld2.8 { q8, q9 }, [r1, :128], r3 -+ subs ip, #1 -+ vld2.8 {q10, q11}, [r6, :128], r3 -+ -+ sao_band_64b_8 {d0-d3}, {d4-d7}, q15, \ -+ "pld [r4]", \ -+ "it ne; addne r4, r3" -+ -+ vst2.8 { q8, q9 }, [r0, :128], r2 -+ vst2.8 {q10, q11}, [r5, :128], r2 -+ bpl 1b -+ -+ pop {r4-r6, pc} -+endfunc -+ -+@ ff_hevc_rpi_sao_band_c_16_neon_8( -+@ uint8_t * dst [r0] -+@ uint8_t * src [r1] -+@ uint32_t dst_stride [r2] -+@ uint32_t src_stride [r3] -+@ const int16_t * table1 sp[0] -+@ uint32_t offset1 sp[4] -+@ const int16_t * table2 sp[8] -+@ uint32_t offset2 sp[12] -+@ int width sp[16] -+@ int height sp[20] -+ -+function ff_hevc_rpi_sao_band_c_16_neon_8, export=1 -+ push {r4-r6, lr} -+ add r5, r0, r2 -+ add r6, r1, r3 -+ lsl r2, #1 -+ lsl r3, #1 -+ vmov.u8 q15, #128 -+ bl band_load_c -+ -+1: vld2.8 { q8, q9 }, [r1, :128], r3 -+ subs ip, #2 -+ vld2.8 {q10, q11}, [r6, :128], r3 -+ -+ sao_band_64b_8 {d0-d3}, {d4-d7}, q15 -+ -+ vst2.8 { q8, q9 }, [r0, :128], r2 -+ vst2.8 {q10, q11}, [r5, :128], r2 -+ bpl 1b -+ -+ pop {r4-r6, pc} -+endfunc -+ -+@ ff_hevc_rpi_sao_band_c_8_neon_8( -+@ uint8_t * dst [r0] -+@ uint8_t * src [r1] -+@ uint32_t dst_stride [r2] -+@ uint32_t src_stride [r3] -+@ const int16_t * table1 sp[0] -+@ uint32_t offset1 sp[4] -+@ const int16_t * table2 sp[8] -+@ uint32_t offset2 sp[12] -+@ int width sp[16] -+@ int height sp[20] -+ -+function ff_hevc_rpi_sao_band_c_8_neon_8, export=1 -+ ldr ip, [sp, #16] @ width -+ push {r4-r6, lr} -+ vmov.u8 q15, #128 -+ cmp ip, #8 -+ bl band_load_c -+ blt 4f -+ -+ sao_band_16b_8 {d0-d3}, {d4-d7}, q15, \ -+ "vld2.8 {d16-d17}, [r1, :128], r3", \ -+ "subs ip, #1", \ -+ "", \ -+ "", \ -+ "", \ -+ "vst2.8 {d26-d27}, [r0, :128], r2" -+ pop {r4-r6, pc} -+4: -+ add r5, r0, r2 -+ add r6, r1, r3 -+ lsl r2, #1 -+ lsl r3, #1 -+ sao_band_16b_8 {d0-d3}, {d4-d7}, q15, \ -+ "vld1.8 {d16}, [r1, :64], r3", \ -+ "subs ip, #2", \ -+ "vld1.8 {d17}, [r6, :64], r3", \ -+ "vuzp.8 d16, d17", \ -+ "", \ -+ "vzip.8 d26, d27", \ -+ "vst1.8 {d26}, [r0, :64], r2", \ -+ "vst1.8 {d27}, [r5, :64], r2" -+ pop {r4-r6, pc} -+endfunc -+ -+ -+@ ff_hevc_rpi_sao_band_64_neon_10 ( -+@ uint8_t *_dst, [r0] -+@ uint8_t *_src, [r1] -+@ ptrdiff_t stride_dst, [r2] -+@ ptrdiff_t stride_src, [r3] -+@ int16_t *sao_offset_val, [sp, #0] -+@ int sao_left_class, [sp, #4] -+@ int width, [sp, #8] -+@ int height) [sp, #12] -+ -+.macro band_64_16 bit_depth -+ push {r4-r6, lr} -+ vmov.i64 q2, #0 -+ vmov.i16 q3, #(1 << \bit_depth) - 1 -+ bl band_load_y -+ vpush {q4-q7} -+ -+1: vldm r1, {q4-q11} -+ sao_band_64b_16 q4, q5, q6, q7, {d0-d3}, {d0-d3}, q2, q3, \bit_depth, \ -+ "subs ip, #1", \ -+ "add r1, r3" -+ sao_band_64b_16 q8, q9, q10, q11, {d0-d3}, {d0-d3}, q2, q3, \bit_depth -+ vstm r0, {q4-q11} -+ add r0, r2 -+ bpl 1b -+ -+ vpop {q4-q7} -+ pop {r4-r6, pc} -+.endm -+ -+function ff_hevc_rpi_sao_band_64_neon_10, export=1 -+ band_64_16 10 -+endfunc -+ -+@ ff_hevc_rpi_sao_band_32_neon_10 ( -+@ uint8_t *_dst, [r0] -+@ uint8_t *_src, [r1] -+@ ptrdiff_t stride_dst, [r2] -+@ ptrdiff_t stride_src, [r3] -+@ int16_t *sao_offset_val, [sp, #0] -+@ int sao_left_class, [sp, #4] -+@ int width, [sp, #8] -+@ int height) [sp, #12] -+ -+.macro band_32_16 bit_depth -+ push {r4-r6, lr} -+ vmov.i64 q2, #0 -+ vmov.i16 q3, #(1 << \bit_depth) - 1 -+ bl band_load_y -+ -+1: vldm r1, {q8-q11} -+ sao_band_64b_16 q8, q9, q10, q11, {d0-d3}, {d0-d3}, q2, q3, \bit_depth, \ -+ "subs ip, #1", \ -+ "add r1, r3" -+ vstm r0, {q8-q11} -+ add r0, r2 -+ bpl 1b -+ -+ pop {r4-r6, pc} -+.endm -+ -+function ff_hevc_rpi_sao_band_32_neon_10, export=1 -+ band_32_16 10 -+endfunc -+ -+@ ff_hevc_rpi_sao_band_16_neon_10 ( -+@ uint8_t *_dst, [r0] -+@ uint8_t *_src, [r1] -+@ ptrdiff_t stride_dst, [r2] -+@ ptrdiff_t stride_src, [r3] -+@ int16_t *sao_offset_val, [sp, #0] -+@ int sao_left_class, [sp, #4] -+@ int width, [sp, #8] -+@ int height) [sp, #12] -+ -+.macro band_16_16 bit_depth -+ push {r4-r6, lr} -+ add r5, r0, r2 -+ add r6, r1, r3 -+ lsl r2, #1 -+ lsl r3, #1 -+ vmov.i64 q14, #0 -+ vmov.i16 q15, #(1 << \bit_depth) - 1 -+ bl band_load_y -+ -+1: vld1.16 { q8, q9 }, [r1, :128], r3 -+ subs r12, #2 -+ vld1.16 {q10, q11}, [r6, :128], r3 -+ sao_band_64b_16 q8, q9, q10, q11, {d0-d3}, {d0-d3}, q14, q15, \bit_depth -+ vst1.16 { q8, q9 }, [r0, :128], r2 -+ vst1.16 {q10, q11}, [r5, :128], r2 -+ bpl 1b -+ -+ pop {r4-r6, pc} -+.endm -+ -+function ff_hevc_rpi_sao_band_16_neon_10, export=1 -+ band_16_16 10 -+endfunc -+ -+@ ff_hevc_rpi_sao_band_8_neon_10 ( -+@ uint8_t *_dst, [r0] -+@ uint8_t *_src, [r1] -+@ ptrdiff_t stride_dst, [r2] -+@ ptrdiff_t stride_src, [r3] -+@ int16_t *sao_offset_val, [sp, #0] -+@ int sao_left_class, [sp, #4] -+@ int width, [sp, #8] -+@ int height) [sp, #12] -+ -+.macro band_8_16 bit_depth -+ ldr ip, [sp, #8] @ width -+ push {r4-r6, lr} -+ vmov.i64 q14, #0 -+ cmp ip, #8 -+ vmov.i16 q15, #(1 << \bit_depth) - 1 -+ bl band_load_y -+ add r5, r0, r2 -+ add r6, r1, r3 -+ lsl r2, #1 -+ lsl r3, #1 -+ blt 4f -+ -+ sao_band_32b_16 q8, q9, {d0-d3}, {d0-d3}, q14, q15, \bit_depth, \ -+ "vld1.16 {q8}, [r1, :128], r3", \ -+ "subs ip, #2", \ -+ "vld1.16 {q9}, [r6, :128], r3", \ -+ "", \ -+ "", \ -+ "vst1.16 {q10}, [r0, :128], r2", \ -+ "vst1.16 {q11}, [r5, :128], r2" -+ pop {r4-r6, pc} -+4: -+ sao_band_32b_16 q8, q9, {d0-d3}, {d0-d3}, q14, q15, \bit_depth, \ -+ "vld1.16 {d16}, [r1, :64], r3", \ -+ "subs ip, #4", \ -+ "vld1.16 {d17}, [r6, :64], r3", \ -+ "vld1.16 {d18}, [r1, :64], r3", \ -+ "vld1.16 {d19}, [r6, :64], r3", \ -+ "vst1.16 {d20}, [r0, :64], r2", \ -+ "vst1.16 {d21}, [r5, :64], r2", \ -+ "vst1.16 {d22}, [r0, :64], r2", \ -+ "vst1.16 {d23}, [r5, :64], r2" -+ pop {r4-r6, pc} -+.endm -+ -+function ff_hevc_rpi_sao_band_8_neon_10, export=1 -+ band_8_16 10 -+endfunc -+ -+ -+@ ff_hevc_rpi_sao_band_c_32_neon_10( -+@ uint8_t * dst [r0] -+@ uint8_t * src [r1] -+@ uint32_t dst_stride [r2] -+@ uint32_t src_stride [r3] -+@ const int16_t * table1 sp[0] -+@ uint32_t offset1 sp[4] -+@ const int16_t * table2 sp[8] -+@ uint32_t offset2 sp[12] -+@ int width sp[16] -+@ int height sp[20] -+ -+.macro band_c_32_16 bit_depth -+ push {r4-r6, lr} -+ add r5, r0, #32 -+ add r6, r1, #32 -+ sub r2, #64 -+ sub r3, #64 -+ vmov.i64 q14, #0 -+ vmov.i16 q15, #(1 << \bit_depth) - 1 -+ bl band_load_c -+ mov lr, #64 -+ vpush {q4-q7} -+ -+1: vld2.16 { q4, q5 }, [r1, :128], lr -+ subs ip, #1 -+ vld2.16 { q6, q7 }, [r6, :128], lr -+ vld2.16 { q8, q9 }, [r1, :128], r3 -+ vld2.16 {q10, q11}, [r6, :128], r3 -+ -+ sao_band_64b_16 q4, q5, q6, q7, {d0-d3}, {d4-d7}, q14, q15, \bit_depth, \ -+ "pld [r4]", \ -+ "it ne; addne r4, r3" -+ sao_band_64b_16 q8, q9, q10, q11, {d0-d3}, {d4-d7}, q14, q15, \bit_depth -+ -+ vst2.16 { q4, q5 }, [r0, :128], lr -+ vst2.16 { q6, q7 }, [r5, :128], lr -+ vst2.16 { q8, q9 }, [r0, :128], r2 -+ vst2.16 {q10, q11}, [r5, :128], r2 -+ -+ bpl 1b -+ -+ vpop {q4-q7} -+ pop {r4-r6, pc} -+.endm -+ -+function ff_hevc_rpi_sao_band_c_32_neon_10, export=1 -+ band_c_32_16 10 -+endfunc -+ -+ -+@ ff_hevc_rpi_sao_band_c_16_neon_10( -+@ uint8_t * dst [r0] -+@ uint8_t * src [r1] -+@ uint32_t dst_stride [r2] -+@ uint32_t src_stride [r3] -+@ const int16_t * table1 sp[0] -+@ uint32_t offset1 sp[4] -+@ const int16_t * table2 sp[8] -+@ uint32_t offset2 sp[12] -+@ int width sp[16] -+@ int height sp[20] -+ -+.macro band_c_16_16 bit_depth -+ push {r4-r6, lr} -+ add r5, r0, #32 -+ add r6, r1, #32 -+ vmov.i64 q14, #0 -+ vmov.i16 q15, #(1 << \bit_depth) - 1 -+ bl band_load_c -+ -+1: vld2.16 { q8, q9 }, [r1, :128], r3 -+ subs ip, #1 -+ vld2.16 {q10, q11}, [r6, :128], r3 -+ -+ sao_band_64b_16 q4, q5, q6, q7, {d0-d3}, {d4-d7}, q14, q15, \bit_depth -+ sao_band_64b_16 q8, q9, q10, q11, {d0-d3}, {d4-d7}, q14, q15, \bit_depth -+ -+ vst2.16 { q8, q9 }, [r0, :128], r2 -+ vst2.16 {q10, q11}, [r5, :128], r2 -+ -+ bpl 1b -+ pop {r4-r6, pc} -+.endm -+ -+function ff_hevc_rpi_sao_band_c_16_neon_10, export=1 -+ band_c_16_16 10 -+endfunc -+ -+ -+@ ff_hevc_rpi_sao_band_c_8_neon_10( -+@ uint8_t * dst [r0] -+@ uint8_t * src [r1] -+@ uint32_t dst_stride [r2] -+@ uint32_t src_stride [r3] -+@ const int16_t * table1 sp[0] -+@ uint32_t offset1 sp[4] -+@ const int16_t * table2 sp[8] -+@ uint32_t offset2 sp[12] -+@ int width sp[16] -+@ int height sp[20] -+ -+.macro band_c_8_16 bit_depth -+ ldr ip, [sp, #16] @ width -+ push {r4-r6, lr} -+ vmov.i64 q14, #0 -+ cmp ip, #8 -+ vmov.i16 q15, #(1 << \bit_depth) - 1 -+ bl band_load_c -+ blt 4f -+ -+ sao_band_32b_16 q8, q9, {d0-d3}, {d4-d7}, q14, q15, \bit_depth, \ -+ "vld2.16 {q8,q9}, [r1, :128], r3", \ -+ "subs ip, #1", \ -+ "", \ -+ "", \ -+ "", \ -+ "vst2.16 {q10,q11}, [r0, :128], r2" -+ pop {r4-r6, pc} -+4: -+ add r5, r0, r2 -+ add r6, r1, r3 -+ lsl r2, #1 -+ lsl r3, #1 -+ sao_band_32b_16 q8, q9, {d0-d3}, {d4-d7}, q14, q15, \bit_depth, \ -+ "vld2.16 {d16,d18}, [r1, :128], r3", \ -+ "subs ip, #2", \ -+ "vld2.16 {d17,d19}, [r6, :128], r3", \ -+ "", \ -+ "", \ -+ "vst2.16 {d20,d22}, [r0, :128], r2", \ -+ "vst2.16 {d21,d23}, [r5, :128], r2" -+ pop {r4-r6, pc} -+.endm -+ -+function ff_hevc_rpi_sao_band_c_8_neon_10, export=1 -+ band_c_8_16 10 -+endfunc -+ -+ -+@ ============================================================================= -+@ SAO EDGE -+ -+@ r0 destination address -+@ r2 stride to post-increment r0 with -+@ [r5] translate values -+@ -+@ a <- c <- b -+@ a in q0 - q3 -+@ c in q4 - q7 -+@ b in q8 - q11 -+@ -+@ q12-15 used as temp -+@ -+@ Can be used for both Y & C as we unzip/zip the deltas and -+@ transform "u/v" separately via d26/d27. For Y d26=d27 -+ -+function edge_64b_body_8 -+ -+ vcgt.u8 q12, q4, q0 @ c > a -> -1 , otherwise 0 -+ vcgt.u8 q13, q5, q1 -+ vcgt.u8 q14, q6, q2 -+ vcgt.u8 q15, q7, q3 -+ -+ vcgt.u8 q0, q4 @ a > c -> -1 , otherwise 0 -+ vcgt.u8 q1, q5 -+ vcgt.u8 q2, q6 -+ vcgt.u8 q3, q7 -+ -+ vsub.s8 q0, q12 @ a = sign(c-a) -+ vsub.s8 q1, q13 -+ vsub.s8 q2, q14 -+ vsub.s8 q3, q15 -+ -+ vcgt.u8 q12, q4, q8 @ c > b -> -1 , otherwise 0 -+ vcgt.u8 q13, q5, q9 -+ vcgt.u8 q14, q6, q10 -+ vcgt.u8 q15, q7, q11 -+ -+ vsub.s8 q0, q12 -+ vsub.s8 q1, q13 -+ vsub.s8 q2, q14 -+ vsub.s8 q3, q15 -+ -+ vcgt.u8 q12, q8, q4 @ c < b -> -1 , otherwise 0 -+ vcgt.u8 q13, q9, q5 -+ vcgt.u8 q14, q10, q6 -+ vcgt.u8 q15, q11, q7 -+ -+ vadd.s8 q0, q12 @ a = sign(c-a) + sign(c-b) -+ vadd.s8 q1, q13 -+ vmov.u8 q12, #2 -+ vadd.s8 q2, q14 -+ vadd.s8 q3, q15 -+ -+ vadd.s8 q0, q12 -+ vadd.s8 q1, q12 -+ -+ vld1.8 {d26, d27}, [r5] -+ -+ vadd.s8 q2, q12 -+ vuzp.8 q0, q1 -+ vmov.u8 q15, #128 -+ vadd.s8 q3, q12 @ a = 2 + sign(c-a) + sign(c-b) -+ -+ vtbl.8 d0, {d26}, d0 -+ vadd.s8 q12, q4, q15 @ Add -128 so we can use saturating signed add -+ -+ vtbl.8 d1, {d26}, d1 -+ vadd.s8 q14, q5, q15 -+ -+ vtbl.8 d2, {d27}, d2 -+ vuzp.8 q2, q3 -+ -+ vtbl.8 d3, {d27}, d3 -+ -+ vtbl.8 d4, {d26}, d4 -+ vzip.8 q0, q1 -+ -+ vtbl.8 d5, {d26}, d5 -+ vqadd.s8 q0, q12 -+ vqadd.s8 q1, q14 -+ vadd.s8 q12, q6, q15 @ Add -128 so we can use saturating signed add -+ -+ vtbl.8 d6, {d27}, d6 -+ vtbl.8 d7, {d27}, d7 -+ vadd.s8 q14, q7, q15 @ Add -128 so we can use saturating signed add -+ vzip.8 q2, q3 -+ -+ vsub.s8 q0, q15 -+ vqadd.s8 q2, q12 -+ vqadd.s8 q3, q14 -+ vsub.s8 q1, q15 -+ vsub.s8 q2, q15 -+ vsub.s8 q3, q15 -+ -+ bx lr -+endfunc -+ -+@ r0 destination address -+@ r2 stride to post-increment r0 with -+@ r4 upper clip value -+@ [r5] translate values -+@ -+@ a <- c <- b -+@ a in q0 - q3 -+@ c in q4 - q7 -+@ b in q8 - q11 -+@ -+@ q12-15 used as temp -+@ -+@ Can be used for both Y & C as we unzip/zip the deltas and -+@ transform "u/v" separately via d26/d27. For Y d26=d27 -+ -+function edge_64b_body_16 -+ -+ vcgt.u16 q12, q4, q0 // c > a -> -1 , otherwise 0 -+ vcgt.u16 q13, q5, q1 -+ vcgt.u16 q14, q6, q2 -+ vcgt.u16 q15, q7, q3 -+ -+ vcgt.u16 q0, q0, q4 // a > c -> -1 , otherwise 0 -+ vcgt.u16 q1, q1, q5 -+ vcgt.u16 q2, q2, q6 -+ vcgt.u16 q3, q3, q7 -+ -+ vsub.s16 q0, q0, q12 // a = sign(c-a) -+ vsub.s16 q1, q1, q13 -+ vsub.s16 q2, q2, q14 -+ vsub.s16 q3, q3, q15 -+ -+ vcgt.u16 q12, q4, q8 // c > b -> -1 , otherwise 0 -+ vcgt.u16 q13, q5, q9 -+ vcgt.u16 q14, q6, q10 -+ vcgt.u16 q15, q7, q11 -+ -+ vsub.s16 q0, q0, q12 -+ vsub.s16 q1, q1, q13 -+ vsub.s16 q2, q2, q14 -+ vsub.s16 q3, q3, q15 -+ -+ vcgt.u16 q12, q8, q4 // c < b -> -1 , otherwise 0 -+ vcgt.u16 q13, q9, q5 -+ vcgt.u16 q14, q10, q6 -+ vcgt.u16 q15, q11, q7 -+ -+ vadd.s16 q0, q0, q12 // a = sign(c-a) + sign(c-b) -+ vadd.s16 q1, q1, q13 -+ vadd.s16 q2, q2, q14 -+ vadd.s16 q3, q3, q15 -+ -+ vmov.u8 q12, #2 -+ -+ vmovn.s16 d0, q0 -+ vmovn.s16 d1, q1 -+ vmovn.s16 d2, q2 -+ vmovn.s16 d3, q3 -+ -+ vldr d26, [r5] -+ -+ vuzp.8 q0, q1 -+ -+ vldr d27, [r5, #8] -+ -+ vadd.s8 q0, q0, q12 -+ vadd.s8 q1, q1, q12 -+ -+ vmov.i64 q12, #0 -+ -+ vtbl.8 d0, {d26}, d0 -+ vtbl.8 d1, {d26}, d1 -+ vtbl.8 d2, {d27}, d2 -+ vtbl.8 d3, {d27}, d3 -+ -+ vdup.i16 q13, r4 -+ -+ vzip.8 q0, q1 -+ -+ @ Avoid overwrite whilst widening -+ vaddw.s8 q2, q6, d2 -+ vaddw.s8 q3, q7, d3 -+ vaddw.s8 q1, q5, d1 -+ vaddw.s8 q0, q4, d0 -+ -+ @ now clip -+ clip16_4 q2, q3, q1, q0, q12, q13 -+ -+ bx lr -+endfunc -+ -+ -+@ a <- c <- b -+@ a in q0 -+@ c in q1 -+@ b in q2 -+@ Temp q3, q9, q10 -+@ -+@ d16, d17 (q8) xlat U, V -+@ q14.u8 #2 -+@ q15.u8 #128 -+ -+function edge_16b_body_8 -+ vcgt.u8 q9, q0, q1 @ a > c -> -1 , otherwise 0 -+ vadd.u8 q9, q14, q9 -+ vcgt.u8 q0, q1, q0 @ c > a -> -1 , otherwise 0 -+ vsub.u8 q9, q9, q0 -+ vcgt.u8 q0, q2, q1 @ c < b -> -1 , otherwise 0 -+ vadd.u8 q9, q9, q0 -+ vcgt.u8 q0, q1, q2 @ c > b -> -1 , otherwise 0 -+ vsub.u8 q0, q9, q0 -+ -+ vadd.s8 q3, q1, q15 @ Add -128 so we can use saturating signed add -+ -+ vuzp.8 d0, d1 -+ -+ vtbl.8 d0, {d16}, d0 -+ vtbl.8 d1, {d17}, d1 -+ -+ vzip.8 d0, d1 -+ vqadd.s8 q0, q3 -+ vsub.s8 q0, q15 -+ -+ bx lr -+endfunc -+ -+@ a <- c <- b -+@ a in q0 -+@ c in q1 -+@ b in q2 -+@ Temp q3 -+@ -+@ q12, #0 -+@ d16, d17 xlat U, V -+@ q14.u8 #2 -+@ q15.u16 max -+function edge_16b_body_16 -+ vcgt.u16 q9, q0, q1 @ a > c -> -1 , otherwise 0 -+ vadd.u16 q9, q14, q9 -+ vcgt.u16 q0, q1, q0 @ c > a -> -1 , otherwise 0 -+ vsub.u16 q9, q9, q0 -+ vcgt.u16 q0, q2, q1 @ c < b -> -1 , otherwise 0 -+ vadd.u16 q9, q9, q0 -+ vcgt.u16 q0, q1, q2 @ c > b -> -1 , otherwise 0 -+ vsub.u16 q0, q9, q0 -+ -+ vmovn.s16 d0, q0 -+ @ d1 will have random contents that we transform but -+ @ that doesn't matter as we then discard them -+ vuzp.8 d0, d1 -+ -+ vtbl.8 d0, {d16}, d0 -+ vtbl.8 d1, {d17}, d1 -+ -+ vzip.8 d0, d1 -+ -+ vaddw.s8 q0, q1, d0 -+ -+ @ now clip -+ vmax.s16 q0, q12 -+ vmin.s16 q0, q15 -+ bx lr -+endfunc -+ -+ -+@ ff_hevc_rpi_sao_edge_[c_]xx_neon( -+@ uint8_t *_dst, [r0] -+@ const uint8_t *_src, [r1] -+@ ptrdiff_t stride_dst, [r2] -+@ const int16_t *_sao_offset_val_u, [r3] -+@ const int16_t *_sao_offset_val_v, [sp, #0] // Chroma only -+@ int eo, [sp, #sp_base + 0] -+@ int width, [sp, #sp_base + 4] -+@ int height) [sp, #sp_base + 8] -+ -+@ Jumps via jump_tab with -+@ uint8_t *_dst, [r0] -+@ const uint8_t *_src, [r1] -+@ ptrdiff_t stride_dst, [r2] -+@ EDGE_SRC_STRIDE [r3] -+@ (1 << \bit_depth) - 1 [r4] -+@ * xlat_table [r5] // setup_64b only -+@ int height [r12] -+@ -+@ 0 [q12] // > 8 bit -+@ 2 [q14] -+@ 128 [q15] // = 8 bit -+@ r4 [q15] // > 8 bit -+ -+.macro edge_xxb_init, bit_depth, is_chroma, jump_tab, setup_64b = 0, setup_16b = 0, check_w4 = 0, do2 = 0, xjump = 0 -+ -+@ Build translate registers -+@ As translate values can only be 0-4 we don't care about junk in the rest -+@ of the register -+.if \is_chroma -+ ldr ip, [sp, #0] -+ push {r4-r6, lr} @ 16 bytes -+ vld1.8 {d16[2]}, [r3] -+ add r3, r3, #2 -+ vld1.8 {d17[2]}, [ip] -+ add ip, ip, #2 -+ vld1.8 {d16[0]}, [r3] -+ add r3, r3, #2 -+ vld1.8 {d17[0]}, [ip] -+ add ip, ip, #2 -+ vld1.8 {d16[1]}, [r3] -+ add r3, r3, #2 -+ vld1.8 {d17[1]}, [ip] -+ add ip, ip, #2 -+ vld1.8 {d16[3]}, [r3] -+ add r3, r3, #2 -+ vld1.8 {d17[3]}, [ip] -+ add ip, ip, #2 -+ vld1.8 {d16[4]}, [r3] -+ vld1.8 {d17[4]}, [ip] -+ movw r3, EDGE_SRC_STRIDE -+.set sp_base, 20 -+.else -+ add ip, r3, #4 -+ vld1.8 {d16[1]}, [r3] -+ add r3, r3, #2 -+ vld1.8 {d17[0]}, [ip] -+ add ip, ip, #2 -+ vld1.8 {d16[0]}, [r3] -+ add r3, r3, #6 -+ vld1.8 {d17[1]}, [ip] -+ vld1.8 {d16[2]}, [r3] -+ movw r3, EDGE_SRC_STRIDE -+ push {r4-r6, lr} @ 16 bytes -+ vzip.8 d16, d17 -+ vmov d17, d16 -+.set sp_base, 16 -+.endif -+ -+@ If setup_64b we need the xlat table on the stack -+.if \setup_64b -+ sub r5, sp, #16 -+.endif -+ -+@ Get jump address -+@ We have a special case for width 4 as the calling code doesn't detect it -+@ If we may have w4 then we add a 2nd jump table after the 1st -+.if \check_w4 -+ ldr r12, [sp, #sp_base + 4] @ width -+ adr r6, \jump_tab -+ ldr lr, [sp, #sp_base + 0] @ e0 -+ cmp r12, #8 -+ it lt -+ addlt r6, #16 -+.else -+ ldr lr, [sp, #sp_base + 0] @ e0 -+ adr r6, \jump_tab -+.endif -+ -+ ldr r12, [sp, #sp_base + 8] @ height -+ -+.if \bit_depth > 8 -+ movw r4, (1 << \bit_depth) - 1 -+.endif -+.if \setup_16b -+.if \bit_depth > 8 -+ vmov.i64 q12, #0 -+ vdup.16 q15, r4 -+ vmov.u16 q14, #2 -+.else -+ vmov.u8 q15, #128 -+ vmov.u8 q14, #2 -+.endif -+.endif -+ -+@ If setup_64b we need q4-q7 saved. -+.if \setup_64b -+ vpush {q4-q8} @ 80 bytes, q8 pushed first -+.set sp_base, sp_base + 80 -+.endif -+ -+ ldr r6, [r6, lr, lsl #2] -+ -+@ For 16 bit width 64 (or chroma 32) we need to do this in 2 passes -+.if \do2 -+ push {r0, r1, r6, r12} -+.if jent_pic -+ bl 98f -+.else -+ blx r6 -+.endif -+ pop {r0, r1, r6, r12} -+ -+ add r0, #64 -+ add r1, #64 -+.endif -+ -+.if jent_pic -+ bl 98f -+.else -+ blx r6 -+.endif -+ -+@ Tidy up & return -+.if \setup_64b -+ vpop {q4-q8} @ spurious but harmless load of q8 -+.endif -+ pop {r4-r6, pc} -+ -+.if jent_pic && !\xjump -+@ Magic label - used as 98b in jent macro -+98: -+ add pc, r6 -+.endif -+.endm -+ -+ -+.macro edge_16b_init, bit_depth, is_chroma, check_w4, jump_tab -+ edge_xxb_init \bit_depth, \is_chroma, \jump_tab, check_w4=\check_w4, setup_16b=1 -+.endm -+ -+.macro edge_64b_init, bit_depth, is_chroma, do2, jump_tab, xjump=0 -+ edge_xxb_init \bit_depth, \is_chroma, \jump_tab, do2=\do2, setup_64b=1, xjump=\xjump -+.endm -+ -+ -+.macro edge_64b_e0, body_fn, pb -+ sub r1, #8 -+ mov r6, lr -+1: vldm r1, {d7-d16} -+ // load a -+ vext.8 q0, q3, q4, #(16 - \pb) -+ add r1, r3 -+ vext.8 q1, q4, q5, #(16 - \pb) -+ subs r12, #1 -+ vext.8 q2, q5, q6, #(16 - \pb) -+ vext.8 q3, q6, q7, #(16 - \pb) -+ pld [r1] -+ // load b -+ vext.8 q11, q7, q8, #\pb @ Avoid overwrite -+ pld [r1, #64] -+ vext.8 q8, q4, q5, #\pb -+ vext.8 q9, q5, q6, #\pb -+ vext.8 q10, q6, q7, #\pb -+ bl \body_fn -+ vstm r0, {q0-q3} -+ add r0, r0, r2 -+ bgt 1b -+ bx r6 -+.endm -+ -+.macro edge_32bx2_e0, body_fn, pb -+ add r6, r1, r3 -+ push {r7,lr} -+ sub r1, #8 -+ add r7, r0, r2 -+ lsl r2, #1 -+1: vldmia r1, {d7-d12} -+ // load a -+ vext.8 q0, q3, q4, #16 - \pb -+ add r1, r1, r3, lsl #1 -+ vext.8 q1, q4, q5, #16 - \pb -+ subs r12, #2 -+ // load b -+ vext.8 q8, q4, q5, #\pb -+ vext.8 q9, q5, q6, #\pb -+ vldr d25, [r6, #-8] -+ vldmia r6, {d12-d15} -+ vldr d26, [r6, #32] -+ // load a -+ vext.8 q2, q12, q6, #16 - \pb -+ add r6, r6, r3, lsl #1 -+ vext.8 q3, q6, q7, #16 - \pb -+ // load b -+ vext.8 q10, q6, q7, #\pb -+ vext.8 q11, q7, q13, #\pb -+ bl \body_fn -+ vst1.8 {q0-q1}, [r0, :256], r2 -+ vst1.8 {q2-q3}, [r7, :256], r2 -+ bgt 1b -+ pop {r7,pc} -+.endm -+ -+.macro edge_16b_e0, body_fn, pb -+ sub r1, #8 -+ mov r6, lr -+1: vldmia r1, {d1-d4} -+ add r1, r3 -+ subs r12, #1 -+ vext.8 q0, q0, q1, #16 - \pb -+ vext.8 q2, q1, q2, #\pb -+ -+ bl \body_fn -+ vst1.8 {q0}, [r0, :128], r2 -+ bgt 1b -+ bx r6 -+.endm -+ -+.macro edge_8bx2_e0, body_fn, pb -+ add r6, r1, r3 -+ push {r7,lr} -+ sub r1, #8 -+ add r7, r0, r2 -+ lsl r2, #1 -+1: vldmia r1, {d1-d2} -+ vldmia r6, {d3-d4} -+ vldr d6, [r1, #16] -+ subs r12, #2 -+ vldr d7, [r6, #-8] -+ add r1, r1, r3, lsl #1 -+ vext.8 d0, d1, d2, #8 - \pb -+ add r6, r6, r3, lsl #1 -+ vext.8 d5, d3, d4, #\pb -+ vext.8 d4, d2, d6, #\pb -+ vext.8 d1, d7, d3, #8 - \pb -+ -+ bl \body_fn -+ vst1.8 {d0}, [r0, :64], r2 -+ vst1.8 {d1}, [r7, :64], r2 -+ bgt 1b -+ pop {r7,pc} -+.endm -+ -+.macro edge_4bx4_e0, body_fn, pb -+ add r6, r1, r3 -+ push {r7,lr} -+ add r7, r0, r2 -+ lsl r2, #1 -+ -+ tst r1, #4 -+ bne 2f -+1: // r1 (and assumed r6) are 64-bit aligned -+ vldr d2, [r1] -+ vldr d0, [r1, #-8] -+ add r1, r1, r3, lsl #1 -+ vldr d20, [r6] -+ subs r12, #4 -+ vldr d18, [r6, #-8] -+ add r6, r6, r3, lsl #1 -+ vldr d3, [r1] -+ vshr.u64 d4, d2, #\pb * 8 -+ vldr d1, [r1, #-8] -+ add r1, r1, r3, lsl #1 -+ vldr d21, [r6] -+ vext.8 d0, d0, d2, #8 - \pb -+ vldr d19, [r6,#-8] -+ add r6, r6, r3, lsl #1 -+ vshr.u64 d22, d20, #\pb * 8 -+ vext.8 d18, d18, d20, #8 - \pb -+ vshr.u64 d5, d3, #\pb * 8 -+ vext.8 d1, d1, d3, #8 - \pb -+ vshr.u64 d23, d21, #\pb * 8 -+ vext.8 d19, d19, d21, #8 - \pb -+ vsli.64 q1, q10, #32 -+ vsli.64 q2, q11, #32 -+ vsli.64 q0, q9, #32 -+ -+ bl \body_fn -+ vst1.32 {d0[0]}, [r0, :32], r2 -+ vst1.32 {d0[1]}, [r7, :32], r2 -+ vst1.32 {d1[0]}, [r0, :32], r2 -+ vst1.32 {d1[1]}, [r7, :32], r2 -+ bgt 1b -+ pop {r7,pc} -+ -+2: // r1 (and assumed r6) are 32-bit but not 64-bit aligned -+ vldr d20, [r1, #-4] -+ vldr d22, [r1, #4] -+ add r1, r1, r3, lsl #1 -+ vldr d2, [r6, #-4] -+ subs r12, #4 -+ vldr d4, [r6, #4] -+ add r6, r6, r3, lsl #1 -+ vldr d21, [r1, #-4] -+ vshl.i64 d18, d20, #\pb * 8 -+ vldr d23, [r1, #4] -+ add r1, r1, r3, lsl #1 -+ vldr d3, [r6, #-4] -+ vext.8 d22, d20, d22, #\pb -+ vldr d5, [r6, #4] -+ add r6, r6, r3, lsl #1 -+ vshl.i64 d0, d2, #\pb * 8 -+ vext.8 d4, d2, d4, #\pb -+ vshl.i64 d19, d21, #\pb * 8 -+ vext.8 d23, d21, d23, #\pb -+ vshl.i64 d1, d3, #\pb * 8 -+ vext.8 d5, d3, d5, #\pb -+ vsri.64 q1, q10, #32 -+ vsri.64 q0, q9, #32 -+ vsri.64 q2, q11, #32 -+ -+ bl \body_fn -+ vst1.32 {d0[0]}, [r0, :32], r2 -+ vst1.32 {d0[1]}, [r7, :32], r2 -+ vst1.32 {d1[0]}, [r0, :32], r2 -+ vst1.32 {d1[1]}, [r7, :32], r2 -+ bgt 2b -+ pop {r7,pc} -+.endm -+ -+ -+.macro edge_64b_e1, body_fn -+ sub r1, r3 -+ push {lr} -+ add r6, r1, #32 -+ // load a -+ vld1.8 {q0-q1}, [r1, :256], r3 -+ vld1.8 {q2-q3}, [r6, :256], r3 -+ // load c -+ vld1.8 {q4-q5}, [r1, :256], r3 -+ vld1.8 {q6-q7}, [r6, :256], r3 -+1: // load b -+ vld1.8 {q8-q9}, [r1, :256], r3 -+ subs r12, #1 -+ vld1.8 {q10-q11}, [r6, :256], r3 -+ bl \body_fn -+ vstm r0, {q0-q3} -+ // copy c to a -+ vmov.64 q0, q4 -+ pld [r1, r3] -+ vmov.64 q1, q5 -+ it le -+ pople {lr} -+ vmov.64 q2, q6 -+ it le -+ bxle lr -+ vmov.64 q3, q7 -+ add r0, r0, r2 -+ // copy b to c -+ vmov.64 q4, q8 -+ vmov.64 q5, q9 -+ vmov.64 q6, q10 -+ vmov.64 q7, q11 -+ b 1b -+.endm -+ -+.macro edge_32bx2_e1, body_fn -+ sub r6, r1, r3 -+ vld1.8 {q2-q3}, [r1, :256], r3 -+ vld1.8 {q0-q1}, [r6, :256] -+ mov r6, lr -+ -+1: @ Given the data duplication here we could obviously do better than -+ @ using the generic body_fn but it almost certainly isn't worth it -+ vld1.8 {q8-q9}, [r1, :256], r3 -+ subs r12, #2 -+ vmov q4, q2 -+ vmov q5, q3 -+ vld1.8 {q10-q11}, [r1, :256], r3 -+ vmov q6, q8 -+ vmov q7, q9 -+ -+ bl \body_fn -+ -+ vst1.8 {q0-q1}, [r0, :256], r2 -+ // copy b to a -+ vmov q0, q8 -+ vmov q1, q9 -+ vst1.8 {q2-q3}, [r0, :256], r2 -+ vmov q2, q10 -+ it le -+ bxle r6 -+ vmov q3, q11 -+ b 1b -+.endm -+ -+.macro edge_16b_e1, body_fn -+ sub r6, r1, r3 -+ // load c -+ vld1.8 {q1}, [r1, :128], r3 -+ // load a -+ vld1.8 {q0}, [r6, :128] -+ mov r6, lr -+1: // load b -+ vld1.8 {q2}, [r1, :128], r3 -+ bl \body_fn -+ vst1.8 {q0}, [r0, :128], r2 -+ subs r12, #1 -+ // copy c to a -+ vmov.64 q0, q1 -+ it le -+ bxle r6 -+ // copy b to c -+ vmov.64 q1, q2 -+ b 1b -+.endm -+ -+.macro edge_8bx2_e1, body_fn -+ sub r6, r1, r3 -+ lsl r3, #1 -+ push {r7, lr} -+ vld1.8 {d1}, [r1, :64], r3 -+ vld1.8 {d0}, [r6, :64], r3 -+ add r7, r0, r2 -+ lsl r2, #1 -+1: @ Given the data duplication here we could obviously do better than -+ @ using the generic body_fn but it almost certainly isn't worth it -+ vld1.8 {d4}, [r6, :64], r3 -+ vmov d2, d1 -+ vld1.8 {d5}, [r1, :64], r3 -+ subs r12, #2 -+ vmov d3, d4 -+ -+ bl \body_fn -+ -+ vst1.8 {d0}, [r0, :64], r2 -+ vst1.8 {d1}, [r7, :64], r2 -+ -+ // copy b to a -+ vmov q0, q2 -+ bgt 1b -+ pop {r7, pc} -+.endm -+ -+.macro edge_4bx4_e1, body_fn -+ sub r6, r1, r3 -+ lsl r3, #1 -+ push {r7, lr} -+ vld1.32 {d0[1]}, [r1, :32], r3 -+ add r7, r0, r2 -+ vld1.32 {d0[0]}, [r6, :32], r3 -+ lsl r2, #1 -+ vld1.32 {d4[1]}, [r1, :32], r3 -+ vld1.32 {d4[0]}, [r6, :32], r3 -+ vld1.32 {d5[1]}, [r1, :32], r3 -+ vld1.32 {d5[0]}, [r6, :32], r3 -+ vmov d1, d4 -+ vext.32 d2, d0, d4, #1 -+ subs r12, #4 -+ vmov d22, d5 -+ vext.32 d3, d4, d5, #1 -+ b 2f -+ -+1: vst1.32 {d0[0]}, [r0, :32], r2 -+ vext.32 d2, d22, d4, #1 -+ vst1.32 {d0[1]}, [r7, :32], r2 -+ vmov d0, d22 -+ vst1.32 {d1[0]}, [r0, :32], r2 -+ vext.32 d3, d4, d5, #1 -+ vst1.32 {d1[1]}, [r7, :32], r2 -+ vmov d1, d4 -+ vmov d22, d5 -+2: @ Given the data duplication here we could probably do better than -+ @ using the generic body_fn but it almost certainly isn't worth it -+ bl \body_fn -+ ble 3f -+ vld1.32 {d4[0]}, [r6, :32], r3 -+ subs r12, #4 -+ vld1.32 {d4[1]}, [r1, :32], r3 -+ vld1.32 {d5[0]}, [r6, :32], r3 -+ vld1.32 {d5[1]}, [r1, :32], r3 -+ b 1b -+ -+3: vst1.32 {d0[0]}, [r0, :32], r2 -+ vst1.32 {d0[1]}, [r7, :32], r2 -+ vst1.32 {d1[0]}, [r0, :32] -+ vst1.32 {d1[1]}, [r7, :32] -+ pop {r7, pc} -+.endm -+ -+.macro edge_64b_e2, body_fn, pb -+ push {lr} -+ sub r6, r1, r3 -+ // load c and a -+ vld1.8 {q4-q5}, [r1, :128] -+ vldr d25, [r6, #-8] -+ vldmia r6, {d16-d23} -+ vext.8 q0, q12, q8, #16 - \pb -+ add r6, r1, #32 -+ vext.8 q1, q8, q9, #16 - \pb -+ add r1, r1, r3 -+ vext.8 q2, q9, q10, #16 - \pb -+ vld1.8 {q6-q7}, [r6, :128] -+ sub r6, r1, r3 -+ vext.8 q3, q10, q11, #16 - \pb -+ -+1: // load b -+ vldmia r1, {d16-d24} -+ vext.8 q8, q8, q9, #\pb -+ pld [r1, r3] -+ vext.8 q9, q9, q10, #\pb -+ subs r12, #1 -+ vext.8 q10, q10, q11, #\pb -+ vext.8 q11, q11, q12, #\pb -+ bl \body_fn -+ // next a is mostly available in c -+ vldr d25, [r6, #-8] -+ vstmia r0, {q0-q3} -+ vext.8 q3, q6, q7, #16 - \pb -+ it le -+ pople {lr} -+ vext.8 q2, q5, q6, #16 - \pb -+ it le -+ bxle lr -+ vext.8 q1, q4, q5, #16 - \pb -+ add r6, r6, r3 -+ vext.8 q0, q12, q4, #16 - \pb -+ add r0, r0, r2 -+ // next c is mostly available in b -+ vldr d8, [r1] -+ vext.8 d9, d16, d17, #8 - \pb -+ vext.8 q5, q8, q9, #16 - \pb -+ add r1, r1, r3 -+ vext.8 q6, q9, q10, #16 - \pb -+ pld [r6, #-8] -+ vext.8 q7, q10, q11, #16 - \pb -+ b 1b -+.endm -+ -+.macro edge_32bx2_e2, body_fn, pb -+ sub r6, r1, r3 -+ push {r7, lr} -+ add r7, r0, r2 -+ lsl r2, #1 -+ // load a and first 32b of c -+ vld1.8 {q4-q5}, [r1, :256] -+ vldr d25, [r6, #-8] -+ vld1.8 {q13-q14}, [r6, :256] -+ vldr d31, [r1, #-8] -+ add r6, r6, r3, lsl #1 -+ vext.8 q0, q12, q13, #16 - \pb -+ add r1, r1, r3, lsl #1 -+ vext.8 q1, q13, q14, #16 - \pb -+ vext.8 q2, q15, q4, #16 - \pb -+ vext.8 q3, q4, q5, #16 - \pb -+1: -+ // load second 32b of c and second 32b of b -+ vldmia r6, {d12-d16} -+ vldmia r1, {d20-d24} -+ // first 32b of b is mostly available in second 32b of c -+ vext.8 q9, q7, q8, #\pb -+ subs r12, #2 -+ vext.8 q8, q6, q7, #\pb -+ vext.8 q10, q10, q11, #\pb -+ vext.8 q11, q11, q12, #\pb -+ -+ bl \body_fn -+ -+ vst1.8 {q0-q1}, [r0, :256], r2 -+ vst1.8 {q2-q3}, [r7, :256], r2 -+ ble 2f -+ -+ vldr d25, [r6, #-8] -+ add r6, r6, r3, lsl #1 -+ vldr d8, [r1] -+ vext.8 d9, d20, d21, #8 - \pb -+ vldr d31, [r1, #-8] -+ add r1, r1, r3, lsl #1 -+ // first 32b of a is mostly available in second 32b of c -+ vext.8 q1, q6, q7, #16 - \pb -+ vext.8 q0, q12, q6, #16 - \pb -+ // first 32b of c is mostly available in second 32b of b -+ vext.8 q5, q10, q11, #16 - \pb -+ // second 32b of a is mostly available in first 32b of c -+ vext.8 q2, q15, q4, #16 - \pb -+ vext.8 q3, q4, q5, #16 - \pb -+ b 1b -+ -+2: pop {r7, pc} -+.endm -+ -+.macro edge_16b_e2, body_fn, pb -+ push {lr} -+ sub r6, r1, r3 -+ vld1.8 {q1}, [r1, :128], r3 -+ vldr d19, [r6, #-8] -+ vld1.8 {q10}, [r6, :128], r3 -+ -+1: vldmia r1, {d4-d6} -+ vext.8 q0, q9, q10, #16 - \pb -+ subs r12, #1 -+ vext.8 q2, q2, q3, #\pb -+ bl \body_fn -+ vst1.8 {q0}, [r0, :128], r2 -+ ble 2f -+ vmov q10, q1 -+ vldr d2, [r1] -+ add r1, r1, r3 -+ vldr d19, [r6, #-8] -+ add r6, r6, r3 -+ vext.8 d3, d4, d5, #8 - \pb -+ b 1b -+ -+2: pop {pc} -+.endm -+ -+.macro edge_8bx2_e2, body_fn, pb -+ sub r6, r1, r3 -+ push {r7, lr} -+ add r7, r0, r2 -+ lsl r2, #1 -+ vldr d18, [r6, #-8] -+ vldr d19, [r6] -+ add r6, r6, r3, lsl #1 -+ vldr d20, [r1, #-8] -+ vldr d2, [r1] -+ add r1, r1, r3, lsl #1 -+ vldmia r6, {d3-d4} -+ vld1.8 {d21-d22}, [r1, :128] -+ -+1: vext.8 d0, d18, d19, #8 - \pb -+ vext.8 d4, d3, d4, #\pb -+ vext.8 d1, d20, d2, #8 - \pb -+ subs r12, #2 -+ vext.8 d5, d21, d22, #\pb -+ -+ bl \body_fn -+ -+ vst1.8 {d0}, [r0, :64], r2 -+ vst1.8 {d1}, [r7, :64], r2 -+ ble 2f -+ -+ vldr d18, [r6, #-8] -+ add r6, r6, r3, lsl #1 -+ vldr d20, [r1, #-8] -+ vmov d19, d3 -+ vldr d2, [r1] -+ add r1, r1, r3, lsl #1 -+ vldmia r6, {d3-d4} -+ vld1.8 {d21-d22}, [r1, :128] -+ b 1b -+ -+2: pop {r7, pc} -+.endm -+ -+.macro edge_4bx4_e2, body_fn, pb -+ sub r6, r1, r3 -+ push {r7-r9, lr} -+ add r8, r1, r3 -+ sub r6, r6, #\pb -+ add r8, r8, #\pb -+ add r7, r0, r2 -+ lsl r2, #1 -+ -+1: vld1.32 {d0[0]}, [r6], r3 -+ subs r12, #4 -+ vld1.32 {d2[0]}, [r1], r3 -+ vld1.32 {d4[0]}, [r8], r3 -+ vld1.32 {d0[1]}, [r6], r3 -+ vld1.32 {d2[1]}, [r1], r3 -+ vld1.32 {d4[1]}, [r8], r3 -+ vld1.32 {d1[0]}, [r6], r3 -+ vld1.32 {d3[0]}, [r1], r3 -+ vld1.32 {d5[0]}, [r8], r3 -+ vld1.32 {d1[1]}, [r6], r3 -+ vld1.32 {d3[1]}, [r1], r3 -+ vld1.32 {d5[1]}, [r8], r3 -+ -+ bl \body_fn -+ -+ vst1.32 {d0[0]}, [r0, :32], r2 -+ vst1.32 {d0[1]}, [r7, :32], r2 -+ vst1.32 {d1[0]}, [r0, :32], r2 -+ vst1.32 {d1[1]}, [r7, :32], r2 -+ bgt 1b -+ -+ pop {r7-r9,pc} -+.endm -+ -+.macro edge_64b_e3, body_fn, pb -+ push {lr} -+ sub r6, r1, r3 -+ // load c and a -+ vld1.8 {q4-q5}, [r1, :128] -+ vldmia r6, {d16-d24} -+ vext.8 q0, q8, q9, #\pb -+ add r6, r1, #32 -+ vext.8 q1, q9, q10, #\pb -+ add r1, r1, r3 -+ vext.8 q2, q10, q11, #\pb -+ vld1.8 {q6-q7}, [r6, :128] -+ sub r6, r1, r3 -+ vext.8 q3, q11, q12, #\pb -+ -+1: // load b -+ vldr d17, [r1, #-8] -+ vldmia r1, {d18-d25} -+ vext.8 q8, q8, q9, #16 - \pb -+ pld [r1, r3] -+ vext.8 q9, q9, q10, #16 - \pb -+ subs r12, #1 -+ vext.8 q10, q10, q11, #16 - \pb -+ vext.8 q11, q11, q12, #16 - \pb -+ bl \body_fn -+ // next a is mostly available in c -+ vldr d24, [r6, #64] -+ vstmia r0, {q0-q3} -+ vext.8 q0, q4, q5, #\pb -+ it le -+ pople {lr} -+ vext.8 q1, q5, q6, #\pb -+ it le -+ bxle lr -+ vext.8 q2, q6, q7, #\pb -+ add r6, r6, r3 -+ vext.8 q3, q7, q12, #\pb -+ add r0, r0, r2 -+ // next c is mostly available in b -+ vext.8 d14, d22, d23, #\pb -+ vldr d15, [r1, #56] -+ vext.8 q4, q8, q9, #\pb -+ add r1, r1, r3 -+ vext.8 q5, q9, q10, #\pb -+ vext.8 q6, q10, q11, #\pb -+ b 1b -+.endm -+ -+.macro edge_32bx2_e3, body_fn, pb -+ sub r6, r1, r3 -+ push {r7, lr} -+ add r7, r0, r2 -+ lsl r2, #1 -+ // load a and first 32b of c -+ vldmia r1, {d8-d12} -+ vldmia r6, {d24-d28} -+ vext.8 q2, q4, q5, #\pb -+ add r6, r6, r3, lsl #1 -+ vext.8 q3, q5, q6, #\pb -+ add r1, r1, r3, lsl #1 -+ vext.8 q0, q12, q13, #\pb -+ vext.8 q1, q13, q14, #\pb -+1: -+ // load second 32b of c and second 32b of b -+ vldr d25, [r6, #-8] -+ subs r12, #2 -+ vldmia r6, {d12-d15} -+ vldr d27, [r1, #-8] -+ vldmia r1, {d20-d23} -+ // first 32b of b is mostly available in second 32b of c -+ vext.8 q8, q12, q6, #16 - \pb -+ vext.8 q9, q6, q7, #16 - \pb -+ vext.8 q11, q10, q11, #16 - \pb -+ vext.8 q10, q13, q10, #16 - \pb -+ -+ bl \body_fn -+ -+ vst1.8 {q0-q1}, [r0, :256], r2 -+ vst1.8 {q2-q3}, [r7, :256], r2 -+ ble 2f -+ -+ vldr d24, [r6, #32] -+ add r6, r6, r3, lsl #1 -+ vldr d11, [r1, #24] -+ vext.8 d10, d22, d23, #\pb -+ vldr d30, [r1, #32] -+ add r1, r1, r3, lsl #1 -+ // first 32b of a is mostly available in second 32b of c -+ vext.8 q0, q6, q7, #\pb -+ vext.8 q1, q7, q12, #\pb -+ // first 32b of c is mostly available in second 32b of b -+ vext.8 q4, q10, q11, #\pb -+ // second 32b of a is mostly available in first 32b of c -+ vext.8 q3, q5, q15, #\pb -+ vext.8 q2, q4, q5, #\pb -+ b 1b -+ -+2: pop {r7, pc} -+.endm -+ -+.macro edge_16b_e3, body_fn, pb -+ push {lr} -+ sub r6, r1, r3 -+ vld1.8 {q1}, [r1, :128], r3 -+ vldmia r6, {d18-d20} -+ add r6, r6, r3 -+ -+1: vldr d5, [r1, #-8] -+ vld1.8 {q3}, [r1, :128] -+ subs r12, #1 -+ vext.8 q0, q9, q10, #\pb -+ vext.8 q2, q2, q3, #16 - \pb -+ bl \body_fn -+ vst1.8 {q0}, [r0, :128], r2 -+ ble 2f -+ vmov q9, q1 -+ vldr d3, [r1, #8] -+ add r1, r1, r3 -+ vldr d20, [r6, #16] -+ add r6, r6, r3 -+ vext.8 d2, d4, d5, #\pb -+ b 1b -+ -+2: pop {pc} -+.endm -+ -+.macro edge_8bx2_e3, body_fn, pb -+ sub r6, r1, r3 -+ push {r7, lr} -+ add r7, r0, r2 -+ lsl r2, #1 -+ vld1.8 {d18-d19}, [r6] -+ add r6, r6, r3, lsl #1 -+ vldr d20, [r1, #8] -+ vldr d2, [r1] -+ add r1, r1, r3, lsl #1 -+ vldr d4, [r6, #-8] -+ vldr d3, [r6] -+ vldr d21, [r1, #-8] -+ vldr d22, [r1] -+ -+1: vext.8 d0, d18, d19, #\pb -+ vext.8 d4, d4, d3, #8 - \pb -+ vext.8 d1, d2, d20, #\pb -+ subs r12, #2 -+ vext.8 d5, d21, d22, #8 - \pb -+ -+ bl \body_fn -+ -+ vst1.8 {d0}, [r0, :64], r2 -+ vst1.8 {d1}, [r7, :64], r2 -+ ble 2f -+ -+ vldr d19, [r6, #8] -+ add r6, r6, r3, lsl #1 -+ vldr d20, [r1, #8] -+ vmov d18, d3 -+ vldr d2, [r1] -+ add r1, r1, r3, lsl #1 -+ vldr d4, [r6, #-8] -+ vldr d3, [r6] -+ vldr d21, [r1, #-8] -+ vldr d22, [r1] -+ b 1b -+ -+2: pop {r7, pc} -+.endm -+ -+.macro edge_4bx4_e3, body_fn, pb -+ @ e3 is the same as e2 but with the X offset reversed -+ edge_4bx4_e2 \body_fn, (-\pb) -+.endm -+ -+@ Jump table entry - if in neon mode the bottom bit must be set -+@ ? There is probably a real asm instruction to do this but I haven't found it -+.macro jent lab -+.if jent_pic -+@ Could use .short here but due to A32 not supporting ldrh [lsl#1] it is -+@ simpler and clearer in the code to stick with .word -+T .word (0 + \lab) - (4 + 98b) -+A .word (0 + \lab) - (8 + 98b) -+.else -+T .word 1 + \lab -+A .word \lab -+.endif -+.endm -+ -+.macro edge_64b_bodies, body_fn, pb -+ jent 0f -+ jent 10f -+ jent 20f -+ jent 30f -+ -+0: edge_64b_e0 \body_fn, \pb -+10: edge_64b_e1 \body_fn -+20: edge_64b_e2 \body_fn, \pb -+30: edge_64b_e3 \body_fn, \pb -+.endm -+ -+.macro edge_32bx2_bodies, body_fn, pb -+ jent 0f -+ jent 10f -+ jent 20f -+ jent 30f -+ -+0: edge_32bx2_e0 \body_fn, \pb -+10: edge_32bx2_e1 \body_fn -+20: edge_32bx2_e2 \body_fn, \pb -+30: edge_32bx2_e3 \body_fn, \pb -+.endm -+ -+.macro edge_16b_bodies, body_fn, pb -+ jent 0f -+ jent 10f -+ jent 20f -+ jent 30f -+ -+0: edge_16b_e0 \body_fn, \pb -+10: edge_16b_e1 \body_fn -+20: edge_16b_e2 \body_fn, \pb -+30: edge_16b_e3 \body_fn, \pb -+.endm -+ -+.macro edge_32bx2_16b_bodies, body_fn_64b, body_fn_16b, pb -+ jent 0f -+ jent 10f -+ jent 20f -+ jent 30f -+ jent 5f -+ jent 15f -+ jent 25f -+ jent 35f -+ -+0: edge_32bx2_e0 \body_fn_64b, \pb -+10: edge_32bx2_e1 \body_fn_64b -+20: edge_32bx2_e2 \body_fn_64b, \pb -+30: edge_32bx2_e3 \body_fn_64b, \pb -+5: edge_16b_e0 \body_fn_16b, \pb -+15: edge_16b_e1 \body_fn_16b -+25: edge_16b_e2 \body_fn_16b, \pb -+35: edge_16b_e3 \body_fn_16b, \pb -+.endm -+ -+.macro edge_16b_8bx2_bodies, body_fn, pb -+ jent 0f -+ jent 10f -+ jent 20f -+ jent 30f -+ jent 5f -+ jent 15f -+ jent 25f -+ jent 35f -+ -+0: edge_16b_e0 \body_fn, \pb -+10: edge_16b_e1 \body_fn -+20: edge_16b_e2 \body_fn, \pb -+30: edge_16b_e3 \body_fn, \pb -+5: edge_8bx2_e0 \body_fn, \pb -+15: edge_8bx2_e1 \body_fn -+25: edge_8bx2_e2 \body_fn, \pb -+35: edge_8bx2_e3 \body_fn, \pb -+.endm -+ -+.macro edge_8bx2_4bx4_bodies, body_fn, pb -+ jent 0f -+ jent 10f -+ jent 20f -+ jent 30f -+ jent 5f -+ jent 15f -+ jent 25f -+ jent 35f -+ -+0: edge_8bx2_e0 \body_fn, \pb -+10: edge_8bx2_e1 \body_fn -+20: edge_8bx2_e2 \body_fn, \pb -+30: edge_8bx2_e3 \body_fn, \pb -+5: edge_4bx4_e0 \body_fn, \pb -+15: edge_4bx4_e1 \body_fn -+25: edge_4bx4_e2 \body_fn, \pb -+35: edge_4bx4_e3 \body_fn, \pb -+.endm -+ -+@ void ff_hevc_rpi_sao_edge_8_neon_8( -+@ uint8_t *_dst, [r0] -+@ uint8_t *_src, [r1] -+@ int stride_dst, [r2] -+@ int16_t *_sao_offset_val, [r3] -+@ int eo, [sp, #0] -+@ int width, [sp, #4] -+@ int height) [sp, #8] -+ -+function ff_hevc_rpi_sao_edge_8_neon_8, export=1 -+ edge_16b_init 8, 0, 1, 99f -+99: -+ edge_8bx2_4bx4_bodies edge_16b_body_8, 1 -+endfunc -+ -+@ void ff_hevc_rpi_sao_edge_16_neon_8( -+@ uint8_t *_dst, [r0] -+@ uint8_t *_src, [r1] -+@ int stride_dst, [r2] -+@ int16_t *_sao_offset_val, [r3] -+@ int eo, [sp, #0] -+@ int width, [sp, #4] -+@ int height) [sp, #8] -+ -+function ff_hevc_rpi_sao_edge_16_neon_8, export=1 -+ edge_16b_init 8, 0, 0, 99f -+99: -+ edge_16b_bodies edge_16b_body_8, 1 -+endfunc -+ -+@ void ff_hevc_rpi_sao_edge_32_neon_8( -+@ uint8_t *_dst, [r0] -+@ uint8_t *_src, [r1] -+@ int stride_dst, [r2] -+@ int16_t *_sao_offset_val, [r3] -+@ int eo, [sp, #0] -+@ int width, [sp, #4] -+@ int height) [sp, #8] -+ -+function ff_hevc_rpi_sao_edge_32_neon_8, export=1 -+ edge_64b_init 8, 0, 0, 99f -+99: -+ edge_32bx2_bodies edge_64b_body_8, 1 -+endfunc -+ -+@ void ff_hevc_rpi_sao_edge_64_neon_8( -+@ uint8_t *_dst, [r0] -+@ uint8_t *_src, [r1] -+@ int stride_dst, [r2] -+@ int16_t *_sao_offset_val, [r3] -+@ int eo, [sp, #0] -+@ int width, [sp, #4] -+@ int height) [sp, #8] -+ -+function ff_hevc_rpi_sao_edge_64_neon_8, export=1 -+ edge_64b_init 8, 0, 0, 99f -+99: -+ edge_64b_bodies edge_64b_body_8, 1 -+endfunc -+ -+@ ff_hevc_rpi_sao_edge_c_8_neon_8( -+@ uint8_t *_dst, [r0] -+@ const uint8_t *_src, [r1] -+@ ptrdiff_t stride_dst, [r2] -+@ const int16_t *_sao_offset_val_u, [r3] -+@ const int16_t *_sao_offset_val_v, [sp, #0] -+@ int eo, [sp, #4] -+@ int width, [sp, #8] -+@ int height) [sp, #12] -+ -+function ff_hevc_rpi_sao_edge_c_8_neon_8, export=1 -+ edge_16b_init 8, 1, 1, 99f -+99: -+ edge_16b_8bx2_bodies edge_16b_body_8, 2 -+endfunc -+ -+@ ff_hevc_rpi_sao_edge_c_16_neon_8( -+@ uint8_t *_dst, [r0] -+@ const uint8_t *_src, [r1] -+@ ptrdiff_t stride_dst, [r2] -+@ const int16_t *_sao_offset_val_u, [r3] -+@ const int16_t *_sao_offset_val_v, [sp, #0] -+@ int eo, [sp, #4] -+@ int width, [sp, #8] -+@ int height) [sp, #12] -+ -+function ff_hevc_rpi_sao_edge_c_16_neon_8, export=1 -+ edge_64b_init 8, 1, 0, 99f -+99: -+ edge_32bx2_bodies edge_64b_body_8, 2 -+endfunc -+ -+@ ff_hevc_rpi_sao_edge_c_32_neon_8( -+@ uint8_t *_dst, [r0] -+@ const uint8_t *_src, [r1] -+@ ptrdiff_t stride_dst, [r2] -+@ const int16_t *_sao_offset_val_u, [r3] -+@ const int16_t *_sao_offset_val_v, [sp, #0] -+@ int eo, [sp, #4] -+@ int width, [sp, #8] -+@ int height) [sp, #12] -+ -+function ff_hevc_rpi_sao_edge_c_32_neon_8, export=1 -+ edge_64b_init 8, 1, 0, 99f -+99: -+ edge_64b_bodies edge_64b_body_8, 2 -+endfunc -+ -+@ void ff_hevc_rpi_sao_edge_8_neon_10( -+@ uint8_t *_dst, [r0] -+@ uint8_t *_src, [r1] -+@ int stride_dst, [r2] -+@ int16_t *_sao_offset_val, [r3] -+@ int eo, [sp, #0] -+@ int width, [sp, #4] -+@ int height) [sp, #8] -+ -+function ff_hevc_rpi_sao_edge_8_neon_10, export=1 -+ edge_16b_init 10, 0, 1, 99f -+99: -+ edge_16b_8bx2_bodies edge_16b_body_16, 2 -+endfunc -+ -+@ void ff_hevc_rpi_sao_edge_16_neon_10( -+@ uint8_t *_dst, [r0] -+@ uint8_t *_src, [r1] -+@ int stride_dst, [r2] -+@ int16_t *_sao_offset_val, [r3] -+@ int eo, [sp, #0] -+@ int width, [sp, #4] -+@ int height) [sp, #8] -+ -+function ff_hevc_rpi_sao_edge_16_neon_10, export=1 -+ edge_64b_init 10, 0, 0, 99f -+99: -+ edge_32bx2_bodies edge_64b_body_16, 2 -+endfunc -+ -+@ void ff_hevc_rpi_sao_edge_64_neon_10( -+@ uint8_t *_dst, [r0] -+@ uint8_t *_src, [r1] -+@ int stride_dst, [r2] -+@ int16_t *_sao_offset_val, [r3] -+@ int eo, [sp, #0] -+@ int width, [sp, #4] -+@ int height) [sp, #8] -+ -+@ We simply split the 32 case into 2 vertical stripes -+@ and call the fns for w32 -+@ -+@ Calling code will always have src != dst so we don't have to worry -+@ about edge effects -+ -+function ff_hevc_rpi_sao_edge_64_neon_10, export=1 -+ edge_64b_init 10, 0, 1, 99f, xjump=1 -+endfunc -+ -+@ void ff_hevc_rpi_sao_edge_32_neon_10( -+@ uint8_t *_dst, [r0] -+@ uint8_t *_src, [r1] -+@ int stride_dst, [r2] -+@ int16_t *_sao_offset_val, [r3] -+@ int eo, [sp, #0] -+@ int width, [sp, #4] -+@ int height) [sp, #8] -+ -+function ff_hevc_rpi_sao_edge_32_neon_10, export=1 -+ edge_64b_init 10, 0, 0, 99f -+99: -+ edge_64b_bodies edge_64b_body_16, 2 -+endfunc -+ -+@ ff_hevc_rpi_sao_edge_c_8_neon_10( -+@ uint8_t *_dst, [r0] -+@ const uint8_t *_src, [r1] -+@ ptrdiff_t stride_dst, [r2] -+@ const int16_t *_sao_offset_val_u, [r3] -+@ const int16_t *_sao_offset_val_v, [sp, #0] -+@ int eo, [sp, #4] -+@ int width, [sp, #8] -+@ int height) [sp, #12] -+ -+function ff_hevc_rpi_sao_edge_c_8_neon_10, export=1 -+ edge_xxb_init 10, 1, 99f, check_w4=1, setup_16b=1, setup_64b=1 -+99: -+ edge_32bx2_16b_bodies edge_64b_body_16, edge_16b_body_16, 4 -+endfunc -+ -+@ ff_hevc_rpi_sao_edge_c_32_neon_10( -+@ uint8_t *_dst, [r0] -+@ const uint8_t *_src, [r1] -+@ ptrdiff_t stride_dst, [r2] -+@ const int16_t *_sao_offset_val_u, [r3] -+@ const int16_t *_sao_offset_val_v, [sp, #0] -+@ int eo, [sp, #4] -+@ int width, [sp, #8] -+@ int height) [sp, #12] -+ -+function ff_hevc_rpi_sao_edge_c_32_neon_10, export=1 -+ edge_64b_init 10, 1, 1, 99f, xjump=1 -+endfunc -+ -+ -+@ ff_hevc_rpi_sao_edge_c_16_neon_10( -+@ uint8_t *_dst, [r0] -+@ const uint8_t *_src, [r1] -+@ ptrdiff_t stride_dst, [r2] -+@ const int16_t *_sao_offset_val_u, [r3] -+@ const int16_t *_sao_offset_val_v, [sp, #0] -+@ int eo, [sp, #4] -+@ int width, [sp, #8] -+@ int height) [sp, #12] -+ -+function ff_hevc_rpi_sao_edge_c_16_neon_10, export=1 -+ edge_64b_init 10, 1, 0, 99f -+99: -+ edge_64b_bodies edge_64b_body_16, 4 -+endfunc -+ ---- /dev/null -+++ b/libavcodec/arm/rpi_hevcpred_arm.h -@@ -0,0 +1,28 @@ -+/* -+ * This file is part of FFmpeg. -+ * -+ * FFmpeg is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * FFmpeg is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with FFmpeg; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+ */ -+ -+#ifndef AVCODEC_ARM_HEVCPRED_ARM_H -+#define AVCODEC_ARM_HEVCPRED_ARM_H -+ -+#include "libavcodec/rpi_hevcpred.h" -+ -+void ff_hevc_rpi_pred_init_arm(HEVCRpiPredContext * const c, const int bit_depth); -+void ff_hevc_rpi_pred_init_neon(HEVCRpiPredContext * const c, const int bit_depth); -+ -+#endif /* AVCODEC_ARM_HEVCPRED_ARM_H */ -+ ---- /dev/null -+++ b/libavcodec/arm/rpi_hevcpred_init_arm.c -@@ -0,0 +1,35 @@ -+/* -+ * Copyright (c) 2018 John Cox (for Raspberry Pi) -+ * -+ * This file is part of FFmpeg. -+ * -+ * FFmpeg is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * FFmpeg is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with FFmpeg; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+ */ -+ -+#include "libavutil/attributes.h" -+#include "libavutil/cpu.h" -+#include "libavutil/arm/cpu.h" -+ -+#include "libavcodec/rpi_hevcpred.h" -+#include "rpi_hevcpred_arm.h" -+ -+av_cold void ff_hevc_rpi_pred_init_arm(HEVCRpiPredContext * const c, const int bit_depth) -+{ -+ int cpu_flags = av_get_cpu_flags(); -+ -+ if (have_neon(cpu_flags)) -+ ff_hevc_rpi_pred_init_neon(c, bit_depth); -+} -+ ---- /dev/null -+++ b/libavcodec/arm/rpi_hevcpred_init_neon.c -@@ -0,0 +1,210 @@ -+/* -+ * Copyright (c) 2018 John Cox (for Raspberry Pi) -+ * -+ * This file is part of FFmpeg. -+ * -+ * FFmpeg is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * FFmpeg is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with FFmpeg; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+ */ -+ -+#include "rpi_hevcpred_arm.h" -+ -+intra_filter_fn_t ff_hevc_rpi_intra_filter_4_neon_8; -+intra_filter_fn_t ff_hevc_rpi_intra_filter_8_neon_8; -+intra_filter_fn_t ff_hevc_rpi_intra_filter_4_neon_16; -+intra_filter_fn_t ff_hevc_rpi_intra_filter_8_neon_16; -+intra_filter_fn_t ff_hevc_rpi_intra_filter_16_neon_16; -+intra_filter_fn_t ff_hevc_rpi_intra_filter_4_neon_32; -+intra_filter_fn_t ff_hevc_rpi_intra_filter_8_neon_32; -+intra_filter_fn_t ff_hevc_rpi_intra_filter_16_neon_32; -+ -+void ff_hevc_rpi_pred_angular_4_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode); -+void ff_hevc_rpi_pred_angular_8_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode); -+void ff_hevc_rpi_pred_angular_16_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode); -+void ff_hevc_rpi_pred_angular_32_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode); -+void ff_hevc_rpi_pred_angular_c_4_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode); -+void ff_hevc_rpi_pred_angular_c_8_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode); -+void ff_hevc_rpi_pred_angular_c_16_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode); -+void ff_hevc_rpi_pred_angular_4_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode); -+void ff_hevc_rpi_pred_angular_8_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode); -+void ff_hevc_rpi_pred_angular_16_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode); -+void ff_hevc_rpi_pred_angular_32_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode); -+void ff_hevc_rpi_pred_angular_c_4_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode); -+void ff_hevc_rpi_pred_angular_c_8_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode); -+void ff_hevc_rpi_pred_angular_c_16_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode); -+ -+void ff_hevc_rpi_pred_vertical_4_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode); -+void ff_hevc_rpi_pred_vertical_8_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode); -+void ff_hevc_rpi_pred_vertical_16_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode); -+void ff_hevc_rpi_pred_vertical_32_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode); -+void ff_hevc_rpi_pred_vertical_c_4_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode); -+void ff_hevc_rpi_pred_vertical_c_8_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode); -+void ff_hevc_rpi_pred_vertical_c_16_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode); -+void ff_hevc_rpi_pred_vertical_4_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode); -+void ff_hevc_rpi_pred_vertical_8_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode); -+void ff_hevc_rpi_pred_vertical_16_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode); -+void ff_hevc_rpi_pred_vertical_32_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode); -+void ff_hevc_rpi_pred_vertical_c_4_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode); -+void ff_hevc_rpi_pred_vertical_c_8_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode); -+void ff_hevc_rpi_pred_vertical_c_16_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode); -+ -+void ff_hevc_rpi_pred_horizontal_4_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode); -+void ff_hevc_rpi_pred_horizontal_8_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode); -+void ff_hevc_rpi_pred_horizontal_16_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode); -+void ff_hevc_rpi_pred_horizontal_32_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode); -+void ff_hevc_rpi_pred_horizontal_c_4_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode); -+void ff_hevc_rpi_pred_horizontal_c_8_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode); -+void ff_hevc_rpi_pred_horizontal_c_16_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode); -+void ff_hevc_rpi_pred_horizontal_4_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode); -+void ff_hevc_rpi_pred_horizontal_8_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode); -+void ff_hevc_rpi_pred_horizontal_16_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode); -+void ff_hevc_rpi_pred_horizontal_32_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode); -+void ff_hevc_rpi_pred_horizontal_c_4_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode); -+void ff_hevc_rpi_pred_horizontal_c_8_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode); -+void ff_hevc_rpi_pred_horizontal_c_16_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode); -+ -+void ff_hevc_rpi_pred_planar_4_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride); -+void ff_hevc_rpi_pred_planar_8_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride); -+void ff_hevc_rpi_pred_planar_16_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride); -+void ff_hevc_rpi_pred_planar_32_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride); -+void ff_hevc_rpi_pred_planar_c_4_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride); -+void ff_hevc_rpi_pred_planar_c_8_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride); -+void ff_hevc_rpi_pred_planar_c_16_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride); -+void ff_hevc_rpi_pred_planar_4_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride); -+void ff_hevc_rpi_pred_planar_8_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride); -+void ff_hevc_rpi_pred_planar_16_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride); -+void ff_hevc_rpi_pred_planar_32_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride); -+void ff_hevc_rpi_pred_planar_c_4_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride); -+void ff_hevc_rpi_pred_planar_c_8_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride); -+void ff_hevc_rpi_pred_planar_c_16_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride); -+ -+void ff_hevc_rpi_pred_dc_4_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride); -+void ff_hevc_rpi_pred_dc_8_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride); -+void ff_hevc_rpi_pred_dc_16_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride); -+void ff_hevc_rpi_pred_dc_32_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride); -+void ff_hevc_rpi_pred_dc_c_4_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride); -+void ff_hevc_rpi_pred_dc_c_8_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride); -+void ff_hevc_rpi_pred_dc_c_16_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride); -+void ff_hevc_rpi_pred_dc_4_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride); -+void ff_hevc_rpi_pred_dc_8_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride); -+void ff_hevc_rpi_pred_dc_16_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride); -+void ff_hevc_rpi_pred_dc_32_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride); -+void ff_hevc_rpi_pred_dc_c_4_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride); -+void ff_hevc_rpi_pred_dc_c_8_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride); -+void ff_hevc_rpi_pred_dc_c_16_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride); -+ -+void ff_hevc_rpi_pred_init_neon(HEVCRpiPredContext * const c, const int bit_depth) -+{ -+ switch (bit_depth) -+ { -+ case 8: -+ c->intra_filter[0] = ff_hevc_rpi_intra_filter_4_neon_8; -+ c->intra_filter[1] = ff_hevc_rpi_intra_filter_8_neon_8; -+ c->intra_filter_c[0] = ff_hevc_rpi_intra_filter_4_neon_16; // Equivalent to c_4_neon_8 -+ c->intra_filter_c[1] = ff_hevc_rpi_intra_filter_8_neon_16; -+ c->intra_filter_c[2] = ff_hevc_rpi_intra_filter_16_neon_16; -+ -+ c->pred_angular[0] = ff_hevc_rpi_pred_angular_4_neon_8; -+ c->pred_angular[1] = ff_hevc_rpi_pred_angular_8_neon_8; -+ c->pred_angular[2] = ff_hevc_rpi_pred_angular_16_neon_8; -+ c->pred_angular[3] = ff_hevc_rpi_pred_angular_32_neon_8; -+ c->pred_angular_c[0] = ff_hevc_rpi_pred_angular_c_4_neon_8; -+ c->pred_angular_c[1] = ff_hevc_rpi_pred_angular_c_8_neon_8; -+ c->pred_angular_c[2] = ff_hevc_rpi_pred_angular_c_16_neon_8; -+ -+ c->pred_horizontal[0] = ff_hevc_rpi_pred_horizontal_4_neon_8; -+ c->pred_horizontal[1] = ff_hevc_rpi_pred_horizontal_8_neon_8; -+ c->pred_horizontal[2] = ff_hevc_rpi_pred_horizontal_16_neon_8; -+ c->pred_horizontal[3] = ff_hevc_rpi_pred_horizontal_32_neon_8; -+ c->pred_horizontal_c[0] = ff_hevc_rpi_pred_horizontal_c_4_neon_8; -+ c->pred_horizontal_c[1] = ff_hevc_rpi_pred_horizontal_c_8_neon_8; -+ c->pred_horizontal_c[2] = ff_hevc_rpi_pred_horizontal_c_16_neon_8; -+ -+ c->pred_vertical[0] = ff_hevc_rpi_pred_vertical_4_neon_8; -+ c->pred_vertical[1] = ff_hevc_rpi_pred_vertical_8_neon_8; -+ c->pred_vertical[2] = ff_hevc_rpi_pred_vertical_16_neon_8; -+ c->pred_vertical[3] = ff_hevc_rpi_pred_vertical_32_neon_8; -+ c->pred_vertical_c[0] = ff_hevc_rpi_pred_vertical_c_4_neon_8; -+ c->pred_vertical_c[1] = ff_hevc_rpi_pred_vertical_c_8_neon_8; -+ c->pred_vertical_c[2] = ff_hevc_rpi_pred_vertical_c_16_neon_8; -+ -+ c->pred_planar[0] = ff_hevc_rpi_pred_planar_4_neon_8; -+ c->pred_planar[1] = ff_hevc_rpi_pred_planar_8_neon_8; -+ c->pred_planar[2] = ff_hevc_rpi_pred_planar_16_neon_8; -+ c->pred_planar[3] = ff_hevc_rpi_pred_planar_32_neon_8; -+ c->pred_planar_c[0] = ff_hevc_rpi_pred_planar_c_4_neon_8; -+ c->pred_planar_c[1] = ff_hevc_rpi_pred_planar_c_8_neon_8; -+ c->pred_planar_c[2] = ff_hevc_rpi_pred_planar_c_16_neon_8; -+ -+ c->pred_dc[0] = ff_hevc_rpi_pred_dc_4_neon_8; -+ c->pred_dc[1] = ff_hevc_rpi_pred_dc_8_neon_8; -+ c->pred_dc[2] = ff_hevc_rpi_pred_dc_16_neon_8; -+ c->pred_dc[3] = ff_hevc_rpi_pred_dc_32_neon_8; -+ c->pred_dc_c[0] = ff_hevc_rpi_pred_dc_c_4_neon_8; -+ c->pred_dc_c[1] = ff_hevc_rpi_pred_dc_c_8_neon_8; -+ c->pred_dc_c[2] = ff_hevc_rpi_pred_dc_c_16_neon_8; -+ break; -+ case 10: -+ c->intra_filter[0] = ff_hevc_rpi_intra_filter_4_neon_16; -+ c->intra_filter[1] = ff_hevc_rpi_intra_filter_8_neon_16; -+ c->intra_filter[2] = ff_hevc_rpi_intra_filter_16_neon_16; -+ c->intra_filter_c[0] = ff_hevc_rpi_intra_filter_4_neon_32; -+ c->intra_filter_c[1] = ff_hevc_rpi_intra_filter_8_neon_32; -+ c->intra_filter_c[2] = ff_hevc_rpi_intra_filter_16_neon_32; -+ -+ c->pred_angular[0] = ff_hevc_rpi_pred_angular_4_neon_10; -+ c->pred_angular[1] = ff_hevc_rpi_pred_angular_8_neon_10; -+ c->pred_angular[2] = ff_hevc_rpi_pred_angular_16_neon_10; -+ c->pred_angular[3] = ff_hevc_rpi_pred_angular_32_neon_10; -+ c->pred_angular_c[0] = ff_hevc_rpi_pred_angular_c_4_neon_10; -+ c->pred_angular_c[1] = ff_hevc_rpi_pred_angular_c_8_neon_10; -+ c->pred_angular_c[2] = ff_hevc_rpi_pred_angular_c_16_neon_10; -+ -+ c->pred_horizontal[0] = ff_hevc_rpi_pred_horizontal_4_neon_10; -+ c->pred_horizontal[1] = ff_hevc_rpi_pred_horizontal_8_neon_10; -+ c->pred_horizontal[2] = ff_hevc_rpi_pred_horizontal_16_neon_10; -+ c->pred_horizontal[3] = ff_hevc_rpi_pred_horizontal_32_neon_10; -+ c->pred_horizontal_c[0] = ff_hevc_rpi_pred_horizontal_c_4_neon_10; -+ c->pred_horizontal_c[1] = ff_hevc_rpi_pred_horizontal_c_8_neon_10; -+ c->pred_horizontal_c[2] = ff_hevc_rpi_pred_horizontal_c_16_neon_10; -+ -+ c->pred_vertical[0] = ff_hevc_rpi_pred_vertical_4_neon_10; -+ c->pred_vertical[1] = ff_hevc_rpi_pred_vertical_8_neon_10; -+ c->pred_vertical[2] = ff_hevc_rpi_pred_vertical_16_neon_10; -+ c->pred_vertical[3] = ff_hevc_rpi_pred_vertical_32_neon_10; -+ c->pred_vertical_c[0] = ff_hevc_rpi_pred_vertical_c_4_neon_10; -+ c->pred_vertical_c[1] = ff_hevc_rpi_pred_vertical_c_8_neon_10; -+ c->pred_vertical_c[2] = ff_hevc_rpi_pred_vertical_c_16_neon_10; -+ -+ c->pred_planar[0] = ff_hevc_rpi_pred_planar_4_neon_10; -+ c->pred_planar[1] = ff_hevc_rpi_pred_planar_8_neon_10; -+ c->pred_planar[2] = ff_hevc_rpi_pred_planar_16_neon_10; -+ c->pred_planar[3] = ff_hevc_rpi_pred_planar_32_neon_10; -+ c->pred_planar_c[0] = ff_hevc_rpi_pred_planar_c_4_neon_10; -+ c->pred_planar_c[1] = ff_hevc_rpi_pred_planar_c_8_neon_10; -+ c->pred_planar_c[2] = ff_hevc_rpi_pred_planar_c_16_neon_10; -+ -+ c->pred_dc[0] = ff_hevc_rpi_pred_dc_4_neon_10; -+ c->pred_dc[1] = ff_hevc_rpi_pred_dc_8_neon_10; -+ c->pred_dc[2] = ff_hevc_rpi_pred_dc_16_neon_10; -+ c->pred_dc[3] = ff_hevc_rpi_pred_dc_32_neon_10; -+ c->pred_dc_c[0] = ff_hevc_rpi_pred_dc_c_4_neon_10; -+ c->pred_dc_c[1] = ff_hevc_rpi_pred_dc_c_8_neon_10; -+ c->pred_dc_c[2] = ff_hevc_rpi_pred_dc_c_16_neon_10; -+ break; -+ default: -+ break; -+ } -+} -+ ---- /dev/null -+++ b/libavcodec/arm/rpi_hevcpred_intra_angular_neon.S -@@ -0,0 +1,2984 @@ -+/* -+Copyright (c) 2017 Raspberry Pi (Trading) Ltd. -+All rights reserved. -+ -+Redistribution and use in source and binary forms, with or without -+modification, are permitted provided that the following conditions are met: -+ * Redistributions of source code must retain the above copyright -+ notice, this list of conditions and the following disclaimer. -+ * Redistributions in binary form must reproduce the above copyright -+ notice, this list of conditions and the following disclaimer in the -+ documentation and/or other materials provided with the distribution. -+ * Neither the name of the copyright holder nor the -+ names of its contributors may be used to endorse or promote products -+ derived from this software without specific prior written permission. -+ -+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ -+Authors: John Cox, Ben Avison -+*/ -+ -+/* -+ * General angular pred -+ * -+ * Horizontal (10) & Vertical (26) cases have their own file -+ * and are not dealt with properly here (luma filtering is missing) -+ * -+ * The inv_angle calculations are annoying - if it wasn't for the +128 -+ * rounding step then the result would simply be the loop counter :-( -+ */ -+ -+ -+#include "libavutil/arm/asm.S" -+#include "neon.S" -+ -+.text -+ -+@ Horizontal Patch functions -+@ These need a transpose before store so exist as smaller patches -+@ Patches can be called repeatedly without any intermediate setup -+@ to generate a horizontal block -+@ -+@ It is almost certainly the case that larger patch fns can be built -+@ and they would be a little faster, but we would still need the small -+@ fns and code size (or at least instruction cache size) is an issue -+@ given how much code we already have here -+ -+@ Generate 8x8 luma 8 patch -+@ -+@ r3 Out stride -+@ r4 Angle add -+@ r7 Inv angle (_up only) -+@ -+@ In/Out (updated) -+@ r0 Out pointer - on exit point to start of next patch horizontally (i.e. r0 + patch width) -+@ r2 Left ptr - updated -+@ r10 Inv angle accumulator (_up only) -+@ r12 32 - angle frac (_down) or angle frac (_up) -+@ d0 Older reference samples -+@ d1=r8+r9 Newer reference samples -+@ d2 32 - angle frac -+@ d3 Angle frac -+@ q2 Partially computed next result (_up only) -+@ -+@ Temps -+@ r5 Loop counter -+@ r6 -+@ r7 (_down only) -+@ r11 (_up only) -+@ q2, q8-q11 -+ -+patch_h_down_8x8_8: -+ ldrd r8, r9, [r2] @ Left -+ rsb r12, r6, #32 -+ vmov d0, r8, r9 -+ vdup.8 d3, r6 -+ lsr r8, #8 -+ vdup.8 d2, r12 -+ orr r8, r8, r9, lsl #24 -+ ldr r9, [r2, #5]! -+ vmov d1, r8, r9 -+ // drop through... -+patch_h_down_8x8_8_continue: -+ mov r5, #8 -+1: -+ subs r12, r4 -+ vmull.u8 q2, d0, d2 -+ it mi -+ addmi r12, #32 -+ vmlal.u8 q2, d1, d3 -+ rsb r6, r12, #32 -+ vext.8 q8, q8, q9, #8 -+ itt mi -+ lsrmi r7, r8, #8 -+ vmovmi d0, r8, r9 -+ vdup.8 d2, r12 -+ vext.8 q9, q9, q10, #8 -+ it mi -+ orrmi r8, r7, r9, lsl #24 -+ vext.8 q10, q10, q11, #8 -+ it mi -+ ldrmi r9, [r2, #1]! -+ vmov d22, d23 -+ vrshrn.u16 d23, q2, #5 -+ it mi -+ vmovmi d1, r8, r9 -+ subs r5, #1 -+ vdup.8 d3, r6 -+ bne 1b -+ // drop through... -+store_tran_8x8_8: -+ vzip.8 d16, d17 -+ add r6, r0, r3 -+ vzip.8 d18, d19 -+ lsl r3, #1 -+ vzip.8 d20, d21 -+ add r5, r0, r3 -+ vzip.8 d22, d23 -+ vzip.16 q8, q9 -+ vzip.16 q10, q11 -+ vzip.32 q8, q10 -+ vzip.32 q9, q11 -+ vst1.8 {d16}, [r0]! -+ vst1.8 {d17}, [r6], r3 -+ vst1.8 {d20}, [r5], r3 -+ vst1.8 {d21}, [r6], r3 -+ vst1.8 {d18}, [r5], r3 -+ vst1.8 {d19}, [r6], r3 -+ vst1.8 {d22}, [r5] -+ asr r3, #1 -+ vst1.8 {d23}, [r6] -+ -+ bx lr -+ -+patch_h_up_8x8_8: -+ ldrd r8, r9, [r2] -+ rsb r6, r4, #32 -+ vmov d0, r8, r9 -+ vdup.8 d3, r4 -+ lsr r11, r8, #24 -+ vdup.8 d2, r6 -+ ldr r8, [r2, #-1]! -+ orr r9, r11, r9, lsl #8 -+ vmov d1, r8, r9 -+ mov r12, r4 -+ vmull.u8 q2, d0, d2 -+ vmlal.u8 q2, d1, d3 -+patch_h_up_8x8_8_continue: -+ mov r5, #8 -+1: -+ add r12, r4 -+ mov r11, #0 -+ cmp r12, #33 -+ it cs -+ addcs r10, r7 -+ vext.8 q8, q8, q9, #8 -+ itt cs -+ subcs r12, #32 -+ tstcs r10, #1<<31 -+ rsb r6, r12, #32 -+ it eq -+ asreq r11, r10, #8 -+ it cs -+ vmovcs d0, r8, r9 -+ vdup.8 d2, r6 -+ it cs -+ lsrcs r6, r8, #24 -+ vext.8 q9, q9, q10, #8 -+ itt cs -+ orrcs r9, r6, r9, lsl #8 -+ ldrbcs r11, [r1, r11] -+ vdup.8 d3, r12 -+ vext.8 q10, q10, q11, #8 -+ it hi -+ ldrbhi r11, [r2, #-1]! -+ vmov d22, d23 -+ vrshrn.u16 d23, q2, #5 -+ itt cs -+ orrcs r8, r11, r8, lsl #8 -+ vmovcs d1, r8, r9 -+ vmull.u8 q2, d0, d2 -+ subs r5, #1 -+ vmlal.u8 q2, d1, d3 -+ bne 1b -+ -+ b store_tran_8x8_8 -+ -+ -+.macro ADRT reg, val -+@ adr in T32 has enough range but not in A32 -+A adrl \reg, \val -+T adr \reg, \val -+.endm -+ -+@ ff_hevc_rpi_pred_angular_4_neon_8 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride [r3] -+@ unsigned int mode [sp, #0] 2..34 -+ -+function ff_hevc_rpi_pred_angular_4_neon_8, export=1 -+ ldr r12, [sp] -+ push {r4-r8, lr} -+ ADRT r4, angle_2 - 2 -+ ADRT r7, inv_angle - 11*2 -+ add r7, r7, r12, lsl #1 -+ ldrsb r6, [r4, r12] -+ cmp r12, #26 -+ ldrsb r4, [r4, r12] -+ bge 26f -+ cmp r12, #18 -+ bge 18f -+ cmp r12, #10 -+ bge 10f -+ -+@ Down of Horizontal - works down left -+ ldr lr, [r2], #1 @ Top -+ rsb r12, r6, #32 -+ vmov s0, lr -+ vdup.8 d3, r6 -+ ldr lr, [r2], #1 -+ vdup.8 d2, r12 -+ vmov s2, lr -+ subs r12, r4 -+ vmull.u8 q2, d0, d2 -+ it mi -+ addmi r12, #32 -+ vmlal.u8 q2, d1, d3 -+ rsb r6, r12, #32 -+ itt mi -+ vmovmi s0, lr -+ ldrmi lr, [r2], #1 -+ vdup.8 d2, r12 -+ it mi -+ vmovmi s2, lr -+ vdup.8 d3, r6 -+ mov r5, #2 -+1: -+ vrshrn.u16 d20, q2, #5 -+ subs r12, r4 -+ vmull.u8 q2, d0, d2 -+ it mi -+ addmi r12, #32 -+ vmlal.u8 q2, d1, d3 -+ rsb r6, r12, #32 -+ vext.64 q8, q8, q9, #1 -+ it mi -+ vmovmi s0, lr -+ vext.64 q9, q9, q10, #1 -+ it mi -+ ldrmi lr, [r2], #1 -+ vdup.8 d2, r12 -+ it mi -+ vmovmi s2, lr -+ subs r5, #1 -+ vdup.8 d3, r6 -+ bne 1b -+ -+ vrshrn.u16 d20, q2, #5 -+ vmull.u8 q2, d0, d2 -+ add r12, r0, r3 -+ vmlal.u8 q2, d1, d3 -+ lsl r3, #1 -+ vext.64 q8, q8, q9, #1 -+ vext.64 q9, q9, q10, #1 -+ vrshrn.u16 d20, q2, #5 -+ -+98: -+ vst4.8 {d17[0], d18[0], d19[0], d20[0]}, [r0], r3 -+ vst4.8 {d17[1], d18[1], d19[1], d20[1]}, [r12], r3 -+ vst4.8 {d17[2], d18[2], d19[2], d20[2]}, [r0] -+ vst4.8 {d17[3], d18[3], d19[3], d20[3]}, [r12] -+ pop {r4-r8, pc} -+ -+@ Up of Horizontal - works down up -+10: -+ ldrh r7, [r7] -+ rsb r12, r6, #32 -+ ldr lr, [r2] @ Left -+ ldrb r2, [r2, #-1] @ Top-left -+ vmov s0, lr -+ vdup.8 d2, r12 -+ vdup.8 d3, r6 -+ orr lr, r2, lr, lsl #8 -+ vmov s2, lr -+ sub r8, r7, #128 -+ mov r5, #3 -+2: -+ vmull.u8 q2, d0, d2 -+ subs r12, r4 -+ vmlal.u8 q2, d1, d3 -+T it mi -+ addmi r12, #32 -+T asr r6, r8, #8 -+T it mi -+T ldrbmi r2, [r1, r6] -+A ldrbmi r2, [r1, r8, asr #8] -+ rsb r6, r12, #32 -+ vdup.8 d2, r12 -+ ittt mi -+ vmovmi s0, lr -+ orrmi lr, r2, lr, lsl #8 -+ vmovmi s2, lr -+ vrshrn.u16 d20, q2, #5 -+ vdup.8 d3, r6 -+ it mi -+ addmi r8, r7 -+ subs r5, #1 -+ vext.64 q8, q8, q9, #1 -+ vext.64 q9, q9, q10, #1 -+ bne 2b -+ -+ vmull.u8 q2, d0, d2 -+ add r12, r0, r3 -+ vmlal.u8 q2, d1, d3 -+ lsl r3, #1 -+ vrshrn.u16 d20, q2, #5 -+ b 98b -+ -+@ Left of vertical - works down left -+18: -+ ldrh r7, [r7] -+ rsb r12, r6, #32 -+ ldr lr, [r1] @ Top -+ ldrb r1, [r2, #-1] @ Top-left -+ vmov s0, lr -+ vdup.8 d2, r12 -+ vdup.8 d3, r6 -+ orr lr, r1, lr, lsl #8 -+ vmov s2, lr -+ sub r8, r7, #128 -+ mov r5, #3 -+2: -+ vmull.u8 q2, d0, d2 -+ subs r12, r4 -+ vmlal.u8 q2, d1, d3 -+T it mi -+ addmi r12, #32 -+T asr r6, r8, #8 -+T it mi -+T ldrbmi r1, [r2, r6] -+A ldrbmi r1, [r2, r8, asr #8] -+ rsb r6, r12, #32 -+ vdup.8 d2, r12 -+ ittt mi -+ vmovmi s0, lr -+ orrmi lr, r1, lr, lsl #8 -+ vmovmi s2, lr -+ vrshrn.u16 d4, q2, #5 -+ vdup.8 d3, r6 -+ it mi -+ addmi r8, r7 -+ subs r5, #1 -+ vst1.32 {d4[0]}, [r0], r3 -+ bne 2b -+ -+ vmull.u8 q2, d0, d2 -+ vmlal.u8 q2, d1, d3 -+ vrshrn.u16 d4, q2, #5 -+ vst1.32 {d4[0]}, [r0] -+ -+ pop {r4-r8, pc} -+ -+@ Right of vertical - works along top - left unused -+26: -+ ldr lr, [r1], #1 @ Top -+ rsb r12, r6, #32 -+ vmov s0, lr -+ vdup.8 d3, r6 -+ ldr lr, [r1], #1 -+ vdup.8 d2, r12 -+ vmov s2, lr -+ subs r12, r4 -+ vmull.u8 q2, d0, d2 -+ it mi -+ addmi r12, #32 -+ vmlal.u8 q2, d1, d3 -+ rsb r6, r12, #32 -+ itt mi -+ vmovmi s0, lr -+ ldrmi lr, [r1], #1 -+ vdup.8 d2, r12 -+ it mi -+ vmovmi s2, lr -+ vdup.8 d3, r6 -+ mov r5, #2 -+1: -+ vrshrn.u16 d6, q2, #5 -+ subs r12, r4 -+ vmull.u8 q2, d0, d2 -+ it mi -+ addmi r12, #32 -+ vmlal.u8 q2, d1, d3 -+ rsb r6, r12, #32 -+ vst1.32 {d6[0]}, [r0], r3 -+ itt mi -+ vmovmi s0, lr -+ ldrmi lr, [r1], #1 -+ vdup.8 d2, r12 -+ it mi -+ vmovmi s2, lr -+ subs r5, #1 -+ vdup.8 d3, r6 -+ bne 1b -+ -+ vrshrn.u16 d6, q2, #5 -+ vmull.u8 q2, d0, d2 -+ vmlal.u8 q2, d1, d3 -+ vst1.32 {d6[0]}, [r0], r3 -+ vrshrn.u16 d6, q2, #5 -+ vst1.32 {d6[0]}, [r0] -+ -+ pop {r4-r8, pc} -+ -+endfunc -+ -+ -+ -+@ ff_hevc_rpi_pred_angular_8_neon_8 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride [r3] -+@ unsigned int mode [sp, #0] 2..34 -+ -+function ff_hevc_rpi_pred_angular_8_neon_8, export=1 -+ ldr r12, [sp] -+ push {r4-r11, lr} -+ ADRT r4, angle_2 - 2 -+ ADRT r7, inv_angle - 11*2 -+ add r7, r7, r12, lsl #1 -+ ldrsb r6, [r4, r12] -+ cmp r12, #26 -+ ldrsb r4, [r4, r12] -+ bge 26f -+ cmp r12, #18 -+ bge 18f -+ cmp r12, #10 -+ bge 10f -+ -+@ Down of Horizontal - works down left -+ bl patch_h_down_8x8_8 -+ pop {r4-r11, pc} -+ -+@ Up of Horizontal - works down up -+10: -+ ldrh r7, [r7] -+ mov r10, #-128 -+ bl patch_h_up_8x8_8 -+ pop {r4-r11, pc} -+ -+@ Left of vertical - works down left -+18: -+ ldrd r8, r9, [r1] @ Top -+ rsb r12, r6, #32 -+ ldrb lr, [r2, #-1] @ Top-left -+ ldrh r7, [r7] -+ vmov d0, r8, r9 -+ lsl r9, r9, #8 -+ vdup.8 d2, r12 -+ orr r9, r9, r8, lsr #24 -+ orr r8, lr, r8, lsl #8 -+ vmov d1, r8, r9 -+ sub r1, r7, #128 -+ mov r5, #7 -+1: -+ vdup.8 d3, r6 -+ vmull.u8 q2, d0, d2 -+ subs r12, r12, r4 -+ vmlal.u8 q2, d1, d3 -+ ittt mi -+ addmi lr, r2, r1, asr #8 -+ addmi r12, r12, #32 -+ vmovmi d0, r8, r9 -+ rsb r6, r12, #32 -+ itt mi -+ lslmi r9, r9, #8 -+ ldrbmi lr, [lr] -+ vdup.8 d2, r12 -+ vrshrn.u16 d4, q2, #5 -+ itttt mi -+ orrmi r9, r9, r8, lsr #24 -+ orrmi r8, lr, r8, lsl #8 -+ vmovmi d1, r8, r9 -+ addmi r1, r1, r7 -+ subs r5, r5, #1 -+ vst1.8 {d4}, [r0], r3 -+ bne 1b -+ -+ vdup.8 d3, r6 -+ vmull.u8 q2, d0, d2 -+ vmlal.u8 q2, d1, d3 -+ vrshrn.u16 d4, q2, #5 -+ vst1.8 {d4}, [r0] -+ -+ pop {r4-r11, pc} -+ -+@ Right of vertical - works along top - left unused -+26: -+ ldrd r8, r9, [r1] @ Top -+ rsb r12, r6, #32 -+ vmov d0, r8, r9 -+ vdup.8 d3, r6 -+ mov r5, #7 -+ lsr r8, #8 -+ vdup.8 d2, r12 -+ orr r8, r8, r9, lsl #24 -+ ldr r9, [r1, #5]! -+ vmov d1, r8, r9 -+1: -+ vmull.u8 q2, d0, d2 -+ subs r12, r4 -+ vmlal.u8 q2, d1, d3 -+ it mi -+ addmi r12, #32 -+ rsb r6, r12, #32 -+ itt mi -+ vmovmi d0, r8, r9 -+ lsrmi r8, #8 -+ vdup.8 d2, r12 -+ itt mi -+ orrmi r8, r8, r9, lsl #24 -+ ldrmi r9, [r1, #1]! -+ vrshrn.u16 d6, q2, #5 -+ it mi -+ vmovmi d1, r8, r9 -+ vdup.8 d3, r6 -+ subs r5, #1 -+ vst1.8 {d6}, [r0], r3 -+ bne 1b -+ -+ vmull.u8 q2, d0, d2 -+ vmlal.u8 q2, d1, d3 -+ vrshrn.u16 d6, q2, #5 -+ vst1.8 {d6}, [r0] -+ -+ pop {r4-r11, pc} -+ -+endfunc -+ -+ -+@ ff_hevc_rpi_pred_angular_16_neon_8 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride [r3] -+@ unsigned int mode [sp, #0] 2..34 -+ -+function ff_hevc_rpi_pred_angular_16_neon_8, export=1 -+ ldr r12, [sp] -+ push {r4-r11, lr} -+ ADRT r4, angle_2 - 2 -+ ADRT r7, inv_angle - 11*2 -+ add r7, r7, r12, lsl #1 -+ ldrsb r6, [r4, r12] -+ cmp r12, #26 -+ ldrsb r4, [r4, r12] -+ bge 26f -+ cmp r12, #18 -+ bge 18f -+ cmp r12, #10 -+ bge 10f -+ -+@ Down of Horizontal - works down left -+ mov r1, r2 @ save r2 - r1 unused by patch_down -+ -+ bl patch_h_down_8x8_8 -+ bl patch_h_down_8x8_8_continue -+ -+ add r2, r1, #8 @ restore r2, but 8 rows further down left -+ sub r0, #16 -+ mov r6, r4 -+ add r0, r0, r3, lsl #3 -+ -+ bl patch_h_down_8x8_8 -+ bl patch_h_down_8x8_8_continue -+ -+ pop {r4-r11, pc} -+ -+@ Up of Horizontal - works down up -+10: -+ ldrh r7, [r7] -+ mov r10, #-128 -+ -+ push {r2} -+ bl patch_h_up_8x8_8 -+ bl patch_h_up_8x8_8_continue -+ pop {r2} -+ -+ sub r0, #16 -+ mov r10, #-128 -+ add r2, #8 -+ add r0, r0, r3, lsl #3 -+ sub r10, r10, r7, lsl #3 -+ -+ bl patch_h_up_8x8_8 -+ bl patch_h_up_8x8_8_continue -+ -+ pop {r4-r11, pc} -+ -+@ Left of vertical - works down left -+18: -+ vld1.8 {q9}, [r1] -+ sub r1, r2, #1 -+ rsb r12, r6, #32 -+ ldrh r7, [r7] -+ vdup.8 d6, r6 -+ vext.8 q8, q9, q9, #15 -+ sub r8, r7, #128 -+ vld1.8 {d16[0]}, [r1] -+ vdup.8 d7, r12 -+ mov r5, #15 -+1: -+ vmull.u8 q0, d18, d7 -+ subs r12, r4 -+ vmlal.u8 q0, d16, d6 -+ it cc -+ addcc r12, #32 -+ vmull.u8 q1, d19, d7 -+ it cc -+ addcc r1, r2, r8, asr #8 -+ vmlal.u8 q1, d17, d6 -+ rsb r6, r12, #32 -+ vext.8 q10, q8, q8, #15 -+ sub r5, #1 -+ vld1.8 {d20[0]}, [r1] -+ it cc -+ addcc r8, r7 -+ vmov q11, q8 -+ teq r5, #0 -+ vrshrn.u16 d0, q0, #5 -+ vrshrn.u16 d1, q1, #5 -+ vdup.8 d6, r6 -+ vdup.8 d7, r12 -+ vst1.8 {q0}, [r0], r3 -+ bhi 1b -+ beq 4f -+2: -+ vmull.u8 q0, d22, d7 -+ subs r12, r4 -+ vmlal.u8 q0, d20, d6 -+ it cc -+ addcc r12, #32 -+ vmull.u8 q1, d23, d7 -+ it cc -+ addcc r1, r2, r8, asr #8 -+ vmlal.u8 q1, d21, d6 -+ rsb r6, r12, #32 -+ vext.8 q8, q10, q10, #15 -+ sub r5, #1 -+ vld1.8 {d16[0]}, [r1] -+ it cc -+ addcc r8, r7 -+ vmov q9, q10 -+ teq r5, #0 -+ vrshrn.u16 d0, q0, #5 -+ vrshrn.u16 d1, q1, #5 -+ vdup.8 d6, r6 -+ vdup.8 d7, r12 -+ vst1.8 {q0}, [r0], r3 -+ bhi 2b -+ bne 1b -+ bcc 5f -+3: -+ vmull.u8 q0, d22, d7 -+ vmlal.u8 q0, d20, d6 -+ vmull.u8 q1, d23, d7 -+ vmlal.u8 q1, d21, d6 -+ vrshrn.u16 d0, q0, #5 -+ vrshrn.u16 d1, q1, #5 -+ vst1.8 {q0}, [r0] -+ -+ pop {r4-r11, pc} -+4: -+ bcc 3b -+5: -+ vmull.u8 q0, d18, d7 -+ vmlal.u8 q0, d16, d6 -+ vmull.u8 q1, d19, d7 -+ vmlal.u8 q1, d17, d6 -+ vrshrn.u16 d0, q0, #5 -+ vrshrn.u16 d1, q1, #5 -+ vst1.8 {q0}, [r0] -+ -+ pop {r4-r11, pc} -+ -+@ Right of vertical - works along top - left unused -+26: -+ vld1.8 {q9}, [r1]! -+ rsb r12, r6, #32 -+ vdup.8 d6, r6 -+ vdup.8 d7, r12 -+ vext.8 q8, q9, q9, #1 -+ vld1.8 {d17[7]}, [r1]! -+ mov r5, #15 -+1: -+ vmull.u8 q0, d16, d6 -+ subs r12, r4 -+ vmlal.u8 q0, d18, d7 -+ it cc -+ addcc r12, #32 -+ vmull.u8 q1, d17, d6 -+ rsb r6, r12, #32 -+ vmlal.u8 q1, d19, d7 -+ sub r5, #1 -+ vext.8 q10, q8, q8, #1 -+ teq r5, #0 -+ vld1.8 {d21[7]}, [r1] -+ it cc -+ addcc r1, #1 -+ vmov q11, q8 -+ vrshrn.u16 d0, q0, #5 -+ vrshrn.u16 d1, q1, #5 -+ vdup.8 d6, r6 -+ vdup.8 d7, r12 -+ vst1.8 {q0}, [r0], r3 -+ bhi 1b -+ beq 4f -+2: -+ vmull.u8 q0, d20, d6 -+ subs r12, r4 -+ vmlal.u8 q0, d22, d7 -+ it cc -+ addcc r12, #32 -+ vmull.u8 q1, d21, d6 -+ rsb r6, r12, #32 -+ vmlal.u8 q1, d23, d7 -+ sub r5, #1 -+ vext.8 q8, q10, q10, #1 -+ teq r5, #0 -+ vld1.8 {d17[7]}, [r1] -+ it cc -+ addcc r1, #1 -+ vmov q9, q10 -+ vrshrn.u16 d0, q0, #5 -+ vrshrn.u16 d1, q1, #5 -+ vdup.8 d6, r6 -+ vdup.8 d7, r12 -+ vst1.8 {q0}, [r0], r3 -+ bhi 2b -+ bne 1b -+ bcc 5f -+3: -+ vmull.u8 q0, d20, d6 -+ vmlal.u8 q0, d22, d7 -+ vmull.u8 q1, d21, d6 -+ vmlal.u8 q1, d23, d7 -+ vrshrn.u16 d0, q0, #5 -+ vrshrn.u16 d1, q1, #5 -+ vst1.8 {q0}, [r0] -+ -+ pop {r4-r11, pc} -+4: -+ bcc 3b -+5: -+ vmull.u8 q0, d16, d6 -+ vmlal.u8 q0, d18, d7 -+ vmull.u8 q1, d17, d6 -+ vmlal.u8 q1, d19, d7 -+ vrshrn.u16 d0, q0, #5 -+ vrshrn.u16 d1, q1, #5 -+ vst1.8 {q0}, [r0] -+ -+ pop {r4-r11, pc} -+ -+endfunc -+ -+ -+@ ff_hevc_rpi_pred_angular_32_neon_8 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride [r3] -+@ unsigned int mode [sp, #0] 2..34 -+ -+function ff_hevc_rpi_pred_angular_32_neon_8, export=1 -+ ldr r12, [sp] -+ push {r4-r11, lr} -+ ADRT r4, angle_2 - 2 -+ ADRT r7, inv_angle - 11*2 -+ add r7, r7, r12, lsl #1 -+ ldrsb r6, [r4, r12] -+ cmp r12, #26 -+ ldrsb r4, [r4, r12] -+ bge 26f -+ cmp r12, #18 -+ bge 18f -+ cmp r12, #10 -+ bge 10f -+ -+@ Down of Horizontal - works down left -+ mov r10, #4 -+ mov r1, r2 -+1: -+ bl patch_h_down_8x8_8 -+ bl patch_h_down_8x8_8_continue -+ bl patch_h_down_8x8_8_continue -+ bl patch_h_down_8x8_8_continue -+ -+ add r2, r1, #8 @ restore r2, but 8 rows further down left -+ add r1, r1, #8 -+ mov r6, r4 -+ sub r0, #32 -+ subs r10, #1 -+ add r0, r0, r3, lsl #3 -+ bne 1b -+ -+ pop {r4-r11, pc} -+ -+@ Up of Horizontal - works down up -+10: -+ ldrh r7, [r7] -+ mov r10, #-128 -+ vmov.i8 d6, #1<<2 -+1: -+ push {r2,r10} -+ bl patch_h_up_8x8_8 -+ bl patch_h_up_8x8_8_continue -+ bl patch_h_up_8x8_8_continue -+ bl patch_h_up_8x8_8_continue -+ pop {r2,r10} -+ -+ vmov r8, s12 -+ sub r0, #32 -+ add r2, #8 -+ add r0, r0, r3, lsl #3 -+ sub r10, r10, r7, lsl #3 -+ vshr.u8 d6, #1 -+ teq r8, #0 -+ bne 1b -+ -+ pop {r4-r11, pc} -+ -+@ Left of vertical - works down left -+18: -+ vld1.8 {q0-q1}, [r1] -+ sub r9, r2, #1 -+ rsb r12, r6, #32 -+ ldrh r7, [r7] -+ mov r8, #-128 -+ vdup.8 d18, r6 -+ vdup.8 d19, r12 -+ mov r5, #32 -+1: -+ vld1.8 {d17[7]}, [r9] -+ add r8, r7 -+ vmov q2, q0 -+ vmov q3, q1 -+ add r9, r2, r8, asr #8 -+ vext.8 q1, q0, q1, #15 -+ vext.8 q0, q8, q0, #15 -+2: -+ vmull.u8 q10, d4, d19 -+ subs r12, r4 -+ vmlal.u8 q10, d0, d18 -+ it cc -+ addcc r12, #32 -+ vmull.u8 q11, d5, d19 -+ rsb r6, r12, #32 -+ vmlal.u8 q11, d1, d18 -+ sub r5, #1 -+ vmull.u8 q12, d6, d19 -+ teq r5, #0 -+ vmlal.u8 q12, d2, d18 -+ vmull.u8 q13, d7, d19 -+ vmlal.u8 q13, d3, d18 -+ vdup.8 d18, r6 -+ vdup.8 d19, r12 -+ vrshrn.u16 d20, q10, #5 -+ vrshrn.u16 d21, q11, #5 -+ vrshrn.u16 d22, q12, #5 -+ vrshrn.u16 d23, q13, #5 -+ vst1.8 {q10-q11}, [r0], r3 -+ bhi 2b -+ bne 1b -+ -+ pop {r4-r11, pc} -+ -+@ Right of vertical - works along top - left unused -+26: -+ add r5, r1, #32 -+ vld1.8 {q0-q1}, [r1]! -+ rsb r12, r6, #32 -+ vld1.8 {d16[0]}, [r5] -+ mov r5, #32 -+ vdup.8 d18, r6 -+ vdup.8 d19, r12 -+1: -+ vmov q2, q0 -+ add r1, #1 -+ vmov q3, q1 -+ vext.8 q0, q0, q1, #1 -+ vext.8 q1, q1, q8, #1 -+2: -+ vmull.u8 q10, d0, d18 -+ subs r12, r4 -+ vmlal.u8 q10, d4, d19 -+ it cc -+ addcc r12, #32 -+ vmull.u8 q11, d1, d18 -+ rsb r6, r12, #32 -+ vmlal.u8 q11, d5, d19 -+ sub r5, #1 -+ vmull.u8 q12, d2, d18 -+ teq r5, #0 -+ vmlal.u8 q12, d6, d19 -+ vmull.u8 q13, d3, d18 -+ vmlal.u8 q13, d7, d19 -+ vld1.8 {d16[0]}, [r1] -+ vdup.8 d18, r6 -+ vdup.8 d19, r12 -+ vrshrn.u16 d20, q10, #5 -+ vrshrn.u16 d21, q11, #5 -+ vrshrn.u16 d22, q12, #5 -+ vrshrn.u16 d23, q13, #5 -+ vst1.8 {q10-q11}, [r0], r3 -+ bhi 2b -+ bne 1b -+ -+ pop {r4-r11, pc} -+ -+endfunc -+ -+ -+@ Chroma 8 bit 4x4 patch fns -+ .text -+ -+patch_h_down_c_4x4_8: -+ ldrd r8, r9, [r2] @ Left -+ rsb r12, r6, #32 -+ vmov d0, r8, r9 -+ vdup.8 d3, r6 -+ lsr r8, #16 -+ vdup.8 d2, r12 -+ orr r8, r8, r9, lsl #16 -+ ldr r9, [r2, #6]! -+ vmov d1, r8, r9 -+ // drop through... -+patch_h_down_c_4x4_8_continue: -+ mov r5, #4 -+1: -+ subs r12, r4 -+ vmull.u8 q2, d0, d2 -+ it mi -+ addmi r12, #32 -+ vmlal.u8 q2, d1, d3 -+ rsb r6, r12, #32 -+ vext.8 q8, q8, q9, #8 -+ it mi -+ lsrmi r7, r8, #16 -+ vmov d18, d19 -+ it mi -+ vmovmi d0, r8, r9 -+ vdup.8 d2, r12 -+ it mi -+ orrmi r8, r7, r9, lsl #16 -+ vrshrn.u16 d19, q2, #5 -+ itt mi -+ ldrmi r9, [r2, #2]! -+ vmovmi d1, r8, r9 -+ subs r5, #1 -+ vdup.8 d3, r6 -+ bne 1b -+ // drop through... -+store_tran_c_4x4_8: -+ vzip.16 d16, d17 -+ add r6, r0, r3 -+ vzip.16 d18, d19 -+ lsl r3, #1 -+ vzip.32 q8, q9 -+ add r5, r0, r3 -+ vst1.16 {d16}, [r0]! -+ vst1.16 {d17}, [r6], r3 -+ vst1.16 {d18}, [r5] -+ asr r3, #1 -+ vst1.16 {d19}, [r6] -+ -+ bx lr -+ -+patch_h_up_c_4x4_8: -+ ldrd r8, r9, [r2] -+ rsb r6, r4, #32 -+ vmov d0, r8, r9 -+ vdup.8 d3, r4 -+ lsr r11, r8, #16 -+ vdup.8 d2, r6 -+ ldr r8, [r2, #-2]! -+ orr r9, r11, r9, lsl #16 -+ vmov d1, r8, r9 -+ mov r12, r4 -+ vmull.u8 q2, d0, d2 -+ vmlal.u8 q2, d1, d3 -+patch_h_up_c_4x4_8_continue: -+ mov r5, #4 -+1: -+ add r12, r4 -+ cmp r12, #33 -+ it cs -+ addcs r10, r7 -+ mov r11, #0 -+ itt cs -+ subcs r12, #32 -+ tstcs r10, #1<<31 -+ rsb r6, r12, #32 -+ it eq -+ asreq r11, r10, #7 -+ it cs -+ vmovcs d0, r8, r9 -+ it eq -+ biceq r11, #1 -+ vdup.8 d2, r6 -+ it cs -+ lsrcs r6, r8, #16 -+ vdup.8 d3, r12 -+ vext.8 q8, q8, q9, #8 -+ itt cs -+ orrcs r9, r6, r9, lsl #16 -+ ldrhcs r11, [r1, r11] -+ vmov d18, d19 -+ it hi -+ ldrhhi r11, [r2, #-2]! -+ vrshrn.u16 d19, q2, #5 -+ itt cs -+ orrcs r8, r11, r8, lsl #16 -+ vmovcs d1, r8, r9 -+ vmull.u8 q2, d0, d2 -+ subs r5, #1 -+ vmlal.u8 q2, d1, d3 -+ bne 1b -+ -+ b store_tran_c_4x4_8 -+ -+ -+@ ff_hevc_rpi_pred_angular_c_4_neon_8 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride [r3] -+@ unsigned int mode [sp, #0] 2..34 -+ -+function ff_hevc_rpi_pred_angular_c_4_neon_8, export=1 -+ ldr r12, [sp] -+ push {r4-r11, lr} -+ ADRT r4, angle_2 - 2 -+ ADRT r7, inv_angle - 11*2 -+ add r7, r7, r12, lsl #1 -+ lsl r3, #1 -+ ldrsb r6, [r4, r12] -+ cmp r12, #26 -+ ldrsb r4, [r4, r12] -+ bge 26f -+ cmp r12, #18 -+ bge 18f -+ cmp r12, #10 -+ bge 10f -+ -+@ Down of Horizontal - works down left -+ bl patch_h_down_c_4x4_8 -+ pop {r4-r11, pc} -+ -+@ Up of Horizontal - works down up -+10: -+ ldrh r7, [r7] -+ mov r10, #-128 -+ bl patch_h_up_c_4x4_8 -+ pop {r4-r11, pc} -+ -+@ Left of vertical - works down left -+18: -+ ldrd r8, r9, [r1] @ Top -+ rsb r12, r6, #32 -+ ldrh lr, [r2, #-2] @ Top-left -+ ldrh r7, [r7] -+ vmov d0, r8, r9 -+ lsl r9, r9, #16 -+ vdup.8 d2, r12 -+ orr r9, r9, r8, lsr #16 -+ orr r8, lr, r8, lsl #16 -+ vmov d1, r8, r9 -+ sub r1, r7, #128 -+ mov r5, #3 -+1: -+ vdup.8 d3, r6 -+ vmull.u8 q2, d0, d2 -+ subs r12, r12, r4 -+ vmlal.u8 q2, d1, d3 -+ itttt mi -+ addmi lr, r2, r1, asr #7 -+ bicmi lr, #1 -+ addmi r12, r12, #32 -+ vmovmi d0, r8, r9 -+ rsb r6, r12, #32 -+ itt mi -+ lslmi r9, r9, #16 -+ ldrhmi lr, [lr] -+ vdup.8 d2, r12 -+ vrshrn.u16 d4, q2, #5 -+ itttt mi -+ orrmi r9, r9, r8, lsr #16 -+ orrmi r8, lr, r8, lsl #16 -+ vmovmi d1, r8, r9 -+ addmi r1, r1, r7 -+ subs r5, r5, #1 -+ vst1.16 {d4}, [r0], r3 -+ bne 1b -+ -+ vdup.8 d3, r6 -+ vmull.u8 q2, d0, d2 -+ vmlal.u8 q2, d1, d3 -+ vrshrn.u16 d4, q2, #5 -+ vst1.16 {d4}, [r0] -+ -+ pop {r4-r11, pc} -+ -+@ Right of vertical - works along top - left unused -+26: -+ ldrd r8, r9, [r1] @ Top -+ rsb r12, r6, #32 -+ vmov d0, r8, r9 -+ vdup.8 d3, r6 -+ mov r5, #3 -+ lsr r8, #16 -+ vdup.8 d2, r12 -+ orr r8, r8, r9, lsl #16 -+ ldr r9, [r1, #6]! -+ vmov d1, r8, r9 -+1: -+ vmull.u8 q2, d0, d2 -+ subs r12, r4 -+ vmlal.u8 q2, d1, d3 -+ it mi -+ addmi r12, #32 -+ rsb r6, r12, #32 -+ itt mi -+ vmovmi d0, r8, r9 -+ lsrmi r8, #16 -+ vdup.8 d2, r12 -+ itt mi -+ orrmi r8, r8, r9, lsl #16 -+ ldrmi r9, [r1, #2]! -+ vrshrn.u16 d6, q2, #5 -+ it mi -+ vmovmi d1, r8, r9 -+ vdup.8 d3, r6 -+ subs r5, #1 -+ vst1.16 {d6}, [r0], r3 -+ bne 1b -+ -+ vmull.u8 q2, d0, d2 -+ vmlal.u8 q2, d1, d3 -+ vrshrn.u16 d6, q2, #5 -+ vst1.16 {d6}, [r0] -+ -+ pop {r4-r11, pc} -+ -+endfunc -+ -+ -+@ ff_hevc_rpi_pred_angular_c_8_neon_8 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride [r3] -+@ unsigned int mode [sp, #0] 2..34 -+ -+function ff_hevc_rpi_pred_angular_c_8_neon_8, export=1 -+ ldr r12, [sp] -+ push {r4-r11, lr} -+ ADRT r4, angle_2 - 2 -+ ADRT r7, inv_angle - 11*2 -+ add r7, r7, r12, lsl #1 -+ lsl r3, #1 -+ ldrsb r6, [r4, r12] -+ cmp r12, #26 -+ ldrsb r4, [r4, r12] -+ bge 26f -+ cmp r12, #18 -+ bge 18f -+ cmp r12, #10 -+ bge 10f -+ -+@ Down of Horizontal - works down left -+ mov r1, r2 @ save r2 - r1 unused by patch_down -+ -+ bl patch_h_down_c_4x4_8 -+ bl patch_h_down_c_4x4_8_continue -+ -+ add r2, r1, #4*2 @ restore r2, but 4 rows further down left -+ sub r0, #16 -+ mov r6, r4 -+ add r0, r0, r3, lsl #2 -+ -+ bl patch_h_down_c_4x4_8 -+ bl patch_h_down_c_4x4_8_continue -+ -+ pop {r4-r11, pc} -+ -+@ Up of Horizontal - works down up -+10: -+ ldrh r7, [r7] -+ mov r10, #-128 -+ -+ push {r2} -+ bl patch_h_up_c_4x4_8 -+ bl patch_h_up_c_4x4_8_continue -+ pop {r2} -+ -+ sub r0, #16 -+ mov r10, #-128 -+ add r2, #8 -+ add r0, r0, r3, lsl #2 -+ sub r10, r10, r7, lsl #2 -+ -+ bl patch_h_up_c_4x4_8 -+ bl patch_h_up_c_4x4_8_continue -+ -+ pop {r4-r11, pc} -+ -+@ Left of vertical - works down left -+18: -+ vld1.8 {q9}, [r1] -+ sub r1, r2, #2 -+ rsb r12, r6, #32 -+ ldrh r7, [r7] -+ vdup.8 d6, r6 -+ vext.8 q8, q9, q9, #14 -+ sub r8, r7, #128 -+ vld1.16 {d16[0]}, [r1] -+ vdup.8 d7, r12 -+ mov r5, #7 -+1: -+ subs r12, r4 -+ vmull.u8 q0, d18, d7 -+ it cc -+ asrcc r1, r8, #8 -+ vmlal.u8 q0, d16, d6 -+ it cc -+ addcc r12, #32 -+ vmull.u8 q1, d19, d7 -+ it cc -+ addcc r1, r2, r1, lsl #1 -+ vmlal.u8 q1, d17, d6 -+ rsb r6, r12, #32 -+ vext.8 q10, q8, q8, #14 -+ sub r5, #1 -+ vld1.16 {d20[0]}, [r1] -+ it cc -+ addcc r8, r7 -+ vmov q11, q8 -+ teq r5, #0 -+ vrshrn.u16 d0, q0, #5 -+ vrshrn.u16 d1, q1, #5 -+ vdup.8 d6, r6 -+ vdup.8 d7, r12 -+ vst1.8 {q0}, [r0], r3 -+ bhi 1b -+ beq 4f -+2: -+ subs r12, r4 -+ vmull.u8 q0, d22, d7 -+ it cc -+ asrcc r1, r8, #8 -+ vmlal.u8 q0, d20, d6 -+ it cc -+ addcc r12, #32 -+ vmull.u8 q1, d23, d7 -+ it cc -+ addcc r1, r2, r1, lsl #1 -+ vmlal.u8 q1, d21, d6 -+ rsb r6, r12, #32 -+ vext.8 q8, q10, q10, #14 -+ sub r5, #1 -+ vld1.16 {d16[0]}, [r1] -+ it cc -+ addcc r8, r7 -+ vmov q9, q10 -+ teq r5, #0 -+ vrshrn.u16 d0, q0, #5 -+ vrshrn.u16 d1, q1, #5 -+ vdup.8 d6, r6 -+ vdup.8 d7, r12 -+ vst1.8 {q0}, [r0], r3 -+ bhi 2b -+ bne 1b -+ bcc 5f -+3: -+ vmull.u8 q0, d22, d7 -+ vmlal.u8 q0, d20, d6 -+ vmull.u8 q1, d23, d7 -+ vmlal.u8 q1, d21, d6 -+ vrshrn.u16 d0, q0, #5 -+ vrshrn.u16 d1, q1, #5 -+ vst1.8 {q0}, [r0] -+ -+ pop {r4-r11, pc} -+4: -+ bcc 3b -+5: -+ vmull.u8 q0, d18, d7 -+ vmlal.u8 q0, d16, d6 -+ vmull.u8 q1, d19, d7 -+ vmlal.u8 q1, d17, d6 -+ vrshrn.u16 d0, q0, #5 -+ vrshrn.u16 d1, q1, #5 -+ vst1.8 {q0}, [r0] -+ -+ pop {r4-r11, pc} -+ -+@ Right of vertical - works along top - left unused -+26: -+ vld1.8 {q9}, [r1]! -+ rsb r12, r6, #32 -+ vdup.8 d6, r6 -+ vdup.8 d7, r12 -+ vext.8 q8, q9, q9, #2 -+ vld1.16 {d17[3]}, [r1]! -+ mov r5, #7 -+1: -+ vmull.u8 q0, d16, d6 -+ subs r12, r4 -+ vmlal.u8 q0, d18, d7 -+ it cc -+ addcc r12, #32 -+ vmull.u8 q1, d17, d6 -+ rsb r6, r12, #32 -+ vmlal.u8 q1, d19, d7 -+ sub r5, #1 -+ vext.8 q10, q8, q8, #2 -+ teq r5, #0 -+ vld1.16 {d21[3]}, [r1] -+ it cc -+ addcc r1, #2 -+ vmov q11, q8 -+ vrshrn.u16 d0, q0, #5 -+ vrshrn.u16 d1, q1, #5 -+ vdup.8 d6, r6 -+ vdup.8 d7, r12 -+ vst1.8 {q0}, [r0], r3 -+ bhi 1b -+ beq 4f -+2: -+ vmull.u8 q0, d20, d6 -+ subs r12, r4 -+ vmlal.u8 q0, d22, d7 -+ it cc -+ addcc r12, #32 -+ vmull.u8 q1, d21, d6 -+ rsb r6, r12, #32 -+ vmlal.u8 q1, d23, d7 -+ sub r5, #1 -+ vext.8 q8, q10, q10, #2 -+ teq r5, #0 -+ vld1.16 {d17[3]}, [r1] -+ it cc -+ addcc r1, #2 -+ vmov q9, q10 -+ vrshrn.u16 d0, q0, #5 -+ vrshrn.u16 d1, q1, #5 -+ vdup.8 d6, r6 -+ vdup.8 d7, r12 -+ vst1.8 {q0}, [r0], r3 -+ bhi 2b -+ bne 1b -+ bcc 5f -+3: -+ vmull.u8 q0, d20, d6 -+ vmlal.u8 q0, d22, d7 -+ vmull.u8 q1, d21, d6 -+ vmlal.u8 q1, d23, d7 -+ vrshrn.u16 d0, q0, #5 -+ vrshrn.u16 d1, q1, #5 -+ vst1.8 {q0}, [r0] -+ -+ pop {r4-r11, pc} -+4: -+ bcc 3b -+5: -+ vmull.u8 q0, d16, d6 -+ vmlal.u8 q0, d18, d7 -+ vmull.u8 q1, d17, d6 -+ vmlal.u8 q1, d19, d7 -+ vrshrn.u16 d0, q0, #5 -+ vrshrn.u16 d1, q1, #5 -+ vst1.8 {q0}, [r0] -+ -+ pop {r4-r11, pc} -+ -+endfunc -+ -+ -+@ ff_hevc_rpi_pred_angular_c_16_neon_8 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride [r3] -+@ unsigned int mode [sp, #0] 2..34 -+ -+function ff_hevc_rpi_pred_angular_c_16_neon_8, export=1 -+ ldr r12, [sp] -+ push {r4-r11, lr} -+ ADRT r4, angle_2 - 2 -+ ADRT r7, inv_angle - 11*2 -+ add r7, r7, r12, lsl #1 -+ lsl r3, #1 -+ ldrsb r6, [r4, r12] -+ cmp r12, #26 -+ ldrsb r4, [r4, r12] -+ bge 26f -+ cmp r12, #18 -+ bge 18f -+ cmp r12, #10 -+ bge 10f -+ -+@ Down of Horizontal - works down left -+ mov r10, #4 -+ mov r1, r2 -+1: -+ bl patch_h_down_c_4x4_8 -+ bl patch_h_down_c_4x4_8_continue -+ bl patch_h_down_c_4x4_8_continue -+ bl patch_h_down_c_4x4_8_continue -+ -+ add r2, r1, #4*2 @ restore r2, but 4 rows further down left -+ add r1, r1, #4*2 -+ mov r6, r4 -+ sub r0, #32 -+ subs r10, #1 -+ add r0, r0, r3, lsl #2 -+ bne 1b -+ -+ pop {r4-r11, pc} -+ -+@ Up of Horizontal - works down up -+10: -+ ldrh r7, [r7] -+ mov r10, #-128 -+ vmov.i8 d6, #1<<2 -+1: -+ push {r2, r10} -+ bl patch_h_up_c_4x4_8 -+ bl patch_h_up_c_4x4_8_continue -+ bl patch_h_up_c_4x4_8_continue -+ bl patch_h_up_c_4x4_8_continue -+ pop {r2, r10} -+ -+ vmov r8, s12 -+ sub r0, #32 -+ add r2, #8 -+ add r0, r0, r3, lsl #2 -+ sub r10, r10, r7, lsl #2 -+ vshr.u8 d6, #1 -+ teq r8, #0 -+ bne 1b -+ -+ pop {r4-r11, pc} -+ -+@ Left of vertical - works down left -+18: -+ vld1.8 {q0-q1}, [r1] -+ sub r9, r2, #2 -+ rsb r12, r6, #32 -+ ldrh r7, [r7] -+ mov r8, #-128 -+ vdup.8 d18, r6 -+ vdup.8 d19, r12 -+ mov r5, #16 -+1: -+ vld1.16 {d17[3]}, [r9] -+ add r8, r7 -+ vmov q2, q0 -+ vmov q3, q1 -+ asr r9, r8, #8 -+ vext.8 q1, q0, q1, #14 -+ add r9, r2, r9, lsl #1 -+ vext.8 q0, q8, q0, #14 -+2: -+ vmull.u8 q10, d4, d19 -+ subs r12, r4 -+ vmlal.u8 q10, d0, d18 -+ it cc -+ addcc r12, #32 -+ vmull.u8 q11, d5, d19 -+ rsb r6, r12, #32 -+ vmlal.u8 q11, d1, d18 -+ sub r5, #1 -+ vmull.u8 q12, d6, d19 -+ teq r5, #0 -+ vmlal.u8 q12, d2, d18 -+ vmull.u8 q13, d7, d19 -+ vmlal.u8 q13, d3, d18 -+ vdup.8 d18, r6 -+ vdup.8 d19, r12 -+ vrshrn.u16 d20, q10, #5 -+ vrshrn.u16 d21, q11, #5 -+ vrshrn.u16 d22, q12, #5 -+ vrshrn.u16 d23, q13, #5 -+ vst1.8 {q10-q11}, [r0], r3 -+ bhi 2b -+ bne 1b -+ -+ pop {r4-r11, pc} -+ -+@ Right of vertical - works along top - left unused -+26: -+ add r5, r1, #32 -+ vld1.8 {q0-q1}, [r1]! -+ rsb r12, r6, #32 -+ vld1.16 {d16[0]}, [r5] -+ mov r5, #16 -+ vdup.8 d18, r6 -+ vdup.8 d19, r12 -+1: -+ vmov q2, q0 -+ add r1, #2 -+ vmov q3, q1 -+ vext.8 q0, q0, q1, #2 -+ vext.8 q1, q1, q8, #2 -+2: -+ vmull.u8 q10, d0, d18 -+ subs r12, r4 -+ vmlal.u8 q10, d4, d19 -+ it cc -+ addcc r12, #32 -+ vmull.u8 q11, d1, d18 -+ rsb r6, r12, #32 -+ vmlal.u8 q11, d5, d19 -+ sub r5, #1 -+ vmull.u8 q12, d2, d18 -+ teq r5, #0 -+ vmlal.u8 q12, d6, d19 -+ vmull.u8 q13, d3, d18 -+ vmlal.u8 q13, d7, d19 -+ vld1.16 {d16[0]}, [r1] -+ vdup.8 d18, r6 -+ vdup.8 d19, r12 -+ vrshrn.u16 d20, q10, #5 -+ vrshrn.u16 d21, q11, #5 -+ vrshrn.u16 d22, q12, #5 -+ vrshrn.u16 d23, q13, #5 -+ vst1.8 {q10-q11}, [r0], r3 -+ bhi 2b -+ bne 1b -+ -+ pop {r4-r11, pc} -+ -+endfunc -+ -+@------------------------------------------------------------------------------ -+@ Data -+ -+ .text -+ .balign 64 -+angle_2: -+ .byte 32 -+ .byte 26, 21, 17, 13, 9, 5, 2, 0 -+ @ Sign inverted from standards table -+ .byte 2, 5, 9, 13, 17, 21, 26, 32 -+ .byte 26, 21, 17, 13, 9, 5, 2, 0 -+ @ Standard sign -+ .byte 2, 5, 9, 13, 17, 21, 26, 32 -+ -+ .balign 2 -+ -+ @ Sign inverted from standards table -+inv_angle: -+ .short 4096, 1638, 910, 630, 482, 390, 315 -+ .short 256 -+ .short 315, 390, 482, 630, 910, 1638, 4096 -+ -+@------------------------------------------------------------------------------ -+@ -+@ 10 bit fns -+@ Should work for 9 & 11 bit as there is no actual bit-depth specific code -+@ but runs out of register width for 12+ bit -+ -+ .text -+ .balign 64 -+ -+patch_h_down_4x4_10: -+ ldrd r8, r9, [r2] @ Left -+ rsb r12, r6, #32 -+ vmov d0, r8, r9 -+ vdup.16 d3, r6 -+ lsr r8, #16 -+ vdup.16 d2, r12 -+ orr r8, r8, r9, lsl #16 -+ ldr r9, [r2, #6]! -+ vmov d1, r8, r9 -+ // drop through... -+patch_h_down_4x4_10_continue: -+ mov r5, #4 -+1: -+ subs r12, r4 -+ vmul.u16 d4, d0, d2 -+ it mi -+ addmi r12, #32 -+ vmla.u16 d4, d1, d3 -+ rsb r6, r12, #32 -+ vext.16 q8, q8, q9, #4 -+ it mi -+ lsrmi r7, r8, #16 -+ vmov d18, d19 -+ it mi -+ vmovmi d0, r8, r9 -+ vdup.16 d2, r12 -+ it mi -+ orrmi r8, r7, r9, lsl #16 -+ vrshr.u16 d19, d4, #5 -+ itt mi -+ ldrmi r9, [r2, #2]! -+ vmovmi d1, r8, r9 -+ subs r5, #1 -+ vdup.16 d3, r6 -+ bne 1b -+ // drop through... -+store_tran_4x4_10: -+ vzip.16 d16, d17 -+ add r6, r0, r3 -+ vzip.16 d18, d19 -+ lsl r3, #1 -+ vzip.32 q8, q9 -+ add r5, r0, r3 -+ vst1.16 {d16}, [r0]! -+ vst1.16 {d17}, [r6], r3 -+ vst1.16 {d18}, [r5] -+ asr r3, #1 -+ vst1.16 {d19}, [r6] -+ -+ bx lr -+ -+patch_h_up_4x4_10: -+ ldrd r8, r9, [r2] -+ rsb r6, r4, #32 -+ vmov d0, r8, r9 -+ vdup.16 d3, r4 -+ lsr r11, r8, #16 -+ vdup.16 d2, r6 -+ ldr r8, [r2, #-2]! -+ orr r9, r11, r9, lsl #16 -+ vmov d1, r8, r9 -+ mov r12, r4 -+ vmul.u16 d4, d0, d2 -+ vmla.u16 d4, d1, d3 -+patch_h_up_4x4_10_continue: -+ mov r5, #4 -+1: -+ add r12, r4 -+ cmp r12, #33 -+ it cs -+ addcs r10, r7 -+ mov r11, #0 -+ itt cs -+ subcs r12, #32 -+ tstcs r10, #1<<31 -+ rsb r6, r12, #32 -+ it eq -+ asreq r11, r10, #7 -+ it cs -+ vmovcs d0, r8, r9 -+ it eq -+ biceq r11, #1 -+ vdup.16 d2, r6 -+ it cs -+ lsrcs r6, r8, #16 -+ vdup.16 d3, r12 -+ vext.16 q8, q8, q9, #4 -+ itt cs -+ orrcs r9, r6, r9, lsl #16 -+ ldrhcs r11, [r1, r11] -+ vmov d18, d19 -+ it hi -+ ldrhhi r11, [r2, #-2]! -+ vrshr.u16 d19, d4, #5 -+ itt cs -+ orrcs r8, r11, r8, lsl #16 -+ vmovcs d1, r8, r9 -+ vmul.u16 d4, d0, d2 -+ subs r5, #1 -+ vmla.u16 d4, d1, d3 -+ bne 1b -+ -+ b store_tran_4x4_10 -+ -+ -+@ ff_hevc_rpi_pred_angular_4_neon_10 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride [r3] -+@ unsigned int mode [sp, #0] 2..34 -+ -+function ff_hevc_rpi_pred_angular_4_neon_10, export=1 -+ ldr r12, [sp] -+ push {r4-r11, lr} -+ ADRT r4, angle_2 - 2 -+ ADRT r7, inv_angle - 11*2 -+ add r7, r7, r12, lsl #1 -+ lsl r3, #1 -+ ldrsb r6, [r4, r12] -+ cmp r12, #26 -+ ldrsb r4, [r4, r12] -+ bge 26f -+ cmp r12, #18 -+ bge 18f -+ cmp r12, #10 -+ bge 10f -+ -+@ Down of Horizontal - works down left -+ bl patch_h_down_4x4_10 -+ pop {r4-r11, pc} -+ -+@ Up of Horizontal - works down up -+10: -+ ldrh r7, [r7] -+ mov r10, #-128 -+ bl patch_h_up_4x4_10 -+ pop {r4-r11, pc} -+ -+@ Left of vertical - works down left -+18: -+ ldrd r8, r9, [r1] @ Top -+ rsb r12, r6, #32 -+ ldrh lr, [r2, #-2] @ Top-left -+ ldrh r7, [r7] -+ vmov d0, r8, r9 -+ lsl r9, r9, #16 -+ vdup.16 d2, r12 -+ orr r9, r9, r8, lsr #16 -+ orr r8, lr, r8, lsl #16 -+ vmov d1, r8, r9 -+ sub r1, r7, #128 -+ mov r5, #3 -+1: -+ sel lr, lr, lr @ force pipeline 0 on Cortex-A53 -+ vdup.16 d3, r6 -+ vmul.u16 d4, d0, d2 -+ subs r12, r12, r4 -+ vmla.u16 d4, d1, d3 -+ itttt mi -+ addmi lr, r2, r1, asr #7 -+ bicmi lr, #1 -+ addmi r12, r12, #32 -+ vmovmi d0, r8, r9 -+ rsb r6, r12, #32 -+ itt mi -+ lslmi r9, r9, #16 -+ ldrhmi lr, [lr] -+ vdup.16 d2, r12 -+ vrshr.u16 d4, d4, #5 -+ itttt mi -+ orrmi r9, r9, r8, lsr #16 -+ orrmi r8, lr, r8, lsl #16 -+ vmovmi d1, r8, r9 -+ addmi r1, r1, r7 -+ subs r5, r5, #1 -+ vst1.16 {d4}, [r0], r3 -+ bne 1b -+ -+ vdup.16 d3, r6 -+ nop @ force next insn into pipeline 0 to enable -+ vmul.u16 d4, d0, d2 @ vmla to execute back-to-back on Cortex-A53 -+ vmla.u16 d4, d1, d3 -+ vrshr.u16 d4, d4, #5 -+ vst1.16 {d4}, [r0] -+ -+ pop {r4-r11, pc} -+ -+@ Right of vertical - works along top - left unused -+26: -+ ldrd r8, r9, [r1] @ Top -+ rsb r12, r6, #32 -+ vmov d0, r8, r9 -+ vdup.16 d3, r6 -+ lsr r8, #16 -+ vdup.16 d2, r12 -+ orr r8, r8, r9, lsl #16 -+ ldr r9, [r1, #6]! -+ vmov d1, r8, r9 -+ mov r5, #3 -+1: -+ vmul.u16 d4, d0, d2 -+ subs r12, r4 -+ vmla.u16 d4, d1, d3 -+ it mi -+ addmi r12, #32 -+ rsb r6, r12, #32 -+ itt mi -+ vmovmi d0, r8, r9 -+ lsrmi r8, #16 -+ vdup.16 d2, r12 -+ itt mi -+ orrmi r8, r8, r9, lsl #16 -+ ldrmi r9, [r1, #2]! -+ vrshr.u16 d4, d4, #5 -+ it mi -+ vmovmi d1, r8, r9 -+ vdup.16 d3, r6 -+ subs r5, #1 -+ vst1.16 {d4}, [r0], r3 -+ bne 1b -+ -+ vmul.u16 d4, d0, d2 -+ vmla.u16 d4, d1, d3 -+ vrshr.u16 d4, d4, #5 -+ vst1.16 {d4}, [r0] -+ -+ pop {r4-r11, pc} -+ -+endfunc -+ -+ -+@ ff_hevc_rpi_pred_angular_8_neon_10 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride [r3] -+@ unsigned int mode [sp, #0] 2..34 -+ -+function ff_hevc_rpi_pred_angular_8_neon_10, export=1 -+ ldr r12, [sp] -+ push {r4-r11, lr} -+ ADRT r4, angle_2 - 2 -+ ADRT r7, inv_angle - 11*2 -+ add r7, r7, r12, lsl #1 -+ lsl r3, #1 -+ ldrsb r6, [r4, r12] -+ cmp r12, #26 -+ ldrsb r4, [r4, r12] -+ bge 26f -+ cmp r12, #18 -+ bge 18f -+ cmp r12, #10 -+ bge 10f -+ -+@ Down of Horizontal - works down left -+ mov r1, r2 @ save r2 - r1 unused by patch_down -+ -+ bl patch_h_down_4x4_10 -+ bl patch_h_down_4x4_10_continue -+ -+ add r2, r1, #4*2 @ restore r2, but 4 rows further down left -+ sub r0, #16 -+ mov r6, r4 -+ add r0, r0, r3, lsl #2 -+ -+ bl patch_h_down_4x4_10 -+ bl patch_h_down_4x4_10_continue -+ -+ pop {r4-r11, pc} -+ -+@ Up of Horizontal - works down up -+10: -+ ldrh r7, [r7] -+ mov r10, #-128 -+ -+ push {r2} -+ bl patch_h_up_4x4_10 -+ bl patch_h_up_4x4_10_continue -+ pop {r2} -+ -+ sub r0, #16 -+ mov r10, #-128 -+ add r2, #8 -+ add r0, r0, r3, lsl #2 -+ sub r10, r10, r7, lsl #2 -+ -+ bl patch_h_up_4x4_10 -+ bl patch_h_up_4x4_10_continue -+ -+ pop {r4-r11, pc} -+ -+@ Left of vertical - works down left -+18: -+ vld1.16 {q9}, [r1] -+ sub r1, r2, #2 -+ rsb r12, r6, #32 -+ ldrh r7, [r7] -+ vdup.16 q2, r6 -+ vext.16 q8, q9, q9, #7 -+ sub r8, r7, #128 -+ vld1.16 {d16[0]}, [r1] -+ vdup.16 q3, r12 -+ mov r5, #7 -+1: -+ vmul.u16 q0, q9, q3 -+ subs r12, r4 -+ vmla.u16 q0, q8, q2 -+ ittt cc -+ asrcc r1, r8, #8 -+ addcc r12, #32 -+ addcc r1, r2, r1, lsl #1 -+ vext.16 q10, q8, q8, #7 -+ rsb r6, r12, #32 -+ vmov q11, q8 -+ sub r5, #1 -+ vrshr.u16 q0, q0, #5 -+ it cc -+ addcc r8, r7 -+ vld1.16 {d20[0]}, [r1] -+ teq r5, #0 -+ vdup.16 q2, r6 -+ vdup.16 q3, r12 -+ vst1.16 {q0}, [r0], r3 -+ bhi 1b -+ beq 4f -+2: -+ vmul.u16 q0, q11, q3 -+ subs r12, r4 -+ vmla.u16 q0, q10, q2 -+ ittt cc -+ asrcc r1, r8, #8 -+ addcc r12, #32 -+ addcc r1, r2, r1, lsl #1 -+ vext.16 q8, q10, q10, #7 -+ rsb r6, r12, #32 -+ vmov q9, q10 -+ sub r5, #1 -+ vrshr.u16 q0, q0, #5 -+ it cc -+ addcc r8, r7 -+ vld1.16 {d16[0]}, [r1] -+ teq r5, #0 -+ vdup.16 q2, r6 -+ vdup.16 q3, r12 -+ vst1.16 {q0}, [r0], r3 -+ bhi 2b -+ bne 1b -+ bcc 5f -+3: -+ vmul.u16 q0, q11, q3 -+ vmla.u16 q0, q10, q2 -+ vrshr.u16 q0, q0, #5 -+ vst1.16 {q0}, [r0] -+ -+ pop {r4-r11, pc} -+4: -+ bcc 3b -+5: -+ vmul.u16 q0, q9, q3 -+ vmla.u16 q0, q8, q2 -+ vrshr.u16 q0, q0, #5 -+ vst1.16 {q0}, [r0] -+ -+ pop {r4-r11, pc} -+ -+@ Right of vertical - works along top - left unused -+26: -+ vld1.16 {q9}, [r1]! -+ rsb r12, r6, #32 -+ vdup.16 q2, r6 -+ vdup.16 q3, r12 -+ vext.16 q8, q9, q9, #1 -+ vld1.16 {d17[3]}, [r1]! -+ mov r5, #7 -+1: -+ vmul.u16 q0, q8, q2 -+ subs r12, r4 -+ vmla.u16 q0, q9, q3 -+ it cc -+ addcc r12, #32 -+ vext.16 q10, q8, q8, #1 -+ rsb r6, r12, #32 -+ vld1.16 {d21[3]}, [r1] -+ sub r5, #1 -+ vmov q11, q8 -+ teq r5, #0 -+ vrshr.u16 q0, q0, #5 -+ it cc -+ addcc r1, #2 -+ vdup.16 q2, r6 -+ vdup.16 q3, r12 -+ vst1.16 {q0}, [r0], r3 -+ bhi 1b -+ beq 4f -+2: -+ vmul.u16 q0, q10, q2 -+ subs r12, r4 -+ vmla.u16 q0, q11, q3 -+ it cc -+ addcc r12, #32 -+ vext.16 q8, q10, q10, #1 -+ rsb r6, r12, #32 -+ vld1.16 {d17[3]}, [r1] -+ sub r5, #1 -+ vmov q9, q10 -+ teq r5, #0 -+ vrshr.u16 q0, q0, #5 -+ it cc -+ addcc r1, #2 -+ vdup.16 q2, r6 -+ vdup.16 q3, r12 -+ vst1.16 {q0}, [r0], r3 -+ bhi 2b -+ bne 1b -+ bcc 5f -+3: -+ vmul.u16 q0, q10, q2 -+ vmla.u16 q0, q11, q3 -+ vrshr.u16 q0, q0, #5 -+ vst1.16 {q0}, [r0] -+ -+ pop {r4-r11, pc} -+4: -+ bcc 3b -+5: -+ vmul.u16 q0, q8, q2 -+ vmla.u16 q0, q9, q3 -+ vrshr.u16 q0, q0, #5 -+ vst1.16 {q0}, [r0] -+ -+ pop {r4-r11, pc} -+ -+endfunc -+ -+ -+@ ff_hevc_rpi_pred_angular_16_neon_10 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride [r3] -+@ unsigned int mode [sp, #0] 2..34 -+ -+function ff_hevc_rpi_pred_angular_16_neon_10, export=1 -+ ldr r12, [sp] -+ push {r4-r11, lr} -+ ADRT r4, angle_2 - 2 -+ ADRT r7, inv_angle - 11*2 -+ add r7, r7, r12, lsl #1 -+ lsl r3, #1 -+ ldrsb r6, [r4, r12] -+ cmp r12, #26 -+ ldrsb r4, [r4, r12] -+ bge 26f -+ cmp r12, #18 -+ bge 18f -+ cmp r12, #10 -+ bge 10f -+ -+@ Down of Horizontal - works down left -+ mov r10, #4 -+ mov r1, r2 -+1: -+ bl patch_h_down_4x4_10 -+ bl patch_h_down_4x4_10_continue -+ bl patch_h_down_4x4_10_continue -+ bl patch_h_down_4x4_10_continue -+ -+ add r2, r1, #4*2 @ restore r2, but 4 rows further down left -+ add r1, r1, #4*2 -+ mov r6, r4 -+ sub r0, #32 -+ subs r10, #1 -+ add r0, r0, r3, lsl #2 -+ bne 1b -+ -+ pop {r4-r11, pc} -+ -+@ Up of Horizontal - works down up -+10: -+ ldrh r7, [r7] -+ mov r10, #-128 -+ vmov.i8 d6, #1<<2 -+1: -+ push {r2, r10} -+ bl patch_h_up_4x4_10 -+ bl patch_h_up_4x4_10_continue -+ bl patch_h_up_4x4_10_continue -+ bl patch_h_up_4x4_10_continue -+ pop {r2, r10} -+ -+ vmov r8, s12 -+ sub r0, #32 -+ add r2, #8 -+ add r0, r0, r3, lsl #2 -+ sub r10, r10, r7, lsl #2 -+ vshr.u8 d6, #1 -+ teq r8, #0 -+ bne 1b -+ -+ pop {r4-r11, pc} -+ -+@ Left of vertical - works down left -+18: -+ vld1.16 {q0-q1}, [r1] -+ sub r9, r2, #2 -+ rsb r12, r6, #32 -+ ldrh r7, [r7] -+ mov r8, #-128 -+ vdup.16 q9, r6 -+ vdup.16 q10, r12 -+ mov r5, #16 -+1: -+ vld1.16 {d17[3]}, [r9] -+ add r8, r7 -+ vmov q2, q0 -+ vmov q3, q1 -+ asr r9, r8, #8 -+ vext.16 q1, q0, q1, #7 -+ add r9, r2, r9, lsl #1 -+ vext.16 q0, q8, q0, #7 -+2: -+ vmul.u16 q11, q2, q10 -+ subs r12, r4 -+ vmla.u16 q11, q0, q9 -+ it cc -+ addcc r12, #32 -+ vmul.u16 q12, q3, q10 -+ rsb r6, r12, #32 -+ vmla.u16 q12, q1, q9 -+ sub r5, #1 -+ teq r5, #0 -+ vdup.16 q9, r6 -+ vdup.16 q10, r12 -+ vrshr.u16 q11, q11, #5 -+ vrshr.u16 q12, q12, #5 -+ vst1.16 {q11-q12}, [r0], r3 -+ bhi 2b -+ bne 1b -+ -+ pop {r4-r11, pc} -+ -+@ Right of vertical - works along top - left unused -+26: -+ add r5, r1, #32 -+ vld1.16 {q0-q1}, [r1]! -+ rsb r12, r6, #32 -+ vld1.16 {d16[0]}, [r5] -+ mov r5, #16 -+ vdup.16 q9, r6 -+ vdup.16 q10, r12 -+1: -+ vmov q2, q0 -+ add r1, #2 -+ vmov q3, q1 -+ vext.16 q0, q0, q1, #1 -+ vext.16 q1, q1, q8, #1 -+2: -+ vmul.u16 q11, q0, q9 -+ subs r12, r4 -+ vmla.u16 q11, q2, q10 -+ it cc -+ addcc r12, #32 -+ vmul.u16 q12, q1, q9 -+ rsb r6, r12, #32 -+ vmla.u16 q12, q3, q10 -+ sub r5, #1 -+ vld1.16 {d16[0]}, [r1] -+ teq r5, #0 -+ vdup.16 q9, r6 -+ vdup.16 q10, r12 -+ vrshr.u16 q11, q11, #5 -+ vrshr.u16 q12, q12, #5 -+ vst1.16 {q11-q12}, [r0], r3 -+ bhi 2b -+ bne 1b -+ -+ pop {r4-r11, pc} -+ -+endfunc -+ -+ -+@ ff_hevc_rpi_pred_angular_32_neon_10 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride [r3] -+@ unsigned int mode [sp, #0] 2..34 -+ -+function ff_hevc_rpi_pred_angular_32_neon_10, export=1 -+ ldr r12, [sp] -+ push {r4-r11, lr} -+ ADRT r4, angle_2 - 2 -+ ADRT r7, inv_angle - 11*2 -+ add r7, r7, r12, lsl #1 -+ lsl r3, #1 -+ vpush {d8} -+ ldrsb r6, [r4, r12] -+ cmp r12, #26 -+ ldrsb r4, [r4, r12] -+ bge 26f -+ cmp r12, #18 -+ bge 18f -+ cmp r12, #10 -+ bge 10f -+ -+@ Down of Horizontal - works down left -+ add sp, #8 -+ mov r10, #8 -+ mov r1, r2 -+1: -+ bl patch_h_down_4x4_10 -+ bl patch_h_down_4x4_10_continue -+ bl patch_h_down_4x4_10_continue -+ bl patch_h_down_4x4_10_continue -+ bl patch_h_down_4x4_10_continue -+ bl patch_h_down_4x4_10_continue -+ bl patch_h_down_4x4_10_continue -+ bl patch_h_down_4x4_10_continue -+ -+ add r2, r1, #4*2 @ restore r2, but 4 rows further down left -+ add r1, r1, #4*2 -+ mov r6, r4 -+ sub r0, #64 -+ subs r10, #1 -+ add r0, r0, r3, lsl #2 -+ bne 1b -+ -+ pop {r4-r11, pc} -+ -+@ Up of Horizontal - works down up -+10: -+ add sp, #8 -+ ldrh r7, [r7] -+ mov r10, #-128 -+ vmov.i8 d6, #1<<6 -+1: -+ push {r2, r10} -+ bl patch_h_up_4x4_10 -+ bl patch_h_up_4x4_10_continue -+ bl patch_h_up_4x4_10_continue -+ bl patch_h_up_4x4_10_continue -+ bl patch_h_up_4x4_10_continue -+ bl patch_h_up_4x4_10_continue -+ bl patch_h_up_4x4_10_continue -+ bl patch_h_up_4x4_10_continue -+ pop {r2, r10} -+ -+ vmov r8, s12 -+ sub r0, #64 -+ add r2, #8 -+ add r0, r0, r3, lsl #2 -+ sub r10, r10, r7, lsl #2 -+ vshr.u8 d6, #1 -+ teq r8, #0 -+ bne 1b -+ -+ pop {r4-r11, pc} -+ -+@ Left of vertical - works down left -+18: -+ add r5, r1, #32 -+ vld1.16 {q1-q2}, [r1] -+ rsb r12, r6, r6, lsl #16 -+ vld1.16 {q3-q4}, [r5] -+ sub r9, r2, #2 -+ rsb r4, r12, #0 -+ rsb r12, r12, #32 << 16 -+ ldrh r7, [r7] -+ mov r8, #-128 -+ vmov d0, d9 -+ vmov s2, r12 -+ add r10, r0, #32 -+ mov r5, #32 -+1: -+ vld1.16 {d1[3]}, [r9] -+ add r8, r7 -+ vmov q11, q4 -+ vmov q10, q3 -+ asr r9, r8, #8 -+ vmov q9, q2 -+ add r9, r2, r9, lsl #1 -+ vmov q8, q1 -+ vext.16 q4, q3, q4, #7 -+ vext.16 q3, q2, q3, #7 -+ vext.16 q2, q1, q2, #7 -+ vext.16 q1, q0, q1, #7 -+2: -+ vmul.u16 q12, q8, d1[1] -+ adds r12, r4 -+ vmla.u16 q12, q1, d1[0] -+ it cc -+ addcc r12, #32 << 16 -+ vmul.u16 q13, q9, d1[1] -+ it cc -+ subcc r12, #32 -+ vmla.u16 q13, q2, d1[0] -+ sub r5, #1 -+ vmul.u16 q14, q10, d1[1] -+ teq r5, #0 -+ vmla.u16 q14, q3, d1[0] -+ vmul.u16 q15, q11, d1[1] -+ vmla.u16 q15, q4, d1[0] -+ vmov s2, r12 -+ vrshr.u16 q12, q12, #5 -+ vrshr.u16 q13, q13, #5 -+ vrshr.u16 q14, q14, #5 -+ vrshr.u16 q15, q15, #5 -+ vst1.16 {q12-q13}, [r0], r3 -+ vst1.16 {q14-q15}, [r10], r3 -+ bhi 2b -+ bne 1b -+ -+ vpop {d8} -+ vmov d9, d0 -+ pop {r4-r11, pc} -+ -+@ Right of vertical - works along top - left unused -+26: -+ add r5, r1, #32 -+ vld1.16 {q1-q2}, [r1] -+ rsb r12, r6, r6, lsl #16 -+ vld1.16 {q3-q4}, [r5] -+ add r1, r1, #64 -+ rsb r4, r12, #0 -+ rsb r12, r12, #32 << 16 -+ vmov d1, d9 -+ vmov s1, r12 -+ add r10, r0, #32 -+ mov r5, #32 -+1: -+ vld1.16 {d0[0]}, [r1]! -+ vmov q8, q1 -+ vmov q9, q2 -+ vmov q10, q3 -+ vmov q11, q4 -+ vext.16 q1, q1, q2, #1 -+ vext.16 q2, q2, q3, #1 -+ vext.16 q3, q3, q4, #1 -+ vext.16 q4, q4, q0, #1 -+2: -+ vmul.u16 q12, q1, d0[2] -+ adds r12, r4 -+ vmla.u16 q12, q8, d0[3] -+ it cc -+ addcc r12, #32 << 16 -+ vmul.u16 q13, q2, d0[2] -+ it cc -+ subcc r12, #32 -+ vmla.u16 q13, q9, d0[3] -+ sub r5, #1 -+ vmul.u16 q14, q3, d0[2] -+ teq r5, #0 -+ vmla.u16 q14, q10, d0[3] -+ vmul.u16 q15, q4, d0[2] -+ vmla.u16 q15, q11, d0[3] -+ vmov s1, r12 -+ vrshr.u16 q12, q12, #5 -+ vrshr.u16 q13, q13, #5 -+ vrshr.u16 q14, q14, #5 -+ vrshr.u16 q15, q15, #5 -+ vst1.16 {q12-q13}, [r0], r3 -+ vst1.16 {q14-q15}, [r10], r3 -+ bhi 2b -+ bne 1b -+ -+ vpop {d8} -+ vmov d9, d1 -+ pop {r4-r11, pc} -+ -+endfunc -+ -+ -+ -+@ Generate 4x4 chroma patch -+@ -+@ In (const) -+@ r1 Up ptr (_up only) -+@ r3 Out stride -+@ r4 Angle add -+@ r7 Inv angle (_up only) -+@ -+@ In/Out (updated) -+@ r0 Out pointer - on exit point to start of next patch horizontally (i.e. r0 + patch width) -+@ r2 Left ptr - updated -+@ r6 Angle frac (init to r4 + 32) -+@ r8 Inv angle accumulator -+@ q2 Cur Line - load before 1st call for down - set by _up -+@ q8 Cur Line - load before 1st call for up - set by _down -+@ -+@ Temps -+@ r5 Loop counter -+@ r12 -+@ d0, q1, q12-q15 -+ -+patch_h_down_c_4x4_10: -+ vld1.16 {q12}, [r2]! -+ rsb r12, r6, #32 -+ vdup.16 q2, r6 -+ vdup.16 q3, r12 -+ mov r5, #4 -+1: -+ vmov q13, q12 -+ vext.16 q12, q12, q12, #2 -+ vld1.32 {d25[1]}, [r2]! -+patch_h_down_c_4x4_10_continue: -+2: -+ vmov q8, q9 -+ subs r12, r4 -+ vmul.u16 q0, q13, q3 -+ it cc -+ addcc r12, #32 -+ vmla.u16 q0, q12, q2 -+ rsb r6, r12, #32 -+ vmov q9, q10 -+ sub r5, #1 -+ vmov q10, q11 -+ teq r5, #0 -+ vdup.16 q2, r6 -+ vdup.16 q3, r12 -+ vrshr.u16 q11, q0, #5 -+ bhi 2b -+ bne 1b -+ -+ bcs 3f -+ vmov q13, q12 -+ vext.16 q12, q12, q12, #2 -+ vld1.32 {d25[1]}, [r2]! -+3: -+ -+store_tran_c_4x4_10: -+T add r6, r0, r3 -+ vzip.32 q8, q10 -+A add r6, r0, r3 -+T lsl r3, #1 -+ vzip.32 q9, q11 -+A add r5, r0, r3, lsl #1 -+T add r5, r0, r3 -+ vst2.32 {d16,d18}, [r0]! -+A lsl r3, #1 -+ vst2.32 {d17,d19}, [r6], r3 -+ asr r3, #1 -+ vst2.32 {d20,d22}, [r5] -+ mov r5, #4 -+ vst2.32 {d21,d23}, [r6] -+ bx lr -+ -+patch_h_up_c_4x4_10: -+ vld1.16 {q1}, [r2] -+ rsb r12, r6, #32 -+ vdup.16 q2, r6 -+ vdup.16 q3, r12 -+ mov r5, #4 -+1: -+ adds r8, r7 -+ vmov q12, q1 -+ it mi -+ ldrmi r6, [r2, #-4]! -+ vext.16 q1, q1, q1, #6 -+ itt pl -+ asrpl r6, r8, #8 -+ ldrpl r6, [r1, r6, lsl #2] -+ vmov s4, r6 -+patch_h_up_c_4x4_10_continue: -+2: -+ vmov q8, q9 -+ subs r12, r4 -+ vmul.u16 q0, q12, q3 -+ it cc -+ addcc r12, #32 -+ vmla.u16 q0, q1, q2 -+ rsb r6, r12, #32 -+ vmov q9, q10 -+ sub r5, #1 -+ vmov q10, q11 -+ teq r5, #0 -+ vdup.16 q2, r6 -+ vdup.16 q3, r12 -+ vrshr.u16 q11, q0, #5 -+ bhi 2b -+ bne 1b -+ -+ bcs store_tran_c_4x4_10 -+ adds r8, r7 -+ vmov q12, q1 -+ it mi -+ ldrmi r6, [r2, #-4]! -+ vext.16 q1, q1, q1, #6 -+ itt pl -+ asrpl r6, r8, #8 -+ ldrpl r6, [r1, r6, lsl #2] -+ vmov s4, r6 -+ b store_tran_c_4x4_10 -+ -+ -+@ ff_hevc_rpi_pred_angular_c_4_neon_10 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride [r3] -+@ unsigned int mode [sp, #0] 2..34 -+ -+function ff_hevc_rpi_pred_angular_c_4_neon_10, export=1 -+ ldr r12, [sp] -+ push {r4-r8, lr} -+ ADRT r4, angle_2 - 2 -+ ADRT r7, inv_angle - 11*2 -+ add r7, r7, r12, lsl #1 -+ lsl r3, #2 -+ ldrsb r6, [r4, r12] -+ cmp r12, #26 -+ ldrsb r4, [r4, r12] -+ bge 26f -+ cmp r12, #18 -+ bge 18f -+ cmp r12, #10 -+ bge 10f -+ -+@ Down of Horizontal - works down left -+ bl patch_h_down_c_4x4_10 -+ pop {r4-r8, pc} -+ -+@ Up of Horizontal - works down up -+10: -+ ldrh r7, [r7] -+ mov r8, #-128 -+ sub r8, r7 -+ bl patch_h_up_c_4x4_10 -+ pop {r4-r8, pc} -+ -+@ Left of vertical - works down left -+18: -+ vld1.16 {q9}, [r1] -+ sub r1, r2, #4 -+ rsb r12, r6, #32 -+ ldrh r7, [r7] -+ vdup.16 q2, r6 -+ vext.16 q8, q9, q9, #6 -+ sub r8, r7, #128 -+ vld1.32 {d16[0]}, [r1] -+ vdup.16 q3, r12 -+ mov r5, #3 -+1: -+ vmul.u16 q0, q9, q3 -+ subs r12, r4 -+ vmla.u16 q0, q8, q2 -+ ittt cc -+ asrcc r1, r8, #8 -+ addcc r12, #32 -+ addcc r1, r2, r1, lsl #2 -+ vext.16 q10, q8, q8, #6 -+ rsb r6, r12, #32 -+ vmov q11, q8 -+ sub r5, #1 -+ vrshr.u16 q0, q0, #5 -+ it cc -+ addcc r8, r7 -+ vld1.32 {d20[0]}, [r1] -+ teq r5, #0 -+ vdup.16 q2, r6 -+ vdup.16 q3, r12 -+ vst1.16 {q0}, [r0], r3 -+ bhi 1b -+ beq 4f -+2: -+ vmul.u16 q0, q11, q3 -+ subs r12, r4 -+ vmla.u16 q0, q10, q2 -+ ittt cc -+ asrcc r1, r8, #8 -+ addcc r12, #32 -+ addcc r1, r2, r1, lsl #2 -+ vext.16 q8, q10, q10, #6 -+ rsb r6, r12, #32 -+ vmov q9, q10 -+ sub r5, #1 -+ vrshr.u16 q0, q0, #5 -+ it cc -+ addcc r8, r7 -+ vld1.32 {d16[0]}, [r1] -+ teq r5, #0 -+ vdup.16 q2, r6 -+ vdup.16 q3, r12 -+ vst1.16 {q0}, [r0], r3 -+ bhi 2b -+ bne 1b -+ bcc 5f -+3: -+ vmul.u16 q0, q11, q3 -+ vmla.u16 q0, q10, q2 -+ vrshr.u16 q0, q0, #5 -+ vst1.16 {q0}, [r0] -+ -+ pop {r4-r8, pc} -+4: -+ bcc 3b -+5: -+ vmul.u16 q0, q9, q3 -+ vmla.u16 q0, q8, q2 -+ vrshr.u16 q0, q0, #5 -+ vst1.16 {q0}, [r0] -+ -+ pop {r4-r8, pc} -+ -+@ Right of vertical - works along top - left unused -+26: -+ vld1.16 {q9}, [r1]! -+ rsb r12, r6, #32 -+ vdup.16 q2, r6 -+ vdup.16 q3, r12 -+ vext.16 q8, q9, q9, #2 -+ vld1.32 {d17[1]}, [r1]! -+ mov r5, #3 -+1: -+ vmul.u16 q0, q8, q2 -+ subs r12, r4 -+ vmla.u16 q0, q9, q3 -+ it cc -+ addcc r12, #32 -+ vext.16 q10, q8, q8, #2 -+ rsb r6, r12, #32 -+ vld1.32 {d21[1]}, [r1] -+ sub r5, #1 -+ vmov q11, q8 -+ teq r5, #0 -+ vrshr.u16 q0, q0, #5 -+ it cc -+ addcc r1, #4 -+ vdup.16 q2, r6 -+ vdup.16 q3, r12 -+ vst1.16 {q0}, [r0], r3 -+ bhi 1b -+ beq 4f -+2: -+ vmul.u16 q0, q10, q2 -+ subs r12, r4 -+ vmla.u16 q0, q11, q3 -+ it cc -+ addcc r12, #32 -+ vext.16 q8, q10, q10, #2 -+ rsb r6, r12, #32 -+ vld1.32 {d17[1]}, [r1] -+ sub r5, #1 -+ vmov q9, q10 -+ teq r5, #0 -+ vrshr.u16 q0, q0, #5 -+ it cc -+ addcc r1, #4 -+ vdup.16 q2, r6 -+ vdup.16 q3, r12 -+ vst1.16 {q0}, [r0], r3 -+ bhi 2b -+ bne 1b -+ bcc 5f -+3: -+ vmul.u16 q0, q10, q2 -+ vmla.u16 q0, q11, q3 -+ vrshr.u16 q0, q0, #5 -+ vst1.16 {q0}, [r0] -+ -+ pop {r4-r8, pc} -+4: -+ bcc 3b -+5: -+ vmul.u16 q0, q8, q2 -+ vmla.u16 q0, q9, q3 -+ vrshr.u16 q0, q0, #5 -+ vst1.16 {q0}, [r0] -+ -+ pop {r4-r8, pc} -+ -+endfunc -+ -+ -+@ ff_hevc_rpi_pred_angular_c_8_neon_10 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride [r3] -+@ unsigned int mode [sp, #0] 2..34 -+ -+function ff_hevc_rpi_pred_angular_c_8_neon_10, export=1 -+ ldr r12, [sp] -+ push {r4-r8, lr} -+ ADRT r4, angle_2 - 2 -+ ADRT r7, inv_angle - 11*2 -+ add r7, r7, r12, lsl #1 -+ lsl r3, #2 -+ ldrsb r6, [r4, r12] -+ cmp r12, #26 -+ ldrsb r4, [r4, r12] -+ bge 26f -+ cmp r12, #18 -+ bge 18f -+ cmp r12, #10 -+ bge 10f -+ -+@ Down of Horizontal - works down left -+ mov r1, r2 @ save r2 - r1 unused by patch_down -+ -+ bl patch_h_down_c_4x4_10 -+ bl patch_h_down_c_4x4_10_continue -+ -+ add r2, r1, #4*4 @ restore r2, but 4 rows further down left -+ sub r0, #32 -+ mov r6, r4 -+ add r0, r0, r3, lsl #2 -+ -+ bl patch_h_down_c_4x4_10 -+ bl patch_h_down_c_4x4_10_continue -+ -+ pop {r4-r8, pc} -+ -+@ Up of Horizontal - works down up -+10: -+ ldrh r7, [r7] -+ mov r8, #-128 -+ sub r8, r7 -+ -+ push {r2, r8} -+ bl patch_h_up_c_4x4_10 -+ bl patch_h_up_c_4x4_10_continue -+ pop {r2, r8} -+ -+ sub r0, #32 -+ mov r6, r4 -+ add r2, #16 -+ sub r8, r8, r7, lsl #2 -+ add r0, r0, r3, lsl #2 -+ -+ bl patch_h_up_c_4x4_10 -+ bl patch_h_up_c_4x4_10_continue -+ -+ pop {r4-r8, pc} -+ -+@ Left of vertical - works down left -+18: -+ vld1.16 {q0-q1}, [r1] -+ sub r9, r2, #4 -+ rsb r12, r6, #32 -+ ldrh r7, [r7] -+ mov r8, #-128 -+ vdup.16 q9, r6 -+ vdup.16 q10, r12 -+ mov r5, #8 -+1: -+ vld1.32 {d17[1]}, [r9] -+ add r8, r7 -+ vmov q2, q0 -+ vmov q3, q1 -+ asr r9, r8, #8 -+ vext.16 q1, q0, q1, #6 -+ add r9, r2, r9, lsl #2 -+ vext.16 q0, q8, q0, #6 -+2: -+ vmul.u16 q11, q2, q10 -+ subs r12, r4 -+ vmla.u16 q11, q0, q9 -+ it cc -+ addcc r12, #32 -+ vmul.u16 q12, q3, q10 -+ rsb r6, r12, #32 -+ vmla.u16 q12, q1, q9 -+ sub r5, #1 -+ teq r5, #0 -+ vdup.16 q9, r6 -+ vdup.16 q10, r12 -+ vrshr.u16 q11, q11, #5 -+ vrshr.u16 q12, q12, #5 -+ vst1.16 {q11-q12}, [r0], r3 -+ bhi 2b -+ bne 1b -+ -+ pop {r4-r8, pc} -+ -+@ Right of vertical - works along top - left unused -+26: -+ add r5, r1, #32 -+ vld1.16 {q0-q1}, [r1]! -+ rsb r12, r6, #32 -+ vld1.32 {d16[0]}, [r5] -+ mov r5, #8 -+ vdup.16 q9, r6 -+ vdup.16 q10, r12 -+1: -+ vmov q2, q0 -+ add r1, #4 -+ vmov q3, q1 -+ vext.16 q0, q0, q1, #2 -+ vext.16 q1, q1, q8, #2 -+2: -+ vmul.u16 q11, q0, q9 -+ subs r12, r4 -+ vmla.u16 q11, q2, q10 -+ it cc -+ addcc r12, #32 -+ vmul.u16 q12, q1, q9 -+ rsb r6, r12, #32 -+ vmla.u16 q12, q3, q10 -+ sub r5, #1 -+ vld1.32 {d16[0]}, [r1] -+ teq r5, #0 -+ vdup.16 q9, r6 -+ vdup.16 q10, r12 -+ vrshr.u16 q11, q11, #5 -+ vrshr.u16 q12, q12, #5 -+ vst1.16 {q11-q12}, [r0], r3 -+ bhi 2b -+ bne 1b -+ -+ pop {r4-r8, pc} -+ -+endfunc -+ -+ -+@ ff_hevc_rpi_pred_angular_c_16_neon_10 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride [r3] -+@ unsigned int mode [sp, #0] 2..34 -+ -+function ff_hevc_rpi_pred_angular_c_16_neon_10, export=1 -+ ldr r12, [sp] -+ push {r4-r10, lr} -+ ADRT r4, angle_2 - 2 -+ ADRT r7, inv_angle - 11*2 -+ add r7, r7, r12, lsl #1 -+ lsl r3, #2 -+ vpush {d8} -+ ldrsb r6, [r4, r12] -+ cmp r12, #26 -+ ldrsb r4, [r4, r12] -+ bge 26f -+ cmp r12, #18 -+ bge 18f -+ cmp r12, #10 -+ bge 10f -+ -+@ Down of Horizontal - works down left -+ add sp, #8 -+ mov r10, #4 -+ mov r1, r2 -+1: -+ bl patch_h_down_c_4x4_10 -+ bl patch_h_down_c_4x4_10_continue -+ bl patch_h_down_c_4x4_10_continue -+ bl patch_h_down_c_4x4_10_continue -+ -+ add r2, r1, #4*4 @ restore r2, but 4 rows further down left -+ add r1, r1, #4*4 -+ mov r6, r4 -+ sub r0, #64 -+ subs r10, #1 -+ add r0, r0, r3, lsl #2 -+ bne 1b -+ -+ pop {r4-r10, pc} -+ -+@ Up of Horizontal - works down up -+10: -+ add sp, #8 -+ mov r10, #4 -+ ldrh r7, [r7] -+ mov r8, #-128 -+ sub r8, r7 -+2: -+ push {r2, r8} -+ bl patch_h_up_c_4x4_10 -+ bl patch_h_up_c_4x4_10_continue -+ bl patch_h_up_c_4x4_10_continue -+ bl patch_h_up_c_4x4_10_continue -+ pop {r2, r8} -+ -+ sub r0, #64 -+ mov r6, r4 -+ add r2, #16 -+ sub r8, r8, r7, lsl #2 -+ add r0, r0, r3, lsl #2 -+ subs r10, #1 -+ bne 2b -+ -+ pop {r4-r10, pc} -+ -+@ Left of vertical - works down left -+18: -+ add r5, r1, #32 -+ vld1.16 {q1-q2}, [r1] -+ rsb r12, r6, r6, lsl #16 -+ vld1.16 {q3-q4}, [r5] -+ sub r9, r2, #4 -+ rsb r4, r12, #0 -+ rsb r12, r12, #32 << 16 -+ ldrh r7, [r7] -+ mov r8, #-128 -+ vmov d0, d9 -+ vmov s2, r12 -+ add r10, r0, #32 -+ mov r5, #16 -+1: -+ vld1.32 {d1[1]}, [r9] -+ add r8, r7 -+ vmov q11, q4 -+ vmov q10, q3 -+ asr r9, r8, #8 -+ vmov q9, q2 -+ add r9, r2, r9, lsl #2 -+ vmov q8, q1 -+ vext.16 q4, q3, q4, #6 -+ vext.16 q3, q2, q3, #6 -+ vext.16 q2, q1, q2, #6 -+ vext.16 q1, q0, q1, #6 -+2: -+ vmul.u16 q12, q8, d1[1] -+ adds r12, r4 -+ vmla.u16 q12, q1, d1[0] -+ it cc -+ addcc r12, #32 << 16 -+ vmul.u16 q13, q9, d1[1] -+ it cc -+ subcc r12, #32 -+ vmla.u16 q13, q2, d1[0] -+ sub r5, #1 -+ vmul.u16 q14, q10, d1[1] -+ teq r5, #0 -+ vmla.u16 q14, q3, d1[0] -+ vmul.u16 q15, q11, d1[1] -+ vmla.u16 q15, q4, d1[0] -+ vmov s2, r12 -+ vrshr.u16 q12, q12, #5 -+ vrshr.u16 q13, q13, #5 -+ vrshr.u16 q14, q14, #5 -+ vrshr.u16 q15, q15, #5 -+ vst1.16 {q12-q13}, [r0], r3 -+ vst1.16 {q14-q15}, [r10], r3 -+ bhi 2b -+ bne 1b -+ -+ vpop {d8} -+ vmov d9, d0 -+ pop {r4-r10, pc} -+ -+@ Right of vertical - works along top - left unused -+26: -+ add r5, r1, #32 -+ vld1.16 {q1-q2}, [r1] -+ rsb r12, r6, r6, lsl #16 -+ vld1.16 {q3-q4}, [r5] -+ add r1, r1, #64 -+ rsb r4, r12, #0 -+ rsb r12, r12, #32 << 16 -+ vmov d1, d9 -+ vmov s1, r12 -+ add r10, r0, #32 -+ mov r5, #16 -+1: -+ vld1.32 {d0[0]}, [r1]! -+ vmov q8, q1 -+ vmov q9, q2 -+ vmov q10, q3 -+ vmov q11, q4 -+ vext.16 q1, q1, q2, #2 -+ vext.16 q2, q2, q3, #2 -+ vext.16 q3, q3, q4, #2 -+ vext.16 q4, q4, q0, #2 -+2: -+ vmul.u16 q12, q1, d0[2] -+ adds r12, r4 -+ vmla.u16 q12, q8, d0[3] -+ it cc -+ addcc r12, #32 << 16 -+ vmul.u16 q13, q2, d0[2] -+ it cc -+ subcc r12, #32 -+ vmla.u16 q13, q9, d0[3] -+ sub r5, #1 -+ vmul.u16 q14, q3, d0[2] -+ teq r5, #0 -+ vmla.u16 q14, q10, d0[3] -+ vmul.u16 q15, q4, d0[2] -+ vmla.u16 q15, q11, d0[3] -+ vmov s1, r12 -+ vrshr.u16 q12, q12, #5 -+ vrshr.u16 q13, q13, #5 -+ vrshr.u16 q14, q14, #5 -+ vrshr.u16 q15, q15, #5 -+ vst1.16 {q12-q13}, [r0], r3 -+ vst1.16 {q14-q15}, [r10], r3 -+ bhi 2b -+ bne 1b -+ -+ vpop {d8} -+ vmov d9, d1 -+ pop {r4-r10, pc} -+ -+endfunc ---- /dev/null -+++ b/libavcodec/arm/rpi_hevcpred_intra_dc_neon.S -@@ -0,0 +1,705 @@ -+/* -+Copyright (c) 2018 Raspberry Pi (Trading) Ltd. -+All rights reserved. -+ -+Redistribution and use in source and binary forms, with or without -+modification, are permitted provided that the following conditions are met: -+ * Redistributions of source code must retain the above copyright -+ notice, this list of conditions and the following disclaimer. -+ * Redistributions in binary form must reproduce the above copyright -+ notice, this list of conditions and the following disclaimer in the -+ documentation and/or other materials provided with the distribution. -+ * Neither the name of the copyright holder nor the -+ names of its contributors may be used to endorse or promote products -+ derived from this software without specific prior written permission. -+ -+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ -+Authors: John Cox, Ben Avison -+*/ -+ -+ -+#include "libavutil/arm/asm.S" -+#include "neon.S" -+ -+ -+@ ff_hevc_rpi_pred_dc_4_neon_8 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride) [r3] -+ -+function ff_hevc_rpi_pred_dc_4_neon_8, export=1 -+ -+ @ Average the els of top & left -+ ldr r2, [r2] -+ vld1.32 {d0[0]}, [r1] -+ mov r1, #2 -+ vmov s1, r2 -+ vmov s2, r2 -+ vmov.i16 q2, #3 -+ add r2, r0, r3 -+ vaddl.u8 q1, d0, d1 @ d2[0] = top[0] + left[0] -+ lsl r3, #1 -+ vmovl.u8 q0, d0 -+ vmov.i64 d7, #0xffff -+ vmov.16 d4[0], r1 @ 2, 3, 3, 3... -+ vpadd.i16 d6, d2, d2 @ 2 (top & bottom of vector the same) -+ vbit d0, d2, d7 @ q0 = top[0]+left[0], top[1..3], left[0..3] -+ -+ @ top line gets some smoothing -+ @ (top[i] + 3*dc + 2) >> 2 -+ @ as does left -+ @ top_line[0] is extra special -+ @ (top[0] + left[0] + 2*dc + 2) >> 2 -+ -+ vmov.i64 d7, #0xff -+ vpadd.i16 d6, d6 @ 1 (all the same) -+ vrshr.u16 d6, #3 -+ vmla.i16 q0, q2, d6[0] -+ vdup.8 d6, d6[0] -+ vrshrn.i16 d0, q0, #2 -+ -+ @ Store top line -+ vst1.32 {d0[0]}, [r0], r3 -+ -+ @ Store the rest -+ vshr.u64 d1, d0, #5*8 -+ vshr.u64 d2, d0, #6*8 -+ vshr.u64 d3, d0, #7*8 -+ vbif d1, d6, d7 -+ vbif d2, d6, d7 -+ vst1.32 {d1[0]}, [r2], r3 -+ vbif d3, d6, d7 -+ vst1.32 {d2[0]}, [r0] -+ vst1.32 {d3[0]}, [r2] -+ -+ bx lr -+endfunc -+ -+ -+@ ff_hevc_rpi_pred_dc_c_4_neon_8 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride) [r3] -+ -+function ff_hevc_rpi_pred_dc_c_4_neon_8, export=1 -+ -+ @ Average the els of top & left -+ vld1.8 {d0}, [r1] -+ vld1.8 {d1}, [r2] -+A add r2, r0, r3, lsl #1 -+A lsl r3, #2 -+T lsl r3, #1 -+T add r2, r0, r3 -+T lsl r3, #1 -+ vaddl.u8 q0, d0, d1 -+ vadd.i16 d0, d1 @ d0 has 2 val pairs -+ vpadd.i32 d2, d0, d0 @ This adds U & V separately -+ vpadd.i32 d3, d0, d0 -+ vrshrn.u16 d0, q1, #3 -+ -+ @ Store -+ vst1.8 {d0}, [r0], r3 -+ vst1.8 {d0}, [r2], r3 -+ vst1.8 {d0}, [r0] -+ vst1.8 {d0}, [r2] -+ -+ bx lr -+endfunc -+ -+ -+@ ff_hevc_rpi_pred_dc_8_neon_8 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride) [r3] -+ -+function ff_hevc_rpi_pred_dc_8_neon_8, export=1 -+ -+ @ Average the els of top & left -+ vld1.8 {d0}, [r1] -+ mov r1, #2 -+ vld1.8 {d16}, [r2] -+ vmov.i16 q2, #3 -+ vmov.i64 d7, #0xffff -+ vaddl.u8 q1, d0, d16 @ d2[0] = top[0] + left[0] -+ vmovl.u8 q0, d0 -+ vadd.i16 d6, d2, d3 @ d6 has 4 vals -+ vmov.16 d4[0], r1 @ 2, 3, 3, 3... -+ vbit d0, d2, d7 @ q0 = top[0]+left[0], top[1..7] -+ -+ @ top line gets some smoothing -+ @ (top[i] + 3*dc + 2) >> 2 -+ @ as does left -+ @ top_line[0] is extra special -+ @ (top[0] + left[0] + 2*dc + 2) >> 2 -+ -+ vmov.i64 d7, #0xff -+ vmovl.u8 q1, d16 -+ vpadd.i16 d6, d6 @ 2 (top & bottom of vector the same) -+ vpadd.i16 d6, d6 @ 1 (all the same) -+ vrshr.u16 d6, #4 -+ vmla.i16 q1, q2, d6[0] -+ vmla.i16 q0, q2, d6[0] -+ vdup.8 d6, d6[0] -+ vrshrn.i16 d2, q1, #2 -+ vrshrn.i16 d0, q0, #2 -+ -+ @ Store top line -+ vst1.8 {d0}, [r0], r3 -+ -+ @ Store the rest -+ vshr.u64 d2, #8 -+ vbit d6, d2, d7 -+ vshr.u64 d2, #8 -+ vst1.8 {d6}, [r0], r3 -+ mov r1, #6 -+1: -+ vbit d6, d2, d7 -+ vshr.u64 d2, #8 -+ vst1.8 {d6}, [r0], r3 -+ subs r1, #2 -+ vbit d6, d2, d7 -+ vshr.u64 d2, #8 -+ vst1.8 {d6}, [r0], r3 -+ bne 1b -+ -+ bx lr -+endfunc -+ -+ -+@ ff_hevc_rpi_pred_dc_c_8_neon_8 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride) [r3] -+ -+function ff_hevc_rpi_pred_dc_c_8_neon_8, export=1 -+ -+ @ Average the els of top & left -+ vld1.8 {q0}, [r1] -+ mov r1, #8 -+ vld1.8 {q1}, [r2] -+T lsl r3, #1 -+ vaddl.u8 q0, d0, d1 -+A add r2, r0, r3, lsl #1 -+A lsl r3, #2 -+T add r2, r0, r3 -+T lsl r3, #1 -+ vaddl.u8 q1, d2, d3 -+ vadd.i16 q1, q0 -+ vadd.i16 d3, d2 @ d3 has 2 val pairs -+ vpadd.i32 d2, d3, d3 @ This add U & V separately -+ vpadd.i32 d3, d3, d3 -+ vrshrn.u16 d0, q1, #4 -+ vrshrn.u16 d1, q1, #4 -+ -+ @ Store -+1: -+ vst1.8 {q0}, [r0], r3 -+ subs r1, #4 -+ vst1.8 {q0}, [r2], r3 -+ vst1.8 {q0}, [r0], r3 -+ vst1.8 {q0}, [r2], r3 -+ bne 1b -+ -+ bx lr -+endfunc -+ -+ -+@ ff_hevc_rpi_pred_dc_16_neon_8 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride) [r3] -+ -+function ff_hevc_rpi_pred_dc_16_neon_8, export=1 -+ -+ @ Average the els of top & left -+ vld1.8 {q8}, [r1] -+ mov r1, #2 -+ vld1.8 {q9}, [r2] -+ vaddl.u8 q10, d16, d17 -+ vaddl.u8 q11, d16, d18 -+ vaddl.u8 q0, d18, d19 -+ vmov.i16 q1, #3 -+ vadd.i16 q10, q0 -+ vmovl.u8 q0, d18 -+ vadd.i16 d20, d21 -+ vmov.i16 d2[0], r1 @ 2, 3, 3, 3... -+ -+ @ top line gets some smoothing -+ @ (top[i] + 3*dc + 2) >> 2 -+ @ as does left -+ @ top_line[0] is extra special -+ @ (top[0] + left[0] + 2*dc + 2) >> 2 -+ -+ vmovl.u8 q2, d16 -+ vmovl.u8 q9, d19 -+ vpadd.i16 d20, d20 @ 2 (top & bottom of vector the same) -+ vmov.i64 d7, #0xffff -+ vmovl.u8 q8, d17 -+ vbit d4, d22, d7 @ q2 = top[0]+left[0], top[1..7] -+ vmov.i64 d7, #0xff -+ vpadd.i16 d20, d20 @ 1 (all the same) -+ vrshr.u16 d21, d20, #5 -+ vrshr.u16 d20, d20, #5 -+ vmla.i16 q0, q10, d2[1] -+ vmla.i16 q9, q10, d2[1] -+ vmla.i16 q2, q10, q1 -+ vmla.i16 q8, q10, d2[1] -+ vdup.8 q1, d20[0] -+ vrshrn.i16 d0, q0, #2 -+ vrshrn.i16 d1, q9, #2 -+ vrshrn.i16 d4, q2, #2 -+ vrshrn.i16 d5, q8, #2 -+ vext.8 q0, q0, q0, #1 -+ -+ @ Store top line -+ vst1.8 {q2}, [r0], r3 -+ -+ @ Store the rest -+ mov r1, #15 -+1: -+ vbit d2, d0, d7 -+ vext.8 q0, q0, q0, #1 -+ subs r1, #1 -+ vst1.8 {q1}, [r0], r3 -+ bne 1b -+ -+ bx lr -+endfunc -+ -+ -+@ ff_hevc_rpi_pred_dc_c_16_neon_8 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride) [r3] -+ -+function ff_hevc_rpi_pred_dc_c_16_neon_8, export=1 -+ -+ @ Average the els of top & left -+ vld1.8 {q0-q1}, [r1] -+ mov r1, #16 -+ vld1.8 {q2-q3}, [r2] -+T lsl r3, #1 -+ vaddl.u8 q0, d0, d1 -+A add r2, r0, r3, lsl #1 -+T add r2, r0, r3 -+ vaddl.u8 q1, d2, d3 -+A lsl r3, #2 -+T lsl r3, #1 -+ vaddl.u8 q2, d4, d5 -+ vaddl.u8 q3, d6, d7 -+ vadd.i16 q0, q1 -+ vadd.i16 q2, q3 -+ vadd.i16 q0, q2 -+ vadd.i16 d0, d1 @ d0 has 2 val pairs -+ vpadd.i32 d4, d0, d0 @ This adds U & V separately -+ vpadd.i32 d5, d0, d0 -+ vrshrn.u16 d0, q2, #5 -+ vrshrn.u16 d1, q2, #5 -+ vrshrn.u16 d2, q2, #5 -+ vrshrn.u16 d3, q2, #5 -+ -+ @ Store -+1: -+ vst1.8 {q0-q1}, [r0], r3 -+ subs r1, #2 -+ vst1.8 {q0-q1}, [r2], r3 -+ bne 1b -+ -+ bx lr -+endfunc -+ -+ -+@ ff_hevc_rpi_pred_dc_32_neon_8 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride) [r3] -+ -+function ff_hevc_rpi_pred_dc_32_neon_8, export=1 -+ -+ @ Average the els of top & left -+ vld1.8 {q0-q1}, [r1] -+ mov r1, #32 -+ vld1.8 {q2-q3}, [r2] -+ add r2, r0, r3 -+ vaddl.u8 q0, d0, d1 -+ lsl r3, #1 -+ vaddl.u8 q1, d2, d3 -+ vaddl.u8 q2, d4, d5 -+ vaddl.u8 q3, d6, d7 -+ vadd.i16 q0, q1 -+ vadd.i16 q2, q3 -+ vadd.i16 q0, q2 -+ vadd.i16 d0, d1 @ d0 has 4 vals -+ vpadd.i16 d0, d0 @ 2 (top & bottom the same) -+ vpadd.i16 d4, d0, d0 @ 1 (all the same) -+ vpadd.i16 d5, d0, d0 -+ vrshrn.u16 d0, q2, #6 -+ vrshrn.u16 d1, q2, #6 -+ vrshrn.u16 d2, q2, #6 -+ vrshrn.u16 d3, q2, #6 -+ -+ @ Store -+1: -+ vst1.8 {q0-q1}, [r0], r3 -+ subs r1, #2 -+ vst1.8 {q0-q1}, [r2], r3 -+ bne 1b -+ -+ bx lr -+endfunc -+ -+ -+@ ----------------------------------------------------------------------------- -+@ -+@ 10 Bit versions -+@ -+@ There is no actual bit depth dependency in this code except that our -+@ intermediate results will overflow the 16 bits they are stored in -+@ All there functions are good to 10 bits - with the worst case being -+@ in dc_32 where we use all 16 bits. -+ -+ -+@ ff_hevc_rpi_pred_dc_4_neon_10 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride) [r3] -+ -+function ff_hevc_rpi_pred_dc_4_neon_10, export=1 -+ -+ @ Average the els of top & left -+ vld1.16 {d0}, [r1] -+ mov r1, #2 -+ vld1.16 {d1}, [r2] -+T lsl r3, #1 -+ vmov.i16 q2, #3 -+A add r2, r0, r3, lsl #1 -+T add r2, r0, r3 -+ vadd.u16 d2, d0, d1 @ d2[0] = top[0] + left[0] -+A lsl r3, #2 -+T lsl r3, #1 -+ vmov.16 d4[0], r1 @ 2, 3, 3, 3... -+ vmov.i64 d7, #0xffff -+ vbit d0, d2, d7 @ q0 = top[0]+left[0], top[1..3], left[0..3] -+ -+ @ top line gets some smoothing -+ @ (top[i] + 3*dc + 2) >> 2 -+ @ as does left -+ @ top_line[0] is extra special -+ @ (top[0] + left[0] + 2*dc + 2) >> 2 -+ -+ vpadd.i16 d6, d2, d2 @ 2 (top & bottom of vector the same) -+ vpadd.i16 d6, d6 @ 1 (all the same) -+ vrshr.u16 d6, #3 -+ vmla.i16 q0, q2, d6[0] -+ vrshr.u16 q0, #2 -+ -+ @ Store top line -+ vst1.16 {d0}, [r0], r3 -+ -+ @ Store the rest -+ vshr.u64 d3, d1, #1*16 -+ vshr.u64 d4, d1, #2*16 -+ vshr.u64 d5, d1, #3*16 -+ vbif d3, d6, d7 -+ vbif d4, d6, d7 -+ vst1.16 {d3}, [r2], r3 -+ vbif d5, d6, d7 -+ vst1.16 {d4}, [r0] -+ vst1.16 {d5}, [r2] -+ -+ bx lr -+endfunc -+ -+ -+@ ff_hevc_rpi_pred_dc_c_4_neon_10 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride) [r3] (In pels - needs * 4) -+ -+function ff_hevc_rpi_pred_dc_c_4_neon_10, export=1 -+ -+ @ Average the els of top & left -+ vld1.8 {q0}, [r1] -+ vld1.8 {q1}, [r2] -+A add r2, r0, r3, lsl #2 -+A lsl r3, #3 -+T lsl r3, #2 -+T add r2, r0, r3 -+T lsl r3, #1 -+ vadd.i16 q0, q1 -+ vadd.i16 d0, d1 @ d0 has 2 val pairs -+ vpadd.i32 d2, d0, d0 @ This adds U & V separately -+ vpadd.i32 d3, d0, d0 -+ vrshr.u16 q0, q1, #3 -+ -+ vst1.16 {q0}, [r0], r3 -+ vst1.16 {q0}, [r2], r3 -+ vst1.16 {q0}, [r0] -+ vst1.16 {q0}, [r2] -+ -+ bx lr -+endfunc -+ -+ -+@ ff_hevc_rpi_pred_dc_8_neon_10 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride) [r3] -+ -+function ff_hevc_rpi_pred_dc_8_neon_10, export=1 -+ -+ @ Average the els of top & left -+ vld1.16 {q0}, [r1] -+ mov r1, #2 -+ vld1.16 {q8}, [r2] -+T lsl r3, #1 -+ vmov.i16 q2, #3 -+A add r2, r0, r3, lsl #1 -+T add r2, r0, r3 -+ vadd.i16 q1, q0, q8 @ q1[0] = top[0] + left[0] -+A lsl r3, #2 -+T lsl r3, #1 -+ vmov.i64 d7, #0xffff -+ vmov.16 d4[0], r1 @ 2, 3, 3, 3... -+ vadd.i16 d6, d2, d3 @ d6 has 4 vals -+ vbit d0, d2, d7 @ q0 = top[0]+left[0], top[1..7] -+ -+ @ top line gets some smoothing -+ @ (top[i] + 3*dc + 2) >> 2 -+ @ as does left -+ @ top_line[0] is extra special -+ @ (top[0] + left[0] + 2*dc + 2) >> 2 -+ -+ vpadd.i16 d6, d6 @ 2 (top & bottom of vector the same) -+ vpadd.i16 d6, d6 @ 1 (all the same) -+ vrshr.u16 d6, #4 -+ vmla.i16 q8, q2, d6[0] -+ vmla.i16 q0, q2, d6[0] -+ vdup.16 q2, d6[0] -+ vdup.16 q9, d6[0] -+ vrshr.u16 q8, q8, #2 -+ vrshr.u16 q0, q0, #2 -+ vext.16 q1, q8, q8, #1 -+ -+ @ Store top line -+ vst1.16 {q0}, [r0], r3 -+ -+ @ Store the rest -+ vbit d18, d2, d7 -+ vst1.16 {q9}, [r2], r3 -+ mov r1, #6 -+1: -+ vext.16 q8, q8, q8, #2 -+ subs r1, #2 -+ vext.16 q1, q1, q1, #2 -+ vbit d4, d16, d7 -+ vst1.16 {q2}, [r0], r3 -+ vbit d18, d2, d7 -+ vst1.16 {q9}, [r2], r3 -+ bne 1b -+ -+ bx lr -+endfunc -+ -+ -+@ ff_hevc_rpi_pred_dc_c_8_neon_10 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride) [r3] (In pels - needs * 4) -+ -+function ff_hevc_rpi_pred_dc_c_8_neon_10, export=1 -+ -+ @ Average the els of top & left -+ vld1.16 {q0-q1}, [r1] -+ mov r1, #8 -+ vld1.16 {q2-q3}, [r2] -+T lsl r3, #2 -+ vadd.i16 q1, q0 -+A add r2, r0, r3, lsl #2 -+A lsl r3, #3 -+T add r2, r0, r3 -+T lsl r3, #1 -+ vadd.i16 q2, q3 -+ vadd.i16 q1, q2 -+ vadd.i16 d3, d2 @ d3 has 2 val pairs -+ vpadd.i32 d2, d3, d3 @ This add U & V separately -+ vpadd.i32 d3, d3, d3 -+ vrshr.u16 q0, q1, #4 -+ vrshr.u16 q1, q1, #4 -+ -+ @ Store -+1: -+ vst1.8 {q0-q1}, [r0], r3 -+ subs r1, #2 -+ vst1.8 {q0-q1}, [r2], r3 -+ bne 1b -+ -+ bx lr -+endfunc -+ -+ -+@ ff_hevc_rpi_pred_dc_16_neon_10 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride) [r3] -+ -+function ff_hevc_rpi_pred_dc_16_neon_10, export=1 -+ -+ @ Average the els of top & left -+ vld1.16 {q8-q9}, [r1] -+ mov r1, #2 -+ vld1.16 {q10-q11}, [r2] -+ lsl r3, #1 @ stride given in pels -+ vadd.i16 q0, q8, q9 -+ vadd.i16 q1, q10, q11 -+ vmov.i16 q3, #3 -+ vadd.i16 q1, q0 -+ vadd.i16 d0, d16, d20 -+ vmov.i64 d31, #0xffff -+ vadd.i16 d3, d2 -+ vmov.16 d6[0], r1 @ 2, 3, 3, 3... -+ -+ @ top line gets some smoothing -+ @ (top[i] + 3*dc + 2) >> 2 -+ @ as does left -+ @ topline[0] is extra special -+ @ (top[0] + left[0] + 2*dc + 2) >> 2 -+ -+ vbit d16, d0, d31 @ q8 = top[0]+left[0], top[1..7] -+ vpadd.i16 d3, d3 @ 2 (top & bottom of vector the same) -+ vpadd.i16 d3, d3 @ 1 (all the same) -+ vrshr.u16 d2, d3, #5 -+ vrshr.u16 d3, d3, #5 -+ vmov q0, q1 -+ vmla.i16 q10, q1, d6[1] -+ vmla.i16 q11, q1, d6[1] -+ vmla.i16 q8, q1, q3 -+ vmla.i16 q9, q1, d6[1] -+ vrshr.u16 q2, q10, #2 -+ vrshr.u16 q3, q11, #2 -+ vrshr.u16 q8, #2 -+ vrshr.u16 q9, #2 -+ vext.16 q2, q2, q2, #1 -+ mov r1, #7<<29 -+ -+ @ Store top line -+ vst1.16 {q8-q9}, [r0], r3 -+ -+ @ Store the rest -+1: -+ vbit d0, d4, d31 -+ vext.16 q2, q2, q2, #1 -+ subs r1, #1<<29 -+ vst1.16 {q0-q1}, [r0], r3 -+ bne 1b -+1: -+ vbit d0, d6, d31 -+ vext.16 q3, q3, q3, #1 -+ subs r1, #1<<29 -+ vst1.16 {q0-q1}, [r0], r3 -+ bne 1b -+ -+ bx lr -+endfunc -+ -+ -+@ ff_hevc_rpi_pred_dc_c_16_neon_10 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride) [r3] (In pels - needs * 4) -+ -+function ff_hevc_rpi_pred_dc_c_16_neon_10, export=1 -+ -+ @ Average the els of top & left -+ vldm r1, {q0-q3} -+ vldm r2, {q8-q11} -+ vadd.i16 q0, q1 -+ mov r1, #16 -+ vadd.i16 q2, q3 -+ add r2, r0, #32 -+ vadd.i16 q8, q9 -+ lsl r3, #2 -+ vadd.i16 q10, q11 -+ vadd.u16 q0, q2 -+ vadd.u16 q8, q10 -+ vadd.i16 q0, q8 -+ vadd.i16 d0, d1 @ d0 has 2 val pairs -+ vpadd.i32 d4, d0, d0 @ This adds U & V separately -+ vpadd.i32 d5, d0, d0 -+ vrshr.u16 q0, q2, #5 -+ vrshr.u16 q1, q2, #5 -+ -+ @ Store -+1: -+ vst1.16 {q0-q1}, [r0], r3 -+ subs r1, #1 -+ vst1.16 {q0-q1}, [r2], r3 -+ bne 1b -+ -+ bx lr -+endfunc -+ -+ -+@ ff_hevc_rpi_pred_dc_32_neon_10 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride) [r3] (In pels) -+ -+function ff_hevc_rpi_pred_dc_32_neon_10, export=1 -+ -+ @ Average the els of top & left -+ @ With 10 bits we are (just) safe from overflow in i16 -+ vldm r1, {q0-q3} -+ vldm r2, {q8-q11} -+ vadd.i16 q0, q1 -+ mov r1, #32 -+ vadd.i16 q2, q3 -+ add r2, r0, #32 -+ vadd.i16 q8, q9 -+ lsl r3, #1 -+ vadd.i16 q10, q11 -+ vadd.u16 q0, q2 -+ vadd.u16 q8, q10 -+ vadd.i16 q0, q8 -+ vadd.i16 d0, d1 @ d0 has 4 vals -+ vpadd.i16 d0, d0 @ 2 (top & bottom the same) -+ vpadd.i16 d4, d0, d0 @ 1 (all the same) -+ vpadd.i16 d5, d0, d0 -+ vrshr.u16 q0, q2, #6 -+ vrshr.u16 q1, q2, #6 -+ -+ @ Store -+1: -+ vst1.16 {q0-q1}, [r0], r3 -+ subs r1, #1 -+ vst1.16 {q0-q1}, [r2], r3 -+ bne 1b -+ -+ bx lr -+endfunc -+ -+ ---- /dev/null -+++ b/libavcodec/arm/rpi_hevcpred_intra_filter_neon.S -@@ -0,0 +1,881 @@ -+/* -+Copyright (c) 2018 Raspberry Pi (Trading) Ltd. -+All rights reserved. -+ -+Redistribution and use in source and binary forms, with or without -+modification, are permitted provided that the following conditions are met: -+ * Redistributions of source code must retain the above copyright -+ notice, this list of conditions and the following disclaimer. -+ * Redistributions in binary form must reproduce the above copyright -+ notice, this list of conditions and the following disclaimer in the -+ documentation and/or other materials provided with the distribution. -+ * Neither the name of the copyright holder nor the -+ names of its contributors may be used to endorse or promote products -+ derived from this software without specific prior written permission. -+ -+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ -+Authors: John Cox, Ben Avison -+*/ -+ -+#include "libavutil/arm/asm.S" -+#include "neon.S" -+ -+@ All functions have the call -+@ -+@ int ff_hevc_rpi_intra_filter_N_neon_PW( -+@ pixel * const left, [r0] -+@ pixel * const top, [r1] -+@ const unsigned int req, [r2] -+@ const unsigned int avail, [r3] -+@ const pixel * const src_l, [sp, #0] -+@ const pixel * const src_u, [sp, #4] -+@ const pixel * const src_ur, [sp, #8] -+@ const unsigned int stride, [sp, #12] (pels) -+@ const unsigned int top_right_size, [sp, #16] -+@ const unsigned int down_left_size) [sp, #20] -+@ -+@ Assumptions: -+@ (that wouldn't apply to all frame layoouts but do apply to sand, so beware -+@ if reuseing this code) -+@ -+@ Min ctb size is 8 so we don't need to worry about tr_size or dl_size for -+@ N==4, but do for chroma N>=8. As we share Y/C fns that means we can ignore -+@ N==8,PW=8 (chroma always PW>8) but have to cope for larger -+@ -+@ We always have at least 64 pixel H frame width rounding - this lets us -+@ load UR widthout having to worry about exactly how many pixels are actually -+@ within the frame. As partial loads will only occur very occasionally this -+@ should be a win in nearly all cases. -+@ -+@ 16 bit fns can be used as 8 bit chroma fns as chroma never filters -+@ so we do no maths on the contents -+@ -+@ No filtering in 32bit fns as they are chroma only -+ -+ -+.equ AVAIL_UR, 1 -+.equ AVAIL_U, 2 -+.equ AVAIL_UL, 4 -+.equ AVAIL_L, 8 -+.equ AVAIL_DL, 16 -+ -+.equ FILTER_LIGHT, 0x40 -+.equ FILTER_STRONG, 0x80 -+ -+.equ AVAIL_S_UR_N_U_C, 32 - 1 -+.equ AVAIL_S_U_N_UL_C, 32 - 2 -+.equ AVAIL_S_UL_N_L_C, 32 - 3 -+.equ AVAIL_S_L_N_DL_C, 32 - 4 -+ -+.equ AVAIL_S_U_DL_CPSR, 31 - 4 @ Shift for u..dl to go into flags via cpsr -+ -+@ On entry -+@ r2 req -+@ r3 avail -+@ [sp, #sp_offset...] args -+@ -+@ On Exit: -+@ -+@ Extend values: -+@ d_l scalar contains value for L & DL -+@ if DL avail then this is is DL[0] so we don't need to load that -+@ d_ul scalar containing value for UL -+@ d_u scalar containing value for U -+@ d_ur scalar containing value for UR -+@ If DL avail then d_l == b_dl elif L avail then d_l == a_l else... -+@ This means that L-light-filter works even if nreq DL (we never filter -+@ req-DL without req-L, but we do filter req-L without req-DL) -+@ If UR avail then d_ur == a_ur so U-filter good too -+@ -+@ Data load pointers (only load if req & avail): -+@ r4 DL + stride -+@ r10 L -+@ r6 U -+@ r5 UR -+@ -+@ Others: -+@ r2 req -+@ r7 req & avail -+@ r3 L + stride -+@ r8 DL + stride * 2 -+@ r9 stride * 2 -+@ cs Load U -+@ mi Load UR -+@ -+@ Clobbered: -+@ r12 -+ -+.macro load_pointers pw_s, log2_s, sp_offset, d_type, d_l, d_ul, d_u, d_ur -+ -+.equ src_l\@, \sp_offset + 0 -+.equ src_u\@, \sp_offset + 4 -+.equ src_ur\@, \sp_offset + 8 -+.equ stride\@, \sp_offset + 12 -+.equ pw\@, (1 << \pw_s) @ pel width in bytes -+.equ b_size\@, (1 << (\pw_s + \log2_s)) @ size in bytes -+ -+@ r9 stride -+@ r7 = ab_ul, r6 = a_u, r5 = a_ur -+@ r4 = b_dl, r10 = b_l, r8 = b_u -+ -+ ldr r5, [sp, #src_ur\@] -+ lsl r12, r3, #AVAIL_S_U_DL_CPSR -+ ldr r10, [sp, #src_l\@] -+ ldr r9, [sp, #stride\@] -+ ldr r6, [sp, #src_u\@] -+ -+ @ This is quite a slow instruction but it replaces -+ @ a decent number of tests that yield a max of 2 flags/op -+ @ It is annoying we can't branch on Q! -+ @ If L navail (ne) then DL must be navail (pl) -+ msr APSR_nzcvq, r12 @ n=dl, z=l, c=ul, v=u, q=ur -+ -+ mov r4, r5 -+ sub r7, r10, r9 -+ it vs -+ movvs r4, r6 -+ add r8, r6, #b_size\@ - pw\@ -+ it cs -+ movcs r4, r7 -+ ite ne -+ movne r10, r4 -+ addeq r4, r7, r9, lsl #\log2_s -+ it cc -+ movcc r7, r10 -+ it mi -+ addmi r4, r10, r9, lsl #\log2_s -+ vld1.\d_type {\d_ul}, [r7] -+ itt vc -+ movvc r8, r7 -+ movvc r6, r7 -+ vld1.\d_type {\d_l }, [r4], r9 -+ tst r3, #AVAIL_UR -+ vld1.\d_type {\d_u }, [r6] -+ it eq -+ moveq r5, r8 -+ and r7, r2, r3 -+ add r8, r4, r9 -+ vld1.\d_type {\d_ur}, [r5] -+ lsls r12, r7, #AVAIL_S_UR_N_U_C -+ add r3, r10, r9 -+ lsl r9, #1 -+.endm -+ -+ -+ -+@ int ff_hevc_rpi_intra_filter_4_neon_8( -+@ pixel * const left, [r0] -+@ pixel * const top, [r1] -+@ const unsigned int req, [r2] -+@ const unsigned int avail, [r3] -+@ const pixel * const src_l, [sp, #0] -+@ const pixel * const src_u, [sp, #4] -+@ const pixel * const src_ur, [sp, #8] -+@ const unsigned int stride, [sp, #12] (pels) -+@ const unsigned int top_right_size, [sp, #16] -+@ const unsigned int down_left_size) [sp, #20] -+ -+.set sp_base, 8*4 -+.set pw_s, 0 -+.set pw, (1 << pw_s) -+.set log2_s, 2 -+ -+function ff_hevc_rpi_intra_filter_4_neon_8, export=1 -+ push {r4-r10, lr} -+ load_pointers pw_s, log2_s, sp_base, 8, d0[], d31[7], d1[], d2[] -+ -+ it cs -+ vldrcs s2, [r6] -+ ite pl -+ vmovpl s3, s4 -+ vldrmi s3, [r5] -+ -+ lsls r7, #AVAIL_S_L_N_DL_C -+ add r12, r0, #-pw -+ bpl 1f -+ -+ vld1.8 {d0[0]}, [r10], r9 -+ vld1.8 {d0[1]}, [r3], r9 -+ vld1.8 {d0[2]}, [r10] -+ vld1.8 {d0[3]}, [r3] -+1: -+ bcc 1f -+ vld1.8 {d0[5]}, [r4], r9 -+ vld1.8 {d0[6]}, [r8] -+ vld1.8 {d0[7]}, [r4] -+1: -+ vstr d1, [r1] @ Up -+ vst1.8 {d31[7]}, [r12] -+ vstr d0, [r0] @ Left -+ pop {r4-r10, pc} -+endfunc -+ -+ -+@ int ff_hevc_rpi_intra_filter_4_neon_16( -+@ pixel * const left, [r0] -+@ pixel * const top, [r1] -+@ const unsigned int req, [r2] -+@ const unsigned int avail, [r3] -+@ const pixel * const src_l, [sp, #0] -+@ const pixel * const src_u, [sp, #4] -+@ const pixel * const src_ur, [sp, #8] -+@ const unsigned int stride, [sp, #12] (pels) -+@ const unsigned int top_right_size, [sp, #16] -+@ const unsigned int down_left_size) [sp, #20] -+ -+.set sp_base, 8*4 -+.set pw_s, 1 -+.set pw, (1 << pw_s) -+.set log2_s, 2 -+ -+function ff_hevc_rpi_intra_filter_4_neon_16, export=1 -+ push {r4-r10, lr} -+ load_pointers pw_s, log2_s, sp_base, 16, "d0[],d1[]", d31[3], d2[], d3[] -+ -+ it cs -+ vldrcs d2, [r6] -+ it mi -+ vldrmi d3, [r5] -+ lsls r7, #AVAIL_S_L_N_DL_C -+ add r12, r0, #-pw -+ bpl 1f -+ vld1.16 {d0[0]}, [r10], r9 -+ vld1.16 {d0[1]}, [r3], r9 -+ vld1.16 {d0[2]}, [r10] -+ vld1.16 {d0[3]}, [r3] -+1: -+ bcc 1f -+ vld1.16 {d1[1]}, [r4], r9 -+ vld1.16 {d1[2]}, [r8] -+ vld1.16 {d1[3]}, [r4] -+1: -+ vst1.16 {q1}, [r1] @ Up -+ vst1.16 {d31[3]}, [r12] -+ vst1.16 {q0}, [r0] @ Left -+ pop {r4-r10, pc} -+endfunc -+ -+ -+@ int ff_hevc_rpi_intra_filter_8_neon_8( -+@ pixel * const left, [r0] -+@ pixel * const top, [r1] -+@ const unsigned int req, [r2] -+@ const unsigned int avail, [r3] -+@ const pixel * const src_l, [sp, #0] -+@ const pixel * const src_u, [sp, #4] -+@ const pixel * const src_ur, [sp, #8] -+@ const unsigned int stride, [sp, #12] (pels) -+@ const unsigned int top_right_size, [sp, #16] -+@ const unsigned int down_left_size) [sp, #20] -+ -+.set sp_base, 8*4 -+.set pw_s, 0 -+.set pw, (1 << pw_s) -+.set log2_s, 3 -+ -+function ff_hevc_rpi_intra_filter_8_neon_8, export=1 -+ push {r4-r10, lr} -+ load_pointers pw_s, log2_s, sp_base, 8, "d0[],d1[]", d31[7], d4[], d5[] -+ -+ it cs -+ vldrcs d4, [r6] -+ it mi -+ vldrmi d5, [r5] -+ -+ lsls r7, #AVAIL_S_L_N_DL_C -+ bpl 1f -+ vld1.8 {d0[0]}, [r10], r9 -+ vld1.8 {d0[1]}, [r3], r9 -+ vld1.8 {d0[2]}, [r10], r9 -+ vld1.8 {d0[3]}, [r3], r9 -+ vld1.8 {d0[4]}, [r10], r9 -+ vld1.8 {d0[5]}, [r3], r9 -+ vld1.8 {d0[6]}, [r10] -+ vld1.8 {d0[7]}, [r3] -+1: -+ bcc 1f -+ vld1.8 {d1[1]}, [r4], r9 -+ vld1.8 {d1[2]}, [r8], r9 -+ vld1.8 {d1[3]}, [r4], r9 -+ vld1.8 {d1[4]}, [r8], r9 -+ vld1.8 {d1[5]}, [r4], r9 -+ vld1.8 {d1[6]}, [r8] -+ vld1.8 {d1[7]}, [r4] -+1: -+ tst r2, #FILTER_LIGHT -+ add r12, r0, #-pw -+ beq 10f -+ -+ @ Luma light filter -+ vext.8 q8, q15, q2, #15 -+ vext.8 q12, q15, q0, #15 -+ vaddl.u8 q9, d17, d5 -+ vaddl.u8 q8, d16, d4 -+ vaddl.u8 q13, d25, d1 -+ vaddl.u8 q12, d24, d0 -+ vmov.u8 r3, d5[7] @ Save final pel -+ vmov.u8 r2, d1[7] @ Save final pel -+ -+ vext.16 q2, q8, q9, #1 -+ vext.16 q3, q9, q9, #1 -+ vext.16 q0, q12, q13, #1 -+ vext.16 q1, q13, q13, #1 -+ vadd.u16 d30, d16, d24 @ d30[0] = l[0] + 2ul + u[0] -+ vadd.u16 q2, q8 -+ vadd.u16 q3, q9 -+ vadd.u16 q0, q12 -+ vadd.u16 q1, q13 -+ -+ vrshrn.u16 d4, q2, #2 -+ vrshrn.u16 d5, q3, #2 -+ vrshrn.u16 d0, q0, #2 -+ vrshrn.u16 d1, q1, #2 -+ vrshr.u16 d30, #2 -+ vmov.u8 d5[7], r3 @ Restore final pel -+ vmov.u8 d1[7], r2 @ Restore final pel -+ vdup.u8 d31, d30[0] @ d31[3] = d30[0] -+ -+10: -+ vst1.8 {q2 }, [r1] @ Up -+ vst1.8 {d31[7]}, [r12] @ Up-left -+ vst1.8 {q0 }, [r0] @ Left -+ pop {r4-r10, pc} -+endfunc -+ -+ -+@ int ff_hevc_rpi_intra_filter_8_neon_16( -+@ pixel * const left, [r0] -+@ pixel * const top, [r1] -+@ const unsigned int req, [r2] -+@ const unsigned int avail, [r3] -+@ const pixel * const src_l, [sp, #0] -+@ const pixel * const src_u, [sp, #4] -+@ const pixel * const src_ur, [sp, #8] -+@ const unsigned int stride, [sp, #12] (pels) -+@ const unsigned int top_right_size, [sp, #16] -+@ const unsigned int down_left_size) [sp, #20] -+ -+.set sp_base, 8*4 -+.set ur_size, sp_base + 16 -+.set dl_size, sp_base + 20 -+.set pw_s, 1 -+.set pw, (1 << pw_s) -+.set log2_s, 3 -+.set p_size, (1 << log2_s) @ size in pels -+ -+function ff_hevc_rpi_intra_filter_8_neon_16, export=1 -+ push {r4-r10, lr} -+ load_pointers pw_s, log2_s, sp_base, 16, "d0[],d1[]", d31[3], "d4[],d5[]", "d6[],d7[]" -+ -+ it cs -+ vldmcs r6, {d4, d5} -+ ldr r12, [sp, #ur_size] -+ bpl 1f -+ cmp r12, #4 -+ vldm r5, {d6, d7} -+ bgt 1f -+ vdup.16 d7, d6[3] -+1: -+ lsls r12, r7, #AVAIL_S_L_N_DL_C -+ vdup.16 q1, d0[0] -+ bpl 1f -+ vld1.16 {d0[0]}, [r10], r9 -+ vld1.16 {d0[1]}, [r3], r9 -+ vld1.16 {d0[2]}, [r10], r9 -+ vld1.16 {d0[3]}, [r3], r9 -+ vld1.16 {d1[0]}, [r10], r9 -+ vld1.16 {d1[1]}, [r3], r9 -+ vld1.16 {d1[2]}, [r10] -+ vld1.16 {d1[3]}, [r3] -+1: -+ bcc 1f -+ ldr r12, [sp, #dl_size] -+ vld1.16 {d2[1]}, [r4], r9 -+ cmp r12, #p_size -+ vld1.16 {d2[2]}, [r8], r9 -+ vld1.16 {d2[3]}, [r4], r9 -+ blt 2f -+ vld1.16 {d3[0]}, [r8], r9 -+ vld1.16 {d3[1]}, [r4], r9 -+ vld1.16 {d3[2]}, [r8] -+ vld1.16 {d3[3]}, [r4] -+ b 1f -+2: -+ vdup.16 d3, d2[3] -+1: -+ tst r2, #FILTER_LIGHT -+ add r12, r0, #-pw -+ beq 10f -+ -+ @ Luma light filter -+ vext.16 q9, q2, q3, #7 -+ vext.16 q8, q15, q2, #7 -+ vext.16 q13, q0, q1, #7 -+ vext.16 q12, q15, q0, #7 -+ vadd.u16 q9, q3 -+ vadd.u16 q8, q2 -+ vadd.u16 q13, q1 -+ vadd.u16 q12, q0 -+ vmov.u16 r3, d7[3] @ Save final pel -+ vmov.u16 r2, d3[3] @ Save final pel -+ -+ vext.16 q2, q8, q9, #1 -+ vext.16 q3, q9, q9, #1 -+ vext.16 q0, q12, q13, #1 -+ vext.16 q1, q13, q13, #1 -+ vadd.u16 d30, d16, d24 @ d30[0] = l[0] + 2ul + u[0] -+ vadd.u16 q2, q8 -+ vadd.u16 q3, q9 -+ vadd.u16 q0, q12 -+ vadd.u16 q1, q13 -+ -+ vrshr.u16 q2, #2 -+ vrshr.u16 q3, #2 -+ vrshr.u16 q0, #2 -+ vrshr.u16 q1, #2 -+ vrshr.u16 d30, #2 -+ vmov.u16 d7[3], r3 @ Restore final pel -+ vmov.u16 d3[3], r2 @ Restore final pel -+ vdup.u16 d31, d30[0] @ d31[3] = d30[0] -+ -+10: -+ vst1.16 {q2, q3}, [r1] @ Up -+ vst1.16 {d31[3]}, [r12] @ Up-left -+ vst1.16 {q0, q1}, [r0] @ Left -+ pop {r4-r10, pc} -+endfunc -+ -+@ int ff_hevc_rpi_intra_filter_16_neon_16( -+@ pixel * const left, [r0] -+@ pixel * const top, [r1] -+@ const unsigned int req, [r2] -+@ const unsigned int avail, [r3] -+@ const pixel * const src_l, [sp, #0] -+@ const pixel * const src_u, [sp, #4] -+@ const pixel * const src_ur, [sp, #8] -+@ const unsigned int stride, [sp, #12] (pels) -+@ const unsigned int top_right_size, [sp, #16] -+@ const unsigned int down_left_size) [sp, #20] -+ -+.set sp_base, 8*4 -+.set ur_size, sp_base + 16 -+.set dl_size, sp_base + 20 -+.set pw_s, 1 -+.set pw, (1 << pw_s) -+.set log2_s, 4 -+.set p_size, (1 << log2_s) @ size in pels -+ -+function ff_hevc_rpi_intra_filter_16_neon_16, export=1 -+ push {r4-r10, lr} -+ load_pointers pw_s, log2_s, sp_base, 16, "d0[],d1[]", d31[3], "d16[],d17[]", "d20[],d21[]" -+ -+ vdup.16 q9, d16[0] -+ vdup.16 q11, d20[0] -+ -+ it cs -+ vldmcs r6, {d16-d19} -+ ldr r12, [sp, #ur_size] -+ bpl 1f -+ cmp r12, #12 -+ @ Given chroma frame layout, if UR exists then it is always legit to -+ @ load all of it even if most of it is outside the frame. -+ vldm r5, {d20-d23} -+ bgt 1f -+ bge 4f -+ cmp r12, #8 -+ bge 3f -+ vdup.16 d21, d20[3] -+3: vdup.16 d22, d21[3] -+4: vdup.16 d23, d22[3] -+ -+1: -+ lsls r7, #AVAIL_S_L_N_DL_C -+ ldr r12, [sp, #dl_size] -+ vdup.16 q1, d0[0] -+ vdup.16 q2, d0[0] -+ vdup.16 q3, d0[0] -+ bpl 1f -+ vld1.16 {d0[0]}, [r10], r9 -+ vld1.16 {d0[1]}, [r3], r9 -+ vld1.16 {d0[2]}, [r10], r9 -+ vld1.16 {d0[3]}, [r3], r9 -+ vld1.16 {d1[0]}, [r10], r9 -+ vld1.16 {d1[1]}, [r3], r9 -+ vld1.16 {d1[2]}, [r10], r9 -+ vld1.16 {d1[3]}, [r3], r9 -+ vld1.16 {d2[0]}, [r10], r9 -+ vld1.16 {d2[1]}, [r3], r9 -+ vld1.16 {d2[2]}, [r10], r9 -+ vld1.16 {d2[3]}, [r3], r9 -+ vld1.16 {d3[0]}, [r10], r9 -+ vld1.16 {d3[1]}, [r3], r9 -+ vld1.16 {d3[2]}, [r10] -+ vld1.16 {d3[3]}, [r3] -+1: -+ bcc 1f -+ vld1.16 {d4[1]}, [r4], r9 -+ cmp r12, #4 -+ vld1.16 {d4[2]}, [r8], r9 -+ vld1.16 {d4[3]}, [r4], r9 -+ ble 2f -+ vld1.16 {d5[0]}, [r8], r9 -+ vld1.16 {d5[1]}, [r4], r9 -+ cmp r12, #12 -+ vld1.16 {d5[2]}, [r8], r9 -+ vld1.16 {d5[3]}, [r4], r9 -+ blt 3f -+ vld1.16 {d6[0]}, [r8], r9 -+ vld1.16 {d6[1]}, [r4], r9 -+ vld1.16 {d6[2]}, [r8], r9 -+ vld1.16 {d6[3]}, [r4], r9 -+ ble 4f -+ vld1.16 {d7[0]}, [r8], r9 -+ vld1.16 {d7[1]}, [r4], r9 -+ vld1.16 {d7[2]}, [r8] -+ vld1.16 {d7[3]}, [r4] -+ b 1f -+2: vdup.16 d5, d4[3] -+3: vdup.16 d6, d5[3] -+4: vdup.16 d7, d6[3] -+1: -+ tst r2, #FILTER_LIGHT -+ add r12, r0, #-pw -+ beq 10f -+ -+ vpush {q5} -+ @ Luma light filter -+ @ Left -+ vext.16 q5, q2, q3, #7 -+ vext.16 q14, q1, q2, #7 -+ vext.16 q13, q0, q1, #7 -+ vext.16 q12, q15, q0, #7 -+ -+ vadd.u16 q5, q3 -+ vadd.u16 q14, q2 -+ vadd.u16 q13, q1 -+ vadd.u16 q12, q0 -+ vmov.u16 r2, d7[3] @ Save final pel -+ -+ vext.16 q0, q12, q13, #1 -+ vext.16 q1, q13, q14, #1 -+ vext.16 q2, q14, q5, #1 -+ vext.16 q3, q5, q5, #1 -+ -+ vmov d30, d24 @ d30[0] = l[0] + ul -+ vadd.u16 q0, q12 -+ vadd.u16 q1, q13 -+ vadd.u16 q2, q14 -+ vadd.u16 q3, q5 -+ -+ vrshr.u16 q0, #2 -+ vrshr.u16 q1, #2 -+ vrshr.u16 q2, #2 -+ vrshr.u16 q3, #2 -+ -+ @ Up -+ vext.16 q5, q10, q11, #7 -+ vext.16 q14, q9, q10, #7 -+ vext.16 q13, q8, q9, #7 -+ vext.16 q12, q15, q8, #7 -+ -+ vadd.u16 q5, q11 -+ vadd.u16 q14, q10 -+ vadd.u16 q13, q9 -+ vadd.u16 q12, q8 -+ vmov.u16 r3, d23[3] @ Save final pel -+ -+ vext.16 q8, q12, q13, #1 -+ vext.16 q9, q13, q14, #1 -+ vext.16 q10, q14, q5, #1 -+ vext.16 q11, q5, q5, #1 -+ -+ vadd.u16 d30, d24 @ d30[0] = l[0] + 2ul + u[0] -+ vadd.u16 q8, q12 -+ vadd.u16 q9, q13 -+ vadd.u16 q10, q14 -+ vadd.u16 q11, q5 -+ -+ vrshr.u16 q8, #2 -+ vrshr.u16 q9, #2 -+ vrshr.u16 q10, #2 -+ vrshr.u16 q11, #2 -+ -+ @ Misc -+ vrshr.u16 d30, #2 -+ vmov.u16 d7[3], r2 @ Restore final pel -+ vmov.u16 d23[3], r3 @ Restore final pel -+ vdup.u16 d31, d30[0] @ d31[3] = d30[0] -+ vpop {q5} -+ -+10: -+ vstm r1, {d16-d23} @ Up -+ vst1.16 {d31[3]}, [r12] @ Up-left -+ vstm r0, { d0-d7 } @ Left -+ pop {r4-r10, pc} -+endfunc -+ -+@ int ff_hevc_rpi_intra_filter_4_neon_32( -+@ pixel * const left, [r0] -+@ pixel * const top, [r1] -+@ const unsigned int req, [r2] -+@ const unsigned int avail, [r3] -+@ const pixel * const src_l, [sp, #0] -+@ const pixel * const src_u, [sp, #4] -+@ const pixel * const src_ur, [sp, #8] -+@ const unsigned int stride, [sp, #12] (pels) -+@ const unsigned int top_right_size, [sp, #16] -+@ const unsigned int down_left_size) [sp, #20] -+ -+.set sp_base, 8*4 -+.set pw_s, 2 -+.set pw, (1 << pw_s) -+.set log2_s, 2 -+ -+function ff_hevc_rpi_intra_filter_4_neon_32, export=1 -+ push {r4-r10, lr} -+ load_pointers pw_s, log2_s, sp_base, 32, "d0[],d1[]", d31[1], "d4[],d5[]", "d6[],d7[]" -+ -+ it cs -+ vldmcs r6, {d4, d5} -+ it mi -+ vldmmi r5, {d6, d7} -+ lsls r7, #AVAIL_S_L_N_DL_C -+ vdup.32 q1, d0[0] -+ add r12, r0, #-pw -+ bpl 1f -+ vld1.32 {d0[0]}, [r10], r9 -+ vld1.32 {d0[1]}, [r3], r9 -+ vld1.32 {d1[0]}, [r10] -+ vld1.32 {d1[1]}, [r3] -+1: -+ bcc 1f -+ vld1.32 {d2[1]}, [r4], r9 -+ vld1.32 {d3[0]}, [r8] -+ vld1.32 {d3[1]}, [r4] -+1: -+ vst1.32 {q2, q3 }, [r1] @ Up -+ vst1.32 {d31[1]}, [r12] -+ vst1.32 {q0, q1 }, [r0] @ Left -+ pop {r4-r10, pc} -+endfunc -+ -+ -+@ int ff_hevc_rpi_intra_filter_8_neon_32( -+@ pixel * const left, [r0] -+@ pixel * const top, [r1] -+@ const unsigned int req, [r2] -+@ const unsigned int avail, [r3] -+@ const pixel * const src_l, [sp, #0] -+@ const pixel * const src_u, [sp, #4] -+@ const pixel * const src_ur, [sp, #8] -+@ const unsigned int stride, [sp, #12] (pels) -+@ const unsigned int top_right_size, [sp, #16] -+@ const unsigned int down_left_size) [sp, #20] -+ -+.set sp_base, 8*4 -+.set ur_size, sp_base + 16 -+.set dl_size, sp_base + 20 -+.set pw_s, 2 -+.set pw, (1 << pw_s) -+.set log2_s, 3 -+.set p_size, (1 << log2_s) @ size in pels -+ -+function ff_hevc_rpi_intra_filter_8_neon_32, export=1 -+ push {r4-r10, lr} -+ load_pointers pw_s, log2_s, sp_base, 32, "d0[],d1[]", d31[1], "d16[],d17[]", "d20[],d21[]" -+ -+ vdup.32 q9, d16[0] -+ vdup.32 q11, d20[0] -+ -+ it cs -+ vldmcs r6, {q8, q9 } -+ ldr r12, [sp, #ur_size] -+ bpl 1f -+ cmp r12, #p_size -+ vldm r5, {q10, q11} -+ bge 1f -+ vdup.32 q11, d21[1] -+1: -+ lsls r7, #AVAIL_S_L_N_DL_C -+ vdup.32 q1, d0[0] -+ vdup.32 q2, d0[0] -+ vdup.32 q3, d0[0] -+ bpl 1f -+ vld1.32 {d0[0]}, [r10], r9 -+ vld1.32 {d0[1]}, [r3], r9 -+ vld1.32 {d1[0]}, [r10], r9 -+ vld1.32 {d1[1]}, [r3], r9 -+ vld1.32 {d2[0]}, [r10], r9 -+ vld1.32 {d2[1]}, [r3], r9 -+ vld1.32 {d3[0]}, [r10] -+ vld1.32 {d3[1]}, [r3] -+1: -+ bcc 1f -+ ldr r12, [sp, #dl_size] -+ vld1.32 {d4[1]}, [r4], r9 -+ cmp r12, #p_size -+ vld1.32 {d5[0]}, [r8], r9 -+ vld1.32 {d5[1]}, [r4], r9 -+ blt 2f -+ vld1.32 {d6[0]}, [r8], r9 -+ vld1.32 {d6[1]}, [r4], r9 -+ vld1.32 {d7[0]}, [r8] -+ vld1.32 {d7[1]}, [r4] -+ b 1f -+2: -+ vdup.32 q3, d5[1] -+1: -+ add r12, r0, #-pw -+ vstm r1, { q8-q11} @ Up -+ vst1.32 {d31[1]}, [r12] -+ vstm r0, { q0-q3 } @ Left -+ pop {r4-r10, pc} -+endfunc -+ -+ -+@ int ff_hevc_rpi_intra_filter_16_neon_32( -+@ pixel * const left, [r0] -+@ pixel * const top, [r1] -+@ const unsigned int req, [r2] -+@ const unsigned int avail, [r3] -+@ const pixel * const src_l, [sp, #0] -+@ const pixel * const src_u, [sp, #4] -+@ const pixel * const src_ur, [sp, #8] -+@ const unsigned int stride, [sp, #12] (pels) -+@ const unsigned int top_right_size, [sp, #16] -+@ const unsigned int down_left_size) [sp, #20] -+ -+.set sp_base, 8*4 -+.set ur_size, sp_base + 16 -+.set dl_size, sp_base + 20 -+.set pw_s, 2 -+.set pw, (1 << pw_s) -+.set log2_s, 4 -+.set p_size, (1 << log2_s) @ size in pels -+ -+function ff_hevc_rpi_intra_filter_16_neon_32, export=1 -+ push {r4-r10, lr} -+ load_pointers pw_s, log2_s, sp_base, 32, d30[0], d30[1], d31[0], d31[1] -+ -+ @ Once we get this big we have run out of neon regs to store -+ @ everything at once so do in pieces -+ -+ @ Up (have) -+ it cs -+ vldmcs r6, { q0-q3 } -+ ldr r12, [sp, #ur_size] -+ it mi -+ vldmmi r5, { q8-q11} -+ it cs -+ vstmcs r1, { q0-q3 } -+ bpl 1f -+ cmp r12, #12 -+ add lr, r1, #(pw << log2_s) -+ bgt 2f -+ cmp r12, #8 -+ bge 3f -+ vdup.16 q9, d17[1] -+4: vdup.16 d10, d19[1] -+3: vdup.16 q11, d21[1] -+2: vstm lr, { q8-q11} -+1: -+ -+ @ Left (have) -+ add lr, r0, #-pw -+ lsls r12, r7, #AVAIL_S_L_N_DL_C -+ vst1.32 {d30[1]}, [lr] @ UL -+ bpl 1f -+ vld1.32 { d0[0]}, [r10], r9 -+ vld1.32 { d0[1]}, [r3], r9 -+ vld1.32 { d1[0]}, [r10], r9 -+ vld1.32 { d1[1]}, [r3], r9 -+ vld1.32 { d2[0]}, [r10], r9 -+ vld1.32 { d2[1]}, [r3], r9 -+ vld1.32 { d3[0]}, [r10], r9 -+ vld1.32 { d3[1]}, [r3], r9 -+ vld1.32 { d4[0]}, [r10], r9 -+ vld1.32 { d4[1]}, [r3], r9 -+ vld1.32 { d5[0]}, [r10], r9 -+ vld1.32 { d5[1]}, [r3], r9 -+ vld1.32 { d6[0]}, [r10], r9 -+ vld1.32 { d6[1]}, [r3], r9 -+ vld1.32 { d7[0]}, [r10] -+ vld1.32 { d7[1]}, [r3] -+ vstm r0, { q0-q3 } -+1: -+ bcc 1f -+ ldr r12, [sp, #dl_size] -+ vdup.32 d16, d30[0] @ d16[0] = d30[0] -+ add lr, r0, #(pw << log2_s) -+ vld1.32 {d16[1]}, [r4], r9 -+ cmp r12, #4 -+ vld1.32 {d17[0]}, [r8], r9 -+ vld1.32 {d17[1]}, [r4], r9 -+ ble 2f -+ vld1.32 {d18[0]}, [r8], r9 -+ vld1.32 {d18[1]}, [r4], r9 -+ cmp r12, #12 -+ vld1.32 {d19[0]}, [r8], r9 -+ vld1.32 {d19[1]}, [r4], r9 -+ blt 3f -+ vld1.32 {d20[0]}, [r8], r9 -+ vld1.32 {d20[1]}, [r4], r9 -+ vld1.32 {d21[0]}, [r8], r9 -+ vld1.32 {d21[1]}, [r4], r9 -+ ble 4f -+ vld1.32 {d22[0]}, [r8], r9 -+ vld1.32 {d22[1]}, [r4], r9 -+ vld1.32 {d23[0]}, [r8] -+ vld1.32 {d23[1]}, [r4] -+ b 5f -+2: vdup.32 q9, d17[1] -+3: vdup.32 q10, d19[1] -+4: vdup.32 q11, d21[1] -+5: vstm lr, { q8-q11} -+1: -+ eors r7, r2 -+ beq 99f -+ -+ lsls r12, r7, #AVAIL_S_UR_N_U_C -+ vdup.32 q0, d31[0] -+ vdup.32 q1, d31[0] -+ vdup.32 q2, d31[0] -+ vdup.32 q3, d31[0] -+ add lr, r1, #(pw << log2_s) -+ vdup.32 q8, d31[1] -+ vdup.32 q9, d31[1] -+ vdup.32 q10, d31[1] -+ vdup.32 q11, d31[1] -+ it cs -+ vstmcs r1, { q0-q3 } -+ it mi -+ vstmmi lr, { q8-q11} -+ -+ lsls r7, #AVAIL_S_L_N_DL_C -+ vdup.32 q0, d30[0] -+ vdup.32 q1, d30[0] -+ vdup.32 q2, d30[0] -+ vdup.32 q3, d30[0] -+ add lr, r0, #(pw << log2_s) -+ it mi -+ vstmmi r0, { q0-q3 } -+ it cs -+ vstmcs lr, { q0-q3 } -+ -+99: -+ pop {r4-r10, pc} -+endfunc -+ -+ -+ -+ ---- /dev/null -+++ b/libavcodec/arm/rpi_hevcpred_intra_hv_neon.S -@@ -0,0 +1,920 @@ -+/* -+Copyright (c) 2018 Raspberry Pi (Trading) Ltd. -+All rights reserved. -+ -+Redistribution and use in source and binary forms, with or without -+modification, are permitted provided that the following conditions are met: -+ * Redistributions of source code must retain the above copyright -+ notice, this list of conditions and the following disclaimer. -+ * Redistributions in binary form must reproduce the above copyright -+ notice, this list of conditions and the following disclaimer in the -+ documentation and/or other materials provided with the distribution. -+ * Neither the name of the copyright holder nor the -+ names of its contributors may be used to endorse or promote products -+ derived from this software without specific prior written permission. -+ -+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ -+Authors: John Cox, Ben Avison -+*/ -+ -+/* -+ * Horizontal & Vertical special cases of angular intra pred -+ * -+ * Split out because: -+ * Vertical, at least, is relatively common -+ * Much simpler code than the general angular case -+ * Luma with size < 32 has extra filtering that doesn't happen anywhere else -+ * -+ * *** Currently luma filtering is mandatory where it occurs, but there are -+ * cases where it should be turned off (rdpcm & an extension sps flag). -+ * These don't occur in the standard conformance suite for Main Profile -+ */ -+ -+#include "libavutil/arm/asm.S" -+#include "neon.S" -+ -+@ ff_hevc_rpi_pred_vertical_4_neon_8 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride) [r3] -+ -+function ff_hevc_rpi_pred_vertical_4_neon_8, export=1 -+ ldrb ip, [r2, #-1] @ Top-left -+ vld1.32 {d0[0]}, [r2 :32] @ Left -+ add r2, r0, r3 -+ vld1.8 {d1[]}, [r1] -+ lsl r3, #1 -+ vdup.8 d4, ip -+ vmov.i8 d2, #128 -+ vhsub.u8 d4, d0, d4 -+ veor d1, d2 -+ vld1.32 {d0[0]}, [r1 :32] @ Top -+ vqadd.s8 d1, d4 -+ vmov.i64 d3, #0xff -+ vmov d4, d0 -+ veor d5, d1, d2 -+ veor d1, d1, d2 -+ vbit d0, d1, d3 -+ vshr.u64 d5, #8 -+ vst1.32 {d0[0]}, [r0], r3 -+ vshr.u64 d1, #16 -+ vbit d4, d5, d3 -+ vshr.u64 d5, #16 -+ vst1.32 {d4[0]}, [r2], r3 -+ vbit d0, d1, d3 -+ vst1.32 {d0[0]}, [r0] -+ vbit d4, d5, d3 -+ vst1.32 {d4[0]}, [r2] -+ -+ bx lr -+endfunc -+ -+ -+@ ff_hevc_rpi_pred_vertical_8_neon_8 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride) [r3] -+ -+function ff_hevc_rpi_pred_vertical_8_neon_8, export=1 -+ ldrb ip, [r2, #-1] @ Top-left -+ vld1.8 {d0}, [r2 :64] @ Left -+ vmov.i8 d1, #128 -+ vld1.8 {d2[]}, [r1] -+ vld1.8 {d3}, [r1 :64] @ Top -+ vdup.8 d4, ip -+ vhsub.u8 d4, d0, d4 -+ veor d2, d1 -+ vmov.i64 d0, #0xff -+ mov r1, #8 -+ vqadd.s8 d2, d4, d2 -+ veor d1, d2, d1 -+1: -+ vbit d3, d1, d0 -+ vshr.u64 d1, #8 -+ vst1.8 {d3}, [r0 :64], r3 -+ subs r1, #2 -+ vbit d3, d1, d0 -+ vshr.u64 d1, #8 -+ vst1.8 {d3}, [r0 :64], r3 -+ bne 1b -+ -+ bx lr -+endfunc -+ -+ -+@ ff_hevc_rpi_pred_vertical_16_neon_8 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride) [r3] -+ -+function ff_hevc_rpi_pred_vertical_16_neon_8, export=1 -+ ldrb ip, [r2, #-1] @ Top-left -+ vld1.8 {q0}, [r2 :128] @ Left -+ vdup.8 q1, ip -+ vld1.8 {d4[],d5[]}, [r1] -+ vhsub.u8 q0, q1 -+ vmov.i8 q1, #128 -+ veor q2, q1 -+ vmov.i64 d16, #0xff -+ vqadd.s8 q0, q2 -+ vld1.8 {q3}, [r1 :128] @ Top -+ mov r1, #16 -+ veor q0, q1 -+ vmov q1, q3 -+ vext.8 q2, q0, q0, #1 -+1: -+ vbit d2, d0, d16 -+ vbit d6, d4, d16 -+ vext.8 q0, q0, q0, #2 -+ subs r1, #2 -+ vst1.8 {q1}, [r0 :128], r3 -+ vext.8 q2, q2, q2, #2 -+ vst1.8 {q3}, [r0 :128], r3 -+ bne 1b -+ -+ bx lr -+endfunc -+ -+ -+@ ff_hevc_rpi_pred_vert_32_neon_8 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride) [r3] -+ -+function ff_hevc_rpi_pred_vertical_32_neon_8, export=1 -+ vld1.8 {q0, q1 }, [r1 :128] @ Up -+ add r2, r0, r3 -+ lsl r3, #1 -+ mov r1, #16 -+1: -+ vst1.8 {q0, q1 }, [r0 :128], r3 -+ subs r1, #1 -+ vst1.8 {q0, q1 }, [r2 :128], r3 -+ bne 1b -+ -+ bx lr -+endfunc -+ -+ -+@ ff_hevc_rpi_pred_vertical_c_4_neon_8 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride) [r3] -+ -+function ff_hevc_rpi_pred_vertical_c_4_neon_8, export=1 -+ vld1.16 {d0 }, [r1 :64] @ Up -+ add r2, r0, r3, lsl #1 -+ lsl r3, #2 -+ -+ vst1.16 {d0 }, [r0 :64], r3 -+ vst1.16 {d0 }, [r2 :64], r3 -+ vst1.16 {d0 }, [r0 :64] -+ vst1.16 {d0 }, [r2 :64] -+ -+ bx lr -+endfunc -+ -+ -+@ ff_hevc_rpi_pred_vertical_c_8_neon_8 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride) [r3] -+ -+function ff_hevc_rpi_pred_vertical_c_8_neon_8, export=1 -+ vld1.16 {q0 }, [r1 :128] @ Up -+ add r2, r0, r3, lsl #1 -+ lsl r3, #2 -+ mov r1, #4 -+1: -+ vst1.16 {q0 }, [r0 :128], r3 -+ subs r1, #2 -+ vst1.16 {q0 }, [r2 :128], r3 -+ vst1.16 {q0 }, [r0 :128], r3 -+ vst1.16 {q0 }, [r2 :128], r3 -+ bne 1b -+ -+ bx lr -+endfunc -+ -+ -+@ ff_hevc_rpi_pred_vertical_c_16_neon_8 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride) [r3] -+ -+function ff_hevc_rpi_pred_vertical_c_16_neon_8, export=1 -+ vld1.16 {q0, q1 }, [r1 :128] @ Up -+ add r2, r0, r3, lsl #1 -+ lsl r3, #2 -+ mov r1, #8 -+1: -+ vst1.16 {q0, q1 }, [r0 :128], r3 -+ subs r1, #1 -+ vst1.16 {q0, q1 }, [r2 :128], r3 -+ bne 1b -+ -+ bx lr -+endfunc -+ -+ -+@ ff_hevc_rpi_pred_horizontalal_4_neon_8 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride) [r3] -+ -+@ ? Might be faster as simple arm -+ -+function ff_hevc_rpi_pred_horizontal_4_neon_8, export=1 -+ ldrb ip, [r2, #-1] @ Top-left -+ vld1.32 {d0[0]}, [r1 :32] @ Top -+ add r1, r2, #3 -+ vld1.8 {d1[]}, [r2]! -+ vdup.8 d2, ip -+ vmov.i8 d3, #128 -+ vhsub.u8 d0, d2 -+ veor d1, d3 -+ vld1.8 {d2[]}, [r2]! -+ add ip, r0, r3 -+ vqadd.s8 d0, d0, d1 -+ lsl r3, #1 -+ vld1.8 {d1[]}, [r2] -+ vld1.8 {d4[]}, [r1] -+ veor d0, d3 -+ vst1.32 {d0[0]}, [r0 :32], r3 -+ vst1.32 {d2[0]}, [ip :32], r3 -+ vst1.32 {d1[0]}, [r0 :32] -+ vst1.32 {d4[0]}, [ip :32] -+ -+ bx lr -+endfunc -+ -+ -+@ ff_hevc_rpi_pred_horizontal_8_neon_8 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride) [r3] -+ -+function ff_hevc_rpi_pred_horizontal_8_neon_8, export=1 -+ ldrb ip, [r2, #-1] @ Top-left -+ vld1.8 {d0}, [r1 :64] @ Top -+ vmov.i8 d1, #128 -+ vld1.8 {d2[]}, [r2]! -+ mov r1, #8-2 -+ vdup.8 d3, ip -+ vhsub.u8 d0, d3 -+ veor d2, d1 -+ vqadd.s8 d0, d2 -+ vld1.8 {d2[]}, [r2]! -+ veor d0, d1 -+ vst1.8 {d0}, [r0], r3 -+1: -+ vld1.8 {d0[]}, [r2]! -+ subs r1, #2 -+ vst1.8 {d2}, [r0 :64], r3 -+ vld1.8 {d2[]}, [r2]! -+ vst1.8 {d0}, [r0 :64], r3 -+ bne 1b -+ -+ vst1.8 {d2}, [r0 :64] -+ bx lr -+endfunc -+ -+ -+@ ff_hevc_rpi_pred_horizontal_16_neon_8 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride) [r3] -+ -+function ff_hevc_rpi_pred_horizontal_16_neon_8, export=1 -+ ldrb ip, [r2, #-1] @ Top-left -+ vld1.8 {q0}, [r1 :64] @ Top -+ mov r1, #16-2 -+ vld1.8 {d4[],d5[]}, [r2]! -+ vdup.8 q3, ip -+ vhsub.u8 q0, q3 -+ vmov.i8 q1, #128 -+ veor q2, q1 -+ vqadd.s8 q0, q2 -+ vld1.8 {d4[],d5[]}, [r2]! -+ veor q0, q1 -+ vst1.8 {q0}, [r0], r3 -+1: -+ vld1.8 {d0[],d1[]}, [r2]! -+ subs r1, #2 -+ vst1.8 {q2}, [r0 :64], r3 -+ vld1.8 {d4[],d5[]}, [r2]! -+ vst1.8 {q0}, [r0 :64], r3 -+ bne 1b -+ -+ vst1.8 {q2}, [r0 :64] -+ bx lr -+endfunc -+ -+ -+@ ff_hevc_rpi_pred_horizontal_32_neon_8 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride) [r3] -+ -+function ff_hevc_rpi_pred_horizontal_32_neon_8, export=1 -+ vld1.8 {d0[],d1[]}, [r2]! -+ add ip, r0, #16 -+ mov r1, #32-2 -+ vld1.8 {d2[],d3[]}, [r2]! -+ vst1.8 {q0}, [r0 :128], r3 -+ vst1.8 {q0}, [ip :128], r3 -+1: -+ vld1.8 {d0[],d1[]}, [r2]! -+ subs r1, #2 -+ vst1.8 {q1}, [r0 :128], r3 -+ vst1.8 {q1}, [ip :128], r3 -+ vld1.8 {d2[],d3[]}, [r2]! -+ vst1.8 {q0}, [r0 :128], r3 -+ vst1.8 {q0}, [ip :128], r3 -+ bne 1b -+ -+ vst1.8 {q1}, [r0 :128] -+ vst1.8 {q1}, [ip :128] -+ bx lr -+endfunc -+ -+ -+@ ff_hevc_rpi_pred_horizontal_c_4_neon_8 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride) [r3] -+ -+function ff_hevc_rpi_pred_horizontal_c_4_neon_8, export=1 -+ add r1, r2, #2 -+ vld1.16 {d0[]}, [r2] -+ add r2, #4 -+ vld1.16 {d1[]}, [r1] -+ add r1, #4 -+ vld1.16 {d2[]}, [r2] -+A add r2, r0, r3, lsl #1 -+T lsl r3, #1 -+T add r2, r0, r3 -+ vld1.16 {d3[]}, [r1] -+A lsl r3, #2 -+T lsl r3, #1 -+ vst1.16 {d0}, [r0 :64], r3 -+ vst1.16 {d1}, [r2 :64], r3 -+ vst1.16 {d2}, [r0 :64] -+ vst1.16 {d3}, [r2 :64] -+ -+ bx lr -+endfunc -+ -+ -+@ ff_hevc_rpi_pred_horizontal_c_8_neon_8 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride) [r3] -+ -+function ff_hevc_rpi_pred_horizontal_c_8_neon_8, export=1 -+ vld1.16 {d0[],d1[]}, [r2]! -+ lsl r3, #1 -+ vld1.16 {d2[],d3[]}, [r2]! -+ mov r1, #8-2 -+ vst1.16 {q0}, [r0 :64], r3 -+1: -+ vld1.16 {d0[],d1[]}, [r2]! -+ subs r1, #2 -+ vst1.16 {q1}, [r0 :64], r3 -+ vld1.16 {d2[],d3[]}, [r2]! -+ vst1.16 {q0}, [r0 :64], r3 -+ bne 1b -+ -+ vst1.16 {q1}, [r0 :64] -+ bx lr -+endfunc -+ -+ -+@ ff_hevc_rpi_pred_horizontal_c_16_neon_8 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride) [r3] -+ -+function ff_hevc_rpi_pred_horizontal_c_16_neon_8, export=1 -+ vld1.16 {d0[],d1[]}, [r2]! -+ lsl r3, #1 -+ add ip, r0, #16 -+ mov r1, #16-2 -+ vld1.16 {d2[],d3[]}, [r2]! -+ vst1.16 {q0}, [r0 :128], r3 -+ vst1.16 {q0}, [ip :128], r3 -+1: -+ vld1.16 {d0[],d1[]}, [r2]! -+ subs r1, #2 -+ vst1.16 {q1}, [r0 :128], r3 -+ vst1.16 {q1}, [ip :128], r3 -+ vld1.16 {d2[],d3[]}, [r2]! -+ vst1.16 {q0}, [r0 :128], r3 -+ vst1.16 {q0}, [ip :128], r3 -+ bne 1b -+ -+ vst1.16 {q1}, [r0 :128] -+ vst1.16 {q1}, [ip :128] -+ bx lr -+endfunc -+ -+ -+@------------------------------------------------------------------------------ -+@ -+@ 10 Bit -+@ Has clipping constants so 10-bit only but could easily be macroed up to -+@ 14-bit before we run out of bits -+ -+ -+@ ff_hevc_rpi_pred_vertical_4_neon_10 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride) [r3] -+ -+function ff_hevc_rpi_pred_vertical_4_neon_10, export=1 -+ ldrh ip, [r2, #-2] @ Top-left -+ vld1.16 {d0}, [r2 :64] @ Left -+ vmov.i16 d2, #0 -+ vld1.16 {d1[]}, [r1] -+T lsl r3, #1 -+ vdup.16 d4, ip -+ vmov.i16 d3, #0x3ff -+ vld1.16 {d5}, [r1 :64] @ Top -+ vhsub.u16 d4, d0, d4 -+ vmov.i64 d0, #0xffff -+A add r2, r0, r3, lsl #1 -+T add r2, r0, r3 -+ vadd.i16 d1, d1, d4 -+ vmov d6, d5 -+ vmax.s16 d1, d1, d2 -+ vmin.s16 d2, d1, d3 -+ vmin.s16 d1, d1, d3 -+ vbit d5, d1, d0 -+A lsl r3, #2 -+T lsl r3, #1 -+ vshr.u64 d2, #16 -+ vshr.u64 d1, #32 -+ vbit d6, d2, d0 -+ vst1.16 {d5}, [r0], r3 -+ vshr.u64 d2, #32 -+ vst1.16 {d6}, [r2], r3 -+ vbit d5, d1, d0 -+ vst1.16 {d5}, [r0] -+ vbit d6, d2, d0 -+ vst1.16 {d6}, [r2] -+ bx lr -+endfunc -+ -+ -+@ ff_hevc_rpi_pred_vertical_8_neon_10 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride) [r3] -+ -+function ff_hevc_rpi_pred_vertical_8_neon_10, export=1 -+ ldrh ip, [r2, #-2] @ Top-left -+ vld1.16 {q0}, [r2 :128] @ Left -+ lsl r3, #1 -+ vdup.16 q1, ip -+ vld1.16 {d4[],d5[]}, [r1] -+ vhsub.u16 q0, q0, q1 -+ vmov.i16 q1, #0 -+ vadd.i16 q0, q2 -+ vmov.i16 q2, #0x3ff -+ vld1.16 {q3}, [r1 :128] @ Top -+ mov r1, #8 -+ vmax.s16 q0, q1 -+ vmov q1, q3 -+ vmin.s16 q0, q2 -+ vmov.i64 d16, #0xffff -+ vext.16 q2, q0, q0, #1 -+1: -+ vbit d2, d0, d16 -+ vbit d6, d4, d16 -+ vext.16 q0, q0, q0, #2 -+ subs r1, #2 -+ vst1.16 {q1}, [r0 :128], r3 -+ vext.16 q2, q2, q2, #2 -+ vst1.16 {q3}, [r0 :128], r3 -+ bne 1b -+ -+ bx lr -+endfunc -+ -+ -+@ ff_hevc_rpi_pred_vertical_16_neon_10 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride) [r3] -+ -+function ff_hevc_rpi_pred_vertical_16_neon_10, export=1 -+ ldrh ip, [r2, #-2] @ Top-left -+ vld1.16 {q0-q1}, [r2 :128] @ Left -+T lsl r3, #1 -+ vdup.16 q2, ip -+A add r2, r0, r3, lsl #1 -+T add r2, r0, r3 -+ vld1.16 {d6[],d7[]}, [r1] -+A lsl r3, #2 -+T lsl r3, #1 -+ vhsub.u16 q0, q2 -+ vhsub.u16 q1, q2 -+ vadd.i16 q0, q3 -+ vadd.i16 q1, q3 -+ vmov.i16 q2, #0 -+ vld1.16 {q8-q9}, [r1 :128] @ Top -+ mov r1, #0 -+ vmov.i16 q3, #0x3ff -+ vmax.s16 q0, q2 -+ vmax.s16 q1, q2 -+ vmin.s16 q0, q3 -+ vmin.s16 q1, q3 -+ vmov q10, q8 -+ vmov q11, q9 -+ vext.16 q2, q0, q1, #1 -+ vext.16 q3, q1, q1, #1 -+ vmov.i64 d24, #0xffff -+1: -+ vbit d16, d0, d24 -+ vbit d20, d4, d24 -+ vext.16 q0, q0, q0, #2 -+ subs r1, #1<<30 -+ vst1.16 {q8-q9}, [r0 :128], r3 -+ vext.16 q2, q2, q2, #2 -+ vst1.16 {q10-q11}, [r2 :128], r3 -+ bne 1b -+1: -+ vbit d16, d2, d24 -+ vbit d20, d6, d24 -+ vext.16 q1, q1, q1, #2 -+ subs r1, #1<<30 -+ vst1.16 {q8-q9}, [r0 :128], r3 -+ vext.16 q3, q3, q3, #2 -+ vst1.16 {q10-q11}, [r2 :128], r3 -+ bne 1b -+ -+ bx lr -+endfunc -+ -+ -+@ ff_hevc_rpi_pred_vertical_32_neon_10 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride) [r3] -+ -+function ff_hevc_rpi_pred_vertical_32_neon_10, export=1 -+ vldm r1, { q0-q3 } @ Up -+ lsl r3, #1 -+ mov r1, #32 -+ add r2, r0, #32 -+1: -+ vst1.16 {q0-q1}, [r0 :128], r3 -+ subs r1, #1 -+ vst1.16 {q2-q3}, [r2 :128], r3 -+ bne 1b -+ -+ bx lr -+endfunc -+ -+ -+@ ff_hevc_rpi_pred_vertical_c_4_neon_10 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride) [r3] -+ -+function ff_hevc_rpi_pred_vertical_c_4_neon_10, export=1 -+ vld1.16 {q0 }, [r1 :128] @ Up -+ add r2, r0, r3, lsl #2 -+ lsl r3, #3 -+ -+ vst1.16 {q0 }, [r0 :128], r3 -+ vst1.16 {q0 }, [r2 :128], r3 -+ vst1.16 {q0 }, [r0 :128] -+ vst1.16 {q0 }, [r2 :128] -+ -+ bx lr -+endfunc -+ -+ -+@ ff_hevc_rpi_pred_vertical_c_8_neon_10 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride) [r3] -+ -+function ff_hevc_rpi_pred_vertical_c_8_neon_10, export=1 -+ vld1.16 {q0, q1 }, [r1 :128] @ Up -+ add r2, r0, r3, lsl #2 -+ lsl r3, #3 -+ mov r1, #4 -+1: -+ vst1.16 {q0, q1 }, [r0 :128], r3 -+ subs r1, #1 -+ vst1.16 {q0, q1 }, [r2 :128], r3 -+ bne 1b -+ -+ bx lr -+endfunc -+ -+ -+@ ff_hevc_rpi_pred_vertical_c_16_neon_10 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride) [r3] -+ -+function ff_hevc_rpi_pred_vertical_c_16_neon_10, export=1 -+ vldm r1, { q0-q3 } @ Up -+ lsl r3, #2 -+ mov r1, #16 -+ add r2, r0, #32 -+1: -+ vst1.16 {q0-q1}, [r0 :128], r3 -+ subs r1, #1 -+ vst1.16 {q2-q3}, [r2 :128], r3 -+ bne 1b -+ -+ bx lr -+endfunc -+ -+@ ff_hevc_rpi_pred_horizontal_4_neon_10 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride) [r3] -+ -+function ff_hevc_rpi_pred_horizontal_4_neon_10, export=1 -+ ldrh ip, [r2, #-2] @ Top-left -+ vld1.16 {d0}, [r1 :64] @ Top -+ vmov.i16 d1, #0 -+ vld1.16 {d2[]}, [r2]! -+T lsl r3, #1 -+ vdup.16 d3, ip -+ vmov.i16 d4, #0x3ff -+ vhsub.u16 d0, d3 -+A add ip, r0, r3, lsl #1 -+T add ip, r0, r3 -+ vld1.16 {d3[]}, [r2]! -+A lsl r3, #2 -+T lsl r3, #1 -+ vadd.i16 d0, d2 -+ vld1.16 {d2[]}, [r2]! -+ vmax.s16 d0, d1 -+ vld1.16 {d1[]}, [r2] -+ vmin.s16 d0, d4 -+ vst1.16 {d0}, [r0 :64], r3 -+ vst1.16 {d3}, [ip :64], r3 -+ vst1.16 {d2}, [r0 :64] -+ vst1.16 {d1}, [ip :64] -+ -+ bx lr -+endfunc -+ -+ -+@ ff_hevc_rpi_pred_horizontal_8_neon_10 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride) [r3] -+ -+function ff_hevc_rpi_pred_horizontal_8_neon_10, export=1 -+ ldrh ip, [r2, #-2] @ Top-left -+ vld1.16 {q0}, [r1 :128] @ Top -+ lsl r3, #1 -+ vdup.16 q1, ip -+ mov r1, #8-2 -+ vhsub.u16 q0, q1 -+ vld1.16 {d2[],d3[]}, [r2]! -+ vmov.i16 q2, #0 -+ vadd.i16 q0, q1 -+ vmov.i16 q1, #0x3ff -+ vmax.s16 q0, q2 -+ vld1.16 {d4[],d5[]}, [r2]! -+ vmin.s16 q0, q1 -+ vst1.16 {q0}, [r0 :128], r3 -+1: -+ vld1.16 {d0[],d1[]}, [r2]! -+ subs r1, #2 -+ vst1.16 {q2}, [r0 :128], r3 -+ vld1.16 {d4[],d5[]}, [r2]! -+ vst1.16 {q0}, [r0 :128], r3 -+ bne 1b -+ -+ vst1.16 {q2}, [r0 :128] -+ bx lr -+endfunc -+ -+ -+@ ff_hevc_rpi_pred_horizontalal_16_neon_10 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride) [r3] -+ -+function ff_hevc_rpi_pred_horizontal_16_neon_10, export=1 -+ ldrh ip, [r2, #-2] @ Top-left -+ vld1.16 {q0-q1}, [r1 :128] @ Top -+ lsl r3, #1 -+ vdup.16 q2, ip -+ add ip, r0, r3 -+ vhsub.u16 q0, q2 -+ add ip, #16 -+ vhsub.u16 q1, q2 -+ mov r1, #16-2 -+ vld1.16 {d4[],d5[]}, [r2]! -+ vmov.i16 q3, #0 -+ vadd.u16 q0, q2 -+ vadd.i16 q1, q2 -+ vmov.i16 q2, #0x3ff -+ vmax.s16 q0, q3 -+ vmax.s16 q1, q3 -+ vld1.16 {d6[],d7[]}, [r2]! -+ vmin.s16 q0, q2 -+ vmin.s16 q1, q2 -+ vst1.16 {q0-q1}, [r0 :128], r3 -+1: -+ vld1.16 {d0[],d1[]}, [r2]! -+ subs r1, #2 -+ vst1.16 {q3}, [r0 :128], r3 -+ vst1.16 {q3}, [ip :128], r3 -+ vld1.16 {d6[],d7[]}, [r2]! -+ vst1.16 {q0}, [r0 :128], r3 -+ vst1.16 {q0}, [ip :128], r3 -+ bne 1b -+ -+ vst1.16 {q3}, [r0 :128] -+ vst1.16 {q3}, [ip :128] -+ bx lr -+endfunc -+ -+ -+@ ff_hevc_rpi_pred_horizontal_32_neon_10 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride) [r3] -+ -+function ff_hevc_rpi_pred_horizontal_32_neon_10, export=1 -+ vld1.16 {d0[],d1[]}, [r2]! -+ add ip, r0, #16 -+ push {lr} -+ mov lr, #32 -+ vld1.16 {d2[],d3[]}, [r2]! -+ lsl r3, #1 -+ vst1.16 {q0}, [r0 :128], lr -+ sub r3, #32 -+ vst1.16 {q0}, [ip :128], lr -+ mov r1, #32-2 -+ vst1.16 {q0}, [r0 :128], r3 -+ vst1.16 {q0}, [ip :128], r3 -+1: -+ vld1.16 {d0[],d1[]}, [r2]! -+ subs r1, #2 -+ vst1.16 {q1}, [r0 :128], lr -+ vst1.16 {q1}, [ip :128], lr -+ vst1.16 {q1}, [r0 :128], r3 -+ vst1.16 {q1}, [ip :128], r3 -+ vld1.16 {d2[],d3[]}, [r2]! -+ vst1.16 {q0}, [r0 :128], lr -+ vst1.16 {q0}, [ip :128], lr -+ vst1.16 {q0}, [r0 :128], r3 -+ vst1.16 {q0}, [ip :128], r3 -+ bne 1b -+ -+ vst1.16 {q1}, [r0 :128], lr -+ vst1.16 {q1}, [ip :128], lr -+ vst1.16 {q1}, [r0 :128] -+ vst1.16 {q1}, [ip :128] -+ pop {pc} -+endfunc -+ -+ -+@ ff_hevc_rpi_pred_horizontal_c_4_neon_10 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride) [r3] -+ -+function ff_hevc_rpi_pred_horizontal_c_4_neon_10, export=1 -+ add r1, r2, #4 -+ vld1.32 {d0[],d1[]}, [r2] -+ add r2, #8 -+ vld1.32 {d2[],d3[]}, [r1] -+ add r1, #8 -+ vld1.32 {d4[],d5[]}, [r2] -+A add r2, r0, r3, lsl #2 -+T lsl r3, #2 -+T add r2, r0, r3 -+ vld1.32 {d6[],d7[]}, [r1] -+A lsl r3, #3 -+T lsl r3, #1 -+ vst1.32 {q0}, [r0 :128], r3 -+ vst1.32 {q1}, [r2 :128], r3 -+ vst1.32 {q2}, [r0 :128] -+ vst1.32 {q3}, [r2 :128] -+ -+ bx lr -+endfunc -+ -+ -+@ ff_hevc_rpi_pred_horizontal_c_8_neon_10 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride) [r3] -+ -+function ff_hevc_rpi_pred_horizontal_c_8_neon_10, export=1 -+ vld1.32 {d0[],d1[]}, [r2]! -+ lsl r3, #2 -+ add ip, r0, #16 -+ mov r1, #8-2 -+ vld1.32 {d2[],d3[]}, [r2]! -+ vst1.32 {q0}, [r0 :128], r3 -+ vst1.32 {q0}, [ip :128], r3 -+1: -+ vld1.32 {d0[],d1[]}, [r2]! -+ subs r1, #2 -+ vst1.32 {q1}, [r0 :128], r3 -+ vst1.32 {q1}, [ip :128], r3 -+ vld1.32 {d2[],d3[]}, [r2]! -+ vst1.32 {q0}, [r0 :128], r3 -+ vst1.32 {q0}, [ip :128], r3 -+ bne 1b -+ -+ vst1.32 {q1}, [r0 :128] -+ vst1.32 {q1}, [ip :128] -+ bx lr -+endfunc -+ -+ -+@ ff_hevc_rpi_pred_horizontal_c_16_neon_10 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride) [r3] -+ -+function ff_hevc_rpi_pred_horizontal_c_16_neon_10, export=1 -+ vld1.32 {d0[],d1[]}, [r2]! -+ add ip, r0, #16 -+ push {lr} -+ mov lr, #32 -+ vld1.32 {d2[],d3[]}, [r2]! -+ lsl r3, #2 -+ vst1.32 {q0}, [r0 :128], lr -+ sub r3, #32 -+ vst1.32 {q0}, [ip :128], lr -+ mov r1, #16-2 -+ vst1.32 {q0}, [r0 :128], r3 -+ vst1.32 {q0}, [ip :128], r3 -+1: -+ vld1.32 {d0[],d1[]}, [r2]! -+ subs r1, #2 -+ vst1.32 {q1}, [r0 :128], lr -+ vst1.32 {q1}, [ip :128], lr -+ vst1.32 {q1}, [r0 :128], r3 -+ vst1.32 {q1}, [ip :128], r3 -+ vld1.32 {d2[],d3[]}, [r2]! -+ vst1.32 {q0}, [r0 :128], lr -+ vst1.32 {q0}, [ip :128], lr -+ vst1.32 {q0}, [r0 :128], r3 -+ vst1.32 {q0}, [ip :128], r3 -+ bne 1b -+ -+ vst1.32 {q1}, [r0 :128], lr -+ vst1.32 {q1}, [ip :128], lr -+ vst1.32 {q1}, [r0 :128] -+ vst1.32 {q1}, [ip :128] -+ pop {pc} -+endfunc -+ -+ -+ ---- /dev/null -+++ b/libavcodec/arm/rpi_hevcpred_intra_planar_neon.S -@@ -0,0 +1,1043 @@ -+/* -+Copyright (c) 2018 Raspberry Pi (Trading) Ltd. -+All rights reserved. -+ -+Redistribution and use in source and binary forms, with or without -+modification, are permitted provided that the following conditions are met: -+ * Redistributions of source code must retain the above copyright -+ notice, this list of conditions and the following disclaimer. -+ * Redistributions in binary form must reproduce the above copyright -+ notice, this list of conditions and the following disclaimer in the -+ documentation and/or other materials provided with the distribution. -+ * Neither the name of the copyright holder nor the -+ names of its contributors may be used to endorse or promote products -+ derived from this software without specific prior written permission. -+ -+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ -+Authors: John Cox, Ben Avison -+*/ -+ -+#include "libavutil/arm/asm.S" -+#include "neon.S" -+ -+@ Planar intra pred (8.4.4.2.4) -+@ -+@ predSamples[ x ][ y ] = -+@ ( ( nTbS - 1 - x ) * p[ -1 ][ y ] + -+@ ( x + 1 ) * p[ nTbS ][ -1 ] + -+@ ( nTbS - 1 - y ) * p[ x ][ -1 ] + -+@ ( y + 1 ) * p[ -1 ][ nTbS ] + nTbS ) >> ( Log2( nTbS ) + 1 ) -+ -+@ All 10-bit functions would work with 9 -+ -+ -+@ ff_hevc_rpi_pred_planar_8_neon_8 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride) [r3] -+ -+function ff_hevc_rpi_pred_planar_4_neon_8, export=1 -+ -+ vld1.8 {d0}, [r1] @ Top -+ adr ip, nb_3_0_1_4 -+ vld1.8 {d1}, [r2] @ Left -+ vmov.i64 d2, #0xffffffff -+ vldr d3, [ip, #8] @ {1,2,3,4,1,2,3,4} -+ add r1, r0, r3 -+ vdup.32 d4, d0[0] @ {t0,t1,t2,t3,t0,t1,t2,t3} -+ vdup.8 d0, d0[4] @ {t4,t4,t4,t4,t4,t4,t4,t4} -+ vdup.8 d5, d1[4] @ {l4,l4,l4,l4,l4,l4,l4,l4} -+ vdup.8 d6, d1[0] @ {l0,l0,l0,l0,l0,l0,l0,l0} -+ vshll.u8 q8, d4, #2 -+ lsl r3, #1 -+ vsubl.u8 q2, d5, d4 -+ vmlal.u8 q8, d0, d3 -+ vld1.8 {d0}, [ip] @ {3,2,1,0,3,2,1,0} -+ vdup.8 d7, d1[1] @ {l1,l1,l1,l1,l1,l1,l1,l1} -+ vshl.s16 q9, q2, #1 -+ vbif d6, d7, d2 @ {l0,l0,l0,l0,l1,l1,l1,l1} -+ vadd.i16 d16, d4 -+ vdup.8 d7, d1[2] @ {l2,l2,l2,l2,l2,l2,l2,l2} -+ vadd.i16 d17, d18 -+ vdup.8 d1, d1[3] @ {l3,l3,l3,l3,l3,l3,l3,l3} -+ vadd.i16 q2, q8, q9 -+ vmlal.u8 q8, d0, d6 -+ vbif d7, d1, d2 @ {l2,l2,l2,l2,l3,l3,l3,l3} -+ vmlal.u8 q2, d0, d7 -+ vrshrn.i16 d0, q8, #3 -+ vst1.32 d0[0], [r0 :32], r3 -+ vst1.32 d0[1], [r1 :32], r3 -+ vrshrn.i16 d0, q2, #3 -+ vst1.32 d0[0], [r0 :32] -+ vst1.32 d0[1], [r1 :32] -+ -+ bx lr -+endfunc -+ -+ -+@ ff_hevc_rpi_pred_planar_4_neon_10 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride) [r3] -+ -+function ff_hevc_rpi_pred_planar_4_neon_10, export=1 -+ @ Load from bytes & expand later - at the very least this uses less -+ @ memory than having a short table -+ vld1.16 {q0}, [r1 :64] @ Top -+ adr ip, nbh_3_0_1_4 -+ vldr d2, [r2, #8] @ Left (lower) -+ vldr d3, [ip, #8] @ {1,2,3,4} -+T lsl r3, #1 -+ vshl.s16 d4, d0, #2 -+ vdup.16 d1, d1[0] @ {t4,t4,t4,t4} -+ vldr d5, [r2] @ Left (upper) -+ vdup.16 d2, d2[0] @ {l4,l4,l4,l4} -+ vldr d6, [ip] @ {3,2,1,0} -+ vmla.i16 d4, d3, d1 @ Acc set up -+ vsub.i16 d0, d2, d0 @ Add set up -+ vmov d7, d6 -+ vdup.16 d2, d5[0] -+ vdup.16 d3, d5[1] -+ vdup.16 d16, d5[2] -+ vadd.i16 d18, d0, d4 -+ vshl.s16 d0, #1 @ x2 -+ vadd.i16 d19, d0, d4 -+ vdup.16 d17, d5[3] -+ vadd.i16 d4, d0, d18 -+A add r1, r0, r3, lsl #1 -+T add r1, r0, r3 -+ vadd.i16 d5, d0, d19 -+A lsl r3, #2 -+T lsl r3, #1 -+ vmla.i16 q9, q1, q3 -+ vmla.i16 q2, q8, q3 -+ vrshr.u16 q0, q9, #3 -+ vst1.16 {d0}, [r0], r3 -+ vrshr.u16 d2, d4, #3 -+ vst1.16 {d1}, [r1], r3 -+ vrshr.u16 d3, d5, #3 -+ vst1.16 {d2}, [r0] -+ vst1.16 {d3}, [r1] -+ -+ bx lr -+endfunc -+ -+ -+@ ff_hevc_rpi_pred_planar_8_neon_8 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride) [r3] -+ -+function ff_hevc_rpi_pred_planar_8_neon_8, export=1 -+ -+ vld1.8 {q0}, [r1] @ Top -+ adr ip, nb_7_0_1_8 -+ vldr d2, [r2, #8] @ Left (lower) -+ mov r1, #8 -+ vldr d3, [ip, #8] @ {1,2,3,4,5,6,7,8} -+ vshll.u8 q2, d0, #3 -+ vdup.8 d1, d1[0] @ {t8,t8,t8,t8,t8,t8,t8,t8} -+ vdup.8 d2, d2[0] @ {l8,l8,l8,l8,l8,l8,l8,l8} -+ vldr d6, [r2] @ Left (upper) -+ vmlal.u8 q2, d3, d1 -+ vsubl.u8 q0, d2, d0 -+ vldr d7, [ip] @ {7,6,5,4,3,2,1,0} -+ -+@ u8 7..0 [1] d7 -+@ u8 left[y] [1] d6 -+@ u16 acc [2] q2 (even rows) or q8 (odd rows) = (x+1)*p[nTbS][-1] + 32*p[x][-1] initially -+@ u16 add [2] q0 = p[-1][nTbs] - p[x][-1] -+ -+ vdup.8 d2, d6[0] -+ vadd.i16 q2, q0 -+ vdup.8 d3, d6[1] -+ vadd.i16 q8, q2, q0 -+1: -+ vmlal.u8 q2, d7, d2 -+ subs r1, #2 -+ vadd.i16 q9, q8, q0 -+ vmlal.u8 q8, d7, d3 -+ vdup.8 d2, d6[2] -+ vdup.8 d3, d6[3] -+ vrshrn.i16 d20, q2, #4 -+ vshr.u64 d6, #16 -+ vmov q2, q9 -+ vst1.8 {d20}, [r0], r3 -+ vrshrn.i16 d20, q8, #4 -+ vadd.i16 q8, q2, q0 -+ vst1.8 {d20}, [r0], r3 -+ bne 1b -+ -+ bx lr -+ -+endfunc -+ -+ -+@ ff_hevc_rpi_pred_planar_8_neon_10 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride) [r3] -+ -+function ff_hevc_rpi_pred_planar_8_neon_10, export=1 -+ -+ adr ip, nb_7_0_1_8 -+ vld1.16 {q0}, [r1 :128]! @ Top (left) -+ lsl r3, #1 -+ vld1.16 {q1}, [ip :128] @ {7,6,5,4,3,2,1,0,1,2,3,4,5,6,7,8} -+ add ip, r2, #16 -+ vld1.16 {d4[],d5[]}, [r1] @ Top (right) -+ mov r1, #8-2 -+ vshl.s16 q3, q0, #3 -+ vmovl.u8 q8, d3 @ {1,2,3,4,5,6,7,8} -+ vld1.16 {d18[],d19[]}, [ip] @ Left (lower) -+ vmla.i16 q3, q8, q2 @ Acc set up -+ vsub.i16 q0, q9, q0 @ Add set up -+ vmovl.u8 q1, d2 @ {7,6,5,4,3,2,1,0} -+ vadd.i16 q2, q3, q0 -+ -+@ u16 7..0 [1] q1 -+@ u32 left[y] [1] [r2] -+@ u16 acc [1] q3 = (x+1)*p[nTbS][-1] + 32*p[x][-1] initially -+@ u16 add [1] q0 = p[-1][nTbs] - p[x][-1] -+ -+ vld1.16 {d6[],d7[]}, [r2]! -+ vadd.i16 q8, q2, q0 -+ vld1.16 {d18[],d19[]}, [r2]! -+ vmla.i16 q2, q1, q3 -+ vadd.i16 q3, q8, q0 -+ vmla.i16 q8, q1, q9 -+1: -+ vrshr.u16 q9, q2, #4 -+ subs r1, #2 -+ vmov q2, q3 -+ vrshr.u16 q10, q8, #4 -+ vld1.16 {d6[],d7[]}, [r2]! -+ vst1.16 {q9}, [r0 :128], r3 -+ vadd.i16 q8, q2, q0 -+ vld1.16 {d18[],d19[]}, [r2]! -+ vmla.i16 q2, q1, q3 -+ vadd.i16 q3, q8, q0 -+ vmla.i16 q8, q1, q9 -+ vst1.16 {q10}, [r0 :128], r3 -+ bne 1b -+ -+ vrshr.u16 q9, q2, #4 -+ add r3, r0 -+ vrshr.u16 q10, q8, #4 -+ vst1.16 {q9}, [r0 :128] -+ vst1.16 {q10}, [r3 :128] -+ -+ bx lr -+endfunc -+ -+ -+@------------------------------------------------------------------------------ -+@ -+@ Data - has to be in two lumps to ensure we can always reach using adr -+ -+ .balign 64 -+ -+nb_31_0_1_32: -+ .byte 31, 30, 29, 28, 27, 26, 25, 24 -+ .byte 23, 22, 21, 20, 19, 18, 17, 16 -+nb_15_0_1_16: -+ .byte 15, 14, 13, 12, 11, 10, 9, 8 -+ .byte 7, 6, 5, 4, 3, 2, 1, 0 -+ .byte 1, 2, 3, 4, 5, 6, 7, 8 -+ .byte 9, 10, 11, 12, 13, 14, 15, 16 -+ .byte 17, 18, 19, 20, 21, 22, 23, 24 -+ .byte 25, 26, 27, 28, 29, 30, 31, 32 -+ -+ @ should be back on a 64-byte boundary here -+ -+ @ These could be extracted from the above array, but separate out -+ @ out for better (16 byte) alignment -+nb_3_0_1_4: -+ .byte 3, 2, 1, 0, 3, 2, 1, 0 -+ .byte 1, 2, 3, 4, 1, 2, 3, 4 -+nb_7_0_1_8: -+ .byte 7, 6, 5, 4, 3, 2, 1, 0 -+ .byte 1, 2, 3, 4, 5, 6, 7, 8 -+nbh_3_0_1_4: -+ .short 3, 2, 1, 0, 1, 2, 3, 4 -+ -+@------------------------------------------------------------------------------ -+ -+ -+@ ff_hevc_rpi_pred_planar_16_neon_8 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride) [r3] -+ -+function ff_hevc_rpi_pred_planar_16_neon_8, export=1 -+ -+ adr ip, nb_15_0_1_16 + 16 -+ vld1.8 {q0}, [r1 :128]! @ Top (left) -+ add r2, #16 -+ vld1.8 {q1}, [ip: 128] @ {1,2,3...16} -+ vld1.8 {d4[]}, [r1] @ Top (right) -+ sub ip, #16 -+ vshll.u8 q3, d0, #4 -+ mov r1, #16 -+ vshll.u8 q8, d1, #4 -+ vld1.8 {d5[]}, [r2] @ Left (lower) -+ sub r2, #16 -+ vmlal.u8 q3, d2, d4 -+ vmlal.u8 q8, d3, d4 @ Acc set up -+ vsubl.u8 q1, d5, d0 -+ vsubl.u8 q0, d5, d1 @ Add set up -+ vld1.8 {q2}, [ip :128] @ {15,14,13...0} -+ -+@ u8 15..0 [1] q2 -+@ u8 left[y] [1] [r2] -+@ u16 acc [2] q3,q8 = (x+1)*p[nTbS][-1] + 32*p[x][-1] initially -+@ u16 add [2] q1,q0 = p[-1][nTbs] - p[x][-1] -+ -+ vadd.i16 q3, q1 -+ vadd.i16 q8, q0 -+1: -+ vadd.i16 q10, q3, q1 -+ subs r1, #2 -+ vld1.8 {d18[]}, [r2]! -+ vadd.i16 q11, q8, q0 -+ vld1.8 {d19[]}, [r2]! -+ vmlal.u8 q3, d4, d18 -+ vmlal.u8 q8, d5, d18 -+ vadd.i16 q12, q10, q1 -+ vmlal.u8 q10, d4, d19 -+ vadd.i16 q13, q11, q0 -+ vmlal.u8 q11, d5, d19 -+ vrshrn.u16 d18, q3, #5 -+ vrshrn.u16 d19, q8, #5 -+ vmov q3, q12 -+ vst1.8 {q9}, [r0 :128], r3 -+ vrshrn.u16 d18, q10, #5 -+ vrshrn.u16 d19, q11, #5 -+ vmov q8, q13 -+ vst1.8 {q9}, [r0 :128], r3 -+ bne 1b -+ -+ bx lr -+ -+endfunc -+ -+ -+@ ff_hevc_rpi_pred_planar_16_neon_10 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride) [r3] -+ -+function ff_hevc_rpi_pred_planar_16_neon_10, export=1 -+ -+ @ Load from bytes & expand later - at the very least this uses less -+ @ memory than having a short table -+ adr ip, nb_15_0_1_16 + 16 -+ vld1.16 {q0-q1}, [r1 :128]! @ Top (left) -+ add r2, #32 -+ vld1.8 {q2}, [ip :128] @ {1,2,3...16} -+ lsl r3, #1 -+ vld1.16 {d6[],d7[]}, [r1] @ Top (right) -+ sub ip, #16 -+ vmovl.u8 q8, d4 -+ mov r1, #16 -+ vshl.i16 q9, q0, #4 -+ vmovl.u8 q2, d5 -+ vshl.i16 q10, q1, #4 -+ vld1.16 {d22[],d23[]}, [r2] @ Left (lower) -+ sub r2, #32 -+ vld1.8 {q12}, [ip] @ {15,14,13...0} -+ vmla.i16 q9, q8, q3 -+ vmla.i16 q10, q2, q3 @ Acc set up -+ vsub.i16 q0, q11, q0 -+ vsub.i16 q1, q11, q1 @ Add set up -+ vadd.i16 q2, q9, q0 -+ vadd.i16 q3, q10, q1 -+ vmovl.u8 q8, d24 -+ vmovl.u8 q9, d25 -+ -+@ u16 15..0 [2] q8,q9 -+@ u32 left[y] [2] [r2] -+@ u16 acc [2] q2,q3 = (x+1)*p[nTbS][-1] + 32*p[x][-1] initially -+@ u16 add [2] q0,q1 = p[-1][nTbs] - p[x][-1] -+ -+1: -+ vadd.i16 q10, q2, q0 -+ subs r1, #2 -+ vld1.16 {d24[],d25[]}, [r2]! -+ vadd.i16 q11, q3, q1 -+ vld1.16 {d28[],d29[]}, [r2]! -+ vmla.i16 q2, q8, q12 -+ vmla.i16 q3, q9, q12 -+ vadd.i16 q12, q10, q0 -+ vmla.i16 q10, q8, q14 -+ vadd.i16 q13, q11, q1 -+ vmla.i16 q11, q9, q14 -+ vrshr.u16 q14, q2, #5 -+ vrshr.u16 q15, q3, #5 -+ vmov q2, q12 -+ vst1.16 {q14-q15}, [r0 :128], r3 -+ vrshr.u16 q14, q10, #5 -+ vrshr.u16 q15, q11, #5 -+ vmov q3, q13 -+ vst1.16 {q14-q15}, [r0 :128], r3 -+ bne 1b -+ -+ bx lr -+endfunc -+ -+ -+@ ff_hevc_rpi_pred_planar_32_neon_8 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride) [r3] -+ -+function ff_hevc_rpi_pred_planar_32_neon_8, export=1 -+ -+ vld1.8 {q0-q1}, [r1 :128]! @ Top (left) -+ adr ip, nb_31_0_1_32 + 32 -+ vpush {d8-d12} -+ vld1.8 {q2-q3}, [ip :128] @ {1,2,3...32} -+ add r2, #32 -+ vld1.8 {d8[]}, [r1] @ Top (right) -+ sub ip, #32 -+ vshll.u8 q8, d0, #5 -+ mov r1, #32 -+ vld1.8 {d9[]}, [r2] @ Left (lower) -+ sub r2, #32 -+ vshll.u8 q9, d1, #5 -+ vshll.u8 q10, d2, #5 -+ vshll.u8 q11, d3, #5 -+ vmlal.u8 q8, d4, d8 -+ vsubl.u8 q12, d9, d0 -+ vmlal.u8 q9, d5, d8 -+ vsubl.u8 q13, d9, d1 -+ vmlal.u8 q10, d6, d8 -+ vsubl.u8 q14, d9, d2 -+ vmlal.u8 q11, d7, d8 @ Acc set up -+ vsubl.u8 q15, d9, d3 @ Add set up -+ vadd.i16 q8, q12 -+ vadd.i16 q9, q13 -+ vadd.i16 q10, q14 -+ vadd.i16 q11, q15 -+ vld1.8 {q4-q5}, [ip :128] @ {31,30,29...0} -+ -+@ u8 31..0 [2] q4,q5 -+@ u8 left[y] [2] [r2] -+@ u16 acc [4] q8-q11 = (x+1)*p[nTbS][-1] + 32*p[x][-1] initially -+@ u16 add [4] q12-q15 = p[-1][nTbs] - p[x][-1] -+ -+ vld1.8 {d12[]}, [r2]! -+ vadd.i16 q0, q8, q12 -+ b 2f -+1: -+ vld1.8 {d12[]}, [r2]! -+ vrshrn.u16 d3, q1, #6 -+ vrshrn.u16 d2, q0, #6 -+ vadd.i16 q0, q8, q12 -+ vrshrn.u16 d4, q2, #6 -+ vrshrn.u16 d5, q3, #6 -+ vst1.8 {q1-q2}, [r0 :128], r3 -+2: vadd.i16 q1, q9, q13 -+ subs r1, #2 -+ vadd.i16 q2, q10, q14 -+ vadd.i16 q3, q11, q15 -+ vmlal.u8 q8, d8, d12 -+ vmlal.u8 q9, d9, d12 -+ vmlal.u8 q10, d10, d12 -+ vmlal.u8 q11, d11, d12 -+ vld1.8 {d12[]}, [r2]! -+ vrshrn.u16 d19, q9, #6 -+ vrshrn.u16 d18, q8, #6 -+ vadd.i16 q8, q0, q12 -+ vrshrn.u16 d20, q10, #6 -+ vrshrn.u16 d21, q11, #6 -+ vst1.8 {q9-q10}, [r0 :128], r3 -+ vadd.i16 q9, q1, q13 -+ vadd.i16 q10, q2, q14 -+ vadd.i16 q11, q3, q15 -+ vmlal.u8 q0, d8, d12 -+ vmlal.u8 q1, d9, d12 -+ vmlal.u8 q2, d10, d12 -+ vmlal.u8 q3, d11, d12 -+ -+ bne 1b -+ -+ vpop {d8-d12} -+ -+ vrshrn.u16 d3, q1, #6 -+ vrshrn.u16 d2, q0, #6 -+ vrshrn.u16 d4, q2, #6 -+ vrshrn.u16 d5, q3, #6 -+ vst1.8 {q1-q2}, [r0 :128] -+ -+ bx lr -+ -+endfunc -+ -+ -+@ ff_hevc_rpi_pred_planar_32_neon_10 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride) [r3] -+ -+function ff_hevc_rpi_pred_planar_32_neon_10, export=1 -+ -+ @ Load from bytes & expand later - at the very least this uses less -+ @ memory than having a short table -+ vld1.16 {q0-q1}, [r1 :128]! @ Top (left) -+ adr ip, nb_31_0_1_32 + 32 -+ vpush {q4-q7} -+ vld1.16 {q2-q3}, [r1 :128]! @ Top (centre) -+ add r2, #64 -+ vld1.8 {q14-q15}, [ip :128] @ {1,2,3...32} -+T lsl r3, #1 -+ vld1.16 {d8[],d9[]}, [r1] @ Top (right) -+ sub ip, #32 -+ vmovl.u8 q12, d28 -+ mov r1, #32 -+ vmovl.u8 q13, d29 -+ vld1.8 {q6-q7}, [ip :128] @ {31,30,29...0} -+ vmovl.u8 q14, d30 -+ vmovl.u8 q15, d31 -+ vld1.16 {d10[],d11[]}, [r2] @ Left (lower) -+ sub r2, #64 -+ vshl.i16 q8, q0, #5 -+ vshl.i16 q9, q1, #5 -+ vshl.i16 q10, q2, #5 -+ vshl.i16 q11, q3, #5 -+ vmla.i16 q8, q12, q4 -+ vsub.i16 q0, q5, q0 -+ vmla.i16 q9, q13, q4 -+ vsub.i16 q1, q5, q1 -+ vmla.i16 q10, q14, q4 -+ vmov.u16 ip, d0[0] -+ vsub.i16 q2, q5, q2 -+ vmla.i16 q11, q15, q4 @ Acc set up -+ vsub.i16 q3, q5, q3 @ Add set up -+ vadd.i16 q8, q0 -+ vadd.i16 q9, q1 -+ vadd.i16 q10, q2 -+ vadd.i16 q11, q3 -+ vmovl.u8 q4, d12 -+ vmovl.u8 q5, d13 -+ vmovl.u8 q6, d14 -+ vmovl.u8 q7, d15 -+ -+@ u16 31..0 [4] q4-q7 -+@ u16 left[y] [4] [r2] -+@ u16 acc [4] q8-q11 = (x+1)*p[nTbS][-1] + 32*p[x][-1] initially -+@ u16 add [4] q0-q3 = p[-1][nTbs] - p[x][-1] -+ -+ vadd.i16 q12, q8, q0 -+A sub r0, r0, r3, lsl #1 -+T sub r0, r3 -+1: -+ vld1.16 {d0[0]}, [r2]! -+A add r0, r0, r3, lsl #1 -+T add r0, r3 -+ vadd.i16 q13, q9, q1 -+ subs r1, #2 -+ vadd.i16 q14, q10, q2 -+ vadd.i16 q15, q11, q3 -+ vmla.i16 q8, q4, d0[0] -+ vmla.i16 q9, q5, d0[0] -+ vmla.i16 q10, q6, d0[0] -+ vmla.i16 q11, q7, d0[0] -+ vmov.16 d0[0], ip -+ vrshr.u16 q8, #6 -+ vrshr.u16 q9, #6 -+ vrshr.u16 q10, #6 -+ vrshr.u16 q11, #6 -+ vstm r0, {q8-q11} -+ vadd.i16 q8, q12, q0 -+A add r0, r0, r3, lsl #1 -+T add r0, r3 -+ vld1.16 {d0[0]}, [r2]! -+ vadd.i16 q9, q13, q1 -+ vadd.i16 q10, q14, q2 -+ vadd.i16 q11, q15, q3 -+ vmla.i16 q12, q4, d0[0] -+ vmla.i16 q13, q5, d0[0] -+ vmla.i16 q14, q6, d0[0] -+ vmla.i16 q15, q7, d0[0] -+ vmov.16 d0[0], ip -+ vrshr.u16 q12, #6 -+ vrshr.u16 q13, #6 -+ vrshr.u16 q14, #6 -+ vrshr.u16 q15, #6 -+ vstm r0, {q12-q15} -+ vadd.i16 q12, q8, q0 -+ bne 1b -+ -+ vpop {q4-q7} -+ bx lr -+ -+endfunc -+ -+ -+@ ff_hevc_rpi_pred_planar_c_4_neon_8 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride) [r3] -+ -+function ff_hevc_rpi_pred_planar_c_4_neon_8, export=1 -+ -+ vld1.8 {q0}, [r1] @ Top -+ adr ip, nbx2_3_0_1_4 -+ vldr d2, [r2, #8] @ Left (lower) -+ mov r1, #4 -+ vldr d3, [ip, #8] @ {1,1,2,2,3,3,4,4} -+ lsl r3, #1 -+ vshll.u8 q2, d0, #2 -+ vdup.16 d1, d1[0] @ {t4,t4,t4,t4,t4,t4,t4,t4} -+ vdup.16 d2, d2[0] @ {l4,l4,l4,l4,l4,l4,l4,l4} -+ vldr d6, [r2] @ Left (upper) -+ vmlal.u8 q2, d3, d1 -+ vsubl.u8 q0, d2, d0 -+ vldr d7, [ip] @ {3,3,2,2,1,1,0,0} -+ -+@ u8 3..0 [1] d7 -+@ u8 left[y] [1] d6 -+@ u16 acc [2] q2 (even rows) or q8 (odd rows) = (x+1)*p[nTbS][-1] + 32*p[x][-1] initially -+@ u16 add [2] q0 = p[-1][nTbs] - p[x][-1] -+ -+ vdup.16 d2, d6[0] -+ vadd.i16 q2, q0 -+ vdup.16 d3, d6[1] -+ vadd.i16 q8, q2, q0 -+1: -+ vmlal.u8 q2, d7, d2 -+ subs r1, #2 -+ vadd.i16 q9, q8, q0 -+ vmlal.u8 q8, d7, d3 -+ vdup.16 d2, d6[2] -+ vdup.16 d3, d6[3] -+ vrshrn.i16 d20, q2, #3 -+ vmov q2, q9 -+ vst1.8 {d20}, [r0], r3 -+ vrshrn.i16 d20, q8, #3 -+ vadd.i16 q8, q2, q0 -+ vst1.8 {d20}, [r0], r3 -+ bne 1b -+ -+ bx lr -+ -+endfunc -+ -+ -+@ ff_hevc_rpi_pred_planar_c_4_neon_10 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride) [r3] -+ -+function ff_hevc_rpi_pred_planar_c_4_neon_10, export=1 -+ -+ adr ip, nbx2_3_0_1_4 -+ vld1.16 {q0}, [r1 :128]! @ Top (left) -+ lsl r3, #2 -+ vld1.16 {q1}, [ip :128] @ {3,3,2,2,1,1,0,0,1,1,2,2,3,3,4,4} -+ add ip, r2, #16 -+ vld1.32 {d4[],d5[]}, [r1] @ Top (right) -+ vshl.s16 q3, q0, #2 -+ vmovl.u8 q8, d3 @ {1,1,2,2,3,3,4,4} -+ vld1.32 {d18[],d19[]}, [ip] @ Left (lower) -+ vmla.i16 q3, q8, q2 @ Acc set up -+ vsub.i16 q0, q9, q0 @ Add set up -+ vmovl.u8 q1, d2 @ {3,3,2,2,1,1,0,0} -+ vadd.i16 q2, q3, q0 -+ -+@ u16 3..0 [1] q1 -+@ u32 left[y] [1] [r2] -+@ u16 acc [1] q3 = (x+1)*p[nTbS][-1] + 32*p[x][-1] initially -+@ u16 add [1] q0 = p[-1][nTbs] - p[x][-1] -+ -+ vld1.32 {d6[],d7[]}, [r2]! -+ vadd.i16 q8, q2, q0 -+ vld1.32 {d18[],d19[]}, [r2]! -+ vmla.i16 q2, q1, q3 -+ vadd.i16 q3, q8, q0 -+ vmla.i16 q8, q1, q9 -+ -+ vrshr.u16 q9, q2, #3 -+ vmov q2, q3 -+ vrshr.u16 q10, q8, #3 -+ vld1.32 {d6[],d7[]}, [r2]! -+ vst1.16 {q9}, [r0 :128], r3 -+ vadd.i16 q8, q2, q0 -+ vld1.32 {d18[],d19[]}, [r2]! -+ vmla.i16 q2, q1, q3 -+ vadd.i16 q3, q8, q0 -+ vmla.i16 q8, q1, q9 -+ vst1.16 {q10}, [r0 :128], r3 -+ -+ vrshr.u16 q9, q2, #3 -+ add r3, r0 -+ vrshr.u16 q10, q8, #3 -+ vst1.16 {q9}, [r0 :128] -+ vst1.16 {q10}, [r3 :128] -+ -+ bx lr -+endfunc -+ -+ -+@ ff_hevc_rpi_pred_planar_c_8_neon_8 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride) [r3] -+ -+function ff_hevc_rpi_pred_planar_c_8_neon_8, export=1 -+ -+ adr ip, nbx2_7_0_1_8 + 16 -+ vld1.8 {q0}, [r1 :128]! @ Top (left) -+ add r2, #16 -+ vld1.8 {q1}, [ip: 128] @ {1,1,2,2,3,3...8,8} -+ lsl r3, #1 -+ vld1.16 {d4[]}, [r1] @ Top (right) -+ sub ip, #16 -+ vshll.u8 q3, d0, #3 -+ mov r1, #8 -+ vshll.u8 q8, d1, #3 -+ vld1.16 {d5[]}, [r2] @ Left (lower) -+ sub r2, #16 -+ vmlal.u8 q3, d2, d4 -+ vmlal.u8 q8, d3, d4 @ Acc set up -+ vsubl.u8 q1, d5, d0 -+ vsubl.u8 q0, d5, d1 @ Add set up -+ vld1.8 {q2}, [ip :128] @ {7,7,6,6,5,5...0,0} -+ -+@ u8 7..0 [1] q2 -+@ u8 left[y] [1] [r2] -+@ u16 acc [2] q3,q8 = (x+1)*p[nTbS][-1] + 32*p[x][-1] initially -+@ u16 add [2] q1,q0 = p[-1][nTbs] - p[x][-1] -+ -+ vadd.i16 q3, q1 -+ vadd.i16 q8, q0 -+1: -+ vadd.i16 q10, q3, q1 -+ subs r1, #2 -+ vld1.16 {d18[]}, [r2]! -+ vadd.i16 q11, q8, q0 -+ vld1.16 {d19[]}, [r2]! -+ vmlal.u8 q3, d4, d18 -+ vmlal.u8 q8, d5, d18 -+ vadd.i16 q12, q10, q1 -+ vmlal.u8 q10, d4, d19 -+ vadd.i16 q13, q11, q0 -+ vmlal.u8 q11, d5, d19 -+ vrshrn.u16 d18, q3, #4 -+ vrshrn.u16 d19, q8, #4 -+ vmov q3, q12 -+ vst1.8 {q9}, [r0 :128], r3 -+ vrshrn.u16 d18, q10, #4 -+ vrshrn.u16 d19, q11, #4 -+ vmov q8, q13 -+ vst1.8 {q9}, [r0 :128], r3 -+ bne 1b -+ -+ bx lr -+ -+endfunc -+ -+ -+@------------------------------------------------------------------------------ -+@ -+@ Data - has to be in two lumps to ensure we can always reach using adr -+ -+ .balign 64 -+ -+nbx2_15_0_1_16: -+ .byte 15, 15, 14, 14, 13, 13, 12, 12 -+ .byte 11, 11, 10, 10, 9, 9, 8, 8 -+nbx2_7_0_1_8: -+ .byte 7, 7, 6, 6, 5, 5, 4, 4 -+ .byte 3, 3, 2, 2, 1, 1, 0, 0 -+ .byte 1, 1, 2, 2, 3, 3, 4, 4 -+ .byte 5, 5, 6, 6, 7, 7, 8, 8 -+ .byte 9, 9, 10, 10, 11, 11, 12, 12 -+ .byte 13, 13, 14, 14, 15, 15, 16, 16 -+ -+ @ should be back on a 64-byte boundary here -+ -+nbx2_3_0_1_4: -+ .byte 3, 3, 2, 2, 1, 1, 0, 0 -+ .byte 1, 1, 2, 2, 3, 3, 4, 4 -+ -+@------------------------------------------------------------------------------ -+ -+ -+@ ff_hevc_rpi_pred_planar_c_8_neon_10 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride) [r3] -+ -+function ff_hevc_rpi_pred_planar_c_8_neon_10, export=1 -+ -+ @ Load from bytes & expand later - at the very least this uses less -+ @ memory than having a short table -+ adr ip, nbx2_7_0_1_8 + 16 -+ vld1.16 {q0-q1}, [r1 :128]! @ Top (left) -+ add r2, #32 -+ vld1.8 {q2}, [ip :128] @ {1,1,2,2,3,3...8,8} -+ lsl r3, #2 -+ vld1.32 {d6[],d7[]}, [r1] @ Top (right) -+ sub ip, #16 -+ vmovl.u8 q8, d4 -+ mov r1, #8 -+ vshl.i16 q9, q0, #3 -+ vmovl.u8 q2, d5 -+ vshl.i16 q10, q1, #3 -+ vld1.32 {d22[],d23[]}, [r2] @ Left (lower) -+ sub r2, #32 -+ vld1.8 {q12}, [ip] @ {7,7,6,6,5,5...0,0} -+ vmla.i16 q9, q8, q3 -+ vmla.i16 q10, q2, q3 @ Acc set up -+ vsub.i16 q0, q11, q0 -+ vsub.i16 q1, q11, q1 @ Add set up -+ vadd.i16 q2, q9, q0 -+ vadd.i16 q3, q10, q1 -+ vmovl.u8 q8, d24 -+ vmovl.u8 q9, d25 -+ -+@ u16 7..0 [2] q8,q9 -+@ u32 left[y] [2] [r2] -+@ u16 acc [2] q2,q3 = (x+1)*p[nTbS][-1] + 32*p[x][-1] initially -+@ u16 add [2] q0,q1 = p[-1][nTbs] - p[x][-1] -+ -+1: -+ vadd.i16 q10, q2, q0 -+ subs r1, #2 -+ vld1.32 {d24[],d25[]}, [r2]! -+ vadd.i16 q11, q3, q1 -+ vld1.32 {d28[],d29[]}, [r2]! -+ vmla.i16 q2, q8, q12 -+ vmla.i16 q3, q9, q12 -+ vadd.i16 q12, q10, q0 -+ vmla.i16 q10, q8, q14 -+ vadd.i16 q13, q11, q1 -+ vmla.i16 q11, q9, q14 -+ vrshr.u16 q14, q2, #4 -+ vrshr.u16 q15, q3, #4 -+ vmov q2, q12 -+ vst1.16 {q14-q15}, [r0 :128], r3 -+ vrshr.u16 q14, q10, #4 -+ vrshr.u16 q15, q11, #4 -+ vmov q3, q13 -+ vst1.16 {q14-q15}, [r0 :128], r3 -+ bne 1b -+ -+ bx lr -+endfunc -+ -+ -+@ ff_hevc_rpi_pred_planar_c_16_neon_8 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride) [r3] -+ -+function ff_hevc_rpi_pred_planar_c_16_neon_8, export=1 -+ -+ vld1.8 {q0-q1}, [r1 :128]! @ Top (left) -+ adr ip, nbx2_15_0_1_16 + 32 -+ vpush {d8-d12} -+ vld1.8 {q2-q3}, [ip :128] @ {1,1,2,2,3,3...16,16} -+ add r2, #32 -+ vld1.16 {d8[]}, [r1] @ Top (right) -+ sub ip, #32 -+ vshll.u8 q8, d0, #4 -+ mov r1, #16 -+ vld1.16 {d9[]}, [r2] @ Left (lower) -+ sub r2, #32 -+ vshll.u8 q9, d1, #4 -+ lsl r3, #1 -+ vshll.u8 q10, d2, #4 -+ vshll.u8 q11, d3, #4 -+ vmlal.u8 q8, d4, d8 -+ vsubl.u8 q12, d9, d0 -+ vmlal.u8 q9, d5, d8 -+ vsubl.u8 q13, d9, d1 -+ vmlal.u8 q10, d6, d8 -+ vsubl.u8 q14, d9, d2 -+ vmlal.u8 q11, d7, d8 @ Acc set up -+ vsubl.u8 q15, d9, d3 @ Add set up -+ vadd.i16 q8, q12 -+ vadd.i16 q9, q13 -+ vadd.i16 q10, q14 -+ vadd.i16 q11, q15 -+ vld1.8 {q4-q5}, [ip :128] @ {15,15,14,14,13,13...0,0} -+ -+@ u8 15..0 [2] q4,q5 -+@ u8 left[y] [2] [r2] -+@ u16 acc [4] q8-q11 = (x+1)*p[nTbS][-1] + 32*p[x][-1] initially -+@ u16 add [4] q12-q15 = p[-1][nTbs] - p[x][-1] -+ -+ vld1.16 {d12[]}, [r2]! -+ vadd.i16 q0, q8, q12 -+ b 2f -+1: -+ vld1.16 {d12[]}, [r2]! -+ vrshrn.u16 d3, q1, #5 -+ vrshrn.u16 d2, q0, #5 -+ vadd.i16 q0, q8, q12 -+ vrshrn.u16 d4, q2, #5 -+ vrshrn.u16 d5, q3, #5 -+ vst1.8 {q1-q2}, [r0 :128], r3 -+2: vadd.i16 q1, q9, q13 -+ subs r1, #2 -+ vadd.i16 q2, q10, q14 -+ vadd.i16 q3, q11, q15 -+ vmlal.u8 q8, d8, d12 -+ vmlal.u8 q9, d9, d12 -+ vmlal.u8 q10, d10, d12 -+ vmlal.u8 q11, d11, d12 -+ vld1.16 {d12[]}, [r2]! -+ vrshrn.u16 d19, q9, #5 -+ vrshrn.u16 d18, q8, #5 -+ vadd.i16 q8, q0, q12 -+ vrshrn.u16 d20, q10, #5 -+ vrshrn.u16 d21, q11, #5 -+ vst1.8 {q9-q10}, [r0 :128], r3 -+ vadd.i16 q9, q1, q13 -+ vadd.i16 q10, q2, q14 -+ vadd.i16 q11, q3, q15 -+ vmlal.u8 q0, d8, d12 -+ vmlal.u8 q1, d9, d12 -+ vmlal.u8 q2, d10, d12 -+ vmlal.u8 q3, d11, d12 -+ -+ bne 1b -+ -+ vpop {d8-d12} -+ -+ vrshrn.u16 d3, q1, #5 -+ vrshrn.u16 d2, q0, #5 -+ vrshrn.u16 d4, q2, #5 -+ vrshrn.u16 d5, q3, #5 -+ vst1.8 {q1-q2}, [r0 :128] -+ -+ bx lr -+ -+endfunc -+ -+ -+@ ff_hevc_rpi_pred_planar_c_16_neon_10 -+@ uint8_t *_src, [r0] -+@ const uint8_t *_top, [r1] -+@ const uint8_t *_left, [r2] -+@ ptrdiff_t stride) [r3] -+ -+function ff_hevc_rpi_pred_planar_c_16_neon_10, export=1 -+ -+ @ Load from bytes & expand later - at the very least this uses less -+ @ memory than having a short table -+ vld1.16 {q0-q1}, [r1 :128]! @ Top (left) -+ adr ip, nbx2_15_0_1_16 + 32 -+ vpush {q4-q7} -+ vld1.16 {q2-q3}, [r1 :128]! @ Top (centre) -+ add r2, #64 -+ vld1.8 {q14-q15}, [ip :128] @ {1,1,2,2,3,3...16,16} -+T lsl r3, #2 -+ vld1.32 {d8[],d9[]}, [r1] @ Top (right) -+ sub ip, #32 -+ vmovl.u8 q12, d28 -+ mov r1, #16 -+ vmovl.u8 q13, d29 -+ vld1.8 {q6-q7}, [ip :128] @ {15,15,14,14,13,13...0,0} -+ vmovl.u8 q14, d30 -+ vmovl.u8 q15, d31 -+ vld1.32 {d10[],d11[]}, [r2] @ Left (lower) -+ sub r2, #64 -+ vshl.i16 q8, q0, #4 -+ vshl.i16 q9, q1, #4 -+ vshl.i16 q10, q2, #4 -+ vshl.i16 q11, q3, #4 -+ vmla.i16 q8, q12, q4 -+ vsub.i16 q0, q5, q0 -+ vmla.i16 q9, q13, q4 -+ vpush {q0} -+ vsub.i16 q1, q5, q1 -+ vmla.i16 q10, q14, q4 -+ vsub.i16 q2, q5, q2 -+ vmla.i16 q11, q15, q4 @ Acc set up -+ vsub.i16 q3, q5, q3 @ Add set up -+ vadd.i16 q8, q0 -+ vadd.i16 q9, q1 -+ vadd.i16 q10, q2 -+ vadd.i16 q11, q3 -+ vmovl.u8 q4, d12 -+ vmovl.u8 q5, d13 -+ vmovl.u8 q6, d14 -+ vmovl.u8 q7, d15 -+ -+@ u16 31..0 [4] q4-q7 -+@ u16 left[y] [4] [r2] -+@ u16 acc [4] q8-q11 = (x+1)*p[nTbS][-1] + 32*p[x][-1] initially -+@ u16 add [4] q0-q3 = p[-1][nTbs] - p[x][-1] -+ -+ vadd.i16 q12, q8, q0 -+A sub r0, r0, r3, lsl #2 -+T sub r0, r3 -+1: -+ vld1.32 {d0[],d1[]}, [r2]! -+A add r0, r0, r3, lsl #2 -+T add r0, r3 -+ vadd.i16 q13, q9, q1 -+ subs r1, #2 -+ vadd.i16 q14, q10, q2 -+ vadd.i16 q15, q11, q3 -+ vmla.i16 q8, q4, q0 -+ vmla.i16 q9, q5, q0 -+ vmla.i16 q10, q6, q0 -+ vmla.i16 q11, q7, q0 -+ vld1.16 {q0}, [sp] -+ vrshr.u16 q8, #5 -+ vrshr.u16 q9, #5 -+ vrshr.u16 q10, #5 -+ vrshr.u16 q11, #5 -+ vstm r0, {q8-q11} -+ vadd.i16 q8, q12, q0 -+A add r0, r0, r3, lsl #2 -+T add r0, r3 -+ vld1.32 {d0[],d1[]}, [r2]! -+ vadd.i16 q9, q13, q1 -+ vadd.i16 q10, q14, q2 -+ vadd.i16 q11, q15, q3 -+ vmla.i16 q12, q4, q0 -+ vmla.i16 q13, q5, q0 -+ vmla.i16 q14, q6, q0 -+ vmla.i16 q15, q7, q0 -+ vld1.16 {q0}, [sp] -+ vrshr.u16 q12, #5 -+ vrshr.u16 q13, #5 -+ vrshr.u16 q14, #5 -+ vrshr.u16 q15, #5 -+ vstm r0, {q12-q15} -+ vadd.i16 q12, q8, q0 -+ bne 1b -+ -+ vpop {q3-q7} -+ bx lr -+ -+endfunc ---- a/libavcodec/arm/vc1dsp_init_neon.c -+++ b/libavcodec/arm/vc1dsp_init_neon.c -@@ -19,6 +19,7 @@ - #include - - #include "libavutil/attributes.h" -+#include "libavutil/intreadwrite.h" - #include "libavcodec/vc1dsp.h" - #include "vc1dsp.h" - -@@ -32,6 +33,13 @@ void ff_vc1_inv_trans_4x8_dc_neon(uint8_ - void ff_vc1_inv_trans_8x4_dc_neon(uint8_t *dest, ptrdiff_t stride, int16_t *block); - void ff_vc1_inv_trans_4x4_dc_neon(uint8_t *dest, ptrdiff_t stride, int16_t *block); - -+void ff_vc1_v_loop_filter4_neon(uint8_t *src, int stride, int pq); -+void ff_vc1_h_loop_filter4_neon(uint8_t *src, int stride, int pq); -+void ff_vc1_v_loop_filter8_neon(uint8_t *src, int stride, int pq); -+void ff_vc1_h_loop_filter8_neon(uint8_t *src, int stride, int pq); -+void ff_vc1_v_loop_filter16_neon(uint8_t *src, int stride, int pq); -+void ff_vc1_h_loop_filter16_neon(uint8_t *src, int stride, int pq); -+ - void ff_put_pixels8x8_neon(uint8_t *block, const uint8_t *pixels, - ptrdiff_t line_size, int rnd); - -@@ -77,6 +85,64 @@ void ff_put_vc1_chroma_mc4_neon(uint8_t - void ff_avg_vc1_chroma_mc4_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride, - int h, int x, int y); - -+int ff_vc1_unescape_buffer_helper_neon(const uint8_t *src, int size, uint8_t *dst); -+ -+static int vc1_unescape_buffer_neon(const uint8_t *src, int size, uint8_t *dst) -+{ -+ /* Dealing with starting and stopping, and removing escape bytes, are -+ * comparatively less time-sensitive, so are more clearly expressed using -+ * a C wrapper around the assembly inner loop. Note that we assume a -+ * little-endian machine that supports unaligned loads. */ -+ int dsize = 0; -+ while (size >= 4) -+ { -+ int found = 0; -+ while (!found && (((uintptr_t) dst) & 7) && size >= 4) -+ { -+ found = (AV_RL32(src) &~ 0x03000000) == 0x00030000; -+ if (!found) -+ { -+ *dst++ = *src++; -+ --size; -+ ++dsize; -+ } -+ } -+ if (!found) -+ { -+ int skip = size - ff_vc1_unescape_buffer_helper_neon(src, size, dst); -+ dst += skip; -+ src += skip; -+ size -= skip; -+ dsize += skip; -+ while (!found && size >= 4) -+ { -+ found = (AV_RL32(src) &~ 0x03000000) == 0x00030000; -+ if (!found) -+ { -+ *dst++ = *src++; -+ --size; -+ ++dsize; -+ } -+ } -+ } -+ if (found) -+ { -+ *dst++ = *src++; -+ *dst++ = *src++; -+ ++src; -+ size -= 3; -+ dsize += 2; -+ } -+ } -+ while (size > 0) -+ { -+ *dst++ = *src++; -+ --size; -+ ++dsize; -+ } -+ return dsize; -+} -+ - #define FN_ASSIGN(X, Y) \ - dsp->put_vc1_mspel_pixels_tab[0][X+4*Y] = ff_put_vc1_mspel_mc##X##Y##_16_neon; \ - dsp->put_vc1_mspel_pixels_tab[1][X+4*Y] = ff_put_vc1_mspel_mc##X##Y##_neon -@@ -92,6 +158,13 @@ av_cold void ff_vc1dsp_init_neon(VC1DSPC - dsp->vc1_inv_trans_8x4_dc = ff_vc1_inv_trans_8x4_dc_neon; - dsp->vc1_inv_trans_4x4_dc = ff_vc1_inv_trans_4x4_dc_neon; - -+ dsp->vc1_v_loop_filter4 = ff_vc1_v_loop_filter4_neon; -+ dsp->vc1_h_loop_filter4 = ff_vc1_h_loop_filter4_neon; -+ dsp->vc1_v_loop_filter8 = ff_vc1_v_loop_filter8_neon; -+ dsp->vc1_h_loop_filter8 = ff_vc1_h_loop_filter8_neon; -+ dsp->vc1_v_loop_filter16 = ff_vc1_v_loop_filter16_neon; -+ dsp->vc1_h_loop_filter16 = ff_vc1_h_loop_filter16_neon; -+ - dsp->put_vc1_mspel_pixels_tab[1][ 0] = ff_put_pixels8x8_neon; - FN_ASSIGN(1, 0); - FN_ASSIGN(2, 0); -@@ -116,4 +189,6 @@ av_cold void ff_vc1dsp_init_neon(VC1DSPC - dsp->avg_no_rnd_vc1_chroma_pixels_tab[0] = ff_avg_vc1_chroma_mc8_neon; - dsp->put_no_rnd_vc1_chroma_pixels_tab[1] = ff_put_vc1_chroma_mc4_neon; - dsp->avg_no_rnd_vc1_chroma_pixels_tab[1] = ff_avg_vc1_chroma_mc4_neon; -+ -+ dsp->vc1_unescape_buffer = vc1_unescape_buffer_neon; - } ---- a/libavcodec/arm/vc1dsp_neon.S -+++ b/libavcodec/arm/vc1dsp_neon.S -@@ -1161,3 +1161,764 @@ function ff_vc1_inv_trans_4x4_dc_neon, e - vst1.32 {d1[1]}, [r0,:32] - bx lr - endfunc -+ -+@ VC-1 in-loop deblocking filter for 4 pixel pairs at boundary of vertically-neighbouring blocks -+@ On entry: -+@ r0 -> top-left pel of lower block -+@ r1 = row stride, bytes -+@ r2 = PQUANT bitstream parameter -+function ff_vc1_v_loop_filter4_neon, export=1 -+ sub r3, r0, r1, lsl #2 -+ vldr d0, .Lcoeffs -+ vld1.32 {d1[0]}, [r0], r1 @ P5 -+ vld1.32 {d2[0]}, [r3], r1 @ P1 -+ vld1.32 {d3[0]}, [r3], r1 @ P2 -+ vld1.32 {d4[0]}, [r0], r1 @ P6 -+ vld1.32 {d5[0]}, [r3], r1 @ P3 -+ vld1.32 {d6[0]}, [r0], r1 @ P7 -+ vld1.32 {d7[0]}, [r3] @ P4 -+ vld1.32 {d16[0]}, [r0] @ P8 -+ vshll.u8 q9, d1, #1 @ 2*P5 -+ vdup.16 d17, r2 @ pq -+ vshll.u8 q10, d2, #1 @ 2*P1 -+ vmovl.u8 q11, d3 @ P2 -+ vmovl.u8 q1, d4 @ P6 -+ vmovl.u8 q12, d5 @ P3 -+ vmls.i16 d20, d22, d0[1] @ 2*P1-5*P2 -+ vmovl.u8 q11, d6 @ P7 -+ vmls.i16 d18, d2, d0[1] @ 2*P5-5*P6 -+ vshll.u8 q2, d5, #1 @ 2*P3 -+ vmovl.u8 q3, d7 @ P4 -+ vmla.i16 d18, d22, d0[1] @ 2*P5-5*P6+5*P7 -+ vmovl.u8 q11, d16 @ P8 -+ vmla.u16 d20, d24, d0[1] @ 2*P1-5*P2+5*P3 -+ vmovl.u8 q12, d1 @ P5 -+ vmls.u16 d4, d6, d0[1] @ 2*P3-5*P4 -+ vmls.u16 d18, d22, d0[0] @ 2*P5-5*P6+5*P7-2*P8 -+ vsub.i16 d1, d6, d24 @ P4-P5 -+ vmls.i16 d20, d6, d0[0] @ 2*P1-5*P2+5*P3-2*P4 -+ vmla.i16 d4, d24, d0[1] @ 2*P3-5*P4+5*P5 -+ vmls.i16 d4, d2, d0[0] @ 2*P3-5*P4+5*P5-2*P6 -+ vabs.s16 d2, d1 -+ vrshr.s16 d3, d18, #3 -+ vrshr.s16 d5, d20, #3 -+ vshr.s16 d2, d2, #1 @ clip -+ vrshr.s16 d4, d4, #3 -+ vabs.s16 d3, d3 @ a2 -+ vshr.s16 d1, d1, #8 @ clip_sign -+ vabs.s16 d5, d5 @ a1 -+ vceq.i16 d7, d2, #0 @ test clip == 0 -+ vabs.s16 d16, d4 @ a0 -+ vshr.s16 d4, d4, #8 @ a0_sign -+ vcge.s16 d18, d5, d3 @ test a1 >= a2 -+ vcge.s16 d17, d16, d17 @ test a0 >= pq -+ vbsl d18, d3, d5 @ a3 -+ vsub.i16 d1, d1, d4 @ clip_sign - a0_sign -+ vorr d3, d7, d17 @ test clip == 0 || a0 >= pq -+ vqsub.u16 d4, d16, d18 @ a0 >= a3 ? a0-a3 : 0 (a0 > a3 in all cases where filtering is enabled, so makes more sense to subtract this way round than the opposite and then taking the abs) -+ vcge.s16 d5, d18, d16 @ test a3 >= a0 -+ vmul.i16 d0, d4, d0[1] @ a0 >= a3 ? 5*(a0-a3) : 0 -+ vorr d4, d3, d5 @ test clip == 0 || a0 >= pq || a3 >= a0 -+ vmov.32 r0, d4[1] @ move to gp reg -+ vshr.u16 d0, d0, #3 @ a0 >= a3 ? (5*(a0-a3))>>3 : 0 -+ vcge.s16 d4, d0, d2 -+ tst r0, #1 -+ bne 1f @ none of the 4 pixel pairs should be updated if this one is not filtered -+ vbsl d4, d2, d0 @ FFMIN(d, clip) -+ vbic d0, d4, d3 @ set each d to zero if it should not be filtered because clip == 0 || a0 >= pq (a3 > a0 case already zeroed by saturating sub) -+ vmls.i16 d6, d0, d1 @ invert d depending on clip_sign & a0_sign, or zero it if they match, and accumulate into P4 -+ vmla.i16 d24, d0, d1 @ invert d depending on clip_sign & a0_sign, or zero it if they match, and accumulate into P5 -+ vqmovun.s16 d0, q3 -+ vqmovun.s16 d1, q12 -+ vst1.32 {d0[0]}, [r3], r1 -+ vst1.32 {d1[0]}, [r3] -+1: bx lr -+endfunc -+ -+@ VC-1 in-loop deblocking filter for 4 pixel pairs at boundary of horizontally-neighbouring blocks -+@ On entry: -+@ r0 -> top-left pel of right block -+@ r1 = row stride, bytes -+@ r2 = PQUANT bitstream parameter -+function ff_vc1_h_loop_filter4_neon, export=1 -+ sub r3, r0, #4 @ where to start reading -+ vldr d0, .Lcoeffs -+ vld1.32 {d2}, [r3], r1 -+ sub r0, r0, #1 @ where to start writing -+ vld1.32 {d4}, [r3], r1 -+ vld1.32 {d3}, [r3], r1 -+ vld1.32 {d5}, [r3] -+ vdup.16 d1, r2 @ pq -+ vtrn.8 q1, q2 -+ vtrn.16 d2, d3 @ P1, P5, P3, P7 -+ vtrn.16 d4, d5 @ P2, P6, P4, P8 -+ vshll.u8 q3, d2, #1 @ 2*P1, 2*P5 -+ vmovl.u8 q8, d4 @ P2, P6 -+ vmovl.u8 q9, d3 @ P3, P7 -+ vmovl.u8 q2, d5 @ P4, P8 -+ vmls.i16 q3, q8, d0[1] @ 2*P1-5*P2, 2*P5-5*P6 -+ vshll.u8 q10, d3, #1 @ 2*P3, 2*P7 -+ vmovl.u8 q1, d2 @ P1, P5 -+ vmla.i16 q3, q9, d0[1] @ 2*P1-5*P2+5*P3, 2*P5-5*P6+5*P7 -+ vmls.i16 q3, q2, d0[0] @ 2*P1-5*P2+5*P3-2*P4, 2*P5-5*P6+5*P7-2*P8 -+ vmov d2, d3 @ needs to be in an even-numbered vector for when we come to narrow it later -+ vmls.i16 d20, d4, d0[1] @ 2*P3-5*P4 -+ vmla.i16 d20, d3, d0[1] @ 2*P3-5*P4+5*P5 -+ vsub.i16 d3, d4, d2 @ P4-P5 -+ vmls.i16 d20, d17, d0[0] @ 2*P3-5*P4+5*P5-2*P6 -+ vrshr.s16 q3, q3, #3 -+ vabs.s16 d5, d3 -+ vshr.s16 d3, d3, #8 @ clip_sign -+ vrshr.s16 d16, d20, #3 -+ vabs.s16 q3, q3 @ a1, a2 -+ vshr.s16 d5, d5, #1 @ clip -+ vabs.s16 d17, d16 @ a0 -+ vceq.i16 d18, d5, #0 @ test clip == 0 -+ vshr.s16 d16, d16, #8 @ a0_sign -+ vcge.s16 d19, d6, d7 @ test a1 >= a2 -+ vcge.s16 d1, d17, d1 @ test a0 >= pq -+ vsub.i16 d16, d3, d16 @ clip_sign - a0_sign -+ vbsl d19, d7, d6 @ a3 -+ vorr d1, d18, d1 @ test clip == 0 || a0 >= pq -+ vqsub.u16 d3, d17, d19 @ a0 >= a3 ? a0-a3 : 0 (a0 > a3 in all cases where filtering is enabled, so makes more sense to subtract this way round than the opposite and then taking the abs) -+ vcge.s16 d6, d19, d17 @ test a3 >= a0 @ -+ vmul.i16 d0, d3, d0[1] @ a0 >= a3 ? 5*(a0-a3) : 0 -+ vorr d3, d1, d6 @ test clip == 0 || a0 >= pq || a3 >= a0 -+ vmov.32 r2, d3[1] @ move to gp reg -+ vshr.u16 d0, d0, #3 @ a0 >= a3 ? (5*(a0-a3))>>3 : 0 -+ vcge.s16 d3, d0, d5 -+ tst r2, #1 -+ bne 1f @ none of the 4 pixel pairs should be updated if this one is not filtered -+ vbsl d3, d5, d0 @ FFMIN(d, clip) -+ vbic d0, d3, d1 @ set each d to zero if it should not be filtered because clip == 0 || a0 >= pq (a3 > a0 case already zeroed by saturating sub) -+ vmla.i16 d2, d0, d16 @ invert d depending on clip_sign & a0_sign, or zero it if they match, and accumulate into P5 -+ vmls.i16 d4, d0, d16 @ invert d depending on clip_sign & a0_sign, or zero it if they match, and accumulate into P4 -+ vqmovun.s16 d1, q1 -+ vqmovun.s16 d0, q2 -+ vst2.8 {d0[0], d1[0]}, [r0], r1 -+ vst2.8 {d0[1], d1[1]}, [r0], r1 -+ vst2.8 {d0[2], d1[2]}, [r0], r1 -+ vst2.8 {d0[3], d1[3]}, [r0] -+1: bx lr -+endfunc -+ -+@ VC-1 in-loop deblocking filter for 8 pixel pairs at boundary of vertically-neighbouring blocks -+@ On entry: -+@ r0 -> top-left pel of lower block -+@ r1 = row stride, bytes -+@ r2 = PQUANT bitstream parameter -+function ff_vc1_v_loop_filter8_neon, export=1 -+ sub r3, r0, r1, lsl #2 -+ vldr d0, .Lcoeffs -+ vld1.32 {d1}, [r0 :64], r1 @ P5 -+ vld1.32 {d2}, [r3 :64], r1 @ P1 -+ vld1.32 {d3}, [r3 :64], r1 @ P2 -+ vld1.32 {d4}, [r0 :64], r1 @ P6 -+ vld1.32 {d5}, [r3 :64], r1 @ P3 -+ vld1.32 {d6}, [r0 :64], r1 @ P7 -+ vshll.u8 q8, d1, #1 @ 2*P5 -+ vshll.u8 q9, d2, #1 @ 2*P1 -+ vld1.32 {d7}, [r3 :64] @ P4 -+ vmovl.u8 q1, d3 @ P2 -+ vld1.32 {d20}, [r0 :64] @ P8 -+ vmovl.u8 q11, d4 @ P6 -+ vdup.16 q12, r2 @ pq -+ vmovl.u8 q13, d5 @ P3 -+ vmls.i16 q9, q1, d0[1] @ 2*P1-5*P2 -+ vmovl.u8 q1, d6 @ P7 -+ vshll.u8 q2, d5, #1 @ 2*P3 -+ vmls.i16 q8, q11, d0[1] @ 2*P5-5*P6 -+ vmovl.u8 q3, d7 @ P4 -+ vmovl.u8 q10, d20 @ P8 -+ vmla.i16 q8, q1, d0[1] @ 2*P5-5*P6+5*P7 -+ vmovl.u8 q1, d1 @ P5 -+ vmla.i16 q9, q13, d0[1] @ 2*P1-5*P2+5*P3 -+ vsub.i16 q13, q3, q1 @ P4-P5 -+ vmls.i16 q2, q3, d0[1] @ 2*P3-5*P4 -+ vmls.i16 q8, q10, d0[0] @ 2*P5-5*P6+5*P7-2*P8 -+ vabs.s16 q10, q13 -+ vshr.s16 q13, q13, #8 @ clip_sign -+ vmls.i16 q9, q3, d0[0] @ 2*P1-5*P2+5*P3-2*P4 -+ vshr.s16 q10, q10, #1 @ clip -+ vmla.i16 q2, q1, d0[1] @ 2*P3-5*P4+5*P5 -+ vrshr.s16 q8, q8, #3 -+ vmls.i16 q2, q11, d0[0] @ 2*P3-5*P4+5*P5-2*P6 -+ vceq.i16 q11, q10, #0 @ test clip == 0 -+ vrshr.s16 q9, q9, #3 -+ vabs.s16 q8, q8 @ a2 -+ vabs.s16 q9, q9 @ a1 -+ vrshr.s16 q2, q2, #3 -+ vcge.s16 q14, q9, q8 @ test a1 >= a2 -+ vabs.s16 q15, q2 @ a0 -+ vshr.s16 q2, q2, #8 @ a0_sign -+ vbsl q14, q8, q9 @ a3 -+ vcge.s16 q8, q15, q12 @ test a0 >= pq -+ vsub.i16 q2, q13, q2 @ clip_sign - a0_sign -+ vqsub.u16 q9, q15, q14 @ a0 >= a3 ? a0-a3 : 0 (a0 > a3 in all cases where filtering is enabled, so makes more sense to subtract this way round than the opposite and then taking the abs) -+ vcge.s16 q12, q14, q15 @ test a3 >= a0 -+ vorr q8, q11, q8 @ test clip == 0 || a0 >= pq -+ vmul.i16 q0, q9, d0[1] @ a0 >= a3 ? 5*(a0-a3) : 0 -+ vorr q9, q8, q12 @ test clip == 0 || a0 >= pq || a3 >= a0 -+ vshl.i64 q11, q9, #16 -+ vmov.32 r0, d18[1] @ move to gp reg -+ vshr.u16 q0, q0, #3 @ a0 >= a3 ? (5*(a0-a3))>>3 : 0 -+ vmov.32 r2, d19[1] -+ vshr.s64 q9, q11, #48 -+ vcge.s16 q11, q0, q10 -+ vorr q8, q8, q9 -+ and r0, r0, r2 -+ vbsl q11, q10, q0 @ FFMIN(d, clip) -+ tst r0, #1 -+ bne 1f @ none of the 8 pixel pairs should be updated in this case -+ vbic q0, q11, q8 @ set each d to zero if it should not be filtered -+ vmls.i16 q3, q0, q2 @ invert d depending on clip_sign & a0_sign, or zero it if they match, and accumulate into P4 -+ vmla.i16 q1, q0, q2 @ invert d depending on clip_sign & a0_sign, or zero it if they match, and accumulate into P5 -+ vqmovun.s16 d0, q3 -+ vqmovun.s16 d1, q1 -+ vst1.32 {d0}, [r3 :64], r1 -+ vst1.32 {d1}, [r3 :64] -+1: bx lr -+endfunc -+ -+.align 5 -+.Lcoeffs: -+.quad 0x00050002 -+ -+@ VC-1 in-loop deblocking filter for 8 pixel pairs at boundary of horizontally-neighbouring blocks -+@ On entry: -+@ r0 -> top-left pel of right block -+@ r1 = row stride, bytes -+@ r2 = PQUANT bitstream parameter -+function ff_vc1_h_loop_filter8_neon, export=1 -+ push {lr} -+ sub r3, r0, #4 @ where to start reading -+ vldr d0, .Lcoeffs -+ vld1.32 {d2}, [r3], r1 @ P1[0], P2[0]... -+ sub r0, r0, #1 @ where to start writing -+ vld1.32 {d4}, [r3], r1 -+ add r12, r0, r1, lsl #2 -+ vld1.32 {d3}, [r3], r1 -+ vld1.32 {d5}, [r3], r1 -+ vld1.32 {d6}, [r3], r1 -+ vld1.32 {d16}, [r3], r1 -+ vld1.32 {d7}, [r3], r1 -+ vld1.32 {d17}, [r3] -+ vtrn.8 q1, q2 @ P1[0], P1[1], P3[0]... P1[2], P1[3], P3[2]... P2[0], P2[1], P4[0]... P2[2], P2[3], P4[2]... -+ vdup.16 q9, r2 @ pq -+ vtrn.16 d2, d3 @ P1[0], P1[1], P1[2], P1[3], P5[0]... P3[0], P3[1], P3[2], P3[3], P7[0]... -+ vtrn.16 d4, d5 @ P2[0], P2[1], P2[2], P2[3], P6[0]... P4[0], P4[1], P4[2], P4[3], P8[0]... -+ vtrn.8 q3, q8 @ P1[4], P1[5], P3[4]... P1[6], P1[7], P3[6]... P2[4], P2[5], P4[4]... P2[6], P2[7], P4[6]... -+ vtrn.16 d6, d7 @ P1[4], P1[5], P1[6], P1[7], P5[4]... P3[4], P3[5], P3[5], P3[7], P7[4]... -+ vtrn.16 d16, d17 @ P2[4], P2[5], P2[6], P2[7], P6[4]... P4[4], P4[5], P4[6], P4[7], P8[4]... -+ vtrn.32 d2, d6 @ P1, P5 -+ vtrn.32 d4, d16 @ P2, P6 -+ vtrn.32 d3, d7 @ P3, P7 -+ vtrn.32 d5, d17 @ P4, P8 -+ vshll.u8 q10, d2, #1 @ 2*P1 -+ vshll.u8 q11, d6, #1 @ 2*P5 -+ vmovl.u8 q12, d4 @ P2 -+ vmovl.u8 q13, d16 @ P6 -+ vmovl.u8 q14, d3 @ P3 -+ vmls.i16 q10, q12, d0[1] @ 2*P1-5*P2 -+ vmovl.u8 q12, d7 @ P7 -+ vshll.u8 q1, d3, #1 @ 2*P3 -+ vmls.i16 q11, q13, d0[1] @ 2*P5-5*P6 -+ vmovl.u8 q2, d5 @ P4 -+ vmovl.u8 q8, d17 @ P8 -+ vmla.i16 q11, q12, d0[1] @ 2*P5-5*P6+5*P7 -+ vmovl.u8 q3, d6 @ P5 -+ vmla.i16 q10, q14, d0[1] @ 2*P1-5*P2+5*P3 -+ vsub.i16 q12, q2, q3 @ P4-P5 -+ vmls.i16 q1, q2, d0[1] @ 2*P3-5*P4 -+ vmls.i16 q11, q8, d0[0] @ 2*P5-5*P6+5*P7-2*P8 -+ vabs.s16 q8, q12 -+ vshr.s16 q12, q12, #8 @ clip_sign -+ vmls.i16 q10, q2, d0[0] @ 2*P1-5*P2+5*P3-2*P4 -+ vshr.s16 q8, q8, #1 @ clip -+ vmla.i16 q1, q3, d0[1] @ 2*P3-5*P4+5*P5 -+ vrshr.s16 q11, q11, #3 -+ vmls.i16 q1, q13, d0[0] @ 2*P3-5*P4+5*P5-2*P6 -+ vceq.i16 q13, q8, #0 @ test clip == 0 -+ vrshr.s16 q10, q10, #3 -+ vabs.s16 q11, q11 @ a2 -+ vabs.s16 q10, q10 @ a1 -+ vrshr.s16 q1, q1, #3 -+ vcge.s16 q14, q10, q11 @ test a1 >= a2 -+ vabs.s16 q15, q1 @ a0 -+ vshr.s16 q1, q1, #8 @ a0_sign -+ vbsl q14, q11, q10 @ a3 -+ vcge.s16 q9, q15, q9 @ test a0 >= pq -+ vsub.i16 q1, q12, q1 @ clip_sign - a0_sign -+ vqsub.u16 q10, q15, q14 @ a0 >= a3 ? a0-a3 : 0 (a0 > a3 in all cases where filtering is enabled, so makes more sense to subtract this way round than the opposite and then taking the abs) -+ vcge.s16 q11, q14, q15 @ test a3 >= a0 -+ vorr q9, q13, q9 @ test clip == 0 || a0 >= pq -+ vmul.i16 q0, q10, d0[1] @ a0 >= a3 ? 5*(a0-a3) : 0 -+ vorr q10, q9, q11 @ test clip == 0 || a0 >= pq || a3 >= a0 -+ vmov.32 r2, d20[1] @ move to gp reg -+ vshr.u16 q0, q0, #3 @ a0 >= a3 ? (5*(a0-a3))>>3 : 0 -+ vmov.32 r3, d21[1] -+ vcge.s16 q10, q0, q8 -+ and r14, r2, r3 -+ vbsl q10, q8, q0 @ FFMIN(d, clip) -+ tst r14, #1 -+ bne 2f @ none of the 8 pixel pairs should be updated in this case -+ vbic q0, q10, q9 @ set each d to zero if it should not be filtered because clip == 0 || a0 >= pq (a3 > a0 case already zeroed by saturating sub) -+ vmla.i16 q3, q0, q1 @ invert d depending on clip_sign & a0_sign, or zero it if they match, and accumulate into P5 -+ vmls.i16 q2, q0, q1 @ invert d depending on clip_sign & a0_sign, or zero it if they match, and accumulate into P4 -+ vqmovun.s16 d1, q3 -+ vqmovun.s16 d0, q2 -+ tst r2, #1 -+ bne 1f @ none of the first 4 pixel pairs should be updated if so -+ vst2.8 {d0[0], d1[0]}, [r0], r1 -+ vst2.8 {d0[1], d1[1]}, [r0], r1 -+ vst2.8 {d0[2], d1[2]}, [r0], r1 -+ vst2.8 {d0[3], d1[3]}, [r0] -+1: tst r3, #1 -+ bne 2f @ none of the second 4 pixel pairs should be updated if so -+ vst2.8 {d0[4], d1[4]}, [r12], r1 -+ vst2.8 {d0[5], d1[5]}, [r12], r1 -+ vst2.8 {d0[6], d1[6]}, [r12], r1 -+ vst2.8 {d0[7], d1[7]}, [r12] -+2: pop {pc} -+endfunc -+ -+@ VC-1 in-loop deblocking filter for 16 pixel pairs at boundary of vertically-neighbouring blocks -+@ On entry: -+@ r0 -> top-left pel of lower block -+@ r1 = row stride, bytes -+@ r2 = PQUANT bitstream parameter -+function ff_vc1_v_loop_filter16_neon, export=1 -+ vpush {d8-d15} -+ sub r3, r0, r1, lsl #2 -+ vldr d0, .Lcoeffs -+ vld1.64 {q1}, [r0 :128], r1 @ P5 -+ vld1.64 {q2}, [r3 :128], r1 @ P1 -+ vld1.64 {q3}, [r3 :128], r1 @ P2 -+ vld1.64 {q4}, [r0 :128], r1 @ P6 -+ vld1.64 {q5}, [r3 :128], r1 @ P3 -+ vld1.64 {q6}, [r0 :128], r1 @ P7 -+ vshll.u8 q7, d2, #1 @ 2*P5[0..7] -+ vshll.u8 q8, d4, #1 @ 2*P1[0..7] -+ vld1.64 {q9}, [r3 :128] @ P4 -+ vmovl.u8 q10, d6 @ P2[0..7] -+ vld1.64 {q11}, [r0 :128] @ P8 -+ vmovl.u8 q12, d8 @ P6[0..7] -+ vdup.16 q13, r2 @ pq -+ vshll.u8 q2, d5, #1 @ 2*P1[8..15] -+ vmls.i16 q8, q10, d0[1] @ 2*P1[0..7]-5*P2[0..7] -+ vshll.u8 q10, d3, #1 @ 2*P5[8..15] -+ vmovl.u8 q3, d7 @ P2[8..15] -+ vmls.i16 q7, q12, d0[1] @ 2*P5[0..7]-5*P6[0..7] -+ vmovl.u8 q4, d9 @ P6[8..15] -+ vmovl.u8 q14, d10 @ P3[0..7] -+ vmovl.u8 q15, d12 @ P7[0..7] -+ vmls.i16 q2, q3, d0[1] @ 2*P1[8..15]-5*P2[8..15] -+ vshll.u8 q3, d10, #1 @ 2*P3[0..7] -+ vmls.i16 q10, q4, d0[1] @ 2*P5[8..15]-5*P6[8..15] -+ vmovl.u8 q6, d13 @ P7[8..15] -+ vmla.i16 q8, q14, d0[1] @ 2*P1[0..7]-5*P2[0..7]+5*P3[0..7] -+ vmovl.u8 q14, d18 @ P4[0..7] -+ vmovl.u8 q9, d19 @ P4[8..15] -+ vmla.i16 q7, q15, d0[1] @ 2*P5[0..7]-5*P6[0..7]+5*P7[0..7] -+ vmovl.u8 q15, d11 @ P3[8..15] -+ vshll.u8 q5, d11, #1 @ 2*P3[8..15] -+ vmls.i16 q3, q14, d0[1] @ 2*P3[0..7]-5*P4[0..7] -+ vmla.i16 q2, q15, d0[1] @ 2*P1[8..15]-5*P2[8..15]+5*P3[8..15] -+ vmovl.u8 q15, d22 @ P8[0..7] -+ vmovl.u8 q11, d23 @ P8[8..15] -+ vmla.i16 q10, q6, d0[1] @ 2*P5[8..15]-5*P6[8..15]+5*P7[8..15] -+ vmovl.u8 q6, d2 @ P5[0..7] -+ vmovl.u8 q1, d3 @ P5[8..15] -+ vmls.i16 q5, q9, d0[1] @ 2*P3[8..15]-5*P4[8..15] -+ vmls.i16 q8, q14, d0[0] @ 2*P1[0..7]-5*P2[0..7]+5*P3[0..7]-2*P4[0..7] -+ vmls.i16 q7, q15, d0[0] @ 2*P5[0..7]-5*P6[0..7]+5*P7[0..7]-2*P8[0..7] -+ vsub.i16 q15, q14, q6 @ P4[0..7]-P5[0..7] -+ vmla.i16 q3, q6, d0[1] @ 2*P3[0..7]-5*P4[0..7]+5*P5[0..7] -+ vrshr.s16 q8, q8, #3 -+ vmls.i16 q2, q9, d0[0] @ 2*P1[8..15]-5*P2[8..15]+5*P3[8..15]-2*P4[8..15] -+ vrshr.s16 q7, q7, #3 -+ vmls.i16 q10, q11, d0[0] @ 2*P5[8..15]-5*P6[8..15]+5*P7[8..15]-2*P8[8..15] -+ vabs.s16 q11, q15 -+ vabs.s16 q8, q8 @ a1[0..7] -+ vmla.i16 q5, q1, d0[1] @ 2*P3[8..15]-5*P4[8..15]+5*P5[8..15] -+ vshr.s16 q15, q15, #8 @ clip_sign[0..7] -+ vrshr.s16 q2, q2, #3 -+ vmls.i16 q3, q12, d0[0] @ 2*P3[0..7]-5*P4[0..7]+5*P5[0..7]-2*P6[0..7] -+ vabs.s16 q7, q7 @ a2[0..7] -+ vrshr.s16 q10, q10, #3 -+ vsub.i16 q12, q9, q1 @ P4[8..15]-P5[8..15] -+ vshr.s16 q11, q11, #1 @ clip[0..7] -+ vmls.i16 q5, q4, d0[0] @ 2*P3[8..15]-5*P4[8..15]+5*P5[8..15]-2*P6[8..15] -+ vcge.s16 q4, q8, q7 @ test a1[0..7] >= a2[0..7] -+ vabs.s16 q2, q2 @ a1[8..15] -+ vrshr.s16 q3, q3, #3 -+ vabs.s16 q10, q10 @ a2[8..15] -+ vbsl q4, q7, q8 @ a3[0..7] -+ vabs.s16 q7, q12 -+ vshr.s16 q8, q12, #8 @ clip_sign[8..15] -+ vrshr.s16 q5, q5, #3 -+ vcge.s16 q12, q2, q10 @ test a1[8..15] >= a2[8.15] -+ vshr.s16 q7, q7, #1 @ clip[8..15] -+ vbsl q12, q10, q2 @ a3[8..15] -+ vabs.s16 q2, q3 @ a0[0..7] -+ vceq.i16 q10, q11, #0 @ test clip[0..7] == 0 -+ vshr.s16 q3, q3, #8 @ a0_sign[0..7] -+ vsub.i16 q3, q15, q3 @ clip_sign[0..7] - a0_sign[0..7] -+ vcge.s16 q15, q2, q13 @ test a0[0..7] >= pq -+ vorr q10, q10, q15 @ test clip[0..7] == 0 || a0[0..7] >= pq -+ vqsub.u16 q15, q2, q4 @ a0[0..7] >= a3[0..7] ? a0[0..7]-a3[0..7] : 0 (a0 > a3 in all cases where filtering is enabled, so makes more sense to subtract this way round than the opposite and then taking the abs) -+ vcge.s16 q2, q4, q2 @ test a3[0..7] >= a0[0..7] -+ vabs.s16 q4, q5 @ a0[8..15] -+ vshr.s16 q5, q5, #8 @ a0_sign[8..15] -+ vmul.i16 q15, q15, d0[1] @ a0[0..7] >= a3[0..7] ? 5*(a0[0..7]-a3[0..7]) : 0 -+ vcge.s16 q13, q4, q13 @ test a0[8..15] >= pq -+ vorr q2, q10, q2 @ test clip[0..7] == 0 || a0[0..7] >= pq || a3[0..7] >= a0[0..7] -+ vsub.i16 q5, q8, q5 @ clip_sign[8..15] - a0_sign[8..15] -+ vceq.i16 q8, q7, #0 @ test clip[8..15] == 0 -+ vshr.u16 q15, q15, #3 @ a0[0..7] >= a3[0..7] ? (5*(a0[0..7]-a3[0..7]))>>3 : 0 -+ vmov.32 r0, d4[1] @ move to gp reg -+ vorr q8, q8, q13 @ test clip[8..15] == 0 || a0[8..15] >= pq -+ vqsub.u16 q13, q4, q12 @ a0[8..15] >= a3[8..15] ? a0[8..15]-a3[8..15] : 0 (a0 > a3 in all cases where filtering is enabled, so makes more sense to subtract this way round than the opposite and then taking the abs) -+ vmov.32 r2, d5[1] -+ vcge.s16 q4, q12, q4 @ test a3[8..15] >= a0[8..15] -+ vshl.i64 q2, q2, #16 -+ vcge.s16 q12, q15, q11 -+ vmul.i16 q0, q13, d0[1] @ a0[8..15] >= a3[8..15] ? 5*(a0[8..15]-a3[8..15]) : 0 -+ vorr q4, q8, q4 @ test clip[8..15] == 0 || a0[8..15] >= pq || a3[8..15] >= a0[8..15] -+ vshr.s64 q2, q2, #48 -+ and r0, r0, r2 -+ vbsl q12, q11, q15 @ FFMIN(d[0..7], clip[0..7]) -+ vshl.i64 q11, q4, #16 -+ vmov.32 r2, d8[1] -+ vshr.u16 q0, q0, #3 @ a0[8..15] >= a3[8..15] ? (5*(a0[8..15]-a3[8..15]))>>3 : 0 -+ vorr q2, q10, q2 -+ vmov.32 r12, d9[1] -+ vshr.s64 q4, q11, #48 -+ vcge.s16 q10, q0, q7 -+ vbic q2, q12, q2 @ set each d[0..7] to zero if it should not be filtered because clip[0..7] == 0 || a0[0..7] >= pq (a3 > a0 case already zeroed by saturating sub) -+ vorr q4, q8, q4 -+ and r2, r2, r12 -+ vbsl q10, q7, q0 @ FFMIN(d[8..15], clip[8..15]) -+ vmls.i16 q14, q2, q3 @ invert d[0..7] depending on clip_sign[0..7] & a0_sign[0..7], or zero it if they match, and accumulate into P4[0..7] -+ and r0, r0, r2 -+ vbic q0, q10, q4 @ set each d[8..15] to zero if it should not be filtered because clip[8..15] == 0 || a0[8..15] >= pq (a3 > a0 case already zeroed by saturating sub) -+ tst r0, #1 -+ bne 1f @ none of the 16 pixel pairs should be updated in this case -+ vmla.i16 q6, q2, q3 @ invert d[0..7] depending on clip_sign[0..7] & a0_sign[0..7], or zero it if they match, and accumulate into P5[0..7] -+ vmls.i16 q9, q0, q5 @ invert d[8..15] depending on clip_sign[8..15] & a0_sign[8..15], or zero it if they match, and accumulate into P4[8..15] -+ vqmovun.s16 d4, q14 -+ vmla.i16 q1, q0, q5 @ invert d[8..15] depending on clip_sign[8..15] & a0_sign[8..15], or zero it if they match, and accumulate into P5[8..15] -+ vqmovun.s16 d0, q6 -+ vqmovun.s16 d5, q9 -+ vqmovun.s16 d1, q1 -+ vst1.64 {q2}, [r3 :128], r1 -+ vst1.64 {q0}, [r3 :128] -+1: vpop {d8-d15} -+ bx lr -+endfunc -+ -+@ VC-1 in-loop deblocking filter for 16 pixel pairs at boundary of horizontally-neighbouring blocks -+@ On entry: -+@ r0 -> top-left pel of right block -+@ r1 = row stride, bytes -+@ r2 = PQUANT bitstream parameter -+function ff_vc1_h_loop_filter16_neon, export=1 -+ push {r4-r6,lr} -+ vpush {d8-d15} -+ sub r3, r0, #4 @ where to start reading -+ vldr d0, .Lcoeffs -+ vld1.32 {d2}, [r3], r1 @ P1[0], P2[0]... -+ sub r0, r0, #1 @ where to start writing -+ vld1.32 {d3}, [r3], r1 -+ add r4, r0, r1, lsl #2 -+ vld1.32 {d10}, [r3], r1 -+ vld1.32 {d11}, [r3], r1 -+ vld1.32 {d16}, [r3], r1 -+ vld1.32 {d4}, [r3], r1 -+ vld1.32 {d8}, [r3], r1 -+ vtrn.8 d2, d3 @ P1[0], P1[1], P3[0]... P2[0], P2[1], P4[0]... -+ vld1.32 {d14}, [r3], r1 -+ vld1.32 {d5}, [r3], r1 -+ vtrn.8 d10, d11 @ P1[2], P1[3], P3[2]... P2[2], P2[3], P4[2]... -+ vld1.32 {d6}, [r3], r1 -+ vld1.32 {d12}, [r3], r1 -+ vtrn.8 d16, d4 @ P1[4], P1[5], P3[4]... P2[4], P2[5], P4[4]... -+ vld1.32 {d13}, [r3], r1 -+ vtrn.16 d2, d10 @ P1[0], P1[1], P1[2], P1[3], P5[0]... P3[0], P3[1], P3[2], P3[3], P7[0]... -+ vld1.32 {d1}, [r3], r1 -+ vtrn.8 d8, d14 @ P1[6], P1[7], P3[6]... P2[6], P2[7], P4[6]... -+ vld1.32 {d7}, [r3], r1 -+ vtrn.16 d3, d11 @ P2[0], P2[1], P2[2], P2[3], P6[0]... P4[0], P4[1], P4[2], P4[3], P8[0]... -+ vld1.32 {d9}, [r3], r1 -+ vtrn.8 d5, d6 @ P1[8], P1[9], P3[8]... P2[8], P2[9], P4[8]... -+ vld1.32 {d15}, [r3] -+ vtrn.16 d16, d8 @ P1[4], P1[5], P1[6], P1[7], P5[4]... P3[4], P3[5], P3[6], P3[7], P7[4]... -+ vtrn.16 d4, d14 @ P2[4], P2[5], P2[6], P2[7], P6[4]... P4[4], P4[5], P4[6], P4[7], P8[4]... -+ vtrn.8 d12, d13 @ P1[10], P1[11], P3[10]... P2[10], P2[11], P4[10]... -+ vdup.16 q9, r2 @ pq -+ vtrn.8 d1, d7 @ P1[12], P1[13], P3[12]... P2[12], P2[13], P4[12]... -+ vtrn.32 d2, d16 @ P1[0..7], P5[0..7] -+ vtrn.16 d5, d12 @ P1[8], P1[7], P1[10], P1[11], P5[8]... P3[8], P3[9], P3[10], P3[11], P7[8]... -+ vtrn.16 d6, d13 @ P2[8], P2[7], P2[10], P2[11], P6[8]... P4[8], P4[9], P4[10], P4[11], P8[8]... -+ vtrn.8 d9, d15 @ P1[14], P1[15], P3[14]... P2[14], P2[15], P4[14]... -+ vtrn.32 d3, d4 @ P2[0..7], P6[0..7] -+ vshll.u8 q10, d2, #1 @ 2*P1[0..7] -+ vtrn.32 d10, d8 @ P3[0..7], P7[0..7] -+ vshll.u8 q11, d16, #1 @ 2*P5[0..7] -+ vtrn.32 d11, d14 @ P4[0..7], P8[0..7] -+ vtrn.16 d1, d9 @ P1[12], P1[13], P1[14], P1[15], P5[12]... P3[12], P3[13], P3[14], P3[15], P7[12]... -+ vtrn.16 d7, d15 @ P2[12], P2[13], P2[14], P2[15], P6[12]... P4[12], P4[13], P4[14], P4[15], P8[12]... -+ vmovl.u8 q1, d3 @ P2[0..7] -+ vmovl.u8 q12, d4 @ P6[0..7] -+ vtrn.32 d5, d1 @ P1[8..15], P5[8..15] -+ vtrn.32 d6, d7 @ P2[8..15], P6[8..15] -+ vtrn.32 d12, d9 @ P3[8..15], P7[8..15] -+ vtrn.32 d13, d15 @ P4[8..15], P8[8..15] -+ vmls.i16 q10, q1, d0[1] @ 2*P1[0..7]-5*P2[0..7] -+ vmovl.u8 q1, d10 @ P3[0..7] -+ vshll.u8 q2, d5, #1 @ 2*P1[8..15] -+ vshll.u8 q13, d1, #1 @ 2*P5[8..15] -+ vmls.i16 q11, q12, d0[1] @ 2*P5[0..7]-5*P6[0..7] -+ vmovl.u8 q14, d6 @ P2[8..15] -+ vmovl.u8 q3, d7 @ P6[8..15] -+ vmovl.u8 q15, d8 @ P7[0..7] -+ vmla.i16 q10, q1, d0[1] @ 2*P1[0..7]-5*P2[0..7]+5*P3[0..7] -+ vmovl.u8 q1, d12 @ P3[8..15] -+ vmls.i16 q2, q14, d0[1] @ 2*P1[8..15]-5*P2[8..15] -+ vmovl.u8 q4, d9 @ P7[8..15] -+ vshll.u8 q14, d10, #1 @ 2*P3[0..7] -+ vmls.i16 q13, q3, d0[1] @ 2*P5[8..15]-5*P6[8..15] -+ vmovl.u8 q5, d11 @ P4[0..7] -+ vmla.i16 q11, q15, d0[1] @ 2*P5[0..7]-5*P6[0..7]+5*P7[0..7] -+ vshll.u8 q15, d12, #1 @ 2*P3[8..15] -+ vmovl.u8 q6, d13 @ P4[8..15] -+ vmla.i16 q2, q1, d0[1] @ 2*P1[8..15]-5*P2[8..15]+5*P3[8..15] -+ vmovl.u8 q1, d14 @ P8[0..7] -+ vmovl.u8 q7, d15 @ P8[8..15] -+ vmla.i16 q13, q4, d0[1] @ 2*P5[8..15]-5*P6[8..15]+5*P7[8..15] -+ vmovl.u8 q4, d16 @ P5[0..7] -+ vmovl.u8 q8, d1 @ P5[8..15] -+ vmls.i16 q14, q5, d0[1] @ 2*P3[0..7]-5*P4[0..7] -+ vmls.i16 q15, q6, d0[1] @ 2*P3[8..15]-5*P4[8..15] -+ vmls.i16 q10, q5, d0[0] @ 2*P1[0..7]-5*P2[0..7]+5*P3[0..7]-2*P4[0..7] -+ vmls.i16 q11, q1, d0[0] @ 2*P5[0..7]-5*P6[0..7]+5*P7[0..7]-2*P8[0..7] -+ vsub.i16 q1, q5, q4 @ P4[0..7]-P5[0..7] -+ vmls.i16 q2, q6, d0[0] @ 2*P1[8..15]-5*P2[8..15]+5*P3[8..15]-2*P4[8..15] -+ vrshr.s16 q10, q10, #3 -+ vmls.i16 q13, q7, d0[0] @ 2*P5[8..15]-5*P6[8..15]+5*P7[8..15]-2*P8[8..15] -+ vsub.i16 q7, q6, q8 @ P4[8..15]-P5[8..15] -+ vrshr.s16 q11, q11, #3 -+ vmla.s16 q14, q4, d0[1] @ 2*P3[0..7]-5*P4[0..7]+5*P5[0..7] -+ vrshr.s16 q2, q2, #3 -+ vmla.i16 q15, q8, d0[1] @ 2*P3[8..15]-5*P4[8..15]+5*P5[8..15] -+ vabs.s16 q10, q10 @ a1[0..7] -+ vrshr.s16 q13, q13, #3 -+ vmls.i16 q15, q3, d0[0] @ 2*P3[8..15]-5*P4[8..15]+5*P5[8..15]-2*P6[8..15] -+ vabs.s16 q3, q11 @ a2[0..7] -+ vabs.s16 q2, q2 @ a1[8..15] -+ vmls.i16 q14, q12, d0[0] @ 2*P3[0..7]-5*P4[0..7]+5*P5[0..7]-2*P6[0..7] -+ vabs.s16 q11, q1 -+ vabs.s16 q12, q13 @ a2[8..15] -+ vcge.s16 q13, q10, q3 @ test a1[0..7] >= a2[0..7] -+ vshr.s16 q1, q1, #8 @ clip_sign[0..7] -+ vrshr.s16 q15, q15, #3 -+ vshr.s16 q11, q11, #1 @ clip[0..7] -+ vrshr.s16 q14, q14, #3 -+ vbsl q13, q3, q10 @ a3[0..7] -+ vcge.s16 q3, q2, q12 @ test a1[8..15] >= a2[8.15] -+ vabs.s16 q10, q15 @ a0[8..15] -+ vshr.s16 q15, q15, #8 @ a0_sign[8..15] -+ vbsl q3, q12, q2 @ a3[8..15] -+ vabs.s16 q2, q14 @ a0[0..7] -+ vabs.s16 q12, q7 -+ vshr.s16 q7, q7, #8 @ clip_sign[8..15] -+ vshr.s16 q14, q14, #8 @ a0_sign[0..7] -+ vshr.s16 q12, q12, #1 @ clip[8..15] -+ vsub.i16 q7, q7, q15 @ clip_sign[8..15] - a0_sign[8..15] -+ vqsub.u16 q15, q10, q3 @ a0[8..15] >= a3[8..15] ? a0[8..15]-a3[8..15] : 0 (a0 > a3 in all cases where filtering is enabled, so makes more sense to subtract this way round than the opposite and then taking the abs) -+ vcge.s16 q3, q3, q10 @ test a3[8..15] >= a0[8..15] -+ vcge.s16 q10, q10, q9 @ test a0[8..15] >= pq -+ vcge.s16 q9, q2, q9 @ test a0[0..7] >= pq -+ vsub.i16 q1, q1, q14 @ clip_sign[0..7] - a0_sign[0..7] -+ vqsub.u16 q14, q2, q13 @ a0[0..7] >= a3[0..7] ? a0[0..7]-a3[0..7] : 0 (a0 > a3 in all cases where filtering is enabled, so makes more sense to subtract this way round than the opposite and then taking the abs) -+ vcge.s16 q2, q13, q2 @ test a3[0..7] >= a0[0..7] -+ vmul.i16 q13, q15, d0[1] @ a0[8..15] >= a3[8..15] ? 5*(a0[8..15]-a3[8..15]) : 0 -+ vceq.i16 q15, q11, #0 @ test clip[0..7] == 0 -+ vmul.i16 q0, q14, d0[1] @ a0[0..7] >= a3[0..7] ? 5*(a0[0..7]-a3[0..7]) : 0 -+ vorr q9, q15, q9 @ test clip[0..7] == 0 || a0[0..7] >= pq -+ vceq.i16 q14, q12, #0 @ test clip[8..15] == 0 -+ vshr.u16 q13, q13, #3 @ a0[8..15] >= a3[8..15] ? (5*(a0[8..15]-a3[8..15]))>>3 : 0 -+ vorr q2, q9, q2 @ test clip[0..7] == 0 || a0[0..7] >= pq || a3[0..7] >= a0[0..7] -+ vshr.u16 q0, q0, #3 @ a0[0..7] >= a3[0..7] ? (5*(a0[0..7]-a3[0..7]))>>3 : 0 -+ vorr q10, q14, q10 @ test clip[8..15] == 0 || a0[8..15] >= pq -+ vcge.s16 q14, q13, q12 -+ vmov.32 r2, d4[1] @ move to gp reg -+ vorr q3, q10, q3 @ test clip[8..15] == 0 || a0[8..15] >= pq || a3[8..15] >= a0[8..15] -+ vmov.32 r3, d5[1] -+ vcge.s16 q2, q0, q11 -+ vbsl q14, q12, q13 @ FFMIN(d[8..15], clip[8..15]) -+ vbsl q2, q11, q0 @ FFMIN(d[0..7], clip[0..7]) -+ vmov.32 r5, d6[1] -+ vbic q0, q14, q10 @ set each d[8..15] to zero if it should not be filtered because clip[8..15] == 0 || a0[8..15] >= pq (a3 > a0 case already zeroed by saturating sub) -+ vmov.32 r6, d7[1] -+ and r12, r2, r3 -+ vbic q2, q2, q9 @ set each d[0..7] to zero if it should not be filtered because clip[0..7] == 0 || a0[0..7] >= pq (a3 > a0 case already zeroed by saturating sub) -+ vmls.i16 q6, q0, q7 @ invert d[8..15] depending on clip_sign[8..15] & a0_sign[8..15], or zero it if they match, and accumulate into P4 -+ vmls.i16 q5, q2, q1 @ invert d[0..7] depending on clip_sign[0..7] & a0_sign[0..7], or zero it if they match, and accumulate into P4 -+ and r14, r5, r6 -+ vmla.i16 q4, q2, q1 @ invert d[0..7] depending on clip_sign[0..7] & a0_sign[0..7], or zero it if they match, and accumulate into P5 -+ and r12, r12, r14 -+ vqmovun.s16 d4, q6 -+ vmla.i16 q8, q0, q7 @ invert d[8..15] depending on clip_sign[8..15] & a0_sign[8..15], or zero it if they match, and accumulate into P5 -+ tst r12, #1 -+ bne 4f @ none of the 16 pixel pairs should be updated in this case -+ vqmovun.s16 d2, q5 -+ vqmovun.s16 d3, q4 -+ vqmovun.s16 d5, q8 -+ tst r2, #1 -+ bne 1f -+ vst2.8 {d2[0], d3[0]}, [r0], r1 -+ vst2.8 {d2[1], d3[1]}, [r0], r1 -+ vst2.8 {d2[2], d3[2]}, [r0], r1 -+ vst2.8 {d2[3], d3[3]}, [r0] -+1: add r0, r4, r1, lsl #2 -+ tst r3, #1 -+ bne 2f -+ vst2.8 {d2[4], d3[4]}, [r4], r1 -+ vst2.8 {d2[5], d3[5]}, [r4], r1 -+ vst2.8 {d2[6], d3[6]}, [r4], r1 -+ vst2.8 {d2[7], d3[7]}, [r4] -+2: add r4, r0, r1, lsl #2 -+ tst r5, #1 -+ bne 3f -+ vst2.8 {d4[0], d5[0]}, [r0], r1 -+ vst2.8 {d4[1], d5[1]}, [r0], r1 -+ vst2.8 {d4[2], d5[2]}, [r0], r1 -+ vst2.8 {d4[3], d5[3]}, [r0] -+3: tst r6, #1 -+ bne 4f -+ vst2.8 {d4[4], d5[4]}, [r4], r1 -+ vst2.8 {d4[5], d5[5]}, [r4], r1 -+ vst2.8 {d4[6], d5[6]}, [r4], r1 -+ vst2.8 {d4[7], d5[7]}, [r4] -+4: vpop {d8-d15} -+ pop {r4-r6,pc} -+endfunc -+ -+@ Copy at most the specified number of bytes from source to destination buffer, -+@ stopping at a multiple of 16 bytes, none of which are the start of an escape sequence -+@ On entry: -+@ r0 -> source buffer -+@ r1 = max number of bytes to copy -+@ r2 -> destination buffer, optimally 8-byte aligned -+@ On exit: -+@ r0 = number of bytes not copied -+function ff_vc1_unescape_buffer_helper_neon, export=1 -+ @ Offset by 48 to screen out cases that are too short for us to handle, -+ @ and also make it easy to test for loop termination, or to determine -+ @ whether we need an odd number of half-iterations of the loop. -+ subs r1, r1, #48 -+ bmi 90f -+ -+ @ Set up useful constants -+ vmov.i32 q0, #0x3000000 -+ vmov.i32 q1, #0x30000 -+ -+ tst r1, #16 -+ bne 1f -+ -+ vld1.8 {q8, q9}, [r0]! -+ vbic q12, q8, q0 -+ vext.8 q13, q8, q9, #1 -+ vext.8 q14, q8, q9, #2 -+ vext.8 q15, q8, q9, #3 -+ veor q12, q12, q1 -+ vbic q13, q13, q0 -+ vbic q14, q14, q0 -+ vbic q15, q15, q0 -+ vceq.i32 q12, q12, #0 -+ veor q13, q13, q1 -+ veor q14, q14, q1 -+ veor q15, q15, q1 -+ vceq.i32 q13, q13, #0 -+ vceq.i32 q14, q14, #0 -+ vceq.i32 q15, q15, #0 -+ add r1, r1, #16 -+ b 3f -+ -+1: vld1.8 {q10, q11}, [r0]! -+ vbic q12, q10, q0 -+ vext.8 q13, q10, q11, #1 -+ vext.8 q14, q10, q11, #2 -+ vext.8 q15, q10, q11, #3 -+ veor q12, q12, q1 -+ vbic q13, q13, q0 -+ vbic q14, q14, q0 -+ vbic q15, q15, q0 -+ vceq.i32 q12, q12, #0 -+ veor q13, q13, q1 -+ veor q14, q14, q1 -+ veor q15, q15, q1 -+ vceq.i32 q13, q13, #0 -+ vceq.i32 q14, q14, #0 -+ vceq.i32 q15, q15, #0 -+ @ Drop through... -+2: vmov q8, q11 -+ vld1.8 {q9}, [r0]! -+ vorr q13, q12, q13 -+ vorr q15, q14, q15 -+ vbic q12, q8, q0 -+ vorr q3, q13, q15 -+ vext.8 q13, q8, q9, #1 -+ vext.8 q14, q8, q9, #2 -+ vext.8 q15, q8, q9, #3 -+ veor q12, q12, q1 -+ vorr d6, d6, d7 -+ vbic q13, q13, q0 -+ vbic q14, q14, q0 -+ vbic q15, q15, q0 -+ vceq.i32 q12, q12, #0 -+ vmov r3, r12, d6 -+ veor q13, q13, q1 -+ veor q14, q14, q1 -+ veor q15, q15, q1 -+ vceq.i32 q13, q13, #0 -+ vceq.i32 q14, q14, #0 -+ vceq.i32 q15, q15, #0 -+ orrs r3, r3, r12 -+ bne 90f -+ vst1.64 {q10}, [r2]! -+3: vmov q10, q9 -+ vld1.8 {q11}, [r0]! -+ vorr q13, q12, q13 -+ vorr q15, q14, q15 -+ vbic q12, q10, q0 -+ vorr q3, q13, q15 -+ vext.8 q13, q10, q11, #1 -+ vext.8 q14, q10, q11, #2 -+ vext.8 q15, q10, q11, #3 -+ veor q12, q12, q1 -+ vorr d6, d6, d7 -+ vbic q13, q13, q0 -+ vbic q14, q14, q0 -+ vbic q15, q15, q0 -+ vceq.i32 q12, q12, #0 -+ vmov r3, r12, d6 -+ veor q13, q13, q1 -+ veor q14, q14, q1 -+ veor q15, q15, q1 -+ vceq.i32 q13, q13, #0 -+ vceq.i32 q14, q14, #0 -+ vceq.i32 q15, q15, #0 -+ orrs r3, r3, r12 -+ bne 91f -+ vst1.64 {q8}, [r2]! -+ subs r1, r1, #32 -+ bpl 2b -+ -+90: add r0, r1, #48 -+ bx lr -+ -+91: sub r1, r1, #16 -+ b 90b -+endfunc ---- a/libavcodec/avcodec.h -+++ b/libavcodec/avcodec.h -@@ -2567,6 +2567,17 @@ typedef struct AVHWAccel { - * that avctx->hwaccel_priv_data is invalid. - */ - int (*frame_params)(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx); -+ -+ /** -+ * Called if parsing fails -+ * -+ * An error has occured, end_frame will not be called -+ * start_frame & decode_slice may or may not have been called -+ * Optional -+ * -+ * @param avctx the codec context -+ */ -+ void (*abort_frame)(AVCodecContext *avctx); - } AVHWAccel; - - /** ---- a/libavcodec/cabac.h -+++ b/libavcodec/cabac.h -@@ -43,7 +43,14 @@ extern const uint8_t ff_h264_cabac_table - typedef struct CABACContext{ - int low; - int range; -- int outstanding_count; -+ union -+ { -+ int outstanding_count; -+ struct { -+ uint16_t bits; -+ uint16_t range; -+ } by22; -+ }; - const uint8_t *bytestream_start; - const uint8_t *bytestream; - const uint8_t *bytestream_end; ---- a/libavcodec/codec.h -+++ b/libavcodec/codec.h -@@ -350,6 +350,17 @@ const AVCodec *av_codec_iterate(void **o - AVCodec *avcodec_find_decoder(enum AVCodecID id); - - /** -+ * Find a registered decoder with a matching codec ID and pix_fmt. -+ * A decoder will pix_fmt set to NULL will match any fmt. -+ * A fmt of AV_PIX_FMT_NONE will only match a decoder will px_fmt NULL. -+ * -+ * @param id AVCodecID of the requested decoder -+ * @param fmt AVPixelForma that msut be supported by decoder -+ * @return A decoder if one was found, NULL otherwise. -+ */ -+AVCodec *avcodec_find_decoder_by_id_and_fmt(enum AVCodecID id, enum AVPixelFormat fmt); -+ -+/** - * Find a registered decoder with the specified name. - * - * @param name name of the requested decoder ---- /dev/null -+++ b/libavcodec/hevc-ctrls-v1.h -@@ -0,0 +1,229 @@ -+/* SPDX-License-Identifier: GPL-2.0 */ -+/* -+ * These are the HEVC state controls for use with stateless HEVC -+ * codec drivers. -+ * -+ * It turns out that these structs are not stable yet and will undergo -+ * more changes. So keep them private until they are stable and ready to -+ * become part of the official public API. -+ */ -+ -+#ifndef _HEVC_CTRLS_H_ -+#define _HEVC_CTRLS_H_ -+ -+#include -+ -+/* The pixel format isn't stable at the moment and will likely be renamed. */ -+#define V4L2_PIX_FMT_HEVC_SLICE v4l2_fourcc('S', '2', '6', '5') /* HEVC parsed slices */ -+ -+#define V4L2_CID_MPEG_VIDEO_HEVC_SPS (V4L2_CID_MPEG_BASE + 1008) -+#define V4L2_CID_MPEG_VIDEO_HEVC_PPS (V4L2_CID_MPEG_BASE + 1009) -+#define V4L2_CID_MPEG_VIDEO_HEVC_SLICE_PARAMS (V4L2_CID_MPEG_BASE + 1010) -+#define V4L2_CID_MPEG_VIDEO_HEVC_SCALING_MATRIX (V4L2_CID_MPEG_BASE + 1011) -+#define V4L2_CID_MPEG_VIDEO_HEVC_DECODE_MODE (V4L2_CID_MPEG_BASE + 1015) -+#define V4L2_CID_MPEG_VIDEO_HEVC_START_CODE (V4L2_CID_MPEG_BASE + 1016) -+ -+/* enum v4l2_ctrl_type type values */ -+#define V4L2_CTRL_TYPE_HEVC_SPS 0x0120 -+#define V4L2_CTRL_TYPE_HEVC_PPS 0x0121 -+#define V4L2_CTRL_TYPE_HEVC_SLICE_PARAMS 0x0122 -+#define V4L2_CTRL_TYPE_HEVC_SCALING_MATRIX 0x0123 -+ -+enum v4l2_mpeg_video_hevc_decode_mode { -+ V4L2_MPEG_VIDEO_HEVC_DECODE_MODE_SLICE_BASED, -+ V4L2_MPEG_VIDEO_HEVC_DECODE_MODE_FRAME_BASED, -+}; -+ -+enum v4l2_mpeg_video_hevc_start_code { -+ V4L2_MPEG_VIDEO_HEVC_START_CODE_NONE, -+ V4L2_MPEG_VIDEO_HEVC_START_CODE_ANNEX_B, -+}; -+ -+#define V4L2_HEVC_SLICE_TYPE_B 0 -+#define V4L2_HEVC_SLICE_TYPE_P 1 -+#define V4L2_HEVC_SLICE_TYPE_I 2 -+ -+#define V4L2_HEVC_SPS_FLAG_SEPARATE_COLOUR_PLANE (1ULL << 0) -+#define V4L2_HEVC_SPS_FLAG_SCALING_LIST_ENABLED (1ULL << 1) -+#define V4L2_HEVC_SPS_FLAG_AMP_ENABLED (1ULL << 2) -+#define V4L2_HEVC_SPS_FLAG_SAMPLE_ADAPTIVE_OFFSET (1ULL << 3) -+#define V4L2_HEVC_SPS_FLAG_PCM_ENABLED (1ULL << 4) -+#define V4L2_HEVC_SPS_FLAG_PCM_LOOP_FILTER_DISABLED (1ULL << 5) -+#define V4L2_HEVC_SPS_FLAG_LONG_TERM_REF_PICS_PRESENT (1ULL << 6) -+#define V4L2_HEVC_SPS_FLAG_SPS_TEMPORAL_MVP_ENABLED (1ULL << 7) -+#define V4L2_HEVC_SPS_FLAG_STRONG_INTRA_SMOOTHING_ENABLED (1ULL << 8) -+ -+/* The controls are not stable at the moment and will likely be reworked. */ -+struct v4l2_ctrl_hevc_sps { -+ /* ISO/IEC 23008-2, ITU-T Rec. H.265: Sequence parameter set */ -+ __u16 pic_width_in_luma_samples; -+ __u16 pic_height_in_luma_samples; -+ __u8 bit_depth_luma_minus8; -+ __u8 bit_depth_chroma_minus8; -+ __u8 log2_max_pic_order_cnt_lsb_minus4; -+ __u8 sps_max_dec_pic_buffering_minus1; -+ __u8 sps_max_num_reorder_pics; -+ __u8 sps_max_latency_increase_plus1; -+ __u8 log2_min_luma_coding_block_size_minus3; -+ __u8 log2_diff_max_min_luma_coding_block_size; -+ __u8 log2_min_luma_transform_block_size_minus2; -+ __u8 log2_diff_max_min_luma_transform_block_size; -+ __u8 max_transform_hierarchy_depth_inter; -+ __u8 max_transform_hierarchy_depth_intra; -+ __u8 pcm_sample_bit_depth_luma_minus1; -+ __u8 pcm_sample_bit_depth_chroma_minus1; -+ __u8 log2_min_pcm_luma_coding_block_size_minus3; -+ __u8 log2_diff_max_min_pcm_luma_coding_block_size; -+ __u8 num_short_term_ref_pic_sets; -+ __u8 num_long_term_ref_pics_sps; -+ __u8 chroma_format_idc; -+ __u8 sps_max_sub_layers_minus1; -+ -+ __u64 flags; -+}; -+ -+#define V4L2_HEVC_PPS_FLAG_DEPENDENT_SLICE_SEGMENT (1ULL << 0) -+#define V4L2_HEVC_PPS_FLAG_OUTPUT_FLAG_PRESENT (1ULL << 1) -+#define V4L2_HEVC_PPS_FLAG_SIGN_DATA_HIDING_ENABLED (1ULL << 2) -+#define V4L2_HEVC_PPS_FLAG_CABAC_INIT_PRESENT (1ULL << 3) -+#define V4L2_HEVC_PPS_FLAG_CONSTRAINED_INTRA_PRED (1ULL << 4) -+#define V4L2_HEVC_PPS_FLAG_TRANSFORM_SKIP_ENABLED (1ULL << 5) -+#define V4L2_HEVC_PPS_FLAG_CU_QP_DELTA_ENABLED (1ULL << 6) -+#define V4L2_HEVC_PPS_FLAG_PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT (1ULL << 7) -+#define V4L2_HEVC_PPS_FLAG_WEIGHTED_PRED (1ULL << 8) -+#define V4L2_HEVC_PPS_FLAG_WEIGHTED_BIPRED (1ULL << 9) -+#define V4L2_HEVC_PPS_FLAG_TRANSQUANT_BYPASS_ENABLED (1ULL << 10) -+#define V4L2_HEVC_PPS_FLAG_TILES_ENABLED (1ULL << 11) -+#define V4L2_HEVC_PPS_FLAG_ENTROPY_CODING_SYNC_ENABLED (1ULL << 12) -+#define V4L2_HEVC_PPS_FLAG_LOOP_FILTER_ACROSS_TILES_ENABLED (1ULL << 13) -+#define V4L2_HEVC_PPS_FLAG_PPS_LOOP_FILTER_ACROSS_SLICES_ENABLED (1ULL << 14) -+#define V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_OVERRIDE_ENABLED (1ULL << 15) -+#define V4L2_HEVC_PPS_FLAG_PPS_DISABLE_DEBLOCKING_FILTER (1ULL << 16) -+#define V4L2_HEVC_PPS_FLAG_LISTS_MODIFICATION_PRESENT (1ULL << 17) -+#define V4L2_HEVC_PPS_FLAG_SLICE_SEGMENT_HEADER_EXTENSION_PRESENT (1ULL << 18) -+ -+struct v4l2_ctrl_hevc_pps { -+ /* ISO/IEC 23008-2, ITU-T Rec. H.265: Picture parameter set */ -+ __u8 num_extra_slice_header_bits; -+ __s8 init_qp_minus26; -+ __u8 diff_cu_qp_delta_depth; -+ __s8 pps_cb_qp_offset; -+ __s8 pps_cr_qp_offset; -+ __u8 num_tile_columns_minus1; -+ __u8 num_tile_rows_minus1; -+ __u8 column_width_minus1[20]; -+ __u8 row_height_minus1[22]; -+ __s8 pps_beta_offset_div2; -+ __s8 pps_tc_offset_div2; -+ __u8 log2_parallel_merge_level_minus2; -+ -+ __u8 padding[4]; -+ __u64 flags; -+}; -+ -+#define V4L2_HEVC_DPB_ENTRY_RPS_ST_CURR_BEFORE 0x01 -+#define V4L2_HEVC_DPB_ENTRY_RPS_ST_CURR_AFTER 0x02 -+#define V4L2_HEVC_DPB_ENTRY_RPS_LT_CURR 0x03 -+ -+#define V4L2_HEVC_DPB_ENTRIES_NUM_MAX 16 -+ -+struct v4l2_hevc_dpb_entry { -+ __u64 timestamp; -+ __u8 rps; -+ __u8 field_pic; -+ __u16 pic_order_cnt[2]; -+ __u8 padding[2]; -+}; -+ -+struct v4l2_hevc_pred_weight_table { -+ __s8 delta_luma_weight_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; -+ __s8 luma_offset_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; -+ __s8 delta_chroma_weight_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]; -+ __s8 chroma_offset_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]; -+ -+ __s8 delta_luma_weight_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; -+ __s8 luma_offset_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; -+ __s8 delta_chroma_weight_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]; -+ __s8 chroma_offset_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]; -+ -+ __u8 padding[6]; -+ -+ __u8 luma_log2_weight_denom; -+ __s8 delta_chroma_log2_weight_denom; -+}; -+ -+#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_LUMA (1ULL << 0) -+#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_CHROMA (1ULL << 1) -+#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_TEMPORAL_MVP_ENABLED (1ULL << 2) -+#define V4L2_HEVC_SLICE_PARAMS_FLAG_MVD_L1_ZERO (1ULL << 3) -+#define V4L2_HEVC_SLICE_PARAMS_FLAG_CABAC_INIT (1ULL << 4) -+#define V4L2_HEVC_SLICE_PARAMS_FLAG_COLLOCATED_FROM_L0 (1ULL << 5) -+#define V4L2_HEVC_SLICE_PARAMS_FLAG_USE_INTEGER_MV (1ULL << 6) -+#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_DEBLOCKING_FILTER_DISABLED (1ULL << 7) -+#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_LOOP_FILTER_ACROSS_SLICES_ENABLED (1ULL << 8) -+#define V4L2_HEVC_SLICE_PARAMS_FLAG_DEPENDENT_SLICE_SEGMENT (1ULL << 9) -+ -+struct v4l2_ctrl_hevc_slice_params { -+ __u32 bit_size; -+ __u32 data_bit_offset; -+ -+ /* ISO/IEC 23008-2, ITU-T Rec. H.265: General slice segment header */ -+ __u32 slice_segment_addr; -+ __u32 num_entry_point_offsets; -+ -+ /* ISO/IEC 23008-2, ITU-T Rec. H.265: NAL unit header */ -+ __u8 nal_unit_type; -+ __u8 nuh_temporal_id_plus1; -+ -+ /* ISO/IEC 23008-2, ITU-T Rec. H.265: General slice segment header */ -+ __u8 slice_type; -+ __u8 colour_plane_id; -+ __u16 slice_pic_order_cnt; -+ __u8 num_ref_idx_l0_active_minus1; -+ __u8 num_ref_idx_l1_active_minus1; -+ __u8 collocated_ref_idx; -+ __u8 five_minus_max_num_merge_cand; -+ __s8 slice_qp_delta; -+ __s8 slice_cb_qp_offset; -+ __s8 slice_cr_qp_offset; -+ __s8 slice_act_y_qp_offset; -+ __s8 slice_act_cb_qp_offset; -+ __s8 slice_act_cr_qp_offset; -+ __s8 slice_beta_offset_div2; -+ __s8 slice_tc_offset_div2; -+ -+ /* ISO/IEC 23008-2, ITU-T Rec. H.265: Picture timing SEI message */ -+ __u8 pic_struct; -+ -+ /* ISO/IEC 23008-2, ITU-T Rec. H.265: General slice segment header */ -+ __u8 num_active_dpb_entries; -+ __u8 ref_idx_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; -+ __u8 ref_idx_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; -+ -+ __u8 num_rps_poc_st_curr_before; -+ __u8 num_rps_poc_st_curr_after; -+ __u8 num_rps_poc_lt_curr; -+ -+ __u8 padding; -+ -+ __u32 entry_point_offset_minus1[256]; -+ -+ /* ISO/IEC 23008-2, ITU-T Rec. H.265: General slice segment header */ -+ struct v4l2_hevc_dpb_entry dpb[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; -+ -+ /* ISO/IEC 23008-2, ITU-T Rec. H.265: Weighted prediction parameter */ -+ struct v4l2_hevc_pred_weight_table pred_weight_table; -+ -+ __u64 flags; -+}; -+ -+struct v4l2_ctrl_hevc_scaling_matrix { -+ __u8 scaling_list_4x4[6][16]; -+ __u8 scaling_list_8x8[6][64]; -+ __u8 scaling_list_16x16[6][64]; -+ __u8 scaling_list_32x32[2][64]; -+ __u8 scaling_list_dc_coef_16x16[6]; -+ __u8 scaling_list_dc_coef_32x32[2]; -+}; -+ -+#endif ---- /dev/null -+++ b/libavcodec/hevc-ctrls-v2.h -@@ -0,0 +1,257 @@ -+/* SPDX-License-Identifier: GPL-2.0 */ -+/* -+ * These are the HEVC state controls for use with stateless HEVC -+ * codec drivers. -+ * -+ * It turns out that these structs are not stable yet and will undergo -+ * more changes. So keep them private until they are stable and ready to -+ * become part of the official public API. -+ */ -+ -+#ifndef _HEVC_CTRLS_H_ -+#define _HEVC_CTRLS_H_ -+ -+#include -+ -+/* The pixel format isn't stable at the moment and will likely be renamed. */ -+#define V4L2_PIX_FMT_HEVC_SLICE v4l2_fourcc('S', '2', '6', '5') /* HEVC parsed slices */ -+ -+#define V4L2_CID_MPEG_VIDEO_HEVC_SPS (V4L2_CID_CODEC_BASE + 1008) -+#define V4L2_CID_MPEG_VIDEO_HEVC_PPS (V4L2_CID_CODEC_BASE + 1009) -+#define V4L2_CID_MPEG_VIDEO_HEVC_SLICE_PARAMS (V4L2_CID_CODEC_BASE + 1010) -+#define V4L2_CID_MPEG_VIDEO_HEVC_SCALING_MATRIX (V4L2_CID_CODEC_BASE + 1011) -+#define V4L2_CID_MPEG_VIDEO_HEVC_DECODE_PARAMS (V4L2_CID_CODEC_BASE + 1012) -+#define V4L2_CID_MPEG_VIDEO_HEVC_DECODE_MODE (V4L2_CID_CODEC_BASE + 1015) -+#define V4L2_CID_MPEG_VIDEO_HEVC_START_CODE (V4L2_CID_CODEC_BASE + 1016) -+ -+/* enum v4l2_ctrl_type type values */ -+#define V4L2_CTRL_TYPE_HEVC_SPS 0x0120 -+#define V4L2_CTRL_TYPE_HEVC_PPS 0x0121 -+#define V4L2_CTRL_TYPE_HEVC_SLICE_PARAMS 0x0122 -+#define V4L2_CTRL_TYPE_HEVC_SCALING_MATRIX 0x0123 -+#define V4L2_CTRL_TYPE_HEVC_DECODE_PARAMS 0x0124 -+ -+enum v4l2_mpeg_video_hevc_decode_mode { -+ V4L2_MPEG_VIDEO_HEVC_DECODE_MODE_SLICE_BASED, -+ V4L2_MPEG_VIDEO_HEVC_DECODE_MODE_FRAME_BASED, -+}; -+ -+enum v4l2_mpeg_video_hevc_start_code { -+ V4L2_MPEG_VIDEO_HEVC_START_CODE_NONE, -+ V4L2_MPEG_VIDEO_HEVC_START_CODE_ANNEX_B, -+}; -+ -+#define V4L2_HEVC_SLICE_TYPE_B 0 -+#define V4L2_HEVC_SLICE_TYPE_P 1 -+#define V4L2_HEVC_SLICE_TYPE_I 2 -+ -+#define V4L2_HEVC_SPS_FLAG_SEPARATE_COLOUR_PLANE (1ULL << 0) -+#define V4L2_HEVC_SPS_FLAG_SCALING_LIST_ENABLED (1ULL << 1) -+#define V4L2_HEVC_SPS_FLAG_AMP_ENABLED (1ULL << 2) -+#define V4L2_HEVC_SPS_FLAG_SAMPLE_ADAPTIVE_OFFSET (1ULL << 3) -+#define V4L2_HEVC_SPS_FLAG_PCM_ENABLED (1ULL << 4) -+#define V4L2_HEVC_SPS_FLAG_PCM_LOOP_FILTER_DISABLED (1ULL << 5) -+#define V4L2_HEVC_SPS_FLAG_LONG_TERM_REF_PICS_PRESENT (1ULL << 6) -+#define V4L2_HEVC_SPS_FLAG_SPS_TEMPORAL_MVP_ENABLED (1ULL << 7) -+#define V4L2_HEVC_SPS_FLAG_STRONG_INTRA_SMOOTHING_ENABLED (1ULL << 8) -+ -+/* The controls are not stable at the moment and will likely be reworked. */ -+struct v4l2_ctrl_hevc_sps { -+ /* ISO/IEC 23008-2, ITU-T Rec. H.265: Sequence parameter set */ -+ __u16 pic_width_in_luma_samples; -+ __u16 pic_height_in_luma_samples; -+ __u8 bit_depth_luma_minus8; -+ __u8 bit_depth_chroma_minus8; -+ __u8 log2_max_pic_order_cnt_lsb_minus4; -+ __u8 sps_max_dec_pic_buffering_minus1; -+ __u8 sps_max_num_reorder_pics; -+ __u8 sps_max_latency_increase_plus1; -+ __u8 log2_min_luma_coding_block_size_minus3; -+ __u8 log2_diff_max_min_luma_coding_block_size; -+ __u8 log2_min_luma_transform_block_size_minus2; -+ __u8 log2_diff_max_min_luma_transform_block_size; -+ __u8 max_transform_hierarchy_depth_inter; -+ __u8 max_transform_hierarchy_depth_intra; -+ __u8 pcm_sample_bit_depth_luma_minus1; -+ __u8 pcm_sample_bit_depth_chroma_minus1; -+ __u8 log2_min_pcm_luma_coding_block_size_minus3; -+ __u8 log2_diff_max_min_pcm_luma_coding_block_size; -+ __u8 num_short_term_ref_pic_sets; -+ __u8 num_long_term_ref_pics_sps; -+ __u8 chroma_format_idc; -+ __u8 sps_max_sub_layers_minus1; -+ -+ __u64 flags; -+}; -+ -+#define V4L2_HEVC_PPS_FLAG_DEPENDENT_SLICE_SEGMENT_ENABLED (1ULL << 0) -+#define V4L2_HEVC_PPS_FLAG_OUTPUT_FLAG_PRESENT (1ULL << 1) -+#define V4L2_HEVC_PPS_FLAG_SIGN_DATA_HIDING_ENABLED (1ULL << 2) -+#define V4L2_HEVC_PPS_FLAG_CABAC_INIT_PRESENT (1ULL << 3) -+#define V4L2_HEVC_PPS_FLAG_CONSTRAINED_INTRA_PRED (1ULL << 4) -+#define V4L2_HEVC_PPS_FLAG_TRANSFORM_SKIP_ENABLED (1ULL << 5) -+#define V4L2_HEVC_PPS_FLAG_CU_QP_DELTA_ENABLED (1ULL << 6) -+#define V4L2_HEVC_PPS_FLAG_PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT (1ULL << 7) -+#define V4L2_HEVC_PPS_FLAG_WEIGHTED_PRED (1ULL << 8) -+#define V4L2_HEVC_PPS_FLAG_WEIGHTED_BIPRED (1ULL << 9) -+#define V4L2_HEVC_PPS_FLAG_TRANSQUANT_BYPASS_ENABLED (1ULL << 10) -+#define V4L2_HEVC_PPS_FLAG_TILES_ENABLED (1ULL << 11) -+#define V4L2_HEVC_PPS_FLAG_ENTROPY_CODING_SYNC_ENABLED (1ULL << 12) -+#define V4L2_HEVC_PPS_FLAG_LOOP_FILTER_ACROSS_TILES_ENABLED (1ULL << 13) -+#define V4L2_HEVC_PPS_FLAG_PPS_LOOP_FILTER_ACROSS_SLICES_ENABLED (1ULL << 14) -+#define V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_OVERRIDE_ENABLED (1ULL << 15) -+#define V4L2_HEVC_PPS_FLAG_PPS_DISABLE_DEBLOCKING_FILTER (1ULL << 16) -+#define V4L2_HEVC_PPS_FLAG_LISTS_MODIFICATION_PRESENT (1ULL << 17) -+#define V4L2_HEVC_PPS_FLAG_SLICE_SEGMENT_HEADER_EXTENSION_PRESENT (1ULL << 18) -+#define V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_CONTROL_PRESENT (1ULL << 19) -+#define V4L2_HEVC_PPS_FLAG_UNIFORM_SPACING (1ULL << 20) -+ -+struct v4l2_ctrl_hevc_pps { -+ /* ISO/IEC 23008-2, ITU-T Rec. H.265: Picture parameter set */ -+ __u8 num_extra_slice_header_bits; -+ __u8 num_ref_idx_l0_default_active_minus1; -+ __u8 num_ref_idx_l1_default_active_minus1; -+ __s8 init_qp_minus26; -+ __u8 diff_cu_qp_delta_depth; -+ __s8 pps_cb_qp_offset; -+ __s8 pps_cr_qp_offset; -+ __u8 num_tile_columns_minus1; -+ __u8 num_tile_rows_minus1; -+ __u8 column_width_minus1[20]; -+ __u8 row_height_minus1[22]; -+ __s8 pps_beta_offset_div2; -+ __s8 pps_tc_offset_div2; -+ __u8 log2_parallel_merge_level_minus2; -+ -+ __u8 padding[4]; -+ __u64 flags; -+}; -+ -+#define V4L2_HEVC_DPB_ENTRY_RPS_ST_CURR_BEFORE 0x01 -+#define V4L2_HEVC_DPB_ENTRY_RPS_ST_CURR_AFTER 0x02 -+#define V4L2_HEVC_DPB_ENTRY_RPS_LT_CURR 0x03 -+ -+#define V4L2_HEVC_DPB_ENTRIES_NUM_MAX 16 -+ -+struct v4l2_hevc_dpb_entry { -+ __u64 timestamp; -+ __u8 rps; -+ __u8 field_pic; -+ __u16 pic_order_cnt[2]; -+ __u8 padding[2]; -+}; -+ -+struct v4l2_hevc_pred_weight_table { -+ __s8 delta_luma_weight_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; -+ __s8 luma_offset_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; -+ __s8 delta_chroma_weight_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]; -+ __s8 chroma_offset_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]; -+ -+ __s8 delta_luma_weight_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; -+ __s8 luma_offset_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; -+ __s8 delta_chroma_weight_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]; -+ __s8 chroma_offset_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]; -+ -+ __u8 padding[6]; -+ -+ __u8 luma_log2_weight_denom; -+ __s8 delta_chroma_log2_weight_denom; -+}; -+ -+#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_LUMA (1ULL << 0) -+#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_CHROMA (1ULL << 1) -+#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_TEMPORAL_MVP_ENABLED (1ULL << 2) -+#define V4L2_HEVC_SLICE_PARAMS_FLAG_MVD_L1_ZERO (1ULL << 3) -+#define V4L2_HEVC_SLICE_PARAMS_FLAG_CABAC_INIT (1ULL << 4) -+#define V4L2_HEVC_SLICE_PARAMS_FLAG_COLLOCATED_FROM_L0 (1ULL << 5) -+#define V4L2_HEVC_SLICE_PARAMS_FLAG_USE_INTEGER_MV (1ULL << 6) -+#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_DEBLOCKING_FILTER_DISABLED (1ULL << 7) -+#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_LOOP_FILTER_ACROSS_SLICES_ENABLED (1ULL << 8) -+#define V4L2_HEVC_SLICE_PARAMS_FLAG_DEPENDENT_SLICE_SEGMENT (1ULL << 9) -+ -+struct v4l2_ctrl_hevc_slice_params { -+ __u32 bit_size; -+ __u32 data_bit_offset; -+ -+ /* ISO/IEC 23008-2, ITU-T Rec. H.265: General slice segment header */ -+ __u32 slice_segment_addr; -+ __u32 num_entry_point_offsets; -+ -+ /* ISO/IEC 23008-2, ITU-T Rec. H.265: NAL unit header */ -+ __u8 nal_unit_type; -+ __u8 nuh_temporal_id_plus1; -+ -+ /* ISO/IEC 23008-2, ITU-T Rec. H.265: General slice segment header */ -+ __u8 slice_type; -+ __u8 colour_plane_id; -+ __u16 slice_pic_order_cnt; -+ __u8 num_ref_idx_l0_active_minus1; -+ __u8 num_ref_idx_l1_active_minus1; -+ __u8 collocated_ref_idx; -+ __u8 five_minus_max_num_merge_cand; -+ __s8 slice_qp_delta; -+ __s8 slice_cb_qp_offset; -+ __s8 slice_cr_qp_offset; -+ __s8 slice_act_y_qp_offset; -+ __s8 slice_act_cb_qp_offset; -+ __s8 slice_act_cr_qp_offset; -+ __s8 slice_beta_offset_div2; -+ __s8 slice_tc_offset_div2; -+ -+ /* ISO/IEC 23008-2, ITU-T Rec. H.265: Picture timing SEI message */ -+ __u8 pic_struct; -+ -+ /* ISO/IEC 23008-2, ITU-T Rec. H.265: General slice segment header */ -+ __u8 ref_idx_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; -+ __u8 ref_idx_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; -+ -+ __u8 padding[5]; -+ -+ __u32 entry_point_offset_minus1[256]; -+ -+ /* ISO/IEC 23008-2, ITU-T Rec. H.265: Weighted prediction parameter */ -+ struct v4l2_hevc_pred_weight_table pred_weight_table; -+ -+ __u64 flags; -+}; -+ -+#define V4L2_HEVC_DECODE_PARAM_FLAG_IRAP_PIC 0x1 -+#define V4L2_HEVC_DECODE_PARAM_FLAG_IDR_PIC 0x2 -+#define V4L2_HEVC_DECODE_PARAM_FLAG_NO_OUTPUT_OF_PRIOR 0x4 -+ -+struct v4l2_ctrl_hevc_decode_params { -+ __s32 pic_order_cnt_val; -+ __u8 num_active_dpb_entries; -+ struct v4l2_hevc_dpb_entry dpb[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; -+ __u8 num_poc_st_curr_before; -+ __u8 num_poc_st_curr_after; -+ __u8 num_poc_lt_curr; -+ __u8 poc_st_curr_before[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; -+ __u8 poc_st_curr_after[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; -+ __u8 poc_lt_curr[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; -+ __u64 flags; -+}; -+ -+/* MPEG-class control IDs specific to the Hantro driver as defined by V4L2 */ -+#define V4L2_CID_CODEC_HANTRO_BASE (V4L2_CTRL_CLASS_CODEC | 0x1200) -+/* -+ * V4L2_CID_HANTRO_HEVC_SLICE_HEADER_SKIP - -+ * the number of data (in bits) to skip in the -+ * slice segment header. -+ * If non-IDR, the bits to be skipped go from syntax element "pic_output_flag" -+ * to before syntax element "slice_temporal_mvp_enabled_flag". -+ * If IDR, the skipped bits are just "pic_output_flag" -+ * (separate_colour_plane_flag is not supported). -+ */ -+#define V4L2_CID_HANTRO_HEVC_SLICE_HEADER_SKIP (V4L2_CID_CODEC_HANTRO_BASE + 0) -+ -+struct v4l2_ctrl_hevc_scaling_matrix { -+ __u8 scaling_list_4x4[6][16]; -+ __u8 scaling_list_8x8[6][64]; -+ __u8 scaling_list_16x16[6][64]; -+ __u8 scaling_list_32x32[2][64]; -+ __u8 scaling_list_dc_coef_16x16[6]; -+ __u8 scaling_list_dc_coef_32x32[2]; -+}; -+ -+#endif ---- /dev/null -+++ b/libavcodec/hevc-ctrls-v3.h -@@ -0,0 +1,255 @@ -+/* SPDX-License-Identifier: GPL-2.0 */ -+/* -+ * These are the HEVC state controls for use with stateless HEVC -+ * codec drivers. -+ * -+ * It turns out that these structs are not stable yet and will undergo -+ * more changes. So keep them private until they are stable and ready to -+ * become part of the official public API. -+ */ -+ -+#ifndef _HEVC_CTRLS_H_ -+#define _HEVC_CTRLS_H_ -+ -+#include -+ -+/* The pixel format isn't stable at the moment and will likely be renamed. */ -+#define V4L2_PIX_FMT_HEVC_SLICE v4l2_fourcc('S', '2', '6', '5') /* HEVC parsed slices */ -+ -+#define V4L2_CID_MPEG_VIDEO_HEVC_SPS (V4L2_CID_CODEC_BASE + 1008) -+#define V4L2_CID_MPEG_VIDEO_HEVC_PPS (V4L2_CID_CODEC_BASE + 1009) -+#define V4L2_CID_MPEG_VIDEO_HEVC_SLICE_PARAMS (V4L2_CID_CODEC_BASE + 1010) -+#define V4L2_CID_MPEG_VIDEO_HEVC_SCALING_MATRIX (V4L2_CID_CODEC_BASE + 1011) -+#define V4L2_CID_MPEG_VIDEO_HEVC_DECODE_PARAMS (V4L2_CID_CODEC_BASE + 1012) -+#define V4L2_CID_MPEG_VIDEO_HEVC_DECODE_MODE (V4L2_CID_CODEC_BASE + 1015) -+#define V4L2_CID_MPEG_VIDEO_HEVC_START_CODE (V4L2_CID_CODEC_BASE + 1016) -+ -+/* enum v4l2_ctrl_type type values */ -+#define V4L2_CTRL_TYPE_HEVC_SPS 0x0120 -+#define V4L2_CTRL_TYPE_HEVC_PPS 0x0121 -+#define V4L2_CTRL_TYPE_HEVC_SLICE_PARAMS 0x0122 -+#define V4L2_CTRL_TYPE_HEVC_SCALING_MATRIX 0x0123 -+#define V4L2_CTRL_TYPE_HEVC_DECODE_PARAMS 0x0124 -+ -+enum v4l2_mpeg_video_hevc_decode_mode { -+ V4L2_MPEG_VIDEO_HEVC_DECODE_MODE_SLICE_BASED, -+ V4L2_MPEG_VIDEO_HEVC_DECODE_MODE_FRAME_BASED, -+}; -+ -+enum v4l2_mpeg_video_hevc_start_code { -+ V4L2_MPEG_VIDEO_HEVC_START_CODE_NONE, -+ V4L2_MPEG_VIDEO_HEVC_START_CODE_ANNEX_B, -+}; -+ -+#define V4L2_HEVC_SLICE_TYPE_B 0 -+#define V4L2_HEVC_SLICE_TYPE_P 1 -+#define V4L2_HEVC_SLICE_TYPE_I 2 -+ -+#define V4L2_HEVC_SPS_FLAG_SEPARATE_COLOUR_PLANE (1ULL << 0) -+#define V4L2_HEVC_SPS_FLAG_SCALING_LIST_ENABLED (1ULL << 1) -+#define V4L2_HEVC_SPS_FLAG_AMP_ENABLED (1ULL << 2) -+#define V4L2_HEVC_SPS_FLAG_SAMPLE_ADAPTIVE_OFFSET (1ULL << 3) -+#define V4L2_HEVC_SPS_FLAG_PCM_ENABLED (1ULL << 4) -+#define V4L2_HEVC_SPS_FLAG_PCM_LOOP_FILTER_DISABLED (1ULL << 5) -+#define V4L2_HEVC_SPS_FLAG_LONG_TERM_REF_PICS_PRESENT (1ULL << 6) -+#define V4L2_HEVC_SPS_FLAG_SPS_TEMPORAL_MVP_ENABLED (1ULL << 7) -+#define V4L2_HEVC_SPS_FLAG_STRONG_INTRA_SMOOTHING_ENABLED (1ULL << 8) -+ -+/* The controls are not stable at the moment and will likely be reworked. */ -+struct v4l2_ctrl_hevc_sps { -+ /* ISO/IEC 23008-2, ITU-T Rec. H.265: Sequence parameter set */ -+ __u16 pic_width_in_luma_samples; -+ __u16 pic_height_in_luma_samples; -+ __u8 bit_depth_luma_minus8; -+ __u8 bit_depth_chroma_minus8; -+ __u8 log2_max_pic_order_cnt_lsb_minus4; -+ __u8 sps_max_dec_pic_buffering_minus1; -+ __u8 sps_max_num_reorder_pics; -+ __u8 sps_max_latency_increase_plus1; -+ __u8 log2_min_luma_coding_block_size_minus3; -+ __u8 log2_diff_max_min_luma_coding_block_size; -+ __u8 log2_min_luma_transform_block_size_minus2; -+ __u8 log2_diff_max_min_luma_transform_block_size; -+ __u8 max_transform_hierarchy_depth_inter; -+ __u8 max_transform_hierarchy_depth_intra; -+ __u8 pcm_sample_bit_depth_luma_minus1; -+ __u8 pcm_sample_bit_depth_chroma_minus1; -+ __u8 log2_min_pcm_luma_coding_block_size_minus3; -+ __u8 log2_diff_max_min_pcm_luma_coding_block_size; -+ __u8 num_short_term_ref_pic_sets; -+ __u8 num_long_term_ref_pics_sps; -+ __u8 chroma_format_idc; -+ __u8 sps_max_sub_layers_minus1; -+ -+ __u64 flags; -+}; -+ -+#define V4L2_HEVC_PPS_FLAG_DEPENDENT_SLICE_SEGMENT_ENABLED (1ULL << 0) -+#define V4L2_HEVC_PPS_FLAG_OUTPUT_FLAG_PRESENT (1ULL << 1) -+#define V4L2_HEVC_PPS_FLAG_SIGN_DATA_HIDING_ENABLED (1ULL << 2) -+#define V4L2_HEVC_PPS_FLAG_CABAC_INIT_PRESENT (1ULL << 3) -+#define V4L2_HEVC_PPS_FLAG_CONSTRAINED_INTRA_PRED (1ULL << 4) -+#define V4L2_HEVC_PPS_FLAG_TRANSFORM_SKIP_ENABLED (1ULL << 5) -+#define V4L2_HEVC_PPS_FLAG_CU_QP_DELTA_ENABLED (1ULL << 6) -+#define V4L2_HEVC_PPS_FLAG_PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT (1ULL << 7) -+#define V4L2_HEVC_PPS_FLAG_WEIGHTED_PRED (1ULL << 8) -+#define V4L2_HEVC_PPS_FLAG_WEIGHTED_BIPRED (1ULL << 9) -+#define V4L2_HEVC_PPS_FLAG_TRANSQUANT_BYPASS_ENABLED (1ULL << 10) -+#define V4L2_HEVC_PPS_FLAG_TILES_ENABLED (1ULL << 11) -+#define V4L2_HEVC_PPS_FLAG_ENTROPY_CODING_SYNC_ENABLED (1ULL << 12) -+#define V4L2_HEVC_PPS_FLAG_LOOP_FILTER_ACROSS_TILES_ENABLED (1ULL << 13) -+#define V4L2_HEVC_PPS_FLAG_PPS_LOOP_FILTER_ACROSS_SLICES_ENABLED (1ULL << 14) -+#define V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_OVERRIDE_ENABLED (1ULL << 15) -+#define V4L2_HEVC_PPS_FLAG_PPS_DISABLE_DEBLOCKING_FILTER (1ULL << 16) -+#define V4L2_HEVC_PPS_FLAG_LISTS_MODIFICATION_PRESENT (1ULL << 17) -+#define V4L2_HEVC_PPS_FLAG_SLICE_SEGMENT_HEADER_EXTENSION_PRESENT (1ULL << 18) -+#define V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_CONTROL_PRESENT (1ULL << 19) -+#define V4L2_HEVC_PPS_FLAG_UNIFORM_SPACING (1ULL << 20) -+ -+struct v4l2_ctrl_hevc_pps { -+ /* ISO/IEC 23008-2, ITU-T Rec. H.265: Picture parameter set */ -+ __u8 num_extra_slice_header_bits; -+ __u8 num_ref_idx_l0_default_active_minus1; -+ __u8 num_ref_idx_l1_default_active_minus1; -+ __s8 init_qp_minus26; -+ __u8 diff_cu_qp_delta_depth; -+ __s8 pps_cb_qp_offset; -+ __s8 pps_cr_qp_offset; -+ __u8 num_tile_columns_minus1; -+ __u8 num_tile_rows_minus1; -+ __u8 column_width_minus1[20]; -+ __u8 row_height_minus1[22]; -+ __s8 pps_beta_offset_div2; -+ __s8 pps_tc_offset_div2; -+ __u8 log2_parallel_merge_level_minus2; -+ -+ __u8 padding[4]; -+ __u64 flags; -+}; -+ -+#define V4L2_HEVC_DPB_ENTRY_LONG_TERM_REFERENCE 0x01 -+ -+#define V4L2_HEVC_DPB_ENTRIES_NUM_MAX 16 -+ -+struct v4l2_hevc_dpb_entry { -+ __u64 timestamp; -+ __u8 flags; -+ __u8 field_pic; -+ __u16 pic_order_cnt[2]; -+ __u8 padding[2]; -+}; -+ -+struct v4l2_hevc_pred_weight_table { -+ __s8 delta_luma_weight_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; -+ __s8 luma_offset_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; -+ __s8 delta_chroma_weight_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]; -+ __s8 chroma_offset_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]; -+ -+ __s8 delta_luma_weight_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; -+ __s8 luma_offset_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; -+ __s8 delta_chroma_weight_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]; -+ __s8 chroma_offset_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]; -+ -+ __u8 padding[6]; -+ -+ __u8 luma_log2_weight_denom; -+ __s8 delta_chroma_log2_weight_denom; -+}; -+ -+#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_LUMA (1ULL << 0) -+#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_CHROMA (1ULL << 1) -+#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_TEMPORAL_MVP_ENABLED (1ULL << 2) -+#define V4L2_HEVC_SLICE_PARAMS_FLAG_MVD_L1_ZERO (1ULL << 3) -+#define V4L2_HEVC_SLICE_PARAMS_FLAG_CABAC_INIT (1ULL << 4) -+#define V4L2_HEVC_SLICE_PARAMS_FLAG_COLLOCATED_FROM_L0 (1ULL << 5) -+#define V4L2_HEVC_SLICE_PARAMS_FLAG_USE_INTEGER_MV (1ULL << 6) -+#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_DEBLOCKING_FILTER_DISABLED (1ULL << 7) -+#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_LOOP_FILTER_ACROSS_SLICES_ENABLED (1ULL << 8) -+#define V4L2_HEVC_SLICE_PARAMS_FLAG_DEPENDENT_SLICE_SEGMENT (1ULL << 9) -+ -+struct v4l2_ctrl_hevc_slice_params { -+ __u32 bit_size; -+ __u32 data_bit_offset; -+ -+ /* ISO/IEC 23008-2, ITU-T Rec. H.265: General slice segment header */ -+ __u32 slice_segment_addr; -+ __u32 num_entry_point_offsets; -+ -+ /* ISO/IEC 23008-2, ITU-T Rec. H.265: NAL unit header */ -+ __u8 nal_unit_type; -+ __u8 nuh_temporal_id_plus1; -+ -+ /* ISO/IEC 23008-2, ITU-T Rec. H.265: General slice segment header */ -+ __u8 slice_type; -+ __u8 colour_plane_id; -+ __u16 slice_pic_order_cnt; -+ __u8 num_ref_idx_l0_active_minus1; -+ __u8 num_ref_idx_l1_active_minus1; -+ __u8 collocated_ref_idx; -+ __u8 five_minus_max_num_merge_cand; -+ __s8 slice_qp_delta; -+ __s8 slice_cb_qp_offset; -+ __s8 slice_cr_qp_offset; -+ __s8 slice_act_y_qp_offset; -+ __s8 slice_act_cb_qp_offset; -+ __s8 slice_act_cr_qp_offset; -+ __s8 slice_beta_offset_div2; -+ __s8 slice_tc_offset_div2; -+ -+ /* ISO/IEC 23008-2, ITU-T Rec. H.265: Picture timing SEI message */ -+ __u8 pic_struct; -+ -+ /* ISO/IEC 23008-2, ITU-T Rec. H.265: General slice segment header */ -+ __u8 ref_idx_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; -+ __u8 ref_idx_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; -+ -+ __u8 padding[5]; -+ -+ __u32 entry_point_offset_minus1[256]; -+ -+ /* ISO/IEC 23008-2, ITU-T Rec. H.265: Weighted prediction parameter */ -+ struct v4l2_hevc_pred_weight_table pred_weight_table; -+ -+ __u64 flags; -+}; -+ -+#define V4L2_HEVC_DECODE_PARAM_FLAG_IRAP_PIC 0x1 -+#define V4L2_HEVC_DECODE_PARAM_FLAG_IDR_PIC 0x2 -+#define V4L2_HEVC_DECODE_PARAM_FLAG_NO_OUTPUT_OF_PRIOR 0x4 -+ -+struct v4l2_ctrl_hevc_decode_params { -+ __s32 pic_order_cnt_val; -+ __u8 num_active_dpb_entries; -+ struct v4l2_hevc_dpb_entry dpb[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; -+ __u8 num_poc_st_curr_before; -+ __u8 num_poc_st_curr_after; -+ __u8 num_poc_lt_curr; -+ __u8 poc_st_curr_before[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; -+ __u8 poc_st_curr_after[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; -+ __u8 poc_lt_curr[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; -+ __u64 flags; -+}; -+ -+struct v4l2_ctrl_hevc_scaling_matrix { -+ __u8 scaling_list_4x4[6][16]; -+ __u8 scaling_list_8x8[6][64]; -+ __u8 scaling_list_16x16[6][64]; -+ __u8 scaling_list_32x32[2][64]; -+ __u8 scaling_list_dc_coef_16x16[6]; -+ __u8 scaling_list_dc_coef_32x32[2]; -+}; -+ -+/* MPEG-class control IDs specific to the Hantro driver as defined by V4L2 */ -+#define V4L2_CID_CODEC_HANTRO_BASE (V4L2_CTRL_CLASS_CODEC | 0x1200) -+/* -+ * V4L2_CID_HANTRO_HEVC_SLICE_HEADER_SKIP - -+ * the number of data (in bits) to skip in the -+ * slice segment header. -+ * If non-IDR, the bits to be skipped go from syntax element "pic_output_flag" -+ * to before syntax element "slice_temporal_mvp_enabled_flag". -+ * If IDR, the skipped bits are just "pic_output_flag" -+ * (separate_colour_plane_flag is not supported). -+ */ -+#define V4L2_CID_HANTRO_HEVC_SLICE_HEADER_SKIP (V4L2_CID_CODEC_HANTRO_BASE + 0) -+ -+#endif ---- /dev/null -+++ b/libavcodec/hevc-ctrls-v4.h -@@ -0,0 +1,515 @@ -+/* SPDX-License-Identifier: ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) */ -+/* -+ * Video for Linux Two controls header file -+ * -+ * Copyright (C) 1999-2012 the contributors -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * Alternatively you can redistribute this file under the terms of the -+ * BSD license as stated below: -+ * -+ * Redistribution and use in source and binary forms, with or without -+ * modification, are permitted provided that the following conditions -+ * are met: -+ * 1. Redistributions of source code must retain the above copyright -+ * notice, this list of conditions and the following disclaimer. -+ * 2. Redistributions in binary form must reproduce the above copyright -+ * notice, this list of conditions and the following disclaimer in -+ * the documentation and/or other materials provided with the -+ * distribution. -+ * 3. The names of its contributors may not be used to endorse or promote -+ * products derived from this software without specific prior written -+ * permission. -+ * -+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -+ * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ * -+ * The contents of this header was split off from videodev2.h. All control -+ * definitions should be added to this header, which is included by -+ * videodev2.h. -+ */ -+ -+#ifndef AVCODEC_HEVC_CTRLS_V4_H -+#define AVCODEC_HEVC_CTRLS_V4_H -+ -+#include -+#include -+ -+#define V4L2_CID_STATELESS_HEVC_SPS (V4L2_CID_CODEC_STATELESS_BASE + 400) -+#define V4L2_CID_STATELESS_HEVC_PPS (V4L2_CID_CODEC_STATELESS_BASE + 401) -+#define V4L2_CID_STATELESS_HEVC_SLICE_PARAMS (V4L2_CID_CODEC_STATELESS_BASE + 402) -+#define V4L2_CID_STATELESS_HEVC_SCALING_MATRIX (V4L2_CID_CODEC_STATELESS_BASE + 403) -+#define V4L2_CID_STATELESS_HEVC_DECODE_PARAMS (V4L2_CID_CODEC_STATELESS_BASE + 404) -+#define V4L2_CID_STATELESS_HEVC_DECODE_MODE (V4L2_CID_CODEC_STATELESS_BASE + 405) -+#define V4L2_CID_STATELESS_HEVC_START_CODE (V4L2_CID_CODEC_STATELESS_BASE + 406) -+#define V4L2_CID_STATELESS_HEVC_ENTRY_POINT_OFFSETS (V4L2_CID_CODEC_STATELESS_BASE + 407) -+ -+enum v4l2_stateless_hevc_decode_mode { -+ V4L2_STATELESS_HEVC_DECODE_MODE_SLICE_BASED, -+ V4L2_STATELESS_HEVC_DECODE_MODE_FRAME_BASED, -+}; -+ -+enum v4l2_stateless_hevc_start_code { -+ V4L2_STATELESS_HEVC_START_CODE_NONE, -+ V4L2_STATELESS_HEVC_START_CODE_ANNEX_B, -+}; -+ -+#define V4L2_HEVC_SLICE_TYPE_B 0 -+#define V4L2_HEVC_SLICE_TYPE_P 1 -+#define V4L2_HEVC_SLICE_TYPE_I 2 -+ -+#define V4L2_HEVC_SPS_FLAG_SEPARATE_COLOUR_PLANE (1ULL << 0) -+#define V4L2_HEVC_SPS_FLAG_SCALING_LIST_ENABLED (1ULL << 1) -+#define V4L2_HEVC_SPS_FLAG_AMP_ENABLED (1ULL << 2) -+#define V4L2_HEVC_SPS_FLAG_SAMPLE_ADAPTIVE_OFFSET (1ULL << 3) -+#define V4L2_HEVC_SPS_FLAG_PCM_ENABLED (1ULL << 4) -+#define V4L2_HEVC_SPS_FLAG_PCM_LOOP_FILTER_DISABLED (1ULL << 5) -+#define V4L2_HEVC_SPS_FLAG_LONG_TERM_REF_PICS_PRESENT (1ULL << 6) -+#define V4L2_HEVC_SPS_FLAG_SPS_TEMPORAL_MVP_ENABLED (1ULL << 7) -+#define V4L2_HEVC_SPS_FLAG_STRONG_INTRA_SMOOTHING_ENABLED (1ULL << 8) -+ -+/** -+ * struct v4l2_ctrl_hevc_sps - ITU-T Rec. H.265: Sequence parameter set -+ * -+ * @video_parameter_set_id: specifies the value of the -+ * vps_video_parameter_set_id of the active VPS -+ * @seq_parameter_set_id: provides an identifier for the SPS for -+ * reference by other syntax elements -+ * @pic_width_in_luma_samples: specifies the width of each decoded picture -+ * in units of luma samples -+ * @pic_height_in_luma_samples: specifies the height of each decoded picture -+ * in units of luma samples -+ * @bit_depth_luma_minus8: this value plus 8specifies the bit depth of the -+ * samples of the luma array -+ * @bit_depth_chroma_minus8: this value plus 8 specifies the bit depth of the -+ * samples of the chroma arrays -+ * @log2_max_pic_order_cnt_lsb_minus4: this value plus 4 specifies the value of -+ * the variable MaxPicOrderCntLsb -+ * @sps_max_dec_pic_buffering_minus1: this value plus 1 specifies the maximum -+ * required size of the decoded picture -+ * buffer for the codec video sequence -+ * @sps_max_num_reorder_pics: indicates the maximum allowed number of pictures -+ * @sps_max_latency_increase_plus1: not equal to 0 is used to compute the -+ * value of SpsMaxLatencyPictures array -+ * @log2_min_luma_coding_block_size_minus3: plus 3 specifies the minimum -+ * luma coding block size -+ * @log2_diff_max_min_luma_coding_block_size: specifies the difference between -+ * the maximum and minimum luma -+ * coding block size -+ * @log2_min_luma_transform_block_size_minus2: plus 2 specifies the minimum luma -+ * transform block size -+ * @log2_diff_max_min_luma_transform_block_size: specifies the difference between -+ * the maximum and minimum luma -+ * transform block size -+ * @max_transform_hierarchy_depth_inter: specifies the maximum hierarchy -+ * depth for transform units of -+ * coding units coded in inter -+ * prediction mode -+ * @max_transform_hierarchy_depth_intra: specifies the maximum hierarchy -+ * depth for transform units of -+ * coding units coded in intra -+ * prediction mode -+ * @pcm_sample_bit_depth_luma_minus1: this value plus 1 specifies the number of -+ * bits used to represent each of PCM sample -+ * values of the luma component -+ * @pcm_sample_bit_depth_chroma_minus1: this value plus 1 specifies the number -+ * of bits used to represent each of PCM -+ * sample values of the chroma components -+ * @log2_min_pcm_luma_coding_block_size_minus3: this value plus 3 specifies the -+ * minimum size of coding blocks -+ * @log2_diff_max_min_pcm_luma_coding_block_size: specifies the difference between -+ * the maximum and minimum size of -+ * coding blocks -+ * @num_short_term_ref_pic_sets: specifies the number of st_ref_pic_set() -+ * syntax structures included in the SPS -+ * @num_long_term_ref_pics_sps: specifies the number of candidate long-term -+ * reference pictures that are specified in the SPS -+ * @chroma_format_idc: specifies the chroma sampling -+ * @sps_max_sub_layers_minus1: this value plus 1 specifies the maximum number -+ * of temporal sub-layers -+ * @reserved: padding field. Should be zeroed by applications. -+ * @flags: see V4L2_HEVC_SPS_FLAG_{} -+ */ -+struct v4l2_ctrl_hevc_sps { -+ __u8 video_parameter_set_id; -+ __u8 seq_parameter_set_id; -+ __u16 pic_width_in_luma_samples; -+ __u16 pic_height_in_luma_samples; -+ __u8 bit_depth_luma_minus8; -+ __u8 bit_depth_chroma_minus8; -+ __u8 log2_max_pic_order_cnt_lsb_minus4; -+ __u8 sps_max_dec_pic_buffering_minus1; -+ __u8 sps_max_num_reorder_pics; -+ __u8 sps_max_latency_increase_plus1; -+ __u8 log2_min_luma_coding_block_size_minus3; -+ __u8 log2_diff_max_min_luma_coding_block_size; -+ __u8 log2_min_luma_transform_block_size_minus2; -+ __u8 log2_diff_max_min_luma_transform_block_size; -+ __u8 max_transform_hierarchy_depth_inter; -+ __u8 max_transform_hierarchy_depth_intra; -+ __u8 pcm_sample_bit_depth_luma_minus1; -+ __u8 pcm_sample_bit_depth_chroma_minus1; -+ __u8 log2_min_pcm_luma_coding_block_size_minus3; -+ __u8 log2_diff_max_min_pcm_luma_coding_block_size; -+ __u8 num_short_term_ref_pic_sets; -+ __u8 num_long_term_ref_pics_sps; -+ __u8 chroma_format_idc; -+ __u8 sps_max_sub_layers_minus1; -+ -+ __u8 reserved[6]; -+ __u64 flags; -+}; -+ -+#define V4L2_HEVC_PPS_FLAG_DEPENDENT_SLICE_SEGMENT_ENABLED (1ULL << 0) -+#define V4L2_HEVC_PPS_FLAG_OUTPUT_FLAG_PRESENT (1ULL << 1) -+#define V4L2_HEVC_PPS_FLAG_SIGN_DATA_HIDING_ENABLED (1ULL << 2) -+#define V4L2_HEVC_PPS_FLAG_CABAC_INIT_PRESENT (1ULL << 3) -+#define V4L2_HEVC_PPS_FLAG_CONSTRAINED_INTRA_PRED (1ULL << 4) -+#define V4L2_HEVC_PPS_FLAG_TRANSFORM_SKIP_ENABLED (1ULL << 5) -+#define V4L2_HEVC_PPS_FLAG_CU_QP_DELTA_ENABLED (1ULL << 6) -+#define V4L2_HEVC_PPS_FLAG_PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT (1ULL << 7) -+#define V4L2_HEVC_PPS_FLAG_WEIGHTED_PRED (1ULL << 8) -+#define V4L2_HEVC_PPS_FLAG_WEIGHTED_BIPRED (1ULL << 9) -+#define V4L2_HEVC_PPS_FLAG_TRANSQUANT_BYPASS_ENABLED (1ULL << 10) -+#define V4L2_HEVC_PPS_FLAG_TILES_ENABLED (1ULL << 11) -+#define V4L2_HEVC_PPS_FLAG_ENTROPY_CODING_SYNC_ENABLED (1ULL << 12) -+#define V4L2_HEVC_PPS_FLAG_LOOP_FILTER_ACROSS_TILES_ENABLED (1ULL << 13) -+#define V4L2_HEVC_PPS_FLAG_PPS_LOOP_FILTER_ACROSS_SLICES_ENABLED (1ULL << 14) -+#define V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_OVERRIDE_ENABLED (1ULL << 15) -+#define V4L2_HEVC_PPS_FLAG_PPS_DISABLE_DEBLOCKING_FILTER (1ULL << 16) -+#define V4L2_HEVC_PPS_FLAG_LISTS_MODIFICATION_PRESENT (1ULL << 17) -+#define V4L2_HEVC_PPS_FLAG_SLICE_SEGMENT_HEADER_EXTENSION_PRESENT (1ULL << 18) -+#define V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_CONTROL_PRESENT (1ULL << 19) -+#define V4L2_HEVC_PPS_FLAG_UNIFORM_SPACING (1ULL << 20) -+ -+/** -+ * struct v4l2_ctrl_hevc_pps - ITU-T Rec. H.265: Picture parameter set -+ * -+ * @pic_parameter_set_id: identifies the PPS for reference by other -+ * syntax elements -+ * @num_extra_slice_header_bits: specifies the number of extra slice header -+ * bits that are present in the slice header RBSP -+ * for coded pictures referring to the PPS. -+ * @num_ref_idx_l0_default_active_minus1: this value plus 1 specifies the -+ * inferred value of num_ref_idx_l0_active_minus1 -+ * @num_ref_idx_l1_default_active_minus1: this value plus 1 specifies the -+ * inferred value of num_ref_idx_l1_active_minus1 -+ * @init_qp_minus26: this value plus 26 specifies the initial value of SliceQp Y for -+ * each slice referring to the PPS -+ * @diff_cu_qp_delta_depth: specifies the difference between the luma coding -+ * tree block size and the minimum luma coding block -+ * size of coding units that convey cu_qp_delta_abs -+ * and cu_qp_delta_sign_flag -+ * @pps_cb_qp_offset: specify the offsets to the luma quantization parameter Cb -+ * @pps_cr_qp_offset: specify the offsets to the luma quantization parameter Cr -+ * @num_tile_columns_minus1: this value plus 1 specifies the number of tile columns -+ * partitioning the picture -+ * @num_tile_rows_minus1: this value plus 1 specifies the number of tile rows partitioning -+ * the picture -+ * @column_width_minus1: this value plus 1 specifies the width of the each tile column in -+ * units of coding tree blocks -+ * @row_height_minus1: this value plus 1 specifies the height of the each tile row in -+ * units of coding tree blocks -+ * @pps_beta_offset_div2: specify the default deblocking parameter offsets for -+ * beta divided by 2 -+ * @pps_tc_offset_div2: specify the default deblocking parameter offsets for tC -+ * divided by 2 -+ * @log2_parallel_merge_level_minus2: this value plus 2 specifies the value of -+ * the variable Log2ParMrgLevel -+ * @reserved: padding field. Should be zeroed by applications. -+ * @flags: see V4L2_HEVC_PPS_FLAG_{} -+ */ -+struct v4l2_ctrl_hevc_pps { -+ __u8 pic_parameter_set_id; -+ __u8 num_extra_slice_header_bits; -+ __u8 num_ref_idx_l0_default_active_minus1; -+ __u8 num_ref_idx_l1_default_active_minus1; -+ __s8 init_qp_minus26; -+ __u8 diff_cu_qp_delta_depth; -+ __s8 pps_cb_qp_offset; -+ __s8 pps_cr_qp_offset; -+ __u8 num_tile_columns_minus1; -+ __u8 num_tile_rows_minus1; -+ __u8 column_width_minus1[20]; -+ __u8 row_height_minus1[22]; -+ __s8 pps_beta_offset_div2; -+ __s8 pps_tc_offset_div2; -+ __u8 log2_parallel_merge_level_minus2; -+ __u8 reserved; -+ __u64 flags; -+}; -+ -+#define V4L2_HEVC_DPB_ENTRY_LONG_TERM_REFERENCE 0x01 -+ -+#define V4L2_HEVC_SEI_PIC_STRUCT_FRAME 0 -+#define V4L2_HEVC_SEI_PIC_STRUCT_TOP_FIELD 1 -+#define V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_FIELD 2 -+#define V4L2_HEVC_SEI_PIC_STRUCT_TOP_BOTTOM 3 -+#define V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_TOP 4 -+#define V4L2_HEVC_SEI_PIC_STRUCT_TOP_BOTTOM_TOP 5 -+#define V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_TOP_BOTTOM 6 -+#define V4L2_HEVC_SEI_PIC_STRUCT_FRAME_DOUBLING 7 -+#define V4L2_HEVC_SEI_PIC_STRUCT_FRAME_TRIPLING 8 -+#define V4L2_HEVC_SEI_PIC_STRUCT_TOP_PAIRED_PREVIOUS_BOTTOM 9 -+#define V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_PAIRED_PREVIOUS_TOP 10 -+#define V4L2_HEVC_SEI_PIC_STRUCT_TOP_PAIRED_NEXT_BOTTOM 11 -+#define V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_PAIRED_NEXT_TOP 12 -+ -+#define V4L2_HEVC_DPB_ENTRIES_NUM_MAX 16 -+ -+/** -+ * struct v4l2_hevc_dpb_entry - HEVC decoded picture buffer entry -+ * -+ * @timestamp: timestamp of the V4L2 capture buffer to use as reference. -+ * @flags: long term flag for the reference frame -+ * @field_pic: whether the reference is a field picture or a frame. -+ * @reserved: padding field. Should be zeroed by applications. -+ * @pic_order_cnt_val: the picture order count of the current picture. -+ */ -+struct v4l2_hevc_dpb_entry { -+ __u64 timestamp; -+ __u8 flags; -+ __u8 field_pic; -+ __u16 reserved; -+ __s32 pic_order_cnt_val; -+}; -+ -+/** -+ * struct v4l2_hevc_pred_weight_table - HEVC weighted prediction parameters -+ * -+ * @delta_luma_weight_l0: the difference of the weighting factor applied -+ * to the luma prediction value for list 0 -+ * @luma_offset_l0: the additive offset applied to the luma prediction value -+ * for list 0 -+ * @delta_chroma_weight_l0: the difference of the weighting factor applied -+ * to the chroma prediction values for list 0 -+ * @chroma_offset_l0: the difference of the additive offset applied to -+ * the chroma prediction values for list 0 -+ * @delta_luma_weight_l1: the difference of the weighting factor applied -+ * to the luma prediction value for list 1 -+ * @luma_offset_l1: the additive offset applied to the luma prediction value -+ * for list 1 -+ * @delta_chroma_weight_l1: the difference of the weighting factor applied -+ * to the chroma prediction values for list 1 -+ * @chroma_offset_l1: the difference of the additive offset applied to -+ * the chroma prediction values for list 1 -+ * @luma_log2_weight_denom: the base 2 logarithm of the denominator for -+ * all luma weighting factors -+ * @delta_chroma_log2_weight_denom: the difference of the base 2 logarithm -+ * of the denominator for all chroma -+ * weighting factors -+ */ -+struct v4l2_hevc_pred_weight_table { -+ __s8 delta_luma_weight_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; -+ __s8 luma_offset_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; -+ __s8 delta_chroma_weight_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]; -+ __s8 chroma_offset_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]; -+ -+ __s8 delta_luma_weight_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; -+ __s8 luma_offset_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; -+ __s8 delta_chroma_weight_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]; -+ __s8 chroma_offset_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]; -+ -+ __u8 luma_log2_weight_denom; -+ __s8 delta_chroma_log2_weight_denom; -+}; -+ -+#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_LUMA (1ULL << 0) -+#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_CHROMA (1ULL << 1) -+#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_TEMPORAL_MVP_ENABLED (1ULL << 2) -+#define V4L2_HEVC_SLICE_PARAMS_FLAG_MVD_L1_ZERO (1ULL << 3) -+#define V4L2_HEVC_SLICE_PARAMS_FLAG_CABAC_INIT (1ULL << 4) -+#define V4L2_HEVC_SLICE_PARAMS_FLAG_COLLOCATED_FROM_L0 (1ULL << 5) -+#define V4L2_HEVC_SLICE_PARAMS_FLAG_USE_INTEGER_MV (1ULL << 6) -+#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_DEBLOCKING_FILTER_DISABLED (1ULL << 7) -+#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_LOOP_FILTER_ACROSS_SLICES_ENABLED (1ULL << 8) -+#define V4L2_HEVC_SLICE_PARAMS_FLAG_DEPENDENT_SLICE_SEGMENT (1ULL << 9) -+ -+/** -+ * struct v4l2_ctrl_hevc_slice_params - HEVC slice parameters -+ * -+ * This control is a dynamically sized 1-dimensional array, -+ * V4L2_CTRL_FLAG_DYNAMIC_ARRAY flag must be set when using it. -+ * -+ * @bit_size: size (in bits) of the current slice data -+ * @data_byte_offset: offset (in bytes) to the video data in the current slice data -+ * @num_entry_point_offsets: specifies the number of entry point offset syntax -+ * elements in the slice header. -+ * @nal_unit_type: specifies the coding type of the slice (B, P or I) -+ * @nuh_temporal_id_plus1: minus 1 specifies a temporal identifier for the NAL unit -+ * @slice_type: see V4L2_HEVC_SLICE_TYPE_{} -+ * @colour_plane_id: specifies the colour plane associated with the current slice -+ * @slice_pic_order_cnt: specifies the picture order count -+ * @num_ref_idx_l0_active_minus1: this value plus 1 specifies the maximum -+ * reference index for reference picture list 0 -+ * that may be used to decode the slice -+ * @num_ref_idx_l1_active_minus1: this value plus 1 specifies the maximum -+ * reference index for reference picture list 1 -+ * that may be used to decode the slice -+ * @collocated_ref_idx: specifies the reference index of the collocated picture used -+ * for temporal motion vector prediction -+ * @five_minus_max_num_merge_cand: specifies the maximum number of merging -+ * motion vector prediction candidates supported in -+ * the slice subtracted from 5 -+ * @slice_qp_delta: specifies the initial value of QpY to be used for the coding -+ * blocks in the slice -+ * @slice_cb_qp_offset: specifies a difference to be added to the value of pps_cb_qp_offset -+ * @slice_cr_qp_offset: specifies a difference to be added to the value of pps_cr_qp_offset -+ * @slice_act_y_qp_offset: screen content extension parameters -+ * @slice_act_cb_qp_offset: screen content extension parameters -+ * @slice_act_cr_qp_offset: screen content extension parameters -+ * @slice_beta_offset_div2: specify the deblocking parameter offsets for beta divided by 2 -+ * @slice_tc_offset_div2: specify the deblocking parameter offsets for tC divided by 2 -+ * @pic_struct: indicates whether a picture should be displayed as a frame or as one or -+ * more fields -+ * @reserved0: padding field. Should be zeroed by applications. -+ * @slice_segment_addr: specifies the address of the first coding tree block in -+ * the slice segment -+ * @ref_idx_l0: the list of L0 reference elements as indices in the DPB -+ * @ref_idx_l1: the list of L1 reference elements as indices in the DPB -+ * @short_term_ref_pic_set_size: specifies the size of short-term reference -+ * pictures set included in the SPS -+ * @long_term_ref_pic_set_size: specifies the size of long-term reference -+ * pictures set include in the SPS -+ * @pred_weight_table: the prediction weight coefficients for inter-picture -+ * prediction -+ * @reserved1: padding field. Should be zeroed by applications. -+ * @flags: see V4L2_HEVC_SLICE_PARAMS_FLAG_{} -+ */ -+struct v4l2_ctrl_hevc_slice_params { -+ __u32 bit_size; -+ __u32 data_byte_offset; -+ __u32 num_entry_point_offsets; -+ -+ /* ISO/IEC 23008-2, ITU-T Rec. H.265: NAL unit header */ -+ __u8 nal_unit_type; -+ __u8 nuh_temporal_id_plus1; -+ -+ /* ISO/IEC 23008-2, ITU-T Rec. H.265: General slice segment header */ -+ __u8 slice_type; -+ __u8 colour_plane_id; -+ __s32 slice_pic_order_cnt; -+ __u8 num_ref_idx_l0_active_minus1; -+ __u8 num_ref_idx_l1_active_minus1; -+ __u8 collocated_ref_idx; -+ __u8 five_minus_max_num_merge_cand; -+ __s8 slice_qp_delta; -+ __s8 slice_cb_qp_offset; -+ __s8 slice_cr_qp_offset; -+ __s8 slice_act_y_qp_offset; -+ __s8 slice_act_cb_qp_offset; -+ __s8 slice_act_cr_qp_offset; -+ __s8 slice_beta_offset_div2; -+ __s8 slice_tc_offset_div2; -+ -+ /* ISO/IEC 23008-2, ITU-T Rec. H.265: Picture timing SEI message */ -+ __u8 pic_struct; -+ -+ __u8 reserved0[3]; -+ /* ISO/IEC 23008-2, ITU-T Rec. H.265: General slice segment header */ -+ __u32 slice_segment_addr; -+ __u8 ref_idx_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; -+ __u8 ref_idx_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; -+ __u16 short_term_ref_pic_set_size; -+ __u16 long_term_ref_pic_set_size; -+ -+ /* ISO/IEC 23008-2, ITU-T Rec. H.265: Weighted prediction parameter */ -+ struct v4l2_hevc_pred_weight_table pred_weight_table; -+ -+ __u8 reserved1[2]; -+ __u64 flags; -+}; -+ -+#define V4L2_HEVC_DECODE_PARAM_FLAG_IRAP_PIC 0x1 -+#define V4L2_HEVC_DECODE_PARAM_FLAG_IDR_PIC 0x2 -+#define V4L2_HEVC_DECODE_PARAM_FLAG_NO_OUTPUT_OF_PRIOR 0x4 -+ -+/** -+ * struct v4l2_ctrl_hevc_decode_params - HEVC decode parameters -+ * -+ * @pic_order_cnt_val: picture order count -+ * @short_term_ref_pic_set_size: specifies the size of short-term reference -+ * pictures set included in the SPS of the first slice -+ * @long_term_ref_pic_set_size: specifies the size of long-term reference -+ * pictures set include in the SPS of the first slice -+ * @num_active_dpb_entries: the number of entries in dpb -+ * @num_poc_st_curr_before: the number of reference pictures in the short-term -+ * set that come before the current frame -+ * @num_poc_st_curr_after: the number of reference pictures in the short-term -+ * set that come after the current frame -+ * @num_poc_lt_curr: the number of reference pictures in the long-term set -+ * @poc_st_curr_before: provides the index of the short term before references -+ * in DPB array -+ * @poc_st_curr_after: provides the index of the short term after references -+ * in DPB array -+ * @poc_lt_curr: provides the index of the long term references in DPB array -+ * @reserved: padding field. Should be zeroed by applications. -+ * @dpb: the decoded picture buffer, for meta-data about reference frames -+ * @flags: see V4L2_HEVC_DECODE_PARAM_FLAG_{} -+ */ -+struct v4l2_ctrl_hevc_decode_params { -+ __s32 pic_order_cnt_val; -+ __u16 short_term_ref_pic_set_size; -+ __u16 long_term_ref_pic_set_size; -+ __u8 num_active_dpb_entries; -+ __u8 num_poc_st_curr_before; -+ __u8 num_poc_st_curr_after; -+ __u8 num_poc_lt_curr; -+ __u8 poc_st_curr_before[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; -+ __u8 poc_st_curr_after[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; -+ __u8 poc_lt_curr[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; -+ __u8 reserved[4]; -+ struct v4l2_hevc_dpb_entry dpb[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; -+ __u64 flags; -+}; -+ -+/** -+ * struct v4l2_ctrl_hevc_scaling_matrix - HEVC scaling lists parameters -+ * -+ * @scaling_list_4x4: scaling list is used for the scaling process for -+ * transform coefficients. The values on each scaling -+ * list are expected in raster scan order -+ * @scaling_list_8x8: scaling list is used for the scaling process for -+ * transform coefficients. The values on each scaling -+ * list are expected in raster scan order -+ * @scaling_list_16x16: scaling list is used for the scaling process for -+ * transform coefficients. The values on each scaling -+ * list are expected in raster scan order -+ * @scaling_list_32x32: scaling list is used for the scaling process for -+ * transform coefficients. The values on each scaling -+ * list are expected in raster scan order -+ * @scaling_list_dc_coef_16x16: scaling list is used for the scaling process -+ * for transform coefficients. The values on each -+ * scaling list are expected in raster scan order. -+ * @scaling_list_dc_coef_32x32: scaling list is used for the scaling process -+ * for transform coefficients. The values on each -+ * scaling list are expected in raster scan order. -+ */ -+struct v4l2_ctrl_hevc_scaling_matrix { -+ __u8 scaling_list_4x4[6][16]; -+ __u8 scaling_list_8x8[6][64]; -+ __u8 scaling_list_16x16[6][64]; -+ __u8 scaling_list_32x32[2][64]; -+ __u8 scaling_list_dc_coef_16x16[6]; -+ __u8 scaling_list_dc_coef_32x32[2]; -+}; -+ -+#endif ---- a/libavcodec/hevc_parser.c -+++ b/libavcodec/hevc_parser.c -@@ -98,6 +98,19 @@ static int hevc_parse_slice_header(AVCod - avctx->profile = ps->sps->ptl.general_ptl.profile_idc; - avctx->level = ps->sps->ptl.general_ptl.level_idc; - -+ if (ps->sps->chroma_format_idc == 1) { -+ avctx->chroma_sample_location = ps->sps->vui.chroma_loc_info_present_flag ? -+ ps->sps->vui.chroma_sample_loc_type_top_field + 1 : -+ AVCHROMA_LOC_LEFT; -+ } -+ else if (ps->sps->chroma_format_idc == 2 || -+ ps->sps->chroma_format_idc == 3) { -+ avctx->chroma_sample_location = AVCHROMA_LOC_TOPLEFT;; -+ } -+ else { -+ avctx->chroma_sample_location = AVCHROMA_LOC_UNSPECIFIED; -+ } -+ - if (ps->vps->vps_timing_info_present_flag) { - num = ps->vps->vps_num_units_in_tick; - den = ps->vps->vps_time_scale; ---- a/libavcodec/hevc_refs.c -+++ b/libavcodec/hevc_refs.c -@@ -96,18 +96,22 @@ static HEVCFrame *alloc_frame(HEVCContex - if (!frame->rpl_buf) - goto fail; - -- frame->tab_mvf_buf = av_buffer_pool_get(s->tab_mvf_pool); -- if (!frame->tab_mvf_buf) -- goto fail; -- frame->tab_mvf = (MvField *)frame->tab_mvf_buf->data; -+ if (s->tab_mvf_pool) { -+ frame->tab_mvf_buf = av_buffer_pool_get(s->tab_mvf_pool); -+ if (!frame->tab_mvf_buf) -+ goto fail; -+ frame->tab_mvf = (MvField *)frame->tab_mvf_buf->data; -+ } - -- frame->rpl_tab_buf = av_buffer_pool_get(s->rpl_tab_pool); -- if (!frame->rpl_tab_buf) -- goto fail; -- frame->rpl_tab = (RefPicListTab **)frame->rpl_tab_buf->data; -- frame->ctb_count = s->ps.sps->ctb_width * s->ps.sps->ctb_height; -- for (j = 0; j < frame->ctb_count; j++) -- frame->rpl_tab[j] = (RefPicListTab *)frame->rpl_buf->data; -+ if (s->rpl_tab_pool) { -+ frame->rpl_tab_buf = av_buffer_pool_get(s->rpl_tab_pool); -+ if (!frame->rpl_tab_buf) -+ goto fail; -+ frame->rpl_tab = (RefPicListTab **)frame->rpl_tab_buf->data; -+ frame->ctb_count = s->ps.sps->ctb_width * s->ps.sps->ctb_height; -+ for (j = 0; j < frame->ctb_count; j++) -+ frame->rpl_tab[j] = (RefPicListTab *)frame->rpl_buf->data; -+ } - - frame->frame->top_field_first = s->sei.picture_timing.picture_struct == AV_PICTURE_STRUCTURE_TOP_FIELD; - frame->frame->interlaced_frame = (s->sei.picture_timing.picture_struct == AV_PICTURE_STRUCTURE_TOP_FIELD) || (s->sei.picture_timing.picture_struct == AV_PICTURE_STRUCTURE_BOTTOM_FIELD); -@@ -276,14 +280,17 @@ static int init_slice_rpl(HEVCContext *s - int ctb_count = frame->ctb_count; - int ctb_addr_ts = s->ps.pps->ctb_addr_rs_to_ts[s->sh.slice_segment_addr]; - int i; -+ RefPicListTab * const tab = (RefPicListTab *)frame->rpl_buf->data + s->slice_idx; - - if (s->slice_idx >= frame->rpl_buf->size / sizeof(RefPicListTab)) - return AVERROR_INVALIDDATA; - -- for (i = ctb_addr_ts; i < ctb_count; i++) -- frame->rpl_tab[i] = (RefPicListTab *)frame->rpl_buf->data + s->slice_idx; -+ if (frame->rpl_tab) { -+ for (i = ctb_addr_ts; i < ctb_count; i++) -+ frame->rpl_tab[i] = tab; -+ } - -- frame->refPicList = (RefPicList *)frame->rpl_tab[ctb_addr_ts]; -+ frame->refPicList = tab->refPicList; - - return 0; - } ---- a/libavcodec/hevcdec.c -+++ b/libavcodec/hevcdec.c -@@ -332,6 +332,19 @@ static void export_stream_params(HEVCCon - - ff_set_sar(avctx, sps->vui.sar); - -+ if (sps->chroma_format_idc == 1) { -+ avctx->chroma_sample_location = sps->vui.chroma_loc_info_present_flag ? -+ sps->vui.chroma_sample_loc_type_top_field + 1 : -+ AVCHROMA_LOC_LEFT; -+ } -+ else if (sps->chroma_format_idc == 2 || -+ sps->chroma_format_idc == 3) { -+ avctx->chroma_sample_location = AVCHROMA_LOC_TOPLEFT;; -+ } -+ else { -+ avctx->chroma_sample_location = AVCHROMA_LOC_UNSPECIFIED; -+ } -+ - if (sps->vui.video_signal_type_present_flag) - avctx->color_range = sps->vui.video_full_range_flag ? AVCOL_RANGE_JPEG - : AVCOL_RANGE_MPEG; -@@ -372,14 +385,20 @@ static enum AVPixelFormat get_format(HEV - #define HWACCEL_MAX (CONFIG_HEVC_DXVA2_HWACCEL + \ - CONFIG_HEVC_D3D11VA_HWACCEL * 2 + \ - CONFIG_HEVC_NVDEC_HWACCEL + \ -+ CONFIG_HEVC_V4L2REQUEST_HWACCEL + \ - CONFIG_HEVC_VAAPI_HWACCEL + \ - CONFIG_HEVC_VIDEOTOOLBOX_HWACCEL + \ -+ CONFIG_HEVC_RPI4_8_HWACCEL + \ -+ CONFIG_HEVC_RPI4_10_HWACCEL + \ - CONFIG_HEVC_VDPAU_HWACCEL) - enum AVPixelFormat pix_fmts[HWACCEL_MAX + 2], *fmt = pix_fmts; - - switch (sps->pix_fmt) { - case AV_PIX_FMT_YUV420P: - case AV_PIX_FMT_YUVJ420P: -+#if CONFIG_HEVC_RPI4_8_HWACCEL -+ *fmt++ = AV_PIX_FMT_RPI4_8; -+#endif - #if CONFIG_HEVC_DXVA2_HWACCEL - *fmt++ = AV_PIX_FMT_DXVA2_VLD; - #endif -@@ -399,8 +418,14 @@ static enum AVPixelFormat get_format(HEV - #if CONFIG_HEVC_VIDEOTOOLBOX_HWACCEL - *fmt++ = AV_PIX_FMT_VIDEOTOOLBOX; - #endif -+#if CONFIG_HEVC_V4L2REQUEST_HWACCEL -+ *fmt++ = AV_PIX_FMT_DRM_PRIME; -+#endif - break; - case AV_PIX_FMT_YUV420P10: -+#if CONFIG_HEVC_RPI4_10_HWACCEL -+ *fmt++ = AV_PIX_FMT_RPI4_10; -+#endif - #if CONFIG_HEVC_DXVA2_HWACCEL - *fmt++ = AV_PIX_FMT_DXVA2_VLD; - #endif -@@ -417,6 +442,9 @@ static enum AVPixelFormat get_format(HEV - #if CONFIG_HEVC_NVDEC_HWACCEL - *fmt++ = AV_PIX_FMT_CUDA; - #endif -+#if CONFIG_HEVC_V4L2REQUEST_HWACCEL -+ *fmt++ = AV_PIX_FMT_DRM_PRIME; -+#endif - break; - case AV_PIX_FMT_YUV444P: - #if CONFIG_HEVC_VDPAU_HWACCEL -@@ -459,6 +487,16 @@ static int set_sps(HEVCContext *s, const - if (!sps) - return 0; - -+ // If hwaccel then we don't need all the s/w decode helper arrays -+ if (s->avctx->hwaccel) { -+ export_stream_params(s, sps); -+ -+ s->avctx->pix_fmt = pix_fmt; -+ s->ps.sps = sps; -+ s->ps.vps = (HEVCVPS*) s->ps.vps_list[s->ps.sps->vps_id]->data; -+ return 0; -+ } -+ - ret = pic_arrays_init(s, sps); - if (ret < 0) - goto fail; -@@ -2809,11 +2847,13 @@ static int hevc_frame_start(HEVCContext - ((s->ps.sps->height >> s->ps.sps->log2_min_cb_size) + 1); - int ret; - -- memset(s->horizontal_bs, 0, s->bs_width * s->bs_height); -- memset(s->vertical_bs, 0, s->bs_width * s->bs_height); -- memset(s->cbf_luma, 0, s->ps.sps->min_tb_width * s->ps.sps->min_tb_height); -- memset(s->is_pcm, 0, (s->ps.sps->min_pu_width + 1) * (s->ps.sps->min_pu_height + 1)); -- memset(s->tab_slice_address, -1, pic_size_in_ctb * sizeof(*s->tab_slice_address)); -+ if (s->horizontal_bs) { -+ memset(s->horizontal_bs, 0, s->bs_width * s->bs_height); -+ memset(s->vertical_bs, 0, s->bs_width * s->bs_height); -+ memset(s->cbf_luma, 0, s->ps.sps->min_tb_width * s->ps.sps->min_tb_height); -+ memset(s->is_pcm, 0, (s->ps.sps->min_pu_width + 1) * (s->ps.sps->min_pu_height + 1)); -+ memset(s->tab_slice_address, -1, pic_size_in_ctb * sizeof(*s->tab_slice_address)); -+ } - - s->is_decoded = 0; - s->first_nal_type = s->nal_unit_type; -@@ -3230,7 +3270,14 @@ static int hevc_decode_frame(AVCodecCont - s->ref = NULL; - ret = decode_nal_units(s, avpkt->data, avpkt->size); - if (ret < 0) -+ { -+ // Ensure that hwaccel knows this frame is over -+ if (s->avctx->hwaccel && s->avctx->hwaccel->abort_frame) { -+ s->avctx->hwaccel->abort_frame(s->avctx); -+ } -+ - return ret; -+ } - - if (avctx->hwaccel) { - if (s->ref && (ret = avctx->hwaccel->end_frame(avctx)) < 0) { -@@ -3273,15 +3320,19 @@ static int hevc_ref_frame(HEVCContext *s - if (ret < 0) - return ret; - -- dst->tab_mvf_buf = av_buffer_ref(src->tab_mvf_buf); -- if (!dst->tab_mvf_buf) -- goto fail; -- dst->tab_mvf = src->tab_mvf; -+ if (src->tab_mvf_buf) { -+ dst->tab_mvf_buf = av_buffer_ref(src->tab_mvf_buf); -+ if (!dst->tab_mvf_buf) -+ goto fail; -+ dst->tab_mvf = src->tab_mvf; -+ } - -- dst->rpl_tab_buf = av_buffer_ref(src->rpl_tab_buf); -- if (!dst->rpl_tab_buf) -- goto fail; -- dst->rpl_tab = src->rpl_tab; -+ if (src->rpl_tab_buf) { -+ dst->rpl_tab_buf = av_buffer_ref(src->rpl_tab_buf); -+ if (!dst->rpl_tab_buf) -+ goto fail; -+ dst->rpl_tab = src->rpl_tab; -+ } - - dst->rpl_buf = av_buffer_ref(src->rpl_buf); - if (!dst->rpl_buf) -@@ -3585,6 +3636,15 @@ AVCodec ff_hevc_decoder = { - #if CONFIG_HEVC_NVDEC_HWACCEL - HWACCEL_NVDEC(hevc), - #endif -+#if CONFIG_HEVC_RPI4_8_HWACCEL -+ HWACCEL_RPI4_8(hevc), -+#endif -+#if CONFIG_HEVC_RPI4_10_HWACCEL -+ HWACCEL_RPI4_10(hevc), -+#endif -+#if CONFIG_HEVC_V4L2REQUEST_HWACCEL -+ HWACCEL_V4L2REQUEST(hevc), -+#endif - #if CONFIG_HEVC_VAAPI_HWACCEL - HWACCEL_VAAPI(hevc), - #endif ---- a/libavcodec/hwaccels.h -+++ b/libavcodec/hwaccels.h -@@ -34,6 +34,9 @@ extern const AVHWAccel ff_hevc_d3d11va_h - extern const AVHWAccel ff_hevc_d3d11va2_hwaccel; - extern const AVHWAccel ff_hevc_dxva2_hwaccel; - extern const AVHWAccel ff_hevc_nvdec_hwaccel; -+extern const AVHWAccel ff_hevc_rpi4_8_hwaccel; -+extern const AVHWAccel ff_hevc_rpi4_10_hwaccel; -+extern const AVHWAccel ff_hevc_v4l2request_hwaccel; - extern const AVHWAccel ff_hevc_vaapi_hwaccel; - extern const AVHWAccel ff_hevc_vdpau_hwaccel; - extern const AVHWAccel ff_hevc_videotoolbox_hwaccel; ---- a/libavcodec/hwconfig.h -+++ b/libavcodec/hwconfig.h -@@ -24,6 +24,7 @@ - - - #define HWACCEL_CAP_ASYNC_SAFE (1 << 0) -+#define HWACCEL_CAP_MT_SAFE (1 << 1) - - - typedef struct AVCodecHWConfigInternal { -@@ -70,6 +71,12 @@ typedef struct AVCodecHWConfigInternal { - HW_CONFIG_HWACCEL(1, 1, 0, D3D11, D3D11VA, ff_ ## codec ## _d3d11va2_hwaccel) - #define HWACCEL_NVDEC(codec) \ - HW_CONFIG_HWACCEL(1, 1, 0, CUDA, CUDA, ff_ ## codec ## _nvdec_hwaccel) -+#define HWACCEL_RPI4_8(codec) \ -+ HW_CONFIG_HWACCEL(0, 0, 1, RPI4_8, NONE, ff_ ## codec ## _rpi4_8_hwaccel) -+#define HWACCEL_RPI4_10(codec) \ -+ HW_CONFIG_HWACCEL(0, 0, 1, RPI4_10, NONE, ff_ ## codec ## _rpi4_10_hwaccel) -+#define HWACCEL_V4L2REQUEST(codec) \ -+ HW_CONFIG_HWACCEL(1, 0, 0, DRM_PRIME, DRM, ff_ ## codec ## _v4l2request_hwaccel) - #define HWACCEL_VAAPI(codec) \ - HW_CONFIG_HWACCEL(1, 1, 1, VAAPI, VAAPI, ff_ ## codec ## _vaapi_hwaccel) - #define HWACCEL_VDPAU(codec) \ ---- a/libavcodec/mmaldec.c -+++ b/libavcodec/mmaldec.c -@@ -24,6 +24,9 @@ - * MMAL Video Decoder - */ - -+#pragma GCC diagnostic push -+// Many many redundant decls in the header files -+#pragma GCC diagnostic ignored "-Wredundant-decls" - #include - #include - #include -@@ -31,6 +34,7 @@ - #include - #include - #include -+#pragma GCC diagnostic pop - #include - - #include "avcodec.h" ---- a/libavcodec/pthread_frame.c -+++ b/libavcodec/pthread_frame.c -@@ -191,7 +191,8 @@ static attribute_align_arg void *frame_w - - /* if the previous thread uses hwaccel then we take the lock to ensure - * the threads don't run concurrently */ -- if (avctx->hwaccel) { -+ if (avctx->hwaccel && -+ !(avctx->hwaccel->caps_internal & HWACCEL_CAP_MT_SAFE)) { - pthread_mutex_lock(&p->parent->hwaccel_mutex); - p->hwaccel_serializing = 1; - } -@@ -614,7 +615,9 @@ void ff_thread_finish_setup(AVCodecConte - - if (!(avctx->active_thread_type&FF_THREAD_FRAME)) return; - -- if (avctx->hwaccel && !p->hwaccel_serializing) { -+ if (avctx->hwaccel && -+ !(avctx->hwaccel->caps_internal & HWACCEL_CAP_MT_SAFE) && -+ !p->hwaccel_serializing) { - pthread_mutex_lock(&p->parent->hwaccel_mutex); - p->hwaccel_serializing = 1; - } ---- a/libavcodec/raw.c -+++ b/libavcodec/raw.c -@@ -293,6 +293,12 @@ const PixelFormatTag ff_raw_pix_fmt_tags - { AV_PIX_FMT_RGB565LE,MKTAG( 3 , 0 , 0 , 0 ) }, /* flipped RGB565LE */ - { AV_PIX_FMT_YUV444P, MKTAG('Y', 'V', '2', '4') }, /* YUV444P, swapped UV */ - -+ /* RPI (Might as well define for everything) */ -+ { AV_PIX_FMT_SAND128, MKTAG('S', 'A', 'N', 'D') }, -+ { AV_PIX_FMT_RPI4_8, MKTAG('S', 'A', 'N', 'D') }, -+ { AV_PIX_FMT_SAND64_10, MKTAG('S', 'N', 'D', 'A') }, -+ { AV_PIX_FMT_RPI4_10, MKTAG('S', 'N', 'D', 'B') }, -+ - { AV_PIX_FMT_NONE, 0 }, - }; - ---- a/libavcodec/rawenc.c -+++ b/libavcodec/rawenc.c -@@ -24,6 +24,7 @@ - * Raw Video Encoder - */ - -+#include "config.h" - #include "avcodec.h" - #include "raw.h" - #include "internal.h" -@@ -31,6 +32,10 @@ - #include "libavutil/intreadwrite.h" - #include "libavutil/imgutils.h" - #include "libavutil/internal.h" -+#include "libavutil/avassert.h" -+#if CONFIG_SAND -+#include "libavutil/rpi_sand_fns.h" -+#endif - - static av_cold int raw_encode_init(AVCodecContext *avctx) - { -@@ -49,22 +54,114 @@ FF_ENABLE_DEPRECATION_WARNINGS - return 0; - } - -+#if CONFIG_SAND -+static int raw_sand8_as_yuv420(AVCodecContext *avctx, AVPacket *pkt, -+ const AVFrame *frame) -+{ -+ const int width = av_frame_cropped_width(frame); -+ const int height = av_frame_cropped_height(frame); -+ const int x0 = frame->crop_left; -+ const int y0 = frame->crop_top; -+ const int size = width * height * 3 / 2; -+ uint8_t * dst; -+ int ret; -+ -+ if ((ret = ff_alloc_packet2(avctx, pkt, size, size)) < 0) -+ return ret; -+ -+ dst = pkt->data; -+ -+ av_rpi_sand_to_planar_y8(dst, width, frame->data[0], frame->linesize[0], frame->linesize[3], x0, y0, width, height); -+ dst += width * height; -+ av_rpi_sand_to_planar_c8(dst, width / 2, dst + width * height / 4, width / 2, -+ frame->data[1], frame->linesize[1], av_rpi_sand_frame_stride2(frame), x0 / 2, y0 / 2, width / 2, height / 2); -+ return 0; -+} -+ -+static int raw_sand16_as_yuv420(AVCodecContext *avctx, AVPacket *pkt, -+ const AVFrame *frame) -+{ -+ const int width = av_frame_cropped_width(frame); -+ const int height = av_frame_cropped_height(frame); -+ const int x0 = frame->crop_left; -+ const int y0 = frame->crop_top; -+ const int size = width * height * 3; -+ uint8_t * dst; -+ int ret; -+ -+ if ((ret = ff_alloc_packet2(avctx, pkt, size, size)) < 0) -+ return ret; -+ -+ dst = pkt->data; -+ -+ av_rpi_sand_to_planar_y16(dst, width * 2, frame->data[0], frame->linesize[0], frame->linesize[3], x0 * 2, y0, width * 2, height); -+ dst += width * height * 2; -+ av_rpi_sand_to_planar_c16(dst, width, dst + width * height / 2, width, -+ frame->data[1], frame->linesize[1], av_rpi_sand_frame_stride2(frame), x0, y0 / 2, width, height / 2); -+ return 0; -+} -+ -+static int raw_sand30_as_yuv420(AVCodecContext *avctx, AVPacket *pkt, -+ const AVFrame *frame) -+{ -+ const int width = av_frame_cropped_width(frame); -+ const int height = av_frame_cropped_height(frame); -+ const int x0 = frame->crop_left; -+ const int y0 = frame->crop_top; -+ const int size = width * height * 3; -+ uint8_t * dst; -+ int ret; -+ -+ if ((ret = ff_alloc_packet2(avctx, pkt, size, size)) < 0) -+ return ret; -+ -+ dst = pkt->data; -+ -+ av_rpi_sand30_to_planar_y16(dst, width * 2, frame->data[0], frame->linesize[0], frame->linesize[3], x0, y0, width, height); -+ dst += width * height * 2; -+ av_rpi_sand30_to_planar_c16(dst, width, dst + width * height / 2, width, -+ frame->data[1], frame->linesize[1], av_rpi_sand_frame_stride2(frame), x0/2, y0 / 2, width/2, height / 2); -+ return 0; -+} -+#endif -+ -+ - static int raw_encode(AVCodecContext *avctx, AVPacket *pkt, -- const AVFrame *frame, int *got_packet) -+ const AVFrame *src_frame, int *got_packet) - { -- int ret = av_image_get_buffer_size(frame->format, -- frame->width, frame->height, 1); -+ int ret; -+ AVFrame * frame = NULL; - -- if (ret < 0) -+#if CONFIG_SAND -+ if (av_rpi_is_sand_frame(src_frame)) { -+ ret = av_rpi_is_sand8_frame(src_frame) ? raw_sand8_as_yuv420(avctx, pkt, src_frame) : -+ av_rpi_is_sand16_frame(src_frame) ? raw_sand16_as_yuv420(avctx, pkt, src_frame) : -+ av_rpi_is_sand30_frame(src_frame) ? raw_sand30_as_yuv420(avctx, pkt, src_frame) : -1; -+ *got_packet = (ret == 0); - return ret; -+ } -+#endif -+ -+ if ((frame = av_frame_clone(src_frame)) == NULL) { -+ ret = AVERROR(ENOMEM); -+ goto fail; -+ } -+ -+ if ((ret = av_frame_apply_cropping(frame, AV_FRAME_CROP_UNALIGNED)) < 0) -+ goto fail; -+ -+ ret = av_image_get_buffer_size(frame->format, -+ frame->width, frame->height, 1); -+ if (ret < 0) -+ goto fail; - - if ((ret = ff_alloc_packet2(avctx, pkt, ret, ret)) < 0) -- return ret; -+ goto fail; - if ((ret = av_image_copy_to_buffer(pkt->data, pkt->size, - (const uint8_t **)frame->data, frame->linesize, - frame->format, - frame->width, frame->height, 1)) < 0) -- return ret; -+ goto fail; - - if(avctx->codec_tag == AV_RL32("yuv2") && ret > 0 && - frame->format == AV_PIX_FMT_YUYV422) { -@@ -81,8 +178,14 @@ static int raw_encode(AVCodecContext *av - } - } - pkt->flags |= AV_PKT_FLAG_KEY; -+ av_frame_free(&frame); - *got_packet = 1; - return 0; -+ -+fail: -+ av_frame_free(&frame); -+ *got_packet = 0; -+ return ret; - } - - AVCodec ff_rawvideo_encoder = { ---- /dev/null -+++ b/libavcodec/rpi_hevc_cabac.c -@@ -0,0 +1,2257 @@ -+/* -+ * HEVC CABAC decoding -+ * -+ * Copyright (C) 2012 - 2013 Guillaume Martres -+ * Copyright (C) 2012 - 2013 Gildas Cocherel -+ * Copyright (C) 2012 - 2013 Gildas Cocherel -+ * Copyright (C) 2018 John Cox, Ben Avison, Peter de Rivaz for Raspberry Pi (Trading) -+ * -+ * This file is part of FFmpeg. -+ * -+ * FFmpeg is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * FFmpeg is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with FFmpeg; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+ */ -+ -+#define UNCHECKED_BITSTREAM_READER 1 -+ -+#include "libavutil/attributes.h" -+#include "libavutil/common.h" -+ -+#include "cabac_functions.h" -+#include "rpi_hevc_data.h" -+#include "hevc.h" -+#include "rpi_hevcdec.h" -+#include "rpi_hevc_cabac_fns.h" -+ -+#include "libavutil/rpi_sand_fns.h" -+ -+// BY22 is probably faster than simple bypass if the processor has -+// either a fast 32-bit divide or a fast 32x32->64[63:32] instruction -+// x86 has fast int divide -+// Arm doesn't have divide or general fast 64 bit, but does have the multiply -+// * Beware: ARCH_xxx isn't set if configure --disable-asm is used -+#define USE_BY22 (HAVE_FAST_64BIT || ARCH_ARM || ARCH_X86) -+// Use native divide if we have a fast one - otherwise use mpy 1/x -+// x86 has a fast integer divide - arm doesn't - unsure about other -+// architectures -+#define USE_BY22_DIV ARCH_X86 -+ -+// Special case blocks with a single significant ceoff -+// Decreases the complexity of the code for a common case but increases the -+// code size. -+#define USE_N_END_1 1 -+ -+#if !USE_BY22_DIV -+// * 1/x @ 32 bits gets us 22 bits of accuracy -+#define CABAC_BY22_PEEK_BITS 22 -+#else -+// A real 32-bit divide gets us another bit -+// If we have a 64 bit int & a unit time divider then we should get a lot -+// of bits (55) but that is untested and it is unclear if it would give -+// us a large advantage -+#define CABAC_BY22_PEEK_BITS 23 -+#endif -+ -+#define CABAC_MAX_BIN 31 -+ -+ -+#if USE_BY22 && !USE_BY22_DIV -+#define I(x) (uint32_t)((0x10000000000ULL / (uint64_t)(x)) + 1ULL) -+ -+static const uint32_t cabac_by22_inv_range[256] = { -+ 0, I(257), I(258), I(259), -+ I(260), I(261), I(262), I(263), I(264), I(265), I(266), I(267), I(268), I(269), -+ I(270), I(271), I(272), I(273), I(274), I(275), I(276), I(277), I(278), I(279), -+ I(280), I(281), I(282), I(283), I(284), I(285), I(286), I(287), I(288), I(289), -+ I(290), I(291), I(292), I(293), I(294), I(295), I(296), I(297), I(298), I(299), -+ I(300), I(301), I(302), I(303), I(304), I(305), I(306), I(307), I(308), I(309), -+ I(310), I(311), I(312), I(313), I(314), I(315), I(316), I(317), I(318), I(319), -+ I(320), I(321), I(322), I(323), I(324), I(325), I(326), I(327), I(328), I(329), -+ I(330), I(331), I(332), I(333), I(334), I(335), I(336), I(337), I(338), I(339), -+ I(340), I(341), I(342), I(343), I(344), I(345), I(346), I(347), I(348), I(349), -+ I(350), I(351), I(352), I(353), I(354), I(355), I(356), I(357), I(358), I(359), -+ I(360), I(361), I(362), I(363), I(364), I(365), I(366), I(367), I(368), I(369), -+ I(370), I(371), I(372), I(373), I(374), I(375), I(376), I(377), I(378), I(379), -+ I(380), I(381), I(382), I(383), I(384), I(385), I(386), I(387), I(388), I(389), -+ I(390), I(391), I(392), I(393), I(394), I(395), I(396), I(397), I(398), I(399), -+ I(400), I(401), I(402), I(403), I(404), I(405), I(406), I(407), I(408), I(409), -+ I(410), I(411), I(412), I(413), I(414), I(415), I(416), I(417), I(418), I(419), -+ I(420), I(421), I(422), I(423), I(424), I(425), I(426), I(427), I(428), I(429), -+ I(430), I(431), I(432), I(433), I(434), I(435), I(436), I(437), I(438), I(439), -+ I(440), I(441), I(442), I(443), I(444), I(445), I(446), I(447), I(448), I(449), -+ I(450), I(451), I(452), I(453), I(454), I(455), I(456), I(457), I(458), I(459), -+ I(460), I(461), I(462), I(463), I(464), I(465), I(466), I(467), I(468), I(469), -+ I(470), I(471), I(472), I(473), I(474), I(475), I(476), I(477), I(478), I(479), -+ I(480), I(481), I(482), I(483), I(484), I(485), I(486), I(487), I(488), I(489), -+ I(490), I(491), I(492), I(493), I(494), I(495), I(496), I(497), I(498), I(499), -+ I(500), I(501), I(502), I(503), I(504), I(505), I(506), I(507), I(508), I(509), -+ I(510), I(511) -+}; -+#undef I -+#endif // USE_BY22 -+ -+#if ARCH_ARM -+#include "arm/rpi_hevc_cabac.h" -+#endif -+ -+/** -+ * number of bin by SyntaxElement. -+ */ -+static const int8_t num_bins_in_se[] = { -+ 1, // sao_merge_flag -+ 1, // sao_type_idx -+ 0, // sao_eo_class -+ 0, // sao_band_position -+ 0, // sao_offset_abs -+ 0, // sao_offset_sign -+ 0, // end_of_slice_flag -+ 3, // split_coding_unit_flag -+ 1, // cu_transquant_bypass_flag -+ 3, // skip_flag -+ 3, // cu_qp_delta -+ 1, // pred_mode -+ 4, // part_mode -+ 0, // pcm_flag -+ 1, // prev_intra_luma_pred_mode -+ 0, // mpm_idx -+ 0, // rem_intra_luma_pred_mode -+ 2, // intra_chroma_pred_mode -+ 1, // merge_flag -+ 1, // merge_idx -+ 5, // inter_pred_idc -+ 2, // ref_idx_l0 -+ 2, // ref_idx_l1 -+ 2, // abs_mvd_greater0_flag -+ 2, // abs_mvd_greater1_flag -+ 0, // abs_mvd_minus2 -+ 0, // mvd_sign_flag -+ 1, // mvp_lx_flag -+ 1, // no_residual_data_flag -+ 3, // split_transform_flag -+ 2, // cbf_luma -+ 4, // cbf_cb, cbf_cr -+ 2, // transform_skip_flag[][] -+ 2, // explicit_rdpcm_flag[][] -+ 2, // explicit_rdpcm_dir_flag[][] -+ 18, // last_significant_coeff_x_prefix -+ 18, // last_significant_coeff_y_prefix -+ 0, // last_significant_coeff_x_suffix -+ 0, // last_significant_coeff_y_suffix -+ 4, // significant_coeff_group_flag -+ 44, // significant_coeff_flag -+ 24, // coeff_abs_level_greater1_flag -+ 6, // coeff_abs_level_greater2_flag -+ 0, // coeff_abs_level_remaining -+ 0, // coeff_sign_flag -+ 8, // log2_res_scale_abs -+ 2, // res_scale_sign_flag -+ 1, // cu_chroma_qp_offset_flag -+ 1, // cu_chroma_qp_offset_idx -+}; -+ -+/** -+ * Offset to ctxIdx 0 in init_values and states, indexed by SyntaxElement. -+ */ -+static const int elem_offset[sizeof(num_bins_in_se)] = { -+ 0, // sao_merge_flag -+ 1, // sao_type_idx -+ 2, // sao_eo_class -+ 2, // sao_band_position -+ 2, // sao_offset_abs -+ 2, // sao_offset_sign -+ 2, // end_of_slice_flag -+ 2, // split_coding_unit_flag -+ 5, // cu_transquant_bypass_flag -+ 6, // skip_flag -+ 9, // cu_qp_delta -+ 12, // pred_mode -+ 13, // part_mode -+ 17, // pcm_flag -+ 17, // prev_intra_luma_pred_mode -+ 18, // mpm_idx -+ 18, // rem_intra_luma_pred_mode -+ 18, // intra_chroma_pred_mode -+ 20, // merge_flag -+ 21, // merge_idx -+ 22, // inter_pred_idc -+ 27, // ref_idx_l0 -+ 29, // ref_idx_l1 -+ 31, // abs_mvd_greater0_flag -+ 33, // abs_mvd_greater1_flag -+ 35, // abs_mvd_minus2 -+ 35, // mvd_sign_flag -+ 35, // mvp_lx_flag -+ 36, // no_residual_data_flag -+ 37, // split_transform_flag -+ 40, // cbf_luma -+ 42, // cbf_cb, cbf_cr -+ 46, // transform_skip_flag[][] -+ 48, // explicit_rdpcm_flag[][] -+ 50, // explicit_rdpcm_dir_flag[][] -+ 52, // last_significant_coeff_x_prefix -+ 70, // last_significant_coeff_y_prefix -+ 88, // last_significant_coeff_x_suffix -+ 88, // last_significant_coeff_y_suffix -+ 88, // significant_coeff_group_flag -+ 92, // significant_coeff_flag -+ 136, // coeff_abs_level_greater1_flag -+ 160, // coeff_abs_level_greater2_flag -+ 166, // coeff_abs_level_remaining -+ 166, // coeff_sign_flag -+ 166, // log2_res_scale_abs -+ 174, // res_scale_sign_flag -+ 176, // cu_chroma_qp_offset_flag -+ 177, // cu_chroma_qp_offset_idx -+}; -+ -+#define CNU 154 -+/** -+ * Indexed by init_type -+ */ -+static const uint8_t init_values[3][HEVC_CONTEXTS] = { -+ { // sao_merge_flag -+ 153, -+ // sao_type_idx -+ 200, -+ // split_coding_unit_flag -+ 139, 141, 157, -+ // cu_transquant_bypass_flag -+ 154, -+ // skip_flag -+ CNU, CNU, CNU, -+ // cu_qp_delta -+ 154, 154, 154, -+ // pred_mode -+ CNU, -+ // part_mode -+ 184, CNU, CNU, CNU, -+ // prev_intra_luma_pred_mode -+ 184, -+ // intra_chroma_pred_mode -+ 63, 139, -+ // merge_flag -+ CNU, -+ // merge_idx -+ CNU, -+ // inter_pred_idc -+ CNU, CNU, CNU, CNU, CNU, -+ // ref_idx_l0 -+ CNU, CNU, -+ // ref_idx_l1 -+ CNU, CNU, -+ // abs_mvd_greater1_flag -+ CNU, CNU, -+ // abs_mvd_greater1_flag -+ CNU, CNU, -+ // mvp_lx_flag -+ CNU, -+ // no_residual_data_flag -+ CNU, -+ // split_transform_flag -+ 153, 138, 138, -+ // cbf_luma -+ 111, 141, -+ // cbf_cb, cbf_cr -+ 94, 138, 182, 154, -+ // transform_skip_flag -+ 139, 139, -+ // explicit_rdpcm_flag -+ 139, 139, -+ // explicit_rdpcm_dir_flag -+ 139, 139, -+ // last_significant_coeff_x_prefix -+ 110, 110, 124, 125, 140, 153, 125, 127, 140, 109, 111, 143, 127, 111, -+ 79, 108, 123, 63, -+ // last_significant_coeff_y_prefix -+ 110, 110, 124, 125, 140, 153, 125, 127, 140, 109, 111, 143, 127, 111, -+ 79, 108, 123, 63, -+ // significant_coeff_group_flag -+ 91, 171, 134, 141, -+ // significant_coeff_flag -+ 111, 111, 125, 110, 110, 94, 124, 108, 124, 107, 125, 141, 179, 153, -+ 125, 107, 125, 141, 179, 153, 125, 107, 125, 141, 179, 153, 125, 140, -+ 139, 182, 182, 152, 136, 152, 136, 153, 136, 139, 111, 136, 139, 111, -+ 141, 111, -+ // coeff_abs_level_greater1_flag -+ 140, 92, 137, 138, 140, 152, 138, 139, 153, 74, 149, 92, 139, 107, -+ 122, 152, 140, 179, 166, 182, 140, 227, 122, 197, -+ // coeff_abs_level_greater2_flag -+ 138, 153, 136, 167, 152, 152, -+ // log2_res_scale_abs -+ 154, 154, 154, 154, 154, 154, 154, 154, -+ // res_scale_sign_flag -+ 154, 154, -+ // cu_chroma_qp_offset_flag -+ 154, -+ // cu_chroma_qp_offset_idx -+ 154, -+ }, -+ { // sao_merge_flag -+ 153, -+ // sao_type_idx -+ 185, -+ // split_coding_unit_flag -+ 107, 139, 126, -+ // cu_transquant_bypass_flag -+ 154, -+ // skip_flag -+ 197, 185, 201, -+ // cu_qp_delta -+ 154, 154, 154, -+ // pred_mode -+ 149, -+ // part_mode -+ 154, 139, 154, 154, -+ // prev_intra_luma_pred_mode -+ 154, -+ // intra_chroma_pred_mode -+ 152, 139, -+ // merge_flag -+ 110, -+ // merge_idx -+ 122, -+ // inter_pred_idc -+ 95, 79, 63, 31, 31, -+ // ref_idx_l0 -+ 153, 153, -+ // ref_idx_l1 -+ 153, 153, -+ // abs_mvd_greater1_flag -+ 140, 198, -+ // abs_mvd_greater1_flag -+ 140, 198, -+ // mvp_lx_flag -+ 168, -+ // no_residual_data_flag -+ 79, -+ // split_transform_flag -+ 124, 138, 94, -+ // cbf_luma -+ 153, 111, -+ // cbf_cb, cbf_cr -+ 149, 107, 167, 154, -+ // transform_skip_flag -+ 139, 139, -+ // explicit_rdpcm_flag -+ 139, 139, -+ // explicit_rdpcm_dir_flag -+ 139, 139, -+ // last_significant_coeff_x_prefix -+ 125, 110, 94, 110, 95, 79, 125, 111, 110, 78, 110, 111, 111, 95, -+ 94, 108, 123, 108, -+ // last_significant_coeff_y_prefix -+ 125, 110, 94, 110, 95, 79, 125, 111, 110, 78, 110, 111, 111, 95, -+ 94, 108, 123, 108, -+ // significant_coeff_group_flag -+ 121, 140, 61, 154, -+ // significant_coeff_flag -+ 155, 154, 139, 153, 139, 123, 123, 63, 153, 166, 183, 140, 136, 153, -+ 154, 166, 183, 140, 136, 153, 154, 166, 183, 140, 136, 153, 154, 170, -+ 153, 123, 123, 107, 121, 107, 121, 167, 151, 183, 140, 151, 183, 140, -+ 140, 140, -+ // coeff_abs_level_greater1_flag -+ 154, 196, 196, 167, 154, 152, 167, 182, 182, 134, 149, 136, 153, 121, -+ 136, 137, 169, 194, 166, 167, 154, 167, 137, 182, -+ // coeff_abs_level_greater2_flag -+ 107, 167, 91, 122, 107, 167, -+ // log2_res_scale_abs -+ 154, 154, 154, 154, 154, 154, 154, 154, -+ // res_scale_sign_flag -+ 154, 154, -+ // cu_chroma_qp_offset_flag -+ 154, -+ // cu_chroma_qp_offset_idx -+ 154, -+ }, -+ { // sao_merge_flag -+ 153, -+ // sao_type_idx -+ 160, -+ // split_coding_unit_flag -+ 107, 139, 126, -+ // cu_transquant_bypass_flag -+ 154, -+ // skip_flag -+ 197, 185, 201, -+ // cu_qp_delta -+ 154, 154, 154, -+ // pred_mode -+ 134, -+ // part_mode -+ 154, 139, 154, 154, -+ // prev_intra_luma_pred_mode -+ 183, -+ // intra_chroma_pred_mode -+ 152, 139, -+ // merge_flag -+ 154, -+ // merge_idx -+ 137, -+ // inter_pred_idc -+ 95, 79, 63, 31, 31, -+ // ref_idx_l0 -+ 153, 153, -+ // ref_idx_l1 -+ 153, 153, -+ // abs_mvd_greater1_flag -+ 169, 198, -+ // abs_mvd_greater1_flag -+ 169, 198, -+ // mvp_lx_flag -+ 168, -+ // no_residual_data_flag -+ 79, -+ // split_transform_flag -+ 224, 167, 122, -+ // cbf_luma -+ 153, 111, -+ // cbf_cb, cbf_cr -+ 149, 92, 167, 154, -+ // transform_skip_flag -+ 139, 139, -+ // explicit_rdpcm_flag -+ 139, 139, -+ // explicit_rdpcm_dir_flag -+ 139, 139, -+ // last_significant_coeff_x_prefix -+ 125, 110, 124, 110, 95, 94, 125, 111, 111, 79, 125, 126, 111, 111, -+ 79, 108, 123, 93, -+ // last_significant_coeff_y_prefix -+ 125, 110, 124, 110, 95, 94, 125, 111, 111, 79, 125, 126, 111, 111, -+ 79, 108, 123, 93, -+ // significant_coeff_group_flag -+ 121, 140, 61, 154, -+ // significant_coeff_flag -+ 170, 154, 139, 153, 139, 123, 123, 63, 124, 166, 183, 140, 136, 153, -+ 154, 166, 183, 140, 136, 153, 154, 166, 183, 140, 136, 153, 154, 170, -+ 153, 138, 138, 122, 121, 122, 121, 167, 151, 183, 140, 151, 183, 140, -+ 140, 140, -+ // coeff_abs_level_greater1_flag -+ 154, 196, 167, 167, 154, 152, 167, 182, 182, 134, 149, 136, 153, 121, -+ 136, 122, 169, 208, 166, 167, 154, 152, 167, 182, -+ // coeff_abs_level_greater2_flag -+ 107, 167, 91, 107, 107, 167, -+ // log2_res_scale_abs -+ 154, 154, 154, 154, 154, 154, 154, 154, -+ // res_scale_sign_flag -+ 154, 154, -+ // cu_chroma_qp_offset_flag -+ 154, -+ // cu_chroma_qp_offset_idx -+ 154, -+ }, -+}; -+ -+static const uint8_t scan_1x1[1] = { -+ 0, -+}; -+ -+static const uint8_t horiz_scan2x2_x[4] = { -+ 0, 1, 0, 1, -+}; -+ -+static const uint8_t horiz_scan2x2_y[4] = { -+ 0, 0, 1, 1 -+}; -+ -+static const uint8_t horiz_scan4x4_x[16] = { -+ 0, 1, 2, 3, -+ 0, 1, 2, 3, -+ 0, 1, 2, 3, -+ 0, 1, 2, 3, -+}; -+ -+static const uint8_t horiz_scan4x4_y[16] = { -+ 0, 0, 0, 0, -+ 1, 1, 1, 1, -+ 2, 2, 2, 2, -+ 3, 3, 3, 3, -+}; -+ -+static const uint8_t horiz_scan8x8_inv[8][8] = { -+ { 0, 1, 2, 3, 16, 17, 18, 19, }, -+ { 4, 5, 6, 7, 20, 21, 22, 23, }, -+ { 8, 9, 10, 11, 24, 25, 26, 27, }, -+ { 12, 13, 14, 15, 28, 29, 30, 31, }, -+ { 32, 33, 34, 35, 48, 49, 50, 51, }, -+ { 36, 37, 38, 39, 52, 53, 54, 55, }, -+ { 40, 41, 42, 43, 56, 57, 58, 59, }, -+ { 44, 45, 46, 47, 60, 61, 62, 63, }, -+}; -+ -+static const uint8_t diag_scan2x2_x[4] = { -+ 0, 0, 1, 1, -+}; -+ -+static const uint8_t diag_scan2x2_y[4] = { -+ 0, 1, 0, 1, -+}; -+ -+static const uint8_t diag_scan2x2_inv[2][2] = { -+ { 0, 2, }, -+ { 1, 3, }, -+}; -+ -+static const uint8_t diag_scan4x4_inv[4][4] = { -+ { 0, 2, 5, 9, }, -+ { 1, 4, 8, 12, }, -+ { 3, 7, 11, 14, }, -+ { 6, 10, 13, 15, }, -+}; -+ -+static const uint8_t diag_scan8x8_inv[8][8] = { -+ { 0, 2, 5, 9, 14, 20, 27, 35, }, -+ { 1, 4, 8, 13, 19, 26, 34, 42, }, -+ { 3, 7, 12, 18, 25, 33, 41, 48, }, -+ { 6, 11, 17, 24, 32, 40, 47, 53, }, -+ { 10, 16, 23, 31, 39, 46, 52, 57, }, -+ { 15, 22, 30, 38, 45, 51, 56, 60, }, -+ { 21, 29, 37, 44, 50, 55, 59, 62, }, -+ { 28, 36, 43, 49, 54, 58, 61, 63, }, -+}; -+ -+ -+typedef struct -+{ -+ uint16_t coeff; -+ uint16_t scale; -+} xy_off_t; -+ -+#define XYT_C(x,y,t) ((x) + ((y) << (t))) -+#define SCALE_TRAFO(t) ((t) > 3 ? 3 : (t)) -+#define SCALE_SHR(t) ((t) - SCALE_TRAFO(t)) -+#define XYT_S(x,y,t) (((x) >> SCALE_SHR(t)) + (((y) >> SCALE_SHR(t)) << SCALE_TRAFO(t))) -+ -+#define XYT(x,y,t) {XYT_C(x,y,t), XYT_S(x,y,t)} -+ -+#define OFF_DIAG(t) {\ -+ XYT(0,0,t), XYT(0,1,t), XYT(1,0,t), XYT(0,2,t),\ -+ XYT(1,1,t), XYT(2,0,t), XYT(0,3,t), XYT(1,2,t),\ -+ XYT(2,1,t), XYT(3,0,t), XYT(1,3,t), XYT(2,2,t),\ -+ XYT(3,1,t), XYT(2,3,t), XYT(3,2,t), XYT(3,3,t)\ -+} -+ -+#define OFF_HORIZ(t) {\ -+ XYT(0,0,t), XYT(1,0,t), XYT(2,0,t), XYT(3,0,t),\ -+ XYT(0,1,t), XYT(1,1,t), XYT(2,1,t), XYT(3,1,t),\ -+ XYT(0,2,t), XYT(1,2,t), XYT(2,2,t), XYT(3,2,t),\ -+ XYT(0,3,t), XYT(1,3,t), XYT(2,3,t), XYT(3,3,t)\ -+} -+ -+#define OFF_VERT(t) {\ -+ XYT(0,0,t), XYT(0,1,t), XYT(0,2,t), XYT(0,3,t),\ -+ XYT(1,0,t), XYT(1,1,t), XYT(1,2,t), XYT(1,3,t),\ -+ XYT(2,0,t), XYT(2,1,t), XYT(2,2,t), XYT(2,3,t),\ -+ XYT(3,0,t), XYT(3,1,t), XYT(3,2,t), XYT(3,3,t)\ -+} -+ -+static const xy_off_t off_xys[3][4][16] = -+{ -+ {OFF_DIAG(2), OFF_DIAG(3), OFF_DIAG(4), OFF_DIAG(5)}, -+ {OFF_HORIZ(2), OFF_HORIZ(3), OFF_HORIZ(4), OFF_HORIZ(5)}, -+ {OFF_VERT(2), OFF_VERT(3), OFF_VERT(4), OFF_VERT(5)} -+}; -+ -+ -+// Helper fns -+#ifndef hevc_mem_bits32 -+static av_always_inline uint32_t hevc_mem_bits32(const void * buf, const unsigned int offset) -+{ -+ return AV_RB32((const uint8_t *)buf + (offset >> 3)) << (offset & 7); -+} -+#endif -+ -+#if AV_GCC_VERSION_AT_LEAST(3,4) && !defined(hevc_clz32) -+#define hevc_clz32 hevc_clz32_builtin -+static av_always_inline unsigned int hevc_clz32_builtin(const uint32_t x) -+{ -+ // __builtin_clz says it works on ints - so adjust if int is >32 bits long -+ return __builtin_clz(x) - (sizeof(int) * 8 - 32); -+} -+#endif -+ -+// It is unlikely that we will ever need this but include for completeness -+#ifndef hevc_clz32 -+static inline unsigned int hevc_clz32(unsigned int x) -+{ -+ unsigned int n = 1; -+ if ((x & 0xffff0000) == 0) { -+ n += 16; -+ x <<= 16; -+ } -+ if ((x & 0xff000000) == 0) { -+ n += 8; -+ x <<= 8; -+ } -+ if ((x & 0xf0000000) == 0) { -+ n += 4; -+ x <<= 4; -+ } -+ if ((x & 0xc0000000) == 0) { -+ n += 2; -+ x <<= 2; -+ } -+ return n - ((x >> 31) & 1); -+} -+#endif -+ -+static inline int cabac_overflow(const CABACContext * const cc) -+{ -+ av_assert0(cc->bytestream >= cc->bytestream_start); -+ return cc->bytestream >= cc->bytestream_end + 4; -+} -+ -+int ff_hevc_rpi_cabac_overflow(const HEVCRpiLocalContext * const lc) -+{ -+ return cabac_overflow(&lc->cc); -+} -+ -+#if !USE_BY22 -+// If no by22 then _by22 functions will revert to normal and so _peek/_flush -+// will no longer be called but the setup calls will still exist and we want -+// to null them out -+#define bypass_start(s) -+#define bypass_finish(s) -+#else -+// Use BY22 for residual bypass block -+ -+#define bypass_start(cc) get_cabac_by22_start(cc) -+#define bypass_finish(cc) get_cabac_by22_finish(cc) -+ -+// BY22 notes that bypass is simply a divide into the bitstream and so we -+// can peek out large quantities of bits at once and treat the result as if -+// it was VLC. In many cases this will lead to O(1) processing rather than -+// O(n) though the setup and teardown is sufficiently expensive that it is -+// only worth using if we expect to be dealing with more than a few bits -+// The definition of "a few bits" will vary from platform to platform but -+// tests on ARM show that it probably isn't worth it for a single coded -+// residual, but is for >1 - it also seems likely that if there are -+// more residuals then they are likely to be bigger and this will make the -+// O(1) nature of the code more worthwhile. -+ -+ -+// Bypass block start -+// Must be called before _by22_peek is used as it sets the CABAC environment -+// into the correct state. _by22_finish must be called to return to 'normal' -+// (i.e. non-bypass) cabac decoding -+#ifndef get_cabac_by22_start -+static inline void get_cabac_by22_start(CABACContext * const c) -+{ -+ const unsigned int bits = __builtin_ctz(c->low); -+ const uint32_t m = hevc_mem_bits32(c->bytestream, 0); -+ uint32_t x = (c->low << (22 - CABAC_BITS)) ^ ((m ^ 0x80000000U) >> (9 + CABAC_BITS - bits)); -+#if !USE_BY22_DIV -+ const uint32_t inv = cabac_by22_inv_range[c->range & 0xff]; -+#endif -+ -+ c->bytestream -= (CABAC_BITS / 8); -+ c->by22.bits = bits; -+#if !USE_BY22_DIV -+ c->by22.range = c->range; -+ c->range = inv; -+#endif -+ c->low = x; -+} -+#endif -+ -+// Bypass block finish -+// Must be called at the end of the bypass block to return to normal operation -+static inline void get_cabac_by22_finish(CABACContext * const c) -+{ -+ unsigned int used = c->by22.bits; -+ unsigned int bytes_used = (used / CABAC_BITS) * (CABAC_BITS / 8); -+ unsigned int bits_used = used & (CABAC_BITS == 16 ? 15 : 7); -+ -+ c->bytestream += bytes_used + (CABAC_BITS / 8); -+ c->low = (((uint32_t)c->low >> (22 - CABAC_BITS + bits_used)) | 1) << bits_used; -+#if !USE_BY22_DIV -+ c->range = c->by22.range; -+#endif -+} -+ -+// Peek bypass bits -+// _by22_start must be called before _by22_peek is called and _by22_flush -+// must be called afterwards to flush any used bits -+// The actual number of valid bits returned is -+// min(, CABAC_BY22_PEEK_BITS). CABAC_BY22_PEEK_BITS -+// will be at least 22 which should be long enough for any prefix or suffix -+// though probably not long enough for the worst case combination -+#ifndef get_cabac_by22_peek -+static inline uint32_t get_cabac_by22_peek(const CABACContext * const c) -+{ -+#if USE_BY22_DIV -+ return ((unsigned int)c->low / (unsigned int)c->range) << 9; -+#else -+ uint32_t x = c->low & ~1U; -+ const uint32_t inv = c->range; -+ -+ if (inv != 0) -+ x = (uint32_t)(((uint64_t)x * (uint64_t)inv) >> 32); -+ -+ return x << 1; -+#endif -+} -+#endif -+ -+// Flush bypass bits peeked by _by22_peek -+// Flush n bypass bits. n must be >= 1 to guarantee correct operation -+// val is an unmodified copy of whatever _by22_peek returned -+#ifndef get_cabac_by22_flush -+static inline void get_cabac_by22_flush(CABACContext * c, const unsigned int n, const uint32_t val) -+{ -+ // Subtract the bits used & reshift up to the top of the word -+#if USE_BY22_DIV -+ const uint32_t low = (((unsigned int)c->low << n) - (((val >> (32 - n)) * (unsigned int)c->range) << 23)); -+#else -+ const uint32_t low = (((uint32_t)c->low << n) - (((val >> (32 - n)) * c->by22.range) << 23)); -+#endif -+ -+ // and refill lower bits -+ // We will probably OR over some existing bits but that doesn't matter -+ c->by22.bits += n; -+ c->low = low | (hevc_mem_bits32(c->bytestream, c->by22.bits) >> 9); -+} -+#endif -+ -+#endif // USE_BY22 -+ -+ -+void ff_hevc_rpi_save_states(HEVCRpiContext *s, const HEVCRpiLocalContext * const lc) -+{ -+ memcpy(s->cabac_save->rice, lc->stat_coeff, 4); -+ memcpy(s->cabac_save->state, lc->cabac_state, HEVC_CONTEXTS); -+} -+ -+static void load_states(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc) -+{ -+ memcpy(lc->stat_coeff, s->cabac_save->rice, 4); -+ memcpy(lc->cabac_state, s->cabac_save->state, HEVC_CONTEXTS); -+} -+ -+int ff_hevc_rpi_cabac_init_decoder(HEVCRpiLocalContext * const lc) -+{ -+ GetBitContext * const gb = &lc->gb; -+ skip_bits(gb, 1); -+ align_get_bits(gb); -+ return ff_init_cabac_decoder(&lc->cc, -+ gb->buffer + get_bits_count(gb) / 8, -+ (get_bits_left(gb) + 7) / 8); -+} -+ -+static void cabac_init_state(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc) -+{ -+ int init_type = 2 - s->sh.slice_type; -+ int i; -+ -+ if (s->sh.cabac_init_flag && s->sh.slice_type != HEVC_SLICE_I) -+ init_type ^= 3; -+ -+ for (i = 0; i < HEVC_CONTEXTS; i++) { -+ int init_value = init_values[init_type][i]; -+ int m = (init_value >> 4) * 5 - 45; -+ int n = ((init_value & 15) << 3) - 16; -+ int pre = 2 * (((m * av_clip(s->sh.slice_qp, 0, 51)) >> 4) + n) - 127; -+ -+ pre ^= pre >> 31; -+ if (pre > 124) -+ pre = 124 + (pre & 1); -+ lc->cabac_state[i] = pre; -+ } -+ -+ for (i = 0; i < 4; i++) -+ lc->stat_coeff[i] = 0; -+} -+ -+void ff_hevc_rpi_cabac_init(const HEVCRpiContext * const s, HEVCRpiLocalContext *const lc, const unsigned int ctb_flags) -+{ -+ if (lc->cabac_init_req == 1 || (ctb_flags & CTB_TS_FLAGS_CIREQ) != 0) -+ { -+ lc->qPy_pred = s->sh.slice_qp; -+ cabac_init_state(s, lc); -+ } -+ else if ((ctb_flags & CTB_TS_FLAGS_CLOAD) != 0) -+ { -+ lc->qPy_pred = s->sh.slice_qp; -+ load_states(s, lc); -+ } -+ lc->cabac_init_req = 0; -+} -+ -+#define GET_CABAC_LC(ctx) get_cabac(&lc->cc, lc->cabac_state + (ctx)) -+ -+int ff_hevc_rpi_get_cabac(CABACContext * const c, uint8_t * const state) -+{ -+ return get_cabac_inline(c, state); -+} -+ -+int ff_hevc_rpi_get_cabac_terminate(CABACContext * const c) -+{ -+ return get_cabac_terminate(c); -+} -+ -+int ff_hevc_rpi_sao_type_idx_decode(HEVCRpiLocalContext * const lc) -+{ -+ if (!GET_CABAC_LC(elem_offset[SAO_TYPE_IDX])) -+ return 0; -+ -+ if (!get_cabac_bypass(&lc->cc)) -+ return SAO_BAND; -+ return SAO_EDGE; -+} -+ -+int ff_hevc_rpi_sao_band_position_decode(HEVCRpiLocalContext * const lc) -+{ -+ int i; -+ int value = get_cabac_bypass(&lc->cc); -+ -+ for (i = 0; i < 4; i++) -+ value = (value << 1) | get_cabac_bypass(&lc->cc); -+ return value; -+} -+ -+int ff_hevc_rpi_sao_offset_abs_decode(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc) -+{ -+ int i = 0; -+ int length = (1 << (FFMIN(s->ps.sps->bit_depth, 10) - 5)) - 1; -+ -+ while (i < length && get_cabac_bypass(&lc->cc)) -+ i++; -+ return i; -+} -+ -+int ff_hevc_rpi_sao_offset_sign_decode(HEVCRpiLocalContext * const lc) -+{ -+ return get_cabac_bypass(&lc->cc); -+} -+ -+int ff_hevc_rpi_sao_eo_class_decode(HEVCRpiLocalContext * const lc) -+{ -+ int ret = get_cabac_bypass(&lc->cc) << 1; -+ ret |= get_cabac_bypass(&lc->cc); -+ return ret; -+} -+ -+int ff_hevc_rpi_cu_qp_delta(HEVCRpiLocalContext * const lc) -+{ -+ int val = 1; -+ -+ if (get_cabac(&lc->cc, lc->cabac_state + HEVC_BIN_CU_QP_DELTA) == 0) -+ return 0; -+ -+ while (val < 5 && -+ get_cabac(&lc->cc, lc->cabac_state + HEVC_BIN_CU_QP_DELTA + 1) != 0) -+ val++; -+ -+ if (val >= 5) { -+ unsigned int k = 0; -+ while (k < CABAC_MAX_BIN && get_cabac_bypass(&lc->cc)) { -+ val += 1 << k; -+ k++; -+ } -+// if (k == CABAC_MAX_BIN) -+// av_log(s->avctx, AV_LOG_ERROR, "CABAC_MAX_BIN : %d\n", k); -+ -+ while (k--) -+ val += get_cabac_bypass(&lc->cc) << k; -+ } -+ return get_cabac_bypass(&lc->cc) ? -val : val; -+} -+ -+int ff_hevc_rpi_cu_chroma_qp_offset_idx(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc) -+{ -+ int c_max= FFMAX(5, s->ps.pps->chroma_qp_offset_list_len_minus1); -+ int i = 0; -+ -+ while (i < c_max && GET_CABAC_LC(elem_offset[CU_CHROMA_QP_OFFSET_IDX])) -+ i++; -+ -+ return i; -+} -+ -+int ff_hevc_rpi_part_mode_decode(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc, const int log2_cb_size) -+{ -+ if (GET_CABAC_LC(elem_offset[PART_MODE])) // 1 -+ return PART_2Nx2N; -+ if (log2_cb_size == s->ps.sps->log2_min_cb_size) { -+ if (lc->cu.pred_mode == MODE_INTRA) // 0 -+ return PART_NxN; -+ if (GET_CABAC_LC(elem_offset[PART_MODE] + 1)) // 01 -+ return PART_2NxN; -+ if (log2_cb_size == 3) // 00 -+ return PART_Nx2N; -+ if (GET_CABAC_LC(elem_offset[PART_MODE] + 2)) // 001 -+ return PART_Nx2N; -+ return PART_NxN; // 000 -+ } -+ -+ if (!s->ps.sps->amp_enabled_flag) { -+ if (GET_CABAC_LC(elem_offset[PART_MODE] + 1)) // 01 -+ return PART_2NxN; -+ return PART_Nx2N; -+ } -+ -+ if (GET_CABAC_LC(elem_offset[PART_MODE] + 1)) { // 01X, 01XX -+ if (GET_CABAC_LC(elem_offset[PART_MODE] + 3)) // 011 -+ return PART_2NxN; -+ if (get_cabac_bypass(&lc->cc)) // 0101 -+ return PART_2NxnD; -+ return PART_2NxnU; // 0100 -+ } -+ -+ if (GET_CABAC_LC(elem_offset[PART_MODE] + 3)) // 001 -+ return PART_Nx2N; -+ if (get_cabac_bypass(&lc->cc)) // 0001 -+ return PART_nRx2N; -+ return PART_nLx2N; // 0000 -+} -+ -+int ff_hevc_rpi_mpm_idx_decode(HEVCRpiLocalContext * const lc) -+{ -+ int i = 0; -+ while (i < 2 && get_cabac_bypass(&lc->cc)) -+ i++; -+ return i; -+} -+ -+int ff_hevc_rpi_rem_intra_luma_pred_mode_decode(HEVCRpiLocalContext * const lc) -+{ -+ int i; -+ int value = get_cabac_bypass(&lc->cc); -+ -+ for (i = 0; i < 4; i++) -+ value = (value << 1) | get_cabac_bypass(&lc->cc); -+ return value; -+} -+ -+int ff_hevc_rpi_intra_chroma_pred_mode_decode(HEVCRpiLocalContext * const lc) -+{ -+ int ret; -+ if (!GET_CABAC_LC(elem_offset[INTRA_CHROMA_PRED_MODE])) -+ return 4; -+ -+ ret = get_cabac_bypass(&lc->cc) << 1; -+ ret |= get_cabac_bypass(&lc->cc); -+ return ret; -+} -+ -+int ff_hevc_rpi_merge_idx_decode(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc) -+{ -+ int i = GET_CABAC_LC(elem_offset[MERGE_IDX]); -+ -+ if (i != 0) { -+ while (i < s->sh.max_num_merge_cand-1 && get_cabac_bypass(&lc->cc)) -+ i++; -+ } -+ return i; -+} -+ -+int ff_hevc_rpi_inter_pred_idc_decode(HEVCRpiLocalContext * const lc, int nPbW, int nPbH) -+{ -+ if (nPbW + nPbH == 12) -+ return GET_CABAC_LC(elem_offset[INTER_PRED_IDC] + 4); -+ if (GET_CABAC_LC(elem_offset[INTER_PRED_IDC] + lc->ct_depth)) -+ return PRED_BI; -+ -+ return GET_CABAC_LC(elem_offset[INTER_PRED_IDC] + 4); -+} -+ -+int ff_hevc_rpi_ref_idx_lx_decode(HEVCRpiLocalContext * const lc, const int num_ref_idx_lx) -+{ -+ int i = 0; -+ int max = num_ref_idx_lx - 1; -+ int max_ctx = FFMIN(max, 2); -+ -+ while (i < max_ctx && GET_CABAC_LC(elem_offset[REF_IDX_L0] + i)) -+ i++; -+ if (i == 2) { -+ while (i < max && get_cabac_bypass(&lc->cc)) -+ i++; -+ } -+ -+ return i; -+} -+ -+static av_always_inline int abs_mvd_greater0_flag_decode(HEVCRpiLocalContext * const lc) -+{ -+ return GET_CABAC_LC(elem_offset[ABS_MVD_GREATER0_FLAG]); -+} -+ -+static av_always_inline int abs_mvd_greater1_flag_decode(HEVCRpiLocalContext * const lc) -+{ -+ return GET_CABAC_LC(elem_offset[ABS_MVD_GREATER1_FLAG] + 1); -+} -+ -+#if !USE_BY22 -+static av_always_inline int mvd_decode(HEVCRpiLocalContext * const lc) -+{ -+ int ret = 2; -+ int k = 1; -+ -+ while (k < CABAC_MAX_BIN && get_cabac_bypass(&lc->cc)) { -+ ret += 1U << k; -+ k++; -+ } -+ if (k == CABAC_MAX_BIN) { -+ av_log(NULL, AV_LOG_ERROR, "CABAC_MAX_BIN : %d\n", k); -+ return 0; -+ } -+ -+ while (k--) -+ ret += get_cabac_bypass(&lc->cc) << k; -+ return get_cabac_bypass_sign(&lc->cc, -ret); -+} -+#endif -+ -+static av_always_inline int mvd_sign_flag_decode(HEVCRpiLocalContext * const lc) -+{ -+ return get_cabac_bypass_sign(&lc->cc, -1); -+} -+ -+static int hevc_transform_skip_flag_decode(HEVCRpiLocalContext * const lc, int c_idx_nz) -+{ -+ return GET_CABAC_LC(elem_offset[TRANSFORM_SKIP_FLAG] + c_idx_nz); -+} -+ -+static int explicit_rdpcm_flag_decode(HEVCRpiLocalContext * const lc, int c_idx_nz) -+{ -+ return GET_CABAC_LC(elem_offset[EXPLICIT_RDPCM_FLAG] + c_idx_nz); -+} -+ -+static int explicit_rdpcm_dir_flag_decode(HEVCRpiLocalContext * const lc, int c_idx_nz) -+{ -+ return GET_CABAC_LC(elem_offset[EXPLICIT_RDPCM_DIR_FLAG] + c_idx_nz); -+} -+ -+ -+int ff_hevc_rpi_log2_res_scale_abs(HEVCRpiLocalContext * const lc, const int idx) { -+ int i =0; -+ -+ while (i < 4 && GET_CABAC_LC(elem_offset[LOG2_RES_SCALE_ABS] + 4 * idx + i)) -+ i++; -+ -+ return i; -+} -+ -+static av_always_inline void last_significant_coeff_xy_prefix_decode(HEVCRpiLocalContext * const lc, int c_idx_nz, -+ int log2_size, int *last_scx_prefix, int *last_scy_prefix) -+{ -+ int i = 0; -+ int max = (log2_size << 1) - 1; -+ int ctx_offset, ctx_shift; -+ -+ if (!c_idx_nz) { -+ ctx_offset = 3 * (log2_size - 2) + ((log2_size - 1) >> 2); -+ ctx_shift = (log2_size + 1) >> 2; -+ } else { -+ ctx_offset = 15; -+ ctx_shift = log2_size - 2; -+ } -+ while (i < max && -+ GET_CABAC_LC(elem_offset[LAST_SIGNIFICANT_COEFF_X_PREFIX] + (i >> ctx_shift) + ctx_offset)) -+ i++; -+ *last_scx_prefix = i; -+ -+ i = 0; -+ while (i < max && -+ GET_CABAC_LC(elem_offset[LAST_SIGNIFICANT_COEFF_Y_PREFIX] + (i >> ctx_shift) + ctx_offset)) -+ i++; -+ *last_scy_prefix = i; -+} -+ -+static av_always_inline int last_significant_coeff_suffix_decode(HEVCRpiLocalContext * const lc, -+ int last_significant_coeff_prefix) -+{ -+ int i; -+ int length = (last_significant_coeff_prefix >> 1) - 1; -+ int value = get_cabac_bypass(&lc->cc); -+ -+ for (i = 1; i < length; i++) -+ value = (value << 1) | get_cabac_bypass(&lc->cc); -+ return value; -+} -+ -+static av_always_inline int significant_coeff_group_flag_decode(HEVCRpiLocalContext * const lc, int c_idx_nz, int ctx_cg) -+{ -+ int inc; -+ -+ inc = (ctx_cg != 0) + (c_idx_nz << 1); -+ -+ return GET_CABAC_LC(elem_offset[SIGNIFICANT_COEFF_GROUP_FLAG] + inc); -+} -+ -+static av_always_inline int significant_coeff_flag_decode_0(HEVCRpiLocalContext * const lc, int offset) -+{ -+ return GET_CABAC_LC(elem_offset[SIGNIFICANT_COEFF_FLAG] + offset); -+} -+ -+#if !USE_BY22 -+#define coeff_abs_level_remaining_decode_bypass(s,r) coeff_abs_level_remaining_decode(s, r) -+#endif -+ -+ -+#ifndef coeff_abs_level_remaining_decode_bypass -+static int coeff_abs_level_remaining_decode_bypass(CABACContext * const c, const unsigned int rice_param) -+{ -+ uint32_t y; -+ unsigned int prefix; -+ unsigned int last_coeff_abs_level_remaining; -+ unsigned int n; -+ -+ y = get_cabac_by22_peek(c); -+ prefix = hevc_clz32(~y); -+ // y << prefix will always have top bit 0 -+ -+ if (prefix < 3) { -+ const unsigned int suffix = (y << prefix) >> (31 - rice_param); -+ last_coeff_abs_level_remaining = (prefix << rice_param) + suffix; -+ n = prefix + 1 + rice_param; -+ } -+ else if (prefix * 2 + rice_param <= CABAC_BY22_PEEK_BITS + 2) -+ { -+ const uint32_t suffix = ((y << prefix) | 0x80000000) >> (34 - (prefix + rice_param)); -+ -+ last_coeff_abs_level_remaining = (2 << rice_param) + suffix; -+ n = prefix * 2 + rice_param - 2; -+ } -+ else { -+ unsigned int suffix; -+ -+ get_cabac_by22_flush(c, prefix, y); -+ y = get_cabac_by22_peek(c); -+ -+ suffix = (y | 0x80000000) >> (34 - (prefix + rice_param)); -+ last_coeff_abs_level_remaining = (2 << rice_param) + suffix; -+ n = prefix + rice_param - 2; -+ } -+ -+ get_cabac_by22_flush(c, n, y); -+ -+ return last_coeff_abs_level_remaining; -+} -+#endif -+ -+static int coeff_abs_level_remaining_decode(CABACContext * const c, int rc_rice_param) -+{ -+ int prefix = 0; -+ int suffix = 0; -+ int last_coeff_abs_level_remaining; -+ int i; -+ -+ while (prefix < CABAC_MAX_BIN && get_cabac_bypass(c)) -+ prefix++; -+ if (prefix == CABAC_MAX_BIN) { -+// av_log(s->avctx, AV_LOG_ERROR, "CABAC_MAX_BIN : %d\n", prefix); -+ return 0; -+ } -+ -+ if (prefix < 3) { -+ for (i = 0; i < rc_rice_param; i++) -+ suffix = (suffix << 1) | get_cabac_bypass(c); -+ last_coeff_abs_level_remaining = (prefix << rc_rice_param) + suffix; -+ } else { -+ int prefix_minus3 = prefix - 3; -+ for (i = 0; i < prefix_minus3 + rc_rice_param; i++) -+ suffix = (suffix << 1) | get_cabac_bypass(c); -+ last_coeff_abs_level_remaining = (((1 << prefix_minus3) + 3 - 1) -+ << rc_rice_param) + suffix; -+ } -+ -+ return last_coeff_abs_level_remaining; -+} -+ -+#if !USE_BY22 -+#define coeff_sign_flag_decode_bypass coeff_sign_flag_decode -+static inline uint32_t coeff_sign_flag_decode(CABACContext * const c, const unsigned int nb) -+{ -+ unsigned int i; -+ uint32_t ret = 0; -+ -+ for (i = 0; i < nb; i++) -+ ret = (ret << 1) | get_cabac_bypass(c); -+ -+ return ret << (32 - nb); -+} -+#endif -+ -+#ifndef coeff_sign_flag_decode_bypass -+static inline uint32_t coeff_sign_flag_decode_bypass(CABACContext * const c, const unsigned int nb) -+{ -+ uint32_t y; -+ y = get_cabac_by22_peek(c); -+ get_cabac_by22_flush(c, nb, y); -+ return y & ~(0xffffffffU >> nb); -+} -+#endif -+ -+ -+#ifndef get_cabac_greater1_bits -+static inline unsigned int get_cabac_greater1_bits(CABACContext * const c, const unsigned int n, -+ uint8_t * const state0) -+{ -+ unsigned int i; -+ unsigned int rv = 0; -+ for (i = 0; i != n; ++i) { -+ const unsigned int idx = rv != 0 ? 0 : i < 3 ? i + 1 : 3; -+ const unsigned int b = get_cabac(c, state0 + idx); -+ rv = (rv << 1) | b; -+ } -+ return rv; -+} -+#endif -+ -+ -+// N.B. levels returned are the values assuming coeff_abs_level_remaining -+// is uncoded, so 1 must be added if it is coded. sum_abs also reflects -+// this version of events. -+static inline uint32_t get_greaterx_bits(HEVCRpiLocalContext * const lc, const unsigned int n_end, int * const levels, -+ int * const pprev_subset_coded, int * const psum, -+ const unsigned int idx0_gt1, const unsigned int idx_gt2) -+{ -+ CABACContext * const c = &lc->cc; -+ uint8_t * const state0 = lc->cabac_state + idx0_gt1; -+ uint8_t * const state_gt2 = lc->cabac_state + idx_gt2; -+ unsigned int rv; -+ unsigned int i; -+ const unsigned int n = FFMIN(n_end, 8); -+ -+ // Really this is i != n but the simple unconditional loop is cheaper -+ // and faster -+ for (i = 0; i != 8; ++i) -+ levels[i] = 1; -+ -+ rv = get_cabac_greater1_bits(c, n, state0); -+ -+ *pprev_subset_coded = 0; -+ *psum = n; -+ -+ rv <<= (32 - n); -+ if (rv != 0) -+ { -+ *pprev_subset_coded = 1; -+ *psum = n + 1; -+ i = hevc_clz32(rv); -+ levels[i] = 2; -+ if (get_cabac(c, state_gt2) == 0) -+ { -+ // Unset first coded bit -+ rv &= ~(0x80000000U >> i); -+ } -+ } -+ -+ if (n_end > 8) { -+ const unsigned int g8 = n_end - 8; -+ rv |= ((1 << g8) - 1) << (24 - g8); -+ for (i = 0; i != g8; ++i) { -+ levels[i + 8] = 0; -+ } -+ } -+ -+ return rv; -+} -+ -+// extended_precision_processing_flag must be false given we are -+// putting the result into a 16-bit array -+// So trans_coeff_level must fit in 16 bits too (7.4.9.1 definition of coeff_abs_level_remaining) -+// scale_m is uint8_t -+// -+// scale is [40 - 72] << [0..12] based on qp- worst case is (45 << 12) -+// or it can be 2 (if we have transquant_bypass) -+// shift is set to one less than we really want but would normally be -+// s->ps.sps->bit_depth (max 16, min 8) + log2_trafo_size (max 5, min 2?) - 5 = max 16 min 5? -+// however the scale shift is substracted from shift to a min 0 so scale_m worst = 45 << 6 -+// This can still theoretically lead to overflow but the coding would have to be very odd (& inefficient) -+// to achieve it -+ -+#ifndef trans_scale_sat -+static inline int trans_scale_sat(const int level, const unsigned int scale, const unsigned int scale_m, const unsigned int shift) -+{ -+ return av_clip_int16((((level * (int)(scale * scale_m)) >> shift) + 1) >> 1); -+} -+#endif -+ -+ -+#ifndef update_rice -+static inline void update_rice(uint8_t * const stat_coeff, -+ const unsigned int last_coeff_abs_level_remaining, -+ const unsigned int c_rice_param) -+{ -+ const unsigned int x = (last_coeff_abs_level_remaining << 1) >> c_rice_param; -+ if (x >= 6) -+ (*stat_coeff)++; -+ else if (x == 0 && *stat_coeff > 0) -+ (*stat_coeff)--; -+} -+#endif -+ -+ -+// n must be > 0 on entry -+#ifndef get_cabac_sig_coeff_flag_idxs -+static inline uint8_t * get_cabac_sig_coeff_flag_idxs(CABACContext * const c, uint8_t * const state0, -+ unsigned int n, -+ const uint8_t const * ctx_map, -+ uint8_t * p) -+{ -+ do { -+ if (get_cabac(c, state0 + ctx_map[n])) -+ *p++ = n; -+ } while (--n != 0); -+ return p; -+} -+#endif -+ -+ -+static int get_sig_coeff_flag_idxs(CABACContext * const c, uint8_t * const state0, -+ unsigned int n, -+ const uint8_t * ctx_map, // const ptr here but not in asm -+ uint8_t * const flag_idx) -+{ -+ int rv; -+ -+ rv = get_cabac_sig_coeff_flag_idxs(c, state0, n, ctx_map, flag_idx) - flag_idx; -+ -+ return rv; -+} -+ -+#define H4x4(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15) {\ -+ x0, x1, x2, x3,\ -+ x4, x5, x6, x7,\ -+ x8, x9, x10, x11,\ -+ x12, x13, x14, x15} -+ -+#define V4x4(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15) {\ -+ x0, x4, x8, x12,\ -+ x1, x5, x9, x13,\ -+ x2, x6, x10, x14,\ -+ x3, x7, x11, x15} -+ -+#define D4x4(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15) {\ -+ x0, x4, x1, x8,\ -+ x5, x2, x12, x9,\ -+ x6, x3, x13, x10,\ -+ x7, x14, x11, x15} -+ -+ -+static inline int next_subset(HEVCRpiLocalContext * const lc, int i, const int c_idx_nz, -+ uint8_t * const significant_coeff_group_flag, -+ const uint8_t * const scan_x_cg, const uint8_t * const scan_y_cg, -+ int * const pPrev_sig) -+{ -+ while (--i >= 0) { -+ uint8_t * const gf_y = scan_y_cg[i] + significant_coeff_group_flag; -+ const unsigned int x_cg = scan_x_cg[i]; -+ -+ // For the flag decode we only care about Z/NZ but -+ // we use the full Right * 2 + Down when calculating -+ // significant coeff flags so we obtain it here. -+ // -+ // The group flag array is one longer than it needs to -+ // be so we don't need to check for y_cg limits -+ const unsigned int prev_sig = ((gf_y[0] >> x_cg) & 2) | ((gf_y[1] >> x_cg) & 1); -+ -+ if (i == 0 || -+ significant_coeff_group_flag_decode(lc, c_idx_nz, prev_sig)) -+ { -+ gf_y[0] |= (1 << x_cg); -+ *pPrev_sig = prev_sig; -+ break; -+ } -+ } -+ -+ return i; -+} -+ -+static void rpi_add_residual(const HEVCRpiContext *const s, HEVCRpiJob * const jb, -+ const unsigned int log2_trafo_size, const unsigned int c_idx, -+ const unsigned int x0, const unsigned int y0, const int16_t * const coeffs) -+{ -+ const AVFrame * const frame = s->frame; -+ const unsigned int stride = frame_stride1(s->frame, c_idx); -+ const unsigned int x = x0 >> ctx_hshift(s, c_idx); -+ const unsigned int y = y0 >> ctx_vshift(s, c_idx); -+ const int is_sliced = 1; // av_rpi_is_sand_frame(frame); -+ uint8_t * const dst = !is_sliced ? -+ s->frame->data[c_idx] + y * stride + (x << s->ps.sps->pixel_shift) : -+ c_idx == 0 ? -+ av_rpi_sand_frame_pos_y(frame, x, y) : -+ av_rpi_sand_frame_pos_c(frame, x, y); -+ -+ const unsigned int i = jb->intra.n; -+ HEVCPredCmd *const pc = jb->intra.cmds + i - 1; -+ -+ if (i != 0 && c_idx == 2 && pc->type == RPI_PRED_ADD_RESIDUAL_U && -+ pc->ta.dst == dst) -+ { -+ av_assert1(pc->size == log2_trafo_size && -+ pc->c_idx == 1 && -+ pc->ta.stride == stride); -+ -+ pc->type = RPI_PRED_ADD_RESIDUAL_C; -+ } -+ else if (i != 0 && c_idx == 2 && pc->type == RPI_PRED_ADD_DC_U && -+ pc->dc.dst == dst) -+ { -+ const int16_t dc = (int16_t)pc->dc.dc; // Discard top bits -+ av_assert1(pc->size == log2_trafo_size && -+ pc->c_idx == 1 && -+ pc->dc.stride == stride); -+ -+ // Rewrite as add residual - must rewrite all fields as different union member -+ pc->type = RPI_PRED_ADD_RESIDUAL_V; -+ pc->ta.buf = coeffs; -+ pc->ta.dst = dst; -+ pc->ta.stride = stride; -+ pc->ta.dc = dc; -+ } -+ else -+ { -+ HEVCPredCmd * const cmd = pc + 1; -+ jb->intra.n = i + 1; -+ -+ cmd->type = RPI_PRED_ADD_RESIDUAL + (is_sliced ? c_idx : 0); -+ cmd->size = log2_trafo_size; -+ cmd->ta.buf = coeffs; -+ cmd->ta.dst = dst; -+ cmd->ta.stride = stride; -+ cmd->ta.dc = 0; -+ } -+} -+ -+ -+static void rpi_add_dc(const HEVCRpiContext * const s, HEVCRpiJob * const jb, -+ const unsigned int log2_trafo_size, const unsigned int c_idx, -+ const unsigned int x0, const unsigned int y0, const int16_t * const coeffs) -+{ -+ const AVFrame * const frame = s->frame; -+ const unsigned int stride = frame_stride1(s->frame, c_idx); -+ const unsigned int x = x0 >> ctx_hshift(s, c_idx); -+ const unsigned int y = y0 >> ctx_vshift(s, c_idx); -+ const int is_sliced = 1; -+ uint8_t * const dst = !is_sliced ? -+ s->frame->data[c_idx] + y * stride + (x << s->ps.sps->pixel_shift) : -+ c_idx == 0 ? -+ av_rpi_sand_frame_pos_y(frame, x, y) : -+ av_rpi_sand_frame_pos_c(frame, x, y); -+ -+ const unsigned int shift = FFMAX(14 - s->ps.sps->bit_depth, 0); -+ const int coeff = (coeffs[0] + (1 | (1 << shift))) >> (shift + 1); -+ -+ const unsigned int i = jb->intra.n; -+ HEVCPredCmd *const pc = jb->intra.cmds + i - 1; -+ -+ if (i != 0 && c_idx == 2 && pc->type == RPI_PRED_ADD_RESIDUAL_U && -+ pc->ta.dst == dst) -+ { -+ av_assert1(pc->size == log2_trafo_size && -+ pc->c_idx == 1 && -+ pc->ta.stride == stride); -+ -+ pc->ta.dc = (int16_t)coeff; -+ } -+ else if (i != 0 && c_idx == 2 && pc->type == RPI_PRED_ADD_DC_U && -+ pc->dc.dst == dst) -+ { -+ av_assert1(pc->size == log2_trafo_size && -+ pc->c_idx == 1 && -+ pc->dc.stride == stride && -+ (pc->dc.dc & ~0xffff) == 0); -+ -+ pc->dc.dc |= (coeff << 16); -+ } -+ else -+ { -+ HEVCPredCmd * const cmd = pc + 1; -+ jb->intra.n = i + 1; -+ -+ cmd->type = RPI_PRED_ADD_DC + c_idx; -+ cmd->size = log2_trafo_size; -+ cmd->dc.dst = dst; -+ cmd->dc.stride = stride; -+ cmd->dc.dc = c_idx == 0 ? coeff : c_idx == 2 ? coeff << 16 : coeff & 0xffff; -+ } -+} -+ -+ -+void ff_hevc_rpi_hls_residual_coding(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc, -+ const int x0, const int y0, -+ const int log2_trafo_size, const enum ScanType scan_idx, -+ const int c_idx) -+{ -+ int trans_skip_or_bypass = lc->cu.cu_transquant_bypass_flag; -+ -+ int last_significant_coeff_x, last_significant_coeff_y; -+ int num_coeff = 0; -+ int prev_subset_coded = 0; -+ -+ int num_last_subset; -+ int x_cg_last_sig, y_cg_last_sig; -+ -+ const uint8_t *scan_x_cg, *scan_y_cg; -+ const xy_off_t * const scan_xy_off = off_xys[scan_idx][log2_trafo_size - 2]; -+ -+ int use_vpu; -+#if RPI_COMPRESS_COEFFS -+ int num_nonzero = 0; -+ int use_compress = 0; -+ int *coeffs32; -+#endif -+ int use_dc = 0; -+ int16_t *coeffs; -+ uint8_t significant_coeff_group_flag[9] = {0}; // Allow 1 final byte that is always zero -+ int explicit_rdpcm_flag = 0; -+ int explicit_rdpcm_dir_flag; -+ -+ int i; -+ int shift,scale; -+ const uint8_t *scale_matrix = NULL; -+ uint8_t dc_scale; -+ const int c_idx_nz = (c_idx != 0); -+ const int pred_mode_intra = c_idx_nz ? lc->tu.intra_pred_mode_c : lc->tu.intra_pred_mode; -+ int prev_sig = 0; -+ int may_hide_sign; -+ -+ int16_t dummy_coeffs[16]; -+ -+ // Derive QP for dequant -+ if (!lc->cu.cu_transquant_bypass_flag) { -+ may_hide_sign = s->ps.pps->sign_data_hiding_flag; -+ -+ if (s->ps.pps->transform_skip_enabled_flag && -+ log2_trafo_size <= s->ps.pps->log2_max_transform_skip_block_size) { -+ int transform_skip_flag = hevc_transform_skip_flag_decode(lc, c_idx_nz); -+ if (transform_skip_flag) { -+ trans_skip_or_bypass = 1; -+ if (lc->cu.pred_mode == MODE_INTRA && -+ s->ps.sps->implicit_rdpcm_enabled_flag && -+ (pred_mode_intra == 10 || pred_mode_intra == 26)) { -+ may_hide_sign = 0; -+ } -+ } -+ } -+ -+ { -+ static const uint8_t level_scale[8] = { -+ 40, 45, 51, 57, 64, 72, 0, 0 // Pad to 8 -+ }; -+ const int qp6 = (int8_t)lc->tu.qp_divmod6[c_idx][lc->qp_y]; -+ -+ // Shift is set to one less than will actually occur as the scale -+ // and saturate step adds 1 and then shifts right again -+ scale = level_scale[qp6 & 7]; -+// shift = s->ps.sps->bit_depth + log2_trafo_size - (int)(qp6 >> 3); -+ shift = log2_trafo_size - (qp6 >> 3); -+ -+ if (shift < 0) { -+ scale <<= -shift; -+ shift = 0; -+ } -+ } -+ -+ if (s->ps.sps->scaling_list_enable_flag && !(trans_skip_or_bypass && log2_trafo_size > 2)) { -+ const ScalingList * const sl = s->ps.pps->scaling_list_data_present_flag ? -+ &s->ps.pps->scaling_list : &s->ps.sps->scaling_list; -+ const unsigned int matrix_id = -+ lc->cu.pred_mode != MODE_INTRA ? 3 + c_idx : c_idx; -+ -+ scale_matrix = sl->sl[log2_trafo_size - 2][matrix_id]; -+ dc_scale = scale_matrix[0]; -+ if (log2_trafo_size >= 4) -+ dc_scale = sl->sl_dc[log2_trafo_size - 4][matrix_id]; -+ } -+ else -+ { -+ static const uint8_t sixteen_scale[64] = { -+ 16, 16, 16, 16, 16, 16, 16, 16, -+ 16, 16, 16, 16, 16, 16, 16, 16, -+ 16, 16, 16, 16, 16, 16, 16, 16, -+ 16, 16, 16, 16, 16, 16, 16, 16, -+ 16, 16, 16, 16, 16, 16, 16, 16, -+ 16, 16, 16, 16, 16, 16, 16, 16, -+ 16, 16, 16, 16, 16, 16, 16, 16, -+ 16, 16, 16, 16, 16, 16, 16, 16 -+ }; -+ scale_matrix = sixteen_scale; -+ dc_scale = 16; -+ } -+ } else { -+ static const uint8_t unit_scale[64] = { -+ 1, 1, 1, 1, 1, 1, 1, 1, -+ 1, 1, 1, 1, 1, 1, 1, 1, -+ 1, 1, 1, 1, 1, 1, 1, 1, -+ 1, 1, 1, 1, 1, 1, 1, 1, -+ 1, 1, 1, 1, 1, 1, 1, 1, -+ 1, 1, 1, 1, 1, 1, 1, 1, -+ 1, 1, 1, 1, 1, 1, 1, 1, -+ 1, 1, 1, 1, 1, 1, 1, 1, -+ }; -+ scale_matrix = unit_scale; -+ shift = 0; -+ scale = 2; // We will shift right to kill this -+ dc_scale = 1; -+ -+ may_hide_sign = 0; -+ } -+ -+ -+ -+ -+ if (lc->cu.pred_mode == MODE_INTER && s->ps.sps->explicit_rdpcm_enabled_flag && -+ trans_skip_or_bypass) { -+ explicit_rdpcm_flag = explicit_rdpcm_flag_decode(lc, c_idx_nz); -+ if (explicit_rdpcm_flag) { -+ may_hide_sign = 0; -+ explicit_rdpcm_dir_flag = explicit_rdpcm_dir_flag_decode(lc, c_idx_nz); -+ } -+ } -+ -+ last_significant_coeff_xy_prefix_decode(lc, c_idx_nz, log2_trafo_size, -+ &last_significant_coeff_x, &last_significant_coeff_y); -+ -+ if (last_significant_coeff_x > 3) { -+ int suffix = last_significant_coeff_suffix_decode(lc, last_significant_coeff_x); -+ last_significant_coeff_x = (1 << ((last_significant_coeff_x >> 1) - 1)) * -+ (2 + (last_significant_coeff_x & 1)) + -+ suffix; -+ } -+ -+ if (last_significant_coeff_y > 3) { -+ int suffix = last_significant_coeff_suffix_decode(lc, last_significant_coeff_y); -+ last_significant_coeff_y = (1 << ((last_significant_coeff_y >> 1) - 1)) * -+ (2 + (last_significant_coeff_y & 1)) + -+ suffix; -+ } -+ -+ if (scan_idx == SCAN_VERT) -+ FFSWAP(int, last_significant_coeff_x, last_significant_coeff_y); -+ -+ x_cg_last_sig = last_significant_coeff_x >> 2; -+ y_cg_last_sig = last_significant_coeff_y >> 2; -+ -+ switch (scan_idx) { -+ case SCAN_DIAG: { -+ int last_x_c = last_significant_coeff_x & 3; -+ int last_y_c = last_significant_coeff_y & 3; -+ -+ num_coeff = diag_scan4x4_inv[last_y_c][last_x_c]; -+ -+ switch (log2_trafo_size) { -+ case 2: -+ scan_x_cg = scan_1x1; -+ scan_y_cg = scan_1x1; -+ break; -+ case 3: -+ num_coeff += diag_scan2x2_inv[y_cg_last_sig][x_cg_last_sig] << 4; -+ scan_x_cg = diag_scan2x2_x; -+ scan_y_cg = diag_scan2x2_y; -+ break; -+ case 4: -+ num_coeff += diag_scan4x4_inv[y_cg_last_sig][x_cg_last_sig] << 4; -+ scan_x_cg = ff_hevc_rpi_diag_scan4x4_x; -+ scan_y_cg = ff_hevc_rpi_diag_scan4x4_y; -+ break; -+ case 5: -+ default: -+ num_coeff += diag_scan8x8_inv[y_cg_last_sig][x_cg_last_sig] << 4; -+ scan_x_cg = ff_hevc_rpi_diag_scan8x8_x; -+ scan_y_cg = ff_hevc_rpi_diag_scan8x8_y; -+ break; -+ } -+ break; -+ } -+ case SCAN_HORIZ: -+ scan_x_cg = horiz_scan2x2_x; -+ scan_y_cg = horiz_scan2x2_y; -+ num_coeff = horiz_scan8x8_inv[last_significant_coeff_y][last_significant_coeff_x]; -+ break; -+ default: //SCAN_VERT -+ scan_x_cg = horiz_scan2x2_y; -+ scan_y_cg = horiz_scan2x2_x; -+ num_coeff = horiz_scan8x8_inv[last_significant_coeff_x][last_significant_coeff_y]; -+ break; -+ } -+ num_coeff++; -+ num_last_subset = (num_coeff - 1) >> 4; -+ -+ significant_coeff_group_flag[y_cg_last_sig] = 1 << x_cg_last_sig; // 1st subset always significant -+ -+ { -+ const unsigned int ccount = 1 << (log2_trafo_size * 2); -+ const int special = trans_skip_or_bypass /* || lc->tu.cross_pf */; // These need special processing -+ use_vpu = 0; -+ use_dc = (num_coeff == 1) && !special && -+ !(lc->cu.pred_mode == MODE_INTRA && c_idx == 0 && log2_trafo_size == 2); -+ -+ if (use_dc) { -+ // Just need a little empty space -+ coeffs = dummy_coeffs; -+ // No need to clear -+ } -+ else -+ { -+ use_vpu = !special && log2_trafo_size >= 4; -+#if RPI_COMPRESS_COEFFS -+ use_compress = use_vpu && lc->jb0->coeffs.s[log2_trafo_size - 2].packed; -+#endif -+ coeffs = rpi_alloc_coeff_buf(lc->jb0, !use_vpu ? 0 : log2_trafo_size - 2, ccount); -+#if RPI_COMPRESS_COEFFS -+ coeffs32 = (int*)coeffs; -+ if (!use_compress) -+#endif -+#if HAVE_NEON -+ rpi_zap_coeff_vals_neon(coeffs, log2_trafo_size - 2); -+#else -+ memset(coeffs, 0, ccount * sizeof(int16_t)); -+#endif -+ } -+ } -+ -+ i = num_last_subset; -+ do { -+ int implicit_non_zero_coeff = 0; -+ int n_end; -+ -+ uint8_t significant_coeff_flag_idx[16]; -+ unsigned int nb_significant_coeff_flag = 0; -+ -+ if (i == num_last_subset) { -+ // First time through -+ int last_scan_pos = num_coeff - (i << 4) - 1; -+ n_end = last_scan_pos - 1; -+ significant_coeff_flag_idx[0] = last_scan_pos; -+ nb_significant_coeff_flag = 1; -+ } else { -+ n_end = 15; -+ implicit_non_zero_coeff = (i != 0); -+ } -+ -+ if (n_end >= 0) { -+ static const uint8_t ctx_idx_maps_ts2[3][16] = { -+ D4x4(0, 1, 4, 5, 2, 3, 4, 5, 6, 6, 8, 8, 7, 7, 8, 8), // log2_trafo_size == 2 -+ H4x4(0, 1, 4, 5, 2, 3, 4, 5, 6, 6, 8, 8, 7, 7, 8, 8), // log2_trafo_size == 2 -+ V4x4(0, 1, 4, 5, 2, 3, 4, 5, 6, 6, 8, 8, 7, 7, 8, 8) // log2_trafo_size == 2 -+ }; -+ // N.B. prev_sig = Right * 2 + Down -+ static const uint8_t ctx_idx_maps[3][4][16] = { -+ { -+ D4x4(1, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0), // prev_sig == 0 -+ D4x4(2, 1, 0, 0, 2, 1, 0, 0, 2, 1, 0, 0, 2, 1, 0, 0), // prev_sig == 1 -+ D4x4(2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0), // prev_sig == 2 -+ D4x4(2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2) // prev_sig == 3, default -+ }, -+ { -+ H4x4(1, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0), // prev_sig == 0 -+ H4x4(2, 1, 0, 0, 2, 1, 0, 0, 2, 1, 0, 0, 2, 1, 0, 0), // prev_sig == 1 -+ H4x4(2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0), // prev_sig == 2 -+ H4x4(2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2) // prev_sig == 3, default -+ }, -+ { -+ V4x4(1, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0), // prev_sig == 0 -+ V4x4(2, 1, 0, 0, 2, 1, 0, 0, 2, 1, 0, 0, 2, 1, 0, 0), // prev_sig == 1 -+ V4x4(2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0), // prev_sig == 2 -+ V4x4(2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2) // prev_sig == 3, default -+ } -+ }; -+ const uint8_t *ctx_idx_map_p; -+ int scf_offset = 0; -+ -+ if (s->ps.sps->transform_skip_context_enabled_flag && trans_skip_or_bypass) { -+ ctx_idx_map_p = ctx_idx_maps[0][3]; -+ scf_offset = 40 + c_idx_nz; -+ } else { -+ if (c_idx_nz != 0) -+ scf_offset = 27; -+ -+ if (log2_trafo_size == 2) { -+ ctx_idx_map_p = ctx_idx_maps_ts2[scan_idx]; -+ } else { -+ ctx_idx_map_p = ctx_idx_maps[scan_idx][prev_sig]; -+ if (!c_idx_nz) { -+ if (i != 0) -+ scf_offset += 3; -+ -+ if (log2_trafo_size == 3) { -+ scf_offset += (scan_idx == SCAN_DIAG) ? 9 : 15; -+ } else { -+ scf_offset += 21; -+ } -+ } else { -+ if (log2_trafo_size == 3) -+ scf_offset += 9; -+ else -+ scf_offset += 12; -+ } -+ } -+ } -+ -+ if (n_end > 0) { -+ int cnt = get_sig_coeff_flag_idxs(&lc->cc, -+ lc->cabac_state + elem_offset[SIGNIFICANT_COEFF_FLAG] + scf_offset, -+ n_end, ctx_idx_map_p, -+ significant_coeff_flag_idx + nb_significant_coeff_flag); -+ -+ nb_significant_coeff_flag += cnt; -+ if (cnt != 0) { -+ implicit_non_zero_coeff = 0; -+ } -+ } -+ -+ if (implicit_non_zero_coeff == 0) { -+ if (s->ps.sps->transform_skip_context_enabled_flag && trans_skip_or_bypass) { -+ scf_offset = 42 + c_idx_nz; -+ } else { -+ if (i == 0) { -+ scf_offset = c_idx_nz ? 27 : 0; -+ } else { -+ scf_offset = 2 + scf_offset; -+ } -+ } -+ if (significant_coeff_flag_decode_0(lc, scf_offset) == 1) { -+ significant_coeff_flag_idx[nb_significant_coeff_flag] = 0; -+ nb_significant_coeff_flag++; -+ } -+ } else { -+ significant_coeff_flag_idx[nb_significant_coeff_flag] = 0; -+ nb_significant_coeff_flag++; -+ } -+ } -+#if RPI_COMPRESS_COEFFS -+ if (use_compress && (nb_significant_coeff_flag + num_nonzero + 1 >= (1<<(2*log2_trafo_size-1)))) { // Overflow when half-full! -+ int16_t temp[32*32]; -+ const unsigned int ccount = 1 << (log2_trafo_size * 2); -+ lc->jb0->coeffs.s[log2_trafo_size - 2].packed = 0; -+ lc->jb0->coeffs.s[log2_trafo_size - 2].packed_n = lc->jb0->coeffs.s[log2_trafo_size - 2].n - ccount; // Don't want to unpack the last buffer -+ memcpy(temp, coeffs, sizeof(int)*num_nonzero); -+ coeffs32 = (int *)temp; -+ memset(coeffs, 0, ccount * sizeof(int16_t)); -+ num_nonzero--; -+ while (num_nonzero >= 0) { -+ const unsigned int res = coeffs32[num_nonzero]; -+ const unsigned int offset = res & 0xffff; -+ coeffs[ offset ] = res >> 16; -+ num_nonzero--; -+ } -+ use_compress = 0; -+ } -+#endif -+ -+ if (nb_significant_coeff_flag != 0) { -+ const unsigned int gt1_idx_delta = (c_idx_nz << 2) | -+ ((i != 0 && !c_idx_nz) ? 2 : 0) | -+ prev_subset_coded; -+ const unsigned int idx0_gt1 = elem_offset[COEFF_ABS_LEVEL_GREATER1_FLAG] + -+ (gt1_idx_delta << 2); -+ const unsigned int idx_gt2 = elem_offset[COEFF_ABS_LEVEL_GREATER2_FLAG] + -+ gt1_idx_delta; -+ -+ const unsigned int x_cg = scan_x_cg[i]; -+ const unsigned int y_cg = scan_y_cg[i]; -+ int16_t * const blk_coeffs = coeffs + -+ ((x_cg + (y_cg << log2_trafo_size)) << 2); -+ // This calculation is 'wrong' for log2_traffo_size == 2 -+ // but that doesn't matter as in this case x_cg & y_cg -+ // are always 0 so result is correct (0) anyway -+ const uint8_t * const blk_scale = scale_matrix + -+ (((x_cg + (y_cg << 3)) << (5 - log2_trafo_size))); -+ -+ // * The following code block doesn't deal with these flags: -+ // (nor did the one it replaces) -+ // -+ // cabac_bypass_alignment_enabled_flag -+ // This should be easy but I can't find a test case -+ // extended_precision_processing_flag -+ // This can extend the required precision past 16bits -+ // so is probably tricky - also no example found yet -+ -+#if USE_N_END_1 -+ if (nb_significant_coeff_flag == 1) { -+ // There is a small gain to be had from special casing the single -+ // transform coefficient case. The reduction in complexity -+ // makes up for the code duplicatioon. -+ -+ int trans_coeff_level = 1; -+ int coeff_sign_flag; -+ int coded_val = 0; -+ -+ // initialize first elem of coeff_bas_level_greater1_flag -+ prev_subset_coded = 0; -+ -+ if (get_cabac(&lc->cc, lc->cabac_state + idx0_gt1 + 1)) { -+ trans_coeff_level = 2; -+ prev_subset_coded = 1; -+ coded_val = get_cabac(&lc->cc, lc->cabac_state + idx_gt2); -+ } -+ -+ // Probably not worth the overhead of starting by22 for just one value -+ coeff_sign_flag = get_cabac_bypass(&lc->cc); -+ -+ if (coded_val) -+ { -+ if (!s->ps.sps->persistent_rice_adaptation_enabled_flag) { -+ trans_coeff_level = 3 + coeff_abs_level_remaining_decode(&lc->cc, 0); -+ } else { -+ uint8_t * const stat_coeff = -+ lc->stat_coeff + trans_skip_or_bypass + 2 - ((c_idx_nz) << 1); -+ const unsigned int c_rice_param = *stat_coeff >> 2; -+ const int last_coeff_abs_level_remaining = coeff_abs_level_remaining_decode(&lc->cc, c_rice_param); -+ -+ trans_coeff_level = 3 + last_coeff_abs_level_remaining; -+ update_rice(stat_coeff, last_coeff_abs_level_remaining, c_rice_param); -+ } -+ } -+ -+ { -+ const xy_off_t * const xy_off = scan_xy_off + significant_coeff_flag_idx[0]; -+ const int k = (int32_t)(coeff_sign_flag << 31) >> 31; -+ const unsigned int scale_m = blk_scale[xy_off->scale]; -+ const int res = trans_scale_sat( -+ (trans_coeff_level ^ k) - k, // Apply sign -+ scale, -+ i == 0 && xy_off->coeff == 0 ? dc_scale : scale_m, -+ shift); -+#if RPI_COMPRESS_COEFFS -+ if (use_compress) -+ coeffs32[num_nonzero++] = (res<<16) + (&blk_coeffs[xy_off->coeff] - coeffs); -+ else -+#endif -+ blk_coeffs[xy_off->coeff] = res; -+ } -+ } -+ else -+#endif -+ { -+ int sign_hidden = may_hide_sign; -+ int levels[16]; // Should be able to get away with int16_t but that fails some tests -+ uint32_t coeff_sign_flags; -+ uint32_t coded_vals = 0; -+ // Sum(abs(level[])) -+ // In fact we only need the bottom bit and in some future -+ // version that may be all we calculate -+ unsigned int sum_abs; -+ -+ coded_vals = get_greaterx_bits(lc, nb_significant_coeff_flag, levels, -+ &prev_subset_coded, &sum_abs, idx0_gt1, idx_gt2); -+ -+ if (significant_coeff_flag_idx[0] - significant_coeff_flag_idx[nb_significant_coeff_flag - 1] <= 3) -+ sign_hidden = 0; -+ -+ // -- Start bypass block -+ -+ bypass_start(&lc->cc); -+ -+ coeff_sign_flags = coeff_sign_flag_decode_bypass(&lc->cc, nb_significant_coeff_flag - sign_hidden); -+ -+ if (coded_vals != 0) -+ { -+ const int rice_adaptation_enabled = s->ps.sps->persistent_rice_adaptation_enabled_flag; -+ uint8_t * stat_coeff = !rice_adaptation_enabled ? NULL : -+ lc->stat_coeff + trans_skip_or_bypass + 2 - ((c_idx_nz) << 1); -+ int c_rice_param = !rice_adaptation_enabled ? 0 : *stat_coeff >> 2; -+ int * level = levels - 1; -+ -+ do { -+ { -+ const unsigned int z = hevc_clz32(coded_vals) + 1; -+ level += z; -+ coded_vals <<= z; -+ } -+ -+ { -+ const int last_coeff_abs_level_remaining = coeff_abs_level_remaining_decode_bypass(&lc->cc, c_rice_param); -+ const int trans_coeff_level = *level + last_coeff_abs_level_remaining + 1; -+ -+ sum_abs += last_coeff_abs_level_remaining + 1; -+ *level = trans_coeff_level; -+ -+ if (stat_coeff != NULL) -+ update_rice(stat_coeff, last_coeff_abs_level_remaining, c_rice_param); -+ stat_coeff = NULL; -+ -+ if (trans_coeff_level > (3 << c_rice_param) && -+ (c_rice_param < 4 || rice_adaptation_enabled)) -+ ++c_rice_param; -+ } -+ } while (coded_vals != 0); -+ } -+ -+ // sign_hidden = 0 or 1 so we can combine the tests -+ if ((sign_hidden & sum_abs) != 0) { -+ levels[nb_significant_coeff_flag - 1] = -levels[nb_significant_coeff_flag - 1]; -+ } -+ -+ bypass_finish(&lc->cc); -+ -+ // -- Finish bypass block -+ -+ // Scale loop -+ { -+ int m = nb_significant_coeff_flag - 1; -+ -+ // Deal with DC component (if any) first -+ if (i == 0 && significant_coeff_flag_idx[m] == 0) -+ { -+ const int k = (int32_t)(coeff_sign_flags << m) >> 31; -+ const int res = trans_scale_sat( -+ (levels[m] ^ k) - k, scale, dc_scale, shift); -+#if RPI_COMPRESS_COEFFS -+ if (use_compress) -+ { -+ coeffs32[num_nonzero++] = (res<<16) + (blk_coeffs - coeffs); -+ } -+ else -+#endif -+ { -+ blk_coeffs[0] = res; -+ } -+ --m; -+ } -+ -+#if !USE_N_END_1 -+ // If N_END_1 set then m was at least 1 initially -+ if (m >= 0) -+#endif -+ { -+ do { -+ const xy_off_t * const xy_off = scan_xy_off + -+ significant_coeff_flag_idx[m]; -+ const int k = (int32_t)(coeff_sign_flags << m) >> 31; -+ const int res = trans_scale_sat( -+ (levels[m] ^ k) - k, -+ scale, -+ blk_scale[xy_off->scale], -+ shift); -+#if RPI_COMPRESS_COEFFS -+ if (use_compress) { -+ coeffs32[num_nonzero++] = (res<<16) + (&blk_coeffs[xy_off->coeff] - coeffs); -+ } else -+#endif -+ blk_coeffs[xy_off->coeff] = res; -+ } while (--m >= 0); -+ } -+ } -+ -+ } -+ } -+ } while ((i = next_subset(lc, i, c_idx_nz, -+ significant_coeff_group_flag, scan_x_cg, scan_y_cg, &prev_sig)) >= 0 && -+ !cabac_overflow(&lc->cc)); -+ -+ if (lc->cu.cu_transquant_bypass_flag) { -+ if (explicit_rdpcm_flag || (s->ps.sps->implicit_rdpcm_enabled_flag && -+ (pred_mode_intra == 10 || pred_mode_intra == 26))) { -+ int mode = s->ps.sps->implicit_rdpcm_enabled_flag ? (pred_mode_intra == 26) : explicit_rdpcm_dir_flag; -+ -+ s->hevcdsp.transform_rdpcm(coeffs, log2_trafo_size, mode); -+ } -+ } else { -+ if (trans_skip_or_bypass) { // Must be trans_skip as we've already dealt with bypass -+ int rot = s->ps.sps->transform_skip_rotation_enabled_flag && -+ log2_trafo_size == 2 && -+ lc->cu.pred_mode == MODE_INTRA; -+ if (rot) { -+ for (i = 0; i < 8; i++) -+ FFSWAP(int16_t, coeffs[i], coeffs[16 - i - 1]); -+ } -+ -+ s->hevcdsp.dequant(coeffs, log2_trafo_size); -+ -+ if (explicit_rdpcm_flag || (s->ps.sps->implicit_rdpcm_enabled_flag && -+ lc->cu.pred_mode == MODE_INTRA && -+ (pred_mode_intra == 10 || pred_mode_intra == 26))) { -+ int mode = explicit_rdpcm_flag ? explicit_rdpcm_dir_flag : (pred_mode_intra == 26); -+ -+ s->hevcdsp.transform_rdpcm(coeffs, log2_trafo_size, mode); -+ } -+ } else if (lc->cu.pred_mode == MODE_INTRA && c_idx == 0 && log2_trafo_size == 2) { -+ s->hevcdsp.transform_4x4_luma(coeffs); -+ } -+ else if (!use_vpu) -+ { -+ int max_xy = FFMAX(last_significant_coeff_x, last_significant_coeff_y); -+ if (max_xy == 0) -+ { -+ if (use_dc) -+ rpi_add_dc(s, lc->jb0, log2_trafo_size, c_idx, x0, y0, coeffs); -+ else -+ s->hevcdsp.idct_dc[log2_trafo_size - 2](coeffs); -+ } -+ else { -+ int col_limit = last_significant_coeff_x + last_significant_coeff_y + 4; -+ if (max_xy < 4) -+ col_limit = FFMIN(4, col_limit); -+ else if (max_xy < 8) -+ col_limit = FFMIN(8, col_limit); -+ else if (max_xy < 12) -+ col_limit = FFMIN(24, col_limit); -+ s->hevcdsp.idct[log2_trafo_size - 2](coeffs, col_limit); -+ } -+ } -+ } -+ -+#if 0 -+ // Mildly rotted - we support no mode where cross is valid -+ if (lc->tu.cross_pf) { -+ int16_t * const coeffs_y = (int16_t*)lc->edge_emu_buffer; -+ const int ccount = 1 << (log2_trafo_size * 2); -+ -+ for (i = 0; i < ccount; i++) { -+ coeffs[i] = coeffs[i] + ((lc->tu.res_scale_val * coeffs_y[i]) >> 3); -+ } -+ } -+#endif -+ -+ if (!use_dc) { -+#if RPI_COMPRESS_COEFFS -+ if (use_compress) { -+ coeffs32[num_nonzero] = 0; -+ } -+#endif -+ rpi_add_residual(s, lc->jb0, log2_trafo_size, c_idx, x0, y0, coeffs); -+ } -+} -+ -+#if !USE_BY22 -+// Stores results to lc -+MvXY ff_hevc_rpi_hls_mvd_coding(HEVCRpiLocalContext * const lc) -+{ -+ int x = abs_mvd_greater0_flag_decode(lc); -+ int y = abs_mvd_greater0_flag_decode(lc); -+ -+ if (x) -+ x += abs_mvd_greater1_flag_decode(lc); -+ if (y) -+ y += abs_mvd_greater1_flag_decode(lc); -+ -+ switch (x) { -+ case 2: x = mvd_decode(lc); break; -+ case 1: x = mvd_sign_flag_decode(lc); break; -+ case 0: x = 0; break; -+ } -+ -+ switch (y) { -+ case 2: y = mvd_decode(lc); break; -+ case 1: y = mvd_sign_flag_decode(lc); break; -+ case 0: y = 0; break; -+ } -+ return MV_XY(x,y); -+} -+#else -+MvXY ff_hevc_rpi_hls_mvd_coding(HEVCRpiLocalContext * const lc) -+{ -+ int x = abs_mvd_greater0_flag_decode(lc); -+ int y = abs_mvd_greater0_flag_decode(lc); -+ -+ if ((x | y) == 0) -+ return 0; -+ -+ if (x != 0) -+ x += abs_mvd_greater1_flag_decode(lc); -+ if (y != 0) -+ y += abs_mvd_greater1_flag_decode(lc); -+ -+ if ((x | y) == 1) -+ { -+ // Not worth starting BY22 -+ if (x != 0) -+ x = mvd_sign_flag_decode(lc); -+ if (y != 0) -+ y = mvd_sign_flag_decode(lc); -+ } -+ else -+ { -+ CABACContext * const cc = &lc->cc; -+ uint32_t val; -+ uint32_t b; -+ unsigned int n = 0; -+ -+ bypass_start(cc); -+ b = val = get_cabac_by22_peek(cc); -+ -+ if (x == 1) { -+ x = ((int32_t)b >> 31) | 1; -+ n = 1; -+ b <<= 1; -+ } -+ else if (x == 2) { -+ // EG1 so we have (leading one bits + 1) of suffix -+ // This makes prefix & suffix lengths the same -+ const unsigned int k = hevc_clz32(~b) + 1; -+ int s; -+ -+ av_assert2(k <= 15); -+ -+ b <<= k; -+ n = 2 * k + 1; // Includes suffix & sign -+ -+ // We need to have k*2 + 2 (prefix, suffix, sign, y-sign) bits peeked -+ // if we are going to do this without a flush -+ if (k > CABAC_BY22_PEEK_BITS / 2 - 1) -+ { -+ // Need too many bits - flush -+ // n = k -+ get_cabac_by22_flush(cc, k, val); -+ b = val = get_cabac_by22_peek(cc); -+ n = k + 1; -+ } -+ -+ x = (b >> (32 - k)) + (1 << k); -+ b <<= k; -+ s = (int32_t)b >> 31; -+ x = (x ^ s) - s; -+ b <<= 1; -+ -+ // Max abs value of an mv is 2^15 - 1 (i.e. a prefix len of 15 bits) -+ if (y > 1 && n > CABAC_BY22_PEEK_BITS - 15) -+ { -+ get_cabac_by22_flush(cc, n, val); -+ b = val = get_cabac_by22_peek(cc); -+ n = 0; -+ } -+ } -+ -+ if (y == 1) { -+ y = ((int32_t)b >> 31) | 1; -+ ++n; -+ // don't care about b anymore -+ } -+ else if (y == 2) { -+ const unsigned int k = hevc_clz32(~b) + 1; -+ int s; -+ -+ av_assert2(k <= 15); -+ -+ // We need to have k*2 + 1 (prefix, suffix, sign) bits peeked -+ // if we are going to do this without a flush -+ b <<= k; -+ n += 2 * k + 1; -+ -+ if (n > CABAC_BY22_PEEK_BITS) -+ { -+ // Need too many bits - flush -+ get_cabac_by22_flush(cc, n - (k + 1), val); -+ b = val = get_cabac_by22_peek(cc); -+ n = k + 1; -+ } -+ -+ y = (b >> (32 - k)) + (1 << k); -+ s = (int32_t)(b << k) >> 31; -+ y = (y ^ s) - s; -+ // don't care about b anymore -+ } -+ -+ get_cabac_by22_flush(cc, n, val); -+ bypass_finish(cc); -+ } -+ -+ return MV_XY(x, y); -+} -+#endif ---- /dev/null -+++ b/libavcodec/rpi_hevc_cabac_fns.h -@@ -0,0 +1,217 @@ -+/* -+ * HEVC CABAC decoding -+ * -+ * Copyright (C) 2012 - 2013 Guillaume Martres -+ * Copyright (C) 2012 - 2013 Gildas Cocherel -+ * Copyright (C) 2012 - 2013 Gildas Cocherel -+ * Copyright (C) 2018 John Cox -+ * -+ * This file is part of FFmpeg. -+ * -+ * FFmpeg is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * FFmpeg is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with FFmpeg; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+ */ -+ -+ -+#ifndef AVCODEC_RPI_HEVC_CABAC_FNS_H -+#define AVCODEC_RPI_HEVC_CABAC_FNS_H -+ -+#include "config.h" -+#include "rpi_hevcdec.h" -+ -+void ff_hevc_rpi_save_states(HEVCRpiContext *s, const HEVCRpiLocalContext * const lc); -+int ff_hevc_rpi_cabac_init_decoder(HEVCRpiLocalContext * const lc); -+void ff_hevc_rpi_cabac_init(const HEVCRpiContext * const s, HEVCRpiLocalContext *const lc, const unsigned int ctb_flags); -+int ff_hevc_rpi_sao_type_idx_decode(HEVCRpiLocalContext * const lc); -+int ff_hevc_rpi_sao_band_position_decode(HEVCRpiLocalContext * const lc); -+int ff_hevc_rpi_sao_offset_abs_decode(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc); -+int ff_hevc_rpi_sao_offset_sign_decode(HEVCRpiLocalContext * const lc); -+int ff_hevc_rpi_sao_eo_class_decode(HEVCRpiLocalContext * const lc); -+int ff_hevc_rpi_part_mode_decode(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc, const int log2_cb_size); -+int ff_hevc_rpi_mpm_idx_decode(HEVCRpiLocalContext * const lc); -+int ff_hevc_rpi_rem_intra_luma_pred_mode_decode(HEVCRpiLocalContext * const lc); -+int ff_hevc_rpi_intra_chroma_pred_mode_decode(HEVCRpiLocalContext * const lc); -+int ff_hevc_rpi_merge_idx_decode(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc); -+int ff_hevc_rpi_inter_pred_idc_decode(HEVCRpiLocalContext * const lc, int nPbW, int nPbH); -+int ff_hevc_rpi_ref_idx_lx_decode(HEVCRpiLocalContext * const lc, const int num_ref_idx_lx); -+int ff_hevc_rpi_log2_res_scale_abs(HEVCRpiLocalContext * const lc, const int idx); -+ -+//int ff_hevc_rpi_cu_qp_delta_sign_flag(HEVCRpiLocalContext * const lc); -+int ff_hevc_rpi_cu_qp_delta(HEVCRpiLocalContext * const lc); -+int ff_hevc_rpi_cu_chroma_qp_offset_idx(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc); -+void ff_hevc_rpi_hls_residual_coding(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc, -+ const int x0, const int y0, -+ const int log2_trafo_size, const enum ScanType scan_idx, -+ const int c_idx); -+ -+MvXY ff_hevc_rpi_hls_mvd_coding(HEVCRpiLocalContext * const lc); -+int ff_hevc_rpi_cabac_overflow(const HEVCRpiLocalContext * const lc); -+ -+#define HEVC_BIN_SAO_MERGE_FLAG 0 -+#define HEVC_BIN_SAO_TYPE_IDX 1 -+#define HEVC_BIN_SAO_EO_CLASS 2 -+#define HEVC_BIN_SAO_BAND_POSITION 2 -+#define HEVC_BIN_SAO_OFFSET_ABS 2 -+#define HEVC_BIN_SAO_OFFSET_SIGN 2 -+#define HEVC_BIN_END_OF_SLICE_FLAG 2 -+#define HEVC_BIN_SPLIT_CODING_UNIT_FLAG 2 -+#define HEVC_BIN_CU_TRANSQUANT_BYPASS_FLAG 5 -+#define HEVC_BIN_SKIP_FLAG 6 -+#define HEVC_BIN_CU_QP_DELTA 9 -+#define HEVC_BIN_PRED_MODE 12 -+#define HEVC_BIN_PART_MODE 13 -+#define HEVC_BIN_PCM_FLAG 17 -+#define HEVC_BIN_PREV_INTRA_LUMA_PRED_MODE 17 -+#define HEVC_BIN_MPM_IDX 18 -+#define HEVC_BIN_REM_INTRA_LUMA_PRED_MODE 18 -+#define HEVC_BIN_INTRA_CHROMA_PRED_MODE 18 -+#define HEVC_BIN_MERGE_FLAG 20 -+#define HEVC_BIN_MERGE_IDX 21 -+#define HEVC_BIN_INTER_PRED_IDC 22 -+#define HEVC_BIN_REF_IDX_L0 27 -+#define HEVC_BIN_REF_IDX_L1 29 -+#define HEVC_BIN_ABS_MVD_GREATER0_FLAG 31 -+#define HEVC_BIN_ABS_MVD_GREATER1_FLAG 33 -+#define HEVC_BIN_ABS_MVD_MINUS2 35 -+#define HEVC_BIN_MVD_SIGN_FLAG 35 -+#define HEVC_BIN_MVP_LX_FLAG 35 -+#define HEVC_BIN_NO_RESIDUAL_DATA_FLAG 36 -+#define HEVC_BIN_SPLIT_TRANSFORM_FLAG 37 -+#define HEVC_BIN_CBF_LUMA 40 -+#define HEVC_BIN_CBF_CB_CR 42 -+#define HEVC_BIN_TRANSFORM_SKIP_FLAG 46 -+#define HEVC_BIN_EXPLICIT_RDPCM_FLAG 48 -+#define HEVC_BIN_EXPLICIT_RDPCM_DIR_FLAG 50 -+#define HEVC_BIN_LAST_SIGNIFICANT_COEFF_X_PREFIX 52 -+#define HEVC_BIN_LAST_SIGNIFICANT_COEFF_Y_PREFIX 70 -+#define HEVC_BIN_LAST_SIGNIFICANT_COEFF_X_SUFFIX 88 -+#define HEVC_BIN_LAST_SIGNIFICANT_COEFF_Y_SUFFIX 88 -+#define HEVC_BIN_SIGNIFICANT_COEFF_GROUP_FLAG 88 -+#define HEVC_BIN_SIGNIFICANT_COEFF_FLAG 92 -+#define HEVC_BIN_COEFF_ABS_LEVEL_GREATER1_FLAG 136 -+#define HEVC_BIN_COEFF_ABS_LEVEL_GREATER2_FLAG 160 -+#define HEVC_BIN_COEFF_ABS_LEVEL_REMAINING 166 -+#define HEVC_BIN_COEFF_SIGN_FLAG 166 -+#define HEVC_BIN_LOG2_RES_SCALE_ABS 166 -+#define HEVC_BIN_RES_SCALE_SIGN_FLAG 174 -+#define HEVC_BIN_CU_CHROMA_QP_OFFSET_FLAG 176 -+#define HEVC_BIN_CU_CHROMA_QP_OFFSET_IDX 177 -+ -+ -+int ff_hevc_rpi_get_cabac(CABACContext * const c, uint8_t * const state); -+int ff_hevc_rpi_get_cabac_terminate(CABACContext * const c); -+ -+static inline const uint8_t* ff_hevc_rpi_cabac_skip_bytes(CABACContext * const c, int n) { -+ const uint8_t *ptr = c->bytestream; -+ -+ if (c->low & 0x1) -+ ptr--; -+#if CABAC_BITS == 16 -+ if (c->low & 0x1FF) -+ ptr--; -+#endif -+ if ((int) (c->bytestream_end - ptr) < n) -+ return NULL; -+ if (ff_init_cabac_decoder(c, ptr + n, c->bytestream_end - ptr - n) < 0) -+ return NULL; -+ -+ return ptr; -+} -+ -+static inline int ff_hevc_rpi_sao_merge_flag_decode(HEVCRpiLocalContext * const lc) -+{ -+ return ff_hevc_rpi_get_cabac(&lc->cc, lc->cabac_state + HEVC_BIN_SAO_MERGE_FLAG); -+} -+ -+static inline int ff_hevc_rpi_cu_transquant_bypass_flag_decode(HEVCRpiLocalContext * const lc) -+{ -+ return ff_hevc_rpi_get_cabac(&lc->cc, lc->cabac_state + HEVC_BIN_CU_TRANSQUANT_BYPASS_FLAG); -+} -+ -+static inline int ff_hevc_rpi_cu_chroma_qp_offset_flag(HEVCRpiLocalContext * const lc) -+{ -+ return ff_hevc_rpi_get_cabac(&lc->cc, lc->cabac_state + HEVC_BIN_CU_CHROMA_QP_OFFSET_FLAG); -+} -+ -+static inline int ff_hevc_rpi_split_coding_unit_flag_decode(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc, -+ const unsigned int ct_depth, -+ const unsigned int x0, const unsigned int y0) -+{ -+ return ff_hevc_rpi_get_cabac(&lc->cc, lc->cabac_state + HEVC_BIN_SPLIT_CODING_UNIT_FLAG + -+ ((s->cabac_stash_left[y0 >> 3] >> 1) > ct_depth) + -+ ((s->cabac_stash_up[x0 >> 3] >> 1) > ct_depth)); -+} -+ -+static inline int ff_hevc_rpi_skip_flag_decode(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc, -+ const int x0, const int y0, const int x_cb, const int y_cb) -+{ -+ return ff_hevc_rpi_get_cabac(&lc->cc, lc->cabac_state + HEVC_BIN_SKIP_FLAG + -+ (s->cabac_stash_left[y0 >> 3] & 1) + -+ (s->cabac_stash_up[x0 >> 3] & 1)); -+} -+ -+static inline int ff_hevc_rpi_pred_mode_decode(HEVCRpiLocalContext * const lc) -+{ -+ return ff_hevc_rpi_get_cabac(&lc->cc, lc->cabac_state + HEVC_BIN_PRED_MODE); -+} -+ -+static inline int ff_hevc_rpi_pcm_flag_decode(HEVCRpiLocalContext * const lc) -+{ -+ return ff_hevc_rpi_get_cabac_terminate(&lc->cc); -+} -+ -+static inline int ff_hevc_rpi_prev_intra_luma_pred_flag_decode(HEVCRpiLocalContext * const lc) -+{ -+ return ff_hevc_rpi_get_cabac(&lc->cc, lc->cabac_state + HEVC_BIN_PREV_INTRA_LUMA_PRED_MODE); -+} -+ -+static inline int ff_hevc_rpi_merge_flag_decode(HEVCRpiLocalContext * const lc) -+{ -+ return ff_hevc_rpi_get_cabac(&lc->cc, lc->cabac_state + HEVC_BIN_MERGE_FLAG); -+} -+ -+static inline int ff_hevc_rpi_mvp_lx_flag_decode(HEVCRpiLocalContext * const lc) -+{ -+ return ff_hevc_rpi_get_cabac(&lc->cc, lc->cabac_state + HEVC_BIN_MVP_LX_FLAG); -+} -+ -+static inline int ff_hevc_rpi_no_residual_syntax_flag_decode(HEVCRpiLocalContext * const lc) -+{ -+ return ff_hevc_rpi_get_cabac(&lc->cc, lc->cabac_state + HEVC_BIN_NO_RESIDUAL_DATA_FLAG); -+} -+ -+static inline int ff_hevc_rpi_cbf_cb_cr_decode(HEVCRpiLocalContext * const lc, const int trafo_depth) -+{ -+ return ff_hevc_rpi_get_cabac(&lc->cc, lc->cabac_state + HEVC_BIN_CBF_CB_CR + trafo_depth); -+} -+ -+static inline int ff_hevc_rpi_cbf_luma_decode(HEVCRpiLocalContext * const lc, const int trafo_depth) -+{ -+ return ff_hevc_rpi_get_cabac(&lc->cc, lc->cabac_state + HEVC_BIN_CBF_LUMA + !trafo_depth); -+} -+ -+static inline int ff_hevc_rpi_split_transform_flag_decode(HEVCRpiLocalContext * const lc, const int log2_trafo_size) -+{ -+ return ff_hevc_rpi_get_cabac(&lc->cc, lc->cabac_state + HEVC_BIN_SPLIT_TRANSFORM_FLAG + 5 - log2_trafo_size); -+} -+ -+static inline int ff_hevc_rpi_res_scale_sign_flag(HEVCRpiLocalContext *const lc, const int idx) -+{ -+ return ff_hevc_rpi_get_cabac(&lc->cc, lc->cabac_state + HEVC_BIN_RES_SCALE_SIGN_FLAG + idx); -+} -+ -+ -+ -+#endif -+ ---- /dev/null -+++ b/libavcodec/rpi_hevc_data.c -@@ -0,0 +1,75 @@ -+/* -+ * HEVC shared tables -+ * -+ * This file is part of FFmpeg. -+ * -+ * FFmpeg is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * FFmpeg is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with FFmpeg; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+ */ -+ -+#include -+ -+#include "rpi_hevc_data.h" -+ -+const uint8_t ff_hevc_rpi_diag_scan4x4_x[16] = { -+ 0, 0, 1, 0, -+ 1, 2, 0, 1, -+ 2, 3, 1, 2, -+ 3, 2, 3, 3, -+}; -+ -+const uint8_t ff_hevc_rpi_diag_scan4x4_y[16] = { -+ 0, 1, 0, 2, -+ 1, 0, 3, 2, -+ 1, 0, 3, 2, -+ 1, 3, 2, 3, -+}; -+ -+const uint8_t ff_hevc_rpi_diag_scan8x8_x[64] = { -+ 0, 0, 1, 0, -+ 1, 2, 0, 1, -+ 2, 3, 0, 1, -+ 2, 3, 4, 0, -+ 1, 2, 3, 4, -+ 5, 0, 1, 2, -+ 3, 4, 5, 6, -+ 0, 1, 2, 3, -+ 4, 5, 6, 7, -+ 1, 2, 3, 4, -+ 5, 6, 7, 2, -+ 3, 4, 5, 6, -+ 7, 3, 4, 5, -+ 6, 7, 4, 5, -+ 6, 7, 5, 6, -+ 7, 6, 7, 7, -+}; -+ -+const uint8_t ff_hevc_rpi_diag_scan8x8_y[64] = { -+ 0, 1, 0, 2, -+ 1, 0, 3, 2, -+ 1, 0, 4, 3, -+ 2, 1, 0, 5, -+ 4, 3, 2, 1, -+ 0, 6, 5, 4, -+ 3, 2, 1, 0, -+ 7, 6, 5, 4, -+ 3, 2, 1, 0, -+ 7, 6, 5, 4, -+ 3, 2, 1, 7, -+ 6, 5, 4, 3, -+ 2, 7, 6, 5, -+ 4, 3, 7, 6, -+ 5, 4, 7, 6, -+ 5, 7, 6, 7, -+}; ---- /dev/null -+++ b/libavcodec/rpi_hevc_data.h -@@ -0,0 +1,31 @@ -+/* -+ * HEVC shared data tables -+ * -+ * This file is part of FFmpeg. -+ * -+ * FFmpeg is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * FFmpeg is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with FFmpeg; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+ */ -+ -+#ifndef AVCODEC_RPI_HEVC_DATA_H -+#define AVCODEC_RPI_HEVC_DATA_H -+ -+#include -+ -+extern const uint8_t ff_hevc_rpi_diag_scan4x4_x[16]; -+extern const uint8_t ff_hevc_rpi_diag_scan4x4_y[16]; -+extern const uint8_t ff_hevc_rpi_diag_scan8x8_x[64]; -+extern const uint8_t ff_hevc_rpi_diag_scan8x8_y[64]; -+ -+#endif /* AVCODEC_RPI_HEVC_DATA_H */ ---- /dev/null -+++ b/libavcodec/rpi_hevc_filter.c -@@ -0,0 +1,1210 @@ -+/* -+ * HEVC video decoder -+ * -+ * Originally by: -+ * Copyright (C) 2012 - 2013 Guillaume Martres -+ * Copyright (C) 2013 Seppo Tomperi -+ * Copyright (C) 2013 Wassim Hamidouche -+ * -+ * Substantially rewritten: -+ * Copyright (C) 2018 John Cox, Ben Avison for Raspberry Pi (Trading) -+ * -+ * This file is part of FFmpeg. -+ * -+ * FFmpeg is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * FFmpeg is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with FFmpeg; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+ */ -+ -+//#define DISABLE_SAO -+//#define DISABLE_DEBLOCK -+//#define DISABLE_STRENGTHS -+// define DISABLE_DEBLOCK_NONREF for a 6% speed boost (by skipping deblocking on unimportant frames) -+//#define DISABLE_DEBLOCK_NONREF -+ -+#include "libavutil/common.h" -+#include "libavutil/internal.h" -+ -+#include "rpi_hevcdec.h" -+ -+#include "bit_depth_template.c" -+ -+#include "rpi_qpu.h" -+#include "rpi_zc.h" -+#include "libavutil/rpi_sand_fns.h" -+ -+#define LUMA 0 -+#define CB 1 -+#define CR 2 -+ -+// tcoffset: -12,12; qp: 0,51; (bs-1)*2: 0,2 -+// so -12,75 overall -+static const uint8_t tctablex[] = { -+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // -ve quant padding -+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -+ -+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // -12..-1 -+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, // QP 0...18 -+ 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, // QP 19...37 -+ 5, 5, 6, 6, 7, 8, 9, 10, 11, 13, 14, 16, 18, 20, 22, 24, // QP 38...53 -+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24 // 54..75 -+}; -+#define tctable (tctablex + 12 + 6*8) -+ -+static const uint8_t betatablex[] = { -+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // -ve quant padding -+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -+ -+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // -12..-1 -+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7, 8, // QP 0...18 -+ 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, // QP 19...37 -+ 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, // QP 38...51 -+ 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64 // 52..73 -+}; -+#define betatable (betatablex + 12 + 6*8) -+ -+static inline int chroma_tc(const HEVCRpiContext * const s, const int qp_y, -+ const int c_idx, const int tc_offset) -+{ -+ return tctable[(int)s->ps.pps->qp_dblk_x[c_idx][qp_y] + tc_offset + 2]; -+} -+ -+static inline int get_qPy_pred(const HEVCRpiContext * const s, const HEVCRpiLocalContext * const lc, -+ const unsigned int xBase, const unsigned int yBase) -+{ -+ const unsigned int ctb_size_mask = (1 << s->ps.sps->log2_ctb_size) - 1; -+ const unsigned int MinCuQpDeltaSizeMask = ~0U << s->ps.pps->log2_min_cu_qp_delta_size; -+ const unsigned int xQgBase = xBase & MinCuQpDeltaSizeMask; -+ const unsigned int yQgBase = yBase & MinCuQpDeltaSizeMask; -+ const unsigned int min_cb_width = s->ps.sps->min_cb_width; -+ const unsigned int x_cb = xQgBase >> s->ps.sps->log2_min_cb_size; -+ const unsigned int y_cb = yQgBase >> s->ps.sps->log2_min_cb_size; -+ const int qPy_pred = lc->qPy_pred; -+ -+ return (((xQgBase & ctb_size_mask) == 0 ? qPy_pred : -+ s->qp_y_tab[(x_cb - 1) + y_cb * min_cb_width]) + -+ ((yQgBase & ctb_size_mask) == 0 ? qPy_pred : -+ s->qp_y_tab[x_cb + (y_cb - 1) * min_cb_width]) + 1) >> 1; -+} -+ -+// * Only called from bitstream decode in foreground -+// so should be safe -+void ff_hevc_rpi_set_qPy(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc, int xBase, int yBase) -+{ -+ const int qp_y = get_qPy_pred(s, lc, xBase, yBase); -+ -+ if (lc->tu.cu_qp_delta != 0) { -+ // ?? I suspect that the -bd_offset here leads to us adding it elsewhere -+ int off = s->ps.sps->qp_bd_offset; -+ lc->qp_y = FFUMOD(qp_y + lc->tu.cu_qp_delta + 52 + 2 * off, -+ 52 + off) - off; -+ } else -+ lc->qp_y = qp_y; -+} -+ -+static inline unsigned int pixel_shift(const HEVCRpiContext * const s, const unsigned int c_idx) -+{ -+ return c_idx != 0 ? 1 + s->ps.sps->pixel_shift : s->ps.sps->pixel_shift; -+} -+ -+// "DSP" these? -+static void copy_pixel(uint8_t *dst, const uint8_t *src, int pixel_shift) -+{ -+ switch (pixel_shift) -+ { -+ case 2: -+ *(uint32_t *)dst = *(uint32_t *)src; -+ break; -+ case 1: -+ *(uint16_t *)dst = *(uint16_t *)src; -+ break; -+ default: -+ *dst = *src; -+ break; -+ } -+} -+ -+static void copy_CTB_to_hv(const HEVCRpiContext * const s, const uint8_t * const src, -+ ptrdiff_t stride_src, int x, int y, int width, int height, -+ int c_idx, int x_ctb, int y_ctb) -+{ -+ const unsigned int sh = pixel_shift(s, c_idx); -+ const unsigned int w = s->ps.sps->width >> ctx_hshift(s, c_idx); -+ const unsigned int h = s->ps.sps->height >> ctx_vshift(s, c_idx); -+ -+ /* copy horizontal edges */ -+ memcpy(s->sao_pixel_buffer_h[c_idx] + (((2 * y_ctb) * w + x) << sh), -+ src, width << sh); -+ memcpy(s->sao_pixel_buffer_h[c_idx] + (((2 * y_ctb + 1) * w + x) << sh), -+ src + stride_src * (height - 1), width << sh); -+ -+ /* copy vertical edges */ -+ ff_hevc_rpi_copy_vert(s->sao_pixel_buffer_v[c_idx] + (((2 * x_ctb) * h + y) << sh), src, sh, height, 1 << sh, stride_src); -+ -+ ff_hevc_rpi_copy_vert(s->sao_pixel_buffer_v[c_idx] + (((2 * x_ctb + 1) * h + y) << sh), src + ((width - 1) << sh), sh, height, 1 << sh, stride_src); -+} -+ -+// N.B. Src & dst are swapped as this is a restore! -+// x0 & y0 are in luma coords -+// Width & height are in Y/C pels as appropriate -+// * Clear scope for optimsation here but not used enough to be worth it -+static void restore_tqb_pixels(const HEVCRpiContext * const s, -+ uint8_t *src1, const uint8_t *dst1, -+ const ptrdiff_t stride_src, const ptrdiff_t stride_dst, -+ const unsigned int x0, const unsigned int y0, -+ const unsigned int width, const int height, -+ const int c_idx) -+{ -+ if (s->ps.pps->transquant_bypass_enable_flag || -+ s->ps.sps->pcm.loop_filter_disable_flag) -+ { -+ const uint8_t *pcm = s->is_pcm + (x0 >> 6) + (y0 >> 3) * s->ps.sps->pcm_width; -+ int blks_y = height >> (c_idx == 0 ? 3 : 2); -+ const unsigned int bwidth = 8 << s->ps.sps->pixel_shift; // Y & C have the same width in sand -+ const unsigned int bheight = (c_idx == 0) ? 8 : 4; -+ const unsigned int sh = ((x0 >> 3) & 7); -+ const unsigned int mask = (1 << (width >> (c_idx == 0 ? 3 : 2))) - 1; -+ -+ do { -+ unsigned int m = (*pcm >> sh) & mask; -+ uint8_t * bd = src1; -+ const uint8_t * bs = dst1; -+ while (m != 0) { -+ if ((m & 1) != 0) { -+ s->hevcdsp.cpy_blk(bd, stride_src, bs, stride_dst, bwidth, bheight); -+ } -+ m >>= 1; -+ bs += bwidth; -+ bd += bwidth; -+ } -+ src1 += stride_src * bheight; -+ dst1 += stride_dst * bheight; -+ pcm += s->ps.sps->pcm_width; -+ } while (--blks_y > 0); -+ } -+} -+ -+#define CTB(tab, x, y) ((tab)[(y) * s->ps.sps->ctb_width + (x)]) -+ -+static void sao_filter_CTB(const HEVCRpiContext * const s, const int x, const int y) -+{ -+#if SAO_FILTER_N == 5 -+ static const uint8_t sao_tab[8] = { 0 /* 8 */, 1 /* 16 */, 2 /* 24 */, 2 /* 32 */, 3, 3 /* 48 */, 4, 4 /* 64 */}; -+#elif SAO_FILTER_N == 6 -+ static const uint8_t sao_tab[8] = { 0 /* 8 */, 1 /* 16 */, 5 /* 24 */, 2 /* 32 */, 3, 3 /* 48 */, 4, 4 /* 64 */}; -+#else -+#error Confused by size of sao fn array -+#endif -+ int c_idx; -+ int edges[4]; // 0 left 1 top 2 right 3 bottom -+ int x_ctb = x >> s->ps.sps->log2_ctb_size; -+ int y_ctb = y >> s->ps.sps->log2_ctb_size; -+ int ctb_addr_rs = y_ctb * s->ps.sps->ctb_width + x_ctb; -+ int ctb_addr_ts = s->ps.pps->ctb_addr_rs_to_ts[ctb_addr_rs]; -+ RpiSAOParams *sao = &CTB(s->sao, x_ctb, y_ctb); -+ // flags indicating unfilterable edges -+ uint8_t vert_edge[] = { 0, 0 }; -+ uint8_t horiz_edge[] = { 0, 0 }; -+ uint8_t diag_edge[] = { 0, 0, 0, 0 }; -+ uint8_t lfase = CTB(s->filter_slice_edges, x_ctb, y_ctb); -+ uint8_t no_tile_filter = s->ps.pps->tiles_enabled_flag && -+ !s->ps.pps->loop_filter_across_tiles_enabled_flag; -+ uint8_t restore = no_tile_filter || !lfase; -+ uint8_t left_tile_edge = 0; -+ uint8_t right_tile_edge = 0; -+ uint8_t up_tile_edge = 0; -+ uint8_t bottom_tile_edge = 0; -+ const int sliced = 1; -+ const int plane_count = sliced ? 2 : (ctx_cfmt(s) != 0 ? 3 : 1); -+ -+ edges[0] = x_ctb == 0; -+ edges[1] = y_ctb == 0; -+ edges[2] = x_ctb == s->ps.sps->ctb_width - 1; -+ edges[3] = y_ctb == s->ps.sps->ctb_height - 1; -+ -+#ifdef DISABLE_SAO -+ return; -+#endif -+ -+ if (restore) { -+ if (!edges[0]) { -+ left_tile_edge = no_tile_filter && s->ps.pps->tile_id[ctb_addr_ts] != s->ps.pps->tile_id[s->ps.pps->ctb_addr_rs_to_ts[ctb_addr_rs-1]]; -+ vert_edge[0] = (!lfase && CTB(s->tab_slice_address, x_ctb, y_ctb) != CTB(s->tab_slice_address, x_ctb - 1, y_ctb)) || left_tile_edge; -+ } -+ if (!edges[2]) { -+ right_tile_edge = no_tile_filter && s->ps.pps->tile_id[ctb_addr_ts] != s->ps.pps->tile_id[s->ps.pps->ctb_addr_rs_to_ts[ctb_addr_rs+1]]; -+ vert_edge[1] = (!lfase && CTB(s->tab_slice_address, x_ctb, y_ctb) != CTB(s->tab_slice_address, x_ctb + 1, y_ctb)) || right_tile_edge; -+ } -+ if (!edges[1]) { -+ up_tile_edge = no_tile_filter && s->ps.pps->tile_id[ctb_addr_ts] != s->ps.pps->tile_id[s->ps.pps->ctb_addr_rs_to_ts[ctb_addr_rs - s->ps.sps->ctb_width]]; -+ horiz_edge[0] = (!lfase && CTB(s->tab_slice_address, x_ctb, y_ctb) != CTB(s->tab_slice_address, x_ctb, y_ctb - 1)) || up_tile_edge; -+ } -+ if (!edges[3]) { -+ bottom_tile_edge = no_tile_filter && s->ps.pps->tile_id[ctb_addr_ts] != s->ps.pps->tile_id[s->ps.pps->ctb_addr_rs_to_ts[ctb_addr_rs + s->ps.sps->ctb_width]]; -+ horiz_edge[1] = (!lfase && CTB(s->tab_slice_address, x_ctb, y_ctb) != CTB(s->tab_slice_address, x_ctb, y_ctb + 1)) || bottom_tile_edge; -+ } -+ if (!edges[0] && !edges[1]) { -+ diag_edge[0] = (!lfase && CTB(s->tab_slice_address, x_ctb, y_ctb) != CTB(s->tab_slice_address, x_ctb - 1, y_ctb - 1)) || left_tile_edge || up_tile_edge; -+ } -+ if (!edges[1] && !edges[2]) { -+ diag_edge[1] = (!lfase && CTB(s->tab_slice_address, x_ctb, y_ctb) != CTB(s->tab_slice_address, x_ctb + 1, y_ctb - 1)) || right_tile_edge || up_tile_edge; -+ } -+ if (!edges[2] && !edges[3]) { -+ diag_edge[2] = (!lfase && CTB(s->tab_slice_address, x_ctb, y_ctb) != CTB(s->tab_slice_address, x_ctb + 1, y_ctb + 1)) || right_tile_edge || bottom_tile_edge; -+ } -+ if (!edges[0] && !edges[3]) { -+ diag_edge[3] = (!lfase && CTB(s->tab_slice_address, x_ctb, y_ctb) != CTB(s->tab_slice_address, x_ctb - 1, y_ctb + 1)) || left_tile_edge || bottom_tile_edge; -+ } -+ } -+ -+ for (c_idx = 0; c_idx < plane_count; c_idx++) { -+ const unsigned int vshift = ctx_vshift(s, c_idx); -+ const unsigned int hshift = ctx_hshift(s, c_idx); -+ const int x0 = x >> hshift; -+ const int y0 = y >> vshift; -+ const ptrdiff_t stride_src = frame_stride1(s->frame, c_idx); -+ const int ctb_size_h = (1 << (s->ps.sps->log2_ctb_size)) >> hshift; -+ const int ctb_size_v = (1 << (s->ps.sps->log2_ctb_size)) >> vshift; -+ const int width = FFMIN(ctb_size_h, (s->ps.sps->width >> hshift) - x0); -+ const int height = FFMIN(ctb_size_v, (s->ps.sps->height >> vshift) - y0); -+ int tab = sao_tab[(FFALIGN(width, 8) >> 3) - 1]; -+ ptrdiff_t stride_dst; -+ uint8_t *dst; -+ -+ const unsigned int sh = s->ps.sps->pixel_shift + (sliced && c_idx != 0); -+ const int wants_lr = sao->type_idx[c_idx] == SAO_EDGE && sao->eo_class[c_idx] != 1 /* Vertical */; -+ uint8_t * const src = !sliced ? -+ &s->frame->data[c_idx][y0 * stride_src + (x0 << sh)] : -+ c_idx == 0 ? -+ av_rpi_sand_frame_pos_y(s->frame, x0, y0) : -+ av_rpi_sand_frame_pos_c(s->frame, x0, y0); -+ const uint8_t * const src_l = edges[0] || !wants_lr ? NULL : -+ !sliced ? src - (1 << sh) : -+ c_idx == 0 ? -+ av_rpi_sand_frame_pos_y(s->frame, x0 - 1, y0) : -+ av_rpi_sand_frame_pos_c(s->frame, x0 - 1, y0); -+ const uint8_t * const src_r = edges[2] || !wants_lr ? NULL : -+ !sliced ? src + (width << sh) : -+ c_idx == 0 ? -+ av_rpi_sand_frame_pos_y(s->frame, x0 + width, y0) : -+ av_rpi_sand_frame_pos_c(s->frame, x0 + width, y0); -+ -+ if (sliced && c_idx > 1) { -+ break; -+ } -+ -+// if (c_idx == 1) -+// printf("%d: %dx%d %d,%d: lr=%d\n", c_idx, width, height, x0, y0, wants_lr); -+ -+ switch (sao->type_idx[c_idx]) { -+ case SAO_BAND: -+ copy_CTB_to_hv(s, src, stride_src, x0, y0, width, height, c_idx, -+ x_ctb, y_ctb); -+ if (s->ps.pps->transquant_bypass_enable_flag || -+ s->ps.sps->pcm.loop_filter_disable_flag) -+ { -+ // Can't use the edge buffer here as it may be in use by the foreground -+ DECLARE_ALIGNED(64, uint8_t, dstbuf) -+ [2*MAX_PB_SIZE*MAX_PB_SIZE]; -+ dst = dstbuf; -+ stride_dst = 2*MAX_PB_SIZE; -+ s->hevcdsp.cpy_blk(dst, stride_dst, src, stride_src, width << sh, height); -+ if (sliced && c_idx != 0) -+ { -+ s->hevcdsp.sao_band_filter_c[tab](src, dst, stride_src, stride_dst, -+ sao->offset_val[1], sao->band_position[1], -+ sao->offset_val[2], sao->band_position[2], -+ width, height); -+ } -+ else -+ { -+ s->hevcdsp.sao_band_filter[tab](src, dst, stride_src, stride_dst, -+ sao->offset_val[c_idx], sao->band_position[c_idx], -+ width, height); -+ } -+ restore_tqb_pixels(s, src, dst, stride_src, stride_dst, -+ x, y, width, height, c_idx); -+ } else { -+ if (sliced && c_idx != 0) -+ { -+ s->hevcdsp.sao_band_filter_c[tab](src, src, stride_src, stride_src, -+ sao->offset_val[1], sao->band_position[1], -+ sao->offset_val[2], sao->band_position[2], -+ width, height); -+ } -+ else -+ { -+ s->hevcdsp.sao_band_filter[tab](src, src, stride_src, stride_src, -+ sao->offset_val[c_idx], sao->band_position[c_idx], -+ width, height); -+ } -+ } -+ sao->type_idx[c_idx] = SAO_APPLIED; -+ break; -+ case SAO_EDGE: -+ { -+ const int w = s->ps.sps->width >> hshift; -+ const int h = s->ps.sps->height >> vshift; -+ int top_edge = edges[1]; -+ int bottom_edge = edges[3]; -+ // Can't use the edge buffer here as it may be in use by the foreground -+ DECLARE_ALIGNED(64, uint8_t, dstbuf) -+ [RPI_HEVC_SAO_BUF_STRIDE * (MAX_PB_SIZE + 2) + 64]; -+ -+ stride_dst = RPI_HEVC_SAO_BUF_STRIDE; -+ dst = dstbuf + stride_dst + 32; -+ -+ if (!top_edge) { -+ uint8_t *dst1; -+ int src_idx; -+ const uint8_t * const src_spb = s->sao_pixel_buffer_h[c_idx] + (((2 * y_ctb - 1) * w + x0) << sh); -+ -+ dst1 = dst - stride_dst; -+ -+ if (src_l != NULL) { -+ src_idx = (CTB(s->sao, x_ctb-1, y_ctb-1).type_idx[c_idx] == -+ SAO_APPLIED); -+ copy_pixel(dst1 - (1 << sh), src_idx ? src_spb - (1 << sh) : src_l - stride_src, sh); -+ } -+ -+ src_idx = (CTB(s->sao, x_ctb, y_ctb-1).type_idx[c_idx] == -+ SAO_APPLIED); -+ memcpy(dst1, src_idx ? src_spb : src - stride_src, width << sh); -+ -+ if (src_r != NULL) { -+ src_idx = (CTB(s->sao, x_ctb+1, y_ctb-1).type_idx[c_idx] == -+ SAO_APPLIED); -+ copy_pixel(dst1 + (width << sh), src_idx ? src_spb + (width << sh) : src_r - stride_src, sh); -+ } -+ } -+ if (!bottom_edge) { -+ uint8_t * const dst1 = dst + height * stride_dst; -+ int src_idx; -+ const uint8_t * const src_spb = s->sao_pixel_buffer_h[c_idx] + (((2 * y_ctb + 2) * w + x0) << sh); -+ const unsigned int hoff = height * stride_src; -+ -+ if (src_l != NULL) { -+ src_idx = (CTB(s->sao, x_ctb-1, y_ctb+1).type_idx[c_idx] == -+ SAO_APPLIED); -+ copy_pixel(dst1 - (1 << sh), src_idx ? src_spb - (1 << sh) : src_l + hoff, sh); -+ } -+ -+ src_idx = (CTB(s->sao, x_ctb, y_ctb+1).type_idx[c_idx] == -+ SAO_APPLIED); -+ memcpy(dst1, src_idx ? src_spb : src + hoff, width << sh); -+ -+ if (src_r != NULL) { -+ src_idx = (CTB(s->sao, x_ctb+1, y_ctb+1).type_idx[c_idx] == -+ SAO_APPLIED); -+ copy_pixel(dst1 + (width << sh), src_idx ? src_spb + (width << sh) : src_r + hoff, sh); -+ } -+ } -+ if (src_l != NULL) { -+ if (CTB(s->sao, x_ctb-1, y_ctb).type_idx[c_idx] == SAO_APPLIED) { -+ ff_hevc_rpi_copy_vert(dst - (1 << sh), -+ s->sao_pixel_buffer_v[c_idx] + (((2 * x_ctb - 1) * h + y0) << sh), -+ sh, height, stride_dst, 1 << sh); -+ } else { -+ ff_hevc_rpi_copy_vert(dst - (1 << sh), -+ src_l, -+ sh, height, stride_dst, stride_src); -+ } -+ } -+ if (src_r != NULL) { -+ if (CTB(s->sao, x_ctb+1, y_ctb).type_idx[c_idx] == SAO_APPLIED) { -+ ff_hevc_rpi_copy_vert(dst + (width << sh), -+ s->sao_pixel_buffer_v[c_idx] + (((2 * x_ctb + 2) * h + y0) << sh), -+ sh, height, stride_dst, 1 << sh); -+ } else { -+ ff_hevc_rpi_copy_vert(dst + (width << sh), -+ src_r, -+ sh, height, stride_dst, stride_src); -+ } -+ } -+ -+ s->hevcdsp.cpy_blk(dst, stride_dst, src, stride_src, width << sh, height); -+ -+ copy_CTB_to_hv(s, src, stride_src, x0, y0, width, height, c_idx, -+ x_ctb, y_ctb); -+ if (sliced && c_idx != 0) -+ { -+ // Class always the same for both U & V (which is just as well :-)) -+ s->hevcdsp.sao_edge_filter_c[tab](src, dst, stride_src, -+ sao->offset_val[1], sao->offset_val[2], sao->eo_class[1], -+ width, height); -+ s->hevcdsp.sao_edge_restore_c[restore](src, dst, -+ stride_src, stride_dst, -+ sao, -+ edges, width, -+ height, c_idx, -+ vert_edge, -+ horiz_edge, -+ diag_edge); -+ } -+ else -+ { -+ s->hevcdsp.sao_edge_filter[tab](src, dst, stride_src, sao->offset_val[c_idx], -+ sao->eo_class[c_idx], width, height); -+ s->hevcdsp.sao_edge_restore[restore](src, dst, -+ stride_src, stride_dst, -+ sao, -+ edges, width, -+ height, c_idx, -+ vert_edge, -+ horiz_edge, -+ diag_edge); -+ } -+ restore_tqb_pixels(s, src, dst, stride_src, stride_dst, -+ x, y, width, height, c_idx); -+ sao->type_idx[c_idx] = SAO_APPLIED; -+ break; -+ } -+ } -+ } -+ -+#if RPI_ZC_SAND_8_IN_10_BUF -+ if (s->frame->format == AV_PIX_FMT_SAND64_10 && s->frame->buf[RPI_ZC_SAND_8_IN_10_BUF] != NULL && -+ (((x + (1 << (s->ps.sps->log2_ctb_size))) & 255) == 0 || edges[2])) -+ { -+ const unsigned int stride1 = frame_stride1(s->frame, 1); -+ const unsigned int stride2 = av_rpi_sand_frame_stride2(s->frame); -+ const unsigned int xoff = (x >> 8) * stride2 * stride1; -+ const unsigned int ctb_size = (1 << s->ps.sps->log2_ctb_size); -+ const uint8_t * const sy = s->frame->data[0] + xoff * 4 + y * stride1; -+ uint8_t * const dy = s->frame->buf[4]->data + xoff * 2 + y * stride1; -+ const uint8_t * const sc = s->frame->data[1] + xoff * 4 + (y >> 1) * stride1; -+ uint8_t * const dc = s->frame->buf[4]->data + (s->frame->data[1] - s->frame->data[0]) + xoff * 2 + (y >> 1) * stride1; -+ const unsigned int wy = !edges[2] ? 256 : s->ps.sps->width - (x & ~255); -+ const unsigned int hy = !edges[3] ? ctb_size : s->ps.sps->height - y; -+ -+// printf("dy=%p/%p, stride1=%d, stride2=%d, sy=%p/%p, wy=%d, hy=%d, x=%d, y=%d, cs=%d\n", dy, dc, stride1, stride2, sy, sc, wy, hy, x, y, ctb_size); -+ av_rpi_sand16_to_sand8(dy, stride1, stride2, sy, stride1, stride2, wy, hy, 3); -+ av_rpi_sand16_to_sand8(dc, stride1, stride2, sc, stride1, stride2, wy, hy >> 1, 3); -+ } -+#endif -+} -+ -+// When bits are delivered to deblock we want them -+//#define TL 1 -+//#define TR 2 -+//#define BL 4 -+//#define BR 8 -+ -+// pcm4 returns them as b0 = tl, b1 = tr, b16 = bl, b17 = br -+// so we need to rearrange before passing on -+ -+static inline uint32_t pcm4(const HEVCRpiContext * const s, const unsigned int x, const unsigned int y) -+{ -+ const uint8_t * const pcm = s->is_pcm + (x >> 6) + (y >> 3) * s->ps.sps->pcm_width; -+ return (pcm[0] | -+ (pcm[1] << 8) | -+ (pcm[s->ps.sps->pcm_width] << 16) | -+ (pcm[s->ps.sps->pcm_width + 1] << 24)) >> ((x >> 3) & 7); -+} -+ -+static inline uint32_t pcm2(const HEVCRpiContext * const s, const unsigned int x, const unsigned int y) -+{ -+ const uint8_t * const pcm = s->is_pcm + (x >> 6) + (y >> 3) * s->ps.sps->pcm_width; -+ return (pcm[0] | (pcm[1] << 8)) >> ((x >> 3) & 7); -+} -+ -+// We cast away const here as we want this to work for both get and set -+static inline uint32_t * bs_ptr32(const uint8_t * bs, const unsigned int stride2, const unsigned int x, const unsigned int y) -+{ -+ return (uint32_t *)(bs + -+#if (~3U & (HEVC_RPI_BS_STRIDE1_PEL_MASK >> HEVC_RPI_BS_PELS_PER_BYTE_SHIFT)) != 0 -+#warning Unexpected masks -+ // As it happens we end up with stride1 = sizeof(uint32_t) so this expr vanishes -+ ((x >> HEVC_RPI_BS_PELS_PER_BYTE_SHIFT) & -+ (~3 & (HEVC_RPI_BS_STRIDE1_PEL_MASK >> HEVC_RPI_BS_PELS_PER_BYTE_SHIFT))) + -+#elif HEVC_RPI_BS_STRIDE1_BYTES < 4 -+#error Stride1 < return size -+#endif -+ ((y >> HEVC_RPI_BS_Y_SHR) << HEVC_RPI_BS_STRIDE1_BYTE_SHIFT) + -+ (x >> HEVC_RPI_BS_STRIDE1_PEL_SHIFT) * stride2); -+} -+ -+static inline uint8_t * bs_ptr8(const uint8_t * bs, const unsigned int stride2, const unsigned int x, const unsigned int y) -+{ -+ return (uint8_t *)(bs + -+ ((x >> HEVC_RPI_BS_PELS_PER_BYTE_SHIFT) & -+ (HEVC_RPI_BS_STRIDE1_PEL_MASK >> HEVC_RPI_BS_PELS_PER_BYTE_SHIFT)) + -+ ((y >> HEVC_RPI_BS_Y_SHR) << HEVC_RPI_BS_STRIDE1_BYTE_SHIFT) + -+ (x >> HEVC_RPI_BS_STRIDE1_PEL_SHIFT) * stride2); -+} -+ -+ -+// Get block strength -+// Given how we call we will always get within the 32bit boundries -+static inline uint32_t bs_get32(const uint8_t * bs, unsigned int stride2, -+ unsigned int xl, unsigned int xr, const unsigned int y) -+{ -+ if (xr <= xl) { -+ return 0; -+ } -+ else -+ { -+#if HAVE_ARMV6T2_INLINE -+#if (~3U & (HEVC_RPI_BS_STRIDE1_PEL_MASK >> HEVC_RPI_BS_PELS_PER_BYTE_SHIFT)) != 0 -+#error This case not yet handled in bs_get32 -+#elif HEVC_RPI_BS_STRIDE1_BYTES < 4 -+#error Stride1 < return size -+#endif -+ uint32_t tmp; -+ __asm__ ( -+ "lsr %[tmp], %[xl], %[xl_shift] \n\t" -+ "rsb %[xr], %[xl], %[xr] \n\t" -+ "mla %[stride2], %[stride2], %[tmp], %[bs] \n\t" -+ "add %[xr], %[xr], #7 \n\t" -+ "lsr %[bs], %[y], %[y_shift1] \n\t" -+ "bic %[xr], %[xr], #7 \n\t" -+ "ubfx %[xl], %[xl], #1, #5 \n\t" -+ "lsr %[xr], %[xr], #1 \n\t" -+ "cmp %[xr], #32 \n\t" -+ "mvn %[tmp], #0 \n\t" -+ "ldr %[bs], [%[stride2], %[bs], lsl %[y_shift2]] \n\t" -+ "lsl %[tmp], %[tmp], %[xr] \n\t" -+ "lsr %[xl], %[bs], %[xl] \n\t" -+ "it ne \n\t" -+ "bicne %[bs], %[xl], %[tmp] \n\t" -+ : // Outputs -+ [bs]"+r"(bs), -+ [stride2]"+r"(stride2), -+ [xl]"+r"(xl), -+ [xr]"+r"(xr), -+ [tmp]"=&r"(tmp) -+ : // Inputs -+ [y]"r"(y), -+ [xl_shift]"M"(HEVC_RPI_BS_STRIDE1_PEL_SHIFT), -+ [y_shift1]"M"(HEVC_RPI_BS_Y_SHR), -+ [y_shift2]"M"(HEVC_RPI_BS_STRIDE1_BYTE_SHIFT) -+ : // Clobbers -+ "cc" -+ ); -+ return (uint32_t) bs; -+#else -+ const uint32_t a = *bs_ptr32(bs, stride2, xl, y); -+ const unsigned int n = ((xr - xl + 7) & ~7) >> 1; -+ -+ return n == 32 ? a : -+ (a >> ((xl >> 1) & 31)) & ~(~0U << n); -+#endif -+ } -+} -+ -+static inline uint32_t hbs_get32(const HEVCRpiContext * const s, const unsigned int xl, const unsigned int xr, const unsigned int y) -+{ -+ av_assert2(((xl ^ (xr - 1)) >> s->ps.sps->log2_ctb_size) == 0); -+ return bs_get32(s->bs_horizontal, s->bs_stride2, xl, xr, y); -+} -+ -+static inline uint32_t vbs_get32(const HEVCRpiContext * const s, const unsigned int xl, const unsigned int xr, const unsigned int y) -+{ -+ av_assert2(((xl ^ (xr - 1)) >> s->ps.sps->log2_ctb_size) == 0); -+ return bs_get32(s->bs_vertical, s->bs_stride2, xl, xr, y); -+} -+ -+ -+static void deblock_y_blk(const HEVCRpiContext * const s, const RpiBlk bounds, const int end_x, const int end_y) -+{ -+ const unsigned int log2_ctb_size = s->ps.sps->log2_ctb_size; -+ const unsigned int log2_min_cb_size = s->ps.sps->log2_min_cb_size; -+ const unsigned int ctb_size = (1 << log2_ctb_size); -+ const unsigned int cb_r = bounds.x + bounds.w - (end_x ? 0 : 1); -+ const unsigned int ctb_n = (bounds.x + bounds.y * s->ps.sps->ctb_width) >> log2_ctb_size; -+ const DBParams * cb_dbp = s->deblock + ctb_n; -+ const unsigned int b_b = bounds.y + bounds.h - (end_y ? 0 : 8); -+ -+ unsigned int cb_x; -+ -+ // Do in CTB-shaped blocks -+ for (cb_x = bounds.x; cb_x < cb_r; cb_x += ctb_size, ++cb_dbp) -+ { -+ const unsigned int bv_r = FFMIN(cb_x + ctb_size, cb_r); -+ const unsigned int bv_l = FFMAX(cb_x, 8); -+ const unsigned int bh_r = cb_x + ctb_size >= cb_r ? cb_r - 8 : cb_x + ctb_size - 9; -+ const unsigned int bh_l = bv_l - 8; -+ unsigned int y; -+ -+ // Main body -+ for (y = (bounds.y == 0 ? 0 : bounds.y - 8); y < b_b; y += 8) -+ { -+ uint32_t vbs = vbs_get32(s, bv_l, bv_r, y); -+ -+ const DBParams * const dbp = y < bounds.y ? cb_dbp - s->ps.sps->ctb_width : cb_dbp; -+ const int8_t * const qta = s->qp_y_tab + ((y - 1) >> log2_min_cb_size) * s->ps.sps->min_cb_width; -+ const int8_t * const qtb = s->qp_y_tab + (y >> log2_min_cb_size) * s->ps.sps->min_cb_width; -+ -+ if (vbs != 0) -+ { -+ const uint8_t * const tcv = tctable + dbp->tc_offset; -+ const uint8_t * const betav = betatable + dbp->beta_offset; -+ unsigned int pcmfa = pcm2(s, bv_l - 1, y); -+ unsigned int x; -+ -+ for (x = bv_l; vbs != 0; x += 8, vbs >>= 4, pcmfa >>= 1) -+ { -+ if ((vbs & 0xf) != 0 && (pcmfa & 3) != 3) -+ { -+ const int qp = (qtb[(x - 1) >> log2_min_cb_size] + qtb[x >> log2_min_cb_size] + 1) >> 1; -+ s->hevcdsp.hevc_v_loop_filter_luma2(av_rpi_sand_frame_pos_y(s->frame, x, y), -+ frame_stride1(s->frame, LUMA), -+ betav[qp], -+ ((vbs & 3) == 0 ? 0 : tcv[qp + (int)(vbs & 2)]) | -+ (((vbs & 0xc) == 0 ? 0 : tcv[qp + (int)((vbs >> 2) & 2)]) << 16), -+ pcmfa & 3, -+ av_rpi_sand_frame_pos_y(s->frame, x - 4, y)); -+ } -+ } -+ } -+ -+ if (y != 0) -+ { -+ uint32_t hbs; -+ -+ // H left - mostly separated out so we only need a uint32_t hbs -+ if ((hbs = hbs_get32(s, bh_l, cb_x, y)) != 0) -+ { -+ const unsigned int x = bh_l; -+ const unsigned int pcmfa = pcm4(s, bh_l, y - 1); -+ const int qp = (qta[x >> log2_min_cb_size] + qtb[x >> log2_min_cb_size] + 1) >> 1; -+ const DBParams * const dbph = dbp - 1; -+ const uint8_t * const tc = tctable + dbph->tc_offset + qp; -+ -+ av_assert2(cb_x - bh_l == 8); -+ -+ s->hevcdsp.hevc_h_loop_filter_luma2(av_rpi_sand_frame_pos_y(s->frame, x, y), -+ frame_stride1(s->frame, LUMA), -+ betatable[qp + dbph->beta_offset], -+ ((hbs & 3) == 0 ? 0 : tc[hbs & 2]) | -+ (((hbs & 0xc) == 0 ? 0 : tc[(hbs >> 2) & 2]) << 16), -+ (pcmfa & 1) | ((pcmfa & 0x10000) >> 15)); -+ } -+ -+ // H -+ if ((hbs = hbs_get32(s, cb_x, bh_r + 1, y)) != 0) // Will give (x <= bh_r) in for loop -+ { -+ unsigned int x; -+ unsigned int pcmfa = pcm4(s, cb_x, y - 1); -+ -+ for (x = cb_x; hbs != 0; x += 8, hbs >>= 4, pcmfa >>= 1) -+ { -+ if ((hbs & 0xf) != 0 && (~pcmfa & 0x10001) != 0) -+ { -+ const int qp = (qta[x >> log2_min_cb_size] + qtb[x >> log2_min_cb_size] + 1) >> 1; -+ const uint8_t * const tc = tctable + dbp->tc_offset + qp; -+ s->hevcdsp.hevc_h_loop_filter_luma2(av_rpi_sand_frame_pos_y(s->frame, x, y), -+ frame_stride1(s->frame, LUMA), -+ betatable[qp + dbp->beta_offset], -+ ((hbs & 3) == 0 ? 0 : tc[hbs & 2]) | -+ (((hbs & 0xc) == 0 ? 0 : tc[(hbs >> 2) & 2]) << 16), -+ (pcmfa & 1) | ((pcmfa & 0x10000) >> 15)); -+ } -+ } -+ } -+ } -+ -+ } -+ } -+} -+ -+static av_always_inline int q2h(const HEVCRpiContext * const s, const unsigned int x, const unsigned int y) -+{ -+ const unsigned int log2_min_cb_size = s->ps.sps->log2_min_cb_size; -+ const int8_t * const qt = s->qp_y_tab + (y >> log2_min_cb_size) * s->ps.sps->min_cb_width; -+ return (qt[(x - 1) >> log2_min_cb_size] + qt[x >> log2_min_cb_size] + 1) >> 1; -+} -+ -+static void deblock_uv_blk(const HEVCRpiContext * const s, const RpiBlk bounds, const int end_x, const int end_y) -+{ -+ const unsigned int log2_ctb_size = s->ps.sps->log2_ctb_size; -+ const unsigned int log2_min_cb_size = s->ps.sps->log2_min_cb_size; -+ const unsigned int ctb_size = (1 << log2_ctb_size); -+ const unsigned int cb_r = bounds.x + bounds.w - (end_x ? 0 : 8); -+ const unsigned int ctb_n = (bounds.x + bounds.y * s->ps.sps->ctb_width) >> log2_ctb_size; -+ const DBParams * dbp = s->deblock + ctb_n; -+ const unsigned int b_b = bounds.y + bounds.h - (end_y ? 0 : 8); -+ const uint8_t * const tcq_u = s->ps.pps->qp_dblk_x[1]; -+ const uint8_t * const tcq_v = s->ps.pps->qp_dblk_x[2]; -+ -+ unsigned int cb_x; -+ -+ av_assert1((bounds.x & (ctb_size - 1)) == 0); -+ av_assert1((bounds.y & (ctb_size - 1)) == 0); -+ av_assert1(bounds.h <= ctb_size); -+ -+ // Do in CTB-shaped blocks -+ for (cb_x = bounds.x; cb_x < cb_r; cb_x += ctb_size, ++dbp) { -+ const unsigned int bv_r = FFMIN(cb_x + ctb_size, cb_r); -+ const unsigned int bv_l = FFMAX(cb_x, 16); -+ unsigned int y; -+ -+ // V above -+ if (bounds.y != 0) { -+ // Deblock V up 8 -+ // CTB above current -+ // Top-half only (tc4 & ~0xffff == 0) is special cased in asm -+ const unsigned int y = bounds.y - 8; -+ uint32_t vbs = vbs_get32(s, bv_l, bv_r, y) & 0x02020202U; -+ -+ if (vbs != 0) -+ { -+ unsigned int pcmfa = pcm2(s, bv_l - 1, y); -+ const uint8_t * const tc = tctable + 2 + (dbp - s->ps.sps->ctb_width)->tc_offset; -+ unsigned int x; -+ -+ for (x = bv_l; vbs != 0; x += 16, vbs >>= 8, pcmfa >>= 2) -+ { -+ if ((vbs & 2) != 0 && (~pcmfa & 3) != 0) -+ { -+ const int qp0 = q2h(s, x, y); -+ s->hevcdsp.hevc_v_loop_filter_uv2(av_rpi_sand_frame_pos_c(s->frame, x >> 1, y >> 1), -+ frame_stride1(s->frame, 1), -+ tc[tcq_u[qp0]] | (tc[tcq_v[qp0]] << 8), -+ av_rpi_sand_frame_pos_c(s->frame, (x >> 1) - 2, y >> 1), -+ pcmfa & 3); -+ } -+ } -+ } -+ } -+ -+ for (y = bounds.y; y < b_b; y += 16) -+ { -+ uint32_t vbs = (vbs_get32(s, bv_l, bv_r, y) & 0x02020202U) | -+ (y + 16 > b_b ? 0 : (vbs_get32(s, bv_l, bv_r, y + 8) & 0x02020202U) << 4); -+ -+ // V -+ if (vbs != 0) -+ { -+ unsigned int x; -+ unsigned int pcmfa = -+ (y + 16 > b_b ? -+ pcm2(s, bv_l - 1, y) | 0xffff0000 : -+ pcm4(s, bv_l - 1, y)); -+ const uint8_t * const tc = tctable + 2 + dbp->tc_offset; -+ -+ for (x = bv_l; vbs != 0; x += 16, vbs >>= 8, pcmfa >>= 2) -+ { -+ if ((vbs & 0xff) != 0 && (~pcmfa & 0x30003) != 0) -+ { -+ const int qp0 = q2h(s, x, y); -+ const int qp1 = q2h(s, x, y + 8); -+ s->hevcdsp.hevc_v_loop_filter_uv2(av_rpi_sand_frame_pos_c(s->frame, x >> 1, y >> 1), -+ frame_stride1(s->frame, 1), -+ ((vbs & 2) == 0 ? 0 : (tc[tcq_u[qp0]] << 0) | (tc[tcq_v[qp0]] << 8)) | -+ ((vbs & 0x20) == 0 ? 0 : (tc[tcq_u[qp1]] << 16) | (tc[tcq_v[qp1]] << 24)), -+ av_rpi_sand_frame_pos_c(s->frame, (x >> 1) - 2, y >> 1), -+ (pcmfa & 3) | ((pcmfa >> 14) & 0xc)); -+ } -+ } -+ } -+ -+ // H -+ if (y != 0) -+ { -+ uint32_t hbs; -+ const unsigned int bh_l = bv_l - 16; -+ const unsigned int bh_r = cb_x + ctb_size >= cb_r ? cb_r : cb_x + ctb_size - 16; -+ const int8_t * const qta = s->qp_y_tab + ((y - 1) >> log2_min_cb_size) * s->ps.sps->min_cb_width; -+ const int8_t * const qtb = s->qp_y_tab + (y >> log2_min_cb_size) * s->ps.sps->min_cb_width; -+ -+ // H left - mostly separated out so we only need a uint32_t hbs -+ // Stub is width 8 to the left of bounds, but width 16 internally -+ if ((hbs = hbs_get32(s, bh_l, cb_x, y) & 0x22U) != 0) -+ { -+ unsigned int pcmfa = pcm4(s, bh_l, y - 1); -+ -+ // Chop off bits we don't want... -+ if (bh_l < bounds.x) { -+ pcmfa |= 0x10001; // TL|BL pre rearrangement -+ hbs &= ~3; // Make BS 0 -+ } -+ -+ // Double check we still want this -+ if (hbs != 0 && (~pcmfa & 0x30003) != 0) -+ { -+ const unsigned int x = bh_l; -+ const int qp0 = (qta[x >> log2_min_cb_size] + qtb[x >> log2_min_cb_size] + 1) >> 1; -+ const int qp1 = (qta[(x + 8) >> log2_min_cb_size] + qtb[(x + 8) >> log2_min_cb_size] + 1) >> 1; -+ const uint8_t * const tc = tctable + 2 + (dbp - 1)->tc_offset; -+ -+ s->hevcdsp.hevc_h_loop_filter_uv(av_rpi_sand_frame_pos_c(s->frame, x >> 1, y >> 1), -+ frame_stride1(s->frame, 1), -+ ((hbs & 2) == 0 ? 0 : (tc[tcq_u[qp0]] << 0) | (tc[tcq_v[qp0]] << 8)) | -+ ((hbs & 0x20) == 0 ? 0 : (tc[tcq_u[qp1]] << 16) | (tc[tcq_v[qp1]] << 24)), -+ (pcmfa & 3) | ((pcmfa >> 14) & 0xc)); -+ } -+ } -+ -+ // H main -+ if ((hbs = (hbs_get32(s, cb_x, bh_r, y) & 0x22222222U)) != 0) -+ { -+ unsigned int x; -+ unsigned int pcmfa = pcm4(s, cb_x, y - 1); // Might like to mask out far right writes but probably not worth it -+ -+ for (x = cb_x; hbs != 0; x += 16, hbs >>= 8, pcmfa >>= 2) -+ { -+ if ((hbs & 0xff) != 0 && (~pcmfa & 0x30003) != 0) -+ { -+ const int qp0 = (qta[x >> log2_min_cb_size] + qtb[x >> log2_min_cb_size] + 1) >> 1; -+ const int qp1 = (qta[(x + 8) >> log2_min_cb_size] + qtb[(x + 8) >> log2_min_cb_size] + 1) >> 1; -+ const uint8_t * const tc = tctable + 2 + dbp->tc_offset; -+ -+ s->hevcdsp.hevc_h_loop_filter_uv(av_rpi_sand_frame_pos_c(s->frame, x >> 1, y >> 1), -+ frame_stride1(s->frame, 1), -+ ((hbs & 2) == 0 ? 0 : (tc[tcq_u[qp0]] << 0) | (tc[tcq_v[qp0]] << 8)) | -+ ((hbs & 0x20) == 0 ? 0 : (tc[tcq_u[qp1]] << 16) | (tc[tcq_v[qp1]] << 24)), -+ (pcmfa & 3) | ((pcmfa >> 14) & 0xc)); -+ } -+ } -+ } -+ } -+ } -+ } -+} -+ -+static inline unsigned int off_boundary(const unsigned int x, const unsigned int log2_n) -+{ -+ return x & ~(~0U << log2_n); -+} -+ -+static inline void hbs_set(const HEVCRpiContext * const s, const unsigned int x, const unsigned int y, const uint32_t mask, uint32_t bsf) -+{ -+ av_assert2((y & 7) == 0); -+ -+ // This doesn't have the same simultainious update issues that bsf_stash -+ // does (other threads will have a different y) so we can do it the easy way -+ if ((bsf &= mask) != 0) -+ *bs_ptr32(s->bs_horizontal, s->bs_stride2, x, y) |= bsf << ((x >> 1) & 31); -+} -+ -+ -+static void vbs_set(const HEVCRpiContext * const s, const unsigned int x, const unsigned int y, const uint32_t mask, uint32_t bsf) -+{ -+ // We arrange this in a slightly odd fashion but it lines up with -+ // how we are going to use it in the actual deblock code & it is easier -+ // to do the contortions here than there -+ // -+ // Arrange (LE) {x0y0, x0y4, x8y0, x8,y4}, {x16y0, x16y4, x24y0, x24y4},... -+ -+ av_assert2((x & 7) == 0); -+ -+ if ((bsf &= mask) != 0) -+ { -+ uint8_t *p = bs_ptr8(s->bs_vertical, s->bs_stride2, x, y); -+ const unsigned int sh = ((x & 8) | (y & 4)) >> 1; -+ -+ if (mask <= 0xf) -+ { -+ *p |= (bsf << sh); -+ } -+ else -+ { -+ do { -+ *p |= (bsf & 0xf) << sh; -+ p += HEVC_RPI_BS_STRIDE1_BYTES; -+ } while ((bsf >>= 4) != 0); -+ } -+ } -+} -+ -+static inline uint32_t bsf_mv(const HEVCRpiContext * const s, -+ const unsigned int rep, const unsigned int dup, -+ const unsigned int mvf_stride0, -+ const unsigned int mvf_stride1, -+ const RefPicList * const rpl_p, const RefPicList * const rpl_q, -+ const HEVCRpiMvField * const mvf_p, const HEVCRpiMvField * const mvf_q) -+{ -+ return s->hevcdsp.hevc_deblocking_boundary_strengths(rep, dup, -+ mvf_p, mvf_q, -+ rpl_p[0].list, rpl_p[1].list, rpl_q[0].list, rpl_q[1].list, -+ sizeof(HEVCRpiMvField) * mvf_stride0, sizeof(HEVCRpiMvField) * mvf_stride1); -+} -+ -+ -+void ff_hevc_rpi_deblocking_boundary_strengths(const HEVCRpiContext * const s, -+ const HEVCRpiLocalContext * const lc, -+ const unsigned int x0, const unsigned int y0, -+ const unsigned int log2_trafo_size, -+ const int is_coded_block) -+{ -+ const HEVCRpiMvField * const mvf_curr = mvf_stash_ptr(s, lc, x0, y0); -+ const unsigned int log2_min_pu_size = LOG2_MIN_PU_SIZE; -+ const RefPicList * const rpl = s->refPicList; -+ // Rep count for bsf_mv when running with min_pu chuncks -+ const unsigned int log2_rep_min_pu = log2_trafo_size <= log2_min_pu_size ? 0 : log2_trafo_size - log2_min_pu_size; -+ const unsigned int boundary_flags = s->sh.no_dblk_boundary_flags & lc->boundary_flags; -+ const unsigned int trafo_size = (1U << log2_trafo_size); -+ const uint32_t bsf_mask = log2_trafo_size > 5 ? ~0U : (1U << (trafo_size >> 1)) - 1; -+ const uint32_t bsf_cbf = (bsf_mask & 0x55555555); -+ -+ // Do we cover a pred split line? -+ const int has_x_split = x0 < lc->cu.x_split && x0 + trafo_size > lc->cu.x_split; -+ const int has_y_split = y0 < lc->cu.y_split && y0 + trafo_size > lc->cu.y_split; -+ -+ uint32_t bsf_h; -+ uint32_t bsf_v; -+ -+#ifdef DISABLE_STRENGTHS -+ return; -+#endif -+ -+ // We are always on a size boundary -+ av_assert2((x0 & (trafo_size - 1)) == 0); -+ av_assert2((y0 & (trafo_size - 1)) == 0); -+ // log2_trafo_size not really a transform size; we can have to deal -+ // with size 2^6 blocks -+ av_assert2(log2_trafo_size >= 2 && log2_trafo_size <= 6); -+ -+ // Retrieve and update coded (b0), intra (b1) bs flags -+ // -+ // Store on min width (rather than uint32_t) to avoid possible issues -+ // with another thread on another core running wpp using the same -+ // memory (min CTB = 16 pels = 4 bsf els = 8 bits) -+ // -+ // In bsf BS=2 is represented by 3 as it is much easier to test & set -+ // and the actual deblock code tests for 0 and b1 set/not-set so 2 and -+ // 3 will work the same -+ { -+ // Given where we are called from is_cbf_luma & is_intra will be constant over the block -+ const uint32_t bsf0 = (lc->cu.pred_mode == MODE_INTRA) ? bsf_mask : is_coded_block ? bsf_cbf : 0; -+ uint8_t *const p = s->bsf_stash_up + (x0 >> 4); -+ uint8_t *const q = s->bsf_stash_left + (y0 >> 4); -+ -+ switch (log2_trafo_size) -+ { -+ case 2: -+ case 3: -+ { -+ const unsigned int sh_h = (x0 >> 1) & 7; -+ const unsigned int sh_v = (y0 >> 1) & 7; -+ bsf_h = *p; -+ bsf_v = *q; -+ *p = (bsf_h & ~(bsf_mask << sh_h)) | (bsf0 << sh_h); -+ *q = (bsf_v & ~(bsf_mask << sh_v)) | (bsf0 << sh_v); -+ bsf_h >>= sh_h; -+ bsf_v >>= sh_v; -+ break; -+ } -+ case 4: -+ bsf_h = *p; -+ bsf_v = *q; -+ *p = bsf0; -+ *q = bsf0; -+ break; -+ case 5: -+ bsf_h = *(uint16_t *)p; -+ bsf_v = *(uint16_t *)q; -+ *(uint16_t *)p = bsf0; -+ *(uint16_t *)q = bsf0; -+ break; -+ case 6: -+ default: -+ bsf_h = *(uint32_t *)p; -+ bsf_v = *(uint32_t *)q; -+ *(uint32_t *)p = bsf0; -+ *(uint32_t *)q = bsf0; -+ break; -+ } -+ -+ bsf_h |= bsf0; -+ bsf_v |= bsf0; -+ } -+ -+ // Do Horizontal -+ if ((y0 & 7) == 0) -+ { -+ // Boundary upper -+ if (y0 != 0 && -+ (off_boundary(y0, s->ps.sps->log2_ctb_size) || -+ (boundary_flags & (BOUNDARY_UPPER_SLICE | BOUNDARY_UPPER_TILE)) == 0)) -+ { -+ // Look at MVs (BS=1) if we don't already has a full set of bs bits -+ if ((~bsf_h & bsf_cbf) != 0 && (y0 == lc->cu.y || y0 == lc->cu.y_split)) -+ { -+ // If we aren't on the top boundary we must be in the middle -+ // and in that case we know where mvf can change -+ const unsigned int log2_rep = (y0 == lc->cu.y) ? log2_rep_min_pu : has_x_split ? 1 : 0; -+ const RefPicList *const rpl_top = !off_boundary(y0, s->ps.sps->log2_ctb_size) ? -+ s->rpl_up[x0 >> s->ps.sps->log2_ctb_size] : -+ rpl; -+ -+ bsf_h |= bsf_mv(s, 1 << log2_rep, trafo_size >> (2 + log2_rep), -+ trafo_size >> (log2_min_pu_size + log2_rep), -+ trafo_size >> (log2_min_pu_size + log2_rep), -+ rpl, rpl_top, -+ mvf_curr, mvf_ptr(s, lc, x0, y0, x0, y0 - 1)); -+ } -+ -+ // Finally put the results into bs -+ hbs_set(s, x0, y0, bsf_mask, bsf_h); -+ } -+ -+ // Max of 1 pu internal split - ignore if not on 8pel boundary -+ if (has_y_split && !off_boundary(lc->cu.y_split, 3)) -+ { -+ const HEVCRpiMvField * const mvf = mvf_stash_ptr(s, lc, x0, lc->cu.y_split); -+ // If we have the x split as well then it must be in the middle -+ const unsigned int log2_rep = has_x_split ? 1 : 0; -+ -+ hbs_set(s, x0, lc->cu.y_split, bsf_mask, -+ bsf_mv(s, 1 << log2_rep, trafo_size >> (2 + log2_rep), -+ trafo_size >> (log2_min_pu_size + log2_rep), -+ trafo_size >> (log2_min_pu_size + log2_rep), -+ rpl, rpl, -+ mvf, mvf - MVF_STASH_WIDTH_PU)); -+ } -+ } -+ -+ // And again for vertical - same logic as horizontal just in the other direction -+ if ((x0 & 7) == 0) -+ { -+ // Boundary left -+ if (x0 != 0 && -+ (off_boundary(x0, s->ps.sps->log2_ctb_size) || -+ (boundary_flags & (BOUNDARY_LEFT_SLICE | BOUNDARY_LEFT_TILE)) == 0)) -+ { -+ if ((~bsf_v & bsf_cbf) != 0 && (x0 == lc->cu.x || x0 == lc->cu.x_split)) -+ { -+ const unsigned int log2_rep = (x0 == lc->cu.x) ? log2_rep_min_pu : has_y_split ? 1 : 0; -+ const RefPicList *const rpl_left = !off_boundary(x0, s->ps.sps->log2_ctb_size) ? -+ s->rpl_left[y0 >> s->ps.sps->log2_ctb_size] : -+ rpl; -+ -+ bsf_v |= bsf_mv(s, 1 << log2_rep, trafo_size >> (2 + log2_rep), -+ (MVF_STASH_WIDTH_PU << log2_trafo_size) >> (log2_min_pu_size + log2_rep), -+ (mvf_left_stride(s, x0, x0 - 1) << log2_trafo_size) >> (log2_min_pu_size + log2_rep), -+ rpl, rpl_left, -+ mvf_curr, mvf_ptr(s, lc, x0, y0, x0 - 1, y0)); -+ } -+ -+ vbs_set(s, x0, y0, bsf_mask, bsf_v); -+ } -+ -+ if (has_x_split && !off_boundary(lc->cu.x_split, 3)) -+ { -+ const HEVCRpiMvField *const mvf = mvf_stash_ptr(s, lc, lc->cu.x_split, y0); -+ const unsigned int log2_rep = has_y_split ? 1 : 0; -+ -+ vbs_set(s, lc->cu.x_split, y0, bsf_mask, -+ bsf_mv(s, 1 << log2_rep, trafo_size >> (2 + log2_rep), -+ (MVF_STASH_WIDTH_PU << log2_trafo_size) >> (log2_min_pu_size + log2_rep), -+ (MVF_STASH_WIDTH_PU << log2_trafo_size) >> (log2_min_pu_size + log2_rep), -+ rpl, rpl, -+ mvf, mvf - 1)); -+ } -+ } -+} -+ -+#undef LUMA -+#undef CB -+#undef CR -+ -+static inline unsigned int ussub(const unsigned int a, const unsigned int b) -+{ -+ return a < b ? 0 : a - b; -+} -+ -+static inline int cache_boundry(const AVFrame * const frame, const unsigned int x) -+{ -+ return ((x >> av_rpi_sand_frame_xshl(frame)) & ~63) == 0; -+} -+ -+int ff_hevc_rpi_hls_filter_blk(const HEVCRpiContext * const s, const RpiBlk bounds, const int eot) -+{ -+ const int ctb_size = (1 << s->ps.sps->log2_ctb_size); -+ int x, y; -+ -+ const unsigned int br = bounds.x + bounds.w; -+ const unsigned int bb = bounds.y + bounds.h; -+ -+ const int x_end = (br >= s->ps.sps->width); -+ const int y_end = (bb >= s->ps.sps->height); -+ -+ // Deblock may not touch the edges of the bound as they are still needed -+ // for Intra pred -+ // -+ // Deblock is disabled with a per-slice flag -+ // Given that bounds may cover multiple slices & we dblock outside bounds -+ // anyway we can't avoid deblock using that flag - about the only thing we -+ // could do is have a "no deblock seen yet" flag but it doesn't really -+ // seem worth the effort -+ -+ deblock_y_blk(s, bounds, x_end, y_end); -+ deblock_uv_blk(s, bounds, x_end, y_end); -+ -+ // SAO needs -+ // (a) CTB alignment -+ // (b) Valid pixels all the way around the CTB in particular it needs the DR pixel -+ { -+ const unsigned int xo = bounds.x - ((bounds.x - 16) & ~(ctb_size - 1)); -+ const unsigned int yo = bounds.y - ((bounds.y - 16) & ~(ctb_size - 1)); -+ const unsigned int yt = ussub(bounds.y, yo); -+ const unsigned int yb = y_end ? bb : ussub(bb, yo); -+ const unsigned int xl = ussub(bounds.x, xo); -+ const unsigned int xr = x_end ? br : ussub(br, xo); -+ -+ if (s->ps.sps->sao_enabled) -+ { -+ for (y = yt; y < yb; y += ctb_size) { -+ for (x = xl; x < xr; x += ctb_size) { -+ sao_filter_CTB(s, x, y); -+ } -+ } -+ } -+ -+ // Cache invalidate -+ y = 0; -+ if (xr != 0 && yb != 0) -+ { -+ const unsigned int llen = -+ (av_rpi_sand_frame_stride1(s->frame) >> av_rpi_sand_frame_xshl(s->frame)); -+ const unsigned int mask = ~(llen - 1); -+ const unsigned int il = (xl == 0) ? 0 : (xl - 1) & mask; -+ const unsigned int ir = x_end || !cache_boundry(s->frame, br) ? br : (xr - 1) & mask; -+ const unsigned int it = ussub(yt, 1); -+ const unsigned int ib = y_end ? bb : yb - 1; -+ -+ if (il < ir) { -+ rpi_cache_buf_t cbuf; -+ rpi_cache_flush_env_t * const rfe = rpi_cache_flush_init(&cbuf); -+ rpi_cache_flush_add_frame_block(rfe, s->frame, RPI_CACHE_FLUSH_MODE_WB_INVALIDATE, -+ il, it, ir - il, ib - it, -+ ctx_vshift(s, 1), 1, 1); -+ -+ // If we have to commit the right hand tile boundry due to -+ // cache boundry considerations then at EoTile we must commit -+ // that boundry to bottom of tile (bounds) -+ if (ib != bb && ir == br && eot) { -+ rpi_cache_flush_add_frame_block(rfe, s->frame, RPI_CACHE_FLUSH_MODE_WB_INVALIDATE, -+ br - 1, ib, 1, bb - ib, -+ ctx_vshift(s, 1), 1, 1); -+ } -+ -+ rpi_cache_flush_finish(rfe); -+ -+ if (x_end) -+ y = y_end ? INT_MAX : ib; -+ -+// printf("Flush: %4d,%4d -> %4d,%4d: signal: %d\n", il, it, ir, ib, y - 1); -+ } -+ } -+ } -+ -+ return y; -+} -+ ---- /dev/null -+++ b/libavcodec/rpi_hevc_mv.h -@@ -0,0 +1,71 @@ -+#ifndef AVCODEC_RPI_HEVC_MV_H -+#define AVCODEC_RPI_HEVC_MV_H -+ -+#include "config.h" -+ -+typedef int32_t MvXY; -+ -+typedef struct HEVCRpiMvField { -+ MvXY xy[2]; -+ int8_t ref_idx[2]; -+ int8_t pred_flag; -+ int8_t dummy; // To 12 bytes -+} HEVCRpiMvField; -+ -+ -+#define MV_X(xy) (((xy) << 16) >> 16) -+#define MV_Y(xy) ((xy) >> 16) -+#define MV_XY(x, y) ((x & 0xffff) | ((y) << 16)) -+ -+#if ARCH_ARM -+#include "arm/rpi_hevc_mv_arm.h" -+#endif -+ -+#ifndef mvxy_add -+static inline MvXY mvxy_add(const MvXY a, const MvXY b) -+{ -+ return MV_XY(MV_X(a) + MV_X(b), MV_Y(a) + MV_Y(b)); -+} -+#endif -+ -+ -+#ifndef mv_scale_xy -+static inline MvXY mv_scale_xy(const MvXY const src, int td, int tb) -+{ -+ int tx, scale_factor; -+ -+ td = td == 0 ? 1 : av_clip_int8(td); -+ tb = av_clip_int8(tb); -+ tx = (0x4000 + (abs(td) >> 1)) / td; -+ scale_factor = av_clip_intp2((tb * tx + 32) >> 6, 12); -+ return MV_XY( -+ av_clip_int16((scale_factor * MV_X(src) + 127 + -+ (scale_factor * MV_X(src) < 0)) >> 8), -+ av_clip_int16((scale_factor * MV_Y(src) + 127 + -+ (scale_factor * MV_Y(src) < 0)) >> 8)); -+} -+#endif -+ -+// 8.3.1 states that the bitstream may not contain poc diffs that do not -+// fit in 16 bits, so given that we don't care about the high bits we only -+// store the low 16 + LT & Inter flags -+ -+#define COL_POC_INTRA 0 -+#define COL_POC_INTER (1 << 16) -+#define COL_POC_LT (1 << 17) -+#define COL_POC_DIFF(x,y) ((int16_t)((x) - (y))) -+#define COL_POC_MAKE_INTER(lt,poc) (COL_POC_INTER | ((lt) ? COL_POC_LT : 0) | ((poc) & 0xffff)) -+#define COL_POC_IS_LT(x) (((x) & COL_POC_LT) != 0) -+ -+typedef struct ColMv_s { -+ int32_t poc; -+ int32_t xy; -+} ColMv; -+ -+typedef struct ColMvField_s { -+ ColMv L[2]; -+} ColMvField; -+ -+ -+ -+#endif // AVCODEC_RPI_HEVC_MV_H ---- /dev/null -+++ b/libavcodec/rpi_hevc_mvs.c -@@ -0,0 +1,487 @@ -+/* -+ * HEVC video decoder -+ * -+ * Copyright (C) 2012 - 2013 Guillaume Martres -+ * Copyright (C) 2013 Anand Meher Kotra -+ * Copyright (C) 2018 John Cox for Raspberry Pi (Trading) -+ * -+ * This file is part of FFmpeg. -+ * -+ * FFmpeg is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * FFmpeg is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with FFmpeg; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+ */ -+ -+#include "hevc.h" -+#include "rpi_hevcdec.h" -+ -+static av_always_inline int -+is_eq_mer(const unsigned int plevel, -+ const unsigned int xN, const unsigned int yN, -+ const unsigned int xP, const unsigned int yP) -+{ -+ return (((xN ^ xP) | (yN ^ yP)) >> plevel) == 0; -+} -+ -+// check if the mv's and refidx are the same between A and B -+static av_always_inline int compare_mv_ref_idx(const HEVCRpiMvField * const a, const HEVCRpiMvField * const b) -+{ -+ return a->pred_flag == b->pred_flag && -+ ((a->pred_flag & PF_L0) == 0 || (a->ref_idx[0] == b->ref_idx[0] && a->xy[0] == b->xy[0])) && -+ ((a->pred_flag & PF_L1) == 0 || (a->ref_idx[1] == b->ref_idx[1] && a->xy[1] == b->xy[1])); -+ return 0; -+} -+ -+/* -+ * 8.5.3.1.7 temporal luma motion vector prediction -+ */ -+static int temporal_luma_motion_vector(const HEVCRpiContext * const s, -+ const HEVCRpiLocalContext * const lc, const int x0, const int y0, -+ const int nPbW, const int nPbH, const int refIdxLx, -+ MvXY * const mvLXCol, const int X) -+{ -+ int x, y; -+ const ColMv * cmv = NULL; -+ -+ HEVCRpiFrame * const col_ref = s->ref->collocated_ref; -+ const RefPicList * const refPicList = s->refPicList + X; -+ const int cur_lt = refPicList->isLongTerm[refIdxLx]; -+ -+ *mvLXCol = 0; -+ // Unlikely but we might have a col_ref IDR frame! -+ if (col_ref->col_mvf == NULL) -+ return 0; -+ -+ ff_hevc_rpi_progress_wait_mv(s, lc->jb0, col_ref, y0 + nPbH); -+ -+ //bottom right collocated motion vector -+ x = x0 + nPbW; -+ y = y0 + nPbH; -+ -+ if ((y0 >> s->ps.sps->log2_ctb_size) == (y >> s->ps.sps->log2_ctb_size) && -+ y < s->ps.sps->height && -+ x < s->ps.sps->width) -+ { -+ const ColMvField * const col = col_ref->col_mvf + (x >> 4) + -+ (y >> 4) * s->col_mvf_stride; -+ -+ if (col->L[0].poc != COL_POC_INTRA && -+ (col->L[1].poc == COL_POC_INTRA || -+ (s->no_backward_pred_flag ? s->sh.collocated_list == L1 : X == 0))) -+ { -+ cmv = col->L + 0; -+ } -+ else if (col->L[1].poc != COL_POC_INTRA) -+ { -+ cmv = col->L + 1; -+ } -+ } -+ -+ // derive center collocated motion vector -+ if (cmv == NULL || COL_POC_IS_LT(cmv->poc) != cur_lt) -+ { -+ cmv = NULL; -+ x = x0 + (nPbW >> 1); -+ y = y0 + (nPbH >> 1); -+ -+ { -+ const ColMvField * const col = col_ref->col_mvf + (x >> 4) + -+ (y >> 4) * s->col_mvf_stride; -+ -+ if (col->L[0].poc != COL_POC_INTRA && -+ (col->L[1].poc == COL_POC_INTRA || -+ (s->no_backward_pred_flag ? s->sh.collocated_list == L1 : X == 0))) -+ { -+ cmv = col->L + 0; -+ } -+ else if (col->L[1].poc != COL_POC_INTRA) -+ { -+ cmv = col->L + 1; -+ } -+ } -+ } -+ -+ if (cmv == NULL || cur_lt != COL_POC_IS_LT(cmv->poc)) -+ return 0; -+ -+ { -+ const int col_poc = col_ref->poc; -+ const int ref_poc = refPicList->list[refIdxLx]; -+ -+ *mvLXCol = (cur_lt || -+ cmv->poc == col_poc || -+ COL_POC_DIFF(col_poc, cmv->poc) == s->poc - ref_poc) ? -+ cmv->xy : -+ mv_scale_xy(cmv->xy, COL_POC_DIFF(col_poc, cmv->poc), s->poc - ref_poc); -+ } -+ -+ return cmv != NULL; -+} -+ -+static inline int mvf_eq(const HEVCRpiMvField * const a, const HEVCRpiMvField * const b) -+{ -+ return b != NULL && compare_mv_ref_idx(a, b); -+} -+ -+ -+ -+/* -+ * 8.5.3.1.2 Derivation process for spatial merging candidates -+ */ -+static inline const HEVCRpiMvField * -+derive_spatial_merge_candidates( -+ const HEVCRpiContext * const s, -+ const HEVCRpiLocalContext * const lc, -+ const unsigned int x0, const unsigned int y0, -+ const unsigned int nPbW, const unsigned int nPbH, -+ const unsigned int avail, -+ const unsigned int part_idx, -+ const unsigned int merge_idx, -+ HEVCRpiMvField * const mvf_t) -+{ -+ const unsigned int parts_a1 = (1 << PART_Nx2N) | (1 << PART_nLx2N) | (1 << PART_nRx2N); -+ const unsigned int parts_b1 = (1 << PART_2NxN) | (1<< PART_2NxnU) | (1 << PART_2NxnD); -+ -+ const HEVCRpiMvField * mvf_a1 = mvf_ptr(s, lc, x0, y0, x0 - 1, y0 + nPbH - 1); -+ const HEVCRpiMvField * mvf_a0 = mvf_a1 + mvf_left_stride(s, x0, x0 - 1); -+ const HEVCRpiMvField * mvf_b1 = mvf_ptr(s, lc, x0, y0, x0 + nPbW - 1, y0 - 1); -+ const HEVCRpiMvField * mvf_b0 = mvf_b1 + 1; -+ const unsigned int plevel = s->ps.pps->log2_parallel_merge_level; -+ const unsigned int part_mode = lc->cu.part_mode; -+ -+ const HEVCRpiMvField * perm[4]; -+ unsigned int nb_merge_cand = 0; -+ -+ // singleMCLFlag => part_idx == 0 so no need to test for it -+ if ((avail & AVAIL_L) == 0 || -+ (part_idx == 1 && -+ ((parts_a1 >> part_mode) & 1) != 0 || -+ is_eq_mer(plevel, x0 - 1, y0 + nPbH - 1, x0, y0)) || -+ mvf_a1->pred_flag == PF_INTRA) -+ { -+ mvf_a1 = NULL; -+ } -+ else -+ { -+ if (merge_idx == nb_merge_cand) -+ return mvf_a1; -+ perm[nb_merge_cand++] = mvf_a1; -+ } -+ -+ if ((avail & AVAIL_U) == 0 || -+ (part_idx == 1 && -+ ((parts_b1 >> part_mode) & 1) != 0 || -+ is_eq_mer(plevel, x0 + nPbW - 1, y0 - 1, x0, y0)) || -+ mvf_b1->pred_flag == PF_INTRA) -+ { -+ mvf_b1 = NULL; -+ } -+ else if (!mvf_eq(mvf_b1, mvf_a1)) -+ { -+ if (merge_idx == nb_merge_cand) -+ return mvf_b1; -+ perm[nb_merge_cand++] = mvf_b1; -+ } -+ -+ // above right spatial merge candidate -+ // Never need mvf_b0 again so don't bother zeroing if navail -+ if ((avail & AVAIL_UR) != 0 && -+ !is_eq_mer(plevel, x0 + nPbW, y0 - 1, x0, y0) && -+ mvf_b0->pred_flag != PF_INTRA && -+ !mvf_eq(mvf_b0, mvf_b1)) -+ { -+ if (merge_idx == nb_merge_cand) -+ return mvf_b0; -+ perm[nb_merge_cand++] = mvf_b0; -+ } -+ -+ // left bottom spatial merge candidate -+ // Never need mvf_a0 again so don't bother zeroing if navail -+ if ((avail & AVAIL_DL) != 0 && -+ !is_eq_mer(plevel, x0 - 1, y0 + nPbH, x0, y0) && -+ mvf_a0->pred_flag != PF_INTRA && -+ !mvf_eq(mvf_a0, mvf_a1)) -+ { -+ if (merge_idx == nb_merge_cand) -+ return mvf_a0; -+ perm[nb_merge_cand++] = mvf_a0; -+ } -+ -+ // above left spatial merge candidate -+ if (nb_merge_cand != 4 && -+ (avail & AVAIL_UL) != 0 && -+ !is_eq_mer(plevel, x0 - 1, y0 - 1, x0, y0)) -+ { -+ const HEVCRpiMvField * mvf_b2 = mvf_ptr(s, lc, x0, y0, x0 - 1, y0 - 1); // UL -+ -+ if (mvf_b2->pred_flag != PF_INTRA && -+ !mvf_eq(mvf_b2, mvf_a1) && -+ !mvf_eq(mvf_b2, mvf_b1)) -+ { -+ if (merge_idx == nb_merge_cand) -+ return mvf_b2; -+ perm[nb_merge_cand++] = mvf_b2; -+ } -+ } -+ -+ // temporal motion vector candidate -+ if (s->sh.slice_temporal_mvp_enabled_flag) -+ { -+ static const HEVCRpiMvField mvf_z = {{0}}; -+ -+ *mvf_t = mvf_z; -+ -+ if (temporal_luma_motion_vector(s, lc, x0, y0, nPbW, nPbH, -+ 0, mvf_t->xy + 0, 0)) -+ mvf_t->pred_flag = PF_L0; -+ -+ if (s->sh.slice_type == HEVC_SLICE_B && -+ temporal_luma_motion_vector(s, lc, x0, y0, nPbW, nPbH, -+ 0, mvf_t->xy + 1, 1)) -+ mvf_t->pred_flag |= PF_L1; -+ -+ if (mvf_t->pred_flag != 0) -+ { -+ if (merge_idx == nb_merge_cand) -+ return mvf_t; -+ perm[nb_merge_cand++] = mvf_t; -+ } -+ } -+ -+ // combined bi-predictive merge candidates (applies for B slices) -+ if (s->sh.slice_type == HEVC_SLICE_B && nb_merge_cand > 1) -+ { -+ unsigned int comb_idx = 0; -+ const unsigned int cand_count = nb_merge_cand * (nb_merge_cand - 1); -+ const RefPicList * const refPicList = s->refPicList; -+ -+ for (comb_idx = 0; comb_idx < cand_count; comb_idx++) -+ { -+ static const uint8_t l0_l1_cand_idx[12][2] = { -+ { 0, 1, }, -+ { 1, 0, }, -+ { 0, 2, }, -+ { 2, 0, }, -+ { 1, 2, }, -+ { 2, 1, }, -+ { 0, 3, }, -+ { 3, 0, }, -+ { 1, 3, }, -+ { 3, 1, }, -+ { 2, 3, }, -+ { 3, 2, }, -+ }; -+ -+ const unsigned int l0_cand_idx = l0_l1_cand_idx[comb_idx][0]; -+ const unsigned int l1_cand_idx = l0_l1_cand_idx[comb_idx][1]; -+ const HEVCRpiMvField * const mvf_c0 = perm[l0_cand_idx]; -+ const HEVCRpiMvField * const mvf_c1 = perm[l1_cand_idx]; -+ -+ if ((mvf_c0->pred_flag & PF_L0) != 0 && -+ (mvf_c1->pred_flag & PF_L1) != 0 && -+ (refPicList[0].list[mvf_c0->ref_idx[0]] != refPicList[1].list[mvf_c1->ref_idx[1]] || -+ mvf_c0->xy[0] != mvf_c1->xy[1])) -+ { -+ if (merge_idx == nb_merge_cand++) -+ { -+ // Need to be a bit careful as we will construct mvf_t and we -+ // may already be using that as one of our condidates -+ // so build & copy rather than build in place -+ const HEVCRpiMvField mvf_m = { -+ .xy = { -+ mvf_c0->xy[0], -+ mvf_c1->xy[1]}, -+ .ref_idx = { -+ mvf_c0->ref_idx[0], -+ mvf_c1->ref_idx[1]}, -+ .pred_flag = PF_BI -+ }; -+ *mvf_t = mvf_m; -+ return mvf_t; -+ } -+ } -+ } -+ } -+ -+ // "append" Zero motion vector candidates -+ { -+ const unsigned int nb_refs = (s->sh.slice_type == HEVC_SLICE_B) ? -+ FFMIN(s->sh.nb_refs[0], s->sh.nb_refs[1]) : s->sh.nb_refs[0]; -+ const unsigned int zero_idx = merge_idx - nb_merge_cand; -+ -+ const HEVCRpiMvField mvf_m = { -+ .xy = {0, 0}, -+ .ref_idx = { -+ zero_idx < nb_refs ? zero_idx : 0, -+ (s->sh.slice_type == HEVC_SLICE_B && zero_idx < nb_refs) ? zero_idx : 0}, -+ .pred_flag = (s->sh.slice_type == HEVC_SLICE_B) ? PF_BI : PF_L0 -+ }; -+ -+ *mvf_t = mvf_m; -+ return mvf_t; -+ } -+} -+ -+ -+// 8.5.3.1.1 Derivation process of luma Mvs for merge mode -+void ff_hevc_rpi_luma_mv_merge_mode(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc, int x0, int y0, int nPbW, -+ int nPbH, int log2_cb_size, int part_idx, -+ int merge_idx, HEVCRpiMvField * const mv) -+{ -+ const HEVCRpiMvField * mvf_m = (s->ps.pps->log2_parallel_merge_level > 2 && log2_cb_size == 3) ? -+ derive_spatial_merge_candidates(s, lc, lc->cu.x, lc->cu.y, 8, 8, -+ ff_hevc_rpi_tb_avail_flags(s, lc, lc->cu.x, lc->cu.y, 8, 8), -+ 0, merge_idx, mv) : -+ derive_spatial_merge_candidates(s, lc, x0, y0, nPbW, nPbH, -+ ff_hevc_rpi_tb_avail_flags(s, lc, x0, y0, nPbW, nPbH), -+ part_idx, merge_idx, mv); -+ -+ if (mvf_m != mv) -+ *mv = *mvf_m; -+ -+ if (mv->pred_flag == PF_BI && (nPbW + nPbH) == 12) -+ mv->pred_flag = PF_L0; -+} -+ -+ -+static av_always_inline const MvXY * -+mvf_same_poc(const RefPicList * const rpl, const unsigned int pfi0, const unsigned int pfi1, const int poc0, const HEVCRpiMvField * const mvf) -+{ -+ if (mvf != NULL) -+ { -+ if (((mvf->pred_flag >> pfi0) & 1) != 0 && rpl[pfi0].list[mvf->ref_idx[pfi0]] == poc0) -+ return mvf->xy + pfi0; -+ if (((mvf->pred_flag >> pfi1) & 1) != 0 && rpl[pfi1].list[mvf->ref_idx[pfi1]] == poc0) -+ return mvf->xy + pfi1; -+ } -+ return NULL; -+} -+ -+static av_always_inline const MvXY * -+mvf_other_poc(const RefPicList * const rpl, const unsigned int pfi0, const unsigned int pfi1, -+ const int islt0, const int poc0, const int poc_cur, -+ MvXY * const mv_t, const HEVCRpiMvField * const mvf) -+{ -+ if (mvf != NULL) -+ { -+ if (((mvf->pred_flag >> pfi0) & 1) != 0 && rpl[pfi0].isLongTerm[mvf->ref_idx[pfi0]] == islt0) -+ { -+ const int poc1 = rpl[pfi0].list[mvf->ref_idx[pfi0]]; -+ if (islt0 || poc1 == poc0) { -+ return mvf->xy + pfi0; -+ } -+ *mv_t = mv_scale_xy(mvf->xy[pfi0], poc_cur - poc1, poc_cur - poc0); -+ return mv_t; -+ } -+ if (((mvf->pred_flag >> pfi1) & 1) != 0 && rpl[pfi1].isLongTerm[mvf->ref_idx[pfi1]] == islt0) -+ { -+ const int poc1 = rpl[pfi1].list[mvf->ref_idx[pfi1]]; -+ if (islt0 || poc1 == poc0) { -+ return mvf->xy + pfi1; -+ } -+ *mv_t = mv_scale_xy(mvf->xy[pfi1], poc_cur - poc1, poc_cur - poc0); -+ return mv_t; -+ } -+ } -+ return NULL; -+} -+ -+void ff_hevc_rpi_luma_mv_mvp_mode(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc, -+ const unsigned int x0, const unsigned int y0, -+ const unsigned int nPbW, const unsigned int nPbH, -+ const unsigned int avail, -+ HEVCRpiMvField * const mv, -+ const unsigned int mvp_lx_flag, const unsigned int LX) -+{ -+ const unsigned int pfi0 = LX; -+ const unsigned int pfi1 = LX == 0 ? 1 : 0; -+ const RefPicList * const rpl = s->refPicList; -+ const int poc0 = rpl[LX].list[mv->ref_idx[LX]]; -+ const int poc_cur = s->poc; -+ const int islt0 = rpl[LX].isLongTerm[mv->ref_idx[LX]]; -+ -+ const HEVCRpiMvField * mvf_a1 = mvf_ptr(s, lc, x0, y0, x0 - 1, y0 + nPbH - 1); -+ const HEVCRpiMvField * mvf_a0 = mvf_a1 + mvf_left_stride(s, x0, x0 - 1); -+ const HEVCRpiMvField * mvf_b2 = mvf_ptr(s, lc, x0, y0, x0 - 1, y0 - 1); // UL -+ const HEVCRpiMvField * mvf_b1 = mvf_ptr(s, lc, x0, y0, x0 + nPbW - 1, y0 - 1); -+ const HEVCRpiMvField * mvf_b0 = mvf_b1 + 1; -+ const MvXY * mva = NULL; -+ const MvXY * mvb; -+ MvXY * const mv_rv = mv->xy + LX; -+ MvXY mvt_a, mvt_b; -+ -+ *mv_rv = 0; -+ -+ if ((avail & AVAIL_DL) == 0 || mvf_a0->pred_flag == PF_INTRA) -+ mvf_a0 = NULL; -+ else if ((mva = mvf_same_poc(rpl, pfi0, pfi1, poc0, mvf_a0)) != NULL && mvp_lx_flag == 0) -+ goto use_mva; -+ -+ if ((avail & AVAIL_L) == 0 || mvf_a1->pred_flag == PF_INTRA) -+ mvf_a1 = NULL; -+ -+ if (mva == NULL && -+ (mva = mvf_same_poc(rpl, pfi0, pfi1, poc0, mvf_a1)) == NULL && -+ (mva = mvf_other_poc(rpl, pfi0, pfi1, islt0, poc0, poc_cur, &mvt_a, mvf_a0)) == NULL) -+ mva = mvf_other_poc(rpl, pfi0, pfi1, islt0, poc0, poc_cur, &mvt_a, mvf_a1); -+ -+ if (mvp_lx_flag == 0 && mva != NULL) -+ goto use_mva; -+ -+ if ((avail & AVAIL_UR) == 0 || mvf_b0->pred_flag == PF_INTRA) -+ mvf_b0 = NULL; -+ if ((avail & AVAIL_U) == 0 || mvf_b1->pred_flag == PF_INTRA) -+ mvf_b1 = NULL; -+ if ((avail & AVAIL_UL) == 0 || mvf_b2->pred_flag == PF_INTRA) -+ mvf_b2 = NULL; -+ -+ if ((mvb = mvf_same_poc(rpl, pfi0, pfi1, poc0, mvf_b0)) == NULL && -+ (mvb = mvf_same_poc(rpl, pfi0, pfi1, poc0, mvf_b1)) == NULL) -+ mvb = mvf_same_poc(rpl, pfi0, pfi1, poc0, mvf_b2); -+ -+ if (mvf_a0 == NULL && mvf_a1 == NULL) { -+ mva = mvb; -+ if (mvp_lx_flag == 0 && mva != NULL) -+ goto use_mva; -+ -+ if ((mvb = mvf_other_poc(rpl, pfi0, pfi1, islt0, poc0, poc_cur, &mvt_b, mvf_b0)) == NULL && -+ (mvb = mvf_other_poc(rpl, pfi0, pfi1, islt0, poc0, poc_cur, &mvt_b, mvf_b1)) == NULL) -+ mvb = mvf_other_poc(rpl, pfi0, pfi1, islt0, poc0, poc_cur, &mvt_b, mvf_b2); -+ } -+ -+ if (mva == NULL) { -+ mva = mvb; -+ mvb = NULL; -+ } -+ -+ if (mvb != NULL && *mva == *mvb) // If A == B then ignore B -+ mvb = NULL; -+ -+ if (mvp_lx_flag == 0 && mva != NULL) { -+ goto use_mva; -+ } -+ else if (mvp_lx_flag != 0 && mvb != NULL) { -+ *mv_rv = *mvb; -+ } -+ else if (s->sh.slice_temporal_mvp_enabled_flag && ((mvp_lx_flag == 0 && mva == NULL) || (mvp_lx_flag != 0 && mva != NULL))) { -+ temporal_luma_motion_vector(s, lc, x0, y0, nPbW, -+ nPbH, mv->ref_idx[LX], -+ mv_rv, LX); -+ } -+ return; -+ -+use_mva: -+ *mv_rv = *mva; -+ return; -+} -+ ---- /dev/null -+++ b/libavcodec/rpi_hevc_parse.c -@@ -0,0 +1,143 @@ -+/* -+ * This file is part of FFmpeg. -+ * -+ * FFmpeg is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * FFmpeg is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with FFmpeg; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+ */ -+ -+#include "bytestream.h" -+#include "h2645_parse.h" -+#include "hevc.h" -+#include "rpi_hevc_parse.h" -+ -+static int hevc_decode_nal_units(const uint8_t *buf, int buf_size, HEVCRpiParamSets *ps, -+ HEVCSEIContext *sei, int is_nalff, int nal_length_size, -+ int err_recognition, int apply_defdispwin, void *logctx) -+{ -+ int i; -+ int ret = 0; -+ H2645Packet pkt = { 0 }; -+ -+ ret = ff_h2645_packet_split(&pkt, buf, buf_size, logctx, is_nalff, -+ nal_length_size, AV_CODEC_ID_HEVC, 1, 0); -+ if (ret < 0) { -+ goto done; -+ } -+ -+ for (i = 0; i < pkt.nb_nals; i++) { -+ H2645NAL *nal = &pkt.nals[i]; -+ -+ /* ignore everything except parameter sets and VCL NALUs */ -+ switch (nal->type) { -+ case HEVC_NAL_VPS: -+ ret = ff_hevc_rpi_decode_nal_vps(&nal->gb, logctx, ps); -+ if (ret < 0) -+ goto done; -+ break; -+ case HEVC_NAL_SPS: -+ ret = ff_hevc_rpi_decode_nal_sps(&nal->gb, logctx, ps, apply_defdispwin); -+ if (ret < 0) -+ goto done; -+ break; -+ case HEVC_NAL_PPS: -+ ret = ff_hevc_rpi_decode_nal_pps(&nal->gb, logctx, ps); -+ if (ret < 0) -+ goto done; -+ break; -+ case HEVC_NAL_SEI_PREFIX: -+ case HEVC_NAL_SEI_SUFFIX: -+ ret = ff_hevc_rpi_decode_nal_sei(&nal->gb, logctx, sei, ps, nal->type); -+ if (ret < 0) -+ goto done; -+ break; -+ default: -+ av_log(logctx, AV_LOG_VERBOSE, "Ignoring NAL type %d in extradata\n", nal->type); -+ break; -+ } -+ } -+ -+done: -+ ff_h2645_packet_uninit(&pkt); -+ if (err_recognition & AV_EF_EXPLODE) -+ return ret; -+ -+ return 0; -+} -+ -+int ff_hevc_rpi_decode_extradata(const uint8_t *data, int size, HEVCRpiParamSets *ps, -+ HEVCSEIContext *sei, int *is_nalff, int *nal_length_size, -+ int err_recognition, int apply_defdispwin, void *logctx) -+{ -+ int ret = 0; -+ GetByteContext gb; -+ -+ bytestream2_init(&gb, data, size); -+ -+ if (size > 3 && (data[0] || data[1] || data[2] > 1)) { -+ /* It seems the extradata is encoded as hvcC format. -+ * Temporarily, we support configurationVersion==0 until 14496-15 3rd -+ * is finalized. When finalized, configurationVersion will be 1 and we -+ * can recognize hvcC by checking if avctx->extradata[0]==1 or not. */ -+ int i, j, num_arrays, nal_len_size; -+ -+ *is_nalff = 1; -+ -+ bytestream2_skip(&gb, 21); -+ nal_len_size = (bytestream2_get_byte(&gb) & 3) + 1; -+ num_arrays = bytestream2_get_byte(&gb); -+ -+ /* nal units in the hvcC always have length coded with 2 bytes, -+ * so put a fake nal_length_size = 2 while parsing them */ -+ *nal_length_size = 2; -+ -+ /* Decode nal units from hvcC. */ -+ for (i = 0; i < num_arrays; i++) { -+ int type = bytestream2_get_byte(&gb) & 0x3f; -+ int cnt = bytestream2_get_be16(&gb); -+ -+ for (j = 0; j < cnt; j++) { -+ // +2 for the nal size field -+ int nalsize = bytestream2_peek_be16(&gb) + 2; -+ if (bytestream2_get_bytes_left(&gb) < nalsize) { -+ av_log(logctx, AV_LOG_ERROR, -+ "Invalid NAL unit size in extradata.\n"); -+ return AVERROR_INVALIDDATA; -+ } -+ -+ ret = hevc_decode_nal_units(gb.buffer, nalsize, ps, sei, *is_nalff, -+ *nal_length_size, err_recognition, apply_defdispwin, -+ logctx); -+ if (ret < 0) { -+ av_log(logctx, AV_LOG_ERROR, -+ "Decoding nal unit %d %d from hvcC failed\n", -+ type, i); -+ return ret; -+ } -+ bytestream2_skip(&gb, nalsize); -+ } -+ } -+ -+ /* Now store right nal length size, that will be used to parse -+ * all other nals */ -+ *nal_length_size = nal_len_size; -+ } else { -+ *is_nalff = 0; -+ ret = hevc_decode_nal_units(data, size, ps, sei, *is_nalff, *nal_length_size, -+ err_recognition, apply_defdispwin, logctx); -+ if (ret < 0) -+ return ret; -+ } -+ -+ return ret; -+} ---- /dev/null -+++ b/libavcodec/rpi_hevc_parse.h -@@ -0,0 +1,36 @@ -+/* -+ * This file is part of FFmpeg. -+ * -+ * FFmpeg is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * FFmpeg is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with FFmpeg; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+ */ -+ -+/** -+ * @file -+ * H.265 parser code -+ */ -+ -+#ifndef AVCODEC_RPI_HEVC_PARSE_H -+#define AVCODEC_RPI_HEVC_PARSE_H -+ -+#include -+ -+#include "rpi_hevc_ps.h" -+#include "rpi_hevc_sei.h" -+ -+int ff_hevc_rpi_decode_extradata(const uint8_t *data, int size, HEVCRpiParamSets *ps, -+ HEVCSEIContext *sei, int *is_nalff, int *nal_length_size, -+ int err_recognition, int apply_defdispwin, void *logctx); -+ -+#endif /* AVCODEC_RPI_HEVC_PARSE_H */ ---- /dev/null -+++ b/libavcodec/rpi_hevc_ps.c -@@ -0,0 +1,1938 @@ -+/* -+ * HEVC Parameter Set decoding -+ * -+ * Copyright (C) 2012 - 2103 Guillaume Martres -+ * Copyright (C) 2012 - 2103 Mickael Raulet -+ * Copyright (C) 2012 - 2013 Gildas Cocherel -+ * Copyright (C) 2013 Vittorio Giovara -+ * Copyright (C) 2018 John Cox for Raspberry Pi (Trading) -+ * -+ * This file is part of FFmpeg. -+ * -+ * FFmpeg is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * FFmpeg is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with FFmpeg; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+ */ -+ -+#include "libavutil/imgutils.h" -+#include "golomb.h" -+#include "rpi_hevc_data.h" -+#include "rpi_hevc_ps.h" -+#include "rpi_hevcdec.h" -+ -+static const uint8_t default_scaling_list_intra[] = { -+ 16, 16, 16, 16, 17, 18, 21, 24, -+ 16, 16, 16, 16, 17, 19, 22, 25, -+ 16, 16, 17, 18, 20, 22, 25, 29, -+ 16, 16, 18, 21, 24, 27, 31, 36, -+ 17, 17, 20, 24, 30, 35, 41, 47, -+ 18, 19, 22, 27, 35, 44, 54, 65, -+ 21, 22, 25, 31, 41, 54, 70, 88, -+ 24, 25, 29, 36, 47, 65, 88, 115 -+}; -+ -+static const uint8_t default_scaling_list_inter[] = { -+ 16, 16, 16, 16, 17, 18, 20, 24, -+ 16, 16, 16, 17, 18, 20, 24, 25, -+ 16, 16, 17, 18, 20, 24, 25, 28, -+ 16, 17, 18, 20, 24, 25, 28, 33, -+ 17, 18, 20, 24, 25, 28, 33, 41, -+ 18, 20, 24, 25, 28, 33, 41, 54, -+ 20, 24, 25, 28, 33, 41, 54, 71, -+ 24, 25, 28, 33, 41, 54, 71, 91 -+}; -+ -+static const AVRational vui_sar[] = { -+ { 0, 1 }, -+ { 1, 1 }, -+ { 12, 11 }, -+ { 10, 11 }, -+ { 16, 11 }, -+ { 40, 33 }, -+ { 24, 11 }, -+ { 20, 11 }, -+ { 32, 11 }, -+ { 80, 33 }, -+ { 18, 11 }, -+ { 15, 11 }, -+ { 64, 33 }, -+ { 160, 99 }, -+ { 4, 3 }, -+ { 3, 2 }, -+ { 2, 1 }, -+}; -+ -+ -+// pps_cb_qp_offset: -12,+12 -+// slice_cb_qp_offset: -12,+12 also -+// "The value of pps_cb_qp_offset + slice_cb_qp_offset shall be in the range of -12 to +12, inclusive." -+// cr_qp_offset_list[n]: -12,+12 -+// So worst case total offset: -24,+24 -+ -+#define T(n) ((((48+(n))/6-10)<<3) | (48+(n))%6) -+#define C(B,n) T(B*6+(n) < 0 ? -B*6 : (n) > 51 ? 51 : (n)) -+#define M(B,n) C(B,(-n)) -+ -+// Sizeof the QP_START_BLOCK -+#define QP_OFFSET_0 (8*6 + 12*2) -+#define QP_START(B) \ -+ M(B,48), M(B,48), M(B,48), M(B,48), M(B,48), M(B,48),\ -+ M(B,48), M(B,48), M(B,48), M(B,48), M(B,48), M(B,48),\ -+ M(B,48), M(B,48), M(B,48), M(B,48), M(B,48), M(B,48),\ -+ M(B,48), M(B,48), M(B,48), M(B,48), M(B,48), M(B,48),\ -+\ -+ M(B,48), M(B,47), M(B,46), M(B,45), M(B,44), M(B,43),\ -+ M(B,42), M(B,41), M(B,40), M(B,39), M(B,38), M(B,37),\ -+ M(B,36), M(B,35), M(B,34), M(B,33), M(B,32), M(B,31),\ -+ M(B,30), M(B,29), M(B,28), M(B,27), M(B,26), M(B,25),\ -+ M(B,24), M(B,23), M(B,22), M(B,21), M(B,20), M(B,19),\ -+ M(B,18), M(B,17), M(B,16), M(B,15), M(B,14), M(B,13),\ -+ M(B,12), M(B,11), M(B,10), M(B, 9), M(B, 8), M(B, 7),\ -+ M(B, 6), M(B, 5), M(B, 4), M(B, 3), M(B, 2), M(B, 1) -+#define QP_END(B) \ -+ C(B,51), C(B,51), C(B,51), C(B,51), C(B,51), C(B,51),\ -+ C(B,51), C(B,51), C(B,51), C(B,51), C(B,51), C(B,51),\ -+ C(B,51), C(B,51), C(B,51), C(B,51), C(B,51), C(B,51) -+ -+#define T1(B)\ -+{\ -+ QP_START(B),\ -+ C(B, 0), C(B, 1), C(B, 2), C(B, 3), C(B, 4), C(B, 5), C(B, 6), C(B, 7), C(B, 8), C(B, 9),\ -+ C(B,10), C(B,11), C(B,12), C(B,13), C(B,14), C(B,15), C(B,16), C(B,17), C(B,18), C(B,19),\ -+ C(B,20), C(B,21), C(B,22), C(B,23), C(B,24), C(B,25), C(B,26), C(B,27), C(B,28), C(B,29),\ -+ C(B,29), C(B,30), C(B,31), C(B,32), C(B,33), C(B,33), C(B,34), C(B,34), C(B,35), C(B,35),\ -+ C(B,36), C(B,36), C(B,37), C(B,37), C(B,38), C(B,39), C(B,40), C(B,41), C(B,42), C(B,43),\ -+ C(B,44), C(B,45),\ -+ C(B,46), C(B,47), C(B,48), C(B,49), C(B,50), C(B,51),\ -+ QP_END(B)\ -+} -+#define T0(B)\ -+{\ -+ QP_START(B),\ -+ C(B, 0), C(B, 1), C(B, 2), C(B, 3), C(B, 4), C(B, 5), C(B, 6), C(B, 7), C(B, 8), C(B, 9),\ -+ C(B,10), C(B,11), C(B,12), C(B,13), C(B,14), C(B,15), C(B,16), C(B,17), C(B,18), C(B,19),\ -+ C(B,20), C(B,21), C(B,22), C(B,23), C(B,24), C(B,25), C(B,26), C(B,27), C(B,28), C(B,29),\ -+ C(B,30), C(B,31), C(B,32), C(B,33), C(B,34), C(B,35), C(B,36), C(B,37), C(B,38), C(B,39),\ -+ C(B,40), C(B,41), C(B,42), C(B,43), C(B,44), C(B,45), C(B,46), C(B,47), C(B,48), C(B,49),\ -+ C(B,50), C(B,51),\ -+ C(B,51), C(B,51), C(B,51), C(B,51), C(B,51), C(B,51),\ -+ QP_END(B)\ -+} -+ -+#define QP_TABLE_SIZE (QP_OFFSET_0 + 52 + 12*2) -+ -+static const int8_t qp_c_bd_0[8][QP_TABLE_SIZE] = {T0(0),T0(1),T0(2),T0(3),T0(4),T0(5),T0(6),T0(7)}; -+static const int8_t qp_c_bd_1[8][QP_TABLE_SIZE] = {T1(0),T1(1),T1(2),T1(3),T1(4),T1(5),T1(6),T1(7)}; -+ -+#undef T -+#undef C -+#undef QP_END -+ -+#define C(B,n) ((n)<0?0:(n)>51?51:(n)) -+// We do need a lot of -ve padding to cope with high bit depths that give -ve qps -+#define QP_DBLK_OFFSET_0 QP_OFFSET_0 -+#define QP_END(B)\ -+ 51, 51, 51, 51, 51, 51 -+ -+// These don't need all the padding we have here (12 top/bottom would be enough) -+static const uint8_t qp_c_dblk_0[] = T0(0); -+static const uint8_t qp_c_dblk_1[] = T1(0); -+ -+#undef T -+#undef M -+#undef C -+#undef QP_END -+#undef QP_START -+ -+ -+static void remove_pps(HEVCRpiParamSets * const s, const int id) -+{ -+ if (s->pps_list[id] && s->pps == (const HEVCRpiPPS*)s->pps_list[id]->data) -+ s->pps = NULL; -+ av_buffer_unref(&s->pps_list[id]); -+} -+ -+static void remove_sps(HEVCRpiParamSets * const s, const int id) -+{ -+ int i; -+ if (s->sps_list[id]) { -+ if (s->sps == (const HEVCRpiSPS*)s->sps_list[id]->data) -+ s->sps = NULL; -+ -+ /* drop all PPS that depend on this SPS */ -+ for (i = 0; i < FF_ARRAY_ELEMS(s->pps_list); i++) -+ if (s->pps_list[i] && ((HEVCRpiPPS*)s->pps_list[i]->data)->sps_id == id) -+ remove_pps(s, i); -+ -+ av_assert0(!(s->sps_list[id] && s->sps == (HEVCRpiSPS*)s->sps_list[id]->data)); -+ } -+ av_buffer_unref(&s->sps_list[id]); -+} -+ -+static void remove_vps(HEVCRpiParamSets * const s, const int id) -+{ -+ int i; -+ if (s->vps_list[id]) { -+ if (s->vps == (const HEVCRpiVPS*)s->vps_list[id]->data) -+ s->vps = NULL; -+ -+ for (i = 0; i < FF_ARRAY_ELEMS(s->sps_list); i++) -+ if (s->sps_list[i] && ((HEVCRpiSPS*)s->sps_list[i]->data)->vps_id == id) -+ remove_sps(s, i); -+ } -+ av_buffer_unref(&s->vps_list[id]); -+} -+ -+int ff_hevc_rpi_decode_short_term_rps(GetBitContext * const gb, AVCodecContext * const avctx, -+ ShortTermRPS * const rps, const HEVCRpiSPS * const sps, const int is_slice_header) -+{ -+ uint8_t rps_predict = 0; -+ int delta_poc; -+ int k0 = 0; -+ int k1 = 0; -+ int k = 0; -+ int i; -+ -+ if (rps != sps->st_rps && sps->nb_st_rps) -+ rps_predict = get_bits1(gb); -+ -+ if (rps_predict) { -+ const ShortTermRPS *rps_ridx; -+ int delta_rps; -+ unsigned abs_delta_rps; -+ uint8_t use_delta_flag = 0; -+ uint8_t delta_rps_sign; -+ -+ if (is_slice_header) { -+ unsigned int delta_idx = get_ue_golomb_long(gb) + 1; -+ if (delta_idx > sps->nb_st_rps) { -+ av_log(avctx, AV_LOG_ERROR, -+ "Invalid value of delta_idx in slice header RPS: %d > %d.\n", -+ delta_idx, sps->nb_st_rps); -+ return AVERROR_INVALIDDATA; -+ } -+ rps_ridx = &sps->st_rps[sps->nb_st_rps - delta_idx]; -+ rps->rps_idx_num_delta_pocs = rps_ridx->num_delta_pocs; -+ } else -+ rps_ridx = &sps->st_rps[rps - sps->st_rps - 1]; -+ -+ delta_rps_sign = get_bits1(gb); -+ abs_delta_rps = get_ue_golomb_long(gb) + 1; -+ if (abs_delta_rps < 1 || abs_delta_rps > 32768) { -+ av_log(avctx, AV_LOG_ERROR, -+ "Invalid value of abs_delta_rps: %d\n", -+ abs_delta_rps); -+ return AVERROR_INVALIDDATA; -+ } -+ delta_rps = (1 - (delta_rps_sign << 1)) * abs_delta_rps; -+ for (i = 0; i <= rps_ridx->num_delta_pocs; i++) { -+ int used = rps->used[k] = get_bits1(gb); -+ -+ if (!used) -+ use_delta_flag = get_bits1(gb); -+ -+ if (used || use_delta_flag) { -+ if (i < rps_ridx->num_delta_pocs) -+ delta_poc = delta_rps + rps_ridx->delta_poc[i]; -+ else -+ delta_poc = delta_rps; -+ rps->delta_poc[k] = delta_poc; -+ if (delta_poc < 0) -+ k0++; -+ else -+ k1++; -+ k++; -+ } -+ } -+ -+ if (k >= FF_ARRAY_ELEMS(rps->used)) { -+ av_log(avctx, AV_LOG_ERROR, -+ "Invalid num_delta_pocs: %d\n", k); -+ return AVERROR_INVALIDDATA; -+ } -+ -+ rps->num_delta_pocs = k; -+ rps->num_negative_pics = k0; -+ // sort in increasing order (smallest first) -+ if (rps->num_delta_pocs != 0) { -+ int used, tmp; -+ for (i = 1; i < rps->num_delta_pocs; i++) { -+ delta_poc = rps->delta_poc[i]; -+ used = rps->used[i]; -+ for (k = i - 1; k >= 0; k--) { -+ tmp = rps->delta_poc[k]; -+ if (delta_poc < tmp) { -+ rps->delta_poc[k + 1] = tmp; -+ rps->used[k + 1] = rps->used[k]; -+ rps->delta_poc[k] = delta_poc; -+ rps->used[k] = used; -+ } -+ } -+ } -+ } -+ if ((rps->num_negative_pics >> 1) != 0) { -+ int used; -+ k = rps->num_negative_pics - 1; -+ // flip the negative values to largest first -+ for (i = 0; i < rps->num_negative_pics >> 1; i++) { -+ delta_poc = rps->delta_poc[i]; -+ used = rps->used[i]; -+ rps->delta_poc[i] = rps->delta_poc[k]; -+ rps->used[i] = rps->used[k]; -+ rps->delta_poc[k] = delta_poc; -+ rps->used[k] = used; -+ k--; -+ } -+ } -+ } else { -+ unsigned int prev, nb_positive_pics; -+ rps->num_negative_pics = get_ue_golomb_long(gb); -+ nb_positive_pics = get_ue_golomb_long(gb); -+ -+ if (rps->num_negative_pics >= HEVC_MAX_REFS || -+ nb_positive_pics >= HEVC_MAX_REFS) { -+ av_log(avctx, AV_LOG_ERROR, "Too many refs in a short term RPS.\n"); -+ return AVERROR_INVALIDDATA; -+ } -+ -+ rps->num_delta_pocs = rps->num_negative_pics + nb_positive_pics; -+ if (rps->num_delta_pocs) { -+ prev = 0; -+ for (i = 0; i < rps->num_negative_pics; i++) { -+ delta_poc = get_ue_golomb_long(gb) + 1; -+ if (delta_poc < 1 || delta_poc > 32768) { -+ av_log(avctx, AV_LOG_ERROR, -+ "Invalid value of delta_poc: %d\n", -+ delta_poc); -+ return AVERROR_INVALIDDATA; -+ } -+ prev -= delta_poc; -+ rps->delta_poc[i] = prev; -+ rps->used[i] = get_bits1(gb); -+ } -+ prev = 0; -+ for (i = 0; i < nb_positive_pics; i++) { -+ delta_poc = get_ue_golomb_long(gb) + 1; -+ if (delta_poc < 1 || delta_poc > 32768) { -+ av_log(avctx, AV_LOG_ERROR, -+ "Invalid value of delta_poc: %d\n", -+ delta_poc); -+ return AVERROR_INVALIDDATA; -+ } -+ prev += delta_poc; -+ rps->delta_poc[rps->num_negative_pics + i] = prev; -+ rps->used[rps->num_negative_pics + i] = get_bits1(gb); -+ } -+ } -+ } -+ return 0; -+} -+ -+ -+static int decode_profile_tier_level(GetBitContext * const gb, AVCodecContext * const avctx, -+ PTLCommon * const ptl) -+{ -+ int i; -+ -+ if (get_bits_left(gb) < 2+1+5 + 32 + 4 + 16 + 16 + 12) -+ return -1; -+ -+ ptl->profile_space = get_bits(gb, 2); -+ ptl->tier_flag = get_bits1(gb); -+ ptl->profile_idc = get_bits(gb, 5); -+ if (ptl->profile_idc == FF_PROFILE_HEVC_MAIN) -+ av_log(avctx, AV_LOG_DEBUG, "Main profile bitstream\n"); -+ else if (ptl->profile_idc == FF_PROFILE_HEVC_MAIN_10) -+ av_log(avctx, AV_LOG_DEBUG, "Main 10 profile bitstream\n"); -+ else if (ptl->profile_idc == FF_PROFILE_HEVC_MAIN_STILL_PICTURE) -+ av_log(avctx, AV_LOG_DEBUG, "Main Still Picture profile bitstream\n"); -+ else if (ptl->profile_idc == FF_PROFILE_HEVC_REXT) -+ av_log(avctx, AV_LOG_DEBUG, "Range Extension profile bitstream\n"); -+ else -+ av_log(avctx, AV_LOG_WARNING, "Unknown HEVC profile: %d\n", ptl->profile_idc); -+ -+ for (i = 0; i < 32; i++) { -+ ptl->profile_compatibility_flag[i] = get_bits1(gb); -+ -+ if (ptl->profile_idc == 0 && i > 0 && ptl->profile_compatibility_flag[i]) -+ ptl->profile_idc = i; -+ } -+ ptl->progressive_source_flag = get_bits1(gb); -+ ptl->interlaced_source_flag = get_bits1(gb); -+ ptl->non_packed_constraint_flag = get_bits1(gb); -+ ptl->frame_only_constraint_flag = get_bits1(gb); -+ -+ skip_bits(gb, 16); // XXX_reserved_zero_44bits[0..15] -+ skip_bits(gb, 16); // XXX_reserved_zero_44bits[16..31] -+ skip_bits(gb, 12); // XXX_reserved_zero_44bits[32..43] -+ -+ return 0; -+} -+ -+static int parse_ptl(GetBitContext * const gb, AVCodecContext * const avctx, -+ PTL * const ptl, const int max_num_sub_layers) -+{ -+ int i; -+ if (decode_profile_tier_level(gb, avctx, &ptl->general_ptl) < 0 || -+ get_bits_left(gb) < 8 + (8*2 * (max_num_sub_layers - 1 > 0))) { -+ av_log(avctx, AV_LOG_ERROR, "PTL information too short\n"); -+ return -1; -+ } -+ -+ ptl->general_ptl.level_idc = get_bits(gb, 8); -+ -+ for (i = 0; i < max_num_sub_layers - 1; i++) { -+ ptl->sub_layer_profile_present_flag[i] = get_bits1(gb); -+ ptl->sub_layer_level_present_flag[i] = get_bits1(gb); -+ } -+ -+ if (max_num_sub_layers - 1> 0) -+ for (i = max_num_sub_layers - 1; i < 8; i++) -+ skip_bits(gb, 2); // reserved_zero_2bits[i] -+ for (i = 0; i < max_num_sub_layers - 1; i++) { -+ if (ptl->sub_layer_profile_present_flag[i] && -+ decode_profile_tier_level(gb, avctx, &ptl->sub_layer_ptl[i]) < 0) { -+ av_log(avctx, AV_LOG_ERROR, -+ "PTL information for sublayer %i too short\n", i); -+ return -1; -+ } -+ if (ptl->sub_layer_level_present_flag[i]) { -+ if (get_bits_left(gb) < 8) { -+ av_log(avctx, AV_LOG_ERROR, -+ "Not enough data for sublayer %i level_idc\n", i); -+ return -1; -+ } else -+ ptl->sub_layer_ptl[i].level_idc = get_bits(gb, 8); -+ } -+ } -+ -+ return 0; -+} -+ -+static void decode_sublayer_hrd(GetBitContext * const gb, const unsigned int nb_cpb, -+ const int subpic_params_present) -+{ -+ int i; -+ -+ for (i = 0; i < nb_cpb; i++) { -+ get_ue_golomb_long(gb); // bit_rate_value_minus1 -+ get_ue_golomb_long(gb); // cpb_size_value_minus1 -+ -+ if (subpic_params_present) { -+ get_ue_golomb_long(gb); // cpb_size_du_value_minus1 -+ get_ue_golomb_long(gb); // bit_rate_du_value_minus1 -+ } -+ skip_bits1(gb); // cbr_flag -+ } -+} -+ -+static int decode_hrd(GetBitContext * const gb, const int common_inf_present, -+ const int max_sublayers) -+{ -+ int nal_params_present = 0, vcl_params_present = 0; -+ int subpic_params_present = 0; -+ int i; -+ -+ if (common_inf_present) { -+ nal_params_present = get_bits1(gb); -+ vcl_params_present = get_bits1(gb); -+ -+ if (nal_params_present || vcl_params_present) { -+ subpic_params_present = get_bits1(gb); -+ -+ if (subpic_params_present) { -+ skip_bits(gb, 8); // tick_divisor_minus2 -+ skip_bits(gb, 5); // du_cpb_removal_delay_increment_length_minus1 -+ skip_bits(gb, 1); // sub_pic_cpb_params_in_pic_timing_sei_flag -+ skip_bits(gb, 5); // dpb_output_delay_du_length_minus1 -+ } -+ -+ skip_bits(gb, 4); // bit_rate_scale -+ skip_bits(gb, 4); // cpb_size_scale -+ -+ if (subpic_params_present) -+ skip_bits(gb, 4); // cpb_size_du_scale -+ -+ skip_bits(gb, 5); // initial_cpb_removal_delay_length_minus1 -+ skip_bits(gb, 5); // au_cpb_removal_delay_length_minus1 -+ skip_bits(gb, 5); // dpb_output_delay_length_minus1 -+ } -+ } -+ -+ for (i = 0; i < max_sublayers; i++) { -+ int low_delay = 0; -+ unsigned int nb_cpb = 1; -+ int fixed_rate = get_bits1(gb); -+ -+ if (!fixed_rate) -+ fixed_rate = get_bits1(gb); -+ -+ if (fixed_rate) -+ get_ue_golomb_long(gb); // elemental_duration_in_tc_minus1 -+ else -+ low_delay = get_bits1(gb); -+ -+ if (!low_delay) { -+ nb_cpb = get_ue_golomb_long(gb) + 1; -+ if (nb_cpb < 1 || nb_cpb > 32) { -+ av_log(NULL, AV_LOG_ERROR, "nb_cpb %d invalid\n", nb_cpb); -+ return AVERROR_INVALIDDATA; -+ } -+ } -+ -+ if (nal_params_present) -+ decode_sublayer_hrd(gb, nb_cpb, subpic_params_present); -+ if (vcl_params_present) -+ decode_sublayer_hrd(gb, nb_cpb, subpic_params_present); -+ } -+ return 0; -+} -+ -+int ff_hevc_rpi_decode_nal_vps(GetBitContext * const gb, AVCodecContext * const avctx, -+ HEVCRpiParamSets * const ps) -+{ -+ int i,j; -+ int vps_id = 0; -+ ptrdiff_t nal_size; -+ HEVCRpiVPS *vps; -+ AVBufferRef *vps_buf = av_buffer_allocz(sizeof(*vps)); -+ -+ if (!vps_buf) -+ return AVERROR(ENOMEM); -+ vps = (HEVCRpiVPS*)vps_buf->data; -+ -+ av_log(avctx, AV_LOG_DEBUG, "Decoding VPS\n"); -+ -+ nal_size = gb->buffer_end - gb->buffer; -+ if (nal_size > sizeof(vps->data)) { -+ av_log(avctx, AV_LOG_WARNING, "Truncating likely oversized VPS " -+ "(%"PTRDIFF_SPECIFIER" > %"SIZE_SPECIFIER")\n", -+ nal_size, sizeof(vps->data)); -+ vps->data_size = sizeof(vps->data); -+ } else { -+ vps->data_size = nal_size; -+ } -+ memcpy(vps->data, gb->buffer, vps->data_size); -+ -+ vps_id = get_bits(gb, 4); -+ if (vps_id >= HEVC_MAX_VPS_COUNT) { -+ av_log(avctx, AV_LOG_ERROR, "VPS id out of range: %d\n", vps_id); -+ goto err; -+ } -+ -+ if (get_bits(gb, 2) != 3) { // vps_reserved_three_2bits -+ av_log(avctx, AV_LOG_ERROR, "vps_reserved_three_2bits is not three\n"); -+ goto err; -+ } -+ -+ vps->vps_max_layers = get_bits(gb, 6) + 1; -+ vps->vps_max_sub_layers = get_bits(gb, 3) + 1; -+ vps->vps_temporal_id_nesting_flag = get_bits1(gb); -+ -+ if (get_bits(gb, 16) != 0xffff) { // vps_reserved_ffff_16bits -+ av_log(avctx, AV_LOG_ERROR, "vps_reserved_ffff_16bits is not 0xffff\n"); -+ goto err; -+ } -+ -+ if (vps->vps_max_sub_layers > HEVC_MAX_SUB_LAYERS) { -+ av_log(avctx, AV_LOG_ERROR, "vps_max_sub_layers out of range: %d\n", -+ vps->vps_max_sub_layers); -+ goto err; -+ } -+ -+ if (parse_ptl(gb, avctx, &vps->ptl, vps->vps_max_sub_layers) < 0) -+ goto err; -+ -+ vps->vps_sub_layer_ordering_info_present_flag = get_bits1(gb); -+ -+ i = vps->vps_sub_layer_ordering_info_present_flag ? 0 : vps->vps_max_sub_layers - 1; -+ for (; i < vps->vps_max_sub_layers; i++) { -+ vps->vps_max_dec_pic_buffering[i] = get_ue_golomb_long(gb) + 1; -+ vps->vps_num_reorder_pics[i] = get_ue_golomb_long(gb); -+ vps->vps_max_latency_increase[i] = get_ue_golomb_long(gb) - 1; -+ -+ if (vps->vps_max_dec_pic_buffering[i] > HEVC_MAX_DPB_SIZE || !vps->vps_max_dec_pic_buffering[i]) { -+ av_log(avctx, AV_LOG_ERROR, "vps_max_dec_pic_buffering_minus1 out of range: %d\n", -+ vps->vps_max_dec_pic_buffering[i] - 1); -+ goto err; -+ } -+ if (vps->vps_num_reorder_pics[i] > vps->vps_max_dec_pic_buffering[i] - 1) { -+ av_log(avctx, AV_LOG_WARNING, "vps_max_num_reorder_pics out of range: %d\n", -+ vps->vps_num_reorder_pics[i]); -+ if (avctx->err_recognition & AV_EF_EXPLODE) -+ goto err; -+ } -+ } -+ -+ vps->vps_max_layer_id = get_bits(gb, 6); -+ vps->vps_num_layer_sets = get_ue_golomb_long(gb) + 1; -+ if (vps->vps_num_layer_sets < 1 || vps->vps_num_layer_sets > 1024 || -+ (vps->vps_num_layer_sets - 1LL) * (vps->vps_max_layer_id + 1LL) > get_bits_left(gb)) { -+ av_log(avctx, AV_LOG_ERROR, "too many layer_id_included_flags\n"); -+ goto err; -+ } -+ -+ for (i = 1; i < vps->vps_num_layer_sets; i++) -+ for (j = 0; j <= vps->vps_max_layer_id; j++) -+ skip_bits(gb, 1); // layer_id_included_flag[i][j] -+ -+ vps->vps_timing_info_present_flag = get_bits1(gb); -+ if (vps->vps_timing_info_present_flag) { -+ vps->vps_num_units_in_tick = get_bits_long(gb, 32); -+ vps->vps_time_scale = get_bits_long(gb, 32); -+ vps->vps_poc_proportional_to_timing_flag = get_bits1(gb); -+ if (vps->vps_poc_proportional_to_timing_flag) -+ vps->vps_num_ticks_poc_diff_one = get_ue_golomb_long(gb) + 1; -+ vps->vps_num_hrd_parameters = get_ue_golomb_long(gb); -+ if (vps->vps_num_hrd_parameters > (unsigned)vps->vps_num_layer_sets) { -+ av_log(avctx, AV_LOG_ERROR, -+ "vps_num_hrd_parameters %d is invalid\n", vps->vps_num_hrd_parameters); -+ goto err; -+ } -+ for (i = 0; i < vps->vps_num_hrd_parameters; i++) { -+ int common_inf_present = 1; -+ -+ get_ue_golomb_long(gb); // hrd_layer_set_idx -+ if (i) -+ common_inf_present = get_bits1(gb); -+ decode_hrd(gb, common_inf_present, vps->vps_max_sub_layers); -+ } -+ } -+ get_bits1(gb); /* vps_extension_flag */ -+ -+ if (get_bits_left(gb) < 0) { -+ av_log(avctx, AV_LOG_ERROR, -+ "Overread VPS by %d bits\n", -get_bits_left(gb)); -+ if (ps->vps_list[vps_id]) -+ goto err; -+ } -+ -+ if (ps->vps_list[vps_id] && -+ !memcmp(ps->vps_list[vps_id]->data, vps_buf->data, vps_buf->size)) { -+ av_buffer_unref(&vps_buf); -+ } else { -+ remove_vps(ps, vps_id); -+ ps->vps_list[vps_id] = vps_buf; -+ } -+ -+ return 0; -+ -+err: -+ av_buffer_unref(&vps_buf); -+ return AVERROR_INVALIDDATA; -+} -+ -+static void decode_vui(GetBitContext * const gb, AVCodecContext * const avctx, -+ const int apply_defdispwin, HEVCRpiSPS * const sps) -+{ -+ VUI backup_vui, * const vui = &sps->vui; -+ GetBitContext backup; -+ int sar_present, alt = 0; -+ -+ av_log(avctx, AV_LOG_DEBUG, "Decoding VUI\n"); -+ -+ sar_present = get_bits1(gb); -+ if (sar_present) { -+ uint8_t sar_idx = get_bits(gb, 8); -+ if (sar_idx < FF_ARRAY_ELEMS(vui_sar)) -+ vui->sar = vui_sar[sar_idx]; -+ else if (sar_idx == 255) { -+ vui->sar.num = get_bits(gb, 16); -+ vui->sar.den = get_bits(gb, 16); -+ } else -+ av_log(avctx, AV_LOG_WARNING, -+ "Unknown SAR index: %u.\n", sar_idx); -+ } -+ -+ vui->overscan_info_present_flag = get_bits1(gb); -+ if (vui->overscan_info_present_flag) -+ vui->overscan_appropriate_flag = get_bits1(gb); -+ -+ vui->video_signal_type_present_flag = get_bits1(gb); -+ if (vui->video_signal_type_present_flag) { -+ vui->video_format = get_bits(gb, 3); -+ vui->video_full_range_flag = get_bits1(gb); -+ vui->colour_description_present_flag = get_bits1(gb); -+ if (vui->video_full_range_flag && sps->pix_fmt == AV_PIX_FMT_YUV420P) -+ sps->pix_fmt = AV_PIX_FMT_YUVJ420P; -+ if (vui->colour_description_present_flag) { -+ vui->colour_primaries = get_bits(gb, 8); -+ vui->transfer_characteristic = get_bits(gb, 8); -+ vui->matrix_coeffs = get_bits(gb, 8); -+ -+ // Set invalid values to "unspecified" -+ if (!av_color_primaries_name(vui->colour_primaries)) -+ vui->colour_primaries = AVCOL_PRI_UNSPECIFIED; -+ if (!av_color_transfer_name(vui->transfer_characteristic)) -+ vui->transfer_characteristic = AVCOL_TRC_UNSPECIFIED; -+ if (!av_color_space_name(vui->matrix_coeffs)) -+ vui->matrix_coeffs = AVCOL_SPC_UNSPECIFIED; -+ if (vui->matrix_coeffs == AVCOL_SPC_RGB) { -+ switch (sps->pix_fmt) { -+ case AV_PIX_FMT_YUV444P: -+ sps->pix_fmt = AV_PIX_FMT_GBRP; -+ break; -+ case AV_PIX_FMT_YUV444P10: -+ sps->pix_fmt = AV_PIX_FMT_GBRP10; -+ break; -+ case AV_PIX_FMT_YUV444P12: -+ sps->pix_fmt = AV_PIX_FMT_GBRP12; -+ break; -+ } -+ } -+ } -+ } -+ -+ vui->chroma_loc_info_present_flag = get_bits1(gb); -+ if (vui->chroma_loc_info_present_flag) { -+ vui->chroma_sample_loc_type_top_field = get_ue_golomb_long(gb); -+ vui->chroma_sample_loc_type_bottom_field = get_ue_golomb_long(gb); -+ } -+ -+ vui->neutra_chroma_indication_flag = get_bits1(gb); -+ vui->field_seq_flag = get_bits1(gb); -+ vui->frame_field_info_present_flag = get_bits1(gb); -+ -+ // Backup context in case an alternate header is detected -+ memcpy(&backup, gb, sizeof(backup)); -+ memcpy(&backup_vui, vui, sizeof(backup_vui)); -+ if (get_bits_left(gb) >= 68 && show_bits_long(gb, 21) == 0x100000) { -+ vui->default_display_window_flag = 0; -+ av_log(avctx, AV_LOG_WARNING, "Invalid default display window\n"); -+ } else -+ vui->default_display_window_flag = get_bits1(gb); -+ -+ if (vui->default_display_window_flag) { -+ int vert_mult = 1 + (sps->chroma_format_idc < 2); -+ int horiz_mult = 1 + (sps->chroma_format_idc < 3); -+ vui->def_disp_win.left_offset = get_ue_golomb_long(gb) * horiz_mult; -+ vui->def_disp_win.right_offset = get_ue_golomb_long(gb) * horiz_mult; -+ vui->def_disp_win.top_offset = get_ue_golomb_long(gb) * vert_mult; -+ vui->def_disp_win.bottom_offset = get_ue_golomb_long(gb) * vert_mult; -+ -+ if (apply_defdispwin && -+ avctx->flags2 & AV_CODEC_FLAG2_IGNORE_CROP) { -+ av_log(avctx, AV_LOG_DEBUG, -+ "discarding vui default display window, " -+ "original values are l:%u r:%u t:%u b:%u\n", -+ vui->def_disp_win.left_offset, -+ vui->def_disp_win.right_offset, -+ vui->def_disp_win.top_offset, -+ vui->def_disp_win.bottom_offset); -+ -+ vui->def_disp_win.left_offset = -+ vui->def_disp_win.right_offset = -+ vui->def_disp_win.top_offset = -+ vui->def_disp_win.bottom_offset = 0; -+ } -+ } -+ -+timing_info: -+ vui->vui_timing_info_present_flag = get_bits1(gb); -+ -+ if (vui->vui_timing_info_present_flag) { -+ if( get_bits_left(gb) < 66 && !alt) { -+ // The alternate syntax seem to have timing info located -+ // at where def_disp_win is normally located -+ av_log(avctx, AV_LOG_WARNING, -+ "Strange VUI timing information, retrying...\n"); -+ memcpy(vui, &backup_vui, sizeof(backup_vui)); -+ memcpy(gb, &backup, sizeof(backup)); -+ alt = 1; -+ goto timing_info; -+ } -+ vui->vui_num_units_in_tick = get_bits_long(gb, 32); -+ vui->vui_time_scale = get_bits_long(gb, 32); -+ if (alt) { -+ av_log(avctx, AV_LOG_INFO, "Retry got %"PRIu32"/%"PRIu32" fps\n", -+ vui->vui_time_scale, vui->vui_num_units_in_tick); -+ } -+ vui->vui_poc_proportional_to_timing_flag = get_bits1(gb); -+ if (vui->vui_poc_proportional_to_timing_flag) -+ vui->vui_num_ticks_poc_diff_one_minus1 = get_ue_golomb_long(gb); -+ vui->vui_hrd_parameters_present_flag = get_bits1(gb); -+ if (vui->vui_hrd_parameters_present_flag) -+ decode_hrd(gb, 1, sps->max_sub_layers); -+ } -+ -+ vui->bitstream_restriction_flag = get_bits1(gb); -+ if (vui->bitstream_restriction_flag) { -+ if (get_bits_left(gb) < 8 && !alt) { -+ av_log(avctx, AV_LOG_WARNING, -+ "Strange VUI bitstream restriction information, retrying" -+ " from timing information...\n"); -+ memcpy(vui, &backup_vui, sizeof(backup_vui)); -+ memcpy(gb, &backup, sizeof(backup)); -+ alt = 1; -+ goto timing_info; -+ } -+ vui->tiles_fixed_structure_flag = get_bits1(gb); -+ vui->motion_vectors_over_pic_boundaries_flag = get_bits1(gb); -+ vui->restricted_ref_pic_lists_flag = get_bits1(gb); -+ vui->min_spatial_segmentation_idc = get_ue_golomb_long(gb); -+ vui->max_bytes_per_pic_denom = get_ue_golomb_long(gb); -+ vui->max_bits_per_min_cu_denom = get_ue_golomb_long(gb); -+ vui->log2_max_mv_length_horizontal = get_ue_golomb_long(gb); -+ vui->log2_max_mv_length_vertical = get_ue_golomb_long(gb); -+ } -+ -+ if (get_bits_left(gb) < 1 && !alt) { -+ // XXX: Alternate syntax when sps_range_extension_flag != 0? -+ av_log(avctx, AV_LOG_WARNING, -+ "Overread in VUI, retrying from timing information...\n"); -+ memcpy(vui, &backup_vui, sizeof(backup_vui)); -+ memcpy(gb, &backup, sizeof(backup)); -+ alt = 1; -+ goto timing_info; -+ } -+} -+ -+static void set_default_scaling_list_data(ScalingList * const sl) -+{ -+ int matrixId; -+ -+ for (matrixId = 0; matrixId < 6; matrixId++) { -+ // 4x4 default is 16 -+ memset(sl->sl[0][matrixId], 16, 16); -+ sl->sl_dc[0][matrixId] = 16; // default for 16x16 -+ sl->sl_dc[1][matrixId] = 16; // default for 32x32 -+ } -+ -+ memcpy(sl->sl[1][0], default_scaling_list_intra, 64); -+ memcpy(sl->sl[1][1], default_scaling_list_intra, 64); -+ memcpy(sl->sl[1][2], default_scaling_list_intra, 64); -+ -+ memcpy(sl->sl[1][3], default_scaling_list_inter, 64); -+ memcpy(sl->sl[1][4], default_scaling_list_inter, 64); -+ memcpy(sl->sl[1][5], default_scaling_list_inter, 64); -+ -+ memcpy(sl->sl[2][0], default_scaling_list_intra, 64); -+ memcpy(sl->sl[2][1], default_scaling_list_intra, 64); -+ memcpy(sl->sl[2][2], default_scaling_list_intra, 64); -+ -+ memcpy(sl->sl[2][3], default_scaling_list_inter, 64); -+ memcpy(sl->sl[2][4], default_scaling_list_inter, 64); -+ memcpy(sl->sl[2][5], default_scaling_list_inter, 64); -+ -+ memcpy(sl->sl[3][0], default_scaling_list_intra, 64); -+ memcpy(sl->sl[3][1], default_scaling_list_intra, 64); -+ memcpy(sl->sl[3][2], default_scaling_list_intra, 64); -+ -+ memcpy(sl->sl[3][3], default_scaling_list_inter, 64); -+ memcpy(sl->sl[3][4], default_scaling_list_inter, 64); -+ memcpy(sl->sl[3][5], default_scaling_list_inter, 64); -+} -+ -+static int scaling_list_data(GetBitContext * const gb, AVCodecContext * const avctx, ScalingList * const sl, -+ const HEVCRpiSPS * const sps) -+{ -+ uint8_t scaling_list_pred_mode_flag; -+ int32_t scaling_list_dc_coef[2][6]; -+ int size_id, matrix_id, pos; -+ int i; -+ -+ for (size_id = 0; size_id < 4; size_id++) -+ for (matrix_id = 0; matrix_id < 6; matrix_id += ((size_id == 3) ? 3 : 1)) { -+ scaling_list_pred_mode_flag = get_bits1(gb); -+ if (!scaling_list_pred_mode_flag) { -+ unsigned int delta = get_ue_golomb_long(gb); -+ /* Only need to handle non-zero delta. Zero means default, -+ * which should already be in the arrays. */ -+ if (delta) { -+ // Copy from previous array. -+ delta *= (size_id == 3) ? 3 : 1; -+ if (matrix_id < delta) { -+ av_log(avctx, AV_LOG_ERROR, -+ "Invalid delta in scaling list data: %d.\n", delta); -+ return AVERROR_INVALIDDATA; -+ } -+ -+ memcpy(sl->sl[size_id][matrix_id], -+ sl->sl[size_id][matrix_id - delta], -+ size_id > 0 ? 64 : 16); -+ if (size_id > 1) -+ sl->sl_dc[size_id - 2][matrix_id] = sl->sl_dc[size_id - 2][matrix_id - delta]; -+ } -+ } else { -+ int next_coef, coef_num; -+ int32_t scaling_list_delta_coef; -+ -+ next_coef = 8; -+ coef_num = FFMIN(64, 1 << (4 + (size_id << 1))); -+ if (size_id > 1) { -+ scaling_list_dc_coef[size_id - 2][matrix_id] = get_se_golomb(gb) + 8; -+ next_coef = scaling_list_dc_coef[size_id - 2][matrix_id]; -+ sl->sl_dc[size_id - 2][matrix_id] = next_coef; -+ } -+ for (i = 0; i < coef_num; i++) { -+ if (size_id == 0) -+ pos = 4 * ff_hevc_rpi_diag_scan4x4_y[i] + -+ ff_hevc_rpi_diag_scan4x4_x[i]; -+ else -+ pos = 8 * ff_hevc_rpi_diag_scan8x8_y[i] + -+ ff_hevc_rpi_diag_scan8x8_x[i]; -+ -+ scaling_list_delta_coef = get_se_golomb(gb); -+ next_coef = (next_coef + 256U + scaling_list_delta_coef) % 256; -+ sl->sl[size_id][matrix_id][pos] = next_coef; -+ } -+ } -+ } -+ -+ if (sps->chroma_format_idc == 3) { -+ for (i = 0; i < 64; i++) { -+ sl->sl[3][1][i] = sl->sl[2][1][i]; -+ sl->sl[3][2][i] = sl->sl[2][2][i]; -+ sl->sl[3][4][i] = sl->sl[2][4][i]; -+ sl->sl[3][5][i] = sl->sl[2][5][i]; -+ } -+ sl->sl_dc[1][1] = sl->sl_dc[0][1]; -+ sl->sl_dc[1][2] = sl->sl_dc[0][2]; -+ sl->sl_dc[1][4] = sl->sl_dc[0][4]; -+ sl->sl_dc[1][5] = sl->sl_dc[0][5]; -+ } -+ -+ -+ return 0; -+} -+ -+static int map_pixel_format(HEVCRpiSPS * const sps) -+{ -+ const int cfmt = sps->chroma_format_idc; -+ -+ sps->pix_fmt = AV_PIX_FMT_NONE; -+ switch (sps->bit_depth) { -+ case 8: -+ if (cfmt == 1) -+ sps->pix_fmt = AV_PIX_FMT_SAND128; -+ break; -+ case 10: -+ if (cfmt == 1) -+ sps->pix_fmt = AV_PIX_FMT_SAND64_10; -+ break; -+ default: -+ break; -+ } -+ -+ sps->hshift[0] = sps->vshift[0] = 0; -+ sps->hshift[2] = sps->hshift[1] = cfmt > 2 ? 0 : 1; // 1 unless 4:4:4 -+ sps->vshift[2] = sps->vshift[1] = cfmt > 1 ? 0 : 1; // 1 unless 4:4:4 or 4:2:2 -+ -+ sps->pixel_shift = sps->bit_depth > 8 ? 1 : 0; -+ -+ return 0; -+} -+ -+static int ff_hevc_rpi_parse_sps(HEVCRpiSPS * const sps, GetBitContext * const gb, unsigned int * const sps_id, -+ const int apply_defdispwin, AVBufferRef * const * const vps_list, AVCodecContext * const avctx) -+{ -+ HEVCRpiWindow *ow; -+ int ret = 0; -+ int log2_diff_max_min_transform_block_size; -+ int bit_depth_chroma, start, vui_present, sublayer_ordering_info; -+ int i; -+ -+ // Coded parameters -+ -+ sps->vps_id = get_bits(gb, 4); -+ if (sps->vps_id >= HEVC_MAX_VPS_COUNT) { -+ av_log(avctx, AV_LOG_ERROR, "VPS id out of range: %d\n", sps->vps_id); -+ return AVERROR_INVALIDDATA; -+ } -+ -+ if (vps_list && !vps_list[sps->vps_id]) { -+ av_log(avctx, AV_LOG_ERROR, "VPS %d does not exist\n", -+ sps->vps_id); -+ return AVERROR_INVALIDDATA; -+ } -+ -+ sps->max_sub_layers = get_bits(gb, 3) + 1; -+ if (sps->max_sub_layers > HEVC_MAX_SUB_LAYERS) { -+ av_log(avctx, AV_LOG_ERROR, "sps_max_sub_layers out of range: %d\n", -+ sps->max_sub_layers); -+ return AVERROR_INVALIDDATA; -+ } -+ -+ sps->temporal_id_nesting_flag = get_bits(gb, 1); -+ -+ if ((ret = parse_ptl(gb, avctx, &sps->ptl, sps->max_sub_layers)) < 0) -+ return ret; -+ -+ *sps_id = get_ue_golomb_long(gb); -+ if (*sps_id >= HEVC_MAX_SPS_COUNT) { -+ av_log(avctx, AV_LOG_ERROR, "SPS id out of range: %d\n", *sps_id); -+ return AVERROR_INVALIDDATA; -+ } -+ -+ sps->chroma_format_idc = get_ue_golomb_long(gb); -+ if (sps->chroma_format_idc > 3U) { -+ av_log(avctx, AV_LOG_ERROR, "chroma_format_idc %d is invalid\n", sps->chroma_format_idc); -+ return AVERROR_INVALIDDATA; -+ } -+ -+ if (sps->chroma_format_idc == 3) -+ sps->separate_colour_plane_flag = get_bits1(gb); -+ -+ if (sps->separate_colour_plane_flag) -+ sps->chroma_format_idc = 0; -+ -+ sps->width = get_ue_golomb_long(gb); -+ sps->height = get_ue_golomb_long(gb); -+ if ((ret = av_image_check_size(sps->width, -+ sps->height, 0, avctx)) < 0) -+ return ret; -+ -+ if (get_bits1(gb)) { // pic_conformance_flag -+ int vert_mult = 1 + (sps->chroma_format_idc < 2); -+ int horiz_mult = 1 + (sps->chroma_format_idc < 3); -+ sps->pic_conf_win.left_offset = get_ue_golomb_long(gb) * horiz_mult; -+ sps->pic_conf_win.right_offset = get_ue_golomb_long(gb) * horiz_mult; -+ sps->pic_conf_win.top_offset = get_ue_golomb_long(gb) * vert_mult; -+ sps->pic_conf_win.bottom_offset = get_ue_golomb_long(gb) * vert_mult; -+ -+ if (avctx->flags2 & AV_CODEC_FLAG2_IGNORE_CROP) { -+ av_log(avctx, AV_LOG_DEBUG, -+ "discarding sps conformance window, " -+ "original values are l:%u r:%u t:%u b:%u\n", -+ sps->pic_conf_win.left_offset, -+ sps->pic_conf_win.right_offset, -+ sps->pic_conf_win.top_offset, -+ sps->pic_conf_win.bottom_offset); -+ -+ sps->pic_conf_win.left_offset = -+ sps->pic_conf_win.right_offset = -+ sps->pic_conf_win.top_offset = -+ sps->pic_conf_win.bottom_offset = 0; -+ } -+ sps->output_window = sps->pic_conf_win; -+ } -+ -+ sps->bit_depth = get_ue_golomb_long(gb) + 8; -+ bit_depth_chroma = get_ue_golomb_long(gb) + 8; -+ if (sps->chroma_format_idc && bit_depth_chroma != sps->bit_depth) { -+ av_log(avctx, AV_LOG_ERROR, -+ "Luma bit depth (%d) is different from chroma bit depth (%d), " -+ "this is unsupported.\n", -+ sps->bit_depth, bit_depth_chroma); -+ return AVERROR_INVALIDDATA; -+ } -+ -+ ret = map_pixel_format(sps); -+ if (ret < 0) -+ return ret; -+ -+ sps->log2_max_poc_lsb = get_ue_golomb_long(gb) + 4; -+ if (sps->log2_max_poc_lsb > 16) { -+ av_log(avctx, AV_LOG_ERROR, "log2_max_pic_order_cnt_lsb_minus4 out range: %d\n", -+ sps->log2_max_poc_lsb - 4); -+ return AVERROR_INVALIDDATA; -+ } -+ -+ sublayer_ordering_info = get_bits1(gb); -+ start = sublayer_ordering_info ? 0 : sps->max_sub_layers - 1; -+ for (i = start; i < sps->max_sub_layers; i++) { -+ sps->temporal_layer[i].max_dec_pic_buffering = get_ue_golomb_long(gb) + 1; -+ sps->temporal_layer[i].num_reorder_pics = get_ue_golomb_long(gb); -+ sps->temporal_layer[i].max_latency_increase = get_ue_golomb_long(gb) - 1; -+ if (sps->temporal_layer[i].max_dec_pic_buffering > (unsigned)HEVC_MAX_DPB_SIZE) { -+ av_log(avctx, AV_LOG_ERROR, "sps_max_dec_pic_buffering_minus1 out of range: %d\n", -+ sps->temporal_layer[i].max_dec_pic_buffering - 1U); -+ return AVERROR_INVALIDDATA; -+ } -+ if (sps->temporal_layer[i].num_reorder_pics > sps->temporal_layer[i].max_dec_pic_buffering - 1) { -+ av_log(avctx, AV_LOG_WARNING, "sps_max_num_reorder_pics out of range: %d\n", -+ sps->temporal_layer[i].num_reorder_pics); -+ if (avctx->err_recognition & AV_EF_EXPLODE || -+ sps->temporal_layer[i].num_reorder_pics > HEVC_MAX_DPB_SIZE - 1) { -+ return AVERROR_INVALIDDATA; -+ } -+ sps->temporal_layer[i].max_dec_pic_buffering = sps->temporal_layer[i].num_reorder_pics + 1; -+ } -+ } -+ -+ if (!sublayer_ordering_info) { -+ for (i = 0; i < start; i++) { -+ sps->temporal_layer[i].max_dec_pic_buffering = sps->temporal_layer[start].max_dec_pic_buffering; -+ sps->temporal_layer[i].num_reorder_pics = sps->temporal_layer[start].num_reorder_pics; -+ sps->temporal_layer[i].max_latency_increase = sps->temporal_layer[start].max_latency_increase; -+ } -+ } -+ -+ sps->log2_min_cb_size = get_ue_golomb_long(gb) + 3; -+ sps->log2_diff_max_min_coding_block_size = get_ue_golomb_long(gb); -+ sps->log2_min_tb_size = get_ue_golomb_long(gb) + 2; -+ log2_diff_max_min_transform_block_size = get_ue_golomb_long(gb); -+ sps->log2_max_trafo_size = log2_diff_max_min_transform_block_size + -+ sps->log2_min_tb_size; -+ -+ if (sps->log2_min_cb_size < 3 || sps->log2_min_cb_size > 30) { -+ av_log(avctx, AV_LOG_ERROR, "Invalid value %d for log2_min_cb_size", sps->log2_min_cb_size); -+ return AVERROR_INVALIDDATA; -+ } -+ -+ if (sps->log2_diff_max_min_coding_block_size > 30) { -+ av_log(avctx, AV_LOG_ERROR, "Invalid value %d for log2_diff_max_min_coding_block_size", sps->log2_diff_max_min_coding_block_size); -+ return AVERROR_INVALIDDATA; -+ } -+ -+ if (sps->log2_min_tb_size >= sps->log2_min_cb_size || sps->log2_min_tb_size < 2) { -+ av_log(avctx, AV_LOG_ERROR, "Invalid value for log2_min_tb_size"); -+ return AVERROR_INVALIDDATA; -+ } -+ -+ if (log2_diff_max_min_transform_block_size < 0 || log2_diff_max_min_transform_block_size > 30) { -+ av_log(avctx, AV_LOG_ERROR, "Invalid value %d for log2_diff_max_min_transform_block_size", log2_diff_max_min_transform_block_size); -+ return AVERROR_INVALIDDATA; -+ } -+ -+ { -+ const unsigned int CtbLog2SizeY = sps->log2_min_cb_size + sps->log2_diff_max_min_coding_block_size; -+ // Not a bitstream limitation, but all profiles -+ if (CtbLog2SizeY < 4 || CtbLog2SizeY > HEVC_MAX_LOG2_CTB_SIZE) { -+ av_log(avctx, AV_LOG_ERROR, "Invalid value %d for CtbLog2SizeY", CtbLog2SizeY); -+ return AVERROR_INVALIDDATA; -+ } -+ -+ if (sps->log2_max_trafo_size > FFMIN(5, CtbLog2SizeY)) { -+ av_log(avctx, AV_LOG_ERROR, "Invalid value %d for MaxTbLog2SizeY", sps->log2_max_trafo_size); -+ return AVERROR_INVALIDDATA; -+ } -+ -+ // Inferred parameters -+ sps->log2_ctb_size = CtbLog2SizeY; -+// sps->log2_min_pu_size = sps->log2_min_cb_size - 1; -+ } -+ -+ sps->max_transform_hierarchy_depth_inter = get_ue_golomb_long(gb); -+ sps->max_transform_hierarchy_depth_intra = get_ue_golomb_long(gb); -+ -+ sps->scaling_list_enable_flag = get_bits1(gb); -+ if (sps->scaling_list_enable_flag) { -+ set_default_scaling_list_data(&sps->scaling_list); -+ -+ if (get_bits1(gb)) { -+ ret = scaling_list_data(gb, avctx, &sps->scaling_list, sps); -+ if (ret < 0) -+ return ret; -+ } -+ } -+ -+ sps->amp_enabled_flag = get_bits1(gb); -+ sps->sao_enabled = get_bits1(gb); -+ -+ // Set pcm defaults (0) so we don't have to test _enabled when we -+ // want to use them -+ memset(&sps->pcm, 0, sizeof(sps->pcm)); -+ -+ if (get_bits1(gb)) // pcm_enabled_flag -+ { -+ const unsigned int limit_max_pcm = FFMIN(5, -+ sps->log2_min_cb_size + sps->log2_diff_max_min_coding_block_size); -+ sps->pcm.bit_depth = get_bits(gb, 4) + 1; -+ sps->pcm.bit_depth_chroma = get_bits(gb, 4) + 1; -+ sps->pcm.log2_min_pcm_cb_size = get_ue_golomb_long(gb) + 3; -+ sps->pcm.log2_max_pcm_cb_size = sps->pcm.log2_min_pcm_cb_size + -+ get_ue_golomb_long(gb); -+ if (FFMAX(sps->pcm.bit_depth, sps->pcm.bit_depth_chroma) > sps->bit_depth) { -+ av_log(avctx, AV_LOG_ERROR, -+ "PCM bit depth (%d, %d) is greater than normal bit depth (%d)\n", -+ sps->pcm.bit_depth, sps->pcm.bit_depth_chroma, sps->bit_depth); -+ return AVERROR_INVALIDDATA; -+ } -+ if (sps->pcm.log2_min_pcm_cb_size < sps->log2_min_cb_size || -+ sps->pcm.log2_max_pcm_cb_size > limit_max_pcm) { -+ av_log(avctx, AV_LOG_ERROR, "Bad PCM CB min/max size (%d->%d)", -+ sps->pcm.log2_min_pcm_cb_size, sps->pcm.log2_max_pcm_cb_size); -+ return AVERROR_INVALIDDATA; -+ } -+ -+ sps->pcm.loop_filter_disable_flag = get_bits1(gb); -+ } -+ -+ // Could be based on min_pcm_cb_size but much easier logic if we just stick -+ // with 8 (and costs us little) -+ sps->pcm_width = (sps->width + 63) >> 6; // 8 for min size, 8 bits per byte - round up -+ sps->pcm_height = (sps->height + 7) >> 3; -+ -+ sps->nb_st_rps = get_ue_golomb_long(gb); -+ if (sps->nb_st_rps > HEVC_MAX_SHORT_TERM_REF_PIC_SETS) { -+ av_log(avctx, AV_LOG_ERROR, "Too many short term RPS: %d.\n", -+ sps->nb_st_rps); -+ return AVERROR_INVALIDDATA; -+ } -+ for (i = 0; i < sps->nb_st_rps; i++) { -+ if ((ret = ff_hevc_rpi_decode_short_term_rps(gb, avctx, &sps->st_rps[i], -+ sps, 0)) < 0) -+ return ret; -+ } -+ -+ sps->long_term_ref_pics_present_flag = get_bits1(gb); -+ if (sps->long_term_ref_pics_present_flag) { -+ sps->num_long_term_ref_pics_sps = get_ue_golomb_long(gb); -+ if (sps->num_long_term_ref_pics_sps > HEVC_MAX_LONG_TERM_REF_PICS) { -+ av_log(avctx, AV_LOG_ERROR, "num_long_term_ref_pics_sps %d is out of range.\n", -+ sps->num_long_term_ref_pics_sps); -+ return AVERROR_INVALIDDATA; -+ } -+ for (i = 0; i < sps->num_long_term_ref_pics_sps; i++) { -+ sps->lt_ref_pic_poc_lsb_sps[i] = get_bits(gb, sps->log2_max_poc_lsb); -+ sps->used_by_curr_pic_lt_sps_flag[i] = get_bits1(gb); -+ } -+ } -+ -+ sps->sps_temporal_mvp_enabled_flag = get_bits1(gb); -+ sps->intra_filters_disable = get_bits1(gb) ? 0 : FILTER_STRONG; // sps->sps_strong_intra_smoothing_enable_flag -+ sps->vui.sar = (AVRational){0, 1}; -+ vui_present = get_bits1(gb); -+ if (vui_present) -+ decode_vui(gb, avctx, apply_defdispwin, sps); -+ -+ if (get_bits1(gb)) { // sps_extension_flag -+ int sps_extension_flag[1]; -+ for (i = 0; i < 1; i++) -+ sps_extension_flag[i] = get_bits1(gb); -+ skip_bits(gb, 7); //sps_extension_7bits = get_bits(gb, 7); -+ if (sps_extension_flag[0]) { -+ int extended_precision_processing_flag; -+ int cabac_bypass_alignment_enabled_flag; -+ -+ sps->transform_skip_rotation_enabled_flag = get_bits1(gb); -+ sps->transform_skip_context_enabled_flag = get_bits1(gb); -+ sps->implicit_rdpcm_enabled_flag = get_bits1(gb); -+ -+ sps->explicit_rdpcm_enabled_flag = get_bits1(gb); -+ -+ extended_precision_processing_flag = get_bits1(gb); -+ if (extended_precision_processing_flag) -+ av_log(avctx, AV_LOG_WARNING, -+ "extended_precision_processing_flag not yet implemented\n"); -+ -+ if (get_bits1(gb)) // sps->intra_smoothing_disabled_flag -+ sps->intra_filters_disable |= FILTER_EITHER; -+ sps->high_precision_offsets_enabled_flag = get_bits1(gb); -+ sps->persistent_rice_adaptation_enabled_flag = get_bits1(gb); -+ -+ cabac_bypass_alignment_enabled_flag = get_bits1(gb); -+ if (cabac_bypass_alignment_enabled_flag) -+ av_log(avctx, AV_LOG_WARNING, -+ "cabac_bypass_alignment_enabled_flag not yet implemented\n"); -+ } -+ } -+ if (apply_defdispwin) { -+ sps->output_window.left_offset += sps->vui.def_disp_win.left_offset; -+ sps->output_window.right_offset += sps->vui.def_disp_win.right_offset; -+ sps->output_window.top_offset += sps->vui.def_disp_win.top_offset; -+ sps->output_window.bottom_offset += sps->vui.def_disp_win.bottom_offset; -+ } -+ -+ ow = &sps->output_window; -+ if (ow->left_offset >= INT_MAX - ow->right_offset || -+ ow->top_offset >= INT_MAX - ow->bottom_offset || -+ ow->left_offset + ow->right_offset >= sps->width || -+ ow->top_offset + ow->bottom_offset >= sps->height) { -+ av_log(avctx, AV_LOG_WARNING, "Invalid cropping offsets: %u/%u/%u/%u\n", -+ ow->left_offset, ow->right_offset, ow->top_offset, ow->bottom_offset); -+ if (avctx->err_recognition & AV_EF_EXPLODE) { -+ return AVERROR_INVALIDDATA; -+ } -+ av_log(avctx, AV_LOG_WARNING, -+ "Displaying the whole video surface.\n"); -+ memset(ow, 0, sizeof(*ow)); -+ memset(&sps->pic_conf_win, 0, sizeof(sps->pic_conf_win)); -+ } -+ -+ // Inferred parameters -+ -+ sps->ctb_width = (sps->width + (1 << sps->log2_ctb_size) - 1) >> sps->log2_ctb_size; -+ sps->ctb_height = (sps->height + (1 << sps->log2_ctb_size) - 1) >> sps->log2_ctb_size; -+ sps->ctb_size = sps->ctb_width * sps->ctb_height; -+ -+ sps->min_cb_width = sps->width >> sps->log2_min_cb_size; -+ sps->min_cb_height = sps->height >> sps->log2_min_cb_size; -+ sps->min_tb_width = sps->width >> sps->log2_min_tb_size; -+ sps->min_tb_height = sps->height >> sps->log2_min_tb_size; -+ sps->min_pu_width = sps->width >> LOG2_MIN_PU_SIZE; -+ sps->min_pu_height = sps->height >> LOG2_MIN_PU_SIZE; -+ sps->tb_mask = (1 << (sps->log2_ctb_size - sps->log2_min_tb_size)) - 1; -+ -+ sps->qp_bd_offset = 6 * (sps->bit_depth - 8); -+ sps->wp_offset_half_range = (1U << (sps->high_precision_offsets_enabled_flag ? sps->bit_depth - 1 : 7)); -+ -+ if (av_mod_uintp2(sps->width, sps->log2_min_cb_size) || -+ av_mod_uintp2(sps->height, sps->log2_min_cb_size)) { -+ av_log(avctx, AV_LOG_ERROR, "Invalid coded frame dimensions.\n"); -+ return AVERROR_INVALIDDATA; -+ } -+ -+ if (sps->max_transform_hierarchy_depth_inter > sps->log2_ctb_size - sps->log2_min_tb_size) { -+ av_log(avctx, AV_LOG_ERROR, "max_transform_hierarchy_depth_inter out of range: %d\n", -+ sps->max_transform_hierarchy_depth_inter); -+ return AVERROR_INVALIDDATA; -+ } -+ if (sps->max_transform_hierarchy_depth_intra > sps->log2_ctb_size - sps->log2_min_tb_size) { -+ av_log(avctx, AV_LOG_ERROR, "max_transform_hierarchy_depth_intra out of range: %d\n", -+ sps->max_transform_hierarchy_depth_intra); -+ return AVERROR_INVALIDDATA; -+ } -+ if (sps->log2_max_trafo_size > FFMIN(sps->log2_ctb_size, 5)) { -+ av_log(avctx, AV_LOG_ERROR, -+ "max transform block size out of range: %d\n", -+ sps->log2_max_trafo_size); -+ return AVERROR_INVALIDDATA; -+ } -+ -+ if (get_bits_left(gb) < 0) { -+ av_log(avctx, AV_LOG_ERROR, -+ "Overread SPS by %d bits\n", -get_bits_left(gb)); -+ return AVERROR_INVALIDDATA; -+ } -+ -+ return 0; -+} -+ -+int ff_hevc_rpi_decode_nal_sps(GetBitContext *gb, AVCodecContext *avctx, -+ HEVCRpiParamSets *ps, int apply_defdispwin) -+{ -+ HEVCRpiSPS *sps; -+ AVBufferRef *sps_buf = av_buffer_allocz(sizeof(*sps)); -+ unsigned int sps_id; -+ int ret; -+ ptrdiff_t nal_size; -+ -+ if (!sps_buf) -+ return AVERROR(ENOMEM); -+ sps = (HEVCRpiSPS*)sps_buf->data; -+ -+ av_log(avctx, AV_LOG_DEBUG, "Decoding SPS\n"); -+ -+ nal_size = gb->buffer_end - gb->buffer; -+ if (nal_size > sizeof(sps->data)) { -+ av_log(avctx, AV_LOG_WARNING, "Truncating likely oversized SPS " -+ "(%"PTRDIFF_SPECIFIER" > %"SIZE_SPECIFIER")\n", -+ nal_size, sizeof(sps->data)); -+ sps->data_size = sizeof(sps->data); -+ } else { -+ sps->data_size = nal_size; -+ } -+ memcpy(sps->data, gb->buffer, sps->data_size); -+ -+ ret = ff_hevc_rpi_parse_sps(sps, gb, &sps_id, -+ apply_defdispwin, -+ ps->vps_list, avctx); -+ if (ret < 0) { -+ av_buffer_unref(&sps_buf); -+ return ret; -+ } -+ -+ if (avctx->debug & FF_DEBUG_BITSTREAM) { -+ av_log(avctx, AV_LOG_DEBUG, -+ "Parsed SPS: id %d; coded wxh: %dx%d; " -+ "cropped wxh: %dx%d; pix_fmt: %s.\n", -+ sps_id, sps->width, sps->height, -+ sps->width - (sps->output_window.left_offset + sps->output_window.right_offset), -+ sps->height - (sps->output_window.top_offset + sps->output_window.bottom_offset), -+ av_get_pix_fmt_name(sps->pix_fmt)); -+ } -+ -+ /* check if this is a repeat of an already parsed SPS, then keep the -+ * original one. -+ * otherwise drop all PPSes that depend on it */ -+ if (ps->sps_list[sps_id] && -+ !memcmp(ps->sps_list[sps_id]->data, sps_buf->data, sps_buf->size)) { -+ av_buffer_unref(&sps_buf); -+ } else { -+ remove_sps(ps, sps_id); -+ ps->sps_list[sps_id] = sps_buf; -+ } -+ -+ return 0; -+} -+ -+static void hevc_pps_free(void *opaque, uint8_t *data) -+{ -+ HEVCRpiPPS *pps = (HEVCRpiPPS*)data; -+ -+ av_freep(&pps->column_width); -+ av_freep(&pps->row_height); -+ av_freep(&pps->col_bd); -+ av_freep(&pps->row_bd); -+ av_freep(&pps->col_idxX); -+ av_freep(&pps->ctb_addr_rs_to_ts); -+ av_freep(&pps->ctb_addr_ts_to_rs); -+ av_freep(&pps->tile_pos_ts); -+ av_freep(&pps->tile_size); -+ av_freep(&pps->tile_id); -+ av_freep(&pps->ctb_ts_flags); -+ -+ av_freep(&pps); -+} -+ -+static int get_offset_list(GetBitContext * const gb, AVCodecContext * const avctx, unsigned int n_minus_1, int8_t * offsets) -+{ -+ do -+ { -+ const int offset = get_se_golomb_long(gb); -+ if (offset < -12 || offset > 12) { -+ av_log(avctx, AV_LOG_ERROR, "qp_offset_list[]: %d out of range\n", offset); -+ return AVERROR_INVALIDDATA; -+ } -+ *offsets++ = offset; -+ } while (n_minus_1-- != 0); -+ return 0; -+} -+ -+static int pps_range_extensions(GetBitContext * const gb, AVCodecContext * const avctx, -+ HEVCRpiPPS * const pps, const HEVCRpiSPS * const sps) -+{ -+ if (pps->transform_skip_enabled_flag) { -+ pps->log2_max_transform_skip_block_size = get_ue_golomb_long(gb) + 2; -+ } -+ pps->cross_component_prediction_enabled_flag = get_bits1(gb); -+ if (pps->cross_component_prediction_enabled_flag && -+ (sps->chroma_format_idc != 3 || sps->separate_colour_plane_flag)) -+ { -+ av_log(avctx, AV_LOG_ERROR, "cross_component_prediction_enabled but chroma_format_idc != 3\n"); -+ return AVERROR_INVALIDDATA; -+ } -+ pps->chroma_qp_offset_list_enabled_flag = get_bits1(gb); -+ if (pps->chroma_qp_offset_list_enabled_flag) { -+ int err; -+ -+ pps->diff_cu_chroma_qp_offset_depth = get_ue_golomb_long(gb); -+ pps->chroma_qp_offset_list_len_minus1 = get_ue_golomb_long(gb); -+ if (pps->chroma_qp_offset_list_len_minus1 > 5) { -+ av_log(avctx, AV_LOG_ERROR, -+ "chroma_qp_offset_list_len_minus1 shall be in the range [0, 5].\n"); -+ return AVERROR_INVALIDDATA; -+ } -+ av_log(avctx, AV_LOG_WARNING, "cb_qp_offset_list not tested yet.\n"); -+ -+ if ((err = get_offset_list(gb, avctx, pps->chroma_qp_offset_list_len_minus1, pps->cb_qp_offset_list)) != 0 || -+ (err = get_offset_list(gb, avctx, pps->chroma_qp_offset_list_len_minus1, pps->cr_qp_offset_list)) != 0) -+ return err; -+ } -+ -+ { -+ const unsigned int max_offset = sps->bit_depth > 10 ? sps->bit_depth - 10 : 0; -+ -+ pps->log2_sao_offset_scale_luma = get_ue_golomb_long(gb); -+ if (pps->log2_sao_offset_scale_luma > max_offset) { -+ av_log(avctx, AV_LOG_ERROR, "log2_sao_offset_scale_luma invalid"); -+ return AVERROR_INVALIDDATA; -+ } -+ pps->log2_sao_offset_scale_chroma = get_ue_golomb_long(gb); -+ if (pps->log2_sao_offset_scale_chroma > max_offset) { -+ av_log(avctx, AV_LOG_ERROR, "log2_sao_offset_scale_chroma invalid"); -+ return AVERROR_INVALIDDATA; -+ } -+ } -+ -+ return(0); -+} -+ -+static inline int setup_pps(AVCodecContext * const avctx, -+ HEVCRpiPPS * const pps, const HEVCRpiSPS * const sps) -+{ -+ int pic_area_in_ctbs; -+ int i, j, x, y, ctb_addr_rs, tile_id; -+ -+ // Inferred parameters -+ -+ // qp_y -> qp_u/qp_v tables -+ // The tables have at least -24,+24 overrun after adding offset here -+ // which should allow for clipless offseting -+ -+ pps->qp_dblk_x[0] = qp_c_dblk_0 + QP_DBLK_OFFSET_0; // No offset for luma, but may be useful for general code -+ pps->qp_bd_x[0] = qp_c_bd_0[sps->bit_depth - 8] + QP_OFFSET_0; -+ -+ if (sps->chroma_format_idc == 1) { -+ pps->qp_dblk_x[1] = qp_c_dblk_1 + pps->cb_qp_offset + QP_DBLK_OFFSET_0; -+ pps->qp_bd_x[1] = qp_c_bd_1[sps->bit_depth - 8] + pps->cb_qp_offset + QP_OFFSET_0; -+ pps->qp_dblk_x[2] = qp_c_dblk_1 + pps->cr_qp_offset + QP_DBLK_OFFSET_0; -+ pps->qp_bd_x[2] = qp_c_bd_1[sps->bit_depth - 8] + pps->cr_qp_offset + QP_OFFSET_0; -+ } -+ else -+ { -+ pps->qp_dblk_x[1] = qp_c_dblk_0 + pps->cb_qp_offset + QP_DBLK_OFFSET_0; -+ pps->qp_bd_x[1] = qp_c_bd_0[sps->bit_depth - 8] + pps->cb_qp_offset + QP_OFFSET_0; -+ pps->qp_dblk_x[2] = qp_c_dblk_0 + pps->cr_qp_offset + QP_DBLK_OFFSET_0; -+ pps->qp_bd_x[2] = qp_c_bd_0[sps->bit_depth - 8] + pps->cr_qp_offset + QP_OFFSET_0; -+ } -+ -+ pps->col_bd = av_malloc_array(pps->num_tile_columns + 1, sizeof(*pps->col_bd)); -+ pps->row_bd = av_malloc_array(pps->num_tile_rows + 1, sizeof(*pps->row_bd)); -+ pps->col_idxX = av_malloc_array(sps->ctb_width, sizeof(*pps->col_idxX)); -+ if (!pps->col_bd || !pps->row_bd || !pps->col_idxX) -+ return AVERROR(ENOMEM); -+ -+ if (pps->uniform_spacing_flag) { -+ if (!pps->column_width) { -+ pps->column_width = av_malloc_array(pps->num_tile_columns, sizeof(*pps->column_width)); -+ pps->row_height = av_malloc_array(pps->num_tile_rows, sizeof(*pps->row_height)); -+ } -+ if (!pps->column_width || !pps->row_height) -+ return AVERROR(ENOMEM); -+ -+ for (i = 0; i < pps->num_tile_columns; i++) { -+ pps->column_width[i] = ((i + 1) * sps->ctb_width) / pps->num_tile_columns - -+ (i * sps->ctb_width) / pps->num_tile_columns; -+ } -+ -+ for (i = 0; i < pps->num_tile_rows; i++) { -+ pps->row_height[i] = ((i + 1) * sps->ctb_height) / pps->num_tile_rows - -+ (i * sps->ctb_height) / pps->num_tile_rows; -+ } -+ } -+ -+ { -+ const unsigned int td_mask = 63 >> (sps->log2_ctb_size + sps->pixel_shift); -+ pps->col_bd[0] = 0; -+ pps->tile_wpp_inter_disable = 0; -+ for (i = 0; i < pps->num_tile_columns; i++) -+ { -+ pps->col_bd[i + 1] = pps->col_bd[i] + pps->column_width[i]; -+ -+ // Avoid trying tile parallel if the columns don't fall on cache boundries -+ // (this causes too much pain syncing flushes with the QPU) -+ // Ignore the final (RHS of pic) tile boundry -+ if ((pps->col_bd[i] & td_mask) != 0) { -+ pps->tile_wpp_inter_disable = 1; -+ } -+ } -+ -+ // If we can start the next row before finishing the first line of -+ // this one then we must wait at the end of the tile -+ // * if this happens a lot then there are better but more complicated -+ // conditions that we could apply -+ if (pps->tile_wpp_inter_disable) { -+ for (i = 0; i < pps->num_tile_rows; i++) -+ { -+ if (pps->row_height[i] <= RPI_MAX_JOBS) { -+ pps->tile_wpp_inter_disable = 2; -+ break; -+ } -+ } -+ } -+ } -+ -+ pps->row_bd[0] = 0; -+ for (i = 0; i < pps->num_tile_rows; i++) -+ pps->row_bd[i + 1] = pps->row_bd[i] + pps->row_height[i]; -+ -+ for (i = 0, j = 0; i < sps->ctb_width; i++) { -+ if (i >= pps->col_bd[j + 1]) -+ j++; -+ pps->col_idxX[i] = j; -+ } -+ -+ /** -+ * 6.5 -+ */ -+ pic_area_in_ctbs = sps->ctb_size; -+ -+ pps->ctb_addr_rs_to_ts = av_malloc_array(pic_area_in_ctbs, sizeof(*pps->ctb_addr_rs_to_ts)); -+ pps->ctb_addr_ts_to_rs = av_malloc_array(pic_area_in_ctbs, sizeof(*pps->ctb_addr_ts_to_rs)); -+ pps->tile_id = av_malloc_array(pic_area_in_ctbs, sizeof(*pps->tile_id)); -+ pps->tile_size = av_malloc_array(pps->num_tile_columns * pps->num_tile_rows, sizeof(*pps->tile_size)); -+ pps->tile_pos_ts = av_malloc_array(pps->num_tile_columns * pps->num_tile_rows, sizeof(*pps->tile_pos_ts)); -+ pps->ctb_ts_flags = av_malloc_array(pic_area_in_ctbs, sizeof(*pps->ctb_ts_flags)); -+ if (!pps->ctb_addr_rs_to_ts || !pps->ctb_addr_ts_to_rs || -+ !pps->tile_id || pps->tile_pos_ts == NULL || pps->tile_size == NULL) { -+ return AVERROR(ENOMEM); -+ } -+ -+ memset(pps->ctb_ts_flags, 0, pic_area_in_ctbs * sizeof(*pps->ctb_ts_flags)); -+ -+ for (ctb_addr_rs = 0; ctb_addr_rs < pic_area_in_ctbs; ctb_addr_rs++) { -+ int tb_x = ctb_addr_rs % sps->ctb_width; -+ int tb_y = ctb_addr_rs / sps->ctb_width; -+ int tile_x = 0; -+ int tile_y = 0; -+ int val = 0; -+ -+ for (i = 0; i < pps->num_tile_columns; i++) { -+ if (tb_x < pps->col_bd[i + 1]) { -+ tile_x = i; -+ break; -+ } -+ } -+ -+ for (i = 0; i < pps->num_tile_rows; i++) { -+ if (tb_y < pps->row_bd[i + 1]) { -+ tile_y = i; -+ break; -+ } -+ } -+ -+ for (i = 0; i < tile_x; i++) -+ val += pps->row_height[tile_y] * pps->column_width[i]; -+ for (i = 0; i < tile_y; i++) -+ val += sps->ctb_width * pps->row_height[i]; -+ -+ val += (tb_y - pps->row_bd[tile_y]) * pps->column_width[tile_x] + -+ tb_x - pps->col_bd[tile_x]; -+ -+ pps->ctb_addr_rs_to_ts[ctb_addr_rs] = val; -+ pps->ctb_addr_ts_to_rs[val] = ctb_addr_rs; -+ } -+ -+ { -+ uint8_t * pflags = pps->ctb_ts_flags; -+ uint16_t * ptid = pps->tile_id; -+ -+ for (j = 0, tile_id = 0; j < pps->num_tile_rows; j++) -+ { -+ for (i = 0; i < pps->num_tile_columns; i++, tile_id++) -+ { -+ const unsigned int tile_w = pps->column_width[i]; -+ -+ pflags[0] |= CTB_TS_FLAGS_CIREQ; -+ -+ for (x = 0; x != tile_w; ++x) { -+ pflags[x] |= CTB_TS_FLAGS_TOT; -+ } -+ -+ for (y = pps->row_bd[j]; y < pps->row_bd[j + 1]; y++) -+ { -+ pflags[0] |= CTB_TS_FLAGS_SOTL; -+ -+ if (pps->entropy_coding_sync_enabled_flag) -+ { -+ if (pps->column_width[i] != 1) -+ pflags[1] |= CTB_TS_FLAGS_CSAVE; -+ else -+ pflags[0] |= CTB_TS_FLAGS_CIREQ; -+ -+ if ((pflags[0] & CTB_TS_FLAGS_CIREQ) == 0) -+ pflags[0] |= CTB_TS_FLAGS_CLOAD; -+ } -+ -+ for (x = 0; x != tile_w; ++x) -+ *ptid++ = tile_id; -+ -+ pflags += tile_w; -+ pflags[-1] |= CTB_TS_FLAGS_EOTL; -+ if (i + 1 == pps->num_tile_columns) -+ pflags[-1] |= CTB_TS_FLAGS_EOL; -+ } -+ -+ pflags[-1] |= CTB_TS_FLAGS_EOT; -+ } -+ } -+ } -+ -+ { -+ unsigned int ts = 0; -+ for (j = 0; j < pps->num_tile_rows; j++) -+ for (i = 0; i < pps->num_tile_columns; i++) -+ { -+ const unsigned int size = pps->column_width[i] * pps->row_height[j]; -+ pps->tile_size[j * pps->num_tile_columns + i] = size; -+ pps->tile_pos_ts[j * pps->num_tile_columns + i] = ts; -+ ts += size; -+ } -+ } -+ -+ return 0; -+} -+ -+int ff_hevc_rpi_decode_nal_pps(GetBitContext * const gb, AVCodecContext * const avctx, -+ HEVCRpiParamSets * const ps) -+{ -+ const HEVCRpiSPS *sps = NULL; -+ int i, ret = 0; -+ unsigned int pps_id = 0; -+ ptrdiff_t nal_size; -+ unsigned log2_parallel_merge_level_minus2; -+ -+ AVBufferRef *pps_buf; -+ HEVCRpiPPS *pps = av_mallocz(sizeof(*pps)); -+ -+ if (!pps) -+ return AVERROR(ENOMEM); -+ -+ pps_buf = av_buffer_create((uint8_t *)pps, sizeof(*pps), -+ hevc_pps_free, NULL, 0); -+ if (!pps_buf) { -+ av_freep(&pps); -+ return AVERROR(ENOMEM); -+ } -+ -+ av_log(avctx, AV_LOG_DEBUG, "Decoding PPS\n"); -+ -+ nal_size = gb->buffer_end - gb->buffer; -+ if (nal_size > sizeof(pps->data)) { -+ av_log(avctx, AV_LOG_WARNING, "Truncating likely oversized PPS " -+ "(%"PTRDIFF_SPECIFIER" > %"SIZE_SPECIFIER")\n", -+ nal_size, sizeof(pps->data)); -+ pps->data_size = sizeof(pps->data); -+ } else { -+ pps->data_size = nal_size; -+ } -+ memcpy(pps->data, gb->buffer, pps->data_size); -+ -+ // Default values -+ pps->loop_filter_across_tiles_enabled_flag = 1; -+ pps->num_tile_columns = 1; -+ pps->num_tile_rows = 1; -+ pps->uniform_spacing_flag = 1; -+ pps->disable_dbf = 0; -+ pps->beta_offset = 0; -+ pps->tc_offset = 0; -+ pps->log2_max_transform_skip_block_size = 2; -+ -+ // Coded parameters -+ pps_id = get_ue_golomb_long(gb); -+ if (pps_id >= HEVC_MAX_PPS_COUNT) { -+ av_log(avctx, AV_LOG_ERROR, "PPS id out of range: %d\n", pps_id); -+ ret = AVERROR_INVALIDDATA; -+ goto err; -+ } -+ pps->sps_id = get_ue_golomb_long(gb); -+ if (pps->sps_id >= HEVC_MAX_SPS_COUNT) { -+ av_log(avctx, AV_LOG_ERROR, "SPS id out of range: %d\n", pps->sps_id); -+ ret = AVERROR_INVALIDDATA; -+ goto err; -+ } -+ if (!ps->sps_list[pps->sps_id]) { -+ av_log(avctx, AV_LOG_ERROR, "SPS %u does not exist.\n", pps->sps_id); -+ ret = AVERROR_INVALIDDATA; -+ goto err; -+ } -+ sps = (HEVCRpiSPS *)ps->sps_list[pps->sps_id]->data; -+ -+ pps->dependent_slice_segments_enabled_flag = get_bits1(gb); -+ pps->output_flag_present_flag = get_bits1(gb); -+ pps->num_extra_slice_header_bits = get_bits(gb, 3); -+ -+ pps->sign_data_hiding_flag = get_bits1(gb); -+ -+ pps->cabac_init_present_flag = get_bits1(gb); -+ -+ pps->num_ref_idx_l0_default_active = get_ue_golomb_long(gb) + 1; -+ if (pps->num_ref_idx_l0_default_active < 1 || pps->num_ref_idx_l0_default_active > 15) { -+ av_log(avctx, AV_LOG_ERROR, "pps->num_ref_idx_l0_default_active invalid\n"); -+ ret = AVERROR_INVALIDDATA; -+ goto err; -+ } -+ pps->num_ref_idx_l1_default_active = get_ue_golomb_long(gb) + 1; -+ if (pps->num_ref_idx_l1_default_active < 1 || pps->num_ref_idx_l1_default_active > 15) { -+ av_log(avctx, AV_LOG_ERROR, "pps->num_ref_idx_l1_default_active invalid\n"); -+ ret = AVERROR_INVALIDDATA; -+ goto err; -+ } -+ -+ pps->pic_init_qp_minus26 = get_se_golomb(gb); -+ if (pps->pic_init_qp_minus26 > 25 || pps->pic_init_qp_minus26 < -(26 + sps->qp_bd_offset)) { -+ av_log(avctx, AV_LOG_ERROR, -+ "init_qp_minus26 %d is outside the valid range " -+ "[%d, %d].\n", -+ pps->pic_init_qp_minus26, -+ -(26 + sps->qp_bd_offset), 25); -+ ret = AVERROR_INVALIDDATA; -+ goto err; -+ } -+ -+ pps->constrained_intra_pred_flag = get_bits1(gb); -+ pps->transform_skip_enabled_flag = get_bits1(gb); -+ -+ pps->cu_qp_delta_enabled_flag = get_bits1(gb); -+ pps->log2_min_cu_qp_delta_size = sps->log2_ctb_size; -+ if (pps->cu_qp_delta_enabled_flag) -+ { -+ const unsigned int diff_cu_qp_delta_depth = get_ue_golomb_long(gb); -+ -+ if (diff_cu_qp_delta_depth > sps->log2_diff_max_min_coding_block_size) { -+ av_log(avctx, AV_LOG_ERROR, "diff_cu_qp_delta_depth %d is invalid\n", -+ diff_cu_qp_delta_depth); -+ ret = AVERROR_INVALIDDATA; -+ goto err; -+ } -+ -+ pps->log2_min_cu_qp_delta_size = sps->log2_ctb_size - diff_cu_qp_delta_depth; -+ } -+ -+ pps->cb_qp_offset = get_se_golomb(gb); -+ if (pps->cb_qp_offset < -12 || pps->cb_qp_offset > 12) { -+ av_log(avctx, AV_LOG_ERROR, "pps_cb_qp_offset out of range: %d\n", -+ pps->cb_qp_offset); -+ ret = AVERROR_INVALIDDATA; -+ goto err; -+ } -+ pps->cr_qp_offset = get_se_golomb(gb); -+ if (pps->cr_qp_offset < -12 || pps->cr_qp_offset > 12) { -+ av_log(avctx, AV_LOG_ERROR, "pps_cr_qp_offset out of range: %d\n", -+ pps->cr_qp_offset); -+ ret = AVERROR_INVALIDDATA; -+ goto err; -+ } -+ pps->pic_slice_level_chroma_qp_offsets_present_flag = get_bits1(gb); -+ -+ pps->weighted_pred_flag = get_bits1(gb); -+ pps->weighted_bipred_flag = get_bits1(gb); -+ -+ pps->transquant_bypass_enable_flag = get_bits1(gb); -+ pps->tiles_enabled_flag = get_bits1(gb); -+ pps->entropy_coding_sync_enabled_flag = get_bits1(gb); -+ -+ if (pps->tiles_enabled_flag) { -+ pps->num_tile_columns = get_ue_golomb_long(gb) + 1; -+ pps->num_tile_rows = get_ue_golomb_long(gb) + 1; -+ if (pps->num_tile_columns <= 0 || -+ pps->num_tile_columns >= sps->width) { -+ av_log(avctx, AV_LOG_ERROR, "num_tile_columns_minus1 out of range: %d\n", -+ pps->num_tile_columns - 1); -+ ret = AVERROR_INVALIDDATA; -+ goto err; -+ } -+ if (pps->num_tile_rows <= 0 || -+ pps->num_tile_rows >= sps->height) { -+ av_log(avctx, AV_LOG_ERROR, "num_tile_rows_minus1 out of range: %d\n", -+ pps->num_tile_rows - 1); -+ ret = AVERROR_INVALIDDATA; -+ goto err; -+ } -+ -+ pps->column_width = av_malloc_array(pps->num_tile_columns, sizeof(*pps->column_width)); -+ pps->row_height = av_malloc_array(pps->num_tile_rows, sizeof(*pps->row_height)); -+ if (!pps->column_width || !pps->row_height) { -+ ret = AVERROR(ENOMEM); -+ goto err; -+ } -+ -+ pps->uniform_spacing_flag = get_bits1(gb); -+ if (!pps->uniform_spacing_flag) { -+ uint64_t sum = 0; -+ for (i = 0; i < pps->num_tile_columns - 1; i++) { -+ pps->column_width[i] = get_ue_golomb_long(gb) + 1; -+ sum += pps->column_width[i]; -+ } -+ if (sum >= sps->ctb_width) { -+ av_log(avctx, AV_LOG_ERROR, "Invalid tile widths.\n"); -+ ret = AVERROR_INVALIDDATA; -+ goto err; -+ } -+ pps->column_width[pps->num_tile_columns - 1] = sps->ctb_width - sum; -+ -+ sum = 0; -+ for (i = 0; i < pps->num_tile_rows - 1; i++) { -+ pps->row_height[i] = get_ue_golomb_long(gb) + 1; -+ sum += pps->row_height[i]; -+ } -+ if (sum >= sps->ctb_height) { -+ av_log(avctx, AV_LOG_ERROR, "Invalid tile heights.\n"); -+ ret = AVERROR_INVALIDDATA; -+ goto err; -+ } -+ pps->row_height[pps->num_tile_rows - 1] = sps->ctb_height - sum; -+ } -+ pps->loop_filter_across_tiles_enabled_flag = get_bits1(gb); -+ } -+ -+ pps->seq_loop_filter_across_slices_enabled_flag = get_bits1(gb); -+ -+ pps->deblocking_filter_control_present_flag = get_bits1(gb); -+ if (pps->deblocking_filter_control_present_flag) { -+ pps->deblocking_filter_override_enabled_flag = get_bits1(gb); -+ pps->disable_dbf = get_bits1(gb); -+ if (!pps->disable_dbf) { -+ int beta_offset_div2 = get_se_golomb(gb); -+ int tc_offset_div2 = get_se_golomb(gb) ; -+ if (beta_offset_div2 < -6 || beta_offset_div2 > 6) { -+ av_log(avctx, AV_LOG_ERROR, "pps_beta_offset_div2 out of range: %d\n", -+ beta_offset_div2); -+ ret = AVERROR_INVALIDDATA; -+ goto err; -+ } -+ if (tc_offset_div2 < -6 || tc_offset_div2 > 6) { -+ av_log(avctx, AV_LOG_ERROR, "pps_tc_offset_div2 out of range: %d\n", -+ tc_offset_div2); -+ ret = AVERROR_INVALIDDATA; -+ goto err; -+ } -+ pps->beta_offset = 2 * beta_offset_div2; -+ pps->tc_offset = 2 * tc_offset_div2; -+ } -+ } -+ -+ pps->scaling_list_data_present_flag = get_bits1(gb); -+ if (pps->scaling_list_data_present_flag) { -+ set_default_scaling_list_data(&pps->scaling_list); -+ ret = scaling_list_data(gb, avctx, &pps->scaling_list, sps); -+ if (ret < 0) -+ goto err; -+ } -+ pps->lists_modification_present_flag = get_bits1(gb); -+ log2_parallel_merge_level_minus2 = get_ue_golomb_long(gb); -+ if (log2_parallel_merge_level_minus2 > sps->log2_ctb_size) { -+ av_log(avctx, AV_LOG_ERROR, "log2_parallel_merge_level_minus2 out of range: %d\n", -+ log2_parallel_merge_level_minus2); -+ ret = AVERROR_INVALIDDATA; -+ goto err; -+ } -+ pps->log2_parallel_merge_level = log2_parallel_merge_level_minus2 + 2; -+ -+ pps->slice_header_extension_present_flag = get_bits1(gb); -+ -+ if (get_bits1(gb)) { // pps_extension_present_flag -+ int pps_range_extensions_flag = get_bits1(gb); -+ skip_bits(gb, 7); // pps_extension_7bits -+ if (sps->ptl.general_ptl.profile_idc == FF_PROFILE_HEVC_REXT && pps_range_extensions_flag) { -+ if ((ret = pps_range_extensions(gb, avctx, pps, sps)) < 0) -+ goto err; -+ } -+ } -+ -+ ret = setup_pps(avctx, pps, sps); -+ if (ret < 0) -+ goto err; -+ -+ if (get_bits_left(gb) < 0) { -+ av_log(avctx, AV_LOG_ERROR, -+ "Overread PPS by %d bits\n", -get_bits_left(gb)); -+ ret = AVERROR_INVALIDDATA; -+ goto err; -+ } -+ -+ remove_pps(ps, pps_id); -+ ps->pps_list[pps_id] = pps_buf; -+ -+ return 0; -+ -+err: -+ av_buffer_unref(&pps_buf); -+ return ret; -+} -+ -+int ff_hevc_rpi_compute_poc(const HEVCRpiSPS *sps, int pocTid0, int poc_lsb, int nal_unit_type) -+{ -+ int max_poc_lsb = 1 << sps->log2_max_poc_lsb; -+ int prev_poc_lsb = pocTid0 % max_poc_lsb; -+ int prev_poc_msb = pocTid0 - prev_poc_lsb; -+ int poc_msb; -+ -+ if (poc_lsb < prev_poc_lsb && prev_poc_lsb - poc_lsb >= max_poc_lsb / 2) -+ poc_msb = prev_poc_msb + max_poc_lsb; -+ else if (poc_lsb > prev_poc_lsb && poc_lsb - prev_poc_lsb > max_poc_lsb / 2) -+ poc_msb = prev_poc_msb - max_poc_lsb; -+ else -+ poc_msb = prev_poc_msb; -+ -+ // For BLA picture types, POCmsb is set to 0. -+ if (nal_unit_type == HEVC_NAL_BLA_W_LP || -+ nal_unit_type == HEVC_NAL_BLA_W_RADL || -+ nal_unit_type == HEVC_NAL_BLA_N_LP) -+ poc_msb = 0; -+ -+ return poc_msb + poc_lsb; -+} ---- /dev/null -+++ b/libavcodec/rpi_hevc_ps.h -@@ -0,0 +1,449 @@ -+/* -+ * HEVC parameter set parsing -+ * -+ * This file is part of FFmpeg. -+ * -+ * FFmpeg is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * FFmpeg is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with FFmpeg; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+ */ -+ -+#ifndef AVCODEC_RPI_HEVC_PS_H -+#define AVCODEC_RPI_HEVC_PS_H -+ -+#include -+ -+#include "libavutil/buffer.h" -+#include "libavutil/pixfmt.h" -+#include "libavutil/rational.h" -+ -+#include "avcodec.h" -+#include "get_bits.h" -+#include "hevc.h" -+ -+typedef struct ShortTermRPS { -+ unsigned int num_negative_pics; -+ int num_delta_pocs; -+ int rps_idx_num_delta_pocs; -+ int32_t delta_poc[32]; -+ uint8_t used[32]; -+} ShortTermRPS; -+ -+typedef struct LongTermRPS { -+ int poc[32]; -+ uint8_t used[32]; -+ uint8_t nb_refs; -+} LongTermRPS; -+ -+typedef struct RpiSliceHeader { -+ unsigned int pps_id; -+ -+ ///< address (in raster order) of the first block in the current slice segment -+ unsigned int slice_segment_addr; -+ ///< address (in raster order) of the first block in the current slice -+ unsigned int slice_addr; -+ -+ enum HEVCSliceType slice_type; -+ -+ int pic_order_cnt_lsb; -+ -+ uint8_t first_slice_in_pic_flag; -+ uint8_t dependent_slice_segment_flag; -+ uint8_t pic_output_flag; -+ uint8_t colour_plane_id; -+ -+ ///< RPS coded in the slice header itself is stored here -+ int short_term_ref_pic_set_sps_flag; -+ int short_term_ref_pic_set_size; -+ ShortTermRPS slice_rps; -+ const ShortTermRPS *short_term_rps; -+ int long_term_ref_pic_set_size; -+ LongTermRPS long_term_rps; -+ unsigned int list_entry_lx[2][32]; -+ -+ uint8_t rpl_modification_flag[2]; -+ uint8_t no_output_of_prior_pics_flag; -+ uint8_t slice_temporal_mvp_enabled_flag; -+ -+ unsigned int nb_refs[2]; -+ -+ uint8_t slice_sample_adaptive_offset_flag[3]; -+ uint8_t mvd_l1_zero_flag; -+ -+ uint8_t cabac_init_flag; -+ uint8_t disable_deblocking_filter_flag; ///< slice_header_disable_deblocking_filter_flag -+ uint8_t slice_loop_filter_across_slices_enabled_flag; -+ uint8_t collocated_list; -+ -+ uint8_t no_dblk_boundary_flags; -+ -+ unsigned int collocated_ref_idx; -+ -+ int slice_qp_delta; -+ int slice_cb_qp_offset; // -12, +12 -+ int slice_cr_qp_offset; // -12, +12 -+ -+ uint8_t cu_chroma_qp_offset_enabled_flag; -+ -+ int beta_offset; ///< beta_offset_div2 * 2 -+ int tc_offset; ///< tc_offset_div2 * 2 -+ -+ unsigned int max_num_merge_cand; ///< 5 - 5_minus_max_num_merge_cand -+ -+ unsigned *entry_point_offset; -+ int * offset; -+ int * size; -+ int num_entry_point_offsets; -+ int offsets_allocated; -+ -+ uint8_t offload_wpp; -+ uint8_t offload_tiles; -+ -+ int8_t slice_qp; -+ -+ uint8_t luma_log2_weight_denom; -+ uint8_t chroma_log2_weight_denom; -+ -+ int16_t luma_weight_l0[16]; // -128, +255 -+ int16_t luma_offset_l0[16]; -+ int16_t chroma_weight_l0[16][2]; -+ int16_t chroma_offset_l0[16][2]; -+ -+ int16_t luma_weight_l1[16]; -+ int16_t luma_offset_l1[16]; -+ int16_t chroma_weight_l1[16][2]; -+ int16_t chroma_offset_l1[16][2]; -+ -+} RpiSliceHeader; -+ -+typedef struct HEVCRpiWindow { -+ uint16_t left_offset; -+ uint16_t right_offset; -+ uint16_t top_offset; -+ uint16_t bottom_offset; -+} HEVCRpiWindow; -+ -+typedef struct VUI { -+ AVRational sar; -+ -+ int overscan_info_present_flag; -+ int overscan_appropriate_flag; -+ -+ int video_signal_type_present_flag; -+ int video_format; -+ int video_full_range_flag; -+ int colour_description_present_flag; -+ uint8_t colour_primaries; -+ uint8_t transfer_characteristic; -+ uint8_t matrix_coeffs; -+ -+ int chroma_loc_info_present_flag; -+ int chroma_sample_loc_type_top_field; -+ int chroma_sample_loc_type_bottom_field; -+ int neutra_chroma_indication_flag; -+ -+ int field_seq_flag; -+ int frame_field_info_present_flag; -+ -+ int default_display_window_flag; -+ HEVCRpiWindow def_disp_win; -+ -+ int vui_timing_info_present_flag; -+ uint32_t vui_num_units_in_tick; -+ uint32_t vui_time_scale; -+ int vui_poc_proportional_to_timing_flag; -+ int vui_num_ticks_poc_diff_one_minus1; -+ int vui_hrd_parameters_present_flag; -+ -+ int bitstream_restriction_flag; -+ int tiles_fixed_structure_flag; -+ int motion_vectors_over_pic_boundaries_flag; -+ int restricted_ref_pic_lists_flag; -+ int min_spatial_segmentation_idc; -+ int max_bytes_per_pic_denom; -+ int max_bits_per_min_cu_denom; -+ int log2_max_mv_length_horizontal; -+ int log2_max_mv_length_vertical; -+} VUI; -+ -+typedef struct PTLCommon { -+ uint8_t profile_space; -+ uint8_t tier_flag; -+ uint8_t profile_idc; -+ uint8_t profile_compatibility_flag[32]; -+ uint8_t level_idc; -+ uint8_t progressive_source_flag; -+ uint8_t interlaced_source_flag; -+ uint8_t non_packed_constraint_flag; -+ uint8_t frame_only_constraint_flag; -+} PTLCommon; -+ -+typedef struct PTL { -+ PTLCommon general_ptl; -+ PTLCommon sub_layer_ptl[HEVC_MAX_SUB_LAYERS]; -+ -+ uint8_t sub_layer_profile_present_flag[HEVC_MAX_SUB_LAYERS]; -+ uint8_t sub_layer_level_present_flag[HEVC_MAX_SUB_LAYERS]; -+} PTL; -+ -+typedef struct HEVCRpiVPS { -+ uint8_t vps_temporal_id_nesting_flag; -+ int vps_max_layers; -+ int vps_max_sub_layers; ///< vps_max_temporal_layers_minus1 + 1 -+ -+ PTL ptl; -+ int vps_sub_layer_ordering_info_present_flag; -+ unsigned int vps_max_dec_pic_buffering[HEVC_MAX_SUB_LAYERS]; -+ unsigned int vps_num_reorder_pics[HEVC_MAX_SUB_LAYERS]; -+ unsigned int vps_max_latency_increase[HEVC_MAX_SUB_LAYERS]; -+ int vps_max_layer_id; -+ int vps_num_layer_sets; ///< vps_num_layer_sets_minus1 + 1 -+ uint8_t vps_timing_info_present_flag; -+ uint32_t vps_num_units_in_tick; -+ uint32_t vps_time_scale; -+ uint8_t vps_poc_proportional_to_timing_flag; -+ int vps_num_ticks_poc_diff_one; ///< vps_num_ticks_poc_diff_one_minus1 + 1 -+ int vps_num_hrd_parameters; -+ -+ uint8_t data[4096]; -+ int data_size; -+} HEVCRpiVPS; -+ -+typedef struct ScalingList { -+ /* This is a little wasteful, since sizeID 0 only needs 8 coeffs, -+ * and size ID 3 only has 2 arrays, not 6. */ -+ uint8_t sl[4][6][64]; -+ uint8_t sl_dc[2][6]; -+} ScalingList; -+ -+typedef struct HEVCRpiSPS { -+ unsigned vps_id; -+ uint8_t chroma_format_idc; -+ uint8_t separate_colour_plane_flag; -+ -+ HEVCRpiWindow output_window; -+ -+ HEVCRpiWindow pic_conf_win; -+ -+ uint16_t wp_offset_half_range; // WpOffsetHalfRange -+ -+ uint8_t bit_depth; -+ -+// int bit_depth_chroma; // We only support lum_bit_depth = chroma_bit_depth -+ uint8_t pixel_shift; -+ enum AVPixelFormat pix_fmt; -+ -+ unsigned int log2_max_poc_lsb; -+ -+ int max_sub_layers; -+ struct { -+ int max_dec_pic_buffering; -+ int num_reorder_pics; -+ int max_latency_increase; -+ } temporal_layer[HEVC_MAX_SUB_LAYERS]; -+ uint8_t temporal_id_nesting_flag; -+ -+ uint8_t scaling_list_enable_flag; -+ ScalingList scaling_list; -+ -+ unsigned int nb_st_rps; -+ ShortTermRPS st_rps[HEVC_MAX_SHORT_TERM_REF_PIC_SETS]; -+ -+ uint8_t amp_enabled_flag; -+ uint8_t sao_enabled; -+ -+ uint8_t long_term_ref_pics_present_flag; -+ uint16_t lt_ref_pic_poc_lsb_sps[HEVC_MAX_LONG_TERM_REF_PICS]; -+ uint8_t used_by_curr_pic_lt_sps_flag[HEVC_MAX_LONG_TERM_REF_PICS]; -+ uint8_t num_long_term_ref_pics_sps; -+ -+ struct { -+ uint8_t bit_depth; -+ uint8_t bit_depth_chroma; -+ uint8_t log2_min_pcm_cb_size; -+ uint8_t log2_max_pcm_cb_size; -+ uint8_t loop_filter_disable_flag; -+ } pcm; -+ char sps_temporal_mvp_enabled_flag; -+// char sps_strong_intra_smoothing_enable_flag; -> intra_filtes_disable -+ -+ uint8_t log2_min_cb_size; // 3..6 -+ uint8_t log2_diff_max_min_coding_block_size; -+ uint8_t log2_min_tb_size; // 2..5 -+ uint8_t log2_max_trafo_size; -+ uint8_t log2_ctb_size; // 4..6 -+// unsigned int log2_min_pu_size; // 2..5 (min_cb_size - 1) -+#define LOG2_MIN_PU_SIZE 2 -+#define LOG2_MIN_CU_SIZE 3 -+ -+ uint8_t max_transform_hierarchy_depth_inter; -+ uint8_t max_transform_hierarchy_depth_intra; -+ -+ char transform_skip_rotation_enabled_flag; -+ char transform_skip_context_enabled_flag; -+ char implicit_rdpcm_enabled_flag; -+ char explicit_rdpcm_enabled_flag; -+// char intra_smoothing_disabled_flag; -> intra_filtes_disable -+ char high_precision_offsets_enabled_flag; -+ char persistent_rice_adaptation_enabled_flag; -+ -+ uint8_t intra_filters_disable; -+ -+ ///< coded frame dimension in various units -+ int width; -+ int height; -+ int ctb_width; -+ int ctb_height; -+ int ctb_size; // Pic size in CTBs not size of a CTB -+ int min_cb_width; -+ int min_cb_height; -+ int min_tb_width; -+ int min_tb_height; -+ int min_pu_width; -+ int min_pu_height; -+ int pcm_width; -+ int pcm_height; -+ int tb_mask; -+ -+ int hshift[3]; -+ int vshift[3]; -+ -+ int qp_bd_offset; -+ -+ uint8_t data[4096]; -+ int data_size; -+ -+ VUI vui; -+ PTL ptl; -+} HEVCRpiSPS; -+ -+#define CTB_TS_FLAGS_SOTL (1U << 0) // X start of tile line -+#define CTB_TS_FLAGS_EOTL (1U << 1) // Last CTB of a tile line -+#define CTB_TS_FLAGS_EOL (1U << 2) // Last CTB of a complete line -+#define CTB_TS_FLAGS_EOT (1U << 3) // Last CTB of a tile -+#define CTB_TS_FLAGS_CSAVE (1U << 4) -+#define CTB_TS_FLAGS_CIREQ (1U << 5) // Cabac init request -+#define CTB_TS_FLAGS_TOT (1U << 6) // CTB on top row of a tile -+#define CTB_TS_FLAGS_CLOAD (1U << 7) -+ -+typedef struct HEVCRpiPPS { -+ unsigned int sps_id; ///< seq_parameter_set_id -+ -+ uint8_t sign_data_hiding_flag; -+ -+ uint8_t cabac_init_present_flag; -+ -+ int num_ref_idx_l0_default_active; ///< num_ref_idx_l0_default_active_minus1 + 1 -+ int num_ref_idx_l1_default_active; ///< num_ref_idx_l1_default_active_minus1 + 1 -+ int pic_init_qp_minus26; -+ -+ uint8_t constrained_intra_pred_flag; -+ uint8_t transform_skip_enabled_flag; -+ -+ uint8_t cu_qp_delta_enabled_flag; -+ uint8_t log2_min_cu_qp_delta_size; -+ int cb_qp_offset; // -12..12 -+ int cr_qp_offset; // -12..12 -+ const uint8_t * qp_dblk_x[3]; -+ const int8_t * qp_bd_x[3]; -+ -+ uint8_t pic_slice_level_chroma_qp_offsets_present_flag; -+ uint8_t weighted_pred_flag; -+ uint8_t weighted_bipred_flag; -+ uint8_t output_flag_present_flag; -+ uint8_t transquant_bypass_enable_flag; -+ -+ uint8_t dependent_slice_segments_enabled_flag; -+ uint8_t tiles_enabled_flag; -+ uint8_t entropy_coding_sync_enabled_flag; -+ -+ uint8_t tile_wpp_inter_disable; -+ int num_tile_columns; ///< num_tile_columns_minus1 + 1 -+ int num_tile_rows; ///< num_tile_rows_minus1 + 1 -+ uint8_t uniform_spacing_flag; -+ uint8_t loop_filter_across_tiles_enabled_flag; -+ -+ uint8_t seq_loop_filter_across_slices_enabled_flag; -+ -+ uint8_t deblocking_filter_control_present_flag; -+ uint8_t deblocking_filter_override_enabled_flag; -+ uint8_t disable_dbf; -+ int beta_offset; ///< beta_offset_div2 * 2 -+ int tc_offset; ///< tc_offset_div2 * 2 -+ -+ uint8_t scaling_list_data_present_flag; -+ ScalingList scaling_list; -+ -+ uint8_t lists_modification_present_flag; -+ int log2_parallel_merge_level; ///< log2_parallel_merge_level_minus2 + 2 -+ int num_extra_slice_header_bits; -+ uint8_t slice_header_extension_present_flag; -+ uint8_t log2_max_transform_skip_block_size; -+ uint8_t cross_component_prediction_enabled_flag; -+ uint8_t chroma_qp_offset_list_enabled_flag; -+ uint8_t diff_cu_chroma_qp_offset_depth; -+ uint8_t chroma_qp_offset_list_len_minus1; -+ int8_t cb_qp_offset_list[6]; -+ int8_t cr_qp_offset_list[6]; -+ uint8_t log2_sao_offset_scale_luma; -+ uint8_t log2_sao_offset_scale_chroma; -+ -+ // Inferred parameters -+ uint16_t *column_width; ///< ColumnWidth -+ uint16_t *row_height; ///< RowHeight -+ uint16_t *col_bd; ///< ColBd -+ uint16_t *row_bd; ///< RowBd -+ uint16_t *col_idxX; -+ -+ // We can limit these to uint16_t given our other size limits -+ uint16_t *ctb_addr_rs_to_ts; ///< CtbAddrRSToTS -+ uint16_t *ctb_addr_ts_to_rs; ///< CtbAddrTSToRS -+ uint16_t *tile_id; ///< TileId -+ uint16_t *tile_pos_ts; ///< TilePosRS -+ uint16_t *tile_size; ///< TileSize -+ uint8_t * ctb_ts_flags; -+ -+ uint8_t data[4096]; -+ int data_size; -+} HEVCRpiPPS; -+ -+typedef struct HEVCRpiParamSets { -+ /* currently active parameter sets */ -+ const HEVCRpiVPS *vps; -+ const HEVCRpiSPS *sps; -+ const HEVCRpiPPS *pps; -+ -+ AVBufferRef *vps_list[HEVC_MAX_VPS_COUNT]; -+ AVBufferRef *sps_list[HEVC_MAX_SPS_COUNT]; -+ AVBufferRef *pps_list[HEVC_MAX_PPS_COUNT]; -+} HEVCRpiParamSets; -+ -+int ff_hevc_rpi_decode_nal_vps(GetBitContext *gb, AVCodecContext *avctx, -+ HEVCRpiParamSets *ps); -+int ff_hevc_rpi_decode_nal_sps(GetBitContext *gb, AVCodecContext *avctx, -+ HEVCRpiParamSets *ps, int apply_defdispwin); -+int ff_hevc_rpi_decode_nal_pps(GetBitContext *gb, AVCodecContext *avctx, -+ HEVCRpiParamSets *ps); -+ -+int ff_hevc_rpi_decode_short_term_rps(GetBitContext *gb, AVCodecContext *avctx, -+ ShortTermRPS *rps, const HEVCRpiSPS *sps, int is_slice_header); -+ -+int ff_hevc_rpi_encode_nal_vps(HEVCRpiVPS *vps, unsigned int id, -+ uint8_t *buf, int buf_size); -+ -+/** -+ * Compute POC of the current frame and return it. -+ */ -+int ff_hevc_rpi_compute_poc(const HEVCRpiSPS *sps, int pocTid0, int poc_lsb, int nal_unit_type); -+ -+#endif /* AVCODEC_RPI_HEVC_PS_H */ ---- /dev/null -+++ b/libavcodec/rpi_hevc_refs.c -@@ -0,0 +1,485 @@ -+/* -+ * HEVC video decoder -+ * -+ * Copyright (C) 2012 - 2013 Guillaume Martres -+ * Copyright (C) 2012 - 2013 Gildas Cocherel -+ * -+ * This file is part of FFmpeg. -+ * -+ * FFmpeg is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * FFmpeg is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with FFmpeg; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+ */ -+ -+#include "libavutil/avassert.h" -+#include "libavutil/pixdesc.h" -+#include "libavutil/rpi_sand_fns.h" -+#include "internal.h" -+#include "thread.h" -+#include "hevc.h" -+#include "rpi_hevcdec.h" -+ -+void ff_hevc_rpi_unref_frame(HEVCRpiContext *s, HEVCRpiFrame *frame, int flags) -+{ -+ /* frame->frame can be NULL if context init failed */ -+ if (!frame->frame || !frame->frame->buf[0]) -+ return; -+ -+ frame->flags &= ~flags; -+ if (!frame->flags) { -+ ff_thread_release_buffer(s->avctx, &frame->tf); -+ -+ av_buffer_unref(&frame->col_mvf_buf); // OK if already NULL -+ frame->col_mvf = NULL; -+ -+ frame->collocated_ref = NULL; -+ } -+} -+ -+void ff_hevc_rpi_clear_refs(HEVCRpiContext *s) -+{ -+ int i; -+ for (i = 0; i < FF_ARRAY_ELEMS(s->DPB); i++) -+ ff_hevc_rpi_unref_frame(s, &s->DPB[i], -+ HEVC_FRAME_FLAG_SHORT_REF | -+ HEVC_FRAME_FLAG_LONG_REF); -+} -+ -+void ff_hevc_rpi_flush_dpb(HEVCRpiContext *s) -+{ -+ int i; -+ for (i = 0; i < FF_ARRAY_ELEMS(s->DPB); i++) -+ ff_hevc_rpi_unref_frame(s, &s->DPB[i], ~0); -+} -+ -+static HEVCRpiFrame *alloc_frame(HEVCRpiContext * const s) -+{ -+ int i, ret; -+ for (i = 0; i < FF_ARRAY_ELEMS(s->DPB); i++) { -+ HEVCRpiFrame * const frame = &s->DPB[i]; -+ if (frame->frame->buf[0]) -+ continue; -+ -+ ret = ff_thread_get_buffer(s->avctx, &frame->tf, -+ AV_GET_BUFFER_FLAG_REF); -+ if (ret < 0) -+ return NULL; -+ -+ frame->col_mvf = NULL; -+ frame->col_mvf_buf = NULL; -+ if (s->used_for_ref && !s->is_irap) -+ { -+ frame->col_mvf_buf = av_buffer_pool_get(s->col_mvf_pool); -+ if (!frame->col_mvf_buf) -+ goto fail; -+ frame->col_mvf = (ColMvField *)frame->col_mvf_buf->data; -+ } -+ -+ frame->frame->top_field_first = s->sei.picture_timing.picture_struct == AV_PICTURE_STRUCTURE_TOP_FIELD; -+ frame->frame->interlaced_frame = (s->sei.picture_timing.picture_struct == AV_PICTURE_STRUCTURE_TOP_FIELD) || (s->sei.picture_timing.picture_struct == AV_PICTURE_STRUCTURE_BOTTOM_FIELD); -+ -+ return frame; -+ -+fail: -+ ff_hevc_rpi_unref_frame(s, frame, ~0); -+ return NULL; -+ } -+ av_log(s->avctx, AV_LOG_ERROR, "Error allocating frame, DPB full.\n"); -+ return NULL; -+} -+ -+int ff_hevc_rpi_set_new_ref(HEVCRpiContext *s, AVFrame **frame, int poc) -+{ -+ HEVCRpiFrame *ref; -+ int i; -+ -+ /* check that this POC doesn't already exist */ -+ for (i = 0; i < FF_ARRAY_ELEMS(s->DPB); i++) { -+ HEVCRpiFrame *frame = &s->DPB[i]; -+ -+ if (frame->frame->buf[0] && frame->sequence == s->seq_decode && -+ frame->poc == poc) { -+ av_log(s->avctx, AV_LOG_ERROR, "Duplicate POC in a sequence: %d.\n", -+ poc); -+ return AVERROR_INVALIDDATA; -+ } -+ } -+ -+ ref = alloc_frame(s); -+ if (!ref) -+ return AVERROR(ENOMEM); -+ -+ *frame = ref->frame; -+ s->ref = ref; -+ -+ if (s->sh.pic_output_flag) -+ ref->flags = HEVC_FRAME_FLAG_OUTPUT | HEVC_FRAME_FLAG_SHORT_REF; -+ else -+ ref->flags = HEVC_FRAME_FLAG_SHORT_REF; -+ -+ ref->poc = poc; -+ ref->sequence = s->seq_decode; -+ ref->frame->crop_left = s->ps.sps->output_window.left_offset; -+ ref->frame->crop_right = s->ps.sps->output_window.right_offset; -+ ref->frame->crop_top = s->ps.sps->output_window.top_offset; -+ ref->frame->crop_bottom = s->ps.sps->output_window.bottom_offset; -+ -+ return 0; -+} -+ -+int ff_hevc_rpi_output_frame(HEVCRpiContext *s, AVFrame *out, int flush) -+{ -+ do { -+ int nb_output = 0; -+ int min_poc = INT_MAX; -+ int i, min_idx, ret; -+ -+ if (s->sh.no_output_of_prior_pics_flag == 1 && s->no_rasl_output_flag == 1) { -+ for (i = 0; i < FF_ARRAY_ELEMS(s->DPB); i++) { -+ HEVCRpiFrame *frame = &s->DPB[i]; -+ if (!(frame->flags & HEVC_FRAME_FLAG_BUMPING) && frame->poc != s->poc && -+ frame->sequence == s->seq_output) { -+ ff_hevc_rpi_unref_frame(s, frame, HEVC_FRAME_FLAG_OUTPUT); -+ } -+ } -+ } -+ -+ for (i = 0; i < FF_ARRAY_ELEMS(s->DPB); i++) { -+ HEVCRpiFrame *frame = &s->DPB[i]; -+ if ((frame->flags & HEVC_FRAME_FLAG_OUTPUT) && -+ frame->sequence == s->seq_output) { -+ nb_output++; -+ if (frame->poc < min_poc || nb_output == 1) { -+ min_poc = frame->poc; -+ min_idx = i; -+ } -+ } -+ } -+ -+ /* wait for more frames before output */ -+ if (!flush && s->seq_output == s->seq_decode && s->ps.sps && -+ nb_output <= s->ps.sps->temporal_layer[s->ps.sps->max_sub_layers - 1].num_reorder_pics) -+ return 0; -+ -+ if (nb_output) { -+ HEVCRpiFrame *frame = &s->DPB[min_idx]; -+ if (frame->frame->format == AV_PIX_FMT_VIDEOTOOLBOX && frame->frame->buf[0]->size == 1) -+ return 0; -+ -+ ret = av_frame_ref(out, frame->frame); -+ if (frame->flags & HEVC_FRAME_FLAG_BUMPING) -+ ff_hevc_rpi_unref_frame(s, frame, HEVC_FRAME_FLAG_OUTPUT | HEVC_FRAME_FLAG_BUMPING); -+ else -+ ff_hevc_rpi_unref_frame(s, frame, HEVC_FRAME_FLAG_OUTPUT); -+ if (ret < 0) -+ return ret; -+ av_log(s->avctx, AV_LOG_DEBUG, -+ "Output frame with POC %d.\n", frame->poc); -+ return 1; -+ } -+ -+ if (s->seq_output != s->seq_decode) -+ s->seq_output = (s->seq_output + 1) & 0xff; -+ else -+ break; -+ } while (1); -+ -+ return 0; -+} -+ -+void ff_hevc_rpi_bump_frame(HEVCRpiContext *s) -+{ -+ int dpb = 0; -+ int min_poc = INT_MAX; -+ int i; -+ -+ for (i = 0; i < FF_ARRAY_ELEMS(s->DPB); i++) { -+ HEVCRpiFrame *frame = &s->DPB[i]; -+ if ((frame->flags) && -+ frame->sequence == s->seq_output && -+ frame->poc != s->poc) { -+ dpb++; -+ } -+ } -+ -+ if (s->ps.sps && dpb >= s->ps.sps->temporal_layer[s->ps.sps->max_sub_layers - 1].max_dec_pic_buffering) { -+ for (i = 0; i < FF_ARRAY_ELEMS(s->DPB); i++) { -+ HEVCRpiFrame *frame = &s->DPB[i]; -+ if ((frame->flags) && -+ frame->sequence == s->seq_output && -+ frame->poc != s->poc) { -+ if (frame->flags == HEVC_FRAME_FLAG_OUTPUT && frame->poc < min_poc) { -+ min_poc = frame->poc; -+ } -+ } -+ } -+ -+ for (i = 0; i < FF_ARRAY_ELEMS(s->DPB); i++) { -+ HEVCRpiFrame *frame = &s->DPB[i]; -+ if (frame->flags & HEVC_FRAME_FLAG_OUTPUT && -+ frame->sequence == s->seq_output && -+ frame->poc <= min_poc) { -+ frame->flags |= HEVC_FRAME_FLAG_BUMPING; -+ } -+ } -+ -+ dpb--; -+ } -+} -+ -+static int init_slice_rpl(HEVCRpiContext *s) -+{ -+ if (s->slice_idx >= s->rpl_tab_size) -+ return AVERROR_INVALIDDATA; -+ -+ s->refPicList = s->rpl_tab[s->slice_idx].refPicList + 0; -+ return 0; -+} -+ -+int ff_hevc_rpi_slice_rpl(HEVCRpiContext *s) -+{ -+ RpiSliceHeader *sh = &s->sh; -+ -+ uint8_t nb_list = sh->slice_type == HEVC_SLICE_B ? 2 : 1; -+ uint8_t list_idx; -+ int i, j, ret; -+ -+ ret = init_slice_rpl(s); -+ if (ret < 0) -+ return ret; -+ -+ if (!(s->rps[ST_CURR_BEF].nb_refs + s->rps[ST_CURR_AFT].nb_refs + -+ s->rps[LT_CURR].nb_refs)) { -+ av_log(s->avctx, AV_LOG_ERROR, "Zero refs in the frame RPS.\n"); -+ return AVERROR_INVALIDDATA; -+ } -+ -+ for (list_idx = 0; list_idx < nb_list; list_idx++) { -+ RefPicList rpl_tmp = { { 0 } }; -+ RefPicList *rpl = &s->refPicList[list_idx]; -+ -+ /* The order of the elements is -+ * ST_CURR_BEF - ST_CURR_AFT - LT_CURR for the L0 and -+ * ST_CURR_AFT - ST_CURR_BEF - LT_CURR for the L1 */ -+ int cand_lists[3] = { list_idx ? ST_CURR_AFT : ST_CURR_BEF, -+ list_idx ? ST_CURR_BEF : ST_CURR_AFT, -+ LT_CURR }; -+ -+ /* concatenate the candidate lists for the current frame */ -+ while (rpl_tmp.nb_refs < sh->nb_refs[list_idx]) { -+ for (i = 0; i < FF_ARRAY_ELEMS(cand_lists); i++) { -+ RefPicList *rps = &s->rps[cand_lists[i]]; -+ for (j = 0; j < rps->nb_refs && rpl_tmp.nb_refs < HEVC_MAX_REFS; j++) { -+ rpl_tmp.list[rpl_tmp.nb_refs] = rps->list[j]; -+ rpl_tmp.ref[rpl_tmp.nb_refs] = rps->ref[j]; -+ rpl_tmp.isLongTerm[rpl_tmp.nb_refs] = i == 2; -+ rpl_tmp.nb_refs++; -+ } -+ } -+ } -+ -+ /* reorder the references if necessary */ -+ if (sh->rpl_modification_flag[list_idx]) { -+ for (i = 0; i < sh->nb_refs[list_idx]; i++) { -+ int idx = sh->list_entry_lx[list_idx][i]; -+ -+ if (idx >= rpl_tmp.nb_refs) { -+ av_log(s->avctx, AV_LOG_ERROR, "Invalid reference index.\n"); -+ return AVERROR_INVALIDDATA; -+ } -+ -+ rpl->list[i] = rpl_tmp.list[idx]; -+ rpl->ref[i] = rpl_tmp.ref[idx]; -+ rpl->isLongTerm[i] = rpl_tmp.isLongTerm[idx]; -+ rpl->nb_refs++; -+ } -+ } else { -+ memcpy(rpl, &rpl_tmp, sizeof(*rpl)); -+ rpl->nb_refs = FFMIN(rpl->nb_refs, sh->nb_refs[list_idx]); -+ } -+ -+ if (sh->collocated_list == list_idx && -+ sh->collocated_ref_idx < rpl->nb_refs) -+ s->ref->collocated_ref = rpl->ref[sh->collocated_ref_idx]; -+ } -+ -+ return 0; -+} -+ -+static HEVCRpiFrame *find_ref_idx(HEVCRpiContext *s, int poc) -+{ -+ int i; -+ int LtMask = (1 << s->ps.sps->log2_max_poc_lsb) - 1; -+ -+ for (i = 0; i < FF_ARRAY_ELEMS(s->DPB); i++) { -+ HEVCRpiFrame *ref = &s->DPB[i]; -+ if (ref->frame->buf[0] && (ref->sequence == s->seq_decode)) { -+ if ((ref->poc & LtMask) == poc) -+ return ref; -+ } -+ } -+ -+ for (i = 0; i < FF_ARRAY_ELEMS(s->DPB); i++) { -+ HEVCRpiFrame *ref = &s->DPB[i]; -+ if (ref->frame->buf[0] && ref->sequence == s->seq_decode) { -+ if (ref->poc == poc || (ref->poc & LtMask) == poc) -+ return ref; -+ } -+ } -+ -+ if (s->nal_unit_type != HEVC_NAL_CRA_NUT && !IS_BLA(s)) -+ av_log(s->avctx, AV_LOG_ERROR, -+ "Could not find ref with POC %d\n", poc); -+ return NULL; -+} -+ -+static void mark_ref(HEVCRpiFrame *frame, int flag) -+{ -+ frame->flags &= ~(HEVC_FRAME_FLAG_LONG_REF | HEVC_FRAME_FLAG_SHORT_REF); -+ frame->flags |= flag; -+} -+ -+static HEVCRpiFrame *generate_missing_ref(HEVCRpiContext *s, int poc) -+{ -+ HEVCRpiFrame *frame; -+ int i, x, y; -+ -+ frame = alloc_frame(s); -+ if (!frame) -+ return NULL; -+ -+ if (!s->ps.sps->pixel_shift) { -+ for (i = 0; frame->frame->buf[i]; i++) -+ memset(frame->frame->buf[i]->data, 1 << (s->ps.sps->bit_depth - 1), -+ frame->frame->buf[i]->size); -+ } else { -+ for (i = 0; frame->frame->data[i]; i++) -+ for (y = 0; y < (s->ps.sps->height >> s->ps.sps->vshift[i]); y++) -+ for (x = 0; x < (s->ps.sps->width >> s->ps.sps->hshift[i]); x++) { -+ AV_WN16(frame->frame->data[i] + y * frame_stride1(frame->frame, 1) + 2 * x, -+ 1 << (s->ps.sps->bit_depth - 1)); -+ } -+ } -+ -+ frame->poc = poc; -+ frame->sequence = s->seq_decode; -+ frame->flags = 0; -+ -+ ff_hevc_rpi_progress_set_all_done(frame); -+ -+ return frame; -+} -+ -+/* add a reference with the given poc to the list and mark it as used in DPB */ -+static int add_candidate_ref(HEVCRpiContext *s, RefPicList *list, -+ int poc, int ref_flag) -+{ -+ HEVCRpiFrame *ref = find_ref_idx(s, poc); -+ -+ if (ref == s->ref || list->nb_refs >= HEVC_MAX_REFS) -+ return AVERROR_INVALIDDATA; -+ -+ if (!ref) { -+ ref = generate_missing_ref(s, poc); -+ if (!ref) -+ return AVERROR(ENOMEM); -+ } -+ -+ list->list[list->nb_refs] = ref->poc; -+ list->ref[list->nb_refs] = ref; -+ list->nb_refs++; -+ -+ mark_ref(ref, ref_flag); -+ return 0; -+} -+ -+int ff_hevc_rpi_frame_rps(HEVCRpiContext *s) -+{ -+ const ShortTermRPS *short_rps = s->sh.short_term_rps; -+ const LongTermRPS *long_rps = &s->sh.long_term_rps; -+ RefPicList *rps = s->rps; -+ int i, ret = 0; -+ -+ if (!short_rps) { -+ rps[0].nb_refs = rps[1].nb_refs = 0; -+ return 0; -+ } -+ -+ /* clear the reference flags on all frames except the current one */ -+ for (i = 0; i < FF_ARRAY_ELEMS(s->DPB); i++) { -+ HEVCRpiFrame *frame = &s->DPB[i]; -+ -+ if (frame == s->ref) -+ continue; -+ -+ mark_ref(frame, 0); -+ } -+ -+ for (i = 0; i < NB_RPS_TYPE; i++) -+ rps[i].nb_refs = 0; -+ -+ /* add the short refs */ -+ for (i = 0; i < short_rps->num_delta_pocs; i++) { -+ int poc = s->poc + short_rps->delta_poc[i]; -+ int list; -+ -+ if (!short_rps->used[i]) -+ list = ST_FOLL; -+ else if (i < short_rps->num_negative_pics) -+ list = ST_CURR_BEF; -+ else -+ list = ST_CURR_AFT; -+ -+ ret = add_candidate_ref(s, &rps[list], poc, HEVC_FRAME_FLAG_SHORT_REF); -+ if (ret < 0) -+ goto fail; -+ } -+ -+ /* add the long refs */ -+ for (i = 0; i < long_rps->nb_refs; i++) { -+ int poc = long_rps->poc[i]; -+ int list = long_rps->used[i] ? LT_CURR : LT_FOLL; -+ -+ ret = add_candidate_ref(s, &rps[list], poc, HEVC_FRAME_FLAG_LONG_REF); -+ if (ret < 0) -+ goto fail; -+ } -+ -+fail: -+ /* release any frames that are now unused */ -+ for (i = 0; i < FF_ARRAY_ELEMS(s->DPB); i++) -+ ff_hevc_rpi_unref_frame(s, &s->DPB[i], 0); -+ -+ return ret; -+} -+ -+int ff_hevc_rpi_frame_nb_refs(HEVCRpiContext *s) -+{ -+ int ret = 0; -+ int i; -+ const ShortTermRPS *rps = s->sh.short_term_rps; -+ LongTermRPS *long_rps = &s->sh.long_term_rps; -+ -+ if (rps) { -+ for (i = 0; i < rps->num_negative_pics; i++) -+ ret += !!rps->used[i]; -+ for (; i < rps->num_delta_pocs; i++) -+ ret += !!rps->used[i]; -+ } -+ -+ if (long_rps) { -+ for (i = 0; i < long_rps->nb_refs; i++) -+ ret += !!long_rps->used[i]; -+ } -+ return ret; -+} ---- /dev/null -+++ b/libavcodec/rpi_hevc_sei.c -@@ -0,0 +1,368 @@ -+/* -+ * HEVC Supplementary Enhancement Information messages -+ * -+ * Copyright (C) 2012 - 2013 Guillaume Martres -+ * Copyright (C) 2012 - 2013 Gildas Cocherel -+ * Copyright (C) 2013 Vittorio Giovara -+ * -+ * This file is part of FFmpeg. -+ * -+ * FFmpeg is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * FFmpeg is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with FFmpeg; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+ */ -+ -+#include "golomb.h" -+#include "rpi_hevc_ps.h" -+#include "rpi_hevc_sei.h" -+ -+static int decode_nal_sei_decoded_picture_hash(HEVCSEIPictureHash *s, GetBitContext *gb) -+{ -+ int cIdx, i; -+ uint8_t hash_type; -+ //uint16_t picture_crc; -+ //uint32_t picture_checksum; -+ hash_type = get_bits(gb, 8); -+ -+ for (cIdx = 0; cIdx < 3/*((s->sps->chroma_format_idc == 0) ? 1 : 3)*/; cIdx++) { -+ if (hash_type == 0) { -+ s->is_md5 = 1; -+ for (i = 0; i < 16; i++) -+ s->md5[cIdx][i] = get_bits(gb, 8); -+ } else if (hash_type == 1) { -+ // picture_crc = get_bits(gb, 16); -+ skip_bits(gb, 16); -+ } else if (hash_type == 2) { -+ // picture_checksum = get_bits_long(gb, 32); -+ skip_bits(gb, 32); -+ } -+ } -+ return 0; -+} -+ -+static int decode_nal_sei_mastering_display_info(HEVCSEIMasteringDisplay *s, GetBitContext *gb) -+{ -+ int i; -+ // Mastering primaries -+ for (i = 0; i < 3; i++) { -+ s->display_primaries[i][0] = get_bits(gb, 16); -+ s->display_primaries[i][1] = get_bits(gb, 16); -+ } -+ // White point (x, y) -+ s->white_point[0] = get_bits(gb, 16); -+ s->white_point[1] = get_bits(gb, 16); -+ -+ // Max and min luminance of mastering display -+ s->max_luminance = get_bits_long(gb, 32); -+ s->min_luminance = get_bits_long(gb, 32); -+ -+ // As this SEI message comes before the first frame that references it, -+ // initialize the flag to 2 and decrement on IRAP access unit so it -+ // persists for the coded video sequence (e.g., between two IRAPs) -+ s->present = 2; -+ return 0; -+} -+ -+static int decode_nal_sei_content_light_info(HEVCSEIContentLight *s, GetBitContext *gb) -+{ -+ // Max and average light levels -+ s->max_content_light_level = get_bits_long(gb, 16); -+ s->max_pic_average_light_level = get_bits_long(gb, 16); -+ // As this SEI message comes before the first frame that references it, -+ // initialize the flag to 2 and decrement on IRAP access unit so it -+ // persists for the coded video sequence (e.g., between two IRAPs) -+ s->present = 2; -+ return 0; -+} -+ -+static int decode_nal_sei_frame_packing_arrangement(HEVCSEIFramePacking *s, GetBitContext *gb) -+{ -+ get_ue_golomb_long(gb); // frame_packing_arrangement_id -+ s->present = !get_bits1(gb); -+ -+ if (s->present) { -+ s->arrangement_type = get_bits(gb, 7); -+ s->quincunx_subsampling = get_bits1(gb); -+ s->content_interpretation_type = get_bits(gb, 6); -+ -+ // spatial_flipping_flag, frame0_flipped_flag, field_views_flag -+ skip_bits(gb, 3); -+ s->current_frame_is_frame0_flag = get_bits1(gb); -+ // frame0_self_contained_flag, frame1_self_contained_flag -+ skip_bits(gb, 2); -+ -+ if (!s->quincunx_subsampling && s->arrangement_type != 5) -+ skip_bits(gb, 16); // frame[01]_grid_position_[xy] -+ skip_bits(gb, 8); // frame_packing_arrangement_reserved_byte -+ skip_bits1(gb); // frame_packing_arrangement_persistence_flag -+ } -+ skip_bits1(gb); // upsampled_aspect_ratio_flag -+ return 0; -+} -+ -+static int decode_nal_sei_display_orientation(HEVCSEIDisplayOrientation *s, GetBitContext *gb) -+{ -+ s->present = !get_bits1(gb); -+ -+ if (s->present) { -+ s->hflip = get_bits1(gb); // hor_flip -+ s->vflip = get_bits1(gb); // ver_flip -+ -+ s->anticlockwise_rotation = get_bits(gb, 16); -+ skip_bits1(gb); // display_orientation_persistence_flag -+ } -+ -+ return 0; -+} -+ -+static int decode_nal_sei_pic_timing(HEVCSEIContext *s, GetBitContext *gb, const HEVCRpiParamSets *ps, -+ void *logctx, int size) -+{ -+ HEVCSEIPictureTiming *h = &s->picture_timing; -+ HEVCRpiSPS *sps; -+ -+ if (!ps->sps_list[s->active_seq_parameter_set_id]) -+ return(AVERROR(ENOMEM)); -+ sps = (HEVCRpiSPS*)ps->sps_list[s->active_seq_parameter_set_id]->data; -+ -+ if (sps->vui.frame_field_info_present_flag) { -+ int pic_struct = get_bits(gb, 4); -+ h->picture_struct = AV_PICTURE_STRUCTURE_UNKNOWN; -+ if (pic_struct == 2 || pic_struct == 10 || pic_struct == 12) { -+ av_log(logctx, AV_LOG_DEBUG, "BOTTOM Field\n"); -+ h->picture_struct = AV_PICTURE_STRUCTURE_BOTTOM_FIELD; -+ } else if (pic_struct == 1 || pic_struct == 9 || pic_struct == 11) { -+ av_log(logctx, AV_LOG_DEBUG, "TOP Field\n"); -+ h->picture_struct = AV_PICTURE_STRUCTURE_TOP_FIELD; -+ } -+ get_bits(gb, 2); // source_scan_type -+ get_bits(gb, 1); // duplicate_flag -+ skip_bits1(gb); -+ size--; -+ } -+ skip_bits_long(gb, 8 * size); -+ -+ return 0; -+} -+ -+static int decode_registered_user_data_closed_caption(HEVCSEIA53Caption *s, GetBitContext *gb, -+ int size) -+{ -+ int flag; -+ int user_data_type_code; -+ int cc_count; -+ -+ if (size < 3) -+ return AVERROR(EINVAL); -+ -+ user_data_type_code = get_bits(gb, 8); -+ if (user_data_type_code == 0x3) { -+ skip_bits(gb, 1); // reserved -+ -+ flag = get_bits(gb, 1); // process_cc_data_flag -+ if (flag) { -+ skip_bits(gb, 1); -+ cc_count = get_bits(gb, 5); -+ skip_bits(gb, 8); // reserved -+ size -= 2; -+ -+ if (cc_count && size >= cc_count * 3) { -+ const uint64_t new_size = (s->a53_caption_size + cc_count -+ * UINT64_C(3)); -+ int i, ret; -+ -+ if (new_size > INT_MAX) -+ return AVERROR(EINVAL); -+ -+ /* Allow merging of the cc data from two fields. */ -+ ret = av_reallocp(&s->a53_caption, new_size); -+ if (ret < 0) -+ return ret; -+ -+ for (i = 0; i < cc_count; i++) { -+ s->a53_caption[s->a53_caption_size++] = get_bits(gb, 8); -+ s->a53_caption[s->a53_caption_size++] = get_bits(gb, 8); -+ s->a53_caption[s->a53_caption_size++] = get_bits(gb, 8); -+ } -+ skip_bits(gb, 8); // marker_bits -+ } -+ } -+ } else { -+ int i; -+ for (i = 0; i < size - 1; i++) -+ skip_bits(gb, 8); -+ } -+ -+ return 0; -+} -+ -+static int decode_nal_sei_user_data_registered_itu_t_t35(HEVCSEIContext *s, GetBitContext *gb, -+ int size) -+{ -+ uint32_t country_code; -+ uint32_t user_identifier; -+ -+ if (size < 7) -+ return AVERROR(EINVAL); -+ size -= 7; -+ -+ country_code = get_bits(gb, 8); -+ if (country_code == 0xFF) { -+ skip_bits(gb, 8); -+ size--; -+ } -+ -+ skip_bits(gb, 8); -+ skip_bits(gb, 8); -+ -+ user_identifier = get_bits_long(gb, 32); -+ -+ switch (user_identifier) { -+ case MKBETAG('G', 'A', '9', '4'): -+ return decode_registered_user_data_closed_caption(&s->a53_caption, gb, size); -+ default: -+ skip_bits_long(gb, size * 8); -+ break; -+ } -+ return 0; -+} -+ -+static int decode_nal_sei_active_parameter_sets(HEVCSEIContext *s, GetBitContext *gb, void *logctx) -+{ -+ int num_sps_ids_minus1; -+ int i; -+ unsigned active_seq_parameter_set_id; -+ -+ get_bits(gb, 4); // active_video_parameter_set_id -+ get_bits(gb, 1); // self_contained_cvs_flag -+ get_bits(gb, 1); // num_sps_ids_minus1 -+ num_sps_ids_minus1 = get_ue_golomb_long(gb); // num_sps_ids_minus1 -+ -+ if (num_sps_ids_minus1 < 0 || num_sps_ids_minus1 > 15) { -+ av_log(logctx, AV_LOG_ERROR, "num_sps_ids_minus1 %d invalid\n", num_sps_ids_minus1); -+ return AVERROR_INVALIDDATA; -+ } -+ -+ active_seq_parameter_set_id = get_ue_golomb_long(gb); -+ if (active_seq_parameter_set_id >= HEVC_MAX_SPS_COUNT) { -+ av_log(logctx, AV_LOG_ERROR, "active_parameter_set_id %d invalid\n", active_seq_parameter_set_id); -+ return AVERROR_INVALIDDATA; -+ } -+ s->active_seq_parameter_set_id = active_seq_parameter_set_id; -+ -+ for (i = 1; i <= num_sps_ids_minus1; i++) -+ get_ue_golomb_long(gb); // active_seq_parameter_set_id[i] -+ -+ return 0; -+} -+ -+static int decode_nal_sei_alternative_transfer(HEVCSEIAlternativeTransfer *s, GetBitContext *gb) -+{ -+ s->present = 1; -+ s->preferred_transfer_characteristics = get_bits(gb, 8); -+ return 0; -+} -+ -+static int decode_nal_sei_prefix(GetBitContext *gb, void *logctx, HEVCSEIContext *s, const HEVCRpiParamSets *ps, -+ int type, int size) -+{ -+ switch (type) { -+ case 256: // Mismatched value from HM 8.1 -+ return decode_nal_sei_decoded_picture_hash(&s->picture_hash, gb); -+ case HEVC_SEI_TYPE_FRAME_PACKING: -+ return decode_nal_sei_frame_packing_arrangement(&s->frame_packing, gb); -+ case HEVC_SEI_TYPE_DISPLAY_ORIENTATION: -+ return decode_nal_sei_display_orientation(&s->display_orientation, gb); -+ case HEVC_SEI_TYPE_PICTURE_TIMING: -+ return decode_nal_sei_pic_timing(s, gb, ps, logctx, size); -+ case HEVC_SEI_TYPE_MASTERING_DISPLAY_INFO: -+ return decode_nal_sei_mastering_display_info(&s->mastering_display, gb); -+ case HEVC_SEI_TYPE_CONTENT_LIGHT_LEVEL_INFO: -+ return decode_nal_sei_content_light_info(&s->content_light, gb); -+ case HEVC_SEI_TYPE_ACTIVE_PARAMETER_SETS: -+ return decode_nal_sei_active_parameter_sets(s, gb, logctx); -+ case HEVC_SEI_TYPE_USER_DATA_REGISTERED_ITU_T_T35: -+ return decode_nal_sei_user_data_registered_itu_t_t35(s, gb, size); -+ case HEVC_SEI_TYPE_ALTERNATIVE_TRANSFER_CHARACTERISTICS: -+ return decode_nal_sei_alternative_transfer(&s->alternative_transfer, gb); -+ default: -+ av_log(logctx, AV_LOG_DEBUG, "Skipped PREFIX SEI %d\n", type); -+ skip_bits_long(gb, 8 * size); -+ return 0; -+ } -+} -+ -+static int decode_nal_sei_suffix(GetBitContext *gb, void *logctx, HEVCSEIContext *s, -+ int type, int size) -+{ -+ switch (type) { -+ case HEVC_SEI_TYPE_DECODED_PICTURE_HASH: -+ return decode_nal_sei_decoded_picture_hash(&s->picture_hash, gb); -+ default: -+ av_log(logctx, AV_LOG_DEBUG, "Skipped SUFFIX SEI %d\n", type); -+ skip_bits_long(gb, 8 * size); -+ return 0; -+ } -+} -+ -+static int decode_nal_sei_message(GetBitContext * const gb, void * const logctx, HEVCSEIContext * const s, -+ const HEVCRpiParamSets * const ps, const int nal_unit_type) -+{ -+ int payload_type = 0; -+ int payload_size = 0; -+ int byte = 0xFF; -+ av_log(logctx, AV_LOG_DEBUG, "Decoding SEI\n"); -+ -+ while (byte == 0xFF) { -+ if (get_bits_left(gb) < 16 || payload_type > INT_MAX - 255) -+ return AVERROR_INVALIDDATA; -+ byte = get_bits(gb, 8); -+ payload_type += byte; -+ } -+ byte = 0xFF; -+ while (byte == 0xFF) { -+ if (get_bits_left(gb) < 8 + 8LL*payload_size) -+ return AVERROR_INVALIDDATA; -+ byte = get_bits(gb, 8); -+ payload_size += byte; -+ } -+ if (nal_unit_type == HEVC_NAL_SEI_PREFIX) { -+ return decode_nal_sei_prefix(gb, logctx, s, ps, payload_type, payload_size); -+ } else { /* nal_unit_type == NAL_SEI_SUFFIX */ -+ return decode_nal_sei_suffix(gb, logctx, s, payload_type, payload_size); -+ } -+} -+ -+static int more_rbsp_data(GetBitContext *gb) -+{ -+ return get_bits_left(gb) > 0 && show_bits(gb, 8) != 0x80; -+} -+ -+int ff_hevc_rpi_decode_nal_sei(GetBitContext *gb, void *logctx, HEVCSEIContext *s, -+ const HEVCRpiParamSets *ps, int type) -+{ -+ int ret; -+ -+ do { -+ ret = decode_nal_sei_message(gb, logctx, s, ps, type); -+ if (ret < 0) -+ return ret; -+ } while (more_rbsp_data(gb)); -+ return 1; -+} -+ -+void ff_hevc_rpi_reset_sei(HEVCSEIContext *s) -+{ -+ s->a53_caption.a53_caption_size = 0; -+ av_freep(&s->a53_caption.a53_caption); -+} ---- /dev/null -+++ b/libavcodec/rpi_hevc_sei.h -@@ -0,0 +1,135 @@ -+/* -+ * HEVC Supplementary Enhancement Information messages -+ * -+ * This file is part of FFmpeg. -+ * -+ * FFmpeg is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * FFmpeg is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with FFmpeg; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+ */ -+ -+#ifndef AVCODEC_RPI_HEVC_SEI_H -+#define AVCODEC_RPI_HEVC_SEI_H -+ -+#include -+ -+#include "libavutil/md5.h" -+ -+#include "get_bits.h" -+ -+/** -+ * SEI message types -+ */ -+typedef enum { -+ HEVC_SEI_TYPE_BUFFERING_PERIOD = 0, -+ HEVC_SEI_TYPE_PICTURE_TIMING = 1, -+ HEVC_SEI_TYPE_PAN_SCAN_RECT = 2, -+ HEVC_SEI_TYPE_FILLER_PAYLOAD = 3, -+ HEVC_SEI_TYPE_USER_DATA_REGISTERED_ITU_T_T35 = 4, -+ HEVC_SEI_TYPE_USER_DATA_UNREGISTERED = 5, -+ HEVC_SEI_TYPE_RECOVERY_POINT = 6, -+ HEVC_SEI_TYPE_SCENE_INFO = 9, -+ HEVC_SEI_TYPE_FULL_FRAME_SNAPSHOT = 15, -+ HEVC_SEI_TYPE_PROGRESSIVE_REFINEMENT_SEGMENT_START = 16, -+ HEVC_SEI_TYPE_PROGRESSIVE_REFINEMENT_SEGMENT_END = 17, -+ HEVC_SEI_TYPE_FILM_GRAIN_CHARACTERISTICS = 19, -+ HEVC_SEI_TYPE_POST_FILTER_HINT = 22, -+ HEVC_SEI_TYPE_TONE_MAPPING_INFO = 23, -+ HEVC_SEI_TYPE_FRAME_PACKING = 45, -+ HEVC_SEI_TYPE_DISPLAY_ORIENTATION = 47, -+ HEVC_SEI_TYPE_SOP_DESCRIPTION = 128, -+ HEVC_SEI_TYPE_ACTIVE_PARAMETER_SETS = 129, -+ HEVC_SEI_TYPE_DECODING_UNIT_INFO = 130, -+ HEVC_SEI_TYPE_TEMPORAL_LEVEL0_INDEX = 131, -+ HEVC_SEI_TYPE_DECODED_PICTURE_HASH = 132, -+ HEVC_SEI_TYPE_SCALABLE_NESTING = 133, -+ HEVC_SEI_TYPE_REGION_REFRESH_INFO = 134, -+ HEVC_SEI_TYPE_MASTERING_DISPLAY_INFO = 137, -+ HEVC_SEI_TYPE_CONTENT_LIGHT_LEVEL_INFO = 144, -+ HEVC_SEI_TYPE_ALTERNATIVE_TRANSFER_CHARACTERISTICS = 147, -+} HEVC_SEI_Type; -+ -+typedef struct HEVCSEIPictureHash { -+ uint8_t md5[3][16]; -+ uint8_t is_md5; -+} HEVCSEIPictureHash; -+ -+typedef struct HEVCSEIFramePacking { -+ int present; -+ int arrangement_type; -+ int content_interpretation_type; -+ int quincunx_subsampling; -+ int current_frame_is_frame0_flag; -+} HEVCSEIFramePacking; -+ -+typedef struct HEVCSEIDisplayOrientation { -+ int present; -+ int anticlockwise_rotation; -+ int hflip, vflip; -+} HEVCSEIDisplayOrientation; -+ -+typedef struct HEVCSEIPictureTiming { -+ int picture_struct; -+} HEVCSEIPictureTiming; -+ -+typedef struct HEVCSEIA53Caption { -+ int a53_caption_size; -+ uint8_t *a53_caption; -+} HEVCSEIA53Caption; -+ -+typedef struct HEVCSEIMasteringDisplay { -+ int present; -+ uint16_t display_primaries[3][2]; -+ uint16_t white_point[2]; -+ uint32_t max_luminance; -+ uint32_t min_luminance; -+} HEVCSEIMasteringDisplay; -+ -+typedef struct HEVCSEIContentLight { -+ int present; -+ uint16_t max_content_light_level; -+ uint16_t max_pic_average_light_level; -+} HEVCSEIContentLight; -+ -+typedef struct HEVCSEIAlternativeTransfer { -+ int present; -+ int preferred_transfer_characteristics; -+} HEVCSEIAlternativeTransfer; -+ -+typedef struct HEVCSEIContext { -+ HEVCSEIPictureHash picture_hash; -+ HEVCSEIFramePacking frame_packing; -+ HEVCSEIDisplayOrientation display_orientation; -+ HEVCSEIPictureTiming picture_timing; -+ HEVCSEIA53Caption a53_caption; -+ HEVCSEIMasteringDisplay mastering_display; -+ HEVCSEIContentLight content_light; -+ int active_seq_parameter_set_id; -+ HEVCSEIAlternativeTransfer alternative_transfer; -+} HEVCSEIContext; -+ -+struct HEVCRpiParamSets; -+ -+int ff_hevc_rpi_decode_nal_sei(GetBitContext *gb, void *logctx, HEVCSEIContext *s, -+ const struct HEVCRpiParamSets *ps, int type); -+ -+/** -+ * Reset SEI values that are stored on the Context. -+ * e.g. Caption data that was extracted during NAL -+ * parsing. -+ * -+ * @param s HEVCRpiContext. -+ */ -+void ff_hevc_rpi_reset_sei(HEVCSEIContext *s); -+ -+#endif /* AVCODEC_RPI_HEVC_SEI_H */ ---- /dev/null -+++ b/libavcodec/rpi_hevc_shader.c -@@ -0,0 +1,1537 @@ -+#include "rpi_hevc_shader.h" -+ -+#ifdef _MSC_VER -+ #include -+ /* cast through uintptr_t to avoid warnings */ -+ #define POINTER_TO_UINT(X) ((unsigned int)(uintptr_t)(X)) -+#else -+ #define POINTER_TO_UINT(X) ((unsigned int)(X)) -+#endif -+ -+#ifdef __cplusplus -+extern "C" { /* the types are probably wrong... */ -+#endif -+#ifdef __cplusplus -+} -+#endif -+ -+#ifdef _MSC_VER -+__declspec(align(8)) -+#elif defined(__GNUC__) -+__attribute__((aligned(8))) -+#endif -+unsigned int ff_hevc_rpi_shader[] = { -+// ::mc_setup_c_q0 -+// ::mc_start -+/* [0x00000000] */ 0x0000000c, 0xe80009e7, // mov dst, srel(i) -+// ::mc_setup_c_qn -+/* [0x00000008] */ 0x95801ff6, 0xd0025900, // mov tmurs, 1 ; mov ra0, unif -+/* [0x00000010] */ 0xaaaaff00, 0xe6020827, // mov r0, [0,2,0,2,0,2,0,2,1,3,1,3,1,3,1,3] -+/* [0x00000018] */ 0x9181e1f6, 0xd00250d8, // shl rb_ef, r0, i_shift30 ; mov ra_base, unif -+/* [0x00000020] */ 0x0d801dc0, 0xd0020827, // sub r0, unif, 1 -+/* [0x00000028] */ 0x119c11c0, 0xd00216a7, // shl rb_max_x, r0, v_x_shift -+/* [0x00000030] */ 0x0d801dc0, 0xd00217a7, // sub rb_max_y, unif, 1 -+/* [0x00000038] */ 0xff800100, 0xe0020527, // mov ra_kff800100, 0xff800100 -+/* [0x00000040] */ 0x000000ff, 0xe0021627, // mov rb_pmask, v_pmask -+/* [0x00000048] */ 0x001000ff, 0xe00205e7, // mov ra_blk_height_pmax, ((1 << v_bit_depth) - 1) | (v_blk_height << 16) -+/* [0x00000050] */ 0x00004000, 0xe00217e7, // mov rb_fir_off_h, (FIR_OFFSET << (v_bit_depth - 8)) -+/* [0x00000058] */ 0x4000000e, 0xe0020667, // mov ra_fir_off_val_wt_den_p7, (FIR_OFFSET << 16) | (DENOM + 15 - v_bit_depth) -+/* [0x00000060] */ 0x95803ff6, 0x10024754, // mov ra_ef, rb_ef ; mov rb_xpitch, unif -+/* [0x00000068] */ 0x15827d80, 0x10021427, // mov rb_pitch, unif -+/* [0x00000070] */ 0xc0000000, 0xe0020867, // mov r1, vdw_setup_1(0) -+/* [0x00000078] */ 0x0c9d03c0, 0x10021667, // add rb_dma1_base, r1, rb_pitch -+/* [0x00000080] */ 0x14981f80, 0xd0020827, // and r0, 1, elem_num -+/* [0x00000088] */ 0x409c5007, 0xd00049e0, // nop ; mul24 r0, r0, 5 -+/* [0x00000090] */ 0x0c9a7180, 0x100210a7, // add rb_elem_x, r0, elem_num -+/* [0x00000098] */ 0x11001dc0, 0xd4020827, // shl r0, ra0.16b, v_x_shift -+/* [0x000000a0] */ 0x0c9c21c0, 0x10020827, // add r0, r0, rb_elem_x -+/* [0x000000a8] */ 0x930001f6, 0xd2225811, // max r0, r0, 0 ; mov ra_y, ra0.16a -+/* [0x000000b0] */ 0x129da1c0, 0x10020827, // min r0, r0, rb_max_x -+/* [0x000000b8] */ 0x119c31c0, 0xd0220567, // shl ra_xshift_next, r0, 3 -+/* [0x000000c0] */ 0x149dc1c0, 0xd0020827, // and r0, r0, -4 -+/* [0x000000c8] */ 0x0d510dc0, 0x18020867, // sub r1, ra_k0, rb_pitch -+/* [0x000000d0] */ 0x149e7040, 0x10020867, // and r1, r0, r1 -+/* [0x000000d8] */ 0x569d404f, 0x10024821, // xor r0, r0, r1 ; mul24 r1, r1, rb_xpitch -+/* [0x000000e0] */ 0x8c827076, 0x10025800, // add r0, r0, r1 ; mov ra0, unif -+/* [0x000000e8] */ 0x0c627c00, 0x10020627, // add ra_base, ra_base, r0 -+/* [0x000000f0] */ 0x159e6fc0, 0x100208a7, // mov r2, qpu_num -+/* [0x000000f8] */ 0x0f9c25c0, 0xd0020867, // asr r1, r2, 2 -+/* [0x00000100] */ 0x119c63c0, 0xd0020867, // shl r1, r1, 6 -+/* [0x00000108] */ 0x149c35c0, 0xd0020827, // and r0, r2, 3 -+/* [0x00000110] */ 0x159e7040, 0x10020827, // or r0, r0, r1 -+/* [0x00000118] */ 0x00004800, 0xe0020867, // mov r1, vpm_setup(0, 4, h8p(0, 0)) -+/* [0x00000120] */ 0x0c9e7040, 0x10021727, // add r_vpm, r0, r1 -+/* [0x00000128] */ 0x80004004, 0xe0020867, // mov r1, vdw_setup_0(0, 0, dma_h8p(0,0,0)) -+/* [0x00000130] */ 0x119c51c0, 0xd0020827, // shl r0, r0, 5 -+/* [0x00000138] */ 0x0c9e7040, 0x100216e7, // add r_dma, r0, r1 -+/* [0x00000140] */ 0x11001dc0, 0xd4020827, // shl r0, ra0.16b, v_x_shift -+/* [0x00000148] */ 0x8c0021f6, 0x12125811, // add r0, r0, rb_elem_x ; mov ra_y2, ra0.16a -+/* [0x00000150] */ 0x938001f6, 0xd002480f, // max r0, r0, 0 ; mov rb_base2, unif -+/* [0x00000158] */ 0x129da1c0, 0x10020827, // min r0, r0, rb_max_x -+/* [0x00000160] */ 0x119c31c0, 0xd0021067, // shl rb_xshift2_next, r0, 3 -+/* [0x00000168] */ 0x149dc1c0, 0xd0020827, // and r0, r0, -4 -+/* [0x00000170] */ 0x0d510dc0, 0x18020867, // sub r1, ra_k0, rb_pitch -+/* [0x00000178] */ 0x949c307f, 0xd0024863, // and r1, r0, r1 ; mov r3, PREREAD -+/* [0x00000180] */ 0x569d404f, 0x10024821, // xor r0, r0, r1 ; mul24 r1, r1, rb_xpitch -+/* [0x00000188] */ 0x8c467076, 0x12024822, // add r0, r0, r1 ; mov r2, ra_y2 -+/* [0x00000190] */ 0x8c44fe36, 0x140253e0, // add rb_base2, rb_base2, r0 ; mov r0, ra_y -+// :1 -+/* [0x00000198] */ 0x0d9c17c0, 0xd00228e7, // sub.setf r3, r3, 1 -+/* [0x000001a0] */ 0x139c01c0, 0xd0020867, // max r1, r0, 0 -+/* [0x000001a8] */ 0x129de3c0, 0x10020867, // min r1, r1, rb_max_y -+/* [0x000001b0] */ 0x4c51018f, 0x1a024821, // add r0, r0, ra_k1 ; mul24 r1, r1, rb_pitch -+/* [0x000001b8] */ 0x8c627c40, 0x10225e11, // add t0s, ra_base, r1 ; mov ra_y, r0 -+/* [0x000001c0] */ 0x139c05c0, 0xd0020867, // max r1, r2, 0 -+/* [0x000001c8] */ 0xffffffb0, 0xf03809e7, // brr.anynz -, r:1b -+/* [0x000001d0] */ 0x129de3c0, 0x10020867, // min r1, r1, rb_max_y -+/* [0x000001d8] */ 0x4c51058f, 0x1a0248a1, // add r2, r2, ra_k1 ; mul24 r1, r1, rb_pitch -+/* [0x000001e0] */ 0x8c9cfe52, 0x10125f11, // add t1s, rb_base2, r1 ; mov ra_y2, r2 -+/* [0x000001e8] */ 0x15827d80, 0x100207a7, // mov ra_link, unif -+/* [0x000001f0] */ 0x00000000, 0xe0024104, // mov ra4, 0 ; mov rb4, 0 -+/* [0x000001f8] */ 0x00000000, 0xf0f7c9e7, // bra -, ra_link -+/* [0x00000200] */ 0x00000000, 0xe0024145, // mov ra5, 0 ; mov rb5, 0 -+/* [0x00000208] */ 0x00000000, 0xe0024186, // mov ra6, 0 ; mov rb6, 0 -+/* [0x00000210] */ 0x00000000, 0xe00241c7, // mov ra7, 0 ; mov rb7, 0 -+// ::mc_filter_c_p -+/* [0x00000218] */ 0x9581cff6, 0x10025c42, // mov vw_setup, rb_vpm_init ; mov ra2, unif -+/* [0x00000220] */ 0x8c803ff6, 0x100269e3, // add.setf -, rb_ef, rb_ef ; mov r3, unif -+/* [0x00000228] */ 0xf1081dc0, 0xd4024825, // shl r0, ra2.16b, v_x_shift ; v8subs r5rep, r0, r0 -+/* [0x00000230] */ 0x8c8021f6, 0x10025810, // add r0, r0, rb_elem_x ; mov ra_width_height, unif -+/* [0x00000238] */ 0x8d810bf6, 0x10025840, // sub r1, r5, rb_pitch ; mov ra0, unif -+/* [0x00000240] */ 0x93567176, 0x14024800, // max r0, r0, r5 ; mov vrx_xshift, vrx_xshift_next -+/* [0x00000248] */ 0x9209a1f6, 0x12225813, // min r0, r0, rb_max_x ; mov vra_y_next, ra2.16a -+/* [0x00000250] */ 0x119c31c0, 0xd0220567, // shl vrx_xshift_next, r0, 3 -+/* [0x00000258] */ 0x149dc1c0, 0xd0020827, // and r0, r0, -4 -+/* [0x00000260] */ 0x54402077, 0xd4024862, // and r1, r0, r1 ; mul24 r2, ra_width, v_x_mul -+/* [0x00000268] */ 0x569d404f, 0x10024821, // xor r0, r0, r1 ; mul24 r1, r1, rb_xpitch -+/* [0x00000270] */ 0x8c827076, 0x10025803, // add r0, r0, r1 ; mov ra3, unif -+/* [0x00000278] */ 0x8c427636, 0x120246a1, // add vrx_base_next, r3, r0 ; mov r1, ra_height -+/* [0x00000280] */ 0x8d819eb6, 0x10025756, // sub rb_dma1, rb_dma1_base, r2 ; mov ra_wt_off_mul_l0, unif -+/* [0x00000288] */ 0x8c5dc3ce, 0xdc025461, // add rb_i_tmu, r1, (3-4) - PREREAD ; v8min r1, r1, ra_blk_height -+/* [0x00000290] */ 0x8c81f3f6, 0xd0039496, // add rb_lcount, r1, (3-4) ; mov.ifc ra_wt_off_mul_l0, unif -+/* [0x00000298] */ 0x918073f6, 0xd002581c, // shl r0, r1, v_dma_h_shift ; mov ra_dest, unif -+/* [0x000002a0] */ 0x8c6670b6, 0x14024822, // add r0, r0, r2 ; mov r2, ra_fir_off_val -+/* [0x000002a8] */ 0x910d01f6, 0xdc02480a, // shl r0, r0, v_dma_wh_shift ; mov rb10, ra3.8c -+/* [0x000002b0] */ 0x8c59b1f6, 0x140246e1, // add ra_dma0, r0, rb_dma0_base ; mov r1, ra_wt_off_l0 -+/* [0x000002b8] */ 0x5158c3d6, 0xd2024860, // shl r1, r1, i_wt_den_p5 ; mul24 r0, r2, ra_wt_mul_l0 -+/* [0x000002c0] */ 0x8d667236, 0x14025320, // sub rb_wt_off, r1, r0 ; mov r0, ra_kmul_add -+/* [0x000002c8] */ 0x8c59cc3f, 0xd21245a5, // add ra_wt_mul_l0, ra_wt_mul_l0, r0 ; mov r5rep, -4 -+/* [0x000002d0] */ 0x950e0dbf, 0x1e0252de, // mov rb11, ra3.8d ; mov ra_link, unif -+// :1 -+/* [0x000002d8] */ 0x8d151bf6, 0xa00269c4, // sub.setf -, r5, rb_i_tmu ; mov rb4, ra5 ; ldtmu0 -+/* [0x000002e0] */ 0x8e4c09f6, 0x140288a3, // shr r2, r4, vrx_xshift ; mov.ifz r3, vra_y_next -+/* [0x000002e8] */ 0x8e4485f6, 0xd402c863, // shr r1, r2, v_v_shift ; mov.ifnz r3, vra_y -+/* [0x000002f0] */ 0x8c683ff6, 0x1002b9d8, // add.setf -, rb_ef, rb_ef ; mov.ifz vra_base, vrx_base_next -+/* [0x000002f8] */ 0x8c531789, 0xda224460, // add vra_y, r3, ra_k1 ; mov r0, r1 << 15 -+/* [0x00000300] */ 0x9353f792, 0xd803c8e1, // max r3, r3, ra_k0 ; mov.ifnc r1, r2 << 1 -+/* [0x00000308] */ 0x929de7d2, 0x1003c8e0, // min r3, r3, rb_max_y ; mov.ifnc r0, r2 -+/* [0x00000310] */ 0x545d039f, 0x12024863, // and r1, r1, ra_pmax ; mul24 r3, r3, rb_pitch -+/* [0x00000318] */ 0x8c618cc7, 0x10024e20, // add vr_txs, vra_base, r3 ; v8min r0, r0, rb_pmask -+/* [0x00000320] */ 0x4c001bf0, 0xd8025963, // add r5rep, r5, 1 ; mul24 r3, ra0.8a, r0 -+/* [0x00000328] */ 0x4d01fef1, 0x1e0248a3, // sub r2, rb_fir_off_h, r3 ; mul24 r3, ra0.8d, r1 -+/* [0x00000330] */ 0x4d03e4f0, 0xda0248a3, // sub r2, r2, r3 ; mul24 r3, ra0.8b << 2, r0 << 2 @ "mul_used", 0 -+/* [0x00000338] */ 0x40034031, 0xda0109e3, // nop ; mul24.ifn r3, ra0.8b << 12, r1 << 12 @ "mul_used", 0 -+/* [0x00000340] */ 0x4c03c4f0, 0xdc0248a3, // add r2, r2, r3 ; mul24 r3, ra0.8c << 4, r0 << 4 @ "mul_used", 0 -+/* [0x00000348] */ 0x4c032b71, 0xdc0329e3, // add.setf -, r5, r5 ; mul24.ifn r3, ra0.8c << 14, r1 << 14 @ "mul_used", 0 -+/* [0x00000350] */ 0xffffff68, 0xf06809e7, // brr.anyn -, r:1b -+/* [0x00000358] */ 0x4c1ca4f7, 0x100248a0, // add r2, r2, r3 ; mul24 r0, ra7, rb10 -+/* [0x00000360] */ 0x550c6ffe, 0x1a024161, // mov ra5, rb6 ; mul24 r1, rb6, ra3.8b -+/* [0x00000368] */ 0x8f1c05f6, 0xd00241c6, // asr ra7, r2, v_bit_depth - 8 ; mov rb6, ra7 -+/* [0x00000370] */ 0x4c0c423e, 0x18024860, // add r1, r1, r0 ; mul24 r0, rb4, ra3.8a -+/* [0x00000378] */ 0x4d1cb237, 0x10024860, // sub r1, r1, r0 ; mul24 r0, ra7, rb11 -+/* [0x00000380] */ 0x0d9e7200, 0x10020867, // sub r1, r1, r0 -+/* [0x00000388] */ 0x8f5c63f6, 0xdc024863, // asr r1, r1, 6 ; mov r3, ra_blk_height -+/* [0x00000390] */ 0x4d592bce, 0x120269e0, // sub.setf -, r5, rb_lcount ; mul24 r0, r1, ra_wt_mul_l0 -+/* [0x00000398] */ 0x4c64c1ce, 0x14024821, // add r0, r0, rb_wt_off ; mul24 r1, r1, ra_kmul_add -+/* [0x000003a0] */ 0xed427073, 0x12024860, // sub r1, r0, r1 ; v8subs r0, ra_height, r3 -+/* [0x000003a8] */ 0xffffff10, 0xf06809e7, // brr.anyn -, r:1b -+/* [0x000003b0] */ 0x0f9cd3c0, 0xd0020867, // asr r1, r1, i_wt_den_p6 -+/* [0x000003b8] */ 0x925f23bf, 0x12020867, // min r1, r1, ra_pmax ; mov -, vw_wait -+/* [0x000003c0] */ 0x5351039f, 0x18024c22, // max vpm, r1, ra_k0 ; mul24 r2, r3, rb_pitch -+/* [0x000003c8] */ 0x956e7036, 0x10126431, // mov.setf ra_height, r0 ; mov vw_setup, ra_dma0 -+/* [0x000003d0] */ 0x00000000, 0xf027c9e7, // bra.anyz -, ra_link -+/* [0x000003d8] */ 0x929dd0ff, 0x10024831, // min r0, r0, r3 ; mov vw_setup, rb_dma1 -+/* [0x000003e0] */ 0x8d7270f6, 0x10024872, // sub r1, r0, r3 ; mov vw_addr, ra_dest -+/* [0x000003e8] */ 0x119d73c0, 0xd0020867, // shl r1, r1, i_shift23 -+/* [0x000003f0] */ 0xfffffec8, 0xf0f809e7, // brr -, r:1b -+/* [0x000003f8] */ 0x0c9d2e00, 0x100214a7, // add rb_lcount, rb_lcount, r0 -+/* [0x00000400] */ 0x0c6e7c40, 0x100206e7, // add ra_dma0, ra_dma0, r1 -+/* [0x00000408] */ 0x8c71ccbf, 0x10024731, // add ra_dest, ra_dest, r2 ; mov vw_setup, rb_vpm_init -+// ::mc_filter_c_p_l1 -+/* [0x00000410] */ 0x9581cff6, 0x10025c42, // mov vw_setup, rb_vpm_init ; mov ra2, unif -+/* [0x00000418] */ 0x8c803ff6, 0x100269e3, // add.setf -, rb_ef, rb_ef ; mov r3, unif -+/* [0x00000420] */ 0xf1081dc0, 0xd4024825, // shl r0, ra2.16b, v_x_shift ; v8subs r5rep, r0, r0 -+/* [0x00000428] */ 0x8c8021f6, 0x10025810, // add r0, r0, rb_elem_x ; mov ra_width_height, unif -+/* [0x00000430] */ 0x8d810bf6, 0x10025840, // sub r1, r5, rb_pitch ; mov ra0, unif -+/* [0x00000438] */ 0x939c117f, 0x10125815, // max r0, r0, r5 ; mov vrx_xshift, vrx_xshift_next -+/* [0x00000440] */ 0x9209a1f6, 0x12125813, // min r0, r0, rb_max_x ; mov vra_y_next, ra2.16a -+/* [0x00000448] */ 0x119c31c0, 0xd0021067, // shl vrx_xshift_next, r0, 3 -+/* [0x00000450] */ 0x149dc1c0, 0xd0020827, // and r0, r0, -4 -+/* [0x00000458] */ 0x54402077, 0xd4024862, // and r1, r0, r1 ; mul24 r2, ra_width, v_x_mul -+/* [0x00000460] */ 0x569d404f, 0x10024821, // xor r0, r0, r1 ; mul24 r1, r1, rb_xpitch -+/* [0x00000468] */ 0x8c827076, 0x10025803, // add r0, r0, r1 ; mov ra3, unif -+/* [0x00000470] */ 0x8c427636, 0x120254e1, // add vrx_base_next, r3, r0 ; mov r1, ra_height -+/* [0x00000478] */ 0x8d819eb6, 0x10025756, // sub rb_dma1, rb_dma1_base, r2 ; mov ra_wt_off_mul_l0, unif -+/* [0x00000480] */ 0x8c5dc3ce, 0xdc025461, // add rb_i_tmu, r1, (3-4) - PREREAD ; v8min r1, r1, ra_blk_height -+/* [0x00000488] */ 0x8c81f3f6, 0xd0039496, // add rb_lcount, r1, (3-4) ; mov.ifc ra_wt_off_mul_l0, unif -+/* [0x00000490] */ 0x918073f6, 0xd002581c, // shl r0, r1, v_dma_h_shift ; mov ra_dest, unif -+/* [0x00000498] */ 0x8c6670b6, 0x14024822, // add r0, r0, r2 ; mov r2, ra_fir_off_val -+/* [0x000004a0] */ 0x910d01f6, 0xdc02480a, // shl r0, r0, v_dma_wh_shift ; mov rb10, ra3.8c -+/* [0x000004a8] */ 0x8c59b1f6, 0x140246e1, // add ra_dma0, r0, rb_dma0_base ; mov r1, ra_wt_off_l0 -+/* [0x000004b0] */ 0x5158c3d6, 0xd2024860, // shl r1, r1, i_wt_den_p5 ; mul24 r0, r2, ra_wt_mul_l0 -+/* [0x000004b8] */ 0x8d667236, 0x14025320, // sub rb_wt_off, r1, r0 ; mov r0, ra_kmul_add -+/* [0x000004c0] */ 0x8c59cc3f, 0xd21245a5, // add ra_wt_mul_l0, ra_wt_mul_l0, r0 ; mov r5rep, -4 -+/* [0x000004c8] */ 0x950e0dbf, 0x1e0252de, // mov rb11, ra3.8d ; mov ra_link, unif -+// :1 -+/* [0x000004d0] */ 0x8d151bf6, 0xb00269c4, // sub.setf -, r5, rb_i_tmu ; mov rb4, ra5 ; ldtmu1 -+/* [0x000004d8] */ 0x8e5539bf, 0x1202888f, // shr r2, r4, vrx_xshift ; mov.ifz vra_base, vrx_base_next -+/* [0x000004e0] */ 0x8e4485f6, 0xd202c863, // shr r1, r2, v_v_shift ; mov.ifnz r3, vra_y -+/* [0x000004e8] */ 0x8c4c3ff6, 0x1202a9e3, // add.setf -, rb_ef, rb_ef ; mov.ifz r3, vra_y_next -+/* [0x000004f0] */ 0x8c531789, 0xda124460, // add vra_y, r3, ra_k1 ; mov r0, r1 << 15 -+/* [0x000004f8] */ 0x9353f792, 0xd803c8e1, // max r3, r3, ra_k0 ; mov.ifnc r1, r2 << 1 -+/* [0x00000500] */ 0x929de7d2, 0x1003c8e0, // min r3, r3, rb_max_y ; mov.ifnc r0, r2 -+/* [0x00000508] */ 0x545d039f, 0x12024863, // and r1, r1, ra_pmax ; mul24 r3, r3, rb_pitch -+/* [0x00000510] */ 0x8c5cfec6, 0x12024f20, // add vr_txs, vra_base, r3 ; v8min r0, r0, ra_pmax -+/* [0x00000518] */ 0x4c001bf0, 0xd8025963, // add r5rep, r5, 1 ; mul24 r3, ra0.8a, r0 -+/* [0x00000520] */ 0x4d01fef1, 0x1e0248a3, // sub r2, rb_fir_off_h, r3 ; mul24 r3, ra0.8d, r1 -+/* [0x00000528] */ 0x4d03e4f0, 0xda0248a3, // sub r2, r2, r3 ; mul24 r3, ra0.8b << 2, r0 << 2 @ "mul_used", 0 -+/* [0x00000530] */ 0x40034031, 0xda0109e3, // nop ; mul24.ifn r3, ra0.8b << 12, r1 << 12 @ "mul_used", 0 -+/* [0x00000538] */ 0x4c03c4f0, 0xdc0248a3, // add r2, r2, r3 ; mul24 r3, ra0.8c << 4, r0 << 4 @ "mul_used", 0 -+/* [0x00000540] */ 0x4c032b71, 0xdc0329e3, // add.setf -, r5, r5 ; mul24.ifn r3, ra0.8c << 14, r1 << 14 @ "mul_used", 0 -+/* [0x00000548] */ 0xffffff68, 0xf06809e7, // brr.anyn -, r:1b -+/* [0x00000550] */ 0x4c1ca4f7, 0x100248a0, // add r2, r2, r3 ; mul24 r0, ra7, rb10 -+/* [0x00000558] */ 0x550c6ffe, 0x1a024161, // mov ra5, rb6 ; mul24 r1, rb6, ra3.8b -+/* [0x00000560] */ 0x8f1c05f6, 0xd00241c6, // asr ra7, r2, v_bit_depth - 8 ; mov rb6, ra7 -+/* [0x00000568] */ 0x4c0c423e, 0x18024860, // add r1, r1, r0 ; mul24 r0, rb4, ra3.8a -+/* [0x00000570] */ 0x4d1cb237, 0x10024860, // sub r1, r1, r0 ; mul24 r0, ra7, rb11 -+/* [0x00000578] */ 0x0d9e7200, 0x10020867, // sub r1, r1, r0 -+/* [0x00000580] */ 0x8f5c63f6, 0xdc024863, // asr r1, r1, 6 ; mov r3, ra_blk_height -+/* [0x00000588] */ 0x4d592bce, 0x120269e0, // sub.setf -, r5, rb_lcount ; mul24 r0, r1, ra_wt_mul_l0 -+/* [0x00000590] */ 0x4c64c1ce, 0x14024821, // add r0, r0, rb_wt_off ; mul24 r1, r1, ra_kmul_add -+/* [0x00000598] */ 0xed427073, 0x12024860, // sub r1, r0, r1 ; v8subs r0, ra_height, r3 -+/* [0x000005a0] */ 0xffffff10, 0xf06809e7, // brr.anyn -, r:1b -+/* [0x000005a8] */ 0x0f9cd3c0, 0xd0020867, // asr r1, r1, i_wt_den_p6 -+/* [0x000005b0] */ 0x925f23bf, 0x12020867, // min r1, r1, ra_pmax ; mov -, vw_wait -+/* [0x000005b8] */ 0x5351039f, 0x18024c22, // max vpm, r1, ra_k0 ; mul24 r2, r3, rb_pitch -+/* [0x000005c0] */ 0x956e7036, 0x10126431, // mov.setf ra_height, r0 ; mov vw_setup, ra_dma0 -+/* [0x000005c8] */ 0x00000000, 0xf027c9e7, // bra.anyz -, ra_link -+/* [0x000005d0] */ 0x929dd0ff, 0x10024831, // min r0, r0, r3 ; mov vw_setup, rb_dma1 -+/* [0x000005d8] */ 0x8d7270f6, 0x10024872, // sub r1, r0, r3 ; mov vw_addr, ra_dest -+/* [0x000005e0] */ 0x119d73c0, 0xd0020867, // shl r1, r1, i_shift23 -+/* [0x000005e8] */ 0xfffffec8, 0xf0f809e7, // brr -, r:1b -+/* [0x000005f0] */ 0x0c9d2e00, 0x100214a7, // add rb_lcount, rb_lcount, r0 -+/* [0x000005f8] */ 0x0c6e7c40, 0x100206e7, // add ra_dma0, ra_dma0, r1 -+/* [0x00000600] */ 0x8c71ccbf, 0x10024731, // add ra_dest, ra_dest, r2 ; mov vw_setup, rb_vpm_init -+// ::mc_filter_c_b -+/* [0x00000608] */ 0x9581cff6, 0x10025c42, // mov vw_setup, rb_vpm_init ; mov ra2, unif -+/* [0x00000610] */ 0x8c803ff6, 0x100269e3, // add.setf -, rb_ef, rb_ef ; mov r3, unif -+/* [0x00000618] */ 0xf1081dc9, 0xd4024825, // shl r0, ra2.16b, v_x_shift ; v8subs r5rep, r1, r1 -+/* [0x00000620] */ 0x8c0821f6, 0x12225813, // add r0, r0, rb_elem_x ; mov ra_y_next, ra2.16a -+/* [0x00000628] */ 0x8d810bf6, 0x10025850, // sub r1, r5, rb_pitch ; mov ra_width_height, unif -+/* [0x00000630] */ 0x93567176, 0x14125815, // max r0, r0, r5 ; mov ra_xshift, ra_xshift_next -+/* [0x00000638] */ 0x9281a1f6, 0x10025800, // min r0, r0, rb_max_x ; mov ra0, unif -+/* [0x00000640] */ 0x119c31c0, 0xd0220567, // shl ra_xshift_next, r0, 3 -+/* [0x00000648] */ 0x9481c1f6, 0xd0025802, // and r0, r0, -4 ; mov ra2, unif -+/* [0x00000650] */ 0x54402077, 0xd4024862, // and r1, r0, r1 ; mul24 r2, ra_width, v_x_mul -+/* [0x00000658] */ 0x569d404f, 0x10024821, // xor r0, r0, r1 ; mul24 r1, r1, rb_xpitch -+/* [0x00000660] */ 0x8c427076, 0x12024821, // add r0, r0, r1 ; mov r1, ra_height -+/* [0x00000668] */ 0x8c9c163f, 0x10024680, // add ra_base_next, r3, r0 ; mov rb_xshift2, rb_xshift2_next -+/* [0x00000670] */ 0x8d819eb6, 0x10025756, // sub rb_dma1, rb_dma1_base, r2 ; mov ra_wt_off_mul_l0, unif -+/* [0x00000678] */ 0x8c5dc3ce, 0xdc025461, // add rb_i_tmu, r1, (3-4) - PREREAD ; v8min r1, r1, ra_blk_height -+/* [0x00000680] */ 0x8c59f3f6, 0xd4139496, // add rb_lcount, r1, (3-4) ; mov.ifc ra_wt_mul_l0, ra_wt_off_l0 -+/* [0x00000688] */ 0x918073f6, 0xd0025803, // shl r0, r1, v_dma_h_shift ; mov ra3, unif -+/* [0x00000690] */ 0x8c8270b6, 0x10024823, // add r0, r0, r2 ; mov r3, unif -+/* [0x00000698] */ 0x910d01f6, 0xd2125813, // shl r0, r0, v_dma_wh_shift ; mov ra_y2_next, ra3.16a -+/* [0x000006a0] */ 0x8c0db1f6, 0x140246e0, // add ra_dma0, r0, rb_dma0_base ; mov r0, ra3.16b -+/* [0x000006a8] */ 0x918011f6, 0xd0025801, // shl r0, r0, v_x_shift ; mov ra1, unif -+/* [0x000006b0] */ 0x8c8021f6, 0x10025803, // add r0, r0, rb_elem_x ; mov ra3, unif -+/* [0x000006b8] */ 0x8d810bf6, 0x10025852, // sub r1, r5, rb_pitch ; mov ra_wt_off_mul_l1, unif -+/* [0x000006c0] */ 0x939de17f, 0x10025809, // max r0, r0, r5 ; mov ra9, rb_max_y -+/* [0x000006c8] */ 0x9265a1f6, 0x14024822, // min r0, r0, rb_max_x ; mov r2, ra_kmul_add -+/* [0x000006d0] */ 0x119c31c0, 0xd0021067, // shl rb_xshift2_next, r0, 3 -+/* [0x000006d8] */ 0x9481c1f6, 0xd0039812, // and r0, r0, -4 ; mov.ifc ra_wt_off_mul_l1, unif -+/* [0x000006e0] */ 0x949dc07f, 0xd0024865, // and r1, r0, r1 ; mov r5rep, -4 -+/* [0x000006e8] */ 0x569d404f, 0x10024821, // xor r0, r0, r1 ; mul24 r1, r1, rb_xpitch -+/* [0x000006f0] */ 0x8c827076, 0x1002581c, // add r0, r0, r1 ; mov ra_dest, unif -+/* [0x000006f8] */ 0x8c667636, 0x140254e0, // add rb_base2_next, r3, r0 ; mov r0, ra_fir_off_val -+/* [0x00000700] */ 0x4c5a7c86, 0x121245a1, // add ra_wt_mul_l0, ra_wt_mul_l0, r2 ; mul24 r1, r0, ra_wt_mul_l0 -+/* [0x00000708] */ 0x4c4a7c86, 0x121244a0, // add ra_wt_mul_l1, ra_wt_mul_l1, r2 ; mul24 r0, r0, ra_wt_mul_l1 -+/* [0x00000710] */ 0x8c4a7076, 0x14024821, // add r0, r0, r1 ; mov r1, ra_wt_off_l1 -+/* [0x00000718] */ 0x910cd3f6, 0xde02484b, // shl r1, r1, i_wt_den_p6 ; mov rb11, ra3.8d -+/* [0x00000720] */ 0x8d827236, 0x1002531e, // sub rb_wt_off, r1, r0 ; mov ra_link, unif -+/* [0x00000728] */ 0x95080ff6, 0x1e024287, // mov ra10, rb_xshift2 ; mov rb7, ra2.8d -+// :1 -+/* [0x00000730] */ 0x0d9d1bc0, 0xa00229e7, // sub.setf -, r5, rb_i_tmu ; nop ; ldtmu0 -+/* [0x00000738] */ 0x8e5539bf, 0x1202888f, // shr r2, r4, ra_xshift ; mov.ifz rb_base2, rb_base2_next -+/* [0x00000740] */ 0x8e4c85f6, 0xd0029851, // shr r1, r2, v_v_shift ; mov.ifz ra_y_y2, ra_y_y2_next -+/* [0x00000748] */ 0x8c683ff6, 0x1002b9d8, // add.setf -, rb_ef, rb_ef ; mov.ifz ra_base, ra_base_next -+/* [0x00000750] */ 0x8c441fb6, 0xd4224463, // add ra_y, 1, ra_y ; mov r3, ra_y -+/* [0x00000758] */ 0x93531789, 0xd80248e0, // max r3, r3, ra_k0 ; mov r0, r1 << 15 -+/* [0x00000760] */ 0x9227f792, 0xd003c8e1, // min r3, r3, ra9 ; mov.ifnc r1, r2 << 1 -+/* [0x00000768] */ 0x559d049f, 0x100e4823, // mov.ifnc r0, r2 ; mul24 r3, r3, rb_pitch -+/* [0x00000770] */ 0x8c618cc7, 0x10024e20, // add t0s, ra_base, r3 ; v8min r0, r0, rb_pmask -+/* [0x00000778] */ 0x540183f0, 0x18024862, // and r1, r1, rb_pmask ; mul24 r2, ra0.8a, r0 -+/* [0x00000780] */ 0x4d01feb1, 0x1e0248a3, // sub r2, rb_fir_off_h, r2 ; mul24 r3, ra0.8d, r1 -+/* [0x00000788] */ 0x4d03e4f0, 0xda0248a3, // sub r2, r2, r3 ; mul24 r3, ra0.8b << 2, r0 << 2 @ "mul_used", 0 -+/* [0x00000790] */ 0x40034031, 0xda0109e3, // nop ; mul24.ifn r3, ra0.8b << 12, r1 << 12 @ "mul_used", 0 -+/* [0x00000798] */ 0x4c03c4f0, 0xdc0248a3, // add r2, r2, r3 ; mul24 r3, ra0.8c << 4, r0 << 4 @ "mul_used", 0 -+/* [0x000007a0] */ 0x40032031, 0xdc0109e3, // nop ; mul24.ifn r3, ra0.8c << 14, r1 << 14 @ "mul_used", 0 -+/* [0x000007a8] */ 0x4c0854fe, 0xb8025804, // add r0, r2, r3 ; mul24 ra4, rb5, ra2.8a ; ldtmu1 -+/* [0x000007b0] */ 0x8e2869bf, 0x10024885, // shr r2, r4, ra10 ; mov rb5, rb6 -+/* [0x000007b8] */ 0x8e4485f6, 0xd2024863, // shr r1, r2, v_v_shift ; mov r3, ra_y2 -+/* [0x000007c0] */ 0x8e1c01f6, 0xd00241c6, // shr ra7, r0, v_bit_depth - 8 ; mov rb6, ra7 -+/* [0x000007c8] */ 0x8c531789, 0xda124460, // add ra_y2, r3, ra_k1 ; mov r0, r1 << 15 -+/* [0x000007d0] */ 0x9353f792, 0xd803c8e1, // max r3, r3, ra_k0 ; mov.ifnc r1, r2 << 1 -+/* [0x000007d8] */ 0x925de7ce, 0x120248e1, // min r3, r3, rb_max_y ; v8min r1, r1, ra_pmax -+/* [0x000007e0] */ 0x559d049f, 0x100e4823, // mov.ifnc r0, r2 ; mul24 r3, r3, rb_pitch -+/* [0x000007e8] */ 0x8c5cfec6, 0x12024f20, // add t1s, rb_base2, r3 ; v8min r0, r0, ra_pmax -+/* [0x000007f0] */ 0x4c041bf0, 0xd8025962, // add r5rep, r5, 1 ; mul24 r2, ra1.8a, r0 -+/* [0x000007f8] */ 0x4d05feb1, 0x1e0248a3, // sub r2, rb_fir_off_h, r2 ; mul24 r3, ra1.8d, r1 -+/* [0x00000800] */ 0x4d07e4f0, 0xda0248a3, // sub r2, r2, r3 ; mul24 r3, ra1.8b << 2, r0 << 2 @ "mul_used", 0 -+/* [0x00000808] */ 0x40074031, 0xda0109e3, // nop ; mul24.ifn r3, ra1.8b << 12, r1 << 12 @ "mul_used", 0 -+/* [0x00000810] */ 0x4c07c6b0, 0xdc0248a3, // add r2, r3, r2 ; mul24 r3, ra1.8c << 4, r0 << 4 @ "mul_used", 0 -+/* [0x00000818] */ 0x4c072b71, 0xdc0329e3, // add.setf -, r5, r5 ; mul24.ifn r3, ra1.8c << 14, r1 << 14 @ "mul_used", 0 -+/* [0x00000820] */ 0xfffffef0, 0xf06809e7, // brr.anyn -, r:1b -+/* [0x00000828] */ 0x4c0c94fe, 0x180248a0, // add r2, r2, r3 ; mul24 r0, rb9, ra3.8a -+/* [0x00000830] */ 0x550caffe, 0x1a025261, // mov rb9, rb10 ; mul24 r1, rb10, ra3.8b -+/* [0x00000838] */ 0x8e2c05f6, 0xd00242ca, // shr ra11, r2, v_bit_depth - 8 ; mov rb10, ra11 -+/* [0x00000840] */ 0x4d08523e, 0x1a0248a1, // sub r2, r1, r0 ; mul24 r1, rb5, ra2.8b -+/* [0x00000848] */ 0x8d112bf6, 0x100269e0, // sub.setf -, r5, rb_lcount ; mov r0, ra4 -+/* [0x00000850] */ 0x4d08623e, 0x1c024860, // sub r1, r1, r0 ; mul24 r0, rb6, ra2.8c -+/* [0x00000858] */ 0x4c1c7237, 0x10024860, // add r1, r1, r0 ; mul24 r0, ra7, rb7 -+/* [0x00000860] */ 0x4d0ca23e, 0x1c024860, // sub r1, r1, r0 ; mul24 r0, rb10, ra3.8c -+/* [0x00000868] */ 0x4c2cb437, 0x100248a0, // add r2, r2, r0 ; mul24 r0, ra11, rb11 -+/* [0x00000870] */ 0x0d9e7400, 0x100208a7, // sub r2, r2, r0 -+/* [0x00000878] */ 0x0e9c63c0, 0xd0020867, // shr r1, r1, 6 -+/* [0x00000880] */ 0x4e5865ce, 0xd20248a0, // shr r2, r2, 6 ; mul24 r0, r1, ra_wt_mul_l0 -+/* [0x00000888] */ 0x4c4a7456, 0x120248a1, // add r2, r2, r1 ; mul24 r1, r2, ra_wt_mul_l1 -+/* [0x00000890] */ 0x4c667216, 0x14024862, // add r1, r1, r0 ; mul24 r2, r2, ra_kmul_add -+/* [0x00000898] */ 0x8d5e72b6, 0x1c024863, // sub r1, r1, r2 ; mov r3, ra_blk_height -+/* [0x000008a0] */ 0xec40c3f3, 0x12024860, // add r1, r1, rb_wt_off ; v8subs r0, ra_height, r3 -+/* [0x000008a8] */ 0xfffffe68, 0xf06809e7, // brr.anyn -, r:1b -+/* [0x000008b0] */ 0x0f667380, 0x18020867, // asr r1, r1, ra_wt_den_p7 -+/* [0x000008b8] */ 0x925f23bf, 0x12020867, // min r1, r1, ra_pmax ; mov -, vw_wait -+/* [0x000008c0] */ 0x5351039f, 0x18024c22, // max vpm, r1, ra_k0 ; mul24 r2, r3, rb_pitch -+/* [0x000008c8] */ 0x956e7036, 0x10126431, // mov.setf ra_height, r0 ; mov vw_setup, ra_dma0 -+/* [0x000008d0] */ 0x00000000, 0xf027c9e7, // bra.anyz -, ra_link -+/* [0x000008d8] */ 0x929dd0ff, 0x10024831, // min r0, r0, r3 ; mov vw_setup, rb_dma1 -+/* [0x000008e0] */ 0x8d7270f6, 0x10024872, // sub r1, r0, r3 ; mov vw_addr, ra_dest -+/* [0x000008e8] */ 0x119d73c0, 0xd0020867, // shl r1, r1, i_shift23 -+/* [0x000008f0] */ 0xfffffe20, 0xf0f809e7, // brr -, r:1b -+/* [0x000008f8] */ 0x0c9d2e00, 0x100214a7, // add rb_lcount, rb_lcount, r0 -+/* [0x00000900] */ 0x0c6e7c40, 0x100206e7, // add ra_dma0, ra_dma0, r1 -+/* [0x00000908] */ 0x8c71ccbf, 0x10024731, // add ra_dest, ra_dest, r2 ; mov vw_setup, rb_vpm_init -+// ::mc_sync_q0 -+/* [0x00000910] */ 0x15827d80, 0x100207a7, // mov ra_link, unif -+/* [0x00000918] */ 0x159f2fc0, 0x100009e7, // mov -, vw_wait -+/* [0x00000920] */ 0x00000010, 0xe80009e7, // mov dst, sacq(i) -+/* [0x00000928] */ 0x00000010, 0xe80009e7, // mov dst, sacq(i) -+/* [0x00000930] */ 0x00000010, 0xe80009e7, // mov dst, sacq(i) -+/* [0x00000938] */ 0x00000000, 0xf0f7c9e7, // bra -, ra_link -+/* [0x00000940] */ 0x0000001c, 0xe80009e7, // mov dst, sacq(i) -+/* [0x00000948] */ 0x00000001, 0xe80009e7, // mov dst, srel(i) -+/* [0x00000950] */ 0x0000000d, 0xe80009e7, // mov dst, srel(i) -+// ::mc_sync_q1 -+/* [0x00000958] */ 0x15827d80, 0x100207a7, // mov ra_link, unif -+/* [0x00000960] */ 0x159f2fc0, 0x100009e7, // mov -, vw_wait -+/* [0x00000968] */ 0x00000000, 0xf0f7c9e7, // bra -, ra_link -+/* [0x00000970] */ 0x00000000, 0xe80009e7, // mov dst, srel(i) -+/* [0x00000978] */ 0x00000011, 0xe80009e7, // mov dst, sacq(i) -+/* [0x00000980] */ 0x00000002, 0xe80009e7, // mov dst, srel(i) -+// ::mc_sync_q2 -+/* [0x00000988] */ 0x15827d80, 0x100207a7, // mov ra_link, unif -+/* [0x00000990] */ 0x159f2fc0, 0x100009e7, // mov -, vw_wait -+/* [0x00000998] */ 0x00000000, 0xf0f7c9e7, // bra -, ra_link -+/* [0x000009a0] */ 0x00000000, 0xe80009e7, // mov dst, srel(i) -+/* [0x000009a8] */ 0x00000012, 0xe80009e7, // mov dst, sacq(i) -+/* [0x000009b0] */ 0x00000003, 0xe80009e7, // mov dst, srel(i) -+// ::mc_sync_q3 -+/* [0x000009b8] */ 0x15827d80, 0x100207a7, // mov ra_link, unif -+/* [0x000009c0] */ 0x159f2fc0, 0x100009e7, // mov -, vw_wait -+/* [0x000009c8] */ 0x00000000, 0xf0f7c9e7, // bra -, ra_link -+/* [0x000009d0] */ 0x00000000, 0xe80009e7, // mov dst, srel(i) -+/* [0x000009d8] */ 0x00000013, 0xe80009e7, // mov dst, sacq(i) -+/* [0x000009e0] */ 0x009e7000, 0x100009e7, // nop -+// ::mc_sync_q4 -+/* [0x000009e8] */ 0x15827d80, 0x100207a7, // mov ra_link, unif -+/* [0x000009f0] */ 0x159f2fc0, 0x100009e7, // mov -, vw_wait -+/* [0x000009f8] */ 0x00000014, 0xe80009e7, // mov dst, sacq(i) -+/* [0x00000a00] */ 0x00000014, 0xe80009e7, // mov dst, sacq(i) -+/* [0x00000a08] */ 0x00000014, 0xe80009e7, // mov dst, sacq(i) -+/* [0x00000a10] */ 0x00000000, 0xf0f7c9e7, // bra -, ra_link -+/* [0x00000a18] */ 0x0000001d, 0xe80009e7, // mov dst, sacq(i) -+/* [0x00000a20] */ 0x00000005, 0xe80009e7, // mov dst, srel(i) -+/* [0x00000a28] */ 0x0000000e, 0xe80009e7, // mov dst, srel(i) -+// ::mc_sync_q5 -+/* [0x00000a30] */ 0x15827d80, 0x100207a7, // mov ra_link, unif -+/* [0x00000a38] */ 0x159f2fc0, 0x100009e7, // mov -, vw_wait -+/* [0x00000a40] */ 0x00000000, 0xf0f7c9e7, // bra -, ra_link -+/* [0x00000a48] */ 0x00000004, 0xe80009e7, // mov dst, srel(i) -+/* [0x00000a50] */ 0x00000015, 0xe80009e7, // mov dst, sacq(i) -+/* [0x00000a58] */ 0x00000006, 0xe80009e7, // mov dst, srel(i) -+// ::mc_sync_q6 -+/* [0x00000a60] */ 0x15827d80, 0x100207a7, // mov ra_link, unif -+/* [0x00000a68] */ 0x159f2fc0, 0x100009e7, // mov -, vw_wait -+/* [0x00000a70] */ 0x00000000, 0xf0f7c9e7, // bra -, ra_link -+/* [0x00000a78] */ 0x00000004, 0xe80009e7, // mov dst, srel(i) -+/* [0x00000a80] */ 0x00000016, 0xe80009e7, // mov dst, sacq(i) -+/* [0x00000a88] */ 0x00000007, 0xe80009e7, // mov dst, srel(i) -+// ::mc_sync_q7 -+/* [0x00000a90] */ 0x15827d80, 0x100207a7, // mov ra_link, unif -+/* [0x00000a98] */ 0x159f2fc0, 0x100009e7, // mov -, vw_wait -+/* [0x00000aa0] */ 0x00000000, 0xf0f7c9e7, // bra -, ra_link -+/* [0x00000aa8] */ 0x00000004, 0xe80009e7, // mov dst, srel(i) -+/* [0x00000ab0] */ 0x00000017, 0xe80009e7, // mov dst, sacq(i) -+/* [0x00000ab8] */ 0x009e7000, 0x100009e7, // nop -+// ::mc_sync_q8 -+/* [0x00000ac0] */ 0x15827d80, 0x100207a7, // mov ra_link, unif -+/* [0x00000ac8] */ 0x159f2fc0, 0x100009e7, // mov -, vw_wait -+/* [0x00000ad0] */ 0x00000018, 0xe80009e7, // mov dst, sacq(i) -+/* [0x00000ad8] */ 0x00000018, 0xe80009e7, // mov dst, sacq(i) -+/* [0x00000ae0] */ 0x00000018, 0xe80009e7, // mov dst, sacq(i) -+/* [0x00000ae8] */ 0x00000000, 0xf0f7c9e7, // bra -, ra_link -+/* [0x00000af0] */ 0x0000001e, 0xe80009e7, // mov dst, sacq(i) -+/* [0x00000af8] */ 0x00000009, 0xe80009e7, // mov dst, srel(i) -+/* [0x00000b00] */ 0x0000000c, 0xe80009e7, // mov dst, srel(i) -+// ::mc_sync_q9 -+/* [0x00000b08] */ 0x15827d80, 0x100207a7, // mov ra_link, unif -+/* [0x00000b10] */ 0x159f2fc0, 0x100009e7, // mov -, vw_wait -+/* [0x00000b18] */ 0x00000000, 0xf0f7c9e7, // bra -, ra_link -+/* [0x00000b20] */ 0x00000008, 0xe80009e7, // mov dst, srel(i) -+/* [0x00000b28] */ 0x00000019, 0xe80009e7, // mov dst, sacq(i) -+/* [0x00000b30] */ 0x0000000a, 0xe80009e7, // mov dst, srel(i) -+// ::mc_sync_q10 -+/* [0x00000b38] */ 0x15827d80, 0x100207a7, // mov ra_link, unif -+/* [0x00000b40] */ 0x159f2fc0, 0x100009e7, // mov -, vw_wait -+/* [0x00000b48] */ 0x00000000, 0xf0f7c9e7, // bra -, ra_link -+/* [0x00000b50] */ 0x00000008, 0xe80009e7, // mov dst, srel(i) -+/* [0x00000b58] */ 0x0000001a, 0xe80009e7, // mov dst, sacq(i) -+/* [0x00000b60] */ 0x0000000b, 0xe80009e7, // mov dst, srel(i) -+// ::mc_sync_q11 -+/* [0x00000b68] */ 0x15827d80, 0x100207a7, // mov ra_link, unif -+/* [0x00000b70] */ 0x159f2fc0, 0x100009e7, // mov -, vw_wait -+/* [0x00000b78] */ 0x00000000, 0xf0f7c9e7, // bra -, ra_link -+/* [0x00000b80] */ 0x00000008, 0xe80009e7, // mov dst, srel(i) -+/* [0x00000b88] */ 0x0000001b, 0xe80009e7, // mov dst, sacq(i) -+/* [0x00000b90] */ 0x009e7000, 0x100009e7, // nop -+// ::mc_exit_c_qn -+// ::mc_exit_y_qn -+/* [0x00000b98] */ 0x00000002, 0xe00228e7, // mov.setf r3, PREREAD - 1 -+// :1 -+/* [0x00000ba0] */ 0xffffffe0, 0xf03809e7, // brr.anynz -, r:1b -+/* [0x00000ba8] */ 0x009e7000, 0xa00009e7, // nop ; nop ; ldtmu0 -+/* [0x00000bb0] */ 0x009e7000, 0xb00009e7, // nop ; nop ; ldtmu1 -+/* [0x00000bb8] */ 0x0d9c17c0, 0xd00228e7, // sub.setf r3, r3, 1 -+/* [0x00000bc0] */ 0x159f2fc0, 0x100009e7, // mov -, vw_wait -+/* [0x00000bc8] */ 0x009e7000, 0x300009e7, // nop ; nop ; thrend -+/* [0x00000bd0] */ 0x009e7000, 0x100009e7, // nop -+/* [0x00000bd8] */ 0x009e7000, 0x100009e7, // nop -+// ::mc_exit_c_q0 -+// ::mc_exit_y_q0 -+/* [0x00000be0] */ 0x00000002, 0xe00228e7, // mov.setf r3, PREREAD - 1 -+// :1 -+/* [0x00000be8] */ 0xffffffe0, 0xf03809e7, // brr.anynz -, r:1b -+/* [0x00000bf0] */ 0x009e7000, 0xa00009e7, // nop ; nop ; ldtmu0 -+/* [0x00000bf8] */ 0x009e7000, 0xb00009e7, // nop ; nop ; ldtmu1 -+/* [0x00000c00] */ 0x0d9c17c0, 0xd00228e7, // sub.setf r3, r3, 1 -+/* [0x00000c08] */ 0x159f2fc0, 0x100009e7, // mov -, vw_wait -+/* [0x00000c10] */ 0x0000001c, 0xe80009e7, // mov dst, sacq(i) -+/* [0x00000c18] */ 0x009e7000, 0x300009e7, // nop ; nop ; thrend -+/* [0x00000c20] */ 0x00000001, 0xe00209a7, // mov interrupt, 1 -+/* [0x00000c28] */ 0x009e7000, 0x100009e7, // nop -+// ::mc_setup_y_q0 -+/* [0x00000c30] */ 0x0000000c, 0xe80009e7, // mov dst, srel(i) -+// ::mc_setup_y_qn -+/* [0x00000c38] */ 0x95801ff6, 0xd0025900, // mov tmurs, 1 ; mov ra0, unif -+/* [0x00000c40] */ 0x15827d80, 0x10020267, // mov ra9, unif -+/* [0x00000c48] */ 0x15827d80, 0x10020067, // mov ra1, unif -+/* [0x00000c50] */ 0xaaaaff00, 0xe6020827, // mov r0, [0,2,0,2,0,2,0,2,1,3,1,3,1,3,1,3] -+/* [0x00000c58] */ 0x9181e1f6, 0xd00250cb, // shl rb_ef, r0, i_shift30 ; mov ra11, unif -+/* [0x00000c60] */ 0xff800100, 0xe0020527, // mov ra_kff800100, 0xff800100 -+/* [0x00000c68] */ 0x000000ff, 0xe0021627, // mov rb_pmask, v_pmask -+/* [0x00000c70] */ 0x001000ff, 0xe00205e7, // mov ra_blk_height_pmax, ((1 << v_bit_depth) - 1) | (v_blk_height << 16) -+/* [0x00000c78] */ 0x00004000, 0xe00217e7, // mov rb_fir_off_h, (FIR_OFFSET << (v_bit_depth - 8)) -+/* [0x00000c80] */ 0x4000000e, 0xe0020667, // mov ra_fir_off_val_wt_den_p7, (FIR_OFFSET << 16) | (DENOM + 15 - v_bit_depth) -+/* [0x00000c88] */ 0x050b0a00, 0xe0021567, // mov rb_y_coeffs_2, 0x050b0a00 -+/* [0x00000c90] */ 0x11283a40, 0xe00215a7, // mov rb_y_coeffs_3, 0x11283a40 -+/* [0x00000c98] */ 0x0a0b0500, 0xe00215e7, // mov rb_y_coeffs_5, 0x0a0b0500 -+/* [0x00000ca0] */ 0x15827d80, 0x100200e7, // mov ra3, unif -+/* [0x00000ca8] */ 0x95803ff6, 0x10024754, // mov ra_ef, rb_ef ; mov rb_xpitch, unif -+/* [0x00000cb0] */ 0x0d0c1dc0, 0xd40216a7, // sub rb_max_x, ra3.16b, 1 -+/* [0x00000cb8] */ 0x0d0c1dc0, 0xd20217a7, // sub rb_max_y, ra3.16a, 1 -+/* [0x00000cc0] */ 0x959a0dbf, 0x100248d0, // mov r3, elem_num ; mov rb_pitch, unif -+/* [0x00000cc8] */ 0xc0000000, 0xe0020867, // mov r1, vdw_setup_1(0) -+/* [0x00000cd0] */ 0x159d03c0, 0x10021667, // or rb_dma1_base, r1, rb_pitch -+/* [0x00000cd8] */ 0x0c027cc0, 0x14020827, // add r0, ra0.16b, r3 -+/* [0x00000ce0] */ 0x139c01c0, 0xd0020827, // max r0, r0, 0 -+/* [0x00000ce8] */ 0x129da1c0, 0x10020827, // min r0, r0, rb_max_x -+/* [0x00000cf0] */ 0x119c31c0, 0xd0220567, // shl ra_xshift_next, r0, 3 -+/* [0x00000cf8] */ 0xf49dc1d2, 0xd0024822, // and r0, r0, -4 ; v8subs r2, r2, r2 -+/* [0x00000d00] */ 0x0d9d05c0, 0x100208a7, // sub r2, r2, rb_pitch -+/* [0x00000d08] */ 0x149e7080, 0x10020867, // and r1, r0, r2 -+/* [0x00000d10] */ 0x569d404f, 0x10024821, // xor r0, r0, r1 ; mul24 r1, r1, rb_xpitch -+/* [0x00000d18] */ 0x0c9e7040, 0x10020827, // add r0, r0, r1 -+/* [0x00000d20] */ 0x0c267c00, 0x10020627, // add ra_base, ra9, r0 -+/* [0x00000d28] */ 0x0c067cc0, 0x14020827, // add r0, ra1.16b, r3 -+/* [0x00000d30] */ 0x139c01c0, 0xd0020827, // max r0, r0, 0 -+/* [0x00000d38] */ 0x129da1c0, 0x10020827, // min r0, r0, rb_max_x -+/* [0x00000d40] */ 0x119c31c0, 0xd0021067, // shl rb_xshift2_next, r0, 3 -+/* [0x00000d48] */ 0x149dc1c0, 0xd0020827, // and r0, r0, -4 -+/* [0x00000d50] */ 0x149e7080, 0x10020867, // and r1, r0, r2 -+/* [0x00000d58] */ 0x569d404f, 0x10024821, // xor r0, r0, r1 ; mul24 r1, r1, rb_xpitch -+/* [0x00000d60] */ 0x0c9e7040, 0x10020827, // add r0, r0, r1 -+/* [0x00000d68] */ 0x0c2e7c00, 0x100213e7, // add rb_base2, ra11, r0 -+/* [0x00000d70] */ 0x80027036, 0x120049e0, // nop ; mov r0, ra0.16a -+/* [0x00000d78] */ 0x95043ff6, 0xd20248e2, // mov r3, PREREAD ; mov r2, ra1.16a -+// :1 -+/* [0x00000d80] */ 0x0d9c17c0, 0xd00228e7, // sub.setf r3, r3, 1 -+/* [0x00000d88] */ 0x139c01c0, 0xd0020867, // max r1, r0, 0 -+/* [0x00000d90] */ 0x129de3c0, 0x10020867, // min r1, r1, rb_max_y -+/* [0x00000d98] */ 0x4c51018f, 0x1a024821, // add r0, r0, ra_k1 ; mul24 r1, r1, rb_pitch -+/* [0x00000da0] */ 0x8c627c40, 0x10225e11, // add t0s, ra_base, r1 ; mov ra_y, r0 -+/* [0x00000da8] */ 0x139c05c0, 0xd0020867, // max r1, r2, 0 -+/* [0x00000db0] */ 0xffffffb0, 0xf03809e7, // brr.anynz -, r:1b -+/* [0x00000db8] */ 0x129de3c0, 0x10020867, // min r1, r1, rb_max_y -+/* [0x00000dc0] */ 0x4c51058f, 0x1a0248a1, // add r2, r2, ra_k1 ; mul24 r1, r1, rb_pitch -+/* [0x00000dc8] */ 0x8c9cfe52, 0x10125f11, // add t1s, rb_base2, r1 ; mov ra_y2, r2 -+/* [0x00000dd0] */ 0x159e6fc0, 0x100208a7, // mov r2, qpu_num -+/* [0x00000dd8] */ 0x0f9c25c0, 0xd0020867, // asr r1, r2, 2 -+/* [0x00000de0] */ 0x119c63c0, 0xd0020867, // shl r1, r1, 6 -+/* [0x00000de8] */ 0x149c35c0, 0xd0020827, // and r0, r2, 3 -+/* [0x00000df0] */ 0x159e7040, 0x10020827, // or r0, r0, r1 -+/* [0x00000df8] */ 0x00004800, 0xe0020867, // mov r1, vpm_setup(0, 4, h8p(0, 0)) -+/* [0x00000e00] */ 0x0c9e7040, 0x10021727, // add r_vpm, r0, r1 -+/* [0x00000e08] */ 0x80004004, 0xe0020867, // mov r1, vdw_setup_0(0, 0, dma_h8p(0,0,0)) -+/* [0x00000e10] */ 0x119c51c0, 0xd0020827, // shl r0, r0, 5 -+/* [0x00000e18] */ 0x0c9e7040, 0x100216e7, // add r_dma, r0, r1 -+/* [0x00000e20] */ 0x15827d80, 0x100207a7, // mov ra_link, unif -+/* [0x00000e28] */ 0x00000000, 0xe0024208, // mov ra8, 0 ; mov rb8, 0 -+/* [0x00000e30] */ 0x00000000, 0xf0f7c9e7, // bra -, ra_link -+/* [0x00000e38] */ 0x00000000, 0xe0024249, // mov ra9, 0 ; mov rb9, 0 -+/* [0x00000e40] */ 0x00000000, 0xe002428a, // mov ra10, 0 ; mov rb10, 0 -+/* [0x00000e48] */ 0x00000000, 0xe00242cb, // mov ra11, 0 ; mov rb11, 0 -+// :per_block_setup_8 -+/* [0x00000e50] */ 0x93567176, 0x14125815, // max r0, r0, r5 ; mov ra_xshift, ra_xshift_next -+/* [0x00000e58] */ 0x129da1c0, 0x10020827, // min r0, r0, rb_max_x -+/* [0x00000e60] */ 0x119c31c0, 0xd0220567, // shl ra_xshift_next, r0, 3 -+/* [0x00000e68] */ 0x149dc1c0, 0xd0020827, // and r0, r0, -4 -+/* [0x00000e70] */ 0x8d810bf6, 0x1002589a, // sub r2, r5, rb_pitch ; mov ra_base_next, unif -+/* [0x00000e78] */ 0x940270b6, 0x12225853, // and r1, r0, r2 ; mov ra_y_next, ra0.16a -+/* [0x00000e80] */ 0x569d404f, 0x10024821, // xor r0, r0, r1 ; mul24 r1, r1, rb_xpitch -+/* [0x00000e88] */ 0x8c827076, 0x10025801, // add r0, r0, r1 ; mov ra1, unif -+/* [0x00000e90] */ 0x0c6a7c00, 0x100206a7, // add ra_base_next, ra_base_next, r0 -+/* [0x00000e98] */ 0x0c067cc0, 0x14020827, // add r0, ra1.16b, r3 -+/* [0x00000ea0] */ 0x93067176, 0x12125813, // max r0, r0, r5 ; mov ra_y2_next, ra1.16a -+/* [0x00000ea8] */ 0x9281a1f6, 0x10024813, // min r0, r0, rb_max_x ; mov rb_base2_next, unif -+/* [0x00000eb0] */ 0x119c31c0, 0xd0021067, // shl rb_xshift2_next, r0, 3 -+/* [0x00000eb8] */ 0x9481c1f6, 0xd0025810, // and r0, r0, -4 ; mov ra_width_height, unif -+/* [0x00000ec0] */ 0x949dc0bf, 0x10024871, // and r1, r0, r2 ; mov vw_setup, rb_vpm_init -+/* [0x00000ec8] */ 0x569d404f, 0x10024821, // xor r0, r0, r1 ; mul24 r1, r1, rb_xpitch -+/* [0x00000ed0] */ 0x4c401077, 0xd4024821, // add r0, r0, r1 ; mul24 r1, ra_width, v_x_mul -+/* [0x00000ed8] */ 0x0c9d3e00, 0x100214e7, // add rb_base2_next, rb_base2_next, r0 -+/* [0x00000ee0] */ 0x8d419e76, 0x12025760, // sub rb_dma1, rb_dma1_base, r1 ; mov r0, ra_height -+/* [0x00000ee8] */ 0x8c5dc1c6, 0xdc025460, // add rb_i_tmu, r0, (7-8) - PREREAD ; v8min r0, r0, ra_blk_height -+/* [0x00000ef0] */ 0x0c9df1c0, 0xd00214a7, // add rb_lcount, r0, (7-8) -+/* [0x00000ef8] */ 0x916471f6, 0xd4024823, // shl r0, r0, v_dma_h_shift ; mov r3, ra_kmul_add -+/* [0x00000f00] */ 0x0c9e7040, 0x10020827, // add r0, r0, r1 -+/* [0x00000f08] */ 0x916501f6, 0xd4024822, // shl r0, r0, v_dma_wh_shift ; mov r2, ra_fir_off_val -+/* [0x00000f10] */ 0x8c81b1f6, 0x100246e0, // add ra_dma0, r0, rb_dma0_base ; mov r0, unif -+/* [0x00000f18] */ 0x918101f6, 0xd00a5816, // shl.ifnn r0, r0, i_shift16 ; mov ra_wt_off_mul_l0, unif -+/* [0x00000f20] */ 0x915031f6, 0xde024205, // shl ra8, r0, 3 ; mov rb5, ra_k255 -+/* [0x00000f28] */ 0x01040400, 0xe0020867, // mov r1, 0x01040400 -+/* [0x00000f30] */ 0x10227380, 0x1e5200a7, // ror ra2.8b, r1, ra8.8d -+/* [0x00000f38] */ 0x10227380, 0x1c520027, // ror ra0.8b, r1, ra8.8c -+/* [0x00000f40] */ 0x10215f80, 0x1e6200a7, // ror ra2.8c, rb_y_coeffs_2, ra8.8d -+/* [0x00000f48] */ 0x10215f80, 0x1c620027, // ror ra0.8c, rb_y_coeffs_2, ra8.8c -+/* [0x00000f50] */ 0x00010100, 0xe0020867, // mov r1,0x00010100 -+/* [0x00000f58] */ 0x902203bf, 0x1e025812, // ror r0, r1, ra8.8d ; mov ra_wt_off_mul_l1, unif -+/* [0x00000f60] */ 0x90205387, 0x1c424004, // ror ra0.8a, r1, ra8.8c ; v8min rb4, r0, rb5 -+/* [0x00000f68] */ 0x914883f6, 0xd0031856, // shl r1, r1, 8 ; mov.ifn ra_wt_off_mul_l0, ra_wt_off_mul_l1 -+/* [0x00000f70] */ 0x902203bf, 0x1e02581c, // ror r0, r1, ra8.8d ; mov ra_dest, unif -+/* [0x00000f78] */ 0x90205387, 0x1c72404b, // ror ra1.8d, r1, ra8.8c ; v8min rb11, r0, rb5 -+/* [0x00000f80] */ 0x10216f80, 0x1e7200a7, // ror ra2.8d, rb_y_coeffs_3, ra8.8d -+/* [0x00000f88] */ 0x10216f80, 0x1c720027, // ror ra0.8d, rb_y_coeffs_3, ra8.8c -+/* [0x00000f90] */ 0x10217f80, 0x1e5200e7, // ror ra3.8b, rb_y_coeffs_5, ra8.8d -+/* [0x00000f98] */ 0x10217f80, 0x1c520067, // ror ra1.8b, rb_y_coeffs_5, ra8.8c -+/* [0x00000fa0] */ 0x04040100, 0xe0020867, // mov r1,0x04040100 -+/* [0x00000fa8] */ 0x10227380, 0x1e6200e7, // ror ra3.8c, r1, ra8.8d -+/* [0x00000fb0] */ 0x902183bf, 0xdc624065, // ror ra1.8c, r1, ra8.8c ; mov r5rep, -8 -+/* [0x00000fb8] */ 0x00000000, 0xf0f7c9e7, // bra -, ra_link -+/* [0x00000fc0] */ 0x3a281100, 0xe0020867, // mov r1,0x3a281100 -+/* [0x00000fc8] */ 0x902203bf, 0x1e02581e, // ror r0, r1, ra8.8d ; mov ra_link, unif -+/* [0x00000fd0] */ 0x90205387, 0x1c424048, // ror ra1.8a, r1, ra8.8c ; v8min rb8, r0, rb5 -+// ::mc_filter_y_pxx -+/* [0x00000fd8] */ 0xfffffe58, 0xf0f807a7, // brr ra_link, r:per_block_setup_8 -+/* [0x00000fe0] */ 0x959a0ff6, 0x10024023, // mov ra0, unif ; mov r3, elem_num -+/* [0x00000fe8] */ 0xec9c3fd2, 0x100269e5, // add.setf -, rb_ef, rb_ef ; v8subs r5rep, r2, r2 -+/* [0x00000ff0] */ 0x8c001cff, 0x14024800, // add r0, ra0.16b, r3 ; mov rb_xshift2, rb_xshift2_next -+/* [0x00000ff8] */ 0x1158cdc0, 0xd4020867, // shl r1, ra_wt_off_l0, i_wt_den_p5 -+/* [0x00001000] */ 0x4c5a7cd6, 0x121245a0, // add ra_wt_mul_l0, ra_wt_mul_l0, r3 ; mul24 r0, r2, ra_wt_mul_l0 -+/* [0x00001008] */ 0x8d9c423f, 0x1042531d, // sub rb_wt_off, r1, r0 ; mov ra_ef.8a, rb4 -+// :1 -+/* [0x00001010] */ 0x4c745dbe, 0x100279c4, // add.setf -, ra_ef, ra_ef ; mul24 ra4, rb5, ra_ef -+/* [0x00001018] */ 0x93440dff, 0xd40248a1, // max r2, ra_y, 0 ; mov r1, 0 -+/* [0x00001020] */ 0x9251e5f6, 0x1a0248a3, // min r2, r2, rb_max_y ; mov r3, ra_k1 -+/* [0x00001028] */ 0x4c450cd7, 0xa4224462, // add ra_y, ra_y, r3 ; mul24 r2, r2, rb_pitch ; ldtmu0 -+/* [0x00001030] */ 0x8c606cbf, 0x10024e05, // add t0s, ra_base, r2 ; mov rb5, rb6 -+/* [0x00001038] */ 0x8e5479bf, 0x12024806, // shr r0, r4, ra_xshift ; mov rb6, rb7 -+/* [0x00001040] */ 0x93458c47, 0xb20248a0, // max r2, ra_y2, r1 ; v8min r0, r0, rb_pmask ; ldtmu1 -+/* [0x00001048] */ 0x8e2009f6, 0x10024847, // shr r1, r4, rb_xshift2 ; mov rb7, ra8 -+/* [0x00001050] */ 0x925de5ce, 0x120248a1, // min r2, r2, rb_max_y ; v8min r1, r1, ra_pmax -+/* [0x00001058] */ 0x4c450cd7, 0x12124462, // add ra_y2, ra_y2, r3 ; mul24 r2, r2, rb_pitch -+/* [0x00001060] */ 0x8c24feb6, 0x10025f08, // add t1s, rb_base2, r2 ; mov ra8, ra9 -+/* [0x00001068] */ 0x4c038af1, 0xd8025962, // add r5rep, r5, r3 ; mul24 r2, ra0.8a << 8, r1 << 8 @ "mul_used", 0 -+/* [0x00001070] */ 0x5501fff0, 0x180348e2, // mov r3, rb_fir_off_h ; mul24.ifnn r2, ra0.8a, r0 -+/* [0x00001078] */ 0x4d03f6b0, 0xda0248a3, // sub r2, r3, r2 ; mul24 r3, ra0.8b << 1, r0 << 1 @ "mul_used", 0 -+/* [0x00001080] */ 0x40037031, 0xda0109e3, // nop ; mul24.ifn r3, ra0.8b << 9, r1 << 9 @ "mul_used", 0 -+/* [0x00001088] */ 0x4c03e4f0, 0xdc0248a3, // add r2, r2, r3 ; mul24 r3, ra0.8c << 2, r0 << 2 @ "mul_used", 0 -+/* [0x00001090] */ 0x40036031, 0xdc0109e3, // nop ; mul24.ifn r3, ra0.8c << 10, r1 << 10 @ "mul_used", 0 -+/* [0x00001098] */ 0x4d03d4f0, 0xde0248a3, // sub r2, r2, r3 ; mul24 r3, ra0.8d << 3, r0 << 3 @ "mul_used", 0 -+/* [0x000010a0] */ 0x40035031, 0xde0109e3, // nop ; mul24.ifn r3, ra0.8d << 11, r1 << 11 @ "mul_used", 0 -+/* [0x000010a8] */ 0x4c07c4f0, 0xd80248a3, // add r2, r2, r3 ; mul24 r3, ra1.8a << 4, r0 << 4 @ "mul_used", 0 -+/* [0x000010b0] */ 0x40074031, 0xd80109e3, // nop ; mul24.ifn r3, ra1.8a << 12, r1 << 12 @ "mul_used", 0 -+/* [0x000010b8] */ 0x4c07b4f0, 0xda0248a3, // add r2, r2, r3 ; mul24 r3, ra1.8b << 5, r0 << 5 @ "mul_used", 0 -+/* [0x000010c0] */ 0x40073031, 0xda0109e3, // nop ; mul24.ifn r3, ra1.8b << 13, r1 << 13 @ "mul_used", 0 -+/* [0x000010c8] */ 0x4d07a4f0, 0xdc0248a3, // sub r2, r2, r3 ; mul24 r3, ra1.8c << 6, r0 << 6 @ "mul_used", 0 -+/* [0x000010d0] */ 0x40072031, 0xdc0109e3, // nop ; mul24.ifn r3, ra1.8c << 14, r1 << 14 @ "mul_used", 0 -+/* [0x000010d8] */ 0x4c0794f0, 0xde0248a3, // add r2, r2, r3 ; mul24 r3, ra1.8d << 7, r0 << 7 @ "mul_used", 0 -+/* [0x000010e0] */ 0x4c071b71, 0xde0329e3, // add.setf -, r5, r5 ; mul24.ifn r3, ra1.8d << 15, r1 << 15 @ "mul_used", 0 -+/* [0x000010e8] */ 0xffffff08, 0xf06809e7, // brr.anyn -, r:1b -+/* [0x000010f0] */ 0x4d0854fe, 0x1a0248a1, // sub r2, r2, r3 ; mul24 r1, rb5, ra2.8b -+/* [0x000010f8] */ 0x550caffe, 0x1a024260, // mov ra9, rb10 ; mul24 r0, rb10, ra3.8b -+/* [0x00001100] */ 0x8f2c05f6, 0xd00242ca, // asr ra11, r2, v_bit_depth - 8 ; mov rb10, ra11 -+/* [0x00001108] */ 0x4d08623e, 0x1c024860, // sub r1, r1, r0 ; mul24 r0, rb6, ra2.8c -+/* [0x00001110] */ 0x4d08723e, 0x1e024860, // sub r1, r1, r0 ; mul24 r0, rb7, ra2.8d -+/* [0x00001118] */ 0x4c208237, 0x10024860, // add r1, r1, r0 ; mul24 r0, ra8, rb8 -+/* [0x00001120] */ 0x4c0ca23e, 0x1c024860, // add r1, r1, r0 ; mul24 r0, rb10, ra3.8c -+/* [0x00001128] */ 0x4c2cb237, 0x10024860, // add r1, r1, r0 ; mul24 r0, ra11, rb11 -+/* [0x00001130] */ 0x8d5d1bf6, 0x1c0269e3, // sub.setf -, r5, rb_i_tmu ; mov r3, ra_blk_height -+/* [0x00001138] */ 0x8d1133bf, 0x1002884f, // sub r1, r1, ra4 ; mov.ifz rb_base2, rb_base2_next -+/* [0x00001140] */ 0x8d6a7236, 0x10029858, // sub r1, r1, r0 ; mov.ifz ra_base, ra_base_next -+/* [0x00001148] */ 0x8f4c63f6, 0xd0029851, // asr r1, r1, 6 ; mov.ifz ra_y_y2, ra_y_y2_next -+/* [0x00001150] */ 0x4d592bce, 0x120269e0, // sub.setf -, r5, rb_lcount ; mul24 r0, r1, ra_wt_mul_l0 -+/* [0x00001158] */ 0x4c64c1ce, 0x14024821, // add r0, r0, rb_wt_off ; mul24 r1, r1, ra_kmul_add -+/* [0x00001160] */ 0xed427073, 0x12024860, // sub r1, r0, r1 ; v8subs r0, ra_height, r3 -+/* [0x00001168] */ 0xfffffe88, 0xf06809e7, // brr.anyn -, r:1b -+/* [0x00001170] */ 0x0f9cd3c0, 0xd0020867, // asr r1, r1, i_wt_den_p6 -+/* [0x00001178] */ 0x925f23bf, 0x12020867, // min r1, r1, ra_pmax ; mov -, vw_wait -+/* [0x00001180] */ 0x5351039f, 0x18024c22, // max vpm, r1, ra_k0 ; mul24 r2, r3, rb_pitch -+/* [0x00001188] */ 0x956e7036, 0x10126431, // mov.setf ra_height, r0 ; mov vw_setup, ra_dma0 -+/* [0x00001190] */ 0x00000000, 0xf027c9e7, // bra.anyz -, ra_link -+/* [0x00001198] */ 0x929dd0ff, 0x10024831, // min r0, r0, r3 ; mov vw_setup, rb_dma1 -+/* [0x000011a0] */ 0x8d7270f6, 0x10024872, // sub r1, r0, r3 ; mov vw_addr, ra_dest -+/* [0x000011a8] */ 0x119d73c0, 0xd0020867, // shl r1, r1, i_shift23 -+/* [0x000011b0] */ 0xfffffe40, 0xf0f809e7, // brr -, r:1b -+/* [0x000011b8] */ 0x0c9d2e00, 0x100214a7, // add rb_lcount, rb_lcount, r0 -+/* [0x000011c0] */ 0x0c6e7c40, 0x100206e7, // add ra_dma0, ra_dma0, r1 -+/* [0x000011c8] */ 0x8c71ccbf, 0x10024731, // add ra_dest, ra_dest, r2 ; mov vw_setup, rb_vpm_init -+// ::mc_filter_y_bxx -+/* [0x000011d0] */ 0xfffffc60, 0xf0f807a7, // brr ra_link, r:per_block_setup_8 -+/* [0x000011d8] */ 0x959a0ff6, 0x10024023, // mov ra0, unif ; mov r3, elem_num -+/* [0x000011e0] */ 0xec9c3fd2, 0x100269e5, // add.setf -, rb_ef, rb_ef ; v8subs r5rep, r2, r2 -+/* [0x000011e8] */ 0x8c001cff, 0x14024800, // add r0, ra0.16b, r3 ; mov rb_xshift2, rb_xshift2_next -+/* [0x000011f0] */ 0x1158ddc0, 0xd4020867, // shl r1, ra_wt_off_l0, i_wt_den_p6 -+/* [0x000011f8] */ 0x4c5a7cd6, 0x121245a0, // add ra_wt_mul_l0, ra_wt_mul_l0, r3 ; mul24 r0, r2, ra_wt_mul_l0 -+/* [0x00001200] */ 0x4d4a7216, 0x12024860, // sub r1, r1, r0 ; mul24 r0, r2, ra_wt_mul_l1 -+/* [0x00001208] */ 0x8d9c423f, 0x1042531d, // sub rb_wt_off, r1, r0 ; mov ra_ef.8a, rb4 -+// :1 -+/* [0x00001210] */ 0x4c745dbe, 0x100279c4, // add.setf -, ra_ef, ra_ef ; mul24 ra4, rb5, ra_ef -+/* [0x00001218] */ 0x93440dff, 0xd40248a1, // max r2, ra_y, 0 ; mov r1, 0 -+/* [0x00001220] */ 0x9251e5f6, 0x1a0248a3, // min r2, r2, rb_max_y ; mov r3, ra_k1 -+/* [0x00001228] */ 0x4c450cd7, 0xa4224462, // add ra_y, ra_y, r3 ; mul24 r2, r2, rb_pitch ; ldtmu0 -+/* [0x00001230] */ 0x8c606cbf, 0x10024e05, // add t0s, ra_base, r2 ; mov rb5, rb6 -+/* [0x00001238] */ 0x8e5479bf, 0x12024806, // shr r0, r4, ra_xshift ; mov rb6, rb7 -+/* [0x00001240] */ 0x93458c47, 0xb20248a0, // max r2, ra_y2, r1 ; v8min r0, r0, rb_pmask ; ldtmu1 -+/* [0x00001248] */ 0x8e2009f6, 0x10024847, // shr r1, r4, rb_xshift2 ; mov rb7, ra8 -+/* [0x00001250] */ 0x925de5ce, 0x120248a1, // min r2, r2, rb_max_y ; v8min r1, r1, ra_pmax -+/* [0x00001258] */ 0x4c450cd7, 0x12124462, // add ra_y2, ra_y2, r3 ; mul24 r2, r2, rb_pitch -+/* [0x00001260] */ 0x8c24feb6, 0x10025f08, // add t1s, rb_base2, r2 ; mov ra8, ra9 -+/* [0x00001268] */ 0x4c038af1, 0xd8025962, // add r5rep, r5, r3 ; mul24 r2, ra0.8a << 8, r1 << 8 @ "mul_used", 0 -+/* [0x00001270] */ 0x5501fff0, 0x180348e2, // mov r3, rb_fir_off_h ; mul24.ifnn r2, ra0.8a, r0 -+/* [0x00001278] */ 0x4d03f6b0, 0xda0248a3, // sub r2, r3, r2 ; mul24 r3, ra0.8b << 1, r0 << 1 @ "mul_used", 0 -+/* [0x00001280] */ 0x40037031, 0xda0109e3, // nop ; mul24.ifn r3, ra0.8b << 9, r1 << 9 @ "mul_used", 0 -+/* [0x00001288] */ 0x4c03e4f0, 0xdc0248a3, // add r2, r2, r3 ; mul24 r3, ra0.8c << 2, r0 << 2 @ "mul_used", 0 -+/* [0x00001290] */ 0x40036031, 0xdc0109e3, // nop ; mul24.ifn r3, ra0.8c << 10, r1 << 10 @ "mul_used", 0 -+/* [0x00001298] */ 0x4d03d4f0, 0xde0248a3, // sub r2, r2, r3 ; mul24 r3, ra0.8d << 3, r0 << 3 @ "mul_used", 0 -+/* [0x000012a0] */ 0x40035031, 0xde0109e3, // nop ; mul24.ifn r3, ra0.8d << 11, r1 << 11 @ "mul_used", 0 -+/* [0x000012a8] */ 0x4c07c4f0, 0xd80248a3, // add r2, r2, r3 ; mul24 r3, ra1.8a << 4, r0 << 4 @ "mul_used", 0 -+/* [0x000012b0] */ 0x40074031, 0xd80109e3, // nop ; mul24.ifn r3, ra1.8a << 12, r1 << 12 @ "mul_used", 0 -+/* [0x000012b8] */ 0x4c07b4f0, 0xda0248a3, // add r2, r2, r3 ; mul24 r3, ra1.8b << 5, r0 << 5 @ "mul_used", 0 -+/* [0x000012c0] */ 0x40073031, 0xda0109e3, // nop ; mul24.ifn r3, ra1.8b << 13, r1 << 13 @ "mul_used", 0 -+/* [0x000012c8] */ 0x4d07a4f0, 0xdc0248a3, // sub r2, r2, r3 ; mul24 r3, ra1.8c << 6, r0 << 6 @ "mul_used", 0 -+/* [0x000012d0] */ 0x40072031, 0xdc0109e3, // nop ; mul24.ifn r3, ra1.8c << 14, r1 << 14 @ "mul_used", 0 -+/* [0x000012d8] */ 0x4c0794f0, 0xde0248a3, // add r2, r2, r3 ; mul24 r3, ra1.8d << 7, r0 << 7 @ "mul_used", 0 -+/* [0x000012e0] */ 0x4c071b71, 0xde0329e3, // add.setf -, r5, r5 ; mul24.ifn r3, ra1.8d << 15, r1 << 15 @ "mul_used", 0 -+/* [0x000012e8] */ 0xffffff08, 0xf06809e7, // brr.anyn -, r:1b -+/* [0x000012f0] */ 0x4d0854fe, 0x1a0248a1, // sub r2, r2, r3 ; mul24 r1, rb5, ra2.8b -+/* [0x000012f8] */ 0x550caffe, 0x1a024260, // mov ra9, rb10 ; mul24 r0, rb10, ra3.8b -+/* [0x00001300] */ 0x8f2c05f6, 0xd00242ca, // asr ra11, r2, v_bit_depth - 8 ; mov rb10, ra11 -+/* [0x00001308] */ 0x4d08623e, 0x1c024860, // sub r1, r1, r0 ; mul24 r0, rb6, ra2.8c -+/* [0x00001310] */ 0x4d08723e, 0x1e024860, // sub r1, r1, r0 ; mul24 r0, rb7, ra2.8d -+/* [0x00001318] */ 0x4c208237, 0x10024860, // add r1, r1, r0 ; mul24 r0, ra8, rb8 -+/* [0x00001320] */ 0x4c0ca23e, 0x1c024860, // add r1, r1, r0 ; mul24 r0, rb10, ra3.8c -+/* [0x00001328] */ 0x4c2cb237, 0x10024860, // add r1, r1, r0 ; mul24 r0, ra11, rb11 -+/* [0x00001330] */ 0x0d127380, 0x10020867, // sub r1, r1, ra4 -+/* [0x00001338] */ 0x8d9cc23f, 0x10024862, // sub r1, r1, r0 ; mov r2, rb_wt_off -+/* [0x00001340] */ 0x0f9c63c0, 0xd0020867, // asr r1, r1, 6 -+/* [0x00001348] */ 0x4d591bce, 0x120269e0, // sub.setf -, r5, rb_i_tmu ; mul24 r0, r1, ra_wt_mul_l0 -+/* [0x00001350] */ 0x55653fce, 0x140453e1, // mov.ifz rb_base2, rb_base2_next ; mul24 r1, r1, ra_kmul_add -+/* [0x00001358] */ 0x8d4e7076, 0x10029851, // sub r1, r0, r1 ; mov.ifz ra_y_y2, ra_y_y2_next -+/* [0x00001360] */ 0x8d692bf6, 0x1002b9d8, // sub.setf -, r5, rb_lcount ; mov.ifz ra_base, ra_base_next -+/* [0x00001368] */ 0x8c9f8289, 0xd0024860, // add r1, r1, r2 ; mov r0, r1 << 8 -+/* [0x00001370] */ 0x8c5e7236, 0x1c024863, // add r1, r1, r0 ; mov r3, ra_blk_height -+/* [0x00001378] */ 0xfffffe78, 0xf06809e7, // brr.anyn -, r:1b -+/* [0x00001380] */ 0x4f65039f, 0x18024862, // asr r1, r1, ra_wt_den_p7 ; mul24 r2, r3, rb_pitch -+/* [0x00001388] */ 0x925f23bf, 0x12020867, // min r1, r1, ra_pmax ; mov -, vw_wait -+/* [0x00001390] */ 0xf34003f3, 0xd2024c20, // max vpm, r1, 0 ; v8subs r0, ra_height, r3 -+/* [0x00001398] */ 0x956e7036, 0x10126431, // mov.setf ra_height, r0 ; mov vw_setup, ra_dma0 -+/* [0x000013a0] */ 0x00000000, 0xf027c9e7, // bra.anyz -, ra_link -+/* [0x000013a8] */ 0x929dd0ff, 0x10024831, // min r0, r0, r3 ; mov vw_setup, rb_dma1 -+/* [0x000013b0] */ 0x8d7270f6, 0x10024872, // sub r1, r0, r3 ; mov vw_addr, ra_dest -+/* [0x000013b8] */ 0x119d73c0, 0xd0020867, // shl r1, r1, i_shift23 -+/* [0x000013c0] */ 0xfffffe30, 0xf0f809e7, // brr -, r:1b -+/* [0x000013c8] */ 0x0c9d2e00, 0x100214a7, // add rb_lcount, rb_lcount, r0 -+/* [0x000013d0] */ 0x0c6e7c40, 0x100206e7, // add ra_dma0, ra_dma0, r1 -+/* [0x000013d8] */ 0x8c71ccbf, 0x10024731, // add ra_dest, ra_dest, r2 ; mov vw_setup, rb_vpm_init -+// ::mc_filter_y_p00 -+/* [0x000013e0] */ 0x959a0ff6, 0x10024020, // mov ra0, unif ; mov r0, elem_num -+/* [0x000013e8] */ 0xf5567dad, 0x14124565, // mov ra_xshift, ra_xshift_next ; v8subs r5rep, r5, r5 -+/* [0x000013f0] */ 0x8c020c3f, 0x1402581a, // add r0, ra0.16b, r0 ; mov ra_base_next, unif -+/* [0x000013f8] */ 0x93027176, 0x12225813, // max r0, r0, r5 ; mov ra_y_next, ra0.16a -+/* [0x00001400] */ 0x9281a1f6, 0x10025810, // min r0, r0, rb_max_x ; mov ra_width_height, unif -+/* [0x00001408] */ 0x119c31c0, 0xd0220567, // shl ra_xshift_next, r0, 3 -+/* [0x00001410] */ 0x149dc1c0, 0xd0020827, // and r0, r0, -4 -+/* [0x00001418] */ 0x8d810bf6, 0x10025896, // sub r2, r5, rb_pitch ; mov ra_wt_off_mul_l0, unif -+/* [0x00001420] */ 0x149e7080, 0x10020867, // and r1, r0, r2 -+/* [0x00001428] */ 0x569d404f, 0x10024821, // xor r0, r0, r1 ; mul24 r1, r1, rb_xpitch -+/* [0x00001430] */ 0x8c827076, 0x1002581c, // add r0, r0, r1 ; mov ra_dest, unif -+/* [0x00001438] */ 0x8c69cc3f, 0x100246b1, // add ra_base_next, ra_base_next, r0 ; mov vw_setup, rb_vpm_init -+/* [0x00001440] */ 0x11400dc0, 0xd4020867, // shl r1, ra_width, v_x_shift -+/* [0x00001448] */ 0x8d419e76, 0x12025760, // sub rb_dma1, rb_dma1_base, r1 ; mov r0, ra_height -+/* [0x00001450] */ 0x8d5c31c6, 0xdc025460, // sub rb_i_tmu, r0, PREREAD ; v8min r0, r0, ra_blk_height -+/* [0x00001458] */ 0x919c71c0, 0xd0024812, // shl r0, r0, v_dma_h_shift ; mov rb_lcount, r0 -+/* [0x00001460] */ 0x0c9e7040, 0x10020827, // add r0, r0, r1 -+/* [0x00001468] */ 0x1158edc0, 0xd4021327, // shl rb_wt_off, ra_wt_off_l0, DENOM + 7 -+/* [0x00001470] */ 0x918101f6, 0xd002581e, // shl r0, r0, v_dma_wh_shift ; mov ra_link, unif -+/* [0x00001478] */ 0x0c9db1c0, 0x100206e7, // add ra_dma0, r0, rb_dma0_base -+// :1 -+/* [0x00001480] */ 0xcd511bee, 0x1a0269e5, // sub.setf -, r5, rb_i_tmu ; v8adds r5rep, r5, ra_k1 -+/* [0x00001488] */ 0x804e7036, 0xa42099d1, // nop ; mov.ifz ra_y, ra_y_next ; ldtmu0 -+/* [0x00001490] */ 0x8e5509bf, 0x12024823, // shr r0, r4, ra_xshift ; mov r3, rb_pitch -+/* [0x00001498] */ 0x13440dc0, 0xd40208a7, // max r2, ra_y, 0 -+/* [0x000014a0] */ 0x9269e5f6, 0x10029898, // min r2, r2, rb_max_y ; mov.ifz ra_base, ra_base_next -+/* [0x000014a8] */ 0x4c441dd3, 0xd4224462, // add ra_y, ra_y, 1 ; mul24 r2, r2, r3 -+/* [0x000014b0] */ 0x8c618c87, 0x10024e20, // add t0s, ra_base, r2 ; v8min r0, r0, rb_pmask -+/* [0x000014b8] */ 0x4d592bc6, 0x120269e1, // sub.setf -, r5, rb_lcount ; mul24 r1, r0, ra_wt_mul_l0 -+/* [0x000014c0] */ 0x915c83f6, 0xdc024863, // shl r1, r1, 8 ; mov r3, ra_blk_height -+/* [0x000014c8] */ 0xec40c3f3, 0x12024860, // add r1, r1, rb_wt_off ; v8subs r0, ra_height, r3 -+/* [0x000014d0] */ 0xffffff90, 0xf06809e7, // brr.anyn -, r:1b -+/* [0x000014d8] */ 0x0f9cf3c0, 0xd0020867, // asr r1, r1, DENOM + 8 -+/* [0x000014e0] */ 0x925f23bf, 0x12020867, // min r1, r1, ra_pmax ; mov -, vw_wait -+/* [0x000014e8] */ 0x5351039f, 0x18024c22, // max vpm, r1, ra_k0 ; mul24 r2, r3, rb_pitch -+/* [0x000014f0] */ 0x956e7036, 0x10126431, // mov.setf ra_height, r0 ; mov vw_setup, ra_dma0 -+/* [0x000014f8] */ 0x00000000, 0xf027c9e7, // bra.anyz -, ra_link -+/* [0x00001500] */ 0x929dd0ff, 0x10024831, // min r0, r0, r3 ; mov vw_setup, rb_dma1 -+/* [0x00001508] */ 0x8d7270f6, 0x10024872, // sub r1, r0, r3 ; mov vw_addr, ra_dest -+/* [0x00001510] */ 0x119d73c0, 0xd0020867, // shl r1, r1, i_shift23 -+/* [0x00001518] */ 0xffffff48, 0xf0f809e7, // brr -, r:1b -+/* [0x00001520] */ 0x0c9d2e00, 0x100214a7, // add rb_lcount, rb_lcount, r0 -+/* [0x00001528] */ 0x0c6e7c40, 0x100206e7, // add ra_dma0, ra_dma0, r1 -+/* [0x00001530] */ 0x8c71ccbf, 0x10024731, // add ra_dest, ra_dest, r2 ; mov vw_setup, rb_vpm_init -+// ::mc_filter_y_b00 -+/* [0x00001538] */ 0xfffff8f8, 0xf0f807a7, // brr ra_link, r:per_block_setup_8 -+/* [0x00001540] */ 0x959a0ff6, 0x10024023, // mov ra0, unif ; mov r3, elem_num -+/* [0x00001548] */ 0xec9c3fd2, 0x100269e5, // add.setf -, rb_ef, rb_ef ; v8subs r5rep, r2, r2 -+/* [0x00001550] */ 0x8c001cff, 0x14024800, // add r0, ra0.16b, r3 ; mov rb_xshift2, rb_xshift2_next -+/* [0x00001558] */ 0x00000001, 0xe00208a7, // mov r2, 1 -+/* [0x00001560] */ 0x8c591eb6, 0x10025461, // add rb_i_tmu, rb_i_tmu, r2 ; mov r1, ra_wt_off_mul_l0 -+/* [0x00001568] */ 0xf158fded, 0xd4025325, // shl rb_wt_off, ra_wt_off_l0, DENOM + 8 ; v8subs r5quad, r5, r5 -+/* [0x00001570] */ 0x809f8009, 0xd000d9d6, // nop ; mov.ifnz ra_wt_off_mul_l0, r1 << 8 -+// :1 -+/* [0x00001578] */ 0x0d9d1bc0, 0xb00229e7, // sub.setf -, r5, rb_i_tmu ; nop ; ldtmu1 -+/* [0x00001580] */ 0x8e4c09f6, 0xa0029851, // shr r1, r4, rb_xshift2 ; mov.ifz ra_y_y2, ra_y_y2_next ; ldtmu0 -+/* [0x00001588] */ 0x8e5509bf, 0x12024823, // shr r0, r4, ra_xshift ; mov r3, rb_pitch -+/* [0x00001590] */ 0x13440dc0, 0xd40208a7, // max r2, ra_y, 0 -+/* [0x00001598] */ 0x9269e5f6, 0x10029898, // min r2, r2, rb_max_y ; mov.ifz ra_base, ra_base_next -+/* [0x000015a0] */ 0x4c441dd3, 0xd4224462, // add ra_y, ra_y, 1 ; mul24 r2, r2, r3 -+/* [0x000015a8] */ 0x8c613cbf, 0x10028e0f, // add t0s, ra_base, r2 ; mov.ifz rb_base2, rb_base2_next -+/* [0x000015b0] */ 0x13440dc0, 0xd20208a7, // max r2, ra_y2, 0 -+/* [0x000015b8] */ 0x129de5c0, 0x100208a7, // min r2, r2, rb_max_y -+/* [0x000015c0] */ 0x4c441dd3, 0xd2124462, // add ra_y2, ra_y2, 1 ; mul24 r2, r2, r3 -+/* [0x000015c8] */ 0x8c5cfe86, 0x12024f20, // add t1s, rb_base2, r2 ; v8min r0, r0, ra_pmax -+/* [0x000015d0] */ 0x545983c6, 0x12024860, // and r1, r1, rb_pmask ; mul24 r0, r0, ra_wt_mul_l0 -+/* [0x000015d8] */ 0x4d492bce, 0x120269e1, // sub.setf -, r5, rb_lcount ; mul24 r1, r1, ra_wt_mul_l1 -+/* [0x000015e0] */ 0xcc52706e, 0x1a024865, // add r1, r0, r1 ; v8adds r5rep, r5, ra_k1 -+/* [0x000015e8] */ 0x915c83f6, 0xdc024863, // shl r1, r1, 8 ; mov r3, ra_blk_height -+/* [0x000015f0] */ 0xec40c3f3, 0x12024860, // add r1, r1, rb_wt_off ; v8subs r0, ra_height, r3 -+/* [0x000015f8] */ 0xffffff60, 0xf06809e7, // brr.anyn -, r:1b -+/* [0x00001600] */ 0x0f9d03c0, 0xd0020867, // asr r1, r1, (DENOM + 9) - 32 -+/* [0x00001608] */ 0x925f23bf, 0x12020867, // min r1, r1, ra_pmax ; mov -, vw_wait -+/* [0x00001610] */ 0x5351039f, 0x18024c22, // max vpm, r1, ra_k0 ; mul24 r2, r3, rb_pitch -+/* [0x00001618] */ 0x956e7036, 0x10126431, // mov.setf ra_height, r0 ; mov vw_setup, ra_dma0 -+/* [0x00001620] */ 0x00000000, 0xf027c9e7, // bra.anyz -, ra_link -+/* [0x00001628] */ 0x929dd0ff, 0x10024831, // min r0, r0, r3 ; mov vw_setup, rb_dma1 -+/* [0x00001630] */ 0x8d7270f6, 0x10024872, // sub r1, r0, r3 ; mov vw_addr, ra_dest -+/* [0x00001638] */ 0x119d73c0, 0xd0020867, // shl r1, r1, i_shift23 -+/* [0x00001640] */ 0xffffff18, 0xf0f809e7, // brr -, r:1b -+/* [0x00001648] */ 0x0c9d2e00, 0x100214a7, // add rb_lcount, rb_lcount, r0 -+/* [0x00001650] */ 0x0c6e7c40, 0x100206e7, // add ra_dma0, ra_dma0, r1 -+/* [0x00001658] */ 0x8c71ccbf, 0x10024731, // add ra_dest, ra_dest, r2 ; mov vw_setup, rb_vpm_init -+// ::mc_setup_c10_q0 -+/* [0x00001660] */ 0x0000000c, 0xe80009e7, // mov dst, srel(i) -+// ::mc_setup_c10_qn -+/* [0x00001668] */ 0x95801ff6, 0xd0025900, // mov tmurs, 1 ; mov ra0, unif -+/* [0x00001670] */ 0xaaaaff00, 0xe6020827, // mov r0, [0,2,0,2,0,2,0,2,1,3,1,3,1,3,1,3] -+/* [0x00001678] */ 0x9181e1f6, 0xd00250d8, // shl rb_ef, r0, i_shift30 ; mov ra_base, unif -+/* [0x00001680] */ 0x0d801dc0, 0xd0020827, // sub r0, unif, 1 -+/* [0x00001688] */ 0x119c21c0, 0xd00216a7, // shl rb_max_x, r0, v_x_shift -+/* [0x00001690] */ 0x0d801dc0, 0xd00217a7, // sub rb_max_y, unif, 1 -+/* [0x00001698] */ 0xff800100, 0xe0020527, // mov ra_kff800100, 0xff800100 -+/* [0x000016a0] */ 0x0000ffff, 0xe0021627, // mov rb_pmask, v_pmask -+/* [0x000016a8] */ 0x000803ff, 0xe00205e7, // mov ra_blk_height_pmax, ((1 << v_bit_depth) - 1) | (v_blk_height << 16) -+/* [0x000016b0] */ 0x00010000, 0xe00217e7, // mov rb_fir_off_h, (FIR_OFFSET << (v_bit_depth - 8)) -+/* [0x000016b8] */ 0x4000000c, 0xe0020667, // mov ra_fir_off_val_wt_den_p7, (FIR_OFFSET << 16) | (DENOM + 15 - v_bit_depth) -+/* [0x000016c0] */ 0x95803ff6, 0x10024754, // mov ra_ef, rb_ef ; mov rb_xpitch, unif -+/* [0x000016c8] */ 0x15827d80, 0x10021427, // mov rb_pitch, unif -+/* [0x000016d0] */ 0xc0000000, 0xe0020867, // mov r1, vdw_setup_1(0) -+/* [0x000016d8] */ 0x0c9d03c0, 0x10021667, // add rb_dma1_base, r1, rb_pitch -+/* [0x000016e0] */ 0x14981f80, 0xd0020827, // and r0, 1, elem_num -+/* [0x000016e8] */ 0x409c5007, 0xd00049e0, // nop ; mul24 r0, r0, 5 -+/* [0x000016f0] */ 0x0c9a7180, 0x10020827, // add r0, r0, elem_num -+/* [0x000016f8] */ 0x0c9e7000, 0x100210a7, // add rb_elem_x, r0, r0 -+/* [0x00001700] */ 0x11002dc0, 0xd4020827, // shl r0, ra0.16b, v_x_shift -+/* [0x00001708] */ 0x0c9c21c0, 0x10020827, // add r0, r0, rb_elem_x -+/* [0x00001710] */ 0x930001f6, 0xd2225811, // max r0, r0, 0 ; mov ra_y, ra0.16a -+/* [0x00001718] */ 0x129da1c0, 0x10020827, // min r0, r0, rb_max_x -+/* [0x00001720] */ 0x00000000, 0xe0224541, // mov ra_xshift_next, 0 ; mov rb_xshift2_next, 0 -+/* [0x00001728] */ 0x0d510dc0, 0x18020867, // sub r1, ra_k0, rb_pitch -+/* [0x00001730] */ 0x149e7040, 0x10020867, // and r1, r0, r1 -+/* [0x00001738] */ 0x569d404f, 0x10024821, // xor r0, r0, r1 ; mul24 r1, r1, rb_xpitch -+/* [0x00001740] */ 0x8c827076, 0x10025800, // add r0, r0, r1 ; mov ra0, unif -+/* [0x00001748] */ 0x0c627c00, 0x10020627, // add ra_base, ra_base, r0 -+/* [0x00001750] */ 0x159e6fc0, 0x100208a7, // mov r2, qpu_num -+/* [0x00001758] */ 0x0f9c15c0, 0xd0020867, // asr r1, r2, 1 -+/* [0x00001760] */ 0x119c43c0, 0xd0020867, // shl r1, r1, 4 -+/* [0x00001768] */ 0x149c15c0, 0xd0020827, // and r0, r2, 1 -+/* [0x00001770] */ 0x159e7040, 0x10020827, // or r0, r0, r1 -+/* [0x00001778] */ 0x00002900, 0xe0020867, // mov r1, vpm_setup(0, 2, h16p(0, 0)) -+/* [0x00001780] */ 0x0c9e7040, 0x10021727, // add r_vpm, r0, r1 -+/* [0x00001788] */ 0x80004002, 0xe0020867, // mov r1, vdw_setup_0(0, 0, dma_h16p(0,0,0)) -+/* [0x00001790] */ 0x119c61c0, 0xd0020827, // shl r0, r0, 6 -+/* [0x00001798] */ 0x0c9e7040, 0x100216e7, // add r_dma, r0, r1 -+/* [0x000017a0] */ 0x11002dc0, 0xd4020827, // shl r0, ra0.16b, v_x_shift -+/* [0x000017a8] */ 0x8c0021f6, 0x12125811, // add r0, r0, rb_elem_x ; mov ra_y2, ra0.16a -+/* [0x000017b0] */ 0x938001f6, 0xd002480f, // max r0, r0, 0 ; mov rb_base2, unif -+/* [0x000017b8] */ 0x129da1c0, 0x10020827, // min r0, r0, rb_max_x -+/* [0x000017c0] */ 0x0d510dc0, 0x18020867, // sub r1, ra_k0, rb_pitch -+/* [0x000017c8] */ 0x949c307f, 0xd0024863, // and r1, r0, r1 ; mov r3, PREREAD -+/* [0x000017d0] */ 0x569d404f, 0x10024821, // xor r0, r0, r1 ; mul24 r1, r1, rb_xpitch -+/* [0x000017d8] */ 0x8c467076, 0x12024822, // add r0, r0, r1 ; mov r2, ra_y2 -+/* [0x000017e0] */ 0x8c44fe36, 0x140253e0, // add rb_base2, rb_base2, r0 ; mov r0, ra_y -+// :1 -+/* [0x000017e8] */ 0x0d9c17c0, 0xd00228e7, // sub.setf r3, r3, 1 -+/* [0x000017f0] */ 0x139c01c0, 0xd0020867, // max r1, r0, 0 -+/* [0x000017f8] */ 0x129de3c0, 0x10020867, // min r1, r1, rb_max_y -+/* [0x00001800] */ 0x4c51018f, 0x1a024821, // add r0, r0, ra_k1 ; mul24 r1, r1, rb_pitch -+/* [0x00001808] */ 0x8c627c40, 0x10225e11, // add t0s, ra_base, r1 ; mov ra_y, r0 -+/* [0x00001810] */ 0x139c05c0, 0xd0020867, // max r1, r2, 0 -+/* [0x00001818] */ 0xffffffb0, 0xf03809e7, // brr.anynz -, r:1b -+/* [0x00001820] */ 0x129de3c0, 0x10020867, // min r1, r1, rb_max_y -+/* [0x00001828] */ 0x4c51058f, 0x1a0248a1, // add r2, r2, ra_k1 ; mul24 r1, r1, rb_pitch -+/* [0x00001830] */ 0x8c9cfe52, 0x10125f11, // add t1s, rb_base2, r1 ; mov ra_y2, r2 -+/* [0x00001838] */ 0x15827d80, 0x100207a7, // mov ra_link, unif -+/* [0x00001840] */ 0x00000000, 0xe0024104, // mov ra4, 0 ; mov rb4, 0 -+/* [0x00001848] */ 0x00000000, 0xf0f7c9e7, // bra -, ra_link -+/* [0x00001850] */ 0x00000000, 0xe0024145, // mov ra5, 0 ; mov rb5, 0 -+/* [0x00001858] */ 0x00000000, 0xe0024186, // mov ra6, 0 ; mov rb6, 0 -+/* [0x00001860] */ 0x00000000, 0xe00241c7, // mov ra7, 0 ; mov rb7, 0 -+// ::mc_filter_c10_p -+/* [0x00001868] */ 0x9581cff6, 0x10025c42, // mov vw_setup, rb_vpm_init ; mov ra2, unif -+/* [0x00001870] */ 0x8c803ff6, 0x100269e3, // add.setf -, rb_ef, rb_ef ; mov r3, unif -+/* [0x00001878] */ 0xf1082dc0, 0xd4024825, // shl r0, ra2.16b, v_x_shift ; v8subs r5rep, r0, r0 -+/* [0x00001880] */ 0x8c8021f6, 0x10025810, // add r0, r0, rb_elem_x ; mov ra_width_height, unif -+/* [0x00001888] */ 0x8d810bf6, 0x10025840, // sub r1, r5, rb_pitch ; mov ra0, unif -+/* [0x00001890] */ 0x93567176, 0x14024800, // max r0, r0, r5 ; mov vrx_xshift, vrx_xshift_next -+/* [0x00001898] */ 0x9209a1f6, 0x12225813, // min r0, r0, rb_max_x ; mov vra_y_next, ra2.16a -+/* [0x000018a0] */ 0x54404077, 0xd4024862, // and r1, r0, r1 ; mul24 r2, ra_width, v_x_mul -+/* [0x000018a8] */ 0x569d404f, 0x10024821, // xor r0, r0, r1 ; mul24 r1, r1, rb_xpitch -+/* [0x000018b0] */ 0x8c827076, 0x10025803, // add r0, r0, r1 ; mov ra3, unif -+/* [0x000018b8] */ 0x8c427636, 0x120246a1, // add vrx_base_next, r3, r0 ; mov r1, ra_height -+/* [0x000018c0] */ 0x8d819eb6, 0x10025756, // sub rb_dma1, rb_dma1_base, r2 ; mov ra_wt_off_mul_l0, unif -+/* [0x000018c8] */ 0x8c5dc3ce, 0xdc025461, // add rb_i_tmu, r1, (3-4) - PREREAD ; v8min r1, r1, ra_blk_height -+/* [0x000018d0] */ 0x8c81f3f6, 0xd0039496, // add rb_lcount, r1, (3-4) ; mov.ifc ra_wt_off_mul_l0, unif -+/* [0x000018d8] */ 0x918083f6, 0xd002581c, // shl r0, r1, v_dma_h_shift ; mov ra_dest, unif -+/* [0x000018e0] */ 0x8c6670b6, 0x14024822, // add r0, r0, r2 ; mov r2, ra_fir_off_val -+/* [0x000018e8] */ 0x910cf1f6, 0xdc02480a, // shl r0, r0, v_dma_wh_shift ; mov rb10, ra3.8c -+/* [0x000018f0] */ 0x8c59b1f6, 0x140246e1, // add ra_dma0, r0, rb_dma0_base ; mov r1, ra_wt_off_l0 -+/* [0x000018f8] */ 0x5158a3d6, 0xd2024860, // shl r1, r1, i_wt_den_p5 ; mul24 r0, r2, ra_wt_mul_l0 -+/* [0x00001900] */ 0x8d667236, 0x14025320, // sub rb_wt_off, r1, r0 ; mov r0, ra_kmul_add -+/* [0x00001908] */ 0x8c59cc3f, 0xd21245a5, // add ra_wt_mul_l0, ra_wt_mul_l0, r0 ; mov r5rep, -4 -+/* [0x00001910] */ 0x950e0dbf, 0x1e0252de, // mov rb11, ra3.8d ; mov ra_link, unif -+// :1 -+/* [0x00001918] */ 0x8d151bf6, 0xa00269c4, // sub.setf -, r5, rb_i_tmu ; mov rb4, ra5 ; ldtmu0 -+/* [0x00001920] */ 0x8e4c09f6, 0x140288a3, // shr r2, r4, vrx_xshift ; mov.ifz r3, vra_y_next -+/* [0x00001928] */ 0x8e4505f6, 0xd402c863, // shr r1, r2, v_v_shift ; mov.ifnz r3, vra_y -+/* [0x00001930] */ 0x8c683ff6, 0x1002b9d8, // add.setf -, rb_ef, rb_ef ; mov.ifz vra_base, vrx_base_next -+/* [0x00001938] */ 0x8c531789, 0xda224460, // add vra_y, r3, ra_k1 ; mov r0, r1 << 15 -+/* [0x00001940] */ 0x9353f792, 0xd803c8e1, // max r3, r3, ra_k0 ; mov.ifnc r1, r2 << 1 -+/* [0x00001948] */ 0x929de7d2, 0x1003c8e0, // min r3, r3, rb_max_y ; mov.ifnc r0, r2 -+/* [0x00001950] */ 0x545d039f, 0x12024863, // and r1, r1, ra_pmax ; mul24 r3, r3, rb_pitch -+/* [0x00001958] */ 0x8c618cc7, 0x10024e20, // add vr_txs, vra_base, r3 ; v8min r0, r0, rb_pmask -+/* [0x00001960] */ 0x4c001bf0, 0xd8025963, // add r5rep, r5, 1 ; mul24 r3, ra0.8a, r0 -+/* [0x00001968] */ 0x4d01fef1, 0x1e0248a3, // sub r2, rb_fir_off_h, r3 ; mul24 r3, ra0.8d, r1 -+/* [0x00001970] */ 0x4d03e4f0, 0xda0248a3, // sub r2, r2, r3 ; mul24 r3, ra0.8b << 2, r0 << 2 @ "mul_used", 0 -+/* [0x00001978] */ 0x40034031, 0xda0109e3, // nop ; mul24.ifn r3, ra0.8b << 12, r1 << 12 @ "mul_used", 0 -+/* [0x00001980] */ 0x4c03c4f0, 0xdc0248a3, // add r2, r2, r3 ; mul24 r3, ra0.8c << 4, r0 << 4 @ "mul_used", 0 -+/* [0x00001988] */ 0x4c032b71, 0xdc0329e3, // add.setf -, r5, r5 ; mul24.ifn r3, ra0.8c << 14, r1 << 14 @ "mul_used", 0 -+/* [0x00001990] */ 0xffffff68, 0xf06809e7, // brr.anyn -, r:1b -+/* [0x00001998] */ 0x4c1ca4f7, 0x100248a0, // add r2, r2, r3 ; mul24 r0, ra7, rb10 -+/* [0x000019a0] */ 0x550c6ffe, 0x1a024161, // mov ra5, rb6 ; mul24 r1, rb6, ra3.8b -+/* [0x000019a8] */ 0x8f1c25f6, 0xd00241c6, // asr ra7, r2, v_bit_depth - 8 ; mov rb6, ra7 -+/* [0x000019b0] */ 0x4c0c423e, 0x18024860, // add r1, r1, r0 ; mul24 r0, rb4, ra3.8a -+/* [0x000019b8] */ 0x4d1cb237, 0x10024860, // sub r1, r1, r0 ; mul24 r0, ra7, rb11 -+/* [0x000019c0] */ 0x0d9e7200, 0x10020867, // sub r1, r1, r0 -+/* [0x000019c8] */ 0x8f5c63f6, 0xdc024863, // asr r1, r1, 6 ; mov r3, ra_blk_height -+/* [0x000019d0] */ 0x4d592bce, 0x120269e0, // sub.setf -, r5, rb_lcount ; mul24 r0, r1, ra_wt_mul_l0 -+/* [0x000019d8] */ 0x4c64c1ce, 0x14024821, // add r0, r0, rb_wt_off ; mul24 r1, r1, ra_kmul_add -+/* [0x000019e0] */ 0xed427073, 0x12024860, // sub r1, r0, r1 ; v8subs r0, ra_height, r3 -+/* [0x000019e8] */ 0xffffff10, 0xf06809e7, // brr.anyn -, r:1b -+/* [0x000019f0] */ 0x0f9cb3c0, 0xd0020867, // asr r1, r1, i_wt_den_p6 -+/* [0x000019f8] */ 0x925f23bf, 0x12020867, // min r1, r1, ra_pmax ; mov -, vw_wait -+/* [0x00001a00] */ 0x5351039f, 0x18024c22, // max vpm, r1, ra_k0 ; mul24 r2, r3, rb_pitch -+/* [0x00001a08] */ 0x956e7036, 0x10126431, // mov.setf ra_height, r0 ; mov vw_setup, ra_dma0 -+/* [0x00001a10] */ 0x00000000, 0xf027c9e7, // bra.anyz -, ra_link -+/* [0x00001a18] */ 0x929dd0ff, 0x10024831, // min r0, r0, r3 ; mov vw_setup, rb_dma1 -+/* [0x00001a20] */ 0x8d7270f6, 0x10024872, // sub r1, r0, r3 ; mov vw_addr, ra_dest -+/* [0x00001a28] */ 0x119d73c0, 0xd0020867, // shl r1, r1, i_shift23 -+/* [0x00001a30] */ 0xfffffec8, 0xf0f809e7, // brr -, r:1b -+/* [0x00001a38] */ 0x0c9d2e00, 0x100214a7, // add rb_lcount, rb_lcount, r0 -+/* [0x00001a40] */ 0x0c6e7c40, 0x100206e7, // add ra_dma0, ra_dma0, r1 -+/* [0x00001a48] */ 0x8c71ccbf, 0x10024731, // add ra_dest, ra_dest, r2 ; mov vw_setup, rb_vpm_init -+// ::mc_filter_c10_p_l1 -+/* [0x00001a50] */ 0x9581cff6, 0x10025c42, // mov vw_setup, rb_vpm_init ; mov ra2, unif -+/* [0x00001a58] */ 0x8c803ff6, 0x100269e3, // add.setf -, rb_ef, rb_ef ; mov r3, unif -+/* [0x00001a60] */ 0xf1082dc0, 0xd4024825, // shl r0, ra2.16b, v_x_shift ; v8subs r5rep, r0, r0 -+/* [0x00001a68] */ 0x8c8021f6, 0x10025810, // add r0, r0, rb_elem_x ; mov ra_width_height, unif -+/* [0x00001a70] */ 0x8d810bf6, 0x10025840, // sub r1, r5, rb_pitch ; mov ra0, unif -+/* [0x00001a78] */ 0x939c117f, 0x10125815, // max r0, r0, r5 ; mov vrx_xshift, vrx_xshift_next -+/* [0x00001a80] */ 0x9209a1f6, 0x12125813, // min r0, r0, rb_max_x ; mov vra_y_next, ra2.16a -+/* [0x00001a88] */ 0x54404077, 0xd4024862, // and r1, r0, r1 ; mul24 r2, ra_width, v_x_mul -+/* [0x00001a90] */ 0x569d404f, 0x10024821, // xor r0, r0, r1 ; mul24 r1, r1, rb_xpitch -+/* [0x00001a98] */ 0x8c827076, 0x10025803, // add r0, r0, r1 ; mov ra3, unif -+/* [0x00001aa0] */ 0x8c427636, 0x120254e1, // add vrx_base_next, r3, r0 ; mov r1, ra_height -+/* [0x00001aa8] */ 0x8d819eb6, 0x10025756, // sub rb_dma1, rb_dma1_base, r2 ; mov ra_wt_off_mul_l0, unif -+/* [0x00001ab0] */ 0x8c5dc3ce, 0xdc025461, // add rb_i_tmu, r1, (3-4) - PREREAD ; v8min r1, r1, ra_blk_height -+/* [0x00001ab8] */ 0x8c81f3f6, 0xd0039496, // add rb_lcount, r1, (3-4) ; mov.ifc ra_wt_off_mul_l0, unif -+/* [0x00001ac0] */ 0x918083f6, 0xd002581c, // shl r0, r1, v_dma_h_shift ; mov ra_dest, unif -+/* [0x00001ac8] */ 0x8c6670b6, 0x14024822, // add r0, r0, r2 ; mov r2, ra_fir_off_val -+/* [0x00001ad0] */ 0x910cf1f6, 0xdc02480a, // shl r0, r0, v_dma_wh_shift ; mov rb10, ra3.8c -+/* [0x00001ad8] */ 0x8c59b1f6, 0x140246e1, // add ra_dma0, r0, rb_dma0_base ; mov r1, ra_wt_off_l0 -+/* [0x00001ae0] */ 0x5158a3d6, 0xd2024860, // shl r1, r1, i_wt_den_p5 ; mul24 r0, r2, ra_wt_mul_l0 -+/* [0x00001ae8] */ 0x8d667236, 0x14025320, // sub rb_wt_off, r1, r0 ; mov r0, ra_kmul_add -+/* [0x00001af0] */ 0x8c59cc3f, 0xd21245a5, // add ra_wt_mul_l0, ra_wt_mul_l0, r0 ; mov r5rep, -4 -+/* [0x00001af8] */ 0x950e0dbf, 0x1e0252de, // mov rb11, ra3.8d ; mov ra_link, unif -+// :1 -+/* [0x00001b00] */ 0x8d151bf6, 0xb00269c4, // sub.setf -, r5, rb_i_tmu ; mov rb4, ra5 ; ldtmu1 -+/* [0x00001b08] */ 0x8e5539bf, 0x1202888f, // shr r2, r4, vrx_xshift ; mov.ifz vra_base, vrx_base_next -+/* [0x00001b10] */ 0x8e4505f6, 0xd202c863, // shr r1, r2, v_v_shift ; mov.ifnz r3, vra_y -+/* [0x00001b18] */ 0x8c4c3ff6, 0x1202a9e3, // add.setf -, rb_ef, rb_ef ; mov.ifz r3, vra_y_next -+/* [0x00001b20] */ 0x8c531789, 0xda124460, // add vra_y, r3, ra_k1 ; mov r0, r1 << 15 -+/* [0x00001b28] */ 0x9353f792, 0xd803c8e1, // max r3, r3, ra_k0 ; mov.ifnc r1, r2 << 1 -+/* [0x00001b30] */ 0x929de7d2, 0x1003c8e0, // min r3, r3, rb_max_y ; mov.ifnc r0, r2 -+/* [0x00001b38] */ 0x545d039f, 0x12024863, // and r1, r1, ra_pmax ; mul24 r3, r3, rb_pitch -+/* [0x00001b40] */ 0x8c5cfec6, 0x12024f20, // add vr_txs, vra_base, r3 ; v8min r0, r0, ra_pmax -+/* [0x00001b48] */ 0x4c001bf0, 0xd8025963, // add r5rep, r5, 1 ; mul24 r3, ra0.8a, r0 -+/* [0x00001b50] */ 0x4d01fef1, 0x1e0248a3, // sub r2, rb_fir_off_h, r3 ; mul24 r3, ra0.8d, r1 -+/* [0x00001b58] */ 0x4d03e4f0, 0xda0248a3, // sub r2, r2, r3 ; mul24 r3, ra0.8b << 2, r0 << 2 @ "mul_used", 0 -+/* [0x00001b60] */ 0x40034031, 0xda0109e3, // nop ; mul24.ifn r3, ra0.8b << 12, r1 << 12 @ "mul_used", 0 -+/* [0x00001b68] */ 0x4c03c4f0, 0xdc0248a3, // add r2, r2, r3 ; mul24 r3, ra0.8c << 4, r0 << 4 @ "mul_used", 0 -+/* [0x00001b70] */ 0x4c032b71, 0xdc0329e3, // add.setf -, r5, r5 ; mul24.ifn r3, ra0.8c << 14, r1 << 14 @ "mul_used", 0 -+/* [0x00001b78] */ 0xffffff68, 0xf06809e7, // brr.anyn -, r:1b -+/* [0x00001b80] */ 0x4c1ca4f7, 0x100248a0, // add r2, r2, r3 ; mul24 r0, ra7, rb10 -+/* [0x00001b88] */ 0x550c6ffe, 0x1a024161, // mov ra5, rb6 ; mul24 r1, rb6, ra3.8b -+/* [0x00001b90] */ 0x8f1c25f6, 0xd00241c6, // asr ra7, r2, v_bit_depth - 8 ; mov rb6, ra7 -+/* [0x00001b98] */ 0x4c0c423e, 0x18024860, // add r1, r1, r0 ; mul24 r0, rb4, ra3.8a -+/* [0x00001ba0] */ 0x4d1cb237, 0x10024860, // sub r1, r1, r0 ; mul24 r0, ra7, rb11 -+/* [0x00001ba8] */ 0x0d9e7200, 0x10020867, // sub r1, r1, r0 -+/* [0x00001bb0] */ 0x8f5c63f6, 0xdc024863, // asr r1, r1, 6 ; mov r3, ra_blk_height -+/* [0x00001bb8] */ 0x4d592bce, 0x120269e0, // sub.setf -, r5, rb_lcount ; mul24 r0, r1, ra_wt_mul_l0 -+/* [0x00001bc0] */ 0x4c64c1ce, 0x14024821, // add r0, r0, rb_wt_off ; mul24 r1, r1, ra_kmul_add -+/* [0x00001bc8] */ 0xed427073, 0x12024860, // sub r1, r0, r1 ; v8subs r0, ra_height, r3 -+/* [0x00001bd0] */ 0xffffff10, 0xf06809e7, // brr.anyn -, r:1b -+/* [0x00001bd8] */ 0x0f9cb3c0, 0xd0020867, // asr r1, r1, i_wt_den_p6 -+/* [0x00001be0] */ 0x925f23bf, 0x12020867, // min r1, r1, ra_pmax ; mov -, vw_wait -+/* [0x00001be8] */ 0x5351039f, 0x18024c22, // max vpm, r1, ra_k0 ; mul24 r2, r3, rb_pitch -+/* [0x00001bf0] */ 0x956e7036, 0x10126431, // mov.setf ra_height, r0 ; mov vw_setup, ra_dma0 -+/* [0x00001bf8] */ 0x00000000, 0xf027c9e7, // bra.anyz -, ra_link -+/* [0x00001c00] */ 0x929dd0ff, 0x10024831, // min r0, r0, r3 ; mov vw_setup, rb_dma1 -+/* [0x00001c08] */ 0x8d7270f6, 0x10024872, // sub r1, r0, r3 ; mov vw_addr, ra_dest -+/* [0x00001c10] */ 0x119d73c0, 0xd0020867, // shl r1, r1, i_shift23 -+/* [0x00001c18] */ 0xfffffec8, 0xf0f809e7, // brr -, r:1b -+/* [0x00001c20] */ 0x0c9d2e00, 0x100214a7, // add rb_lcount, rb_lcount, r0 -+/* [0x00001c28] */ 0x0c6e7c40, 0x100206e7, // add ra_dma0, ra_dma0, r1 -+/* [0x00001c30] */ 0x8c71ccbf, 0x10024731, // add ra_dest, ra_dest, r2 ; mov vw_setup, rb_vpm_init -+// ::mc_filter_c10_b -+/* [0x00001c38] */ 0x9581cff6, 0x10025c42, // mov vw_setup, rb_vpm_init ; mov ra2, unif -+/* [0x00001c40] */ 0x8c803ff6, 0x100269e3, // add.setf -, rb_ef, rb_ef ; mov r3, unif -+/* [0x00001c48] */ 0xf1082dc9, 0xd4024825, // shl r0, ra2.16b, v_x_shift ; v8subs r5rep, r1, r1 -+/* [0x00001c50] */ 0x8c0821f6, 0x12225813, // add r0, r0, rb_elem_x ; mov ra_y_next, ra2.16a -+/* [0x00001c58] */ 0x8d810bf6, 0x10025850, // sub r1, r5, rb_pitch ; mov ra_width_height, unif -+/* [0x00001c60] */ 0x93567176, 0x14125815, // max r0, r0, r5 ; mov ra_xshift, ra_xshift_next -+/* [0x00001c68] */ 0x9281a1f6, 0x10025800, // min r0, r0, rb_max_x ; mov ra0, unif -+/* [0x00001c70] */ 0x9481c1f6, 0xd0025802, // and r0, r0, -4 ; mov ra2, unif -+/* [0x00001c78] */ 0x54404077, 0xd4024862, // and r1, r0, r1 ; mul24 r2, ra_width, v_x_mul -+/* [0x00001c80] */ 0x569d404f, 0x10024821, // xor r0, r0, r1 ; mul24 r1, r1, rb_xpitch -+/* [0x00001c88] */ 0x8c427076, 0x12024821, // add r0, r0, r1 ; mov r1, ra_height -+/* [0x00001c90] */ 0x8c9c163f, 0x10024680, // add ra_base_next, r3, r0 ; mov rb_xshift2, rb_xshift2_next -+/* [0x00001c98] */ 0x8d819eb6, 0x10025756, // sub rb_dma1, rb_dma1_base, r2 ; mov ra_wt_off_mul_l0, unif -+/* [0x00001ca0] */ 0x8c5dc3ce, 0xdc025461, // add rb_i_tmu, r1, (3-4) - PREREAD ; v8min r1, r1, ra_blk_height -+/* [0x00001ca8] */ 0x8c59f3f6, 0xd4139496, // add rb_lcount, r1, (3-4) ; mov.ifc ra_wt_mul_l0, ra_wt_off_l0 -+/* [0x00001cb0] */ 0x918083f6, 0xd0025803, // shl r0, r1, v_dma_h_shift ; mov ra3, unif -+/* [0x00001cb8] */ 0x8c8270b6, 0x10024823, // add r0, r0, r2 ; mov r3, unif -+/* [0x00001cc0] */ 0x910cf1f6, 0xd2125813, // shl r0, r0, v_dma_wh_shift ; mov ra_y2_next, ra3.16a -+/* [0x00001cc8] */ 0x8c0db1f6, 0x140246e0, // add ra_dma0, r0, rb_dma0_base ; mov r0, ra3.16b -+/* [0x00001cd0] */ 0x918021f6, 0xd0025801, // shl r0, r0, v_x_shift ; mov ra1, unif -+/* [0x00001cd8] */ 0x8c8021f6, 0x10025803, // add r0, r0, rb_elem_x ; mov ra3, unif -+/* [0x00001ce0] */ 0x8d810bf6, 0x10025852, // sub r1, r5, rb_pitch ; mov ra_wt_off_mul_l1, unif -+/* [0x00001ce8] */ 0x939de17f, 0x10025809, // max r0, r0, r5 ; mov ra9, rb_max_y -+/* [0x00001cf0] */ 0x9265a1f6, 0x14024822, // min r0, r0, rb_max_x ; mov r2, ra_kmul_add -+/* [0x00001cf8] */ 0x9481c1f6, 0xd0039812, // and r0, r0, -4 ; mov.ifc ra_wt_off_mul_l1, unif -+/* [0x00001d00] */ 0x949dc07f, 0xd0024865, // and r1, r0, r1 ; mov r5rep, -4 -+/* [0x00001d08] */ 0x569d404f, 0x10024821, // xor r0, r0, r1 ; mul24 r1, r1, rb_xpitch -+/* [0x00001d10] */ 0x8c827076, 0x1002581c, // add r0, r0, r1 ; mov ra_dest, unif -+/* [0x00001d18] */ 0x8c667636, 0x140254e0, // add rb_base2_next, r3, r0 ; mov r0, ra_fir_off_val -+/* [0x00001d20] */ 0x4c5a7c86, 0x121245a1, // add ra_wt_mul_l0, ra_wt_mul_l0, r2 ; mul24 r1, r0, ra_wt_mul_l0 -+/* [0x00001d28] */ 0x4c4a7c86, 0x121244a0, // add ra_wt_mul_l1, ra_wt_mul_l1, r2 ; mul24 r0, r0, ra_wt_mul_l1 -+/* [0x00001d30] */ 0x8c4a7076, 0x14024821, // add r0, r0, r1 ; mov r1, ra_wt_off_l1 -+/* [0x00001d38] */ 0x910cb3f6, 0xde02484b, // shl r1, r1, i_wt_den_p6 ; mov rb11, ra3.8d -+/* [0x00001d40] */ 0x8d827236, 0x1002531e, // sub rb_wt_off, r1, r0 ; mov ra_link, unif -+/* [0x00001d48] */ 0x95080ff6, 0x1e024287, // mov ra10, rb_xshift2 ; mov rb7, ra2.8d -+// :1 -+/* [0x00001d50] */ 0x0d9d1bc0, 0xa00229e7, // sub.setf -, r5, rb_i_tmu ; nop ; ldtmu0 -+/* [0x00001d58] */ 0x8e5539bf, 0x1202888f, // shr r2, r4, ra_xshift ; mov.ifz rb_base2, rb_base2_next -+/* [0x00001d60] */ 0x8e4d05f6, 0xd0029851, // shr r1, r2, v_v_shift ; mov.ifz ra_y_y2, ra_y_y2_next -+/* [0x00001d68] */ 0x8c683ff6, 0x1002b9d8, // add.setf -, rb_ef, rb_ef ; mov.ifz ra_base, ra_base_next -+/* [0x00001d70] */ 0x8c441fb6, 0xd4224463, // add ra_y, 1, ra_y ; mov r3, ra_y -+/* [0x00001d78] */ 0x93531789, 0xd80248e0, // max r3, r3, ra_k0 ; mov r0, r1 << 15 -+/* [0x00001d80] */ 0x9227f792, 0xd003c8e1, // min r3, r3, ra9 ; mov.ifnc r1, r2 << 1 -+/* [0x00001d88] */ 0x559d049f, 0x100e4823, // mov.ifnc r0, r2 ; mul24 r3, r3, rb_pitch -+/* [0x00001d90] */ 0x8c618cc7, 0x10024e20, // add t0s, ra_base, r3 ; v8min r0, r0, rb_pmask -+/* [0x00001d98] */ 0x540183f0, 0x18024862, // and r1, r1, rb_pmask ; mul24 r2, ra0.8a, r0 -+/* [0x00001da0] */ 0x4d01feb1, 0x1e0248a3, // sub r2, rb_fir_off_h, r2 ; mul24 r3, ra0.8d, r1 -+/* [0x00001da8] */ 0x4d03e4f0, 0xda0248a3, // sub r2, r2, r3 ; mul24 r3, ra0.8b << 2, r0 << 2 @ "mul_used", 0 -+/* [0x00001db0] */ 0x40034031, 0xda0109e3, // nop ; mul24.ifn r3, ra0.8b << 12, r1 << 12 @ "mul_used", 0 -+/* [0x00001db8] */ 0x4c03c4f0, 0xdc0248a3, // add r2, r2, r3 ; mul24 r3, ra0.8c << 4, r0 << 4 @ "mul_used", 0 -+/* [0x00001dc0] */ 0x40032031, 0xdc0109e3, // nop ; mul24.ifn r3, ra0.8c << 14, r1 << 14 @ "mul_used", 0 -+/* [0x00001dc8] */ 0x4c0854fe, 0xb8025804, // add r0, r2, r3 ; mul24 ra4, rb5, ra2.8a ; ldtmu1 -+/* [0x00001dd0] */ 0x8e2869bf, 0x10024885, // shr r2, r4, ra10 ; mov rb5, rb6 -+/* [0x00001dd8] */ 0x8e4505f6, 0xd2024863, // shr r1, r2, v_v_shift ; mov r3, ra_y2 -+/* [0x00001de0] */ 0x8e1c21f6, 0xd00241c6, // shr ra7, r0, v_bit_depth - 8 ; mov rb6, ra7 -+/* [0x00001de8] */ 0x8c531789, 0xda124460, // add ra_y2, r3, ra_k1 ; mov r0, r1 << 15 -+/* [0x00001df0] */ 0x9353f792, 0xd803c8e1, // max r3, r3, ra_k0 ; mov.ifnc r1, r2 << 1 -+/* [0x00001df8] */ 0x925de7ce, 0x120248e1, // min r3, r3, rb_max_y ; v8min r1, r1, ra_pmax -+/* [0x00001e00] */ 0x559d049f, 0x100e4823, // mov.ifnc r0, r2 ; mul24 r3, r3, rb_pitch -+/* [0x00001e08] */ 0x8c5cfec6, 0x12024f20, // add t1s, rb_base2, r3 ; v8min r0, r0, ra_pmax -+/* [0x00001e10] */ 0x4c041bf0, 0xd8025962, // add r5rep, r5, 1 ; mul24 r2, ra1.8a, r0 -+/* [0x00001e18] */ 0x4d05feb1, 0x1e0248a3, // sub r2, rb_fir_off_h, r2 ; mul24 r3, ra1.8d, r1 -+/* [0x00001e20] */ 0x4d07e4f0, 0xda0248a3, // sub r2, r2, r3 ; mul24 r3, ra1.8b << 2, r0 << 2 @ "mul_used", 0 -+/* [0x00001e28] */ 0x40074031, 0xda0109e3, // nop ; mul24.ifn r3, ra1.8b << 12, r1 << 12 @ "mul_used", 0 -+/* [0x00001e30] */ 0x4c07c6b0, 0xdc0248a3, // add r2, r3, r2 ; mul24 r3, ra1.8c << 4, r0 << 4 @ "mul_used", 0 -+/* [0x00001e38] */ 0x4c072b71, 0xdc0329e3, // add.setf -, r5, r5 ; mul24.ifn r3, ra1.8c << 14, r1 << 14 @ "mul_used", 0 -+/* [0x00001e40] */ 0xfffffef0, 0xf06809e7, // brr.anyn -, r:1b -+/* [0x00001e48] */ 0x4c0c94fe, 0x180248a0, // add r2, r2, r3 ; mul24 r0, rb9, ra3.8a -+/* [0x00001e50] */ 0x550caffe, 0x1a025261, // mov rb9, rb10 ; mul24 r1, rb10, ra3.8b -+/* [0x00001e58] */ 0x8e2c25f6, 0xd00242ca, // shr ra11, r2, v_bit_depth - 8 ; mov rb10, ra11 -+/* [0x00001e60] */ 0x4d08523e, 0x1a0248a1, // sub r2, r1, r0 ; mul24 r1, rb5, ra2.8b -+/* [0x00001e68] */ 0x8d112bf6, 0x100269e0, // sub.setf -, r5, rb_lcount ; mov r0, ra4 -+/* [0x00001e70] */ 0x4d08623e, 0x1c024860, // sub r1, r1, r0 ; mul24 r0, rb6, ra2.8c -+/* [0x00001e78] */ 0x4c1c7237, 0x10024860, // add r1, r1, r0 ; mul24 r0, ra7, rb7 -+/* [0x00001e80] */ 0x4d0ca23e, 0x1c024860, // sub r1, r1, r0 ; mul24 r0, rb10, ra3.8c -+/* [0x00001e88] */ 0x4c2cb437, 0x100248a0, // add r2, r2, r0 ; mul24 r0, ra11, rb11 -+/* [0x00001e90] */ 0x0d9e7400, 0x100208a7, // sub r2, r2, r0 -+/* [0x00001e98] */ 0x0e9c63c0, 0xd0020867, // shr r1, r1, 6 -+/* [0x00001ea0] */ 0x4e5865ce, 0xd20248a0, // shr r2, r2, 6 ; mul24 r0, r1, ra_wt_mul_l0 -+/* [0x00001ea8] */ 0x4c4a7456, 0x120248a1, // add r2, r2, r1 ; mul24 r1, r2, ra_wt_mul_l1 -+/* [0x00001eb0] */ 0x4c667216, 0x14024862, // add r1, r1, r0 ; mul24 r2, r2, ra_kmul_add -+/* [0x00001eb8] */ 0x8d5e72b6, 0x1c024863, // sub r1, r1, r2 ; mov r3, ra_blk_height -+/* [0x00001ec0] */ 0xec40c3f3, 0x12024860, // add r1, r1, rb_wt_off ; v8subs r0, ra_height, r3 -+/* [0x00001ec8] */ 0xfffffe68, 0xf06809e7, // brr.anyn -, r:1b -+/* [0x00001ed0] */ 0x0f667380, 0x18020867, // asr r1, r1, ra_wt_den_p7 -+/* [0x00001ed8] */ 0x925f23bf, 0x12020867, // min r1, r1, ra_pmax ; mov -, vw_wait -+/* [0x00001ee0] */ 0x5351039f, 0x18024c22, // max vpm, r1, ra_k0 ; mul24 r2, r3, rb_pitch -+/* [0x00001ee8] */ 0x956e7036, 0x10126431, // mov.setf ra_height, r0 ; mov vw_setup, ra_dma0 -+/* [0x00001ef0] */ 0x00000000, 0xf027c9e7, // bra.anyz -, ra_link -+/* [0x00001ef8] */ 0x929dd0ff, 0x10024831, // min r0, r0, r3 ; mov vw_setup, rb_dma1 -+/* [0x00001f00] */ 0x8d7270f6, 0x10024872, // sub r1, r0, r3 ; mov vw_addr, ra_dest -+/* [0x00001f08] */ 0x119d73c0, 0xd0020867, // shl r1, r1, i_shift23 -+/* [0x00001f10] */ 0xfffffe20, 0xf0f809e7, // brr -, r:1b -+/* [0x00001f18] */ 0x0c9d2e00, 0x100214a7, // add rb_lcount, rb_lcount, r0 -+/* [0x00001f20] */ 0x0c6e7c40, 0x100206e7, // add ra_dma0, ra_dma0, r1 -+/* [0x00001f28] */ 0x8c71ccbf, 0x10024731, // add ra_dest, ra_dest, r2 ; mov vw_setup, rb_vpm_init -+// ::mc_sync10_q0 -+/* [0x00001f30] */ 0x15827d80, 0x100207a7, // mov ra_link, unif -+/* [0x00001f38] */ 0x159f2fc0, 0x100009e7, // mov -, vw_wait -+/* [0x00001f40] */ 0x00000010, 0xe80009e7, // mov dst, sacq(i) -+/* [0x00001f48] */ 0x00000010, 0xe80009e7, // mov dst, sacq(i) -+/* [0x00001f50] */ 0x00000010, 0xe80009e7, // mov dst, sacq(i) -+/* [0x00001f58] */ 0x00000000, 0xf0f7c9e7, // bra -, ra_link -+/* [0x00001f60] */ 0x0000001c, 0xe80009e7, // mov dst, sacq(i) -+/* [0x00001f68] */ 0x00000001, 0xe80009e7, // mov dst, srel(i) -+/* [0x00001f70] */ 0x0000000d, 0xe80009e7, // mov dst, srel(i) -+// ::mc_sync10_q1 -+/* [0x00001f78] */ 0x15827d80, 0x100207a7, // mov ra_link, unif -+/* [0x00001f80] */ 0x159f2fc0, 0x100009e7, // mov -, vw_wait -+/* [0x00001f88] */ 0x00000000, 0xf0f7c9e7, // bra -, ra_link -+/* [0x00001f90] */ 0x00000000, 0xe80009e7, // mov dst, srel(i) -+/* [0x00001f98] */ 0x00000011, 0xe80009e7, // mov dst, sacq(i) -+/* [0x00001fa0] */ 0x00000002, 0xe80009e7, // mov dst, srel(i) -+// ::mc_sync10_q2 -+/* [0x00001fa8] */ 0x15827d80, 0x100207a7, // mov ra_link, unif -+/* [0x00001fb0] */ 0x159f2fc0, 0x100009e7, // mov -, vw_wait -+/* [0x00001fb8] */ 0x00000000, 0xf0f7c9e7, // bra -, ra_link -+/* [0x00001fc0] */ 0x00000000, 0xe80009e7, // mov dst, srel(i) -+/* [0x00001fc8] */ 0x00000012, 0xe80009e7, // mov dst, sacq(i) -+/* [0x00001fd0] */ 0x00000003, 0xe80009e7, // mov dst, srel(i) -+// ::mc_sync10_q3 -+/* [0x00001fd8] */ 0x15827d80, 0x100207a7, // mov ra_link, unif -+/* [0x00001fe0] */ 0x159f2fc0, 0x100009e7, // mov -, vw_wait -+/* [0x00001fe8] */ 0x00000000, 0xf0f7c9e7, // bra -, ra_link -+/* [0x00001ff0] */ 0x00000000, 0xe80009e7, // mov dst, srel(i) -+/* [0x00001ff8] */ 0x00000013, 0xe80009e7, // mov dst, sacq(i) -+/* [0x00002000] */ 0x009e7000, 0x100009e7, // nop -+// ::mc_sync10_q4 -+/* [0x00002008] */ 0x15827d80, 0x100207a7, // mov ra_link, unif -+/* [0x00002010] */ 0x159f2fc0, 0x100009e7, // mov -, vw_wait -+/* [0x00002018] */ 0x00000014, 0xe80009e7, // mov dst, sacq(i) -+/* [0x00002020] */ 0x00000014, 0xe80009e7, // mov dst, sacq(i) -+/* [0x00002028] */ 0x00000014, 0xe80009e7, // mov dst, sacq(i) -+/* [0x00002030] */ 0x00000000, 0xf0f7c9e7, // bra -, ra_link -+/* [0x00002038] */ 0x0000001d, 0xe80009e7, // mov dst, sacq(i) -+/* [0x00002040] */ 0x00000005, 0xe80009e7, // mov dst, srel(i) -+/* [0x00002048] */ 0x0000000e, 0xe80009e7, // mov dst, srel(i) -+// ::mc_sync10_q5 -+/* [0x00002050] */ 0x15827d80, 0x100207a7, // mov ra_link, unif -+/* [0x00002058] */ 0x159f2fc0, 0x100009e7, // mov -, vw_wait -+/* [0x00002060] */ 0x00000000, 0xf0f7c9e7, // bra -, ra_link -+/* [0x00002068] */ 0x00000004, 0xe80009e7, // mov dst, srel(i) -+/* [0x00002070] */ 0x00000015, 0xe80009e7, // mov dst, sacq(i) -+/* [0x00002078] */ 0x00000006, 0xe80009e7, // mov dst, srel(i) -+// ::mc_sync10_q6 -+/* [0x00002080] */ 0x15827d80, 0x100207a7, // mov ra_link, unif -+/* [0x00002088] */ 0x159f2fc0, 0x100009e7, // mov -, vw_wait -+/* [0x00002090] */ 0x00000000, 0xf0f7c9e7, // bra -, ra_link -+/* [0x00002098] */ 0x00000004, 0xe80009e7, // mov dst, srel(i) -+/* [0x000020a0] */ 0x00000016, 0xe80009e7, // mov dst, sacq(i) -+/* [0x000020a8] */ 0x00000007, 0xe80009e7, // mov dst, srel(i) -+// ::mc_sync10_q7 -+/* [0x000020b0] */ 0x15827d80, 0x100207a7, // mov ra_link, unif -+/* [0x000020b8] */ 0x159f2fc0, 0x100009e7, // mov -, vw_wait -+/* [0x000020c0] */ 0x00000000, 0xf0f7c9e7, // bra -, ra_link -+/* [0x000020c8] */ 0x00000004, 0xe80009e7, // mov dst, srel(i) -+/* [0x000020d0] */ 0x00000017, 0xe80009e7, // mov dst, sacq(i) -+/* [0x000020d8] */ 0x009e7000, 0x100009e7, // nop -+// ::mc_sync10_q8 -+/* [0x000020e0] */ 0x15827d80, 0x100207a7, // mov ra_link, unif -+/* [0x000020e8] */ 0x159f2fc0, 0x100009e7, // mov -, vw_wait -+/* [0x000020f0] */ 0x00000018, 0xe80009e7, // mov dst, sacq(i) -+/* [0x000020f8] */ 0x00000018, 0xe80009e7, // mov dst, sacq(i) -+/* [0x00002100] */ 0x00000018, 0xe80009e7, // mov dst, sacq(i) -+/* [0x00002108] */ 0x00000000, 0xf0f7c9e7, // bra -, ra_link -+/* [0x00002110] */ 0x0000001e, 0xe80009e7, // mov dst, sacq(i) -+/* [0x00002118] */ 0x00000009, 0xe80009e7, // mov dst, srel(i) -+/* [0x00002120] */ 0x0000000c, 0xe80009e7, // mov dst, srel(i) -+// ::mc_sync10_q9 -+/* [0x00002128] */ 0x15827d80, 0x100207a7, // mov ra_link, unif -+/* [0x00002130] */ 0x159f2fc0, 0x100009e7, // mov -, vw_wait -+/* [0x00002138] */ 0x00000000, 0xf0f7c9e7, // bra -, ra_link -+/* [0x00002140] */ 0x00000008, 0xe80009e7, // mov dst, srel(i) -+/* [0x00002148] */ 0x00000019, 0xe80009e7, // mov dst, sacq(i) -+/* [0x00002150] */ 0x0000000a, 0xe80009e7, // mov dst, srel(i) -+// ::mc_sync10_q10 -+/* [0x00002158] */ 0x15827d80, 0x100207a7, // mov ra_link, unif -+/* [0x00002160] */ 0x159f2fc0, 0x100009e7, // mov -, vw_wait -+/* [0x00002168] */ 0x00000000, 0xf0f7c9e7, // bra -, ra_link -+/* [0x00002170] */ 0x00000008, 0xe80009e7, // mov dst, srel(i) -+/* [0x00002178] */ 0x0000001a, 0xe80009e7, // mov dst, sacq(i) -+/* [0x00002180] */ 0x0000000b, 0xe80009e7, // mov dst, srel(i) -+// ::mc_sync10_q11 -+/* [0x00002188] */ 0x15827d80, 0x100207a7, // mov ra_link, unif -+/* [0x00002190] */ 0x159f2fc0, 0x100009e7, // mov -, vw_wait -+/* [0x00002198] */ 0x00000000, 0xf0f7c9e7, // bra -, ra_link -+/* [0x000021a0] */ 0x00000008, 0xe80009e7, // mov dst, srel(i) -+/* [0x000021a8] */ 0x0000001b, 0xe80009e7, // mov dst, sacq(i) -+/* [0x000021b0] */ 0x009e7000, 0x100009e7, // nop -+// ::mc_exit_c10_q0 -+// ::mc_exit_y10_q0 -+/* [0x000021b8] */ 0x00000002, 0xe00228e7, // mov.setf r3, PREREAD - 1 -+// :1 -+/* [0x000021c0] */ 0xffffffe0, 0xf03809e7, // brr.anynz -, r:1b -+/* [0x000021c8] */ 0x009e7000, 0xa00009e7, // nop ; nop ; ldtmu0 -+/* [0x000021d0] */ 0x009e7000, 0xb00009e7, // nop ; nop ; ldtmu1 -+/* [0x000021d8] */ 0x0d9c17c0, 0xd00228e7, // sub.setf r3, r3, 1 -+/* [0x000021e0] */ 0x159f2fc0, 0x100009e7, // mov -, vw_wait -+/* [0x000021e8] */ 0x0000001c, 0xe80009e7, // mov dst, sacq(i) -+/* [0x000021f0] */ 0x009e7000, 0x300009e7, // nop ; nop ; thrend -+/* [0x000021f8] */ 0x00000001, 0xe00209a7, // mov interrupt, 1 -+/* [0x00002200] */ 0x009e7000, 0x100009e7, // nop -+// ::mc_exit_c10_qn -+// ::mc_exit_y10_qn -+/* [0x00002208] */ 0x00000002, 0xe00228e7, // mov.setf r3, PREREAD - 1 -+// :1 -+/* [0x00002210] */ 0xffffffe0, 0xf03809e7, // brr.anynz -, r:1b -+/* [0x00002218] */ 0x009e7000, 0xa00009e7, // nop ; nop ; ldtmu0 -+/* [0x00002220] */ 0x009e7000, 0xb00009e7, // nop ; nop ; ldtmu1 -+/* [0x00002228] */ 0x0d9c17c0, 0xd00228e7, // sub.setf r3, r3, 1 -+/* [0x00002230] */ 0x159f2fc0, 0x100009e7, // mov -, vw_wait -+/* [0x00002238] */ 0x009e7000, 0x300009e7, // nop ; nop ; thrend -+/* [0x00002240] */ 0x009e7000, 0x100009e7, // nop -+/* [0x00002248] */ 0x009e7000, 0x100009e7, // nop -+// ::mc_setup_y10_q0 -+/* [0x00002250] */ 0x0000000c, 0xe80009e7, // mov dst, srel(i) -+// ::mc_setup_y10_qn -+/* [0x00002258] */ 0x95801ff6, 0xd0025900, // mov tmurs, 1 ; mov ra0, unif -+/* [0x00002260] */ 0x15827d80, 0x10020267, // mov ra9, unif -+/* [0x00002268] */ 0x15827d80, 0x10020067, // mov ra1, unif -+/* [0x00002270] */ 0xaaaaff00, 0xe6020827, // mov r0, [0,2,0,2,0,2,0,2,1,3,1,3,1,3,1,3] -+/* [0x00002278] */ 0x9181e1f6, 0xd00250cb, // shl rb_ef, r0, i_shift30 ; mov ra11, unif -+/* [0x00002280] */ 0xff800100, 0xe0020527, // mov ra_kff800100, 0xff800100 -+/* [0x00002288] */ 0x0000ffff, 0xe0021627, // mov rb_pmask, v_pmask -+/* [0x00002290] */ 0x000803ff, 0xe00205e7, // mov ra_blk_height_pmax, ((1 << v_bit_depth) - 1) | (v_blk_height << 16) -+/* [0x00002298] */ 0x00010000, 0xe00217e7, // mov rb_fir_off_h, (FIR_OFFSET << (v_bit_depth - 8)) -+/* [0x000022a0] */ 0x4000000c, 0xe0020667, // mov ra_fir_off_val_wt_den_p7, (FIR_OFFSET << 16) | (DENOM + 15 - v_bit_depth) -+/* [0x000022a8] */ 0x050b0a00, 0xe0021567, // mov rb_y_coeffs_2, 0x050b0a00 -+/* [0x000022b0] */ 0x11283a40, 0xe00215a7, // mov rb_y_coeffs_3, 0x11283a40 -+/* [0x000022b8] */ 0x0a0b0500, 0xe00215e7, // mov rb_y_coeffs_5, 0x0a0b0500 -+/* [0x000022c0] */ 0x15827d80, 0x100200e7, // mov ra3, unif -+/* [0x000022c8] */ 0x95803ff6, 0x10024754, // mov ra_ef, rb_ef ; mov rb_xpitch, unif -+/* [0x000022d0] */ 0x0d0c1dc0, 0xd4020827, // sub r0, ra3.16b, 1 -+/* [0x000022d8] */ 0x119c11c0, 0xd00216a7, // shl rb_max_x, r0, v_x_shift -+/* [0x000022e0] */ 0x0d0c1dc0, 0xd20217a7, // sub rb_max_y, ra3.16a, 1 -+/* [0x000022e8] */ 0x959a0dbf, 0x100248d0, // mov r3, elem_num ; mov rb_pitch, unif -+/* [0x000022f0] */ 0xc0000000, 0xe0020867, // mov r1, vdw_setup_1(0) -+/* [0x000022f8] */ 0x159d03c0, 0x10021667, // or rb_dma1_base, r1, rb_pitch -+/* [0x00002300] */ 0x0c027cc0, 0x14020827, // add r0, ra0.16b, r3 -+/* [0x00002308] */ 0x119c11c0, 0xd0020827, // shl r0, r0, v_x_shift -+/* [0x00002310] */ 0x139c01c0, 0xd0020827, // max r0, r0, 0 -+/* [0x00002318] */ 0x129da1c0, 0x10020827, // min r0, r0, rb_max_x -+/* [0x00002320] */ 0x119c31c0, 0xd0220567, // shl ra_xshift_next, r0, 3 -+/* [0x00002328] */ 0xf49dc1d2, 0xd0024822, // and r0, r0, -4 ; v8subs r2, r2, r2 -+/* [0x00002330] */ 0x0d9d05c0, 0x100208a7, // sub r2, r2, rb_pitch -+/* [0x00002338] */ 0x149e7080, 0x10020867, // and r1, r0, r2 -+/* [0x00002340] */ 0x569d404f, 0x10024821, // xor r0, r0, r1 ; mul24 r1, r1, rb_xpitch -+/* [0x00002348] */ 0x0c9e7040, 0x10020827, // add r0, r0, r1 -+/* [0x00002350] */ 0x0c267c00, 0x10020627, // add ra_base, ra9, r0 -+/* [0x00002358] */ 0x0c067cc0, 0x14020827, // add r0, ra1.16b, r3 -+/* [0x00002360] */ 0x119c11c0, 0xd0020827, // shl r0, r0, v_x_shift -+/* [0x00002368] */ 0x139c01c0, 0xd0020827, // max r0, r0, 0 -+/* [0x00002370] */ 0x129da1c0, 0x10020827, // min r0, r0, rb_max_x -+/* [0x00002378] */ 0x119c31c0, 0xd0021067, // shl rb_xshift2_next, r0, 3 -+/* [0x00002380] */ 0x149dc1c0, 0xd0020827, // and r0, r0, -4 -+/* [0x00002388] */ 0x149e7080, 0x10020867, // and r1, r0, r2 -+/* [0x00002390] */ 0x569d404f, 0x10024821, // xor r0, r0, r1 ; mul24 r1, r1, rb_xpitch -+/* [0x00002398] */ 0x0c9e7040, 0x10020827, // add r0, r0, r1 -+/* [0x000023a0] */ 0x0c2e7c00, 0x100213e7, // add rb_base2, ra11, r0 -+/* [0x000023a8] */ 0x80027036, 0x120049e0, // nop ; mov r0, ra0.16a -+/* [0x000023b0] */ 0x95043ff6, 0xd20248e2, // mov r3, PREREAD ; mov r2, ra1.16a -+// :1 -+/* [0x000023b8] */ 0x0d9c17c0, 0xd00228e7, // sub.setf r3, r3, 1 -+/* [0x000023c0] */ 0x139c01c0, 0xd0020867, // max r1, r0, 0 -+/* [0x000023c8] */ 0x129de3c0, 0x10020867, // min r1, r1, rb_max_y -+/* [0x000023d0] */ 0x4c51018f, 0x1a024821, // add r0, r0, ra_k1 ; mul24 r1, r1, rb_pitch -+/* [0x000023d8] */ 0x8c627c40, 0x10225e11, // add t0s, ra_base, r1 ; mov ra_y, r0 -+/* [0x000023e0] */ 0x139c05c0, 0xd0020867, // max r1, r2, 0 -+/* [0x000023e8] */ 0xffffffb0, 0xf03809e7, // brr.anynz -, r:1b -+/* [0x000023f0] */ 0x129de3c0, 0x10020867, // min r1, r1, rb_max_y -+/* [0x000023f8] */ 0x4c51058f, 0x1a0248a1, // add r2, r2, ra_k1 ; mul24 r1, r1, rb_pitch -+/* [0x00002400] */ 0x8c9cfe52, 0x10125f11, // add t1s, rb_base2, r1 ; mov ra_y2, r2 -+/* [0x00002408] */ 0x159e6fc0, 0x100208a7, // mov r2, qpu_num -+/* [0x00002410] */ 0x0f9c15c0, 0xd0020867, // asr r1, r2, 1 -+/* [0x00002418] */ 0x119c43c0, 0xd0020867, // shl r1, r1, 4 -+/* [0x00002420] */ 0x149c15c0, 0xd0020827, // and r0, r2, 1 -+/* [0x00002428] */ 0x159e7040, 0x10020827, // or r0, r0, r1 -+/* [0x00002430] */ 0x00002900, 0xe0020867, // mov r1, vpm_setup(0, 2, h16p(0, 0)) -+/* [0x00002438] */ 0x0c9e7040, 0x10021727, // add r_vpm, r0, r1 -+/* [0x00002440] */ 0x80004002, 0xe0020867, // mov r1, vdw_setup_0(0, 0, dma_h16p(0,0,0)) -+/* [0x00002448] */ 0x119c61c0, 0xd0020827, // shl r0, r0, 6 -+/* [0x00002450] */ 0x0c9e7040, 0x100216e7, // add r_dma, r0, r1 -+/* [0x00002458] */ 0x15827d80, 0x100207a7, // mov ra_link, unif -+/* [0x00002460] */ 0x00000000, 0xe0024208, // mov ra8, 0 ; mov rb8, 0 -+/* [0x00002468] */ 0x00000000, 0xf0f7c9e7, // bra -, ra_link -+/* [0x00002470] */ 0x00000000, 0xe0024249, // mov ra9, 0 ; mov rb9, 0 -+/* [0x00002478] */ 0x00000000, 0xe002428a, // mov ra10, 0 ; mov rb10, 0 -+/* [0x00002480] */ 0x00000000, 0xe00242cb, // mov ra11, 0 ; mov rb11, 0 -+// :per_block_setup_10 -+/* [0x00002488] */ 0x119c11c0, 0xd0020827, // shl r0, r0, v_x_shift -+/* [0x00002490] */ 0x93567176, 0x14125815, // max r0, r0, r5 ; mov ra_xshift, ra_xshift_next -+/* [0x00002498] */ 0x129da1c0, 0x10020827, // min r0, r0, rb_max_x -+/* [0x000024a0] */ 0x119c31c0, 0xd0220567, // shl ra_xshift_next, r0, 3 -+/* [0x000024a8] */ 0x149dc1c0, 0xd0020827, // and r0, r0, -4 -+/* [0x000024b0] */ 0x8d810bf6, 0x1002589a, // sub r2, r5, rb_pitch ; mov ra_base_next, unif -+/* [0x000024b8] */ 0x940270b6, 0x12225853, // and r1, r0, r2 ; mov ra_y_next, ra0.16a -+/* [0x000024c0] */ 0x569d404f, 0x10024821, // xor r0, r0, r1 ; mul24 r1, r1, rb_xpitch -+/* [0x000024c8] */ 0x8c827076, 0x10025801, // add r0, r0, r1 ; mov ra1, unif -+/* [0x000024d0] */ 0x0c6a7c00, 0x100206a7, // add ra_base_next, ra_base_next, r0 -+/* [0x000024d8] */ 0x0c067cc0, 0x14020827, // add r0, ra1.16b, r3 -+/* [0x000024e0] */ 0x119c11c0, 0xd0020827, // shl r0, r0, v_x_shift -+/* [0x000024e8] */ 0x93067176, 0x12125813, // max r0, r0, r5 ; mov ra_y2_next, ra1.16a -+/* [0x000024f0] */ 0x9281a1f6, 0x10024813, // min r0, r0, rb_max_x ; mov rb_base2_next, unif -+/* [0x000024f8] */ 0x119c31c0, 0xd0021067, // shl rb_xshift2_next, r0, 3 -+/* [0x00002500] */ 0x9481c1f6, 0xd0025810, // and r0, r0, -4 ; mov ra_width_height, unif -+/* [0x00002508] */ 0x949dc0bf, 0x10024871, // and r1, r0, r2 ; mov vw_setup, rb_vpm_init -+/* [0x00002510] */ 0x569d404f, 0x10024821, // xor r0, r0, r1 ; mul24 r1, r1, rb_xpitch -+/* [0x00002518] */ 0x4c402077, 0xd4024821, // add r0, r0, r1 ; mul24 r1, ra_width, v_x_mul -+/* [0x00002520] */ 0x0c9d3e00, 0x100214e7, // add rb_base2_next, rb_base2_next, r0 -+/* [0x00002528] */ 0x8d419e76, 0x12025760, // sub rb_dma1, rb_dma1_base, r1 ; mov r0, ra_height -+/* [0x00002530] */ 0x8c5dc1c6, 0xdc025460, // add rb_i_tmu, r0, (7-8) - PREREAD ; v8min r0, r0, ra_blk_height -+/* [0x00002538] */ 0x0c9df1c0, 0xd00214a7, // add rb_lcount, r0, (7-8) -+/* [0x00002540] */ 0x916481f6, 0xd4024823, // shl r0, r0, v_dma_h_shift ; mov r3, ra_kmul_add -+/* [0x00002548] */ 0x0c9e7040, 0x10020827, // add r0, r0, r1 -+/* [0x00002550] */ 0x9164f1f6, 0xd4024822, // shl r0, r0, v_dma_wh_shift ; mov r2, ra_fir_off_val -+/* [0x00002558] */ 0x8c81b1f6, 0x100246e0, // add ra_dma0, r0, rb_dma0_base ; mov r0, unif -+/* [0x00002560] */ 0x918101f6, 0xd00a5816, // shl.ifnn r0, r0, i_shift16 ; mov ra_wt_off_mul_l0, unif -+/* [0x00002568] */ 0x915031f6, 0xde024205, // shl ra8, r0, 3 ; mov rb5, ra_k255 -+/* [0x00002570] */ 0x01040400, 0xe0020867, // mov r1, 0x01040400 -+/* [0x00002578] */ 0x10227380, 0x1e5200a7, // ror ra2.8b, r1, ra8.8d -+/* [0x00002580] */ 0x10227380, 0x1c520027, // ror ra0.8b, r1, ra8.8c -+/* [0x00002588] */ 0x10215f80, 0x1e6200a7, // ror ra2.8c, rb_y_coeffs_2, ra8.8d -+/* [0x00002590] */ 0x10215f80, 0x1c620027, // ror ra0.8c, rb_y_coeffs_2, ra8.8c -+/* [0x00002598] */ 0x00010100, 0xe0020867, // mov r1,0x00010100 -+/* [0x000025a0] */ 0x902203bf, 0x1e025812, // ror r0, r1, ra8.8d ; mov ra_wt_off_mul_l1, unif -+/* [0x000025a8] */ 0x90205387, 0x1c424004, // ror ra0.8a, r1, ra8.8c ; v8min rb4, r0, rb5 -+/* [0x000025b0] */ 0x914883f6, 0xd0031856, // shl r1, r1, 8 ; mov.ifn ra_wt_off_mul_l0, ra_wt_off_mul_l1 -+/* [0x000025b8] */ 0x902203bf, 0x1e02581c, // ror r0, r1, ra8.8d ; mov ra_dest, unif -+/* [0x000025c0] */ 0x90205387, 0x1c72404b, // ror ra1.8d, r1, ra8.8c ; v8min rb11, r0, rb5 -+/* [0x000025c8] */ 0x10216f80, 0x1e7200a7, // ror ra2.8d, rb_y_coeffs_3, ra8.8d -+/* [0x000025d0] */ 0x10216f80, 0x1c720027, // ror ra0.8d, rb_y_coeffs_3, ra8.8c -+/* [0x000025d8] */ 0x10217f80, 0x1e5200e7, // ror ra3.8b, rb_y_coeffs_5, ra8.8d -+/* [0x000025e0] */ 0x10217f80, 0x1c520067, // ror ra1.8b, rb_y_coeffs_5, ra8.8c -+/* [0x000025e8] */ 0x04040100, 0xe0020867, // mov r1,0x04040100 -+/* [0x000025f0] */ 0x10227380, 0x1e6200e7, // ror ra3.8c, r1, ra8.8d -+/* [0x000025f8] */ 0x902183bf, 0xdc624065, // ror ra1.8c, r1, ra8.8c ; mov r5rep, -8 -+/* [0x00002600] */ 0x00000000, 0xf0f7c9e7, // bra -, ra_link -+/* [0x00002608] */ 0x3a281100, 0xe0020867, // mov r1,0x3a281100 -+/* [0x00002610] */ 0x902203bf, 0x1e02581e, // ror r0, r1, ra8.8d ; mov ra_link, unif -+/* [0x00002618] */ 0x90205387, 0x1c424048, // ror ra1.8a, r1, ra8.8c ; v8min rb8, r0, rb5 -+// ::mc_filter_y10_pxx -+/* [0x00002620] */ 0xfffffe48, 0xf0f807a7, // brr ra_link, r:per_block_setup_10 -+/* [0x00002628] */ 0x959a0ff6, 0x10024023, // mov ra0, unif ; mov r3, elem_num -+/* [0x00002630] */ 0xec9c3fd2, 0x100269e5, // add.setf -, rb_ef, rb_ef ; v8subs r5rep, r2, r2 -+/* [0x00002638] */ 0x8c001cff, 0x14024800, // add r0, ra0.16b, r3 ; mov rb_xshift2, rb_xshift2_next -+/* [0x00002640] */ 0x1158adc0, 0xd4020867, // shl r1, ra_wt_off_l0, i_wt_den_p5 -+/* [0x00002648] */ 0x4c5a7cd6, 0x121245a0, // add ra_wt_mul_l0, ra_wt_mul_l0, r3 ; mul24 r0, r2, ra_wt_mul_l0 -+/* [0x00002650] */ 0x8d9c423f, 0x1042531d, // sub rb_wt_off, r1, r0 ; mov ra_ef.8a, rb4 -+// :1 -+/* [0x00002658] */ 0x4c745dbe, 0x100279c4, // add.setf -, ra_ef, ra_ef ; mul24 ra4, rb5, ra_ef -+/* [0x00002660] */ 0x93440dff, 0xd40248a1, // max r2, ra_y, 0 ; mov r1, 0 -+/* [0x00002668] */ 0x9251e5f6, 0x1a0248a3, // min r2, r2, rb_max_y ; mov r3, ra_k1 -+/* [0x00002670] */ 0x4c450cd7, 0xa4224462, // add ra_y, ra_y, r3 ; mul24 r2, r2, rb_pitch ; ldtmu0 -+/* [0x00002678] */ 0x8c606cbf, 0x10024e05, // add t0s, ra_base, r2 ; mov rb5, rb6 -+/* [0x00002680] */ 0x8e5479bf, 0x12024806, // shr r0, r4, ra_xshift ; mov rb6, rb7 -+/* [0x00002688] */ 0x93458c47, 0xb20248a0, // max r2, ra_y2, r1 ; v8min r0, r0, rb_pmask ; ldtmu1 -+/* [0x00002690] */ 0x8e2009f6, 0x10024847, // shr r1, r4, rb_xshift2 ; mov rb7, ra8 -+/* [0x00002698] */ 0x925de5ce, 0x120248a1, // min r2, r2, rb_max_y ; v8min r1, r1, ra_pmax -+/* [0x000026a0] */ 0x4c450cd7, 0x12124462, // add ra_y2, ra_y2, r3 ; mul24 r2, r2, rb_pitch -+/* [0x000026a8] */ 0x8c24feb6, 0x10025f08, // add t1s, rb_base2, r2 ; mov ra8, ra9 -+/* [0x000026b0] */ 0x4c038af1, 0xd8025962, // add r5rep, r5, r3 ; mul24 r2, ra0.8a << 8, r1 << 8 @ "mul_used", 0 -+/* [0x000026b8] */ 0x5501fff0, 0x180348e2, // mov r3, rb_fir_off_h ; mul24.ifnn r2, ra0.8a, r0 -+/* [0x000026c0] */ 0x4d03f6b0, 0xda0248a3, // sub r2, r3, r2 ; mul24 r3, ra0.8b << 1, r0 << 1 @ "mul_used", 0 -+/* [0x000026c8] */ 0x40037031, 0xda0109e3, // nop ; mul24.ifn r3, ra0.8b << 9, r1 << 9 @ "mul_used", 0 -+/* [0x000026d0] */ 0x4c03e4f0, 0xdc0248a3, // add r2, r2, r3 ; mul24 r3, ra0.8c << 2, r0 << 2 @ "mul_used", 0 -+/* [0x000026d8] */ 0x40036031, 0xdc0109e3, // nop ; mul24.ifn r3, ra0.8c << 10, r1 << 10 @ "mul_used", 0 -+/* [0x000026e0] */ 0x4d03d4f0, 0xde0248a3, // sub r2, r2, r3 ; mul24 r3, ra0.8d << 3, r0 << 3 @ "mul_used", 0 -+/* [0x000026e8] */ 0x40035031, 0xde0109e3, // nop ; mul24.ifn r3, ra0.8d << 11, r1 << 11 @ "mul_used", 0 -+/* [0x000026f0] */ 0x4c07c4f0, 0xd80248a3, // add r2, r2, r3 ; mul24 r3, ra1.8a << 4, r0 << 4 @ "mul_used", 0 -+/* [0x000026f8] */ 0x40074031, 0xd80109e3, // nop ; mul24.ifn r3, ra1.8a << 12, r1 << 12 @ "mul_used", 0 -+/* [0x00002700] */ 0x4c07b4f0, 0xda0248a3, // add r2, r2, r3 ; mul24 r3, ra1.8b << 5, r0 << 5 @ "mul_used", 0 -+/* [0x00002708] */ 0x40073031, 0xda0109e3, // nop ; mul24.ifn r3, ra1.8b << 13, r1 << 13 @ "mul_used", 0 -+/* [0x00002710] */ 0x4d07a4f0, 0xdc0248a3, // sub r2, r2, r3 ; mul24 r3, ra1.8c << 6, r0 << 6 @ "mul_used", 0 -+/* [0x00002718] */ 0x40072031, 0xdc0109e3, // nop ; mul24.ifn r3, ra1.8c << 14, r1 << 14 @ "mul_used", 0 -+/* [0x00002720] */ 0x4c0794f0, 0xde0248a3, // add r2, r2, r3 ; mul24 r3, ra1.8d << 7, r0 << 7 @ "mul_used", 0 -+/* [0x00002728] */ 0x4c071b71, 0xde0329e3, // add.setf -, r5, r5 ; mul24.ifn r3, ra1.8d << 15, r1 << 15 @ "mul_used", 0 -+/* [0x00002730] */ 0xffffff08, 0xf06809e7, // brr.anyn -, r:1b -+/* [0x00002738] */ 0x4d0854fe, 0x1a0248a1, // sub r2, r2, r3 ; mul24 r1, rb5, ra2.8b -+/* [0x00002740] */ 0x550caffe, 0x1a024260, // mov ra9, rb10 ; mul24 r0, rb10, ra3.8b -+/* [0x00002748] */ 0x8f2c25f6, 0xd00242ca, // asr ra11, r2, v_bit_depth - 8 ; mov rb10, ra11 -+/* [0x00002750] */ 0x4d08623e, 0x1c024860, // sub r1, r1, r0 ; mul24 r0, rb6, ra2.8c -+/* [0x00002758] */ 0x4d08723e, 0x1e024860, // sub r1, r1, r0 ; mul24 r0, rb7, ra2.8d -+/* [0x00002760] */ 0x4c208237, 0x10024860, // add r1, r1, r0 ; mul24 r0, ra8, rb8 -+/* [0x00002768] */ 0x4c0ca23e, 0x1c024860, // add r1, r1, r0 ; mul24 r0, rb10, ra3.8c -+/* [0x00002770] */ 0x4c2cb237, 0x10024860, // add r1, r1, r0 ; mul24 r0, ra11, rb11 -+/* [0x00002778] */ 0x8d5d1bf6, 0x1c0269e3, // sub.setf -, r5, rb_i_tmu ; mov r3, ra_blk_height -+/* [0x00002780] */ 0x8d1133bf, 0x1002884f, // sub r1, r1, ra4 ; mov.ifz rb_base2, rb_base2_next -+/* [0x00002788] */ 0x8d6a7236, 0x10029858, // sub r1, r1, r0 ; mov.ifz ra_base, ra_base_next -+/* [0x00002790] */ 0x8f4c63f6, 0xd0029851, // asr r1, r1, 6 ; mov.ifz ra_y_y2, ra_y_y2_next -+/* [0x00002798] */ 0x4d592bce, 0x120269e0, // sub.setf -, r5, rb_lcount ; mul24 r0, r1, ra_wt_mul_l0 -+/* [0x000027a0] */ 0x4c64c1ce, 0x14024821, // add r0, r0, rb_wt_off ; mul24 r1, r1, ra_kmul_add -+/* [0x000027a8] */ 0xed427073, 0x12024860, // sub r1, r0, r1 ; v8subs r0, ra_height, r3 -+/* [0x000027b0] */ 0xfffffe88, 0xf06809e7, // brr.anyn -, r:1b -+/* [0x000027b8] */ 0x0f9cb3c0, 0xd0020867, // asr r1, r1, i_wt_den_p6 -+/* [0x000027c0] */ 0x925f23bf, 0x12020867, // min r1, r1, ra_pmax ; mov -, vw_wait -+/* [0x000027c8] */ 0x5351039f, 0x18024c22, // max vpm, r1, ra_k0 ; mul24 r2, r3, rb_pitch -+/* [0x000027d0] */ 0x956e7036, 0x10126431, // mov.setf ra_height, r0 ; mov vw_setup, ra_dma0 -+/* [0x000027d8] */ 0x00000000, 0xf027c9e7, // bra.anyz -, ra_link -+/* [0x000027e0] */ 0x929dd0ff, 0x10024831, // min r0, r0, r3 ; mov vw_setup, rb_dma1 -+/* [0x000027e8] */ 0x8d7270f6, 0x10024872, // sub r1, r0, r3 ; mov vw_addr, ra_dest -+/* [0x000027f0] */ 0x119d73c0, 0xd0020867, // shl r1, r1, i_shift23 -+/* [0x000027f8] */ 0xfffffe40, 0xf0f809e7, // brr -, r:1b -+/* [0x00002800] */ 0x0c9d2e00, 0x100214a7, // add rb_lcount, rb_lcount, r0 -+/* [0x00002808] */ 0x0c6e7c40, 0x100206e7, // add ra_dma0, ra_dma0, r1 -+/* [0x00002810] */ 0x8c71ccbf, 0x10024731, // add ra_dest, ra_dest, r2 ; mov vw_setup, rb_vpm_init -+// ::mc_filter_y10_p00 -+/* [0x00002818] */ 0x959a0ff6, 0x10024020, // mov ra0, unif ; mov r0, elem_num -+/* [0x00002820] */ 0xf5567dad, 0x14124565, // mov ra_xshift, ra_xshift_next ; v8subs r5rep, r5, r5 -+/* [0x00002828] */ 0x8c020c3f, 0x1402581a, // add r0, ra0.16b, r0 ; mov ra_base_next, unif -+/* [0x00002830] */ 0x119c11c0, 0xd0020827, // shl r0, r0, v_x_shift -+/* [0x00002838] */ 0x93027176, 0x12225813, // max r0, r0, r5 ; mov ra_y_next, ra0.16a -+/* [0x00002840] */ 0x9281a1f6, 0x10025810, // min r0, r0, rb_max_x ; mov ra_width_height, unif -+/* [0x00002848] */ 0x119c31c0, 0xd0220567, // shl ra_xshift_next, r0, 3 -+/* [0x00002850] */ 0x149dc1c0, 0xd0020827, // and r0, r0, -4 -+/* [0x00002858] */ 0x8d810bf6, 0x10025896, // sub r2, r5, rb_pitch ; mov ra_wt_off_mul_l0, unif -+/* [0x00002860] */ 0x149e7080, 0x10020867, // and r1, r0, r2 -+/* [0x00002868] */ 0x569d404f, 0x10024821, // xor r0, r0, r1 ; mul24 r1, r1, rb_xpitch -+/* [0x00002870] */ 0x8c827076, 0x1002581c, // add r0, r0, r1 ; mov ra_dest, unif -+/* [0x00002878] */ 0x8c69cc3f, 0x100246b1, // add ra_base_next, ra_base_next, r0 ; mov vw_setup, rb_vpm_init -+/* [0x00002880] */ 0x11401dc0, 0xd4020867, // shl r1, ra_width, v_x_shift -+/* [0x00002888] */ 0x8d419e76, 0x12025760, // sub rb_dma1, rb_dma1_base, r1 ; mov r0, ra_height -+/* [0x00002890] */ 0x8d5c31c6, 0xdc025460, // sub rb_i_tmu, r0, PREREAD ; v8min r0, r0, ra_blk_height -+/* [0x00002898] */ 0x919c81c0, 0xd0024812, // shl r0, r0, v_dma_h_shift ; mov rb_lcount, r0 -+/* [0x000028a0] */ 0x0c9e7040, 0x10020827, // add r0, r0, r1 -+/* [0x000028a8] */ 0x1158edc0, 0xd4021327, // shl rb_wt_off, ra_wt_off_l0, DENOM + 7 -+/* [0x000028b0] */ 0x9180f1f6, 0xd002581e, // shl r0, r0, v_dma_wh_shift ; mov ra_link, unif -+/* [0x000028b8] */ 0x0c9db1c0, 0x100206e7, // add ra_dma0, r0, rb_dma0_base -+// :1 -+/* [0x000028c0] */ 0xcd511bee, 0x1a0269e5, // sub.setf -, r5, rb_i_tmu ; v8adds r5rep, r5, ra_k1 -+/* [0x000028c8] */ 0x804e7036, 0xa42099d1, // nop ; mov.ifz ra_y, ra_y_next ; ldtmu0 -+/* [0x000028d0] */ 0x8e5509bf, 0x12024823, // shr r0, r4, ra_xshift ; mov r3, rb_pitch -+/* [0x000028d8] */ 0x13440dc0, 0xd40208a7, // max r2, ra_y, 0 -+/* [0x000028e0] */ 0x9269e5f6, 0x10029898, // min r2, r2, rb_max_y ; mov.ifz ra_base, ra_base_next -+/* [0x000028e8] */ 0x4c441dd3, 0xd4224462, // add ra_y, ra_y, 1 ; mul24 r2, r2, r3 -+/* [0x000028f0] */ 0x8c618c87, 0x10024e20, // add t0s, ra_base, r2 ; v8min r0, r0, rb_pmask -+/* [0x000028f8] */ 0x4d592bc6, 0x120269e1, // sub.setf -, r5, rb_lcount ; mul24 r1, r0, ra_wt_mul_l0 -+/* [0x00002900] */ 0x915c83f6, 0xdc024863, // shl r1, r1, 8 ; mov r3, ra_blk_height -+/* [0x00002908] */ 0xec40c3f3, 0x12024860, // add r1, r1, rb_wt_off ; v8subs r0, ra_height, r3 -+/* [0x00002910] */ 0xffffff90, 0xf06809e7, // brr.anyn -, r:1b -+/* [0x00002918] */ 0x0f9cf3c0, 0xd0020867, // asr r1, r1, DENOM + 8 -+/* [0x00002920] */ 0x925f23bf, 0x12020867, // min r1, r1, ra_pmax ; mov -, vw_wait -+/* [0x00002928] */ 0x5351039f, 0x18024c22, // max vpm, r1, ra_k0 ; mul24 r2, r3, rb_pitch -+/* [0x00002930] */ 0x956e7036, 0x10126431, // mov.setf ra_height, r0 ; mov vw_setup, ra_dma0 -+/* [0x00002938] */ 0x00000000, 0xf027c9e7, // bra.anyz -, ra_link -+/* [0x00002940] */ 0x929dd0ff, 0x10024831, // min r0, r0, r3 ; mov vw_setup, rb_dma1 -+/* [0x00002948] */ 0x8d7270f6, 0x10024872, // sub r1, r0, r3 ; mov vw_addr, ra_dest -+/* [0x00002950] */ 0x119d73c0, 0xd0020867, // shl r1, r1, i_shift23 -+/* [0x00002958] */ 0xffffff48, 0xf0f809e7, // brr -, r:1b -+/* [0x00002960] */ 0x0c9d2e00, 0x100214a7, // add rb_lcount, rb_lcount, r0 -+/* [0x00002968] */ 0x0c6e7c40, 0x100206e7, // add ra_dma0, ra_dma0, r1 -+/* [0x00002970] */ 0x8c71ccbf, 0x10024731, // add ra_dest, ra_dest, r2 ; mov vw_setup, rb_vpm_init -+// ::mc_filter_y10_bxx -+/* [0x00002978] */ 0xfffffaf0, 0xf0f807a7, // brr ra_link, r:per_block_setup_10 -+/* [0x00002980] */ 0x959a0ff6, 0x10024023, // mov ra0, unif ; mov r3, elem_num -+/* [0x00002988] */ 0xec9c3fd2, 0x100269e5, // add.setf -, rb_ef, rb_ef ; v8subs r5rep, r2, r2 -+/* [0x00002990] */ 0x8c001cff, 0x14024800, // add r0, ra0.16b, r3 ; mov rb_xshift2, rb_xshift2_next -+/* [0x00002998] */ 0x1158bdc0, 0xd4020867, // shl r1, ra_wt_off_l0, i_wt_den_p6 -+/* [0x000029a0] */ 0x4c5a7cd6, 0x121245a0, // add ra_wt_mul_l0, ra_wt_mul_l0, r3 ; mul24 r0, r2, ra_wt_mul_l0 -+/* [0x000029a8] */ 0x4d4a7216, 0x12024860, // sub r1, r1, r0 ; mul24 r0, r2, ra_wt_mul_l1 -+/* [0x000029b0] */ 0x8d9c423f, 0x1042531d, // sub rb_wt_off, r1, r0 ; mov ra_ef.8a, rb4 -+// :1 -+/* [0x000029b8] */ 0x4c745dbe, 0x100279c4, // add.setf -, ra_ef, ra_ef ; mul24 ra4, rb5, ra_ef -+/* [0x000029c0] */ 0x93440dff, 0xd40248a1, // max r2, ra_y, 0 ; mov r1, 0 -+/* [0x000029c8] */ 0x9251e5f6, 0x1a0248a3, // min r2, r2, rb_max_y ; mov r3, ra_k1 -+/* [0x000029d0] */ 0x4c450cd7, 0xa4224462, // add ra_y, ra_y, r3 ; mul24 r2, r2, rb_pitch ; ldtmu0 -+/* [0x000029d8] */ 0x8c606cbf, 0x10024e05, // add t0s, ra_base, r2 ; mov rb5, rb6 -+/* [0x000029e0] */ 0x8e5479bf, 0x12024806, // shr r0, r4, ra_xshift ; mov rb6, rb7 -+/* [0x000029e8] */ 0x93458c47, 0xb20248a0, // max r2, ra_y2, r1 ; v8min r0, r0, rb_pmask ; ldtmu1 -+/* [0x000029f0] */ 0x8e2009f6, 0x10024847, // shr r1, r4, rb_xshift2 ; mov rb7, ra8 -+/* [0x000029f8] */ 0x925de5ce, 0x120248a1, // min r2, r2, rb_max_y ; v8min r1, r1, ra_pmax -+/* [0x00002a00] */ 0x4c450cd7, 0x12124462, // add ra_y2, ra_y2, r3 ; mul24 r2, r2, rb_pitch -+/* [0x00002a08] */ 0x8c24feb6, 0x10025f08, // add t1s, rb_base2, r2 ; mov ra8, ra9 -+/* [0x00002a10] */ 0x4c038af1, 0xd8025962, // add r5rep, r5, r3 ; mul24 r2, ra0.8a << 8, r1 << 8 @ "mul_used", 0 -+/* [0x00002a18] */ 0x5501fff0, 0x180348e2, // mov r3, rb_fir_off_h ; mul24.ifnn r2, ra0.8a, r0 -+/* [0x00002a20] */ 0x4d03f6b0, 0xda0248a3, // sub r2, r3, r2 ; mul24 r3, ra0.8b << 1, r0 << 1 @ "mul_used", 0 -+/* [0x00002a28] */ 0x40037031, 0xda0109e3, // nop ; mul24.ifn r3, ra0.8b << 9, r1 << 9 @ "mul_used", 0 -+/* [0x00002a30] */ 0x4c03e4f0, 0xdc0248a3, // add r2, r2, r3 ; mul24 r3, ra0.8c << 2, r0 << 2 @ "mul_used", 0 -+/* [0x00002a38] */ 0x40036031, 0xdc0109e3, // nop ; mul24.ifn r3, ra0.8c << 10, r1 << 10 @ "mul_used", 0 -+/* [0x00002a40] */ 0x4d03d4f0, 0xde0248a3, // sub r2, r2, r3 ; mul24 r3, ra0.8d << 3, r0 << 3 @ "mul_used", 0 -+/* [0x00002a48] */ 0x40035031, 0xde0109e3, // nop ; mul24.ifn r3, ra0.8d << 11, r1 << 11 @ "mul_used", 0 -+/* [0x00002a50] */ 0x4c07c4f0, 0xd80248a3, // add r2, r2, r3 ; mul24 r3, ra1.8a << 4, r0 << 4 @ "mul_used", 0 -+/* [0x00002a58] */ 0x40074031, 0xd80109e3, // nop ; mul24.ifn r3, ra1.8a << 12, r1 << 12 @ "mul_used", 0 -+/* [0x00002a60] */ 0x4c07b4f0, 0xda0248a3, // add r2, r2, r3 ; mul24 r3, ra1.8b << 5, r0 << 5 @ "mul_used", 0 -+/* [0x00002a68] */ 0x40073031, 0xda0109e3, // nop ; mul24.ifn r3, ra1.8b << 13, r1 << 13 @ "mul_used", 0 -+/* [0x00002a70] */ 0x4d07a4f0, 0xdc0248a3, // sub r2, r2, r3 ; mul24 r3, ra1.8c << 6, r0 << 6 @ "mul_used", 0 -+/* [0x00002a78] */ 0x40072031, 0xdc0109e3, // nop ; mul24.ifn r3, ra1.8c << 14, r1 << 14 @ "mul_used", 0 -+/* [0x00002a80] */ 0x4c0794f0, 0xde0248a3, // add r2, r2, r3 ; mul24 r3, ra1.8d << 7, r0 << 7 @ "mul_used", 0 -+/* [0x00002a88] */ 0x4c071b71, 0xde0329e3, // add.setf -, r5, r5 ; mul24.ifn r3, ra1.8d << 15, r1 << 15 @ "mul_used", 0 -+/* [0x00002a90] */ 0xffffff08, 0xf06809e7, // brr.anyn -, r:1b -+/* [0x00002a98] */ 0x4d0854fe, 0x1a0248a1, // sub r2, r2, r3 ; mul24 r1, rb5, ra2.8b -+/* [0x00002aa0] */ 0x550caffe, 0x1a024260, // mov ra9, rb10 ; mul24 r0, rb10, ra3.8b -+/* [0x00002aa8] */ 0x8f2c25f6, 0xd00242ca, // asr ra11, r2, v_bit_depth - 8 ; mov rb10, ra11 -+/* [0x00002ab0] */ 0x4d08623e, 0x1c024860, // sub r1, r1, r0 ; mul24 r0, rb6, ra2.8c -+/* [0x00002ab8] */ 0x4d08723e, 0x1e024860, // sub r1, r1, r0 ; mul24 r0, rb7, ra2.8d -+/* [0x00002ac0] */ 0x4c208237, 0x10024860, // add r1, r1, r0 ; mul24 r0, ra8, rb8 -+/* [0x00002ac8] */ 0x4c0ca23e, 0x1c024860, // add r1, r1, r0 ; mul24 r0, rb10, ra3.8c -+/* [0x00002ad0] */ 0x4c2cb237, 0x10024860, // add r1, r1, r0 ; mul24 r0, ra11, rb11 -+/* [0x00002ad8] */ 0x0d127380, 0x10020867, // sub r1, r1, ra4 -+/* [0x00002ae0] */ 0x8d9cc23f, 0x10024862, // sub r1, r1, r0 ; mov r2, rb_wt_off -+/* [0x00002ae8] */ 0x0f9c63c0, 0xd0020867, // asr r1, r1, 6 -+/* [0x00002af0] */ 0x4d591bce, 0x120269e0, // sub.setf -, r5, rb_i_tmu ; mul24 r0, r1, ra_wt_mul_l0 -+/* [0x00002af8] */ 0x55653fce, 0x140453e1, // mov.ifz rb_base2, rb_base2_next ; mul24 r1, r1, ra_kmul_add -+/* [0x00002b00] */ 0x8d4e7076, 0x10029851, // sub r1, r0, r1 ; mov.ifz ra_y_y2, ra_y_y2_next -+/* [0x00002b08] */ 0x8d692bf6, 0x1002b9d8, // sub.setf -, r5, rb_lcount ; mov.ifz ra_base, ra_base_next -+/* [0x00002b10] */ 0x8c9f8289, 0xd0024860, // add r1, r1, r2 ; mov r0, r1 << 8 -+/* [0x00002b18] */ 0x8c5e7236, 0x1c024863, // add r1, r1, r0 ; mov r3, ra_blk_height -+/* [0x00002b20] */ 0xfffffe78, 0xf06809e7, // brr.anyn -, r:1b -+/* [0x00002b28] */ 0x4f65039f, 0x18024862, // asr r1, r1, ra_wt_den_p7 ; mul24 r2, r3, rb_pitch -+/* [0x00002b30] */ 0x925f23bf, 0x12020867, // min r1, r1, ra_pmax ; mov -, vw_wait -+/* [0x00002b38] */ 0xf34003f3, 0xd2024c20, // max vpm, r1, 0 ; v8subs r0, ra_height, r3 -+/* [0x00002b40] */ 0x956e7036, 0x10126431, // mov.setf ra_height, r0 ; mov vw_setup, ra_dma0 -+/* [0x00002b48] */ 0x00000000, 0xf027c9e7, // bra.anyz -, ra_link -+/* [0x00002b50] */ 0x929dd0ff, 0x10024831, // min r0, r0, r3 ; mov vw_setup, rb_dma1 -+/* [0x00002b58] */ 0x8d7270f6, 0x10024872, // sub r1, r0, r3 ; mov vw_addr, ra_dest -+/* [0x00002b60] */ 0x119d73c0, 0xd0020867, // shl r1, r1, i_shift23 -+/* [0x00002b68] */ 0xfffffe30, 0xf0f809e7, // brr -, r:1b -+/* [0x00002b70] */ 0x0c9d2e00, 0x100214a7, // add rb_lcount, rb_lcount, r0 -+/* [0x00002b78] */ 0x0c6e7c40, 0x100206e7, // add ra_dma0, ra_dma0, r1 -+/* [0x00002b80] */ 0x8c71ccbf, 0x10024731, // add ra_dest, ra_dest, r2 ; mov vw_setup, rb_vpm_init -+// ::mc_filter_y10_b00 -+/* [0x00002b88] */ 0xfffff8e0, 0xf0f807a7, // brr ra_link, r:per_block_setup_10 -+/* [0x00002b90] */ 0x959a0ff6, 0x10024023, // mov ra0, unif ; mov r3, elem_num -+/* [0x00002b98] */ 0xec9c3fd2, 0x100269e5, // add.setf -, rb_ef, rb_ef ; v8subs r5rep, r2, r2 -+/* [0x00002ba0] */ 0x8c001cff, 0x14024800, // add r0, ra0.16b, r3 ; mov rb_xshift2, rb_xshift2_next -+/* [0x00002ba8] */ 0x00000001, 0xe00208a7, // mov r2, 1 -+/* [0x00002bb0] */ 0x8c591eb6, 0x10025461, // add rb_i_tmu, rb_i_tmu, r2 ; mov r1, ra_wt_off_mul_l0 -+/* [0x00002bb8] */ 0xf158fded, 0xd4025325, // shl rb_wt_off, ra_wt_off_l0, DENOM + 8 ; v8subs r5quad, r5, r5 -+/* [0x00002bc0] */ 0x809f8009, 0xd000d9d6, // nop ; mov.ifnz ra_wt_off_mul_l0, r1 << 8 -+// :1 -+/* [0x00002bc8] */ 0x0d9d1bc0, 0xb00229e7, // sub.setf -, r5, rb_i_tmu ; nop ; ldtmu1 -+/* [0x00002bd0] */ 0x8e4c09f6, 0xa0029851, // shr r1, r4, rb_xshift2 ; mov.ifz ra_y_y2, ra_y_y2_next ; ldtmu0 -+/* [0x00002bd8] */ 0x8e5509bf, 0x12024823, // shr r0, r4, ra_xshift ; mov r3, rb_pitch -+/* [0x00002be0] */ 0x13440dc0, 0xd40208a7, // max r2, ra_y, 0 -+/* [0x00002be8] */ 0x9269e5f6, 0x10029898, // min r2, r2, rb_max_y ; mov.ifz ra_base, ra_base_next -+/* [0x00002bf0] */ 0x4c441dd3, 0xd4224462, // add ra_y, ra_y, 1 ; mul24 r2, r2, r3 -+/* [0x00002bf8] */ 0x8c613cbf, 0x10028e0f, // add t0s, ra_base, r2 ; mov.ifz rb_base2, rb_base2_next -+/* [0x00002c00] */ 0x13440dc0, 0xd20208a7, // max r2, ra_y2, 0 -+/* [0x00002c08] */ 0x129de5c0, 0x100208a7, // min r2, r2, rb_max_y -+/* [0x00002c10] */ 0x4c441dd3, 0xd2124462, // add ra_y2, ra_y2, 1 ; mul24 r2, r2, r3 -+/* [0x00002c18] */ 0x8c5cfe86, 0x12024f20, // add t1s, rb_base2, r2 ; v8min r0, r0, ra_pmax -+/* [0x00002c20] */ 0x545983c6, 0x12024860, // and r1, r1, rb_pmask ; mul24 r0, r0, ra_wt_mul_l0 -+/* [0x00002c28] */ 0x4d492bce, 0x120269e1, // sub.setf -, r5, rb_lcount ; mul24 r1, r1, ra_wt_mul_l1 -+/* [0x00002c30] */ 0xcc52706e, 0x1a024865, // add r1, r0, r1 ; v8adds r5rep, r5, ra_k1 -+/* [0x00002c38] */ 0x915c83f6, 0xdc024863, // shl r1, r1, 8 ; mov r3, ra_blk_height -+/* [0x00002c40] */ 0xec40c3f3, 0x12024860, // add r1, r1, rb_wt_off ; v8subs r0, ra_height, r3 -+/* [0x00002c48] */ 0xffffff60, 0xf06809e7, // brr.anyn -, r:1b -+/* [0x00002c50] */ 0x0f9d03c0, 0xd0020867, // asr r1, r1, (DENOM + 9) - 32 -+/* [0x00002c58] */ 0x925f23bf, 0x12020867, // min r1, r1, ra_pmax ; mov -, vw_wait -+/* [0x00002c60] */ 0x5351039f, 0x18024c22, // max vpm, r1, ra_k0 ; mul24 r2, r3, rb_pitch -+/* [0x00002c68] */ 0x956e7036, 0x10126431, // mov.setf ra_height, r0 ; mov vw_setup, ra_dma0 -+/* [0x00002c70] */ 0x00000000, 0xf027c9e7, // bra.anyz -, ra_link -+/* [0x00002c78] */ 0x929dd0ff, 0x10024831, // min r0, r0, r3 ; mov vw_setup, rb_dma1 -+/* [0x00002c80] */ 0x8d7270f6, 0x10024872, // sub r1, r0, r3 ; mov vw_addr, ra_dest -+/* [0x00002c88] */ 0x119d73c0, 0xd0020867, // shl r1, r1, i_shift23 -+/* [0x00002c90] */ 0xffffff18, 0xf0f809e7, // brr -, r:1b -+/* [0x00002c98] */ 0x0c9d2e00, 0x100214a7, // add rb_lcount, rb_lcount, r0 -+/* [0x00002ca0] */ 0x0c6e7c40, 0x100206e7, // add ra_dma0, ra_dma0, r1 -+/* [0x00002ca8] */ 0x8c71ccbf, 0x10024731, // add ra_dest, ra_dest, r2 ; mov vw_setup, rb_vpm_init -+// ::mc_end -+}; -+#ifdef __HIGHC__ -+#pragma Align_to(8, ff_hevc_rpi_shader) -+#endif ---- /dev/null -+++ b/libavcodec/rpi_hevc_shader.h -@@ -0,0 +1,63 @@ -+#ifndef rpi_hevc_shader_H -+#define rpi_hevc_shader_H -+ -+extern unsigned int ff_hevc_rpi_shader[]; -+ -+#define mc_setup_c_q0 (ff_hevc_rpi_shader + 0) -+#define mc_start (ff_hevc_rpi_shader + 0) -+#define mc_setup_c_qn (ff_hevc_rpi_shader + 2) -+#define mc_filter_c_p (ff_hevc_rpi_shader + 134) -+#define mc_filter_c_p_l1 (ff_hevc_rpi_shader + 260) -+#define mc_filter_c_b (ff_hevc_rpi_shader + 386) -+#define mc_sync_q0 (ff_hevc_rpi_shader + 580) -+#define mc_sync_q1 (ff_hevc_rpi_shader + 598) -+#define mc_sync_q2 (ff_hevc_rpi_shader + 610) -+#define mc_sync_q3 (ff_hevc_rpi_shader + 622) -+#define mc_sync_q4 (ff_hevc_rpi_shader + 634) -+#define mc_sync_q5 (ff_hevc_rpi_shader + 652) -+#define mc_sync_q6 (ff_hevc_rpi_shader + 664) -+#define mc_sync_q7 (ff_hevc_rpi_shader + 676) -+#define mc_sync_q8 (ff_hevc_rpi_shader + 688) -+#define mc_sync_q9 (ff_hevc_rpi_shader + 706) -+#define mc_sync_q10 (ff_hevc_rpi_shader + 718) -+#define mc_sync_q11 (ff_hevc_rpi_shader + 730) -+#define mc_exit_c_qn (ff_hevc_rpi_shader + 742) -+#define mc_exit_y_qn (ff_hevc_rpi_shader + 742) -+#define mc_exit_c_q0 (ff_hevc_rpi_shader + 760) -+#define mc_exit_y_q0 (ff_hevc_rpi_shader + 760) -+#define mc_setup_y_q0 (ff_hevc_rpi_shader + 780) -+#define mc_setup_y_qn (ff_hevc_rpi_shader + 782) -+#define mc_filter_y_pxx (ff_hevc_rpi_shader + 1014) -+#define mc_filter_y_bxx (ff_hevc_rpi_shader + 1140) -+#define mc_filter_y_p00 (ff_hevc_rpi_shader + 1272) -+#define mc_filter_y_b00 (ff_hevc_rpi_shader + 1358) -+#define mc_setup_c10_q0 (ff_hevc_rpi_shader + 1432) -+#define mc_setup_c10_qn (ff_hevc_rpi_shader + 1434) -+#define mc_filter_c10_p (ff_hevc_rpi_shader + 1562) -+#define mc_filter_c10_p_l1 (ff_hevc_rpi_shader + 1684) -+#define mc_filter_c10_b (ff_hevc_rpi_shader + 1806) -+#define mc_sync10_q0 (ff_hevc_rpi_shader + 1996) -+#define mc_sync10_q1 (ff_hevc_rpi_shader + 2014) -+#define mc_sync10_q2 (ff_hevc_rpi_shader + 2026) -+#define mc_sync10_q3 (ff_hevc_rpi_shader + 2038) -+#define mc_sync10_q4 (ff_hevc_rpi_shader + 2050) -+#define mc_sync10_q5 (ff_hevc_rpi_shader + 2068) -+#define mc_sync10_q6 (ff_hevc_rpi_shader + 2080) -+#define mc_sync10_q7 (ff_hevc_rpi_shader + 2092) -+#define mc_sync10_q8 (ff_hevc_rpi_shader + 2104) -+#define mc_sync10_q9 (ff_hevc_rpi_shader + 2122) -+#define mc_sync10_q10 (ff_hevc_rpi_shader + 2134) -+#define mc_sync10_q11 (ff_hevc_rpi_shader + 2146) -+#define mc_exit_c10_q0 (ff_hevc_rpi_shader + 2158) -+#define mc_exit_y10_q0 (ff_hevc_rpi_shader + 2158) -+#define mc_exit_c10_qn (ff_hevc_rpi_shader + 2178) -+#define mc_exit_y10_qn (ff_hevc_rpi_shader + 2178) -+#define mc_setup_y10_q0 (ff_hevc_rpi_shader + 2196) -+#define mc_setup_y10_qn (ff_hevc_rpi_shader + 2198) -+#define mc_filter_y10_pxx (ff_hevc_rpi_shader + 2440) -+#define mc_filter_y10_p00 (ff_hevc_rpi_shader + 2566) -+#define mc_filter_y10_bxx (ff_hevc_rpi_shader + 2654) -+#define mc_filter_y10_b00 (ff_hevc_rpi_shader + 2786) -+#define mc_end (ff_hevc_rpi_shader + 2860) -+ -+#endif ---- /dev/null -+++ b/libavcodec/rpi_hevc_shader.qasm -@@ -0,0 +1,1850 @@ -+# Copyright (c) 2017 Raspberry Pi (Trading) Ltd. -+# All rights reserved. -+# -+# Redistribution and use in source and binary forms, with or without -+# modification, are permitted provided that the following conditions are met: -+# * Redistributions of source code must retain the above copyright -+# notice, this list of conditions and the following disclaimer. -+# * Redistributions in binary form must reproduce the above copyright -+# notice, this list of conditions and the following disclaimer in the -+# documentation and/or other materials provided with the distribution. -+# * Neither the name of the copyright holder nor the -+# names of its contributors may be used to endorse or promote products -+# derived from this software without specific prior written permission. -+# -+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+# -+# Written by Peter de Rivaz, John Cox -+ -+ -+ -+# Inter pred asm -+# -+# Logic here should be good to 14 bits without modification -+# but only 8 & 10 are currently instantiated & tested -+# 15 & 16 bits have different shift1, shift2 calc & I also suspect overflow -+# in _p00 & _b00 -+ -+# The @ "mul_used", 0 annotations that occur by various mul blocks suppress -+# the warning that we are using rotation & ra/rb registers. r0..3 can be -+# rotated through all 16 elems ra regs can only be rotated through their -+# local 4. As it happens this is what is wanted here as we do not want the -+# constants from the other half of the calc. -+ -+# Number limits in P/B calculation -+# -+# In order to avoid issues with mul24 being an unsigned 24->32 bit multiplier -+# we offset our intermediates s.t. they always end up +ve before the next -+# multiply (may be -ve whilst summing but that doesn't matter). -+# -+# Range calc for up to 14 bits (Y-B pred): -+# -+# denom: [0, 7] -+# bmax = (1 << bits) - 1 -+# off: [-(1 << (bits-1)), (1 << (bits-1)) - 1] -+# -+# wt_mul: [-128, 255] -+# wt_off = off * 2 + 1: [-bmax, bmax] -+# -+# pel: [0, bmax] -+# H-filter: [(-22*pel + 88*pel) >> (bits-8) + 0x4000] = [0x2a00, 0x97ff] -+# V-filter: [(-22*hf + 88*hf) >> 6] = [0x580, 0xc28e] -+# mul_t = (V_L0 + V_l1) * (wt_mul + 128): [0, 0x24624e6] -+# mul_t - (V_l0 + V_l1)* 128: [-0xc28e00, 0x18396e4] -+# adj_wt_off = (wt_off << ((denom + 6) - (bits - 8))) - 0x4000 * (wt_mul * 2): -+# [wt_off << (21 - bits)] - [wt_mul << 15] = [-0x1fffff, 0x1fffff] - [-0x400000, 0x7f8000] -+# -+# This all looks good and is mostly bit depth independant - and as we manage -+# to do unsigned multiplies everywhere (now) this should be good for any bit -+# depth up to 14 (we could probably do 16 - but that requires a few tweaks -+# to the shifts we don't currently have logic for) -+ -+# PREREAD is the number of requests that we have sitting in the TMU request -+# queue. -+# -+# There are 8 slots availible in the TMU request Q for tm0s requests, but -+# only 4 output FIFO entries and overflow is bad (corruption or crash) -+# (If threaded then only 2 out FIFO entries, but we aren't.) -+# In s/w we are effectively limited to the min vertical read which is >= 4 -+# so output FIFO is the limit. -+# -+# As the test for read-next is is the main part of the Luma loop (rather than -+# the preload FIFO part) we are limited to min_luma_height - 1 -+# Min_luma_height is 4 so we can only have a preload of 3 -+# Beware that min_chroma_height (and_width) is 2 so we can't do the same trick -+# in chroma without abandoning preload pretty much entirely (which would be bad) -+# -+# Timing tests vs preload of 4 suggests this doesn't hurt us much -+# Could have preread 4 for Chroma but when tested it didn't help -+ -+.set PREREAD, 3 -+ -+# Offset added (effectively) at the exit of the H FIR filter -+# This is enough to force the result +ve -+# Is good if it is a power of 2 as that allows for >> without loss -+# -+# Worst case for a single Y FIR is *-22 so we need an offset of 256*22 -+# But we need twice offset to survive both H & V = 256*22*2 = 0x2c00 -+# Round up to next power of 2 -+ -+.set FIR_OFFSET, 0x4000 -+ -+# Block heights - 8 & 16 are the only numbers we currently support -+ -+.set C_BLK_HEIGHT_8, 16 -+.set C_BLK_HEIGHT_16, 8 -+.set Y_BLK_HEIGHT_8, 16 -+.set Y_BLK_HEIGHT_16, 8 -+ -+# QPU counts - depend on block size -+# If we have a 2-byte format & block_size > 8 then can only afford -+# 8 QPUs -+# These numbers must match the numbers in ff_hevc_rpi_shader_cmd.h -+ -+.set N_QPU_8, 12 -+.set N_QPU_16, 12 -+ -+# Value to add to the weight multiplier to convert it into an unsigned value -+# Should be power of two for convienience -+ -+.set LOG2_MUL_ADD, 14 -+.set MUL_ADD, (1 << LOG2_MUL_ADD) -+ -+# Fixed denom (max that it can be set to) -+.set DENOM, 7 -+ -+# register allocation -+# -+ -+# ra0-3 -+# Used as temp and may be loop filter coeffs (split into .8s) -+# or temp in loop. Check usage on an individual basis. -+ -+# ra4-11 -+# V FIFO / temp / free -+ -+# -- free -- ra12 -+ -+# -- free -- ra13 -+ -+# -- free -- ra14 -+ -+# -- free -- ra15 -+ -+# uniform: width:height -+.set ra_width_height, ra16 -+.set ra_width, ra16.16b -+.set ra_height, ra16.16a -+ -+# y:y2 same layout as y_y2_next so we can update both together -+.set ra_y_y2, ra17 -+.set ra_y2, ra17.16a -+.set ra_y, ra17.16b -+ -+# uniform: L1 weight (U on left, V on right) -+# Only used in Y B -+.set ra_wt_off_mul_l1, ra18 -+.set ra_wt_off_l1, ra18.16b -+.set ra_wt_mul_l1, ra18.16a -+ -+# y_next:y2_next same layout as y_y2 so we can update both together -+.set ra_y_y2_next, ra19 -+.set ra_y_next, ra19.16b -+.set ra_y2_next, ra19.16a -+ -+# Setup: consts - subdivide a single register -+.set ra_kff800100, ra20 -+.set ra_k256, ra20.16a -+.set ra_k0, ra20.8a -+.set ra_k1, ra20.8b -+.set ra_k128, ra20.8c -+.set ra_k255, ra20.8d -+ -+# Loop: xshifts -+.set ra_xshift, ra21.16a -+.set ra_xshift_next, ra21.16b -+ -+# Loop var: L0 weight (U on left, V on right) -+# _off_ is not used in loop as we want to modify it before use -+.set ra_wt_off_mul_l0, ra22 -+.set ra_wt_mul_l0, ra22.16a -+.set ra_wt_off_l0, ra22.16b -+ -+# Max pel value (for 8 bit we can get away with sat ops but not 9+) -+# * Could merge with rb_pmask. For 10 bit Logically pmask needs 0xff in the -+# 2nd byte but as the source should never be > 3 there 0x3ff should do -+.set ra_blk_height_pmax, ra23 -+.set ra_pmax, ra23.16a -+.set ra_blk_height, ra23.8c -+# --free -- ra23.8d -+ -+# Loop: src frame base (L0) -+.set ra_base, ra24 -+ -+# Misc offsets -+.set ra_fir_off_val_wt_den_p7, ra25 -+.set ra_wt_den_p7, ra25.8a -+# -- free -- ra25.8b -+.set ra_fir_off_val, ra25.16b -+ -+# As it happens these constants are the same -+.if FIR_OFFSET == MUL_ADD -+# Weight multiplier unsigned add -+.set ra_kmul_add, ra_fir_off_val -+.else -+.error "FIR_OFFSET != MUL_ADD: Need new register & init" -+.endif -+ -+# Loop: next src frame base (L0) -+.set ra_base_next, ra26 -+ -+# Loop: height<<23 + width<<16 + vdw_setup_0 -+.set ra_dma0, ra27 -+ -+# Loop: destination address -+.set ra_dest, ra28 -+ -+# Setup: Dup of rb_ef -+# Lo bits are used as Y coeff 0 as that lefts us combine test & coeff mul -+# (top bits are ignored by mul24) -+.set ra_ef, ra29 -+ -+# Use an even numbered register as a link register to avoid corrupting flags -+.set ra_link, ra30 -+ -+# -- free -- ra31 -+ -+.set rb_xshift2, rb0 -+.set rb_xshift2_next, rb1 -+ -+# C: (elem & 1) == 0 ? elem * 2 : (elem + 4) * 2 -+.set rb_elem_x, rb2 -+ -+# El Flags -+# After adding to self we to have el even/odd on nc/c and lo/hi on nn/n -+# Duped into ra_ef as sometimes that is easier to use -+.set rb_ef, rb3 -+ -+# rb4-11 -+# Loop: V filter FIFO or V filter coeff -+ -+# Loop var: offset to add before shift (round + weighting offsets) -+# Exact value varies by loop -+.set rb_wt_off, rb12 -+ -+# -- free -- rb13 -+ -+# -- free -- rb14 -+ -+# Loop: src frame base (L1) -+.set rb_base2, rb15 -+ -+# Line pitch (128 for sand128) -+.set rb_pitch, rb16 -+ -+# Loop count - 2 (set up TMU for next xfer) -+.set rb_i_tmu, rb17 -+ -+# Loop count for min(height, 16) -+# Y will reset & loop again if height > 16 -+.set rb_lcount, rb18 -+ -+# frame_base2_next -+.set rb_base2_next, rb19 -+ -+# Setup: Height of Y+C in sand, (x&mask)*xpitch will give -+# offset to the slice -+.set rb_xpitch, rb20 -+ -+# These 3 consts each save 1 instruction in Y loop setup -+# so whilst they are worthwhile they should be the 1st to die if we need -+# another b reg -+.set rb_y_coeffs_2, rb21 # 0x050b0a00 -+.set rb_y_coeffs_3, rb22 # 0x11283a40 -+.set rb_y_coeffs_5, rb23 # 0x0a0b0500 -+ -+# Setup: 0xff (8-bit) / 0xffff (9+ bit) -+.set rb_pmask, rb24 -+ -+# vdw_setup_1(dst_pitch) -+.set rb_dma1_base, rb25 -+ -+# Setup: pic width - 1 -+# In bytes so 8 bit luma is (width - 1)*1, 16 bit chroma is (width -1)*4 etc. -+.set rb_max_x, rb26 -+ -+# vdw_setup_0 (depends on QPU number) -+.set rb_dma0_base, rb27 -+ -+# Setup: vw_setup value to reset VPM write pointer -+.set rb_vpm_init, rb28 -+ -+# Loop: vdw_setup_1(dst_pitch-width) = stride -+.set rb_dma1, rb29 -+ -+# Setup: pic_height - 1 -+.set rb_max_y, rb30 -+ -+# Setup: FIR H offset -+.set rb_fir_off_h, rb31 -+ -+ -+# With shifts only the bottom 5 bits are considered so -16=16, -15=17 etc. -+.set i_shift16, -16 -+.set i_shift21, -11 -+.set i_shift23, -9 -+.set i_shift30, -2 -+ -+# Much of the setup code is common between Y & C -+# Macros that express this - obviously these can't be overlapped -+# so are probably unsuitable for loop code -+ -+.macro m_calc_dma_regs, v_bit_depth, v_blk_height, r_vpm, r_dma -+ mov r2, qpu_num -+.if v_bit_depth <= 8 -+ # 8 bit version -+ asr r1, r2, 2 -+ shl r1, r1, 6 -+ and r0, r2, 3 -+ or r0, r0, r1 -+ -+ mov r1, vpm_setup(0, 4, h8p(0, 0)) # 4 is stride - stride acts on ADDR which is Y[5:0],B[1:0] for 8 bit -+ add r_vpm, r0, r1 # VPM 8bit storage -+ -+ mov r1, vdw_setup_0(0, 0, dma_h8p(0,0,0)) # height,width added later -+ shl r0, r0, 5 -+ -+.else -+ # 16 bit version -+ # Limited to 8 QPUs if blk height > 8 -+ asr r1, r2, 1 -+.if v_blk_height <= 8 -+ shl r1, r1, 4 -+.else -+ shl r1, r1, 5 -+.endif -+ and r0, r2, 1 -+ or r0, r0, r1 -+ -+ mov r1, vpm_setup(0, 2, h16p(0, 0)) # 2 is stride - stride acts on ADDR -+ add r_vpm, r0, r1 -+ -+ # X = H * 8 so the YH from VPMVCD_WR_SETUP[ADDR] drops into -+ # XY VPMVCD_WR_SETUP[VPMBASE] if shifted left 3 (+ 3 for pos of field in reg) -+ mov r1, vdw_setup_0(0, 0, dma_h16p(0,0,0)) # height,width added later -+ shl r0, r0, 6 -+.endif -+ add r_dma, r0, r1 # DMA out -+.endm -+ -+ -+.macro m_setup_q0 -+ srel -, 12 -+.endm -+ -+# Code start label -+::mc_start -+ -+################################################################################ -+# mc_setup_c -+# -+# typedef struct qpu_mc_pred_c_s_s { -+# int16_t y; -+# int16_t x; -+# uint32_t base; -+# uint32_t pic_cw; // C Width (== Y width / 2) -+# uint32_t pic_ch; // C Height (== Y Height / 2) -+# uint32_t stride2; -+# uint32_t stride1; -+# uint32_t wdenom; -+# int16_t y2; -+# int16_t x2; -+# uint32_t base2; -+# uint32_t next_fn; -+# } qpu_mc_pred_c_s_t; -+ -+.macro m_setup_c, v_bit_depth -+ -+# Cannot use mul24 on x as x might be -ve, so must use shift -+.if v_bit_depth <= 8 -+.set v_x_shift, 1 -+.set v_pmask, 0xff -+.set v_blk_height, C_BLK_HEIGHT_8 -+.else -+.set v_x_shift, 2 -+.set v_pmask, 0xffff -+.set v_blk_height, C_BLK_HEIGHT_16 -+.endif -+ -+ mov tmurs, 1 ; mov ra0, unif # No TMU swap ; x_y -+ -+ mov r0, [0,2,0,2,0,2,0,2,1,3,1,3,1,3,1,3] -+ shl rb_ef, r0, i_shift30 ; mov ra_base, unif # ; ref_c_base -+ -+# Read image dimensions -+ sub r0, unif, 1 # pic c width -+ shl rb_max_x, r0, v_x_shift # rb_max_x in bytes -+ sub rb_max_y, unif, 1 # pic c height -+ -+# load constants -+ mov ra_kff800100, 0xff800100 -+ mov rb_pmask, v_pmask -+ mov ra_blk_height_pmax, ((1 << v_bit_depth) - 1) | (v_blk_height << 16) -+ mov rb_fir_off_h, (FIR_OFFSET << (v_bit_depth - 8)) -+ mov ra_fir_off_val_wt_den_p7, (FIR_OFFSET << 16) | (DENOM + 15 - v_bit_depth) -+ -+# get source pitch -+ mov ra_ef, rb_ef ; mov rb_xpitch, unif # ; stride2 -+ mov rb_pitch, unif # stride1 -+ mov r1, vdw_setup_1(0) # [rb_pitch delay] Merged with dst_stride shortly -+ add rb_dma1_base, r1, rb_pitch # vdw_setup_1 -+ -+ and r0, 1, elem_num -+ nop ; mul24 r0, r0, 5 -+.if v_bit_depth <= 8 -+ add rb_elem_x, r0, elem_num -+.else -+ add r0, r0, elem_num -+ add rb_elem_x, r0, r0 -+.endif -+ -+# Compute base address for first and second access -+# ra_base ends up with t0s base -+# ra_base2 ends up with t1s base -+ -+ shl r0, ra0.16b, v_x_shift # [rb_elem_x delay] -+ add r0, r0, rb_elem_x # Add elem no to x to get X for this slice -+ max r0, r0, 0 ; mov ra_y, ra0.16a # ; stash Y -+ min r0, r0, rb_max_x -+ -+# Get shift -+# Shift will always calculate as 0 for 9+ bit -+# Ideally we can optimize the shift out of the code in these cases but for now -+# it is tidier to leave it in -+.if v_bit_depth <= 8 -+ shl ra_xshift_next, r0, 3 -+.else -+ mov ra_xshift_next, 0 ; mov rb_xshift2_next, 0 -+.endif -+ -+# In a single 32 bit word we get 1 or 2 UV pairs so mask bottom bits of xs if we need to -+ -+.if v_bit_depth <= 8 -+ and r0, r0, -4 -+.endif -+ sub r1, ra_k0, rb_pitch -+ and r1, r0, r1 -+ xor r0, r0, r1 ; mul24 r1, r1, rb_xpitch -+ add r0, r0, r1 ; mov ra0, unif # ; next_x2_y2 -+ add ra_base, ra_base, r0 -+ -+# Compute part of VPM to use for DMA output -+# * We only get 8 QPUs if 16 bit - maybe reduce height and auto-loop? -+ m_calc_dma_regs v_bit_depth, v_blk_height, rb_vpm_init, rb_dma0_base -+ -+# And again for L1, but only worrying about frame2 stuff -+ -+# Compute base address for first and second access -+# ra_base ends up with t0s base -+# rb_base2 ends up with t1s base -+ -+ shl r0, ra0.16b, v_x_shift -+ add r0, r0, rb_elem_x ; mov ra_y2, ra0.16a # Add QPU slice offset -+ max r0, r0, 0 ; mov rb_base2, unif # ref_c_base2 -+ min r0, r0, rb_max_x -+ -+# Get shift (already zero if 9+ bit so ignore) -+.if v_bit_depth <= 8 -+ shl rb_xshift2_next, r0, 3 -+.endif -+ -+# In a single 32 bit word we get 2 UV pairs so mask bottom bit of xs -+ -+.if v_bit_depth <= 8 -+ and r0, r0, -4 -+.endif -+ sub r1, ra_k0, rb_pitch -+ and r1, r0, r1 ; mov r3, PREREAD -+ xor r0, r0, r1 ; mul24 r1, r1, rb_xpitch -+ add r0, r0, r1 ; mov r2, ra_y2 -+ add rb_base2, rb_base2, r0 ; mov r0, ra_y -+ -+# Do preloads -+# r0 = ra_y, r2 = ra_y2, r3 = PREREAD -+ -+:1 -+ sub.setf r3, r3, 1 -+ max r1, r0, 0 -+ min r1, r1, rb_max_y -+ add r0, r0, ra_k1 ; mul24 r1, r1, rb_pitch -+ add t0s, ra_base, r1 ; mov ra_y, r0 -+ -+ max r1, r2, 0 -+ brr.anynz -, r:1b -+ min r1, r1, rb_max_y -+ add r2, r2, ra_k1 ; mul24 r1, r1, rb_pitch -+ add t1s, rb_base2, r1 ; mov ra_y2, r2 -+# >>> .anynz 1b -+ -+ mov ra_link, unif # link -+# touch registers to keep simulator happy (and fills in delay slots) -+ mov ra4, 0 ; mov rb4, 0 -+ bra -, ra_link -+ mov ra5, 0 ; mov rb5, 0 -+ mov ra6, 0 ; mov rb6, 0 -+ mov ra7, 0 ; mov rb7, 0 -+# >>> ra_link -+.endm -+ -+::mc_setup_c_q0 -+ m_setup_q0 -+::mc_setup_c_qn -+ m_setup_c 8 -+ -+################################################################################ -+# -+# mc_filter_c_p -+# -+# typedef struct qpu_mc_pred_c_p_s { -+# int16_t y; -+# int16_t x; -+# uint32_t base; -+# uint16_t h; -+# uint16_t w; -+# uint32_t coeffs_x; -+# uint32_t coeffs_y; -+# uint32_t wo_u; -+# uint32_t wo_v; -+# uint32_t dst_addr_c; -+# uint32_t next_fn; -+# } qpu_mc_pred_c_p_t; -+ -+.macro m_filter_c_p, v_tmu, v_bit_depth -+ -+.if v_bit_depth <= 8 -+.set v_x_shift, 1 -+.set v_x_mul, 2 -+.set v_v_shift, 8 -+# Shifts to get width & height in the right place in rb_dma0 -+.set v_dma_h_shift, 7 -+.set v_dma_wh_shift, i_shift16 -+.else -+.set v_x_shift, 2 -+.set v_x_mul, 4 -+.set v_v_shift, i_shift16 -+# Shifts to get width & height in the right place in rb_dma0 -+.set v_dma_h_shift, 8 -+.set v_dma_wh_shift, 15 -+.endif -+ -+.if v_tmu == 0 -+.set vrx_xshift, rb_xshift2 # b side more convienient -+.set vrx_xshift_next, ra_xshift_next -+.set vra_y_next, ra_y_next -+.set vrx_base_next, ra_base_next -+.set vra_y, ra_y -+.set vra_base, ra_base -+.set vr_txs, t0s -+.else -+.set vrx_xshift, ra_xshift # a side more convienient -+.set vrx_xshift_next, rb_xshift2_next -+.set vra_y_next, ra_y2_next -+.set vrx_base_next, rb_base2_next -+.set vra_y, ra_y2 -+.set vra_base, rb_base2 -+.set vr_txs, t1s -+.endif -+ -+# denom shift values -+.set i_wt_den_p5, (DENOM + 13 - v_bit_depth) -+.set i_wt_den_p6, (DENOM + 14 - v_bit_depth) -+ -+# per-channel shifts were calculated on the *previous* invocation -+# get base addresses and per-channel shifts for *next* invocation -+ mov vw_setup, rb_vpm_init ; mov ra2, unif # ; x_y -+ -+ add.setf -, rb_ef, rb_ef ; mov r3, unif # [ra2 delay] ; base -+ -+ shl r0, ra2.16b, v_x_shift ; v8subs r5rep, r0, r0 # r5 = 0 -+ add r0, r0, rb_elem_x ; mov ra_width_height, unif # r1=pitch2 mask ; width_height -+ sub r1, r5, rb_pitch ; mov ra0, unif # ; H filter coeffs -+ max r0, r0, r5 ; mov vrx_xshift, vrx_xshift_next -+ min r0, r0, rb_max_x ; mov vra_y_next, ra2.16a -+ -+.if v_bit_depth <= 8 -+ shl vrx_xshift_next, r0, 3 -+ and r0, r0, -4 -+.endif -+ and r1, r0, r1 ; mul24 r2, ra_width, v_x_mul # r2=w*2 (we are working in pel pairs) ** x*2 already calced! -+ xor r0, r0, r1 ; mul24 r1, r1, rb_xpitch -+ add r0, r0, r1 ; mov ra3, unif # ; V filter coeffs -+ add vrx_base_next, r3, r0 ; mov r1, ra_height -+ -+# set up VPM write -+ sub rb_dma1, rb_dma1_base, r2 ; mov ra_wt_off_mul_l0, unif # Compute vdw_setup1(dst_pitch-width) ; U offset/weight -+ add rb_i_tmu, r1, (3-4) - PREREAD ; v8min r1, r1, ra_blk_height -+ add rb_lcount, r1, (3-4) ; mov.ifc ra_wt_off_mul_l0, unif # ; V offset/weight -+ -+# Misc final setup... -+ -+ shl r0, r1, v_dma_h_shift ; mov ra_dest, unif # ; dst_addr -+ add r0, r0, r2 ; mov r2, ra_fir_off_val # Combine width and height of destination area (r0=h<<8, r2=w*2) -+ shl r0, r0, v_dma_wh_shift ; mov rb10, ra3.8c # Shift into bits 16 upwards of the vdw_setup0 register -+ add ra_dma0, r0, rb_dma0_base ; mov r1, ra_wt_off_l0 # ; r1=weight -+ shl r1, r1, i_wt_den_p5 ; mul24 r0, r2, ra_wt_mul_l0 -+ sub rb_wt_off, r1, r0 ; mov r0, ra_kmul_add -+ add ra_wt_mul_l0, ra_wt_mul_l0, r0 ; mov r5rep, -4 # ; loop counter (V FIFO fill = 4) -+ mov rb11, ra3.8d ; mov ra_link, unif # ; Link -+ -+# r5 = -4 (loop counter) -+# ra_wt_mul_l0 = weight L0 + 128 (now unsigned) -+# rb_wt_off = (offset * 2 + 1) << (wt_den + 5) -+# rb31 = FIR value offset -+ -+# FIFO: rb4, ra5, rb6, ra7 -+# Coeffs in ra3.8a, ra3.8b, rb10, rb11 -+ -+# We want (r0r1) -+# U0U3 : V0V3 : U1U4 : V1V4 : U2U5 : V2U5 : ... -+# We fetch (after shift) -+# C0 : C3 : C1 : C4 : C2 : C5 : ... -+ -+:1 -+# retrieve texture results and pick out bytes -+# then submit two more texture requests -+ -+.if v_tmu == 0 -+ sub.setf -, r5, rb_i_tmu ; mov rb4, ra5 ; ldtmu0 -+ shr r2, r4, vrx_xshift ; mov.ifz r3, vra_y_next -+ shr r1, r2, v_v_shift ; mov.ifnz r3, vra_y -+ add.setf -, rb_ef, rb_ef ; mov.ifz vra_base, vrx_base_next -+.else -+ sub.setf -, r5, rb_i_tmu ; mov rb4, ra5 ; ldtmu1 -+ shr r2, r4, vrx_xshift ; mov.ifz vra_base, vrx_base_next -+ shr r1, r2, v_v_shift ; mov.ifnz r3, vra_y -+ add.setf -, rb_ef, rb_ef ; mov.ifz r3, vra_y_next # [r1 << delay] -+.endif -+ -+ add vra_y, r3, ra_k1 ; mov r0, r1 << 15 -+ max r3, r3, ra_k0 ; mov.ifnc r1, r2 << 1 -+ min r3, r3, rb_max_y ; mov.ifnc r0, r2 -+ -+ and r1, r1, ra_pmax ; mul24 r3, r3, rb_pitch -+.if v_tmu == 0 -+ add vr_txs, vra_base, r3 ; v8min r0, r0, rb_pmask # ; mask bytes -+.else -+ add vr_txs, vra_base, r3 ; v8min r0, r0, ra_pmax # ; mask bytes -+.endif -+ -+# apply horizontal filter -+# The filter coeffs for the two halves of this are the same (unlike in the -+# Y case) so it doesn't matter which ra0 we get them from -+# Also as the two halves are locked together we don't need to separate the 1st -+# r0 mul or the last r1 mul as they are valid for all QPUs -+ -+ add r5rep, r5, 1 ; mul24 r3, ra0.8a, r0 -+ sub r2, rb_fir_off_h, r3 ; mul24 r3, ra0.8d, r1 -+ sub r2, r2, r3 ; mul24 r3, ra0.8b << 2, r0 << 2 @ "mul_used", 0 -+ nop ; mul24.ifn r3, ra0.8b << 12, r1 << 12 @ "mul_used", 0 -+ add r2, r2, r3 ; mul24 r3, ra0.8c << 4, r0 << 4 @ "mul_used", 0 -+ add.setf -, r5, r5 ; mul24.ifn r3, ra0.8c << 14, r1 << 14 @ "mul_used", 0 -+ -+# V filter = - r4 * a + r5 * b + r6 * c - r7 * d (post FIFO shift) -+# We would like to save the r5->r4 shift but we need a delay slot -+# for both r7 & r6 which we can't find anything to put in if we have -+# already multiplied r4 & r5! -+ brr.anyn -, r:1b -+ add r2, r2, r3 ; mul24 r0, ra7, rb10 # r6 post -+ mov ra5, rb6 ; mul24 r1, rb6, ra3.8b # r5 post -+ asr ra7, r2, v_bit_depth - 8 ; mov rb6, ra7 -+# >>> .anyn 1b -+ -+ add r1, r1, r0 ; mul24 r0, rb4, ra3.8a # [ra7 delay] -+ sub r1, r1, r0 ; mul24 r0, ra7, rb11 -+ sub r1, r1, r0 -+ -+ asr r1, r1, 6 ; mov r3, ra_blk_height # ; NxtLoop -+ sub.setf -, r5, rb_lcount ; mul24 r0, r1, ra_wt_mul_l0 -+ add r0, r0, rb_wt_off ; mul24 r1, r1, ra_kmul_add -+ sub r1, r0, r1 ; v8subs r0, ra_height, r3 # ; NxtLoop -+ brr.anyn -, r:1b -+ asr r1, r1, i_wt_den_p6 -+ min r1, r1, ra_pmax ; mov -, vw_wait -+ max vpm, r1, ra_k0 ; mul24 r2, r3, rb_pitch # ; NxtLoop -+# >>> .anyn 1b -+ -+# r0 = remaining height (min 0) -+# r2 = r3 * rb_pitch -+# r3 = block_height -+ -+# If looping again then we consumed 16 height last loop -+# rb_dma1 (stride) remains constant -+# rb_i_tmu remains const (based on total height) -+# recalc ra_dma0, rb_lcount based on new segment height -+ -+ mov.setf ra_height, r0 ; mov vw_setup, ra_dma0 # VDW setup 0 -+ -+# DMA out -+ bra.anyz -, ra_link -+ min r0, r0, r3 ; mov vw_setup, rb_dma1 # Stride -+ sub r1, r0, r3 ; mov vw_addr, ra_dest # start the VDW -+ shl r1, r1, i_shift23 -+# >>> .anyz ra_link -+ -+# Here r1 = cur_blk_height - 16 so it will be 0 or -ve -+# We add to dma0 to reduce the number of output lines in the final block -+ brr -, r:1b -+ add rb_lcount, rb_lcount, r0 -+ add ra_dma0, ra_dma0, r1 -+ add ra_dest, ra_dest, r2 ; mov vw_setup, rb_vpm_init # ; Reset our VDM write pointer -+# >>> 1b -+.endm -+ -+::mc_filter_c_p -+ m_filter_c_p 0, 8 -+ -+::mc_filter_c_p_l1 -+ m_filter_c_p 1, 8 -+ -+################################################################################ -+# -+# mc_filter_c_b -+# -+# typedef struct qpu_mc_pred_c_b_s { -+# int16_t y; -+# int16_t x; -+# uint32_t base; -+# uint16_t h; -+# uint16_t w; -+# uint32_t coeffs_x1; -+# uint32_t coeffs_y1; -+# int16_t weight_u1; -+# int16_t weight_v1; -+# int16_t y2; -+# int16_t x2; -+# uint32_t base2; -+# uint32_t coeffs_x2; -+# uint32_t coeffs_y2; -+# uint32_t wo_u2; -+# uint32_t wo_v2; -+# uint32_t dst_addr_c; -+# uint32_t next_fn; -+# } qpu_mc_pred_c_b_t; -+ -+.macro m_filter_c_b, v_bit_depth -+ -+.if v_bit_depth <= 8 -+.set v_x_shift, 1 -+.set v_v_shift, 8 -+# Shifts to get width & height in the right place in ra_dma0 -+.set v_dma_h_shift, 7 -+.set v_dma_wh_shift, i_shift16 -+.else -+.set v_x_shift, 2 -+.set v_v_shift, i_shift16 -+# Shifts to get width & height in the right place in ra_dma0 -+.set v_dma_h_shift, 8 -+.set v_dma_wh_shift, 15 -+.endif -+.set v_x_mul, (1 << v_x_shift) -+ -+# denom shift values -+.set i_wt_den_p5, (DENOM + 13 - v_bit_depth) -+.set i_wt_den_p6, (DENOM + 14 - v_bit_depth) -+ -+# per-channel shifts were calculated on the *previous* invocation -+ -+# get base addresses and per-channel shifts for *next* invocation -+ mov vw_setup, rb_vpm_init ; mov ra2, unif # ; x_y -+ -+ add.setf -, rb_ef, rb_ef ; mov r3, unif # [ra2 delay] ; r3=base -+ -+ shl r0, ra2.16b, v_x_shift ; v8subs r5rep, r1, r1 # x ; r5=0 -+ add r0, r0, rb_elem_x ; mov ra_y_next, ra2.16a -+ sub r1, r5, rb_pitch ; mov ra_width_height, unif # r1=pitch2 mask ; width_height -+ max r0, r0, r5 ; mov ra_xshift, ra_xshift_next -+ min r0, r0, rb_max_x ; mov ra0, unif # ; L0 H filter coeffs -+ -+.if v_bit_depth <= 8 -+ shl ra_xshift_next, r0, 3 -+.endif -+ -+ and r0, r0, -4 ; mov ra2, unif # ; L0 V filter coeffs -+ and r1, r0, r1 ; mul24 r2, ra_width, v_x_mul # r2=x*2 (we are working in pel pairs) -+ xor r0, r0, r1 ; mul24 r1, r1, rb_xpitch -+ add r0, r0, r1 ; mov r1, ra_height # Add stripe offsets ; r1=height -+ add ra_base_next, r3, r0 ; mov rb_xshift2, rb_xshift2_next # ; xshift2 used because B -+ -+# set up VPM write -+ -+ sub rb_dma1, rb_dma1_base, r2 ; mov ra_wt_off_mul_l0, unif # Compute vdw_setup1(dst_pitch-width) ; U weight -+ add rb_i_tmu, r1, (3-4) - PREREAD ; v8min r1, r1, ra_blk_height -+ add rb_lcount, r1, (3-4) ; mov.ifc ra_wt_mul_l0, ra_wt_off_l0 # ; V weight -+ -+ shl r0, r1, v_dma_h_shift ; mov ra3, unif # ; x2_y2 -+ add r0, r0, r2 ; mov r3, unif # [ra3 delay] ; base -+ shl r0, r0, v_dma_wh_shift ; mov ra_y2_next, ra3.16a # Shift into bits 16 upwards of the vdw_setup0 register -+ add ra_dma0, r0, rb_dma0_base ; mov r0, ra3.16b # r0=x -+ -+# L1 - uniform layout could possibly be optimized -+ -+ shl r0, r0, v_x_shift ; mov ra1, unif # r0=x<>> .anyn 1b -+ -+ sub r2, r1, r0 ; mul24 r1, rb5, ra2.8b # L1 ; L0 -+ sub.setf -, r5, rb_lcount ; mov r0, ra4 -+ sub r1, r1, r0 ; mul24 r0, rb6, ra2.8c -+ add r1, r1, r0 ; mul24 r0, ra7, rb7 -+ -+ sub r1, r1, r0 ; mul24 r0, rb10, ra3.8c # L1 -+ add r2, r2, r0 ; mul24 r0, ra11, rb11 # L1 -+ sub r2, r2, r0 -+ -+ shr r1, r1, 6 -+ shr r2, r2, 6 ; mul24 r0, r1, ra_wt_mul_l0 -+ add r2, r2, r1 ; mul24 r1, r2, ra_wt_mul_l1 -+ add r1, r1, r0 ; mul24 r2, r2, ra_kmul_add -+ sub r1, r1, r2 ; mov r3, ra_blk_height # ; NxtLoop -+ add r1, r1, rb_wt_off ; v8subs r0, ra_height, r3 # ; NxtLoop -+ -+ brr.anyn -, r:1b -+ asr r1, r1, ra_wt_den_p7 -+ min r1, r1, ra_pmax ; mov -, vw_wait -+ max vpm, r1, ra_k0 ; mul24 r2, r3, rb_pitch # ; NxtLoop -+# >>> .anyn 1b -+ -+# r0 = remaining height (min 0) -+# r2 = r3 * rb_pitch -+# r3 = block_height -+ -+# If looping again then we consumed 16 height last loop -+# rb_dma1 (stride) remains constant -+# rb_i_tmu remains const (based on total height) -+# recalc ra_dma0, rb_lcount based on new segment height -+ -+ mov.setf ra_height, r0 ; mov vw_setup, ra_dma0 # ; VDW setup 0 -+ -+# DMA out -+ bra.anyz -, ra_link -+ min r0, r0, r3 ; mov vw_setup, rb_dma1 # ; Stride -+ sub r1, r0, r3 ; mov vw_addr, ra_dest # ; start the VDW -+ shl r1, r1, i_shift23 -+# >>> .anyz ra_link -+ -+# Here r1 = cur_blk_height - 16 so it will be 0 or -ve -+# We add to dma0 to reduce the number of output lines in the final block -+ brr -, r:1b -+ add rb_lcount, rb_lcount, r0 -+ add ra_dma0, ra_dma0, r1 -+ add ra_dest, ra_dest, r2 ; mov vw_setup, rb_vpm_init # ; Reset our VDM write pointer -+# >>> 1b -+.endm -+ -+::mc_filter_c_b -+ m_filter_c_b 8 -+ -+################################################################################ -+# Exit code used by both Luma & Chroma so place between them to avoid I-cache -+# conflicts -+ -+.macro m_exit_drain -+.if PREREAD == 2 -+# Special case 2 as loop is wasteful -+ nop ; nop ; ldtmu0 -+ nop ; nop ; ldtmu1 -+ nop ; nop ; ldtmu0 -+ mov -, vw_wait ; nop ; ldtmu1 -+.else -+ mov.setf r3, PREREAD - 1 -+:1 -+ brr.anynz -, r:1b -+ nop ; nop ; ldtmu0 -+ nop ; nop ; ldtmu1 -+ sub.setf r3, r3, 1 -+ # >>> -+ mov -, vw_wait -+.endif -+.endm -+ -+# This sync layout groups QPUs 0-3, 4-7, 8-11 (i.e. 1 group per TMU pair) -+# All qpus start at the beginning and after that (group - 1) must have finished -+# before (group) can start -+# -+# Requires setup code for QPU 0 to srel sem 12 (m_setup_q0) to start the chain -+# Exit code will sacq sem 12 so everything is @ 0 on exit (this is important - -+# lockup otherwise) -+# -+# There is some, currently ill defined, potential lockup if we have the VDM active -+# whilst doing sem stuff so we wait first. ?? QPU stall from sem stalls VDM pipe too ?? -+# -+# The code stalled when I had many waiters on a single sem so we have a -+# "ripple" of srels to restart. Unsure why, may have been bug, but this works -+# and we currently have both the memory & sems to support it. -+.macro m_sync_q, n_qpu, n_quads -+# Do not generate code for qpu >= quads * 4 - fns should never be called -+.if n_qpu < n_quads * 4 -+ mov ra_link, unif # Can only branch to an a reg (not r0) -+ mov -, vw_wait # [ra_link delay] -+ -+.set n_sem_sync, n_qpu - (n_qpu % 4) -+.set n_sem_in, n_qpu -+.set n_sem_out, n_qpu + 1 -+ -+.if n_qpu % 4 == 0 -+ -+.set n_sem_quad_in, 12 + n_qpu / 4 -+.set n_sem_quad_out, 12 + (((n_qpu / 4) + 1) % n_quads) -+ -+ sacq -, n_sem_sync -+ sacq -, n_sem_sync -+ sacq -, n_sem_sync -+ bra -, ra_link -+ sacq -, n_sem_quad_in -+ srel -, n_sem_out -+ srel -, n_sem_quad_out -+ -+.else -+ bra -, ra_link -+ srel -, n_sem_sync -+ sacq -, n_sem_in -+.if n_sem_out % 4 != 0 -+ srel -, n_sem_out -+.else -+ nop -+.endif -+.endif -+.endif -+.endm -+ -+.set v_quads8, N_QPU_8 / 4 -+ -+::mc_sync_q0 -+ m_sync_q 0, v_quads8 -+::mc_sync_q1 -+ m_sync_q 1, v_quads8 -+::mc_sync_q2 -+ m_sync_q 2, v_quads8 -+::mc_sync_q3 -+ m_sync_q 3, v_quads8 -+::mc_sync_q4 -+ m_sync_q 4, v_quads8 -+::mc_sync_q5 -+ m_sync_q 5, v_quads8 -+::mc_sync_q6 -+ m_sync_q 6, v_quads8 -+::mc_sync_q7 -+ m_sync_q 7, v_quads8 -+::mc_sync_q8 -+ m_sync_q 8, v_quads8 -+::mc_sync_q9 -+ m_sync_q 9, v_quads8 -+::mc_sync_q10 -+ m_sync_q 10, v_quads8 -+::mc_sync_q11 -+ m_sync_q 11, v_quads8 -+ -+# mc_exit() -+# Chroma & Luma the same now -+ -+.macro m_exit_qn -+ m_exit_drain -+ nop ; nop ; thrend -+ nop -+ nop -+# >>> thrend <<< -+.endm -+ -+::mc_exit_c_qn -+::mc_exit_y_qn -+ m_exit_qn -+ -+ -+ -+# mc_interrupt_exit12() -+ -+.macro m_exit_q0 -+ m_exit_drain -+ sacq -, 12 -+ nop ; nop ; thrend -+ mov interrupt, 1 -+ nop -+# >>> thrend <<< -+.endm -+ -+::mc_exit_c_q0 -+::mc_exit_y_q0 -+ m_exit_q0 -+ -+# LUMA CODE -+ -+# The idea is to form B predictions by doing 8 pixels from ref0 in parallel with 8 pixels from ref1. -+# For P frames we make the second x,y coordinates offset by +8 -+ -+ -+################################################################################ -+# mc_setup -+# -+# typedef struct qpu_mc_pred_y_s_s { -+# qpu_mc_src_t next_src1; -+# qpu_mc_src_t next_src2; -+# uint16_t pic_h; -+# uint16_t pic_w; -+# uint32_t stride2; -+# uint32_t stride1; -+# uint32_t wdenom; -+# uint32_t next_fn; -+# } qpu_mc_pred_y_s_t; -+ -+.macro m_setup_y, v_bit_depth -+ -+# Cannot use mul24 on x as x might be -ve, so must use shift -+.if v_bit_depth <= 8 -+.set v_x_shift, 0 -+.set v_pmask, 0xff -+.set v_blk_height, Y_BLK_HEIGHT_8 -+.else -+.set v_x_shift, 1 -+.set v_pmask, 0xffff -+.set v_blk_height, Y_BLK_HEIGHT_16 -+.endif -+ -+ -+ # Need to save these because we need to know the frame dimensions before computing texture coordinates -+ mov tmurs, 1 ; mov ra0, unif # No TMU swap ; x_y -+ mov ra9, unif # ref_y_base -+ mov ra1, unif # x2_y2 -+ -+ -+# load constants -+ mov r0, [0,2,0,2,0,2,0,2,1,3,1,3,1,3,1,3] -+ shl rb_ef, r0, i_shift30 ; mov ra11, unif # ; ref_y2_base -+ -+ mov ra_kff800100, 0xff800100 -+ mov rb_pmask, v_pmask -+ mov ra_blk_height_pmax, ((1 << v_bit_depth) - 1) | (v_blk_height << 16) -+ mov rb_fir_off_h, (FIR_OFFSET << (v_bit_depth - 8)) -+ mov ra_fir_off_val_wt_den_p7, (FIR_OFFSET << 16) | (DENOM + 15 - v_bit_depth) -+ mov rb_y_coeffs_2, 0x050b0a00 -+ mov rb_y_coeffs_3, 0x11283a40 -+ mov rb_y_coeffs_5, 0x0a0b0500 -+ -+# Compute part of VPM to use -+ -+# Read image dimensions -+ mov ra3, unif # width_height -+ mov ra_ef, rb_ef ; mov rb_xpitch, unif # [ra3 delay] ; stride2 -+.if v_x_shift == 0 -+ sub rb_max_x, ra3.16b, 1 -+.else -+ sub r0, ra3.16b, 1 -+ shl rb_max_x, r0, v_x_shift -+.endif -+ sub rb_max_y, ra3.16a, 1 -+ mov r3, elem_num ; mov rb_pitch, unif # stride1 -+ -+# get destination pitch -+ mov r1, vdw_setup_1(0) # [rb_pitch delay] -+ or rb_dma1_base, r1, rb_pitch -+ -+# Compute base address for first and second access -+ add r0, ra0.16b, r3 # Load x + elem_num -+.if v_x_shift != 0 -+ shl r0, r0, v_x_shift -+.endif -+ max r0, r0, 0 -+ min r0, r0, rb_max_x -+ shl ra_xshift_next, r0, 3 # Compute shifts -+ -+# X is byte offset - we can only load words - mask -+ -+ and r0, r0, -4 ; v8subs r2, r2, r2 -+ sub r2, r2, rb_pitch -+ and r1, r0, r2 -+ xor r0, r0, r1 ; mul24 r1, r1, rb_xpitch -+ add r0, r0, r1 # Add stripe offsets -+ add ra_base, ra9, r0 -+ -+ # r3 still contains elem_num -+ add r0, ra1.16b, r3 # Load x -+.if v_x_shift != 0 -+ shl r0, r0, v_x_shift -+.endif -+ max r0, r0, 0 -+ min r0, r0, rb_max_x -+ shl rb_xshift2_next, r0, 3 # Compute shifts -+ -+ # r2 still contains mask -+ and r0, r0, -4 -+ and r1, r0, r2 -+ xor r0, r0, r1 ; mul24 r1, r1, rb_xpitch -+ add r0, r0, r1 # Add stripe offsets -+ add rb_base2, ra11, r0 -+ -+# Do preloads -+ nop ; mov r0, ra0.16a # ; r0 = y -+ mov r3, PREREAD ; mov r2, ra1.16a # ; r2 = y2 -+ -+:1 -+ sub.setf r3, r3, 1 -+ max r1, r0, 0 -+ min r1, r1, rb_max_y -+ add r0, r0, ra_k1 ; mul24 r1, r1, rb_pitch -+ add t0s, ra_base, r1 ; mov ra_y, r0 -+ -+ max r1, r2, 0 -+ brr.anynz -, r:1b -+ min r1, r1, rb_max_y -+ add r2, r2, ra_k1 ; mul24 r1, r1, rb_pitch -+ add t1s, rb_base2, r1 ; mov ra_y2, r2 -+# >>> .anynz 1b -+ -+ m_calc_dma_regs v_bit_depth, v_blk_height, rb_vpm_init, rb_dma0_base -+ -+ mov ra_link, unif # Next fn -+ -+# touch vertical context to keep simulator happy -+ mov ra8, 0 ; mov rb8, 0 # [ra_link delay] -+ bra -, ra_link -+ mov ra9, 0 ; mov rb9, 0 -+ mov ra10, 0 ; mov rb10, 0 -+ mov ra11, 0 ; mov rb11, 0 -+# >>> ra_link -+.endm -+ -+::mc_setup_y_q0 -+ m_setup_q0 -+::mc_setup_y_qn -+ m_setup_y 8 -+ -+################################################################################ -+# -+# Start of per-block setup code -+# P and B blocks share the same setup code to save on Icache space -+ -+# get base addresses and per-channel shifts for *next* invocation -+# per-channel shifts were calculated on the *previous* invocation -+ -+# 1st 3 instructions of per_block-setup in branch delay -+# -+# typedef struct qpu_mc_pred_y_p_s { -+# qpu_mc_src_t next_src1; -+# qpu_mc_src_t next_src2; -+# uint16_t h; -+# uint16_t w; -+# uint32_t mymx21; -+# uint32_t wo1; -+# uint32_t wo2; -+# uint32_t dst_addr; -+# uint32_t next_fn; -+# } qpu_mc_pred_y_p_t; -+# -+ -+.macro m_luma_setup, v_bit_depth -+# Hack - QASM may well have have label pasting but I have no idea how... -+.if v_bit_depth == 8 -+ brr ra_link, r:per_block_setup_8 -+.elif v_bit_depth == 10 -+ brr ra_link, r:per_block_setup_10 -+.endif -+ mov ra0, unif ; mov r3, elem_num # y_x ; elem_num has implicit unpack?? -+ add.setf -, rb_ef, rb_ef ; v8subs r5rep, r2, r2 # [ra0 delay] ; r5 = 0 -+ add r0, ra0.16b, r3 ; mov rb_xshift2, rb_xshift2_next -+.endm -+ -+.macro m_per_block_setup, v_bit_depth -+ -+.if v_bit_depth <= 8 -+.set v_x_shift, 0 -+.set v_x_mul, 1 -+# Shifts to get width & height in the right place in ra_dma0 -+.set v_dma_h_shift, 7 -+.set v_dma_wh_shift, i_shift16 -+.else -+.set v_x_shift, 1 -+.set v_x_mul, 2 -+# Shifts to get width & height in the right place in ra_dma0 -+.set v_dma_h_shift, 8 -+.set v_dma_wh_shift, 15 -+.endif -+ -+.if v_x_shift != 0 -+ shl r0, r0, v_x_shift -+.endif -+ max r0, r0, r5 ; mov ra_xshift, ra_xshift_next -+ min r0, r0, rb_max_x -+ -+ shl ra_xshift_next, r0, 3 # Compute shifts -+ and r0, r0, -4 -+ sub r2, r5, rb_pitch ; mov ra_base_next, unif # ; src1.base -+ and r1, r0, r2 ; mov ra_y_next, ra0.16a -+ xor r0, r0, r1 ; mul24 r1, r1, rb_xpitch -+ add r0, r0, r1 ; mov ra1, unif # Add stripe offsets ; src2.x_y -+ add ra_base_next, ra_base_next, r0 # [ra1 delay] -+ -+ add r0, ra1.16b, r3 # Load x2 -+.if v_x_shift != 0 -+ shl r0, r0, v_x_shift -+.endif -+ max r0, r0, r5 ; mov ra_y2_next, ra1.16a -+ min r0, r0, rb_max_x ; mov rb_base2_next, unif # ; src2.base -+ shl rb_xshift2_next, r0, 3 # Compute shifts -+ and r0, r0, -4 ; mov ra_width_height, unif # ; width_height -+ and r1, r0, r2 ; mov vw_setup, rb_vpm_init # ; set up VPM write -+ xor r0, r0, r1 ; mul24 r1, r1, rb_xpitch -+ add r0, r0, r1 ; mul24 r1, ra_width, v_x_mul # Add stripe offsets ; r1 = x in bytes -+ add rb_base2_next, rb_base2_next, r0 -+ -+# get width,height of block (unif load above), r1 = width * pel_size -+ sub rb_dma1, rb_dma1_base, r1 ; mov r0, ra_height # Compute vdw_setup1(dst_pitch-width) -+ add rb_i_tmu, r0, (7-8) - PREREAD ; v8min r0, r0, ra_blk_height -+ add rb_lcount, r0, (7-8) -+ shl r0, r0, v_dma_h_shift ; mov r3, ra_kmul_add # ; r3 return val -+ add r0, r0, r1 # Combine width and height of destination area -+ shl r0, r0, v_dma_wh_shift ; mov r2, ra_fir_off_val # Shift into bits 16 upwards of the vdw_setup0 register ; r2 return val -+ add ra_dma0, r0, rb_dma0_base ; mov r0, unif # ; Packed filter offsets -+ -+# get filter coefficients and discard unused B frame values -+ shl.ifnn r0, r0, i_shift16 ; mov ra_wt_off_mul_l0, unif # Pick half to use ; L0 offset/weight -+ shl ra8, r0, 3 ; mov rb5, ra_k255 -+ -+# Coeffs are all abs values here as that means mul24 works (no sign extend from .8) -+ -+# 2nd half coeffs same as first if we can swap 8<->24 in the rotate val -+# but I can't see a way of doing that that is cheap enough to be worth it -+ -+# Picked out in a slightly random order to space out uniform loads -+ -+ # 1 -+ mov r1, 0x01040400 # [ra8 delay] -+ ror ra2.8b, r1, ra8.8d -+ ror ra0.8b, r1, ra8.8c -+ # 2 -+ ror ra2.8c, rb_y_coeffs_2, ra8.8d -+ ror ra0.8c, rb_y_coeffs_2, ra8.8c -+ # 0 -+ mov r1,0x00010100 # -ve [ra8 delay] -+ ror r0, r1, ra8.8d ; mov ra_wt_off_mul_l1, unif # ; L1 Wt/Offset -+ ror ra0.8a, r1, ra8.8c ; v8min rb4, r0, rb5 -+ # 7 -+ shl r1, r1, 8 ; mov.ifn ra_wt_off_mul_l0, ra_wt_off_mul_l1 # r1 = 0x01010000 -+ ror r0, r1, ra8.8d ; mov ra_dest, unif # ; Destination address -+ ror ra1.8d, r1, ra8.8c ; v8min rb11, r0, rb5 -+ # 3 -+ ror ra2.8d, rb_y_coeffs_3, ra8.8d -+ ror ra0.8d, rb_y_coeffs_3, ra8.8c -+ # 5 -+ ror ra3.8b, rb_y_coeffs_5, ra8.8d -+ ror ra1.8b, rb_y_coeffs_5, ra8.8c -+ # 6 -+ mov r1,0x04040100 -+ ror ra3.8c, r1, ra8.8d -+ ror ra1.8c, r1, ra8.8c ; mov r5rep, -8 # ; r5 return val -+ -+ bra -, ra_link -+ # 4 -+ mov r1,0x3a281100 -+ ror r0, r1, ra8.8d ; mov ra_link, unif # ; link - load after we've used its previous val -+ ror ra1.8a, r1, ra8.8c ; v8min rb8, r0, rb5 -+# >>> branch ra_link -+ -+# r5 = -8 -+# r2 = fir_off_val -+# r3 = 128 -+.endm -+ -+:per_block_setup_8 -+ m_per_block_setup 8 -+ -+ -+ -+################################################################################ -+# -+# mc_filter_y_pxx -+# -+# Setup (& therefore uniform struct) shared with _bxx -+# Struct in m_luma_setup -+# -+# We can have 2 separate P reqs here as long as they mate to generate a -+# rectangular output block (i.e. h0 = h1, w0 = 8) -+# -+# At this point we have already issued PREREAD pairs of texture requests for the current block -+ -+.macro m_filter_y_pxx, v_bit_depth -+ -+# denom shift values -+.set i_wt_den_p5, (DENOM + 13 - v_bit_depth) -+.set i_wt_den_p6, (DENOM + 14 - v_bit_depth) -+ -+ m_luma_setup v_bit_depth -+ -+ shl r1, ra_wt_off_l0, i_wt_den_p5 -+ add ra_wt_mul_l0, ra_wt_mul_l0, r3 ; mul24 r0, r2, ra_wt_mul_l0 # r2 = 0x4000 so mul24 safe even with -ve wt_mul -+ sub rb_wt_off, r1, r0 ; mov ra_ef.8a, rb4 -+ -+# retrieve texture results and pick out bytes -+# then submit two more texture requests -+ -+# This loop is identical to the B loop from here ---> -+:1 -+ add.setf -, ra_ef, ra_ef ; mul24 ra4, rb5, ra_ef -+ -+ max r2, ra_y, 0 ; mov r1, 0 -+ min r2, r2, rb_max_y ; mov r3, ra_k1 -+ add ra_y, ra_y, r3 ; mul24 r2, r2, rb_pitch ; ldtmu0 -+ add t0s, ra_base, r2 ; mov rb5, rb6 -+ shr r0, r4, ra_xshift ; mov rb6, rb7 -+ -+ max r2, ra_y2, r1 ; v8min r0, r0, rb_pmask ; ldtmu1 # ; masks out all but wanted bytes -+ shr r1, r4, rb_xshift2 ; mov rb7, ra8 -+ min r2, r2, rb_max_y ; v8min r1, r1, ra_pmax -+ add ra_y2, ra_y2, r3 ; mul24 r2, r2, rb_pitch -+ add t1s, rb_base2, r2 ; mov ra8, ra9 -+ -+# apply horizontal filter -+ add r5rep, r5, r3 ; mul24 r2, ra0.8a << 8, r1 << 8 @ "mul_used", 0 -+ mov r3, rb_fir_off_h ; mul24.ifnn r2, ra0.8a, r0 -+ sub r2, r3, r2 ; mul24 r3, ra0.8b << 1, r0 << 1 @ "mul_used", 0 -+ nop ; mul24.ifn r3, ra0.8b << 9, r1 << 9 @ "mul_used", 0 -+ add r2, r2, r3 ; mul24 r3, ra0.8c << 2, r0 << 2 @ "mul_used", 0 -+ nop ; mul24.ifn r3, ra0.8c << 10, r1 << 10 @ "mul_used", 0 -+ sub r2, r2, r3 ; mul24 r3, ra0.8d << 3, r0 << 3 @ "mul_used", 0 -+ nop ; mul24.ifn r3, ra0.8d << 11, r1 << 11 @ "mul_used", 0 -+ add r2, r2, r3 ; mul24 r3, ra1.8a << 4, r0 << 4 @ "mul_used", 0 -+ nop ; mul24.ifn r3, ra1.8a << 12, r1 << 12 @ "mul_used", 0 -+ add r2, r2, r3 ; mul24 r3, ra1.8b << 5, r0 << 5 @ "mul_used", 0 -+ nop ; mul24.ifn r3, ra1.8b << 13, r1 << 13 @ "mul_used", 0 -+ sub r2, r2, r3 ; mul24 r3, ra1.8c << 6, r0 << 6 @ "mul_used", 0 -+ nop ; mul24.ifn r3, ra1.8c << 14, r1 << 14 @ "mul_used", 0 -+ add r2, r2, r3 ; mul24 r3, ra1.8d << 7, r0 << 7 @ "mul_used", 0 -+ add.setf -, r5, r5 ; mul24.ifn r3, ra1.8d << 15, r1 << 15 @ "mul_used", 0 -+ -+ brr.anyn -, r:1b -+ sub r2, r2, r3 ; mul24 r1, rb5, ra2.8b -+ mov ra9, rb10 ; mul24 r0, rb10, ra3.8b -+ asr ra11, r2, v_bit_depth - 8 ; mov rb10, ra11 -+ # >>> .anyn 1b (r5 + r5) -+ -+ # apply vertical filter and write to VPM -+ # - r4* + r5 - r6 + r7 + r8 - r9 + r10 - r11 -+ -+ sub r1, r1, r0 ; mul24 r0, rb6, ra2.8c -+ sub r1, r1, r0 ; mul24 r0, rb7, ra2.8d -+ add r1, r1, r0 ; mul24 r0, ra8, rb8 -+ add r1, r1, r0 ; mul24 r0, rb10, ra3.8c -+ add r1, r1, r0 ; mul24 r0, ra11, rb11 -+# <--- to here -+ sub.setf -, r5, rb_i_tmu ; mov r3, ra_blk_height # ; NxtLoop: r3 = block height -+ sub r1, r1, ra4 ; mov.ifz rb_base2, rb_base2_next -+ sub r1, r1, r0 ; mov.ifz ra_base, ra_base_next -+ -+ asr r1, r1, 6 ; mov.ifz ra_y_y2, ra_y_y2_next -+ sub.setf -, r5, rb_lcount ; mul24 r0, r1, ra_wt_mul_l0 -+ add r0, r0, rb_wt_off ; mul24 r1, r1, ra_kmul_add -+ sub r1, r0, r1 ; v8subs r0, ra_height, r3 # ; NxtLoop: r0 = remaining height (0 saturate) -+ -+ brr.anyn -, r:1b -+ asr r1, r1, i_wt_den_p6 -+ min r1, r1, ra_pmax ; mov -, vw_wait -+ max vpm, r1, ra_k0 ; mul24 r2, r3, rb_pitch # ; NxtLoop -+# >>> branch.anyn 1b (r5 - rb_lcount) -+ -+# r0 = remaining height (min 0) -+# r2 = r3 * rb_pitch -+# r3 = block_height -+ -+# If looping again then we consumed 16 height last loop -+# rb_dma1 (stride) remains constant -+# rb_i_tmu remains const (based on total height) -+# recalc ra_dma0, rb_lcount based on new segment height -+ -+ mov.setf ra_height, r0 ; mov vw_setup, ra_dma0 # VDW setup 0 -+ -+# DMA out -+ bra.anyz -, ra_link -+ min r0, r0, r3 ; mov vw_setup, rb_dma1 # Stride -+ sub r1, r0, r3 ; mov vw_addr, ra_dest # start the VDW -+ shl r1, r1, i_shift23 -+# >>> .anyz ra_link -+ -+# Here r1 = cur_blk_height - 16 so it will be 0 or -ve -+# We add to dma0 to reduce the number of output lines in the final block -+ brr -, r:1b -+ add rb_lcount, rb_lcount, r0 -+ add ra_dma0, ra_dma0, r1 -+ add ra_dest, ra_dest, r2 ; mov vw_setup, rb_vpm_init # ; Reset our VDM write pointer -+# >>> 1b -+.endm -+ -+::mc_filter_y_pxx -+ m_filter_y_pxx 8 -+ -+ -+################################################################################ -+ -+# mc_filter_b(y_x, base, y2_x2, base2, width_height, my2_mx2_my_mx, offsetweight0, this_dst, next_kernel) -+# -+# Setup (& therefore uniform struct) shared with _pxx -+# Struct in m_luma_setup -+# -+# l0 calc in els 0-7, L1 in 8-15 -+# Only els 0-7 write data that is stored back to ram (els 8-15 may write tosh) -+# -+# At this point we have already issued PREREAD pairs of texture requests for the current block -+ -+.macro m_filter_y_bxx, v_bit_depth -+ -+# denom shift values -+.set i_wt_den_p5, (DENOM + 13 - v_bit_depth) -+.set i_wt_den_p6, (DENOM + 14 - v_bit_depth) -+ -+ m_luma_setup v_bit_depth -+ -+ shl r1, ra_wt_off_l0, i_wt_den_p6 -+ add ra_wt_mul_l0, ra_wt_mul_l0, r3 ; mul24 r0, r2, ra_wt_mul_l0 -+ sub r1, r1, r0 ; mul24 r0, r2, ra_wt_mul_l1 -+ sub rb_wt_off, r1, r0 ; mov ra_ef.8a, rb4 -+ -+# This loop is identical to the P loop from here ---> -+:1 -+ add.setf -, ra_ef, ra_ef ; mul24 ra4, rb5, ra_ef -+ -+ max r2, ra_y, 0 ; mov r1, 0 -+ min r2, r2, rb_max_y ; mov r3, ra_k1 -+ add ra_y, ra_y, r3 ; mul24 r2, r2, rb_pitch ; ldtmu0 -+ add t0s, ra_base, r2 ; mov rb5, rb6 -+ shr r0, r4, ra_xshift ; mov rb6, rb7 -+ -+ max r2, ra_y2, r1 ; v8min r0, r0, rb_pmask ; ldtmu1 # ; masks out all but wanted bytes -+ shr r1, r4, rb_xshift2 ; mov rb7, ra8 -+ min r2, r2, rb_max_y ; v8min r1, r1, ra_pmax -+ add ra_y2, ra_y2, r3 ; mul24 r2, r2, rb_pitch -+ add t1s, rb_base2, r2 ; mov ra8, ra9 -+ -+# apply horizontal filter -+ add r5rep, r5, r3 ; mul24 r2, ra0.8a << 8, r1 << 8 @ "mul_used", 0 -+ mov r3, rb_fir_off_h ; mul24.ifnn r2, ra0.8a, r0 -+ sub r2, r3, r2 ; mul24 r3, ra0.8b << 1, r0 << 1 @ "mul_used", 0 -+ nop ; mul24.ifn r3, ra0.8b << 9, r1 << 9 @ "mul_used", 0 -+ add r2, r2, r3 ; mul24 r3, ra0.8c << 2, r0 << 2 @ "mul_used", 0 -+ nop ; mul24.ifn r3, ra0.8c << 10, r1 << 10 @ "mul_used", 0 -+ sub r2, r2, r3 ; mul24 r3, ra0.8d << 3, r0 << 3 @ "mul_used", 0 -+ nop ; mul24.ifn r3, ra0.8d << 11, r1 << 11 @ "mul_used", 0 -+ add r2, r2, r3 ; mul24 r3, ra1.8a << 4, r0 << 4 @ "mul_used", 0 -+ nop ; mul24.ifn r3, ra1.8a << 12, r1 << 12 @ "mul_used", 0 -+ add r2, r2, r3 ; mul24 r3, ra1.8b << 5, r0 << 5 @ "mul_used", 0 -+ nop ; mul24.ifn r3, ra1.8b << 13, r1 << 13 @ "mul_used", 0 -+ sub r2, r2, r3 ; mul24 r3, ra1.8c << 6, r0 << 6 @ "mul_used", 0 -+ nop ; mul24.ifn r3, ra1.8c << 14, r1 << 14 @ "mul_used", 0 -+ add r2, r2, r3 ; mul24 r3, ra1.8d << 7, r0 << 7 @ "mul_used", 0 -+ add.setf -, r5, r5 ; mul24.ifn r3, ra1.8d << 15, r1 << 15 @ "mul_used", 0 -+ -+ brr.anyn -, r:1b -+ sub r2, r2, r3 ; mul24 r1, rb5, ra2.8b -+ mov ra9, rb10 ; mul24 r0, rb10, ra3.8b -+ asr ra11, r2, v_bit_depth - 8 ; mov rb10, ra11 -+ # >>> .anyn 1b (r5 + r5) -+ -+ # apply vertical filter and write to VPM -+ # - r4* + r5 - r6 + r7 + r8 - r9 + r10 - r11 -+ -+ sub r1, r1, r0 ; mul24 r0, rb6, ra2.8c -+ sub r1, r1, r0 ; mul24 r0, rb7, ra2.8d -+ add r1, r1, r0 ; mul24 r0, ra8, rb8 -+ add r1, r1, r0 ; mul24 r0, rb10, ra3.8c -+ add r1, r1, r0 ; mul24 r0, ra11, rb11 -+# <--- to here -+ sub r1, r1, ra4 -+ sub r1, r1, r0 ; mov r2, rb_wt_off -+ -+ asr r1, r1, 6 -+ sub.setf -, r5, rb_i_tmu ; mul24 r0, r1, ra_wt_mul_l0 -+ mov.ifz rb_base2, rb_base2_next ; mul24 r1, r1, ra_kmul_add -+ sub r1, r0, r1 ; mov.ifz ra_y_y2, ra_y_y2_next -+ sub.setf -, r5, rb_lcount ; mov.ifz ra_base, ra_base_next -+ add r1, r1, r2 ; mov r0, r1 << 8 -+ add r1, r1, r0 ; mov r3, ra_blk_height # ; NxtLoop: r3 = block height -+ -+ brr.anyn -, r:1b -+ asr r1, r1, ra_wt_den_p7 ; mul24 r2, r3, rb_pitch # ; NxtLoop -+ min r1, r1, ra_pmax ; mov -, vw_wait -+ max vpm, r1, 0 ; v8subs r0, ra_height, r3 # ; NxtLoop: r0 = remaining height (0 saturate) -+# >>> branch.anyn 1b (r5 - rb_lcount) -+ -+# r0 = remaining height (min 0) -+# r2 = r3 * rb_pitch -+# r3 = block_height -+ -+# If looping again then we consumed block_height last loop -+# rb_dma1 (stride) remains constant -+# rb_i_tmu remains const (based on total height) -+# recalc ra_dma0, rb_lcount based on new segment height -+ -+ mov.setf ra_height, r0 ; mov vw_setup, ra_dma0 # VDW setup 0 -+ -+# DMA out -+ bra.anyz -, ra_link -+ min r0, r0, r3 ; mov vw_setup, rb_dma1 # Stride -+ sub r1, r0, r3 ; mov vw_addr, ra_dest # start the VDW -+ shl r1, r1, i_shift23 -+# >>> .anyz ra_link (ra_height - remaining height) -+ -+# Here r1 = cur_blk_height - blk_height so it will be 0 or -ve -+# We add to dma0 to reduce the number of output lines in the final block -+ brr -, r:1b -+ add rb_lcount, rb_lcount, r0 -+ add ra_dma0, ra_dma0, r1 -+ add ra_dest, ra_dest, r2 ; mov vw_setup, rb_vpm_init # ; Reset our VDM write pointer -+# >>> 1b -+.endm -+ -+::mc_filter_y_bxx -+ m_filter_y_bxx 8 -+ -+################################################################################ -+# -+# typedef struct qpu_mc_pred_y_p00_s { -+# qpu_mc_src_t next_src1; -+# uint16_t h; -+# uint16_t w; -+# uint32_t wo1; -+# uint32_t dst_addr; -+# uint32_t next_fn; -+# } qpu_mc_pred_y_p00_t; -+ -+.macro m_filter_y_p00, v_bit_depth -+ -+.if v_bit_depth <= 8 -+.set v_x_shift, 0 -+.set v_x_mul, 1 -+# Shifts to get width & height in the right place in ra_dma0 -+.set v_dma_h_shift, 7 -+.set v_dma_wh_shift, i_shift16 -+.else -+.set v_x_shift, 1 -+.set v_x_mul, 2 -+# Shifts to get width & height in the right place in ra_dma0 -+.set v_dma_h_shift, 8 -+.set v_dma_wh_shift, 15 -+.endif -+ -+ mov ra0, unif ; mov r0, elem_num # y_x -+ mov ra_xshift, ra_xshift_next ; v8subs r5rep, r5, r5 # [ra0 delay] ; r5 = 0 -+ add r0, ra0.16b, r0 ; mov ra_base_next, unif # ; src1.base -+.if v_x_shift != 0 -+ shl r0, r0, v_x_shift -+.endif -+ -+ max r0, r0, r5 ; mov ra_y_next, ra0.16a # ; width_height -+ min r0, r0, rb_max_x ; mov ra_width_height, unif -+ -+ shl ra_xshift_next, r0, 3 # Compute shifts -+ and r0, r0, -4 -+ sub r2, r5, rb_pitch ; mov ra_wt_off_mul_l0, unif # ; weight_offset -+ and r1, r0, r2 -+ xor r0, r0, r1 ; mul24 r1, r1, rb_xpitch -+ add r0, r0, r1 ; mov ra_dest, unif # Add stripe offsets ; dest addr -+ add ra_base_next, ra_base_next, r0 ; mov vw_setup, rb_vpm_init # [ra_width delay] ; set up VPM write -+ -+# get width,height of block (unif load above) -+# Compute vdw_setup1(dst_pitch-width) -+ shl r1, ra_width, v_x_shift -+ sub rb_dma1, rb_dma1_base, r1 ; mov r0, ra_height -+ sub rb_i_tmu, r0, PREREAD ; v8min r0, r0, ra_blk_height -+ shl r0, r0, v_dma_h_shift ; mov rb_lcount, r0 -+ add r0, r0, r1 # Combine width and height of destination area -+ shl rb_wt_off, ra_wt_off_l0, DENOM + 7 -+ shl r0, r0, v_dma_wh_shift ; mov ra_link, unif # Shift into bits 16 upwards of the vdw_setup0 register ; link -+ add ra_dma0, r0, rb_dma0_base -+ -+:1 -+ sub.setf -, r5, rb_i_tmu ; v8adds r5rep, r5, ra_k1 -+ nop ; mov.ifz ra_y, ra_y_next ; ldtmu0 -+ shr r0, r4, ra_xshift ; mov r3, rb_pitch -+ -+ max r2, ra_y, 0 # y -+ min r2, r2, rb_max_y ; mov.ifz ra_base, ra_base_next -+ add ra_y, ra_y, 1 ; mul24 r2, r2, r3 -+ add t0s, ra_base, r2 ; v8min r0, r0, rb_pmask -+ -+ sub.setf -, r5, rb_lcount ; mul24 r1, r0, ra_wt_mul_l0 -+ shl r1, r1, 8 ; mov r3, ra_blk_height -+ add r1, r1, rb_wt_off ; v8subs r0, ra_height, r3 -+ -+ brr.anyn -, r:1b -+ asr r1, r1, DENOM + 8 -+ min r1, r1, ra_pmax ; mov -, vw_wait -+ max vpm, r1, ra_k0 ; mul24 r2, r3, rb_pitch -+# >>> branch.anyn 1b -+ -+# r0 = remaining height (min 0) -+# r2 = r3 * rb_pitch -+# r3 = block_height -+ -+# If looping again then we consumed 16 height last loop -+# rb_dma1 (stride) remains constant -+# rb_i_tmu remains const (based on total height) -+# recalc ra_dma0, rb_lcount based on new segment height -+ -+ mov.setf ra_height, r0 ; mov vw_setup, ra_dma0 # VDW setup 0 -+ -+# DMA out -+ bra.anyz -, ra_link -+ min r0, r0, r3 ; mov vw_setup, rb_dma1 # Stride -+ sub r1, r0, r3 ; mov vw_addr, ra_dest # start the VDW -+ shl r1, r1, i_shift23 -+# >>> .anyz ra_link -+ -+# Here r1 = cur_blk_height - 16 so it will be 0 or -ve -+# We add to dma0 to reduce the number of output lines in the final block -+ brr -, r:1b -+ add rb_lcount, rb_lcount, r0 -+ add ra_dma0, ra_dma0, r1 -+ add ra_dest, ra_dest, r2 ; mov vw_setup, rb_vpm_init # ; Reset our VDM write pointer -+# >>> 1b -+.endm -+ -+::mc_filter_y_p00 -+ m_filter_y_p00 8 -+ -+################################################################################ -+ -+.macro m_filter_y_b00, v_bit_depth -+# luma setup does a fair bit more than we need calculating filter coeffs -+# that we will never use but it saves I-cache to use it (also simple!) -+ m_luma_setup v_bit_depth -+ -+# Fix up vals that were expecting a filter (somewhat icky) -+ mov r2, 1 -+ add rb_i_tmu, rb_i_tmu, r2 ; mov r1, ra_wt_off_mul_l0 # Need in rX rather than raX for <<8 to do what we want -+ shl rb_wt_off, ra_wt_off_l0, DENOM + 8 ; v8subs r5quad, r5, r5 # [r1 << delay] ; r5quad OK for zero -+ nop ; mov.ifnz ra_wt_off_mul_l0, r1 << 8 -+ -+:1 -+ sub.setf -, r5, rb_i_tmu ; nop ; ldtmu1 -+ shr r1, r4, rb_xshift2 ; mov.ifz ra_y_y2, ra_y_y2_next ; ldtmu0 -+ shr r0, r4, ra_xshift ; mov r3, rb_pitch -+ -+ max r2, ra_y, 0 # y -+ min r2, r2, rb_max_y ; mov.ifz ra_base, ra_base_next -+ add ra_y, ra_y, 1 ; mul24 r2, r2, r3 -+ add t0s, ra_base, r2 ; mov.ifz rb_base2, rb_base2_next -+ -+ max r2, ra_y2, 0 -+ min r2, r2, rb_max_y -+ add ra_y2, ra_y2, 1 ; mul24 r2, r2, r3 -+ add t1s, rb_base2, r2 ; v8min r0, r0, ra_pmax # v8subs masks out all but bottom byte -+ and r1, r1, rb_pmask ; mul24 r0, r0, ra_wt_mul_l0 -+ -+ sub.setf -, r5, rb_lcount ; mul24 r1, r1, ra_wt_mul_l1 -+ add r1, r0, r1 ; v8adds r5rep, r5, ra_k1 -+ -+ shl r1, r1, 8 ; mov r3, ra_blk_height -+ add r1, r1, rb_wt_off ; v8subs r0, ra_height, r3 -+ -+ brr.anyn -, r:1b -+ asr r1, r1, (DENOM + 9) - 32 # -32 to get valid shift immediate -+ min r1, r1, ra_pmax ; mov -, vw_wait -+ max vpm, r1, ra_k0 ; mul24 r2, r3, rb_pitch -+# >>> branch.anyn 1b -+ -+# r0 = remaining height (min 0) -+# r2 = r3 * rb_pitch -+# r3 = block_height -+ -+# If looping again then we consumed 16 height last loop -+# rb_dma1 (stride) remains constant -+# rb_i_tmu remains const (based on total height) -+# recalc ra_dma0, rb_lcount based on new segment height -+ -+ mov.setf ra_height, r0 ; mov vw_setup, ra_dma0 # ; VDW setup 0 -+ -+# DMA out -+ bra.anyz -, ra_link -+ min r0, r0, r3 ; mov vw_setup, rb_dma1 # ; Stride -+ sub r1, r0, r3 ; mov vw_addr, ra_dest # ; start the VDW -+ shl r1, r1, i_shift23 -+# >>> .anyz ra_link -+ -+# Here r1 = cur_blk_height - 16 so it will be 0 or -ve -+# We add to dma0 to reduce the number of output lines in the final block -+ brr -, r:1b -+ add rb_lcount, rb_lcount, r0 -+ add ra_dma0, ra_dma0, r1 -+ add ra_dest, ra_dest, r2 ; mov vw_setup, rb_vpm_init # ; Reset our VDM write pointer -+# >>> 1b -+.endm -+ -+::mc_filter_y_b00 -+ m_filter_y_b00 8 -+ -+################################################################################ -+################################################################################ -+# 10 BIT -+ -+::mc_setup_c10_q0 -+ m_setup_q0 -+::mc_setup_c10_qn -+ m_setup_c 10 -+ -+::mc_filter_c10_p -+ m_filter_c_p 0, 10 -+ -+::mc_filter_c10_p_l1 -+ m_filter_c_p 1, 10 -+ -+ -+::mc_filter_c10_b -+ m_filter_c_b 10 -+ -+# Even if these fns are the same as for other bit depths we want our own copy -+# to keep the code we are using in a single lump to avoid (direct map) cache -+# thrashing -+.set v_quads10, N_QPU_16 / 4 -+ -+::mc_sync10_q0 -+ m_sync_q 0, v_quads10 -+::mc_sync10_q1 -+ m_sync_q 1, v_quads10 -+::mc_sync10_q2 -+ m_sync_q 2, v_quads10 -+::mc_sync10_q3 -+ m_sync_q 3, v_quads10 -+::mc_sync10_q4 -+ m_sync_q 4, v_quads10 -+::mc_sync10_q5 -+ m_sync_q 5, v_quads10 -+::mc_sync10_q6 -+ m_sync_q 6, v_quads10 -+::mc_sync10_q7 -+ m_sync_q 7, v_quads10 -+::mc_sync10_q8 -+ m_sync_q 8, v_quads10 -+::mc_sync10_q9 -+ m_sync_q 9, v_quads10 -+::mc_sync10_q10 -+ m_sync_q 10, v_quads10 -+::mc_sync10_q11 -+ m_sync_q 11, v_quads10 -+ -+::mc_exit_y10_q0 -+::mc_exit_c10_q0 -+ m_exit_q0 -+ -+::mc_exit_y10_qn -+::mc_exit_c10_qn -+ m_exit_qn -+ -+::mc_setup_y10_q0 -+ m_setup_q0 -+::mc_setup_y10_qn -+ m_setup_y 10 -+ -+:per_block_setup_10 -+ m_per_block_setup 10 -+ -+::mc_filter_y10_pxx -+ m_filter_y_pxx 10 -+ -+::mc_filter_y10_p00 -+ m_filter_y_p00 10 -+ -+::mc_filter_y10_bxx -+ m_filter_y_bxx 10 -+ -+::mc_filter_y10_b00 -+ m_filter_y_b00 10 -+ -+ -+ -+::mc_end -+# Do not add code here because mc_end must appear after all other code. ---- /dev/null -+++ b/libavcodec/rpi_hevc_shader_cmd.h -@@ -0,0 +1,165 @@ -+/* -+Copyright (c) 2017 Raspberry Pi (Trading) Ltd. -+All rights reserved. -+ -+Redistribution and use in source and binary forms, with or without -+modification, are permitted provided that the following conditions are met: -+ * Redistributions of source code must retain the above copyright -+ notice, this list of conditions and the following disclaimer. -+ * Redistributions in binary form must reproduce the above copyright -+ notice, this list of conditions and the following disclaimer in the -+ documentation and/or other materials provided with the distribution. -+ * Neither the name of the copyright holder nor the -+ names of its contributors may be used to endorse or promote products -+ derived from this software without specific prior written permission. -+ -+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+*/ -+ -+#ifndef RPI_SHADER_CMD_H -+#define RPI_SHADER_CMD_H -+ -+#pragma pack(push, 4) -+ -+#if RPI_QPU_EMU_C && RPI_QPU_EMU_Y -+// If mixed then we are just confused and get a lot of warnings.... -+typedef const uint8_t * qpu_mc_src_addr_t; -+typedef uint8_t * qpu_mc_dst_addr_t; -+#else -+typedef uint32_t qpu_mc_src_addr_t; -+typedef uint32_t qpu_mc_dst_addr_t; -+#endif -+ -+typedef struct qpu_mc_src_s -+{ -+ int16_t y; -+ int16_t x; -+ qpu_mc_src_addr_t base; -+} qpu_mc_src_t; -+ -+ -+typedef struct qpu_mc_pred_c_p_s { -+ qpu_mc_src_t next_src; -+ uint16_t h; -+ uint16_t w; -+ uint32_t coeffs_x; -+ uint32_t coeffs_y; -+ uint32_t wo_u; -+ uint32_t wo_v; -+ qpu_mc_dst_addr_t dst_addr_c; -+ uint32_t next_fn; -+} qpu_mc_pred_c_p_t; -+ -+typedef struct qpu_mc_pred_c_b_s { -+ qpu_mc_src_t next_src1; -+ uint16_t h; -+ uint16_t w; -+ uint32_t coeffs_x1; -+ uint32_t coeffs_y1; -+ int16_t weight_u1; -+ int16_t weight_v1; -+ qpu_mc_src_t next_src2; -+ uint32_t coeffs_x2; -+ uint32_t coeffs_y2; -+ uint32_t wo_u2; -+ uint32_t wo_v2; -+ qpu_mc_dst_addr_t dst_addr_c; -+ uint32_t next_fn; -+} qpu_mc_pred_c_b_t; -+ -+typedef struct qpu_mc_pred_c_s_s { -+ qpu_mc_src_t next_src1; -+ uint32_t pic_cw; // C Width (== Y width / 2) -+ uint32_t pic_ch; // C Height (== Y Height / 2) -+ uint32_t stride2; -+ uint32_t stride1; -+ qpu_mc_src_t next_src2; -+ uint32_t next_fn; -+} qpu_mc_pred_c_s_t; -+ -+typedef struct qpu_mc_pred_c_s { -+ union { -+ qpu_mc_pred_c_p_t p; -+ qpu_mc_pred_c_b_t b; -+ qpu_mc_pred_c_s_t s; -+ }; -+} qpu_mc_pred_c_t; -+ -+ -+typedef struct qpu_mc_pred_y_p_s { -+ qpu_mc_src_t next_src1; -+ qpu_mc_src_t next_src2; -+ uint16_t h; -+ uint16_t w; -+ uint32_t mymx21; -+ uint32_t wo1; -+ uint32_t wo2; -+ qpu_mc_dst_addr_t dst_addr; -+ uint32_t next_fn; -+} qpu_mc_pred_y_p_t; -+ -+typedef struct qpu_mc_pred_y_p00_s { -+ qpu_mc_src_t next_src1; -+ uint16_t h; -+ uint16_t w; -+ uint32_t wo1; -+ qpu_mc_dst_addr_t dst_addr; -+ uint32_t next_fn; -+} qpu_mc_pred_y_p00_t; -+ -+typedef struct qpu_mc_pred_y_s_s { -+ qpu_mc_src_t next_src1; -+ qpu_mc_src_t next_src2; -+ uint16_t pic_h; -+ uint16_t pic_w; -+ uint32_t stride2; -+ uint32_t stride1; -+ uint32_t next_fn; -+} qpu_mc_pred_y_s_t; -+ -+typedef struct qpu_mc_pred_sync_s { -+ uint32_t next_fn; -+} qpu_mc_pred_sync_t; -+ -+// Only a useful structure in that it allows us to return something other than a void * -+typedef struct qpu_mc_pred_y_s { -+ union { -+ qpu_mc_pred_y_p_t p; -+ qpu_mc_pred_y_p00_t p00; -+ qpu_mc_pred_y_s_t s; -+ }; -+} qpu_mc_pred_y_t; -+ -+typedef union qpu_mc_pred_cmd_u { -+ qpu_mc_pred_y_t y; -+ qpu_mc_pred_c_t c; -+ qpu_mc_pred_sync_t sync; -+} qpu_mc_pred_cmd_t; -+ -+static void inline qpu_mc_link_set(qpu_mc_pred_cmd_t * const cmd, const uint32_t fn) -+{ -+ // Link is last el of previous cmd -+ ((uint32_t *)cmd)[-1] = fn; -+} -+ -+#define QPU_MC_PRED_N_Y8 12 -+#define QPU_MC_PRED_N_C8 12 -+ -+#define QPU_MC_PRED_N_Y10 12 -+#define QPU_MC_PRED_N_C10 12 -+ -+#define QPU_MC_DENOM 7 -+ -+#pragma pack(pop) -+ -+#endif -+ ---- /dev/null -+++ b/libavcodec/rpi_hevc_shader_template.c -@@ -0,0 +1,88 @@ -+/* -+Copyright (c) 2017 Raspberry Pi (Trading) Ltd. -+All rights reserved. -+ -+Redistribution and use in source and binary forms, with or without -+modification, are permitted provided that the following conditions are met: -+ * Redistributions of source code must retain the above copyright -+ notice, this list of conditions and the following disclaimer. -+ * Redistributions in binary form must reproduce the above copyright -+ notice, this list of conditions and the following disclaimer in the -+ documentation and/or other materials provided with the distribution. -+ * Neither the name of the copyright holder nor the -+ names of its contributors may be used to endorse or promote products -+ derived from this software without specific prior written permission. -+ -+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+*/ -+ -+#include "hevc.h" -+#include "rpi_hevcdec.h" -+#include "libavutil/rpi_sand_fns.h" -+#include "rpi_hevc_shader_cmd.h" -+#include "rpi_hevc_shader_template.h" -+ -+typedef struct shader_track_s -+{ -+ const union qpu_mc_pred_cmd_u *qpu_mc_curr; -+ const struct qpu_mc_src_s *last_l0; -+ const struct qpu_mc_src_s *last_l1; -+ uint32_t width; // pic_width * PW -+ uint32_t height; -+ uint32_t stride2; -+ uint32_t stride1; -+} shader_track_t; -+ -+static int wtoidx(const unsigned int w) -+{ -+ static const uint8_t pel_weight[65] = { [2] = 0, [4] = 1, [6] = 2, [8] = 3, [12] = 4, [16] = 5, [24] = 6, [32] = 7, [48] = 8, [64] = 9 }; -+ return pel_weight[w]; -+} -+ -+static const int fctom(uint32_t x) -+{ -+ int rv; -+ // As it happens we can take the 2nd filter term & divide it by 8 -+ // (dropping fractions) to get the fractional move -+ rv = 8 - ((x >> 11) & 0xf); -+ av_assert2(rv >= 0 && rv <= 7); -+ return rv; -+} -+ -+static inline int32_t ext(int32_t x, unsigned int shl, unsigned int shr) -+{ -+ return (x << shl) >> shr; -+} -+ -+static inline int woff_p(HEVCRpiContext *const s, int32_t x) -+{ -+ return ext(x, 0, 17 + s->ps.sps->bit_depth - 8); -+} -+ -+static inline int woff_b(HEVCRpiContext *const s, int32_t x) -+{ -+ return ext(x - 0x10000, 0, 16 + s->ps.sps->bit_depth - 8); -+} -+ -+static inline int wweight(int32_t x) -+{ -+ return ext(x, 16, 16); -+} -+ -+ -+#define PW 1 -+#include "rpi_hevc_shader_template_fn.h" -+ -+#undef PW -+#define PW 2 -+#include "rpi_hevc_shader_template_fn.h" -+ ---- /dev/null -+++ b/libavcodec/rpi_hevc_shader_template.h -@@ -0,0 +1,49 @@ -+/* -+Copyright (c) 2017 Raspberry Pi (Trading) Ltd. -+All rights reserved. -+ -+Redistribution and use in source and binary forms, with or without -+modification, are permitted provided that the following conditions are met: -+ * Redistributions of source code must retain the above copyright -+ notice, this list of conditions and the following disclaimer. -+ * Redistributions in binary form must reproduce the above copyright -+ notice, this list of conditions and the following disclaimer in the -+ documentation and/or other materials provided with the distribution. -+ * Neither the name of the copyright holder nor the -+ names of its contributors may be used to endorse or promote products -+ derived from this software without specific prior written permission. -+ -+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+*/ -+ -+#ifndef LIBAVCODEC_RPI_SHADER_TEMPLATE_H -+#define LIBAVCODEC_RPI_SHADER_TEMPLATE_H -+ -+struct HEVCRpiContext; -+struct HEVCRpiInterPredEnv; -+ -+void ff_hevc_rpi_shader_c8(struct HEVCRpiContext *const s, -+ const struct HEVCRpiInterPredEnv *const ipe_y, -+ const struct HEVCRpiInterPredEnv *const ipe_c); -+ -+void ff_hevc_rpi_shader_c16(struct HEVCRpiContext *const s, -+ const struct HEVCRpiInterPredEnv *const ipe_y, -+ const struct HEVCRpiInterPredEnv *const ipe_c); -+ -+void rpi_sand_dump8(const char * const name, -+ const uint8_t * const base, const int stride1, const int stride2, int x, int y, int w, int h, const int is_c); -+ -+void rpi_sand_dump16(const char * const name, -+ const uint8_t * const base, const int stride1, const int stride2, int x, int y, int w, int h, const int is_c); -+ -+#endif -+ ---- /dev/null -+++ b/libavcodec/rpi_hevc_shader_template_fn.h -@@ -0,0 +1,502 @@ -+/* -+Copyright (c) 2017 Raspberry Pi (Trading) Ltd. -+All rights reserved. -+ -+Redistribution and use in source and binary forms, with or without -+modification, are permitted provided that the following conditions are met: -+ * Redistributions of source code must retain the above copyright -+ notice, this list of conditions and the following disclaimer. -+ * Redistributions in binary form must reproduce the above copyright -+ notice, this list of conditions and the following disclaimer in the -+ documentation and/or other materials provided with the distribution. -+ * Neither the name of the copyright holder nor the -+ names of its contributors may be used to endorse or promote products -+ derived from this software without specific prior written permission. -+ -+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+*/ -+ -+#define STRCAT(x,y) x##y -+ -+#if PW == 1 -+#define pixel uint8_t -+#define FUNC(f) STRCAT(f, 8) -+#elif PW == 2 -+#define pixel uint16_t -+#define FUNC(f) STRCAT(f, 16) -+#else -+#error Unexpected PW -+#endif -+ -+#define PATCH_STRIDE (16 * PW) -+ -+static void FUNC(dup_lr)(uint8_t * dst, const uint8_t * src, unsigned int w, unsigned int h, unsigned int stride) -+{ -+ for (unsigned int i = 0; i != h; ++i, dst += stride, src += stride) { -+ const pixel s = *(const pixel *)src; -+ pixel * d = (pixel *)dst; -+ for (unsigned int j = 0; j < w; j += PW) { -+ *d++ = s; -+ } -+ } -+} -+ -+static void FUNC(dup_tb)(uint8_t * dst, const uint8_t * src, unsigned int w, unsigned int h, unsigned int stride) -+{ -+ for (unsigned int i = 0; i != h; ++i, dst += stride) { -+ memcpy(dst, src, w); -+ } -+} -+ -+static void FUNC(get_patch_y)(const shader_track_t * const st, -+ uint8_t * dst, const unsigned int dst_stride, -+ const qpu_mc_src_t *src, -+ unsigned int _w, unsigned int _h) -+{ -+ int x = src->x * PW; -+ int y = src->y; -+ int w = _w * PW; -+ int h = _h; -+ int dl = 0; -+ int dr = 0; -+ int dt = 0; -+ int db = 0; -+ -+ if (x < 0) { -+ if (-x >= w) -+ x = PW - w; -+ dl = -x; -+ w += x; -+ x = 0; -+ } -+ if (x + w > st->width) { -+ if (x >= st->width) -+ x = st->width - PW; -+ dr = (x + w) - st->width; -+ w = st->width - x; -+ } -+ -+ // Y -+ if (y < 0) { -+ if (-y >= h) -+ y = 1 - h; -+ dt = -y; -+ h += y; -+ y = 0; -+ } -+ if (y + h > st->height) { -+ if (y >= st->height) -+ y = st->height - 1; -+ db = (y + h) - st->height; -+ h = st->height - y; -+ } -+ -+ dst += dl + dt * dst_stride; -+ FUNC(av_rpi_sand_to_planar_y)(dst, dst_stride, (const uint8_t *)src->base, st->stride1, st->stride2, x, y, w, h); -+ -+ // Edge dup -+ if (dl != 0) -+ FUNC(dup_lr)(dst - dl, dst, dl, h, dst_stride); -+ if (dr != 0) -+ FUNC(dup_lr)(dst + w, dst + w - PW, dr, h, dst_stride); -+ w += dl + dr; -+ dst -= dl; -+ -+ if (dt != 0) -+ FUNC(dup_tb)(dst - dt * dst_stride, dst, w, dt, dst_stride); -+ if (db != 0) -+ FUNC(dup_tb)(dst + h * dst_stride, dst + (h - 1) * dst_stride, w, db, dst_stride); -+} -+ -+ -+ -+static void FUNC(get_patch_c)(const shader_track_t * const st, -+ uint8_t * dst_u, uint8_t * dst_v, const unsigned int dst_stride, -+ const qpu_mc_src_t *src, -+ unsigned int _w, unsigned int _h) -+{ -+ int x = src->x * PW; -+ int y = src->y; -+ int w = _w * PW; -+ int h = _h; -+ int dl = 0; -+ int dr = 0; -+ int dt = 0; -+ int db = 0; -+ const int width = st->width; -+ const int height = st->height; -+ -+ if (x < 0) { -+ if (-x >= w) -+ x = PW - w; -+ dl = -x; -+ w += x; -+ x = 0; -+ } -+ if (x + w > width) { -+ if (x >= width) -+ x = width - PW; -+ dr = (x + w) - width; -+ w = width - x; -+ } -+ -+ // Y -+ if (y < 0) { -+ if (-y >= h) -+ y = 1 - h; -+ dt = -y; -+ h += y; -+ y = 0; -+ } -+ if (y + h > height) { -+ if (y >= height) -+ y = height - 1; -+ db = (y + h) - height; -+ h = height - y; -+ } -+ -+ dst_u += dl + dt * dst_stride; -+ dst_v += dl + dt * dst_stride; -+ FUNC(av_rpi_sand_to_planar_c)(dst_u, dst_stride, dst_v, dst_stride, (const uint8_t *)src->base, st->stride1, st->stride2, x, y, w, h); -+ -+ // Edge dup -+ if (dl != 0) -+ { -+ FUNC(dup_lr)(dst_u - dl, dst_u, dl, h, dst_stride); -+ FUNC(dup_lr)(dst_v - dl, dst_v, dl, h, dst_stride); -+ } -+ if (dr != 0) -+ { -+ FUNC(dup_lr)(dst_u + w, dst_u + w - PW, dr, h, dst_stride); -+ FUNC(dup_lr)(dst_v + w, dst_v + w - PW, dr, h, dst_stride); -+ } -+ w += dl + dr; -+ dst_u -= dl; -+ dst_v -= dl; -+ -+ if (dt != 0) -+ { -+ FUNC(dup_tb)(dst_u - dt * dst_stride, dst_u, w, dt, dst_stride); -+ FUNC(dup_tb)(dst_v - dt * dst_stride, dst_v, w, dt, dst_stride); -+ } -+ if (db != 0) -+ { -+ FUNC(dup_tb)(dst_u + h * dst_stride, dst_u + (h - 1) * dst_stride, w, db, dst_stride); -+ FUNC(dup_tb)(dst_v + h * dst_stride, dst_v + (h - 1) * dst_stride, w, db, dst_stride); -+ } -+} -+ -+// w, y, w, h in pixels -+// stride1, stride2 in bytes -+void FUNC(rpi_sand_dump)(const char * const name, -+ const uint8_t * const base, const int stride1, const int stride2, int x, int y, int w, int h, const int is_c) -+{ -+ const int mask = stride2 == 0 ? ~0 : stride1 - 1; -+ -+ printf("%s (%d,%d) %dx%d\n", name, x, y, w, h); -+ -+ if (is_c) { -+ x *= 2; -+ w *= 2; -+ } -+ -+ for (int i = y; i != y + h; ++i) { -+ for (int j = x; j != x + w; ++j) { -+ const uint8_t * p = base + ((j*PW) & mask) + i * stride1 + ((j*PW) & ~mask) * stride2; -+ char sep = is_c && (j & 1) == 0 ? ':' : ' '; -+#if PW == 1 -+ if (j < 0 || i < 0) -+ printf("..%c", sep); -+ else -+ printf("%02x%c", *(const pixel*)p, sep); -+#else -+ if (j < 0 || i < 0) -+ printf("...%c", sep); -+ else -+ printf("%03x%c", *(const pixel*)p, sep); -+#endif -+ } -+ printf("\n"); -+ } -+} -+ -+ -+void FUNC(ff_hevc_rpi_shader_c)(HEVCRpiContext *const s, -+ const HEVCRpiInterPredEnv *const ipe_y, -+ const HEVCRpiInterPredEnv *const ipe_c) -+{ -+ for (int c_idx = 0; c_idx < 2; ++c_idx) -+ { -+ const HEVCRpiInterPredEnv *const ipe = c_idx == 0 ? ipe_y : ipe_c; -+ shader_track_t tracka[QPU_N_MAX] = {{NULL}}; -+ unsigned int exit_n = 0; -+ -+ if (ipe == NULL || !ipe->used) { -+ continue; -+ } -+ -+ do { -+ for (unsigned int i = 0; i != ipe->n; ++i) { -+ const HEVCRpiInterPredQ * const q = ipe->q + i; -+ shader_track_t * const st = tracka + i; -+ const qpu_mc_pred_cmd_t * cmd = st->qpu_mc_curr == NULL ? q->qpu_mc_base : st->qpu_mc_curr; -+ -+ for (;;) { -+ const uint32_t link = (cmd == q->qpu_mc_base) ? q->code_setup : ((uint32_t *)cmd)[-1]; -+ -+ if (link == q->code_setup) { -+ if (c_idx == 0) { -+ // Luma -+ const qpu_mc_pred_y_s_t *const c = &cmd->y.s; -+ -+ st->height = c->pic_h; -+ st->width = c->pic_w * PW; -+ st->stride1 = c->stride1; -+ st->stride2 = c->stride2; -+ st->last_l0 = &c->next_src1; -+ st->last_l1 = &c->next_src2; -+ cmd = (const qpu_mc_pred_cmd_t *)(c + 1); -+ } -+ else { -+ // Chroma -+ const qpu_mc_pred_c_s_t *const c = &cmd->c.s; -+ -+ st->height = c->pic_ch; -+ st->width = c->pic_cw * PW; -+ st->stride1 = c->stride1; -+ st->stride2 = c->stride2; -+ st->last_l0 = &c->next_src1; -+ st->last_l1 = &c->next_src2; -+ cmd = (const qpu_mc_pred_cmd_t *)(c + 1); -+ } -+ } -+ else if (link == s->qpu.y_pxx) { -+ const qpu_mc_pred_y_p_t *const c = &cmd->y.p; -+ const int w1 = FFMIN(c->w, 8); -+ const int w2 = c->w - w1; -+ -+ uint8_t patch_y1[PATCH_STRIDE * 72]; // (Max width + 8) * (max height + 8) -+ uint8_t patch_y2[PATCH_STRIDE * 72]; // (Max width + 8) * (max height + 8) -+ -+ FUNC(get_patch_y)(st, -+ patch_y1, PATCH_STRIDE, -+ st->last_l0, -+ 16, c->h + 7); -+ if (w2 > 0) { -+ FUNC(get_patch_y)(st, -+ patch_y2, PATCH_STRIDE, -+ st->last_l1, -+ 16, c->h + 7); -+ } -+ -+ // wo[offset] = offset*2+1 -+ s->hevcdsp.put_hevc_qpel_uni_w[wtoidx(w1)][(c->mymx21 & 0xff00) != 0][(c->mymx21 & 0xff) != 0]( -+ (uint8_t *)c->dst_addr, st->stride1, patch_y1 + 3 * (PATCH_STRIDE + PW), PATCH_STRIDE, -+ c->h, QPU_MC_DENOM, wweight(c->wo1), woff_p(s, c->wo1), (c->mymx21 & 0xff), ((c->mymx21 >> 8) & 0xff), w1); -+ if (w2 > 0) { -+ s->hevcdsp.put_hevc_qpel_uni_w[wtoidx(w2)][(c->mymx21 & 0xff000000) != 0][(c->mymx21 & 0xff0000) != 0]( -+ (uint8_t *)c->dst_addr + 8 * PW, st->stride1, patch_y2 + 3 * (PATCH_STRIDE + PW), PATCH_STRIDE, -+ c->h, QPU_MC_DENOM, wweight(c->wo2), woff_p(s, c->wo2), ((c->mymx21 >> 16) & 0xff), ((c->mymx21 >> 24) & 0xff), w2); -+ } -+ st->last_l0 = &c->next_src1; -+ st->last_l1 = &c->next_src2; -+ cmd = (const qpu_mc_pred_cmd_t *)(c + 1); -+ } -+ else if (link == s->qpu.y_bxx) { -+ const qpu_mc_pred_y_p_t *const c = &cmd->y.p; -+ -+ uint8_t patch_y1[PATCH_STRIDE * 72]; // (Max width + 8) * (max height + 8) -+ uint8_t patch_y2[PATCH_STRIDE * 72]; // (Max width + 8) * (max height + 8) -+ int16_t patch_y3[MAX_PB_SIZE * MAX_PB_SIZE]; -+ -+ FUNC(get_patch_y)(st, -+ patch_y1, PATCH_STRIDE, -+ st->last_l0, -+ 16, c->h + 7); -+ FUNC(get_patch_y)(st, -+ patch_y2, PATCH_STRIDE, -+ st->last_l1, -+ 16, c->h + 7); -+ -+ s->hevcdsp.put_hevc_qpel[wtoidx(c->w)][(c->mymx21 & 0xff00) != 0][(c->mymx21 & 0xff) != 0]( -+ patch_y3, patch_y1+ 3 * (PATCH_STRIDE + PW), PATCH_STRIDE, -+ c->h, (c->mymx21 & 0xff), ((c->mymx21 >> 8) & 0xff), c->w); -+ -+ s->hevcdsp.put_hevc_qpel_bi_w[wtoidx(c->w)][(c->mymx21 & 0xff000000) != 0][(c->mymx21 & 0xff0000) != 0]( -+ (uint8_t *)c->dst_addr, st->stride1, patch_y2 + 3 * (PATCH_STRIDE + PW), PATCH_STRIDE, patch_y3, -+ c->h, QPU_MC_DENOM, wweight(c->wo1), wweight(c->wo2), -+ 0, woff_b(s, c->wo2), ((c->mymx21 >> 16) & 0xff), ((c->mymx21 >> 24) & 0xff), c->w); -+ st->last_l0 = &c->next_src1; -+ st->last_l1 = &c->next_src2; -+ cmd = (const qpu_mc_pred_cmd_t *)(c + 1); -+ } -+ else if (link == s->qpu.y_p00) { -+ const qpu_mc_pred_y_p00_t *const c = &cmd->y.p00; -+ -+ uint8_t patch_y1[PATCH_STRIDE * 72]; // (Max width + 8) * (max height + 8) -+ -+ FUNC(get_patch_y)(st, -+ patch_y1, PATCH_STRIDE, -+ st->last_l0, -+ 16, c->h + 7); -+ -+ // wo[offset] = offset*2+1 -+ s->hevcdsp.put_hevc_qpel_uni_w[wtoidx(c->w)][0][0]( -+ (uint8_t *)c->dst_addr, st->stride1, patch_y1, PATCH_STRIDE, -+ c->h, QPU_MC_DENOM, wweight(c->wo1), woff_p(s, c->wo1), 0, 0, c->w); -+ -+ st->last_l0 = &c->next_src1; -+ cmd = (const qpu_mc_pred_cmd_t *)(c + 1); -+ } -+ else if (link == s->qpu.y_b00) { -+ const qpu_mc_pred_y_p_t *const c = &cmd->y.p; -+ -+ uint8_t patch_y1[PATCH_STRIDE * 72]; // (Max width + 8) * (max height + 8) -+ uint8_t patch_y2[PATCH_STRIDE * 72]; // (Max width + 8) * (max height + 8) -+ int16_t patch_y3[MAX_PB_SIZE * MAX_PB_SIZE]; -+ -+ av_assert0(c->w <= 16 && c->h <= 64); -+ -+ FUNC(get_patch_y)(st, -+ patch_y1, PATCH_STRIDE, -+ st->last_l0, -+ 16, c->h); -+ FUNC(get_patch_y)(st, -+ patch_y2, PATCH_STRIDE, -+ st->last_l1, -+ 16, c->h); -+ -+ s->hevcdsp.put_hevc_qpel[wtoidx(c->w)][0][0]( -+ patch_y3, patch_y1, PATCH_STRIDE, -+ c->h, 0, 0, c->w); -+ -+ s->hevcdsp.put_hevc_qpel_bi_w[wtoidx(c->w)][0][0]( -+ (uint8_t *)c->dst_addr, st->stride1, patch_y2, PATCH_STRIDE, patch_y3, -+ c->h, QPU_MC_DENOM, wweight(c->wo1), wweight(c->wo2), -+ 0, woff_b(s, c->wo2), 0, 0, c->w); -+ st->last_l0 = &c->next_src1; -+ st->last_l1 = &c->next_src2; -+ cmd = (const qpu_mc_pred_cmd_t *)(c + 1); -+ } -+ else if (link == s->qpu.c_pxx) { -+ const qpu_mc_pred_c_p_t *const c = &cmd->c.p; -+ const int mx = fctom(c->coeffs_x); -+ const int my = fctom(c->coeffs_y); -+ -+ uint8_t patch_u1[PATCH_STRIDE * 72]; // (Max width + 8) * (max height + 8) -+ uint8_t patch_v1[PATCH_STRIDE * 72]; // (Max width + 8) * (max height + 8) -+ uint8_t patch_u3[8 * 16 * PW]; -+ uint8_t patch_v3[8 * 16 * PW]; -+ -+ FUNC(get_patch_c)(st, patch_u1, patch_v1, PATCH_STRIDE, st->last_l0, 8+3, c->h + 3); -+ -+ s->hevcdsp.put_hevc_epel_uni_w[wtoidx(c->w)][my != 0][mx != 0]( -+ patch_u3, 8 * PW, patch_u1 + PATCH_STRIDE + PW, PATCH_STRIDE, -+ c->h, QPU_MC_DENOM, wweight(c->wo_u), woff_p(s, c->wo_u), mx, my, c->w); -+ s->hevcdsp.put_hevc_epel_uni_w[wtoidx(c->w)][my != 0][mx != 0]( -+ patch_v3, 8 * PW, patch_v1 + PATCH_STRIDE + PW, PATCH_STRIDE, -+ c->h, QPU_MC_DENOM, wweight(c->wo_v), woff_p(s, c->wo_v), mx, my, c->w); -+ -+ FUNC(av_rpi_planar_to_sand_c)((uint8_t *)c->dst_addr_c, st->stride1, st->stride2, patch_u3, 8 * PW, patch_v3, 8 * PW, 0, 0, c->w * PW, c->h); -+ -+ st->last_l0 = &c->next_src; -+ cmd = (const qpu_mc_pred_cmd_t *)(c + 1); -+ } -+ else if (link == s->qpu.c_pxx_l1) { -+ const qpu_mc_pred_c_p_t *const c = &cmd->c.p; -+ const int mx = fctom(c->coeffs_x); -+ const int my = fctom(c->coeffs_y); -+ -+ uint8_t patch_u1[PATCH_STRIDE * 72]; // (Max width + 8) * (max height + 8) -+ uint8_t patch_v1[PATCH_STRIDE * 72]; // (Max width + 8) * (max height + 8) -+ uint8_t patch_u3[8 * 16 * PW]; -+ uint8_t patch_v3[8 * 16 * PW]; -+ -+ FUNC(get_patch_c)(st, patch_u1, patch_v1, PATCH_STRIDE, st->last_l1, 8+3, c->h + 3); -+ -+ s->hevcdsp.put_hevc_epel_uni_w[wtoidx(c->w)][my != 0][mx != 0]( -+ patch_u3, 8 * PW, patch_u1 + PATCH_STRIDE + PW, PATCH_STRIDE, -+ c->h, QPU_MC_DENOM, wweight(c->wo_u), woff_p(s, c->wo_u), mx, my, c->w); -+ s->hevcdsp.put_hevc_epel_uni_w[wtoidx(c->w)][my != 0][mx != 0]( -+ patch_v3, 8 * PW, patch_v1 + PATCH_STRIDE + PW, PATCH_STRIDE, -+ c->h, QPU_MC_DENOM, wweight(c->wo_v), woff_p(s, c->wo_v), mx, my, c->w); -+ -+ FUNC(av_rpi_planar_to_sand_c)((uint8_t *)c->dst_addr_c, st->stride1, st->stride2, patch_u3, 8 * PW, patch_v3, 8 * PW, 0, 0, c->w * PW, c->h); -+ -+ st->last_l1 = &c->next_src; -+ cmd = (const qpu_mc_pred_cmd_t *)(c + 1); -+ } -+ else if (link == s->qpu.c_bxx) { -+ const qpu_mc_pred_c_b_t *const c = &cmd->c.b; -+ const int mx1 = fctom(c->coeffs_x1); -+ const int my1 = fctom(c->coeffs_y1); -+ const int mx2 = fctom(c->coeffs_x2); -+ const int my2 = fctom(c->coeffs_y2); -+ -+ uint8_t patch_u1[PATCH_STRIDE * 72]; -+ uint8_t patch_v1[PATCH_STRIDE * 72]; -+ uint8_t patch_u2[PATCH_STRIDE * 72]; -+ uint8_t patch_v2[PATCH_STRIDE * 72]; -+ uint8_t patch_u3[8 * 16 * PW]; -+ uint8_t patch_v3[8 * 16 * PW]; -+ uint16_t patch_u4[MAX_PB_SIZE * MAX_PB_SIZE]; -+ uint16_t patch_v4[MAX_PB_SIZE * MAX_PB_SIZE]; -+ -+ FUNC(get_patch_c)(st, patch_u1, patch_v1, PATCH_STRIDE, st->last_l0, 8+3, c->h + 3); -+ FUNC(get_patch_c)(st, patch_u2, patch_v2, PATCH_STRIDE, st->last_l1, 8+3, c->h + 3); -+ -+ s->hevcdsp.put_hevc_epel[wtoidx(c->w)][my1 != 0][mx1 != 0]( -+ patch_u4, patch_u1 + PATCH_STRIDE + PW, PATCH_STRIDE, -+ c->h, mx1, my1, c->w); -+ s->hevcdsp.put_hevc_epel[wtoidx(c->w)][my1 != 0][mx1 != 0]( -+ patch_v4, patch_v1 + PATCH_STRIDE + PW, PATCH_STRIDE, -+ c->h, mx1, my1, c->w); -+ -+ s->hevcdsp.put_hevc_epel_bi_w[wtoidx(c->w)][my2 != 0][mx2 != 0]( -+ patch_u3, 8 * PW, patch_u2 + PATCH_STRIDE + PW, PATCH_STRIDE, patch_u4, -+ c->h, QPU_MC_DENOM, c->weight_u1, wweight(c->wo_u2), -+ 0, woff_b(s, c->wo_u2), mx2, my2, c->w); -+ s->hevcdsp.put_hevc_epel_bi_w[wtoidx(c->w)][my2 != 0][mx2 != 0]( -+ patch_v3, 8 * PW, patch_v2 + PATCH_STRIDE + PW, PATCH_STRIDE, patch_v4, -+ c->h, QPU_MC_DENOM, c->weight_v1, wweight(c->wo_v2), -+ 0, woff_b(s, c->wo_v2), mx2, my2, c->w); -+ -+ FUNC(av_rpi_planar_to_sand_c)((uint8_t *)c->dst_addr_c, st->stride1, st->stride2, patch_u3, 8 * PW, patch_v3, 8 * PW, 0, 0, c->w * PW, c->h); -+ -+ st->last_l0 = &c->next_src1; -+ st->last_l1 = &c->next_src2; -+ cmd = (const qpu_mc_pred_cmd_t *)(c + 1); -+ } -+ else if (link == q->code_sync) { -+ cmd = (const qpu_mc_pred_cmd_t *)((uint32_t *)cmd + 1); -+ break; -+ } -+ else if (link == q->code_exit) { -+ // We expect exit to occur without other sync -+ av_assert0(i == exit_n); -+ ++exit_n; -+ break; -+ } -+ else { -+ av_assert0(0); -+ } -+ } -+ -+ st->qpu_mc_curr = cmd; -+ } -+ } while (exit_n == 0); -+ } -+} -+ -+#undef FUNC -+#undef pixel -+ ---- /dev/null -+++ b/libavcodec/rpi_hevc_transform.s -@@ -0,0 +1,444 @@ -+# ****************************************************************************** -+# Argon Design Ltd. -+# (c) Copyright 2015 Argon Design Ltd. All rights reserved. -+# -+# Module : HEVC -+# Author : Peter de Rivaz -+# ****************************************************************************** -+ -+# USE_STACK = 1 means temporary data stored on the stack (requires build with larger stack) -+# USE_STACK = 0 means temporary data stored in fixed per-VPU data buffers (requires modifications to vasm to handle instruction encoding for PC relative instructions) -+.set USE_STACK, 0 -+ -+# Lines that fail to assemble start with #: -+# The script insert_magic_opcodes.sh inserts the machine code directly for these. -+# HEVC VPU Transform -+# -+# Transform matrix can be thought of as -+# output row vector = input row vector * transMatrix2 -+# -+# The even rows of the matrix are symmetric -+# The odd rows of the matrix are antisymmetric -+# -+# So only need to compute the first half of the results, then can compute the remainder with a butterfly -+# -+# EXAMPLE -+# (a b c d) (1 2 2 1) -+# (3 4 -4 -3) -+# (5 6 6 5) -+# (7 8 -8 -7) -+# -+# x=(a c)(1 2) = 1a+5c 2a+6c -+# (5 6) -+# -+# y=(b d)(3 4) = 3b+7d 4b+8d -+# (7 8) -+# -+# u=x+y = 1a+5c+3b+7d 2a+4b+6c+8d -+# v=x-y = 1a+5c-3b-7d 2a+6c-4b-8d -+# -+# Final results are (u , v[::-1]) -+# -+# -+# For 32x1 input, load even rows into HX(0++,0), odd rows into HX(16++,0) -+# Apply the even matrix first and stop before rounding -+# Then apply the odd matrix in a full manner: -+# -+# First step is to compute partial products with the first input (16 cycles) -+# 1a 3b 5c 7d 16x1 input coefficients produce 16x16 output -+# 2a 4b 6c 8d -+# 2a -4b 6c -8d -+# 1a -3b 5c -7d -+# -+# Second step is to sum partial products into final position (8 cycles) -+# 1a+3b+5c+7d -+# 2a+4b+6c+8d -+# 2a-4b+6c-8d -+# 1a-3b+5c-7d -+# -+# Then can apply butterfly to combine even results and odd results + rounding to produce 16 rows of output at a time (need to save in transposed format) -+# -+# For 16x16 no butterfly is required and can store final results in original location (Could do 2 16x16s in parallel to make use of the trick - saves on the adds) -+# -+# For 8x8 we could compute two in parallel. -+# -+# -+ -+# Columns are transformed first -+# -+# Store top left half of transMatrix2 in -+# Store bottom left half of transMatrix2 in HX(32,32) -+# -+# For 16x16 -+# HX(0:15,0) contains input data before transform -+# HY(0:15,0) contains 32bit output data after transform -+# HX(32,0) contains even rows of left half of transMatrix2 -+# HX(32,32) contains odd rows of left half of transMatrix2 -+# HY(48,0) contains partial products ready for summing -+# -+ -+ -+# hevc_trans_16x16(short *transMatrix2, short *coeffs, int num) # TODO add size so we can branch to correct implementation (or perhaps have coeffs32 and num32 as secondary inputs!) -+# transMatrix2: address of the constant matrix (must be at 32 byte aligned address in Videocore memory) -+# coeffs: address of the transform coefficients (must be at 32 byte aligned address in Videocore memory) -+# num: number of 16x16 transforms to be done -+# coeffs32 -+# num32: number of 32x32 transforms -+# command 0 for transform, 1 for memclear16(int16_t *dst,num16) -+# -+ -+.equ TRANS_SHIFT, 20 - BIT_DEPTH -+.equ TRANS_RND2, 1 << (TRANS_SHIFT - 1) -+.equ TRANS_ASL2, 16 - TRANS_SHIFT -+ -+ -+hevc_trans_16x16: -+ push r6-r15, lr # TODO cut down number of used registers -+ mov r14,r3 # coeffs32 -+ mov r15,r4 # num32 -+ mov r3, 16*2 # Stride of transMatrix2 in bytes -+ vldh HX(32++,0),(r0 += r3) REP 16 # This is the 16x16 matrix, a transform is equivalent to multiplying input row vector * matrix -+ -+ add r0, 16*16*2 # For 32x32 transforms we also need this matrix -+ vldh HX(32++,32),(r0 += r3) REP 16 # This is the odd 16x16 matrix -+ -+ # Now use r0 to describe which matrix we are working on. -+ # Allows us to prefetch the next block of coefficients for efficiency. -+ mov r0,0 # This describes the location where we read our coefficients from -+ mov r3,16*2 # Stride of coefficients in bytes (TODO remove) -+ mov r7,16*16*2 # Total block size -+ mov r8,64*16 # Value used to swap from current to next VRF location -+ mov r4,64 # Constant used for rounding first pass -+ mov r5,TRANS_RND2 # Constant used for rounding second pass -+ -+ sub sp,sp,64+16*16*2 # Move on stack pointer in case interrupt occurs and uses stack -+ -+ add r11,sp,64 # Space for 32 bytes before, and rounding -+ lsr r11,5 -+ lsl r11,5 # Make sure r11 is rounded to multiple of 2**5==32 -+ -+ lsr r10, r2, 16 # Number of compressed blocks stored in top short -+ extu r2,16 -+ # At start of block r0,r1 point to the current block (that has already been loaded) -+ # r0 VRF location of current block -+ # r1 address of current block -+ # r2 number of 16*16 transforms to do -+ # r3 Stride of coefficients (==32) -+ # r4 TRANS_RND1 (64) -+ # r5 TRANS_RND2 -+ # r6 temporary used inside col_trans16 -+ # r7 16*16*2 total bytes in block -+ # r8 64*16 VRF switch locations -+ # r9 temporary in unpack_coeff for index -+ # r10 number of 16x16 transforms using compression -+ # r11 unpacked data buffer (16*16 shorts) (preceded by 16 shorts of packed data buffer) -+ # r12 temporary counter in unpack_coeff -+ # r13 -+ # r14 Save information for 32 bit transform (coeffs location) -+ # r15 Save information for 32 bit transform (number of transforms) -+ cmp r2,0 -+ beq done16x16s -+block_loop: -+ # With compressed coefficients, we don't use prefetch as we don't want to issue unnecessary memory requests -+ cmp r10,0 -+ mov r6, r1 -+ beq not_compressed -+ sub r10, 1 -+ bl unpack16x16 -+not_compressed: -+ #mov r6,r1 # DEBUG without compress -+ vldh HX(0++,0)+r0,(r6 += r3) REP 16 -+ #eor r0,r8 -+ #add r1,r7 -+ # Prefetch the next block -+ #bl unpack16x16 -+ #vldh HX(0++,0)+r0,(r6 += r3) REP 16 -+ #vmov HX(0++,0)+r0,0 REP 16 # DEBUG -+ #eor r0,r8 -+ #sub r1,r7 -+ -+ # Transform the current block -+ bl col_trans_16 -+ vadd HY(0++,0)+r0,HY(0++,0)+r0,r4 REP 16 # Now add on rounding, shift down by 7, and saturate -+ #vsasls HY(0++,0)+r0,HY(0++,0)+r0,9 REP 16 # 9+7=16 so this ends up with the output saturated and in the top half of the word. -+ vasl HY(0++,0)+r0,HY(0++,0)+r0,9 REP 16 # This should be saturating, but the instruction above does not assemble? -+ vmov VX(0,0++)+r0, HX(0++,32)+r0 REP 16 # For simplicity transpose this back to the original position -+ -+ bl col_trans_16 -+ vadd HY(0++,0)+r0,HY(0++,0)+r0,r5 REP 16 # Now add on rounding, shift down by 7, and saturate -+ #vsasls HY(0++,0)+r0,HY(0++,0)+r0,4 REP 16 # 4+12=16 so this ends up with the output saturated and in the top half of the word. -+ vasl HY(0++,0)+r0,HY(0++,0)+r0,TRANS_ASL2 REP 16 # This should be saturating, but the instruction above does not assemble? (Probably because it ends with ls which is interpreted as a condition flag) -+ -+ # Save results - note there has been a transposition during the processing so we save columns -+ vsth VX(0,32++)+r0, (r1 += r3) REP 16 -+ -+ # Move onto next block -+ eor r0,r8 -+ add r1,r7 -+ -+ addcmpbgt r2,-1,0,block_loop -+done16x16s: -+ -+ add sp,sp,64+16*16*2 # Move on stack pointer in case interrupt occurs and uses stack -+ # Now go and do any 32x32 transforms -+ b hevc_trans_32x32 -+ -+ pop r6-r15, pc -+# This returns a value in r6 that says where to load the data from. -+# We load data 16 shorts at a time from memory (uncached), and store to stack space to allow us to process it. -+unpack16x16: -+# Clear out destination -+ vmov HX(0,0)+r0,0 -+ mov r6, r11 -+ vsth HX(0,0)+r0,(r6 += r3) REP 16 -+ mov r5, r1 # Moving pointer to input coefficients -+unpack_outer_loop: -+ # Loop until we find the end -+ vldh HX(0,0)+r0,(r5) # TODO would prefetch help here while unpacking previous? -+ sub r6,r11,32 -+ #add r6,pc,packed_data-$ # Packed data -+ vsth HX(0,0)+r0,(r6) # Store into packed data -+ mov r12,0 -+unpack_loop: -+ ld r4,(r6) -+ add r6,r6,4 -+ lsr r9,r4,16 # r9 is destination value -+ cmp r4,0 # {value,index} -+ extu r4,8 -+ beq done_unpack -+ sth r9,(r11, r4) -+ addcmpblt r12,1,8,unpack_loop -+# # Read next 16 -+ add r5,32 -+ b unpack_outer_loop -+done_unpack: -+# # Set new load location -+ mov r6, r11 -+ #add r6,pc,unpacked_data-$ -+# # Restore constants -+ mov r4,64 -+ mov r5,TRANS_RND2 -+# pop r6-r15, pc -+ b lr -+ -+# r1,r2,r3 r7,r8 should be preserved -+# HX(0++,0)+r0 is the block to be transformed -+# HX(32++,0)+r6 is the 16x16 matrix of transform coefficients -+# Use HY(48,0) for intermediate results -+# r0 can be used, but should be returned to its original value at the end -+col_trans_16: -+ add r6,r0,16 # Final value for this loop -+col_trans_16_loop: -+ # First compute partial products for a single column -+ vmul32s HY(48++,0), VX(0,0)+r0, VX(32,0++) REP 16 -+ # Then sum up the results and place back -+ vadd VY(0,0)+r0, VY(48,0++), VY(48,8++) REP 8 CLRA SACC -+ addcmpblt r0,1,r6,col_trans_16_loop -+ sub r0,16 # put r0 back to its original value -+ b lr -+ -+col_trans_odd_16: -+ add r6,r0,16 # Final value for this loop -+col_trans_odd_16_loop: -+ # First compute partial products for a single column -+ vmul32s HY(48++,0), VX(0,0)+r0, VX(32,32++) REP 16 -+ # Then sum up the results and place back -+ vadd VY(0,0)+r0, VY(48,0++), VY(48,8++) REP 8 CLRA SACC -+ addcmpblt r0,1,r6,col_trans_odd_16_loop -+ sub r0,16 # put r0 back to its original value -+ b lr -+ -+# r1/r10 input pointer -+# r0,r4,r5,r6 free -+# r8/r9 output storage -+# -+# Store packed coefficients at r9-32 -+# Store unpacked at r9+32*32 (because transform works on even/odd rows on input, but writes all rows) -+unpack32x32: -+# Clear out destination -+ vmov HX(0,0),0 -+ add r0, r9, 32*32*2 # Unpacked buffer -+ mov r4, 32 -+ vsth HX(0,0),(r0 += r4) REP 64 -+unpack_outer_loop32: -+ # Loop until we find the end -+ vldh HX(0,0),(r1) # TODO would prefetch help here while unpacking previous? -+ sub r6,r9,32 -+ #add r6,pc,packed_data-$ # Packed data -+ vsth HX(0,0),(r6) # Store into packed data -+ mov r8,0 -+unpack_loop32: -+ ld r4,(r6) -+ add r6,r6,4 -+ lsr r5,r4,16 # r5 is destination value -+ cmp r4,0 # {value,index} -+ extu r4,10 -+ beq done_unpack -+ sth r5,(r0, r4) -+ addcmpblt r8,1,8,unpack_loop32 -+# # Read next 16 -+ add r1,32 -+ b unpack_outer_loop32 -+done_unpack32: -+ b lr -+# hevc_trans_32x32(short *transMatrix2, short *coeffs, int num) -+# transMatrix2: address of the constant matrix (must be at 32 byte aligned address in Videocore memory) Even followed by odd -+# coeffs: address of the transform coefficients (must be at 32 byte aligned address in Videocore memory) -+# num: number of 16x16 transforms to be done in low 16, number of packed in high 16 -+# -+# Note that the 32x32 transforms are stored in reverse order, this means that the unpacked ones appear first! -+hevc_trans_32x32: -+ mov r1,r14 # coeffs -+ mov r2,r15 # num -+ lsr r15,r15,16 # Number that are packed -+ extu r2,16 # Total number -+ -+ # Fetch odd transform matrix -+ #mov r3, 16*2 # Stride of transMatrix2 in bytes (and of coefficients) -+ #vldh HX(32++,0),(r0 += r3) REP 16 # This is the even 16x16 matrix -+ #add r0, 16*16*2 -+ #vldh HX(32++,32),(r0 += r3) REP 16 # This is the odd 16x16 matrix -+ -+ mov r3, 32*2*2 # Stride used to fetch alternate rows of our input coefficient buffer -+ mov r7, 16*16*2 # Total block size -+ -+.if USE_STACK -+ # Stack base allocation -+ sub sp,sp,32*32*4+64 # Allocate some space on the stack for us to store 32*32 shorts as temporary results (needs to be aligned) and another 32*32 for unpacking -+ # set r8 to 32byte aligned stack pointer with 32 bytes of space before it -+ add r8,sp,63 -+ lsr r8,5 -+ lsl r8,5 -+.else -+#:version r8 -+ .half 0x00e8 #AUTOINSERTED -+ btst r8,16 -+#:add r8,pc,intermediate_results-$ -+ .half 0xbfe8 -+ .half intermediate_results-($-2) -+ beq on_vpu1 -+ add r8,r8,32*32*2*2+16*2 # Move to secondary storage -+on_vpu1: -+.endif -+ mov r9,r8 # Backup of the temporary storage -+ mov r10,r1 # Backup of the coefficient buffer -+ -+ cmp r2,0 -+ beq done32x32s -+block_loop32: -+ -+ # Transform the first 16 columns -+ mov r1,r10 # Input Coefficient buffer -+ mov r8,r9 # Output temporary storage -+ # Unpacked are first, so need to only do unpacking when r2(=num left) <= r15 (=num packed) -+ cmp r2,r15 -+ bgt not_compressed_32 -+ bl unpack32x32 -+ add r1,r9,32*32*2 # Uncompressed into temporary storage -+ mov r8,r9 # Transform into here -+not_compressed_32: -+ # COLUMN TRANSFORM -+ mov r4, 64 # Constant used for rounding first pass -+ mov r5, 9 # left shift used for rounding first pass -+ -+ bl trans32 -+ # Transform the second 16 columns -+ add r8,32*16*2 -+ add r1,32 -+ bl trans32 -+ -+ # ROW TRANSFORM -+ mov r4, TRANS_RND2 # Constant used for rounding second pass -+ mov r5, TRANS_ASL2 # left shift used for rounding second pass -+ -+ mov r1,r9 # Input temporary storage -+ mov r8,r10 # Output Coefficient buffer -+ bl trans32 -+ # Transform the second 16 columns -+ add r8,32*16*2 -+ add r1,32 -+ bl trans32 -+ -+ add r10, 32*32*2 # move onto next block of coefficients -+ addcmpbgt r2,-1,0,block_loop32 -+done32x32s: -+ -+.if USE_STACK -+ add sp,sp,32*32*4+64# Restore stack -+.endif -+ -+ pop r6-r15, pc -+ -+trans32: -+ push lr -+ # We can no longer afford the VRF space to do prefetching when doing 32x32 -+ # Fetch the even rows -+ vldh HX(0++,0),(r1 += r3) REP 16 -+ # Fetch the odd rows -+ vldh HX(16++,0),64(r1 += r3) REP 16 # First odd row is 32 shorts ahead of r1 -+ -+ # Transform the even rows using even matrix -+ mov r0, 0 # Even rows -+ bl col_trans_16 -+ -+ # Now transform the odd rows using odd matrix -+ mov r0, 64*16 # Odd rows -+ bl col_trans_odd_16 -+ -+ # Now apply butterfly to compute the first 16 results -+ vadd HY(48++,0),HY(0++,0),HY(16++,0) REP 16 -+ vadd HY(48++,0),HY(48++,0),r4 REP 16 # add on rounding, -+ vasl HY(48++,0),HY(48++,0),r5 REP 16 # shift down by 7, and saturate -+ # 16bit results now in HX(48,32) -+ mov r0,r8 -+ mov r6,32*2 -+ vsth VX(48,32++),(r0+=r6) REP 16 -+ -+ # Now apply butterfly to compute the second 16 results (in reverse order) -+ vsub HY(63,0),HY(0 ,0),HY(16,0) -+ vsub HY(62,0),HY(1 ,0),HY(17,0) -+ vsub HY(61,0),HY(2 ,0),HY(18,0) -+ vsub HY(60,0),HY(3 ,0),HY(19,0) -+ vsub HY(59,0),HY(4 ,0),HY(20,0) -+ vsub HY(58,0),HY(5 ,0),HY(21,0) -+ vsub HY(57,0),HY(6 ,0),HY(22,0) -+ vsub HY(56,0),HY(7 ,0),HY(23,0) -+ vsub HY(55,0),HY(8 ,0),HY(24,0) -+ vsub HY(54,0),HY(9 ,0),HY(25,0) -+ vsub HY(53,0),HY(10,0),HY(26,0) -+ vsub HY(52,0),HY(11,0),HY(27,0) -+ vsub HY(51,0),HY(12,0),HY(28,0) -+ vsub HY(50,0),HY(13,0),HY(29,0) -+ vsub HY(49,0),HY(14,0),HY(30,0) -+ vsub HY(48,0),HY(15,0),HY(31,0) -+ vadd HY(48++,0),HY(48++,0),r4 REP 16 # add on rounding, -+ vasl HY(48++,0),HY(48++,0),r5 REP 16 # shift down by 7, and saturate -+ add r0,r8,32 -+ vsth VX(48,32++),(r0+=r6) REP 16 -+ pop pc -+ -+.if USE_STACK == 0 -+ .balign 32 -+ -+# .space directives generate 0's in the bin so avoid unnecessary padding by -+# just setting to appropriate value -+.equ intermediate_results, $+16*2 -+ -+# Layout goes: -+# -+#packed_buffer: -+# .space 16*2 -+#intermediate_results: -+# .space 32*32*2 -+#unpacked_buffer: -+# .space 32*32*2 -+# -+#packed_buffer2: -+# .space 16*2 -+#intermediate_results2: -+# .space 32*32*2 -+#unpacked_buffer2: -+# .space 32*32*2 -+.endif -+ -+ ---- /dev/null -+++ b/libavcodec/rpi_hevc_transform10.h -@@ -0,0 +1,94 @@ -+static const unsigned char rpi_hevc_transform10 [] = { -+0xa9, 0x03, 0x3e, 0x40, 0x4f, 0x40, 0x03, 0xb0, // 0000 -+0x20, 0x00, 0x0c, 0xf8, 0x38, 0x88, 0x80, 0x03, // 0008 -+0xc0, 0xf8, 0x00, 0x00, 0x40, 0xb0, 0x00, 0x02, // 0010 -+0x0c, 0xf8, 0x38, 0xa8, 0x80, 0x03, 0xc0, 0xf8, // 0018 -+0x00, 0x00, 0x00, 0x60, 0x03, 0xb0, 0x20, 0x00, // 0020 -+0x07, 0xb0, 0x00, 0x02, 0x08, 0xb0, 0x00, 0x04, // 0028 -+0x04, 0xb0, 0x40, 0x00, 0x05, 0xb0, 0x00, 0x02, // 0030 -+0x59, 0xb0, 0xc0, 0xfd, 0x0b, 0x12, 0x5b, 0x7a, // 0038 -+0x5b, 0x7c, 0x4a, 0xc3, 0x50, 0x17, 0x02, 0x6f, // 0040 -+0x02, 0x6a, 0x32, 0x18, 0x0a, 0x6a, 0x16, 0x40, // 0048 -+0x04, 0x18, 0x1a, 0x66, 0x80, 0x90, 0x32, 0x00, // 0050 -+0x0c, 0xf8, 0x38, 0x80, 0x80, 0x03, 0xc0, 0x08, // 0058 -+0x18, 0x00, 0x80, 0x90, 0x51, 0x00, 0x04, 0xff, // 0060 -+0x30, 0xc0, 0x80, 0x03, 0x20, 0x08, 0x10, 0x00, // 0068 -+0x4c, 0xfe, 0x30, 0xc0, 0x09, 0x04, 0x20, 0x08, // 0070 -+0x00, 0x00, 0x04, 0xfc, 0x38, 0x90, 0x80, 0x02, // 0078 -+0xc0, 0x0b, 0x02, 0x00, 0x80, 0x90, 0x40, 0x00, // 0080 -+0x04, 0xff, 0x30, 0xc0, 0x80, 0x03, 0x20, 0x08, // 0088 -+0x14, 0x00, 0x4c, 0xfe, 0x30, 0xc0, 0x06, 0x04, // 0090 -+0x20, 0x08, 0x00, 0x00, 0x8c, 0xf8, 0x2c, 0xe0, // 0098 -+0x80, 0x03, 0x20, 0x30, 0x04, 0x00, 0x80, 0x45, // 00a0 -+0x71, 0x42, 0xf2, 0x8c, 0xd1, 0xc0, 0x59, 0xb0, // 00a8 -+0x40, 0x02, 0x00, 0x9e, 0x6d, 0x00, 0x29, 0x03, // 00b0 -+0x00, 0xf4, 0x38, 0x80, 0x00, 0x0c, 0xb6, 0x40, // 00b8 -+0x8c, 0xf8, 0x20, 0xe0, 0x80, 0x03, 0x00, 0x30, // 00c0 -+0x18, 0x00, 0x15, 0x40, 0x08, 0xf0, 0x38, 0x80, // 00c8 -+0x85, 0x0b, 0x66, 0xb5, 0xe0, 0xff, 0x88, 0xf0, // 00d0 -+0x24, 0xe0, 0x86, 0x03, 0x0c, 0x60, 0x64, 0x08, // 00d8 -+0x46, 0x62, 0x49, 0xc3, 0x50, 0x27, 0x04, 0x6a, // 00e0 -+0x84, 0x6e, 0x07, 0x18, 0x69, 0xa0, 0x04, 0x5f, // 00e8 -+0x1c, 0x8b, 0xf7, 0xc8, 0x45, 0x76, 0x6b, 0x1f, // 00f0 -+0xb6, 0x40, 0x04, 0xb0, 0x40, 0x00, 0x05, 0xb0, // 00f8 -+0x00, 0x02, 0x5a, 0x00, 0x06, 0xb4, 0x10, 0x00, // 0100 -+0xa4, 0xff, 0x24, 0xcc, 0x60, 0x02, 0x00, 0xf8, // 0108 -+0x3e, 0x00, 0x03, 0xff, 0x37, 0xd0, 0x78, 0x03, // 0110 -+0xe0, 0x03, 0xbe, 0x0b, 0x10, 0x8b, 0xf6, 0x5b, // 0118 -+0x00, 0x67, 0x5a, 0x00, 0x06, 0xb4, 0x10, 0x00, // 0120 -+0xa4, 0xff, 0x24, 0xcc, 0xe0, 0x02, 0x00, 0xf8, // 0128 -+0x3e, 0x00, 0x03, 0xff, 0x37, 0xd0, 0x78, 0x03, // 0130 -+0xe0, 0x03, 0xbe, 0x0b, 0x10, 0x8b, 0xf6, 0x5b, // 0138 -+0x00, 0x67, 0x5a, 0x00, 0x00, 0xf4, 0x38, 0x80, // 0140 -+0x00, 0x04, 0x20, 0xb5, 0x00, 0x08, 0x04, 0xb0, // 0148 -+0x20, 0x00, 0x8e, 0xf8, 0x20, 0xe0, 0x80, 0x03, // 0150 -+0xc0, 0x43, 0x00, 0x00, 0x08, 0xf0, 0x38, 0x80, // 0158 -+0x81, 0x03, 0x26, 0xb5, 0xe0, 0xff, 0x88, 0xf0, // 0160 -+0x20, 0xe0, 0x86, 0x03, 0x08, 0x60, 0x64, 0x08, // 0168 -+0x46, 0x62, 0x45, 0xc3, 0x50, 0x27, 0x04, 0x6a, // 0170 -+0xa4, 0x6e, 0x7f, 0x90, 0xbf, 0xff, 0x65, 0xa0, // 0178 -+0x04, 0x07, 0x18, 0x8b, 0xf6, 0xc8, 0x41, 0x76, // 0180 -+0x6a, 0x1f, 0x5a, 0x00, 0xe1, 0x40, 0xf2, 0x40, // 0188 -+0x0f, 0x7b, 0x02, 0x6f, 0x03, 0xb0, 0x80, 0x00, // 0190 -+0x07, 0xb0, 0x00, 0x02, 0xe8, 0x00, 0x08, 0x6d, // 0198 -+0xe8, 0xbf, 0x60, 0x01, 0x03, 0x18, 0x48, 0xb0, // 01a0 -+0x20, 0x10, 0x89, 0x40, 0x1a, 0x40, 0x02, 0x6a, // 01a8 -+0x24, 0x18, 0xa1, 0x40, 0x98, 0x40, 0xf2, 0x4a, // 01b0 -+0x06, 0x1e, 0xff, 0x9f, 0xc5, 0xff, 0x21, 0xb5, // 01b8 -+0x00, 0x08, 0x98, 0x40, 0x04, 0xb0, 0x40, 0x00, // 01c0 -+0x95, 0x60, 0x80, 0x90, 0x18, 0x00, 0x48, 0xb0, // 01c8 -+0x00, 0x04, 0x41, 0x76, 0x80, 0x90, 0x13, 0x00, // 01d0 -+0x04, 0xb0, 0x00, 0x02, 0x65, 0x60, 0x91, 0x40, // 01d8 -+0xa8, 0x40, 0x80, 0x90, 0x0c, 0x00, 0x48, 0xb0, // 01e0 -+0x00, 0x04, 0x41, 0x76, 0x80, 0x90, 0x07, 0x00, // 01e8 -+0x4a, 0xb0, 0x00, 0x08, 0xf2, 0x8c, 0xdf, 0xc0, // 01f0 -+0x29, 0x03, 0xef, 0x03, 0x0c, 0xf8, 0x38, 0x80, // 01f8 -+0x80, 0x03, 0xc0, 0xf8, 0x04, 0x00, 0x0c, 0xf8, // 0200 -+0x38, 0x84, 0xc0, 0x03, 0xc0, 0xf8, 0x04, 0x00, // 0208 -+0x00, 0x60, 0xff, 0x9f, 0x79, 0xff, 0x00, 0xb0, // 0210 -+0x00, 0x04, 0xff, 0x9f, 0x85, 0xff, 0x04, 0xff, // 0218 -+0x30, 0xcc, 0x10, 0x03, 0xe0, 0xfb, 0x3e, 0x00, // 0220 -+0x04, 0xff, 0x33, 0xcc, 0x80, 0x03, 0xe0, 0xfb, // 0228 -+0x10, 0x00, 0x4c, 0xfe, 0x33, 0xcc, 0x80, 0x03, // 0230 -+0xe0, 0xfb, 0x14, 0x00, 0x80, 0x40, 0x06, 0xb0, // 0238 -+0x40, 0x00, 0x8c, 0xf8, 0x2f, 0xe0, 0x80, 0x03, // 0240 -+0xe0, 0x63, 0x00, 0x00, 0x20, 0xf7, 0xf0, 0xcf, // 0248 -+0x10, 0x03, 0x20, 0xf7, 0xb0, 0xcf, 0x11, 0x13, // 0250 -+0x20, 0xf7, 0x70, 0xcf, 0x12, 0x23, 0x20, 0xf7, // 0258 -+0x30, 0xcf, 0x13, 0x33, 0x20, 0xf7, 0xf0, 0xce, // 0260 -+0x14, 0x43, 0x20, 0xf7, 0xb0, 0xce, 0x15, 0x53, // 0268 -+0x20, 0xf7, 0x70, 0xce, 0x16, 0x63, 0x20, 0xf7, // 0270 -+0x30, 0xce, 0x17, 0x73, 0x20, 0xf7, 0xf0, 0xcd, // 0278 -+0x18, 0x83, 0x20, 0xf7, 0xb0, 0xcd, 0x19, 0x93, // 0280 -+0x20, 0xf7, 0x70, 0xcd, 0x1a, 0xa3, 0x20, 0xf7, // 0288 -+0x30, 0xcd, 0x1b, 0xb3, 0x20, 0xf7, 0xf0, 0xcc, // 0290 -+0x1c, 0xc3, 0x20, 0xf7, 0xb0, 0xcc, 0x1d, 0xd3, // 0298 -+0x20, 0xf7, 0x70, 0xcc, 0x1e, 0xe3, 0x20, 0xf7, // 02a0 -+0x30, 0xcc, 0x1f, 0xf3, 0x04, 0xff, 0x33, 0xcc, // 02a8 -+0x80, 0x03, 0xe0, 0xfb, 0x10, 0x00, 0x4c, 0xfe, // 02b0 -+0x33, 0xcc, 0x80, 0x03, 0xe0, 0xfb, 0x14, 0x00, // 02b8 -+0x00, 0xb5, 0x20, 0x00, 0x8c, 0xf8, 0x2f, 0xe0, // 02c0 -+0x80, 0x03, 0xe0, 0x63, 0x00, 0x00, 0x6f, 0x03, // 02c8 -+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 02d0 -+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 02d8 -+}; ---- /dev/null -+++ b/libavcodec/rpi_hevc_transform8.h -@@ -0,0 +1,94 @@ -+static const unsigned char rpi_hevc_transform8 [] = { -+0xa9, 0x03, 0x3e, 0x40, 0x4f, 0x40, 0x03, 0xb0, // 0000 -+0x20, 0x00, 0x0c, 0xf8, 0x38, 0x88, 0x80, 0x03, // 0008 -+0xc0, 0xf8, 0x00, 0x00, 0x40, 0xb0, 0x00, 0x02, // 0010 -+0x0c, 0xf8, 0x38, 0xa8, 0x80, 0x03, 0xc0, 0xf8, // 0018 -+0x00, 0x00, 0x00, 0x60, 0x03, 0xb0, 0x20, 0x00, // 0020 -+0x07, 0xb0, 0x00, 0x02, 0x08, 0xb0, 0x00, 0x04, // 0028 -+0x04, 0xb0, 0x40, 0x00, 0x05, 0xb0, 0x00, 0x08, // 0030 -+0x59, 0xb0, 0xc0, 0xfd, 0x0b, 0x12, 0x5b, 0x7a, // 0038 -+0x5b, 0x7c, 0x4a, 0xc3, 0x50, 0x17, 0x02, 0x6f, // 0040 -+0x02, 0x6a, 0x32, 0x18, 0x0a, 0x6a, 0x16, 0x40, // 0048 -+0x04, 0x18, 0x1a, 0x66, 0x80, 0x90, 0x32, 0x00, // 0050 -+0x0c, 0xf8, 0x38, 0x80, 0x80, 0x03, 0xc0, 0x08, // 0058 -+0x18, 0x00, 0x80, 0x90, 0x51, 0x00, 0x04, 0xff, // 0060 -+0x30, 0xc0, 0x80, 0x03, 0x20, 0x08, 0x10, 0x00, // 0068 -+0x4c, 0xfe, 0x30, 0xc0, 0x09, 0x04, 0x20, 0x08, // 0070 -+0x00, 0x00, 0x04, 0xfc, 0x38, 0x90, 0x80, 0x02, // 0078 -+0xc0, 0x0b, 0x02, 0x00, 0x80, 0x90, 0x40, 0x00, // 0080 -+0x04, 0xff, 0x30, 0xc0, 0x80, 0x03, 0x20, 0x08, // 0088 -+0x14, 0x00, 0x4c, 0xfe, 0x30, 0xc0, 0x04, 0x04, // 0090 -+0x20, 0x08, 0x00, 0x00, 0x8c, 0xf8, 0x2c, 0xe0, // 0098 -+0x80, 0x03, 0x20, 0x30, 0x04, 0x00, 0x80, 0x45, // 00a0 -+0x71, 0x42, 0xf2, 0x8c, 0xd1, 0xc0, 0x59, 0xb0, // 00a8 -+0x40, 0x02, 0x00, 0x9e, 0x6d, 0x00, 0x29, 0x03, // 00b0 -+0x00, 0xf4, 0x38, 0x80, 0x00, 0x0c, 0xb6, 0x40, // 00b8 -+0x8c, 0xf8, 0x20, 0xe0, 0x80, 0x03, 0x00, 0x30, // 00c0 -+0x18, 0x00, 0x15, 0x40, 0x08, 0xf0, 0x38, 0x80, // 00c8 -+0x85, 0x0b, 0x66, 0xb5, 0xe0, 0xff, 0x88, 0xf0, // 00d0 -+0x24, 0xe0, 0x86, 0x03, 0x0c, 0x60, 0x64, 0x08, // 00d8 -+0x46, 0x62, 0x49, 0xc3, 0x50, 0x27, 0x04, 0x6a, // 00e0 -+0x84, 0x6e, 0x07, 0x18, 0x69, 0xa0, 0x04, 0x5f, // 00e8 -+0x1c, 0x8b, 0xf7, 0xc8, 0x45, 0x76, 0x6b, 0x1f, // 00f0 -+0xb6, 0x40, 0x04, 0xb0, 0x40, 0x00, 0x05, 0xb0, // 00f8 -+0x00, 0x08, 0x5a, 0x00, 0x06, 0xb4, 0x10, 0x00, // 0100 -+0xa4, 0xff, 0x24, 0xcc, 0x60, 0x02, 0x00, 0xf8, // 0108 -+0x3e, 0x00, 0x03, 0xff, 0x37, 0xd0, 0x78, 0x03, // 0110 -+0xe0, 0x03, 0xbe, 0x0b, 0x10, 0x8b, 0xf6, 0x5b, // 0118 -+0x00, 0x67, 0x5a, 0x00, 0x06, 0xb4, 0x10, 0x00, // 0120 -+0xa4, 0xff, 0x24, 0xcc, 0xe0, 0x02, 0x00, 0xf8, // 0128 -+0x3e, 0x00, 0x03, 0xff, 0x37, 0xd0, 0x78, 0x03, // 0130 -+0xe0, 0x03, 0xbe, 0x0b, 0x10, 0x8b, 0xf6, 0x5b, // 0138 -+0x00, 0x67, 0x5a, 0x00, 0x00, 0xf4, 0x38, 0x80, // 0140 -+0x00, 0x04, 0x20, 0xb5, 0x00, 0x08, 0x04, 0xb0, // 0148 -+0x20, 0x00, 0x8e, 0xf8, 0x20, 0xe0, 0x80, 0x03, // 0150 -+0xc0, 0x43, 0x00, 0x00, 0x08, 0xf0, 0x38, 0x80, // 0158 -+0x81, 0x03, 0x26, 0xb5, 0xe0, 0xff, 0x88, 0xf0, // 0160 -+0x20, 0xe0, 0x86, 0x03, 0x08, 0x60, 0x64, 0x08, // 0168 -+0x46, 0x62, 0x45, 0xc3, 0x50, 0x27, 0x04, 0x6a, // 0170 -+0xa4, 0x6e, 0x7f, 0x90, 0xbf, 0xff, 0x65, 0xa0, // 0178 -+0x04, 0x07, 0x18, 0x8b, 0xf6, 0xc8, 0x41, 0x76, // 0180 -+0x6a, 0x1f, 0x5a, 0x00, 0xe1, 0x40, 0xf2, 0x40, // 0188 -+0x0f, 0x7b, 0x02, 0x6f, 0x03, 0xb0, 0x80, 0x00, // 0190 -+0x07, 0xb0, 0x00, 0x02, 0xe8, 0x00, 0x08, 0x6d, // 0198 -+0xe8, 0xbf, 0x60, 0x01, 0x03, 0x18, 0x48, 0xb0, // 01a0 -+0x20, 0x10, 0x89, 0x40, 0x1a, 0x40, 0x02, 0x6a, // 01a8 -+0x24, 0x18, 0xa1, 0x40, 0x98, 0x40, 0xf2, 0x4a, // 01b0 -+0x06, 0x1e, 0xff, 0x9f, 0xc5, 0xff, 0x21, 0xb5, // 01b8 -+0x00, 0x08, 0x98, 0x40, 0x04, 0xb0, 0x40, 0x00, // 01c0 -+0x95, 0x60, 0x80, 0x90, 0x18, 0x00, 0x48, 0xb0, // 01c8 -+0x00, 0x04, 0x41, 0x76, 0x80, 0x90, 0x13, 0x00, // 01d0 -+0x04, 0xb0, 0x00, 0x08, 0x45, 0x60, 0x91, 0x40, // 01d8 -+0xa8, 0x40, 0x80, 0x90, 0x0c, 0x00, 0x48, 0xb0, // 01e0 -+0x00, 0x04, 0x41, 0x76, 0x80, 0x90, 0x07, 0x00, // 01e8 -+0x4a, 0xb0, 0x00, 0x08, 0xf2, 0x8c, 0xdf, 0xc0, // 01f0 -+0x29, 0x03, 0xef, 0x03, 0x0c, 0xf8, 0x38, 0x80, // 01f8 -+0x80, 0x03, 0xc0, 0xf8, 0x04, 0x00, 0x0c, 0xf8, // 0200 -+0x38, 0x84, 0xc0, 0x03, 0xc0, 0xf8, 0x04, 0x00, // 0208 -+0x00, 0x60, 0xff, 0x9f, 0x79, 0xff, 0x00, 0xb0, // 0210 -+0x00, 0x04, 0xff, 0x9f, 0x85, 0xff, 0x04, 0xff, // 0218 -+0x30, 0xcc, 0x10, 0x03, 0xe0, 0xfb, 0x3e, 0x00, // 0220 -+0x04, 0xff, 0x33, 0xcc, 0x80, 0x03, 0xe0, 0xfb, // 0228 -+0x10, 0x00, 0x4c, 0xfe, 0x33, 0xcc, 0x80, 0x03, // 0230 -+0xe0, 0xfb, 0x14, 0x00, 0x80, 0x40, 0x06, 0xb0, // 0238 -+0x40, 0x00, 0x8c, 0xf8, 0x2f, 0xe0, 0x80, 0x03, // 0240 -+0xe0, 0x63, 0x00, 0x00, 0x20, 0xf7, 0xf0, 0xcf, // 0248 -+0x10, 0x03, 0x20, 0xf7, 0xb0, 0xcf, 0x11, 0x13, // 0250 -+0x20, 0xf7, 0x70, 0xcf, 0x12, 0x23, 0x20, 0xf7, // 0258 -+0x30, 0xcf, 0x13, 0x33, 0x20, 0xf7, 0xf0, 0xce, // 0260 -+0x14, 0x43, 0x20, 0xf7, 0xb0, 0xce, 0x15, 0x53, // 0268 -+0x20, 0xf7, 0x70, 0xce, 0x16, 0x63, 0x20, 0xf7, // 0270 -+0x30, 0xce, 0x17, 0x73, 0x20, 0xf7, 0xf0, 0xcd, // 0278 -+0x18, 0x83, 0x20, 0xf7, 0xb0, 0xcd, 0x19, 0x93, // 0280 -+0x20, 0xf7, 0x70, 0xcd, 0x1a, 0xa3, 0x20, 0xf7, // 0288 -+0x30, 0xcd, 0x1b, 0xb3, 0x20, 0xf7, 0xf0, 0xcc, // 0290 -+0x1c, 0xc3, 0x20, 0xf7, 0xb0, 0xcc, 0x1d, 0xd3, // 0298 -+0x20, 0xf7, 0x70, 0xcc, 0x1e, 0xe3, 0x20, 0xf7, // 02a0 -+0x30, 0xcc, 0x1f, 0xf3, 0x04, 0xff, 0x33, 0xcc, // 02a8 -+0x80, 0x03, 0xe0, 0xfb, 0x10, 0x00, 0x4c, 0xfe, // 02b0 -+0x33, 0xcc, 0x80, 0x03, 0xe0, 0xfb, 0x14, 0x00, // 02b8 -+0x00, 0xb5, 0x20, 0x00, 0x8c, 0xf8, 0x2f, 0xe0, // 02c0 -+0x80, 0x03, 0xe0, 0x63, 0x00, 0x00, 0x6f, 0x03, // 02c8 -+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 02d0 -+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 02d8 -+}; ---- /dev/null -+++ b/libavcodec/rpi_hevcdec.c -@@ -0,0 +1,6134 @@ -+/* -+ * HEVC video Decoder -+ * -+ * Copyright (C) 2012 - 2013 Guillaume Martres -+ * Copyright (C) 2012 - 2013 Mickael Raulet -+ * Copyright (C) 2012 - 2013 Gildas Cocherel -+ * Copyright (C) 2012 - 2013 Wassim Hamidouche -+ * Copyright (C) 2018 John Cox, Ben Avison, Peter de Rivaz for Raspberry Pi (Trading) -+ * -+ * This file is part of FFmpeg. -+ * -+ * FFmpeg is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * FFmpeg is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with FFmpeg; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+ */ -+ -+#include "libavutil/attributes.h" -+#include "libavutil/common.h" -+#include "libavutil/display.h" -+#include "libavutil/internal.h" -+#include "libavutil/mastering_display_metadata.h" -+#include "libavutil/md5.h" -+#include "libavutil/opt.h" -+#include "libavutil/pixdesc.h" -+#include "libavutil/stereo3d.h" -+ -+#include "decode.h" -+#include "bswapdsp.h" -+#include "bytestream.h" -+#include "golomb.h" -+#include "hevc.h" -+#include "rpi_hevc_data.h" -+#include "rpi_hevc_parse.h" -+#include "rpi_hevcdec.h" -+#include "rpi_hevc_cabac_fns.h" -+#include "profiles.h" -+#include "hwconfig.h" -+ -+#include "rpi_zc_frames.h" -+#include "rpi_qpu.h" -+#include "rpi_hevc_shader.h" -+#include "rpi_hevc_shader_cmd.h" -+#include "rpi_hevc_shader_template.h" -+#include "rpi_zc.h" -+#include "libavutil/rpi_sand_fns.h" -+ -+#include "pthread.h" -+#include -+ -+#define DEBUG_DECODE_N 0 // 0 = do all, n = frames idr onwards -+ -+#define PACK2(hi,lo) (((hi) << 16) | ((lo) & 0xffff)) -+ -+#ifndef av_mod_uintp2 -+static av_always_inline av_const unsigned av_mod_uintp2_c(unsigned a, unsigned p) -+{ -+ return a & ((1 << p) - 1); -+} -+# define av_mod_uintp2 av_mod_uintp2_c -+#endif -+ -+const uint8_t ff_hevc_rpi_pel_weight[65] = { [2] = 0, [4] = 1, [6] = 2, [8] = 3, [12] = 4, [16] = 5, [24] = 6, [32] = 7, [48] = 8, [64] = 9 }; -+static void rpi_begin(const HEVCRpiContext * const s, HEVCRpiJob * const jb, const unsigned int ctu_ts_first); -+ -+#define MC_DUMMY_X (-32) -+#define MC_DUMMY_Y (-32) -+ -+// UV & Y both have min 4x4 pred (no 2x2 chroma) -+// Allow for even spread +1 for setup, +1 for rounding -+// As we have load sharing this can (in theory) be exceeded so we have to -+// check after each CTU, but it is a good base size -+ -+// Worst case (all 4x4) commands per CTU -+#define QPU_Y_CMD_PER_CTU_MAX (16 * 16) -+#define QPU_C_CMD_PER_CTU_MAX (8 * 8) -+ -+#define QPU_MAX_CTU_PER_LINE ((HEVC_RPI_MAX_WIDTH + 63) / 64) -+ -+#define QPU_GRPS (QPU_N_MAX / QPU_N_GRP) -+#define QPU_CTU_PER_GRP ((QPU_MAX_CTU_PER_LINE + QPU_GRPS - 1) / QPU_GRPS) -+ -+#define QPU_Y_CMD_SLACK_PER_Q (QPU_Y_CMD_PER_CTU_MAX / 2) -+#define QPU_C_CMD_SLACK_PER_Q (QPU_C_CMD_PER_CTU_MAX / 2) -+ -+// Total cmds to allocate - allow for slack & setup -+#define QPU_Y_COMMANDS (QPU_CTU_PER_GRP * QPU_GRPS * QPU_Y_CMD_PER_CTU_MAX + (1 + QPU_Y_CMD_SLACK_PER_Q) * QPU_N_MAX) -+#define QPU_C_COMMANDS (QPU_CTU_PER_GRP * QPU_GRPS * QPU_C_CMD_PER_CTU_MAX + (1 + QPU_C_CMD_SLACK_PER_Q) * QPU_N_MAX) -+ -+#define QPU_Y_SYNCS (QPU_N_MAX * (16 + 2)) -+#define QPU_C_SYNCS (QPU_N_MAX * (8 + 2)) -+ -+// The QPU code for UV blocks only works up to a block width of 8 -+#define RPI_CHROMA_BLOCK_WIDTH 8 -+ -+#define ENCODE_COEFFS(c0, c1, c2, c3) (((c0) & 0xff) | ((c1) & 0xff) << 8 | ((c2) & 0xff) << 16 | ((c3) & 0xff) << 24) -+ -+ -+// Actual filter goes -ve, +ve, +ve, -ve using these values -+static const uint32_t rpi_filter_coefs[8] = { -+ ENCODE_COEFFS( 0, 64, 0, 0), -+ ENCODE_COEFFS( 2, 58, 10, 2), -+ ENCODE_COEFFS( 4, 54, 16, 2), -+ ENCODE_COEFFS( 6, 46, 28, 4), -+ ENCODE_COEFFS( 4, 36, 36, 4), -+ ENCODE_COEFFS( 4, 28, 46, 6), -+ ENCODE_COEFFS( 2, 16, 54, 4), -+ ENCODE_COEFFS( 2, 10, 58, 2) -+}; -+ -+// Function arrays by QPU -+ -+static const int * const inter_pred_setup_c_qpu[12] = { -+ mc_setup_c_q0, mc_setup_c_qn, mc_setup_c_qn, mc_setup_c_qn, -+ mc_setup_c_qn, mc_setup_c_qn, mc_setup_c_qn, mc_setup_c_qn, -+ mc_setup_c_qn, mc_setup_c_qn, mc_setup_c_qn, mc_setup_c_qn -+}; -+ -+static const int * const inter_pred_setup_c10_qpu[12] = { -+ mc_setup_c10_q0, mc_setup_c10_qn, mc_setup_c10_qn, mc_setup_c10_qn, -+ mc_setup_c10_qn, mc_setup_c10_qn, mc_setup_c10_qn, mc_setup_c10_qn, -+ mc_setup_c10_qn, mc_setup_c10_qn, mc_setup_c10_qn, mc_setup_c10_qn -+}; -+ -+static const int * const inter_pred_setup_y_qpu[12] = { -+ mc_setup_y_q0, mc_setup_y_qn, mc_setup_y_qn, mc_setup_y_qn, -+ mc_setup_y_qn, mc_setup_y_qn, mc_setup_y_qn, mc_setup_y_qn, -+ mc_setup_y_qn, mc_setup_y_qn, mc_setup_y_qn, mc_setup_y_qn -+}; -+ -+static const int * const inter_pred_setup_y10_qpu[12] = { -+ mc_setup_y10_q0, mc_setup_y10_qn, mc_setup_y10_qn, mc_setup_y10_qn, -+ mc_setup_y10_qn, mc_setup_y10_qn, mc_setup_y10_qn, mc_setup_y10_qn, -+ mc_setup_y10_qn, mc_setup_y10_qn, mc_setup_y10_qn, mc_setup_y10_qn -+}; -+ -+static const int * const inter_pred_sync_qpu[12] = { -+ mc_sync_q0, mc_sync_q1, mc_sync_q2, mc_sync_q3, -+ mc_sync_q4, mc_sync_q5, mc_sync_q6, mc_sync_q7, -+ mc_sync_q8, mc_sync_q9, mc_sync_q10, mc_sync_q11 -+}; -+ -+static const int * const inter_pred_sync10_qpu[12] = { -+ mc_sync10_q0, mc_sync10_q1, mc_sync10_q2, mc_sync10_q3, -+ mc_sync10_q4, mc_sync10_q5, mc_sync10_q6, mc_sync10_q7, -+ mc_sync10_q8, mc_sync10_q9, mc_sync10_q10, mc_sync10_q11 -+}; -+ -+static const int * const inter_pred_exit_c_qpu[12] = { -+ mc_exit_c_q0, mc_exit_c_qn, mc_exit_c_qn, mc_exit_c_qn, -+ mc_exit_c_qn, mc_exit_c_qn, mc_exit_c_qn, mc_exit_c_qn, -+ mc_exit_c_qn, mc_exit_c_qn, mc_exit_c_qn, mc_exit_c_qn -+}; -+ -+static const int * const inter_pred_exit_c10_qpu[12] = { -+ mc_exit_c10_q0, mc_exit_c10_qn, mc_exit_c10_qn, mc_exit_c10_qn, -+ mc_exit_c10_qn, mc_exit_c10_qn, mc_exit_c10_qn, mc_exit_c10_qn, -+ mc_exit_c10_qn, mc_exit_c10_qn, mc_exit_c10_qn, mc_exit_c10_qn -+}; -+ -+static const int * const inter_pred_exit_y_qpu[12] = { -+ mc_exit_y_q0, mc_exit_y_qn, mc_exit_y_qn, mc_exit_y_qn, -+ mc_exit_y_qn, mc_exit_y_qn, mc_exit_y_qn, mc_exit_y_qn, -+ mc_exit_y_qn, mc_exit_y_qn, mc_exit_y_qn, mc_exit_y_qn -+}; -+ -+static const int * const inter_pred_exit_y10_qpu[12] = { -+ mc_exit_y10_q0, mc_exit_y10_qn, mc_exit_y10_qn, mc_exit_y10_qn, -+ mc_exit_y10_qn, mc_exit_y10_qn, mc_exit_y10_qn, mc_exit_y10_qn, -+ mc_exit_y10_qn, mc_exit_y10_qn, mc_exit_y10_qn, mc_exit_y10_qn -+}; -+ -+typedef struct ipe_chan_info_s -+{ -+ const uint8_t bit_depth; -+ const uint8_t n; -+ const int * const * setup_fns; -+ const int * const * sync_fns; -+ const int * const * exit_fns; -+} ipe_chan_info_t; -+ -+typedef struct ipe_init_info_s -+{ -+ ipe_chan_info_t luma; -+ ipe_chan_info_t chroma; -+} ipe_init_info_t; -+ -+static void set_bytes(uint8_t * b, const unsigned int stride, const int ln, unsigned int a) -+{ -+ switch (ln) -+ { -+ default: // normally 0 -+ *b = a; -+ break; -+ case 1: -+ a |= a << 8; -+ *(uint16_t *)b = a; -+ b += stride; -+ *(uint16_t *)b = a; -+ break; -+ case 2: -+ a |= a << 8; -+ a |= a << 16; -+ *(uint32_t *)b = a; -+ b += stride; -+ *(uint32_t *)b = a; -+ b += stride; -+ *(uint32_t *)b = a; -+ b += stride; -+ *(uint32_t *)b = a; -+ break; -+ case 3: -+ { -+ unsigned int i; -+ uint64_t d; -+ a |= a << 8; -+ a |= a << 16; -+ d = ((uint64_t)a << 32) | a; -+ for (i = 0; i != 8; ++i, b += stride) -+ *(uint64_t *)b = d; -+ break; -+ } -+ case 4: -+ { -+ unsigned int i; -+ uint64_t d; -+ a |= a << 8; -+ a |= a << 16; -+ d = ((uint64_t)a << 32) | a; -+ for (i = 0; i != 16; ++i, b += stride) -+ { -+ *(uint64_t *)b = d; -+ *(uint64_t *)(b + 8) = d; -+ } -+ break; -+ } -+ } -+} -+ -+// We expect this to be called with ln = (log2_cb_size - 3) so range = -1..3 -+// (4 not required) -+static void set_stash2(uint8_t * b_u, uint8_t * b_l, const int ln, unsigned int a) -+{ -+ switch (ln) -+ { -+ default: // 0 or -1 -+ *b_u = a; -+ *b_l = a; -+ break; -+ case 1: -+ a |= a << 8; -+ *(uint16_t *)b_u = a; -+ *(uint16_t *)b_l = a; -+ break; -+ case 2: -+ a |= a << 8; -+ a |= a << 16; -+ *(uint32_t *)b_u = a; -+ *(uint32_t *)b_l = a; -+ break; -+ case 3: -+ a |= a << 8; -+ a |= a << 16; -+ *(uint32_t *)b_u = a; -+ *(uint32_t *)(b_u + 4) = a; -+ *(uint32_t *)b_l = a; -+ *(uint32_t *)(b_l + 4) = a; -+ break; -+ case 4: -+ a |= a << 8; -+ a |= a << 16; -+ *(uint32_t *)b_u = a; -+ *(uint32_t *)(b_u + 4) = a; -+ *(uint32_t *)(b_u + 8) = a; -+ *(uint32_t *)(b_u + 12) = a; -+ *(uint32_t *)b_l = a; -+ *(uint32_t *)(b_l + 4) = a; -+ *(uint32_t *)(b_l + 8) = a; -+ *(uint32_t *)(b_l + 12) = a; -+ break; -+ } -+} -+ -+static void zap_cabac_stash(uint8_t * b, const int ln) -+{ -+ switch (ln) -+ { -+ default: // 0 -+ *b = 0; -+ break; -+ case 1: -+ *(uint16_t *)b = 0; -+ break; -+ case 2: -+ *(uint32_t *)b = 0; -+ break; -+ case 3: -+ *(uint32_t *)b = 0; -+ *(uint32_t *)(b + 4) = 0; -+ break; -+ } -+} -+ -+ -+ -+// Set a small square block of bits in a bitmap -+// Bits must be aligned on their size boundry (which will be true of all split CBs) -+static void set_bits(uint8_t * f, const unsigned int x, const unsigned int stride, const unsigned int ln) -+{ -+ unsigned int n; -+ const unsigned int sh = (x & 7); -+ -+ f += (x >> 3); -+ -+ av_assert2(ln <= 3); -+ av_assert2((x & ((1 << ln) - 1)) == 0); -+ -+ switch (ln) -+ { -+ default: // 1 -+ f[0] |= 1 << sh; -+ break; -+ case 1: // 3 * 2 -+ n = 3 << sh; -+ f[0] |= n; -+ f[stride] |= n; -+ break; -+ case 2: // 0xf * 4 -+ n = 0xf << sh; -+ f[0] |= n; -+ f[stride] |= n; -+ f[stride * 2] |= n; -+ f[stride * 3] |= n; -+ break; -+ case 3: // 0xff * 8 -+ for (n = 0; n != 8; ++n, f += stride) -+ *f = 0xff; -+ break; -+ } -+} -+ -+static const ipe_init_info_t ipe_init_infos[9] = { // Alloc for bit depths of 8-16 -+ { // 8 -+ .luma = {8, QPU_MC_PRED_N_Y8, inter_pred_setup_y_qpu, inter_pred_sync_qpu, inter_pred_exit_y_qpu}, -+ .chroma = {8, QPU_MC_PRED_N_C8, inter_pred_setup_c_qpu, inter_pred_sync_qpu, inter_pred_exit_c_qpu} -+ }, -+ { // 9 -+ .luma = {0}, -+ .chroma = {0} -+ }, -+ { // 10 -+ .luma = {10, QPU_MC_PRED_N_Y10, inter_pred_setup_y10_qpu, inter_pred_sync10_qpu, inter_pred_exit_y10_qpu}, -+ .chroma = {10, QPU_MC_PRED_N_C10, inter_pred_setup_c10_qpu, inter_pred_sync10_qpu, inter_pred_exit_c10_qpu} -+ } -+ -+}; -+ -+static void set_ipe_from_ici(HEVCRpiInterPredEnv * const ipe, const ipe_chan_info_t * const ici) -+{ -+ const unsigned int n = ici->n; -+ const unsigned int q1_size = (ipe->gptr.numbytes / n) & ~3; // Round down to word -+ -+ ipe->n = n; -+ ipe->max_fill = q1_size - ipe->min_gap; -+ for(unsigned int i = 0; i < n; i++) { -+ HEVCRpiInterPredQ * const q = ipe->q + i; -+ q->qpu_mc_curr = q->qpu_mc_base = -+ (qpu_mc_pred_cmd_t *)(ipe->gptr.arm + i * q1_size); -+ q->code_setup = qpu_fn(ici->setup_fns[i]); -+ q->code_sync = qpu_fn(ici->sync_fns[i]); -+ q->code_exit = qpu_fn(ici->exit_fns[i]); -+ } -+} -+ -+static void rpi_hevc_qpu_set_fns(HEVCRpiContext * const s, const unsigned int bit_depth) -+{ -+ av_assert0(bit_depth >= 8 && bit_depth <= 16); -+ -+ rpi_hevc_qpu_init_fn(&s->qpu, bit_depth); -+} -+ -+// Unsigned Trivial MOD -+static inline unsigned int utmod(const unsigned int x, const unsigned int n) -+{ -+ return x >= n ? x - n : x; -+} -+ -+// returns pq->job_n++ -+static inline unsigned int pass_queue_inc_job_n(HEVCRpiPassQueue * const pq) -+{ -+ unsigned int const x2 = pq->job_n; -+ pq->job_n = utmod(x2 + 1, RPI_MAX_JOBS); -+ return x2; -+} -+ -+static void pass_queue_init(HEVCRpiPassQueue * const pq, HEVCRpiContext * const s, HEVCRpiWorkerFn * const worker, sem_t * const psem_out, const int n) -+{ -+ pq->terminate = 0; -+ pq->job_n = 0; -+ pq->context = s; -+ pq->worker = worker; -+ pq->psem_out = psem_out; -+ pq->pass_n = n; -+ pq->started = 0; -+ sem_init(&pq->sem_in, 0, 0); -+} -+ -+static void pass_queue_kill(HEVCRpiPassQueue * const pq) -+{ -+ sem_destroy(&pq->sem_in); -+} -+ -+static inline void rpi_sem_wait(sem_t * const sem) -+{ -+ while (sem_wait(sem) != 0) { -+ av_assert0(errno == EINTR); -+ } -+} -+ -+static void pass_queue_submit_job(HEVCRpiPassQueue * const pq) -+{ -+ sem_post(&pq->sem_in); -+} -+ -+static inline void pass_queue_do_all(HEVCRpiContext * const s, HEVCRpiJob * const jb) -+{ -+ // Do the various passes - common with the worker code -+ for (unsigned int i = 0; i != RPI_PASSES; ++i) { -+ s->passq[i].worker(s, jb); -+ } -+} -+ -+ -+#if 0 -+static void dump_jbc(const HEVCRpiJobCtl *const jbc, const char * const func) -+{ -+ int x; -+ sem_getvalue((sem_t *)&jbc->sem_out, &x); -+ printf("%s: jbc: in=%d, out=%d, sum=%d\n", func, jbc->offload_in, jbc->offload_out, x); -+} -+#endif -+ -+ -+static HEVCRpiJob * job_alloc(HEVCRpiJobCtl * const jbc, HEVCRpiLocalContext * const lc) -+{ -+ HEVCRpiJob * jb; -+ HEVCRpiJobGlobal * const jbg = jbc->jbg; -+ -+ pthread_mutex_lock(&jbg->lock); -+ // Check local 1st -+ if ((jb = jbc->jb1) != NULL) -+ { -+ // Only 1 - very easy :-) -+ jbc->jb1 = NULL; -+ } -+ else -+ { -+ // Now look for global free chain -+ if ((jb = jbg->free1) != NULL) -+ { -+ // Found one - unlink it -+ jbg->free1 = jb->next; -+ jb->next = NULL; -+ } -+ else -+ { -+ // Out of places to look - wait for one to become free - add to Qs -+ -+ // Global -+ // If "good" lc then add after the last "good" el in the chain -+ // otherwise add to the tail -+ if (jbg->wait_tail == NULL || jbg->wait_tail->last_progress_good || !lc->last_progress_good) -+ { -+ // Add to end as we had to wait last time or wait Q empty -+ if ((lc->jw_prev = jbg->wait_tail) == NULL) -+ jbg->wait_head = lc; -+ else -+ lc->jw_prev->jw_next = lc; -+ lc->jw_next = NULL; -+ jbg->wait_tail = lc; -+ } -+ else -+ { -+ // This is a "good" lc that we need to poke into the middle -+ // of the Q -+ // We know that the Q isn't empty and there is at least one -+ // !last_progess_good el in it from the previous test -+ -+ HEVCRpiLocalContext * const p = jbg->wait_good; // Insert after -+ -+ if (p == NULL) -+ { -+ // No current good els - add to head -+ lc->jw_next = jbg->wait_head; -+ jbg->wait_head = lc; -+ } -+ else -+ { -+ lc->jw_next = p->jw_next; -+ p->jw_next = lc; -+ } -+ -+ lc->jw_next->jw_prev = lc; -+ lc->jw_prev = p; -+ } -+ -+ // If "good" then we are now the last good waiting el -+ if (lc->last_progress_good) -+ jbg->wait_good = lc; -+ -+ // Local -+ if ((lc->ljw_prev = jbc->lcw_tail) == NULL) -+ jbc->lcw_head = lc; -+ else -+ lc->ljw_prev->ljw_next = lc; -+ lc->ljw_next = NULL; -+ jbc->lcw_tail = lc; -+ } -+ } -+ -+ pthread_mutex_unlock(&jbg->lock); -+ -+ if (jb == NULL) // Need to wait -+ { -+ rpi_sem_wait(&lc->jw_sem); -+ jb = lc->jw_job; // Set by free code -+ } -+ -+ return jb; -+} -+ -+ -+static void job_free(HEVCRpiJobCtl * const jbc0, HEVCRpiJob * const jb) -+{ -+ HEVCRpiJobGlobal * const jbg = jbc0->jbg; // This jbc only used to find jbg so we can get the lock -+ HEVCRpiJobCtl * jbc = jb->jbc_local; -+ HEVCRpiLocalContext * lc = NULL; -+ -+ pthread_mutex_lock(&jbg->lock); -+ -+ if (jbc != NULL) -+ { -+ av_assert1(jbc->jb1 == NULL); -+ -+ // Release to Local if nothing waiting there -+ if ((lc = jbc->lcw_head) == NULL) -+ jbc->jb1 = jb; -+ } -+ else -+ { -+ // Release to global if nothing waiting there -+ if ((lc = jbg->wait_head) == NULL) -+ { -+ jb->next = jbg->free1; -+ jbg->free1 = jb; -+ } -+ else -+ { -+ // ? seems somehow mildy ugly... -+ jbc = lc->context->jbc; -+ } -+ } -+ -+ if (lc != NULL) -+ { -+ // Something was waiting -+ -+ // Unlink -+ // Global -+ if (lc->jw_next == NULL) -+ jbg->wait_tail = lc->jw_prev; -+ else -+ lc->jw_next->jw_prev = lc->jw_prev; -+ -+ if (lc->jw_prev == NULL) -+ jbg->wait_head = lc->jw_next; -+ else -+ lc->jw_prev->jw_next = lc->jw_next; -+ -+ // Local -+ if (lc->ljw_next == NULL) -+ jbc->lcw_tail = lc->ljw_prev; -+ else -+ lc->ljw_next->ljw_prev = lc->ljw_prev; -+ -+ if (lc->ljw_prev == NULL) -+ jbc->lcw_head = lc->ljw_next; -+ else -+ lc->ljw_prev->ljw_next = lc->ljw_next; -+ -+ // Update good if required -+ if (jbg->wait_good == lc) -+ jbg->wait_good = lc->jw_prev; -+ -+ // Prod -+ lc->jw_job = jb; -+ sem_post(&lc->jw_sem); -+ } -+ -+ pthread_mutex_unlock(&jbg->lock); -+} -+ -+static void job_lc_kill(HEVCRpiLocalContext * const lc) -+{ -+ sem_destroy(&lc->jw_sem); -+} -+ -+static void job_lc_init(HEVCRpiLocalContext * const lc) -+{ -+ lc->jw_next = NULL; -+ lc->jw_prev = NULL; -+ lc->ljw_next = NULL; -+ lc->ljw_prev = NULL; -+ lc->jw_job = NULL; -+ sem_init(&lc->jw_sem, 0, 0); -+} -+ -+// Returns: -+// 0 if we have waited for MV or expect to wait for recon -+// 1 if we haven't waited for MV & do not need to wait for recon -+static int progress_good(const HEVCRpiContext *const s, const HEVCRpiJob * const jb) -+{ -+ if (jb->waited) // reset by rpi_begin -+ return 0; -+ for (unsigned int i = 0; i != FF_ARRAY_ELEMS(jb->progress_req); ++i) -+ { -+ if (jb->progress_req[i] >= 0 && s->DPB[i].tf.progress != NULL && -+ ((volatile int *)(s->DPB[i].tf.progress->data))[0] < jb->progress_req[i]) -+ return 0; -+ } -+ return 1; -+} -+ -+// Submit job if it is full (indicated by having ctu_ts_last set >= 0) -+static inline void worker_submit_job(HEVCRpiContext *const s, HEVCRpiLocalContext * const lc) -+{ -+ HEVCRpiJobCtl *const jbc = s->jbc; -+ HEVCRpiJob * const jb = lc->jb0; -+ -+ av_assert1(jb != NULL); -+ -+ if (jb->ctu_ts_last < 0) { -+ return; -+ } -+ -+ lc->last_progress_good = progress_good(s, jb); -+ jb->waited = !lc->last_progress_good; -+ lc->jb0 = NULL; -+ -+ if (s->offload_recon) -+ { -+ pthread_mutex_lock(&jbc->in_lock); -+ jbc->offloadq[jbc->offload_in] = jb; -+ jbc->offload_in = utmod(jbc->offload_in + 1, RPI_MAX_JOBS); -+ pthread_mutex_unlock(&jbc->in_lock); -+ -+ pass_queue_submit_job(s->passq + 0); // Consumes job eventually -+ } -+ else -+ { -+ pass_queue_do_all(s, jb); // Consumes job before return -+ } -+} -+ -+ -+// Call worker_pass0_ready to wait until the s->pass0_job slot becomes -+// available to receive the next job. -+// -+// Now safe against multiple callers - needed for tiles -+// "normal" and WPP will only call here one at a time -+static inline void worker_pass0_ready(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc) -+{ -+ HEVCRpiJobCtl * const jbc = s->jbc; -+ -+ // It is legit for us to already have a job allocated - do nothing in this case -+ if (lc->jb0 != NULL) -+ return; -+ -+ if (s->offload_recon) -+ rpi_sem_wait(&jbc->sem_out); // This sem will stop this frame grabbing too much -+ -+ lc->jb0 = job_alloc(jbc, lc); -+ -+ rpi_begin(s, lc->jb0, lc->ts); -+} -+ -+// Free up a job without submission -+static void worker_free(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc) -+{ -+ HEVCRpiJobCtl * const jbc = s->jbc; -+ HEVCRpiJob * const jb = lc->jb0; -+ -+ if (jb == NULL) { -+ return; -+ } -+ -+ lc->jb0 = NULL; -+ -+ job_free(jbc, jb); -+ -+ // If offload then poke sem_out too -+ if (s->offload_recon) { -+ sem_post(&jbc->sem_out); -+ } -+} -+ -+ -+// Call this to wait for all jobs to have completed at the end of a frame -+// Slightly icky as there is no clean way to wait for a sem to count up -+// Not reentrant - call on main thread only -+static void worker_wait(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc) -+{ -+ HEVCRpiJobCtl * const jbc = s->jbc; -+ int i = 0; -+ -+ // We shouldn't reach here with an unsubmitted job -+ av_assert1(lc->jb0 == NULL); -+ -+ // If no offload then there can't be anything to wait for -+ if (!s->offload_recon) { -+ return; -+ } -+ -+ if (sem_getvalue(&jbc->sem_out, &i) == 0 && i < RPI_MAX_JOBS) -+ { -+ for (i = 0; i != RPI_MAX_JOBS; ++i) { -+ rpi_sem_wait(&jbc->sem_out); -+ } -+ for (i = 0; i != RPI_MAX_JOBS; ++i) { -+ sem_post(&jbc->sem_out); -+ } -+ } -+} -+ -+static void * pass_worker(void *arg) -+{ -+ HEVCRpiPassQueue *const pq = (HEVCRpiPassQueue *)arg; -+ HEVCRpiContext *const s = pq->context; -+ -+ for (;;) -+ { -+ rpi_sem_wait(&pq->sem_in); -+ -+ if (pq->terminate) -+ break; -+ -+ pq->worker(s, s->jbc->offloadq[pass_queue_inc_job_n(pq)]); -+ // * should really set jb->passes_done here -+ -+ sem_post(pq->psem_out); -+ } -+ return NULL; -+} -+ -+static void pass_queues_start_all(HEVCRpiContext *const s) -+{ -+ unsigned int i; -+ HEVCRpiPassQueue * const pqs = s->passq; -+ -+ for (i = 0; i != RPI_PASSES; ++i) -+ { -+ av_assert0(pthread_create(&pqs[i].thread, NULL, pass_worker, pqs + i) == 0); -+ pqs[i].started = 1; -+ } -+} -+ -+static void pass_queues_term_all(HEVCRpiContext *const s) -+{ -+ unsigned int i; -+ HEVCRpiPassQueue * const pqs = s->passq; -+ -+ for (i = 0; i != RPI_PASSES; ++i) -+ pqs[i].terminate = 1; -+ for (i = 0; i != RPI_PASSES; ++i) -+ { -+ if (pqs[i].started) -+ sem_post(&pqs[i].sem_in); -+ } -+ for (i = 0; i != RPI_PASSES; ++i) -+ { -+ if (pqs[i].started) { -+ pthread_join(pqs[i].thread, NULL); -+ pqs[i].started = 0; -+ } -+ } -+} -+ -+static void pass_queues_kill_all(HEVCRpiContext *const s) -+{ -+ unsigned int i; -+ HEVCRpiPassQueue * const pqs = s->passq; -+ -+ for (i = 0; i != RPI_PASSES; ++i) -+ pass_queue_kill(pqs + i); -+} -+ -+ -+static void worker_pic_free_one(HEVCRpiJob * const jb) -+{ -+ // Free coeff stuff - allocation not the same for all buffers -+ HEVCRpiCoeffsEnv * const cf = &jb->coeffs; -+ -+ if (cf->s[0].buf != NULL) -+ av_freep(&cf->mptr); -+ if (cf->s[2].buf != NULL) -+ gpu_free(&cf->gptr); -+ memset(cf, 0, sizeof(*cf)); -+} -+ -+static int worker_pic_alloc_one(HEVCRpiJob * const jb, const unsigned int coeff_count) -+{ -+ HEVCRpiCoeffsEnv * const cf = &jb->coeffs; -+ -+ if (gpu_malloc_cached((coeff_count + 32*32) * sizeof(cf->s[2].buf[0]), &cf->gptr) != 0) -+ goto fail; -+ cf->s[2].buf = (int16_t *)cf->gptr.arm; -+ cf->s[3].buf = cf->s[2].buf + coeff_count; -+ -+ // Must be 64 byte aligned for our zero zapping code so over-allocate & -+ // round -+ if ((cf->mptr = av_malloc(coeff_count * sizeof(cf->s[0].buf[0]) + 63)) == NULL) -+ goto fail; -+ cf->s[0].buf = (void *)(((intptr_t)cf->mptr + 63) & ~63); -+ return 0; -+ -+fail: -+ av_log(NULL, AV_LOG_ERROR, "%s: Allocation failed\n", __func__); -+ worker_pic_free_one(jb); -+ return -1; -+} -+ -+static void worker_pic_reset(HEVCRpiCoeffsEnv * const cf) -+{ -+ unsigned int i; -+ for (i = 0; i != 4; ++i) { -+ cf->s[i].n = 0; -+#if RPI_COMPRESS_COEFFS -+ cf->s[i].packed = 1; -+ cf->s[i].packed_n = 0; -+#endif -+ } -+} -+ -+int16_t * rpi_alloc_coeff_buf(HEVCRpiJob * const jb, const int buf_no, const int n) -+{ -+ HEVCRpiCoeffEnv *const cfe = jb->coeffs.s + buf_no; -+ int16_t * const coeffs = (buf_no != 3) ? cfe->buf + cfe->n : cfe->buf - (cfe->n + n); -+ cfe->n += n; -+ return coeffs; -+} -+ -+void ff_hevc_rpi_progress_wait_field(const HEVCRpiContext * const s, HEVCRpiJob * const jb, -+ const HEVCRpiFrame * const ref, const int val, const int field) -+{ -+ if (ref->tf.progress != NULL && ((int *)ref->tf.progress->data)[field] < val) { -+ HEVCRpiContext *const fs = ref->tf.owner[field]->priv_data; -+ HEVCRpiFrameProgressState * const pstate = fs->progress_states + field; -+ sem_t * sem = NULL; -+ -+ av_assert0(pthread_mutex_lock(&pstate->lock) == 0); -+ if (((volatile int *)ref->tf.progress->data)[field] < val) { -+ HEVCRpiFrameProgressWait * const pwait = &jb->progress_wait; -+ -+ av_assert1(pwait->req == -1 && pwait->next == NULL); -+ jb->waited = 1; // Remember that we had to wait for later scheduling -+ -+ pwait->req = val; -+ pwait->next = NULL; -+ if (pstate->first == NULL) -+ pstate->first = pwait; -+ else -+ pstate->last->next = pwait; -+ pstate->last = pwait; -+ sem = &pwait->sem; -+ } -+ pthread_mutex_unlock(&pstate->lock); -+ -+ if (sem != NULL) { -+ rpi_sem_wait(sem); -+ } -+ } -+} -+ -+void ff_hevc_rpi_progress_signal_field(HEVCRpiContext * const s, const int val, const int field) -+{ -+ HEVCRpiFrameProgressState *const pstate = s->progress_states + field; -+ -+ ((int *)s->ref->tf.progress->data)[field] = val; -+ -+ av_assert0(pthread_mutex_lock(&pstate->lock) == 0); -+ { -+ HEVCRpiFrameProgressWait ** ppwait = &pstate->first; -+ HEVCRpiFrameProgressWait * pwait; -+ -+ while ((pwait = *ppwait) != NULL) { -+ if (pwait->req > val) -+ { -+ ppwait = &pwait->next; -+ pstate->last = pwait; -+ } -+ else -+ { -+ *ppwait = pwait->next; -+ pwait->req = -1; -+ pwait->next = NULL; -+ sem_post(&pwait->sem); -+ } -+ } -+ } -+ pthread_mutex_unlock(&pstate->lock); -+} -+ -+static void ff_hevc_rpi_progress_init_state(HEVCRpiFrameProgressState * const pstate) -+{ -+ pstate->first = NULL; -+ pstate->last = NULL; -+ pthread_mutex_init(&pstate->lock, NULL); -+} -+ -+static void ff_hevc_rpi_progress_init_wait(HEVCRpiFrameProgressWait * const pwait) -+{ -+ pwait->req = -1; -+ pwait->next = NULL; -+ sem_init(&pwait->sem, 0, 0); -+} -+ -+static void ff_hevc_rpi_progress_kill_state(HEVCRpiFrameProgressState * const pstate) -+{ -+ av_assert1(pstate->first == NULL); -+ pthread_mutex_destroy(&pstate->lock); -+} -+ -+static void ff_hevc_rpi_progress_kill_wait(HEVCRpiFrameProgressWait * const pwait) -+{ -+ sem_destroy(&pwait->sem); -+} -+ -+ -+/** -+ * NOTE: Each function hls_foo correspond to the function foo in the -+ * specification (HLS stands for High Level Syntax). -+ */ -+ -+/** -+ * Section 5.7 -+ */ -+ -+// Realloc the entry point arrays -+static int alloc_entry_points(RpiSliceHeader * const sh, const int n) -+{ -+ if (sh->entry_point_offset == NULL || n > sh->offsets_allocated || n == 0) -+ { -+ // Round up alloc to multiple of 32 -+ int a = (n + 31) & ~31; -+ -+ // We don't care about the previous contents so probably fastest to simply discard -+ av_freep(&sh->entry_point_offset); -+ av_freep(&sh->offset); -+ av_freep(&sh->size); -+ -+ if (a != 0) -+ { -+ sh->entry_point_offset = av_malloc_array(a, sizeof(unsigned)); -+ sh->offset = av_malloc_array(a, sizeof(int)); -+ sh->size = av_malloc_array(a, sizeof(int)); -+ -+ if (!sh->entry_point_offset || !sh->offset || !sh->size) { -+ sh->num_entry_point_offsets = 0; -+ sh->offsets_allocated = 0; -+ return AVERROR(ENOMEM); -+ } -+ } -+ -+ sh->offsets_allocated = a; -+ } -+ -+ return 0; -+} -+ -+/* free everything allocated by pic_arrays_init() */ -+static void pic_arrays_free(HEVCRpiContext *s) -+{ -+ av_freep(&s->sao); -+ av_freep(&s->deblock); -+ -+ av_freep(&s->cabac_stash_up); -+ s->cabac_stash_left = NULL; // freed with _up -+ -+ av_freep(&s->mvf_up); -+ av_freep(&s->mvf_left); -+ -+ av_freep(&s->is_pcm); -+ av_freep(&s->is_intra_store); -+ s->is_intra = NULL; -+ av_freep(&s->rpl_tab); -+ s->rpl_tab_size = 0; -+ -+ av_freep(&s->qp_y_tab); -+ av_freep(&s->tab_slice_address); -+ av_freep(&s->filter_slice_edges); -+ -+ av_freep(&s->bs_horizontal); -+ s->bs_vertical = NULL; // freed with H -+ av_freep(&s->bsf_stash_left); -+ av_freep(&s->bsf_stash_up); -+ -+ av_freep(&s->rpl_up); -+ av_freep(&s->rpl_left); -+ -+ alloc_entry_points(&s->sh, 0); -+ -+ av_buffer_pool_uninit(&s->col_mvf_pool); -+} -+ -+/* allocate arrays that depend on frame dimensions */ -+static int pic_arrays_init(HEVCRpiContext * const s, const HEVCRpiSPS * const sps) -+{ -+ const unsigned int log2_min_cb_size = sps->log2_min_cb_size; -+ const unsigned int width = sps->width; -+ const unsigned int height = sps->height; -+ const unsigned int pic_size_in_cb = ((width >> log2_min_cb_size) + 1) * -+ ((height >> log2_min_cb_size) + 1); -+ const unsigned int ctb_count = sps->ctb_size; -+ -+ { -+ unsigned int w = ((width + HEVC_RPI_BS_STRIDE1_PEL_MASK) & ~HEVC_RPI_BS_STRIDE1_PEL_MASK); -+ unsigned int h = ((height + 15) & ~15); -+ -+ s->bs_stride2 = h >> HEVC_RPI_BS_COL_BYTES_SHR; // Column size -+ s->bs_size = s->bs_stride2 * (w >> HEVC_RPI_BS_STRIDE1_PEL_SHIFT); // col size * cols -+ } -+ -+ s->sao = av_mallocz(ctb_count * sizeof(*s->sao) + 8); // Our sao code overreads this array slightly -+ s->deblock = av_mallocz_array(ctb_count, sizeof(*s->deblock)); -+ if (!s->sao || !s->deblock) -+ goto fail; -+ -+ s->cabac_stash_up = av_malloc((((width + 63) & ~63) >> 3) + (((height + 63) & ~63) >> 3)); -+ s->cabac_stash_left = s->cabac_stash_up + (((width + 63) & ~63) >> 3); -+ if (s->cabac_stash_up == NULL) -+ goto fail; -+ -+ // Round width up to max ctb size -+ s->mvf_up = av_malloc((((width + 63) & ~63) >> LOG2_MIN_PU_SIZE) * sizeof(*s->mvf_up)); -+ // * Only needed if we have H tiles -+ s->mvf_left = av_malloc((((height + 63) & ~63) >> LOG2_MIN_PU_SIZE) * sizeof(*s->mvf_up)); -+ -+ // We can overread by 1 line & one byte in deblock so alloc & zero -+ // We don't need to zero the extra @ start of frame as it will never be -+ // written -+ s->is_pcm = av_mallocz(sps->pcm_width * (sps->pcm_height + 1) + 1); -+ s->is_intra_store = av_mallocz(sps->pcm_width * (sps->pcm_height + 1) + 1); -+ if (s->is_pcm == NULL || s->is_intra_store == NULL) -+ goto fail; -+ -+ s->filter_slice_edges = av_mallocz(ctb_count); -+ s->tab_slice_address = av_malloc_array(ctb_count, -+ sizeof(*s->tab_slice_address)); -+ s->qp_y_tab = av_malloc_array(pic_size_in_cb, -+ sizeof(*s->qp_y_tab)); -+ if (!s->qp_y_tab || !s->filter_slice_edges || !s->tab_slice_address) -+ goto fail; -+ -+ s->bs_horizontal = av_mallocz(s->bs_size * 2); -+ s->bs_vertical = s->bs_horizontal + s->bs_size; -+ if (s->bs_horizontal == NULL) -+ goto fail; -+ -+ s->rpl_up = av_mallocz(sps->ctb_width * sizeof(*s->rpl_up)); -+ s->rpl_left = av_mallocz(sps->ctb_height * sizeof(*s->rpl_left)); -+ if (s->rpl_left == NULL || s->rpl_up == NULL) -+ goto fail; -+ -+ if ((s->bsf_stash_left = av_mallocz(((height + 63) & ~63) >> 4)) == NULL || -+ (s->bsf_stash_up = av_mallocz(((width + 63) & ~63) >> 4)) == NULL) -+ goto fail; -+ -+ s->col_mvf_stride = (width + 15) >> 4; -+ s->col_mvf_pool = av_buffer_pool_init(((height + 15) >> 4) * s->col_mvf_stride * sizeof(ColMvField), -+ av_buffer_allocz); -+ if (s->col_mvf_pool == NULL) -+ goto fail; -+ -+ return 0; -+ -+fail: -+ pic_arrays_free(s); -+ return AVERROR(ENOMEM); -+} -+ -+static void default_pred_weight_table(HEVCRpiContext * const s) -+{ -+ unsigned int i; -+ const unsigned int wt = 1 << QPU_MC_DENOM; -+ s->sh.luma_log2_weight_denom = 0; -+ s->sh.chroma_log2_weight_denom = 0; -+ for (i = 0; i < s->sh.nb_refs[L0]; i++) { -+ s->sh.luma_weight_l0[i] = wt; -+ s->sh.luma_offset_l0[i] = 0; -+ s->sh.chroma_weight_l0[i][0] = wt; -+ s->sh.chroma_weight_l0[i][1] = wt; -+ s->sh.chroma_offset_l0[i][0] = 0; -+ s->sh.chroma_offset_l0[i][1] = 0; -+ } -+ for (i = 0; i < s->sh.nb_refs[L1]; i++) { -+ s->sh.luma_weight_l1[i] = wt; -+ s->sh.luma_offset_l1[i] = 0; -+ s->sh.chroma_weight_l1[i][0] = wt; -+ s->sh.chroma_weight_l1[i][1] = wt; -+ s->sh.chroma_offset_l1[i][0] = 0; -+ s->sh.chroma_offset_l1[i][1] = 0; -+ } -+} -+ -+static int get_weights(HEVCRpiContext * const s, GetBitContext * const gb, -+ const unsigned int refs, -+ int16_t * luma_weight, int16_t * luma_offset, -+ int16_t * chroma_weight, int16_t * chroma_offset) -+{ -+ unsigned int luma_flags; -+ unsigned int chroma_flags; -+ unsigned int i; -+ const unsigned int wp_offset_bd_shift = s->ps.sps->high_precision_offsets_enabled_flag ? 0 : (s->ps.sps->bit_depth - 8); -+ const int wp_offset_half_range = s->ps.sps->wp_offset_half_range; -+ const unsigned int luma_weight_base = 1 << QPU_MC_DENOM; -+ const unsigned int chroma_weight_base = 1 << QPU_MC_DENOM; -+ const unsigned int luma_weight_shift = (QPU_MC_DENOM - s->sh.luma_log2_weight_denom); -+ const unsigned int chroma_weight_shift = (QPU_MC_DENOM - s->sh.chroma_log2_weight_denom); -+ -+ if (refs == 0) -+ return 0; -+ -+ luma_flags = get_bits(gb, refs); -+ chroma_flags = ctx_cfmt(s) == 0 ? 0 : get_bits(gb, refs); -+ i = 1 << (refs - 1); -+ -+ do -+ { -+ if ((luma_flags & i) != 0) -+ { -+ const int delta_weight = get_se_golomb(gb); -+ const int offset = get_se_golomb(gb); -+ if (delta_weight < -128 || delta_weight > 127 || -+ offset < -wp_offset_half_range || offset >= wp_offset_half_range) -+ { -+ return AVERROR_INVALIDDATA; -+ } -+ *luma_weight++ = luma_weight_base + (delta_weight << luma_weight_shift); -+ *luma_offset++ = offset << wp_offset_bd_shift; -+ } -+ else -+ { -+ *luma_weight++ = luma_weight_base; -+ *luma_offset++ = 0; -+ } -+ -+ if ((chroma_flags & i) != 0) -+ { -+ unsigned int j; -+ for (j = 0; j != 2; ++j) -+ { -+ const int delta_weight = get_se_golomb(gb); -+ const int delta_offset = get_se_golomb(gb); -+ -+ if (delta_weight < -128 || delta_weight > 127 || -+ delta_offset < -4 * wp_offset_half_range || delta_offset >= 4 * wp_offset_half_range) -+ { -+ return AVERROR_INVALIDDATA; -+ } -+ -+ *chroma_weight++ = chroma_weight_base + (delta_weight << chroma_weight_shift); -+ *chroma_offset++ = av_clip( -+ wp_offset_half_range + delta_offset - -+ ((wp_offset_half_range * ((1 << s->sh.chroma_log2_weight_denom) + delta_weight)) >> s->sh.chroma_log2_weight_denom), -+ -wp_offset_half_range, wp_offset_half_range - 1) << wp_offset_bd_shift; -+ } -+ } -+ else -+ { -+ *chroma_weight++ = chroma_weight_base; -+ *chroma_weight++ = chroma_weight_base; -+ *chroma_offset++ = 0; -+ *chroma_offset++ = 0; -+ } -+ } while ((i >>= 1) != 0); -+ -+ return 0; -+} -+ -+static int pred_weight_table(HEVCRpiContext *s, GetBitContext *gb) -+{ -+ int err; -+ const unsigned int luma_log2_weight_denom = get_ue_golomb_long(gb); -+ const unsigned int chroma_log2_weight_denom = (ctx_cfmt(s) == 0) ? 0 : luma_log2_weight_denom + get_se_golomb(gb); -+ -+ if (luma_log2_weight_denom > 7 || -+ chroma_log2_weight_denom > 7) -+ { -+ av_log(s->avctx, AV_LOG_ERROR, "Invalid prediction weight denom: luma=%d, chroma=%d\n", -+ luma_log2_weight_denom, chroma_log2_weight_denom); -+ return AVERROR_INVALIDDATA; -+ } -+ -+ s->sh.luma_log2_weight_denom = luma_log2_weight_denom; -+ s->sh.chroma_log2_weight_denom = chroma_log2_weight_denom; -+ -+ if ((err = get_weights(s, gb, s->sh.nb_refs[L0], -+ s->sh.luma_weight_l0, s->sh.luma_offset_l0, -+ s->sh.chroma_weight_l0[0], s->sh.chroma_offset_l0[0])) != 0 || -+ (err = get_weights(s, gb, s->sh.nb_refs[L1], -+ s->sh.luma_weight_l1, s->sh.luma_offset_l1, -+ s->sh.chroma_weight_l1[0], s->sh.chroma_offset_l1[0])) != 0) -+ { -+ av_log(s->avctx, AV_LOG_ERROR, "Invalid prediction weight or offset\n"); -+ return err; -+ } -+ -+ return 0; -+} -+ -+static int decode_lt_rps(HEVCRpiContext *s, LongTermRPS *rps, GetBitContext *gb) -+{ -+ const HEVCRpiSPS *sps = s->ps.sps; -+ int max_poc_lsb = 1 << sps->log2_max_poc_lsb; -+ int prev_delta_msb = 0; -+ unsigned int nb_sps = 0, nb_sh; -+ int i; -+ -+ rps->nb_refs = 0; -+ if (!sps->long_term_ref_pics_present_flag) -+ return 0; -+ -+ if (sps->num_long_term_ref_pics_sps > 0) -+ nb_sps = get_ue_golomb_long(gb); -+ nb_sh = get_ue_golomb_long(gb); -+ -+ if (nb_sps > sps->num_long_term_ref_pics_sps) -+ return AVERROR_INVALIDDATA; -+ if (nb_sh + (uint64_t)nb_sps > FF_ARRAY_ELEMS(rps->poc)) -+ return AVERROR_INVALIDDATA; -+ -+ rps->nb_refs = nb_sh + nb_sps; -+ -+ for (i = 0; i < rps->nb_refs; i++) { -+ uint8_t delta_poc_msb_present; -+ -+ if (i < nb_sps) { -+ uint8_t lt_idx_sps = 0; -+ -+ if (sps->num_long_term_ref_pics_sps > 1) -+ lt_idx_sps = get_bits(gb, av_ceil_log2(sps->num_long_term_ref_pics_sps)); -+ -+ rps->poc[i] = sps->lt_ref_pic_poc_lsb_sps[lt_idx_sps]; -+ rps->used[i] = sps->used_by_curr_pic_lt_sps_flag[lt_idx_sps]; -+ } else { -+ rps->poc[i] = get_bits(gb, sps->log2_max_poc_lsb); -+ rps->used[i] = get_bits1(gb); -+ } -+ -+ delta_poc_msb_present = get_bits1(gb); -+ if (delta_poc_msb_present) { -+ int64_t delta = get_ue_golomb_long(gb); -+ int64_t poc; -+ -+ if (i && i != nb_sps) -+ delta += prev_delta_msb; -+ -+ poc = rps->poc[i] + s->poc - delta * max_poc_lsb - s->sh.pic_order_cnt_lsb; -+ if (poc != (int32_t)poc) -+ return AVERROR_INVALIDDATA; -+ rps->poc[i] = poc; -+ prev_delta_msb = delta; -+ } -+ } -+ -+ return 0; -+} -+ -+static void export_stream_params(AVCodecContext *avctx, const HEVCRpiParamSets *ps, -+ const HEVCRpiSPS *sps) -+{ -+ const HEVCRpiVPS *vps = (const HEVCRpiVPS*)ps->vps_list[sps->vps_id]->data; -+ const HEVCRpiWindow *ow = &sps->output_window; -+ unsigned int num = 0, den = 0; -+ -+ avctx->pix_fmt = sps->pix_fmt; -+ avctx->coded_width = sps->width; -+ avctx->coded_height = sps->height; -+ avctx->width = sps->width - ow->left_offset - ow->right_offset; -+ avctx->height = sps->height - ow->top_offset - ow->bottom_offset; -+ avctx->has_b_frames = sps->temporal_layer[sps->max_sub_layers - 1].num_reorder_pics; -+ avctx->profile = sps->ptl.general_ptl.profile_idc; -+ avctx->level = sps->ptl.general_ptl.level_idc; -+ -+ ff_set_sar(avctx, sps->vui.sar); -+ -+ if (sps->vui.video_signal_type_present_flag) -+ avctx->color_range = sps->vui.video_full_range_flag ? AVCOL_RANGE_JPEG -+ : AVCOL_RANGE_MPEG; -+ else -+ avctx->color_range = AVCOL_RANGE_MPEG; -+ -+ if (sps->vui.colour_description_present_flag) { -+ avctx->color_primaries = sps->vui.colour_primaries; -+ avctx->color_trc = sps->vui.transfer_characteristic; -+ avctx->colorspace = sps->vui.matrix_coeffs; -+ } else { -+ avctx->color_primaries = AVCOL_PRI_UNSPECIFIED; -+ avctx->color_trc = AVCOL_TRC_UNSPECIFIED; -+ avctx->colorspace = AVCOL_SPC_UNSPECIFIED; -+ } -+ -+ if (vps->vps_timing_info_present_flag) { -+ num = vps->vps_num_units_in_tick; -+ den = vps->vps_time_scale; -+ } else if (sps->vui.vui_timing_info_present_flag) { -+ num = sps->vui.vui_num_units_in_tick; -+ den = sps->vui.vui_time_scale; -+ } -+ -+ if (num != 0 && den != 0) -+ av_reduce(&avctx->framerate.den, &avctx->framerate.num, -+ num, den, 1 << 30); -+} -+ -+static enum AVPixelFormat get_format(HEVCRpiContext *s, const HEVCRpiSPS *sps) -+{ -+ enum AVPixelFormat pix_fmts[4], *fmt = pix_fmts; -+ -+ // Admit to no h/w formats -+ -+ *fmt++ = sps->pix_fmt; -+ *fmt = AV_PIX_FMT_NONE; -+ -+ return pix_fmts[0] == AV_PIX_FMT_NONE ? AV_PIX_FMT_NONE: ff_thread_get_format(s->avctx, pix_fmts); -+} -+ -+static int is_sps_supported(const HEVCRpiSPS * const sps) -+{ -+ return av_rpi_is_sand_format(sps->pix_fmt) && -+ sps->width <= HEVC_RPI_MAX_WIDTH && -+ sps->height <= HEVC_RPI_MAX_HEIGHT; -+} -+ -+static int set_sps(HEVCRpiContext * const s, const HEVCRpiSPS * const sps, -+ const enum AVPixelFormat pix_fmt) -+{ -+ int ret; -+ -+ pic_arrays_free(s); -+ s->ps.sps = NULL; -+ s->ps.vps = NULL; -+ -+ if (sps == NULL) -+ return 0; -+ -+ if (!is_sps_supported(sps)) -+ return AVERROR_DECODER_NOT_FOUND; -+ -+ ret = pic_arrays_init(s, sps); -+ if (ret < 0) -+ goto fail; -+ -+ export_stream_params(s->avctx, &s->ps, sps); -+ -+ s->avctx->pix_fmt = pix_fmt; -+ -+ ff_hevc_rpi_pred_init(&s->hpc, sps->bit_depth); -+ ff_hevc_rpi_dsp_init (&s->hevcdsp, sps->bit_depth); -+ -+ // * We don't support cross_component_prediction_enabled_flag but as that -+ // must be 0 unless we have 4:4:4 there is no point testing for it as we -+ // only deal with sand which is never 4:4:4 -+ // [support wouldn't be hard] -+ -+ rpi_hevc_qpu_set_fns(s, sps->bit_depth); -+ -+ av_freep(&s->sao_pixel_buffer_h[0]); -+ av_freep(&s->sao_pixel_buffer_v[0]); -+ -+ if (sps->sao_enabled) -+ { -+ const unsigned int c_count = (ctx_cfmt(s) != 0) ? 3 : 1; -+ unsigned int c_idx; -+ size_t vsize[3] = {0}; -+ size_t hsize[3] = {0}; -+ -+ for(c_idx = 0; c_idx < c_count; c_idx++) { -+ int w = sps->width >> ctx_hshift(s, c_idx); -+ int h = sps->height >> ctx_vshift(s, c_idx); -+ // ctb height & width are a min of 8 so this must a multiple of 16 -+ // so no point rounding up! -+ hsize[c_idx] = (w * 2 * sps->ctb_height) << sps->pixel_shift; -+ vsize[c_idx] = (h * 2 * sps->ctb_width) << sps->pixel_shift; -+ } -+ -+ // Allocate as a single lump so we can extend h[1] & v[1] into h[2] & v[2] -+ // when we have plaited chroma -+ s->sao_pixel_buffer_h[0] = av_malloc(hsize[0] + hsize[1] + hsize[2]); -+ s->sao_pixel_buffer_v[0] = av_malloc(vsize[0] + vsize[1] + vsize[2]); -+ s->sao_pixel_buffer_h[1] = s->sao_pixel_buffer_h[0] + hsize[0]; -+ s->sao_pixel_buffer_h[2] = s->sao_pixel_buffer_h[1] + hsize[1]; -+ s->sao_pixel_buffer_v[1] = s->sao_pixel_buffer_v[0] + vsize[0]; -+ s->sao_pixel_buffer_v[2] = s->sao_pixel_buffer_v[1] + vsize[1]; -+ } -+ -+ s->ps.sps = sps; -+ s->ps.vps = (HEVCRpiVPS*) s->ps.vps_list[s->ps.sps->vps_id]->data; -+ -+ return 0; -+ -+fail: -+ pic_arrays_free(s); -+ s->ps.sps = NULL; -+ return ret; -+} -+ -+static inline int qp_offset_valid(const int qp_offset) -+{ -+ return qp_offset >= -12 && qp_offset <= 12; -+} -+ -+static int hls_slice_header(HEVCRpiContext * const s) -+{ -+ GetBitContext * const gb = &s->HEVClc->gb; -+ RpiSliceHeader * const sh = &s->sh; -+ int i, ret; -+ -+ // Coded parameters -+ sh->first_slice_in_pic_flag = get_bits1(gb); -+ if ((IS_IDR(s) || IS_BLA(s)) && sh->first_slice_in_pic_flag) { -+ s->seq_decode = (s->seq_decode + 1) & 0xff; -+ s->max_ra = INT_MAX; -+ if (IS_IDR(s)) -+ ff_hevc_rpi_clear_refs(s); -+ } -+ sh->no_output_of_prior_pics_flag = 0; -+ if (IS_IRAP(s)) -+ sh->no_output_of_prior_pics_flag = get_bits1(gb); -+ -+ sh->pps_id = get_ue_golomb_long(gb); -+ if (sh->pps_id >= HEVC_MAX_PPS_COUNT || !s->ps.pps_list[sh->pps_id]) { -+ av_log(s->avctx, AV_LOG_ERROR, "PPS id out of range: %d\n", sh->pps_id); -+ return AVERROR_INVALIDDATA; -+ } -+ if (!sh->first_slice_in_pic_flag && -+ s->ps.pps != (HEVCRpiPPS*)s->ps.pps_list[sh->pps_id]->data) { -+ av_log(s->avctx, AV_LOG_ERROR, "PPS changed between slices.\n"); -+ return AVERROR_INVALIDDATA; -+ } -+ s->ps.pps = (HEVCRpiPPS*)s->ps.pps_list[sh->pps_id]->data; -+ if (s->nal_unit_type == HEVC_NAL_CRA_NUT && s->last_eos == 1) -+ sh->no_output_of_prior_pics_flag = 1; -+ -+ if (s->ps.sps != (HEVCRpiSPS*)s->ps.sps_list[s->ps.pps->sps_id]->data) { -+ const HEVCRpiSPS *sps = (HEVCRpiSPS*)s->ps.sps_list[s->ps.pps->sps_id]->data; -+ const HEVCRpiSPS *last_sps = s->ps.sps; -+ enum AVPixelFormat pix_fmt; -+ -+ if (last_sps && IS_IRAP(s) && s->nal_unit_type != HEVC_NAL_CRA_NUT) { -+ if (sps->width != last_sps->width || sps->height != last_sps->height || -+ sps->temporal_layer[sps->max_sub_layers - 1].max_dec_pic_buffering != -+ last_sps->temporal_layer[last_sps->max_sub_layers - 1].max_dec_pic_buffering) -+ sh->no_output_of_prior_pics_flag = 0; -+ } -+ ff_hevc_rpi_clear_refs(s); -+ -+ ret = set_sps(s, sps, sps->pix_fmt); -+ if (ret < 0) -+ return ret; -+ -+ pix_fmt = get_format(s, sps); -+ if (pix_fmt < 0) -+ return pix_fmt; -+ -+// ret = set_sps(s, sps, pix_fmt); -+// if (ret < 0) -+// return ret; -+ -+ s->avctx->pix_fmt = pix_fmt; -+ -+ s->seq_decode = (s->seq_decode + 1) & 0xff; -+ s->max_ra = INT_MAX; -+ } -+ -+ sh->dependent_slice_segment_flag = 0; -+ if (!sh->first_slice_in_pic_flag) { -+ int slice_address_length; -+ -+ if (s->ps.pps->dependent_slice_segments_enabled_flag) -+ sh->dependent_slice_segment_flag = get_bits1(gb); -+ -+ slice_address_length = av_ceil_log2(s->ps.sps->ctb_size); -+ sh->slice_segment_addr = get_bitsz(gb, slice_address_length); -+ if (sh->slice_segment_addr >= s->ps.sps->ctb_size) { -+ av_log(s->avctx, AV_LOG_ERROR, -+ "Invalid slice segment address: %u.\n", -+ sh->slice_segment_addr); -+ return AVERROR_INVALIDDATA; -+ } -+ -+ if (!sh->dependent_slice_segment_flag) { -+ sh->slice_addr = sh->slice_segment_addr; -+ s->slice_idx++; -+ } -+ } else { -+ sh->slice_segment_addr = sh->slice_addr = 0; -+ s->slice_idx = 0; -+ s->slice_initialized = 0; -+ } -+ -+ if (!sh->dependent_slice_segment_flag) { -+ s->slice_initialized = 0; -+ -+ for (i = 0; i < s->ps.pps->num_extra_slice_header_bits; i++) -+ skip_bits(gb, 1); // slice_reserved_undetermined_flag[] -+ -+ sh->slice_type = get_ue_golomb_long(gb); -+ if (!(sh->slice_type == HEVC_SLICE_I || -+ sh->slice_type == HEVC_SLICE_P || -+ sh->slice_type == HEVC_SLICE_B)) { -+ av_log(s->avctx, AV_LOG_ERROR, "Unknown slice type: %d.\n", -+ sh->slice_type); -+ return AVERROR_INVALIDDATA; -+ } -+ if (IS_IRAP(s) && sh->slice_type != HEVC_SLICE_I) { -+ av_log(s->avctx, AV_LOG_ERROR, "Inter slices in an IRAP frame.\n"); -+ return AVERROR_INVALIDDATA; -+ } -+ -+ // when flag is not present, picture is inferred to be output -+ sh->pic_output_flag = 1; -+ if (s->ps.pps->output_flag_present_flag) -+ sh->pic_output_flag = get_bits1(gb); -+ -+ if (s->ps.sps->separate_colour_plane_flag) -+ sh->colour_plane_id = get_bits(gb, 2); -+ -+ if (!IS_IDR(s)) { -+ int poc, pos; -+ -+ sh->pic_order_cnt_lsb = get_bits(gb, s->ps.sps->log2_max_poc_lsb); -+ poc = ff_hevc_rpi_compute_poc(s->ps.sps, s->pocTid0, sh->pic_order_cnt_lsb, s->nal_unit_type); -+ if (!sh->first_slice_in_pic_flag && poc != s->poc) { -+ av_log(s->avctx, AV_LOG_WARNING, -+ "Ignoring POC change between slices: %d -> %d\n", s->poc, poc); -+ if (s->avctx->err_recognition & AV_EF_EXPLODE) -+ return AVERROR_INVALIDDATA; -+ poc = s->poc; -+ } -+ s->poc = poc; -+ -+ sh->short_term_ref_pic_set_sps_flag = get_bits1(gb); -+ pos = get_bits_left(gb); -+ if (!sh->short_term_ref_pic_set_sps_flag) { -+ ret = ff_hevc_rpi_decode_short_term_rps(gb, s->avctx, &sh->slice_rps, s->ps.sps, 1); -+ if (ret < 0) -+ return ret; -+ -+ sh->short_term_rps = &sh->slice_rps; -+ } else { -+ int numbits, rps_idx; -+ -+ if (!s->ps.sps->nb_st_rps) { -+ av_log(s->avctx, AV_LOG_ERROR, "No ref lists in the SPS.\n"); -+ return AVERROR_INVALIDDATA; -+ } -+ -+ numbits = av_ceil_log2(s->ps.sps->nb_st_rps); -+ rps_idx = numbits > 0 ? get_bits(gb, numbits) : 0; -+ sh->short_term_rps = &s->ps.sps->st_rps[rps_idx]; -+ } -+ sh->short_term_ref_pic_set_size = pos - get_bits_left(gb); -+ -+ pos = get_bits_left(gb); -+ ret = decode_lt_rps(s, &sh->long_term_rps, gb); -+ if (ret < 0) { -+ av_log(s->avctx, AV_LOG_WARNING, "Invalid long term RPS.\n"); -+ if (s->avctx->err_recognition & AV_EF_EXPLODE) -+ return AVERROR_INVALIDDATA; -+ } -+ sh->long_term_ref_pic_set_size = pos - get_bits_left(gb); -+ -+ if (s->ps.sps->sps_temporal_mvp_enabled_flag) -+ sh->slice_temporal_mvp_enabled_flag = get_bits1(gb); -+ else -+ sh->slice_temporal_mvp_enabled_flag = 0; -+ } else { -+ s->sh.short_term_rps = NULL; -+ s->poc = 0; -+ } -+ -+ /* 8.3.1 */ -+ if (sh->first_slice_in_pic_flag && s->temporal_id == 0 && -+ s->nal_unit_type != HEVC_NAL_TRAIL_N && -+ s->nal_unit_type != HEVC_NAL_TSA_N && -+ s->nal_unit_type != HEVC_NAL_STSA_N && -+ s->nal_unit_type != HEVC_NAL_RADL_N && -+ s->nal_unit_type != HEVC_NAL_RADL_R && -+ s->nal_unit_type != HEVC_NAL_RASL_N && -+ s->nal_unit_type != HEVC_NAL_RASL_R) -+ s->pocTid0 = s->poc; -+ -+ if (s->ps.sps->sao_enabled) { -+ sh->slice_sample_adaptive_offset_flag[0] = get_bits1(gb); -+ if (ctx_cfmt(s) != 0) { -+ sh->slice_sample_adaptive_offset_flag[1] = -+ sh->slice_sample_adaptive_offset_flag[2] = get_bits1(gb); -+ } -+ } else { -+ sh->slice_sample_adaptive_offset_flag[0] = 0; -+ sh->slice_sample_adaptive_offset_flag[1] = 0; -+ sh->slice_sample_adaptive_offset_flag[2] = 0; -+ } -+ -+ sh->nb_refs[L0] = sh->nb_refs[L1] = 0; -+ if (sh->slice_type == HEVC_SLICE_P || sh->slice_type == HEVC_SLICE_B) { -+ int nb_refs; -+ -+ sh->nb_refs[L0] = s->ps.pps->num_ref_idx_l0_default_active; -+ if (sh->slice_type == HEVC_SLICE_B) -+ sh->nb_refs[L1] = s->ps.pps->num_ref_idx_l1_default_active; -+ -+ if (get_bits1(gb)) { // num_ref_idx_active_override_flag -+ sh->nb_refs[L0] = get_ue_golomb_long(gb) + 1; -+ if (sh->slice_type == HEVC_SLICE_B) -+ sh->nb_refs[L1] = get_ue_golomb_long(gb) + 1; -+ } -+ if (sh->nb_refs[L0] > HEVC_MAX_REFS || sh->nb_refs[L1] > HEVC_MAX_REFS) { -+ av_log(s->avctx, AV_LOG_ERROR, "Too many refs: %d/%d.\n", -+ sh->nb_refs[L0], sh->nb_refs[L1]); -+ return AVERROR_INVALIDDATA; -+ } -+ -+ sh->rpl_modification_flag[0] = 0; -+ sh->rpl_modification_flag[1] = 0; -+ nb_refs = ff_hevc_rpi_frame_nb_refs(s); -+ if (!nb_refs) { -+ av_log(s->avctx, AV_LOG_ERROR, "Zero refs for a frame with P or B slices.\n"); -+ return AVERROR_INVALIDDATA; -+ } -+ -+ if (s->ps.pps->lists_modification_present_flag && nb_refs > 1) { -+ sh->rpl_modification_flag[0] = get_bits1(gb); -+ if (sh->rpl_modification_flag[0]) { -+ for (i = 0; i < sh->nb_refs[L0]; i++) -+ sh->list_entry_lx[0][i] = get_bits(gb, av_ceil_log2(nb_refs)); -+ } -+ -+ if (sh->slice_type == HEVC_SLICE_B) { -+ sh->rpl_modification_flag[1] = get_bits1(gb); -+ if (sh->rpl_modification_flag[1] == 1) -+ for (i = 0; i < sh->nb_refs[L1]; i++) -+ sh->list_entry_lx[1][i] = get_bits(gb, av_ceil_log2(nb_refs)); -+ } -+ } -+ -+ if (sh->slice_type == HEVC_SLICE_B) -+ sh->mvd_l1_zero_flag = get_bits1(gb); -+ -+ if (s->ps.pps->cabac_init_present_flag) -+ sh->cabac_init_flag = get_bits1(gb); -+ else -+ sh->cabac_init_flag = 0; -+ -+ sh->collocated_ref_idx = 0; -+ if (sh->slice_temporal_mvp_enabled_flag) { -+ sh->collocated_list = L0; -+ if (sh->slice_type == HEVC_SLICE_B) -+ sh->collocated_list = !get_bits1(gb); -+ -+ if (sh->nb_refs[sh->collocated_list] > 1) { -+ sh->collocated_ref_idx = get_ue_golomb_long(gb); -+ if (sh->collocated_ref_idx >= sh->nb_refs[sh->collocated_list]) { -+ av_log(s->avctx, AV_LOG_ERROR, -+ "Invalid collocated_ref_idx: %d.\n", -+ sh->collocated_ref_idx); -+ return AVERROR_INVALIDDATA; -+ } -+ } -+ } -+ -+ if ((s->ps.pps->weighted_pred_flag && sh->slice_type == HEVC_SLICE_P) || -+ (s->ps.pps->weighted_bipred_flag && sh->slice_type == HEVC_SLICE_B)) -+ { -+ if ((ret = pred_weight_table(s, gb)) != 0) -+ return ret; -+ } -+ else -+ { -+ // Give us unit weights -+ default_pred_weight_table(s); -+ } -+ -+ sh->max_num_merge_cand = 5 - get_ue_golomb_long(gb); -+ if (sh->max_num_merge_cand < 1 || sh->max_num_merge_cand > 5) { -+ av_log(s->avctx, AV_LOG_ERROR, -+ "Invalid number of merging MVP candidates: %d.\n", -+ sh->max_num_merge_cand); -+ return AVERROR_INVALIDDATA; -+ } -+ } -+ -+ sh->slice_qp_delta = get_se_golomb(gb); -+ -+ if (s->ps.pps->pic_slice_level_chroma_qp_offsets_present_flag) { -+ sh->slice_cb_qp_offset = get_se_golomb(gb); -+ sh->slice_cr_qp_offset = get_se_golomb(gb); -+ if (!qp_offset_valid(sh->slice_cb_qp_offset) || -+ !qp_offset_valid(s->ps.pps->cb_qp_offset + sh->slice_cb_qp_offset) || -+ !qp_offset_valid(sh->slice_cr_qp_offset) || -+ !qp_offset_valid(s->ps.pps->cr_qp_offset + sh->slice_cr_qp_offset)) -+ { -+ av_log(s->avctx, AV_LOG_ERROR, "Bad chroma offset (pps:%d/%d; slice=%d/%d\n", -+ sh->slice_cr_qp_offset, sh->slice_cr_qp_offset, -+ s->ps.pps->cb_qp_offset, s->ps.pps->cr_qp_offset); -+ return AVERROR_INVALIDDATA; -+ } -+ } else -+ { -+ sh->slice_cb_qp_offset = 0; -+ sh->slice_cr_qp_offset = 0; -+ } -+ -+ if (s->ps.pps->chroma_qp_offset_list_enabled_flag) -+ sh->cu_chroma_qp_offset_enabled_flag = get_bits1(gb); -+ else -+ sh->cu_chroma_qp_offset_enabled_flag = 0; -+ -+ if (s->ps.pps->deblocking_filter_control_present_flag) { -+ int deblocking_filter_override_flag = 0; -+ -+ if (s->ps.pps->deblocking_filter_override_enabled_flag) -+ deblocking_filter_override_flag = get_bits1(gb); -+ -+ if (deblocking_filter_override_flag) { -+ sh->disable_deblocking_filter_flag = get_bits1(gb); -+ if (!sh->disable_deblocking_filter_flag) { -+ int beta_offset_div2 = get_se_golomb(gb); -+ int tc_offset_div2 = get_se_golomb(gb) ; -+ if (beta_offset_div2 < -6 || beta_offset_div2 > 6 || -+ tc_offset_div2 < -6 || tc_offset_div2 > 6) { -+ av_log(s->avctx, AV_LOG_ERROR, -+ "Invalid deblock filter offsets: %d, %d\n", -+ beta_offset_div2, tc_offset_div2); -+ return AVERROR_INVALIDDATA; -+ } -+ sh->beta_offset = beta_offset_div2 * 2; -+ sh->tc_offset = tc_offset_div2 * 2; -+ } -+ } else { -+ sh->disable_deblocking_filter_flag = s->ps.pps->disable_dbf; -+ sh->beta_offset = s->ps.pps->beta_offset; -+ sh->tc_offset = s->ps.pps->tc_offset; -+ } -+ } else { -+ sh->disable_deblocking_filter_flag = 0; -+ sh->beta_offset = 0; -+ sh->tc_offset = 0; -+ } -+ -+ if (s->ps.pps->seq_loop_filter_across_slices_enabled_flag && -+ (sh->slice_sample_adaptive_offset_flag[0] || -+ sh->slice_sample_adaptive_offset_flag[1] || -+ !sh->disable_deblocking_filter_flag)) { -+ sh->slice_loop_filter_across_slices_enabled_flag = get_bits1(gb); -+ } else { -+ sh->slice_loop_filter_across_slices_enabled_flag = s->ps.pps->seq_loop_filter_across_slices_enabled_flag; -+ } -+ sh->no_dblk_boundary_flags = -+ (sh->slice_loop_filter_across_slices_enabled_flag ? 0 : -+ BOUNDARY_UPPER_SLICE | BOUNDARY_LEFT_SLICE) | -+ (s->ps.pps->loop_filter_across_tiles_enabled_flag ? 0 : -+ BOUNDARY_UPPER_TILE | BOUNDARY_LEFT_TILE); -+ -+ -+ } else if (!s->slice_initialized) { -+ av_log(s->avctx, AV_LOG_ERROR, "Independent slice segment missing.\n"); -+ return AVERROR_INVALIDDATA; -+ } -+ -+ sh->num_entry_point_offsets = 0; -+ sh->offload_wpp = 0; -+ sh->offload_tiles = 0; -+ -+ if (s->ps.pps->tiles_enabled_flag || s->ps.pps->entropy_coding_sync_enabled_flag) { -+ unsigned num_entry_point_offsets = get_ue_golomb_long(gb); -+ // It would be possible to bound this tighter but this here is simpler -+ if (num_entry_point_offsets > get_bits_left(gb)) { -+ av_log(s->avctx, AV_LOG_ERROR, "num_entry_point_offsets %d is invalid\n", num_entry_point_offsets); -+ return AVERROR_INVALIDDATA; -+ } -+ -+ sh->num_entry_point_offsets = num_entry_point_offsets; -+ if (sh->num_entry_point_offsets > 0) { -+ int offset_len = get_ue_golomb_long(gb) + 1; -+ -+ if (offset_len < 1 || offset_len > 32) { -+ sh->num_entry_point_offsets = 0; -+ av_log(s->avctx, AV_LOG_ERROR, "offset_len %d is invalid\n", offset_len); -+ return AVERROR_INVALIDDATA; -+ } -+ -+ if ((ret = alloc_entry_points(sh, sh->num_entry_point_offsets)) < 0) -+ { -+ av_log(s->avctx, AV_LOG_ERROR, "Failed to allocate memory\n"); -+ return ret; -+ } -+ -+ for (i = 0; i < sh->num_entry_point_offsets; i++) { -+ uint32_t val_minus1 = get_bits_long(gb, offset_len); -+ if (val_minus1 > (1 << 28)) -+ { -+ // We can declare offsets of > 2^28 bad without loss of generality -+ // Will check actual bounds wrt NAL later, but this keeps -+ // the values within bounds we can deal with easily -+ av_log(s->avctx, AV_LOG_ERROR, "entry_point_offset_minus1 %d invalid\n", val_minus1); -+ return AVERROR_INVALIDDATA; -+ } -+ sh->entry_point_offset[i] = val_minus1 + 1; // +1 to get the size -+ } -+ -+ // Do we want to offload this -+ if (s->threads_type != 0) -+ { -+ sh->offload_tiles = (!s->ps.pps->tile_wpp_inter_disable || sh->slice_type == HEVC_SLICE_I) && -+ s->ps.pps->num_tile_columns > 1; -+ // * We only cope with WPP in a single column -+ // Probably want to deal with that case as tiles rather than WPP anyway -+ // ?? Not actually sure that the main code deals with WPP + multi-col correctly -+ sh->offload_wpp = s->ps.pps->entropy_coding_sync_enabled_flag && -+ s->ps.pps->num_tile_columns == 1; -+ } -+ } -+ } -+ -+ if (s->ps.pps->slice_header_extension_present_flag) { -+ unsigned int length = get_ue_golomb_long(gb); -+ if (length*8LL > get_bits_left(gb)) { -+ av_log(s->avctx, AV_LOG_ERROR, "too many slice_header_extension_data_bytes\n"); -+ return AVERROR_INVALIDDATA; -+ } -+ for (i = 0; i < length; i++) -+ skip_bits(gb, 8); // slice_header_extension_data_byte -+ } -+ -+ // Inferred parameters -+ sh->slice_qp = 26U + s->ps.pps->pic_init_qp_minus26 + sh->slice_qp_delta; -+ if (sh->slice_qp > 51 || -+ sh->slice_qp < -s->ps.sps->qp_bd_offset) { -+ av_log(s->avctx, AV_LOG_ERROR, -+ "The slice_qp %d is outside the valid range " -+ "[%d, 51].\n", -+ sh->slice_qp, -+ -s->ps.sps->qp_bd_offset); -+ return AVERROR_INVALIDDATA; -+ } -+ -+ if (get_bits_left(gb) < 0) { -+ av_log(s->avctx, AV_LOG_ERROR, -+ "Overread slice header by %d bits\n", -get_bits_left(gb)); -+ return AVERROR_INVALIDDATA; -+ } -+ -+ s->slice_initialized = 1; -+ return 0; -+} -+ -+static void hls_sao_param(const HEVCRpiContext *s, HEVCRpiLocalContext * const lc, const int rx, const int ry) -+{ -+ RpiSAOParams * const sao = s->sao + rx + ry * s->ps.sps->ctb_width; -+ int c_idx, i; -+ -+ if (s->sh.slice_sample_adaptive_offset_flag[0] || -+ s->sh.slice_sample_adaptive_offset_flag[1]) { -+ if ((lc->ctb_avail & AVAIL_L) != 0) -+ { -+ const int sao_merge_left_flag = ff_hevc_rpi_sao_merge_flag_decode(lc); -+ if (sao_merge_left_flag) { -+ *sao = sao[-1]; -+ return; -+ } -+ } -+ if ((lc->ctb_avail & AVAIL_U) != 0) -+ { -+ const int sao_merge_up_flag = ff_hevc_rpi_sao_merge_flag_decode(lc); -+ if (sao_merge_up_flag) { -+ *sao = sao[-(int)s->ps.sps->ctb_width]; -+ return; -+ } -+ } -+ } -+ -+ for (c_idx = 0; c_idx < (ctx_cfmt(s) != 0 ? 3 : 1); c_idx++) { -+ const unsigned int log2_sao_offset_scale = c_idx == 0 ? s->ps.pps->log2_sao_offset_scale_luma : -+ s->ps.pps->log2_sao_offset_scale_chroma; -+ int offset_abs[4]; -+ char offset_sign[4] = {0}; -+ -+ if (!s->sh.slice_sample_adaptive_offset_flag[c_idx]) { -+ sao->type_idx[c_idx] = SAO_NOT_APPLIED; -+ continue; -+ } -+ -+ if (c_idx == 2) { -+ sao->type_idx[2] = sao->type_idx[1]; -+ sao->eo_class[2] = sao->eo_class[1]; -+ } else { -+ sao->type_idx[c_idx] = ff_hevc_rpi_sao_type_idx_decode(lc); -+ } -+ -+ // ** Could use BY22 here quite plausibly - this is all bypass stuff -+ // though only per CTB so not very timing critical -+ -+ if (sao->type_idx[c_idx] == SAO_NOT_APPLIED) -+ continue; -+ -+ for (i = 0; i < 4; i++) -+ offset_abs[i] = ff_hevc_rpi_sao_offset_abs_decode(s, lc); -+ -+ if (sao->type_idx[c_idx] == SAO_BAND) { -+ for (i = 0; i < 4; i++) { -+ if (offset_abs[i] != 0) -+ offset_sign[i] = ff_hevc_rpi_sao_offset_sign_decode(lc); -+ } -+ sao->band_position[c_idx] = ff_hevc_rpi_sao_band_position_decode(lc); -+ } else if (c_idx != 2) { -+ sao->eo_class[c_idx] = ff_hevc_rpi_sao_eo_class_decode(lc); -+ } -+ -+ // Inferred parameters -+ sao->offset_val[c_idx][0] = 0; -+ for (i = 0; i < 4; i++) { -+ sao->offset_val[c_idx][i + 1] = offset_abs[i] << log2_sao_offset_scale; -+ if (sao->type_idx[c_idx] == SAO_EDGE) { -+ if (i > 1) -+ sao->offset_val[c_idx][i + 1] = -sao->offset_val[c_idx][i + 1]; -+ } else if (offset_sign[i]) { -+ sao->offset_val[c_idx][i + 1] = -sao->offset_val[c_idx][i + 1]; -+ } -+ } -+ } -+} -+ -+#if 0 -+static int hls_cross_component_pred(HEVCRpiLocalContext * const lc, const int idx) { -+ int log2_res_scale_abs_plus1 = ff_hevc_rpi_log2_res_scale_abs(lc, idx); // 0..4 -+ -+ if (log2_res_scale_abs_plus1 != 0) { -+ int res_scale_sign_flag = ff_hevc_rpi_res_scale_sign_flag(lc, idx); -+ lc->tu.res_scale_val = (1 << (log2_res_scale_abs_plus1 - 1)) * -+ (1 - 2 * res_scale_sign_flag); -+ } else { -+ lc->tu.res_scale_val = 0; -+ } -+ -+ -+ return 0; -+} -+#endif -+ -+static inline HEVCPredCmd * rpi_new_intra_cmd(HEVCRpiJob * const jb) -+{ -+ return jb->intra.cmds + jb->intra.n++; -+} -+ -+#define A0(x, y, U, L, UL, UR, DL) \ -+ [(x)+(y)*16] = (((U) ? AVAIL_U : 0) | ((L) ? AVAIL_L : 0) | ((UL) ? AVAIL_UL : 0) | ((UR) ? AVAIL_UR : 0) | ((DL) ? AVAIL_DL : 0)) -+ -+#define A1(x, y, U, L, UL, UR, DL) \ -+ A0((x) + 0, (y) + 0, (U), (L), (UL), (U), (L) ), A0((x) + 1, (y) + 0, (U), 1, (U), (UR), 0 ),\ -+ A0((x) + 0, (y) + 1, 1, (L), (L), 1, (DL)), A0((x) + 1, (y) + 1, 1, 1, 1, 0, 0 ) -+ -+#define A2(x, y, U, L, UL, UR, DL) \ -+ A1((x) + 0, (y) + 0, (U), (L), (UL), (U), (L) ), A1((x) + 2, (y) + 0, (U), 1, (U), (UR), 0 ),\ -+ A1((x) + 0, (y) + 2, 1, (L), (L), 1, (DL)), A1((x) + 2, (y) + 2, 1, 1, 1, 0, 0 ) -+ -+#define A3(x, y, U, L, UL, UR, DL) \ -+ A2((x) + 0, (y) + 0, (U), (L), (UL), (U), (L) ), A2((x) + 4, (y) + 0, (U), 1, (U), (UR), 0 ),\ -+ A2((x) + 0, (y) + 4, 1, (L), (L), 1, (DL)), A2((x) + 4, (y) + 4, 1, 1, 1, 0, 0 ) -+ -+#define A4(x, y, U, L, UL, UR, DL) \ -+ A3((x) + 0, (y) + 0, (U), (L), (UL), (U), (L) ), A3((x) + 8, (y) + 0, (U), 1, (U), (UR), 0 ),\ -+ A3((x) + 0, (y) + 8, 1, (L), (L), 1, (DL)), A3((x) + 8, (y) + 8, 1, 1, 1, 0, 0 ) -+ -+static const uint8_t tb_flags[16 * 16] = {A4(0, 0, 0, 0, 0, 0, 0)}; -+ -+unsigned int ff_hevc_rpi_tb_avail_flags( -+ const HEVCRpiContext * const s, const HEVCRpiLocalContext * const lc, -+ const unsigned int x, const unsigned int y, const unsigned int w, const unsigned int h) -+{ -+ const unsigned int ctb_mask = ~0U << s->ps.sps->log2_ctb_size; -+ const unsigned int tb_x = x & ~ctb_mask; -+ const unsigned int tb_y = y & ~ctb_mask; -+ const unsigned int ctb_avail = lc->ctb_avail; -+ -+ const uint8_t * const tb_f = tb_flags + (tb_x >> 2) + (tb_y >> 2) * 16; -+ -+ unsigned int f = (ctb_avail | tb_f[0]) & (AVAIL_L | AVAIL_U | AVAIL_UL); -+ -+ // This deals with both the U & L edges -+ if ((tb_x | tb_y) != 0 && (~f & (AVAIL_L | AVAIL_U)) == 0) -+ f |= AVAIL_UL; -+ -+ if (x + w < lc->end_of_ctb_x) -+ f |= (tb_y == 0 ? ctb_avail >> (AVAIL_S_U - AVAIL_S_UR) : tb_f[(w - 1) >> 2]) & AVAIL_UR; -+ else if (tb_y == 0) -+ f |= (ctb_avail & AVAIL_UR); -+#if AVAIL_S_U - AVAIL_S_UR < 0 -+#error Shift problem -+#endif -+ -+ // Never any D if Y beyond eoctb -+ if (y + h < lc->end_of_ctb_y) -+ f |= (tb_x == 0 ? ctb_avail << (AVAIL_S_DL - AVAIL_S_L) : tb_f[((h - 1) >> 2) * 16]) & AVAIL_DL; -+#if AVAIL_S_DL - AVAIL_S_L < 0 -+#error Shift problem -+#endif -+ -+// printf("(%#x, %#x): %dx%d ca=%02x, ful=%02x, ftr=%02x, fdl=%02x, eox=%#x, eoy=%#x\n", x, y, w, h, -+// lc->ctb_avail, tb_f[0], tb_f[(w - 1) >> 2], tb_f[((h - 1) >> 2) * 16], -+// lc->end_of_ctb_x, lc->end_of_ctb_y); -+ -+ return f; -+} -+ -+#undef A0 -+#undef A1 -+#undef A2 -+#undef A3 -+#undef A4 -+ -+static void do_intra_pred(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc, int log2_trafo_size, int x0, int y0, int c_idx, -+ unsigned int avail) -+{ -+ // If rpi_enabled then sand - U & V done on U call -+ if (c_idx <= 1) -+ { -+ HEVCPredCmd *const cmd = rpi_new_intra_cmd(lc->jb0); -+ cmd->type = RPI_PRED_INTRA + c_idx; -+ cmd->size = log2_trafo_size; -+ cmd->avail = avail; -+ cmd->i_pred.x = x0; -+ cmd->i_pred.y = y0; -+ cmd->i_pred.mode = c_idx ? lc->tu.intra_pred_mode_c : lc->tu.intra_pred_mode; -+ -+// printf("(%#x, %#x) c_idx=%d, s=%d, a=%#x\n", x0, y0, c_idx, 1 << log2_trafo_size, avail); -+ } -+} -+ -+#define CBF_CB0_S 0 -+#define CBF_CB1_S 1 // CB1 must be CB0 + 1 -+#define CBF_CR0_S 2 -+#define CBF_CR1_S 3 -+ -+#define CBF_CB0 (1 << CBF_CB0_S) -+#define CBF_CR0 (1 << CBF_CR0_S) -+#define CBF_CB1 (1 << CBF_CB1_S) -+#define CBF_CR1 (1 << CBF_CR1_S) -+ -+// * Only good for chroma_idx == 1 -+static int hls_transform_unit(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc, -+ const unsigned int x0, const unsigned int y0, -+ const unsigned int log2_cb_size, const unsigned int log2_trafo_size, -+ const unsigned int blk_idx, const int cbf_luma, -+ const unsigned int cbf_chroma) -+{ -+ const unsigned int log2_trafo_size_c = FFMAX(2, log2_trafo_size - 1); -+ const unsigned int x0_c = x0 & ~7; -+ const unsigned int y0_c = y0 & ~7; -+ -+ enum ScanType scan_idx = SCAN_DIAG; -+ enum ScanType scan_idx_c = SCAN_DIAG; -+ -+ if (lc->cu.pred_mode == MODE_INTRA) -+ { -+ const unsigned int trafo_size = 1 << log2_trafo_size; -+ const unsigned int avail = ff_hevc_rpi_tb_avail_flags(s, lc, x0, y0, trafo_size, trafo_size); -+ -+ do_intra_pred(s, lc, log2_trafo_size, x0, y0, 0, avail); -+ -+ if (log2_trafo_size > 2) -+ do_intra_pred(s, lc, log2_trafo_size_c, x0_c, y0_c, 1, avail); -+ else if (blk_idx == 3) -+ do_intra_pred(s, lc, log2_trafo_size_c, x0_c, y0_c, 1, -+ ff_hevc_rpi_tb_avail_flags(s, lc, x0_c, y0_c, 8, 8)); -+ -+ if (log2_trafo_size < 4) { -+ if (lc->tu.intra_pred_mode >= 6 && -+ lc->tu.intra_pred_mode <= 14) { -+ scan_idx = SCAN_VERT; -+ } else if (lc->tu.intra_pred_mode >= 22 && -+ lc->tu.intra_pred_mode <= 30) { -+ scan_idx = SCAN_HORIZ; -+ } -+ -+ if (lc->tu.intra_pred_mode_c >= 6 && -+ lc->tu.intra_pred_mode_c <= 14) { -+ scan_idx_c = SCAN_VERT; -+ } else if (lc->tu.intra_pred_mode_c >= 22 && -+ lc->tu.intra_pred_mode_c <= 30) { -+ scan_idx_c = SCAN_HORIZ; -+ } -+ } -+ } -+ -+ if (!cbf_luma && cbf_chroma == 0) -+ return 0; -+ -+ if (lc->tu.is_cu_qp_delta_wanted) -+ { -+ const int qp_delta = ff_hevc_rpi_cu_qp_delta(lc); -+ const unsigned int cb_mask = ~0U << log2_cb_size; -+ -+ if (qp_delta < -(26 + (s->ps.sps->qp_bd_offset >> 1)) || -+ qp_delta > (25 + (s->ps.sps->qp_bd_offset >> 1))) -+ { -+ av_log(s->avctx, AV_LOG_ERROR, -+ "The cu_qp_delta %d is outside the valid range " -+ "[%d, %d].\n", -+ qp_delta, -+ -(26 + (s->ps.sps->qp_bd_offset >> 1)), -+ (25 + (s->ps.sps->qp_bd_offset >> 1))); -+ return AVERROR_INVALIDDATA; -+ } -+ -+ lc->tu.is_cu_qp_delta_wanted = 0; -+ lc->tu.cu_qp_delta = qp_delta; -+ ff_hevc_rpi_set_qPy(s, lc, x0 & cb_mask, y0 & cb_mask); -+ } -+ -+ // * Not main profile & untested due to no conform streams -+ if (lc->tu.cu_chroma_qp_offset_wanted && cbf_chroma && -+ !lc->cu.cu_transquant_bypass_flag) { -+ int cu_chroma_qp_offset_flag = ff_hevc_rpi_cu_chroma_qp_offset_flag(lc); -+ if (cu_chroma_qp_offset_flag) { -+ int cu_chroma_qp_offset_idx = 0; -+ if (s->ps.pps->chroma_qp_offset_list_len_minus1 > 0) { -+ cu_chroma_qp_offset_idx = ff_hevc_rpi_cu_chroma_qp_offset_idx(s, lc); -+ } -+ lc->tu.qp_divmod6[1] += s->ps.pps->cb_qp_offset_list[cu_chroma_qp_offset_idx]; -+ lc->tu.qp_divmod6[2] += s->ps.pps->cr_qp_offset_list[cu_chroma_qp_offset_idx]; -+ } -+ lc->tu.cu_chroma_qp_offset_wanted = 0; -+ } -+ -+ if (cbf_luma) -+ ff_hevc_rpi_hls_residual_coding(s, lc, x0, y0, log2_trafo_size, scan_idx, 0); -+ -+ if (log2_trafo_size > 2 || blk_idx == 3) -+ { -+ if ((cbf_chroma & CBF_CB0) != 0) -+ ff_hevc_rpi_hls_residual_coding(s, lc, x0_c, y0_c, -+ log2_trafo_size_c, scan_idx_c, 1); -+ if ((cbf_chroma & CBF_CR0) != 0) -+ ff_hevc_rpi_hls_residual_coding(s, lc, x0_c, y0_c, -+ log2_trafo_size_c, scan_idx_c, 2); -+ } -+ -+ return 0; -+} -+ -+static inline void set_deblocking_bypass(const HEVCRpiContext * const s, const int x0, const int y0, const int log2_cb_size) -+{ -+ set_bits(s->is_pcm + (y0 >> 3) * s->ps.sps->pcm_width, x0 >> 3, s->ps.sps->pcm_width, log2_cb_size - 3); -+} -+ -+ -+static int hls_transform_tree(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc, -+ const unsigned int x0, const unsigned int y0, -+ const unsigned int log2_trafo_size, -+ const unsigned int trafo_depth, const unsigned int blk_idx, -+ const unsigned int cbf_c0) -+{ -+ // When trafo_size == 2 hls_transform_unit uses c0 so put in c1 -+ unsigned int cbf_c1 = cbf_c0; -+ int split_transform_flag; -+ int ret; -+ -+ if (lc->cu.intra_split_flag) { -+ if (trafo_depth == 1) { -+ lc->tu.intra_pred_mode = lc->pu.intra_pred_mode[blk_idx]; -+ if (ctx_cfmt(s) == 3) { -+ lc->tu.intra_pred_mode_c = lc->pu.intra_pred_mode_c[blk_idx]; -+ lc->tu.chroma_mode_c = lc->pu.chroma_mode_c[blk_idx]; -+ } else { -+ lc->tu.intra_pred_mode_c = lc->pu.intra_pred_mode_c[0]; -+ lc->tu.chroma_mode_c = lc->pu.chroma_mode_c[0]; -+ } -+ } -+ } else { -+ lc->tu.intra_pred_mode = lc->pu.intra_pred_mode[0]; -+ lc->tu.intra_pred_mode_c = lc->pu.intra_pred_mode_c[0]; -+ lc->tu.chroma_mode_c = lc->pu.chroma_mode_c[0]; -+ } -+ -+ if (log2_trafo_size <= s->ps.sps->log2_max_trafo_size && -+ log2_trafo_size > s->ps.sps->log2_min_tb_size && -+ trafo_depth < lc->cu.max_trafo_depth && -+ !(lc->cu.intra_split_flag && trafo_depth == 0)) -+ { -+ split_transform_flag = ff_hevc_rpi_split_transform_flag_decode(lc, log2_trafo_size); -+ } else { -+ int inter_split = s->ps.sps->max_transform_hierarchy_depth_inter == 0 && -+ lc->cu.pred_mode == MODE_INTER && -+ lc->cu.part_mode != PART_2Nx2N && -+ trafo_depth == 0; -+ -+ split_transform_flag = log2_trafo_size > s->ps.sps->log2_max_trafo_size || -+ (lc->cu.intra_split_flag && trafo_depth == 0) || -+ inter_split; -+ } -+ -+ if (log2_trafo_size > 2 || ctx_cfmt(s) == 3) -+ { -+ const int wants_c1 = ctx_cfmt(s) == 2 && (!split_transform_flag || log2_trafo_size == 3); -+ cbf_c1 = 0; -+ -+ if ((cbf_c0 & CBF_CB0) != 0) -+ { -+ cbf_c1 = ff_hevc_rpi_cbf_cb_cr_decode(lc, trafo_depth) << CBF_CB0_S; -+ if (wants_c1) -+ cbf_c1 |= ff_hevc_rpi_cbf_cb_cr_decode(lc, trafo_depth) << CBF_CB1_S; -+ } -+ -+ if ((cbf_c0 & CBF_CR0) != 0) -+ { -+ cbf_c1 |= ff_hevc_rpi_cbf_cb_cr_decode(lc, trafo_depth) << CBF_CR0_S; -+ if (wants_c1) -+ cbf_c1 |= ff_hevc_rpi_cbf_cb_cr_decode(lc, trafo_depth) << CBF_CR1_S; -+ } -+ } -+ -+ if (split_transform_flag) { -+ const int trafo_size_split = 1 << (log2_trafo_size - 1); -+ const int x1 = x0 + trafo_size_split; -+ const int y1 = y0 + trafo_size_split; -+ -+#define SUBDIVIDE(x, y, idx) \ -+do { \ -+ ret = hls_transform_tree(s, lc, x, y, \ -+ log2_trafo_size - 1, trafo_depth + 1, idx, \ -+ cbf_c1); \ -+ if (ret < 0) \ -+ return ret; \ -+} while (0) -+ -+ SUBDIVIDE(x0, y0, 0); -+ SUBDIVIDE(x1, y0, 1); -+ SUBDIVIDE(x0, y1, 2); -+ SUBDIVIDE(x1, y1, 3); -+ -+#undef SUBDIVIDE -+ } else { -+ // If trafo_size == 2 then we should have cbf_c == 0 here but as we can't have -+ // trafo_size == 2 with depth == 0 the issue is moot -+ const int cbf_luma = ((lc->cu.pred_mode != MODE_INTRA && trafo_depth == 0 && cbf_c1 == 0) || -+ ff_hevc_rpi_cbf_luma_decode(lc, trafo_depth)); -+ -+ ret = hls_transform_unit(s, lc, x0, y0, -+ log2_trafo_size + trafo_depth, log2_trafo_size, -+ blk_idx, cbf_luma, cbf_c1); -+ if (ret < 0) -+ return ret; -+ -+ if (!s->sh.disable_deblocking_filter_flag) { -+ ff_hevc_rpi_deblocking_boundary_strengths(s, lc, x0, y0, log2_trafo_size, cbf_luma); -+ } -+ } -+ return 0; -+} -+ -+ -+static int pcm_extract(const HEVCRpiContext * const s, const uint8_t * pcm, const int length, const int x0, const int y0, const int cb_size) -+{ -+ GetBitContext gb; -+ int ret; -+ -+ ret = init_get_bits(&gb, pcm, length); -+ if (ret < 0) -+ return ret; -+ -+ s->hevcdsp.put_pcm(av_rpi_sand_frame_pos_y(s->frame, x0, y0), -+ frame_stride1(s->frame, 0), -+ cb_size, cb_size, &gb, s->ps.sps->pcm.bit_depth); -+ -+ s->hevcdsp.put_pcm_c(av_rpi_sand_frame_pos_c(s->frame, x0 >> ctx_hshift(s, 1), y0 >> ctx_vshift(s, 1)), -+ s->frame->linesize[1], -+ cb_size >> ctx_hshift(s, 1), -+ cb_size >> ctx_vshift(s, 1), -+ &gb, s->ps.sps->pcm.bit_depth_chroma); -+ -+ return 0; -+} -+ -+ -+// x * 2^(y*2) -+static inline unsigned int xyexp2(const unsigned int x, const unsigned int y) -+{ -+ return x << (y * 2); -+} -+ -+static int hls_pcm_sample(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc, const int x0, const int y0, unsigned int log2_cb_size) -+{ -+ // Length in bits -+ const unsigned int length = xyexp2(s->ps.sps->pcm.bit_depth, log2_cb_size) + -+ xyexp2(s->ps.sps->pcm.bit_depth_chroma, log2_cb_size - ctx_vshift(s, 1)) + -+ xyexp2(s->ps.sps->pcm.bit_depth_chroma, log2_cb_size - ctx_vshift(s, 2)); -+ -+ const uint8_t * const pcm = ff_hevc_rpi_cabac_skip_bytes(&lc->cc, (length + 7) >> 3); -+ -+ if (!s->sh.disable_deblocking_filter_flag) -+ ff_hevc_rpi_deblocking_boundary_strengths(s, lc, x0, y0, log2_cb_size, 0); -+ -+ // Copy coeffs -+ { -+ const int blen = (length + 7) >> 3; -+ // Round allocated bytes up to nearest 32 to avoid alignment confusion -+ // Allocation is in int16_t s -+ // As we are only using 1 byte per sample and the coeff buffer allows 2 per -+ // sample this rounding doesn't affect the total size we need to allocate for -+ // the coeff buffer -+ int16_t * const coeffs = rpi_alloc_coeff_buf(lc->jb0, 0, ((blen + 31) & ~31) >> 1); -+ memcpy(coeffs, pcm, blen); -+ -+ // Our coeff stash assumes that any partially allocated 64byte lump -+ // is zeroed so make that true. -+ { -+ uint8_t * const eopcm = (uint8_t *)coeffs + blen; -+ if ((-(intptr_t)eopcm & 63) != 0) -+ memset(eopcm, 0, -(intptr_t)eopcm & 63); -+ } -+ -+ // Add command -+ { -+ HEVCPredCmd *const cmd = rpi_new_intra_cmd(lc->jb0); -+ cmd->type = RPI_PRED_I_PCM; -+ cmd->size = log2_cb_size; -+ cmd->i_pcm.src = coeffs; -+ cmd->i_pcm.x = x0; -+ cmd->i_pcm.y = y0; -+ cmd->i_pcm.src_len = length; -+ } -+ return 0; -+ } -+} -+ -+ -+static void hevc_await_progress(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc, const HEVCRpiFrame * const ref, -+ const MvXY xy, const int y0, const int height) -+{ -+ if (s->threads_type != 0) { -+ const int y = FFMAX(0, (MV_Y(xy) >> 2) + y0 + height + 9); -+ -+ // Progress has to be attached to current job as the actual wait -+ // is in worker_core which can't use lc -+ int16_t *const pr = lc->jb0->progress_req + ref->dpb_no; -+ if (*pr < y) { -+ *pr = y; -+ } -+ } -+} -+ -+static void hevc_luma_mv_mvp_mode(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc, -+ const int x0, const int y0, const int nPbW, -+ const int nPbH, -+ HEVCRpiMvField * const mv) -+{ -+ enum InterPredIdc inter_pred_idc = PRED_L0; -+ int mvp_flag; -+ const unsigned int avail = ff_hevc_rpi_tb_avail_flags(s, lc, x0, y0, nPbW, nPbH); -+ -+ mv->pred_flag = 0; -+ if (s->sh.slice_type == HEVC_SLICE_B) -+ inter_pred_idc = ff_hevc_rpi_inter_pred_idc_decode(lc, nPbW, nPbH); -+ -+ if (inter_pred_idc != PRED_L1) { -+ MvXY mvd; -+ -+ if (s->sh.nb_refs[L0]) -+ mv->ref_idx[0]= ff_hevc_rpi_ref_idx_lx_decode(lc, s->sh.nb_refs[L0]); -+ -+ mv->pred_flag = PF_L0; -+ mvd = ff_hevc_rpi_hls_mvd_coding(lc); -+ mvp_flag = ff_hevc_rpi_mvp_lx_flag_decode(lc); -+ ff_hevc_rpi_luma_mv_mvp_mode(s, lc, x0, y0, nPbW, nPbH, avail, -+ mv, mvp_flag, 0); -+ mv->xy[0] = mvxy_add(mv->xy[0], mvd); -+ } -+ -+ if (inter_pred_idc != PRED_L0) { -+ MvXY mvd = 0; -+ -+ if (s->sh.nb_refs[L1]) -+ mv->ref_idx[1] = ff_hevc_rpi_ref_idx_lx_decode(lc, s->sh.nb_refs[L1]); -+ -+ if (s->sh.mvd_l1_zero_flag != 1 || inter_pred_idc != PRED_BI) -+ mvd = ff_hevc_rpi_hls_mvd_coding(lc); -+ -+ mv->pred_flag += PF_L1; -+ mvp_flag = ff_hevc_rpi_mvp_lx_flag_decode(lc); -+ ff_hevc_rpi_luma_mv_mvp_mode(s, lc, x0, y0, nPbW, nPbH, avail, -+ mv, mvp_flag, 1); -+ mv->xy[1] = mvxy_add(mv->xy[1], mvd); -+ } -+} -+ -+ -+static HEVCRpiInterPredQ * -+rpi_nxt_pred(HEVCRpiInterPredEnv * const ipe, const unsigned int load_val, const uint32_t fn) -+{ -+ HEVCRpiInterPredQ * yp = NULL; -+ HEVCRpiInterPredQ * ypt = ipe->q + ipe->curr; -+ const unsigned int max_fill = ipe->max_fill; -+ unsigned int load = UINT_MAX; -+ -+ for (unsigned int i = 0; i != ipe->n_grp; ++i, ++ypt) { -+ // We will always have enough room between the Qs but if we are -+ // running critically low due to poor scheduling then use fill size -+ // rather than load to determine QPU. This has obvious dire -+ // performance implications but (a) it is better than crashing -+ // and (b) it should (almost) never happen -+ const unsigned int tfill = (char *)ypt->qpu_mc_curr - (char *)ypt->qpu_mc_base; -+ const unsigned int tload = tfill > max_fill ? tfill + 0x1000000 : ypt->load; -+ -+ if (tload < load) -+ { -+ yp = ypt; -+ load = tload; -+ } -+ } -+ -+ yp->load += load_val; -+ ipe->used_grp = 1; -+ qpu_mc_link_set(yp->qpu_mc_curr, fn); -+ -+ return yp; -+} -+ -+ -+static void rpi_inter_pred_sync(HEVCRpiInterPredEnv * const ipe) -+{ -+ for (unsigned int i = 0; i != ipe->n; ++i) { -+ HEVCRpiInterPredQ * const q = ipe->q + i; -+ const unsigned int qfill = (char *)q->qpu_mc_curr - (char *)q->qpu_mc_base; -+ -+ qpu_mc_link_set(q->qpu_mc_curr, q->code_sync); -+ q->qpu_mc_curr = (qpu_mc_pred_cmd_t *)(&q->qpu_mc_curr->sync + 1); -+ q->load = (qfill >> 7); // Have a mild preference for emptier Qs to balance memory usage -+ } -+} -+ -+// Returns 0 on success -+// We no longer check for Q fullness as wew have emergncy code in ctu alloc -+// * However it might be an idea to have some means of spotting that we've used it -+static int rpi_inter_pred_next_ctu(HEVCRpiInterPredEnv * const ipe) -+{ -+ if (!ipe->used_grp) -+ return 0; -+ -+ if ((ipe->curr += ipe->n_grp) >= ipe->n) -+ { -+ ipe->curr = 0; -+ rpi_inter_pred_sync(ipe); -+ } -+ ipe->used = 1; -+ ipe->used_grp = 0; -+ -+ return 0; -+} -+ -+static void rpi_inter_pred_reset(HEVCRpiInterPredEnv * const ipe) -+{ -+ unsigned int i; -+ -+ ipe->curr = 0; -+ ipe->used = 0; -+ ipe->used_grp = 0; -+ for (i = 0; i != ipe->n; ++i) { -+ HEVCRpiInterPredQ * const q = ipe->q + i; -+ q->qpu_mc_curr = q->qpu_mc_base; -+ q->load = 0; -+ q->last_l0 = NULL; -+ q->last_l1 = NULL; -+ } -+} -+ -+static int rpi_inter_pred_alloc(HEVCRpiInterPredEnv * const ipe, -+ const unsigned int n_max, const unsigned int n_grp, -+ const unsigned int total_size, const unsigned int min_gap) -+{ -+ int rv; -+ -+ memset(ipe, 0, sizeof(*ipe)); -+ if ((ipe->q = av_mallocz(n_max * sizeof(*ipe->q))) == NULL) -+ return AVERROR(ENOMEM); -+ -+ ipe->n_grp = n_grp; -+ ipe->min_gap = min_gap; -+ -+ if ((rv = gpu_malloc_cached(total_size, &ipe->gptr)) != 0) -+ av_freep(&ipe->q); -+ return rv; -+} -+ -+ -+#if RPI_QPU_EMU_Y -+#define get_mc_address_y(f) ((f)->data[0]) -+#else -+#define get_mc_address_y(f) get_vc_address_y(f) -+#endif -+#if RPI_QPU_EMU_C -+#define get_mc_address_u(f) ((f)->data[1]) -+#else -+#define get_mc_address_u(f) get_vc_address_u(f) -+#endif -+ -+static inline uint32_t pack_wo_p(const int off, const int mul) -+{ -+ return PACK2(off * 2 + 1, mul); -+} -+ -+static inline uint32_t pack_wo_b(const int off0, const int off1, const int mul) -+{ -+ return PACK2(off0 + off1 + 1, mul); -+} -+ -+ -+static void -+rpi_pred_y(const HEVCRpiContext *const s, HEVCRpiJob * const jb, -+ const int x0, const int y0, -+ const int nPbW, const int nPbH, -+ const MvXY mv_xy, -+ const int weight_mul, -+ const int weight_offset, -+ AVFrame *const src_frame) -+{ -+ const unsigned int y_off = av_rpi_sand_frame_off_y(s->frame, x0, y0); -+ const unsigned int mx = MV_X(mv_xy) & 3; -+ const unsigned int my = MV_Y(mv_xy) & 3; -+ const unsigned int my_mx = (my << 8) | mx; -+ const uint32_t my2_mx2_my_mx = (my_mx << 16) | my_mx; -+ const qpu_mc_src_addr_t src_vc_address_y = get_mc_address_y(src_frame); -+ qpu_mc_dst_addr_t dst_addr = get_mc_address_y(s->frame) + y_off; -+ const uint32_t wo = pack_wo_p(weight_offset, weight_mul); -+ HEVCRpiInterPredEnv * const ipe = &jb->luma_ip; -+ const unsigned int xshl = av_rpi_sand_frame_xshl(s->frame); -+ -+ if (my_mx == 0) -+ { -+ const int x1 = x0 + (MV_X(mv_xy) >> 2); -+ const int y1 = y0 + (MV_Y(mv_xy) >> 2); -+ const int bh = nPbH; -+ -+ for (int start_x = 0; start_x < nPbW; start_x += 16) -+ { -+ const int bw = FFMIN(nPbW - start_x, 16); -+ HEVCRpiInterPredQ *const yp = rpi_nxt_pred(ipe, bh, s->qpu.y_p00); -+ qpu_mc_src_t *const src1 = yp->last_l0; -+ qpu_mc_pred_y_p00_t *const cmd_y = &yp->qpu_mc_curr->y.p00; -+ -+#if RPI_TSTATS -+ { -+ HEVCRpiStats *const ts = (HEVCRpiStats *)&s->tstats; -+ ++ts->y_pred1_x0y0; -+ -+ if (nPbW > 8) -+ ++ts->y_pred1_wgt8; -+ else -+ ++ts->y_pred1_wle8; -+ -+ if (nPbH > 16) -+ ++ts->y_pred1_hgt16; -+ else -+ ++ts->y_pred1_hle16; -+ } -+#endif -+ -+ src1->x = x1 + start_x; -+ src1->y = y1; -+ src1->base = src_vc_address_y; -+ cmd_y->w = bw; -+ cmd_y->h = bh; -+ cmd_y->wo1 = wo; -+ cmd_y->dst_addr = dst_addr + (start_x << xshl); -+ yp->last_l0 = &cmd_y->next_src1; -+ yp->qpu_mc_curr = (qpu_mc_pred_cmd_t *)(cmd_y + 1); -+ } -+ } -+ else -+ { -+ const int x1_m3 = x0 + (MV_X(mv_xy) >> 2) - 3; -+ const int y1_m3 = y0 + (MV_Y(mv_xy) >> 2) - 3; -+ const unsigned int bh = nPbH; -+ int start_x = 0; -+ -+#if 1 -+ // As Y-pred operates on two independant 8-wide src blocks we can merge -+ // this pred with the previous one if it the previous one is 8 pel wide, -+ // the same height as the current block, immediately to the left of our -+ // current dest block and mono-pred. -+ -+ qpu_mc_pred_y_p_t *const last_y8_p = jb->last_y8_p; -+ if (last_y8_p != NULL && last_y8_p->h == bh && last_y8_p->dst_addr + (8 << xshl) == dst_addr) -+ { -+ const int bw = FFMIN(nPbW, 8); -+ qpu_mc_src_t *const last_y8_src2 = jb->last_y8_l1; -+ -+ last_y8_src2->x = x1_m3; -+ last_y8_src2->y = y1_m3; -+ last_y8_src2->base = src_vc_address_y; -+ last_y8_p->w += bw; -+ last_y8_p->mymx21 = PACK2(my2_mx2_my_mx, last_y8_p->mymx21); -+ last_y8_p->wo2 = wo; -+ -+ jb->last_y8_p = NULL; -+ jb->last_y8_l1 = NULL; -+ start_x = bw; -+#if RPI_TSTATS -+ ++((HEVCRpiStats *)&s->tstats)->y_pred1_y8_merge; -+#endif -+ } -+#endif -+ -+ for (; start_x < nPbW; start_x += 16) -+ { -+ const int bw = FFMIN(nPbW - start_x, 16); -+ HEVCRpiInterPredQ *const yp = rpi_nxt_pred(ipe, bh + 7, s->qpu.y_pxx); -+ qpu_mc_src_t *const src1 = yp->last_l0; -+ qpu_mc_src_t *const src2 = yp->last_l1; -+ qpu_mc_pred_y_p_t *const cmd_y = &yp->qpu_mc_curr->y.p; -+#if RPI_TSTATS -+ { -+ HEVCRpiStats *const ts = (HEVCRpiStats *)&s->tstats; -+ if (mx == 0 && my == 0) -+ ++ts->y_pred1_x0y0; -+ else if (mx == 0) -+ ++ts->y_pred1_x0; -+ else if (my == 0) -+ ++ts->y_pred1_y0; -+ else -+ ++ts->y_pred1_xy; -+ -+ if (nPbW > 8) -+ ++ts->y_pred1_wgt8; -+ else -+ ++ts->y_pred1_wle8; -+ -+ if (nPbH > 16) -+ ++ts->y_pred1_hgt16; -+ else -+ ++ts->y_pred1_hle16; -+ } -+#endif -+ src1->x = x1_m3 + start_x; -+ src1->y = y1_m3; -+ src1->base = src_vc_address_y; -+ if (bw <= 8) -+ { -+ src2->x = MC_DUMMY_X; -+ src2->y = MC_DUMMY_Y; -+#if RPI_QPU_EMU_Y -+ src2->base = s->qpu_dummy_frame_emu; -+#else -+ src2->base = s->qpu_dummy_frame_qpu; -+#endif -+ } -+ else -+ { -+ src2->x = x1_m3 + start_x + 8; -+ src2->y = y1_m3; -+ src2->base = src_vc_address_y; -+ } -+ cmd_y->w = bw; -+ cmd_y->h = bh; -+ cmd_y->mymx21 = my2_mx2_my_mx; -+ cmd_y->wo1 = wo; -+ cmd_y->wo2 = wo; -+ cmd_y->dst_addr = dst_addr + (start_x << xshl); -+ yp->last_l0 = &cmd_y->next_src1; -+ yp->last_l1 = &cmd_y->next_src2; -+ yp->qpu_mc_curr = (qpu_mc_pred_cmd_t *)(cmd_y + 1); -+ -+ if (bw == 8) { -+ jb->last_y8_l1 = src2; -+ jb->last_y8_p = cmd_y; -+ } -+ } -+ } -+} -+ -+static void -+rpi_pred_y_b(const HEVCRpiContext * const s, HEVCRpiJob * const jb, -+ const int x0, const int y0, -+ const int nPbW, const int nPbH, -+ const struct HEVCRpiMvField *const mv_field, -+ const AVFrame *const src_frame, -+ const AVFrame *const src_frame2) -+{ -+ const unsigned int y_off = av_rpi_sand_frame_off_y(s->frame, x0, y0); -+ const MvXY mv = mv_field->xy[0]; -+ const MvXY mv2 = mv_field->xy[1]; -+ -+ const unsigned int mx = MV_X(mv) & 3; -+ const unsigned int my = MV_Y(mv) & 3; -+ const unsigned int my_mx = (my<<8) | mx; -+ const unsigned int mx2 = MV_X(mv2) & 3; -+ const unsigned int my2 = MV_Y(mv2) & 3; -+ const unsigned int my2_mx2 = (my2<<8) | mx2; -+ const uint32_t my2_mx2_my_mx = (my2_mx2 << 16) | my_mx; -+ const unsigned int ref_idx0 = mv_field->ref_idx[0]; -+ const unsigned int ref_idx1 = mv_field->ref_idx[1]; -+ const uint32_t wo1 = pack_wo_b(s->sh.luma_offset_l0[ref_idx0], s->sh.luma_offset_l1[ref_idx1], s->sh.luma_weight_l0[ref_idx0]); -+ const uint32_t wo2 = pack_wo_b(s->sh.luma_offset_l0[ref_idx0], s->sh.luma_offset_l1[ref_idx1], s->sh.luma_weight_l1[ref_idx1]); -+ -+ const unsigned int xshl = av_rpi_sand_frame_xshl(s->frame); -+ qpu_mc_dst_addr_t dst = get_mc_address_y(s->frame) + y_off; -+ const qpu_mc_src_addr_t src1_base = get_mc_address_y(src_frame); -+ const qpu_mc_src_addr_t src2_base = get_mc_address_y(src_frame2); -+ HEVCRpiInterPredEnv * const ipe = &jb->luma_ip; -+ -+ if (my2_mx2_my_mx == 0) -+ { -+ const int x1 = x0 + (MV_X(mv) >> 2); -+ const int y1 = y0 + (MV_Y(mv) >> 2); -+ const int x2 = x0 + (MV_X(mv2) >> 2); -+ const int y2 = y0 + (MV_Y(mv2) >> 2); -+ const int bh = nPbH; -+ -+ // Can do chunks a full 16 wide if we don't want the H filter -+ for (int start_x=0; start_x < nPbW; start_x += 16) -+ { -+ HEVCRpiInterPredQ *const yp = rpi_nxt_pred(ipe, bh, s->qpu.y_b00); -+ qpu_mc_src_t *const src1 = yp->last_l0; -+ qpu_mc_src_t *const src2 = yp->last_l1; -+ qpu_mc_pred_y_p_t *const cmd_y = &yp->qpu_mc_curr->y.p; -+#if RPI_TSTATS -+ { -+ HEVCRpiStats *const ts = (HEVCRpiStats *)&s->tstats; -+ ++ts->y_pred2_x0y0; -+ -+ if (nPbH > 16) -+ ++ts->y_pred2_hgt16; -+ else -+ ++ts->y_pred2_hle16; -+ } -+#endif -+ src1->x = x1 + start_x; -+ src1->y = y1; -+ src1->base = src1_base; -+ src2->x = x2 + start_x; -+ src2->y = y2; -+ src2->base = src2_base; -+ cmd_y->w = FFMIN(nPbW - start_x, 16); -+ cmd_y->h = bh; -+ cmd_y->mymx21 = 0; -+ cmd_y->wo1 = wo1; -+ cmd_y->wo2 = wo2; -+ cmd_y->dst_addr = dst + (start_x << xshl); -+ yp->last_l0 = &cmd_y->next_src1; -+ yp->last_l1 = &cmd_y->next_src2; -+ yp->qpu_mc_curr = (qpu_mc_pred_cmd_t *)(cmd_y + 1); -+ } -+ } -+ else -+ { -+ // Filter requires a run-up of 3 -+ const int x1 = x0 + (MV_X(mv) >> 2) - 3; -+ const int y1 = y0 + (MV_Y(mv) >> 2) - 3; -+ const int x2 = x0 + (MV_X(mv2) >> 2) - 3; -+ const int y2 = y0 + (MV_Y(mv2) >> 2) - 3; -+ const int bh = nPbH; -+ -+ for (int start_x=0; start_x < nPbW; start_x += 8) -+ { // B blocks work 8 at a time -+ // B weights aren't doubled as the QPU code does the same -+ // amount of work as it does for P -+ HEVCRpiInterPredQ *const yp = rpi_nxt_pred(ipe, bh + 7, s->qpu.y_bxx); -+ qpu_mc_src_t *const src1 = yp->last_l0; -+ qpu_mc_src_t *const src2 = yp->last_l1; -+ qpu_mc_pred_y_p_t *const cmd_y = &yp->qpu_mc_curr->y.p; -+#if RPI_TSTATS -+ { -+ HEVCRpiStats *const ts = (HEVCRpiStats *)&s->tstats; -+ const unsigned int mmx = mx | mx2; -+ const unsigned int mmy = my | my2; -+ if (mmx == 0 && mmy == 0) -+ ++ts->y_pred2_x0y0; -+ else if (mmx == 0) -+ ++ts->y_pred2_x0; -+ else if (mmy == 0) -+ ++ts->y_pred2_y0; -+ else -+ ++ts->y_pred2_xy; -+ -+ if (nPbH > 16) -+ ++ts->y_pred2_hgt16; -+ else -+ ++ts->y_pred2_hle16; -+ } -+#endif -+ src1->x = x1 + start_x; -+ src1->y = y1; -+ src1->base = src1_base; -+ src2->x = x2 + start_x; -+ src2->y = y2; -+ src2->base = src2_base; -+ cmd_y->w = FFMIN(nPbW - start_x, 8); -+ cmd_y->h = bh; -+ cmd_y->mymx21 = my2_mx2_my_mx; -+ cmd_y->wo1 = wo1; -+ cmd_y->wo2 = wo2; -+ cmd_y->dst_addr = dst + (start_x << xshl); -+ yp->last_l0 = &cmd_y->next_src1; -+ yp->last_l1 = &cmd_y->next_src2; -+ yp->qpu_mc_curr = (qpu_mc_pred_cmd_t *)(cmd_y + 1); -+ } -+ } -+} -+ -+// h/v shifts fixed at one as that is all the qasm copes with -+static void -+rpi_pred_c(const HEVCRpiContext * const s, HEVCRpiJob * const jb, -+ const unsigned int lx, const int x0_c, const int y0_c, -+ const int nPbW_c, const int nPbH_c, -+ const MvXY mv, -+ const int16_t * const c_weights, -+ const int16_t * const c_offsets, -+ AVFrame * const src_frame) -+{ -+ const unsigned int c_off = av_rpi_sand_frame_off_c(s->frame, x0_c, y0_c); -+ const int hshift = 1; // = s->ps.sps->hshift[1]; -+ const int vshift = 1; // = s->ps.sps->vshift[1]; -+ -+ const int x1_c = x0_c + (MV_X(mv) >> (2 + hshift)) - 1; -+ const int y1_c = y0_c + (MV_Y(mv) >> (2 + hshift)) - 1; -+ const qpu_mc_src_addr_t src_base_u = get_mc_address_u(src_frame); -+ const uint32_t x_coeffs = rpi_filter_coefs[av_mod_uintp2(MV_X(mv), 2 + hshift) << (1 - hshift)]; -+ const uint32_t y_coeffs = rpi_filter_coefs[av_mod_uintp2(MV_Y(mv), 2 + vshift) << (1 - vshift)]; -+ const uint32_t wo_u = pack_wo_p(c_offsets[0], c_weights[0]); -+ const uint32_t wo_v = pack_wo_p(c_offsets[1], c_weights[1]); -+ qpu_mc_dst_addr_t dst_base_u = get_mc_address_u(s->frame) + c_off; -+ HEVCRpiInterPredEnv * const ipe = &jb->chroma_ip; -+ const unsigned int xshl = av_rpi_sand_frame_xshl(s->frame) + 1; -+ const unsigned int bh = nPbH_c; -+ const uint32_t qfn = lx == 0 ? s->qpu.c_pxx : s->qpu.c_pxx_l1; -+ -+ for(int start_x=0; start_x < nPbW_c; start_x+=RPI_CHROMA_BLOCK_WIDTH) -+ { -+ HEVCRpiInterPredQ * const cp = rpi_nxt_pred(ipe, bh + 3, qfn); -+ qpu_mc_pred_c_p_t * const cmd_c = &cp->qpu_mc_curr->c.p; -+ qpu_mc_src_t ** const plast_lx = (lx == 0) ? &cp->last_l0 : &cp->last_l1; -+ qpu_mc_src_t * const last_lx = *plast_lx; -+ const int bw = FFMIN(nPbW_c-start_x, RPI_CHROMA_BLOCK_WIDTH); -+ -+ last_lx->x = x1_c + start_x; -+ last_lx->y = y1_c; -+ last_lx->base = src_base_u; -+ cmd_c->h = bh; -+ cmd_c->w = bw; -+ cmd_c->coeffs_x = x_coeffs; -+ cmd_c->coeffs_y = y_coeffs; -+ cmd_c->wo_u = wo_u; -+ cmd_c->wo_v = wo_v; -+ cmd_c->dst_addr_c = dst_base_u + (start_x << xshl); -+ *plast_lx = &cmd_c->next_src; -+ cp->qpu_mc_curr = (qpu_mc_pred_cmd_t *)(cmd_c + 1); -+ } -+ return; -+} -+ -+// h/v shifts fixed at one as that is all the qasm copes with -+static void -+rpi_pred_c_b(const HEVCRpiContext * const s, HEVCRpiJob * const jb, -+ const int x0_c, const int y0_c, -+ const int nPbW_c, const int nPbH_c, -+ const struct HEVCRpiMvField * const mv_field, -+ const int16_t * const c_weights, -+ const int16_t * const c_offsets, -+ const int16_t * const c_weights2, -+ const int16_t * const c_offsets2, -+ AVFrame * const src_frame, -+ AVFrame * const src_frame2) -+{ -+ const unsigned int c_off = av_rpi_sand_frame_off_c(s->frame, x0_c, y0_c); -+ const int hshift = 1; // s->ps.sps->hshift[1]; -+ const int vshift = 1; // s->ps.sps->vshift[1]; -+ const MvXY mv = mv_field->xy[0]; -+ const MvXY mv2 = mv_field->xy[1]; -+ -+ const unsigned int mx = av_mod_uintp2(MV_X(mv), 2 + hshift); -+ const unsigned int my = av_mod_uintp2(MV_Y(mv), 2 + vshift); -+ const uint32_t coefs0_x = rpi_filter_coefs[mx << (1 - hshift)]; -+ const uint32_t coefs0_y = rpi_filter_coefs[my << (1 - vshift)]; // Fractional part of motion vector -+ const int x1_c = x0_c + (MV_X(mv) >> (2 + hshift)) - 1; -+ const int y1_c = y0_c + (MV_Y(mv) >> (2 + hshift)) - 1; -+ -+ const unsigned int mx2 = av_mod_uintp2(MV_X(mv2), 2 + hshift); -+ const unsigned int my2 = av_mod_uintp2(MV_Y(mv2), 2 + vshift); -+ const uint32_t coefs1_x = rpi_filter_coefs[mx2 << (1 - hshift)]; -+ const uint32_t coefs1_y = rpi_filter_coefs[my2 << (1 - vshift)]; // Fractional part of motion vector -+ -+ const int x2_c = x0_c + (MV_X(mv2) >> (2 + hshift)) - 1; -+ const int y2_c = y0_c + (MV_Y(mv2) >> (2 + hshift)) - 1; -+ -+ const uint32_t wo_u2 = pack_wo_b(c_offsets[0], c_offsets2[0], c_weights2[0]); -+ const uint32_t wo_v2 = pack_wo_b(c_offsets[1], c_offsets2[1], c_weights2[1]); -+ -+ const qpu_mc_dst_addr_t dst_base_u = get_mc_address_u(s->frame) + c_off; -+ const qpu_mc_src_addr_t src1_base = get_mc_address_u(src_frame); -+ const qpu_mc_src_addr_t src2_base = get_mc_address_u(src_frame2); -+ HEVCRpiInterPredEnv * const ipe = &jb->chroma_ip; -+ const unsigned int xshl = av_rpi_sand_frame_xshl(s->frame) + 1; -+ const unsigned int bh = nPbH_c; -+ -+ for (int start_x=0; start_x < nPbW_c; start_x += RPI_CHROMA_BLOCK_WIDTH) -+ { -+ const unsigned int bw = FFMIN(nPbW_c-start_x, RPI_CHROMA_BLOCK_WIDTH); -+ -+ HEVCRpiInterPredQ * const cp = rpi_nxt_pred(ipe, bh * 2 + 3, s->qpu.c_bxx); -+ qpu_mc_pred_c_b_t * const u = &cp->qpu_mc_curr->c.b; -+ qpu_mc_src_t * const src_l0 = cp->last_l0; -+ qpu_mc_src_t * const src_l1 = cp->last_l1; -+ -+ src_l0->x = x1_c + start_x; -+ src_l0->y = y1_c; -+ src_l0->base = src1_base; -+ src_l1->x = x2_c + start_x; -+ src_l1->y = y2_c; -+ src_l1->base = src2_base; -+ -+ u[0].h = bh; -+ u[0].w = bw; -+ u[0].coeffs_x1 = coefs0_x; -+ u[0].coeffs_y1 = coefs0_y; -+ u[0].weight_u1 = c_weights[0]; // Weight L0 U -+ u[0].weight_v1 = c_weights[1]; // Weight L0 V -+ u[0].coeffs_x2 = coefs1_x; -+ u[0].coeffs_y2 = coefs1_y; -+ u[0].wo_u2 = wo_u2; -+ u[0].wo_v2 = wo_v2; -+ u[0].dst_addr_c = dst_base_u + (start_x << xshl); -+ -+ cp->last_l0 = &u[0].next_src1; -+ cp->last_l1 = &u[0].next_src2; -+ cp->qpu_mc_curr = (qpu_mc_pred_cmd_t *)(u + 1); -+ } -+} -+ -+ -+static inline void -+col_stash(const HEVCRpiContext * const s, -+ const unsigned int x0, const unsigned int y0, const unsigned int w0, const unsigned int h0, -+ const HEVCRpiMvField * const mvf) -+{ -+ ColMvField * const col_mvf = s->ref->col_mvf; -+ const unsigned int x = (x0 + 15) >> 4; -+ const unsigned int y = (y0 + 15) >> 4; -+ const unsigned int w = ((x0 + 15 + w0) >> 4) - x; -+ const unsigned int h = ((y0 + 15 + h0) >> 4) - y; -+ -+ if (col_mvf != NULL && w != 0 && h != 0) -+ { -+ // Only record MV from the top left of the 16x16 block -+ -+ const RefPicList * const rpl = s->refPicList; -+ const ColMvField cmv = { -+ .L = { -+ { -+ .poc = (mvf->pred_flag & PF_L0) == 0 ? -+ COL_POC_INTRA : -+ COL_POC_MAKE_INTER(rpl[0].isLongTerm[mvf->ref_idx[0]], rpl[0].list[mvf->ref_idx[0]]), -+ .xy = mvf->xy[0] -+ }, -+ { -+ .poc = (mvf->pred_flag & PF_L1) == 0 ? -+ COL_POC_INTRA : -+ COL_POC_MAKE_INTER(rpl[1].isLongTerm[mvf->ref_idx[1]], rpl[1].list[mvf->ref_idx[1]]), -+ .xy = mvf->xy[1] -+ } -+ } -+ }; -+ -+ ColMvField * p = col_mvf + y * s->col_mvf_stride + x; -+ const unsigned int stride = s->col_mvf_stride - w; -+ unsigned int j = h; -+ -+ do -+ { -+ unsigned int k = w; -+ do -+ { -+ *p++ = cmv; -+ } while (--k != 0); -+ p += stride; -+ } while (--j != 0); -+ } -+} -+ -+static void hls_prediction_unit(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc, -+ const unsigned int x0, const unsigned int y0, -+ const unsigned int nPbW, const unsigned int nPbH, -+ const unsigned int log2_cb_size, const unsigned int partIdx, const unsigned int idx) -+{ -+ HEVCRpiJob * const jb = lc->jb0; -+ -+ struct HEVCRpiMvField current_mv = {{0}}; -+ const RefPicList *const refPicList = s->refPicList; -+ const HEVCRpiFrame *ref0 = NULL, *ref1 = NULL; -+ -+ if (lc->cu.pred_mode != MODE_SKIP) -+ lc->pu.merge_flag = ff_hevc_rpi_merge_flag_decode(lc); -+ -+ if (lc->cu.pred_mode == MODE_SKIP || lc->pu.merge_flag) { -+ const unsigned int merge_idx = s->sh.max_num_merge_cand <= 1 ? 0 : -+ ff_hevc_rpi_merge_idx_decode(s, lc); -+ -+ ff_hevc_rpi_luma_mv_merge_mode(s, lc, x0, y0, nPbW, nPbH, log2_cb_size, -+ partIdx, merge_idx, ¤t_mv); -+ } else { -+ hevc_luma_mv_mvp_mode(s, lc, x0, y0, nPbW, nPbH, ¤t_mv); -+ } -+ -+ { -+ HEVCRpiMvField * p = mvf_stash_ptr(s, lc, x0, y0); -+ unsigned int i, j; -+ -+ for (j = 0; j < nPbH >> LOG2_MIN_PU_SIZE; j++) -+ { -+ for (i = 0; i < nPbW >> LOG2_MIN_PU_SIZE; i++) -+ p[i] = current_mv; -+ p += MVF_STASH_WIDTH_PU; -+ } -+ } -+ -+ col_stash(s, x0, y0, nPbW, nPbH, ¤t_mv); -+ -+ if (current_mv.pred_flag & PF_L0) { -+ ref0 = refPicList[0].ref[current_mv.ref_idx[0]]; -+ if (!ref0) -+ return; -+ hevc_await_progress(s, lc, ref0, current_mv.xy[0], y0, nPbH); -+ } -+ if (current_mv.pred_flag & PF_L1) { -+ ref1 = refPicList[1].ref[current_mv.ref_idx[1]]; -+ if (!ref1) -+ return; -+ hevc_await_progress(s, lc, ref1, current_mv.xy[1], y0, nPbH); -+ } -+ -+ if (current_mv.pred_flag == PF_L0) { -+ const int x0_c = x0 >> ctx_hshift(s, 1); -+ const int y0_c = y0 >> ctx_vshift(s, 1); -+ const int nPbW_c = nPbW >> ctx_hshift(s, 1); -+ const int nPbH_c = nPbH >> ctx_vshift(s, 1); -+ -+ rpi_pred_y(s, jb, x0, y0, nPbW, nPbH, current_mv.xy[0], -+ s->sh.luma_weight_l0[current_mv.ref_idx[0]], s->sh.luma_offset_l0[current_mv.ref_idx[0]], -+ ref0->frame); -+ -+ if (ctx_cfmt(s) != 0) { -+ rpi_pred_c(s, jb, 0, x0_c, y0_c, nPbW_c, nPbH_c, current_mv.xy[0], -+ s->sh.chroma_weight_l0[current_mv.ref_idx[0]], s->sh.chroma_offset_l0[current_mv.ref_idx[0]], -+ ref0->frame); -+ return; -+ } -+ } else if (current_mv.pred_flag == PF_L1) { -+ const int x0_c = x0 >> ctx_hshift(s, 1); -+ const int y0_c = y0 >> ctx_vshift(s, 1); -+ const int nPbW_c = nPbW >> ctx_hshift(s, 1); -+ const int nPbH_c = nPbH >> ctx_vshift(s, 1); -+ -+ rpi_pred_y(s, jb, x0, y0, nPbW, nPbH, current_mv.xy[1], -+ s->sh.luma_weight_l1[current_mv.ref_idx[1]], s->sh.luma_offset_l1[current_mv.ref_idx[1]], -+ ref1->frame); -+ -+ if (ctx_cfmt(s) != 0) { -+ rpi_pred_c(s, jb, 1, x0_c, y0_c, nPbW_c, nPbH_c, current_mv.xy[1], -+ s->sh.chroma_weight_l1[current_mv.ref_idx[1]], s->sh.chroma_offset_l1[current_mv.ref_idx[1]], -+ ref1->frame); -+ return; -+ } -+ } else if (current_mv.pred_flag == PF_BI) { -+ const int x0_c = x0 >> ctx_hshift(s, 1); -+ const int y0_c = y0 >> ctx_vshift(s, 1); -+ const int nPbW_c = nPbW >> ctx_hshift(s, 1); -+ const int nPbH_c = nPbH >> ctx_vshift(s, 1); -+ -+ rpi_pred_y_b(s, jb, x0, y0, nPbW, nPbH, ¤t_mv, ref0->frame, ref1->frame); -+ -+ if (ctx_cfmt(s) != 0) { -+ rpi_pred_c_b(s, jb, x0_c, y0_c, nPbW_c, nPbH_c, -+ ¤t_mv, -+ s->sh.chroma_weight_l0[current_mv.ref_idx[0]], -+ s->sh.chroma_offset_l0[current_mv.ref_idx[0]], -+ s->sh.chroma_weight_l1[current_mv.ref_idx[1]], -+ s->sh.chroma_offset_l1[current_mv.ref_idx[1]], -+ ref0->frame, -+ ref1->frame); -+ return; -+ } -+ } -+} -+ -+static void set_ipm(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc, -+ const unsigned int x0, const unsigned int y0, -+ const unsigned int log2_cb_size, -+ const unsigned int ipm) -+{ -+ const unsigned int x_pu = x0 >> LOG2_MIN_PU_SIZE; -+ const unsigned int y_pu = y0 >> LOG2_MIN_PU_SIZE; -+ -+ { -+ const unsigned int ctb_mask = ~(~0U << (s->ps.sps->log2_ctb_size - LOG2_MIN_PU_SIZE)); -+ set_stash2(lc->ipm_left + (y_pu & ctb_mask), lc->ipm_up + (x_pu & ctb_mask), log2_cb_size - LOG2_MIN_PU_SIZE, ipm); -+ } -+ -+ // If IRAP then everything is Intra & we avoid ever looking at these -+ // stashes so don't bother setting them -+ if (!s->is_irap && lc->cu.pred_mode == MODE_INTRA) -+ { -+ if (s->is_intra != NULL) -+ { -+ set_bits(s->is_intra + (y0 >> LOG2_MIN_CU_SIZE) * s->ps.sps->pcm_width, x0 >> LOG2_MIN_CU_SIZE, s->ps.sps->pcm_width, log2_cb_size - LOG2_MIN_CU_SIZE); -+ } -+ -+ { -+ HEVCRpiMvField * p = mvf_stash_ptr(s, lc, x0, y0); -+ const unsigned int size_in_pus = (1 << log2_cb_size) >> LOG2_MIN_PU_SIZE; // min_pu <= log2_cb so >= 1 -+ unsigned int n = size_in_pus; -+ -+ do -+ { -+ memset(p, 0, size_in_pus * sizeof(*p)); -+ p += MVF_STASH_WIDTH_PU; -+ } while (--n != 0); -+ } -+ -+ -+ if (s->ref->col_mvf != NULL && ((x0 | y0) & 0xf) == 0) -+ { -+ // Only record top left stuff -+ // Blocks should always be alinged on size boundries -+ // so cannot have overflow from a small block -+ -+ ColMvField * p = s->ref->col_mvf + (y0 >> 4) * s->col_mvf_stride + (x0 >> 4); -+ const unsigned int size_in_col = log2_cb_size < 4 ? 1 : (1 << (log2_cb_size - 4)); -+ const unsigned int stride = s->col_mvf_stride - size_in_col; -+ unsigned int j = size_in_col; -+ -+ do -+ { -+ unsigned int k = size_in_col; -+ do -+ { -+ p->L[0].poc = COL_POC_INTRA; -+ p->L[0].xy = 0; -+ p->L[1].poc = COL_POC_INTRA; -+ p->L[1].xy = 0; -+ ++p; -+ } while (--k != 0); -+ p += stride; -+ } while (--j != 0); -+ } -+ } -+} -+ -+static inline void intra_prediction_unit_default_value(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc, -+ const unsigned int x0, const unsigned int y0, -+ const unsigned int log2_cb_size) -+{ -+ set_ipm(s, lc, x0, y0, log2_cb_size, INTRA_DC); -+} -+ -+ -+/** -+ * 8.4.1 -+ */ -+static int luma_intra_pred_mode(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc, -+ int x0, int y0, int log2_pu_size, -+ int prev_intra_luma_pred_flag, -+ const unsigned int idx) -+{ -+ const unsigned int ctb_mask = ~(~0U << s->ps.sps->log2_ctb_size); -+ const unsigned int xb_pu = (x0 & ctb_mask) >> LOG2_MIN_PU_SIZE; -+ const unsigned int yb_pu = (y0 & ctb_mask) >> LOG2_MIN_PU_SIZE; -+ -+ // Up does not cross boundries so as we always scan 1 slice-tile-line in an -+ // lc we can just keep 1 CTB lR stashes -+ // Left is reset to DC @ Start of Line/Tile/Slice in fill_job -+ const unsigned int cand_up = yb_pu == 0 ? INTRA_DC : lc->ipm_up[xb_pu]; -+ const unsigned int cand_left = lc->ipm_left[yb_pu]; -+ -+ unsigned int intra_pred_mode; -+ unsigned int a, b, c; -+ -+ if (cand_left == cand_up) { -+ if (cand_left < 2) { -+ a = INTRA_PLANAR; -+ b = INTRA_DC; -+ c = INTRA_ANGULAR_26; -+ } else { -+ a = cand_left; -+ b = 2 + ((cand_left - 2 - 1 + 32) & 31); -+ c = 2 + ((cand_left - 2 + 1) & 31); -+ } -+ } else { -+ a = cand_left; -+ b = cand_up; -+ c = (cand_left != INTRA_PLANAR && cand_up != INTRA_PLANAR) ? -+ INTRA_PLANAR : -+ (cand_left != INTRA_DC && cand_up != INTRA_DC) ? -+ INTRA_DC : -+ INTRA_ANGULAR_26; -+ } -+ -+ if (prev_intra_luma_pred_flag) { -+ intra_pred_mode = idx == 0 ? a : idx == 1 ? b : c; -+ } else { -+ // Sort lowest 1st -+ if (a > b) -+ FFSWAP(int, a, b); -+ if (a > c) -+ FFSWAP(int, a, c); -+ if (b > c) -+ FFSWAP(int, b, c); -+ -+ intra_pred_mode = idx; -+ if (intra_pred_mode >= a) -+ intra_pred_mode++; -+ if (intra_pred_mode >= b) -+ intra_pred_mode++; -+ if (intra_pred_mode >= c) -+ intra_pred_mode++; -+ } -+ -+ /* write the intra prediction units into the mv array */ -+ set_ipm(s, lc, x0, y0, log2_pu_size, intra_pred_mode); -+ return intra_pred_mode; -+} -+ -+static const uint8_t tab_mode_idx[] = { -+ 0, 1, 2, 2, 2, 2, 3, 5, 7, 8, 10, 12, 13, 15, 17, 18, 19, 20, -+ 21, 22, 23, 23, 24, 24, 25, 25, 26, 27, 27, 28, 28, 29, 29, 30, 31}; -+ -+static void intra_prediction_unit(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc, -+ const unsigned int x0, const unsigned int y0, -+ const unsigned int log2_cb_size) -+{ -+ static const uint8_t intra_chroma_table[4] = { 0, 26, 10, 1 }; -+ uint8_t prev_intra_luma_pred_flag[4]; -+ int split = lc->cu.part_mode == PART_NxN; -+ const unsigned int split_size = (1 << (log2_cb_size - 1)); -+ int chroma_mode; -+ const unsigned int n = split ? 4 : 1; -+ unsigned int i; -+ -+ for (i = 0; i != n; i++) -+ prev_intra_luma_pred_flag[i] = ff_hevc_rpi_prev_intra_luma_pred_flag_decode(lc); -+ -+ for (i = 0; i < n; i++) { -+ // depending on mode idx is mpm or luma_pred_mode -+ const unsigned int idx = prev_intra_luma_pred_flag[i] ? -+ ff_hevc_rpi_mpm_idx_decode(lc) : -+ ff_hevc_rpi_rem_intra_luma_pred_mode_decode(lc); -+ -+ lc->pu.intra_pred_mode[i] = -+ luma_intra_pred_mode(s, lc, -+ x0 + ((i & 1) == 0 ? 0 : split_size), -+ y0 + ((i & 2) == 0 ? 0 : split_size), -+ log2_cb_size - split, -+ prev_intra_luma_pred_flag[i], idx); -+ } -+ -+ if (ctx_cfmt(s) == 3) { -+ for (i = 0; i < n; i++) { -+ lc->pu.chroma_mode_c[i] = chroma_mode = ff_hevc_rpi_intra_chroma_pred_mode_decode(lc); -+ if (chroma_mode != 4) { -+ if (lc->pu.intra_pred_mode[i] == intra_chroma_table[chroma_mode]) -+ lc->pu.intra_pred_mode_c[i] = 34; -+ else -+ lc->pu.intra_pred_mode_c[i] = intra_chroma_table[chroma_mode]; -+ } else { -+ lc->pu.intra_pred_mode_c[i] = lc->pu.intra_pred_mode[i]; -+ } -+ } -+ } else if (ctx_cfmt(s) == 2) { -+ int mode_idx; -+ lc->pu.chroma_mode_c[0] = chroma_mode = ff_hevc_rpi_intra_chroma_pred_mode_decode(lc); -+ if (chroma_mode != 4) { -+ if (lc->pu.intra_pred_mode[0] == intra_chroma_table[chroma_mode]) -+ mode_idx = 34; -+ else -+ mode_idx = intra_chroma_table[chroma_mode]; -+ } else { -+ mode_idx = lc->pu.intra_pred_mode[0]; -+ } -+ lc->pu.intra_pred_mode_c[0] = tab_mode_idx[mode_idx]; -+ } else if (ctx_cfmt(s) != 0) { -+ chroma_mode = ff_hevc_rpi_intra_chroma_pred_mode_decode(lc); -+ if (chroma_mode != 4) { -+ if (lc->pu.intra_pred_mode[0] == intra_chroma_table[chroma_mode]) -+ lc->pu.intra_pred_mode_c[0] = 34; -+ else -+ lc->pu.intra_pred_mode_c[0] = intra_chroma_table[chroma_mode]; -+ } else { -+ lc->pu.intra_pred_mode_c[0] = lc->pu.intra_pred_mode[0]; -+ } -+ } -+} -+ -+static int hls_coding_unit(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc, -+ const unsigned int x0, const unsigned int y0, const unsigned int log2_cb_size) -+{ -+ const unsigned int cb_size = 1 << log2_cb_size; -+ const unsigned int log2_min_cb_size = s->ps.sps->log2_min_cb_size; -+ const unsigned int min_cb_width = s->ps.sps->min_cb_width; -+ const unsigned int x_cb = x0 >> log2_min_cb_size; -+ const unsigned int y_cb = y0 >> log2_min_cb_size; -+ const unsigned int idx = log2_cb_size - 2; -+ const unsigned int qp_block_mask = (1 << s->ps.pps->log2_min_cu_qp_delta_size) - 1; -+ int skip_flag = 0; -+ -+ lc->cu.x = x0; -+ lc->cu.y = y0; -+ lc->cu.x_split = x0; -+ lc->cu.y_split = y0; -+ -+ lc->cu.pred_mode = MODE_INTRA; -+ lc->cu.part_mode = PART_2Nx2N; -+ lc->cu.intra_split_flag = 0; -+ lc->cu.cu_transquant_bypass_flag = 0; -+ lc->pu.intra_pred_mode[0] = 1; -+ lc->pu.intra_pred_mode[1] = 1; -+ lc->pu.intra_pred_mode[2] = 1; -+ lc->pu.intra_pred_mode[3] = 1; -+ -+ if (s->ps.pps->transquant_bypass_enable_flag) { -+ lc->cu.cu_transquant_bypass_flag = ff_hevc_rpi_cu_transquant_bypass_flag_decode(lc); -+ if (lc->cu.cu_transquant_bypass_flag) -+ set_deblocking_bypass(s, x0, y0, log2_cb_size); -+ } -+ -+ if (s->sh.slice_type != HEVC_SLICE_I) { -+ lc->cu.pred_mode = MODE_INTER; -+ skip_flag = ff_hevc_rpi_skip_flag_decode(s, lc, x0, y0, x_cb, y_cb); -+ } -+ -+ if (skip_flag) { -+ lc->cu.pred_mode = MODE_SKIP; -+ -+ hls_prediction_unit(s, lc, x0, y0, cb_size, cb_size, log2_cb_size, 0, idx); -+ intra_prediction_unit_default_value(s, lc, x0, y0, log2_cb_size); -+ -+ if (!s->sh.disable_deblocking_filter_flag) -+ ff_hevc_rpi_deblocking_boundary_strengths(s, lc, x0, y0, log2_cb_size, 0); -+ } else { -+ int pcm_flag = 0; -+ -+ if (s->sh.slice_type != HEVC_SLICE_I) -+ lc->cu.pred_mode = ff_hevc_rpi_pred_mode_decode(lc); -+ if (lc->cu.pred_mode != MODE_INTRA || -+ log2_cb_size == s->ps.sps->log2_min_cb_size) { -+ lc->cu.part_mode = ff_hevc_rpi_part_mode_decode(s, lc, log2_cb_size); -+ lc->cu.intra_split_flag = lc->cu.part_mode == PART_NxN && -+ lc->cu.pred_mode == MODE_INTRA; -+ } -+ -+ if (lc->cu.pred_mode == MODE_INTRA) { -+ if (lc->cu.part_mode == PART_2Nx2N && -+ log2_cb_size <= s->ps.sps->pcm.log2_max_pcm_cb_size && // 0 if not enabled -+ log2_cb_size >= s->ps.sps->pcm.log2_min_pcm_cb_size && -+ ff_hevc_rpi_pcm_flag_decode(lc) != 0) -+ { -+ int ret; -+ pcm_flag = 1; -+ intra_prediction_unit_default_value(s, lc, x0, y0, log2_cb_size); -+ if ((ret = hls_pcm_sample(s, lc, x0, y0, log2_cb_size)) < 0) -+ return ret; -+ -+ if (s->ps.sps->pcm.loop_filter_disable_flag) -+ set_deblocking_bypass(s, x0, y0, log2_cb_size); -+ } else { -+ intra_prediction_unit(s, lc, x0, y0, log2_cb_size); -+ } -+ } else { -+ intra_prediction_unit_default_value(s, lc, x0, y0, log2_cb_size); -+ switch (lc->cu.part_mode) { -+ case PART_2Nx2N: -+ hls_prediction_unit(s, lc, x0, y0, cb_size, cb_size, log2_cb_size, 0, idx); -+ break; -+ case PART_2NxN: -+ hls_prediction_unit(s, lc, x0, y0, cb_size, cb_size / 2, log2_cb_size, 0, idx); -+ lc->cu.y_split = y0 + cb_size / 2; -+ hls_prediction_unit(s, lc, x0, y0 + cb_size / 2, cb_size, cb_size / 2, log2_cb_size, 1, idx); -+ break; -+ case PART_Nx2N: -+ hls_prediction_unit(s, lc, x0, y0, cb_size / 2, cb_size, log2_cb_size, 0, idx - 1); -+ lc->cu.x_split = x0 + cb_size / 2; -+ hls_prediction_unit(s, lc, x0 + cb_size / 2, y0, cb_size / 2, cb_size, log2_cb_size, 1, idx - 1); -+ break; -+ case PART_2NxnU: -+ hls_prediction_unit(s, lc, x0, y0, cb_size, cb_size / 4, log2_cb_size, 0, idx); -+ lc->cu.y_split = y0 + cb_size / 4; -+ hls_prediction_unit(s, lc, x0, y0 + cb_size / 4, cb_size, cb_size / 4 * 3, log2_cb_size, 1, idx); -+ break; -+ case PART_2NxnD: -+ hls_prediction_unit(s, lc, x0, y0, cb_size, cb_size / 4 * 3, log2_cb_size, 0, idx); -+ lc->cu.y_split = y0 + cb_size / 4 * 3; -+ hls_prediction_unit(s, lc, x0, y0 + cb_size / 4 * 3, cb_size, cb_size / 4, log2_cb_size, 1, idx); -+ break; -+ case PART_nLx2N: -+ hls_prediction_unit(s, lc, x0, y0, cb_size / 4, cb_size, log2_cb_size, 0, idx - 2); -+ lc->cu.x_split = x0 + cb_size / 4; -+ hls_prediction_unit(s, lc, x0 + cb_size / 4, y0, cb_size * 3 / 4, cb_size, log2_cb_size, 1, idx - 2); -+ break; -+ case PART_nRx2N: -+ hls_prediction_unit(s, lc, x0, y0, cb_size / 4 * 3, cb_size, log2_cb_size, 0, idx - 2); -+ lc->cu.x_split = x0 + cb_size / 4 * 3; -+ hls_prediction_unit(s, lc, x0 + cb_size / 4 * 3, y0, cb_size / 4, cb_size, log2_cb_size, 1, idx - 2); -+ break; -+ case PART_NxN: -+ hls_prediction_unit(s, lc, x0, y0, cb_size / 2, cb_size / 2, log2_cb_size, 0, idx - 1); -+ lc->cu.x_split = x0 + cb_size / 2; -+ hls_prediction_unit(s, lc, x0 + cb_size / 2, y0, cb_size / 2, cb_size / 2, log2_cb_size, 1, idx - 1); -+ lc->cu.y_split = y0 + cb_size / 2; -+ hls_prediction_unit(s, lc, x0, y0 + cb_size / 2, cb_size / 2, cb_size / 2, log2_cb_size, 2, idx - 1); -+ hls_prediction_unit(s, lc, x0 + cb_size / 2, y0 + cb_size / 2, cb_size / 2, cb_size / 2, log2_cb_size, 3, idx - 1); -+ break; -+ } -+ } -+ -+ if (!pcm_flag) { -+ int rqt_root_cbf = 1; -+ -+ if (lc->cu.pred_mode != MODE_INTRA && -+ !(lc->cu.part_mode == PART_2Nx2N && lc->pu.merge_flag)) { -+ rqt_root_cbf = ff_hevc_rpi_no_residual_syntax_flag_decode(lc); -+ } -+ if (rqt_root_cbf) { -+ const unsigned int cbf_c = ctx_cfmt(s) == 0 ? 0 : (CBF_CR0 | CBF_CB0); -+ int ret; -+ -+ lc->cu.max_trafo_depth = lc->cu.pred_mode == MODE_INTRA ? -+ s->ps.sps->max_transform_hierarchy_depth_intra + lc->cu.intra_split_flag : -+ s->ps.sps->max_transform_hierarchy_depth_inter; -+ // transform_tree does deblock_boundary_strengths -+ ret = hls_transform_tree(s, lc, x0, y0, -+ log2_cb_size, 0, 0, cbf_c); -+ if (ret < 0) -+ return ret; -+ } else { -+ if (!s->sh.disable_deblocking_filter_flag) -+ ff_hevc_rpi_deblocking_boundary_strengths(s, lc, x0, y0, log2_cb_size, 0); -+ } -+ } -+ } -+ -+ // If the delta is still wanted then we haven't read the delta & therefore need to set qp here -+ if (lc->tu.is_cu_qp_delta_wanted) -+ ff_hevc_rpi_set_qPy(s, lc, x0, y0); -+ -+ if(((x0 + (1<qPy_pred = lc->qp_y; -+ } -+ -+ set_bytes(s->qp_y_tab + y_cb * min_cb_width + x_cb, min_cb_width, log2_cb_size - log2_min_cb_size, lc->qp_y & 0xff); -+ -+ set_stash2(s->cabac_stash_up + (x0 >> 3), s->cabac_stash_left + (y0 >> 3), log2_cb_size - 3, (lc->ct_depth << 1) | skip_flag); -+ -+ return 0; -+} -+ -+// Returns: -+// < 0 Error -+// 0 More data wanted -+// 1 EoSlice / EoPicture -+static int hls_coding_quadtree(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc, const int x0, const int y0, -+ const int log2_cb_size, const unsigned int cb_depth) -+{ -+ const int cb_size = 1 << log2_cb_size; -+ int ret; -+ int split_cu; -+ -+ lc->ct_depth = cb_depth; -+ split_cu = (log2_cb_size > s->ps.sps->log2_min_cb_size); -+ if (x0 + cb_size <= s->ps.sps->width && -+ y0 + cb_size <= s->ps.sps->height && -+ split_cu) -+ { -+ split_cu = ff_hevc_rpi_split_coding_unit_flag_decode(s, lc, cb_depth, x0, y0); -+ } -+ -+ // Qp delta (and offset) need to remain wanted if cb_size < min until -+ // a coded block is found so we still initial state at depth 0 (outside -+ // this fn) and only reset here -+ if (s->ps.pps->cu_qp_delta_enabled_flag && -+ log2_cb_size >= s->ps.pps->log2_min_cu_qp_delta_size) -+ { -+ lc->tu.is_cu_qp_delta_wanted = 1; -+ lc->tu.cu_qp_delta = 0; -+ } -+ if (s->sh.cu_chroma_qp_offset_enabled_flag && -+ log2_cb_size >= s->ps.pps->log2_min_cu_qp_delta_size) -+ { -+ lc->tu.cu_chroma_qp_offset_wanted = 1; -+ } -+ -+ lc->tu.qp_divmod6[0] = s->ps.pps->qp_bd_x[0]; -+ lc->tu.qp_divmod6[1] = s->ps.pps->qp_bd_x[1] + s->sh.slice_cb_qp_offset; -+ lc->tu.qp_divmod6[2] = s->ps.pps->qp_bd_x[2] + s->sh.slice_cr_qp_offset; -+ -+ if (split_cu) { -+ int qp_block_mask = (1 << s->ps.pps->log2_min_cu_qp_delta_size) - 1; -+ const int cb_size_split = cb_size >> 1; -+ const int x1 = x0 + cb_size_split; -+ const int y1 = y0 + cb_size_split; -+ -+ int more_data = 0; -+ -+ more_data = hls_coding_quadtree(s, lc, x0, y0, log2_cb_size - 1, cb_depth + 1); -+ if (more_data < 0) -+ return more_data; -+ -+ if (more_data && x1 < s->ps.sps->width) { -+ more_data = hls_coding_quadtree(s, lc, x1, y0, log2_cb_size - 1, cb_depth + 1); -+ if (more_data < 0) -+ return more_data; -+ } -+ if (more_data && y1 < s->ps.sps->height) { -+ more_data = hls_coding_quadtree(s, lc, x0, y1, log2_cb_size - 1, cb_depth + 1); -+ if (more_data < 0) -+ return more_data; -+ } -+ if (more_data && x1 < s->ps.sps->width && -+ y1 < s->ps.sps->height) { -+ more_data = hls_coding_quadtree(s, lc, x1, y1, log2_cb_size - 1, cb_depth + 1); -+ if (more_data < 0) -+ return more_data; -+ } -+ -+ if(((x0 + (1<qPy_pred = lc->qp_y; -+ -+ if (more_data) -+ return ((x1 + cb_size_split) < s->ps.sps->width || -+ (y1 + cb_size_split) < s->ps.sps->height); -+ else -+ return 0; -+ } else { -+ ret = hls_coding_unit(s, lc, x0, y0, log2_cb_size); -+ if (ret < 0) -+ return ret; -+ if ((!((x0 + cb_size) % -+ (1 << (s->ps.sps->log2_ctb_size))) || -+ (x0 + cb_size >= s->ps.sps->width)) && -+ (!((y0 + cb_size) % -+ (1 << (s->ps.sps->log2_ctb_size))) || -+ (y0 + cb_size >= s->ps.sps->height))) { -+ int end_of_slice_flag = ff_hevc_rpi_get_cabac_terminate(&lc->cc); -+ return !end_of_slice_flag; -+ } else { -+ return 1; -+ } -+ } -+ -+ return 0; // NEVER -+} -+ -+static void hls_decode_neighbour(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc, -+ const int x_ctb, const int y_ctb, const int ctb_addr_ts) -+{ -+ const unsigned int ctb_size = 1 << s->ps.sps->log2_ctb_size; -+ const unsigned int ctb_addr_rs = s->ps.pps->ctb_addr_ts_to_rs[ctb_addr_ts]; -+ const unsigned int ctb_addr_rs_in_slice = ctb_addr_rs - s->sh.slice_addr; // slice_addr = RS addr of start of slice -+ const unsigned int ctb_flags = s->ps.pps->ctb_ts_flags[ctb_addr_ts]; -+ const unsigned int line_w = s->ps.sps->ctb_width; -+ -+ s->tab_slice_address[ctb_addr_rs] = s->sh.slice_addr; -+ -+ lc->end_of_ctb_x = FFMIN(x_ctb + ctb_size, s->ps.sps->width); -+ lc->end_of_ctb_y = FFMIN(y_ctb + ctb_size, s->ps.sps->height); -+ -+ lc->boundary_flags = 0; -+ -+ if ((ctb_flags & CTB_TS_FLAGS_SOTL) != 0) -+ lc->boundary_flags |= BOUNDARY_LEFT_TILE; -+ if (x_ctb > 0 && s->tab_slice_address[ctb_addr_rs] != s->tab_slice_address[ctb_addr_rs - 1]) -+ lc->boundary_flags |= BOUNDARY_LEFT_SLICE; -+ if ((ctb_flags & CTB_TS_FLAGS_TOT) != 0) -+ lc->boundary_flags |= BOUNDARY_UPPER_TILE; -+ if (y_ctb > 0 && s->tab_slice_address[ctb_addr_rs] != s->tab_slice_address[ctb_addr_rs - line_w]) -+ lc->boundary_flags |= BOUNDARY_UPPER_SLICE; -+ -+ // Use line width rather than tile width for addr_in_slice test as -+ // addr_in_slice is in raster units -+ -+ lc->ctb_avail = -+ ((lc->boundary_flags & (BOUNDARY_LEFT_SLICE | BOUNDARY_LEFT_TILE)) == 0 ? AVAIL_L : 0) | -+ ((lc->boundary_flags & (BOUNDARY_UPPER_SLICE | BOUNDARY_UPPER_TILE)) == 0 ? AVAIL_U : 0) | -+ ((lc->boundary_flags & (BOUNDARY_LEFT_TILE | BOUNDARY_UPPER_TILE)) == 0 && -+ (ctb_addr_rs_in_slice > line_w) ? AVAIL_UL : 0) | -+ ((ctb_flags & (CTB_TS_FLAGS_EOTL | CTB_TS_FLAGS_TOT)) == 0 && -+ (ctb_addr_rs_in_slice + 1 >= line_w) ? AVAIL_UR : 0); -+ // Down-left never avail at CTB level -+} -+ -+ -+static void rpi_execute_dblk_cmds(const HEVCRpiContext * const s, HEVCRpiJob * const jb) -+{ -+ int y = ff_hevc_rpi_hls_filter_blk(s, jb->bounds, -+ (s->ps.pps->ctb_ts_flags[jb->ctu_ts_last] & CTB_TS_FLAGS_EOT) != 0); -+ -+ // Signal -+ if (y > 0) { -+ // Cast away const as progress is held in s, but this really shouldn't confuse anything -+ ff_hevc_rpi_progress_signal_recon((HEVCRpiContext *)s, y - 1); -+ } -+ -+ // Job done now -+ // ? Move outside this fn -+ job_free(s->jbc, jb); -+} -+ -+// I-pred, transform_and_add for all blocks types done here -+// All ARM -+static void rpi_execute_pred_cmds(const HEVCRpiContext * const s, HEVCRpiJob * const jb) -+{ -+ unsigned int i; -+ HEVCRpiIntraPredEnv * const iap = &jb->intra; -+ const HEVCPredCmd *cmd = iap->cmds; -+ -+#if !RPI_WORKER_WAIT_PASS_0 -+ rpi_sem_wait(&jb->sem); -+ rpi_cache_flush_execute(jb->rfe); // Invalidate data set up in pass1 -+#endif -+ -+ for (i = iap->n; i > 0; i--, cmd++) -+ { -+ switch (cmd->type) -+ { -+ case RPI_PRED_INTRA: -+ s->hpc.intra_pred(s, cmd->i_pred.mode, cmd->i_pred.x, cmd->i_pred.y, cmd->avail, cmd->size); -+ break; -+ case RPI_PRED_INTRA_C: -+ s->hpc.intra_pred_c(s, cmd->i_pred.mode, cmd->i_pred.x, cmd->i_pred.y, cmd->avail, cmd->size); -+ break; -+ case RPI_PRED_ADD_RESIDUAL: -+ s->hevcdsp.add_residual[cmd->size - 2](cmd->ta.dst, (int16_t *)cmd->ta.buf, cmd->ta.stride); -+ break; -+ case RPI_PRED_ADD_DC: -+ s->hevcdsp.add_residual_dc[cmd->size - 2](cmd->dc.dst, cmd->dc.stride, cmd->dc.dc); -+ break; -+ case RPI_PRED_ADD_RESIDUAL_U: -+ s->hevcdsp.add_residual_u[cmd->size - 2](cmd->ta.dst, (int16_t *)cmd->ta.buf, cmd->ta.stride, cmd->ta.dc); -+ break; -+ case RPI_PRED_ADD_RESIDUAL_V: -+ s->hevcdsp.add_residual_v[cmd->size - 2](cmd->ta.dst, (int16_t *)cmd->ta.buf, cmd->ta.stride, cmd->ta.dc); -+ break; -+ case RPI_PRED_ADD_RESIDUAL_C: -+ s->hevcdsp.add_residual_c[cmd->size - 2](cmd->ta.dst, (int16_t *)cmd->ta.buf, cmd->ta.stride); -+ break; -+ case RPI_PRED_ADD_DC_U: -+ case RPI_PRED_ADD_DC_V: -+ s->hevcdsp.add_residual_dc_c[cmd->size - 2](cmd->dc.dst, cmd->dc.stride, cmd->dc.dc); -+ break; -+ -+ case RPI_PRED_I_PCM: -+ pcm_extract(s, cmd->i_pcm.src, cmd->i_pcm.src_len, cmd->i_pcm.x, cmd->i_pcm.y, 1 << cmd->size); -+ break; -+ -+ default: -+ av_log(s->avctx, AV_LOG_PANIC, "Bad command %d in worker pred Q\n", cmd->type); -+ abort(); -+ } -+ } -+ -+ // Mark done -+ iap->n = 0; -+} -+ -+ -+// Set initial uniform job values & zero ctu_count -+static void rpi_begin(const HEVCRpiContext * const s, HEVCRpiJob * const jb, const unsigned int ctu_ts_first) -+{ -+ unsigned int i; -+ HEVCRpiInterPredEnv *const cipe = &jb->chroma_ip; -+ HEVCRpiInterPredEnv *const yipe = &jb->luma_ip; -+ const HEVCRpiSPS * const sps = s->ps.sps; -+ -+ const uint16_t pic_width_y = sps->width; -+ const uint16_t pic_height_y = sps->height; -+ -+ const uint16_t pic_width_c = sps->width >> ctx_hshift(s, 1); -+ const uint16_t pic_height_c = sps->height >> ctx_vshift(s, 1); -+ -+ // We expect the pointer to change if we use another sps -+ if (sps != jb->sps) -+ { -+ worker_pic_free_one(jb); -+ -+ set_ipe_from_ici(cipe, &ipe_init_infos[s->ps.sps->bit_depth - 8].chroma); -+ set_ipe_from_ici(yipe, &ipe_init_infos[s->ps.sps->bit_depth - 8].luma); -+ -+ { -+ const int coefs_per_luma = HEVC_MAX_CTB_SIZE * HEVC_RPI_MAX_WIDTH; -+ const int coefs_per_chroma = (coefs_per_luma * 2) >> (ctx_vshift(s, 1) + ctx_hshift(s, 1)); -+ worker_pic_alloc_one(jb, coefs_per_luma + coefs_per_chroma); -+ } -+ -+ jb->sps = sps; -+ } -+ -+ jb->waited = 0; -+ jb->ctu_ts_first = ctu_ts_first; -+ jb->ctu_ts_last = -1; -+ -+ rpi_inter_pred_reset(cipe); -+ for (i = 0; i < cipe->n; i++) { -+ HEVCRpiInterPredQ * const cp = cipe->q + i; -+ qpu_mc_pred_c_s_t * const u = &cp->qpu_mc_base->c.s; -+ -+ u->next_src1.x = 0; -+ u->next_src1.y = 0; -+ u->next_src1.base = 0; -+ u->pic_cw = pic_width_c; -+ u->pic_ch = pic_height_c; -+ u->stride2 = av_rpi_sand_frame_stride2(s->frame); -+ u->stride1 = av_rpi_sand_frame_stride1(s->frame); -+ cp->last_l0 = &u->next_src1; -+ -+ u->next_fn = 0; -+ u->next_src2.x = 0; -+ u->next_src2.y = 0; -+ u->next_src2.base = 0; -+ cp->last_l1 = &u->next_src2; -+ -+ cp->qpu_mc_curr = (qpu_mc_pred_cmd_t *)(u + 1); -+ } -+ -+ rpi_inter_pred_reset(yipe); -+ for (i = 0; i < yipe->n; i++) { -+ HEVCRpiInterPredQ * const yp = yipe->q + i; -+ qpu_mc_pred_y_s_t * const y = &yp->qpu_mc_base->y.s; -+ -+ y->next_src1.x = 0; -+ y->next_src1.y = 0; -+ y->next_src1.base = 0; -+ y->next_src2.x = 0; -+ y->next_src2.y = 0; -+ y->next_src2.base = 0; -+ y->pic_h = pic_height_y; -+ y->pic_w = pic_width_y; -+ y->stride2 = av_rpi_sand_frame_stride2(s->frame); -+ y->stride1 = av_rpi_sand_frame_stride1(s->frame); -+ y->next_fn = 0; -+ yp->last_l0 = &y->next_src1; -+ yp->last_l1 = &y->next_src2; -+ -+ yp->qpu_mc_curr = (qpu_mc_pred_cmd_t *)(y + 1); -+ } -+ -+ jb->last_y8_p = NULL; -+ jb->last_y8_l1 = NULL; -+ -+ for (i = 0; i != FF_ARRAY_ELEMS(jb->progress_req); ++i) { -+ jb->progress_req[i] = -1; -+ } -+ -+ worker_pic_reset(&jb->coeffs); -+} -+ -+ -+#if !RPI_QPU_EMU_Y || !RPI_QPU_EMU_C -+static unsigned int mc_terminate_add_qpu(const HEVCRpiContext * const s, -+ const vpu_qpu_job_h vqj, -+ rpi_cache_flush_env_t * const rfe, -+ HEVCRpiInterPredEnv * const ipe) -+{ -+ unsigned int i; -+ uint32_t mail[QPU_N_MAX][QPU_MAIL_EL_VALS]; -+ unsigned int max_block = 0; -+ -+ if (!ipe->used) { -+ return 0; -+ } -+ -+ if (ipe->curr != 0) { -+ rpi_inter_pred_sync(ipe); -+ } -+ -+ // Add final commands to Q -+ for(i = 0; i != ipe->n; ++i) { -+ HEVCRpiInterPredQ * const yp = ipe->q + i; -+ qpu_mc_src_t *const p0 = yp->last_l0; -+ qpu_mc_src_t *const p1 = yp->last_l1; -+ const unsigned int block_size = (char *)yp->qpu_mc_curr - (char *)yp->qpu_mc_base; -+ -+ if (block_size > max_block) -+ max_block = block_size; -+ -+ qpu_mc_link_set(yp->qpu_mc_curr, yp->code_exit); -+ -+ // Need to set the srcs for L0 & L1 to something that can be (pointlessly) prefetched -+ p0->x = MC_DUMMY_X; -+ p0->y = MC_DUMMY_Y; -+ p0->base = s->qpu_dummy_frame_qpu; -+ p1->x = MC_DUMMY_X; -+ p1->y = MC_DUMMY_Y; -+ p1->base = s->qpu_dummy_frame_qpu; -+ -+ yp->last_l0 = NULL; -+ yp->last_l1 = NULL; -+ -+ // Add to mailbox list -+ mail[i][0] = ipe->gptr.vc + ((uint8_t *)yp->qpu_mc_base - ipe->gptr.arm); -+ mail[i][1] = yp->code_setup; -+ } -+ -+ // We don't need invalidate here as the uniforms aren't changed by the QPU -+ // and leaving them in ARM cache avoids (pointless) pre-reads when writing -+ // new values which seems to give us a small performance advantage -+ // -+ // In most cases we will not have a completely packed set of uniforms and as -+ // we have a 2d invalidate we writeback all uniform Qs to the depth of the -+ // fullest -+ rpi_cache_flush_add_gm_blocks(rfe, &ipe->gptr, RPI_CACHE_FLUSH_MODE_WRITEBACK, -+ (uint8_t *)ipe->q[0].qpu_mc_base - ipe->gptr.arm, max_block, -+ ipe->n, ipe->max_fill + ipe->min_gap); -+ vpu_qpu_job_add_qpu(vqj, ipe->n, (uint32_t *)mail); -+ -+ return 1; -+} -+#endif -+ -+#if RPI_QPU_EMU_Y || RPI_QPU_EMU_C -+static unsigned int mc_terminate_add_emu(const HEVCRpiContext * const s, -+ const vpu_qpu_job_h vqj, -+ rpi_cache_flush_env_t * const rfe, -+ HEVCRpiInterPredEnv * const ipe) -+{ -+ unsigned int i; -+ if (!ipe->used) { -+ return 0; -+ } -+ -+ if (ipe->curr != 0) { -+ rpi_inter_pred_sync(ipe); -+ } -+ -+ // Add final commands to Q -+ for(i = 0; i != ipe->n; ++i) { -+ HEVCRpiInterPredQ * const yp = ipe->q + i; -+ qpu_mc_src_t *const p0 = yp->last_l0; -+ qpu_mc_src_t *const p1 = yp->last_l1; -+ -+ yp->qpu_mc_curr->data[-1] = yp->code_exit; -+ -+ // Need to set the srcs for L0 & L1 to something that can be (pointlessly) prefetched -+ p0->x = MC_DUMMY_X; -+ p0->y = MC_DUMMY_Y; -+ p0->base = s->qpu_dummy_frame_emu; -+ p1->x = MC_DUMMY_X; -+ p1->y = MC_DUMMY_Y; -+ p1->base = s->qpu_dummy_frame_emu; -+ -+ yp->last_l0 = NULL; -+ yp->last_l1 = NULL; -+ } -+ -+ return 1; -+} -+#endif -+ -+ -+#if RPI_QPU_EMU_Y -+#define mc_terminate_add_y mc_terminate_add_emu -+#else -+#define mc_terminate_add_y mc_terminate_add_qpu -+#endif -+#if RPI_QPU_EMU_C -+#define mc_terminate_add_c mc_terminate_add_emu -+#else -+#define mc_terminate_add_c mc_terminate_add_qpu -+#endif -+ -+ -+static void flush_frame(HEVCRpiContext *s,AVFrame *frame) -+{ -+ rpi_cache_buf_t cbuf; -+ rpi_cache_flush_env_t * rfe = rpi_cache_flush_init(&cbuf); -+ rpi_cache_flush_add_frame(rfe, frame, RPI_CACHE_FLUSH_MODE_WB_INVALIDATE); -+ rpi_cache_flush_finish(rfe); -+} -+ -+static void job_gen_bounds(const HEVCRpiContext * const s, HEVCRpiJob * const jb) -+{ -+ const unsigned int rs0 = s->ps.pps->ctb_addr_ts_to_rs[jb->ctu_ts_first]; -+ const unsigned int rs1 = s->ps.pps->ctb_addr_ts_to_rs[jb->ctu_ts_last]; -+ const unsigned int ctb_width = s->ps.sps->ctb_width; -+ RpiBlk *const bounds = &jb->bounds; -+ av_assert1(jb->ctu_ts_first <= jb->ctu_ts_last); -+ bounds->x = (rs0 % ctb_width) << s->ps.sps->log2_ctb_size; -+ bounds->y = (rs0 / ctb_width) << s->ps.sps->log2_ctb_size; -+ bounds->w = ((rs1 - rs0) % ctb_width + 1) << s->ps.sps->log2_ctb_size; -+ bounds->h = ((rs1 - rs0) / ctb_width + 1) << s->ps.sps->log2_ctb_size; -+ -+ bounds->w = FFMIN(bounds->w, s->ps.sps->width - bounds->x); -+ bounds->h = FFMIN(bounds->h, s->ps.sps->height - bounds->y); -+} -+ -+#if RPI_PASSES == 2 -+static void worker_core2(HEVCRpiContext * const s, HEVCRpiJob * const jb) -+{ -+ // Perform intra prediction and residual reconstruction -+ rpi_execute_pred_cmds(s, jb); -+ -+ // Perform deblocking for CTBs in this row -+ rpi_execute_dblk_cmds(s, jb); -+} -+#endif -+ -+// Core execution tasks -+static void worker_core(const HEVCRpiContext * const s, HEVCRpiJob * const jb) -+{ -+ int pred_y, pred_c; -+ vpu_qpu_job_env_t qvbuf; -+ const vpu_qpu_job_h vqj = vpu_qpu_job_init(&qvbuf); -+#if RPI_WORKER_WAIT_PASS_0 -+ int do_wait; -+#endif -+ -+ { -+ const HEVCRpiCoeffsEnv * const cf = &jb->coeffs; -+ if (cf->s[3].n + cf->s[2].n != 0) -+ { -+ const unsigned int csize = sizeof(cf->s[3].buf[0]); -+ const unsigned int offset32 = ((cf->s[3].buf - cf->s[2].buf) - cf->s[3].n) * csize; -+ unsigned int n16 = (cf->s[2].n >> 8); -+ unsigned int n32 = (cf->s[3].n >> 10); -+#if RPI_COMPRESS_COEFFS -+ if (cf->s[2].packed) { -+ n16 = n16 | (n16<<16); -+ } else { -+ const unsigned int npack16 = (cf->s[2].packed_n>>8); -+ n16 = n16 | (npack16<<16); -+ } -+ if (cf->s[3].packed) { -+ n32 = n32 | (n32<<16); -+ } else { -+ const unsigned int npack32 = (cf->s[3].packed_n>>10); -+ n32 = n32 | (npack32<<16); -+ } -+#endif -+ vpu_qpu_job_add_vpu(vqj, -+ vpu_get_fn(s->ps.sps->bit_depth), -+ vpu_get_constants(), -+ cf->gptr.vc, -+ n16, -+ cf->gptr.vc + offset32, -+ n32, -+ 0); -+ -+ rpi_cache_flush_add_gm_range(jb->rfe, &cf->gptr, RPI_CACHE_FLUSH_MODE_WB_INVALIDATE, 0, cf->s[2].n * csize); -+ rpi_cache_flush_add_gm_range(jb->rfe, &cf->gptr, RPI_CACHE_FLUSH_MODE_WB_INVALIDATE, offset32, cf->s[3].n * csize); -+ } -+ } -+ -+ pred_c = mc_terminate_add_c(s, vqj, jb->rfe, &jb->chroma_ip); -+ -+// We could take a sync here and try to locally overlap QPU processing with ARM -+// but testing showed a slightly negative benefit with noticable extra complexity -+ -+ pred_y = mc_terminate_add_y(s, vqj, jb->rfe, &jb->luma_ip); -+ -+ // Returns 0 if nothing to do, 1 if sync added -+#if RPI_WORKER_WAIT_PASS_0 -+ do_wait = vpu_qpu_job_add_sync_sem(vqj, &jb->sem); -+#else -+ if (vpu_qpu_job_add_sync_sem(vqj, &jb->sem) == 0) -+ sem_post(&jb->sem); -+#endif -+ -+ rpi_cache_flush_execute(jb->rfe); -+ -+ // Await progress as required -+ // jb->waited will only be clear if we have already tested the progress values -+ // (in worker_submit_job) and found we don't have to wait -+ if (jb->waited) -+ { -+ unsigned int i; -+ for (i = 0; i != FF_ARRAY_ELEMS(jb->progress_req); ++i) { -+ if (jb->progress_req[i] >= 0) { -+ ff_hevc_rpi_progress_wait_recon(s, jb, s->DPB + i, jb->progress_req[i]); -+ } -+ } -+ } -+ -+ vpu_qpu_job_finish(vqj); -+ -+ // We always work on a rectangular block -+ if (pred_y || pred_c) -+ { -+ rpi_cache_flush_add_frame_block(jb->rfe, s->frame, RPI_CACHE_FLUSH_MODE_INVALIDATE, -+ jb->bounds.x, jb->bounds.y, jb->bounds.w, jb->bounds.h, -+ ctx_vshift(s, 1), pred_y, pred_c); -+ } -+ -+ // If we have emulated VPU ops - do it here -+#if RPI_QPU_EMU_Y || RPI_QPU_EMU_C -+ if (av_rpi_is_sand8_frame(s->frame)) -+ { -+#if RPI_QPU_EMU_Y && RPI_QPU_EMU_C -+ ff_hevc_rpi_shader_c8(s, &jb->luma_ip, &jb->chroma_ip); -+#elif RPI_QPU_EMU_Y -+ ff_hevc_rpi_shader_c8(s, &jb->luma_ip, NULL); -+#else -+ ff_hevc_rpi_shader_c8(s, NULL, &jb->chroma_ip); -+#endif -+ } -+ else -+ { -+#if RPI_QPU_EMU_Y && RPI_QPU_EMU_C -+ ff_hevc_rpi_shader_c16(s, &jb->luma_ip, &jb->chroma_ip); -+#elif RPI_QPU_EMU_Y -+ ff_hevc_rpi_shader_c16(s, &jb->luma_ip, NULL); -+#else -+ ff_hevc_rpi_shader_c16(s, NULL, &jb->chroma_ip); -+#endif -+ } -+#endif -+ -+#if RPI_WORKER_WAIT_PASS_0 -+ if (do_wait) -+ rpi_sem_wait(&jb->sem); -+ rpi_cache_flush_execute(jb->rfe); -+#endif -+} -+ -+ -+static void rpi_free_inter_pred(HEVCRpiInterPredEnv * const ipe) -+{ -+ av_freep(&ipe->q); -+ gpu_free(&ipe->gptr); -+} -+ -+static HEVCRpiJob * job_new(void) -+{ -+ HEVCRpiJob * const jb = av_mallocz(sizeof(HEVCRpiJob)); -+ -+ if (jb == NULL) -+ return NULL; -+ -+ sem_init(&jb->sem, 0, 0); -+ jb->rfe = rpi_cache_flush_init(&jb->flush_buf); -+ ff_hevc_rpi_progress_init_wait(&jb->progress_wait); -+ -+ jb->intra.n = 0; -+ if ((jb->intra.cmds = av_mallocz(sizeof(HEVCPredCmd) * RPI_MAX_PRED_CMDS)) == NULL) -+ goto fail1; -+ -+ // * Sizeof the union structure might be overkill but at the moment it -+ // is correct (it certainly isn't going to be too small) -+ // Set max fill to slack/2 from the end of the Q -+ // If we exceed this in any Q then we will schedule by size (which should -+ // mean that we never use that Q again part from syncs) -+ // * Given how agressive the overflow resonse is we could maybe put the -+ // threshold even nearer the end, but I don't expect us to ever hit -+ // it on any real stream anyway. -+ -+ if (rpi_inter_pred_alloc(&jb->chroma_ip, -+ QPU_N_MAX, QPU_N_GRP, -+ QPU_C_COMMANDS * sizeof(qpu_mc_pred_c_t) + QPU_C_SYNCS * sizeof(uint32_t), -+ QPU_C_CMD_SLACK_PER_Q * sizeof(qpu_mc_pred_c_t) / 2) != 0) -+ goto fail2; -+ if (rpi_inter_pred_alloc(&jb->luma_ip, -+ QPU_N_MAX, QPU_N_GRP, -+ QPU_Y_COMMANDS * sizeof(qpu_mc_pred_y_t) + QPU_Y_SYNCS * sizeof(uint32_t), -+ QPU_Y_CMD_SLACK_PER_Q * sizeof(qpu_mc_pred_y_t) / 2) != 0) -+ goto fail3; -+ -+ return jb; -+ -+fail3: -+ rpi_free_inter_pred(&jb->luma_ip); -+fail2: -+ av_freep(&jb->intra.cmds); -+fail1: -+ ff_hevc_rpi_progress_kill_wait(&jb->progress_wait); -+ rpi_cache_flush_finish(jb->rfe); -+ sem_destroy(&jb->sem); -+ return NULL; -+} -+ -+static void job_delete(HEVCRpiJob * const jb) -+{ -+ worker_pic_free_one(jb); -+ ff_hevc_rpi_progress_kill_wait(&jb->progress_wait); -+ rpi_free_inter_pred(&jb->chroma_ip); -+ rpi_free_inter_pred(&jb->luma_ip); -+ av_freep(&jb->intra.cmds); -+ rpi_cache_flush_finish(jb->rfe); // Not really needed - should do nothing -+ sem_destroy(&jb->sem); -+ av_free(jb); -+} -+ -+static void jbg_delete(HEVCRpiJobGlobal * const jbg) -+{ -+ HEVCRpiJob * jb; -+ -+ if (jbg == NULL) -+ return; -+ -+ jb = jbg->free1; -+ while (jb != NULL) -+ { -+ HEVCRpiJob * const jb2 = jb; -+ jb = jb2->next; -+ job_delete(jb2); -+ } -+ -+ pthread_mutex_destroy(&jbg->lock); -+ av_free(jbg); -+} -+ -+static HEVCRpiJobGlobal * jbg_new(unsigned int job_count) -+{ -+ HEVCRpiJobGlobal * const jbg = av_mallocz(sizeof(HEVCRpiJobGlobal)); -+ if (jbg == NULL) -+ return NULL; -+ -+ pthread_mutex_init(&jbg->lock, NULL); -+ -+ while (job_count-- != 0) -+ { -+ HEVCRpiJob * const jb = job_new(); -+ if (jb == NULL) -+ goto fail; -+ -+ jb->next = jbg->free1; -+ jbg->free1 = jb; -+ } -+ -+ return jbg; -+ -+fail: -+ jbg_delete(jbg); -+ return NULL; -+} -+ -+static void rpi_job_ctl_delete(HEVCRpiJobCtl * const jbc) -+{ -+ HEVCRpiJobGlobal * jbg; -+ -+ if (jbc == NULL) -+ return; -+ -+ jbg = jbc->jbg; -+ -+ if (jbc->jb1 != NULL) -+ job_delete(jbc->jb1); -+ -+ pthread_mutex_destroy(&jbc->in_lock); -+ sem_destroy(&jbc->sem_out); -+ av_free(jbc); -+ -+ // Deref the global job context -+ if (jbg != NULL && atomic_fetch_add(&jbg->ref_count, -1) == 1) -+ jbg_delete(jbg); -+} -+ -+static HEVCRpiJobCtl * rpi_job_ctl_new(HEVCRpiJobGlobal *const jbg) -+{ -+ HEVCRpiJobCtl * const jbc = av_mallocz(sizeof(HEVCRpiJobCtl)); -+ -+ if (jbc == NULL) -+ return NULL; -+ -+ jbc->jbg = jbg; -+ atomic_fetch_add(&jbg->ref_count, 1); -+ -+ sem_init(&jbc->sem_out, 0, RPI_MAX_JOBS); -+ pthread_mutex_init(&jbc->in_lock, NULL); -+ -+ if ((jbc->jb1 = job_new()) == NULL) -+ goto fail; -+ jbc->jb1->jbc_local = jbc; -+ -+ return jbc; -+ -+fail: -+ rpi_job_ctl_delete(jbc); -+ return NULL; -+} -+ -+ -+ -+static av_cold void hevc_init_worker(HEVCRpiContext * const s) -+{ -+#if RPI_PASSES == 2 -+ pass_queue_init(s->passq + 1, s, worker_core2, &s->jbc->sem_out, 1); -+#elif RPI_PASSES == 3 -+ pass_queue_init(s->passq + 2, s, rpi_execute_dblk_cmds, &s->jbc->sem_out, 2); -+ pass_queue_init(s->passq + 1, s, rpi_execute_pred_cmds, &s->passq[2].sem_in, 1); -+#else -+#error Passes confused -+#endif -+ pass_queue_init(s->passq + 0, s, worker_core, &s->passq[1].sem_in, 0); -+ -+ pass_queues_start_all(s); -+} -+ -+static av_cold void hevc_exit_worker(HEVCRpiContext *s) -+{ -+ pass_queues_term_all(s); -+ -+ pass_queues_kill_all(s); -+ -+ rpi_job_ctl_delete(s->jbc); -+ s->jbc = NULL; -+} -+ -+ -+static int slice_start(const HEVCRpiContext * const s, HEVCRpiLocalContext *const lc) -+{ -+ const int ctb_addr_ts = s->ps.pps->ctb_addr_rs_to_ts[s->sh.slice_segment_addr]; -+ const int tiles = s->ps.pps->num_tile_rows * s->ps.pps->num_tile_columns; -+ const unsigned int tile_id = s->ps.pps->tile_id[ctb_addr_ts]; -+ -+ // Check for obvious disasters -+ if (ctb_addr_ts == 0 && s->sh.dependent_slice_segment_flag) { -+ av_log(s->avctx, AV_LOG_ERROR, "Impossible initial tile.\n"); -+ return AVERROR_INVALIDDATA; -+ } -+ -+ // If dependant then ctb_addr_ts != 0 from previous check -+ if (s->sh.dependent_slice_segment_flag) { -+ int prev_rs = s->ps.pps->ctb_addr_ts_to_rs[ctb_addr_ts - 1]; -+ if (s->tab_slice_address[prev_rs] != s->sh.slice_addr) { -+ av_log(s->avctx, AV_LOG_ERROR, "Previous slice segment missing\n"); -+ return AVERROR_INVALIDDATA; -+ } -+ } -+ -+ if (!s->ps.pps->entropy_coding_sync_enabled_flag && -+ tile_id + s->sh.num_entry_point_offsets >= tiles) -+ { -+ av_log(s->avctx, AV_LOG_ERROR, "Entry points exceed tiles\n"); -+ return AVERROR_INVALIDDATA; -+ } -+ -+ // Tiled stuff must start at start of tile if it has multiple entry points -+ if (!s->ps.pps->entropy_coding_sync_enabled_flag && -+ s->sh.num_entry_point_offsets != 0 && -+ ctb_addr_ts != s->ps.pps->tile_pos_ts[tile_id]) -+ { -+ av_log(s->avctx, AV_LOG_ERROR, "Multiple tiles in slice; slice start != tile start\n"); -+ return AVERROR_INVALIDDATA; -+ } -+ -+ ff_hevc_rpi_cabac_init_decoder(lc); -+ -+ // Setup any required decode vars -+ lc->cabac_init_req = !s->sh.dependent_slice_segment_flag; -+ -+// printf("SS: req=%d, sol=%d, sot=%d\n", lc->cabac_init_req, sol, sot); -+ lc->qp_y = s->sh.slice_qp; -+ -+ // General setup -+ lc->bt_line_no = 0; -+ lc->ts = ctb_addr_ts; -+ return 0; -+} -+ -+static int gen_entry_points(HEVCRpiContext * const s, const H2645NAL * const nal) -+{ -+ const GetBitContext * const gb = &s->HEVClc->gb; -+ RpiSliceHeader * const sh = &s->sh; -+ int i, j; -+ -+ const unsigned int length = nal->size; -+ unsigned int offset = ((gb->index) >> 3) + 1; // We have a bit & align still to come = +1 byte -+ unsigned int cmpt; -+ unsigned int startheader; -+ -+ if (sh->num_entry_point_offsets == 0) { -+ s->data = NULL; -+ return 0; -+ } -+ -+ // offset in slice header includes emulation prevention bytes. -+ // Unfortunately those have been removed by the time we get here so we -+ // have to compensate. The nal layer keeps a track of where they were. -+ for (j = 0, cmpt = 0, startheader = offset + sh->entry_point_offset[0]; j < nal->skipped_bytes; j++) { -+ if (nal->skipped_bytes_pos[j] >= offset && nal->skipped_bytes_pos[j] < startheader) { -+ startheader--; -+ cmpt++; -+ } -+ } -+ -+ for (i = 1; i < sh->num_entry_point_offsets; i++) { -+ offset += (sh->entry_point_offset[i - 1] - cmpt); -+ for (j = 0, cmpt = 0, startheader = offset + sh->entry_point_offset[i]; j < nal->skipped_bytes; j++) { -+ if (nal->skipped_bytes_pos[j] >= offset && nal->skipped_bytes_pos[j] < startheader) { -+ startheader--; -+ cmpt++; -+ } -+ } -+ if (sh->entry_point_offset[i] <= cmpt) { -+ av_log(s->avctx, AV_LOG_ERROR, "entry point offset <= skipped bytes\n"); -+ return AVERROR_INVALIDDATA; -+ } -+ sh->size[i - 1] = sh->entry_point_offset[i] - cmpt; -+ sh->offset[i - 1] = offset; -+ } -+ -+ offset += sh->entry_point_offset[sh->num_entry_point_offsets - 1] - cmpt; -+ if (length < offset) { -+ av_log(s->avctx, AV_LOG_ERROR, "entry_point_offset table is corrupted\n"); -+ return AVERROR_INVALIDDATA; -+ } -+ sh->size[sh->num_entry_point_offsets - 1] = length - offset; -+ sh->offset[sh->num_entry_point_offsets - 1] = offset; -+ -+ // Remember data start pointer as we won't have nal later -+ s->data = nal->data; -+ return 0; -+} -+ -+ -+// Return -+// < 0 Error -+// 0 OK -+// -+// jb->ctu_ts_last < 0 Job still filling -+// jb->ctu_ts_last >= 0 Job ready -+ -+static int fill_job(HEVCRpiContext * const s, HEVCRpiLocalContext *const lc, unsigned int max_blocks) -+{ -+ const unsigned int log2_ctb_size = s->ps.sps->log2_ctb_size; -+ const unsigned int ctb_size = (1 << log2_ctb_size); -+ HEVCRpiJob * const jb = lc->jb0; -+ int more_data = 1; -+ unsigned int ctb_addr_ts = lc->ts; -+ unsigned int ctb_addr_rs = s->ps.pps->ctb_addr_ts_to_rs[ctb_addr_ts]; -+ unsigned int x_ctb = (ctb_addr_rs % s->ps.sps->ctb_width) << log2_ctb_size; -+ const unsigned int y_ctb = (ctb_addr_rs / s->ps.sps->ctb_width) << log2_ctb_size; -+ -+ lc->unit_done = 0; -+ -+ while (more_data && ctb_addr_ts < s->ps.sps->ctb_size) -+ { -+ int q_full; -+ const unsigned int ctb_flags = s->ps.pps->ctb_ts_flags[ctb_addr_ts]; -+ -+ hls_decode_neighbour(s, lc, x_ctb, y_ctb, ctb_addr_ts); -+ -+ ff_hevc_rpi_cabac_init(s, lc, ctb_flags); -+ -+ hls_sao_param(s, lc, x_ctb >> log2_ctb_size, y_ctb >> log2_ctb_size); -+ -+ s->deblock[ctb_addr_rs].beta_offset = s->sh.beta_offset; -+ s->deblock[ctb_addr_rs].tc_offset = s->sh.tc_offset; -+ s->filter_slice_edges[ctb_addr_rs] = s->sh.slice_loop_filter_across_slices_enabled_flag; -+ -+ // Zap stashes if navail -+ if ((lc->ctb_avail & AVAIL_U) == 0) -+ zap_cabac_stash(s->cabac_stash_up + (x_ctb >> 3), log2_ctb_size - 3); -+ if ((lc->ctb_avail & AVAIL_L) == 0) -+ { -+ memset(lc->ipm_left, INTRA_DC, IPM_TAB_SIZE); -+ zap_cabac_stash(s->cabac_stash_left + (y_ctb >> 3), log2_ctb_size - 3); -+ } -+#if MVF_STASH_WIDTH > 64 -+ // Restore left mvf stash at start of tile if not at start of line -+ if ((ctb_flags & CTB_TS_FLAGS_SOTL) != 0 && x_ctb != 0 && !s->is_irap) -+ { -+ unsigned int i; -+ HEVCRpiMvField * dst = mvf_stash_ptr(s, lc, x_ctb - 1, 0); -+ const HEVCRpiMvField * src = s->mvf_left + (y_ctb >> LOG2_MIN_PU_SIZE); -+ for (i = 0; i != ctb_size >> LOG2_MIN_PU_SIZE; ++i) -+ { -+ *dst = *src++; -+ dst += MVF_STASH_WIDTH_PU; -+ } -+ } -+#endif -+ -+ // Set initial tu states -+ lc->tu.cu_qp_delta = 0; -+ lc->tu.is_cu_qp_delta_wanted = 0; -+ lc->tu.cu_chroma_qp_offset_wanted = 0; -+ -+ // Decode -+ more_data = hls_coding_quadtree(s, lc, x_ctb, y_ctb, log2_ctb_size, 0); -+ -+ if (ff_hevc_rpi_cabac_overflow(lc)) -+ { -+ av_log(s->avctx, AV_LOG_ERROR, "Quadtree bitstream overread\n "); -+ more_data = AVERROR_INVALIDDATA; -+ } -+ -+ if (more_data < 0) { -+ s->tab_slice_address[ctb_addr_rs] = TAB_SLICE_ADDR_BROKEN; // Mark slice as broken -+ return more_data; -+ } -+ -+ if (more_data && ((ctb_flags & CTB_TS_FLAGS_EOT) != 0 || -+ (s->ps.pps->entropy_coding_sync_enabled_flag && (ctb_flags & CTB_TS_FLAGS_EOTL) != 0))) -+ { -+ if (ff_hevc_rpi_get_cabac_terminate(&lc->cc) < 0 || -+ ff_hevc_rpi_cabac_skip_bytes(&lc->cc, 0) == NULL) -+ { -+ av_log(s->avctx, AV_LOG_ERROR, "Error reading terminate el\n "); -+ return -1; -+ } -+ } -+ -+ // --- Post CTB processing -+ -+ // Stash rpl top/left for deblock that needs to remember such things cross-slice -+ s->rpl_up[x_ctb >> log2_ctb_size] = s->refPicList; -+ s->rpl_left[y_ctb >> log2_ctb_size] = s->refPicList; -+ -+ if (!s->is_irap) -+ { -+ // Copy MVF up to up-left & stash to up -+ { -+ const HEVCRpiMvField * src = mvf_stash_ptr(s, lc, x_ctb, ctb_size - 1); -+ HEVCRpiMvField * dst = s->mvf_up + (x_ctb >> LOG2_MIN_PU_SIZE); -+ -+ // printf("Stash: %d,%d, ctb_size=%d, %p->%p\n", x_ctb, y_ctb, ctb_size, src, dst); -+ -+ lc->mvf_ul[0] = dst[(ctb_size - 1) >> LOG2_MIN_PU_SIZE]; -+ memcpy(dst, src, (sizeof(*src)*ctb_size) >> LOG2_MIN_PU_SIZE); -+ } -+ // Stash sideways if end of tile line but not end of line (no point) -+ // ** Could/should do this @ end of fn -+#if MVF_STASH_WIDTH > 64 -+ if ((ctb_flags & (CTB_TS_FLAGS_EOTL | CTB_TS_FLAGS_EOL)) == CTB_TS_FLAGS_EOTL) -+#endif -+ { -+ unsigned int i; -+ const HEVCRpiMvField * src = mvf_stash_ptr(s, lc, x_ctb + ctb_size - 1, 0); -+ HEVCRpiMvField * dst = s->mvf_left + (y_ctb >> LOG2_MIN_PU_SIZE); -+ for (i = 0; i != ctb_size >> LOG2_MIN_PU_SIZE; ++i) -+ { -+ *dst++ = *src; -+ src += MVF_STASH_WIDTH_PU; -+ } -+ } -+ } -+ -+ if ((ctb_flags & CTB_TS_FLAGS_CSAVE) != 0) -+ ff_hevc_rpi_save_states(s, lc); -+ -+ // Report progress so we can use our MVs in other frames -+ if ((ctb_flags & CTB_TS_FLAGS_EOL) != 0) -+ ff_hevc_rpi_progress_signal_mv(s, y_ctb + ctb_size - 1); -+ -+ // End of line || End of tile line || End of tile -+ // (EoL covers end of frame for our purposes here) -+ q_full = ((ctb_flags & CTB_TS_FLAGS_EOTL) != 0); -+ -+ // Allocate QPU chunks on fixed size 64 pel boundries rather than -+ // whatever ctb_size is today. -+ // * We might quite like to continue to 64 pel vertical too but that -+ // currently confuses WPP -+ if (((x_ctb + ctb_size) & 63) == 0 || q_full) -+ { -+ int overflow = 0; -+ if (rpi_inter_pred_next_ctu(&jb->luma_ip) != 0) -+ overflow = 1; -+ if (rpi_inter_pred_next_ctu(&jb->chroma_ip) != 0) -+ overflow = 1; -+ if (overflow) -+ { -+ // * This is very annoying (and slow) to cope with in WPP so -+ // we treat it as an error there (no known stream triggers this -+ // with the current buffer sizes). Non-wpp should cope fine. -+ av_log(s->avctx, AV_LOG_WARNING, "%s: Q full before EoL\n", __func__); -+ q_full = 1; -+ } -+ } -+ -+ // Inc TS to next. -+ ctb_addr_ts++; -+ ctb_addr_rs++; -+ x_ctb += ctb_size; -+ -+ if (q_full) -+ { -+ // Do job -+ // Prep for submission -+ jb->ctu_ts_last = ctb_addr_ts - 1; // Was pre-inced -+ job_gen_bounds(s, jb); -+ break; -+ } -+ -+ // If max_blocks started as 0 then this will never be true -+ if (--max_blocks == 0) -+ break; -+ } -+ -+ lc->unit_done = (more_data <= 0); -+ lc->ts = ctb_addr_ts; -+ return 0; -+} -+ -+static void bt_lc_init(HEVCRpiContext * const s, HEVCRpiLocalContext * const lc, const unsigned int n) -+{ -+ lc->context = s; -+ lc->jb0 = NULL; -+ lc->lc_n = n; -+ lc->bt_terminate = 0; -+ lc->bt_psem_out = NULL; -+ sem_init(&lc->bt_sem_in, 0, 0); -+} -+ -+#define TRACE_WPP 0 -+#if RPI_EXTRA_BIT_THREADS > 0 -+static inline unsigned int line_ts_width(const HEVCRpiContext * const s, unsigned int ts) -+{ -+ unsigned int rs = s->ps.pps->ctb_addr_ts_to_rs[ts]; -+ return s->ps.pps->column_width[s->ps.pps->col_idxX[rs % s->ps.sps->ctb_width]]; -+} -+ -+// Move local context parameters from an aux bit thread back to the main -+// thread at the end of a slice as processing is going to continue there. -+static void movlc(HEVCRpiLocalContext *const dst_lc, HEVCRpiLocalContext *const src_lc, const int is_dep) -+{ -+ if (src_lc == dst_lc) { -+ return; -+ } -+ -+ // Move the job -+ // We will still have an active job if the final line terminates early -+ // Dest should always be null by now -+ av_assert1(dst_lc->jb0 == NULL); -+ dst_lc->jb0 = src_lc->jb0; -+ src_lc->jb0 = NULL; -+ -+ // Always need to store where we are in the bitstream -+ dst_lc->ts = src_lc->ts; -+ dst_lc->gb = src_lc->gb; -+ // Cabac init request will be built at start of next slice -+ -+ // Need to store context if we might have a dependent seg -+ if (is_dep) -+ { -+ dst_lc->qPy_pred = src_lc->qPy_pred; -+ memcpy(dst_lc->ipm_left, src_lc->ipm_left, sizeof(src_lc->ipm_left)); -+ memcpy(dst_lc->cabac_state, src_lc->cabac_state, sizeof(src_lc->cabac_state)); -+ memcpy(dst_lc->stat_coeff, src_lc->stat_coeff, sizeof(src_lc->stat_coeff)); -+ } -+} -+ -+static inline int wait_bt_sem_in(HEVCRpiLocalContext * const lc) -+{ -+ rpi_sem_wait(&lc->bt_sem_in); -+ return lc->bt_terminate; -+} -+ -+// Do one WPP line -+// Will not work correctly over horizontal tile boundries - vertical should be OK -+static int rpi_run_one_line(HEVCRpiContext *const s, HEVCRpiLocalContext * const lc, const int is_first) -+{ -+ const int is_tile = lc->bt_is_tile; -+ const unsigned int tile_id = s->ps.pps->tile_id[lc->ts]; -+ const unsigned int line = lc->bt_line_no; -+ const unsigned int line_inc = lc->bt_line_inc; -+ const int is_last = (line >= lc->bt_last_line); -+ -+ const unsigned int ts_eol = lc->ts + (is_tile ? s->ps.pps->tile_size[tile_id] : lc->bt_line_width); -+ const unsigned int ts_next = -+ line + line_inc > (unsigned int)s->sh.num_entry_point_offsets ? -+ INT_MAX : -+ is_tile ? -+ s->ps.pps->tile_pos_ts[tile_id + line_inc] : -+ lc->ts + lc->bt_line_width * line_inc; -+ // Tile wants line, WPP a few CTUs (must be >= 2 for cabac context to work) -+ const unsigned int partial_size = is_tile ? line_ts_width(s, lc->ts) : 2; -+ unsigned int ts_prev; -+ int loop_n = 0; -+ int err = 0; -+ -+ av_assert1(line <= s->sh.num_entry_point_offsets); -+ -+#if TRACE_WPP -+ printf("%s[%d]: Start %s: tile=%d, line=%d/%d/%d, ts=%d/%d/%d, width=%d, jb=%p\n", __func__, -+ lc->lc_n, is_tile ? "Tile" : "WPP", tile_id, -+ line, lc->bt_last_line, s->sh.num_entry_point_offsets, -+ lc->ts, ts_eol, ts_next, partial_size, lc->jb0); -+#endif -+ if (line != 0) -+ { -+ const uint8_t * const data = s->data + s->sh.offset[line - 1]; -+ const unsigned int len = s->sh.size[line - 1]; -+ if ((err = init_get_bits8(&lc->gb, data, len)) < 0) -+ return err; -+ -+ ff_init_cabac_decoder(&lc->cc, data, len); -+ } -+ -+ // We should never be processing a dependent slice here so reset is good -+ // ?? These probably shouldn't be needed (as they should be set by later -+ // logic) but do seem to be required -+ lc->qp_y = s->sh.slice_qp; -+ -+ do -+ { -+ if (!is_last && loop_n > 1) { -+#if TRACE_WPP -+ printf("%s[%d]: %sPoke %p\n", __func__, lc->lc_n, err == 0 ? "" : "ERR: ", lc->bt_psem_out); -+#endif -+ sem_post(lc->bt_psem_out); -+ } -+ // The wait for loop_n == 0 has been done in bit_thread -+ if (!is_first && loop_n != 0) -+ { -+#if TRACE_WPP -+ printf("%s[%d]: %sWait %p\n", __func__, lc->lc_n, err == 0 ? "" : "ERR: ", &lc->bt_sem_in); -+#endif -+ if (wait_bt_sem_in(lc) != 0) -+ return AVERROR_EXIT; -+ } -+ -+#if TRACE_WPP -+ { -+ int n; -+ sem_getvalue(&lc->bt_sem_in, &n); -+ printf("%s[%d]: ts=%d, sem=%d %p\n", __func__, lc->lc_n, lc->ts, n, &lc->bt_sem_in); -+ } -+#endif -+ -+ ts_prev = lc->ts; -+ -+ // If we have had an error - do no further decode but do continue -+ // moving signals around so the other threads continue to operate -+ // correctly (or at least as correctly as they can with this line missing) -+ // -+ // Errors in WPP/Tile are less fatal than normal as we have a good idea -+ // of how to restart on the next line so there is no need to give up totally -+ if (err != 0) -+ { -+ lc->unit_done = 0; -+ lc->ts += partial_size; -+ } -+ else -+ { -+ worker_pass0_ready(s, lc); -+ -+ if ((err = fill_job(s, lc, partial_size)) < 0 || -+ (lc->ts < ts_eol && !is_last && (lc->ts != ts_prev + partial_size || lc->unit_done))) -+ { -+ if (err == 0) { -+ av_log(s->avctx, AV_LOG_ERROR, "Unexpected end of tile/wpp section\n"); -+ err = AVERROR_INVALIDDATA; -+ } -+ worker_free(s, lc); -+ lc->ts = ts_prev + partial_size; // Pretend we did all that -+ lc->unit_done = 0; -+ } -+ else if (is_tile) -+ { -+ worker_submit_job(s, lc); -+ } -+ } -+ -+ ++loop_n; -+ } while (lc->ts < ts_eol && !lc->unit_done); -+ -+ // If we are on the last line & we didn't get a whole line we must wait for -+ // and sink the sem_posts from the line above / tile to the left. -+ while ((ts_prev += partial_size) < ts_eol) -+ { -+#if TRACE_WPP -+ printf("%s[%d]: EOL Wait: ts=%d %p\n", __func__, lc->lc_n, ts_prev, &lc->bt_sem_in); -+#endif -+ if (wait_bt_sem_in(lc) != 0) -+ return AVERROR_EXIT; -+ } -+ -+ lc->bt_line_no += line_inc; -+ -+ if (!is_tile && err == 0) -+ worker_submit_job(s, lc); -+ -+ if (!is_last) { -+ lc->ts = ts_next; -+ -+#if TRACE_WPP -+ printf("%s[%d]: Poke post submit %p\n", __func__, lc->lc_n, lc->bt_psem_out); -+#endif -+ sem_post(lc->bt_psem_out); -+ if (loop_n > 1) { -+#if TRACE_WPP -+ printf("%s[%d]: Poke post submit2 %p\n", __func__, lc->lc_n, lc->bt_psem_out); -+#endif -+ sem_post(lc->bt_psem_out); -+ } -+ } -+ else -+ { -+ movlc(s->HEVClcList[0], lc, s->ps.pps->dependent_slice_segments_enabled_flag); // * & not EoT -+#if MVF_STASH_WIDTH > 64 -+ // Horrid calculations to work out what we want but luckily this should almost never execute -+ // **** Move to movlc -+ if (!s->is_irap) -+ { -+ const unsigned int ctb_flags = s->ps.pps->ctb_ts_flags[lc->ts]; -+ if ((ctb_flags & CTB_TS_FLAGS_EOTL) == 0) // If EOTL then we have already stashed mvf -+ { -+ const unsigned int x_ctb = ((s->ps.pps->ctb_addr_ts_to_rs[lc->ts] % s->ps.sps->ctb_width) << s->ps.sps->log2_ctb_size) - 1; -+ unsigned int i; -+ const HEVCRpiMvField *s_mvf = lc->mvf_stash + ((x_ctb >> LOG2_MIN_PU_SIZE) & (MVF_STASH_WIDTH_PU - 1)); -+ HEVCRpiMvField *d_mvf = s->HEVClcList[0]->mvf_stash + ((x_ctb >> LOG2_MIN_PU_SIZE) & (MVF_STASH_WIDTH_PU - 1)); -+ -+ for (i = 0; i != MVF_STASH_HEIGHT_PU; ++i) -+ { -+ *d_mvf = *s_mvf; -+ d_mvf += MVF_STASH_WIDTH_PU; -+ s_mvf += MVF_STASH_WIDTH_PU; -+ } -+ -+ } -+ } -+#endif -+ // When all done poke the thread 0 sem_in one final time -+#if TRACE_WPP -+ printf("%s[%d]: Poke final %p\n", __func__, lc->lc_n, &s->HEVClcList[0]->bt_sem_in); -+#endif -+ sem_post(&s->HEVClcList[0]->bt_sem_in); -+ } -+ -+#if TRACE_WPP -+ printf("%s[%d]: End. dep=%d\n", __func__, lc->lc_n, s->ps.pps->dependent_slice_segments_enabled_flag); -+#endif -+ return err; -+} -+ -+static void wpp_setup_lcs(HEVCRpiContext * const s) -+{ -+ unsigned int ts = s->ps.pps->ctb_addr_rs_to_ts[s->sh.slice_segment_addr]; -+ const unsigned int line_width = line_ts_width(s, ts); -+ -+ for (int i = 0; i <= s->sh.num_entry_point_offsets && i < RPI_BIT_THREADS; ++i) -+ { -+ HEVCRpiLocalContext * const lc = s->HEVClcList[i]; -+ lc->ts = ts; -+ lc->bt_is_tile = 0; -+ lc->bt_line_no = i; -+ lc->bt_line_width = line_width; -+ lc->bt_last_line = s->sh.num_entry_point_offsets; -+ lc->bt_line_inc = RPI_BIT_THREADS; -+ ts += line_width; -+ } -+} -+ -+ -+// Can only process tile single row at once -+static void tile_one_row_setup_lcs(HEVCRpiContext * const s, unsigned int slice_row) -+{ -+ const HEVCRpiPPS * const pps = s->ps.pps; -+ const unsigned int ts0 = pps->ctb_addr_rs_to_ts[s->sh.slice_segment_addr]; -+ const unsigned int tile0 = pps->tile_id[ts0]; -+ const unsigned int col0 = tile0 % pps->num_tile_columns; -+ -+ const unsigned int col = (slice_row == 0) ? col0 : 0; -+ unsigned int line = slice_row * pps->num_tile_columns - col0 + col; -+ const unsigned int last_line = FFMIN( -+ line + pps->num_tile_columns - 1 - col, s->sh.num_entry_point_offsets); -+ -+ const unsigned int par = -+ FFMIN(RPI_BIT_THREADS, last_line + 1 - line); -+#if TRACE_WPP -+ printf("ts0=%d, ents=%d, row=%d, tiles=%dx%d, col=%d, par=%d, line=%d/%d\n", ts0, s->sh.num_entry_point_offsets, slice_row, -+ pps->num_tile_columns, pps->num_tile_rows, col, par, line, last_line); -+#endif -+ for (unsigned int i = 0; i != par; ++i, ++line) -+ { -+ HEVCRpiLocalContext * const lc = s->HEVClcList[i]; -+ const unsigned int tile = tile0 + line; -+ -+ lc->ts = pps->tile_pos_ts[tile]; -+ lc->bt_line_no = line; -+ lc->bt_is_tile = 1; -+ lc->bt_line_width = line_ts_width(s, lc->ts); -+ lc->bt_last_line = last_line; -+ lc->bt_line_inc = par; -+ } -+} -+ -+ -+static void * bit_thread(void * v) -+{ -+ HEVCRpiLocalContext * const lc = v; -+ HEVCRpiContext *const s = lc->context; -+ -+ while (wait_bt_sem_in(lc) == 0) -+ { -+ int err; -+ -+ if ((err = rpi_run_one_line(s, lc, 0)) < 0) { // Never first tile/wpp -+ if (lc->bt_terminate) { -+ av_log(s->avctx, AV_LOG_ERROR, "%s: Unexpected termination\n", __func__); -+ break; -+ } -+ av_log(s->avctx, AV_LOG_WARNING, "%s: Decode failure: %d\n", __func__, err); -+ } -+ } -+ -+ return NULL; -+} -+ -+static int bit_threads_start(HEVCRpiContext * const s) -+{ -+ if (s->bt_started) -+ return 0; -+ -+ for (int i = 1; i < RPI_BIT_THREADS; ++i) -+ { -+ // lc[0] belongs to the main thread - this sets up lc[1..RPI_BIT_THREADS] -+ if (s->HEVClcList[i] == NULL) { -+ if ((s->HEVClcList[i] = av_mallocz(sizeof(*s->HEVClcList[0]))) == NULL) -+ return -1; -+ } -+ -+ bt_lc_init(s, s->HEVClcList[i], i); -+ job_lc_init(s->HEVClcList[i]); -+ } -+ -+ // Link the sems in a circle -+ for (int i = 0; i < RPI_BIT_THREADS - 1; ++i) -+ s->HEVClcList[i]->bt_psem_out = &s->HEVClcList[i + 1]->bt_sem_in; -+ s->HEVClcList[RPI_BIT_THREADS - 1]->bt_psem_out = &s->HEVClcList[0]->bt_sem_in; -+ -+ // Init all lc before starting any threads -+ for (int i = 0; i < RPI_EXTRA_BIT_THREADS; ++i) -+ { -+ if (pthread_create(s->bit_threads + i, NULL, bit_thread, s->HEVClcList[i + 1]) < 0) -+ return -1; -+ } -+ -+ s->bt_started = 1; -+ return 0; -+} -+ -+static int bit_threads_kill(HEVCRpiContext * const s) -+{ -+ if (!s->bt_started) -+ return 0; -+ s->bt_started = 0; -+ -+ for (int i = 0; i < RPI_EXTRA_BIT_THREADS; ++i) -+ { -+ HEVCRpiLocalContext *const lc = s->HEVClcList[i + 1]; -+ if (lc == NULL) -+ break; -+ -+ lc->bt_terminate = 1; -+ sem_post(&lc->bt_sem_in); -+ pthread_join(s->bit_threads[i], NULL); -+ -+ sem_destroy(&lc->bt_sem_in); -+ job_lc_kill(lc); -+ } -+ return 0; -+} -+#endif -+ -+ -+// If we are at EoT and the row is shorter than the number of jobs -+// we can Q we have to wait for it finish otherwise we risk cache/QPU -+// disasters -+static inline int tile_needs_wait(const HEVCRpiContext * const s, const int n) -+{ -+ return -+ s->ps.pps->tile_wpp_inter_disable >= 2 && -+ s->sh.slice_type != HEVC_SLICE_I && -+ n >= 0 && -+ (s->ps.pps->ctb_ts_flags[n] & (CTB_TS_FLAGS_EOT | CTB_TS_FLAGS_EOL)) == CTB_TS_FLAGS_EOT; -+} -+ -+static int rpi_decode_entry(AVCodecContext *avctxt, void *isFilterThread) -+{ -+ HEVCRpiContext * const s = avctxt->priv_data; -+ HEVCRpiLocalContext * const lc = s->HEVClc; -+ int err; -+ -+ // Start of slice -+ if ((err = slice_start(s, lc)) != 0) -+ return err; -+ -+#if RPI_EXTRA_BIT_THREADS > 0 -+ -+ if (s->sh.offload_tiles) -+ { -+ unsigned int slice_row = 0; -+ -+#if TRACE_WPP -+ printf("%s: Do Tiles\n", __func__); -+#endif -+ // Generate & start extra bit threads if they aren't already running -+ bit_threads_start(s); -+ -+ do -+ { -+ // Reset lc lines etc. -+ tile_one_row_setup_lcs(s, slice_row); -+ -+#if TRACE_WPP -+ printf("%s: Row %d: Do 1st: line=%d/%d/%d\n", -+ __func__, slice_row, lc->bt_line_no, lc->bt_last_line, s->sh.num_entry_point_offsets); -+#endif -+ -+ rpi_run_one_line(s, lc, 1); // Kicks off the other threads -+#if TRACE_WPP -+ printf("%s: Row %d: Done 1st: line=%d/%d/%d\n", -+ __func__, slice_row, lc->bt_line_no, lc->bt_last_line, s->sh.num_entry_point_offsets); -+#endif -+ -+ while (lc->bt_line_no <= lc->bt_last_line) { -+ rpi_sem_wait(&lc->bt_sem_in); -+ rpi_run_one_line(s, lc, 0); -+ } -+#if TRACE_WPP -+ printf("%s: Done body\n", __func__); -+#endif -+ -+ // Wait for everything else to finish -+ rpi_sem_wait(&lc->bt_sem_in); -+ -+ ++slice_row; -+ } while (lc->bt_last_line < s->sh.num_entry_point_offsets); -+ -+ -+#if TRACE_WPP -+ printf("%s: Done wait: ts=%d\n", __func__, lc->ts); -+#endif -+ } -+ else if (s->sh.offload_wpp) -+ { -+#if TRACE_WPP -+ printf("%s: Do WPP\n", __func__); -+#endif -+ // Generate & start extra bit threads if they aren't already running -+ bit_threads_start(s); -+ -+ // Reset lc lines etc. -+ wpp_setup_lcs(s); -+ -+ rpi_run_one_line(s, lc, 1); // Kicks off the other threads -+#if TRACE_WPP -+ printf("%s: Done 1st\n", __func__); -+#endif -+ -+ while (lc->bt_line_no <= s->sh.num_entry_point_offsets) { -+ rpi_sem_wait(&lc->bt_sem_in); -+ rpi_run_one_line(s, lc, 0); -+ } -+#if TRACE_WPP -+ printf("%s: Done body\n", __func__); -+#endif -+ -+ // Wait for everything else to finish -+ rpi_sem_wait(&lc->bt_sem_in); -+ -+#if TRACE_WPP -+ printf("%s: Done wait: ts=%d\n", __func__, lc->ts); -+#endif -+ } -+ else -+#endif -+ { -+#if TRACE_WPP -+ printf("%s: Single start: ts=%d\n", __func__, lc->ts); -+#endif -+ // Single bit thread -+ do { -+ // Make sure we have space to prepare the next job -+ worker_pass0_ready(s, lc); -+ -+ if ((err = fill_job(s, lc, 0)) < 0) -+ goto fail; -+ -+ worker_submit_job(s, lc); -+ -+ if (tile_needs_wait(s, lc->ts - 1)) -+ worker_wait(s, lc); -+ -+ } while (!lc->unit_done); -+ -+#if TRACE_WPP -+ printf("%s: Single end: ts=%d\n", __func__, lc->ts); -+#endif -+ } -+ -+ // If we have reached the end of the frame or -+ // then wait for the worker to finish all its jobs -+ if (lc->ts >= s->ps.sps->ctb_size) -+ worker_wait(s, lc); -+ -+#if RPI_TSTATS -+ { -+ HEVCRpiStats *const ts = &s->tstats; -+ -+ printf("=== P: xy00:%5d/%5d/%5d/%5d h16gl:%5d/%5d w8gl:%5d/%5d y8m:%d\n B: xy00:%5d/%5d/%5d/%5d h16gl:%5d/%5d\n", -+ ts->y_pred1_xy, ts->y_pred1_x0, ts->y_pred1_y0, ts->y_pred1_x0y0, -+ ts->y_pred1_hgt16, ts->y_pred1_hle16, ts->y_pred1_wgt8, ts->y_pred1_wle8, ts->y_pred1_y8_merge, -+ ts->y_pred2_xy, ts->y_pred2_x0, ts->y_pred2_y0, ts->y_pred2_x0y0, -+ ts->y_pred2_hgt16, ts->y_pred2_hle16); -+ memset(ts, 0, sizeof(*ts)); -+ } -+#endif -+ -+ return lc->ts; -+ -+fail: -+ // Cleanup -+ av_log(s->avctx, AV_LOG_ERROR, "%s failed: err=%d\n", __func__, err); -+ // Free our job & wait for temination -+ worker_free(s, lc); -+ worker_wait(s, lc); -+ return err; -+} -+ -+ -+static void set_no_backward_pred(HEVCRpiContext * const s) -+{ -+ int i, j; -+ const RefPicList *const refPicList = s->refPicList; -+ -+ s->no_backward_pred_flag = 0; -+ if (s->sh.slice_type != HEVC_SLICE_B || !s->sh.slice_temporal_mvp_enabled_flag) -+ return; -+ -+ for (j = 0; j < 2; j++) { -+ for (i = 0; i < refPicList[j].nb_refs; i++) { -+ if (refPicList[j].list[i] > s->poc) { -+ s->no_backward_pred_flag = 1; -+ return; -+ } -+ } -+ } -+} -+ -+static int hls_slice_data(HEVCRpiContext * const s, const H2645NAL * const nal) -+{ -+ int err; -+ if ((err = gen_entry_points(s, nal)) < 0) -+ return err; -+ -+ set_no_backward_pred(s); -+ -+ return rpi_decode_entry(s->avctx, NULL); -+} -+ -+static int set_side_data(HEVCRpiContext *s) -+{ -+ AVFrame *out = s->ref->frame; -+ -+ if (s->sei.frame_packing.present && -+ s->sei.frame_packing.arrangement_type >= 3 && -+ s->sei.frame_packing.arrangement_type <= 5 && -+ s->sei.frame_packing.content_interpretation_type > 0 && -+ s->sei.frame_packing.content_interpretation_type < 3) { -+ AVStereo3D *stereo = av_stereo3d_create_side_data(out); -+ if (!stereo) -+ return AVERROR(ENOMEM); -+ -+ switch (s->sei.frame_packing.arrangement_type) { -+ case 3: -+ if (s->sei.frame_packing.quincunx_subsampling) -+ stereo->type = AV_STEREO3D_SIDEBYSIDE_QUINCUNX; -+ else -+ stereo->type = AV_STEREO3D_SIDEBYSIDE; -+ break; -+ case 4: -+ stereo->type = AV_STEREO3D_TOPBOTTOM; -+ break; -+ case 5: -+ stereo->type = AV_STEREO3D_FRAMESEQUENCE; -+ break; -+ } -+ -+ if (s->sei.frame_packing.content_interpretation_type == 2) -+ stereo->flags = AV_STEREO3D_FLAG_INVERT; -+ -+ if (s->sei.frame_packing.arrangement_type == 5) { -+ if (s->sei.frame_packing.current_frame_is_frame0_flag) -+ stereo->view = AV_STEREO3D_VIEW_LEFT; -+ else -+ stereo->view = AV_STEREO3D_VIEW_RIGHT; -+ } -+ } -+ -+ if (s->sei.display_orientation.present && -+ (s->sei.display_orientation.anticlockwise_rotation || -+ s->sei.display_orientation.hflip || s->sei.display_orientation.vflip)) { -+ double angle = s->sei.display_orientation.anticlockwise_rotation * 360 / (double) (1 << 16); -+ AVFrameSideData *rotation = av_frame_new_side_data(out, -+ AV_FRAME_DATA_DISPLAYMATRIX, -+ sizeof(int32_t) * 9); -+ if (!rotation) -+ return AVERROR(ENOMEM); -+ -+ av_display_rotation_set((int32_t *)rotation->data, angle); -+ av_display_matrix_flip((int32_t *)rotation->data, -+ s->sei.display_orientation.hflip, -+ s->sei.display_orientation.vflip); -+ } -+ -+ // Decrement the mastering display flag when IRAP frame has no_rasl_output_flag=1 -+ // so the side data persists for the entire coded video sequence. -+ if (s->sei.mastering_display.present > 0 && -+ IS_IRAP(s) && s->no_rasl_output_flag) { -+ s->sei.mastering_display.present--; -+ } -+ if (s->sei.mastering_display.present) { -+ // HEVC uses a g,b,r ordering, which we convert to a more natural r,g,b -+ const int mapping[3] = {2, 0, 1}; -+ const int chroma_den = 50000; -+ const int luma_den = 10000; -+ int i; -+ AVMasteringDisplayMetadata *metadata = -+ av_mastering_display_metadata_create_side_data(out); -+ if (!metadata) -+ return AVERROR(ENOMEM); -+ -+ for (i = 0; i < 3; i++) { -+ const int j = mapping[i]; -+ metadata->display_primaries[i][0].num = s->sei.mastering_display.display_primaries[j][0]; -+ metadata->display_primaries[i][0].den = chroma_den; -+ metadata->display_primaries[i][1].num = s->sei.mastering_display.display_primaries[j][1]; -+ metadata->display_primaries[i][1].den = chroma_den; -+ } -+ metadata->white_point[0].num = s->sei.mastering_display.white_point[0]; -+ metadata->white_point[0].den = chroma_den; -+ metadata->white_point[1].num = s->sei.mastering_display.white_point[1]; -+ metadata->white_point[1].den = chroma_den; -+ -+ metadata->max_luminance.num = s->sei.mastering_display.max_luminance; -+ metadata->max_luminance.den = luma_den; -+ metadata->min_luminance.num = s->sei.mastering_display.min_luminance; -+ metadata->min_luminance.den = luma_den; -+ metadata->has_luminance = 1; -+ metadata->has_primaries = 1; -+ -+ av_log(s->avctx, AV_LOG_DEBUG, "Mastering Display Metadata:\n"); -+ av_log(s->avctx, AV_LOG_DEBUG, -+ "r(%5.4f,%5.4f) g(%5.4f,%5.4f) b(%5.4f %5.4f) wp(%5.4f, %5.4f)\n", -+ av_q2d(metadata->display_primaries[0][0]), -+ av_q2d(metadata->display_primaries[0][1]), -+ av_q2d(metadata->display_primaries[1][0]), -+ av_q2d(metadata->display_primaries[1][1]), -+ av_q2d(metadata->display_primaries[2][0]), -+ av_q2d(metadata->display_primaries[2][1]), -+ av_q2d(metadata->white_point[0]), av_q2d(metadata->white_point[1])); -+ av_log(s->avctx, AV_LOG_DEBUG, -+ "min_luminance=%f, max_luminance=%f\n", -+ av_q2d(metadata->min_luminance), av_q2d(metadata->max_luminance)); -+ } -+ // Decrement the mastering display flag when IRAP frame has no_rasl_output_flag=1 -+ // so the side data persists for the entire coded video sequence. -+ if (s->sei.content_light.present > 0 && -+ IS_IRAP(s) && s->no_rasl_output_flag) { -+ s->sei.content_light.present--; -+ } -+ if (s->sei.content_light.present) { -+ AVContentLightMetadata *metadata = -+ av_content_light_metadata_create_side_data(out); -+ if (!metadata) -+ return AVERROR(ENOMEM); -+ metadata->MaxCLL = s->sei.content_light.max_content_light_level; -+ metadata->MaxFALL = s->sei.content_light.max_pic_average_light_level; -+ -+ av_log(s->avctx, AV_LOG_DEBUG, "Content Light Level Metadata:\n"); -+ av_log(s->avctx, AV_LOG_DEBUG, "MaxCLL=%d, MaxFALL=%d\n", -+ metadata->MaxCLL, metadata->MaxFALL); -+ } -+ -+ if (s->sei.a53_caption.a53_caption) { -+ AVFrameSideData* sd = av_frame_new_side_data(out, -+ AV_FRAME_DATA_A53_CC, -+ s->sei.a53_caption.a53_caption_size); -+ if (sd) -+ memcpy(sd->data, s->sei.a53_caption.a53_caption, s->sei.a53_caption.a53_caption_size); -+ av_freep(&s->sei.a53_caption.a53_caption); -+ s->sei.a53_caption.a53_caption_size = 0; -+ s->avctx->properties |= FF_CODEC_PROPERTY_CLOSED_CAPTIONS; -+ } -+ -+ if (s->sei.alternative_transfer.present && -+ av_color_transfer_name(s->sei.alternative_transfer.preferred_transfer_characteristics) && -+ s->sei.alternative_transfer.preferred_transfer_characteristics != AVCOL_TRC_UNSPECIFIED) { -+ s->avctx->color_trc = out->color_trc = s->sei.alternative_transfer.preferred_transfer_characteristics; -+ } -+ -+ return 0; -+} -+ -+static int hevc_frame_start(HEVCRpiContext * const s) -+{ -+ int ret; -+ -+ memset(s->bs_horizontal, 0, s->bs_size * 2); // Does V too -+ memset(s->is_pcm, 0, s->ps.sps->pcm_width * s->ps.sps->pcm_height); -+ memset(s->tab_slice_address, -1, s->ps.sps->ctb_size * sizeof(*s->tab_slice_address)); -+ -+ // Only need to remember intra for CIP -+ if (!s->ps.pps->constrained_intra_pred_flag || s->is_irap) -+ s->is_intra = NULL; -+ else -+ { -+ s->is_intra = s->is_intra_store; -+ memset(s->is_intra, 0, s->ps.sps->pcm_width * s->ps.sps->pcm_height); -+ } -+ -+ s->is_decoded = 0; -+ s->first_nal_type = s->nal_unit_type; -+ -+ s->no_rasl_output_flag = IS_IDR(s) || IS_BLA(s) || (s->nal_unit_type == HEVC_NAL_CRA_NUT && s->last_eos); -+ -+ if (s->pkt.nb_nals > s->rpl_tab_size) -+ { -+ // In most cases it will be faster to free & realloc as that doesn't -+ // require (an unwanted) copy -+ av_freep(&s->rpl_tab); -+ s->rpl_tab_size = 0; -+ if ((s->rpl_tab = av_malloc(s->pkt.nb_nals * sizeof(*s->rpl_tab))) == NULL) -+ goto fail; -+ s->rpl_tab_size = s->pkt.nb_nals; -+ } -+ memset(s->rpl_tab, 0, s->pkt.nb_nals * sizeof(*s->rpl_tab)); -+ -+ ret = ff_hevc_rpi_set_new_ref(s, &s->frame, s->poc); -+ if (ret < 0) -+ goto fail; -+ -+ // Resize rpl_tab to max that we might want -+ ret = ff_hevc_rpi_frame_rps(s); -+ if (ret < 0) { -+ av_log(s->avctx, AV_LOG_ERROR, "Error constructing the frame RPS.\n"); -+ goto fail; -+ } -+ -+ s->ref->frame->key_frame = IS_IRAP(s); -+ -+ ret = set_side_data(s); -+ if (ret < 0) -+ goto fail; -+ -+ s->frame->pict_type = 3 - s->sh.slice_type; -+ -+ if (!IS_IRAP(s)) -+ ff_hevc_rpi_bump_frame(s); -+ -+ av_frame_unref(s->output_frame); -+ ret = ff_hevc_rpi_output_frame(s, s->output_frame, 0); -+ if (ret < 0) -+ goto fail; -+ -+ ff_thread_finish_setup(s->avctx); -+ -+ return 0; -+ -+fail: -+ if (s->ref) -+ ff_hevc_rpi_unref_frame(s, s->ref, ~0); -+ s->ref = NULL; -+ return ret; -+} -+ -+static inline int is_non_ref_unit_type(const unsigned int nal_unit_type) -+{ -+ // From Table 7-1 -+ return (nal_unit_type & ~0xe) == 0; // True for 0, 2, 4, 6, 8, 10, 12, 14 -+} -+ -+static int decode_nal_unit(HEVCRpiContext *s, const H2645NAL *nal) -+{ -+ GetBitContext * const gb = &s->HEVClc->gb; -+ int ctb_addr_ts, ret; -+ -+ *gb = nal->gb; -+ s->nal_unit_type = nal->type; -+ s->temporal_id = nal->temporal_id; -+ -+ switch (s->nal_unit_type) { -+ case HEVC_NAL_VPS: -+ ret = ff_hevc_rpi_decode_nal_vps(gb, s->avctx, &s->ps); -+ if (ret < 0) -+ goto fail; -+ break; -+ case HEVC_NAL_SPS: -+ ret = ff_hevc_rpi_decode_nal_sps(gb, s->avctx, &s->ps, -+ s->apply_defdispwin); -+ if (ret < 0) -+ goto fail; -+ break; -+ case HEVC_NAL_PPS: -+ ret = ff_hevc_rpi_decode_nal_pps(gb, s->avctx, &s->ps); -+ if (ret < 0) -+ goto fail; -+ break; -+ case HEVC_NAL_SEI_PREFIX: -+ case HEVC_NAL_SEI_SUFFIX: -+ ret = ff_hevc_rpi_decode_nal_sei(gb, s->avctx, &s->sei, &s->ps, s->nal_unit_type); -+ if (ret < 0) -+ goto fail; -+ break; -+ case HEVC_NAL_TRAIL_R: -+ case HEVC_NAL_TRAIL_N: -+ case HEVC_NAL_TSA_N: -+ case HEVC_NAL_TSA_R: -+ case HEVC_NAL_STSA_N: -+ case HEVC_NAL_STSA_R: -+ case HEVC_NAL_BLA_W_LP: -+ case HEVC_NAL_BLA_W_RADL: -+ case HEVC_NAL_BLA_N_LP: -+ case HEVC_NAL_IDR_W_RADL: -+ case HEVC_NAL_IDR_N_LP: -+ case HEVC_NAL_CRA_NUT: -+ case HEVC_NAL_RADL_N: -+ case HEVC_NAL_RADL_R: -+ case HEVC_NAL_RASL_N: -+ case HEVC_NAL_RASL_R: -+ ret = hls_slice_header(s); -+ if (ret < 0) -+ return ret; -+ -+ // The definition of _N unit types is "non-reference for other frames -+ // with the same temporal_id" so they may/will be ref frames for pics -+ // with a higher temporal_id. -+ s->used_for_ref = s->ps.sps->max_sub_layers > s->temporal_id + 1 || -+ !is_non_ref_unit_type(s->nal_unit_type); -+ s->offload_recon = s->threads_type != 0 && s->used_for_ref; -+ s->is_irap = IS_IRAP(s); -+ -+#if DEBUG_DECODE_N -+ { -+ static int z = 0; -+ if (IS_IDR(s)) { -+ z = 1; -+ } -+ if (z != 0 && z++ > DEBUG_DECODE_N) { -+ s->is_decoded = 0; -+ break; -+ } -+ } -+#endif -+ if ( -+ (s->avctx->skip_frame >= AVDISCARD_NONREF && !s->used_for_ref) || -+ (s->avctx->skip_frame >= AVDISCARD_BIDIR && s->sh.slice_type == HEVC_SLICE_B) || -+ (s->avctx->skip_frame >= AVDISCARD_NONINTRA && s->sh.slice_type != HEVC_SLICE_I) || -+ (s->avctx->skip_frame >= AVDISCARD_NONKEY && !IS_IRAP(s))) -+ { -+ s->is_decoded = 0; -+ break; -+ } -+ -+ if (s->sh.first_slice_in_pic_flag) { -+ if (s->max_ra == INT_MAX) { -+ if (s->nal_unit_type == HEVC_NAL_CRA_NUT || IS_BLA(s)) { -+ s->max_ra = s->poc; -+ } else { -+ if (IS_IDR(s)) -+ s->max_ra = INT_MIN; -+ } -+ } -+ -+ if ((s->nal_unit_type == HEVC_NAL_RASL_R || s->nal_unit_type == HEVC_NAL_RASL_N) && -+ s->poc <= s->max_ra) { -+ s->is_decoded = 0; -+ break; -+ } else { -+ if (s->nal_unit_type == HEVC_NAL_RASL_R && s->poc > s->max_ra) -+ s->max_ra = INT_MIN; -+ } -+ -+ ret = hevc_frame_start(s); -+ if (ret < 0) -+ return ret; -+ } else if (!s->ref) { -+ av_log(s->avctx, AV_LOG_ERROR, "First slice in a frame missing.\n"); -+ goto fail; -+ } -+ -+ if (s->nal_unit_type != s->first_nal_type) { -+ av_log(s->avctx, AV_LOG_ERROR, -+ "Non-matching NAL types of the VCL NALUs: %d %d\n", -+ s->first_nal_type, s->nal_unit_type); -+ return AVERROR_INVALIDDATA; -+ } -+ -+ if (!s->sh.dependent_slice_segment_flag && -+ s->sh.slice_type != HEVC_SLICE_I) { -+ ret = ff_hevc_rpi_slice_rpl(s); -+ if (ret < 0) { -+ av_log(s->avctx, AV_LOG_WARNING, -+ "Error constructing the reference lists for the current slice.\n"); -+ goto fail; -+ } -+ } -+ -+ ctb_addr_ts = hls_slice_data(s, nal); -+ if (ctb_addr_ts >= s->ps.sps->ctb_size) { -+ s->is_decoded = 1; -+ } -+ -+ if (ctb_addr_ts < 0) { -+ ret = ctb_addr_ts; -+ goto fail; -+ } -+ break; -+ case HEVC_NAL_EOS_NUT: -+ case HEVC_NAL_EOB_NUT: -+ s->seq_decode = (s->seq_decode + 1) & 0xff; -+ s->max_ra = INT_MAX; -+ break; -+ case HEVC_NAL_AUD: -+ case HEVC_NAL_FD_NUT: -+ break; -+ default: -+ av_log(s->avctx, AV_LOG_INFO, -+ "Skipping NAL unit %d\n", s->nal_unit_type); -+ } -+ -+ return 0; -+fail: -+ if (s->avctx->err_recognition & AV_EF_EXPLODE) -+ return ret; -+ return 0; -+} -+ -+static int decode_nal_units(HEVCRpiContext *s, const uint8_t *buf, int length) -+{ -+ int i, ret = 0; -+ int eos_at_start = 1; -+ -+ s->ref = NULL; -+ s->last_eos = s->eos; -+ s->eos = 0; -+ -+ /* split the input packet into NAL units, so we know the upper bound on the -+ * number of slices in the frame */ -+ ret = ff_h2645_packet_split(&s->pkt, buf, length, s->avctx, s->is_nalff, -+ s->nal_length_size, s->avctx->codec_id, 0, 0); -+ if (ret < 0) { -+ av_log(s->avctx, AV_LOG_ERROR, -+ "Error splitting the input into NAL units.\n"); -+ return ret; -+ } -+ -+ for (i = 0; i < s->pkt.nb_nals; i++) { -+ if (s->pkt.nals[i].type == HEVC_NAL_EOB_NUT || -+ s->pkt.nals[i].type == HEVC_NAL_EOS_NUT) { -+ if (eos_at_start) { -+ s->last_eos = 1; -+ } else { -+ s->eos = 1; -+ } -+ } else { -+ eos_at_start = 0; -+ } -+ } -+ -+ /* decode the NAL units */ -+ for (i = 0; i < s->pkt.nb_nals; i++) { -+ ret = decode_nal_unit(s, &s->pkt.nals[i]); -+ if (ret < 0) { -+ av_log(s->avctx, AV_LOG_WARNING, -+ "Error parsing NAL unit #%d.\n", i); -+ goto fail; -+ } -+ } -+ -+fail: // Also success path -+ if (s->ref != NULL) { -+ if (s->used_for_ref && s->threads_type != 0) { -+ ff_hevc_rpi_progress_signal_all_done(s); -+ } -+ else { -+ // Flush frame to real memory as we expect to be able to pass -+ // it straight on to mmal -+ flush_frame(s, s->frame); -+ } -+ } -+ return ret; -+} -+ -+static void print_md5(void *log_ctx, int level, uint8_t md5[16]) -+{ -+ int i; -+ for (i = 0; i < 16; i++) -+ av_log(log_ctx, level, "%02"PRIx8, md5[i]); -+} -+ -+static int verify_md5(HEVCRpiContext *s, AVFrame *frame) -+{ -+ const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(frame->format); -+ int pixel_shift; -+ int i, j; -+ -+ if (!desc) -+ return AVERROR(EINVAL); -+ -+ pixel_shift = desc->comp[0].depth > 8; -+ -+ av_log(s->avctx, AV_LOG_DEBUG, "Verifying checksum for frame with POC %d: ", -+ s->poc); -+ -+ /* the checksums are LE, so we have to byteswap for >8bpp formats -+ * on BE arches */ -+#if HAVE_BIGENDIAN -+ if (pixel_shift && !s->checksum_buf) { -+ av_fast_malloc(&s->checksum_buf, &s->checksum_buf_size, -+ FFMAX3(frame->linesize[0], frame->linesize[1], -+ frame->linesize[2])); -+ if (!s->checksum_buf) -+ return AVERROR(ENOMEM); -+ } -+#endif -+ -+ for (i = 0; frame->data[i]; i++) { -+ int width = s->avctx->coded_width; -+ int height = s->avctx->coded_height; -+ int w = (i == 1 || i == 2) ? (width >> desc->log2_chroma_w) : width; -+ int h = (i == 1 || i == 2) ? (height >> desc->log2_chroma_h) : height; -+ uint8_t md5[16]; -+ -+ av_md5_init(s->md5_ctx); -+ for (j = 0; j < h; j++) { -+ const uint8_t *src = frame->data[i] + j * frame_stride1(frame, 1); -+#if HAVE_BIGENDIAN -+ if (pixel_shift) { -+ s->bdsp.bswap16_buf((uint16_t *) s->checksum_buf, -+ (const uint16_t *) src, w); -+ src = s->checksum_buf; -+ } -+#endif -+ av_md5_update(s->md5_ctx, src, w << pixel_shift); -+ } -+ av_md5_final(s->md5_ctx, md5); -+ -+ if (!memcmp(md5, s->sei.picture_hash.md5[i], 16)) { -+ av_log (s->avctx, AV_LOG_DEBUG, "plane %d - correct ", i); -+ print_md5(s->avctx, AV_LOG_DEBUG, md5); -+ av_log (s->avctx, AV_LOG_DEBUG, "; "); -+ } else { -+ av_log (s->avctx, AV_LOG_ERROR, "mismatching checksum of plane %d - ", i); -+ print_md5(s->avctx, AV_LOG_ERROR, md5); -+ av_log (s->avctx, AV_LOG_ERROR, " != "); -+ print_md5(s->avctx, AV_LOG_ERROR, s->sei.picture_hash.md5[i]); -+ av_log (s->avctx, AV_LOG_ERROR, "\n"); -+ return AVERROR_INVALIDDATA; -+ } -+ } -+ -+ av_log(s->avctx, AV_LOG_DEBUG, "\n"); -+ -+ return 0; -+} -+ -+static int all_sps_supported(const HEVCRpiContext * const s) -+{ -+ for (unsigned int i = 0; i < FF_ARRAY_ELEMS(s->ps.sps_list); i++) { -+ if (s->ps.sps_list[i] != NULL) -+ { -+ const HEVCRpiSPS * const sps = (const HEVCRpiSPS*)s->ps.sps_list[i]->data; -+ if (!is_sps_supported(sps)) -+ return 0; -+ } -+ } -+ return 1; -+} -+ -+static int hevc_rpi_decode_extradata(HEVCRpiContext *s, uint8_t *buf, int length, int first) -+{ -+ int ret, i; -+ -+ ret = ff_hevc_rpi_decode_extradata(buf, length, &s->ps, &s->sei, &s->is_nalff, -+ &s->nal_length_size, s->avctx->err_recognition, -+ s->apply_defdispwin, s->avctx); -+ if (ret < 0) -+ return ret; -+ -+ /* export stream parameters from the first SPS */ -+ for (i = 0; i < FF_ARRAY_ELEMS(s->ps.sps_list); i++) { -+ if (first && s->ps.sps_list[i]) { -+ const HEVCRpiSPS *sps = (const HEVCRpiSPS*)s->ps.sps_list[i]->data; -+ export_stream_params(s->avctx, &s->ps, sps); -+ break; -+ } -+ } -+ -+ return 0; -+} -+ -+static int hevc_rpi_decode_frame(AVCodecContext *avctx, void *data, int *got_output, -+ AVPacket *avpkt) -+{ -+ int ret; -+ int new_extradata_size; -+ uint8_t *new_extradata; -+ HEVCRpiContext *s = avctx->priv_data; -+ -+ if (!avpkt->size) { -+ ret = ff_hevc_rpi_output_frame(s, data, 1); -+ if (ret < 0) -+ return ret; -+ -+ *got_output = ret; -+ return 0; -+ } -+ -+ new_extradata = av_packet_get_side_data(avpkt, AV_PKT_DATA_NEW_EXTRADATA, -+ &new_extradata_size); -+ if (new_extradata && new_extradata_size > 0) { -+ ret = hevc_rpi_decode_extradata(s, new_extradata, new_extradata_size, 0); -+ if (ret < 0) -+ return ret; -+ } -+ -+ s->ref = NULL; -+ ret = decode_nal_units(s, avpkt->data, avpkt->size); -+ if (ret < 0) -+ return ret; -+ -+ /* verify the SEI checksum */ -+ if (avctx->err_recognition & AV_EF_CRCCHECK && s->is_decoded && -+ s->sei.picture_hash.is_md5) { -+ ret = verify_md5(s, s->ref->frame); -+ if (ret < 0 && avctx->err_recognition & AV_EF_EXPLODE) { -+ ff_hevc_rpi_unref_frame(s, s->ref, ~0); -+ return ret; -+ } -+ } -+ s->sei.picture_hash.is_md5 = 0; -+ -+ if (s->is_decoded) { -+ av_log(avctx, AV_LOG_DEBUG, "Decoded frame with POC %d.\n", s->poc); -+ s->is_decoded = 0; -+ } -+ -+ if (s->output_frame->buf[0]) { -+ av_frame_move_ref(data, s->output_frame); -+ *got_output = 1; -+ } -+ -+ return avpkt->size; -+} -+ -+static int hevc_ref_frame(HEVCRpiContext *s, HEVCRpiFrame *dst, HEVCRpiFrame *src) -+{ -+ int ret; -+ -+ ret = ff_thread_ref_frame(&dst->tf, &src->tf); -+ if (ret < 0) -+ return ret; -+ -+ if (src->col_mvf_buf != NULL) -+ { -+ dst->col_mvf_buf = av_buffer_ref(src->col_mvf_buf); -+ if (!dst->col_mvf_buf) -+ goto fail; -+ } -+ dst->col_mvf = src->col_mvf; -+ -+ dst->poc = src->poc; -+ dst->flags = src->flags; -+ dst->sequence = src->sequence; -+ return 0; -+ -+fail: -+ ff_hevc_rpi_unref_frame(s, dst, ~0); -+ return AVERROR(ENOMEM); -+} -+ -+ -+static av_cold int hevc_decode_free(AVCodecContext *avctx) -+{ -+ HEVCRpiContext * const s = avctx->priv_data; -+ int i; -+ -+ pic_arrays_free(s); -+ -+ av_freep(&s->md5_ctx); -+ -+ av_freep(&s->cabac_save); -+ -+#if RPI_EXTRA_BIT_THREADS -+ bit_threads_kill(s); -+#endif -+ -+ hevc_exit_worker(s); -+ for (i = 0; i != 2; ++i) { -+ ff_hevc_rpi_progress_kill_state(s->progress_states + i); -+ } -+ job_lc_kill(s->HEVClc); -+ -+ av_freep(&s->sao_pixel_buffer_h[0]); // [1] & [2] allocated with [0] -+ av_freep(&s->sao_pixel_buffer_v[0]); -+ av_frame_free(&s->output_frame); -+ -+ for (i = 0; i < FF_ARRAY_ELEMS(s->DPB); i++) { -+ ff_hevc_rpi_unref_frame(s, &s->DPB[i], ~0); -+ av_frame_free(&s->DPB[i].frame); -+ } -+ -+ for (i = 0; i < FF_ARRAY_ELEMS(s->ps.vps_list); i++) -+ av_buffer_unref(&s->ps.vps_list[i]); -+ for (i = 0; i < FF_ARRAY_ELEMS(s->ps.sps_list); i++) -+ av_buffer_unref(&s->ps.sps_list[i]); -+ for (i = 0; i < FF_ARRAY_ELEMS(s->ps.pps_list); i++) -+ av_buffer_unref(&s->ps.pps_list[i]); -+ s->ps.sps = NULL; -+ s->ps.pps = NULL; -+ s->ps.vps = NULL; -+ -+ // Free separately from sLists as used that way by RPI WPP -+ for (i = 0; i < MAX_NB_THREADS && s->HEVClcList[i] != NULL; ++i) { -+ av_freep(s->HEVClcList + i); -+ } -+ s->HEVClc = NULL; // Allocated as part of HEVClcList -+ -+ ff_h2645_packet_uninit(&s->pkt); -+ -+ if (s->qpu_init_ok) -+ vpu_qpu_term(); -+ s->qpu_init_ok = 0; -+ -+ return 0; -+} -+ -+ -+static av_cold int hevc_init_context(AVCodecContext *avctx) -+{ -+ HEVCRpiContext *s = avctx->priv_data; -+ int i; -+ -+ s->avctx = avctx; -+ -+ s->HEVClc = av_mallocz(sizeof(HEVCRpiLocalContext)); -+ if (!s->HEVClc) -+ goto fail; -+ s->HEVClcList[0] = s->HEVClc; -+ -+ if (vpu_qpu_init() != 0) -+ goto fail; -+ s->qpu_init_ok = 1; -+ -+#if RPI_QPU_EMU_Y || RPI_QPU_EMU_C -+ { -+ static const uint32_t dframe[1] = {0x80808080}; -+ s->qpu_dummy_frame_emu = (const uint8_t *)dframe; -+ } -+#endif -+#if !RPI_QPU_EMU_Y || !RPI_QPU_EMU_C -+ s->qpu_dummy_frame_qpu = qpu_dummy(); -+#endif -+ -+ bt_lc_init(s, s->HEVClc, 0); -+ job_lc_init(s->HEVClc); -+ -+ for (i = 0; i != 2; ++i) { -+ ff_hevc_rpi_progress_init_state(s->progress_states + i); -+ } -+ -+ if ((s->cabac_save = av_malloc(sizeof(*s->cabac_save))) == NULL) -+ goto fail; -+ -+ if ((s->output_frame = av_frame_alloc()) == NULL) -+ goto fail; -+ -+ for (i = 0; i < FF_ARRAY_ELEMS(s->DPB); i++) { -+ s->DPB[i].frame = av_frame_alloc(); -+ if (!s->DPB[i].frame) -+ goto fail; -+ s->DPB[i].tf.f = s->DPB[i].frame; -+ s->DPB[i].dpb_no = i; -+ } -+ -+ s->max_ra = INT_MAX; -+ -+ if ((s->md5_ctx = av_md5_alloc()) == NULL) -+ goto fail; -+ -+ s->context_initialized = 1; -+ s->eos = 0; -+ -+ ff_hevc_rpi_reset_sei(&s->sei); -+ -+ return 0; -+ -+fail: -+ av_log(s->avctx, AV_LOG_ERROR, "%s: Failed\n", __func__); -+ hevc_decode_free(avctx); -+ return AVERROR(ENOMEM); -+} -+ -+#if HAVE_THREADS -+static int hevc_update_thread_context(AVCodecContext *dst, -+ const AVCodecContext *src) -+{ -+ HEVCRpiContext *s = dst->priv_data; -+ HEVCRpiContext *s0 = src->priv_data; -+ int i, ret; -+ -+ av_assert0(s->context_initialized); -+ -+ // dst == src can happen according to the comments and in that case -+ // there is nothing to do here -+ if (dst == src) -+ return 0; -+ -+ for (i = 0; i < FF_ARRAY_ELEMS(s->DPB); i++) { -+ ff_hevc_rpi_unref_frame(s, &s->DPB[i], ~0); -+ if (s0->DPB[i].frame->buf[0]) { -+ ret = hevc_ref_frame(s, &s->DPB[i], &s0->DPB[i]); -+ if (ret < 0) -+ return ret; -+ } -+ } -+ -+ if (s->ps.sps != s0->ps.sps) -+ s->ps.sps = NULL; -+ for (i = 0; i < FF_ARRAY_ELEMS(s->ps.vps_list); i++) { -+ av_buffer_unref(&s->ps.vps_list[i]); -+ if (s0->ps.vps_list[i]) { -+ s->ps.vps_list[i] = av_buffer_ref(s0->ps.vps_list[i]); -+ if (!s->ps.vps_list[i]) -+ return AVERROR(ENOMEM); -+ } -+ } -+ -+ for (i = 0; i < FF_ARRAY_ELEMS(s->ps.sps_list); i++) { -+ av_buffer_unref(&s->ps.sps_list[i]); -+ if (s0->ps.sps_list[i]) { -+ s->ps.sps_list[i] = av_buffer_ref(s0->ps.sps_list[i]); -+ if (!s->ps.sps_list[i]) -+ return AVERROR(ENOMEM); -+ } -+ } -+ -+ for (i = 0; i < FF_ARRAY_ELEMS(s->ps.pps_list); i++) { -+ av_buffer_unref(&s->ps.pps_list[i]); -+ if (s0->ps.pps_list[i]) { -+ s->ps.pps_list[i] = av_buffer_ref(s0->ps.pps_list[i]); -+ if (!s->ps.pps_list[i]) -+ return AVERROR(ENOMEM); -+ } -+ } -+ -+ if (s->ps.sps != s0->ps.sps) -+ if ((ret = set_sps(s, s0->ps.sps, src->pix_fmt)) < 0) -+ return ret; -+ -+ s->seq_decode = s0->seq_decode; -+ s->seq_output = s0->seq_output; -+ s->pocTid0 = s0->pocTid0; -+ s->max_ra = s0->max_ra; -+ s->eos = s0->eos; -+ s->no_rasl_output_flag = s0->no_rasl_output_flag; -+ -+ s->is_nalff = s0->is_nalff; -+ s->nal_length_size = s0->nal_length_size; -+ -+ s->threads_type = s0->threads_type; -+ -+ if (s0->eos) { -+ s->seq_decode = (s->seq_decode + 1) & 0xff; -+ s->max_ra = INT_MAX; -+ } -+ -+ s->sei.frame_packing = s0->sei.frame_packing; -+ s->sei.display_orientation = s0->sei.display_orientation; -+ s->sei.mastering_display = s0->sei.mastering_display; -+ s->sei.content_light = s0->sei.content_light; -+ s->sei.alternative_transfer = s0->sei.alternative_transfer; -+ -+ // * We do this here as it allows us to easily locate our parents -+ // global job pool, but there really should be a less nasty way -+ if (s->jbc == NULL) -+ { -+ av_assert0((s->jbc = rpi_job_ctl_new(s0->jbc->jbg)) != NULL); -+ hevc_init_worker(s); -+ } -+ -+ return 0; -+} -+#endif -+ -+#include -+static int qpu_ok(void) -+{ -+ static int is_pi3 = -1; -+ if (is_pi3 == -1) -+ { -+ struct stat sb; -+ is_pi3 = (stat("/dev/rpivid-intcmem", &sb) != 0); -+ } -+ return is_pi3; -+} -+ -+static av_cold int hevc_decode_init(AVCodecContext *avctx) -+{ -+ HEVCRpiContext *s = avctx->priv_data; -+ int ret; -+ -+ if (!qpu_ok()) -+ return AVERROR_DECODER_NOT_FOUND; -+ -+ if ((ret = hevc_init_context(avctx)) < 0) -+ return ret; -+ -+ // If we are a child context then stop now -+ // Everything after this point is either 1st decode setup or global alloc -+ // that must not be repeated -+ // Global info will be copied into children in update_thread_context (we -+ // can't do it here as we have no way of finding the parent context) -+ if (avctx->internal->is_copy) -+ return 0; -+ -+ // Job allocation requires VCSM alloc to work so ensure that we have it -+ // initialised by this point -+ { -+ HEVCRpiJobGlobal * const jbg = jbg_new(FFMAX(avctx->thread_count * 3, 5)); -+ if (jbg == NULL) { -+ av_log(s->avctx, AV_LOG_ERROR, "%s: Job global init failed\n", __func__); -+ ret = AVERROR(ENOMEM); -+ goto fail; -+ } -+ -+ if ((s->jbc = rpi_job_ctl_new(jbg)) == NULL) { -+ av_log(s->avctx, AV_LOG_ERROR, "%s: Job ctl init failed\n", __func__); -+ ret = AVERROR(ENOMEM); -+ goto fail; -+ } -+ } -+ -+ hevc_init_worker(s); -+ -+ s->eos = 1; -+ -+ if (avctx->extradata_size > 0 && avctx->extradata) { -+ if ((ret = hevc_rpi_decode_extradata(s, avctx->extradata, avctx->extradata_size, 1)) < 0) -+ goto fail; -+ -+ if (!all_sps_supported(s)) { -+ ret = AVERROR_DECODER_NOT_FOUND; -+ goto fail; -+ } -+ } -+ -+ if((avctx->active_thread_type & FF_THREAD_FRAME) && avctx->thread_count > 1) -+ s->threads_type = FF_THREAD_FRAME; -+ else -+ s->threads_type = 0; -+ -+ return 0; -+ -+fail: -+ hevc_decode_free(avctx); -+ return ret; -+} -+ -+static void hevc_decode_flush(AVCodecContext *avctx) -+{ -+ HEVCRpiContext *s = avctx->priv_data; -+ ff_hevc_rpi_flush_dpb(s); -+ s->max_ra = INT_MAX; -+ s->eos = 1; -+} -+ -+typedef struct hwaccel_rpi3_qpu_env_s { -+ const AVClass *av_class; -+ AVZcEnvPtr zc; -+} hwaccel_rpi3_qpu_env_t; -+ -+static int hwaccel_alloc_frame(AVCodecContext *s, AVFrame *frame) -+{ -+ hwaccel_rpi3_qpu_env_t * const r3 = s->internal->hwaccel_priv_data; -+ int rv; -+ -+ if (av_rpi_zc_in_use(s)) -+ { -+ rv = s->get_buffer2(s, frame, 0); -+ } -+ else -+ { -+ rv = av_rpi_zc_get_buffer(r3->zc, frame); -+ if (rv == 0) -+ rv = av_rpi_zc_resolve_frame(frame, ZC_RESOLVE_ALLOC_VALID); // actually do the alloc -+ } -+ -+ if (rv == 0 && -+ (rv = ff_attach_decode_data(frame)) < 0) -+ { -+ av_frame_unref(frame); -+ } -+ -+ return rv; -+} -+ -+static int hwaccel_rpi3_qpu_free(AVCodecContext *avctx) -+{ -+ hwaccel_rpi3_qpu_env_t * const r3 = avctx->internal->hwaccel_priv_data; -+ av_rpi_zc_int_env_freep(&r3->zc); -+ return 0; -+} -+ -+static int hwaccel_rpi3_qpu_init(AVCodecContext *avctx) -+{ -+ hwaccel_rpi3_qpu_env_t * const r3 = avctx->internal->hwaccel_priv_data; -+ -+ if ((r3->zc = av_rpi_zc_int_env_alloc(avctx)) == NULL) -+ goto fail; -+ -+ return 0; -+ -+fail: -+ av_log(avctx, AV_LOG_ERROR, "Rpi3 QPU init failed\n"); -+ hwaccel_rpi3_qpu_free(avctx); -+ return AVERROR(ENOMEM); -+} -+ -+ -+#define OFFSET(x) offsetof(HEVCRpiContext, x) -+#define PAR (AV_OPT_FLAG_DECODING_PARAM | AV_OPT_FLAG_VIDEO_PARAM) -+ -+ -+static const AVOption options[] = { -+ { "apply_defdispwin", "Apply default display window from VUI", OFFSET(apply_defdispwin), -+ AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, PAR }, -+ { "strict-displaywin", "stricly apply default display window size", OFFSET(apply_defdispwin), -+ AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, PAR }, -+ { NULL }, -+}; -+ -+static const AVClass hevc_rpi_decoder_class = { -+ .class_name = "HEVC RPI decoder", -+ .item_name = av_default_item_name, -+ .option = options, -+ .version = LIBAVUTIL_VERSION_INT, -+}; -+ -+static const enum AVPixelFormat hevc_rpi_pix_fmts[] = { -+ AV_PIX_FMT_SAND128, -+ AV_PIX_FMT_SAND64_10, -+ AV_PIX_FMT_NONE -+}; -+ -+ -+static const AVHWAccel hwaccel_rpi3_qpu = { -+ .name = "Pi3 QPU Hwaccel", -+ .alloc_frame = hwaccel_alloc_frame, -+ .init = hwaccel_rpi3_qpu_init, -+ .uninit = hwaccel_rpi3_qpu_free, -+ .priv_data_size = sizeof(hwaccel_rpi3_qpu_env_t), -+ .caps_internal = HWACCEL_CAP_ASYNC_SAFE | HWACCEL_CAP_MT_SAFE, -+}; -+ -+static const AVCodecHWConfigInternal hevc_rpi_hw_config_sand128 = -+{ -+ .public = { -+ .pix_fmt = AV_PIX_FMT_SAND128, -+ .methods = AV_CODEC_HW_CONFIG_METHOD_AD_HOC, -+ .device_type = AV_HWDEVICE_TYPE_NONE, -+ }, -+ .hwaccel = &hwaccel_rpi3_qpu -+}; -+static const AVCodecHWConfigInternal hevc_rpi_hw_config_sand64_10 = -+{ -+ .public = { -+ .pix_fmt = AV_PIX_FMT_SAND64_10, -+ .methods = AV_CODEC_HW_CONFIG_METHOD_AD_HOC, -+ .device_type = AV_HWDEVICE_TYPE_NONE, -+ }, -+ .hwaccel = &hwaccel_rpi3_qpu -+}; -+ -+ -+static const AVCodecHWConfigInternal *hevc_rpi_hw_configs[] = { -+ &hevc_rpi_hw_config_sand128, -+ &hevc_rpi_hw_config_sand64_10, -+ NULL -+}; -+ -+ -+AVCodec ff_hevc_rpi_decoder = { -+ .name = "hevc_rpi", -+ .long_name = NULL_IF_CONFIG_SMALL("HEVC (rpi)"), -+ .type = AVMEDIA_TYPE_VIDEO, -+ .id = AV_CODEC_ID_HEVC, -+ .priv_data_size = sizeof(HEVCRpiContext), -+ .priv_class = &hevc_rpi_decoder_class, -+ .init = hevc_decode_init, -+ .close = hevc_decode_free, -+ .decode = hevc_rpi_decode_frame, -+ .flush = hevc_decode_flush, -+ .update_thread_context = ONLY_IF_THREADS_ENABLED(hevc_update_thread_context), -+ .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY | -+ AV_CODEC_CAP_HARDWARE | -+ AV_CODEC_CAP_AVOID_PROBING | -+#if 0 -+ // Debugging is often easier without threads getting in the way -+ 0, -+#warning H265 threading turned off -+#else -+ // We only have decent optimisation for frame - so only admit to that -+ AV_CODEC_CAP_FRAME_THREADS, -+#endif -+ .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | -+ FF_CODEC_CAP_EXPORTS_CROPPING | -+ FF_CODEC_CAP_ALLOCATE_PROGRESS, -+ .pix_fmts = hevc_rpi_pix_fmts, -+ .profiles = NULL_IF_CONFIG_SMALL(ff_hevc_profiles), -+ .hw_configs = hevc_rpi_hw_configs, -+// .wrapper_name = "hevc_rpi", -+}; -+ ---- /dev/null -+++ b/libavcodec/rpi_hevcdec.h -@@ -0,0 +1,1091 @@ -+/* -+ * HEVC video decoder -+ * -+ * Copyright (C) 2012 - 2013 Guillaume Martres -+ * -+ * This file is part of FFmpeg. -+ * -+ * FFmpeg is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * FFmpeg is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with FFmpeg; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+ */ -+ -+#ifndef AVCODEC_RPI_HEVCDEC_H -+#define AVCODEC_RPI_HEVCDEC_H -+ -+#include "config.h" -+ -+#include -+ -+#include "libavutil/buffer.h" -+ -+#include "avcodec.h" -+#include "bswapdsp.h" -+#include "cabac.h" -+#include "get_bits.h" -+#include "rpi_hevcpred.h" -+#include "h2645_parse.h" -+#include "hevc.h" -+#include "rpi_hevc_mv.h" -+#include "rpi_hevc_ps.h" -+#include "rpi_hevc_sei.h" -+#include "rpi_hevcdsp.h" -+#include "internal.h" -+#include "thread.h" -+#include "videodsp.h" -+ -+#if ARCH_ARM -+#include "arm/rpi_hevc_misc_neon.h" -+#endif -+ -+#define MAX_NB_THREADS 16 -+#define SHIFT_CTB_WPP 2 -+ -+//TODO: check if this is really the maximum -+#define MAX_TRANSFORM_DEPTH 5 -+ -+#define MAX_TB_SIZE 32 -+#define MAX_QP 51 -+#define DEFAULT_INTRA_TC_OFFSET 2 -+ -+#define HEVC_CONTEXTS 199 -+ -+#define MRG_MAX_NUM_CANDS 5 -+ -+#define HEVC_MAX_CTB_SIZE (1 << HEVC_MAX_LOG2_CTB_SIZE) // 64 -+ -+// Size of DPB array -+#define HEVC_DPB_ELS 32 -+ -+#define L0 0 -+#define L1 1 -+ -+#define EPEL_EXTRA_BEFORE 1 -+#define EPEL_EXTRA_AFTER 2 -+#define EPEL_EXTRA 3 -+#define QPEL_EXTRA_BEFORE 3 -+#define QPEL_EXTRA_AFTER 4 -+#define QPEL_EXTRA 7 -+ -+#define EDGE_EMU_BUFFER_STRIDE 80 -+ -+#include -+#include "rpi_qpu.h" -+ -+// Max jobs per frame thread. Actual usage will be limited by the size -+// of the global job pool -+// ?? Limits -+#define RPI_MAX_JOBS 8 -+ -+// This is the number of _extra_ bit threads - we will have -+// RPI_EXTRA_BIT_THREADS+1 threads actually doing the processing -+// -+// 0 is legitimate and will disable our WPP processing -+//#define RPI_EXTRA_BIT_THREADS 0 -+#define RPI_EXTRA_BIT_THREADS 2 -+ -+// Number of separate threads/passes in worker -+// 2 and 3 are the currently valid numbers -+// At the moment 3 seems fractionally faster -+//#define RPI_PASSES 2 -+#define RPI_PASSES 3 -+ -+// Print out various usage stats -+#define RPI_TSTATS 0 -+ -+// Define RPI_COMPRESS_COEFFS to 1 to send coefficients in compressed form -+#define RPI_COMPRESS_COEFFS 1 -+ -+// Wait for VPU/QPU to finish in worker pass 0 -+// If 0 then the wait is in pass 1 -+// -+// One might expect the better place to wait would be in pass 1 however -+// testing shows that pass 0 produces overall faster decode. -+// Interestingly it is QPU/VPU limited streams that seem to suffer -+// from pass 1 waits, CPU limited ones tend to show a very mild gain. -+// This define exists so it is easy to test this. -+#define RPI_WORKER_WAIT_PASS_0 1 -+ -+// Use ARM emulation of QPU pred -+// These are for debug only as the emulation makes only limited -+// effort to be fast -+#define RPI_QPU_EMU_Y 0 -+#define RPI_QPU_EMU_C 0 -+ -+// Max width & height we are prepared to consider -+// Sand frame shape calc becomes confused with large frames -+// Some buffer alloc also depends on this -+#define HEVC_RPI_MAX_WIDTH 2048 -+#define HEVC_RPI_MAX_HEIGHT 1088 -+ -+ -+// Min CTB size is 16 -+#define HEVC_RPI_MAX_CTBS ((HEVC_RPI_MAX_WIDTH + 15) / 16) * ((HEVC_RPI_MAX_HEIGHT + 15) / 16) -+ -+/** -+ * Value of the luma sample at position (x, y) in the 2D array tab. -+ */ -+#define SAMPLE(tab, x, y) ((tab)[(y) * s->sps->width + (x)]) -+#define SAMPLE_CTB(tab, x, y) ((tab)[(y) * min_cb_width + (x)]) -+ -+#define IS_IDR(s) ((s)->nal_unit_type == HEVC_NAL_IDR_W_RADL || (s)->nal_unit_type == HEVC_NAL_IDR_N_LP) -+#define IS_BLA(s) ((s)->nal_unit_type == HEVC_NAL_BLA_W_RADL || (s)->nal_unit_type == HEVC_NAL_BLA_W_LP || \ -+ (s)->nal_unit_type == HEVC_NAL_BLA_N_LP) -+#define IS_IRAP(s) ((s)->nal_unit_type >= 16 && (s)->nal_unit_type <= 23) -+ -+enum RPSType { -+ ST_CURR_BEF = 0, -+ ST_CURR_AFT, -+ ST_FOLL, -+ LT_CURR, -+ LT_FOLL, -+ NB_RPS_TYPE, -+}; -+ -+enum SyntaxElement { -+ SAO_MERGE_FLAG = 0, -+ SAO_TYPE_IDX, -+ SAO_EO_CLASS, -+ SAO_BAND_POSITION, -+ SAO_OFFSET_ABS, -+ SAO_OFFSET_SIGN, -+ END_OF_SLICE_FLAG, -+ SPLIT_CODING_UNIT_FLAG, -+ CU_TRANSQUANT_BYPASS_FLAG, -+ SKIP_FLAG, -+ CU_QP_DELTA, -+ PRED_MODE_FLAG, -+ PART_MODE, -+ PCM_FLAG, -+ PREV_INTRA_LUMA_PRED_FLAG, -+ MPM_IDX, -+ REM_INTRA_LUMA_PRED_MODE, -+ INTRA_CHROMA_PRED_MODE, -+ MERGE_FLAG, -+ MERGE_IDX, -+ INTER_PRED_IDC, -+ REF_IDX_L0, -+ REF_IDX_L1, -+ ABS_MVD_GREATER0_FLAG, -+ ABS_MVD_GREATER1_FLAG, -+ ABS_MVD_MINUS2, -+ MVD_SIGN_FLAG, -+ MVP_LX_FLAG, -+ NO_RESIDUAL_DATA_FLAG, -+ SPLIT_TRANSFORM_FLAG, -+ CBF_LUMA, -+ CBF_CB_CR, -+ TRANSFORM_SKIP_FLAG, -+ EXPLICIT_RDPCM_FLAG, -+ EXPLICIT_RDPCM_DIR_FLAG, -+ LAST_SIGNIFICANT_COEFF_X_PREFIX, -+ LAST_SIGNIFICANT_COEFF_Y_PREFIX, -+ LAST_SIGNIFICANT_COEFF_X_SUFFIX, -+ LAST_SIGNIFICANT_COEFF_Y_SUFFIX, -+ SIGNIFICANT_COEFF_GROUP_FLAG, -+ SIGNIFICANT_COEFF_FLAG, -+ COEFF_ABS_LEVEL_GREATER1_FLAG, -+ COEFF_ABS_LEVEL_GREATER2_FLAG, -+ COEFF_ABS_LEVEL_REMAINING, -+ COEFF_SIGN_FLAG, -+ LOG2_RES_SCALE_ABS, -+ RES_SCALE_SIGN_FLAG, -+ CU_CHROMA_QP_OFFSET_FLAG, -+ CU_CHROMA_QP_OFFSET_IDX, -+}; -+ -+enum PartMode { -+ PART_2Nx2N = 0, -+ PART_2NxN = 1, -+ PART_Nx2N = 2, -+ PART_NxN = 3, -+ PART_2NxnU = 4, -+ PART_2NxnD = 5, -+ PART_nLx2N = 6, -+ PART_nRx2N = 7, -+}; -+ -+enum PredMode { -+ MODE_INTER = 0, -+ MODE_INTRA, -+ MODE_SKIP, -+}; -+ -+enum InterPredIdc { -+ PRED_L0 = 0, -+ PRED_L1, -+ PRED_BI, -+}; -+ -+enum PredFlag { -+ PF_INTRA = 0, -+ PF_L0, -+ PF_L1, -+ PF_BI, -+}; -+ -+enum SAOType { -+ SAO_NOT_APPLIED = 0, -+ SAO_BAND, -+ SAO_EDGE, -+ SAO_APPLIED -+}; -+ -+enum SAOEOClass { -+ SAO_EO_HORIZ = 0, -+ SAO_EO_VERT, -+ SAO_EO_135D, -+ SAO_EO_45D, -+}; -+ -+enum ScanType { -+ SCAN_DIAG = 0, -+ SCAN_HORIZ, -+ SCAN_VERT, -+}; -+ -+typedef struct RefPicList { -+ struct HEVCRpiFrame *ref[HEVC_MAX_REFS]; -+ int list[HEVC_MAX_REFS]; -+ uint8_t isLongTerm[HEVC_MAX_REFS]; -+ int nb_refs; -+} RefPicList; -+ -+typedef struct RefPicListTab { -+ RefPicList refPicList[2]; -+} RefPicListTab; -+ -+typedef struct RpiCodingUnit { -+ unsigned int x; // Passed to deblock -+ unsigned int y; -+ unsigned int x_split; -+ unsigned int y_split; -+ -+ enum PredMode pred_mode; ///< PredMode -+ enum PartMode part_mode; ///< PartMode -+ -+ // Inferred parameters -+ uint8_t intra_split_flag; ///< IntraSplitFlag -+ uint8_t max_trafo_depth; ///< MaxTrafoDepth -+ uint8_t cu_transquant_bypass_flag; -+} RpiCodingUnit; -+ -+typedef struct RpiPredictionUnit { -+ uint8_t intra_pred_mode[4]; -+ uint8_t intra_pred_mode_c[4]; -+ uint8_t chroma_mode_c[4]; -+ uint8_t merge_flag; -+} RpiPredictionUnit; -+ -+typedef struct HEVCRpiTransformUnit { -+ int8_t cu_qp_delta; -+ -+ // Inferred parameters; -+ uint8_t intra_pred_mode; -+ uint8_t intra_pred_mode_c; -+ uint8_t chroma_mode_c; -+ uint8_t is_cu_qp_delta_wanted; -+ uint8_t cu_chroma_qp_offset_wanted; -+ const int8_t * qp_divmod6[3]; -+} HEVCRpiTransformUnit; -+ -+typedef struct DBParams { -+ int8_t beta_offset; // -12 to +12 -+ int8_t tc_offset; // -12 to +12 -+} DBParams; -+ -+#define HEVC_FRAME_FLAG_OUTPUT (1 << 0) -+#define HEVC_FRAME_FLAG_SHORT_REF (1 << 1) -+#define HEVC_FRAME_FLAG_LONG_REF (1 << 2) -+#define HEVC_FRAME_FLAG_BUMPING (1 << 3) -+ -+struct HEVCRpiJob; -+ -+typedef struct HEVCRpiFrame { -+ AVFrame *frame; -+ ThreadFrame tf; -+ ColMvField *col_mvf; -+ int poc; -+ struct HEVCRpiFrame *collocated_ref; -+ -+ AVBufferRef *col_mvf_buf; -+ -+ /** -+ * A sequence counter, so that old frames are output first -+ * after a POC reset -+ */ -+ uint16_t sequence; -+ -+ /** -+ * A combination of HEVC_FRAME_FLAG_* -+ */ -+ uint8_t flags; -+ -+ // Entry no in DPB - can be used as a small unique -+ // frame identifier (within the current thread) -+ uint8_t dpb_no; -+} HEVCRpiFrame; -+ -+typedef struct HEVCRpiLocalContext { -+ HEVCRpiTransformUnit tu; -+ -+ CABACContext cc; -+ -+ // Vars that allow us to locate everything from just an lc -+ struct HEVCRpiContext * context; // ??? make const ??? -+ unsigned int lc_n; // lc list el no -+ -+ // Job wait links -+ struct HEVCRpiLocalContext * jw_next; -+ struct HEVCRpiLocalContext * jw_prev; -+ struct HEVCRpiLocalContext * ljw_next; -+ struct HEVCRpiLocalContext * ljw_prev; -+ struct HEVCRpiJob * volatile jw_job; -+ sem_t jw_sem; -+ -+ // ?? Wrap in structure ?? -+ sem_t bt_sem_in; -+ sem_t * bt_psem_out; -+ volatile int bt_terminate; -+ unsigned int ts; -+ unsigned int bt_last_line; // Last line in this bit_thread chunk -+ unsigned int bt_line_no; -+ unsigned int bt_line_width; -+ unsigned int bt_line_inc; -+ -+ struct HEVCRpiJob * jb0; -+ char unit_done; // Set once we have dealt with this slice -+ char bt_is_tile; -+ char last_progress_good; -+ char cabac_init_req; -+ -+ uint8_t cabac_state[HEVC_CONTEXTS]; -+ uint8_t stat_coeff[4]; -+ GetBitContext gb; -+ -+ uint8_t ct_depth; -+ int8_t qp_y; -+ int8_t curr_qp_y; -+ int8_t qPy_pred; -+ -+// N.B. Used by asm (neon) - do not change -+#define AVAIL_S_UR 0 -+#define AVAIL_S_U 1 -+#define AVAIL_S_UL 2 -+#define AVAIL_S_L 3 -+#define AVAIL_S_DL 4 -+ -+#define AVAIL_U (1 << AVAIL_S_U) -+#define AVAIL_L (1 << AVAIL_S_L) -+#define AVAIL_UL (1 << AVAIL_S_UL) -+#define AVAIL_UR (1 << AVAIL_S_UR) -+#define AVAIL_DL (1 << AVAIL_S_DL) -+ -+// Intra filters - same number space as avail -+#define FILTER_LIGHT 0x40 -+#define FILTER_STRONG 0x80 -+#define FILTER_EITHER (FILTER_LIGHT | FILTER_STRONG) -+ -+ uint8_t ctb_avail; -+ int end_of_ctb_x; -+ int end_of_ctb_y; -+ -+ RpiCodingUnit cu; -+ RpiPredictionUnit pu; -+ -+#define BOUNDARY_LEFT_SLICE (1 << 0) -+#define BOUNDARY_LEFT_TILE (1 << 1) -+#define BOUNDARY_UPPER_SLICE (1 << 2) -+#define BOUNDARY_UPPER_TILE (1 << 3) -+ /* properties of the boundary of the current CTB for the purposes -+ * of the deblocking filter */ -+ unsigned int boundary_flags; -+ -+#define IPM_TAB_SIZE (HEVC_MAX_CTB_SIZE >> LOG2_MIN_PU_SIZE) -+ uint8_t ipm_left[IPM_TAB_SIZE]; -+ uint8_t ipm_up[IPM_TAB_SIZE]; -+ -+//#define MVF_STASH_WIDTH 128 -+#define MVF_STASH_WIDTH 64 -+#define MVF_STASH_HEIGHT 64 -+#define MVF_STASH_WIDTH_PU (MVF_STASH_WIDTH >> LOG2_MIN_PU_SIZE) -+#define MVF_STASH_HEIGHT_PU (MVF_STASH_HEIGHT >> LOG2_MIN_PU_SIZE) -+ HEVCRpiMvField mvf_ul[1]; -+ HEVCRpiMvField mvf_stash[MVF_STASH_WIDTH_PU * MVF_STASH_HEIGHT_PU]; -+ -+ /* +7 is for subpixel interpolation, *2 for high bit depths */ -+// DECLARE_ALIGNED(32, uint8_t, edge_emu_buffer)[(MAX_PB_SIZE + 7) * EDGE_EMU_BUFFER_STRIDE * 2]; -+ /* The extended size between the new edge emu buffer is abused by SAO */ -+// DECLARE_ALIGNED(32, uint8_t, edge_emu_buffer2)[(MAX_PB_SIZE + 7) * EDGE_EMU_BUFFER_STRIDE * 2]; -+// DECLARE_ALIGNED(32, int16_t, tmp [MAX_PB_SIZE * MAX_PB_SIZE]); -+ -+} HEVCRpiLocalContext; -+ -+// Each block can have an intra prediction and an add_residual command -+// noof-cmds(2) * max-ctu height(64) / min-transform(4) * planes(3) * MAX_WIDTH -+ -+// Sand only has 2 planes (Y/C) -+#define RPI_MAX_PRED_CMDS (2*(HEVC_MAX_CTB_SIZE/4)*2*(HEVC_RPI_MAX_WIDTH/4)) -+ -+// Command for intra prediction and transform_add of predictions to coefficients -+enum rpi_pred_cmd_e -+{ -+ RPI_PRED_ADD_RESIDUAL, -+ RPI_PRED_ADD_RESIDUAL_U, // = RPI_PRED_TRANSFORM_ADD + c_idx -+ RPI_PRED_ADD_RESIDUAL_V, // = RPI_PRED_TRANSFORM_ADD + c_idx -+ RPI_PRED_ADD_RESIDUAL_C, // Merged U+V -+ RPI_PRED_ADD_DC, -+ RPI_PRED_ADD_DC_U, // Both U & V are effectively C -+ RPI_PRED_ADD_DC_V, -+ RPI_PRED_INTRA, -+ RPI_PRED_INTRA_C, -+ RPI_PRED_I_PCM, -+ RPI_PRED_CMD_MAX -+}; -+ -+typedef struct HEVCPredCmd { -+ uint8_t type; -+ uint8_t size; // log2 "size" used by all variants -+ uint8_t avail; // i_pred - but left here as they pack well -+ uint8_t dummy; -+ union { -+ struct { // TRANSFORM_ADD -+ uint8_t * dst; -+ const int16_t * buf; -+ uint16_t stride; // Should be good enough for all pic fmts we use -+ int16_t dc; -+ } ta; -+ struct { -+ uint8_t * dst; -+ uint32_t stride; -+ int dc; -+ } dc; -+ struct { // INTRA -+ uint16_t x; -+ uint16_t y; -+ enum IntraPredMode mode; -+ } i_pred; -+ struct { // I_PCM -+ uint16_t x; -+ uint16_t y; -+ const void * src; -+ uint32_t src_len; -+ } i_pcm; -+ }; -+} HEVCPredCmd; -+ -+union qpu_mc_pred_cmd_s; -+struct qpu_mc_pred_y_p_s; -+struct qpu_mc_src_s; -+ -+typedef struct HEVCRpiInterPredQ -+{ -+ union qpu_mc_pred_cmd_u *qpu_mc_base; -+ union qpu_mc_pred_cmd_u *qpu_mc_curr; -+ struct qpu_mc_src_s *last_l0; -+ struct qpu_mc_src_s *last_l1; -+ unsigned int load; -+ uint32_t code_setup; -+ uint32_t code_sync; -+ uint32_t code_exit; -+} HEVCRpiInterPredQ; -+ -+typedef struct HEVCRpiInterPredEnv -+{ -+ HEVCRpiInterPredQ * q; -+ uint8_t n; // Number of Qs -+ uint8_t n_grp; // Number of Q in a group -+ uint8_t curr; // Current Q number (0..n-1) -+ uint8_t used; // 0 if nothing in any Q, 1 otherwise -+ uint8_t used_grp; // 0 if nothing in any Q in the current group -+ unsigned int max_fill; -+ unsigned int min_gap; -+ GPU_MEM_PTR_T gptr; -+} HEVCRpiInterPredEnv; -+ -+typedef struct HEVCRpiIntraPredEnv { -+ unsigned int n; // Number of commands -+ HEVCPredCmd * cmds; -+} HEVCRpiIntraPredEnv; -+ -+typedef struct HEVCRpiCoeffEnv { -+ unsigned int n; -+#if RPI_COMPRESS_COEFFS -+ unsigned int packed; // Equal to 1 if coefficients should be being packed -+ unsigned int packed_n; // Value of n when packed was set equal to 0 (i.e. the amount that is sent compressed). Only valid if packed==0 -+#endif -+ int16_t * buf; -+} HEVCRpiCoeffEnv; -+ -+typedef struct HEVCRpiCoeffsEnv { -+ HEVCRpiCoeffEnv s[4]; -+ GPU_MEM_PTR_T gptr; -+ void * mptr; -+} HEVCRpiCoeffsEnv; -+ -+typedef struct HEVCRpiFrameProgressWait { -+ int req; -+ struct HEVCRpiFrameProgressWait * next; -+ sem_t sem; -+} HEVCRpiFrameProgressWait; -+ -+typedef struct HEVCRpiFrameProgressState { -+ struct HEVCRpiFrameProgressWait * first; -+ struct HEVCRpiFrameProgressWait * last; -+ pthread_mutex_t lock; -+} HEVCRpiFrameProgressState; -+ -+typedef struct RpiBlk -+{ -+ unsigned int x; -+ unsigned int y; -+ unsigned int w; -+ unsigned int h; -+} RpiBlk; -+ -+typedef struct HEVCRpiJob { -+ struct HEVCRpiJob * next; // Free chain -+ struct HEVCRpiJobCtl * jbc_local; -+ const HEVCRpiSPS * sps; // sps used to set up this job -+ -+ int waited; -+ int ctu_ts_first; -+ int ctu_ts_last; -+ RpiBlk bounds; // Bounding box of job -+ -+ struct qpu_mc_pred_y_p_s * last_y8_p; -+ struct qpu_mc_src_s * last_y8_l1; -+ rpi_cache_flush_env_t * rfe; -+ -+ HEVCRpiInterPredEnv chroma_ip; -+ HEVCRpiInterPredEnv luma_ip; -+ int16_t progress_req[HEVC_DPB_ELS]; // index by dpb_no -+ HEVCRpiIntraPredEnv intra; -+ HEVCRpiCoeffsEnv coeffs; -+ HEVCRpiFrameProgressWait progress_wait; -+ sem_t sem; -+ rpi_cache_buf_t flush_buf; -+} HEVCRpiJob; -+ -+struct HEVCRpiContext; -+ -+typedef void HEVCRpiWorkerFn(const struct HEVCRpiContext * const s, HEVCRpiJob * const jb); -+ -+typedef struct HEVCRpiPassQueue -+{ -+// int pending; -+ volatile int terminate; -+ sem_t sem_in; -+ sem_t * psem_out; -+ unsigned int job_n; -+ struct HEVCRpiContext * context; // Context pointer as we get to pass a single "void * this" to the thread -+ HEVCRpiWorkerFn * worker; -+ pthread_t thread; -+ uint8_t pass_n; // Pass number - debug -+ uint8_t started; -+} HEVCRpiPassQueue; -+ -+ -+struct HEVCRpiJobGlobal; -+ -+typedef struct HEVCRpiJobCtl -+{ -+ sem_t sem_out; -+ -+ HEVCRpiJob * volatile jb1; // The job associated with this frame if unallocated - NULL if allocated -+ struct HEVCRpiJobGlobal * jbg; -+ -+ HEVCRpiLocalContext * lcw_head; -+ HEVCRpiLocalContext * lcw_tail; -+ -+ pthread_mutex_t in_lock; -+ int offload_in; -+ -+ HEVCRpiJob *offloadq[RPI_MAX_JOBS]; -+} HEVCRpiJobCtl; -+ -+ -+typedef struct HEVCRpiJobGlobal -+{ -+ intptr_t ref_count; -+ pthread_mutex_t lock; -+ HEVCRpiJob * free1; // Singly linked list of free jobs -+ HEVCRpiLocalContext * wait_head; // Double linked list of lcs waiting for a job -+ HEVCRpiLocalContext * wait_good; // Last good tail -+ HEVCRpiLocalContext * wait_tail; -+ -+} HEVCRpiJobGlobal; -+ -+#define RPI_BIT_THREADS (RPI_EXTRA_BIT_THREADS + 1) -+ -+#if RPI_TSTATS -+typedef struct HEVCRpiStats { -+ int y_pred1_y8_merge; -+ int y_pred1_xy; -+ int y_pred1_x0; -+ int y_pred1_y0; -+ int y_pred1_x0y0; -+ int y_pred1_wle8; -+ int y_pred1_wgt8; -+ int y_pred1_hle16; -+ int y_pred1_hgt16; -+ int y_pred2_xy; -+ int y_pred2_x0; -+ int y_pred2_y0; -+ int y_pred2_x0y0; -+ int y_pred2_hle16; -+ int y_pred2_hgt16; -+} HEVCRpiStats; -+#endif -+ -+typedef struct HEVCRpiCabacState -+{ -+ uint8_t rice[4]; -+ uint8_t state[HEVC_CONTEXTS]; -+} HEVCRpiCabacState; -+ -+#define HEVC_RPI_BS_STRIDE1_PEL_SHIFT 6 // 64 pels -+#define HEVC_RPI_BS_STRIDE1_PELS (1U << HEVC_RPI_BS_STRIDE1_PEL_SHIFT) -+#define HEVC_RPI_BS_STRIDE1_PEL_MASK (HEVC_RPI_BS_STRIDE1_PELS - 1) -+#define HEVC_RPI_BS_ELS_PER_BYTE_SHIFT 2 // 4 els per byte -+#define HEVC_RPI_BS_PELS_PER_EL_SHIFT 2 // 4 pels per el -+#define HEVC_RPI_BS_PELS_PER_BYTE_SHIFT (HEVC_RPI_BS_PELS_PER_EL_SHIFT + HEVC_RPI_BS_ELS_PER_BYTE_SHIFT) -+#define HEVC_RPI_BS_STRIDE1_BYTE_SHIFT (HEVC_RPI_BS_STRIDE1_PEL_SHIFT - HEVC_RPI_BS_PELS_PER_BYTE_SHIFT) -+#define HEVC_RPI_BS_STRIDE1_BYTES (1U << HEVC_RPI_BS_STRIDE1_BYTE_SHIFT) -+#define HEVC_RPI_BS_Y_SHR 3 // 8 vertical pels per row -+#define HEVC_RPI_BS_COL_BYTES_SHR (HEVC_RPI_BS_Y_SHR - HEVC_RPI_BS_STRIDE1_BYTE_SHIFT) -+ -+typedef struct HEVCRpiContext { -+ const AVClass *c; // needed by private avoptions -+ AVCodecContext *avctx; -+ -+ uint8_t threads_type; -+ char qpu_init_ok; -+ -+ /** 1 if the independent slice segment header was successfully parsed */ -+ uint8_t slice_initialized; -+ char used_for_ref; // rpi -+ char is_irap; -+ char offload_recon; -+ uint8_t eos; ///< current packet contains an EOS/EOB NAL -+ uint8_t last_eos; ///< last packet contains an EOS/EOB NAL -+ uint8_t no_backward_pred_flag; -+ uint8_t is_decoded; -+ uint8_t no_rasl_output_flag; -+ -+ -+ /** -+ * Sequence counters for decoded and output frames, so that old -+ * frames are output first after a POC reset -+ */ -+ uint16_t seq_decode; -+ uint16_t seq_output; -+ -+ int width; -+ int height; -+ -+ HEVCRpiJobCtl * jbc; -+ // cabac stash -+ // b0 skip flag -+ // b1+ ct_depth -+ uint8_t * cabac_stash_left; -+ uint8_t * cabac_stash_up; -+ -+ // Function pointers -+#if RPI_QPU_EMU_Y || RPI_QPU_EMU_C -+ const uint8_t * qpu_dummy_frame_emu; -+#endif -+#if !RPI_QPU_EMU_Y || !RPI_QPU_EMU_C -+ uint32_t qpu_dummy_frame_qpu; // Not a frame - just a bit of memory -+#endif -+ HEVCRpiQpu qpu; -+ -+ HEVCRpiFrameProgressState progress_states[2]; -+ -+ HEVCRpiCabacState *cabac_save; -+ -+ AVFrame *frame; -+ AVFrame *output_frame; -+ uint8_t *sao_pixel_buffer_h[3]; -+ uint8_t *sao_pixel_buffer_v[3]; -+ -+ unsigned int col_mvf_stride; -+ AVBufferPool *col_mvf_pool; -+ -+ RpiSAOParams *sao; -+ DBParams *deblock; -+ enum HEVCNALUnitType nal_unit_type; -+ int temporal_id; ///< temporal_id_plus1 - 1 -+ HEVCRpiFrame *ref; -+ int poc; -+ int pocTid0; -+ int slice_idx; ///< number of the slice being currently decoded -+ int max_ra; -+ -+ int8_t *qp_y_tab; -+ -+ // Deblocking block strength bitmaps -+ unsigned int bs_stride2; -+ unsigned int bs_size; -+ uint8_t *bs_horizontal; -+ uint8_t *bs_vertical; -+ uint8_t *bsf_stash_up; -+ uint8_t *bsf_stash_left; -+ -+#if HEVC_RPI_MAX_CTBS >= 0xffff -+#define TAB_SLICE_ADDR_BROKEN ~(uint32_t)0 -+ uint32_t *tab_slice_address; -+#else -+#define TAB_SLICE_ADDR_BROKEN ~(uint16_t)0 -+ uint16_t *tab_slice_address; -+#endif -+ -+ // Bitfield 1 bit per 8 pels (min pcm size) -+ uint8_t *is_pcm; -+ // Bitfield 1 bit per 8 pels (min cb size) -+ // Only needed for CIP as CIP processing is async to the main thread -+ uint8_t *is_intra; -+ -+ // PU -+ HEVCRpiMvField *mvf_up; -+ HEVCRpiMvField *mvf_left; -+ -+ const RefPicList **rpl_up; -+ const RefPicList **rpl_left; -+ RefPicList * refPicList; -+ -+ // CTB-level flags affecting loop filter operation -+ uint8_t *filter_slice_edges; -+ -+ /** used on BE to byteswap the lines for checksumming */ -+ uint8_t *checksum_buf; -+ int checksum_buf_size; -+ -+ const uint8_t *data; -+ -+ H2645Packet pkt; -+ // type of the first VCL NAL of the current frame -+ enum HEVCNALUnitType first_nal_type; -+ -+ uint8_t context_initialized; -+ int is_nalff; ///< this flag is != 0 if bitstream is encapsulated -+ ///< as a format defined in 14496-15 -+ int apply_defdispwin; -+ -+ int nal_length_size; ///< Number of bytes used for nal length (1, 2 or 4) -+ int nuh_layer_id; -+ -+ struct AVMD5 *md5_ctx; -+ -+ RefPicListTab * rpl_tab; -+ unsigned int rpl_tab_size; -+ -+ uint8_t *is_intra_store; -+ -+ RpiSliceHeader sh; -+ -+ HEVCRpiParamSets ps; -+ -+ HEVCRpiLocalContext *HEVClc; -+ HEVCRpiLocalContext *HEVClcList[MAX_NB_THREADS]; -+ -+ HEVCRpiFrame DPB[HEVC_DPB_ELS]; -+ -+ ///< candidate references for the current frame -+ RefPicList rps[5]; -+ -+ HEVCRpiPredContext hpc; -+ HEVCDSPContext hevcdsp; -+ -+ HEVCSEIContext sei; -+ -+ // Put structures that allocate non-trivial storage at the end -+ // These are mostly used indirectly so position in the structure doesn't matter -+ HEVCRpiPassQueue passq[RPI_PASSES]; -+#if RPI_EXTRA_BIT_THREADS > 0 -+ int bt_started; -+ // This simply contains thread descriptors - task setup is held elsewhere -+ pthread_t bit_threads[RPI_EXTRA_BIT_THREADS]; -+#endif -+#if RPI_TSTATS -+ HEVCRpiStats tstats; -+#endif -+} HEVCRpiContext; -+ -+/** -+ * Mark all frames in DPB as unused for reference. -+ */ -+void ff_hevc_rpi_clear_refs(HEVCRpiContext *s); -+ -+/** -+ * Drop all frames currently in DPB. -+ */ -+void ff_hevc_rpi_flush_dpb(HEVCRpiContext *s); -+ -+/** -+ * Construct the reference picture sets for the current frame. -+ */ -+int ff_hevc_rpi_frame_rps(HEVCRpiContext *s); -+ -+/** -+ * Construct the reference picture list(s) for the current slice. -+ */ -+int ff_hevc_rpi_slice_rpl(HEVCRpiContext *s); -+ -+ -+/** -+ * Get the number of candidate references for the current frame. -+ */ -+int ff_hevc_rpi_frame_nb_refs(HEVCRpiContext *s); -+ -+int ff_hevc_rpi_set_new_ref(HEVCRpiContext *s, AVFrame **frame, int poc); -+ -+/** -+ * Find next frame in output order and put a reference to it in frame. -+ * @return 1 if a frame was output, 0 otherwise -+ */ -+int ff_hevc_rpi_output_frame(HEVCRpiContext *s, AVFrame *frame, int flush); -+ -+void ff_hevc_rpi_bump_frame(HEVCRpiContext *s); -+ -+void ff_hevc_rpi_unref_frame(HEVCRpiContext *s, HEVCRpiFrame *frame, int flags); -+ -+unsigned int ff_hevc_rpi_tb_avail_flags( -+ const HEVCRpiContext * const s, const HEVCRpiLocalContext * const lc, -+ const unsigned int x, const unsigned int y, const unsigned int w, const unsigned int h); -+ -+void ff_hevc_rpi_luma_mv_merge_mode(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc, int x0, int y0, int nPbW, -+ int nPbH, int log2_cb_size, int part_idx, -+ int merge_idx, HEVCRpiMvField * const mv); -+void ff_hevc_rpi_luma_mv_mvp_mode(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc, -+ const unsigned int x0, const unsigned int y0, -+ const unsigned int nPbW, const unsigned int nPbH, -+ const unsigned int avail, -+ HEVCRpiMvField * const mv, -+ const unsigned int mvp_lx_flag, const unsigned int LX); -+void ff_hevc_rpi_set_qPy(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc, int xBase, int yBase); -+void ff_hevc_rpi_deblocking_boundary_strengths(const HEVCRpiContext * const s, const HEVCRpiLocalContext * const lc, -+ const unsigned int x0, const unsigned int y0, -+ const unsigned int log2_trafo_size, const int is_coded_block); -+int ff_hevc_rpi_hls_filter_blk(const HEVCRpiContext * const s, const RpiBlk bounds, const int eot); -+ -+extern const uint8_t ff_hevc_rpi_qpel_extra_before[4]; -+extern const uint8_t ff_hevc_rpi_qpel_extra_after[4]; -+extern const uint8_t ff_hevc_rpi_qpel_extra[4]; -+ -+int16_t * rpi_alloc_coeff_buf(HEVCRpiJob * const jb, const int buf_no, const int n); -+ -+// arm/hevc_misc_neon.S -+// Neon coeff zap fn -+#if HAVE_NEON -+extern void rpi_zap_coeff_vals_neon(int16_t * dst, unsigned int l2ts_m2); -+#endif -+ -+void ff_hevc_rpi_progress_wait_field(const HEVCRpiContext * const s, HEVCRpiJob * const jb, -+ const HEVCRpiFrame * const ref, const int val, const int field); -+ -+void ff_hevc_rpi_progress_signal_field(HEVCRpiContext * const s, const int val, const int field); -+ -+// All of these expect that s->threads_type == FF_THREAD_FRAME -+ -+static inline void ff_hevc_rpi_progress_wait_mv(const HEVCRpiContext * const s, HEVCRpiJob * const jb, -+ const HEVCRpiFrame * const ref, const int y) -+{ -+ if (s->threads_type != 0) -+ ff_hevc_rpi_progress_wait_field(s, jb, ref, y, 1); -+} -+ -+static inline void ff_hevc_rpi_progress_signal_mv(HEVCRpiContext * const s, const int y) -+{ -+ if (s->used_for_ref && s->threads_type != 0) -+ ff_hevc_rpi_progress_signal_field(s, y, 1); -+} -+ -+static inline void ff_hevc_rpi_progress_wait_recon(const HEVCRpiContext * const s, HEVCRpiJob * const jb, -+ const HEVCRpiFrame * const ref, const int y) -+{ -+ ff_hevc_rpi_progress_wait_field(s, jb, ref, y, 0); -+} -+ -+static inline void ff_hevc_rpi_progress_signal_recon(HEVCRpiContext * const s, const int y) -+{ -+ if (s->used_for_ref && s->threads_type != 0) -+ { -+ ff_hevc_rpi_progress_signal_field(s, y, 0); -+ } -+} -+ -+static inline void ff_hevc_rpi_progress_signal_all_done(HEVCRpiContext * const s) -+{ -+ ff_hevc_rpi_progress_signal_field(s, INT_MAX, 0); -+ ff_hevc_rpi_progress_signal_field(s, INT_MAX, 1); -+} -+ -+ -+// Set all done - signal nothing (used in missing refs) -+// Works for both rpi & non-rpi -+static inline void ff_hevc_rpi_progress_set_all_done(HEVCRpiFrame * const ref) -+{ -+ if (ref->tf.progress != NULL) -+ { -+ int * const p = (int *)ref->tf.progress->data; -+ p[0] = INT_MAX; -+ p[1] = INT_MAX; -+ } -+} -+ -+#define HEVC_RPI_420_ONLY 1 -+#define HEVC_RPI_SAND128_ONLY 1 -+ -+static inline unsigned int ctx_hshift(const HEVCRpiContext * const s, const int cidx) -+{ -+#if HEVC_RPI_420_ONLY -+ return cidx == 0 ? 0 : 1; -+#else -+ return s->ps.sps->hshift[cidx]; -+#endif -+} -+ -+static inline unsigned int ctx_vshift(const HEVCRpiContext * const s, const int cidx) -+{ -+#if HEVC_RPI_420_ONLY -+ return cidx == 0 ? 0 : 1; -+#else -+ return s->ps.sps->vshift[cidx]; -+#endif -+} -+ -+static inline int ctx_cfmt(const HEVCRpiContext * const s) -+{ -+#if HEVC_RPI_420_ONLY -+ return 1; -+#else -+ return s->ps.sps->chroma_format_idc; -+#endif -+} -+ -+static inline int frame_stride1(const AVFrame * const frame, const int c_idx) -+{ -+#if HEVC_RPI_SAND128_ONLY -+ return 128; -+#else -+ return frame->linesize[c_idx]; -+#endif -+} -+ -+#if HEVC_RPI_SAND128_ONLY -+// Propagate this decision to later zc includes -+#define RPI_ZC_SAND128_ONLY 1 -+#endif -+ -+#ifndef ff_hevc_rpi_copy_vert -+static inline void ff_hevc_rpi_copy_vert(uint8_t *dst, const uint8_t *src, -+ int pixel_shift, int height, -+ ptrdiff_t stride_dst, ptrdiff_t stride_src) -+{ -+ int i; -+ switch (pixel_shift) -+ { -+ case 2: -+ for (i = 0; i < height; i++) { -+ *(uint32_t *)dst = *(uint32_t *)src; -+ dst += stride_dst; -+ src += stride_src; -+ } -+ break; -+ case 1: -+ for (i = 0; i < height; i++) { -+ *(uint16_t *)dst = *(uint16_t *)src; -+ dst += stride_dst; -+ src += stride_src; -+ } -+ break; -+ default: -+ for (i = 0; i < height; i++) { -+ *dst = *src; -+ dst += stride_dst; -+ src += stride_src; -+ } -+ break; -+ } -+} -+#endif -+ -+ -+#if MVF_STASH_WIDTH == 64 -+static inline HEVCRpiMvField* mvf_stash_ptr(const HEVCRpiContext *const s, const HEVCRpiLocalContext * const lc, -+ const unsigned int x, const unsigned int y) -+{ -+ const unsigned int mask_cs_hi = (~0U << s->ps.sps->log2_ctb_size); -+ return (HEVCRpiMvField*)(lc->mvf_stash + ((y & ~mask_cs_hi) >> LOG2_MIN_PU_SIZE) * MVF_STASH_WIDTH_PU + ((x & ~mask_cs_hi) >> LOG2_MIN_PU_SIZE)); -+} -+ -+static inline HEVCRpiMvField* mvf_ptr(const HEVCRpiContext *const s, const HEVCRpiLocalContext * const lc, -+ const unsigned int x0, const unsigned int y0, -+ const unsigned int x, const unsigned int y) -+{ -+ const unsigned int mask_cs_hi = (~0U << s->ps.sps->log2_ctb_size); -+ const unsigned int x0_ctb = x0 & mask_cs_hi; -+ const unsigned int y0_ctb = y0 & mask_cs_hi; -+ -+ return (HEVCRpiMvField *)((y < y0_ctb) ? -+ (x < x0_ctb ? lc->mvf_ul : s->mvf_up + (x >> LOG2_MIN_PU_SIZE)) : -+ (x < x0_ctb ? s->mvf_left + (y >> LOG2_MIN_PU_SIZE) : -+ lc->mvf_stash + -+ ((y & ~mask_cs_hi) >> LOG2_MIN_PU_SIZE) * MVF_STASH_WIDTH_PU + -+ ((x & ~mask_cs_hi) >> LOG2_MIN_PU_SIZE))); -+} -+ -+static inline unsigned int mvf_left_stride(const HEVCRpiContext *const s, -+ const unsigned int x0, -+ const unsigned int x) -+{ -+ const unsigned int mask_cs_hi = (~0U << s->ps.sps->log2_ctb_size); -+ const unsigned int x0_ctb = x0 & mask_cs_hi; -+ return x < x0_ctb ? 1 : MVF_STASH_WIDTH_PU; -+} -+ -+#else -+static inline HEVCRpiMvField* mvf_stash_ptr(const HEVCRpiContext *const s, const HEVCRpiLocalContext * const lc, -+ const unsigned int x, const unsigned int y) -+{ -+ const unsigned int mask_cs_hi = (~0U << s->ps.sps->log2_ctb_size); -+ return (HEVCRpiMvField*)(lc->mvf_stash + ((y & ~mask_cs_hi) >> LOG2_MIN_PU_SIZE) * MVF_STASH_WIDTH_PU + ((x >> LOG2_MIN_PU_SIZE) & (MVF_STASH_WIDTH_PU - 1))); -+} -+ -+static inline HEVCRpiMvField* mvf_ptr(const HEVCRpiContext *const s, const HEVCRpiLocalContext * const lc, -+ const unsigned int x0, const unsigned int y0, -+ const unsigned int x, const unsigned int y) -+{ -+ const unsigned int mask_cs_hi = (~0U << s->ps.sps->log2_ctb_size); -+ -+ const unsigned int x0_ctb = x0 & mask_cs_hi; -+ const unsigned int y0_ctb = y0 & mask_cs_hi; -+ -+ // If not in the same CTB for Y assume up -+ if (y < y0_ctb) { -+ // If not in the same CTB for X too assume up-left -+ return (HEVCRpiMvField *)(x < x0_ctb ? lc->mvf_ul : s->mvf_up + (x >> LOG2_MIN_PU_SIZE)); -+ } -+ return mvf_stash_ptr(s, lc, x, y); -+} -+ -+static inline unsigned int mvf_left_stride(const HEVCRpiContext *const s, -+ const unsigned int x0, -+ const unsigned int x) -+{ -+ return MVF_STASH_WIDTH_PU; -+} -+#endif -+ -+#endif /* AVCODEC_RPI_HEVCDEC_H */ ---- /dev/null -+++ b/libavcodec/rpi_hevcdsp.c -@@ -0,0 +1,450 @@ -+/* -+ * HEVC video decoder -+ * -+ * Copyright (C) 2012 - 2013 Guillaume Martres -+ * Copyright (C) 2013 - 2014 Pierre-Edouard Lepere -+ * Copyright (C) 2018 John Cox, Ben Avison for Raspberry Pi (Trading) -+ * -+ * This file is part of FFmpeg. -+ * -+ * FFmpeg is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * FFmpeg is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with FFmpeg; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+ */ -+ -+#include "rpi_hevcdsp.h" -+#include "rpi_hevc_mv.h" -+ -+static const int8_t transform[32][32] = { -+ { 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, -+ 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64 }, -+ { 90, 90, 88, 85, 82, 78, 73, 67, 61, 54, 46, 38, 31, 22, 13, 4, -+ -4, -13, -22, -31, -38, -46, -54, -61, -67, -73, -78, -82, -85, -88, -90, -90 }, -+ { 90, 87, 80, 70, 57, 43, 25, 9, -9, -25, -43, -57, -70, -80, -87, -90, -+ -90, -87, -80, -70, -57, -43, -25, -9, 9, 25, 43, 57, 70, 80, 87, 90 }, -+ { 90, 82, 67, 46, 22, -4, -31, -54, -73, -85, -90, -88, -78, -61, -38, -13, -+ 13, 38, 61, 78, 88, 90, 85, 73, 54, 31, 4, -22, -46, -67, -82, -90 }, -+ { 89, 75, 50, 18, -18, -50, -75, -89, -89, -75, -50, -18, 18, 50, 75, 89, -+ 89, 75, 50, 18, -18, -50, -75, -89, -89, -75, -50, -18, 18, 50, 75, 89 }, -+ { 88, 67, 31, -13, -54, -82, -90, -78, -46, -4, 38, 73, 90, 85, 61, 22, -+ -22, -61, -85, -90, -73, -38, 4, 46, 78, 90, 82, 54, 13, -31, -67, -88 }, -+ { 87, 57, 9, -43, -80, -90, -70, -25, 25, 70, 90, 80, 43, -9, -57, -87, -+ -87, -57, -9, 43, 80, 90, 70, 25, -25, -70, -90, -80, -43, 9, 57, 87 }, -+ { 85, 46, -13, -67, -90, -73, -22, 38, 82, 88, 54, -4, -61, -90, -78, -31, -+ 31, 78, 90, 61, 4, -54, -88, -82, -38, 22, 73, 90, 67, 13, -46, -85 }, -+ { 83, 36, -36, -83, -83, -36, 36, 83, 83, 36, -36, -83, -83, -36, 36, 83, -+ 83, 36, -36, -83, -83, -36, 36, 83, 83, 36, -36, -83, -83, -36, 36, 83 }, -+ { 82, 22, -54, -90, -61, 13, 78, 85, 31, -46, -90, -67, 4, 73, 88, 38, -+ -38, -88, -73, -4, 67, 90, 46, -31, -85, -78, -13, 61, 90, 54, -22, -82 }, -+ { 80, 9, -70, -87, -25, 57, 90, 43, -43, -90, -57, 25, 87, 70, -9, -80, -+ -80, -9, 70, 87, 25, -57, -90, -43, 43, 90, 57, -25, -87, -70, 9, 80 }, -+ { 78, -4, -82, -73, 13, 85, 67, -22, -88, -61, 31, 90, 54, -38, -90, -46, -+ 46, 90, 38, -54, -90, -31, 61, 88, 22, -67, -85, -13, 73, 82, 4, -78 }, -+ { 75, -18, -89, -50, 50, 89, 18, -75, -75, 18, 89, 50, -50, -89, -18, 75, -+ 75, -18, -89, -50, 50, 89, 18, -75, -75, 18, 89, 50, -50, -89, -18, 75 }, -+ { 73, -31, -90, -22, 78, 67, -38, -90, -13, 82, 61, -46, -88, -4, 85, 54, -+ -54, -85, 4, 88, 46, -61, -82, 13, 90, 38, -67, -78, 22, 90, 31, -73 }, -+ { 70, -43, -87, 9, 90, 25, -80, -57, 57, 80, -25, -90, -9, 87, 43, -70, -+ -70, 43, 87, -9, -90, -25, 80, 57, -57, -80, 25, 90, 9, -87, -43, 70 }, -+ { 67, -54, -78, 38, 85, -22, -90, 4, 90, 13, -88, -31, 82, 46, -73, -61, -+ 61, 73, -46, -82, 31, 88, -13, -90, -4, 90, 22, -85, -38, 78, 54, -67 }, -+ { 64, -64, -64, 64, 64, -64, -64, 64, 64, -64, -64, 64, 64, -64, -64, 64, -+ 64, -64, -64, 64, 64, -64, -64, 64, 64, -64, -64, 64, 64, -64, -64, 64 }, -+ { 61, -73, -46, 82, 31, -88, -13, 90, -4, -90, 22, 85, -38, -78, 54, 67, -+ -67, -54, 78, 38, -85, -22, 90, 4, -90, 13, 88, -31, -82, 46, 73, -61 }, -+ { 57, -80, -25, 90, -9, -87, 43, 70, -70, -43, 87, 9, -90, 25, 80, -57, -+ -57, 80, 25, -90, 9, 87, -43, -70, 70, 43, -87, -9, 90, -25, -80, 57 }, -+ { 54, -85, -4, 88, -46, -61, 82, 13, -90, 38, 67, -78, -22, 90, -31, -73, -+ 73, 31, -90, 22, 78, -67, -38, 90, -13, -82, 61, 46, -88, 4, 85, -54 }, -+ { 50, -89, 18, 75, -75, -18, 89, -50, -50, 89, -18, -75, 75, 18, -89, 50, -+ 50, -89, 18, 75, -75, -18, 89, -50, -50, 89, -18, -75, 75, 18, -89, 50 }, -+ { 46, -90, 38, 54, -90, 31, 61, -88, 22, 67, -85, 13, 73, -82, 4, 78, -+ -78, -4, 82, -73, -13, 85, -67, -22, 88, -61, -31, 90, -54, -38, 90, -46 }, -+ { 43, -90, 57, 25, -87, 70, 9, -80, 80, -9, -70, 87, -25, -57, 90, -43, -+ -43, 90, -57, -25, 87, -70, -9, 80, -80, 9, 70, -87, 25, 57, -90, 43 }, -+ { 38, -88, 73, -4, -67, 90, -46, -31, 85, -78, 13, 61, -90, 54, 22, -82, -+ 82, -22, -54, 90, -61, -13, 78, -85, 31, 46, -90, 67, 4, -73, 88, -38 }, -+ { 36, -83, 83, -36, -36, 83, -83, 36, 36, -83, 83, -36, -36, 83, -83, 36, -+ 36, -83, 83, -36, -36, 83, -83, 36, 36, -83, 83, -36, -36, 83, -83, 36 }, -+ { 31, -78, 90, -61, 4, 54, -88, 82, -38, -22, 73, -90, 67, -13, -46, 85, -+ -85, 46, 13, -67, 90, -73, 22, 38, -82, 88, -54, -4, 61, -90, 78, -31 }, -+ { 25, -70, 90, -80, 43, 9, -57, 87, -87, 57, -9, -43, 80, -90, 70, -25, -+ -25, 70, -90, 80, -43, -9, 57, -87, 87, -57, 9, 43, -80, 90, -70, 25 }, -+ { 22, -61, 85, -90, 73, -38, -4, 46, -78, 90, -82, 54, -13, -31, 67, -88, -+ 88, -67, 31, 13, -54, 82, -90, 78, -46, 4, 38, -73, 90, -85, 61, -22 }, -+ { 18, -50, 75, -89, 89, -75, 50, -18, -18, 50, -75, 89, -89, 75, -50, 18, -+ 18, -50, 75, -89, 89, -75, 50, -18, -18, 50, -75, 89, -89, 75, -50, 18 }, -+ { 13, -38, 61, -78, 88, -90, 85, -73, 54, -31, 4, 22, -46, 67, -82, 90, -+ -90, 82, -67, 46, -22, -4, 31, -54, 73, -85, 90, -88, 78, -61, 38, -13 }, -+ { 9, -25, 43, -57, 70, -80, 87, -90, 90, -87, 80, -70, 57, -43, 25, -9, -+ -9, 25, -43, 57, -70, 80, -87, 90, -90, 87, -80, 70, -57, 43, -25, 9 }, -+ { 4, -13, 22, -31, 38, -46, 54, -61, 67, -73, 78, -82, 85, -88, 90, -90, -+ 90, -90, 88, -85, 82, -78, 73, -67, 61, -54, 46, -38, 31, -22, 13, -4 }, -+}; -+ -+DECLARE_ALIGNED(16, const int8_t, ff_hevc_rpi_epel_filters[7][4]) = { -+ { -2, 58, 10, -2}, -+ { -4, 54, 16, -2}, -+ { -6, 46, 28, -4}, -+ { -4, 36, 36, -4}, -+ { -4, 28, 46, -6}, -+ { -2, 16, 54, -4}, -+ { -2, 10, 58, -2}, -+}; -+ -+DECLARE_ALIGNED(16, const int8_t, ff_hevc_rpi_qpel_filters[3][16]) = { -+ { -1, 4,-10, 58, 17, -5, 1, 0, -1, 4,-10, 58, 17, -5, 1, 0}, -+ { -1, 4,-11, 40, 40,-11, 4, -1, -1, 4,-11, 40, 40,-11, 4, -1}, -+ { 0, 1, -5, 17, 58,-10, 4, -1, 0, 1, -5, 17, 58,-10, 4, -1} -+}; -+ -+#define BIT_DEPTH 8 -+#include "rpi_hevcdsp_template.c" -+#undef BIT_DEPTH -+ -+#define BIT_DEPTH 9 -+#include "rpi_hevcdsp_template.c" -+#undef BIT_DEPTH -+ -+#define BIT_DEPTH 10 -+#include "rpi_hevcdsp_template.c" -+#undef BIT_DEPTH -+ -+#define BIT_DEPTH 12 -+#include "rpi_hevcdsp_template.c" -+#undef BIT_DEPTH -+ -+static uint32_t hevc_deblocking_boundary_strengths(int pus, int dup, const HEVCRpiMvField *curr, const HEVCRpiMvField *neigh, -+ const int *curr_rpl0, const int *curr_rpl1, const int *neigh_rpl0, const int *neigh_rpl1, -+ int in_inc0, int in_inc1) -+{ -+ int shift = 32; -+ uint32_t bs = 0; -+ for (; pus > 0; pus--) { -+ int strength, out; -+ int curr_refL0 = curr_rpl0[curr->ref_idx[0]]; -+ int curr_refL1 = curr_rpl1[curr->ref_idx[1]]; -+ int nr_idx0 = neigh->ref_idx[0]; -+ int nr_idx1 = neigh->ref_idx[1]; -+ int neigh_refL0 = neigh_rpl0[nr_idx0]; -+ int neigh_refL1 = neigh_rpl1[nr_idx1]; -+ -+ av_assert0(nr_idx0 >= 0 && nr_idx0 <=31); -+ av_assert0(nr_idx1 >= 0 && nr_idx1 <=31); -+ -+#if 1 // This more directly matches the original implementation -+ if (curr->pred_flag == PF_BI && neigh->pred_flag == PF_BI) { -+ // same L0 and L1 -+ if (curr_refL0 == neigh_refL0 && -+ curr_refL0 == curr_refL1 && -+ neigh_refL0 == neigh_refL1) { -+ if ((FFABS(MV_X(neigh->xy[0]) - MV_X(curr->xy[0])) >= 4 || FFABS(MV_Y(neigh->xy[0]) - MV_Y(curr->xy[0])) >= 4 || -+ FFABS(MV_X(neigh->xy[1]) - MV_X(curr->xy[1])) >= 4 || FFABS(MV_Y(neigh->xy[1]) - MV_Y(curr->xy[1])) >= 4) && -+ (FFABS(MV_X(neigh->xy[1]) - MV_X(curr->xy[0])) >= 4 || FFABS(MV_Y(neigh->xy[1]) - MV_Y(curr->xy[0])) >= 4 || -+ FFABS(MV_X(neigh->xy[0]) - MV_X(curr->xy[1])) >= 4 || FFABS(MV_Y(neigh->xy[0]) - MV_Y(curr->xy[1])) >= 4)) -+ strength = 1; -+ else -+ strength = 0; -+ } else if (neigh_refL0 == curr_refL0 && -+ neigh_refL1 == curr_refL1) { -+ if (FFABS(MV_X(neigh->xy[0]) - MV_X(curr->xy[0])) >= 4 || FFABS(MV_Y(neigh->xy[0]) - MV_Y(curr->xy[0])) >= 4 || -+ FFABS(MV_X(neigh->xy[1]) - MV_X(curr->xy[1])) >= 4 || FFABS(MV_Y(neigh->xy[1]) - MV_Y(curr->xy[1])) >= 4) -+ strength = 1; -+ else -+ strength = 0; -+ } else if (neigh_refL1 == curr_refL0 && -+ neigh_refL0 == curr_refL1) { -+ if (FFABS(MV_X(neigh->xy[1]) - MV_X(curr->xy[0])) >= 4 || FFABS(MV_Y(neigh->xy[1]) - MV_Y(curr->xy[0])) >= 4 || -+ FFABS(MV_X(neigh->xy[0]) - MV_X(curr->xy[1])) >= 4 || FFABS(MV_Y(neigh->xy[0]) - MV_Y(curr->xy[1])) >= 4) -+ strength = 1; -+ else -+ strength = 0; -+ } else { -+ strength = 1; -+ } -+ } else if ((curr->pred_flag != PF_BI) && (neigh->pred_flag != PF_BI)){ // 1 MV -+ MvXY curr_mv0, neigh_mv0; -+ -+ if (curr->pred_flag & 1) { -+ curr_mv0 = curr->xy[0]; -+ } else { -+ curr_mv0 = curr->xy[1]; -+ curr_refL0 = curr_refL1; -+ } -+ -+ if (neigh->pred_flag & 1) { -+ neigh_mv0 = neigh->xy[0]; -+ } else { -+ neigh_mv0 = neigh->xy[1]; -+ neigh_refL0 = neigh_refL1; -+ } -+ -+ if (curr_refL0 == neigh_refL0) { -+ if (FFABS(MV_X(curr_mv0) - MV_X(neigh_mv0)) >= 4 || FFABS(MV_Y(curr_mv0) - MV_Y(neigh_mv0)) >= 4) -+ strength = 1; -+ else -+ strength = 0; -+ } else -+ strength = 1; -+ } else -+ strength = 1; -+#else // This has exactly the same effect, but is more suitable for vectorisation -+ MvXY curr_mv[2]; -+ MvXY neigh_mv[2]; -+ memcpy(curr_mv, curr->xy, sizeof curr_mv); -+ memcpy(neigh_mv, neigh->xy, sizeof neigh_mv); -+ -+ if (!(curr->pred_flag & 2)) { -+ curr_mv[1] = curr_mv[0]; -+ curr_refL1 = curr_refL0; -+ } -+ if (!(neigh->pred_flag & 2)) { -+ neigh_mv[1] = neigh_mv[0]; -+ neigh_refL1 = neigh_refL0; -+ } -+ if (!(curr->pred_flag & 1)) { -+ curr_mv[0] = curr_mv[1]; -+ curr_refL0 = curr_refL1; -+ } -+ if (!(neigh->pred_flag & 1)) { -+ neigh_mv[0] = neigh_mv[1]; -+ neigh_refL0 = neigh_refL1; -+ } -+ -+ strength = 1; -+ -+ strength &= (neigh_refL0 != curr_refL0) | (neigh_refL1 != curr_refL1) | -+ (FFABS(MV_X(neigh_mv[0]) - MV_X(curr_mv[0])) >= 4) | (FFABS(MV_Y(neigh_mv[0]) - MV_Y(curr_mv[0])) >= 4) | -+ (FFABS(MV_X(neigh_mv[1]) - MV_X(curr_mv[1])) >= 4) | (FFABS(MV_Y(neigh_mv[1]) - MV_Y(curr_mv[1])) >= 4); -+ -+ strength &= (neigh_refL1 != curr_refL0) | (neigh_refL0 != curr_refL1) | -+ (FFABS(MV_X(neigh_mv[1]) - MV_X(curr_mv[0])) >= 4) | (FFABS(MV_Y(neigh_mv[1]) - MV_Y(curr_mv[0])) >= 4) | -+ (FFABS(MV_X(neigh_mv[0]) - MV_X(curr_mv[1])) >= 4) | (FFABS(MV_Y(neigh_mv[0]) - MV_Y(curr_mv[1])) >= 4); -+ -+ strength |= (((curr->pred_flag + 1) ^ (neigh->pred_flag + 1)) >> 2); -+#endif -+ -+ curr += in_inc0 / sizeof (HEVCRpiMvField); -+ neigh += in_inc1 / sizeof (HEVCRpiMvField); -+ -+ for (out = dup; out > 0; out--) -+ { -+ bs = (bs >> 2) | (strength << 30); -+ shift -= 2; -+ } -+ } -+ return bs >> shift; -+} -+ -+ -+static void cpy_blk(uint8_t *dst, unsigned int stride_dst, const uint8_t *src, unsigned stride_src, unsigned int width, unsigned int height) -+{ -+ unsigned int i, j; -+ -+ if (((intptr_t)dst | (intptr_t)src | stride_dst | stride_src) & 15) { -+ for (i = 0; i < height; i++) { -+ for (j = 0; j < width; j+=8) -+ AV_COPY64U(dst+j, src+j); -+ dst += stride_dst; -+ src += stride_src; -+ } -+ } else { -+ for (i = 0; i < height; i++) { -+ for (j = 0; j < width; j+=16) -+ AV_COPY128(dst+j, src+j); -+ dst += stride_dst; -+ src += stride_src; -+ } -+ } -+} -+ -+ -+ -+void ff_hevc_rpi_dsp_init(HEVCDSPContext *hevcdsp, int bit_depth) -+{ -+#undef FUNC -+#define FUNC(a, depth) a ## _ ## depth -+ -+#undef PEL_FUNC -+#define PEL_FUNC(dst1, idx1, idx2, a, depth) \ -+ for(i = 0 ; i < 10 ; i++) \ -+{ \ -+ hevcdsp->dst1[i][idx1][idx2] = a ## _ ## depth; \ -+} -+ -+#undef EPEL_FUNCS -+#define EPEL_FUNCS(depth) \ -+ PEL_FUNC(put_hevc_epel, 0, 0, put_hevc_pel_pixels, depth); \ -+ PEL_FUNC(put_hevc_epel, 0, 1, put_hevc_epel_h, depth); \ -+ PEL_FUNC(put_hevc_epel, 1, 0, put_hevc_epel_v, depth); \ -+ PEL_FUNC(put_hevc_epel, 1, 1, put_hevc_epel_hv, depth) -+ -+#undef EPEL_UNI_FUNCS -+#define EPEL_UNI_FUNCS(depth) \ -+ PEL_FUNC(put_hevc_epel_uni, 0, 0, put_hevc_pel_uni_pixels, depth); \ -+ PEL_FUNC(put_hevc_epel_uni, 0, 1, put_hevc_epel_uni_h, depth); \ -+ PEL_FUNC(put_hevc_epel_uni, 1, 0, put_hevc_epel_uni_v, depth); \ -+ PEL_FUNC(put_hevc_epel_uni, 1, 1, put_hevc_epel_uni_hv, depth); \ -+ PEL_FUNC(put_hevc_epel_uni_w, 0, 0, put_hevc_pel_uni_w_pixels, depth); \ -+ PEL_FUNC(put_hevc_epel_uni_w, 0, 1, put_hevc_epel_uni_w_h, depth); \ -+ PEL_FUNC(put_hevc_epel_uni_w, 1, 0, put_hevc_epel_uni_w_v, depth); \ -+ PEL_FUNC(put_hevc_epel_uni_w, 1, 1, put_hevc_epel_uni_w_hv, depth) -+ -+#undef EPEL_BI_FUNCS -+#define EPEL_BI_FUNCS(depth) \ -+ PEL_FUNC(put_hevc_epel_bi, 0, 0, put_hevc_pel_bi_pixels, depth); \ -+ PEL_FUNC(put_hevc_epel_bi, 0, 1, put_hevc_epel_bi_h, depth); \ -+ PEL_FUNC(put_hevc_epel_bi, 1, 0, put_hevc_epel_bi_v, depth); \ -+ PEL_FUNC(put_hevc_epel_bi, 1, 1, put_hevc_epel_bi_hv, depth); \ -+ PEL_FUNC(put_hevc_epel_bi_w, 0, 0, put_hevc_pel_bi_w_pixels, depth); \ -+ PEL_FUNC(put_hevc_epel_bi_w, 0, 1, put_hevc_epel_bi_w_h, depth); \ -+ PEL_FUNC(put_hevc_epel_bi_w, 1, 0, put_hevc_epel_bi_w_v, depth); \ -+ PEL_FUNC(put_hevc_epel_bi_w, 1, 1, put_hevc_epel_bi_w_hv, depth) -+ -+#undef QPEL_FUNCS -+#define QPEL_FUNCS(depth) \ -+ PEL_FUNC(put_hevc_qpel, 0, 0, put_hevc_pel_pixels, depth); \ -+ PEL_FUNC(put_hevc_qpel, 0, 1, put_hevc_qpel_h, depth); \ -+ PEL_FUNC(put_hevc_qpel, 1, 0, put_hevc_qpel_v, depth); \ -+ PEL_FUNC(put_hevc_qpel, 1, 1, put_hevc_qpel_hv, depth) -+ -+#undef QPEL_UNI_FUNCS -+#define QPEL_UNI_FUNCS(depth) \ -+ PEL_FUNC(put_hevc_qpel_uni, 0, 0, put_hevc_pel_uni_pixels, depth); \ -+ PEL_FUNC(put_hevc_qpel_uni, 0, 1, put_hevc_qpel_uni_h, depth); \ -+ PEL_FUNC(put_hevc_qpel_uni, 1, 0, put_hevc_qpel_uni_v, depth); \ -+ PEL_FUNC(put_hevc_qpel_uni, 1, 1, put_hevc_qpel_uni_hv, depth); \ -+ PEL_FUNC(put_hevc_qpel_uni_w, 0, 0, put_hevc_pel_uni_w_pixels, depth); \ -+ PEL_FUNC(put_hevc_qpel_uni_w, 0, 1, put_hevc_qpel_uni_w_h, depth); \ -+ PEL_FUNC(put_hevc_qpel_uni_w, 1, 0, put_hevc_qpel_uni_w_v, depth); \ -+ PEL_FUNC(put_hevc_qpel_uni_w, 1, 1, put_hevc_qpel_uni_w_hv, depth) -+ -+#undef QPEL_BI_FUNCS -+#define QPEL_BI_FUNCS(depth) \ -+ PEL_FUNC(put_hevc_qpel_bi, 0, 0, put_hevc_pel_bi_pixels, depth); \ -+ PEL_FUNC(put_hevc_qpel_bi, 0, 1, put_hevc_qpel_bi_h, depth); \ -+ PEL_FUNC(put_hevc_qpel_bi, 1, 0, put_hevc_qpel_bi_v, depth); \ -+ PEL_FUNC(put_hevc_qpel_bi, 1, 1, put_hevc_qpel_bi_hv, depth); \ -+ PEL_FUNC(put_hevc_qpel_bi_w, 0, 0, put_hevc_pel_bi_w_pixels, depth); \ -+ PEL_FUNC(put_hevc_qpel_bi_w, 0, 1, put_hevc_qpel_bi_w_h, depth); \ -+ PEL_FUNC(put_hevc_qpel_bi_w, 1, 0, put_hevc_qpel_bi_w_v, depth); \ -+ PEL_FUNC(put_hevc_qpel_bi_w, 1, 1, put_hevc_qpel_bi_w_hv, depth) -+ -+#define SLICED_ADD_RESIDUAL(depth)\ -+ hevcdsp->add_residual_u[0] = FUNC(add_residual4x4_u, depth); \ -+ hevcdsp->add_residual_u[1] = FUNC(add_residual8x8_u, depth); \ -+ hevcdsp->add_residual_u[2] = FUNC(add_residual16x16_u, depth); \ -+ hevcdsp->add_residual_u[3] = FUNC(add_residual32x32_u, depth); \ -+ hevcdsp->add_residual_v[0] = FUNC(add_residual4x4_v, depth); \ -+ hevcdsp->add_residual_v[1] = FUNC(add_residual8x8_v, depth); \ -+ hevcdsp->add_residual_v[2] = FUNC(add_residual16x16_v, depth); \ -+ hevcdsp->add_residual_v[3] = FUNC(add_residual32x32_v, depth); \ -+ hevcdsp->add_residual_c[0] = FUNC(add_residual4x4_c, depth); \ -+ hevcdsp->add_residual_c[1] = FUNC(add_residual8x8_c, depth); \ -+ hevcdsp->add_residual_c[2] = FUNC(add_residual16x16_c, depth); \ -+ hevcdsp->add_residual_c[3] = FUNC(add_residual32x32_c, depth); \ -+ hevcdsp->add_residual_dc_c[0] = FUNC(add_residual4x4_dc_c, depth); \ -+ hevcdsp->add_residual_dc_c[1] = FUNC(add_residual8x8_dc_c, depth); \ -+ hevcdsp->add_residual_dc_c[2] = FUNC(add_residual16x16_dc_c, depth); \ -+ hevcdsp->add_residual_dc_c[3] = FUNC(add_residual32x32_dc_c, depth); \ -+ hevcdsp->put_pcm_c = FUNC(put_pcm_c, depth) -+#define SLICED_LOOP_FILTERS(depth)\ -+ hevcdsp->hevc_h_loop_filter_luma2 = FUNC(hevc_h_loop_filter_luma2, depth); \ -+ hevcdsp->hevc_v_loop_filter_luma2 = FUNC(hevc_v_loop_filter_luma2, depth); \ -+ hevcdsp->hevc_h_loop_filter_uv = FUNC(hevc_h_loop_filter_uv, depth); \ -+ hevcdsp->hevc_v_loop_filter_uv2 = FUNC(hevc_v_loop_filter_uv2, depth) -+#define SLICED_SAO(depth)\ -+ for (i = 0; i != SAO_FILTER_N; ++i) { \ -+ hevcdsp->sao_band_filter_c[i] = FUNC(sao_band_filter_c, depth); \ -+ hevcdsp->sao_edge_filter_c[i] = FUNC(sao_edge_filter_c, depth); \ -+ } \ -+ hevcdsp->sao_edge_restore_c[0] = FUNC(sao_edge_restore_c_0, depth); \ -+ hevcdsp->sao_edge_restore_c[1] = FUNC(sao_edge_restore_c_1, depth) -+ -+#define HEVC_DSP(depth) \ -+ hevcdsp->put_pcm = FUNC(put_pcm, depth); \ -+ hevcdsp->add_residual[0] = FUNC(add_residual4x4, depth); \ -+ hevcdsp->add_residual[1] = FUNC(add_residual8x8, depth); \ -+ hevcdsp->add_residual[2] = FUNC(add_residual16x16, depth); \ -+ hevcdsp->add_residual[3] = FUNC(add_residual32x32, depth); \ -+ hevcdsp->add_residual_dc[0] = FUNC(add_residual4x4_dc, depth); \ -+ hevcdsp->add_residual_dc[1] = FUNC(add_residual8x8_dc, depth); \ -+ hevcdsp->add_residual_dc[2] = FUNC(add_residual16x16_dc, depth); \ -+ hevcdsp->add_residual_dc[3] = FUNC(add_residual32x32_dc, depth); \ -+ SLICED_ADD_RESIDUAL(depth); \ -+ hevcdsp->dequant = FUNC(dequant, depth); \ -+ hevcdsp->transform_rdpcm = FUNC(transform_rdpcm, depth); \ -+ hevcdsp->transform_4x4_luma = FUNC(transform_4x4_luma, depth); \ -+ hevcdsp->idct[0] = FUNC(idct_4x4, depth); \ -+ hevcdsp->idct[1] = FUNC(idct_8x8, depth); \ -+ hevcdsp->idct[2] = FUNC(idct_16x16, depth); \ -+ hevcdsp->idct[3] = FUNC(idct_32x32, depth); \ -+ \ -+ hevcdsp->idct_dc[0] = FUNC(idct_4x4_dc, depth); \ -+ hevcdsp->idct_dc[1] = FUNC(idct_8x8_dc, depth); \ -+ hevcdsp->idct_dc[2] = FUNC(idct_16x16_dc, depth); \ -+ hevcdsp->idct_dc[3] = FUNC(idct_32x32_dc, depth); \ -+ \ -+ for (i = 0; i != SAO_FILTER_N; ++i) { \ -+ hevcdsp->sao_band_filter[i] = FUNC(sao_band_filter, depth); \ -+ hevcdsp->sao_edge_filter[i] = FUNC(sao_edge_filter, depth); \ -+ } \ -+ hevcdsp->sao_edge_restore[0] = FUNC(sao_edge_restore_0, depth); \ -+ hevcdsp->sao_edge_restore[1] = FUNC(sao_edge_restore_1, depth); \ -+ SLICED_SAO(depth); \ -+ \ -+ QPEL_FUNCS(depth); \ -+ QPEL_UNI_FUNCS(depth); \ -+ QPEL_BI_FUNCS(depth); \ -+ EPEL_FUNCS(depth); \ -+ EPEL_UNI_FUNCS(depth); \ -+ EPEL_BI_FUNCS(depth); \ -+ \ -+ SLICED_LOOP_FILTERS(depth); \ -+ hevcdsp->hevc_h_loop_filter_luma = FUNC(hevc_h_loop_filter_luma, depth); \ -+ hevcdsp->hevc_v_loop_filter_luma = FUNC(hevc_v_loop_filter_luma, depth); \ -+ hevcdsp->hevc_h_loop_filter_chroma = FUNC(hevc_h_loop_filter_chroma, depth); \ -+ hevcdsp->hevc_v_loop_filter_chroma = FUNC(hevc_v_loop_filter_chroma, depth); \ -+ hevcdsp->hevc_h_loop_filter_luma_c = FUNC(hevc_h_loop_filter_luma, depth); \ -+ hevcdsp->hevc_v_loop_filter_luma_c = FUNC(hevc_v_loop_filter_luma, depth); \ -+ hevcdsp->hevc_h_loop_filter_chroma_c = FUNC(hevc_h_loop_filter_chroma, depth); \ -+ hevcdsp->hevc_v_loop_filter_chroma_c = FUNC(hevc_v_loop_filter_chroma, depth) -+int i = 0; -+ -+ switch (bit_depth) { -+ case 9: -+ HEVC_DSP(9); -+ break; -+ case 10: -+ HEVC_DSP(10); -+ break; -+ case 12: -+ HEVC_DSP(12); -+ break; -+ default: -+ HEVC_DSP(8); -+ break; -+ } -+ -+ hevcdsp->hevc_deblocking_boundary_strengths = hevc_deblocking_boundary_strengths; -+ hevcdsp->cpy_blk = cpy_blk; -+ -+ if (ARCH_PPC) -+ ff_hevc_rpi_dsp_init_ppc(hevcdsp, bit_depth); -+ if (ARCH_X86) -+ ff_hevc_rpi_dsp_init_x86(hevcdsp, bit_depth); -+ if (ARCH_ARM) -+ ff_hevcdsp_rpi_init_arm(hevcdsp, bit_depth); -+ if (ARCH_MIPS) -+ ff_hevc_rpi_dsp_init_mips(hevcdsp, bit_depth); -+} ---- /dev/null -+++ b/libavcodec/rpi_hevcdsp.h -@@ -0,0 +1,177 @@ -+/* -+ * HEVC video decoder -+ * -+ * Copyright (C) 2012 - 2013 Guillaume Martres -+ * Copyright (C) 2013 - 2014 Pierre-Edouard Lepere -+ * -+ * -+ * This file is part of FFmpeg. -+ * -+ * FFmpeg is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * FFmpeg is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with FFmpeg; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+ */ -+ -+#ifndef AVCODEC_RPI_HEVCDSP_H -+#define AVCODEC_RPI_HEVCDSP_H -+ -+#include "hevc.h" -+#include "get_bits.h" -+ -+struct HEVCRpiMvField; -+ -+#define MAX_PB_SIZE 64 -+ -+#define RPI_HEVC_SAO_BUF_STRIDE 160 -+ -+ -+typedef struct RpiSAOParams { -+ uint8_t band_position[3]; ///< sao_band_position (Y,U,V) -+ uint8_t eo_class[3]; ///< sao_eo_class (Y,U=V) -+ uint8_t type_idx[3]; ///< sao_type_idx (Y,U=V) -+ -+ int16_t offset_val[3][5]; ///> 16; -+ const int dc_u = (dc << 16) >> 16; -+ -+ stride /= sizeof(pixel); -+ -+ for (y = 0; y < size; y++) { -+ for (x = 0; x < size * 2; x += 2) { -+ dst[x] = av_clip_pixel(dst[x] + dc_u); -+ dst[x + 1] = av_clip_pixel(dst[x + 1] + dc_v); -+ } -+ dst += stride; -+ } -+} -+ -+ -+static void FUNC(add_residual4x4)(uint8_t *_dst, int16_t *res, -+ ptrdiff_t stride) -+{ -+ FUNC(add_residual)(_dst, res, stride, 4); -+} -+ -+static void FUNC(add_residual8x8)(uint8_t *_dst, int16_t *res, -+ ptrdiff_t stride) -+{ -+ FUNC(add_residual)(_dst, res, stride, 8); -+} -+ -+static void FUNC(add_residual16x16)(uint8_t *_dst, int16_t *res, -+ ptrdiff_t stride) -+{ -+ FUNC(add_residual)(_dst, res, stride, 16); -+} -+ -+static void FUNC(add_residual32x32)(uint8_t *_dst, int16_t *res, -+ ptrdiff_t stride) -+{ -+ FUNC(add_residual)(_dst, res, stride, 32); -+} -+ -+static void FUNC(add_residual4x4_dc)(uint8_t *_dst, ptrdiff_t stride, int dc) -+{ -+ FUNC(add_residual_dc)(_dst, stride, dc, 4); -+} -+ -+static void FUNC(add_residual8x8_dc)(uint8_t *_dst, ptrdiff_t stride, int dc) -+{ -+ FUNC(add_residual_dc)(_dst, stride, dc, 8); -+} -+ -+static void FUNC(add_residual16x16_dc)(uint8_t *_dst, ptrdiff_t stride, int dc) -+{ -+ FUNC(add_residual_dc)(_dst, stride, dc, 16); -+} -+ -+static void FUNC(add_residual32x32_dc)(uint8_t *_dst, ptrdiff_t stride, int dc) -+{ -+ FUNC(add_residual_dc)(_dst, stride, dc, 32); -+} -+ -+// -- U -- (plaited) -+ -+static void FUNC(add_residual4x4_u)(uint8_t *_dst, const int16_t * res, -+ ptrdiff_t stride, int dc_u) -+{ -+ FUNC(add_residual_u)(_dst, res, stride, dc_u, 4); -+} -+ -+static void FUNC(add_residual8x8_u)(uint8_t *_dst, const int16_t * res, -+ ptrdiff_t stride, int dc_u) -+{ -+ FUNC(add_residual_u)(_dst, res, stride, dc_u, 8); -+} -+ -+static void FUNC(add_residual16x16_u)(uint8_t *_dst, const int16_t * res, -+ ptrdiff_t stride, int dc_u) -+{ -+ FUNC(add_residual_u)(_dst, res, stride, dc_u, 16); -+} -+ -+static void FUNC(add_residual32x32_u)(uint8_t *_dst, const int16_t * res, -+ ptrdiff_t stride, int dc_u) -+{ -+ // Should never occur for 420, which is all that sand supports -+ av_assert0(0); -+} -+ -+// -- V -- (plaited) -+ -+static void FUNC(add_residual4x4_v)(uint8_t *_dst, const int16_t * res, -+ ptrdiff_t stride, int dc_v) -+{ -+ FUNC(add_residual_v)(_dst, res, stride, dc_v, 4); -+} -+ -+static void FUNC(add_residual8x8_v)(uint8_t *_dst, const int16_t * res, -+ ptrdiff_t stride, int dc_v) -+{ -+ FUNC(add_residual_v)(_dst, res, stride, dc_v, 8); -+} -+ -+static void FUNC(add_residual16x16_v)(uint8_t *_dst, const int16_t * res, -+ ptrdiff_t stride, int dc_v) -+{ -+ FUNC(add_residual_v)(_dst, res, stride, dc_v, 16); -+} -+ -+static void FUNC(add_residual32x32_v)(uint8_t *_dst, const int16_t * res, -+ ptrdiff_t stride, int dc_v) -+{ -+ // Should never occur for 420, which is all that sand supports -+ av_assert0(0); -+} -+ -+// -- C -- (plaited - both U & V) -+ -+static void FUNC(add_residual4x4_c)(uint8_t *_dst, const int16_t * res, -+ ptrdiff_t stride) -+{ -+ FUNC(add_residual_c)(_dst, res, stride, 4); -+} -+ -+static void FUNC(add_residual8x8_c)(uint8_t *_dst, const int16_t * res, -+ ptrdiff_t stride) -+{ -+ FUNC(add_residual_c)(_dst, res, stride, 8); -+} -+ -+static void FUNC(add_residual16x16_c)(uint8_t *_dst, const int16_t * res, -+ ptrdiff_t stride) -+{ -+ FUNC(add_residual_c)(_dst, res, stride, 16); -+} -+ -+static void FUNC(add_residual32x32_c)(uint8_t *_dst, const int16_t * res, -+ ptrdiff_t stride) -+{ -+ // Should never occur for 420, which is all that sand supports -+ av_assert0(0); -+} -+ -+static void FUNC(add_residual4x4_dc_c)(uint8_t *_dst, ptrdiff_t stride, int32_t dc) -+{ -+ FUNC(add_residual_dc_c)(_dst, stride, dc, 4); -+} -+ -+static void FUNC(add_residual8x8_dc_c)(uint8_t *_dst, ptrdiff_t stride, int32_t dc) -+{ -+ FUNC(add_residual_dc_c)(_dst, stride, dc, 8); -+} -+ -+static void FUNC(add_residual16x16_dc_c)(uint8_t *_dst, ptrdiff_t stride, int32_t dc) -+{ -+ FUNC(add_residual_dc_c)(_dst, stride, dc, 16); -+} -+ -+static void FUNC(add_residual32x32_dc_c)(uint8_t *_dst, ptrdiff_t stride, int32_t dc) -+{ -+ // Should never occur for 420, which is all that sand supports -+ av_assert0(0); -+} -+ -+ -+static void FUNC(transform_rdpcm)(int16_t *_coeffs, int16_t log2_size, int mode) -+{ -+ int16_t *coeffs = (int16_t *) _coeffs; -+ int x, y; -+ int size = 1 << log2_size; -+ -+ if (mode) { -+ coeffs += size; -+ for (y = 0; y < size - 1; y++) { -+ for (x = 0; x < size; x++) -+ coeffs[x] += coeffs[x - size]; -+ coeffs += size; -+ } -+ } else { -+ for (y = 0; y < size; y++) { -+ for (x = 1; x < size; x++) -+ coeffs[x] += coeffs[x - 1]; -+ coeffs += size; -+ } -+ } -+} -+ -+static void FUNC(dequant)(int16_t *coeffs, int16_t log2_size) -+{ -+ int shift = 15 - BIT_DEPTH - log2_size; -+ int x, y; -+ int size = 1 << log2_size; -+ -+ if (shift > 0) { -+ int offset = 1 << (shift - 1); -+ for (y = 0; y < size; y++) { -+ for (x = 0; x < size; x++) { -+ *coeffs = (*coeffs + offset) >> shift; -+ coeffs++; -+ } -+ } -+ } else { -+ for (y = 0; y < size; y++) { -+ for (x = 0; x < size; x++) { -+ *coeffs = *coeffs << -shift; -+ coeffs++; -+ } -+ } -+ } -+} -+ -+#define SET(dst, x) (dst) = (x) -+#define SCALE(dst, x) (dst) = av_clip_int16(((x) + add) >> shift) -+ -+#define TR_4x4_LUMA(dst, src, step, assign) \ -+ do { \ -+ int c0 = src[0 * step] + src[2 * step]; \ -+ int c1 = src[2 * step] + src[3 * step]; \ -+ int c2 = src[0 * step] - src[3 * step]; \ -+ int c3 = 74 * src[1 * step]; \ -+ \ -+ assign(dst[2 * step], 74 * (src[0 * step] - \ -+ src[2 * step] + \ -+ src[3 * step])); \ -+ assign(dst[0 * step], 29 * c0 + 55 * c1 + c3); \ -+ assign(dst[1 * step], 55 * c2 - 29 * c1 + c3); \ -+ assign(dst[3 * step], 55 * c0 + 29 * c2 - c3); \ -+ } while (0) -+ -+static void FUNC(transform_4x4_luma)(int16_t *coeffs) -+{ -+ int i; -+ int shift = 7; -+ int add = 1 << (shift - 1); -+ int16_t *src = coeffs; -+ -+ for (i = 0; i < 4; i++) { -+ TR_4x4_LUMA(src, src, 4, SCALE); -+ src++; -+ } -+ -+ shift = 20 - BIT_DEPTH; -+ add = 1 << (shift - 1); -+ for (i = 0; i < 4; i++) { -+ TR_4x4_LUMA(coeffs, coeffs, 1, SCALE); -+ coeffs += 4; -+ } -+} -+ -+#undef TR_4x4_LUMA -+ -+#define TR_4(dst, src, dstep, sstep, assign, end) \ -+ do { \ -+ const int e0 = 64 * src[0 * sstep] + 64 * src[2 * sstep]; \ -+ const int e1 = 64 * src[0 * sstep] - 64 * src[2 * sstep]; \ -+ const int o0 = 83 * src[1 * sstep] + 36 * src[3 * sstep]; \ -+ const int o1 = 36 * src[1 * sstep] - 83 * src[3 * sstep]; \ -+ \ -+ assign(dst[0 * dstep], e0 + o0); \ -+ assign(dst[1 * dstep], e1 + o1); \ -+ assign(dst[2 * dstep], e1 - o1); \ -+ assign(dst[3 * dstep], e0 - o0); \ -+ } while (0) -+ -+#define TR_8(dst, src, dstep, sstep, assign, end) \ -+ do { \ -+ int i, j; \ -+ int e_8[4]; \ -+ int o_8[4] = { 0 }; \ -+ for (i = 0; i < 4; i++) \ -+ for (j = 1; j < end; j += 2) \ -+ o_8[i] += transform[4 * j][i] * src[j * sstep]; \ -+ TR_4(e_8, src, 1, 2 * sstep, SET, 4); \ -+ \ -+ for (i = 0; i < 4; i++) { \ -+ assign(dst[i * dstep], e_8[i] + o_8[i]); \ -+ assign(dst[(7 - i) * dstep], e_8[i] - o_8[i]); \ -+ } \ -+ } while (0) -+ -+#define TR_16(dst, src, dstep, sstep, assign, end) \ -+ do { \ -+ int i, j; \ -+ int e_16[8]; \ -+ int o_16[8] = { 0 }; \ -+ for (i = 0; i < 8; i++) \ -+ for (j = 1; j < end; j += 2) \ -+ o_16[i] += transform[2 * j][i] * src[j * sstep]; \ -+ TR_8(e_16, src, 1, 2 * sstep, SET, 8); \ -+ \ -+ for (i = 0; i < 8; i++) { \ -+ assign(dst[i * dstep], e_16[i] + o_16[i]); \ -+ assign(dst[(15 - i) * dstep], e_16[i] - o_16[i]); \ -+ } \ -+ } while (0) -+ -+#define TR_32(dst, src, dstep, sstep, assign, end) \ -+ do { \ -+ int i, j; \ -+ int e_32[16]; \ -+ int o_32[16] = { 0 }; \ -+ for (i = 0; i < 16; i++) \ -+ for (j = 1; j < end; j += 2) \ -+ o_32[i] += transform[j][i] * src[j * sstep]; \ -+ TR_16(e_32, src, 1, 2 * sstep, SET, end / 2); \ -+ \ -+ for (i = 0; i < 16; i++) { \ -+ assign(dst[i * dstep], e_32[i] + o_32[i]); \ -+ assign(dst[(31 - i) * dstep], e_32[i] - o_32[i]); \ -+ } \ -+ } while (0) -+ -+#define IDCT_VAR4(H) \ -+ int limit2 = FFMIN(col_limit + 4, H) -+#define IDCT_VAR8(H) \ -+ int limit = FFMIN(col_limit, H); \ -+ int limit2 = FFMIN(col_limit + 4, H) -+#define IDCT_VAR16(H) IDCT_VAR8(H) -+#define IDCT_VAR32(H) IDCT_VAR8(H) -+ -+#define IDCT(H) \ -+static void FUNC(idct_ ## H ## x ## H )(int16_t *coeffs, \ -+ int col_limit) \ -+{ \ -+ int i; \ -+ int shift = 7; \ -+ int add = 1 << (shift - 1); \ -+ int16_t *src = coeffs; \ -+ IDCT_VAR ## H(H); \ -+ \ -+ for (i = 0; i < H; i++) { \ -+ TR_ ## H(src, src, H, H, SCALE, limit2); \ -+ if (limit2 < H && i%4 == 0 && !!i) \ -+ limit2 -= 4; \ -+ src++; \ -+ } \ -+ \ -+ shift = 20 - BIT_DEPTH; \ -+ add = 1 << (shift - 1); \ -+ for (i = 0; i < H; i++) { \ -+ TR_ ## H(coeffs, coeffs, 1, 1, SCALE, limit); \ -+ coeffs += H; \ -+ } \ -+} -+ -+#define IDCT_DC(H) \ -+static void FUNC(idct_ ## H ## x ## H ## _dc)(int16_t *coeffs) \ -+{ \ -+ int i, j; \ -+ int shift = 14 - BIT_DEPTH; \ -+ int add = 1 << (shift - 1); \ -+ int coeff = (((coeffs[0] + 1) >> 1) + add) >> shift; \ -+ \ -+ for (j = 0; j < H; j++) { \ -+ for (i = 0; i < H; i++) { \ -+ coeffs[i + j * H] = coeff; \ -+ } \ -+ } \ -+} -+ -+IDCT( 4) -+IDCT( 8) -+IDCT(16) -+IDCT(32) -+ -+IDCT_DC( 4) -+IDCT_DC( 8) -+IDCT_DC(16) -+IDCT_DC(32) -+ -+#undef TR_4 -+#undef TR_8 -+#undef TR_16 -+#undef TR_32 -+ -+#undef SET -+#undef SCALE -+ -+static void FUNC(sao_band_filter)(uint8_t *_dst, uint8_t *_src, -+ ptrdiff_t stride_dst, ptrdiff_t stride_src, -+ int16_t *sao_offset_val, int sao_left_class, -+ int width, int height) -+{ -+ pixel *dst = (pixel *)_dst; -+ pixel *src = (pixel *)_src; -+ int offset_table[32] = { 0 }; -+ int k, y, x; -+ int shift = BIT_DEPTH - 5; -+ -+ stride_dst /= sizeof(pixel); -+ stride_src /= sizeof(pixel); -+ -+ for (k = 0; k < 4; k++) -+ offset_table[(k + sao_left_class) & 31] = sao_offset_val[k + 1]; -+ for (y = 0; y < height; y++) { -+ for (x = 0; x < width; x++) -+ dst[x] = av_clip_pixel(src[x] + offset_table[src[x] >> shift]); -+ dst += stride_dst; -+ src += stride_src; -+ } -+} -+ -+#define CMP(a, b) (((a) > (b)) - ((a) < (b))) -+ -+static void FUNC(sao_edge_filter)(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst, int16_t *sao_offset_val, -+ int eo, int width, int height) { -+ -+ static const uint8_t edge_idx[] = { 1, 2, 0, 3, 4 }; -+ static const int8_t pos[4][2][2] = { -+ { { -1, 0 }, { 1, 0 } }, // horizontal -+ { { 0, -1 }, { 0, 1 } }, // vertical -+ { { -1, -1 }, { 1, 1 } }, // 45 degree -+ { { 1, -1 }, { -1, 1 } }, // 135 degree -+ }; -+ pixel *dst = (pixel *)_dst; -+ pixel *src = (pixel *)_src; -+ int a_stride, b_stride; -+ int x, y; -+ const ptrdiff_t stride_src = RPI_HEVC_SAO_BUF_STRIDE / sizeof(pixel); -+ stride_dst /= sizeof(pixel); -+ -+ a_stride = pos[eo][0][0] + pos[eo][0][1] * stride_src; -+ b_stride = pos[eo][1][0] + pos[eo][1][1] * stride_src; -+ for (y = 0; y < height; y++) { -+ for (x = 0; x < width; x++) { -+ int diff0 = CMP(src[x], src[x + a_stride]); -+ int diff1 = CMP(src[x], src[x + b_stride]); -+ int offset_val = edge_idx[2 + diff0 + diff1]; -+ dst[x] = av_clip_pixel(src[x] + sao_offset_val[offset_val]); -+ } -+ src += stride_src; -+ dst += stride_dst; -+ } -+} -+ -+ -+#if BIT_DEPTH == 10 -+// We need a 32 bit variation for the _c restores so hijack bit depth 10 -+#undef pixel -+#undef BIT_DEPTH -+#define pixel uint32_t -+#define BIT_DEPTH 32 -+// All 16 bit variations are the same -+#define sao_edge_restore_0_10 sao_edge_restore_0_9 -+#define sao_edge_restore_1_10 sao_edge_restore_1_9 -+#define sao_edge_restore_0_11 sao_edge_restore_0_9 -+#define sao_edge_restore_1_11 sao_edge_restore_1_9 -+#define sao_edge_restore_0_12 sao_edge_restore_0_9 -+#define sao_edge_restore_1_12 sao_edge_restore_1_9 -+#define sao_edge_restore_0_13 sao_edge_restore_0_9 -+#define sao_edge_restore_1_13 sao_edge_restore_1_9 -+#define sao_edge_restore_0_14 sao_edge_restore_0_9 -+#define sao_edge_restore_1_14 sao_edge_restore_1_9 -+#define sao_edge_restore_0_15 sao_edge_restore_0_9 -+#define sao_edge_restore_1_15 sao_edge_restore_1_9 -+#define sao_edge_restore_0_16 sao_edge_restore_0_9 -+#define sao_edge_restore_1_16 sao_edge_restore_1_9 -+#endif -+#if BIT_DEPTH <= 9 || BIT_DEPTH == 32 -+static void FUNC(sao_edge_restore_0)(uint8_t *_dst, uint8_t *_src, -+ ptrdiff_t stride_dst, ptrdiff_t stride_src, RpiSAOParams *sao, -+ int *borders, int _width, int _height, -+ int c_idx, uint8_t *vert_edge, -+ uint8_t *horiz_edge, uint8_t *diag_edge) -+{ -+ int x, y; -+ pixel *dst = (pixel *)_dst; -+ pixel *src = (pixel *)_src; -+ int sao_eo_class = sao->eo_class[c_idx]; -+ int init_x = 0, width = _width, height = _height; -+ -+ stride_dst /= sizeof(pixel); -+ stride_src /= sizeof(pixel); -+ -+ if (sao_eo_class != SAO_EO_VERT) { -+ if (borders[0]) { -+ for (y = 0; y < height; y++) { -+ dst[y * stride_dst] = src[y * stride_src]; -+ } -+ init_x = 1; -+ } -+ if (borders[2]) { -+ int offset = width - 1; -+ for (x = 0; x < height; x++) { -+ dst[x * stride_dst + offset] = src[x * stride_src + offset]; -+ } -+ width--; -+ } -+ } -+ if (sao_eo_class != SAO_EO_HORIZ) { -+ if (borders[1]) { -+ for (x = init_x; x < width; x++) -+ dst[x] = src[x]; -+ } -+ if (borders[3]) { -+ ptrdiff_t y_stride_dst = stride_dst * (height - 1); -+ ptrdiff_t y_stride_src = stride_src * (height - 1); -+ for (x = init_x; x < width; x++) -+ dst[x + y_stride_dst] = src[x + y_stride_src]; -+ height--; -+ } -+ } -+} -+ -+static void FUNC(sao_edge_restore_1)(uint8_t *_dst, uint8_t *_src, -+ ptrdiff_t stride_dst, ptrdiff_t stride_src, RpiSAOParams *sao, -+ int *borders, int _width, int _height, -+ int c_idx, uint8_t *vert_edge, -+ uint8_t *horiz_edge, uint8_t *diag_edge) -+{ -+ int x, y; -+ pixel *dst = (pixel *)_dst; -+ pixel *src = (pixel *)_src; -+ int sao_eo_class = sao->eo_class[c_idx]; -+ int init_x = 0, init_y = 0, width = _width, height = _height; -+ -+ stride_dst /= sizeof(pixel); -+ stride_src /= sizeof(pixel); -+ -+ if (sao_eo_class != SAO_EO_VERT) { -+ if (borders[0]) { -+ for (y = 0; y < height; y++) { -+ dst[y * stride_dst] = src[y * stride_src]; -+ } -+ init_x = 1; -+ } -+ if (borders[2]) { -+ int offset = width - 1; -+ for (x = 0; x < height; x++) { -+ dst[x * stride_dst + offset] = src[x * stride_src + offset]; -+ } -+ width--; -+ } -+ } -+ if (sao_eo_class != SAO_EO_HORIZ) { -+ if (borders[1]) { -+ for (x = init_x; x < width; x++) -+ dst[x] = src[x]; -+ init_y = 1; -+ } -+ if (borders[3]) { -+ ptrdiff_t y_stride_dst = stride_dst * (height - 1); -+ ptrdiff_t y_stride_src = stride_src * (height - 1); -+ for (x = init_x; x < width; x++) -+ dst[x + y_stride_dst] = src[x + y_stride_src]; -+ height--; -+ } -+ } -+ -+ { -+ int save_upper_left = !diag_edge[0] && sao_eo_class == SAO_EO_135D && !borders[0] && !borders[1]; -+ int save_upper_right = !diag_edge[1] && sao_eo_class == SAO_EO_45D && !borders[1] && !borders[2]; -+ int save_lower_right = !diag_edge[2] && sao_eo_class == SAO_EO_135D && !borders[2] && !borders[3]; -+ int save_lower_left = !diag_edge[3] && sao_eo_class == SAO_EO_45D && !borders[0] && !borders[3]; -+ -+ // Restore pixels that can't be modified -+ if(vert_edge[0] && sao_eo_class != SAO_EO_VERT) { -+ for(y = init_y+save_upper_left; y< height-save_lower_left; y++) -+ dst[y*stride_dst] = src[y*stride_src]; -+ } -+ if(vert_edge[1] && sao_eo_class != SAO_EO_VERT) { -+ for(y = init_y+save_upper_right; y< height-save_lower_right; y++) -+ dst[y*stride_dst+width-1] = src[y*stride_src+width-1]; -+ } -+ -+ if(horiz_edge[0] && sao_eo_class != SAO_EO_HORIZ) { -+ for(x = init_x+save_upper_left; x < width-save_upper_right; x++) -+ dst[x] = src[x]; -+ } -+ if(horiz_edge[1] && sao_eo_class != SAO_EO_HORIZ) { -+ for(x = init_x+save_lower_left; x < width-save_lower_right; x++) -+ dst[(height-1)*stride_dst+x] = src[(height-1)*stride_src+x]; -+ } -+ if(diag_edge[0] && sao_eo_class == SAO_EO_135D) -+ dst[0] = src[0]; -+ if(diag_edge[1] && sao_eo_class == SAO_EO_45D) -+ dst[width-1] = src[width-1]; -+ if(diag_edge[2] && sao_eo_class == SAO_EO_135D) -+ dst[stride_dst*(height-1)+width-1] = src[stride_src*(height-1)+width-1]; -+ if(diag_edge[3] && sao_eo_class == SAO_EO_45D) -+ dst[stride_dst*(height-1)] = src[stride_src*(height-1)]; -+ -+ } -+} -+#endif -+#if BIT_DEPTH == 32 -+#undef BIT_DEPTH -+#undef pixel -+#define BIT_DEPTH 10 -+#define pixel uint16_t -+#endif -+ -+// --- Plaited chroma versions -+ -+static void FUNC(sao_band_filter_c)(uint8_t *_dst, const uint8_t *_src, -+ ptrdiff_t stride_dst, ptrdiff_t stride_src, -+ const int16_t *sao_offset_val_u, int sao_left_class_u, -+ const int16_t *sao_offset_val_v, int sao_left_class_v, -+ int width, int height) -+{ -+ pixel *dst = (pixel *)_dst; -+ pixel *src = (pixel *)_src; -+ int offset_table_u[32] = { 0 }; -+ int offset_table_v[32] = { 0 }; -+ int k, y, x; -+ int shift = BIT_DEPTH - 5; -+ -+ stride_dst /= sizeof(pixel); -+ stride_src /= sizeof(pixel); -+ width *= 2; -+ -+ for (k = 0; k < 4; k++) -+ { -+ offset_table_u[(k + sao_left_class_u) & 31] = sao_offset_val_u[k + 1]; -+ offset_table_v[(k + sao_left_class_v) & 31] = sao_offset_val_v[k + 1]; -+ } -+ for (y = 0; y < height; y++) { -+ for (x = 0; x < width; x += 2) -+ { -+// printf("dst=%p, src=%p, x=%d, shift=%d\n", dst, src, x, shift); -+// printf("offsets=%x,%x\n", src[x + 0], src[x + 1]); -+ // *** & 31 shouldn't be wanted but just now we generate broken input that -+ // crashes us in 10-bit world -+ dst[x + 0] = av_clip_pixel(src[x + 0] + offset_table_u[(src[x + 0] >> shift) & 31]); -+ dst[x + 1] = av_clip_pixel(src[x + 1] + offset_table_v[(src[x + 1] >> shift) & 31]); -+ } -+ dst += stride_dst; -+ src += stride_src; -+ } -+} -+ -+static void FUNC(sao_edge_filter_c)(uint8_t *_dst, const uint8_t *_src, ptrdiff_t stride_dst, -+ const int16_t *sao_offset_val_u, const int16_t *sao_offset_val_v, -+ int eo, int width, int height) { -+ -+ static const uint8_t edge_idx[] = { 1, 2, 0, 3, 4 }; -+ static const int8_t pos[4][2][2] = { -+ { { -1, 0 }, { 1, 0 } }, // horizontal -+ { { 0, -1 }, { 0, 1 } }, // vertical -+ { { -1, -1 }, { 1, 1 } }, // 45 degree -+ { { 1, -1 }, { -1, 1 } }, // 135 degree -+ }; -+ pixel *dst = (pixel *)_dst; -+ pixel *src = (pixel *)_src; -+ int a_stride, b_stride; -+ int x, y; -+ const ptrdiff_t stride_src = RPI_HEVC_SAO_BUF_STRIDE / sizeof(pixel); -+ -+ stride_dst /= sizeof(pixel); -+ width *= 2; -+ -+ av_assert0(width <= 64); -+ -+ a_stride = pos[eo][0][0] * 2 + pos[eo][0][1] * stride_src; -+ b_stride = pos[eo][1][0] * 2 + pos[eo][1][1] * stride_src; -+ for (y = 0; y < height; y++) { -+ for (x = 0; x < width; x += 2) { -+ int diff0u = CMP(src[x], src[x + a_stride]); -+ int diff1u = CMP(src[x], src[x + b_stride]); -+ int offset_valu = edge_idx[2 + diff0u + diff1u]; -+ int diff0v = CMP(src[x+1], src[x+1 + a_stride]); -+ int diff1v = CMP(src[x+1], src[x+1 + b_stride]); -+ int offset_valv = edge_idx[2 + diff0v + diff1v]; -+ dst[x] = av_clip_pixel(src[x] + sao_offset_val_u[offset_valu]); -+ dst[x+1] = av_clip_pixel(src[x+1] + sao_offset_val_v[offset_valv]); -+ } -+ src += stride_src; -+ dst += stride_dst; -+ } -+} -+ -+// Do once -+#if BIT_DEPTH == 8 -+// Any old 2 byte 'normal' restore will work for these -+#define sao_edge_restore_c_0_8 sao_edge_restore_0_16 -+#define sao_edge_restore_c_1_8 sao_edge_restore_1_16 -+// We need 32 bit for 9 bit+ -+#define sao_edge_restore_c_0_9 sao_edge_restore_0_32 -+#define sao_edge_restore_c_1_9 sao_edge_restore_1_32 -+#define sao_edge_restore_c_0_10 sao_edge_restore_0_32 -+#define sao_edge_restore_c_1_10 sao_edge_restore_1_32 -+#define sao_edge_restore_c_0_11 sao_edge_restore_0_32 -+#define sao_edge_restore_c_1_11 sao_edge_restore_1_32 -+#define sao_edge_restore_c_0_12 sao_edge_restore_0_32 -+#define sao_edge_restore_c_1_12 sao_edge_restore_1_32 -+#define sao_edge_restore_c_0_13 sao_edge_restore_0_32 -+#define sao_edge_restore_c_1_13 sao_edge_restore_1_32 -+#define sao_edge_restore_c_0_14 sao_edge_restore_0_32 -+#define sao_edge_restore_c_1_14 sao_edge_restore_1_32 -+#define sao_edge_restore_c_0_15 sao_edge_restore_0_32 -+#define sao_edge_restore_c_1_15 sao_edge_restore_1_32 -+#define sao_edge_restore_c_0_16 sao_edge_restore_0_32 -+#define sao_edge_restore_c_1_16 sao_edge_restore_1_32 -+#endif -+ -+#undef CMP -+ -+//////////////////////////////////////////////////////////////////////////////// -+// -+//////////////////////////////////////////////////////////////////////////////// -+static void FUNC(put_hevc_pel_pixels)(int16_t *dst, -+ uint8_t *_src, ptrdiff_t _srcstride, -+ int height, intptr_t mx, intptr_t my, int width) -+{ -+ int x, y; -+ pixel *src = (pixel *)_src; -+ ptrdiff_t srcstride = _srcstride / sizeof(pixel); -+ -+ for (y = 0; y < height; y++) { -+ for (x = 0; x < width; x++) -+ dst[x] = src[x] << (14 - BIT_DEPTH); -+ src += srcstride; -+ dst += MAX_PB_SIZE; -+ } -+} -+ -+static void FUNC(put_hevc_pel_uni_pixels)(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride, -+ int height, intptr_t mx, intptr_t my, int width) -+{ -+ int y; -+ pixel *src = (pixel *)_src; -+ ptrdiff_t srcstride = _srcstride / sizeof(pixel); -+ pixel *dst = (pixel *)_dst; -+ ptrdiff_t dststride = _dststride / sizeof(pixel); -+ -+ for (y = 0; y < height; y++) { -+ memcpy(dst, src, width * sizeof(pixel)); -+ src += srcstride; -+ dst += dststride; -+ } -+} -+ -+static void FUNC(put_hevc_pel_bi_pixels)(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride, -+ int16_t *src2, -+ int height, intptr_t mx, intptr_t my, int width) -+{ -+ int x, y; -+ pixel *src = (pixel *)_src; -+ ptrdiff_t srcstride = _srcstride / sizeof(pixel); -+ pixel *dst = (pixel *)_dst; -+ ptrdiff_t dststride = _dststride / sizeof(pixel); -+ -+ int shift = 14 + 1 - BIT_DEPTH; -+#if BIT_DEPTH < 14 -+ int offset = 1 << (shift - 1); -+#else -+ int offset = 0; -+#endif -+ -+ for (y = 0; y < height; y++) { -+ for (x = 0; x < width; x++) -+ dst[x] = av_clip_pixel(((src[x] << (14 - BIT_DEPTH)) + src2[x] + offset) >> shift); -+ src += srcstride; -+ dst += dststride; -+ src2 += MAX_PB_SIZE; -+ } -+} -+ -+static void FUNC(put_hevc_pel_uni_w_pixels)(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride, -+ int height, int denom, int wx, int ox, intptr_t mx, intptr_t my, int width) -+{ -+ int x, y; -+ pixel *src = (pixel *)_src; -+ ptrdiff_t srcstride = _srcstride / sizeof(pixel); -+ pixel *dst = (pixel *)_dst; -+ ptrdiff_t dststride = _dststride / sizeof(pixel); -+ int shift = denom + 14 - BIT_DEPTH; -+#if BIT_DEPTH < 14 -+ int offset = 1 << (shift - 1); -+#else -+ int offset = 0; -+#endif -+ -+ ox = ox * (1 << (BIT_DEPTH - 8)); -+ for (y = 0; y < height; y++) { -+ for (x = 0; x < width; x++) -+ dst[x] = av_clip_pixel((((src[x] << (14 - BIT_DEPTH)) * wx + offset) >> shift) + ox); -+ src += srcstride; -+ dst += dststride; -+ } -+} -+ -+static void FUNC(put_hevc_pel_bi_w_pixels)(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride, -+ int16_t *src2, -+ int height, int denom, int wx0, int wx1, -+ int ox0, int ox1, intptr_t mx, intptr_t my, int width) -+{ -+ int x, y; -+ pixel *src = (pixel *)_src; -+ ptrdiff_t srcstride = _srcstride / sizeof(pixel); -+ pixel *dst = (pixel *)_dst; -+ ptrdiff_t dststride = _dststride / sizeof(pixel); -+ -+ int shift = 14 + 1 - BIT_DEPTH; -+ int log2Wd = denom + shift - 1; -+ -+ ox0 = ox0 * (1 << (BIT_DEPTH - 8)); -+ ox1 = ox1 * (1 << (BIT_DEPTH - 8)); -+ for (y = 0; y < height; y++) { -+ for (x = 0; x < width; x++) { -+ dst[x] = av_clip_pixel(( (src[x] << (14 - BIT_DEPTH)) * wx1 + src2[x] * wx0 + (ox0 + ox1 + 1) * (1 << log2Wd)) >> (log2Wd + 1)); -+ } -+ src += srcstride; -+ dst += dststride; -+ src2 += MAX_PB_SIZE; -+ } -+} -+ -+//////////////////////////////////////////////////////////////////////////////// -+// -+//////////////////////////////////////////////////////////////////////////////// -+#define QPEL_FILTER(src, stride) \ -+ (filter[0] * src[x - 3 * stride] + \ -+ filter[1] * src[x - 2 * stride] + \ -+ filter[2] * src[x - stride] + \ -+ filter[3] * src[x ] + \ -+ filter[4] * src[x + stride] + \ -+ filter[5] * src[x + 2 * stride] + \ -+ filter[6] * src[x + 3 * stride] + \ -+ filter[7] * src[x + 4 * stride]) -+ -+static void FUNC(put_hevc_qpel_h)(int16_t *dst, -+ uint8_t *_src, ptrdiff_t _srcstride, -+ int height, intptr_t mx, intptr_t my, int width) -+{ -+ int x, y; -+ pixel *src = (pixel*)_src; -+ ptrdiff_t srcstride = _srcstride / sizeof(pixel); -+ const int8_t *filter = ff_hevc_rpi_qpel_filters[mx - 1]; -+ for (y = 0; y < height; y++) { -+ for (x = 0; x < width; x++) -+ dst[x] = QPEL_FILTER(src, 1) >> (BIT_DEPTH - 8); -+ src += srcstride; -+ dst += MAX_PB_SIZE; -+ } -+} -+ -+static void FUNC(put_hevc_qpel_v)(int16_t *dst, -+ uint8_t *_src, ptrdiff_t _srcstride, -+ int height, intptr_t mx, intptr_t my, int width) -+{ -+ int x, y; -+ pixel *src = (pixel*)_src; -+ ptrdiff_t srcstride = _srcstride / sizeof(pixel); -+ const int8_t *filter = ff_hevc_rpi_qpel_filters[my - 1]; -+ for (y = 0; y < height; y++) { -+ for (x = 0; x < width; x++) -+ dst[x] = QPEL_FILTER(src, srcstride) >> (BIT_DEPTH - 8); -+ src += srcstride; -+ dst += MAX_PB_SIZE; -+ } -+} -+ -+static void FUNC(put_hevc_qpel_hv)(int16_t *dst, -+ uint8_t *_src, -+ ptrdiff_t _srcstride, -+ int height, intptr_t mx, -+ intptr_t my, int width) -+{ -+ int x, y; -+ const int8_t *filter; -+ pixel *src = (pixel*)_src; -+ ptrdiff_t srcstride = _srcstride / sizeof(pixel); -+ int16_t tmp_array[(MAX_PB_SIZE + QPEL_EXTRA) * MAX_PB_SIZE]; -+ int16_t *tmp = tmp_array; -+ -+ src -= QPEL_EXTRA_BEFORE * srcstride; -+ filter = ff_hevc_rpi_qpel_filters[mx - 1]; -+ for (y = 0; y < height + QPEL_EXTRA; y++) { -+ for (x = 0; x < width; x++) -+ tmp[x] = QPEL_FILTER(src, 1) >> (BIT_DEPTH - 8); -+ src += srcstride; -+ tmp += MAX_PB_SIZE; -+ } -+ -+ tmp = tmp_array + QPEL_EXTRA_BEFORE * MAX_PB_SIZE; -+ filter = ff_hevc_rpi_qpel_filters[my - 1]; -+ for (y = 0; y < height; y++) { -+ for (x = 0; x < width; x++) -+ dst[x] = QPEL_FILTER(tmp, MAX_PB_SIZE) >> 6; -+ tmp += MAX_PB_SIZE; -+ dst += MAX_PB_SIZE; -+ } -+} -+ -+static void FUNC(put_hevc_qpel_uni_h)(uint8_t *_dst, ptrdiff_t _dststride, -+ uint8_t *_src, ptrdiff_t _srcstride, -+ int height, intptr_t mx, intptr_t my, int width) -+{ -+ int x, y; -+ pixel *src = (pixel*)_src; -+ ptrdiff_t srcstride = _srcstride / sizeof(pixel); -+ pixel *dst = (pixel *)_dst; -+ ptrdiff_t dststride = _dststride / sizeof(pixel); -+ const int8_t *filter = ff_hevc_rpi_qpel_filters[mx - 1]; -+ int shift = 14 - BIT_DEPTH; -+ -+#if BIT_DEPTH < 14 -+ int offset = 1 << (shift - 1); -+#else -+ int offset = 0; -+#endif -+ -+ for (y = 0; y < height; y++) { -+ for (x = 0; x < width; x++) -+ dst[x] = av_clip_pixel(((QPEL_FILTER(src, 1) >> (BIT_DEPTH - 8)) + offset) >> shift); -+ src += srcstride; -+ dst += dststride; -+ } -+} -+ -+static void FUNC(put_hevc_qpel_bi_h)(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride, -+ int16_t *src2, -+ int height, intptr_t mx, intptr_t my, int width) -+{ -+ int x, y; -+ pixel *src = (pixel*)_src; -+ ptrdiff_t srcstride = _srcstride / sizeof(pixel); -+ pixel *dst = (pixel *)_dst; -+ ptrdiff_t dststride = _dststride / sizeof(pixel); -+ -+ const int8_t *filter = ff_hevc_rpi_qpel_filters[mx - 1]; -+ -+ int shift = 14 + 1 - BIT_DEPTH; -+#if BIT_DEPTH < 14 -+ int offset = 1 << (shift - 1); -+#else -+ int offset = 0; -+#endif -+ -+ for (y = 0; y < height; y++) { -+ for (x = 0; x < width; x++) -+ dst[x] = av_clip_pixel(((QPEL_FILTER(src, 1) >> (BIT_DEPTH - 8)) + src2[x] + offset) >> shift); -+ src += srcstride; -+ dst += dststride; -+ src2 += MAX_PB_SIZE; -+ } -+} -+ -+static void FUNC(put_hevc_qpel_uni_v)(uint8_t *_dst, ptrdiff_t _dststride, -+ uint8_t *_src, ptrdiff_t _srcstride, -+ int height, intptr_t mx, intptr_t my, int width) -+{ -+ int x, y; -+ pixel *src = (pixel*)_src; -+ ptrdiff_t srcstride = _srcstride / sizeof(pixel); -+ pixel *dst = (pixel *)_dst; -+ ptrdiff_t dststride = _dststride / sizeof(pixel); -+ const int8_t *filter = ff_hevc_rpi_qpel_filters[my - 1]; -+ int shift = 14 - BIT_DEPTH; -+ -+#if BIT_DEPTH < 14 -+ int offset = 1 << (shift - 1); -+#else -+ int offset = 0; -+#endif -+ -+ for (y = 0; y < height; y++) { -+ for (x = 0; x < width; x++) -+ dst[x] = av_clip_pixel(((QPEL_FILTER(src, srcstride) >> (BIT_DEPTH - 8)) + offset) >> shift); -+ src += srcstride; -+ dst += dststride; -+ } -+} -+ -+ -+static void FUNC(put_hevc_qpel_bi_v)(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride, -+ int16_t *src2, -+ int height, intptr_t mx, intptr_t my, int width) -+{ -+ int x, y; -+ pixel *src = (pixel*)_src; -+ ptrdiff_t srcstride = _srcstride / sizeof(pixel); -+ pixel *dst = (pixel *)_dst; -+ ptrdiff_t dststride = _dststride / sizeof(pixel); -+ -+ const int8_t *filter = ff_hevc_rpi_qpel_filters[my - 1]; -+ -+ int shift = 14 + 1 - BIT_DEPTH; -+#if BIT_DEPTH < 14 -+ int offset = 1 << (shift - 1); -+#else -+ int offset = 0; -+#endif -+ -+ for (y = 0; y < height; y++) { -+ for (x = 0; x < width; x++) -+ dst[x] = av_clip_pixel(((QPEL_FILTER(src, srcstride) >> (BIT_DEPTH - 8)) + src2[x] + offset) >> shift); -+ src += srcstride; -+ dst += dststride; -+ src2 += MAX_PB_SIZE; -+ } -+} -+ -+static void FUNC(put_hevc_qpel_uni_hv)(uint8_t *_dst, ptrdiff_t _dststride, -+ uint8_t *_src, ptrdiff_t _srcstride, -+ int height, intptr_t mx, intptr_t my, int width) -+{ -+ int x, y; -+ const int8_t *filter; -+ pixel *src = (pixel*)_src; -+ ptrdiff_t srcstride = _srcstride / sizeof(pixel); -+ pixel *dst = (pixel *)_dst; -+ ptrdiff_t dststride = _dststride / sizeof(pixel); -+ int16_t tmp_array[(MAX_PB_SIZE + QPEL_EXTRA) * MAX_PB_SIZE]; -+ int16_t *tmp = tmp_array; -+ int shift = 14 - BIT_DEPTH; -+ -+#if BIT_DEPTH < 14 -+ int offset = 1 << (shift - 1); -+#else -+ int offset = 0; -+#endif -+ -+ src -= QPEL_EXTRA_BEFORE * srcstride; -+ filter = ff_hevc_rpi_qpel_filters[mx - 1]; -+ for (y = 0; y < height + QPEL_EXTRA; y++) { -+ for (x = 0; x < width; x++) -+ tmp[x] = QPEL_FILTER(src, 1) >> (BIT_DEPTH - 8); -+ src += srcstride; -+ tmp += MAX_PB_SIZE; -+ } -+ -+ tmp = tmp_array + QPEL_EXTRA_BEFORE * MAX_PB_SIZE; -+ filter = ff_hevc_rpi_qpel_filters[my - 1]; -+ -+ for (y = 0; y < height; y++) { -+ for (x = 0; x < width; x++) -+ dst[x] = av_clip_pixel(((QPEL_FILTER(tmp, MAX_PB_SIZE) >> 6) + offset) >> shift); -+ tmp += MAX_PB_SIZE; -+ dst += dststride; -+ } -+} -+ -+static void FUNC(put_hevc_qpel_bi_hv)(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride, -+ int16_t *src2, -+ int height, intptr_t mx, intptr_t my, int width) -+{ -+ int x, y; -+ const int8_t *filter; -+ pixel *src = (pixel*)_src; -+ ptrdiff_t srcstride = _srcstride / sizeof(pixel); -+ pixel *dst = (pixel *)_dst; -+ ptrdiff_t dststride = _dststride / sizeof(pixel); -+ int16_t tmp_array[(MAX_PB_SIZE + QPEL_EXTRA) * MAX_PB_SIZE]; -+ int16_t *tmp = tmp_array; -+ int shift = 14 + 1 - BIT_DEPTH; -+#if BIT_DEPTH < 14 -+ int offset = 1 << (shift - 1); -+#else -+ int offset = 0; -+#endif -+ -+ src -= QPEL_EXTRA_BEFORE * srcstride; -+ filter = ff_hevc_rpi_qpel_filters[mx - 1]; -+ for (y = 0; y < height + QPEL_EXTRA; y++) { -+ for (x = 0; x < width; x++) -+ tmp[x] = QPEL_FILTER(src, 1) >> (BIT_DEPTH - 8); -+ src += srcstride; -+ tmp += MAX_PB_SIZE; -+ } -+ -+ tmp = tmp_array + QPEL_EXTRA_BEFORE * MAX_PB_SIZE; -+ filter = ff_hevc_rpi_qpel_filters[my - 1]; -+ -+ for (y = 0; y < height; y++) { -+ for (x = 0; x < width; x++) -+ dst[x] = av_clip_pixel(((QPEL_FILTER(tmp, MAX_PB_SIZE) >> 6) + src2[x] + offset) >> shift); -+ tmp += MAX_PB_SIZE; -+ dst += dststride; -+ src2 += MAX_PB_SIZE; -+ } -+} -+ -+static void FUNC(put_hevc_qpel_uni_w_h)(uint8_t *_dst, ptrdiff_t _dststride, -+ uint8_t *_src, ptrdiff_t _srcstride, -+ int height, int denom, int wx, int ox, -+ intptr_t mx, intptr_t my, int width) -+{ -+ int x, y; -+ pixel *src = (pixel*)_src; -+ ptrdiff_t srcstride = _srcstride / sizeof(pixel); -+ pixel *dst = (pixel *)_dst; -+ ptrdiff_t dststride = _dststride / sizeof(pixel); -+ const int8_t *filter = ff_hevc_rpi_qpel_filters[mx - 1]; -+ int shift = denom + 14 - BIT_DEPTH; -+#if BIT_DEPTH < 14 -+ int offset = 1 << (shift - 1); -+#else -+ int offset = 0; -+#endif -+ -+ ox = ox * (1 << (BIT_DEPTH - 8)); -+ for (y = 0; y < height; y++) { -+ for (x = 0; x < width; x++) -+ dst[x] = av_clip_pixel((((QPEL_FILTER(src, 1) >> (BIT_DEPTH - 8)) * wx + offset) >> shift) + ox); -+ src += srcstride; -+ dst += dststride; -+ } -+} -+ -+static void FUNC(put_hevc_qpel_bi_w_h)(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride, -+ int16_t *src2, -+ int height, int denom, int wx0, int wx1, -+ int ox0, int ox1, intptr_t mx, intptr_t my, int width) -+{ -+ int x, y; -+ pixel *src = (pixel*)_src; -+ ptrdiff_t srcstride = _srcstride / sizeof(pixel); -+ pixel *dst = (pixel *)_dst; -+ ptrdiff_t dststride = _dststride / sizeof(pixel); -+ -+ const int8_t *filter = ff_hevc_rpi_qpel_filters[mx - 1]; -+ -+ int shift = 14 + 1 - BIT_DEPTH; -+ int log2Wd = denom + shift - 1; -+ -+ ox0 = ox0 * (1 << (BIT_DEPTH - 8)); -+ ox1 = ox1 * (1 << (BIT_DEPTH - 8)); -+ for (y = 0; y < height; y++) { -+ for (x = 0; x < width; x++) -+ dst[x] = av_clip_pixel(((QPEL_FILTER(src, 1) >> (BIT_DEPTH - 8)) * wx1 + src2[x] * wx0 + -+ ((ox0 + ox1 + 1) << log2Wd)) >> (log2Wd + 1)); -+ src += srcstride; -+ dst += dststride; -+ src2 += MAX_PB_SIZE; -+ } -+} -+ -+static void FUNC(put_hevc_qpel_uni_w_v)(uint8_t *_dst, ptrdiff_t _dststride, -+ uint8_t *_src, ptrdiff_t _srcstride, -+ int height, int denom, int wx, int ox, -+ intptr_t mx, intptr_t my, int width) -+{ -+ int x, y; -+ pixel *src = (pixel*)_src; -+ ptrdiff_t srcstride = _srcstride / sizeof(pixel); -+ pixel *dst = (pixel *)_dst; -+ ptrdiff_t dststride = _dststride / sizeof(pixel); -+ const int8_t *filter = ff_hevc_rpi_qpel_filters[my - 1]; -+ int shift = denom + 14 - BIT_DEPTH; -+#if BIT_DEPTH < 14 -+ int offset = 1 << (shift - 1); -+#else -+ int offset = 0; -+#endif -+ -+ ox = ox * (1 << (BIT_DEPTH - 8)); -+ for (y = 0; y < height; y++) { -+ for (x = 0; x < width; x++) -+ dst[x] = av_clip_pixel((((QPEL_FILTER(src, srcstride) >> (BIT_DEPTH - 8)) * wx + offset) >> shift) + ox); -+ src += srcstride; -+ dst += dststride; -+ } -+} -+ -+static void FUNC(put_hevc_qpel_bi_w_v)(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride, -+ int16_t *src2, -+ int height, int denom, int wx0, int wx1, -+ int ox0, int ox1, intptr_t mx, intptr_t my, int width) -+{ -+ int x, y; -+ pixel *src = (pixel*)_src; -+ ptrdiff_t srcstride = _srcstride / sizeof(pixel); -+ pixel *dst = (pixel *)_dst; -+ ptrdiff_t dststride = _dststride / sizeof(pixel); -+ -+ const int8_t *filter = ff_hevc_rpi_qpel_filters[my - 1]; -+ -+ int shift = 14 + 1 - BIT_DEPTH; -+ int log2Wd = denom + shift - 1; -+ -+ ox0 = ox0 * (1 << (BIT_DEPTH - 8)); -+ ox1 = ox1 * (1 << (BIT_DEPTH - 8)); -+ for (y = 0; y < height; y++) { -+ for (x = 0; x < width; x++) -+ dst[x] = av_clip_pixel(((QPEL_FILTER(src, srcstride) >> (BIT_DEPTH - 8)) * wx1 + src2[x] * wx0 + -+ ((ox0 + ox1 + 1) << log2Wd)) >> (log2Wd + 1)); -+ src += srcstride; -+ dst += dststride; -+ src2 += MAX_PB_SIZE; -+ } -+} -+ -+static void FUNC(put_hevc_qpel_uni_w_hv)(uint8_t *_dst, ptrdiff_t _dststride, -+ uint8_t *_src, ptrdiff_t _srcstride, -+ int height, int denom, int wx, int ox, -+ intptr_t mx, intptr_t my, int width) -+{ -+ int x, y; -+ const int8_t *filter; -+ pixel *src = (pixel*)_src; -+ ptrdiff_t srcstride = _srcstride / sizeof(pixel); -+ pixel *dst = (pixel *)_dst; -+ ptrdiff_t dststride = _dststride / sizeof(pixel); -+ int16_t tmp_array[(MAX_PB_SIZE + QPEL_EXTRA) * MAX_PB_SIZE]; -+ int16_t *tmp = tmp_array; -+ int shift = denom + 14 - BIT_DEPTH; -+#if BIT_DEPTH < 14 -+ int offset = 1 << (shift - 1); -+#else -+ int offset = 0; -+#endif -+ -+ src -= QPEL_EXTRA_BEFORE * srcstride; -+ filter = ff_hevc_rpi_qpel_filters[mx - 1]; -+ for (y = 0; y < height + QPEL_EXTRA; y++) { -+ for (x = 0; x < width; x++) -+ tmp[x] = QPEL_FILTER(src, 1) >> (BIT_DEPTH - 8); -+ src += srcstride; -+ tmp += MAX_PB_SIZE; -+ } -+ -+ tmp = tmp_array + QPEL_EXTRA_BEFORE * MAX_PB_SIZE; -+ filter = ff_hevc_rpi_qpel_filters[my - 1]; -+ -+ ox = ox * (1 << (BIT_DEPTH - 8)); -+ for (y = 0; y < height; y++) { -+ for (x = 0; x < width; x++) -+ dst[x] = av_clip_pixel((((QPEL_FILTER(tmp, MAX_PB_SIZE) >> 6) * wx + offset) >> shift) + ox); -+ tmp += MAX_PB_SIZE; -+ dst += dststride; -+ } -+} -+ -+static void FUNC(put_hevc_qpel_bi_w_hv)(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride, -+ int16_t *src2, -+ int height, int denom, int wx0, int wx1, -+ int ox0, int ox1, intptr_t mx, intptr_t my, int width) -+{ -+ int x, y; -+ const int8_t *filter; -+ pixel *src = (pixel*)_src; -+ ptrdiff_t srcstride = _srcstride / sizeof(pixel); -+ pixel *dst = (pixel *)_dst; -+ ptrdiff_t dststride = _dststride / sizeof(pixel); -+ int16_t tmp_array[(MAX_PB_SIZE + QPEL_EXTRA) * MAX_PB_SIZE]; -+ int16_t *tmp = tmp_array; -+ int shift = 14 + 1 - BIT_DEPTH; -+ int log2Wd = denom + shift - 1; -+ -+ src -= QPEL_EXTRA_BEFORE * srcstride; -+ filter = ff_hevc_rpi_qpel_filters[mx - 1]; -+ for (y = 0; y < height + QPEL_EXTRA; y++) { -+ for (x = 0; x < width; x++) -+ tmp[x] = QPEL_FILTER(src, 1) >> (BIT_DEPTH - 8); -+ src += srcstride; -+ tmp += MAX_PB_SIZE; -+ } -+ -+ tmp = tmp_array + QPEL_EXTRA_BEFORE * MAX_PB_SIZE; -+ filter = ff_hevc_rpi_qpel_filters[my - 1]; -+ -+ ox0 = ox0 * (1 << (BIT_DEPTH - 8)); -+ ox1 = ox1 * (1 << (BIT_DEPTH - 8)); -+ for (y = 0; y < height; y++) { -+ for (x = 0; x < width; x++) -+ dst[x] = av_clip_pixel(((QPEL_FILTER(tmp, MAX_PB_SIZE) >> 6) * wx1 + src2[x] * wx0 + -+ ((ox0 + ox1 + 1) << log2Wd)) >> (log2Wd + 1)); -+ tmp += MAX_PB_SIZE; -+ dst += dststride; -+ src2 += MAX_PB_SIZE; -+ } -+} -+ -+//////////////////////////////////////////////////////////////////////////////// -+// -+//////////////////////////////////////////////////////////////////////////////// -+#define EPEL_FILTER(src, stride) \ -+ (filter[0] * src[x - stride] + \ -+ filter[1] * src[x] + \ -+ filter[2] * src[x + stride] + \ -+ filter[3] * src[x + 2 * stride]) -+ -+static void FUNC(put_hevc_epel_h)(int16_t *dst, -+ uint8_t *_src, ptrdiff_t _srcstride, -+ int height, intptr_t mx, intptr_t my, int width) -+{ -+ int x, y; -+ pixel *src = (pixel *)_src; -+ ptrdiff_t srcstride = _srcstride / sizeof(pixel); -+ const int8_t *filter = ff_hevc_rpi_epel_filters[mx - 1]; -+ for (y = 0; y < height; y++) { -+ for (x = 0; x < width; x++) -+ dst[x] = EPEL_FILTER(src, 1) >> (BIT_DEPTH - 8); -+ src += srcstride; -+ dst += MAX_PB_SIZE; -+ } -+} -+ -+static void FUNC(put_hevc_epel_v)(int16_t *dst, -+ uint8_t *_src, ptrdiff_t _srcstride, -+ int height, intptr_t mx, intptr_t my, int width) -+{ -+ int x, y; -+ pixel *src = (pixel *)_src; -+ ptrdiff_t srcstride = _srcstride / sizeof(pixel); -+ const int8_t *filter = ff_hevc_rpi_epel_filters[my - 1]; -+ -+ for (y = 0; y < height; y++) { -+ for (x = 0; x < width; x++) -+ dst[x] = EPEL_FILTER(src, srcstride) >> (BIT_DEPTH - 8); -+ src += srcstride; -+ dst += MAX_PB_SIZE; -+ } -+} -+ -+static void FUNC(put_hevc_epel_hv)(int16_t *dst, -+ uint8_t *_src, ptrdiff_t _srcstride, -+ int height, intptr_t mx, intptr_t my, int width) -+{ -+ int x, y; -+ pixel *src = (pixel *)_src; -+ ptrdiff_t srcstride = _srcstride / sizeof(pixel); -+ const int8_t *filter = ff_hevc_rpi_epel_filters[mx - 1]; -+ int16_t tmp_array[(MAX_PB_SIZE + EPEL_EXTRA) * MAX_PB_SIZE]; -+ int16_t *tmp = tmp_array; -+ -+ src -= EPEL_EXTRA_BEFORE * srcstride; -+ -+ for (y = 0; y < height + EPEL_EXTRA; y++) { -+ for (x = 0; x < width; x++) -+ tmp[x] = EPEL_FILTER(src, 1) >> (BIT_DEPTH - 8); -+ src += srcstride; -+ tmp += MAX_PB_SIZE; -+ } -+ -+ tmp = tmp_array + EPEL_EXTRA_BEFORE * MAX_PB_SIZE; -+ filter = ff_hevc_rpi_epel_filters[my - 1]; -+ -+ for (y = 0; y < height; y++) { -+ for (x = 0; x < width; x++) -+ dst[x] = EPEL_FILTER(tmp, MAX_PB_SIZE) >> 6; -+ tmp += MAX_PB_SIZE; -+ dst += MAX_PB_SIZE; -+ } -+} -+ -+static void FUNC(put_hevc_epel_uni_h)(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride, -+ int height, intptr_t mx, intptr_t my, int width) -+{ -+ int x, y; -+ pixel *src = (pixel *)_src; -+ ptrdiff_t srcstride = _srcstride / sizeof(pixel); -+ pixel *dst = (pixel *)_dst; -+ ptrdiff_t dststride = _dststride / sizeof(pixel); -+ const int8_t *filter = ff_hevc_rpi_epel_filters[mx - 1]; -+ int shift = 14 - BIT_DEPTH; -+#if BIT_DEPTH < 14 -+ int offset = 1 << (shift - 1); -+#else -+ int offset = 0; -+#endif -+ -+ for (y = 0; y < height; y++) { -+ for (x = 0; x < width; x++) -+ dst[x] = av_clip_pixel(((EPEL_FILTER(src, 1) >> (BIT_DEPTH - 8)) + offset) >> shift); -+ src += srcstride; -+ dst += dststride; -+ } -+} -+ -+static void FUNC(put_hevc_epel_bi_h)(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride, -+ int16_t *src2, -+ int height, intptr_t mx, intptr_t my, int width) -+{ -+ int x, y; -+ pixel *src = (pixel *)_src; -+ ptrdiff_t srcstride = _srcstride / sizeof(pixel); -+ pixel *dst = (pixel *)_dst; -+ ptrdiff_t dststride = _dststride / sizeof(pixel); -+ const int8_t *filter = ff_hevc_rpi_epel_filters[mx - 1]; -+ int shift = 14 + 1 - BIT_DEPTH; -+#if BIT_DEPTH < 14 -+ int offset = 1 << (shift - 1); -+#else -+ int offset = 0; -+#endif -+ -+ for (y = 0; y < height; y++) { -+ for (x = 0; x < width; x++) { -+ dst[x] = av_clip_pixel(((EPEL_FILTER(src, 1) >> (BIT_DEPTH - 8)) + src2[x] + offset) >> shift); -+ } -+ dst += dststride; -+ src += srcstride; -+ src2 += MAX_PB_SIZE; -+ } -+} -+ -+static void FUNC(put_hevc_epel_uni_v)(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride, -+ int height, intptr_t mx, intptr_t my, int width) -+{ -+ int x, y; -+ pixel *src = (pixel *)_src; -+ ptrdiff_t srcstride = _srcstride / sizeof(pixel); -+ pixel *dst = (pixel *)_dst; -+ ptrdiff_t dststride = _dststride / sizeof(pixel); -+ const int8_t *filter = ff_hevc_rpi_epel_filters[my - 1]; -+ int shift = 14 - BIT_DEPTH; -+#if BIT_DEPTH < 14 -+ int offset = 1 << (shift - 1); -+#else -+ int offset = 0; -+#endif -+ -+ for (y = 0; y < height; y++) { -+ for (x = 0; x < width; x++) -+ dst[x] = av_clip_pixel(((EPEL_FILTER(src, srcstride) >> (BIT_DEPTH - 8)) + offset) >> shift); -+ src += srcstride; -+ dst += dststride; -+ } -+} -+ -+static void FUNC(put_hevc_epel_bi_v)(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride, -+ int16_t *src2, -+ int height, intptr_t mx, intptr_t my, int width) -+{ -+ int x, y; -+ pixel *src = (pixel *)_src; -+ ptrdiff_t srcstride = _srcstride / sizeof(pixel); -+ const int8_t *filter = ff_hevc_rpi_epel_filters[my - 1]; -+ pixel *dst = (pixel *)_dst; -+ ptrdiff_t dststride = _dststride / sizeof(pixel); -+ int shift = 14 + 1 - BIT_DEPTH; -+#if BIT_DEPTH < 14 -+ int offset = 1 << (shift - 1); -+#else -+ int offset = 0; -+#endif -+ -+ for (y = 0; y < height; y++) { -+ for (x = 0; x < width; x++) -+ dst[x] = av_clip_pixel(((EPEL_FILTER(src, srcstride) >> (BIT_DEPTH - 8)) + src2[x] + offset) >> shift); -+ dst += dststride; -+ src += srcstride; -+ src2 += MAX_PB_SIZE; -+ } -+} -+ -+static void FUNC(put_hevc_epel_uni_hv)(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride, -+ int height, intptr_t mx, intptr_t my, int width) -+{ -+ int x, y; -+ pixel *src = (pixel *)_src; -+ ptrdiff_t srcstride = _srcstride / sizeof(pixel); -+ pixel *dst = (pixel *)_dst; -+ ptrdiff_t dststride = _dststride / sizeof(pixel); -+ const int8_t *filter = ff_hevc_rpi_epel_filters[mx - 1]; -+ int16_t tmp_array[(MAX_PB_SIZE + EPEL_EXTRA) * MAX_PB_SIZE]; -+ int16_t *tmp = tmp_array; -+ int shift = 14 - BIT_DEPTH; -+#if BIT_DEPTH < 14 -+ int offset = 1 << (shift - 1); -+#else -+ int offset = 0; -+#endif -+ -+ src -= EPEL_EXTRA_BEFORE * srcstride; -+ -+ for (y = 0; y < height + EPEL_EXTRA; y++) { -+ for (x = 0; x < width; x++) -+ tmp[x] = EPEL_FILTER(src, 1) >> (BIT_DEPTH - 8); -+ src += srcstride; -+ tmp += MAX_PB_SIZE; -+ } -+ -+ tmp = tmp_array + EPEL_EXTRA_BEFORE * MAX_PB_SIZE; -+ filter = ff_hevc_rpi_epel_filters[my - 1]; -+ -+ for (y = 0; y < height; y++) { -+ for (x = 0; x < width; x++) -+ dst[x] = av_clip_pixel(((EPEL_FILTER(tmp, MAX_PB_SIZE) >> 6) + offset) >> shift); -+ tmp += MAX_PB_SIZE; -+ dst += dststride; -+ } -+} -+ -+static void FUNC(put_hevc_epel_bi_hv)(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride, -+ int16_t *src2, -+ int height, intptr_t mx, intptr_t my, int width) -+{ -+ int x, y; -+ pixel *src = (pixel *)_src; -+ ptrdiff_t srcstride = _srcstride / sizeof(pixel); -+ pixel *dst = (pixel *)_dst; -+ ptrdiff_t dststride = _dststride / sizeof(pixel); -+ const int8_t *filter = ff_hevc_rpi_epel_filters[mx - 1]; -+ int16_t tmp_array[(MAX_PB_SIZE + EPEL_EXTRA) * MAX_PB_SIZE]; -+ int16_t *tmp = tmp_array; -+ int shift = 14 + 1 - BIT_DEPTH; -+#if BIT_DEPTH < 14 -+ int offset = 1 << (shift - 1); -+#else -+ int offset = 0; -+#endif -+ -+ src -= EPEL_EXTRA_BEFORE * srcstride; -+ -+ for (y = 0; y < height + EPEL_EXTRA; y++) { -+ for (x = 0; x < width; x++) -+ tmp[x] = EPEL_FILTER(src, 1) >> (BIT_DEPTH - 8); -+ src += srcstride; -+ tmp += MAX_PB_SIZE; -+ } -+ -+ tmp = tmp_array + EPEL_EXTRA_BEFORE * MAX_PB_SIZE; -+ filter = ff_hevc_rpi_epel_filters[my - 1]; -+ -+ for (y = 0; y < height; y++) { -+ for (x = 0; x < width; x++) -+ dst[x] = av_clip_pixel(((EPEL_FILTER(tmp, MAX_PB_SIZE) >> 6) + src2[x] + offset) >> shift); -+ tmp += MAX_PB_SIZE; -+ dst += dststride; -+ src2 += MAX_PB_SIZE; -+ } -+} -+ -+static void FUNC(put_hevc_epel_uni_w_h)(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride, -+ int height, int denom, int wx, int ox, intptr_t mx, intptr_t my, int width) -+{ -+ int x, y; -+ pixel *src = (pixel *)_src; -+ ptrdiff_t srcstride = _srcstride / sizeof(pixel); -+ pixel *dst = (pixel *)_dst; -+ ptrdiff_t dststride = _dststride / sizeof(pixel); -+ const int8_t *filter = ff_hevc_rpi_epel_filters[mx - 1]; -+ int shift = denom + 14 - BIT_DEPTH; -+#if BIT_DEPTH < 14 -+ int offset = 1 << (shift - 1); -+#else -+ int offset = 0; -+#endif -+ -+ ox = ox * (1 << (BIT_DEPTH - 8)); -+ for (y = 0; y < height; y++) { -+ for (x = 0; x < width; x++) { -+ dst[x] = av_clip_pixel((((EPEL_FILTER(src, 1) >> (BIT_DEPTH - 8)) * wx + offset) >> shift) + ox); -+ } -+ dst += dststride; -+ src += srcstride; -+ } -+} -+ -+static void FUNC(put_hevc_epel_bi_w_h)(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride, -+ int16_t *src2, -+ int height, int denom, int wx0, int wx1, -+ int ox0, int ox1, intptr_t mx, intptr_t my, int width) -+{ -+ int x, y; -+ pixel *src = (pixel *)_src; -+ ptrdiff_t srcstride = _srcstride / sizeof(pixel); -+ pixel *dst = (pixel *)_dst; -+ ptrdiff_t dststride = _dststride / sizeof(pixel); -+ const int8_t *filter = ff_hevc_rpi_epel_filters[mx - 1]; -+ int shift = 14 + 1 - BIT_DEPTH; -+ int log2Wd = denom + shift - 1; -+ -+ ox0 = ox0 * (1 << (BIT_DEPTH - 8)); -+ ox1 = ox1 * (1 << (BIT_DEPTH - 8)); -+ for (y = 0; y < height; y++) { -+ for (x = 0; x < width; x++) -+ dst[x] = av_clip_pixel(((EPEL_FILTER(src, 1) >> (BIT_DEPTH - 8)) * wx1 + src2[x] * wx0 + -+ ((ox0 + ox1 + 1) << log2Wd)) >> (log2Wd + 1)); -+ src += srcstride; -+ dst += dststride; -+ src2 += MAX_PB_SIZE; -+ } -+} -+ -+static void FUNC(put_hevc_epel_uni_w_v)(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride, -+ int height, int denom, int wx, int ox, intptr_t mx, intptr_t my, int width) -+{ -+ int x, y; -+ pixel *src = (pixel *)_src; -+ ptrdiff_t srcstride = _srcstride / sizeof(pixel); -+ pixel *dst = (pixel *)_dst; -+ ptrdiff_t dststride = _dststride / sizeof(pixel); -+ const int8_t *filter = ff_hevc_rpi_epel_filters[my - 1]; -+ int shift = denom + 14 - BIT_DEPTH; -+#if BIT_DEPTH < 14 -+ int offset = 1 << (shift - 1); -+#else -+ int offset = 0; -+#endif -+ -+ ox = ox * (1 << (BIT_DEPTH - 8)); -+ for (y = 0; y < height; y++) { -+ for (x = 0; x < width; x++) { -+ dst[x] = av_clip_pixel((((EPEL_FILTER(src, srcstride) >> (BIT_DEPTH - 8)) * wx + offset) >> shift) + ox); -+ } -+ dst += dststride; -+ src += srcstride; -+ } -+} -+ -+static void FUNC(put_hevc_epel_bi_w_v)(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride, -+ int16_t *src2, -+ int height, int denom, int wx0, int wx1, -+ int ox0, int ox1, intptr_t mx, intptr_t my, int width) -+{ -+ int x, y; -+ pixel *src = (pixel *)_src; -+ ptrdiff_t srcstride = _srcstride / sizeof(pixel); -+ const int8_t *filter = ff_hevc_rpi_epel_filters[my - 1]; -+ pixel *dst = (pixel *)_dst; -+ ptrdiff_t dststride = _dststride / sizeof(pixel); -+ int shift = 14 + 1 - BIT_DEPTH; -+ int log2Wd = denom + shift - 1; -+ -+ ox0 = ox0 * (1 << (BIT_DEPTH - 8)); -+ ox1 = ox1 * (1 << (BIT_DEPTH - 8)); -+ for (y = 0; y < height; y++) { -+ for (x = 0; x < width; x++) -+ dst[x] = av_clip_pixel(((EPEL_FILTER(src, srcstride) >> (BIT_DEPTH - 8)) * wx1 + src2[x] * wx0 + -+ ((ox0 + ox1 + 1) << log2Wd)) >> (log2Wd + 1)); -+ src += srcstride; -+ dst += dststride; -+ src2 += MAX_PB_SIZE; -+ } -+} -+ -+static void FUNC(put_hevc_epel_uni_w_hv)(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride, -+ int height, int denom, int wx, int ox, intptr_t mx, intptr_t my, int width) -+{ -+ int x, y; -+ pixel *src = (pixel *)_src; -+ ptrdiff_t srcstride = _srcstride / sizeof(pixel); -+ pixel *dst = (pixel *)_dst; -+ ptrdiff_t dststride = _dststride / sizeof(pixel); -+ const int8_t *filter = ff_hevc_rpi_epel_filters[mx - 1]; -+ int16_t tmp_array[(MAX_PB_SIZE + EPEL_EXTRA) * MAX_PB_SIZE]; -+ int16_t *tmp = tmp_array; -+ int shift = denom + 14 - BIT_DEPTH; -+#if BIT_DEPTH < 14 -+ int offset = 1 << (shift - 1); -+#else -+ int offset = 0; -+#endif -+ -+ src -= EPEL_EXTRA_BEFORE * srcstride; -+ -+ for (y = 0; y < height + EPEL_EXTRA; y++) { -+ for (x = 0; x < width; x++) -+ tmp[x] = EPEL_FILTER(src, 1) >> (BIT_DEPTH - 8); -+ src += srcstride; -+ tmp += MAX_PB_SIZE; -+ } -+ -+ tmp = tmp_array + EPEL_EXTRA_BEFORE * MAX_PB_SIZE; -+ filter = ff_hevc_rpi_epel_filters[my - 1]; -+ -+ ox = ox * (1 << (BIT_DEPTH - 8)); -+ for (y = 0; y < height; y++) { -+ for (x = 0; x < width; x++) -+ dst[x] = av_clip_pixel((((EPEL_FILTER(tmp, MAX_PB_SIZE) >> 6) * wx + offset) >> shift) + ox); -+ tmp += MAX_PB_SIZE; -+ dst += dststride; -+ } -+} -+ -+static void FUNC(put_hevc_epel_bi_w_hv)(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride, -+ int16_t *src2, -+ int height, int denom, int wx0, int wx1, -+ int ox0, int ox1, intptr_t mx, intptr_t my, int width) -+{ -+ int x, y; -+ pixel *src = (pixel *)_src; -+ ptrdiff_t srcstride = _srcstride / sizeof(pixel); -+ pixel *dst = (pixel *)_dst; -+ ptrdiff_t dststride = _dststride / sizeof(pixel); -+ const int8_t *filter = ff_hevc_rpi_epel_filters[mx - 1]; -+ int16_t tmp_array[(MAX_PB_SIZE + EPEL_EXTRA) * MAX_PB_SIZE]; -+ int16_t *tmp = tmp_array; -+ int shift = 14 + 1 - BIT_DEPTH; -+ int log2Wd = denom + shift - 1; -+ -+ src -= EPEL_EXTRA_BEFORE * srcstride; -+ -+ for (y = 0; y < height + EPEL_EXTRA; y++) { -+ for (x = 0; x < width; x++) -+ tmp[x] = EPEL_FILTER(src, 1) >> (BIT_DEPTH - 8); -+ src += srcstride; -+ tmp += MAX_PB_SIZE; -+ } -+ -+ tmp = tmp_array + EPEL_EXTRA_BEFORE * MAX_PB_SIZE; -+ filter = ff_hevc_rpi_epel_filters[my - 1]; -+ -+ ox0 = ox0 * (1 << (BIT_DEPTH - 8)); -+ ox1 = ox1 * (1 << (BIT_DEPTH - 8)); -+ for (y = 0; y < height; y++) { -+ for (x = 0; x < width; x++) -+ dst[x] = av_clip_pixel(((EPEL_FILTER(tmp, MAX_PB_SIZE) >> 6) * wx1 + src2[x] * wx0 + -+ ((ox0 + ox1 + 1) * (1 << log2Wd))) >> (log2Wd + 1)); -+ tmp += MAX_PB_SIZE; -+ dst += dststride; -+ src2 += MAX_PB_SIZE; -+ } -+} -+ -+// line zero -+#define P3 pix[-4 * xstride] -+#define P2 pix[-3 * xstride] -+#define P1 pix[-2 * xstride] -+#define P0 pix[-1 * xstride] -+#define Q0 pix[0 * xstride] -+#define Q1 pix[1 * xstride] -+#define Q2 pix[2 * xstride] -+#define Q3 pix[3 * xstride] -+ -+// line three. used only for deblocking decision -+#define TP3 pix[-4 * xstride + 3 * ystride] -+#define TP2 pix[-3 * xstride + 3 * ystride] -+#define TP1 pix[-2 * xstride + 3 * ystride] -+#define TP0 pix[-1 * xstride + 3 * ystride] -+#define TQ0 pix[0 * xstride + 3 * ystride] -+#define TQ1 pix[1 * xstride + 3 * ystride] -+#define TQ2 pix[2 * xstride + 3 * ystride] -+#define TQ3 pix[3 * xstride + 3 * ystride] -+ -+static void FUNC(hevc_loop_filter_luma)(uint8_t *_pix, -+ ptrdiff_t _xstride, ptrdiff_t _ystride, -+ int beta, int *_tc, -+ uint8_t *_no_p, uint8_t *_no_q) -+{ -+ int d, j; -+ pixel *pix = (pixel *)_pix; -+ ptrdiff_t xstride = _xstride / sizeof(pixel); -+ ptrdiff_t ystride = _ystride / sizeof(pixel); -+ -+ beta <<= BIT_DEPTH - 8; -+ -+ for (j = 0; j < 2; j++) { -+ const int dp0 = abs(P2 - 2 * P1 + P0); -+ const int dq0 = abs(Q2 - 2 * Q1 + Q0); -+ const int dp3 = abs(TP2 - 2 * TP1 + TP0); -+ const int dq3 = abs(TQ2 - 2 * TQ1 + TQ0); -+ const int d0 = dp0 + dq0; -+ const int d3 = dp3 + dq3; -+ const int tc = _tc[j] << (BIT_DEPTH - 8); -+ const int no_p = _no_p[j]; -+ const int no_q = _no_q[j]; -+ -+ if (d0 + d3 >= beta) { -+ pix += 4 * ystride; -+ continue; -+ } else { -+ const int beta_3 = beta >> 3; -+ const int beta_2 = beta >> 2; -+ const int tc25 = ((tc * 5 + 1) >> 1); -+ -+ if (abs(P3 - P0) + abs(Q3 - Q0) < beta_3 && abs(P0 - Q0) < tc25 && -+ abs(TP3 - TP0) + abs(TQ3 - TQ0) < beta_3 && abs(TP0 - TQ0) < tc25 && -+ (d0 << 1) < beta_2 && (d3 << 1) < beta_2) { -+ // strong filtering -+ const int tc2 = tc << 1; -+ for (d = 0; d < 4; d++) { -+ const int p3 = P3; -+ const int p2 = P2; -+ const int p1 = P1; -+ const int p0 = P0; -+ const int q0 = Q0; -+ const int q1 = Q1; -+ const int q2 = Q2; -+ const int q3 = Q3; -+ if (!no_p) { -+ P0 = p0 + av_clip(((p2 + 2 * p1 + 2 * p0 + 2 * q0 + q1 + 4) >> 3) - p0, -tc2, tc2); -+ P1 = p1 + av_clip(((p2 + p1 + p0 + q0 + 2) >> 2) - p1, -tc2, tc2); -+ P2 = p2 + av_clip(((2 * p3 + 3 * p2 + p1 + p0 + q0 + 4) >> 3) - p2, -tc2, tc2); -+ } -+ if (!no_q) { -+ Q0 = q0 + av_clip(((p1 + 2 * p0 + 2 * q0 + 2 * q1 + q2 + 4) >> 3) - q0, -tc2, tc2); -+ Q1 = q1 + av_clip(((p0 + q0 + q1 + q2 + 2) >> 2) - q1, -tc2, tc2); -+ Q2 = q2 + av_clip(((2 * q3 + 3 * q2 + q1 + q0 + p0 + 4) >> 3) - q2, -tc2, tc2); -+ } -+ pix += ystride; -+ } -+ } else { // normal filtering -+ int nd_p = 1; -+ int nd_q = 1; -+ const int tc_2 = tc >> 1; -+ if (dp0 + dp3 < ((beta + (beta >> 1)) >> 3)) -+ nd_p = 2; -+ if (dq0 + dq3 < ((beta + (beta >> 1)) >> 3)) -+ nd_q = 2; -+ -+ for (d = 0; d < 4; d++) { -+ const int p2 = P2; -+ const int p1 = P1; -+ const int p0 = P0; -+ const int q0 = Q0; -+ const int q1 = Q1; -+ const int q2 = Q2; -+ int delta0 = (9 * (q0 - p0) - 3 * (q1 - p1) + 8) >> 4; -+ if (abs(delta0) < 10 * tc) { -+ delta0 = av_clip(delta0, -tc, tc); -+ if (!no_p) -+ P0 = av_clip_pixel(p0 + delta0); -+ if (!no_q) -+ Q0 = av_clip_pixel(q0 - delta0); -+ if (!no_p && nd_p > 1) { -+ const int deltap1 = av_clip((((p2 + p0 + 1) >> 1) - p1 + delta0) >> 1, -tc_2, tc_2); -+ P1 = av_clip_pixel(p1 + deltap1); -+ } -+ if (!no_q && nd_q > 1) { -+ const int deltaq1 = av_clip((((q2 + q0 + 1) >> 1) - q1 - delta0) >> 1, -tc_2, tc_2); -+ Q1 = av_clip_pixel(q1 + deltaq1); -+ } -+ } -+ pix += ystride; -+ } -+ } -+ } -+ } -+} -+ -+static void FUNC(hevc_loop_filter_chroma)(uint8_t *_pix, ptrdiff_t _xstride, -+ ptrdiff_t _ystride, int *_tc, -+ uint8_t *_no_p, uint8_t *_no_q) -+{ -+ int d, j, no_p, no_q; -+ pixel *pix = (pixel *)_pix; -+ ptrdiff_t xstride = _xstride / sizeof(pixel); -+ ptrdiff_t ystride = _ystride / sizeof(pixel); -+ -+ for (j = 0; j < 2; j++) { -+ const int tc = _tc[j] << (BIT_DEPTH - 8); -+ if (tc <= 0) { -+ pix += 4 * ystride; -+ continue; -+ } -+ no_p = _no_p[j]; -+ no_q = _no_q[j]; -+ -+ for (d = 0; d < 4; d++) { -+ int delta0; -+ const int p1 = P1; -+ const int p0 = P0; -+ const int q0 = Q0; -+ const int q1 = Q1; -+ delta0 = av_clip((((q0 - p0) * 4) + p1 - q1 + 4) >> 3, -tc, tc); -+ if (!no_p) -+ P0 = av_clip_pixel(p0 + delta0); -+ if (!no_q) -+ Q0 = av_clip_pixel(q0 - delta0); -+ pix += ystride; -+ } -+ } -+} -+ -+static void FUNC(hevc_h_loop_filter_chroma)(uint8_t *pix, ptrdiff_t stride, -+ int32_t *tc, uint8_t *no_p, -+ uint8_t *no_q) -+{ -+ FUNC(hevc_loop_filter_chroma)(pix, stride, sizeof(pixel), tc, no_p, no_q); -+} -+ -+static void FUNC(hevc_v_loop_filter_chroma)(uint8_t *pix, ptrdiff_t stride, -+ int32_t *tc, uint8_t *no_p, -+ uint8_t *no_q) -+{ -+ FUNC(hevc_loop_filter_chroma)(pix, sizeof(pixel), stride, tc, no_p, no_q); -+} -+ -+static void FUNC(hevc_h_loop_filter_luma)(uint8_t *pix, ptrdiff_t stride, -+ int beta, int32_t *tc, uint8_t *no_p, -+ uint8_t *no_q) -+{ -+ FUNC(hevc_loop_filter_luma)(pix, stride, sizeof(pixel), -+ beta, tc, no_p, no_q); -+} -+ -+static void FUNC(hevc_v_loop_filter_luma)(uint8_t *pix, ptrdiff_t stride, -+ int beta, int32_t *tc, uint8_t *no_p, -+ uint8_t *no_q) -+{ -+ FUNC(hevc_loop_filter_luma)(pix, sizeof(pixel), stride, -+ beta, tc, no_p, no_q); -+} -+ -+#undef P3 -+#undef P2 -+#undef P1 -+#undef P0 -+#undef Q0 -+#undef Q1 -+#undef Q2 -+#undef Q3 -+ -+#undef TP3 -+#undef TP2 -+#undef TP1 -+#undef TP0 -+#undef TQ0 -+#undef TQ1 -+#undef TQ2 -+#undef TQ3 -+ -+// line zero -+#define P3 pix_l[0 * xstride] -+#define P2 pix_l[1 * xstride] -+#define P1 pix_l[2 * xstride] -+#define P0 pix_l[3 * xstride] -+#define Q0 pix_r[0 * xstride] -+#define Q1 pix_r[1 * xstride] -+#define Q2 pix_r[2 * xstride] -+#define Q3 pix_r[3 * xstride] -+ -+// line three. used only for deblocking decision -+#define TP3 pix_l[0 * xstride + 3 * ystride] -+#define TP2 pix_l[1 * xstride + 3 * ystride] -+#define TP1 pix_l[2 * xstride + 3 * ystride] -+#define TP0 pix_l[3 * xstride + 3 * ystride] -+#define TQ0 pix_r[0 * xstride + 3 * ystride] -+#define TQ1 pix_r[1 * xstride + 3 * ystride] -+#define TQ2 pix_r[2 * xstride + 3 * ystride] -+#define TQ3 pix_r[3 * xstride + 3 * ystride] -+ -+// This is identical to hevc_loop_filter_luma except that the P/Q -+// components are on separate pointers -+static void FUNC(hevc_v_loop_filter_luma2)(uint8_t * _pix_r, -+ unsigned int _stride, unsigned int beta, unsigned int tc2, unsigned int no_f, -+ uint8_t * _pix_l) -+{ -+ int d, j; -+ pixel *pix_l = (pixel *)_pix_l; -+ pixel *pix_r = (pixel *)_pix_r; -+ const ptrdiff_t xstride = 1; -+ const ptrdiff_t ystride = _stride / sizeof(pixel); -+ -+ beta <<= BIT_DEPTH - 8; -+ -+ for (j = 0; j < 2; j++) { -+ const int dp0 = abs(P2 - 2 * P1 + P0); -+ const int dq0 = abs(Q2 - 2 * Q1 + Q0); -+ const int dp3 = abs(TP2 - 2 * TP1 + TP0); -+ const int dq3 = abs(TQ2 - 2 * TQ1 + TQ0); -+ const int d0 = dp0 + dq0; -+ const int d3 = dp3 + dq3; -+ const int tc = ((tc2 >> (j << 4)) & 0xffff) << (BIT_DEPTH - 8); -+ const int no_p = no_f & 1; -+ const int no_q = no_f & 2; -+ -+ if (d0 + d3 >= beta) { -+ pix_l += 4 * ystride; -+ pix_r += 4 * ystride; -+ continue; -+ } else { -+ const int beta_3 = beta >> 3; -+ const int beta_2 = beta >> 2; -+ const int tc25 = ((tc * 5 + 1) >> 1); -+ -+ if (abs(P3 - P0) + abs(Q3 - Q0) < beta_3 && abs(P0 - Q0) < tc25 && -+ abs(TP3 - TP0) + abs(TQ3 - TQ0) < beta_3 && abs(TP0 - TQ0) < tc25 && -+ (d0 << 1) < beta_2 && (d3 << 1) < beta_2) { -+ // strong filtering -+ const int tc2 = tc << 1; -+ for (d = 0; d < 4; d++) { -+ const int p3 = P3; -+ const int p2 = P2; -+ const int p1 = P1; -+ const int p0 = P0; -+ const int q0 = Q0; -+ const int q1 = Q1; -+ const int q2 = Q2; -+ const int q3 = Q3; -+ if (!no_p) { -+ P0 = p0 + av_clip(((p2 + 2 * p1 + 2 * p0 + 2 * q0 + q1 + 4) >> 3) - p0, -tc2, tc2); -+ P1 = p1 + av_clip(((p2 + p1 + p0 + q0 + 2) >> 2) - p1, -tc2, tc2); -+ P2 = p2 + av_clip(((2 * p3 + 3 * p2 + p1 + p0 + q0 + 4) >> 3) - p2, -tc2, tc2); -+ } -+ if (!no_q) { -+ Q0 = q0 + av_clip(((p1 + 2 * p0 + 2 * q0 + 2 * q1 + q2 + 4) >> 3) - q0, -tc2, tc2); -+ Q1 = q1 + av_clip(((p0 + q0 + q1 + q2 + 2) >> 2) - q1, -tc2, tc2); -+ Q2 = q2 + av_clip(((2 * q3 + 3 * q2 + q1 + q0 + p0 + 4) >> 3) - q2, -tc2, tc2); -+ } -+ pix_l += ystride; -+ pix_r += ystride; -+ } -+ } else { // normal filtering -+ int nd_p = 1; -+ int nd_q = 1; -+ const int tc_2 = tc >> 1; -+ if (dp0 + dp3 < ((beta + (beta >> 1)) >> 3)) -+ nd_p = 2; -+ if (dq0 + dq3 < ((beta + (beta >> 1)) >> 3)) -+ nd_q = 2; -+ -+ for (d = 0; d < 4; d++) { -+ const int p2 = P2; -+ const int p1 = P1; -+ const int p0 = P0; -+ const int q0 = Q0; -+ const int q1 = Q1; -+ const int q2 = Q2; -+ int delta0 = (9 * (q0 - p0) - 3 * (q1 - p1) + 8) >> 4; -+ if (abs(delta0) < 10 * tc) { -+ delta0 = av_clip(delta0, -tc, tc); -+ if (!no_p) -+ P0 = av_clip_pixel(p0 + delta0); -+ if (!no_q) -+ Q0 = av_clip_pixel(q0 - delta0); -+ if (!no_p && nd_p > 1) { -+ const int deltap1 = av_clip((((p2 + p0 + 1) >> 1) - p1 + delta0) >> 1, -tc_2, tc_2); -+ P1 = av_clip_pixel(p1 + deltap1); -+ } -+ if (!no_q && nd_q > 1) { -+ const int deltaq1 = av_clip((((q2 + q0 + 1) >> 1) - q1 - delta0) >> 1, -tc_2, tc_2); -+ Q1 = av_clip_pixel(q1 + deltaq1); -+ } -+ } -+ pix_l += ystride; -+ pix_r += ystride; -+ } -+ } -+ } -+ } -+} -+ -+static void FUNC(hevc_h_loop_filter_luma2)(uint8_t * _pix_r, -+ unsigned int _stride, unsigned int beta, unsigned int tc2, unsigned int no_f) -+{ -+ // Just call the non-2 function having massaged the parameters -+ int32_t tc[2] = {tc2 & 0xffff, tc2 >> 16}; -+ uint8_t no_p[2] = {no_f & 1, no_f & 1}; -+ uint8_t no_q[2] = {no_f & 2, no_f & 2}; -+ FUNC(hevc_h_loop_filter_luma)(_pix_r, _stride, beta, tc, no_p, no_q); -+} -+ -+#undef TP3 -+#undef TP2 -+#undef TP1 -+#undef TP0 -+#undef TQ0 -+#undef TQ1 -+#undef TQ2 -+#undef TQ3 -+ -+#undef P3 -+#undef P2 -+#undef P1 -+#undef P0 -+#undef Q0 -+#undef Q1 -+#undef Q2 -+#undef Q3 -+ -+#define P1 pix_l[0 * xstride] -+#define P0 pix_l[1 * xstride] -+#define Q0 pix_r[0 * xstride] -+#define Q1 pix_r[1 * xstride] -+ -+static void FUNC(hevc_loop_filter_uv2)(uint8_t *_pix_l, ptrdiff_t _xstride, -+ ptrdiff_t _ystride, const int32_t *_tc, -+ const uint8_t *_no_p, const uint8_t *_no_q, uint8_t *_pix_r) -+{ -+ int d, j, no_p, no_q; -+ pixel *pix_l = (pixel *)_pix_l; -+ pixel *pix_r = (pixel *)_pix_r; -+ ptrdiff_t xstride = _xstride / sizeof(pixel); -+ ptrdiff_t ystride = _ystride / sizeof(pixel); -+ -+ for (j = 0; j < 2; j++) { -+ const int tc = _tc[j] << (BIT_DEPTH - 8); -+ if (tc <= 0) { -+ pix_l += 4 * ystride; -+ pix_r += 4 * ystride; -+ continue; -+ } -+ no_p = _no_p[j]; -+ no_q = _no_q[j]; -+ -+ for (d = 0; d < 4; d++) { -+ int delta0; -+ const int p1 = P1; -+ const int p0 = P0; -+ const int q0 = Q0; -+ const int q1 = Q1; -+ delta0 = av_clip((((q0 - p0) * 4) + p1 - q1 + 4) >> 3, -tc, tc); -+ if (!no_p) -+ P0 = av_clip_pixel(p0 + delta0); -+ if (!no_q) -+ Q0 = av_clip_pixel(q0 - delta0); -+ pix_l += ystride; -+ pix_r += ystride; -+ } -+ } -+} -+ -+static void FUNC(hevc_h_loop_filter_uv)(uint8_t * pix, unsigned int stride, uint32_t tc4, -+ unsigned int no_f) -+{ -+ uint8_t no_p[2] = {no_f & 1, no_f & 2}; -+ uint8_t no_q[2] = {no_f & 4, no_f & 8}; -+ int32_t tc[4] = {tc4 & 0xff, (tc4 >> 8) & 0xff, (tc4 >> 16) & 0xff, tc4 >> 24}; -+ FUNC(hevc_loop_filter_chroma)(pix, stride, sizeof(pixel) * 2, tc, no_p, no_q); -+ FUNC(hevc_loop_filter_chroma)(pix + sizeof(pixel), stride, sizeof(pixel) * 2, tc + 2, no_p, no_q); -+} -+ -+static void FUNC(hevc_v_loop_filter_uv2)(uint8_t * src_r, unsigned int stride, uint32_t tc4, -+ uint8_t * src_l, -+ unsigned int no_f) -+{ -+ uint8_t no_p[2] = {no_f & 1, no_f & 2}; -+ uint8_t no_q[2] = {no_f & 4, no_f & 8}; -+ int32_t tc[4] = {tc4 & 0xff, (tc4 >> 8) & 0xff, (tc4 >> 16) & 0xff, tc4 >> 24}; -+ FUNC(hevc_loop_filter_uv2)(src_l, sizeof(pixel) * 2, stride, tc, no_p, no_q, src_r); -+ FUNC(hevc_loop_filter_uv2)(src_l + sizeof(pixel), sizeof(pixel) * 2, stride, tc + 2, no_p, no_q, src_r + sizeof(pixel)); -+} -+ -+#undef P1 -+#undef P0 -+#undef Q0 -+#undef Q1 -+ ---- /dev/null -+++ b/libavcodec/rpi_hevcpred.c -@@ -0,0 +1,161 @@ -+/* -+ * HEVC video Decoder -+ * -+ * Copyright (C) 2012 - 2013 Guillaume Martres -+ * Copyright (C) 2018 John Cox for Raspberry Pi (Trading) -+ * -+ * This file is part of FFmpeg. -+ * -+ * FFmpeg is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * FFmpeg is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with FFmpeg; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+ */ -+ -+#include "rpi_hevcdec.h" -+ -+#include "rpi_hevcpred.h" -+#if (ARCH_ARM) -+#include "arm/rpi_hevcpred_arm.h" -+#endif -+ -+#define PRED_C 0 -+#define BIT_DEPTH 8 -+#include "rpi_hevcpred_template.c" -+#undef BIT_DEPTH -+ -+#define BIT_DEPTH 9 -+#include "rpi_hevcpred_template.c" -+#undef BIT_DEPTH -+ -+#define BIT_DEPTH 10 -+#include "rpi_hevcpred_template.c" -+#undef BIT_DEPTH -+ -+#define BIT_DEPTH 12 -+#include "rpi_hevcpred_template.c" -+#undef BIT_DEPTH -+#undef PRED_C -+ -+#define PRED_C 1 -+#define BIT_DEPTH 8 -+#include "rpi_hevcpred_template.c" -+#undef BIT_DEPTH -+ -+#define BIT_DEPTH 9 -+#include "rpi_hevcpred_template.c" -+#undef BIT_DEPTH -+ -+#define BIT_DEPTH 10 -+#include "rpi_hevcpred_template.c" -+#undef BIT_DEPTH -+ -+#define BIT_DEPTH 12 -+#include "rpi_hevcpred_template.c" -+#undef BIT_DEPTH -+#undef PRED_C -+ -+void ff_hevc_rpi_pred_init(HEVCRpiPredContext *hpc, int bit_depth) -+{ -+#undef FUNC -+#define FUNC(a, depth) a ## _ ## depth -+ -+#undef FUNCC -+#define FUNCC(a, depth) a ## _ ## depth ## _c -+ -+#define HEVC_PRED_Y(depth) \ -+ hpc->intra_pred = FUNC(intra_pred, depth); \ -+ hpc->intra_filter[0] = FUNC(intra_filter_2, depth); \ -+ hpc->intra_filter[1] = FUNC(intra_filter_3, depth); \ -+ hpc->intra_filter[2] = FUNC(intra_filter_4, depth); \ -+ hpc->intra_filter[3] = FUNC(intra_filter_5, depth); \ -+ hpc->pred_planar[0] = FUNC(pred_planar_0, depth); \ -+ hpc->pred_planar[1] = FUNC(pred_planar_1, depth); \ -+ hpc->pred_planar[2] = FUNC(pred_planar_2, depth); \ -+ hpc->pred_planar[3] = FUNC(pred_planar_3, depth); \ -+ hpc->pred_dc[0] = FUNC(pred_dc_0, depth); \ -+ hpc->pred_dc[1] = FUNC(pred_dc_1, depth); \ -+ hpc->pred_dc[2] = FUNC(pred_dc_2, depth); \ -+ hpc->pred_dc[3] = FUNC(pred_dc_3, depth); \ -+ hpc->pred_vertical[0] = FUNC(pred_angular_0, depth); \ -+ hpc->pred_vertical[1] = FUNC(pred_angular_1, depth); \ -+ hpc->pred_vertical[2] = FUNC(pred_angular_2, depth); \ -+ hpc->pred_vertical[3] = FUNC(pred_angular_3, depth); \ -+ hpc->pred_horizontal[0] = FUNC(pred_angular_0, depth); \ -+ hpc->pred_horizontal[1] = FUNC(pred_angular_1, depth); \ -+ hpc->pred_horizontal[2] = FUNC(pred_angular_2, depth); \ -+ hpc->pred_horizontal[3] = FUNC(pred_angular_3, depth); \ -+ hpc->pred_angular[0] = FUNC(pred_angular_0, depth); \ -+ hpc->pred_angular[1] = FUNC(pred_angular_1, depth); \ -+ hpc->pred_angular[2] = FUNC(pred_angular_2, depth); \ -+ hpc->pred_angular[3] = FUNC(pred_angular_3, depth); \ -+ hpc->pred_dc0[0] = FUNC(pred_dc0_0, depth); \ -+ hpc->pred_dc0[1] = FUNC(pred_dc0_1, depth); \ -+ hpc->pred_dc0[2] = FUNC(pred_dc0_2, depth); \ -+ hpc->pred_dc0[3] = FUNC(pred_dc0_3, depth); -+ -+#define HEVC_PRED_C(depth) \ -+ hpc->intra_pred_c = FUNCC(intra_pred, depth); \ -+ hpc->intra_filter_c[0] = FUNCC(intra_filter_2, depth); \ -+ hpc->intra_filter_c[1] = FUNCC(intra_filter_3, depth); \ -+ hpc->intra_filter_c[2] = FUNCC(intra_filter_4, depth); \ -+ hpc->intra_filter_c[3] = FUNCC(intra_filter_5, depth); \ -+ hpc->pred_planar_c[0] = FUNCC(pred_planar_0, depth); \ -+ hpc->pred_planar_c[1] = FUNCC(pred_planar_1, depth); \ -+ hpc->pred_planar_c[2] = FUNCC(pred_planar_2, depth); \ -+ hpc->pred_planar_c[3] = FUNCC(pred_planar_3, depth); \ -+ hpc->pred_dc_c[0] = FUNCC(pred_dc_0, depth); \ -+ hpc->pred_dc_c[1] = FUNCC(pred_dc_1, depth); \ -+ hpc->pred_dc_c[2] = FUNCC(pred_dc_2, depth); \ -+ hpc->pred_dc_c[3] = FUNCC(pred_dc_3, depth); \ -+ hpc->pred_vertical_c[0] = FUNCC(pred_angular_0, depth); \ -+ hpc->pred_vertical_c[1] = FUNCC(pred_angular_1, depth); \ -+ hpc->pred_vertical_c[2] = FUNCC(pred_angular_2, depth); \ -+ hpc->pred_vertical_c[3] = FUNCC(pred_angular_3, depth); \ -+ hpc->pred_horizontal_c[0] = FUNCC(pred_angular_0, depth); \ -+ hpc->pred_horizontal_c[1] = FUNCC(pred_angular_1, depth); \ -+ hpc->pred_horizontal_c[2] = FUNCC(pred_angular_2, depth); \ -+ hpc->pred_horizontal_c[3] = FUNCC(pred_angular_3, depth); \ -+ hpc->pred_angular_c[0] = FUNCC(pred_angular_0, depth); \ -+ hpc->pred_angular_c[1] = FUNCC(pred_angular_1, depth); \ -+ hpc->pred_angular_c[2] = FUNCC(pred_angular_2, depth); \ -+ hpc->pred_angular_c[3] = FUNCC(pred_angular_3, depth); \ -+ hpc->pred_dc0_c[0] = FUNCC(pred_dc0_0, depth); \ -+ hpc->pred_dc0_c[1] = FUNCC(pred_dc0_1, depth); \ -+ hpc->pred_dc0_c[2] = FUNCC(pred_dc0_2, depth); \ -+ hpc->pred_dc0_c[3] = FUNCC(pred_dc0_3, depth); -+ -+#define HEVC_PRED(depth) \ -+ HEVC_PRED_Y(depth); \ -+ HEVC_PRED_C(depth); -+ -+ switch (bit_depth) { -+ case 9: -+ HEVC_PRED(9); -+ break; -+ case 10: -+ HEVC_PRED(10); -+ break; -+ case 12: -+ HEVC_PRED(12); -+ break; -+ default: -+ HEVC_PRED(8); -+ break; -+ } -+ -+#if (ARCH_ARM) -+ ff_hevc_rpi_pred_init_arm(hpc, bit_depth); -+#elif (ARCH_MIPS) -+ ff_hevc_rpi_pred_init_mips(hpc, bit_depth); -+#endif -+} ---- /dev/null -+++ b/libavcodec/rpi_hevcpred.h -@@ -0,0 +1,123 @@ -+/* -+ * HEVC video Decoder -+ * -+ * Copyright (C) 2012 - 2013 Guillaume Martres -+ * -+ * This file is part of FFmpeg. -+ * -+ * FFmpeg is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * FFmpeg is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with FFmpeg; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+ */ -+ -+#ifndef AVCODEC_RPI_HEVCPRED_H -+#define AVCODEC_RPI_HEVCPRED_H -+ -+#include -+#include -+#include "config.h" -+ -+struct HEVCRpiContext; -+struct HEVCRpiLocalContext; -+ -+enum IntraPredMode { -+ INTRA_PLANAR = 0, -+ INTRA_DC, -+ INTRA_ANGULAR_2, -+ INTRA_ANGULAR_3, -+ INTRA_ANGULAR_4, -+ INTRA_ANGULAR_5, -+ INTRA_ANGULAR_6, -+ INTRA_ANGULAR_7, -+ INTRA_ANGULAR_8, -+ INTRA_ANGULAR_9, -+ INTRA_ANGULAR_10, -+ INTRA_ANGULAR_11, -+ INTRA_ANGULAR_12, -+ INTRA_ANGULAR_13, -+ INTRA_ANGULAR_14, -+ INTRA_ANGULAR_15, -+ INTRA_ANGULAR_16, -+ INTRA_ANGULAR_17, -+ INTRA_ANGULAR_18, -+ INTRA_ANGULAR_19, -+ INTRA_ANGULAR_20, -+ INTRA_ANGULAR_21, -+ INTRA_ANGULAR_22, -+ INTRA_ANGULAR_23, -+ INTRA_ANGULAR_24, -+ INTRA_ANGULAR_25, -+ INTRA_ANGULAR_26, -+ INTRA_ANGULAR_27, -+ INTRA_ANGULAR_28, -+ INTRA_ANGULAR_29, -+ INTRA_ANGULAR_30, -+ INTRA_ANGULAR_31, -+ INTRA_ANGULAR_32, -+ INTRA_ANGULAR_33, -+ INTRA_ANGULAR_34, -+}; -+#define INTRA_ANGULAR_HORIZONTAL INTRA_ANGULAR_10 -+#define INTRA_ANGULAR_VERTICAL INTRA_ANGULAR_26 -+ -+typedef void intra_filter_fn_t( -+ uint8_t * const left, uint8_t * const top, -+ const unsigned int req, const unsigned int avail, -+ const uint8_t * const src_l, const uint8_t * const src_u, const uint8_t * const src_ur, -+ const unsigned int stride, -+ const unsigned int top_right_size, const unsigned int down_left_size); -+ -+typedef struct HEVCRpiPredContext { -+ void (*intra_pred)(const struct HEVCRpiContext * const s, -+ const enum IntraPredMode mode, const unsigned int x0, const unsigned int y0, -+ const unsigned int avail, const unsigned int log2_size); -+ -+ intra_filter_fn_t *intra_filter[4]; -+ void (*pred_planar[4])(uint8_t *src, const uint8_t *top, -+ const uint8_t *left, ptrdiff_t stride); -+ void (*pred_dc[4])(uint8_t *src, const uint8_t *top, const uint8_t *left, -+ ptrdiff_t stride); -+ void (*pred_angular[4])(uint8_t *src, const uint8_t *top, -+ const uint8_t *left, ptrdiff_t stride, -+ int mode); -+ void (*pred_vertical[4])(uint8_t *src, const uint8_t *top, -+ const uint8_t *left, ptrdiff_t stride, -+ int mode); -+ void (*pred_horizontal[4])(uint8_t *src, const uint8_t *top, -+ const uint8_t *left, ptrdiff_t stride, -+ int mode); -+ void (*pred_dc0[4])(uint8_t *src, ptrdiff_t stride); -+ -+ void (*intra_pred_c)(const struct HEVCRpiContext * const s, -+ const enum IntraPredMode mode, const unsigned int x0, const unsigned int y0, -+ const unsigned int avail, const unsigned int log2_size); -+ intra_filter_fn_t *intra_filter_c[4]; -+ void (*pred_planar_c[4])(uint8_t *src, const uint8_t *top, -+ const uint8_t *left, ptrdiff_t stride); -+ void (*pred_dc_c[4])(uint8_t *src, const uint8_t *top, const uint8_t *left, -+ ptrdiff_t stride); -+ void (*pred_angular_c[4])(uint8_t *src, const uint8_t *top, -+ const uint8_t *left, ptrdiff_t stride, -+ int mode); -+ void (*pred_vertical_c[4])(uint8_t *src, const uint8_t *top, -+ const uint8_t *left, ptrdiff_t stride, -+ int mode); -+ void (*pred_horizontal_c[4])(uint8_t *src, const uint8_t *top, -+ const uint8_t *left, ptrdiff_t stride, -+ int mode); -+ void (*pred_dc0_c[4])(uint8_t *src, ptrdiff_t stride); -+} HEVCRpiPredContext; -+ -+void ff_hevc_rpi_pred_init(HEVCRpiPredContext *hpc, int bit_depth); -+ -+#endif /* AVCODEC_RPI_HEVCPRED_H */ ---- /dev/null -+++ b/libavcodec/rpi_hevcpred_template.c -@@ -0,0 +1,1407 @@ -+/* -+ * HEVC video decoder -+ * -+ * Copyright (C) 2012 - 2013 Guillaume Martres -+ * -+ * This file is part of FFmpeg. -+ * -+ * FFmpeg is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * FFmpeg is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with FFmpeg; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+ */ -+ -+#include "config.h" -+#include "libavutil/pixdesc.h" -+#include "libavutil/rpi_sand_fns.h" -+#include "bit_depth_template.c" -+ -+#include "rpi_hevcdec.h" -+#include "rpi_hevcpred.h" -+ -+#define DUMP_PRED 0 -+ -+#define POS(x, y) src[(x) + stride * (y)] -+ -+// INCLUDED_ONCE defined at EOF -+#ifndef INCLUDED_ONCE -+typedef uint8_t (* c8_dst_ptr_t)[2]; -+typedef const uint8_t (* c8_src_ptr_t)[2]; -+typedef uint16_t (* c16_dst_ptr_t)[2]; -+typedef const uint16_t (* c16_src_ptr_t)[2]; -+ -+// *** On ARM make these NEON registers -+typedef struct pixel4_16 { -+ uint16_t x[4]; -+} pixel4_16; -+typedef struct pixel4_32 { -+ uint32_t x[4]; -+} pixel4_32; -+static inline pixel4_16 PIXEL_SPLAT_X4_16(const uint16_t x) -+{ -+ pixel4_16 t = {{x, x, x, x}}; -+ return t; -+} -+static inline pixel4_32 PIXEL_SPLAT_X4_32(const uint32_t x) -+{ -+ pixel4_32 t = {{x, x, x, x}}; -+ return t; -+} -+#endif -+ -+#if PRED_C -+// For chroma we double pixel size so we copy pairs -+#undef pixel -+#undef pixel2 -+#undef pixel4 -+#undef dctcoef -+#undef INIT_CLIP -+#undef no_rnd_avg_pixel4 -+#undef rnd_avg_pixel4 -+#undef AV_RN2P -+#undef AV_RN4P -+#undef AV_RN4PA -+#undef AV_WN2P -+#undef AV_WN4P -+#undef AV_WN4PA -+#undef CLIP -+#undef FUNC -+#undef FUNCC -+#undef av_clip_pixel -+#undef PIXEL_SPLAT_X4 -+ -+#if BIT_DEPTH == 8 -+#define pixel uint16_t -+#define pixel4 pixel4_16 -+#define PIXEL_SPLAT_X4 PIXEL_SPLAT_X4_16 -+#define cpel uint8_t -+#define c_src_ptr_t c8_src_ptr_t -+#define c_dst_ptr_t c8_dst_ptr_t -+#else -+#define pixel uint32_t -+#define pixel4 pixel4_32 -+#define PIXEL_SPLAT_X4 PIXEL_SPLAT_X4_32 -+#define cpel uint16_t -+#define c_src_ptr_t c16_dst_ptr_t -+#define c_dst_ptr_t c16_dst_ptr_t -+#endif -+#define AV_RN4P(p) (*(pixel4*)(p)) -+#define AV_WN4P(p,x) (*(pixel4*)(p) = (x)) -+#define FUNC(a) FUNC2(a, BIT_DEPTH, _c) -+#endif -+ -+ -+// Get PW prior to horrid PRED_C trickery -+#if BIT_DEPTH == 8 -+#define PW 1 -+#else -+#define PW 2 -+#endif -+ -+ -+#if DUMP_PRED && !defined(INCLUDED_ONCE) -+static void dump_pred_uv(const uint8_t * data, const unsigned int stride, const unsigned int size) -+{ -+ for (unsigned int y = 0; y != size; y++, data += stride * 2) { -+ for (unsigned int x = 0; x != size; x++) { -+ printf("%4d", data[x * 2]); -+ } -+ printf("\n"); -+ } -+ printf("\n"); -+} -+#endif -+ -+#ifndef INCLUDED_ONCE -+static inline void extend_8(void * ptr, const unsigned int v, unsigned int n) -+{ -+ if ((n >>= 2) != 0) { -+ uint32_t v4 = v | (v << 8); -+ uint32_t * p = (uint32_t *)ptr; -+ v4 = v4 | (v4 << 16); -+ do { -+ *p++ = v4; -+ } while (--n != 0); -+ } -+} -+ -+static inline void extend_16(void * ptr, const unsigned int v, unsigned int n) -+{ -+ if ((n >>= 2) != 0) { -+ uint32_t v2 = v | (v << 16); -+ uint32_t * p = (uint32_t *)ptr; -+ do { -+ *p++ = v2; -+ *p++ = v2; -+ } while (--n != 0); -+ } -+} -+ -+static inline void extend_32(void * ptr, const unsigned int v, unsigned int n) -+{ -+ if ((n >>= 2) != 0) { -+ uint32_t * p = (uint32_t *)ptr; -+ do { -+ *p++ = v; -+ *p++ = v; -+ *p++ = v; -+ *p++ = v; -+ } while (--n != 0); -+ } -+} -+ -+// Beware that this inverts the avail ordering -+// For CIP it seems easier this way round -+static unsigned int cip_avail_l(const uint8_t * is_intra, const int i_stride, const unsigned int i_mask, -+ const unsigned int log2_intra_bits, const unsigned int avail, unsigned int size, -+ unsigned int s0, unsigned int odd_s) -+{ -+ const unsigned int n = 1 << log2_intra_bits; -+ unsigned int fa = 0; -+ unsigned int i; -+ -+ size >>= 2; // Now in 4-pel units -+ s0 >>= 2; -+ -+ if ((avail & AVAIL_DL) != 0) -+ fa |= ((1 << s0) - 1) << (size - s0); -+ if ((avail & AVAIL_L) != 0) -+ fa |= ((1 << size) - 1) << size; -+ if ((avail & AVAIL_UL) != 0) -+ fa |= 1 << (size << 1); -+ -+ if (odd_s) { -+ if ((fa & 1) != 0 && (*is_intra & i_mask) == 0) -+ fa &= ~1; -+ is_intra += i_stride; -+ } -+ -+ for (i = odd_s; (fa >> i) != 0; i += n, is_intra += i_stride) { -+ const unsigned int m = ((1 << n) - 1) << i; -+ if ((fa & m) != 0 && (*is_intra & i_mask) == 0) -+ fa &= ~m; -+ } -+ -+ return fa; -+} -+ -+static unsigned int cip_avail_u(const uint8_t * is_intra, unsigned int i_shift, -+ const unsigned int log2_intra_bits, const unsigned int avail, unsigned int size, -+ unsigned int s1, unsigned int odd_s) -+{ -+ if ((avail & (AVAIL_U | AVAIL_UR)) == 0) -+ { -+ return 0; -+ } -+ else -+ { -+ const unsigned int n = 1 << log2_intra_bits; -+ unsigned int fa = 0; -+ unsigned int i; -+ unsigned int im = ((is_intra[1] << 8) | (is_intra[0])) >> i_shift; -+ -+ size >>= 2; // Now in 4-pel units -+ s1 >>= 2; -+ -+ if ((avail & AVAIL_U) != 0) -+ fa |= ((1 << size) - 1); -+ if ((avail & AVAIL_UR) != 0) -+ fa |= ((1 << s1) - 1) << size; -+ -+ if (odd_s) { -+ fa &= im | ~1; -+ im >>= 1; -+ } -+ -+ for (i = odd_s; (fa >> i) != 0; i += n, im >>= 1) { -+ const unsigned int m = ((1 << n) - 1) << i; -+ if ((im & 1) == 0) -+ fa &= ~m; -+ } -+ return fa; -+ } -+} -+ -+ -+ -+static inline unsigned int rmbd(unsigned int x) -+{ -+#if 1 -+ return __builtin_ctz(x); -+#else -+ unsigned int n = 0; -+ if ((x & 0xffff) == 0) { -+ x >>= 16; -+ n += 16; -+ } -+ if ((x & 0xff) == 0) { -+ x >>= 8; -+ n += 8; -+ } -+ if ((x & 0xf) == 0) { -+ x >>= 4; -+ n += 4; -+ } -+ if ((x & 0x3) == 0) { -+ x >>= 2; -+ n += 2; -+ } -+ -+ return (x & 1) == 0 ? n + 1 : n; -+#endif -+} -+#endif -+ -+ -+static void FUNC(cip_fill)(pixel * const left, pixel * const top, -+ const unsigned int avail_l, const unsigned int avail_u, -+ const pixel * const src_l, const pixel * const src_u, const pixel * const src_ur, -+ const unsigned int stride, -+ const unsigned int size) -+{ -+ pixel a; -+ unsigned int i; -+ -+ // 1st find DL value -+ if ((avail_l & 1) == 0) { -+ if (avail_l != 0) -+ a = src_l[((int)size * 2 - 1 - (int)rmbd(avail_l)*4) * (int)stride]; -+ else -+ { -+ // (avail_l | avail_u) != 0 so this must be good -+ const unsigned int n = rmbd(avail_u)*4; -+ a = (n >= size) ? src_ur[n - size] : src_u[n]; -+ } -+ } -+ -+ // L -+ { -+ pixel * d = left + size * 2 - 1; -+ const pixel * s = src_l + (size * 2 - 1) * stride; -+ unsigned int x = avail_l; -+ for (i = 0; i < size * 2; i += 4, x >>= 1) -+ { -+ if ((x & 1) != 0) { -+ // Avail -+ *d-- = *s; -+ s -= stride; -+ *d-- = *s; -+ s -= stride; -+ *d-- = *s; -+ s -= stride; -+ *d-- = a = *s; -+ s -= stride; -+ } -+ else -+ { -+ *d-- = a; -+ *d-- = a; -+ *d-- = a; -+ *d-- = a; -+ s -= stride * 4; -+ } -+ } -+ // UL -+ *d = a = (x & 1) != 0 ? *s : a; -+ } -+ -+ // U -+ { -+ pixel * d = top; -+ const pixel * s = src_u; -+ unsigned int x = avail_u; -+ -+ for (i = 0; i < size; i += 4, x >>= 1) -+ { -+ if ((x & 1) != 0) { -+ // Avail -+ *d++ = *s++; -+ *d++ = *s++; -+ *d++ = *s++; -+ *d++ = a = *s++; -+ } -+ else -+ { -+ *d++ = a; -+ *d++ = a; -+ *d++ = a; -+ *d++ = a; -+ s += 4; -+ } -+ } -+ -+ // UR -+ s = src_ur; -+ for (i = 0; i < size; i += 4, x >>= 1) -+ { -+ if ((x & 1) != 0) { -+ // Avail -+ *d++ = *s++; -+ *d++ = *s++; -+ *d++ = *s++; -+ *d++ = a = *s++; -+ } -+ else -+ { -+ *d++ = a; -+ *d++ = a; -+ *d++ = a; -+ *d++ = a; -+ s += 4; -+ } -+ } -+ } -+} -+ -+ -+#if !PRED_C && PW == 1 -+#define EXTEND(ptr, val, len) extend_8(ptr, val, len) -+#elif (!PRED_C && PW == 2) || (PRED_C && PW == 1) -+#define EXTEND(ptr, val, len) extend_16(ptr, val, len) -+#else -+#define EXTEND(ptr, val, len) extend_32(ptr, val, len) -+#endif -+ -+// Reqs: -+// -+// Planar: DL[0], L, ul, U, UR[0] -+// DC: dl, L, ul, U, ur -+// A2-9: DL, L, ul, u, ur -+// A10: dl, L, ul, u, ur -+// A11-17 dl, L, UL, U, ur -+// A18-25 dl, L, Ul, U, ur -+// A26 dl, l, ul, U, ur -+// A27-34 dl, l, ul, U, UR -+ -+#ifndef INCLUDED_ONCE -+ -+intra_filter_fn_t ff_hevc_rpi_intra_filter_8_neon_8; -+intra_filter_fn_t ff_hevc_rpi_intra_filter_4_neon_16; -+intra_filter_fn_t ff_hevc_rpi_intra_filter_8_neon_16; -+ -+static const uint8_t req_avail_c[35] = -+{ -+ AVAIL_DL | AVAIL_L | 0 | AVAIL_U | AVAIL_UR, // Planar (DL[0] & UR[0] only needed) -+ AVAIL_L | 0 | AVAIL_U, // DC -+ AVAIL_DL | AVAIL_L, // 2 -+ AVAIL_DL | AVAIL_L, // 3 -+ AVAIL_DL | AVAIL_L, // 4 -+ AVAIL_DL | AVAIL_L, // 5 -+ AVAIL_DL | AVAIL_L, // 6 -+ AVAIL_DL | AVAIL_L, // 7 -+ AVAIL_DL | AVAIL_L, // 8 -+ AVAIL_DL | AVAIL_L, // 9 -+ AVAIL_L, // 10 (H) -+ AVAIL_L | AVAIL_UL | AVAIL_U, // 11 -+ AVAIL_L | AVAIL_UL | AVAIL_U, // 12 -+ AVAIL_L | AVAIL_UL | AVAIL_U, // 13 -+ AVAIL_L | AVAIL_UL | AVAIL_U, // 14 -+ AVAIL_L | AVAIL_UL | AVAIL_U, // 15 -+ AVAIL_L | AVAIL_UL | AVAIL_U, // 16 -+ AVAIL_L | AVAIL_UL | AVAIL_U, // 17 -+ AVAIL_L | AVAIL_UL | AVAIL_U, // 18 -+ AVAIL_L | AVAIL_UL | AVAIL_U, // 19 -+ AVAIL_L | AVAIL_UL | AVAIL_U, // 20 -+ AVAIL_L | AVAIL_UL | AVAIL_U, // 21 -+ AVAIL_L | AVAIL_UL | AVAIL_U, // 22 -+ AVAIL_L | AVAIL_UL | AVAIL_U, // 23 -+ AVAIL_L | AVAIL_UL | AVAIL_U, // 24 -+ AVAIL_L | AVAIL_UL | AVAIL_U, // 25 -+ AVAIL_U, // 26 (V) -+ AVAIL_U | AVAIL_UR, // 27 -+ AVAIL_U | AVAIL_UR, // 28 -+ AVAIL_U | AVAIL_UR, // 29 -+ AVAIL_U | AVAIL_UR, // 30 -+ AVAIL_U | AVAIL_UR, // 31 -+ AVAIL_U | AVAIL_UR, // 32 -+ AVAIL_U | AVAIL_UR, // 33 -+ AVAIL_U | AVAIL_UR // 34 -+}; -+ -+static const uint8_t req_avail[4][35] = { -+{ -+ AVAIL_DL | AVAIL_L | 0 | AVAIL_U | AVAIL_UR, // Planar (DL[0] & UR[0] only needed) -+ AVAIL_L | 0 | AVAIL_U, // DC -+ AVAIL_DL | AVAIL_L, // 2 -+ AVAIL_DL | AVAIL_L, // 3 -+ AVAIL_DL | AVAIL_L, // 4 -+ AVAIL_DL | AVAIL_L, // 5 -+ AVAIL_DL | AVAIL_L, // 6 -+ AVAIL_DL | AVAIL_L, // 7 -+ AVAIL_DL | AVAIL_L, // 8 -+ AVAIL_DL | AVAIL_L, // 9 -+ AVAIL_L | AVAIL_UL | AVAIL_U, // 10 (H) -+ AVAIL_L | AVAIL_UL | AVAIL_U, // 11 -+ AVAIL_L | AVAIL_UL | AVAIL_U, // 12 -+ AVAIL_L | AVAIL_UL | AVAIL_U, // 13 -+ AVAIL_L | AVAIL_UL | AVAIL_U, // 14 -+ AVAIL_L | AVAIL_UL | AVAIL_U, // 15 -+ AVAIL_L | AVAIL_UL | AVAIL_U, // 16 -+ AVAIL_L | AVAIL_UL | AVAIL_U, // 17 -+ AVAIL_L | AVAIL_UL | AVAIL_U, // 18 -+ AVAIL_L | AVAIL_UL | AVAIL_U, // 19 -+ AVAIL_L | AVAIL_UL | AVAIL_U, // 20 -+ AVAIL_L | AVAIL_UL | AVAIL_U, // 21 -+ AVAIL_L | AVAIL_UL | AVAIL_U, // 22 -+ AVAIL_L | AVAIL_UL | AVAIL_U, // 23 -+ AVAIL_L | AVAIL_UL | AVAIL_U, // 24 -+ AVAIL_L | AVAIL_UL | AVAIL_U, // 25 -+ AVAIL_L | AVAIL_UL | AVAIL_U, // 26 (V) -+ AVAIL_U | AVAIL_UR, // 27 -+ AVAIL_U | AVAIL_UR, // 28 -+ AVAIL_U | AVAIL_UR, // 29 -+ AVAIL_U | AVAIL_UR, // 30 -+ AVAIL_U | AVAIL_UR, // 31 -+ AVAIL_U | AVAIL_UR, // 32 -+ AVAIL_U | AVAIL_UR, // 33 -+ AVAIL_U | AVAIL_UR // 34 -+}, -+{ // 3 -+ AVAIL_DL | AVAIL_L | 0 | AVAIL_U | AVAIL_UR | FILTER_LIGHT, // Planar (DL[0] & UR[0] only needed) -+ AVAIL_L | 0 | AVAIL_U, // DC -+ AVAIL_DL | AVAIL_L | FILTER_LIGHT, // 2 -+ AVAIL_DL | AVAIL_L | 0, // 3 -+ AVAIL_DL | AVAIL_L | 0, // 4 -+ AVAIL_DL | AVAIL_L | 0, // 5 -+ AVAIL_DL | AVAIL_L | 0, // 6 -+ AVAIL_DL | AVAIL_L | 0, // 7 -+ AVAIL_DL | AVAIL_L | 0, // 8 -+ AVAIL_DL | AVAIL_L | 0, // 9 -+ AVAIL_L | AVAIL_UL | AVAIL_U | 0, // 10 (H) -+ AVAIL_L | AVAIL_UL | AVAIL_U | 0, // 11 -+ AVAIL_L | AVAIL_UL | AVAIL_U | 0, // 12 -+ AVAIL_L | AVAIL_UL | AVAIL_U | 0, // 13 -+ AVAIL_L | AVAIL_UL | AVAIL_U | 0, // 14 -+ AVAIL_L | AVAIL_UL | AVAIL_U | 0, // 15 -+ AVAIL_L | AVAIL_UL | AVAIL_U | 0, // 16 -+ AVAIL_L | AVAIL_UL | AVAIL_U | 0, // 17 -+ AVAIL_L | AVAIL_UL | AVAIL_U | FILTER_LIGHT, // 18 -+ AVAIL_L | AVAIL_UL | AVAIL_U | 0, // 19 -+ AVAIL_L | AVAIL_UL | AVAIL_U | 0, // 20 -+ AVAIL_L | AVAIL_UL | AVAIL_U | 0, // 21 -+ AVAIL_L | AVAIL_UL | AVAIL_U | 0, // 22 -+ AVAIL_L | AVAIL_UL | AVAIL_U | 0, // 23 -+ AVAIL_L | AVAIL_UL | AVAIL_U | 0, // 24 -+ AVAIL_L | AVAIL_UL | AVAIL_U | 0, // 25 -+ AVAIL_L | AVAIL_UL | AVAIL_U | 0, // 26 (V) -+ AVAIL_U | AVAIL_UR | 0, // 27 -+ AVAIL_U | AVAIL_UR | 0, // 28 -+ AVAIL_U | AVAIL_UR | 0, // 29 -+ AVAIL_U | AVAIL_UR | 0, // 30 -+ AVAIL_U | AVAIL_UR | 0, // 31 -+ AVAIL_U | AVAIL_UR | 0, // 32 -+ AVAIL_U | AVAIL_UR | 0, // 33 -+ AVAIL_U | AVAIL_UR | FILTER_LIGHT // 34 -+}, -+{ // 4 -+ AVAIL_DL | AVAIL_L | 0 | AVAIL_U | AVAIL_UR | FILTER_LIGHT, // Planar (DL[0] & UR[0] only needed) -+ AVAIL_L | 0 | AVAIL_U, // DC -+ AVAIL_DL | AVAIL_L | FILTER_LIGHT, // 2 -+ AVAIL_DL | AVAIL_L | FILTER_LIGHT, // 3 -+ AVAIL_DL | AVAIL_L | FILTER_LIGHT, // 4 -+ AVAIL_DL | AVAIL_L | FILTER_LIGHT, // 5 -+ AVAIL_DL | AVAIL_L | FILTER_LIGHT, // 6 -+ AVAIL_DL | AVAIL_L | FILTER_LIGHT, // 7 -+ AVAIL_DL | AVAIL_L | FILTER_LIGHT, // 8 -+ AVAIL_DL | AVAIL_L | 0, // 9 -+ AVAIL_L | AVAIL_UL | AVAIL_U | 0, // 10 (H) -+ AVAIL_L | AVAIL_UL | AVAIL_U | 0, // 11 -+ AVAIL_L | AVAIL_UL | AVAIL_U | FILTER_LIGHT, // 12 -+ AVAIL_L | AVAIL_UL | AVAIL_U | FILTER_LIGHT, // 13 -+ AVAIL_L | AVAIL_UL | AVAIL_U | FILTER_LIGHT, // 14 -+ AVAIL_L | AVAIL_UL | AVAIL_U | FILTER_LIGHT, // 15 -+ AVAIL_L | AVAIL_UL | AVAIL_U | FILTER_LIGHT, // 16 -+ AVAIL_L | AVAIL_UL | AVAIL_U | FILTER_LIGHT, // 17 -+ AVAIL_L | AVAIL_UL | AVAIL_U | FILTER_LIGHT, // 18 -+ AVAIL_L | AVAIL_UL | AVAIL_U | FILTER_LIGHT, // 19 -+ AVAIL_L | AVAIL_UL | AVAIL_U | FILTER_LIGHT, // 20 -+ AVAIL_L | AVAIL_UL | AVAIL_U | FILTER_LIGHT, // 21 -+ AVAIL_L | AVAIL_UL | AVAIL_U | FILTER_LIGHT, // 22 -+ AVAIL_L | AVAIL_UL | AVAIL_U | FILTER_LIGHT, // 23 -+ AVAIL_L | AVAIL_UL | AVAIL_U | FILTER_LIGHT, // 24 -+ AVAIL_L | AVAIL_UL | AVAIL_U | 0, // 25 -+ AVAIL_L | AVAIL_UL | AVAIL_U | 0, // 26 (V) -+ AVAIL_U | AVAIL_UR | 0, // 27 -+ AVAIL_U | AVAIL_UR | FILTER_LIGHT, // 28 -+ AVAIL_U | AVAIL_UR | FILTER_LIGHT, // 29 -+ AVAIL_U | AVAIL_UR | FILTER_LIGHT, // 30 -+ AVAIL_U | AVAIL_UR | FILTER_LIGHT, // 31 -+ AVAIL_U | AVAIL_UR | FILTER_LIGHT, // 32 -+ AVAIL_U | AVAIL_UR | FILTER_LIGHT, // 33 -+ AVAIL_U | AVAIL_UR | FILTER_LIGHT // 34 -+}, -+{ // 5 -+ AVAIL_DL | AVAIL_L | 0 | AVAIL_U | AVAIL_UR | FILTER_EITHER, // Planar (DL[0] & UR[0] only needed) -+ AVAIL_L | 0 | AVAIL_U, // DC -+ AVAIL_DL | AVAIL_L | FILTER_EITHER, // 2 -+ AVAIL_DL | AVAIL_L | FILTER_EITHER, // 3 -+ AVAIL_DL | AVAIL_L | FILTER_EITHER, // 4 -+ AVAIL_DL | AVAIL_L | FILTER_EITHER, // 5 -+ AVAIL_DL | AVAIL_L | FILTER_EITHER, // 6 -+ AVAIL_DL | AVAIL_L | FILTER_EITHER, // 7 -+ AVAIL_DL | AVAIL_L | FILTER_EITHER, // 8 -+ AVAIL_DL | AVAIL_L | FILTER_EITHER, // 9 -+ AVAIL_L | 0, // 10 (H) -+ AVAIL_L | AVAIL_UL | AVAIL_U | FILTER_EITHER, // 11 -+ AVAIL_L | AVAIL_UL | AVAIL_U | FILTER_EITHER, // 12 -+ AVAIL_L | AVAIL_UL | AVAIL_U | FILTER_EITHER, // 13 -+ AVAIL_L | AVAIL_UL | AVAIL_U | FILTER_EITHER, // 14 -+ AVAIL_L | AVAIL_UL | AVAIL_U | FILTER_EITHER, // 15 -+ AVAIL_L | AVAIL_UL | AVAIL_U | FILTER_EITHER, // 16 -+ AVAIL_L | AVAIL_UL | AVAIL_U | FILTER_EITHER, // 17 -+ AVAIL_L | AVAIL_UL | AVAIL_U | FILTER_EITHER, // 18 -+ AVAIL_L | AVAIL_UL | AVAIL_U | FILTER_EITHER, // 19 -+ AVAIL_L | AVAIL_UL | AVAIL_U | FILTER_EITHER, // 20 -+ AVAIL_L | AVAIL_UL | AVAIL_U | FILTER_EITHER, // 21 -+ AVAIL_L | AVAIL_UL | AVAIL_U | FILTER_EITHER, // 22 -+ AVAIL_L | AVAIL_UL | AVAIL_U | FILTER_EITHER, // 23 -+ AVAIL_L | AVAIL_UL | AVAIL_U | FILTER_EITHER, // 24 -+ AVAIL_L | AVAIL_UL | AVAIL_U | FILTER_EITHER, // 25 -+ AVAIL_U | 0, // 26 (V) -+ AVAIL_U | AVAIL_UR | FILTER_EITHER, // 27 -+ AVAIL_U | AVAIL_UR | FILTER_EITHER, // 28 -+ AVAIL_U | AVAIL_UR | FILTER_EITHER, // 29 -+ AVAIL_U | AVAIL_UR | FILTER_EITHER, // 30 -+ AVAIL_U | AVAIL_UR | FILTER_EITHER, // 31 -+ AVAIL_U | AVAIL_UR | FILTER_EITHER, // 32 -+ AVAIL_U | AVAIL_UR | FILTER_EITHER, // 33 -+ AVAIL_U | AVAIL_UR | FILTER_EITHER // 34 -+} -+}; -+ -+ -+#endif -+ -+#define filter_light1 FUNC(filter_light1) -+static inline pixel filter_light1(pixel a, pixel b, pixel c) -+{ -+ return (a + b*2 + c + 2) >> 2; -+} -+ -+#define filter_light FUNC(filter_light) -+static inline void filter_light(pixel * dst, pixel p1, const pixel * src, const pixel pn, const int sstride, const unsigned int n) -+{ -+ pixel p0; -+ pixel p2 = *src; -+ // Allow for final pel - it is just clearer to to have the call take the actual number of output pels -+ unsigned int n_minus_1 = n - 1; -+ -+ do -+ { -+ src += sstride; -+ p0 = p1; -+ p1 = p2; -+ p2 = *src; -+ *dst++ = filter_light1(p0, p1, p2); -+ } while (--n_minus_1 != 0); -+ *dst = filter_light1(p1, p2, pn); -+} -+ -+#define filter_strong FUNC(filter_strong) -+static inline void filter_strong(pixel * dst, const unsigned int p0, const unsigned int p1, unsigned int n) -+{ -+ unsigned int a = 64 * p0 + 32; -+ const int v = p1 - p0; -+ -+ do -+ { -+ *dst++ = (a += v) >> 6; -+ } while (--n != 0); -+} -+ -+#define intra_filter FUNC(intra_filter) -+static av_always_inline void intra_filter( -+ pixel * const left, pixel * const top, -+ const unsigned int req, const unsigned int avail, -+ const pixel * const src_l, const pixel * const src_u, const pixel * const src_ur, -+ const unsigned int stride, -+ const unsigned int top_right_size, const unsigned int down_left_size, -+ const unsigned int log2_size) -+{ -+ const unsigned int strong_threshold = 1 << (BIT_DEPTH - 5); -+ const unsigned int size = 1 << log2_size; -+ -+ // a_ is the first pel in a section working round dl -> ur -+ // b_ is the last -+ // Beware that top & left work out from UL so usage of a_ & b_ may -+ // swap between them. It is a bad naming scheme but I have found no -+ // better -+ const pixel * a_dl = src_l + (down_left_size + size - 1) * stride; -+ const pixel * b_dl = src_l + size * stride; -+ const pixel * a_l = src_l + (size - 1) * stride; -+ const pixel * b_l = src_l; -+ const pixel * ab_ul = src_l - stride; -+ const pixel * a_u = src_u; -+ const pixel * b_u = src_u + size - 1; -+ const pixel * a_ur = src_ur; -+ const pixel * b_ur = src_ur + top_right_size - 1; -+ -+ const unsigned int want = req & ~avail; -+ const unsigned int have = req & avail; -+ unsigned int i; -+ -+ if ((avail & AVAIL_DL) == 0) -+ { -+ a_dl = a_ur; -+ if ((avail & AVAIL_U) != 0) -+ a_dl = a_u; -+ if ((avail & AVAIL_UL) != 0) -+ a_dl = ab_ul; -+ if ((avail & AVAIL_L) != 0) -+ a_dl = a_l; -+ b_dl = a_dl; -+ } -+ -+ if ((avail & AVAIL_L) == 0) -+ { -+ a_l = b_dl; -+ b_l = b_dl; -+ } -+ if ((avail & AVAIL_UL) == 0) -+ { -+ ab_ul = b_l; -+ } -+ if ((avail & AVAIL_U) == 0) -+ { -+ a_u = ab_ul; -+ b_u = ab_ul; -+ } -+ if ((avail & AVAIL_UR) == 0) -+ { -+ a_ur = b_u; -+ b_ur = b_u; -+ } -+ -+ if ((req & FILTER_LIGHT) == 0 || PRED_C || log2_size == 2) // PRED_C, log2_size compiler opt hints -+ { -+ if ((req & AVAIL_UL) != 0) -+ left[-1] = *ab_ul; -+ -+ if ((want & AVAIL_L) != 0) -+ EXTEND(left, *a_l, size); -+ if ((want & AVAIL_DL) != 0) -+ EXTEND(left + size, *a_dl, size); -+ if ((want & AVAIL_U) != 0) -+ EXTEND(top, *a_u, size); -+ if ((want & AVAIL_UR) != 0) -+ EXTEND(top + size, *a_ur, size); -+ -+ if ((have & AVAIL_U) != 0) -+ // Always good - even with sand -+ memcpy(top, a_u, size * sizeof(pixel)); -+ if ((have & AVAIL_UR) != 0) -+ { -+ memcpy(top + size, a_ur, top_right_size * sizeof(pixel)); -+ EXTEND(top + size + top_right_size, *b_ur, -+ size - top_right_size); -+ } -+ if ((have & AVAIL_L) != 0) -+ { -+ for (i = 0; i < size; i++) -+ left[i] = b_l[stride * i]; -+ } -+ if ((have & AVAIL_DL) != 0) -+ { -+ for (i = 0; i < down_left_size; i++) -+ left[i + size] = b_dl[stride * i]; -+ EXTEND(left + size + down_left_size, *a_dl, -+ size - down_left_size); -+ } -+ } -+ else if ((req & FILTER_STRONG) != 0 && log2_size == 5 && // log2_size compiler opt hint -+ FFABS((int)(*a_dl - *a_l * 2 + *ab_ul)) < strong_threshold && -+ FFABS((int)(*ab_ul - *b_u * 2 + *b_ur)) < strong_threshold) -+ { -+ if ((req & (AVAIL_U | AVAIL_UR)) != 0) -+ filter_strong(top, *ab_ul, *b_ur, size * 2); -+ left[-1] = *ab_ul; -+ if ((req & (AVAIL_L | AVAIL_DL)) != 0) -+ filter_strong(left, *ab_ul, *a_dl, size*2); -+ } -+ else -+ { -+ // Same code for both have & want for UL -+ if ((req & AVAIL_UL) != 0) -+ { -+ left[-1] = filter_light1(*b_l, *ab_ul, *a_u); -+ } -+ -+ if ((want & AVAIL_L) != 0) -+ { -+ EXTEND(left, *a_l, size); -+ left[0] = (*a_l * 3 + *ab_ul + 2) >> 2; -+ } -+ if ((want & AVAIL_DL) != 0) -+ { -+ // If we want DL then it cannot be avail so a_dl = a_l so no edge rounding -+ EXTEND(left + size, *a_l, size); -+ } -+ if ((want & AVAIL_U) != 0) -+ { -+ EXTEND(top, *a_u, size); -+ top[size - 1] = (*a_u * 3 + *a_ur + 2) >> 2; -+ } -+ if ((want & AVAIL_UR) != 0) -+ { -+ // If we want UR then it cannot be avail so a_ur = b_u so no edge rounding -+ EXTEND(top + size, *a_ur, size); -+ } -+ -+ if ((have & AVAIL_U) != 0) -+ { -+ filter_light(top, *ab_ul, a_u, *a_ur, 1, size); -+ } -+ if ((have & AVAIL_UR) != 0) { -+ filter_light(top + size, *b_u, a_ur, *b_ur, 1, top_right_size); -+ top[size*2 - 1] = *b_ur; -+ EXTEND(top + size + top_right_size, *b_ur, size - top_right_size); -+ } -+ if ((have & AVAIL_L) != 0) -+ { -+ filter_light(left, *ab_ul, b_l, *b_dl, stride, size); -+ } -+ if ((have & AVAIL_DL) != 0) -+ { -+ filter_light(left + size, *a_l, b_dl, *a_dl, stride, down_left_size); -+ left[size*2 - 1] = *a_dl; -+ EXTEND(left + size + down_left_size, *a_dl, size - down_left_size); -+ } -+ } -+} -+ -+#define INTRA_FILTER(log2_size) \ -+static void FUNC(intra_filter_ ## log2_size)( \ -+ uint8_t * const left, uint8_t * const top, \ -+ const unsigned int req, const unsigned int avail, \ -+ const uint8_t * const src_l, const uint8_t * const src_u, const uint8_t * const src_ur, \ -+ const unsigned int stride, \ -+ const unsigned int top_right_size, const unsigned int down_left_size) \ -+{ \ -+ intra_filter((pixel *)left, (pixel *)top, req, avail, \ -+ (const pixel *)src_l, (const pixel *)src_u, (const pixel *)src_ur, stride / sizeof(pixel), top_right_size, down_left_size, log2_size); \ -+} -+ -+INTRA_FILTER(2) -+INTRA_FILTER(3) -+INTRA_FILTER(4) -+INTRA_FILTER(5) -+ -+#undef intra_filter -+#undef INTRA_FILTER -+ -+static void FUNC(intra_pred)(const HEVCRpiContext * const s, -+ const enum IntraPredMode mode, const unsigned int x0, const unsigned int y0, const unsigned int avail, -+ const unsigned int log2_size) -+{ -+ // c_idx will alaways be 1 for _c versions and 0 for y -+ const unsigned int c_idx = PRED_C; -+ const unsigned int hshift = ctx_hshift(s, c_idx); -+ const unsigned int vshift = ctx_vshift(s, c_idx); -+ const unsigned int size = (1 << log2_size); -+ const unsigned int x = x0 >> hshift; -+ const unsigned int y = y0 >> vshift; -+ -+ const ptrdiff_t stride = frame_stride1(s->frame, c_idx) / sizeof(pixel); -+ pixel *const src = c_idx == 0 ? -+ (pixel *)av_rpi_sand_frame_pos_y(s->frame, x, y) : -+ (pixel *)av_rpi_sand_frame_pos_c(s->frame, x, y); -+ -+ // Align so we can do multiple loads in the asm -+ // Padded to 16 byte boundary so as not to confuse anything -+ DECLARE_ALIGNED(16, pixel, top[2 * MAX_TB_SIZE]); -+ DECLARE_ALIGNED(16, pixel, left_array[2 * MAX_TB_SIZE + 16 / sizeof(pixel)]); -+ -+ pixel * const left = left_array + 16 / sizeof(pixel); -+ const pixel * top_pred = top; -+ -+ const pixel * src_l = src - 1; -+ const pixel * src_u = src - stride; -+ const pixel * src_ur = src_u + size; -+#if !PRED_C -+ const unsigned int req = req_avail[log2_size - 2][mode] & ~s->ps.sps->intra_filters_disable; -+#else -+ const unsigned int req = req_avail_c[mode]; -+#endif -+ -+ // If we have nothing to pred from then fill with grey -+ // This isn't a common case but dealing with it here means we don't have to -+ // test for it later -+ if (avail == 0) -+ { -+dc_only: -+#if !PRED_C -+ s->hpc.pred_dc0[log2_size - 2]((uint8_t *)src, stride); -+#else -+ s->hpc.pred_dc0_c[log2_size - 2]((uint8_t *)src, stride); -+#endif -+ return; -+ } -+ -+ { -+ // N.B. stride is in pixels (not bytes) or in the case of chroma pixel-pairs -+ const AVFrame * const frame = s->frame; -+ const unsigned int mask = stride - 1; // For chroma pixel=uint16 so stride_c is stride_y / 2 -+ const unsigned int stripe_adj = (av_rpi_sand_frame_stride2(frame) - 1) * stride; -+ if ((x & mask) == 0) -+ src_l -= stripe_adj; -+ if (((x + size) & mask) == 0) -+ src_ur += stripe_adj; -+ } -+ -+ // Can deal with I-slices in 'normal' code even if CIP -+ // This also means that we don't need to generate (elsewhere) is_intra -+ // for IRAP frames -+ if (s->ps.pps->constrained_intra_pred_flag == 1 && -+ s->sh.slice_type != HEVC_SLICE_I) -+ { -+ // * If we ever actually care about CIP performance then we should -+ // special case out size 4 stuff (can be done by 'normal') and -+ // have 8-pel avail masks -+ unsigned int avail_l = cip_avail_l(s->is_intra + ((y + size * 2 - 1) >> (3 - vshift)) * s->ps.sps->pcm_width + ((x - 1) >> (6 - hshift)), -+ -(int)(s->ps.sps->pcm_width), -+ 1 << (((x - 1) >> (3 - hshift)) & 7), -+ 1 - hshift, -+ avail, -+ size, -+ FFMIN(size, ((s->ps.sps->height - y0) >> vshift) - size), -+ vshift != 0 ? 0 : (y >> 2) & 1); -+ -+ unsigned int avail_u = cip_avail_u(s->is_intra + ((y - 1) >> (3 - vshift)) * s->ps.sps->pcm_width + (x >> (6 - hshift)), -+ (x >> (3 - hshift)) & 7, -+ 1 - hshift, -+ avail, -+ size, -+ FFMIN(size, ((s->ps.sps->width - x0) >> hshift) - size), -+ hshift != 0 ? 0 : (x >> 2) & 1); -+ -+ // Anything left? -+ if ((avail_l | avail_u) == 0) -+ goto dc_only; -+ -+ FUNC(cip_fill)(left, top, avail_l, avail_u, src_l, src_u, src_ur, stride, size); -+ -+#if !PRED_C -+ if ((req & FILTER_LIGHT) != 0) -+ { -+ const unsigned threshold = 1 << (BIT_DEPTH - 5); -+ if ((req & FILTER_STRONG) != 0 && -+ (int)(FFABS(left[-1] + top[63] - 2 * top[31])) < threshold && -+ (int)(FFABS(left[-1] + left[63] - 2 * left[31])) < threshold) -+ { -+ filter_strong(top, left[-1], top[63], 64); -+ filter_strong(left, left[-1], left[63], 64); -+ } else -+ { -+ // LHS writes UL too so copy for top -+ const pixel p_ul = left[-1]; -+ filter_light(left - 1, top[0], left - 1, left[2*size - 1], 1, 2*size); -+ filter_light(top, p_ul, top, top[2*size - 1], 1, 2*size - 1); -+ } -+ } -+#endif -+ } -+ else -+ { -+ const unsigned int ur_size = FFMIN(size, ((s->ps.sps->width - x0) >> hshift) - size); -+ if ((req & ~((AVAIL_UR | AVAIL_U) & avail)) == 0 && -+ ((req & AVAIL_UR) == 0 || src_u + 2*size == src_ur + ur_size)) -+ { -+ top_pred = src_u; -+ } -+ else -+ { -+#if !PRED_C -+ s->hpc.intra_filter[log2_size - 2] -+#else -+ s->hpc.intra_filter_c[log2_size - 2] -+#endif -+ ((uint8_t *)left, (uint8_t *)top, req, avail, -+ (const uint8_t *)src_l, (const uint8_t *)src_u, (const uint8_t *)src_ur, stride * sizeof(pixel), -+ ur_size, -+ FFMIN(size, ((s->ps.sps->height - y0) >> vshift) - size)); -+ } -+ } -+ -+ -+#if !PRED_C -+ switch (mode) { -+ case INTRA_PLANAR: -+ s->hpc.pred_planar[log2_size - 2]((uint8_t *)src, (uint8_t *)top_pred, -+ (uint8_t *)left, stride); -+ break; -+ case INTRA_DC: -+ s->hpc.pred_dc[log2_size - 2]((uint8_t *)src, (uint8_t *)top_pred, -+ (uint8_t *)left, stride); -+ break; -+ case INTRA_ANGULAR_HORIZONTAL: -+ s->hpc.pred_horizontal[log2_size - 2]((uint8_t *)src, (uint8_t *)top_pred, -+ (uint8_t *)left, stride, -+ mode); -+ break; -+ case INTRA_ANGULAR_VERTICAL: -+ s->hpc.pred_vertical[log2_size - 2]((uint8_t *)src, (uint8_t *)top_pred, -+ (uint8_t *)left, stride, -+ mode); -+ break; -+ default: -+ s->hpc.pred_angular[log2_size - 2]((uint8_t *)src, (uint8_t *)top_pred, -+ (uint8_t *)left, stride, -+ mode); -+ break; -+ } -+#else -+ switch (mode) { -+ case INTRA_PLANAR: -+ s->hpc.pred_planar_c[log2_size - 2]((uint8_t *)src, (uint8_t *)top_pred, -+ (uint8_t *)left, stride); -+ break; -+ case INTRA_DC: -+ s->hpc.pred_dc_c[log2_size - 2]((uint8_t *)src, (uint8_t *)top_pred, -+ (uint8_t *)left, stride); -+ break; -+ case INTRA_ANGULAR_HORIZONTAL: -+ s->hpc.pred_horizontal_c[log2_size - 2]((uint8_t *)src, (uint8_t *)top_pred, -+ (uint8_t *)left, stride, -+ mode); -+ break; -+ case INTRA_ANGULAR_VERTICAL: -+ s->hpc.pred_vertical_c[log2_size - 2]((uint8_t *)src, (uint8_t *)top_pred, -+ (uint8_t *)left, stride, -+ mode); -+ break; -+ default: -+ s->hpc.pred_angular_c[log2_size - 2]((uint8_t *)src, (uint8_t *)top_pred, -+ (uint8_t *)left, stride, -+ mode); -+ break; -+ } -+ -+#if DUMP_PRED -+ printf("U pred @ %d, %d: mode=%d\n", x, y, mode); -+ dump_pred_uv((uint8_t *)src, stride, 1 << log2_size); -+ printf("V pred @ %d, %d: mode=%d\n", x, y, mode); -+ dump_pred_uv((uint8_t *)src + 1, stride, 1 << log2_size); -+#endif -+#endif -+} -+ -+#if !PRED_C -+static av_always_inline void FUNC(pred_planar)(uint8_t *_src, const uint8_t *_top, -+ const uint8_t *_left, ptrdiff_t stride, -+ int trafo_size) -+{ -+ int x, y; -+ pixel *src = (pixel *)_src; -+ const pixel *top = (const pixel *)_top; -+ const pixel *left = (const pixel *)_left; -+ int size = 1 << trafo_size; -+ for (y = 0; y < size; y++) -+ for (x = 0; x < size; x++) -+ POS(x, y) = ((size - 1 - x) * left[y] + (x + 1) * top[size] + -+ (size - 1 - y) * top[x] + (y + 1) * left[size] + size) >> (trafo_size + 1); -+} -+#else -+static av_always_inline void FUNC(pred_planar)(uint8_t * _src, const uint8_t * _top, -+ const uint8_t * _left, ptrdiff_t stride, -+ int trafo_size) -+{ -+ int x, y; -+ int size = 1 << trafo_size; -+ c_dst_ptr_t src = (c_dst_ptr_t)_src; -+ const c_src_ptr_t top = (c_src_ptr_t)_top; -+ const c_src_ptr_t left = (c_src_ptr_t)_left; -+ -+ for (y = 0; y < size; y++, src += stride) -+ { -+ for (x = 0; x < size; x++) -+ { -+ src[x][0] = ((size - 1 - x) * left[y][0] + (x + 1) * top[size][0] + -+ (size - 1 - y) * top[x][0] + (y + 1) * left[size][0] + size) >> (trafo_size + 1); -+ src[x][1] = ((size - 1 - x) * left[y][1] + (x + 1) * top[size][1] + -+ (size - 1 - y) * top[x][1] + (y + 1) * left[size][1] + size) >> (trafo_size + 1); -+ } -+ } -+} -+#endif -+ -+#define PRED_PLANAR(size)\ -+static void FUNC(pred_planar_ ## size)(uint8_t *src, const uint8_t *top, \ -+ const uint8_t *left, ptrdiff_t stride) \ -+{ \ -+ FUNC(pred_planar)(src, top, left, stride, size + 2); \ -+} -+ -+PRED_PLANAR(0) -+PRED_PLANAR(1) -+PRED_PLANAR(2) -+PRED_PLANAR(3) -+ -+#undef PRED_PLANAR -+ -+#if !PRED_C -+static void FUNC(pred_dc)(uint8_t *_src, const uint8_t *_top, -+ const uint8_t *_left, -+ ptrdiff_t stride, int log2_size) -+{ -+ int i, j, x, y; -+ int size = (1 << log2_size); -+ pixel *src = (pixel *)_src; -+ const pixel *top = (const pixel *)_top; -+ const pixel *left = (const pixel *)_left; -+ int dc = size; -+ pixel4 a; -+ for (i = 0; i < size; i++) -+ dc += left[i] + top[i]; -+ -+ dc >>= log2_size + 1; -+ -+ a = PIXEL_SPLAT_X4(dc); -+ -+ for (i = 0; i < size; i++) -+ for (j = 0; j < size; j+=4) -+ AV_WN4P(&POS(j, i), a); -+ -+// if (c_idx == 0 && size < 32) -+// As we now have separate fns for y & c - no need to test that -+ if (size < 32) -+ { -+ POS(0, 0) = (left[0] + 2 * dc + top[0] + 2) >> 2; -+ for (x = 1; x < size; x++) -+ POS(x, 0) = (top[x] + 3 * dc + 2) >> 2; -+ for (y = 1; y < size; y++) -+ POS(0, y) = (left[y] + 3 * dc + 2) >> 2; -+ } -+} -+#else -+static void FUNC(pred_dc)(uint8_t *_src, const uint8_t *_top, -+ const uint8_t *_left, -+ ptrdiff_t stride, int log2_size) -+{ -+ unsigned int i, j; -+ const unsigned int size = (1 << log2_size); -+ c_dst_ptr_t src = (c_dst_ptr_t)_src; -+ const c_src_ptr_t top = (c_src_ptr_t)_top; -+ const c_src_ptr_t left = (c_src_ptr_t)_left; -+ unsigned int dc0 = size; -+ unsigned int dc1 = size; -+ -+ for (i = 0; i < size; i++) -+ { -+ dc0 += left[i][0] + top[i][0]; -+ dc1 += left[i][1] + top[i][1]; -+ } -+ -+ dc0 >>= log2_size + 1; -+ dc1 >>= log2_size + 1; -+ -+ for (i = 0; i < size; i++, src += stride) -+ { -+ for (j = 0; j < size; ++j) -+ { -+ src[j][0] = dc0; -+ src[j][1] = dc1; -+ -+ } -+ } -+} -+#endif -+ -+#define PRED_DC(size)\ -+static void FUNC(pred_dc_ ## size)(uint8_t *src, const uint8_t *top, \ -+ const uint8_t *left, ptrdiff_t stride) \ -+{ \ -+ FUNC(pred_dc)(src, top, left, stride, size + 2); \ -+} -+ -+PRED_DC(0) -+PRED_DC(1) -+PRED_DC(2) -+PRED_DC(3) -+ -+#undef PRED_DC -+ -+ -+ -+ -+#if !PRED_C -+static void FUNC(pred_dc0)(uint8_t *_src, ptrdiff_t stride, int log2_size) -+{ -+ int i, j; -+ int size = (1 << log2_size); -+ pixel *src = (pixel *)_src; -+ pixel4 a = PIXEL_SPLAT_X4(1 << (BIT_DEPTH - 1)); -+ -+ for (i = 0; i < size; i++) -+ for (j = 0; j < size; j+=4) -+ AV_WN4P(&POS(j, i), a); -+} -+#else -+static void FUNC(pred_dc0)(uint8_t *_src, ptrdiff_t stride, int log2_size) -+{ -+ unsigned int i, j; -+ const unsigned int size = (1 << log2_size); -+ c_dst_ptr_t src = (c_dst_ptr_t)_src; -+ const pixel a = (1 << (BIT_DEPTH - 1)); -+ -+ for (i = 0; i < size; i++, src += stride) -+ { -+ for (j = 0; j < size; ++j) -+ { -+ src[j][0] = a; -+ src[j][1] = a; -+ } -+ } -+} -+#endif -+ -+#define PRED_DC0(size)\ -+static void FUNC(pred_dc0_ ## size)(uint8_t *src, ptrdiff_t stride) \ -+{ \ -+ FUNC(pred_dc0)(src, stride, size + 2); \ -+} -+ -+PRED_DC0(0) -+PRED_DC0(1) -+PRED_DC0(2) -+PRED_DC0(3) -+ -+#undef PRED_DC0 -+ -+ -+ -+ -+#ifndef ANGLE_CONSTS -+#define ANGLE_CONSTS -+static const int intra_pred_angle[] = { -+ 32, 26, 21, 17, 13, 9, 5, 2, 0, -2, -5, -9, -13, -17, -21, -26, -32, -+ -26, -21, -17, -13, -9, -5, -2, 0, 2, 5, 9, 13, 17, 21, 26, 32 -+}; -+static const int inv_angle[] = { -+ -4096, -1638, -910, -630, -482, -390, -315, -256, -315, -390, -482, -+ -630, -910, -1638, -4096 -+}; -+#endif -+ -+#if !PRED_C -+static av_always_inline void FUNC(pred_angular)(uint8_t *_src, -+ const uint8_t *_top, -+ const uint8_t *_left, -+ ptrdiff_t stride, -+ int mode, int size) -+{ -+ int x, y; -+ pixel *src = (pixel *)_src; -+ const pixel *top = (const pixel *)_top; -+ const pixel *left = (const pixel *)_left; -+ -+ int angle = intra_pred_angle[mode - 2]; -+ pixel ref_array[3 * MAX_TB_SIZE + 4]; -+ pixel *ref_tmp = ref_array + size; -+ const pixel *ref; -+ int last = (size * angle) >> 5; -+ -+ if (mode >= 18) { -+ ref = top - 1; -+ -+ if (angle < 0) -+ { -+ memcpy(ref_tmp + 1, top, size * PW); -+ ref_tmp[0] = left[-1]; -+ -+ for (x = last; x <= -1; x++) -+ ref_tmp[x] = left[-1 + ((x * inv_angle[mode - 11] + 128) >> 8)]; -+ ref = ref_tmp; -+ } -+ -+ for (y = 0; y < size; y++) { -+ int idx = ((y + 1) * angle) >> 5; -+ int fact = ((y + 1) * angle) & 31; -+ if (fact) { -+ for (x = 0; x < size; x += 4) { -+ POS(x , y) = ((32 - fact) * ref[x + idx + 1] + -+ fact * ref[x + idx + 2] + 16) >> 5; -+ POS(x + 1, y) = ((32 - fact) * ref[x + 1 + idx + 1] + -+ fact * ref[x + 1 + idx + 2] + 16) >> 5; -+ POS(x + 2, y) = ((32 - fact) * ref[x + 2 + idx + 1] + -+ fact * ref[x + 2 + idx + 2] + 16) >> 5; -+ POS(x + 3, y) = ((32 - fact) * ref[x + 3 + idx + 1] + -+ fact * ref[x + 3 + idx + 2] + 16) >> 5; -+ } -+ } else { -+ for (x = 0; x < size; x += 4) -+ AV_WN4P(&POS(x, y), AV_RN4P(&ref[x + idx + 1])); -+ } -+ } -+ if (mode == 26 && size < 32) { -+ for (y = 0; y < size; y++) -+ POS(0, y) = av_clip_pixel(top[0] + ((left[y] - left[-1]) >> 1)); -+ } -+ -+ } else { -+ ref = left - 1; -+ if (angle < 0 && last < -1) { -+ for (x = 0; x <= size; x += 4) -+ AV_WN4P(&ref_tmp[x], AV_RN4P(&left[x - 1])); -+ // Inv angle <= -256 so top offset >= 0 -+ for (x = last; x <= -1; x++) -+ ref_tmp[x] = top[-1 + ((x * inv_angle[mode - 11] + 128) >> 8)]; -+ ref = ref_tmp; -+ } -+ -+ for (x = 0; x < size; x++) { -+ int idx = ((x + 1) * angle) >> 5; -+ int fact = ((x + 1) * angle) & 31; -+ if (fact) { -+ for (y = 0; y < size; y++) { -+ POS(x, y) = ((32 - fact) * ref[y + idx + 1] + -+ fact * ref[y + idx + 2] + 16) >> 5; -+ } -+ } else { -+ for (y = 0; y < size; y++) -+ POS(x, y) = ref[y + idx + 1]; -+ } -+ } -+ if (mode == 10 && size < 32) { -+ for (x = 0; x < size; x += 4) { -+ POS(x, 0) = av_clip_pixel(left[0] + ((top[x ] - left[-1]) >> 1)); -+ POS(x + 1, 0) = av_clip_pixel(left[0] + ((top[x + 1] - left[-1]) >> 1)); -+ POS(x + 2, 0) = av_clip_pixel(left[0] + ((top[x + 2] - left[-1]) >> 1)); -+ POS(x + 3, 0) = av_clip_pixel(left[0] + ((top[x + 3] - left[-1]) >> 1)); -+ } -+ } -+ } -+} -+#else -+static av_always_inline void FUNC(pred_angular)(uint8_t *_src, -+ const uint8_t *_top, -+ const uint8_t *_left, -+ ptrdiff_t stride, -+ int mode, int size) -+{ -+ int x, y; -+ c_dst_ptr_t src = (c_dst_ptr_t)_src; -+ c_src_ptr_t top = (c_src_ptr_t)_top; -+ c_src_ptr_t left = (c_src_ptr_t)_left; -+ -+ const int angle = intra_pred_angle[mode - 2]; -+ cpel ref_array[3 * MAX_TB_SIZE + 4][2]; -+ c_dst_ptr_t ref_tmp = ref_array + size; -+ c_src_ptr_t ref; -+ const int last = (size * angle) >> 5; -+ -+ if (mode >= 18) { -+ ref = top - 1; -+ if (angle < 0) { -+ memcpy(ref_tmp + 1, top, size * 2 * PW); -+ ref_tmp[0][0] = left[-1][0]; -+ ref_tmp[0][1] = left[-1][1]; -+ for (x = last; x <= -1; x++) -+ { -+ ref_tmp[x][0] = left[-1 + ((x * inv_angle[mode - 11] + 128) >> 8)][0]; -+ ref_tmp[x][1] = left[-1 + ((x * inv_angle[mode - 11] + 128) >> 8)][1]; -+ } -+ ref = (c_src_ptr_t)ref_tmp; -+ } -+ -+ for (y = 0; y < size; y++, src += stride) { -+ const int idx = ((y + 1) * angle) >> 5; -+ const int fact = ((y + 1) * angle) & 31; -+ if (fact) { -+ for (x = 0; x < size; ++x) { -+ src[x][0] = ((32 - fact) * ref[x + idx + 1][0] + -+ fact * ref[x + idx + 2][0] + 16) >> 5; -+ src[x][1] = ((32 - fact) * ref[x + idx + 1][1] + -+ fact * ref[x + idx + 2][1] + 16) >> 5; -+ } -+ } else { -+ memcpy(src, ref + idx + 1, size * 2 * PW); -+ } -+ } -+ } else { -+ ref = left - 1; -+ if (angle < 0 && last < -1) { -+ memcpy(ref_tmp, left - 1, (size + 1) * 2 * PW); -+ for (x = last; x <= -1; x++) -+ { -+ ref_tmp[x][0] = top[-1 + ((x * inv_angle[mode - 11] + 128) >> 8)][0]; -+ ref_tmp[x][1] = top[-1 + ((x * inv_angle[mode - 11] + 128) >> 8)][1]; -+ } -+ ref = (c_src_ptr_t)ref_tmp; -+ } -+ -+ for (x = 0; x < size; x++, src++) { -+ const int idx = ((x + 1) * angle) >> 5; -+ const int fact = ((x + 1) * angle) & 31; -+ if (fact) { -+ for (y = 0; y < size; y++) { -+ src[y * stride][0] = ((32 - fact) * ref[y + idx + 1][0] + -+ fact * ref[y + idx + 2][0] + 16) >> 5; -+ src[y * stride][1] = ((32 - fact) * ref[y + idx + 1][1] + -+ fact * ref[y + idx + 2][1] + 16) >> 5; -+ } -+ } else { -+ for (y = 0; y < size; y++) -+ { -+ src[y * stride][0] = ref[y + idx + 1][0]; -+ src[y * stride][1] = ref[y + idx + 1][1]; -+ } -+ } -+ } -+ } -+} -+#endif -+ -+static void FUNC(pred_angular_0)(uint8_t *src, const uint8_t *top, -+ const uint8_t *left, -+ ptrdiff_t stride, int mode) -+{ -+ FUNC(pred_angular)(src, top, left, stride, mode, 1 << 2); -+} -+ -+static void FUNC(pred_angular_1)(uint8_t *src, const uint8_t *top, -+ const uint8_t *left, -+ ptrdiff_t stride, int mode) -+{ -+ FUNC(pred_angular)(src, top, left, stride, mode, 1 << 3); -+} -+ -+static void FUNC(pred_angular_2)(uint8_t *src, const uint8_t *top, -+ const uint8_t *left, -+ ptrdiff_t stride, int mode) -+{ -+ FUNC(pred_angular)(src, top, left, stride, mode, 1 << 4); -+} -+ -+static void FUNC(pred_angular_3)(uint8_t *src, const uint8_t *top, -+ const uint8_t *left, -+ ptrdiff_t stride, int mode) -+{ -+ FUNC(pred_angular)(src, top, left, stride, mode, 1 << 5); -+} -+ -+#undef cpel -+#undef c_src_ptr_t -+#undef c_dst_ptr_t -+ -+#undef EXTEND -+#undef POS -+#undef PW -+ -+#undef filter_light1 -+#undef filter_light -+#undef filter_strong -+#undef ref_gen -+ -+#ifndef INCLUDED_ONCE -+#define INCLUDED_ONCE -+#endif -+ ---- /dev/null -+++ b/libavcodec/rpi_mailbox.c -@@ -0,0 +1,155 @@ -+/* -+Copyright (c) 2012, Broadcom Europe Ltd. -+All rights reserved. -+ -+Redistribution and use in source and binary forms, with or without -+modification, are permitted provided that the following conditions are met: -+ * Redistributions of source code must retain the above copyright -+ notice, this list of conditions and the following disclaimer. -+ * Redistributions in binary form must reproduce the above copyright -+ notice, this list of conditions and the following disclaimer in the -+ documentation and/or other materials provided with the distribution. -+ * Neither the name of the copyright holder nor the -+ names of its contributors may be used to endorse or promote products -+ derived from this software without specific prior written permission. -+ -+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+*/ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+ -+#define MAJOR_NUM 100 -+#define IOCTL_MBOX_PROPERTY _IOWR(MAJOR_NUM, 0, char *) -+#define DEVICE_FILE_NAME "/dev/vcio" -+ -+#include "rpi_mailbox.h" -+//#include -+ -+/* -+ * use ioctl to send mbox property message -+ */ -+ -+static int mbox_property(int file_desc, void *buf) -+{ -+ int ret_val = ioctl(file_desc, IOCTL_MBOX_PROPERTY, buf); -+ -+ if (ret_val < 0) { -+ printf("ioctl_set_msg failed:%d\n", ret_val); -+ } -+ -+#ifdef DEBUG -+ unsigned *p = buf; int i; unsigned size = *(unsigned *)buf; -+ for (i=0; i -+#include -+#include -+#include -+ -+#include "config.h" -+ -+#include "libavutil/avassert.h" -+#include "libavutil/rpi_sand_fns.h" -+ -+#pragma GCC diagnostic push -+// Many many redundant decls in the header files -+#pragma GCC diagnostic ignored "-Wredundant-decls" -+#include -+#include -+#include -+#pragma GCC diagnostic pop -+ -+#include "rpi_mem.h" -+#include "rpi_zc_frames.h" -+ -+ -+#define OPT_PREFER_CMA 0 -+ -+struct rpi_cache_flush_env_s { -+ struct vcsm_user_clean_invalid2_s v; -+}; -+ -+ -+// GPU memory alloc fns (internal) -+ -+static void gpu_free_internal(GPU_MEM_PTR_T * const p) -+{ -+ if (p->arm != NULL) -+ vcsm_unlock_ptr(p->arm); -+ if (p->vcsm_handle != 0) -+ vcsm_free(p->vcsm_handle); -+ memset(p, 0, sizeof(*p)); // Ensure we crash hard if we try and use this again -+} -+ -+ -+static int gpu_malloc_internal(GPU_MEM_PTR_T * const p, -+ const int numbytes, const unsigned int cache_type, const char * const name) -+{ -+ memset(p, 0, sizeof(*p)); -+ p->numbytes = (numbytes + 255) & ~255; // Round up -+ -+ if ((p->vcsm_handle = vcsm_malloc_cache(p->numbytes, cache_type | 0x80, (char *)name)) == 0) -+ { -+ av_log(NULL, AV_LOG_ERROR, "Unable to alloc %d bytes from VCSM for %s\n", p->numbytes, name); -+ goto fail; -+ } -+ if ((p->vc_handle = vcsm_vc_hdl_from_hdl(p->vcsm_handle)) == 0) -+ { -+ av_log(NULL, AV_LOG_ERROR, "Unable to VC handle from VCSM for %s\n", name); -+ goto fail; -+ } -+ if ((p->arm = vcsm_lock(p->vcsm_handle)) == NULL) -+ { -+ av_log(NULL, AV_LOG_ERROR, "Unable to lock handle from VCSM for %s\n", name); -+ goto fail; -+ } -+ if ((p->vc = vcsm_vc_addr_from_hdl(p->vcsm_handle)) == 0) -+ { -+ av_log(NULL, AV_LOG_ERROR, "Unable to get VC addr from VCSM for %s\n", name); -+ goto fail; -+ } -+ -+ return 0; -+ -+fail: -+ gpu_free_internal(p); -+ return AVERROR(ENOMEM); -+} -+ -+// Public gpu fns -+ -+// Allocate memory on GPU -+// Fills in structure

containing ARM pointer, videocore handle, videocore memory address, numbytes -+// Returns 0 on success. -+// This allocates memory that will not be cached in ARM's data cache. -+// Therefore safe to use without data cache flushing. -+int gpu_malloc_uncached(int numbytes, GPU_MEM_PTR_T *p) -+{ -+ return gpu_malloc_internal(p, numbytes, VCSM_CACHE_TYPE_NONE, "ffmpeg uncached"); -+} -+ -+// This allocates data that will be -+// Cached in ARM L2 -+// Uncached in VPU L2 -+int gpu_malloc_cached(int numbytes, GPU_MEM_PTR_T *p) -+{ -+ return gpu_malloc_internal(p, numbytes, VCSM_CACHE_TYPE_HOST, "ffmpeg cached"); -+} -+ -+void gpu_free(GPU_MEM_PTR_T * const p) { -+ gpu_free_internal(p); -+} -+ -+void rpi_mem_gpu_uninit(void) -+{ -+ vcsm_exit(); -+ bcm_host_deinit(); -+} -+ -+int rpi_mem_gpu_init(const unsigned int flags) -+{ -+ const int wants_cma = bcm_host_is_fkms_active(); -+ int use_cma; -+ -+ (void)flags; -+ -+ if (vcsm_init_ex(wants_cma ? 1 : 0, -1) == 0) -+ use_cma = 1; -+ else if (vcsm_init_ex(wants_cma ? 0 : 1, -1) == 0) -+ use_cma = 0; -+ else -+ return AVERROR(EINVAL); -+ -+ bcm_host_init(); -+ -+ return use_cma + 1; -+} -+ -+// ---------------------------------------------------------------------------- -+// -+// Cache flush functions -+ -+#define CACHE_EL_MAX ((sizeof(rpi_cache_buf_t) - sizeof (struct vcsm_user_clean_invalid2_s)) / sizeof (struct vcsm_user_clean_invalid2_block_s)) -+ -+rpi_cache_flush_env_t * rpi_cache_flush_init(rpi_cache_buf_t * const buf) -+{ -+ rpi_cache_flush_env_t * const rfe = (rpi_cache_flush_env_t *)buf; -+ *rfe = (rpi_cache_flush_env_t){.v={.op_count = 0}}; -+ return rfe; -+} -+ -+void rpi_cache_flush_abort(rpi_cache_flush_env_t * const rfe) -+{ -+ // Nothing needed -+} -+ -+int rpi_cache_flush_execute(rpi_cache_flush_env_t * const rfe) -+{ -+ int rc = 0; -+ if (rfe->v.op_count != 0) { -+ if (vcsm_clean_invalid2(&rfe->v) != 0) -+ { -+ const int err = errno; -+ av_log(NULL, AV_LOG_ERROR, "vcsm_clean_invalid2 failed: errno=%d\n", err); -+ rc = AVERROR(err); -+ } -+ rfe->v.op_count = 0; -+ } -+ return rc; -+} -+ -+int rpi_cache_flush_finish(rpi_cache_flush_env_t * const rfe) -+{ -+ int rc = rpi_cache_flush_execute(rfe);; -+ -+ return rc; -+} -+ -+inline void rpi_cache_flush_add_gm_blocks(rpi_cache_flush_env_t * const rfe, const GPU_MEM_PTR_T * const gm, const unsigned int mode, -+ const unsigned int offset0, const unsigned int block_size, const unsigned int blocks, const unsigned int block_stride) -+{ -+ struct vcsm_user_clean_invalid2_block_s * const b = rfe->v.s + rfe->v.op_count++; -+ -+ av_assert1(rfe->v.op_count <= CACHE_EL_MAX); -+ -+ b->invalidate_mode = mode; -+ b->block_count = blocks; -+ b->start_address = gm->arm + offset0; -+ b->block_size = block_size; -+ b->inter_block_stride = block_stride; -+} -+ -+void rpi_cache_flush_add_gm_range(rpi_cache_flush_env_t * const rfe, const GPU_MEM_PTR_T * const gm, const unsigned int mode, -+ const unsigned int offset, const unsigned int size) -+{ -+ // Deal with empty pointer trivially -+ if (gm == NULL || size == 0) -+ return; -+ -+ av_assert1(offset <= gm->numbytes); -+ av_assert1(size <= gm->numbytes); -+ av_assert1(offset + size <= gm->numbytes); -+ -+ rpi_cache_flush_add_gm_blocks(rfe, gm, mode, offset, size, 1, 0); -+} -+ -+void rpi_cache_flush_add_gm_ptr(rpi_cache_flush_env_t * const rfe, const GPU_MEM_PTR_T * const gm, const unsigned int mode) -+{ -+ rpi_cache_flush_add_gm_blocks(rfe, gm, mode, 0, gm->numbytes, 1, 0); -+} -+ -+ -+void rpi_cache_flush_add_frame(rpi_cache_flush_env_t * const rfe, const AVFrame * const frame, const unsigned int mode) -+{ -+#if !RPI_ONE_BUF -+#error Fixme! (NIF) -+#endif -+ if (gpu_is_buf1(frame)) { -+ rpi_cache_flush_add_gm_ptr(rfe, gpu_buf1_gmem(frame), mode); -+ } -+ else -+ { -+ rpi_cache_flush_add_gm_ptr(rfe, gpu_buf3_gmem(frame, 0), mode); -+ rpi_cache_flush_add_gm_ptr(rfe, gpu_buf3_gmem(frame, 1), mode); -+ rpi_cache_flush_add_gm_ptr(rfe, gpu_buf3_gmem(frame, 2), mode); -+ } -+} -+ -+// Flush an area of a frame -+// Width, height, x0, y0 in luma pels -+void rpi_cache_flush_add_frame_block(rpi_cache_flush_env_t * const rfe, const AVFrame * const frame, const unsigned int mode, -+ const unsigned int x0, const unsigned int y0, const unsigned int width, const unsigned int height, -+ const unsigned int uv_shift, const int do_luma, const int do_chroma) -+{ -+ const unsigned int y_offset = frame->linesize[0] * y0; -+ const unsigned int y_size = frame->linesize[0] * height; -+ // Round UV up/down to get everything -+ const unsigned int uv_rnd = (1U << uv_shift) >> 1; -+ const unsigned int uv_offset = frame->linesize[1] * (y0 >> uv_shift); -+ const unsigned int uv_size = frame->linesize[1] * ((y0 + height + uv_rnd) >> uv_shift) - uv_offset; -+ -+#if 0 -+ // *** frame->height is cropped height so not good -+ // As all unsigned they will also reject -ve -+ // Test individually as well as added to reject overflow -+ av_assert0(start_line <= (unsigned int)frame->height); // ***** frame height cropped -+ av_assert0(n <= (unsigned int)frame->height); -+ av_assert0(start_line + n <= (unsigned int)frame->height); -+#endif -+ -+ if (!gpu_is_buf1(frame)) -+ { -+ if (do_luma) { -+ rpi_cache_flush_add_gm_range(rfe, gpu_buf3_gmem(frame, 0), mode, y_offset, y_size); -+ } -+ if (do_chroma) { -+ rpi_cache_flush_add_gm_range(rfe, gpu_buf3_gmem(frame, 1), mode, uv_offset, uv_size); -+ rpi_cache_flush_add_gm_range(rfe, gpu_buf3_gmem(frame, 2), mode, uv_offset, uv_size); -+ } -+ } -+ else if (!av_rpi_is_sand_frame(frame)) -+ { -+ const GPU_MEM_PTR_T * const gm = gpu_buf1_gmem(frame); -+ if (do_luma) { -+ rpi_cache_flush_add_gm_range(rfe, gm, mode, (frame->data[0] - gm->arm) + y_offset, y_size); -+ } -+ if (do_chroma) { -+ rpi_cache_flush_add_gm_range(rfe, gm, mode, (frame->data[1] - gm->arm) + uv_offset, uv_size); -+ rpi_cache_flush_add_gm_range(rfe, gm, mode, (frame->data[2] - gm->arm) + uv_offset, uv_size); -+ } -+ } -+ else -+ { -+ const unsigned int stride1 = av_rpi_sand_frame_stride1(frame); -+ const unsigned int stride2 = av_rpi_sand_frame_stride2(frame); -+ const unsigned int xshl = av_rpi_sand_frame_xshl(frame); -+ const unsigned int xleft = x0 & ~((stride1 >> xshl) - 1); -+ const unsigned int block_count = (((x0 + width - xleft) << xshl) + stride1 - 1) / stride1; // Same for Y & C -+ av_assert1(rfe->v.op_count + do_chroma + do_luma < CACHE_EL_MAX); -+ -+ if (do_chroma) -+ { -+ struct vcsm_user_clean_invalid2_block_s * const b = rfe->v.s + rfe->v.op_count++; -+ b->invalidate_mode = mode; -+ b->block_count = block_count; -+ b->start_address = av_rpi_sand_frame_pos_c(frame, xleft >> 1, y0 >> 1); -+ b->block_size = uv_size; -+ b->inter_block_stride = stride1 * stride2; -+ } -+ if (do_luma) -+ { -+ struct vcsm_user_clean_invalid2_block_s * const b = rfe->v.s + rfe->v.op_count++; -+ b->invalidate_mode = mode; -+ b->block_count = block_count; -+ b->start_address = av_rpi_sand_frame_pos_y(frame, xleft, y0); -+ b->block_size = y_size; -+ b->inter_block_stride = stride1 * stride2; -+ } -+ } -+} -+ -+// Call this to clean and invalidate a region of memory -+void rpi_cache_flush_one_gm_ptr(const GPU_MEM_PTR_T *const p, const rpi_cache_flush_mode_t mode) -+{ -+ rpi_cache_buf_t cbuf; -+ rpi_cache_flush_env_t * rfe = rpi_cache_flush_init(&cbuf); -+ rpi_cache_flush_add_gm_ptr(rfe, p, mode); -+ rpi_cache_flush_finish(rfe); -+} -+ ---- /dev/null -+++ b/libavcodec/rpi_mem.h -@@ -0,0 +1,88 @@ -+/* -+Copyright (c) 2018 Raspberry Pi (Trading) Ltd. -+All rights reserved. -+ -+Redistribution and use in source and binary forms, with or without -+modification, are permitted provided that the following conditions are met: -+ * Redistributions of source code must retain the above copyright -+ notice, this list of conditions and the following disclaimer. -+ * Redistributions in binary form must reproduce the above copyright -+ notice, this list of conditions and the following disclaimer in the -+ documentation and/or other materials provided with the distribution. -+ * Neither the name of the copyright holder nor the -+ names of its contributors may be used to endorse or promote products -+ derived from this software without specific prior written permission. -+ -+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ -+Authors: John Cox, Ben Avison -+*/ -+ -+#ifndef RPI_MEM_H -+#define RPI_MEM_H -+ -+typedef struct gpu_mem_ptr_s { -+ unsigned char *arm; // Pointer to memory mapped on ARM side -+ int vc_handle; // Videocore handle of relocatable memory -+ int vcsm_handle; // Handle for use by VCSM -+ int vc; // Address for use in GPU code -+ int numbytes; // Size of memory block -+} GPU_MEM_PTR_T; -+ -+// General GPU functions -+ -+#define GPU_INIT_GPU 1 -+#define GPU_INIT_CMA 2 -+ -+extern int gpu_malloc_cached(int numbytes, GPU_MEM_PTR_T *p); -+extern int gpu_malloc_uncached(int numbytes, GPU_MEM_PTR_T *p); -+extern void gpu_free(GPU_MEM_PTR_T * const p); -+int rpi_mem_gpu_init(const unsigned int flags); -+void rpi_mem_gpu_uninit(void); -+ -+// Cache flush stuff -+ -+struct rpi_cache_flush_env_s; -+typedef struct rpi_cache_flush_env_s rpi_cache_flush_env_t; -+ -+typedef struct {uint32_t t[33];} rpi_cache_buf_t; -+ -+rpi_cache_flush_env_t * rpi_cache_flush_init(rpi_cache_buf_t * const buf); -+// Free env without flushing -+void rpi_cache_flush_abort(rpi_cache_flush_env_t * const rfe); -+// Do the accumulated flush & clear but do not free the env -+int rpi_cache_flush_execute(rpi_cache_flush_env_t * const rfe); -+// Do the accumulated flush & free the env -+int rpi_cache_flush_finish(rpi_cache_flush_env_t * const rfe); -+ -+typedef enum -+{ -+ RPI_CACHE_FLUSH_MODE_INVALIDATE = 1, -+ RPI_CACHE_FLUSH_MODE_WRITEBACK = 2, -+ RPI_CACHE_FLUSH_MODE_WB_INVALIDATE = 3 -+} rpi_cache_flush_mode_t; -+ -+struct AVFrame; -+void rpi_cache_flush_add_gm_ptr(rpi_cache_flush_env_t * const rfe, const GPU_MEM_PTR_T * const gm, const rpi_cache_flush_mode_t mode); -+void rpi_cache_flush_add_gm_range(rpi_cache_flush_env_t * const rfe, const GPU_MEM_PTR_T * const gm, const rpi_cache_flush_mode_t mode, -+ const unsigned int offset, const unsigned int size); -+void rpi_cache_flush_add_gm_blocks(rpi_cache_flush_env_t * const rfe, const GPU_MEM_PTR_T * const gm, const unsigned int mode, -+ const unsigned int offset0, const unsigned int block_size, const unsigned int blocks, const unsigned int block_stride); -+void rpi_cache_flush_add_frame(rpi_cache_flush_env_t * const rfe, const struct AVFrame * const frame, const rpi_cache_flush_mode_t mode); -+void rpi_cache_flush_add_frame_block(rpi_cache_flush_env_t * const rfe, const struct AVFrame * const frame, const rpi_cache_flush_mode_t mode, -+ const unsigned int x0, const unsigned int y0, const unsigned int width, const unsigned int height, -+ const unsigned int uv_shift, const int do_luma, const int do_chroma); -+ -+// init, add, finish for one gm ptr -+void rpi_cache_flush_one_gm_ptr(const GPU_MEM_PTR_T * const p, const rpi_cache_flush_mode_t mode); -+ -+#endif ---- /dev/null -+++ b/libavcodec/rpi_qpu.c -@@ -0,0 +1,776 @@ -+/* -+Copyright (c) 2018 Raspberry Pi (Trading) Ltd. -+All rights reserved. -+ -+Redistribution and use in source and binary forms, with or without -+modification, are permitted provided that the following conditions are met: -+ * Redistributions of source code must retain the above copyright -+ notice, this list of conditions and the following disclaimer. -+ * Redistributions in binary form must reproduce the above copyright -+ notice, this list of conditions and the following disclaimer in the -+ documentation and/or other materials provided with the distribution. -+ * Neither the name of the copyright holder nor the -+ names of its contributors may be used to endorse or promote products -+ derived from this software without specific prior written permission. -+ -+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ -+Authors: John Cox -+*/ -+ -+ -+#include -+#include -+#include -+#include -+#include -+#include "libavutil/avassert.h" -+ -+#include "config.h" -+ -+#include -+#include -+ -+#include -+ -+#include "rpi_mailbox.h" -+#include "rpi_mem.h" -+#include "rpi_qpu.h" -+#include "rpi_hevc_shader.h" -+#include "rpi_hevc_transform8.h" -+#include "rpi_hevc_transform10.h" -+#include "libavutil/rpi_sand_fns.h" -+ -+// Trace time spent waiting for GPU (VPU/QPU) (1=Yes, 0=No) -+#define RPI_TRACE_TIME_VPU_QPU_WAIT 0 -+ -+// Add profile flags to all QPU requests - generates output in "vcdbg log msg" -+// Beware this is expensive and will probably throw off all other timing by >10% -+#define RPI_TRACE_QPU_PROFILE_ALL 0 -+ -+// QPU "noflush" flags -+// a mixture of flushing & profiling -+ -+#define QPU_FLAGS_NO_FLUSH_VPU 1 // If unset VPU cache will be flushed -+#define QPU_FLAGS_PROF_CLEAR_AND_ENABLE 2 // Clear & Enable detailed QPU profiling registers -+#define QPU_FLAGS_PROF_OUTPUT_COUNTS 4 // Print the results -+#define QPU_FLAGS_OUTPUT_QPU_TIMES 8 // Print QPU times - independant of the profiling -+#define QPU_FLAGS_NO_FLUSH_QPU 16 // If unset flush QPU caches & TMUs (uniforms always flushed) -+ -+#define vcos_verify_ge0(x) ((x)>=0) -+ -+// Size in 32bit words -+#define QPU_CODE_SIZE 4098 -+#define VPU_CODE_SIZE 16384 -+ -+static const short rpi_transMatrix2even[32][16] = { // Even rows first -+{64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64}, -+{90, 87, 80, 70, 57, 43, 25, 9, -9, -25, -43, -57, -70, -80, -87, -90}, -+{89, 75, 50, 18, -18, -50, -75, -89, -89, -75, -50, -18, 18, 50, 75, 89}, -+{87, 57, 9, -43, -80, -90, -70, -25, 25, 70, 90, 80, 43, -9, -57, -87}, -+{83, 36, -36, -83, -83, -36, 36, 83, 83, 36, -36, -83, -83, -36, 36, 83}, -+{80, 9, -70, -87, -25, 57, 90, 43, -43, -90, -57, 25, 87, 70, -9, -80}, -+{75, -18, -89, -50, 50, 89, 18, -75, -75, 18, 89, 50, -50, -89, -18, 75}, -+{70, -43, -87, 9, 90, 25, -80, -57, 57, 80, -25, -90, -9, 87, 43, -70}, -+{64, -64, -64, 64, 64, -64, -64, 64, 64, -64, -64, 64, 64, -64, -64, 64}, -+{57, -80, -25, 90, -9, -87, 43, 70, -70, -43, 87, 9, -90, 25, 80, -57}, -+{50, -89, 18, 75, -75, -18, 89, -50, -50, 89, -18, -75, 75, 18, -89, 50}, -+{43, -90, 57, 25, -87, 70, 9, -80, 80, -9, -70, 87, -25, -57, 90, -43}, -+{36, -83, 83, -36, -36, 83, -83, 36, 36, -83, 83, -36, -36, 83, -83, 36}, -+{25, -70, 90, -80, 43, 9, -57, 87, -87, 57, -9, -43, 80, -90, 70, -25}, -+{18, -50, 75, -89, 89, -75, 50, -18, -18, 50, -75, 89, -89, 75, -50, 18}, -+{ 9, -25, 43, -57, 70, -80, 87, -90, 90, -87, 80, -70, 57, -43, 25, -9}, -+// Odd rows -+{90, 90, 88, 85, 82, 78, 73, 67, 61, 54, 46, 38, 31, 22, 13, 4}, -+{90, 82, 67, 46, 22, -4, -31, -54, -73, -85, -90, -88, -78, -61, -38, -13}, -+{88, 67, 31, -13, -54, -82, -90, -78, -46, -4, 38, 73, 90, 85, 61, 22}, -+{85, 46, -13, -67, -90, -73, -22, 38, 82, 88, 54, -4, -61, -90, -78, -31}, -+{82, 22, -54, -90, -61, 13, 78, 85, 31, -46, -90, -67, 4, 73, 88, 38}, -+{78, -4, -82, -73, 13, 85, 67, -22, -88, -61, 31, 90, 54, -38, -90, -46}, -+{73, -31, -90, -22, 78, 67, -38, -90, -13, 82, 61, -46, -88, -4, 85, 54}, -+{67, -54, -78, 38, 85, -22, -90, 4, 90, 13, -88, -31, 82, 46, -73, -61}, -+{61, -73, -46, 82, 31, -88, -13, 90, -4, -90, 22, 85, -38, -78, 54, 67}, -+{54, -85, -4, 88, -46, -61, 82, 13, -90, 38, 67, -78, -22, 90, -31, -73}, -+{46, -90, 38, 54, -90, 31, 61, -88, 22, 67, -85, 13, 73, -82, 4, 78}, -+{38, -88, 73, -4, -67, 90, -46, -31, 85, -78, 13, 61, -90, 54, 22, -82}, -+{31, -78, 90, -61, 4, 54, -88, 82, -38, -22, 73, -90, 67, -13, -46, 85}, -+{22, -61, 85, -90, 73, -38, -4, 46, -78, 90, -82, 54, -13, -31, 67, -88}, -+{13, -38, 61, -78, 88, -90, 85, -73, 54, -31, 4, 22, -46, 67, -82, 90}, -+{ 4, -13, 22, -31, 38, -46, 54, -61, 67, -73, 78, -82, 85, -88, 90, -90} -+}; -+ -+// Code/constants on GPU -+struct GPU -+{ -+// unsigned int qpu_code[QPU_CODE_SIZE]; -+ unsigned int vpu_code8[VPU_CODE_SIZE]; -+ unsigned int vpu_code10[VPU_CODE_SIZE]; -+ short transMatrix2even[16*16*2]; -+}; -+ -+#define WAIT_COUNT_MAX 16 -+ -+typedef struct trace_time_one_s -+{ -+ int count; -+ int64_t start[WAIT_COUNT_MAX]; -+ int64_t total[WAIT_COUNT_MAX]; -+} trace_time_one_t; -+ -+typedef struct trace_time_wait_s -+{ -+ unsigned int jcount; -+ int64_t start0; -+ int64_t last_update; -+ trace_time_one_t active; -+ trace_time_one_t wait; -+} trace_time_wait_t; -+ -+typedef struct vq_wait_s -+{ -+ sem_t sem; -+ struct vq_wait_s * next; -+} vq_wait_t; -+ -+#define VQ_WAIT_POOL_SIZE 16 -+typedef struct vq_wait_pool_s -+{ -+ vq_wait_t * head; -+ vq_wait_t pool[VQ_WAIT_POOL_SIZE]; -+} vq_wait_pool_t; -+ -+static void vq_wait_pool_init(vq_wait_pool_t * const pool); -+static void vq_wait_pool_deinit(vq_wait_pool_t * const pool); -+ -+typedef struct gpu_env_s -+{ -+ int open_count; -+ int init_count; -+ int vpu_i_cache_flushed; -+ GPU_MEM_PTR_T qpu_code_gm_ptr; -+ GPU_MEM_PTR_T code_gm_ptr; -+ GPU_MEM_PTR_T dummy_gm_ptr; -+ vq_wait_pool_t wait_pool; -+#if RPI_TRACE_TIME_VPU_QPU_WAIT -+ trace_time_wait_t ttw; -+#endif -+} gpu_env_t; -+ -+// Stop more than one thread trying to allocate memory or use the processing resources at once -+static pthread_mutex_t gpu_mutex = PTHREAD_MUTEX_INITIALIZER; -+static gpu_env_t * gpu = NULL; -+ -+#if RPI_TRACE_TIME_VPU_QPU_WAIT -+ -+static int64_t ns_time(void) -+{ -+ struct timespec ts; -+ clock_gettime(CLOCK_MONOTONIC, &ts); -+ return (int64_t)ts.tv_sec * (int64_t)1000000000 + ts.tv_nsec; -+} -+ -+ -+#define WAIT_TIME_PRINT_PERIOD (int64_t)2000000000 -+ -+#define T_MS(t) ((unsigned int)((t)/(int64_t)1000000) % 1000U) -+#define T_SEC(t) (unsigned int)((t)/(int64_t)1000000000) -+#define T_ARG(t) T_SEC(t), T_MS(t) -+#define T_FMT "%u.%03u" -+ -+static void tto_print(trace_time_one_t * tto, const int64_t now, const int64_t start0, const char * const prefix) -+{ -+ // Update totals for levels that are still pending -+ for (int i = 0; i < tto->count; ++i) { -+ tto->total[i] += now - tto->start[i]; -+ tto->start[i] = now; -+ } -+ -+ printf("%s: Idle:" T_FMT ", 1:" T_FMT ", 2:" T_FMT ", 3:" T_FMT ", 4:" T_FMT "\n", -+ prefix, -+ T_ARG(now - start0 - tto->total[0]), -+ T_ARG(tto->total[0]), -+ T_ARG(tto->total[1]), -+ T_ARG(tto->total[2]), -+ T_ARG(tto->total[3])); -+} -+ -+ -+static void tto_start(trace_time_one_t * const tto, const int64_t now) -+{ -+ av_assert0(tto->count < WAIT_COUNT_MAX); -+ tto->start[tto->count++] = now; -+} -+ -+static void tto_end(trace_time_one_t * const tto, const int64_t now) -+{ -+ const int n = --tto->count; -+ av_assert0(n >= 0); -+ tto->total[n] += now - tto->start[n]; -+} -+ -+static void ttw_print(trace_time_wait_t * const ttw, const int64_t now) -+{ -+ printf("Jobs:%d, Total time=" T_FMT "\n", ttw->jcount, T_ARG(now - ttw->start0)); -+ tto_print(&ttw->active, now, ttw->start0, "Active"); -+ tto_print(&ttw->wait, now, ttw->start0, " Wait"); -+} -+ -+#endif -+ -+// GPU memory alloc fns (internal) -+ -+static void gpu_free_internal(GPU_MEM_PTR_T * const p) -+{ -+ if (p->arm != NULL) -+ vcsm_unlock_ptr(p->arm); -+ if (p->vcsm_handle != 0) -+ vcsm_free(p->vcsm_handle); -+ memset(p, 0, sizeof(*p)); // Ensure we crash hard if we try and use this again -+} -+ -+ -+static int gpu_malloc_internal(GPU_MEM_PTR_T * const p, -+ const int numbytes, const unsigned int cache_type, const char * const name) -+{ -+ memset(p, 0, sizeof(*p)); -+ p->numbytes = (numbytes + 255) & ~255; // Round up -+ -+ if ((p->vcsm_handle = vcsm_malloc_cache(p->numbytes, cache_type | 0x80, (char *)name)) == 0 || -+ (p->vc_handle = vcsm_vc_hdl_from_hdl(p->vcsm_handle)) == 0 || -+ (p->arm = vcsm_lock(p->vcsm_handle)) == NULL || -+ (p->vc = vcsm_vc_addr_from_hdl(p->vcsm_handle)) == 0) -+ { -+ gpu_free_internal(p); -+ return AVERROR(ENOMEM); -+ } -+ return 0; -+} -+ -+ -+// GPU init, free, lock, unlock -+ -+static void gpu_term(void) -+{ -+ gpu_env_t * const ge = gpu; -+ -+ // We have to hope that eveything has terminated... -+ gpu = NULL; -+ -+ vc_gpuserv_deinit(); -+ -+ gpu_free_internal(&ge->code_gm_ptr); -+ gpu_free_internal(&ge->qpu_code_gm_ptr); -+ gpu_free_internal(&ge->dummy_gm_ptr); -+ -+ vcsm_exit(); -+ -+ vq_wait_pool_deinit(&ge->wait_pool); -+ -+ free(ge); -+} -+ -+ -+// Connect to QPU, returns 0 on success. -+static int gpu_init(gpu_env_t ** const gpu) { -+ volatile struct GPU* ptr; -+ gpu_env_t * const ge = calloc(1, sizeof(gpu_env_t)); -+ int rv; -+ *gpu = NULL; -+ -+ if (ge == NULL) -+ return -1; -+ -+ vq_wait_pool_init(&ge->wait_pool); -+ -+ vcsm_init(); -+ -+ // Now copy over the QPU code into GPU memory -+ if ((rv = gpu_malloc_internal(&ge->qpu_code_gm_ptr, QPU_CODE_SIZE * 4, VCSM_CACHE_TYPE_NONE, "ffmpeg qpu code")) != 0) -+ return rv; -+ -+ { -+ int num_bytes = (char *)mc_end - (char *)ff_hevc_rpi_shader; -+ av_assert0(num_bytes<=QPU_CODE_SIZE*sizeof(unsigned int)); -+ memcpy(ge->qpu_code_gm_ptr.arm, ff_hevc_rpi_shader, num_bytes); -+ memset(ge->qpu_code_gm_ptr.arm + num_bytes, 0, QPU_CODE_SIZE*4 - num_bytes); -+ } -+ -+ // And the VPU code -+ if ((rv = gpu_malloc_internal(&ge->code_gm_ptr, sizeof(struct GPU), VCSM_CACHE_TYPE_VC, "ffmpeg vpu code")) != 0) -+ return rv; -+ ptr = (volatile struct GPU*)ge->code_gm_ptr.arm; -+ -+ // Zero everything so we have zeros between the code bits -+ memset((void *)ptr, 0, sizeof(*ptr)); -+ { -+ int num_bytes = sizeof(rpi_hevc_transform8); -+ av_assert0(num_bytes<=VPU_CODE_SIZE*sizeof(unsigned int)); -+ memcpy((void*)ptr->vpu_code8, rpi_hevc_transform8, num_bytes); -+ } -+ { -+ int num_bytes = sizeof(rpi_hevc_transform10); -+ av_assert0(num_bytes<=VPU_CODE_SIZE*sizeof(unsigned int)); -+ memcpy((void*)ptr->vpu_code10, rpi_hevc_transform10, num_bytes); -+ } -+ // And the transform coefficients -+ memcpy((void*)ptr->transMatrix2even, rpi_transMatrix2even, sizeof(rpi_transMatrix2even)); -+ -+ // Generate a dummy "frame" & fill with 0x80 -+ // * Could reset to 1 <dummy_gm_ptr, 0x4000, VCSM_CACHE_TYPE_NONE, "ffmpeg dummy frame")) != 0) -+ return rv; -+ memset(ge->dummy_gm_ptr.arm, 0x80, 0x4000); -+ -+ *gpu = ge; -+ return 0; -+} -+ -+ -+ -+static void gpu_unlock(void) { -+ pthread_mutex_unlock(&gpu_mutex); -+} -+ -+// Make sure we have exclusive access to the mailbox, and enable qpu if necessary. -+static gpu_env_t * gpu_lock(void) { -+ pthread_mutex_lock(&gpu_mutex); -+ -+ av_assert1(gpu != NULL); -+ return gpu; -+} -+ -+static gpu_env_t * gpu_lock_ref(void) -+{ -+ pthread_mutex_lock(&gpu_mutex); -+ -+ if (gpu == NULL) { -+ int rv = gpu_init(&gpu); -+ if (rv != 0) { -+ gpu_unlock(); -+ return NULL; -+ } -+ } -+ -+ ++gpu->open_count; -+ return gpu; -+} -+ -+static void gpu_unlock_unref(gpu_env_t * const ge) -+{ -+ if (--ge->open_count == 0) -+ gpu_term(); -+ -+ gpu_unlock(); -+} -+ -+static inline gpu_env_t * gpu_ptr(void) -+{ -+ av_assert1(gpu != NULL); -+ return gpu; -+} -+ -+unsigned int vpu_get_fn(const unsigned int bit_depth) { -+ uint32_t a = 0; -+ -+ // Make sure that the gpu is initialized -+ av_assert1(gpu != NULL); -+ switch (bit_depth){ -+ case 8: -+ a = gpu->code_gm_ptr.vc + offsetof(struct GPU, vpu_code8); -+ break; -+ case 10: -+ a = gpu->code_gm_ptr.vc + offsetof(struct GPU, vpu_code10); -+ break; -+ default: -+ av_assert0(0); -+ } -+ return a; -+} -+ -+unsigned int vpu_get_constants(void) { -+ av_assert1(gpu != NULL); -+ return (gpu->code_gm_ptr.vc + offsetof(struct GPU,transMatrix2even)); -+} -+ -+void gpu_ref(void) -+{ -+ gpu_lock_ref(); -+ gpu_unlock(); -+} -+ -+void gpu_unref(void) -+{ -+ gpu_env_t * const ge = gpu_lock(); -+ gpu_unlock_unref(ge); -+} -+ -+// ---------------------------------------------------------------------------- -+ -+ -+// Wait abstractions - mostly so we can easily add profile code -+static void vq_wait_pool_init(vq_wait_pool_t * const wp) -+{ -+ unsigned int i; -+ for (i = 0; i != VQ_WAIT_POOL_SIZE; ++i) { -+ sem_init(&wp->pool[i].sem, 0, 0); -+ wp->pool[i].next = wp->pool + i + 1; -+ } -+ wp->head = wp->pool + 0; -+ wp->pool[VQ_WAIT_POOL_SIZE - 1].next = NULL; -+} -+ -+static void vq_wait_pool_deinit(vq_wait_pool_t * const wp) -+{ -+ unsigned int i; -+ wp->head = NULL; -+ for (i = 0; i != VQ_WAIT_POOL_SIZE; ++i) { -+ sem_destroy(&wp->pool[i].sem); -+ wp->pool[i].next = NULL; -+ } -+} -+ -+ -+// If sem_init actually takes time then maybe we want a pool... -+static vq_wait_t * vq_wait_new(void) -+{ -+ gpu_env_t * const ge = gpu_lock_ref(); -+ vq_wait_t * const wait = ge->wait_pool.head; -+ ge->wait_pool.head = wait->next; -+ wait->next = NULL; -+ -+#if RPI_TRACE_TIME_VPU_QPU_WAIT -+ tto_start(&ge->ttw.active, ns_time()); -+#endif -+ -+ gpu_unlock(); -+ return wait; -+} -+ -+static void vq_wait_delete(vq_wait_t * const wait) -+{ -+ gpu_env_t * const ge = gpu_lock(); -+ wait->next = ge->wait_pool.head; -+ ge->wait_pool.head = wait; -+ -+#if RPI_TRACE_TIME_VPU_QPU_WAIT -+ { -+ trace_time_wait_t * const ttw = &ge->ttw; -+ const int64_t now = ns_time(); -+ ++ttw->jcount; -+ tto_end(&ttw->wait, now); -+ -+ if (ttw->start0 == 0) -+ { -+ ttw->start0 = ttw->active.start[0]; -+ ttw->last_update = ttw->start0; -+ } -+ if (now - ttw->last_update > WAIT_TIME_PRINT_PERIOD) -+ { -+ ttw->last_update += WAIT_TIME_PRINT_PERIOD; -+ ttw_print(ttw, now); -+ } -+ } -+#endif -+ gpu_unlock_unref(ge); -+} -+ -+static void vq_wait_wait(vq_wait_t * const wait) -+{ -+#if RPI_TRACE_TIME_VPU_QPU_WAIT -+ { -+ const int64_t now = ns_time(); -+ gpu_env_t * const ge = gpu_lock(); -+ tto_start(&ge->ttw.wait, now); -+ gpu_unlock(); -+ } -+#endif -+ -+ while (sem_wait(&wait->sem) == -1 && errno == EINTR) -+ /* loop */; -+} -+ -+static void vq_wait_post(vq_wait_t * const wait) -+{ -+#if RPI_TRACE_TIME_VPU_QPU_WAIT -+ { -+ gpu_env_t *const ge = gpu_lock(); -+ tto_end(&ge->ttw.active, ns_time()); -+ gpu_unlock(); -+ } -+#endif -+ -+ sem_post(&wait->sem); -+} -+ -+ -+ -+// Header comments were wrong for these two -+#define VPU_QPU_MASK_QPU 1 -+#define VPU_QPU_MASK_VPU 2 -+ -+typedef struct vpu_qpu_job_env_s vpu_qpu_job_env_t; -+ -+vpu_qpu_job_env_t * vpu_qpu_job_init(vpu_qpu_job_env_t * const buf) -+{ -+// vpu_qpu_job_env_t * vqj = calloc(1, sizeof(vpu_qpu_job_env_t)); -+ vpu_qpu_job_env_t * vqj = buf; -+// memset(vqj, 0, sizeof(*vqj)); -+ vqj->n = 0; -+ vqj->mask = 0; -+ return vqj; -+} -+ -+void vpu_qpu_job_delete(vpu_qpu_job_env_t * const vqj) -+{ -+// memset(vqj, 0, sizeof(*vqj)); -+// free(vqj); -+} -+ -+static inline struct gpu_job_s * new_job(vpu_qpu_job_env_t * const vqj) -+{ -+ struct gpu_job_s * const j = vqj->j + vqj->n++; -+ av_assert1(vqj->n <= VPU_QPU_JOB_MAX); -+ return j; -+} -+ -+void vpu_qpu_job_add_vpu(vpu_qpu_job_env_t * const vqj, const uint32_t vpu_code, -+ const unsigned r0, const unsigned r1, const unsigned r2, const unsigned r3, const unsigned r4, const unsigned r5) -+{ -+ if (vpu_code != 0) { -+ struct gpu_job_s *const j = new_job(vqj); -+ vqj->mask |= VPU_QPU_MASK_VPU; -+ -+ j->command = EXECUTE_VPU; -+ j->callback.func = 0; -+ j->callback.cookie = NULL; -+ // The bottom two bits of the execute address contain no-flush flags -+ // b0 will flush the VPU I-cache if unset so we nearly always want that set -+ // as we never reload code -+ j->u.v.q[0] = vpu_code | gpu->vpu_i_cache_flushed; -+ j->u.v.q[1] = r0; -+ j->u.v.q[2] = r1; -+ j->u.v.q[3] = r2; -+ j->u.v.q[4] = r3; -+ j->u.v.q[5] = r4; -+ j->u.v.q[6] = r5; -+ gpu->vpu_i_cache_flushed = 1; -+ } -+} -+ -+// flags are QPU_FLAGS_xxx -+void vpu_qpu_job_add_qpu(vpu_qpu_job_env_t * const vqj, const unsigned int n, const uint32_t * const mail) -+{ -+ if (n != 0) { -+ struct gpu_job_s *const j = new_job(vqj); -+ vqj->mask |= VPU_QPU_MASK_QPU; -+ -+ j->command = EXECUTE_QPU; -+ j->callback.func = 0; -+ j->callback.cookie = NULL; -+ -+ j->u.q.jobs = n; -+#if RPI_TRACE_QPU_PROFILE_ALL -+ j->u.q.noflush = QPU_FLAGS_NO_FLUSH_VPU | QPU_FLAGS_PROF_CLEAR_AND_ENABLE | QPU_FLAGS_PROF_OUTPUT_COUNTS; -+#else -+ j->u.q.noflush = QPU_FLAGS_NO_FLUSH_VPU; -+#endif -+ j->u.q.timeout = 5000; -+ memcpy(j->u.q.control, mail, n * QPU_MAIL_EL_VALS * sizeof(uint32_t)); -+ } -+} -+ -+// Convert callback to sem post -+static void vpu_qpu_job_callback_wait(void * v) -+{ -+ vq_wait_post(v); -+} -+ -+// Poke a user-supplied sem -+static void vpu_qpu_job_callback_sem(void * v) -+{ -+ sem_post((sem_t *)v); -+} -+ -+void vpu_qpu_job_add_sync_this(vpu_qpu_job_env_t * const vqj, vpu_qpu_wait_h * const wait_h) -+{ -+ vq_wait_t * wait; -+ -+ if (vqj->mask == 0) { -+ *wait_h = NULL; -+ return; -+ } -+ -+ // We are going to want a sync object -+ wait = vq_wait_new(); -+ -+ // There are 2 VPU Qs & 1 QPU Q so we can collapse sync -+ // If we only posted one thing or only QPU jobs -+ if (vqj->n == 1 || vqj->mask == VPU_QPU_MASK_QPU) -+ { -+ struct gpu_job_s * const j = vqj->j + (vqj->n - 1); -+ av_assert1(j->callback.func == 0); -+ -+ j->callback.func = vpu_qpu_job_callback_wait; -+ j->callback.cookie = wait; -+ } -+ else -+ { -+ struct gpu_job_s *const j = new_job(vqj); -+ -+ j->command = EXECUTE_SYNC; -+ j->u.s.mask = vqj->mask; -+ j->callback.func = vpu_qpu_job_callback_wait; -+ j->callback.cookie = wait; -+ } -+ -+ vqj->mask = 0; -+ *wait_h = wait; -+} -+ -+// Returns 0 if no sync added ('cos Q empty), 1 if sync added -+int vpu_qpu_job_add_sync_sem(vpu_qpu_job_env_t * const vqj, sem_t * const sem) -+{ -+ // If nothing on q then just return -+ if (vqj->mask == 0) -+ return 0; -+ -+ // There are 2 VPU Qs & 1 QPU Q so we can collapse sync -+ // If we only posted one thing or only QPU jobs -+ if (vqj->n == 1 || vqj->mask == VPU_QPU_MASK_QPU) -+ { -+ struct gpu_job_s * const j = vqj->j + (vqj->n - 1); -+ av_assert1(j->callback.func == 0); -+ -+ j->callback.func = vpu_qpu_job_callback_sem; -+ j->callback.cookie = sem; -+ } -+ else -+ { -+ struct gpu_job_s *const j = new_job(vqj); -+ -+ j->command = EXECUTE_SYNC; -+ j->u.s.mask = vqj->mask; -+ j->callback.func = vpu_qpu_job_callback_sem; -+ j->callback.cookie = sem; -+ } -+ -+ vqj->mask = 0; -+ return 1; -+} -+ -+ -+int vpu_qpu_job_start(vpu_qpu_job_env_t * const vqj) -+{ -+ if (vqj->n == 0) -+ return 0; -+ -+ return vc_gpuserv_execute_code(vqj->n, vqj->j); -+} -+ -+// Simple wrapper of start + delete -+int vpu_qpu_job_finish(vpu_qpu_job_env_t * const vqj) -+{ -+ int rv; -+ rv = vpu_qpu_job_start(vqj); -+ vpu_qpu_job_delete(vqj); -+ return rv; -+} -+ -+void vpu_qpu_wait(vpu_qpu_wait_h * const wait_h) -+{ -+ if (wait_h != NULL) -+ { -+ vq_wait_t * const wait = *wait_h; -+ if (wait != NULL) { -+ *wait_h = NULL; -+ vq_wait_wait(wait); -+ vq_wait_delete(wait); -+ } -+ } -+} -+ -+int vpu_qpu_init() -+{ -+ gpu_env_t * const ge = gpu_lock_ref(); -+ if (ge == NULL) -+ return -1; -+ -+ if (ge->init_count++ == 0) -+ { -+ vc_gpuserv_init(); -+ } -+ -+ gpu_unlock(); -+ return 0; -+} -+ -+void vpu_qpu_term() -+{ -+ gpu_env_t * const ge = gpu_lock(); -+ -+ if (--ge->init_count == 0) { -+ vc_gpuserv_deinit(); -+ -+#if RPI_TRACE_TIME_VPU_QPU_WAIT -+ ttw_print(&ge->ttw, ns_time()); -+#endif -+ } -+ -+ gpu_unlock_unref(ge); -+} -+ -+uint32_t qpu_fn(const int * const mc_fn) -+{ -+ return gpu->qpu_code_gm_ptr.vc + ((const char *)mc_fn - (const char *)ff_hevc_rpi_shader); -+} -+ -+uint32_t qpu_dummy(void) -+{ -+ return gpu->dummy_gm_ptr.vc; -+} -+ -+int rpi_hevc_qpu_init_fn(HEVCRpiQpu * const qf, const unsigned int bit_depth) -+{ -+ // Dummy values we can catch with emulation -+ qf->y_pxx = ~1U; -+ qf->y_bxx = ~2U; -+ qf->y_p00 = ~3U; -+ qf->y_b00 = ~4U; -+ qf->c_pxx = ~5U; -+ qf->c_bxx = ~6U; -+ -+ switch (bit_depth) { -+ case 8: -+ qf->y_pxx = qpu_fn(mc_filter_y_pxx); -+ qf->y_pxx = qpu_fn(mc_filter_y_pxx); -+ qf->y_bxx = qpu_fn(mc_filter_y_bxx); -+ qf->y_p00 = qpu_fn(mc_filter_y_p00); -+ qf->y_b00 = qpu_fn(mc_filter_y_b00); -+ qf->c_pxx = qpu_fn(mc_filter_c_p); -+ qf->c_pxx_l1 = qpu_fn(mc_filter_c_p_l1); -+ qf->c_bxx = qpu_fn(mc_filter_c_b); -+ break; -+ case 10: -+ qf->c_pxx = qpu_fn(mc_filter_c10_p); -+ qf->c_pxx_l1 = qpu_fn(mc_filter_c10_p_l1); -+ qf->c_bxx = qpu_fn(mc_filter_c10_b); -+ qf->y_pxx = qpu_fn(mc_filter_y10_pxx); -+ qf->y_bxx = qpu_fn(mc_filter_y10_bxx); -+ qf->y_p00 = qpu_fn(mc_filter_y10_p00); -+ qf->y_b00 = qpu_fn(mc_filter_y10_b00); -+ break; -+ default: -+ return -1; -+ } -+ return 0; -+} -+ ---- /dev/null -+++ b/libavcodec/rpi_qpu.h -@@ -0,0 +1,103 @@ -+/* -+Copyright (c) 2018 Raspberry Pi (Trading) Ltd. -+All rights reserved. -+ -+Redistribution and use in source and binary forms, with or without -+modification, are permitted provided that the following conditions are met: -+ * Redistributions of source code must retain the above copyright -+ notice, this list of conditions and the following disclaimer. -+ * Redistributions in binary form must reproduce the above copyright -+ notice, this list of conditions and the following disclaimer in the -+ documentation and/or other materials provided with the distribution. -+ * Neither the name of the copyright holder nor the -+ names of its contributors may be used to endorse or promote products -+ derived from this software without specific prior written permission. -+ -+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ -+Authors: John Cox, Ben Avison -+*/ -+ -+#ifndef RPI_QPU_H -+#define RPI_QPU_H -+ -+#include "rpi_mem.h" -+#include "rpi_zc_frames.h" -+ -+#pragma GCC diagnostic push -+// Many many redundant decls in the header files -+#pragma GCC diagnostic ignored "-Wredundant-decls" -+#pragma GCC diagnostic ignored "-Wstrict-prototypes" -+#include "interface/vmcs_host/vc_vchi_gpuserv.h" // for gpu_job_s -+#pragma GCC diagnostic pop -+ -+// QPU specific functions -+ -+typedef struct HEVCRpiQpu { -+ uint32_t c_pxx; -+ uint32_t c_pxx_l1; -+ uint32_t c_bxx; -+ uint32_t y_pxx; -+ uint32_t y_bxx; -+ uint32_t y_p00; -+ uint32_t y_b00; -+} HEVCRpiQpu; -+ -+int rpi_hevc_qpu_init_fn(HEVCRpiQpu * const qf, const unsigned int bit_depth); -+ -+uint32_t qpu_fn(const int * const mc_fn); -+uint32_t qpu_dummy(void); -+ -+#define QPU_N_GRP 4 -+#define QPU_N_MAX 12 -+ -+#define QPU_MAIL_EL_VALS 2 -+ -+struct vpu_qpu_wait_s; -+typedef struct vq_wait_s * vpu_qpu_wait_h; -+ -+// VPU specific functions -+ -+struct vpu_qpu_job_env_s; -+typedef struct vpu_qpu_job_env_s * vpu_qpu_job_h; -+ -+#define VPU_QPU_JOB_MAX 4 -+struct vpu_qpu_job_env_s -+{ -+ unsigned int n; -+ unsigned int mask; -+ struct gpu_job_s j[VPU_QPU_JOB_MAX]; -+}; -+typedef struct vpu_qpu_job_env_s vpu_qpu_job_env_t; -+ -+vpu_qpu_job_h vpu_qpu_job_init(vpu_qpu_job_env_t * const buf); -+void vpu_qpu_job_delete(const vpu_qpu_job_h vqj); -+void vpu_qpu_job_add_vpu(const vpu_qpu_job_h vqj, const uint32_t vpu_code, -+ const unsigned r0, const unsigned r1, const unsigned r2, const unsigned r3, const unsigned r4, const unsigned r5); -+void vpu_qpu_job_add_qpu(const vpu_qpu_job_h vqj, const unsigned int n, const uint32_t * const mail); -+void vpu_qpu_job_add_sync_this(const vpu_qpu_job_h vqj, vpu_qpu_wait_h * const wait_h); -+int vpu_qpu_job_add_sync_sem(vpu_qpu_job_env_t * const vqj, sem_t * const sem); -+int vpu_qpu_job_start(const vpu_qpu_job_h vqj); -+int vpu_qpu_job_finish(const vpu_qpu_job_h vqj); -+ -+extern unsigned int vpu_get_fn(const unsigned int bit_depth); -+extern unsigned int vpu_get_constants(void); -+ -+// Waits for previous post_codee to complete and Will null out *wait_h after use -+void vpu_qpu_wait(vpu_qpu_wait_h * const wait_h); -+int vpu_qpu_init(void); -+void vpu_qpu_term(void); -+ -+void gpu_ref(void); -+void gpu_unref(void); -+ -+#endif ---- /dev/null -+++ b/libavcodec/rpi_zc.c -@@ -0,0 +1,1227 @@ -+#include "config.h" -+ -+#include "libavcodec/avcodec.h" -+#include "rpi_mem.h" -+#include "rpi_mailbox.h" -+#include "rpi_zc.h" -+#include "libavutil/avassert.h" -+#include -+ -+#include "libavutil/buffer_internal.h" -+ -+#pragma GCC diagnostic push -+// Many many redundant decls in the header files -+#pragma GCC diagnostic ignored "-Wredundant-decls" -+#include -+#include -+#pragma GCC diagnostic pop -+ -+#define TRACE_ALLOC 0 -+#define DEBUG_ALWAYS_KEEP_LOCKED 0 -+ -+struct ZcPoolEnt; -+ -+typedef struct ZcPool -+{ -+ size_t numbytes; -+ struct ZcPoolEnt * head; -+ pthread_mutex_t lock; -+} ZcPool; -+ -+typedef struct ZcPoolEnt -+{ -+ size_t numbytes; -+ -+ unsigned int vcsm_handle; -+ unsigned int vc_handle; -+ void * map_arm; -+ unsigned int map_vc; -+ -+ struct ZcPoolEnt * next; -+ struct ZcPool * pool; -+} ZcPoolEnt; -+ -+typedef struct ZcOldCtxVals -+{ -+ int thread_safe_callbacks; -+ int (*get_buffer2)(struct AVCodecContext *s, AVFrame *frame, int flags); -+ void * opaque; -+} ZcOldCtxVals; -+ -+typedef struct AVZcEnv -+{ -+ unsigned int refcount; -+ ZcOldCtxVals old; -+ -+ void * pool_env; -+ av_rpi_zc_alloc_buf_fn_t * alloc_buf; -+ av_rpi_zc_free_pool_fn_t * free_pool; -+ -+ unsigned int pool_size; -+} ZcEnv; -+ -+typedef struct ZcUserBufEnv { -+ void * v; -+ const av_rpi_zc_buf_fn_tab_t * fn; -+ size_t numbytes; -+ int offset; -+} ZcUserBufEnv; -+ -+#define ZC_BUF_INVALID 0 -+#define ZC_BUF_VALID 1 -+#define ZC_BUF_NEVER 2 -+ -+typedef struct ZcBufEnv { -+ GPU_MEM_PTR_T gmem; -+ AVZcEnvPtr zc; -+ int is_valid; -+ AVBufferRef * user; -+ AVRpiZcFrameGeometry geo; -+ size_t size_y; -+ size_t size_c; -+ size_t size_pic; -+ ssize_t offset; -+ pthread_mutex_t lock; -+ pthread_cond_t cond; -+} ZcBufEnv; -+ -+ -+ -+ -+ -+ -+#define ALLOC_PAD 0 -+#define ALLOC_ROUND 0x1000 -+#define STRIDE_ROUND 64 -+#define STRIDE_OR 0 -+ -+#define DEBUG_ZAP0_BUFFERS 0 -+ -+static inline int av_rpi_is_sand_format(const int format) -+{ -+ return (format >= AV_PIX_FMT_SAND128 && format <= AV_PIX_FMT_SAND64_16) || -+ (format == AV_PIX_FMT_RPI4_8 || format == AV_PIX_FMT_RPI4_10); -+} -+ -+static inline int av_rpi_is_sand_frame(const AVFrame * const frame) -+{ -+ return av_rpi_is_sand_format(frame->format); -+} -+ -+//---------------------------------------------------------------------------- -+// -+// Internal pool stuff -+ -+// Pool entry functions -+ -+static ZcPoolEnt * zc_pool_ent_alloc(ZcPool * const pool, const size_t req_size) -+{ -+ ZcPoolEnt * const zp = av_mallocz(sizeof(ZcPoolEnt)); -+ -+ // Round up to 4k & add 4k -+ const unsigned int alloc_size = (req_size + ALLOC_PAD + ALLOC_ROUND - 1) & ~(ALLOC_ROUND - 1); -+ -+ if (zp == NULL) { -+ av_log(NULL, AV_LOG_ERROR, "av_malloc(ZcPoolEnt) failed\n"); -+ goto fail0; -+ } -+ -+ // The 0x80 here maps all pages here rather than waiting for lazy mapping -+ // BEWARE that in GPU land a later unlock/lock pair will put us back into -+ // lazy mode - which will also break cache invalidate calls. -+ if ((zp->vcsm_handle = vcsm_malloc_cache(alloc_size, VCSM_CACHE_TYPE_HOST | 0x80, "ffmpeg_rpi_zc")) == 0) -+ { -+ av_log(NULL, AV_LOG_ERROR, "av_gpu_malloc_cached(%d) failed\n", alloc_size); -+ goto fail1; -+ } -+ -+#if TRACE_ALLOC -+ printf("%s: Alloc %#x bytes @ h=%d\n", __func__, alloc_size, zp->vcsm_handle); -+#endif -+ -+ zp->numbytes = alloc_size; -+ zp->pool = pool; -+ return zp; -+ -+fail1: -+ av_free(zp); -+fail0: -+ return NULL; -+} -+ -+static void zc_pool_ent_free(ZcPoolEnt * const zp) -+{ -+#if TRACE_ALLOC -+ printf("%s: Free %#x bytes @ h=%d\n", __func__, zp->numbytes, zp->vcsm_handle); -+#endif -+ -+ if (zp->vcsm_handle != 0) -+ { -+ // VC addr & handle need no dealloc -+ if (zp->map_arm != NULL) -+ vcsm_unlock_hdl(zp->vcsm_handle); -+ vcsm_free(zp->vcsm_handle); -+ } -+ av_free(zp); -+} -+ -+//---------------------------------------------------------------------------- -+// -+// Pool functions -+ -+static void zc_pool_free_ent_list(ZcPoolEnt * p) -+{ -+ while (p != NULL) -+ { -+ ZcPoolEnt * const zp = p; -+ p = p->next; -+ zc_pool_ent_free(zp); -+ } -+} -+ -+static void zc_pool_flush(ZcPool * const pool) -+{ -+ ZcPoolEnt * p = pool->head; -+ pool->head = NULL; -+ pool->numbytes = ~0U; -+ zc_pool_free_ent_list(p); -+} -+ -+static ZcPoolEnt * zc_pool_get_ent(ZcPool * const pool, const size_t req_bytes) -+{ -+ ZcPoolEnt * zp = NULL; -+ ZcPoolEnt * flush_list = NULL; -+ size_t numbytes; -+ -+ pthread_mutex_lock(&pool->lock); -+ -+ numbytes = pool->numbytes; -+ -+ // If size isn't close then dump the pool -+ // Close in this context means within 128k -+ if (req_bytes > numbytes || req_bytes + 0x20000 < numbytes) -+ { -+ flush_list = pool->head; -+ pool->head = NULL; -+ pool->numbytes = numbytes = req_bytes; -+ } -+ else if (pool->head != NULL) -+ { -+ zp = pool->head; -+ pool->head = zp->next; -+ } -+ -+ pthread_mutex_unlock(&pool->lock); -+ -+ zc_pool_free_ent_list(flush_list); -+ -+ if (zp == NULL) -+ zp = zc_pool_ent_alloc(pool, numbytes); -+ -+ return zp; -+} -+ -+static void zc_pool_put_ent(ZcPoolEnt * const zp) -+{ -+ ZcPool * const pool = zp == NULL ? NULL : zp->pool; -+ if (zp != NULL) -+ { -+ pthread_mutex_lock(&pool->lock); -+#if TRACE_ALLOC -+ printf("%s: Recycle %#x, %#x\n", __func__, pool->numbytes, zp->numbytes); -+#endif -+ -+ if (pool->numbytes == zp->numbytes) -+ { -+ zp->next = pool->head; -+ pool->head = zp; -+ pthread_mutex_unlock(&pool->lock); -+ } -+ else -+ { -+ pthread_mutex_unlock(&pool->lock); -+ zc_pool_ent_free(zp); -+ } -+ } -+} -+ -+static ZcPool * -+zc_pool_new(void) -+{ -+ ZcPool * const pool = av_mallocz(sizeof(*pool)); -+ if (pool == NULL) -+ return NULL; -+ -+ pool->numbytes = -1; -+ pool->head = NULL; -+ pthread_mutex_init(&pool->lock, NULL); -+ return pool; -+} -+ -+static void -+zc_pool_delete(ZcPool * const pool) -+{ -+ if (pool != NULL) -+ { -+ pool->numbytes = -1; -+ zc_pool_flush(pool); -+ pthread_mutex_destroy(&pool->lock); -+ av_free(pool); -+ } -+} -+ -+//============================================================================ -+// -+// ZC implementation using above pool implementation -+// -+// Fn table fns... -+ -+static void zc_pool_free_v(void * v) -+{ -+ zc_pool_put_ent(v); -+} -+ -+static unsigned int zc_pool_ent_vcsm_handle_v(void * v) -+{ -+ ZcPoolEnt * zp = v; -+ return zp->vcsm_handle; -+} -+ -+static unsigned int zc_pool_ent_vc_handle_v(void * v) -+{ -+ ZcPoolEnt * zp = v; -+ if (zp->vc_handle == 0) -+ { -+ if ((zp->vc_handle = vcsm_vc_hdl_from_hdl(zp->vcsm_handle)) == 0) -+ av_log(NULL, AV_LOG_ERROR, "%s: Failed to map VCSM handle %d to VC handle\n", -+ __func__, zp->vcsm_handle); -+ } -+ return zp->vc_handle; -+} -+ -+static void * zc_pool_ent_map_arm_v(void * v) -+{ -+ ZcPoolEnt * zp = v; -+ if (zp->map_arm == NULL) -+ { -+ if ((zp->map_arm = vcsm_lock(zp->vcsm_handle)) == NULL) -+ av_log(NULL, AV_LOG_ERROR, "%s: Failed to map VCSM handle %d to ARM address\n", -+ __func__, zp->vcsm_handle); -+ } -+ return zp->map_arm; -+} -+ -+static unsigned int zc_pool_ent_map_vc_v(void * v) -+{ -+ ZcPoolEnt * zp = v; -+ if (zp->map_vc == 0) -+ { -+ if ((zp->map_vc = vcsm_vc_addr_from_hdl(zp->vcsm_handle)) == 0) -+ av_log(NULL, AV_LOG_ERROR, "%s: Failed to map VCSM handle %d to VC address\n", -+ __func__, zp->vcsm_handle); -+ } -+ return zp->map_vc; -+} -+ -+static const av_rpi_zc_buf_fn_tab_t zc_pool_buf_fns = { -+ .free = zc_pool_free_v, -+ .vcsm_handle = zc_pool_ent_vcsm_handle_v, -+ .vc_handle = zc_pool_ent_vc_handle_v, -+ .map_arm = zc_pool_ent_map_arm_v, -+ .map_vc = zc_pool_ent_map_vc_v, -+}; -+ -+// ZC Env fns -+ -+// Delete pool -+// All buffers guaranteed freed by now -+static void -+zc_pool_delete_v(void * v) -+{ -+ zc_pool_delete((ZcPool *)v); -+ rpi_mem_gpu_uninit(); -+} -+ -+// Allocate a new ZC buffer -+static AVBufferRef * -+zc_pool_buf_alloc(void * v, size_t size, const AVRpiZcFrameGeometry * geo) -+{ -+ ZcPool * const pool = v; -+ ZcPoolEnt *const zp = zc_pool_get_ent(pool, size); -+ AVBufferRef * buf; -+ -+ (void)geo; // geo ignored here -+ -+ if (zp == NULL) { -+ av_log(NULL, AV_LOG_ERROR, "zc_pool_alloc(%d) failed\n", size); -+ goto fail0; -+ } -+ -+ if ((buf = av_rpi_zc_buf(size, 0, zp, &zc_pool_buf_fns)) == NULL) -+ { -+ av_log(NULL, AV_LOG_ERROR, "av_rpi_zc_buf() failed\n"); -+ goto fail2; -+ } -+ -+ return buf; -+ -+fail2: -+ zc_pool_put_ent(zp); -+fail0: -+ return NULL; -+} -+ -+// Init wrappers - the public fns -+ -+AVZcEnvPtr -+av_rpi_zc_int_env_alloc(void * logctx) -+{ -+ ZcEnv * zc; -+ ZcPool * pool_env; -+ -+ if (rpi_mem_gpu_init(0) < 0) -+ return NULL; -+ -+ if ((pool_env = zc_pool_new()) == NULL) -+ goto fail1; -+ -+ if ((zc = av_rpi_zc_env_alloc(logctx, pool_env, zc_pool_buf_alloc, zc_pool_delete_v)) == NULL) -+ goto fail2; -+ -+ return zc; -+ -+fail2: -+ zc_pool_delete(pool_env); -+fail1: -+ rpi_mem_gpu_uninit(); -+ return NULL; -+} -+ -+void -+av_rpi_zc_int_env_freep(AVZcEnvPtr * zcp) -+{ -+ const AVZcEnvPtr zc = *zcp; -+ *zcp = NULL; -+ if (zc != NULL) -+ av_rpi_zc_env_release(zc); -+} -+ -+//============================================================================ -+// -+// Geometry -+// -+// This is a separate chunck to the rest -+ -+// Get mailbox fd - should be in a lock when called -+// Rely on process close to close it -+static int mbox_fd(void) -+{ -+ static int fd = -1; -+ if (fd != -1) -+ return fd; -+ return (fd = mbox_open()); -+} -+ -+AVRpiZcFrameGeometry av_rpi_zc_frame_geometry( -+ const int format, const unsigned int video_width, const unsigned int video_height) -+{ -+ static pthread_mutex_t sand_lock = PTHREAD_MUTEX_INITIALIZER; -+ -+ AVRpiZcFrameGeometry geo = { -+ .format = format, -+ .video_width = video_width, -+ .video_height = video_height -+ }; -+ -+ switch (format) -+ { -+ case AV_PIX_FMT_YUV420P: -+ geo.stride_y = ((video_width + 32 + STRIDE_ROUND - 1) & ~(STRIDE_ROUND - 1)) | STRIDE_OR; -+ geo.stride_c = geo.stride_y / 2; -+ geo.height_y = (video_height + 32 + 31) & ~31; -+ geo.height_c = geo.height_y / 2; -+ geo.planes_c = 2; -+ geo.stripes = 1; -+ geo.bytes_per_pel = 1; -+ geo.stripe_is_yc = 1; -+ break; -+ -+ case AV_PIX_FMT_YUV420P10: -+ geo.stride_y = ((video_width * 2 + 64 + STRIDE_ROUND - 1) & ~(STRIDE_ROUND - 1)) | STRIDE_OR; -+ geo.stride_c = geo.stride_y / 2; -+ geo.height_y = (video_height + 32 + 31) & ~31; -+ geo.height_c = geo.height_y / 2; -+ geo.planes_c = 2; -+ geo.stripes = 1; -+ geo.bytes_per_pel = 2; -+ geo.stripe_is_yc = 1; -+ break; -+ -+ case AV_PIX_FMT_SAND128: -+ case AV_PIX_FMT_RPI4_8: -+ { -+ const unsigned int stripe_w = 128; -+ -+ static VC_IMAGE_T img = {0}; -+ -+ // Given the overhead of calling the mailbox keep a stashed -+ // copy as we will almost certainly just want the same numbers again -+ // but that means we need a lock -+ pthread_mutex_lock(&sand_lock); -+ -+ if (img.width != video_width || img.height != video_height) -+ { -+ VC_IMAGE_T new_img = { -+ .type = VC_IMAGE_YUV_UV, -+ .width = video_width, -+ .height = video_height -+ }; -+ -+ mbox_get_image_params(mbox_fd(), &new_img); -+ img = new_img; -+ } -+ -+ geo.stride_y = stripe_w; -+ geo.stride_c = stripe_w; -+ geo.height_y = ((intptr_t)img.extra.uv.u - (intptr_t)img.image_data) / stripe_w; -+ geo.height_c = img.pitch / stripe_w - geo.height_y; -+ geo.stripe_is_yc = 1; -+ if (geo.height_y * stripe_w > img.pitch) -+ { -+ // "tall" sand - all C blocks now follow Y -+ geo.height_y = img.pitch / stripe_w; -+ geo.height_c = geo.height_y; -+ geo.stripe_is_yc = 0; -+ } -+ geo.planes_c = 1; -+ geo.stripes = (video_width + stripe_w - 1) / stripe_w; -+ geo.bytes_per_pel = 1; -+ -+ pthread_mutex_unlock(&sand_lock); -+#if 0 -+ printf("Req: %dx%d: stride=%d/%d, height=%d/%d, stripes=%d, img.pitch=%d\n", -+ video_width, video_height, -+ geo.stride_y, geo.stride_c, -+ geo.height_y, geo.height_c, -+ geo.stripes, img.pitch); -+#endif -+ av_assert0((int)geo.height_y > 0 && (int)geo.height_c > 0); -+ av_assert0(geo.height_y >= video_height && geo.height_c >= video_height / 2); -+ break; -+ } -+ -+ case AV_PIX_FMT_RPI4_10: -+ { -+ const unsigned int stripe_w = 128; // bytes -+ -+ static pthread_mutex_t sand_lock = PTHREAD_MUTEX_INITIALIZER; -+ static VC_IMAGE_T img = {0}; -+ -+ // Given the overhead of calling the mailbox keep a stashed -+ // copy as we will almost certainly just want the same numbers again -+ // but that means we need a lock -+ pthread_mutex_lock(&sand_lock); -+ -+ if (img.width != video_width || img.height != video_height) -+ { -+ VC_IMAGE_T new_img = { -+ .type = VC_IMAGE_YUV10COL, -+ .width = video_width, -+ .height = video_height -+ }; -+ -+ mbox_get_image_params(mbox_fd(), &new_img); -+ img = new_img; -+ } -+ -+ geo.stride_y = stripe_w; -+ geo.stride_c = stripe_w; -+ geo.height_y = ((intptr_t)img.extra.uv.u - (intptr_t)img.image_data) / stripe_w; -+ geo.height_c = img.pitch / stripe_w - geo.height_y; -+ geo.planes_c = 1; -+ geo.stripes = ((video_width * 4 + 2) / 3 + stripe_w - 1) / stripe_w; -+ geo.bytes_per_pel = 1; -+ geo.stripe_is_yc = 1; -+ -+ pthread_mutex_unlock(&sand_lock); -+ -+#if 0 -+ printf("Req: %dx%d: stride=%d/%d, height=%d/%d, stripes=%d, img.pitch=%d\n", -+ video_width, video_height, -+ geo.stride_y, geo.stride_c, -+ geo.height_y, geo.height_c, -+ geo.stripes, img.pitch); -+#endif -+ av_assert0((int)geo.height_y > 0 && (int)geo.height_c > 0); -+ av_assert0(geo.height_y >= video_height && geo.height_c >= video_height / 2); -+ break; -+ } -+ -+ case AV_PIX_FMT_SAND64_16: -+ case AV_PIX_FMT_SAND64_10: -+ { -+ const unsigned int stripe_w = 128; // bytes -+ -+ static pthread_mutex_t sand_lock = PTHREAD_MUTEX_INITIALIZER; -+ static VC_IMAGE_T img = {0}; -+ -+ // Given the overhead of calling the mailbox keep a stashed -+ // copy as we will almost certainly just want the same numbers again -+ // but that means we need a lock -+ pthread_mutex_lock(&sand_lock); -+ -+ if (img.width != video_width || img.height != video_height) -+ { -+ VC_IMAGE_T new_img = { -+ .type = VC_IMAGE_YUV_UV_16, -+ .width = video_width, -+ .height = video_height -+ }; -+ -+ mbox_get_image_params(mbox_fd(), &new_img); -+ img = new_img; -+ } -+ -+ geo.stride_y = stripe_w; -+ geo.stride_c = stripe_w; -+ geo.height_y = ((intptr_t)img.extra.uv.u - (intptr_t)img.image_data) / stripe_w; -+ geo.height_c = img.pitch / stripe_w - geo.height_y; -+ geo.planes_c = 1; -+ geo.stripes = (video_width * 2 + stripe_w - 1) / stripe_w; -+ geo.bytes_per_pel = 2; -+ geo.stripe_is_yc = 1; -+ -+ pthread_mutex_unlock(&sand_lock); -+ break; -+ } -+ -+ default: -+ break; -+ } -+ return geo; -+} -+ -+//============================================================================ -+// -+// ZC Env fns -+// -+// Frame copy fns -+ -+static AVBufferRef * zc_copy(const AVZcEnvPtr zc, -+ const AVFrame * const src) -+{ -+ AVFrame dest_frame; -+ AVFrame * const dest = &dest_frame; -+ unsigned int i; -+ uint8_t * psrc, * pdest; -+ -+ dest->format = src->format; -+ dest->width = src->width; -+ dest->height = src->height; -+ -+ if (av_rpi_zc_get_buffer(zc, dest) != 0 || -+ av_rpi_zc_resolve_frame(dest, ZC_RESOLVE_ALLOC_VALID) != 0) -+ { -+ return NULL; -+ } -+ -+ for (i = 0, psrc = src->data[0], pdest = dest->data[0]; -+ i != dest->height; -+ ++i, psrc += src->linesize[0], pdest += dest->linesize[0]) -+ { -+ memcpy(pdest, psrc, dest->width); -+ } -+ for (i = 0, psrc = src->data[1], pdest = dest->data[1]; -+ i != dest->height / 2; -+ ++i, psrc += src->linesize[1], pdest += dest->linesize[1]) -+ { -+ memcpy(pdest, psrc, dest->width / 2); -+ } -+ for (i = 0, psrc = src->data[2], pdest = dest->data[2]; -+ i != dest->height / 2; -+ ++i, psrc += src->linesize[2], pdest += dest->linesize[2]) -+ { -+ memcpy(pdest, psrc, dest->width / 2); -+ } -+ -+ return dest->buf[0]; -+} -+ -+ -+static AVBufferRef * zc_420p10_to_sand128(const AVZcEnvPtr zc, -+ const AVFrame * const src) -+{ -+ assert(0); -+ return NULL; -+} -+ -+ -+static AVBufferRef * zc_sand64_16_to_sand128(const AVZcEnvPtr zc, -+ const AVFrame * const src, const unsigned int src_bits) -+{ -+ assert(0); -+ return NULL; -+} -+ -+//---------------------------------------------------------------------------- -+// -+// Public info extraction calls -+ -+static void zc_buf_env_free_cb(void * opaque, uint8_t * data); -+ -+static inline ZcBufEnv * pic_zbe_ptr(AVBufferRef *const buf) -+{ -+ // Kludge where we check the free fn to check this is really -+ // one of our buffers - can't think of a better way -+ return buf == NULL || buf->buffer->free != zc_buf_env_free_cb ? NULL : -+ av_buffer_get_opaque(buf); -+} -+ -+static inline GPU_MEM_PTR_T * pic_gm_ptr(AVBufferRef * const buf) -+{ -+ // As gmem is the first el NULL should be preserved -+ return &pic_zbe_ptr(buf)->gmem; -+} -+ -+unsigned int av_rpi_zc_vcsm_handle(const AVRpiZcRefPtr fr_ref) -+{ -+ const GPU_MEM_PTR_T * const p = pic_gm_ptr(fr_ref); -+ return p == NULL ? 0 : p->vcsm_handle; -+} -+ -+int av_rpi_zc_vc_handle(const AVRpiZcRefPtr fr_ref) -+{ -+ const GPU_MEM_PTR_T * const p = pic_gm_ptr(fr_ref); -+ return p == NULL ? -1 : p->vc_handle; -+} -+ -+int av_rpi_zc_offset(const AVRpiZcRefPtr fr_ref) -+{ -+ const ZcBufEnv * const zbe = pic_zbe_ptr(fr_ref); -+ return zbe == NULL ? 0 : zbe->offset; -+} -+ -+int av_rpi_zc_length(const AVRpiZcRefPtr fr_ref) -+{ -+ const ZcBufEnv * const zbe = pic_zbe_ptr(fr_ref); -+ return zbe == NULL ? 0 : zbe->size_pic; -+} -+ -+int av_rpi_zc_numbytes(const AVRpiZcRefPtr fr_ref) -+{ -+ const GPU_MEM_PTR_T * const p = pic_gm_ptr(fr_ref); -+ return p == NULL ? 0 : p->numbytes; -+} -+ -+const AVRpiZcFrameGeometry * av_rpi_zc_geometry(const AVRpiZcRefPtr fr_ref) -+{ -+ const ZcBufEnv * const zbe = pic_zbe_ptr(fr_ref); -+ return zbe == NULL ? NULL : &zbe->geo; -+} -+ -+AVRpiZcRefPtr av_rpi_zc_ref(void * const logctx, const AVZcEnvPtr zc, -+ const AVFrame * const frame, const enum AVPixelFormat expected_format, const int maycopy) -+{ -+ av_assert0(!maycopy || zc != NULL); -+ -+ if (frame->format != AV_PIX_FMT_YUV420P && -+ frame->format != AV_PIX_FMT_YUV420P10 && -+ !av_rpi_is_sand_frame(frame)) -+ { -+ av_log(logctx, AV_LOG_WARNING, "%s: *** Format not SAND/YUV420P: %d\n", __func__, frame->format); -+ return NULL; -+ } -+ -+ if (frame->buf[1] != NULL || frame->format != expected_format) -+ { -+#if RPI_ZC_SAND_8_IN_10_BUF -+ if (frame->format == AV_PIX_FMT_SAND64_10 && expected_format == AV_PIX_FMT_SAND128 && frame->buf[RPI_ZC_SAND_8_IN_10_BUF] != NULL) -+ { -+// av_log(s, AV_LOG_INFO, "%s: --- found buf[4]\n", __func__); -+ return av_buffer_ref(frame->buf[RPI_ZC_SAND_8_IN_10_BUF]); -+ } -+#endif -+ -+ if (maycopy) -+ { -+ if (frame->buf[1] != NULL) -+ av_log(logctx, AV_LOG_INFO, "%s: *** Not a single buf frame: copying\n", __func__); -+ else -+ av_log(logctx, AV_LOG_INFO, "%s: *** Unexpected frame format %d: copying to %d\n", __func__, frame->format, expected_format); -+ -+ switch (frame->format) -+ { -+ case AV_PIX_FMT_YUV420P10: -+ return zc_420p10_to_sand128(zc, frame); -+ -+ case AV_PIX_FMT_SAND64_10: -+ return zc_sand64_16_to_sand128(zc, frame, 10); -+ -+ default: -+ return zc_copy(zc, frame); -+ } -+ } -+ else -+ { -+ if (frame->buf[1] != NULL) -+ av_log(logctx, AV_LOG_WARNING, "%s: *** Not a single buf frame: buf[1] != NULL\n", __func__); -+ else -+ av_log(logctx, AV_LOG_INFO, "%s: *** Unexpected frame format: %d != %d\n", __func__, frame->format, expected_format); -+ return NULL; -+ } -+ } -+ -+ if (pic_gm_ptr(frame->buf[0]) == NULL) -+ { -+ if (maycopy) -+ { -+ av_log(logctx, AV_LOG_INFO, "%s: *** Not one of our buffers: copying\n", __func__); -+ return zc_copy(zc, frame); -+ } -+ else -+ { -+ av_log(logctx, AV_LOG_WARNING, "%s: *** Not one of our buffers: NULL\n", __func__); -+ return NULL; -+ } -+ } -+ -+ return av_buffer_ref(frame->buf[0]); -+} -+ -+void av_rpi_zc_unref(AVRpiZcRefPtr fr_ref) -+{ -+ if (fr_ref != NULL) -+ { -+ av_buffer_unref(&fr_ref); -+ } -+} -+ -+//---------------------------------------------------------------------------- -+ -+// Extract user environment from an AVBufferRef -+void * av_rpi_zc_buf_v(AVBufferRef * const buf) -+{ -+ ZcBufEnv * const zbe = pic_zbe_ptr(buf); -+ if (zbe != NULL && zbe->user != NULL) -+ { -+ const ZcUserBufEnv * const zub = (const ZcUserBufEnv *)zbe->user->data; -+ return zub == NULL ? NULL : zub->v; -+ } -+ return NULL; -+} -+ -+// AV buffer pre-free callback -+static void zc_user_buf_free_cb(void * opaque, uint8_t * data) -+{ -+ if (opaque != NULL) -+ { -+ ZcUserBufEnv * const zub = opaque; -+ -+ if (zub->fn->free) -+ zub->fn->free(zub->v); -+ -+ av_free(zub); -+ } -+} -+ -+static void zc_buf_env_free_cb(void * opaque, uint8_t * data) -+{ -+ if (opaque != NULL) -+ { -+ ZcBufEnv * const zbe = opaque; -+ -+ av_buffer_unref(&zbe->user); -+ -+ if (zbe->zc != NULL) -+ av_rpi_zc_env_release(zbe->zc); -+ -+ pthread_cond_destroy(&zbe->cond); -+ pthread_mutex_destroy(&zbe->lock); -+ av_free(zbe); -+ } -+} -+ -+ -+// Wrap the various ZC bits in an AV Buffer and resolve those things we want -+// resolved now. -+// Currently we resolve everything, but in future we might not -+AVBufferRef * av_rpi_zc_buf(size_t numbytes, int addr_offset, void * v, const av_rpi_zc_buf_fn_tab_t * fn_tab) -+{ -+ AVBufferRef *buf; -+ ZcUserBufEnv * zub; -+ -+ if ((zub = av_malloc(sizeof(ZcUserBufEnv))) == NULL) -+ return NULL; -+ -+ zub->fn = fn_tab; -+ zub->v = v; -+ zub->numbytes = numbytes; -+ zub->offset = addr_offset; -+ -+ if ((buf = av_buffer_create((uint8_t*)zub, sizeof(*zub), zc_user_buf_free_cb, zub, 0)) == NULL) -+ { -+ av_log(NULL, AV_LOG_ERROR, "ZC: Failed av_buffer_create\n"); -+ av_free(zub); -+ return NULL; -+ } -+ -+ return buf; -+} -+ -+int av_rpi_zc_resolve_buffer(AVBufferRef * const buf, const int alloc_mode) -+{ -+ ZcBufEnv * const zbe = pic_zbe_ptr(buf); -+ -+ if (zbe == NULL) -+ return AVERROR(EINVAL); -+ -+ if (alloc_mode == ZC_RESOLVE_FAIL && !zbe->is_valid) -+ return AVERROR(EAGAIN); -+ -+ if (alloc_mode == ZC_RESOLVE_WAIT_VALID && !zbe->is_valid) -+ { -+ pthread_mutex_lock(&zbe->lock); -+ while (!zbe->is_valid) -+ pthread_cond_wait(&zbe->cond, &zbe->lock); -+ pthread_mutex_unlock(&zbe->lock); -+ } -+ -+ if (zbe->is_valid == ZC_BUF_NEVER) -+ return AVERROR(EINVAL); -+ -+ // Do alloc if we need it -+ if (zbe->user == NULL) -+ { -+ ZcEnv * const zc = zbe->zc; -+ const ZcUserBufEnv * zub; -+ -+ av_assert0(alloc_mode == ZC_RESOLVE_ALLOC || alloc_mode == ZC_RESOLVE_ALLOC_VALID); -+ -+ if ((zbe->user = zc->alloc_buf(zc->pool_env, zbe->size_pic, &zbe->geo)) == NULL) -+ { -+ av_log(NULL, AV_LOG_ERROR, "rpi_get_display_buffer: Failed to get buffer from pool\n"); -+ goto fail; -+ } -+ zub = (const ZcUserBufEnv *)zbe->user->data; -+ -+ // Track -+ -+ zbe->offset = zub->offset; -+ zbe->gmem.numbytes = zub->numbytes; -+ if ((zbe->gmem.arm = zub->fn->map_arm(zub->v)) == NULL) -+ { -+ av_log(NULL, AV_LOG_ERROR, "ZC: Failed to lock vcsm_handle %u\n", zbe->gmem.vcsm_handle); -+ goto fail; -+ } -+ -+ if ((zbe->gmem.vcsm_handle = zub->fn->vcsm_handle(zub->v)) == 0) -+ { -+ av_log(NULL, AV_LOG_ERROR, "ZC: Failed to get vcsm_handle\n"); -+ goto fail; -+ } -+ -+ if ((zbe->gmem.vc_handle = zub->fn->vc_handle(zub->v)) == 0) -+ { -+ av_log(NULL, AV_LOG_ERROR, "ZC: Failed to get vc handle from vcsm_handle %u\n", zbe->gmem.vcsm_handle); -+ goto fail; -+ } -+ if ((zbe->gmem.vc = zub->fn->map_vc(zub->v)) == 0) -+ { -+ av_log(NULL, AV_LOG_ERROR, "ZC: Failed to get vc addr from vcsm_handle %u\n", zbe->gmem.vcsm_handle); -+ goto fail; -+ } -+ -+ buf->buffer->data = zbe->gmem.arm + zbe->offset; -+ buf->buffer->size = zbe->size_pic; -+ -+ // In this mode we shouldn't have anyone waiting for us -+ // so no need to signal -+ if (alloc_mode == ZC_RESOLVE_ALLOC_VALID) -+ zbe->is_valid = 1; -+ } -+ -+ // Just overwrite - no point in testing -+ buf->data = zbe->gmem.arm + zbe->offset; -+ buf->size = zbe->size_pic; -+ return 0; -+ -+fail: -+ av_buffer_unref(&zbe->user); -+ return AVERROR(ENOMEM); -+} -+ -+int av_rpi_zc_resolve_frame(AVFrame * const frame, const int may_alloc) -+{ -+ int rv; -+ -+ // Do alloc if we need it -+ if ((rv = av_rpi_zc_resolve_buffer(frame->buf[0], may_alloc)) != 0) -+ return rv; -+ -+ // If we are a framebuf copy then the alloc can be done but we haven't -+ // imported its results yet -+ if (frame->data[0] == NULL) -+ { -+ const ZcBufEnv * const zbe = pic_zbe_ptr(frame->buf[0]); -+ -+ frame->linesize[0] = zbe->geo.stride_y; -+ frame->linesize[1] = zbe->geo.stride_c; -+ frame->linesize[2] = zbe->geo.stride_c; -+ // abuse: linesize[3] = "stripe stride" -+ // stripe_stride is NOT the stride between slices it is (that / geo.stride_y). -+ // In a general case this makes the calculation an xor and multiply rather -+ // than a divide and multiply -+ if (zbe->geo.stripes > 1) -+ frame->linesize[3] = zbe->geo.stripe_is_yc ? zbe->geo.height_y + zbe->geo.height_c : zbe->geo.height_y; -+ -+ frame->data[0] = frame->buf[0]->data; -+ frame->data[1] = frame->data[0] + (zbe->geo.stripe_is_yc ? zbe->size_y : zbe->size_y * zbe->geo.stripes); -+ if (zbe->geo.planes_c > 1) -+ frame->data[2] = frame->data[1] + zbe->size_c; -+ -+ frame->extended_data = frame->data; -+ // Leave extended buf alone -+ } -+ -+ return 0; -+} -+ -+int av_rpi_zc_set_valid_frame(AVFrame * const frame) -+{ -+ ZcBufEnv * const zbe = pic_zbe_ptr(frame->buf[0]); -+ -+ if (zbe == NULL) -+ return AVERROR(EINVAL); -+ -+ zbe->is_valid = ZC_BUF_VALID; -+ pthread_cond_broadcast(&zbe->cond); -+ -+ return 0; -+} -+ -+int av_rpi_zc_set_broken_frame(AVFrame * const frame) -+{ -+ ZcBufEnv * const zbe = pic_zbe_ptr(frame->buf[0]); -+ -+ if (zbe == NULL) -+ return AVERROR(EINVAL); -+ -+ zbe->is_valid = ZC_BUF_NEVER; -+ pthread_cond_broadcast(&zbe->cond); -+ -+ return 0; -+} -+ -+void av_rpi_zc_set_decoder_pool_size(ZcEnv *const zc, const unsigned int pool_size) -+{ -+ zc->pool_size = pool_size; -+} -+ -+unsigned int av_rpi_zc_get_decoder_pool_size(ZcEnv *const zc) -+{ -+ return zc->pool_size; -+} -+ -+int av_rpi_zc_get_buffer(ZcEnv *const zc, AVFrame * const frame) -+{ -+#if 1 -+ ZcBufEnv * zbe = av_mallocz(sizeof(*zbe)); -+ -+ for (unsigned int i = 0; i < AV_NUM_DATA_POINTERS; i++) { -+ frame->buf[i] = NULL; -+ frame->data[i] = NULL; -+ frame->linesize[i] = 0; -+ } -+ -+ if (zbe == NULL) -+ return AVERROR(ENOMEM); -+ -+ if ((frame->buf[0] = av_buffer_create((uint8_t *)zbe, sizeof(*zbe), zc_buf_env_free_cb, zbe, 0)) == NULL) -+ { -+ av_free(zbe); -+ return AVERROR(ENOMEM); -+ } -+ -+ pthread_mutex_init(&zbe->lock, NULL); -+ pthread_cond_init(&zbe->cond, NULL); -+ zbe->zc = zc; -+ atomic_fetch_add(&zc->refcount, 1); -+ -+ zbe->geo = av_rpi_zc_frame_geometry(frame->format, frame->width, frame->height); // Note geometry for later use -+ zbe->size_y = zbe->geo.stride_y * zbe->geo.height_y; -+ zbe->size_c = zbe->geo.stride_c * zbe->geo.height_c; -+ zbe->size_pic = (zbe->size_y + zbe->size_c * zbe->geo.planes_c) * zbe->geo.stripes; -+ -+#else -+ const AVRpiZcFrameGeometry geo = av_rpi_zc_frame_geometry(frame->format, frame->width, frame->height); -+ const unsigned int size_y = geo.stride_y * geo.height_y; -+ const unsigned int size_c = geo.stride_c * geo.height_c; -+ const unsigned int size_pic = (size_y + size_c * geo.planes_c) * geo.stripes; -+ AVBufferRef * buf; -+ unsigned int i; -+ -+// printf("Do local alloc: format=%#x, %dx%d: %u\n", frame->format, frame->width, frame->height, size_pic); -+ -+ if ((buf = zc->alloc_buf(zc->pool_env, size_pic, &geo)) == NULL) -+ { -+ av_log(NULL, AV_LOG_ERROR, "rpi_get_display_buffer: Failed to get buffer from pool\n"); -+ return AVERROR(ENOMEM); -+ } -+ -+ // Track -+ atomic_fetch_add(&zc->refcount, 1); -+ pic_zbe_ptr(buf)->zc = zc; -+ -+ for (i = 0; i < AV_NUM_DATA_POINTERS; i++) { -+ frame->buf[i] = NULL; -+ frame->data[i] = NULL; -+ frame->linesize[i] = 0; -+ } -+ -+ frame->buf[0] = buf; -+ -+ frame->linesize[0] = geo.stride_y; -+ frame->linesize[1] = geo.stride_c; -+ frame->linesize[2] = geo.stride_c; -+ // abuse: linesize[3] = "stripe stride" -+ // stripe_stride is NOT the stride between slices it is (that / geo.stride_y). -+ // In a general case this makes the calculation an xor and multiply rather -+ // than a divide and multiply -+ if (geo.stripes > 1) -+ frame->linesize[3] = geo.stripe_is_yc ? geo.height_y + geo.height_c : geo.height_y; -+ -+ frame->data[0] = buf->data; -+ frame->data[1] = frame->data[0] + (geo.stripe_is_yc ? size_y : size_y * geo.stripes); -+ if (geo.planes_c > 1) -+ frame->data[2] = frame->data[1] + size_c; -+ -+ frame->extended_data = frame->data; -+ // Leave extended buf alone -+ -+#if RPI_ZC_SAND_8_IN_10_BUF != 0 -+ // *** If we intend to use this for real we will want a 2nd buffer pool -+ frame->buf[RPI_ZC_SAND_8_IN_10_BUF] = zc_pool_buf_alloc(&zc->pool, size_pic); // *** 2 * wanted size - kludge -+#endif -+#endif -+ -+ return 0; -+} -+ -+void av_rpi_zc_env_release(const AVZcEnvPtr zc) -+{ -+ const int n = atomic_fetch_add(&zc->refcount, -1); -+ if (n == 1) // was 1, now 0 -+ { -+ zc->free_pool(zc->pool_env); -+ av_free(zc); -+ } -+} -+ -+AVZcEnvPtr av_rpi_zc_env_alloc(void * logctx, -+ void * pool_env, -+ av_rpi_zc_alloc_buf_fn_t * alloc_buf_fn, -+ av_rpi_zc_free_pool_fn_t * free_pool_fn) -+{ -+ ZcEnv * zc; -+ -+ if ((zc = av_mallocz(sizeof(ZcEnv))) == NULL) -+ { -+ av_log(logctx, AV_LOG_ERROR, "av_rpi_zc_env_alloc: Context allocation failed\n"); -+ return NULL; -+ } -+ -+ *zc = (ZcEnv){ -+ .refcount = ATOMIC_VAR_INIT(1), -+ .pool_env = pool_env, -+ .alloc_buf = alloc_buf_fn, -+ .free_pool = free_pool_fn, -+ .pool_size = 0 -+ }; -+ -+ return zc; -+} -+ -+//============================================================================ -+// -+// External ZC initialisation -+ -+#define RPI_GET_BUFFER2 1 -+ -+ -+static int zc_get_buffer2(struct AVCodecContext *s, AVFrame *frame, int flags) -+{ -+#if !RPI_GET_BUFFER2 -+ return avcodec_default_get_buffer2(s, frame, flags); -+#else -+ int rv; -+ -+ if ((s->codec->capabilities & AV_CODEC_CAP_DR1) == 0) -+ { -+// printf("Do default alloc: format=%#x\n", frame->format); -+ rv = avcodec_default_get_buffer2(s, frame, flags); -+ } -+ else if (frame->format == AV_PIX_FMT_YUV420P || -+ av_rpi_is_sand_frame(frame)) -+ { -+ if ((rv = av_rpi_zc_get_buffer(s->opaque, frame)) == 0) -+ rv = av_rpi_zc_resolve_frame(frame, ZC_RESOLVE_ALLOC_VALID); -+ } -+ else -+ { -+ rv = avcodec_default_get_buffer2(s, frame, flags); -+ } -+ -+#if 0 -+ printf("%s: fmt:%d, %dx%d lsize=%d/%d/%d/%d data=%p/%p/%p bref=%p/%p/%p opaque[0]=%p\n", __func__, -+ frame->format, frame->width, frame->height, -+ frame->linesize[0], frame->linesize[1], frame->linesize[2], frame->linesize[3], -+ frame->data[0], frame->data[1], frame->data[2], -+ frame->buf[0], frame->buf[1], frame->buf[2], -+ av_buffer_get_opaque(frame->buf[0])); -+#endif -+ return rv; -+#endif -+} -+ -+int av_rpi_zc_in_use(const struct AVCodecContext * const s) -+{ -+ return s->get_buffer2 == zc_get_buffer2; -+} -+ -+int av_rpi_zc_init2(struct AVCodecContext * const s, -+ void * pool_env, -+ av_rpi_zc_alloc_buf_fn_t * alloc_buf_fn, -+ av_rpi_zc_free_pool_fn_t * free_pool_fn) -+{ -+ ZcEnv * zc; -+ -+ av_assert0(!av_rpi_zc_in_use(s)); -+ -+ if ((zc = av_rpi_zc_env_alloc(s, pool_env, alloc_buf_fn, free_pool_fn)) == NULL) -+ return AVERROR(ENOMEM); -+ -+ zc->old = (ZcOldCtxVals){ -+ .opaque = s->opaque, -+ .get_buffer2 = s->get_buffer2, -+ .thread_safe_callbacks = s->thread_safe_callbacks -+ }; -+ -+ s->opaque = zc; -+ s->get_buffer2 = zc_get_buffer2; -+ s->thread_safe_callbacks = 1; -+ return 0; -+} -+ -+void av_rpi_zc_uninit2(struct AVCodecContext * const s) -+{ -+ ZcEnv * const zc = s->opaque; -+ -+ av_assert0(av_rpi_zc_in_use(s)); -+ -+ s->get_buffer2 = zc->old.get_buffer2; -+ s->opaque = zc->old.opaque; -+ s->thread_safe_callbacks = zc->old.thread_safe_callbacks; -+ -+ av_rpi_zc_env_release(zc); -+} -+ ---- /dev/null -+++ b/libavcodec/rpi_zc.h -@@ -0,0 +1,228 @@ -+/* -+Copyright (c) 2018 Raspberry Pi (Trading) Ltd. -+All rights reserved. -+ -+Redistribution and use in source and binary forms, with or without -+modification, are permitted provided that the following conditions are met: -+ * Redistributions of source code must retain the above copyright -+ notice, this list of conditions and the following disclaimer. -+ * Redistributions in binary form must reproduce the above copyright -+ notice, this list of conditions and the following disclaimer in the -+ documentation and/or other materials provided with the distribution. -+ * Neither the name of the copyright holder nor the -+ names of its contributors may be used to endorse or promote products -+ derived from this software without specific prior written permission. -+ -+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ -+Authors: John Cox -+*/ -+ -+#ifndef LIBAVCODEC_RPI_ZC_H -+#define LIBAVCODEC_RPI_ZC_H -+ -+// Zero-Copy frame code for RPi -+// RPi needs Y/U/V planes to be contiguous for display. By default -+// ffmpeg will allocate separated planes so a memcpy is needed before -+// display. This code provides a method a making ffmpeg allocate a single -+// bit of memory for the frame when can then be reference counted until -+// display has finished with it. -+ -+// Frame buffer number in which to stuff an 8-bit copy of a 16-bit frame -+// 0 disables -+// *** This option still in development -+// Only works if SAO active -+// Allocates buffers that are twice the required size -+#define RPI_ZC_SAND_8_IN_10_BUF 0 -+ -+struct AVBufferRef; -+struct AVFrame; -+struct AVCodecContext; -+enum AVPixelFormat; -+ -+// "Opaque" pointer to whatever we are using as a buffer reference -+typedef struct AVBufferRef * AVRpiZcRefPtr; -+ -+struct AVZcEnv; -+typedef struct AVZcEnv * AVZcEnvPtr; -+ -+typedef struct AVRpiZcFrameGeometry -+{ -+ unsigned int stride_y; // Luma stride (bytes) -+ unsigned int height_y; // Luma height (lines) -+ unsigned int stride_c; // Chroma stride (bytes) -+ unsigned int height_c; // Chroma stride (lines) -+ unsigned int planes_c; // Chroma plane count (U, V = 2, interleaved = 1) -+ unsigned int stripes; // Number of stripes (sand) -+ unsigned int bytes_per_pel; -+ int stripe_is_yc; // A single stripe is Y then C (false for tall sand) -+ -+ int format; // Requested format -+ unsigned int video_width; // Requested width -+ unsigned int video_height; // Requested height -+} AVRpiZcFrameGeometry; -+ -+// Get expected MMAL geometry for a given format, width & height -+AVRpiZcFrameGeometry av_rpi_zc_frame_geometry( -+ const int format, -+ const unsigned int video_width, const unsigned int video_height); -+ -+//---------------------------------------------------------------------------- -+// -+// Calls that extract info from a ZC frame whether internally or externally -+// allocated -+ -+// Generate a ZC reference to the buffer(s) in this frame -+// If the buffer doesn't appear to be one allocated by ZC -+// then the behaviour depends on maycopy: -+// If maycopy=0 then return NULL -+// If maycopy=1 && the src frame is in a form where we can easily copy -+// the data, then allocate a new buffer and copy the data into it -+// Otherwise return NULL -+// If maycopy == 0 then ZC may be NULL -+AVRpiZcRefPtr av_rpi_zc_ref(void * const logging_context, const AVZcEnvPtr zc, -+ const struct AVFrame * const frame, const enum AVPixelFormat expected_format, const int maycopy); -+ -+// Unreference the buffer refed/allocated by _zc_ref -+// If fr_ref is NULL then this will NOP -+void av_rpi_zc_unref(AVRpiZcRefPtr fr_ref); -+ -+// Get the vc_handle from the frame ref -+// Returns -1 if ref doesn't look valid -+int av_rpi_zc_vc_handle(const AVRpiZcRefPtr fr_ref); -+// Get the vcsm_handle from the frame ref -+// Returns 0 if ref doesn't look valid -+unsigned int av_rpi_zc_vcsm_handle(const AVRpiZcRefPtr fr_ref); -+// Get offset from the start of the memory referenced -+// by the vc_handle to valid data -+int av_rpi_zc_offset(const AVRpiZcRefPtr fr_ref); -+// Length of buffer data -+int av_rpi_zc_length(const AVRpiZcRefPtr fr_ref); -+// Get the number of bytes allocated from the frame ref -+// Returns 0 if ref doesn't look valid -+int av_rpi_zc_numbytes(const AVRpiZcRefPtr fr_ref); -+// Geometry this frame was allocated with -+const AVRpiZcFrameGeometry * av_rpi_zc_geometry(const AVRpiZcRefPtr fr_ref); -+ -+//---------------------------------------------------------------------------- -+// -+// Calls for external frame allocation -+ -+// Callbacks registered in av_rpi_zc_init2 -+ -+// Callback to allocate a buf for a frame -+// The frame itself is generated in the calling code -+// -+// Parameters: -+// pool_env value passed to av-rpi_zc_init2 -+// size size wanted -+// geo geometry of the frame to be allocated -+// Returns: -+// NULL Alloc failed -+// ptr AVBufferBuf* of allocated buffer -+// In most cases av_rpi_zc_buf will be called by this function -+// and this will be the buf returned by that. -+typedef AVBufferRef * av_rpi_zc_alloc_buf_fn_t(void * pool_env, size_t size, -+ const AVRpiZcFrameGeometry * geo); -+ -+// Callback once ffmpeg is completely done with this pool -+// Called once all allocated buffers have been derefed and ffmpegs ref to this -+// pool has been dropped -+typedef void av_rpi_zc_free_pool_fn_t(void * pool_env); -+ -+// Init ZC into a context -+// Sets opaque, get_buffer2, thread_safe_callbacks -+// Use if you want to allocate your own pools and/or create ZC buffers for -+// all decoders -+// RPI HEVC decoders will allocate appropriate VCSM buffers which can be taken -+// apart by av_rpi_zc_xxx calls without this -+int av_rpi_zc_init2(struct AVCodecContext * const s, -+ void * pool_env, av_rpi_zc_alloc_buf_fn_t * alloc_buf_fn, -+ av_rpi_zc_free_pool_fn_t * free_pool_fn); -+ -+// Free ZC from a context -+void av_rpi_zc_uninit2(struct AVCodecContext * const s); -+ -+// Get minimum pool size in frames - valid by the time the first alloc request -+// occurs. Takes into account thread requests and DPB sizes derived from SPS -+// rather than just adding a worst case DPB size. -+unsigned int av_rpi_zc_get_decoder_pool_size(const AVZcEnvPtr zc); -+ -+typedef struct av_rpi_zc_buf_fn_tab_s { -+ // This AVBuffer is being freed by ffmpeg - return memory -+ // to external pool. Memory may be, but need not be, unmapped. -+ // v is the ptr passed in av_rpi_zc_buf -+ void (* free)(void * v); -+ -+ // Return appropriate handles / mappings -+ // v is the ptr passed in av_rpi_zc_buf -+ unsigned int (* vcsm_handle)(void * v); -+ unsigned int (* vc_handle)(void * v); -+ void * (* map_arm)(void * v); -+ unsigned int (* map_vc)(void * v); -+} av_rpi_zc_buf_fn_tab_t; -+ -+// Allocate a ZC AVBufferRef and set its callback table -+// Doesn't take a buffer address directly - relies on callbacks to return -+// addresses as they are required. Mappings need not be generated until -+// the map callbacks are called but they should persist from then until -+// the buffer is freed. -+// -+// Parameters: -+// numbytes Size of the buffer -+// addr_offset Offset to first usable byte of buffer (for alignment) -+// normally 0 -+// v Pointer passed to callbacks -+// fn_tab Function table -+AVBufferRef * av_rpi_zc_buf(size_t numbytes, int addr_offset, void * v, const av_rpi_zc_buf_fn_tab_t * fn_tab); -+ -+// Get v ptr set in in av_rpi_zc_buf -+void * av_rpi_zc_buf_v(AVBufferRef * const buf); -+ -+//---------------------------------------------------------------------------- -+// -+// Mostly internal calls but might possibly be wanted by outside code -+ -+void av_rpi_zc_int_env_freep(AVZcEnvPtr * zc); -+AVZcEnvPtr av_rpi_zc_int_env_alloc(void * const logctx); -+void av_rpi_zc_set_decoder_pool_size(const AVZcEnvPtr zc, const unsigned int pool_size); -+ -+// Test to see if the context is using zc (checks get_buffer2) -+int av_rpi_zc_in_use(const struct AVCodecContext * const s); -+ -+// Get buffer generates placeholders for later alloc -+int av_rpi_zc_get_buffer(const AVZcEnvPtr zc, AVFrame * const frame); -+// Resolve actually does the alloc (noop if already alloced) -+// Set data pointers on a buffer/frame that was copied before the alloc -+// accured -+#define ZC_RESOLVE_FAIL 0 // return error on invalid -+#define ZC_RESOLVE_ALLOC 1 // alloc as invalid -+#define ZC_RESOLVE_WAIT_VALID 2 // wait for valid -+#define ZC_RESOLVE_ALLOC_VALID 3 // alloc as valid -+int av_rpi_zc_resolve_buffer(AVBufferRef * const buf, const int may_alloc); -+int av_rpi_zc_resolve_frame(AVFrame * const frame, const int may_alloc); -+ -+int av_rpi_zc_set_valid_frame(AVFrame * const frame); -+int av_rpi_zc_set_broken_frame(AVFrame * const frame); -+ -+ -+ -+ -+AVZcEnvPtr av_rpi_zc_env_alloc(void * logctx, -+ void * pool_env, -+ av_rpi_zc_alloc_buf_fn_t * alloc_buf_fn, -+ av_rpi_zc_free_pool_fn_t * free_pool_fn); -+void av_rpi_zc_env_release(const AVZcEnvPtr zc); -+ -+ -+#endif -+ ---- /dev/null -+++ b/libavcodec/rpi_zc_frames.h -@@ -0,0 +1,142 @@ -+/* -+Copyright (c) 2018 Raspberry Pi (Trading) Ltd. -+All rights reserved. -+ -+Redistribution and use in source and binary forms, with or without -+modification, are permitted provided that the following conditions are met: -+ * Redistributions of source code must retain the above copyright -+ notice, this list of conditions and the following disclaimer. -+ * Redistributions in binary form must reproduce the above copyright -+ notice, this list of conditions and the following disclaimer in the -+ documentation and/or other materials provided with the distribution. -+ * Neither the name of the copyright holder nor the -+ names of its contributors may be used to endorse or promote products -+ derived from this software without specific prior written permission. -+ -+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ -+Authors: John Cox, Ben Avison -+*/ -+ -+#ifndef RPI_ZC_FRAMES_H -+#define RPI_ZC_FRAMES_H -+ -+#define RPI_ONE_BUF 1 -+ -+#include "rpi_mem.h" // for GPU_MEM_PTR_T -+#include "libavutil/frame.h" -+ -+#if !RPI_ONE_BUF -+static inline uint32_t get_vc_address_y(const AVFrame * const frame) { -+ GPU_MEM_PTR_T *p = av_buffer_pool_buffer_get_opaque(frame->buf[0]); -+ return p->vc; -+} -+ -+static inline uint32_t get_vc_address_u(const AVFrame * const frame) { -+ GPU_MEM_PTR_T *p = av_buffer_pool_buffer_get_opaque(frame->buf[1]); -+ return p->vc; -+} -+ -+static inline uint32_t get_vc_address_v(const AVFrame * const frame) { -+ GPU_MEM_PTR_T *p = av_buffer_pool_buffer_get_opaque(frame->buf[2]); -+ return p->vc; -+} -+ -+static inline GPU_MEM_PTR_T get_gpu_mem_ptr_y(const AVFrame * const frame) { -+ return *(GPU_MEM_PTR_T *)av_buffer_pool_buffer_get_opaque(frame->buf[0]); -+} -+ -+static inline GPU_MEM_PTR_T get_gpu_mem_ptr_u(const AVFrame * const frame) { -+ return *(GPU_MEM_PTR_T *)av_buffer_pool_buffer_get_opaque(frame->buf[1]); -+} -+ -+static inline GPU_MEM_PTR_T get_gpu_mem_ptr_v(const AVFrame * const frame) { -+ return *(GPU_MEM_PTR_T *)av_buffer_pool_buffer_get_opaque(frame->buf[2]); -+} -+ -+#else -+ -+static inline int gpu_is_buf1(const AVFrame * const frame) -+{ -+ return frame->buf[1] == NULL; -+} -+ -+static inline GPU_MEM_PTR_T * gpu_buf1_gmem(const AVFrame * const frame) -+{ -+ return av_buffer_get_opaque(frame->buf[0]); -+} -+ -+static inline GPU_MEM_PTR_T * gpu_buf3_gmem(const AVFrame * const frame, const unsigned int n) -+{ -+ return av_buffer_pool_buffer_get_opaque(frame->buf[n]); -+} -+ -+static inline uint32_t get_vc_address3(const AVFrame * const frame, const unsigned int n) -+{ -+ const GPU_MEM_PTR_T * const gm = gpu_is_buf1(frame) ? gpu_buf1_gmem(frame) : gpu_buf3_gmem(frame, n); -+ return gm->vc + (frame->data[n] - gm->arm); -+} -+ -+ -+static inline uint32_t get_vc_address_y(const AVFrame * const frame) { -+ return get_vc_address3(frame, 0); -+} -+ -+static inline uint32_t get_vc_address_u(const AVFrame * const frame) { -+ return get_vc_address3(frame, 1); -+} -+ -+static inline uint32_t get_vc_address_v(const AVFrame * const frame) { -+ return get_vc_address3(frame, 2); -+} -+ -+#if 0 -+static inline GPU_MEM_PTR_T get_gpu_mem_ptr_y(const AVFrame * const frame) { -+ if (gpu_is_buf1(frame)) -+ { -+ GPU_MEM_PTR_T g = *gpu_buf1_gmem(frame); -+ g.numbytes = frame->data[1] - frame->data[0]; -+ return g; -+ } -+ else -+ return *gpu_buf3_gmem(frame, 0); -+} -+ -+static inline GPU_MEM_PTR_T get_gpu_mem_ptr_u(const AVFrame * const frame) { -+ if (gpu_is_buf1(frame)) -+ { -+ GPU_MEM_PTR_T g = *gpu_buf1_gmem(frame); -+ g.arm += frame->data[1] - frame->data[0]; -+ g.vc += frame->data[1] - frame->data[0]; -+ g.numbytes = frame->data[2] - frame->data[1]; // chroma size -+ return g; -+ } -+ else -+ return *gpu_buf3_gmem(frame, 1); -+} -+ -+static inline GPU_MEM_PTR_T get_gpu_mem_ptr_v(const AVFrame * const frame) { -+ if (gpu_is_buf1(frame)) -+ { -+ GPU_MEM_PTR_T g = *gpu_buf1_gmem(frame); -+ g.arm += frame->data[2] - frame->data[0]; -+ g.vc += frame->data[2] - frame->data[0]; -+ g.numbytes = frame->data[2] - frame->data[1]; // chroma size -+ return g; -+ } -+ else -+ return *gpu_buf3_gmem(frame, 2); -+} -+#endif -+#endif -+ -+#endif ---- /dev/null -+++ b/libavcodec/rpivid_hevc.c -@@ -0,0 +1,2128 @@ -+// FFMPEG HEVC decoder hardware accelerator -+// Andrew Holme, Argon Design Ltd -+// Copyright (c) June 2017 Raspberry Pi Ltd -+ -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include "fftools/ffmpeg.h" -+#include "libavutil/avassert.h" -+#include "libavutil/imgutils.h" -+#include "avcodec.h" -+#include "hwconfig.h" -+#include "decode.h" -+ -+#include "hevc.h" -+#include "hevcdec.h" -+#include "rpi_zc.h" -+#include "rpi_mem.h" -+#include "rpi_zc_frames.h" -+#include "rpi_mailbox.h" -+ -+ -+#define OPT_PHASE_TIMING 0 // Generate stats for phase usage -+ -+#define OPT_EMU 0 -+ -+#define TRACE_DEV 0 -+#define TRACE_ENTRY 0 -+ -+#define NUM_SCALING_FACTORS 4064 -+ -+#define AXI_BASE64 0 -+ -+#define PROB_BACKUP ((20<<12) + (20<<6) + (0<<0)) -+#define PROB_RELOAD ((20<<12) + (20<<0) + (0<<6)) -+ -+#define RPIVID_COL_PICS 17 // 16 ref & current -+ -+#define RPIVID_BITBUFS 2 // Bit + Cmd bufs (phase 0 & 1) -+#define RPIVID_BITBUF_SIZE (4 << 20) // Bit + Cmd buf size -+ -+#define RPIVID_COEFFBUFS 3 // PU + Coeff bufs (phase 1 & 2) -+#define RPIVID_COEFFBUF_SIZE (16 << 20) // PU + Coeff buf size -+ -+////////////////////////////////////////////////////////////////////////////// -+// -+// Register offsets -+ -+#define RPI_SPS0 0 -+#define RPI_SPS1 4 -+#define RPI_PPS 8 -+#define RPI_SLICE 12 -+#define RPI_TILESTART 16 -+#define RPI_TILEEND 20 -+#define RPI_SLICESTART 24 -+#define RPI_MODE 28 -+#define RPI_LEFT0 32 -+#define RPI_LEFT1 36 -+#define RPI_LEFT2 40 -+#define RPI_LEFT3 44 -+#define RPI_QP 48 -+#define RPI_CONTROL 52 -+#define RPI_STATUS 56 -+#define RPI_VERSION 60 -+#define RPI_BFBASE 64 -+#define RPI_BFNUM 68 -+#define RPI_BFCONTROL 72 -+#define RPI_BFSTATUS 76 -+#define RPI_PUWBASE 80 -+#define RPI_PUWSTRIDE 84 -+#define RPI_COEFFWBASE 88 -+#define RPI_COEFFWSTRIDE 92 -+#define RPI_SLICECMDS 96 -+#define RPI_BEGINTILEEND 100 -+#define RPI_TRANSFER 104 -+#define RPI_CFBASE 108 -+#define RPI_CFNUM 112 -+#define RPI_CFSTATUS 116 -+ -+#define RPI_PURBASE 0x8000 -+#define RPI_PURSTRIDE 0x8004 -+#define RPI_COEFFRBASE 0x8008 -+#define RPI_COEFFRSTRIDE 0x800C -+#define RPI_NUMROWS 0x8010 -+#define RPI_CONFIG2 0x8014 -+#define RPI_OUTYBASE 0x8018 -+#define RPI_OUTYSTRIDE 0x801C -+#define RPI_OUTCBASE 0x8020 -+#define RPI_OUTCSTRIDE 0x8024 -+#define RPI_STATUS2 0x8028 -+#define RPI_FRAMESIZE 0x802C -+#define RPI_MVBASE 0x8030 -+#define RPI_MVSTRIDE 0x8034 -+#define RPI_COLBASE 0x8038 -+#define RPI_COLSTRIDE 0x803C -+#define RPI_CURRPOC 0x8040 -+ -+////////////////////////////////////////////////////////////////////////////// -+ -+// Unused but left here to illustrate the diffrences between FFmpegs prob -+// structure and the rpivid one -+ -+struct FFM_PROB { -+ uint8_t sao_merge_flag [ 1]; -+ uint8_t sao_type_idx [ 1]; -+ uint8_t split_coding_unit_flag [ 3]; -+ uint8_t cu_transquant_bypass_flag [ 1]; -+ uint8_t skip_flag [ 3]; -+ uint8_t cu_qp_delta [ 3]; -+ uint8_t pred_mode_flag [ 1]; -+ uint8_t part_mode [ 4]; -+ uint8_t prev_intra_luma_pred_flag [ 1]; -+ uint8_t intra_chroma_pred_mode [ 2]; -+ uint8_t merge_flag [ 1]; -+ uint8_t merge_idx [ 1]; -+ uint8_t inter_pred_idc [ 5]; -+ uint8_t ref_idx_l0 [ 2]; -+ uint8_t ref_idx_l1 [ 2]; -+ uint8_t abs_mvd_greater0_flag [ 2]; -+ uint8_t abs_mvd_greater1_flag [ 2]; -+ uint8_t mvp_lx_flag [ 1]; -+ uint8_t no_residual_data_flag [ 1]; -+ uint8_t split_transform_flag [ 3]; -+ uint8_t cbf_luma [ 2]; -+ uint8_t cbf_cb_cr [ 4]; -+ uint8_t transform_skip_flag/*[][]*/ [ 2]; -+ uint8_t explicit_rdpcm_flag/*[][]*/ [ 2]; -+ uint8_t explicit_rdpcm_dir_flag/*[][]*/ [ 2]; -+ uint8_t last_significant_coeff_x_prefix [18]; -+ uint8_t last_significant_coeff_y_prefix [18]; -+ uint8_t significant_coeff_group_flag [ 4]; -+ uint8_t significant_coeff_flag [44]; -+ uint8_t coeff_abs_level_greater1_flag [24]; -+ uint8_t coeff_abs_level_greater2_flag [ 6]; -+ uint8_t log2_res_scale_abs [ 8]; -+ uint8_t res_scale_sign_flag [ 2]; -+ uint8_t cu_chroma_qp_offset_flag [ 1]; -+ uint8_t cu_chroma_qp_offset_idx [ 1]; -+} __attribute__((packed)); -+ -+////////////////////////////////////////////////////////////////////////////// -+ -+struct RPI_PROB { -+ uint8_t SAO_MERGE_FLAG [ 1]; -+ uint8_t SAO_TYPE_IDX [ 1]; -+ uint8_t SPLIT_FLAG [ 3]; -+ uint8_t CU_SKIP_FLAG [ 3]; -+ uint8_t CU_TRANSQUANT_BYPASS_FLAG [ 1]; -+ uint8_t PRED_MODE [ 1]; -+ uint8_t PART_SIZE [ 4]; -+ uint8_t INTRA_PRED_MODE [ 1]; -+ uint8_t CHROMA_PRED_MODE [ 1]; -+ uint8_t MERGE_FLAG_EXT [ 1]; -+ uint8_t MERGE_IDX_EXT [ 1]; -+ uint8_t INTER_DIR [ 5]; -+ uint8_t REF_PIC [ 2]; -+ uint8_t MVP_IDX [ 1]; -+ uint8_t MVD [ 2]; -+ uint8_t QT_ROOT_CBF [ 1]; -+ uint8_t TRANS_SUBDIV_FLAG [ 3]; -+ uint8_t QT_CBF [ 6]; -+ uint8_t DQP [ 2]; -+ uint8_t ONE_FLAG [24]; -+ uint8_t LASTX [18]; -+ uint8_t LASTY [18]; -+ uint8_t SIG_CG_FLAG [ 4]; -+ uint8_t ABS_FLAG [ 6]; -+ uint8_t TRANSFORMSKIP_FLAG [ 2]; -+ uint8_t SIG_FLAG [42]; -+ uint8_t SIG_FLAG_unused [ 2]; -+} __attribute__((packed)); -+ -+////////////////////////////////////////////////////////////////////////////// -+ -+struct RPI_CMD { -+ uint32_t addr; -+ uint32_t data; -+} __attribute__((packed)); -+ -+struct RPI_BIT { -+ int cmd; -+ const void *ptr; -+ int len; -+}; -+ -+////////////////////////////////////////////////////////////////////////////// -+ -+struct RPI_T; -+ -+// Actual addressability is 38bits but we can only alloc in the bottom 32 -+// currently - when passed to rpivid h/w the address is always >> 6 so will -+// fit in 32 bit there -+// At some point we may weant to make this uint64_t -+typedef uint32_t vid_vc_addr_t; -+ -+typedef enum rpivid_decode_state_e { -+ RPIVID_DECODE_NEW = 0, -+ RPIVID_DECODE_START, -+ RPIVID_DECODE_SLICE, -+ RPIVID_DECODE_END, -+} rpivid_decode_state_t; -+ -+#define RPI_PROB_VALS 154U -+#define RPI_PROB_ARRAY_SIZE ((154 + 3) & ~3) -+ -+typedef struct dec_env_s { -+ const AVCodecContext * avctx; -+ -+ rpivid_decode_state_t state; -+ unsigned int decode_order; -+ -+ int phase_no; // Current phase (i.e. the last one we waited for) -+ struct dec_env_s * phase_wait_q_next; -+ sem_t phase_wait; -+ -+ struct RPI_BIT *bit_fifo; -+ struct RPI_CMD *cmd_fifo; -+ unsigned int bit_len, bit_max; -+ unsigned int cmd_len, cmd_max; -+ unsigned int num_slice_msgs; -+ unsigned int PicWidthInCtbsY; -+ unsigned int PicHeightInCtbsY; -+ unsigned int dpbno_col; -+ uint32_t reg_slicestart; -+ unsigned int wpp_entry_x; -+ unsigned int wpp_entry_y; -+ -+ const uint8_t * nal_buffer; -+ size_t nal_size; -+ -+ uint16_t slice_msgs[2*HEVC_MAX_REFS*8+3]; -+ uint8_t scaling_factors[NUM_SCALING_FACTORS]; -+// unsigned int RefPicList[2][HEVC_MAX_REFS]; -+} dec_env_t; -+ -+#define RPIVID_PHASES 3 -+#define RPIVID_PHASE_NEW (RPIVID_PHASES) // Phase before we have inced decode order -+#define RPIVID_PHASE_START (-1) // Phase after we have inced decode_order -+ -+#if OPT_PHASE_TIMING -+static const unsigned int time_thresholds[8] = { -+ 10, 15, 20, 30, 45, 60, 75, 90 -+}; -+#endif -+ -+typedef struct phase_wait_env_s { -+ unsigned int last_order; -+ dec_env_t * q; -+#if OPT_PHASE_TIMING -+ uint64_t phase_time; -+ uint64_t max_phase_time; -+ uint64_t time_in_phase; -+ uint64_t time_out_phase; -+ unsigned int max_time_decode_order; -+ unsigned int time_bins[9]; -+ unsigned int time_bins3[9]; -+ unsigned int time_bins5[9]; -+ uint64_t time_stash[16]; -+ unsigned int i3; -+#endif -+} phase_wait_env_t; // Single linked list of threads waiting for this phase -+ -+typedef struct RPI_T { -+ atomic_int ref_count; -+ sem_t ref_zero; -+ -+ dec_env_t ** dec_envs; -+ AVZcEnvPtr zc; -+ -+ pthread_mutex_t phase_lock; -+ phase_wait_env_t phase_reqs[RPIVID_PHASES]; -+ -+ volatile uint32_t * regs; -+ volatile uint32_t * ints; -+ -+ GPU_MEM_PTR_T gcolbuf; -+ unsigned int col_stride; -+ size_t col_picsize; -+ -+ unsigned int bitbuf_no; -+ sem_t bitbuf_sem; -+ GPU_MEM_PTR_T gbitbufs[RPIVID_BITBUFS]; -+ -+ unsigned int max_pu_msgs; -+ unsigned int coeffbuf_no; -+ sem_t coeffbuf_sem; -+ GPU_MEM_PTR_T gcoeffbufs[RPIVID_COEFFBUFS]; -+ -+ unsigned int decode_order; -+ int mbox_fd; -+ int gpu_init_type; -+} RPI_T; -+ -+#if OPT_PHASE_TIMING -+static uint64_t tus64(void) -+{ -+ struct timespec ts; -+ clock_gettime(CLOCK_MONOTONIC, &ts); -+ return (uint64_t)ts.tv_sec * 1000000 + ts.tv_nsec / 1000; -+} -+#endif -+ -+static inline unsigned int rnd64(unsigned int x) -+{ -+ return (x + 63) & ~63; -+} -+ -+static inline int rpi_sem_wait(sem_t * const sem) -+{ -+ int rv; -+ while ((rv = sem_wait(sem)) != 0 && errno == EINTR) -+ /* Loop */; -+ return rv; -+} -+ -+//============================================================================ -+ -+#define REGS_NAME "/dev/rpivid-hevcmem" -+#define REGS_SIZE 0x10000 -+#define INTS_NAME "/dev/rpivid-intcmem" -+#define INTS_SIZE 0x10000 // 4 is probably enough but we are going to alloc a page anyway -+ -+static volatile uint32_t * map_dev(AVCodecContext * const avctx, const char * const dev_name, size_t size) -+{ -+ void *gpio_map; -+ int mem_fd; -+ -+ /* open /dev/mem */ -+ if ((mem_fd = open(dev_name, O_RDWR|O_SYNC) ) < 0) { -+ av_log(avctx, AV_LOG_WARNING, "can't open %s\n", dev_name); -+ return NULL; -+ } -+ -+ // Now map it -+ gpio_map = mmap( -+ NULL, -+ size, -+ PROT_READ|PROT_WRITE, -+ MAP_SHARED, -+ mem_fd, -+ 0 -+ ); -+ -+ close(mem_fd); // No longer need the FD -+ -+ if (gpio_map == MAP_FAILED) { -+ av_log(avctx, AV_LOG_WARNING, "GPIO mapping failed"); -+ return NULL; -+ } -+ -+ return (volatile uint32_t *)gpio_map; -+} -+ -+static void unmap_devp(volatile uint32_t ** const p_gpio_map, size_t size) -+{ -+ volatile uint32_t * const gpio_map = *p_gpio_map; -+ if (gpio_map != NULL) { -+ *p_gpio_map = NULL; -+ munmap((void *)gpio_map, size); -+ } -+} -+ -+#define MANGLE(x) ((x) &~0xc0000000) // ** If x is ever a 64 bit thing this will need fixing! -+#define MANGLE64(x) (uint32_t)(MANGLE(x)>>6) -+ -+static inline void apb_write_vc_addr(const RPI_T *const rpi, const uint32_t addr, const vid_vc_addr_t data) -+{ -+#if TRACE_DEV -+ printf("W %x %08x\n", addr, MANGLE64(data)); -+#endif -+ -+ rpi->regs[addr >> 2] = MANGLE64(data); -+} -+ -+static inline void apb_write_vc_len(const RPI_T *const rpi, const uint32_t addr, const unsigned int data) -+{ -+#if TRACE_DEV -+ printf("W %x %08x\n", addr, data >> 6); -+#endif -+ -+ rpi->regs[addr >> 2] = data >> 6; // ?? rnd64 - but not currently needed -+} -+ -+static inline void apb_write(const RPI_T * const rpi, const uint32_t addr, const uint32_t data) -+{ -+#if TRACE_DEV -+ printf("W %x %08x\n", addr, data); -+#endif -+ -+ rpi->regs[addr >> 2] = data; -+} -+ -+static inline uint32_t apb_read(const RPI_T * const rpi, const uint32_t addr) -+{ -+ const uint32_t v = rpi->regs[addr >> 2]; -+#if TRACE_DEV -+ printf("R %x (=%x)\n", addr, v); -+#endif -+ return v; -+} -+ -+#define ARG_IC_ICTRL_ACTIVE1_INT_SET 0x00000001 -+#define ARG_IC_ICTRL_ACTIVE1_EDGE_SET 0x00000002 -+#define ARG_IC_ICTRL_ACTIVE1_EN_SET 0x00000004 -+#define ARG_IC_ICTRL_ACTIVE1_STATUS_SET 0x00000008 -+#define ARG_IC_ICTRL_ACTIVE2_INT_SET 0x00000010 -+#define ARG_IC_ICTRL_ACTIVE2_EDGE_SET 0x00000020 -+#define ARG_IC_ICTRL_ACTIVE2_EN_SET 0x00000040 -+#define ARG_IC_ICTRL_ACTIVE2_STATUS_SET 0x00000080 -+ -+static inline void int_wait(const RPI_T * const rpi, const unsigned int phase) -+{ -+ const uint32_t mask_reset = phase == 1 ? ~ARG_IC_ICTRL_ACTIVE2_INT_SET : ~ARG_IC_ICTRL_ACTIVE1_INT_SET; -+ const uint32_t mask_done = phase == 1 ? ARG_IC_ICTRL_ACTIVE1_INT_SET : ARG_IC_ICTRL_ACTIVE2_INT_SET; -+ uint32_t ival; -+ while (((ival = rpi->ints[0]) & mask_done) == 0) { -+ usleep(1000); -+ } -+ rpi->ints[0] = ival & mask_reset; -+} -+ -+#if TRACE_DEV && 0 -+static void apb_dump_regs(const RPI_T * const rpi, uint16_t addr, int num) { -+ int i; -+ -+ for (i=0; iregs[(addr>>2)+i]); -+ -+ if ((i%4)==3 || i+1 == num) -+ printf("\n"); -+ else -+ printf(" "); -+ } -+} -+ -+static void axi_dump(const dec_env_t * const de, uint64_t addr, uint32_t size) { -+ int i; -+ -+ for (i=0; i>2; i++) -+ { -+ if ((i%4)==0) -+ printf("%08x: ", MANGLE(de->gbuf.vc) + (uint32_t)addr + 4*i); -+ -+ printf("%08x", ((uint32_t*)de->gbuf.arm)[(addr>>2)+i]); -+ -+ if ((i%4)==3 || i+1 == size>>2) -+ printf("\n"); -+ else -+ printf(" "); -+ } -+} -+#endif -+ -+////////////////////////////////////////////////////////////////////////////// -+ -+static inline size_t round_up_size(const size_t x) -+{ -+ /* Admit no size < 256 */ -+ const unsigned int n = x < 256 ? 8 : av_log2(x) - 1; -+ -+ return x >= (3 << n) ? 4 << n : (3 << n); -+} -+ -+////////////////////////////////////////////////////////////////////////////// -+// Scaling factors -+ -+static void expand_scaling_list( -+ const unsigned int sizeID, -+ const unsigned int matrixID, -+ uint8_t * const dst0, -+ const uint8_t * const src0, -+ uint8_t dc) -+{ -+ switch (sizeID) { -+ case 0: -+ memcpy(dst0, src0, 16); -+ break; -+ case 1: -+ memcpy(dst0, src0, 64); -+ break; -+ case 2: -+ { -+ uint8_t * d = dst0; -+ for (unsigned int y=0; y != 16; y++) { -+ const uint8_t * s = src0 + (y >> 1) * 8; -+ for (unsigned int x = 0; x != 8; ++x) { -+ *d++ = *s; -+ *d++ = *s++; -+ } -+ } -+ dst0[0] = dc; -+ break; -+ } -+ default: -+ { -+ uint8_t * d = dst0; -+ for (unsigned int y=0; y != 32; y++) { -+ const uint8_t * s = src0 + (y >> 2) * 8; -+ for (unsigned int x = 0; x != 8; ++x) { -+ *d++ = *s; -+ *d++ = *s; -+ *d++ = *s; -+ *d++ = *s++; -+ } -+ } -+ dst0[0] = dc; -+ break; -+ } -+ } -+} -+ -+static void populate_scaling_factors(dec_env_t * const de, const HEVCContext * const s) { -+ // Array of constants for scaling factors -+ static const uint32_t scaling_factor_offsets[4][6] = { -+ // MID0 MID1 MID2 MID3 MID4 MID5 -+ {0x0000, 0x0010, 0x0020, 0x0030, 0x0040, 0x0050}, // SID0 (4x4) -+ {0x0060, 0x00A0, 0x00E0, 0x0120, 0x0160, 0x01A0}, // SID1 (8x8) -+ {0x01E0, 0x02E0, 0x03E0, 0x04E0, 0x05E0, 0x06E0}, // SID2 (16x16) -+ {0x07E0, 0, 0, 0x0BE0, 0, 0}}; // SID3 (32x32) -+ -+ // ffmpeg places SID3,MID1 where matrixID 3 normally is -+ const ScalingList * const sl = -+ s->ps.pps->scaling_list_data_present_flag ? &s->ps.pps->scaling_list -+ : &s->ps.sps->scaling_list; -+ unsigned int mid; -+ -+ for (mid=0; mid<6; mid++) -+ expand_scaling_list(0, mid, -+ de->scaling_factors + scaling_factor_offsets[0][mid], -+ sl->sl[0][mid], 0); -+ for (mid=0; mid<6; mid++) -+ expand_scaling_list(1, mid, -+ de->scaling_factors + scaling_factor_offsets[1][mid], -+ sl->sl[1][mid], 0); -+ for (mid=0; mid<6; mid++) -+ expand_scaling_list(2, mid, -+ de->scaling_factors + scaling_factor_offsets[2][mid], -+ sl->sl[2][mid], -+ sl->sl_dc[0][mid]); -+ // second scaling matrix for 32x32 is at matrixID 3 not 1 in ffmpeg -+ for (mid=0; mid<6; mid += 3) -+ expand_scaling_list(3, mid, -+ de->scaling_factors + scaling_factor_offsets[3][mid], -+ sl->sl[3][mid], -+ sl->sl_dc[1][mid]); -+} -+ -+////////////////////////////////////////////////////////////////////////////// -+// Probabilities -+ -+static const uint8_t prob_init[3][156] = { -+ { -+ 153, 200, 139, 141, 157, 154, 154, 154, -+ 154, 154, 184, 154, 154, 154, 184, 63, -+ 154, 154, 154, 154, 154, 154, 154, 154, -+ 154, 154, 154, 154, 154, 153, 138, 138, -+ 111, 141, 94, 138, 182, 154, 154, 154, -+ 140, 92, 137, 138, 140, 152, 138, 139, -+ 153, 74, 149, 92, 139, 107, 122, 152, -+ 140, 179, 166, 182, 140, 227, 122, 197, -+ 110, 110, 124, 125, 140, 153, 125, 127, -+ 140, 109, 111, 143, 127, 111, 79, 108, -+ 123, 63, 110, 110, 124, 125, 140, 153, -+ 125, 127, 140, 109, 111, 143, 127, 111, -+ 79, 108, 123, 63, 91, 171, 134, 141, -+ 138, 153, 136, 167, 152, 152, 139, 139, -+ 111, 111, 125, 110, 110, 94, 124, 108, -+ 124, 107, 125, 141, 179, 153, 125, 107, -+ 125, 141, 179, 153, 125, 107, 125, 141, -+ 179, 153, 125, 140, 139, 182, 182, 152, -+ 136, 152, 136, 153, 136, 139, 111, 136, -+ 139, 111, 0, 0, }, -+ { -+ 153, 185, 107, 139, 126, 197, 185, 201, -+ 154, 149, 154, 139, 154, 154, 154, 152, -+ 110, 122, 95, 79, 63, 31, 31, 153, -+ 153, 168, 140, 198, 79, 124, 138, 94, -+ 153, 111, 149, 107, 167, 154, 154, 154, -+ 154, 196, 196, 167, 154, 152, 167, 182, -+ 182, 134, 149, 136, 153, 121, 136, 137, -+ 169, 194, 166, 167, 154, 167, 137, 182, -+ 125, 110, 94, 110, 95, 79, 125, 111, -+ 110, 78, 110, 111, 111, 95, 94, 108, -+ 123, 108, 125, 110, 94, 110, 95, 79, -+ 125, 111, 110, 78, 110, 111, 111, 95, -+ 94, 108, 123, 108, 121, 140, 61, 154, -+ 107, 167, 91, 122, 107, 167, 139, 139, -+ 155, 154, 139, 153, 139, 123, 123, 63, -+ 153, 166, 183, 140, 136, 153, 154, 166, -+ 183, 140, 136, 153, 154, 166, 183, 140, -+ 136, 153, 154, 170, 153, 123, 123, 107, -+ 121, 107, 121, 167, 151, 183, 140, 151, -+ 183, 140, 0, 0, }, -+ { -+ 153, 160, 107, 139, 126, 197, 185, 201, -+ 154, 134, 154, 139, 154, 154, 183, 152, -+ 154, 137, 95, 79, 63, 31, 31, 153, -+ 153, 168, 169, 198, 79, 224, 167, 122, -+ 153, 111, 149, 92, 167, 154, 154, 154, -+ 154, 196, 167, 167, 154, 152, 167, 182, -+ 182, 134, 149, 136, 153, 121, 136, 122, -+ 169, 208, 166, 167, 154, 152, 167, 182, -+ 125, 110, 124, 110, 95, 94, 125, 111, -+ 111, 79, 125, 126, 111, 111, 79, 108, -+ 123, 93, 125, 110, 124, 110, 95, 94, -+ 125, 111, 111, 79, 125, 126, 111, 111, -+ 79, 108, 123, 93, 121, 140, 61, 154, -+ 107, 167, 91, 107, 107, 167, 139, 139, -+ 170, 154, 139, 153, 139, 123, 123, 63, -+ 124, 166, 183, 140, 136, 153, 154, 166, -+ 183, 140, 136, 153, 154, 166, 183, 140, -+ 136, 153, 154, 170, 153, 138, 138, 122, -+ 121, 122, 121, 167, 151, 183, 140, 151, -+ 183, 140, 0, 0, }, -+}; -+ -+ -+////////////////////////////////////////////////////////////////////////////// -+// Phase 1 command and bit FIFOs -+ -+// ???? uint16_t addr - put in uint32_t -+static int p1_apb_write(dec_env_t * const de, const uint16_t addr, const uint32_t data) { -+ if (de->cmd_len==de->cmd_max) -+ av_assert0(de->cmd_fifo = realloc(de->cmd_fifo, (de->cmd_max*=2)*sizeof(struct RPI_CMD))); -+ -+#if TRACE_DEV -+ printf("[%02x] %x %x\n", de->cmd_len, addr, data); -+#endif -+ -+ de->cmd_fifo[de->cmd_len].addr = addr; -+ de->cmd_fifo[de->cmd_len].data = data; -+ return de->cmd_len++; -+} -+ -+static void p1_axi_write(dec_env_t * const de, const uint32_t len, const void * const ptr, const int cmd_idx) { -+ if (de->bit_len==de->bit_max) -+ av_assert0(de->bit_fifo = realloc(de->bit_fifo, (de->bit_max*=2)*sizeof(struct RPI_BIT))); -+ de->bit_fifo[de->bit_len].cmd = cmd_idx; -+ de->bit_fifo[de->bit_len].ptr = ptr; -+ de->bit_fifo[de->bit_len].len = len; -+ de->bit_len++; -+} -+ -+////////////////////////////////////////////////////////////////////////////// -+// Write probability and scaling factor memories -+ -+#if 0 -+static void WriteProb(dec_env_t * const de) { -+ int i; -+ const uint8_t *p = (uint8_t *) &de->probabilities; -+ for (i=0; ish.cabac_init_flag && s->sh.slice_type != HEVC_SLICE_I) ? -+ s->sh.slice_type + 1 : 2 - s->sh.slice_type; -+ const uint8_t * p = prob_init[init_type]; -+ const int q = av_clip(s->sh.slice_qp, 0, 51); -+ unsigned int i; -+ -+ for (i = 0; i < RPI_PROB_VALS; i++) { -+ int init_value = p[i]; -+ int m = (init_value >> 4) * 5 - 45; -+ int n = ((init_value & 15) << 3) - 16; -+ int pre = 2 * (((m * q) >> 4) + n) - 127; -+ -+ pre ^= pre >> 31; -+ if (pre > 124) -+ pre = 124 + (pre & 1); -+ dst[i] = pre; -+ } -+ for (i = RPI_PROB_VALS; i != RPI_PROB_ARRAY_SIZE; ++i) { -+ dst[i] = 0; -+ } -+ -+ for (i=0; i < RPI_PROB_ARRAY_SIZE; i+=4) -+ p1_apb_write(de, 0x1000+i, dst[i] + (dst[i+1]<<8) + (dst[i+2]<<16) + (dst[i+3]<<24)); -+ -+} -+ -+ -+static void WriteScalingFactors(dec_env_t * const de) { -+ int i; -+ const uint8_t *p = (uint8_t *) de->scaling_factors; -+ for (i=0; i= bd[i]; i++); // bd[] has num+1 elements; bd[0]=0; see hevc_ps.c -+ return i-1; -+} -+ -+static int ctb_to_slice_w_h (unsigned int ctb, int ctb_size, int width, unsigned int *bd, int num) { -+ if (ctb < bd[num-1]) return ctb_size; -+ else if (width % ctb_size) return width % ctb_size; -+ else return ctb_size; -+} -+ -+////////////////////////////////////////////////////////////////////////////// -+// Handle PU and COEFF stream overflow -+ -+ -+// Returns: -+// -2 Other error -+// -1 Out of coeff space -+// 0 OK -+// 1 Out of PU space -+ -+static int check_status(const RPI_T * const rpi, dec_env_t * const de) { -+ uint32_t status; -+ -+ // this is the definition of successful completion of phase 1 -+ // it assures that status register is zero and all blocks in each tile have completed -+ if (apb_read(rpi, RPI_CFSTATUS) == apb_read(rpi, RPI_CFNUM)) -+ return 0; -+ -+ status = apb_read(rpi, RPI_STATUS); -+ -+ if ((status & 8) != 0) -+ return -1; -+ -+ if ((status & 0x10) != 0) -+ return 1; -+ -+ return -2; -+} -+ -+////////////////////////////////////////////////////////////////////////////// -+// Write STATUS register with expected end CTU address of previous slice -+ -+static void end_previous_slice(dec_env_t * const de, const HEVCContext * const s, const int ctb_addr_ts) { -+ const HEVCPPS * const pps = s->ps.pps; -+ int last_x = pps->ctb_addr_ts_to_rs[ctb_addr_ts-1] % de->PicWidthInCtbsY; -+ int last_y = pps->ctb_addr_ts_to_rs[ctb_addr_ts-1] / de->PicWidthInCtbsY; -+ p1_apb_write(de, RPI_STATUS, 1 + (last_x<<5) + (last_y<<18)); -+} -+ -+static void wpp_pause(dec_env_t * const de, int ctb_row) { -+ p1_apb_write(de, RPI_STATUS, (ctb_row<<18) + 0x25); -+ p1_apb_write(de, RPI_TRANSFER, PROB_BACKUP); -+ p1_apb_write(de, RPI_MODE, ctb_row==de->PicHeightInCtbsY-1 ? 0x70000 : 0x30000); -+ p1_apb_write(de, RPI_CONTROL, (ctb_row<<16) + 2); -+} -+ -+static void wpp_end_previous_slice(dec_env_t * const de, const HEVCContext * const s, int ctb_addr_ts) { -+ const HEVCPPS *pps = s->ps.pps; -+ int new_x = s->sh.slice_ctb_addr_rs % de->PicWidthInCtbsY; -+ int new_y = s->sh.slice_ctb_addr_rs / de->PicWidthInCtbsY; -+ int last_x = pps->ctb_addr_ts_to_rs[ctb_addr_ts-1] % de->PicWidthInCtbsY; -+ int last_y = pps->ctb_addr_ts_to_rs[ctb_addr_ts-1] / de->PicWidthInCtbsY; -+ if (de->wpp_entry_x<2 && (de->wpp_entry_y2) && de->PicWidthInCtbsY>2) -+ wpp_pause(de, last_y); -+ p1_apb_write(de, RPI_STATUS, 1 + (last_x<<5) + (last_y<<18)); -+ if (new_x==2 || de->PicWidthInCtbsY==2 && de->wpp_entry_yps.sps; -+ const HEVCPPS *pps = s->ps.pps; -+ -+ p1_apb_write(de, RPI_SPS0, -+ (sps->log2_min_cb_size << 0) + -+ (sps->log2_ctb_size << 4) + -+ (sps->log2_min_tb_size << 8) + -+ (sps->log2_max_trafo_size << 12) + -+ (sps->bit_depth << 16) + -+ (sps->bit_depth << 20) + -+ (sps->max_transform_hierarchy_depth_intra << 24) + -+ (sps->max_transform_hierarchy_depth_inter << 28)); -+ -+ p1_apb_write(de, RPI_SPS1, -+ (sps->pcm.bit_depth << 0) + -+ (sps->pcm.bit_depth_chroma << 4) + -+ (sps->pcm.log2_min_pcm_cb_size << 8) + -+ (sps->pcm.log2_max_pcm_cb_size << 12) + -+ (sps->separate_colour_plane_flag? 0:sps->chroma_format_idc << 16) + -+ (sps->amp_enabled_flag << 18) + -+ (sps->pcm_enabled_flag << 19) + -+ (sps->scaling_list_enable_flag << 20) + -+ (sps->sps_strong_intra_smoothing_enable_flag << 21)); -+ -+ p1_apb_write(de, RPI_PPS, -+ (sps->log2_ctb_size - pps->diff_cu_qp_delta_depth << 0) + -+ (pps->cu_qp_delta_enabled_flag << 4) + -+ (pps->transquant_bypass_enable_flag << 5) + -+ (pps->transform_skip_enabled_flag << 6) + -+ (pps->sign_data_hiding_flag << 7) + -+ (((pps->cb_qp_offset + s->sh.slice_cb_qp_offset)&255) << 8) + -+ (((pps->cr_qp_offset + s->sh.slice_cr_qp_offset)&255) << 16) + -+ (pps->constrained_intra_pred_flag << 24)); -+ -+ if (s->ps.sps->scaling_list_enable_flag) WriteScalingFactors(de); -+ -+ if (!s->sh.dependent_slice_segment_flag) { -+ int ctb_col = s->sh.slice_ctb_addr_rs % de->PicWidthInCtbsY; -+ int ctb_row = s->sh.slice_ctb_addr_rs / de->PicWidthInCtbsY; -+ de->reg_slicestart = (ctb_col<<0) + (ctb_row<<16); -+ } -+ -+ p1_apb_write(de, RPI_SLICESTART, de->reg_slicestart); -+} -+ -+////////////////////////////////////////////////////////////////////////////// -+ -+static void write_slice(dec_env_t * const de, const HEVCContext * const s, -+ const unsigned int slice_w, const unsigned int slice_h) { -+ uint32_t u32 = -+ (s->sh.slice_type << 12) -+ + (s->sh.slice_sample_adaptive_offset_flag[0] << 14) -+ + (s->sh.slice_sample_adaptive_offset_flag[1] << 15) -+ + (slice_w << 17) -+ + (slice_h << 24); -+ -+ if (s->sh.slice_type==HEVC_SLICE_B || s->sh.slice_type==HEVC_SLICE_P) u32 |= -+ (s->sh.max_num_merge_cand << 0) -+ + (s->sh.nb_refs[L0] << 4) -+ + (s->sh.nb_refs[L1] << 8); -+ -+ if (s->sh.slice_type==HEVC_SLICE_B) -+ u32 |= s->sh.mvd_l1_zero_flag<<16; -+ p1_apb_write(de, RPI_SLICE, u32); -+} -+ -+////////////////////////////////////////////////////////////////////////////// -+// Wavefront mode -+ -+static void wpp_entry_point(dec_env_t * const de, const HEVCContext * const s, -+ const int do_bte, const int resetQPY, const int ctb_addr_ts) { -+ const HEVCSPS * const sps = s->ps.sps; -+ const HEVCPPS * const pps = s->ps.pps; -+ -+ int ctb_size = 1<log2_ctb_size; -+ int ctb_addr_rs = pps->ctb_addr_ts_to_rs[ctb_addr_ts]; -+ -+ int ctb_col = de->wpp_entry_x = ctb_addr_rs % de->PicWidthInCtbsY; -+ int ctb_row = de->wpp_entry_y = ctb_addr_rs / de->PicWidthInCtbsY; -+ -+ int endx = de->PicWidthInCtbsY-1; -+ int endy = ctb_row; -+ -+ uint8_t slice_w = ctb_to_slice_w_h(ctb_col, ctb_size, sps->width, pps->col_bd, pps->num_tile_columns); -+ uint8_t slice_h = ctb_to_slice_w_h(ctb_row, ctb_size, sps->height, pps->row_bd, pps->num_tile_rows); -+ -+ p1_apb_write(de, RPI_TILESTART, 0); -+ p1_apb_write(de, RPI_TILEEND, endx + (endy<<16)); -+ -+ if (do_bte) -+ p1_apb_write(de, RPI_BEGINTILEEND, endx + (endy<<16)); -+ -+ write_slice(de, s, slice_w, ctb_row==de->PicHeightInCtbsY-1? slice_h : ctb_size); -+ -+ if (resetQPY) p1_apb_write(de, RPI_QP, sps->qp_bd_offset + s->sh.slice_qp); -+ -+ p1_apb_write(de, RPI_MODE, ctb_row==de->PicHeightInCtbsY-1? 0x60001 : 0x20001); -+ p1_apb_write(de, RPI_CONTROL, (ctb_col<<0) + (ctb_row<<16)); -+} -+ -+////////////////////////////////////////////////////////////////////////////// -+// Tiles mode -+ -+static void new_entry_point(dec_env_t * const de, const HEVCContext * const s, -+ const int do_bte, const int resetQPY, const int ctb_addr_ts) { -+ const HEVCSPS * const sps = s->ps.sps; -+ const HEVCPPS * const pps = s->ps.pps; -+ -+ int ctb_col = pps->ctb_addr_ts_to_rs[ctb_addr_ts] % de->PicWidthInCtbsY; -+ int ctb_row = pps->ctb_addr_ts_to_rs[ctb_addr_ts] / de->PicWidthInCtbsY; -+ -+ int tile_x = ctb_to_tile (ctb_col, pps->col_bd, pps->num_tile_columns); -+ int tile_y = ctb_to_tile (ctb_row, pps->row_bd, pps->num_tile_rows); -+ -+ int endx = pps->col_bd[tile_x+1] - 1; -+ int endy = pps->row_bd[tile_y+1] - 1; -+ -+ uint8_t slice_w = ctb_to_slice_w_h(ctb_col, 1<log2_ctb_size, sps->width, pps->col_bd, pps->num_tile_columns); -+ uint8_t slice_h = ctb_to_slice_w_h(ctb_row, 1<log2_ctb_size, sps->height, pps->row_bd, pps->num_tile_rows); -+ -+ p1_apb_write(de, RPI_TILESTART, pps->col_bd[tile_x] + (pps->row_bd[tile_y]<<16)); -+ p1_apb_write(de, RPI_TILEEND, endx + (endy<<16)); -+ -+ if (do_bte) -+ p1_apb_write(de, RPI_BEGINTILEEND, endx + (endy<<16)); -+ -+ write_slice(de, s, slice_w, slice_h); -+ -+ if (resetQPY) -+ p1_apb_write(de, RPI_QP, sps->qp_bd_offset + s->sh.slice_qp); -+ -+ p1_apb_write(de, RPI_MODE, (0xFFFF << 0) -+ + (0x0 << 16) -+ + ((tile_x==pps->num_tile_columns-1) << 17) -+ + ((tile_y==pps->num_tile_rows-1) << 18)); -+ -+ p1_apb_write(de, RPI_CONTROL, (ctb_col<<0) + (ctb_row<<16)); -+} -+ -+////////////////////////////////////////////////////////////////////////////// -+ -+// Doesn't attempt to remove from context as we should only do this at the end -+// of time or on create error -+static void -+dec_env_delete(dec_env_t * const de) -+{ -+// gpu_free(&de->gbuf); -+ -+ av_freep(&de->cmd_fifo); -+ av_freep(&de->bit_fifo); -+ -+ sem_destroy(&de->phase_wait); -+ av_free(de); -+} -+ -+static dec_env_t * -+dec_env_new(AVCodecContext * const avctx, RPI_T * const rpi) -+{ -+ dec_env_t * const de = av_mallocz(sizeof(*de)); -+ int i; -+ -+ if (de == NULL) -+ return NULL; -+ -+ de->avctx = avctx; -+ de->phase_no = RPIVID_PHASE_NEW; -+ -+ sem_init(&de->phase_wait, 0, 0); -+ -+ if ((de->cmd_fifo = malloc((de->cmd_max=1024)*sizeof(struct RPI_CMD))) == NULL) -+ goto fail; -+ -+ if ((de->bit_fifo = malloc((de->bit_max=1024)*sizeof(struct RPI_BIT))) == NULL) -+ goto fail; -+ -+ pthread_mutex_lock(&rpi->phase_lock); // Abuse - not worth creating a lock just for this -+ for (i = 0; i != avctx->thread_count; ++i) { -+ if (rpi->dec_envs[i] == NULL) -+ { -+ rpi->dec_envs[i] = de; -+ break; -+ } -+ } -+ pthread_mutex_unlock(&rpi->phase_lock); -+ -+ if (i == avctx->thread_count) { -+ av_log(avctx, AV_LOG_ERROR, "Failed to find a slot for hw thread context\n"); -+ goto fail; -+ } -+ -+ return de; -+ -+fail: -+ dec_env_delete(de); -+ return NULL; -+} -+ -+ -+static dec_env_t * -+dec_env_get(AVCodecContext * const avctx, RPI_T * const rpi) -+{ -+ dec_env_t * de = NULL; -+ const int ref_count = atomic_fetch_add(&rpi->ref_count, 1); -+ -+ if (ref_count <= 0) { -+ // Already dead -+ av_log(avctx, AV_LOG_ERROR, "RPIVID called whilst dead\n");; -+ return NULL; -+ } -+ -+ for (int i = 0; i != avctx->thread_count; ++i) { -+ if (rpi->dec_envs[i] == NULL) -+ { -+ de = dec_env_new(avctx, rpi); -+ break; -+ } -+ if (rpi->dec_envs[i]->avctx == avctx) -+ { -+ de = rpi->dec_envs[i]; -+ break; -+ } -+ } -+ return de; -+} -+ -+// Call at end of fn -+// Used to ensure we aren't in a worker thead when killed -+static void -+dec_env_release(RPI_T * const rpi, dec_env_t * const de) -+{ -+ const int n = atomic_fetch_sub(&rpi->ref_count, 1); -+ if (n == 1) { -+ sem_post(&rpi->ref_zero); -+ } -+} -+ -+//---------------------------------------------------------------------------- -+ -+// Wait for a slot in the given phase -+// Any error return is probably fatal -+static int -+wait_phase(RPI_T * const rpi, dec_env_t * const de, const int phase_no) -+{ -+ int needs_wait = 0; -+ phase_wait_env_t *const p = rpi->phase_reqs + phase_no; -+ -+ pthread_mutex_lock(&rpi->phase_lock); -+ if (p->last_order + 1 != de->decode_order) { -+ de->phase_wait_q_next = p->q; -+ p->q = de; -+ needs_wait = 1; -+ } -+ pthread_mutex_unlock(&rpi->phase_lock); -+ -+ if (needs_wait) { -+ while (sem_wait(&de->phase_wait) == -1) -+ { -+ int err; -+ if ((err = errno) != EINTR) -+ return AVERROR(err); -+ } -+ } -+ -+ de->phase_no = phase_no; -+ return 0; -+} -+ -+static void -+post_phase(RPI_T * const rpi, dec_env_t * const de, const int phase_no) -+{ -+ dec_env_t * next_de = NULL; -+ phase_wait_env_t *const p = rpi->phase_reqs + phase_no; -+ dec_env_t ** q = &p->q; -+ -+ pthread_mutex_lock(&rpi->phase_lock); -+ -+ p->last_order = de->decode_order; -+ while (*q != NULL) { -+ dec_env_t * const t_de = *q; -+ -+ if (t_de->decode_order == p->last_order + 1) { -+ // This is us - remove from Q -+ *q = t_de->phase_wait_q_next; -+ t_de->phase_wait_q_next = NULL; // Tidy -+ next_de = t_de; -+ break; -+ } -+ q = &t_de->phase_wait_q_next; -+ } -+ -+ pthread_mutex_unlock(&rpi->phase_lock); -+ -+ if (next_de != NULL) -+ sem_post(&next_de->phase_wait); -+} -+ -+// Wait & signal stuff s.t. threads in other phases can continue -+static void -+abort_phases(RPI_T * const rpi, dec_env_t * const de) -+{ -+ for (int i = de->phase_no + 1; i < RPIVID_PHASE_NEW; ++i) { -+ wait_phase(rpi, de, i); -+ post_phase(rpi, de, i); -+ } -+ de->phase_no = RPIVID_PHASE_NEW; -+} -+ -+// Start timing for phase -+// Stats only - no actual effect -+static inline void tstart_phase(RPI_T * const rpi, const int phase_no) -+{ -+#if OPT_PHASE_TIMING -+ phase_wait_env_t *const p = rpi->phase_reqs + phase_no; -+ const int64_t now = tus64(); -+ if (p->phase_time != 0) -+ p->time_out_phase += now - p->phase_time; -+ p->phase_time = now; -+#endif -+} -+ -+#if OPT_PHASE_TIMING -+static unsigned int tavg_bin_phase(phase_wait_env_t *const p, const unsigned int avg_n) -+{ -+ uint64_t tsum = 0; -+ unsigned int i; -+ for (i = 0; i != avg_n; ++i) -+ tsum += p->time_stash[(p->i3 - i) & 15]; -+ for (i = 0; i != 9; ++i) { -+ if (time_thresholds[i] * 1000 * avg_n > tsum) -+ break; -+ } -+ return i; -+} -+#endif -+ -+// End timing for phase -+// Stats only - no actual effect -+static inline void tend_phase(RPI_T * const rpi, const int phase_no) -+{ -+#if OPT_PHASE_TIMING -+ phase_wait_env_t *const p = rpi->phase_reqs + phase_no; -+ const uint64_t now = tus64(); -+ const uint64_t in_time = now - p->phase_time; -+ -+ p->time_in_phase += in_time; -+ p->phase_time = now; -+ p->time_stash[p->i3] = in_time; -+ if (in_time > p->max_phase_time) { -+ p->max_phase_time = in_time; -+ p->max_time_decode_order = p->last_order; -+ } -+ ++p->time_bins[tavg_bin_phase(p, 1)]; -+ ++p->time_bins3[tavg_bin_phase(p, 3)]; -+ ++p->time_bins5[tavg_bin_phase(p, 5)]; -+ -+ p->i3 = (p->i3 + 1) & 15; -+#endif -+} -+ -+////////////////////////////////////////////////////////////////////////////// -+// Start frame -+ -+static int rpi_hevc_start_frame( -+ AVCodecContext * avctx, -+ const uint8_t *buffer, -+ uint32_t size) { -+ -+ RPI_T * const rpi = avctx->internal->hwaccel_priv_data; -+ dec_env_t * const de = dec_env_get(avctx, rpi); -+ const HEVCContext * const s = avctx->priv_data; -+ const HEVCSPS * const sps = s->ps.sps; -+ const unsigned int CtbSizeY = 1U << sps->log2_ctb_size; -+ -+#if TRACE_ENTRY -+ printf("<<< %s[%p]\n", __func__, de); -+#endif -+ -+ if (de == NULL) { -+ av_log(avctx, AV_LOG_ERROR, "%s: Cannot find find context for thread\n", __func__); -+ return -1; -+ } -+ -+ de->phase_no = RPIVID_PHASE_START; -+ de->decode_order = ++rpi->decode_order; // *** atomic? -+ -+ ff_thread_finish_setup(avctx); // Allow next thread to enter rpi_hevc_start_frame -+ -+ if (de->state != RPIVID_DECODE_NEW && de->state != RPIVID_DECODE_END) { -+ av_log(avctx, AV_LOG_ERROR, "%s: Unexpected state transition: %d", __func__, de->state); -+ return -1; -+ } -+ de->state = RPIVID_DECODE_START; -+ -+ de->PicWidthInCtbsY = (sps->width + CtbSizeY - 1) / CtbSizeY; //7-15 -+ de->PicHeightInCtbsY = (sps->height + CtbSizeY - 1) / CtbSizeY; //7-17 -+ de->bit_len = 0; -+ de->cmd_len = 0; -+ -+#if TRACE_ENTRY -+ printf(">>> %s[%p]\n", __func__, de); -+#endif -+ -+ dec_env_release(rpi, de); -+ return 0; -+} -+ -+////////////////////////////////////////////////////////////////////////////// -+// Slice messages -+ -+static void msg_slice(dec_env_t * const de, const uint16_t msg) { -+ de->slice_msgs[de->num_slice_msgs++] = msg; -+} -+ -+static void program_slicecmds(dec_env_t * const de, const int sliceid) { -+ int i; -+ p1_apb_write(de, RPI_SLICECMDS, de->num_slice_msgs+(sliceid<<8)); -+ for(i=0; i < de->num_slice_msgs; i++) { -+ p1_apb_write(de, 0x4000+4*i, de->slice_msgs[i] & 0xffff); -+ } -+} -+ -+static void pre_slice_decode(dec_env_t * const de, const HEVCContext * const s) { -+ const HEVCSPS * const sps = s->ps.sps; -+ const HEVCPPS * const pps = s->ps.pps; -+ const SliceHeader *sh = &s->sh; -+ -+ int weightedPredFlag, i, rIdx; -+ uint16_t cmd_slice; -+ unsigned int collocated_from_l0_flag; -+ -+ de->num_slice_msgs=0; -+ de->dpbno_col = 0; -+ cmd_slice = 0; -+ if (sh->slice_type==HEVC_SLICE_I) cmd_slice = 1; -+ if (sh->slice_type==HEVC_SLICE_P) cmd_slice = 2; -+ if (sh->slice_type==HEVC_SLICE_B) cmd_slice = 3; -+ -+ if (sh->slice_type!=HEVC_SLICE_I) { -+ cmd_slice += sh->nb_refs[L0]<<2; -+ cmd_slice += sh->nb_refs[L1]<<6; -+ } -+ -+ if (sh->slice_type==HEVC_SLICE_P || sh->slice_type==HEVC_SLICE_B) -+ cmd_slice |= sh->max_num_merge_cand<<11; -+ -+ collocated_from_l0_flag = -+ !sh->slice_temporal_mvp_enabled_flag ? -+ 0 : -+ sh->slice_type == HEVC_SLICE_B ? -+ (sh->collocated_list == L0) : -+ (sh->slice_type==HEVC_SLICE_P); -+ cmd_slice |= collocated_from_l0_flag<<14; -+ -+ if (sh->slice_type==HEVC_SLICE_P || sh->slice_type==HEVC_SLICE_B) { -+ -+ int NoBackwardPredFlag = 1; // Flag to say all reference pictures are from the past -+ for(i=L0; i<=L1; i++) { -+ for(rIdx=0; rIdx nb_refs[i]; rIdx++) { -+ HEVCFrame *f = s->ref->refPicList[i].ref[rIdx]; -+ HEVCFrame *c = s->ref; // CurrentPicture -+ if (c->poc < f->poc) NoBackwardPredFlag = 0; -+ } -+ } -+ -+ if (sps->sps_temporal_mvp_enabled_flag) -+ { -+ const RefPicList *rpl = (sh->slice_type != HEVC_SLICE_B || collocated_from_l0_flag) ? -+ s->ref->refPicList + 0 : -+ s->ref->refPicList + 1; -+ de->dpbno_col = rpl->ref[sh->collocated_ref_idx] - s->DPB; -+ } -+ -+ cmd_slice += NoBackwardPredFlag<<10; -+ msg_slice(de, cmd_slice); -+ -+ // Write reference picture descriptions -+ weightedPredFlag = sh->slice_type==HEVC_SLICE_P? pps->weighted_pred_flag : pps->weighted_bipred_flag; -+ -+ for(i=L0; i<=L1; i++) -+ for(rIdx=0; rIdx nb_refs[i]; rIdx++) { -+ HEVCFrame *f = s->ref->refPicList[i].ref[rIdx]; -+ HEVCFrame *c = s->ref; // CurrentPicture -+ int pic = f - s->DPB; -+ // Make sure pictures are in range 0 to 15 -+ int adjusted_pic = fref->refPicList[i].isLongTerm[rIdx]; -+ msg_slice(de, adjusted_pic+(lt<<4)+(weightedPredFlag<<5)+(weightedPredFlag<<6)); -+ msg_slice(de, f->poc); -+ if (weightedPredFlag) { -+ msg_slice(de, s->sh.luma_log2_weight_denom+(((i?s-> sh.luma_weight_l1: s->sh.luma_weight_l0)[rIdx] &0x1ff)<<3)); -+ msg_slice(de, (i?s-> sh.luma_offset_l1: s->sh.luma_offset_l0)[rIdx] & 0xff); -+ msg_slice(de, s->sh.chroma_log2_weight_denom+(((i?s->sh.chroma_weight_l1:s->sh.chroma_weight_l0)[rIdx][0]&0x1ff)<<3)); -+ msg_slice(de, (i?s->sh.chroma_offset_l1:s->sh.chroma_offset_l0)[rIdx][0]& 0xff); -+ msg_slice(de, s->sh.chroma_log2_weight_denom+(((i?s->sh.chroma_weight_l1:s->sh.chroma_weight_l0)[rIdx][1]&0x1ff)<<3)); -+ msg_slice(de, (i?s->sh.chroma_offset_l1:s->sh.chroma_offset_l0)[rIdx][1]& 0xff); -+ } -+ } -+ } -+ else -+ msg_slice(de, cmd_slice); -+ -+ msg_slice(de, ((sh->beta_offset/2)&15) -+ + (((sh->tc_offset/2)&15) << 4) -+ + (sh->disable_deblocking_filter_flag << 8) -+ + (sh->slice_loop_filter_across_slices_enabled_flag << 9) -+ + (pps->loop_filter_across_tiles_enabled_flag << 10)); // CMD_DEBLOCK -+ -+ msg_slice(de, ((sh->slice_cr_qp_offset&31)<<5) + (sh->slice_cb_qp_offset&31)); // CMD_QPOFF -+} -+ -+ -+////////////////////////////////////////////////////////////////////////////// -+ -+static void rpi_hevc_abort_frame(AVCodecContext * const avctx) { -+ RPI_T * const rpi = avctx->internal->hwaccel_priv_data; -+ dec_env_t * const de = dec_env_get(avctx, rpi); -+ -+#if TRACE_ENTRY -+ printf("<<< %s[%p]\n", __func__, de); -+#endif -+ -+ if (de == NULL) { -+ av_log(avctx, AV_LOG_ERROR, "%s: Cannot find find context for thread\n", __func__); -+ return; -+ } -+ -+ switch (de->state) { -+ case RPIVID_DECODE_NEW: -+ case RPIVID_DECODE_END: -+ // Expected transition -+ break; -+ -+ case RPIVID_DECODE_SLICE: -+ // Error transition -+ av_log(avctx, AV_LOG_INFO, "Error in decode - aborting\n"); -+ break; -+ -+ case RPIVID_DECODE_START: -+ default: -+ av_log(avctx, AV_LOG_ERROR, "%s: Unexpected state transition: %d", __func__, de->state); -+ break; -+ } -+ -+ abort_phases(rpi, de); -+ de->state = RPIVID_DECODE_NEW; -+ -+ dec_env_release(rpi, de); -+} -+ -+////////////////////////////////////////////////////////////////////////////// -+// End frame -+ -+static int rpi_hevc_end_frame(AVCodecContext * const avctx) { -+ RPI_T * const rpi = avctx->internal->hwaccel_priv_data; -+ const HEVCContext * const s = avctx->priv_data; -+ const HEVCPPS * const pps = s->ps.pps; -+ const HEVCSPS * const sps = s->ps.sps; -+ dec_env_t * const de = dec_env_get(avctx, rpi); -+ AVFrame * const f = s->ref->frame; -+ const unsigned int dpbno_cur = s->ref - s->DPB; -+ vid_vc_addr_t cmds_vc; -+ vid_vc_addr_t pu_base_vc; -+ unsigned int pu_stride; -+ vid_vc_addr_t coeff_base_vc; -+ unsigned int coeff_stride; -+ unsigned int i; -+ int rv = 0; -+ int status = 0; -+ int coeffbuf_sem_claimed = 0; -+ -+#if TRACE_ENTRY -+ fprintf("<<< %s[%p]\n", __func__, de); -+#endif -+ -+ if (de == NULL) { -+ av_log(avctx, AV_LOG_ERROR, "%s: Cannot find find context for thread\n", __func__); -+ return AVERROR_BUG; // Should never happen -+ } -+ -+ if (de->state != RPIVID_DECODE_SLICE) { -+ av_log(avctx, AV_LOG_ERROR, "%s: Unexpected state: %d\n", __func__, de->state); -+ rv = AVERROR_UNKNOWN; -+ goto fail; -+ } -+ de->state = RPIVID_DECODE_END; -+ -+ // End of command compilation -+ { -+ const unsigned int last_x = pps->col_bd[pps->num_tile_columns]-1; -+ const unsigned int last_y = pps->row_bd[pps->num_tile_rows]-1; -+ if (pps->entropy_coding_sync_enabled_flag) { -+ if (de->wpp_entry_x<2 && de->PicWidthInCtbsY>2) -+ wpp_pause(de, last_y); -+ } -+ p1_apb_write(de, RPI_STATUS, 1 + (last_x<<5) + (last_y<<18)); -+ } -+ -+ // Phase 0 --------------------------------------------------------------- -+ -+ wait_phase(rpi, de, 0); -+ rpi_sem_wait(&rpi->bitbuf_sem); -+ tstart_phase(rpi, 0); -+ -+ // Copy cmds & bits into gpu side buffer -+ // Layout: CMDS, BITS -+ { -+ uint8_t * const armbase = rpi->gbitbufs[rpi->bitbuf_no].arm; -+ vid_vc_addr_t vcbase = rpi->gbitbufs[rpi->bitbuf_no].vc; -+ unsigned int cmd_bytes = de->cmd_len * sizeof(struct RPI_CMD); -+ -+ uint8_t * p = armbase + rnd64(cmd_bytes); -+ uint8_t * const eobits = armbase + rpi->gbitbufs[rpi->bitbuf_no].numbytes; -+ -+ cmds_vc = vcbase; -+ -+ // Copy all the bits & update bitstream cmds to point at the right bits -+ for (i = 0; i < de->bit_len; ++i) -+ { -+ const unsigned int seg_len = de->bit_fifo[i].len; -+ -+ if (p + seg_len > eobits) { -+ status = -1; -+ break; -+ } -+ -+ memcpy(p, de->bit_fifo[i].ptr, seg_len); -+ de->cmd_fifo[de->bit_fifo[i].cmd].data = MANGLE64((p - armbase) + vcbase); -+ -+ p += rnd64(seg_len); -+ } -+ -+ memcpy(armbase, de->cmd_fifo, cmd_bytes); -+ } -+ -+ if (status == 0) -+ { -+ if (++rpi->bitbuf_no >= RPIVID_BITBUFS) -+ rpi->bitbuf_no = 0; -+ } -+ else -+ { -+ sem_post(&rpi->bitbuf_sem); -+ av_log(avctx, AV_LOG_ERROR, "Out of HEVC bit/cmd memory\n"); -+ rv = AVERROR_BUFFER_TOO_SMALL; -+ } -+ -+ tend_phase(rpi, 0); -+ post_phase(rpi, de, 0); -+ -+ if (status < 0) -+ goto fail; -+ -+ // Phase 1 --------------------------------------------------------------- -+ -+ wait_phase(rpi, de, 1); -+ rpi_sem_wait(&rpi->coeffbuf_sem); -+ coeffbuf_sem_claimed = 1; -+ tstart_phase(rpi, 1); -+ -+ status = 0; -+ for (;;) -+ { -+ // (Re-)allocate PU/COEFF stream space -+ const unsigned int total_size = rpi->gcoeffbufs[rpi->coeffbuf_no].numbytes; -+ unsigned int pu_size; -+ -+ pu_base_vc = rpi->gcoeffbufs[rpi->coeffbuf_no].vc; -+ pu_stride = rnd64(rpi->max_pu_msgs * 2 * de->PicWidthInCtbsY); -+ pu_size = pu_stride * de->PicHeightInCtbsY; -+ -+ if (pu_size >= total_size || status == -1) { -+ GPU_MEM_PTR_T newbuf; -+ -+ if (gpu_malloc_uncached(round_up_size(total_size + 1), &newbuf) != 0) -+ { -+ av_log(avctx, AV_LOG_ERROR, "Failed to reallocate coeffbuf\n"); -+ status = -1; -+ break; -+ } -+ gpu_free(rpi->gcoeffbufs + rpi->coeffbuf_no); -+ rpi->gcoeffbufs[rpi->coeffbuf_no] = newbuf; -+ status = 0; -+ continue; -+ } -+ -+ // Allocate all remaining space to coeff -+ coeff_base_vc = pu_base_vc + pu_size; -+ coeff_stride = ((total_size - pu_size) / de->PicHeightInCtbsY) & ~63; // Round down to multiple of 64 -+ -+ apb_write_vc_addr(rpi, RPI_PUWBASE, pu_base_vc); -+ apb_write_vc_len(rpi, RPI_PUWSTRIDE, pu_stride); -+ apb_write_vc_addr(rpi, RPI_COEFFWBASE, coeff_base_vc); -+ apb_write_vc_len(rpi, RPI_COEFFWSTRIDE, coeff_stride); -+ -+ // Trigger command FIFO -+ apb_write(rpi, RPI_CFNUM, de->cmd_len); -+#if TRACE_DEV && 0 -+ apb_dump_regs(rpi, 0x0, 32); -+ apb_dump_regs(rpi, 0x8000, 24); -+ axi_dump(de, ((uint64_t)a64)<<6, de->cmd_len * sizeof(struct RPI_CMD)); -+#endif -+ apb_write_vc_addr(rpi, RPI_CFBASE, cmds_vc); -+ -+ int_wait(rpi, 1); -+ -+ status = check_status(rpi, de); -+ -+ if (status == -1) -+ continue; -+ else if (status != 1) -+ break; -+ -+ // Status 1 means out of PU space so try again with more -+ // If we ran out of Coeff space then we are out of memory - we could possibly realloc? -+ rpi->max_pu_msgs += rpi->max_pu_msgs / 2; -+ } -+ -+ // Inc inside the phase 1 lock, but only inc if we succeeded otherwise we -+ // may reuse a live buffer when we kick the coeff sem -+ if (status == 0) -+ { -+ if (++rpi->coeffbuf_no >= RPIVID_COEFFBUFS) -+ rpi->coeffbuf_no = 0; -+ } -+ else -+ { -+ if (status == -1) -+ { -+ av_log(avctx, AV_LOG_ERROR, "Out of pu + coeff intermediate memory: pus=%d\n", rpi->max_pu_msgs); -+ rv = AVERROR_BUFFER_TOO_SMALL; -+ } -+ else -+ { -+ av_log(avctx, AV_LOG_WARNING, "Phase 1 decode error\n"); -+ rv = AVERROR_INVALIDDATA; -+ } -+ } -+ -+ tend_phase(rpi, 1); -+ sem_post(&rpi->bitbuf_sem); -+ post_phase(rpi, de, 1); -+ -+ if (status != 0) -+ goto fail; -+ -+ // Phase 2 --------------------------------------------------------------- -+ -+ wait_phase(rpi, de, 2); -+ -+ if ((rv = av_rpi_zc_resolve_frame(f, ZC_RESOLVE_ALLOC)) != 0) -+ { -+ // As we are in phase 2 already here we don't need to worry about -+ // ceoffbuf_no despite the early exit -+ post_phase(rpi, de, 2); -+ av_log(avctx, AV_LOG_ERROR, "Failed to allocate output frame\n"); -+ goto fail; -+ } -+ -+ tstart_phase(rpi, 2); -+ -+ apb_write_vc_addr(rpi, RPI_PURBASE, pu_base_vc); -+ apb_write_vc_len(rpi, RPI_PURSTRIDE, pu_stride); -+ apb_write_vc_addr(rpi, RPI_COEFFRBASE, coeff_base_vc); -+ apb_write_vc_len(rpi, RPI_COEFFRSTRIDE, coeff_stride); -+ -+ apb_write_vc_addr(rpi, RPI_OUTYBASE, get_vc_address_y(f)); -+ apb_write_vc_addr(rpi, RPI_OUTCBASE, get_vc_address_u(f)); -+ apb_write_vc_len(rpi, RPI_OUTYSTRIDE, f->linesize[3] * 128); -+ apb_write_vc_len(rpi, RPI_OUTCSTRIDE, f->linesize[3] * 128); -+ -+ // Keep the last thing we resolved as fallback for any ref we fail to -+ // resolve. As a final fallback use our current frame. The pels might -+ // not be there yet but at least the memory is valid. -+ // -+ // Attempt to resolve the entire DPB - we could note what we have used -+ // in ref lists but probably simpler and more reliable to set the whole thing -+ { -+ AVFrame * fallback_frame = f; -+ for (i = 0; i != 16; ++i) { -+ // Avoid current frame -+ const HEVCFrame * hevc_fr = (s->DPB + i >= s->ref) ? s->DPB + i + 1 : s->DPB + i; -+ AVFrame * fr = hevc_fr->frame; -+ -+ if (fr != NULL && -+ av_rpi_zc_resolve_frame(fr, ZC_RESOLVE_FAIL) == 0) -+ { -+ fallback_frame = fr; -+ } -+ else -+ { -+ fr = fallback_frame; -+ } -+ -+ apb_write_vc_addr(rpi, 0x9000+16*i, get_vc_address_y(fr)); -+ apb_write(rpi, 0x9004+16*i, 0); -+ apb_write_vc_addr(rpi, 0x9008+16*i, get_vc_address_u(fr)); -+ apb_write(rpi, 0x900C+16*i, 0); -+ } -+ } -+ -+ apb_write(rpi, RPI_CONFIG2, -+ (sps->bit_depth << 0) // BitDepthY -+ + (sps->bit_depth << 4) // BitDepthC -+ + ((sps->bit_depth>8) << 8) // BitDepthY -+ + ((sps->bit_depth>8) << 9) // BitDepthC -+ + (sps->log2_ctb_size <<10) -+ + (pps->constrained_intra_pred_flag <<13) -+ + (sps->sps_strong_intra_smoothing_enable_flag<<14) -+ + (sps->sps_temporal_mvp_enabled_flag <<15) -+ + (pps->log2_parallel_merge_level <<16) -+ + (s->sh.slice_temporal_mvp_enabled_flag <<19) -+ + (sps->pcm.loop_filter_disable_flag <<20) -+ + ((pps->cb_qp_offset&31) <<21) -+ + ((pps->cr_qp_offset&31) <<26)); -+ -+ apb_write(rpi, RPI_FRAMESIZE, (sps->height<<16) + sps->width); -+ apb_write(rpi, RPI_CURRPOC, s->poc); -+ -+ // collocated reads/writes -+ if (sps->sps_temporal_mvp_enabled_flag) { -+ av_assert0(de->dpbno_col < RPIVID_COL_PICS); -+ av_assert0(dpbno_cur < RPIVID_COL_PICS); -+ -+ apb_write_vc_len(rpi, RPI_COLSTRIDE, rpi->col_stride); -+ apb_write_vc_len(rpi, RPI_MVSTRIDE, rpi->col_stride); -+ apb_write_vc_addr(rpi, RPI_MVBASE, rpi->gcolbuf.vc + dpbno_cur * rpi->col_picsize); -+ apb_write_vc_addr(rpi, RPI_COLBASE, rpi->gcolbuf.vc + de->dpbno_col * rpi->col_picsize); -+ } -+ -+#if TRACE_DEV && 0 -+ apb_dump_regs(rpi, 0x0, 32); -+ apb_dump_regs(rpi, 0x8000, 24); -+#endif -+ -+ apb_write(rpi, RPI_NUMROWS, de->PicHeightInCtbsY); -+ apb_read(rpi, RPI_NUMROWS); // Read back to confirm write has reached block -+ -+ int_wait(rpi, 2); -+ -+ tend_phase(rpi, 2); -+ coeffbuf_sem_claimed = 0; -+ sem_post(&rpi->coeffbuf_sem); -+ // Set valid here to avoid race in resolving in any pending phase 2 -+ av_rpi_zc_set_valid_frame(f); -+ -+ post_phase(rpi, de, 2); -+ -+ // Flush frame for CPU access -+ // Arguably the best place would be at the start of phase 2 but here -+ // will overlap with the wait -+ // -+ // * Even better would be to have better lock/unlock control in ZC for external access -+ if (rpi->gpu_init_type == GPU_INIT_GPU) // * CMA is currently always uncached -+ { -+ rpi_cache_buf_t cbuf; -+ rpi_cache_flush_env_t * const fe = rpi_cache_flush_init(&cbuf); -+ rpi_cache_flush_add_frame(fe, f, RPI_CACHE_FLUSH_MODE_INVALIDATE); -+ rpi_cache_flush_finish(fe); -+ } -+ -+#if TRACE_ENTRY -+ printf(">>> %s[%p] OK\n", __func__, de); -+#endif -+ -+ dec_env_release(rpi, de); -+ return 0; -+ -+fail: -+ av_rpi_zc_set_broken_frame(f); -+ if (coeffbuf_sem_claimed) -+ sem_post(&rpi->coeffbuf_sem); -+ abort_phases(rpi, de); // Dummy any unresolved phases -+ -+#if TRACE_ENTRY -+ printf(">>> %s[%p] FAIL\n", __func__, de); -+#endif -+ -+ dec_env_release(rpi, de); -+ return rv; -+} -+ -+////////////////////////////////////////////////////////////////////////////// -+ -+ -+#if TRACE_DEV -+static void dump_data(const uint8_t * p, size_t len) -+{ -+ size_t i; -+ for (i = 0; i < len; i += 16) { -+ size_t j; -+ printf("%04x", i); -+ for (j = 0; j != 16; ++j) { -+ printf("%c%02x", i == 8 ? '-' : ' ', p[i+j]); -+ } -+ printf("\n"); -+ } -+} -+#endif -+ -+#if OPT_EMU -+static const uint8_t * ptr_from_index(const uint8_t * b, unsigned int idx) -+{ -+ unsigned int z = 0; -+ while (idx--) { -+ if (*b++ == 0) { -+ ++z; -+ if (z >= 2 && *b == 3) { -+ ++b; -+ z = 0; -+ } -+ } -+ else { -+ z = 0; -+ } -+ } -+ return b; -+} -+#endif -+ -+static void WriteBitstream(dec_env_t * const de, const HEVCContext * const s) { -+ const int rpi_use_emu = OPT_EMU; // FFmpeg removes emulation prevention bytes -+ const int offset = 0; // Always 64-byte aligned in sim, need not be on real hardware -+ const GetBitContext *gb = &s->HEVClc->gb; -+ -+#if OPT_EMU -+ const uint8_t *ptr = ptr_from_index(de->nal_buffer, gb->index/8 + 1); -+ const int len = de->nal_size - (ptr - de->nal_buffer); -+#else -+ const int len = 1 + gb->size_in_bits/8 - gb->index/8; -+ const void *ptr = &gb->buffer[gb->index/8]; -+#endif -+ -+#if TRACE_DEV -+ printf("Index=%d, /8=%#x\n", gb->index, gb->index/8); -+ dump_data(de->nal_buffer, 128); -+#endif -+ -+ p1_axi_write(de, len, ptr, p1_apb_write(de, RPI_BFBASE, 0)); // BFBASE set later -+ p1_apb_write(de, RPI_BFNUM, len); -+ p1_apb_write(de, RPI_BFCONTROL, offset + (1<<7)); // Stop -+ p1_apb_write(de, RPI_BFCONTROL, offset + (rpi_use_emu<<6)); -+} -+ -+////////////////////////////////////////////////////////////////////////////// -+// Wavefront mode -+ -+static void wpp_decode_slice(dec_env_t * const de, const HEVCContext * const s, int ctb_addr_ts) -+{ -+ const HEVCPPS * const pps = s->ps.pps; -+ -+ int i, resetQPY=1; -+ int indep = !s->sh.dependent_slice_segment_flag; -+ int ctb_col = s->sh.slice_ctb_addr_rs % de->PicWidthInCtbsY; -+ -+ if (ctb_addr_ts) -+ wpp_end_previous_slice(de, s, ctb_addr_ts); -+ pre_slice_decode(de, s); -+ WriteBitstream(de, s); -+ if (ctb_addr_ts==0 || indep || de->PicWidthInCtbsY==1) -+ WriteProb(de, s); -+ else if (ctb_col==0) -+ p1_apb_write(de, RPI_TRANSFER, PROB_RELOAD); -+ else -+ resetQPY=0; -+ program_slicecmds(de, s->slice_idx); -+ new_slice_segment(de, s); -+ wpp_entry_point(de, s, indep, resetQPY, ctb_addr_ts); -+ for (i=0; ish.num_entry_point_offsets; i++) { -+ int ctb_addr_rs = pps->ctb_addr_ts_to_rs[ctb_addr_ts]; -+ int ctb_row = ctb_addr_rs / de->PicWidthInCtbsY; -+ int last_x = de->PicWidthInCtbsY-1; -+ if (de->PicWidthInCtbsY>2) -+ wpp_pause(de, ctb_row); -+ p1_apb_write(de, RPI_STATUS, (ctb_row<<18) + (last_x<<5) + 2); -+ if (de->PicWidthInCtbsY==2) -+ p1_apb_write(de, RPI_TRANSFER, PROB_BACKUP); -+ if (de->PicWidthInCtbsY==1) -+ WriteProb(de, s); -+ else -+ p1_apb_write(de, RPI_TRANSFER, PROB_RELOAD); -+ ctb_addr_ts += pps->column_width[0]; -+ wpp_entry_point(de, s, 0, 1, ctb_addr_ts); -+ } -+} -+ -+////////////////////////////////////////////////////////////////////////////// -+// Tiles mode -+ -+static void decode_slice(dec_env_t * const de, const HEVCContext * const s, int ctb_addr_ts) { -+ const HEVCPPS * const pps = s->ps.pps; -+ int i, resetQPY; -+ -+ if (ctb_addr_ts) end_previous_slice(de, s, ctb_addr_ts); -+ pre_slice_decode(de, s); -+ WriteBitstream(de, s); -+ resetQPY = ctb_addr_ts==0 -+ || pps->tile_id[ctb_addr_ts]!=pps->tile_id[ctb_addr_ts-1] -+ || !s->sh.dependent_slice_segment_flag; -+ if (resetQPY) WriteProb(de, s); -+ program_slicecmds(de, s->slice_idx); -+ new_slice_segment(de, s); -+ new_entry_point(de, s, !s->sh.dependent_slice_segment_flag, resetQPY, ctb_addr_ts); -+ for (i=0; ish.num_entry_point_offsets; i++) { -+ int ctb_addr_rs = pps->ctb_addr_ts_to_rs[ctb_addr_ts]; -+ int ctb_col = ctb_addr_rs % de->PicWidthInCtbsY; -+ int ctb_row = ctb_addr_rs / de->PicWidthInCtbsY; -+ int tile_x = ctb_to_tile (ctb_col, pps->col_bd, pps->num_tile_columns); -+ int tile_y = ctb_to_tile (ctb_row, pps->row_bd, pps->num_tile_rows); -+ int last_x = pps->col_bd[tile_x+1]-1; -+ int last_y = pps->row_bd[tile_y+1]-1; -+ p1_apb_write(de, RPI_STATUS, 2 + (last_x<<5) + (last_y<<18)); -+ WriteProb(de, s); -+ ctb_addr_ts += pps->column_width[tile_x] * pps->row_height[tile_y]; -+ new_entry_point(de, s, 0, 1, ctb_addr_ts); -+ } -+} -+ -+////////////////////////////////////////////////////////////////////////////// -+ -+static int cabac_start_align(HEVCContext *s) -+{ -+ GetBitContext *gb = &s->HEVClc->gb; -+ skip_bits(gb, 1); -+ align_get_bits(gb); -+ // Should look at getting rid of this -+ return ff_init_cabac_decoder(&s->HEVClc->cc, -+ gb->buffer + get_bits_count(gb) / 8, -+ (get_bits_left(gb) + 7) / 8); -+} -+ -+static int rpi_hevc_decode_slice( -+ AVCodecContext *avctx, -+ const uint8_t *buffer, -+ uint32_t size) -+{ -+ RPI_T * const rpi = avctx->internal->hwaccel_priv_data; -+ HEVCContext * const s = avctx->priv_data; -+ dec_env_t * const de = dec_env_get(avctx, rpi); -+ const HEVCPPS *pps = s->ps.pps; -+ int ctb_addr_ts = pps->ctb_addr_rs_to_ts[s->sh.slice_ctb_addr_rs]; -+ -+#if TRACE_ENTRY -+ printf("<<< %s[%p]\n", __func__, de); -+#endif -+ if (de == NULL) { -+ av_log(avctx, AV_LOG_ERROR, "%s: Cannot find find context for thread\n", __func__); -+ return -1; -+ } -+ -+ if (de->state != RPIVID_DECODE_START && de->state != RPIVID_DECODE_SLICE) { -+ av_log(avctx, AV_LOG_ERROR, "%s: Unexpected state: %d\n", __func__, de->state); -+ return -1; -+ } -+ de->state = RPIVID_DECODE_SLICE; -+ -+ de->nal_buffer = buffer; -+ de->nal_size = size; -+ -+#if !OPT_EMU -+// ff_hevc_cabac_init(s, ctb_addr_ts); -+ cabac_start_align(s); -+#endif -+ if (s->ps.sps->scaling_list_enable_flag) -+ populate_scaling_factors(de, s); -+ pps->entropy_coding_sync_enabled_flag? wpp_decode_slice(de, s, ctb_addr_ts) -+ : decode_slice(de, s, ctb_addr_ts); -+#if TRACE_ENTRY -+ printf(">>> %s[%p]\n", __func__, de); -+#endif -+ dec_env_release(rpi, de); -+ return 0; -+} -+ -+////////////////////////////////////////////////////////////////////////////// -+ -+static int rpivid_retrieve_data(void *logctx, AVFrame *frame) -+{ -+ int rv; -+ if ((rv = av_rpi_zc_resolve_frame(frame, ZC_RESOLVE_WAIT_VALID)) != 0) -+ av_log(logctx, AV_LOG_ERROR, "Unable to resolve output frame\n"); -+ return rv; -+} -+ -+static int rpivid_hevc_alloc_frame(AVCodecContext * avctx, AVFrame *frame) -+{ -+ RPI_T * const rpi = avctx->internal->hwaccel_priv_data; -+ HEVCContext * const s = avctx->priv_data; -+ // Frame buffering + 1 output. Would need thread_count extra but we now -+ // alloc at the start of phase 2 so that is the only thread we need the -+ // extra buffer for. -+ const unsigned int pool_req = s->ps.sps->temporal_layer[s->ps.sps->max_sub_layers - 1].max_dec_pic_buffering + 1; -+ int rv; -+ -+ if (av_rpi_zc_in_use(avctx)) -+ { -+ const AVZcEnvPtr zc = avctx->opaque; -+ av_rpi_zc_set_decoder_pool_size(zc, pool_req); -+ rv = av_rpi_zc_get_buffer(zc, frame); // get_buffer2 would alloc -+ } -+ else -+ { -+ if (rpi->zc == NULL) { -+ pthread_mutex_lock(&rpi->phase_lock); // Abuse - not worth creating a lock just for this -+ // Alloc inside lock to make sure we only ever alloc one -+ if (rpi->zc == NULL) { -+ rpi->zc = av_rpi_zc_int_env_alloc(s); -+ } -+ pthread_mutex_unlock(&rpi->phase_lock); -+ } -+ av_rpi_zc_set_decoder_pool_size(rpi->zc, pool_req); // Ignored by local allocator, but set anyway :-) -+ rv = (rpi->zc == NULL) ? AVERROR(ENOMEM) : -+ av_rpi_zc_get_buffer(rpi->zc, frame); -+ } -+ -+ if (rv == 0 && -+ (rv = ff_attach_decode_data(frame)) < 0) -+ { -+ av_frame_unref(frame); -+ } -+ -+ if (rv == 0) -+ { -+ FrameDecodeData *fdd = (FrameDecodeData*)frame->private_ref->data; -+ fdd->post_process = rpivid_retrieve_data; -+ } -+ -+ return rv; -+} -+ -+#if OPT_PHASE_TIMING -+static void log_bin_phase(AVCodecContext * const avctx, const unsigned int * const bins) -+{ -+ av_log(avctx, AV_LOG_INFO, "%7d %7d %7d %7d %7d %7d %7d %7d %7d\n", -+ bins[0], bins[1], bins[2], bins[3], -+ bins[4], bins[5], bins[6], bins[7], bins[8]); -+} -+#endif -+ -+////////////////////////////////////////////////////////////////////////////// -+ -+static int rpi_hevc_free(AVCodecContext *avctx) { -+ RPI_T * const rpi = avctx->internal->hwaccel_priv_data; -+ -+#if TRACE_ENTRY -+ printf("<<< %s\n", __func__); -+#endif -+ -+ dec_env_release(rpi, NULL); -+ -+ // Wait for everything else to stop -+ { -+ struct timespec tt; -+ clock_gettime(CLOCK_REALTIME, &tt); -+ tt.tv_sec += 2; -+ while (sem_timedwait(&rpi->ref_zero, &tt) == -1) { -+ const int err = errno; -+ if (err == ETIMEDOUT) { -+ av_log(avctx, AV_LOG_FATAL, "Rpivid worker threads still running\n"); -+ return -1; -+ } -+ if (err != EINTR) { -+ av_log(avctx, AV_LOG_ERROR, "Unexpected error %d waiting for work thread to stop\n", err); -+ break; -+ } -+ } -+ } -+ -+#if OPT_PHASE_TIMING -+ { -+ unsigned int i; -+ for (i = 0; i != RPIVID_PHASES; ++i) { -+ const phase_wait_env_t * const p = rpi->phase_reqs + i; -+ av_log(avctx, AV_LOG_INFO, "Phase %u: In %3u.%06u, Out %3u.%06u\n", i, -+ (unsigned int)(p->time_in_phase / 1000000), (unsigned int)(p->time_in_phase % 1000000), -+ (unsigned int)(p->time_out_phase / 1000000), (unsigned int)(p->time_out_phase % 1000000)); -+ av_log(avctx, AV_LOG_INFO, "%7d %7d %7d %7d %7d %7d %7d %7d >\n", -+ time_thresholds[0], time_thresholds[1], time_thresholds[2], time_thresholds[3], -+ time_thresholds[4], time_thresholds[5], time_thresholds[6], time_thresholds[7]); -+ log_bin_phase(avctx, p->time_bins); -+ log_bin_phase(avctx, p->time_bins3); -+ log_bin_phase(avctx, p->time_bins5); -+ av_log(avctx, AV_LOG_INFO, "Longest duraction: %ums @ frame %u\n", -+ (unsigned int)(p->max_phase_time / 1000), -+ p->max_time_decode_order); -+ } -+ av_log(avctx, AV_LOG_INFO, "PU max=%d\n", rpi->max_pu_msgs); -+ } -+#endif -+ -+ if (rpi->dec_envs != NULL) -+ { -+ for (int i; i < avctx->thread_count && rpi->dec_envs[i] != NULL; ++i) { -+ dec_env_delete(rpi->dec_envs[i]); -+ } -+ av_freep(&rpi->dec_envs); -+ } -+ -+ av_rpi_zc_int_env_freep(&rpi->zc); -+ -+ gpu_free(&rpi->gcolbuf); -+ -+ for (unsigned int i = 0; i != RPIVID_BITBUFS; ++i) { -+ gpu_free(rpi->gbitbufs + i); -+ } -+ for (unsigned int i = 0; i != RPIVID_COEFFBUFS; ++i) { -+ gpu_free(rpi->gcoeffbufs + i); -+ } -+ -+ unmap_devp(&rpi->regs, REGS_SIZE); -+ unmap_devp(&rpi->ints, INTS_SIZE); -+ -+ if (rpi->gpu_init_type > 0) -+ rpi_mem_gpu_uninit(); -+ -+ if (rpi->mbox_fd >= 0) { -+ mbox_release_clock(rpi->mbox_fd); -+ mbox_close(rpi->mbox_fd); -+ } -+ -+ sem_destroy(&rpi->ref_zero); -+ sem_destroy(&rpi->coeffbuf_sem); -+ sem_destroy(&rpi->bitbuf_sem); -+ -+#if TRACE_ENTRY -+ printf(">>> %s\n", __func__); -+#endif -+ return 0; -+} -+ -+////////////////////////////////////////////////////////////////////////////// -+ -+static int rpi_hevc_init(AVCodecContext *avctx) { -+ RPI_T * const rpi = avctx->internal->hwaccel_priv_data; -+// const char *err; -+ -+#if TRACE_ENTRY -+ printf("<<< %s\n", __func__); -+#endif -+ -+ if (avctx->width>4096 || avctx->height>4096) { -+ av_log(NULL, AV_LOG_FATAL, "Picture size %dx%d exceeds 4096x4096 maximum for HWAccel\n", avctx->width, avctx->height); -+ return AVERROR(ENOTSUP); -+ } -+ -+ memset(rpi, 0, sizeof(*rpi)); -+ -+ rpi->mbox_fd = -1; -+ rpi->decode_order = 0; -+ -+ // Initial PU/COEFF stream buffer split chosen as worst case seen so far -+ rpi->max_pu_msgs = 768; // 7.2 says at most 1611 messages per CTU -+ -+ -+ atomic_store(&rpi->ref_count, 1); -+ sem_init(&rpi->ref_zero, 0, 0); -+ -+ sem_init(&rpi->bitbuf_sem, 0, RPIVID_BITBUFS); -+ sem_init(&rpi->coeffbuf_sem, 0, RPIVID_COEFFBUFS); -+ -+ pthread_mutex_init(&rpi->phase_lock, NULL); -+ -+ if ((rpi->mbox_fd = mbox_open()) < 0) -+ { -+ av_log(avctx, AV_LOG_ERROR, "Failed to open mailbox\n"); -+ goto fail; -+ } -+ mbox_request_clock(rpi->mbox_fd); -+ -+ if ((rpi->regs = map_dev(avctx, REGS_NAME, REGS_SIZE)) == NULL || -+ (rpi->ints = map_dev(avctx, INTS_NAME, INTS_SIZE)) == NULL) { -+ av_log(avctx, AV_LOG_ERROR, "Failed to open rpivid devices\n"); -+ goto fail; -+ } -+ -+ if ((rpi->gpu_init_type = rpi_mem_gpu_init(0)) < 0) { -+ av_log(avctx, AV_LOG_ERROR, "Failed to init GPU\n"); -+ goto fail; -+ } -+ -+ if ((rpi->dec_envs = av_mallocz(sizeof(dec_env_t *) * avctx->thread_count)) == NULL) { -+ av_log(avctx, AV_LOG_ERROR, "Failed to alloc %d dec envs\n", avctx->thread_count); -+ goto fail; -+ } -+ -+ rpi->col_stride = rnd64(avctx->width); -+ rpi->col_picsize = rpi->col_stride * (((avctx->height + 63) & ~63) >> 4); -+ if (gpu_malloc_uncached(rpi->col_picsize * RPIVID_COL_PICS, &rpi->gcolbuf) != 0) -+ { -+ av_log(avctx, AV_LOG_ERROR, "Failed to allocate col mv buffer\n"); -+ goto fail; -+ } -+ -+ for (unsigned int i = 0; i != RPIVID_BITBUFS; ++i) { -+ if (gpu_malloc_uncached(RPIVID_BITBUF_SIZE, rpi->gbitbufs + i) != 0) -+ { -+ av_log(avctx, AV_LOG_ERROR, "Failed to allocate bitbuf %d\n", i); -+ goto fail; -+ } -+ } -+ -+ for (unsigned int i = 0; i != RPIVID_COEFFBUFS; ++i) { -+ if (gpu_malloc_uncached(RPIVID_COEFFBUF_SIZE, rpi->gcoeffbufs + i) != 0) -+ { -+ av_log(avctx, AV_LOG_ERROR, "Failed to allocate coeffbuf %d\n", i); -+ goto fail; -+ } -+ } -+ -+ av_log(avctx, AV_LOG_INFO, "RPI HEVC h/w accel init OK\n"); -+ -+ return 0; -+ -+fail: -+ rpi_hevc_free(avctx); -+ return AVERROR_EXTERNAL; -+} -+ -+////////////////////////////////////////////////////////////////////////////// -+ -+const AVHWAccel ff_hevc_rpi4_8_hwaccel = { -+ .name = "hevc_rpi4_8", -+ .type = AVMEDIA_TYPE_VIDEO, -+ .id = AV_CODEC_ID_HEVC, -+ .pix_fmt = AV_PIX_FMT_RPI4_8, -+ .alloc_frame = rpivid_hevc_alloc_frame, -+ .start_frame = rpi_hevc_start_frame, -+ .end_frame = rpi_hevc_end_frame, -+ .abort_frame = rpi_hevc_abort_frame, -+ .decode_slice = rpi_hevc_decode_slice, -+ .init = rpi_hevc_init, -+ .uninit = rpi_hevc_free, -+ .priv_data_size = sizeof(RPI_T), -+ .caps_internal = HWACCEL_CAP_ASYNC_SAFE | HWACCEL_CAP_MT_SAFE, -+}; -+ -+const AVHWAccel ff_hevc_rpi4_10_hwaccel = { -+ .name = "hevc_rpi4_10", -+ .type = AVMEDIA_TYPE_VIDEO, -+ .id = AV_CODEC_ID_HEVC, -+ .pix_fmt = AV_PIX_FMT_RPI4_10, -+ .alloc_frame = rpivid_hevc_alloc_frame, -+ .start_frame = rpi_hevc_start_frame, -+ .end_frame = rpi_hevc_end_frame, -+ .abort_frame = rpi_hevc_abort_frame, -+ .decode_slice = rpi_hevc_decode_slice, -+ .init = rpi_hevc_init, -+ .uninit = rpi_hevc_free, -+ .priv_data_size = sizeof(RPI_T), -+ .caps_internal = HWACCEL_CAP_ASYNC_SAFE | HWACCEL_CAP_MT_SAFE, -+}; -+ ---- a/libavcodec/v4l2_buffers.c -+++ b/libavcodec/v4l2_buffers.c -@@ -21,6 +21,7 @@ - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -+#include - #include - #include - #include -@@ -29,57 +30,82 @@ - #include - #include "libavcodec/avcodec.h" - #include "libavcodec/internal.h" -+#include "libavutil/avassert.h" - #include "libavutil/pixdesc.h" -+#include "libavutil/hwcontext.h" - #include "v4l2_context.h" - #include "v4l2_buffers.h" - #include "v4l2_m2m.h" -+#include "weak_link.h" - - #define USEC_PER_SEC 1000000 --static AVRational v4l2_timebase = { 1, USEC_PER_SEC }; -+static const AVRational v4l2_timebase = { 1, USEC_PER_SEC }; - --static inline V4L2m2mContext *buf_to_m2mctx(V4L2Buffer *buf) -+static inline V4L2m2mContext *buf_to_m2mctx(const V4L2Buffer * const buf) - { - return V4L2_TYPE_IS_OUTPUT(buf->context->type) ? - container_of(buf->context, V4L2m2mContext, output) : - container_of(buf->context, V4L2m2mContext, capture); - } - --static inline AVCodecContext *logger(V4L2Buffer *buf) -+static inline AVCodecContext *logger(const V4L2Buffer * const buf) - { - return buf_to_m2mctx(buf)->avctx; - } - --static inline AVRational v4l2_get_timebase(V4L2Buffer *avbuf) -+static inline AVRational v4l2_get_timebase(const V4L2Buffer * const avbuf) - { -- V4L2m2mContext *s = buf_to_m2mctx(avbuf); -- -- if (s->avctx->pkt_timebase.num) -- return s->avctx->pkt_timebase; -- return s->avctx->time_base; -+ const V4L2m2mContext *s = buf_to_m2mctx(avbuf); -+ const AVRational tb = s->avctx->pkt_timebase.num ? -+ s->avctx->pkt_timebase : -+ s->avctx->time_base; -+ return tb.num && tb.den ? tb : v4l2_timebase; - } - --static inline void v4l2_set_pts(V4L2Buffer *out, int64_t pts) -+static inline struct timeval tv_from_int(const int64_t t) - { -- int64_t v4l2_pts; -+ return (struct timeval){ -+ .tv_usec = t % USEC_PER_SEC, -+ .tv_sec = t / USEC_PER_SEC -+ }; -+} - -- if (pts == AV_NOPTS_VALUE) -- pts = 0; -+static inline int64_t int_from_tv(const struct timeval t) -+{ -+ return (int64_t)t.tv_sec * USEC_PER_SEC + t.tv_usec; -+} - -+static inline void v4l2_set_pts(V4L2Buffer * const out, const int64_t pts) -+{ - /* convert pts to v4l2 timebase */ -- v4l2_pts = av_rescale_q(pts, v4l2_get_timebase(out), v4l2_timebase); -- out->buf.timestamp.tv_usec = v4l2_pts % USEC_PER_SEC; -- out->buf.timestamp.tv_sec = v4l2_pts / USEC_PER_SEC; -+ const int64_t v4l2_pts = -+ pts == AV_NOPTS_VALUE ? 0 : -+ av_rescale_q(pts, v4l2_get_timebase(out), v4l2_timebase); -+ out->buf.timestamp = tv_from_int(v4l2_pts); - } - --static inline int64_t v4l2_get_pts(V4L2Buffer *avbuf) -+static inline int64_t v4l2_get_pts(const V4L2Buffer * const avbuf) - { -- int64_t v4l2_pts; -- -+ const int64_t v4l2_pts = int_from_tv(avbuf->buf.timestamp); -+ return v4l2_pts != 0 ? v4l2_pts : AV_NOPTS_VALUE; -+#if 0 - /* convert pts back to encoder timebase */ -- v4l2_pts = (int64_t)avbuf->buf.timestamp.tv_sec * USEC_PER_SEC + -- avbuf->buf.timestamp.tv_usec; -+ return -+ avbuf->context->no_pts_rescale ? v4l2_pts : -+ v4l2_pts == 0 ? AV_NOPTS_VALUE : -+ av_rescale_q(v4l2_pts, v4l2_timebase, v4l2_get_timebase(avbuf)); -+#endif -+} - -- return av_rescale_q(v4l2_pts, v4l2_timebase, v4l2_get_timebase(avbuf)); -+static void set_buf_length(V4L2Buffer *out, unsigned int plane, uint32_t bytesused, uint32_t length) -+{ -+ if (V4L2_TYPE_IS_MULTIPLANAR(out->buf.type)) { -+ out->planes[plane].bytesused = bytesused; -+ out->planes[plane].length = length; -+ } else { -+ out->buf.bytesused = bytesused; -+ out->buf.length = length; -+ } - } - - static enum AVColorPrimaries v4l2_get_color_primaries(V4L2Buffer *buf) -@@ -116,49 +142,176 @@ static enum AVColorPrimaries v4l2_get_co - return AVCOL_PRI_UNSPECIFIED; - } - --static enum AVColorRange v4l2_get_color_range(V4L2Buffer *buf) --{ -- enum v4l2_quantization qt; -+static void v4l2_set_color(V4L2Buffer *buf, -+ const enum AVColorPrimaries avcp, -+ const enum AVColorSpace avcs, -+ const enum AVColorTransferCharacteristic avxc) -+{ -+ enum v4l2_ycbcr_encoding ycbcr = V4L2_YCBCR_ENC_DEFAULT; -+ enum v4l2_colorspace cs = V4L2_COLORSPACE_DEFAULT; -+ enum v4l2_xfer_func xfer = V4L2_XFER_FUNC_DEFAULT; -+ -+ switch (avcp) { -+ case AVCOL_PRI_BT709: -+ cs = V4L2_COLORSPACE_REC709; -+ ycbcr = V4L2_YCBCR_ENC_709; -+ break; -+ case AVCOL_PRI_BT470M: -+ cs = V4L2_COLORSPACE_470_SYSTEM_M; -+ ycbcr = V4L2_YCBCR_ENC_601; -+ break; -+ case AVCOL_PRI_BT470BG: -+ cs = V4L2_COLORSPACE_470_SYSTEM_BG; -+ break; -+ case AVCOL_PRI_SMPTE170M: -+ cs = V4L2_COLORSPACE_SMPTE170M; -+ break; -+ case AVCOL_PRI_SMPTE240M: -+ cs = V4L2_COLORSPACE_SMPTE240M; -+ break; -+ case AVCOL_PRI_BT2020: -+ cs = V4L2_COLORSPACE_BT2020; -+ break; -+ case AVCOL_PRI_SMPTE428: -+ case AVCOL_PRI_SMPTE431: -+ case AVCOL_PRI_SMPTE432: -+ case AVCOL_PRI_EBU3213: -+ case AVCOL_PRI_RESERVED: -+ case AVCOL_PRI_FILM: -+ case AVCOL_PRI_UNSPECIFIED: -+ default: -+ break; -+ } - -- qt = V4L2_TYPE_IS_MULTIPLANAR(buf->buf.type) ? -- buf->context->format.fmt.pix_mp.quantization : -- buf->context->format.fmt.pix.quantization; -+ switch (avcs) { -+ case AVCOL_SPC_RGB: -+ cs = V4L2_COLORSPACE_SRGB; -+ break; -+ case AVCOL_SPC_BT709: -+ cs = V4L2_COLORSPACE_REC709; -+ break; -+ case AVCOL_SPC_FCC: -+ cs = V4L2_COLORSPACE_470_SYSTEM_M; -+ break; -+ case AVCOL_SPC_BT470BG: -+ cs = V4L2_COLORSPACE_470_SYSTEM_BG; -+ break; -+ case AVCOL_SPC_SMPTE170M: -+ cs = V4L2_COLORSPACE_SMPTE170M; -+ break; -+ case AVCOL_SPC_SMPTE240M: -+ cs = V4L2_COLORSPACE_SMPTE240M; -+ break; -+ case AVCOL_SPC_BT2020_CL: -+ cs = V4L2_COLORSPACE_BT2020; -+ ycbcr = V4L2_YCBCR_ENC_BT2020_CONST_LUM; -+ break; -+ case AVCOL_SPC_BT2020_NCL: -+ cs = V4L2_COLORSPACE_BT2020; -+ break; -+ default: -+ break; -+ } - -- switch (qt) { -- case V4L2_QUANTIZATION_LIM_RANGE: return AVCOL_RANGE_MPEG; -- case V4L2_QUANTIZATION_FULL_RANGE: return AVCOL_RANGE_JPEG; -+ switch (xfer) { -+ case AVCOL_TRC_BT709: -+ xfer = V4L2_XFER_FUNC_709; -+ break; -+ case AVCOL_TRC_IEC61966_2_1: -+ xfer = V4L2_XFER_FUNC_SRGB; -+ break; -+ case AVCOL_TRC_SMPTE240M: -+ xfer = V4L2_XFER_FUNC_SMPTE240M; -+ break; -+ case AVCOL_TRC_SMPTE2084: -+ xfer = V4L2_XFER_FUNC_SMPTE2084; -+ break; - default: - break; - } - -- return AVCOL_RANGE_UNSPECIFIED; -+ if (V4L2_TYPE_IS_MULTIPLANAR(buf->buf.type)) { -+ buf->context->format.fmt.pix_mp.colorspace = cs; -+ buf->context->format.fmt.pix_mp.ycbcr_enc = ycbcr; -+ buf->context->format.fmt.pix_mp.xfer_func = xfer; -+ } else { -+ buf->context->format.fmt.pix.colorspace = cs; -+ buf->context->format.fmt.pix.ycbcr_enc = ycbcr; -+ buf->context->format.fmt.pix.xfer_func = xfer; -+ } - } - --static enum AVColorSpace v4l2_get_color_space(V4L2Buffer *buf) -+static inline enum v4l2_quantization -+buf_quantization(const V4L2Buffer * const buf) - { -- enum v4l2_ycbcr_encoding ycbcr; -- enum v4l2_colorspace cs; -+ return V4L2_TYPE_IS_MULTIPLANAR(buf->buf.type) ? -+ buf->context->format.fmt.pix_mp.quantization : -+ buf->context->format.fmt.pix.quantization; -+} - -- cs = V4L2_TYPE_IS_MULTIPLANAR(buf->buf.type) ? -+static inline enum v4l2_colorspace -+buf_colorspace(const V4L2Buffer * const buf) -+{ -+ return V4L2_TYPE_IS_MULTIPLANAR(buf->buf.type) ? - buf->context->format.fmt.pix_mp.colorspace : - buf->context->format.fmt.pix.colorspace; -+} - -- ycbcr = V4L2_TYPE_IS_MULTIPLANAR(buf->buf.type) ? -+static inline enum v4l2_ycbcr_encoding -+buf_ycbcr_enc(const V4L2Buffer * const buf) -+{ -+ return V4L2_TYPE_IS_MULTIPLANAR(buf->buf.type) ? - buf->context->format.fmt.pix_mp.ycbcr_enc: - buf->context->format.fmt.pix.ycbcr_enc; -+} - -- switch(cs) { -- case V4L2_COLORSPACE_SRGB: return AVCOL_SPC_RGB; -+static enum AVColorRange v4l2_get_color_range(V4L2Buffer *buf) -+{ -+ switch (buf_quantization(buf)) { -+ case V4L2_QUANTIZATION_LIM_RANGE: -+ return AVCOL_RANGE_MPEG; -+ case V4L2_QUANTIZATION_FULL_RANGE: -+ return AVCOL_RANGE_JPEG; -+ case V4L2_QUANTIZATION_DEFAULT: -+ // If YUV (which we assume for all video decode) then, from the header -+ // comments, range is limited unless CS is JPEG -+ return buf_colorspace(buf) == V4L2_COLORSPACE_JPEG ? -+ AVCOL_RANGE_JPEG : AVCOL_RANGE_MPEG; -+ default: -+ break; -+ } -+ -+ return AVCOL_RANGE_UNSPECIFIED; -+} -+ -+static void v4l2_set_color_range(V4L2Buffer *buf, const enum AVColorRange avcr) -+{ -+ const enum v4l2_quantization q = -+ avcr == AVCOL_RANGE_MPEG ? V4L2_QUANTIZATION_LIM_RANGE : -+ avcr == AVCOL_RANGE_JPEG ? V4L2_QUANTIZATION_FULL_RANGE : -+ V4L2_QUANTIZATION_DEFAULT; -+ -+ if (V4L2_TYPE_IS_MULTIPLANAR(buf->buf.type)) { -+ buf->context->format.fmt.pix_mp.quantization = q; -+ } else { -+ buf->context->format.fmt.pix.quantization = q; -+ } -+} -+ -+static enum AVColorSpace v4l2_get_color_space(V4L2Buffer *buf) -+{ -+ switch (buf_colorspace(buf)) { -+ case V4L2_COLORSPACE_JPEG: // JPEG -> SRGB -+ case V4L2_COLORSPACE_SRGB: -+ return AVCOL_SPC_RGB; - case V4L2_COLORSPACE_REC709: return AVCOL_SPC_BT709; - case V4L2_COLORSPACE_470_SYSTEM_M: return AVCOL_SPC_FCC; - case V4L2_COLORSPACE_470_SYSTEM_BG: return AVCOL_SPC_BT470BG; - case V4L2_COLORSPACE_SMPTE170M: return AVCOL_SPC_SMPTE170M; - case V4L2_COLORSPACE_SMPTE240M: return AVCOL_SPC_SMPTE240M; - case V4L2_COLORSPACE_BT2020: -- if (ycbcr == V4L2_YCBCR_ENC_BT2020_CONST_LUM) -- return AVCOL_SPC_BT2020_CL; -- else -- return AVCOL_SPC_BT2020_NCL; -+ return buf_ycbcr_enc(buf) == V4L2_YCBCR_ENC_BT2020_CONST_LUM ? -+ AVCOL_SPC_BT2020_CL : AVCOL_SPC_BT2020_NCL; - default: - break; - } -@@ -168,17 +321,9 @@ static enum AVColorSpace v4l2_get_color_ - - static enum AVColorTransferCharacteristic v4l2_get_color_trc(V4L2Buffer *buf) - { -- enum v4l2_ycbcr_encoding ycbcr; -+ const enum v4l2_ycbcr_encoding ycbcr = buf_ycbcr_enc(buf); - enum v4l2_xfer_func xfer; -- enum v4l2_colorspace cs; -- -- cs = V4L2_TYPE_IS_MULTIPLANAR(buf->buf.type) ? -- buf->context->format.fmt.pix_mp.colorspace : -- buf->context->format.fmt.pix.colorspace; -- -- ycbcr = V4L2_TYPE_IS_MULTIPLANAR(buf->buf.type) ? -- buf->context->format.fmt.pix_mp.ycbcr_enc: -- buf->context->format.fmt.pix.ycbcr_enc; -+ const enum v4l2_colorspace cs = buf_colorspace(buf); - - xfer = V4L2_TYPE_IS_MULTIPLANAR(buf->buf.type) ? - buf->context->format.fmt.pix_mp.xfer_func: -@@ -210,73 +355,165 @@ static enum AVColorTransferCharacteristi - return AVCOL_TRC_UNSPECIFIED; - } - --static void v4l2_free_buffer(void *opaque, uint8_t *unused) -+static int v4l2_buf_is_interlaced(const V4L2Buffer * const buf) - { -- V4L2Buffer* avbuf = opaque; -- V4L2m2mContext *s = buf_to_m2mctx(avbuf); -- -- if (atomic_fetch_sub(&avbuf->context_refcount, 1) == 1) { -- atomic_fetch_sub_explicit(&s->refcount, 1, memory_order_acq_rel); -+ return V4L2_FIELD_IS_INTERLACED(buf->buf.field); -+} - -- if (s->reinit) { -- if (!atomic_load(&s->refcount)) -- sem_post(&s->refsync); -- } else { -- if (s->draining && V4L2_TYPE_IS_OUTPUT(avbuf->context->type)) { -- /* no need to queue more buffers to the driver */ -- avbuf->status = V4L2BUF_AVAILABLE; -- } -- else if (avbuf->context->streamon) -- ff_v4l2_buffer_enqueue(avbuf); -- } -+static int v4l2_buf_is_top_first(const V4L2Buffer * const buf) -+{ -+ return buf->buf.field == V4L2_FIELD_INTERLACED_TB; -+} - -- av_buffer_unref(&avbuf->context_ref); -- } -+static void v4l2_set_interlace(V4L2Buffer * const buf, const int is_interlaced, const int is_tff) -+{ -+ buf->buf.field = !is_interlaced ? V4L2_FIELD_NONE : -+ is_tff ? V4L2_FIELD_INTERLACED_TB : V4L2_FIELD_INTERLACED_BT; - } - --static int v4l2_buf_increase_ref(V4L2Buffer *in) -+static uint8_t * v4l2_get_drm_frame(V4L2Buffer *avbuf) - { -- V4L2m2mContext *s = buf_to_m2mctx(in); -+ AVDRMFrameDescriptor *drm_desc = &avbuf->drm_frame; -+ AVDRMLayerDescriptor *layer; - -- if (in->context_ref) -- atomic_fetch_add(&in->context_refcount, 1); -- else { -- in->context_ref = av_buffer_ref(s->self_ref); -- if (!in->context_ref) -- return AVERROR(ENOMEM); -+ /* fill the DRM frame descriptor */ -+ drm_desc->nb_objects = avbuf->num_planes; -+ drm_desc->nb_layers = 1; - -- in->context_refcount = 1; -+ layer = &drm_desc->layers[0]; -+ layer->nb_planes = avbuf->num_planes; -+ -+ for (int i = 0; i < avbuf->num_planes; i++) { -+ layer->planes[i].object_index = i; -+ layer->planes[i].offset = 0; -+ layer->planes[i].pitch = avbuf->plane_info[i].bytesperline; - } - -- in->status = V4L2BUF_RET_USER; -- atomic_fetch_add_explicit(&s->refcount, 1, memory_order_relaxed); -+ switch (avbuf->context->av_pix_fmt) { -+ case AV_PIX_FMT_YUYV422: -+ -+ layer->format = DRM_FORMAT_YUYV; -+ layer->nb_planes = 1; - -- return 0; -+ break; -+ -+ case AV_PIX_FMT_NV12: -+ case AV_PIX_FMT_NV21: -+ -+ layer->format = avbuf->context->av_pix_fmt == AV_PIX_FMT_NV12 ? -+ DRM_FORMAT_NV12 : DRM_FORMAT_NV21; -+ -+ if (avbuf->num_planes > 1) -+ break; -+ -+ layer->nb_planes = 2; -+ -+ layer->planes[1].object_index = 0; -+ layer->planes[1].offset = avbuf->plane_info[0].bytesperline * -+ avbuf->context->format.fmt.pix.height; -+ layer->planes[1].pitch = avbuf->plane_info[0].bytesperline; -+ break; -+ -+ case AV_PIX_FMT_YUV420P: -+ -+ layer->format = DRM_FORMAT_YUV420; -+ -+ if (avbuf->num_planes > 1) -+ break; -+ -+ layer->nb_planes = 3; -+ -+ layer->planes[1].object_index = 0; -+ layer->planes[1].offset = avbuf->plane_info[0].bytesperline * -+ avbuf->context->format.fmt.pix.height; -+ layer->planes[1].pitch = avbuf->plane_info[0].bytesperline >> 1; -+ -+ layer->planes[2].object_index = 0; -+ layer->planes[2].offset = layer->planes[1].offset + -+ ((avbuf->plane_info[0].bytesperline * -+ avbuf->context->format.fmt.pix.height) >> 2); -+ layer->planes[2].pitch = avbuf->plane_info[0].bytesperline >> 1; -+ break; -+ -+ default: -+ drm_desc->nb_layers = 0; -+ break; -+ } -+ -+ return (uint8_t *) drm_desc; - } - --static int v4l2_buf_to_bufref(V4L2Buffer *in, int plane, AVBufferRef **buf) -+static void v4l2_free_bufref(void *opaque, uint8_t *data) - { -- int ret; -+ AVBufferRef * bufref = (AVBufferRef *)data; -+ V4L2Buffer *avbuf = (V4L2Buffer *)bufref->data; -+ struct V4L2Context *ctx = ff_weak_link_lock(&avbuf->context_wl); - -- if (plane >= in->num_planes) -- return AVERROR(EINVAL); -+ if (ctx != NULL) { -+ // Buffer still attached to context -+ V4L2m2mContext *s = buf_to_m2mctx(avbuf); - -- /* even though most encoders return 0 in data_offset encoding vp8 does require this value */ -- *buf = av_buffer_create((char *)in->plane_info[plane].mm_addr + in->planes[plane].data_offset, -- in->plane_info[plane].length, v4l2_free_buffer, in, 0); -- if (!*buf) -- return AVERROR(ENOMEM); -+ ff_mutex_lock(&ctx->lock); - -- ret = v4l2_buf_increase_ref(in); -- if (ret) -- av_buffer_unref(buf); -+ ff_v4l2_buffer_set_avail(avbuf); - -- return ret; -+ if (s->draining && V4L2_TYPE_IS_OUTPUT(ctx->type)) { -+ av_log(logger(avbuf), AV_LOG_DEBUG, "%s: Buffer avail\n", ctx->name); -+ /* no need to queue more buffers to the driver */ -+ } -+ else if (ctx->streamon) { -+ av_log(logger(avbuf), AV_LOG_DEBUG, "%s: Buffer requeue\n", ctx->name); -+ avbuf->buf.timestamp.tv_sec = 0; -+ avbuf->buf.timestamp.tv_usec = 0; -+ ff_v4l2_buffer_enqueue(avbuf); // will set to IN_DRIVER -+ } -+ else { -+ av_log(logger(avbuf), AV_LOG_DEBUG, "%s: Buffer freed but streamoff\n", ctx->name); -+ } -+ -+ ff_mutex_unlock(&ctx->lock); -+ } -+ -+ ff_weak_link_unlock(avbuf->context_wl); -+ av_buffer_unref(&bufref); - } - --static int v4l2_bufref_to_buf(V4L2Buffer *out, int plane, const uint8_t* data, int size, int offset, AVBufferRef* bref) -+static int v4l2_buffer_export_drm(V4L2Buffer* avbuf) -+{ -+ struct v4l2_exportbuffer expbuf; -+ int i, ret; -+ -+ for (i = 0; i < avbuf->num_planes; i++) { -+ memset(&expbuf, 0, sizeof(expbuf)); -+ -+ expbuf.index = avbuf->buf.index; -+ expbuf.type = avbuf->buf.type; -+ expbuf.plane = i; -+ -+ ret = ioctl(buf_to_m2mctx(avbuf)->fd, VIDIOC_EXPBUF, &expbuf); -+ if (ret < 0) -+ return AVERROR(errno); -+ -+ if (V4L2_TYPE_IS_MULTIPLANAR(avbuf->buf.type)) { -+ /* drm frame */ -+ avbuf->drm_frame.objects[i].size = avbuf->buf.m.planes[i].length; -+ avbuf->drm_frame.objects[i].fd = expbuf.fd; -+ avbuf->drm_frame.objects[i].format_modifier = DRM_FORMAT_MOD_LINEAR; -+ } else { -+ /* drm frame */ -+ avbuf->drm_frame.objects[0].size = avbuf->buf.length; -+ avbuf->drm_frame.objects[0].fd = expbuf.fd; -+ avbuf->drm_frame.objects[0].format_modifier = DRM_FORMAT_MOD_LINEAR; -+ } -+ } -+ -+ return 0; -+} -+ -+static int v4l2_bufref_to_buf(V4L2Buffer *out, int plane, const uint8_t* data, int size, int offset) - { - unsigned int bytesused, length; -+ int rv = 0; - - if (plane >= out->num_planes) - return AVERROR(EINVAL); -@@ -284,32 +521,57 @@ static int v4l2_bufref_to_buf(V4L2Buffer - length = out->plane_info[plane].length; - bytesused = FFMIN(size+offset, length); - -- memcpy((uint8_t*)out->plane_info[plane].mm_addr+offset, data, FFMIN(size, length-offset)); -- -- if (V4L2_TYPE_IS_MULTIPLANAR(out->buf.type)) { -- out->planes[plane].bytesused = bytesused; -- out->planes[plane].length = length; -- } else { -- out->buf.bytesused = bytesused; -- out->buf.length = length; -+ if (size > length - offset) { -+ size = length - offset; -+ rv = AVERROR(ENOMEM); - } - -- return 0; -+ memcpy((uint8_t*)out->plane_info[plane].mm_addr+offset, data, size); -+ -+ set_buf_length(out, plane, bytesused, length); -+ -+ return rv; -+} -+ -+static AVBufferRef * wrap_avbuf(V4L2Buffer * const avbuf) -+{ -+ AVBufferRef * bufref = av_buffer_ref(avbuf->context->bufrefs[avbuf->buf.index]); -+ AVBufferRef * newbuf; -+ -+ if (!bufref) -+ return NULL; -+ -+ newbuf = av_buffer_create((uint8_t *)bufref, sizeof(*bufref), v4l2_free_bufref, NULL, 0); -+ if (newbuf == NULL) -+ av_buffer_unref(&bufref); -+ -+ avbuf->status = V4L2BUF_RET_USER; -+ return newbuf; - } - - static int v4l2_buffer_buf_to_swframe(AVFrame *frame, V4L2Buffer *avbuf) - { -- int i, ret; -+ int i; - - frame->format = avbuf->context->av_pix_fmt; - -- for (i = 0; i < avbuf->num_planes; i++) { -- ret = v4l2_buf_to_bufref(avbuf, i, &frame->buf[i]); -- if (ret) -- return ret; -+ frame->buf[0] = wrap_avbuf(avbuf); -+ if (frame->buf[0] == NULL) -+ return AVERROR(ENOMEM); -+ -+ if (buf_to_m2mctx(avbuf)->output_drm) { -+ /* 1. get references to the actual data */ -+ frame->data[0] = (uint8_t *) v4l2_get_drm_frame(avbuf); -+ frame->format = AV_PIX_FMT_DRM_PRIME; -+ frame->hw_frames_ctx = av_buffer_ref(avbuf->context->frames_ref); -+ return 0; -+ } - -+ -+ /* 1. get references to the actual data */ -+ for (i = 0; i < avbuf->num_planes; i++) { -+ frame->data[i] = (uint8_t *)avbuf->plane_info[i].mm_addr + avbuf->planes[i].data_offset; - frame->linesize[i] = avbuf->plane_info[i].bytesperline; -- frame->data[i] = frame->buf[i]->data; - } - - /* fixup special cases */ -@@ -318,17 +580,17 @@ static int v4l2_buffer_buf_to_swframe(AV - case AV_PIX_FMT_NV21: - if (avbuf->num_planes > 1) - break; -- frame->linesize[1] = avbuf->plane_info[0].bytesperline; -- frame->data[1] = frame->buf[0]->data + avbuf->plane_info[0].bytesperline * avbuf->context->format.fmt.pix_mp.height; -+ frame->linesize[1] = frame->linesize[0]; -+ frame->data[1] = frame->data[0] + frame->linesize[0] * ff_v4l2_get_format_height(&avbuf->context->format); - break; - - case AV_PIX_FMT_YUV420P: - if (avbuf->num_planes > 1) - break; -- frame->linesize[1] = avbuf->plane_info[0].bytesperline >> 1; -- frame->linesize[2] = avbuf->plane_info[0].bytesperline >> 1; -- frame->data[1] = frame->buf[0]->data + avbuf->plane_info[0].bytesperline * avbuf->context->format.fmt.pix_mp.height; -- frame->data[2] = frame->data[1] + ((avbuf->plane_info[0].bytesperline * avbuf->context->format.fmt.pix_mp.height) >> 2); -+ frame->linesize[1] = frame->linesize[0] / 2; -+ frame->linesize[2] = frame->linesize[1]; -+ frame->data[1] = frame->data[0] + frame->linesize[0] * ff_v4l2_get_format_height(&avbuf->context->format); -+ frame->data[2] = frame->data[1] + frame->linesize[1] * ff_v4l2_get_format_height(&avbuf->context->format) / 2; - break; - - default: -@@ -338,68 +600,127 @@ static int v4l2_buffer_buf_to_swframe(AV - return 0; - } - -+static void cpy_2d(uint8_t * dst, int dst_stride, const uint8_t * src, int src_stride, int w, int h) -+{ -+ if (dst_stride == src_stride && w + 32 >= dst_stride) { -+ memcpy(dst, src, dst_stride * h); -+ } -+ else { -+ while (--h >= 0) { -+ memcpy(dst, src, w); -+ dst += dst_stride; -+ src += src_stride; -+ } -+ } -+} -+ -+static int is_chroma(const AVPixFmtDescriptor *desc, int i, int num_planes) -+{ -+ return i != 0 && !(i == num_planes - 1 && (desc->flags & AV_PIX_FMT_FLAG_ALPHA)); -+} -+ -+static int v4l2_buffer_primeframe_to_buf(const AVFrame *frame, V4L2Buffer *out) -+{ -+ const AVDRMFrameDescriptor *const src = (const AVDRMFrameDescriptor *)frame->data[0]; -+ -+ if (frame->format != AV_PIX_FMT_DRM_PRIME || !src) -+ return AVERROR(EINVAL); -+ -+ av_assert0(out->buf.memory == V4L2_MEMORY_DMABUF); -+ -+ if (V4L2_TYPE_IS_MULTIPLANAR(out->buf.type)) { -+ // Only currently cope with single buffer types -+ if (out->buf.length != 1) -+ return AVERROR_PATCHWELCOME; -+ if (src->nb_objects != 1) -+ return AVERROR(EINVAL); -+ -+ out->planes[0].m.fd = src->objects[0].fd; -+ } -+ else { -+ if (src->nb_objects != 1) -+ return AVERROR(EINVAL); -+ -+ out->buf.m.fd = src->objects[0].fd; -+ } -+ -+ // No need to copy src AVDescriptor and if we did then we may confuse -+ // fd close on free -+ out->ref_buf = av_buffer_ref(frame->buf[0]); -+ -+ return 0; -+} -+ - static int v4l2_buffer_swframe_to_buf(const AVFrame *frame, V4L2Buffer *out) - { -- int i, ret; -- struct v4l2_format fmt = out->context->format; -- int pixel_format = V4L2_TYPE_IS_MULTIPLANAR(fmt.type) ? -- fmt.fmt.pix_mp.pixelformat : fmt.fmt.pix.pixelformat; -- int height = V4L2_TYPE_IS_MULTIPLANAR(fmt.type) ? -- fmt.fmt.pix_mp.height : fmt.fmt.pix.height; -- int is_planar_format = 0; -- -- switch (pixel_format) { -- case V4L2_PIX_FMT_YUV420M: -- case V4L2_PIX_FMT_YVU420M: --#ifdef V4L2_PIX_FMT_YUV422M -- case V4L2_PIX_FMT_YUV422M: --#endif --#ifdef V4L2_PIX_FMT_YVU422M -- case V4L2_PIX_FMT_YVU422M: --#endif --#ifdef V4L2_PIX_FMT_YUV444M -- case V4L2_PIX_FMT_YUV444M: --#endif --#ifdef V4L2_PIX_FMT_YVU444M -- case V4L2_PIX_FMT_YVU444M: --#endif -- case V4L2_PIX_FMT_NV12M: -- case V4L2_PIX_FMT_NV21M: -- case V4L2_PIX_FMT_NV12MT_16X16: -- case V4L2_PIX_FMT_NV12MT: -- case V4L2_PIX_FMT_NV16M: -- case V4L2_PIX_FMT_NV61M: -- is_planar_format = 1; -- } -- -- if (!is_planar_format) { -- const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(frame->format); -- int planes_nb = 0; -- int offset = 0; -- -- for (i = 0; i < desc->nb_components; i++) -- planes_nb = FFMAX(planes_nb, desc->comp[i].plane + 1); -- -- for (i = 0; i < planes_nb; i++) { -- int size, h = height; -- if (i == 1 || i == 2) { -+ int i; -+ int num_planes = 0; -+ int pel_strides[4] = {0}; -+ -+ const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(frame->format); -+ -+ if ((desc->flags & AV_PIX_FMT_FLAG_HWACCEL) != 0) { -+ av_log(NULL, AV_LOG_ERROR, "%s: HWACCEL cannot be copied\n", __func__); -+ return -1; -+ } -+ -+ for (i = 0; i != desc->nb_components; ++i) { -+ if (desc->comp[i].plane >= num_planes) -+ num_planes = desc->comp[i].plane + 1; -+ pel_strides[desc->comp[i].plane] = desc->comp[i].step; -+ } -+ -+ if (out->num_planes > 1) { -+ if (num_planes != out->num_planes) { -+ av_log(NULL, AV_LOG_ERROR, "%s: Num planes mismatch: %d != %d\n", __func__, num_planes, out->num_planes); -+ return -1; -+ } -+ for (i = 0; i != num_planes; ++i) { -+ int w = frame->width; -+ int h = frame->height; -+ if (is_chroma(desc, i, num_planes)) { -+ w = AV_CEIL_RSHIFT(w, desc->log2_chroma_w); - h = AV_CEIL_RSHIFT(h, desc->log2_chroma_h); - } -- size = frame->linesize[i] * h; -- ret = v4l2_bufref_to_buf(out, 0, frame->data[i], size, offset, frame->buf[i]); -- if (ret) -- return ret; -- offset += size; -+ -+ cpy_2d(out->plane_info[i].mm_addr, out->plane_info[i].bytesperline, -+ frame->data[i], frame->linesize[i], -+ w * pel_strides[i], h); -+ set_buf_length(out, i, out->plane_info[i].bytesperline * h, out->plane_info[i].length); - } -- return 0; - } -+ else -+ { -+ unsigned int offset = 0; -+ -+ for (i = 0; i != num_planes; ++i) { -+ int w = frame->width; -+ int h = frame->height; -+ int dst_stride = out->plane_info[0].bytesperline; -+ uint8_t * const dst = (uint8_t *)out->plane_info[0].mm_addr + offset; -+ -+ if (is_chroma(desc, i, num_planes)) { -+ // Is chroma -+ dst_stride >>= desc->log2_chroma_w; -+ offset += dst_stride * (out->context->height >> desc->log2_chroma_h); -+ w = AV_CEIL_RSHIFT(w, desc->log2_chroma_w); -+ h = AV_CEIL_RSHIFT(h, desc->log2_chroma_h); -+ } -+ else { -+ // Is luma or alpha -+ offset += dst_stride * out->context->height; -+ } -+ if (offset > out->plane_info[0].length) { -+ av_log(NULL, AV_LOG_ERROR, "%s: Plane total %u > buffer size %zu\n", __func__, offset, out->plane_info[0].length); -+ return -1; -+ } - -- for (i = 0; i < out->num_planes; i++) { -- ret = v4l2_bufref_to_buf(out, i, frame->buf[i]->data, frame->buf[i]->size, 0, frame->buf[i]); -- if (ret) -- return ret; -+ cpy_2d(dst, dst_stride, -+ frame->data[i], frame->linesize[i], -+ w * pel_strides[i], h); -+ } -+ set_buf_length(out, 0, offset, out->plane_info[0].length); - } -- - return 0; - } - -@@ -409,16 +730,31 @@ static int v4l2_buffer_swframe_to_buf(co - * - ******************************************************************************/ - --int ff_v4l2_buffer_avframe_to_buf(const AVFrame *frame, V4L2Buffer *out) -+int ff_v4l2_buffer_avframe_to_buf(const AVFrame *frame, V4L2Buffer *out, const int64_t track_ts) - { -- v4l2_set_pts(out, frame->pts); -- -- return v4l2_buffer_swframe_to_buf(frame, out); -+ out->buf.flags = frame->key_frame ? -+ (out->buf.flags | V4L2_BUF_FLAG_KEYFRAME) : -+ (out->buf.flags & ~V4L2_BUF_FLAG_KEYFRAME); -+ // Beware that colour info is held in format rather than the actual -+ // v4l2 buffer struct so this may not be as useful as you might hope -+ v4l2_set_color(out, frame->color_primaries, frame->colorspace, frame->color_trc); -+ v4l2_set_color_range(out, frame->color_range); -+ // PTS & interlace are buffer vars -+ if (track_ts) -+ out->buf.timestamp = tv_from_int(track_ts); -+ else -+ v4l2_set_pts(out, frame->pts); -+ v4l2_set_interlace(out, frame->interlaced_frame, frame->top_field_first); -+ -+ return frame->format == AV_PIX_FMT_DRM_PRIME ? -+ v4l2_buffer_primeframe_to_buf(frame, out) : -+ v4l2_buffer_swframe_to_buf(frame, out); - } - - int ff_v4l2_buffer_buf_to_avframe(AVFrame *frame, V4L2Buffer *avbuf) - { - int ret; -+ V4L2Context * const ctx = avbuf->context; - - av_frame_unref(frame); - -@@ -429,17 +765,32 @@ int ff_v4l2_buffer_buf_to_avframe(AVFram - - /* 2. get frame information */ - frame->key_frame = !!(avbuf->buf.flags & V4L2_BUF_FLAG_KEYFRAME); -+ frame->pict_type = frame->key_frame ? AV_PICTURE_TYPE_I : -+ (avbuf->buf.flags & V4L2_BUF_FLAG_PFRAME) != 0 ? AV_PICTURE_TYPE_P : -+ (avbuf->buf.flags & V4L2_BUF_FLAG_BFRAME) != 0 ? AV_PICTURE_TYPE_B : -+ AV_PICTURE_TYPE_NONE; - frame->color_primaries = v4l2_get_color_primaries(avbuf); - frame->colorspace = v4l2_get_color_space(avbuf); - frame->color_range = v4l2_get_color_range(avbuf); - frame->color_trc = v4l2_get_color_trc(avbuf); - frame->pts = v4l2_get_pts(avbuf); - frame->pkt_dts = AV_NOPTS_VALUE; -+ frame->interlaced_frame = v4l2_buf_is_interlaced(avbuf); -+ frame->top_field_first = v4l2_buf_is_top_first(avbuf); - - /* these values are updated also during re-init in v4l2_process_driver_event */ -- frame->height = avbuf->context->height; -- frame->width = avbuf->context->width; -- frame->sample_aspect_ratio = avbuf->context->sample_aspect_ratio; -+ frame->height = ctx->height; -+ frame->width = ctx->width; -+ frame->sample_aspect_ratio = ctx->sample_aspect_ratio; -+ -+ if (ctx->selection.height && ctx->selection.width) { -+ frame->crop_left = ctx->selection.left < frame->width ? ctx->selection.left : 0; -+ frame->crop_top = ctx->selection.top < frame->height ? ctx->selection.top : 0; -+ frame->crop_right = ctx->selection.left + ctx->selection.width < frame->width ? -+ frame->width - (ctx->selection.left + ctx->selection.width) : 0; -+ frame->crop_bottom = ctx->selection.top + ctx->selection.height < frame->height ? -+ frame->height - (ctx->selection.top + ctx->selection.height) : 0; -+ } - - /* 3. report errors upstream */ - if (avbuf->buf.flags & V4L2_BUF_FLAG_ERROR) { -@@ -452,15 +803,15 @@ int ff_v4l2_buffer_buf_to_avframe(AVFram - - int ff_v4l2_buffer_buf_to_avpkt(AVPacket *pkt, V4L2Buffer *avbuf) - { -- int ret; -- - av_packet_unref(pkt); -- ret = v4l2_buf_to_bufref(avbuf, 0, &pkt->buf); -- if (ret) -- return ret; -+ -+ pkt->buf = wrap_avbuf(avbuf); -+ if (pkt->buf == NULL) -+ return AVERROR(ENOMEM); - - pkt->size = V4L2_TYPE_IS_MULTIPLANAR(avbuf->buf.type) ? avbuf->buf.m.planes[0].bytesused : avbuf->buf.bytesused; -- pkt->data = pkt->buf->data; -+ pkt->data = (uint8_t*)avbuf->plane_info[0].mm_addr + avbuf->planes[0].data_offset; -+ pkt->flags = 0; - - if (avbuf->buf.flags & V4L2_BUF_FLAG_KEYFRAME) - pkt->flags |= AV_PKT_FLAG_KEY; -@@ -475,31 +826,91 @@ int ff_v4l2_buffer_buf_to_avpkt(AVPacket - return 0; - } - --int ff_v4l2_buffer_avpkt_to_buf(const AVPacket *pkt, V4L2Buffer *out) -+int ff_v4l2_buffer_avpkt_to_buf_ext(const AVPacket * const pkt, V4L2Buffer * const out, -+ const void *extdata, size_t extlen, -+ const int64_t timestamp) - { - int ret; - -- ret = v4l2_bufref_to_buf(out, 0, pkt->data, pkt->size, 0, pkt->buf); -- if (ret) -+ if (extlen) { -+ ret = v4l2_bufref_to_buf(out, 0, extdata, extlen, 0); -+ if (ret) -+ return ret; -+ } -+ -+ ret = v4l2_bufref_to_buf(out, 0, pkt->data, pkt->size, extlen); -+ if (ret && ret != AVERROR(ENOMEM)) - return ret; - -- v4l2_set_pts(out, pkt->pts); -+ if (timestamp) -+ out->buf.timestamp = tv_from_int(timestamp); -+ else -+ v4l2_set_pts(out, pkt->pts); -+ -+ out->buf.flags = (pkt->flags & AV_PKT_FLAG_KEY) != 0 ? -+ (out->buf.flags | V4L2_BUF_FLAG_KEYFRAME) : -+ (out->buf.flags & ~V4L2_BUF_FLAG_KEYFRAME); - -- if (pkt->flags & AV_PKT_FLAG_KEY) -- out->flags = V4L2_BUF_FLAG_KEYFRAME; -+ return ret; -+} - -- return 0; -+int ff_v4l2_buffer_avpkt_to_buf(const AVPacket *pkt, V4L2Buffer *out) -+{ -+ return ff_v4l2_buffer_avpkt_to_buf_ext(pkt, out, NULL, 0, 0); -+} -+ -+ -+static void v4l2_buffer_buffer_free(void *opaque, uint8_t *data) -+{ -+ V4L2Buffer * const avbuf = (V4L2Buffer *)data; -+ int i; -+ -+ for (i = 0; i != FF_ARRAY_ELEMS(avbuf->plane_info); ++i) { -+ struct V4L2Plane_info *p = avbuf->plane_info + i; -+ if (p->mm_addr != NULL) -+ munmap(p->mm_addr, p->length); -+ } -+ -+ for (i = 0; i != FF_ARRAY_ELEMS(avbuf->drm_frame.objects); ++i) { -+ if (avbuf->drm_frame.objects[i].fd != -1) -+ close(avbuf->drm_frame.objects[i].fd); -+ } -+ -+ av_buffer_unref(&avbuf->ref_buf); -+ -+ ff_weak_link_unref(&avbuf->context_wl); -+ -+ av_free(avbuf); - } - --int ff_v4l2_buffer_initialize(V4L2Buffer* avbuf, int index) -+ -+int ff_v4l2_buffer_initialize(AVBufferRef ** pbufref, int index, V4L2Context *ctx, enum v4l2_memory mem) - { -- V4L2Context *ctx = avbuf->context; - int ret, i; -+ V4L2Buffer * const avbuf = av_mallocz(sizeof(*avbuf)); -+ AVBufferRef * bufref; - -- avbuf->buf.memory = V4L2_MEMORY_MMAP; -+ *pbufref = NULL; -+ if (avbuf == NULL) -+ return AVERROR(ENOMEM); -+ -+ bufref = av_buffer_create((uint8_t*)avbuf, sizeof(*avbuf), v4l2_buffer_buffer_free, NULL, 0); -+ if (bufref == NULL) { -+ av_free(avbuf); -+ return AVERROR(ENOMEM); -+ } -+ -+ avbuf->context = ctx; -+ avbuf->buf.memory = mem; - avbuf->buf.type = ctx->type; - avbuf->buf.index = index; - -+ for (i = 0; i != FF_ARRAY_ELEMS(avbuf->drm_frame.objects); ++i) { -+ avbuf->drm_frame.objects[i].fd = -1; -+ } -+ -+ avbuf->context_wl = ff_weak_link_ref(ctx->wl_master); -+ - if (V4L2_TYPE_IS_MULTIPLANAR(ctx->type)) { - avbuf->buf.length = VIDEO_MAX_PLANES; - avbuf->buf.m.planes = avbuf->planes; -@@ -507,7 +918,7 @@ int ff_v4l2_buffer_initialize(V4L2Buffer - - ret = ioctl(buf_to_m2mctx(avbuf)->fd, VIDIOC_QUERYBUF, &avbuf->buf); - if (ret < 0) -- return AVERROR(errno); -+ goto fail; - - if (V4L2_TYPE_IS_MULTIPLANAR(ctx->type)) { - avbuf->num_planes = 0; -@@ -520,6 +931,8 @@ int ff_v4l2_buffer_initialize(V4L2Buffer - avbuf->num_planes = 1; - - for (i = 0; i < avbuf->num_planes; i++) { -+ const int want_mmap = avbuf->buf.memory == V4L2_MEMORY_MMAP && -+ (V4L2_TYPE_IS_OUTPUT(ctx->type) || !buf_to_m2mctx(avbuf)->output_drm); - - avbuf->plane_info[i].bytesperline = V4L2_TYPE_IS_MULTIPLANAR(ctx->type) ? - ctx->format.fmt.pix_mp.plane_fmt[i].bytesperline : -@@ -527,25 +940,29 @@ int ff_v4l2_buffer_initialize(V4L2Buffer - - if (V4L2_TYPE_IS_MULTIPLANAR(ctx->type)) { - avbuf->plane_info[i].length = avbuf->buf.m.planes[i].length; -- avbuf->plane_info[i].mm_addr = mmap(NULL, avbuf->buf.m.planes[i].length, -- PROT_READ | PROT_WRITE, MAP_SHARED, -- buf_to_m2mctx(avbuf)->fd, avbuf->buf.m.planes[i].m.mem_offset); -+ -+ if (want_mmap) -+ avbuf->plane_info[i].mm_addr = mmap(NULL, avbuf->buf.m.planes[i].length, -+ PROT_READ | PROT_WRITE, MAP_SHARED, -+ buf_to_m2mctx(avbuf)->fd, avbuf->buf.m.planes[i].m.mem_offset); - } else { - avbuf->plane_info[i].length = avbuf->buf.length; -- avbuf->plane_info[i].mm_addr = mmap(NULL, avbuf->buf.length, -- PROT_READ | PROT_WRITE, MAP_SHARED, -- buf_to_m2mctx(avbuf)->fd, avbuf->buf.m.offset); -+ -+ if (want_mmap) -+ avbuf->plane_info[i].mm_addr = mmap(NULL, avbuf->buf.length, -+ PROT_READ | PROT_WRITE, MAP_SHARED, -+ buf_to_m2mctx(avbuf)->fd, avbuf->buf.m.offset); - } - -- if (avbuf->plane_info[i].mm_addr == MAP_FAILED) -- return AVERROR(ENOMEM); -+ if (avbuf->plane_info[i].mm_addr == MAP_FAILED) { -+ avbuf->plane_info[i].mm_addr = NULL; -+ ret = AVERROR(ENOMEM); -+ goto fail; -+ } - } - - avbuf->status = V4L2BUF_AVAILABLE; - -- if (V4L2_TYPE_IS_OUTPUT(ctx->type)) -- return 0; -- - if (V4L2_TYPE_IS_MULTIPLANAR(ctx->type)) { - avbuf->buf.m.planes = avbuf->planes; - avbuf->buf.length = avbuf->num_planes; -@@ -555,20 +972,51 @@ int ff_v4l2_buffer_initialize(V4L2Buffer - avbuf->buf.length = avbuf->planes[0].length; - } - -- return ff_v4l2_buffer_enqueue(avbuf); -+ if (!V4L2_TYPE_IS_OUTPUT(ctx->type)) { -+ if (buf_to_m2mctx(avbuf)->output_drm) { -+ ret = v4l2_buffer_export_drm(avbuf); -+ if (ret) -+ goto fail; -+ } -+ } -+ -+ *pbufref = bufref; -+ return 0; -+ -+fail: -+ av_buffer_unref(&bufref); -+ return ret; - } - - int ff_v4l2_buffer_enqueue(V4L2Buffer* avbuf) - { - int ret; -+ int qc; - -- avbuf->buf.flags = avbuf->flags; -+ if (avbuf->buf.timestamp.tv_sec || avbuf->buf.timestamp.tv_usec) { -+ av_log(logger(avbuf), AV_LOG_DEBUG, "--- %s pre VIDIOC_QBUF: index %d, ts=%ld.%06ld count=%d\n", -+ avbuf->context->name, avbuf->buf.index, -+ avbuf->buf.timestamp.tv_sec, avbuf->buf.timestamp.tv_usec, -+ avbuf->context->q_count); -+ } - - ret = ioctl(buf_to_m2mctx(avbuf)->fd, VIDIOC_QBUF, &avbuf->buf); -- if (ret < 0) -- return AVERROR(errno); -+ if (ret < 0) { -+ int err = errno; -+ av_log(logger(avbuf), AV_LOG_ERROR, "--- %s VIDIOC_QBUF: index %d FAIL err %d (%s)\n", -+ avbuf->context->name, avbuf->buf.index, -+ err, strerror(err)); -+ return AVERROR(err); -+ } - -+ // Lock not wanted - if called from buffer free then lock already obtained -+ qc = atomic_fetch_add(&avbuf->context->q_count, 1) + 1; - avbuf->status = V4L2BUF_IN_DRIVER; -+ pthread_cond_broadcast(&avbuf->context->cond); -+ -+ av_log(logger(avbuf), AV_LOG_DEBUG, "--- %s VIDIOC_QBUF: index %d, ts=%ld.%06ld count=%d\n", -+ avbuf->context->name, avbuf->buf.index, -+ avbuf->buf.timestamp.tv_sec, avbuf->buf.timestamp.tv_usec, qc); - - return 0; - } ---- a/libavcodec/v4l2_buffers.h -+++ b/libavcodec/v4l2_buffers.h -@@ -27,25 +27,38 @@ - #include - #include - -+#include "libavutil/hwcontext_drm.h" - #include "avcodec.h" - - enum V4L2Buffer_status { - V4L2BUF_AVAILABLE, - V4L2BUF_IN_DRIVER, -+ V4L2BUF_IN_USE, - V4L2BUF_RET_USER, - }; - - /** - * V4L2Buffer (wrapper for v4l2_buffer management) - */ -+struct V4L2Context; -+struct ff_weak_link_client; -+ - typedef struct V4L2Buffer { -- /* each buffer needs to have a reference to its context */ -+ /* each buffer needs to have a reference to its context -+ * The pointer is good enough for most operation but once the buffer has -+ * been passed to the user the buffer may become orphaned so for free ops -+ * the weak link must be used to ensure that the context is actually -+ * there -+ */ - struct V4L2Context *context; -+ struct ff_weak_link_client *context_wl; - -- /* This object is refcounted per-plane, so we need to keep track -- * of how many context-refs we are holding. */ -- AVBufferRef *context_ref; -- atomic_uint context_refcount; -+ /* DRM descriptor */ -+ AVDRMFrameDescriptor drm_frame; -+ /* For DRM_PRIME encode - need to keep a ref to the source buffer till we -+ * are done -+ */ -+ AVBufferRef * ref_buf; - - /* keep track of the mmap address and mmap length */ - struct V4L2Plane_info { -@@ -60,7 +73,6 @@ typedef struct V4L2Buffer { - struct v4l2_buffer buf; - struct v4l2_plane planes[VIDEO_MAX_PLANES]; - -- int flags; - enum V4L2Buffer_status status; - - } V4L2Buffer; -@@ -98,6 +110,10 @@ int ff_v4l2_buffer_buf_to_avpkt(AVPacket - */ - int ff_v4l2_buffer_avpkt_to_buf(const AVPacket *pkt, V4L2Buffer *out); - -+int ff_v4l2_buffer_avpkt_to_buf_ext(const AVPacket * const pkt, V4L2Buffer * const out, -+ const void *extdata, size_t extlen, -+ const int64_t timestamp); -+ - /** - * Extracts the data from an AVFrame to a V4L2Buffer - * -@@ -106,7 +122,7 @@ int ff_v4l2_buffer_avpkt_to_buf(const AV - * - * @returns 0 in case of success, a negative AVERROR code otherwise - */ --int ff_v4l2_buffer_avframe_to_buf(const AVFrame *frame, V4L2Buffer *out); -+int ff_v4l2_buffer_avframe_to_buf(const AVFrame *frame, V4L2Buffer *out, const int64_t track_ts); - - /** - * Initializes a V4L2Buffer -@@ -116,7 +132,7 @@ int ff_v4l2_buffer_avframe_to_buf(const - * - * @returns 0 in case of success, a negative AVERROR code otherwise - */ --int ff_v4l2_buffer_initialize(V4L2Buffer* avbuf, int index); -+int ff_v4l2_buffer_initialize(AVBufferRef **avbuf, int index, struct V4L2Context *ctx, enum v4l2_memory mem); - - /** - * Enqueues a V4L2Buffer -@@ -127,5 +143,12 @@ int ff_v4l2_buffer_initialize(V4L2Buffer - */ - int ff_v4l2_buffer_enqueue(V4L2Buffer* avbuf); - -+static inline void -+ff_v4l2_buffer_set_avail(V4L2Buffer* const avbuf) -+{ -+ avbuf->status = V4L2BUF_AVAILABLE; -+ av_buffer_unref(&avbuf->ref_buf); -+} -+ - - #endif // AVCODEC_V4L2_BUFFERS_H ---- a/libavcodec/v4l2_context.c -+++ b/libavcodec/v4l2_context.c -@@ -27,11 +27,13 @@ - #include - #include - #include -+#include "libavutil/avassert.h" - #include "libavcodec/avcodec.h" - #include "libavcodec/internal.h" - #include "v4l2_buffers.h" - #include "v4l2_fmt.h" - #include "v4l2_m2m.h" -+#include "weak_link.h" - - struct v4l2_format_update { - uint32_t v4l2_fmt; -@@ -41,26 +43,168 @@ struct v4l2_format_update { - int update_avfmt; - }; - --static inline V4L2m2mContext *ctx_to_m2mctx(V4L2Context *ctx) -+ -+static inline int64_t track_to_pts(AVCodecContext *avctx, unsigned int n) - { -- return V4L2_TYPE_IS_OUTPUT(ctx->type) ? -- container_of(ctx, V4L2m2mContext, output) : -- container_of(ctx, V4L2m2mContext, capture); -+ return (int64_t)n; - } - --static inline AVCodecContext *logger(V4L2Context *ctx) -+static inline unsigned int pts_to_track(AVCodecContext *avctx, const int64_t pts) - { -- return ctx_to_m2mctx(ctx)->avctx; -+ return (unsigned int)pts; - } - --static inline unsigned int v4l2_get_width(struct v4l2_format *fmt) -+// FFmpeg requires us to propagate a number of vars from the coded pkt into -+// the decoded frame. The only thing that tracks like that in V4L2 stateful -+// is timestamp. PTS maps to timestamp for this decode. FFmpeg makes no -+// guarantees about PTS being unique or specified for every frame so replace -+// the supplied PTS with a simple incrementing number and keep a circular -+// buffer of all the things we want preserved (including the original PTS) -+// indexed by the tracking no. -+static int64_t -+xlat_pts_pkt_in(AVCodecContext *const avctx, xlat_track_t *const x, const AVPacket *const avpkt) - { -- return V4L2_TYPE_IS_MULTIPLANAR(fmt->type) ? fmt->fmt.pix_mp.width : fmt->fmt.pix.width; -+ int64_t track_pts; -+ -+ // Avoid 0 -+ if (++x->track_no == 0) -+ x->track_no = 1; -+ -+ track_pts = track_to_pts(avctx, x->track_no); -+ -+ av_log(avctx, AV_LOG_TRACE, "In pkt PTS=%" PRId64 ", DTS=%" PRId64 ", track=%" PRId64 ", n=%u\n", avpkt->pts, avpkt->dts, track_pts, x->track_no); -+ x->track_els[x->track_no % FF_V4L2_M2M_TRACK_SIZE] = (V4L2m2mTrackEl){ -+ .discard = 0, -+ .pending = 1, -+ .pkt_size = avpkt->size, -+ .pts = avpkt->pts, -+ .dts = avpkt->dts, -+ .reordered_opaque = avctx->reordered_opaque, -+ .pkt_pos = avpkt->pos, -+ .pkt_duration = avpkt->duration, -+ .track_pts = track_pts -+ }; -+ return track_pts; - } - --static inline unsigned int v4l2_get_height(struct v4l2_format *fmt) -+static int64_t -+xlat_pts_frame_in(AVCodecContext *const avctx, xlat_track_t *const x, const AVFrame *const frame) - { -- return V4L2_TYPE_IS_MULTIPLANAR(fmt->type) ? fmt->fmt.pix_mp.height : fmt->fmt.pix.height; -+ int64_t track_pts; -+ -+ // Avoid 0 -+ if (++x->track_no == 0) -+ x->track_no = 1; -+ -+ track_pts = track_to_pts(avctx, x->track_no); -+ -+ av_log(avctx, AV_LOG_TRACE, "In frame PTS=%" PRId64 ", track=%" PRId64 ", n=%u\n", frame->pts, track_pts, x->track_no); -+ x->track_els[x->track_no % FF_V4L2_M2M_TRACK_SIZE] = (V4L2m2mTrackEl){ -+ .discard = 0, -+ .pending = 1, -+ .pkt_size = 0, -+ .pts = frame->pts, -+ .dts = AV_NOPTS_VALUE, -+ .reordered_opaque = frame->reordered_opaque, -+ .pkt_pos = frame->pkt_pos, -+ .pkt_duration = frame->pkt_duration, -+ .track_pts = track_pts -+ }; -+ return track_pts; -+} -+ -+ -+// Returns -1 if we should discard the frame -+static int -+xlat_pts_frame_out(AVCodecContext *const avctx, -+ xlat_track_t * const x, -+ AVFrame *const frame) -+{ -+ unsigned int n = pts_to_track(avctx, frame->pts) % FF_V4L2_M2M_TRACK_SIZE; -+ V4L2m2mTrackEl *const t = x->track_els + n; -+ if (frame->pts == AV_NOPTS_VALUE || frame->pts != t->track_pts) -+ { -+ av_log(avctx, frame->pts == AV_NOPTS_VALUE ? AV_LOG_DEBUG : AV_LOG_WARNING, -+ "Frame tracking failure: pts=%" PRId64 ", track[%d]=%" PRId64 "\n", frame->pts, n, t->track_pts); -+ frame->pts = AV_NOPTS_VALUE; -+ frame->pkt_dts = AV_NOPTS_VALUE; -+ frame->reordered_opaque = x->last_opaque; -+ frame->pkt_pos = -1; -+ frame->pkt_duration = 0; -+ frame->pkt_size = -1; -+ } -+ else if (!t->discard) -+ { -+ frame->pts = t->pending ? t->pts : AV_NOPTS_VALUE; -+ frame->pkt_dts = t->dts; -+ frame->reordered_opaque = t->reordered_opaque; -+ frame->pkt_pos = t->pkt_pos; -+ frame->pkt_duration = t->pkt_duration; -+ frame->pkt_size = t->pkt_size; -+ -+ x->last_opaque = x->track_els[n].reordered_opaque; -+ if (frame->pts != AV_NOPTS_VALUE) -+ x->last_pts = frame->pts; -+ t->pending = 0; -+ } -+ else -+ { -+ av_log(avctx, AV_LOG_DEBUG, "Discard frame (flushed): pts=%" PRId64 ", track[%d]=%" PRId64 "\n", frame->pts, n, t->track_pts); -+ return -1; -+ } -+ -+ av_log(avctx, AV_LOG_TRACE, "Out frame PTS=%" PRId64 "/%"PRId64", DTS=%" PRId64 ", track=%"PRId64", n=%d\n", -+ frame->pts, frame->best_effort_timestamp, frame->pkt_dts, t->track_pts, n); -+ return 0; -+} -+ -+// Returns -1 if we should discard the frame -+static int -+xlat_pts_pkt_out(AVCodecContext *const avctx, -+ xlat_track_t * const x, -+ AVPacket *const pkt) -+{ -+ unsigned int n = pts_to_track(avctx, pkt->pts) % FF_V4L2_M2M_TRACK_SIZE; -+ V4L2m2mTrackEl *const t = x->track_els + n; -+ if (pkt->pts == AV_NOPTS_VALUE || pkt->pts != t->track_pts) -+ { -+ av_log(avctx, pkt->pts == AV_NOPTS_VALUE ? AV_LOG_DEBUG : AV_LOG_WARNING, -+ "Pkt tracking failure: pts=%" PRId64 ", track[%d]=%" PRId64 "\n", pkt->pts, n, t->track_pts); -+ pkt->pts = AV_NOPTS_VALUE; -+ } -+ else if (!t->discard) -+ { -+ pkt->pts = t->pending ? t->pts : AV_NOPTS_VALUE; -+ -+ x->last_opaque = x->track_els[n].reordered_opaque; -+ if (pkt->pts != AV_NOPTS_VALUE) -+ x->last_pts = pkt->pts; -+ t->pending = 0; -+ } -+ else -+ { -+ av_log(avctx, AV_LOG_DEBUG, "Discard packet (flushed): pts=%" PRId64 ", track[%d]=%" PRId64 "\n", pkt->pts, n, t->track_pts); -+ return -1; -+ } -+ -+ // * Would like something much better than this...xlat(offset + out_count)? -+ pkt->dts = pkt->pts; -+ av_log(avctx, AV_LOG_TRACE, "Out pkt PTS=%" PRId64 ", track=%"PRId64", n=%d\n", -+ pkt->pts, t->track_pts, n); -+ return 0; -+} -+ -+ -+static inline V4L2m2mContext *ctx_to_m2mctx(const V4L2Context *ctx) -+{ -+ return V4L2_TYPE_IS_OUTPUT(ctx->type) ? -+ container_of(ctx, V4L2m2mContext, output) : -+ container_of(ctx, V4L2m2mContext, capture); -+} -+ -+static inline AVCodecContext *logger(const V4L2Context *ctx) -+{ -+ return ctx_to_m2mctx(ctx)->avctx; - } - - static AVRational v4l2_get_sar(V4L2Context *ctx) -@@ -81,21 +225,29 @@ static AVRational v4l2_get_sar(V4L2Conte - return sar; - } - --static inline unsigned int v4l2_resolution_changed(V4L2Context *ctx, struct v4l2_format *fmt2) -+static inline int ctx_buffers_alloced(const V4L2Context * const ctx) -+{ -+ return ctx->bufrefs != NULL; -+} -+ -+// Width/Height changed or we don't have an alloc in the first place? -+static int ctx_resolution_changed(const V4L2Context *ctx, const struct v4l2_format *fmt2) - { -- struct v4l2_format *fmt1 = &ctx->format; -- int ret = V4L2_TYPE_IS_MULTIPLANAR(ctx->type) ? -- fmt1->fmt.pix_mp.width != fmt2->fmt.pix_mp.width || -- fmt1->fmt.pix_mp.height != fmt2->fmt.pix_mp.height -- : -- fmt1->fmt.pix.width != fmt2->fmt.pix.width || -- fmt1->fmt.pix.height != fmt2->fmt.pix.height; -+ const struct v4l2_format *fmt1 = &ctx->format; -+ int ret = !ctx_buffers_alloced(ctx) || -+ (V4L2_TYPE_IS_MULTIPLANAR(ctx->type) ? -+ fmt1->fmt.pix_mp.width != fmt2->fmt.pix_mp.width || -+ fmt1->fmt.pix_mp.height != fmt2->fmt.pix_mp.height -+ : -+ fmt1->fmt.pix.width != fmt2->fmt.pix.width || -+ fmt1->fmt.pix.height != fmt2->fmt.pix.height); - - if (ret) -- av_log(logger(ctx), AV_LOG_DEBUG, "%s changed (%dx%d) -> (%dx%d)\n", -+ av_log(logger(ctx), AV_LOG_DEBUG, "V4L2 %s changed: alloc=%d (%dx%d) -> (%dx%d)\n", - ctx->name, -- v4l2_get_width(fmt1), v4l2_get_height(fmt1), -- v4l2_get_width(fmt2), v4l2_get_height(fmt2)); -+ ctx_buffers_alloced(ctx), -+ ff_v4l2_get_format_width(fmt1), ff_v4l2_get_format_height(fmt1), -+ ff_v4l2_get_format_width(fmt2), ff_v4l2_get_format_height(fmt2)); - - return ret; - } -@@ -153,90 +305,110 @@ static inline void v4l2_save_to_context( - } - } - --/** -- * handle resolution change event and end of stream event -- * returns 1 if reinit was successful, negative if it failed -- * returns 0 if reinit was not executed -- */ --static int v4l2_handle_event(V4L2Context *ctx) -+static int get_default_selection(V4L2Context * const ctx, struct v4l2_rect *r) - { -- V4L2m2mContext *s = ctx_to_m2mctx(ctx); -- struct v4l2_format cap_fmt = s->capture.format; -- struct v4l2_format out_fmt = s->output.format; -- struct v4l2_event evt = { 0 }; -- int full_reinit, reinit, ret; -+ V4L2m2mContext * const s = ctx_to_m2mctx(ctx); -+ struct v4l2_selection selection = { -+ .type = V4L2_BUF_TYPE_VIDEO_CAPTURE, -+ .target = V4L2_SEL_TGT_COMPOSE -+ }; - -- ret = ioctl(s->fd, VIDIOC_DQEVENT, &evt); -- if (ret < 0) { -- av_log(logger(ctx), AV_LOG_ERROR, "%s VIDIOC_DQEVENT\n", ctx->name); -- return 0; -- } -+ memset(r, 0, sizeof(*r)); -+ if (ioctl(s->fd, VIDIOC_G_SELECTION, &selection)) -+ return AVERROR(errno); - -- if (evt.type == V4L2_EVENT_EOS) { -- ctx->done = 1; -- return 0; -- } -+ *r = selection.r; -+ return 0; -+} - -- if (evt.type != V4L2_EVENT_SOURCE_CHANGE) -- return 0; -+static int do_source_change(V4L2m2mContext * const s) -+{ -+ AVCodecContext *const avctx = s->avctx; - -- ret = ioctl(s->fd, VIDIOC_G_FMT, &out_fmt); -- if (ret) { -- av_log(logger(ctx), AV_LOG_ERROR, "%s VIDIOC_G_FMT\n", s->output.name); -- return 0; -- } -+ int ret; -+ int reinit; -+ struct v4l2_format cap_fmt = s->capture.format; -+ -+ s->capture.done = 0; - - ret = ioctl(s->fd, VIDIOC_G_FMT, &cap_fmt); - if (ret) { -- av_log(logger(ctx), AV_LOG_ERROR, "%s VIDIOC_G_FMT\n", s->capture.name); -+ av_log(avctx, AV_LOG_ERROR, "%s VIDIOC_G_FMT failed\n", s->capture.name); - return 0; - } - -- full_reinit = v4l2_resolution_changed(&s->output, &out_fmt); -- if (full_reinit) { -- s->output.height = v4l2_get_height(&out_fmt); -- s->output.width = v4l2_get_width(&out_fmt); -- s->output.sample_aspect_ratio = v4l2_get_sar(&s->output); -- } -+ get_default_selection(&s->capture, &s->capture.selection); -+ -+ reinit = ctx_resolution_changed(&s->capture, &cap_fmt); -+ if ((s->quirks & FF_V4L2_QUIRK_REINIT_ALWAYS) != 0) -+ reinit = 1; - -- reinit = v4l2_resolution_changed(&s->capture, &cap_fmt); -+ s->capture.format = cap_fmt; - if (reinit) { -- s->capture.height = v4l2_get_height(&cap_fmt); -- s->capture.width = v4l2_get_width(&cap_fmt); -- s->capture.sample_aspect_ratio = v4l2_get_sar(&s->capture); -+ s->capture.height = ff_v4l2_get_format_height(&cap_fmt); -+ s->capture.width = ff_v4l2_get_format_width(&cap_fmt); - } - -- if (full_reinit || reinit) -- s->reinit = 1; -- -- if (full_reinit) { -- ret = ff_v4l2_m2m_codec_full_reinit(s); -- if (ret) { -- av_log(logger(ctx), AV_LOG_ERROR, "v4l2_m2m_codec_full_reinit\n"); -- return AVERROR(EINVAL); -- } -- goto reinit_run; -+ // If we don't support selection (or it is bust) and we obviously have HD then kludge -+ if ((s->capture.selection.width == 0 || s->capture.selection.height == 0) && -+ (s->capture.height == 1088 && s->capture.width == 1920)) { -+ s->capture.selection = (struct v4l2_rect){.width = 1920, .height = 1080}; - } - -+ s->capture.sample_aspect_ratio = v4l2_get_sar(&s->capture); -+ -+ av_log(avctx, AV_LOG_DEBUG, "Source change: SAR: %d/%d, wxh %dx%d crop %dx%d @ %d,%d, reinit=%d\n", -+ s->capture.sample_aspect_ratio.num, s->capture.sample_aspect_ratio.den, -+ s->capture.width, s->capture.height, -+ s->capture.selection.width, s->capture.selection.height, -+ s->capture.selection.left, s->capture.selection.top, reinit); -+ - if (reinit) { -- if (s->avctx) -- ret = ff_set_dimensions(s->avctx, s->capture.width, s->capture.height); -+ if (avctx) -+ ret = ff_set_dimensions(s->avctx, -+ s->capture.selection.width != 0 ? s->capture.selection.width : s->capture.width, -+ s->capture.selection.height != 0 ? s->capture.selection.height : s->capture.height); - if (ret < 0) -- av_log(logger(ctx), AV_LOG_WARNING, "update avcodec height and width\n"); -+ av_log(avctx, AV_LOG_WARNING, "update avcodec height and width failed\n"); - - ret = ff_v4l2_m2m_codec_reinit(s); - if (ret) { -- av_log(logger(ctx), AV_LOG_ERROR, "v4l2_m2m_codec_reinit\n"); -+ av_log(avctx, AV_LOG_ERROR, "v4l2_m2m_codec_reinit failed\n"); - return AVERROR(EINVAL); - } -+ -+ if (s->capture.width > ff_v4l2_get_format_width(&s->capture.format) || -+ s->capture.height > ff_v4l2_get_format_height(&s->capture.format)) { -+ av_log(avctx, AV_LOG_ERROR, "Format post reinit too small: wanted %dx%d > got %dx%d\n", -+ s->capture.width, s->capture.height, -+ ff_v4l2_get_format_width(&s->capture.format), ff_v4l2_get_format_height(&s->capture.format)); -+ return AVERROR(EINVAL); -+ } -+ -+ // Update pixel format - should only actually do something on initial change -+ s->capture.av_pix_fmt = -+ ff_v4l2_format_v4l2_to_avfmt(ff_v4l2_get_format_pixelformat(&s->capture.format), AV_CODEC_ID_RAWVIDEO); -+ if (s->output_drm) { -+ avctx->pix_fmt = AV_PIX_FMT_DRM_PRIME; -+ avctx->sw_pix_fmt = s->capture.av_pix_fmt; -+ } -+ else -+ avctx->pix_fmt = s->capture.av_pix_fmt; -+ - goto reinit_run; - } - -- /* dummy event received */ -- return 0; -+ /* Buffers are OK so just stream off to ack */ -+ av_log(avctx, AV_LOG_DEBUG, "%s: Parameters only - restart decode\n", __func__); -+ -+ ret = ff_v4l2_context_set_status(&s->capture, VIDIOC_STREAMOFF); -+ if (ret) -+ av_log(avctx, AV_LOG_ERROR, "capture VIDIOC_STREAMOFF failed\n"); -+ s->draining = 0; - - /* reinit executed */ - reinit_run: -+ ret = ff_v4l2_context_set_status(&s->capture, VIDIOC_STREAMON); - return 1; - } - -@@ -280,171 +452,277 @@ static int v4l2_stop_encode(V4L2Context - return 0; - } - --static V4L2Buffer* v4l2_dequeue_v4l2buf(V4L2Context *ctx, int timeout) --{ -- struct v4l2_plane planes[VIDEO_MAX_PLANES]; -- struct v4l2_buffer buf = { 0 }; -- V4L2Buffer *avbuf; -- struct pollfd pfd = { -- .events = POLLIN | POLLRDNORM | POLLPRI | POLLOUT | POLLWRNORM, /* default blocking capture */ -- .fd = ctx_to_m2mctx(ctx)->fd, -+// DQ a buffer -+// Amalgamates all the various ways there are of signalling EOS/Event to -+// generate a consistant EPIPE. -+// -+// Sets ctx->flag_last if next dq would produce EPIPE (i.e. stream has stopped) -+// -+// Returns: -+// 0 Success -+// AVERROR(EPIPE) Nothing more to read -+// AVERROR(ENOSPC) No buffers in Q to put result in -+// * AVERROR(..) -+ -+ static int -+dq_buf(V4L2Context * const ctx, V4L2Buffer ** const ppavbuf) -+{ -+ V4L2m2mContext * const m = ctx_to_m2mctx(ctx); -+ AVCodecContext * const avctx = m->avctx; -+ V4L2Buffer * avbuf; -+ const int is_mp = V4L2_TYPE_IS_MULTIPLANAR(ctx->type); -+ -+ struct v4l2_plane planes[VIDEO_MAX_PLANES] = {{0}}; -+ -+ struct v4l2_buffer buf = { -+ .type = ctx->type, -+ .memory = V4L2_MEMORY_MMAP, - }; -- int i, ret; - -- if (!V4L2_TYPE_IS_OUTPUT(ctx->type) && ctx->buffers) { -- for (i = 0; i < ctx->num_buffers; i++) { -- if (ctx->buffers[i].status == V4L2BUF_IN_DRIVER) -- break; -- } -- if (i == ctx->num_buffers) -- av_log(logger(ctx), AV_LOG_WARNING, "All capture buffers returned to " -- "userspace. Increase num_capture_buffers " -- "to prevent device deadlock or dropped " -- "packets/frames.\n"); -- } -- -- /* if we are draining and there are no more capture buffers queued in the driver we are done */ -- if (!V4L2_TYPE_IS_OUTPUT(ctx->type) && ctx_to_m2mctx(ctx)->draining) { -- for (i = 0; i < ctx->num_buffers; i++) { -- /* capture buffer initialization happens during decode hence -- * detection happens at runtime -- */ -- if (!ctx->buffers) -- break; -- -- if (ctx->buffers[i].status == V4L2BUF_IN_DRIVER) -- goto start; -- } -- ctx->done = 1; -- return NULL; -- } -- --start: -- if (V4L2_TYPE_IS_OUTPUT(ctx->type)) -- pfd.events = POLLOUT | POLLWRNORM; -- else { -- /* no need to listen to requests for more input while draining */ -- if (ctx_to_m2mctx(ctx)->draining) -- pfd.events = POLLIN | POLLRDNORM | POLLPRI; -+ *ppavbuf = NULL; -+ -+ if (ctx->flag_last) -+ return AVERROR(EPIPE); -+ -+ if (is_mp) { -+ buf.length = VIDEO_MAX_PLANES; -+ buf.m.planes = planes; - } - -- for (;;) { -- ret = poll(&pfd, 1, timeout); -- if (ret > 0) -- break; -- if (errno == EINTR) -- continue; -- return NULL; -+ while (ioctl(m->fd, VIDIOC_DQBUF, &buf) != 0) { -+ const int err = errno; -+ av_assert0(AVERROR(err) < 0); -+ if (err != EINTR) { -+ av_log(avctx, AV_LOG_DEBUG, "%s VIDIOC_DQBUF, errno (%s)\n", -+ ctx->name, av_err2str(AVERROR(err))); -+ -+ if (err == EPIPE) -+ ctx->flag_last = 1; -+ -+ return AVERROR(err); -+ } - } -+ atomic_fetch_sub(&ctx->q_count, 1); - -- /* 0. handle errors */ -- if (pfd.revents & POLLERR) { -- /* if we are trying to get free buffers but none have been queued yet -- no need to raise a warning */ -- if (timeout == 0) { -- for (i = 0; i < ctx->num_buffers; i++) { -- if (ctx->buffers[i].status != V4L2BUF_AVAILABLE) -- av_log(logger(ctx), AV_LOG_WARNING, "%s POLLERR\n", ctx->name); -- } -+ avbuf = (V4L2Buffer *)ctx->bufrefs[buf.index]->data; -+ ff_v4l2_buffer_set_avail(avbuf); -+ avbuf->buf = buf; -+ if (is_mp) { -+ memcpy(avbuf->planes, planes, sizeof(planes)); -+ avbuf->buf.m.planes = avbuf->planes; -+ } -+ // Done with any attached buffer -+ av_buffer_unref(&avbuf->ref_buf); -+ -+ if (V4L2_TYPE_IS_CAPTURE(ctx->type)) { -+ // Zero length cap buffer return == EOS -+ if ((is_mp ? buf.m.planes[0].bytesused : buf.bytesused) == 0) { -+ av_log(avctx, AV_LOG_DEBUG, "Buffer empty - reQ\n"); -+ -+ // Must reQ so we don't leak -+ // May not matter if the next thing we do is release all the -+ // buffers but better to be tidy. -+ ff_v4l2_buffer_enqueue(avbuf); -+ -+ ctx->flag_last = 1; -+ return AVERROR(EPIPE); - } -- else -- av_log(logger(ctx), AV_LOG_WARNING, "%s POLLERR\n", ctx->name); - -- return NULL; -+#ifdef V4L2_BUF_FLAG_LAST -+ // If flag_last set then this contains data but is the last frame -+ // so remember that but return OK -+ if ((buf.flags & V4L2_BUF_FLAG_LAST) != 0) -+ ctx->flag_last = 1; -+#endif - } - -- /* 1. handle resolution changes */ -- if (pfd.revents & POLLPRI) { -- ret = v4l2_handle_event(ctx); -- if (ret < 0) { -- /* if re-init failed, abort */ -- ctx->done = 1; -- return NULL; -- } -- if (ret) { -- /* if re-init was successful drop the buffer (if there was one) -- * since we had to reconfigure capture (unmap all buffers) -- */ -- return NULL; -+ *ppavbuf = avbuf; -+ return 0; -+} -+ -+/** -+ * handle resolution change event and end of stream event -+ * Expects to be called after the stream has stopped -+ * -+ * returns 1 if reinit was successful, negative if it failed -+ * returns 0 if reinit was not executed -+ */ -+static int -+get_event(V4L2m2mContext * const m) -+{ -+ AVCodecContext * const avctx = m->avctx; -+ struct v4l2_event evt = { 0 }; -+ -+ while (ioctl(m->fd, VIDIOC_DQEVENT, &evt) != 0) { -+ const int rv = AVERROR(errno); -+ if (rv == AVERROR(EINTR)) -+ continue; -+ if (rv == AVERROR(EAGAIN)) { -+ av_log(avctx, AV_LOG_WARNING, "V4L2 failed to get expected event - assume EOS\n"); -+ return AVERROR_EOF; - } -+ av_log(avctx, AV_LOG_ERROR, "V4L2 VIDIOC_DQEVENT: %s\n", av_err2str(rv)); -+ return rv; - } - -- /* 2. dequeue the buffer */ -- if (pfd.revents & (POLLIN | POLLRDNORM | POLLOUT | POLLWRNORM)) { -+ av_log(avctx, AV_LOG_DEBUG, "Dq event %d\n", evt.type); - -- if (!V4L2_TYPE_IS_OUTPUT(ctx->type)) { -- /* there is a capture buffer ready */ -- if (pfd.revents & (POLLIN | POLLRDNORM)) -- goto dequeue; -+ if (evt.type == V4L2_EVENT_EOS) { -+ av_log(avctx, AV_LOG_TRACE, "V4L2 VIDIOC_EVENT_EOS\n"); -+ return AVERROR_EOF; -+ } -+ -+ if (evt.type == V4L2_EVENT_SOURCE_CHANGE) -+ return do_source_change(m); -+ -+ return 0; -+} -+ -+ -+// Get a buffer -+// If output then just gets the buffer in the expected way -+// If capture then runs the capture state m/c to deal with res change etc. -+// If return value == 0 then *ppavbuf != NULL -+ -+static int -+get_qbuf(V4L2Context * const ctx, V4L2Buffer ** const ppavbuf, const int timeout) -+{ -+ V4L2m2mContext * const m = ctx_to_m2mctx(ctx); -+ AVCodecContext * const avctx = m->avctx; -+ const int is_cap = V4L2_TYPE_IS_CAPTURE(ctx->type); -+ -+ const unsigned int poll_cap = (POLLIN | POLLRDNORM); -+ const unsigned int poll_out = (POLLOUT | POLLWRNORM); -+ const unsigned int poll_event = POLLPRI; -+ -+ *ppavbuf = NULL; - -- /* the driver is ready to accept more input; instead of waiting for the capture -- * buffer to complete we return NULL so input can proceed (we are single threaded) -- */ -- if (pfd.revents & (POLLOUT | POLLWRNORM)) -- return NULL; -+ for (;;) { -+ struct pollfd pfd = { -+ .fd = m->fd, -+ // If capture && stream not started then assume we are waiting for the initial event -+ .events = !is_cap ? poll_out : -+ !ff_v4l2_ctx_eos(ctx) && ctx->streamon ? poll_cap : -+ poll_event, -+ }; -+ int ret; -+ -+ if (ctx->done) { -+ av_log(avctx, AV_LOG_TRACE, "V4L2 %s already done\n", ctx->name); -+ return AVERROR_EOF; - } - --dequeue: -- memset(&buf, 0, sizeof(buf)); -- buf.memory = V4L2_MEMORY_MMAP; -- buf.type = ctx->type; -- if (V4L2_TYPE_IS_MULTIPLANAR(ctx->type)) { -- memset(planes, 0, sizeof(planes)); -- buf.length = VIDEO_MAX_PLANES; -- buf.m.planes = planes; -+ // If capture && timeout == -1 then also wait for rx buffer free -+ if (is_cap && timeout == -1 && m->output.streamon && !m->draining) -+ pfd.events |= poll_out; -+ -+ // If nothing Qed all we will get is POLLERR - avoid that -+ if ((pfd.events == poll_out && atomic_load(&m->output.q_count) == 0) || -+ (pfd.events == poll_cap && atomic_load(&m->capture.q_count) == 0) || -+ (pfd.events == (poll_cap | poll_out) && atomic_load(&m->capture.q_count) == 0 && atomic_load(&m->output.q_count) == 0)) { -+ av_log(avctx, AV_LOG_TRACE, "V4L2 poll %s empty\n", ctx->name); -+ return AVERROR(ENOSPC); - } - -- ret = ioctl(ctx_to_m2mctx(ctx)->fd, VIDIOC_DQBUF, &buf); -- if (ret) { -- if (errno != EAGAIN) { -- ctx->done = 1; -- if (errno != EPIPE) -- av_log(logger(ctx), AV_LOG_DEBUG, "%s VIDIOC_DQBUF, errno (%s)\n", -- ctx->name, av_err2str(AVERROR(errno))); -+ // Timeout kludged s.t. "forever" eventually gives up & produces logging -+ // If waiting for an event when we have seen a last_frame then we expect -+ // it to be ready already so force a short timeout -+ ret = poll(&pfd, 1, -+ ff_v4l2_ctx_eos(ctx) ? 10 : -+ timeout == -1 ? 3000 : timeout); -+ if (ret < 0) { -+ ret = AVERROR(errno); // Remember errno before logging etc. -+ av_assert0(ret < 0); -+ } -+ -+ av_log(avctx, AV_LOG_TRACE, "V4L2 poll %s ret=%d, timeout=%d, events=%#x, revents=%#x\n", -+ ctx->name, ret, timeout, pfd.events, pfd.revents); -+ -+ if (ret < 0) { -+ if (ret == AVERROR(EINTR)) -+ continue; -+ av_log(avctx, AV_LOG_ERROR, "V4L2 %s poll error %d (%s)\n", ctx->name, AVUNERROR(ret), av_err2str(ret)); -+ return ret; -+ } -+ -+ if (ret == 0) { -+ if (timeout == -1) -+ av_log(avctx, AV_LOG_ERROR, "V4L2 %s poll unexpected timeout: events=%#x\n", ctx->name, pfd.events); -+ if (ff_v4l2_ctx_eos(ctx)) { -+ av_log(avctx, AV_LOG_WARNING, "V4L2 %s poll event timeout\n", ctx->name); -+ ret = get_event(m); -+ if (ret < 0) { -+ ctx->done = 1; -+ return ret; -+ } - } -- return NULL; -+ return AVERROR(EAGAIN); - } - -- if (ctx_to_m2mctx(ctx)->draining && !V4L2_TYPE_IS_OUTPUT(ctx->type)) { -- int bytesused = V4L2_TYPE_IS_MULTIPLANAR(buf.type) ? -- buf.m.planes[0].bytesused : buf.bytesused; -- if (bytesused == 0) { -+ if ((pfd.revents & POLLERR) != 0) { -+ av_log(avctx, AV_LOG_WARNING, "V4L2 %s POLLERR\n", ctx->name); -+ return AVERROR_UNKNOWN; -+ } -+ -+ if ((pfd.revents & poll_event) != 0) { -+ ret = get_event(m); -+ if (ret < 0) { - ctx->done = 1; -- return NULL; -+ return ret; - } --#ifdef V4L2_BUF_FLAG_LAST -- if (buf.flags & V4L2_BUF_FLAG_LAST) -- ctx->done = 1; --#endif -+ continue; -+ } -+ -+ if ((pfd.revents & poll_cap) != 0) { -+ ret = dq_buf(ctx, ppavbuf); -+ if (ret == AVERROR(EPIPE)) -+ continue; -+ return ret; - } - -- avbuf = &ctx->buffers[buf.index]; -- avbuf->status = V4L2BUF_AVAILABLE; -- avbuf->buf = buf; -- if (V4L2_TYPE_IS_MULTIPLANAR(ctx->type)) { -- memcpy(avbuf->planes, planes, sizeof(planes)); -- avbuf->buf.m.planes = avbuf->planes; -+ if ((pfd.revents & poll_out) != 0) { -+ if (is_cap) -+ return AVERROR(EAGAIN); -+ return dq_buf(ctx, ppavbuf); - } -- return avbuf; -+ -+ av_log(avctx, AV_LOG_ERROR, "V4L2 poll unexpected events=%#x, revents=%#x\n", pfd.events, pfd.revents); -+ return AVERROR_UNKNOWN; - } -+} - -- return NULL; -+// Clear out flags and timestamps that should should be set by the user -+// Returns the passed avbuf -+static V4L2Buffer * -+clean_v4l2_buffer(V4L2Buffer * const avbuf) -+{ -+ struct v4l2_buffer *const buf = &avbuf->buf; -+ -+ buf->flags = 0; -+ buf->field = V4L2_FIELD_ANY; -+ buf->timestamp = (struct timeval){0}; -+ buf->timecode = (struct v4l2_timecode){0}; -+ buf->sequence = 0; -+ -+ return avbuf; - } - - static V4L2Buffer* v4l2_getfree_v4l2buf(V4L2Context *ctx) - { -- int timeout = 0; /* return when no more buffers to dequeue */ - int i; - - /* get back as many output buffers as possible */ - if (V4L2_TYPE_IS_OUTPUT(ctx->type)) { -- do { -- } while (v4l2_dequeue_v4l2buf(ctx, timeout)); -+ V4L2Buffer * avbuf; -+ do { -+ get_qbuf(ctx, &avbuf, 0); -+ } while (avbuf); - } - - for (i = 0; i < ctx->num_buffers; i++) { -- if (ctx->buffers[i].status == V4L2BUF_AVAILABLE) -- return &ctx->buffers[i]; -+ V4L2Buffer * const avbuf = (V4L2Buffer *)ctx->bufrefs[i]->data; -+ if (avbuf->status == V4L2BUF_AVAILABLE) -+ return clean_v4l2_buffer(avbuf); - } - - return NULL; -@@ -452,25 +730,45 @@ static V4L2Buffer* v4l2_getfree_v4l2buf( - - static int v4l2_release_buffers(V4L2Context* ctx) - { -- struct v4l2_requestbuffers req = { -- .memory = V4L2_MEMORY_MMAP, -- .type = ctx->type, -- .count = 0, /* 0 -> unmaps buffers from the driver */ -- }; -- int i, j; -+ int i; -+ int ret = 0; -+ const int fd = ctx_to_m2mctx(ctx)->fd; - -- for (i = 0; i < ctx->num_buffers; i++) { -- V4L2Buffer *buffer = &ctx->buffers[i]; -+ // Orphan any buffers in the wild -+ ff_weak_link_break(&ctx->wl_master); - -- for (j = 0; j < buffer->num_planes; j++) { -- struct V4L2Plane_info *p = &buffer->plane_info[j]; -- if (p->mm_addr && p->length) -- if (munmap(p->mm_addr, p->length) < 0) -- av_log(logger(ctx), AV_LOG_ERROR, "%s unmap plane (%s))\n", ctx->name, av_err2str(AVERROR(errno))); -+ if (ctx->bufrefs) { -+ for (i = 0; i < ctx->num_buffers; i++) -+ av_buffer_unref(ctx->bufrefs + i); -+ } -+ -+ if (fd != -1) { -+ struct v4l2_requestbuffers req = { -+ .memory = V4L2_MEMORY_MMAP, -+ .type = ctx->type, -+ .count = 0, /* 0 -> unmap all buffers from the driver */ -+ }; -+ -+ while ((ret = ioctl(fd, VIDIOC_REQBUFS, &req)) == -1) { -+ if (errno == EINTR) -+ continue; -+ -+ ret = AVERROR(errno); -+ -+ av_log(logger(ctx), AV_LOG_ERROR, "release all %s buffers (%s)\n", -+ ctx->name, av_err2str(AVERROR(errno))); -+ -+ if (ctx_to_m2mctx(ctx)->output_drm) -+ av_log(logger(ctx), AV_LOG_ERROR, -+ "Make sure the DRM client releases all FB/GEM objects before closing the codec (ie):\n" -+ "for all buffers: \n" -+ " 1. drmModeRmFB(..)\n" -+ " 2. drmIoctl(.., DRM_IOCTL_GEM_CLOSE,... )\n"); - } - } -+ atomic_store(&ctx->q_count, 0); - -- return ioctl(ctx_to_m2mctx(ctx)->fd, VIDIOC_REQBUFS, &req); -+ return ret; - } - - static inline int v4l2_try_raw_format(V4L2Context* ctx, enum AVPixelFormat pixfmt) -@@ -499,6 +797,8 @@ static inline int v4l2_try_raw_format(V4 - - static int v4l2_get_raw_format(V4L2Context* ctx, enum AVPixelFormat *p) - { -+ V4L2m2mContext* s = ctx_to_m2mctx(ctx); -+ V4L2m2mPriv *priv = s->avctx->priv_data; - enum AVPixelFormat pixfmt = ctx->av_pix_fmt; - struct v4l2_fmtdesc fdesc; - int ret; -@@ -517,6 +817,13 @@ static int v4l2_get_raw_format(V4L2Conte - if (ret) - return AVERROR(EINVAL); - -+ if (priv->pix_fmt != AV_PIX_FMT_NONE) { -+ if (fdesc.pixelformat != ff_v4l2_format_avfmt_to_v4l2(priv->pix_fmt)) { -+ fdesc.index++; -+ continue; -+ } -+ } -+ - pixfmt = ff_v4l2_format_v4l2_to_avfmt(fdesc.pixelformat, AV_CODEC_ID_RAWVIDEO); - ret = v4l2_try_raw_format(ctx, pixfmt); - if (ret){ -@@ -569,30 +876,99 @@ static int v4l2_get_coded_format(V4L2Con - * - *****************************************************************************/ - -+ -+static void flush_all_buffers_status(V4L2Context* const ctx) -+{ -+ int i; -+ -+ if (!ctx->bufrefs) -+ return; -+ -+ for (i = 0; i < ctx->num_buffers; ++i) { -+ struct V4L2Buffer * const buf = (struct V4L2Buffer *)ctx->bufrefs[i]->data; -+ if (buf->status == V4L2BUF_IN_DRIVER) -+ ff_v4l2_buffer_set_avail(buf); -+ } -+ atomic_store(&ctx->q_count, 0); -+} -+ -+static int stuff_all_buffers(AVCodecContext * avctx, V4L2Context* ctx) -+{ -+ int i; -+ int rv; -+ -+ if (!ctx->bufrefs) { -+ rv = ff_v4l2_context_init(ctx); -+ if (rv) { -+ av_log(avctx, AV_LOG_ERROR, "can't request capture buffers\n"); -+ return rv; -+ } -+ } -+ -+ for (i = 0; i < ctx->num_buffers; ++i) { -+ struct V4L2Buffer * const buf = (struct V4L2Buffer *)ctx->bufrefs[i]->data; -+ if (buf->status == V4L2BUF_AVAILABLE) { -+ rv = ff_v4l2_buffer_enqueue(buf); -+ if (rv < 0) -+ return rv; -+ } -+ } -+ return 0; -+} -+ - int ff_v4l2_context_set_status(V4L2Context* ctx, uint32_t cmd) - { - int type = ctx->type; -- int ret; -+ int ret = 0; -+ AVCodecContext * const avctx = logger(ctx); - -- ret = ioctl(ctx_to_m2mctx(ctx)->fd, cmd, &type); -- if (ret < 0) -- return AVERROR(errno); -+ // Avoid doing anything if there is nothing we can do -+ if (cmd == VIDIOC_STREAMOFF && !ctx_buffers_alloced(ctx) && !ctx->streamon) -+ return 0; - -- ctx->streamon = (cmd == VIDIOC_STREAMON); -+ ff_mutex_lock(&ctx->lock); - -- return 0; -+ if (cmd == VIDIOC_STREAMON && !V4L2_TYPE_IS_OUTPUT(ctx->type)) -+ stuff_all_buffers(avctx, ctx); -+ -+ if (ioctl(ctx_to_m2mctx(ctx)->fd, cmd, &type) < 0) { -+ const int err = errno; -+ av_log(avctx, AV_LOG_ERROR, "%s set status %d (%s) failed: err=%d\n", ctx->name, -+ cmd, (cmd == VIDIOC_STREAMON) ? "ON" : "OFF", err); -+ ret = AVERROR(err); -+ } -+ else -+ { -+ if (cmd == VIDIOC_STREAMOFF) -+ flush_all_buffers_status(ctx); -+ else -+ ctx->first_buf = 1; -+ -+ ctx->streamon = (cmd == VIDIOC_STREAMON); -+ av_log(avctx, AV_LOG_DEBUG, "%s set status %d (%s) OK\n", ctx->name, -+ cmd, (cmd == VIDIOC_STREAMON) ? "ON" : "OFF"); -+ } -+ -+ // Both stream off & on effectively clear flag_last -+ ctx->flag_last = 0; -+ -+ ff_mutex_unlock(&ctx->lock); -+ -+ return ret; - } - - int ff_v4l2_context_enqueue_frame(V4L2Context* ctx, const AVFrame* frame) - { -- V4L2m2mContext *s = ctx_to_m2mctx(ctx); -+ V4L2m2mContext *const s = ctx_to_m2mctx(ctx); -+ AVCodecContext *const avctx = s->avctx; -+ int64_t track_ts; - V4L2Buffer* avbuf; - int ret; - - if (!frame) { - ret = v4l2_stop_encode(ctx); - if (ret) -- av_log(logger(ctx), AV_LOG_ERROR, "%s stop_encode\n", ctx->name); -+ av_log(avctx, AV_LOG_ERROR, "%s stop_encode\n", ctx->name); - s->draining= 1; - return 0; - } -@@ -601,23 +977,29 @@ int ff_v4l2_context_enqueue_frame(V4L2Co - if (!avbuf) - return AVERROR(ENOMEM); - -- ret = ff_v4l2_buffer_avframe_to_buf(frame, avbuf); -+ track_ts = xlat_pts_frame_in(avctx, &s->xlat, frame); -+ -+ ret = ff_v4l2_buffer_avframe_to_buf(frame, avbuf, track_ts); - if (ret) - return ret; - - return ff_v4l2_buffer_enqueue(avbuf); - } - --int ff_v4l2_context_enqueue_packet(V4L2Context* ctx, const AVPacket* pkt) -+int ff_v4l2_context_enqueue_packet(V4L2Context* ctx, const AVPacket* pkt, -+ const void * extdata, size_t extlen) - { - V4L2m2mContext *s = ctx_to_m2mctx(ctx); -+ AVCodecContext *const avctx = s->avctx; - V4L2Buffer* avbuf; - int ret; -+ int64_t track_ts; - - if (!pkt->size) { - ret = v4l2_stop_decode(ctx); -+ // Log but otherwise ignore stop failure - if (ret) -- av_log(logger(ctx), AV_LOG_ERROR, "%s stop_decode\n", ctx->name); -+ av_log(avctx, AV_LOG_ERROR, "%s stop_decode failed: err=%d\n", ctx->name, ret); - s->draining = 1; - return 0; - } -@@ -626,8 +1008,13 @@ int ff_v4l2_context_enqueue_packet(V4L2C - if (!avbuf) - return AVERROR(EAGAIN); - -- ret = ff_v4l2_buffer_avpkt_to_buf(pkt, avbuf); -- if (ret) -+ track_ts = xlat_pts_pkt_in(avctx, &s->xlat, pkt); -+ -+ ret = ff_v4l2_buffer_avpkt_to_buf_ext(pkt, avbuf, extdata, extlen, track_ts); -+ if (ret == AVERROR(ENOMEM)) -+ av_log(logger(ctx), AV_LOG_ERROR, "Buffer overflow in %s: pkt->size=%d > buf->length=%d\n", -+ __func__, pkt->size, avbuf->planes[0].length); -+ else if (ret) - return ret; - - return ff_v4l2_buffer_enqueue(avbuf); -@@ -635,42 +1022,36 @@ int ff_v4l2_context_enqueue_packet(V4L2C - - int ff_v4l2_context_dequeue_frame(V4L2Context* ctx, AVFrame* frame, int timeout) - { -+ V4L2m2mContext *s = ctx_to_m2mctx(ctx); -+ AVCodecContext *const avctx = s->avctx; - V4L2Buffer *avbuf; -+ int rv; - -- /* -- * timeout=-1 blocks until: -- * 1. decoded frame available -- * 2. an input buffer is ready to be dequeued -- */ -- avbuf = v4l2_dequeue_v4l2buf(ctx, timeout); -- if (!avbuf) { -- if (ctx->done) -- return AVERROR_EOF; -- -- return AVERROR(EAGAIN); -- } -+ do { -+ if ((rv = get_qbuf(ctx, &avbuf, timeout)) != 0) -+ return rv; -+ if ((rv = ff_v4l2_buffer_buf_to_avframe(frame, avbuf)) != 0) -+ return rv; -+ } while (xlat_pts_frame_out(avctx, &s->xlat, frame) != 0); - -- return ff_v4l2_buffer_buf_to_avframe(frame, avbuf); -+ return 0; - } - - int ff_v4l2_context_dequeue_packet(V4L2Context* ctx, AVPacket* pkt) - { -+ V4L2m2mContext *s = ctx_to_m2mctx(ctx); -+ AVCodecContext *const avctx = s->avctx; - V4L2Buffer *avbuf; -+ int rv; - -- /* -- * blocks until: -- * 1. encoded packet available -- * 2. an input buffer ready to be dequeued -- */ -- avbuf = v4l2_dequeue_v4l2buf(ctx, -1); -- if (!avbuf) { -- if (ctx->done) -- return AVERROR_EOF; -+ do { -+ if ((rv = get_qbuf(ctx, &avbuf, -1)) != 0) -+ return rv == AVERROR(ENOSPC) ? AVERROR(EAGAIN) : rv; // Caller not currently expecting ENOSPC -+ if ((rv = ff_v4l2_buffer_buf_to_avpkt(pkt, avbuf)) != 0) -+ return rv; -+ } while (xlat_pts_pkt_out(avctx, &s->xlat, pkt) != 0); - -- return AVERROR(EAGAIN); -- } -- -- return ff_v4l2_buffer_buf_to_avpkt(pkt, avbuf); -+ return 0; - } - - int ff_v4l2_context_get_format(V4L2Context* ctx, int probe) -@@ -702,78 +1083,160 @@ int ff_v4l2_context_get_format(V4L2Conte - - int ff_v4l2_context_set_format(V4L2Context* ctx) - { -- return ioctl(ctx_to_m2mctx(ctx)->fd, VIDIOC_S_FMT, &ctx->format); -+ int ret; -+ -+ ret = ioctl(ctx_to_m2mctx(ctx)->fd, VIDIOC_S_FMT, &ctx->format); -+ if (ret != 0) -+ return ret; -+ -+ // Check returned size against min size and if smaller have another go -+ // Only worry about plane[0] as this is meant to enforce limits for -+ // encoded streams where we might know a bit more about the shape -+ // than the driver -+ if (V4L2_TYPE_IS_MULTIPLANAR(ctx->format.type)) { -+ if (ctx->min_buf_size <= ctx->format.fmt.pix_mp.plane_fmt[0].sizeimage) -+ return 0; -+ ctx->format.fmt.pix_mp.plane_fmt[0].sizeimage = ctx->min_buf_size; -+ } -+ else { -+ if (ctx->min_buf_size <= ctx->format.fmt.pix.sizeimage) -+ return 0; -+ ctx->format.fmt.pix.sizeimage = ctx->min_buf_size; -+ } -+ -+ ret = ioctl(ctx_to_m2mctx(ctx)->fd, VIDIOC_S_FMT, &ctx->format); -+ return ret; - } - - void ff_v4l2_context_release(V4L2Context* ctx) - { - int ret; - -- if (!ctx->buffers) -+ if (!ctx->bufrefs) - return; - - ret = v4l2_release_buffers(ctx); - if (ret) - av_log(logger(ctx), AV_LOG_WARNING, "V4L2 failed to unmap the %s buffers\n", ctx->name); - -- av_freep(&ctx->buffers); -+ av_freep(&ctx->bufrefs); -+ av_buffer_unref(&ctx->frames_ref); -+ -+ ff_mutex_destroy(&ctx->lock); -+ pthread_cond_destroy(&ctx->cond); - } - --int ff_v4l2_context_init(V4L2Context* ctx) -+ -+static int create_buffers(V4L2Context* const ctx, const unsigned int req_buffers, const enum v4l2_memory mem) - { -- V4L2m2mContext *s = ctx_to_m2mctx(ctx); -+ V4L2m2mContext * const s = ctx_to_m2mctx(ctx); - struct v4l2_requestbuffers req; -- int ret, i; -- -- if (!v4l2_type_supported(ctx)) { -- av_log(logger(ctx), AV_LOG_ERROR, "type %i not supported\n", ctx->type); -- return AVERROR_PATCHWELCOME; -- } -+ int ret; -+ int i; - -- ret = ioctl(s->fd, VIDIOC_G_FMT, &ctx->format); -- if (ret) -- av_log(logger(ctx), AV_LOG_ERROR, "%s VIDIOC_G_FMT failed\n", ctx->name); -+ av_assert0(ctx->bufrefs == NULL); - - memset(&req, 0, sizeof(req)); -- req.count = ctx->num_buffers; -- req.memory = V4L2_MEMORY_MMAP; -+ req.count = req_buffers; -+ req.memory = mem; - req.type = ctx->type; -- ret = ioctl(s->fd, VIDIOC_REQBUFS, &req); -- if (ret < 0) { -- av_log(logger(ctx), AV_LOG_ERROR, "%s VIDIOC_REQBUFS failed: %s\n", ctx->name, strerror(errno)); -- return AVERROR(errno); -+ while ((ret = ioctl(s->fd, VIDIOC_REQBUFS, &req)) == -1) { -+ if (errno != EINTR) { -+ ret = AVERROR(errno); -+ av_log(logger(ctx), AV_LOG_ERROR, "%s VIDIOC_REQBUFS failed: %s\n", ctx->name, av_err2str(ret)); -+ return ret; -+ } - } - - ctx->num_buffers = req.count; -- ctx->buffers = av_mallocz(ctx->num_buffers * sizeof(V4L2Buffer)); -- if (!ctx->buffers) { -+ ctx->bufrefs = av_mallocz(ctx->num_buffers * sizeof(*ctx->bufrefs)); -+ if (!ctx->bufrefs) { - av_log(logger(ctx), AV_LOG_ERROR, "%s malloc enomem\n", ctx->name); -- return AVERROR(ENOMEM); -+ goto fail_release; - } - -- for (i = 0; i < req.count; i++) { -- ctx->buffers[i].context = ctx; -- ret = ff_v4l2_buffer_initialize(&ctx->buffers[i], i); -- if (ret < 0) { -+ ctx->wl_master = ff_weak_link_new(ctx); -+ if (!ctx->wl_master) { -+ ret = AVERROR(ENOMEM); -+ goto fail_release; -+ } -+ -+ for (i = 0; i < ctx->num_buffers; i++) { -+ ret = ff_v4l2_buffer_initialize(&ctx->bufrefs[i], i, ctx, mem); -+ if (ret) { - av_log(logger(ctx), AV_LOG_ERROR, "%s buffer[%d] initialization (%s)\n", ctx->name, i, av_err2str(ret)); -- goto error; -+ goto fail_release; - } - } - - av_log(logger(ctx), AV_LOG_DEBUG, "%s: %s %02d buffers initialized: %04ux%04u, sizeimage %08u, bytesperline %08u\n", ctx->name, - V4L2_TYPE_IS_MULTIPLANAR(ctx->type) ? av_fourcc2str(ctx->format.fmt.pix_mp.pixelformat) : av_fourcc2str(ctx->format.fmt.pix.pixelformat), - req.count, -- v4l2_get_width(&ctx->format), -- v4l2_get_height(&ctx->format), -+ ff_v4l2_get_format_width(&ctx->format), -+ ff_v4l2_get_format_height(&ctx->format), - V4L2_TYPE_IS_MULTIPLANAR(ctx->type) ? ctx->format.fmt.pix_mp.plane_fmt[0].sizeimage : ctx->format.fmt.pix.sizeimage, - V4L2_TYPE_IS_MULTIPLANAR(ctx->type) ? ctx->format.fmt.pix_mp.plane_fmt[0].bytesperline : ctx->format.fmt.pix.bytesperline); - - return 0; - --error: -+fail_release: - v4l2_release_buffers(ctx); -+ av_freep(&ctx->bufrefs); -+ return ret; -+} -+ -+int ff_v4l2_context_init(V4L2Context* ctx) -+{ -+ V4L2m2mContext * const s = ctx_to_m2mctx(ctx); -+ int ret; -+ -+ // It is not valid to reinit a context without a previous release -+ av_assert0(ctx->bufrefs == NULL); - -- av_freep(&ctx->buffers); -+ if (!v4l2_type_supported(ctx)) { -+ av_log(logger(ctx), AV_LOG_ERROR, "type %i not supported\n", ctx->type); -+ return AVERROR_PATCHWELCOME; -+ } -+ -+ ff_mutex_init(&ctx->lock, NULL); -+ pthread_cond_init(&ctx->cond, NULL); -+ atomic_init(&ctx->q_count, 0); -+ -+ if (s->output_drm) { -+ AVHWFramesContext *hwframes; -+ -+ ctx->frames_ref = av_hwframe_ctx_alloc(s->device_ref); -+ if (!ctx->frames_ref) { -+ ret = AVERROR(ENOMEM); -+ goto fail_unlock; -+ } -+ -+ hwframes = (AVHWFramesContext*)ctx->frames_ref->data; -+ hwframes->format = AV_PIX_FMT_DRM_PRIME; -+ hwframes->sw_format = ctx->av_pix_fmt; -+ hwframes->width = ctx->width != 0 ? ctx->width : s->avctx->width; -+ hwframes->height = ctx->height != 0 ? ctx->height : s->avctx->height; -+ ret = av_hwframe_ctx_init(ctx->frames_ref); -+ if (ret < 0) -+ goto fail_unref_hwframes; -+ } -+ -+ ret = ioctl(s->fd, VIDIOC_G_FMT, &ctx->format); -+ if (ret) { -+ ret = AVERROR(errno); -+ av_log(logger(ctx), AV_LOG_ERROR, "%s VIDIOC_G_FMT failed: %s\n", ctx->name, av_err2str(ret)); -+ goto fail_unref_hwframes; -+ } -+ -+ ret = create_buffers(ctx, ctx->num_buffers, ctx->buf_mem); -+ if (ret < 0) -+ goto fail_unref_hwframes; -+ -+ return 0; - -+fail_unref_hwframes: -+ av_buffer_unref(&ctx->frames_ref); -+fail_unlock: -+ ff_mutex_destroy(&ctx->lock); - return ret; - } ---- a/libavcodec/v4l2_context.h -+++ b/libavcodec/v4l2_context.h -@@ -31,6 +31,7 @@ - #include "libavutil/pixfmt.h" - #include "libavutil/frame.h" - #include "libavutil/buffer.h" -+#include "libavutil/thread.h" - #include "v4l2_buffers.h" - - typedef struct V4L2Context { -@@ -70,11 +71,18 @@ typedef struct V4L2Context { - */ - int width, height; - AVRational sample_aspect_ratio; -+ struct v4l2_rect selection; - - /** -- * Indexed array of V4L2Buffers -+ * If the default size of buffer is less than this then try to -+ * set to this. - */ -- V4L2Buffer *buffers; -+ uint32_t min_buf_size; -+ -+ /** -+ * Indexed array of pointers to V4L2Buffers -+ */ -+ AVBufferRef **bufrefs; - - /** - * Readonly after init. -@@ -82,16 +90,38 @@ typedef struct V4L2Context { - int num_buffers; - - /** -+ * Buffer memory type V4L2_MEMORY_MMAP or V4L2_MEMORY_DMABUF -+ */ -+ enum v4l2_memory buf_mem; -+ -+ /** - * Whether the stream has been started (VIDIOC_STREAMON has been sent). - */ - int streamon; - -+ /* 1st buffer after stream on */ -+ int first_buf; -+ - /** - * Either no more buffers available or an unrecoverable error was notified - * by the V4L2 kernel driver: once set the context has to be exited. - */ - int done; - -+ int flag_last; -+ -+ /** -+ * If NZ then when Qing frame/pkt use this rather than the -+ * "real" PTS -+ */ -+ uint64_t track_ts; -+ -+ AVBufferRef *frames_ref; -+ atomic_int q_count; -+ struct ff_weak_link_master *wl_master; -+ -+ AVMutex lock; -+ pthread_cond_t cond; - } V4L2Context; - - /** -@@ -156,7 +186,10 @@ int ff_v4l2_context_dequeue_packet(V4L2C - * @param[in] ctx The V4L2Context to dequeue from. - * @param[inout] f The AVFrame to dequeue to. - * @param[in] timeout The timeout for dequeue (-1 to block, 0 to return immediately, or milliseconds) -+ * - * @return 0 in case of success, AVERROR(EAGAIN) if no buffer was ready, another negative error in case of error. -+ * AVERROR(ENOSPC) if no buffer availible to put -+ * the frame in - */ - int ff_v4l2_context_dequeue_frame(V4L2Context* ctx, AVFrame* f, int timeout); - -@@ -170,7 +203,7 @@ int ff_v4l2_context_dequeue_frame(V4L2Co - * @param[in] pkt A pointer to an AVPacket. - * @return 0 in case of success, a negative error otherwise. - */ --int ff_v4l2_context_enqueue_packet(V4L2Context* ctx, const AVPacket* pkt); -+int ff_v4l2_context_enqueue_packet(V4L2Context* ctx, const AVPacket* pkt, const void * ext_data, size_t ext_size); - - /** - * Enqueues a buffer to a V4L2Context from an AVFrame ---- a/libavcodec/v4l2_m2m.c -+++ b/libavcodec/v4l2_m2m.c -@@ -36,6 +36,14 @@ - #include "v4l2_fmt.h" - #include "v4l2_m2m.h" - -+static void -+xlat_init(xlat_track_t * const x) -+{ -+ memset(x, 0, sizeof(*x)); -+ x->last_pts = AV_NOPTS_VALUE; -+} -+ -+ - static inline int v4l2_splane_video(struct v4l2_capability *cap) - { - if (cap->capabilities & (V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_VIDEO_OUTPUT) && -@@ -68,7 +76,9 @@ static int v4l2_prepare_contexts(V4L2m2m - - s->capture.done = s->output.done = 0; - s->capture.name = "capture"; -+ s->capture.buf_mem = V4L2_MEMORY_MMAP; - s->output.name = "output"; -+ s->output.buf_mem = s->input_drm ? V4L2_MEMORY_DMABUF : V4L2_MEMORY_MMAP; - atomic_init(&s->refcount, 0); - sem_init(&s->refsync, 0, 0); - -@@ -215,13 +225,7 @@ int ff_v4l2_m2m_codec_reinit(V4L2m2mCont - av_log(log_ctx, AV_LOG_ERROR, "capture VIDIOC_STREAMOFF\n"); - - /* 2. unmap the capture buffers (v4l2 and ffmpeg): -- * we must wait for all references to be released before being allowed -- * to queue new buffers. - */ -- av_log(log_ctx, AV_LOG_DEBUG, "waiting for user to release AVBufferRefs\n"); -- if (atomic_load(&s->refcount)) -- while(sem_wait(&s->refsync) == -1 && errno == EINTR); -- - ff_v4l2_context_release(&s->capture); - - /* 3. get the new capture format */ -@@ -240,7 +244,6 @@ int ff_v4l2_m2m_codec_reinit(V4L2m2mCont - - /* 5. complete reinit */ - s->draining = 0; -- s->reinit = 0; - - return 0; - } -@@ -274,7 +277,6 @@ int ff_v4l2_m2m_codec_full_reinit(V4L2m2 - - /* start again now that we know the stream dimensions */ - s->draining = 0; -- s->reinit = 0; - - ret = ff_v4l2_context_get_format(&s->output, 0); - if (ret) { -@@ -328,7 +330,13 @@ static void v4l2_m2m_destroy_context(voi - ff_v4l2_context_release(&s->capture); - sem_destroy(&s->refsync); - -- close(s->fd); -+ if (s->fd != -1) -+ close(s->fd); -+ -+ av_packet_unref(&s->buf_pkt); -+ av_freep(&s->extdata_data); -+ -+ av_log(s->avctx, AV_LOG_DEBUG, "V4L2 Context destroyed\n"); - - av_free(s); - } -@@ -338,17 +346,34 @@ int ff_v4l2_m2m_codec_end(V4L2m2mPriv *p - V4L2m2mContext *s = priv->context; - int ret; - -- ret = ff_v4l2_context_set_status(&s->output, VIDIOC_STREAMOFF); -- if (ret) -- av_log(s->avctx, AV_LOG_ERROR, "VIDIOC_STREAMOFF %s\n", s->output.name); -+ if (!s) -+ return 0; - -- ret = ff_v4l2_context_set_status(&s->capture, VIDIOC_STREAMOFF); -- if (ret) -- av_log(s->avctx, AV_LOG_ERROR, "VIDIOC_STREAMOFF %s\n", s->capture.name); -+ av_log(s->avctx, AV_LOG_DEBUG, "V4L2 Codec end\n"); -+ -+ if (av_codec_is_decoder(s->avctx->codec)) -+ av_packet_unref(&s->buf_pkt); -+ -+ if (s->fd >= 0) { -+ ret = ff_v4l2_context_set_status(&s->output, VIDIOC_STREAMOFF); -+ if (ret) -+ av_log(s->avctx, AV_LOG_ERROR, "VIDIOC_STREAMOFF %s\n", s->output.name); -+ -+ ret = ff_v4l2_context_set_status(&s->capture, VIDIOC_STREAMOFF); -+ if (ret) -+ av_log(s->avctx, AV_LOG_ERROR, "VIDIOC_STREAMOFF %s\n", s->capture.name); -+ } - - ff_v4l2_context_release(&s->output); - -+ close(s->fd); -+ s->fd = -1; -+ - s->self_ref = NULL; -+ // This is only called on avctx close so after this point we don't have that -+ // Crash sooner if we find we are using it (can still log with avctx = NULL) -+ s->avctx = NULL; -+ priv->context = NULL; - av_buffer_unref(&priv->context_ref); - - return 0; -@@ -392,28 +417,33 @@ int ff_v4l2_m2m_codec_init(V4L2m2mPriv * - return v4l2_configure_contexts(s); - } - --int ff_v4l2_m2m_create_context(V4L2m2mPriv *priv, V4L2m2mContext **s) -+int ff_v4l2_m2m_create_context(V4L2m2mPriv *priv, V4L2m2mContext **pps) - { -- *s = av_mallocz(sizeof(V4L2m2mContext)); -- if (!*s) -+ V4L2m2mContext * const s = av_mallocz(sizeof(V4L2m2mContext)); -+ -+ *pps = NULL; -+ if (!s) - return AVERROR(ENOMEM); - -- priv->context_ref = av_buffer_create((uint8_t *) *s, sizeof(V4L2m2mContext), -+ priv->context_ref = av_buffer_create((uint8_t *)s, sizeof(*s), - &v4l2_m2m_destroy_context, NULL, 0); - if (!priv->context_ref) { -- av_freep(s); -+ av_free(s); - return AVERROR(ENOMEM); - } - - /* assign the context */ -- priv->context = *s; -- (*s)->priv = priv; -+ priv->context = s; -+ s->priv = priv; - - /* populate it */ -- priv->context->capture.num_buffers = priv->num_capture_buffers; -- priv->context->output.num_buffers = priv->num_output_buffers; -- priv->context->self_ref = priv->context_ref; -- priv->context->fd = -1; -+ s->capture.num_buffers = priv->num_capture_buffers; -+ s->output.num_buffers = priv->num_output_buffers; -+ s->self_ref = priv->context_ref; -+ s->fd = -1; -+ -+ xlat_init(&s->xlat); - -+ *pps = s; - return 0; - } ---- a/libavcodec/v4l2_m2m.h -+++ b/libavcodec/v4l2_m2m.h -@@ -30,6 +30,7 @@ - #include - - #include "libavcodec/avcodec.h" -+#include "libavutil/pixfmt.h" - #include "v4l2_context.h" - - #define container_of(ptr, type, member) ({ \ -@@ -38,7 +39,37 @@ - - #define V4L_M2M_DEFAULT_OPTS \ - { "num_output_buffers", "Number of buffers in the output context",\ -- OFFSET(num_output_buffers), AV_OPT_TYPE_INT, { .i64 = 16 }, 6, INT_MAX, FLAGS } -+ OFFSET(num_output_buffers), AV_OPT_TYPE_INT, { .i64 = 16 }, 2, INT_MAX, FLAGS } -+ -+#define FF_V4L2_M2M_TRACK_SIZE 128 -+typedef struct V4L2m2mTrackEl { -+ int discard; // If we see this buffer its been flushed, so discard -+ int pending; -+ int pkt_size; -+ int64_t pts; -+ int64_t dts; -+ int64_t reordered_opaque; -+ int64_t pkt_pos; -+ int64_t pkt_duration; -+ int64_t track_pts; -+} V4L2m2mTrackEl; -+ -+typedef struct pts_stats_s -+{ -+ void * logctx; -+ const char * name; // For debug -+ unsigned int last_count; -+ unsigned int last_interval; -+ int64_t last_pts; -+ int64_t guess; -+} pts_stats_t; -+ -+typedef struct xlat_track_s { -+ unsigned int track_no; -+ int64_t last_pts; -+ int64_t last_opaque; -+ V4L2m2mTrackEl track_els[FF_V4L2_M2M_TRACK_SIZE]; -+} xlat_track_t; - - typedef struct V4L2m2mContext { - char devname[PATH_MAX]; -@@ -52,7 +83,6 @@ typedef struct V4L2m2mContext { - AVCodecContext *avctx; - sem_t refsync; - atomic_uint refcount; -- int reinit; - - /* null frame/packet received */ - int draining; -@@ -63,6 +93,36 @@ typedef struct V4L2m2mContext { - - /* reference back to V4L2m2mPriv */ - void *priv; -+ -+ AVBufferRef *device_ref; -+ -+ /* generate DRM frames */ -+ int output_drm; -+ -+ /* input frames are drmprime */ -+ int input_drm; -+ -+ /* Frame tracking */ -+ xlat_track_t xlat; -+ int pending_hw; -+ int pending_n; -+ -+ pts_stats_t pts_stat; -+ -+ /* req pkt */ -+ int req_pkt; -+ -+ /* Ext data sent */ -+ int extdata_sent; -+ /* Ext data sent in packet - overrides ctx */ -+ uint8_t * extdata_data; -+ size_t extdata_size; -+ -+#define FF_V4L2_QUIRK_REINIT_ALWAYS 1 -+#define FF_V4L2_QUIRK_ENUM_FRAMESIZES_BROKEN 2 -+ /* Quirks */ -+ unsigned int quirks; -+ - } V4L2m2mContext; - - typedef struct V4L2m2mPriv { -@@ -73,6 +133,7 @@ typedef struct V4L2m2mPriv { - - int num_output_buffers; - int num_capture_buffers; -+ enum AVPixelFormat pix_fmt; - } V4L2m2mPriv; - - /** -@@ -126,4 +187,26 @@ int ff_v4l2_m2m_codec_reinit(V4L2m2mCont - */ - int ff_v4l2_m2m_codec_full_reinit(V4L2m2mContext *ctx); - -+ -+static inline unsigned int ff_v4l2_get_format_width(const struct v4l2_format * const fmt) -+{ -+ return V4L2_TYPE_IS_MULTIPLANAR(fmt->type) ? fmt->fmt.pix_mp.width : fmt->fmt.pix.width; -+} -+ -+static inline unsigned int ff_v4l2_get_format_height(const struct v4l2_format * const fmt) -+{ -+ return V4L2_TYPE_IS_MULTIPLANAR(fmt->type) ? fmt->fmt.pix_mp.height : fmt->fmt.pix.height; -+} -+ -+static inline uint32_t ff_v4l2_get_format_pixelformat(const struct v4l2_format * const fmt) -+{ -+ return V4L2_TYPE_IS_MULTIPLANAR(fmt->type) ? fmt->fmt.pix_mp.pixelformat : fmt->fmt.pix.pixelformat; -+} -+ -+static inline int ff_v4l2_ctx_eos(const V4L2Context * const ctx) -+{ -+ return ctx->flag_last; -+} -+ -+ - #endif /* AVCODEC_V4L2_M2M_H */ ---- a/libavcodec/v4l2_m2m_dec.c -+++ b/libavcodec/v4l2_m2m_dec.c -@@ -23,6 +23,10 @@ - - #include - #include -+ -+#include "libavutil/avassert.h" -+#include "libavutil/hwcontext.h" -+#include "libavutil/hwcontext_drm.h" - #include "libavutil/pixfmt.h" - #include "libavutil/pixdesc.h" - #include "libavutil/opt.h" -@@ -30,75 +34,111 @@ - #include "libavcodec/decode.h" - #include "libavcodec/internal.h" - -+#include "libavcodec/hwaccels.h" -+#include "libavcodec/internal.h" -+#include "libavcodec/hwconfig.h" -+ - #include "v4l2_context.h" - #include "v4l2_m2m.h" - #include "v4l2_fmt.h" - --static int v4l2_try_start(AVCodecContext *avctx) -+// Pick 64 for max last count - that is >1sec at 60fps -+#define STATS_LAST_COUNT_MAX 64 -+#define STATS_INTERVAL_MAX (1 << 30) -+ -+#ifndef FF_API_BUFFER_SIZE_T -+#define FF_API_BUFFER_SIZE_T 1 -+#endif -+ -+static int64_t pts_stats_guess(const pts_stats_t * const stats) - { -- V4L2m2mContext *s = ((V4L2m2mPriv*)avctx->priv_data)->context; -- V4L2Context *const capture = &s->capture; -- V4L2Context *const output = &s->output; -- struct v4l2_selection selection = { 0 }; -- int ret; -+ if (stats->last_pts == AV_NOPTS_VALUE || -+ stats->last_interval == 0 || -+ stats->last_count >= STATS_LAST_COUNT_MAX) -+ return AV_NOPTS_VALUE; -+ return stats->last_pts + (int64_t)(stats->last_count - 1) * (int64_t)stats->last_interval; -+} - -- /* 1. start the output process */ -- if (!output->streamon) { -- ret = ff_v4l2_context_set_status(output, VIDIOC_STREAMON); -- if (ret < 0) { -- av_log(avctx, AV_LOG_DEBUG, "VIDIOC_STREAMON on output context\n"); -- return ret; -+static void pts_stats_add(pts_stats_t * const stats, int64_t pts) -+{ -+ if (pts == AV_NOPTS_VALUE || pts == stats->last_pts) { -+ if (stats->last_count < STATS_LAST_COUNT_MAX) -+ ++stats->last_count; -+ return; -+ } -+ -+ if (stats->last_pts != AV_NOPTS_VALUE) { -+ const int64_t interval = pts - stats->last_pts; -+ -+ if (interval < 0 || interval >= STATS_INTERVAL_MAX || -+ stats->last_count >= STATS_LAST_COUNT_MAX) { -+ if (stats->last_interval != 0) -+ av_log(stats->logctx, AV_LOG_DEBUG, "%s: %s: Bad interval: %" PRId64 "/%d\n", -+ __func__, stats->name, interval, stats->last_count); -+ stats->last_interval = 0; -+ } -+ else { -+ const int64_t frame_time = interval / (int64_t)stats->last_count; -+ -+ if (frame_time != stats->last_interval) -+ av_log(stats->logctx, AV_LOG_DEBUG, "%s: %s: New interval: %u->%" PRId64 "/%d=%" PRId64 "\n", -+ __func__, stats->name, stats->last_interval, interval, stats->last_count, frame_time); -+ stats->last_interval = frame_time; - } - } - -- if (capture->streamon) -+ stats->last_pts = pts; -+ stats->last_count = 1; -+} -+ -+static void pts_stats_init(pts_stats_t * const stats, void * logctx, const char * name) -+{ -+ *stats = (pts_stats_t){ -+ .logctx = logctx, -+ .name = name, -+ .last_count = 1, -+ .last_interval = 0, -+ .last_pts = AV_NOPTS_VALUE -+ }; -+} -+ -+static int check_output_streamon(AVCodecContext *const avctx, V4L2m2mContext *const s) -+{ -+ int ret; -+ struct v4l2_decoder_cmd cmd = { -+ .cmd = V4L2_DEC_CMD_START, -+ .flags = 0, -+ }; -+ -+ if (s->output.streamon) - return 0; - -- /* 2. get the capture format */ -- capture->format.type = capture->type; -- ret = ioctl(s->fd, VIDIOC_G_FMT, &capture->format); -- if (ret) { -- av_log(avctx, AV_LOG_WARNING, "VIDIOC_G_FMT ioctl\n"); -+ ret = ff_v4l2_context_set_status(&s->output, VIDIOC_STREAMON); -+ if (ret != 0) { -+ av_log(avctx, AV_LOG_ERROR, "VIDIOC_STREAMON on output context: %s\n", av_err2str(ret)); - return ret; - } - -- /* 2.1 update the AVCodecContext */ -- avctx->pix_fmt = ff_v4l2_format_v4l2_to_avfmt(capture->format.fmt.pix_mp.pixelformat, AV_CODEC_ID_RAWVIDEO); -- capture->av_pix_fmt = avctx->pix_fmt; -- -- /* 3. set the crop parameters */ -- selection.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; -- selection.r.height = avctx->coded_height; -- selection.r.width = avctx->coded_width; -- ret = ioctl(s->fd, VIDIOC_S_SELECTION, &selection); -- if (!ret) { -- ret = ioctl(s->fd, VIDIOC_G_SELECTION, &selection); -- if (ret) { -- av_log(avctx, AV_LOG_WARNING, "VIDIOC_G_SELECTION ioctl\n"); -- } else { -- av_log(avctx, AV_LOG_DEBUG, "crop output %dx%d\n", selection.r.width, selection.r.height); -- /* update the size of the resulting frame */ -- capture->height = selection.r.height; -- capture->width = selection.r.width; -- } -+ // STREAMON should do implicit START so this just for those that don't. -+ // It is optional so don't worry if it fails -+ if (ioctl(s->fd, VIDIOC_DECODER_CMD, &cmd) < 0) { -+ ret = AVERROR(errno); -+ av_log(avctx, AV_LOG_WARNING, "VIDIOC_DECODER_CMD start error: %s\n", av_err2str(ret)); - } -- -- /* 4. init the capture context now that we have the capture format */ -- if (!capture->buffers) { -- ret = ff_v4l2_context_init(capture); -- if (ret) { -- av_log(avctx, AV_LOG_ERROR, "can't request capture buffers\n"); -- return AVERROR(ENOMEM); -- } -+ else { -+ av_log(avctx, AV_LOG_TRACE, "VIDIOC_DECODER_CMD start OK\n"); - } -+ return 0; -+} - -- /* 5. start the capture process */ -- ret = ff_v4l2_context_set_status(capture, VIDIOC_STREAMON); -- if (ret) { -- av_log(avctx, AV_LOG_DEBUG, "VIDIOC_STREAMON, on capture context\n"); -- return ret; -- } -+static int v4l2_try_start(AVCodecContext *avctx) -+{ -+ V4L2m2mContext * const s = ((V4L2m2mPriv*)avctx->priv_data)->context; -+ int ret; - -+ /* 1. start the output process */ -+ if ((ret = check_output_streamon(avctx, s)) != 0) -+ return ret; - return 0; - } - -@@ -133,52 +173,525 @@ static int v4l2_prepare_decoder(V4L2m2mC - return 0; - } - --static int v4l2_receive_frame(AVCodecContext *avctx, AVFrame *frame) -+static void -+set_best_effort_pts(AVCodecContext *const avctx, -+ pts_stats_t * const ps, -+ AVFrame *const frame) -+{ -+ pts_stats_add(ps, frame->pts); -+ -+#if FF_API_PKT_PTS -+FF_DISABLE_DEPRECATION_WARNINGS -+ frame->pkt_pts = frame->pts; -+FF_ENABLE_DEPRECATION_WARNINGS -+#endif -+ frame->best_effort_timestamp = pts_stats_guess(ps); -+ // If we can't guess from just PTS - try DTS -+ if (frame->best_effort_timestamp == AV_NOPTS_VALUE) -+ frame->best_effort_timestamp = frame->pkt_dts; -+ -+ // We can't emulate what s/w does in a useful manner and using the -+ // "correct" answer seems to just confuse things. -+ frame->pkt_dts = frame->pts; -+ av_log(avctx, AV_LOG_TRACE, "Out PTS=%" PRId64 "/%"PRId64", DTS=%" PRId64 "\n", -+ frame->pts, frame->best_effort_timestamp, frame->pkt_dts); -+} -+ -+static void -+xlat_flush(xlat_track_t * const x) -+{ -+ unsigned int i; -+ for (i = 0; i != FF_V4L2_M2M_TRACK_SIZE; ++i) { -+ x->track_els[i].pending = 0; -+ x->track_els[i].discard = 1; -+ } -+ x->last_pts = AV_NOPTS_VALUE; -+} -+ -+static int -+xlat_pending(const xlat_track_t * const x) -+{ -+ unsigned int n = x->track_no % FF_V4L2_M2M_TRACK_SIZE; -+ unsigned int i; -+ int r = 0; -+ int64_t now = AV_NOPTS_VALUE; -+ -+ for (i = 0; i < 32; ++i, n = (n - 1) % FF_V4L2_M2M_TRACK_SIZE) { -+ const V4L2m2mTrackEl * const t = x->track_els + n; -+ -+ if (!t->pending) -+ continue; -+ -+ if (now == AV_NOPTS_VALUE) -+ now = t->dts; -+ -+ if (t->pts == AV_NOPTS_VALUE || -+ ((now == AV_NOPTS_VALUE || t->pts <= now) && -+ (x->last_pts == AV_NOPTS_VALUE || t->pts > x->last_pts))) -+ ++r; -+ } -+ -+ // If we never get any ideas about PTS vs DTS allow a lot more buffer -+ if (now == AV_NOPTS_VALUE) -+ r -= 16; -+ -+ return r; -+} -+ -+static inline int stream_started(const V4L2m2mContext * const s) { -+ return s->output.streamon; -+} -+ -+#define NQ_OK 0 -+#define NQ_Q_FULL 1 -+#define NQ_SRC_EMPTY 2 -+#define NQ_NONE 3 -+#define NQ_DRAINING 4 -+#define NQ_DEAD 5 -+ -+#define TRY_DQ(nq_status) ((nq_status) >= NQ_OK && (nq_status) <= NQ_DRAINING) -+#define RETRY_NQ(nq_status) ((nq_status) == NQ_Q_FULL || (nq_status) == NQ_NONE) -+ -+// do_not_get If true then no new packet will be got but status will -+// be set appropriately -+ -+// AVERROR_EOF Flushing an already flushed stream -+// -ve Error (all errors except EOF are unexpected) -+// NQ_OK (0) OK -+// NQ_Q_FULL Dst full (retry if we think V4L2 Q has space now) -+// NQ_SRC_EMPTY Src empty (do not retry) -+// NQ_NONE Enqueue not attempted -+// NQ_DRAINING At EOS, dQ dest until EOS there too -+// NQ_DEAD Not running (do not retry, do not attempt capture dQ) -+ -+static int try_enqueue_src(AVCodecContext * const avctx, V4L2m2mContext * const s, const int do_not_get) - { -- V4L2m2mContext *s = ((V4L2m2mPriv*)avctx->priv_data)->context; -- V4L2Context *const capture = &s->capture; -- V4L2Context *const output = &s->output; -- AVPacket avpkt = {0}; - int ret; - -- if (s->buf_pkt.size) { -- avpkt = s->buf_pkt; -- memset(&s->buf_pkt, 0, sizeof(AVPacket)); -- } else { -- ret = ff_decode_get_packet(avctx, &avpkt); -- if (ret < 0 && ret != AVERROR_EOF) -+ // If we don't already have a coded packet - get a new one -+ // We will already have a coded pkt if the output Q was full last time we -+ // tried to Q it -+ if (!s->buf_pkt.size && !do_not_get) { -+ unsigned int i; -+ -+ for (i = 0; i < 256; ++i) { -+ uint8_t * side_data; -+#if FF_API_BUFFER_SIZE_T -+ int side_size; -+#else -+ size_t side_size; -+#endif -+ ret = ff_decode_get_packet(avctx, &s->buf_pkt); -+ if (ret != 0) -+ break; -+ -+ // New extradata is the only side-data we undertand -+ side_data = av_packet_get_side_data(&s->buf_pkt, AV_PKT_DATA_NEW_EXTRADATA, &side_size); -+ if (side_data) { -+ av_log(avctx, AV_LOG_DEBUG, "New extradata\n"); -+ av_freep(&s->extdata_data); -+ if ((s->extdata_data = av_malloc(side_size ? side_size : 1)) == NULL) { -+ av_log(avctx, AV_LOG_ERROR, "Failed to alloc %d bytes of extra data\n", (int)side_size); -+ return AVERROR(ENOMEM); -+ } -+ memcpy(s->extdata_data, side_data, side_size); -+ s->extdata_size = side_size; -+ s->extdata_sent = 0; -+ } -+ -+ if (s->buf_pkt.size != 0) -+ break; -+ -+ if (s->buf_pkt.side_data_elems == 0) { -+ av_log(avctx, AV_LOG_WARNING, "Empty pkt from ff_decode_get_packet - treating as EOF\n"); -+ ret = AVERROR_EOF; -+ break; -+ } -+ -+ // Retry a side-data only pkt -+ } -+ // If i >= 256 something has gone wrong -+ if (i >= 256) { -+ av_log(avctx, AV_LOG_ERROR, "Too many side-data only packets\n"); -+ return AVERROR(EIO); -+ } -+ -+ if (ret == AVERROR(EAGAIN)) { -+ if (!stream_started(s)) { -+ av_log(avctx, AV_LOG_TRACE, "%s: receive_frame before 1st coded packet\n", __func__); -+ return NQ_DEAD; -+ } -+ return NQ_SRC_EMPTY; -+ } -+ -+ if (ret == AVERROR_EOF) { -+ // EOF - enter drain mode -+ av_log(avctx, AV_LOG_TRACE, "--- EOS req: ret=%d, size=%d, started=%d, drain=%d\n", -+ ret, s->buf_pkt.size, stream_started(s), s->draining); -+ if (!stream_started(s)) { -+ av_log(avctx, AV_LOG_DEBUG, "EOS on flushed stream\n"); -+ s->draining = 1; -+ s->capture.done = 1; -+ return AVERROR_EOF; -+ } -+ -+ if (!s->draining) { -+ // Calling enqueue with an empty pkt starts drain -+ av_assert0(s->buf_pkt.size == 0); -+ ret = ff_v4l2_context_enqueue_packet(&s->output, &s->buf_pkt, NULL, 0); -+ if (ret) { -+ av_log(avctx, AV_LOG_ERROR, "Failed to start drain: ret=%d\n", ret); -+ return ret; -+ } -+ } -+ return NQ_DRAINING; -+ } -+ -+ if (ret < 0) { -+ av_log(avctx, AV_LOG_ERROR, "Failed to get coded packet: err=%d\n", ret); - return ret; -+ } - } - -- if (s->draining) -- goto dequeue; -+ if (s->draining) { -+ if (s->buf_pkt.size) { -+ av_log(avctx, AV_LOG_WARNING, "Unexpected input whilst draining\n"); -+ av_packet_unref(&s->buf_pkt); -+ } -+ return NQ_DRAINING; -+ } - -- ret = ff_v4l2_context_enqueue_packet(output, &avpkt); -- if (ret < 0) { -- if (ret != AVERROR(EAGAIN)) -- return ret; -+ if (!s->buf_pkt.size) -+ return NQ_NONE; - -- s->buf_pkt = avpkt; -- /* no input buffers available, continue dequeing */ -- } -+ if ((ret = check_output_streamon(avctx, s)) != 0) -+ return ret; -+ -+ if (s->extdata_sent) -+ ret = ff_v4l2_context_enqueue_packet(&s->output, &s->buf_pkt, NULL, 0); -+ else if (s->extdata_data) -+ ret = ff_v4l2_context_enqueue_packet(&s->output, &s->buf_pkt, s->extdata_data, s->extdata_size); -+ else -+ ret = ff_v4l2_context_enqueue_packet(&s->output, &s->buf_pkt, avctx->extradata, avctx->extradata_size); -+ -+ if (ret == AVERROR(EAGAIN)) { -+ // Out of input buffers - keep packet -+ ret = NQ_Q_FULL; -+ } -+ else { -+ // In all other cases we are done with this packet -+ av_packet_unref(&s->buf_pkt); -+ s->extdata_sent = 1; - -- if (avpkt.size) { -- ret = v4l2_try_start(avctx); - if (ret) { -- av_packet_unref(&avpkt); -+ av_log(avctx, AV_LOG_ERROR, "Packet enqueue failure: err=%d\n", ret); -+ return ret; -+ } -+ } - -- /* cant recover */ -- if (ret == AVERROR(ENOMEM)) -- return ret; -+ // Start if we haven't -+ { -+ const int ret2 = v4l2_try_start(avctx); -+ if (ret2) { -+ av_log(avctx, AV_LOG_DEBUG, "Start failure: err=%d\n", ret2); -+ ret = (ret2 == AVERROR(ENOMEM)) ? ret2 : NQ_DEAD; -+ } -+ } -+ -+ return ret; -+} -+ -+static int qbuf_wait(AVCodecContext * const avctx, V4L2Context * const ctx) -+{ -+ int rv = 0; - -- return 0; -+ ff_mutex_lock(&ctx->lock); -+ -+ while (atomic_load(&ctx->q_count) == 0 && ctx->streamon) { -+ if (pthread_cond_wait(&ctx->cond, &ctx->lock) != 0) { -+ rv = AVERROR(errno); -+ av_log(avctx, AV_LOG_ERROR, "Cond wait failure: %s\n", av_err2str(rv)); -+ break; - } - } - --dequeue: -- if (!s->buf_pkt.size) -- av_packet_unref(&avpkt); -- return ff_v4l2_context_dequeue_frame(capture, frame, -1); -+ ff_mutex_unlock(&ctx->lock); -+ return rv; -+} -+ -+// Number of frames over what xlat_pending returns that we keep *16 -+// This is a min value - if it appears to be too small the threshold should -+// adjust dynamically. -+#define PENDING_HW_MIN (3 * 16) -+// Offset to use when setting dynamically -+// Set to %16 == 15 to avoid the threshold changing immediately as we relax -+#define PENDING_HW_OFFSET (PENDING_HW_MIN - 1) -+// Number of consecutive times we've failed to get a frame when we prefer it -+// before we increase the prefer threshold (5ms * N = max expected decode -+// time) -+#define PENDING_N_THRESHOLD 6 -+ -+static int v4l2_receive_frame(AVCodecContext *avctx, AVFrame *frame) -+{ -+ V4L2m2mContext *const s = ((V4L2m2mPriv*)avctx->priv_data)->context; -+ int src_rv = NQ_OK; -+ int dst_rv = 1; // Non-zero (done), non-negative (error) number -+ unsigned int i = 0; -+ -+ do { -+ const int pending = xlat_pending(&s->xlat); -+ const int prefer_dq = (pending > s->pending_hw / 16); -+ const int last_src_rv = src_rv; -+ -+ // Enqueue another pkt for decode if -+ // (a) We don't have a lot of stuff in the buffer already OR -+ // (b) ... we (think we) do but we've failed to get a frame already OR -+ // (c) We've dequeued a lot of frames without asking for input -+ src_rv = try_enqueue_src(avctx, s, !(!prefer_dq || i != 0 || s->req_pkt > 2)); -+ -+ // If we got a frame last time or we've already tried to get a frame and -+ // we have nothing to enqueue then return now. rv will be AVERROR(EAGAIN) -+ // indicating that we want more input. -+ // This should mean that once decode starts we enter a stable state where -+ // we alternately ask for input and produce output -+ if ((i != 0 || s->req_pkt) && src_rv == NQ_SRC_EMPTY) -+ break; -+ -+ if (src_rv == NQ_Q_FULL && last_src_rv == NQ_Q_FULL) { -+ av_log(avctx, AV_LOG_WARNING, "Poll thinks src Q has space; none found\n"); -+ break; -+ } -+ -+ // Try to get a new frame if -+ // (a) we haven't already got one AND -+ // (b) enqueue returned a status indicating that decode should be attempted -+ if (dst_rv != 0 && TRY_DQ(src_rv)) { -+ // Pick a timeout depending on state -+ const int t = -+ src_rv == NQ_DRAINING ? 300 : -+ prefer_dq ? 5 : -+ src_rv == NQ_Q_FULL ? -1 : 0; -+ -+ // Dequeue frame will unref any previous contents of frame -+ // if it returns success so we don't need an explicit unref -+ // when discarding -+ // This returns AVERROR(EAGAIN) on timeout or if -+ // there is room in the input Q and timeout == -1 -+ dst_rv = ff_v4l2_context_dequeue_frame(&s->capture, frame, t); -+ -+ // Failure due to no buffer in Q? -+ if (dst_rv == AVERROR(ENOSPC)) { -+ // Wait & retry -+ if ((dst_rv = qbuf_wait(avctx, &s->capture)) == 0) { -+ dst_rv = ff_v4l2_context_dequeue_frame(&s->capture, frame, t); -+ } -+ } -+ -+ // Adjust dynamic pending threshold -+ if (dst_rv == 0) { -+ if (--s->pending_hw < PENDING_HW_MIN) -+ s->pending_hw = PENDING_HW_MIN; -+ s->pending_n = 0; -+ -+ set_best_effort_pts(avctx, &s->pts_stat, frame); -+ } -+ else if (dst_rv == AVERROR(EAGAIN)) { -+ if (prefer_dq && ++s->pending_n > PENDING_N_THRESHOLD) { -+ s->pending_hw = pending * 16 + PENDING_HW_OFFSET; -+ s->pending_n = 0; -+ } -+ } -+ -+ if (dst_rv == AVERROR(EAGAIN) && src_rv == NQ_DRAINING) { -+ av_log(avctx, AV_LOG_WARNING, "Timeout in drain - assume EOF"); -+ dst_rv = AVERROR_EOF; -+ s->capture.done = 1; -+ } -+ else if (dst_rv == AVERROR_EOF && (s->draining || s->capture.done)) -+ av_log(avctx, AV_LOG_DEBUG, "Dequeue EOF: draining=%d, cap.done=%d\n", -+ s->draining, s->capture.done); -+ else if (dst_rv && dst_rv != AVERROR(EAGAIN)) -+ av_log(avctx, AV_LOG_ERROR, "Packet dequeue failure: draining=%d, cap.done=%d, err=%d\n", -+ s->draining, s->capture.done, dst_rv); -+ } -+ -+ ++i; -+ if (i >= 256) { -+ av_log(avctx, AV_LOG_ERROR, "Unexpectedly large retry count: %d\n", i); -+ src_rv = AVERROR(EIO); -+ } -+ -+ // Continue trying to enqueue packets if either -+ // (a) we succeeded last time OR -+ // (b) we didn't ret a frame and we can retry the input -+ } while (src_rv == NQ_OK || (dst_rv == AVERROR(EAGAIN) && RETRY_NQ(src_rv))); -+ -+ // Ensure that the frame contains nothing if we aren't returning a frame -+ // (might happen when discarding) -+ if (dst_rv) -+ av_frame_unref(frame); -+ -+ // If we got a frame this time ask for a pkt next time -+ s->req_pkt = (dst_rv == 0) ? s->req_pkt + 1 : 0; -+ -+#if 0 -+ if (dst_rv == 0) -+ { -+ static int z = 0; -+ if (++z > 50) { -+ av_log(avctx, AV_LOG_ERROR, "Streamoff and die?\n"); -+ ff_v4l2_context_set_status(&s->capture, VIDIOC_STREAMOFF); -+ return -1; -+ } -+ } -+#endif -+ -+ return dst_rv == 0 ? 0 : -+ src_rv < 0 ? src_rv : -+ dst_rv < 0 ? dst_rv : -+ AVERROR(EAGAIN); -+} -+ -+#if 0 -+#include -+static int64_t us_time(void) -+{ -+ struct timespec ts; -+ clock_gettime(CLOCK_MONOTONIC, &ts); -+ return (int64_t)ts.tv_sec * 1000000 + ts.tv_nsec / 1000; -+} -+ -+static int v4l2_receive_frame(AVCodecContext *avctx, AVFrame *frame) -+{ -+ int ret; -+ const int64_t now = us_time(); -+ int64_t done; -+ av_log(avctx, AV_LOG_TRACE, "<<< %s\n", __func__); -+ ret = v4l2_receive_frame2(avctx, frame); -+ done = us_time(); -+ av_log(avctx, AV_LOG_TRACE, ">>> %s: rx time=%" PRId64 ", rv=%d\n", __func__, done - now, ret); -+ return ret; -+} -+#endif -+ -+static int -+check_size(AVCodecContext * const avctx, V4L2m2mContext * const s) -+{ -+ unsigned int i; -+ const uint32_t fcc = ff_v4l2_get_format_pixelformat(&s->capture.format); -+ const uint32_t w = avctx->coded_width; -+ const uint32_t h = avctx->coded_height; -+ -+ if (w == 0 || h == 0 || fcc == 0) { -+ av_log(avctx, AV_LOG_TRACE, "%s: Size %dx%d or fcc %s empty\n", __func__, w, h, av_fourcc2str(fcc)); -+ return 0; -+ } -+ if ((s->quirks & FF_V4L2_QUIRK_ENUM_FRAMESIZES_BROKEN) != 0) { -+ av_log(avctx, AV_LOG_TRACE, "%s: Skipped (quirk): Size %dx%d, fcc %s\n", __func__, w, h, av_fourcc2str(fcc)); -+ return 0; -+ } -+ -+ for (i = 0;; ++i) { -+ struct v4l2_frmsizeenum fs = { -+ .index = i, -+ .pixel_format = fcc, -+ }; -+ -+ while (ioctl(s->fd, VIDIOC_ENUM_FRAMESIZES, &fs) != 0) { -+ const int err = AVERROR(errno); -+ if (err == AVERROR(EINTR)) -+ continue; -+ if (i == 0 && err == AVERROR(ENOTTY)) { -+ av_log(avctx, AV_LOG_DEBUG, "Framesize enum not supported\n"); -+ return 0; -+ } -+ if (err != AVERROR(EINVAL)) { -+ av_log(avctx, AV_LOG_ERROR, "Failed to enum framesizes: %s", av_err2str(err)); -+ return err; -+ } -+ av_log(avctx, AV_LOG_WARNING, "Failed to find Size=%dx%d, fmt=%s in %u frame size enums\n", -+ w, h, av_fourcc2str(fcc), i); -+ return err; -+ } -+ -+ switch (fs.type) { -+ case V4L2_FRMSIZE_TYPE_DISCRETE: -+ av_log(avctx, AV_LOG_TRACE, "%s[%d]: Discrete: %dx%d\n", __func__, i, -+ fs.discrete.width,fs.discrete.height); -+ if (w == fs.discrete.width && h == fs.discrete.height) -+ return 0; -+ break; -+ case V4L2_FRMSIZE_TYPE_STEPWISE: -+ av_log(avctx, AV_LOG_TRACE, "%s[%d]: Stepwise: Min: %dx%d Max: %dx%d, Step: %dx%d\n", __func__, i, -+ fs.stepwise.min_width, fs.stepwise.min_height, -+ fs.stepwise.max_width, fs.stepwise.max_height, -+ fs.stepwise.step_width,fs.stepwise.step_height); -+ if (w >= fs.stepwise.min_width && w <= fs.stepwise.max_width && -+ h >= fs.stepwise.min_height && h <= fs.stepwise.max_height && -+ (w - fs.stepwise.min_width) % fs.stepwise.step_width == 0 && -+ (h - fs.stepwise.min_height) % fs.stepwise.step_height == 0) -+ return 0; -+ break; -+ case V4L2_FRMSIZE_TYPE_CONTINUOUS: -+ av_log(avctx, AV_LOG_TRACE, "%s[%d]: Continuous: Min: %dx%d Max: %dx%d, Step: %dx%d\n", __func__, i, -+ fs.stepwise.min_width, fs.stepwise.min_height, -+ fs.stepwise.max_width, fs.stepwise.max_height, -+ fs.stepwise.step_width,fs.stepwise.step_height); -+ if (w >= fs.stepwise.min_width && w <= fs.stepwise.max_width && -+ h >= fs.stepwise.min_height && h <= fs.stepwise.max_height) -+ return 0; -+ break; -+ default: -+ av_log(avctx, AV_LOG_ERROR, "Unexpected framesize enum: %d", fs.type); -+ return AVERROR(EINVAL); -+ } -+ } -+} -+ -+static int -+get_quirks(AVCodecContext * const avctx, V4L2m2mContext * const s) -+{ -+ struct v4l2_capability cap; -+ -+ memset(&cap, 0, sizeof(cap)); -+ while (ioctl(s->fd, VIDIOC_QUERYCAP, &cap) != 0) { -+ int err = errno; -+ if (err == EINTR) -+ continue; -+ av_log(avctx, AV_LOG_ERROR, "V4L2: Failed to get capabilities: %s\n", strerror(err)); -+ return AVERROR(err); -+ } -+ -+ // Could be made table driven if we have a few more but right now there -+ // seems no point -+ -+ // Meson (amlogic) always gives a resolution changed event after output -+ // streamon and userspace must (re)allocate capture buffers and streamon -+ // capture to clear the event even if the capture buffers were the right -+ // size in the first place. -+ if (strcmp(cap.driver, "meson-vdec") == 0) -+ s->quirks |= FF_V4L2_QUIRK_REINIT_ALWAYS | FF_V4L2_QUIRK_ENUM_FRAMESIZES_BROKEN; -+ -+ av_log(avctx, AV_LOG_DEBUG, "Driver '%s': Quirks=%#x\n", cap.driver, s->quirks); -+ return 0; -+} -+ -+// This heuristic is for H264 but use for everything -+static uint32_t max_coded_size(const AVCodecContext * const avctx) -+{ -+ uint32_t wxh = avctx->coded_width * avctx->coded_height; -+ uint32_t size; -+ -+ size = wxh * 3 / 2; -+ // H.264 Annex A table A-1 gives minCR which is either 2 or 4 -+ // unfortunately that doesn't yield an actually useful limit -+ // and it should be noted that frame 0 is special cased to allow -+ // a bigger number which really isn't helpful for us. So just pick -+ // frame_size / 2 -+ size /= 2; -+ // Add 64k to allow for any overheads and/or encoder hopefulness -+ // with small WxH -+ return size + (1 << 16); - } - - static av_cold int v4l2_decode_init(AVCodecContext *avctx) -@@ -186,12 +699,29 @@ static av_cold int v4l2_decode_init(AVCo - V4L2Context *capture, *output; - V4L2m2mContext *s; - V4L2m2mPriv *priv = avctx->priv_data; -+ int gf_pix_fmt; - int ret; - -+ av_log(avctx, AV_LOG_TRACE, "<<< %s\n", __func__); -+ -+ if (avctx->codec_id == AV_CODEC_ID_H264) { -+ if (avctx->ticks_per_frame == 1) { -+ if(avctx->time_base.den < INT_MAX/2) { -+ avctx->time_base.den *= 2; -+ } else -+ avctx->time_base.num /= 2; -+ } -+ avctx->ticks_per_frame = 2; -+ } -+ -+ av_log(avctx, AV_LOG_INFO, "level=%d\n", avctx->level); - ret = ff_v4l2_m2m_create_context(priv, &s); - if (ret < 0) - return ret; - -+ pts_stats_init(&s->pts_stat, avctx, "decoder"); -+ s->pending_hw = PENDING_HW_MIN; -+ - capture = &s->capture; - output = &s->output; - -@@ -199,34 +729,127 @@ static av_cold int v4l2_decode_init(AVCo - * by the v4l2 driver; this event will trigger a full pipeline reconfig and - * the proper values will be retrieved from the kernel driver. - */ -- output->height = capture->height = avctx->coded_height; -- output->width = capture->width = avctx->coded_width; -+// output->height = capture->height = avctx->coded_height; -+// output->width = capture->width = avctx->coded_width; -+ output->height = capture->height = 0; -+ output->width = capture->width = 0; - - output->av_codec_id = avctx->codec_id; - output->av_pix_fmt = AV_PIX_FMT_NONE; -+ output->min_buf_size = max_coded_size(avctx); - - capture->av_codec_id = AV_CODEC_ID_RAWVIDEO; - capture->av_pix_fmt = avctx->pix_fmt; -+ capture->min_buf_size = 0; -+ -+ /* the client requests the codec to generate DRM frames: -+ * - data[0] will therefore point to the returned AVDRMFrameDescriptor -+ * check the ff_v4l2_buffer_to_avframe conversion function. -+ * - the DRM frame format is passed in the DRM frame descriptor layer. -+ * check the v4l2_get_drm_frame function. -+ */ -+ -+ avctx->sw_pix_fmt = avctx->pix_fmt; -+ gf_pix_fmt = ff_get_format(avctx, avctx->codec->pix_fmts); -+ av_log(avctx, AV_LOG_DEBUG, "avctx requested=%d (%s) %dx%d; get_format requested=%d (%s)\n", -+ avctx->pix_fmt, av_get_pix_fmt_name(avctx->pix_fmt), -+ avctx->coded_width, avctx->coded_height, -+ gf_pix_fmt, av_get_pix_fmt_name(gf_pix_fmt)); -+ -+ if (gf_pix_fmt == AV_PIX_FMT_DRM_PRIME || avctx->pix_fmt == AV_PIX_FMT_DRM_PRIME) { -+ avctx->pix_fmt = AV_PIX_FMT_DRM_PRIME; -+ s->output_drm = 1; -+ } -+ else { -+ capture->av_pix_fmt = gf_pix_fmt; -+ s->output_drm = 0; -+ } -+ -+ s->device_ref = av_hwdevice_ctx_alloc(AV_HWDEVICE_TYPE_DRM); -+ if (!s->device_ref) { -+ ret = AVERROR(ENOMEM); -+ return ret; -+ } -+ -+ ret = av_hwdevice_ctx_init(s->device_ref); -+ if (ret < 0) -+ return ret; - - s->avctx = avctx; - ret = ff_v4l2_m2m_codec_init(priv); - if (ret) { - av_log(avctx, AV_LOG_ERROR, "can't configure decoder\n"); -- s->self_ref = NULL; -- av_buffer_unref(&priv->context_ref); -- - return ret; - } - -- return v4l2_prepare_decoder(s); -+ if ((ret = v4l2_prepare_decoder(s)) < 0) -+ return ret; -+ -+ if ((ret = get_quirks(avctx, s)) != 0) -+ return ret; -+ -+ if ((ret = check_size(avctx, s)) != 0) -+ return ret; -+ -+ return 0; - } - - static av_cold int v4l2_decode_close(AVCodecContext *avctx) - { -- V4L2m2mPriv *priv = avctx->priv_data; -- V4L2m2mContext *s = priv->context; -+ int rv; -+ av_log(avctx, AV_LOG_TRACE, "<<< %s\n", __func__); -+ rv = ff_v4l2_m2m_codec_end(avctx->priv_data); -+ av_log(avctx, AV_LOG_TRACE, ">>> %s: rv=%d\n", __func__, rv); -+ return rv; -+} -+ -+static void v4l2_decode_flush(AVCodecContext *avctx) -+{ -+ // An alternatve and more drastic form of flush is to simply do this: -+ // v4l2_decode_close(avctx); -+ // v4l2_decode_init(avctx); -+ // The downside is that this keeps a decoder open until all the frames -+ // associated with it have been returned. This is a bit wasteful on -+ // possibly limited h/w resources and fails on a Pi for this reason unless -+ // more GPU mem is allocated than is the default. -+ -+ V4L2m2mPriv * const priv = avctx->priv_data; -+ V4L2m2mContext * const s = priv->context; -+ V4L2Context * const output = &s->output; -+ V4L2Context * const capture = &s->capture; -+ -+ av_log(avctx, AV_LOG_TRACE, "<<< %s: streamon=%d\n", __func__, output->streamon); -+ -+ // Reflushing everything is benign, quick and avoids having to worry about -+ // states like EOS processing so don't try to optimize out (having got it -+ // wrong once) -+ -+ ff_v4l2_context_set_status(output, VIDIOC_STREAMOFF); -+ -+ // Clear any buffered input packet - av_packet_unref(&s->buf_pkt); -- return ff_v4l2_m2m_codec_end(priv); -+ -+ // Clear a pending EOS -+ if (ff_v4l2_ctx_eos(capture)) { -+ // Arguably we could delay this but this is easy and doesn't require -+ // thought or extra vars -+ ff_v4l2_context_set_status(capture, VIDIOC_STREAMOFF); -+ ff_v4l2_context_set_status(capture, VIDIOC_STREAMON); -+ } -+ -+ // V4L2 makes no guarantees about whether decoded frames are flushed or not -+ // so mark all frames we are tracking to be discarded if they appear -+ xlat_flush(&s->xlat); -+ -+ // resend extradata -+ s->extdata_sent = 0; -+ // clear EOS status vars -+ s->draining = 0; -+ output->done = 0; -+ capture->done = 0; -+ -+ // Stream on will occur when we actually submit a new frame -+ av_log(avctx, AV_LOG_TRACE, ">>> %s\n", __func__); - } - - #define OFFSET(x) offsetof(V4L2m2mPriv, x) -@@ -235,10 +858,16 @@ static av_cold int v4l2_decode_close(AVC - static const AVOption options[] = { - V4L_M2M_DEFAULT_OPTS, - { "num_capture_buffers", "Number of buffers in the capture context", -- OFFSET(num_capture_buffers), AV_OPT_TYPE_INT, {.i64 = 20}, 20, INT_MAX, FLAGS }, -+ OFFSET(num_capture_buffers), AV_OPT_TYPE_INT, {.i64 = 20}, 2, INT_MAX, FLAGS }, -+ { "pixel_format", "Pixel format to be used by the decoder", OFFSET(pix_fmt), AV_OPT_TYPE_PIXEL_FMT, {.i64 = AV_PIX_FMT_NONE}, AV_PIX_FMT_NONE, AV_PIX_FMT_NB, FLAGS }, - { NULL}, - }; - -+static const AVCodecHWConfigInternal *v4l2_m2m_hw_configs[] = { -+ HW_CONFIG_INTERNAL(DRM_PRIME), -+ NULL -+}; -+ - #define M2MDEC_CLASS(NAME) \ - static const AVClass v4l2_m2m_ ## NAME ## _dec_class = { \ - .class_name = #NAME "_v4l2m2m_decoder", \ -@@ -259,9 +888,15 @@ static const AVOption options[] = { - .init = v4l2_decode_init, \ - .receive_frame = v4l2_receive_frame, \ - .close = v4l2_decode_close, \ -+ .flush = v4l2_decode_flush, \ - .bsfs = bsf_name, \ - .capabilities = AV_CODEC_CAP_HARDWARE | AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AVOID_PROBING, \ -- .caps_internal = FF_CODEC_CAP_SETS_PKT_DTS, \ -+ .caps_internal = FF_CODEC_CAP_SETS_PKT_DTS | FF_CODEC_CAP_INIT_CLEANUP, \ -+ .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_DRM_PRIME, \ -+ AV_PIX_FMT_NV12, \ -+ AV_PIX_FMT_YUV420P, \ -+ AV_PIX_FMT_NONE}, \ -+ .hw_configs = v4l2_m2m_hw_configs, \ - .wrapper_name = "v4l2m2m", \ - } - ---- a/libavcodec/v4l2_m2m_enc.c -+++ b/libavcodec/v4l2_m2m_enc.c -@@ -24,6 +24,8 @@ - #include - #include - #include -+#include -+ - #include "libavcodec/avcodec.h" - #include "libavcodec/internal.h" - #include "libavutil/pixdesc.h" -@@ -37,6 +39,34 @@ - #define MPEG_CID(x) V4L2_CID_MPEG_VIDEO_##x - #define MPEG_VIDEO(x) V4L2_MPEG_VIDEO_##x - -+// P030 should be defined in drm_fourcc.h and hopefully will be sometime -+// in the future but until then... -+#ifndef DRM_FORMAT_P030 -+#define DRM_FORMAT_P030 fourcc_code('P', '0', '3', '0') -+#endif -+ -+#ifndef DRM_FORMAT_NV15 -+#define DRM_FORMAT_NV15 fourcc_code('N', 'V', '1', '5') -+#endif -+ -+#ifndef DRM_FORMAT_NV20 -+#define DRM_FORMAT_NV20 fourcc_code('N', 'V', '2', '0') -+#endif -+ -+#ifndef V4L2_CID_CODEC_BASE -+#define V4L2_CID_CODEC_BASE V4L2_CID_MPEG_BASE -+#endif -+ -+// V4L2_PIX_FMT_NV12_10_COL128 and V4L2_PIX_FMT_NV12_COL128 should be defined -+// in videodev2.h hopefully will be sometime in the future but until then... -+#ifndef V4L2_PIX_FMT_NV12_10_COL128 -+#define V4L2_PIX_FMT_NV12_10_COL128 v4l2_fourcc('N', 'C', '3', '0') -+#endif -+ -+#ifndef V4L2_PIX_FMT_NV12_COL128 -+#define V4L2_PIX_FMT_NV12_COL128 v4l2_fourcc('N', 'C', '1', '2') /* 12 Y/CbCr 4:2:0 128 pixel wide column */ -+#endif -+ - static inline void v4l2_set_timeperframe(V4L2m2mContext *s, unsigned int num, unsigned int den) - { - struct v4l2_streamparm parm = { 0 }; -@@ -147,15 +177,14 @@ static inline int v4l2_mpeg4_profile_fro - static int v4l2_check_b_frame_support(V4L2m2mContext *s) - { - if (s->avctx->max_b_frames) -- av_log(s->avctx, AV_LOG_WARNING, "Encoder does not support b-frames yet\n"); -+ av_log(s->avctx, AV_LOG_WARNING, "Encoder does not support %d b-frames yet\n", s->avctx->max_b_frames); - -- v4l2_set_ext_ctrl(s, MPEG_CID(B_FRAMES), 0, "number of B-frames", 0); -+ v4l2_set_ext_ctrl(s, MPEG_CID(B_FRAMES), s->avctx->max_b_frames, "number of B-frames", 1); - v4l2_get_ext_ctrl(s, MPEG_CID(B_FRAMES), &s->avctx->max_b_frames, "number of B-frames", 0); - if (s->avctx->max_b_frames == 0) - return 0; - - avpriv_report_missing_feature(s->avctx, "DTS/PTS calculation for V4L2 encoding"); -- - return AVERROR_PATCHWELCOME; - } - -@@ -270,13 +299,184 @@ static int v4l2_prepare_encoder(V4L2m2mC - return 0; - } - -+static int avdrm_to_v4l2(struct v4l2_format * const format, const AVFrame * const frame) -+{ -+ const AVDRMFrameDescriptor *const src = (const AVDRMFrameDescriptor *)frame->data[0]; -+ -+ const uint32_t drm_fmt = src->layers[0].format; -+ // Treat INVALID as LINEAR -+ const uint64_t mod = src->objects[0].format_modifier == DRM_FORMAT_MOD_INVALID ? -+ DRM_FORMAT_MOD_LINEAR : src->objects[0].format_modifier; -+ uint32_t pix_fmt = 0; -+ uint32_t w = 0; -+ uint32_t h = 0; -+ uint32_t bpl = src->layers[0].planes[0].pitch; -+ -+ // We really don't expect multiple layers -+ // All formats that we currently cope with are single object -+ -+ if (src->nb_layers != 1 || src->nb_objects != 1) -+ return AVERROR(EINVAL); -+ -+ switch (drm_fmt) { -+ case DRM_FORMAT_YUV420: -+ if (mod == DRM_FORMAT_MOD_LINEAR) { -+ if (src->layers[0].nb_planes != 3) -+ break; -+ pix_fmt = V4L2_PIX_FMT_YUV420; -+ h = src->layers[0].planes[1].offset / bpl; -+ w = bpl; -+ } -+ break; -+ -+ case DRM_FORMAT_NV12: -+ if (mod == DRM_FORMAT_MOD_LINEAR) { -+ if (src->layers[0].nb_planes != 2) -+ break; -+ pix_fmt = V4L2_PIX_FMT_NV12; -+ h = src->layers[0].planes[1].offset / bpl; -+ w = bpl; -+ } -+ else if (fourcc_mod_broadcom_mod(mod) == DRM_FORMAT_MOD_BROADCOM_SAND128) { -+ if (src->layers[0].nb_planes != 2) -+ break; -+ pix_fmt = V4L2_PIX_FMT_NV12_COL128; -+ w = bpl; -+ h = src->layers[0].planes[1].offset / 128; -+ bpl = fourcc_mod_broadcom_param(mod); -+ } -+ break; -+ -+ case DRM_FORMAT_P030: -+ if (fourcc_mod_broadcom_mod(mod) == DRM_FORMAT_MOD_BROADCOM_SAND128) { -+ if (src->layers[0].nb_planes != 2) -+ break; -+ pix_fmt = V4L2_PIX_FMT_NV12_10_COL128; -+ w = bpl / 2; // Matching lie to how we construct this -+ h = src->layers[0].planes[1].offset / 128; -+ bpl = fourcc_mod_broadcom_param(mod); -+ } -+ break; -+ -+ default: -+ break; -+ } -+ -+ if (!pix_fmt) -+ return AVERROR(EINVAL); -+ -+ if (V4L2_TYPE_IS_MULTIPLANAR(format->type)) { -+ struct v4l2_pix_format_mplane *const pix = &format->fmt.pix_mp; -+ -+ pix->width = w; -+ pix->height = h; -+ pix->pixelformat = pix_fmt; -+ pix->plane_fmt[0].bytesperline = bpl; -+ pix->num_planes = 1; -+ } -+ else { -+ struct v4l2_pix_format *const pix = &format->fmt.pix; -+ -+ pix->width = w; -+ pix->height = h; -+ pix->pixelformat = pix_fmt; -+ pix->bytesperline = bpl; -+ } -+ -+ return 0; -+} -+ -+// Do we have similar enough formats to be usable? -+static int fmt_eq(const struct v4l2_format * const a, const struct v4l2_format * const b) -+{ -+ if (a->type != b->type) -+ return 0; -+ -+ if (V4L2_TYPE_IS_MULTIPLANAR(a->type)) { -+ const struct v4l2_pix_format_mplane *const pa = &a->fmt.pix_mp; -+ const struct v4l2_pix_format_mplane *const pb = &b->fmt.pix_mp; -+ unsigned int i; -+ if (pa->pixelformat != pb->pixelformat || -+ pa->num_planes != pb->num_planes) -+ return 0; -+ for (i = 0; i != pa->num_planes; ++i) { -+ if (pa->plane_fmt[i].bytesperline != pb->plane_fmt[i].bytesperline) -+ return 0; -+ } -+ } -+ else { -+ const struct v4l2_pix_format *const pa = &a->fmt.pix; -+ const struct v4l2_pix_format *const pb = &b->fmt.pix; -+ if (pa->pixelformat != pb->pixelformat || -+ pa->bytesperline != pb->bytesperline) -+ return 0; -+ } -+ return 1; -+} -+ -+ - static int v4l2_send_frame(AVCodecContext *avctx, const AVFrame *frame) - { - V4L2m2mContext *s = ((V4L2m2mPriv*)avctx->priv_data)->context; - V4L2Context *const output = &s->output; - -+ // Signal EOF if needed -+ if (!frame) { -+ return ff_v4l2_context_enqueue_frame(output, frame); -+ } -+ -+ if (s->input_drm && !output->streamon) { -+ int rv; -+ struct v4l2_format req_format = {.type = output->format.type}; -+ -+ // Set format when we first get a buffer -+ if ((rv = avdrm_to_v4l2(&req_format, frame)) != 0) { -+ av_log(avctx, AV_LOG_ERROR, "Failed to get V4L2 format from DRM_PRIME frame\n"); -+ return rv; -+ } -+ -+ ff_v4l2_context_release(output); -+ -+ output->format = req_format; -+ -+ if ((rv = ff_v4l2_context_set_format(output)) != 0) { -+ av_log(avctx, AV_LOG_ERROR, "Failed to set V4L2 format\n"); -+ return rv; -+ } -+ -+ if (!fmt_eq(&req_format, &output->format)) { -+ av_log(avctx, AV_LOG_ERROR, "Format mismatch after setup\n"); -+ return AVERROR(EINVAL); -+ } -+ -+ output->selection.top = frame->crop_top; -+ output->selection.left = frame->crop_left; -+ output->selection.width = av_frame_cropped_width(frame); -+ output->selection.height = av_frame_cropped_height(frame); -+ -+ if ((rv = ff_v4l2_context_init(output)) != 0) { -+ av_log(avctx, AV_LOG_ERROR, "Failed to (re)init context\n"); -+ return rv; -+ } -+ -+ { -+ struct v4l2_selection selection = { -+ .type = V4L2_BUF_TYPE_VIDEO_OUTPUT, -+ .target = V4L2_SEL_TGT_CROP, -+ .r = output->selection -+ }; -+ if (ioctl(s->fd, VIDIOC_S_SELECTION, &selection) != 0) { -+ av_log(avctx, AV_LOG_WARNING, "S_SELECTION (CROP) %dx%d @ %d,%d failed: %s\n", -+ selection.r.width, selection.r.height, selection.r.left, selection.r.top, -+ av_err2str(AVERROR(errno))); -+ } -+ av_log(avctx, AV_LOG_TRACE, "S_SELECTION (CROP) %dx%d @ %d,%d OK\n", -+ selection.r.width, selection.r.height, selection.r.left, selection.r.top); -+ } -+ } -+ - #ifdef V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME -- if (frame && frame->pict_type == AV_PICTURE_TYPE_I) -+ if (frame->pict_type == AV_PICTURE_TYPE_I) - v4l2_set_ext_ctrl(s, MPEG_CID(FORCE_KEY_FRAME), 0, "force key frame", 1); - #endif - -@@ -310,7 +510,70 @@ static int v4l2_receive_packet(AVCodecCo - } - - dequeue: -- return ff_v4l2_context_dequeue_packet(capture, avpkt); -+ if ((ret = ff_v4l2_context_dequeue_packet(capture, avpkt)) != 0) -+ return ret; -+ -+ if (capture->first_buf == 1) { -+ uint8_t * data; -+ const int len = avpkt->size; -+ -+ // 1st buffer after streamon should be SPS/PPS -+ capture->first_buf = 2; -+ -+ // Clear both possible stores so there is no chance of confusion -+ av_freep(&s->extdata_data); -+ s->extdata_size = 0; -+ av_freep(&avctx->extradata); -+ avctx->extradata_size = 0; -+ -+ if ((data = av_malloc(len + AV_INPUT_BUFFER_PADDING_SIZE)) != NULL) -+ memcpy(data, avpkt->data, len); -+ -+ av_packet_unref(avpkt); -+ -+ if (data == NULL) -+ return AVERROR(ENOMEM); -+ -+ // We need to copy the header, but keep local if not global -+ if ((avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER) != 0) { -+ avctx->extradata = data; -+ avctx->extradata_size = len; -+ } -+ else { -+ s->extdata_data = data; -+ s->extdata_size = len; -+ } -+ -+ if ((ret = ff_v4l2_context_dequeue_packet(capture, avpkt)) != 0) -+ return ret; -+ } -+ -+ // First frame must be key so mark as such even if encoder forgot -+ if (capture->first_buf == 2) -+ avpkt->flags |= AV_PKT_FLAG_KEY; -+ -+ // Add SPS/PPS to the start of every key frame if non-global headers -+ if ((avpkt->flags & AV_PKT_FLAG_KEY) != 0 && s->extdata_size != 0) { -+ const size_t newlen = s->extdata_size + avpkt->size; -+ AVBufferRef * const buf = av_buffer_alloc(newlen + AV_INPUT_BUFFER_PADDING_SIZE); -+ -+ if (buf == NULL) { -+ av_packet_unref(avpkt); -+ return AVERROR(ENOMEM); -+ } -+ -+ memcpy(buf->data, s->extdata_data, s->extdata_size); -+ memcpy(buf->data + s->extdata_size, avpkt->data, avpkt->size); -+ -+ av_buffer_unref(&avpkt->buf); -+ avpkt->buf = buf; -+ avpkt->data = buf->data; -+ avpkt->size = newlen; -+ } -+ -+// av_log(avctx, AV_LOG_INFO, "%s: PTS out=%"PRId64", size=%d, ret=%d\n", __func__, avpkt->pts, avpkt->size, ret); -+ capture->first_buf = 0; -+ return 0; - } - - static av_cold int v4l2_encode_init(AVCodecContext *avctx) -@@ -322,6 +585,8 @@ static av_cold int v4l2_encode_init(AVCo - uint32_t v4l2_fmt_output; - int ret; - -+ av_log(avctx, AV_LOG_INFO, " <<< %s: fmt=%d/%d\n", __func__, avctx->pix_fmt, avctx->sw_pix_fmt); -+ - ret = ff_v4l2_m2m_create_context(priv, &s); - if (ret < 0) - return ret; -@@ -329,13 +594,17 @@ static av_cold int v4l2_encode_init(AVCo - capture = &s->capture; - output = &s->output; - -+ s->input_drm = (avctx->pix_fmt == AV_PIX_FMT_DRM_PRIME); -+ - /* common settings output/capture */ - output->height = capture->height = avctx->height; - output->width = capture->width = avctx->width; - - /* output context */ - output->av_codec_id = AV_CODEC_ID_RAWVIDEO; -- output->av_pix_fmt = avctx->pix_fmt; -+ output->av_pix_fmt = !s->input_drm ? avctx->pix_fmt : -+ avctx->sw_pix_fmt != AV_PIX_FMT_NONE ? avctx->sw_pix_fmt : -+ AV_PIX_FMT_YUV420P; - - /* capture context */ - capture->av_codec_id = avctx->codec_id; -@@ -354,7 +623,7 @@ static av_cold int v4l2_encode_init(AVCo - v4l2_fmt_output = output->format.fmt.pix.pixelformat; - - pix_fmt_output = ff_v4l2_format_v4l2_to_avfmt(v4l2_fmt_output, AV_CODEC_ID_RAWVIDEO); -- if (pix_fmt_output != avctx->pix_fmt) { -+ if (!s->input_drm && pix_fmt_output != avctx->pix_fmt) { - const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt_output); - av_log(avctx, AV_LOG_ERROR, "Encoder requires %s pixel format.\n", desc->name); - return AVERROR(EINVAL); ---- /dev/null -+++ b/libavcodec/v4l2_req_decode_q.c -@@ -0,0 +1,84 @@ -+#include -+#include -+#include -+ -+#include "v4l2_req_decode_q.h" -+ -+int decode_q_in_q(const req_decode_ent * const d) -+{ -+ return d->in_q; -+} -+ -+void decode_q_add(req_decode_q * const q, req_decode_ent * const d) -+{ -+ pthread_mutex_lock(&q->q_lock); -+ if (!q->head) { -+ q->head = d; -+ q->tail = d; -+ d->prev = NULL; -+ } -+ else { -+ q->tail->next = d; -+ d->prev = q->tail; -+ q->tail = d; -+ } -+ d->next = NULL; -+ d->in_q = 1; -+ pthread_mutex_unlock(&q->q_lock); -+} -+ -+// Remove entry from Q - if head wake-up anything that was waiting -+void decode_q_remove(req_decode_q * const q, req_decode_ent * const d) -+{ -+ int try_signal = 0; -+ -+ if (!d->in_q) -+ return; -+ -+ pthread_mutex_lock(&q->q_lock); -+ if (d->prev) -+ d->prev->next = d->next; -+ else { -+ try_signal = 1; // Only need to signal if we were head -+ q->head = d->next; -+ } -+ -+ if (d->next) -+ d->next->prev = d->prev; -+ else -+ q->tail = d->prev; -+ -+ // Not strictly needed but makes debug easier -+ d->next = NULL; -+ d->prev = NULL; -+ d->in_q = 0; -+ pthread_mutex_unlock(&q->q_lock); -+ -+ if (try_signal) -+ pthread_cond_broadcast(&q->q_cond); -+} -+ -+void decode_q_wait(req_decode_q * const q, req_decode_ent * const d) -+{ -+ pthread_mutex_lock(&q->q_lock); -+ -+ while (q->head != d) -+ pthread_cond_wait(&q->q_cond, &q->q_lock); -+ -+ pthread_mutex_unlock(&q->q_lock); -+} -+ -+void decode_q_uninit(req_decode_q * const q) -+{ -+ pthread_mutex_destroy(&q->q_lock); -+ pthread_cond_destroy(&q->q_cond); -+} -+ -+void decode_q_init(req_decode_q * const q) -+{ -+ memset(q, 0, sizeof(*q)); -+ pthread_mutex_init(&q->q_lock, NULL); -+ pthread_cond_init(&q->q_cond, NULL); -+} -+ -+ ---- /dev/null -+++ b/libavcodec/v4l2_req_decode_q.h -@@ -0,0 +1,25 @@ -+#ifndef AVCODEC_V4L2_REQ_DECODE_Q_H -+#define AVCODEC_V4L2_REQ_DECODE_Q_H -+ -+typedef struct req_decode_ent { -+ struct req_decode_ent * next; -+ struct req_decode_ent * prev; -+ int in_q; -+} req_decode_ent; -+ -+typedef struct req_decode_q { -+ pthread_mutex_t q_lock; -+ pthread_cond_t q_cond; -+ req_decode_ent * head; -+ req_decode_ent * tail; -+} req_decode_q; -+ -+int decode_q_in_q(const req_decode_ent * const d); -+void decode_q_add(req_decode_q * const q, req_decode_ent * const d); -+void decode_q_remove(req_decode_q * const q, req_decode_ent * const d); -+void decode_q_wait(req_decode_q * const q, req_decode_ent * const d); -+void decode_q_uninit(req_decode_q * const q); -+void decode_q_init(req_decode_q * const q); -+ -+#endif -+ ---- /dev/null -+++ b/libavcodec/v4l2_req_devscan.c -@@ -0,0 +1,449 @@ -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+ -+#include -+#include -+ -+#include "v4l2_req_devscan.h" -+#include "v4l2_req_utils.h" -+ -+struct decdev { -+ enum v4l2_buf_type src_type; -+ uint32_t src_fmt_v4l2; -+ const char * vname; -+ const char * mname; -+}; -+ -+struct devscan { -+ struct decdev env; -+ unsigned int dev_size; -+ unsigned int dev_count; -+ struct decdev *devs; -+}; -+ -+static int video_src_pixfmt_supported(uint32_t fmt) -+{ -+ return 1; -+} -+ -+static void v4l2_setup_format(struct v4l2_format *format, unsigned int type, -+ unsigned int width, unsigned int height, -+ unsigned int pixelformat) -+{ -+ unsigned int sizeimage; -+ -+ memset(format, 0, sizeof(*format)); -+ format->type = type; -+ -+ sizeimage = V4L2_TYPE_IS_OUTPUT(type) ? 4 * 1024 * 1024 : 0; -+ -+ if (V4L2_TYPE_IS_MULTIPLANAR(type)) { -+ format->fmt.pix_mp.width = width; -+ format->fmt.pix_mp.height = height; -+ format->fmt.pix_mp.plane_fmt[0].sizeimage = sizeimage; -+ format->fmt.pix_mp.pixelformat = pixelformat; -+ } else { -+ format->fmt.pix.width = width; -+ format->fmt.pix.height = height; -+ format->fmt.pix.sizeimage = sizeimage; -+ format->fmt.pix.pixelformat = pixelformat; -+ } -+} -+ -+static int v4l2_set_format(int video_fd, unsigned int type, unsigned int pixelformat, -+ unsigned int width, unsigned int height) -+{ -+ struct v4l2_format format; -+ -+ v4l2_setup_format(&format, type, width, height, pixelformat); -+ -+ return ioctl(video_fd, VIDIOC_S_FMT, &format) ? -errno : 0; -+} -+ -+static int v4l2_query_capabilities(int video_fd, unsigned int *capabilities) -+{ -+ struct v4l2_capability capability = { 0 }; -+ int rc; -+ -+ rc = ioctl(video_fd, VIDIOC_QUERYCAP, &capability); -+ if (rc < 0) -+ return -errno; -+ -+ if (capabilities != NULL) { -+ if ((capability.capabilities & V4L2_CAP_DEVICE_CAPS) != 0) -+ *capabilities = capability.device_caps; -+ else -+ *capabilities = capability.capabilities; -+ } -+ -+ return 0; -+} -+ -+static int devscan_add(struct devscan *const scan, -+ enum v4l2_buf_type src_type, -+ uint32_t src_fmt_v4l2, -+ const char * vname, -+ const char * mname) -+{ -+ struct decdev *d; -+ -+ if (scan->dev_size <= scan->dev_count) { -+ unsigned int n = !scan->dev_size ? 4 : scan->dev_size * 2; -+ d = realloc(scan->devs, n * sizeof(*d)); -+ if (!d) -+ return -ENOMEM; -+ scan->devs = d; -+ scan->dev_size = n; -+ } -+ -+ d = scan->devs + scan->dev_count; -+ d->src_type = src_type; -+ d->src_fmt_v4l2 = src_fmt_v4l2; -+ d->vname = strdup(vname); -+ if (!d->vname) -+ return -ENOMEM; -+ d->mname = strdup(mname); -+ if (!d->mname) { -+ free((char *)d->vname); -+ return -ENOMEM; -+ } -+ ++scan->dev_count; -+ return 0; -+} -+ -+void devscan_delete(struct devscan **const pScan) -+{ -+ unsigned int i; -+ struct devscan * const scan = *pScan; -+ -+ if (!scan) -+ return; -+ *pScan = NULL; -+ -+ for (i = 0; i < scan->dev_count; ++i) { -+ free((char*)scan->devs[i].mname); -+ free((char*)scan->devs[i].vname); -+ } -+ free(scan->devs); -+ free(scan); -+} -+ -+#define REQ_BUF_CAPS (\ -+ V4L2_BUF_CAP_SUPPORTS_DMABUF |\ -+ V4L2_BUF_CAP_SUPPORTS_REQUESTS |\ -+ V4L2_BUF_CAP_SUPPORTS_M2M_HOLD_CAPTURE_BUF) -+ -+static void probe_formats(void * const dc, -+ struct devscan *const scan, -+ const int fd, -+ const unsigned int type_v4l2, -+ const char *const mpath, -+ const char *const vpath) -+{ -+ unsigned int i; -+ for (i = 0;; ++i) { -+ struct v4l2_fmtdesc fmtdesc = { -+ .index = i, -+ .type = type_v4l2 -+ }; -+ struct v4l2_requestbuffers rbufs = { -+ .count = 0, -+ .type = type_v4l2, -+ .memory = V4L2_MEMORY_MMAP -+ }; -+ while (ioctl(fd, VIDIOC_ENUM_FMT, &fmtdesc)) { -+ if (errno == EINTR) -+ continue; -+ if (errno != EINVAL) -+ request_err(dc, "Enum[%d] failed for type=%d\n", i, type_v4l2); -+ return; -+ } -+ if (!video_src_pixfmt_supported(fmtdesc.pixelformat)) -+ continue; -+ -+ if (v4l2_set_format(fd, type_v4l2, fmtdesc.pixelformat, 720, 480)) { -+ request_debug(dc, "Set failed for type=%d, pf=%.4s\n", type_v4l2, (char*)&fmtdesc.pixelformat); -+ continue; -+ } -+ -+ while (ioctl(fd, VIDIOC_REQBUFS, &rbufs)) { -+ if (errno != EINTR) { -+ request_debug(dc, "%s: Reqbufs failed\n", vpath); -+ continue; -+ } -+ } -+ -+ if ((rbufs.capabilities & REQ_BUF_CAPS) != REQ_BUF_CAPS) { -+ request_debug(dc, "%s: Buf caps %#x insufficient\n", vpath, rbufs.capabilities); -+ continue; -+ } -+ -+ request_debug(dc, "Adding: %s,%s pix=%#x, type=%d\n", -+ mpath, vpath, fmtdesc.pixelformat, type_v4l2); -+ devscan_add(scan, type_v4l2, fmtdesc.pixelformat, vpath, mpath); -+ } -+} -+ -+ -+static int probe_video_device(void * const dc, -+ struct udev_device *const device, -+ struct devscan *const scan, -+ const char *const mpath) -+{ -+ int ret; -+ unsigned int capabilities = 0; -+ int video_fd = -1; -+ -+ const char *path = udev_device_get_devnode(device); -+ if (!path) { -+ request_err(dc, "%s: get video device devnode failed\n", __func__); -+ ret = -EINVAL; -+ goto fail; -+ } -+ -+ video_fd = open(path, O_RDWR, 0); -+ if (video_fd == -1) { -+ ret = -errno; -+ request_err(dc, "%s: opening %s failed, %s (%d)\n", __func__, path, strerror(errno), errno); -+ goto fail; -+ } -+ -+ ret = v4l2_query_capabilities(video_fd, &capabilities); -+ if (ret < 0) { -+ request_err(dc, "%s: get video capability failed, %s (%d)\n", __func__, strerror(-ret), -ret); -+ goto fail; -+ } -+ -+ request_debug(dc, "%s: path=%s capabilities=%#x\n", __func__, path, capabilities); -+ -+ if (!(capabilities & V4L2_CAP_STREAMING)) { -+ request_debug(dc, "%s: missing required streaming capability\n", __func__); -+ ret = -EINVAL; -+ goto fail; -+ } -+ -+ if (!(capabilities & (V4L2_CAP_VIDEO_M2M_MPLANE | V4L2_CAP_VIDEO_M2M))) { -+ request_debug(dc, "%s: missing required mem2mem capability\n", __func__); -+ ret = -EINVAL; -+ goto fail; -+ } -+ -+ /* Should check capture formats too... */ -+ if ((capabilities & V4L2_CAP_VIDEO_M2M) != 0) -+ probe_formats(dc, scan, video_fd, V4L2_BUF_TYPE_VIDEO_OUTPUT, mpath, path); -+ if ((capabilities & V4L2_CAP_VIDEO_M2M_MPLANE) != 0) -+ probe_formats(dc, scan, video_fd, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, mpath, path); -+ -+ close(video_fd); -+ return 0; -+ -+fail: -+ if (video_fd >= 0) -+ close(video_fd); -+ return ret; -+} -+ -+static int probe_media_device(void * const dc, -+ struct udev_device *const device, -+ struct devscan *const scan) -+{ -+ int ret; -+ int rv; -+ struct media_device_info device_info = { 0 }; -+ struct media_v2_topology topology = { 0 }; -+ struct media_v2_interface *interfaces = NULL; -+ struct udev *udev = udev_device_get_udev(device); -+ struct udev_device *video_device; -+ dev_t devnum; -+ int media_fd = -1; -+ -+ const char *path = udev_device_get_devnode(device); -+ if (!path) { -+ request_err(dc, "%s: get media device devnode failed\n", __func__); -+ ret = -EINVAL; -+ goto fail; -+ } -+ -+ media_fd = open(path, O_RDWR, 0); -+ if (media_fd < 0) { -+ ret = -errno; -+ request_err(dc, "%s: opening %s failed, %s (%d)\n", __func__, path, strerror(-ret), -ret); -+ goto fail; -+ } -+ -+ rv = ioctl(media_fd, MEDIA_IOC_DEVICE_INFO, &device_info); -+ if (rv < 0) { -+ ret = -errno; -+ request_err(dc, "%s: get media device info failed, %s (%d)\n", __func__, strerror(-ret), -ret); -+ goto fail; -+ } -+ -+ rv = ioctl(media_fd, MEDIA_IOC_G_TOPOLOGY, &topology); -+ if (rv < 0) { -+ ret = -errno; -+ request_err(dc, "%s: get media topology failed, %s (%d)\n", __func__, strerror(-ret), -ret); -+ goto fail; -+ } -+ -+ if (topology.num_interfaces <= 0) { -+ request_err(dc, "%s: media device has no interfaces\n", __func__); -+ ret = -EINVAL; -+ goto fail; -+ } -+ -+ interfaces = calloc(topology.num_interfaces, sizeof(*interfaces)); -+ if (!interfaces) { -+ request_err(dc, "%s: allocating media interface struct failed\n", __func__); -+ ret = -ENOMEM; -+ goto fail; -+ } -+ -+ topology.ptr_interfaces = (__u64)(uintptr_t)interfaces; -+ rv = ioctl(media_fd, MEDIA_IOC_G_TOPOLOGY, &topology); -+ if (rv < 0) { -+ ret = -errno; -+ request_err(dc, "%s: get media topology failed, %s (%d)\n", __func__, strerror(-ret), -ret); -+ goto fail; -+ } -+ -+ for (int i = 0; i < topology.num_interfaces; i++) { -+ if (interfaces[i].intf_type != MEDIA_INTF_T_V4L_VIDEO) -+ continue; -+ -+ devnum = makedev(interfaces[i].devnode.major, interfaces[i].devnode.minor); -+ video_device = udev_device_new_from_devnum(udev, 'c', devnum); -+ if (!video_device) { -+ ret = -errno; -+ request_err(dc, "%s: video_device[%d]=%p\n", __func__, i, video_device); -+ continue; -+ } -+ -+ ret = probe_video_device(dc, video_device, scan, path); -+ udev_device_unref(video_device); -+ -+ if (ret != 0) -+ goto fail; -+ } -+ -+fail: -+ free(interfaces); -+ if (media_fd != -1) -+ close(media_fd); -+ return ret; -+} -+ -+const char *decdev_media_path(const struct decdev *const dev) -+{ -+ return !dev ? NULL : dev->mname; -+} -+ -+const char *decdev_video_path(const struct decdev *const dev) -+{ -+ return !dev ? NULL : dev->vname; -+} -+ -+enum v4l2_buf_type decdev_src_type(const struct decdev *const dev) -+{ -+ return !dev ? 0 : dev->src_type; -+} -+ -+uint32_t decdev_src_pixelformat(const struct decdev *const dev) -+{ -+ return !dev ? 0 : dev->src_fmt_v4l2; -+} -+ -+ -+const struct decdev *devscan_find(struct devscan *const scan, -+ const uint32_t src_fmt_v4l2) -+{ -+ unsigned int i; -+ -+ if (scan->env.mname && scan->env.vname) -+ return &scan->env; -+ -+ if (!src_fmt_v4l2) -+ return scan->dev_count ? scan->devs + 0 : NULL; -+ -+ for (i = 0; i != scan->dev_count; ++i) { -+ if (scan->devs[i].src_fmt_v4l2 == src_fmt_v4l2) -+ return scan->devs + i; -+ } -+ return NULL; -+} -+ -+int devscan_build(void * const dc, struct devscan **pscan) -+{ -+ int ret; -+ struct udev *udev; -+ struct udev_enumerate *enumerate; -+ struct udev_list_entry *devices; -+ struct udev_list_entry *entry; -+ struct udev_device *device; -+ struct devscan * scan; -+ -+ *pscan = NULL; -+ -+ scan = calloc(1, sizeof(*scan)); -+ if (!scan) { -+ ret = -ENOMEM; -+ goto fail; -+ } -+ -+ scan->env.mname = getenv("LIBVA_V4L2_REQUEST_MEDIA_PATH"); -+ scan->env.vname = getenv("LIBVA_V4L2_REQUEST_VIDEO_PATH"); -+ if (scan->env.mname && scan->env.vname) { -+ request_info(dc, "Media/video device env overrides found: %s,%s\n", -+ scan->env.mname, scan->env.vname); -+ *pscan = scan; -+ return 0; -+ } -+ -+ udev = udev_new(); -+ if (!udev) { -+ request_err(dc, "%s: allocating udev context failed\n", __func__); -+ ret = -ENOMEM; -+ goto fail; -+ } -+ -+ enumerate = udev_enumerate_new(udev); -+ if (!enumerate) { -+ request_err(dc, "%s: allocating udev enumerator failed\n", __func__); -+ ret = -ENOMEM; -+ goto fail; -+ } -+ -+ udev_enumerate_add_match_subsystem(enumerate, "media"); -+ udev_enumerate_scan_devices(enumerate); -+ -+ devices = udev_enumerate_get_list_entry(enumerate); -+ udev_list_entry_foreach(entry, devices) { -+ const char *path = udev_list_entry_get_name(entry); -+ if (!path) -+ continue; -+ -+ device = udev_device_new_from_syspath(udev, path); -+ if (!device) -+ continue; -+ -+ probe_media_device(dc, device, scan); -+ udev_device_unref(device); -+ } -+ -+ udev_enumerate_unref(enumerate); -+ -+ *pscan = scan; -+ return 0; -+ -+fail: -+ udev_unref(udev); -+ devscan_delete(&scan); -+ return ret; -+} -+ ---- /dev/null -+++ b/libavcodec/v4l2_req_devscan.h -@@ -0,0 +1,21 @@ -+#ifndef _DEVSCAN_H_ -+#define _DEVSCAN_H_ -+ -+struct devscan; -+struct decdev; -+enum v4l2_buf_type; -+ -+/* These return pointers to data in the devscan structure and so are vaild -+ * for the lifetime of that -+ */ -+const char *decdev_media_path(const struct decdev *const dev); -+const char *decdev_video_path(const struct decdev *const dev); -+enum v4l2_buf_type decdev_src_type(const struct decdev *const dev); -+uint32_t decdev_src_pixelformat(const struct decdev *const dev); -+ -+const struct decdev *devscan_find(struct devscan *const scan, const uint32_t src_fmt_v4l2); -+ -+int devscan_build(void * const dc, struct devscan **pscan); -+void devscan_delete(struct devscan **const pScan); -+ -+#endif ---- /dev/null -+++ b/libavcodec/v4l2_req_dmabufs.c -@@ -0,0 +1,266 @@ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include "v4l2_req_dmabufs.h" -+#include "v4l2_req_utils.h" -+ -+#define DMABUF_NAME1 "/dev/dma_heap/linux,cma" -+#define DMABUF_NAME2 "/dev/dma_heap/reserved" -+ -+#define TRACE_ALLOC 0 -+ -+struct dmabufs_ctl { -+ int fd; -+ size_t page_size; -+}; -+ -+struct dmabuf_h { -+ int fd; -+ size_t size; -+ size_t len; -+ void * mapptr; -+}; -+ -+#if TRACE_ALLOC -+static unsigned int total_bufs = 0; -+static size_t total_size = 0; -+#endif -+ -+struct dmabuf_h * dmabuf_import(int fd, size_t size) -+{ -+ struct dmabuf_h *dh; -+ -+ fd = dup(fd); -+ if (fd < 0 || size == 0) -+ return NULL; -+ -+ dh = malloc(sizeof(*dh)); -+ if (!dh) { -+ close(fd); -+ return NULL; -+ } -+ -+ *dh = (struct dmabuf_h) { -+ .fd = fd, -+ .size = size, -+ .mapptr = MAP_FAILED -+ }; -+ -+#if TRACE_ALLOC -+ ++total_bufs; -+ total_size += dh->size; -+ request_log("%s: Import: %zd, total=%zd, bufs=%d\n", __func__, dh->size, total_size, total_bufs); -+#endif -+ -+ return dh; -+} -+ -+struct dmabuf_h * dmabuf_realloc(struct dmabufs_ctl * dbsc, struct dmabuf_h * old, size_t size) -+{ -+ struct dmabuf_h * dh; -+ struct dma_heap_allocation_data data = { -+ .len = (size + dbsc->page_size - 1) & ~(dbsc->page_size - 1), -+ .fd = 0, -+ .fd_flags = O_RDWR, -+ .heap_flags = 0 -+ }; -+ -+ if (old != NULL) { -+ if (old->size == data.len) { -+ return old; -+ } -+ dmabuf_free(old); -+ } -+ -+ if (size == 0 || -+ (dh = malloc(sizeof(*dh))) == NULL) -+ return NULL; -+ -+ while (ioctl(dbsc->fd, DMA_HEAP_IOCTL_ALLOC, &data)) { -+ int err = errno; -+ request_log("Failed to alloc %" PRIu64 " from dma-heap(fd=%d): %d (%s)\n", -+ (uint64_t)data.len, -+ dbsc->fd, -+ err, -+ strerror(err)); -+ if (err == EINTR) -+ continue; -+ goto fail; -+ } -+ -+ *dh = (struct dmabuf_h){ -+ .fd = data.fd, -+ .size = (size_t)data.len, -+ .mapptr = MAP_FAILED -+ }; -+ -+#if TRACE_ALLOC -+ ++total_bufs; -+ total_size += dh->size; -+ request_log("%s: Alloc: %zd, total=%zd, bufs=%d\n", __func__, dh->size, total_size, total_bufs); -+#endif -+ -+ return dh; -+ -+fail: -+ free(dh); -+ return NULL; -+} -+ -+int dmabuf_sync(struct dmabuf_h * const dh, unsigned int flags) -+{ -+ struct dma_buf_sync sync = { -+ .flags = flags -+ }; -+ while (ioctl(dh->fd, DMA_BUF_IOCTL_SYNC, &sync) == -1) { -+ const int err = errno; -+ if (errno == EINTR) -+ continue; -+ request_log("%s: ioctl failed: flags=%#x\n", __func__, flags); -+ return -err; -+ } -+ return 0; -+} -+ -+int dmabuf_write_start(struct dmabuf_h * const dh) -+{ -+ return dmabuf_sync(dh, DMA_BUF_SYNC_START | DMA_BUF_SYNC_WRITE); -+} -+ -+int dmabuf_write_end(struct dmabuf_h * const dh) -+{ -+ return dmabuf_sync(dh, DMA_BUF_SYNC_END | DMA_BUF_SYNC_WRITE); -+} -+ -+int dmabuf_read_start(struct dmabuf_h * const dh) -+{ -+ if (!dmabuf_map(dh)) -+ return -1; -+ return dmabuf_sync(dh, DMA_BUF_SYNC_START | DMA_BUF_SYNC_READ); -+} -+ -+int dmabuf_read_end(struct dmabuf_h * const dh) -+{ -+ return dmabuf_sync(dh, DMA_BUF_SYNC_END | DMA_BUF_SYNC_READ); -+} -+ -+ -+void * dmabuf_map(struct dmabuf_h * const dh) -+{ -+ if (!dh) -+ return NULL; -+ if (dh->mapptr != MAP_FAILED) -+ return dh->mapptr; -+ dh->mapptr = mmap(NULL, dh->size, -+ PROT_READ | PROT_WRITE, -+ MAP_SHARED | MAP_POPULATE, -+ dh->fd, 0); -+ if (dh->mapptr == MAP_FAILED) { -+ request_log("%s: Map failed\n", __func__); -+ return NULL; -+ } -+ return dh->mapptr; -+} -+ -+int dmabuf_fd(const struct dmabuf_h * const dh) -+{ -+ if (!dh) -+ return -1; -+ return dh->fd; -+} -+ -+size_t dmabuf_size(const struct dmabuf_h * const dh) -+{ -+ if (!dh) -+ return 0; -+ return dh->size; -+} -+ -+size_t dmabuf_len(const struct dmabuf_h * const dh) -+{ -+ if (!dh) -+ return 0; -+ return dh->len; -+} -+ -+void dmabuf_len_set(struct dmabuf_h * const dh, const size_t len) -+{ -+ dh->len = len; -+} -+ -+ -+ -+void dmabuf_free(struct dmabuf_h * dh) -+{ -+ if (!dh) -+ return; -+ -+#if TRACE_ALLOC -+ --total_bufs; -+ total_size -= dh->size; -+ request_log("%s: Free: %zd, total=%zd, bufs=%d\n", __func__, dh->size, total_size, total_bufs); -+#endif -+ -+ if (dh->mapptr != MAP_FAILED) -+ munmap(dh->mapptr, dh->size); -+ while (close(dh->fd) == -1 && errno == EINTR) -+ /* loop */; -+ free(dh); -+} -+ -+struct dmabufs_ctl * dmabufs_ctl_new(void) -+{ -+ struct dmabufs_ctl * dbsc = malloc(sizeof(*dbsc)); -+ -+ if (!dbsc) -+ return NULL; -+ -+ while ((dbsc->fd = open(DMABUF_NAME1, O_RDWR)) == -1 && -+ errno == EINTR) -+ /* Loop */; -+ -+ if (dbsc->fd == -1) { -+ while ((dbsc->fd = open(DMABUF_NAME2, O_RDWR)) == -1 && -+ errno == EINTR) -+ /* Loop */; -+ if (dbsc->fd == -1) { -+ request_log("Unable to open either %s or %s\n", -+ DMABUF_NAME1, DMABUF_NAME2); -+ goto fail; -+ } -+ } -+ -+ dbsc->page_size = (size_t)sysconf(_SC_PAGE_SIZE); -+ -+ return dbsc; -+ -+fail: -+ free(dbsc); -+ return NULL; -+} -+ -+void dmabufs_ctl_delete(struct dmabufs_ctl ** const pDbsc) -+{ -+ struct dmabufs_ctl * const dbsc = *pDbsc; -+ -+ if (!dbsc) -+ return; -+ *pDbsc = NULL; -+ -+ while (close(dbsc->fd) == -1 && errno == EINTR) -+ /* loop */; -+ -+ free(dbsc); -+} -+ -+ ---- /dev/null -+++ b/libavcodec/v4l2_req_dmabufs.h -@@ -0,0 +1,38 @@ -+#ifndef DMABUFS_H -+#define DMABUFS_H -+ -+struct dmabufs_ctl; -+struct dmabuf_h; -+ -+struct dmabufs_ctl * dmabufs_ctl_new(void); -+void dmabufs_ctl_delete(struct dmabufs_ctl ** const pdbsc); -+ -+// Need not preserve old contents -+// On NULL return old buffer is freed -+struct dmabuf_h * dmabuf_realloc(struct dmabufs_ctl * dbsc, struct dmabuf_h *, size_t size); -+ -+static inline struct dmabuf_h * dmabuf_alloc(struct dmabufs_ctl * dbsc, size_t size) { -+ return dmabuf_realloc(dbsc, NULL, size); -+} -+/* Create from existing fd - dups(fd) */ -+struct dmabuf_h * dmabuf_import(int fd, size_t size); -+void * dmabuf_map(struct dmabuf_h * const dh); -+ -+/* flags from linux/dmabuf.h DMA_BUF_SYNC_xxx */ -+int dmabuf_sync(struct dmabuf_h * const dh, unsigned int flags); -+ -+int dmabuf_write_start(struct dmabuf_h * const dh); -+int dmabuf_write_end(struct dmabuf_h * const dh); -+int dmabuf_read_start(struct dmabuf_h * const dh); -+int dmabuf_read_end(struct dmabuf_h * const dh); -+ -+int dmabuf_fd(const struct dmabuf_h * const dh); -+/* Allocated size */ -+size_t dmabuf_size(const struct dmabuf_h * const dh); -+/* Bytes in use */ -+size_t dmabuf_len(const struct dmabuf_h * const dh); -+/* Set bytes in use */ -+void dmabuf_len_set(struct dmabuf_h * const dh, const size_t len); -+void dmabuf_free(struct dmabuf_h * dh); -+ -+#endif ---- /dev/null -+++ b/libavcodec/v4l2_req_hevc_v1.c -@@ -0,0 +1,3 @@ -+#define HEVC_CTRLS_VERSION 1 -+#include "v4l2_req_hevc_vx.c" -+ ---- /dev/null -+++ b/libavcodec/v4l2_req_hevc_v2.c -@@ -0,0 +1,3 @@ -+#define HEVC_CTRLS_VERSION 2 -+#include "v4l2_req_hevc_vx.c" -+ ---- /dev/null -+++ b/libavcodec/v4l2_req_hevc_v3.c -@@ -0,0 +1,3 @@ -+#define HEVC_CTRLS_VERSION 3 -+#include "v4l2_req_hevc_vx.c" -+ ---- /dev/null -+++ b/libavcodec/v4l2_req_hevc_v4.c -@@ -0,0 +1,3 @@ -+#define HEVC_CTRLS_VERSION 4 -+#include "v4l2_req_hevc_vx.c" -+ ---- /dev/null -+++ b/libavcodec/v4l2_req_hevc_vx.c -@@ -0,0 +1,1365 @@ -+// File included by v4l2_req_hevc_v* - not compiled on its own -+ -+#include "decode.h" -+#include "hevcdec.h" -+#include "hwconfig.h" -+ -+#if HEVC_CTRLS_VERSION == 1 -+#include "hevc-ctrls-v1.h" -+ -+// Fixup renamed entries -+#define V4L2_HEVC_PPS_FLAG_DEPENDENT_SLICE_SEGMENT_ENABLED V4L2_HEVC_PPS_FLAG_DEPENDENT_SLICE_SEGMENT -+ -+#elif HEVC_CTRLS_VERSION == 2 -+#include "hevc-ctrls-v2.h" -+#elif HEVC_CTRLS_VERSION == 3 -+#include "hevc-ctrls-v3.h" -+#elif HEVC_CTRLS_VERSION == 4 -+#include -+#if !defined(V4L2_CID_STATELESS_HEVC_SPS) -+#include "hevc-ctrls-v4.h" -+#endif -+#else -+#error Unknown HEVC_CTRLS_VERSION -+#endif -+ -+#ifndef V4L2_CID_STATELESS_HEVC_SPS -+#define V4L2_CID_STATELESS_HEVC_SPS V4L2_CID_MPEG_VIDEO_HEVC_SPS -+#define V4L2_CID_STATELESS_HEVC_PPS V4L2_CID_MPEG_VIDEO_HEVC_PPS -+#define V4L2_CID_STATELESS_HEVC_SLICE_PARAMS V4L2_CID_MPEG_VIDEO_HEVC_SLICE_PARAMS -+#define V4L2_CID_STATELESS_HEVC_SCALING_MATRIX V4L2_CID_MPEG_VIDEO_HEVC_SCALING_MATRIX -+#define V4L2_CID_STATELESS_HEVC_DECODE_PARAMS V4L2_CID_MPEG_VIDEO_HEVC_DECODE_PARAMS -+#define V4L2_CID_STATELESS_HEVC_DECODE_MODE V4L2_CID_MPEG_VIDEO_HEVC_DECODE_MODE -+#define V4L2_CID_STATELESS_HEVC_START_CODE V4L2_CID_MPEG_VIDEO_HEVC_START_CODE -+ -+#define V4L2_STATELESS_HEVC_DECODE_MODE_SLICE_BASED V4L2_MPEG_VIDEO_HEVC_DECODE_MODE_SLICE_BASED -+#define V4L2_STATELESS_HEVC_DECODE_MODE_FRAME_BASED V4L2_MPEG_VIDEO_HEVC_DECODE_MODE_FRAME_BASED -+#define V4L2_STATELESS_HEVC_START_CODE_NONE V4L2_MPEG_VIDEO_HEVC_START_CODE_NONE -+#define V4L2_STATELESS_HEVC_START_CODE_ANNEX_B V4L2_MPEG_VIDEO_HEVC_START_CODE_ANNEX_B -+#endif -+ -+// Should be in videodev2 but we might not have a good enough one -+#ifndef V4L2_PIX_FMT_HEVC_SLICE -+#define V4L2_PIX_FMT_HEVC_SLICE v4l2_fourcc('S', '2', '6', '5') /* HEVC parsed slices */ -+#endif -+ -+#include "v4l2_request_hevc.h" -+ -+#include "libavutil/hwcontext_drm.h" -+ -+#include -+#include -+ -+#include "v4l2_req_devscan.h" -+#include "v4l2_req_dmabufs.h" -+#include "v4l2_req_pollqueue.h" -+#include "v4l2_req_media.h" -+#include "v4l2_req_utils.h" -+ -+// Attached to buf[0] in frame -+// Pooled in hwcontext so generally create once - 1/frame -+typedef struct V4L2MediaReqDescriptor { -+ AVDRMFrameDescriptor drm; -+ -+ // Media -+ uint64_t timestamp; -+ struct qent_dst * qe_dst; -+ -+ // Decode only - should be NULL by the time we emit the frame -+ struct req_decode_ent decode_ent; -+ -+ struct media_request *req; -+ struct qent_src *qe_src; -+ -+#if HEVC_CTRLS_VERSION >= 2 -+ struct v4l2_ctrl_hevc_decode_params dec; -+#endif -+ -+ size_t num_slices; -+ size_t alloced_slices; -+ struct v4l2_ctrl_hevc_slice_params * slice_params; -+ struct slice_info * slices; -+ -+ size_t num_offsets; -+ size_t alloced_offsets; -+ uint32_t *offsets; -+ -+} V4L2MediaReqDescriptor; -+ -+struct slice_info { -+ const uint8_t * ptr; -+ size_t len; // bytes -+ size_t n_offsets; -+}; -+ -+// Handy container for accumulating controls before setting -+struct req_controls { -+ int has_scaling; -+ struct timeval tv; -+ struct v4l2_ctrl_hevc_sps sps; -+ struct v4l2_ctrl_hevc_pps pps; -+ struct v4l2_ctrl_hevc_scaling_matrix scaling_matrix; -+}; -+ -+//static uint8_t nalu_slice_start_code[] = { 0x00, 0x00, 0x01 }; -+ -+ -+// Get an FFmpeg format from the v4l2 format -+static enum AVPixelFormat pixel_format_from_format(const struct v4l2_format *const format) -+{ -+ switch (V4L2_TYPE_IS_MULTIPLANAR(format->type) ? -+ format->fmt.pix_mp.pixelformat : format->fmt.pix.pixelformat) { -+ case V4L2_PIX_FMT_YUV420: -+ return AV_PIX_FMT_YUV420P; -+ case V4L2_PIX_FMT_NV12: -+ return AV_PIX_FMT_NV12; -+#if CONFIG_SAND -+ case V4L2_PIX_FMT_NV12_COL128: -+ return AV_PIX_FMT_RPI4_8; -+ case V4L2_PIX_FMT_NV12_10_COL128: -+ return AV_PIX_FMT_RPI4_10; -+#endif -+ default: -+ break; -+ } -+ return AV_PIX_FMT_NONE; -+} -+ -+static inline uint64_t frame_capture_dpb(const AVFrame * const frame) -+{ -+ const V4L2MediaReqDescriptor *const rd = (V4L2MediaReqDescriptor *)frame->data[0]; -+ return rd->timestamp; -+} -+ -+static inline void frame_set_capture_dpb(AVFrame * const frame, const uint64_t dpb_stamp) -+{ -+ V4L2MediaReqDescriptor *const rd = (V4L2MediaReqDescriptor *)frame->data[0]; -+ rd->timestamp = dpb_stamp; -+} -+ -+static void fill_pred_table(const HEVCContext *h, struct v4l2_hevc_pred_weight_table *table) -+{ -+ int32_t luma_weight_denom, chroma_weight_denom; -+ const SliceHeader *sh = &h->sh; -+ -+ if (sh->slice_type == HEVC_SLICE_I || -+ (sh->slice_type == HEVC_SLICE_P && !h->ps.pps->weighted_pred_flag) || -+ (sh->slice_type == HEVC_SLICE_B && !h->ps.pps->weighted_bipred_flag)) -+ return; -+ -+ table->luma_log2_weight_denom = sh->luma_log2_weight_denom; -+ -+ if (h->ps.sps->chroma_format_idc) -+ table->delta_chroma_log2_weight_denom = sh->chroma_log2_weight_denom - sh->luma_log2_weight_denom; -+ -+ luma_weight_denom = (1 << sh->luma_log2_weight_denom); -+ chroma_weight_denom = (1 << sh->chroma_log2_weight_denom); -+ -+ for (int i = 0; i < 15 && i < sh->nb_refs[L0]; i++) { -+ table->delta_luma_weight_l0[i] = sh->luma_weight_l0[i] - luma_weight_denom; -+ table->luma_offset_l0[i] = sh->luma_offset_l0[i]; -+ table->delta_chroma_weight_l0[i][0] = sh->chroma_weight_l0[i][0] - chroma_weight_denom; -+ table->delta_chroma_weight_l0[i][1] = sh->chroma_weight_l0[i][1] - chroma_weight_denom; -+ table->chroma_offset_l0[i][0] = sh->chroma_offset_l0[i][0]; -+ table->chroma_offset_l0[i][1] = sh->chroma_offset_l0[i][1]; -+ } -+ -+ if (sh->slice_type != HEVC_SLICE_B) -+ return; -+ -+ for (int i = 0; i < 15 && i < sh->nb_refs[L1]; i++) { -+ table->delta_luma_weight_l1[i] = sh->luma_weight_l1[i] - luma_weight_denom; -+ table->luma_offset_l1[i] = sh->luma_offset_l1[i]; -+ table->delta_chroma_weight_l1[i][0] = sh->chroma_weight_l1[i][0] - chroma_weight_denom; -+ table->delta_chroma_weight_l1[i][1] = sh->chroma_weight_l1[i][1] - chroma_weight_denom; -+ table->chroma_offset_l1[i][0] = sh->chroma_offset_l1[i][0]; -+ table->chroma_offset_l1[i][1] = sh->chroma_offset_l1[i][1]; -+ } -+} -+ -+#if HEVC_CTRLS_VERSION <= 2 -+static int find_frame_rps_type(const HEVCContext *h, uint64_t timestamp) -+{ -+ const HEVCFrame *frame; -+ int i; -+ -+ for (i = 0; i < h->rps[ST_CURR_BEF].nb_refs; i++) { -+ frame = h->rps[ST_CURR_BEF].ref[i]; -+ if (frame && timestamp == frame_capture_dpb(frame->frame)) -+ return V4L2_HEVC_DPB_ENTRY_RPS_ST_CURR_BEFORE; -+ } -+ -+ for (i = 0; i < h->rps[ST_CURR_AFT].nb_refs; i++) { -+ frame = h->rps[ST_CURR_AFT].ref[i]; -+ if (frame && timestamp == frame_capture_dpb(frame->frame)) -+ return V4L2_HEVC_DPB_ENTRY_RPS_ST_CURR_AFTER; -+ } -+ -+ for (i = 0; i < h->rps[LT_CURR].nb_refs; i++) { -+ frame = h->rps[LT_CURR].ref[i]; -+ if (frame && timestamp == frame_capture_dpb(frame->frame)) -+ return V4L2_HEVC_DPB_ENTRY_RPS_LT_CURR; -+ } -+ -+ return 0; -+} -+#endif -+ -+static unsigned int -+get_ref_pic_index(const HEVCContext *h, const HEVCFrame *frame, -+ const struct v4l2_hevc_dpb_entry * const entries, -+ const unsigned int num_entries) -+{ -+ uint64_t timestamp; -+ -+ if (!frame) -+ return 0; -+ -+ timestamp = frame_capture_dpb(frame->frame); -+ -+ for (unsigned int i = 0; i < num_entries; i++) { -+ if (entries[i].timestamp == timestamp) -+ return i; -+ } -+ -+ return 0; -+} -+ -+static const uint8_t * ptr_from_index(const uint8_t * b, unsigned int idx) -+{ -+ unsigned int z = 0; -+ while (idx--) { -+ if (*b++ == 0) { -+ ++z; -+ if (z >= 2 && *b == 3) { -+ ++b; -+ z = 0; -+ } -+ } -+ else { -+ z = 0; -+ } -+ } -+ return b; -+} -+ -+static int slice_add(V4L2MediaReqDescriptor * const rd) -+{ -+ if (rd->num_slices >= rd->alloced_slices) { -+ struct v4l2_ctrl_hevc_slice_params * p2; -+ struct slice_info * s2; -+ size_t n2 = rd->alloced_slices == 0 ? 8 : rd->alloced_slices * 2; -+ -+ p2 = av_realloc_array(rd->slice_params, n2, sizeof(*p2)); -+ if (p2 == NULL) -+ return AVERROR(ENOMEM); -+ rd->slice_params = p2; -+ -+ s2 = av_realloc_array(rd->slices, n2, sizeof(*s2)); -+ if (s2 == NULL) -+ return AVERROR(ENOMEM); -+ rd->slices = s2; -+ -+ rd->alloced_slices = n2; -+ } -+ ++rd->num_slices; -+ return 0; -+} -+ -+static int offsets_add(V4L2MediaReqDescriptor *const rd, const size_t n, const unsigned * const offsets) -+{ -+ if (rd->num_offsets + n > rd->alloced_offsets) { -+ size_t n2 = rd->alloced_slices == 0 ? 128 : rd->alloced_slices * 2; -+ void * p2; -+ while (rd->num_offsets + n > n2) -+ n2 *= 2; -+ if ((p2 = av_realloc_array(rd->offsets, n2, sizeof(*rd->offsets))) == NULL) -+ return AVERROR(ENOMEM); -+ rd->offsets = p2; -+ rd->alloced_offsets = n2; -+ } -+ for (size_t i = 0; i != n; ++i) -+ rd->offsets[rd->num_offsets++] = offsets[i] - 1; -+ return 0; -+} -+ -+static unsigned int -+fill_dpb_entries(const HEVCContext * const h, struct v4l2_hevc_dpb_entry * const entries) -+{ -+ unsigned int i; -+ unsigned int n = 0; -+ const HEVCFrame * const pic = h->ref; -+ -+ for (i = 0; i < FF_ARRAY_ELEMS(h->DPB); i++) { -+ const HEVCFrame * const frame = &h->DPB[i]; -+ if (frame != pic && (frame->flags & (HEVC_FRAME_FLAG_LONG_REF | HEVC_FRAME_FLAG_SHORT_REF))) { -+ struct v4l2_hevc_dpb_entry * const entry = entries + n++; -+ -+ entry->timestamp = frame_capture_dpb(frame->frame); -+#if HEVC_CTRLS_VERSION <= 2 -+ entry->rps = find_frame_rps_type(h, entry->timestamp); -+#else -+ entry->flags = (frame->flags & HEVC_FRAME_FLAG_LONG_REF) == 0 ? 0 : -+ V4L2_HEVC_DPB_ENTRY_LONG_TERM_REFERENCE; -+#endif -+ entry->field_pic = frame->frame->interlaced_frame; -+ -+#if HEVC_CTRLS_VERSION <= 3 -+ /* TODO: Interleaved: Get the POC for each field. */ -+ entry->pic_order_cnt[0] = frame->poc; -+ entry->pic_order_cnt[1] = frame->poc; -+#else -+ entry->pic_order_cnt_val = frame->poc; -+#endif -+ } -+ } -+ return n; -+} -+ -+static void fill_slice_params(const HEVCContext * const h, -+#if HEVC_CTRLS_VERSION >= 2 -+ const struct v4l2_ctrl_hevc_decode_params * const dec, -+#endif -+ struct v4l2_ctrl_hevc_slice_params *slice_params, -+ uint32_t bit_size, uint32_t bit_offset) -+{ -+ const SliceHeader * const sh = &h->sh; -+#if HEVC_CTRLS_VERSION >= 2 -+ const struct v4l2_hevc_dpb_entry *const dpb = dec->dpb; -+ const unsigned int dpb_n = dec->num_active_dpb_entries; -+#else -+ struct v4l2_hevc_dpb_entry *const dpb = slice_params->dpb; -+ unsigned int dpb_n; -+#endif -+ unsigned int i; -+ RefPicList *rpl; -+ -+ *slice_params = (struct v4l2_ctrl_hevc_slice_params) { -+ .bit_size = bit_size, -+#if HEVC_CTRLS_VERSION <= 3 -+ .data_bit_offset = bit_offset, -+#else -+ .data_byte_offset = bit_offset / 8 + 1, -+#endif -+ /* ISO/IEC 23008-2, ITU-T Rec. H.265: General slice segment header */ -+ .slice_segment_addr = sh->slice_segment_addr, -+ -+ /* ISO/IEC 23008-2, ITU-T Rec. H.265: NAL unit header */ -+ .nal_unit_type = h->nal_unit_type, -+ .nuh_temporal_id_plus1 = h->temporal_id + 1, -+ -+ /* ISO/IEC 23008-2, ITU-T Rec. H.265: General slice segment header */ -+ .slice_type = sh->slice_type, -+ .colour_plane_id = sh->colour_plane_id, -+ .slice_pic_order_cnt = h->ref->poc, -+ .num_ref_idx_l0_active_minus1 = sh->nb_refs[L0] ? sh->nb_refs[L0] - 1 : 0, -+ .num_ref_idx_l1_active_minus1 = sh->nb_refs[L1] ? sh->nb_refs[L1] - 1 : 0, -+ .collocated_ref_idx = sh->slice_temporal_mvp_enabled_flag ? sh->collocated_ref_idx : 0, -+ .five_minus_max_num_merge_cand = sh->slice_type == HEVC_SLICE_I ? 0 : 5 - sh->max_num_merge_cand, -+ .slice_qp_delta = sh->slice_qp_delta, -+ .slice_cb_qp_offset = sh->slice_cb_qp_offset, -+ .slice_cr_qp_offset = sh->slice_cr_qp_offset, -+ .slice_act_y_qp_offset = 0, -+ .slice_act_cb_qp_offset = 0, -+ .slice_act_cr_qp_offset = 0, -+ .slice_beta_offset_div2 = sh->beta_offset / 2, -+ .slice_tc_offset_div2 = sh->tc_offset / 2, -+ -+ /* ISO/IEC 23008-2, ITU-T Rec. H.265: Picture timing SEI message */ -+ .pic_struct = h->sei.picture_timing.picture_struct, -+ -+#if HEVC_CTRLS_VERSION < 2 -+ /* ISO/IEC 23008-2, ITU-T Rec. H.265: General slice segment header */ -+ .num_rps_poc_st_curr_before = h->rps[ST_CURR_BEF].nb_refs, -+ .num_rps_poc_st_curr_after = h->rps[ST_CURR_AFT].nb_refs, -+ .num_rps_poc_lt_curr = h->rps[LT_CURR].nb_refs, -+#endif -+ }; -+ -+ if (sh->slice_sample_adaptive_offset_flag[0]) -+ slice_params->flags |= V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_LUMA; -+ -+ if (sh->slice_sample_adaptive_offset_flag[1]) -+ slice_params->flags |= V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_CHROMA; -+ -+ if (sh->slice_temporal_mvp_enabled_flag) -+ slice_params->flags |= V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_TEMPORAL_MVP_ENABLED; -+ -+ if (sh->mvd_l1_zero_flag) -+ slice_params->flags |= V4L2_HEVC_SLICE_PARAMS_FLAG_MVD_L1_ZERO; -+ -+ if (sh->cabac_init_flag) -+ slice_params->flags |= V4L2_HEVC_SLICE_PARAMS_FLAG_CABAC_INIT; -+ -+ if (sh->collocated_list == L0) -+ slice_params->flags |= V4L2_HEVC_SLICE_PARAMS_FLAG_COLLOCATED_FROM_L0; -+ -+ if (sh->disable_deblocking_filter_flag) -+ slice_params->flags |= V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_DEBLOCKING_FILTER_DISABLED; -+ -+ if (sh->slice_loop_filter_across_slices_enabled_flag) -+ slice_params->flags |= V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_LOOP_FILTER_ACROSS_SLICES_ENABLED; -+ -+ if (sh->dependent_slice_segment_flag) -+ slice_params->flags |= V4L2_HEVC_SLICE_PARAMS_FLAG_DEPENDENT_SLICE_SEGMENT; -+ -+#if HEVC_CTRLS_VERSION < 2 -+ dpb_n = fill_dpb_entries(h, dpb); -+ slice_params->num_active_dpb_entries = dpb_n; -+#endif -+ -+ if (sh->slice_type != HEVC_SLICE_I) { -+ rpl = &h->ref->refPicList[0]; -+ for (i = 0; i < rpl->nb_refs; i++) -+ slice_params->ref_idx_l0[i] = get_ref_pic_index(h, rpl->ref[i], dpb, dpb_n); -+ } -+ -+ if (sh->slice_type == HEVC_SLICE_B) { -+ rpl = &h->ref->refPicList[1]; -+ for (i = 0; i < rpl->nb_refs; i++) -+ slice_params->ref_idx_l1[i] = get_ref_pic_index(h, rpl->ref[i], dpb, dpb_n); -+ } -+ -+ fill_pred_table(h, &slice_params->pred_weight_table); -+ -+ slice_params->num_entry_point_offsets = sh->num_entry_point_offsets; -+#if HEVC_CTRLS_VERSION <= 3 -+ if (slice_params->num_entry_point_offsets > 256) { -+ slice_params->num_entry_point_offsets = 256; -+ av_log(NULL, AV_LOG_ERROR, "%s: Currently only 256 entry points are supported, but slice has %d entry points.\n", __func__, sh->num_entry_point_offsets); -+ } -+ -+ for (i = 0; i < slice_params->num_entry_point_offsets; i++) -+ slice_params->entry_point_offset_minus1[i] = sh->entry_point_offset[i] - 1; -+#endif -+} -+ -+#if HEVC_CTRLS_VERSION >= 2 -+static void -+fill_decode_params(const HEVCContext * const h, -+ struct v4l2_ctrl_hevc_decode_params * const dec) -+{ -+ unsigned int i; -+ -+ *dec = (struct v4l2_ctrl_hevc_decode_params){ -+ .pic_order_cnt_val = h->poc, -+ .num_poc_st_curr_before = h->rps[ST_CURR_BEF].nb_refs, -+ .num_poc_st_curr_after = h->rps[ST_CURR_AFT].nb_refs, -+ .num_poc_lt_curr = h->rps[LT_CURR].nb_refs, -+ }; -+ -+ dec->num_active_dpb_entries = fill_dpb_entries(h, dec->dpb); -+ -+ // The docn does seem to ask that we fit our 32 bit signed POC into -+ // a U8 so... (To be fair 16 bits would be enough) -+ // Luckily we (Pi) don't use these fields -+ for (i = 0; i != h->rps[ST_CURR_BEF].nb_refs; ++i) -+ dec->poc_st_curr_before[i] = h->rps[ST_CURR_BEF].ref[i]->poc; -+ for (i = 0; i != h->rps[ST_CURR_AFT].nb_refs; ++i) -+ dec->poc_st_curr_after[i] = h->rps[ST_CURR_AFT].ref[i]->poc; -+ for (i = 0; i != h->rps[LT_CURR].nb_refs; ++i) -+ dec->poc_lt_curr[i] = h->rps[LT_CURR].ref[i]->poc; -+ -+ if (IS_IRAP(h)) -+ dec->flags |= V4L2_HEVC_DECODE_PARAM_FLAG_IRAP_PIC; -+ if (IS_IDR(h)) -+ dec->flags |= V4L2_HEVC_DECODE_PARAM_FLAG_IDR_PIC; -+ if (h->sh.no_output_of_prior_pics_flag) -+ dec->flags |= V4L2_HEVC_DECODE_PARAM_FLAG_NO_OUTPUT_OF_PRIOR; -+ -+} -+#endif -+ -+static void fill_sps(struct v4l2_ctrl_hevc_sps *ctrl, const HEVCSPS *sps) -+{ -+ /* ISO/IEC 23008-2, ITU-T Rec. H.265: Sequence parameter set */ -+ *ctrl = (struct v4l2_ctrl_hevc_sps) { -+ .chroma_format_idc = sps->chroma_format_idc, -+ .pic_width_in_luma_samples = sps->width, -+ .pic_height_in_luma_samples = sps->height, -+ .bit_depth_luma_minus8 = sps->bit_depth - 8, -+ .bit_depth_chroma_minus8 = sps->bit_depth - 8, -+ .log2_max_pic_order_cnt_lsb_minus4 = sps->log2_max_poc_lsb - 4, -+ .sps_max_dec_pic_buffering_minus1 = sps->temporal_layer[sps->max_sub_layers - 1].max_dec_pic_buffering - 1, -+ .sps_max_num_reorder_pics = sps->temporal_layer[sps->max_sub_layers - 1].num_reorder_pics, -+ .sps_max_latency_increase_plus1 = sps->temporal_layer[sps->max_sub_layers - 1].max_latency_increase + 1, -+ .log2_min_luma_coding_block_size_minus3 = sps->log2_min_cb_size - 3, -+ .log2_diff_max_min_luma_coding_block_size = sps->log2_diff_max_min_coding_block_size, -+ .log2_min_luma_transform_block_size_minus2 = sps->log2_min_tb_size - 2, -+ .log2_diff_max_min_luma_transform_block_size = sps->log2_max_trafo_size - sps->log2_min_tb_size, -+ .max_transform_hierarchy_depth_inter = sps->max_transform_hierarchy_depth_inter, -+ .max_transform_hierarchy_depth_intra = sps->max_transform_hierarchy_depth_intra, -+ .pcm_sample_bit_depth_luma_minus1 = sps->pcm.bit_depth - 1, -+ .pcm_sample_bit_depth_chroma_minus1 = sps->pcm.bit_depth_chroma - 1, -+ .log2_min_pcm_luma_coding_block_size_minus3 = sps->pcm.log2_min_pcm_cb_size - 3, -+ .log2_diff_max_min_pcm_luma_coding_block_size = sps->pcm.log2_max_pcm_cb_size - sps->pcm.log2_min_pcm_cb_size, -+ .num_short_term_ref_pic_sets = sps->nb_st_rps, -+ .num_long_term_ref_pics_sps = sps->num_long_term_ref_pics_sps, -+ .chroma_format_idc = sps->chroma_format_idc, -+ .sps_max_sub_layers_minus1 = sps->max_sub_layers - 1, -+ }; -+ -+ if (sps->separate_colour_plane_flag) -+ ctrl->flags |= V4L2_HEVC_SPS_FLAG_SEPARATE_COLOUR_PLANE; -+ -+ if (sps->scaling_list_enable_flag) -+ ctrl->flags |= V4L2_HEVC_SPS_FLAG_SCALING_LIST_ENABLED; -+ -+ if (sps->amp_enabled_flag) -+ ctrl->flags |= V4L2_HEVC_SPS_FLAG_AMP_ENABLED; -+ -+ if (sps->sao_enabled) -+ ctrl->flags |= V4L2_HEVC_SPS_FLAG_SAMPLE_ADAPTIVE_OFFSET; -+ -+ if (sps->pcm_enabled_flag) -+ ctrl->flags |= V4L2_HEVC_SPS_FLAG_PCM_ENABLED; -+ -+ if (sps->pcm.loop_filter_disable_flag) -+ ctrl->flags |= V4L2_HEVC_SPS_FLAG_PCM_LOOP_FILTER_DISABLED; -+ -+ if (sps->long_term_ref_pics_present_flag) -+ ctrl->flags |= V4L2_HEVC_SPS_FLAG_LONG_TERM_REF_PICS_PRESENT; -+ -+ if (sps->sps_temporal_mvp_enabled_flag) -+ ctrl->flags |= V4L2_HEVC_SPS_FLAG_SPS_TEMPORAL_MVP_ENABLED; -+ -+ if (sps->sps_strong_intra_smoothing_enable_flag) -+ ctrl->flags |= V4L2_HEVC_SPS_FLAG_STRONG_INTRA_SMOOTHING_ENABLED; -+} -+ -+static void fill_scaling_matrix(const ScalingList * const sl, -+ struct v4l2_ctrl_hevc_scaling_matrix * const sm) -+{ -+ unsigned int i; -+ -+ for (i = 0; i < 6; i++) { -+ unsigned int j; -+ -+ for (j = 0; j < 16; j++) -+ sm->scaling_list_4x4[i][j] = sl->sl[0][i][j]; -+ for (j = 0; j < 64; j++) { -+ sm->scaling_list_8x8[i][j] = sl->sl[1][i][j]; -+ sm->scaling_list_16x16[i][j] = sl->sl[2][i][j]; -+ if (i < 2) -+ sm->scaling_list_32x32[i][j] = sl->sl[3][i * 3][j]; -+ } -+ sm->scaling_list_dc_coef_16x16[i] = sl->sl_dc[0][i]; -+ if (i < 2) -+ sm->scaling_list_dc_coef_32x32[i] = sl->sl_dc[1][i * 3]; -+ } -+} -+ -+static void fill_pps(struct v4l2_ctrl_hevc_pps * const ctrl, const HEVCPPS * const pps) -+{ -+ uint64_t flags = 0; -+ -+ if (pps->dependent_slice_segments_enabled_flag) -+ flags |= V4L2_HEVC_PPS_FLAG_DEPENDENT_SLICE_SEGMENT_ENABLED; -+ -+ if (pps->output_flag_present_flag) -+ flags |= V4L2_HEVC_PPS_FLAG_OUTPUT_FLAG_PRESENT; -+ -+ if (pps->sign_data_hiding_flag) -+ flags |= V4L2_HEVC_PPS_FLAG_SIGN_DATA_HIDING_ENABLED; -+ -+ if (pps->cabac_init_present_flag) -+ flags |= V4L2_HEVC_PPS_FLAG_CABAC_INIT_PRESENT; -+ -+ if (pps->constrained_intra_pred_flag) -+ flags |= V4L2_HEVC_PPS_FLAG_CONSTRAINED_INTRA_PRED; -+ -+ if (pps->transform_skip_enabled_flag) -+ flags |= V4L2_HEVC_PPS_FLAG_TRANSFORM_SKIP_ENABLED; -+ -+ if (pps->cu_qp_delta_enabled_flag) -+ flags |= V4L2_HEVC_PPS_FLAG_CU_QP_DELTA_ENABLED; -+ -+ if (pps->pic_slice_level_chroma_qp_offsets_present_flag) -+ flags |= V4L2_HEVC_PPS_FLAG_PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT; -+ -+ if (pps->weighted_pred_flag) -+ flags |= V4L2_HEVC_PPS_FLAG_WEIGHTED_PRED; -+ -+ if (pps->weighted_bipred_flag) -+ flags |= V4L2_HEVC_PPS_FLAG_WEIGHTED_BIPRED; -+ -+ if (pps->transquant_bypass_enable_flag) -+ flags |= V4L2_HEVC_PPS_FLAG_TRANSQUANT_BYPASS_ENABLED; -+ -+ if (pps->tiles_enabled_flag) -+ flags |= V4L2_HEVC_PPS_FLAG_TILES_ENABLED; -+ -+ if (pps->entropy_coding_sync_enabled_flag) -+ flags |= V4L2_HEVC_PPS_FLAG_ENTROPY_CODING_SYNC_ENABLED; -+ -+ if (pps->loop_filter_across_tiles_enabled_flag) -+ flags |= V4L2_HEVC_PPS_FLAG_LOOP_FILTER_ACROSS_TILES_ENABLED; -+ -+ if (pps->seq_loop_filter_across_slices_enabled_flag) -+ flags |= V4L2_HEVC_PPS_FLAG_PPS_LOOP_FILTER_ACROSS_SLICES_ENABLED; -+ -+ if (pps->deblocking_filter_override_enabled_flag) -+ flags |= V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_OVERRIDE_ENABLED; -+ -+ if (pps->disable_dbf) -+ flags |= V4L2_HEVC_PPS_FLAG_PPS_DISABLE_DEBLOCKING_FILTER; -+ -+ if (pps->lists_modification_present_flag) -+ flags |= V4L2_HEVC_PPS_FLAG_LISTS_MODIFICATION_PRESENT; -+ -+ if (pps->slice_header_extension_present_flag) -+ flags |= V4L2_HEVC_PPS_FLAG_SLICE_SEGMENT_HEADER_EXTENSION_PRESENT; -+ -+ /* ISO/IEC 23008-2, ITU-T Rec. H.265: Picture parameter set */ -+ *ctrl = (struct v4l2_ctrl_hevc_pps) { -+ .num_extra_slice_header_bits = pps->num_extra_slice_header_bits, -+ .init_qp_minus26 = pps->pic_init_qp_minus26, -+ .diff_cu_qp_delta_depth = pps->diff_cu_qp_delta_depth, -+ .pps_cb_qp_offset = pps->cb_qp_offset, -+ .pps_cr_qp_offset = pps->cr_qp_offset, -+ .pps_beta_offset_div2 = pps->beta_offset / 2, -+ .pps_tc_offset_div2 = pps->tc_offset / 2, -+ .log2_parallel_merge_level_minus2 = pps->log2_parallel_merge_level - 2, -+ .flags = flags -+ }; -+ -+ -+ if (pps->tiles_enabled_flag) { -+ ctrl->num_tile_columns_minus1 = pps->num_tile_columns - 1; -+ ctrl->num_tile_rows_minus1 = pps->num_tile_rows - 1; -+ -+ for (int i = 0; i < pps->num_tile_columns; i++) -+ ctrl->column_width_minus1[i] = pps->column_width[i] - 1; -+ -+ for (int i = 0; i < pps->num_tile_rows; i++) -+ ctrl->row_height_minus1[i] = pps->row_height[i] - 1; -+ } -+} -+ -+// Called before finally returning the frame to the user -+// Set corrupt flag here as this is actually the frame structure that -+// is going to the user (in MT land each thread has its own pool) -+static int frame_post_process(void *logctx, AVFrame *frame) -+{ -+ V4L2MediaReqDescriptor *rd = (V4L2MediaReqDescriptor*)frame->data[0]; -+ -+// av_log(NULL, AV_LOG_INFO, "%s\n", __func__); -+ frame->flags &= ~AV_FRAME_FLAG_CORRUPT; -+ if (rd->qe_dst) { -+ MediaBufsStatus stat = qent_dst_wait(rd->qe_dst); -+ if (stat != MEDIABUFS_STATUS_SUCCESS) { -+ av_log(logctx, AV_LOG_ERROR, "%s: Decode fail\n", __func__); -+ frame->flags |= AV_FRAME_FLAG_CORRUPT; -+ } -+ } -+ -+ return 0; -+} -+ -+static inline struct timeval cvt_dpb_to_tv(uint64_t t) -+{ -+ t /= 1000; -+ return (struct timeval){ -+ .tv_usec = t % 1000000, -+ .tv_sec = t / 1000000 -+ }; -+} -+ -+static inline uint64_t cvt_timestamp_to_dpb(const unsigned int t) -+{ -+ return (uint64_t)t * 1000; -+} -+ -+static int v4l2_request_hevc_start_frame(AVCodecContext *avctx, -+ av_unused const uint8_t *buffer, -+ av_unused uint32_t size) -+{ -+ const HEVCContext *h = avctx->priv_data; -+ V4L2MediaReqDescriptor *const rd = (V4L2MediaReqDescriptor *)h->ref->frame->data[0]; -+ V4L2RequestContextHEVC * const ctx = avctx->internal->hwaccel_priv_data; -+ -+// av_log(NULL, AV_LOG_INFO, "%s\n", __func__); -+ decode_q_add(&ctx->decode_q, &rd->decode_ent); -+ -+ rd->num_slices = 0; -+ ctx->timestamp++; -+ rd->timestamp = cvt_timestamp_to_dpb(ctx->timestamp); -+ -+ { -+ FrameDecodeData * const fdd = (FrameDecodeData*)h->ref->frame->private_ref->data; -+ fdd->post_process = frame_post_process; -+ } -+ -+ // qe_dst needs to be bound to the data buffer and only returned when that is -+ if (!rd->qe_dst) -+ { -+ if ((rd->qe_dst = mediabufs_dst_qent_alloc(ctx->mbufs, ctx->dbufs)) == NULL) { -+ av_log(avctx, AV_LOG_ERROR, "%s: Failed to get dst buffer\n", __func__); -+ return AVERROR(ENOMEM); -+ } -+ } -+ -+ ff_thread_finish_setup(avctx); // Allow next thread to enter rpi_hevc_start_frame -+ -+ return 0; -+} -+ -+// Object fd & size will be zapped by this & need setting later -+static int drm_from_format(AVDRMFrameDescriptor * const desc, const struct v4l2_format * const format) -+{ -+ AVDRMLayerDescriptor *layer = &desc->layers[0]; -+ unsigned int width; -+ unsigned int height; -+ unsigned int bpl; -+ uint32_t pixelformat; -+ -+ if (V4L2_TYPE_IS_MULTIPLANAR(format->type)) { -+ width = format->fmt.pix_mp.width; -+ height = format->fmt.pix_mp.height; -+ pixelformat = format->fmt.pix_mp.pixelformat; -+ bpl = format->fmt.pix_mp.plane_fmt[0].bytesperline; -+ } -+ else { -+ width = format->fmt.pix.width; -+ height = format->fmt.pix.height; -+ pixelformat = format->fmt.pix.pixelformat; -+ bpl = format->fmt.pix.bytesperline; -+ } -+ -+ switch (pixelformat) { -+ case V4L2_PIX_FMT_NV12: -+ layer->format = DRM_FORMAT_NV12; -+ desc->objects[0].format_modifier = DRM_FORMAT_MOD_LINEAR; -+ break; -+#if CONFIG_SAND -+ case V4L2_PIX_FMT_NV12_COL128: -+ layer->format = DRM_FORMAT_NV12; -+ desc->objects[0].format_modifier = DRM_FORMAT_MOD_BROADCOM_SAND128_COL_HEIGHT(bpl); -+ break; -+ case V4L2_PIX_FMT_NV12_10_COL128: -+ layer->format = DRM_FORMAT_P030; -+ desc->objects[0].format_modifier = DRM_FORMAT_MOD_BROADCOM_SAND128_COL_HEIGHT(bpl); -+ break; -+#endif -+#ifdef DRM_FORMAT_MOD_ALLWINNER_TILED -+ case V4L2_PIX_FMT_SUNXI_TILED_NV12: -+ layer->format = DRM_FORMAT_NV12; -+ desc->objects[0].format_modifier = DRM_FORMAT_MOD_ALLWINNER_TILED; -+ break; -+#endif -+#if defined(V4L2_PIX_FMT_NV15) && defined(DRM_FORMAT_NV15) -+ case V4L2_PIX_FMT_NV15: -+ layer->format = DRM_FORMAT_NV15; -+ desc->objects[0].format_modifier = DRM_FORMAT_MOD_LINEAR; -+ break; -+#endif -+ case V4L2_PIX_FMT_NV16: -+ layer->format = DRM_FORMAT_NV16; -+ desc->objects[0].format_modifier = DRM_FORMAT_MOD_LINEAR; -+ break; -+#if defined(V4L2_PIX_FMT_NV20) && defined(DRM_FORMAT_NV20) -+ case V4L2_PIX_FMT_NV20: -+ layer->format = DRM_FORMAT_NV20; -+ desc->objects[0].format_modifier = DRM_FORMAT_MOD_LINEAR; -+ break; -+#endif -+ default: -+ return -1; -+ } -+ -+ desc->nb_objects = 1; -+ desc->objects[0].fd = -1; -+ desc->objects[0].size = 0; -+ -+ desc->nb_layers = 1; -+ layer->nb_planes = 2; -+ -+ layer->planes[0].object_index = 0; -+ layer->planes[0].offset = 0; -+ layer->planes[0].pitch = bpl; -+#if CONFIG_SAND -+ if (pixelformat == V4L2_PIX_FMT_NV12_COL128) { -+ layer->planes[1].object_index = 0; -+ layer->planes[1].offset = height * 128; -+ layer->planes[0].pitch = width; -+ layer->planes[1].pitch = width; -+ } -+ else if (pixelformat == V4L2_PIX_FMT_NV12_10_COL128) { -+ layer->planes[1].object_index = 0; -+ layer->planes[1].offset = height * 128; -+ layer->planes[0].pitch = width * 2; // Lies but it keeps DRM import happy -+ layer->planes[1].pitch = width * 2; -+ } -+ else -+#endif -+ { -+ layer->planes[1].object_index = 0; -+ layer->planes[1].offset = layer->planes[0].pitch * height; -+ layer->planes[1].pitch = layer->planes[0].pitch; -+ } -+ -+ return 0; -+} -+ -+static int -+set_req_ctls(V4L2RequestContextHEVC *ctx, struct media_request * const mreq, -+ struct req_controls *const controls, -+#if HEVC_CTRLS_VERSION >= 2 -+ struct v4l2_ctrl_hevc_decode_params * const dec, -+#endif -+ struct v4l2_ctrl_hevc_slice_params * const slices, const unsigned int slice_count, -+ void * const offsets, const size_t offset_count) -+{ -+ int rv; -+#if HEVC_CTRLS_VERSION >= 2 -+ unsigned int n = 3; -+#else -+ unsigned int n = 2; -+#endif -+ -+ struct v4l2_ext_control control[6] = { -+ { -+ .id = V4L2_CID_STATELESS_HEVC_SPS, -+ .ptr = &controls->sps, -+ .size = sizeof(controls->sps), -+ }, -+ { -+ .id = V4L2_CID_STATELESS_HEVC_PPS, -+ .ptr = &controls->pps, -+ .size = sizeof(controls->pps), -+ }, -+#if HEVC_CTRLS_VERSION >= 2 -+ { -+ .id = V4L2_CID_STATELESS_HEVC_DECODE_PARAMS, -+ .ptr = dec, -+ .size = sizeof(*dec), -+ }, -+#endif -+ }; -+ -+ if (slices) -+ control[n++] = (struct v4l2_ext_control) { -+ .id = V4L2_CID_STATELESS_HEVC_SLICE_PARAMS, -+ .ptr = slices, -+ .size = sizeof(*slices) * slice_count, -+ }; -+ -+ if (controls->has_scaling) -+ control[n++] = (struct v4l2_ext_control) { -+ .id = V4L2_CID_STATELESS_HEVC_SCALING_MATRIX, -+ .ptr = &controls->scaling_matrix, -+ .size = sizeof(controls->scaling_matrix), -+ }; -+ -+#if HEVC_CTRLS_VERSION >= 4 -+ if (offsets) -+ control[n++] = (struct v4l2_ext_control) { -+ .id = V4L2_CID_STATELESS_HEVC_ENTRY_POINT_OFFSETS, -+ .ptr = offsets, -+ .size = sizeof(((struct V4L2MediaReqDescriptor *)0)->offsets[0]) * offset_count, -+ }; -+#endif -+ -+ rv = mediabufs_ctl_set_ext_ctrls(ctx->mbufs, mreq, control, n); -+ -+ return rv; -+} -+ -+// This only works because we started out from a single coded frame buffer -+// that will remain intact until after end_frame -+static int v4l2_request_hevc_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size) -+{ -+ const HEVCContext * const h = avctx->priv_data; -+ V4L2RequestContextHEVC * const ctx = avctx->internal->hwaccel_priv_data; -+ V4L2MediaReqDescriptor * const rd = (V4L2MediaReqDescriptor*)h->ref->frame->data[0]; -+ int bcount = get_bits_count(&h->HEVClc->gb); -+ uint32_t boff = (ptr_from_index(buffer, bcount/8 + 1) - (buffer + bcount/8 + 1)) * 8 + bcount; -+ -+ const unsigned int n = rd->num_slices; -+ const unsigned int block_start = (n / ctx->max_slices) * ctx->max_slices; -+ -+ int rv; -+ struct slice_info * si; -+ -+ // This looks dodgy but we know that FFmpeg has parsed this from a buffer -+ // that contains the entire frame including the start code -+ if (ctx->start_code == V4L2_STATELESS_HEVC_START_CODE_ANNEX_B) { -+ buffer -= 3; -+ size += 3; -+ boff += 24; -+ if (buffer[0] != 0 || buffer[1] != 0 || buffer[2] != 1) { -+ av_log(avctx, AV_LOG_ERROR, "Start code requested but missing %02x:%02x:%02x\n", -+ buffer[0], buffer[1], buffer[2]); -+ } -+ } -+ -+ if (ctx->decode_mode == V4L2_STATELESS_HEVC_DECODE_MODE_FRAME_BASED) { -+ if (rd->slices == NULL) { -+ if ((rd->slices = av_mallocz(sizeof(*rd->slices))) == NULL) -+ return AVERROR(ENOMEM); -+ rd->slices->ptr = buffer; -+ rd->num_slices = 1; -+ } -+ rd->slices->len = buffer - rd->slices->ptr + size; -+ return 0; -+ } -+ -+ if ((rv = slice_add(rd)) != 0) -+ return rv; -+ -+ si = rd->slices + n; -+ si->ptr = buffer; -+ si->len = size; -+ si->n_offsets = rd->num_offsets; -+ -+ if (n != block_start) { -+ struct slice_info *const si0 = rd->slices + block_start; -+ const size_t offset = (buffer - si0->ptr); -+ boff += offset * 8; -+ size += offset; -+ si0->len = si->len + offset; -+ } -+ -+#if HEVC_CTRLS_VERSION >= 2 -+ if (n == 0) -+ fill_decode_params(h, &rd->dec); -+ fill_slice_params(h, &rd->dec, rd->slice_params + n, size * 8, boff); -+#else -+ fill_slice_params(h, rd->slice_params + n, size * 8, boff); -+#endif -+ if (ctx->max_offsets != 0 && -+ (rv = offsets_add(rd, h->sh.num_entry_point_offsets, h->sh.entry_point_offset)) != 0) -+ return rv; -+ -+ return 0; -+} -+ -+static void v4l2_request_hevc_abort_frame(AVCodecContext * const avctx) -+{ -+ const HEVCContext * const h = avctx->priv_data; -+ if (h->ref != NULL) { -+ V4L2MediaReqDescriptor *const rd = (V4L2MediaReqDescriptor *)h->ref->frame->data[0]; -+ V4L2RequestContextHEVC * const ctx = avctx->internal->hwaccel_priv_data; -+ -+ media_request_abort(&rd->req); -+ mediabufs_src_qent_abort(ctx->mbufs, &rd->qe_src); -+ -+ decode_q_remove(&ctx->decode_q, &rd->decode_ent); -+ } -+} -+ -+static int send_slice(AVCodecContext * const avctx, -+ V4L2MediaReqDescriptor * const rd, -+ struct req_controls *const controls, -+ const unsigned int i, const unsigned int j) -+{ -+ V4L2RequestContextHEVC * const ctx = avctx->internal->hwaccel_priv_data; -+ -+ const int is_last = (j == rd->num_slices); -+ struct slice_info *const si = rd->slices + i; -+ struct media_request * req = NULL; -+ struct qent_src * src = NULL; -+ MediaBufsStatus stat; -+ void * offsets = rd->offsets + rd->slices[i].n_offsets; -+ size_t n_offsets = (is_last ? rd->num_offsets : rd->slices[j].n_offsets) - rd->slices[i].n_offsets; -+ -+ if ((req = media_request_get(ctx->mpool)) == NULL) { -+ av_log(avctx, AV_LOG_ERROR, "%s: Failed to alloc media request\n", __func__); -+ return AVERROR(ENOMEM); -+ } -+ -+ if (set_req_ctls(ctx, req, -+ controls, -+#if HEVC_CTRLS_VERSION >= 2 -+ &rd->dec, -+#endif -+ rd->slice_params + i, j - i, -+ offsets, n_offsets)) { -+ av_log(avctx, AV_LOG_ERROR, "%s: Failed to set req ctls\n", __func__); -+ goto fail1; -+ } -+ -+ if ((src = mediabufs_src_qent_get(ctx->mbufs)) == NULL) { -+ av_log(avctx, AV_LOG_ERROR, "%s: Failed to get src buffer\n", __func__); -+ goto fail1; -+ } -+ -+ if (qent_src_data_copy(src, 0, si->ptr, si->len, ctx->dbufs) != 0) { -+ av_log(avctx, AV_LOG_ERROR, "%s: Failed data copy\n", __func__); -+ goto fail2; -+ } -+ -+ if (qent_src_params_set(src, &controls->tv)) { -+ av_log(avctx, AV_LOG_ERROR, "%s: Failed src param set\n", __func__); -+ goto fail2; -+ } -+ -+ stat = mediabufs_start_request(ctx->mbufs, &req, &src, -+ i == 0 ? rd->qe_dst : NULL, -+ is_last); -+ -+ if (stat != MEDIABUFS_STATUS_SUCCESS) { -+ av_log(avctx, AV_LOG_ERROR, "%s: Failed to start request\n", __func__); -+ return AVERROR_UNKNOWN; -+ } -+ return 0; -+ -+fail2: -+ mediabufs_src_qent_abort(ctx->mbufs, &src); -+fail1: -+ media_request_abort(&req); -+ return AVERROR_UNKNOWN; -+} -+ -+static int v4l2_request_hevc_end_frame(AVCodecContext *avctx) -+{ -+ const HEVCContext * const h = avctx->priv_data; -+ V4L2MediaReqDescriptor *rd = (V4L2MediaReqDescriptor*)h->ref->frame->data[0]; -+ V4L2RequestContextHEVC *ctx = avctx->internal->hwaccel_priv_data; -+ struct req_controls rc; -+ unsigned int i; -+ int rv; -+ -+ // It is possible, though maybe a bug, to get an end_frame without -+ // a previous start_frame. If we do then give up. -+ if (!decode_q_in_q(&rd->decode_ent)) { -+ av_log(avctx, AV_LOG_DEBUG, "%s: Frame not in decode Q\n", __func__); -+ return AVERROR_INVALIDDATA; -+ } -+ -+ { -+ const ScalingList *sl = h->ps.pps->scaling_list_data_present_flag ? -+ &h->ps.pps->scaling_list : -+ h->ps.sps->scaling_list_enable_flag ? -+ &h->ps.sps->scaling_list : NULL; -+ -+ -+ memset(&rc, 0, sizeof(rc)); -+ rc.tv = cvt_dpb_to_tv(rd->timestamp); -+ fill_sps(&rc.sps, h->ps.sps); -+ fill_pps(&rc.pps, h->ps.pps); -+ if (sl) { -+ rc.has_scaling = 1; -+ fill_scaling_matrix(sl, &rc.scaling_matrix); -+ } -+ } -+ -+ decode_q_wait(&ctx->decode_q, &rd->decode_ent); -+ -+ // qe_dst needs to be bound to the data buffer and only returned when that is -+ // Alloc almost certainly wants to be serialised if there is any chance of blocking -+ // so we get the next frame to be free in the thread that needs it for decode first. -+ // -+ // In our current world this probably isn't a concern but put it here anyway -+ if (!rd->qe_dst) -+ { -+ if ((rd->qe_dst = mediabufs_dst_qent_alloc(ctx->mbufs, ctx->dbufs)) == NULL) { -+ av_log(avctx, AV_LOG_ERROR, "%s: Failed to get dst buffer\n", __func__); -+ rv = AVERROR(ENOMEM); -+ goto fail; -+ } -+ } -+ -+ // Send as slices -+ for (i = 0; i < rd->num_slices; i += ctx->max_slices) { -+ const unsigned int e = FFMIN(rd->num_slices, i + ctx->max_slices); -+ if ((rv = send_slice(avctx, rd, &rc, i, e)) != 0) -+ goto fail; -+ } -+ -+ // Set the drm_prime desriptor -+ drm_from_format(&rd->drm, mediabufs_dst_fmt(ctx->mbufs)); -+ rd->drm.objects[0].fd = dmabuf_fd(qent_dst_dmabuf(rd->qe_dst, 0)); -+ rd->drm.objects[0].size = dmabuf_size(qent_dst_dmabuf(rd->qe_dst, 0)); -+ -+ decode_q_remove(&ctx->decode_q, &rd->decode_ent); -+ return 0; -+ -+fail: -+ decode_q_remove(&ctx->decode_q, &rd->decode_ent); -+ return rv; -+} -+ -+static inline int -+ctrl_valid(const struct v4l2_query_ext_ctrl * const c, const int64_t v) -+{ -+ return v >= c->minimum && v <= c->maximum; -+} -+ -+// Initial check & init -+static int -+probe(AVCodecContext * const avctx, V4L2RequestContextHEVC * const ctx) -+{ -+ const HEVCContext *h = avctx->priv_data; -+ const HEVCSPS * const sps = h->ps.sps; -+ struct v4l2_ctrl_hevc_sps ctrl_sps; -+ unsigned int i; -+ -+ // Check for var slice array -+ struct v4l2_query_ext_ctrl qc[] = { -+ { .id = V4L2_CID_STATELESS_HEVC_SLICE_PARAMS }, -+ { .id = V4L2_CID_STATELESS_HEVC_DECODE_MODE, }, -+ { .id = V4L2_CID_STATELESS_HEVC_SPS }, -+ { .id = V4L2_CID_STATELESS_HEVC_PPS }, -+ { .id = V4L2_CID_STATELESS_HEVC_SCALING_MATRIX }, -+#if HEVC_CTRLS_VERSION >= 2 -+ { .id = V4L2_CID_STATELESS_HEVC_DECODE_PARAMS }, -+#endif -+ }; -+ // Order & size must match! -+ static const size_t ctrl_sizes[] = { -+ sizeof(struct v4l2_ctrl_hevc_slice_params), -+ sizeof(int32_t), -+ sizeof(struct v4l2_ctrl_hevc_sps), -+ sizeof(struct v4l2_ctrl_hevc_pps), -+ sizeof(struct v4l2_ctrl_hevc_scaling_matrix), -+#if HEVC_CTRLS_VERSION >= 2 -+ sizeof(struct v4l2_ctrl_hevc_decode_params), -+#endif -+ }; -+ const unsigned int noof_ctrls = FF_ARRAY_ELEMS(qc); -+ -+#if HEVC_CTRLS_VERSION == 2 -+ if (mediabufs_ctl_driver_version(ctx->mbufs) >= MEDIABUFS_DRIVER_VERSION(5, 18, 0)) -+ return AVERROR(EINVAL); -+#elif HEVC_CTRLS_VERSION == 3 -+ if (mediabufs_ctl_driver_version(ctx->mbufs) < MEDIABUFS_DRIVER_VERSION(5, 18, 0)) -+ return AVERROR(EINVAL); -+#endif -+ -+ mediabufs_ctl_query_ext_ctrls(ctx->mbufs, qc, noof_ctrls); -+ i = 0; -+#if HEVC_CTRLS_VERSION >= 4 -+ // Skip slice check if no slice mode -+ if (qc[1].type != 0 && !ctrl_valid(qc + 1, V4L2_STATELESS_HEVC_DECODE_MODE_SLICE_BASED)) -+ i = 1; -+#else -+ // Fail frame mode silently for anything prior to V4 -+ if (qc[1].type == 0 || !ctrl_valid(qc + 1, V4L2_STATELESS_HEVC_DECODE_MODE_SLICE_BASED)) -+ return AVERROR(EINVAL); -+#endif -+ for (; i != noof_ctrls; ++i) { -+ if (qc[i].type == 0) { -+ av_log(avctx, AV_LOG_DEBUG, "Probed V%d control %#x missing\n", HEVC_CTRLS_VERSION, qc[i].id); -+ return AVERROR(EINVAL); -+ } -+ if (ctrl_sizes[i] != (size_t)qc[i].elem_size) { -+ av_log(avctx, AV_LOG_DEBUG, "Probed V%d control %d size mismatch %zu != %zu\n", -+ HEVC_CTRLS_VERSION, i, ctrl_sizes[i], (size_t)qc[i].elem_size); -+ return AVERROR(EINVAL); -+ } -+ } -+ -+ fill_sps(&ctrl_sps, sps); -+ -+ if (mediabufs_set_ext_ctrl(ctx->mbufs, NULL, V4L2_CID_STATELESS_HEVC_SPS, &ctrl_sps, sizeof(ctrl_sps))) { -+ av_log(avctx, AV_LOG_ERROR, "Failed to set initial SPS\n"); -+ return AVERROR(EINVAL); -+ } -+ -+ return 0; -+} -+ -+// Final init -+static int -+set_controls(AVCodecContext * const avctx, V4L2RequestContextHEVC * const ctx) -+{ -+ int ret; -+ -+ struct v4l2_query_ext_ctrl querys[] = { -+ { .id = V4L2_CID_STATELESS_HEVC_DECODE_MODE, }, -+ { .id = V4L2_CID_STATELESS_HEVC_START_CODE, }, -+ { .id = V4L2_CID_STATELESS_HEVC_SLICE_PARAMS, }, -+#if HEVC_CTRLS_VERSION >= 4 -+ { .id = V4L2_CID_STATELESS_HEVC_ENTRY_POINT_OFFSETS, }, -+#endif -+ }; -+ -+ struct v4l2_ext_control ctrls[] = { -+ { .id = V4L2_CID_STATELESS_HEVC_DECODE_MODE, }, -+ { .id = V4L2_CID_STATELESS_HEVC_START_CODE, }, -+ }; -+ -+ mediabufs_ctl_query_ext_ctrls(ctx->mbufs, querys, FF_ARRAY_ELEMS(querys)); -+ -+ ctx->max_slices = (!(querys[2].flags & V4L2_CTRL_FLAG_DYNAMIC_ARRAY) || -+ querys[2].nr_of_dims != 1 || querys[2].dims[0] == 0) ? -+ 1 : querys[2].dims[0]; -+ av_log(avctx, AV_LOG_DEBUG, "%s: Max slices %d\n", __func__, ctx->max_slices); -+ -+#if HEVC_CTRLS_VERSION >= 4 -+ ctx->max_offsets = (querys[3].type == 0 || querys[3].nr_of_dims != 1) ? -+ 0 : querys[3].dims[0]; -+ av_log(avctx, AV_LOG_DEBUG, "%s: Entry point offsets %d\n", __func__, ctx->max_offsets); -+#else -+ ctx->max_offsets = 0; -+#endif -+ -+ if (querys[0].default_value == V4L2_STATELESS_HEVC_DECODE_MODE_SLICE_BASED || -+ querys[0].default_value == V4L2_STATELESS_HEVC_DECODE_MODE_FRAME_BASED) -+ ctx->decode_mode = querys[0].default_value; -+ else if (ctrl_valid(querys + 0, V4L2_STATELESS_HEVC_DECODE_MODE_FRAME_BASED)) -+ ctx->decode_mode = V4L2_STATELESS_HEVC_DECODE_MODE_FRAME_BASED; -+ else if (ctrl_valid(querys + 0, V4L2_STATELESS_HEVC_DECODE_MODE_SLICE_BASED)) -+ ctx->decode_mode = V4L2_STATELESS_HEVC_DECODE_MODE_SLICE_BASED; -+ else { -+ av_log(avctx, AV_LOG_ERROR, "%s: unsupported decode mode\n", __func__); -+ return AVERROR(EINVAL); -+ } -+ -+ if (querys[1].default_value == V4L2_STATELESS_HEVC_START_CODE_NONE || -+ querys[1].default_value == V4L2_STATELESS_HEVC_START_CODE_ANNEX_B) -+ ctx->start_code = querys[1].default_value; -+ else if (ctrl_valid(querys + 1, V4L2_STATELESS_HEVC_START_CODE_ANNEX_B)) -+ ctx->start_code = V4L2_STATELESS_HEVC_START_CODE_ANNEX_B; -+ else if (ctrl_valid(querys + 1, V4L2_STATELESS_HEVC_START_CODE_NONE)) -+ ctx->start_code = V4L2_STATELESS_HEVC_START_CODE_NONE; -+ else { -+ av_log(avctx, AV_LOG_ERROR, "%s: unsupported start code\n", __func__); -+ return AVERROR(EINVAL); -+ } -+ -+ // If we are in slice mode & START_CODE_NONE supported then pick that -+ // as it doesn't require the slightly dodgy look backwards in our raw buffer -+ if (ctx->decode_mode == V4L2_STATELESS_HEVC_DECODE_MODE_SLICE_BASED && -+ ctrl_valid(querys + 1, V4L2_STATELESS_HEVC_START_CODE_NONE)) -+ ctx->start_code = V4L2_STATELESS_HEVC_START_CODE_NONE; -+ -+ ctrls[0].value = ctx->decode_mode; -+ ctrls[1].value = ctx->start_code; -+ -+ ret = mediabufs_ctl_set_ext_ctrls(ctx->mbufs, NULL, ctrls, FF_ARRAY_ELEMS(ctrls)); -+ return !ret ? 0 : AVERROR(-ret); -+} -+ -+static void v4l2_req_frame_free(void *opaque, uint8_t *data) -+{ -+ AVCodecContext *avctx = opaque; -+ V4L2MediaReqDescriptor * const rd = (V4L2MediaReqDescriptor*)data; -+ -+ av_log(NULL, AV_LOG_DEBUG, "%s: avctx=%p data=%p\n", __func__, avctx, data); -+ -+ qent_dst_unref(&rd->qe_dst); -+ -+ // We don't expect req or qe_src to be set -+ if (rd->req || rd->qe_src) -+ av_log(NULL, AV_LOG_ERROR, "%s: qe_src %p or req %p not NULL\n", __func__, rd->req, rd->qe_src); -+ -+ av_freep(&rd->slices); -+ av_freep(&rd->slice_params); -+ av_freep(&rd->offsets); -+ -+ av_free(rd); -+} -+ -+static AVBufferRef *v4l2_req_frame_alloc(void *opaque, int size) -+{ -+ AVCodecContext *avctx = opaque; -+// V4L2RequestContextHEVC *ctx = avctx->internal->hwaccel_priv_data; -+// V4L2MediaReqDescriptor *req; -+ AVBufferRef *ref; -+ uint8_t *data; -+// int ret; -+ -+ data = av_mallocz(size); -+ if (!data) -+ return NULL; -+ -+ av_log(avctx, AV_LOG_DEBUG, "%s: avctx=%p size=%d data=%p\n", __func__, avctx, size, data); -+ ref = av_buffer_create(data, size, v4l2_req_frame_free, avctx, 0); -+ if (!ref) { -+ av_freep(&data); -+ return NULL; -+ } -+ return ref; -+} -+ -+#if 0 -+static void v4l2_req_pool_free(void *opaque) -+{ -+ av_log(NULL, AV_LOG_DEBUG, "%s: opaque=%p\n", __func__, opaque); -+} -+ -+static void v4l2_req_hwframe_ctx_free(AVHWFramesContext *hwfc) -+{ -+ av_log(NULL, AV_LOG_DEBUG, "%s: hwfc=%p pool=%p\n", __func__, hwfc, hwfc->pool); -+ -+ av_buffer_pool_uninit(&hwfc->pool); -+} -+#endif -+ -+static int frame_params(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx) -+{ -+ V4L2RequestContextHEVC *ctx = avctx->internal->hwaccel_priv_data; -+ AVHWFramesContext *hwfc = (AVHWFramesContext*)hw_frames_ctx->data; -+ const struct v4l2_format *vfmt = mediabufs_dst_fmt(ctx->mbufs); -+ -+ hwfc->format = AV_PIX_FMT_DRM_PRIME; -+ hwfc->sw_format = pixel_format_from_format(vfmt); -+ if (V4L2_TYPE_IS_MULTIPLANAR(vfmt->type)) { -+ hwfc->width = vfmt->fmt.pix_mp.width; -+ hwfc->height = vfmt->fmt.pix_mp.height; -+ } else { -+ hwfc->width = vfmt->fmt.pix.width; -+ hwfc->height = vfmt->fmt.pix.height; -+ } -+#if 0 -+ hwfc->pool = av_buffer_pool_init2(sizeof(V4L2MediaReqDescriptor), avctx, v4l2_req_frame_alloc, v4l2_req_pool_free); -+ if (!hwfc->pool) -+ return AVERROR(ENOMEM); -+ -+ hwfc->free = v4l2_req_hwframe_ctx_free; -+ -+ hwfc->initial_pool_size = 1; -+ -+ switch (avctx->codec_id) { -+ case AV_CODEC_ID_VP9: -+ hwfc->initial_pool_size += 8; -+ break; -+ case AV_CODEC_ID_VP8: -+ hwfc->initial_pool_size += 3; -+ break; -+ default: -+ hwfc->initial_pool_size += 2; -+ } -+#endif -+ av_log(avctx, AV_LOG_DEBUG, "%s: avctx=%p ctx=%p hw_frames_ctx=%p hwfc=%p pool=%p width=%d height=%d initial_pool_size=%d\n", __func__, avctx, ctx, hw_frames_ctx, hwfc, hwfc->pool, hwfc->width, hwfc->height, hwfc->initial_pool_size); -+ -+ return 0; -+} -+ -+static int alloc_frame(AVCodecContext * avctx, AVFrame *frame) -+{ -+ int rv; -+ -+ frame->buf[0] = v4l2_req_frame_alloc(avctx, sizeof(V4L2MediaReqDescriptor)); -+ if (!frame->buf[0]) -+ return AVERROR(ENOMEM); -+ -+ frame->data[0] = frame->buf[0]->data; -+ -+ frame->hw_frames_ctx = av_buffer_ref(avctx->hw_frames_ctx); -+ -+ if ((rv = ff_attach_decode_data(frame)) != 0) { -+ av_log(avctx, AV_LOG_ERROR, "Failed to attach decode data to frame\n"); -+ av_frame_unref(frame); -+ return rv; -+ } -+ -+ return 0; -+} -+ -+const v4l2_req_decode_fns V(ff_v4l2_req_hevc) = { -+ .src_pix_fmt_v4l2 = V4L2_PIX_FMT_HEVC_SLICE, -+ .name = "V4L2 HEVC stateless V" STR(HEVC_CTRLS_VERSION), -+ .probe = probe, -+ .set_controls = set_controls, -+ -+ .start_frame = v4l2_request_hevc_start_frame, -+ .decode_slice = v4l2_request_hevc_decode_slice, -+ .end_frame = v4l2_request_hevc_end_frame, -+ .abort_frame = v4l2_request_hevc_abort_frame, -+ .frame_params = frame_params, -+ .alloc_frame = alloc_frame, -+}; -+ ---- /dev/null -+++ b/libavcodec/v4l2_req_media.c -@@ -0,0 +1,1601 @@ -+/* -+ * Copyright (C) 2018 Paul Kocialkowski -+ * -+ * Permission is hereby granted, free of charge, to any person obtaining a -+ * copy of this software and associated documentation files (the -+ * "Software"), to deal in the Software without restriction, including -+ * without limitation the rights to use, copy, modify, merge, publish, -+ * distribute, sub license, and/or sell copies of the Software, and to -+ * permit persons to whom the Software is furnished to do so, subject to -+ * the following conditions: -+ * -+ * The above copyright notice and this permission notice (including the -+ * next paragraph) shall be included in all copies or substantial portions -+ * of the Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. -+ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR -+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+ -+#include "v4l2_req_dmabufs.h" -+#include "v4l2_req_media.h" -+#include "v4l2_req_pollqueue.h" -+#include "v4l2_req_utils.h" -+#include "weak_link.h" -+ -+ -+/* floor(log2(x)) */ -+static unsigned int log2_size(size_t x) -+{ -+ unsigned int n = 0; -+ -+ if (x & ~0xffff) { -+ n += 16; -+ x >>= 16; -+ } -+ if (x & ~0xff) { -+ n += 8; -+ x >>= 8; -+ } -+ if (x & ~0xf) { -+ n += 4; -+ x >>= 4; -+ } -+ if (x & ~3) { -+ n += 2; -+ x >>= 2; -+ } -+ return (x & ~1) ? n + 1 : n; -+} -+ -+static size_t round_up_size(const size_t x) -+{ -+ /* Admit no size < 256 */ -+ const unsigned int n = x < 256 ? 8 : log2_size(x) - 1; -+ -+ return x >= (3 << n) ? 4 << n : (3 << n); -+} -+ -+struct media_request; -+ -+struct media_pool { -+ int fd; -+ sem_t sem; -+ pthread_mutex_t lock; -+ struct media_request * free_reqs; -+ struct pollqueue * pq; -+}; -+ -+struct media_request { -+ struct media_request * next; -+ struct media_pool * mp; -+ int fd; -+ struct polltask * pt; -+}; -+ -+ -+static inline int do_trywait(sem_t *const sem) -+{ -+ while (sem_trywait(sem)) { -+ if (errno != EINTR) -+ return -errno; -+ } -+ return 0; -+} -+ -+static inline int do_wait(sem_t *const sem) -+{ -+ while (sem_wait(sem)) { -+ if (errno != EINTR) -+ return -errno; -+ } -+ return 0; -+} -+ -+static int request_buffers(int video_fd, unsigned int type, -+ enum v4l2_memory memory, unsigned int buffers_count) -+{ -+ struct v4l2_requestbuffers buffers; -+ int rc; -+ -+ memset(&buffers, 0, sizeof(buffers)); -+ buffers.type = type; -+ buffers.memory = memory; -+ buffers.count = buffers_count; -+ -+ rc = ioctl(video_fd, VIDIOC_REQBUFS, &buffers); -+ if (rc < 0) { -+ rc = -errno; -+ request_log("Unable to request %d type %d buffers: %s\n", buffers_count, type, strerror(-rc)); -+ return rc; -+ } -+ -+ return 0; -+} -+ -+ -+static int set_stream(int video_fd, unsigned int type, bool enable) -+{ -+ enum v4l2_buf_type buf_type = type; -+ int rc; -+ -+ rc = ioctl(video_fd, enable ? VIDIOC_STREAMON : VIDIOC_STREAMOFF, -+ &buf_type); -+ if (rc < 0) { -+ rc = -errno; -+ request_log("Unable to %sable stream: %s\n", -+ enable ? "en" : "dis", strerror(-rc)); -+ return rc; -+ } -+ -+ return 0; -+} -+ -+ -+ -+struct media_request * media_request_get(struct media_pool * const mp) -+{ -+ struct media_request *req = NULL; -+ -+ /* Timeout handled by poll code */ -+ if (do_wait(&mp->sem)) -+ return NULL; -+ -+ pthread_mutex_lock(&mp->lock); -+ req = mp->free_reqs; -+ if (req) { -+ mp->free_reqs = req->next; -+ req->next = NULL; -+ } -+ pthread_mutex_unlock(&mp->lock); -+ return req; -+} -+ -+int media_request_fd(const struct media_request * const req) -+{ -+ return req->fd; -+} -+ -+int media_request_start(struct media_request * const req) -+{ -+ while (ioctl(req->fd, MEDIA_REQUEST_IOC_QUEUE, NULL) == -1) -+ { -+ const int err = errno; -+ if (err == EINTR) -+ continue; -+ request_log("%s: Failed to Q media: (%d) %s\n", __func__, err, strerror(err)); -+ return -err; -+ } -+ -+ pollqueue_add_task(req->pt, 2000); -+ return 0; -+} -+ -+static void media_request_done(void *v, short revents) -+{ -+ struct media_request *const req = v; -+ struct media_pool *const mp = req->mp; -+ -+ /* ** Not sure what to do about timeout */ -+ -+ if (ioctl(req->fd, MEDIA_REQUEST_IOC_REINIT, NULL) < 0) -+ request_log("Unable to reinit media request: %s\n", -+ strerror(errno)); -+ -+ pthread_mutex_lock(&mp->lock); -+ req->next = mp->free_reqs; -+ mp->free_reqs = req; -+ pthread_mutex_unlock(&mp->lock); -+ sem_post(&mp->sem); -+} -+ -+int media_request_abort(struct media_request ** const preq) -+{ -+ struct media_request * const req = *preq; -+ -+ if (req == NULL) -+ return 0; -+ *preq = NULL; -+ -+ media_request_done(req, 0); -+ return 0; -+} -+ -+static void delete_req_chain(struct media_request * const chain) -+{ -+ struct media_request * next = chain; -+ while (next) { -+ struct media_request * const req = next; -+ next = req->next; -+ if (req->pt) -+ polltask_delete(&req->pt); -+ if (req->fd != -1) -+ close(req->fd); -+ free(req); -+ } -+} -+ -+struct media_pool * media_pool_new(const char * const media_path, -+ struct pollqueue * const pq, -+ const unsigned int n) -+{ -+ struct media_pool * const mp = calloc(1, sizeof(*mp)); -+ unsigned int i; -+ -+ if (!mp) -+ goto fail0; -+ -+ mp->pq = pq; -+ pthread_mutex_init(&mp->lock, NULL); -+ mp->fd = open(media_path, O_RDWR | O_NONBLOCK); -+ if (mp->fd == -1) { -+ request_log("Failed to open '%s': %s\n", media_path, strerror(errno)); -+ goto fail1; -+ } -+ -+ for (i = 0; i != n; ++i) { -+ struct media_request * req = malloc(sizeof(*req)); -+ if (!req) -+ goto fail4; -+ -+ *req = (struct media_request){ -+ .next = mp->free_reqs, -+ .mp = mp, -+ .fd = -1 -+ }; -+ mp->free_reqs = req; -+ -+ if (ioctl(mp->fd, MEDIA_IOC_REQUEST_ALLOC, &req->fd) == -1) { -+ request_log("Failed to alloc request %d: %s\n", i, strerror(errno)); -+ goto fail4; -+ } -+ -+ req->pt = polltask_new(pq, req->fd, POLLPRI, media_request_done, req); -+ if (!req->pt) -+ goto fail4; -+ } -+ -+ sem_init(&mp->sem, 0, n); -+ -+ return mp; -+ -+fail4: -+ delete_req_chain(mp->free_reqs); -+ close(mp->fd); -+ pthread_mutex_destroy(&mp->lock); -+fail1: -+ free(mp); -+fail0: -+ return NULL; -+} -+ -+void media_pool_delete(struct media_pool ** pMp) -+{ -+ struct media_pool * const mp = *pMp; -+ -+ if (!mp) -+ return; -+ *pMp = NULL; -+ -+ delete_req_chain(mp->free_reqs); -+ close(mp->fd); -+ sem_destroy(&mp->sem); -+ pthread_mutex_destroy(&mp->lock); -+ free(mp); -+} -+ -+ -+#define INDEX_UNSET (~(uint32_t)0) -+ -+enum qent_status { -+ QENT_NEW = 0, // Initial state - shouldn't last -+ QENT_FREE, // On free chain -+ QENT_PENDING, // User has ent -+ QENT_WAITING, // On inuse -+ QENT_DONE, // Frame rx -+ QENT_ERROR, // Error -+ QENT_IMPORT -+}; -+ -+struct qent_base { -+ atomic_int ref_count; -+ struct qent_base *next; -+ struct qent_base *prev; -+ enum qent_status status; -+ uint32_t index; -+ struct dmabuf_h *dh[VIDEO_MAX_PLANES]; -+ struct timeval timestamp; -+}; -+ -+struct qent_src { -+ struct qent_base base; -+ int fixed_size; -+}; -+ -+struct qent_dst { -+ struct qent_base base; -+ bool waiting; -+ pthread_mutex_t lock; -+ pthread_cond_t cond; -+ struct ff_weak_link_client * mbc_wl; -+}; -+ -+struct qe_list_head { -+ struct qent_base *head; -+ struct qent_base *tail; -+}; -+ -+struct buf_pool { -+ pthread_mutex_t lock; -+ sem_t free_sem; -+ enum v4l2_buf_type buf_type; -+ struct qe_list_head free; -+ struct qe_list_head inuse; -+}; -+ -+ -+static inline struct qent_dst *base_to_dst(struct qent_base *be) -+{ -+ return (struct qent_dst *)be; -+} -+ -+static inline struct qent_src *base_to_src(struct qent_base *be) -+{ -+ return (struct qent_src *)be; -+} -+ -+ -+#define QENT_BASE_INITIALIZER {\ -+ .ref_count = ATOMIC_VAR_INIT(0),\ -+ .status = QENT_NEW,\ -+ .index = INDEX_UNSET\ -+} -+ -+static void qe_base_uninit(struct qent_base *const be) -+{ -+ unsigned int i; -+ for (i = 0; i != VIDEO_MAX_PLANES; ++i) { -+ dmabuf_free(be->dh[i]); -+ be->dh[i] = NULL; -+ } -+} -+ -+static void qe_src_free(struct qent_src *const be_src) -+{ -+ if (!be_src) -+ return; -+ qe_base_uninit(&be_src->base); -+ free(be_src); -+} -+ -+static struct qent_src * qe_src_new(void) -+{ -+ struct qent_src *const be_src = malloc(sizeof(*be_src)); -+ if (!be_src) -+ return NULL; -+ *be_src = (struct qent_src){ -+ .base = QENT_BASE_INITIALIZER -+ }; -+ return be_src; -+} -+ -+static void qe_dst_free(struct qent_dst *const be_dst) -+{ -+ if (!be_dst) -+ return; -+ -+ ff_weak_link_unref(&be_dst->mbc_wl); -+ pthread_cond_destroy(&be_dst->cond); -+ pthread_mutex_destroy(&be_dst->lock); -+ qe_base_uninit(&be_dst->base); -+ free(be_dst); -+} -+ -+static struct qent_dst* qe_dst_new(struct ff_weak_link_master * const wl) -+{ -+ struct qent_dst *const be_dst = malloc(sizeof(*be_dst)); -+ if (!be_dst) -+ return NULL; -+ *be_dst = (struct qent_dst){ -+ .base = QENT_BASE_INITIALIZER, -+ .lock = PTHREAD_MUTEX_INITIALIZER, -+ .cond = PTHREAD_COND_INITIALIZER, -+ .mbc_wl = ff_weak_link_ref(wl) -+ }; -+ return be_dst; -+} -+ -+static void ql_add_tail(struct qe_list_head * const ql, struct qent_base * be) -+{ -+ if (ql->tail) -+ ql->tail->next = be; -+ else -+ ql->head = be; -+ be->prev = ql->tail; -+ be->next = NULL; -+ ql->tail = be; -+} -+ -+static struct qent_base * ql_extract(struct qe_list_head * const ql, struct qent_base * be) -+{ -+ if (!be) -+ return NULL; -+ -+ if (be->next) -+ be->next->prev = be->prev; -+ else -+ ql->tail = be->prev; -+ if (be->prev) -+ be->prev->next = be->next; -+ else -+ ql->head = be->next; -+ be->next = NULL; -+ be->prev = NULL; -+ return be; -+} -+ -+ -+static void bq_put_free(struct buf_pool *const bp, struct qent_base * be) -+{ -+ ql_add_tail(&bp->free, be); -+} -+ -+static struct qent_base * bq_get_free(struct buf_pool *const bp) -+{ -+ return ql_extract(&bp->free, bp->free.head); -+} -+ -+static struct qent_base * bq_extract_inuse(struct buf_pool *const bp, struct qent_base *const be) -+{ -+ return ql_extract(&bp->inuse, be); -+} -+ -+static struct qent_base * bq_get_inuse(struct buf_pool *const bp) -+{ -+ return ql_extract(&bp->inuse, bp->inuse.head); -+} -+ -+static void bq_free_all_free_src(struct buf_pool *const bp) -+{ -+ struct qent_base *be; -+ while ((be = bq_get_free(bp)) != NULL) -+ qe_src_free(base_to_src(be)); -+} -+ -+static void bq_free_all_inuse_src(struct buf_pool *const bp) -+{ -+ struct qent_base *be; -+ while ((be = bq_get_inuse(bp)) != NULL) -+ qe_src_free(base_to_src(be)); -+} -+ -+static void bq_free_all_free_dst(struct buf_pool *const bp) -+{ -+ struct qent_base *be; -+ while ((be = bq_get_free(bp)) != NULL) -+ qe_dst_free(base_to_dst(be)); -+} -+ -+static void queue_put_free(struct buf_pool *const bp, struct qent_base *be) -+{ -+ unsigned int i; -+ -+ pthread_mutex_lock(&bp->lock); -+ /* Clear out state vars */ -+ be->timestamp.tv_sec = 0; -+ be->timestamp.tv_usec = 0; -+ be->status = QENT_FREE; -+ for (i = 0; i < VIDEO_MAX_PLANES && be->dh[i]; ++i) -+ dmabuf_len_set(be->dh[i], 0); -+ bq_put_free(bp, be); -+ pthread_mutex_unlock(&bp->lock); -+ sem_post(&bp->free_sem); -+} -+ -+static bool queue_is_inuse(const struct buf_pool *const bp) -+{ -+ return bp->inuse.tail != NULL; -+} -+ -+static void queue_put_inuse(struct buf_pool *const bp, struct qent_base *be) -+{ -+ if (!be) -+ return; -+ pthread_mutex_lock(&bp->lock); -+ ql_add_tail(&bp->inuse, be); -+ be->status = QENT_WAITING; -+ pthread_mutex_unlock(&bp->lock); -+} -+ -+static struct qent_base *queue_get_free(struct buf_pool *const bp) -+{ -+ struct qent_base *buf; -+ -+ if (do_wait(&bp->free_sem)) -+ return NULL; -+ pthread_mutex_lock(&bp->lock); -+ buf = bq_get_free(bp); -+ pthread_mutex_unlock(&bp->lock); -+ return buf; -+} -+ -+static struct qent_base *queue_tryget_free(struct buf_pool *const bp) -+{ -+ struct qent_base *buf; -+ -+ if (do_trywait(&bp->free_sem)) -+ return NULL; -+ pthread_mutex_lock(&bp->lock); -+ buf = bq_get_free(bp); -+ pthread_mutex_unlock(&bp->lock); -+ return buf; -+} -+ -+static struct qent_base * queue_find_extract_fd(struct buf_pool *const bp, const int fd) -+{ -+ struct qent_base *be; -+ -+ pthread_mutex_lock(&bp->lock); -+ /* Expect 1st in Q, but allow anywhere */ -+ for (be = bp->inuse.head; be; be = be->next) { -+ if (dmabuf_fd(be->dh[0]) == fd) { -+ bq_extract_inuse(bp, be); -+ break; -+ } -+ } -+ pthread_mutex_unlock(&bp->lock); -+ -+ return be; -+} -+ -+static void queue_delete(struct buf_pool *const bp) -+{ -+ sem_destroy(&bp->free_sem); -+ pthread_mutex_destroy(&bp->lock); -+ free(bp); -+} -+ -+static struct buf_pool* queue_new(const int vfd) -+{ -+ struct buf_pool *bp = calloc(1, sizeof(*bp)); -+ if (!bp) -+ return NULL; -+ pthread_mutex_init(&bp->lock, NULL); -+ sem_init(&bp->free_sem, 0, 0); -+ return bp; -+} -+ -+ -+struct mediabufs_ctl { -+ atomic_int ref_count; /* 0 is single ref for easier atomics */ -+ void * dc; -+ int vfd; -+ bool stream_on; -+ bool polling; -+ bool dst_fixed; // Dst Q is fixed size -+ pthread_mutex_t lock; -+ struct buf_pool * src; -+ struct buf_pool * dst; -+ struct polltask * pt; -+ struct pollqueue * pq; -+ struct ff_weak_link_master * this_wlm; -+ -+ struct v4l2_format src_fmt; -+ struct v4l2_format dst_fmt; -+ struct v4l2_capability capability; -+}; -+ -+static int qe_v4l2_queue(struct qent_base *const be, -+ const int vfd, struct media_request *const mreq, -+ const struct v4l2_format *const fmt, -+ const bool is_dst, const bool hold_flag) -+{ -+ struct v4l2_buffer buffer = { -+ .type = fmt->type, -+ .memory = V4L2_MEMORY_DMABUF, -+ .index = be->index -+ }; -+ struct v4l2_plane planes[VIDEO_MAX_PLANES] = {{0}}; -+ -+ if (V4L2_TYPE_IS_MULTIPLANAR(fmt->type)) { -+ unsigned int i; -+ for (i = 0; i < VIDEO_MAX_PLANES && be->dh[i]; ++i) { -+ if (is_dst) -+ dmabuf_len_set(be->dh[i], 0); -+ -+ /* *** Really need a pixdesc rather than a format so we can fill in data_offset */ -+ planes[i].length = dmabuf_size(be->dh[i]); -+ planes[i].bytesused = dmabuf_len(be->dh[i]); -+ planes[i].m.fd = dmabuf_fd(be->dh[i]); -+ } -+ buffer.m.planes = planes; -+ buffer.length = i; -+ } -+ else { -+ if (is_dst) -+ dmabuf_len_set(be->dh[0], 0); -+ -+ buffer.bytesused = dmabuf_len(be->dh[0]); -+ buffer.length = dmabuf_size(be->dh[0]); -+ buffer.m.fd = dmabuf_fd(be->dh[0]); -+ } -+ -+ if (!is_dst && mreq) { -+ buffer.flags |= V4L2_BUF_FLAG_REQUEST_FD; -+ buffer.request_fd = media_request_fd(mreq); -+ if (hold_flag) -+ buffer.flags |= V4L2_BUF_FLAG_M2M_HOLD_CAPTURE_BUF; -+ } -+ -+ if (is_dst) -+ be->timestamp = (struct timeval){0,0}; -+ -+ buffer.timestamp = be->timestamp; -+ -+ while (ioctl(vfd, VIDIOC_QBUF, &buffer)) { -+ const int err = errno; -+ if (err != EINTR) { -+ request_log("%s: Failed to Q buffer: err=%d (%s)\n", __func__, err, strerror(err)); -+ return -err; -+ } -+ } -+ return 0; -+} -+ -+static struct qent_base * qe_dequeue(struct buf_pool *const bp, -+ const int vfd, -+ const struct v4l2_format * const f) -+{ -+ int fd; -+ struct qent_base *be; -+ int rc; -+ const bool mp = V4L2_TYPE_IS_MULTIPLANAR(f->type); -+ struct v4l2_plane planes[VIDEO_MAX_PLANES] = {{0}}; -+ struct v4l2_buffer buffer = { -+ .type = f->type, -+ .memory = V4L2_MEMORY_DMABUF -+ }; -+ if (mp) { -+ buffer.length = f->fmt.pix_mp.num_planes; -+ buffer.m.planes = planes; -+ } -+ -+ while ((rc = ioctl(vfd, VIDIOC_DQBUF, &buffer)) != 0 && -+ errno == EINTR) -+ /* Loop */; -+ if (rc) { -+ request_log("Error DQing buffer type %d: %s\n", f->type, strerror(errno)); -+ return NULL; -+ } -+ -+ fd = mp ? planes[0].m.fd : buffer.m.fd; -+ be = queue_find_extract_fd(bp, fd); -+ if (!be) { -+ request_log("Failed to find fd %d in Q\n", fd); -+ return NULL; -+ } -+ -+ be->timestamp = buffer.timestamp; -+ be->status = (buffer.flags & V4L2_BUF_FLAG_ERROR) ? QENT_ERROR : QENT_DONE; -+ return be; -+} -+ -+static void qe_dst_done(struct qent_dst * dst_be) -+{ -+ pthread_mutex_lock(&dst_be->lock); -+ dst_be->waiting = false; -+ pthread_cond_broadcast(&dst_be->cond); -+ pthread_mutex_unlock(&dst_be->lock); -+ -+ qent_dst_unref(&dst_be); -+} -+ -+static bool qe_dst_waiting(struct qent_dst *const dst_be) -+{ -+ bool waiting; -+ pthread_mutex_lock(&dst_be->lock); -+ waiting = dst_be->waiting; -+ dst_be->waiting = true; -+ pthread_mutex_unlock(&dst_be->lock); -+ return waiting; -+} -+ -+ -+static bool mediabufs_wants_poll(const struct mediabufs_ctl *const mbc) -+{ -+ return queue_is_inuse(mbc->src) || queue_is_inuse(mbc->dst); -+} -+ -+static void mediabufs_poll_cb(void * v, short revents) -+{ -+ struct mediabufs_ctl *mbc = v; -+ struct qent_src *src_be = NULL; -+ struct qent_dst *dst_be = NULL; -+ -+ if (!revents) -+ request_err(mbc->dc, "%s: Timeout\n", __func__); -+ -+ pthread_mutex_lock(&mbc->lock); -+ mbc->polling = false; -+ -+ if ((revents & POLLOUT) != 0) -+ src_be = base_to_src(qe_dequeue(mbc->src, mbc->vfd, &mbc->src_fmt)); -+ if ((revents & POLLIN) != 0) -+ dst_be = base_to_dst(qe_dequeue(mbc->dst, mbc->vfd, &mbc->dst_fmt)); -+ -+ /* Reschedule */ -+ if (mediabufs_wants_poll(mbc)) { -+ mbc->polling = true; -+ pollqueue_add_task(mbc->pt, 2000); -+ } -+ pthread_mutex_unlock(&mbc->lock); -+ -+ if (src_be) -+ queue_put_free(mbc->src, &src_be->base); -+ if (dst_be) -+ qe_dst_done(dst_be); -+} -+ -+int qent_src_params_set(struct qent_src *const be_src, const struct timeval * timestamp) -+{ -+ struct qent_base *const be = &be_src->base; -+ -+ be->timestamp = *timestamp; -+ return 0; -+} -+ -+struct timeval qent_dst_timestamp_get(const struct qent_dst *const be_dst) -+{ -+ return be_dst->base.timestamp; -+} -+ -+static int qent_base_realloc(struct qent_base *const be, const size_t len, struct dmabufs_ctl * dbsc) -+{ -+ if (!be->dh[0] || len > dmabuf_size(be->dh[0])) { -+ size_t newsize = round_up_size(len); -+ request_log("%s: Overrun %zd > %zd; trying %zd\n", __func__, len, dmabuf_size(be->dh[0]), newsize); -+ if (!dbsc) { -+ request_log("%s: No dmbabuf_ctrl for realloc\n", __func__); -+ return -ENOMEM; -+ } -+ if ((be->dh[0] = dmabuf_realloc(dbsc, be->dh[0], newsize)) == NULL) { -+ request_log("%s: Realloc %zd failed\n", __func__, newsize); -+ return -ENOMEM; -+ } -+ } -+ return 0; -+} -+ -+int qent_src_alloc(struct qent_src *const be_src, const size_t len, struct dmabufs_ctl * dbsc) -+{ -+ struct qent_base *const be = &be_src->base; -+ return qent_base_realloc(be, len, dbsc); -+} -+ -+ -+int qent_src_data_copy(struct qent_src *const be_src, const size_t offset, const void *const src, const size_t len, struct dmabufs_ctl * dbsc) -+{ -+ void * dst; -+ struct qent_base *const be = &be_src->base; -+ int rv; -+ -+ // Realloc doesn't copy so don't alloc if offset != 0 -+ if ((rv = qent_base_realloc(be, offset + len, -+ be_src->fixed_size || offset ? NULL : dbsc)) != 0) -+ return rv; -+ -+ dmabuf_write_start(be->dh[0]); -+ dst = dmabuf_map(be->dh[0]); -+ if (!dst) -+ return -1; -+ memcpy((char*)dst + offset, src, len); -+ dmabuf_len_set(be->dh[0], len); -+ dmabuf_write_end(be->dh[0]); -+ return 0; -+} -+ -+const struct dmabuf_h * qent_dst_dmabuf(const struct qent_dst *const be_dst, unsigned int plane) -+{ -+ const struct qent_base *const be = &be_dst->base; -+ -+ return (plane >= sizeof(be->dh)/sizeof(be->dh[0])) ? NULL : be->dh[plane]; -+} -+ -+int qent_dst_dup_fd(const struct qent_dst *const be_dst, unsigned int plane) -+{ -+ return dup(dmabuf_fd(qent_dst_dmabuf(be_dst, plane))); -+} -+ -+MediaBufsStatus mediabufs_start_request(struct mediabufs_ctl *const mbc, -+ struct media_request **const pmreq, -+ struct qent_src **const psrc_be, -+ struct qent_dst *const dst_be, -+ const bool is_final) -+{ -+ struct media_request * mreq = *pmreq; -+ struct qent_src *const src_be = *psrc_be; -+ -+ // Req & src are always both "consumed" -+ *pmreq = NULL; -+ *psrc_be = NULL; -+ -+ pthread_mutex_lock(&mbc->lock); -+ -+ if (!src_be) -+ goto fail1; -+ -+ if (dst_be) { -+ if (qe_dst_waiting(dst_be)) { -+ request_info(mbc->dc, "Request buffer already waiting on start\n"); -+ goto fail1; -+ } -+ dst_be->base.timestamp = (struct timeval){0,0}; -+ if (qe_v4l2_queue(&dst_be->base, mbc->vfd, NULL, &mbc->dst_fmt, true, false)) -+ goto fail1; -+ -+ qent_dst_ref(dst_be); -+ queue_put_inuse(mbc->dst, &dst_be->base); -+ } -+ -+ if (qe_v4l2_queue(&src_be->base, mbc->vfd, mreq, &mbc->src_fmt, false, !is_final)) -+ goto fail1; -+ queue_put_inuse(mbc->src, &src_be->base); -+ -+ if (!mbc->polling && mediabufs_wants_poll(mbc)) { -+ mbc->polling = true; -+ pollqueue_add_task(mbc->pt, 2000); -+ } -+ pthread_mutex_unlock(&mbc->lock); -+ -+ if (media_request_start(mreq)) -+ return MEDIABUFS_ERROR_OPERATION_FAILED; -+ -+ return MEDIABUFS_STATUS_SUCCESS; -+ -+fail1: -+ media_request_abort(&mreq); -+ if (src_be) -+ queue_put_free(mbc->src, &src_be->base); -+ -+// *** TODO: If src Q fails this doesnt unwind properly - separate dst Q from src Q -+ if (dst_be) { -+ dst_be->base.status = QENT_ERROR; -+ qe_dst_done(dst_be); -+ } -+ pthread_mutex_unlock(&mbc->lock); -+ return MEDIABUFS_ERROR_OPERATION_FAILED; -+} -+ -+ -+static int qe_alloc_from_fmt(struct qent_base *const be, -+ struct dmabufs_ctl *const dbsc, -+ const struct v4l2_format *const fmt) -+{ -+ if (V4L2_TYPE_IS_MULTIPLANAR(fmt->type)) { -+ unsigned int i; -+ for (i = 0; i != fmt->fmt.pix_mp.num_planes; ++i) { -+ be->dh[i] = dmabuf_realloc(dbsc, be->dh[i], -+ fmt->fmt.pix_mp.plane_fmt[i].sizeimage); -+ /* On failure tidy up and die */ -+ if (!be->dh[i]) { -+ while (i--) { -+ dmabuf_free(be->dh[i]); -+ be->dh[i] = NULL; -+ } -+ return -1; -+ } -+ } -+ } -+ else { -+// be->dh[0] = dmabuf_alloc(dbsc, fmt->fmt.pix.sizeimage); -+ size_t size = fmt->fmt.pix.sizeimage; -+ be->dh[0] = dmabuf_realloc(dbsc, be->dh[0], size); -+ if (!be->dh[0]) -+ return -1; -+ } -+ return 0; -+} -+ -+static MediaBufsStatus fmt_set(struct v4l2_format *const fmt, const int fd, -+ const enum v4l2_buf_type buftype, -+ uint32_t pixfmt, -+ const unsigned int width, const unsigned int height, -+ const size_t bufsize) -+{ -+ *fmt = (struct v4l2_format){.type = buftype}; -+ -+ if (V4L2_TYPE_IS_MULTIPLANAR(buftype)) { -+ fmt->fmt.pix_mp.width = width; -+ fmt->fmt.pix_mp.height = height; -+ fmt->fmt.pix_mp.pixelformat = pixfmt; -+ if (bufsize) { -+ fmt->fmt.pix_mp.num_planes = 1; -+ fmt->fmt.pix_mp.plane_fmt[0].sizeimage = bufsize; -+ } -+ } -+ else { -+ fmt->fmt.pix.width = width; -+ fmt->fmt.pix.height = height; -+ fmt->fmt.pix.pixelformat = pixfmt; -+ fmt->fmt.pix.sizeimage = bufsize; -+ } -+ -+ while (ioctl(fd, VIDIOC_S_FMT, fmt)) -+ if (errno != EINTR) -+ return MEDIABUFS_ERROR_OPERATION_FAILED; -+ -+ // Treat anything where we don't get at least what we asked for as a fail -+ if (V4L2_TYPE_IS_MULTIPLANAR(buftype)) { -+ if (fmt->fmt.pix_mp.width < width || -+ fmt->fmt.pix_mp.height < height || -+ fmt->fmt.pix_mp.pixelformat != pixfmt) { -+ return MEDIABUFS_ERROR_UNSUPPORTED_BUFFERTYPE; -+ } -+ } -+ else { -+ if (fmt->fmt.pix.width < width || -+ fmt->fmt.pix.height < height || -+ fmt->fmt.pix.pixelformat != pixfmt) { -+ return MEDIABUFS_ERROR_UNSUPPORTED_BUFFERTYPE; -+ } -+ } -+ -+ return MEDIABUFS_STATUS_SUCCESS; -+} -+ -+static MediaBufsStatus find_fmt_flags(struct v4l2_format *const fmt, -+ const int fd, -+ const unsigned int type_v4l2, -+ const uint32_t flags_must, -+ const uint32_t flags_not, -+ const unsigned int width, -+ const unsigned int height, -+ mediabufs_dst_fmt_accept_fn *const accept_fn, -+ void *const accept_v) -+{ -+ unsigned int i; -+ -+ for (i = 0;; ++i) { -+ struct v4l2_fmtdesc fmtdesc = { -+ .index = i, -+ .type = type_v4l2 -+ }; -+ while (ioctl(fd, VIDIOC_ENUM_FMT, &fmtdesc)) { -+ if (errno != EINTR) -+ return MEDIABUFS_ERROR_UNSUPPORTED_BUFFERTYPE; -+ } -+ if ((fmtdesc.flags & flags_must) != flags_must || -+ (fmtdesc.flags & flags_not)) -+ continue; -+ if (!accept_fn(accept_v, &fmtdesc)) -+ continue; -+ -+ if (fmt_set(fmt, fd, fmtdesc.type, fmtdesc.pixelformat, -+ width, height, 0) == MEDIABUFS_STATUS_SUCCESS) -+ return MEDIABUFS_STATUS_SUCCESS; -+ } -+ return 0; -+} -+ -+ -+/* Wait for qent done */ -+ -+MediaBufsStatus qent_dst_wait(struct qent_dst *const be_dst) -+{ -+ struct qent_base *const be = &be_dst->base; -+ enum qent_status estat; -+ -+ pthread_mutex_lock(&be_dst->lock); -+ while (be_dst->waiting && -+ !pthread_cond_wait(&be_dst->cond, &be_dst->lock)) -+ /* Loop */; -+ estat = be->status; -+ pthread_mutex_unlock(&be_dst->lock); -+ -+ return estat == QENT_DONE ? MEDIABUFS_STATUS_SUCCESS : -+ estat == QENT_ERROR ? MEDIABUFS_ERROR_DECODING_ERROR : -+ MEDIABUFS_ERROR_OPERATION_FAILED; -+} -+ -+const uint8_t * qent_dst_data(struct qent_dst *const be_dst, unsigned int buf_no) -+{ -+ struct qent_base *const be = &be_dst->base; -+ return dmabuf_map(be->dh[buf_no]); -+} -+ -+MediaBufsStatus qent_dst_read_start(struct qent_dst *const be_dst) -+{ -+ struct qent_base *const be = &be_dst->base; -+ unsigned int i; -+ for (i = 0; i != VIDEO_MAX_PLANES && be->dh[i]; ++i) { -+ if (dmabuf_read_start(be->dh[i])) { -+ while (i--) -+ dmabuf_read_end(be->dh[i]); -+ return MEDIABUFS_ERROR_ALLOCATION_FAILED; -+ } -+ } -+ return MEDIABUFS_STATUS_SUCCESS; -+} -+ -+MediaBufsStatus qent_dst_read_stop(struct qent_dst *const be_dst) -+{ -+ struct qent_base *const be = &be_dst->base; -+ unsigned int i; -+ MediaBufsStatus status = MEDIABUFS_STATUS_SUCCESS; -+ -+ for (i = 0; i != VIDEO_MAX_PLANES && be->dh[i]; ++i) { -+ if (dmabuf_read_end(be->dh[i])) -+ status = MEDIABUFS_ERROR_OPERATION_FAILED; -+ } -+ return status; -+} -+ -+struct qent_dst * qent_dst_ref(struct qent_dst * const be_dst) -+{ -+ if (be_dst) -+ atomic_fetch_add(&be_dst->base.ref_count, 1); -+ return be_dst; -+} -+ -+void qent_dst_unref(struct qent_dst ** const pbe_dst) -+{ -+ struct qent_dst * const be_dst = *pbe_dst; -+ struct mediabufs_ctl * mbc; -+ if (!be_dst) -+ return; -+ *pbe_dst = NULL; -+ -+ if (atomic_fetch_sub(&be_dst->base.ref_count, 1) != 0) -+ return; -+ -+ if ((mbc = ff_weak_link_lock(&be_dst->mbc_wl)) != NULL) { -+ queue_put_free(mbc->dst, &be_dst->base); -+ ff_weak_link_unlock(be_dst->mbc_wl); -+ } -+ else { -+ qe_dst_free(be_dst); -+ } -+} -+ -+MediaBufsStatus qent_dst_import_fd(struct qent_dst *const be_dst, -+ unsigned int plane, -+ int fd, size_t size) -+{ -+ struct qent_base *const be = &be_dst->base; -+ struct dmabuf_h * dh; -+ -+ if (be->status != QENT_IMPORT || be->dh[plane]) -+ return MEDIABUFS_ERROR_OPERATION_FAILED; -+ -+ dh = dmabuf_import(fd, size); -+ if (!dh) -+ return MEDIABUFS_ERROR_ALLOCATION_FAILED; -+ -+ be->dh[plane] = dh; -+ return MEDIABUFS_STATUS_SUCCESS; -+} -+ -+// Returns noof buffers created, -ve for error -+static int create_dst_bufs(struct mediabufs_ctl *const mbc, unsigned int n, struct qent_dst * const qes[]) -+{ -+ unsigned int i; -+ -+ struct v4l2_create_buffers cbuf = { -+ .count = n, -+ .memory = V4L2_MEMORY_DMABUF, -+ .format = mbc->dst_fmt, -+ }; -+ -+ while (ioctl(mbc->vfd, VIDIOC_CREATE_BUFS, &cbuf)) { -+ const int err = -errno; -+ if (err != EINTR) { -+ request_err(mbc->dc, "%s: Failed to create V4L2 buffer\n", __func__); -+ return -err; -+ } -+ } -+ -+ if (cbuf.count != n) -+ request_warn(mbc->dc, "%s: Created %d of %d V4L2 buffers requested\n", __func__, cbuf.count, n); -+ -+ for (i = 0; i != cbuf.count; ++i) -+ qes[i]->base.index = cbuf.index + i; -+ -+ return cbuf.count; -+} -+ -+struct qent_dst* mediabufs_dst_qent_alloc(struct mediabufs_ctl *const mbc, struct dmabufs_ctl *const dbsc) -+{ -+ struct qent_dst * be_dst; -+ -+ if (mbc == NULL) { -+ be_dst = qe_dst_new(NULL); -+ if (be_dst) -+ be_dst->base.status = QENT_IMPORT; -+ return be_dst; -+ } -+ -+ if (mbc->dst_fixed) { -+ be_dst = base_to_dst(queue_get_free(mbc->dst)); -+ if (!be_dst) -+ return NULL; -+ } -+ else { -+ be_dst = base_to_dst(queue_tryget_free(mbc->dst)); -+ if (!be_dst) { -+ be_dst = qe_dst_new(mbc->this_wlm); -+ if (!be_dst) -+ return NULL; -+ -+ if (create_dst_bufs(mbc, 1, &be_dst) != 1) { -+ qe_dst_free(be_dst); -+ return NULL; -+ } -+ } -+ } -+ -+ if (qe_alloc_from_fmt(&be_dst->base, dbsc, &mbc->dst_fmt)) { -+ /* Given how create buf works we can't uncreate it on alloc failure -+ * all we can do is put it on the free Q -+ */ -+ queue_put_free(mbc->dst, &be_dst->base); -+ return NULL; -+ } -+ -+ be_dst->base.status = QENT_PENDING; -+ atomic_store(&be_dst->base.ref_count, 0); -+ return be_dst; -+} -+ -+const struct v4l2_format *mediabufs_dst_fmt(struct mediabufs_ctl *const mbc) -+{ -+ return &mbc->dst_fmt; -+} -+ -+MediaBufsStatus mediabufs_dst_fmt_set(struct mediabufs_ctl *const mbc, -+ const unsigned int width, -+ const unsigned int height, -+ mediabufs_dst_fmt_accept_fn *const accept_fn, -+ void *const accept_v) -+{ -+ MediaBufsStatus status; -+ unsigned int i; -+ const enum v4l2_buf_type buf_type = mbc->dst_fmt.type; -+ static const struct { -+ unsigned int flags_must; -+ unsigned int flags_not; -+ } trys[] = { -+ {0, V4L2_FMT_FLAG_EMULATED}, -+ {V4L2_FMT_FLAG_EMULATED, 0}, -+ }; -+ for (i = 0; i != sizeof(trys)/sizeof(trys[0]); ++i) { -+ status = find_fmt_flags(&mbc->dst_fmt, mbc->vfd, -+ buf_type, -+ trys[i].flags_must, -+ trys[i].flags_not, -+ width, height, accept_fn, accept_v); -+ if (status != MEDIABUFS_ERROR_UNSUPPORTED_BUFFERTYPE) -+ return status; -+ } -+ -+ if (status != MEDIABUFS_STATUS_SUCCESS) -+ return status; -+ -+ /* Try to create a buffer - don't alloc */ -+ return status; -+} -+ -+// ** This is a mess if we get partial alloc but without any way to remove -+// individual V4L2 Q members we are somewhat stuffed -+MediaBufsStatus mediabufs_dst_slots_create(struct mediabufs_ctl *const mbc, const unsigned int n, const bool fixed) -+{ -+ unsigned int i; -+ int a = 0; -+ unsigned int qc; -+ struct qent_dst * qes[32]; -+ -+ if (n > 32) -+ return MEDIABUFS_ERROR_ALLOCATION_FAILED; -+ -+ // Create qents first as it is hard to get rid of the V4L2 buffers on error -+ for (qc = 0; qc != n; ++qc) -+ { -+ if ((qes[qc] = qe_dst_new(mbc->this_wlm)) == NULL) -+ goto fail; -+ } -+ -+ if ((a = create_dst_bufs(mbc, n, qes)) < 0) -+ goto fail; -+ -+ for (i = 0; i != a; ++i) -+ queue_put_free(mbc->dst, &qes[i]->base); -+ -+ if (a != n) -+ goto fail; -+ -+ mbc->dst_fixed = fixed; -+ return MEDIABUFS_STATUS_SUCCESS; -+ -+fail: -+ for (i = (a < 0 ? 0 : a); i != qc; ++i) -+ qe_dst_free(qes[i]); -+ -+ return MEDIABUFS_ERROR_ALLOCATION_FAILED; -+} -+ -+struct qent_src *mediabufs_src_qent_get(struct mediabufs_ctl *const mbc) -+{ -+ struct qent_base * buf = queue_get_free(mbc->src); -+ buf->status = QENT_PENDING; -+ return base_to_src(buf); -+} -+ -+void mediabufs_src_qent_abort(struct mediabufs_ctl *const mbc, struct qent_src **const pqe_src) -+{ -+ struct qent_src *const qe_src = *pqe_src; -+ if (!qe_src) -+ return; -+ *pqe_src = NULL; -+ queue_put_free(mbc->src, &qe_src->base); -+} -+ -+/* src format must have been set up before this */ -+MediaBufsStatus mediabufs_src_pool_create(struct mediabufs_ctl *const mbc, -+ struct dmabufs_ctl * const dbsc, -+ unsigned int n) -+{ -+ unsigned int i; -+ struct v4l2_requestbuffers req = { -+ .count = n, -+ .type = mbc->src_fmt.type, -+ .memory = V4L2_MEMORY_DMABUF -+ }; -+ -+ bq_free_all_free_src(mbc->src); -+ while (ioctl(mbc->vfd, VIDIOC_REQBUFS, &req) == -1) { -+ if (errno != EINTR) { -+ request_err(mbc->dc, "%s: Failed to request src bufs\n", __func__); -+ return MEDIABUFS_ERROR_OPERATION_FAILED; -+ } -+ } -+ -+ if (n > req.count) { -+ request_info(mbc->dc, "Only allocated %d of %d src buffers requested\n", req.count, n); -+ n = req.count; -+ } -+ -+ for (i = 0; i != n; ++i) { -+ struct qent_src *const be_src = qe_src_new(); -+ if (!be_src) { -+ request_err(mbc->dc, "Failed to create src be %d\n", i); -+ goto fail; -+ } -+ if (qe_alloc_from_fmt(&be_src->base, dbsc, &mbc->src_fmt)) { -+ qe_src_free(be_src); -+ goto fail; -+ } -+ be_src->base.index = i; -+ be_src->fixed_size = !mediabufs_src_resizable(mbc); -+ -+ queue_put_free(mbc->src, &be_src->base); -+ } -+ -+ return MEDIABUFS_STATUS_SUCCESS; -+ -+fail: -+ bq_free_all_free_src(mbc->src); -+ req.count = 0; -+ while (ioctl(mbc->vfd, VIDIOC_REQBUFS, &req) == -1 && -+ errno == EINTR) -+ /* Loop */; -+ -+ return MEDIABUFS_ERROR_OPERATION_FAILED; -+} -+ -+ -+ -+/* -+ * Set stuff order: -+ * Set src fmt -+ * Set parameters (sps) on vfd -+ * Negotiate dst format (dst_fmt_set) -+ * Create src buffers -+ * Alloc a dst buffer or Create dst slots -+*/ -+MediaBufsStatus mediabufs_stream_on(struct mediabufs_ctl *const mbc) -+{ -+ if (mbc->stream_on) -+ return MEDIABUFS_STATUS_SUCCESS; -+ -+ if (set_stream(mbc->vfd, mbc->src_fmt.type, true) < 0) { -+ request_log("Failed to set stream on src type %d\n", mbc->src_fmt.type); -+ return MEDIABUFS_ERROR_OPERATION_FAILED; -+ } -+ -+ if (set_stream(mbc->vfd, mbc->dst_fmt.type, true) < 0) { -+ request_log("Failed to set stream on dst type %d\n", mbc->dst_fmt.type); -+ set_stream(mbc->vfd, mbc->src_fmt.type, false); -+ return MEDIABUFS_ERROR_OPERATION_FAILED; -+ } -+ -+ mbc->stream_on = true; -+ return MEDIABUFS_STATUS_SUCCESS; -+} -+ -+MediaBufsStatus mediabufs_stream_off(struct mediabufs_ctl *const mbc) -+{ -+ MediaBufsStatus status = MEDIABUFS_STATUS_SUCCESS; -+ -+ if (!mbc->stream_on) -+ return MEDIABUFS_STATUS_SUCCESS; -+ -+ if (set_stream(mbc->vfd, mbc->dst_fmt.type, false) < 0) { -+ request_log("Failed to set stream off dst type %d\n", mbc->dst_fmt.type); -+ status = MEDIABUFS_ERROR_OPERATION_FAILED; -+ } -+ -+ if (set_stream(mbc->vfd, mbc->src_fmt.type, false) < 0) { -+ request_log("Failed to set stream off src type %d\n", mbc->src_fmt.type); -+ status = MEDIABUFS_ERROR_OPERATION_FAILED; -+ } -+ -+ mbc->stream_on = false; -+ return status; -+} -+ -+int mediabufs_ctl_set_ext_ctrls(struct mediabufs_ctl * mbc, struct media_request * const mreq, struct v4l2_ext_control control_array[], unsigned int n) -+{ -+ struct v4l2_ext_controls controls = { -+ .controls = control_array, -+ .count = n -+ }; -+ -+ if (mreq) { -+ controls.which = V4L2_CTRL_WHICH_REQUEST_VAL; -+ controls.request_fd = media_request_fd(mreq); -+ } -+ -+ while (ioctl(mbc->vfd, VIDIOC_S_EXT_CTRLS, &controls)) -+ { -+ const int err = errno; -+ if (err != EINTR) { -+ request_err(mbc->dc, "Unable to set controls: %s\n", strerror(err)); -+ return -err; -+ } -+ } -+ -+ return 0; -+} -+ -+MediaBufsStatus mediabufs_set_ext_ctrl(struct mediabufs_ctl *const mbc, -+ struct media_request * const mreq, -+ unsigned int id, void *data, -+ unsigned int size) -+{ -+ struct v4l2_ext_control control = { -+ .id = id, -+ .ptr = data, -+ .size = size -+ }; -+ -+ int rv = mediabufs_ctl_set_ext_ctrls(mbc, mreq, &control, 1); -+ return !rv ? MEDIABUFS_STATUS_SUCCESS : MEDIABUFS_ERROR_OPERATION_FAILED; -+} -+ -+MediaBufsStatus mediabufs_src_fmt_set(struct mediabufs_ctl *const mbc, -+ enum v4l2_buf_type buf_type, -+ const uint32_t pixfmt, -+ const uint32_t width, const uint32_t height, -+ const size_t bufsize) -+{ -+ MediaBufsStatus rv = fmt_set(&mbc->src_fmt, mbc->vfd, buf_type, pixfmt, width, height, bufsize); -+ if (rv != MEDIABUFS_STATUS_SUCCESS) -+ request_err(mbc->dc, "Failed to set src buftype %d, format %#x %dx%d\n", buf_type, pixfmt, width, height); -+ -+ return rv; -+} -+ -+int mediabufs_ctl_query_ext_ctrls(struct mediabufs_ctl * mbc, struct v4l2_query_ext_ctrl ctrls[], unsigned int n) -+{ -+ int rv = 0; -+ while (n--) { -+ while (ioctl(mbc->vfd, VIDIOC_QUERY_EXT_CTRL, ctrls)) { -+ const int err = errno; -+ if (err != EINTR) { -+ // Often used for probing - errors are to be expected -+ request_debug(mbc->dc, "Failed to query ext id=%#x, err=%d\n", ctrls->id, err); -+ ctrls->type = 0; // 0 is invalid -+ rv = -err; -+ break; -+ } -+ } -+ ++ctrls; -+ } -+ return rv; -+} -+ -+int mediabufs_src_resizable(const struct mediabufs_ctl *const mbc) -+{ -+ // Single planar OUTPUT can only take exact size buffers -+ // Multiplanar will take larger than negotiated -+ return V4L2_TYPE_IS_MULTIPLANAR(mbc->src_fmt.type); -+} -+ -+static void mediabufs_ctl_delete(struct mediabufs_ctl *const mbc) -+{ -+ if (!mbc) -+ return; -+ -+ // Break the weak link first -+ ff_weak_link_break(&mbc->this_wlm); -+ -+ polltask_delete(&mbc->pt); -+ -+ mediabufs_stream_off(mbc); -+ -+ // Empty v4l2 buffer stash -+ request_buffers(mbc->vfd, mbc->src_fmt.type, V4L2_MEMORY_MMAP, 0); -+ request_buffers(mbc->vfd, mbc->dst_fmt.type, V4L2_MEMORY_MMAP, 0); -+ -+ bq_free_all_free_src(mbc->src); -+ bq_free_all_inuse_src(mbc->src); -+ bq_free_all_free_dst(mbc->dst); -+ -+ { -+ struct qent_dst *dst_be; -+ while ((dst_be = base_to_dst(bq_get_inuse(mbc->dst))) != NULL) { -+ dst_be->base.timestamp = (struct timeval){0}; -+ dst_be->base.status = QENT_ERROR; -+ qe_dst_done(dst_be); -+ } -+ } -+ -+ queue_delete(mbc->dst); -+ queue_delete(mbc->src); -+ close(mbc->vfd); -+ pthread_mutex_destroy(&mbc->lock); -+ -+ free(mbc); -+} -+ -+struct mediabufs_ctl * mediabufs_ctl_ref(struct mediabufs_ctl *const mbc) -+{ -+ atomic_fetch_add(&mbc->ref_count, 1); -+ return mbc; -+} -+ -+void mediabufs_ctl_unref(struct mediabufs_ctl **const pmbc) -+{ -+ struct mediabufs_ctl *const mbc = *pmbc; -+ int n; -+ -+ if (!mbc) -+ return; -+ *pmbc = NULL; -+ n = atomic_fetch_sub(&mbc->ref_count, 1); -+ if (n) -+ return; -+ mediabufs_ctl_delete(mbc); -+} -+ -+unsigned int mediabufs_ctl_driver_version(struct mediabufs_ctl *const mbc) -+{ -+ return mbc->capability.version; -+} -+ -+static int set_capabilities(struct mediabufs_ctl *const mbc) -+{ -+ uint32_t caps; -+ -+ if (ioctl(mbc->vfd, VIDIOC_QUERYCAP, &mbc->capability)) { -+ int err = errno; -+ request_err(mbc->dc, "Failed to get capabilities: %s\n", strerror(err)); -+ return -err; -+ } -+ -+ caps = (mbc->capability.capabilities & V4L2_CAP_DEVICE_CAPS) != 0 ? -+ mbc->capability.device_caps : -+ mbc->capability.capabilities; -+ -+ if ((caps & V4L2_CAP_VIDEO_M2M_MPLANE) != 0) { -+ mbc->src_fmt.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE; -+ mbc->dst_fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; -+ } -+ else if ((caps & V4L2_CAP_VIDEO_M2M) != 0) { -+ mbc->src_fmt.type = V4L2_BUF_TYPE_VIDEO_OUTPUT; -+ mbc->dst_fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; -+ } -+ else { -+ request_err(mbc->dc, "No M2M capabilities (%#x)\n", caps); -+ return -EINVAL; -+ } -+ -+ return 0; -+} -+ -+/* One of these per context */ -+struct mediabufs_ctl * mediabufs_ctl_new(void * const dc, const char * vpath, struct pollqueue *const pq) -+{ -+ struct mediabufs_ctl *const mbc = calloc(1, sizeof(*mbc)); -+ -+ if (!mbc) -+ return NULL; -+ -+ mbc->dc = dc; -+ // Default mono planar -+ mbc->pq = pq; -+ pthread_mutex_init(&mbc->lock, NULL); -+ -+ /* Pick a default - could we scan for this? */ -+ if (vpath == NULL) -+ vpath = "/dev/media0"; -+ -+ while ((mbc->vfd = open(vpath, O_RDWR)) == -1) -+ { -+ const int err = errno; -+ if (err != EINTR) { -+ request_err(dc, "Failed to open video dev '%s': %s\n", vpath, strerror(err)); -+ goto fail0; -+ } -+ } -+ -+ if (set_capabilities(mbc)) { -+ request_err(dc, "Bad capabilities for video dev '%s'\n", vpath); -+ goto fail1; -+ } -+ -+ mbc->src = queue_new(mbc->vfd); -+ if (!mbc->src) -+ goto fail1; -+ mbc->dst = queue_new(mbc->vfd); -+ if (!mbc->dst) -+ goto fail2; -+ mbc->pt = polltask_new(pq, mbc->vfd, POLLIN | POLLOUT, mediabufs_poll_cb, mbc); -+ if (!mbc->pt) -+ goto fail3; -+ mbc->this_wlm = ff_weak_link_new(mbc); -+ if (!mbc->this_wlm) -+ goto fail4; -+ -+ /* Cannot add polltask now - polling with nothing pending -+ * generates infinite error polls -+ */ -+ return mbc; -+ -+fail4: -+ polltask_delete(&mbc->pt); -+fail3: -+ queue_delete(mbc->dst); -+fail2: -+ queue_delete(mbc->src); -+fail1: -+ close(mbc->vfd); -+fail0: -+ free(mbc); -+ request_info(dc, "%s: FAILED\n", __func__); -+ return NULL; -+} -+ -+ -+ ---- /dev/null -+++ b/libavcodec/v4l2_req_media.h -@@ -0,0 +1,154 @@ -+/* -+e.h -+* -+ * Permission is hereby granted, free of charge, to any person obtaining a -+ * copy of this software and associated documentation files (the -+ * "Software"), to deal in the Software without restriction, including -+ * without limitation the rights to use, copy, modify, merge, publish, -+ * distribute, sub license, and/or sell copies of the Software, and to -+ * permit persons to whom the Software is furnished to do so, subject to -+ * the following conditions: -+ * -+ * The above copyright notice and this permission notice (including the -+ * next paragraph) shall be included in all copies or substantial portions -+ * of the Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. -+ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR -+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -+ */ -+ -+#ifndef _MEDIA_H_ -+#define _MEDIA_H_ -+ -+#include -+#include -+ -+struct v4l2_format; -+struct v4l2_fmtdesc; -+struct v4l2_query_ext_ctrl; -+ -+struct pollqueue; -+struct media_request; -+struct media_pool; -+ -+typedef enum media_buf_status { -+ MEDIABUFS_STATUS_SUCCESS = 0, -+ MEDIABUFS_ERROR_OPERATION_FAILED, -+ MEDIABUFS_ERROR_DECODING_ERROR, -+ MEDIABUFS_ERROR_UNSUPPORTED_BUFFERTYPE, -+ MEDIABUFS_ERROR_UNSUPPORTED_RT_FORMAT, -+ MEDIABUFS_ERROR_ALLOCATION_FAILED, -+} MediaBufsStatus; -+ -+struct media_pool * media_pool_new(const char * const media_path, -+ struct pollqueue * const pq, -+ const unsigned int n); -+void media_pool_delete(struct media_pool ** pmp); -+ -+// Obtain a media request -+// Will block if none availible - has a 2sec timeout -+struct media_request * media_request_get(struct media_pool * const mp); -+int media_request_fd(const struct media_request * const req); -+ -+// Start this request -+// Request structure is returned to pool once done -+int media_request_start(struct media_request * const req); -+ -+// Return an *unstarted* media_request to the pool -+// May later be upgraded to allow for aborting a started req -+int media_request_abort(struct media_request ** const preq); -+ -+ -+struct mediabufs_ctl; -+struct qent_src; -+struct qent_dst; -+struct dmabuf_h; -+struct dmabufs_ctl; -+ -+int qent_src_params_set(struct qent_src *const be, const struct timeval * timestamp); -+struct timeval qent_dst_timestamp_get(const struct qent_dst *const be_dst); -+ -+// prealloc -+int qent_src_alloc(struct qent_src *const be_src, const size_t len, struct dmabufs_ctl * dbsc); -+// dbsc may be NULL if realloc not required -+int qent_src_data_copy(struct qent_src *const be_src, const size_t offset, const void *const src, const size_t len, struct dmabufs_ctl * dbsc); -+const struct dmabuf_h * qent_dst_dmabuf(const struct qent_dst *const be, unsigned int plane); -+int qent_dst_dup_fd(const struct qent_dst *const be, unsigned int plane); -+MediaBufsStatus qent_dst_wait(struct qent_dst *const be); -+void qent_dst_delete(struct qent_dst *const be); -+// Returns a qent_dst to its mbc free Q or deletes it if the mbc is dead -+void qent_dst_unref(struct qent_dst ** const pbe_dst); -+struct qent_dst * qent_dst_ref(struct qent_dst * const be_dst); -+ -+const uint8_t * qent_dst_data(struct qent_dst *const be, unsigned int buf_no); -+MediaBufsStatus qent_dst_read_start(struct qent_dst *const be); -+MediaBufsStatus qent_dst_read_stop(struct qent_dst *const be); -+/* Import an fd unattached to any mediabuf */ -+MediaBufsStatus qent_dst_import_fd(struct qent_dst *const be_dst, -+ unsigned int plane, -+ int fd, size_t size); -+ -+MediaBufsStatus mediabufs_start_request(struct mediabufs_ctl *const mbc, -+ struct media_request **const pmreq, -+ struct qent_src **const psrc_be, -+ struct qent_dst *const dst_be, -+ const bool is_final); -+// Get / alloc a dst buffer & associate with a slot -+// If the dst pool is empty then behaviour depends on the fixed flag passed to -+// dst_slots_create. Default is !fixed = unlimited alloc -+struct qent_dst* mediabufs_dst_qent_alloc(struct mediabufs_ctl *const mbc, -+ struct dmabufs_ctl *const dbsc); -+// Create dst slots without alloc -+// If fixed true then qent_alloc will only get slots from this pool and will -+// block until a qent has been unrefed -+MediaBufsStatus mediabufs_dst_slots_create(struct mediabufs_ctl *const mbc, const unsigned int n, const bool fixed); -+ -+MediaBufsStatus mediabufs_stream_on(struct mediabufs_ctl *const mbc); -+MediaBufsStatus mediabufs_stream_off(struct mediabufs_ctl *const mbc); -+const struct v4l2_format *mediabufs_dst_fmt(struct mediabufs_ctl *const mbc); -+ -+typedef int mediabufs_dst_fmt_accept_fn(void * v, const struct v4l2_fmtdesc *fmtdesc); -+ -+MediaBufsStatus mediabufs_dst_fmt_set(struct mediabufs_ctl *const mbc, -+ const unsigned int width, -+ const unsigned int height, -+ mediabufs_dst_fmt_accept_fn *const accept_fn, -+ void *const accept_v); -+struct qent_src *mediabufs_src_qent_get(struct mediabufs_ctl *const mbc); -+void mediabufs_src_qent_abort(struct mediabufs_ctl *const mbc, struct qent_src **const pqe_src); -+ -+int mediabufs_ctl_set_ext_ctrls(struct mediabufs_ctl * mbc, struct media_request * const mreq, -+ struct v4l2_ext_control control_array[], unsigned int n); -+MediaBufsStatus mediabufs_set_ext_ctrl(struct mediabufs_ctl *const mbc, -+ struct media_request * const mreq, -+ unsigned int id, void *data, -+ unsigned int size); -+int mediabufs_ctl_query_ext_ctrls(struct mediabufs_ctl * mbc, struct v4l2_query_ext_ctrl ctrls[], unsigned int n); -+ -+int mediabufs_src_resizable(const struct mediabufs_ctl *const mbc); -+ -+MediaBufsStatus mediabufs_src_fmt_set(struct mediabufs_ctl *const mbc, -+ enum v4l2_buf_type buf_type, -+ const uint32_t pixfmt, -+ const uint32_t width, const uint32_t height, -+ const size_t bufsize); -+ -+MediaBufsStatus mediabufs_src_pool_create(struct mediabufs_ctl *const rw, -+ struct dmabufs_ctl * const dbsc, -+ unsigned int n); -+ -+#define MEDIABUFS_DRIVER_VERSION(a, b, c) (((a) << 16) | ((b) << 8) | (c)) -+unsigned int mediabufs_ctl_driver_version(struct mediabufs_ctl *const mbc); -+ -+struct mediabufs_ctl * mediabufs_ctl_new(void * const dc, -+ const char *vpath, struct pollqueue *const pq); -+void mediabufs_ctl_unref(struct mediabufs_ctl **const pmbc); -+struct mediabufs_ctl * mediabufs_ctl_ref(struct mediabufs_ctl *const mbc); -+ -+ -+#endif ---- /dev/null -+++ b/libavcodec/v4l2_req_pollqueue.c -@@ -0,0 +1,361 @@ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include "v4l2_req_pollqueue.h" -+#include "v4l2_req_utils.h" -+ -+ -+struct pollqueue; -+ -+enum polltask_state { -+ POLLTASK_UNQUEUED = 0, -+ POLLTASK_QUEUED, -+ POLLTASK_RUNNING, -+ POLLTASK_Q_KILL, -+ POLLTASK_RUN_KILL, -+}; -+ -+struct polltask { -+ struct polltask *next; -+ struct polltask *prev; -+ struct pollqueue *q; -+ enum polltask_state state; -+ -+ int fd; -+ short events; -+ -+ void (*fn)(void *v, short revents); -+ void * v; -+ -+ uint64_t timeout; /* CLOCK_MONOTONIC time, 0 => never */ -+ sem_t kill_sem; -+}; -+ -+struct pollqueue { -+ atomic_int ref_count; -+ pthread_mutex_t lock; -+ -+ struct polltask *head; -+ struct polltask *tail; -+ -+ bool kill; -+ bool no_prod; -+ int prod_fd; -+ struct polltask *prod_pt; -+ pthread_t worker; -+}; -+ -+struct polltask *polltask_new(struct pollqueue *const pq, -+ const int fd, const short events, -+ void (*const fn)(void *v, short revents), -+ void *const v) -+{ -+ struct polltask *pt; -+ -+ if (!events) -+ return NULL; -+ -+ pt = malloc(sizeof(*pt)); -+ if (!pt) -+ return NULL; -+ -+ *pt = (struct polltask){ -+ .next = NULL, -+ .prev = NULL, -+ .q = pollqueue_ref(pq), -+ .fd = fd, -+ .events = events, -+ .fn = fn, -+ .v = v -+ }; -+ -+ sem_init(&pt->kill_sem, 0, 0); -+ -+ return pt; -+} -+ -+static void pollqueue_rem_task(struct pollqueue *const pq, struct polltask *const pt) -+{ -+ if (pt->prev) -+ pt->prev->next = pt->next; -+ else -+ pq->head = pt->next; -+ if (pt->next) -+ pt->next->prev = pt->prev; -+ else -+ pq->tail = pt->prev; -+ pt->next = NULL; -+ pt->prev = NULL; -+} -+ -+static void polltask_free(struct polltask * const pt) -+{ -+ sem_destroy(&pt->kill_sem); -+ free(pt); -+} -+ -+static int pollqueue_prod(const struct pollqueue *const pq) -+{ -+ static const uint64_t one = 1; -+ return write(pq->prod_fd, &one, sizeof(one)); -+} -+ -+void polltask_delete(struct polltask **const ppt) -+{ -+ struct polltask *const pt = *ppt; -+ struct pollqueue * pq; -+ enum polltask_state state; -+ bool prodme; -+ -+ if (!pt) -+ return; -+ -+ pq = pt->q; -+ pthread_mutex_lock(&pq->lock); -+ state = pt->state; -+ pt->state = (state == POLLTASK_RUNNING) ? POLLTASK_RUN_KILL : POLLTASK_Q_KILL; -+ prodme = !pq->no_prod; -+ pthread_mutex_unlock(&pq->lock); -+ -+ if (state != POLLTASK_UNQUEUED) { -+ if (prodme) -+ pollqueue_prod(pq); -+ while (sem_wait(&pt->kill_sem) && errno == EINTR) -+ /* loop */; -+ } -+ -+ // Leave zapping the ref until we have DQed the PT as might well be -+ // legitimately used in it -+ *ppt = NULL; -+ polltask_free(pt); -+ pollqueue_unref(&pq); -+} -+ -+static uint64_t pollqueue_now(int timeout) -+{ -+ struct timespec now; -+ uint64_t now_ms; -+ -+ if (clock_gettime(CLOCK_MONOTONIC, &now)) -+ return 0; -+ now_ms = (now.tv_nsec / 1000000) + (uint64_t)now.tv_sec * 1000 + timeout; -+ return now_ms ? now_ms : (uint64_t)1; -+} -+ -+void pollqueue_add_task(struct polltask *const pt, const int timeout) -+{ -+ bool prodme = false; -+ struct pollqueue * const pq = pt->q; -+ -+ pthread_mutex_lock(&pq->lock); -+ if (pt->state != POLLTASK_Q_KILL && pt->state != POLLTASK_RUN_KILL) { -+ if (pq->tail) -+ pq->tail->next = pt; -+ else -+ pq->head = pt; -+ pt->prev = pq->tail; -+ pt->next = NULL; -+ pt->state = POLLTASK_QUEUED; -+ pt->timeout = timeout < 0 ? 0 : pollqueue_now(timeout); -+ pq->tail = pt; -+ prodme = !pq->no_prod; -+ } -+ pthread_mutex_unlock(&pq->lock); -+ if (prodme) -+ pollqueue_prod(pq); -+} -+ -+static void *poll_thread(void *v) -+{ -+ struct pollqueue *const pq = v; -+ struct pollfd *a = NULL; -+ size_t asize = 0; -+ -+ pthread_mutex_lock(&pq->lock); -+ do { -+ unsigned int i; -+ unsigned int n = 0; -+ struct polltask *pt; -+ struct polltask *pt_next; -+ uint64_t now = pollqueue_now(0); -+ int timeout = -1; -+ int rv; -+ -+ for (pt = pq->head; pt; pt = pt_next) { -+ int64_t t; -+ -+ pt_next = pt->next; -+ -+ if (pt->state == POLLTASK_Q_KILL) { -+ pollqueue_rem_task(pq, pt); -+ sem_post(&pt->kill_sem); -+ continue; -+ } -+ -+ if (n >= asize) { -+ asize = asize ? asize * 2 : 4; -+ a = realloc(a, asize * sizeof(*a)); -+ if (!a) { -+ request_log("Failed to realloc poll array to %zd\n", asize); -+ goto fail_locked; -+ } -+ } -+ -+ a[n++] = (struct pollfd){ -+ .fd = pt->fd, -+ .events = pt->events -+ }; -+ -+ t = (int64_t)(pt->timeout - now); -+ if (pt->timeout && t < INT_MAX && -+ (timeout < 0 || (int)t < timeout)) -+ timeout = (t < 0) ? 0 : (int)t; -+ } -+ pthread_mutex_unlock(&pq->lock); -+ -+ if ((rv = poll(a, n, timeout)) == -1) { -+ if (errno != EINTR) { -+ request_log("Poll error: %s\n", strerror(errno)); -+ goto fail_unlocked; -+ } -+ } -+ -+ pthread_mutex_lock(&pq->lock); -+ now = pollqueue_now(0); -+ -+ /* Prodding in this loop is pointless and might lead to -+ * infinite looping -+ */ -+ pq->no_prod = true; -+ for (i = 0, pt = pq->head; i < n; ++i, pt = pt_next) { -+ pt_next = pt->next; -+ -+ /* Pending? */ -+ if (a[i].revents || -+ (pt->timeout && (int64_t)(now - pt->timeout) >= 0)) { -+ pollqueue_rem_task(pq, pt); -+ if (pt->state == POLLTASK_QUEUED) -+ pt->state = POLLTASK_RUNNING; -+ if (pt->state == POLLTASK_Q_KILL) -+ pt->state = POLLTASK_RUN_KILL; -+ pthread_mutex_unlock(&pq->lock); -+ -+ /* This can add new entries to the Q but as -+ * those are added to the tail our existing -+ * chain remains intact -+ */ -+ pt->fn(pt->v, a[i].revents); -+ -+ pthread_mutex_lock(&pq->lock); -+ if (pt->state == POLLTASK_RUNNING) -+ pt->state = POLLTASK_UNQUEUED; -+ if (pt->state == POLLTASK_RUN_KILL) -+ sem_post(&pt->kill_sem); -+ } -+ } -+ pq->no_prod = false; -+ -+ } while (!pq->kill); -+ -+fail_locked: -+ pthread_mutex_unlock(&pq->lock); -+fail_unlocked: -+ free(a); -+ return NULL; -+} -+ -+static void prod_fn(void *v, short revents) -+{ -+ struct pollqueue *const pq = v; -+ char buf[8]; -+ if (revents) -+ read(pq->prod_fd, buf, 8); -+ if (!pq->kill) -+ pollqueue_add_task(pq->prod_pt, -1); -+} -+ -+struct pollqueue * pollqueue_new(void) -+{ -+ struct pollqueue *pq = malloc(sizeof(*pq)); -+ if (!pq) -+ return NULL; -+ *pq = (struct pollqueue){ -+ .ref_count = ATOMIC_VAR_INIT(0), -+ .lock = PTHREAD_MUTEX_INITIALIZER, -+ .head = NULL, -+ .tail = NULL, -+ .kill = false, -+ .prod_fd = -1 -+ }; -+ -+ pq->prod_fd = eventfd(0, EFD_NONBLOCK); -+ if (pq->prod_fd == 1) -+ goto fail1; -+ pq->prod_pt = polltask_new(pq, pq->prod_fd, POLLIN, prod_fn, pq); -+ if (!pq->prod_pt) -+ goto fail2; -+ pollqueue_add_task(pq->prod_pt, -1); -+ if (pthread_create(&pq->worker, NULL, poll_thread, pq)) -+ goto fail3; -+ // Reset ref count which will have been inced by the add_task -+ atomic_store(&pq->ref_count, 0); -+ return pq; -+ -+fail3: -+ polltask_free(pq->prod_pt); -+fail2: -+ close(pq->prod_fd); -+fail1: -+ free(pq); -+ return NULL; -+} -+ -+static void pollqueue_free(struct pollqueue *const pq) -+{ -+ void *rv; -+ -+ pthread_mutex_lock(&pq->lock); -+ pq->kill = true; -+ pollqueue_prod(pq); -+ pthread_mutex_unlock(&pq->lock); -+ -+ pthread_join(pq->worker, &rv); -+ polltask_free(pq->prod_pt); -+ pthread_mutex_destroy(&pq->lock); -+ close(pq->prod_fd); -+ free(pq); -+} -+ -+struct pollqueue * pollqueue_ref(struct pollqueue *const pq) -+{ -+ atomic_fetch_add(&pq->ref_count, 1); -+ return pq; -+} -+ -+void pollqueue_unref(struct pollqueue **const ppq) -+{ -+ struct pollqueue * const pq = *ppq; -+ -+ if (!pq) -+ return; -+ *ppq = NULL; -+ -+ if (atomic_fetch_sub(&pq->ref_count, 1) != 0) -+ return; -+ -+ pollqueue_free(pq); -+} -+ -+ -+ ---- /dev/null -+++ b/libavcodec/v4l2_req_pollqueue.h -@@ -0,0 +1,18 @@ -+#ifndef POLLQUEUE_H_ -+#define POLLQUEUE_H_ -+ -+struct polltask; -+struct pollqueue; -+ -+struct polltask *polltask_new(struct pollqueue *const pq, -+ const int fd, const short events, -+ void (*const fn)(void *v, short revents), -+ void *const v); -+void polltask_delete(struct polltask **const ppt); -+ -+void pollqueue_add_task(struct polltask *const pt, const int timeout); -+struct pollqueue * pollqueue_new(void); -+void pollqueue_unref(struct pollqueue **const ppq); -+struct pollqueue * pollqueue_ref(struct pollqueue *const pq); -+ -+#endif /* POLLQUEUE_H_ */ ---- /dev/null -+++ b/libavcodec/v4l2_req_utils.h -@@ -0,0 +1,22 @@ -+#include "libavutil/log.h" -+ -+#define request_log(...) av_log(NULL, AV_LOG_INFO, __VA_ARGS__) -+ -+#define request_err(_ctx, ...) av_log(_ctx, AV_LOG_ERROR, __VA_ARGS__) -+#define request_warn(_ctx, ...) av_log(_ctx, AV_LOG_WARNING, __VA_ARGS__) -+#define request_info(_ctx, ...) av_log(_ctx, AV_LOG_INFO, __VA_ARGS__) -+#define request_debug(_ctx, ...) av_log(_ctx, AV_LOG_DEBUG, __VA_ARGS__) -+ -+static inline char safechar(char c) { -+ return c > 0x20 && c < 0x7f ? c : '.'; -+} -+ -+static inline const char * strfourcc(char tbuf[5], uint32_t fcc) { -+ tbuf[0] = safechar((fcc >> 0) & 0xff); -+ tbuf[1] = safechar((fcc >> 8) & 0xff); -+ tbuf[2] = safechar((fcc >> 16) & 0xff); -+ tbuf[3] = safechar((fcc >> 24) & 0xff); -+ tbuf[4] = '\0'; -+ return tbuf; -+} -+ ---- /dev/null -+++ b/libavcodec/v4l2_request_hevc.c -@@ -0,0 +1,315 @@ -+/* -+ * This file is part of FFmpeg. -+ * -+ * FFmpeg is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * FFmpeg is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with FFmpeg; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+ */ -+ -+ -+ -+#include "decode.h" -+#include "hevcdec.h" -+#include "hwconfig.h" -+ -+#include "v4l2_request_hevc.h" -+ -+#include "libavutil/hwcontext_drm.h" -+ -+#include "v4l2_req_devscan.h" -+#include "v4l2_req_dmabufs.h" -+#include "v4l2_req_pollqueue.h" -+#include "v4l2_req_media.h" -+#include "v4l2_req_utils.h" -+ -+static size_t bit_buf_size(unsigned int w, unsigned int h, unsigned int bits_minus8) -+{ -+ const size_t wxh = w * h; -+ size_t bits_alloc; -+ -+ /* Annex A gives a min compression of 2 @ lvl 3.1 -+ * (wxh <= 983040) and min 4 thereafter but avoid -+ * the odity of 983041 having a lower limit than -+ * 983040. -+ * Multiply by 3/2 for 4:2:0 -+ */ -+ bits_alloc = wxh < 983040 ? wxh * 3 / 4 : -+ wxh < 983040 * 2 ? 983040 * 3 / 4 : -+ wxh * 3 / 8; -+ /* Allow for bit depth */ -+ bits_alloc += (bits_alloc * bits_minus8) / 8; -+ /* Add a few bytes (16k) for overhead */ -+ bits_alloc += 0x4000; -+ return bits_alloc; -+} -+ -+static int v4l2_req_hevc_start_frame(AVCodecContext *avctx, -+ av_unused const uint8_t *buffer, -+ av_unused uint32_t size) -+{ -+ const V4L2RequestContextHEVC * const ctx = avctx->internal->hwaccel_priv_data; -+ return ctx->fns->start_frame(avctx, buffer, size); -+} -+ -+static int v4l2_req_hevc_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size) -+{ -+ V4L2RequestContextHEVC * const ctx = avctx->internal->hwaccel_priv_data; -+ return ctx->fns->decode_slice(avctx, buffer, size); -+} -+ -+static int v4l2_req_hevc_end_frame(AVCodecContext *avctx) -+{ -+ V4L2RequestContextHEVC *ctx = avctx->internal->hwaccel_priv_data; -+ return ctx->fns->end_frame(avctx); -+} -+ -+static void v4l2_req_hevc_abort_frame(AVCodecContext * const avctx) -+{ -+ V4L2RequestContextHEVC * const ctx = avctx->internal->hwaccel_priv_data; -+ ctx->fns->abort_frame(avctx); -+} -+ -+static int v4l2_req_hevc_frame_params(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx) -+{ -+ V4L2RequestContextHEVC * const ctx = avctx->internal->hwaccel_priv_data; -+ return ctx->fns->frame_params(avctx, hw_frames_ctx); -+} -+ -+static int v4l2_req_hevc_alloc_frame(AVCodecContext * avctx, AVFrame *frame) -+{ -+ V4L2RequestContextHEVC * const ctx = avctx->internal->hwaccel_priv_data; -+ return ctx->fns->alloc_frame(avctx, frame); -+} -+ -+ -+static int v4l2_request_hevc_uninit(AVCodecContext *avctx) -+{ -+ V4L2RequestContextHEVC * const ctx = avctx->internal->hwaccel_priv_data; -+ -+ av_log(avctx, AV_LOG_DEBUG, "<<< %s\n", __func__); -+ -+ decode_q_wait(&ctx->decode_q, NULL); // Wait for all other threads to be out of decode -+ -+ mediabufs_ctl_unref(&ctx->mbufs); -+ media_pool_delete(&ctx->mpool); -+ pollqueue_unref(&ctx->pq); -+ dmabufs_ctl_delete(&ctx->dbufs); -+ devscan_delete(&ctx->devscan); -+ -+ decode_q_uninit(&ctx->decode_q); -+ -+// if (avctx->hw_frames_ctx) { -+// AVHWFramesContext *hwfc = (AVHWFramesContext*)avctx->hw_frames_ctx->data; -+// av_buffer_pool_flush(hwfc->pool); -+// } -+ return 0; -+} -+ -+static int dst_fmt_accept_cb(void * v, const struct v4l2_fmtdesc *fmtdesc) -+{ -+ AVCodecContext *const avctx = v; -+ const HEVCContext *const h = avctx->priv_data; -+ -+ if (h->ps.sps->bit_depth == 8) { -+ if (fmtdesc->pixelformat == V4L2_PIX_FMT_NV12_COL128 || -+ fmtdesc->pixelformat == V4L2_PIX_FMT_NV12) { -+ return 1; -+ } -+ } -+ else if (h->ps.sps->bit_depth == 10) { -+ if (fmtdesc->pixelformat == V4L2_PIX_FMT_NV12_10_COL128) { -+ return 1; -+ } -+ } -+ return 0; -+} -+ -+static int v4l2_request_hevc_init(AVCodecContext *avctx) -+{ -+ const HEVCContext *h = avctx->priv_data; -+ V4L2RequestContextHEVC * const ctx = avctx->internal->hwaccel_priv_data; -+ const HEVCSPS * const sps = h->ps.sps; -+ int ret; -+ const struct decdev * decdev; -+ const uint32_t src_pix_fmt = V2(ff_v4l2_req_hevc, 1).src_pix_fmt_v4l2; // Assuming constant for all APIs but avoiding V4L2 includes -+ size_t src_size; -+ -+ av_log(avctx, AV_LOG_DEBUG, "<<< %s\n", __func__); -+ -+ // Give up immediately if this is something that we have no code to deal with -+ if (h->ps.sps->chroma_format_idc != 1) { -+ av_log(avctx, AV_LOG_WARNING, "chroma_format_idc(%d) != 1: Not implemented\n", h->ps.sps->chroma_format_idc); -+ return AVERROR_PATCHWELCOME; -+ } -+ if (!(h->ps.sps->bit_depth == 10 || h->ps.sps->bit_depth == 8) || -+ h->ps.sps->bit_depth != h->ps.sps->bit_depth_chroma) { -+ av_log(avctx, AV_LOG_WARNING, "Bit depth Y:%d C:%d: Not implemented\n", h->ps.sps->bit_depth, h->ps.sps->bit_depth_chroma); -+ return AVERROR_PATCHWELCOME; -+ } -+ -+ if ((ret = devscan_build(avctx, &ctx->devscan)) != 0) { -+ av_log(avctx, AV_LOG_WARNING, "Failed to find any V4L2 devices\n"); -+ return (AVERROR(-ret)); -+ } -+ ret = AVERROR(ENOMEM); // Assume mem fail by default for these -+ -+ if ((decdev = devscan_find(ctx->devscan, src_pix_fmt)) == NULL) -+ { -+ av_log(avctx, AV_LOG_WARNING, "Failed to find a V4L2 device for H265\n"); -+ ret = AVERROR(ENODEV); -+ goto fail0; -+ } -+ av_log(avctx, AV_LOG_DEBUG, "Trying V4L2 devices: %s,%s\n", -+ decdev_media_path(decdev), decdev_video_path(decdev)); -+ -+ if ((ctx->dbufs = dmabufs_ctl_new()) == NULL) { -+ av_log(avctx, AV_LOG_ERROR, "Unable to open dmabufs\n"); -+ goto fail0; -+ } -+ -+ if ((ctx->pq = pollqueue_new()) == NULL) { -+ av_log(avctx, AV_LOG_ERROR, "Unable to create pollqueue\n"); -+ goto fail1; -+ } -+ -+ if ((ctx->mpool = media_pool_new(decdev_media_path(decdev), ctx->pq, 4)) == NULL) { -+ av_log(avctx, AV_LOG_ERROR, "Unable to create media pool\n"); -+ goto fail2; -+ } -+ -+ if ((ctx->mbufs = mediabufs_ctl_new(avctx, decdev_video_path(decdev), ctx->pq)) == NULL) { -+ av_log(avctx, AV_LOG_ERROR, "Unable to create media controls\n"); -+ goto fail3; -+ } -+ -+ // Ask for an initial bitbuf size of max size / 4 -+ // We will realloc if we need more -+ // Must use sps->h/w as avctx contains cropped size -+ src_size = bit_buf_size(sps->width, sps->height, sps->bit_depth - 8); -+ if (mediabufs_src_resizable(ctx->mbufs)) -+ src_size /= 4; -+ // Kludge for conformance tests which break Annex A limits -+ else if (src_size < 0x40000) -+ src_size = 0x40000; -+ -+ if (mediabufs_src_fmt_set(ctx->mbufs, decdev_src_type(decdev), src_pix_fmt, -+ sps->width, sps->height, src_size)) { -+ char tbuf1[5]; -+ av_log(avctx, AV_LOG_ERROR, "Failed to set source format: %s %dx%d\n", strfourcc(tbuf1, src_pix_fmt), sps->width, sps->height); -+ goto fail4; -+ } -+ -+ if (V2(ff_v4l2_req_hevc, 4).probe(avctx, ctx) == 0) { -+ av_log(avctx, AV_LOG_DEBUG, "HEVC API version 4 probed successfully\n"); -+ ctx->fns = &V2(ff_v4l2_req_hevc, 4); -+ } -+ else if (V2(ff_v4l2_req_hevc, 3).probe(avctx, ctx) == 0) { -+ av_log(avctx, AV_LOG_DEBUG, "HEVC API version 3 probed successfully\n"); -+ ctx->fns = &V2(ff_v4l2_req_hevc, 3); -+ } -+ else if (V2(ff_v4l2_req_hevc, 2).probe(avctx, ctx) == 0) { -+ av_log(avctx, AV_LOG_DEBUG, "HEVC API version 2 probed successfully\n"); -+ ctx->fns = &V2(ff_v4l2_req_hevc, 2); -+ } -+ else if (V2(ff_v4l2_req_hevc, 1).probe(avctx, ctx) == 0) { -+ av_log(avctx, AV_LOG_DEBUG, "HEVC API version 1 probed successfully\n"); -+ ctx->fns = &V2(ff_v4l2_req_hevc, 1); -+ } -+ else { -+ av_log(avctx, AV_LOG_ERROR, "No HEVC version probed successfully\n"); -+ ret = AVERROR(EINVAL); -+ goto fail4; -+ } -+ -+ if (mediabufs_dst_fmt_set(ctx->mbufs, sps->width, sps->height, dst_fmt_accept_cb, avctx)) { -+ char tbuf1[5]; -+ av_log(avctx, AV_LOG_ERROR, "Failed to set destination format: %s %dx%d\n", strfourcc(tbuf1, src_pix_fmt), sps->width, sps->height); -+ goto fail4; -+ } -+ -+ if (mediabufs_src_pool_create(ctx->mbufs, ctx->dbufs, 6)) { -+ av_log(avctx, AV_LOG_ERROR, "Failed to create source pool\n"); -+ goto fail4; -+ } -+ -+ { -+ unsigned int dst_slots = sps->temporal_layer[sps->max_sub_layers - 1].max_dec_pic_buffering + -+ avctx->thread_count + (avctx->extra_hw_frames > 0 ? avctx->extra_hw_frames : 6); -+ av_log(avctx, AV_LOG_DEBUG, "Slots=%d: Reordering=%d, threads=%d, hw+=%d\n", dst_slots, -+ sps->temporal_layer[sps->max_sub_layers - 1].max_dec_pic_buffering, -+ avctx->thread_count, avctx->extra_hw_frames); -+ -+ // extra_hw_frames is -1 if unset -+ if (mediabufs_dst_slots_create(ctx->mbufs, dst_slots, (avctx->extra_hw_frames > 0))) { -+ av_log(avctx, AV_LOG_ERROR, "Failed to create destination slots\n"); -+ goto fail4; -+ } -+ } -+ -+ if (mediabufs_stream_on(ctx->mbufs)) { -+ av_log(avctx, AV_LOG_ERROR, "Failed stream on\n"); -+ goto fail4; -+ } -+ -+ if ((ret = ff_decode_get_hw_frames_ctx(avctx, AV_HWDEVICE_TYPE_DRM)) != 0) { -+ av_log(avctx, AV_LOG_ERROR, "Failed to create frame ctx\n"); -+ goto fail4; -+ } -+ -+ if ((ret = ctx->fns->set_controls(avctx, ctx)) != 0) { -+ av_log(avctx, AV_LOG_ERROR, "Failed set controls\n"); -+ goto fail5; -+ } -+ -+ decode_q_init(&ctx->decode_q); -+ -+ // Set our s/w format -+ avctx->sw_pix_fmt = ((AVHWFramesContext *)avctx->hw_frames_ctx->data)->sw_format; -+ -+ av_log(avctx, AV_LOG_INFO, "Hwaccel %s; devices: %s,%s\n", -+ ctx->fns->name, -+ decdev_media_path(decdev), decdev_video_path(decdev)); -+ -+ return 0; -+ -+fail5: -+ av_buffer_unref(&avctx->hw_frames_ctx); -+fail4: -+ mediabufs_ctl_unref(&ctx->mbufs); -+fail3: -+ media_pool_delete(&ctx->mpool); -+fail2: -+ pollqueue_unref(&ctx->pq); -+fail1: -+ dmabufs_ctl_delete(&ctx->dbufs); -+fail0: -+ devscan_delete(&ctx->devscan); -+ return ret; -+} -+ -+const AVHWAccel ff_hevc_v4l2request_hwaccel = { -+ .name = "hevc_v4l2request", -+ .type = AVMEDIA_TYPE_VIDEO, -+ .id = AV_CODEC_ID_HEVC, -+ .pix_fmt = AV_PIX_FMT_DRM_PRIME, -+ .alloc_frame = v4l2_req_hevc_alloc_frame, -+ .start_frame = v4l2_req_hevc_start_frame, -+ .decode_slice = v4l2_req_hevc_decode_slice, -+ .end_frame = v4l2_req_hevc_end_frame, -+ .abort_frame = v4l2_req_hevc_abort_frame, -+ .init = v4l2_request_hevc_init, -+ .uninit = v4l2_request_hevc_uninit, -+ .priv_data_size = sizeof(V4L2RequestContextHEVC), -+ .frame_params = v4l2_req_hevc_frame_params, -+ .caps_internal = HWACCEL_CAP_ASYNC_SAFE | HWACCEL_CAP_MT_SAFE, -+}; ---- /dev/null -+++ b/libavcodec/v4l2_request_hevc.h -@@ -0,0 +1,101 @@ -+#ifndef AVCODEC_V4L2_REQUEST_HEVC_H -+#define AVCODEC_V4L2_REQUEST_HEVC_H -+ -+#include -+#include "v4l2_req_decode_q.h" -+ -+#ifndef DRM_FORMAT_NV15 -+#define DRM_FORMAT_NV15 fourcc_code('N', 'V', '1', '5') -+#endif -+ -+#ifndef DRM_FORMAT_NV20 -+#define DRM_FORMAT_NV20 fourcc_code('N', 'V', '2', '0') -+#endif -+ -+// P030 should be defined in drm_fourcc.h and hopefully will be sometime -+// in the future but until then... -+#ifndef DRM_FORMAT_P030 -+#define DRM_FORMAT_P030 fourcc_code('P', '0', '3', '0') -+#endif -+ -+#ifndef DRM_FORMAT_NV15 -+#define DRM_FORMAT_NV15 fourcc_code('N', 'V', '1', '5') -+#endif -+ -+#ifndef DRM_FORMAT_NV20 -+#define DRM_FORMAT_NV20 fourcc_code('N', 'V', '2', '0') -+#endif -+ -+#include -+#ifndef V4L2_CID_CODEC_BASE -+#define V4L2_CID_CODEC_BASE V4L2_CID_MPEG_BASE -+#endif -+ -+// V4L2_PIX_FMT_NV12_10_COL128 and V4L2_PIX_FMT_NV12_COL128 should be defined -+// in drm_fourcc.h hopefully will be sometime in the future but until then... -+#ifndef V4L2_PIX_FMT_NV12_10_COL128 -+#define V4L2_PIX_FMT_NV12_10_COL128 v4l2_fourcc('N', 'C', '3', '0') -+#endif -+ -+#ifndef V4L2_PIX_FMT_NV12_COL128 -+#define V4L2_PIX_FMT_NV12_COL128 v4l2_fourcc('N', 'C', '1', '2') /* 12 Y/CbCr 4:2:0 128 pixel wide column */ -+#endif -+ -+#ifndef V4L2_CTRL_FLAG_DYNAMIC_ARRAY -+#define V4L2_CTRL_FLAG_DYNAMIC_ARRAY 0x0800 -+#endif -+ -+#define VCAT(name, version) name##_v##version -+#define V2(n,v) VCAT(n, v) -+#define V(n) V2(n, HEVC_CTRLS_VERSION) -+ -+#define S2(x) #x -+#define STR(x) S2(x) -+ -+// 1 per decoder -+struct v4l2_req_decode_fns; -+ -+typedef struct V4L2RequestContextHEVC { -+// V4L2RequestContext base; -+ const struct v4l2_req_decode_fns * fns; -+ -+ unsigned int timestamp; // ?? maybe uint64_t -+ -+ int decode_mode; -+ int start_code; -+ unsigned int max_slices; // 0 => not wanted (frame mode) -+ unsigned int max_offsets; // 0 => not wanted -+ -+ req_decode_q decode_q; -+ -+ struct devscan *devscan; -+ struct dmabufs_ctl *dbufs; -+ struct pollqueue *pq; -+ struct media_pool * mpool; -+ struct mediabufs_ctl *mbufs; -+} V4L2RequestContextHEVC; -+ -+typedef struct v4l2_req_decode_fns { -+ int src_pix_fmt_v4l2; -+ const char * name; -+ -+ // Init setup -+ int (*probe)(AVCodecContext * const avctx, V4L2RequestContextHEVC * const ctx); -+ int (*set_controls)(AVCodecContext * const avctx, V4L2RequestContextHEVC * const ctx); -+ -+ // Passthrough of hwaccel fns -+ int (*start_frame)(AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size); -+ int (*decode_slice)(AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size); -+ int (*end_frame)(AVCodecContext *avctx); -+ void (*abort_frame)(AVCodecContext *avctx); -+ int (*frame_params)(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx); -+ int (*alloc_frame)(AVCodecContext * avctx, AVFrame *frame); -+} v4l2_req_decode_fns; -+ -+ -+extern const v4l2_req_decode_fns V2(ff_v4l2_req_hevc, 1); -+extern const v4l2_req_decode_fns V2(ff_v4l2_req_hevc, 2); -+extern const v4l2_req_decode_fns V2(ff_v4l2_req_hevc, 3); -+extern const v4l2_req_decode_fns V2(ff_v4l2_req_hevc, 4); -+ -+#endif ---- a/libavcodec/vc1dec.c -+++ b/libavcodec/vc1dec.c -@@ -486,7 +486,7 @@ static av_cold int vc1_decode_init(AVCod - size = next - start - 4; - if (size <= 0) - continue; -- buf2_size = vc1_unescape_buffer(start + 4, size, buf2); -+ buf2_size = v->vc1dsp.vc1_unescape_buffer(start + 4, size, buf2); - init_get_bits(&gb, buf2, buf2_size * 8); - switch (AV_RB32(start)) { - case VC1_CODE_SEQHDR: -@@ -689,7 +689,7 @@ static int vc1_decode_frame(AVCodecConte - case VC1_CODE_FRAME: - if (avctx->hwaccel) - buf_start = start; -- buf_size2 = vc1_unescape_buffer(start + 4, size, buf2); -+ buf_size2 = v->vc1dsp.vc1_unescape_buffer(start + 4, size, buf2); - break; - case VC1_CODE_FIELD: { - int buf_size3; -@@ -706,8 +706,8 @@ static int vc1_decode_frame(AVCodecConte - ret = AVERROR(ENOMEM); - goto err; - } -- buf_size3 = vc1_unescape_buffer(start + 4, size, -- slices[n_slices].buf); -+ buf_size3 = v->vc1dsp.vc1_unescape_buffer(start + 4, size, -+ slices[n_slices].buf); - init_get_bits(&slices[n_slices].gb, slices[n_slices].buf, - buf_size3 << 3); - slices[n_slices].mby_start = avctx->coded_height + 31 >> 5; -@@ -718,7 +718,7 @@ static int vc1_decode_frame(AVCodecConte - break; - } - case VC1_CODE_ENTRYPOINT: /* it should be before frame data */ -- buf_size2 = vc1_unescape_buffer(start + 4, size, buf2); -+ buf_size2 = v->vc1dsp.vc1_unescape_buffer(start + 4, size, buf2); - init_get_bits(&s->gb, buf2, buf_size2 * 8); - ff_vc1_decode_entry_point(avctx, v, &s->gb); - break; -@@ -735,8 +735,8 @@ static int vc1_decode_frame(AVCodecConte - ret = AVERROR(ENOMEM); - goto err; - } -- buf_size3 = vc1_unescape_buffer(start + 4, size, -- slices[n_slices].buf); -+ buf_size3 = v->vc1dsp.vc1_unescape_buffer(start + 4, size, -+ slices[n_slices].buf); - init_get_bits(&slices[n_slices].gb, slices[n_slices].buf, - buf_size3 << 3); - slices[n_slices].mby_start = get_bits(&slices[n_slices].gb, 9); -@@ -770,7 +770,7 @@ static int vc1_decode_frame(AVCodecConte - ret = AVERROR(ENOMEM); - goto err; - } -- buf_size3 = vc1_unescape_buffer(divider + 4, buf + buf_size - divider - 4, slices[n_slices].buf); -+ buf_size3 = v->vc1dsp.vc1_unescape_buffer(divider + 4, buf + buf_size - divider - 4, slices[n_slices].buf); - init_get_bits(&slices[n_slices].gb, slices[n_slices].buf, - buf_size3 << 3); - slices[n_slices].mby_start = s->mb_height + 1 >> 1; -@@ -779,9 +779,9 @@ static int vc1_decode_frame(AVCodecConte - n_slices1 = n_slices - 1; - n_slices++; - } -- buf_size2 = vc1_unescape_buffer(buf, divider - buf, buf2); -+ buf_size2 = v->vc1dsp.vc1_unescape_buffer(buf, divider - buf, buf2); - } else { -- buf_size2 = vc1_unescape_buffer(buf, buf_size, buf2); -+ buf_size2 = v->vc1dsp.vc1_unescape_buffer(buf, buf_size, buf2); - } - init_get_bits(&s->gb, buf2, buf_size2*8); - } else ---- a/libavcodec/vc1dsp.c -+++ b/libavcodec/vc1dsp.c -@@ -32,6 +32,7 @@ - #include "rnd_avg.h" - #include "vc1dsp.h" - #include "startcode.h" -+#include "vc1_common.h" - - /* Apply overlap transform to horizontal edge */ - static void vc1_v_overlap_c(uint8_t *src, int stride) -@@ -1028,6 +1029,7 @@ av_cold void ff_vc1dsp_init(VC1DSPContex - #endif /* CONFIG_WMV3IMAGE_DECODER || CONFIG_VC1IMAGE_DECODER */ - - dsp->startcode_find_candidate = ff_startcode_find_candidate_c; -+ dsp->vc1_unescape_buffer = vc1_unescape_buffer; - - if (ARCH_AARCH64) - ff_vc1dsp_init_aarch64(dsp); ---- a/libavcodec/vc1dsp.h -+++ b/libavcodec/vc1dsp.h -@@ -80,6 +80,9 @@ typedef struct VC1DSPContext { - * one or more further zero bytes and a one byte. - */ - int (*startcode_find_candidate)(const uint8_t *buf, int size); -+ -+ /* Copy a buffer, removing startcode emulation escape bytes as we go */ -+ int (*vc1_unescape_buffer)(const uint8_t *src, int size, uint8_t *dst); - } VC1DSPContext; - - void ff_vc1dsp_init(VC1DSPContext* c); ---- /dev/null -+++ b/libavcodec/weak_link.c -@@ -0,0 +1,102 @@ -+#include -+#include -+#include -+#include "weak_link.h" -+ -+struct ff_weak_link_master { -+ atomic_int ref_count; /* 0 is single ref for easier atomics */ -+ pthread_rwlock_t lock; -+ void * ptr; -+}; -+ -+static inline struct ff_weak_link_master * weak_link_x(struct ff_weak_link_client * c) -+{ -+ return (struct ff_weak_link_master *)c; -+} -+ -+struct ff_weak_link_master * ff_weak_link_new(void * p) -+{ -+ struct ff_weak_link_master * w = malloc(sizeof(*w)); -+ if (!w) -+ return NULL; -+ w->ptr = p; -+ if (pthread_rwlock_init(&w->lock, NULL)) { -+ free(w); -+ return NULL; -+ } -+ return w; -+} -+ -+static void weak_link_do_unref(struct ff_weak_link_master * const w) -+{ -+ int n = atomic_fetch_sub(&w->ref_count, 1); -+ if (n) -+ return; -+ -+ pthread_rwlock_destroy(&w->lock); -+ free(w); -+} -+ -+// Unref & break link -+void ff_weak_link_break(struct ff_weak_link_master ** ppLink) -+{ -+ struct ff_weak_link_master * const w = *ppLink; -+ if (!w) -+ return; -+ -+ *ppLink = NULL; -+ pthread_rwlock_wrlock(&w->lock); -+ w->ptr = NULL; -+ pthread_rwlock_unlock(&w->lock); -+ -+ weak_link_do_unref(w); -+} -+ -+struct ff_weak_link_client* ff_weak_link_ref(struct ff_weak_link_master * w) -+{ -+ if (!w) -+ return NULL; -+ atomic_fetch_add(&w->ref_count, 1); -+ return (struct ff_weak_link_client*)w; -+} -+ -+void ff_weak_link_unref(struct ff_weak_link_client ** ppLink) -+{ -+ struct ff_weak_link_master * const w = weak_link_x(*ppLink); -+ if (!w) -+ return; -+ -+ *ppLink = NULL; -+ weak_link_do_unref(w); -+} -+ -+void * ff_weak_link_lock(struct ff_weak_link_client ** ppLink) -+{ -+ struct ff_weak_link_master * const w = weak_link_x(*ppLink); -+ -+ if (!w) -+ return NULL; -+ -+ if (pthread_rwlock_rdlock(&w->lock)) -+ goto broken; -+ -+ if (w->ptr) -+ return w->ptr; -+ -+ pthread_rwlock_unlock(&w->lock); -+ -+broken: -+ *ppLink = NULL; -+ weak_link_do_unref(w); -+ return NULL; -+} -+ -+// Ignores a NULL c (so can be on the return path of both broken & live links) -+void ff_weak_link_unlock(struct ff_weak_link_client * c) -+{ -+ struct ff_weak_link_master * const w = weak_link_x(c); -+ if (w) -+ pthread_rwlock_unlock(&w->lock); -+} -+ -+ ---- /dev/null -+++ b/libavcodec/weak_link.h -@@ -0,0 +1,23 @@ -+struct ff_weak_link_master; -+struct ff_weak_link_client; -+ -+struct ff_weak_link_master * ff_weak_link_new(void * p); -+void ff_weak_link_break(struct ff_weak_link_master ** ppLink); -+ -+struct ff_weak_link_client* ff_weak_link_ref(struct ff_weak_link_master * w); -+void ff_weak_link_unref(struct ff_weak_link_client ** ppLink); -+ -+// Returns NULL if link broken - in this case it will also zap -+// *ppLink and unref the weak_link. -+// Returns NULL if *ppLink is NULL (so a link once broken stays broken) -+// -+// The above does mean that there is a race if this is called simultainiously -+// by two threads using the same weak_link_client (so don't do that) -+void * ff_weak_link_lock(struct ff_weak_link_client ** ppLink); -+void ff_weak_link_unlock(struct ff_weak_link_client * c); -+ -+ -+ -+ -+ -+ ---- a/libavdevice/Makefile -+++ b/libavdevice/Makefile -@@ -46,6 +46,9 @@ OBJS-$(CONFIG_SNDIO_OUTDEV) - OBJS-$(CONFIG_V4L2_INDEV) += v4l2.o v4l2-common.o timefilter.o - OBJS-$(CONFIG_V4L2_OUTDEV) += v4l2enc.o v4l2-common.o - OBJS-$(CONFIG_VFWCAP_INDEV) += vfwcap.o -+OBJS-$(CONFIG_VOUT_DRM_OUTDEV) += drm_vout.o -+OBJS-$(CONFIG_VOUT_EGL_OUTDEV) += egl_vout.o -+OBJS-$(CONFIG_VOUT_RPI_OUTDEV) += rpi_vout.o - OBJS-$(CONFIG_XCBGRAB_INDEV) += xcbgrab.o - OBJS-$(CONFIG_XV_OUTDEV) += xv.o - ---- a/libavdevice/alldevices.c -+++ b/libavdevice/alldevices.c -@@ -52,6 +52,9 @@ extern AVOutputFormat ff_sndio_muxer; - extern AVInputFormat ff_v4l2_demuxer; - extern AVOutputFormat ff_v4l2_muxer; - extern AVInputFormat ff_vfwcap_demuxer; -+extern AVOutputFormat ff_vout_drm_muxer; -+extern AVOutputFormat ff_vout_egl_muxer; -+extern AVOutputFormat ff_vout_rpi_muxer; - extern AVInputFormat ff_xcbgrab_demuxer; - extern AVOutputFormat ff_xv_muxer; - ---- /dev/null -+++ b/libavdevice/drm_vout.c -@@ -0,0 +1,643 @@ -+/* -+ * Copyright (c) 2020 John Cox for Raspberry Pi Trading -+ * -+ * This file is part of FFmpeg. -+ * -+ * FFmpeg is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * FFmpeg is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with FFmpeg; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+ */ -+ -+ -+// *** This module is a work in progress and its utility is strictly -+// limited to testing. -+ -+#include "libavutil/opt.h" -+#include "libavutil/pixdesc.h" -+#include "libavutil/hwcontext_drm.h" -+#include "libavformat/internal.h" -+#include "avdevice.h" -+ -+#include "pthread.h" -+#include -+#include -+ -+#include -+#include -+ -+#define TRACE_ALL 0 -+ -+#define DRM_MODULE "vc4" -+ -+#define ERRSTR strerror(errno) -+ -+struct drm_setup { -+ int conId; -+ uint32_t crtcId; -+ int crtcIdx; -+ uint32_t planeId; -+ unsigned int out_fourcc; -+ struct { -+ int x, y, width, height; -+ } compose; -+}; -+ -+typedef struct drm_aux_s { -+ unsigned int fb_handle; -+ uint32_t bo_handles[AV_DRM_MAX_PLANES]; -+ AVFrame * frame; -+} drm_aux_t; -+ -+// Aux size should only need to be 2, but on a few streams (Hobbit) under FKMS -+// we get initial flicker probably due to dodgy drm timing -+#define AUX_SIZE 3 -+typedef struct drm_display_env_s -+{ -+ AVClass *class; -+ -+ int drm_fd; -+ uint32_t con_id; -+ struct drm_setup setup; -+ enum AVPixelFormat avfmt; -+ int show_all; -+ -+ unsigned int ano; -+ drm_aux_t aux[AUX_SIZE]; -+ -+ pthread_t q_thread; -+ sem_t q_sem_in; -+ sem_t q_sem_out; -+ int q_terminate; -+ AVFrame * q_next; -+ -+} drm_display_env_t; -+ -+ -+static int drm_vout_write_trailer(AVFormatContext *s) -+{ -+#if TRACE_ALL -+ av_log(s, AV_LOG_DEBUG, "%s\n", __func__); -+#endif -+ -+ return 0; -+} -+ -+static int drm_vout_write_header(AVFormatContext *s) -+{ -+ const AVCodecParameters * const par = s->streams[0]->codecpar; -+ -+#if TRACE_ALL -+ av_log(s, AV_LOG_DEBUG, "%s\n", __func__); -+#endif -+ if ( s->nb_streams > 1 -+ || par->codec_type != AVMEDIA_TYPE_VIDEO -+ || par->codec_id != AV_CODEC_ID_WRAPPED_AVFRAME) { -+ av_log(s, AV_LOG_ERROR, "Only supports one wrapped avframe stream\n"); -+ return AVERROR(EINVAL); -+ } -+ -+ return 0; -+} -+ -+static int find_plane(struct AVFormatContext * const avctx, -+ const int drmfd, const int crtcidx, const uint32_t format, -+ uint32_t * const pplane_id) -+{ -+ drmModePlaneResPtr planes; -+ drmModePlanePtr plane; -+ unsigned int i; -+ unsigned int j; -+ int ret = 0; -+ -+ planes = drmModeGetPlaneResources(drmfd); -+ if (!planes) -+ { -+ av_log(avctx, AV_LOG_WARNING, "drmModeGetPlaneResources failed: %s\n", ERRSTR); -+ return -1; -+ } -+ -+ for (i = 0; i < planes->count_planes; ++i) { -+ plane = drmModeGetPlane(drmfd, planes->planes[i]); -+ if (!planes) -+ { -+ av_log(avctx, AV_LOG_WARNING, "drmModeGetPlane failed: %s\n", ERRSTR); -+ break; -+ } -+ -+ if (!(plane->possible_crtcs & (1 << crtcidx))) { -+ drmModeFreePlane(plane); -+ continue; -+ } -+ -+ for (j = 0; j < plane->count_formats; ++j) { -+ if (plane->formats[j] == format) -+ break; -+ } -+ -+ if (j == plane->count_formats) { -+ drmModeFreePlane(plane); -+ continue; -+ } -+ -+ *pplane_id = plane->plane_id; -+ drmModeFreePlane(plane); -+ break; -+ } -+ -+ if (i == planes->count_planes) -+ ret = -1; -+ -+ drmModeFreePlaneResources(planes); -+ return ret; -+} -+ -+static void da_uninit(drm_display_env_t * const de, drm_aux_t * da) -+{ -+ if (da->fb_handle != 0) { -+ drmModeRmFB(de->drm_fd, da->fb_handle); -+ da->fb_handle = 0; -+ } -+ -+ for (unsigned int i = 0; i != AV_DRM_MAX_PLANES; ++i) { -+ if (da->bo_handles[i]) { -+ struct drm_gem_close gem_close = {.handle = da->bo_handles[i]}; -+ drmIoctl(de->drm_fd, DRM_IOCTL_GEM_CLOSE, &gem_close); -+ da->bo_handles[i] = 0; -+ } -+ } -+ av_frame_free(&da->frame); -+} -+ -+static int do_display(AVFormatContext * const s, drm_display_env_t * const de, AVFrame * frame) -+{ -+ const AVDRMFrameDescriptor *desc = (AVDRMFrameDescriptor*)frame->data[0]; -+ drm_aux_t * da = de->aux + de->ano; -+ const uint32_t format = desc->layers[0].format; -+ int ret = 0; -+ -+#if TRACE_ALL -+ av_log(s, AV_LOG_DEBUG, "<<< %s: fd=%d\n", __func__, desc->objects[0].fd); -+#endif -+ -+ if (de->setup.out_fourcc != format) { -+ if (find_plane(s, de->drm_fd, de->setup.crtcIdx, format, &de->setup.planeId)) { -+ av_frame_free(&frame); -+ av_log(s, AV_LOG_WARNING, "No plane for format: %#x\n", format); -+ return -1; -+ } -+ de->setup.out_fourcc = format; -+ } -+ -+ { -+ drmVBlank vbl = { -+ .request = { -+ .type = DRM_VBLANK_RELATIVE, -+ .sequence = 0 -+ } -+ }; -+ -+ while (drmWaitVBlank(de->drm_fd, &vbl)) { -+ if (errno != EINTR) { -+// av_log(s, AV_LOG_WARNING, "drmWaitVBlank failed: %s\n", ERRSTR); -+ break; -+ } -+ } -+ } -+ -+ da_uninit(de, da); -+ -+ { -+ uint32_t pitches[4] = {0}; -+ uint32_t offsets[4] = {0}; -+ uint64_t modifiers[4] = {0}; -+ uint32_t bo_handles[4] = {0}; -+ int i, j, n; -+ -+ da->frame = frame; -+ -+ for (i = 0; i < desc->nb_objects; ++i) { -+ if (drmPrimeFDToHandle(de->drm_fd, desc->objects[i].fd, da->bo_handles + i) != 0) { -+ av_log(s, AV_LOG_WARNING, "drmPrimeFDToHandle[%d](%d) failed: %s\n", i, desc->objects[i].fd, ERRSTR); -+ return -1; -+ } -+ } -+ -+ n = 0; -+ for (i = 0; i < desc->nb_layers; ++i) { -+ for (j = 0; j < desc->layers[i].nb_planes; ++j) { -+ const AVDRMPlaneDescriptor * const p = desc->layers[i].planes + j; -+ const AVDRMObjectDescriptor * const obj = desc->objects + p->object_index; -+ pitches[n] = p->pitch; -+ offsets[n] = p->offset; -+ modifiers[n] = obj->format_modifier; -+ bo_handles[n] = da->bo_handles[p->object_index]; -+ ++n; -+ } -+ } -+ -+#if 1 && TRACE_ALL -+ av_log(s, AV_LOG_DEBUG, "%dx%d, fmt: %x, boh=%d,%d,%d,%d, pitch=%d,%d,%d,%d," -+ " offset=%d,%d,%d,%d, mod=%llx,%llx,%llx,%llx\n", -+ av_frame_cropped_width(frame), -+ av_frame_cropped_height(frame), -+ desc->layers[0].format, -+ bo_handles[0], -+ bo_handles[1], -+ bo_handles[2], -+ bo_handles[3], -+ pitches[0], -+ pitches[1], -+ pitches[2], -+ pitches[3], -+ offsets[0], -+ offsets[1], -+ offsets[2], -+ offsets[3], -+ (long long)modifiers[0], -+ (long long)modifiers[1], -+ (long long)modifiers[2], -+ (long long)modifiers[3] -+ ); -+#endif -+ -+ if (drmModeAddFB2WithModifiers(de->drm_fd, -+ av_frame_cropped_width(frame), -+ av_frame_cropped_height(frame), -+ desc->layers[0].format, bo_handles, -+ pitches, offsets, modifiers, -+ &da->fb_handle, DRM_MODE_FB_MODIFIERS /** 0 if no mods */) != 0) { -+ av_log(s, AV_LOG_WARNING, "drmModeAddFB2WithModifiers failed: %s\n", ERRSTR); -+ return -1; -+ } -+ } -+ -+ ret = drmModeSetPlane(de->drm_fd, de->setup.planeId, de->setup.crtcId, -+ da->fb_handle, 0, -+ de->setup.compose.x, de->setup.compose.y, -+ de->setup.compose.width, -+ de->setup.compose.height, -+ 0, 0, -+ av_frame_cropped_width(frame) << 16, -+ av_frame_cropped_height(frame) << 16); -+ -+ if (ret != 0) { -+ av_log(s, AV_LOG_WARNING, "drmModeSetPlane failed: %s\n", ERRSTR); -+ } -+ -+ de->ano = de->ano + 1 >= AUX_SIZE ? 0 : de->ano + 1; -+ -+ return ret; -+} -+ -+static int do_sem_wait(sem_t * const sem, const int nowait) -+{ -+ while (nowait ? sem_trywait(sem) : sem_wait(sem)) { -+ if (errno != EINTR) -+ return -errno; -+ } -+ return 0; -+} -+ -+static void * display_thread(void * v) -+{ -+ AVFormatContext * const s = v; -+ drm_display_env_t * const de = s->priv_data; -+ int i; -+ -+#if TRACE_ALL -+ av_log(s, AV_LOG_DEBUG, "<<< %s\n", __func__); -+#endif -+ -+ sem_post(&de->q_sem_out); -+ -+ for (;;) { -+ AVFrame * frame; -+ -+ do_sem_wait(&de->q_sem_in, 0); -+ -+ if (de->q_terminate) -+ break; -+ -+ frame = de->q_next; -+ de->q_next = NULL; -+ sem_post(&de->q_sem_out); -+ -+ do_display(s, de, frame); -+ } -+ -+#if TRACE_ALL -+ av_log(s, AV_LOG_DEBUG, ">>> %s\n", __func__); -+#endif -+ -+ for (i = 0; i != AUX_SIZE; ++i) -+ da_uninit(de, de->aux + i); -+ -+ av_frame_free(&de->q_next); -+ -+ return NULL; -+} -+ -+static int drm_vout_write_packet(AVFormatContext *s, AVPacket *pkt) -+{ -+ const AVFrame * const src_frame = (AVFrame *)pkt->data; -+ AVFrame * frame; -+ drm_display_env_t * const de = s->priv_data; -+ int ret; -+ -+#if TRACE_ALL -+ av_log(s, AV_LOG_DEBUG, "%s\n", __func__); -+#endif -+ -+ if ((src_frame->flags & AV_FRAME_FLAG_CORRUPT) != 0) { -+ av_log(s, AV_LOG_WARNING, "Discard corrupt frame: fmt=%d, ts=%" PRId64 "\n", src_frame->format, src_frame->pts); -+ return 0; -+ } -+ -+ if (src_frame->format == AV_PIX_FMT_DRM_PRIME) { -+ frame = av_frame_alloc(); -+ av_frame_ref(frame, src_frame); -+ } -+ else if (src_frame->format == AV_PIX_FMT_VAAPI) { -+ frame = av_frame_alloc(); -+ frame->format = AV_PIX_FMT_DRM_PRIME; -+ if (av_hwframe_map(frame, src_frame, 0) != 0) -+ { -+ av_log(s, AV_LOG_WARNING, "Failed to map frame (format=%d) to DRM_PRiME\n", src_frame->format); -+ av_frame_free(&frame); -+ return AVERROR(EINVAL); -+ } -+ } -+ else { -+ av_log(s, AV_LOG_WARNING, "Frame (format=%d) not DRM_PRiME\n", src_frame->format); -+ return AVERROR(EINVAL); -+ } -+ -+ ret = do_sem_wait(&de->q_sem_out, !de->show_all); -+ if (ret) { -+ av_frame_free(&frame); -+ } -+ else { -+ de->q_next = frame; -+ sem_post(&de->q_sem_in); -+ } -+ -+ return 0; -+} -+ -+static int drm_vout_write_frame(AVFormatContext *s, int stream_index, AVFrame **ppframe, -+ unsigned flags) -+{ -+#if TRACE_ALL -+ av_log(s, AV_LOG_DEBUG, "%s: idx=%d, flags=%#x\n", __func__, stream_index, flags); -+#endif -+ -+ /* drm_vout_write_header() should have accepted only supported formats */ -+ if ((flags & AV_WRITE_UNCODED_FRAME_QUERY)) -+ return 0; -+ -+ return 0; -+} -+ -+static int drm_vout_control_message(AVFormatContext *s, int type, void *data, size_t data_size) -+{ -+#if TRACE_ALL -+ av_log(s, AV_LOG_DEBUG, "%s: %d\n", __func__, type); -+#endif -+ switch(type) { -+ case AV_APP_TO_DEV_WINDOW_REPAINT: -+ return 0; -+ default: -+ break; -+ } -+ return AVERROR(ENOSYS); -+} -+ -+static int find_crtc(struct AVFormatContext * const avctx, int drmfd, struct drm_setup *s, uint32_t * const pConId) -+{ -+ int ret = -1; -+ int i; -+ drmModeRes *res = drmModeGetResources(drmfd); -+ drmModeConnector *c; -+ -+ if(!res) -+ { -+ printf( "drmModeGetResources failed: %s\n", ERRSTR); -+ return -1; -+ } -+ -+ if (res->count_crtcs <= 0) -+ { -+ printf( "drm: no crts\n"); -+ goto fail_res; -+ } -+ -+ if (!s->conId) { -+ fprintf(stderr, -+ "No connector ID specified. Choosing default from list:\n"); -+ -+ for (i = 0; i < res->count_connectors; i++) { -+ drmModeConnector *con = -+ drmModeGetConnector(drmfd, res->connectors[i]); -+ drmModeEncoder *enc = NULL; -+ drmModeCrtc *crtc = NULL; -+ -+ if (con->encoder_id) { -+ enc = drmModeGetEncoder(drmfd, con->encoder_id); -+ if (enc->crtc_id) { -+ crtc = drmModeGetCrtc(drmfd, enc->crtc_id); -+ } -+ } -+ -+ if (!s->conId && crtc) { -+ s->conId = con->connector_id; -+ s->crtcId = crtc->crtc_id; -+ } -+ -+ av_log(avctx, AV_LOG_DEBUG, "Connector %d (crtc %d): type %d, %dx%d%s\n", -+ con->connector_id, -+ crtc ? crtc->crtc_id : 0, -+ con->connector_type, -+ crtc ? crtc->width : 0, -+ crtc ? crtc->height : 0, -+ (s->conId == (int)con->connector_id ? -+ " (chosen)" : "")); -+ } -+ -+ if (!s->conId) { -+ av_log(avctx, AV_LOG_ERROR, -+ "No suitable enabled connector found.\n"); -+ return -1;; -+ } -+ } -+ -+ s->crtcIdx = -1; -+ -+ for (i = 0; i < res->count_crtcs; ++i) { -+ if (s->crtcId == res->crtcs[i]) { -+ s->crtcIdx = i; -+ break; -+ } -+ } -+ -+ if (s->crtcIdx == -1) -+ { -+ av_log(avctx, AV_LOG_WARNING, "drm: CRTC %u not found\n", s->crtcId); -+ goto fail_res; -+ } -+ -+ if (res->count_connectors <= 0) -+ { -+ av_log(avctx, AV_LOG_WARNING, "drm: no connectors\n"); -+ goto fail_res; -+ } -+ -+ c = drmModeGetConnector(drmfd, s->conId); -+ if (!c) -+ { -+ av_log(avctx, AV_LOG_WARNING, "drmModeGetConnector failed: %s\n", ERRSTR); -+ goto fail_res; -+ } -+ -+ if (!c->count_modes) -+ { -+ av_log(avctx, AV_LOG_WARNING, "connector supports no mode\n"); -+ goto fail_conn; -+ } -+ -+ { -+ drmModeCrtc *crtc = drmModeGetCrtc(drmfd, s->crtcId); -+ s->compose.x = crtc->x; -+ s->compose.y = crtc->y; -+ s->compose.width = crtc->width; -+ s->compose.height = crtc->height; -+ drmModeFreeCrtc(crtc); -+ } -+ -+ if (pConId) -+ *pConId = c->connector_id; -+ ret = 0; -+ -+fail_conn: -+ drmModeFreeConnector(c); -+ -+fail_res: -+ drmModeFreeResources(res); -+ -+ return ret; -+} -+ -+// deinit is called if init fails so no need to clean up explicity here -+static int drm_vout_init(struct AVFormatContext * s) -+{ -+ drm_display_env_t * const de = s->priv_data; -+ int rv; -+ const char * drm_module = DRM_MODULE; -+ -+ av_log(s, AV_LOG_DEBUG, "<<< %s\n", __func__); -+ -+ de->drm_fd = -1; -+ de->con_id = 0; -+ de->setup = (struct drm_setup){0}; -+ de->q_terminate = 0; -+ -+ if ((de->drm_fd = drmOpen(drm_module, NULL)) < 0) -+ { -+ rv = AVERROR(errno); -+ av_log(s, AV_LOG_ERROR, "Failed to drmOpen %s: %s\n", drm_module, av_err2str(rv)); -+ return rv; -+ } -+ -+ if (find_crtc(s, de->drm_fd, &de->setup, &de->con_id) != 0) -+ { -+ av_log(s, AV_LOG_ERROR, "failed to find valid mode\n"); -+ rv = AVERROR(EINVAL); -+ goto fail_close; -+ } -+ -+ sem_init(&de->q_sem_in, 0, 0); -+ sem_init(&de->q_sem_out, 0, 0); -+ if (pthread_create(&de->q_thread, NULL, display_thread, s)) { -+ rv = AVERROR(errno); -+ av_log(s, AV_LOG_ERROR, "Failed to creatye display thread: %s\n", av_err2str(rv)); -+ goto fail_close; -+ } -+ -+ av_log(s, AV_LOG_DEBUG, ">>> %s\n", __func__); -+ -+ return 0; -+ -+fail_close: -+ close(de->drm_fd); -+ de->drm_fd = -1; -+ av_log(s, AV_LOG_DEBUG, ">>> %s: FAIL\n", __func__); -+ -+ return rv; -+} -+ -+static void drm_vout_deinit(struct AVFormatContext * s) -+{ -+ drm_display_env_t * const de = s->priv_data; -+ -+ av_log(s, AV_LOG_DEBUG, "<<< %s\n", __func__); -+ -+ de->q_terminate = 1; -+ sem_post(&de->q_sem_in); -+ pthread_join(de->q_thread, NULL); -+ sem_destroy(&de->q_sem_in); -+ sem_destroy(&de->q_sem_out); -+ -+ for (unsigned int i = 0; i != AUX_SIZE; ++i) -+ da_uninit(de, de->aux + i); -+ -+ av_frame_free(&de->q_next); -+ -+ if (de->drm_fd >= 0) { -+ close(de->drm_fd); -+ de->drm_fd = -1; -+ } -+ -+ av_log(s, AV_LOG_DEBUG, ">>> %s\n", __func__); -+} -+ -+ -+#define OFFSET(x) offsetof(drm_display_env_t, x) -+static const AVOption options[] = { -+ { "show_all", "show all frames", OFFSET(show_all), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, AV_OPT_FLAG_ENCODING_PARAM }, -+ { NULL } -+}; -+ -+static const AVClass drm_vout_class = { -+ .class_name = "drm vid outdev", -+ .item_name = av_default_item_name, -+ .option = options, -+ .version = LIBAVUTIL_VERSION_INT, -+ .category = AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT, -+}; -+ -+AVOutputFormat ff_vout_drm_muxer = { -+ .name = "vout_drm", -+ .long_name = NULL_IF_CONFIG_SMALL("Drm video output device"), -+ .priv_data_size = sizeof(drm_display_env_t), -+ .audio_codec = AV_CODEC_ID_NONE, -+ .video_codec = AV_CODEC_ID_WRAPPED_AVFRAME, -+ .write_header = drm_vout_write_header, -+ .write_packet = drm_vout_write_packet, -+ .write_uncoded_frame = drm_vout_write_frame, -+ .write_trailer = drm_vout_write_trailer, -+ .control_message = drm_vout_control_message, -+ .flags = AVFMT_NOFILE | AVFMT_VARIABLE_FPS | AVFMT_NOTIMESTAMPS, -+ .priv_class = &drm_vout_class, -+ .init = drm_vout_init, -+ .deinit = drm_vout_deinit, -+}; -+ ---- /dev/null -+++ b/libavdevice/egl_vout.c -@@ -0,0 +1,816 @@ -+/* -+ * Copyright (c) 2020 John Cox for Raspberry Pi Trading -+ * -+ * This file is part of FFmpeg. -+ * -+ * FFmpeg is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * FFmpeg is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with FFmpeg; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+ */ -+ -+ -+// *** This module is a work in progress and its utility is strictly -+// limited to testing. -+// Amongst other issues it doesn't wait for the pic to be displayed before -+// returning the buffer so flikering does occur. -+ -+#include -+#include -+ -+#include "libavutil/opt.h" -+#include "libavutil/avassert.h" -+#include "libavutil/pixdesc.h" -+#include "libavutil/imgutils.h" -+#include "libavutil/hwcontext_drm.h" -+#include "libavformat/internal.h" -+#include "avdevice.h" -+ -+#include "pthread.h" -+#include -+#include -+#include -+ -+#include -+#include -+ -+#include "libavutil/rpi_sand_fns.h" -+ -+#define TRACE_ALL 0 -+ -+struct egl_setup { -+ int conId; -+ -+ Display *dpy; -+ EGLDisplay egl_dpy; -+ EGLContext ctx; -+ EGLSurface surf; -+ Window win; -+ -+ uint32_t crtcId; -+ int crtcIdx; -+ uint32_t planeId; -+ struct { -+ int x, y, width, height; -+ } compose; -+}; -+ -+typedef struct egl_aux_s { -+ int fd; -+ GLuint texture; -+ -+} egl_aux_t; -+ -+typedef struct egl_display_env_s -+{ -+ AVClass *class; -+ -+ struct egl_setup setup; -+ enum AVPixelFormat avfmt; -+ -+ int show_all; -+ int window_width, window_height; -+ int window_x, window_y; -+ int fullscreen; -+ -+ egl_aux_t aux[32]; -+ -+ pthread_t q_thread; -+ pthread_mutex_t q_lock; -+ sem_t display_start_sem; -+ sem_t q_sem; -+ int q_terminate; -+ AVFrame * q_this; -+ AVFrame * q_next; -+ -+} egl_display_env_t; -+ -+ -+/** -+ * Remove window border/decorations. -+ */ -+static void -+no_border( Display *dpy, Window w) -+{ -+ static const unsigned MWM_HINTS_DECORATIONS = (1 << 1); -+ static const int PROP_MOTIF_WM_HINTS_ELEMENTS = 5; -+ -+ typedef struct -+ { -+ unsigned long flags; -+ unsigned long functions; -+ unsigned long decorations; -+ long inputMode; -+ unsigned long status; -+ } PropMotifWmHints; -+ -+ PropMotifWmHints motif_hints; -+ Atom prop, proptype; -+ unsigned long flags = 0; -+ -+ /* setup the property */ -+ motif_hints.flags = MWM_HINTS_DECORATIONS; -+ motif_hints.decorations = flags; -+ -+ /* get the atom for the property */ -+ prop = XInternAtom( dpy, "_MOTIF_WM_HINTS", True ); -+ if (!prop) { -+ /* something went wrong! */ -+ return; -+ } -+ -+ /* not sure this is correct, seems to work, XA_WM_HINTS didn't work */ -+ proptype = prop; -+ -+ XChangeProperty( dpy, w, /* display, window */ -+ prop, proptype, /* property, type */ -+ 32, /* format: 32-bit datums */ -+ PropModeReplace, /* mode */ -+ (unsigned char *) &motif_hints, /* data */ -+ PROP_MOTIF_WM_HINTS_ELEMENTS /* nelements */ -+ ); -+} -+ -+ -+/* -+ * Create an RGB, double-buffered window. -+ * Return the window and context handles. -+ */ -+static int -+make_window(struct AVFormatContext * const s, -+ egl_display_env_t * const de, -+ Display *dpy, EGLDisplay egl_dpy, const char *name, -+ Window *winRet, EGLContext *ctxRet, EGLSurface *surfRet) -+{ -+ int scrnum = DefaultScreen( dpy ); -+ XSetWindowAttributes attr; -+ unsigned long mask; -+ Window root = RootWindow( dpy, scrnum ); -+ Window win; -+ EGLContext ctx; -+ const int fullscreen = de->fullscreen; -+ EGLConfig config; -+ int x = de->window_x; -+ int y = de->window_y; -+ int width = de->window_width ? de->window_width : 1280; -+ int height = de->window_height ? de->window_height : 720; -+ -+ -+ if (fullscreen) { -+ int scrnum = DefaultScreen(dpy); -+ -+ x = 0; y = 0; -+ width = DisplayWidth(dpy, scrnum); -+ height = DisplayHeight(dpy, scrnum); -+ } -+ -+ { -+ EGLint num_configs; -+ static const EGLint attribs[] = { -+ EGL_RED_SIZE, 1, -+ EGL_GREEN_SIZE, 1, -+ EGL_BLUE_SIZE, 1, -+ EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, -+ EGL_NONE -+ }; -+ -+ if (!eglChooseConfig(egl_dpy, attribs, &config, 1, &num_configs)) { -+ av_log(s, AV_LOG_ERROR, "Error: couldn't get an EGL visual config\n"); -+ return -1; -+ } -+ } -+ -+ { -+ EGLint vid; -+ if (!eglGetConfigAttrib(egl_dpy, config, EGL_NATIVE_VISUAL_ID, &vid)) { -+ av_log(s, AV_LOG_ERROR, "Error: eglGetConfigAttrib() failed\n"); -+ return -1; -+ } -+ -+ { -+ XVisualInfo visTemplate = { -+ .visualid = vid, -+ }; -+ int num_visuals; -+ XVisualInfo *visinfo = XGetVisualInfo(dpy, VisualIDMask, -+ &visTemplate, &num_visuals); -+ -+ /* window attributes */ -+ attr.background_pixel = 0; -+ attr.border_pixel = 0; -+ attr.colormap = XCreateColormap( dpy, root, visinfo->visual, AllocNone); -+ attr.event_mask = StructureNotifyMask | ExposureMask | KeyPressMask; -+ /* XXX this is a bad way to get a borderless window! */ -+ mask = CWBackPixel | CWBorderPixel | CWColormap | CWEventMask; -+ -+ win = XCreateWindow( dpy, root, x, y, width, height, -+ 0, visinfo->depth, InputOutput, -+ visinfo->visual, mask, &attr ); -+ XFree(visinfo); -+ } -+ } -+ -+ if (fullscreen) -+ no_border(dpy, win); -+ -+ /* set hints and properties */ -+ { -+ XSizeHints sizehints; -+ sizehints.x = x; -+ sizehints.y = y; -+ sizehints.width = width; -+ sizehints.height = height; -+ sizehints.flags = USSize | USPosition; -+ XSetNormalHints(dpy, win, &sizehints); -+ XSetStandardProperties(dpy, win, name, name, -+ None, (char **)NULL, 0, &sizehints); -+ } -+ -+ eglBindAPI(EGL_OPENGL_ES_API); -+ -+ { -+ static const EGLint ctx_attribs[] = { -+ EGL_CONTEXT_CLIENT_VERSION, 2, -+ EGL_NONE -+ }; -+ ctx = eglCreateContext(egl_dpy, config, EGL_NO_CONTEXT, ctx_attribs ); -+ if (!ctx) { -+ av_log(s, AV_LOG_ERROR, "Error: eglCreateContext failed\n"); -+ return -1; -+ } -+ } -+ -+ -+ XMapWindow(dpy, win); -+ -+ { -+ EGLSurface surf = eglCreateWindowSurface(egl_dpy, config, (EGLNativeWindowType)win, NULL); -+ if (!surf) { -+ av_log(s, AV_LOG_ERROR, "Error: eglCreateWindowSurface failed\n"); -+ return -1; -+ } -+ -+ if (!eglMakeCurrent(egl_dpy, surf, surf, ctx)) { -+ av_log(s, AV_LOG_ERROR, "Error: eglCreateContext failed\n"); -+ return -1; -+ } -+ -+ *winRet = win; -+ *ctxRet = ctx; -+ *surfRet = surf; -+ } -+ -+ return 0; -+} -+ -+static GLint -+compile_shader(struct AVFormatContext * const avctx, GLenum target, const char *source) -+{ -+ GLuint s = glCreateShader(target); -+ -+ if (s == 0) { -+ av_log(avctx, AV_LOG_ERROR, "Failed to create shader\n"); -+ return 0; -+ } -+ -+ glShaderSource(s, 1, (const GLchar **) &source, NULL); -+ glCompileShader(s); -+ -+ { -+ GLint ok; -+ glGetShaderiv(s, GL_COMPILE_STATUS, &ok); -+ -+ if (!ok) { -+ GLchar *info; -+ GLint size; -+ -+ glGetShaderiv(s, GL_INFO_LOG_LENGTH, &size); -+ info = malloc(size); -+ -+ glGetShaderInfoLog(s, size, NULL, info); -+ av_log(avctx, AV_LOG_ERROR, "Failed to compile shader: %ssource:\n%s\n", info, source); -+ -+ return 0; -+ } -+ } -+ -+ return s; -+} -+ -+static GLuint link_program(struct AVFormatContext * const s, GLint vs, GLint fs) -+{ -+ GLuint prog = glCreateProgram(); -+ -+ if (prog == 0) { -+ av_log(s, AV_LOG_ERROR, "Failed to create program\n"); -+ return 0; -+ } -+ -+ glAttachShader(prog, vs); -+ glAttachShader(prog, fs); -+ glLinkProgram(prog); -+ -+ { -+ GLint ok; -+ glGetProgramiv(prog, GL_LINK_STATUS, &ok); -+ if (!ok) { -+ /* Some drivers return a size of 1 for an empty log. This is the size -+ * of a log that contains only a terminating NUL character. -+ */ -+ GLint size; -+ GLchar *info = NULL; -+ glGetProgramiv(prog, GL_INFO_LOG_LENGTH, &size); -+ if (size > 1) { -+ info = malloc(size); -+ glGetProgramInfoLog(prog, size, NULL, info); -+ } -+ -+ av_log(s, AV_LOG_ERROR, "Failed to link: %s\n", -+ (info != NULL) ? info : ""); -+ return 0; -+ } -+ } -+ -+ return prog; -+} -+ -+static int -+gl_setup(struct AVFormatContext * const s) -+{ -+ const char *vs = -+ "attribute vec4 pos;\n" -+ "varying vec2 texcoord;\n" -+ "\n" -+ "void main() {\n" -+ " gl_Position = pos;\n" -+ " texcoord.x = (pos.x + 1.0) / 2.0;\n" -+ " texcoord.y = (-pos.y + 1.0) / 2.0;\n" -+ "}\n"; -+ const char *fs = -+ "#extension GL_OES_EGL_image_external : enable\n" -+ "precision mediump float;\n" -+ "uniform samplerExternalOES s;\n" -+ "varying vec2 texcoord;\n" -+ "void main() {\n" -+ " gl_FragColor = texture2D(s, texcoord);\n" -+ "}\n"; -+ -+ GLuint vs_s; -+ GLuint fs_s; -+ GLuint prog; -+ -+ if (!(vs_s = compile_shader(s, GL_VERTEX_SHADER, vs)) || -+ !(fs_s = compile_shader(s, GL_FRAGMENT_SHADER, fs)) || -+ !(prog = link_program(s, vs_s, fs_s))) -+ return -1; -+ -+ glUseProgram(prog); -+ -+ { -+ static const float verts[] = { -+ -1, -1, -+ 1, -1, -+ 1, 1, -+ -1, 1, -+ }; -+ glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, 0, verts); -+ } -+ -+ glEnableVertexAttribArray(0); -+ return 0; -+} -+ -+static int egl_vout_write_trailer(AVFormatContext *s) -+{ -+#if TRACE_ALL -+ av_log(s, AV_LOG_INFO, "%s\n", __func__); -+#endif -+ -+ return 0; -+} -+ -+static int egl_vout_write_header(AVFormatContext *s) -+{ -+ const AVCodecParameters * const par = s->streams[0]->codecpar; -+ -+#if TRACE_ALL -+ av_log(s, AV_LOG_INFO, "%s\n", __func__); -+#endif -+ if ( s->nb_streams > 1 -+ || par->codec_type != AVMEDIA_TYPE_VIDEO -+ || par->codec_id != AV_CODEC_ID_WRAPPED_AVFRAME) { -+ av_log(s, AV_LOG_ERROR, "Only supports one wrapped avframe stream\n"); -+ return AVERROR(EINVAL); -+ } -+ -+ return 0; -+} -+ -+ -+static int do_display(AVFormatContext * const s, egl_display_env_t * const de, AVFrame * const frame) -+{ -+ const AVDRMFrameDescriptor *desc = (AVDRMFrameDescriptor*)frame->data[0]; -+ egl_aux_t * da = NULL; -+ unsigned int i; -+ -+#if TRACE_ALL -+ av_log(s, AV_LOG_INFO, "<<< %s\n", __func__); -+#endif -+ -+ for (i = 0; i != 32; ++i) { -+ if (de->aux[i].fd == -1 || de->aux[i].fd == desc->objects[0].fd) { -+ da = de->aux + i; -+ break; -+ } -+ } -+ -+ if (da == NULL) { -+ av_log(s, AV_LOG_INFO, "%s: Out of handles\n", __func__); -+ return AVERROR(EINVAL); -+ } -+ -+ if (da->texture == 0) { -+ EGLint attribs[50]; -+ EGLint * a = attribs; -+ int i, j; -+ static const EGLint anames[] = { -+ EGL_DMA_BUF_PLANE0_FD_EXT, -+ EGL_DMA_BUF_PLANE0_OFFSET_EXT, -+ EGL_DMA_BUF_PLANE0_PITCH_EXT, -+ EGL_DMA_BUF_PLANE0_MODIFIER_LO_EXT, -+ EGL_DMA_BUF_PLANE0_MODIFIER_HI_EXT, -+ EGL_DMA_BUF_PLANE1_FD_EXT, -+ EGL_DMA_BUF_PLANE1_OFFSET_EXT, -+ EGL_DMA_BUF_PLANE1_PITCH_EXT, -+ EGL_DMA_BUF_PLANE1_MODIFIER_LO_EXT, -+ EGL_DMA_BUF_PLANE1_MODIFIER_HI_EXT, -+ EGL_DMA_BUF_PLANE2_FD_EXT, -+ EGL_DMA_BUF_PLANE2_OFFSET_EXT, -+ EGL_DMA_BUF_PLANE2_PITCH_EXT, -+ EGL_DMA_BUF_PLANE2_MODIFIER_LO_EXT, -+ EGL_DMA_BUF_PLANE2_MODIFIER_HI_EXT, -+ }; -+ const EGLint * b = anames; -+ -+ *a++ = EGL_WIDTH; -+ *a++ = av_frame_cropped_width(frame); -+ *a++ = EGL_HEIGHT; -+ *a++ = av_frame_cropped_height(frame); -+ *a++ = EGL_LINUX_DRM_FOURCC_EXT; -+ *a++ = desc->layers[0].format; -+ -+ for (i = 0; i < desc->nb_layers; ++i) { -+ for (j = 0; j < desc->layers[i].nb_planes; ++j) { -+ const AVDRMPlaneDescriptor * const p = desc->layers[i].planes + j; -+ const AVDRMObjectDescriptor * const obj = desc->objects + p->object_index; -+ *a++ = *b++; -+ *a++ = obj->fd; -+ *a++ = *b++; -+ *a++ = p->offset; -+ *a++ = *b++; -+ *a++ = p->pitch; -+ if (obj->format_modifier == 0) { -+ b += 2; -+ } -+ else { -+ *a++ = *b++; -+ *a++ = (EGLint)(obj->format_modifier & 0xFFFFFFFF); -+ *a++ = *b++; -+ *a++ = (EGLint)(obj->format_modifier >> 32); -+ } -+ } -+ } -+ -+ *a = EGL_NONE; -+ -+#if TRACE_ALL -+ for (a = attribs, i = 0; *a != EGL_NONE; a += 2, ++i) { -+ av_log(s, AV_LOG_INFO, "[%2d] %4x: %d\n", i, a[0], a[1]); -+ } -+#endif -+ { -+ const EGLImage image = eglCreateImageKHR(de->setup.egl_dpy, -+ EGL_NO_CONTEXT, -+ EGL_LINUX_DMA_BUF_EXT, -+ NULL, attribs); -+ if (!image) { -+ av_log(s, AV_LOG_ERROR, "Failed to import fd %d\n", desc->objects[0].fd); -+ return -1; -+ } -+ -+ glGenTextures(1, &da->texture); -+ glBindTexture(GL_TEXTURE_EXTERNAL_OES, da->texture); -+ glTexParameteri(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_MIN_FILTER, GL_LINEAR); -+ glTexParameteri(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_MAG_FILTER, GL_LINEAR); -+ glEGLImageTargetTexture2DOES(GL_TEXTURE_EXTERNAL_OES, image); -+ -+ eglDestroyImageKHR(de->setup.egl_dpy, image); -+ } -+ -+ da->fd = desc->objects[0].fd; -+ -+#if 0 -+ av_log(s, AV_LOG_INFO, "%dx%d, fmt: %x, boh=%d,%d,%d,%d, pitch=%d,%d,%d,%d," -+ " offset=%d,%d,%d,%d, mod=%llx,%llx,%llx,%llx\n", -+ av_frame_cropped_width(frame), -+ av_frame_cropped_height(frame), -+ desc->layers[0].format, -+ bo_plane_handles[0], -+ bo_plane_handles[1], -+ bo_plane_handles[2], -+ bo_plane_handles[3], -+ pitches[0], -+ pitches[1], -+ pitches[2], -+ pitches[3], -+ offsets[0], -+ offsets[1], -+ offsets[2], -+ offsets[3], -+ (long long)modifiers[0], -+ (long long)modifiers[1], -+ (long long)modifiers[2], -+ (long long)modifiers[3] -+ ); -+#endif -+ } -+ -+ glClearColor(0.5, 0.5, 0.5, 0.5); -+ glClear(GL_COLOR_BUFFER_BIT); -+ -+ glBindTexture(GL_TEXTURE_EXTERNAL_OES, da->texture); -+ glDrawArrays(GL_TRIANGLE_FAN, 0, 4); -+ eglSwapBuffers(de->setup.egl_dpy, de->setup.surf); -+ -+ glDeleteTextures(1, &da->texture); -+ da->texture = 0; -+ da->fd = -1; -+ -+ return 0; -+} -+ -+static void * display_thread(void * v) -+{ -+ AVFormatContext * const s = v; -+ egl_display_env_t * const de = s->priv_data; -+ -+#if TRACE_ALL -+ av_log(s, AV_LOG_INFO, "<<< %s\n", __func__); -+#endif -+ { -+ EGLint egl_major, egl_minor; -+ -+ de->setup.dpy = XOpenDisplay(NULL); -+ if (!de->setup.dpy) { -+ av_log(s, AV_LOG_ERROR, "Couldn't open X display\n"); -+ goto fail; -+ } -+ -+ de->setup.egl_dpy = eglGetDisplay(de->setup.dpy); -+ if (!de->setup.egl_dpy) { -+ av_log(s, AV_LOG_ERROR, "eglGetDisplay() failed\n"); -+ goto fail; -+ } -+ -+ if (!eglInitialize(de->setup.egl_dpy, &egl_major, &egl_minor)) { -+ av_log(s, AV_LOG_ERROR, "Error: eglInitialize() failed\n"); -+ goto fail; -+ } -+ -+ av_log(s, AV_LOG_INFO, "EGL version %d.%d\n", egl_major, egl_minor); -+ -+ if (!epoxy_has_egl_extension(de->setup.egl_dpy, "EGL_KHR_image_base")) { -+ av_log(s, AV_LOG_ERROR, "Missing EGL KHR image extension\n"); -+ goto fail; -+ } -+ } -+ -+ if (!de->window_width || !de->window_height) { -+ de->window_width = 1280; -+ de->window_height = 720; -+ } -+ if (make_window(s, de, de->setup.dpy, de->setup.egl_dpy, "ffmpeg-vout", -+ &de->setup.win, &de->setup.ctx, &de->setup.surf)) { -+ av_log(s, AV_LOG_ERROR, "%s: make_window failed\n", __func__); -+ goto fail; -+ } -+ -+ if (gl_setup(s)) { -+ av_log(s, AV_LOG_ERROR, "%s: gl_setup failed\n", __func__); -+ goto fail; -+ } -+ -+#if TRACE_ALL -+ av_log(s, AV_LOG_INFO, "--- %s: Start done\n", __func__); -+#endif -+ sem_post(&de->display_start_sem); -+ -+ for (;;) { -+ AVFrame * frame; -+ -+ while (sem_wait(&de->q_sem) != 0) { -+ av_assert0(errno == EINTR); -+ } -+ -+ if (de->q_terminate) -+ break; -+ -+ pthread_mutex_lock(&de->q_lock); -+ frame = de->q_next; -+ de->q_next = NULL; -+ pthread_mutex_unlock(&de->q_lock); -+ -+ do_display(s, de, frame); -+ -+ av_frame_free(&de->q_this); -+ de->q_this = frame; -+ } -+ -+#if TRACE_ALL -+ av_log(s, AV_LOG_INFO, ">>> %s\n", __func__); -+#endif -+ -+ return NULL; -+ -+fail: -+#if TRACE_ALL -+ av_log(s, AV_LOG_INFO, ">>> %s: FAIL\n", __func__); -+#endif -+ de->q_terminate = 1; -+ sem_post(&de->display_start_sem); -+ -+ return NULL; -+} -+ -+static int egl_vout_write_packet(AVFormatContext *s, AVPacket *pkt) -+{ -+ const AVFrame * const src_frame = (AVFrame *)pkt->data; -+ AVFrame * frame; -+ egl_display_env_t * const de = s->priv_data; -+ -+#if TRACE_ALL -+ av_log(s, AV_LOG_INFO, "%s\n", __func__); -+#endif -+ -+ if (src_frame->format == AV_PIX_FMT_DRM_PRIME) { -+ frame = av_frame_alloc(); -+ av_frame_ref(frame, src_frame); -+ } -+ else if (src_frame->format == AV_PIX_FMT_VAAPI) { -+ frame = av_frame_alloc(); -+ frame->format = AV_PIX_FMT_DRM_PRIME; -+ if (av_hwframe_map(frame, src_frame, 0) != 0) -+ { -+ av_log(s, AV_LOG_WARNING, "Failed to map frame (format=%d) to DRM_PRiME\n", src_frame->format); -+ av_frame_free(&frame); -+ return AVERROR(EINVAL); -+ } -+ } -+ else { -+ av_log(s, AV_LOG_WARNING, "Frame (format=%d) not DRM_PRiME\n", src_frame->format); -+ return AVERROR(EINVAL); -+ } -+ -+ // Really hacky sync -+ while (de->show_all && de->q_next) { -+ usleep(3000); -+ } -+ -+ pthread_mutex_lock(&de->q_lock); -+ { -+ AVFrame * const t = de->q_next; -+ de->q_next = frame; -+ frame = t; -+ } -+ pthread_mutex_unlock(&de->q_lock); -+ -+ if (frame == NULL) -+ sem_post(&de->q_sem); -+ else -+ av_frame_free(&frame); -+ -+ return 0; -+} -+ -+static int egl_vout_write_frame(AVFormatContext *s, int stream_index, AVFrame **ppframe, -+ unsigned flags) -+{ -+#if TRACE_ALL -+ av_log(s, AV_LOG_INFO, "%s: idx=%d, flags=%#x\n", __func__, stream_index, flags); -+#endif -+ -+ /* egl_vout_write_header() should have accepted only supported formats */ -+ if ((flags & AV_WRITE_UNCODED_FRAME_QUERY)) -+ return 0; -+ -+ return 0; -+} -+ -+static int egl_vout_control_message(AVFormatContext *s, int type, void *data, size_t data_size) -+{ -+#if TRACE_ALL -+ av_log(s, AV_LOG_INFO, "%s: %d\n", __func__, type); -+#endif -+ switch(type) { -+ case AV_APP_TO_DEV_WINDOW_REPAINT: -+ return 0; -+ default: -+ break; -+ } -+ return AVERROR(ENOSYS); -+} -+ -+// deinit is called if init fails so no need to clean up explicity here -+static int egl_vout_init(struct AVFormatContext * s) -+{ -+ egl_display_env_t * const de = s->priv_data; -+ unsigned int i; -+ -+ av_log(s, AV_LOG_DEBUG, "<<< %s\n", __func__); -+ -+ de->setup = (struct egl_setup){0}; -+ -+ for (i = 0; i != 32; ++i) { -+ de->aux[i].fd = -1; -+ } -+ -+ de->q_terminate = 0; -+ pthread_mutex_init(&de->q_lock, NULL); -+ sem_init(&de->q_sem, 0, 0); -+ sem_init(&de->display_start_sem, 0, 0); -+ av_assert0(pthread_create(&de->q_thread, NULL, display_thread, s) == 0); -+ -+ sem_wait(&de->display_start_sem); -+ if (de->q_terminate) { -+ av_log(s, AV_LOG_ERROR, "%s: Display startup failure\n", __func__); -+ return -1; -+ } -+ -+ av_log(s, AV_LOG_DEBUG, ">>> %s\n", __func__); -+ -+ return 0; -+} -+ -+static void egl_vout_deinit(struct AVFormatContext * s) -+{ -+ egl_display_env_t * const de = s->priv_data; -+ -+ av_log(s, AV_LOG_DEBUG, "<<< %s\n", __func__); -+ -+ de->q_terminate = 1; -+ sem_post(&de->q_sem); -+ pthread_join(de->q_thread, NULL); -+ sem_destroy(&de->q_sem); -+ pthread_mutex_destroy(&de->q_lock); -+ -+ av_frame_free(&de->q_next); -+ av_frame_free(&de->q_this); -+ -+ av_log(s, AV_LOG_DEBUG, ">>> %s\n", __func__); -+} -+ -+#define OFFSET(x) offsetof(egl_display_env_t, x) -+static const AVOption options[] = { -+ { "show_all", "show all frames", OFFSET(show_all), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, AV_OPT_FLAG_ENCODING_PARAM }, -+ { "window_size", "set window forced size", OFFSET(window_width), AV_OPT_TYPE_IMAGE_SIZE, {.str = NULL}, 0, 0, AV_OPT_FLAG_ENCODING_PARAM }, -+ { "window_x", "set window x offset", OFFSET(window_x), AV_OPT_TYPE_INT, {.i64 = 0 }, -INT_MAX, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM }, -+ { "window_y", "set window y offset", OFFSET(window_y), AV_OPT_TYPE_INT, {.i64 = 0 }, -INT_MAX, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM }, -+ { "fullscreen", "set fullscreen display", OFFSET(fullscreen), AV_OPT_TYPE_BOOL, {.i64 = 0 }, 0, 1, AV_OPT_FLAG_ENCODING_PARAM }, -+ { NULL } -+ -+}; -+ -+static const AVClass egl_vout_class = { -+ .class_name = "egl vid outdev", -+ .item_name = av_default_item_name, -+ .option = options, -+ .version = LIBAVUTIL_VERSION_INT, -+ .category = AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT, -+}; -+ -+AVOutputFormat ff_vout_egl_muxer = { -+ .name = "vout_egl", -+ .long_name = NULL_IF_CONFIG_SMALL("Egl video output device"), -+ .priv_data_size = sizeof(egl_display_env_t), -+ .audio_codec = AV_CODEC_ID_NONE, -+ .video_codec = AV_CODEC_ID_WRAPPED_AVFRAME, -+ .write_header = egl_vout_write_header, -+ .write_packet = egl_vout_write_packet, -+ .write_uncoded_frame = egl_vout_write_frame, -+ .write_trailer = egl_vout_write_trailer, -+ .control_message = egl_vout_control_message, -+ .flags = AVFMT_NOFILE | AVFMT_VARIABLE_FPS | AVFMT_NOTIMESTAMPS, -+ .priv_class = &egl_vout_class, -+ .init = egl_vout_init, -+ .deinit = egl_vout_deinit, -+}; -+ ---- /dev/null -+++ b/libavdevice/rpi_vout.c -@@ -0,0 +1,534 @@ -+/* -+ * Copyright (c) 2013 Jeff Moguillansky -+ * -+ * This file is part of FFmpeg. -+ * -+ * FFmpeg is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * FFmpeg is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with FFmpeg; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+ */ -+ -+/** -+ * @file -+ * XVideo output device -+ * -+ * TODO: -+ * - add support to more formats -+ */ -+ -+#include "libavutil/opt.h" -+#include "libavutil/avassert.h" -+#include "libavutil/pixdesc.h" -+#include "libavutil/imgutils.h" -+#include "libavformat/internal.h" -+#include "avdevice.h" -+ -+#include -+#include -+ -+#pragma GCC diagnostic push -+// Many many redundant decls in the header files -+#pragma GCC diagnostic ignored "-Wredundant-decls" -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#pragma GCC diagnostic pop -+#include "libavutil/rpi_sand_fns.h" -+#include "libavcodec/rpi_zc.h" -+ -+#define TRACE_ALL 0 -+ -+#define DISPLAY_PORT_DEPTH 4 -+ -+typedef struct rpi_display_env_s -+{ -+ AVClass *class; -+ -+ MMAL_COMPONENT_T* display; -+ MMAL_COMPONENT_T* isp; -+ MMAL_PORT_T * port_in; // Input port of either isp or display depending on pipe setup -+ MMAL_CONNECTION_T * conn; -+ -+ MMAL_POOL_T *rpi_pool; -+ volatile int rpi_display_count; -+ -+ MMAL_FOURCC_T req_fmt; -+ MMAL_VIDEO_FORMAT_T req_vfmt; -+ -+ AVZcEnvPtr zc; -+ -+ int window_width, window_height; -+ int window_x, window_y; -+ int layer, fullscreen; -+ int show_all; -+} rpi_display_env_t; -+ -+ -+static void display_cb_input(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer) { -+ mmal_buffer_header_release(buffer); -+} -+ -+static void display_cb_control(MMAL_PORT_T *port,MMAL_BUFFER_HEADER_T *buffer) { -+ mmal_buffer_header_release(buffer); -+} -+ -+ -+static MMAL_FOURCC_T mmfmt_from_avfmt(const enum AVPixelFormat fmt) -+{ -+ switch (fmt) { -+ case AV_PIX_FMT_SAND128: -+ case AV_PIX_FMT_RPI4_8: -+ return MMAL_ENCODING_YUVUV128; -+ case AV_PIX_FMT_RPI4_10: -+ return MMAL_ENCODING_YUV10_COL; -+ case AV_PIX_FMT_SAND64_10: -+ return MMAL_ENCODING_YUVUV64_10; -+ case AV_PIX_FMT_SAND64_16: -+ return MMAL_ENCODING_YUVUV64_16; -+ case AV_PIX_FMT_YUV420P: -+ return MMAL_ENCODING_I420; -+ -+ default: -+ break; -+ } -+ return 0; -+} -+ -+ -+static void video_format_from_zc_frame(MMAL_ES_FORMAT_T* const es_fmt, -+ const AVFrame * const frame, const AVRpiZcRefPtr fr_ref) -+{ -+ MMAL_VIDEO_FORMAT_T *const vfmt = &es_fmt->es->video; -+ const AVRpiZcFrameGeometry * geo = av_rpi_zc_geometry(fr_ref); -+ if (av_rpi_is_sand_format(geo->format)) { -+ // Sand formats are a bit "special" -+ // stride1 implicit in format -+ // width = stride2 -+ vfmt->width = geo->stripe_is_yc ? -+ geo->height_y + geo->height_c : geo->height_y; -+// es->height = geo->video_height; //*** When we get the FLAG this will change -+ vfmt->height = geo->height_y; -+ es_fmt->flags = MMAL_ES_FORMAT_FLAG_COL_FMTS_WIDTH_IS_COL_STRIDE; -+ } -+ else { -+ vfmt->width = geo->stride_y / geo->bytes_per_pel; -+ vfmt->height = geo->height_y; -+ es_fmt->flags = 0; -+ } -+ -+ es_fmt->type = MMAL_ES_TYPE_VIDEO; -+ es_fmt->encoding = mmfmt_from_avfmt(geo->format); -+ es_fmt->encoding_variant = 0; -+ es_fmt->bitrate = 0; -+ -+ vfmt->crop.x = frame->crop_left; -+ vfmt->crop.y = frame->crop_top; -+ vfmt->crop.width = av_frame_cropped_width(frame); -+ vfmt->crop.height = av_frame_cropped_height(frame); -+ -+ vfmt->frame_rate.den = 0; // Don't think I know it here -+ vfmt->frame_rate.num = 0; -+ -+ vfmt->par.den = frame->sample_aspect_ratio.den; -+ vfmt->par.num = frame->sample_aspect_ratio.num; -+ -+ vfmt->color_space = 0; // Unknown currently -+} -+ -+static MMAL_BOOL_T buf_release_cb(MMAL_BUFFER_HEADER_T * buf, void *userdata) -+{ -+ rpi_display_env_t * const de = userdata; -+ if (buf->user_data != NULL) { -+ av_rpi_zc_unref((AVRpiZcRefPtr)buf->user_data); -+ buf->user_data = NULL; -+ } -+ atomic_fetch_add(&de->rpi_display_count, -1); -+ return MMAL_FALSE; -+} -+ -+static inline int avfmt_needs_isp(const enum AVPixelFormat avfmt) -+{ -+ return avfmt == AV_PIX_FMT_SAND64_10; -+} -+ -+static void isp_remove(AVFormatContext * const s, rpi_display_env_t * const de) -+{ -+ if (de->isp != NULL) -+ { -+ if (de->isp->input[0]->is_enabled) -+ mmal_port_disable(de->isp->input[0]); -+ if (de->isp->control->is_enabled) -+ mmal_port_disable(de->isp->control); -+ } -+ if (de->conn != NULL) { -+ mmal_connection_destroy(de->conn); -+ de->conn = NULL; -+ } -+ if (de->isp != NULL) { -+ mmal_component_destroy(de->isp); -+ de->isp = NULL; -+ } -+} -+ -+static void display_frame(AVFormatContext * const s, rpi_display_env_t * const de, const AVFrame* const fr) -+{ -+ MMAL_BUFFER_HEADER_T* buf = NULL; -+ AVRpiZcRefPtr fr_buf = NULL; -+ -+ if (de == NULL) -+ return; -+ -+ if (atomic_load(&de->rpi_display_count) >= DISPLAY_PORT_DEPTH - 1) { -+ av_log(s, AV_LOG_VERBOSE, "Frame dropped\n"); -+ return; -+ } -+ -+ if ((fr_buf = av_rpi_zc_ref(s, de->zc, fr, fr->format, 1)) == NULL) { -+ return; -+ } -+ -+ buf = mmal_queue_get(de->rpi_pool->queue); -+ if (!buf) { -+ // Running too fast so drop the frame (unexpected) -+ goto fail; -+ } -+ -+ buf->cmd = 0; -+ buf->offset = 0; -+ buf->flags = 0; -+ mmal_buffer_header_reset(buf); -+ -+ atomic_fetch_add(&de->rpi_display_count, 1); // Deced on release -+ mmal_buffer_header_pre_release_cb_set(buf, buf_release_cb, de); -+ -+ buf->user_data = fr_buf; -+ buf->data = (uint8_t *)av_rpi_zc_vc_handle(fr_buf); // Cast our handle to a pointer for mmal -+ buf->offset = av_rpi_zc_offset(fr_buf); -+ buf->length = av_rpi_zc_length(fr_buf); -+ buf->alloc_size = av_rpi_zc_numbytes(fr_buf); -+ -+ while (de->show_all && atomic_load(&de->rpi_display_count) >= DISPLAY_PORT_DEPTH - 1) { -+ usleep(5000); -+ } -+ -+ { -+ MMAL_ES_SPECIFIC_FORMAT_T new_ess = {.video = {0}}; -+ MMAL_ES_FORMAT_T new_es = {.es = &new_ess}; -+ MMAL_VIDEO_FORMAT_T * const new_vfmt = &new_ess.video; -+ -+ video_format_from_zc_frame(&new_es, fr, fr_buf); -+ if (de->req_fmt != new_es.encoding || -+ de->req_vfmt.width != new_vfmt->width || -+ de->req_vfmt.height != new_vfmt->height || -+ de->req_vfmt.crop.x != new_vfmt->crop.x || -+ de->req_vfmt.crop.y != new_vfmt->crop.y || -+ de->req_vfmt.crop.width != new_vfmt->crop.width || -+ de->req_vfmt.crop.height != new_vfmt->crop.height) { -+ // Something has changed -+ -+ // If we have an ISP tear it down -+ isp_remove(s, de); -+ de->port_in = de->display->input[0]; -+ -+ // If we still need an ISP create it now -+ if (avfmt_needs_isp(fr->format)) -+ { -+ if (mmal_component_create("vc.ril.isp", &de->isp) != MMAL_SUCCESS) -+ { -+ av_log(s, AV_LOG_ERROR, "ISP creation failed\n"); -+ goto fail; -+ } -+ de->port_in = de->isp->input[0]; -+ } -+ -+ mmal_format_copy(de->port_in->format, &new_es); -+ -+ if (mmal_port_format_commit(de->port_in)) { -+ av_log(s, AV_LOG_ERROR, "Failed to commit input format\n"); -+ goto fail; -+ } -+ -+ // If we have an ISP then we must want to use it -+ if (de->isp != NULL) { -+ MMAL_PORT_T * const port_out = de->isp->output[0]; -+ MMAL_VIDEO_FORMAT_T* vfmt_in = &de->port_in->format->es->video; -+ MMAL_VIDEO_FORMAT_T* vfmt_out = &port_out->format->es->video; -+ -+ port_out->format->type = MMAL_ES_TYPE_VIDEO; -+ port_out->format->encoding = MMAL_ENCODING_YUVUV128; -+ port_out->format->encoding_variant = 0; -+ port_out->format->bitrate = 0; -+ port_out->format->flags = 0; -+ port_out->format->extradata = NULL; -+ port_out->format->extradata_size = 0; -+ -+ vfmt_out->width = (vfmt_in->crop.width + 31) & ~31; -+ vfmt_out->height = (vfmt_in->crop.height + 15) & ~15; -+ vfmt_out->crop.x = 0; -+ vfmt_out->crop.y = 0; -+ vfmt_out->crop.width = vfmt_in->crop.width; -+ vfmt_out->crop.height = vfmt_in->crop.height; -+ vfmt_out->frame_rate = vfmt_in->frame_rate; -+ vfmt_out->par = vfmt_in->par; -+ vfmt_out->color_space = vfmt_in->color_space; -+ -+ if (mmal_port_format_commit(port_out)) { -+ av_log(s, AV_LOG_ERROR, "Failed to commit output format\n"); -+ goto fail; -+ } -+ -+ if (mmal_connection_create(&de->conn, port_out, de->display->input[0], MMAL_CONNECTION_FLAG_TUNNELLING) != MMAL_SUCCESS) { -+ av_log(s, AV_LOG_ERROR, "Failed to create connection\n"); -+ goto fail; -+ } -+ if (mmal_connection_enable(de->conn) != MMAL_SUCCESS) { -+ av_log(s, AV_LOG_ERROR, "Failed to enable connection\n"); -+ goto fail; -+ } -+ mmal_port_enable(de->isp->control,display_cb_control); -+ mmal_component_enable(de->isp); -+ } -+ -+ // Number of slots in my port Q -+ de->port_in->buffer_num = DISPLAY_PORT_DEPTH; -+ // Size to keep it happy - isn't used for anything other than error checking -+ de->port_in->buffer_size = buf->alloc_size; -+ if (!de->port_in->is_enabled) -+ { -+ mmal_port_parameter_set_boolean(de->port_in, MMAL_PARAMETER_ZERO_COPY, MMAL_TRUE); // Does this mark that the buffer contains a vc_handle? Would have expected a vc_image? -+ if (mmal_port_enable(de->port_in, display_cb_input) != MMAL_SUCCESS) { -+ av_log(s, AV_LOG_ERROR, "Failed to enable input port\n"); -+ goto fail; -+ } -+ } -+ -+ de->req_fmt = new_es.encoding; -+ de->req_vfmt = *new_vfmt; -+ } -+ } -+ -+ if (mmal_port_send_buffer(de->port_in, buf) != MMAL_SUCCESS) -+ { -+ av_log(s, AV_LOG_ERROR, "mmal_port_send_buffer failed: depth=%d\n", de->rpi_display_count); -+ goto fail; -+ } -+ return; -+ -+fail: -+ // If we have a buf then fr_buf is held by that -+ if (buf != NULL) -+ mmal_buffer_header_release(buf); -+ else if (fr_buf != NULL) -+ av_rpi_zc_unref(fr_buf); -+} -+ -+ -+static int xv_write_trailer(AVFormatContext *s) -+{ -+ rpi_display_env_t * const de = s->priv_data; -+#if TRACE_ALL -+ av_log(s, AV_LOG_INFO, "%s\n", __func__); -+#endif -+ if (de->port_in != NULL && de->port_in->is_enabled) { -+ mmal_port_disable(de->port_in); -+ } -+ -+ // The above disable should kick out all buffers - check that -+ if (atomic_load(&de->rpi_display_count) != 0) { -+ av_log(s, AV_LOG_WARNING, "Exiting with display count non-zero:%d\n", atomic_load(&de->rpi_display_count)); -+ } -+ -+ isp_remove(s, de); -+ if (de->rpi_pool != NULL) { -+ mmal_pool_destroy(de->rpi_pool); -+ de->rpi_pool = NULL; -+ } -+ if (de->display != NULL) { -+ mmal_component_destroy(de->display); -+ de->display = NULL; -+ } -+ -+ return 0; -+} -+ -+static int xv_write_header(AVFormatContext *s) -+{ -+ rpi_display_env_t * const de = s->priv_data; -+ const AVCodecParameters * const par = s->streams[0]->codecpar; -+ const unsigned int w = de->window_width ? de->window_width : par->width; -+ const unsigned int h = de->window_height ? de->window_height : par->height; -+ const unsigned int x = de->window_x; -+ const unsigned int y = de->window_y; -+ const int layer = de->layer ? de->layer : 2; -+ const MMAL_BOOL_T fullscreen = de->fullscreen; -+ -+#if TRACE_ALL -+ av_log(s, AV_LOG_INFO, "%s: %dx%d\n", __func__, w, h); -+#endif -+ if ( s->nb_streams > 1 -+ || par->codec_type != AVMEDIA_TYPE_VIDEO -+ || par->codec_id != AV_CODEC_ID_WRAPPED_AVFRAME) { -+ av_log(s, AV_LOG_ERROR, "Only supports one wrapped avframe stream\n"); -+ return AVERROR(EINVAL); -+ } -+ -+ { -+ MMAL_DISPLAYREGION_T region = -+ { -+ .hdr = {MMAL_PARAMETER_DISPLAYREGION, sizeof(region)}, -+ .set = MMAL_DISPLAY_SET_LAYER | MMAL_DISPLAY_SET_FULLSCREEN | -+ MMAL_DISPLAY_SET_DEST_RECT | MMAL_DISPLAY_SET_ALPHA, -+ .layer = layer, -+ .fullscreen = fullscreen, -+ .dest_rect = {x, y, w, h}, -+ .alpha = !fullscreen ? 0xff : 0xff | MMAL_DISPLAY_ALPHA_FLAGS_DISCARD_LOWER_LAYERS, -+ }; -+ -+ bcm_host_init(); // Needs to be done by someone... -+ -+ if (mmal_component_create(MMAL_COMPONENT_DEFAULT_VIDEO_RENDERER, &de->display) != MMAL_SUCCESS) -+ { -+ av_log(s, AV_LOG_ERROR, "Failed to create display component\n"); -+ goto fail; -+ } -+ de->port_in = de->display->input[0]; -+ -+ mmal_port_parameter_set(de->display->input[0], ®ion.hdr); -+ -+ if (mmal_component_enable(de->display) != MMAL_SUCCESS) -+ { -+ av_log(s, AV_LOG_ERROR, "Failed to enable display component\n"); -+ goto fail; -+ } -+ if (mmal_port_enable(de->display->control,display_cb_control) != MMAL_SUCCESS) -+ { -+ av_log(s, AV_LOG_ERROR, "Failed to enable display control port\n"); -+ goto fail; -+ } -+ -+ if ((de->rpi_pool = mmal_pool_create(DISPLAY_PORT_DEPTH, 0)) == NULL) -+ { -+ av_log(s, AV_LOG_ERROR, "Failed to create pool\n"); -+ goto fail; -+ } -+ } -+ -+ return 0; -+ -+fail: -+ xv_write_trailer(s); -+ return AVERROR_UNKNOWN; -+} -+ -+static int xv_write_packet(AVFormatContext *s, AVPacket *pkt) -+{ -+ AVFrame * const frame = (AVFrame *)pkt->data; -+#if TRACE_ALL -+ av_log(s, AV_LOG_INFO, "%s\n", __func__); -+#endif -+ display_frame(s, s->priv_data, frame); -+ return 0; -+} -+ -+static int xv_write_frame(AVFormatContext *s, int stream_index, AVFrame **ppframe, -+ unsigned flags) -+{ -+#if TRACE_ALL -+ av_log(s, AV_LOG_INFO, "%s: idx=%d, flags=%#x\n", __func__, stream_index, flags); -+#endif -+ -+ /* xv_write_header() should have accepted only supported formats */ -+ if ((flags & AV_WRITE_UNCODED_FRAME_QUERY)) -+ return 0; -+// return write_picture(s, (*frame)->data, (*frame)->linesize); -+ -+ display_frame(s, s->priv_data, *ppframe); -+ return 0; -+} -+ -+static int xv_control_message(AVFormatContext *s, int type, void *data, size_t data_size) -+{ -+#if TRACE_ALL -+ av_log(s, AV_LOG_INFO, "%s: %d\n", __func__, type); -+#endif -+ switch(type) { -+ case AV_APP_TO_DEV_WINDOW_REPAINT: -+ return 0; -+ default: -+ break; -+ } -+ return AVERROR(ENOSYS); -+} -+ -+// deinit is called if init fails so no need to clean up explicity here -+static int rpi_vout_init(struct AVFormatContext * s) -+{ -+ rpi_display_env_t * const de = s->priv_data; -+ -+ // Get a ZC context in case we need one - has little overhead if unused -+ if ((de->zc = av_rpi_zc_int_env_alloc(s)) == NULL) -+ return 1; -+ -+ return 0; -+} -+ -+static void rpi_vout_deinit(struct AVFormatContext * s) -+{ -+ rpi_display_env_t * const de = s->priv_data; -+ -+ av_rpi_zc_int_env_freep(&de->zc); -+} -+ -+ -+#define OFFSET(x) offsetof(rpi_display_env_t, x) -+static const AVOption options[] = { -+ { "show_all", "show all frames", OFFSET(show_all), AV_OPT_TYPE_BOOL, {.i64 = 0 }, 0, 1, AV_OPT_FLAG_ENCODING_PARAM }, -+ { "window_size", "set window forced size", OFFSET(window_width), AV_OPT_TYPE_IMAGE_SIZE, {.str = NULL}, 0, 0, AV_OPT_FLAG_ENCODING_PARAM }, -+ { "window_x", "set window x offset", OFFSET(window_x), AV_OPT_TYPE_INT, {.i64 = 0 }, -INT_MAX, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM }, -+ { "window_y", "set window y offset", OFFSET(window_y), AV_OPT_TYPE_INT, {.i64 = 0 }, -INT_MAX, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM }, -+ { "display_layer","set display layer", OFFSET(layer), AV_OPT_TYPE_INT, {.i64 = 0 }, -INT_MAX, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM }, -+ { "fullscreen", "set fullscreen display", OFFSET(fullscreen), AV_OPT_TYPE_BOOL, {.i64 = 0 }, 0, 1, AV_OPT_FLAG_ENCODING_PARAM }, -+ { NULL } -+ -+}; -+ -+static const AVClass xv_class = { -+ .class_name = "rpi vid outdev", -+ .item_name = av_default_item_name, -+ .option = options, -+ .version = LIBAVUTIL_VERSION_INT, -+ .category = AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT, -+}; -+ -+AVOutputFormat ff_vout_rpi_muxer = { -+ .name = "vout_rpi", -+ .long_name = NULL_IF_CONFIG_SMALL("Rpi (mmal) video output device"), -+ .priv_data_size = sizeof(rpi_display_env_t), -+ .audio_codec = AV_CODEC_ID_NONE, -+ .video_codec = AV_CODEC_ID_WRAPPED_AVFRAME, -+ .write_header = xv_write_header, -+ .write_packet = xv_write_packet, -+ .write_uncoded_frame = xv_write_frame, -+ .write_trailer = xv_write_trailer, -+ .control_message = xv_control_message, -+ .flags = AVFMT_NOFILE | AVFMT_VARIABLE_FPS | AVFMT_NOTIMESTAMPS, -+ .priv_class = &xv_class, -+ .init = rpi_vout_init, -+ .deinit = rpi_vout_deinit, -+}; ---- a/libavfilter/Makefile -+++ b/libavfilter/Makefile -@@ -218,6 +218,7 @@ OBJS-$(CONFIG_DEFLATE_FILTER) - OBJS-$(CONFIG_DEFLICKER_FILTER) += vf_deflicker.o - OBJS-$(CONFIG_DEINTERLACE_QSV_FILTER) += vf_deinterlace_qsv.o - OBJS-$(CONFIG_DEINTERLACE_VAAPI_FILTER) += vf_deinterlace_vaapi.o vaapi_vpp.o -+OBJS-$(CONFIG_DEINTERLACE_V4L2M2M_FILTER) += vf_deinterlace_v4l2m2m.o - OBJS-$(CONFIG_DEJUDDER_FILTER) += vf_dejudder.o - OBJS-$(CONFIG_DELOGO_FILTER) += vf_delogo.o - OBJS-$(CONFIG_DENOISE_VAAPI_FILTER) += vf_misc_vaapi.o vaapi_vpp.o -@@ -434,6 +435,7 @@ OBJS-$(CONFIG_TRANSPOSE_OPENCL_FILTER) - OBJS-$(CONFIG_TRANSPOSE_VAAPI_FILTER) += vf_transpose_vaapi.o vaapi_vpp.o - OBJS-$(CONFIG_TRIM_FILTER) += trim.o - OBJS-$(CONFIG_UNPREMULTIPLY_FILTER) += vf_premultiply.o framesync.o -+OBJS-$(CONFIG_UNSAND_FILTER) += vf_unsand.o - OBJS-$(CONFIG_UNSHARP_FILTER) += vf_unsharp.o - OBJS-$(CONFIG_UNSHARP_OPENCL_FILTER) += vf_unsharp_opencl.o opencl.o \ - opencl/unsharp.o ---- a/libavfilter/allfilters.c -+++ b/libavfilter/allfilters.c -@@ -204,6 +204,7 @@ extern AVFilter ff_vf_dedot; - extern AVFilter ff_vf_deflate; - extern AVFilter ff_vf_deflicker; - extern AVFilter ff_vf_deinterlace_qsv; -+extern AVFilter ff_vf_deinterlace_v4l2m2m; - extern AVFilter ff_vf_deinterlace_vaapi; - extern AVFilter ff_vf_dejudder; - extern AVFilter ff_vf_delogo; -@@ -414,6 +415,7 @@ extern AVFilter ff_vf_transpose_opencl; - extern AVFilter ff_vf_transpose_vaapi; - extern AVFilter ff_vf_trim; - extern AVFilter ff_vf_unpremultiply; -+extern AVFilter ff_vf_unsand; - extern AVFilter ff_vf_unsharp; - extern AVFilter ff_vf_unsharp_opencl; - extern AVFilter ff_vf_untile; ---- a/libavfilter/avfiltergraph.c -+++ b/libavfilter/avfiltergraph.c -@@ -32,6 +32,9 @@ - #include "libavutil/internal.h" - #include "libavutil/opt.h" - #include "libavutil/pixdesc.h" -+#if CONFIG_UNSAND_FILTER -+#include "libavutil/rpi_sand_fns.h" -+#endif - - #define FF_INTERNAL_FIELDS 1 - #include "framequeue.h" -@@ -427,6 +430,19 @@ static int can_merge_formats(AVFilterFor - } - } - -+#if CONFIG_UNSAND_FILTER -+static int has_sand_format(const AVFilterFormats * const ff) -+{ -+ int i; -+ for (i = 0; i != ff->nb_formats; ++i) { -+ if (av_rpi_is_sand_format(ff->formats[i])) { -+ return 1; -+ } -+ } -+ return 0; -+} -+#endif -+ - /** - * Perform one round of query_formats() and merging formats lists on the - * filter graph. -@@ -467,6 +483,7 @@ static int query_formats(AVFilterGraph * - for (j = 0; j < filter->nb_inputs; j++) { - AVFilterLink *link = filter->inputs[j]; - int convert_needed = 0; -+ unsigned int extra_convert_tried = 0; - - if (!link) - continue; -@@ -514,11 +531,14 @@ static int query_formats(AVFilterGraph * - ) - #undef MERGE_DISPATCH - -- if (convert_needed) { -+ while (convert_needed) { - AVFilterContext *convert; - const AVFilter *filter; - AVFilterLink *inlink, *outlink; - char inst_name[30]; -+ int can_retry = 0; -+ -+ convert_needed = 0; - - if (graph->disable_auto_convert) { - av_log(log_ctx, AV_LOG_ERROR, -@@ -531,19 +551,45 @@ static int query_formats(AVFilterGraph * - /* couldn't merge format lists. auto-insert conversion filter */ - switch (link->type) { - case AVMEDIA_TYPE_VIDEO: -- if (!(filter = avfilter_get_by_name("scale"))) { -- av_log(log_ctx, AV_LOG_ERROR, "'scale' filter " -- "not present, cannot convert pixel formats.\n"); -- return AVERROR(EINVAL); -- } -- -- snprintf(inst_name, sizeof(inst_name), "auto_scaler_%d", -- scaler_count++); -+#if CONFIG_UNSAND_FILTER -+ // Only try each extra conversion once -+ // The unsand output pad should never trigger has_sand_format -+ // but it is better to be safe -+ if ((extra_convert_tried & 1) == 0 && has_sand_format(link->in_formats)) { -+ if (!(filter = avfilter_get_by_name("unsand"))) { -+ av_log(log_ctx, AV_LOG_ERROR, "'unsand' filter " -+ "not present, cannot convert pixel formats.\n"); -+ return AVERROR(EINVAL); -+ } -+ -+ snprintf(inst_name, sizeof(inst_name), "auto_unsand_%d", -+ scaler_count++); -+ -+ if ((ret = avfilter_graph_create_filter(&convert, filter, -+ inst_name, "", NULL, -+ graph)) < 0) -+ return ret; - -- if ((ret = avfilter_graph_create_filter(&convert, filter, -- inst_name, graph->scale_sws_opts, NULL, -- graph)) < 0) -- return ret; -+ extra_convert_tried |= 1; -+ can_retry = 1; -+ } -+ else -+#endif -+ { -+ if (!(filter = avfilter_get_by_name("scale"))) { -+ av_log(log_ctx, AV_LOG_ERROR, "'scale' filter " -+ "not present, cannot convert pixel formats.\n"); -+ return AVERROR(EINVAL); -+ } -+ -+ snprintf(inst_name, sizeof(inst_name), "auto_scaler_%d", -+ scaler_count++); -+ -+ if ((ret = avfilter_graph_create_filter(&convert, filter, -+ inst_name, graph->scale_sws_opts, NULL, -+ graph)) < 0) -+ return ret; -+ } - break; - case AVMEDIA_TYPE_AUDIO: - if (!(filter = avfilter_get_by_name("aresample"))) { -@@ -585,9 +631,19 @@ static int query_formats(AVFilterGraph * - av_assert0(outlink-> in_channel_layouts->refcount > 0); - av_assert0(outlink->out_channel_layouts->refcount > 0); - } -- if (!ff_merge_formats( inlink->in_formats, inlink->out_formats, inlink->type) || -- !ff_merge_formats(outlink->in_formats, outlink->out_formats, outlink->type)) -+ // If we have added an extra filter we must merge the input -+ // side but we can have another go at the output -+ if (!ff_merge_formats( inlink->in_formats, inlink->out_formats, inlink->type)) - ret = AVERROR(ENOSYS); -+ else if (!ff_merge_formats(outlink->in_formats, outlink->out_formats, outlink->type)) -+ { -+ if (can_retry) { -+ link = outlink; -+ convert_needed = 1; -+ continue; -+ } -+ ret = AVERROR(ENOSYS); -+ } - if (inlink->type == AVMEDIA_TYPE_AUDIO && - (!ff_merge_samplerates(inlink->in_samplerates, - inlink->out_samplerates) || ---- a/libavfilter/buffersrc.c -+++ b/libavfilter/buffersrc.c -@@ -210,7 +210,7 @@ static int av_buffersrc_add_frame_intern - - switch (ctx->outputs[0]->type) { - case AVMEDIA_TYPE_VIDEO: -- CHECK_VIDEO_PARAM_CHANGE(ctx, s, frame->width, frame->height, -+ CHECK_VIDEO_PARAM_CHANGE(ctx, s, av_frame_cropped_width(frame), av_frame_cropped_height(frame), - frame->format, frame->pts); - break; - case AVMEDIA_TYPE_AUDIO: ---- /dev/null -+++ b/libavfilter/vf_deinterlace_v4l2m2m.c -@@ -0,0 +1,1336 @@ -+/* -+ * This file is part of FFmpeg. -+ * -+ * FFmpeg is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * FFmpeg is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with FFmpeg; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+ */ -+ -+/** -+ * @file -+ * deinterlace video filter - V4L2 M2M -+ */ -+ -+#include -+ -+#include -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include "libavutil/avassert.h" -+#include "libavutil/avstring.h" -+#include "libavutil/common.h" -+#include "libavutil/hwcontext.h" -+#include "libavutil/hwcontext_drm.h" -+#include "libavutil/internal.h" -+#include "libavutil/mathematics.h" -+#include "libavutil/opt.h" -+#include "libavutil/pixdesc.h" -+#include "libavutil/time.h" -+ -+#define FF_INTERNAL_FIELDS 1 -+#include "framequeue.h" -+#include "filters.h" -+#include "avfilter.h" -+#include "formats.h" -+#include "internal.h" -+#include "video.h" -+ -+typedef struct V4L2Queue V4L2Queue; -+typedef struct DeintV4L2M2MContextShared DeintV4L2M2MContextShared; -+ -+typedef struct V4L2PlaneInfo { -+ int bytesperline; -+ size_t length; -+} V4L2PlaneInfo; -+ -+typedef struct V4L2Buffer { -+ int enqueued; -+ int reenqueue; -+ int fd; -+ struct v4l2_buffer buffer; -+ AVFrame frame; -+ struct v4l2_plane planes[VIDEO_MAX_PLANES]; -+ int num_planes; -+ V4L2PlaneInfo plane_info[VIDEO_MAX_PLANES]; -+ AVDRMFrameDescriptor drm_frame; -+ V4L2Queue *q; -+} V4L2Buffer; -+ -+typedef struct V4L2Queue { -+ struct v4l2_format format; -+ int num_buffers; -+ V4L2Buffer *buffers; -+ DeintV4L2M2MContextShared *ctx; -+} V4L2Queue; -+ -+typedef struct pts_stats_s -+{ -+ void * logctx; -+ const char * name; // For debug -+ unsigned int last_count; -+ unsigned int last_interval; -+ int64_t last_pts; -+} pts_stats_t; -+ -+#define PTS_TRACK_SIZE 32 -+typedef struct pts_track_el_s -+{ -+ uint32_t n; -+ unsigned int interval; -+ AVFrame * props; -+} pts_track_el_t; -+ -+typedef struct pts_track_s -+{ -+ uint32_t n; -+ uint32_t last_n; -+ int got_2; -+ void * logctx; -+ pts_stats_t stats; -+ pts_track_el_t a[PTS_TRACK_SIZE]; -+} pts_track_t; -+ -+typedef struct DeintV4L2M2MContextShared { -+ void * logctx; // For logging - will be NULL when done -+ -+ int fd; -+ int done; -+ int width; -+ int height; -+ int orig_width; -+ int orig_height; -+ atomic_uint refcount; -+ -+ AVBufferRef *hw_frames_ctx; -+ -+ unsigned int field_order; -+ -+ pts_track_t track; -+ -+ V4L2Queue output; -+ V4L2Queue capture; -+} DeintV4L2M2MContextShared; -+ -+typedef struct DeintV4L2M2MContext { -+ const AVClass *class; -+ -+ DeintV4L2M2MContextShared *shared; -+} DeintV4L2M2MContext; -+ -+static unsigned int pts_stats_interval(const pts_stats_t * const stats) -+{ -+ return stats->last_interval; -+} -+ -+// Pick 64 for max last count - that is >1sec at 60fps -+#define STATS_LAST_COUNT_MAX 64 -+#define STATS_INTERVAL_MAX (1 << 30) -+static void pts_stats_add(pts_stats_t * const stats, int64_t pts) -+{ -+ if (pts == AV_NOPTS_VALUE || pts == stats->last_pts) { -+ if (stats->last_count < STATS_LAST_COUNT_MAX) -+ ++stats->last_count; -+ return; -+ } -+ -+ if (stats->last_pts != AV_NOPTS_VALUE) { -+ const int64_t interval = pts - stats->last_pts; -+ -+ if (interval < 0 || interval >= STATS_INTERVAL_MAX || -+ stats->last_count >= STATS_LAST_COUNT_MAX) { -+ if (stats->last_interval != 0) -+ av_log(stats->logctx, AV_LOG_DEBUG, "%s: %s: Bad interval: %" PRId64 "/%d\n", -+ __func__, stats->name, interval, stats->last_count); -+ stats->last_interval = 0; -+ } -+ else { -+ const int64_t frame_time = interval / (int64_t)stats->last_count; -+ -+ if (frame_time != stats->last_interval) -+ av_log(stats->logctx, AV_LOG_DEBUG, "%s: %s: New interval: %u->%" PRId64 "/%d=%" PRId64 "\n", -+ __func__, stats->name, stats->last_interval, interval, stats->last_count, frame_time); -+ stats->last_interval = frame_time; -+ } -+ } -+ -+ stats->last_pts = pts; -+ stats->last_count = 1; -+} -+ -+static void pts_stats_init(pts_stats_t * const stats, void * logctx, const char * name) -+{ -+ *stats = (pts_stats_t){ -+ .logctx = logctx, -+ .name = name, -+ .last_count = 1, -+ .last_interval = 0, -+ .last_pts = AV_NOPTS_VALUE -+ }; -+} -+ -+static inline uint32_t pts_track_next_n(pts_track_t * const trk) -+{ -+ if (++trk->n == 0) -+ trk->n = 1; -+ return trk->n; -+} -+ -+static int pts_track_get_frame(pts_track_t * const trk, const struct timeval tv, AVFrame * const dst) -+{ -+ uint32_t n = (uint32_t)(tv.tv_usec / 2 + tv.tv_sec * 500000); -+ pts_track_el_t * t; -+ -+ // As a first guess assume that n==0 means last frame -+ if (n == 0) { -+ n = trk->last_n; -+ if (n == 0) -+ goto fail; -+ } -+ -+ t = trk->a + (n & (PTS_TRACK_SIZE - 1)); -+ -+ if (t->n != n) { -+ av_log(trk->logctx, AV_LOG_ERROR, "%s: track failure: got %u, expected %u\n", __func__, n, trk->n); -+ goto fail; -+ } -+ -+ // 1st frame is simple - just believe it -+ if (n != trk->last_n) { -+ trk->last_n = n; -+ trk->got_2 = 0; -+ return av_frame_copy_props(dst, t->props); -+ } -+ -+ // Only believe in a single interpolated frame -+ if (trk->got_2) -+ goto fail; -+ trk->got_2 = 1; -+ -+ av_frame_copy_props(dst, t->props); -+ -+ -+ // If we can't guess - don't -+ if (t->interval == 0) { -+ dst->best_effort_timestamp = AV_NOPTS_VALUE; -+ dst->pts = AV_NOPTS_VALUE; -+ dst->pkt_dts = AV_NOPTS_VALUE; -+ } -+ else { -+ if (dst->best_effort_timestamp != AV_NOPTS_VALUE) -+ dst->best_effort_timestamp += t->interval / 2; -+ if (dst->pts != AV_NOPTS_VALUE) -+ dst->pts += t->interval / 2; -+ if (dst->pkt_dts != AV_NOPTS_VALUE) -+ dst->pkt_dts += t->interval / 2; -+ } -+ -+ return 0; -+ -+fail: -+ trk->last_n = 0; -+ trk->got_2 = 0; -+ dst->pts = AV_NOPTS_VALUE; -+ dst->pkt_dts = AV_NOPTS_VALUE; -+ return 0; -+} -+ -+static struct timeval pts_track_add_frame(pts_track_t * const trk, const AVFrame * const src) -+{ -+ const uint32_t n = pts_track_next_n(trk); -+ pts_track_el_t * const t = trk->a + (n & (PTS_TRACK_SIZE - 1)); -+ -+ pts_stats_add(&trk->stats, src->pts); -+ -+ t->n = n; -+ t->interval = pts_stats_interval(&trk->stats); // guess that next interval is the same as the last -+ av_frame_unref(t->props); -+ av_frame_copy_props(t->props, src); -+ -+ // We now know what the previous interval was, rather than having to guess, -+ // so set it. There is a better than decent chance that this is before -+ // we use it. -+ if (t->interval != 0) { -+ pts_track_el_t * const prev_t = trk->a + ((n - 1) & (PTS_TRACK_SIZE - 1)); -+ prev_t->interval = t->interval; -+ } -+ -+ // In case deinterlace interpolates frames use every other usec -+ return (struct timeval){.tv_sec = n / 500000, .tv_usec = (n % 500000) * 2}; -+} -+ -+static void pts_track_uninit(pts_track_t * const trk) -+{ -+ unsigned int i; -+ for (i = 0; i != PTS_TRACK_SIZE; ++i) { -+ trk->a[i].n = 0; -+ av_frame_free(&trk->a[i].props); -+ } -+} -+ -+static int pts_track_init(pts_track_t * const trk, void *logctx) -+{ -+ unsigned int i; -+ trk->n = 1; -+ pts_stats_init(&trk->stats, logctx, "track"); -+ for (i = 0; i != PTS_TRACK_SIZE; ++i) { -+ trk->a[i].n = 0; -+ if ((trk->a[i].props = av_frame_alloc()) == NULL) { -+ pts_track_uninit(trk); -+ return AVERROR(ENOMEM); -+ } -+ } -+ return 0; -+} -+ -+static int deint_v4l2m2m_prepare_context(DeintV4L2M2MContextShared *ctx) -+{ -+ struct v4l2_capability cap; -+ int ret; -+ -+ memset(&cap, 0, sizeof(cap)); -+ ret = ioctl(ctx->fd, VIDIOC_QUERYCAP, &cap); -+ if (ret < 0) -+ return ret; -+ -+ if (!(cap.capabilities & V4L2_CAP_STREAMING)) -+ return AVERROR(EINVAL); -+ -+ if (cap.capabilities & V4L2_CAP_VIDEO_M2M) { -+ ctx->capture.format.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; -+ ctx->output.format.type = V4L2_BUF_TYPE_VIDEO_OUTPUT; -+ -+ return 0; -+ } -+ -+ if (cap.capabilities & V4L2_CAP_VIDEO_M2M_MPLANE) { -+ ctx->capture.format.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; -+ ctx->output.format.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE; -+ -+ return 0; -+ } -+ -+ return AVERROR(EINVAL); -+} -+ -+static int deint_v4l2m2m_try_format(V4L2Queue *queue) -+{ -+ struct v4l2_format *fmt = &queue->format; -+ DeintV4L2M2MContextShared *ctx = queue->ctx; -+ int ret, field; -+ -+ ret = ioctl(ctx->fd, VIDIOC_G_FMT, fmt); -+ if (ret) -+ av_log(ctx->logctx, AV_LOG_ERROR, "VIDIOC_G_FMT failed: %d\n", ret); -+ -+ if (V4L2_TYPE_IS_OUTPUT(fmt->type)) -+ field = V4L2_FIELD_INTERLACED_TB; -+ else -+ field = V4L2_FIELD_NONE; -+ -+ if (V4L2_TYPE_IS_MULTIPLANAR(fmt->type)) { -+ fmt->fmt.pix_mp.pixelformat = V4L2_PIX_FMT_YUV420; -+ fmt->fmt.pix_mp.field = field; -+ fmt->fmt.pix_mp.width = ctx->width; -+ fmt->fmt.pix_mp.height = ctx->height; -+ } else { -+ fmt->fmt.pix.pixelformat = V4L2_PIX_FMT_YUV420; -+ fmt->fmt.pix.field = field; -+ fmt->fmt.pix.width = ctx->width; -+ fmt->fmt.pix.height = ctx->height; -+ } -+ -+ av_log(ctx->logctx, AV_LOG_DEBUG, "%s: Trying format for type %d, wxh: %dx%d, fmt: %08x, size %u bpl %u pre\n", __func__, -+ fmt->type, fmt->fmt.pix_mp.width, fmt->fmt.pix_mp.height, -+ fmt->fmt.pix_mp.pixelformat, -+ fmt->fmt.pix_mp.plane_fmt[0].sizeimage, fmt->fmt.pix_mp.plane_fmt[0].bytesperline); -+ -+ ret = ioctl(ctx->fd, VIDIOC_TRY_FMT, fmt); -+ if (ret) -+ return AVERROR(EINVAL); -+ -+ av_log(ctx->logctx, AV_LOG_DEBUG, "%s: Trying format for type %d, wxh: %dx%d, fmt: %08x, size %u bpl %u post\n", __func__, -+ fmt->type, fmt->fmt.pix_mp.width, fmt->fmt.pix_mp.height, -+ fmt->fmt.pix_mp.pixelformat, -+ fmt->fmt.pix_mp.plane_fmt[0].sizeimage, fmt->fmt.pix_mp.plane_fmt[0].bytesperline); -+ -+ if (V4L2_TYPE_IS_MULTIPLANAR(fmt->type)) { -+ if ((fmt->fmt.pix_mp.pixelformat != V4L2_PIX_FMT_YUV420 && -+ fmt->fmt.pix_mp.pixelformat != V4L2_PIX_FMT_NV12) || -+ fmt->fmt.pix_mp.field != field) { -+ av_log(ctx->logctx, AV_LOG_DEBUG, "format not supported for type %d\n", fmt->type); -+ -+ return AVERROR(EINVAL); -+ } -+ } else { -+ if ((fmt->fmt.pix.pixelformat != V4L2_PIX_FMT_YUV420 && -+ fmt->fmt.pix.pixelformat != V4L2_PIX_FMT_NV12) || -+ fmt->fmt.pix.field != field) { -+ av_log(ctx->logctx, AV_LOG_DEBUG, "format not supported for type %d\n", fmt->type); -+ -+ return AVERROR(EINVAL); -+ } -+ } -+ -+ return 0; -+} -+ -+static int deint_v4l2m2m_set_format(V4L2Queue *queue, uint32_t pixelformat, uint32_t field, int width, int height, int pitch, int ysize) -+{ -+ struct v4l2_format *fmt = &queue->format; -+ DeintV4L2M2MContextShared *ctx = queue->ctx; -+ int ret; -+ -+ struct v4l2_selection sel = { -+ .type = fmt->type, -+ .target = V4L2_TYPE_IS_OUTPUT(fmt->type) ? V4L2_SEL_TGT_CROP_BOUNDS : V4L2_SEL_TGT_COMPOSE_BOUNDS, -+ }; -+ -+ // This works for most single object 4:2:0 types -+ if (V4L2_TYPE_IS_MULTIPLANAR(fmt->type)) { -+ fmt->fmt.pix_mp.pixelformat = pixelformat; -+ fmt->fmt.pix_mp.field = field; -+ fmt->fmt.pix_mp.width = width; -+ fmt->fmt.pix_mp.height = ysize / pitch; -+ fmt->fmt.pix_mp.plane_fmt[0].bytesperline = pitch; -+ fmt->fmt.pix_mp.plane_fmt[0].sizeimage = ysize + (ysize >> 1); -+ } else { -+ fmt->fmt.pix.pixelformat = pixelformat; -+ fmt->fmt.pix.field = field; -+ fmt->fmt.pix.width = width; -+ fmt->fmt.pix.height = height; -+ fmt->fmt.pix.sizeimage = 0; -+ fmt->fmt.pix.bytesperline = 0; -+ } -+ -+ ret = ioctl(ctx->fd, VIDIOC_S_FMT, fmt); -+ if (ret) { -+ ret = AVERROR(errno); -+ av_log(ctx->logctx, AV_LOG_ERROR, "VIDIOC_S_FMT failed: %d\n", ret); -+ return ret; -+ } -+ -+ if (pixelformat != fmt->fmt.pix.pixelformat) { -+ av_log(ctx->logctx, AV_LOG_ERROR, "Format not supported: %s; S_FMT returned %s\n", av_fourcc2str(pixelformat), av_fourcc2str(fmt->fmt.pix.pixelformat)); -+ return AVERROR(EINVAL); -+ } -+ -+ ret = ioctl(ctx->fd, VIDIOC_G_SELECTION, &sel); -+ if (ret) { -+ ret = AVERROR(errno); -+ av_log(ctx->logctx, AV_LOG_WARNING, "VIDIOC_G_SELECTION failed: %d\n", ret); -+ } -+ -+ sel.r.width = width; -+ sel.r.height = height; -+ sel.r.left = 0; -+ sel.r.top = 0; -+ sel.target = V4L2_TYPE_IS_OUTPUT(fmt->type) ? V4L2_SEL_TGT_CROP : V4L2_SEL_TGT_COMPOSE, -+ sel.flags = V4L2_SEL_FLAG_LE; -+ -+ ret = ioctl(ctx->fd, VIDIOC_S_SELECTION, &sel); -+ if (ret) { -+ ret = AVERROR(errno); -+ av_log(ctx->logctx, AV_LOG_WARNING, "VIDIOC_S_SELECTION failed: %d\n", ret); -+ } -+ -+ return 0; -+} -+ -+static int deint_v4l2m2m_probe_device(DeintV4L2M2MContextShared *ctx, char *node) -+{ -+ int ret; -+ -+ ctx->fd = open(node, O_RDWR | O_NONBLOCK, 0); -+ if (ctx->fd < 0) -+ return AVERROR(errno); -+ -+ ret = deint_v4l2m2m_prepare_context(ctx); -+ if (ret) -+ goto fail; -+ -+ ret = deint_v4l2m2m_try_format(&ctx->capture); -+ if (ret) -+ goto fail; -+ -+ ret = deint_v4l2m2m_try_format(&ctx->output); -+ if (ret) -+ goto fail; -+ -+ return 0; -+ -+fail: -+ close(ctx->fd); -+ ctx->fd = -1; -+ -+ return ret; -+} -+ -+static int deint_v4l2m2m_find_device(DeintV4L2M2MContextShared *ctx) -+{ -+ int ret = AVERROR(EINVAL); -+ struct dirent *entry; -+ char node[PATH_MAX]; -+ DIR *dirp; -+ -+ dirp = opendir("/dev"); -+ if (!dirp) -+ return AVERROR(errno); -+ -+ for (entry = readdir(dirp); entry; entry = readdir(dirp)) { -+ -+ if (strncmp(entry->d_name, "video", 5)) -+ continue; -+ -+ snprintf(node, sizeof(node), "/dev/%s", entry->d_name); -+ av_log(ctx->logctx, AV_LOG_DEBUG, "probing device %s\n", node); -+ ret = deint_v4l2m2m_probe_device(ctx, node); -+ if (!ret) -+ break; -+ } -+ -+ closedir(dirp); -+ -+ if (ret) { -+ av_log(ctx->logctx, AV_LOG_ERROR, "Could not find a valid device\n"); -+ ctx->fd = -1; -+ -+ return ret; -+ } -+ -+ av_log(ctx->logctx, AV_LOG_INFO, "Using device %s\n", node); -+ -+ return 0; -+} -+ -+static int deint_v4l2m2m_enqueue_buffer(V4L2Buffer *buf) -+{ -+ int ret; -+ -+ ret = ioctl(buf->q->ctx->fd, VIDIOC_QBUF, &buf->buffer); -+ if (ret < 0) -+ return AVERROR(errno); -+ -+ buf->enqueued = 1; -+ -+ return 0; -+} -+ -+static int v4l2_buffer_export_drm(V4L2Buffer* avbuf, const uint32_t pixelformat) -+{ -+ struct v4l2_exportbuffer expbuf; -+ int i, ret; -+ uint64_t mod = DRM_FORMAT_MOD_LINEAR; -+ uint32_t fmt = 0; -+ -+ switch (pixelformat) { -+ case V4L2_PIX_FMT_NV12: -+ fmt = DRM_FORMAT_NV12; -+ break; -+ case V4L2_PIX_FMT_YUV420: -+ fmt = DRM_FORMAT_YUV420; -+ break; -+ default: -+ return AVERROR(EINVAL); -+ } -+ -+ avbuf->drm_frame.layers[0].format = fmt; -+ -+ for (i = 0; i < avbuf->num_planes; i++) { -+ memset(&expbuf, 0, sizeof(expbuf)); -+ -+ expbuf.index = avbuf->buffer.index; -+ expbuf.type = avbuf->buffer.type; -+ expbuf.plane = i; -+ -+ ret = ioctl(avbuf->q->ctx->fd, VIDIOC_EXPBUF, &expbuf); -+ if (ret < 0) -+ return AVERROR(errno); -+ -+ avbuf->fd = expbuf.fd; -+ -+ if (V4L2_TYPE_IS_MULTIPLANAR(avbuf->buffer.type)) { -+ /* drm frame */ -+ avbuf->drm_frame.objects[i].size = avbuf->buffer.m.planes[i].length; -+ avbuf->drm_frame.objects[i].fd = expbuf.fd; -+ avbuf->drm_frame.objects[i].format_modifier = mod; -+ } else { -+ /* drm frame */ -+ avbuf->drm_frame.objects[0].size = avbuf->buffer.length; -+ avbuf->drm_frame.objects[0].fd = expbuf.fd; -+ avbuf->drm_frame.objects[0].format_modifier = mod; -+ } -+ } -+ -+ return 0; -+} -+ -+static int deint_v4l2m2m_allocate_buffers(V4L2Queue *queue) -+{ -+ struct v4l2_format *fmt = &queue->format; -+ DeintV4L2M2MContextShared *ctx = queue->ctx; -+ struct v4l2_requestbuffers req; -+ int ret, i, j, multiplanar; -+ uint32_t memory; -+ -+ memory = V4L2_TYPE_IS_OUTPUT(fmt->type) ? -+ V4L2_MEMORY_DMABUF : V4L2_MEMORY_MMAP; -+ -+ multiplanar = V4L2_TYPE_IS_MULTIPLANAR(fmt->type); -+ -+ memset(&req, 0, sizeof(req)); -+ req.count = queue->num_buffers; -+ req.memory = memory; -+ req.type = fmt->type; -+ -+ ret = ioctl(ctx->fd, VIDIOC_REQBUFS, &req); -+ if (ret < 0) { -+ av_log(ctx->logctx, AV_LOG_ERROR, "VIDIOC_REQBUFS failed: %s\n", strerror(errno)); -+ -+ return AVERROR(errno); -+ } -+ -+ queue->num_buffers = req.count; -+ queue->buffers = av_mallocz(queue->num_buffers * sizeof(V4L2Buffer)); -+ if (!queue->buffers) { -+ av_log(ctx->logctx, AV_LOG_ERROR, "malloc enomem\n"); -+ -+ return AVERROR(ENOMEM); -+ } -+ -+ for (i = 0; i < queue->num_buffers; i++) { -+ V4L2Buffer *buf = &queue->buffers[i]; -+ -+ buf->enqueued = 0; -+ buf->fd = -1; -+ buf->q = queue; -+ -+ buf->buffer.type = fmt->type; -+ buf->buffer.memory = memory; -+ buf->buffer.index = i; -+ -+ if (multiplanar) { -+ buf->buffer.length = VIDEO_MAX_PLANES; -+ buf->buffer.m.planes = buf->planes; -+ } -+ -+ ret = ioctl(ctx->fd, VIDIOC_QUERYBUF, &buf->buffer); -+ if (ret < 0) { -+ ret = AVERROR(errno); -+ -+ goto fail; -+ } -+ -+ if (multiplanar) -+ buf->num_planes = buf->buffer.length; -+ else -+ buf->num_planes = 1; -+ -+ for (j = 0; j < buf->num_planes; j++) { -+ V4L2PlaneInfo *info = &buf->plane_info[j]; -+ -+ if (multiplanar) { -+ info->bytesperline = fmt->fmt.pix_mp.plane_fmt[j].bytesperline; -+ info->length = buf->buffer.m.planes[j].length; -+ } else { -+ info->bytesperline = fmt->fmt.pix.bytesperline; -+ info->length = buf->buffer.length; -+ } -+ } -+ -+ if (!V4L2_TYPE_IS_OUTPUT(fmt->type)) { -+ ret = deint_v4l2m2m_enqueue_buffer(buf); -+ if (ret) -+ goto fail; -+ -+ ret = v4l2_buffer_export_drm(buf, multiplanar ? fmt->fmt.pix_mp.pixelformat : fmt->fmt.pix.pixelformat); -+ if (ret) -+ goto fail; -+ } -+ } -+ -+ return 0; -+ -+fail: -+ for (i = 0; i < queue->num_buffers; i++) -+ if (queue->buffers[i].fd >= 0) -+ close(queue->buffers[i].fd); -+ av_free(queue->buffers); -+ queue->buffers = NULL; -+ -+ return ret; -+} -+ -+static int deint_v4l2m2m_streamon(V4L2Queue *queue) -+{ -+ DeintV4L2M2MContextShared * const ctx = queue->ctx; -+ int type = queue->format.type; -+ int ret; -+ -+ ret = ioctl(ctx->fd, VIDIOC_STREAMON, &type); -+ av_log(ctx->logctx, AV_LOG_DEBUG, "%s: type:%d ret:%d errno:%d\n", __func__, type, ret, AVERROR(errno)); -+ if (ret < 0) -+ return AVERROR(errno); -+ -+ return 0; -+} -+ -+static int deint_v4l2m2m_streamoff(V4L2Queue *queue) -+{ -+ DeintV4L2M2MContextShared * const ctx = queue->ctx; -+ int type = queue->format.type; -+ int ret; -+ -+ ret = ioctl(ctx->fd, VIDIOC_STREAMOFF, &type); -+ av_log(ctx->logctx, AV_LOG_DEBUG, "%s: type:%d ret:%d errno:%d\n", __func__, type, ret, AVERROR(errno)); -+ if (ret < 0) -+ return AVERROR(errno); -+ -+ return 0; -+} -+ -+// timeout in ms -+static V4L2Buffer* deint_v4l2m2m_dequeue_buffer(V4L2Queue *queue, int timeout) -+{ -+ struct v4l2_plane planes[VIDEO_MAX_PLANES]; -+ DeintV4L2M2MContextShared *ctx = queue->ctx; -+ struct v4l2_buffer buf = { 0 }; -+ V4L2Buffer* avbuf = NULL; -+ struct pollfd pfd; -+ short events; -+ int ret; -+ -+ if (V4L2_TYPE_IS_OUTPUT(queue->format.type)) -+ events = POLLOUT | POLLWRNORM; -+ else -+ events = POLLIN | POLLRDNORM; -+ -+ pfd.events = events; -+ pfd.fd = ctx->fd; -+ -+ for (;;) { -+ ret = poll(&pfd, 1, timeout); -+ if (ret > 0) -+ break; -+ if (errno == EINTR) -+ continue; -+ return NULL; -+ } -+ -+ if (pfd.revents & POLLERR) -+ return NULL; -+ -+ if (pfd.revents & events) { -+ memset(&buf, 0, sizeof(buf)); -+ buf.memory = V4L2_MEMORY_MMAP; -+ buf.type = queue->format.type; -+ if (V4L2_TYPE_IS_MULTIPLANAR(queue->format.type)) { -+ memset(planes, 0, sizeof(planes)); -+ buf.length = VIDEO_MAX_PLANES; -+ buf.m.planes = planes; -+ } -+ -+ ret = ioctl(ctx->fd, VIDIOC_DQBUF, &buf); -+ if (ret) { -+ if (errno != EAGAIN) -+ av_log(ctx->logctx, AV_LOG_DEBUG, "VIDIOC_DQBUF, errno (%s)\n", -+ av_err2str(AVERROR(errno))); -+ return NULL; -+ } -+ -+ avbuf = &queue->buffers[buf.index]; -+ avbuf->enqueued = 0; -+ avbuf->buffer = buf; -+ if (V4L2_TYPE_IS_MULTIPLANAR(queue->format.type)) { -+ memcpy(avbuf->planes, planes, sizeof(planes)); -+ avbuf->buffer.m.planes = avbuf->planes; -+ } -+ return avbuf; -+ } -+ -+ return NULL; -+} -+ -+static V4L2Buffer *deint_v4l2m2m_find_free_buf(V4L2Queue *queue) -+{ -+ int i; -+ V4L2Buffer *buf = NULL; -+ -+ for (i = 0; i < queue->num_buffers; i++) -+ if (!queue->buffers[i].enqueued) { -+ buf = &queue->buffers[i]; -+ break; -+ } -+ return buf; -+} -+ -+static void deint_v4l2m2m_unref_queued(V4L2Queue *queue) -+{ -+ int i; -+ V4L2Buffer *buf = NULL; -+ -+ if (!queue || !queue->buffers) -+ return; -+ for (i = 0; i < queue->num_buffers; i++) { -+ buf = &queue->buffers[i]; -+ if (queue->buffers[i].enqueued) -+ av_frame_unref(&buf->frame); -+ } -+} -+ -+static void recycle_q(V4L2Queue * const queue) -+{ -+ V4L2Buffer* avbuf; -+ while (avbuf = deint_v4l2m2m_dequeue_buffer(queue, 0), avbuf) { -+ av_frame_unref(&avbuf->frame); -+ } -+} -+ -+static int count_enqueued(V4L2Queue *queue) -+{ -+ int i; -+ int n = 0; -+ -+ if (queue->buffers == NULL) -+ return 0; -+ -+ for (i = 0; i < queue->num_buffers; i++) -+ if (queue->buffers[i].enqueued) -+ ++n; -+ return n; -+} -+ -+static int deint_v4l2m2m_enqueue_frame(V4L2Queue * const queue, AVFrame * const frame) -+{ -+ DeintV4L2M2MContextShared *const ctx = queue->ctx; -+ AVDRMFrameDescriptor *drm_desc = (AVDRMFrameDescriptor *)frame->data[0]; -+ V4L2Buffer *buf; -+ int i; -+ -+ if (V4L2_TYPE_IS_OUTPUT(queue->format.type)) -+ recycle_q(queue); -+ -+ buf = deint_v4l2m2m_find_free_buf(queue); -+ if (!buf) { -+ av_log(ctx->logctx, AV_LOG_ERROR, "%s: error %d finding free buf\n", __func__, 0); -+ return AVERROR(EAGAIN); -+ } -+ if (V4L2_TYPE_IS_MULTIPLANAR(buf->buffer.type)) -+ for (i = 0; i < drm_desc->nb_objects; i++) -+ buf->buffer.m.planes[i].m.fd = drm_desc->objects[i].fd; -+ else -+ buf->buffer.m.fd = drm_desc->objects[0].fd; -+ -+ buf->buffer.field = !frame->interlaced_frame ? V4L2_FIELD_NONE : -+ frame->top_field_first ? V4L2_FIELD_INTERLACED_TB : -+ V4L2_FIELD_INTERLACED_BT; -+ -+ if (ctx->field_order != buf->buffer.field) { -+ av_log(ctx->logctx, AV_LOG_DEBUG, "%s: Field changed: %d->%d\n", __func__, ctx->field_order, buf->buffer.field); -+ ctx->field_order = buf->buffer.field; -+ } -+ -+ buf->buffer.timestamp = pts_track_add_frame(&ctx->track, frame); -+ -+ buf->drm_frame.objects[0].fd = drm_desc->objects[0].fd; -+ -+ av_frame_move_ref(&buf->frame, frame); -+ -+ return deint_v4l2m2m_enqueue_buffer(buf); -+} -+ -+static void deint_v4l2m2m_destroy_context(DeintV4L2M2MContextShared *ctx) -+{ -+ if (atomic_fetch_sub(&ctx->refcount, 1) == 1) { -+ V4L2Queue *capture = &ctx->capture; -+ V4L2Queue *output = &ctx->output; -+ int i; -+ -+ av_log(NULL, AV_LOG_DEBUG, "%s - destroying context\n", __func__); -+ -+ if (ctx->fd >= 0) { -+ deint_v4l2m2m_streamoff(capture); -+ deint_v4l2m2m_streamoff(output); -+ } -+ -+ if (capture->buffers) -+ for (i = 0; i < capture->num_buffers; i++) { -+ capture->buffers[i].q = NULL; -+ if (capture->buffers[i].fd >= 0) -+ close(capture->buffers[i].fd); -+ } -+ -+ deint_v4l2m2m_unref_queued(output); -+ -+ av_buffer_unref(&ctx->hw_frames_ctx); -+ -+ if (capture->buffers) -+ av_free(capture->buffers); -+ -+ if (output->buffers) -+ av_free(output->buffers); -+ -+ if (ctx->fd >= 0) { -+ close(ctx->fd); -+ ctx->fd = -1; -+ } -+ -+ av_free(ctx); -+ } -+} -+ -+static void v4l2_free_buffer(void *opaque, uint8_t *unused) -+{ -+ V4L2Buffer *buf = opaque; -+ DeintV4L2M2MContextShared *ctx = buf->q->ctx; -+ -+ if (!ctx->done) -+ deint_v4l2m2m_enqueue_buffer(buf); -+ -+ deint_v4l2m2m_destroy_context(ctx); -+} -+ -+static uint8_t * v4l2_get_drm_frame(V4L2Buffer *avbuf, int height) -+{ -+ AVDRMFrameDescriptor *drm_desc = &avbuf->drm_frame; -+ AVDRMLayerDescriptor *layer; -+ -+ /* fill the DRM frame descriptor */ -+ drm_desc->nb_objects = avbuf->num_planes; -+ drm_desc->nb_layers = 1; -+ -+ layer = &drm_desc->layers[0]; -+ layer->nb_planes = avbuf->num_planes; -+ -+ for (int i = 0; i < avbuf->num_planes; i++) { -+ layer->planes[i].object_index = i; -+ layer->planes[i].offset = 0; -+ layer->planes[i].pitch = avbuf->plane_info[i].bytesperline; -+ } -+ -+ switch (layer->format) { -+ case DRM_FORMAT_YUYV: -+ layer->nb_planes = 1; -+ break; -+ -+ case DRM_FORMAT_NV12: -+ case DRM_FORMAT_NV21: -+ if (avbuf->num_planes > 1) -+ break; -+ -+ layer->nb_planes = 2; -+ -+ layer->planes[1].object_index = 0; -+ layer->planes[1].offset = avbuf->plane_info[0].bytesperline * -+ height; -+ layer->planes[1].pitch = avbuf->plane_info[0].bytesperline; -+ break; -+ -+ case DRM_FORMAT_YUV420: -+ if (avbuf->num_planes > 1) -+ break; -+ -+ layer->nb_planes = 3; -+ -+ layer->planes[1].object_index = 0; -+ layer->planes[1].offset = avbuf->plane_info[0].bytesperline * -+ height; -+ layer->planes[1].pitch = avbuf->plane_info[0].bytesperline >> 1; -+ -+ layer->planes[2].object_index = 0; -+ layer->planes[2].offset = layer->planes[1].offset + -+ ((avbuf->plane_info[0].bytesperline * -+ height) >> 2); -+ layer->planes[2].pitch = avbuf->plane_info[0].bytesperline >> 1; -+ break; -+ -+ default: -+ drm_desc->nb_layers = 0; -+ break; -+ } -+ -+ return (uint8_t *) drm_desc; -+} -+ -+// timeout in ms -+static int deint_v4l2m2m_dequeue_frame(V4L2Queue *queue, AVFrame* frame, int timeout) -+{ -+ DeintV4L2M2MContextShared *ctx = queue->ctx; -+ V4L2Buffer* avbuf; -+ -+ av_log(ctx->logctx, AV_LOG_TRACE, "<<< %s\n", __func__); -+ -+ avbuf = deint_v4l2m2m_dequeue_buffer(queue, timeout); -+ if (!avbuf) { -+ av_log(ctx->logctx, AV_LOG_DEBUG, "%s: No buffer to dequeue (timeout=%d)\n", __func__, timeout); -+ return AVERROR(EAGAIN); -+ } -+ -+ // Fill in PTS and anciliary info from src frame -+ // we will want to overwrite some fields as only the pts/dts -+ // fields are updated with new timing in this fn -+ pts_track_get_frame(&ctx->track, avbuf->buffer.timestamp, frame); -+ -+ frame->buf[0] = av_buffer_create((uint8_t *) &avbuf->drm_frame, -+ sizeof(avbuf->drm_frame), v4l2_free_buffer, -+ avbuf, AV_BUFFER_FLAG_READONLY); -+ if (!frame->buf[0]) { -+ av_log(ctx->logctx, AV_LOG_ERROR, "%s: error %d creating buffer\n", __func__, 0); -+ return AVERROR(ENOMEM); -+ } -+ -+ atomic_fetch_add(&ctx->refcount, 1); -+ -+ frame->data[0] = (uint8_t *)v4l2_get_drm_frame(avbuf, ctx->orig_height); -+ frame->format = AV_PIX_FMT_DRM_PRIME; -+ if (ctx->hw_frames_ctx) -+ frame->hw_frames_ctx = av_buffer_ref(ctx->hw_frames_ctx); -+ frame->height = ctx->height; -+ frame->width = ctx->width; -+ -+ // Not interlaced now -+ frame->interlaced_frame = 0; -+ frame->top_field_first = 0; -+ // Pkt duration halved -+ frame->pkt_duration /= 2; -+ -+ if (avbuf->buffer.flags & V4L2_BUF_FLAG_ERROR) { -+ av_log(ctx->logctx, AV_LOG_ERROR, "driver decode error\n"); -+ frame->decode_error_flags |= FF_DECODE_ERROR_INVALID_BITSTREAM; -+ } -+ -+ av_log(ctx->logctx, AV_LOG_TRACE, ">>> %s: PTS=%"PRId64"\n", __func__, frame->pts); -+ return 0; -+} -+ -+static int deint_v4l2m2m_config_props(AVFilterLink *outlink) -+{ -+ AVFilterLink *inlink = outlink->src->inputs[0]; -+ AVFilterContext *avctx = outlink->src; -+ DeintV4L2M2MContext *priv = avctx->priv; -+ DeintV4L2M2MContextShared *ctx = priv->shared; -+ int ret; -+ -+ ctx->height = avctx->inputs[0]->h; -+ ctx->width = avctx->inputs[0]->w; -+ -+ av_log(priv, AV_LOG_DEBUG, "%s: %dx%d\n", __func__, ctx->width, ctx->height); -+ -+ outlink->time_base = inlink->time_base; -+ outlink->w = inlink->w; -+ outlink->h = inlink->h; -+ outlink->sample_aspect_ratio = inlink->sample_aspect_ratio; -+ outlink->format = inlink->format; -+ outlink->frame_rate = (AVRational) {1, 0}; // Deny knowledge of frame rate -+ -+ ret = deint_v4l2m2m_find_device(ctx); -+ if (ret) -+ return ret; -+ -+ if (inlink->hw_frames_ctx) { -+ ctx->hw_frames_ctx = av_buffer_ref(inlink->hw_frames_ctx); -+ if (!ctx->hw_frames_ctx) -+ return AVERROR(ENOMEM); -+ } -+ return 0; -+} -+ -+static int deint_v4l2m2m_query_formats(AVFilterContext *avctx) -+{ -+ static const enum AVPixelFormat pixel_formats[] = { -+ AV_PIX_FMT_DRM_PRIME, -+ AV_PIX_FMT_YUV420P, -+ AV_PIX_FMT_NONE, -+ }; -+ -+ return ff_set_common_formats(avctx, ff_make_format_list(pixel_formats)); -+} -+ -+static uint32_t desc_pixelformat(const AVDRMFrameDescriptor * const drm_desc) -+{ -+ const int is_linear = (drm_desc->objects[0].format_modifier == DRM_FORMAT_MOD_LINEAR || -+ drm_desc->objects[0].format_modifier == DRM_FORMAT_MOD_INVALID); -+ -+ switch (drm_desc->layers[0].format) { -+ case DRM_FORMAT_YUV420: -+ if (is_linear) -+ return drm_desc->nb_objects == 1 ? V4L2_PIX_FMT_YUV420 : 0; -+ break; -+ case DRM_FORMAT_NV12: -+ if (is_linear) -+ return drm_desc->nb_objects == 1 ? V4L2_PIX_FMT_NV12 : 0; -+ break; -+ default: -+ break; -+ } -+ return 0; -+} -+ -+static int deint_v4l2m2m_filter_frame(AVFilterLink *link, AVFrame *in) -+{ -+ AVFilterContext *avctx = link->dst; -+ DeintV4L2M2MContext *priv = avctx->priv; -+ DeintV4L2M2MContextShared *ctx = priv->shared; -+ V4L2Queue *capture = &ctx->capture; -+ V4L2Queue *output = &ctx->output; -+ int ret; -+ -+ av_log(priv, AV_LOG_DEBUG, "<<< %s: input pts: %"PRId64" (%"PRId64") field :%d interlaced: %d aspect:%d/%d\n", -+ __func__, in->pts, AV_NOPTS_VALUE, in->top_field_first, in->interlaced_frame, in->sample_aspect_ratio.num, in->sample_aspect_ratio.den); -+ av_log(priv, AV_LOG_DEBUG, "--- %s: in status in %d/ot %d; out status in %d/out %d\n", __func__, -+ avctx->inputs[0]->status_in, avctx->inputs[0]->status_out, avctx->outputs[0]->status_in, avctx->outputs[0]->status_out); -+ -+ if (ctx->field_order == V4L2_FIELD_ANY) { -+ const AVDRMFrameDescriptor * const drm_desc = (AVDRMFrameDescriptor *)in->data[0]; -+ const uint32_t pixelformat = desc_pixelformat(drm_desc); -+ -+ if (pixelformat == 0) { -+ av_log(avctx, AV_LOG_ERROR, "Unsupported DRM format %s in %d objects, modifier %#" PRIx64 "\n", -+ av_fourcc2str(drm_desc->layers[0].format), -+ drm_desc->nb_objects, drm_desc->objects[0].format_modifier); -+ return AVERROR(EINVAL); -+ } -+ -+ ctx->orig_width = drm_desc->layers[0].planes[0].pitch; -+ ctx->orig_height = drm_desc->layers[0].planes[1].offset / ctx->orig_width; -+ -+ av_log(priv, AV_LOG_DEBUG, "%s: %dx%d (%td,%td)\n", __func__, ctx->width, ctx->height, -+ drm_desc->layers[0].planes[0].pitch, drm_desc->layers[0].planes[1].offset); -+ -+ ret = deint_v4l2m2m_set_format(output, pixelformat, ctx->field_order, ctx->width, ctx->height, ctx->orig_width, drm_desc->layers[0].planes[1].offset); -+ if (ret) -+ return ret; -+ -+ ret = deint_v4l2m2m_set_format(capture, pixelformat, V4L2_FIELD_NONE, ctx->width, ctx->height, ctx->orig_width, drm_desc->layers[0].planes[1].offset); -+ if (ret) -+ return ret; -+ -+ ret = deint_v4l2m2m_allocate_buffers(capture); -+ if (ret) -+ return ret; -+ -+ ret = deint_v4l2m2m_streamon(capture); -+ if (ret) -+ return ret; -+ -+ ret = deint_v4l2m2m_allocate_buffers(output); -+ if (ret) -+ return ret; -+ -+ ret = deint_v4l2m2m_streamon(output); -+ if (ret) -+ return ret; -+ -+ if (in->top_field_first) -+ ctx->field_order = V4L2_FIELD_INTERLACED_TB; -+ else -+ ctx->field_order = V4L2_FIELD_INTERLACED_BT; -+ -+ } -+ -+ ret = deint_v4l2m2m_enqueue_frame(output, in); -+ -+ av_log(priv, AV_LOG_TRACE, ">>> %s: %s\n", __func__, av_err2str(ret)); -+ return ret; -+} -+ -+static int deint_v4l2m2m_activate(AVFilterContext *avctx) -+{ -+ DeintV4L2M2MContext * const priv = avctx->priv; -+ DeintV4L2M2MContextShared *const s = priv->shared; -+ AVFilterLink * const outlink = avctx->outputs[0]; -+ AVFilterLink * const inlink = avctx->inputs[0]; -+ int n = 0; -+ int cn = 99; -+ int instatus = 0; -+ int64_t inpts = 0; -+ int did_something = 0; -+ -+ av_log(priv, AV_LOG_TRACE, "<<< %s\n", __func__); -+ -+ FF_FILTER_FORWARD_STATUS_BACK_ALL(outlink, avctx); -+ -+ ff_inlink_acknowledge_status(inlink, &instatus, &inpts); -+ -+ if (!ff_outlink_frame_wanted(outlink)) { -+ av_log(priv, AV_LOG_TRACE, "%s: Not wanted out\n", __func__); -+ } -+ else if (s->field_order != V4L2_FIELD_ANY) // Can't DQ if no setup! -+ { -+ AVFrame * frame = av_frame_alloc(); -+ int rv; -+ -+again: -+ recycle_q(&s->output); -+ n = count_enqueued(&s->output); -+ -+ if (frame == NULL) { -+ av_log(priv, AV_LOG_ERROR, "%s: error allocating frame\n", __func__); -+ return AVERROR(ENOMEM); -+ } -+ -+ rv = deint_v4l2m2m_dequeue_frame(&s->capture, frame, n > 4 ? 300 : 0); -+ if (rv != 0) { -+ av_frame_free(&frame); -+ if (rv != AVERROR(EAGAIN)) { -+ av_log(priv, AV_LOG_ERROR, ">>> %s: DQ fail: %s\n", __func__, av_err2str(rv)); -+ return rv; -+ } -+ } -+ else { -+ frame->interlaced_frame = 0; -+ // frame is always consumed by filter_frame - even on error despite -+ // a somewhat confusing comment in the header -+ rv = ff_filter_frame(outlink, frame); -+ -+ if (instatus != 0) { -+ av_log(priv, AV_LOG_TRACE, "%s: eof loop\n", __func__); -+ goto again; -+ } -+ -+ av_log(priv, AV_LOG_TRACE, "%s: Filtered: %s\n", __func__, av_err2str(rv)); -+ did_something = 1; -+ } -+ -+ cn = count_enqueued(&s->capture); -+ } -+ -+ if (instatus != 0) { -+ ff_outlink_set_status(outlink, instatus, inpts); -+ av_log(priv, AV_LOG_TRACE, ">>> %s: Status done: %s\n", __func__, av_err2str(instatus)); -+ return 0; -+ } -+ -+ recycle_q(&s->output); -+ n = count_enqueued(&s->output); -+ -+ while (n < 6) { -+ AVFrame * frame; -+ int rv; -+ -+ if ((rv = ff_inlink_consume_frame(inlink, &frame)) < 0) { -+ av_log(priv, AV_LOG_ERROR, "%s: consume in failed: %s\n", __func__, av_err2str(rv)); -+ return rv; -+ } -+ -+ if (frame == NULL) { -+ av_log(priv, AV_LOG_TRACE, "%s: No frame\n", __func__); -+ break; -+ } -+ -+ rv = deint_v4l2m2m_filter_frame(inlink, frame); -+ av_frame_free(&frame); -+ -+ if (rv != 0) -+ return rv; -+ -+ av_log(priv, AV_LOG_TRACE, "%s: Q frame\n", __func__); -+ ++n; -+ } -+ -+ if (n < 6) { -+ ff_inlink_request_frame(inlink); -+ did_something = 1; -+ av_log(priv, AV_LOG_TRACE, "%s: req frame\n", __func__); -+ } -+ -+ if (n > 4 && ff_outlink_frame_wanted(outlink)) { -+ ff_filter_set_ready(avctx, 1); -+ did_something = 1; -+ av_log(priv, AV_LOG_TRACE, "%s: ready\n", __func__); -+ } -+ -+ av_log(priv, AV_LOG_TRACE, ">>> %s: OK (n=%d, cn=%d)\n", __func__, n, cn); -+ return did_something ? 0 : FFERROR_NOT_READY; -+} -+ -+static av_cold int deint_v4l2m2m_init(AVFilterContext *avctx) -+{ -+ DeintV4L2M2MContext * const priv = avctx->priv; -+ DeintV4L2M2MContextShared * const ctx = av_mallocz(sizeof(DeintV4L2M2MContextShared)); -+ -+ if (!ctx) { -+ av_log(priv, AV_LOG_ERROR, "%s: error %d allocating context\n", __func__, 0); -+ return AVERROR(ENOMEM); -+ } -+ priv->shared = ctx; -+ ctx->logctx = priv; -+ ctx->fd = -1; -+ ctx->output.ctx = ctx; -+ ctx->output.num_buffers = 8; -+ ctx->capture.ctx = ctx; -+ ctx->capture.num_buffers = 12; -+ ctx->done = 0; -+ ctx->field_order = V4L2_FIELD_ANY; -+ -+ pts_track_init(&ctx->track, priv); -+ -+ atomic_init(&ctx->refcount, 1); -+ -+ return 0; -+} -+ -+static void deint_v4l2m2m_uninit(AVFilterContext *avctx) -+{ -+ DeintV4L2M2MContext *priv = avctx->priv; -+ DeintV4L2M2MContextShared *ctx = priv->shared; -+ -+ ctx->done = 1; -+ ctx->logctx = NULL; // Log to NULL works, log to missing crashes -+ pts_track_uninit(&ctx->track); -+ deint_v4l2m2m_destroy_context(ctx); -+} -+ -+static const AVOption deinterlace_v4l2m2m_options[] = { -+ { NULL }, -+}; -+ -+AVFILTER_DEFINE_CLASS(deinterlace_v4l2m2m); -+ -+static const AVFilterPad deint_v4l2m2m_inputs[] = { -+ { -+ .name = "default", -+ .type = AVMEDIA_TYPE_VIDEO, -+ }, -+ { NULL } -+}; -+ -+static const AVFilterPad deint_v4l2m2m_outputs[] = { -+ { -+ .name = "default", -+ .type = AVMEDIA_TYPE_VIDEO, -+ .config_props = deint_v4l2m2m_config_props, -+ }, -+ { NULL } -+}; -+ -+AVFilter ff_vf_deinterlace_v4l2m2m = { -+ .name = "deinterlace_v4l2m2m", -+ .description = NULL_IF_CONFIG_SMALL("V4L2 M2M deinterlacer"), -+ .priv_size = sizeof(DeintV4L2M2MContext), -+ .init = &deint_v4l2m2m_init, -+ .uninit = &deint_v4l2m2m_uninit, -+ .query_formats = &deint_v4l2m2m_query_formats, -+ .inputs = deint_v4l2m2m_inputs, -+ .outputs = deint_v4l2m2m_outputs, -+ .priv_class = &deinterlace_v4l2m2m_class, -+ .activate = deint_v4l2m2m_activate, -+}; ---- /dev/null -+++ b/libavfilter/vf_unsand.c -@@ -0,0 +1,234 @@ -+/* -+ * Copyright (c) 2007 Bobby Bingham -+ * -+ * This file is part of FFmpeg. -+ * -+ * FFmpeg is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * FFmpeg is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with FFmpeg; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+ */ -+ -+/** -+ * @file -+ * format and noformat video filters -+ */ -+ -+#include -+ -+#include "libavutil/internal.h" -+#include "libavutil/mem.h" -+#include "libavutil/pixdesc.h" -+#include "libavutil/opt.h" -+#include "libavutil/rpi_sand_fns.h" -+ -+#include "avfilter.h" -+#include "formats.h" -+#include "internal.h" -+#include "video.h" -+ -+typedef struct UnsandContext { -+ const AVClass *class; -+} UnsandContext; -+ -+static av_cold void uninit(AVFilterContext *ctx) -+{ -+// UnsandContext *s = ctx->priv; -+} -+ -+static av_cold int init(AVFilterContext *ctx) -+{ -+// UnsandContext *s = ctx->priv; -+ -+ return 0; -+} -+ -+ -+static int filter_frame(AVFilterLink *link, AVFrame *in) -+{ -+ AVFilterLink * const outlink = link->dst->outputs[0]; -+ AVFrame *out = NULL; -+ int rv = 0; -+ -+ if (outlink->format == in->format) { -+ // If nothing to do then do nothing -+ out = in; -+ } -+ else -+ { -+ if ((out = ff_get_video_buffer(outlink, av_frame_cropped_width(in), av_frame_cropped_height(in))) == NULL) -+ { -+ rv = AVERROR(ENOMEM); -+ goto fail; -+ } -+ if (av_rpi_sand_to_planar_frame(out, in) != 0) -+ { -+ rv = -1; -+ goto fail; -+ } -+ -+ av_frame_free(&in); -+ } -+ -+ return ff_filter_frame(outlink, out); -+ -+fail: -+ av_frame_free(&out); -+ av_frame_free(&in); -+ return rv; -+} -+ -+#if 0 -+static void dump_fmts(const AVFilterFormats * fmts) -+{ -+ int i; -+ if (fmts== NULL) { -+ printf("NULL\n"); -+ return; -+ } -+ for (i = 0; i < fmts->nb_formats; ++i) { -+ printf(" %d", fmts->formats[i]); -+ } -+ printf("\n"); -+} -+#endif -+ -+static int query_formats(AVFilterContext *ctx) -+{ -+// UnsandContext *s = ctx->priv; -+ int ret; -+ -+ // If we aren't connected at both ends then just do nothing -+ if (ctx->inputs[0] == NULL || ctx->outputs[0] == NULL) -+ return 0; -+ -+// printf("Unsand: %s in: ", __func__); -+// dump_fmts(ctx->inputs[0]->in_formats); -+// printf("Unsand: %s out: ", __func__); -+// dump_fmts(ctx->outputs[0]->out_formats); -+ -+ // Our output formats depend on our input formats and we can't/don't -+ // want to convert between bit depths so we need to wait for the source -+ // to have an opinion before we do -+ if (ctx->inputs[0]->in_formats == NULL) -+ return AVERROR(EAGAIN); -+ -+ // Accept anything -+ if (ctx->inputs[0]->out_formats == NULL && -+ (ret = ff_formats_ref(ctx->inputs[0]->in_formats, &ctx->inputs[0]->out_formats)) < 0) -+ return ret; -+ -+ // Filter out sand formats -+ -+ // Generate a container if we don't already have one -+ if (ctx->outputs[0]->in_formats == NULL) -+ { -+ // Somewhat rubbish way of ensuring we have a good structure -+ const static enum AVPixelFormat out_fmts[] = {AV_PIX_FMT_YUV420P10, AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE}; -+ AVFilterFormats *formats = ff_make_format_list(out_fmts); -+ -+ if (formats == NULL) -+ return AVERROR(ENOMEM); -+ if ((ret = ff_formats_ref(formats, &ctx->outputs[0]->in_formats)) < 0) -+ return ret; -+ } -+ -+ // Replace old format list with new filtered list derived from what our -+ // input says it can do -+ { -+ const AVFilterFormats * const src_ff = ctx->inputs[0]->out_formats; -+ AVFilterFormats * const dst_ff = ctx->outputs[0]->in_formats; -+ enum AVPixelFormat *dst_fmts = av_malloc(sizeof(enum AVPixelFormat) * src_ff->nb_formats); -+ int i; -+ int n = 0; -+ int seen_420p = 0; -+ int seen_420p10 = 0; -+ -+ for (i = 0; i < src_ff->nb_formats; ++i) { -+ const enum AVPixelFormat f = src_ff->formats[i]; -+ -+ switch (f){ -+ case AV_PIX_FMT_YUV420P: -+ case AV_PIX_FMT_SAND128: -+ case AV_PIX_FMT_RPI4_8: -+ if (!seen_420p) { -+ seen_420p = 1; -+ dst_fmts[n++] = AV_PIX_FMT_YUV420P; -+ } -+ break; -+ case AV_PIX_FMT_SAND64_10: -+ case AV_PIX_FMT_YUV420P10: -+ case AV_PIX_FMT_RPI4_10: -+ if (!seen_420p10) { -+ seen_420p10 = 1; -+ dst_fmts[n++] = AV_PIX_FMT_YUV420P10; -+ } -+ break; -+ default: -+ dst_fmts[n++] = f; -+ break; -+ } -+ } -+ -+ av_freep(&dst_ff->formats); -+ dst_ff->formats = dst_fmts; -+ dst_ff->nb_formats = n; -+ } -+ -+// printf("Unsand: %s calc: ", __func__); -+// dump_fmts(ctx->outputs[0]->in_formats); -+ -+ return 0; -+} -+ -+ -+#define OFFSET(x) offsetof(UnsandContext, x) -+static const AVOption unsand_options[] = { -+ { NULL } -+}; -+ -+ -+AVFILTER_DEFINE_CLASS(unsand); -+ -+static const AVFilterPad avfilter_vf_unsand_inputs[] = { -+ { -+ .name = "default", -+ .type = AVMEDIA_TYPE_VIDEO, -+ .filter_frame = filter_frame, -+ }, -+ { NULL } -+}; -+ -+static const AVFilterPad avfilter_vf_unsand_outputs[] = { -+ { -+ .name = "default", -+ .type = AVMEDIA_TYPE_VIDEO -+ }, -+ { NULL } -+}; -+ -+AVFilter ff_vf_unsand = { -+ .name = "unsand", -+ .description = NULL_IF_CONFIG_SMALL("Convert sand pix fmt to yuv"), -+ -+ .init = init, -+ .uninit = uninit, -+ -+ .query_formats = query_formats, -+ -+ .priv_size = sizeof(UnsandContext), -+ .priv_class = &unsand_class, -+ -+ .inputs = avfilter_vf_unsand_inputs, -+ .outputs = avfilter_vf_unsand_outputs, -+}; -+ ---- a/libavformat/utils.c -+++ b/libavformat/utils.c -@@ -3051,6 +3051,40 @@ static int has_codec_parameters(AVStream - return 1; - } - -+#if CONFIG_HEVC_RPI_DECODER && CONFIG_HEVC_DECODER -+// This should be quite general purpose but avoid possible conflicts -+// by limiting usage to cases wehere we know it works. -+static int try_fallback_decoder(AVCodecContext * const avctx, const AVCodec *const old_codec, AVDictionary ** const opts) -+{ -+ // Only try fallback if we know it is supported (HEVC only) -+ const AVCodec *const new_codec = old_codec->id != AV_CODEC_ID_HEVC ? NULL : -+ avcodec_find_decoder_by_id_and_fmt(old_codec->id, AV_PIX_FMT_NONE); -+ int err; -+ -+ // Failed to find fallback or we are already at the fallback -+ if (new_codec == NULL || new_codec == old_codec) -+ { -+ return AVERROR_DECODER_NOT_FOUND; -+ } -+ -+ // * This may be dodgy - header says to not use this fn, -+ // especially if we are going to reopen the context... -+ // (but it does seem to work for our cases) -+ if (avcodec_is_open(avctx)) { -+ avcodec_close(avctx); -+ } -+ -+ if ((err = avcodec_open2(avctx, new_codec, opts)) < 0) -+ { -+ return err; -+ } -+ -+ return 0; -+} -+#else -+#define try_fallback_decoder(avctx, old_codec, opts) (AVERROR_DECODER_NOT_FOUND) -+#endif -+ - /* returns 1 or 0 if or if not decoded data was returned, or a negative error */ - static int try_decode_frame(AVFormatContext *s, AVStream *st, - const AVPacket *avpkt, AVDictionary **options) -@@ -3085,7 +3119,11 @@ static int try_decode_frame(AVFormatCont - av_dict_set(options ? options : &thread_opt, "threads", "1", 0); - if (s->codec_whitelist) - av_dict_set(options ? options : &thread_opt, "codec_whitelist", s->codec_whitelist, 0); -- ret = avcodec_open2(avctx, codec, options ? options : &thread_opt); -+ if ((ret = avcodec_open2(avctx, codec, options ? options : &thread_opt)) == AVERROR_DECODER_NOT_FOUND) -+ { -+ // Try fallback if if looks worth a try -+ ret = try_fallback_decoder(avctx, codec, options ? options : &thread_opt); -+ } - if (!options) - av_dict_free(&thread_opt); - if (ret < 0) { -@@ -3116,6 +3154,14 @@ static int try_decode_frame(AVFormatCont - if (avctx->codec_type == AVMEDIA_TYPE_VIDEO || - avctx->codec_type == AVMEDIA_TYPE_AUDIO) { - ret = avcodec_send_packet(avctx, &pkt); -+ -+ // If we are going to want to fall back we should know here -+ if (ret == AVERROR_DECODER_NOT_FOUND) { -+ if ((ret = try_fallback_decoder(avctx, avctx->codec, options)) < 0) -+ break; -+ continue; -+ } -+ - if (ret < 0 && ret != AVERROR(EAGAIN) && ret != AVERROR_EOF) - break; - if (ret >= 0) -@@ -3726,9 +3772,20 @@ FF_ENABLE_DEPRECATION_WARNINGS - // Try to just open decoders, in case this is enough to get parameters. - if (!has_codec_parameters(st, NULL) && st->request_probe <= 0) { - if (codec && !avctx->codec) -- if (avcodec_open2(avctx, codec, options ? &options[i] : &thread_opt) < 0) -- av_log(ic, AV_LOG_WARNING, -- "Failed to open codec in %s\n",__FUNCTION__); -+ { -+ int err; -+ -+ if ((err = avcodec_open2(avctx, codec, options ? &options[i] : &thread_opt)) < 0) -+ { -+ if (err == AVERROR_DECODER_NOT_FOUND) { -+ err = try_fallback_decoder(avctx, codec, options ? &options[i] : &thread_opt); -+ } -+ if (err < 0) { -+ av_log(ic, AV_LOG_WARNING, -+ "Failed to open codec in %s\n",__FUNCTION__); -+ } -+ } -+ } - } - if (!options) - av_dict_free(&thread_opt); ---- a/libavutil/Makefile -+++ b/libavutil/Makefile -@@ -68,6 +68,7 @@ HEADERS = adler32.h - rational.h \ - replaygain.h \ - ripemd.h \ -+ rpi_sand_fns.h \ - samplefmt.h \ - sha.h \ - sha512.h \ -@@ -86,6 +87,7 @@ HEADERS = adler32.h - tx.h \ - - HEADERS-$(CONFIG_LZO) += lzo.h -+HEADERS-$(CONFIG-RPI) += rpi_sand_fn_pw.h - - ARCH_HEADERS = bswap.h \ - intmath.h \ -@@ -180,6 +182,7 @@ OBJS-$(CONFIG_LZO) - OBJS-$(CONFIG_MEDIACODEC) += hwcontext_mediacodec.o - OBJS-$(CONFIG_OPENCL) += hwcontext_opencl.o - OBJS-$(CONFIG_QSV) += hwcontext_qsv.o -+OBJS-$(CONFIG_SAND) += rpi_sand_fns.o - OBJS-$(CONFIG_VAAPI) += hwcontext_vaapi.o - OBJS-$(CONFIG_VIDEOTOOLBOX) += hwcontext_videotoolbox.o - OBJS-$(CONFIG_VDPAU) += hwcontext_vdpau.o ---- a/libavutil/aarch64/Makefile -+++ b/libavutil/aarch64/Makefile -@@ -1,4 +1,6 @@ - OBJS += aarch64/cpu.o \ - aarch64/float_dsp_init.o \ - --NEON-OBJS += aarch64/float_dsp_neon.o -+NEON-OBJS += aarch64/float_dsp_neon.o \ -+ aarch64/rpi_sand_neon.o \ -+ ---- /dev/null -+++ b/libavutil/aarch64/rpi_sand_neon.S -@@ -0,0 +1,781 @@ -+/* -+Copyright (c) 2021 Michael Eiler -+ -+Redistribution and use in source and binary forms, with or without -+modification, are permitted provided that the following conditions are met: -+ * Redistributions of source code must retain the above copyright -+ notice, this list of conditions and the following disclaimer. -+ * Redistributions in binary form must reproduce the above copyright -+ notice, this list of conditions and the following disclaimer in the -+ documentation and/or other materials provided with the distribution. -+ * Neither the name of the copyright holder nor the -+ names of its contributors may be used to endorse or promote products -+ derived from this software without specific prior written permission. -+ -+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ -+Authors: Michael Eiler -+*/ -+ -+#include "asm.S" -+ -+// void ff_rpi_sand8_lines_to_planar_y8( -+// uint8_t * dest, : x0 -+// unsigned int dst_stride, : w1 -+// const uint8_t * src, : x2 -+// unsigned int src_stride1, : w3, always 128 -+// unsigned int src_stride2, : w4 -+// unsigned int _x, : w5 -+// unsigned int y, : w6 -+// unsigned int _w, : w7 -+// unsigned int h); : [sp, #0] -+ -+function ff_rpi_sand8_lines_to_planar_y8, export=1 -+ // w15 contains the number of rows we need to process -+ ldr w15, [sp, #0] -+ -+ // w8 will contain the number of blocks per row -+ // w8 = floor(_w/stride1) -+ // stride1 is assumed to always be 128 -+ mov w8, w1 -+ lsr w8, w8, #7 -+ -+ // in case the width of the image is not a multiple of 128, there will -+ // be an incomplete block at the end of every row -+ // w9 contains the number of pixels stored within this block -+ // w9 = _w - w8 * 128 -+ lsl w9, w8, #7 -+ sub w9, w7, w9 -+ -+ // this is the value we have to add to the src pointer after reading a complete block -+ // it will move the address to the start of the next block -+ // w10 = stride2 * stride1 - stride1 -+ mov w10, w4 -+ lsl w10, w10, #7 -+ sub w10, w10, #128 -+ -+ // w11 is the row offset, meaning the start offset of the first block of every collumn -+ // this will be increased with stride1 within every iteration of the row_loop -+ eor w11, w11, w11 -+ -+ // w12 = 0, processed row count -+ eor w12, w12, w12 -+row_loop: -+ // start of the first block within the current row -+ // x13 = row offset + src -+ mov x13, x2 -+ add x13, x13, x11 -+ -+ // w14 = 0, processed block count -+ eor w14, w14, w14 -+ -+ cmp w8, #0 -+ beq no_main_y8 -+ -+block_loop: -+ // copy 128 bytes (a full block) into the vector registers v0-v7 and increase the src address by 128 -+ // fortunately these aren't callee saved ones, meaning we don't need to backup them -+ ld1 { v0.16b, v1.16b, v2.16b, v3.16b}, [x13], #64 -+ ld1 { v4.16b, v5.16b, v6.16b, v7.16b}, [x13], #64 -+ -+ // write these registers back to the destination vector and increase the dst address by 128 -+ st1 { v0.16b, v1.16b, v2.16b, v3.16b }, [x0], #64 -+ st1 { v4.16b, v5.16b, v6.16b, v7.16b }, [x0], #64 -+ -+ // move the source register to the beginning of the next block (x13 = src + block offset) -+ add x13, x13, x10 -+ // increase the block counter -+ add w14, w14, #1 -+ -+ // continue with the block_loop if we haven't copied all full blocks yet -+ cmp w8, w14 -+ bgt block_loop -+ -+ // handle the last block at the end of each row -+ // at most 127 byte values copied from src to dst -+no_main_y8: -+ eor w5, w5, w5 // i = 0 -+incomplete_block_loop_y8: -+ cmp w5, w9 -+ bge incomplete_block_loop_end_y8 -+ -+ ldrb w6, [x13] -+ strb w6, [x0] -+ add x13, x13, #1 -+ add x0, x0, #1 -+ -+ add w5, w5, #1 -+ b incomplete_block_loop_y8 -+incomplete_block_loop_end_y8: -+ -+ -+ // increase the row offset by 128 (stride1) -+ add w11, w11, #128 -+ // increment the row counter -+ add w12, w12, #1 -+ -+ // process the next row if we haven't finished yet -+ cmp w15, w12 -+ bgt row_loop -+ -+ ret -+endfunc -+ -+ -+ -+// void ff_rpi_sand8_lines_to_planar_c8( -+// uint8_t * dst_u, : x0 -+// unsigned int dst_stride_u, : w1 == width -+// uint8_t * dst_v, : x2 -+// unsigned int dst_stride_v, : w3 == width -+// const uint8_t * src, : x4 -+// unsigned int stride1, : w5 == 128 -+// unsigned int stride2, : w6 -+// unsigned int _x, : w7 -+// unsigned int y, : [sp, #0] -+// unsigned int _w, : [sp, #8] -+// unsigned int h); : [sp, #16] -+ -+function ff_rpi_sand8_lines_to_planar_c8, export=1 -+ // w7 = width -+ ldr w7, [sp, #8] -+ -+ // w15 contains the number of rows we need to process -+ // counts down -+ ldr w15, [sp, #16] -+ -+ // number of full blocks, w8 = _w / (stride1 >> 1) == _w / 64 == _w >> 6 -+ mov w8, w7 -+ lsr w8, w8, #6 -+ -+ // number of pixels in block at the end of every row -+ // w9 = _w - (w8 * 64) -+ lsl w9, w8, #6 -+ sub w9, w7, w9 -+ -+ // Skip at the end of the line to account for stride -+ sub w12, w1, w7 -+ -+ // address delta to the beginning of the next block -+ // w10 = (stride2 * stride1 - stride1) = stride2 * 128 - 128 -+ lsl w10, w6, #7 -+ sub w10, w10, #128 -+ -+ // w11 = row address start offset = 0 -+ eor w11, w11, w11 -+ -+row_loop_c8: -+ // start of the first block within the current row -+ // x13 = row offset + src -+ mov x13, x4 -+ add x13, x13, x11 -+ -+ // w14 = 0, processed block count -+ eor w14, w14, w14 -+ -+ cmp w8, #0 -+ beq no_main_c8 -+ -+block_loop_c8: -+ // load the full block -> 128 bytes, the block contains 64 interleaved U and V values -+ ld2 { v0.16b, v1.16b }, [x13], #32 -+ ld2 { v2.16b, v3.16b }, [x13], #32 -+ ld2 { v4.16b, v5.16b }, [x13], #32 -+ ld2 { v6.16b, v7.16b }, [x13], #32 -+ -+ // swap register so that we can write them out with a single instruction -+ mov v16.16b, v1.16b -+ mov v17.16b, v3.16b -+ mov v18.16b, v5.16b -+ mov v1.16b, v2.16b -+ mov v2.16b, v4.16b -+ mov v3.16b, v6.16b -+ mov v4.16b, v16.16b -+ mov v5.16b, v17.16b -+ mov v6.16b, v18.16b -+ -+ st1 { v0.16b, v1.16b, v2.16b, v3.16b }, [x0], #64 -+ st1 { v4.16b, v5.16b, v6.16b, v7.16b }, [x2], #64 -+ -+ // increment row counter and move src to the beginning of the next block -+ add w14, w14, #1 -+ add x13, x13, x10 -+ -+ // jump to block_loop_c8 iff the block count is smaller than the number of full blocks -+ cmp w8, w14 -+ bgt block_loop_c8 -+ -+no_main_c8: -+ // handle incomplete block at the end of every row -+ eor w5, w5, w5 // point counter, this might be -+incomplete_block_loop_c8: -+ cmp w5, w9 -+ bge incomplete_block_loop_end_c8 -+ -+ ldrb w1, [x13] -+ strb w1, [x0] -+ add x13, x13, #1 -+ -+ ldrb w1, [x13] -+ strb w1, [x2] -+ add x13, x13, #1 -+ -+ add x0, x0, #1 -+ add x2, x2, #1 -+ -+ add w5, w5, #1 -+ b incomplete_block_loop_c8 -+incomplete_block_loop_end_c8: -+ -+ // increase row_offset by stride1 -+ add w11, w11, #128 -+ add x0, x0, w12, sxtw -+ add x2, x2, w12, sxtw -+ -+ // jump to row_Loop_c8 iff the row count is small than the height -+ subs w15, w15, #1 -+ bgt row_loop_c8 -+ -+ ret -+endfunc -+ -+//void ff_rpi_sand30_lines_to_planar_c16( -+// uint8_t * dst_u, // [x0] -+// unsigned int dst_stride_u, // [w1] == _w*2 -+// uint8_t * dst_v, // [x2] -+// unsigned int dst_stride_v, // [w3] == _w*2 -+// const uint8_t * src, // [x4] -+// unsigned int stride1, // [w5] == 128 -+// unsigned int stride2, // [w6] -+// unsigned int _x, // [w7] == 0 -+// unsigned int y, // [sp, #0] == 0 -+// unsigned int _w, // [sp, #8] -> w3 -+// unsigned int h); // [sp, #16] -> w7 -+ -+.macro rpi_sand30_lines_to_planar_c16_block_half -+ ld1 { v0.4s, v1.4s, v2.4s, v3.4s }, [x13], #64 -+ -+ xtn v4.4h, v0.4s -+ ushr v0.4s, v0.4s, #10 -+ xtn v5.4h, v0.4s -+ ushr v0.4s, v0.4s, #10 -+ xtn v6.4h, v0.4s -+ xtn2 v4.8h, v1.4s -+ ushr v1.4s, v1.4s, #10 -+ xtn2 v5.8h, v1.4s -+ ushr v1.4s, v1.4s, #10 -+ xtn2 v6.8h, v1.4s -+ and v4.16b, v4.16b, v16.16b -+ and v5.16b, v5.16b, v16.16b -+ and v6.16b, v6.16b, v16.16b -+ st3 { v4.8h, v5.8h, v6.8h }, [sp], #48 -+ -+ xtn v4.4h, v2.4s -+ ushr v2.4s, v2.4s, #10 -+ xtn v5.4h, v2.4s -+ ushr v2.4s, v2.4s, #10 -+ xtn v6.4h, v2.4s -+ xtn2 v4.8h, v3.4s -+ ushr v3.4s, v3.4s, #10 -+ xtn2 v5.8h, v3.4s -+ ushr v3.4s, v3.4s, #10 -+ xtn2 v6.8h, v3.4s -+ and v4.16b, v4.16b, v16.16b -+ and v5.16b, v5.16b, v16.16b -+ and v6.16b, v6.16b, v16.16b -+ st3 { v4.8h, v5.8h, v6.8h }, [sp] -+ sub sp, sp, #48 -+.endm -+ -+function ff_rpi_sand30_lines_to_planar_c16, export=1 -+ stp x19, x20, [sp, #-48]! -+ stp x21, x22, [sp, #16] -+ stp x23, x24, [sp, #32] -+ -+ ldr w3, [sp, #48+8] // w3 = width -+ ldr w7, [sp, #48+16] // w7 = height -+ -+ // reserve space on the stack for intermediate results -+ sub sp, sp, #256 -+ -+ // number of 128byte blocks per row, w8 = width / 48 -+ mov w9, #48 -+ udiv w8, w3, w9 -+ -+ // remaining pixels (rem_pix) per row, w9 = width - w8 * 48 -+ mul w9, w8, w9 -+ sub w9, w3, w9 -+ -+ // row offset, the beginning of the next row to process -+ eor w10, w10, w10 -+ -+ // offset to the beginning of the next block, w11 = stride2 * 128 - 128 -+ lsl w11, w6, #7 -+ sub w11, w11, #128 -+ -+ // decrease the height by one and in case of remaining pixels increase the block count by one -+ sub w7, w7, #1 -+ cmp w9, #0 -+ cset w19, ne // w19 == 1 iff reamining pixels != 0 -+ add w8, w8, w19 -+ -+ // bytes we have to move dst back by at the end of every row -+ mov w21, #48*2 -+ mul w21, w21, w8 -+ sub w21, w1, w21 -+ -+ mov w20, #0 // w20 = flag, last row processed -+ -+ mov x12, #0x03ff03ff03ff03ff -+ dup v16.2d, x12 -+ -+ // iterate through rows, row counter = w12 = 0 -+ eor w12, w12, w12 -+row_loop_c16: -+ cmp w12, w7 -+ bge row_loop_c16_fin -+ -+ // address of row data = src + row_offset -+ mov x13, x4 -+ add x13, x13, x10 -+ -+ eor w14, w14, w14 -+block_loop_c16: -+ cmp w14, w8 -+ bge block_loop_c16_fin -+ -+ rpi_sand30_lines_to_planar_c16_block_half -+ -+ ld2 { v0.8h, v1.8h }, [sp], #32 -+ ld2 { v2.8h, v3.8h }, [sp], #32 -+ ld2 { v4.8h, v5.8h }, [sp] -+ sub sp, sp, #64 -+ -+ st1 { v0.8h }, [x0], #16 -+ st1 { v2.8h }, [x0], #16 -+ st1 { v4.8h }, [x0], #16 -+ st1 { v1.8h }, [x2], #16 -+ st1 { v3.8h }, [x2], #16 -+ st1 { v5.8h }, [x2], #16 -+ -+ rpi_sand30_lines_to_planar_c16_block_half -+ -+ ld2 { v0.8h, v1.8h }, [sp], #32 -+ ld2 { v2.8h, v3.8h }, [sp], #32 -+ ld2 { v4.8h, v5.8h }, [sp] -+ sub sp, sp, #64 -+ -+ st1 { v0.8h }, [x0], #16 -+ st1 { v2.8h }, [x0], #16 -+ st1 { v4.8h }, [x0], #16 -+ st1 { v1.8h }, [x2], #16 -+ st1 { v3.8h }, [x2], #16 -+ st1 { v5.8h }, [x2], #16 -+ -+ add x13, x13, x11 // offset to next block -+ add w14, w14, #1 -+ b block_loop_c16 -+block_loop_c16_fin: -+ -+ add w10, w10, #128 -+ add w12, w12, #1 -+ add x0, x0, w21, sxtw // move dst pointers back by x21 -+ add x2, x2, w21, sxtw -+ b row_loop_c16 -+row_loop_c16_fin: -+ -+ cmp w20, #1 -+ beq row_loop_c16_fin2 -+ mov w20, #1 -+ sub w8, w8, w19 // decrease block count by w19 -+ add w7, w7, #1 // increase height -+ b row_loop_c16 -+ -+row_loop_c16_fin2: -+ sub x0, x0, w21, sxtw // readd x21 in case of the last row -+ sub x2, x2, w21, sxtw // so that we can write out the few remaining pixels -+ -+ // last incomplete block to be finished -+ // read operations are fine, stride2 is more than large enough even if rem_pix is 0 -+ rpi_sand30_lines_to_planar_c16_block_half -+ ld2 { v0.8h, v1.8h }, [sp], #32 -+ ld2 { v2.8h, v3.8h }, [sp], #32 -+ ld2 { v4.8h, v5.8h }, [sp], #32 -+ rpi_sand30_lines_to_planar_c16_block_half -+ ld2 { v0.8h, v1.8h }, [sp], #32 -+ ld2 { v2.8h, v3.8h }, [sp], #32 -+ ld2 { v4.8h, v5.8h }, [sp] -+ sub sp, sp, #160 -+ -+ mov x4, sp -+ eor w20, w20, w20 -+rem_pix_c16_loop: -+ cmp w20, w9 -+ bge rem_pix_c16_fin -+ -+ ldr w22, [x4], #4 -+ str w22, [x0], #2 -+ lsr w22, w22, #16 -+ str w22, [x2], #2 -+ -+ add w20, w20, #1 -+ b rem_pix_c16_loop -+rem_pix_c16_fin: -+ -+ add sp, sp, #256 -+ -+ ldp x23, x24, [sp, #32] -+ ldp x21, x22, [sp, #16] -+ ldp x19, x20, [sp], #48 -+ ret -+endfunc -+ -+ -+ -+//void ff_rpi_sand30_lines_to_planar_p010( -+// uint8_t * dest, -+// unsigned int dst_stride, -+// const uint8_t * src, -+// unsigned int src_stride1, -+// unsigned int src_stride2, -+// unsigned int _x, -+// unsigned int y, -+// unsigned int _w, -+// unsigned int h); -+ -+// void ff_rpi_sand30_lines_to_planar_y8( -+// uint8_t * dest, : x0 -+// unsigned int dst_stride, : w1 -+// const uint8_t * src, : x2 -+// unsigned int src_stride1, : w3, always 128 -+// unsigned int src_stride2, : w4 -+// unsigned int _x, : w5 -+// unsigned int y, : w6 -+// unsigned int _w, : w7 -+// unsigned int h); : [sp, #0] -+// -+// Assumes that we are starting on a stripe boundary and that overreading -+// within the stripe is OK. However it does respect the dest size for wri -+ -+function ff_rpi_sand30_lines_to_planar_y16, export=1 -+ lsl w4, w4, #7 -+ sub w4, w4, #64 -+ sub w1, w1, w7, lsl #1 -+ uxtw x6, w6 -+ add x8, x2, x6, lsl #7 -+ ldr w6, [sp, #0] -+ -+10: -+ mov x2, x8 -+ mov w5, w7 -+1: -+ ld1 {v0.4s, v1.4s, v2.4s, v3.4s}, [x2], #64 -+ ld1 {v4.4s, v5.4s, v6.4s, v7.4s}, [x2], x4 -+ -+ subs w5, w5, #96 -+ -+ // v0, v1 -+ -+ shrn v18.4h, v0.4s, #14 -+ xtn v16.4h, v0.4s -+ shrn v17.4h, v0.4s, #10 -+ -+ shrn2 v18.8h, v1.4s, #14 -+ xtn2 v16.8h, v1.4s -+ shrn2 v17.8h, v1.4s, #10 -+ -+ ushr v18.8h, v18.8h, #6 -+ bic v16.8h, #0xfc, lsl #8 -+ bic v17.8h, #0xfc, lsl #8 -+ -+ // v2, v3 -+ -+ shrn v21.4h, v2.4s, #14 -+ xtn v19.4h, v2.4s -+ shrn v20.4h, v2.4s, #10 -+ -+ shrn2 v21.8h, v3.4s, #14 -+ xtn2 v19.8h, v3.4s -+ shrn2 v20.8h, v3.4s, #10 -+ -+ ushr v21.8h, v21.8h, #6 -+ bic v19.8h, #0xfc, lsl #8 -+ bic v20.8h, #0xfc, lsl #8 -+ -+ // v4, v5 -+ -+ shrn v24.4h, v4.4s, #14 -+ xtn v22.4h, v4.4s -+ shrn v23.4h, v4.4s, #10 -+ -+ shrn2 v24.8h, v5.4s, #14 -+ xtn2 v22.8h, v5.4s -+ shrn2 v23.8h, v5.4s, #10 -+ -+ ushr v24.8h, v24.8h, #6 -+ bic v22.8h, #0xfc, lsl #8 -+ bic v23.8h, #0xfc, lsl #8 -+ -+ // v6, v7 -+ -+ shrn v27.4h, v6.4s, #14 -+ xtn v25.4h, v6.4s -+ shrn v26.4h, v6.4s, #10 -+ -+ shrn2 v27.8h, v7.4s, #14 -+ xtn2 v25.8h, v7.4s -+ shrn2 v26.8h, v7.4s, #10 -+ -+ ushr v27.8h, v27.8h, #6 -+ bic v25.8h, #0xfc, lsl #8 -+ bic v26.8h, #0xfc, lsl #8 -+ -+ blt 2f -+ -+ st3 {v16.8h, v17.8h, v18.8h}, [x0], #48 -+ st3 {v19.8h, v20.8h, v21.8h}, [x0], #48 -+ st3 {v22.8h, v23.8h, v24.8h}, [x0], #48 -+ st3 {v25.8h, v26.8h, v27.8h}, [x0], #48 -+ -+ bne 1b -+ -+11: -+ subs w6, w6, #1 -+ add x0, x0, w1, uxtw -+ add x8, x8, #128 -+ bne 10b -+ -+ ret -+ -+// Partial final write -+2: -+ cmp w5, #48-96 -+ blt 1f -+ st3 {v16.8h, v17.8h, v18.8h}, [x0], #48 -+ st3 {v19.8h, v20.8h, v21.8h}, [x0], #48 -+ beq 11b -+ mov v16.16b, v22.16b -+ mov v17.16b, v23.16b -+ sub w5, w5, #48 -+ mov v18.16b, v24.16b -+ mov v19.16b, v25.16b -+ mov v20.16b, v26.16b -+ mov v21.16b, v27.16b -+1: -+ cmp w5, #24-96 -+ blt 1f -+ st3 {v16.8h, v17.8h, v18.8h}, [x0], #48 -+ beq 11b -+ mov v16.16b, v19.16b -+ mov v17.16b, v20.16b -+ sub w5, w5, #24 -+ mov v18.16b, v21.16b -+1: -+ cmp w5, #12-96 -+ blt 1f -+ st3 {v16.4h, v17.4h, v18.4h}, [x0], #24 -+ beq 11b -+ mov v16.2d[0], v16.2d[1] -+ sub w5, w5, #12 -+ mov v17.2d[0], v17.2d[1] -+ mov v18.2d[0], v18.2d[1] -+1: -+ cmp w5, #6-96 -+ blt 1f -+ st3 {v16.h, v17.h, v18.h}[0], [x0], #6 -+ st3 {v16.h, v17.h, v18.h}[1], [x0], #6 -+ beq 11b -+ mov v16.2s[0], v16.2s[1] -+ sub w5, w5, #6 -+ mov v17.2s[0], v17.2s[1] -+ mov v18.2s[0], v18.2s[1] -+1: -+ cmp w5, #3-96 -+ blt 1f -+ st3 {v16.h, v17.h, v18.h}[0], [x0], #6 -+ beq 11b -+ mov v16.4h[0], v16.4h[1] -+ sub w5, w5, #3 -+ mov v17.4h[0], v17.4h[1] -+1: -+ cmp w5, #2-96 -+ blt 1f -+ st2 {v16.h, v17.h}[0], [x0], #4 -+ b 11b -+1: -+ st1 {v16.h}[0], [x0], #2 -+ b 11b -+ -+endfunc -+ -+// void ff_rpi_sand30_lines_to_planar_y8( -+// uint8_t * dest, : x0 -+// unsigned int dst_stride, : w1 -+// const uint8_t * src, : x2 -+// unsigned int src_stride1, : w3, always 128 -+// unsigned int src_stride2, : w4 -+// unsigned int _x, : w5 -+// unsigned int y, : w6 -+// unsigned int _w, : w7 -+// unsigned int h); : [sp, #0] -+// -+// Assumes that we are starting on a stripe boundary and that overreading -+// within the stripe is OK. However it does respect the dest size for wri -+ -+function ff_rpi_sand30_lines_to_planar_y8, export=1 -+ lsl w4, w4, #7 -+ sub w4, w4, #64 -+ sub w1, w1, w7 -+ uxtw x6, w6 -+ add x8, x2, x6, lsl #7 -+ ldr w6, [sp, #0] -+ -+10: -+ mov x2, x8 -+ mov w5, w7 -+1: -+ ld1 {v0.4s, v1.4s, v2.4s, v3.4s}, [x2], #64 -+ ld1 {v4.4s, v5.4s, v6.4s, v7.4s}, [x2], x4 -+ -+ subs w5, w5, #96 -+ -+ // v0, v1 -+ -+ shrn v18.4h, v0.4s, #16 -+ xtn v16.4h, v0.4s -+ shrn v17.4h, v0.4s, #12 -+ -+ shrn2 v18.8h, v1.4s, #16 -+ xtn2 v16.8h, v1.4s -+ shrn2 v17.8h, v1.4s, #12 -+ -+ shrn v18.8b, v18.8h, #6 -+ shrn v16.8b, v16.8h, #2 -+ xtn v17.8b, v17.8h -+ -+ // v2, v3 -+ -+ shrn v21.4h, v2.4s, #16 -+ xtn v19.4h, v2.4s -+ shrn v20.4h, v2.4s, #12 -+ -+ shrn2 v21.8h, v3.4s, #16 -+ xtn2 v19.8h, v3.4s -+ shrn2 v20.8h, v3.4s, #12 -+ -+ shrn2 v18.16b, v21.8h, #6 -+ shrn2 v16.16b, v19.8h, #2 -+ xtn2 v17.16b, v20.8h -+ -+ // v4, v5 -+ -+ shrn v24.4h, v4.4s, #16 -+ xtn v22.4h, v4.4s -+ shrn v23.4h, v4.4s, #12 -+ -+ shrn2 v24.8h, v5.4s, #16 -+ xtn2 v22.8h, v5.4s -+ shrn2 v23.8h, v5.4s, #12 -+ -+ shrn v21.8b, v24.8h, #6 -+ shrn v19.8b, v22.8h, #2 -+ xtn v20.8b, v23.8h -+ -+ // v6, v7 -+ -+ shrn v27.4h, v6.4s, #16 -+ xtn v25.4h, v6.4s -+ shrn v26.4h, v6.4s, #12 -+ -+ shrn2 v27.8h, v7.4s, #16 -+ xtn2 v25.8h, v7.4s -+ shrn2 v26.8h, v7.4s, #12 -+ -+ shrn2 v21.16b, v27.8h, #6 -+ shrn2 v19.16b, v25.8h, #2 -+ xtn2 v20.16b, v26.8h -+ -+ blt 2f -+ -+ st3 {v16.16b, v17.16b, v18.16b}, [x0], #48 -+ st3 {v19.16b, v20.16b, v21.16b}, [x0], #48 -+ -+ bne 1b -+ -+11: -+ subs w6, w6, #1 -+ add x0, x0, w1, uxtw -+ add x8, x8, #128 -+ bne 10b -+ -+ ret -+ -+// Partial final write -+2: -+ cmp w5, #48-96 -+ blt 1f -+ st3 {v16.16b, v17.16b, v18.16b}, [x0], #48 -+ beq 11b -+ mov v16.16b, v22.16b -+ mov v17.16b, v23.16b -+ sub w5, w5, #48 -+ mov v18.16b, v24.16b -+1: -+ cmp w5, #24-96 -+ blt 1f -+ st3 {v16.8b, v17.8b, v18.8b}, [x0], #24 -+ beq 11b -+ mov v16.2d[0], v16.2d[1] -+ sub w5, w5, #24 -+ mov v17.2d[0], v17.2d[1] -+ mov v18.2d[0], v18.2d[1] -+1: -+ cmp w5, #12-96 -+ blt 1f -+ st3 {v16.b, v17.b, v18.b}[0], [x0], #3 -+ st3 {v16.b, v17.b, v18.b}[1], [x0], #3 -+ st3 {v16.b, v17.b, v18.b}[2], [x0], #3 -+ st3 {v16.b, v17.b, v18.b}[3], [x0], #3 -+ beq 11b -+ mov v16.2s[0], v16.2s[1] -+ sub w5, w5, #12 -+ mov v17.2s[0], v17.2s[1] -+ mov v18.2s[0], v18.2s[1] -+1: -+ cmp w5, #6-96 -+ blt 1f -+ st3 {v16.b, v17.b, v18.b}[0], [x0], #3 -+ st3 {v16.b, v17.b, v18.b}[1], [x0], #3 -+ beq 11b -+ mov v16.4h[0], v16.4h[1] -+ sub w5, w5, #6 -+ mov v17.4h[0], v17.4h[1] -+ mov v18.4h[0], v18.4h[1] -+1: -+ cmp w5, #3-96 -+ blt 1f -+ st3 {v16.b, v17.b, v18.b}[0], [x0], #3 -+ beq 11b -+ mov v16.8b[0], v16.8b[1] -+ sub w5, w5, #3 -+ mov v17.8b[0], v17.8b[1] -+1: -+ cmp w5, #2-96 -+ blt 1f -+ st2 {v16.b, v17.b}[0], [x0], #2 -+ b 11b -+1: -+ st1 {v16.b}[0], [x0], #1 -+ b 11b -+ -+endfunc -+ ---- /dev/null -+++ b/libavutil/aarch64/rpi_sand_neon.h -@@ -0,0 +1,59 @@ -+/* -+Copyright (c) 2021 Michael Eiler -+ -+Redistribution and use in source and binary forms, with or without -+modification, are permitted provided that the following conditions are met: -+ * Redistributions of source code must retain the above copyright -+ notice, this list of conditions and the following disclaimer. -+ * Redistributions in binary form must reproduce the above copyright -+ notice, this list of conditions and the following disclaimer in the -+ documentation and/or other materials provided with the distribution. -+ * Neither the name of the copyright holder nor the -+ names of its contributors may be used to endorse or promote products -+ derived from this software without specific prior written permission. -+ -+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ -+Authors: Michael Eiler -+*/ -+ -+#pragma once -+ -+#ifdef __cplusplus -+extern "C" { -+#endif -+ -+void ff_rpi_sand8_lines_to_planar_y8(uint8_t * dest, unsigned int dst_stride, -+ const uint8_t * src, unsigned int src_stride1, unsigned int src_stride2, -+ unsigned int _x, unsigned int y, unsigned int _w, unsigned int h); -+ -+void ff_rpi_sand8_lines_to_planar_c8(uint8_t * dst_u, unsigned int dst_stride_u, -+ uint8_t * dst_v, unsigned int dst_stride_v, const uint8_t * src, -+ unsigned int stride1, unsigned int stride2, unsigned int _x, unsigned int y, -+ unsigned int _w, unsigned int h); -+ -+void ff_rpi_sand30_lines_to_planar_y16(uint8_t * dest, unsigned int dst_stride, -+ const uint8_t * src, unsigned int src_stride1, unsigned int src_stride2, -+ unsigned int _x, unsigned int y, unsigned int _w, unsigned int h); -+ -+void ff_rpi_sand30_lines_to_planar_c16(uint8_t * dst_u, unsigned int dst_stride_u, -+ uint8_t * dst_v, unsigned int dst_stride_v, const uint8_t * src, unsigned int stride1, -+ unsigned int stride2, unsigned int _x, unsigned int y, unsigned int _w, unsigned int h); -+ -+void ff_rpi_sand30_lines_to_planar_y8(uint8_t * dest, unsigned int dst_stride, -+ const uint8_t * src, unsigned int src_stride1, unsigned int src_stride2, -+ unsigned int _x, unsigned int y, unsigned int _w, unsigned int h); -+ -+#ifdef __cplusplus -+} -+#endif -+ ---- a/libavutil/arm/Makefile -+++ b/libavutil/arm/Makefile -@@ -6,3 +6,4 @@ VFP-OBJS += arm/float_dsp_init_vfp.o - - NEON-OBJS += arm/float_dsp_init_neon.o \ - arm/float_dsp_neon.o \ -+ arm/rpi_sand_neon.o \ ---- /dev/null -+++ b/libavutil/arm/rpi_sand_neon.S -@@ -0,0 +1,925 @@ -+/* -+Copyright (c) 2018 Raspberry Pi (Trading) Ltd. -+All rights reserved. -+ -+Redistribution and use in source and binary forms, with or without -+modification, are permitted provided that the following conditions are met: -+ * Redistributions of source code must retain the above copyright -+ notice, this list of conditions and the following disclaimer. -+ * Redistributions in binary form must reproduce the above copyright -+ notice, this list of conditions and the following disclaimer in the -+ documentation and/or other materials provided with the distribution. -+ * Neither the name of the copyright holder nor the -+ names of its contributors may be used to endorse or promote products -+ derived from this software without specific prior written permission. -+ -+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ -+Authors: John Cox -+*/ -+ -+#include "libavutil/arm/asm.S" -+ -+ -+@ General notes: -+@ Having done some timing on this in sand8->y8 (Pi4) -+@ vst1 (680fps) is a bit faster than vstm (660fps) -+@ vldm (680fps) is noticably faster than vld1 (480fps) -+@ (or it might be that a mix is what is required) -+@ -+@ At least on a Pi4 it is no more expensive to have a single auto-inc register -+@ for dest address than it is to have 2 used alternately (On Pi3 Ben asserted -+@ the latter was better) -+@ -+@ vstm will bus error on unaligned access (so will vldm), vst1 is safe unless -+@ the memory is uncached. -+@ As these are Sand -> planar we can assume that src is going to be aligned but -+@ it is possible that dest isn't (converting to .yuv or other packed format). -+@ Luckily vst1 is faster than vstm :-) so all is well -+@ vst1 has alignment requirements of el size so maybe splitting vst1.32 into 4 -+@ .8 stores would let us do non-word aligned stores into uncached but it -+@ probably isn't worth it. -+ -+ -+ -+ -+@ void ff_rpi_sand128b_stripe_to_8_10( -+@ uint8_t * dest, // [r0] -+@ const uint8_t * src1, // [r1] -+@ const uint8_t * src2, // [r2] -+@ unsigned int lines); // [r3] -+ -+.macro stripe2_to_8, bit_depth -+ vpush {q4-q7} -+1: -+ vldm r1!, {q0-q7} -+ subs r3, #1 -+ vldm r2!, {q8-q15} -+ vqrshrn.u16 d0, q0, #\bit_depth - 8 -+ vqrshrn.u16 d1, q1, #\bit_depth - 8 -+ vqrshrn.u16 d2, q2, #\bit_depth - 8 -+ vqrshrn.u16 d3, q3, #\bit_depth - 8 -+ vqrshrn.u16 d4, q4, #\bit_depth - 8 -+ vqrshrn.u16 d5, q5, #\bit_depth - 8 -+ vqrshrn.u16 d6, q6, #\bit_depth - 8 -+ vqrshrn.u16 d7, q7, #\bit_depth - 8 -+ vqrshrn.u16 d8, q8, #\bit_depth - 8 -+ vqrshrn.u16 d9, q9, #\bit_depth - 8 -+ vqrshrn.u16 d10, q10, #\bit_depth - 8 -+ vqrshrn.u16 d11, q11, #\bit_depth - 8 -+ vqrshrn.u16 d12, q12, #\bit_depth - 8 -+ vqrshrn.u16 d13, q13, #\bit_depth - 8 -+ vqrshrn.u16 d14, q14, #\bit_depth - 8 -+ vqrshrn.u16 d15, q15, #\bit_depth - 8 -+ vstm r0!, {q0-q7} -+ bne 1b -+ vpop {q4-q7} -+ bx lr -+.endm -+ -+function ff_rpi_sand128b_stripe_to_8_10, export=1 -+ stripe2_to_8 10 -+endfunc -+ -+@ void ff_rpi_sand8_lines_to_planar_y8( -+@ uint8_t * dest, // [r0] -+@ unsigned int dst_stride, // [r1] -+@ const uint8_t * src, // [r2] -+@ unsigned int src_stride1, // [r3] Ignored - assumed 128 -+@ unsigned int src_stride2, // [sp, #0] -> r3 -+@ unsigned int _x, // [sp, #4] Ignored - 0 -+@ unsigned int y, // [sp, #8] (r7 in prefix) -+@ unsigned int _w, // [sp, #12] -> r6 (cur r5) -+@ unsigned int h); // [sp, #16] -> r7 -+@ -+@ Assumes that we are starting on a stripe boundary and that overreading -+@ within the stripe is OK. However it does respect the dest size for writing -+ -+function ff_rpi_sand8_lines_to_planar_y8, export=1 -+ push {r4-r8, lr} @ +24 L -+ ldr r3, [sp, #24] -+ ldr r6, [sp, #36] -+ ldr r7, [sp, #32] @ y -+ lsl r3, #7 -+ sub r1, r6 -+ add r8, r2, r7, lsl #7 -+ ldr r7, [sp, #40] -+ -+10: -+ mov r2, r8 -+ add r4, r0, #24 -+ mov r5, r6 -+ mov lr, #0 -+1: -+ vldm r2, {q8-q15} -+ add r2, r3 -+ subs r5, #128 -+ blt 2f -+ vst1.8 {d16, d17, d18, d19}, [r0]! -+ vst1.8 {d20, d21, d22, d23}, [r0]! -+ vst1.8 {d24, d25, d26, d27}, [r0]! -+ vst1.8 {d28, d29, d30, d31}, [r0]! -+ bne 1b -+11: -+ subs r7, #1 -+ add r0, r1 -+ add r8, #128 -+ bne 10b -+ -+ pop {r4-r8, pc} -+ -+@ Partial final write -+2: -+ cmp r5, #64-128 -+ blt 1f -+ vst1.8 {d16, d17, d18, d19}, [r0]! -+ vst1.8 {d20, d21, d22, d23}, [r0]! -+ beq 11b -+ vmov q8, q12 -+ vmov q9, q13 -+ sub r5, #64 -+ vmov q10, q14 -+ vmov q11, q15 -+1: -+ cmp r5, #32-128 -+ blt 1f -+ vst1.8 {d16, d17, d18, d19}, [r0]! -+ beq 11b -+ vmov q8, q10 -+ sub r5, #32 -+ vmov q9, q11 -+1: -+ cmp r5, #16-128 -+ blt 1f -+ vst1.8 {d16, d17}, [r0]! -+ beq 11b -+ sub r5, #16 -+ vmov q8, q9 -+1: -+ cmp r5, #8-128 -+ blt 1f -+ vst1.8 {d16}, [r0]! -+ beq 11b -+ sub r5, #8 -+ vmov d16, d17 -+1: -+ cmp r5, #4-128 -+ blt 1f -+ vst1.32 {d16[0]}, [r0]! -+ beq 11b -+ sub r5, #4 -+ vshr.u64 d16, #32 -+1: -+ cmp r5, #2-128 -+ blt 1f -+ vst1.16 {d16[0]}, [r0]! -+ beq 11b -+ vst1.8 {d16[2]}, [r0]! -+ b 11b -+1: -+ vst1.8 {d16[0]}, [r0]! -+ b 11b -+endfunc -+ -+@ void ff_rpi_sand8_lines_to_planar_c8( -+@ uint8_t * dst_u, // [r0] -+@ unsigned int dst_stride_u, // [r1] -+@ uint8_t * dst_v, // [r2] -+@ unsigned int dst_stride_v, // [r3] -+@ const uint8_t * src, // [sp, #0] -> r4, r5 -+@ unsigned int stride1, // [sp, #4] 128 -+@ unsigned int stride2, // [sp, #8] -> r8 -+@ unsigned int _x, // [sp, #12] 0 -+@ unsigned int y, // [sp, #16] (r7 in prefix) -+@ unsigned int _w, // [sp, #20] -> r12, r6 -+@ unsigned int h); // [sp, #24] -> r7 -+@ -+@ Assumes that we are starting on a stripe boundary and that overreading -+@ within the stripe is OK. However it does respect the dest size for writing -+ -+function ff_rpi_sand8_lines_to_planar_c8, export=1 -+ push {r4-r8, lr} @ +24 -+ -+ ldr r5, [sp, #24] -+ ldr r8, [sp, #32] -+ ldr r7, [sp, #40] -+ ldr r6, [sp, #44] -+ lsl r8, #7 -+ add r5, r5, r7, lsl #7 -+ sub r1, r1, r6 -+ sub r3, r3, r6 -+ ldr r7, [sp, #48] -+ vpush {q4-q7} -+ -+10: -+ mov r4, r5 -+ mov r12, r6 -+1: -+ subs r12, #64 -+ vldm r4, {q0-q7} -+ add r4, r8 -+ it gt -+ vldmgt r4, {q8-q15} -+ add r4, r8 -+ -+ vuzp.8 q0, q1 -+ vuzp.8 q2, q3 -+ vuzp.8 q4, q5 -+ vuzp.8 q6, q7 -+ -+ vuzp.8 q8, q9 -+ vuzp.8 q10, q11 -+ vuzp.8 q12, q13 -+ vuzp.8 q14, q15 -+ subs r12, #64 -+ -+ @ Rearrange regs so we can use vst1 with 4 regs -+ vswp q1, q2 -+ vswp q5, q6 -+ vswp q9, q10 -+ vswp q13, q14 -+ blt 2f -+ -+ vst1.8 {d0, d1, d2, d3 }, [r0]! -+ vst1.8 {d8, d9, d10, d11}, [r0]! -+ vst1.8 {d16, d17, d18, d19}, [r0]! -+ vst1.8 {d24, d25, d26, d27}, [r0]! -+ -+ vst1.8 {d4, d5, d6, d7 }, [r2]! -+ vst1.8 {d12, d13, d14, d15}, [r2]! -+ vst1.8 {d20, d21, d22, d23}, [r2]! -+ vst1.8 {d28, d29, d30, d31}, [r2]! -+ bne 1b -+11: -+ subs r7, #1 -+ add r5, #128 -+ add r0, r1 -+ add r2, r3 -+ bne 10b -+ vpop {q4-q7} -+ pop {r4-r8,pc} -+ -+2: -+ cmp r12, #64-128 -+ blt 1f -+ vst1.8 {d0, d1, d2, d3 }, [r0]! -+ vst1.8 {d8, d9, d10, d11}, [r0]! -+ vst1.8 {d4, d5, d6, d7 }, [r2]! -+ vst1.8 {d12, d13, d14, d15}, [r2]! -+ beq 11b -+ sub r12, #64 -+ vmov q0, q8 -+ vmov q1, q9 -+ vmov q2, q10 -+ vmov q3, q11 -+ vmov q4, q12 -+ vmov q5, q13 -+ vmov q6, q14 -+ vmov q7, q15 -+1: -+ cmp r12, #32-128 -+ blt 1f -+ vst1.8 {d0, d1, d2, d3 }, [r0]! -+ vst1.8 {d4, d5, d6, d7 }, [r2]! -+ beq 11b -+ sub r12, #32 -+ vmov q0, q4 -+ vmov q1, q5 -+ vmov q2, q6 -+ vmov q3, q7 -+1: -+ cmp r12, #16-128 -+ blt 1f -+ vst1.8 {d0, d1 }, [r0]! -+ vst1.8 {d4, d5 }, [r2]! -+ beq 11b -+ sub r12, #16 -+ vmov q0, q1 -+ vmov q2, q3 -+1: -+ cmp r12, #8-128 -+ blt 1f -+ vst1.8 {d0}, [r0]! -+ vst1.8 {d4}, [r2]! -+ beq 11b -+ sub r12, #8 -+ vmov d0, d1 -+ vmov d4, d5 -+1: -+ cmp r12, #4-128 -+ blt 1f -+ vst1.32 {d0[0]}, [r0]! -+ vst1.32 {d4[0]}, [r2]! -+ beq 11b -+ sub r12, #4 -+ vmov s0, s1 -+ vmov s8, s9 -+1: -+ cmp r12, #2-128 -+ blt 1f -+ vst1.16 {d0[0]}, [r0]! -+ vst1.16 {d4[0]}, [r2]! -+ beq 11b -+ vst1.8 {d0[2]}, [r0]! -+ vst1.8 {d4[2]}, [r2]! -+ b 11b -+1: -+ vst1.8 {d0[0]}, [r0]! -+ vst1.8 {d4[0]}, [r2]! -+ b 11b -+endfunc -+ -+ -+ -+@ void ff_rpi_sand30_lines_to_planar_y16( -+@ uint8_t * dest, // [r0] -+@ unsigned int dst_stride, // [r1] -+@ const uint8_t * src, // [r2] -+@ unsigned int src_stride1, // [r3] Ignored - assumed 128 -+@ unsigned int src_stride2, // [sp, #0] -> r3 -+@ unsigned int _x, // [sp, #4] Ignored - 0 -+@ unsigned int y, // [sp, #8] (r7 in prefix) -+@ unsigned int _w, // [sp, #12] -> r6 (cur r5) -+@ unsigned int h); // [sp, #16] -> r7 -+@ -+@ Assumes that we are starting on a stripe boundary and that overreading -+@ within the stripe is OK. However it does respect the dest size for writing -+ -+function ff_rpi_sand30_lines_to_planar_y16, export=1 -+ push {r4-r8, lr} @ +24 -+ ldr r3, [sp, #24] -+ ldr r6, [sp, #36] -+ ldr r7, [sp, #32] @ y -+ mov r12, #48 -+ sub r3, #1 -+ lsl r3, #7 -+ sub r1, r1, r6, lsl #1 -+ add r8, r2, r7, lsl #7 -+ ldr r7, [sp, #40] -+ -+10: -+ mov r2, r8 -+ add r4, r0, #24 -+ mov r5, r6 -+ mov lr, #0 -+1: -+ vldm r2!, {q10-q13} -+ add lr, #64 -+ -+ vshrn.u32 d4 , q10, #14 @ Cannot vshrn.u32 #20! -+ ands lr, #127 -+ vshrn.u32 d2, q10, #10 -+ vmovn.u32 d0, q10 -+ -+ vshrn.u32 d5, q11, #14 -+ it eq -+ addeq r2, r3 -+ vshrn.u32 d3, q11, #10 -+ vmovn.u32 d1, q11 -+ -+ subs r5, #48 -+ vshr.u16 q2, #6 -+ vbic.u16 q0, #0xfc00 -+ vbic.u16 q1, #0xfc00 -+ -+ vshrn.u32 d20, q12, #14 -+ vshrn.u32 d18, q12, #10 -+ vmovn.u32 d16, q12 -+ -+ vshrn.u32 d21, q13, #14 -+ vshrn.u32 d19, q13, #10 -+ vmovn.u32 d17, q13 -+ -+ vshr.u16 q10, #6 -+ vbic.u16 q8, #0xfc00 -+ vbic.u16 q9 , #0xfc00 -+ blt 2f -+ -+ vst3.16 {d0, d2, d4}, [r0], r12 -+ vst3.16 {d1, d3, d5}, [r4], r12 -+ vst3.16 {d16, d18, d20}, [r0], r12 -+ vst3.16 {d17, d19, d21}, [r4], r12 -+ -+ bne 1b -+ -+11: -+ subs r7, #1 -+ add r0, r1 -+ add r8, #128 -+ bne 10b -+ -+ pop {r4-r8, pc} -+ -+@ Partial final write -+2: -+ cmp r5, #24-48 -+ blt 1f -+ vst3.16 {d0, d2, d4}, [r0], r12 -+ vst3.16 {d1, d3, d5}, [r4] -+ beq 11b -+ vmov q0, q8 -+ sub r5, #24 -+ vmov q1, q9 -+ vmov q2, q10 -+1: -+ cmp r5, #12-48 -+ blt 1f -+ vst3.16 {d0, d2, d4}, [r0]! -+ beq 11b -+ vmov d0, d1 -+ sub r5, #12 -+ vmov d2, d3 -+ vmov d4, d5 -+1: -+ cmp r5, #6-48 -+ add r4, r0, #6 @ avoid [r0]! on sequential instructions -+ blt 1f -+ vst3.16 {d0[0], d2[0], d4[0]}, [r0] -+ vst3.16 {d0[1], d2[1], d4[1]}, [r4] -+ add r0, #12 -+ beq 11b -+ vmov s0, s1 -+ sub r5, #6 -+ vmov s4, s5 -+ vmov s8, s9 -+1: -+ cmp r5, #3-48 -+ blt 1f -+ vst3.16 {d0[0], d2[0], d4[0]}, [r0]! -+ beq 11b -+ sub r5, #3 -+ vshr.u32 d0, #16 -+ vshr.u32 d2, #16 -+1: -+ cmp r5, #2-48 -+ blt 1f -+ vst2.16 {d0[0], d2[0]}, [r0]! -+ b 11b -+1: -+ vst1.16 {d0[0]}, [r0]! -+ b 11b -+ -+endfunc -+ -+ -+@ void ff_rpi_sand30_lines_to_planar_c16( -+@ uint8_t * dst_u, // [r0] -+@ unsigned int dst_stride_u, // [r1] -+@ uint8_t * dst_v, // [r2] -+@ unsigned int dst_stride_v, // [r3] -+@ const uint8_t * src, // [sp, #0] -> r4, r5 -+@ unsigned int stride1, // [sp, #4] 128 -+@ unsigned int stride2, // [sp, #8] -> r8 -+@ unsigned int _x, // [sp, #12] 0 -+@ unsigned int y, // [sp, #16] (r7 in prefix) -+@ unsigned int _w, // [sp, #20] -> r6, r9 -+@ unsigned int h); // [sp, #24] -> r7 -+@ -+@ Assumes that we are starting on a stripe boundary and that overreading -+@ within the stripe is OK. However it does respect the dest size for writing -+ -+function ff_rpi_sand30_lines_to_planar_c16, export=1 -+ push {r4-r10, lr} @ +32 -+ ldr r5, [sp, #32] -+ ldr r8, [sp, #40] -+ ldr r7, [sp, #48] -+ ldr r9, [sp, #52] -+ mov r12, #48 -+ sub r8, #1 -+ lsl r8, #7 -+ add r5, r5, r7, lsl #7 -+ sub r1, r1, r9, lsl #1 -+ sub r3, r3, r9, lsl #1 -+ ldr r7, [sp, #56] -+10: -+ mov lr, #0 -+ mov r4, r5 -+ mov r6, r9 -+1: -+ vldm r4!, {q0-q3} -+ add lr, #64 -+ -+ @ N.B. unpack [0,1,2] -> (reg order) 1, 0, 2 -+ vshrn.u32 d20, q0, #14 -+ vmovn.u32 d18, q0 -+ vshrn.u32 d0, q0, #10 -+ ands lr, #127 -+ -+ vshrn.u32 d21, q1, #14 -+ vmovn.u32 d19, q1 -+ vshrn.u32 d1, q1, #10 -+ -+ vshrn.u32 d22, q2, #10 -+ vmovn.u32 d2, q2 -+ vshrn.u32 d4, q2, #14 -+ -+ add r10, r0, #24 -+ vshrn.u32 d23, q3, #10 -+ vmovn.u32 d3, q3 -+ vshrn.u32 d5, q3, #14 -+ -+ it eq -+ addeq r4, r8 -+ vuzp.16 q0, q11 -+ vuzp.16 q9, q1 -+ vuzp.16 q10, q2 -+ -+ @ q0 V0, V3,.. -+ @ q9 U0, U3... -+ @ q10 U1, U4... -+ @ q11 U2, U5,.. -+ @ q1 V1, V4, -+ @ q2 V2, V5,.. -+ -+ subs r6, #24 -+ vbic.u16 q11, #0xfc00 -+ vbic.u16 q9, #0xfc00 -+ vshr.u16 q10, #6 -+ vshr.u16 q2, #6 -+ vbic.u16 q0, #0xfc00 -+ vbic.u16 q1, #0xfc00 -+ -+ blt 2f -+ -+ vst3.16 {d18, d20, d22}, [r0], r12 -+ vst3.16 {d19, d21, d23}, [r10] -+ add r10, r2, #24 -+ vst3.16 {d0, d2, d4}, [r2], r12 -+ vst3.16 {d1, d3, d5}, [r10] -+ -+ bne 1b -+ -+11: -+ subs r7, #1 -+ add r5, #128 -+ add r0, r1 -+ add r2, r3 -+ bne 10b -+ -+ pop {r4-r10, pc} -+ -+@ Partial final write -+2: -+ cmp r6, #-12 -+ blt 1f -+ vst3.16 {d18, d20, d22}, [r0]! -+ vst3.16 {d0, d2, d4}, [r2]! -+ beq 11b -+ vmov d18, d19 -+ vmov d20, d21 -+ vmov d22, d23 -+ sub r6, #12 -+ vmov d0, d1 -+ vmov d2, d3 -+ vmov d4, d5 -+1: -+ cmp r6, #-18 -+ @ Rezip here as it makes the remaining tail handling easier -+ vzip.16 d0, d18 -+ vzip.16 d2, d20 -+ vzip.16 d4, d22 -+ blt 1f -+ vst3.16 {d0[1], d2[1], d4[1]}, [r0]! -+ vst3.16 {d0[0], d2[0], d4[0]}, [r2]! -+ vst3.16 {d0[3], d2[3], d4[3]}, [r0]! -+ vst3.16 {d0[2], d2[2], d4[2]}, [r2]! -+ beq 11b -+ vmov d0, d18 -+ vmov d2, d20 -+ sub r6, #6 -+ vmov d4, d22 -+1: -+ cmp r6, #-21 -+ blt 1f -+ vst3.16 {d0[1], d2[1], d4[1]}, [r0]! -+ vst3.16 {d0[0], d2[0], d4[0]}, [r2]! -+ beq 11b -+ vmov s4, s5 -+ sub r6, #3 -+ vmov s0, s1 -+1: -+ cmp r6, #-22 -+ blt 1f -+ vst2.16 {d0[1], d2[1]}, [r0]! -+ vst2.16 {d0[0], d2[0]}, [r2]! -+ b 11b -+1: -+ vst1.16 {d0[1]}, [r0]! -+ vst1.16 {d0[0]}, [r2]! -+ b 11b -+ -+endfunc -+ -+@ void ff_rpi_sand30_lines_to_planar_p010( -+@ uint8_t * dest, // [r0] -+@ unsigned int dst_stride, // [r1] -+@ const uint8_t * src, // [r2] -+@ unsigned int src_stride1, // [r3] Ignored - assumed 128 -+@ unsigned int src_stride2, // [sp, #0] -> r3 -+@ unsigned int _x, // [sp, #4] Ignored - 0 -+@ unsigned int y, // [sp, #8] (r7 in prefix) -+@ unsigned int _w, // [sp, #12] -> r6 (cur r5) -+@ unsigned int h); // [sp, #16] -> r7 -+@ -+@ Assumes that we are starting on a stripe boundary and that overreading -+@ within the stripe is OK. However it does respect the dest size for writing -+ -+function ff_rpi_sand30_lines_to_planar_p010, export=1 -+ push {r4-r8, lr} @ +24 -+ ldr r3, [sp, #24] -+ ldr r6, [sp, #36] -+ ldr r7, [sp, #32] @ y -+ mov r12, #48 -+ vmov.u16 q15, #0xffc0 -+ sub r3, #1 -+ lsl r3, #7 -+ sub r1, r1, r6, lsl #1 -+ add r8, r2, r7, lsl #7 -+ ldr r7, [sp, #40] -+ -+10: -+ mov r2, r8 -+ add r4, r0, #24 -+ mov r5, r6 -+ mov lr, #0 -+1: -+ vldm r2!, {q10-q13} -+ add lr, #64 -+ -+ vshl.u32 q14, q10, #6 -+ ands lr, #127 -+ vshrn.u32 d4, q10, #14 -+ vshrn.u32 d2, q10, #4 -+ vmovn.u32 d0, q14 -+ -+ vshl.u32 q14, q11, #6 -+ it eq -+ addeq r2, r3 -+ vshrn.u32 d5, q11, #14 -+ vshrn.u32 d3, q11, #4 -+ vmovn.u32 d1, q14 -+ -+ subs r5, #48 -+ vand q2, q15 -+ vand q1, q15 -+ vand q0, q15 -+ -+ vshl.u32 q14, q12, #6 -+ vshrn.u32 d20, q12, #14 -+ vshrn.u32 d18, q12, #4 -+ vmovn.u32 d16, q14 -+ -+ vshl.u32 q14, q13, #6 -+ vshrn.u32 d21, q13, #14 -+ vshrn.u32 d19, q13, #4 -+ vmovn.u32 d17, q14 -+ -+ vand q10, q15 -+ vand q9, q15 -+ vand q8, q15 -+ blt 2f -+ -+ vst3.16 {d0, d2, d4}, [r0], r12 -+ vst3.16 {d1, d3, d5}, [r4], r12 -+ vst3.16 {d16, d18, d20}, [r0], r12 -+ vst3.16 {d17, d19, d21}, [r4], r12 -+ -+ bne 1b -+ -+11: -+ subs r7, #1 -+ add r0, r1 -+ add r8, #128 -+ bne 10b -+ -+ pop {r4-r8, pc} -+ -+@ Partial final write -+2: -+ cmp r5, #24-48 -+ blt 1f -+ vst3.16 {d0, d2, d4}, [r0], r12 -+ vst3.16 {d1, d3, d5}, [r4] -+ beq 11b -+ vmov q0, q8 -+ sub r5, #24 -+ vmov q1, q9 -+ vmov q2, q10 -+1: -+ cmp r5, #12-48 -+ blt 1f -+ vst3.16 {d0, d2, d4}, [r0]! -+ beq 11b -+ vmov d0, d1 -+ sub r5, #12 -+ vmov d2, d3 -+ vmov d4, d5 -+1: -+ cmp r5, #6-48 -+ add r4, r0, #6 @ avoid [r0]! on sequential instructions -+ blt 1f -+ vst3.16 {d0[0], d2[0], d4[0]}, [r0] -+ vst3.16 {d0[1], d2[1], d4[1]}, [r4] -+ add r0, #12 -+ beq 11b -+ vmov s0, s1 -+ sub r5, #6 -+ vmov s4, s5 -+ vmov s8, s9 -+1: -+ cmp r5, #3-48 -+ blt 1f -+ vst3.16 {d0[0], d2[0], d4[0]}, [r0]! -+ beq 11b -+ sub r5, #3 -+ vshr.u32 d0, #16 -+ vshr.u32 d2, #16 -+1: -+ cmp r5, #2-48 -+ blt 1f -+ vst2.16 {d0[0], d2[0]}, [r0]! -+ b 11b -+1: -+ vst1.16 {d0[0]}, [r0]! -+ b 11b -+ -+endfunc -+ -+ -+@ void ff_rpi_sand30_lines_to_planar_y8( -+@ uint8_t * dest, // [r0] -+@ unsigned int dst_stride, // [r1] -+@ const uint8_t * src, // [r2] -+@ unsigned int src_stride1, // [r3] Ignored - assumed 128 -+@ unsigned int src_stride2, // [sp, #0] -> r3 -+@ unsigned int _x, // [sp, #4] Ignored - 0 -+@ unsigned int y, // [sp, #8] (r7 in prefix) -+@ unsigned int _w, // [sp, #12] -> r6 (cur r5) -+@ unsigned int h); // [sp, #16] -> r7 -+@ -+@ Assumes that we are starting on a stripe boundary and that overreading -+@ within the stripe is OK. However it does respect the dest size for wri -+ -+function ff_rpi_sand30_lines_to_planar_y8, export=1 -+ push {r4-r8, lr} @ +24 -+ ldr r3, [sp, #24] -+ ldr r6, [sp, #36] -+ ldr r7, [sp, #32] @ y -+ mov r12, #48 -+ lsl r3, #7 -+ sub r1, r1, r6 -+ add r8, r2, r7, lsl #7 -+ ldr r7, [sp, #40] -+ -+10: -+ mov r2, r8 -+ add r4, r0, #24 -+ mov r5, r6 -+1: -+ vldm r2, {q8-q15} -+ -+ subs r5, #96 -+ -+ vmovn.u32 d0, q8 -+ vshrn.u32 d2, q8, #12 -+ vshrn.u32 d4, q8, #16 @ Cannot vshrn.u32 #20! -+ -+ add r2, r3 -+ -+ vmovn.u32 d1, q9 -+ vshrn.u32 d3, q9, #12 -+ vshrn.u32 d5, q9, #16 -+ -+ pld [r2, #0] -+ -+ vshrn.u16 d0, q0, #2 -+ vmovn.u16 d1, q1 -+ vshrn.u16 d2, q2, #6 -+ -+ vmovn.u32 d16, q10 -+ vshrn.u32 d18, q10, #12 -+ vshrn.u32 d20, q10, #16 -+ -+ vmovn.u32 d17, q11 -+ vshrn.u32 d19, q11, #12 -+ vshrn.u32 d21, q11, #16 -+ -+ pld [r2, #64] -+ -+ vshrn.u16 d4, q8, #2 -+ vmovn.u16 d5, q9 -+ vshrn.u16 d6, q10, #6 -+ -+ vmovn.u32 d16, q12 -+ vshrn.u32 d18, q12, #12 -+ vshrn.u32 d20, q12, #16 -+ -+ vmovn.u32 d17, q13 -+ vshrn.u32 d19, q13, #12 -+ vshrn.u32 d21, q13, #16 -+ -+ vshrn.u16 d16, q8, #2 -+ vmovn.u16 d17, q9 -+ vshrn.u16 d18, q10, #6 -+ -+ vmovn.u32 d20, q14 -+ vshrn.u32 d22, q14, #12 -+ vshrn.u32 d24, q14, #16 -+ -+ vmovn.u32 d21, q15 -+ vshrn.u32 d23, q15, #12 -+ vshrn.u32 d25, q15, #16 -+ -+ vshrn.u16 d20, q10, #2 -+ vmovn.u16 d21, q11 -+ vshrn.u16 d22, q12, #6 -+ -+ blt 2f -+ -+ vst3.8 {d0, d1, d2}, [r0], r12 -+ vst3.8 {d4, d5, d6}, [r4], r12 -+ vst3.8 {d16, d17, d18}, [r0], r12 -+ vst3.8 {d20, d21, d22}, [r4], r12 -+ -+ bne 1b -+ -+11: -+ subs r7, #1 -+ add r0, r1 -+ add r8, #128 -+ bne 10b -+ -+ pop {r4-r8, pc} -+ -+@ Partial final write -+2: -+ cmp r5, #48-96 -+ blt 1f -+ vst3.8 {d0, d1, d2}, [r0], r12 -+ vst3.8 {d4, d5, d6}, [r4], r12 -+ beq 11b -+ vmov q0, q8 -+ vmov q2, q10 -+ sub r5, #48 -+ vmov d2, d18 -+ vmov d6, d22 -+1: -+ cmp r5, #24-96 -+ blt 1f -+ vst3.8 {d0, d1, d2}, [r0]! -+ beq 11b -+ vmov q0, q2 -+ sub r5, #24 -+ vmov d2, d6 -+1: -+ cmp r5, #12-96 -+ blt 1f -+ vst3.8 {d0[0], d1[0], d2[0]}, [r0]! -+ vst3.8 {d0[1], d1[1], d2[1]}, [r0]! -+ vst3.8 {d0[2], d1[2], d2[2]}, [r0]! -+ vst3.8 {d0[3], d1[3], d2[3]}, [r0]! -+ beq 11b -+ vmov s0, s1 -+ sub r5, #12 -+ vmov s2, s3 -+ vmov s4, s5 -+1: -+ cmp r5, #6-96 -+ blt 1f -+ vst3.8 {d0[0], d1[0], d2[0]}, [r0]! -+ vst3.8 {d0[1], d1[1], d2[1]}, [r0]! -+ add r0, #12 -+ beq 11b -+ vshr.u32 d0, #16 -+ sub r5, #6 -+ vshr.u32 d1, #16 -+ vshr.u32 d2, #16 -+1: -+ cmp r5, #3-96 -+ blt 1f -+ vst3.8 {d0[0], d1[0], d2[0]}, [r0]! -+ beq 11b -+ sub r5, #3 -+ vshr.u32 d0, #8 -+ vshr.u32 d1, #8 -+1: -+ cmp r5, #2-96 -+ blt 1f -+ vst2.8 {d0[0], d1[0]}, [r0]! -+ b 11b -+1: -+ vst1.8 {d0[0]}, [r0]! -+ b 11b -+ -+endfunc -+ -+ ---- /dev/null -+++ b/libavutil/arm/rpi_sand_neon.h -@@ -0,0 +1,110 @@ -+/* -+Copyright (c) 2020 Raspberry Pi (Trading) Ltd. -+All rights reserved. -+ -+Redistribution and use in source and binary forms, with or without -+modification, are permitted provided that the following conditions are met: -+ * Redistributions of source code must retain the above copyright -+ notice, this list of conditions and the following disclaimer. -+ * Redistributions in binary form must reproduce the above copyright -+ notice, this list of conditions and the following disclaimer in the -+ documentation and/or other materials provided with the distribution. -+ * Neither the name of the copyright holder nor the -+ names of its contributors may be used to endorse or promote products -+ derived from this software without specific prior written permission. -+ -+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ -+Authors: John Cox -+*/ -+ -+#ifndef AVUTIL_ARM_SAND_NEON_H -+#define AVUTIL_ARM_SAND_NEON_H -+ -+void ff_rpi_sand128b_stripe_to_8_10( -+ uint8_t * dest, // [r0] -+ const uint8_t * src1, // [r1] -+ const uint8_t * src2, // [r2] -+ unsigned int lines); // [r3] -+ -+void ff_rpi_sand8_lines_to_planar_y8( -+ uint8_t * dest, // [r0] -+ unsigned int dst_stride, // [r1] -+ const uint8_t * src, // [r2] -+ unsigned int src_stride1, // [r3] Ignored - assumed 128 -+ unsigned int src_stride2, // [sp, #0] -> r3 -+ unsigned int _x, // [sp, #4] Ignored - 0 -+ unsigned int y, // [sp, #8] (r7 in prefix) -+ unsigned int _w, // [sp, #12] -> r6 (cur r5) -+ unsigned int h); // [sp, #16] -> r7 -+ -+void ff_rpi_sand8_lines_to_planar_c8( -+ uint8_t * dst_u, // [r0] -+ unsigned int dst_stride_u, // [r1] -+ uint8_t * dst_v, // [r2] -+ unsigned int dst_stride_v, // [r3] -+ const uint8_t * src, // [sp, #0] -> r4, r5 -+ unsigned int stride1, // [sp, #4] 128 -+ unsigned int stride2, // [sp, #8] -> r8 -+ unsigned int _x, // [sp, #12] 0 -+ unsigned int y, // [sp, #16] (r7 in prefix) -+ unsigned int _w, // [sp, #20] -> r12, r6 -+ unsigned int h); // [sp, #24] -> r7 -+ -+void ff_rpi_sand30_lines_to_planar_y16( -+ uint8_t * dest, // [r0] -+ unsigned int dst_stride, // [r1] -+ const uint8_t * src, // [r2] -+ unsigned int src_stride1, // [r3] Ignored - assumed 128 -+ unsigned int src_stride2, // [sp, #0] -> r3 -+ unsigned int _x, // [sp, #4] Ignored - 0 -+ unsigned int y, // [sp, #8] (r7 in prefix) -+ unsigned int _w, // [sp, #12] -> r6 (cur r5) -+ unsigned int h); // [sp, #16] -> r7 -+ -+void ff_rpi_sand30_lines_to_planar_c16( -+ uint8_t * dst_u, // [r0] -+ unsigned int dst_stride_u, // [r1] -+ uint8_t * dst_v, // [r2] -+ unsigned int dst_stride_v, // [r3] -+ const uint8_t * src, // [sp, #0] -> r4, r5 -+ unsigned int stride1, // [sp, #4] 128 -+ unsigned int stride2, // [sp, #8] -> r8 -+ unsigned int _x, // [sp, #12] 0 -+ unsigned int y, // [sp, #16] (r7 in prefix) -+ unsigned int _w, // [sp, #20] -> r6, r9 -+ unsigned int h); // [sp, #24] -> r7 -+ -+void ff_rpi_sand30_lines_to_planar_p010( -+ uint8_t * dest, // [r0] -+ unsigned int dst_stride, // [r1] -+ const uint8_t * src, // [r2] -+ unsigned int src_stride1, // [r3] Ignored - assumed 128 -+ unsigned int src_stride2, // [sp, #0] -> r3 -+ unsigned int _x, // [sp, #4] Ignored - 0 -+ unsigned int y, // [sp, #8] (r7 in prefix) -+ unsigned int _w, // [sp, #12] -> r6 (cur r5) -+ unsigned int h); // [sp, #16] -> r7 -+ -+void ff_rpi_sand30_lines_to_planar_y8( -+ uint8_t * dest, // [r0] -+ unsigned int dst_stride, // [r1] -+ const uint8_t * src, // [r2] -+ unsigned int src_stride1, // [r3] Ignored - assumed 128 -+ unsigned int src_stride2, // [sp, #0] -> r3 -+ unsigned int _x, // [sp, #4] Ignored - 0 -+ unsigned int y, // [sp, #8] (r7 in prefix) -+ unsigned int _w, // [sp, #12] -> r6 (cur r5) -+ unsigned int h); // [sp, #16] -> r7 -+ -+#endif // AVUTIL_ARM_SAND_NEON_H -+ ---- a/libavutil/frame.c -+++ b/libavutil/frame.c -@@ -16,6 +16,8 @@ - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -+#include "config.h" -+ - #include "channel_layout.h" - #include "avassert.h" - #include "buffer.h" -@@ -26,6 +28,9 @@ - #include "mem.h" - #include "samplefmt.h" - #include "hwcontext.h" -+#if CONFIG_SAND -+#include "rpi_sand_fns.h" -+#endif - - #if FF_API_FRAME_GET_SET - MAKE_ACCESSORS(AVFrame, frame, int64_t, best_effort_timestamp) -@@ -902,6 +907,12 @@ int av_frame_apply_cropping(AVFrame *fra - (frame->crop_top + frame->crop_bottom) >= frame->height) - return AVERROR(ERANGE); - -+#if CONFIG_SAND -+ // Sand cannot be cropped - do not try -+ if (av_rpi_is_sand_format(frame->format)) -+ return 0; -+#endif -+ - desc = av_pix_fmt_desc_get(frame->format); - if (!desc) - return AVERROR_BUG; ---- a/libavutil/frame.h -+++ b/libavutil/frame.h -@@ -968,6 +968,16 @@ int av_frame_apply_cropping(AVFrame *fra - */ - const char *av_frame_side_data_name(enum AVFrameSideDataType type); - -+ -+static inline int av_frame_cropped_width(const AVFrame * const frame) -+{ -+ return frame->width - (frame->crop_left + frame->crop_right); -+} -+static inline int av_frame_cropped_height(const AVFrame * const frame) -+{ -+ return frame->height - (frame->crop_top + frame->crop_bottom); -+} -+ - /** - * @} - */ ---- a/libavutil/hwcontext_drm.c -+++ b/libavutil/hwcontext_drm.c -@@ -19,8 +19,10 @@ - #include - #include - #include -+#include - - #include -+#include - #include - - #include "avassert.h" -@@ -28,6 +30,11 @@ - #include "hwcontext_drm.h" - #include "hwcontext_internal.h" - #include "imgutils.h" -+#include "libavutil/rpi_sand_fns.h" -+ -+#include -+#include -+#include - - - static void drm_device_free(AVHWDeviceContext *hwdev) -@@ -43,6 +50,11 @@ static int drm_device_create(AVHWDeviceC - AVDRMDeviceContext *hwctx = hwdev->hwctx; - drmVersionPtr version; - -+ if (device == NULL) { -+ hwctx->fd = -1; -+ return 0; -+ } -+ - hwctx->fd = open(device, O_RDWR); - if (hwctx->fd < 0) - return AVERROR(errno); -@@ -85,18 +97,37 @@ static int drm_get_buffer(AVHWFramesCont - typedef struct DRMMapping { - // Address and length of each mmap()ed region. - int nb_regions; -+ unsigned int dmaflags; - void *address[AV_DRM_MAX_PLANES]; - size_t length[AV_DRM_MAX_PLANES]; -+ int fds[AV_DRM_MAX_PLANES]; - } DRMMapping; - -+static int dmasync(const int fd, const unsigned int flags) -+{ -+ struct dma_buf_sync sync = { -+ .flags = flags -+ }; -+ while (ioctl(fd, DMA_BUF_IOCTL_SYNC, &sync) == -1) { -+ const int err = errno; -+ if (errno == EINTR) -+ continue; -+ av_log(NULL, AV_LOG_WARNING, "%s: ioctl failed: flags=%#x\n", __func__, flags); -+ return -err; -+ } -+ return 0; -+} -+ - static void drm_unmap_frame(AVHWFramesContext *hwfc, - HWMapDescriptor *hwmap) - { - DRMMapping *map = hwmap->priv; - int i; - -- for (i = 0; i < map->nb_regions; i++) -+ for (i = 0; i < map->nb_regions; i++) { - munmap(map->address[i], map->length[i]); -+ dmasync(map->fds[i], DMA_BUF_SYNC_END | map->dmaflags); -+ } - - av_free(map); - } -@@ -114,15 +145,28 @@ static int drm_map_frame(AVHWFramesConte - if (!map) - return AVERROR(ENOMEM); - -+ for (i = 0; i < AV_DRM_MAX_PLANES; i++) -+ map->fds[i] = -1; -+ - mmap_prot = 0; -- if (flags & AV_HWFRAME_MAP_READ) -+ if (flags & AV_HWFRAME_MAP_READ) { -+ map->dmaflags |= DMA_BUF_SYNC_READ; - mmap_prot |= PROT_READ; -- if (flags & AV_HWFRAME_MAP_WRITE) -+ } -+ if (flags & AV_HWFRAME_MAP_WRITE) { -+ map->dmaflags |= DMA_BUF_SYNC_WRITE; - mmap_prot |= PROT_WRITE; -+ } -+ -+ if (dst->format == AV_PIX_FMT_NONE) -+ dst->format = hwfc->sw_format; - - av_assert0(desc->nb_objects <= AV_DRM_MAX_PLANES); - for (i = 0; i < desc->nb_objects; i++) { -- addr = mmap(NULL, desc->objects[i].size, mmap_prot, MAP_SHARED, -+ dmasync(desc->objects[i].fd, DMA_BUF_SYNC_START | map->dmaflags); -+ map->fds[i] = desc->objects[i].fd; -+ -+ addr = mmap(NULL, desc->objects[i].size, mmap_prot, MAP_SHARED | MAP_POPULATE, - desc->objects[i].fd, 0); - if (addr == MAP_FAILED) { - err = AVERROR(errno); -@@ -151,6 +195,23 @@ static int drm_map_frame(AVHWFramesConte - - dst->width = src->width; - dst->height = src->height; -+ dst->crop_top = src->crop_top; -+ dst->crop_bottom = src->crop_bottom; -+ dst->crop_left = src->crop_left; -+ dst->crop_right = src->crop_right; -+ -+#if CONFIG_SAND -+ // Rework for sand frames -+ if (av_rpi_is_sand_frame(dst)) { -+ // As it stands the sand formats hold stride2 in linesize[3] -+ // linesize[0] & [1] contain stride1 which is always 128 for everything we do -+ // * Arguably this should be reworked s.t. stride2 is in linesize[0] & [1] -+ dst->linesize[3] = fourcc_mod_broadcom_param(desc->objects[0].format_modifier); -+ dst->linesize[0] = 128; -+ dst->linesize[1] = 128; -+ // *** Are we sure src->height is actually what we want ??? -+ } -+#endif - - err = ff_hwframe_map_create(src->hw_frames_ctx, dst, src, - &drm_unmap_frame, map); -@@ -160,7 +221,9 @@ static int drm_map_frame(AVHWFramesConte - return 0; - - fail: -- for (i = 0; i < desc->nb_objects; i++) { -+ for (i = 0; i < AV_DRM_MAX_PLANES; i++) { -+ if (map->fds[i] != -1) -+ dmasync(map->fds[i], DMA_BUF_SYNC_END | map->dmaflags); - if (map->address[i]) - munmap(map->address[i], map->length[i]); - } -@@ -172,16 +235,29 @@ static int drm_transfer_get_formats(AVHW - enum AVHWFrameTransferDirection dir, - enum AVPixelFormat **formats) - { -- enum AVPixelFormat *pix_fmts; -+ enum AVPixelFormat *p; - -- pix_fmts = av_malloc_array(2, sizeof(*pix_fmts)); -- if (!pix_fmts) -+ p = *formats = av_malloc_array(3, sizeof(*p)); -+ if (!p) - return AVERROR(ENOMEM); - -- pix_fmts[0] = ctx->sw_format; -- pix_fmts[1] = AV_PIX_FMT_NONE; -+ // **** Offer native sand too ???? -+ *p++ = -+#if CONFIG_SAND -+ ctx->sw_format == AV_PIX_FMT_RPI4_8 || ctx->sw_format == AV_PIX_FMT_SAND128 ? -+ AV_PIX_FMT_YUV420P : -+ ctx->sw_format == AV_PIX_FMT_RPI4_10 ? -+ AV_PIX_FMT_YUV420P10LE : -+#endif -+ ctx->sw_format; -+ -+#if CONFIG_SAND -+ if (ctx->sw_format == AV_PIX_FMT_RPI4_10 || -+ ctx->sw_format == AV_PIX_FMT_RPI4_8 || ctx->sw_format == AV_PIX_FMT_SAND128) -+ *p++ = AV_PIX_FMT_NV12; -+#endif - -- *formats = pix_fmts; -+ *p = AV_PIX_FMT_NONE; - return 0; - } - -@@ -197,18 +273,63 @@ static int drm_transfer_data_from(AVHWFr - map = av_frame_alloc(); - if (!map) - return AVERROR(ENOMEM); -- map->format = dst->format; - -+ // Map to default -+ map->format = AV_PIX_FMT_NONE; - err = drm_map_frame(hwfc, map, src, AV_HWFRAME_MAP_READ); - if (err) - goto fail; - -- map->width = dst->width; -- map->height = dst->height; -+#if 0 -+ av_log(hwfc, AV_LOG_INFO, "%s: src fmt=%d (%d), dst fmt=%d (%d) s=%dx%d l=%d/%d/%d/%d, d=%dx%d l=%d/%d/%d\n", __func__, -+ map->hwfc_format, AV_PIX_FMT_RPI4_8, dst->format, AV_PIX_FMT_YUV420P10LE, -+ map->width, map->height, -+ map->linesize[0], -+ map->linesize[1], -+ map->linesize[2], -+ map->linesize[3], -+ dst->width, dst->height, -+ dst->linesize[0], -+ dst->linesize[1], -+ dst->linesize[2]); -+#endif -+#if CONFIG_SAND -+ if (av_rpi_is_sand_frame(map)) { -+ // Preserve crop - later ffmpeg code assumes that we have in that it -+ // overwrites any crop that we create with the old values -+ unsigned int stride2 = map->linesize[3]; -+ const unsigned int w = FFMIN(dst->width, map->width); -+ const unsigned int h = FFMIN(dst->height, map->height); -+ -+ map->crop_top = 0; -+ map->crop_bottom = 0; -+ map->crop_left = 0; -+ map->crop_right = 0; -+ -+ if (av_rpi_sand_to_planar_frame(dst, map) != 0) -+ { -+ av_log(hwfc, AV_LOG_ERROR, "%s: Incompatible output pixfmt for sand\n", __func__); -+ err = AVERROR(EINVAL); -+ goto fail; -+ } -+ -+ dst->width = w; -+ dst->height = h; -+ } -+ else -+#endif -+ { -+ // Kludge mapped h/w s.t. frame_copy works -+ map->width = dst->width; -+ map->height = dst->height; -+ err = av_frame_copy(dst, map); -+ } - -- err = av_frame_copy(dst, map); - if (err) -+ { -+ av_log(hwfc, AV_LOG_ERROR, "%s: Copy fail\n", __func__); - goto fail; -+ } - - err = 0; - fail: -@@ -223,7 +344,10 @@ static int drm_transfer_data_to(AVHWFram - int err; - - if (src->width > hwfc->width || src->height > hwfc->height) -+ { -+ av_log(hwfc, AV_LOG_ERROR, "%s: H/w mismatch: %d/%d, %d/%d\n", __func__, dst->width, hwfc->width, dst->height, hwfc->height); - return AVERROR(EINVAL); -+ } - - map = av_frame_alloc(); - if (!map) ---- a/libavutil/pixdesc.c -+++ b/libavutil/pixdesc.c -@@ -2371,6 +2371,50 @@ static const AVPixFmtDescriptor av_pix_f - .name = "vulkan", - .flags = AV_PIX_FMT_FLAG_HWACCEL, - }, -+ [AV_PIX_FMT_SAND128] = { -+ .name = "sand128", -+ .nb_components = 3, -+ .log2_chroma_w = 1, -+ .log2_chroma_h = 1, -+ .comp = { -+ { 0, 1, 0, 0, 8, 0, 7, 1 }, /* Y */ -+ { 1, 2, 0, 0, 8, 1, 7, 1 }, /* U */ -+ { 1, 2, 1, 0, 8, 1, 7, 2 }, /* V */ -+ }, -+ .flags = 0, -+ }, -+ [AV_PIX_FMT_SAND64_10] = { -+ .name = "sand64_10", -+ .nb_components = 3, -+ .log2_chroma_w = 1, -+ .log2_chroma_h = 1, -+ .comp = { -+ { 0, 2, 0, 0, 10, 0, 9, 1 }, /* Y */ -+ { 1, 4, 0, 0, 10, 3, 9, 1 }, /* U */ -+ { 1, 4, 2, 0, 10, 3, 9, 3 }, /* V */ -+ }, -+ .flags = 0, -+ }, -+ [AV_PIX_FMT_SAND64_16] = { -+ .name = "sand64_16", -+ .nb_components = 3, -+ .log2_chroma_w = 1, -+ .log2_chroma_h = 1, -+ .comp = { -+ { 0, 2, 0, 0, 16, 0, 15, 1 }, /* Y */ -+ { 1, 4, 0, 0, 16, 3, 15, 1 }, /* U */ -+ { 1, 4, 2, 0, 16, 3, 15, 3 }, /* V */ -+ }, -+ .flags = 0, -+ }, -+ [AV_PIX_FMT_RPI4_8] = { -+ .name = "rpi4_8", -+ .flags = AV_PIX_FMT_FLAG_HWACCEL, -+ }, -+ [AV_PIX_FMT_RPI4_10] = { -+ .name = "rpi4_10", -+ .flags = AV_PIX_FMT_FLAG_HWACCEL, -+ }, - }; - #if FF_API_PLUS1_MINUS1 - FF_ENABLE_DEPRECATION_WARNINGS ---- a/libavutil/pixfmt.h -+++ b/libavutil/pixfmt.h -@@ -357,6 +357,12 @@ enum AVPixelFormat { - - AV_PIX_FMT_Y210BE, ///< packed YUV 4:2:2 like YUYV422, 20bpp, data in the high bits, big-endian - AV_PIX_FMT_Y210LE, ///< packed YUV 4:2:2 like YUYV422, 20bpp, data in the high bits, little-endian -+// RPI - not on ifdef so can be got at by calling progs -+ AV_PIX_FMT_SAND128, ///< 4:2:0 8-bit 128x*Y stripe, 64x*UV stripe, then next x stripe, mysterious padding -+ AV_PIX_FMT_SAND64_10, ///< 4:2:0 10-bit 64x*Y stripe, 32x*UV stripe, then next x stripe, mysterious padding -+ AV_PIX_FMT_SAND64_16, ///< 4:2:0 16-bit 64x*Y stripe, 32x*UV stripe, then next x stripe, mysterious padding -+ AV_PIX_FMT_RPI4_8, -+ AV_PIX_FMT_RPI4_10, - - AV_PIX_FMT_NB ///< number of pixel formats, DO NOT USE THIS if you want to link with shared libav* because the number of formats might differ between versions - }; ---- /dev/null -+++ b/libavutil/rpi_sand_fn_pw.h -@@ -0,0 +1,227 @@ -+/* -+Copyright (c) 2018 Raspberry Pi (Trading) Ltd. -+All rights reserved. -+ -+Redistribution and use in source and binary forms, with or without -+modification, are permitted provided that the following conditions are met: -+ * Redistributions of source code must retain the above copyright -+ notice, this list of conditions and the following disclaimer. -+ * Redistributions in binary form must reproduce the above copyright -+ notice, this list of conditions and the following disclaimer in the -+ documentation and/or other materials provided with the distribution. -+ * Neither the name of the copyright holder nor the -+ names of its contributors may be used to endorse or promote products -+ derived from this software without specific prior written permission. -+ -+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ -+Authors: John Cox -+*/ -+ -+// * Included twice from rpi_sand_fn with different PW -+ -+#define STRCAT(x,y) x##y -+ -+#if PW == 1 -+#define pixel uint8_t -+#define FUNC(f) STRCAT(f, 8) -+#elif PW == 2 -+#define pixel uint16_t -+#define FUNC(f) STRCAT(f, 16) -+#else -+#error Unexpected PW -+#endif -+ -+// Fetches a single patch - offscreen fixup not done here -+// w <= stride1 -+// unclipped -+void FUNC(av_rpi_sand_to_planar_y)(uint8_t * dst, const unsigned int dst_stride, -+ const uint8_t * src, -+ unsigned int stride1, unsigned int stride2, -+ unsigned int _x, unsigned int y, -+ unsigned int _w, unsigned int h) -+{ -+ const unsigned int x = _x; -+ const unsigned int w = _w; -+ const unsigned int mask = stride1 - 1; -+ -+#if PW == 1 && HAVE_SAND_ASM -+ if (_x == 0) { -+ ff_rpi_sand8_lines_to_planar_y8(dst, dst_stride, -+ src, stride1, stride2, _x, y, _w, h); -+ return; -+ } -+#endif -+ -+ if ((x & ~mask) == ((x + w) & ~mask)) { -+ // All in one sand stripe -+ const uint8_t * p = src + (x & mask) + y * stride1 + (x & ~mask) * stride2; -+ for (unsigned int i = 0; i != h; ++i, dst += dst_stride, p += stride1) { -+ memcpy(dst, p, w); -+ } -+ } -+ else -+ { -+ // Two+ stripe -+ const unsigned int sstride = stride1 * stride2; -+ const uint8_t * p1 = src + (x & mask) + y * stride1 + (x & ~mask) * stride2; -+ const uint8_t * p2 = p1 + sstride - (x & mask); -+ const unsigned int w1 = stride1 - (x & mask); -+ const unsigned int w3 = (x + w) & mask; -+ const unsigned int w2 = w - (w1 + w3); -+ -+ for (unsigned int i = 0; i != h; ++i, dst += dst_stride, p1 += stride1, p2 += stride1) { -+ unsigned int j; -+ const uint8_t * p = p2; -+ uint8_t * d = dst; -+ memcpy(d, p1, w1); -+ d += w1; -+ for (j = 0; j < w2; j += stride1, d += stride1, p += sstride) { -+ memcpy(d, p, stride1); -+ } -+ memcpy(d, p, w3); -+ } -+ } -+} -+ -+// x & w in bytes but not of interleave (i.e. offset = x*2 for U&V) -+ -+void FUNC(av_rpi_sand_to_planar_c)(uint8_t * dst_u, const unsigned int dst_stride_u, -+ uint8_t * dst_v, const unsigned int dst_stride_v, -+ const uint8_t * src, -+ unsigned int stride1, unsigned int stride2, -+ unsigned int _x, unsigned int y, -+ unsigned int _w, unsigned int h) -+{ -+ const unsigned int x = _x * 2; -+ const unsigned int w = _w * 2; -+ const unsigned int mask = stride1 - 1; -+ -+#if PW == 1 && HAVE_SAND_ASM -+ if (_x == 0) { -+ ff_rpi_sand8_lines_to_planar_c8(dst_u, dst_stride_u, dst_v, dst_stride_v, -+ src, stride1, stride2, _x, y, _w, h); -+ return; -+ } -+#endif -+ -+ if ((x & ~mask) == ((x + w) & ~mask)) { -+ // All in one sand stripe -+ const uint8_t * p1 = src + (x & mask) + y * stride1 + (x & ~mask) * stride2; -+ for (unsigned int i = 0; i != h; ++i, dst_u += dst_stride_u, dst_v += dst_stride_v, p1 += stride1) { -+ pixel * du = (pixel *)dst_u; -+ pixel * dv = (pixel *)dst_v; -+ const pixel * p = (const pixel *)p1; -+ for (unsigned int k = 0; k < w; k += 2 * PW) { -+ *du++ = *p++; -+ *dv++ = *p++; -+ } -+ } -+ } -+ else -+ { -+ // Two+ stripe -+ const unsigned int sstride = stride1 * stride2; -+ const unsigned int sstride_p = (sstride - stride1) / PW; -+ -+ const uint8_t * p1 = src + (x & mask) + y * stride1 + (x & ~mask) * stride2; -+ const uint8_t * p2 = p1 + sstride - (x & mask); -+ const unsigned int w1 = stride1 - (x & mask); -+ const unsigned int w3 = (x + w) & mask; -+ const unsigned int w2 = w - (w1 + w3); -+ -+ for (unsigned int i = 0; i != h; ++i, dst_u += dst_stride_u, dst_v += dst_stride_v, p1 += stride1, p2 += stride1) { -+ unsigned int j; -+ const pixel * p = (const pixel *)p1; -+ pixel * du = (pixel *)dst_u; -+ pixel * dv = (pixel *)dst_v; -+ for (unsigned int k = 0; k < w1; k += 2 * PW) { -+ *du++ = *p++; -+ *dv++ = *p++; -+ } -+ for (j = 0, p = (const pixel *)p2; j < w2; j += stride1, p += sstride_p) { -+ for (unsigned int k = 0; k < stride1; k += 2 * PW) { -+ *du++ = *p++; -+ *dv++ = *p++; -+ } -+ } -+ for (unsigned int k = 0; k < w3; k += 2 * PW) { -+ *du++ = *p++; -+ *dv++ = *p++; -+ } -+ } -+ } -+} -+ -+void FUNC(av_rpi_planar_to_sand_c)(uint8_t * dst_c, -+ unsigned int stride1, unsigned int stride2, -+ const uint8_t * src_u, const unsigned int src_stride_u, -+ const uint8_t * src_v, const unsigned int src_stride_v, -+ unsigned int _x, unsigned int y, -+ unsigned int _w, unsigned int h) -+{ -+ const unsigned int x = _x * 2; -+ const unsigned int w = _w * 2; -+ const unsigned int mask = stride1 - 1; -+ if ((x & ~mask) == ((x + w) & ~mask)) { -+ // All in one sand stripe -+ uint8_t * p1 = dst_c + (x & mask) + y * stride1 + (x & ~mask) * stride2; -+ for (unsigned int i = 0; i != h; ++i, src_u += src_stride_u, src_v += src_stride_v, p1 += stride1) { -+ const pixel * su = (const pixel *)src_u; -+ const pixel * sv = (const pixel *)src_v; -+ pixel * p = (pixel *)p1; -+ for (unsigned int k = 0; k < w; k += 2 * PW) { -+ *p++ = *su++; -+ *p++ = *sv++; -+ } -+ } -+ } -+ else -+ { -+ // Two+ stripe -+ const unsigned int sstride = stride1 * stride2; -+ const unsigned int sstride_p = (sstride - stride1) / PW; -+ -+ const uint8_t * p1 = dst_c + (x & mask) + y * stride1 + (x & ~mask) * stride2; -+ const uint8_t * p2 = p1 + sstride - (x & mask); -+ const unsigned int w1 = stride1 - (x & mask); -+ const unsigned int w3 = (x + w) & mask; -+ const unsigned int w2 = w - (w1 + w3); -+ -+ for (unsigned int i = 0; i != h; ++i, src_u += src_stride_u, src_v += src_stride_v, p1 += stride1, p2 += stride1) { -+ unsigned int j; -+ const pixel * su = (const pixel *)src_u; -+ const pixel * sv = (const pixel *)src_v; -+ pixel * p = (pixel *)p1; -+ for (unsigned int k = 0; k < w1; k += 2 * PW) { -+ *p++ = *su++; -+ *p++ = *sv++; -+ } -+ for (j = 0, p = (pixel *)p2; j < w2; j += stride1, p += sstride_p) { -+ for (unsigned int k = 0; k < stride1; k += 2 * PW) { -+ *p++ = *su++; -+ *p++ = *sv++; -+ } -+ } -+ for (unsigned int k = 0; k < w3; k += 2 * PW) { -+ *p++ = *su++; -+ *p++ = *sv++; -+ } -+ } -+ } -+} -+ -+ -+#undef pixel -+#undef STRCAT -+#undef FUNC -+ ---- /dev/null -+++ b/libavutil/rpi_sand_fns.c -@@ -0,0 +1,445 @@ -+/* -+Copyright (c) 2018 Raspberry Pi (Trading) Ltd. -+All rights reserved. -+ -+Redistribution and use in source and binary forms, with or without -+modification, are permitted provided that the following conditions are met: -+ * Redistributions of source code must retain the above copyright -+ notice, this list of conditions and the following disclaimer. -+ * Redistributions in binary form must reproduce the above copyright -+ notice, this list of conditions and the following disclaimer in the -+ documentation and/or other materials provided with the distribution. -+ * Neither the name of the copyright holder nor the -+ names of its contributors may be used to endorse or promote products -+ derived from this software without specific prior written permission. -+ -+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ -+Authors: John Cox -+*/ -+ -+#include "config.h" -+#include -+#include -+#include "rpi_sand_fns.h" -+#include "avassert.h" -+#include "frame.h" -+ -+#if ARCH_ARM && HAVE_NEON -+#include "arm/rpi_sand_neon.h" -+#define HAVE_SAND_ASM 1 -+#elif ARCH_AARCH64 && HAVE_NEON -+#include "aarch64/rpi_sand_neon.h" -+#define HAVE_SAND_ASM 1 -+#else -+#define HAVE_SAND_ASM 0 -+#endif -+ -+#define PW 1 -+#include "rpi_sand_fn_pw.h" -+#undef PW -+ -+#define PW 2 -+#include "rpi_sand_fn_pw.h" -+#undef PW -+ -+#if 1 -+// Simple round -+static void cpy16_to_8(uint8_t * dst, const uint8_t * _src, unsigned int n, const unsigned int shr) -+{ -+ const unsigned int rnd = (1 << shr) >> 1; -+ const uint16_t * src = (const uint16_t *)_src; -+ -+ for (; n != 0; --n) { -+ *dst++ = (*src++ + rnd) >> shr; -+ } -+} -+#else -+// Dithered variation -+static void cpy16_to_8(uint8_t * dst, const uint8_t * _src, unsigned int n, const unsigned int shr) -+{ -+ unsigned int rnd = (1 << shr) >> 1; -+ const unsigned int mask = ((1 << shr) - 1); -+ const uint16_t * src = (const uint16_t *)_src; -+ -+ for (; n != 0; --n) { -+ rnd = *src++ + (rnd & mask); -+ *dst++ = rnd >> shr; -+ } -+} -+#endif -+ -+// Fetches a single patch - offscreen fixup not done here -+// w <= stride1 -+// unclipped -+// _x & _w in pixels, strides in bytes -+void av_rpi_sand30_to_planar_y16(uint8_t * dst, const unsigned int dst_stride, -+ const uint8_t * src, -+ unsigned int stride1, unsigned int stride2, -+ unsigned int _x, unsigned int y, -+ unsigned int _w, unsigned int h) -+{ -+ const unsigned int x0 = (_x / 3) * 4; // Byte offset of the word -+ const unsigned int xskip0 = _x - (x0 >> 2) * 3; -+ const unsigned int x1 = ((_x + _w) / 3) * 4; -+ const unsigned int xrem1 = _x + _w - (x1 >> 2) * 3; -+ const unsigned int mask = stride1 - 1; -+ const uint8_t * p0 = src + (x0 & mask) + y * stride1 + (x0 & ~mask) * stride2; -+ const unsigned int slice_inc = ((stride2 - 1) * stride1) >> 2; // RHS of a stripe to LHS of next in words -+ -+#if HAVE_SAND_ASM -+ if (_x == 0) { -+ ff_rpi_sand30_lines_to_planar_y16(dst, dst_stride, src, stride1, stride2, _x, y, _w, h); -+ return; -+ } -+#endif -+ -+ if (x0 == x1) { -+ // ******************* -+ // Partial single word xfer -+ return; -+ } -+ -+ for (unsigned int i = 0; i != h; ++i, dst += dst_stride, p0 += stride1) -+ { -+ unsigned int x = x0; -+ const uint32_t * p = (const uint32_t *)p0; -+ uint16_t * d = (uint16_t *)dst; -+ -+ if (xskip0 != 0) { -+ const uint32_t p3 = *p++; -+ -+ if (xskip0 == 1) -+ *d++ = (p3 >> 10) & 0x3ff; -+ *d++ = (p3 >> 20) & 0x3ff; -+ -+ if (((x += 4) & mask) == 0) -+ p += slice_inc; -+ } -+ -+ while (x != x1) { -+ const uint32_t p3 = *p++; -+ *d++ = p3 & 0x3ff; -+ *d++ = (p3 >> 10) & 0x3ff; -+ *d++ = (p3 >> 20) & 0x3ff; -+ -+ if (((x += 4) & mask) == 0) -+ p += slice_inc; -+ } -+ -+ if (xrem1 != 0) { -+ const uint32_t p3 = *p; -+ -+ *d++ = p3 & 0x3ff; -+ if (xrem1 == 2) -+ *d++ = (p3 >> 10) & 0x3ff; -+ } -+ } -+} -+ -+ -+void av_rpi_sand30_to_planar_c16(uint8_t * dst_u, const unsigned int dst_stride_u, -+ uint8_t * dst_v, const unsigned int dst_stride_v, -+ const uint8_t * src, -+ unsigned int stride1, unsigned int stride2, -+ unsigned int _x, unsigned int y, -+ unsigned int _w, unsigned int h) -+{ -+ const unsigned int x0 = (_x / 3) * 8; // Byte offset of the word -+ const unsigned int xskip0 = _x - (x0 >> 3) * 3; -+ const unsigned int x1 = ((_x + _w) / 3) * 8; -+ const unsigned int xrem1 = _x + _w - (x1 >> 3) * 3; -+ const unsigned int mask = stride1 - 1; -+ const uint8_t * p0 = src + (x0 & mask) + y * stride1 + (x0 & ~mask) * stride2; -+ const unsigned int slice_inc = ((stride2 - 1) * stride1) >> 2; // RHS of a stripe to LHS of next in words -+ -+#if HAVE_SAND_ASM -+ if (_x == 0) { -+ ff_rpi_sand30_lines_to_planar_c16(dst_u, dst_stride_u, dst_v, dst_stride_v, -+ src, stride1, stride2, _x, y, _w, h); -+ return; -+ } -+#endif -+ -+ if (x0 == x1) { -+ // ******************* -+ // Partial single word xfer -+ return; -+ } -+ -+ for (unsigned int i = 0; i != h; ++i, dst_u += dst_stride_u, dst_v += dst_stride_v, p0 += stride1) -+ { -+ unsigned int x = x0; -+ const uint32_t * p = (const uint32_t *)p0; -+ uint16_t * du = (uint16_t *)dst_u; -+ uint16_t * dv = (uint16_t *)dst_v; -+ -+ if (xskip0 != 0) { -+ const uint32_t p3a = *p++; -+ const uint32_t p3b = *p++; -+ -+ if (xskip0 == 1) -+ { -+ *du++ = (p3a >> 20) & 0x3ff; -+ *dv++ = (p3b >> 0) & 0x3ff; -+ } -+ *du++ = (p3b >> 10) & 0x3ff; -+ *dv++ = (p3b >> 20) & 0x3ff; -+ -+ if (((x += 8) & mask) == 0) -+ p += slice_inc; -+ } -+ -+ while (x != x1) { -+ const uint32_t p3a = *p++; -+ const uint32_t p3b = *p++; -+ -+ *du++ = p3a & 0x3ff; -+ *dv++ = (p3a >> 10) & 0x3ff; -+ *du++ = (p3a >> 20) & 0x3ff; -+ *dv++ = p3b & 0x3ff; -+ *du++ = (p3b >> 10) & 0x3ff; -+ *dv++ = (p3b >> 20) & 0x3ff; -+ -+ if (((x += 8) & mask) == 0) -+ p += slice_inc; -+ } -+ -+ if (xrem1 != 0) { -+ const uint32_t p3a = *p++; -+ const uint32_t p3b = *p++; -+ -+ *du++ = p3a & 0x3ff; -+ *dv++ = (p3a >> 10) & 0x3ff; -+ if (xrem1 == 2) -+ { -+ *du++ = (p3a >> 20) & 0x3ff; -+ *dv++ = p3b & 0x3ff; -+ } -+ } -+ } -+} -+ -+// Fetches a single patch - offscreen fixup not done here -+// w <= stride1 -+// single lose bottom 2 bits truncation -+// _x & _w in pixels, strides in bytes -+void av_rpi_sand30_to_planar_y8(uint8_t * dst, const unsigned int dst_stride, -+ const uint8_t * src, -+ unsigned int stride1, unsigned int stride2, -+ unsigned int _x, unsigned int y, -+ unsigned int _w, unsigned int h) -+{ -+ const unsigned int x0 = (_x / 3) * 4; // Byte offset of the word -+ const unsigned int xskip0 = _x - (x0 >> 2) * 3; -+ const unsigned int x1 = ((_x + _w) / 3) * 4; -+ const unsigned int xrem1 = _x + _w - (x1 >> 2) * 3; -+ const unsigned int mask = stride1 - 1; -+ const uint8_t * p0 = src + (x0 & mask) + y * stride1 + (x0 & ~mask) * stride2; -+ const unsigned int slice_inc = ((stride2 - 1) * stride1) >> 2; // RHS of a stripe to LHS of next in words -+ -+#if HAVE_SAND_ASM -+ if (_x == 0) { -+ ff_rpi_sand30_lines_to_planar_y8(dst, dst_stride, src, stride1, stride2, _x, y, _w, h); -+ return; -+ } -+#endif -+ -+ if (x0 == x1) { -+ // ******************* -+ // Partial single word xfer -+ return; -+ } -+ -+ for (unsigned int i = 0; i != h; ++i, dst += dst_stride, p0 += stride1) -+ { -+ unsigned int x = x0; -+ const uint32_t * p = (const uint32_t *)p0; -+ uint8_t * d = dst; -+ -+ if (xskip0 != 0) { -+ const uint32_t p3 = *p++; -+ -+ if (xskip0 == 1) -+ *d++ = (p3 >> 12) & 0xff; -+ *d++ = (p3 >> 22) & 0xff; -+ -+ if (((x += 4) & mask) == 0) -+ p += slice_inc; -+ } -+ -+ while (x != x1) { -+ const uint32_t p3 = *p++; -+ *d++ = (p3 >> 2) & 0xff; -+ *d++ = (p3 >> 12) & 0xff; -+ *d++ = (p3 >> 22) & 0xff; -+ -+ if (((x += 4) & mask) == 0) -+ p += slice_inc; -+ } -+ -+ if (xrem1 != 0) { -+ const uint32_t p3 = *p; -+ -+ *d++ = (p3 >> 2) & 0xff; -+ if (xrem1 == 2) -+ *d++ = (p3 >> 12) & 0xff; -+ } -+ } -+} -+ -+ -+ -+// w/h in pixels -+void av_rpi_sand16_to_sand8(uint8_t * dst, const unsigned int dst_stride1, const unsigned int dst_stride2, -+ const uint8_t * src, const unsigned int src_stride1, const unsigned int src_stride2, -+ unsigned int w, unsigned int h, const unsigned int shr) -+{ -+ const unsigned int n = dst_stride1 / 2; -+ unsigned int j; -+ -+ // This is true for our current layouts -+ av_assert0(dst_stride1 == src_stride1); -+ -+ // As we have the same stride1 for src & dest and src is wider than dest -+ // then if we loop on src we can always write contiguously to dest -+ // We make no effort to copy an exact width - round up to nearest src stripe -+ // as we will always have storage in dest for that -+ -+#if ARCH_ARM && HAVE_NEON -+ if (shr == 3 && src_stride1 == 128) { -+ for (j = 0; j + n < w; j += dst_stride1) { -+ uint8_t * d = dst + j * dst_stride2; -+ const uint8_t * s1 = src + j * 2 * src_stride2; -+ const uint8_t * s2 = s1 + src_stride1 * src_stride2; -+ -+ ff_rpi_sand128b_stripe_to_8_10(d, s1, s2, h); -+ } -+ } -+ else -+#endif -+ { -+ for (j = 0; j + n < w; j += dst_stride1) { -+ uint8_t * d = dst + j * dst_stride2; -+ const uint8_t * s1 = src + j * 2 * src_stride2; -+ const uint8_t * s2 = s1 + src_stride1 * src_stride2; -+ -+ for (unsigned int i = 0; i != h; ++i, s1 += src_stride1, s2 += src_stride1, d += dst_stride1) { -+ cpy16_to_8(d, s1, n, shr); -+ cpy16_to_8(d + n, s2, n, shr); -+ } -+ } -+ } -+ -+ // Fix up a trailing dest half stripe -+ if (j < w) { -+ uint8_t * d = dst + j * dst_stride2; -+ const uint8_t * s1 = src + j * 2 * src_stride2; -+ -+ for (unsigned int i = 0; i != h; ++i, s1 += src_stride1, d += dst_stride1) { -+ cpy16_to_8(d, s1, n, shr); -+ } -+ } -+} -+ -+int av_rpi_sand_to_planar_frame(AVFrame * const dst, const AVFrame * const src) -+{ -+ const int w = av_frame_cropped_width(src); -+ const int h = av_frame_cropped_height(src); -+ const int x = src->crop_left; -+ const int y = src->crop_top; -+ -+ // We will crop as part of the conversion -+ dst->crop_top = 0; -+ dst->crop_left = 0; -+ dst->crop_bottom = 0; -+ dst->crop_right = 0; -+ -+ switch (src->format){ -+ case AV_PIX_FMT_SAND128: -+ case AV_PIX_FMT_RPI4_8: -+ switch (dst->format){ -+ case AV_PIX_FMT_YUV420P: -+ av_rpi_sand_to_planar_y8(dst->data[0], dst->linesize[0], -+ src->data[0], -+ av_rpi_sand_frame_stride1(src), av_rpi_sand_frame_stride2(src), -+ x, y, w, h); -+ av_rpi_sand_to_planar_c8(dst->data[1], dst->linesize[1], -+ dst->data[2], dst->linesize[2], -+ src->data[1], -+ av_rpi_sand_frame_stride1(src), av_rpi_sand_frame_stride2(src), -+ x/2, y/2, w/2, h/2); -+ break; -+ case AV_PIX_FMT_NV12: -+ av_rpi_sand_to_planar_y8(dst->data[0], dst->linesize[0], -+ src->data[0], -+ av_rpi_sand_frame_stride1(src), av_rpi_sand_frame_stride2(src), -+ x, y, w, h); -+ av_rpi_sand_to_planar_y8(dst->data[1], dst->linesize[1], -+ src->data[1], -+ av_rpi_sand_frame_stride1(src), av_rpi_sand_frame_stride2(src), -+ x/2, y/2, w, h/2); -+ break; -+ default: -+ return -1; -+ } -+ break; -+ case AV_PIX_FMT_SAND64_10: -+ switch (dst->format){ -+ case AV_PIX_FMT_YUV420P10: -+ av_rpi_sand_to_planar_y16(dst->data[0], dst->linesize[0], -+ src->data[0], -+ av_rpi_sand_frame_stride1(src), av_rpi_sand_frame_stride2(src), -+ x*2, y, w*2, h); -+ av_rpi_sand_to_planar_c16(dst->data[1], dst->linesize[1], -+ dst->data[2], dst->linesize[2], -+ src->data[1], -+ av_rpi_sand_frame_stride1(src), av_rpi_sand_frame_stride2(src), -+ x, y/2, w, h/2); -+ break; -+ default: -+ return -1; -+ } -+ break; -+ case AV_PIX_FMT_RPI4_10: -+ switch (dst->format){ -+ case AV_PIX_FMT_YUV420P10: -+ av_rpi_sand30_to_planar_y16(dst->data[0], dst->linesize[0], -+ src->data[0], -+ av_rpi_sand_frame_stride1(src), av_rpi_sand_frame_stride2(src), -+ x, y, w, h); -+ av_rpi_sand30_to_planar_c16(dst->data[1], dst->linesize[1], -+ dst->data[2], dst->linesize[2], -+ src->data[1], -+ av_rpi_sand_frame_stride1(src), av_rpi_sand_frame_stride2(src), -+ x/2, y/2, w/2, h/2); -+ break; -+ case AV_PIX_FMT_NV12: -+ av_rpi_sand30_to_planar_y8(dst->data[0], dst->linesize[0], -+ src->data[0], -+ av_rpi_sand_frame_stride1(src), av_rpi_sand_frame_stride2(src), -+ x, y, w, h); -+ av_rpi_sand30_to_planar_y8(dst->data[1], dst->linesize[1], -+ src->data[1], -+ av_rpi_sand_frame_stride1(src), av_rpi_sand_frame_stride2(src), -+ x/2, y/2, w, h/2); -+ break; -+ default: -+ return -1; -+ } -+ break; -+ default: -+ return -1; -+ } -+ -+ return av_frame_copy_props(dst, src); -+} ---- /dev/null -+++ b/libavutil/rpi_sand_fns.h -@@ -0,0 +1,188 @@ -+/* -+Copyright (c) 2018 Raspberry Pi (Trading) Ltd. -+All rights reserved. -+ -+Redistribution and use in source and binary forms, with or without -+modification, are permitted provided that the following conditions are met: -+ * Redistributions of source code must retain the above copyright -+ notice, this list of conditions and the following disclaimer. -+ * Redistributions in binary form must reproduce the above copyright -+ notice, this list of conditions and the following disclaimer in the -+ documentation and/or other materials provided with the distribution. -+ * Neither the name of the copyright holder nor the -+ names of its contributors may be used to endorse or promote products -+ derived from this software without specific prior written permission. -+ -+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ -+Authors: John Cox -+*/ -+ -+#ifndef AVUTIL_RPI_SAND_FNS -+#define AVUTIL_RPI_SAND_FNS -+ -+#include "libavutil/frame.h" -+ -+// For all these fns _x & _w are measured as coord * PW -+// For the C fns coords are in chroma pels (so luma / 2) -+// Strides are in bytes -+ -+void av_rpi_sand_to_planar_y8(uint8_t * dst, const unsigned int dst_stride, -+ const uint8_t * src, -+ unsigned int stride1, unsigned int stride2, -+ unsigned int _x, unsigned int y, -+ unsigned int _w, unsigned int h); -+void av_rpi_sand_to_planar_y16(uint8_t * dst, const unsigned int dst_stride, -+ const uint8_t * src, -+ unsigned int stride1, unsigned int stride2, -+ unsigned int _x, unsigned int y, -+ unsigned int _w, unsigned int h); -+ -+void av_rpi_sand_to_planar_c8(uint8_t * dst_u, const unsigned int dst_stride_u, -+ uint8_t * dst_v, const unsigned int dst_stride_v, -+ const uint8_t * src, -+ unsigned int stride1, unsigned int stride2, -+ unsigned int _x, unsigned int y, -+ unsigned int _w, unsigned int h); -+void av_rpi_sand_to_planar_c16(uint8_t * dst_u, const unsigned int dst_stride_u, -+ uint8_t * dst_v, const unsigned int dst_stride_v, -+ const uint8_t * src, -+ unsigned int stride1, unsigned int stride2, -+ unsigned int _x, unsigned int y, -+ unsigned int _w, unsigned int h); -+ -+void av_rpi_planar_to_sand_c8(uint8_t * dst_c, -+ unsigned int stride1, unsigned int stride2, -+ const uint8_t * src_u, const unsigned int src_stride_u, -+ const uint8_t * src_v, const unsigned int src_stride_v, -+ unsigned int _x, unsigned int y, -+ unsigned int _w, unsigned int h); -+void av_rpi_planar_to_sand_c16(uint8_t * dst_c, -+ unsigned int stride1, unsigned int stride2, -+ const uint8_t * src_u, const unsigned int src_stride_u, -+ const uint8_t * src_v, const unsigned int src_stride_v, -+ unsigned int _x, unsigned int y, -+ unsigned int _w, unsigned int h); -+ -+void av_rpi_sand30_to_planar_y16(uint8_t * dst, const unsigned int dst_stride, -+ const uint8_t * src, -+ unsigned int stride1, unsigned int stride2, -+ unsigned int _x, unsigned int y, -+ unsigned int _w, unsigned int h); -+void av_rpi_sand30_to_planar_c16(uint8_t * dst_u, const unsigned int dst_stride_u, -+ uint8_t * dst_v, const unsigned int dst_stride_v, -+ const uint8_t * src, -+ unsigned int stride1, unsigned int stride2, -+ unsigned int _x, unsigned int y, -+ unsigned int _w, unsigned int h); -+ -+void av_rpi_sand30_to_planar_y8(uint8_t * dst, const unsigned int dst_stride, -+ const uint8_t * src, -+ unsigned int stride1, unsigned int stride2, -+ unsigned int _x, unsigned int y, -+ unsigned int _w, unsigned int h); -+ -+// w/h in pixels -+void av_rpi_sand16_to_sand8(uint8_t * dst, const unsigned int dst_stride1, const unsigned int dst_stride2, -+ const uint8_t * src, const unsigned int src_stride1, const unsigned int src_stride2, -+ unsigned int w, unsigned int h, const unsigned int shr); -+ -+ -+// dst must contain required pixel format & allocated data buffers -+// Cropping on the src buffer will be honoured and dst crop will be set to zero -+int av_rpi_sand_to_planar_frame(AVFrame * const dst, const AVFrame * const src); -+ -+ -+static inline unsigned int av_rpi_sand_frame_stride1(const AVFrame * const frame) -+{ -+#ifdef RPI_ZC_SAND128_ONLY -+ // If we are sure we only only support 128 byte sand formats replace the -+ // var with a constant which should allow for better optimisation -+ return 128; -+#else -+ return frame->linesize[0]; -+#endif -+} -+ -+static inline unsigned int av_rpi_sand_frame_stride2(const AVFrame * const frame) -+{ -+ return frame->linesize[3]; -+} -+ -+ -+static inline int av_rpi_is_sand_format(const int format) -+{ -+ return (format >= AV_PIX_FMT_SAND128 && format <= AV_PIX_FMT_RPI4_10); -+} -+ -+static inline int av_rpi_is_sand_frame(const AVFrame * const frame) -+{ -+ return av_rpi_is_sand_format(frame->format); -+} -+ -+static inline int av_rpi_is_sand8_frame(const AVFrame * const frame) -+{ -+ return (frame->format == AV_PIX_FMT_SAND128 || frame->format == AV_PIX_FMT_RPI4_8); -+} -+ -+static inline int av_rpi_is_sand16_frame(const AVFrame * const frame) -+{ -+ return (frame->format >= AV_PIX_FMT_SAND64_10 && frame->format <= AV_PIX_FMT_SAND64_16); -+} -+ -+static inline int av_rpi_is_sand30_frame(const AVFrame * const frame) -+{ -+ return (frame->format == AV_PIX_FMT_RPI4_10); -+} -+ -+static inline int av_rpi_sand_frame_xshl(const AVFrame * const frame) -+{ -+ return av_rpi_is_sand8_frame(frame) ? 0 : 1; -+} -+ -+// If x is measured in bytes (not pixels) then this works for sand64_16 as -+// well as sand128 - but in the general case we work that out -+ -+static inline unsigned int av_rpi_sand_frame_off_y(const AVFrame * const frame, const unsigned int x_y, const unsigned int y) -+{ -+ const unsigned int stride1 = av_rpi_sand_frame_stride1(frame); -+ const unsigned int stride2 = av_rpi_sand_frame_stride2(frame); -+ const unsigned int x = x_y << av_rpi_sand_frame_xshl(frame); -+ const unsigned int x1 = x & (stride1 - 1); -+ const unsigned int x2 = x ^ x1; -+ -+ return x1 + stride1 * y + stride2 * x2; -+} -+ -+static inline unsigned int av_rpi_sand_frame_off_c(const AVFrame * const frame, const unsigned int x_c, const unsigned int y_c) -+{ -+ const unsigned int stride1 = av_rpi_sand_frame_stride1(frame); -+ const unsigned int stride2 = av_rpi_sand_frame_stride2(frame); -+ const unsigned int x = x_c << (av_rpi_sand_frame_xshl(frame) + 1); -+ const unsigned int x1 = x & (stride1 - 1); -+ const unsigned int x2 = x ^ x1; -+ -+ return x1 + stride1 * y_c + stride2 * x2; -+} -+ -+static inline uint8_t * av_rpi_sand_frame_pos_y(const AVFrame * const frame, const unsigned int x, const unsigned int y) -+{ -+ return frame->data[0] + av_rpi_sand_frame_off_y(frame, x, y); -+} -+ -+static inline uint8_t * av_rpi_sand_frame_pos_c(const AVFrame * const frame, const unsigned int x, const unsigned int y) -+{ -+ return frame->data[1] + av_rpi_sand_frame_off_c(frame, x, y); -+} -+ -+#endif -+ ---- /dev/null -+++ b/pi-util/BUILD.txt -@@ -0,0 +1,59 @@ -+Building Pi FFmpeg -+================== -+ -+Current only building on a Pi is supported. -+This builds ffmpeg the way I've tested it -+ -+Get all dependencies - the current package dependencies are good enough -+ -+$ sudo apt-get build-dep ffmpeg -+ -+Configure using the pi-util/conf_native.sh script -+------------------------------------------------- -+ -+This sets the normal release options and creates an ouutput dir to build into -+The directory name will depend on system and options but will be under out/ -+ -+There are a few choices here -+ --mmal build including the legacy mmal-based decoders and zero-copy code -+ this requires appropriate libraries which currently will exist for -+ armv7 but not arm64 -+ --noshared -+ Build a static image rather than a shared library one. Static is -+ easier for testing as there is no need to worry about library -+ paths being confused and therefore running the wrong code, Shared -+ is what is needed, in most cases, when building for use by other -+ programs. -+ -+So for a static build -+--------------------- -+ -+$ pi-util/conf_native.sh --noshared -+ -+$ make -j8 -C out/ -+ -+You can now run ffmpeg directly from where it was built -+ -+For a shared build -+------------------ -+ -+$ pi-util/conf_native.sh -+ -+You will normally want an install target if shared. Note that the script has -+set this up to be generated in out//install, you don't have to worry -+about overwriting your system libs. -+ -+$ make -j8 -C out/ install -+ -+You can now set LD_LIBRARY_PATH appropriately and run ffmpeg from where it was -+built or install the image on the system - you have to be careful to get rid -+of all other ffmpeg libs or confusion may result. There is a little script -+that wipes all other versions - obviously use with care! -+ -+$ sudo pi-util/clean_usr_libs.sh -+ -+Then simply copying from the install to /usr works -+ -+$ sudo cp -r out//install/* /usr -+ -+ ---- /dev/null -+++ b/pi-util/NOTES.txt -@@ -0,0 +1,69 @@ -+Notes on the hevc_rpi decoder & associated support code -+------------------------------------------------------- -+ -+There are 3 main parts to the existing code: -+ -+1) The decoder - this is all in libavcodec as rpi_hevc*. -+ -+2) A few filters to deal with Sand frames and a small patch to -+automatically select the sand->i420 converter when required. -+ -+3) A kludge in ffmpeg.c to display the decoded video. This could & should -+be converted into a proper ffmpeg display module. -+ -+ -+Decoder -+------- -+ -+The decoder is a modified version of the existing ffmpeg hevc decoder. -+Generally it is ~100% faster than the existing ffmpeg hevc s/w decoder. -+More complex bitstreams can be up to ~200% faster but particularly easy -+streams can cut its advantage down to ~50%. This means that a Pi3+ can -+display nearly all 8-bit 1080p30 streams and with some overclocking it can -+display most lower bitrate 10-bit 1080p30 streams - this latter case is -+not helped by the requirement to downsample to 8-bit before display on a -+Pi. -+ -+It has had co-processor offload added for inter-pred and large block -+residual transform. Various parts have had optimized ARM NEON assembler -+added and the existing ARM asm sections have been profiled and -+re-optimized for A53. The main C code has been substantially reworked at -+its lower levels in an attempt to optimize it and minimize memory -+bandwidth. To some extent code paths that deal with frame types that it -+doesn't support have been pruned. -+ -+It outputs frames in Broadcom Sand format. This is a somewhat annoying -+layout that doesn't fit into ffmpegs standard frame descriptions. It has -+vertical stripes of 128 horizontal pixels (64 in 10 bit forms) with Y for -+the stripe followed by interleaved U & V, that is then followed by the Y -+for the next stripe, etc. The final stripe is always padded to -+stripe-width. This is used in an attempt to help with cache locality and -+cut down on the number of dram bank switches. It is annoying to use for -+inter-pred with conventional processing but the way the Pi QPU (which is -+used for inter-pred) works means that it has negligible downsides here and -+the improved memory performance exceeds the overhead of the increased -+complexity in the rest of the code. -+ -+Frames must be allocated out of GPU memory (as otherwise they can't be -+accessed by the co-processors). Utility functions (in rpi_zc.c) have been -+written to make this easier. As the frames are already in GPU memory they -+can be displayed by the Pi h/w without any further copying. -+ -+ -+Known non-features -+------------------ -+ -+Frame allocation should probably be done in some other way in order to fit -+into the standard framework better. -+ -+Sand frames are currently declared as software frames, there is an -+argument that they should be hardware frames but they aren't really. -+ -+There must be a better way of auto-selecting the hevc_rpi decoder over the -+normal s/w hevc decoder, but I became confused by the existing h/w -+acceleration framework and what I wanted to do didn't seem to fit in -+neatly. -+ -+Display should be a proper device rather than a kludge in ffmpeg.c -+ -+ ---- /dev/null -+++ b/pi-util/TESTMESA.txt -@@ -0,0 +1,82 @@ -+# Setup & Build instructions for testing Argon30 mesa support (on Pi4) -+ -+# These assume that the drm_mmal test for Sand8 has been built on this Pi -+# as build relies on many of the same files -+ -+# 1st get everything required to build ffmpeg -+# If sources aren't already enabled on your Pi then enable them -+sudo su -+sed "s/#deb-src/deb-src/" /etc/apt/sources.list > /tmp/sources.list -+sed "s/#deb-src/deb-src/" /etc/apt/sources.list.d/raspi.list > /tmp/raspi.list -+mv /tmp/sources.list /etc/apt/ -+mv /tmp/raspi.list /etc/apt/sources.list.d/ -+apt update -+ -+# Get dependancies -+sudo apt build-dep ffmpeg -+ -+sudo apt install meson libepoxy-dev libxcb-dri3-dev libxcb1-dev libx11-dev libx11-xcb-dev libdrm-dev -+ -+# Enable H265 V4L2 request decoder -+sudo su -+echo dtoverlay=rpivid-v4l2 >> /boot/config.txt -+# You may also want to add more CMA if you are going to try 4k videos -+# Change the dtoverlay=vc4-fkms-v3d line in config.txt to read -+# dtoverlay=vc4-fkms-v3d,cma-512 -+reboot -+# Check it has turned up -+ls -la /dev/video* -+# This should include video19 -+# crw-rw----+ 1 root video 81, 7 Aug 4 17:25 /dev/video19 -+ -+# Currently on the Pi the linux headers from the debian distro don't match -+# the kernel that we ship and we need to update them - hopefully this step -+# will be unneeded in the future -+sudo apt install git bc bison flex libssl-dev make -+git clone --depth=1 https://github.com/raspberrypi/linux --branch rpi-5.10.y -+cd linux -+KERNEL=kernel7l -+make bcm2711_defconfig -+make headers_install -+sudo cp -r usr/include/linux /usr/include -+cd .. -+ -+# Config - this builds a staticly linked ffmpeg which is easier for testing -+pi-util/conf_native.sh --noshared -+ -+# Build (this is a bit dull) -+# If you want to poke the source the libavdevice/egl_vout.c contains the -+# output code - -+cd out/armv7-static-rel -+ -+# Check that you have actually configured V4L2 request -+grep HEVC_V4L2REQUEST config.h -+# You are hoping for -+# #define CONFIG_HEVC_V4L2REQUEST_HWACCEL 1 -+# if you get 0 then the config has failed -+ -+make -j6 -+ -+# Grab test streams -+wget http://www.jell.yfish.us/media/jellyfish-3-mbps-hd-h264.mkv -+wget http://www.jell.yfish.us/media/jellyfish-3-mbps-hd-hevc.mkv -+wget http://www.jell.yfish.us/media/jellyfish-3-mbps-hd-hevc-10bit.mkv -+ -+# Test i420 output (works currently) -+./ffmpeg -no_cvt_hw -vcodec h264_v4l2m2m -i jellyfish-3-mbps-hd-h264.mkv -f vout_egl - -+ -+# Test Sand8 output - doesn't currently work but should once you have -+# Sand8 working in drm_mmal. I can't guarantee that this will work as -+# I can't test this path with a known working format, but the debug looks -+# good. If this doesn't work & drm_mmal does with sand8 then come back to me -+# The "show_all 1" forces vout to display every frame otherwise it drops any -+# frame that would cause it to block -+./ffmpeg -no_cvt_hw -hwaccel drm -vcodec hevc -i jellyfish-3-mbps-hd-hevc.mkv -show_all 1 -f vout_egl - -+ -+# Test Sand30 - doesn't currently work -+# (Beware that when FFmpeg errors out it often leaves your teminal window -+# in a state where you need to reset it) -+./ffmpeg -no_cvt_hw -hwaccel drm -vcodec hevc -i jellyfish-3-mbps-hd-hevc-10bit.mkv -f vout_egl - -+ -+ -+ ---- /dev/null -+++ b/pi-util/clean_usr_libs.sh -@@ -0,0 +1,26 @@ -+set -e -+U=/usr/lib/arm-linux-gnueabihf -+rm -f $U/libavcodec.* -+rm -f $U/libavdevice.* -+rm -f $U/libavfilter.* -+rm -f $U/libavformat.* -+rm -f $U/libavutil.* -+rm -f $U/libswresample.* -+rm -f $U/libswscale.* -+U=/usr/lib/arm-linux-gnueabihf/neon/vfp -+rm -f $U/libavcodec.* -+rm -f $U/libavdevice.* -+rm -f $U/libavfilter.* -+rm -f $U/libavformat.* -+rm -f $U/libavutil.* -+rm -f $U/libswresample.* -+rm -f $U/libswscale.* -+U=/usr/lib/aarch64-linux-gnu -+rm -f $U/libavcodec.* -+rm -f $U/libavdevice.* -+rm -f $U/libavfilter.* -+rm -f $U/libavformat.* -+rm -f $U/libavutil.* -+rm -f $U/libswresample.* -+rm -f $U/libswscale.* -+ ---- /dev/null -+++ b/pi-util/conf_arm64_native.sh -@@ -0,0 +1,45 @@ -+echo "Configure for ARM64 native build" -+ -+#RPI_KEEPS="-save-temps=obj" -+ -+SHARED_LIBS="--enable-shared" -+if [ "$1" == "--noshared" ]; then -+ SHARED_LIBS="--disable-shared" -+ echo Static libs -+ OUT=out/arm64-static-rel -+else -+ echo Shared libs -+ OUT=out/arm64-shared-rel -+fi -+ -+mkdir -p $OUT -+cd $OUT -+ -+A=aarch64-linux-gnu -+USR_PREFIX=`pwd`/install -+LIB_PREFIX=$USR_PREFIX/lib/$A -+INC_PREFIX=$USR_PREFIX/include/$A -+ -+../../configure \ -+ --prefix=$USR_PREFIX\ -+ --libdir=$LIB_PREFIX\ -+ --incdir=$INC_PREFIX\ -+ --disable-stripping\ -+ --disable-thumb\ -+ --disable-mmal\ -+ --enable-sand\ -+ --enable-v4l2-request\ -+ --enable-libdrm\ -+ --enable-epoxy\ -+ --enable-libudev\ -+ --enable-vout-drm\ -+ --enable-vout-egl\ -+ $SHARED_LIBS\ -+ --extra-cflags="-ggdb" -+ -+# --enable-decoder=hevc_rpi\ -+# --enable-extra-warnings\ -+# --arch=armv71\ -+ -+# gcc option for getting asm listing -+# -Wa,-ahls ---- /dev/null -+++ b/pi-util/conf_h265.2016.csv -@@ -0,0 +1,195 @@ -+1,HEVC_v1/AMP_A_Samsung_7,AMP_A_Samsung_7.bin,AMP_A_Samsung_7.md5,8 -+1,HEVC_v1/AMP_B_Samsung_7,AMP_B_Samsung_7.bin,AMP_B_Samsung_7.md5,8 -+1,HEVC_v1/AMP_D_Hisilicon_3,AMP_D_Hisilicon.bit,AMP_D_Hisilicon_3.yuv.md5,8 -+1,HEVC_v1/AMP_E_Hisilicon_3,AMP_E_Hisilicon.bit,AMP_E_Hisilicon_3.yuv.md5,8 -+1,HEVC_v1/AMP_F_Hisilicon_3,AMP_F_Hisilicon_3.bit,AMP_F_Hisilicon_3.yuv.md5,8 -+1,HEVC_v1/AMVP_A_MTK_4,AMVP_A_MTK_4.bit,AMVP_A_MTK_4.md5,8 -+1,HEVC_v1/AMVP_B_MTK_4,AMVP_B_MTK_4.bit,AMVP_B_MTK_4.md5,8 -+1,HEVC_v1/AMVP_C_Samsung_7,AMVP_C_Samsung_7.bin,AMVP_C_Samsung_7.md5,8 -+1,HEVC_v1/BUMPING_A_ericsson_1,BUMPING_A_ericsson_1.bit,BUMPING_A_ericsson_1.md5,8 -+1,HEVC_v1/CAINIT_A_SHARP_4,CAINIT_A_SHARP_4.bit,CAINIT_A_SHARP_4.md5,8 -+1,HEVC_v1/CAINIT_B_SHARP_4,CAINIT_B_SHARP_4.bit,CAINIT_B_SHARP_4.md5,8 -+1,HEVC_v1/CAINIT_C_SHARP_3,CAINIT_C_SHARP_3.bit,CAINIT_C_SHARP_3.md5,8 -+1,HEVC_v1/CAINIT_D_SHARP_3,CAINIT_D_SHARP_3.bit,CAINIT_D_SHARP_3.md5,8 -+1,HEVC_v1/CAINIT_E_SHARP_3,CAINIT_E_SHARP_3.bit,CAINIT_E_SHARP_3.md5,8 -+1,HEVC_v1/CAINIT_F_SHARP_3,CAINIT_F_SHARP_3.bit,CAINIT_F_SHARP_3.md5,8 -+1,HEVC_v1/CAINIT_G_SHARP_3,CAINIT_G_SHARP_3.bit,CAINIT_G_SHARP_3.md5,8 -+1,HEVC_v1/CAINIT_H_SHARP_3,CAINIT_H_SHARP_3.bit,CAINIT_H_SHARP_3.md5,8 -+1,HEVC_v1/CIP_A_Panasonic_3,CIP_A_Panasonic_3.bit,CIP_A_Panasonic_3_yuv.md5,8 -+1,HEVC_v1/cip_B_NEC_3,cip_B_NEC_3.bit,cip_B_NEC_3.md5,8 -+1,HEVC_v1/CIP_C_Panasonic_2,CIP_C_Panasonic_2.bit,CIP_C_Panasonic_2_yuv.md5,8 -+1,HEVC_v1/CONFWIN_A_Sony_1,CONFWIN_A_Sony_1.bit,CONFWIN_A_Sony_1.md5,8 -+1,HEVC_v1/DBLK_A_MAIN10_VIXS_4,DBLK_A_MAIN10_VIXS_4.bit,DBLK_A_MAIN10_VIXS_4.md5,10 -+1,HEVC_v1/DBLK_A_SONY_3,DBLK_A_SONY_3.bit,DBLK_A_SONY_3.bit.yuv.md5,8 -+1,HEVC_v1/DBLK_B_SONY_3,DBLK_B_SONY_3.bit,DBLK_B_SONY_3.bit.yuv.md5,8 -+1,HEVC_v1/DBLK_C_SONY_3,DBLK_C_SONY_3.bit,DBLK_C_SONY_3.bit.yuv.md5,8 -+1,HEVC_v1/DBLK_D_VIXS_2,DBLK_D_VIXS_2.bit,DBLK_D_VIXS_2_yuv.md5,8 -+1,HEVC_v1/DBLK_E_VIXS_2,DBLK_E_VIXS_2.bit,DBLK_E_VIXS_2_yuv.md5,8 -+1,HEVC_v1/DBLK_F_VIXS_2,DBLK_F_VIXS_2.bit,DBLK_F_VIXS_2_yuv.md5,8 -+1,HEVC_v1/DBLK_G_VIXS_2,DBLK_G_VIXS_2.bit,DBLK_G_VIXS_2_yuv.md5,8 -+1,HEVC_v1/DELTAQP_A_BRCM_4,DELTAQP_A_BRCM_4.bit,DELTAQP_A_BRCM_4_yuv.md5,8 -+1,HEVC_v1/DELTAQP_B_SONY_3,DELTAQP_B_SONY_3.bit,DELTAQP_B_SONY_3.bit.yuv.md5,8 -+1,HEVC_v1/DELTAQP_C_SONY_3,DELTAQP_C_SONY_3.bit,DELTAQP_C_SONY_3.bit.yuv.md5,8 -+1,HEVC_v1/DSLICE_A_HHI_5,DSLICE_A_HHI_5.bin,DSLICE_A_HHI_5.md5,8 -+1,HEVC_v1/DSLICE_B_HHI_5,DSLICE_B_HHI_5.bin,DSLICE_B_HHI_5.md5,8 -+1,HEVC_v1/DSLICE_C_HHI_5,DSLICE_C_HHI_5.bin,DSLICE_C_HHI_5.md5,8 -+1,HEVC_v1/ENTP_A_QUALCOMM_1,ENTP_A_Qualcomm_1.bit,ENTP_A_Qualcomm_1.md5,8 -+1,HEVC_v1/ENTP_B_Qualcomm_1,ENTP_B_Qualcomm_1.bit,ENTP_B_Qualcomm_1.md5,8 -+1,HEVC_v1/ENTP_C_Qualcomm_1,ENTP_C_Qualcomm_1.bit,ENTP_C_Qualcomm_1.md5,8 -+1,HEVC_v1/EXT_A_ericsson_4,EXT_A_ericsson_4.bit,EXT_A_ericsson_4.md5,8 -+1,HEVC_v1/FILLER_A_Sony_1,FILLER_A_Sony_1.bit,FILLER_A_Sony_1.md5,8 -+1,HEVC_v1/HRD_A_Fujitsu_3,HRD_A_Fujitsu_3.bin,HRD_A_Fujitsu_3.md5,8 -+1,HEVC_v1/INITQP_A_Sony_1,INITQP_A_Sony_1.bit,INITQP_A_Sony_1.md5,8 -+1,HEVC_v1/INITQP_B_Main10_Sony_1,INITQP_B_Main10_Sony_1.bit,INITQP_B_Main10_Sony_1.md5,10 -+1,HEVC_v1/ipcm_A_NEC_3,ipcm_A_NEC_3.bit,ipcm_A_NEC_3.md5,8 -+1,HEVC_v1/ipcm_B_NEC_3,ipcm_B_NEC_3.bit,ipcm_B_NEC_3.md5,8 -+1,HEVC_v1/ipcm_C_NEC_3,ipcm_C_NEC_3.bit,ipcm_C_NEC_3.md5,8 -+1,HEVC_v1/ipcm_D_NEC_3,ipcm_D_NEC_3.bit,ipcm_D_NEC_3.md5,8 -+1,HEVC_v1/ipcm_E_NEC_2,ipcm_E_NEC_2.bit,ipcm_E_NEC_2.md5,8 -+1,HEVC_v1/IPRED_A_docomo_2,IPRED_A_docomo_2.bit,IPRED_A_docomo_2.md5,8 -+1,HEVC_v1/IPRED_B_Nokia_3,IPRED_B_Nokia_3.bit,IPRED_B_Nokia_3_yuv.md5,8 -+1,HEVC_v1/IPRED_C_Mitsubishi_3,IPRED_C_Mitsubishi_3.bit,IPRED_C_Mitsubishi_3_yuv.md5,8 -+1,HEVC_v1/LS_A_Orange_2,LS_A_Orange_2.bit,LS_A_Orange_2_yuv.md5,8 -+1,HEVC_v1/LS_B_Orange_4,LS_B_Orange_4.bit,LS_B_Orange_4_yuv.md5,8 -+1,HEVC_v1/LTRPSPS_A_Qualcomm_1,LTRPSPS_A_Qualcomm_1.bit,LTRPSPS_A_Qualcomm_1.md5,8 -+1,HEVC_v1/MAXBINS_A_TI_5,MAXBINS_A_TI_5.bit,MAXBINS_A_TI_5_yuv.md5,8 -+1,HEVC_v1/MAXBINS_B_TI_5,MAXBINS_B_TI_5.bit,MAXBINS_B_TI_5_yuv.md5,8 -+1,HEVC_v1/MAXBINS_C_TI_5,MAXBINS_C_TI_5.bit,MAXBINS_C_TI_5_yuv.md5,8 -+1,HEVC_v1/MERGE_A_TI_3,MERGE_A_TI_3.bit,MERGE_A_TI_3.md5,8 -+1,HEVC_v1/MERGE_B_TI_3,MERGE_B_TI_3.bit,MERGE_B_TI_3.md5,8 -+1,HEVC_v1/MERGE_C_TI_3,MERGE_C_TI_3.bit,MERGE_C_TI_3.md5,8 -+1,HEVC_v1/MERGE_D_TI_3,MERGE_D_TI_3.bit,MERGE_D_TI_3.md5,8 -+1,HEVC_v1/MERGE_E_TI_3,MERGE_E_TI_3.bit,MERGE_E_TI_3.md5,8 -+1,HEVC_v1/MERGE_F_MTK_4,MERGE_F_MTK_4.bit,MERGE_F_MTK_4.md5,8 -+1,HEVC_v1/MERGE_G_HHI_4,MERGE_G_HHI_4.bit,MERGE_G_HHI_4.md5,8 -+1,HEVC_v1/MVCLIP_A_qualcomm_3,MVCLIP_A_qualcomm_3.bit,MVCLIP_A_qualcomm_3.yuv.md5,8 -+1,HEVC_v1/MVDL1ZERO_A_docomo_4,MVDL1ZERO_A_docomo_4.bit,MVDL1ZERO_A_docomo_4.md5,8 -+1,HEVC_v1/MVEDGE_A_qualcomm_3,MVEDGE_A_qualcomm_3.bit,MVEDGE_A_qualcomm_3.yuv.md5,8 -+1,HEVC_v1/NoOutPrior_A_Qualcomm_1,NoOutPrior_A_Qualcomm_1.bit,NoOutPrior_A_Qualcomm_1.md5,8 -+1,HEVC_v1/NoOutPrior_B_Qualcomm_1,NoOutPrior_B_Qualcomm_1.bit,NoOutPrior_B_Qualcomm_1.md5,8 -+1,HEVC_v1/NUT_A_ericsson_5,NUT_A_ericsson_5.bit,NUT_A_ericsson_5.md5,8 -+1,HEVC_v1/OPFLAG_A_Qualcomm_1,OPFLAG_A_Qualcomm_1.bit,OPFLAG_A_Qualcomm_1.md5,8 -+1,HEVC_v1/OPFLAG_B_Qualcomm_1,OPFLAG_B_Qualcomm_1.bit,OPFLAG_B_Qualcomm_1.md5,8 -+1,HEVC_v1/OPFLAG_C_Qualcomm_1,OPFLAG_C_Qualcomm_1.bit,OPFLAG_C_Qualcomm_1.md5,8 -+1,HEVC_v1/PICSIZE_A_Bossen_1,PICSIZE_A_Bossen_1.bin,PICSIZE_A_Bossen_1.md5,8 -+1,HEVC_v1/PICSIZE_B_Bossen_1,PICSIZE_B_Bossen_1.bin,PICSIZE_B_Bossen_1.md5,8 -+1,HEVC_v1/PICSIZE_C_Bossen_1,PICSIZE_C_Bossen_1.bin,PICSIZE_C_Bossen_1.md5,8 -+1,HEVC_v1/PICSIZE_D_Bossen_1,PICSIZE_D_Bossen_1.bin,PICSIZE_D_Bossen_1.md5,8 -+1,HEVC_v1/PMERGE_A_TI_3,PMERGE_A_TI_3.bit,PMERGE_A_TI_3.md5,8 -+1,HEVC_v1/PMERGE_B_TI_3,PMERGE_B_TI_3.bit,PMERGE_B_TI_3.md5,8 -+1,HEVC_v1/PMERGE_C_TI_3,PMERGE_C_TI_3.bit,PMERGE_C_TI_3.md5,8 -+1,HEVC_v1/PMERGE_D_TI_3,PMERGE_D_TI_3.bit,PMERGE_D_TI_3.md5,8 -+1,HEVC_v1/PMERGE_E_TI_3,PMERGE_E_TI_3.bit,PMERGE_E_TI_3.md5,8 -+1,HEVC_v1/POC_A_Bossen_3,POC_A_Bossen_3.bin,POC_A_Bossen_3.md5,8 -+1,HEVC_v1/PPS_A_qualcomm_7,PPS_A_qualcomm_7.bit,PPS_A_qualcomm_7.yuv.md5,8 -+1,HEVC_v1/PS_B_VIDYO_3,PS_B_VIDYO_3.bit,PS_B_VIDYO_3_yuv.md5,8 -+1,HEVC_v1/RAP_A_docomo_6,RAP_A_docomo_6.bit,RAP_A_docomo_6.md5,8 -+1,HEVC_v1/RAP_B_Bossen_2,RAP_B_Bossen_2.bit,RAP_B_Bossen_2.md5,8 -+1,HEVC_v1/RPLM_A_qualcomm_4,RPLM_A_qualcomm_4.bit,RPLM_A_qualcomm_4.yuv.md5,8 -+1,HEVC_v1/RPLM_B_qualcomm_4,RPLM_B_qualcomm_4.bit,RPLM_B_qualcomm_4.yuv.md5,8 -+1,HEVC_v1/RPS_A_docomo_5,RPS_A_docomo_5.bit,RPS_A_docomo_5.md5,8 -+1,HEVC_v1/RPS_B_qualcomm_5,RPS_B_qualcomm_5.bit,RPS_B_qualcomm_5.yuv.md5,8 -+1,HEVC_v1/RPS_C_ericsson_5,RPS_C_ericsson_5.bit,RPS_C_ericsson_5.md5,8 -+1,HEVC_v1/RPS_D_ericsson_6,RPS_D_ericsson_6.bit,RPS_D_ericsson_6.md5,8 -+1,HEVC_v1/RPS_E_qualcomm_5,RPS_E_qualcomm_5.bit,RPS_E_qualcomm_5.yuv.md5,8 -+1,HEVC_v1/RPS_F_docomo_2,RPS_F_docomo_2.bit,RPS_F_docomo_2.md5,8 -+1,HEVC_v1/RQT_A_HHI_4,RQT_A_HHI_4.bit,RQT_A_HHI_4.md5,8 -+1,HEVC_v1/RQT_B_HHI_4,RQT_B_HHI_4.bit,RQT_B_HHI_4.md5,8 -+1,HEVC_v1/RQT_C_HHI_4,RQT_C_HHI_4.bit,RQT_C_HHI_4.md5,8 -+1,HEVC_v1/RQT_D_HHI_4,RQT_D_HHI_4.bit,RQT_D_HHI_4.md5,8 -+1,HEVC_v1/RQT_E_HHI_4,RQT_E_HHI_4.bit,RQT_E_HHI_4.md5,8 -+1,HEVC_v1/RQT_F_HHI_4,RQT_F_HHI_4.bit,RQT_F_HHI_4.md5,8 -+1,HEVC_v1/RQT_G_HHI_4,RQT_G_HHI_4.bit,RQT_G_HHI_4.md5,8 -+1,HEVC_v1/SAO_A_MediaTek_4,SAO_A_MediaTek_4.bit,SAO_A_MediaTek_4.md5,8 -+1,HEVC_v1/SAO_B_MediaTek_5,SAO_B_MediaTek_5.bit,SAO_B_MediaTek_5.md5,8 -+1,HEVC_v1/SAO_C_Samsung_5,SAO_C_Samsung_5.bin,SAO_C_Samsung_5.md5,8 -+1,HEVC_v1/SAO_D_Samsung_5,SAO_D_Samsung_5.bin,SAO_D_Samsung_5.md5,8 -+1,HEVC_v1/SAO_E_Canon_4,SAO_E_Canon_4.bit,SAO_E_Canon_4.md5,8 -+1,HEVC_v1/SAO_F_Canon_3,SAO_F_Canon_3.bit,SAO_F_Canon_3.md5,8 -+1,HEVC_v1/SAO_G_Canon_3,SAO_G_Canon_3.bit,SAO_G_Canon_3.md5,8 -+1,HEVC_v1/SAO_H_Parabola_1,SAO_H_Parabola_1.bit,SAO_H_Parabola_1.md5,8 -+1,HEVC_v1/SAODBLK_A_MainConcept_4,SAODBLK_A_MainConcept_4.bin,SAODBLK_A_MainConcept_4_md5.txt,8 -+1,HEVC_v1/SAODBLK_B_MainConcept_4,SAODBLK_B_MainConcept_4.bin,SAODBLK_B_MainConcept_4_md5.txt,8 -+1,HEVC_v1/SDH_A_Orange_4,SDH_A_Orange_4.bit,SDH_A_Orange_4_yuv.md5,8 -+1,HEVC_v1/SLICES_A_Rovi_3,SLICES_A_Rovi_3.bin,SLICES_A_Rovi_3.md5,8 -+1,HEVC_v1/SLIST_A_Sony_5,SLIST_A_Sony_5.bin,SLIST_A_Sony_5_yuv.md5,8 -+1,HEVC_v1/SLIST_B_Sony_9,SLIST_B_Sony_9.bin,SLIST_B_Sony_9_yuv.md5,8 -+1,HEVC_v1/SLIST_C_Sony_4,SLIST_C_Sony_4.bin,SLIST_C_Sony_4_yuv.md5,8 -+1,HEVC_v1/SLIST_D_Sony_9,str.bin,SLIST_D_Sony_9_yuv.md5,8 -+1,HEVC_v1/SLPPLP_A_VIDYO_2,SLPPLP_A_VIDYO_2.bit,SLPPLP_A_VIDYO_2_yuv.md5,8 -+1,HEVC_v1/STRUCT_A_Samsung_7,STRUCT_A_Samsung_7.bin,STRUCT_A_Samsung_7.md5,8 -+1,HEVC_v1/STRUCT_B_Samsung_7,STRUCT_B_Samsung_7.bin,STRUCT_B_Samsung_7.md5,8 -+1,HEVC_v1/TILES_A_Cisco_2,TILES_A_Cisco_2.bin,TILES_A_Cisco_2_yuv.md5,8 -+1,HEVC_v1/TILES_B_Cisco_1,TILES_B_Cisco_1.bin,TILES_B_Cisco_1_yuv.md5,8 -+1,HEVC_v1/TMVP_A_MS_3,TMVP_A_MS_3.bit,TMVP_A_MS_3.yuv.md5,8 -+1,HEVC_v1/TSCL_A_VIDYO_5,TSCL_A_VIDYO_5.bit,TSCL_A_VIDYO_5_yuv.md5,8 -+1,HEVC_v1/TSCL_B_VIDYO_4,TSCL_B_VIDYO_4.bit,TSCL_B_VIDYO_4_yuv.md5,8 -+1,HEVC_v1/TSKIP_A_MS_3,TSKIP_A_MS_3.bit,TSKIP_A_MS_3.yuv.md5,8 -+3,HEVC_v1/TSUNEQBD_A_MAIN10_Technicolor_2,TSUNEQBD_A_MAIN10_Technicolor_2.bit,TSUNEQBD_A_MAIN10_Technicolor_2_yuv.md5, # unequal bit depth,10 -+1,HEVC_v1/TUSIZE_A_Samsung_1,TUSIZE_A_Samsung_1.bin,TUSIZE_A_Samsung_1.md5,8 -+1,HEVC_v1/VPSID_A_VIDYO_2,VPSID_A_VIDYO_2.bit,VPSID_A_VIDYO_2_yuv.md5,8 -+3,HEVC_v1/VPSSPSPPS_A_MainConcept_1,VPSSPSPPS_A_MainConcept_1.bin,VPSSPSPPS_A_MainConcept_1_md5.txt, # ???,8 -+1,HEVC_v1/WP_A_MAIN10_Toshiba_3,WP_A_MAIN10_Toshiba_3.bit,WP_A_MAIN10_Toshiba_3_yuv.md5,10 -+1,HEVC_v1/WP_A_Toshiba_3,WP_A_Toshiba_3.bit,WP_A_Toshiba_3_yuv.md5,8 -+1,HEVC_v1/WP_B_Toshiba_3,WP_B_Toshiba_3.bit,WP_B_Toshiba_3_yuv.md5,8 -+1,HEVC_v1/WP_MAIN10_B_Toshiba_3,WP_MAIN10_B_Toshiba_3.bit,WP_MAIN10_B_Toshiba_3_yuv.md5,10 -+1,HEVC_v1/WPP_A_ericsson_MAIN10_2,WPP_A_ericsson_MAIN10_2.bit,WPP_A_ericsson_MAIN10_yuv.md5,10 -+1,HEVC_v1/WPP_A_ericsson_MAIN_2,WPP_A_ericsson_MAIN_2.bit,WPP_A_ericsson_MAIN_2_yuv.md5,8 -+1,HEVC_v1/WPP_B_ericsson_MAIN10_2,WPP_B_ericsson_MAIN10_2.bit,WPP_B_ericsson_MAIN10_yuv.md5,10 -+1,HEVC_v1/WPP_B_ericsson_MAIN_2,WPP_B_ericsson_MAIN_2.bit,WPP_B_ericsson_MAIN_2_yuv.md5,8 -+1,HEVC_v1/WPP_C_ericsson_MAIN10_2,WPP_C_ericsson_MAIN10_2.bit,WPP_C_ericsson_MAIN10_yuv.md5,10 -+1,HEVC_v1/WPP_C_ericsson_MAIN_2,WPP_C_ericsson_MAIN_2.bit,WPP_C_ericsson_MAIN_2_yuv.md5,8 -+1,HEVC_v1/WPP_D_ericsson_MAIN10_2,WPP_D_ericsson_MAIN10_2.bit,WPP_D_ericsson_MAIN10_yuv.md5,10 -+1,HEVC_v1/WPP_D_ericsson_MAIN_2,WPP_D_ericsson_MAIN_2.bit,WPP_D_ericsson_MAIN_2_yuv.md5,8 -+1,HEVC_v1/WPP_E_ericsson_MAIN10_2,WPP_E_ericsson_MAIN10_2.bit,WPP_E_ericsson_MAIN10_yuv.md5,10 -+1,HEVC_v1/WPP_E_ericsson_MAIN_2,WPP_E_ericsson_MAIN_2.bit,WPP_E_ericsson_MAIN_2_yuv.md5,8 -+1,HEVC_v1/WPP_F_ericsson_MAIN10_2,WPP_F_ericsson_MAIN10_2.bit,WPP_F_ericsson_MAIN10_yuv.md5,10 -+1,HEVC_v1/WPP_F_ericsson_MAIN_2,WPP_F_ericsson_MAIN_2.bit,WPP_F_ericsson_MAIN_2_yuv.md5,8 -+1,RExt/ADJUST_IPRED_ANGLE_A_RExt_Mitsubishi_2,ADJUST_IPRED_ANGLE_A_RExt_Mitsubishi_2.bit,ADJUST_IPRED_ANGLE_A_RExt_Mitsubishi_yuv_2.md5,0 -+0,RExt/Bitdepth_A_RExt_Sony_1,Bitdepth_A_RExt_Sony_1.bin,md5sum.txt,8 -+0,RExt/Bitdepth_B_RExt_Sony_1,Bitdepth_B_RExt_Sony_1.bin,md5sum.txt,8 -+0,RExt/CCP_10bit_RExt_QCOM,CCP_10bit_RExt_QCOM.bin,CCP_10bit_RExt_QCOM_md5sum.txt,10 -+0,RExt/CCP_12bit_RExt_QCOM,CCP_12bit_RExt_QCOM.bin,CCP_12bit_RExt_QCOM_md5sum.txt,8 -+0,RExt/CCP_8bit_RExt_QCOM,CCP_8bit_RExt_QCOM.bin,CCP_8bit_RExt_QCOM_md5sum.txt,8 -+1,RExt/ExplicitRdpcm_A_BBC_1,ExplicitRdpcm_A_BBC_1.bit,md5sum.txt,0 -+0,RExt/ExplicitRdpcm_B_BBC_2,ExplicitRdpcm_B_BBC_1.bit,md5sum.txt,8 -+0,RExt/EXTPREC_HIGHTHROUGHPUT_444_16_INTRA_10BIT_RExt_Sony_1,EXTPREC_HIGHTHROUGHPUT_444_16_INTRA_10BIT_RExt_Sony_1.bit,EXTPREC_HIGHTHROUGHPUT_444_16_INTRA_10BIT_RExt_Sony_1.md5,10 -+0,RExt/EXTPREC_HIGHTHROUGHPUT_444_16_INTRA_12BIT_RExt_Sony_1,EXTPREC_HIGHTHROUGHPUT_444_16_INTRA_12BIT_RExt_Sony_1.bit,EXTPREC_HIGHTHROUGHPUT_444_16_INTRA_12BIT_RExt_Sony_1.md5,8 -+0,RExt/EXTPREC_HIGHTHROUGHPUT_444_16_INTRA_16BIT_RExt_Sony_1,EXTPREC_HIGHTHROUGHPUT_444_16_INTRA_16BIT_RExt_Sony_1.bit,EXTPREC_HIGHTHROUGHPUT_444_16_INTRA_16BIT_RExt_Sony_1.md5,8 -+0,RExt/EXTPREC_HIGHTHROUGHPUT_444_16_INTRA_8BIT_RExt_Sony_1,EXTPREC_HIGHTHROUGHPUT_444_16_INTRA_8BIT_RExt_Sony_1.bit,EXTPREC_HIGHTHROUGHPUT_444_16_INTRA_8BIT_RExt_Sony_1.md5,8 -+0,RExt/EXTPREC_MAIN_444_16_INTRA_10BIT_RExt_Sony_1,EXTPREC_MAIN_444_16_INTRA_10BIT_RExt_Sony_1.bit,EXTPREC_MAIN_444_16_INTRA_10BIT_RExt_Sony_1.md5,10 -+0,RExt/EXTPREC_MAIN_444_16_INTRA_12BIT_RExt_Sony_1,EXTPREC_MAIN_444_16_INTRA_12BIT_RExt_Sony_1.bit,EXTPREC_MAIN_444_16_INTRA_12BIT_RExt_Sony_1.md5,8 -+0,RExt/EXTPREC_MAIN_444_16_INTRA_16BIT_RExt_Sony_1,EXTPREC_MAIN_444_16_INTRA_16BIT_RExt_Sony_1.bit,EXTPREC_MAIN_444_16_INTRA_16BIT_RExt_Sony_1.md5,8 -+0,RExt/EXTPREC_MAIN_444_16_INTRA_8BIT_RExt_Sony_1,EXTPREC_MAIN_444_16_INTRA_8BIT_RExt_Sony_1.bit,EXTPREC_MAIN_444_16_INTRA_8BIT_RExt_Sony_1.md5,8 -+1,RExt/GENERAL_10b_420_RExt_Sony_1,GENERAL_10b_420_RExt_Sony_1.bit,GENERAL_10b_420_RExt_Sony_1.md5,10 -+1,RExt/GENERAL_10b_422_RExt_Sony_1,GENERAL_10b_422_RExt_Sony_1.bit,GENERAL_10b_422_RExt_Sony_1.md5,0 -+1,RExt/GENERAL_10b_444_RExt_Sony_2,GENERAL_10b_444_RExt_Sony_2.bit,GENERAL_10b_444_RExt_Sony_2.md5,0 -+1,RExt/GENERAL_12b_400_RExt_Sony_1,GENERAL_12b_400_RExt_Sony_1.bit,GENERAL_12b_400_RExt_Sony_1.md5,0 -+1,RExt/GENERAL_12b_420_RExt_Sony_1,GENERAL_12b_420_RExt_Sony_1.bit,GENERAL_12b_420_RExt_Sony_1.md5,0 -+1,RExt/GENERAL_12b_422_RExt_Sony_1,GENERAL_12b_422_RExt_Sony_1.bit,GENERAL_12b_422_RExt_Sony_1.md5,0 -+1,RExt/GENERAL_12b_444_RExt_Sony_2,GENERAL_12b_444_RExt_Sony_2.bit,GENERAL_12b_444_RExt_Sony_2.md5,0 -+0,RExt/GENERAL_16b_400_RExt_Sony_1,GENERAL_16b_400_RExt_Sony_1.bit,GENERAL_16b_400_RExt_Sony_1.md5,0 -+0,RExt/GENERAL_16b_444_highThroughput_RExt_Sony_2,GENERAL_16b_444_highThroughput_RExt_Sony_2.bit,GENERAL_16b_444_highThroughput_RExt_Sony_2.md5,8 -+0,RExt/GENERAL_16b_444_RExt_Sony_2,GENERAL_16b_444_RExt_Sony_2.bit,GENERAL_16b_444_RExt_Sony_2.md5,8 -+1,RExt/GENERAL_8b_400_RExt_Sony_1,GENERAL_8b_400_RExt_Sony_1.bit,GENERAL_8b_400_RExt_Sony_1.md5,0 -+1,RExt/GENERAL_8b_420_RExt_Sony_1,GENERAL_8b_420_RExt_Sony_1.bit,GENERAL_8b_420_RExt_Sony_1.md5,8 -+1,RExt/GENERAL_8b_444_RExt_Sony_2,GENERAL_8b_444_RExt_Sony_2.bit,GENERAL_8b_444_RExt_Sony_2.md5,0 -+1,RExt/IPCM_A_RExt_NEC_2,IPCM_A_RExt_NEC_2.bit,IPCM_A_RExt_NEC_2_yuv.md5,0 -+1,RExt/IPCM_B_RExt_NEC,IPCM_B_RExt_NEC.bit,IPCM_B_RExt_NEC_yuv.md5,0 -+1,RExt/Main_422_10_A_RExt_Sony_2,Main_422_10_A_RExt_Sony_2.bin,md5sum.txt,0 -+1,RExt/Main_422_10_B_RExt_Sony_2,Main_422_10_B_RExt_Sony_2.bin,md5sum.txt,0 -+1,RExt/PERSIST_RPARAM_A_RExt_Sony_3,PERSIST_RPARAM_A_RExt_Sony_3.bit,PERSIST_RPARAM_A_RExt_Sony_3.md5,0 -+1,RExt/QMATRIX_A_RExt_Sony_1,QMATRIX_A_RExt_Sony_1.bit,QMATRIX_A_RExt_Sony_1.md5,0 -+0,RExt/SAO_A_RExt_MediaTek_1,SAO_A_RExt_MediaTek_1.bit,SAO_A_RExt_MediaTek_1.md5, # Runs out of memory - could be fixed,8 -+0,RExt/TSCTX_10bit_I_RExt_SHARP_1,TSCTX_10bit_I_RExt_SHARP_1.bin,TSCTX_10bit_I_RExt_SHARP_1.md5,10 -+0,RExt/TSCTX_10bit_RExt_SHARP_1,TSCTX_10bit_RExt_SHARP_1.bin,TSCTX_10bit_RExt_SHARP_1.md5,10 -+0,RExt/TSCTX_12bit_I_RExt_SHARP_1,TSCTX_12bit_I_RExt_SHARP_1.bin,TSCTX_12bit_I_RExt_SHARP_1.md5,8 -+0,RExt/TSCTX_12bit_RExt_SHARP_1,TSCTX_12bit_RExt_SHARP_1.bin,TSCTX_12bit_RExt_SHARP_1.md5,8 -+0,RExt/TSCTX_8bit_I_RExt_SHARP_1,TSCTX_8bit_I_RExt_SHARP_1.bin,TSCTX_8bit_I_RExt_SHARP_1.md5,8 -+0,RExt/TSCTX_8bit_RExt_SHARP_1,TSCTX_8bit_RExt_SHARP_1.bin,TSCTX_8bit_RExt_SHARP_1.md5,8 -+0,RExt/WAVETILES_RExt_Sony_2,WAVETILES_RExt_Sony_2.bit,WAVETILES_RExt_Sony_2.md5,8 -+1,local/sao_cu16_mobile_344x280,sao_cu16_mobile_344x280.265,sao_cu16_mobile_344x280.md5,8 -+1,local/dblk_cu16_mobile_344x280,dblk_cu16_mobile_344x280.265,dblk_cu16_mobile_344x280.md5,8 -+1,local/dblksao_cu16_mobile_344x280,dblksao_cu16_mobile_344x280.265,dblksao_cu16_mobile_344x280.md5,8 -+1,local/dblk_pu32_horses_832x448,dblk_pu32_horses_832x448.265,dblk_pu32_horses_832x448.md5,8 -+1,local/intra_pred_21_laps,intra_pred_21_laps.265,intra_pred_21_laps.md5,8 ---- /dev/null -+++ b/pi-util/conf_h265.2016_HEVC_v1.csv -@@ -0,0 +1,147 @@ -+1,AMP_A_Samsung_7,AMP_A_Samsung_7.bin,AMP_A_Samsung_7.md5 -+1,AMP_B_Samsung_7,AMP_B_Samsung_7.bin,AMP_B_Samsung_7.md5 -+1,AMP_D_Hisilicon_3,AMP_D_Hisilicon.bit,AMP_D_Hisilicon_3.yuv.md5 -+1,AMP_E_Hisilicon_3,AMP_E_Hisilicon.bit,AMP_E_Hisilicon_3.yuv.md5 -+1,AMP_F_Hisilicon_3,AMP_F_Hisilicon_3.bit,AMP_F_Hisilicon_3.yuv.md5 -+1,AMVP_A_MTK_4,AMVP_A_MTK_4.bit,AMVP_A_MTK_4.md5 -+1,AMVP_B_MTK_4,AMVP_B_MTK_4.bit,AMVP_B_MTK_4.md5 -+1,AMVP_C_Samsung_7,AMVP_C_Samsung_7.bin,AMVP_C_Samsung_7.md5 -+1,BUMPING_A_ericsson_1,BUMPING_A_ericsson_1.bit,BUMPING_A_ericsson_1.md5 -+1,CAINIT_A_SHARP_4,CAINIT_A_SHARP_4.bit,CAINIT_A_SHARP_4.md5 -+1,CAINIT_B_SHARP_4,CAINIT_B_SHARP_4.bit,CAINIT_B_SHARP_4.md5 -+1,CAINIT_C_SHARP_3,CAINIT_C_SHARP_3.bit,CAINIT_C_SHARP_3.md5 -+1,CAINIT_D_SHARP_3,CAINIT_D_SHARP_3.bit,CAINIT_D_SHARP_3.md5 -+1,CAINIT_E_SHARP_3,CAINIT_E_SHARP_3.bit,CAINIT_E_SHARP_3.md5 -+1,CAINIT_F_SHARP_3,CAINIT_F_SHARP_3.bit,CAINIT_F_SHARP_3.md5 -+1,CAINIT_G_SHARP_3,CAINIT_G_SHARP_3.bit,CAINIT_G_SHARP_3.md5 -+1,CAINIT_H_SHARP_3,CAINIT_H_SHARP_3.bit,CAINIT_H_SHARP_3.md5 -+1,CIP_A_Panasonic_3,CIP_A_Panasonic_3.bit,CIP_A_Panasonic_3_yuv.md5 -+1,cip_B_NEC_3,cip_B_NEC_3.bit,cip_B_NEC_3.md5 -+1,CIP_C_Panasonic_2,CIP_C_Panasonic_2.bit,CIP_C_Panasonic_2_yuv.md5 -+1,CONFWIN_A_Sony_1,CONFWIN_A_Sony_1.bit,CONFWIN_A_Sony_1.md5 -+1,DBLK_A_MAIN10_VIXS_4,DBLK_A_MAIN10_VIXS_4.bit,DBLK_A_MAIN10_VIXS_4.md5 -+1,DBLK_A_SONY_3,DBLK_A_SONY_3.bit,DBLK_A_SONY_3.bit.yuv.md5 -+1,DBLK_B_SONY_3,DBLK_B_SONY_3.bit,DBLK_B_SONY_3.bit.yuv.md5 -+1,DBLK_C_SONY_3,DBLK_C_SONY_3.bit,DBLK_C_SONY_3.bit.yuv.md5 -+1,DBLK_D_VIXS_2,DBLK_D_VIXS_2.bit,DBLK_D_VIXS_2_yuv.md5 -+1,DBLK_E_VIXS_2,DBLK_E_VIXS_2.bit,DBLK_E_VIXS_2_yuv.md5 -+1,DBLK_F_VIXS_2,DBLK_F_VIXS_2.bit,DBLK_F_VIXS_2_yuv.md5 -+1,DBLK_G_VIXS_2,DBLK_G_VIXS_2.bit,DBLK_G_VIXS_2_yuv.md5 -+1,DELTAQP_A_BRCM_4,DELTAQP_A_BRCM_4.bit,DELTAQP_A_BRCM_4_yuv.md5 -+1,DELTAQP_B_SONY_3,DELTAQP_B_SONY_3.bit,DELTAQP_B_SONY_3.bit.yuv.md5 -+1,DELTAQP_C_SONY_3,DELTAQP_C_SONY_3.bit,DELTAQP_C_SONY_3.bit.yuv.md5 -+1,DSLICE_A_HHI_5,DSLICE_A_HHI_5.bin,DSLICE_A_HHI_5.md5 -+1,DSLICE_B_HHI_5,DSLICE_B_HHI_5.bin,DSLICE_B_HHI_5.md5 -+1,DSLICE_C_HHI_5,DSLICE_C_HHI_5.bin,DSLICE_C_HHI_5.md5 -+1,ENTP_A_QUALCOMM_1,ENTP_A_Qualcomm_1.bit,ENTP_A_Qualcomm_1.md5 -+1,ENTP_B_Qualcomm_1,ENTP_B_Qualcomm_1.bit,ENTP_B_Qualcomm_1.md5 -+1,ENTP_C_Qualcomm_1,ENTP_C_Qualcomm_1.bit,ENTP_C_Qualcomm_1.md5 -+1,EXT_A_ericsson_4,EXT_A_ericsson_4.bit,EXT_A_ericsson_4.md5 -+1,FILLER_A_Sony_1,FILLER_A_Sony_1.bit,FILLER_A_Sony_1.md5 -+1,HRD_A_Fujitsu_3,HRD_A_Fujitsu_3.bin,HRD_A_Fujitsu_3.md5 -+1,INITQP_A_Sony_1,INITQP_A_Sony_1.bit,INITQP_A_Sony_1.md5 -+1,INITQP_B_Main10_Sony_1,INITQP_B_Main10_Sony_1.bit,INITQP_B_Main10_Sony_1.md5 -+1,ipcm_A_NEC_3,ipcm_A_NEC_3.bit,ipcm_A_NEC_3.md5 -+1,ipcm_B_NEC_3,ipcm_B_NEC_3.bit,ipcm_B_NEC_3.md5 -+1,ipcm_C_NEC_3,ipcm_C_NEC_3.bit,ipcm_C_NEC_3.md5 -+1,ipcm_D_NEC_3,ipcm_D_NEC_3.bit,ipcm_D_NEC_3.md5 -+1,ipcm_E_NEC_2,ipcm_E_NEC_2.bit,ipcm_E_NEC_2.md5 -+1,IPRED_A_docomo_2,IPRED_A_docomo_2.bit,IPRED_A_docomo_2.md5 -+1,IPRED_B_Nokia_3,IPRED_B_Nokia_3.bit,IPRED_B_Nokia_3_yuv.md5 -+1,IPRED_C_Mitsubishi_3,IPRED_C_Mitsubishi_3.bit,IPRED_C_Mitsubishi_3_yuv.md5 -+1,LS_A_Orange_2,LS_A_Orange_2.bit,LS_A_Orange_2_yuv.md5 -+1,LS_B_Orange_4,LS_B_Orange_4.bit,LS_B_Orange_4_yuv.md5 -+1,LTRPSPS_A_Qualcomm_1,LTRPSPS_A_Qualcomm_1.bit,LTRPSPS_A_Qualcomm_1.md5 -+1,MAXBINS_A_TI_5,MAXBINS_A_TI_5.bit,MAXBINS_A_TI_5_yuv.md5 -+1,MAXBINS_B_TI_5,MAXBINS_B_TI_5.bit,MAXBINS_B_TI_5_yuv.md5 -+1,MAXBINS_C_TI_5,MAXBINS_C_TI_5.bit,MAXBINS_C_TI_5_yuv.md5 -+1,MERGE_A_TI_3,MERGE_A_TI_3.bit,MERGE_A_TI_3.md5 -+1,MERGE_B_TI_3,MERGE_B_TI_3.bit,MERGE_B_TI_3.md5 -+1,MERGE_C_TI_3,MERGE_C_TI_3.bit,MERGE_C_TI_3.md5 -+1,MERGE_D_TI_3,MERGE_D_TI_3.bit,MERGE_D_TI_3.md5 -+1,MERGE_E_TI_3,MERGE_E_TI_3.bit,MERGE_E_TI_3.md5 -+1,MERGE_F_MTK_4,MERGE_F_MTK_4.bit,MERGE_F_MTK_4.md5 -+1,MERGE_G_HHI_4,MERGE_G_HHI_4.bit,MERGE_G_HHI_4.md5 -+1,MVCLIP_A_qualcomm_3,MVCLIP_A_qualcomm_3.bit,MVCLIP_A_qualcomm_3.yuv.md5 -+1,MVDL1ZERO_A_docomo_4,MVDL1ZERO_A_docomo_4.bit,MVDL1ZERO_A_docomo_4.md5 -+1,MVEDGE_A_qualcomm_3,MVEDGE_A_qualcomm_3.bit,MVEDGE_A_qualcomm_3.yuv.md5 -+1,NoOutPrior_A_Qualcomm_1,NoOutPrior_A_Qualcomm_1.bit,NoOutPrior_A_Qualcomm_1.md5 -+1,NoOutPrior_B_Qualcomm_1,NoOutPrior_B_Qualcomm_1.bit,NoOutPrior_B_Qualcomm_1.md5 -+1,NUT_A_ericsson_5,NUT_A_ericsson_5.bit,NUT_A_ericsson_5.md5 -+1,OPFLAG_A_Qualcomm_1,OPFLAG_A_Qualcomm_1.bit,OPFLAG_A_Qualcomm_1.md5 -+1,OPFLAG_B_Qualcomm_1,OPFLAG_B_Qualcomm_1.bit,OPFLAG_B_Qualcomm_1.md5 -+1,OPFLAG_C_Qualcomm_1,OPFLAG_C_Qualcomm_1.bit,OPFLAG_C_Qualcomm_1.md5 -+1,PICSIZE_A_Bossen_1,PICSIZE_A_Bossen_1.bin,PICSIZE_A_Bossen_1.md5 -+1,PICSIZE_B_Bossen_1,PICSIZE_B_Bossen_1.bin,PICSIZE_B_Bossen_1.md5 -+1,PICSIZE_C_Bossen_1,PICSIZE_C_Bossen_1.bin,PICSIZE_C_Bossen_1.md5 -+1,PICSIZE_D_Bossen_1,PICSIZE_D_Bossen_1.bin,PICSIZE_D_Bossen_1.md5 -+1,PMERGE_A_TI_3,PMERGE_A_TI_3.bit,PMERGE_A_TI_3.md5 -+1,PMERGE_B_TI_3,PMERGE_B_TI_3.bit,PMERGE_B_TI_3.md5 -+1,PMERGE_C_TI_3,PMERGE_C_TI_3.bit,PMERGE_C_TI_3.md5 -+1,PMERGE_D_TI_3,PMERGE_D_TI_3.bit,PMERGE_D_TI_3.md5 -+1,PMERGE_E_TI_3,PMERGE_E_TI_3.bit,PMERGE_E_TI_3.md5 -+1,POC_A_Bossen_3,POC_A_Bossen_3.bin,POC_A_Bossen_3.md5 -+1,PPS_A_qualcomm_7,PPS_A_qualcomm_7.bit,PPS_A_qualcomm_7.yuv.md5 -+1,PS_B_VIDYO_3,PS_B_VIDYO_3.bit,PS_B_VIDYO_3_yuv.md5 -+1,RAP_A_docomo_6,RAP_A_docomo_6.bit,RAP_A_docomo_6.md5 -+1,RAP_B_Bossen_2,RAP_B_Bossen_2.bit,RAP_B_Bossen_2.md5 -+1,RPLM_A_qualcomm_4,RPLM_A_qualcomm_4.bit,RPLM_A_qualcomm_4.yuv.md5 -+1,RPLM_B_qualcomm_4,RPLM_B_qualcomm_4.bit,RPLM_B_qualcomm_4.yuv.md5 -+1,RPS_A_docomo_5,RPS_A_docomo_5.bit,RPS_A_docomo_5.md5 -+1,RPS_B_qualcomm_5,RPS_B_qualcomm_5.bit,RPS_B_qualcomm_5.yuv.md5 -+1,RPS_C_ericsson_5,RPS_C_ericsson_5.bit,RPS_C_ericsson_5.md5 -+1,RPS_D_ericsson_6,RPS_D_ericsson_6.bit,RPS_D_ericsson_6.md5 -+1,RPS_E_qualcomm_5,RPS_E_qualcomm_5.bit,RPS_E_qualcomm_5.yuv.md5 -+1,RPS_F_docomo_2,RPS_F_docomo_2.bit,RPS_F_docomo_2.md5 -+1,RQT_A_HHI_4,RQT_A_HHI_4.bit,RQT_A_HHI_4.md5 -+1,RQT_B_HHI_4,RQT_B_HHI_4.bit,RQT_B_HHI_4.md5 -+1,RQT_C_HHI_4,RQT_C_HHI_4.bit,RQT_C_HHI_4.md5 -+1,RQT_D_HHI_4,RQT_D_HHI_4.bit,RQT_D_HHI_4.md5 -+1,RQT_E_HHI_4,RQT_E_HHI_4.bit,RQT_E_HHI_4.md5 -+1,RQT_F_HHI_4,RQT_F_HHI_4.bit,RQT_F_HHI_4.md5 -+1,RQT_G_HHI_4,RQT_G_HHI_4.bit,RQT_G_HHI_4.md5 -+1,SAO_A_MediaTek_4,SAO_A_MediaTek_4.bit,SAO_A_MediaTek_4.md5 -+1,SAO_B_MediaTek_5,SAO_B_MediaTek_5.bit,SAO_B_MediaTek_5.md5 -+1,SAO_C_Samsung_5,SAO_C_Samsung_5.bin,SAO_C_Samsung_5.md5 -+1,SAO_D_Samsung_5,SAO_D_Samsung_5.bin,SAO_D_Samsung_5.md5 -+1,SAO_E_Canon_4,SAO_E_Canon_4.bit,SAO_E_Canon_4.md5 -+1,SAO_F_Canon_3,SAO_F_Canon_3.bit,SAO_F_Canon_3.md5 -+1,SAO_G_Canon_3,SAO_G_Canon_3.bit,SAO_G_Canon_3.md5 -+1,SAO_H_Parabola_1,SAO_H_Parabola_1.bit,SAO_H_Parabola_1.md5 -+2,SAODBLK_A_MainConcept_4,SAODBLK_A_MainConcept_4.bin,SAODBLK_A_MainConcept_4_md5.txt -+2,SAODBLK_B_MainConcept_4,SAODBLK_B_MainConcept_4.bin,SAODBLK_B_MainConcept_4_md5.txt -+1,SDH_A_Orange_4,SDH_A_Orange_4.bit,SDH_A_Orange_4_yuv.md5 -+1,SLICES_A_Rovi_3,SLICES_A_Rovi_3.bin,SLICES_A_Rovi_3.md5 -+1,SLIST_A_Sony_5,SLIST_A_Sony_5.bin,SLIST_A_Sony_5_yuv.md5 -+1,SLIST_B_Sony_9,SLIST_B_Sony_9.bin,SLIST_B_Sony_9_yuv.md5 -+1,SLIST_C_Sony_4,SLIST_C_Sony_4.bin,SLIST_C_Sony_4_yuv.md5 -+1,SLIST_D_Sony_9,str.bin,SLIST_D_Sony_9_yuv.md5 -+1,SLPPLP_A_VIDYO_2,SLPPLP_A_VIDYO_2.bit,SLPPLP_A_VIDYO_2_yuv.md5 -+1,STRUCT_A_Samsung_7,STRUCT_A_Samsung_7.bin,STRUCT_A_Samsung_7.md5 -+1,STRUCT_B_Samsung_7,STRUCT_B_Samsung_7.bin,STRUCT_B_Samsung_7.md5 -+1,TILES_A_Cisco_2,TILES_A_Cisco_2.bin,TILES_A_Cisco_2_yuv.md5 -+1,TILES_B_Cisco_1,TILES_B_Cisco_1.bin,TILES_B_Cisco_1_yuv.md5 -+1,TMVP_A_MS_3,TMVP_A_MS_3.bit,TMVP_A_MS_3.yuv.md5 -+1,TSCL_A_VIDYO_5,TSCL_A_VIDYO_5.bit,TSCL_A_VIDYO_5_yuv.md5 -+1,TSCL_B_VIDYO_4,TSCL_B_VIDYO_4.bit,TSCL_B_VIDYO_4_yuv.md5 -+1,TSKIP_A_MS_3,TSKIP_A_MS_3.bit,TSKIP_A_MS_3.yuv.md5 -+3,TSUNEQBD_A_MAIN10_Technicolor_2,TSUNEQBD_A_MAIN10_Technicolor_2.bit,TSUNEQBD_A_MAIN10_Technicolor_2_yuv.md5, # unequal bit depth -+1,TUSIZE_A_Samsung_1,TUSIZE_A_Samsung_1.bin,TUSIZE_A_Samsung_1.md5 -+1,VPSID_A_VIDYO_2,VPSID_A_VIDYO_2.bit,VPSID_A_VIDYO_2_yuv.md5 -+3,VPSSPSPPS_A_MainConcept_1,VPSSPSPPS_A_MainConcept_1.bin,VPSSPSPPS_A_MainConcept_1_md5.txt, # ??? -+1,WP_A_MAIN10_Toshiba_3,WP_A_MAIN10_Toshiba_3.bit,WP_A_MAIN10_Toshiba_3_yuv.md5 -+1,WP_A_Toshiba_3,WP_A_Toshiba_3.bit,WP_A_Toshiba_3_yuv.md5 -+1,WP_B_Toshiba_3,WP_B_Toshiba_3.bit,WP_B_Toshiba_3_yuv.md5 -+1,WP_MAIN10_B_Toshiba_3,WP_MAIN10_B_Toshiba_3.bit,WP_MAIN10_B_Toshiba_3_yuv.md5 -+1,WPP_A_ericsson_MAIN10_2,WPP_A_ericsson_MAIN10_2.bit,WPP_A_ericsson_MAIN10_yuv.md5 -+1,WPP_A_ericsson_MAIN_2,WPP_A_ericsson_MAIN_2.bit,WPP_A_ericsson_MAIN_2_yuv.md5 -+1,WPP_B_ericsson_MAIN10_2,WPP_B_ericsson_MAIN10_2.bit,WPP_B_ericsson_MAIN10_yuv.md5 -+1,WPP_B_ericsson_MAIN_2,WPP_B_ericsson_MAIN_2.bit,WPP_B_ericsson_MAIN_2_yuv.md5 -+1,WPP_C_ericsson_MAIN10_2,WPP_C_ericsson_MAIN10_2.bit,WPP_C_ericsson_MAIN10_yuv.md5 -+1,WPP_C_ericsson_MAIN_2,WPP_C_ericsson_MAIN_2.bit,WPP_C_ericsson_MAIN_2_yuv.md5 -+1,WPP_D_ericsson_MAIN10_2,WPP_D_ericsson_MAIN10_2.bit,WPP_D_ericsson_MAIN10_yuv.md5 -+1,WPP_D_ericsson_MAIN_2,WPP_D_ericsson_MAIN_2.bit,WPP_D_ericsson_MAIN_2_yuv.md5 -+1,WPP_E_ericsson_MAIN10_2,WPP_E_ericsson_MAIN10_2.bit,WPP_E_ericsson_MAIN10_yuv.md5 -+1,WPP_E_ericsson_MAIN_2,WPP_E_ericsson_MAIN_2.bit,WPP_E_ericsson_MAIN_2_yuv.md5 -+1,WPP_F_ericsson_MAIN10_2,WPP_F_ericsson_MAIN10_2.bit,WPP_F_ericsson_MAIN10_yuv.md5 -+1,WPP_F_ericsson_MAIN_2,WPP_F_ericsson_MAIN_2.bit,WPP_F_ericsson_MAIN_2_yuv.md5 ---- /dev/null -+++ b/pi-util/conf_h265.csv -@@ -0,0 +1,144 @@ -+1,ADJUST_IPRED_ANGLE_A_RExt_Mitsubishi_1,ADJUST_IPRED_ANGLE_A_RExt_Mitsubishi_1.bit,ADJUST_IPRED_ANGLE_A_RExt_Mitsubishi_1.md5 -+1,AMP_A_Samsung_6,AMP_A_Samsung_6.bin,AMP_A_Samsung_6.md5 -+1,AMP_B_Samsung_6,AMP_B_Samsung_6.bin,AMP_B_Samsung_6.md5 -+1,AMP_D_Hisilicon_3,AMP_D_Hisilicon.bit,AMP_D_Hisilicon_3.yuv.md5 -+1,AMP_E_Hisilicon_3,AMP_E_Hisilicon.bit,AMP_E_Hisilicon_3.yuv.md5 -+1,AMP_F_Hisilicon_3,AMP_F_Hisilicon_3.bit,AMP_F_Hisilicon_3.yuv.md5 -+1,AMVP_A_MTK_4,AMVP_A_MTK_4.bit,AMVP_A_MTK_4.md5 -+1,AMVP_B_MTK_4,AMVP_B_MTK_4.bit,AMVP_B_MTK_4.md5 -+1,AMVP_C_Samsung_6,AMVP_C_Samsung_6.bin,AMVP_C_Samsung_6.md5 -+1,BUMPING_A_ericsson_1,BUMPING_A_ericsson_1.bit,BUMPING_A_ericsson_1.md5 -+1,CAINIT_A_SHARP_4,CAINIT_A_SHARP_4.bit,CAINIT_A_SHARP_4.md5 -+1,CAINIT_B_SHARP_4,CAINIT_B_SHARP_4.bit,CAINIT_B_SHARP_4.md5 -+1,CAINIT_C_SHARP_3,CAINIT_C_SHARP_3.bit,CAINIT_C_SHARP_3.md5 -+1,CAINIT_D_SHARP_3,CAINIT_D_SHARP_3.bit,CAINIT_D_SHARP_3.md5 -+1,CAINIT_E_SHARP_3,CAINIT_E_SHARP_3.bit,CAINIT_E_SHARP_3.md5 -+1,CAINIT_F_SHARP_3,CAINIT_F_SHARP_3.bit,CAINIT_F_SHARP_3.md5 -+1,CAINIT_G_SHARP_3,CAINIT_G_SHARP_3.bit,CAINIT_G_SHARP_3.md5 -+1,CAINIT_H_SHARP_3,CAINIT_H_SHARP_3.bit,CAINIT_H_SHARP_3.md5 -+1,CIP_A_Panasonic_3,CIP_A_Panasonic_3.bit,CIP_A_Panasonic_3_yuv.md5 -+1,cip_B_NEC_3,cip_B_NEC_3.bit,cip_B_NEC_3.md5 -+1,CIP_C_Panasonic_2,CIP_C_Panasonic_2.bit,CIP_C_Panasonic_2_yuv.md5 -+1,CONFWIN_A_Sony_1,CONFWIN_A_Sony_1.bit,CONFWIN_A_Sony_1.md5 -+1,DBLK_A_MAIN10_VIXS_3,DBLK_A_MAIN10_VIXS_3.bit,DBLK_A_MAIN10_VIXS_3.md5 -+1,DBLK_A_SONY_3,DBLK_A_SONY_3.bit,DBLK_A_SONY_3.bit.yuv.md5 -+1,DBLK_B_SONY_3,DBLK_B_SONY_3.bit,DBLK_B_SONY_3.bit.yuv.md5 -+1,DBLK_C_SONY_3,DBLK_C_SONY_3.bit,DBLK_C_SONY_3.bit.yuv.md5 -+1,DBLK_D_VIXS_2,DBLK_D_VIXS_2.bit,DBLK_D_VIXS_2_yuv.md5 -+1,DBLK_E_VIXS_2,DBLK_E_VIXS_2.bit,DBLK_E_VIXS_2_yuv.md5 -+1,DBLK_F_VIXS_2,DBLK_F_VIXS_2.bit,DBLK_F_VIXS_2_yuv.md5 -+1,DBLK_G_VIXS_2,DBLK_G_VIXS_2.bit,DBLK_G_VIXS_2_yuv.md5 -+1,DELTAQP_A_BRCM_4,DELTAQP_A_BRCM_4.bit,DELTAQP_A_BRCM_4_yuv.md5 -+1,DELTAQP_B_SONY_3,DELTAQP_B_SONY_3.bit,DELTAQP_B_SONY_3.bit.yuv.md5 -+1,DELTAQP_C_SONY_3,DELTAQP_C_SONY_3.bit,DELTAQP_C_SONY_3.bit.yuv.md5 -+1,DSLICE_A_HHI_5,DSLICE_A_HHI_5.bin,DSLICE_A_HHI_5.md5 -+1,DSLICE_B_HHI_5,DSLICE_B_HHI_5.bin,DSLICE_B_HHI_5.md5 -+1,DSLICE_C_HHI_5,DSLICE_C_HHI_5.bin,DSLICE_C_HHI_5.md5 -+1,ENTP_A_QUALCOMM_1,ENTP_A_Qualcomm_1.bit,ENTP_A_Qualcomm_1.md5 -+1,ENTP_B_Qualcomm_1,ENTP_B_Qualcomm_1.bit,ENTP_B_Qualcomm_1.md5 -+1,ENTP_C_Qualcomm_1,ENTP_C_Qualcomm_1.bit,ENTP_C_Qualcomm_1.md5 -+1,EXT_A_ericsson_4,EXT_A_ericsson_4.bit,EXT_A_ericsson_4.md5 -+1,FILLER_A_Sony_1,FILLER_A_Sony_1.bit,FILLER_A_Sony_1.md5 -+1,HRD_A_Fujitsu_3,HRD_A_Fujitsu_3.bin,HRD_A_Fujitsu_3.md5 -+1,INITQP_A_Sony_1,INITQP_A_Sony_1.bit,INITQP_A_Sony_1.md5 -+1,INITQP_B_Main10_Sony_1,INITQP_B_Main10_Sony_1.bit,INITQP_B_Main10_Sony_1.md5 -+1,ipcm_A_NEC_3,ipcm_A_NEC_3.bit,ipcm_A_NEC_3.md5 -+1,ipcm_B_NEC_3,ipcm_B_NEC_3.bit,ipcm_B_NEC_3.md5 -+1,ipcm_C_NEC_3,ipcm_C_NEC_3.bit,ipcm_C_NEC_3.md5 -+1,ipcm_D_NEC_3,ipcm_D_NEC_3.bit,ipcm_D_NEC_3.md5 -+1,ipcm_E_NEC_2,ipcm_E_NEC_2.bit,ipcm_E_NEC_2.md5 -+1,IPRED_A_docomo_2,IPRED_A_docomo_2.bit,IPRED_A_docomo_2.md5 -+1,IPRED_B_Nokia_3,IPRED_B_Nokia_3.bit,IPRED_B_Nokia_3_yuv.md5 -+1,IPRED_C_Mitsubishi_3,IPRED_C_Mitsubishi_3.bit,IPRED_C_Mitsubishi_3_yuv.md5 -+1,LS_A_Orange_2,LS_A_Orange_2.bit,LS_A_Orange_2_yuv.md5 -+1,LS_B_Orange_4,LS_B_Orange_4.bit,LS_B_Orange_4_yuv.md5 -+1,LTRPSPS_A_Qualcomm_1,LTRPSPS_A_Qualcomm_1.bit,LTRPSPS_A_Qualcomm_1.md5 -+1,MAXBINS_A_TI_4,MAXBINS_A_TI_4.bit,MAXBINS_A_TI_4.md5 -+1,MAXBINS_B_TI_4,MAXBINS_B_TI_4.bit,MAXBINS_B_TI_4.md5 -+1,MAXBINS_C_TI_4,MAXBINS_C_TI_4.bit,MAXBINS_C_TI_4.md5 -+1,MERGE_A_TI_3,MERGE_A_TI_3.bit,MERGE_A_TI_3.md5 -+1,MERGE_B_TI_3,MERGE_B_TI_3.bit,MERGE_B_TI_3.md5 -+1,MERGE_C_TI_3,MERGE_C_TI_3.bit,MERGE_C_TI_3.md5 -+1,MERGE_D_TI_3,MERGE_D_TI_3.bit,MERGE_D_TI_3.md5 -+1,MERGE_E_TI_3,MERGE_E_TI_3.bit,MERGE_E_TI_3.md5 -+1,MERGE_F_MTK_4,MERGE_F_MTK_4.bit,MERGE_F_MTK_4.md5 -+1,MERGE_G_HHI_4,MERGE_G_HHI_4.bit,MERGE_G_HHI_4.md5 -+1,MVCLIP_A_qualcomm_3,MVCLIP_A_qualcomm_3.bit,MVCLIP_A_qualcomm_3.yuv.md5 -+1,MVDL1ZERO_A_docomo_4,MVDL1ZERO_A_docomo_4.bit,MVDL1ZERO_A_docomo_4.md5 -+1,MVEDGE_A_qualcomm_3,MVEDGE_A_qualcomm_3.bit,MVEDGE_A_qualcomm_3.yuv.md5 -+1,NoOutPrior_A_Qualcomm_1,NoOutPrior_A_Qualcomm_1.bit,NoOutPrior_A_Qualcomm_1.md5 -+1,NoOutPrior_B_Qualcomm_1,NoOutPrior_B_Qualcomm_1.bit,NoOutPrior_B_Qualcomm_1.md5 -+1,NUT_A_ericsson_5,NUT_A_ericsson_5.bit,NUT_A_ericsson_5.md5 -+1,OPFLAG_A_Qualcomm_1,OPFLAG_A_Qualcomm_1.bit,OPFLAG_A_Qualcomm_1.md5 -+1,OPFLAG_B_Qualcomm_1,OPFLAG_B_Qualcomm_1.bit,OPFLAG_B_Qualcomm_1.md5 -+1,OPFLAG_C_Qualcomm_1,OPFLAG_C_Qualcomm_1.bit,OPFLAG_C_Qualcomm_1.md5 -+1,PICSIZE_A_Bossen_1,PICSIZE_A_Bossen_1.bin,PICSIZE_A_Bossen_1.md5 -+1,PICSIZE_B_Bossen_1,PICSIZE_B_Bossen_1.bin,PICSIZE_B_Bossen_1.md5 -+1,PICSIZE_C_Bossen_1,PICSIZE_C_Bossen_1.bin,PICSIZE_C_Bossen_1.md5 -+1,PICSIZE_D_Bossen_1,PICSIZE_D_Bossen_1.bin,PICSIZE_D_Bossen_1.md5 -+1,PMERGE_A_TI_3,PMERGE_A_TI_3.bit,PMERGE_A_TI_3.md5 -+1,PMERGE_B_TI_3,PMERGE_B_TI_3.bit,PMERGE_B_TI_3.md5 -+1,PMERGE_C_TI_3,PMERGE_C_TI_3.bit,PMERGE_C_TI_3.md5 -+1,PMERGE_D_TI_3,PMERGE_D_TI_3.bit,PMERGE_D_TI_3.md5 -+1,PMERGE_E_TI_3,PMERGE_E_TI_3.bit,PMERGE_E_TI_3.md5 -+1,POC_A_Bossen_3,POC_A_Bossen_3.bin,POC_A_Bossen_3.md5 -+1,PPS_A_qualcomm_7,PPS_A_qualcomm_7.bit,PPS_A_qualcomm_7.yuv.md5 -+1,PS_B_VIDYO_3,PS_B_VIDYO_3.bit,PS_B_VIDYO_3_yuv.md5 -+1,RAP_A_docomo_6,RAP_A_docomo_6.bit,RAP_A_docomo_6.md5 -+1,RAP_B_Bossen_2,RAP_B_Bossen_2.bit,RAP_B_Bossen_2.md5 -+1,RPLM_A_qualcomm_4,RPLM_A_qualcomm_4.bit,RPLM_A_qualcomm_4.yuv.md5 -+1,RPLM_B_qualcomm_4,RPLM_B_qualcomm_4.bit,RPLM_B_qualcomm_4.yuv.md5 -+1,RPS_A_docomo_5,RPS_A_docomo_5.bit,RPS_A_docomo_5.md5 -+1,RPS_B_qualcomm_5,RPS_B_qualcomm_5.bit,RPS_B_qualcomm_5.yuv.md5 -+1,RPS_C_ericsson_5,RPS_C_ericsson_5.bit,RPS_C_ericsson_5.md5 -+1,RPS_D_ericsson_6,RPS_D_ericsson_6.bit,RPS_D_ericsson_6.md5 -+1,RPS_E_qualcomm_5,RPS_E_qualcomm_5.bit,RPS_E_qualcomm_5.yuv.md5 -+1,RPS_F_docomo_2,RPS_F_docomo_2.bit,RPS_F_docomo_2.md5 -+1,RQT_A_HHI_4,RQT_A_HHI_4.bit,RQT_A_HHI_4.md5 -+1,RQT_B_HHI_4,RQT_B_HHI_4.bit,RQT_B_HHI_4.md5 -+1,RQT_C_HHI_4,RQT_C_HHI_4.bit,RQT_C_HHI_4.md5 -+1,RQT_D_HHI_4,RQT_D_HHI_4.bit,RQT_D_HHI_4.md5 -+1,RQT_E_HHI_4,RQT_E_HHI_4.bit,RQT_E_HHI_4.md5 -+1,RQT_F_HHI_4,RQT_F_HHI_4.bit,RQT_F_HHI_4.md5 -+1,RQT_G_HHI_4,RQT_G_HHI_4.bit,RQT_G_HHI_4.md5 -+1,SAO_A_MediaTek_4,SAO_A_MediaTek_4.bit,SAO_A_MediaTek_4.md5 -+1,SAO_B_MediaTek_5,SAO_B_MediaTek_5.bit,SAO_B_MediaTek_5.md5 -+1,SAO_C_Samsung_5,SAO_C_Samsung_5.bin,SAO_C_Samsung_5.md5 -+1,SAO_D_Samsung_5,SAO_D_Samsung_5.bin,SAO_D_Samsung_5.md5 -+1,SAO_E_Canon_4,SAO_E_Canon_4.bit,SAO_E_Canon_4.md5 -+1,SAO_F_Canon_3,SAO_F_Canon_3.bit,SAO_F_Canon_3.md5 -+1,SAO_G_Canon_3,SAO_G_Canon_3.bit,SAO_G_Canon_3.md5 -+1,SDH_A_Orange_4,SDH_A_Orange_4.bit,SDH_A_Orange_4_yuv.md5 -+1,SLICES_A_Rovi_3,SLICES_A_Rovi_3.bin,SLICES_A_Rovi_3.md5 -+1,SLIST_A_Sony_4,str.bin,SLIST_A_Sony_4_yuv.md5 -+1,SLIST_B_Sony_8,str.bin,SLIST_B_Sony_8_yuv.md5 -+1,SLIST_C_Sony_3,str.bin,SLIST_C_Sony_3_yuv.md5 -+1,SLIST_D_Sony_9,str.bin,SLIST_D_Sony_9_yuv.md5 -+1,SLPPLP_A_VIDYO_2,SLPPLP_A_VIDYO_2.bit,SLPPLP_A_VIDYO_2_yuv.md5 -+1,STRUCT_A_Samsung_6,STRUCT_A_Samsung_6.bin,STRUCT_A_Samsung_6.md5 -+1,STRUCT_B_Samsung_6,STRUCT_B_Samsung_6.bin,STRUCT_B_Samsung_6.md5 -+1,TILES_A_Cisco_2,TILES_A_Cisco_2.bin,TILES_A_Cisco_2_yuv.md5 -+1,TILES_B_Cisco_1,TILES_B_Cisco_1.bin,TILES_B_Cisco_1_yuv.md5 -+1,TMVP_A_MS_3,TMVP_A_MS_3.bit,TMVP_A_MS_3.yuv.md5 -+1,TSCL_A_VIDYO_5,TSCL_A_VIDYO_5.bit,TSCL_A_VIDYO_5_yuv.md5 -+1,TSCL_B_VIDYO_4,TSCL_B_VIDYO_4.bit,TSCL_B_VIDYO_4_yuv.md5 -+1,TSKIP_A_MS_3,TSKIP_A_MS_3.bit,TSKIP_A_MS_3.yuv.md5 -+0,TSUNEQBD_A_MAIN10_Technicolor_2,TSUNEQBD_A_MAIN10_Technicolor_2.bit,TSUNEQBD_A_MAIN10_Technicolor_2_yuv.md5, # Y/C bit depth unmatched -+1,TUSIZE_A_Samsung_1,TUSIZE_A_Samsung_1.bin,TUSIZE_A_Samsung_1.md5 -+1,VPSID_A_VIDYO_2,VPSID_A_VIDYO_2.bit,VPSID_A_VIDYO_2_yuv.md5 -+1,WP_A_MAIN10_Toshiba_3,WP_A_MAIN10_Toshiba_3.bit,WP_A_MAIN10_Toshiba_3_yuv.md5 -+1,WP_A_Toshiba_3,WP_A_Toshiba_3.bit,WP_A_Toshiba_3_yuv.md5 -+1,WP_B_Toshiba_3,WP_B_Toshiba_3.bit,WP_B_Toshiba_3_yuv.md5 -+1,WP_MAIN10_B_Toshiba_3,WP_MAIN10_B_Toshiba_3.bit,WP_MAIN10_B_Toshiba_3_yuv.md5 -+1,WPP_A_ericsson_MAIN10_2,WPP_A_ericsson_MAIN10_2.bit,WPP_A_ericsson_MAIN10_yuv.md5 -+1,WPP_A_ericsson_MAIN_2,WPP_A_ericsson_MAIN_2.bit,WPP_A_ericsson_MAIN_2_yuv.md5 -+1,WPP_B_ericsson_MAIN10_2,WPP_B_ericsson_MAIN10_2.bit,WPP_B_ericsson_MAIN10_yuv.md5 -+1,WPP_B_ericsson_MAIN_2,WPP_B_ericsson_MAIN_2.bit,WPP_B_ericsson_MAIN_2_yuv.md5 -+1,WPP_C_ericsson_MAIN10_2,WPP_C_ericsson_MAIN10_2.bit,WPP_C_ericsson_MAIN10_yuv.md5 -+1,WPP_C_ericsson_MAIN_2,WPP_C_ericsson_MAIN_2.bit,WPP_C_ericsson_MAIN_2_yuv.md5 -+1,WPP_D_ericsson_MAIN10_2,WPP_D_ericsson_MAIN10_2.bit,WPP_D_ericsson_MAIN10_yuv.md5 -+1,WPP_D_ericsson_MAIN_2,WPP_D_ericsson_MAIN_2.bit,WPP_D_ericsson_MAIN_2_yuv.md5 -+1,WPP_E_ericsson_MAIN10_2,WPP_E_ericsson_MAIN10_2.bit,WPP_E_ericsson_MAIN10_yuv.md5 -+1,WPP_E_ericsson_MAIN_2,WPP_E_ericsson_MAIN_2.bit,WPP_E_ericsson_MAIN_2_yuv.md5 -+1,WPP_F_ericsson_MAIN10_2,WPP_F_ericsson_MAIN10_2.bit,WPP_F_ericsson_MAIN10_yuv.md5 -+1,WPP_F_ericsson_MAIN_2,WPP_F_ericsson_MAIN_2.bit,WPP_F_ericsson_MAIN_2_yuv.md5 ---- /dev/null -+++ b/pi-util/conf_native.sh -@@ -0,0 +1,106 @@ -+echo "Configure for native build" -+ -+FFSRC=`pwd` -+MC=`dpkg --print-architecture` -+BUILDBASE=$FFSRC/out -+ -+#RPI_KEEPS="-save-temps=obj" -+RPI_KEEPS="" -+ -+NOSHARED= -+MMAL= -+ -+while [ "$1" != "" ] ; do -+ case $1 in -+ --noshared) -+ NOSHARED=1 -+ ;; -+ --mmal) -+ MMAL=1 -+ ;; -+ *) -+ echo "Usage $0: [--noshared] [--mmal]" -+ exit 1 -+ ;; -+ esac -+ shift -+done -+ -+ -+MCOPTS= -+RPI_INCLUDES= -+RPI_LIBDIRS= -+RPI_DEFINES= -+RPI_EXTRALIBS= -+ -+if [ "$MC" == "arm64" ]; then -+ echo "M/C aarch64" -+ A=aarch64-linux-gnu -+ B=arm64 -+elif [ "$MC" == "armhf" ]; then -+ echo "M/C armv7" -+ A=arm-linux-gnueabihf -+ B=armv7 -+ MCOPTS="--arch=armv6t2 --cpu=cortex-a7" -+ RPI_DEFINES=-mfpu=neon-vfpv4 -+else -+ echo Unexpected architecture $MC -+ exit 1 -+fi -+ -+if [ $MMAL ]; then -+ RPI_OPT_VC=/opt/vc -+ RPI_INCLUDES="-I$RPI_OPT_VC/include -I$RPI_OPT_VC/include/interface/vcos/pthreads -I$RPI_OPT_VC/include/interface/vmcs_host/linux" -+ RPI_LIBDIRS="-L$RPI_OPT_VC/lib" -+ RPI_DEFINES="$RPI_DEFINES -D__VCCOREVER__=0x4000000" -+ RPI_EXTRALIBS="-Wl,--start-group -lbcm_host -lmmal -lmmal_util -lmmal_core -lvcos -lvcsm -lvchostif -lvchiq_arm -Wl,--end-group" -+ RPIOPTS="--enable-mmal --enable-rpi" -+else -+ RPIOPTS="--disable-mmal --enable-sand" -+fi -+ -+C=`lsb_release -sc` -+V=`cat RELEASE` -+ -+SHARED_LIBS="--enable-shared" -+if [ $NOSHARED ]; then -+ SHARED_LIBS="--disable-shared" -+ OUT=$BUILDBASE/$B-$C-$V-static-rel -+ echo Static libs -+else -+ echo Shared libs -+ OUT=$BUILDBASE/$B-$C-$V-shared-rel -+fi -+ -+USR_PREFIX=$OUT/install -+LIB_PREFIX=$USR_PREFIX/lib/$A -+INC_PREFIX=$USR_PREFIX/include/$A -+ -+echo Destination directory: $OUT -+mkdir -p $OUT -+# Nothing under here need worry git - including this .gitignore! -+echo "**" > $BUILDBASE/.gitignore -+cd $OUT -+ -+$FFSRC/configure \ -+ --prefix=$USR_PREFIX\ -+ --libdir=$LIB_PREFIX\ -+ --incdir=$INC_PREFIX\ -+ $MCOPTS\ -+ --disable-stripping\ -+ --disable-thumb\ -+ --enable-v4l2-request\ -+ --enable-libdrm\ -+ --enable-vout-egl\ -+ --enable-vout-drm\ -+ $SHARED_LIBS\ -+ $RPIOPTS\ -+ --extra-cflags="-ggdb $RPI_KEEPS $RPI_DEFINES $RPI_INCLUDES"\ -+ --extra-cxxflags="$RPI_DEFINES $RPI_INCLUDES"\ -+ --extra-ldflags="$RPI_LIBDIRS"\ -+ --extra-libs="$RPI_EXTRALIBS"\ -+ --extra-version="rpi" -+ -+ -+# gcc option for getting asm listing -+# -Wa,-ahls ---- /dev/null -+++ b/pi-util/ffconf.py -@@ -0,0 +1,215 @@ -+#!/usr/bin/env python3 -+ -+import string -+import os -+import subprocess -+import re -+import argparse -+import sys -+import csv -+from stat import * -+ -+CODEC_HEVC_RPI = 1 -+HWACCEL_RPI = 2 -+HWACCEL_DRM = 3 -+HWACCEL_VAAPI = 4 -+ -+def testone(fileroot, srcname, es_file, md5_file, pix, dectype, vcodec, ffmpeg_exec): -+ hwaccel = "" -+ if dectype == HWACCEL_RPI: -+ hwaccel = "rpi" -+ elif dectype == HWACCEL_DRM: -+ hwaccel = "drm" -+ elif dectype == HWACCEL_VAAPI: -+ hwaccel = "vaapi" -+ -+ pix_fmt = [] -+ if pix == "8": -+ pix_fmt = ["-pix_fmt", "yuv420p"] -+ elif pix == "10": -+ pix_fmt = ["-pix_fmt", "yuv420p10le"] -+ elif pix == "12": -+ pix_fmt = ["-pix_fmt", "yuv420p12le"] -+ -+ tmp_root = "/tmp" -+ -+ names = srcname.split('/') -+ while len(names) > 1: -+ tmp_root = os.path.join(tmp_root, names[0]) -+ del names[0] -+ name = names[0] -+ -+ if not os.path.exists(tmp_root): -+ os.makedirs(tmp_root) -+ -+ dec_file = os.path.join(tmp_root, name + ".dec.md5") -+ try: -+ os.remove(dec_file) -+ except: -+ pass -+ -+ flog = open(os.path.join(tmp_root, name + ".log"), "wt") -+ -+ ffargs = [ffmpeg_exec, "-flags", "unaligned", "-hwaccel", hwaccel, "-vcodec", "hevc", "-i", os.path.join(fileroot, es_file)] + pix_fmt + ["-f", "md5", dec_file] -+ -+ # Unaligned needed for cropping conformance -+ if hwaccel: -+ rstr = subprocess.call(ffargs, stdout=flog, stderr=subprocess.STDOUT) -+ else: -+ rstr = subprocess.call( -+ [ffmpeg_exec, "-flags", "unaligned", "-vcodec", vcodec, "-i", os.path.join(fileroot, es_file), "-f", "md5", dec_file], -+ stdout=flog, stderr=subprocess.STDOUT) -+ -+ try: -+ m1 = None -+ m2 = None -+ with open(os.path.join(fileroot, md5_file)) as f: -+ for line in f: -+ m1 = re.search("[0-9a-f]{32}", line.lower()) -+ if m1: -+ break -+ -+ with open(dec_file) as f: -+ m2 = re.search("[0-9a-f]{32}", f.readline()) -+ except: -+ pass -+ -+ if m1 and m2 and m1.group() == m2.group(): -+ print("Match: " + m1.group(), file=flog) -+ rv = 0 -+ elif not m1: -+ print("****** Cannot find m1", file=flog) -+ rv = 3 -+ elif not m2: -+ print("****** Cannot find m2", file=flog) -+ rv = 2 -+ else: -+ print("****** Mismatch: " + m1.group() + " != " + m2.group(), file=flog) -+ rv = 1 -+ flog.close() -+ return rv -+ -+def scandir(root): -+ aconf = [] -+ ents = os.listdir(root) -+ ents.sort(key=str.lower) -+ for name in ents: -+ test_path = os.path.join(root, name) -+ if S_ISDIR(os.stat(test_path).st_mode): -+ files = os.listdir(test_path) -+ es_file = "?" -+ md5_file = "?" -+ for f in files: -+ (base, ext) = os.path.splitext(f) -+ if base[0] == '.': -+ pass -+ elif ext == ".bit" or ext == ".bin": -+ es_file = f -+ elif ext == ".md5" or (ext == ".txt" and (base[-4:] == "_md5" or base[-6:] == "md5sum")): -+ if md5_file == "?": -+ md5_file = f -+ elif base[-3:] == "yuv": -+ md5_file = f -+ aconf.append((1, name, es_file, md5_file)) -+ return aconf -+ -+def runtest(name, tests): -+ if not tests: -+ return True -+ for t in tests: -+ if name[0:len(t)] == t or name.find("/" + t) != -1: -+ return True -+ return False -+ -+def doconf(csva, tests, test_root, vcodec, dectype, ffmpeg_exec): -+ unx_failures = [] -+ unx_success = [] -+ failures = 0 -+ successes = 0 -+ for a in csva: -+ exp_test = int(a[0]) -+ if (exp_test and runtest(a[1], tests)): -+ name = a[1] -+ print ("==== ", name, end="") -+ sys.stdout.flush() -+ -+ rv = testone(os.path.join(test_root, name), name, a[2], a[3], a[4], dectype=dectype, vcodec=vcodec, ffmpeg_exec=ffmpeg_exec) -+ if (rv == 0): -+ successes += 1 -+ else: -+ failures += 1 -+ -+ if (rv == 0): -+ if exp_test == 2: -+ print(": * OK *") -+ unx_success.append(name) -+ else: -+ print(": ok") -+ elif exp_test == 2 and rv == 1: -+ print(": fail") -+ elif exp_test == 3 and rv == 2: -+ # Call an expected "crash" an abort -+ print(": abort") -+ else: -+ unx_failures.append(name) -+ if rv == 1: -+ print(": * FAIL *") -+ elif (rv == 2) : -+ print(": * CRASH *") -+ elif (rv == 3) : -+ print(": * MD5 MISSING *") -+ else : -+ print(": * BANG *") -+ -+ if unx_failures or unx_success: -+ print("Unexpected Failures:", unx_failures) -+ print("Unexpected Success: ", unx_success) -+ else: -+ print("All tests normal:", successes, "ok,", failures, "failed") -+ -+ -+class ConfCSVDialect(csv.Dialect): -+ delimiter = ',' -+ doublequote = True -+ lineterminator = '\n' -+ quotechar='"' -+ quoting = csv.QUOTE_MINIMAL -+ skipinitialspace = True -+ strict = True -+ -+if __name__ == '__main__': -+ -+ argp = argparse.ArgumentParser(description="FFmpeg h265 conformance tester") -+ argp.add_argument("tests", nargs='*') -+ argp.add_argument("--pi4", action='store_true', help="Force pi4 cmd line") -+ argp.add_argument("--drm", action='store_true', help="Force v4l2 drm cmd line") -+ argp.add_argument("--vaapi", action='store_true', help="Force vaapi cmd line") -+ argp.add_argument("--test_root", default="/opt/conform/h265.2016", help="Root dir for test") -+ argp.add_argument("--csvgen", action='store_true', help="Generate CSV file for dir") -+ argp.add_argument("--csv", default="pi-util/conf_h265.2016.csv", help="CSV filename") -+ argp.add_argument("--vcodec", default="hevc_rpi", help="vcodec name to use") -+ argp.add_argument("--ffmpeg", default="./ffmpeg", help="ffmpeg exec name") -+ args = argp.parse_args() -+ -+ if args.csvgen: -+ csv.writer(sys.stdout).writerows(scandir(args.test_root)) -+ exit(0) -+ -+ with open(args.csv, 'rt') as csvfile: -+ csva = [a for a in csv.reader(csvfile, ConfCSVDialect())] -+ -+ dectype = CODEC_HEVC_RPI -+ if os.path.exists("/dev/rpivid-hevcmem"): -+ dectype = HWACCEL_RPI -+ if args.drm or os.path.exists("/sys/module/rpivid_hevc"): -+ dectype = HWACCEL_DRM -+ -+ if args.pi4: -+ dectype = HWACCEL_RPI -+ elif args.drm: -+ dectype = HWACCEL_DRM -+ elif args.vaapi: -+ dectype = HWACCEL_VAAPI -+ -+ doconf(csva, args.tests, args.test_root, args.vcodec, dectype, args.ffmpeg) -+ ---- /dev/null -+++ b/pi-util/ffperf.py -@@ -0,0 +1,128 @@ -+#!/usr/bin/env python3 -+ -+import time -+import string -+import os -+import tempfile -+import subprocess -+import re -+import argparse -+import sys -+import csv -+from stat import * -+ -+class tstats: -+ close_threshold = 0.01 -+ -+ def __init__(self, stats_dict=None): -+ if stats_dict != None: -+ self.name = stats_dict["name"] -+ self.elapsed = float(stats_dict["elapsed"]) -+ self.user = float(stats_dict["user"]) -+ self.sys = float(stats_dict["sys"]) -+ -+ def times_str(self): -+ ctime = self.sys + self.user -+ return "time=%6.2f, cpu=%6.2f (%4.2f%%)" % (self.elapsed, ctime, (ctime * 100.0) / self.elapsed) -+ -+ def dict(self): -+ return {"name":self.name, "elapsed":self.elapsed, "user":self.user, "sys":self.sys} -+ -+ def is_close(self, other): -+ return abs(self.elapsed - other.elapsed) / self.elapsed < self.close_threshold -+ -+ def __lt__(self, other): -+ return self.elapsed < other.elapsed -+ def __gt__(self, other): -+ return self.elapsed > other.elapsed -+ -+ def time_file(name, prefix, ffmpeg="./ffmpeg"): -+ stats = tstats() -+ stats.name = name -+ start_time = time.clock_gettime(time.CLOCK_MONOTONIC); -+ cproc = subprocess.Popen([ffmpeg, "-no_cvt_hw", -+ "-vcodec", "hevc_rpi", -+ "-t", "30", "-i", prefix + name, -+ "-f", "vout_rpi", os.devnull], bufsize=-1, stdout=flog, stderr=flog); -+ pinfo = os.wait4(cproc.pid, 0) -+ end_time = time.clock_gettime(time.CLOCK_MONOTONIC); -+ stats.elapsed = end_time - start_time -+ stats.user = pinfo[2].ru_utime -+ stats.sys = pinfo[2].ru_stime -+ return stats -+ -+ -+def common_prefix(s1, s2): -+ for i in range(min(len(s1),len(s2))): -+ if s1[i] != s2[i]: -+ return s1[:i] -+ return s1[:i+1] -+ -+def main(): -+ global flog -+ -+ argp = argparse.ArgumentParser(description="FFmpeg performance tester", epilog=""" -+To blank the screen before starting use "xdg-screensaver activate" -+(For some reason this doesn't seem to work from within python). -+""") -+ -+ argp.add_argument("streams", nargs='*') -+ argp.add_argument("--csv_out", default="ffperf_out.csv", help="CSV output filename") -+ argp.add_argument("--csv_in", help="CSV input filename") -+ argp.add_argument("--prefix", help="Filename prefix (include terminal '/' if a directory).") -+ argp.add_argument("--repeat", default=3, type=int, help="Run repeat count") -+ argp.add_argument("--ffmpeg", default="./ffmpeg", help="FFmpeg executable") -+ -+ args = argp.parse_args() -+ -+ csv_out = csv.DictWriter(open(args.csv_out, 'w', newline=''), ["name", "elapsed", "user", "sys"]) -+ csv_out.writeheader() -+ -+ stats_in = {} -+ if args.csv_in != None: -+ with open(args.csv_in, 'r', newline='') as f_in: -+ stats_in = {x["name"]:tstats(x) for x in csv.DictReader(f_in)} -+ -+ flog = open(os.path.join(tempfile.gettempdir(), "ffperf.log"), "wt") -+ -+ streams = args.streams -+ if not streams: -+ if not stats_in: -+ print ("No source streams specified") -+ return 1 -+ prefix = "" if args.prefix == None else args.prefix -+ streams = [k for k in stats_in] -+ elif args.prefix != None: -+ prefix = args.prefix -+ else: -+ prefix = streams[0] -+ for f in streams[1:]: -+ prefix = common_prefix(prefix, f) -+ pp = prefix.rpartition(os.sep) -+ prefix = pp[0] + pp[1] -+ streams = [s[len(prefix):] for s in streams] -+ -+ for f in sorted(streams, key=lambda x : "~" * x.count(os.sep) + x.lower()): -+ print ("====", f) -+ -+ t0 = tstats({"name":f, "elapsed":999, "user":999, "sys":999}) -+ for i in range(args.repeat): -+ t = tstats.time_file(f, prefix, args.ffmpeg) -+ print ("...", t.times_str()) -+ if t0 > t: -+ t0 = t -+ -+ if t0.name in stats_in: -+ pstat = stats_in[t0.name] -+ print("---" if pstat.is_close(t0) else "<<<" if t0 < pstat else ">>>", pstat.times_str()) -+ -+ csv_out.writerow(t0.dict()) -+ -+ print () -+ -+ return 0 -+ -+ -+if __name__ == '__main__': -+ exit(main()) -+ ---- /dev/null -+++ b/pi-util/genpatch.sh -@@ -0,0 +1,35 @@ -+set -e -+ -+NOPATCH= -+if [ "$1" == "--notag" ]; then -+ shift -+ NOPATCH=1 -+fi -+ -+if [ "$1" == "" ]; then -+ echo Usage: $0 [--notag] \ -+ echo e.g.: $0 mmal_4 -+ exit 1 -+fi -+ -+VERSION=`cat RELEASE` -+if [ "$VERSION" == "" ]; then -+ echo Can\'t find version RELEASE -+ exit 1 -+fi -+ -+PATCHFILE=../ffmpeg-$VERSION-$1.patch -+ -+if [ $NOPATCH ]; then -+ echo Not tagged -+else -+ # Only continue if we are all comitted -+ git diff --name-status --exit-code -+ -+ PATCHTAG=pi/$VERSION/$1 -+ echo Tagging: $PATCHTAG -+ -+ git tag $PATCHTAG -+fi -+echo Generating patch: $PATCHFILE -+git diff n$VERSION -- > $PATCHFILE ---- /dev/null -+++ b/pi-util/make_array.py -@@ -0,0 +1,23 @@ -+#!/usr/bin/env python -+ -+# Usage -+# make_array file.bin -+# Produces file.h with array of bytes. -+# -+import sys -+for file in sys.argv[1:]: -+ prefix,suffix = file.split('.') -+ assert suffix=='bin' -+ name=prefix.split('/')[-1] -+ print 'Converting',file -+ with open(prefix+'.h','wb') as out: -+ print >>out, 'static const unsigned char',name,'[] = {' -+ with open(file,'rb') as fd: -+ i = 0 -+ for byte in fd.read(): -+ print >>out, '0x%02x, ' % ord(byte), -+ i = i + 1 -+ if i % 8 == 0: -+ print >>out, ' // %04x' % (i - 8) -+ print >>out,'};' -+ ---- /dev/null -+++ b/pi-util/mkinst.sh -@@ -0,0 +1,5 @@ -+set -e -+ -+make install -+ -+cp -r install/* ../vlc/sysroot/raspian_stretch_pi1-sysroot/usr ---- /dev/null -+++ b/pi-util/patkodi.sh -@@ -0,0 +1,9 @@ -+set -e -+KODIBASE=/home/jc/rpi/kodi/xbmc -+JOBS=-j20 -+make $JOBS -+git diff xbmc/release/4.3-kodi > $KODIBASE/tools/depends/target/ffmpeg/pfcd_hevc_optimisations.patch -+make -C $KODIBASE/tools/depends/target/ffmpeg $JOBS -+make -C $KODIBASE/build install -+ -+ ---- /dev/null -+++ b/pi-util/perfcmp.py -@@ -0,0 +1,101 @@ -+#!/usr/bin/env python3 -+ -+import time -+import string -+import os -+import tempfile -+import subprocess -+import re -+import argparse -+import sys -+import csv -+from stat import * -+ -+class tstats: -+ close_threshold = 0.01 -+ -+ def __init__(self, stats_dict=None): -+ if stats_dict != None: -+ self.name = stats_dict["name"] -+ self.elapsed = float(stats_dict["elapsed"]) -+ self.user = float(stats_dict["user"]) -+ self.sys = float(stats_dict["sys"]) -+ -+ def times_str(self): -+ ctime = self.sys + self.user -+ return "time=%6.2f, cpu=%6.2f (%4.2f%%)" % (self.elapsed, ctime, (ctime * 100.0) / self.elapsed) -+ -+ def dict(self): -+ return {"name":self.name, "elapsed":self.elapsed, "user":self.user, "sys":self.sys} -+ -+ def is_close(self, other): -+ return abs(self.elapsed - other.elapsed) / self.elapsed < self.close_threshold -+ -+ def __lt__(self, other): -+ return self.elapsed < other.elapsed -+ def __gt__(self, other): -+ return self.elapsed > other.elapsed -+ -+ def time_file(name, prefix): -+ stats = tstats() -+ stats.name = name -+ start_time = time.clock_gettime(time.CLOCK_MONOTONIC); -+ cproc = subprocess.Popen(["./ffmpeg", "-t", "30", "-i", prefix + name, -+ "-f", "null", os.devnull], bufsize=-1, stdout=flog, stderr=flog); -+ pinfo = os.wait4(cproc.pid, 0) -+ end_time = time.clock_gettime(time.CLOCK_MONOTONIC); -+ stats.elapsed = end_time - start_time -+ stats.user = pinfo[2].ru_utime -+ stats.sys = pinfo[2].ru_stime -+ return stats -+ -+ -+def common_prefix(s1, s2): -+ for i in range(min(len(s1),len(s2))): -+ if s1[i] != s2[i]: -+ return s1[:i] -+ return s1[:i+1] -+ -+def main(): -+ argp = argparse.ArgumentParser(description="FFmpeg performance compare") -+ -+ argp.add_argument("stream0", help="CSV to compare") -+ argp.add_argument("stream1", nargs='?', default="ffperf_out.csv", help="CSV to compare") -+ -+ args = argp.parse_args() -+ -+ with open(args.stream0, 'r', newline='') as f_in: -+ stats0 = {x["name"]:tstats(x) for x in csv.DictReader(f_in)} -+ with open(args.stream1, 'r', newline='') as f_in: -+ stats1 = {x["name"]:tstats(x) for x in csv.DictReader(f_in)} -+ -+ print (args.stream0, "<<-->>", args.stream1) -+ print () -+ -+ for f in sorted(stats0.keys() | stats1.keys(), key=lambda x : "~" * x.count(os.sep) + x.lower()): -+ if not (f in stats0) : -+ print (" XX :", f) -+ continue -+ if not (f in stats1) : -+ print (" XX :", f) -+ continue -+ -+ s0 = stats0[f] -+ s1 = stats1[f] -+ -+ pcent = ((s0.elapsed - s1.elapsed) / s0.elapsed) * 100.0 -+ thresh = 0.3 -+ tc = 6 -+ -+ nchar = min(tc - 1, int(abs(pcent) / thresh)) -+ cc = " -- " if nchar == 0 else "<" * nchar + " " * (tc - nchar) if pcent < 0 else " " * (tc - nchar) + ">" * nchar -+ -+ print ("%6.2f %s%6.2f (%+5.2f) : %s" % -+ (s0.elapsed, cc, s1.elapsed, pcent, f)) -+ -+ return 0 -+ -+ -+if __name__ == '__main__': -+ exit(main()) -+ ---- /dev/null -+++ b/pi-util/qem.sh -@@ -0,0 +1,9 @@ -+TARGET_DIR=../src/eupton_vc4dev_2012a/software/vc4/DEV/applications/tutorials/user_shader_example_tex -+QASM=python\ ../local/bin/qasm.py -+SRC_FILE=libavcodec/rpi_hevc_shader.qasm -+DST_BASE=shader -+ -+cp libavcodec/rpi_hevc_shader_cmd.h $TARGET_DIR -+$QASM -mc_c:$DST_BASE,$DST_BASE,$DST_BASE $SRC_FILE > $TARGET_DIR/$DST_BASE.c -+$QASM -mc_h:$DST_BASE,$DST_BASE,$DST_BASE $SRC_FILE > $TARGET_DIR/$DST_BASE.h -+ ---- /dev/null -+++ b/pi-util/v3dusage.py -@@ -0,0 +1,128 @@ -+#!/usr/bin/env python -+ -+import sys -+import argparse -+import re -+ -+def do_logparse(logname): -+ -+ rmatch = re.compile(r'^([0-9]+\.[0-9]{3}): (done )?((vpu0)|(vpu1)|(qpu1)) ([A-Z_]+) cb:([0-9a-f]+) ') -+ rqcycle = re.compile(r'^([0-9]+\.[0-9]{3}): v3d: QPU Total clock cycles for all QPUs doing vertex/coordinate shading +([0-9]+)$') -+ rqtscycle = re.compile(r'^([0-9]+\.[0-9]{3}): v3d: QPU Total clock cycles for all QPUs stalled waiting for TMUs +([0-9]+)$') -+ rl2hits = re.compile(r'^([0-9]+\.[0-9]{3}): v3d: L2C Total Level 2 cache ([a-z]+) +([0-9]+)$') -+ -+ ttotal = {'idle':0.0} -+ tstart = {} -+ qctotal = {} -+ qtstotal = {} -+ l2hits = {} -+ l2total = {} -+ time0 = None -+ idle_start = None -+ qpu_op_no = 0 -+ op_count = 0 -+ -+ with open(logname, "rt") as infile: -+ for line in infile: -+ match = rmatch.match(line) -+ if match: -+# print match.group(1), ":", match.group(2), ":", match.group(3), ":", match.group(7), ":" -+ time = float(match.group(1)) -+ unit = match.group(3) -+ opstart = not match.group(2) -+ optype = match.group(7) -+ hascb = match.group(8) != "0" -+ -+ if unit == 'qpu1': -+ unit = unit + "." + str(qpu_op_no) -+ if not opstart: -+ if hascb or optype == 'EXECUTE_SYNC': -+ qpu_op_no = 0 -+ else: -+ qpu_op_no += 1 -+ -+ # Ignore sync type -+ if optype == 'EXECUTE_SYNC': -+ continue -+ -+ if not time0: -+ time0 = time -+ -+ if opstart: -+ tstart[unit] = time; -+ elif unit in tstart: -+ op_count += 1 -+ if not unit in ttotal: -+ ttotal[unit] = 0.0 -+ ttotal[unit] += time - tstart[unit] -+ del tstart[unit] -+ -+ if not idle_start and not tstart: -+ idle_start = time -+ elif idle_start and tstart: -+ ttotal['idle'] += time - idle_start -+ idle_start = None -+ -+ match = rqcycle.match(line) -+ if match: -+ unit = "qpu1." + str(qpu_op_no) -+ if not unit in qctotal: -+ qctotal[unit] = 0 -+ qctotal[unit] += int(match.group(2)) -+ -+ match = rqtscycle.match(line) -+ if match: -+ unit = "qpu1." + str(qpu_op_no) -+ if not unit in qtstotal: -+ qtstotal[unit] = 0 -+ qtstotal[unit] += int(match.group(2)) -+ -+ match = rl2hits.match(line) -+ if match: -+ unit = "qpu1." + str(qpu_op_no) -+ if not unit in l2total: -+ l2total[unit] = 0 -+ l2hits[unit] = 0 -+ l2total[unit] += int(match.group(3)) -+ if match.group(2) == "hits": -+ l2hits[unit] += int(match.group(3)) -+ -+ -+ if not time0: -+ print "No v3d profile records found" -+ else: -+ tlogged = time - time0 -+ -+ print "Logged time:", tlogged, " Op count:", op_count -+ for unit in sorted(ttotal): -+ print b'%6s: %10.3f %7.3f%%' % (unit, ttotal[unit], ttotal[unit] * 100.0 / tlogged) -+ print -+ for unit in sorted(qctotal): -+ if not unit in qtstotal: -+ qtstotal[unit] = 0; -+ print b'%6s: Qcycles: %10d, TMU stall: %10d (%7.3f%%)' % (unit, qctotal[unit], qtstotal[unit], (qtstotal[unit] * 100.0)/qctotal[unit]) -+ if unit in l2total: -+ print b' L2Total: %10d, hits: %10d (%7.3f%%)' % (l2total[unit], l2hits[unit], (l2hits[unit] * 100.0)/l2total[unit]) -+ -+ -+ -+if __name__ == '__main__': -+ argp = argparse.ArgumentParser( -+ formatter_class=argparse.RawDescriptionHelpFormatter, -+ description="QPU/VPU perf summary from VC logging", -+ epilog = """ -+Will also summarise TMU stalls if logging requests set in qpu noflush param -+in the profiled code. -+ -+Example use: -+ vcgencmd set_logging level=0xc0 -+ -+ sudo vcdbg log msg >& t.log -+ v3dusage.py t.log -+""") -+ -+ argp.add_argument("logfile") -+ args = argp.parse_args() -+ -+ do_logparse(args.logfile) -+ ---- a/tests/checkasm/Makefile -+++ b/tests/checkasm/Makefile -@@ -9,8 +9,10 @@ AVCODECOBJS-$(CONFIG_G722DSP) - AVCODECOBJS-$(CONFIG_H264DSP) += h264dsp.o - AVCODECOBJS-$(CONFIG_H264PRED) += h264pred.o - AVCODECOBJS-$(CONFIG_H264QPEL) += h264qpel.o -+AVCODECOBJS-$(CONFIG_IDCTDSP) += idctdsp.o - AVCODECOBJS-$(CONFIG_LLVIDDSP) += llviddsp.o - AVCODECOBJS-$(CONFIG_LLVIDENCDSP) += llviddspenc.o -+AVCODECOBJS-$(CONFIG_VC1DSP) += vc1dsp.o - AVCODECOBJS-$(CONFIG_VP8DSP) += vp8dsp.o - AVCODECOBJS-$(CONFIG_VIDEODSP) += videodsp.o - ---- a/tests/checkasm/checkasm.c -+++ b/tests/checkasm/checkasm.c -@@ -121,6 +121,9 @@ static const struct { - #if CONFIG_HUFFYUV_DECODER - { "huffyuvdsp", checkasm_check_huffyuvdsp }, - #endif -+ #if CONFIG_IDCTDSP -+ { "idctdsp", checkasm_check_idctdsp }, -+ #endif - #if CONFIG_JPEG2000_DECODER - { "jpeg2000dsp", checkasm_check_jpeg2000dsp }, - #endif -@@ -145,6 +148,9 @@ static const struct { - #if CONFIG_V210_ENCODER - { "v210enc", checkasm_check_v210enc }, - #endif -+ #if CONFIG_VC1DSP -+ { "vc1dsp", checkasm_check_vc1dsp }, -+ #endif - #if CONFIG_VP8DSP - { "vp8dsp", checkasm_check_vp8dsp }, - #endif ---- a/tests/checkasm/checkasm.h -+++ b/tests/checkasm/checkasm.h -@@ -60,6 +60,7 @@ void checkasm_check_hevc_add_res(void); - void checkasm_check_hevc_idct(void); - void checkasm_check_hevc_sao(void); - void checkasm_check_huffyuvdsp(void); -+void checkasm_check_idctdsp(void); - void checkasm_check_jpeg2000dsp(void); - void checkasm_check_llviddsp(void); - void checkasm_check_llviddspenc(void); -@@ -73,6 +74,7 @@ void checkasm_check_sw_scale(void); - void checkasm_check_utvideodsp(void); - void checkasm_check_v210dec(void); - void checkasm_check_v210enc(void); -+void checkasm_check_vc1dsp(void); - void checkasm_check_vf_eq(void); - void checkasm_check_vf_gblur(void); - void checkasm_check_vf_hflip(void); ---- /dev/null -+++ b/tests/checkasm/idctdsp.c -@@ -0,0 +1,98 @@ -+/* -+ * Copyright (c) 2022 Ben Avison -+ * -+ * This file is part of FFmpeg. -+ * -+ * FFmpeg is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * FFmpeg is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License along -+ * with FFmpeg; if not, write to the Free Software Foundation, Inc., -+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -+ */ -+ -+#include -+ -+#include "checkasm.h" -+ -+#include "libavcodec/idctdsp.h" -+ -+#include "libavutil/common.h" -+#include "libavutil/internal.h" -+#include "libavutil/intreadwrite.h" -+#include "libavutil/mem_internal.h" -+ -+#define IDCTDSP_TEST(func) { #func, offsetof(IDCTDSPContext, func) }, -+ -+typedef struct { -+ const char *name; -+ size_t offset; -+} test; -+ -+#define RANDOMIZE_BUFFER16(name, size) \ -+ do { \ -+ int i; \ -+ for (i = 0; i < size; ++i) { \ -+ uint16_t r = rnd() % 0x201 - 0x100; \ -+ AV_WN16A(name##0 + i, r); \ -+ AV_WN16A(name##1 + i, r); \ -+ } \ -+ } while (0) -+ -+#define RANDOMIZE_BUFFER8(name, size) \ -+ do { \ -+ int i; \ -+ for (i = 0; i < size; ++i) { \ -+ uint8_t r = rnd(); \ -+ name##0[i] = r; \ -+ name##1[i] = r; \ -+ } \ -+ } while (0) -+ -+static void check_add_put_clamped(void) -+{ -+ /* Source buffers are only as big as needed, since any over-read won't affect results */ -+ LOCAL_ALIGNED_16(int16_t, src0, [64]); -+ LOCAL_ALIGNED_16(int16_t, src1, [64]); -+ /* Destination buffers have borders of one row above/below and 8 columns left/right to catch overflows */ -+ LOCAL_ALIGNED_8(uint8_t, dst0, [10 * 24]); -+ LOCAL_ALIGNED_8(uint8_t, dst1, [10 * 24]); -+ -+ AVCodecContext avctx = { 0 }; -+ IDCTDSPContext h; -+ -+ const test tests[] = { -+ IDCTDSP_TEST(add_pixels_clamped) -+ IDCTDSP_TEST(put_pixels_clamped) -+ IDCTDSP_TEST(put_signed_pixels_clamped) -+ }; -+ -+ ff_idctdsp_init(&h, &avctx); -+ -+ for (size_t t = 0; t < FF_ARRAY_ELEMS(tests); ++t) { -+ void (*func)(const int16_t *, uint8_t * ptrdiff_t) = *(void **)((intptr_t) &h + tests[t].offset); -+ if (check_func(func, "idctdsp.%s", tests[t].name)) { -+ declare_func_emms(AV_CPU_FLAG_MMX, void, const int16_t *, uint8_t *, ptrdiff_t); -+ RANDOMIZE_BUFFER16(src, 64); -+ RANDOMIZE_BUFFER8(dst, 10 * 24); -+ call_ref(src0, dst0 + 24 + 8, 24); -+ call_new(src1, dst1 + 24 + 8, 24); -+ if (memcmp(dst0, dst1, 10 * 24)) -+ fail(); -+ bench_new(src1, dst1 + 24 + 8, 24); -+ } -+ } -+} -+ -+void checkasm_check_idctdsp(void) -+{ -+ check_add_put_clamped(); -+ report("idctdsp"); -+} ---- /dev/null -+++ b/tests/checkasm/vc1dsp.c -@@ -0,0 +1,452 @@ -+/* -+ * Copyright (c) 2022 Ben Avison -+ * -+ * This file is part of FFmpeg. -+ * -+ * FFmpeg is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * FFmpeg is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License along -+ * with FFmpeg; if not, write to the Free Software Foundation, Inc., -+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -+ */ -+ -+#include -+ -+#include "checkasm.h" -+ -+#include "libavcodec/vc1dsp.h" -+ -+#include "libavutil/common.h" -+#include "libavutil/internal.h" -+#include "libavutil/intreadwrite.h" -+#include "libavutil/mem_internal.h" -+ -+#define VC1DSP_TEST(func) { #func, offsetof(VC1DSPContext, func) }, -+#define VC1DSP_SIZED_TEST(func, width, height) { #func, offsetof(VC1DSPContext, func), width, height }, -+ -+typedef struct { -+ const char *name; -+ size_t offset; -+ int width; -+ int height; -+} test; -+ -+typedef struct matrix { -+ size_t width; -+ size_t height; -+ float d[]; -+} matrix; -+ -+static const matrix T8 = { 8, 8, { -+ 12, 12, 12, 12, 12, 12, 12, 12, -+ 16, 15, 9, 4, -4, -9, -15, -16, -+ 16, 6, -6, -16, -16, -6, 6, 16, -+ 15, -4, -16, -9, 9, 16, 4, -15, -+ 12, -12, -12, 12, 12, -12, -12, 12, -+ 9, -16, 4, 15, -15, -4, 16, -9, -+ 6, -16, 16, -6, -6, 16, -16, 6, -+ 4, -9, 15, -16, 16, -15, 9, -4 -+} }; -+ -+static const matrix T4 = { 4, 4, { -+ 17, 17, 17, 17, -+ 22, 10, -10, -22, -+ 17, -17, -17, 17, -+ 10, -22, 22, -10 -+} }; -+ -+static const matrix T8t = { 8, 8, { -+ 12, 16, 16, 15, 12, 9, 6, 4, -+ 12, 15, 6, -4, -12, -16, -16, -9, -+ 12, 9, -6, -16, -12, 4, 16, 15, -+ 12, 4, -16, -9, 12, 15, -6, -16, -+ 12, -4, -16, 9, 12, -15, -6, 16, -+ 12, -9, -6, 16, -12, -4, 16, -15, -+ 12, -15, 6, 4, -12, 16, -16, 9, -+ 12, -16, 16, -15, 12, -9, 6, -4 -+} }; -+ -+static const matrix T4t = { 4, 4, { -+ 17, 22, 17, 10, -+ 17, 10, -17, -22, -+ 17, -10, -17, 22, -+ 17, -22, 17, -10 -+} }; -+ -+static matrix *new_matrix(size_t width, size_t height) -+{ -+ matrix *out = av_mallocz(sizeof (matrix) + height * width * sizeof (float)); -+ if (out == NULL) { -+ fprintf(stderr, "Memory allocation failure\n"); -+ exit(EXIT_FAILURE); -+ } -+ out->width = width; -+ out->height = height; -+ return out; -+} -+ -+static matrix *multiply(const matrix *a, const matrix *b) -+{ -+ matrix *out; -+ if (a->width != b->height) { -+ fprintf(stderr, "Incompatible multiplication\n"); -+ exit(EXIT_FAILURE); -+ } -+ out = new_matrix(b->width, a->height); -+ for (int j = 0; j < out->height; ++j) -+ for (int i = 0; i < out->width; ++i) { -+ float sum = 0; -+ for (int k = 0; k < a->width; ++k) -+ sum += a->d[j * a->width + k] * b->d[k * b->width + i]; -+ out->d[j * out->width + i] = sum; -+ } -+ return out; -+} -+ -+static void normalise(matrix *a) -+{ -+ for (int j = 0; j < a->height; ++j) -+ for (int i = 0; i < a->width; ++i) { -+ float *p = a->d + j * a->width + i; -+ *p *= 64; -+ if (a->height == 4) -+ *p /= (const unsigned[]) { 289, 292, 289, 292 } [j]; -+ else -+ *p /= (const unsigned[]) { 288, 289, 292, 289, 288, 289, 292, 289 } [j]; -+ if (a->width == 4) -+ *p /= (const unsigned[]) { 289, 292, 289, 292 } [i]; -+ else -+ *p /= (const unsigned[]) { 288, 289, 292, 289, 288, 289, 292, 289 } [i]; -+ } -+} -+ -+static void divide_and_round_nearest(matrix *a, float by) -+{ -+ for (int j = 0; j < a->height; ++j) -+ for (int i = 0; i < a->width; ++i) { -+ float *p = a->d + j * a->width + i; -+ *p = rintf(*p / by); -+ } -+} -+ -+static void tweak(matrix *a) -+{ -+ for (int j = 4; j < a->height; ++j) -+ for (int i = 0; i < a->width; ++i) { -+ float *p = a->d + j * a->width + i; -+ *p += 1; -+ } -+} -+ -+/* The VC-1 spec places restrictions on the values permitted at three -+ * different stages: -+ * - D: the input coefficients in frequency domain -+ * - E: the intermediate coefficients, inverse-transformed only horizontally -+ * - R: the fully inverse-transformed coefficients -+ * -+ * To fully cater for the ranges specified requires various intermediate -+ * values to be held to 17-bit precision; yet these conditions do not appear -+ * to be utilised in real-world streams. At least some assembly -+ * implementations have chosen to restrict these values to 16-bit precision, -+ * to accelerate the decoding of real-world streams at the cost of strict -+ * adherence to the spec. To avoid our test marking these as failures, -+ * reduce our random inputs. -+ */ -+#define ATTENUATION 4 -+ -+static matrix *generate_inverse_quantized_transform_coefficients(size_t width, size_t height) -+{ -+ matrix *raw, *tmp, *D, *E, *R; -+ raw = new_matrix(width, height); -+ for (int i = 0; i < width * height; ++i) -+ raw->d[i] = (int) (rnd() % (1024/ATTENUATION)) - 512/ATTENUATION; -+ tmp = multiply(height == 8 ? &T8 : &T4, raw); -+ D = multiply(tmp, width == 8 ? &T8t : &T4t); -+ normalise(D); -+ divide_and_round_nearest(D, 1); -+ for (int i = 0; i < width * height; ++i) { -+ if (D->d[i] < -2048/ATTENUATION || D->d[i] > 2048/ATTENUATION-1) { -+ /* Rare, so simply try again */ -+ av_free(raw); -+ av_free(tmp); -+ av_free(D); -+ return generate_inverse_quantized_transform_coefficients(width, height); -+ } -+ } -+ E = multiply(D, width == 8 ? &T8 : &T4); -+ divide_and_round_nearest(E, 8); -+ for (int i = 0; i < width * height; ++i) -+ if (E->d[i] < -4096/ATTENUATION || E->d[i] > 4096/ATTENUATION-1) { -+ /* Rare, so simply try again */ -+ av_free(raw); -+ av_free(tmp); -+ av_free(D); -+ av_free(E); -+ return generate_inverse_quantized_transform_coefficients(width, height); -+ } -+ R = multiply(height == 8 ? &T8t : &T4t, E); -+ tweak(R); -+ divide_and_round_nearest(R, 128); -+ for (int i = 0; i < width * height; ++i) -+ if (R->d[i] < -512/ATTENUATION || R->d[i] > 512/ATTENUATION-1) { -+ /* Rare, so simply try again */ -+ av_free(raw); -+ av_free(tmp); -+ av_free(D); -+ av_free(E); -+ av_free(R); -+ return generate_inverse_quantized_transform_coefficients(width, height); -+ } -+ av_free(raw); -+ av_free(tmp); -+ av_free(E); -+ av_free(R); -+ return D; -+} -+ -+#define RANDOMIZE_BUFFER16(name, size) \ -+ do { \ -+ int i; \ -+ for (i = 0; i < size; ++i) { \ -+ uint16_t r = rnd(); \ -+ AV_WN16A(name##0 + i, r); \ -+ AV_WN16A(name##1 + i, r); \ -+ } \ -+ } while (0) -+ -+#define RANDOMIZE_BUFFER8(name, size) \ -+ do { \ -+ int i; \ -+ for (i = 0; i < size; ++i) { \ -+ uint8_t r = rnd(); \ -+ name##0[i] = r; \ -+ name##1[i] = r; \ -+ } \ -+ } while (0) -+ -+#define RANDOMIZE_BUFFER8_MID_WEIGHTED(name, size) \ -+ do { \ -+ uint8_t *p##0 = name##0, *p##1 = name##1; \ -+ int i = (size); \ -+ while (i-- > 0) { \ -+ int x = 0x80 | (rnd() & 0x7F); \ -+ x >>= rnd() % 9; \ -+ if (rnd() & 1) \ -+ x = -x; \ -+ *p##1++ = *p##0++ = 0x80 + x; \ -+ } \ -+ } while (0) -+ -+static void check_inv_trans_inplace(void) -+{ -+ /* Inverse transform input coefficients are stored in a 16-bit buffer -+ * with row stride of 8 coefficients irrespective of transform size. -+ * vc1_inv_trans_8x8 differs from the others in two ways: coefficients -+ * are stored in column-major order, and the outputs are written back -+ * to the input buffer, so we oversize it slightly to catch overruns. */ -+ LOCAL_ALIGNED_16(int16_t, inv_trans_in0, [10 * 8]); -+ LOCAL_ALIGNED_16(int16_t, inv_trans_in1, [10 * 8]); -+ -+ VC1DSPContext h; -+ -+ ff_vc1dsp_init(&h); -+ -+ if (check_func(h.vc1_inv_trans_8x8, "vc1dsp.vc1_inv_trans_8x8")) { -+ matrix *coeffs; -+ declare_func_emms(AV_CPU_FLAG_MMX, void, int16_t *); -+ RANDOMIZE_BUFFER16(inv_trans_in, 10 * 8); -+ coeffs = generate_inverse_quantized_transform_coefficients(8, 8); -+ for (int j = 0; j < 8; ++j) -+ for (int i = 0; i < 8; ++i) { -+ int idx = 8 + i * 8 + j; -+ inv_trans_in1[idx] = inv_trans_in0[idx] = coeffs->d[j * 8 + i]; -+ } -+ call_ref(inv_trans_in0 + 8); -+ call_new(inv_trans_in1 + 8); -+ if (memcmp(inv_trans_in0, inv_trans_in1, 10 * 8 * sizeof (int16_t))) -+ fail(); -+ bench_new(inv_trans_in1 + 8); -+ av_free(coeffs); -+ } -+} -+ -+static void check_inv_trans_adding(void) -+{ -+ /* Inverse transform input coefficients are stored in a 16-bit buffer -+ * with row stride of 8 coefficients irrespective of transform size. */ -+ LOCAL_ALIGNED_16(int16_t, inv_trans_in0, [8 * 8]); -+ LOCAL_ALIGNED_16(int16_t, inv_trans_in1, [8 * 8]); -+ -+ /* For all but vc1_inv_trans_8x8, the inverse transform is narrowed and -+ * added with saturation to an array of unsigned 8-bit values. Oversize -+ * this by 8 samples left and right and one row above and below. */ -+ LOCAL_ALIGNED_8(uint8_t, inv_trans_out0, [10 * 24]); -+ LOCAL_ALIGNED_8(uint8_t, inv_trans_out1, [10 * 24]); -+ -+ VC1DSPContext h; -+ -+ const test tests[] = { -+ VC1DSP_SIZED_TEST(vc1_inv_trans_8x4, 8, 4) -+ VC1DSP_SIZED_TEST(vc1_inv_trans_4x8, 4, 8) -+ VC1DSP_SIZED_TEST(vc1_inv_trans_4x4, 4, 4) -+ VC1DSP_SIZED_TEST(vc1_inv_trans_8x8_dc, 8, 8) -+ VC1DSP_SIZED_TEST(vc1_inv_trans_8x4_dc, 8, 4) -+ VC1DSP_SIZED_TEST(vc1_inv_trans_4x8_dc, 4, 8) -+ VC1DSP_SIZED_TEST(vc1_inv_trans_4x4_dc, 4, 4) -+ }; -+ -+ ff_vc1dsp_init(&h); -+ -+ for (size_t t = 0; t < FF_ARRAY_ELEMS(tests); ++t) { -+ void (*func)(uint8_t *, ptrdiff_t, int16_t *) = *(void **)((intptr_t) &h + tests[t].offset); -+ if (check_func(func, "vc1dsp.%s", tests[t].name)) { -+ matrix *coeffs; -+ declare_func_emms(AV_CPU_FLAG_MMX, void, uint8_t *, ptrdiff_t, int16_t *); -+ RANDOMIZE_BUFFER16(inv_trans_in, 8 * 8); -+ RANDOMIZE_BUFFER8(inv_trans_out, 10 * 24); -+ coeffs = generate_inverse_quantized_transform_coefficients(tests[t].width, tests[t].height); -+ for (int j = 0; j < tests[t].height; ++j) -+ for (int i = 0; i < tests[t].width; ++i) { -+ int idx = j * 8 + i; -+ inv_trans_in1[idx] = inv_trans_in0[idx] = coeffs->d[j * tests[t].width + i]; -+ } -+ call_ref(inv_trans_out0 + 24 + 8, 24, inv_trans_in0); -+ call_new(inv_trans_out1 + 24 + 8, 24, inv_trans_in1); -+ if (memcmp(inv_trans_out0, inv_trans_out1, 10 * 24)) -+ fail(); -+ bench_new(inv_trans_out1 + 24 + 8, 24, inv_trans_in1 + 8); -+ av_free(coeffs); -+ } -+ } -+} -+ -+static void check_loop_filter(void) -+{ -+ /* Deblocking filter buffers are big enough to hold a 16x16 block, -+ * plus 16 columns left and 4 rows above to hold filter inputs -+ * (depending on whether v or h neighbouring block edge, oversized -+ * horizontally to maintain 16-byte alignment) plus 16 columns and -+ * 4 rows below to catch write overflows */ -+ LOCAL_ALIGNED_16(uint8_t, filter_buf0, [24 * 48]); -+ LOCAL_ALIGNED_16(uint8_t, filter_buf1, [24 * 48]); -+ -+ VC1DSPContext h; -+ -+ const test tests[] = { -+ VC1DSP_TEST(vc1_v_loop_filter4) -+ VC1DSP_TEST(vc1_h_loop_filter4) -+ VC1DSP_TEST(vc1_v_loop_filter8) -+ VC1DSP_TEST(vc1_h_loop_filter8) -+ VC1DSP_TEST(vc1_v_loop_filter16) -+ VC1DSP_TEST(vc1_h_loop_filter16) -+ }; -+ -+ ff_vc1dsp_init(&h); -+ -+ for (size_t t = 0; t < FF_ARRAY_ELEMS(tests); ++t) { -+ void (*func)(uint8_t *, ptrdiff_t, int) = *(void **)((intptr_t) &h + tests[t].offset); -+ declare_func_emms(AV_CPU_FLAG_MMX, void, uint8_t *, ptrdiff_t, int); -+ if (check_func(func, "vc1dsp.%s", tests[t].name)) { -+ for (int count = 1000; count > 0; --count) { -+ int pq = rnd() % 31 + 1; -+ RANDOMIZE_BUFFER8_MID_WEIGHTED(filter_buf, 24 * 48); -+ call_ref(filter_buf0 + 4 * 48 + 16, 48, pq); -+ call_new(filter_buf1 + 4 * 48 + 16, 48, pq); -+ if (memcmp(filter_buf0, filter_buf1, 24 * 48)) -+ fail(); -+ } -+ } -+ for (int j = 0; j < 24; ++j) -+ for (int i = 0; i < 48; ++i) -+ filter_buf1[j * 48 + i] = 0x60 + 0x40 * (i >= 16 && j >= 4); -+ if (check_func(func, "vc1dsp.%s_bestcase", tests[t].name)) -+ bench_new(filter_buf1 + 4 * 48 + 16, 48, 1); -+ if (check_func(func, "vc1dsp.%s_worstcase", tests[t].name)) -+ bench_new(filter_buf1 + 4 * 48 + 16, 48, 31); -+ } -+} -+ -+#define TEST_UNESCAPE \ -+ do { \ -+ for (int count = 100; count > 0; --count) { \ -+ escaped_offset = rnd() & 7; \ -+ unescaped_offset = rnd() & 7; \ -+ escaped_len = (1u << (rnd() % 8) + 3) - (rnd() & 7); \ -+ RANDOMIZE_BUFFER8(unescaped, UNESCAPE_BUF_SIZE); \ -+ len0 = call_ref(escaped0 + escaped_offset, escaped_len, unescaped0 + unescaped_offset); \ -+ len1 = call_new(escaped1 + escaped_offset, escaped_len, unescaped1 + unescaped_offset); \ -+ if (len0 != len1 || memcmp(unescaped0, unescaped1, UNESCAPE_BUF_SIZE)) \ -+ fail(); \ -+ } \ -+ } while (0) -+ -+static void check_unescape(void) -+{ -+ /* This appears to be a typical length of buffer in use */ -+#define LOG2_UNESCAPE_BUF_SIZE 17 -+#define UNESCAPE_BUF_SIZE (1u< -Date: Thu, 8 Dec 2022 10:34:20 -0600 +Date: Sun, 9 Jun 2024 18:09:25 -0400 Subject: [PATCH] configure: setup for OE-core usage Upstream-Status: Inappropriate @@ -17,66 +17,63 @@ exists and we also should be using GLESv2. Update where compiler finds OMX_Core.h -Only check that sdl2 version greater than 2.0.1 +Only check that sdl2 version greater than 3.0.0 Signed-off-by: Vincent Davis Jr --- - configure | 16 +++++++++------- - 1 file changed, 9 insertions(+), 7 deletions(-) + configure | 14 +++++++++----- + 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/configure b/configure -index 723b81f1..0c7f2654 100755 +index 7214c221..7a541e63 100755 --- a/configure +++ b/configure -@@ -5746,6 +5746,9 @@ enable_weak_pic() { +@@ -5898,6 +5898,9 @@ enable_weak_pic() { } enabled pic && enable_weak_pic +# Set CFLAGS and LDFLAGS globally +add_cflags -I${sysroot}/usr/include/ -I${sysroot}/usr/include/IL -I${sysroot}/usr/include/drm -+add_ldflags -L${sysroot}/usr/lib/ ++add_ldflags -L${sysroot}/usr/lib test_cc <= 2.0.1 sdl2 < 2.1.0" SDL_events.h SDL_PollEvent +- test_pkg_config sdl2 "sdl2 >= 2.0.1 sdl2 < 3.0.0" SDL_events.h SDL_PollEvent + test_pkg_config sdl2 "sdl2 >= 2.0.1" SDL_events.h SDL_PollEvent if disabled sdl2 && "${SDL2_CONFIG}" --version > /dev/null 2>&1; then sdl2_cflags=$("${SDL2_CONFIG}" --cflags) sdl2_extralibs=$("${SDL2_CONFIG}" --libs) -- -2.38.1 +2.34.1 diff --git a/sources/meta-raspberrypi/recipes-multimedia/rpidistro-ffmpeg/files/2002-libavdevice-opengl_enc-update-dynamic-function-loader.patch b/sources/meta-raspberrypi/recipes-multimedia/rpidistro-ffmpeg/files/2002-libavdevice-opengl_enc-update-dynamic-function-loader.patch deleted file mode 100644 index 43a91918..00000000 --- a/sources/meta-raspberrypi/recipes-multimedia/rpidistro-ffmpeg/files/2002-libavdevice-opengl_enc-update-dynamic-function-loader.patch +++ /dev/null @@ -1,111 +0,0 @@ -From be426ad76c3e486f1364dd292cf8e1c633c80e91 Mon Sep 17 00:00:00 2001 -From: Vincent Davis Jr -Date: Thu, 8 Dec 2022 10:39:47 -0600 -Subject: [PATCH] libavdevice: opengl_enc.c update dynamic function loader - -Upstream-Status: Inappropriate - -RPI-Distro repo clones original ffmpeg and applies patches to enable -raspiberry pi support. - -For meta-raspberrypi ffmpeg builds, when opengl -is enabled do_compile will fail. Reasion is that -glGetProcAddress is undefined in either GLES2/gl2.h -or GLES2/gl2ext.h. - -define SelectedGetProcAddress to SDL_GL_GetProcAddress -if sdl2 is included. If not included, define function -pointers at compile time versus runtime. - -Signed-off-by: Vincent Davis Jr ---- - libavdevice/opengl_enc.c | 44 ++++++++++++++++++++++++++++++++++++---- - 1 file changed, 40 insertions(+), 4 deletions(-) - -diff --git a/libavdevice/opengl_enc.c b/libavdevice/opengl_enc.c -index 2bdb8da7..eabc1bf8 100644 ---- a/libavdevice/opengl_enc.c -+++ b/libavdevice/opengl_enc.c -@@ -37,12 +37,13 @@ - #include - #elif HAVE_ES2_GL_H - #include --#else --#include --#include - #endif - #if HAVE_GLXGETPROCADDRESS - #include -+#else -+#define GL_GLEXT_PROTOTYPES -+#include -+#include - #endif - - #if CONFIG_SDL2 -@@ -493,8 +494,14 @@ static int av_cold opengl_load_procedures(OpenGLContext *opengl) - - #if HAVE_GLXGETPROCADDRESS - #define SelectedGetProcAddress glXGetProcAddress -+#define CAN_DYNAMIC_LOAD 1 - #elif HAVE_WGLGETPROCADDRESS - #define SelectedGetProcAddress wglGetProcAddress -+#elif CONFIG_SDL2 -+#define SelectedGetProcAddress SDL_GL_GetProcAddress -+#define CAN_DYNAMIC_LOAD 1 -+#else -+#define CAN_DYNAMIC_LOAD 0 - #endif - - #define LOAD_OPENGL_FUN(name, type) \ -@@ -504,7 +511,8 @@ static int av_cold opengl_load_procedures(OpenGLContext *opengl) - return AVERROR(ENOSYS); \ - } - --#if CONFIG_SDL2 -+#if CAN_DYNAMIC_LOAD -+#if CONFIG_SDL2 - if (!opengl->no_window) - return opengl_sdl_load_procedures(opengl); - #endif -@@ -534,9 +542,37 @@ static int av_cold opengl_load_procedures(OpenGLContext *opengl) - LOAD_OPENGL_FUN(glGetShaderInfoLog, FF_PFNGLGETSHADERINFOLOGPROC) - LOAD_OPENGL_FUN(glEnableVertexAttribArray, FF_PFNGLENABLEVERTEXATTRIBARRAYPROC) - LOAD_OPENGL_FUN(glVertexAttribPointer, FF_PFNGLVERTEXATTRIBPOINTERPROC) -+#else -+ procs->glActiveTexture = glActiveTexture; -+ procs->glGenBuffers = glGenBuffers; -+ procs->glDeleteBuffers = glDeleteBuffers; -+ procs->glBufferData = glBufferData; -+ procs->glBindBuffer = glBindBuffer; -+ procs->glGetAttribLocation = glGetAttribLocation; -+ procs->glGetUniformLocation = glGetUniformLocation; -+ procs->glUniform1f = glUniform1f; -+ procs->glUniform1i = glUniform1i; -+ procs->glUniformMatrix4fv = glUniformMatrix4fv; -+ procs->glCreateProgram = glCreateProgram; -+ procs->glDeleteProgram = glDeleteProgram; -+ procs->glUseProgram = glUseProgram; -+ procs->glLinkProgram = glLinkProgram; -+ procs->glGetProgramiv = glGetProgramiv; -+ procs->glGetProgramInfoLog = glGetProgramInfoLog; -+ procs->glAttachShader = glAttachShader; -+ procs->glCreateShader = glCreateShader; -+ procs->glDeleteShader = glDeleteShader; -+ procs->glCompileShader = glCompileShader; -+ procs->glShaderSource = glShaderSource; -+ procs->glGetShaderiv = glGetShaderiv; -+ procs->glGetShaderInfoLog = glGetShaderInfoLog; -+ procs->glEnableVertexAttribArray = glEnableVertexAttribArray; -+ procs->glVertexAttribPointer = (FF_PFNGLVERTEXATTRIBPOINTERPROC) glVertexAttribPointer; -+#endif - - return 0; - -+#undef CAN_DYNAMIC_LOAD - #undef SelectedGetProcAddress - #undef LOAD_OPENGL_FUN - } --- -2.38.1 - diff --git a/sources/meta-raspberrypi/recipes-multimedia/rpidistro-ffmpeg/files/2003-libavcodec-fix-v4l2_req_devscan.patch b/sources/meta-raspberrypi/recipes-multimedia/rpidistro-ffmpeg/files/2003-libavcodec-fix-v4l2_req_devscan.patch deleted file mode 100644 index 2232c483..00000000 --- a/sources/meta-raspberrypi/recipes-multimedia/rpidistro-ffmpeg/files/2003-libavcodec-fix-v4l2_req_devscan.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 62c2f041890a6e20770350721a0a2138d0b38634 Mon Sep 17 00:00:00 2001 -From: Vincent Davis Jr -Date: Sat, 3 Dec 2022 23:35:51 -0600 -Subject: [PATCH] libavcodec: fix v4l2_req_devscan.h - -Upstream-Status: Inappropriate - -RPI-Distro repo clones original ffmpeg and applies patches to enable -raspiberry pi support. - -Fixes minor differences between v4l2_req_devscan.c -and v4l2_req_devscan.h after all patches have been -applied. - -Signed-off-by: Vincent Davis Jr ---- - libavcodec/v4l2_req_devscan.h | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/libavcodec/v4l2_req_devscan.h b/libavcodec/v4l2_req_devscan.h -index 0baef365..cd9c49ac 100644 ---- a/libavcodec/v4l2_req_devscan.h -+++ b/libavcodec/v4l2_req_devscan.h -@@ -1,6 +1,8 @@ - #ifndef _DEVSCAN_H_ - #define _DEVSCAN_H_ - -+#include -+ - struct devscan; - struct decdev; - enum v4l2_buf_type; -@@ -13,7 +15,8 @@ const char *decdev_video_path(const struct decdev *const dev); - enum v4l2_buf_type decdev_src_type(const struct decdev *const dev); - uint32_t decdev_src_pixelformat(const struct decdev *const dev); - --const struct decdev *devscan_find(struct devscan *const scan, const uint32_t src_fmt_v4l2); -+const struct decdev *devscan_find(struct devscan *const scan, -+ const uint32_t src_fmt_v4l2); - - int devscan_build(void * const dc, struct devscan **pscan); - void devscan_delete(struct devscan **const pScan); --- -2.38.1 - diff --git a/sources/meta-raspberrypi/recipes-multimedia/rpidistro-ffmpeg/rpidistro-ffmpeg_4.3.4.bb b/sources/meta-raspberrypi/recipes-multimedia/rpidistro-ffmpeg/rpidistro-ffmpeg_4.3.4.bb deleted file mode 100644 index 5a8ff8fa..00000000 --- a/sources/meta-raspberrypi/recipes-multimedia/rpidistro-ffmpeg/rpidistro-ffmpeg_4.3.4.bb +++ /dev/null @@ -1,198 +0,0 @@ -SUMMARY = "A complete, cross-platform solution to record, convert and stream audio and video." -DESCRIPTION = "FFmpeg is the leading multimedia framework, able to decode, encode, transcode, \ - mux, demux, stream, filter and play pretty much anything that humans and machines \ - have created. It supports the most obscure ancient formats up to the cutting edge." -HOMEPAGE = "https://www.ffmpeg.org/" -SECTION = "libs" - -LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later & ISC & MIT & BSD-2-Clause & BSD-3-Clause & IJG" -LICENSE:${PN} = "GPL-2.0-or-later" -LICENSE:libavcodec = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}" -LICENSE:libavdevice = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}" -LICENSE:libavfilter = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}" -LICENSE:libavformat = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}" -LICENSE:libavutil = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}" -LICENSE:libpostproc = "GPL-2.0-or-later" -LICENSE:libswresample = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}" -LICENSE:libswscale = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}" -LICENSE_FLAGS = "commercial" - -LIC_FILES_CHKSUM = "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \ - file://COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \ - file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02" - -# Build fails when thumb is enabled: https://bugzilla.yoctoproject.org/show_bug.cgi?id=7717 -ARM_INSTRUCTION_SET:armv4 = "arm" -ARM_INSTRUCTION_SET:armv5 = "arm" -ARM_INSTRUCTION_SET:armv6 = "arm" -# Should be API compatible with libav (which was a fork of ffmpeg) -# libpostproc was previously packaged from a separate recipe -PROVIDES = "ffmpeg libav libpostproc" -RPROVIDES:${PN} = "${PROVIDES}" -DEPENDS = "nasm-native" - -inherit autotools pkgconfig -PACKAGECONFIG ??= "avdevice avfilter avcodec avformat swresample swscale postproc avresample ffplay \ - v4l2 drm udev alsa bzlib lzma pic pthreads shared theora zlib libvorbis x264 gpl \ - ${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', 'mmal rpi sand vout-drm', d)} \ - ${@bb.utils.contains('AVAILTUNES', 'mips32r2', 'mips32r2', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xv xcb vout-egl epoxy', '', d)}" - -SRC_URI = "\ - git://git@github.com/RPi-Distro/ffmpeg;protocol=https;branch=pios/bullseye \ - file://0001-avcodec-arm-sbcenc-avoid-callee-preserved-vfp-regist.patch \ - file://0002-Fix-build-on-powerpc-and-ppc64.patch \ - file://0003-avcodec-pngenc-remove-monowhite-from-apng-formats.patch \ - file://0004-ffmpeg-4.3.4-rpi_14.patch \ - file://0005-fix-flags.diff \ - file://2001-configure-setup-for-OE-core-usage.patch \ - file://2002-libavdevice-opengl_enc-update-dynamic-function-loader.patch \ - file://2003-libavcodec-fix-v4l2_req_devscan.patch \ - file://2004-libavcodec-omx-replace-opt-vc-path-with-usr-lib.patch \ - " - -SRCREV = "246e1a55a0eca931537d8706acd8b133c07beb05" - -S = "${WORKDIR}/git" - -# libraries to build in addition to avutil -PACKAGECONFIG[avdevice] = "--enable-avdevice,--disable-avdevice" -PACKAGECONFIG[avfilter] = "--enable-avfilter,--disable-avfilter" -PACKAGECONFIG[avcodec] = "--enable-avcodec,--disable-avcodec" -PACKAGECONFIG[avformat] = "--enable-avformat,--disable-avformat" -PACKAGECONFIG[swresample] = "--enable-swresample,--disable-swresample" -PACKAGECONFIG[swscale] = "--enable-swscale,--disable-swscale" -PACKAGECONFIG[postproc] = "--enable-postproc,--disable-postproc" -PACKAGECONFIG[avresample] = "--enable-avresample,--disable-avresample" - -# features to support -PACKAGECONFIG[ffplay] = "--enable-ffplay,--disable-ffplay" -PACKAGECONFIG[alsa] = "--enable-alsa,--disable-alsa,alsa-lib" -PACKAGECONFIG[altivec] = "--enable-altivec,--disable-altivec," -PACKAGECONFIG[bzlib] = "--enable-bzlib,--disable-bzlib,bzip2" -PACKAGECONFIG[fdk-aac] = "--enable-libfdk-aac --enable-nonfree,--disable-libfdk-aac,fdk-aac" -PACKAGECONFIG[gpl] = "--enable-gpl,--disable-gpl" -PACKAGECONFIG[opengl] = "--enable-opengl,--disable-opengl,virtual/libgles2" -PACKAGECONFIG[gsm] = "--enable-libgsm,--disable-libgsm,libgsm" -PACKAGECONFIG[jack] = "--enable-indev=jack,--disable-indev=jack,jack" -PACKAGECONFIG[libvorbis] = "--enable-libvorbis,--disable-libvorbis,libvorbis" -PACKAGECONFIG[libopus] = "--enable-libopus,--disable-libopus,libopus" -PACKAGECONFIG[lzma] = "--enable-lzma,--disable-lzma,xz" -PACKAGECONFIG[mfx] = "--enable-libmfx,--disable-libmfx,intel-mediasdk" -PACKAGECONFIG[mp3lame] = "--enable-libmp3lame,--disable-libmp3lame,lame" -PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl" -PACKAGECONFIG[sdl2] = "--enable-sdl2,--disable-sdl2,virtual/libsdl2" -PACKAGECONFIG[speex] = "--enable-libspeex,--disable-libspeex,speex" -PACKAGECONFIG[srt] = "--enable-libsrt,--disable-libsrt,srt" -PACKAGECONFIG[theora] = "--enable-libtheora,--disable-libtheora,libtheora libogg" -PACKAGECONFIG[vaapi] = "--enable-vaapi,--disable-vaapi,libva" -PACKAGECONFIG[vdpau] = "--enable-vdpau,--disable-vdpau,libvdpau" -PACKAGECONFIG[vpx] = "--enable-libvpx,--disable-libvpx,libvpx" -PACKAGECONFIG[x264] = "--enable-libx264,--disable-libx264,x264" -PACKAGECONFIG[xcb] = "--enable-libxcb,--disable-libxcb,libxcb" -PACKAGECONFIG[xv] = "--enable-outdev=xv,--disable-outdev=xv,libxv" -PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib" -PACKAGECONFIG[snappy] = "--enable-libsnappy,--disable-libsnappy,snappy" -PACKAGECONFIG[udev] = "--enable-libudev,--disable-libudev,udev" -PACKAGECONFIG[drm] = "--enable-libdrm,--disable-libdrm,libdrm" -PACKAGECONFIG[epoxy] = "--enable-epoxy,--disable-epoxy,libepoxy" -PACKAGECONFIG[v4l2] = "--enable-libv4l2 --enable-v4l2-m2m,,v4l-utils" -PACKAGECONFIG[mmal] = "--enable-omx --enable-omx-rpi --enable-mmal,,userland" -PACKAGECONFIG[sand] = "--enable-sand,," -PACKAGECONFIG[rpi] = "--enable-rpi,," -PACKAGECONFIG[vout-drm] = "--enable-vout-drm,,libdrm" -PACKAGECONFIG[vout-egl] = "--enable-vout-egl,,virtual/egl" - -# other configuration options -PACKAGECONFIG[mips32r2] = ",--disable-mipsdsp --disable-mipsdspr2" -PACKAGECONFIG[pic] = "--enable-pic" -PACKAGECONFIG[pthreads] = "--enable-pthreads,--disable-pthreads" -PACKAGECONFIG[shared] = "--enable-shared" -PACKAGECONFIG[strip] = ",--disable-stripping" - -# Check codecs that require --enable-nonfree -USE_NONFREE = "${@bb.utils.contains_any('PACKAGECONFIG', [ 'openssl' ], 'yes', '', d)}" - -def cpu(d): - for arg in (d.getVar('TUNE_CCARGS') or '').split(): - if arg.startswith('-mcpu='): - return arg[6:] - return 'generic' - -EXTRA_OECONF = " \ - ${@bb.utils.contains('USE_NONFREE', 'yes', '--enable-nonfree', '', d)} \ - \ - --cross-prefix=${TARGET_PREFIX} \ - \ - --ld="${CCLD}" \ - --cc="${CC}" \ - --cxx="${CXX}" \ - --arch=${TARGET_ARCH} \ - --target-os="linux" \ - --enable-cross-compile \ - --extra-cflags="${CFLAGS} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" \ - --extra-ldflags="${LDFLAGS}" \ - --sysroot="${STAGING_DIR_TARGET}" \ - ${EXTRA_FFCONF} \ - --libdir=${libdir} \ - --shlibdir=${libdir} \ - --datadir=${datadir}/ffmpeg \ - --cpu=${@cpu(d)} \ - --pkg-config=pkg-config \ -" -EXTRA_OECONF:append:linux-gnux32 = " --disable-asm" - -# Some patches introduce assembly files which needs preprocessing with -# gcc e.g. src/libavutil/aarch64/rpi_sand_neon.S -TOOLCHAIN = "gcc" -# gold crashes on x86, another solution is to --disable-asm but thats more hacky -# ld.gold: internal error in relocate_section, at ../../gold/i386.cc:3684 -LDFLAGS:append:x86 = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}" -EXTRA_OEMAKE = "V=1" - -do_configure() { - ${S}/configure ${EXTRA_OECONF} -} - -# patch out build host paths for reproducibility -do_compile:prepend:class-target() { - sed -i -e "s,${WORKDIR},,g" ${B}/config.h -} - -PACKAGES =+ "libavcodec \ - libavdevice \ - libavfilter \ - libavformat \ - libavresample \ - libavutil \ - libpostproc \ - libswresample \ - libswscale" - -FILES:${PN}:append = " /usr/share/ffmpeg" -FILES:libavcodec = "${libdir}/libavcodec${SOLIBS}" -FILES:libavdevice = "${libdir}/libavdevice${SOLIBS}" -FILES:libavfilter = "${libdir}/libavfilter${SOLIBS}" -FILES:libavformat = "${libdir}/libavformat${SOLIBS}" -FILES:libavresample = "${libdir}/libavresample${SOLIBS}" -FILES:libavutil = "${libdir}/libavutil${SOLIBS}" -FILES:libpostproc = "${libdir}/libpostproc${SOLIBS}" -FILES:libswresample = "${libdir}/libswresample${SOLIBS}" -FILES:libswscale = "${libdir}/libswscale${SOLIBS}" -# ffmpeg disables PIC on some platforms (e.g. x86-32) -INSANE_SKIP:${MLPREFIX}libavcodec = "textrel" -INSANE_SKIP:${MLPREFIX}libavdevice = "textrel" -INSANE_SKIP:${MLPREFIX}libavfilter = "textrel" -INSANE_SKIP:${MLPREFIX}libavformat = "textrel" -INSANE_SKIP:${MLPREFIX}libavutil = "textrel" -INSANE_SKIP:${MLPREFIX}libavresample = "textrel" -INSANE_SKIP:${MLPREFIX}libswscale = "textrel" -INSANE_SKIP:${MLPREFIX}libswresample = "textrel" -INSANE_SKIP:${MLPREFIX}libpostproc = "textrel" - -# Only enable it for rpi class of machines -COMPATIBLE_HOST = "null" -COMPATIBLE_HOST:rpi = "(.*)" - diff --git a/sources/meta-raspberrypi/recipes-multimedia/rpidistro-ffmpeg/rpidistro-ffmpeg_5.1.4.bb b/sources/meta-raspberrypi/recipes-multimedia/rpidistro-ffmpeg/rpidistro-ffmpeg_5.1.4.bb new file mode 100644 index 00000000..e8f640bf --- /dev/null +++ b/sources/meta-raspberrypi/recipes-multimedia/rpidistro-ffmpeg/rpidistro-ffmpeg_5.1.4.bb @@ -0,0 +1,192 @@ +SUMMARY = "A complete, cross-platform solution to record, convert and stream audio and video." +DESCRIPTION = "FFmpeg is the leading multimedia framework, able to decode, encode, transcode, \ + mux, demux, stream, filter and play pretty much anything that humans and machines \ + have created. It supports the most obscure ancient formats up to the cutting edge." +HOMEPAGE = "https://www.ffmpeg.org/" +SECTION = "libs" + +LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later & ISC & MIT & BSD-2-Clause & BSD-3-Clause & IJG" +LICENSE:${PN} = "GPL-2.0-or-later" +LICENSE:libavcodec = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}" +LICENSE:libavdevice = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}" +LICENSE:libavfilter = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}" +LICENSE:libavformat = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}" +LICENSE:libavutil = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}" +LICENSE:libpostproc = "GPL-2.0-or-later" +LICENSE:libswresample = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}" +LICENSE:libswscale = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}" +LICENSE_FLAGS = "commercial" + +LIC_FILES_CHKSUM = "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \ + file://COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \ + file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02" + +# Build fails when thumb is enabled: https://bugzilla.yoctoproject.org/show_bug.cgi?id=7717 +ARM_INSTRUCTION_SET:armv4 = "arm" +ARM_INSTRUCTION_SET:armv5 = "arm" +ARM_INSTRUCTION_SET:armv6 = "arm" +# Should be API compatible with libav (which was a fork of ffmpeg) +# libpostproc was previously packaged from a separate recipe +PROVIDES = "ffmpeg libav libpostproc" +RPROVIDES:${PN} = "${PROVIDES}" +DEPENDS = "nasm-native" + +inherit autotools pkgconfig +PACKAGECONFIG ??= "avdevice avfilter avcodec avformat swresample swscale postproc ffplay \ + v4l2 drm udev alsa bzlib lzma pic pthreads shared theora zlib libvorbis x264 gpl \ + ${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', 'mmal sand vout-drm', d)} \ + ${@bb.utils.contains('AVAILTUNES', 'mips32r2', 'mips32r2', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xv xcb', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'epoxy vout-egl', '', d)}" + +SRC_URI = "\ + git://git@github.com/RPi-Distro/ffmpeg;protocol=https;branch=pios/bookworm \ + file://0001-ffmpeg-5.1.4-rpi_24.patch \ + file://2001-configure-setup-for-OE-core-usage.patch \ + file://2004-libavcodec-omx-replace-opt-vc-path-with-usr-lib.patch \ + " + +SRCREV = "1c363463c432c5ed492c7b759abb6e015b93b6b5" + +S = "${WORKDIR}/git" + +# libraries to build in addition to avutil +PACKAGECONFIG[avdevice] = "--enable-avdevice,--disable-avdevice" +PACKAGECONFIG[avfilter] = "--enable-avfilter,--disable-avfilter" +PACKAGECONFIG[avcodec] = "--enable-avcodec,--disable-avcodec" +PACKAGECONFIG[avformat] = "--enable-avformat,--disable-avformat" +PACKAGECONFIG[swresample] = "--enable-swresample,--disable-swresample" +PACKAGECONFIG[swscale] = "--enable-swscale,--disable-swscale" +PACKAGECONFIG[postproc] = "--enable-postproc,--disable-postproc" +#PACKAGECONFIG[avresample] = "--enable-avresample,--disable-avresample" + +# features to support +PACKAGECONFIG[ffplay] = "--enable-ffplay,--disable-ffplay" +PACKAGECONFIG[alsa] = "--enable-alsa,--disable-alsa,alsa-lib" +PACKAGECONFIG[altivec] = "--enable-altivec,--disable-altivec," +PACKAGECONFIG[bzlib] = "--enable-bzlib,--disable-bzlib,bzip2" +PACKAGECONFIG[fdk-aac] = "--enable-libfdk-aac --enable-nonfree,--disable-libfdk-aac,fdk-aac" +PACKAGECONFIG[gpl] = "--enable-gpl,--disable-gpl" +PACKAGECONFIG[opengl] = "--enable-opengl,--disable-opengl,virtual/libgles2" +PACKAGECONFIG[gsm] = "--enable-libgsm,--disable-libgsm,libgsm" +PACKAGECONFIG[jack] = "--enable-indev=jack,--disable-indev=jack,jack" +PACKAGECONFIG[libvorbis] = "--enable-libvorbis,--disable-libvorbis,libvorbis" +PACKAGECONFIG[libopus] = "--enable-libopus,--disable-libopus,libopus" +PACKAGECONFIG[lzma] = "--enable-lzma,--disable-lzma,xz" +PACKAGECONFIG[mfx] = "--enable-libmfx,--disable-libmfx,intel-mediasdk" +PACKAGECONFIG[mp3lame] = "--enable-libmp3lame,--disable-libmp3lame,lame" +PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl" +PACKAGECONFIG[sdl2] = "--enable-sdl2,--disable-sdl2,virtual/libsdl2" +PACKAGECONFIG[speex] = "--enable-libspeex,--disable-libspeex,speex" +PACKAGECONFIG[srt] = "--enable-libsrt,--disable-libsrt,srt" +PACKAGECONFIG[theora] = "--enable-libtheora,--disable-libtheora,libtheora libogg" +PACKAGECONFIG[vaapi] = "--enable-vaapi,--disable-vaapi,libva" +PACKAGECONFIG[vdpau] = "--enable-vdpau,--disable-vdpau,libvdpau" +PACKAGECONFIG[vpx] = "--enable-libvpx,--disable-libvpx,libvpx" +PACKAGECONFIG[x264] = "--enable-libx264,--disable-libx264,x264" +PACKAGECONFIG[xcb] = "--enable-libxcb,--disable-libxcb,libxcb" +PACKAGECONFIG[xv] = "--enable-outdev=xv,--disable-outdev=xv,libxv" +PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib" +PACKAGECONFIG[snappy] = "--enable-libsnappy,--disable-libsnappy,snappy" +PACKAGECONFIG[udev] = "--enable-libudev,--disable-libudev,udev" +PACKAGECONFIG[drm] = "--enable-libdrm,--disable-libdrm,libdrm" +PACKAGECONFIG[epoxy] = "--enable-epoxy,--disable-epoxy,libepoxy" +PACKAGECONFIG[v4l2] = "--enable-libv4l2 --enable-v4l2-m2m,,v4l-utils" +PACKAGECONFIG[mmal] = "--enable-omx --enable-omx-rpi --enable-mmal,,userland" +PACKAGECONFIG[sand] = "--enable-sand,," +PACKAGECONFIG[vout-drm] = "--enable-vout-drm,,libdrm" +PACKAGECONFIG[vout-egl] = "--enable-vout-egl,,virtual/egl" + +# other configuration options +PACKAGECONFIG[mips32r2] = ",--disable-mipsdsp --disable-mipsdspr2" +PACKAGECONFIG[pic] = "--enable-pic" +PACKAGECONFIG[pthreads] = "--enable-pthreads,--disable-pthreads" +PACKAGECONFIG[shared] = "--enable-shared" +PACKAGECONFIG[strip] = ",--disable-stripping" + +# Check codecs that require --enable-nonfree +USE_NONFREE = "${@bb.utils.contains_any('PACKAGECONFIG', [ 'openssl' ], 'yes', '', d)}" + +def cpu(d): + for arg in (d.getVar('TUNE_CCARGS') or '').split(): + if arg.startswith('-mcpu='): + return arg[6:] + return 'generic' + +EXTRA_OECONF = " \ + ${@bb.utils.contains('USE_NONFREE', 'yes', '--enable-nonfree', '', d)} \ + \ + --cross-prefix=${TARGET_PREFIX} \ + \ + --ld="${CCLD}" \ + --cc="${CC}" \ + --cxx="${CXX}" \ + --arch=${TARGET_ARCH} \ + --target-os="linux" \ + --enable-cross-compile \ + --extra-cflags="${CFLAGS} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" \ + --extra-ldflags="${LDFLAGS}" \ + --sysroot="${STAGING_DIR_TARGET}" \ + ${EXTRA_FFCONF} \ + --libdir=${libdir} \ + --shlibdir=${libdir} \ + --datadir=${datadir}/ffmpeg \ + --cpu=${@cpu(d)} \ + --pkg-config=pkg-config \ +" +EXTRA_OECONF:append:linux-gnux32 = " --disable-asm" + +# Some patches introduce assembly files which needs preprocessing with +# gcc e.g. src/libavutil/aarch64/rpi_sand_neon.S +TOOLCHAIN = "gcc" +# gold crashes on x86, another solution is to --disable-asm but thats more hacky +# ld.gold: internal error in relocate_section, at ../../gold/i386.cc:3684 +LDFLAGS:append:x86 = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}" +EXTRA_OEMAKE = "V=1" + +do_configure() { + ${S}/configure ${EXTRA_OECONF} +} + +# patch out build host paths for reproducibility +do_compile:prepend:class-target() { + sed -i -e "s,${WORKDIR},,g" ${B}/config.h +} + +PACKAGES =+ "libavcodec \ + libavdevice \ + libavfilter \ + libavformat \ + libavresample \ + libavutil \ + libpostproc \ + libswresample \ + libswscale" + +FILES:${PN}:append = " /usr/share/ffmpeg" +FILES:libavcodec = "${libdir}/libavcodec${SOLIBS}" +FILES:libavdevice = "${libdir}/libavdevice${SOLIBS}" +FILES:libavfilter = "${libdir}/libavfilter${SOLIBS}" +FILES:libavformat = "${libdir}/libavformat${SOLIBS}" +FILES:libavresample = "${libdir}/libavresample${SOLIBS}" +FILES:libavutil = "${libdir}/libavutil${SOLIBS}" +FILES:libpostproc = "${libdir}/libpostproc${SOLIBS}" +FILES:libswresample = "${libdir}/libswresample${SOLIBS}" +FILES:libswscale = "${libdir}/libswscale${SOLIBS}" +# ffmpeg disables PIC on some platforms (e.g. x86-32) +INSANE_SKIP:${MLPREFIX}libavcodec = "textrel" +INSANE_SKIP:${MLPREFIX}libavdevice = "textrel" +INSANE_SKIP:${MLPREFIX}libavfilter = "textrel" +INSANE_SKIP:${MLPREFIX}libavformat = "textrel" +INSANE_SKIP:${MLPREFIX}libavutil = "textrel" +INSANE_SKIP:${MLPREFIX}libavresample = "textrel" +INSANE_SKIP:${MLPREFIX}libswscale = "textrel" +INSANE_SKIP:${MLPREFIX}libswresample = "textrel" +INSANE_SKIP:${MLPREFIX}libpostproc = "textrel" + +# Only enable it for rpi class of machines +COMPATIBLE_HOST = "null" +COMPATIBLE_HOST:rpi = "(.*)" + diff --git a/sources/poky/.subproject b/sources/poky/.subproject index 9ba543b8..70b4f22d 100644 --- a/sources/poky/.subproject +++ b/sources/poky/.subproject @@ -1,4 +1,4 @@ [upstream] - object-id = 6f7e929ea6ea557f107c8ccffea69a7d73439591 - revision = refs/heads/scarthgap + object-id = f57dc43765e76325b35e2b05390e41ea73ad810c + revision = styhead url = https://git.yoctoproject.org/poky diff --git a/sources/poky/MAINTAINERS.md b/sources/poky/MAINTAINERS.md index 505c2e23..fe706a19 100644 --- a/sources/poky/MAINTAINERS.md +++ b/sources/poky/MAINTAINERS.md @@ -41,6 +41,7 @@ Component/Subsystem Maintainers * devtool: Saul Wold * eSDK: Saul Wold * overlayfs: Vyacheslav Yurkov +* Patchtest: Trevor Gamblin Maintainers needed ------------------ @@ -52,7 +53,6 @@ Maintainers needed * error reporting system/web UI * wic * Patchwork -* Patchtest * Matchbox * Sato * Autobuilder diff --git a/sources/poky/bitbake/bin/bitbake b/sources/poky/bitbake/bin/bitbake index f494eaa1..8622a7bf 100755 --- a/sources/poky/bitbake/bin/bitbake +++ b/sources/poky/bitbake/bin/bitbake @@ -27,7 +27,7 @@ from bb.main import bitbake_main, BitBakeConfigParameters, BBMainException bb.utils.check_system_locale() -__version__ = "2.8.0" +__version__ = "2.9.1" if __name__ == "__main__": if __version__ != bb.__version__: diff --git a/sources/poky/bitbake/bin/bitbake-hashclient b/sources/poky/bitbake/bin/bitbake-hashclient index 610787ed..5d6f6704 100755 --- a/sources/poky/bitbake/bin/bitbake-hashclient +++ b/sources/poky/bitbake/bin/bitbake-hashclient @@ -16,6 +16,7 @@ import time import warnings import netrc import json +import statistics warnings.simplefilter("default") try: @@ -81,6 +82,7 @@ def main(): nonlocal found_hashes nonlocal missed_hashes nonlocal max_time + nonlocal times with hashserv.create_client(args.address) as client: for i in range(args.requests): @@ -98,29 +100,41 @@ def main(): else: missed_hashes += 1 - max_time = max(elapsed, max_time) + times.append(elapsed) pbar.update() max_time = 0 found_hashes = 0 missed_hashes = 0 lock = threading.Lock() - total_requests = args.clients * args.requests + times = [] start_time = time.perf_counter() - with ProgressBar(total=total_requests) as pbar: + with ProgressBar(total=args.clients * args.requests) as pbar: threads = [threading.Thread(target=thread_main, args=(pbar, lock), daemon=False) for _ in range(args.clients)] for t in threads: t.start() for t in threads: t.join() + total_elapsed = time.perf_counter() - start_time - elapsed = time.perf_counter() - start_time with lock: - print("%d requests in %.1fs. %.1f requests per second" % (total_requests, elapsed, total_requests / elapsed)) - print("Average request time %.8fs" % (elapsed / total_requests)) - print("Max request time was %.8fs" % max_time) - print("Found %d hashes, missed %d" % (found_hashes, missed_hashes)) + mean = statistics.mean(times) + median = statistics.median(times) + stddev = statistics.pstdev(times) + + print(f"Number of clients: {args.clients}") + print(f"Requests per client: {args.requests}") + print(f"Number of requests: {len(times)}") + print(f"Total elapsed time: {total_elapsed:.3f}s") + print(f"Total request rate: {len(times)/total_elapsed:.3f} req/s") + print(f"Average request time: {mean:.3f}s") + print(f"Median request time: {median:.3f}s") + print(f"Request time std dev: {stddev:.3f}s") + print(f"Maximum request time: {max(times):.3f}s") + print(f"Minimum request time: {min(times):.3f}s") + print(f"Hashes found: {found_hashes}") + print(f"Hashes missed: {missed_hashes}") if args.report: with ProgressBar(total=args.requests) as pbar: @@ -225,6 +239,32 @@ def main(): print("true" if result else "false") return 0 + def handle_ping(args, client): + times = [] + for i in range(1, args.count + 1): + if not args.quiet: + print(f"Ping {i} of {args.count}... ", end="") + start_time = time.perf_counter() + client.ping() + elapsed = time.perf_counter() - start_time + times.append(elapsed) + if not args.quiet: + print(f"{elapsed:.3f}s") + + mean = statistics.mean(times) + median = statistics.median(times) + std_dev = statistics.pstdev(times) + + if not args.quiet: + print("------------------------") + print(f"Number of pings: {len(times)}") + print(f"Average round trip time: {mean:.3f}s") + print(f"Median round trip time: {median:.3f}s") + print(f"Round trip time std dev: {std_dev:.3f}s") + print(f"Min time is: {min(times):.3f}s") + print(f"Max time is: {max(times):.3f}s") + return 0 + parser = argparse.ArgumentParser(description='Hash Equivalence Client') parser.add_argument('--address', default=DEFAULT_ADDRESS, help='Server address (default "%(default)s")') parser.add_argument('--log', default='WARNING', help='Set logging level') @@ -322,6 +362,11 @@ def main(): unihash_exists_parser.add_argument("unihash", help="Unihash to check") unihash_exists_parser.set_defaults(func=handle_unihash_exists) + ping_parser = subparsers.add_parser('ping', help="Ping server") + ping_parser.add_argument("-n", "--count", type=int, help="Number of pings. Default is %(default)s", default=10) + ping_parser.add_argument("-q", "--quiet", action="store_true", help="Don't print each ping; only print results") + ping_parser.set_defaults(func=handle_ping) + args = parser.parse_args() logger = logging.getLogger('hashserv') diff --git a/sources/poky/bitbake/bin/bitbake-hashserv b/sources/poky/bitbake/bin/bitbake-hashserv index 4bfb7abf..01503736 100755 --- a/sources/poky/bitbake/bin/bitbake-hashserv +++ b/sources/poky/bitbake/bin/bitbake-hashserv @@ -125,6 +125,11 @@ The following permissions are supported by the server: default=os.environ.get("HASHSERVER_ADMIN_PASSWORD", None), help="Create default admin user with password ADMIN_PASSWORD ($HASHSERVER_ADMIN_PASSWORD)", ) + parser.add_argument( + "--reuseport", + action="store_true", + help="Enable SO_REUSEPORT, allowing multiple servers to bind to the same port for load balancing", + ) args = parser.parse_args() @@ -132,7 +137,9 @@ The following permissions are supported by the server: level = getattr(logging, args.log.upper(), None) if not isinstance(level, int): - raise ValueError("Invalid log level: %s (Try ERROR/WARNING/INFO/DEBUG)" % args.log) + raise ValueError( + "Invalid log level: %s (Try ERROR/WARNING/INFO/DEBUG)" % args.log + ) logger.setLevel(level) console = logging.StreamHandler() @@ -155,6 +162,7 @@ The following permissions are supported by the server: anon_perms=anon_perms, admin_username=args.admin_user, admin_password=args.admin_password, + reuseport=args.reuseport, ) server.serve_forever() return 0 diff --git a/sources/poky/bitbake/bin/bitbake-layers b/sources/poky/bitbake/bin/bitbake-layers index d4b1d1aa..aebb5100 100755 --- a/sources/poky/bitbake/bin/bitbake-layers +++ b/sources/poky/bitbake/bin/bitbake-layers @@ -33,7 +33,7 @@ def main(): add_help=False) parser.add_argument('-d', '--debug', help='Enable debug output', action='store_true') parser.add_argument('-q', '--quiet', help='Print only errors', action='store_true') - parser.add_argument('-F', '--force', help='Force add without recipe parse verification', action='store_true') + parser.add_argument('-F', '--force', help='Forced execution: can be specified multiple times. -F will force add without recipe parse verification and -FF will additionally force the run withput layer parsing.', action='count', default=0) parser.add_argument('--color', choices=['auto', 'always', 'never'], default='auto', help='Colorize output (where %(metavar)s is %(choices)s)', metavar='COLOR') global_args, unparsed_args = parser.parse_known_args() @@ -59,16 +59,20 @@ def main(): plugins = [] tinfoil = bb.tinfoil.Tinfoil(tracking=True) tinfoil.logger.setLevel(logger.getEffectiveLevel()) - try: + if global_args.force > 1: + bbpaths = [] + else: tinfoil.prepare(True) - for path in ([topdir] + - tinfoil.config_data.getVar('BBPATH').split(':')): + bbpaths = tinfoil.config_data.getVar('BBPATH').split(':') + + try: + for path in ([topdir] + bbpaths): pluginpath = os.path.join(path, 'lib', 'bblayers') bb.utils.load_plugins(logger, plugins, pluginpath) registered = False for plugin in plugins: - if hasattr(plugin, 'tinfoil_init'): + if hasattr(plugin, 'tinfoil_init') and global_args.force <= 1: plugin.tinfoil_init(tinfoil) if hasattr(plugin, 'register_commands'): registered = True diff --git a/sources/poky/bitbake/bin/bitbake-prserv b/sources/poky/bitbake/bin/bitbake-prserv index ad0a0694..580e021f 100755 --- a/sources/poky/bitbake/bin/bitbake-prserv +++ b/sources/poky/bitbake/bin/bitbake-prserv @@ -16,11 +16,18 @@ sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(__file__)), "lib import prserv import prserv.serv -VERSION = "1.1.0" +VERSION = "2.0.0" PRHOST_DEFAULT="0.0.0.0" PRPORT_DEFAULT=8585 +def init_logger(logfile, loglevel): + numeric_level = getattr(logging, loglevel.upper(), None) + if not isinstance(numeric_level, int): + raise ValueError("Invalid log level: %s" % loglevel) + FORMAT = "%(asctime)-15s %(message)s" + logging.basicConfig(level=numeric_level, filename=logfile, format=FORMAT) + def main(): parser = argparse.ArgumentParser( description="BitBake PR Server. Version=%s" % VERSION, @@ -70,12 +77,25 @@ def main(): action="store_true", help="open database in read-only mode", ) + parser.add_argument( + "-u", + "--upstream", + default=os.environ.get("PRSERVER_UPSTREAM", None), + help="Upstream PR service (host:port)", + ) args = parser.parse_args() - prserv.init_logger(os.path.abspath(args.log), args.loglevel) + init_logger(os.path.abspath(args.log), args.loglevel) if args.start: - ret=prserv.serv.start_daemon(args.file, args.host, args.port, os.path.abspath(args.log), args.read_only) + ret=prserv.serv.start_daemon( + args.file, + args.host, + args.port, + os.path.abspath(args.log), + args.read_only, + args.upstream + ) elif args.stop: ret=prserv.serv.stop_daemon(args.host, args.port) else: diff --git a/sources/poky/bitbake/bin/bitbake-selftest b/sources/poky/bitbake/bin/bitbake-selftest index f25f23b1..ce901232 100755 --- a/sources/poky/bitbake/bin/bitbake-selftest +++ b/sources/poky/bitbake/bin/bitbake-selftest @@ -15,6 +15,7 @@ import unittest try: import bb import hashserv + import prserv import layerindexlib except RuntimeError as exc: sys.exit(str(exc)) @@ -33,6 +34,7 @@ tests = ["bb.tests.codeparser", "bb.tests.utils", "bb.tests.compression", "hashserv.tests", + "prserv.tests", "layerindexlib.tests.layerindexobj", "layerindexlib.tests.restapi", "layerindexlib.tests.cooker"] diff --git a/sources/poky/bitbake/doc/releases.rst b/sources/poky/bitbake/doc/releases.rst index b38b1c06..b271e2ad 100644 --- a/sources/poky/bitbake/doc/releases.rst +++ b/sources/poky/bitbake/doc/releases.rst @@ -5,10 +5,10 @@ BitBake Supported Release Manuals ================================= ******************************* -Release Series 4.2 (mickledore) +Release Series 5.0 (scarthgap) ******************************* -- :yocto_docs:`BitBake 2.4 User Manual ` +- :yocto_docs:`BitBake 2.8 User Manual ` ****************************** Release Series 4.0 (kirkstone) @@ -26,6 +26,18 @@ Release Series 3.1 (dunfell) BitBake Outdated Release Manuals ================================ +******************************* +Release Series 4.3 (nanbield) +******************************* + +- :yocto_docs:`BitBake 2.6 User Manual ` + +******************************* +Release Series 4.2 (mickledore) +******************************* + +- :yocto_docs:`BitBake 2.4 User Manual ` + ***************************** Release Series 4.1 (langdale) ***************************** diff --git a/sources/poky/bitbake/lib/bb/__init__.py b/sources/poky/bitbake/lib/bb/__init__.py index cdec9e4d..574e0de5 100644 --- a/sources/poky/bitbake/lib/bb/__init__.py +++ b/sources/poky/bitbake/lib/bb/__init__.py @@ -9,7 +9,7 @@ # SPDX-License-Identifier: GPL-2.0-only # -__version__ = "2.8.0" +__version__ = "2.9.1" import sys if sys.version_info < (3, 8, 0): @@ -104,26 +104,6 @@ def __init__(self, logger, *args, **kwargs): self.setup_bblogger(logger.name) super().__init__(logger, *args, **kwargs) - if sys.version_info < (3, 6): - # These properties were added in Python 3.6. Add them in older versions - # for compatibility - @property - def manager(self): - return self.logger.manager - - @manager.setter - def manager(self, value): - self.logger.manager = value - - @property - def name(self): - return self.logger.name - - def __repr__(self): - logger = self.logger - level = logger.getLevelName(logger.getEffectiveLevel()) - return '<%s %s (%s)>' % (self.__class__.__name__, logger.name, level) - logging.LoggerAdapter = BBLoggerAdapter logger = logging.getLogger("BitBake") diff --git a/sources/poky/bitbake/lib/bb/asyncrpc/__init__.py b/sources/poky/bitbake/lib/bb/asyncrpc/__init__.py index 639e1607..a4371643 100644 --- a/sources/poky/bitbake/lib/bb/asyncrpc/__init__.py +++ b/sources/poky/bitbake/lib/bb/asyncrpc/__init__.py @@ -5,7 +5,7 @@ # -from .client import AsyncClient, Client, ClientPool +from .client import AsyncClient, Client from .serv import AsyncServer, AsyncServerConnection from .connection import DEFAULT_MAX_CHUNK from .exceptions import ( diff --git a/sources/poky/bitbake/lib/bb/asyncrpc/client.py b/sources/poky/bitbake/lib/bb/asyncrpc/client.py index 6fa2839f..9be49261 100644 --- a/sources/poky/bitbake/lib/bb/asyncrpc/client.py +++ b/sources/poky/bitbake/lib/bb/asyncrpc/client.py @@ -24,6 +24,12 @@ ADDR_TYPE_TCP = 1 ADDR_TYPE_WS = 2 +WEBSOCKETS_MIN_VERSION = (9, 1) +# Need websockets 10 with python 3.10+ +if sys.version_info >= (3, 10, 0): + WEBSOCKETS_MIN_VERSION = (10, 0) + + def parse_address(addr): if addr.startswith(UNIX_PREFIX): return (ADDR_TYPE_UNIX, (addr[len(UNIX_PREFIX) :],)) @@ -39,6 +45,7 @@ def parse_address(addr): return (ADDR_TYPE_TCP, (host, int(port))) + class AsyncClient(object): def __init__( self, @@ -86,6 +93,24 @@ async def connect_sock(): async def connect_websocket(self, uri): import websockets + try: + version = tuple( + int(v) + for v in websockets.__version__.split(".")[ + 0 : len(WEBSOCKETS_MIN_VERSION) + ] + ) + except ValueError: + raise ImportError( + f"Unable to parse websockets version '{websockets.__version__}'" + ) + + if version < WEBSOCKETS_MIN_VERSION: + min_ver_str = ".".join(str(v) for v in WEBSOCKETS_MIN_VERSION) + raise ImportError( + f"Websockets version {websockets.__version__} is less than minimum required version {min_ver_str}" + ) + async def connect_sock(): websocket = await websockets.connect( uri, @@ -229,85 +254,9 @@ def disconnect(self): def close(self): if self.loop: self.loop.run_until_complete(self.client.close()) - if sys.version_info >= (3, 6): - self.loop.run_until_complete(self.loop.shutdown_asyncgens()) - self.loop.close() - self.loop = None - - def __enter__(self): - return self - - def __exit__(self, exc_type, exc_value, traceback): - self.close() - return False - - -class ClientPool(object): - def __init__(self, max_clients): - self.avail_clients = [] - self.num_clients = 0 - self.max_clients = max_clients - self.loop = None - self.client_condition = None - - @abc.abstractmethod - async def _new_client(self): - raise NotImplementedError("Must be implemented in derived class") - - def close(self): - if self.client_condition: - self.client_condition = None - - if self.loop: - self.loop.run_until_complete(self.__close_clients()) self.loop.run_until_complete(self.loop.shutdown_asyncgens()) self.loop.close() - self.loop = None - - def run_tasks(self, tasks): - if not self.loop: - self.loop = asyncio.new_event_loop() - - thread = Thread(target=self.__thread_main, args=(tasks,)) - thread.start() - thread.join() - - @contextlib.asynccontextmanager - async def get_client(self): - async with self.client_condition: - if self.avail_clients: - client = self.avail_clients.pop() - elif self.num_clients < self.max_clients: - self.num_clients += 1 - client = await self._new_client() - else: - while not self.avail_clients: - await self.client_condition.wait() - client = self.avail_clients.pop() - - try: - yield client - finally: - async with self.client_condition: - self.avail_clients.append(client) - self.client_condition.notify() - - def __thread_main(self, tasks): - async def process_task(task): - async with self.get_client() as client: - await task(client) - - asyncio.set_event_loop(self.loop) - if not self.client_condition: - self.client_condition = asyncio.Condition() - tasks = [process_task(t) for t in tasks] - self.loop.run_until_complete(asyncio.gather(*tasks)) - - async def __close_clients(self): - for c in self.avail_clients: - await c.close() - self.avail_clients = [] - self.num_clients = 0 + self.loop = None def __enter__(self): return self diff --git a/sources/poky/bitbake/lib/bb/asyncrpc/serv.py b/sources/poky/bitbake/lib/bb/asyncrpc/serv.py index a66117ac..667217c5 100644 --- a/sources/poky/bitbake/lib/bb/asyncrpc/serv.py +++ b/sources/poky/bitbake/lib/bb/asyncrpc/serv.py @@ -138,14 +138,20 @@ async def stop(self): class TCPStreamServer(StreamServer): - def __init__(self, host, port, handler, logger): + def __init__(self, host, port, handler, logger, *, reuseport=False): super().__init__(handler, logger) self.host = host self.port = port + self.reuseport = reuseport def start(self, loop): self.server = loop.run_until_complete( - asyncio.start_server(self.handle_stream_client, self.host, self.port) + asyncio.start_server( + self.handle_stream_client, + self.host, + self.port, + reuse_port=self.reuseport, + ) ) for s in self.server.sockets: @@ -209,11 +215,12 @@ def cleanup(self): class WebsocketsServer(object): - def __init__(self, host, port, handler, logger): + def __init__(self, host, port, handler, logger, *, reuseport=False): self.host = host self.port = port self.handler = handler self.logger = logger + self.reuseport = reuseport def start(self, loop): import websockets.server @@ -224,6 +231,7 @@ def start(self, loop): self.host, self.port, ping_interval=None, + reuse_port=self.reuseport, ) ) @@ -262,14 +270,26 @@ def __init__(self, logger): self.loop = None self.run_tasks = [] - def start_tcp_server(self, host, port): - self.server = TCPStreamServer(host, port, self._client_handler, self.logger) + def start_tcp_server(self, host, port, *, reuseport=False): + self.server = TCPStreamServer( + host, + port, + self._client_handler, + self.logger, + reuseport=reuseport, + ) def start_unix_server(self, path): self.server = UnixStreamServer(path, self._client_handler, self.logger) - def start_websocket_server(self, host, port): - self.server = WebsocketsServer(host, port, self._client_handler, self.logger) + def start_websocket_server(self, host, port, reuseport=False): + self.server = WebsocketsServer( + host, + port, + self._client_handler, + self.logger, + reuseport=reuseport, + ) async def _client_handler(self, socket): address = socket.address @@ -368,8 +388,7 @@ def run(queue): self._serve_forever(tasks) - if sys.version_info >= (3, 6): - self.loop.run_until_complete(self.loop.shutdown_asyncgens()) + self.loop.run_until_complete(self.loop.shutdown_asyncgens()) self.loop.close() queue = multiprocessing.Queue() diff --git a/sources/poky/bitbake/lib/bb/build.py b/sources/poky/bitbake/lib/bb/build.py index 44d08f5c..9f9285de 100644 --- a/sources/poky/bitbake/lib/bb/build.py +++ b/sources/poky/bitbake/lib/bb/build.py @@ -197,6 +197,8 @@ def exec_func(func, d, dirs = None): for cdir in d.expand(cleandirs).split(): bb.utils.remove(cdir, True) bb.utils.mkdirhier(cdir) + if cdir == oldcwd: + os.chdir(cdir) if flags and dirs is None: dirs = flags.get('dirs') @@ -741,7 +743,7 @@ def emit(self, record): if quieterr: if not handled: - logger.warning(repr(exc)) + logger.warning(str(exc)) event.fire(TaskFailedSilent(task, fn, logfn, localdata), localdata) else: errprinted = errchk.triggered @@ -750,7 +752,7 @@ def emit(self, record): if verboseStdoutLogging or handled: errprinted = True if not handled: - logger.error(repr(exc)) + logger.error(str(exc)) event.fire(TaskFailed(task, fn, logfn, localdata, errprinted), localdata) return 1 @@ -930,9 +932,13 @@ def getTask(name): # don't assume holding a reference d.setVar('_task_deps', task_deps) +def ensure_task_prefix(name): + if name[:3] != "do_": + name = "do_" + name + return name + def addtask(task, before, after, d): - if task[:3] != "do_": - task = "do_" + task + task = ensure_task_prefix(task) d.setVarFlag(task, "task", 1) bbtasks = d.getVar('__BBTASKS', False) or [] @@ -944,19 +950,20 @@ def addtask(task, before, after, d): if after is not None: # set up deps for function for entry in after.split(): + entry = ensure_task_prefix(entry) if entry not in existing: existing.append(entry) d.setVarFlag(task, "deps", existing) if before is not None: # set up things that depend on this func for entry in before.split(): + entry = ensure_task_prefix(entry) existing = d.getVarFlag(entry, "deps", False) or [] if task not in existing: d.setVarFlag(entry, "deps", [task] + existing) def deltask(task, d): - if task[:3] != "do_": - task = "do_" + task + task = ensure_task_prefix(task) bbtasks = d.getVar('__BBTASKS', False) or [] if task in bbtasks: diff --git a/sources/poky/bitbake/lib/bb/cache.py b/sources/poky/bitbake/lib/bb/cache.py index 18d5574a..958652e0 100644 --- a/sources/poky/bitbake/lib/bb/cache.py +++ b/sources/poky/bitbake/lib/bb/cache.py @@ -28,7 +28,7 @@ logger = logging.getLogger("BitBake.Cache") -__cache_version__ = "155" +__cache_version__ = "156" def getCacheFile(path, filename, mc, data_hash): mcspec = '' @@ -441,7 +441,7 @@ def prepare_cache(self, progress): else: symlink = os.path.join(self.cachedir, "bb_cache.dat") - if os.path.exists(symlink): + if os.path.exists(symlink) or os.path.islink(symlink): bb.utils.remove(symlink) try: os.symlink(os.path.basename(self.cachefile), symlink) @@ -779,25 +779,6 @@ def __iter__(self): for k in self.__caches: yield k -def init(cooker): - """ - The Objective: Cache the minimum amount of data possible yet get to the - stage of building packages (i.e. tryBuild) without reparsing any .bb files. - - To do this, we intercept getVar calls and only cache the variables we see - being accessed. We rely on the cache getVar calls being made for all - variables bitbake might need to use to reach this stage. For each cached - file we need to track: - - * Its mtime - * The mtimes of all its dependencies - * Whether it caused a parse.SkipRecipe exception - - Files causing parsing errors are evicted from the cache. - - """ - return Cache(cooker.configuration.data, cooker.configuration.data_hash) - class CacheData(object): """ diff --git a/sources/poky/bitbake/lib/bb/codeparser.py b/sources/poky/bitbake/lib/bb/codeparser.py index 1001ca19..d249af32 100644 --- a/sources/poky/bitbake/lib/bb/codeparser.py +++ b/sources/poky/bitbake/lib/bb/codeparser.py @@ -87,14 +87,17 @@ def add_module_functions(fn, functions, namespace): if e in functions: execs.remove(e) execs.add(namespace + "." + e) - modulecode_deps[name] = [parser.references.copy(), execs, parser.var_execs.copy(), parser.contains.copy(), parser.extra] + visitorcode = None + if hasattr(functions[f], 'visitorcode'): + visitorcode = getattr(functions[f], "visitorcode") + modulecode_deps[name] = [parser.references.copy(), execs, parser.var_execs.copy(), parser.contains.copy(), parser.extra, visitorcode] #bb.warn("%s: %s\nRefs:%s Execs: %s %s %s" % (name, fn, parser.references, parser.execs, parser.var_execs, parser.contains)) def update_module_dependencies(d): for mod in modulecode_deps: excludes = set((d.getVarFlag(mod, "vardepsexclude") or "").split()) if excludes: - modulecode_deps[mod] = [modulecode_deps[mod][0] - excludes, modulecode_deps[mod][1] - excludes, modulecode_deps[mod][2] - excludes, modulecode_deps[mod][3], modulecode_deps[mod][4]] + modulecode_deps[mod] = [modulecode_deps[mod][0] - excludes, modulecode_deps[mod][1] - excludes, modulecode_deps[mod][2] - excludes, modulecode_deps[mod][3], modulecode_deps[mod][4], modulecode_deps[mod][5]] # A custom getstate/setstate using tuples is actually worth 15% cachesize by # avoiding duplication of the attribute names! @@ -161,7 +164,7 @@ class CodeParserCache(MultiProcessCache): # so that an existing cache gets invalidated. Additionally you'll need # to increment __cache_version__ in cache.py in order to ensure that old # recipe caches don't trigger "Taskhash mismatch" errors. - CACHE_VERSION = 12 + CACHE_VERSION = 14 def __init__(self): MultiProcessCache.__init__(self) @@ -261,7 +264,15 @@ def warn(self, func, arg): def visit_Call(self, node): name = self.called_node_name(node.func) - if name and (name.endswith(self.getvars) or name.endswith(self.getvarflags) or name in self.containsfuncs or name in self.containsanyfuncs): + if name and name in modulecode_deps and modulecode_deps[name][5]: + visitorcode = modulecode_deps[name][5] + contains, execs, warn = visitorcode(name, node.args) + for i in contains: + self.contains[i] = contains[i] + self.execs |= execs + if warn: + self.warn(node.func, warn) + elif name and (name.endswith(self.getvars) or name.endswith(self.getvarflags) or name in self.containsfuncs or name in self.containsanyfuncs): if isinstance(node.args[0], ast.Constant) and isinstance(node.args[0].value, str): varname = node.args[0].value if name in self.containsfuncs and isinstance(node.args[1], ast.Constant): @@ -495,19 +506,34 @@ def process_words(self, words): """ words = list(words) - for word in list(words): + for word in words: wtree = pyshlex.make_wordtree(word[1]) for part in wtree: if not isinstance(part, list): continue - if part[0] in ('`', '$('): - command = pyshlex.wordtree_as_string(part[1:-1]) - self._parse_shell(command) - - if word[0] in ("cmd_name", "cmd_word"): - if word in words: - words.remove(word) + candidates = [part] + + # If command is of type: + # + # var="... $(cmd [...]) ..." + # + # Then iterate on what's between the quotes and if we find a + # list, make that what we check for below. + if len(part) >= 3 and part[0] == '"': + for p in part[1:-1]: + if isinstance(p, list): + candidates.append(p) + + for candidate in candidates: + if len(candidate) >= 2: + if candidate[0] in ('`', '$('): + command = pyshlex.wordtree_as_string(candidate[1:-1]) + self._parse_shell(command) + + if word[0] in ("cmd_name", "cmd_word"): + if word in words: + words.remove(word) usetoken = False for word in words: diff --git a/sources/poky/bitbake/lib/bb/cooker.py b/sources/poky/bitbake/lib/bb/cooker.py index 6fce19b4..4aad408d 100644 --- a/sources/poky/bitbake/lib/bb/cooker.py +++ b/sources/poky/bitbake/lib/bb/cooker.py @@ -282,7 +282,6 @@ def initConfigurationData(self): self.databuilder = bb.cookerdata.CookerDataBuilder(self.configuration, False) self.databuilder.parseBaseConfiguration() self.data = self.databuilder.data - self.data_hash = self.databuilder.data_hash self.extraconfigdata = {} eventlog = self.data.getVar("BB_DEFAULT_EVENTLOG") @@ -371,6 +370,11 @@ def revalidateCaches(self): if not clean: bb.parse.BBHandler.cached_statements = {} + # If writes were made to any of the data stores, we need to recalculate the data + # store cache + if hasattr(self, "databuilder"): + self.databuilder.calc_datastore_hashes() + def parseConfiguration(self): self.updateCacheSync() @@ -681,14 +685,14 @@ def buildTaskData(self, pkgs_to_build, task, halt, allowincomplete=False): bb.event.fire(bb.event.TreeDataPreparationCompleted(len(fulltargetlist)), self.data) return taskdata, runlist - def prepareTreeData(self, pkgs_to_build, task): + def prepareTreeData(self, pkgs_to_build, task, halt=False): """ Prepare a runqueue and taskdata object for iteration over pkgs_to_build """ # We set halt to False here to prevent unbuildable targets raising # an exception when we're just generating data - taskdata, runlist = self.buildTaskData(pkgs_to_build, task, False, allowincomplete=True) + taskdata, runlist = self.buildTaskData(pkgs_to_build, task, halt, allowincomplete=True) return runlist, taskdata @@ -702,7 +706,7 @@ def generateTaskDepTreeData(self, pkgs_to_build, task): if not task.startswith("do_"): task = "do_%s" % task - runlist, taskdata = self.prepareTreeData(pkgs_to_build, task) + runlist, taskdata = self.prepareTreeData(pkgs_to_build, task, halt=True) rq = bb.runqueue.RunQueue(self, self.data, self.recipecaches, taskdata, runlist) rq.rqdata.prepare() return self.buildDependTree(rq, taskdata) @@ -1339,7 +1343,7 @@ def buildFileInternal(self, buildfile, task, fireevents=True, quietlog=False): self.buildSetVars() self.reset_mtime_caches() - bb_caches = bb.cache.MulticonfigCache(self.databuilder, self.data_hash, self.caches_array) + bb_caches = bb.cache.MulticonfigCache(self.databuilder, self.databuilder.data_hash, self.caches_array) layername = self.collections[mc].calc_bbfile_priority(fn)[2] infos = bb_caches[mc].parse(fn, self.collections[mc].get_file_appends(fn), layername) @@ -1813,8 +1817,8 @@ def collect_bbfiles(self, config, eventdata): bb.event.fire(CookerExit(), eventdata) # We need to track where we look so that we can know when the cache is invalid. There - # is no nice way to do this, this is horrid. We intercept the os.listdir() - # (or os.scandir() for python 3.6+) calls while we run glob(). + # is no nice way to do this, this is horrid. We intercept the os.listdir() and os.scandir() + # calls while we run glob(). origlistdir = os.listdir if hasattr(os, 'scandir'): origscandir = os.scandir @@ -2112,7 +2116,7 @@ def __init__(self, cooker, mcfilelist, masked): self.mcfilelist = mcfilelist self.cooker = cooker self.cfgdata = cooker.data - self.cfghash = cooker.data_hash + self.cfghash = cooker.databuilder.data_hash self.cfgbuilder = cooker.databuilder # Accounting statistics @@ -2224,9 +2228,8 @@ def sync_caches(): for process in self.processes: process.join() - # Added in 3.7, cleans up zombies - if hasattr(process, "close"): - process.close() + # clean up zombies + process.close() bb.codeparser.parser_cache_save() bb.codeparser.parser_cache_savemerge() @@ -2236,12 +2239,13 @@ def sync_caches(): profiles = [] for i in self.process_names: logfile = "profile-parse-%s.log" % i - if os.path.exists(logfile): + if os.path.exists(logfile) and os.path.getsize(logfile): profiles.append(logfile) - pout = "profile-parse.log.processed" - bb.utils.process_profilelog(profiles, pout = pout) - print("Processed parsing statistics saved to %s" % (pout)) + if profiles: + pout = "profile-parse.log.processed" + bb.utils.process_profilelog(profiles, pout = pout) + print("Processed parsing statistics saved to %s" % (pout)) def final_cleanup(self): if self.syncthread: diff --git a/sources/poky/bitbake/lib/bb/cookerdata.py b/sources/poky/bitbake/lib/bb/cookerdata.py index 0649e409..3ad5cf3d 100644 --- a/sources/poky/bitbake/lib/bb/cookerdata.py +++ b/sources/poky/bitbake/lib/bb/cookerdata.py @@ -254,9 +254,16 @@ def __init__(self, cookercfg, worker = False): self.data = self.basedata self.mcdata = {} + def calc_datastore_hashes(self): + data_hash = hashlib.sha256() + data_hash.update(self.data.get_hash().encode('utf-8')) + multiconfig = (self.data.getVar("BBMULTICONFIG") or "").split() + for config in multiconfig: + data_hash.update(self.mcdata[config].get_hash().encode('utf-8')) + self.data_hash = data_hash.hexdigest() + def parseBaseConfiguration(self, worker=False): mcdata = {} - data_hash = hashlib.sha256() try: self.data = self.parseConfigurationFiles(self.prefiles, self.postfiles) @@ -279,7 +286,6 @@ def parseBaseConfiguration(self, worker=False): bb.event.fire(bb.event.ConfigParsed(), self.data) bb.parse.init_parser(self.data) - data_hash.update(self.data.get_hash().encode('utf-8')) mcdata[''] = self.data multiconfig = (self.data.getVar("BBMULTICONFIG") or "").split() @@ -289,11 +295,9 @@ def parseBaseConfiguration(self, worker=False): parsed_mcdata = self.parseConfigurationFiles(self.prefiles, self.postfiles, config) bb.event.fire(bb.event.ConfigParsed(), parsed_mcdata) mcdata[config] = parsed_mcdata - data_hash.update(parsed_mcdata.get_hash().encode('utf-8')) if multiconfig: bb.event.fire(bb.event.MultiConfigParsed(mcdata), self.data) - self.data_hash = data_hash.hexdigest() except bb.data_smart.ExpansionError as e: logger.error(str(e)) raise bb.BBHandledException() @@ -328,6 +332,7 @@ def parseBaseConfiguration(self, worker=False): for mc in mcdata: self.mcdata[mc] = bb.data.createCopy(mcdata[mc]) self.data = self.mcdata[''] + self.calc_datastore_hashes() def reset(self): # We may not have run parseBaseConfiguration() yet diff --git a/sources/poky/bitbake/lib/bb/data_smart.py b/sources/poky/bitbake/lib/bb/data_smart.py index 7b67127c..c6049d57 100644 --- a/sources/poky/bitbake/lib/bb/data_smart.py +++ b/sources/poky/bitbake/lib/bb/data_smart.py @@ -31,7 +31,7 @@ __setvar_keyword__ = [":append", ":prepend", ":remove"] __setvar_regexp__ = re.compile(r'(?P.*?)(?P:append|:prepend|:remove)(:(?P[^A-Z]*))?$') -__expand_var_regexp__ = re.compile(r"\${[a-zA-Z0-9\-_+./~:]+}") +__expand_var_regexp__ = re.compile(r"\${[a-zA-Z0-9\-_+./~:]+?}") __expand_python_regexp__ = re.compile(r"\${@(?:{.*?}|.)+?}") __whitespace_split__ = re.compile(r'(\s)') __override_regexp__ = re.compile(r'[a-z0-9]+') @@ -580,9 +580,12 @@ def setVar(self, var, value, **loginfo): else: loginfo['op'] = keyword self.varhistory.record(**loginfo) + # todo make sure keyword is not __doc__ or __module__ + # pay the cookie monster # more cookies for the cookie monster - self._setvar_update_overrides(base, **loginfo) + if ':' in var: + self._setvar_update_overrides(base, **loginfo) if base in self.overridevars: self._setvar_update_overridevars(var, value) @@ -635,7 +638,6 @@ def _setvar_update_overridevars(self, var, value): nextnew.update(vardata.contains.keys()) new = nextnew self.overrides = None - self.expand_cache = {} def _setvar_update_overrides(self, var, **loginfo): # aka pay the cookie monster diff --git a/sources/poky/bitbake/lib/bb/fetch2/__init__.py b/sources/poky/bitbake/lib/bb/fetch2/__init__.py index 1a6ff25d..8f0ed2b9 100644 --- a/sources/poky/bitbake/lib/bb/fetch2/__init__.py +++ b/sources/poky/bitbake/lib/bb/fetch2/__init__.py @@ -237,7 +237,7 @@ def __init__(self, uri=None): # to RFC compliant URL format. E.g.: # file://foo.diff -> file:foo.diff if urlp.scheme in self._netloc_forbidden: - uri = re.sub(r"(?<=:)//(?!/)", "", uri, count=1) + uri = re.sub("(?<=:)//(?!/)", "", uri, 1) reparse = 1 if reparse: @@ -1317,7 +1317,7 @@ def configure_checksum(checksum_id): if checksum_name in self.parm: checksum_expected = self.parm[checksum_name] - elif self.type not in ["http", "https", "ftp", "ftps", "sftp", "s3", "az", "crate", "gs"]: + elif self.type not in ["http", "https", "ftp", "ftps", "sftp", "s3", "az", "crate", "gs", "gomod"]: checksum_expected = None else: checksum_expected = d.getVarFlag("SRC_URI", checksum_name) @@ -1606,7 +1606,7 @@ def unpack(self, urldata, rootdir, data): if urlpath.find("/") != -1: destdir = urlpath.rsplit("/", 1)[0] + '/' bb.utils.mkdirhier("%s/%s" % (unpackdir, destdir)) - cmd = 'cp -fpPRH "%s" "%s"' % (file, destdir) + cmd = 'cp --force --preserve=timestamps --no-dereference --recursive -H "%s" "%s"' % (file, destdir) else: urldata.unpack_tracer.unpack("archive-extract", unpackdir) @@ -2088,6 +2088,7 @@ def close_connections(self): from . import az from . import crate from . import gcp +from . import gomod methods.append(local.Local()) methods.append(wget.Wget()) @@ -2110,3 +2111,5 @@ def close_connections(self): methods.append(az.Az()) methods.append(crate.Crate()) methods.append(gcp.GCP()) +methods.append(gomod.GoMod()) +methods.append(gomod.GoModGit()) diff --git a/sources/poky/bitbake/lib/bb/fetch2/clearcase.py b/sources/poky/bitbake/lib/bb/fetch2/clearcase.py index 1a9c8637..2b3bd706 100644 --- a/sources/poky/bitbake/lib/bb/fetch2/clearcase.py +++ b/sources/poky/bitbake/lib/bb/fetch2/clearcase.py @@ -108,7 +108,7 @@ def urldata_init(self, ud, d): ud.module.replace("/", "."), ud.label.replace("/", ".")) - ud.viewname = "%s-view%s" % (ud.identifier, d.getVar("DATETIME", d, True)) + ud.viewname = "%s-view%s" % (ud.identifier, d.getVar("DATETIME")) ud.csname = "%s-config-spec" % (ud.identifier) ud.ccasedir = os.path.join(d.getVar("DL_DIR"), ud.type) ud.viewdir = os.path.join(ud.ccasedir, ud.viewname) @@ -196,7 +196,7 @@ def _remove_view(self, ud, d): def need_update(self, ud, d): if ("LATEST" in ud.label) or (ud.customspec and "LATEST" in ud.customspec): - ud.identifier += "-%s" % d.getVar("DATETIME",d, True) + ud.identifier += "-%s" % d.getVar("DATETIME") return True if os.path.exists(ud.localpath): return False diff --git a/sources/poky/bitbake/lib/bb/fetch2/crate.py b/sources/poky/bitbake/lib/bb/fetch2/crate.py index 01d49435..e611736f 100644 --- a/sources/poky/bitbake/lib/bb/fetch2/crate.py +++ b/sources/poky/bitbake/lib/bb/fetch2/crate.py @@ -70,6 +70,7 @@ def _crate_urldata_init(self, ud, d): host = 'crates.io/api/v1/crates' ud.url = "https://%s/%s/%s/download" % (host, name, version) + ud.versionsurl = "https://%s/%s/versions" % (host, name) ud.parm['downloadfilename'] = "%s-%s.crate" % (name, version) if 'name' not in ud.parm: ud.parm['name'] = '%s-%s' % (name, version) @@ -139,3 +140,11 @@ def _crate_unpack(self, ud, rootdir, d): mdpath = os.path.join(bbpath, cratepath, mdfile) with open(mdpath, "w") as f: json.dump(metadata, f) + + def latest_versionstring(self, ud, d): + from functools import cmp_to_key + json_data = json.loads(self._fetch_index(ud.versionsurl, ud, d)) + versions = [(0, i["num"], "") for i in json_data["versions"]] + versions = sorted(versions, key=cmp_to_key(bb.utils.vercmp)) + + return (versions[-1][1], "") diff --git a/sources/poky/bitbake/lib/bb/fetch2/git.py b/sources/poky/bitbake/lib/bb/fetch2/git.py index 60291446..5b678827 100644 --- a/sources/poky/bitbake/lib/bb/fetch2/git.py +++ b/sources/poky/bitbake/lib/bb/fetch2/git.py @@ -262,7 +262,7 @@ def urldata_init(self, ud, d): for name in ud.names: ud.unresolvedrev[name] = 'HEAD' - ud.basecmd = d.getVar("FETCHCMD_git") or "git -c gc.autoDetach=false -c core.pager=cat -c safe.bareRepository=all" + ud.basecmd = d.getVar("FETCHCMD_git") or "git -c gc.autoDetach=false -c core.pager=cat -c safe.bareRepository=all -c clone.defaultRemoteName=origin" write_tarballs = d.getVar("BB_GENERATE_MIRROR_TARBALLS") or "0" ud.write_tarballs = write_tarballs != "0" or ud.rebaseable @@ -551,18 +551,31 @@ def create_atomic(filename): runfetchcmd("touch %s.done" % ud.fullmirror, d) def clone_shallow_local(self, ud, dest, d): - """Clone the repo and make it shallow. + """ + Shallow fetch from ud.clonedir (${DL_DIR}/git2/ by default): + - For BB_GIT_SHALLOW_DEPTH: git fetch --depth rev + - For BB_GIT_SHALLOW_REVS: git fetch --shallow-exclude= rev + """ + + bb.utils.mkdirhier(dest) + init_cmd = "%s init -q" % ud.basecmd + if ud.bareclone: + init_cmd += " --bare" + runfetchcmd(init_cmd, d, workdir=dest) + runfetchcmd("%s remote add origin %s" % (ud.basecmd, ud.clonedir), d, workdir=dest) - The upstream url of the new clone isn't set at this time, as it'll be - set correctly when unpacked.""" - runfetchcmd("%s clone %s %s %s" % (ud.basecmd, ud.cloneflags, ud.clonedir, dest), d) + # Check the histories which should be excluded + shallow_exclude = '' + for revision in ud.shallow_revs: + shallow_exclude += " --shallow-exclude=%s" % revision - to_parse, shallow_branches = [], [] for name in ud.names: revision = ud.revisions[name] depth = ud.shallow_depths[name] - if depth: - to_parse.append('%s~%d^{}' % (revision, depth - 1)) + + # The --depth and --shallow-exclude can't be used together + if depth and shallow_exclude: + raise bb.fetch2.FetchError("BB_GIT_SHALLOW_REVS is set, but BB_GIT_SHALLOW_DEPTH is not 0.") # For nobranch, we need a ref, otherwise the commits will be # removed, and for non-nobranch, we truncate the branch to our @@ -575,36 +588,49 @@ def clone_shallow_local(self, ud, dest, d): else: ref = "refs/remotes/origin/%s" % branch - shallow_branches.append(ref) - runfetchcmd("%s update-ref %s %s" % (ud.basecmd, ref, revision), d, workdir=dest) + fetch_cmd = "%s fetch origin %s" % (ud.basecmd, revision) + if depth: + fetch_cmd += " --depth %s" % depth + + if shallow_exclude: + fetch_cmd += shallow_exclude - # Map srcrev+depths to revisions - parsed_depths = runfetchcmd("%s rev-parse %s" % (ud.basecmd, " ".join(to_parse)), d, workdir=dest) + # Advertise the revision for lower version git such as 2.25.1: + # error: Server does not allow request for unadvertised object. + # The ud.clonedir is a local temporary dir, will be removed when + # fetch is done, so we can do anything on it. + adv_cmd = 'git branch -f advertise-%s %s' % (revision, revision) + runfetchcmd(adv_cmd, d, workdir=ud.clonedir) - # Resolve specified revisions - parsed_revs = runfetchcmd("%s rev-parse %s" % (ud.basecmd, " ".join('"%s^{}"' % r for r in ud.shallow_revs)), d, workdir=dest) - shallow_revisions = parsed_depths.splitlines() + parsed_revs.splitlines() + runfetchcmd(fetch_cmd, d, workdir=dest) + runfetchcmd("%s update-ref %s %s" % (ud.basecmd, ref, revision), d, workdir=dest) # Apply extra ref wildcards - all_refs = runfetchcmd('%s for-each-ref "--format=%%(refname)"' % ud.basecmd, - d, workdir=dest).splitlines() + all_refs_remote = runfetchcmd("%s ls-remote origin 'refs/*'" % ud.basecmd, \ + d, workdir=dest).splitlines() + all_refs = [] + for line in all_refs_remote: + all_refs.append(line.split()[-1]) + extra_refs = [] for r in ud.shallow_extra_refs: if not ud.bareclone: r = r.replace('refs/heads/', 'refs/remotes/origin/') if '*' in r: matches = filter(lambda a: fnmatch.fnmatchcase(a, r), all_refs) - shallow_branches.extend(matches) + extra_refs.extend(matches) else: - shallow_branches.append(r) - - # Make the repository shallow - shallow_cmd = [self.make_shallow_path, '-s'] - for b in shallow_branches: - shallow_cmd.append('-r') - shallow_cmd.append(b) - shallow_cmd.extend(shallow_revisions) - runfetchcmd(subprocess.list2cmdline(shallow_cmd), d, workdir=dest) + extra_refs.append(r) + + for ref in extra_refs: + ref_fetch = os.path.basename(ref) + runfetchcmd("%s fetch origin --depth 1 %s" % (ud.basecmd, ref_fetch), d, workdir=dest) + revision = runfetchcmd("%s rev-parse FETCH_HEAD" % ud.basecmd, d, workdir=dest) + runfetchcmd("%s update-ref %s %s" % (ud.basecmd, ref, revision), d, workdir=dest) + + # The url is local ud.clonedir, set it to upstream one + repourl = self._get_repo_url(ud) + runfetchcmd("%s remote set-url origin %s" % (ud.basecmd, shlex.quote(repourl)), d, workdir=dest) def unpack(self, ud, destdir, d): """ unpack the downloaded src to destdir""" diff --git a/sources/poky/bitbake/lib/bb/fetch2/gomod.py b/sources/poky/bitbake/lib/bb/fetch2/gomod.py new file mode 100644 index 00000000..21fbe80f --- /dev/null +++ b/sources/poky/bitbake/lib/bb/fetch2/gomod.py @@ -0,0 +1,268 @@ +""" +BitBake 'Fetch' implementation for Go modules + +The gomod/gomodgit fetchers are used to download Go modules to the module cache +from a module proxy or directly from a version control repository. + +Example SRC_URI: + +SRC_URI += "gomod://golang.org/x/net;version=v0.9.0;sha256sum=..." +SRC_URI += "gomodgit://golang.org/x/net;version=v0.9.0;repo=go.googlesource.com/net;srcrev=..." + +Required SRC_URI parameters: + +- version + The version of the module. + +Optional SRC_URI parameters: + +- mod + Fetch and unpack the go.mod file only instead of the complete module. + The go command may need to download go.mod files for many different modules + when computing the build list, and go.mod files are much smaller than + module zip files. + The default is "0", set mod=1 for the go.mod file only. + +- sha256sum + The checksum of the module zip file, or the go.mod file in case of fetching + only the go.mod file. Alternatively, set the SRC_URI varible flag for + "module@version.sha256sum". + +- protocol + The method used when fetching directly from a version control repository. + The default is "https" for git. + +- repo + The URL when fetching directly from a version control repository. Required + when the URL is different from the module path. + +- srcrev + The revision identifier used when fetching directly from a version control + repository. Alternatively, set the SRCREV varible for "module@version". + +- subdir + The module subdirectory when fetching directly from a version control + repository. Required when the module is not located in the root of the + repository. + +Related variables: + +- GO_MOD_PROXY + The module proxy used by the fetcher. + +- GO_MOD_CACHE_DIR + The directory where the module cache is located. + This must match the exported GOMODCACHE variable for the go command to find + the downloaded modules. + +See the Go modules reference, https://go.dev/ref/mod, for more information +about the module cache, module proxies and version control systems. +""" + +import hashlib +import os +import re +import shutil +import subprocess +import zipfile + +import bb +from bb.fetch2 import FetchError +from bb.fetch2 import MissingParameterError +from bb.fetch2 import runfetchcmd +from bb.fetch2 import subprocess_setup +from bb.fetch2.git import Git +from bb.fetch2.wget import Wget + + +def escape(path): + """Escape capital letters using exclamation points.""" + return re.sub(r'([A-Z])', lambda m: '!' + m.group(1).lower(), path) + + +class GoMod(Wget): + """Class to fetch Go modules from a Go module proxy via wget""" + + def supports(self, ud, d): + """Check to see if a given URL is for this fetcher.""" + return ud.type == 'gomod' + + def urldata_init(self, ud, d): + """Set up to download the module from the module proxy. + + Set up to download the module zip file to the module cache directory + and unpack the go.mod file (unless downloading only the go.mod file): + + cache/download//@v/.zip: The module zip file. + cache/download//@v/.mod: The go.mod file. + """ + + proxy = d.getVar('GO_MOD_PROXY') or 'proxy.golang.org' + moddir = d.getVar('GO_MOD_CACHE_DIR') or 'pkg/mod' + + if 'version' not in ud.parm: + raise MissingParameterError('version', ud.url) + + module = ud.host + if ud.path != '/': + module += ud.path + ud.parm['module'] = module + + # Set URL and filename for wget download + path = escape(module + '/@v/' + ud.parm['version']) + if ud.parm.get('mod', '0') == '1': + path += '.mod' + else: + path += '.zip' + ud.parm['unpack'] = '0' + ud.url = bb.fetch2.encodeurl( + ('https', proxy, '/' + path, None, None, None)) + ud.parm['downloadfilename'] = path + + # Set name parameter if sha256sum is set in recipe + name = f"{module}@{ud.parm['version']}" + if d.getVarFlag('SRC_URI', name + '.sha256sum'): + ud.parm['name'] = name + + # Set subdir for unpack + ud.parm['subdir'] = os.path.join(moddir, 'cache/download', + os.path.dirname(path)) + + super().urldata_init(ud, d) + + def unpack(self, ud, rootdir, d): + """Unpack the module in the module cache.""" + + # Unpack the module zip file or go.mod file + super().unpack(ud, rootdir, d) + + if ud.localpath.endswith('.zip'): + # Unpack the go.mod file from the zip file + module = ud.parm['module'] + unpackdir = os.path.join(rootdir, ud.parm['subdir']) + name = os.path.basename(ud.localpath).rsplit('.', 1)[0] + '.mod' + bb.note(f"Unpacking {name} to {unpackdir}/") + with zipfile.ZipFile(ud.localpath) as zf: + with open(os.path.join(unpackdir, name), mode='wb') as mf: + try: + f = module + '@' + ud.parm['version'] + '/go.mod' + shutil.copyfileobj(zf.open(f), mf) + except KeyError: + # If the module does not have a go.mod file, synthesize + # one containing only a module statement. + mf.write(f'module {module}\n'.encode()) + + +class GoModGit(Git): + """Class to fetch Go modules directly from a git repository""" + + def supports(self, ud, d): + """Check to see if a given URL is for this fetcher.""" + return ud.type == 'gomodgit' + + def urldata_init(self, ud, d): + """Set up to download the module from the git repository. + + Set up to download the git repository to the module cache directory and + unpack the module zip file and the go.mod file: + + cache/vcs/: The bare git repository. + cache/download//@v/.zip: The module zip file. + cache/download//@v/.mod: The go.mod file. + """ + + moddir = d.getVar('GO_MOD_CACHE_DIR') or 'pkg/mod' + + if 'version' not in ud.parm: + raise MissingParameterError('version', ud.url) + + module = ud.host + if ud.path != '/': + module += ud.path + ud.parm['module'] = module + + # Set host, path and srcrev for git download + if 'repo' in ud.parm: + repo = ud.parm['repo'] + idx = repo.find('/') + if idx != -1: + ud.host = repo[:idx] + ud.path = repo[idx:] + else: + ud.host = repo + ud.path = '' + if 'protocol' not in ud.parm: + ud.parm['protocol'] = 'https' + name = f"{module}@{ud.parm['version']}" + ud.names = [name] + srcrev = d.getVar('SRCREV_' + name) + if srcrev: + if 'srcrev' not in ud.parm: + ud.parm['srcrev'] = srcrev + else: + if 'srcrev' in ud.parm: + d.setVar('SRCREV_' + name, ud.parm['srcrev']) + if 'branch' not in ud.parm: + ud.parm['nobranch'] = '1' + + # Set subpath, subdir and bareclone for git unpack + if 'subdir' in ud.parm: + ud.parm['subpath'] = ud.parm['subdir'] + key = f"git3:{ud.parm['protocol']}://{ud.host}{ud.path}".encode() + ud.parm['key'] = key + ud.parm['subdir'] = os.path.join(moddir, 'cache/vcs', + hashlib.sha256(key).hexdigest()) + ud.parm['bareclone'] = '1' + + super().urldata_init(ud, d) + + def unpack(self, ud, rootdir, d): + """Unpack the module in the module cache.""" + + # Unpack the bare git repository + super().unpack(ud, rootdir, d) + + moddir = d.getVar('GO_MOD_CACHE_DIR') or 'pkg/mod' + + # Create the info file + module = ud.parm['module'] + repodir = os.path.join(rootdir, ud.parm['subdir']) + with open(repodir + '.info', 'wb') as f: + f.write(ud.parm['key']) + + # Unpack the go.mod file from the repository + unpackdir = os.path.join(rootdir, moddir, 'cache/download', + escape(module), '@v') + bb.utils.mkdirhier(unpackdir) + srcrev = ud.parm['srcrev'] + version = ud.parm['version'] + escaped_version = escape(version) + cmd = f"git ls-tree -r --name-only '{srcrev}'" + if 'subpath' in ud.parm: + cmd += f" '{ud.parm['subpath']}'" + files = runfetchcmd(cmd, d, workdir=repodir).split() + name = escaped_version + '.mod' + bb.note(f"Unpacking {name} to {unpackdir}/") + with open(os.path.join(unpackdir, name), mode='wb') as mf: + f = 'go.mod' + if 'subpath' in ud.parm: + f = os.path.join(ud.parm['subpath'], f) + if f in files: + cmd = ['git', 'cat-file', 'blob', srcrev + ':' + f] + subprocess.check_call(cmd, stdout=mf, cwd=repodir, + preexec_fn=subprocess_setup) + else: + # If the module does not have a go.mod file, synthesize one + # containing only a module statement. + mf.write(f'module {module}\n'.encode()) + + # Synthesize the module zip file from the repository + name = escaped_version + '.zip' + bb.note(f"Unpacking {name} to {unpackdir}/") + with zipfile.ZipFile(os.path.join(unpackdir, name), mode='w') as zf: + prefix = module + '@' + version + '/' + for f in files: + cmd = ['git', 'cat-file', 'blob', srcrev + ':' + f] + data = subprocess.check_output(cmd, cwd=repodir, + preexec_fn=subprocess_setup) + zf.writestr(prefix + f, data) diff --git a/sources/poky/bitbake/lib/bb/fetch2/npm.py b/sources/poky/bitbake/lib/bb/fetch2/npm.py index 15f3f19b..ac76d64c 100644 --- a/sources/poky/bitbake/lib/bb/fetch2/npm.py +++ b/sources/poky/bitbake/lib/bb/fetch2/npm.py @@ -42,11 +42,12 @@ def npm_package(package): """Convert the npm package name to remove unsupported character""" - # Scoped package names (with the @) use the same naming convention - # as the 'npm pack' command. + # For scoped package names ('@user/package') the '/' is replaced by a '-'. + # This is similar to what 'npm pack' does, but 'npm pack' also strips the + # leading '@', which can lead to ambiguous package names. name = re.sub("/", "-", package) name = name.lower() - name = re.sub(r"[^\-a-z0-9]", "", name) + name = re.sub(r"[^\-a-z0-9@]", "", name) name = name.strip("-") return name diff --git a/sources/poky/bitbake/lib/bb/fetch2/npmsw.py b/sources/poky/bitbake/lib/bb/fetch2/npmsw.py index ff5f8dc7..a5fa598d 100644 --- a/sources/poky/bitbake/lib/bb/fetch2/npmsw.py +++ b/sources/poky/bitbake/lib/bb/fetch2/npmsw.py @@ -97,7 +97,7 @@ def _resolve_dependency(name, params, destsuffix): integrity = params.get("integrity", None) resolved = params.get("resolved", None) - version = params.get("version", None) + version = params.get("version", resolved) # Handle registry sources if is_semver(version) and integrity: @@ -184,6 +184,7 @@ def _resolve_dependency(name, params, destsuffix): uri = URI("git://" + str(groups["url"])) uri.params["protocol"] = str(groups["protocol"]) uri.params["rev"] = str(groups["rev"]) + uri.params["nobranch"] = "1" uri.params["destsuffix"] = destsuffix url = str(uri) @@ -268,7 +269,7 @@ def download(self, ud, d): def unpack(self, ud, rootdir, d): """Unpack the downloaded dependencies""" - destdir = d.getVar("S") + destdir = rootdir destsuffix = ud.parm.get("destsuffix") if destsuffix: destdir = os.path.join(rootdir, destsuffix) diff --git a/sources/poky/bitbake/lib/bb/fetch2/svn.py b/sources/poky/bitbake/lib/bb/fetch2/svn.py index d40e4d29..0852108e 100644 --- a/sources/poky/bitbake/lib/bb/fetch2/svn.py +++ b/sources/poky/bitbake/lib/bb/fetch2/svn.py @@ -210,3 +210,6 @@ def sortable_revision(self, ud, d, name): def _build_revision(self, ud, d): return ud.revision + + def supports_checksum(self, urldata): + return False diff --git a/sources/poky/bitbake/lib/bb/fetch2/wget.py b/sources/poky/bitbake/lib/bb/fetch2/wget.py index 5bb3b2f3..80f5ea46 100644 --- a/sources/poky/bitbake/lib/bb/fetch2/wget.py +++ b/sources/poky/bitbake/lib/bb/fetch2/wget.py @@ -244,7 +244,12 @@ def do_open(self, http_class, req): fetch.connection_cache.remove_connection(h.host, h.port) raise urllib.error.URLError(err) else: - r = h.getresponse() + try: + r = h.getresponse() + except TimeoutError as e: + if fetch.connection_cache: + fetch.connection_cache.remove_connection(h.host, h.port) + raise TimeoutError(e) # Pick apart the HTTPResponse object to get the addinfourl # object initialized properly. diff --git a/sources/poky/bitbake/lib/bb/parse/ast.py b/sources/poky/bitbake/lib/bb/parse/ast.py index 327e45c8..001ba8d2 100644 --- a/sources/poky/bitbake/lib/bb/parse/ast.py +++ b/sources/poky/bitbake/lib/bb/parse/ast.py @@ -240,14 +240,16 @@ def eval(self, data): data.setVar(func, sentinel + " " + calledfunc + "\n", parsing=True) class AddTaskNode(AstNode): - def __init__(self, filename, lineno, func, before, after): + def __init__(self, filename, lineno, tasks, before, after): AstNode.__init__(self, filename, lineno) - self.func = func + self.tasks = tasks self.before = before self.after = after def eval(self, data): - bb.build.addtask(self.func, self.before, self.after, data) + tasks = self.tasks.split() + for task in tasks: + bb.build.addtask(task, self.before, self.after, data) class DelTaskNode(AstNode): def __init__(self, filename, lineno, tasks): @@ -348,21 +350,11 @@ def handlePythonMethod(statements, filename, lineno, funcname, modulename, body) def handleExportFuncs(statements, filename, lineno, m, classname): statements.append(ExportFuncsNode(filename, lineno, m.group(1), classname)) -def handleAddTask(statements, filename, lineno, m): - func = m.group("func") - before = m.group("before") - after = m.group("after") - if func is None: - return - - statements.append(AddTaskNode(filename, lineno, func, before, after)) +def handleAddTask(statements, filename, lineno, tasks, before, after): + statements.append(AddTaskNode(filename, lineno, tasks, before, after)) -def handleDelTask(statements, filename, lineno, m): - func = m.group(1) - if func is None: - return - - statements.append(DelTaskNode(filename, lineno, func)) +def handleDelTask(statements, filename, lineno, tasks): + statements.append(DelTaskNode(filename, lineno, tasks)) def handleBBHandlers(statements, filename, lineno, m): statements.append(BBHandlerNode(filename, lineno, m.group(1))) @@ -391,14 +383,6 @@ def finalize(fn, d, variant = None): if d.getVar("_FAILPARSINGERRORHANDLED", False) == True: raise bb.BBHandledException() - while True: - inherits = d.getVar('__BBDEFINHERITS', False) or [] - if not inherits: - break - inherit, filename, lineno = inherits.pop(0) - d.setVar('__BBDEFINHERITS', inherits) - bb.parse.BBHandler.inherit(inherit, filename, lineno, d, deferred=True) - for var in d.getVar('__BBHANDLERS', False) or []: # try to add the handler handlerfn = d.getVarFlag(var, "filename", False) @@ -452,6 +436,14 @@ def multi_finalize(fn, d): logger.debug("Appending .bbappend file %s to %s", append, fn) bb.parse.BBHandler.handle(append, d, True) + while True: + inherits = d.getVar('__BBDEFINHERITS', False) or [] + if not inherits: + break + inherit, filename, lineno = inherits.pop(0) + d.setVar('__BBDEFINHERITS', inherits) + bb.parse.BBHandler.inherit(inherit, filename, lineno, d, deferred=True) + onlyfinalise = d.getVar("__ONLYFINALISE", False) safe_d = d @@ -487,9 +479,7 @@ def extendfunc(name, d): d.setVar("BBEXTENDVARIANT", variantmap[name]) else: d.setVar("PN", "%s-%s" % (pn, name)) - inherits = d.getVar('__BBDEFINHERITS', False) or [] - inherits.append((extendedmap[name], fn, 0)) - d.setVar('__BBDEFINHERITS', inherits) + bb.parse.BBHandler.inherit(extendedmap[name], fn, 0, d) safe_d.setVar("BBCLASSEXTEND", extended) _create_variants(datastores, extendedmap.keys(), extendfunc, onlyfinalise) diff --git a/sources/poky/bitbake/lib/bb/parse/parse_py/BBHandler.py b/sources/poky/bitbake/lib/bb/parse/parse_py/BBHandler.py index c13e4b97..4bdb1199 100644 --- a/sources/poky/bitbake/lib/bb/parse/parse_py/BBHandler.py +++ b/sources/poky/bitbake/lib/bb/parse/parse_py/BBHandler.py @@ -23,8 +23,8 @@ class for handling .bb files __inherit_regexp__ = re.compile(r"inherit\s+(.+)" ) __inherit_def_regexp__ = re.compile(r"inherit_defer\s+(.+)" ) __export_func_regexp__ = re.compile(r"EXPORT_FUNCTIONS\s+(.+)" ) -__addtask_regexp__ = re.compile(r"addtask\s+(?P\w+)\s*((before\s*(?P((.*(?=after))|(.*))))|(after\s*(?P((.*(?=before))|(.*)))))*") -__deltask_regexp__ = re.compile(r"deltask\s+(.+)") +__addtask_regexp__ = re.compile(r"addtask\s+([^#\n]+)(?P#.*|.*?)") +__deltask_regexp__ = re.compile(r"deltask\s+([^#\n]+)(?P#.*|.*?)") __addhandler_regexp__ = re.compile(r"addhandler\s+(.+)" ) __def_regexp__ = re.compile(r"def\s+(\w+).*:" ) __python_func_regexp__ = re.compile(r"(\s+.*)|(^$)|(^#)" ) @@ -239,29 +239,38 @@ def feeder(lineno, s, fn, root, statements, eof=False): m = __addtask_regexp__.match(s) if m: - if len(m.group().split()) == 2: - # Check and warn for "addtask task1 task2" - m2 = re.match(r"addtask\s+(?P\w+)(?P.*)", s) - if m2 and m2.group('ignores'): - logger.warning('addtask ignored: "%s"' % m2.group('ignores')) - - # Check and warn for "addtask task1 before task2 before task3", the - # similar to "after" - taskexpression = s.split() - for word in ('before', 'after'): - if taskexpression.count(word) > 1: - logger.warning("addtask contained multiple '%s' keywords, only one is supported" % word) + after = "" + before = "" + + # This code splits on 'before' and 'after' instead of on whitespace so we can defer + # evaluation to as late as possible. + tasks = m.group(1).split(" before ")[0].split(" after ")[0] + + for exp in m.group(1).split(" before "): + exp2 = exp.split(" after ") + if len(exp2) > 1: + after = after + " ".join(exp2[1:]) - # Check and warn for having task with exprssion as part of task name + for exp in m.group(1).split(" after "): + exp2 = exp.split(" before ") + if len(exp2) > 1: + before = before + " ".join(exp2[1:]) + + # Check and warn for having task with a keyword as part of task name + taskexpression = s.split() for te in taskexpression: if any( ( "%s_" % keyword ) in te for keyword in bb.data_smart.__setvar_keyword__ ): raise ParseError("Task name '%s' contains a keyword which is not recommended/supported.\nPlease rename the task not to include the keyword.\n%s" % (te, ("\n".join(map(str, bb.data_smart.__setvar_keyword__)))), fn) - ast.handleAddTask(statements, fn, lineno, m) + + if tasks is not None: + ast.handleAddTask(statements, fn, lineno, tasks, before, after) return m = __deltask_regexp__.match(s) if m: - ast.handleDelTask(statements, fn, lineno, m) + task = m.group(1) + if task is not None: + ast.handleDelTask(statements, fn, lineno, task) return m = __addhandler_regexp__.match(s) diff --git a/sources/poky/bitbake/lib/bb/runqueue.py b/sources/poky/bitbake/lib/bb/runqueue.py index db68f97e..7f95140c 100644 --- a/sources/poky/bitbake/lib/bb/runqueue.py +++ b/sources/poky/bitbake/lib/bb/runqueue.py @@ -729,8 +729,6 @@ def add_mc_dependencies(mc, tid): if mc == frommc: fn = taskData[mcdep].build_targets[pn][0] newdep = '%s:%s' % (fn,deptask) - if newdep not in taskData[mcdep].taskentries: - bb.fatal("Task mcdepends on non-existent task %s" % (newdep)) taskData[mc].taskentries[tid].tdepends.append(newdep) for mc in taskData: @@ -2560,9 +2558,6 @@ def process_possible_migrations(self): self.rqdata.runtaskentries[hashtid].unihash = unihash bb.parse.siggen.set_unihash(hashtid, unihash) toprocess.add(hashtid) - if torehash: - # Need to save after set_unihash above - bb.parse.siggen.save_unitaskhashes() # Work out all tasks which depend upon these total = set() diff --git a/sources/poky/bitbake/lib/bb/siggen.py b/sources/poky/bitbake/lib/bb/siggen.py index 65ca0811..a6163b55 100644 --- a/sources/poky/bitbake/lib/bb/siggen.py +++ b/sources/poky/bitbake/lib/bb/siggen.py @@ -201,9 +201,6 @@ def set_taskhashes(self, hashes): def save_unitaskhashes(self): return - def copy_unitaskhashes(self, targetdir): - return - def set_setscene_tasks(self, setscene_tasks): return @@ -418,9 +415,6 @@ def writeout_file_checksum_cache(self): def save_unitaskhashes(self): self.unihash_cache.save(self.unitaskhashes) - def copy_unitaskhashes(self, targetdir): - self.unihash_cache.copyfile(targetdir) - def dump_sigtask(self, mcfn, task, stampbase, runtime): tid = mcfn + ":" + task mc = bb.runqueue.mc_from_tid(mcfn) @@ -540,7 +534,7 @@ class SignatureGeneratorUniHashMixIn(object): def __init__(self, data): self.extramethod = {} # NOTE: The cache only tracks hashes that exist. Hashes that don't - # exist are always queries from the server since it is possible for + # exist are always queried from the server since it is possible for # hashes to appear over time, but much less likely for them to # disappear self.unihash_exists_cache = set() @@ -558,11 +552,11 @@ def __init__(self, data): super().__init__(data) def get_taskdata(self): - return (self.server, self.method, self.extramethod, self.max_parallel, self.username, self.password, self.env) + super().get_taskdata() + return (self.server, self.method, self.extramethod, self.username, self.password, self.env) + super().get_taskdata() def set_taskdata(self, data): - self.server, self.method, self.extramethod, self.max_parallel, self.username, self.password, self.env = data[:7] - super().set_taskdata(data[7:]) + self.server, self.method, self.extramethod, self.username, self.password, self.env = data[:6] + super().set_taskdata(data[6:]) def get_hashserv_creds(self): if self.username and self.password: @@ -595,13 +589,6 @@ def client(self): self._client = hashserv.create_client(self.server, **self.get_hashserv_creds()) yield self._client - @contextmanager - def client_pool(self): - with self._client_env(): - if getattr(self, '_client_pool', None) is None: - self._client_pool = hashserv.client.ClientPool(self.server, self.max_parallel, **self.get_hashserv_creds()) - yield self._client_pool - def reset(self, data): self.__close_clients() return super().reset(data) @@ -678,25 +665,20 @@ def unihashes_exist(self, query): if len(query) == 0: return {} - uncached_query = {} + query_keys = [] result = {} for key, unihash in query.items(): if unihash in self.unihash_exists_cache: result[key] = True else: - uncached_query[key] = unihash + query_keys.append(key) - if self.max_parallel <= 1 or len(uncached_query) <= 1: - # No parallelism required. Make the query serially with the single client + if query_keys: with self.client() as client: - uncached_result = { - key: client.unihash_exists(value) for key, value in uncached_query.items() - } - else: - with self.client_pool() as client_pool: - uncached_result = client_pool.unihashes_exist(uncached_query) + query_result = client.unihash_exists_batch(query[k] for k in query_keys) - for key, exists in uncached_result.items(): + for idx, key in enumerate(query_keys): + exists = query_result[idx] if exists: self.unihash_exists_cache.add(query[key]) result[key] = exists @@ -712,32 +694,24 @@ def get_unihashes(self, tids): unihash """ result = {} - queries = {} - query_result = {} + query_tids = [] for tid in tids: unihash = self.get_cached_unihash(tid) if unihash: result[tid] = unihash else: - queries[tid] = (self._get_method(tid), self.taskhash[tid]) + query_tids.append(tid) - if len(queries) == 0: - return result - - if self.max_parallel <= 1 or len(queries) <= 1: - # No parallelism required. Make the query using a single client - with self.client() as client: - keys = list(queries.keys()) - unihashes = client.get_unihash_batch(queries[k] for k in keys) - - for idx, k in enumerate(keys): - query_result[k] = unihashes[idx] - else: - with self.client_pool() as client_pool: - query_result = client_pool.get_unihashes(queries) + if query_tids: + unihashes = [] + try: + with self.client() as client: + unihashes = client.get_unihash_batch((self._get_method(tid), self.taskhash[tid]) for tid in query_tids) + except (ConnectionError, FileNotFoundError) as e: + bb.warn('Error contacting Hash Equivalence Server %s: %s' % (self.server, str(e))) - for tid, unihash in query_result.items(): + for idx, tid in enumerate(query_tids): # In the absence of being able to discover a unique hash from the # server, make it be equivalent to the taskhash. The unique "hash" only # really needs to be a unique string (not even necessarily a hash), but @@ -752,7 +726,9 @@ def get_unihashes(self, tids): # to the server, there is a better chance that they will agree on # the unique hash. taskhash = self.taskhash[tid] - if unihash: + + if unihashes and unihashes[idx]: + unihash = unihashes[idx] # A unique hash equal to the taskhash is not very interesting, # so it is reported it at debug level 2. If they differ, that # is much more interesting, so it is reported at debug level 1 @@ -761,7 +737,6 @@ def get_unihashes(self, tids): hashequiv_logger.debug2('No reported unihash for %s:%s from %s' % (tid, taskhash, self.server)) unihash = taskhash - self.set_unihash(tid, unihash) self.unihash[tid] = unihash result[tid] = unihash @@ -842,7 +817,7 @@ def report_unihash(self, path, task, d): d.setVar('BB_UNIHASH', new_unihash) else: hashequiv_logger.debug('Reported task %s as unihash %s to %s' % (taskhash, unihash, self.server)) - except ConnectionError as e: + except (ConnectionError, FileNotFoundError) as e: bb.warn('Error contacting Hash Equivalence Server %s: %s' % (self.server, str(e))) finally: if sigfile: @@ -884,7 +859,7 @@ def report_unihash_equiv(self, tid, taskhash, wanted_unihash, current_unihash, d # TODO: What to do here? hashequiv_logger.verbose('Task %s unihash reported as unwanted hash %s' % (tid, finalunihash)) - except ConnectionError as e: + except (ConnectionError, FileNotFoundError) as e: bb.warn('Error contacting Hash Equivalence Server %s: %s' % (self.server, str(e))) return False @@ -898,13 +873,12 @@ def init_rundepcheck(self, data): super().init_rundepcheck(data) self.server = data.getVar('BB_HASHSERVE') self.method = "sstate_output_hash" - self.max_parallel = 1 def clean_checksum_file_path(file_checksum_tuple): f, cs = file_checksum_tuple if "/./" in f: return "./" + f.split("/./")[1] - return f + return os.path.basename(f) def dump_this_task(outfile, d): import bb.parse diff --git a/sources/poky/bitbake/lib/bb/tests/codeparser.py b/sources/poky/bitbake/lib/bb/tests/codeparser.py index f6585fb3..c0d1362a 100644 --- a/sources/poky/bitbake/lib/bb/tests/codeparser.py +++ b/sources/poky/bitbake/lib/bb/tests/codeparser.py @@ -106,6 +106,46 @@ def test_assign_subshell_expansion(self): self.parseExpression("foo=$(echo bar)") self.assertExecs(set(["echo"])) + def test_assign_subshell_expansion_quotes(self): + self.parseExpression('foo="$(echo bar)"') + self.assertExecs(set(["echo"])) + + def test_assign_subshell_expansion_nested(self): + self.parseExpression('foo="$(func1 "$(func2 bar$(func3))")"') + self.assertExecs(set(["func1", "func2", "func3"])) + + def test_assign_subshell_expansion_multiple(self): + self.parseExpression('foo="$(func1 "$(func2)") $(func3)"') + self.assertExecs(set(["func1", "func2", "func3"])) + + def test_assign_subshell_expansion_escaped_quotes(self): + self.parseExpression('foo="\\"fo\\"o$(func1)"') + self.assertExecs(set(["func1"])) + + def test_assign_subshell_expansion_empty(self): + self.parseExpression('foo="bar$()foo"') + self.assertExecs(set()) + + def test_assign_subshell_backticks(self): + self.parseExpression("foo=`echo bar`") + self.assertExecs(set(["echo"])) + + def test_assign_subshell_backticks_quotes(self): + self.parseExpression('foo="`echo bar`"') + self.assertExecs(set(["echo"])) + + def test_assign_subshell_backticks_multiple(self): + self.parseExpression('foo="`func1 bar` `func2`"') + self.assertExecs(set(["func1", "func2"])) + + def test_assign_subshell_backticks_escaped_quotes(self): + self.parseExpression('foo="\\"fo\\"o`func1`"') + self.assertExecs(set(["func1"])) + + def test_assign_subshell_backticks_empty(self): + self.parseExpression('foo="bar``foo"') + self.assertExecs(set()) + def test_shell_unexpanded(self): self.setEmptyVars(["QT_BASE_NAME"]) self.parseExpression('echo "${QT_BASE_NAME}"') diff --git a/sources/poky/bitbake/lib/bb/tests/fetch.py b/sources/poky/bitbake/lib/bb/tests/fetch.py index b57cf511..68b2dbba 100644 --- a/sources/poky/bitbake/lib/bb/tests/fetch.py +++ b/sources/poky/bitbake/lib/bb/tests/fetch.py @@ -511,7 +511,8 @@ class MirrorUriTest(FetcherTest): mirrorvar = "http://.*/.* file:///somepath/downloads/ " \ "git://someserver.org/bitbake git://git.openembedded.org/bitbake " \ "https://.*/.* file:///someotherpath/downloads/ " \ - "http://.*/.* file:///someotherpath/downloads/" + "http://.*/.* file:///someotherpath/downloads/ " \ + "svn://svn.server1.com/ svn://svn.server2.com/" def test_urireplace(self): self.d.setVar("FILESPATH", ".") @@ -535,6 +536,13 @@ def test_urilist2(self): uris, uds = bb.fetch2.build_mirroruris(fetcher, mirrors, self.d) self.assertEqual(uris, ['file:///someotherpath/downloads/bitbake-1.0.tar.gz']) + def test_urilistsvn(self): + # Catch svn:// -> svn:// bug + fetcher = bb.fetch.FetchData("svn://svn.server1.com/isource/svnroot/reponame/tags/tagname;module=path_in_tagnamefolder;protocol=https;rev=2", self.d) + mirrors = bb.fetch2.mirror_from_string(self.mirrorvar) + uris, uds = bb.fetch2.build_mirroruris(fetcher, mirrors, self.d) + self.assertEqual(uris, ['svn://svn.server2.com/isource/svnroot/reponame/tags/tagname;module=path_in_tagnamefolder;protocol=https;rev=2']) + def test_mirror_of_mirror(self): # Test if mirror of a mirror works mirrorvar = self.mirrorvar + " http://.*/.* http://otherdownloads.yoctoproject.org/downloads/" @@ -1421,7 +1429,7 @@ class FetchLatestVersionTest(FetcherTest): # combination version pattern ("sysprof", "git://git.yoctoproject.org/sysprof.git;protocol=https;branch=master", "cd44ee6644c3641507fb53b8a2a69137f2971219", "", "") : "1.2.0", - ("u-boot-mkimage", "git://git.yoctoproject.org/bbfetchtests-u-boot.git;branch=master;protocol=https", "62c175fbb8a0f9a926c88294ea9f7e88eb898f6c", "", "") + ("u-boot-mkimage", "git://source.denx.de/u-boot/u-boot.git;branch=master;protocol=https", "62c175fbb8a0f9a926c88294ea9f7e88eb898f6c", "", "") : "2014.01", # version pattern "yyyymmdd" ("mobile-broadband-provider-info", "git://git.yoctoproject.org/mobile-broadband-provider-info.git;protocol=https;branch=master", "4ed19e11c2975105b71b956440acdb25d46a347d", "", "") @@ -1493,6 +1501,12 @@ class FetchLatestVersionTest(FetcherTest): : "2.8", } + test_crate_uris = { + # basic example; version pattern "A.B.C+cargo-D.E.F" + ("cargo-c", "crate://crates.io/cargo-c/0.9.18+cargo-0.69") + : "0.9.29" + } + @skipIfNoNetwork() def test_git_latest_versionstring(self): for k, v in self.test_git_uris.items(): @@ -1532,6 +1546,16 @@ def test_wget_latest_versionstring(self): finally: server.stop() + @skipIfNoNetwork() + def test_crate_latest_versionstring(self): + for k, v in self.test_crate_uris.items(): + self.d.setVar("PN", k[0]) + ud = bb.fetch2.FetchData(k[1], self.d) + pupver = ud.method.latest_versionstring(ud, self.d) + verstring = pupver[0] + self.assertTrue(verstring, msg="Could not find upstream version for %s" % k[0]) + r = bb.utils.vercmp_string(v, verstring) + self.assertTrue(r == -1 or r == 0, msg="Package %s, version: %s <= %s" % (k[0], v, verstring)) class FetchCheckStatusTest(FetcherTest): test_wget_uris = ["https://downloads.yoctoproject.org/releases/sato/sato-engine-0.1.tar.gz", @@ -2012,9 +2036,9 @@ def test_shallow_multi_one_uri(self): self.add_empty_file('b') self.git('checkout -b a_branch', cwd=self.srcdir) self.add_empty_file('c') + self.git('tag v0.0 HEAD', cwd=self.srcdir) self.add_empty_file('d') self.git('checkout master', cwd=self.srcdir) - self.git('tag v0.0 a_branch', cwd=self.srcdir) self.add_empty_file('e') self.git('merge --no-ff --no-edit a_branch', cwd=self.srcdir) self.add_empty_file('f') @@ -2030,7 +2054,7 @@ def test_shallow_multi_one_uri(self): self.fetch_shallow(uri) - self.assertRevCount(5) + self.assertRevCount(4) self.assertRefs(['master', 'origin/master', 'origin/a_branch']) def test_shallow_multi_one_uri_depths(self): @@ -2177,7 +2201,7 @@ def test_shallow_remove_revs(self): self.fetch_shallow() - self.assertRevCount(5) + self.assertRevCount(2) def test_shallow_invalid_revs(self): self.add_empty_file('a') @@ -2196,7 +2220,10 @@ def test_shallow_fetch_missing_revs(self): self.git('tag v0.0 master', cwd=self.srcdir) self.d.setVar('BB_GIT_SHALLOW_DEPTH', '0') self.d.setVar('BB_GIT_SHALLOW_REVS', 'v0.0') - self.fetch_shallow() + + with self.assertRaises(bb.fetch2.FetchError), self.assertLogs("BitBake.Fetcher", level="ERROR") as cm: + self.fetch_shallow() + self.assertIn("fatal: no commits selected for shallow requests", cm.output[0]) def test_shallow_fetch_missing_revs_fails(self): self.add_empty_file('a') @@ -2227,7 +2254,7 @@ def test_bitbake(self): revs = len(self.git('rev-list master').splitlines()) self.assertNotEqual(orig_revs, revs) self.assertRefs(['master', 'origin/master']) - self.assertRevCount(orig_revs - 1758) + self.assertRevCount(orig_revs - 1760) def test_that_unpack_throws_an_error_when_the_git_clone_nor_shallow_tarball_exist(self): self.add_empty_file('a') @@ -3365,3 +3392,212 @@ def test_mirror_broken_download(self): fetcher.download() output = "".join(logs.output) self.assertFalse(" not a git repository (or any parent up to mount point /)" in output) + +class GoModTest(FetcherTest): + + @skipIfNoNetwork() + def test_gomod_url(self): + urls = ['gomod://github.com/Azure/azure-sdk-for-go/sdk/storage/azblob;version=v1.0.0;' + 'sha256sum=9bb69aea32f1d59711701f9562d66432c9c0374205e5009d1d1a62f03fb4fdad'] + + fetcher = bb.fetch2.Fetch(urls, self.d) + ud = fetcher.ud[urls[0]] + self.assertEqual(ud.url, 'https://proxy.golang.org/github.com/%21azure/azure-sdk-for-go/sdk/storage/azblob/%40v/v1.0.0.zip') + self.assertNotIn('name', ud.parm) + + fetcher.download() + fetcher.unpack(self.unpackdir) + downloaddir = os.path.join(self.unpackdir, 'pkg/mod/cache/download') + self.assertTrue(os.path.exists(os.path.join(downloaddir, 'github.com/!azure/azure-sdk-for-go/sdk/storage/azblob/@v/v1.0.0.zip'))) + self.assertTrue(os.path.exists(os.path.join(downloaddir, 'github.com/!azure/azure-sdk-for-go/sdk/storage/azblob/@v/v1.0.0.mod'))) + self.assertEqual(bb.utils.sha256_file(os.path.join(downloaddir, 'github.com/!azure/azure-sdk-for-go/sdk/storage/azblob/@v/v1.0.0.mod')), + '7873b8544842329b4f385a3aa6cf82cc2bc8defb41a04fa5291c35fd5900e873') + + @skipIfNoNetwork() + def test_gomod_url_go_mod_only(self): + urls = ['gomod://github.com/Azure/azure-sdk-for-go/sdk/storage/azblob;version=v1.0.0;mod=1;' + 'sha256sum=7873b8544842329b4f385a3aa6cf82cc2bc8defb41a04fa5291c35fd5900e873'] + + fetcher = bb.fetch2.Fetch(urls, self.d) + ud = fetcher.ud[urls[0]] + self.assertEqual(ud.url, 'https://proxy.golang.org/github.com/%21azure/azure-sdk-for-go/sdk/storage/azblob/%40v/v1.0.0.mod') + self.assertNotIn('name', ud.parm) + + fetcher.download() + fetcher.unpack(self.unpackdir) + downloaddir = os.path.join(self.unpackdir, 'pkg/mod/cache/download') + self.assertTrue(os.path.exists(os.path.join(downloaddir, 'github.com/!azure/azure-sdk-for-go/sdk/storage/azblob/@v/v1.0.0.mod'))) + + @skipIfNoNetwork() + def test_gomod_url_sha256sum_varflag(self): + urls = ['gomod://gopkg.in/ini.v1;version=v1.67.0'] + self.d.setVarFlag('SRC_URI', 'gopkg.in/ini.v1@v1.67.0.sha256sum', 'bd845dfc762a87a56e5a32a07770dc83e86976db7705d7f89c5dbafdc60b06c6') + + fetcher = bb.fetch2.Fetch(urls, self.d) + ud = fetcher.ud[urls[0]] + self.assertEqual(ud.url, 'https://proxy.golang.org/gopkg.in/ini.v1/%40v/v1.67.0.zip') + self.assertEqual(ud.parm['name'], 'gopkg.in/ini.v1@v1.67.0') + + fetcher.download() + fetcher.unpack(self.unpackdir) + downloaddir = os.path.join(self.unpackdir, 'pkg/mod/cache/download') + self.assertTrue(os.path.exists(os.path.join(downloaddir, 'gopkg.in/ini.v1/@v/v1.67.0.zip'))) + self.assertTrue(os.path.exists(os.path.join(downloaddir, 'gopkg.in/ini.v1/@v/v1.67.0.mod'))) + self.assertEqual(bb.utils.sha256_file(os.path.join(downloaddir, 'gopkg.in/ini.v1/@v/v1.67.0.mod')), + '13aedd85db8e555104108e0e613bb7e4d1242af7f27c15423dd9ab63b60b72a1') + + @skipIfNoNetwork() + def test_gomod_url_no_go_mod_in_module(self): + urls = ['gomod://gopkg.in/ini.v1;version=v1.67.0;' + 'sha256sum=bd845dfc762a87a56e5a32a07770dc83e86976db7705d7f89c5dbafdc60b06c6'] + + fetcher = bb.fetch2.Fetch(urls, self.d) + ud = fetcher.ud[urls[0]] + self.assertEqual(ud.url, 'https://proxy.golang.org/gopkg.in/ini.v1/%40v/v1.67.0.zip') + self.assertNotIn('name', ud.parm) + + fetcher.download() + fetcher.unpack(self.unpackdir) + downloaddir = os.path.join(self.unpackdir, 'pkg/mod/cache/download') + self.assertTrue(os.path.exists(os.path.join(downloaddir, 'gopkg.in/ini.v1/@v/v1.67.0.zip'))) + self.assertTrue(os.path.exists(os.path.join(downloaddir, 'gopkg.in/ini.v1/@v/v1.67.0.mod'))) + self.assertEqual(bb.utils.sha256_file(os.path.join(downloaddir, 'gopkg.in/ini.v1/@v/v1.67.0.mod')), + '13aedd85db8e555104108e0e613bb7e4d1242af7f27c15423dd9ab63b60b72a1') + + @skipIfNoNetwork() + def test_gomod_url_host_only(self): + urls = ['gomod://go.opencensus.io;version=v0.24.0;' + 'sha256sum=203a767d7f8e7c1ebe5588220ad168d1e15b14ae70a636de7ca9a4a88a7e0d0c'] + + fetcher = bb.fetch2.Fetch(urls, self.d) + ud = fetcher.ud[urls[0]] + self.assertEqual(ud.url, 'https://proxy.golang.org/go.opencensus.io/%40v/v0.24.0.zip') + self.assertNotIn('name', ud.parm) + + fetcher.download() + fetcher.unpack(self.unpackdir) + downloaddir = os.path.join(self.unpackdir, 'pkg/mod/cache/download') + self.assertTrue(os.path.exists(os.path.join(downloaddir, 'go.opencensus.io/@v/v0.24.0.zip'))) + self.assertTrue(os.path.exists(os.path.join(downloaddir, 'go.opencensus.io/@v/v0.24.0.mod'))) + self.assertEqual(bb.utils.sha256_file(os.path.join(downloaddir, 'go.opencensus.io/@v/v0.24.0.mod')), + '0dc9ccc660ad21cebaffd548f2cc6efa27891c68b4fbc1f8a3893b00f1acec96') + +class GoModGitTest(FetcherTest): + + @skipIfNoNetwork() + def test_gomodgit_url_repo(self): + urls = ['gomodgit://golang.org/x/net;version=v0.9.0;' + 'repo=go.googlesource.com/net;' + 'srcrev=694cff8668bac64e0864b552bffc280cd27f21b1'] + + fetcher = bb.fetch2.Fetch(urls, self.d) + ud = fetcher.ud[urls[0]] + self.assertEqual(ud.host, 'go.googlesource.com') + self.assertEqual(ud.path, '/net') + self.assertEqual(ud.names, ['golang.org/x/net@v0.9.0']) + self.assertEqual(self.d.getVar('SRCREV_golang.org/x/net@v0.9.0'), '694cff8668bac64e0864b552bffc280cd27f21b1') + + fetcher.download() + self.assertTrue(os.path.exists(ud.localpath)) + + fetcher.unpack(self.unpackdir) + vcsdir = os.path.join(self.unpackdir, 'pkg/mod/cache/vcs') + self.assertTrue(os.path.exists(os.path.join(vcsdir, 'ed42bd05533fd84ae290a5d33ebd3695a0a2b06131beebd5450825bee8603aca'))) + downloaddir = os.path.join(self.unpackdir, 'pkg/mod/cache/download') + self.assertTrue(os.path.exists(os.path.join(downloaddir, 'golang.org/x/net/@v/v0.9.0.zip'))) + self.assertTrue(os.path.exists(os.path.join(downloaddir, 'golang.org/x/net/@v/v0.9.0.mod'))) + self.assertEqual(bb.utils.sha256_file(os.path.join(downloaddir, 'golang.org/x/net/@v/v0.9.0.mod')), + 'c5d6851ede50ec1c001afb763040194b68961bf06997e2605e8bf06dcd2aeb2e') + + @skipIfNoNetwork() + def test_gomodgit_url_subdir(self): + urls = ['gomodgit://github.com/Azure/azure-sdk-for-go/sdk/storage/azblob;version=v1.0.0;' + 'repo=github.com/Azure/azure-sdk-for-go;subdir=sdk/storage/azblob;' + 'srcrev=ec928e0ed34db682b3f783d3739d1c538142e0c3'] + + fetcher = bb.fetch2.Fetch(urls, self.d) + ud = fetcher.ud[urls[0]] + self.assertEqual(ud.host, 'github.com') + self.assertEqual(ud.path, '/Azure/azure-sdk-for-go') + self.assertEqual(ud.parm['subpath'], 'sdk/storage/azblob') + self.assertEqual(ud.names, ['github.com/Azure/azure-sdk-for-go/sdk/storage/azblob@v1.0.0']) + self.assertEqual(self.d.getVar('SRCREV_github.com/Azure/azure-sdk-for-go/sdk/storage/azblob@v1.0.0'), 'ec928e0ed34db682b3f783d3739d1c538142e0c3') + + fetcher.download() + self.assertTrue(os.path.exists(ud.localpath)) + + fetcher.unpack(self.unpackdir) + vcsdir = os.path.join(self.unpackdir, 'pkg/mod/cache/vcs') + self.assertTrue(os.path.exists(os.path.join(vcsdir, 'd31d6145676ed3066ce573a8198f326dea5be45a43b3d8f41ce7787fd71d66b3'))) + downloaddir = os.path.join(self.unpackdir, 'pkg/mod/cache/download') + self.assertTrue(os.path.exists(os.path.join(downloaddir, 'github.com/!azure/azure-sdk-for-go/sdk/storage/azblob/@v/v1.0.0.zip'))) + self.assertTrue(os.path.exists(os.path.join(downloaddir, 'github.com/!azure/azure-sdk-for-go/sdk/storage/azblob/@v/v1.0.0.mod'))) + self.assertEqual(bb.utils.sha256_file(os.path.join(downloaddir, 'github.com/!azure/azure-sdk-for-go/sdk/storage/azblob/@v/v1.0.0.mod')), + '7873b8544842329b4f385a3aa6cf82cc2bc8defb41a04fa5291c35fd5900e873') + + @skipIfNoNetwork() + def test_gomodgit_url_srcrev_var(self): + urls = ['gomodgit://gopkg.in/ini.v1;version=v1.67.0'] + self.d.setVar('SRCREV_gopkg.in/ini.v1@v1.67.0', 'b2f570e5b5b844226bbefe6fb521d891f529a951') + + fetcher = bb.fetch2.Fetch(urls, self.d) + ud = fetcher.ud[urls[0]] + self.assertEqual(ud.host, 'gopkg.in') + self.assertEqual(ud.path, '/ini.v1') + self.assertEqual(ud.names, ['gopkg.in/ini.v1@v1.67.0']) + self.assertEqual(ud.parm['srcrev'], 'b2f570e5b5b844226bbefe6fb521d891f529a951') + + fetcher.download() + fetcher.unpack(self.unpackdir) + vcsdir = os.path.join(self.unpackdir, 'pkg/mod/cache/vcs') + self.assertTrue(os.path.exists(os.path.join(vcsdir, 'b7879a4be9ba8598851b8278b14c4f71a8316be64913298d1639cce6bde59bc3'))) + downloaddir = os.path.join(self.unpackdir, 'pkg/mod/cache/download') + self.assertTrue(os.path.exists(os.path.join(downloaddir, 'gopkg.in/ini.v1/@v/v1.67.0.zip'))) + self.assertTrue(os.path.exists(os.path.join(downloaddir, 'gopkg.in/ini.v1/@v/v1.67.0.mod'))) + self.assertEqual(bb.utils.sha256_file(os.path.join(downloaddir, 'gopkg.in/ini.v1/@v/v1.67.0.mod')), + '13aedd85db8e555104108e0e613bb7e4d1242af7f27c15423dd9ab63b60b72a1') + + @skipIfNoNetwork() + def test_gomodgit_url_no_go_mod_in_module(self): + urls = ['gomodgit://gopkg.in/ini.v1;version=v1.67.0;' + 'srcrev=b2f570e5b5b844226bbefe6fb521d891f529a951'] + + fetcher = bb.fetch2.Fetch(urls, self.d) + ud = fetcher.ud[urls[0]] + self.assertEqual(ud.host, 'gopkg.in') + self.assertEqual(ud.path, '/ini.v1') + self.assertEqual(ud.names, ['gopkg.in/ini.v1@v1.67.0']) + self.assertEqual(self.d.getVar('SRCREV_gopkg.in/ini.v1@v1.67.0'), 'b2f570e5b5b844226bbefe6fb521d891f529a951') + + fetcher.download() + fetcher.unpack(self.unpackdir) + vcsdir = os.path.join(self.unpackdir, 'pkg/mod/cache/vcs') + self.assertTrue(os.path.exists(os.path.join(vcsdir, 'b7879a4be9ba8598851b8278b14c4f71a8316be64913298d1639cce6bde59bc3'))) + downloaddir = os.path.join(self.unpackdir, 'pkg/mod/cache/download') + self.assertTrue(os.path.exists(os.path.join(downloaddir, 'gopkg.in/ini.v1/@v/v1.67.0.zip'))) + self.assertTrue(os.path.exists(os.path.join(downloaddir, 'gopkg.in/ini.v1/@v/v1.67.0.mod'))) + self.assertEqual(bb.utils.sha256_file(os.path.join(downloaddir, 'gopkg.in/ini.v1/@v/v1.67.0.mod')), + '13aedd85db8e555104108e0e613bb7e4d1242af7f27c15423dd9ab63b60b72a1') + + @skipIfNoNetwork() + def test_gomodgit_url_host_only(self): + urls = ['gomodgit://go.opencensus.io;version=v0.24.0;' + 'repo=github.com/census-instrumentation/opencensus-go;' + 'srcrev=b1a01ee95db0e690d91d7193d037447816fae4c5'] + + fetcher = bb.fetch2.Fetch(urls, self.d) + ud = fetcher.ud[urls[0]] + self.assertEqual(ud.host, 'github.com') + self.assertEqual(ud.path, '/census-instrumentation/opencensus-go') + self.assertEqual(ud.names, ['go.opencensus.io@v0.24.0']) + self.assertEqual(self.d.getVar('SRCREV_go.opencensus.io@v0.24.0'), 'b1a01ee95db0e690d91d7193d037447816fae4c5') + + fetcher.download() + fetcher.unpack(self.unpackdir) + vcsdir = os.path.join(self.unpackdir, 'pkg/mod/cache/vcs') + self.assertTrue(os.path.exists(os.path.join(vcsdir, 'aae3ac7b2122ed3345654e6327855e9682f4a5350d63e93dbcfc51c4419df0e1'))) + downloaddir = os.path.join(self.unpackdir, 'pkg/mod/cache/download') + self.assertTrue(os.path.exists(os.path.join(downloaddir, 'go.opencensus.io/@v/v0.24.0.zip'))) + self.assertTrue(os.path.exists(os.path.join(downloaddir, 'go.opencensus.io/@v/v0.24.0.mod'))) + self.assertEqual(bb.utils.sha256_file(os.path.join(downloaddir, 'go.opencensus.io/@v/v0.24.0.mod')), + '0dc9ccc660ad21cebaffd548f2cc6efa27891c68b4fbc1f8a3893b00f1acec96') diff --git a/sources/poky/bitbake/lib/bb/tests/parse.py b/sources/poky/bitbake/lib/bb/tests/parse.py index 72d1962e..410679d5 100644 --- a/sources/poky/bitbake/lib/bb/tests/parse.py +++ b/sources/poky/bitbake/lib/bb/tests/parse.py @@ -177,7 +177,19 @@ def test_parse_classextend_contamination(self): addtask_deltask = """ addtask do_patch after do_foo after do_unpack before do_configure before do_compile -addtask do_fetch do_patch +addtask do_fetch2 do_patch2 + +addtask do_myplaintask +addtask do_myplaintask2 +deltask do_myplaintask2 +addtask do_mytask# comment +addtask do_mytask2 # comment2 +addtask do_mytask3 +deltask do_mytask3# comment +deltask do_mytask4 # comment2 + +# Ensure a missing task prefix on after works +addtask do_mytask5 after mytask MYVAR = "do_patch" EMPTYVAR = "" @@ -185,17 +197,12 @@ def test_parse_classextend_contamination(self): deltask ${EMPTYVAR} """ def test_parse_addtask_deltask(self): - import sys - with self.assertLogs() as logs: - f = self.parsehelper(self.addtask_deltask) - d = bb.parse.handle(f.name, self.d)[''] + f = self.parsehelper(self.addtask_deltask) + d = bb.parse.handle(f.name, self.d)[''] - output = "".join(logs.output) - self.assertTrue("addtask contained multiple 'before' keywords" in output) - self.assertTrue("addtask contained multiple 'after' keywords" in output) - self.assertTrue('addtask ignored: " do_patch"' in output) - #self.assertTrue('dependent task do_foo for do_patch does not exist' in output) + self.assertEqual(['do_fetch2', 'do_patch2', 'do_myplaintask', 'do_mytask', 'do_mytask2', 'do_mytask5'], d.getVar("__BBTASKS")) + self.assertEqual(['do_mytask'], d.getVarFlag("do_mytask5", "deps")) broken_multiline_comment = """ # First line of comment \\ diff --git a/sources/poky/bitbake/lib/bb/tests/runqueue-tests/recipes/g1.bb b/sources/poky/bitbake/lib/bb/tests/runqueue-tests/recipes/g1.bb deleted file mode 100644 index 3c7dca02..00000000 --- a/sources/poky/bitbake/lib/bb/tests/runqueue-tests/recipes/g1.bb +++ /dev/null @@ -1,2 +0,0 @@ -do_build[mcdepends] = "mc::mc-1:h1:do_invalid" - diff --git a/sources/poky/bitbake/lib/bb/tests/runqueue-tests/recipes/h1.bb b/sources/poky/bitbake/lib/bb/tests/runqueue-tests/recipes/h1.bb deleted file mode 100644 index e69de29b..00000000 diff --git a/sources/poky/bitbake/lib/bb/tests/runqueue.py b/sources/poky/bitbake/lib/bb/tests/runqueue.py index 74f5ded2..cc87e8d6 100644 --- a/sources/poky/bitbake/lib/bb/tests/runqueue.py +++ b/sources/poky/bitbake/lib/bb/tests/runqueue.py @@ -26,7 +26,7 @@ class RunQueueTests(unittest.TestCase): a1_sstatevalid = "a1:do_package a1:do_package_qa a1:do_packagedata a1:do_package_write_ipk a1:do_package_write_rpm a1:do_populate_lic a1:do_populate_sysroot" b1_sstatevalid = "b1:do_package b1:do_package_qa b1:do_packagedata b1:do_package_write_ipk b1:do_package_write_rpm b1:do_populate_lic b1:do_populate_sysroot" - def run_bitbakecmd(self, cmd, builddir, sstatevalid="", slowtasks="", extraenv=None, cleanup=False, allowfailure=False): + def run_bitbakecmd(self, cmd, builddir, sstatevalid="", slowtasks="", extraenv=None, cleanup=False): env = os.environ.copy() env["BBPATH"] = os.path.realpath(os.path.join(os.path.dirname(__file__), "runqueue-tests")) env["BB_ENV_PASSTHROUGH_ADDITIONS"] = "SSTATEVALID SLOWTASKS TOPDIR" @@ -41,8 +41,6 @@ def run_bitbakecmd(self, cmd, builddir, sstatevalid="", slowtasks="", extraenv=N output = subprocess.check_output(cmd, env=env, stderr=subprocess.STDOUT,universal_newlines=True, cwd=builddir) print(output) except subprocess.CalledProcessError as e: - if allowfailure: - return e.output self.fail("Command %s failed with %s" % (cmd, e.output)) tasks = [] tasklog = builddir + "/task.log" @@ -316,13 +314,6 @@ def test_multiconfig_mcdepends(self): ["mc_2:a1:%s" % t for t in rerun_tasks] self.assertEqual(set(tasks), set(expected)) - # Check that a multiconfig that doesn't exist rasies a correct error message - error_output = self.run_bitbakecmd(["bitbake", "g1"], tempdir, "", extraenv=extraenv, cleanup=True, allowfailure=True) - self.assertIn("non-existent task", error_output) - # If the word 'Traceback' or 'KeyError' is in the output we've regressed - self.assertNotIn("Traceback", error_output) - self.assertNotIn("KeyError", error_output) - self.shutdown(tempdir) def test_hashserv_single(self): diff --git a/sources/poky/bitbake/lib/bb/ui/buildinfohelper.py b/sources/poky/bitbake/lib/bb/ui/buildinfohelper.py index 8b212b78..4ee45d67 100644 --- a/sources/poky/bitbake/lib/bb/ui/buildinfohelper.py +++ b/sources/poky/bitbake/lib/bb/ui/buildinfohelper.py @@ -559,7 +559,10 @@ def save_target_file_information(self, build_obj, target_obj, filedata): # we might have an invalid link; no way to detect this. just set it to None filetarget_obj = None - parent_obj = Target_File.objects.get(target = target_obj, path = parent_path, inodetype = Target_File.ITYPE_DIRECTORY) + try: + parent_obj = Target_File.objects.get(target = target_obj, path = parent_path, inodetype = Target_File.ITYPE_DIRECTORY) + except Target_File.DoesNotExist: + parent_obj = None Target_File.objects.create( target = target_obj, diff --git a/sources/poky/bitbake/lib/bb/utils.py b/sources/poky/bitbake/lib/bb/utils.py index d2f11e43..67e22f43 100644 --- a/sources/poky/bitbake/lib/bb/utils.py +++ b/sources/poky/bitbake/lib/bb/utils.py @@ -1854,15 +1854,6 @@ def path_is_descendant(descendant, ancestor): return False -# Recomputing the sets in signal.py is expensive (bitbake -pP idle) -# so try and use _signal directly to avoid it -valid_signals = signal.valid_signals() -try: - import _signal - sigmask = _signal.pthread_sigmask -except ImportError: - sigmask = signal.pthread_sigmask - # If we don't have a timeout of some kind and a process/thread exits badly (for example # OOM killed) and held a lock, we'd just hang in the lock futex forever. It is better # we exit at some point than hang. 5 minutes with no progress means we're probably deadlocked. @@ -1872,7 +1863,7 @@ def path_is_descendant(descendant, ancestor): @contextmanager def lock_timeout(lock): try: - s = sigmask(signal.SIG_BLOCK, valid_signals) + s = signal.pthread_sigmask(signal.SIG_BLOCK, signal.valid_signals()) held = lock.acquire(timeout=5*60) if not held: bb.server.process.serverlog("Couldn't get the lock for 5 mins, timed out, exiting.\n%s" % traceback.format_stack()) @@ -1880,16 +1871,16 @@ def lock_timeout(lock): yield held finally: lock.release() - sigmask(signal.SIG_SETMASK, s) + signal.pthread_sigmask(signal.SIG_SETMASK, s) # A version of lock_timeout without the check that the lock was locked and a shorter timeout @contextmanager def lock_timeout_nocheck(lock): try: - s = sigmask(signal.SIG_BLOCK, valid_signals) + s = signal.pthread_sigmask(signal.SIG_BLOCK, signal.valid_signals()) l = lock.acquire(timeout=10) yield l finally: if l: lock.release() - sigmask(signal.SIG_SETMASK, s) + signal.pthread_sigmask(signal.SIG_SETMASK, s) diff --git a/sources/poky/bitbake/lib/bblayers/action.py b/sources/poky/bitbake/lib/bblayers/action.py index a8f26993..a14f1994 100644 --- a/sources/poky/bitbake/lib/bblayers/action.py +++ b/sources/poky/bitbake/lib/bblayers/action.py @@ -50,8 +50,8 @@ def do_add_layer(self, args): try: notadded, _ = bb.utils.edit_bblayers_conf(bblayers_conf, layerdirs, None) - self.tinfoil.modified_files() if not (args.force or notadded): + self.tinfoil.modified_files() try: self.tinfoil.run_command('parseConfiguration') except (bb.tinfoil.TinfoilUIException, bb.BBHandledException): @@ -83,6 +83,8 @@ def do_remove_layer(self, args): layerdir = os.path.abspath(item) layerdirs.append(layerdir) (_, notremoved) = bb.utils.edit_bblayers_conf(bblayers_conf, None, layerdirs) + if args.force > 1: + return 0 self.tinfoil.modified_files() if notremoved: for item in notremoved: diff --git a/sources/poky/bitbake/lib/bs4/AUTHORS b/sources/poky/bitbake/lib/bs4/AUTHORS new file mode 100644 index 00000000..1f14fe07 --- /dev/null +++ b/sources/poky/bitbake/lib/bs4/AUTHORS @@ -0,0 +1,49 @@ +Behold, mortal, the origins of Beautiful Soup... +================================================ + +Leonard Richardson is the primary maintainer. + +Aaron DeVore and Isaac Muse have made significant contributions to the +code base. + +Mark Pilgrim provided the encoding detection code that forms the base +of UnicodeDammit. + +Thomas Kluyver and Ezio Melotti finished the work of getting Beautiful +Soup 4 working under Python 3. + +Simon Willison wrote soupselect, which was used to make Beautiful Soup +support CSS selectors. Isaac Muse wrote SoupSieve, which made it +possible to _remove_ the CSS selector code from Beautiful Soup. + +Sam Ruby helped with a lot of edge cases. + +Jonathan Ellis was awarded the prestigious Beau Potage D'Or for his +work in solving the nestable tags conundrum. + +An incomplete list of people have contributed patches to Beautiful +Soup: + + Istvan Albert, Andrew Lin, Anthony Baxter, Oliver Beattie, Andrew +Boyko, Tony Chang, Francisco Canas, "Delong", Zephyr Fang, Fuzzy, +Roman Gaufman, Yoni Gilad, Richie Hindle, Toshihiro Kamiya, Peteris +Krumins, Kent Johnson, Marek Kapolka, Andreas Kostyrka, Roel Kramer, +Ben Last, Robert Leftwich, Stefaan Lippens, "liquider", Staffan +Malmgren, Ksenia Marasanova, JP Moins, Adam Monsen, John Nagle, "Jon", +Ed Oskiewicz, Martijn Peters, Greg Phillips, Giles Radford, Stefano +Revera, Arthur Rudolph, Marko Samastur, James Salter, Jouni Seppänen, +Alexander Schmolck, Tim Shirley, Geoffrey Sneddon, Ville Skyttä, +"Vikas", Jens Svalgaard, Andy Theyers, Eric Weiser, Glyn Webster, John +Wiseman, Paul Wright, Danny Yoo + +An incomplete list of people who made suggestions or found bugs or +found ways to break Beautiful Soup: + + Hanno Böck, Matteo Bertini, Chris Curvey, Simon Cusack, Bruce Eckel, + Matt Ernst, Michael Foord, Tom Harris, Bill de hOra, Donald Howes, + Matt Patterson, Scott Roberts, Steve Strassmann, Mike Williams, + warchild at redho dot com, Sami Kuisma, Carlos Rocha, Bob Hutchison, + Joren Mc, Michal Migurski, John Kleven, Tim Heaney, Tripp Lilley, Ed + Summers, Dennis Sutch, Chris Smith, Aaron Swartz, Stuart + Turner, Greg Edwards, Kevin J Kalupson, Nikos Kouremenos, Artur de + Sousa Rocha, Yichun Wei, Per Vognsen diff --git a/sources/poky/bitbake/lib/bs4/AUTHORS.txt b/sources/poky/bitbake/lib/bs4/AUTHORS.txt deleted file mode 100644 index 2ac8fcc8..00000000 --- a/sources/poky/bitbake/lib/bs4/AUTHORS.txt +++ /dev/null @@ -1,43 +0,0 @@ -Behold, mortal, the origins of Beautiful Soup... -================================================ - -Leonard Richardson is the primary programmer. - -Aaron DeVore is awesome. - -Mark Pilgrim provided the encoding detection code that forms the base -of UnicodeDammit. - -Thomas Kluyver and Ezio Melotti finished the work of getting Beautiful -Soup 4 working under Python 3. - -Simon Willison wrote soupselect, which was used to make Beautiful Soup -support CSS selectors. - -Sam Ruby helped with a lot of edge cases. - -Jonathan Ellis was awarded the prestigous Beau Potage D'Or for his -work in solving the nestable tags conundrum. - -An incomplete list of people have contributed patches to Beautiful -Soup: - - Istvan Albert, Andrew Lin, Anthony Baxter, Andrew Boyko, Tony Chang, - Zephyr Fang, Fuzzy, Roman Gaufman, Yoni Gilad, Richie Hindle, Peteris - Krumins, Kent Johnson, Ben Last, Robert Leftwich, Staffan Malmgren, - Ksenia Marasanova, JP Moins, Adam Monsen, John Nagle, "Jon", Ed - Oskiewicz, Greg Phillips, Giles Radford, Arthur Rudolph, Marko - Samastur, Jouni Seppänen, Alexander Schmolck, Andy Theyers, Glyn - Webster, Paul Wright, Danny Yoo - -An incomplete list of people who made suggestions or found bugs or -found ways to break Beautiful Soup: - - Hanno Böck, Matteo Bertini, Chris Curvey, Simon Cusack, Bruce Eckel, - Matt Ernst, Michael Foord, Tom Harris, Bill de hOra, Donald Howes, - Matt Patterson, Scott Roberts, Steve Strassmann, Mike Williams, - warchild at redho dot com, Sami Kuisma, Carlos Rocha, Bob Hutchison, - Joren Mc, Michal Migurski, John Kleven, Tim Heaney, Tripp Lilley, Ed - Summers, Dennis Sutch, Chris Smith, Aaron Sweep^W Swartz, Stuart - Turner, Greg Edwards, Kevin J Kalupson, Nikos Kouremenos, Artur de - Sousa Rocha, Yichun Wei, Per Vognsen diff --git a/sources/poky/bitbake/lib/bs4/CHANGELOG b/sources/poky/bitbake/lib/bs4/CHANGELOG new file mode 100644 index 00000000..2701446a --- /dev/null +++ b/sources/poky/bitbake/lib/bs4/CHANGELOG @@ -0,0 +1,1839 @@ += 4.12.3 (20240117) + +* The Beautiful Soup documentation now has a Spanish translation, thanks + to Carlos Romero. Delong Wang's Chinese translation has been updated + to cover Beautiful Soup 4.12.0. + +* Fixed a regression such that if you set .hidden on a tag, the tag + becomes invisible but its contents are still visible. User manipulation + of .hidden is not a documented or supported feature, so don't do this, + but it wasn't too difficult to keep the old behavior working. + +* Fixed a case found by Mengyuhan where html.parser giving up on + markup would result in an AssertionError instead of a + ParserRejectedMarkup exception. + +* Added the correct stacklevel to instances of the XMLParsedAsHTMLWarning. + [bug=2034451] + +* Corrected the syntax of the license definition in pyproject.toml. Patch + by Louis Maddox. [bug=2032848] + +* Corrected a typo in a test that was causing test failures when run against + libxml2 2.12.1. [bug=2045481] + += 4.12.2 (20230407) + +* Fixed an unhandled exception in BeautifulSoup.decode_contents + and methods that call it. [bug=2015545] + += 4.12.1 (20230405) + +NOTE: the following things are likely to be dropped in the next +feature release of Beautiful Soup: + + Official support for Python 3.6. + Inclusion of unit tests and test data in the wheel file. + Two scripts: demonstrate_parser_differences.py and test-all-versions. + +Changes: + +* This version of Beautiful Soup replaces setup.py and setup.cfg + with pyproject.toml. Beautiful Soup now uses tox as its test backend + and hatch to do builds. + +* The main functional improvement in this version is a nonrecursive technique + for regenerating a tree. This technique is used to avoid situations where, + in previous versions, doing something to a very deeply nested tree + would overflow the Python interpreter stack: + + 1. Outputting a tree as a string, e.g. with + BeautifulSoup.encode() [bug=1471755] + + 2. Making copies of trees (copy.copy() and + copy.deepcopy() from the Python standard library). [bug=1709837] + + 3. Pickling a BeautifulSoup object. (Note that pickling a Tag + object can still cause an overflow.) + +* Making a copy of a BeautifulSoup object no longer parses the + document again, which should improve performance significantly. + +* When a BeautifulSoup object is unpickled, Beautiful Soup now + tries to associate an appropriate TreeBuilder object with it. + +* Tag.prettify() will now consistently end prettified markup with + a newline. + +* Added unit tests for fuzz test cases created by third + parties. Some of these tests are skipped since they point + to problems outside of Beautiful Soup, but this change + puts them all in one convenient place. + +* PageElement now implements the known_xml attribute. (This was technically + a bug, but it shouldn't be an issue in normal use.) [bug=2007895] + +* The demonstrate_parser_differences.py script was still written in + Python 2. I've converted it to Python 3, but since no one has + mentioned this over the years, it's a sign that no one uses this + script and it's not serving its purpose. + += 4.12.0 (20230320) + +* Introduced the .css property, which centralizes all access to + the Soup Sieve API. This allows Beautiful Soup to give direct + access to as much of Soup Sieve that makes sense, without cluttering + the BeautifulSoup and Tag classes with a lot of new methods. + + This does mean one addition to the BeautifulSoup and Tag classes + (the .css property itself), so this might be a breaking change if you + happen to use Beautiful Soup to parse XML that includes a tag called + . In particular, code like this will stop working in 4.12.0: + + soup.css['id'] + + Code like this will work just as before: + + soup.find_one('css')['id'] + + The Soup Sieve methods supported through the .css property are + select(), select_one(), iselect(), closest(), match(), filter(), + escape(), and compile(). The BeautifulSoup and Tag classes still + support the select() and select_one() methods; they have not been + deprecated, but they have been demoted to convenience methods. + + [bug=2003677] + +* When the html.parser parser decides it can't parse a document, Beautiful + Soup now consistently propagates this fact by raising a + ParserRejectedMarkup error. [bug=2007343] + +* Removed some error checking code from diagnose(), which is redundant with + similar (but more Pythonic) code in the BeautifulSoup constructor. + [bug=2007344] + +* Added intersphinx references to the documentation so that other + projects have a target to point to when they reference Beautiful + Soup classes. [bug=1453370] + += 4.11.2 (20230131) + +* Fixed test failures caused by nondeterministic behavior of + UnicodeDammit's character detection, depending on the platform setup. + [bug=1973072] + +* Fixed another crash when overriding multi_valued_attributes and using the + html5lib parser. [bug=1948488] + +* The HTMLFormatter and XMLFormatter constructors no longer return a + value. [bug=1992693] + +* Tag.interesting_string_types is now propagated when a tag is + copied. [bug=1990400] + +* Warnings now do their best to provide an appropriate stacklevel, + improving the usefulness of the message. [bug=1978744] + +* Passing a Tag's .contents into PageElement.extend() now works the + same way as passing the Tag itself. + +* Soup Sieve tests will be skipped if the library is not installed. + += 4.11.1 (20220408) + +This release was done to ensure that the unit tests are packaged along +with the released source. There are no functionality changes in this +release, but there are a few other packaging changes: + +* The Japanese and Korean translations of the documentation are included. +* The changelog is now packaged as CHANGELOG, and the license file is + packaged as LICENSE. NEWS.txt and COPYING.txt are still present, + but may be removed in the future. +* TODO.txt is no longer packaged, since a TODO is not relevant for released + code. + += 4.11.0 (20220407) + +* Ported unit tests to use pytest. + +* Added special string classes, RubyParenthesisString and RubyTextString, + to make it possible to treat ruby text specially in get_text() calls. + [bug=1941980] + +* It's now possible to customize the way output is indented by + providing a value for the 'indent' argument to the Formatter + constructor. The 'indent' argument works very similarly to the + argument of the same name in the Python standard library's + json.dump() function. [bug=1955497] + +* If the charset-normalizer Python module + (https://pypi.org/project/charset-normalizer/) is installed, Beautiful + Soup will use it to detect the character sets of incoming documents. + This is also the module used by newer versions of the Requests library. + For the sake of backwards compatibility, chardet and cchardet both take + precedence if installed. [bug=1955346] + +* Added a workaround for an lxml bug + (https://bugs.launchpad.net/lxml/+bug/1948551) that causes + problems when parsing a Unicode string beginning with BYTE ORDER MARK. + [bug=1947768] + +* Issue a warning when an HTML parser is used to parse a document that + looks like XML but not XHTML. [bug=1939121] + +* Do a better job of keeping track of namespaces as an XML document is + parsed, so that CSS selectors that use namespaces will do the right + thing more often. [bug=1946243] + +* Some time ago, the misleadingly named "text" argument to find-type + methods was renamed to the more accurate "string." But this supposed + "renaming" didn't make it into important places like the method + signatures or the docstrings. That's corrected in this + version. "text" still works, but will give a DeprecationWarning. + [bug=1947038] + +* Fixed a crash when pickling a BeautifulSoup object that has no + tree builder. [bug=1934003] + +* Fixed a crash when overriding multi_valued_attributes and using the + html5lib parser. [bug=1948488] + +* Standardized the wording of the MarkupResemblesLocatorWarning + warnings to omit untrusted input and make the warnings less + judgmental about what you ought to be doing. [bug=1955450] + +* Removed support for the iconv_codec library, which doesn't seem + to exist anymore and was never put up on PyPI. (The closest + replacement on PyPI, iconv_codecs, is GPL-licensed, so we can't use + it--it's also quite old.) + += 4.10.0 (20210907) + +* This is the first release of Beautiful Soup to only support Python + 3. I dropped Python 2 support to maintain support for newer versions + (58 and up) of setuptools. See: + https://github.com/pypa/setuptools/issues/2769 [bug=1942919] + +* The behavior of methods like .get_text() and .strings now differs + depending on the type of tag. The change is visible with HTML tags + like - -Hello, world! - - -''' - soup = self.soup(html) - self.assertEqual("text/javascript", soup.find('script')['type']) - - def test_comment(self): - # Comments are represented as Comment objects. - markup = "

foobaz

" - self.assertSoupEquals(markup) - - soup = self.soup(markup) - comment = soup.find(text="foobar") - self.assertEqual(comment.__class__, Comment) - - # The comment is properly integrated into the tree. - foo = soup.find(text="foo") - self.assertEqual(comment, foo.next_element) - baz = soup.find(text="baz") - self.assertEqual(comment, baz.previous_element) - - def test_preserved_whitespace_in_pre_and_textarea(self): - """Whitespace must be preserved in
 and ")
-
-    def test_nested_inline_elements(self):
-        """Inline elements can be nested indefinitely."""
-        b_tag = "Inside a B tag"
-        self.assertSoupEquals(b_tag)
-
-        nested_b_tag = "

A nested tag

" - self.assertSoupEquals(nested_b_tag) - - double_nested_b_tag = "

A doubly nested tag

" - self.assertSoupEquals(nested_b_tag) - - def test_nested_block_level_elements(self): - """Block elements can be nested.""" - soup = self.soup('

Foo

') - blockquote = soup.blockquote - self.assertEqual(blockquote.p.b.string, 'Foo') - self.assertEqual(blockquote.b.string, 'Foo') - - def test_correctly_nested_tables(self): - """One table can go inside another one.""" - markup = ('' - '' - "') - - self.assertSoupEquals( - markup, - '
Here's another table:" - '' - '' - '
foo
Here\'s another table:' - '
foo
' - '
') - - self.assertSoupEquals( - "" - "" - "
Foo
Bar
Baz
") - - def test_deeply_nested_multivalued_attribute(self): - # html5lib can set the attributes of the same tag many times - # as it rearranges the tree. This has caused problems with - # multivalued attributes. - markup = '
' - soup = self.soup(markup) - self.assertEqual(["css"], soup.div.div['class']) - - def test_multivalued_attribute_on_html(self): - # html5lib uses a different API to set the attributes ot the - # tag. This has caused problems with multivalued - # attributes. - markup = '' - soup = self.soup(markup) - self.assertEqual(["a", "b"], soup.html['class']) - - def test_angle_brackets_in_attribute_values_are_escaped(self): - self.assertSoupEquals('', '') - - def test_entities_in_attributes_converted_to_unicode(self): - expect = '

' - self.assertSoupEquals('

', expect) - self.assertSoupEquals('

', expect) - self.assertSoupEquals('

', expect) - self.assertSoupEquals('

', expect) - - def test_entities_in_text_converted_to_unicode(self): - expect = '

pi\N{LATIN SMALL LETTER N WITH TILDE}ata

' - self.assertSoupEquals("

piñata

", expect) - self.assertSoupEquals("

piñata

", expect) - self.assertSoupEquals("

piñata

", expect) - self.assertSoupEquals("

piñata

", expect) - - def test_quot_entity_converted_to_quotation_mark(self): - self.assertSoupEquals("

I said "good day!"

", - '

I said "good day!"

') - - def test_out_of_range_entity(self): - expect = "\N{REPLACEMENT CHARACTER}" - self.assertSoupEquals("�", expect) - self.assertSoupEquals("�", expect) - self.assertSoupEquals("�", expect) - - def test_multipart_strings(self): - "Mostly to prevent a recurrence of a bug in the html5lib treebuilder." - soup = self.soup("

\nfoo

") - self.assertEqual("p", soup.h2.string.next_element.name) - self.assertEqual("p", soup.p.name) - self.assertConnectedness(soup) - - def test_head_tag_between_head_and_body(self): - "Prevent recurrence of a bug in the html5lib treebuilder." - content = """ - - foo - -""" - soup = self.soup(content) - self.assertNotEqual(None, soup.html.body) - self.assertConnectedness(soup) - - def test_multiple_copies_of_a_tag(self): - "Prevent recurrence of a bug in the html5lib treebuilder." - content = """ - - - - - -""" - soup = self.soup(content) - self.assertConnectedness(soup.article) - - def test_basic_namespaces(self): - """Parsers don't need to *understand* namespaces, but at the - very least they should not choke on namespaces or lose - data.""" - - markup = b'4' - soup = self.soup(markup) - self.assertEqual(markup, soup.encode()) - html = soup.html - self.assertEqual('http://www.w3.org/1999/xhtml', soup.html['xmlns']) - self.assertEqual( - 'http://www.w3.org/1998/Math/MathML', soup.html['xmlns:mathml']) - self.assertEqual( - 'http://www.w3.org/2000/svg', soup.html['xmlns:svg']) - - def test_multivalued_attribute_value_becomes_list(self): - markup = b'' - soup = self.soup(markup) - self.assertEqual(['foo', 'bar'], soup.a['class']) - - # - # Generally speaking, tests below this point are more tests of - # Beautiful Soup than tests of the tree builders. But parsers are - # weird, so we run these tests separately for every tree builder - # to detect any differences between them. - # - - def test_can_parse_unicode_document(self): - # A seemingly innocuous document... but it's in Unicode! And - # it contains characters that can't be represented in the - # encoding found in the declaration! The horror! - markup = 'Sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!' - soup = self.soup(markup) - self.assertEqual('Sacr\xe9 bleu!', soup.body.string) - - def test_soupstrainer(self): - """Parsers should be able to work with SoupStrainers.""" - strainer = SoupStrainer("b") - soup = self.soup("A bold statement", - parse_only=strainer) - self.assertEqual(soup.decode(), "bold") - - def test_single_quote_attribute_values_become_double_quotes(self): - self.assertSoupEquals("", - '') - - def test_attribute_values_with_nested_quotes_are_left_alone(self): - text = """a""" - self.assertSoupEquals(text) - - def test_attribute_values_with_double_nested_quotes_get_quoted(self): - text = """a""" - soup = self.soup(text) - soup.foo['attr'] = 'Brawls happen at "Bob\'s Bar"' - self.assertSoupEquals( - soup.foo.decode(), - """a""") - - def test_ampersand_in_attribute_value_gets_escaped(self): - self.assertSoupEquals('', - '') - - self.assertSoupEquals( - 'foo', - 'foo') - - def test_escaped_ampersand_in_attribute_value_is_left_alone(self): - self.assertSoupEquals('') - - def test_entities_in_strings_converted_during_parsing(self): - # Both XML and HTML entities are converted to Unicode characters - # during parsing. - text = "

<<sacré bleu!>>

" - expected = "

<<sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!>>

" - self.assertSoupEquals(text, expected) - - def test_smart_quotes_converted_on_the_way_in(self): - # Microsoft smart quotes are converted to Unicode characters during - # parsing. - quote = b"

\x91Foo\x92

" - soup = self.soup(quote) - self.assertEqual( - soup.p.string, - "\N{LEFT SINGLE QUOTATION MARK}Foo\N{RIGHT SINGLE QUOTATION MARK}") - - def test_non_breaking_spaces_converted_on_the_way_in(self): - soup = self.soup("  ") - self.assertEqual(soup.a.string, "\N{NO-BREAK SPACE}" * 2) - - def test_entities_converted_on_the_way_out(self): - text = "

<<sacré bleu!>>

" - expected = "

<<sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!>>

".encode("utf-8") - soup = self.soup(text) - self.assertEqual(soup.p.encode("utf-8"), expected) - - def test_real_iso_latin_document(self): - # Smoke test of interrelated functionality, using an - # easy-to-understand document. - - # Here it is in Unicode. Note that it claims to be in ISO-Latin-1. - unicode_html = '

Sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!

' - - # That's because we're going to encode it into ISO-Latin-1, and use - # that to test. - iso_latin_html = unicode_html.encode("iso-8859-1") - - # Parse the ISO-Latin-1 HTML. - soup = self.soup(iso_latin_html) - # Encode it to UTF-8. - result = soup.encode("utf-8") - - # What do we expect the result to look like? Well, it would - # look like unicode_html, except that the META tag would say - # UTF-8 instead of ISO-Latin-1. - expected = unicode_html.replace("ISO-Latin-1", "utf-8") - - # And, of course, it would be in UTF-8, not Unicode. - expected = expected.encode("utf-8") - - # Ta-da! - self.assertEqual(result, expected) - - def test_real_shift_jis_document(self): - # Smoke test to make sure the parser can handle a document in - # Shift-JIS encoding, without choking. - shift_jis_html = ( - b'
'
-            b'\x82\xb1\x82\xea\x82\xcdShift-JIS\x82\xc5\x83R\x81[\x83f'
-            b'\x83B\x83\x93\x83O\x82\xb3\x82\xea\x82\xbd\x93\xfa\x96{\x8c'
-            b'\xea\x82\xcc\x83t\x83@\x83C\x83\x8b\x82\xc5\x82\xb7\x81B'
-            b'
') - unicode_html = shift_jis_html.decode("shift-jis") - soup = self.soup(unicode_html) - - # Make sure the parse tree is correctly encoded to various - # encodings. - self.assertEqual(soup.encode("utf-8"), unicode_html.encode("utf-8")) - self.assertEqual(soup.encode("euc_jp"), unicode_html.encode("euc_jp")) - - def test_real_hebrew_document(self): - # A real-world test to make sure we can convert ISO-8859-9 (a - # Hebrew encoding) to UTF-8. - hebrew_document = b'Hebrew (ISO 8859-8) in Visual Directionality

Hebrew (ISO 8859-8) in Visual Directionality

\xed\xe5\xec\xf9' - soup = self.soup( - hebrew_document, from_encoding="iso8859-8") - self.assertEqual(soup.original_encoding, 'iso8859-8') - self.assertEqual( - soup.encode('utf-8'), - hebrew_document.decode("iso8859-8").encode("utf-8")) - - def test_meta_tag_reflects_current_encoding(self): - # Here's the tag saying that a document is - # encoded in Shift-JIS. - meta_tag = ('') - - # Here's a document incorporating that meta tag. - shift_jis_html = ( - '\n%s\n' - '' - 'Shift-JIS markup goes here.') % meta_tag - soup = self.soup(shift_jis_html) - - # Parse the document, and the charset is seemingly unaffected. - parsed_meta = soup.find('meta', {'http-equiv': 'Content-type'}) - content = parsed_meta['content'] - self.assertEqual('text/html; charset=x-sjis', content) - - # But that value is actually a ContentMetaAttributeValue object. - self.assertTrue(isinstance(content, ContentMetaAttributeValue)) - - # And it will take on a value that reflects its current - # encoding. - self.assertEqual('text/html; charset=utf8', content.encode("utf8")) - - # For the rest of the story, see TestSubstitutions in - # test_tree.py. - - def test_html5_style_meta_tag_reflects_current_encoding(self): - # Here's the tag saying that a document is - # encoded in Shift-JIS. - meta_tag = ('') - - # Here's a document incorporating that meta tag. - shift_jis_html = ( - '\n%s\n' - '' - 'Shift-JIS markup goes here.') % meta_tag - soup = self.soup(shift_jis_html) - - # Parse the document, and the charset is seemingly unaffected. - parsed_meta = soup.find('meta', id="encoding") - charset = parsed_meta['charset'] - self.assertEqual('x-sjis', charset) - - # But that value is actually a CharsetMetaAttributeValue object. - self.assertTrue(isinstance(charset, CharsetMetaAttributeValue)) - - # And it will take on a value that reflects its current - # encoding. - self.assertEqual('utf8', charset.encode("utf8")) - - def test_tag_with_no_attributes_can_have_attributes_added(self): - data = self.soup("text") - data.a['foo'] = 'bar' - self.assertEqual('text', data.a.decode()) - -class XMLTreeBuilderSmokeTest(SoupTest): - - def test_pickle_and_unpickle_identity(self): - # Pickling a tree, then unpickling it, yields a tree identical - # to the original. - tree = self.soup("foo") - dumped = pickle.dumps(tree, 2) - loaded = pickle.loads(dumped) - self.assertEqual(loaded.__class__, BeautifulSoup) - self.assertEqual(loaded.decode(), tree.decode()) - - def test_docstring_generated(self): - soup = self.soup("") - self.assertEqual( - soup.encode(), b'\n') - - def test_xml_declaration(self): - markup = b"""\n""" - soup = self.soup(markup) - self.assertEqual(markup, soup.encode("utf8")) - - def test_real_xhtml_document(self): - """A real XHTML document should come out *exactly* the same as it went in.""" - markup = b""" - - -Hello. -Goodbye. -""" - soup = self.soup(markup) - self.assertEqual( - soup.encode("utf-8"), markup) - - def test_formatter_processes_script_tag_for_xml_documents(self): - doc = """ - -""" - soup = BeautifulSoup(doc, "lxml-xml") - # lxml would have stripped this while parsing, but we can add - # it later. - soup.script.string = 'console.log("< < hey > > ");' - encoded = soup.encode() - self.assertTrue(b"< < hey > >" in encoded) - - def test_can_parse_unicode_document(self): - markup = 'Sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!' - soup = self.soup(markup) - self.assertEqual('Sacr\xe9 bleu!', soup.root.string) - - def test_popping_namespaced_tag(self): - markup = 'b2012-07-02T20:33:42Zcd' - soup = self.soup(markup) - self.assertEqual( - str(soup.rss), markup) - - def test_docstring_includes_correct_encoding(self): - soup = self.soup("") - self.assertEqual( - soup.encode("latin1"), - b'\n') - - def test_large_xml_document(self): - """A large XML document should come out the same as it went in.""" - markup = (b'\n' - + b'0' * (2**12) - + b'') - soup = self.soup(markup) - self.assertEqual(soup.encode("utf-8"), markup) - - - def test_tags_are_empty_element_if_and_only_if_they_are_empty(self): - self.assertSoupEquals("

", "

") - self.assertSoupEquals("

foo

") - - def test_namespaces_are_preserved(self): - markup = 'This tag is in the a namespaceThis tag is in the b namespace' - soup = self.soup(markup) - root = soup.root - self.assertEqual("http://example.com/", root['xmlns:a']) - self.assertEqual("http://example.net/", root['xmlns:b']) - - def test_closing_namespaced_tag(self): - markup = '

20010504

' - soup = self.soup(markup) - self.assertEqual(str(soup.p), markup) - - def test_namespaced_attributes(self): - markup = '' - soup = self.soup(markup) - self.assertEqual(str(soup.foo), markup) - - def test_namespaced_attributes_xml_namespace(self): - markup = 'bar' - soup = self.soup(markup) - self.assertEqual(str(soup.foo), markup) - -class HTML5TreeBuilderSmokeTest(HTMLTreeBuilderSmokeTest): - """Smoke test for a tree builder that supports HTML5.""" - - def test_real_xhtml_document(self): - # Since XHTML is not HTML5, HTML5 parsers are not tested to handle - # XHTML documents in any particular way. - pass - - def test_html_tags_have_namespace(self): - markup = "" - soup = self.soup(markup) - self.assertEqual("http://www.w3.org/1999/xhtml", soup.a.namespace) - - def test_svg_tags_have_namespace(self): - markup = '' - soup = self.soup(markup) - namespace = "http://www.w3.org/2000/svg" - self.assertEqual(namespace, soup.svg.namespace) - self.assertEqual(namespace, soup.circle.namespace) - - - def test_mathml_tags_have_namespace(self): - markup = '5' - soup = self.soup(markup) - namespace = 'http://www.w3.org/1998/Math/MathML' - self.assertEqual(namespace, soup.math.namespace) - self.assertEqual(namespace, soup.msqrt.namespace) - - def test_xml_declaration_becomes_comment(self): - markup = '' - soup = self.soup(markup) - self.assertTrue(isinstance(soup.contents[0], Comment)) - self.assertEqual(soup.contents[0], '?xml version="1.0" encoding="utf-8"?') - self.assertEqual("html", soup.contents[0].next_element.name) - -def skipIf(condition, reason): - def nothing(test, *args, **kwargs): - return None - - def decorator(test_item): - if condition: - return nothing - else: - return test_item - - return decorator diff --git a/sources/poky/bitbake/lib/bs4/tests/__init__.py b/sources/poky/bitbake/lib/bs4/tests/__init__.py deleted file mode 100644 index 142c8cc3..00000000 --- a/sources/poky/bitbake/lib/bs4/tests/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"The beautifulsoup tests." diff --git a/sources/poky/bitbake/lib/bs4/tests/test_builder_registry.py b/sources/poky/bitbake/lib/bs4/tests/test_builder_registry.py deleted file mode 100644 index 90cad829..00000000 --- a/sources/poky/bitbake/lib/bs4/tests/test_builder_registry.py +++ /dev/null @@ -1,147 +0,0 @@ -"""Tests of the builder registry.""" - -import unittest -import warnings - -from bs4 import BeautifulSoup -from bs4.builder import ( - builder_registry as registry, - HTMLParserTreeBuilder, - TreeBuilderRegistry, -) - -try: - from bs4.builder import HTML5TreeBuilder - HTML5LIB_PRESENT = True -except ImportError: - HTML5LIB_PRESENT = False - -try: - from bs4.builder import ( - LXMLTreeBuilderForXML, - LXMLTreeBuilder, - ) - LXML_PRESENT = True -except ImportError: - LXML_PRESENT = False - - -class BuiltInRegistryTest(unittest.TestCase): - """Test the built-in registry with the default builders registered.""" - - def test_combination(self): - if LXML_PRESENT: - self.assertEqual(registry.lookup('fast', 'html'), - LXMLTreeBuilder) - - if LXML_PRESENT: - self.assertEqual(registry.lookup('permissive', 'xml'), - LXMLTreeBuilderForXML) - self.assertEqual(registry.lookup('strict', 'html'), - HTMLParserTreeBuilder) - if HTML5LIB_PRESENT: - self.assertEqual(registry.lookup('html5lib', 'html'), - HTML5TreeBuilder) - - def test_lookup_by_markup_type(self): - if LXML_PRESENT: - self.assertEqual(registry.lookup('html'), LXMLTreeBuilder) - self.assertEqual(registry.lookup('xml'), LXMLTreeBuilderForXML) - else: - self.assertEqual(registry.lookup('xml'), None) - if HTML5LIB_PRESENT: - self.assertEqual(registry.lookup('html'), HTML5TreeBuilder) - else: - self.assertEqual(registry.lookup('html'), HTMLParserTreeBuilder) - - def test_named_library(self): - if LXML_PRESENT: - self.assertEqual(registry.lookup('lxml', 'xml'), - LXMLTreeBuilderForXML) - self.assertEqual(registry.lookup('lxml', 'html'), - LXMLTreeBuilder) - if HTML5LIB_PRESENT: - self.assertEqual(registry.lookup('html5lib'), - HTML5TreeBuilder) - - self.assertEqual(registry.lookup('html.parser'), - HTMLParserTreeBuilder) - - def test_beautifulsoup_constructor_does_lookup(self): - - with warnings.catch_warnings(record=True) as w: - # This will create a warning about not explicitly - # specifying a parser, but we'll ignore it. - - # You can pass in a string. - BeautifulSoup("", features="html") - # Or a list of strings. - BeautifulSoup("", features=["html", "fast"]) - - # You'll get an exception if BS can't find an appropriate - # builder. - self.assertRaises(ValueError, BeautifulSoup, - "", features="no-such-feature") - -class RegistryTest(unittest.TestCase): - """Test the TreeBuilderRegistry class in general.""" - - def setUp(self): - self.registry = TreeBuilderRegistry() - - def builder_for_features(self, *feature_list): - cls = type('Builder_' + '_'.join(feature_list), - (object,), {'features' : feature_list}) - - self.registry.register(cls) - return cls - - def test_register_with_no_features(self): - builder = self.builder_for_features() - - # Since the builder advertises no features, you can't find it - # by looking up features. - self.assertEqual(self.registry.lookup('foo'), None) - - # But you can find it by doing a lookup with no features, if - # this happens to be the only registered builder. - self.assertEqual(self.registry.lookup(), builder) - - def test_register_with_features_makes_lookup_succeed(self): - builder = self.builder_for_features('foo', 'bar') - self.assertEqual(self.registry.lookup('foo'), builder) - self.assertEqual(self.registry.lookup('bar'), builder) - - def test_lookup_fails_when_no_builder_implements_feature(self): - builder = self.builder_for_features('foo', 'bar') - self.assertEqual(self.registry.lookup('baz'), None) - - def test_lookup_gets_most_recent_registration_when_no_feature_specified(self): - builder1 = self.builder_for_features('foo') - builder2 = self.builder_for_features('bar') - self.assertEqual(self.registry.lookup(), builder2) - - def test_lookup_fails_when_no_tree_builders_registered(self): - self.assertEqual(self.registry.lookup(), None) - - def test_lookup_gets_most_recent_builder_supporting_all_features(self): - has_one = self.builder_for_features('foo') - has_the_other = self.builder_for_features('bar') - has_both_early = self.builder_for_features('foo', 'bar', 'baz') - has_both_late = self.builder_for_features('foo', 'bar', 'quux') - lacks_one = self.builder_for_features('bar') - has_the_other = self.builder_for_features('foo') - - # There are two builders featuring 'foo' and 'bar', but - # the one that also features 'quux' was registered later. - self.assertEqual(self.registry.lookup('foo', 'bar'), - has_both_late) - - # There is only one builder featuring 'foo', 'bar', and 'baz'. - self.assertEqual(self.registry.lookup('foo', 'bar', 'baz'), - has_both_early) - - def test_lookup_fails_when_cannot_reconcile_requested_features(self): - builder1 = self.builder_for_features('foo', 'bar') - builder2 = self.builder_for_features('foo', 'baz') - self.assertEqual(self.registry.lookup('bar', 'baz'), None) diff --git a/sources/poky/bitbake/lib/bs4/tests/test_docs.py b/sources/poky/bitbake/lib/bs4/tests/test_docs.py deleted file mode 100644 index d1d76a33..00000000 --- a/sources/poky/bitbake/lib/bs4/tests/test_docs.py +++ /dev/null @@ -1,32 +0,0 @@ -"Test harness for doctests." - -# pylint: disable-msg=E0611,W0142 - -__metaclass__ = type -__all__ = [ - 'additional_tests', - ] - -import doctest -#from pkg_resources import ( -# resource_filename, resource_exists, resource_listdir, cleanup_resources) - -DOCTEST_FLAGS = ( - doctest.ELLIPSIS | - doctest.NORMALIZE_WHITESPACE | - doctest.REPORT_NDIFF) - -# def additional_tests(): -# "Run the doc tests (README.txt and docs/*, if any exist)" -# doctest_files = [ -# os.path.abspath(resource_filename('bs4', 'README.txt'))] -# if resource_exists('bs4', 'docs'): -# for name in resource_listdir('bs4', 'docs'): -# if name.endswith('.txt'): -# doctest_files.append( -# os.path.abspath( -# resource_filename('bs4', 'docs/%s' % name))) -# kwargs = dict(module_relative=False, optionflags=DOCTEST_FLAGS) -# atexit.register(cleanup_resources) -# return unittest.TestSuite(( -# doctest.DocFileSuite(*doctest_files, **kwargs))) diff --git a/sources/poky/bitbake/lib/bs4/tests/test_html5lib.py b/sources/poky/bitbake/lib/bs4/tests/test_html5lib.py deleted file mode 100644 index a7494ca5..00000000 --- a/sources/poky/bitbake/lib/bs4/tests/test_html5lib.py +++ /dev/null @@ -1,98 +0,0 @@ -"""Tests to ensure that the html5lib tree builder generates good trees.""" - -import warnings - -try: - from bs4.builder import HTML5TreeBuilder - HTML5LIB_PRESENT = True -except ImportError as e: - HTML5LIB_PRESENT = False -from bs4.element import SoupStrainer -from bs4.testing import ( - HTML5TreeBuilderSmokeTest, - SoupTest, - skipIf, -) - -@skipIf( - not HTML5LIB_PRESENT, - "html5lib seems not to be present, not testing its tree builder.") -class HTML5LibBuilderSmokeTest(SoupTest, HTML5TreeBuilderSmokeTest): - """See ``HTML5TreeBuilderSmokeTest``.""" - - @property - def default_builder(self): - return HTML5TreeBuilder() - - def test_soupstrainer(self): - # The html5lib tree builder does not support SoupStrainers. - strainer = SoupStrainer("b") - markup = "

A bold statement.

" - with warnings.catch_warnings(record=True) as w: - soup = self.soup(markup, parse_only=strainer) - self.assertEqual( - soup.decode(), self.document_for(markup)) - - self.assertTrue( - "the html5lib tree builder doesn't support parse_only" in - str(w[0].message)) - - def test_correctly_nested_tables(self): - """html5lib inserts tags where other parsers don't.""" - markup = ('' - '' - "') - - self.assertSoupEquals( - markup, - '
Here's another table:" - '' - '' - '
foo
Here\'s another table:' - '
foo
' - '
') - - self.assertSoupEquals( - "" - "" - "
Foo
Bar
Baz
") - - def test_xml_declaration_followed_by_doctype(self): - markup = ''' - - - - - -

foo

- -''' - soup = self.soup(markup) - # Verify that we can reach the

tag; this means the tree is connected. - self.assertEqual(b"

foo

", soup.p.encode()) - - def test_reparented_markup(self): - markup = '

foo

\n

bar

' - soup = self.soup(markup) - self.assertEqual("

foo

\n

bar

", soup.body.decode()) - self.assertEqual(2, len(soup.find_all('p'))) - - - def test_reparented_markup_ends_with_whitespace(self): - markup = '

foo

\n

bar

\n' - soup = self.soup(markup) - self.assertEqual("

foo

\n

bar

\n", soup.body.decode()) - self.assertEqual(2, len(soup.find_all('p'))) - - def test_processing_instruction(self): - """Processing instructions become comments.""" - markup = b"""""" - soup = self.soup(markup) - assert str(soup).startswith("") - - def test_cloned_multivalue_node(self): - markup = b"""

""" - soup = self.soup(markup) - a1, a2 = soup.find_all('a') - self.assertEqual(a1, a2) - assert a1 is not a2 diff --git a/sources/poky/bitbake/lib/bs4/tests/test_htmlparser.py b/sources/poky/bitbake/lib/bs4/tests/test_htmlparser.py deleted file mode 100644 index 30a25e67..00000000 --- a/sources/poky/bitbake/lib/bs4/tests/test_htmlparser.py +++ /dev/null @@ -1,31 +0,0 @@ -"""Tests to ensure that the html.parser tree builder generates good -trees.""" - -import pickle -from bs4.testing import SoupTest, HTMLTreeBuilderSmokeTest -from bs4.builder import HTMLParserTreeBuilder - -class HTMLParserTreeBuilderSmokeTest(SoupTest, HTMLTreeBuilderSmokeTest): - - @property - def default_builder(self): - return HTMLParserTreeBuilder() - - def test_namespaced_system_doctype(self): - # html.parser can't handle namespaced doctypes, so skip this one. - pass - - def test_namespaced_public_doctype(self): - # html.parser can't handle namespaced doctypes, so skip this one. - pass - - def test_builder_is_pickled(self): - """Unlike most tree builders, HTMLParserTreeBuilder and will - be restored after pickling. - """ - tree = self.soup("foo") - dumped = pickle.dumps(tree, 2) - loaded = pickle.loads(dumped) - self.assertTrue(isinstance(loaded.builder, type(tree.builder))) - - diff --git a/sources/poky/bitbake/lib/bs4/tests/test_lxml.py b/sources/poky/bitbake/lib/bs4/tests/test_lxml.py deleted file mode 100644 index 6b6cdd07..00000000 --- a/sources/poky/bitbake/lib/bs4/tests/test_lxml.py +++ /dev/null @@ -1,70 +0,0 @@ -"""Tests to ensure that the lxml tree builder generates good trees.""" - -import warnings - -try: - import lxml.etree - LXML_PRESENT = True - LXML_VERSION = lxml.etree.LXML_VERSION -except ImportError as e: - LXML_PRESENT = False - LXML_VERSION = (0,) - -if LXML_PRESENT: - from bs4.builder import LXMLTreeBuilder, LXMLTreeBuilderForXML - -from bs4 import BeautifulStoneSoup -from bs4.testing import skipIf -from bs4.testing import ( - HTMLTreeBuilderSmokeTest, - XMLTreeBuilderSmokeTest, - SoupTest, - skipIf, -) - -@skipIf( - not LXML_PRESENT, - "lxml seems not to be present, not testing its tree builder.") -class LXMLTreeBuilderSmokeTest(SoupTest, HTMLTreeBuilderSmokeTest): - """See ``HTMLTreeBuilderSmokeTest``.""" - - @property - def default_builder(self): - return LXMLTreeBuilder() - - def test_out_of_range_entity(self): - self.assertSoupEquals( - "

foo�bar

", "

foobar

") - self.assertSoupEquals( - "

foo�bar

", "

foobar

") - self.assertSoupEquals( - "

foo�bar

", "

foobar

") - - # In lxml < 2.3.5, an empty doctype causes a segfault. Skip this - # test if an old version of lxml is installed. - - @skipIf( - not LXML_PRESENT or LXML_VERSION < (2,3,5,0), - "Skipping doctype test for old version of lxml to avoid segfault.") - def test_empty_doctype(self): - soup = self.soup("") - doctype = soup.contents[0] - self.assertEqual("", doctype.strip()) - - def test_beautifulstonesoup_is_xml_parser(self): - # Make sure that the deprecated BSS class uses an xml builder - # if one is installed. - with warnings.catch_warnings(record=True) as w: - soup = BeautifulStoneSoup("") - self.assertEqual("", str(soup.b)) - self.assertTrue("BeautifulStoneSoup class is deprecated" in str(w[0].message)) - -@skipIf( - not LXML_PRESENT, - "lxml seems not to be present, not testing its XML tree builder.") -class LXMLXMLTreeBuilderSmokeTest(SoupTest, XMLTreeBuilderSmokeTest): - """See ``HTMLTreeBuilderSmokeTest``.""" - - @property - def default_builder(self): - return LXMLTreeBuilderForXML() diff --git a/sources/poky/bitbake/lib/bs4/tests/test_soup.py b/sources/poky/bitbake/lib/bs4/tests/test_soup.py deleted file mode 100644 index 6ad3cb37..00000000 --- a/sources/poky/bitbake/lib/bs4/tests/test_soup.py +++ /dev/null @@ -1,479 +0,0 @@ -# -*- coding: utf-8 -*- -"""Tests of Beautiful Soup as a whole.""" - -import logging -import unittest -import sys -import tempfile - -from bs4 import BeautifulSoup -from bs4.element import ( - CharsetMetaAttributeValue, - ContentMetaAttributeValue, - SoupStrainer, - NamespacedAttribute, - ) -import bs4.dammit -from bs4.dammit import ( - EntitySubstitution, - UnicodeDammit, - EncodingDetector, -) -from bs4.testing import ( - SoupTest, - skipIf, -) -import warnings - -try: - from bs4.builder import LXMLTreeBuilder, LXMLTreeBuilderForXML - LXML_PRESENT = True -except ImportError as e: - LXML_PRESENT = False - -PYTHON_2_PRE_2_7 = (sys.version_info < (2,7)) -PYTHON_3_PRE_3_2 = (sys.version_info[0] == 3 and sys.version_info < (3,2)) - -class TestConstructor(SoupTest): - - def test_short_unicode_input(self): - data = "

éé

" - soup = self.soup(data) - self.assertEqual("éé", soup.h1.string) - - def test_embedded_null(self): - data = "

foo\0bar

" - soup = self.soup(data) - self.assertEqual("foo\0bar", soup.h1.string) - - def test_exclude_encodings(self): - utf8_data = "RäksmörgÃ¥s".encode("utf-8") - soup = self.soup(utf8_data, exclude_encodings=["utf-8"]) - self.assertEqual("windows-1252", soup.original_encoding) - - -class TestWarnings(SoupTest): - - def _no_parser_specified(self, s, is_there=True): - v = s.startswith(BeautifulSoup.NO_PARSER_SPECIFIED_WARNING[:80]) - self.assertTrue(v) - - def test_warning_if_no_parser_specified(self): - with warnings.catch_warnings(record=True) as w: - soup = self.soup("") - msg = str(w[0].message) - self._assert_no_parser_specified(msg) - - def test_warning_if_parser_specified_too_vague(self): - with warnings.catch_warnings(record=True) as w: - soup = self.soup("", "html") - msg = str(w[0].message) - self._assert_no_parser_specified(msg) - - def test_no_warning_if_explicit_parser_specified(self): - with warnings.catch_warnings(record=True) as w: - soup = self.soup("", "html.parser") - self.assertEqual([], w) - - def test_parseOnlyThese_renamed_to_parse_only(self): - with warnings.catch_warnings(record=True) as w: - soup = self.soup("", parseOnlyThese=SoupStrainer("b")) - msg = str(w[0].message) - self.assertTrue("parseOnlyThese" in msg) - self.assertTrue("parse_only" in msg) - self.assertEqual(b"", soup.encode()) - - def test_fromEncoding_renamed_to_from_encoding(self): - with warnings.catch_warnings(record=True) as w: - utf8 = b"\xc3\xa9" - soup = self.soup(utf8, fromEncoding="utf8") - msg = str(w[0].message) - self.assertTrue("fromEncoding" in msg) - self.assertTrue("from_encoding" in msg) - self.assertEqual("utf8", soup.original_encoding) - - def test_unrecognized_keyword_argument(self): - self.assertRaises( - TypeError, self.soup, "", no_such_argument=True) - -class TestWarnings(SoupTest): - - def test_disk_file_warning(self): - filehandle = tempfile.NamedTemporaryFile() - filename = filehandle.name - try: - with warnings.catch_warnings(record=True) as w: - soup = self.soup(filename) - msg = str(w[0].message) - self.assertTrue("looks like a filename" in msg) - finally: - filehandle.close() - - # The file no longer exists, so Beautiful Soup will no longer issue the warning. - with warnings.catch_warnings(record=True) as w: - soup = self.soup(filename) - self.assertEqual(0, len(w)) - - def test_url_warning(self): - with warnings.catch_warnings(record=True) as w: - soup = self.soup("http://www.crummy.com/") - msg = str(w[0].message) - self.assertTrue("looks like a URL" in msg) - - with warnings.catch_warnings(record=True) as w: - soup = self.soup("http://www.crummy.com/ is great") - self.assertEqual(0, len(w)) - -class TestSelectiveParsing(SoupTest): - - def test_parse_with_soupstrainer(self): - markup = "NoYesNoYes Yes" - strainer = SoupStrainer("b") - soup = self.soup(markup, parse_only=strainer) - self.assertEqual(soup.encode(), b"YesYes Yes") - - -class TestEntitySubstitution(unittest.TestCase): - """Standalone tests of the EntitySubstitution class.""" - def setUp(self): - self.sub = EntitySubstitution - - def test_simple_html_substitution(self): - # Unicode characters corresponding to named HTML entites - # are substituted, and no others. - s = "foo\u2200\N{SNOWMAN}\u00f5bar" - self.assertEqual(self.sub.substitute_html(s), - "foo∀\N{SNOWMAN}õbar") - - def test_smart_quote_substitution(self): - # MS smart quotes are a common source of frustration, so we - # give them a special test. - quotes = b"\x91\x92foo\x93\x94" - dammit = UnicodeDammit(quotes) - self.assertEqual(self.sub.substitute_html(dammit.markup), - "‘’foo“”") - - def test_xml_converstion_includes_no_quotes_if_make_quoted_attribute_is_false(self): - s = 'Welcome to "my bar"' - self.assertEqual(self.sub.substitute_xml(s, False), s) - - def test_xml_attribute_quoting_normally_uses_double_quotes(self): - self.assertEqual(self.sub.substitute_xml("Welcome", True), - '"Welcome"') - self.assertEqual(self.sub.substitute_xml("Bob's Bar", True), - '"Bob\'s Bar"') - - def test_xml_attribute_quoting_uses_single_quotes_when_value_contains_double_quotes(self): - s = 'Welcome to "my bar"' - self.assertEqual(self.sub.substitute_xml(s, True), - "'Welcome to \"my bar\"'") - - def test_xml_attribute_quoting_escapes_single_quotes_when_value_contains_both_single_and_double_quotes(self): - s = 'Welcome to "Bob\'s Bar"' - self.assertEqual( - self.sub.substitute_xml(s, True), - '"Welcome to "Bob\'s Bar""') - - def test_xml_quotes_arent_escaped_when_value_is_not_being_quoted(self): - quoted = 'Welcome to "Bob\'s Bar"' - self.assertEqual(self.sub.substitute_xml(quoted), quoted) - - def test_xml_quoting_handles_angle_brackets(self): - self.assertEqual( - self.sub.substitute_xml("foo"), - "foo<bar>") - - def test_xml_quoting_handles_ampersands(self): - self.assertEqual(self.sub.substitute_xml("AT&T"), "AT&T") - - def test_xml_quoting_including_ampersands_when_they_are_part_of_an_entity(self): - self.assertEqual( - self.sub.substitute_xml("ÁT&T"), - "&Aacute;T&T") - - def test_xml_quoting_ignoring_ampersands_when_they_are_part_of_an_entity(self): - self.assertEqual( - self.sub.substitute_xml_containing_entities("ÁT&T"), - "ÁT&T") - - def test_quotes_not_html_substituted(self): - """There's no need to do this except inside attribute values.""" - text = 'Bob\'s "bar"' - self.assertEqual(self.sub.substitute_html(text), text) - - -class TestEncodingConversion(SoupTest): - # Test Beautiful Soup's ability to decode and encode from various - # encodings. - - def setUp(self): - super(TestEncodingConversion, self).setUp() - self.unicode_data = 'Sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!' - self.utf8_data = self.unicode_data.encode("utf-8") - # Just so you know what it looks like. - self.assertEqual( - self.utf8_data, - b'Sacr\xc3\xa9 bleu!') - - def test_ascii_in_unicode_out(self): - # ASCII input is converted to Unicode. The original_encoding - # attribute is set to 'utf-8', a superset of ASCII. - chardet = bs4.dammit.chardet_dammit - logging.disable(logging.WARNING) - try: - def noop(str): - return None - # Disable chardet, which will realize that the ASCII is ASCII. - bs4.dammit.chardet_dammit = noop - ascii = b"a" - soup_from_ascii = self.soup(ascii) - unicode_output = soup_from_ascii.decode() - self.assertTrue(isinstance(unicode_output, str)) - self.assertEqual(unicode_output, self.document_for(ascii.decode())) - self.assertEqual(soup_from_ascii.original_encoding.lower(), "utf-8") - finally: - logging.disable(logging.NOTSET) - bs4.dammit.chardet_dammit = chardet - - def test_unicode_in_unicode_out(self): - # Unicode input is left alone. The original_encoding attribute - # is not set. - soup_from_unicode = self.soup(self.unicode_data) - self.assertEqual(soup_from_unicode.decode(), self.unicode_data) - self.assertEqual(soup_from_unicode.foo.string, 'Sacr\xe9 bleu!') - self.assertEqual(soup_from_unicode.original_encoding, None) - - def test_utf8_in_unicode_out(self): - # UTF-8 input is converted to Unicode. The original_encoding - # attribute is set. - soup_from_utf8 = self.soup(self.utf8_data) - self.assertEqual(soup_from_utf8.decode(), self.unicode_data) - self.assertEqual(soup_from_utf8.foo.string, 'Sacr\xe9 bleu!') - - def test_utf8_out(self): - # The internal data structures can be encoded as UTF-8. - soup_from_unicode = self.soup(self.unicode_data) - self.assertEqual(soup_from_unicode.encode('utf-8'), self.utf8_data) - - @skipIf( - PYTHON_2_PRE_2_7 or PYTHON_3_PRE_3_2, - "Bad HTMLParser detected; skipping test of non-ASCII characters in attribute name.") - def test_attribute_name_containing_unicode_characters(self): - markup = '
' - self.assertEqual(self.soup(markup).div.encode("utf8"), markup.encode("utf8")) - -class TestUnicodeDammit(unittest.TestCase): - """Standalone tests of UnicodeDammit.""" - - def test_unicode_input(self): - markup = "I'm already Unicode! \N{SNOWMAN}" - dammit = UnicodeDammit(markup) - self.assertEqual(dammit.unicode_markup, markup) - - def test_smart_quotes_to_unicode(self): - markup = b"\x91\x92\x93\x94" - dammit = UnicodeDammit(markup) - self.assertEqual( - dammit.unicode_markup, "\u2018\u2019\u201c\u201d") - - def test_smart_quotes_to_xml_entities(self): - markup = b"\x91\x92\x93\x94" - dammit = UnicodeDammit(markup, smart_quotes_to="xml") - self.assertEqual( - dammit.unicode_markup, "‘’“”") - - def test_smart_quotes_to_html_entities(self): - markup = b"\x91\x92\x93\x94" - dammit = UnicodeDammit(markup, smart_quotes_to="html") - self.assertEqual( - dammit.unicode_markup, "‘’“”") - - def test_smart_quotes_to_ascii(self): - markup = b"\x91\x92\x93\x94" - dammit = UnicodeDammit(markup, smart_quotes_to="ascii") - self.assertEqual( - dammit.unicode_markup, """''""""") - - def test_detect_utf8(self): - utf8 = b"Sacr\xc3\xa9 bleu! \xe2\x98\x83" - dammit = UnicodeDammit(utf8) - self.assertEqual(dammit.original_encoding.lower(), 'utf-8') - self.assertEqual(dammit.unicode_markup, 'Sacr\xe9 bleu! \N{SNOWMAN}') - - - def test_convert_hebrew(self): - hebrew = b"\xed\xe5\xec\xf9" - dammit = UnicodeDammit(hebrew, ["iso-8859-8"]) - self.assertEqual(dammit.original_encoding.lower(), 'iso-8859-8') - self.assertEqual(dammit.unicode_markup, '\u05dd\u05d5\u05dc\u05e9') - - def test_dont_see_smart_quotes_where_there_are_none(self): - utf_8 = b"\343\202\261\343\203\274\343\202\277\343\202\244 Watch" - dammit = UnicodeDammit(utf_8) - self.assertEqual(dammit.original_encoding.lower(), 'utf-8') - self.assertEqual(dammit.unicode_markup.encode("utf-8"), utf_8) - - def test_ignore_inappropriate_codecs(self): - utf8_data = "RäksmörgÃ¥s".encode("utf-8") - dammit = UnicodeDammit(utf8_data, ["iso-8859-8"]) - self.assertEqual(dammit.original_encoding.lower(), 'utf-8') - - def test_ignore_invalid_codecs(self): - utf8_data = "RäksmörgÃ¥s".encode("utf-8") - for bad_encoding in ['.utf8', '...', 'utF---16.!']: - dammit = UnicodeDammit(utf8_data, [bad_encoding]) - self.assertEqual(dammit.original_encoding.lower(), 'utf-8') - - def test_exclude_encodings(self): - # This is UTF-8. - utf8_data = "RäksmörgÃ¥s".encode("utf-8") - - # But if we exclude UTF-8 from consideration, the guess is - # Windows-1252. - dammit = UnicodeDammit(utf8_data, exclude_encodings=["utf-8"]) - self.assertEqual(dammit.original_encoding.lower(), 'windows-1252') - - # And if we exclude that, there is no valid guess at all. - dammit = UnicodeDammit( - utf8_data, exclude_encodings=["utf-8", "windows-1252"]) - self.assertEqual(dammit.original_encoding, None) - - def test_encoding_detector_replaces_junk_in_encoding_name_with_replacement_character(self): - detected = EncodingDetector( - b'') - encodings = list(detected.encodings) - assert 'utf-\N{REPLACEMENT CHARACTER}' in encodings - - def test_detect_html5_style_meta_tag(self): - - for data in ( - b'', - b"", - b"", - b""): - dammit = UnicodeDammit(data, is_html=True) - self.assertEqual( - "euc-jp", dammit.original_encoding) - - def test_last_ditch_entity_replacement(self): - # This is a UTF-8 document that contains bytestrings - # completely incompatible with UTF-8 (ie. encoded with some other - # encoding). - # - # Since there is no consistent encoding for the document, - # Unicode, Dammit will eventually encode the document as UTF-8 - # and encode the incompatible characters as REPLACEMENT - # CHARACTER. - # - # If chardet is installed, it will detect that the document - # can be converted into ISO-8859-1 without errors. This happens - # to be the wrong encoding, but it is a consistent encoding, so the - # code we're testing here won't run. - # - # So we temporarily disable chardet if it's present. - doc = b"""\357\273\277 -\330\250\330\252\330\261 -\310\322\321\220\312\321\355\344""" - chardet = bs4.dammit.chardet_dammit - logging.disable(logging.WARNING) - try: - def noop(str): - return None - bs4.dammit.chardet_dammit = noop - dammit = UnicodeDammit(doc) - self.assertEqual(True, dammit.contains_replacement_characters) - self.assertTrue("\ufffd" in dammit.unicode_markup) - - soup = BeautifulSoup(doc, "html.parser") - self.assertTrue(soup.contains_replacement_characters) - finally: - logging.disable(logging.NOTSET) - bs4.dammit.chardet_dammit = chardet - - def test_byte_order_mark_removed(self): - # A document written in UTF-16LE will have its byte order marker stripped. - data = b'\xff\xfe<\x00a\x00>\x00\xe1\x00\xe9\x00<\x00/\x00a\x00>\x00' - dammit = UnicodeDammit(data) - self.assertEqual("áé", dammit.unicode_markup) - self.assertEqual("utf-16le", dammit.original_encoding) - - def test_detwingle(self): - # Here's a UTF8 document. - utf8 = ("\N{SNOWMAN}" * 3).encode("utf8") - - # Here's a Windows-1252 document. - windows_1252 = ( - "\N{LEFT DOUBLE QUOTATION MARK}Hi, I like Windows!" - "\N{RIGHT DOUBLE QUOTATION MARK}").encode("windows_1252") - - # Through some unholy alchemy, they've been stuck together. - doc = utf8 + windows_1252 + utf8 - - # The document can't be turned into UTF-8: - self.assertRaises(UnicodeDecodeError, doc.decode, "utf8") - - # Unicode, Dammit thinks the whole document is Windows-1252, - # and decodes it into "☃☃☃“Hi, I like Windows!â€Ã¢ËœÆ’☃☃" - - # But if we run it through fix_embedded_windows_1252, it's fixed: - - fixed = UnicodeDammit.detwingle(doc) - self.assertEqual( - "☃☃☃“Hi, I like Windows!â€â˜ƒâ˜ƒâ˜ƒ", fixed.decode("utf8")) - - def test_detwingle_ignores_multibyte_characters(self): - # Each of these characters has a UTF-8 representation ending - # in \x93. \x93 is a smart quote if interpreted as - # Windows-1252. But our code knows to skip over multibyte - # UTF-8 characters, so they'll survive the process unscathed. - for tricky_unicode_char in ( - "\N{LATIN SMALL LIGATURE OE}", # 2-byte char '\xc5\x93' - "\N{LATIN SUBSCRIPT SMALL LETTER X}", # 3-byte char '\xe2\x82\x93' - "\xf0\x90\x90\x93", # This is a CJK character, not sure which one. - ): - input = tricky_unicode_char.encode("utf8") - self.assertTrue(input.endswith(b'\x93')) - output = UnicodeDammit.detwingle(input) - self.assertEqual(output, input) - -class TestNamedspacedAttribute(SoupTest): - - def test_name_may_be_none(self): - a = NamespacedAttribute("xmlns", None) - self.assertEqual(a, "xmlns") - - def test_attribute_is_equivalent_to_colon_separated_string(self): - a = NamespacedAttribute("a", "b") - self.assertEqual("a:b", a) - - def test_attributes_are_equivalent_if_prefix_and_name_identical(self): - a = NamespacedAttribute("a", "b", "c") - b = NamespacedAttribute("a", "b", "c") - self.assertEqual(a, b) - - # The actual namespace is not considered. - c = NamespacedAttribute("a", "b", None) - self.assertEqual(a, c) - - # But name and prefix are important. - d = NamespacedAttribute("a", "z", "c") - self.assertNotEqual(a, d) - - e = NamespacedAttribute("z", "b", "c") - self.assertNotEqual(a, e) - - -class TestAttributeValueWithCharsetSubstitution(unittest.TestCase): - - def test_content_meta_attribute_value(self): - value = CharsetMetaAttributeValue("euc-jp") - self.assertEqual("euc-jp", value) - self.assertEqual("euc-jp", value.original_value) - self.assertEqual("utf8", value.encode("utf8")) - - - def test_content_meta_attribute_value(self): - value = ContentMetaAttributeValue("text/html; charset=euc-jp") - self.assertEqual("text/html; charset=euc-jp", value) - self.assertEqual("text/html; charset=euc-jp", value.original_value) - self.assertEqual("text/html; charset=utf8", value.encode("utf8")) diff --git a/sources/poky/bitbake/lib/bs4/tests/test_tree.py b/sources/poky/bitbake/lib/bs4/tests/test_tree.py deleted file mode 100644 index cf0f1abe..00000000 --- a/sources/poky/bitbake/lib/bs4/tests/test_tree.py +++ /dev/null @@ -1,2004 +0,0 @@ -# -*- coding: utf-8 -*- -"""Tests for Beautiful Soup's tree traversal methods. - -The tree traversal methods are the main advantage of using Beautiful -Soup over just using a parser. - -Different parsers will build different Beautiful Soup trees given the -same markup, but all Beautiful Soup trees can be traversed with the -methods tested here. -""" - -import copy -import pickle -import re -import warnings -from bs4 import BeautifulSoup -from bs4.builder import builder_registry -from bs4.element import ( - PY3K, - CData, - Comment, - Declaration, - Doctype, - NavigableString, - SoupStrainer, - Tag, -) -from bs4.testing import SoupTest - -XML_BUILDER_PRESENT = (builder_registry.lookup("xml") is not None) -LXML_PRESENT = (builder_registry.lookup("lxml") is not None) - -class TreeTest(SoupTest): - - def assertSelects(self, tags, should_match): - """Make sure that the given tags have the correct text. - - This is used in tests that define a bunch of tags, each - containing a single string, and then select certain strings by - some mechanism. - """ - self.assertEqual([tag.string for tag in tags], should_match) - - def assertSelectsIDs(self, tags, should_match): - """Make sure that the given tags have the correct IDs. - - This is used in tests that define a bunch of tags, each - containing a single string, and then select certain strings by - some mechanism. - """ - self.assertEqual([tag['id'] for tag in tags], should_match) - - -class TestFind(TreeTest): - """Basic tests of the find() method. - - find() just calls find_all() with limit=1, so it's not tested all - that thouroughly here. - """ - - def test_find_tag(self): - soup = self.soup("1234") - self.assertEqual(soup.find("b").string, "2") - - def test_unicode_text_find(self): - soup = self.soup('

Räksmörgås

') - self.assertEqual(soup.find(string='Räksmörgås'), 'Räksmörgås') - - def test_unicode_attribute_find(self): - soup = self.soup('

here it is

') - str(soup) - self.assertEqual("here it is", soup.find(id='RäksmörgÃ¥s').text) - - - def test_find_everything(self): - """Test an optimization that finds all tags.""" - soup = self.soup("foobar") - self.assertEqual(2, len(soup.find_all())) - - def test_find_everything_with_name(self): - """Test an optimization that finds all tags with a given name.""" - soup = self.soup("foobarbaz") - self.assertEqual(2, len(soup.find_all('a'))) - -class TestFindAll(TreeTest): - """Basic tests of the find_all() method.""" - - def test_find_all_text_nodes(self): - """You can search the tree for text nodes.""" - soup = self.soup("Foobar\xbb") - # Exact match. - self.assertEqual(soup.find_all(string="bar"), ["bar"]) - self.assertEqual(soup.find_all(text="bar"), ["bar"]) - # Match any of a number of strings. - self.assertEqual( - soup.find_all(text=["Foo", "bar"]), ["Foo", "bar"]) - # Match a regular expression. - self.assertEqual(soup.find_all(text=re.compile('.*')), - ["Foo", "bar", '\xbb']) - # Match anything. - self.assertEqual(soup.find_all(text=True), - ["Foo", "bar", '\xbb']) - - def test_find_all_limit(self): - """You can limit the number of items returned by find_all.""" - soup = self.soup("12345") - self.assertSelects(soup.find_all('a', limit=3), ["1", "2", "3"]) - self.assertSelects(soup.find_all('a', limit=1), ["1"]) - self.assertSelects( - soup.find_all('a', limit=10), ["1", "2", "3", "4", "5"]) - - # A limit of 0 means no limit. - self.assertSelects( - soup.find_all('a', limit=0), ["1", "2", "3", "4", "5"]) - - def test_calling_a_tag_is_calling_findall(self): - soup = self.soup("123") - self.assertSelects(soup('a', limit=1), ["1"]) - self.assertSelects(soup.b(id="foo"), ["3"]) - - def test_find_all_with_self_referential_data_structure_does_not_cause_infinite_recursion(self): - soup = self.soup("") - # Create a self-referential list. - l = [] - l.append(l) - - # Without special code in _normalize_search_value, this would cause infinite - # recursion. - self.assertEqual([], soup.find_all(l)) - - def test_find_all_resultset(self): - """All find_all calls return a ResultSet""" - soup = self.soup("") - result = soup.find_all("a") - self.assertTrue(hasattr(result, "source")) - - result = soup.find_all(True) - self.assertTrue(hasattr(result, "source")) - - result = soup.find_all(text="foo") - self.assertTrue(hasattr(result, "source")) - - -class TestFindAllBasicNamespaces(TreeTest): - - def test_find_by_namespaced_name(self): - soup = self.soup('4') - self.assertEqual("4", soup.find("mathml:msqrt").string) - self.assertEqual("a", soup.find(attrs= { "svg:fill" : "red" }).name) - - -class TestFindAllByName(TreeTest): - """Test ways of finding tags by tag name.""" - - def setUp(self): - super(TreeTest, self).setUp() - self.tree = self.soup("""First tag. - Second tag. - Third Nested tag. tag.""") - - def test_find_all_by_tag_name(self): - # Find all the tags. - self.assertSelects( - self.tree.find_all('a'), ['First tag.', 'Nested tag.']) - - def test_find_all_by_name_and_text(self): - self.assertSelects( - self.tree.find_all('a', text='First tag.'), ['First tag.']) - - self.assertSelects( - self.tree.find_all('a', text=True), ['First tag.', 'Nested tag.']) - - self.assertSelects( - self.tree.find_all('a', text=re.compile("tag")), - ['First tag.', 'Nested tag.']) - - - def test_find_all_on_non_root_element(self): - # You can call find_all on any node, not just the root. - self.assertSelects(self.tree.c.find_all('a'), ['Nested tag.']) - - def test_calling_element_invokes_find_all(self): - self.assertSelects(self.tree('a'), ['First tag.', 'Nested tag.']) - - def test_find_all_by_tag_strainer(self): - self.assertSelects( - self.tree.find_all(SoupStrainer('a')), - ['First tag.', 'Nested tag.']) - - def test_find_all_by_tag_names(self): - self.assertSelects( - self.tree.find_all(['a', 'b']), - ['First tag.', 'Second tag.', 'Nested tag.']) - - def test_find_all_by_tag_dict(self): - self.assertSelects( - self.tree.find_all({'a' : True, 'b' : True}), - ['First tag.', 'Second tag.', 'Nested tag.']) - - def test_find_all_by_tag_re(self): - self.assertSelects( - self.tree.find_all(re.compile('^[ab]$')), - ['First tag.', 'Second tag.', 'Nested tag.']) - - def test_find_all_with_tags_matching_method(self): - # You can define an oracle method that determines whether - # a tag matches the search. - def id_matches_name(tag): - return tag.name == tag.get('id') - - tree = self.soup("""Match 1. - Does not match. - Match 2.""") - - self.assertSelects( - tree.find_all(id_matches_name), ["Match 1.", "Match 2."]) - - -class TestFindAllByAttribute(TreeTest): - - def test_find_all_by_attribute_name(self): - # You can pass in keyword arguments to find_all to search by - # attribute. - tree = self.soup(""" - Matching a. - - Non-matching Matching b.a. - """) - self.assertSelects(tree.find_all(id='first'), - ["Matching a.", "Matching b."]) - - def test_find_all_by_utf8_attribute_value(self): - peace = "×ולש".encode("utf8") - data = ''.encode("utf8") - soup = self.soup(data) - self.assertEqual([soup.a], soup.find_all(title=peace)) - self.assertEqual([soup.a], soup.find_all(title=peace.decode("utf8"))) - self.assertEqual([soup.a], soup.find_all(title=[peace, "something else"])) - - def test_find_all_by_attribute_dict(self): - # You can pass in a dictionary as the argument 'attrs'. This - # lets you search for attributes like 'name' (a fixed argument - # to find_all) and 'class' (a reserved word in Python.) - tree = self.soup(""" - Name match. - Class match. - Non-match. - A tag called 'name1'. - """) - - # This doesn't do what you want. - self.assertSelects(tree.find_all(name='name1'), - ["A tag called 'name1'."]) - # This does what you want. - self.assertSelects(tree.find_all(attrs={'name' : 'name1'}), - ["Name match."]) - - self.assertSelects(tree.find_all(attrs={'class' : 'class2'}), - ["Class match."]) - - def test_find_all_by_class(self): - tree = self.soup(""" - Class 1. - Class 2. - Class 1. - Class 3 and 4. - """) - - # Passing in the class_ keyword argument will search against - # the 'class' attribute. - self.assertSelects(tree.find_all('a', class_='1'), ['Class 1.']) - self.assertSelects(tree.find_all('c', class_='3'), ['Class 3 and 4.']) - self.assertSelects(tree.find_all('c', class_='4'), ['Class 3 and 4.']) - - # Passing in a string to 'attrs' will also search the CSS class. - self.assertSelects(tree.find_all('a', '1'), ['Class 1.']) - self.assertSelects(tree.find_all(attrs='1'), ['Class 1.', 'Class 1.']) - self.assertSelects(tree.find_all('c', '3'), ['Class 3 and 4.']) - self.assertSelects(tree.find_all('c', '4'), ['Class 3 and 4.']) - - def test_find_by_class_when_multiple_classes_present(self): - tree = self.soup("Found it") - - f = tree.find_all("gar", class_=re.compile("o")) - self.assertSelects(f, ["Found it"]) - - f = tree.find_all("gar", class_=re.compile("a")) - self.assertSelects(f, ["Found it"]) - - # Since the class is not the string "foo bar", but the two - # strings "foo" and "bar", this will not find anything. - f = tree.find_all("gar", class_=re.compile("o b")) - self.assertSelects(f, []) - - def test_find_all_with_non_dictionary_for_attrs_finds_by_class(self): - soup = self.soup("Found it") - - self.assertSelects(soup.find_all("a", re.compile("ba")), ["Found it"]) - - def big_attribute_value(value): - return len(value) > 3 - - self.assertSelects(soup.find_all("a", big_attribute_value), []) - - def small_attribute_value(value): - return len(value) <= 3 - - self.assertSelects( - soup.find_all("a", small_attribute_value), ["Found it"]) - - def test_find_all_with_string_for_attrs_finds_multiple_classes(self): - soup = self.soup('') - a, a2 = soup.find_all("a") - self.assertEqual([a, a2], soup.find_all("a", "foo")) - self.assertEqual([a], soup.find_all("a", "bar")) - - # If you specify the class as a string that contains a - # space, only that specific value will be found. - self.assertEqual([a], soup.find_all("a", class_="foo bar")) - self.assertEqual([a], soup.find_all("a", "foo bar")) - self.assertEqual([], soup.find_all("a", "bar foo")) - - def test_find_all_by_attribute_soupstrainer(self): - tree = self.soup(""" - Match. - Non-match.""") - - strainer = SoupStrainer(attrs={'id' : 'first'}) - self.assertSelects(tree.find_all(strainer), ['Match.']) - - def test_find_all_with_missing_atribute(self): - # You can pass in None as the value of an attribute to find_all. - # This will match tags that do not have that attribute set. - tree = self.soup("""ID present. - No ID present. - ID is empty.""") - self.assertSelects(tree.find_all('a', id=None), ["No ID present."]) - - def test_find_all_with_defined_attribute(self): - # You can pass in None as the value of an attribute to find_all. - # This will match tags that have that attribute set to any value. - tree = self.soup("""ID present. - No ID present. - ID is empty.""") - self.assertSelects( - tree.find_all(id=True), ["ID present.", "ID is empty."]) - - def test_find_all_with_numeric_attribute(self): - # If you search for a number, it's treated as a string. - tree = self.soup("""Unquoted attribute. - Quoted attribute.""") - - expected = ["Unquoted attribute.", "Quoted attribute."] - self.assertSelects(tree.find_all(id=1), expected) - self.assertSelects(tree.find_all(id="1"), expected) - - def test_find_all_with_list_attribute_values(self): - # You can pass a list of attribute values instead of just one, - # and you'll get tags that match any of the values. - tree = self.soup("""1 - 2 - 3 - No ID.""") - self.assertSelects(tree.find_all(id=["1", "3", "4"]), - ["1", "3"]) - - def test_find_all_with_regular_expression_attribute_value(self): - # You can pass a regular expression as an attribute value, and - # you'll get tags whose values for that attribute match the - # regular expression. - tree = self.soup("""One a. - Two as. - Mixed as and bs. - One b. - No ID.""") - - self.assertSelects(tree.find_all(id=re.compile("^a+$")), - ["One a.", "Two as."]) - - def test_find_by_name_and_containing_string(self): - soup = self.soup("foobarfoo") - a = soup.a - - self.assertEqual([a], soup.find_all("a", text="foo")) - self.assertEqual([], soup.find_all("a", text="bar")) - self.assertEqual([], soup.find_all("a", text="bar")) - - def test_find_by_name_and_containing_string_when_string_is_buried(self): - soup = self.soup("foofoo") - self.assertEqual(soup.find_all("a"), soup.find_all("a", text="foo")) - - def test_find_by_attribute_and_containing_string(self): - soup = self.soup('foofoo') - a = soup.a - - self.assertEqual([a], soup.find_all(id=2, text="foo")) - self.assertEqual([], soup.find_all(id=1, text="bar")) - - - - -class TestIndex(TreeTest): - """Test Tag.index""" - def test_index(self): - tree = self.soup("""
- Identical - Not identical - Identical - - Identical with child - Also not identical - Identical with child -
""") - div = tree.div - for i, element in enumerate(div.contents): - self.assertEqual(i, div.index(element)) - self.assertRaises(ValueError, tree.index, 1) - - -class TestParentOperations(TreeTest): - """Test navigation and searching through an element's parents.""" - - def setUp(self): - super(TestParentOperations, self).setUp() - self.tree = self.soup('''
    -